diff --git a/gerbview/block.cpp b/gerbview/block.cpp index 8494f75a1b..6e123dba11 100644 --- a/gerbview/block.cpp +++ b/gerbview/block.cpp @@ -31,17 +31,9 @@ #include #include #include -#include -#include - -#include #include #include -#include - -#define BLOCK_COLOR BROWN - static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool erase ); @@ -211,7 +203,7 @@ void GERBVIEW_FRAME::Block_Move( wxDC* DC ) /* Move items in block */ for( GERBER_DRAW_ITEM* item = GetItemsList(); item; item = item->Next() ) { - GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; + GERBER_DRAW_ITEM* gerb_item = item; if( gerb_item->HitTest( GetScreen()->m_BlockLocate ) ) gerb_item->MoveAB( delta ); diff --git a/gerbview/class_DCodeSelectionbox.cpp b/gerbview/class_DCodeSelectionbox.cpp index 2d135966fa..6c3caa2816 100644 --- a/gerbview/class_DCodeSelectionbox.cpp +++ b/gerbview/class_DCodeSelectionbox.cpp @@ -25,8 +25,6 @@ #include #include #include -#include -#include #include #include diff --git a/gerbview/class_GERBER.cpp b/gerbview/class_GERBER.cpp index 53a9f91527..01eac371ff 100644 --- a/gerbview/class_GERBER.cpp +++ b/gerbview/class_GERBER.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include @@ -307,8 +306,8 @@ void GERBER_IMAGE::StepAndRepeatItem( const GERBER_DRAW_ITEM& aItem ) if( GetLayerParams().m_XRepeatCount < 2 && GetLayerParams().m_YRepeatCount < 2 ) return; // Nothing to repeat + // Duplicate item: - wxString msg; for( int ii = 0; ii < GetLayerParams().m_XRepeatCount; ii++ ) { for( int jj = 0; jj < GetLayerParams().m_YRepeatCount; jj++ ) diff --git a/gerbview/class_GERBER.h b/gerbview/class_GERBER.h index d3ac2f79f8..eba1719ef5 100644 --- a/gerbview/class_GERBER.h +++ b/gerbview/class_GERBER.h @@ -248,14 +248,14 @@ public: * Function ReadRS274XCommand * reads a single RS274X command terminated with a % */ - bool ReadRS274XCommand( char aBuff[GERBER_BUFZ], char* & text ); + bool ReadRS274XCommand( char *aBuff, char* & text ); /** * Function ExecuteRS274XCommand * executes 1 command */ - bool ExecuteRS274XCommand( int command, char aBuff[GERBER_BUFZ], - char* & text ); + bool ExecuteRS274XCommand( int command, char* aBuff, + char*& text ); /** @@ -268,7 +268,7 @@ public: * @param gerber_file Which file to read from for continuation. * @return bool - true if a macro was read in successfully, else false. */ - bool ReadApertureMacro( char aBuff[GERBER_BUFZ], char* & text, + bool ReadApertureMacro( char *aBuff, char* & text, FILE * gerber_file ); diff --git a/gerbview/class_X2_gerber_attributes.cpp b/gerbview/class_X2_gerber_attributes.cpp index 0e08195ddd..52a00f88a3 100644 --- a/gerbview/class_X2_gerber_attributes.cpp +++ b/gerbview/class_X2_gerber_attributes.cpp @@ -35,10 +35,10 @@ * %TF.FileFunction,Copper,L1,Top*% * * Currently: - * .FileFunction .FileFunction Identifies the file's function in the PCB. - * Other Standard Attributes, not yet used in Gerbview: - * .Part Identifies the part the file represents, e.g. a single PCB - * .MD5 Sets the MD5 file signature or checksum. + * .FileFunction .FileFunction Identifies the file's function in the PCB. + * Other Standard Attributes, not yet used in Gerbview: + * .Part Identifies the part the file represents, e.g. a single PCB + * .MD5 Sets the MD5 file signature or checksum. */ #include @@ -46,7 +46,7 @@ /* * class X2_ATTRIBUTE - * The attribute value consists of a number of substrings separated by a "," + * The attribute value consists of a number of substrings separated by a comma */ X2_ATTRIBUTE::X2_ATTRIBUTE() diff --git a/gerbview/class_X2_gerber_attributes.h b/gerbview/class_X2_gerber_attributes.h index fe77535b27..38701cc3f6 100644 --- a/gerbview/class_X2_gerber_attributes.h +++ b/gerbview/class_X2_gerber_attributes.h @@ -38,17 +38,17 @@ * %TF.FileFunction,Copper,L1,Top*% * * Currently: - * .FileFunction .FileFunction Identifies the file's function in the PCB. - * Other Standard Attributes, not yet used in Gerbview: - * .Part Identifies the part the file represents, e.g. a single PCB - * .MD5 Sets the MD5 file signature or checksum. + * .FileFunction .FileFunction Identifies the file's function in the PCB. + * Other Standard Attributes, not yet used in Gerbview: + * .Part Identifies the part the file represents, e.g. a single PCB + * .MD5 Sets the MD5 file signature or checksum. */ #include /** * class X2_ATTRIBUTE - * The attribute value consists of a number of substrings separated by a "," + * The attribute value consists of a number of substrings separated by a comma */ class X2_ATTRIBUTE diff --git a/gerbview/class_gbr_layer_box_selector.cpp b/gerbview/class_gbr_layer_box_selector.cpp index 5c6e1b571a..588f6d8d16 100644 --- a/gerbview/class_gbr_layer_box_selector.cpp +++ b/gerbview/class_gbr_layer_box_selector.cpp @@ -31,10 +31,8 @@ #include #include -#include #include #include -#include #include diff --git a/gerbview/class_gbr_layout.cpp b/gerbview/class_gbr_layout.cpp index 427cab12ed..9951ee8ef6 100644 --- a/gerbview/class_gbr_layout.cpp +++ b/gerbview/class_gbr_layout.cpp @@ -27,11 +27,7 @@ * @brief GBR_LAYOUT class functions. */ -#include -#include - #include -#include #include GBR_LAYOUT::GBR_LAYOUT() diff --git a/gerbview/class_gbr_screen.cpp b/gerbview/class_gbr_screen.cpp index 2cd2e7f1e9..73e0901eac 100644 --- a/gerbview/class_gbr_screen.cpp +++ b/gerbview/class_gbr_screen.cpp @@ -30,9 +30,9 @@ #include #include #include -#include #include + #define DMIL_GRID( x ) wxRealPoint( x * IU_PER_DECIMILS,\ x * IU_PER_DECIMILS ) #define MM_GRID( x ) wxRealPoint( x * IU_PER_MM,\ diff --git a/gerbview/class_gbr_screen.h b/gerbview/class_gbr_screen.h index 19b5f90a4c..799058bd45 100644 --- a/gerbview/class_gbr_screen.h +++ b/gerbview/class_gbr_screen.h @@ -29,14 +29,13 @@ #ifndef CLASS_GBR_SCREEN_H_ #define CLASS_GBR_SCREEN_H_ - #include + #include #include #define ZOOM_FACTOR( x ) ( x * IU_PER_DECIMILS ) - /* Handle info to display a board */ class GBR_SCREEN : public BASE_SCREEN { @@ -47,15 +46,10 @@ public: * @param aPageSizeIU is the size of the initial paper page in internal units. */ GBR_SCREEN( const wxSize& aPageSizeIU ); - ~GBR_SCREEN(); GBR_SCREEN* Next() const { return static_cast( Pnext ); } -// void SetNextZoom(); -// void SetPreviousZoom(); -// void SetLastZoom(); - virtual int MilsToIuScalar(); /** diff --git a/gerbview/class_gerber_draw_item.cpp b/gerbview/class_gerber_draw_item.cpp index b91539560c..30fb3f37c8 100644 --- a/gerbview/class_gerber_draw_item.cpp +++ b/gerbview/class_gerber_draw_item.cpp @@ -31,11 +31,9 @@ #include #include #include -#include #include - -#include #include + #include #include diff --git a/gerbview/class_gerbview_layer_widget.cpp b/gerbview/class_gerbview_layer_widget.cpp index 600e3d36fe..20718de0e6 100644 --- a/gerbview/class_gerbview_layer_widget.cpp +++ b/gerbview/class_gerbview_layer_widget.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2004-2010 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2010 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 2010 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2016 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -41,7 +40,6 @@ #include #include #include -#include /* diff --git a/gerbview/controle.cpp b/gerbview/controle.cpp index fc98571378..6d275c15d2 100644 --- a/gerbview/controle.cpp +++ b/gerbview/controle.cpp @@ -27,9 +27,7 @@ */ #include -#include #include -#include #include diff --git a/gerbview/dcode.cpp b/gerbview/dcode.cpp index 8063b81b0c..6ca94015f3 100644 --- a/gerbview/dcode.cpp +++ b/gerbview/dcode.cpp @@ -31,18 +31,13 @@ #include #include #include -#include -#include #include -#include -#include -#include #include -#include #include +#include -#define DEFAULT_SIZE 100 +#define DCODE_DEFAULT_SIZE Millimeter2iu( 0.1 ) /* Format Gerber: NOTES: * Tools and D_CODES @@ -82,8 +77,8 @@ D_CODE::~D_CODE() void D_CODE::Clear_D_CODE_Data() { - m_Size.x = DEFAULT_SIZE; - m_Size.y = DEFAULT_SIZE; + m_Size.x = DCODE_DEFAULT_SIZE; + m_Size.y = DCODE_DEFAULT_SIZE; m_Shape = APT_CIRCLE; m_Drill.x = m_Drill.y = 0; m_DrillShape = APT_DEF_NO_HOLE; @@ -155,62 +150,6 @@ int D_CODE::GetShapeDim( GERBER_DRAW_ITEM* aParent ) } -void GERBVIEW_FRAME::CopyDCodesSizeToItems() -{ - static D_CODE dummy( 999 ); //Used if D_CODE not found in list - - GERBER_DRAW_ITEM* gerb_item = GetItemsList(); - for( ; gerb_item; gerb_item = gerb_item->Next() ) - { - D_CODE* dcode = gerb_item->GetDcodeDescr(); - wxASSERT( dcode ); - if( dcode == NULL ) - dcode = &dummy; - - dcode->m_InUse = true; - - gerb_item->m_Size = dcode->m_Size; - - if( // Line Item - (gerb_item->m_Shape == GBR_SEGMENT ) /* rectilinear segment */ - || (gerb_item->m_Shape == GBR_ARC ) /* segment arc (rounded tips) */ - || (gerb_item->m_Shape == GBR_CIRCLE ) /* segment in a circle (ring) */ - ) - { - } - else // Spots ( Flashed Items ) - { - switch( dcode->m_Shape ) - { - case APT_CIRCLE: /* spot round */ - gerb_item->m_Shape = GBR_SPOT_CIRCLE; - break; - - case APT_OVAL: /* spot oval*/ - gerb_item->m_Shape = GBR_SPOT_OVAL; - break; - - case APT_RECT: /* spot rect*/ - gerb_item->m_Shape = GBR_SPOT_RECT; - break; - - case APT_POLYGON: - gerb_item->m_Shape = GBR_SPOT_POLY; - break; - - case APT_MACRO: /* spot defined by a macro */ - gerb_item->m_Shape = GBR_SPOT_MACRO; - break; - - default: - wxMessageBox( wxT( "GERBVIEW_FRAME::CopyDCodesSizeToItems() error" ) ); - break; - } - } - } -} - - void D_CODE::DrawFlashedShape( GERBER_DRAW_ITEM* aParent, EDA_RECT* aClipBox, wxDC* aDC, EDA_COLOR_T aColor, EDA_COLOR_T aAltColor, diff --git a/gerbview/draw_gerber_screen.cpp b/gerbview/draw_gerber_screen.cpp index ace9ef8cb4..ca2c676aaf 100644 --- a/gerbview/draw_gerber_screen.cpp +++ b/gerbview/draw_gerber_screen.cpp @@ -37,8 +37,6 @@ #include #include -#include -#include #include #include diff --git a/gerbview/events_called_functions.cpp b/gerbview/events_called_functions.cpp index c5a556654c..0d1d8f38ca 100644 --- a/gerbview/events_called_functions.cpp +++ b/gerbview/events_called_functions.cpp @@ -30,8 +30,6 @@ #include #include #include -#include -#include #include #include diff --git a/gerbview/excellon_read_drill_file.cpp b/gerbview/excellon_read_drill_file.cpp index e882e1585d..f548bfbeae 100644 --- a/gerbview/excellon_read_drill_file.cpp +++ b/gerbview/excellon_read_drill_file.cpp @@ -68,10 +68,6 @@ #include #include -#include -#include -#include -#include #include #include #include diff --git a/gerbview/export_to_pcbnew.cpp b/gerbview/export_to_pcbnew.cpp index 1b4de9f8db..6e39fd7b25 100644 --- a/gerbview/export_to_pcbnew.cpp +++ b/gerbview/export_to_pcbnew.cpp @@ -33,12 +33,9 @@ #include #include #include -#include -#include #include #include #include -#include #include #include #include @@ -50,8 +47,6 @@ extern const wxString GetPCBDefaultLayerName( LAYER_NUM aLayerNumber ); #define TO_PCB_UNIT( x ) ( x / IU_PER_MM) -#define TRACK_TYPE 0 - /* A helper class to export a Gerber set of files to Pcbnew */ class GBR_TO_PCB_EXPORTER diff --git a/gerbview/files.cpp b/gerbview/files.cpp index 024784af00..c20d8bfd12 100644 --- a/gerbview/files.cpp +++ b/gerbview/files.cpp @@ -29,10 +29,7 @@ #include #include #include -#include -#include -#include #include #include #include @@ -186,7 +183,7 @@ bool GERBVIEW_FRAME::LoadGerberFiles( const wxString& aFullFileName ) setActiveLayer( layer, false ); - if( Read_GERBER_File( filename.GetFullPath(), filename.GetFullPath() ) ) + if( Read_GERBER_File( filename.GetFullPath() ) ) { UpdateFileHistory( m_lastFileName ); diff --git a/gerbview/gerbview.cpp b/gerbview/gerbview.cpp index b12886951e..eb2c3eee55 100644 --- a/gerbview/gerbview.cpp +++ b/gerbview/gerbview.cpp @@ -30,19 +30,11 @@ #include #include #include -#include -#include #include -#include #include #include -#include - -#include -#include - // Colors for layers and items COLORS_DESIGN_SETTINGS g_ColorsSettings; @@ -122,7 +114,7 @@ KIFACE_I& Kiface() { return kiface; } // KIFACE_GETTER will not have name mangling due to declaration in kiway.h. MY_API( KIFACE* ) KIFACE_GETTER( int* aKIFACEversion, int aKiwayVersion, PGM_BASE* aProgram ) { - process = (PGM_BASE*) aProgram; + process = aProgram; return &kiface; } diff --git a/gerbview/gerbview.h b/gerbview/gerbview.h index d54ec58f0c..a1e81f3712 100644 --- a/gerbview/gerbview.h +++ b/gerbview/gerbview.h @@ -41,11 +41,6 @@ /// List of page sizes extern const wxChar* g_GerberPageSizeList[8]; -// Type of photoplotter action: -#define GERB_ACTIVE_DRAW 1 // Activate light (lower pen) -#define GERB_STOP_DRAW 2 // Extinguish light (lift pen) -#define GERB_FLASH 3 // Flash - // number fo draw layers in Gerbview #define GERBER_DRAWLAYERS_COUNT 32 diff --git a/gerbview/gerbview_config.cpp b/gerbview/gerbview_config.cpp index 7bca894505..7d35e06ae4 100644 --- a/gerbview/gerbview_config.cpp +++ b/gerbview/gerbview_config.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include @@ -49,7 +48,6 @@ void GERBVIEW_FRAME::Process_Config( wxCommandEvent& event ) { int id = event.GetId(); - wxString FullFileName; switch( id ) { diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index 9701010eee..715997b551 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -41,15 +40,12 @@ #include #include -#include -#include #include #include #include #include #include #include -#include // Config keywords diff --git a/gerbview/gerbview_frame.h b/gerbview/gerbview_frame.h index 5946880b73..186498ea83 100644 --- a/gerbview/gerbview_frame.h +++ b/gerbview/gerbview_frame.h @@ -118,7 +118,7 @@ public: { GERBER_DRAW_ITEM* item = GetGerberLayout()->m_Drawings; - return (GERBER_DRAW_ITEM*) item; + return item; } /** @@ -525,10 +525,8 @@ public: */ bool OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosition, EDA_ITEM* aItem = NULL ); - GERBER_DRAW_ITEM* GerberGeneralLocateAndDisplay(); GERBER_DRAW_ITEM* Locate( const wxPoint& aPosition, int typeloc ); - void Process_Settings( wxCommandEvent& event ); void Process_Config( wxCommandEvent& event ); void InstallGerberOptionsDialog( wxCommandEvent& event ); @@ -618,9 +616,7 @@ public: * @return true if file was opened successfully. */ bool LoadGerberFiles( const wxString& aFileName ); - int ReadGerberFile( FILE* File, bool Append ); - bool Read_GERBER_File( const wxString& GERBER_FullFileName, - const wxString& D_Code_FullFileName ); + bool Read_GERBER_File( const wxString& GERBER_FullFileName ); /** * function LoadDrllFiles @@ -638,7 +634,6 @@ public: /** * Set Size Items (Lines, Flashes) from DCodes List */ - void CopyDCodesSizeToItems(); void Liste_D_Codes(); // PCB handling diff --git a/gerbview/hotkeys.cpp b/gerbview/hotkeys.cpp index eae1ad0bc2..d6ff38176c 100644 --- a/gerbview/hotkeys.cpp +++ b/gerbview/hotkeys.cpp @@ -28,14 +28,12 @@ #include #include -#include #include #include #include #include #include -#include /* How to add a new hotkey: diff --git a/gerbview/init_gbr_drawlayers.cpp b/gerbview/init_gbr_drawlayers.cpp index 87773b0b1f..c9c9e0b23e 100644 --- a/gerbview/init_gbr_drawlayers.cpp +++ b/gerbview/init_gbr_drawlayers.cpp @@ -27,16 +27,12 @@ */ #include -#include #include #include -#include #include -#include #include #include -#include bool GERBVIEW_FRAME::Clear_DrawLayers( bool query ) { diff --git a/gerbview/locate.cpp b/gerbview/locate.cpp index f2fb2a4d50..1d1e2d9d4c 100644 --- a/gerbview/locate.cpp +++ b/gerbview/locate.cpp @@ -32,7 +32,6 @@ #include #include -#include /* localize a gerber item and return a pointer to it. diff --git a/gerbview/menubar.cpp b/gerbview/menubar.cpp index 6afd531697..b16d90ac62 100644 --- a/gerbview/menubar.cpp +++ b/gerbview/menubar.cpp @@ -30,13 +30,12 @@ #include -#include #include -#include "gerbview.h" #include "gerbview_frame.h" #include "gerbview_id.h" #include "hotkeys.h" +#include void GERBVIEW_FRAME::ReCreateMenuBar() diff --git a/gerbview/onleftclick.cpp b/gerbview/onleftclick.cpp index 55b47df5da..e25a7fdb69 100644 --- a/gerbview/onleftclick.cpp +++ b/gerbview/onleftclick.cpp @@ -24,14 +24,11 @@ #include #include -#include #include #include -#include #include #include -#include /* Process the command triggered by the left button of the mouse * currently: just display info in the message panel. diff --git a/gerbview/printout_control.cpp b/gerbview/printout_control.cpp index 1eb8ad1715..d707a4adad 100644 --- a/gerbview/printout_control.cpp +++ b/gerbview/printout_control.cpp @@ -28,18 +28,13 @@ */ -// Set this to 1 if you want to test PostScript printing under MSW. -#define wxTEST_POSTSCRIPT_IN_MSW 1 - #include #include #include #include -#include #include #include #include -#include #include @@ -190,10 +185,6 @@ void BOARD_PRINTOUT_CONTROLLER::DrawPage() double scalex, scaley; dc->GetUserScale( &scalex, &scaley ); - wxSize PlotAreaSizeInUserUnits; - PlotAreaSizeInUserUnits.x = KiROUND( PlotAreaSizeInPixels.x / scalex ); - PlotAreaSizeInUserUnits.y = KiROUND( PlotAreaSizeInPixels.y / scaley ); - // In some cases the plot origin is the centre of the board outline rather than the center // of the selected paper size. if( m_PrintParams.CenterOnBoardOutline() ) diff --git a/gerbview/readgerb.cpp b/gerbview/readgerb.cpp index 3a6f968e92..4553313f1b 100644 --- a/gerbview/readgerb.cpp +++ b/gerbview/readgerb.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -36,8 +35,7 @@ /* Read a gerber file, RS274D, RS274X or RS274X2 format. */ -bool GERBVIEW_FRAME::Read_GERBER_File( const wxString& GERBER_FullFileName, - const wxString& D_Code_FullFileName ) +bool GERBVIEW_FRAME::Read_GERBER_File( const wxString& GERBER_FullFileName ) { int G_command = 0; // command number for G commands like G04 int D_commande = 0; // command number for D commands like D02 diff --git a/gerbview/rs274_read_XY_and_IJ_coordinates.cpp b/gerbview/rs274_read_XY_and_IJ_coordinates.cpp index f9a2fb70ab..1f43cfa70b 100644 --- a/gerbview/rs274_read_XY_and_IJ_coordinates.cpp +++ b/gerbview/rs274_read_XY_and_IJ_coordinates.cpp @@ -25,8 +25,6 @@ #include #include -#include -#include #include #include diff --git a/gerbview/rs274d.cpp b/gerbview/rs274d.cpp index 1d35338833..b4a1a4823f 100644 --- a/gerbview/rs274d.cpp +++ b/gerbview/rs274d.cpp @@ -6,7 +6,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -32,8 +32,6 @@ #include #include #include -#include -#include #include #include diff --git a/gerbview/rs274x.cpp b/gerbview/rs274x.cpp index 6abdcf9fd7..98d732a35e 100644 --- a/gerbview/rs274x.cpp +++ b/gerbview/rs274x.cpp @@ -37,7 +37,7 @@ extern int ReadInt( char*& text, bool aSkipSeparator = true ); extern double ReadDouble( char*& text, bool aSkipSeparator = true ); -extern bool GetEndOfBlock( char buff[GERBER_BUFZ], char*& text, FILE* gerber_file ); +extern bool GetEndOfBlock( char* buff, char*& text, FILE* gerber_file ); #define CODE( x, y ) ( ( (x) << 8 ) + (y) ) @@ -128,7 +128,7 @@ static int ReadXCommand( char*& text ) } -bool GERBER_IMAGE::ReadRS274XCommand( char buff[GERBER_BUFZ], char*& text ) +bool GERBER_IMAGE::ReadRS274XCommand( char* buff, char*& text ) { bool ok = true; int code_command; @@ -181,9 +181,7 @@ exit: } -bool GERBER_IMAGE::ExecuteRS274XCommand( int command, - char buff[GERBER_BUFZ], - char*& text ) +bool GERBER_IMAGE::ExecuteRS274XCommand( int command, char* buff, char*& text ) { int code; int seq_len; // not used, just provided @@ -807,7 +805,7 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command, } dcode->m_Shape = APT_MACRO; - dcode->SetMacro( (APERTURE_MACRO*) pam ); + dcode->SetMacro( pam ); } break; @@ -824,7 +822,7 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command, } -bool GetEndOfBlock( char buff[GERBER_BUFZ], char*& text, FILE* gerber_file ) +bool GetEndOfBlock( char* buff, char*& text, FILE* gerber_file ) { for( ; ; ) { @@ -860,7 +858,7 @@ bool GetEndOfBlock( char buff[GERBER_BUFZ], char*& text, FILE* gerber_file ) * @param aFile = the opened GERBER file to read * @return a pointer to the beginning of the next line or NULL if end of file */ -static char* GetNextLine( char aBuff[GERBER_BUFZ], char* aText, FILE* aFile ) +static char* GetNextLine( char *aBuff, char* aText, FILE* aFile ) { for( ; ; ) { @@ -886,7 +884,7 @@ static char* GetNextLine( char aBuff[GERBER_BUFZ], char* aText, FILE* aFile ) } -bool GERBER_IMAGE::ReadApertureMacro( char buff[GERBER_BUFZ], +bool GERBER_IMAGE::ReadApertureMacro( char *buff, char*& text, FILE* gerber_file ) { diff --git a/gerbview/toolbars_gerber.cpp b/gerbview/toolbars_gerber.cpp index d6c4490e57..d2ae3ccaa0 100644 --- a/gerbview/toolbars_gerber.cpp +++ b/gerbview/toolbars_gerber.cpp @@ -31,7 +31,6 @@ #include #include -#include #include #include #include diff --git a/include/class_colors_design_settings.h b/include/class_colors_design_settings.h index 0cbc76b3b3..601526dec6 100644 --- a/include/class_colors_design_settings.h +++ b/include/class_colors_design_settings.h @@ -1,8 +1,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors. + * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 2016 KiCad Developers, see CHANGELOG.TXT for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -27,8 +27,9 @@ * @brief Handle colors used to draw all items or layers. */ -#ifndef _COLORS_DESIGN_SETTING_H -#define _COLORS_DESIGN_SETTING_H +#ifndef COLORS_DESIGN_SETTING_H +#define COLORS_DESIGN_SETTING_H +#include // definition of EDA_COLOR_T #include @@ -86,4 +87,4 @@ public: void SetAllColorsAs( EDA_COLOR_T aColor); }; -#endif // _COLORS_DESIGN_SETTING_H +#endif // COLORS_DESIGN_SETTING_H