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
3dbae0b8
Commit
3dbae0b8
authored
Nov 13, 2010
by
Marco Serantoni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX: PRIO_MAX already defined is Maximum Process Priority in (sys/resource.h)
parent
9b77f2a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
netlist.cpp
eeschema/netlist.cpp
+6
-6
No files found.
eeschema/netlist.cpp
View file @
3dbae0b8
...
...
@@ -380,17 +380,17 @@ static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer )
// Define a priority (from low to high) to sort labels:
// NET_PINLABEL and NET_GLOBLABEL are global labels
// and priority >= PRIO_MAX-1 is for global connections
// and priority >=
NET_
PRIO_MAX-1 is for global connections
// ( i.e. for labels that are not prefixed by a sheetpath)
#define PRIO_MAX 4
int
priority_order
[
PRIO_MAX
+
1
]
=
#define
NET_
PRIO_MAX 4
int
priority_order
[
NET_
PRIO_MAX
+
1
]
=
{
NET_ITEM_UNSPECIFIED
,
NET_LABEL
,
NET_HIERLABEL
,
NET_PINLABEL
,
NET_GLOBLABEL
};
NETLIST_OBJECT
*
item
=
aLabelItemBuffer
[
0
];
// Calculate item priority (initial priority)
int
item_priority
=
0
;
for
(
unsigned
ii
=
0
;
ii
<=
PRIO_MAX
;
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<=
NET_
PRIO_MAX
;
ii
++
)
{
if
(
item
->
m_Type
==
priority_order
[
ii
]
)
{
...
...
@@ -404,7 +404,7 @@ static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer )
NETLIST_OBJECT
*
candidate
=
aLabelItemBuffer
[
ii
];
// Calculate candidate priority
int
candidate_priority
=
0
;
for
(
unsigned
ii
=
0
;
ii
<=
PRIO_MAX
;
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<=
NET_
PRIO_MAX
;
ii
++
)
{
if
(
candidate
->
m_Type
==
priority_order
[
ii
]
)
{
...
...
@@ -425,7 +425,7 @@ static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer )
// because the actual name is /sheetpath/label
// and for a given path length, by alphabetic order
if
(
item_priority
>=
PRIO_MAX
-
1
)
// global label or pin label
if
(
item_priority
>=
NET_
PRIO_MAX
-
1
)
// global label or pin label
{
// selection by alphabetic order:
if
(
candidate
->
m_Label
.
Cmp
(
item
->
m_Label
)
<
0
)
item
=
candidate
;
...
...
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