Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
654045f2
Commit
654045f2
authored
May 23, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleaning
parent
1b1be195
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
46 deletions
+27
-46
autoplac.cpp
pcbnew/autoplac.cpp
+0
-2
export_gencad.cpp
pcbnew/export_gencad.cpp
+26
-38
initpcb.cpp
pcbnew/initpcb.cpp
+1
-4
pcbnew.cpp
pcbnew/pcbnew.cpp
+0
-2
No files found.
pcbnew/autoplac.cpp
View file @
654045f2
...
@@ -963,7 +963,6 @@ void Build_PlacedPads_List( BOARD* aPcb )
...
@@ -963,7 +963,6 @@ void Build_PlacedPads_List( BOARD* aPcb )
aPcb
->
m_Status_Pcb
|=
LISTE_PAD_OK
;
aPcb
->
m_Status_Pcb
|=
LISTE_PAD_OK
;
aPcb
->
m_Status_Pcb
&=
~
(
LISTE_CHEVELU_OK
|
CHEVELU_LOCAL_OK
);
aPcb
->
m_Status_Pcb
&=
~
(
LISTE_CHEVELU_OK
|
CHEVELU_LOCAL_OK
);
adr_lowmem
=
buf_work
;
}
}
...
@@ -1124,7 +1123,6 @@ static MODULE* PickModule( WinEDA_PcbFrame* pcbframe, wxDC* DC )
...
@@ -1124,7 +1123,6 @@ static MODULE* PickModule( WinEDA_PcbFrame* pcbframe, wxDC* DC )
if
(
!
(
(
*
pt_Dmod
)
->
m_ModuleStatus
&
MODULE_to_PLACE
)
)
if
(
!
(
(
*
pt_Dmod
)
->
m_ModuleStatus
&
MODULE_to_PLACE
)
)
continue
;
continue
;
pcbframe
->
GetBoard
()
->
m_Status_Pcb
&=
~
CHEVELU_LOCAL_OK
;
pcbframe
->
GetBoard
()
->
m_Status_Pcb
&=
~
CHEVELU_LOCAL_OK
;
adr_lowmem
=
buf_work
;
(
*
pt_Dmod
)
->
DisplayInfo
(
pcbframe
);
(
*
pt_Dmod
)
->
DisplayInfo
(
pcbframe
);
pcbframe
->
build_ratsnest_module
(
DC
,
*
pt_Dmod
);
pcbframe
->
build_ratsnest_module
(
DC
,
*
pt_Dmod
);
...
...
pcbnew/export_gencad.cpp
View file @
654045f2
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#include "id.h"
#include "id.h"
bool
CreateHeaderInfoData
(
FILE
*
file
,
WinEDA_PcbFrame
*
frame
);
bool
CreateHeaderInfoData
(
FILE
*
file
,
WinEDA_PcbFrame
*
frame
);
static
int
*
CreateTracksInfoData
(
FILE
*
file
,
BOARD
*
pcb
);
static
void
CreateTracksInfoData
(
FILE
*
file
,
BOARD
*
pcb
);
static
void
CreateBoardSection
(
FILE
*
file
,
BOARD
*
pcb
);
static
void
CreateBoardSection
(
FILE
*
file
,
BOARD
*
pcb
);
static
void
CreateComponentsSection
(
FILE
*
file
,
BOARD
*
pcb
);
static
void
CreateComponentsSection
(
FILE
*
file
,
BOARD
*
pcb
);
static
void
CreateDevicesSection
(
FILE
*
file
,
BOARD
*
pcb
);
static
void
CreateDevicesSection
(
FILE
*
file
,
BOARD
*
pcb
);
...
@@ -71,7 +71,7 @@ void WinEDA_PcbFrame::ExportToGenCAD( wxCommandEvent& event )
...
@@ -71,7 +71,7 @@ void WinEDA_PcbFrame::ExportToGenCAD( wxCommandEvent& event )
wildcard
=
_
(
"GenCAD board files (.gcd)|*.gcd"
);
wildcard
=
_
(
"GenCAD board files (.gcd)|*.gcd"
);
fn
.
SetExt
(
ext
);
fn
.
SetExt
(
ext
);
wxFileDialog
dlg
(
this
,
_
(
"Save GenCAD Board File"
),
wx
EmptyString
,
wxFileDialog
dlg
(
this
,
_
(
"Save GenCAD Board File"
),
wx
GetCwd
()
,
fn
.
GetFullName
(),
wildcard
,
fn
.
GetFullName
(),
wildcard
,
wxFD_SAVE
|
wxFD_OVERWRITE_PROMPT
);
wxFD_SAVE
|
wxFD_OVERWRITE_PROMPT
);
...
@@ -691,7 +691,7 @@ void CreateBoardSection( FILE* file, BOARD* pcb )
...
@@ -691,7 +691,7 @@ void CreateBoardSection( FILE* file, BOARD* pcb )
/****************************************************/
/****************************************************/
int
*
CreateTracksInfoData
(
FILE
*
file
,
BOARD
*
pcb
)
void
CreateTracksInfoData
(
FILE
*
file
,
BOARD
*
pcb
)
/****************************************************/
/****************************************************/
/* Creation de la section "$TRACKS"
/* Creation de la section "$TRACKS"
...
@@ -701,72 +701,60 @@ int* CreateTracksInfoData( FILE* file, BOARD* pcb )
...
@@ -701,72 +701,60 @@ int* CreateTracksInfoData( FILE* file, BOARD* pcb )
* TRACK <name> <width>
* TRACK <name> <width>
* $ENDTRACK
* $ENDTRACK
*
*
* on attribu
t
ici comme nom l'epaisseur des traits precede de "TRACK": ex
* on attribu
e
ici comme nom l'epaisseur des traits precede de "TRACK": ex
* pour une largeur de 120 : nom = "TRACK120".
* pour une largeur de 120 : nom = "TRACK120".
*/
*/
{
{
TRACK
*
track
;
TRACK
*
track
;
int
*
trackinfo
,
*
ptinfo
;
int
last_width
=
-
1
;
/* recherche des epaisseurs utilisees pour les traces: */
/* recherche des epaisseurs utilisees pour les traces: */
trackinfo
=
(
int
*
)
adr_lowmem
;
std
::
vector
<
int
>
trackinfo
;
*
trackinfo
=
-
1
;
unsigned
ii
;
for
(
track
=
pcb
->
m_Track
;
track
!=
NULL
;
track
=
track
->
Next
()
)
for
(
track
=
pcb
->
m_Track
;
track
!=
NULL
;
track
=
track
->
Next
()
)
{
{
if
(
*
trackinfo
!=
track
->
m_Width
)
// recherche d'une epaisseur deja utilisee
if
(
last_width
!=
track
->
m_Width
)
// recherche d'une epaisseur deja utilisee
{
{
ptinfo
=
(
int
*
)
adr_lowmem
;
for
(
ii
=
0
;
ii
<
trackinfo
.
size
();
ii
++
)
while
(
*
ptinfo
>=
0
)
{
{
if
(
*
ptinfo
!=
track
->
m_Width
)
if
(
trackinfo
[
ii
]
==
track
->
m_Width
)
ptinfo
++
;
else
break
;
break
;
}
}
trackinfo
=
ptinfo
;
if
(
ii
==
trackinfo
.
size
()
)
// not found
if
(
*
ptinfo
<
0
)
trackinfo
.
push_back
(
track
->
m_Width
);
{
*
ptinfo
=
track
->
m_Width
;
last_width
=
track
->
m_Width
;
ptinfo
++
;
*
ptinfo
=
-
1
;
}
}
}
}
}
for
(
track
=
pcb
->
m_Zone
;
track
!=
NULL
;
track
=
track
->
Next
()
)
for
(
track
=
pcb
->
m_Zone
;
track
!=
NULL
;
track
=
track
->
Next
()
)
{
{
if
(
*
trackinfo
!=
track
->
m_Width
)
// recherche d'une epaisseur deja utilisee
if
(
last_width
!=
track
->
m_Width
)
// recherche d'une epaisseur deja utilisee
{
{
ptinfo
=
(
int
*
)
adr_lowmem
;
for
(
ii
=
0
;
ii
<
trackinfo
.
size
();
ii
++
)
while
(
*
ptinfo
>=
0
)
{
{
if
(
*
ptinfo
!=
track
->
m_Width
)
if
(
trackinfo
[
ii
]
==
track
->
m_Width
)
ptinfo
++
;
else
break
;
break
;
}
}
trackinfo
=
ptinfo
;
if
(
ii
==
trackinfo
.
size
()
)
// not found
if
(
*
ptinfo
<
0
)
trackinfo
.
push_back
(
track
->
m_Width
);
{
*
ptinfo
=
track
->
m_Width
;
last_width
=
track
->
m_Width
;
ptinfo
++
;
*
ptinfo
=
-
1
;
}
}
}
}
}
// Write data
// Write data
fputs
(
"$TRACKS
\n
"
,
file
);
fputs
(
"$TRACKS
\n
"
,
file
);
for
(
trackinfo
=
(
int
*
)
adr_lowmem
;
*
trackinfo
>=
0
;
trackinfo
++
)
for
(
ii
=
0
;
ii
<
trackinfo
.
size
();
ii
++
)
{
{
fprintf
(
file
,
"TRACK TRACK%d %d
\n
"
,
*
trackinfo
,
*
trackinfo
);
fprintf
(
file
,
"TRACK TRACK%d %d
\n
"
,
trackinfo
[
ii
],
trackinfo
[
ii
]
);
}
}
fputs
(
"$ENDTRACKS
\n\n
"
,
file
);
fputs
(
"$ENDTRACKS
\n\n
"
,
file
);
return
(
int
*
)
adr_lowmem
;
}
}
...
...
pcbnew/initpcb.cpp
View file @
654045f2
...
@@ -149,9 +149,6 @@ bool WinEDA_BasePcbFrame::Clear_Pcb( bool query )
...
@@ -149,9 +149,6 @@ bool WinEDA_BasePcbFrame::Clear_Pcb( bool query )
/* init pointeurs et variables */
/* init pointeurs et variables */
GetScreen
()
->
m_FileName
.
Empty
();
GetScreen
()
->
m_FileName
.
Empty
();
memset
(
buf_work
,
0
,
BUFMEMSIZE
);
adr_lowmem
=
adr_max
=
buf_work
;
SetCurItem
(
NULL
);
SetCurItem
(
NULL
);
/* Init parametres de gestion */
/* Init parametres de gestion */
...
...
pcbnew/pcbnew.cpp
View file @
654045f2
...
@@ -42,7 +42,6 @@ extern PARAM_CFG_BASE* ParamCfgList[];
...
@@ -42,7 +42,6 @@ extern PARAM_CFG_BASE* ParamCfgList[];
char
*
buf_work
=
NULL
;
/* pointeur sur le buffer de travail */
char
*
buf_work
=
NULL
;
/* pointeur sur le buffer de travail */
char
*
adr_lowmem
=
NULL
;
/* adresse de base memoire de calcul disponible*/
char
*
adr_lowmem
=
NULL
;
/* adresse de base memoire de calcul disponible*/
char
*
adr_himem
=
NULL
;
/* adresse haute limite de la memoire disponible*/
char
*
adr_max
=
NULL
;
/* adresse haute maxi utilisee pour la memoire */
char
*
adr_max
=
NULL
;
/* adresse haute maxi utilisee pour la memoire */
int
Angle_Rot_Module
;
int
Angle_Rot_Module
;
...
@@ -143,7 +142,6 @@ Changing extension to .brd." ),
...
@@ -143,7 +142,6 @@ Changing extension to .brd." ),
/* allocation de la memoire pour le fichier et autres buffers: */
/* allocation de la memoire pour le fichier et autres buffers: */
/* On reserve BUFMEMSIZE octets de ram pour calcul */
/* On reserve BUFMEMSIZE octets de ram pour calcul */
buf_work
=
adr_lowmem
=
(
char
*
)
MyZMalloc
(
BUFMEMSIZE
);
/* adresse de la zone de calcul */
buf_work
=
adr_lowmem
=
(
char
*
)
MyZMalloc
(
BUFMEMSIZE
);
/* adresse de la zone de calcul */
adr_himem
=
adr_lowmem
+
BUFMEMSIZE
;
/* adr limite haute */
adr_max
=
adr_lowmem
;
adr_max
=
adr_lowmem
;
if
(
adr_lowmem
==
NULL
)
if
(
adr_lowmem
==
NULL
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment