Commit 8c36cbf4 authored by stambaughw's avatar stambaughw

Complete comment translation of cvpcb source and fix tool tip capitalization.

parent 56995b33
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* CVPCB: autosel.cpp */ /* CVPCB: autosel.cpp */
/**********************/ /**********************/
/* Routines de selection automatique des modules */ /* Routines for automatic selection of modules. */
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
...@@ -81,7 +81,7 @@ void WinEDA_CvpcbFrame::AssocieModule( wxCommandEvent& event ) ...@@ -81,7 +81,7 @@ void WinEDA_CvpcbFrame::AssocieModule( wxCommandEvent& event )
if( m_components.empty() ) if( m_components.empty() )
return; return;
/* recherche des equivalences a travers les fichiers possibles */ /* Find equivalents in all available files. */
for( ii = 0; ii < m_AliasLibNames.GetCount(); ii++ ) for( ii = 0; ii < m_AliasLibNames.GetCount(); ii++ )
{ {
fn = m_AliasLibNames[ii]; fn = m_AliasLibNames[ii];
...@@ -106,7 +106,6 @@ found in the default search paths." ), ...@@ -106,7 +106,6 @@ found in the default search paths." ),
continue; continue;
} }
/* lecture fichier n */
while( GetLine( file, Line, NULL, sizeof(Line) ) != NULL ) while( GetLine( file, Line, NULL, sizeof(Line) ) != NULL )
{ {
char* text = Line; char* text = Line;
...@@ -133,7 +132,7 @@ found in the default search paths." ), ...@@ -133,7 +132,7 @@ found in the default search paths." ),
fclose( file ); fclose( file );
} }
/* Display the number of footpint aliases. */ /* Display the number of footprint aliases. */
msg.Printf( _( "%d footprint aliases found." ), aliases.size() ); msg.Printf( _( "%d footprint aliases found." ), aliases.size() );
SetStatusText( msg, 0 ); SetStatusText( msg, 0 );
......
/***************************************/ /*************/
/** cfg.cpp : configuration de CVPCB **/ /** cfg.cpp **/
/***************************************/ /*************/
/* lit ou met a jour la configuration de CVPCB */
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
...@@ -52,20 +50,19 @@ PARAM_CFG_ARRAY& WinEDA_CvpcbFrame::GetProjectFileParameters( void ) ...@@ -52,20 +50,19 @@ PARAM_CFG_ARRAY& WinEDA_CvpcbFrame::GetProjectFileParameters( void )
/** /**
* lit la configuration * Reads the configuration
* 1 - lit cvpcb.cnf * 1 - bed cvpcb.cnf
* 2 - si non trouve lit <chemin de cvpcb.exe>/cvpcb.cnf * 2 - if not in path of <cvpcb.exe> / cvpcb.cnf
* 3 - si non trouve: init des variables aux valeurs par defaut * 3 - If not found: init variables to default values
* *
* Remarque: * Note:
* le chemin de l'executable cvpcb.exe doit etre dans BinDir * The path of the executable must be in cvpcb.exe.
* *
*/ */
void WinEDA_CvpcbFrame::LoadProjectFile( const wxString& FileName ) void WinEDA_CvpcbFrame::LoadProjectFile( const wxString& FileName )
{ {
wxFileName fn = FileName; wxFileName fn = FileName;
/* Init des valeurs par defaut */
m_ModuleLibNames.Clear(); m_ModuleLibNames.Clear();
m_AliasLibNames.Clear(); m_AliasLibNames.Clear();
...@@ -85,9 +82,6 @@ void WinEDA_CvpcbFrame::LoadProjectFile( const wxString& FileName ) ...@@ -85,9 +82,6 @@ void WinEDA_CvpcbFrame::LoadProjectFile( const wxString& FileName )
} }
/* fonction relai d'appel a Save_Config,
* la vraie fonction de sauvegarde de la config
*/
void WinEDA_CvpcbFrame::Update_Config( wxCommandEvent& event ) void WinEDA_CvpcbFrame::Update_Config( wxCommandEvent& event )
{ {
SaveProjectFile( m_NetlistFileName.GetFullPath() ); SaveProjectFile( m_NetlistFileName.GetFullPath() );
...@@ -106,7 +100,6 @@ void WinEDA_CvpcbFrame::SaveProjectFile( const wxString& fileName ) ...@@ -106,7 +100,6 @@ void WinEDA_CvpcbFrame::SaveProjectFile( const wxString& fileName )
if( dlg.ShowModal() == wxID_CANCEL ) if( dlg.ShowModal() == wxID_CANCEL )
return; return;
/* ecriture de la configuration */
wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP, wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP,
GetProjectFileParameters() ); GetProjectFileParameters() );
} }
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
PIN::PIN() PIN::PIN()
{ {
m_Index = 0; /* variable utilisee selon types de netlistes */ m_Index = 0; /* Variable used by types of netlists. */
m_Type = 0; /* code type electrique ( Entree Sortie Passive..) */ m_Type = 0; /* Electrical type. */
} }
bool operator<( const PIN& item1, const PIN& item2 ) bool operator<( const PIN& item1, const PIN& item2 )
......
This diff is collapsed.
/**********************************************/ /*********/
/* CVPCB : declaration des variables globales */ /* CVPCB */
/**********************************************/ /*********/
#ifndef __CVPCB_H__ #ifndef __CVPCB_H__
#define __CVPCB_H__ #define __CVPCB_H__
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
// config for footprints doc file acces // config for footprints doc file access
#define DEFAULT_FOOTPRINTS_LIST_FILENAME wxT( "footprints_doc/footprints.pdf" ) #define DEFAULT_FOOTPRINTS_LIST_FILENAME wxT( "footprints_doc/footprints.pdf" )
// Define print format to display a schematic component line // Define print format to display a schematic component line
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#define FILTERFOOTPRINTKEY "FilterFootprint" #define FILTERFOOTPRINTKEY "FilterFootprint"
/* Types de netliste: */ /* Net list types. */
#define TYPE_NON_SPECIFIE 0 #define TYPE_NON_SPECIFIE 0
#define TYPE_ORCADPCB2 1 #define TYPE_ORCADPCB2 1
#define TYPE_PCAD 2 #define TYPE_PCAD 2
...@@ -30,12 +30,12 @@ ...@@ -30,12 +30,12 @@
class PIN class PIN
{ {
public: public:
int m_Index; /* variable utilisee selon types de netlistes */ int m_Index; /* Type of net list. */
int m_Type; /* code type electrique ( Entree Sortie Passive..) */ int m_Type; /* Electrical connection type. */
wxString m_Net; /* Pointeur sur le texte nom de net */ wxString m_Net; /* Name of net. */
wxString m_Number; wxString m_Number;
wxString m_Name; wxString m_Name;
wxString m_Repere; /* utilise selon formats de netliste */ wxString m_Repere; /* Formats used by net lister. */
PIN(); PIN();
}; };
...@@ -55,14 +55,14 @@ extern bool same_pin_net( const PIN* item1, const PIN* item2 ); ...@@ -55,14 +55,14 @@ extern bool same_pin_net( const PIN* item1, const PIN* item2 );
class COMPONENT class COMPONENT
{ {
public: public:
int m_Num; /* Numero d'ordre */ int m_Num; /* Component number. */
int m_Multi; /* Nombre d' unites par boitier */ int m_Multi; /* Part if component has multiple parts. */
PIN_LIST m_Pins; /* pointeur sur la liste des Pins */ PIN_LIST m_Pins; /* List of component pins. */
wxString m_Reference; /* U3, R5 ... */ wxString m_Reference; /* Reference designator: U3, R5 ... */
wxString m_Value; /* 7400, 47K ... */ wxString m_Value; /* Value: 7400, 47K ... */
wxString m_TimeStamp; /* Signature temporelle ("00000000" si absente) */ wxString m_TimeStamp; /* Time stamp ("00000000" if absent) */
wxString m_Module; /* Nom du module (Package) corresp */ wxString m_Module; /* Footprint (module) name. */
wxString m_Repere; /* utilise selon formats de netliste */ wxString m_Repere; /* Net list format */
wxArrayString m_FootprintFilter; /* List of allowed footprints (wildcards wxArrayString m_FootprintFilter; /* List of allowed footprints (wildcards
* allowed ). If empty: no filtering */ * allowed ). If empty: no filtering */
...@@ -79,11 +79,11 @@ extern bool operator<( const COMPONENT& item1, const COMPONENT& item2 ); ...@@ -79,11 +79,11 @@ extern bool operator<( const COMPONENT& item1, const COMPONENT& item2 );
class FOOTPRINT class FOOTPRINT
{ {
public: public:
wxString m_Module; /* Nom du module */ wxString m_Module; /* Module name. */
wxString m_LibName; /* Nom de la librairie contenant ce module */ wxString m_LibName; /* Name of the library containing this module. */
int m_Num; /* Numero d'ordre pour affichage sur la liste */ int m_Num; /* Order number in the display list. */
wxString m_Doc; /* Doc associee */ wxString m_Doc; /* Footprint description. */
wxString m_KeyWord; /* Mots cles associes */ wxString m_KeyWord; /* Footprint key words. */
FOOTPRINT(); FOOTPRINT();
}; };
...@@ -93,7 +93,6 @@ typedef boost::ptr_vector< FOOTPRINT > FOOTPRINT_LIST; ...@@ -93,7 +93,6 @@ typedef boost::ptr_vector< FOOTPRINT > FOOTPRINT_LIST;
/* FOOTPRINT object list sort function. */ /* FOOTPRINT object list sort function. */
extern bool operator<( const FOOTPRINT& item1, const FOOTPRINT& item2 ); extern bool operator<( const FOOTPRINT& item1, const FOOTPRINT& item2 );
/* Gestion des noms des librairies */
extern const wxString FootprintAliasFileExtension; extern const wxString FootprintAliasFileExtension;
extern const wxString RetroFileExtension; extern const wxString RetroFileExtension;
extern const wxString ComponentFileExtension; extern const wxString ComponentFileExtension;
......
/***********************************************************/ /*********************************************************/
/* cvstruct.h : */ /* cvstruct.h */
/* descriptions des principales classes derivees utilisees */ /*********************************************************/
/***********************************************************/
#ifndef CVSTRUCT_H #ifndef CVSTRUCT_H
#define CVSTRUCT_H #define CVSTRUCT_H
...@@ -59,7 +58,7 @@ public: ...@@ -59,7 +58,7 @@ public:
FOOTPRINTS_LISTBOX* m_FootprintList; FOOTPRINTS_LISTBOX* m_FootprintList;
COMPONENTS_LISTBOX* m_ListCmp; COMPONENTS_LISTBOX* m_ListCmp;
WinEDA_DisplayFrame* DrawFrame; WinEDA_DisplayFrame* DrawFrame;
WinEDA_Toolbar* m_HToolBar; // Toolbar horizontal haut d'ecran WinEDA_Toolbar* m_HToolBar;
wxFileName m_NetlistFileName; wxFileName m_NetlistFileName;
wxArrayString m_ModuleLibNames; wxArrayString m_ModuleLibNames;
wxArrayString m_AliasLibNames; wxArrayString m_AliasLibNames;
...@@ -76,7 +75,6 @@ protected: ...@@ -76,7 +75,6 @@ protected:
bool m_isEESchemaNetlist; bool m_isEESchemaNetlist;
PARAM_CFG_ARRAY m_projectFileParams; PARAM_CFG_ARRAY m_projectFileParams;
// Constructor and destructor
public: public:
WinEDA_CvpcbFrame( const wxString& title, WinEDA_CvpcbFrame( const wxString& title,
long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
...@@ -86,7 +84,7 @@ public: ...@@ -86,7 +84,7 @@ public:
void OnLeftDClick( wxListEvent& event ); void OnLeftDClick( wxListEvent& event );
void OnSelectComponent( wxListEvent& event ); void OnSelectComponent( wxListEvent& event );
void Update_Config( wxCommandEvent& event ); /* enregistrement de la config */ void Update_Config( wxCommandEvent& event );
void OnQuit( wxCommandEvent& event ); void OnQuit( wxCommandEvent& event );
void OnCloseWindow( wxCloseEvent& Event ); void OnCloseWindow( wxCloseEvent& Event );
void OnSize( wxSizeEvent& SizeEvent ); void OnSize( wxSizeEvent& SizeEvent );
...@@ -269,7 +267,8 @@ public: ...@@ -269,7 +267,8 @@ public:
* add a list of pickers to handle a list of items * add a list of pickers to handle a list of items
* @param aItemsList = the list of items modified by the command to undo * @param aItemsList = the list of items modified by the command to undo
* @param aTypeCommand = command type (see enum UndoRedoOpType) * @param aTypeCommand = command type (see enum UndoRedoOpType)
* @param aTransformPoint = the reference point of the transformation, for commands like move * @param aTransformPoint = the reference point of the transformation,
* for commands like move
*/ */
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
UndoRedoOpType aTypeCommand, UndoRedoOpType aTypeCommand,
......
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dialog_cvpcb_config.cpp // Name: dialog_cvpcb_config.cpp
// Author: jean-pierre Charras // Author: jean-pierre Charras
// Licence: gpl // Licence: gpl
...@@ -40,9 +39,7 @@ DIALOG_CVPCB_CONFIG::DIALOG_CVPCB_CONFIG( WinEDA_CvpcbFrame* parent ) : ...@@ -40,9 +39,7 @@ DIALOG_CVPCB_CONFIG::DIALOG_CVPCB_CONFIG( WinEDA_CvpcbFrame* parent ) :
} }
/*************************************/
void DIALOG_CVPCB_CONFIG::Init() void DIALOG_CVPCB_CONFIG::Init()
/*************************************/
{ {
wxString msg; wxString msg;
...@@ -73,15 +70,13 @@ void DIALOG_CVPCB_CONFIG::Init() ...@@ -73,15 +70,13 @@ void DIALOG_CVPCB_CONFIG::Init()
m_DefaultLibraryPathslistBox->Append( libpaths[ii] ); m_DefaultLibraryPathslistBox->Append( libpaths[ii] );
} }
// select the first path afer the current path project // select the first path after the current path project
if( libpaths.GetCount() > 1 ) if( libpaths.GetCount() > 1 )
m_DefaultLibraryPathslistBox->Select( 1 ); m_DefaultLibraryPathslistBox->Select( 1 );
} }
/******************************************************************/
void DIALOG_CVPCB_CONFIG::OnCancelClick( wxCommandEvent& event ) void DIALOG_CVPCB_CONFIG::OnCancelClick( wxCommandEvent& event )
/******************************************************************/
{ {
// Recreate the user lib path // Recreate the user lib path
if( m_LibPathChanged ) if( m_LibPathChanged )
...@@ -96,9 +91,7 @@ void DIALOG_CVPCB_CONFIG::OnCancelClick( wxCommandEvent& event ) ...@@ -96,9 +91,7 @@ void DIALOG_CVPCB_CONFIG::OnCancelClick( wxCommandEvent& event )
} }
/**************************************************************/
void DIALOG_CVPCB_CONFIG::OnOkClick( wxCommandEvent& event ) void DIALOG_CVPCB_CONFIG::OnOkClick( wxCommandEvent& event )
/**************************************************************/
{ {
m_Parent->m_DocModulesFileName = m_TextHelpModulesFileName->GetValue(); m_Parent->m_DocModulesFileName = m_TextHelpModulesFileName->GetValue();
...@@ -114,8 +107,8 @@ void DIALOG_CVPCB_CONFIG::OnOkClick( wxCommandEvent& event ) ...@@ -114,8 +107,8 @@ void DIALOG_CVPCB_CONFIG::OnOkClick( wxCommandEvent& event )
} }
} }
// Set new active library list if the lib list of if default path list
// Set new active library list if the lib list of if default path list was modified // was modified
if( m_LibListChanged || m_LibPathChanged ) if( m_LibListChanged || m_LibPathChanged )
{ {
// Recreate lib list // Recreate lib list
...@@ -138,21 +131,16 @@ void DIALOG_CVPCB_CONFIG::OnOkClick( wxCommandEvent& event ) ...@@ -138,21 +131,16 @@ void DIALOG_CVPCB_CONFIG::OnOkClick( wxCommandEvent& event )
} }
/**************************************************************/
void DIALOG_CVPCB_CONFIG::OnCloseWindow( wxCloseEvent& event ) void DIALOG_CVPCB_CONFIG::OnCloseWindow( wxCloseEvent& event )
/**************************************************************/
{ {
EndModal( 0 ); EndModal( 0 );
} }
/*********************************************************************/
void DIALOG_CVPCB_CONFIG::OnRemoveLibClick( wxCommandEvent& event )
/*********************************************************************/
/* Remove a library to the library list. /* Remove a library to the library list.
* The real list (g_LibName_List) is not changed, so the change can be cancelled * The real list (g_LibName_List) is not changed, so the change can be canceled
*/ */
void DIALOG_CVPCB_CONFIG::OnRemoveLibClick( wxCommandEvent& event )
{ {
int ii; int ii;
...@@ -170,15 +158,12 @@ void DIALOG_CVPCB_CONFIG::OnRemoveLibClick( wxCommandEvent& event ) ...@@ -170,15 +158,12 @@ void DIALOG_CVPCB_CONFIG::OnRemoveLibClick( wxCommandEvent& event )
} }
/**************************************************************************/
void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
/**************************************************************************/
/* Insert or add a library to the library list: /* Insert or add a library to the library list:
* The new library is put in list before (insert button) the selection, * The new library is put in list before (insert button) the selection,
* or added (add button) to end of list * or added (add button) to end of list
* The real list (g_LibName_List) is not changed, so the change can be cancelled * The real list (g_LibName_List) is not changed, so the change can be canceled
*/ */
void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
{ {
int ii; int ii;
wxString libfilename, wildcard; wxString libfilename, wildcard;
...@@ -235,7 +220,7 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) ...@@ -235,7 +220,7 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
fn.SetExt(wxEmptyString); fn.SetExt(wxEmptyString);
libfilename = fn.GetFullPath(); libfilename = fn.GetFullPath();
//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;
...@@ -254,16 +239,14 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) ...@@ -254,16 +239,14 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
} }
/***********************************************************************/
void DIALOG_CVPCB_CONFIG::OnAddOrInsertPath( wxCommandEvent& event ) void DIALOG_CVPCB_CONFIG::OnAddOrInsertPath( wxCommandEvent& event )
/***********************************************************************/
{ {
wxString path = wxGetApp().ReturnLastVisitedLibraryPath(); wxString path = wxGetApp().ReturnLastVisitedLibraryPath();
bool select = EDA_DirectorySelector( _( "Default Path for Libraries" ), /* Titre de la fenetre */ bool select = EDA_DirectorySelector( _( "Default Path for Libraries" ),
path, /* Chemin par defaut */ path,
wxDD_DEFAULT_STYLE, wxDD_DEFAULT_STYLE,
this, /* parent frame */ this,
wxDefaultPosition ); wxDefaultPosition );
if( !select ) if( !select )
...@@ -303,9 +286,7 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertPath( wxCommandEvent& event ) ...@@ -303,9 +286,7 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertPath( wxCommandEvent& event )
} }
/***********************************************************************/
void DIALOG_CVPCB_CONFIG::OnRemoveUserPath( wxCommandEvent& event ) void DIALOG_CVPCB_CONFIG::OnRemoveUserPath( wxCommandEvent& event )
/***********************************************************************/
{ {
int ii = m_listUserPaths->GetSelection(); int ii = m_listUserPaths->GetSelection();
...@@ -328,9 +309,7 @@ void DIALOG_CVPCB_CONFIG::OnRemoveUserPath( wxCommandEvent& event ) ...@@ -328,9 +309,7 @@ void DIALOG_CVPCB_CONFIG::OnRemoveUserPath( wxCommandEvent& event )
} }
/**************************************************************************/
void DIALOG_CVPCB_CONFIG::OnBrowseModDocFile( wxCommandEvent& event ) void DIALOG_CVPCB_CONFIG::OnBrowseModDocFile( wxCommandEvent& event )
/**************************************************************************/
{ {
wxString FullFileName; wxString FullFileName;
wxString docpath, filename; wxString docpath, filename;
......
This diff is collapsed.
/*********************************************************************/ /**********************/
/** setvisu() : initialisations de l'ecran d'affichage du composant **/ /** displayframe.cpp **/
/*********************************************************************/ /**********************/
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
...@@ -17,16 +17,12 @@ ...@@ -17,16 +17,12 @@
/* /*
* NOTE: There is something in 3d_viewer.h that causes a compiler error in * NOTE: There is something in 3d_viewer.h that causes a compiler error in
* <boost/foreach.hpp> in Linux so move it after cvpcb.h where it is * <boost/foreach.hpp> in Linux so move it after cvpcb.h where it is
* included to prevent the error from occuring. * included to prevent the error from occurring.
*/ */
#include "3d_viewer.h" #include "3d_viewer.h"
/*****************************************************************/
/* Construction de la table des evenements pour WinEDA_DrawFrame */
/*****************************************************************/
BEGIN_EVENT_TABLE( WinEDA_DisplayFrame, WinEDA_BasePcbFrame ) BEGIN_EVENT_TABLE( WinEDA_DisplayFrame, WinEDA_BasePcbFrame )
EVT_CLOSE( WinEDA_DisplayFrame::OnCloseWindow ) EVT_CLOSE( WinEDA_DisplayFrame::OnCloseWindow )
EVT_SIZE( WinEDA_DrawFrame::OnSize ) EVT_SIZE( WinEDA_DrawFrame::OnSize )
...@@ -61,14 +57,15 @@ WinEDA_DisplayFrame::WinEDA_DisplayFrame( WinEDA_CvpcbFrame* father, ...@@ -61,14 +57,15 @@ WinEDA_DisplayFrame::WinEDA_DisplayFrame( WinEDA_CvpcbFrame* father,
SetBaseScreen( new PCB_SCREEN() ); SetBaseScreen( new PCB_SCREEN() );
LoadSettings(); LoadSettings();
// Initilialize grid id to a default value if not found in config or bad: // Internalize grid id to a default value if not found in config or bad:
if( (m_LastGridSizeId <= 0) || if( (m_LastGridSizeId <= 0) ||
(m_LastGridSizeId < (ID_POPUP_GRID_USER - ID_POPUP_GRID_LEVEL_1000)) ) (m_LastGridSizeId < (ID_POPUP_GRID_USER - ID_POPUP_GRID_LEVEL_1000)) )
m_LastGridSizeId = ID_POPUP_GRID_LEVEL_500 - ID_POPUP_GRID_LEVEL_1000; m_LastGridSizeId = ID_POPUP_GRID_LEVEL_500 - ID_POPUP_GRID_LEVEL_1000;
// Initialize some display options // Initialize some display options
DisplayOpt.DisplayPadIsol = false; // Pad clearance has no meaning here DisplayOpt.DisplayPadIsol = false; // Pad clearance has no meaning here
DisplayOpt.ShowTrackClearanceMode = 0; // tracks and vias clearance has no meaning here DisplayOpt.ShowTrackClearanceMode = 0; /* tracks and vias clearance has
* no meaning here. */
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
...@@ -78,9 +75,7 @@ WinEDA_DisplayFrame::WinEDA_DisplayFrame( WinEDA_CvpcbFrame* father, ...@@ -78,9 +75,7 @@ WinEDA_DisplayFrame::WinEDA_DisplayFrame( WinEDA_CvpcbFrame* father,
} }
/******************************************/
WinEDA_DisplayFrame::~WinEDA_DisplayFrame() WinEDA_DisplayFrame::~WinEDA_DisplayFrame()
/******************************************/
{ {
delete GetBoard(); delete GetBoard();
...@@ -91,13 +86,10 @@ WinEDA_DisplayFrame::~WinEDA_DisplayFrame() ...@@ -91,13 +86,10 @@ WinEDA_DisplayFrame::~WinEDA_DisplayFrame()
} }
/************************************************************/
void WinEDA_DisplayFrame::OnCloseWindow( wxCloseEvent& event )
/************************************************************/
/* Called when the frame is closed /* Called when the frame is closed
* Save current settings (frame position and size * Save current settings (frame position and size
*/ */
void WinEDA_DisplayFrame::OnCloseWindow( wxCloseEvent& event )
{ {
wxPoint pos; wxPoint pos;
wxSize size; wxSize size;
...@@ -110,16 +102,12 @@ void WinEDA_DisplayFrame::OnCloseWindow( wxCloseEvent& event ) ...@@ -110,16 +102,12 @@ void WinEDA_DisplayFrame::OnCloseWindow( wxCloseEvent& event )
} }
/************************************************/
void WinEDA_DisplayFrame::ReCreateVToolbar() void WinEDA_DisplayFrame::ReCreateVToolbar()
/************************************************/
{ {
} }
/************************************************/
void WinEDA_DisplayFrame::ReCreateHToolbar() void WinEDA_DisplayFrame::ReCreateHToolbar()
/************************************************/
{ {
if( m_HToolBar != NULL ) if( m_HToolBar != NULL )
return; return;
...@@ -161,38 +149,29 @@ void WinEDA_DisplayFrame::ReCreateHToolbar() ...@@ -161,38 +149,29 @@ void WinEDA_DisplayFrame::ReCreateHToolbar()
} }
/*******************************************/
void WinEDA_DisplayFrame::SetToolbars() void WinEDA_DisplayFrame::SetToolbars()
/*******************************************/
{ {
} }
/*************************************************************************/
void WinEDA_DisplayFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) void WinEDA_DisplayFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
/*************************************************************************/
{ {
} }
/*************************************************************************/
void WinEDA_DisplayFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) void WinEDA_DisplayFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
/*************************************************************************/
{ {
} }
/*********************************************************************************/ bool WinEDA_DisplayFrame::OnRightClick( const wxPoint& MousePos,
bool WinEDA_DisplayFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) wxMenu* PopMenu )
/*********************************************************************************/
{ {
return true; return true;
} }
/****************************************************************/
void WinEDA_DisplayFrame::GeneralControle( wxDC* DC, wxPoint Mouse ) void WinEDA_DisplayFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
/****************************************************************/
{ {
wxRealPoint delta; wxRealPoint delta;
int flagcurseur = 0; int flagcurseur = 0;
...@@ -325,7 +304,7 @@ void WinEDA_DisplayFrame::Show3D_Frame( wxCommandEvent& event ) ...@@ -325,7 +304,7 @@ void WinEDA_DisplayFrame::Show3D_Frame( wxCommandEvent& event )
m_Draw3DFrame->Show( TRUE ); m_Draw3DFrame->Show( TRUE );
} }
/* Virtual fonction needed by the PCB_SCREEN class derived from BASE_SCREEN /* Virtual function needed by the PCB_SCREEN class derived from BASE_SCREEN
* this is a virtual pure function in BASE_SCREEN * this is a virtual pure function in BASE_SCREEN
* do nothing in cvpcb * do nothing in cvpcb
* could be removed later * could be removed later
......
/***************/ /*****************/
/* genstf() */ /* genequiv.cpp */
/***************/ /*****************/
/* genere le fichier STF type 'ref' 'nom_empreinte' pour DRAFT */
#include "fctsys.h" #include "fctsys.h"
#include "wxstruct.h" #include "wxstruct.h"
...@@ -24,7 +22,6 @@ void WinEDA_CvpcbFrame::WriteStuffList( wxCommandEvent& event ) ...@@ -24,7 +22,6 @@ void WinEDA_CvpcbFrame::WriteStuffList( wxCommandEvent& event )
if( m_components.empty() ) if( m_components.empty() )
return; return;
/* calcul du nom du fichier */
fn.SetExt( RetroFileExtension ); fn.SetExt( RetroFileExtension );
wxFileDialog dlg( this, wxT( "Save Stuff File" ), fn.GetPath(), wxFileDialog dlg( this, wxT( "Save Stuff File" ), fn.GetPath(),
...@@ -43,10 +40,8 @@ void WinEDA_CvpcbFrame::WriteStuffList( wxCommandEvent& event ) ...@@ -43,10 +40,8 @@ void WinEDA_CvpcbFrame::WriteStuffList( wxCommandEvent& event )
return; return;
} }
/* Generation de la liste */
BOOST_FOREACH( COMPONENT& component, m_components ) BOOST_FOREACH( COMPONENT& component, m_components )
{ {
/* gnration du composant si son empreinte est dfinie */
if( component.m_Module.empty() ) if( component.m_Module.empty() )
continue; continue;
fprintf( FileEquiv, "comp = \"%s\" module = \"%s\"\n", fprintf( FileEquiv, "comp = \"%s\" module = \"%s\"\n",
......
/***************/ /*****************/
/* genorcad() */ /* genorcad.cpp */
/***************/ /*****************/
/* /*
* Complte la netliste (*.NET) en y placant les ref *.lib FORMAT ORCADPCB * Create the netlist (* NET) by placing the *.lib ref FORMAT ORCADPCB
* La valeur (Part Value) est tronquee a 16 lettres * The value (share value) is truncated to 16 letters.
*/ */
#include "fctsys.h" #include "fctsys.h"
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
#define MAX_LEN_NETNAME 16 #define MAX_LEN_NETNAME 16
/* Routines locales */
static void TriPinsModule( COMPONENT* CurrentCmp ); static void TriPinsModule( COMPONENT* CurrentCmp );
static void ChangePinNet( wxString& PinNet, bool rightJustify ); static void ChangePinNet( wxString& PinNet, bool rightJustify );
/* Variables Locales */
int NetNumCode; /* Nombre utilise pour cree des NetNames lors de int NetNumCode; /* Number of used for NetNames created during
* reaffectation de NetNames */ * reallocation of NetNames. */
int genorcad( bool rightJustify ) int genorcad( bool rightJustify )
{ {
...@@ -35,10 +35,6 @@ int genorcad( bool rightJustify ) ...@@ -35,10 +35,6 @@ int genorcad( bool rightJustify )
fprintf( dest, "( { Netlist by %s, date = %s }\n", fprintf( dest, "( { Netlist by %s, date = %s }\n",
CONV_TO_UTF8( Title ), Line ); CONV_TO_UTF8( Title ), Line );
/***********************/
/* Lecture de la liste */
/***********************/
CurrentCmp = BaseListeCmp; CurrentCmp = BaseListeCmp;
for( ; CurrentCmp != NULL; CurrentCmp = CurrentCmp->Pnext ) for( ; CurrentCmp != NULL; CurrentCmp = CurrentCmp->Pnext )
{ {
...@@ -52,13 +48,11 @@ int genorcad( bool rightJustify ) ...@@ -52,13 +48,11 @@ int genorcad( bool rightJustify )
fprintf( dest, " %s ", CONV_TO_UTF8( CurrentCmp->m_Reference ) ); fprintf( dest, " %s ", CONV_TO_UTF8( CurrentCmp->m_Reference ) );
/* placement de la valeur */
fprintf( dest, "%s\n", CONV_TO_UTF8( CurrentCmp->m_Value ) ); fprintf( dest, "%s\n", CONV_TO_UTF8( CurrentCmp->m_Value ) );
/* Tri des pins */ /* Sort pins. */
TriPinsModule( CurrentCmp ); TriPinsModule( CurrentCmp );
/* Placement de la liste des pins */
Pin = CurrentCmp->m_Pins; Pin = CurrentCmp->m_Pins;
for( ; Pin != NULL; Pin = Pin->Pnext ) for( ; Pin != NULL; Pin = Pin->Pnext )
{ {
...@@ -82,12 +76,8 @@ int genorcad( bool rightJustify ) ...@@ -82,12 +76,8 @@ int genorcad( bool rightJustify )
} }
/***********************************************/ /* Sort pins */
static void TriPinsModule( COMPONENT* CurrentCmp ) static void TriPinsModule( COMPONENT* CurrentCmp )
/***********************************************/
/* Tri et controle des pins du module CurrentCmp
*/
{ {
PIN* Pin, * NextPin, ** BasePin; PIN* Pin, * NextPin, ** BasePin;
int nbpins = 0, ii; int nbpins = 0, ii;
...@@ -96,11 +86,9 @@ static void TriPinsModule( COMPONENT* CurrentCmp ) ...@@ -96,11 +86,9 @@ static void TriPinsModule( COMPONENT* CurrentCmp )
if( Pin == NULL ) if( Pin == NULL )
return; return;
/* comptage des pins */
for( ; Pin != NULL; Pin = Pin->Pnext ) for( ; Pin != NULL; Pin = Pin->Pnext )
nbpins++; nbpins++;
/* Tri des pins: etablissement de la liste des pointeurs */
BasePin = (PIN**) MyZMalloc( nbpins * sizeof(PIN*) ); BasePin = (PIN**) MyZMalloc( nbpins * sizeof(PIN*) );
Pin = CurrentCmp->m_Pins; Pin = CurrentCmp->m_Pins;
...@@ -109,10 +97,8 @@ static void TriPinsModule( COMPONENT* CurrentCmp ) ...@@ -109,10 +97,8 @@ static void TriPinsModule( COMPONENT* CurrentCmp )
BasePin[ii] = Pin; BasePin[ii] = Pin;
} }
/* Tri des Pins */
qsort( BasePin, nbpins, sizeof( COMPONENT*), PinCompare ); qsort( BasePin, nbpins, sizeof( COMPONENT*), PinCompare );
/* Remise a jour des pointeurs chaines */
for( ii = 0; ii < nbpins - 1; ii++ ) for( ii = 0; ii < nbpins - 1; ii++ )
{ {
BasePin[ii]->Pnext = BasePin[ii + 1]; BasePin[ii]->Pnext = BasePin[ii + 1];
...@@ -123,7 +109,7 @@ static void TriPinsModule( COMPONENT* CurrentCmp ) ...@@ -123,7 +109,7 @@ static void TriPinsModule( COMPONENT* CurrentCmp )
MyFree( BasePin ); MyFree( BasePin );
/* Elimination des redondances */ /* Remove duplicate pins. */
Pin = CurrentCmp->m_Pins; Pin = CurrentCmp->m_Pins;
while( Pin != NULL ) while( Pin != NULL )
{ {
...@@ -134,7 +120,7 @@ static void TriPinsModule( COMPONENT* CurrentCmp ) ...@@ -134,7 +120,7 @@ static void TriPinsModule( COMPONENT* CurrentCmp )
{ {
Pin = Pin->Pnext; continue; Pin = Pin->Pnext; continue;
} }
/* 2 pins successives ont le meme numero */ /* Successive 2 pins have the same number. */
if( Pin->m_PinNet != NextPin->m_PinNet ) if( Pin->m_PinNet != NextPin->m_PinNet )
{ {
wxString msg; wxString msg;
...@@ -150,13 +136,12 @@ static void TriPinsModule( COMPONENT* CurrentCmp ) ...@@ -150,13 +136,12 @@ static void TriPinsModule( COMPONENT* CurrentCmp )
} }
/*******************************************/ /* **** JP translate ****
static void ChangePinNet( wxString& PinNet, bool rightJustify ) *
/*******************************************/ * Change le NetName PinNet par un nom compose des 8 derniers codes de PinNet
* suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999
/* Change le NetName PinNet par un nom compose des 8 derniers codes de PinNet
* suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999
*/ */
static void ChangePinNet( wxString& PinNet, bool rightJustify )
{ {
PIN* Pin; PIN* Pin;
COMPONENT* CurrentCmp; COMPONENT* CurrentCmp;
...@@ -166,11 +151,11 @@ static void ChangePinNet( wxString& PinNet, bool rightJustify ) ...@@ -166,11 +151,11 @@ static void ChangePinNet( wxString& PinNet, bool rightJustify )
OldName = PinNet; OldName = PinNet;
ii = PinNet.Len(); ii = PinNet.Len();
if( rightJustify ) /* On conserve les 8 dernieres lettres du nom */ if( rightJustify ) /* Retain the last 8 letters of the name. */
{ {
NewName = OldName.Right( 8 ); NewName << NetNumCode; NewName = OldName.Right( 8 ); NewName << NetNumCode;
} }
else /* On conserve les 8 premieres lettres du nom */ else /* Retains the 8 first letters of the name. */
{ {
NewName = OldName.Left( 8 ); NewName << NetNumCode; NewName = OldName.Left( 8 ); NewName << NetNumCode;
} }
......
/*******************************************************************/ /**************/
/* CVPCB: Routines de base : */ /* init.cpp */
/* lecture Netliste et creation des fenetres composants et modules */ /**************/
/*******************************************************************/
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
...@@ -15,12 +14,9 @@ ...@@ -15,12 +14,9 @@
#include "cvstruct.h" #include "cvstruct.h"
/* routines locales : */
/* /*
* - Affecte un module au composant selectionne * Set the module to the selected component
* - Selectionne le composant suivant * Selects the next component
*/ */
void WinEDA_CvpcbFrame::SetNewPkg( const wxString& package ) void WinEDA_CvpcbFrame::SetNewPkg( const wxString& package )
{ {
...@@ -49,7 +45,8 @@ void WinEDA_CvpcbFrame::SetNewPkg( const wxString& package ) ...@@ -49,7 +45,8 @@ void WinEDA_CvpcbFrame::SetNewPkg( const wxString& package )
Component->m_Module = package; Component->m_Module = package;
Line.Printf( CMP_FORMAT, NumCmp + 1, Line.Printf( CMP_FORMAT, NumCmp + 1,
GetChars( Component->m_Reference ), GetChars( Component->m_Value ), GetChars( Component->m_Reference ),
GetChars( Component->m_Value ),
GetChars( Component->m_Module ) ); GetChars( Component->m_Module ) );
m_modified = true; m_modified = true;
...@@ -70,9 +67,8 @@ void WinEDA_CvpcbFrame::SetNewPkg( const wxString& package ) ...@@ -70,9 +67,8 @@ void WinEDA_CvpcbFrame::SetNewPkg( const wxString& package )
} }
/* /*
* Lecture de la netliste selon format, ainsi que du fichier des composants * Read the netlist format and file components.
*/ */
bool WinEDA_CvpcbFrame::ReadNetList() bool WinEDA_CvpcbFrame::ReadNetList()
{ {
...@@ -89,7 +85,6 @@ bool WinEDA_CvpcbFrame::ReadNetList() ...@@ -89,7 +85,6 @@ bool WinEDA_CvpcbFrame::ReadNetList()
return false; return false;
} }
/* lecture des correspondances */
LoadComponentFile( m_NetlistFileName.GetFullPath(), m_components ); LoadComponentFile( m_NetlistFileName.GetFullPath(), m_components );
if( m_ListCmp == NULL ) if( m_ListCmp == NULL )
...@@ -120,7 +115,7 @@ bool WinEDA_CvpcbFrame::ReadNetList() ...@@ -120,7 +115,7 @@ bool WinEDA_CvpcbFrame::ReadNetList()
m_undefinedComponentCnt ); m_undefinedComponentCnt );
SetStatusText( msg, 1 ); SetStatusText( msg, 1 );
/* Mise a jour du titre de la fenetre principale */ /* Update the title of the main window. */
SetTitle( wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion() + SetTitle( wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion() +
wxT( " " ) + m_NetlistFileName.GetFullPath() ); wxT( " " ) + m_NetlistFileName.GetFullPath() );
return true; return true;
...@@ -128,9 +123,9 @@ bool WinEDA_CvpcbFrame::ReadNetList() ...@@ -128,9 +123,9 @@ bool WinEDA_CvpcbFrame::ReadNetList()
/* /*
* Sauvegarde des fichiers netliste et cmp * Backup and NetList cmp
* Le nom complet du fichier Netliste doit etre dans FFileName. * The full name of the netlist file must be in FFileName.
* Le nom du fichier cmp en est deduit * The file name is deducted in cmp
*/ */
int WinEDA_CvpcbFrame::SaveNetList( const wxString& fileName ) int WinEDA_CvpcbFrame::SaveNetList( const wxString& fileName )
{ {
...@@ -158,7 +153,7 @@ int WinEDA_CvpcbFrame::SaveNetList( const wxString& fileName ) ...@@ -158,7 +153,7 @@ int WinEDA_CvpcbFrame::SaveNetList( const wxString& fileName )
if( netlist == 0 ) if( netlist == 0 )
{ {
DisplayError( this, _( "Unable to create netlist file" ) ); DisplayError( this, _( "Unable to create net list file" ) );
return 0; return 0;
} }
......
/**************/ /***************/
/* listlib.cpp */ /* listlib.cpp */
/**************/ /**(************/
/* /*
* cherche toutes les ref <chemin lib>*.??? si nom fichier prsent, * Searches for all ref <path lib> *.??? if offering their file name,
* ou examine <chemin lib>[MODULE.LIB] * or reviews <path lib> [MODULE.LIB]
*/ */
#include "fctsys.h" #include "fctsys.h"
#include "wxstruct.h" #include "wxstruct.h"
#include "common.h" #include "common.h"
...@@ -25,26 +25,25 @@ ...@@ -25,26 +25,25 @@
static wxString s_files_not_found; static wxString s_files_not_found;
static wxString s_files_invalid; static wxString s_files_invalid;
/* routines locales : */
static void ReadDocLib( const wxString& ModLibName, FOOTPRINT_LIST& list ); static void ReadDocLib( const wxString& ModLibName, FOOTPRINT_LIST& list );
/** /**
* Routine lisant la liste des librairies, et generant la liste chainee * Read the list of libraries and generate a list modules.
* des modules disponibles
* *
* Module descr format: * Module description format:
* $MODULE c64acmd * $MODULE c64acmd
* Li c64acmd * Li c64acmd DIN connector
* Cd Connecteur DIN Europe 96 Contacts AC male droit * Cd Europe 96 Contact AC male right
* Kw PAD_CONN DIN * Kw PAD_CONN DIN
* $EndMODULE * $Endmodule
* *
*/ */
bool LoadFootprintFiles( const wxArrayString& libNames, bool LoadFootprintFiles( const wxArrayString& libNames,
FOOTPRINT_LIST& list ) FOOTPRINT_LIST& list )
{ {
FILE* file; /* pour lecture librairie */ FILE* file;
char buffer[1024]; char buffer[1024];
wxFileName filename; wxFileName filename;
int end; int end;
...@@ -68,13 +67,11 @@ bool LoadFootprintFiles( const wxArrayString& libNames, ...@@ -68,13 +67,11 @@ bool LoadFootprintFiles( const wxArrayString& libNames,
/* Parse Libraries Listed */ /* Parse Libraries Listed */
for( i = 0; i < libNames.GetCount(); i++ ) for( i = 0; i < libNames.GetCount(); i++ )
{ {
/* Calcul du nom complet de la librairie */
filename = libNames[i]; filename = libNames[i];
filename.SetExt( ModuleFileExtension ); filename.SetExt( ModuleFileExtension );
tmp = wxGetApp().FindLibraryPath( filename ); tmp = wxGetApp().FindLibraryPath( filename );
if( !tmp ) if( !tmp )
{ {
s_files_not_found << filename.GetFullName() << wxT("\n"); s_files_not_found << filename.GetFullName() << wxT("\n");
...@@ -99,10 +96,9 @@ bool LoadFootprintFiles( const wxArrayString& libNames, ...@@ -99,10 +96,9 @@ bool LoadFootprintFiles( const wxArrayString& libNames,
continue; continue;
} }
/* TODO Lecture du nombre de composants */ /* TODO: Read the number of components. */
fseek( file, 0, 0 ); fseek( file, 0, 0 );
/* TODO lecture nom des composants : */
end = 0; end = 0;
while( !end && fgets( buffer, 255, file ) != NULL ) while( !end && fgets( buffer, 255, file ) != NULL )
{ {
...@@ -162,13 +158,11 @@ bool LoadFootprintFiles( const wxArrayString& libNames, ...@@ -162,13 +158,11 @@ bool LoadFootprintFiles( const wxArrayString& libNames,
/** /**
* Routine de lecture du fichier Doc associe a la librairie ModLibName. * Read the file Doc combines a library ModLibName.
* Cree en memoire la chaine liste des docs pointee par MList * Create the list of doc strings pointed to by list
* ModLibName = full file Name de la librairie Modules * ModLibName = full file name of the library modules
*/ */
static void static void ReadDocLib( const wxString& ModLibName, FOOTPRINT_LIST& list )
ReadDocLib( const wxString& ModLibName,
FOOTPRINT_LIST& list )
{ {
FOOTPRINT* NewMod; FOOTPRINT* NewMod;
char Line[1024]; char Line[1024];
...@@ -202,7 +196,7 @@ ReadDocLib( const wxString& ModLibName, ...@@ -202,7 +196,7 @@ ReadDocLib( const wxString& ModLibName,
continue; continue;
if( Line[1] == 'E' ) if( Line[1] == 'E' )
break; break;
if( Line[1] == 'M' ) /* 1 module description */ if( Line[1] == 'M' )
{ {
/* Parse file line by line */ /* Parse file line by line */
while( GetLine( mdc_file, Line, NULL, sizeof(Line) - 1 ) ) while( GetLine( mdc_file, Line, NULL, sizeof(Line) - 1 ) )
......
/***************************************************/ /***************/
/* Localisation des elements pointes par la souris */ /* loadcmp.cpp */
/***************************************************/ /***************/
#include "fctsys.h" #include "fctsys.h"
#include "wxstruct.h" #include "wxstruct.h"
...@@ -16,17 +16,14 @@ ...@@ -16,17 +16,14 @@
#include "cvstruct.h" #include "cvstruct.h"
/***************************************************************** /**
* Analyze the libraries to find the module.
* If this module is found, copy it into memory, and
* string end of the list of modules.
* *
* Analyse les LIBRAIRIES pour trouver le module demande * @param CmpName - Module name
* Si ce module est trouve, le copie en memoire, et le * @return - Module if found otherwise NULL.
* chaine en fin de liste des modules */
* - Entree:
* name_cmp = nom du module
* - Retour:
* Pointeur sur le nouveau module.
*
*****************************************************************/
MODULE* WinEDA_DisplayFrame::Get_Module( const wxString& CmpName ) MODULE* WinEDA_DisplayFrame::Get_Module( const wxString& CmpName )
{ {
int LineNum, Found = 0; int LineNum, Found = 0;
...@@ -39,7 +36,6 @@ MODULE* WinEDA_DisplayFrame::Get_Module( const wxString& CmpName ) ...@@ -39,7 +36,6 @@ MODULE* WinEDA_DisplayFrame::Get_Module( const wxString& CmpName )
for( ii = 0; ii < parent->m_ModuleLibNames.GetCount(); ii++ ) for( ii = 0; ii < parent->m_ModuleLibNames.GetCount(); ii++ )
{ {
/* Calcul du nom complet de la librairie */
fn = parent->m_ModuleLibNames[ii]; fn = parent->m_ModuleLibNames[ii];
fn.SetExt( ModuleFileExtension ); fn.SetExt( ModuleFileExtension );
...@@ -64,7 +60,7 @@ found in the default search paths." ), ...@@ -64,7 +60,7 @@ found in the default search paths." ),
continue; continue;
} }
/* lecture entete chaine definie par ENTETE_LIBRAIRIE */ /* Read header. */
LineNum = 0; LineNum = 0;
GetLine( file, Line, &LineNum ); GetLine( file, Line, &LineNum );
StrPurge( Line ); StrPurge( Line );
...@@ -78,7 +74,6 @@ found in the default search paths." ), ...@@ -78,7 +74,6 @@ found in the default search paths." ),
return NULL; return NULL;
} }
/* Lecture de la liste des composants de la librairie */
Found = 0; Found = 0;
while( !Found && GetLine( file, Line, &LineNum ) ) while( !Found && GetLine( file, Line, &LineNum ) )
{ {
...@@ -96,13 +91,12 @@ found in the default search paths." ), ...@@ -96,13 +91,12 @@ found in the default search paths." ),
if( stricmp( Line, CONV_TO_UTF8( CmpName ) ) == 0 ) if( stricmp( Line, CONV_TO_UTF8( CmpName ) ) == 0 )
{ {
Found = 1; Found = 1;
break; /* Trouve! */ break;
} }
} }
} }
} }
/* Lecture de la librairie */
while( Found && GetLine( file, Line, &LineNum ) ) while( Found && GetLine( file, Line, &LineNum ) )
{ {
if( Line[0] != '$' ) if( Line[0] != '$' )
...@@ -114,15 +108,16 @@ found in the default search paths." ), ...@@ -114,15 +108,16 @@ found in the default search paths." ),
if( strnicmp( Line, "$MODULE", 7 ) != 0 ) if( strnicmp( Line, "$MODULE", 7 ) != 0 )
continue; continue;
/* Lecture du nom du composant */ /* Read component name. */
sscanf( Line + 7, " %s", Name ); sscanf( Line + 7, " %s", Name );
if( stricmp( Name, CONV_TO_UTF8( CmpName ) ) == 0 ) /* composant localise */ if( stricmp( Name, CONV_TO_UTF8( CmpName ) ) == 0 )
{ {
Module = new MODULE( GetBoard() ); Module = new MODULE( GetBoard() );
// 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)
SetLocaleTo_C_standard(); SetLocaleTo_C_standard();
Module->ReadDescr( file, &LineNum ); Module->ReadDescr( file, &LineNum );
SetLocaleTo_Default(); // revert to the current locale SetLocaleTo_Default(); // revert to the current locale
Module->SetPosition( wxPoint( 0, 0 ) ); Module->SetPosition( wxPoint( 0, 0 ) );
fclose( file ); fclose( file );
return Module; return Module;
......
/***************************************/ /***************************************/
/* menucfg : buils the cvpcb main menu */ /* menucfg : build the cvpcb main menu */
/***************************************/ /***************************************/
#include "fctsys.h" #include "fctsys.h"
...@@ -14,34 +14,24 @@ ...@@ -14,34 +14,24 @@
#include "bitmaps.h" #include "bitmaps.h"
/*******************************************/
void WinEDA_CvpcbFrame::ReCreateMenuBar() void WinEDA_CvpcbFrame::ReCreateMenuBar()
/*******************************************/
/* Creation des menus de la fenetre principale
*/
{ {
wxMenuItem* item; wxMenuItem* item;
wxMenuBar* menuBar; wxMenuBar* menuBar;
/* Destroy the existing menu bar so it can be rebuilt. This allows
* language changes of the menu text on the fly. */
// if( menuBar )
// SetMenuBar( NULL );
menuBar = new wxMenuBar(); menuBar = new wxMenuBar();
wxMenu* filesMenu = new wxMenu; wxMenu* filesMenu = new wxMenu;
item = new wxMenuItem( filesMenu, ID_LOAD_PROJECT, item = new wxMenuItem( filesMenu, ID_LOAD_PROJECT,
_( "&Open" ), _( "&Open" ),
_( "Open a NetList file" ) ); _( "Open a net list file" ) );
item->SetBitmap( open_xpm ); item->SetBitmap( open_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
filesMenu->AppendSeparator(); filesMenu->AppendSeparator();
item = new wxMenuItem( filesMenu, ID_SAVE_PROJECT, item = new wxMenuItem( filesMenu, ID_SAVE_PROJECT,
_( "&Save As..." ), _( "&Save As..." ),
_( "Save New NetList and Footprints List files" ) ); _( "Save new net list and footprint list files" ) );
item->SetBitmap( save_xpm ); item->SetBitmap( save_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
...@@ -51,13 +41,12 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar() ...@@ -51,13 +41,12 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
item->SetBitmap( exit_xpm ); item->SetBitmap( exit_xpm );
filesMenu->Append( item ); filesMenu->Append( item );
// Creation des selections des anciens fichiers
wxGetApp().m_fileHistory.AddFilesToMenu( filesMenu ); wxGetApp().m_fileHistory.AddFilesToMenu( filesMenu );
// Menu Configuration: // Menu Configuration:
wxMenu* configmenu = new wxMenu; wxMenu* configmenu = new wxMenu;
item = new wxMenuItem( configmenu, ID_CONFIG_REQ, _( "&Configuration" ), item = new wxMenuItem( configmenu, ID_CONFIG_REQ, _( "&Configuration" ),
_( "Setting Libraries, Directories and others..." ) ); _( "Set libraries and library search paths" ) );
item->SetBitmap( config_xpm ); item->SetBitmap( config_xpm );
configmenu->Append( item ); configmenu->Append( item );
...@@ -91,6 +80,7 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar() ...@@ -91,6 +80,7 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
menuBar->Append( configmenu, _( "&Preferences" ) ); menuBar->Append( configmenu, _( "&Preferences" ) );
menuBar->Append( helpMenu, _( "&Help" ) ); menuBar->Append( helpMenu, _( "&Help" ) );
// Associate the menu bar with the frame /* Calling SetMenuBar() will Destroy the existing menu bar so it can be
* rebuilt. This allows language changes of the menu text on the fly. */
SetMenuBar( menuBar ); SetMenuBar( menuBar );
} }
/**************************************/ /**************/
/** protos.h liste des fonctions **/ /** protos.h **/
/**************************************/ /**************/
#ifndef PROTOS_H #ifndef PROTOS_H
#define PROTOS_H #define PROTOS_H
...@@ -16,5 +16,5 @@ extern bool LoadFootprintFiles( const wxArrayString& libNames, ...@@ -16,5 +16,5 @@ extern bool LoadFootprintFiles( const wxArrayString& libNames,
FOOTPRINT* GetModuleDescrByName( const wxString& FootprintName, FOOTPRINT* GetModuleDescrByName( const wxString& FootprintName,
FOOTPRINT_LIST& list ); FOOTPRINT_LIST& list );
#endif // PROTOS_H #endif // PROTOS_H
...@@ -19,16 +19,16 @@ ...@@ -19,16 +19,16 @@
#include "cvstruct.h" #include "cvstruct.h"
#define SEPARATEUR '|' /* caractere separateur dans netliste */ #define SEPARATEUR '|' /* Separator character in NetList */
/* routines locales : */
static int ReadPinConnection( FILE* f, COMPONENT* CurrentCmp ); static int ReadPinConnection( FILE* f, COMPONENT* CurrentCmp );
/* Tri la liste des composants par ordre alphabetique et met a jour le nouveau
* chainage avant/arriere retourne un pointeur sur le 1er element de la liste */
#define BUFFER_CHAR_SIZE 1024 // Size of buffers used to store netlist data /* Sort the list alphabetically by component and and returns
* a pointer to the 1st element of list */
#define BUFFER_CHAR_SIZE 1024 // Size of buffers used to store netlist data
/** /**
...@@ -117,7 +117,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() ...@@ -117,7 +117,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist()
} }
/* Read the file header (must be "( { OrCAD PCB" or "({ OrCAD PCB" ) /* Read the file header (must be "( { OrCAD PCB" or "({ OrCAD PCB" )
* or "# EESchema Netliste" * or "# EESchema Netlist"
*/ */
result = fgets( Line, BUFFER_CHAR_SIZE, source ); result = fgets( Line, BUFFER_CHAR_SIZE, source );
/* test for netlist type PCB2 */ /* test for netlist type PCB2 */
...@@ -231,9 +231,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() ...@@ -231,9 +231,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist()
while( Line[i] == ' ' ) while( Line[i] == ' ' )
i++; i++;
/* goto beginning of reference */ /* goto beginning of reference */
/* debut reference trouv */
for( ; ; i++ ) for( ; ; i++ )
{ {
#if defined(KICAD_GOST) #if defined(KICAD_GOST)
...@@ -249,7 +247,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() ...@@ -249,7 +247,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist()
while( Line[i] == ' ' ) while( Line[i] == ' ' )
i++; i++;
/** goto beginning of value */ /** goto beginning of value */
for( ; ; i++ ) for( ; ; i++ )
{ {
...@@ -348,13 +346,13 @@ int ReadPinConnection( FILE* f, COMPONENT* Cmp ) ...@@ -348,13 +346,13 @@ int ReadPinConnection( FILE* f, COMPONENT* Cmp )
for( ; ; ) for( ; ; )
{ {
/* debut description trouv */ /* Find beginning of description. */
for( ; ; ) for( ; ; )
{ {
if( fgets( Line, BUFFER_CHAR_SIZE, f ) == 0 ) if( fgets( Line, BUFFER_CHAR_SIZE, f ) == 0 )
return -1; return -1;
/* remove blanks from the beginning of the line */ /* Remove blanks from the beginning of the line. */
i = 0; while( Line[i] == ' ' ) i = 0; while( Line[i] == ' ' )
i++; i++;
...@@ -368,14 +366,14 @@ int ReadPinConnection( FILE* f, COMPONENT* Cmp ) ...@@ -368,14 +366,14 @@ int ReadPinConnection( FILE* f, COMPONENT* Cmp )
if( Line[i] < ' ' ) if( Line[i] < ' ' )
continue; continue;
/* fin de description ? */ /* End of description? */
if( Line[i] == ')' ) if( Line[i] == ')' )
return 0; return 0;
net.Empty(); net.Empty();
numpin.Empty(); numpin.Empty();
/* Read pin name , 4 letters */ /* Read pin name, 4 letters */
for( jj = 0; jj < 4; jj++, i++ ) for( jj = 0; jj < 4; jj++, i++ )
{ {
if( Line[i] == ' ' ) if( Line[i] == ' ' )
......
/**************/ /****************/
/* savecmp() */ /* savecmp.cpp */
/**************/ /****************/
/* sauvegarde la liste des associations composants/empreintes */
#include "fctsys.h" #include "fctsys.h"
#include "wxstruct.h" #include "wxstruct.h"
...@@ -18,16 +16,17 @@ ...@@ -18,16 +16,17 @@
#include "cvstruct.h" #include "cvstruct.h"
/* Chaines de caractere d'identification */ /* File header. */
char EnteteCmpMod[] = { "Cmp-Mod V01" }; char EnteteCmpMod[] = { "Cmp-Mod V01" };
const wxString titleComponentLibErr( _( "Component Library Error" ) ); const wxString titleComponentLibErr( _( "Component Library Error" ) );
/* /*
* Routine de sauvegarde du fichier des modules * Backup modules file.
* Retourne 1 si OK *
* 0 si ecriture non faite * @param NetlistFullFileName - Name of net list file to save.
* @returns - 1 if OK, 0 if error.
*/ */
int WinEDA_CvpcbFrame::SaveComponentList( const wxString& NetlistFullFileName ) int WinEDA_CvpcbFrame::SaveComponentList( const wxString& NetlistFullFileName )
{ {
...@@ -36,12 +35,11 @@ int WinEDA_CvpcbFrame::SaveComponentList( const wxString& NetlistFullFileName ) ...@@ -36,12 +35,11 @@ int WinEDA_CvpcbFrame::SaveComponentList( const wxString& NetlistFullFileName )
char Line[1024]; char Line[1024];
wxString Title = wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion(); wxString Title = wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion();
/* calcul du nom du fichier */
fn.SetExt( ComponentFileExtension ); fn.SetExt( ComponentFileExtension );
dest = wxFopen( fn.GetFullPath(), wxT( "wt" ) ); dest = wxFopen( fn.GetFullPath(), wxT( "wt" ) );
if( dest == NULL ) if( dest == NULL )
return 0; /* Erreur ecriture */ return 0;
fprintf( dest, "%s", EnteteCmpMod ); fprintf( dest, "%s", EnteteCmpMod );
fprintf( dest, " Created by %s", CONV_TO_UTF8( Title ) ); fprintf( dest, " Created by %s", CONV_TO_UTF8( Title ) );
...@@ -68,7 +66,7 @@ int WinEDA_CvpcbFrame::SaveComponentList( const wxString& NetlistFullFileName ) ...@@ -68,7 +66,7 @@ int WinEDA_CvpcbFrame::SaveComponentList( const wxString& NetlistFullFileName )
/* /*
* recupere la liste des associations composants/empreintes * Load list of associated components and footprints.
*/ */
bool LoadComponentFile( const wxString& fileName, COMPONENT_LIST& list ) bool LoadComponentFile( const wxString& fileName, COMPONENT_LIST& list )
{ {
...@@ -78,7 +76,6 @@ bool LoadComponentFile( const wxString& fileName, COMPONENT_LIST& list ) ...@@ -78,7 +76,6 @@ bool LoadComponentFile( const wxString& fileName, COMPONENT_LIST& list )
FILE* source; FILE* source;
wxFileName fn = fileName; wxFileName fn = fileName;
/* calcul du nom du fichier */
fn.SetExt( ComponentFileExtension ); fn.SetExt( ComponentFileExtension );
source = wxFopen( fn.GetFullPath(), wxT( "rt" ) ); source = wxFopen( fn.GetFullPath(), wxT( "rt" ) );
...@@ -90,7 +87,7 @@ bool LoadComponentFile( const wxString& fileName, COMPONENT_LIST& list ) ...@@ -90,7 +87,7 @@ bool LoadComponentFile( const wxString& fileName, COMPONENT_LIST& list )
return false; return false;
} }
/* Identification du Type de fichier CmpMod */ /* Identification of the type of file CmpMod */
if( fgets( Line, 79, source ) == 0 ) if( fgets( Line, 79, source ) == 0 )
{ {
msg.Printf( _( " <%s> does not appear to be a valid Kicad component library." ), msg.Printf( _( " <%s> does not appear to be a valid Kicad component library." ),
...@@ -108,13 +105,12 @@ bool LoadComponentFile( const wxString& fileName, COMPONENT_LIST& list ) ...@@ -108,13 +105,12 @@ bool LoadComponentFile( const wxString& fileName, COMPONENT_LIST& list )
return false; return false;
} }
/* lecture de la liste */
while( !eof && fgets( Line, 79, source ) != 0 ) while( !eof && fgets( Line, 79, source ) != 0 )
{ {
if( strnicmp( Line, "EndListe", 8 ) == 0 ) if( strnicmp( Line, "EndListe", 8 ) == 0 )
break; break;
/* Recherche du debut de description du composant */ /* Search the beginning of the component description. */
if( strnicmp( Line, "BeginCmp", 8 ) != 0 ) if( strnicmp( Line, "BeginCmp", 8 ) != 0 )
continue; continue;
timestamp.Empty(); timestamp.Empty();
...@@ -171,16 +167,16 @@ bool LoadComponentFile( const wxString& fileName, COMPONENT_LIST& list ) ...@@ -171,16 +167,16 @@ bool LoadComponentFile( const wxString& fileName, COMPONENT_LIST& list )
ilib.Trim( FALSE ); ilib.Trim( FALSE );
continue; continue;
} }
} /* Fin lecture description de 1 composant */ } /* End reading component description. */
/* Recherche du composant correspondant en netliste et /* Search corresponding component and NetList
* mise a jour de ses parametres */ * Update its parameters. */
BOOST_FOREACH( COMPONENT& component, list ) BOOST_FOREACH( COMPONENT& component, list )
{ {
if( namecmp != component.m_Reference ) if( namecmp != component.m_Reference )
continue; continue;
/* composant identifie , copie du nom du module correspondant */ /* Copy the name of the corresponding module. */
component.m_Module = ilib; component.m_Module = ilib;
} }
} }
......
/*********************************************************************/ /*****************/
/** setvisu.cpp: initialisations de l'ecran d'affichage du composant **/ /** setvisu.cpp **/
/*********************************************************************/ /*****************/
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
/* /*
* NOTE: There is something in 3d_viewer.h that causes a compiler error in * NOTE: There is something in 3d_viewer.h that causes a compiler error in
* <boost/foreach.hpp> in Linux so move it after cvpcb.h where it is * <boost/foreach.hpp> in Linux so move it after cvpcb.h where it is
* included to prevent the error from occuring. * included to prevent the error from occurring.
*/ */
#include "3d_viewer.h" #include "3d_viewer.h"
......
/***************************************************/ /********************/
/* tool_cvpcb.cpp: construction du menu principal */ /* tool_cvpcb.cpp */
/***************************************************/ /********************/
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
...@@ -13,9 +13,7 @@ ...@@ -13,9 +13,7 @@
#include "cvstruct.h" #include "cvstruct.h"
/*********************************************/
void WinEDA_CvpcbFrame::ReCreateHToolbar() void WinEDA_CvpcbFrame::ReCreateHToolbar()
/*********************************************/
{ {
wxConfig* config = wxGetApp().m_EDA_Config; wxConfig* config = wxGetApp().m_EDA_Config;
...@@ -23,16 +21,18 @@ void WinEDA_CvpcbFrame::ReCreateHToolbar() ...@@ -23,16 +21,18 @@ void WinEDA_CvpcbFrame::ReCreateHToolbar()
return; return;
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE ); m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
#if !defined(KICAD_AUIMANAGER) #if !defined(KICAD_AUIMANAGER)
SetToolBar( (wxToolBar *)m_HToolBar ); SetToolBar( (wxToolBar *)m_HToolBar );
#endif #endif
m_HToolBar->AddTool( ID_CVPCB_READ_INPUT_NETLIST, wxEmptyString, m_HToolBar->AddTool( ID_CVPCB_READ_INPUT_NETLIST, wxEmptyString,
wxBitmap( open_xpm ), wxBitmap( open_xpm ),
_( "Open a NetList file" ) ); _( "Open a net list file" ) );
m_HToolBar->AddTool( ID_CVPCB_SAVEQUITCVPCB, wxEmptyString, m_HToolBar->AddTool( ID_CVPCB_SAVEQUITCVPCB, wxEmptyString,
wxBitmap( save_xpm ), wxBitmap( save_xpm ),
_( "Save NetList and Footprints List files" ) ); _( "Save net list and footprint files" ) );
m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_CVPCB_CREATE_CONFIGWINDOW, wxEmptyString, m_HToolBar->AddTool( ID_CVPCB_CREATE_CONFIGWINDOW, wxEmptyString,
...@@ -46,7 +46,7 @@ void WinEDA_CvpcbFrame::ReCreateHToolbar() ...@@ -46,7 +46,7 @@ void WinEDA_CvpcbFrame::ReCreateHToolbar()
m_HToolBar->AddTool( ID_CVPCB_AUTO_ASSOCIE, wxEmptyString, m_HToolBar->AddTool( ID_CVPCB_AUTO_ASSOCIE, wxEmptyString,
wxBitmap( auto_associe_xpm ), wxBitmap( auto_associe_xpm ),
_( "Automatic Association" ) ); _( "Perform automatic footprint association" ) );
m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_CVPCB_GOTO_PREVIOUSNA, wxEmptyString, m_HToolBar->AddTool( ID_CVPCB_GOTO_PREVIOUSNA, wxEmptyString,
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
/* writenetlistpcbnew.cpp */ /* writenetlistpcbnew.cpp */
/***************************/ /***************************/
/*
* Complete la netliste (*.NET) en y placant les ref *.lib FORMAT PCBNEW ou
* ORCADPCB
*/
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
...@@ -19,7 +15,7 @@ ...@@ -19,7 +15,7 @@
#define MAX_LEN_NETNAME 16 #define MAX_LEN_NETNAME 16
/* Routines locales */
static void ChangePinNet( COMPONENT_LIST& list, wxString& PinNet, static void ChangePinNet( COMPONENT_LIST& list, wxString& PinNet,
int* netNumber, bool rightJustify ); int* netNumber, bool rightJustify );
static void WriteFootprintFilterInfos( FILE* dest, COMPONENT_LIST& list ); static void WriteFootprintFilterInfos( FILE* dest, COMPONENT_LIST& list );
...@@ -66,6 +62,13 @@ static void RemoveDuplicatePins( COMPONENT& component ) ...@@ -66,6 +62,13 @@ static void RemoveDuplicatePins( COMPONENT& component )
} }
/**
* Create Kicad net list file.
*
* @todo: None of the printf() call return values are checked for failure,
* a value less than zero. Check all printf() return values and
* return a true(pass) or false(fail) to the caller.
*/
int GenNetlistPcbnew( FILE* file, COMPONENT_LIST& list, bool isEESchemaNetlist, int GenNetlistPcbnew( FILE* file, COMPONENT_LIST& list, bool isEESchemaNetlist,
bool rightJustify ) bool rightJustify )
{ {
...@@ -80,9 +83,6 @@ int GenNetlistPcbnew( FILE* file, COMPONENT_LIST& list, bool isEESchemaNetlist, ...@@ -80,9 +83,6 @@ int GenNetlistPcbnew( FILE* file, COMPONENT_LIST& list, bool isEESchemaNetlist,
else else
fprintf( file, "( { netlist created %s }\n", Line ); fprintf( file, "( { netlist created %s }\n", Line );
/***********************/
/* Lecture de la liste */
/***********************/
BOOST_FOREACH( COMPONENT& component, list ) BOOST_FOREACH( COMPONENT& component, list )
{ {
...@@ -96,13 +96,11 @@ int GenNetlistPcbnew( FILE* file, COMPONENT_LIST& list, bool isEESchemaNetlist, ...@@ -96,13 +96,11 @@ int GenNetlistPcbnew( FILE* file, COMPONENT_LIST& list, bool isEESchemaNetlist,
fprintf( file, " %s ", CONV_TO_UTF8( component.m_Reference ) ); fprintf( file, " %s ", CONV_TO_UTF8( component.m_Reference ) );
/* placement de la valeur */
fprintf( file, "%s\n", CONV_TO_UTF8( component.m_Value ) ); fprintf( file, "%s\n", CONV_TO_UTF8( component.m_Value ) );
component.m_Pins.sort(); component.m_Pins.sort();
RemoveDuplicatePins( component ); RemoveDuplicatePins( component );
/* Placement de la liste des pins */
BOOST_FOREACH( PIN& pin, component.m_Pins ) BOOST_FOREACH( PIN& pin, component.m_Pins )
{ {
if( pin.m_Net.Len() > MAX_LEN_NETNAME ) if( pin.m_Net.Len() > MAX_LEN_NETNAME )
...@@ -164,7 +162,7 @@ void WriteFootprintFilterInfos( FILE* file, COMPONENT_LIST& list ) ...@@ -164,7 +162,7 @@ void WriteFootprintFilterInfos( FILE* file, COMPONENT_LIST& list )
} }
/* /* *** JP translate ***
* Change le NetName PinNet par un nom compose des 8 derniers codes de PinNet * Change le NetName PinNet par un nom compose des 8 derniers codes de PinNet
* suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999 * suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999
*/ */
...@@ -178,12 +176,12 @@ static void ChangePinNet( COMPONENT_LIST& list, wxString& PinNet, ...@@ -178,12 +176,12 @@ static void ChangePinNet( COMPONENT_LIST& list, wxString& PinNet,
OldName = PinNet; OldName = PinNet;
if( rightJustify ) /* On conserve les 8 dernieres lettres du nom */ if( rightJustify ) /* Retain the last 8 letters of the name. */
{ {
NewName = OldName.Right( 8 ); NewName = OldName.Right( 8 );
NewName << *netNumber; NewName << *netNumber;
} }
else /* On conserve les 8 premieres lettres du nom */ else /* Retain the first 8 letters of the name. */
{ {
NewName = OldName.Left( 8 ); NewName = OldName.Left( 8 );
NewName << *netNumber; NewName << *netNumber;
......
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