Commit e6c85158 authored by Dick Hollenbeck's avatar Dick Hollenbeck

switch to C++'s false and true from C's FALSE and TRUE

parent ec307ef6
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
#include "wx/image.h" #include "wx/image.h"
#include "macros.h" #include "macros.h"
#define wxSVG_DEBUG FALSE #define wxSVG_DEBUG false
// or TRUE to see the calls being executed // or true to see the calls being executed
#define newline wxString( wxT( "\n" ) ) #define newline wxString( wxT( "\n" ) )
#define space wxString( wxT( " " ) ) #define space wxString( wxT( " " ) )
#define semicolon wxString( wxT( ";" ) ) #define semicolon wxString( wxT( ";" ) )
...@@ -85,7 +85,7 @@ wxString wxBrushString( wxColour c, int style ) ...@@ -85,7 +85,7 @@ wxString wxBrushString( wxColour c, int style )
break; break;
default: default:
wxASSERT_MSG( FALSE, wxT( "wxSVGFileDC::Requested Brush Style not available" ) ); wxASSERT_MSG( false, wxT( "wxSVGFileDC::Requested Brush Style not available" ) );
} }
s = s + newline; s = s + newline;
...@@ -103,8 +103,8 @@ void wxSVGFileDC::Init( wxString f, int Width, int Height, float dpi ) ...@@ -103,8 +103,8 @@ void wxSVGFileDC::Init( wxString f, int Width, int Height, float dpi )
m_width = Width; m_width = Width;
m_height = Height; m_height = Height;
m_clipping = FALSE; m_clipping = false;
m_OK = TRUE; m_OK = true;
m_mm_to_pix_x = dpi / 25.4; m_mm_to_pix_x = dpi / 25.4;
m_mm_to_pix_y = dpi / 25.4; m_mm_to_pix_y = dpi / 25.4;
...@@ -132,7 +132,7 @@ void wxSVGFileDC::Init( wxString f, int Width, int Height, float dpi ) ...@@ -132,7 +132,7 @@ void wxSVGFileDC::Init( wxString f, int Width, int Height, float dpi )
m_font = *wxNORMAL_FONT; m_font = *wxNORMAL_FONT;
m_brush = *wxWHITE_BRUSH; m_brush = *wxWHITE_BRUSH;
m_graphics_changed = TRUE; m_graphics_changed = true;
////////////////////code here ////////////////////code here
...@@ -626,7 +626,7 @@ void wxSVGFileDC::SetBrush( const wxBrush& brush ) ...@@ -626,7 +626,7 @@ void wxSVGFileDC::SetBrush( const wxBrush& brush )
{ {
m_brush = brush; m_brush = brush;
m_graphics_changed = TRUE; m_graphics_changed = true;
wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::SetBrush Call executed" ) ); wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::SetBrush Call executed" ) );
} }
...@@ -637,7 +637,7 @@ void wxSVGFileDC::SetPen( const wxPen& pen ) ...@@ -637,7 +637,7 @@ void wxSVGFileDC::SetPen( const wxPen& pen )
// dashes, stipple : not implemented // dashes, stipple : not implemented
m_pen = pen; m_pen = pen;
m_graphics_changed = TRUE; m_graphics_changed = true;
wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::SetPen Call executed" ) ); wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::SetPen Call executed" ) );
} }
...@@ -697,7 +697,7 @@ void wxSVGFileDC::NewGraphics() ...@@ -697,7 +697,7 @@ void wxSVGFileDC::NewGraphics()
break; break;
default: default:
wxASSERT_MSG( FALSE, wxASSERT_MSG( false,
wxT( "wxSVGFileDC::SetPen Call called to set a Style which is not available" ) wxT( "wxSVGFileDC::SetPen Call called to set a Style which is not available" )
); );
sWarn = sWarn + wxT( sWarn = sWarn + wxT(
...@@ -710,7 +710,7 @@ void wxSVGFileDC::NewGraphics() ...@@ -710,7 +710,7 @@ void wxSVGFileDC::NewGraphics()
s = sBrush + sPenCap + sPenJoin + sPenStyle + sLast + newline + sWarn; s = sBrush + sPenCap + sPenJoin + sPenStyle + sLast + newline + sWarn;
write( s ); write( s );
m_graphics_changed = FALSE; m_graphics_changed = false;
wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::NewGraphics Call executed" ) ); wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::NewGraphics Call executed" ) );
} }
...@@ -730,7 +730,7 @@ void wxSVGFileDC::ComputeScaleAndOrigin() ...@@ -730,7 +730,7 @@ void wxSVGFileDC::ComputeScaleAndOrigin()
m_scaleY = m_logicalScaleY * m_userScaleY; m_scaleY = m_logicalScaleY * m_userScaleY;
m_OriginX = m_logicalOriginX * m_logicalScaleX + m_deviceOriginX; m_OriginX = m_logicalOriginX * m_logicalScaleX + m_deviceOriginX;
m_OriginY = m_logicalOriginY * m_logicalScaleY + m_deviceOriginY; m_OriginY = m_logicalOriginY * m_logicalScaleY + m_deviceOriginY;
m_graphics_changed = TRUE; m_graphics_changed = true;
} }
...@@ -771,8 +771,8 @@ void wxSVGFileDC::SetMapMode( int mode ) ...@@ -771,8 +771,8 @@ void wxSVGFileDC::SetMapMode( int mode )
/* we don't do this mega optimisation /* we don't do this mega optimisation
* if (mode != wxMM_TEXT) * if (mode != wxMM_TEXT)
* { * {
* m_needComputeScaleX = TRUE; * m_needComputeScaleX = true;
* m_needComputeScaleY = TRUE; * m_needComputeScaleY = true;
* } * }
*/ */
} }
...@@ -833,22 +833,22 @@ void wxSVGFileDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp ) ...@@ -833,22 +833,22 @@ void wxSVGFileDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
// export a bitmap as a raster image in png // export a bitmap as a raster image in png
bool wxSVGFileDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, bool wxSVGFileDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC* source, wxCoord xsrc, wxCoord ysrc, wxDC* source, wxCoord xsrc, wxCoord ysrc,
int logicalFunc /*= wxCOPY*/, bool useMask /*= FALSE*/, int logicalFunc /*= wxCOPY*/, bool useMask /*= false*/,
wxCoord /*xsrcMask = -1*/, wxCoord /*ysrcMask = -1*/ ) wxCoord /*xsrcMask = -1*/, wxCoord /*ysrcMask = -1*/ )
{ {
if( logicalFunc != wxCOPY ) if( logicalFunc != wxCOPY )
{ {
wxASSERT_MSG( FALSE, wxASSERT_MSG( false,
wxT( "wxSVGFileDC::DoBlit Call requested nonCopy mode; this is not possible" ) wxT( "wxSVGFileDC::DoBlit Call requested nonCopy mode; this is not possible" )
); );
return FALSE; return false;
} }
if( useMask != FALSE ) if( useMask != false )
{ {
wxASSERT_MSG( FALSE, wxASSERT_MSG( false,
wxT( "wxSVGFileDC::DoBlit Call requested False mask ; this is not possible" ) wxT( "wxSVGFileDC::DoBlit Call requested False mask ; this is not possible" )
); );
return FALSE; return false;
} }
wxBitmap myBitmap( width, height ); wxBitmap myBitmap( width, height );
wxMemoryDC memDC; wxMemoryDC memDC;
...@@ -857,7 +857,7 @@ bool wxSVGFileDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord h ...@@ -857,7 +857,7 @@ bool wxSVGFileDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord h
memDC.SelectObject( wxNullBitmap ); memDC.SelectObject( wxNullBitmap );
DoDrawBitmap( myBitmap, xdest, ydest ); DoDrawBitmap( myBitmap, xdest, ydest );
wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::DoBlit Call executed" ) ); wxASSERT_MSG( !wxSVG_DEBUG, wxT( "wxSVGFileDC::DoBlit Call executed" ) );
return FALSE; return false;
} }
......
...@@ -249,7 +249,7 @@ void DIALOG_PAGES_SETTINGS::SavePageSettings( wxCommandEvent& event ) ...@@ -249,7 +249,7 @@ void DIALOG_PAGES_SETTINGS::SavePageSettings( wxCommandEvent& event )
// here we assume translators will keep original paper size spellings // here we assume translators will keep original paper size spellings
if( !pageInfo.SetType( paperType ) ) if( !pageInfo.SetType( paperType ) )
{ {
wxASSERT_MSG( FALSE, wxT( "the translation for paper size must preserve original spellings" ) ); wxASSERT_MSG( false, wxT( "the translation for paper size must preserve original spellings" ) );
} }
// set portrait _after_ setting size/type above // set portrait _after_ setting size/type above
......
...@@ -101,7 +101,7 @@ bool EDA_APP::OnInit() ...@@ -101,7 +101,7 @@ bool EDA_APP::OnInit()
SetTopWindow( frame ); SetTopWindow( frame );
frame->LoadProjectFile( filename.GetFullPath() ); frame->LoadProjectFile( filename.GetFullPath() );
frame->Show( TRUE ); frame->Show( true );
frame->BuildFOOTPRINTS_LISTBOX(); frame->BuildFOOTPRINTS_LISTBOX();
if( filename.IsOk() && filename.FileExists() ) if( filename.IsOk() && filename.FileExists() )
......
...@@ -48,13 +48,13 @@ public: ...@@ -48,13 +48,13 @@ public:
~FOOTPRINTS_LISTBOX(); ~FOOTPRINTS_LISTBOX();
int GetCount(); int GetCount();
void SetSelection( unsigned index, bool State = TRUE ); void SetSelection( unsigned index, bool State = true );
void SetString( unsigned linecount, const wxString& text ); void SetString( unsigned linecount, const wxString& text );
void AppendLine( const wxString& text ); void AppendLine( const wxString& text );
void SetFootprintFullList( FOOTPRINT_LIST& list ); void SetFootprintFullList( FOOTPRINT_LIST& list );
void SetFootprintFilteredList( COMPONENT* Component, void SetFootprintFilteredList( COMPONENT* Component,
FOOTPRINT_LIST& list ); FOOTPRINT_LIST& list );
void SetActiveFootprintList( bool FullList, bool Redraw = FALSE ); void SetActiveFootprintList( bool FullList, bool Redraw = false );
wxString GetSelectedFootprint(); wxString GetSelectedFootprint();
wxString OnGetItemText( long item, long column ) const; wxString OnGetItemText( long item, long column ) const;
...@@ -88,7 +88,7 @@ public: ...@@ -88,7 +88,7 @@ public:
void Clear(); void Clear();
int GetCount(); int GetCount();
wxString OnGetItemText( long item, long column ) const; wxString OnGetItemText( long item, long column ) const;
void SetSelection( unsigned index, bool State = TRUE ); void SetSelection( unsigned index, bool State = true );
void SetString( unsigned linecount, const wxString& text ); void SetString( unsigned linecount, const wxString& text );
void AppendLine( const wxString& text ); void AppendLine( const wxString& text );
......
...@@ -186,7 +186,7 @@ void DIALOG_CVPCB_CONFIG::OnButtonUpClick( wxCommandEvent& event ) ...@@ -186,7 +186,7 @@ void DIALOG_CVPCB_CONFIG::OnButtonUpClick( wxCommandEvent& event )
list->SetSelection( jj-1 ); list->SetSelection( jj-1 );
} }
m_LibListChanged = TRUE; m_LibListChanged = true;
} }
...@@ -229,7 +229,7 @@ void DIALOG_CVPCB_CONFIG::OnButtonDownClick( wxCommandEvent& event ) ...@@ -229,7 +229,7 @@ void DIALOG_CVPCB_CONFIG::OnButtonDownClick( wxCommandEvent& event )
list->SetSelection(jj+1); list->SetSelection(jj+1);
} }
m_LibListChanged = TRUE; m_LibListChanged = true;
} }
...@@ -250,7 +250,7 @@ void DIALOG_CVPCB_CONFIG::OnRemoveLibClick( wxCommandEvent& event ) ...@@ -250,7 +250,7 @@ void DIALOG_CVPCB_CONFIG::OnRemoveLibClick( wxCommandEvent& event )
for( int ii = selections.GetCount()-1; ii >= 0; ii-- ) for( int ii = selections.GetCount()-1; ii >= 0; ii-- )
{ {
list->Delete(selections[ii] ); list->Delete(selections[ii] );
m_LibListChanged = TRUE; m_LibListChanged = true;
} }
} }
...@@ -330,7 +330,7 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) ...@@ -330,7 +330,7 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
// Add or insert new library name, if not already in list // Add or insert new library name, if not already in list
if( list->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND ) if( list->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND )
{ {
m_LibListChanged = TRUE; m_LibListChanged = true;
if( ! insert ) if( ! insert )
list->Append( libfilename ); list->Append( libfilename );
......
...@@ -53,13 +53,13 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& package ) ...@@ -53,13 +53,13 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& package )
m_undefinedComponentCnt -= 1; m_undefinedComponentCnt -= 1;
m_ListCmp->SetString( NumCmp, msg ); m_ListCmp->SetString( NumCmp, msg );
m_ListCmp->SetSelection( NumCmp, FALSE ); m_ListCmp->SetSelection( NumCmp, false );
// We activate next component: // We activate next component:
if( NumCmp < (m_ListCmp->GetCount() - 1) ) if( NumCmp < (m_ListCmp->GetCount() - 1) )
NumCmp++; NumCmp++;
m_ListCmp->SetSelection( NumCmp, TRUE ); m_ListCmp->SetSelection( NumCmp, true );
DisplayStatus(); DisplayStatus();
} }
...@@ -107,7 +107,7 @@ bool CVPCB_MAINFRAME::ReadNetList() ...@@ -107,7 +107,7 @@ bool CVPCB_MAINFRAME::ReadNetList()
} }
if( !m_components.empty() ) if( !m_components.empty() )
m_ListCmp->SetSelection( 0, TRUE ); m_ListCmp->SetSelection( 0, true );
DisplayStatus(); DisplayStatus();
......
...@@ -97,7 +97,7 @@ void CVPCB_MAINFRAME::BuildCmpListBox() ...@@ -97,7 +97,7 @@ void CVPCB_MAINFRAME::BuildCmpListBox()
} }
m_ListCmp->SetItemCount( m_ListCmp->m_ComponentList.Count() ); m_ListCmp->SetItemCount( m_ListCmp->m_ComponentList.Count() );
m_ListCmp->SetSelection( 0, TRUE ); m_ListCmp->SetSelection( 0, true );
} }
......
...@@ -116,7 +116,7 @@ int CVPCB_MAINFRAME::GenNetlistPcbnew( FILE* file,bool isEESchemaNetlist ) ...@@ -116,7 +116,7 @@ int CVPCB_MAINFRAME::GenNetlistPcbnew( FILE* file,bool isEESchemaNetlist )
*/ */
void WriteFootprintFilterInfos( FILE* file, COMPONENT_LIST& list ) void WriteFootprintFilterInfos( FILE* file, COMPONENT_LIST& list )
{ {
bool WriteHeader = FALSE; bool WriteHeader = false;
BOOST_FOREACH( COMPONENT& component, list ) BOOST_FOREACH( COMPONENT& component, list )
{ {
...@@ -127,7 +127,7 @@ void WriteFootprintFilterInfos( FILE* file, COMPONENT_LIST& list ) ...@@ -127,7 +127,7 @@ void WriteFootprintFilterInfos( FILE* file, COMPONENT_LIST& list )
if( !WriteHeader ) if( !WriteHeader )
{ {
fprintf( file, "{ Allowed footprints by component:\n" ); fprintf( file, "{ Allowed footprints by component:\n" );
WriteHeader = TRUE; WriteHeader = true;
} }
fprintf( file, "$component %s\n", fprintf( file, "$component %s\n",
TO_UTF8( component.m_Reference ) ); TO_UTF8( component.m_Reference ) );
......
...@@ -166,7 +166,7 @@ LIB_COMPONENT::LIB_COMPONENT( const wxString& aName, CMP_LIBRARY* aLibrary ) : ...@@ -166,7 +166,7 @@ LIB_COMPONENT::LIB_COMPONENT( const wxString& aName, CMP_LIBRARY* aLibrary ) :
m_unitCount = 1; m_unitCount = 1;
m_pinNameOffset = 40; m_pinNameOffset = 40;
m_options = ENTRY_NORMAL; m_options = ENTRY_NORMAL;
m_unitsLocked = FALSE; m_unitsLocked = false;
m_showPinNumbers = true; m_showPinNumbers = true;
m_showPinNames = true; m_showPinNames = true;
...@@ -763,7 +763,7 @@ bool LIB_COMPONENT::Load( LINE_READER& aLineReader, wxString& aErrorMsg ) ...@@ -763,7 +763,7 @@ bool LIB_COMPONENT::Load( LINE_READER& aLineReader, wxString& aErrorMsg )
p = strtok( line, " \t\r\n" ); p = strtok( line, " \t\r\n" );
/* This is the error flag ( if an error occurs, Res = FALSE) */ /* This is the error flag ( if an error occurs, Res = false) */
Res = true; Res = true;
if( *line == '#' ) // a comment if( *line == '#' ) // a comment
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* *
* Returns * Returns
* true if the selected component * true if the selected component
* FALSE canceled order * false canceled order
* Place the name of the component has loaded, select from a list in * Place the name of the component has loaded, select from a list in
* BufName * BufName
*/ */
......
...@@ -56,8 +56,8 @@ extern int PrintListeGLabel( FILE* f, std::vector <BOM_LABEL>& aList ); ...@@ -56,8 +56,8 @@ extern int PrintListeGLabel( FILE* f, std::vector <BOM_LABEL>& aList );
/* Local variables */ /* Local variables */
static bool s_ListByRef = TRUE; static bool s_ListByRef = true;
static bool s_ListByValue = TRUE; static bool s_ListByValue = true;
static bool s_ListWithSubCmponents; static bool s_ListWithSubCmponents;
static bool s_ListHierarchicalPinByName; static bool s_ListHierarchicalPinByName;
static bool s_ListBySheet; static bool s_ListBySheet;
...@@ -465,7 +465,7 @@ void DIALOG_BUILD_BOM::CreateExportList( const wxString& aFullFileName, ...@@ -465,7 +465,7 @@ void DIALOG_BUILD_BOM::CreateExportList( const wxString& aFullFileName,
cmplist.RemoveSubComponentsFromList(); cmplist.RemoveSubComponentsFromList();
// create the file // create the file
PrintComponentsListByRef( f, cmplist, TRUE, aIncludeSubComponents ); PrintComponentsListByRef( f, cmplist, true, aIncludeSubComponents );
fclose( f ); fclose( f );
} }
......
...@@ -56,9 +56,9 @@ private: ...@@ -56,9 +56,9 @@ private:
bool aIncludeSubComponents ); bool aIncludeSubComponents );
#if defined(KICAD_GOST) #if defined(KICAD_GOST)
wxString PrintFieldData( SCH_COMPONENT* DrawLibItem, bool CompactForm = FALSE ); wxString PrintFieldData( SCH_COMPONENT* DrawLibItem, bool CompactForm = false );
#else #else
void PrintFieldData( FILE* f, SCH_COMPONENT* DrawLibItem, bool CompactForm = FALSE ); void PrintFieldData( FILE* f, SCH_COMPONENT* DrawLibItem, bool CompactForm = false );
#endif #endif
bool IsFieldChecked( int aFieldId ); bool IsFieldChecked( int aFieldId );
......
...@@ -128,7 +128,7 @@ void DIALOG_EESCHEMA_CONFIG::OnButtonUpClick( wxCommandEvent& event ) ...@@ -128,7 +128,7 @@ void DIALOG_EESCHEMA_CONFIG::OnButtonUpClick( wxCommandEvent& event )
m_ListLibr->SetSelection(jj-1); m_ListLibr->SetSelection(jj-1);
} }
m_LibListChanged = TRUE; m_LibListChanged = true;
} }
...@@ -162,7 +162,7 @@ void DIALOG_EESCHEMA_CONFIG::OnButtonDownClick( wxCommandEvent& event ) ...@@ -162,7 +162,7 @@ void DIALOG_EESCHEMA_CONFIG::OnButtonDownClick( wxCommandEvent& event )
m_ListLibr->SetSelection(jj+1); m_ListLibr->SetSelection(jj+1);
} }
m_LibListChanged = TRUE; m_LibListChanged = true;
} }
...@@ -243,7 +243,7 @@ void DIALOG_EESCHEMA_CONFIG::OnRemoveLibClick( wxCommandEvent& event ) ...@@ -243,7 +243,7 @@ void DIALOG_EESCHEMA_CONFIG::OnRemoveLibClick( wxCommandEvent& event )
for( int ii = selections.GetCount()-1; ii >= 0; ii-- ) for( int ii = selections.GetCount()-1; ii >= 0; ii-- )
{ {
m_ListLibr->Delete( selections[ii] ); m_ListLibr->Delete( selections[ii] );
m_LibListChanged = TRUE; m_LibListChanged = true;
} }
// Select next item after deleted in m_ListLibr // Select next item after deleted in m_ListLibr
...@@ -321,7 +321,7 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) ...@@ -321,7 +321,7 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
//Add or insert new library name, if not already in list //Add or insert new library name, if not already in list
if( m_ListLibr->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND ) if( m_ListLibr->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND )
{ {
m_LibListChanged = TRUE; m_LibListChanged = true;
if( event.GetId() == ID_ADD_LIB ) if( event.GetId() == ID_ADD_LIB )
m_ListLibr->Append( libfilename ); m_ListLibr->Append( libfilename );
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
/* Variable locales */ /* Variable locales */
extern int DiagErc[PIN_NMAX][PIN_NMAX]; extern int DiagErc[PIN_NMAX][PIN_NMAX];
extern bool DiagErcTableInit; // go to TRUE after DiagErc init extern bool DiagErcTableInit; // go to true after DiagErc init
extern int DefaultDiagErc[PIN_NMAX][PIN_NMAX]; extern int DefaultDiagErc[PIN_NMAX][PIN_NMAX];
extern const wxChar* CommentERC_H[]; extern const wxChar* CommentERC_H[];
extern const wxChar* CommentERC_V[]; extern const wxChar* CommentERC_V[];
......
...@@ -66,11 +66,11 @@ void DIALOG_LIB_EDIT_TEXT::initDlg( ) ...@@ -66,11 +66,11 @@ void DIALOG_LIB_EDIT_TEXT::initDlg( )
m_TextValue->SetValue( m_GraphicText->m_Text ); m_TextValue->SetValue( m_GraphicText->m_Text );
if ( m_GraphicText->GetUnit() == 0 ) if ( m_GraphicText->GetUnit() == 0 )
m_CommonUnit->SetValue( TRUE ); m_CommonUnit->SetValue( true );
if ( m_GraphicText->GetConvert() == 0 ) if ( m_GraphicText->GetConvert() == 0 )
m_CommonConvert->SetValue( TRUE ); m_CommonConvert->SetValue( true );
if ( m_GraphicText->m_Orient == TEXT_ORIENT_VERT ) if ( m_GraphicText->m_Orient == TEXT_ORIENT_VERT )
m_Orient->SetValue( TRUE ); m_Orient->SetValue( true );
int shape = 0; int shape = 0;
if ( m_GraphicText->m_Italic ) if ( m_GraphicText->m_Italic )
...@@ -118,11 +118,11 @@ void DIALOG_LIB_EDIT_TEXT::initDlg( ) ...@@ -118,11 +118,11 @@ void DIALOG_LIB_EDIT_TEXT::initDlg( )
m_TextSize->SetValue( msg ); m_TextSize->SetValue( msg );
if ( ! m_Parent->m_drawSpecificUnit ) if ( ! m_Parent->m_drawSpecificUnit )
m_CommonUnit->SetValue( TRUE ); m_CommonUnit->SetValue( true );
if ( ! m_Parent->m_drawSpecificConvert ) if ( ! m_Parent->m_drawSpecificConvert )
m_CommonConvert->SetValue( TRUE ); m_CommonConvert->SetValue( true );
if ( m_Parent->m_textOrientation == TEXT_ORIENT_VERT ) if ( m_Parent->m_textOrientation == TEXT_ORIENT_VERT )
m_Orient->SetValue( TRUE ); m_Orient->SetValue( true );
} }
msg = m_TextSizeText->GetLabel() + ReturnUnitSymbol(); msg = m_TextSizeText->GetLabel() + ReturnUnitSymbol();
......
...@@ -191,13 +191,13 @@ void DIALOG_PLOT_SCHEMATIC_HPGL::SetPageOffsetValue() ...@@ -191,13 +191,13 @@ void DIALOG_PLOT_SCHEMATIC_HPGL::SetPageOffsetValue()
m_PlotOrgPosition_Y->SetValue( msg ); m_PlotOrgPosition_Y->SetValue( msg );
m_PlotOrgPosition_X->Enable( TRUE ); m_PlotOrgPosition_X->Enable( true );
m_PlotOrgPosition_Y->Enable( TRUE ); m_PlotOrgPosition_Y->Enable( true );
} }
else else
{ {
m_PlotOrgPosition_X->Enable( FALSE ); m_PlotOrgPosition_X->Enable( false );
m_PlotOrgPosition_Y->Enable( FALSE ); m_PlotOrgPosition_Y->Enable( false );
} }
} }
......
...@@ -140,7 +140,7 @@ void DIALOG_PLOT_SCHEMATIC_PS::OnPlotCurrent( wxCommandEvent& event ) ...@@ -140,7 +140,7 @@ void DIALOG_PLOT_SCHEMATIC_PS::OnPlotCurrent( wxCommandEvent& event )
void DIALOG_PLOT_SCHEMATIC_PS::OnPlotAll( wxCommandEvent& event ) void DIALOG_PLOT_SCHEMATIC_PS::OnPlotAll( wxCommandEvent& event )
{ {
m_select_PlotAll = TRUE; m_select_PlotAll = true;
initOptVars(); initOptVars();
createPSFile(); createPSFile();
......
...@@ -73,7 +73,7 @@ void SCH_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) ...@@ -73,7 +73,7 @@ void SCH_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
TraceWorkSheet( DC, GetScreen(), g_DrawDefaultLineThickness ); TraceWorkSheet( DC, GetScreen(), g_DrawDefaultLineThickness );
if( m_canvas->IsMouseCaptured() ) if( m_canvas->IsMouseCaptured() )
m_canvas->CallMouseCapture( DC, wxDefaultPosition, FALSE ); m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );
m_canvas->DrawCrossHair( DC ); m_canvas->DrawCrossHair( DC );
......
...@@ -500,7 +500,7 @@ bool WriteDiagnosticERC( const wxString& aFullFileName ) ...@@ -500,7 +500,7 @@ bool WriteDiagnosticERC( const wxString& aFullFileName )
int count = 0; int count = 0;
if( ( file = wxFopen( aFullFileName, wxT( "wt" ) ) ) == NULL ) if( ( file = wxFopen( aFullFileName, wxT( "wt" ) ) ) == NULL )
return FALSE; return false;
msg = _( "ERC report" ); msg = _( "ERC report" );
......
...@@ -1120,7 +1120,7 @@ void LIB_PIN::DrawPinTexts( EDA_DRAW_PANEL* panel, ...@@ -1120,7 +1120,7 @@ void LIB_PIN::DrawPinTexts( EDA_DRAW_PANEL* panel,
} }
if( m_name.IsEmpty() ) if( m_name.IsEmpty() )
DrawPinName = FALSE; DrawPinName = false;
if( TextInside ) /* Draw the text inside, but the pin numbers outside. */ if( TextInside ) /* Draw the text inside, but the pin numbers outside. */
{ {
...@@ -1415,7 +1415,7 @@ void LIB_PIN::PlotPinTexts( PLOTTER* plotter, ...@@ -1415,7 +1415,7 @@ void LIB_PIN::PlotPinTexts( PLOTTER* plotter,
} }
if( m_name.IsEmpty() ) if( m_name.IsEmpty() )
DrawPinName = FALSE; DrawPinName = false;
/* Draw the text inside, but the pin numbers outside. */ /* Draw the text inside, but the pin numbers outside. */
if( TextInside ) if( TextInside )
......
...@@ -293,7 +293,7 @@ int SCH_COMPONENT::GetPartCount() const ...@@ -293,7 +293,7 @@ int SCH_COMPONENT::GetPartCount() const
void SCH_COMPONENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset, void SCH_COMPONENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset,
int DrawMode, int Color, bool DrawPinText ) int DrawMode, int Color, bool DrawPinText )
{ {
bool dummy = FALSE; bool dummy = false;
LIB_COMPONENT* Entry = CMP_LIBRARY::FindLibraryComponent( m_ChipName ); LIB_COMPONENT* Entry = CMP_LIBRARY::FindLibraryComponent( m_ChipName );
...@@ -854,7 +854,7 @@ void SCH_COMPONENT::SetOrientation( int aOrientation ) ...@@ -854,7 +854,7 @@ void SCH_COMPONENT::SetOrientation( int aOrientation )
break; break;
default: default:
transform = FALSE; transform = false;
wxMessageBox( wxT( "SetRotateMiroir() error: ill value" ) ); wxMessageBox( wxT( "SetRotateMiroir() error: ill value" ) );
break; break;
} }
......
...@@ -57,13 +57,13 @@ void LIB_VIEW_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -57,13 +57,13 @@ void LIB_VIEW_FRAME::Process_Special_Functions( wxCommandEvent& event )
case ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT: case ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT:
m_mainToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT, true ); m_mainToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT, true );
m_mainToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, FALSE ); m_mainToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, false );
m_convert = 1; m_convert = 1;
m_canvas->Refresh(); m_canvas->Refresh();
break; break;
case ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT: case ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT:
m_mainToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT, FALSE ); m_mainToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT, false );
m_mainToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, true ); m_mainToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, true );
m_convert = 2; m_convert = 2;
m_canvas->Refresh(); m_canvas->Refresh();
......
...@@ -85,8 +85,8 @@ void D_CODE::Clear_D_CODE_Data() ...@@ -85,8 +85,8 @@ void D_CODE::Clear_D_CODE_Data()
m_Shape = APT_CIRCLE; m_Shape = APT_CIRCLE;
m_Drill.x = m_Drill.y = 0; m_Drill.x = m_Drill.y = 0;
m_DrillShape = APT_DEF_NO_HOLE; m_DrillShape = APT_DEF_NO_HOLE;
m_InUse = FALSE; m_InUse = false;
m_Defined = FALSE; m_Defined = false;
m_Macro = NULL; m_Macro = NULL;
m_Rotation = 0.0; m_Rotation = 0.0;
m_EdgesCount = 0; m_EdgesCount = 0;
......
...@@ -99,8 +99,8 @@ public: ...@@ -99,8 +99,8 @@ public:
APERTURE_DEF_HOLETYPE m_DrillShape; /* shape of the hole (0 = no hole, round = 1, rect = 2) */ APERTURE_DEF_HOLETYPE m_DrillShape; /* shape of the hole (0 = no hole, round = 1, rect = 2) */
double m_Rotation; /* shape rotation in degrees */ double m_Rotation; /* shape rotation in degrees */
int m_EdgesCount; /* in aperture definition Polygon only: number of edges for the polygon */ int m_EdgesCount; /* in aperture definition Polygon only: number of edges for the polygon */
bool m_InUse; /* FALSE if not used */ bool m_InUse; /* false if not used */
bool m_Defined; /* FALSE if not defined */ bool m_Defined; /* false if not defined */
wxString m_SpecialDescr; wxString m_SpecialDescr;
public: public:
......
...@@ -158,7 +158,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) ...@@ -158,7 +158,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( )
m_BoxSelectLayer[ii] = new wxCheckBox( this, -1, msg ); m_BoxSelectLayer[ii] = new wxCheckBox( this, -1, msg );
if( mask & s_SelectedLayers ) if( mask & s_SelectedLayers )
m_BoxSelectLayer[ii]->SetValue( TRUE ); m_BoxSelectLayer[ii]->SetValue( true );
if( ii < 16 ) if( ii < 16 )
m_leftLayersBoxSizer->Add( m_BoxSelectLayer[ii], m_leftLayersBoxSizer->Add( m_BoxSelectLayer[ii],
wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE ); wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE );
...@@ -418,7 +418,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) ...@@ -418,7 +418,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize ); wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize );
frame->Initialize(); frame->Initialize();
frame->Show( TRUE ); frame->Show( true );
} }
...@@ -451,7 +451,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event ) ...@@ -451,7 +451,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
( (wxPostScriptDC*) dc )->SetResolution( 600 ); // Postscript DC resolution is 600 ppi ( (wxPostScriptDC*) dc )->SetResolution( 600 ); // Postscript DC resolution is 600 ppi
#endif #endif
if( !printer.Print( this, &printout, TRUE ) ) if( !printer.Print( this, &printout, true ) )
{ {
if( wxPrinter::GetLastError() == wxPRINTER_ERROR ) if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
DisplayError( this, _( "There was a problem printing" ) ); DisplayError( this, _( "There was a problem printing" ) );
......
...@@ -96,7 +96,7 @@ void GERBVIEW_FRAME::ExportDataInPcbnewFormat( wxCommandEvent& event ) ...@@ -96,7 +96,7 @@ void GERBVIEW_FRAME::ExportDataInPcbnewFormat( wxCommandEvent& event )
msg, msg,
this, this,
wxFD_SAVE, wxFD_SAVE,
FALSE false
); );
if( FullFileName == wxEmptyString ) if( FullFileName == wxEmptyString )
return; return;
......
...@@ -42,12 +42,12 @@ bool GERBVIEW_FRAME::Clear_Pcb( bool query ) ...@@ -42,12 +42,12 @@ bool GERBVIEW_FRAME::Clear_Pcb( bool query )
int layer; int layer;
if( GetBoard() == NULL ) if( GetBoard() == NULL )
return FALSE; return false;
if( query && GetScreen()->IsModify() ) if( query && GetScreen()->IsModify() )
{ {
if( !IsOK( this, _( "Current data will be lost?" ) ) ) if( !IsOK( this, _( "Current data will be lost?" ) ) )
return FALSE; return false;
} }
SetCurItem( NULL ); SetCurItem( NULL );
......
...@@ -45,7 +45,7 @@ bool GERBVIEW_FRAME::Read_GERBER_File( const wxString& GERBER_FullFileName, ...@@ -45,7 +45,7 @@ bool GERBVIEW_FRAME::Read_GERBER_File( const wxString& GERBER_FullFileName,
{ {
msg = _( "File " ) + GERBER_FullFileName + _( " not found" ); msg = _( "File " ) + GERBER_FullFileName + _( " not found" );
DisplayError( this, msg, 10 ); DisplayError( this, msg, 10 );
return FALSE; return false;
} }
gerber->m_FileName = GERBER_FullFileName; gerber->m_FileName = GERBER_FullFileName;
......
...@@ -49,11 +49,6 @@ ...@@ -49,11 +49,6 @@
#define UNIX_STRING_DIR_SEP wxT( "/" ) #define UNIX_STRING_DIR_SEP wxT( "/" )
#define WIN_STRING_DIR_SEP wxT( "\\" ) #define WIN_STRING_DIR_SEP wxT( "\\" )
#ifndef TRUE
#define TRUE ((bool)1)
#define FALSE ((bool)0)
#endif
#define USE_RESIZE_BORDER #define USE_RESIZE_BORDER
#if defined(__UNIX__) || defined(USE_RESIZE_BORDER) #if defined(__UNIX__) || defined(USE_RESIZE_BORDER)
#define MAYBE_RESIZE_BORDER wxRESIZE_BORDER // linux users like resizeable #define MAYBE_RESIZE_BORDER wxRESIZE_BORDER // linux users like resizeable
......
...@@ -33,7 +33,7 @@ TREEPROJECTFILES::TREEPROJECTFILES( TREE_PROJECT_FRAME* parent ) : ...@@ -33,7 +33,7 @@ TREEPROJECTFILES::TREEPROJECTFILES( TREE_PROJECT_FRAME* parent ) :
iconsize.y = dummy.GetHeight(); iconsize.y = dummy.GetHeight();
// Make an image list containing small icons // Make an image list containing small icons
m_ImageList = new wxImageList( iconsize.x, iconsize.y, TRUE, TREE_MAX ); m_ImageList = new wxImageList( iconsize.x, iconsize.y, true, TREE_MAX );
m_ImageList->Add( KiBitmap( kicad_icon_small_xpm ) ); // TREE_PROJECT m_ImageList->Add( KiBitmap( kicad_icon_small_xpm ) ); // TREE_PROJECT
m_ImageList->Add( KiBitmap( eeschema_xpm ) ); // TREE_SCHEMA m_ImageList->Add( KiBitmap( eeschema_xpm ) ); // TREE_SCHEMA
......
...@@ -688,7 +688,7 @@ void TREE_PROJECT_FRAME::ReCreateTreePrj() ...@@ -688,7 +688,7 @@ void TREE_PROJECT_FRAME::ReCreateTreePrj()
TREE_PROJECT - 1, TREE_PROJECT - 1,
TREE_PROJECT - 1 ); TREE_PROJECT - 1 );
m_TreeProject->SetItemBold( rootcellule, TRUE ); m_TreeProject->SetItemBold( rootcellule, true );
m_TreeProject->SetItemData( rootcellule, m_TreeProject->SetItemData( rootcellule,
new TREEPROJECT_ITEM( TREE_PROJECT, new TREEPROJECT_ITEM( TREE_PROJECT,
......
...@@ -324,9 +324,9 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab ...@@ -324,9 +324,9 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab
m_Zone_Setting->SetCornerRadius( ReturnValueFromString( g_UserUnit, txtvalue, m_Parent->GetInternalUnits() ) ); m_Zone_Setting->SetCornerRadius( ReturnValueFromString( g_UserUnit, txtvalue, m_Parent->GetInternalUnits() ) );
if( m_OrientEdgesOpt->GetSelection() == 0 ) if( m_OrientEdgesOpt->GetSelection() == 0 )
g_Zone_45_Only = FALSE; g_Zone_45_Only = false;
else else
g_Zone_45_Only = TRUE; g_Zone_45_Only = true;
m_Zone_Setting->m_ThermalReliefGap = ReturnValueFromTextCtrl( *m_AntipadSizeValue, m_Zone_Setting->m_ThermalReliefGap = ReturnValueFromTextCtrl( *m_AntipadSizeValue,
PCB_INTERNAL_UNIT ); PCB_INTERNAL_UNIT );
......
...@@ -106,12 +106,12 @@ void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event) ...@@ -106,12 +106,12 @@ void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event)
if ( m_Show_Page_Limits->GetSelection() == 0 ) if ( m_Show_Page_Limits->GetSelection() == 0 )
g_ShowPageLimits = true; g_ShowPageLimits = true;
else else
g_ShowPageLimits = FALSE; g_ShowPageLimits = false;
if ( m_OptDisplayTracks->GetSelection() == 1 ) if ( m_OptDisplayTracks->GetSelection() == 1 )
DisplayOpt.DisplayPcbTrackFill = true; DisplayOpt.DisplayPcbTrackFill = true;
else else
DisplayOpt.DisplayPcbTrackFill = FALSE; DisplayOpt.DisplayPcbTrackFill = false;
m_Parent->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; m_Parent->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill;
DisplayOpt.m_DisplayViaMode = (VIA_DISPLAY_MODE_T) m_OptDisplayViaHole->GetSelection(); DisplayOpt.m_DisplayViaMode = (VIA_DISPLAY_MODE_T) m_OptDisplayViaHole->GetSelection();
......
...@@ -72,7 +72,7 @@ void DIALOG_MODULE_BOARD_EDITOR::InitBoardProperties() ...@@ -72,7 +72,7 @@ void DIALOG_MODULE_BOARD_EDITOR::InitBoardProperties()
m_LayerCtrl->SetSelection( m_LayerCtrl->SetSelection(
(m_CurrentModule->GetLayer() == LAYER_N_BACK) ? 1 : 0 ); (m_CurrentModule->GetLayer() == LAYER_N_BACK) ? 1 : 0 );
bool select = FALSE; bool select = false;
switch( (int) m_CurrentModule->GetOrientation() ) switch( (int) m_CurrentModule->GetOrientation() )
{ {
case 0: case 0:
...@@ -96,7 +96,7 @@ void DIALOG_MODULE_BOARD_EDITOR::InitBoardProperties() ...@@ -96,7 +96,7 @@ void DIALOG_MODULE_BOARD_EDITOR::InitBoardProperties()
default: default:
m_OrientCtrl->SetSelection( 4 ); m_OrientCtrl->SetSelection( 4 );
select = TRUE; select = true;
break; break;
} }
...@@ -168,27 +168,27 @@ void DIALOG_MODULE_BOARD_EDITOR::ModuleOrientEvent( wxCommandEvent& event ) ...@@ -168,27 +168,27 @@ void DIALOG_MODULE_BOARD_EDITOR::ModuleOrientEvent( wxCommandEvent& event )
switch( m_OrientCtrl->GetSelection() ) switch( m_OrientCtrl->GetSelection() )
{ {
case 0: case 0:
m_OrientValue->Enable( FALSE ); m_OrientValue->Enable( false );
m_OrientValue->SetValue( wxT( "0" ) ); m_OrientValue->SetValue( wxT( "0" ) );
break; break;
case 1: case 1:
m_OrientValue->Enable( FALSE ); m_OrientValue->Enable( false );
m_OrientValue->SetValue( wxT( "900" ) ); m_OrientValue->SetValue( wxT( "900" ) );
break; break;
case 2: case 2:
m_OrientValue->Enable( FALSE ); m_OrientValue->Enable( false );
m_OrientValue->SetValue( wxT( "2700" ) ); m_OrientValue->SetValue( wxT( "2700" ) );
break; break;
case 3: case 3:
m_OrientValue->Enable( FALSE ); m_OrientValue->Enable( false );
m_OrientValue->SetValue( wxT( "1800" ) ); m_OrientValue->SetValue( wxT( "1800" ) );
break; break;
default: default:
m_OrientValue->Enable( TRUE ); m_OrientValue->Enable( true );
break; break;
} }
} }
...@@ -398,7 +398,7 @@ void DIALOG_MODULE_BOARD_EDITOR::Browse3DLib( wxCommandEvent& event ) ...@@ -398,7 +398,7 @@ void DIALOG_MODULE_BOARD_EDITOR::Browse3DLib( wxCommandEvent& event )
mask, mask,
this, this,
wxFD_OPEN, wxFD_OPEN,
TRUE true
); );
if( fullfilename == wxEmptyString ) if( fullfilename == wxEmptyString )
...@@ -526,14 +526,14 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event ) ...@@ -526,14 +526,14 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event )
orient - m_CurrentModule->m_Orient ); orient - m_CurrentModule->m_Orient );
// Set component side, that also have effect on the fields positions on board // Set component side, that also have effect on the fields positions on board
bool change_layer = FALSE; bool change_layer = false;
if( m_LayerCtrl->GetSelection() == 0 ) // layer req = COMPONENT if( m_LayerCtrl->GetSelection() == 0 ) // layer req = COMPONENT
{ {
if( m_CurrentModule->GetLayer() == LAYER_N_BACK ) if( m_CurrentModule->GetLayer() == LAYER_N_BACK )
change_layer = TRUE; change_layer = true;
} }
else if( m_CurrentModule->GetLayer() == LAYER_N_FRONT ) else if( m_CurrentModule->GetLayer() == LAYER_N_FRONT )
change_layer = TRUE; change_layer = true;
if( change_layer ) if( change_layer )
m_CurrentModule->Flip( m_CurrentModule->m_Pos ); m_CurrentModule->Flip( m_CurrentModule->m_Pos );
......
...@@ -273,7 +273,7 @@ void DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DLib( wxCommandEvent& event ) ...@@ -273,7 +273,7 @@ void DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DLib( wxCommandEvent& event )
mask, mask,
this, this,
wxFD_OPEN, wxFD_OPEN,
TRUE true
); );
if( fullfilename == wxEmptyString ) if( fullfilename == wxEmptyString )
......
...@@ -320,7 +320,7 @@ void DIALOG_GENDRILL::SetParams( void ) ...@@ -320,7 +320,7 @@ void DIALOG_GENDRILL::SetParams( void )
m_createMap = m_Choice_Drill_Map->GetSelection(); m_createMap = m_Choice_Drill_Map->GetSelection();
m_createRpt = m_Choice_Drill_Report->GetSelection(); m_createRpt = m_Choice_Drill_Report->GetSelection();
m_UnitDrillIsInch = (m_Choice_Unit->GetSelection() == 0) ? FALSE : TRUE; m_UnitDrillIsInch = (m_Choice_Unit->GetSelection() == 0) ? false : true;
m_MinimalHeader = m_Check_Minimal->IsChecked(); m_MinimalHeader = m_Check_Minimal->IsChecked();
m_Mirror = m_Check_Mirror->IsChecked(); m_Mirror = m_Check_Mirror->IsChecked();
m_ZerosFormat = m_Choice_Zeros_Format->GetSelection(); m_ZerosFormat = m_Choice_Zeros_Format->GetSelection();
......
...@@ -234,7 +234,7 @@ void DialogGraphicItemProperties::OnOkClick( wxCommandEvent& event ) ...@@ -234,7 +234,7 @@ void DialogGraphicItemProperties::OnOkClick( wxCommandEvent& event )
m_Parent->GetBoard()->SetDesignSettings( m_BrdSettings ); m_Parent->GetBoard()->SetDesignSettings( m_BrdSettings );
Close( TRUE ); Close( true );
} }
void DialogGraphicItemProperties::OnCancelClick( wxCommandEvent& event ) void DialogGraphicItemProperties::OnCancelClick( wxCommandEvent& event )
......
...@@ -105,10 +105,10 @@ void DIALOG_NETLIST::OnReadNetlistFileClick( wxCommandEvent& event ) ...@@ -105,10 +105,10 @@ void DIALOG_NETLIST::OnReadNetlistFileClick( wxCommandEvent& event )
m_Parent->ReadPcbNetlist( m_NetlistFilenameCtrl->GetValue(), m_Parent->ReadPcbNetlist( m_NetlistFilenameCtrl->GetValue(),
fn.GetFullPath(), m_MessageWindow, fn.GetFullPath(), m_MessageWindow,
m_ChangeExistingFootprintCtrl->GetSelection() == 1 ? TRUE : FALSE, m_ChangeExistingFootprintCtrl->GetSelection() == 1 ? true : false,
m_DeleteBadTracks->GetSelection() == 1 ? TRUE : FALSE, m_DeleteBadTracks->GetSelection() == 1 ? true : false,
m_RemoveExtraFootprintsCtrl->GetSelection() == 1 ? TRUE : FALSE, m_RemoveExtraFootprintsCtrl->GetSelection() == 1 ? true : false,
m_Select_By_Timestamp->GetSelection() == 1 ? TRUE : FALSE ); m_Select_By_Timestamp->GetSelection() == 1 ? true : false );
} }
...@@ -124,7 +124,7 @@ void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event ) ...@@ -124,7 +124,7 @@ void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event )
void DIALOG_NETLIST::OnCompileRatsnestClick( wxCommandEvent& event ) void DIALOG_NETLIST::OnCompileRatsnestClick( wxCommandEvent& event )
{ {
m_Parent->Compile_Ratsnest( m_DC, TRUE ); m_Parent->Compile_Ratsnest( m_DC, true );
} }
......
...@@ -136,10 +136,10 @@ bool PCB_EDIT_FRAME::ReOrientModules( const wxString& ModuleMask, ...@@ -136,10 +136,10 @@ bool PCB_EDIT_FRAME::ReOrientModules( const wxString& ModuleMask,
if( module->IsLocked() && !include_fixe ) if( module->IsLocked() && !include_fixe )
continue; continue;
if( WildCompareString( ModuleMask, module->m_Reference->m_Text, FALSE ) ) if( WildCompareString( ModuleMask, module->m_Reference->m_Text, false ) )
{ {
modified = true; modified = true;
Rotate_Module( NULL, module, Orient, FALSE ); Rotate_Module( NULL, module, Orient, false );
} }
} }
......
...@@ -165,7 +165,7 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnButtonUpClick( wxCommandEvent& event ) ...@@ -165,7 +165,7 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnButtonUpClick( wxCommandEvent& event )
m_ListLibr->SetSelection(jj-1); m_ListLibr->SetSelection(jj-1);
} }
m_LibListChanged = TRUE; m_LibListChanged = true;
} }
...@@ -199,7 +199,7 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnButtonDownClick( wxCommandEvent& event ) ...@@ -199,7 +199,7 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnButtonDownClick( wxCommandEvent& event )
m_ListLibr->SetSelection(jj+1); m_ListLibr->SetSelection(jj+1);
} }
m_LibListChanged = TRUE; m_LibListChanged = true;
} }
...@@ -215,7 +215,7 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnRemoveLibClick( wxCommandEvent& event ) ...@@ -215,7 +215,7 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnRemoveLibClick( wxCommandEvent& event )
for( int ii = selections.GetCount()-1; ii >= 0; ii-- ) for( int ii = selections.GetCount()-1; ii >= 0; ii-- )
{ {
m_ListLibr->Delete( selections[ii] ); m_ListLibr->Delete( selections[ii] );
m_LibListChanged = TRUE; m_LibListChanged = true;
} }
} }
...@@ -280,7 +280,7 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnAddOrInsertLibClick( wxCommandEvent& event ) ...@@ -280,7 +280,7 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnAddOrInsertLibClick( wxCommandEvent& event )
//Add or insert new library name, if not already in list //Add or insert new library name, if not already in list
if( m_ListLibr->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND ) if( m_ListLibr->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND )
{ {
m_LibListChanged = TRUE; m_LibListChanged = true;
if( event.GetId() == ID_ADD_LIB ) if( event.GetId() == ID_ADD_LIB )
m_ListLibr->Append( libfilename ); m_ListLibr->Append( libfilename );
......
...@@ -194,7 +194,7 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintPreview( wxCommandEvent& event ) ...@@ -194,7 +194,7 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintPreview( wxCommandEvent& event )
wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize ); wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize );
frame->Initialize(); frame->Initialize();
frame->Show( TRUE ); frame->Show( true );
} }
...@@ -222,7 +222,7 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event ) ...@@ -222,7 +222,7 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event )
( (wxPostScriptDC*) dc )->SetResolution( 600 ); // Postscript DC resolution is 600 ppi ( (wxPostScriptDC*) dc )->SetResolution( 600 ); // Postscript DC resolution is 600 ppi
#endif #endif
if( !printer.Print( this, &printout, TRUE ) ) if( !printer.Print( this, &printout, true ) )
{ {
if( wxPrinter::GetLastError() == wxPRINTER_ERROR ) if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
DisplayError( this, _( "There was a problem printing" ) ); DisplayError( this, _( "There was a problem printing" ) );
......
...@@ -508,7 +508,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) ...@@ -508,7 +508,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize ); wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize );
frame->Initialize(); frame->Initialize();
frame->Show( TRUE ); frame->Show( true );
} }
...@@ -541,7 +541,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event ) ...@@ -541,7 +541,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
( (wxPostScriptDC*) dc )->SetResolution( 600 ); // Postscript DC resolution is 600 ppi ( (wxPostScriptDC*) dc )->SetResolution( 600 ); // Postscript DC resolution is 600 ppi
#endif #endif
if( !printer.Print( this, &printout, TRUE ) ) if( !printer.Print( this, &printout, true ) )
{ {
if( wxPrinter::GetLastError() == wxPRINTER_ERROR ) if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
DisplayError( this, _( "There was a problem printing" ) ); DisplayError( this, _( "There was a problem printing" ) );
......
...@@ -277,7 +277,7 @@ static void write_triangle_bag( FILE* output_file, int color_index, /*{{{*/ ...@@ -277,7 +277,7 @@ static void write_triangle_bag( FILE* output_file, int color_index, /*{{{*/
" }\n", " }\n",
" }\n", " }\n",
" geometry IndexedFaceSet {\n", " geometry IndexedFaceSet {\n",
" solid TRUE\n", " solid true\n",
" coord Coordinate {\n", " coord Coordinate {\n",
" point [\n", " point [\n",
0, /* Coordinates marker */ 0, /* Coordinates marker */
......
...@@ -59,7 +59,7 @@ CPolyLine::~CPolyLine() ...@@ -59,7 +59,7 @@ CPolyLine::~CPolyLine()
* because copper areas have only one outside contour * because copper areas have only one outside contour
* Therefore, if this results in new CPolyLines, return them as std::vector pa * Therefore, if this results in new CPolyLines, return them as std::vector pa
* @param aExtraPolyList: pointer on a std::vector<CPolyLine*> to store extra CPolyLines * @param aExtraPolyList: pointer on a std::vector<CPolyLine*> to store extra CPolyLines
* @param bRetainArcs == TRUE, try to retain arcs in polys * @param bRetainArcs == true, try to retain arcs in polys
* @return number of external contours, or -1 if error * @return number of external contours, or -1 if error
*/ */
int CPolyLine::NormalizeWithKbool( std::vector<CPolyLine*> * aExtraPolyList, bool bRetainArcs ) int CPolyLine::NormalizeWithKbool( std::vector<CPolyLine*> * aExtraPolyList, bool bRetainArcs )
...@@ -150,7 +150,7 @@ int CPolyLine::NormalizeWithKbool( std::vector<CPolyLine*> * aExtraPolyList, boo ...@@ -150,7 +150,7 @@ int CPolyLine::NormalizeWithKbool( std::vector<CPolyLine*> * aExtraPolyList, boo
} }
m_Kbool_Poly_Engine->EndPolygonGet(); m_Kbool_Poly_Engine->EndPolygonGet();
polyline->Close( STRAIGHT, FALSE ); polyline->Close( STRAIGHT, false );
n_ext_cont++; n_ext_cont++;
} }
} }
...@@ -194,10 +194,10 @@ int CPolyLine::NormalizeWithKbool( std::vector<CPolyLine*> * aExtraPolyList, boo ...@@ -194,10 +194,10 @@ int CPolyLine::NormalizeWithKbool( std::vector<CPolyLine*> * aExtraPolyList, boo
{ {
int x = (*hole)[ii]; ii++; int x = (*hole)[ii]; ii++;
int y = (*hole)[ii]; int y = (*hole)[ii];
polyline->AppendCorner( x, y, STRAIGHT, FALSE ); polyline->AppendCorner( x, y, STRAIGHT, false );
} }
polyline->Close( STRAIGHT, FALSE ); polyline->Close( STRAIGHT, false );
} }
} }
...@@ -605,7 +605,7 @@ void ArmBoolEng( Bool_Engine* aBooleng, bool aConvertHoles ) ...@@ -605,7 +605,7 @@ void ArmBoolEng( Bool_Engine* aBooleng, bool aConvertHoles )
aBooleng->SetSmoothAber( SMOOTHABER ); aBooleng->SetSmoothAber( SMOOTHABER );
aBooleng->SetMaxlinemerge( MAXLINEMERGE ); aBooleng->SetMaxlinemerge( MAXLINEMERGE );
aBooleng->SetRoundfactor( ROUNDFACTOR ); aBooleng->SetRoundfactor( ROUNDFACTOR );
aBooleng->SetWindingRule( TRUE ); // This is the default kbool value aBooleng->SetWindingRule( true ); // This is the default kbool value
if( aConvertHoles ) if( aConvertHoles )
{ {
...@@ -668,7 +668,7 @@ int CPolyLine::RestoreArcs( std::vector<CArc> * arc_array, std::vector<CPolyLine ...@@ -668,7 +668,7 @@ int CPolyLine::RestoreArcs( std::vector<CArc> * arc_array, std::vector<CPolyLine
int arc_yf = (*arc_array)[iarc].yf; int arc_yf = (*arc_array)[iarc].yf;
int n_steps = (*arc_array)[iarc].n_steps; int n_steps = (*arc_array)[iarc].n_steps;
int style = (*arc_array)[iarc].style; int style = (*arc_array)[iarc].style;
bFound = FALSE; bFound = false;
// loop through polys // loop through polys
for( int ip = 0; ip<n_polys; ip++ ) for( int ip = 0; ip<n_polys; ip++ )
...@@ -701,7 +701,7 @@ int CPolyLine::RestoreArcs( std::vector<CArc> * arc_array, std::vector<CPolyLine ...@@ -701,7 +701,7 @@ int CPolyLine::RestoreArcs( std::vector<CArc> * arc_array, std::vector<CPolyLine
if( xf == arc_xf && yf == arc_yf ) if( xf == arc_xf && yf == arc_yf )
{ {
// arc from ic to ic2 // arc from ic to ic2
bFound = TRUE; bFound = true;
arc_start = ic; arc_start = ic;
arc_end = ic2; arc_end = ic2;
} }
...@@ -716,7 +716,7 @@ int CPolyLine::RestoreArcs( std::vector<CArc> * arc_array, std::vector<CPolyLine ...@@ -716,7 +716,7 @@ int CPolyLine::RestoreArcs( std::vector<CArc> * arc_array, std::vector<CPolyLine
if( xf == arc_xf && yf == arc_yf ) if( xf == arc_xf && yf == arc_yf )
{ {
// arc from ic2 to ic // arc from ic2 to ic
bFound = TRUE; bFound = true;
arc_start = ic2; arc_start = ic2;
arc_end = ic; arc_end = ic;
style = 3 - style; style = 3 - style;
...@@ -751,7 +751,7 @@ int CPolyLine::RestoreArcs( std::vector<CArc> * arc_array, std::vector<CPolyLine ...@@ -751,7 +751,7 @@ int CPolyLine::RestoreArcs( std::vector<CArc> * arc_array, std::vector<CPolyLine
} }
if( bFound ) if( bFound )
(*arc_array)[iarc].bFound = TRUE; (*arc_array)[iarc].bFound = true;
} }
// now delete all marked corners // now delete all marked corners
...@@ -764,7 +764,7 @@ int CPolyLine::RestoreArcs( std::vector<CArc> * arc_array, std::vector<CPolyLine ...@@ -764,7 +764,7 @@ int CPolyLine::RestoreArcs( std::vector<CArc> * arc_array, std::vector<CPolyLine
for( int ic = poly->GetNumCorners() - 1; ic>=0; ic-- ) for( int ic = poly->GetNumCorners() - 1; ic>=0; ic-- )
{ {
if( poly->GetUtility( ic ) ) if( poly->GetUtility( ic ) )
poly->DeleteCorner( ic, FALSE ); poly->DeleteCorner( ic, false );
} }
} }
...@@ -794,7 +794,7 @@ void CPolyLine::Start( int layer, int x, int y, int hatch ) ...@@ -794,7 +794,7 @@ void CPolyLine::Start( int layer, int x, int y, int hatch )
m_layer = layer; m_layer = layer;
m_HatchStyle = hatch; m_HatchStyle = hatch;
CPolyPt poly_pt( x, y ); CPolyPt poly_pt( x, y );
poly_pt.end_contour = FALSE; poly_pt.end_contour = false;
corner.push_back( poly_pt ); corner.push_back( poly_pt );
side_style.push_back( 0 ); side_style.push_back( 0 );
...@@ -807,7 +807,7 @@ void CPolyLine::AppendCorner( int x, int y, int style, bool bDraw ) ...@@ -807,7 +807,7 @@ void CPolyLine::AppendCorner( int x, int y, int style, bool bDraw )
{ {
UnHatch(); UnHatch();
CPolyPt poly_pt( x, y ); CPolyPt poly_pt( x, y );
poly_pt.end_contour = FALSE; poly_pt.end_contour = false;
// add entries for new corner and side // add entries for new corner and side
corner.push_back( poly_pt ); corner.push_back( poly_pt );
...@@ -829,7 +829,7 @@ void CPolyLine::Close( int style, bool bDraw ) ...@@ -829,7 +829,7 @@ void CPolyLine::Close( int style, bool bDraw )
} }
UnHatch(); UnHatch();
side_style[corner.size() - 1] = style; side_style[corner.size() - 1] = style;
corner[corner.size() - 1].end_contour = TRUE; corner[corner.size() - 1].end_contour = true;
if( bDraw ) if( bDraw )
Hatch(); Hatch();
} }
...@@ -870,7 +870,7 @@ void CPolyLine::DeleteCorner( int ic, bool bDraw ) ...@@ -870,7 +870,7 @@ void CPolyLine::DeleteCorner( int ic, bool bDraw )
corner.erase( corner.begin() + ic ); corner.erase( corner.begin() + ic );
side_style.erase( side_style.begin() + ic ); side_style.erase( side_style.begin() + ic );
if( ic == iend ) if( ic == iend )
corner[ic - 1].end_contour = TRUE; corner[ic - 1].end_contour = true;
} }
if( bClosed && GetContourSize( icont ) < 3 ) if( bClosed && GetContourSize( icont ) < 3 )
{ {
...@@ -1156,8 +1156,8 @@ void CPolyLine::InsertCorner( int ic, int x, int y ) ...@@ -1156,8 +1156,8 @@ void CPolyLine::InsertCorner( int ic, int x, int y )
{ {
if( corner[ic].end_contour ) if( corner[ic].end_contour )
{ {
corner[ic + 1].end_contour = TRUE; corner[ic + 1].end_contour = true;
corner[ic].end_contour = FALSE; corner[ic].end_contour = false;
} }
} }
Hatch(); Hatch();
......
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