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
4bbdeab9
Commit
4bbdeab9
authored
May 08, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Plain Diff
Fixed eeschema crash when reading a void library file
parents
f54d3424
31406023
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
8 deletions
+15
-8
class_library.cpp
eeschema/class_library.cpp
+11
-0
class_library.h
eeschema/class_library.h
+1
-4
netlist.cpp
eeschema/netlist.cpp
+3
-4
No files found.
eeschema/class_library.cpp
View file @
4bbdeab9
...
@@ -175,6 +175,17 @@ CMP_LIB_ENTRY* CMP_LIBRARY::FindEntry( const wxChar* aName, LibrEntryType aType
...
@@ -175,6 +175,17 @@ CMP_LIB_ENTRY* CMP_LIBRARY::FindEntry( const wxChar* aName, LibrEntryType aType
return
NULL
;
return
NULL
;
}
}
/**
* Return the first entry in the library.
* @return The first entry or NULL if the library has no entries.
*/
CMP_LIB_ENTRY
*
CMP_LIBRARY
::
GetFirstEntry
()
{
if
(
entries
.
size
()
)
return
&
entries
.
front
();
else
return
NULL
;
}
LIB_COMPONENT
*
CMP_LIBRARY
::
FindComponent
(
const
wxChar
*
aName
)
LIB_COMPONENT
*
CMP_LIBRARY
::
FindComponent
(
const
wxChar
*
aName
)
{
{
...
...
eeschema/class_library.h
View file @
4bbdeab9
...
@@ -317,10 +317,7 @@ public:
...
@@ -317,10 +317,7 @@ public:
*
*
* @return The first entry or NULL if the library has no entries.
* @return The first entry or NULL if the library has no entries.
*/
*/
CMP_LIB_ENTRY
*
GetFirstEntry
()
CMP_LIB_ENTRY
*
GetFirstEntry
();
{
return
&
entries
.
front
();
}
/**
/**
* Find next library entry by /a aName.
* Find next library entry by /a aName.
...
...
eeschema/netlist.cpp
View file @
4bbdeab9
...
@@ -706,7 +706,7 @@ static int ConvertBusToMembers( NETLIST_OBJECT_LIST& aNetItemBuffer,
...
@@ -706,7 +706,7 @@ static int ConvertBusToMembers( NETLIST_OBJECT_LIST& aNetItemBuffer,
else
else
BusLabel
.
m_Type
=
NET_BUSLABELMEMBER
;
BusLabel
.
m_Type
=
NET_BUSLABELMEMBER
;
/* Conversion of BusLabel
in the root of the Label + the number of wire
. */
/* Conversion of BusLabel
to the root Label name + the member id like mybus0, mybus1 ..
. */
BufLine
=
BusLabel
.
m_Label
->
Left
(
RootBusNameLength
);
BufLine
=
BusLabel
.
m_Label
->
Left
(
RootBusNameLength
);
BusMember
=
FirstNumWireBus
;
BusMember
=
FirstNumWireBus
;
...
@@ -721,8 +721,7 @@ static int ConvertBusToMembers( NETLIST_OBJECT_LIST& aNetItemBuffer,
...
@@ -721,8 +721,7 @@ static int ConvertBusToMembers( NETLIST_OBJECT_LIST& aNetItemBuffer,
NETLIST_OBJECT
*
new_label
=
new
NETLIST_OBJECT
(
BusLabel
);
NETLIST_OBJECT
*
new_label
=
new
NETLIST_OBJECT
(
BusLabel
);
NumItem
++
;
NumItem
++
;
/* Conversion of BusLabel in the root of the Label + the number
/* Conversion of BusLabel to the root name + the current member id.*/
* of wire */
BufLine
=
BusLabel
.
m_Label
->
Left
(
RootBusNameLength
);
BufLine
=
BusLabel
.
m_Label
->
Left
(
RootBusNameLength
);
BufLine
<<
BusMember
;
BufLine
<<
BusMember
;
new_label
->
m_Label
=
new
wxString
(
BufLine
);
new_label
->
m_Label
=
new
wxString
(
BufLine
);
...
@@ -739,7 +738,7 @@ static int ConvertBusToMembers( NETLIST_OBJECT_LIST& aNetItemBuffer,
...
@@ -739,7 +738,7 @@ static int ConvertBusToMembers( NETLIST_OBJECT_LIST& aNetItemBuffer,
* PropageNetCode propagates Netcode NewNetCode on all elements
* PropageNetCode propagates Netcode NewNetCode on all elements
* belonging to the former Netcode OldNetCode
* belonging to the former Netcode OldNetCode
* If IsBus == 0; Netcode is the member who is spreading
* If IsBus == 0; Netcode is the member who is spreading
* If IsBus
!
= 0; is the member who is spreading BusNetCode
* If IsBus
!
= 0; is the member who is spreading BusNetCode
*/
*/
static
void
PropageNetCode
(
int
OldNetCode
,
int
NewNetCode
,
int
IsBus
)
static
void
PropageNetCode
(
int
OldNetCode
,
int
NewNetCode
,
int
IsBus
)
{
{
...
...
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