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
03d85728
Commit
03d85728
authored
Mar 22, 2011
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
cc63f5f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
10 deletions
+37
-10
sch_sheet_pin.cpp
eeschema/sch_sheet_pin.cpp
+37
-10
No files found.
eeschema/sch_sheet_pin.cpp
View file @
03d85728
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include "general.h"
#include "general.h"
#include "protos.h"
#include "protos.h"
#include "sch_sheet.h"
#include "sch_sheet.h"
#include "kicad_string.h"
/* m_Edge define on which edge the pin is positionned:
/* m_Edge define on which edge the pin is positionned:
...
@@ -258,14 +259,40 @@ bool SCH_SHEET_PIN::Load( LINE_READER& aLine, wxString& aErrorMsg )
...
@@ -258,14 +259,40 @@ bool SCH_SHEET_PIN::Load( LINE_READER& aLine, wxString& aErrorMsg )
char
name
[
256
];
char
name
[
256
];
char
connectType
[
256
];
char
connectType
[
256
];
char
sheetSide
[
256
];
char
sheetSide
[
256
];
char
*
line
=
aLine
.
Line
();
char
*
cp
;
/* Read coordinates. */
static
const
char
delims
[]
=
"
\t
"
;
if
(
sscanf
(
((
char
*
)
aLine
),
"%s %s %s %s %d %d %d"
,
number
,
name
,
connectType
,
sheetSide
,
&
m_Pos
.
x
,
&
m_Pos
.
y
,
&
size
)
!=
7
)
// Read coordinates.
D
(
printf
(
"line:
\"
%s
\"\n
"
,
line
);)
cp
=
strtok
(
line
,
delims
);
strncpy
(
number
,
cp
,
sizeof
(
number
)
);
number
[
sizeof
(
number
)
-
1
]
=
0
;
cp
+=
strlen
(
number
)
+
1
;
cp
+=
ReadDelimitedText
(
name
,
cp
,
sizeof
(
name
)
);
cp
=
strtok
(
cp
,
delims
);
strncpy
(
connectType
,
cp
,
sizeof
(
connectType
)
);
connectType
[
sizeof
(
connectType
)
-
1
]
=
0
;
cp
=
strtok
(
NULL
,
delims
);
strncpy
(
sheetSide
,
cp
,
sizeof
(
sheetSide
)
);
sheetSide
[
sizeof
(
sheetSide
)
-
1
]
=
0
;
cp
+=
strlen
(
sheetSide
)
+
1
;
int
r
=
sscanf
(
cp
,
"%d %d %d"
,
&
m_Pos
.
x
,
&
m_Pos
.
y
,
&
size
);
if
(
r
!=
3
)
{
{
aErrorMsg
.
Printf
(
wxT
(
"EESchema file sheet hierarchical label error at line %d.
\n
"
),
aErrorMsg
.
Printf
(
wxT
(
"EESchema file sheet hierarchical label error at line %d.
\n
"
),
aLine
.
LineNumber
()
);
aLine
.
LineNumber
()
);
aErrorMsg
<<
FROM_UTF8
(
((
char
*
)
aLine
)
);
aErrorMsg
<<
FROM_UTF8
(
line
);
return
false
;
return
false
;
}
}
...
...
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