Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
777076c8
Commit
777076c8
authored
Jun 06, 2008
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor changes. See changelog
parent
6bb111cb
Changes
27
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
176 additions
and
98 deletions
+176
-98
3d_read_mesh.cpp
3d-viewer/3d_read_mesh.cpp
+2
-2
change_log.txt
change_log.txt
+10
-0
common.cpp
common/common.cpp
+38
-5
edaappl.cpp
common/edaappl.cpp
+2
-0
loadcmp.cpp
cvpcb/loadcmp.cpp
+2
-2
dangling_ends.cpp
eeschema/dangling_ends.cpp
+0
-2
plothpgl.cpp
eeschema/plothpgl.cpp
+2
-2
plotps.cpp
eeschema/plotps.cpp
+2
-2
export_to_pcbnew.cpp
gerbview/export_to_pcbnew.cpp
+2
-2
readgerb.cpp
gerbview/readgerb.cpp
+2
-2
common.h
include/common.h
+22
-0
mainframe.cpp
kicad/mainframe.cpp
+2
-0
gen_drill_report_files.cpp
pcbnew/gen_drill_report_files.cpp
+2
-2
gen_modules_placefile.cpp
pcbnew/gen_modules_placefile.cpp
+4
-4
gendrill.cpp
pcbnew/gendrill.cpp
+2
-2
ioascii.cpp
pcbnew/ioascii.cpp
+4
-4
loadcmp.cpp
pcbnew/loadcmp.cpp
+2
-2
muonde.cpp
pcbnew/muonde.cpp
+2
-2
pcbcfg.h
pcbnew/pcbcfg.h
+57
-46
plotgerb.cpp
pcbnew/plotgerb.cpp
+2
-2
plothpgl.cpp
pcbnew/plothpgl.cpp
+2
-2
plotps.cpp
pcbnew/plotps.cpp
+2
-2
router.cpp
pcbnew/router.cpp
+2
-2
specctra.cpp
pcbnew/specctra.cpp
+2
-2
specctra_export.cpp
pcbnew/specctra_export.cpp
+2
-2
specctra_import.cpp
pcbnew/specctra_import.cpp
+3
-3
svg_print.cpp
share/svg_print.cpp
+2
-2
No files found.
3d-viewer/3d_read_mesh.cpp
View file @
777076c8
...
...
@@ -53,7 +53,7 @@ int Struct3D_Master:: ReadData()
}
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
while
(
GetLine
(
file
,
line
,
&
LineNum
,
512
)
)
{
text
=
strtok
(
line
,
"
\t\n\r
"
);
...
...
@@ -75,7 +75,7 @@ int Struct3D_Master:: ReadData()
}
fclose
(
file
);
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
SetLocaleTo_Default
(
);
// revert to the current locale
return
0
;
}
...
...
change_log.txt
View file @
777076c8
...
...
@@ -5,6 +5,16 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2008-June-06 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+all:
minor changes
added void SetLocaleTo_C_standard(void) and void SetLocaleTo_Default(void)
This is wrapper to the C setlocale( LC_NUMERIC, "C" )
and setlocale( LC_NUMERIC, "" )function,
but could make more easier an optional use of locale in kicad in floating point notations
2008-May-30 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew
...
...
common/common.cpp
View file @
777076c8
...
...
@@ -25,6 +25,39 @@ wxString GetBuildVersion()
}
/********************************/
void
SetLocaleTo_C_standard
(
void
)
/********************************/
/** function SetLocaleTo_C_standard
because kicad is internationalized, switch internatization to "C" standard
i.e. uses the . (dot) as separator in print/read float numbers
(some contries (France, Germany ..) use , (comma) as separator)
This function must be called before read or write ascii files using float numbers in data
the SetLocaleTo_C_standard function must be called after reading or writing the file
This is wrapper to the C setlocale( LC_NUMERIC, "C" ) function,
but could make more easier an optional use of locale in kicad
*/
{
setlocale
(
LC_NUMERIC
,
"C"
);
// Switch the locale to standard C
}
/********************************/
void
SetLocaleTo_Default
(
void
)
/********************************/
/** function SetLocaleTo_Default
because kicad is internationalized, switch internatization to default
to use the default separator in print/read float numbers
(. (dot) but some contries (France, Germany ..) use , (comma) as separator)
This function must be called after a call to SetLocaleTo_C_standard
This is wrapper to the C setlocale( LC_NUMERIC, "" ) function,
but could make more easier an optional use of locale in kicad
*/
{
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
}
/*********************************************************************************************/
Ki_PageDescr
::
Ki_PageDescr
(
const
wxSize
&
size
,
const
wxPoint
&
offset
,
const
wxString
&
name
)
/*********************************************************************************************/
...
...
@@ -285,8 +318,8 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding )
/**************************************************************/
/* Return the name of the layer number "layer_number".
* if
"is_filefame"
== TRUE, the name can be used for a file name
* (no
t internatinalized, no space
)
* if
omitSpacePadding
== TRUE, the name can be used for a file name
* (no
spaces, replaced by _
)
*/
{
const
unsigned
LAYER_LIMIT
=
29
;
...
...
@@ -302,7 +335,7 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding )
_
(
"Adhes Cop"
),
_
(
"Adhes Cmp"
),
_
(
"SoldP Cop"
),
_
(
"SoldP Cmp"
),
_
(
"SilkS Cop"
),
_
(
"SilkS Cmp"
),
_
(
"Mask Cop "
),
_
(
"Mask Cmp "
),
_
(
"Drawings "
),
_
(
"Comments "
),
_
(
"Eco1 "
),
_
(
"Eco2 "
),
_
(
"Edges Pcb"
),
_
(
"BAD INDEX"
)
,
_
(
"Edges Pcb"
),
_
(
"BAD INDEX"
)
};
if
(
(
unsigned
)
layer_number
>
LAYER_LIMIT
)
...
...
@@ -445,9 +478,9 @@ int GetTimeStamp()
}
/*************************************************/
/*************************************************
*************
/
const
wxString
&
valeur_param
(
int
valeur
,
wxString
&
buf_texte
)
/*************************************************/
/*************************************************
*************
/
/* Retourne pour affichage la valeur d'un parametre, selon type d'unites choisies
* entree : valeur en mils , buffer de texte
...
...
common/edaappl.cpp
View file @
777076c8
...
...
@@ -263,6 +263,8 @@ void WinEDA_App::InitEDA_Appl( const wxString& name )
if
(
!
succes
)
{
}
SetLocaleTo_Default
(
);
// Set locale option for separator used in float numbers
#ifdef KICAD_PYTHON
PyHandler
::
GetInstance
()
->
SetAppName
(
name
);
...
...
cvpcb/loadcmp.cpp
View file @
777076c8
...
...
@@ -81,9 +81,9 @@ MODULE * Module = NULL;
{
Module
=
new
MODULE
(
m_Pcb
);
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
Module
->
ReadDescr
(
lib_module
,
&
LineNum
);
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
SetLocaleTo_Default
(
);
// revert to the current locale
Module
->
SetPosition
(
wxPoint
(
0
,
0
)
);
fclose
(
lib_module
);
return
(
Module
)
;
...
...
eeschema/dangling_ends.cpp
View file @
777076c8
...
...
@@ -319,8 +319,6 @@ DanglingEndHandle* RebuildEndList( EDA_BaseStruct* DrawList )
switch
(
DrawItem
->
Type
()
)
{
case
TYPE_SCH_LABEL
:
break
;
case
TYPE_SCH_GLOBALLABEL
:
case
TYPE_SCH_HIERLABEL
:
#undef STRUCT
...
...
eeschema/plothpgl.cpp
View file @
777076c8
...
...
@@ -568,10 +568,10 @@ void WinEDA_PlotHPGLFrame::Plot_Schematic_HPGL( int Select_PlotAll, int HPGL_She
else
PlotFileName
=
MakeFileName
(
dirbuf
,
g_DefaultSchematicFileName
,
wxT
(
".plt"
)
);
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
InitPlotParametresHPGL
(
PlotOffset
,
g_PlotScaleX
,
g_PlotScaleY
);
Plot_1_Page_HPGL
(
PlotFileName
,
screen
);
setlocale
(
LC_NUMERIC
,
""
);
SetLocaleTo_Default
(
);
screen
=
(
BASE_SCREEN
*
)
screen
->
Pnext
;
if
(
Select_PlotAll
==
FALSE
)
break
;
...
...
eeschema/plotps.cpp
View file @
777076c8
...
...
@@ -481,7 +481,7 @@ void WinEDA_PlotPSFrame::PlotOneSheetPS( const wxString& FileName,
return
;
}
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
Line
.
Printf
(
_
(
"Plot: %s
\n
"
),
FileName
.
GetData
()
);
m_MsgBox
->
AppendText
(
Line
);
...
...
@@ -610,7 +610,7 @@ void WinEDA_PlotPSFrame::PlotOneSheetPS( const wxString& FileName,
/* fin */
CloseFilePS
(
PlotOutput
);
setlocale
(
LC_NUMERIC
,
""
);
SetLocaleTo_Default
(
);
m_MsgBox
->
AppendText
(
wxT
(
"Ok
\n
"
)
);
}
...
...
gerbview/export_to_pcbnew.cpp
View file @
777076c8
...
...
@@ -224,7 +224,7 @@ static int SavePcbFormatAscii( WinEDA_GerberFrame* frame, FILE* aFile,
}
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
// write the PCB heading
fprintf
(
aFile
,
"PCBNEW-BOARD Version %d date %s
\n\n
"
,
g_CurrentVersionPCB
,
...
...
@@ -238,7 +238,7 @@ static int SavePcbFormatAscii( WinEDA_GerberFrame* frame, FILE* aFile,
// the destructor should destroy all owned sub-objects
delete
pcb
;
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
SetLocaleTo_Default
(
);
// revert to the current locale
wxEndBusyCursor
();
return
1
;
}
gerbview/readgerb.cpp
View file @
777076c8
...
...
@@ -154,7 +154,7 @@ bool WinEDA_GerberFrame::Read_GERBER_File( wxDC* DC,
wxSetWorkingDirectory
(
path
);
wxBusyCursor
show_wait
;
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
while
(
TRUE
)
{
...
...
@@ -256,7 +256,7 @@ bool WinEDA_GerberFrame::Read_GERBER_File( wxDC* DC,
}
fclose
(
gerber_layer
->
m_Current_File
);
setlocale
(
LC_NUMERIC
,
""
);
SetLocaleTo_Default
(
);
/* Init DCodes list and perhaps read a DCODES file,
* if the gerber file is only a RS274D file (without any aperture information)
...
...
include/common.h
View file @
777076c8
...
...
@@ -355,6 +355,28 @@ class WinEDA_DrawPanel;
/* COMMON.CPP */
/** function SetLocaleTo_C_standard
because kicad is internationalized, switch internatization to "C" standard
i.e. uses the . (dot) as separator in print/read float numbers
(some contries (France, Germany ..) use , (comma) as separator)
This function must be called before read or write ascii files using float numbers in data
the SetLocaleTo_C_standard function must be called after reading or writing the file
This is wrapper to the C setlocale( LC_NUMERIC, "C" ) function,
but could make more easier an optional use of locale in kicad
*/
void
SetLocaleTo_C_standard
(
void
);
/** function SetLocaleTo_Default
because kicad is internationalized, switch internatization to default
to use the default separator in print/read float numbers
(. (dot) but some contries (France, Germany ..) use , (comma) as separator)
This function must be called after a call to SetLocaleTo_C_standard
This is wrapper to the C setlocale( LC_NUMERIC, "" ) function,
but could make more easier an optional use of locale in kicad
*/
void
SetLocaleTo_Default
(
void
);
/**
* Operator << overload
...
...
kicad/mainframe.cpp
View file @
777076c8
...
...
@@ -247,6 +247,8 @@ void WinEDA_MainFrame::OnCloseWindow( wxCloseEvent& Event )
m_Parent
->
m_HtmlCtrl
->
GetFrame
()
->
Close
(
TRUE
);
m_Parent
->
m_HtmlCtrl
=
NULL
;
}
m_LeftWin
->
Show
(
false
);
Destroy
();
}
...
...
pcbnew/gen_drill_report_files.cpp
View file @
777076c8
...
...
@@ -50,7 +50,7 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, w
wxString
msg
;
setlocale
(
LC_NUMERIC
,
"C"
);
// Use the standard notation for float numbers
SetLocaleTo_C_standard
(
);
// Use the standard notation for float numbers
g_PlotOrient
=
0
;
/* calcul des dimensions et centre du PCB */
aPcb
->
ComputeBoundaryBox
();
...
...
@@ -357,7 +357,7 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, w
break
;
}
setlocale
(
LC_NUMERIC
,
""
);
// Revert to local notation for float numbers
SetLocaleTo_Default
(
);
// Revert to local notation for float numbers
g_PlotOrient
=
old_g_PlotOrient
;
}
...
...
pcbnew/gen_modules_placefile.cpp
View file @
777076c8
...
...
@@ -144,7 +144,7 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event )
}
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
/* Affichage du bilan : */
MsgPanel
->
EraseMsgBox
();
...
...
@@ -250,7 +250,7 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event )
fclose
(
LayerCu
);
}
MyFree
(
Liste
);
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
SetLocaleTo_Default
(
);
// revert to the current locale
msg
=
wxT
(
"Cmp File: "
)
+
NameLayerCmp
;
if
(
GenCu
)
...
...
@@ -294,7 +294,7 @@ void WinEDA_PcbFrame::GenModuleReport( wxCommandEvent& event )
}
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
/* Generation entete du fichier 'commentaires) */
sprintf
(
Line
,
"## Module report - date %s
\n
"
,
DateAndTime
(
Buff
)
);
...
...
@@ -421,7 +421,7 @@ void WinEDA_PcbFrame::GenModuleReport( wxCommandEvent& event )
/* Generation fin du fichier */
fputs
(
"$EndDESCRIPTION
\n
"
,
rptfile
);
fclose
(
rptfile
);
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
SetLocaleTo_Default
(
);
// revert to the current locale
}
...
...
pcbnew/gendrill.cpp
View file @
777076c8
...
...
@@ -408,7 +408,7 @@ int WinEDA_DrillFrame::Create_Drill_File_EXCELLON( std::vector<HOLE_INFO>& aHol
float
xt
,
yt
;
char
line
[
1024
];
setlocale
(
LC_NUMERIC
,
"C"
);
// Use the standard notation for float numbers
SetLocaleTo_C_standard
(
);
// Use the standard notation for float numbers
Write_Excellon_Header
(
dest
);
...
...
@@ -539,7 +539,7 @@ int WinEDA_DrillFrame::Create_Drill_File_EXCELLON( std::vector<HOLE_INFO>& aHol
Write_End_Of_File_Drill
(
dest
);
setlocale
(
LC_NUMERIC
,
""
);
// Revert to locale float notation
SetLocaleTo_Default
(
);
// Revert to locale float notation
return
holes_count
;
}
...
...
pcbnew/ioascii.cpp
View file @
777076c8
...
...
@@ -772,7 +772,7 @@ int WinEDA_PcbFrame::ReadPcbFile( FILE* File, bool Append )
wxBusyCursor
dummy
;
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
NbDraw
=
NbTrack
=
NbZone
=
NbMod
=
NbNets
=
-
1
;
m_Pcb
->
m_NbNets
=
0
;
...
...
@@ -1003,7 +1003,7 @@ int WinEDA_PcbFrame::ReadPcbFile( FILE* File, bool Append )
}
}
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
SetLocaleTo_Default
(
);
// revert to the current locale
Affiche_Message
(
wxEmptyString
);
...
...
@@ -1035,7 +1035,7 @@ int WinEDA_PcbFrame::SavePcbFormatAscii( FILE* aFile )
wxBeginBusyCursor
();
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
/* Ecriture de l'entete PCB : */
fprintf
(
aFile
,
"PCBNEW-BOARD Version %d date %s
\n\n
"
,
g_CurrentVersionPCB
,
...
...
@@ -1047,7 +1047,7 @@ int WinEDA_PcbFrame::SavePcbFormatAscii( FILE* aFile )
rc
=
m_Pcb
->
Save
(
aFile
);
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
SetLocaleTo_Default
(
);
// revert to the current locale
wxEndBusyCursor
();
if
(
!
rc
)
...
...
pcbnew/loadcmp.cpp
View file @
777076c8
...
...
@@ -268,9 +268,9 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( wxWindow* winaff,
NewModule
=
new
MODULE
(
m_Pcb
);
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
NewModule
->
ReadDescr
(
lib_module
,
&
LineNum
);
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
SetLocaleTo_Default
(
);
// revert to the current locale
if
(
Module
==
NULL
)
/* 1er Module */
{
m_Pcb
->
m_Modules
=
NewModule
;
...
...
pcbnew/muonde.cpp
View file @
777076c8
...
...
@@ -449,7 +449,7 @@ void WinEDA_SetParamShapeFrame::ReadDataShapeDescr( wxCommandEvent& event )
bufsize
=
100
;
ptbuf
=
PolyEdges
=
(
double
*
)
MyZMalloc
(
bufsize
*
2
*
sizeof
(
double
)
);
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
int
LineNum
=
0
;
while
(
GetLine
(
File
,
Line
,
&
LineNum
,
sizeof
(
Line
)
-
1
)
!=
NULL
)
{
...
...
@@ -504,7 +504,7 @@ void WinEDA_SetParamShapeFrame::ReadDataShapeDescr( wxCommandEvent& event )
PolyEdges
=
NULL
;
}
fclose
(
File
);
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
SetLocaleTo_Default
(
);
// revert to the current locale
ShapeScaleX
*=
unitconv
;
ShapeScaleY
*=
unitconv
;
...
...
pcbnew/pcbcfg.h
View file @
777076c8
This diff is collapsed.
Click to expand it.
pcbnew/plotgerb.cpp
View file @
777076c8
...
...
@@ -74,7 +74,7 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
return
;
}
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
InitPlotParametresGERBER
(
g_PlotOffset
,
scale_x
,
scale_y
);
...
...
@@ -135,7 +135,7 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
}
Fin_Trace_GERBER
(
this
,
dest
);
setlocale
(
LC_NUMERIC
,
""
);
SetLocaleTo_Default
(
);
}
...
...
pcbnew/plothpgl.cpp
View file @
777076c8
...
...
@@ -69,7 +69,7 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer )
return
;
}
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
Affiche_1_Parametre
(
this
,
0
,
_
(
"File"
),
FullFileName
,
CYAN
);
...
...
@@ -185,7 +185,7 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer )
/* fin */
CloseFileHPGL
(
dest
);
setlocale
(
LC_NUMERIC
,
""
);
SetLocaleTo_Default
(
);
}
...
...
pcbnew/plotps.cpp
View file @
777076c8
...
...
@@ -53,7 +53,7 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, bo
return
;
}
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
Affiche_1_Parametre
(
this
,
0
,
_
(
"File"
),
FullFileName
,
CYAN
);
...
...
@@ -226,7 +226,7 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, bo
// fin
CloseFilePS
(
dest
);
setlocale
(
LC_NUMERIC
,
""
);
SetLocaleTo_Default
(
);
}
...
...
pcbnew/router.cpp
View file @
777076c8
...
...
@@ -573,7 +573,7 @@ void WinEDA_PcbFrame::ReadAutoroutedTracks( wxDC* DC )
Affiche_Message
(
msg
);
}
setlocale
(
LC_NUMERIC
,
"C"
);
SetLocaleTo_C_standard
(
);
track_width
=
g_DesignSettings
.
m_CurrentTrackWidth
;
via_size
=
g_DesignSettings
.
m_CurrentViaSize
;
...
...
@@ -654,7 +654,7 @@ void WinEDA_PcbFrame::ReadAutoroutedTracks( wxDC* DC )
fclose
(
File
);
setlocale
(
LC_NUMERIC
,
""
);
SetLocaleTo_Default
(
);
if
(
NbTrack
==
0
)
DisplayError
(
this
,
wxT
(
"Warning: No tracks"
),
10
);
...
...
pcbnew/specctra.cpp
View file @
777076c8
...
...
@@ -3971,7 +3971,7 @@ int main( int argc, char** argv )
SPECCTRA_DB
db
;
bool
failed
=
false
;
setlocale
(
LC_NUMERIC
,
"C"
);
// Switch the locale to standard C
SetLocaleTo_C_standard
(
);
// Switch the locale to standard C
if
(
argc
==
2
)
{
...
...
@@ -4002,7 +4002,7 @@ int main( int argc, char** argv )
db
.
SetFILE
(
stdout
);
pcb
->
Format
(
&
db
,
0
);
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
SetLocaleTo_Default
(
);
// revert to the current locale
}
#endif
...
...
pcbnew/specctra_export.cpp
View file @
777076c8
...
...
@@ -82,7 +82,7 @@ void WinEDA_PcbFrame::ExportToSpecctra( wxCommandEvent& event )
db
.
SetPCB
(
SPECCTRA_DB
::
MakePCB
()
);
setlocale
(
LC_NUMERIC
,
"C"
);
// Switch the locale to standard C
SetLocaleTo_C_standard
(
);
// Switch the locale to standard C
// DSN Images (=Kicad MODULES and pads) must be presented from the
// top view. So we temporarily flip any modules which are on the back
...
...
@@ -105,7 +105,7 @@ void WinEDA_PcbFrame::ExportToSpecctra( wxCommandEvent& event )
errorText
=
ioe
.
errorText
;
}
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
SetLocaleTo_Default
(
);
// revert to the current locale
// done assuredly, even if an exception was thrown and caught.
db
.
RevertMODULEs
(
m_Pcb
);
...
...
pcbnew/specctra_import.cpp
View file @
777076c8
...
...
@@ -86,7 +86,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
SPECCTRA_DB
db
;
setlocale
(
LC_NUMERIC
,
"C"
);
// Switch the locale to standard C
SetLocaleTo_C_standard
(
);
// Switch the locale to standard C
try
{
...
...
@@ -95,7 +95,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
}
catch
(
IOError
ioe
)
{
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
SetLocaleTo_Default
(
);
// revert to the current locale
ioe
.
errorText
+=
'\n'
;
ioe
.
errorText
+=
_
(
"BOARD may be corrupted, do not save it."
);
...
...
@@ -106,7 +106,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
return
;
}
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
SetLocaleTo_Default
(
);
// revert to the current locale
m_SelTrackWidthBox_Changed
=
TRUE
;
m_SelViaSizeBox_Changed
=
TRUE
;
...
...
share/svg_print.cpp
View file @
777076c8
...
...
@@ -507,9 +507,9 @@ bool WinEDA_PrintSVGFrame::DrawPage( const wxString& FullFileName, BASE_SCREEN*
panel
->
m_ClipBox
.
SetWidth
(
0x7FFFFF0
);
panel
->
m_ClipBox
.
SetHeight
(
0x7FFFFF0
);
g_IsPrinting
=
TRUE
;
setlocale
(
LC_NUMERIC
,
"C"
);
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
SetLocaleTo_C_standard
(
);
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
panel
->
PrintPage
(
&
dc
,
m_Print_Sheet_Ref
,
m_PrintMaskLayer
);
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
SetLocaleTo_Default
(
);
// revert to the current locale
g_IsPrinting
=
FALSE
;
panel
->
m_ClipBox
=
tmp
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment