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
1da099dd
Commit
1da099dd
authored
Jul 07, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for bug 1022026
parent
04a17d33
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
legacy_plugin.cpp
pcbnew/legacy_plugin.cpp
+10
-3
No files found.
pcbnew/legacy_plugin.cpp
View file @
1da099dd
...
@@ -106,10 +106,16 @@ typedef LEGACY_PLUGIN::BIU BIU;
...
@@ -106,10 +106,16 @@ typedef LEGACY_PLUGIN::BIU BIU;
#define SZ( x ) (sizeof(x)-1)
#define SZ( x ) (sizeof(x)-1)
static
const
char
delims
[]
=
"
\t\r\n
"
;
static
bool
inline
isSpace
(
int
c
)
{
return
strchr
(
delims
,
c
)
!=
0
;
}
//-----<BOARD Load Functions>---------------------------------------------------
//-----<BOARD Load Functions>---------------------------------------------------
/// C string compare test for a specific length of characters.
/// C string compare test for a specific length of characters.
#define TESTLINE( x ) ( !strnicmp( line, x, SZ( x ) ) && is
s
pace( line[SZ( x )] ) )
#define TESTLINE( x ) ( !strnicmp( line, x, SZ( x ) ) && is
S
pace( line[SZ( x )] ) )
/// C sub-string compare test for a specific length of characters.
/// C sub-string compare test for a specific length of characters.
#define TESTSUBSTR( x ) ( !strnicmp( line, x, SZ( x ) ) )
#define TESTSUBSTR( x ) ( !strnicmp( line, x, SZ( x ) ) )
...
@@ -141,7 +147,6 @@ static inline unsigned ReadLine( LINE_READER* rdr, const char* caller )
...
@@ -141,7 +147,6 @@ static inline unsigned ReadLine( LINE_READER* rdr, const char* caller )
#define READLINE( rdr ) ReadLine( rdr, __FUNCTION__ )
#define READLINE( rdr ) ReadLine( rdr, __FUNCTION__ )
#endif
#endif
static
const
char
delims
[]
=
"
\t\r\n
"
;
using
namespace
std
;
// auto_ptr
using
namespace
std
;
// auto_ptr
...
@@ -1101,8 +1106,10 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule )
...
@@ -1101,8 +1106,10 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule )
data
=
data
+
ReadDelimitedText
(
mypadname
,
data
,
sizeof
(
mypadname
)
)
+
1
;
// +1 trailing whitespace
data
=
data
+
ReadDelimitedText
(
mypadname
,
data
,
sizeof
(
mypadname
)
)
+
1
;
// +1 trailing whitespace
// sscanf( PtLine, " %s %d %d %d %d %d", BufCar, &m_Size.x, &m_Size.y, &m_DeltaSize.x, &m_DeltaSize.y, &m_Orient );
// sscanf( PtLine, " %s %d %d %d %d %d", BufCar, &m_Size.x, &m_Size.y, &m_DeltaSize.x, &m_DeltaSize.y, &m_Orient );
while
(
isSpace
(
*
data
)
)
++
data
;
int
padshape
=
*
data
++
;
int
padshape
=
*
data
++
;
BIU
size_x
=
biuParse
(
data
,
&
data
);
BIU
size_x
=
biuParse
(
data
,
&
data
);
BIU
size_y
=
biuParse
(
data
,
&
data
);
BIU
size_y
=
biuParse
(
data
,
&
data
);
BIU
delta_x
=
biuParse
(
data
,
&
data
);
BIU
delta_x
=
biuParse
(
data
,
&
data
);
...
...
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