Commit 777076c8 authored by charras's avatar charras

minor changes. See changelog

parent 6bb111cb
...@@ -53,7 +53,7 @@ int Struct3D_Master:: ReadData() ...@@ -53,7 +53,7 @@ int Struct3D_Master:: ReadData()
} }
// Switch the locale to standard C (needed to print floating point numbers like 1.3) // 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 ) ) while( GetLine( file, line, &LineNum, 512 ) )
{ {
text = strtok( line, " \t\n\r" ); text = strtok( line, " \t\n\r" );
...@@ -75,7 +75,7 @@ int Struct3D_Master:: ReadData() ...@@ -75,7 +75,7 @@ int Struct3D_Master:: ReadData()
} }
fclose( file ); fclose( file );
setlocale( LC_NUMERIC, "" ); // revert to the current locale SetLocaleTo_Default( ); // revert to the current locale
return 0; return 0;
} }
......
...@@ -5,6 +5,16 @@ Started 2007-June-11 ...@@ -5,6 +5,16 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. 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> 2008-May-30 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+pcbnew +pcbnew
......
...@@ -25,6 +25,39 @@ wxString GetBuildVersion() ...@@ -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 ) Ki_PageDescr::Ki_PageDescr( const wxSize& size, const wxPoint& offset, const wxString& name )
/*********************************************************************************************/ /*********************************************************************************************/
...@@ -285,8 +318,8 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding ) ...@@ -285,8 +318,8 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding )
/**************************************************************/ /**************************************************************/
/* Return the name of the layer number "layer_number". /* Return the name of the layer number "layer_number".
* if "is_filefame" == TRUE, the name can be used for a file name * if omitSpacePadding == TRUE, the name can be used for a file name
* (not internatinalized, no space) * (no spaces, replaced by _)
*/ */
{ {
const unsigned LAYER_LIMIT = 29; const unsigned LAYER_LIMIT = 29;
...@@ -302,7 +335,7 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding ) ...@@ -302,7 +335,7 @@ wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding )
_( "Adhes Cop" ), _( "Adhes Cmp" ), _( "SoldP Cop" ), _( "SoldP Cmp" ), _( "Adhes Cop" ), _( "Adhes Cmp" ), _( "SoldP Cop" ), _( "SoldP Cmp" ),
_( "SilkS Cop" ), _( "SilkS Cmp" ), _( "Mask Cop " ), _( "Mask Cmp " ), _( "SilkS Cop" ), _( "SilkS Cmp" ), _( "Mask Cop " ), _( "Mask Cmp " ),
_( "Drawings " ), _( "Comments " ), _( "Eco1 " ), _( "Eco2 " ), _( "Drawings " ), _( "Comments " ), _( "Eco1 " ), _( "Eco2 " ),
_( "Edges Pcb" ), _( "BAD INDEX" ), _( "Edges Pcb" ), _( "BAD INDEX" )
}; };
if( (unsigned) layer_number > LAYER_LIMIT ) if( (unsigned) layer_number > LAYER_LIMIT )
...@@ -445,9 +478,9 @@ int GetTimeStamp() ...@@ -445,9 +478,9 @@ int GetTimeStamp()
} }
/*************************************************/ /**************************************************************/
const wxString& valeur_param( int valeur, wxString& buf_texte ) const wxString& valeur_param( int valeur, wxString& buf_texte )
/*************************************************/ /**************************************************************/
/* Retourne pour affichage la valeur d'un parametre, selon type d'unites choisies /* Retourne pour affichage la valeur d'un parametre, selon type d'unites choisies
* entree : valeur en mils , buffer de texte * entree : valeur en mils , buffer de texte
......
...@@ -264,6 +264,8 @@ void WinEDA_App::InitEDA_Appl( const wxString& name ) ...@@ -264,6 +264,8 @@ void WinEDA_App::InitEDA_Appl( const wxString& name )
{ {
} }
SetLocaleTo_Default( ); // Set locale option for separator used in float numbers
#ifdef KICAD_PYTHON #ifdef KICAD_PYTHON
PyHandler::GetInstance()->SetAppName( name ); PyHandler::GetInstance()->SetAppName( name );
#endif #endif
......
...@@ -81,9 +81,9 @@ MODULE * Module = NULL; ...@@ -81,9 +81,9 @@ MODULE * Module = NULL;
{ {
Module = new MODULE(m_Pcb); Module = new MODULE(m_Pcb);
// Switch the locale to standard C (needed to print floating point numbers like 1.3) // 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); 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) ); Module->SetPosition(wxPoint(0,0) );
fclose(lib_module); fclose(lib_module);
return(Module) ; return(Module) ;
......
...@@ -319,8 +319,6 @@ DanglingEndHandle* RebuildEndList( EDA_BaseStruct* DrawList ) ...@@ -319,8 +319,6 @@ DanglingEndHandle* RebuildEndList( EDA_BaseStruct* DrawList )
switch( DrawItem->Type() ) switch( DrawItem->Type() )
{ {
case TYPE_SCH_LABEL: case TYPE_SCH_LABEL:
break;
case TYPE_SCH_GLOBALLABEL: case TYPE_SCH_GLOBALLABEL:
case TYPE_SCH_HIERLABEL: case TYPE_SCH_HIERLABEL:
#undef STRUCT #undef STRUCT
......
...@@ -568,10 +568,10 @@ void WinEDA_PlotHPGLFrame::Plot_Schematic_HPGL( int Select_PlotAll, int HPGL_She ...@@ -568,10 +568,10 @@ void WinEDA_PlotHPGLFrame::Plot_Schematic_HPGL( int Select_PlotAll, int HPGL_She
else else
PlotFileName = MakeFileName( dirbuf, g_DefaultSchematicFileName, wxT( ".plt" ) ); PlotFileName = MakeFileName( dirbuf, g_DefaultSchematicFileName, wxT( ".plt" ) );
setlocale( LC_NUMERIC, "C" ); SetLocaleTo_C_standard( );
InitPlotParametresHPGL( PlotOffset, g_PlotScaleX, g_PlotScaleY ); InitPlotParametresHPGL( PlotOffset, g_PlotScaleX, g_PlotScaleY );
Plot_1_Page_HPGL( PlotFileName, screen ); Plot_1_Page_HPGL( PlotFileName, screen );
setlocale( LC_NUMERIC, "" ); SetLocaleTo_Default( );
screen = (BASE_SCREEN*) screen->Pnext; screen = (BASE_SCREEN*) screen->Pnext;
if( Select_PlotAll == FALSE ) if( Select_PlotAll == FALSE )
break; break;
......
...@@ -481,7 +481,7 @@ void WinEDA_PlotPSFrame::PlotOneSheetPS( const wxString& FileName, ...@@ -481,7 +481,7 @@ void WinEDA_PlotPSFrame::PlotOneSheetPS( const wxString& FileName,
return; return;
} }
setlocale( LC_NUMERIC, "C" ); SetLocaleTo_C_standard( );
Line.Printf( _( "Plot: %s\n" ), FileName.GetData() ); Line.Printf( _( "Plot: %s\n" ), FileName.GetData() );
m_MsgBox->AppendText( Line ); m_MsgBox->AppendText( Line );
...@@ -610,7 +610,7 @@ void WinEDA_PlotPSFrame::PlotOneSheetPS( const wxString& FileName, ...@@ -610,7 +610,7 @@ void WinEDA_PlotPSFrame::PlotOneSheetPS( const wxString& FileName,
/* fin */ /* fin */
CloseFilePS( PlotOutput ); CloseFilePS( PlotOutput );
setlocale( LC_NUMERIC, "" ); SetLocaleTo_Default( );
m_MsgBox->AppendText( wxT( "Ok\n" ) ); m_MsgBox->AppendText( wxT( "Ok\n" ) );
} }
......
...@@ -224,7 +224,7 @@ static int SavePcbFormatAscii( WinEDA_GerberFrame* frame, FILE* aFile, ...@@ -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) // 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 // write the PCB heading
fprintf( aFile, "PCBNEW-BOARD Version %d date %s\n\n", g_CurrentVersionPCB, fprintf( aFile, "PCBNEW-BOARD Version %d date %s\n\n", g_CurrentVersionPCB,
...@@ -238,7 +238,7 @@ static int SavePcbFormatAscii( WinEDA_GerberFrame* frame, FILE* aFile, ...@@ -238,7 +238,7 @@ static int SavePcbFormatAscii( WinEDA_GerberFrame* frame, FILE* aFile,
// the destructor should destroy all owned sub-objects // the destructor should destroy all owned sub-objects
delete pcb; delete pcb;
setlocale( LC_NUMERIC, "" ); // revert to the current locale SetLocaleTo_Default( ); // revert to the current locale
wxEndBusyCursor(); wxEndBusyCursor();
return 1; return 1;
} }
...@@ -154,7 +154,7 @@ bool WinEDA_GerberFrame::Read_GERBER_File( wxDC* DC, ...@@ -154,7 +154,7 @@ bool WinEDA_GerberFrame::Read_GERBER_File( wxDC* DC,
wxSetWorkingDirectory( path ); wxSetWorkingDirectory( path );
wxBusyCursor show_wait; wxBusyCursor show_wait;
setlocale( LC_NUMERIC, "C" ); SetLocaleTo_C_standard( );
while( TRUE ) while( TRUE )
{ {
...@@ -256,7 +256,7 @@ bool WinEDA_GerberFrame::Read_GERBER_File( wxDC* DC, ...@@ -256,7 +256,7 @@ bool WinEDA_GerberFrame::Read_GERBER_File( wxDC* DC,
} }
fclose( gerber_layer->m_Current_File ); fclose( gerber_layer->m_Current_File );
setlocale( LC_NUMERIC, "" ); SetLocaleTo_Default( );
/* Init DCodes list and perhaps read a DCODES file, /* Init DCodes list and perhaps read a DCODES file,
* if the gerber file is only a RS274D file (without any aperture information) * if the gerber file is only a RS274D file (without any aperture information)
......
...@@ -355,6 +355,28 @@ class WinEDA_DrawPanel; ...@@ -355,6 +355,28 @@ class WinEDA_DrawPanel;
/* COMMON.CPP */ /* 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 * Operator << overload
......
...@@ -248,6 +248,8 @@ void WinEDA_MainFrame::OnCloseWindow( wxCloseEvent& Event ) ...@@ -248,6 +248,8 @@ void WinEDA_MainFrame::OnCloseWindow( wxCloseEvent& Event )
m_Parent->m_HtmlCtrl = NULL; m_Parent->m_HtmlCtrl = NULL;
} }
m_LeftWin->Show(false);
Destroy(); Destroy();
} }
......
...@@ -50,7 +50,7 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, w ...@@ -50,7 +50,7 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, w
wxString msg; 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; g_PlotOrient = 0;
/* calcul des dimensions et centre du PCB */ /* calcul des dimensions et centre du PCB */
aPcb->ComputeBoundaryBox(); aPcb->ComputeBoundaryBox();
...@@ -357,7 +357,7 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, w ...@@ -357,7 +357,7 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, w
break; 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; g_PlotOrient = old_g_PlotOrient;
} }
......
...@@ -144,7 +144,7 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event ) ...@@ -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) // 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 : */ /* Affichage du bilan : */
MsgPanel->EraseMsgBox(); MsgPanel->EraseMsgBox();
...@@ -250,7 +250,7 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event ) ...@@ -250,7 +250,7 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event )
fclose( LayerCu ); fclose( LayerCu );
} }
MyFree( Liste ); MyFree( Liste );
setlocale( LC_NUMERIC, "" ); // revert to the current locale SetLocaleTo_Default( ); // revert to the current locale
msg = wxT( "Cmp File: " ) + NameLayerCmp; msg = wxT( "Cmp File: " ) + NameLayerCmp;
if( GenCu ) if( GenCu )
...@@ -294,7 +294,7 @@ void WinEDA_PcbFrame::GenModuleReport( wxCommandEvent& event ) ...@@ -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) // 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) */ /* Generation entete du fichier 'commentaires) */
sprintf( Line, "## Module report - date %s\n", DateAndTime( Buff ) ); sprintf( Line, "## Module report - date %s\n", DateAndTime( Buff ) );
...@@ -421,7 +421,7 @@ void WinEDA_PcbFrame::GenModuleReport( wxCommandEvent& event ) ...@@ -421,7 +421,7 @@ void WinEDA_PcbFrame::GenModuleReport( wxCommandEvent& event )
/* Generation fin du fichier */ /* Generation fin du fichier */
fputs( "$EndDESCRIPTION\n", rptfile ); fputs( "$EndDESCRIPTION\n", rptfile );
fclose( rptfile ); fclose( rptfile );
setlocale( LC_NUMERIC, "" ); // revert to the current locale SetLocaleTo_Default( ); // revert to the current locale
} }
......
...@@ -408,7 +408,7 @@ int WinEDA_DrillFrame::Create_Drill_File_EXCELLON( std::vector<HOLE_INFO>& aHol ...@@ -408,7 +408,7 @@ int WinEDA_DrillFrame::Create_Drill_File_EXCELLON( std::vector<HOLE_INFO>& aHol
float xt, yt; float xt, yt;
char line[1024]; 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 ); Write_Excellon_Header( dest );
...@@ -539,7 +539,7 @@ int WinEDA_DrillFrame::Create_Drill_File_EXCELLON( std::vector<HOLE_INFO>& aHol ...@@ -539,7 +539,7 @@ int WinEDA_DrillFrame::Create_Drill_File_EXCELLON( std::vector<HOLE_INFO>& aHol
Write_End_Of_File_Drill( dest ); Write_End_Of_File_Drill( dest );
setlocale( LC_NUMERIC, "" ); // Revert to locale float notation SetLocaleTo_Default( ); // Revert to locale float notation
return holes_count; return holes_count;
} }
......
...@@ -772,7 +772,7 @@ int WinEDA_PcbFrame::ReadPcbFile( FILE* File, bool Append ) ...@@ -772,7 +772,7 @@ int WinEDA_PcbFrame::ReadPcbFile( FILE* File, bool Append )
wxBusyCursor dummy; wxBusyCursor dummy;
// Switch the locale to standard C (needed to print floating point numbers like 1.3) // 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; NbDraw = NbTrack = NbZone = NbMod = NbNets = -1;
m_Pcb->m_NbNets = 0; m_Pcb->m_NbNets = 0;
...@@ -1003,7 +1003,7 @@ int WinEDA_PcbFrame::ReadPcbFile( FILE* File, bool Append ) ...@@ -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 ); Affiche_Message( wxEmptyString );
...@@ -1035,7 +1035,7 @@ int WinEDA_PcbFrame::SavePcbFormatAscii( FILE* aFile ) ...@@ -1035,7 +1035,7 @@ int WinEDA_PcbFrame::SavePcbFormatAscii( FILE* aFile )
wxBeginBusyCursor(); wxBeginBusyCursor();
// Switch the locale to standard C (needed to print floating point numbers like 1.3) // 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 : */ /* Ecriture de l'entete PCB : */
fprintf( aFile, "PCBNEW-BOARD Version %d date %s\n\n", g_CurrentVersionPCB, fprintf( aFile, "PCBNEW-BOARD Version %d date %s\n\n", g_CurrentVersionPCB,
...@@ -1047,7 +1047,7 @@ int WinEDA_PcbFrame::SavePcbFormatAscii( FILE* aFile ) ...@@ -1047,7 +1047,7 @@ int WinEDA_PcbFrame::SavePcbFormatAscii( FILE* aFile )
rc = m_Pcb->Save( aFile ); rc = m_Pcb->Save( aFile );
setlocale( LC_NUMERIC, "" ); // revert to the current locale SetLocaleTo_Default( ); // revert to the current locale
wxEndBusyCursor(); wxEndBusyCursor();
if( !rc ) if( !rc )
......
...@@ -268,9 +268,9 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( wxWindow* winaff, ...@@ -268,9 +268,9 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( wxWindow* winaff,
NewModule = new MODULE( m_Pcb ); NewModule = new MODULE( m_Pcb );
// Switch the locale to standard C (needed to print floating point numbers like 1.3) // 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 ); 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 */ if( Module == NULL ) /* 1er Module */
{ {
m_Pcb->m_Modules = NewModule; m_Pcb->m_Modules = NewModule;
......
...@@ -449,7 +449,7 @@ void WinEDA_SetParamShapeFrame::ReadDataShapeDescr( wxCommandEvent& event ) ...@@ -449,7 +449,7 @@ void WinEDA_SetParamShapeFrame::ReadDataShapeDescr( wxCommandEvent& event )
bufsize = 100; bufsize = 100;
ptbuf = PolyEdges = (double*) MyZMalloc( bufsize * 2 * sizeof(double) ); ptbuf = PolyEdges = (double*) MyZMalloc( bufsize * 2 * sizeof(double) );
setlocale( LC_NUMERIC, "C" ); SetLocaleTo_C_standard( );
int LineNum = 0; int LineNum = 0;
while( GetLine( File, Line, &LineNum, sizeof(Line) - 1 ) != NULL ) while( GetLine( File, Line, &LineNum, sizeof(Line) - 1 ) != NULL )
{ {
...@@ -504,7 +504,7 @@ void WinEDA_SetParamShapeFrame::ReadDataShapeDescr( wxCommandEvent& event ) ...@@ -504,7 +504,7 @@ void WinEDA_SetParamShapeFrame::ReadDataShapeDescr( wxCommandEvent& event )
PolyEdges = NULL; PolyEdges = NULL;
} }
fclose( File ); fclose( File );
setlocale( LC_NUMERIC, "" ); // revert to the current locale SetLocaleTo_Default( ); // revert to the current locale
ShapeScaleX *= unitconv; ShapeScaleX *= unitconv;
ShapeScaleY *= unitconv; ShapeScaleY *= unitconv;
......
...@@ -36,7 +36,7 @@ static PARAM_CFG_INT PadDrillCfg ...@@ -36,7 +36,7 @@ static PARAM_CFG_INT PadDrillCfg
wxT( "PadDrlX" ), /* Keyword */ wxT( "PadDrlX" ), /* Keyword */
&g_Pad_Master.m_Drill.x, /* Parameter address */ &g_Pad_Master.m_Drill.x, /* Parameter address */
320, /* Default value */ 320, /* Default value */
0, 0x7FFF /* Valeurs extremes */ 0, 0x7FFF /* Min and max values*/
); );
static PARAM_CFG_INT PadDimHCfg //Pad Diameter / H Size static PARAM_CFG_INT PadDimHCfg //Pad Diameter / H Size
...@@ -44,7 +44,7 @@ static PARAM_CFG_INT PadDimHCfg //Pad Diameter / H Size ...@@ -44,7 +44,7 @@ static PARAM_CFG_INT PadDimHCfg //Pad Diameter / H Size
wxT( "PadDimH" ), /* Keyword */ wxT( "PadDimH" ), /* Keyword */
&g_Pad_Master.m_Size.x, /* Parameter address */ &g_Pad_Master.m_Size.x, /* Parameter address */
550, /* Default value */ 550, /* Default value */
0, 0x7FFF /* Valeurs extremes */ 0, 0x7FFF /* Min and max values*/
); );
static PARAM_CFG_INT PadDimVCfg static PARAM_CFG_INT PadDimVCfg
...@@ -52,7 +52,7 @@ static PARAM_CFG_INT PadDimVCfg ...@@ -52,7 +52,7 @@ static PARAM_CFG_INT PadDimVCfg
wxT( "PadDimV" ), /* Keyword */ wxT( "PadDimV" ), /* Keyword */
&g_Pad_Master.m_Size.y, /* Parameter address */ &g_Pad_Master.m_Size.y, /* Parameter address */
550, /* Default value */ 550, /* Default value */
0, 0x7FFF /* Valeurs extremes */ 0, 0x7FFF /* Min and max values*/
); );
...@@ -61,7 +61,7 @@ static PARAM_CFG_INT PadFormeCfg ...@@ -61,7 +61,7 @@ static PARAM_CFG_INT PadFormeCfg
wxT( "PadForm" ), /* Keyword */ wxT( "PadForm" ), /* Keyword */
&g_Pad_Master.m_PadShape, /* Parameter address */ &g_Pad_Master.m_PadShape, /* Parameter address */
PAD_CIRCLE, /* Default value */ PAD_CIRCLE, /* Default value */
0, 0x7F /* Valeurs extremes */ 0, 0x7F /* Min and max values*/
); );
static PARAM_CFG_INT PadMasqueLayerCfg static PARAM_CFG_INT PadMasqueLayerCfg
...@@ -76,7 +76,7 @@ static PARAM_CFG_INT ViaDiametreCfg ...@@ -76,7 +76,7 @@ static PARAM_CFG_INT ViaDiametreCfg
wxT( "ViaDiam" ), /* Keyword */ wxT( "ViaDiam" ), /* Keyword */
&g_DesignSettings.m_CurrentViaSize, /* Parameter address */ &g_DesignSettings.m_CurrentViaSize, /* Parameter address */
450, /* Default value */ 450, /* Default value */
0, 0xFFFF /* Valeurs extremes */ 0, 0xFFFF /* Min and max values*/
); );
static PARAM_CFG_INT ViaDrillCfg static PARAM_CFG_INT ViaDrillCfg
...@@ -84,7 +84,7 @@ static PARAM_CFG_INT ViaDrillCfg ...@@ -84,7 +84,7 @@ static PARAM_CFG_INT ViaDrillCfg
wxT( "ViaDril" ), /* Keyword */ wxT( "ViaDril" ), /* Keyword */
&g_DesignSettings.m_ViaDrill, /* Parameter address */ &g_DesignSettings.m_ViaDrill, /* Parameter address */
250, /* Default value */ 250, /* Default value */
0, 0xFFFF /* Valeurs extremes */ 0, 0xFFFF /* Min and max values*/
); );
static PARAM_CFG_INT MicroViaDiametreCfg static PARAM_CFG_INT MicroViaDiametreCfg
...@@ -92,7 +92,7 @@ static PARAM_CFG_INT MicroViaDiametreCfg ...@@ -92,7 +92,7 @@ static PARAM_CFG_INT MicroViaDiametreCfg
wxT( "MViaDia" ), /* Keyword */ wxT( "MViaDia" ), /* Keyword */
&g_DesignSettings.m_CurrentMicroViaSize, /* Parameter address */ &g_DesignSettings.m_CurrentMicroViaSize, /* Parameter address */
200, /* Default value */ 200, /* Default value */
0, 1000 /* Valeurs extremes */ 0, 1000 /* Min and max values*/
); );
static PARAM_CFG_INT MicroViaDrillCfg static PARAM_CFG_INT MicroViaDrillCfg
...@@ -100,7 +100,7 @@ static PARAM_CFG_INT MicroViaDrillCfg ...@@ -100,7 +100,7 @@ static PARAM_CFG_INT MicroViaDrillCfg
wxT( "MViaDrl" ), /* Keyword */ wxT( "MViaDrl" ), /* Keyword */
&g_DesignSettings.m_MicroViaDrill, /* Parameter address */ &g_DesignSettings.m_MicroViaDrill, /* Parameter address */
80, /* Default value */ 80, /* Default value */
0, 800 /* Valeurs extremes */ 0, 800 /* Min and max values*/
); );
static PARAM_CFG_INT ViaShowHoleCfg static PARAM_CFG_INT ViaShowHoleCfg
...@@ -109,8 +109,8 @@ static PARAM_CFG_INT ViaShowHoleCfg ...@@ -109,8 +109,8 @@ static PARAM_CFG_INT ViaShowHoleCfg
wxT( "ViaSHole" ), /* Keyword */ wxT( "ViaSHole" ), /* Keyword */
&DisplayOpt.m_DisplayViaMode, /* Parameter address */ &DisplayOpt.m_DisplayViaMode, /* Parameter address */
VIA_SPECIAL_HOLE_SHOW, /* Default value */ VIA_SPECIAL_HOLE_SHOW, /* Default value */
VIA_HOLE_NOT_SHOW, /* Valeurs extremes */ VIA_HOLE_NOT_SHOW, /* Min and max values*/
OPT_VIA_HOLE_END - 1 /* Valeurs extremes */ OPT_VIA_HOLE_END - 1 /* Min and max values*/
); );
static PARAM_CFG_INT TrackClearenceCfg static PARAM_CFG_INT TrackClearenceCfg
...@@ -118,7 +118,7 @@ static PARAM_CFG_INT TrackClearenceCfg ...@@ -118,7 +118,7 @@ static PARAM_CFG_INT TrackClearenceCfg
wxT( "Isol" ), /* Keyword */ wxT( "Isol" ), /* Keyword */
&g_DesignSettings.m_TrackClearence, /* Parameter address */ &g_DesignSettings.m_TrackClearence, /* Parameter address */
120, /* Default value */ 120, /* Default value */
0, 0xFFFF /* Valeurs extremes */ 0, 0xFFFF /* Min and max values*/
); );
static PARAM_CFG_INT LayerCountCfg // Mask Working Layers static PARAM_CFG_INT LayerCountCfg // Mask Working Layers
...@@ -126,7 +126,7 @@ static PARAM_CFG_INT LayerCountCfg // Mask Working Layers ...@@ -126,7 +126,7 @@ static PARAM_CFG_INT LayerCountCfg // Mask Working Layers
wxT( "Countlayer" ), /* Keyword */ wxT( "Countlayer" ), /* Keyword */
&g_DesignSettings.m_CopperLayerCount, /* Parameter address */ &g_DesignSettings.m_CopperLayerCount, /* Parameter address */
2, /* Default value */ 2, /* Default value */
1, NB_COPPER_LAYERS /* Valeurs extremes */ 1, NB_COPPER_LAYERS /* Min and max values*/
); );
static PARAM_CFG_INT TrackWidthCfg static PARAM_CFG_INT TrackWidthCfg
...@@ -134,7 +134,7 @@ static PARAM_CFG_INT TrackWidthCfg ...@@ -134,7 +134,7 @@ static PARAM_CFG_INT TrackWidthCfg
wxT( "Lpiste" ), /* Keyword */ wxT( "Lpiste" ), /* Keyword */
&g_DesignSettings.m_CurrentTrackWidth, /* Parameter address */ &g_DesignSettings.m_CurrentTrackWidth, /* Parameter address */
170, /* Default value */ 170, /* Default value */
2, 0xFFFF /* Valeurs extremes */ 2, 0xFFFF /* Min and max values*/
); );
static PARAM_CFG_INT RouteLayTopCfg // First current working layer static PARAM_CFG_INT RouteLayTopCfg // First current working layer
...@@ -142,7 +142,7 @@ static PARAM_CFG_INT RouteLayTopCfg // First current working layer ...@@ -142,7 +142,7 @@ static PARAM_CFG_INT RouteLayTopCfg // First current working layer
wxT( "RouteTo" ), /* Keyword */ wxT( "RouteTo" ), /* Keyword */
&Route_Layer_TOP, /* Parameter address */ &Route_Layer_TOP, /* Parameter address */
15, /* Default value */ 15, /* Default value */
0, 15 /* Valeurs extremes */ 0, 15 /* Min and max values*/
); );
static PARAM_CFG_INT RouteLayBotCfg // second current working layer static PARAM_CFG_INT RouteLayBotCfg // second current working layer
...@@ -150,7 +150,7 @@ static PARAM_CFG_INT RouteLayBotCfg // second current working layer ...@@ -150,7 +150,7 @@ static PARAM_CFG_INT RouteLayBotCfg // second current working layer
wxT( "RouteBo" ), /* Keyword */ wxT( "RouteBo" ), /* Keyword */
&Route_Layer_BOTTOM, /* Parameter address */ &Route_Layer_BOTTOM, /* Parameter address */
0, /* Default value */ 0, /* Default value */
0, 15 /* Valeurs extremes */ 0, 15 /* Min and max values*/
); );
static PARAM_CFG_INT TypeViaCfg static PARAM_CFG_INT TypeViaCfg
...@@ -158,7 +158,7 @@ static PARAM_CFG_INT TypeViaCfg ...@@ -158,7 +158,7 @@ static PARAM_CFG_INT TypeViaCfg
wxT( "TypeVia" ), /* Keyword */ wxT( "TypeVia" ), /* Keyword */
&g_DesignSettings.m_CurrentViaType, /* Parameter address */ &g_DesignSettings.m_CurrentViaType, /* Parameter address */
VIA_THROUGH, /* Default value */ VIA_THROUGH, /* Default value */
0, 3 /* Valeurs extremes */ 0, 3 /* Min and max values*/
); );
static PARAM_CFG_BOOL Segm45Cfg // Segm Pistes a 0, 45, 90 degres uniquement static PARAM_CFG_BOOL Segm45Cfg // Segm Pistes a 0, 45, 90 degres uniquement
...@@ -177,6 +177,7 @@ static PARAM_CFG_BOOL Raccord45Cfg // Generation automatique des Raccords a 45 ...@@ -177,6 +177,7 @@ static PARAM_CFG_BOOL Raccord45Cfg // Generation automatique des Raccords a 45
static PARAM_CFG_INT UnitCfg // Units: 0 inch, 1 mm static PARAM_CFG_INT UnitCfg // Units: 0 inch, 1 mm
( (
INSETUP,
wxT( "Unite" ), /* Keyword */ wxT( "Unite" ), /* Keyword */
&g_UnitMetric, /* Parameter address */ &g_UnitMetric, /* Parameter address */
FALSE /* Default value */ FALSE /* Default value */
...@@ -184,6 +185,7 @@ static PARAM_CFG_INT UnitCfg // Units: 0 inch, 1 mm ...@@ -184,6 +185,7 @@ static PARAM_CFG_INT UnitCfg // Units: 0 inch, 1 mm
static PARAM_CFG_BOOL SegmFillCfg static PARAM_CFG_BOOL SegmFillCfg
( (
INSETUP,
wxT( "SegFill" ), /* Keyword */ wxT( "SegFill" ), /* Keyword */
&DisplayOpt.DisplayPcbTrackFill, /* Parameter address */ &DisplayOpt.DisplayPcbTrackFill, /* Parameter address */
TRUE /* Default value */ TRUE /* Default value */
...@@ -191,6 +193,7 @@ static PARAM_CFG_BOOL SegmFillCfg ...@@ -191,6 +193,7 @@ static PARAM_CFG_BOOL SegmFillCfg
static PARAM_CFG_BOOL NewTrackAfficheGardeCfg static PARAM_CFG_BOOL NewTrackAfficheGardeCfg
( (
INSETUP,
wxT( "NewAffG" ), /* Keyword */ wxT( "NewAffG" ), /* Keyword */
&g_ShowIsolDuringCreateTrack, /* Parameter address */ &g_ShowIsolDuringCreateTrack, /* Parameter address */
TRUE /* Default value */ TRUE /* Default value */
...@@ -198,6 +201,7 @@ static PARAM_CFG_BOOL NewTrackAfficheGardeCfg ...@@ -198,6 +201,7 @@ static PARAM_CFG_BOOL NewTrackAfficheGardeCfg
static PARAM_CFG_BOOL TrackAfficheGardeCfg static PARAM_CFG_BOOL TrackAfficheGardeCfg
( (
INSETUP,
wxT( "SegAffG" ), /* Keyword */ wxT( "SegAffG" ), /* Keyword */
&DisplayOpt.DisplayTrackIsol, /* Parameter address */ &DisplayOpt.DisplayTrackIsol, /* Parameter address */
FALSE /* Default value */ FALSE /* Default value */
...@@ -205,6 +209,7 @@ static PARAM_CFG_BOOL TrackAfficheGardeCfg ...@@ -205,6 +209,7 @@ static PARAM_CFG_BOOL TrackAfficheGardeCfg
static PARAM_CFG_BOOL PadFillCfg static PARAM_CFG_BOOL PadFillCfg
( (
INSETUP,
wxT( "PadFill" ), /* Keyword */ wxT( "PadFill" ), /* Keyword */
&DisplayOpt.DisplayPadFill, /* Parameter address */ &DisplayOpt.DisplayPadFill, /* Parameter address */
TRUE /* Default value */ TRUE /* Default value */
...@@ -212,6 +217,7 @@ static PARAM_CFG_BOOL PadFillCfg ...@@ -212,6 +217,7 @@ static PARAM_CFG_BOOL PadFillCfg
static PARAM_CFG_BOOL PadAfficheGardeCfg static PARAM_CFG_BOOL PadAfficheGardeCfg
( (
INSETUP,
wxT( "PadAffG" ), /* Keyword */ wxT( "PadAffG" ), /* Keyword */
&DisplayOpt.DisplayPadIsol, /* Parameter address */ &DisplayOpt.DisplayPadIsol, /* Parameter address */
TRUE /* Default value */ TRUE /* Default value */
...@@ -219,6 +225,7 @@ static PARAM_CFG_BOOL PadAfficheGardeCfg ...@@ -219,6 +225,7 @@ static PARAM_CFG_BOOL PadAfficheGardeCfg
static PARAM_CFG_BOOL PadShowNumCfg static PARAM_CFG_BOOL PadShowNumCfg
( (
INSETUP,
wxT( "PadSNum" ), /* Keyword */ wxT( "PadSNum" ), /* Keyword */
&DisplayOpt.DisplayPadNum, /* Parameter address */ &DisplayOpt.DisplayPadNum, /* Parameter address */
TRUE /* Default value */ TRUE /* Default value */
...@@ -226,26 +233,29 @@ static PARAM_CFG_BOOL PadShowNumCfg ...@@ -226,26 +233,29 @@ static PARAM_CFG_BOOL PadShowNumCfg
static PARAM_CFG_INT AfficheContourModuleCfg // Module Edges: fill/line/sketch static PARAM_CFG_INT AfficheContourModuleCfg // Module Edges: fill/line/sketch
( (
INSETUP,
wxT( "ModAffC" ), /* Keyword */ wxT( "ModAffC" ), /* Keyword */
&DisplayOpt.DisplayModEdge, /* Parameter address */ &DisplayOpt.DisplayModEdge, /* Parameter address */
FILAIRE, /* Default value */ FILLED, /* Default value */
0, 2 /* Valeurs extremes */ 0, 2 /* Min and max values*/
); );
static PARAM_CFG_INT AfficheTexteModuleCfg // Module Texts: fill/line/sketch static PARAM_CFG_INT AfficheTexteModuleCfg // Module Texts: fill/line/sketch
( (
INSETUP,
wxT( "ModAffT" ), /* Keyword */ wxT( "ModAffT" ), /* Keyword */
&DisplayOpt.DisplayModText, /* Parameter address */ &DisplayOpt.DisplayModText, /* Parameter address */
FILAIRE, /* Default value */ FILLED, /* Default value */
0, 2 /* Valeurs extremes */ 0, 2 /* Min and max values*/
); );
static PARAM_CFG_INT AfficheTextePcbCfg // PCB Texts: fill/line/sketch static PARAM_CFG_INT AfficheTextePcbCfg // PCB Texts: fill/line/sketch
( (
INSETUP,
wxT( "PcbAffT" ), /* Keyword */ wxT( "PcbAffT" ), /* Keyword */
&DisplayOpt.DisplayDrawItems, /* Parameter address */ &DisplayOpt.DisplayDrawItems, /* Parameter address */
FILAIRE, /* Default value */ FILLED, /* Default value */
0, 2 /* Valeurs extremes */ 0, 2 /* Min and max values*/
); );
static PARAM_CFG_BOOL SegmPcb45Cfg // Force 45 degrees for segments static PARAM_CFG_BOOL SegmPcb45Cfg // Force 45 degrees for segments
...@@ -260,7 +270,7 @@ static PARAM_CFG_INT TextePcbDimVCfg ...@@ -260,7 +270,7 @@ static PARAM_CFG_INT TextePcbDimVCfg
wxT( "TxtPcbV" ), /* Keyword */ wxT( "TxtPcbV" ), /* Keyword */
&g_DesignSettings.m_PcbTextSize.y, /* Parameter address */ &g_DesignSettings.m_PcbTextSize.y, /* Parameter address */
600, /* Default value */ 600, /* Default value */
TEXTS_MIN_SIZE, TEXTS_MAX_SIZE /* Valeurs extremes */ TEXTS_MIN_SIZE, TEXTS_MAX_SIZE /* Min and max values*/
); );
static PARAM_CFG_INT TextePcbDimHCfg static PARAM_CFG_INT TextePcbDimHCfg
...@@ -268,7 +278,7 @@ static PARAM_CFG_INT TextePcbDimHCfg ...@@ -268,7 +278,7 @@ static PARAM_CFG_INT TextePcbDimHCfg
wxT( "TxtPcbH" ), /* Keyword */ wxT( "TxtPcbH" ), /* Keyword */
&g_DesignSettings.m_PcbTextSize.x, /* Parameter address */ &g_DesignSettings.m_PcbTextSize.x, /* Parameter address */
600, /* Default value */ 600, /* Default value */
TEXTS_MIN_SIZE, TEXTS_MAX_SIZE /* Valeurs extremes */ TEXTS_MIN_SIZE, TEXTS_MAX_SIZE /* Min and max values*/
); );
static PARAM_CFG_SETCOLOR ColorLayer0Cfg // CU Layer Color static PARAM_CFG_SETCOLOR ColorLayer0Cfg // CU Layer Color
...@@ -556,7 +566,7 @@ static PARAM_CFG_INT TexteModDimVCfg ...@@ -556,7 +566,7 @@ static PARAM_CFG_INT TexteModDimVCfg
wxT( "TxtModV" ), /* Keyword */ wxT( "TxtModV" ), /* Keyword */
&ModuleTextSize.y, /* Parameter address */ &ModuleTextSize.y, /* Parameter address */
500, /* Default value */ 500, /* Default value */
TEXTS_MIN_SIZE, TEXTS_MAX_SIZE /* Valeurs extremes */ TEXTS_MIN_SIZE, TEXTS_MAX_SIZE /* Min and max values*/
); );
static PARAM_CFG_INT TexteModDimHCfg static PARAM_CFG_INT TexteModDimHCfg
...@@ -564,7 +574,7 @@ static PARAM_CFG_INT TexteModDimHCfg ...@@ -564,7 +574,7 @@ static PARAM_CFG_INT TexteModDimHCfg
wxT( "TxtModH" ), /* Keyword */ wxT( "TxtModH" ), /* Keyword */
&ModuleTextSize.x, /* Parameter address */ &ModuleTextSize.x, /* Parameter address */
500, /* Default value */ 500, /* Default value */
TEXTS_MIN_SIZE, TEXTS_MAX_SIZE /* Valeurs extremes */ TEXTS_MIN_SIZE, TEXTS_MAX_SIZE /* Min and max values*/
); );
static PARAM_CFG_INT TexteModWidthCfg static PARAM_CFG_INT TexteModWidthCfg
...@@ -572,7 +582,7 @@ static PARAM_CFG_INT TexteModWidthCfg ...@@ -572,7 +582,7 @@ static PARAM_CFG_INT TexteModWidthCfg
wxT( "TxtModW" ), /* Keyword */ wxT( "TxtModW" ), /* Keyword */
&ModuleTextWidth, /* Parameter address */ &ModuleTextWidth, /* Parameter address */
100, /* Default value */ 100, /* Default value */
1, TEXTS_MAX_WIDTH /* Valeurs extremes */ 1, TEXTS_MAX_WIDTH /* Min and max values*/
); );
static PARAM_CFG_SETCOLOR ColorAncreModCfg static PARAM_CFG_SETCOLOR ColorAncreModCfg
...@@ -644,7 +654,7 @@ static PARAM_CFG_INT HPGLpenNumCfg ...@@ -644,7 +654,7 @@ static PARAM_CFG_INT HPGLpenNumCfg
wxT( "HPGLnum" ), /* Keyword */ wxT( "HPGLnum" ), /* Keyword */
&g_HPGL_Pen_Num, /* Parameter address */ &g_HPGL_Pen_Num, /* Parameter address */
1, /* Default value */ 1, /* Default value */
1, 16 /* Valeurs extremes */ 1, 16 /* Min and max values*/
); );
static PARAM_CFG_INT HPGLdiamCfg // HPGL pen size (mils) static PARAM_CFG_INT HPGLdiamCfg // HPGL pen size (mils)
...@@ -652,7 +662,7 @@ static PARAM_CFG_INT HPGLdiamCfg // HPGL pen size (mils) ...@@ -652,7 +662,7 @@ static PARAM_CFG_INT HPGLdiamCfg // HPGL pen size (mils)
wxT( "HPGdiam" ), /* Keyword */ wxT( "HPGdiam" ), /* Keyword */
&g_HPGL_Pen_Diam, /* Parameter address */ &g_HPGL_Pen_Diam, /* Parameter address */
15, /* Default value */ 15, /* Default value */
0, 100 /* Valeurs extremes */ 0, 100 /* Min and max values*/
); );
static PARAM_CFG_INT HPGLspeedCfg //HPGL pen speed (cm/s) static PARAM_CFG_INT HPGLspeedCfg //HPGL pen speed (cm/s)
...@@ -660,7 +670,7 @@ static PARAM_CFG_INT HPGLspeedCfg //HPGL pen speed (cm/s) ...@@ -660,7 +670,7 @@ static PARAM_CFG_INT HPGLspeedCfg //HPGL pen speed (cm/s)
wxT( "HPGLSpd" ), /* Keyword */ wxT( "HPGLSpd" ), /* Keyword */
&g_HPGL_Pen_Speed, /* Parameter address */ &g_HPGL_Pen_Speed, /* Parameter address */
20, /* Default value */ 20, /* Default value */
0, 1000 /* Valeurs extremes */ 0, 1000 /* Min and max values*/
); );
static PARAM_CFG_INT HPGLrecouvrementCfg static PARAM_CFG_INT HPGLrecouvrementCfg
...@@ -668,7 +678,7 @@ static PARAM_CFG_INT HPGLrecouvrementCfg ...@@ -668,7 +678,7 @@ static PARAM_CFG_INT HPGLrecouvrementCfg
wxT( "HPGLrec" ), /* Keyword */ wxT( "HPGLrec" ), /* Keyword */
&g_HPGL_Pen_Recouvrement, /* Parameter address */ &g_HPGL_Pen_Recouvrement, /* Parameter address */
2, /* Default value */ 2, /* Default value */
0, 0x100 /* Valeurs extremes */ 0, 0x100 /* Min and max values*/
); );
static PARAM_CFG_BOOL HPGLcenterCfg //HPGL Org Coord ( 0 normal, 1 Centre) static PARAM_CFG_BOOL HPGLcenterCfg //HPGL Org Coord ( 0 normal, 1 Centre)
...@@ -683,7 +693,7 @@ static PARAM_CFG_INT GERBERSpotMiniCfg //Aperture Mini (mils) ...@@ -683,7 +693,7 @@ static PARAM_CFG_INT GERBERSpotMiniCfg //Aperture Mini (mils)
wxT( "GERBmin" ), /* Keyword */ wxT( "GERBmin" ), /* Keyword */
&spot_mini, /* Parameter address */ &spot_mini, /* Parameter address */
15, /* Default value */ 15, /* Default value */
1, 100 /* Valeurs extremes */ 1, 100 /* Min and max values*/
); );
static PARAM_CFG_INT VernisEpargneGardeCfg static PARAM_CFG_INT VernisEpargneGardeCfg
...@@ -691,7 +701,7 @@ static PARAM_CFG_INT VernisEpargneGardeCfg ...@@ -691,7 +701,7 @@ static PARAM_CFG_INT VernisEpargneGardeCfg
wxT( "VEgarde" ), /* Keyword */ wxT( "VEgarde" ), /* Keyword */
&g_DesignSettings.m_MaskMargin, /* Parameter address */ &g_DesignSettings.m_MaskMargin, /* Parameter address */
100, /* Default value */ 100, /* Default value */
0, 0xFFFF /* Valeurs extremes */ 0, 0xFFFF /* Min and max values*/
); );
static PARAM_CFG_INT DrawSegmLargeurCfg static PARAM_CFG_INT DrawSegmLargeurCfg
...@@ -699,7 +709,7 @@ static PARAM_CFG_INT DrawSegmLargeurCfg ...@@ -699,7 +709,7 @@ static PARAM_CFG_INT DrawSegmLargeurCfg
wxT( "DrawLar" ), /* Keyword */ wxT( "DrawLar" ), /* Keyword */
&g_DesignSettings.m_DrawSegmentWidth, /* Parameter address */ &g_DesignSettings.m_DrawSegmentWidth, /* Parameter address */
120, /* Default value */ 120, /* Default value */
0, 0xFFFF /* Valeurs extremes */ 0, 0xFFFF /* Min and max values*/
); );
static PARAM_CFG_INT EdgeSegmLargeurCfg static PARAM_CFG_INT EdgeSegmLargeurCfg
...@@ -707,7 +717,7 @@ static PARAM_CFG_INT EdgeSegmLargeurCfg ...@@ -707,7 +717,7 @@ static PARAM_CFG_INT EdgeSegmLargeurCfg
wxT( "EdgeLar" ), /* Keyword */ wxT( "EdgeLar" ), /* Keyword */
&g_DesignSettings.m_EdgeSegmentWidth, /* Parameter address */ &g_DesignSettings.m_EdgeSegmentWidth, /* Parameter address */
120, /* Default value */ 120, /* Default value */
0, 0xFFFF /* Valeurs extremes */ 0, 0xFFFF /* Min and max values*/
); );
static PARAM_CFG_INT TexteSegmLargeurCfg static PARAM_CFG_INT TexteSegmLargeurCfg
...@@ -715,7 +725,7 @@ static PARAM_CFG_INT TexteSegmLargeurCfg ...@@ -715,7 +725,7 @@ static PARAM_CFG_INT TexteSegmLargeurCfg
wxT( "TxtLar" ), /* Keyword */ wxT( "TxtLar" ), /* Keyword */
&g_DesignSettings.m_PcbTextWidth, /* Parameter address */ &g_DesignSettings.m_PcbTextWidth, /* Parameter address */
120, /* Default value */ 120, /* Default value */
0, 0xFFFF /* Valeurs extremes */ 0, 0xFFFF /* Min and max values*/
); );
static PARAM_CFG_INT ModuleSegmWidthCfg static PARAM_CFG_INT ModuleSegmWidthCfg
...@@ -723,7 +733,7 @@ static PARAM_CFG_INT ModuleSegmWidthCfg ...@@ -723,7 +733,7 @@ static PARAM_CFG_INT ModuleSegmWidthCfg
wxT( "MSegLar" ), /* Keyword */ wxT( "MSegLar" ), /* Keyword */
&ModuleSegmentWidth, /* Parameter address */ &ModuleSegmentWidth, /* Parameter address */
120, /* Default value */ 120, /* Default value */
0, 0xFFFF /* Valeurs extremes */ 0, 0xFFFF /* Min and max values*/
); );
static PARAM_CFG_INT FormatPlotCfg static PARAM_CFG_INT FormatPlotCfg
...@@ -731,7 +741,7 @@ static PARAM_CFG_INT FormatPlotCfg ...@@ -731,7 +741,7 @@ static PARAM_CFG_INT FormatPlotCfg
wxT( "ForPlot" ), /* Keyword */ wxT( "ForPlot" ), /* Keyword */
&format_plot, /* Parameter address */ &format_plot, /* Parameter address */
1, /* Default value */ 1, /* Default value */
0, 3 /* Valeurs extremes */ 0, 3 /* Min and max values*/
); );
static PARAM_CFG_INT WTraitSerigraphiePlotCfg static PARAM_CFG_INT WTraitSerigraphiePlotCfg
...@@ -739,7 +749,7 @@ static PARAM_CFG_INT WTraitSerigraphiePlotCfg ...@@ -739,7 +749,7 @@ static PARAM_CFG_INT WTraitSerigraphiePlotCfg
wxT( "WpenSer" ), /* Keyword */ wxT( "WpenSer" ), /* Keyword */
&g_PlotLine_Width, /* Parameter address */ &g_PlotLine_Width, /* Parameter address */
10, /* Default value */ 10, /* Default value */
1, 10000 /* Valeurs extremes */ 1, 10000 /* Min and max values*/
); );
static PARAM_CFG_DOUBLE UserGrilleXCfg static PARAM_CFG_DOUBLE UserGrilleXCfg
...@@ -747,7 +757,7 @@ static PARAM_CFG_DOUBLE UserGrilleXCfg ...@@ -747,7 +757,7 @@ static PARAM_CFG_DOUBLE UserGrilleXCfg
wxT( "UserGrX" ), /* Keyword */ wxT( "UserGrX" ), /* Keyword */
&g_UserGrid.x, /* Parameter address */ &g_UserGrid.x, /* Parameter address */
0.01, /* Default value */ 0.01, /* Default value */
0.0001, 100.0 /* Valeurs extremes (inches)*/ 0.0001, 100.0 /* Min and max values(inches)*/
); );
static PARAM_CFG_DOUBLE UserGrilleYCfg static PARAM_CFG_DOUBLE UserGrilleYCfg
...@@ -755,7 +765,7 @@ static PARAM_CFG_DOUBLE UserGrilleYCfg ...@@ -755,7 +765,7 @@ static PARAM_CFG_DOUBLE UserGrilleYCfg
wxT( "UserGrY" ), /* Keyword */ wxT( "UserGrY" ), /* Keyword */
&g_UserGrid.y, /* Parameter address */ &g_UserGrid.y, /* Parameter address */
0.01, /* Default value */ 0.01, /* Default value */
0.0001, 100.0 /* Valeurs extremes (inches)*/ 0.0001, 100.0 /* Min and max values (inches)*/
); );
static PARAM_CFG_INT UserGrilleUnitCfg static PARAM_CFG_INT UserGrilleUnitCfg
...@@ -763,7 +773,7 @@ static PARAM_CFG_INT UserGrilleUnitCfg ...@@ -763,7 +773,7 @@ static PARAM_CFG_INT UserGrilleUnitCfg
wxT( "UserGrU" ), /* Keyword */ wxT( "UserGrU" ), /* Keyword */
&g_UserGrid_Unit, /* Parameter address */ &g_UserGrid_Unit, /* Parameter address */
1, /* Default value */ 1, /* Default value */
0, 1 /* Valeurs extremes */ 0, 1 /* Min and max values*/
); );
static PARAM_CFG_INT DivGrillePcbCfg static PARAM_CFG_INT DivGrillePcbCfg
...@@ -771,7 +781,7 @@ static PARAM_CFG_INT DivGrillePcbCfg ...@@ -771,7 +781,7 @@ static PARAM_CFG_INT DivGrillePcbCfg
wxT( "DivGrPc" ), /* Keyword */ wxT( "DivGrPc" ), /* Keyword */
&Pcbdiv_grille, /* Parameter address */ &Pcbdiv_grille, /* Parameter address */
1, /* Default value */ 1, /* Default value */
1, 10 /* Valeurs extremes */ 1, 10 /* Min and max values*/
); );
static PARAM_CFG_INT TimeOutCfg //Duree entre Sauvegardes auto en secondes static PARAM_CFG_INT TimeOutCfg //Duree entre Sauvegardes auto en secondes
...@@ -779,7 +789,7 @@ static PARAM_CFG_INT TimeOutCfg //Duree entre Sauvegardes auto en secondes ...@@ -779,7 +789,7 @@ static PARAM_CFG_INT TimeOutCfg //Duree entre Sauvegardes auto en secondes
wxT( "TimeOut" ), /* Keyword */ wxT( "TimeOut" ), /* Keyword */
&g_TimeOut, /* Parameter address */ &g_TimeOut, /* Parameter address */
600, /* Default value */ 600, /* Default value */
0, 60000 /* Valeurs extremes */ 0, 60000 /* Min and max values*/
); );
static PARAM_CFG_BOOL DisplPolairCfg static PARAM_CFG_BOOL DisplPolairCfg
...@@ -796,15 +806,16 @@ static PARAM_CFG_INT CursorShapeCfg ...@@ -796,15 +806,16 @@ static PARAM_CFG_INT CursorShapeCfg
wxT( "CuShape" ), /* Keyword */ wxT( "CuShape" ), /* Keyword */
&g_CursorShape, /* Parameter address */ &g_CursorShape, /* Parameter address */
0, /* Default value */ 0, /* Default value */
0, 1 /* Valeurs extremes */ 0, 1 /* Min and max values*/
); );
static PARAM_CFG_INT PrmMaxLinksShowed static PARAM_CFG_INT PrmMaxLinksShowed
( (
INSETUP,
wxT( "MaxLnkS" ), /* Keyword */ wxT( "MaxLnkS" ), /* Keyword */
&g_MaxLinksShowed, /* Parameter address */ &g_MaxLinksShowed, /* Parameter address */
3, /* Default value */ 3, /* Default value */
0, 15 /* Valeurs extremes */ 0, 15 /* Min and max values*/
); );
static PARAM_CFG_BOOL ShowRatsnestCfg static PARAM_CFG_BOOL ShowRatsnestCfg
......
...@@ -74,7 +74,7 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer ...@@ -74,7 +74,7 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
return; return;
} }
setlocale( LC_NUMERIC, "C" ); SetLocaleTo_C_standard( );
InitPlotParametresGERBER( g_PlotOffset, scale_x, scale_y ); InitPlotParametresGERBER( g_PlotOffset, scale_x, scale_y );
...@@ -135,7 +135,7 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer ...@@ -135,7 +135,7 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
} }
Fin_Trace_GERBER( this, dest ); Fin_Trace_GERBER( this, dest );
setlocale( LC_NUMERIC, "" ); SetLocaleTo_Default( );
} }
......
...@@ -69,7 +69,7 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer ) ...@@ -69,7 +69,7 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer )
return; return;
} }
setlocale( LC_NUMERIC, "C" ); SetLocaleTo_C_standard( );
Affiche_1_Parametre( this, 0, _( "File" ), FullFileName, CYAN ); Affiche_1_Parametre( this, 0, _( "File" ), FullFileName, CYAN );
...@@ -185,7 +185,7 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer ) ...@@ -185,7 +185,7 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer )
/* fin */ /* fin */
CloseFileHPGL( dest ); CloseFileHPGL( dest );
setlocale( LC_NUMERIC, "" ); SetLocaleTo_Default( );
} }
......
...@@ -53,7 +53,7 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, bo ...@@ -53,7 +53,7 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, bo
return; return;
} }
setlocale( LC_NUMERIC, "C" ); SetLocaleTo_C_standard( );
Affiche_1_Parametre( this, 0, _( "File" ), FullFileName, CYAN ); Affiche_1_Parametre( this, 0, _( "File" ), FullFileName, CYAN );
...@@ -226,7 +226,7 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, bo ...@@ -226,7 +226,7 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, bo
// fin // fin
CloseFilePS( dest ); CloseFilePS( dest );
setlocale( LC_NUMERIC, "" ); SetLocaleTo_Default( );
} }
......
...@@ -573,7 +573,7 @@ void WinEDA_PcbFrame::ReadAutoroutedTracks( wxDC* DC ) ...@@ -573,7 +573,7 @@ void WinEDA_PcbFrame::ReadAutoroutedTracks( wxDC* DC )
Affiche_Message( msg ); Affiche_Message( msg );
} }
setlocale( LC_NUMERIC, "C" ); SetLocaleTo_C_standard( );
track_width = g_DesignSettings.m_CurrentTrackWidth; track_width = g_DesignSettings.m_CurrentTrackWidth;
via_size = g_DesignSettings.m_CurrentViaSize; via_size = g_DesignSettings.m_CurrentViaSize;
...@@ -654,7 +654,7 @@ void WinEDA_PcbFrame::ReadAutoroutedTracks( wxDC* DC ) ...@@ -654,7 +654,7 @@ void WinEDA_PcbFrame::ReadAutoroutedTracks( wxDC* DC )
fclose( File ); fclose( File );
setlocale( LC_NUMERIC, "" ); SetLocaleTo_Default( );
if( NbTrack == 0 ) if( NbTrack == 0 )
DisplayError( this, wxT( "Warning: No tracks" ), 10 ); DisplayError( this, wxT( "Warning: No tracks" ), 10 );
......
...@@ -3971,7 +3971,7 @@ int main( int argc, char** argv ) ...@@ -3971,7 +3971,7 @@ int main( int argc, char** argv )
SPECCTRA_DB db; SPECCTRA_DB db;
bool failed = false; 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 ) if( argc == 2 )
{ {
...@@ -4002,7 +4002,7 @@ int main( int argc, char** argv ) ...@@ -4002,7 +4002,7 @@ int main( int argc, char** argv )
db.SetFILE( stdout ); db.SetFILE( stdout );
pcb->Format( &db, 0 ); pcb->Format( &db, 0 );
setlocale( LC_NUMERIC, "" ); // revert to the current locale SetLocaleTo_Default( ); // revert to the current locale
} }
#endif #endif
......
...@@ -82,7 +82,7 @@ void WinEDA_PcbFrame::ExportToSpecctra( wxCommandEvent& event ) ...@@ -82,7 +82,7 @@ void WinEDA_PcbFrame::ExportToSpecctra( wxCommandEvent& event )
db.SetPCB( SPECCTRA_DB::MakePCB() ); 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 // DSN Images (=Kicad MODULES and pads) must be presented from the
// top view. So we temporarily flip any modules which are on the back // top view. So we temporarily flip any modules which are on the back
...@@ -105,7 +105,7 @@ void WinEDA_PcbFrame::ExportToSpecctra( wxCommandEvent& event ) ...@@ -105,7 +105,7 @@ void WinEDA_PcbFrame::ExportToSpecctra( wxCommandEvent& event )
errorText = ioe.errorText; 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. // done assuredly, even if an exception was thrown and caught.
db.RevertMODULEs( m_Pcb ); db.RevertMODULEs( m_Pcb );
......
...@@ -86,7 +86,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event ) ...@@ -86,7 +86,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
SPECCTRA_DB db; SPECCTRA_DB db;
setlocale( LC_NUMERIC, "C" ); // Switch the locale to standard C SetLocaleTo_C_standard( ); // Switch the locale to standard C
try try
{ {
...@@ -95,7 +95,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event ) ...@@ -95,7 +95,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
} }
catch( IOError ioe ) catch( IOError ioe )
{ {
setlocale( LC_NUMERIC, "" ); // revert to the current locale SetLocaleTo_Default( ); // revert to the current locale
ioe.errorText += '\n'; ioe.errorText += '\n';
ioe.errorText += _("BOARD may be corrupted, do not save it."); ioe.errorText += _("BOARD may be corrupted, do not save it.");
...@@ -106,7 +106,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event ) ...@@ -106,7 +106,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
return; return;
} }
setlocale( LC_NUMERIC, "" ); // revert to the current locale SetLocaleTo_Default( ); // revert to the current locale
m_SelTrackWidthBox_Changed = TRUE; m_SelTrackWidthBox_Changed = TRUE;
m_SelViaSizeBox_Changed = TRUE; m_SelViaSizeBox_Changed = TRUE;
......
...@@ -507,9 +507,9 @@ bool WinEDA_PrintSVGFrame::DrawPage( const wxString& FullFileName, BASE_SCREEN* ...@@ -507,9 +507,9 @@ bool WinEDA_PrintSVGFrame::DrawPage( const wxString& FullFileName, BASE_SCREEN*
panel->m_ClipBox.SetWidth( 0x7FFFFF0 ); panel->m_ClipBox.SetHeight( 0x7FFFFF0 ); panel->m_ClipBox.SetWidth( 0x7FFFFF0 ); panel->m_ClipBox.SetHeight( 0x7FFFFF0 );
g_IsPrinting = TRUE; 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 ); 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; g_IsPrinting = FALSE;
panel->m_ClipBox = tmp; panel->m_ClipBox = tmp;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment