Commit a397c4b2 authored by CHARRAS's avatar CHARRAS

gestfich.cpp change (A problem under windows already solved, but change was lost)

parent 75ce1923
...@@ -37,6 +37,7 @@ static wxString s_HelpPathList[] = { ...@@ -37,6 +37,7 @@ static wxString s_HelpPathList[] = {
#ifdef __WINDOWS__ #ifdef __WINDOWS__
wxT("c:/kicad/help/"), wxT("c:/kicad/help/"),
wxT("d:/kicad/help/"), wxT("d:/kicad/help/"),
wxT("c:/Program Files/kicad/help/"),
#else #else
wxT("/usr/share/doc/kicad/"), wxT("/usr/share/doc/kicad/"),
wxT("/usr/local/share/doc/kicad/"), wxT("/usr/local/share/doc/kicad/"),
...@@ -52,6 +53,7 @@ static wxString s_KicadDataPathList[] = { ...@@ -52,6 +53,7 @@ static wxString s_KicadDataPathList[] = {
#ifdef __WINDOWS__ #ifdef __WINDOWS__
wxT("c:/kicad/"), wxT("c:/kicad/"),
wxT("d:/kicad/"), wxT("d:/kicad/"),
wxT("c:/Program Files/kicad/"),
#else #else
wxT("/usr/share/kicad/"), wxT("/usr/share/kicad/"),
wxT("/usr/local/share/kicad/"), wxT("/usr/local/share/kicad/"),
...@@ -332,7 +334,11 @@ bool PathFound = FALSE; ...@@ -332,7 +334,11 @@ bool PathFound = FALSE;
FullPath += wxT("/help/"); FullPath += wxT("/help/");
LocaleString = EDA_Appl->m_Locale->GetCanonicalName(); LocaleString = EDA_Appl->m_Locale->GetCanonicalName();
if ( FullPath.Contains( wxT("kicad")) ) wxString path_tmp = FullPath;
#ifdef __WINDOWS__
path_tmp.MakeLower();
#endif
if ( path_tmp.Contains( wxT("kicad")) )
{ {
if ( wxDirExists(FullPath) ) PathFound = TRUE; if ( wxDirExists(FullPath) ) PathFound = TRUE;
} }
...@@ -520,8 +526,14 @@ wxString data_path; ...@@ -520,8 +526,14 @@ wxString data_path;
else // Chemin cherche par le chemin des executables else // Chemin cherche par le chemin des executables
{ // le chemin est bindir../ { // le chemin est bindir../
wxString tmp = EDA_Appl->m_BinDir; wxString tmp = EDA_Appl->m_BinDir;
#ifdef __WINDOWS__
tmp.MakeLower();
#endif
if ( tmp.Contains( wxT("kicad") ) ) if ( tmp.Contains( wxT("kicad") ) )
{ {
#ifdef __WINDOWS__
tmp = EDA_Appl->m_BinDir;
#endif
if ( tmp.Last() == '/' ) tmp.RemoveLast(); if ( tmp.Last() == '/' ) tmp.RemoveLast();
data_path = tmp.BeforeLast('/'); // id cd ../ data_path = tmp.BeforeLast('/'); // id cd ../
data_path += UNIX_STRING_DIR_SEP; data_path += UNIX_STRING_DIR_SEP;
......
...@@ -82,15 +82,18 @@ bool WinEDA_AnnotateFrame::Create( wxWindow* parent, wxWindowID id, const wxStri ...@@ -82,15 +82,18 @@ bool WinEDA_AnnotateFrame::Create( wxWindow* parent, wxWindowID id, const wxStri
////@begin WinEDA_AnnotateFrame member initialisation ////@begin WinEDA_AnnotateFrame member initialisation
m_AnnotProjetCtrl = NULL; m_AnnotProjetCtrl = NULL;
m_AnnotNewCmpCtrl = NULL; m_AnnotNewCmpCtrl = NULL;
m_AnnotSortCmpCtrl = NULL;
////@end WinEDA_AnnotateFrame member initialisation ////@end WinEDA_AnnotateFrame member initialisation
////@begin WinEDA_AnnotateFrame creation ////@begin WinEDA_AnnotateFrame creation
SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style ); wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls(); CreateControls();
GetSizer()->Fit(this); if (GetSizer())
{
GetSizer()->SetSizeHints(this); GetSizer()->SetSizeHints(this);
}
Centre(); Centre();
////@end WinEDA_AnnotateFrame creation ////@end WinEDA_AnnotateFrame creation
return true; return true;
...@@ -105,7 +108,7 @@ void WinEDA_AnnotateFrame::CreateControls() ...@@ -105,7 +108,7 @@ void WinEDA_AnnotateFrame::CreateControls()
SetFont(*g_DialogFont); SetFont(*g_DialogFont);
////@begin WinEDA_AnnotateFrame content construction ////@begin WinEDA_AnnotateFrame content construction
// Generated by DialogBlocks, 05/02/2006 12:40:51 (unregistered) // Generated by DialogBlocks, 05/07/2007 21:07:04 (unregistered)
WinEDA_AnnotateFrame* itemDialog1 = this; WinEDA_AnnotateFrame* itemDialog1 = this;
...@@ -115,41 +118,41 @@ void WinEDA_AnnotateFrame::CreateControls() ...@@ -115,41 +118,41 @@ void WinEDA_AnnotateFrame::CreateControls()
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5); itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
wxString m_AnnotProjetCtrlStrings[] = { wxArrayString m_AnnotProjetCtrlStrings;
_("Hierarchy"), m_AnnotProjetCtrlStrings.Add(_("Hierarchy"));
_("Current sheet") m_AnnotProjetCtrlStrings.Add(_("Current sheet"));
}; m_AnnotProjetCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX, _("annotate:"), wxDefaultPosition, wxDefaultSize, m_AnnotProjetCtrlStrings, 1, wxRA_SPECIFY_COLS );
m_AnnotProjetCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX, _("annotate:"), wxDefaultPosition, wxDefaultSize, 2, m_AnnotProjetCtrlStrings, 1, wxRA_SPECIFY_COLS ); m_AnnotProjetCtrl->SetSelection(0);
itemBoxSizer3->Add(m_AnnotProjetCtrl, 0, wxALIGN_LEFT|wxALL, 5); itemBoxSizer3->Add(m_AnnotProjetCtrl, 0, wxGROW|wxALL, 5);
wxString m_AnnotNewCmpCtrlStrings[] = { wxArrayString m_AnnotNewCmpCtrlStrings;
_("all components"), m_AnnotNewCmpCtrlStrings.Add(_("all components"));
_("new components only") m_AnnotNewCmpCtrlStrings.Add(_("new components only"));
}; m_AnnotNewCmpCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _("select items:"), wxDefaultPosition, wxDefaultSize, m_AnnotNewCmpCtrlStrings, 1, wxRA_SPECIFY_COLS );
m_AnnotNewCmpCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _("select items:"), wxDefaultPosition, wxDefaultSize, 2, m_AnnotNewCmpCtrlStrings, 1, wxRA_SPECIFY_COLS ); m_AnnotNewCmpCtrl->SetSelection(0);
itemBoxSizer3->Add(m_AnnotNewCmpCtrl, 0, wxALIGN_LEFT|wxALL, 5); itemBoxSizer3->Add(m_AnnotNewCmpCtrl, 0, wxGROW|wxALL, 5);
wxString m_AnnotSortCmpCtrlStrings[] = { wxArrayString m_AnnotSortCmpCtrlStrings;
_("by position"), m_AnnotSortCmpCtrlStrings.Add(_("by position"));
_("by value") m_AnnotSortCmpCtrlStrings.Add(_("by value"));
}; m_AnnotSortCmpCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX2, _("sorting:"), wxDefaultPosition, wxDefaultSize, m_AnnotSortCmpCtrlStrings, 1, wxRA_SPECIFY_COLS );
m_AnnotSortCmpCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX2, _("sorting:"), wxDefaultPosition, wxDefaultSize, 2, m_AnnotSortCmpCtrlStrings, 1, wxRA_SPECIFY_COLS ); m_AnnotSortCmpCtrl->SetSelection(0);
itemBoxSizer3->Add(m_AnnotSortCmpCtrl, 0, wxALIGN_LEFT|wxALL, 5); itemBoxSizer3->Add(m_AnnotSortCmpCtrl, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* itemBoxSizer7 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); itemBoxSizer2->Add(itemBoxSizer7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton7 = new wxButton( itemDialog1, ID_ANNOTATE_CMP, _("&Annotate"), wxDefaultPosition, wxDefaultSize, 0 ); wxButton* itemButton8 = new wxButton( itemDialog1, ID_ANNOTATE_CMP, _("&Annotate"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton7->SetDefault(); itemButton8->SetDefault();
itemButton7->SetForegroundColour(wxColour(198, 0, 0)); itemButton8->SetForegroundColour(wxColour(198, 0, 0));
itemBoxSizer6->Add(itemButton7, 0, wxGROW|wxALL, 5); itemBoxSizer7->Add(itemButton8, 0, wxGROW|wxALL, 5);
wxButton* itemButton8 = new wxButton( itemDialog1, ID_DEANNOTATE_CMP, _("&Del Annotate"), wxDefaultPosition, wxDefaultSize, 0 ); wxButton* itemButton9 = new wxButton( itemDialog1, ID_DEANNOTATE_CMP, _("&Del Annotate"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton8->SetForegroundColour(wxColour(0, 0, 230)); itemButton9->SetForegroundColour(wxColour(0, 0, 230));
itemBoxSizer6->Add(itemButton8, 0, wxGROW|wxALL, 5); itemBoxSizer7->Add(itemButton9, 0, wxGROW|wxALL, 5);
wxButton* itemButton9 = new wxButton( itemDialog1, wxID_CLOSE, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); wxButton* itemButton10 = new wxButton( itemDialog1, wxID_CLOSE, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer6->Add(itemButton9, 0, wxGROW|wxALL, 5); itemBoxSizer7->Add(itemButton10, 0, wxGROW|wxALL, 5);
////@end WinEDA_AnnotateFrame content construction ////@end WinEDA_AnnotateFrame content construction
} }
......
...@@ -44,16 +44,16 @@ ...@@ -44,16 +44,16 @@
////@begin control identifiers ////@begin control identifiers
#define ID_DIALOG 10000 #define ID_DIALOG 10000
#define ID_RADIOBOX 10001
#define ID_RADIOBOX1 10002
#define ID_RADIOBOX2 10005
#define ID_ANNOTATE_CMP 10003
#define ID_DEANNOTATE_CMP 10004
#define SYMBOL_WINEDA_ANNOTATEFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX #define SYMBOL_WINEDA_ANNOTATEFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_WINEDA_ANNOTATEFRAME_TITLE _("EESchema Annotation") #define SYMBOL_WINEDA_ANNOTATEFRAME_TITLE _("EESchema Annotation")
#define SYMBOL_WINEDA_ANNOTATEFRAME_IDNAME ID_DIALOG #define SYMBOL_WINEDA_ANNOTATEFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_ANNOTATEFRAME_SIZE wxSize(400, 500) #define SYMBOL_WINEDA_ANNOTATEFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_ANNOTATEFRAME_POSITION wxDefaultPosition #define SYMBOL_WINEDA_ANNOTATEFRAME_POSITION wxDefaultPosition
#define ID_RADIOBOX 10001
#define ID_RADIOBOX1 10002
#define ID_RADIOBOX2 10003
#define ID_ANNOTATE_CMP 10004
#define ID_DEANNOTATE_CMP 10005
////@end control identifiers ////@end control identifiers
/*! /*!
......
This diff is collapsed.
...@@ -162,7 +162,7 @@ int LineWidth = g_DrawMinimunLineWidth; ...@@ -162,7 +162,7 @@ int LineWidth = g_DrawMinimunLineWidth;
GRRect(&panel->m_ClipBox, DC, pos.x, pos.y, GRRect(&panel->m_ClipBox, DC, pos.x, pos.y,
pos.x + m_Size.x, pos.y + m_Size.y, LineWidth, color); pos.x + m_Size.x, pos.y + m_Size.y, LineWidth, color);
/* Trace des textes : SheetName */ /* Draw text : SheetName */
if( Color > 0 ) txtcolor = Color; if( Color > 0 ) txtcolor = Color;
else txtcolor = ReturnLayerColor(LAYER_SHEETNAME); else txtcolor = ReturnLayerColor(LAYER_SHEETNAME);
...@@ -172,7 +172,7 @@ int LineWidth = g_DrawMinimunLineWidth; ...@@ -172,7 +172,7 @@ int LineWidth = g_DrawMinimunLineWidth;
Text, TEXT_ORIENT_HORIZ, wxSize(m_SheetNameSize,m_SheetNameSize), Text, TEXT_ORIENT_HORIZ, wxSize(m_SheetNameSize,m_SheetNameSize),
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_BOTTOM, LineWidth); GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_BOTTOM, LineWidth);
/* Trace des textes : FileName */ /* Draw text : FileName */
if( Color >= 0 ) txtcolor = Color; if( Color >= 0 ) txtcolor = Color;
else txtcolor = ReturnLayerColor(LAYER_SHEETFILENAME); else txtcolor = ReturnLayerColor(LAYER_SHEETFILENAME);
Text = wxT("File: ") + m_FileName; Text = wxT("File: ") + m_FileName;
...@@ -183,7 +183,7 @@ int LineWidth = g_DrawMinimunLineWidth; ...@@ -183,7 +183,7 @@ int LineWidth = g_DrawMinimunLineWidth;
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_TOP, LineWidth); GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_TOP, LineWidth);
/* Trace des textes : SheetLabel */ /* Draw text : SheetLabel */
SheetLabelStruct = m_Label; SheetLabelStruct = m_Label;
while( SheetLabelStruct != NULL ) while( SheetLabelStruct != NULL )
{ {
...@@ -193,7 +193,7 @@ int LineWidth = g_DrawMinimunLineWidth; ...@@ -193,7 +193,7 @@ int LineWidth = g_DrawMinimunLineWidth;
} }
/************************/ /************************/
/* DrawSheetLabelStruct */ /* DrawSheetLabelStruct */
/************************/ /************************/
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
COMMON_GLOBL wxString g_BuildVersion COMMON_GLOBL wxString g_BuildVersion
#ifdef EDA_BASE #ifdef EDA_BASE
(wxT("(2007-07-02)")) (wxT("(2007-07-09)"))
#endif #endif
; ;
......
No preview for this file type
This diff is collapsed.
...@@ -14,7 +14,7 @@ STD_INSTALL = 1 ...@@ -14,7 +14,7 @@ STD_INSTALL = 1
ifeq ($(STD_INSTALL), 1) ifeq ($(STD_INSTALL), 1)
PREFIX = /usr PREFIX = /usr
KICAD_BIN = $(PREFIX)/bin KICAD_BIN = $(PREFIX)/linux
KICAD_PLUGINS = $(PREFIX)/lib/kicad/plugins KICAD_PLUGINS = $(PREFIX)/lib/kicad/plugins
KICAD_DOCS=$(PREFIX)/share/doc/kicad KICAD_DOCS=$(PREFIX)/share/doc/kicad
KICAD_DATA=$(PREFIX)/share/kicad KICAD_DATA=$(PREFIX)/share/kicad
...@@ -23,8 +23,8 @@ KICAD_LIBRARY=$(KICAD_DATA)/library ...@@ -23,8 +23,8 @@ KICAD_LIBRARY=$(KICAD_DATA)/library
KICAD_INTERNAT=$(KICAD_DATA)/internat KICAD_INTERNAT=$(KICAD_DATA)/internat
KICAD_TEMPLATE=$(KICAD_DATA)/template KICAD_TEMPLATE=$(KICAD_DATA)/template
# used by myself (JP Charras) to build a staticcaly linked distribution intalled in /usr/local (with STD_INSTALL = 0)
else else
# used by myself (JP Charras) to build a statically linked distribution intalled in /usr/local (with STD_INSTALL = 0)
PREFIX = /usr/local/linux PREFIX = /usr/local/linux
KICAD_BIN = $(PREFIX)/bin KICAD_BIN = $(PREFIX)/bin
KICAD_PLUGINS = $(PREFIX)/linux/plugins KICAD_PLUGINS = $(PREFIX)/linux/plugins
...@@ -38,7 +38,6 @@ endif ...@@ -38,7 +38,6 @@ endif
# http://www.gnu.org/software/autoconf/manual/make/Catalogue-of-Rules.html#Catalogue-of-Rules # http://www.gnu.org/software/autoconf/manual/make/Catalogue-of-Rules.html#Catalogue-of-Rules
CXX = g++ CXX = g++
LD = g++
SRCSUFF = .cpp SRCSUFF = .cpp
...@@ -46,8 +45,8 @@ OBJSUFF = .o ...@@ -46,8 +45,8 @@ OBJSUFF = .o
FINAL = 1 FINAL = 1
# turn on debugging for all executables, only tested without KICAD_PYTHON # turn on/OFF debugging for all executables, only tested without KICAD_PYTHON
DEBUG = 1 DEBUG = 0
# common CPPFLAGS to all components, further CPPFLAGS customization in # common CPPFLAGS to all components, further CPPFLAGS customization in
...@@ -67,9 +66,17 @@ endif ...@@ -67,9 +66,17 @@ endif
# You must uncomment these lines for static link (or build with "make -f makefile.gtk KICAD_STATIC_LINK=1") # You must uncomment these lines for static link (or build with "make -f makefile.gtk KICAD_STATIC_LINK=1")
# dynamic link is less difficult than static link and is what you would normally want # dynamic link is less difficult than static link and is what you would normally want
# to use if kicad is running only on your system or one with same level of libraries. # to use if kicad is running only on your system or one with same level of libraries.
#ifndef KICAD_PYTHON ifndef KICAD_PYTHON
#KICAD_STATIC_LINK = 1 ifeq ($(STD_INSTALL), 0)
#endif KICAD_STATIC_LINK = 1
endif
endif
ifeq ($(KICAD_STATIC_LINK), 1)
LD = gcc
else
LD = g++
endif
ifdef KICAD_PYTHON ifdef KICAD_PYTHON
PYTHON_VERSION=2.5 PYTHON_VERSION=2.5
......
# File: winmake.env # File: libs.win
#binaries path: #binaries path:
KICAD_BIN = /f/kicad/winexe KICAD_BIN = /f/kicad/winexe
...@@ -12,6 +12,7 @@ KICAD_BIN = /f/kicad/winexe ...@@ -12,6 +12,7 @@ KICAD_BIN = /f/kicad/winexe
# DLL use wxWin STATIC 0 0 1 # DLL use wxWin STATIC 0 0 1
# #
#comment this for static wxWidgets link
#WXUSINGDLL = 1 #WXUSINGDLL = 1
#Define the wxWidget path (if not found in environment variables): #Define the wxWidget path (if not found in environment variables):
...@@ -21,9 +22,6 @@ endif ...@@ -21,9 +22,6 @@ endif
LIBVERSION = 2.8 LIBVERSION = 2.8
#comment this for static wxWidgets link
#WXUSINGDLL = 1
# You must comment or uncomment this line to disable/enable python support # You must comment or uncomment this line to disable/enable python support
#KICAD_PYTHON = 1 #KICAD_PYTHON = 1
......
**************************************************************
Update 02 jul 2007
All:
Window version only:
problem solved in autoinstall package fo XP (help files and others filse not found)
This problem was already solved, but changes were lost in last release.
************************************************************** **************************************************************
Update 02 jul 2007 Update 02 jul 2007
pcbnew: pcbnew:
......
...@@ -17,12 +17,6 @@ ...@@ -17,12 +17,6 @@
#define PSCALE 1 #define PSCALE 1
/* routines externes */
int ReadListeSegmentDescr(wxDC * DC, FILE * File,
TRACK * PtSegm,DrawStructureType ItemType,
int * LineNum, int NumSegm);
/* routines internes */ /* routines internes */
static void Out_Pads(BOARD * Pcb, FILE * outfile); static void Out_Pads(BOARD * Pcb, FILE * outfile);
static int GenEdges(BOARD * Pcb, FILE * outfile); static int GenEdges(BOARD * Pcb, FILE * outfile);
...@@ -513,8 +507,14 @@ void WinEDA_PcbFrame::ReadAutoroutedTracks(wxDC * DC) ...@@ -513,8 +507,14 @@ void WinEDA_PcbFrame::ReadAutoroutedTracks(wxDC * DC)
{ {
char Line[1024]; char Line[1024];
wxString FullFileName, msg; wxString FullFileName, msg;
int LineNum = 0, nbtracks, NbTrack = 0; int LineNum = 0, NbTrack = 0, NetCode = 0;
FILE * File; FILE * File;
TRACK * NewTrack;
SEGVIA * NewVia;
int track_count, track_layer, image, track_width;
int via_layer1, via_layer2, via_size;
wxPoint track_start, track_end;
int max_layer = m_Pcb->m_BoardSettings->m_CopperLayerCount;
/* Calcule du nom du fichier intermediaire de communication */ /* Calcule du nom du fichier intermediaire de communication */
FullFileName = m_CurrentScreen->m_FileName; FullFileName = m_CurrentScreen->m_FileName;
...@@ -532,30 +532,78 @@ FILE * File; ...@@ -532,30 +532,78 @@ FILE * File;
Affiche_Message(msg); Affiche_Message(msg);
} }
nbtracks = 0; setlocale(LC_NUMERIC, "C");
track_width = g_DesignSettings.m_CurrentTrackWidth;
via_size = g_DesignSettings.m_CurrentViaSize;
while( GetLine(File, Line, &LineNum ) != NULL ) while( GetLine(File, Line, &LineNum ) != NULL )
{ {
if(strnicmp(Line,"$EndPCB",6) == 0) break; char ident = Line[0];
switch ( ident )
if(strnicmp(Line,"$TRACK",6) == 0)
{ {
TRACK * StartTrack = m_Pcb->m_Track; case 'j': // Header, not used
break;
case 'R': // Net record
sscanf(Line+2, "%d", & NetCode);
break;
case 'V': // via record: fmt = V symbol pos_x pos_y layer1 layer2
sscanf(Line+2, "%d %d %d %d %d", & image,
& track_start.x, & track_start.y, & via_layer1, &via_layer2);
via_layer1--; via_layer2--;
if ( via_layer1 == max_layer-1 ) via_layer1 = CMP_N;
if ( via_layer2 == max_layer-1 ) via_layer2 = CMP_N;
NewVia = new SEGVIA(m_Pcb);
NewVia->m_Start = NewVia->m_End = track_start;
NewVia->m_Width = via_size;
NewVia->m_Layer = via_layer1 + (via_layer2<<4);
if ( NewVia->m_Layer == 0x0F || NewVia->m_Layer == 0xF0)
NewVia->m_Shape = VIA_NORMALE;
else NewVia->m_Shape = VIA_ENTERREE;
NewVia->Insert(m_Pcb, NULL);
NbTrack++;
break;
for( ;StartTrack != NULL; StartTrack = (TRACK*)StartTrack->Pnext) case 'T': // Track list start: fmt = T image layer t_count
sscanf(Line+2, "%d %d %d", & image, & track_layer, & track_count);
track_layer--;
if ( track_layer == max_layer-1 ) track_layer = CMP_N;
// Read corners: fmt = C x_pos y_pos
for ( int ii = 0; ii < track_count; ii++ )
{
if( GetLine(File, Line, &LineNum ) != NULL )
{
if ( Line[0] != 'C' ) break;
if ( ii == 0 )
sscanf(Line+2, "%d %d", & track_start.x, & track_start.y);
else
{ {
if( StartTrack->Pnext == NULL ) break; sscanf(Line+2, "%d %d", & track_end.x, & track_end.y);
NewTrack = new TRACK(m_Pcb);
NewTrack->m_Width = track_width;
NewTrack->m_Layer = track_layer;
NewTrack->m_Start = track_start;
NewTrack->m_End = track_end;
track_start = track_end;
NewTrack->Insert(m_Pcb, NULL);
NbTrack++;
} }
}
else break;
}
break;
nbtracks = ReadListeSegmentDescr(DC, File, StartTrack, TYPETRACK, default:
&LineNum, NbTrack);
m_Pcb->m_NbSegmTrack += nbtracks;
break; break;
} }
} }
fclose(File); fclose(File);
if( nbtracks == 0 ) DisplayError(this, wxT("Warning: No tracks"), 10); setlocale(LC_NUMERIC, "");
if( NbTrack == 0 ) DisplayError(this, wxT("Warning: No tracks"), 10);
else else
{ {
m_Pcb->m_Status_Pcb = 0; m_Pcb->m_Status_Pcb = 0;
...@@ -563,6 +611,6 @@ FILE * File; ...@@ -563,6 +611,6 @@ FILE * File;
} }
Compile_Ratsnest(DC, TRUE); Compile_Ratsnest(DC, TRUE);
if( nbtracks ) m_CurrentScreen->SetRefreshReq(); if( NbTrack ) m_CurrentScreen->SetRefreshReq();
} }
release version: release version:
02 jul 2007 09 jul 2007
files (.zip,.tgz): files (.zip,.tgz):
kicad-2007-07-02 kicad-2007-07-09
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