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
76344d43
Commit
76344d43
authored
Jan 18, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more specctra dsn work
parent
879fceca
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
753 additions
and
106 deletions
+753
-106
dsn.cpp
pcbnew/dsn.cpp
+23
-18
dsn.h
pcbnew/dsn.h
+4
-0
specctra.cpp
pcbnew/specctra.cpp
+726
-88
No files found.
pcbnew/dsn.cpp
View file @
76344d43
...
@@ -81,6 +81,7 @@ const static KEYWORD tokens[] = {
...
@@ -81,6 +81,7 @@ const static KEYWORD tokens[] = {
TOKDEF
(
boundary
),
TOKDEF
(
boundary
),
TOKDEF
(
brickpat
),
TOKDEF
(
brickpat
),
TOKDEF
(
bundle
),
TOKDEF
(
bundle
),
TOKDEF
(
bus
),
TOKDEF
(
bypass
),
TOKDEF
(
bypass
),
TOKDEF
(
capacitance_resolution
),
TOKDEF
(
capacitance_resolution
),
TOKDEF
(
capacitor
),
TOKDEF
(
capacitor
),
...
@@ -136,6 +137,7 @@ const static KEYWORD tokens[] = {
...
@@ -136,6 +137,7 @@ const static KEYWORD tokens[] = {
TOKDEF
(
family
),
TOKDEF
(
family
),
TOKDEF
(
family_family
),
TOKDEF
(
family_family
),
TOKDEF
(
family_family_spacing
),
TOKDEF
(
family_family_spacing
),
TOKDEF
(
fanout
),
TOKDEF
(
farad
),
TOKDEF
(
farad
),
TOKDEF
(
file
),
TOKDEF
(
file
),
TOKDEF
(
fit
),
TOKDEF
(
fit
),
...
@@ -301,6 +303,7 @@ const static KEYWORD tokens[] = {
...
@@ -301,6 +303,7 @@ const static KEYWORD tokens[] = {
TOKDEF
(
primary
),
TOKDEF
(
primary
),
TOKDEF
(
priority
),
TOKDEF
(
priority
),
TOKDEF
(
property
),
TOKDEF
(
property
),
TOKDEF
(
protect
),
TOKDEF
(
qarc
),
TOKDEF
(
qarc
),
TOKDEF
(
quarter
),
TOKDEF
(
quarter
),
TOKDEF
(
radius
),
TOKDEF
(
radius
),
...
@@ -355,6 +358,7 @@ const static KEYWORD tokens[] = {
...
@@ -355,6 +358,7 @@ const static KEYWORD tokens[] = {
TOKDEF
(
smd
),
TOKDEF
(
smd
),
TOKDEF
(
snap
),
TOKDEF
(
snap
),
TOKDEF
(
snap_angle
),
TOKDEF
(
snap_angle
),
TOKDEF
(
soft
),
TOKDEF
(
source
),
TOKDEF
(
source
),
TOKDEF
(
space_in_quoted_tokens
),
TOKDEF
(
space_in_quoted_tokens
),
TOKDEF
(
spacing
),
TOKDEF
(
spacing
),
...
@@ -688,27 +692,28 @@ L_read:
...
@@ -688,27 +692,28 @@ L_read:
head
=
cur
+
1
;
head
=
cur
+
1
;
}
}
// handle T_DASH or T_NUMBER
/* get the dash out of a <pin_reference> which is embedded for example
like: U2-14 or "U2"-"14"
This is detectable by a non-space immediately preceeding the dash.
*/
else
if
(
*
cur
==
'-'
&&
cur
>
start
&&
!
isspace
(
cur
[
-
1
]
)
)
{
head
=
cur
+
1
;
curText
.
clear
();
curText
+=
'-'
;
curTok
=
T_DASH
;
}
// handle T_NUMBER
else
if
(
strchr
(
"+-.0123456789"
,
*
cur
)
)
else
if
(
strchr
(
"+-.0123456789"
,
*
cur
)
)
{
{
if
(
*
cur
==
'-'
&&
!
strchr
(
".0123456789"
,
*
(
cur
+
1
)
)
)
head
=
cur
+
1
;
{
while
(
head
<
limit
&&
strchr
(
".0123456789"
,
*
head
)
)
head
=
cur
+
1
;
++
head
;
curText
.
clear
();
curText
+=
*
cur
;
curTok
=
T_DASH
;
}
else
{
head
=
cur
+
1
;
while
(
head
<
limit
&&
strchr
(
".0123456789"
,
*
head
)
)
++
head
;
curText
.
clear
();
curText
.
clear
();
curText
.
append
(
cur
,
head
);
curText
.
append
(
cur
,
head
);
curTok
=
T_NUMBER
;
curTok
=
T_NUMBER
;
}
}
}
// a quoted string
// a quoted string
...
...
pcbnew/dsn.h
View file @
76344d43
...
@@ -81,6 +81,7 @@ enum DSN_T {
...
@@ -81,6 +81,7 @@ enum DSN_T {
T_boundary
,
T_boundary
,
T_brickpat
,
T_brickpat
,
T_bundle
,
T_bundle
,
T_bus
,
T_bypass
,
T_bypass
,
T_capacitance_resolution
,
T_capacitance_resolution
,
T_capacitor
,
T_capacitor
,
...
@@ -136,6 +137,7 @@ enum DSN_T {
...
@@ -136,6 +137,7 @@ enum DSN_T {
T_family
,
T_family
,
T_family_family
,
T_family_family
,
T_family_family_spacing
,
T_family_family_spacing
,
T_fanout
,
T_farad
,
T_farad
,
T_file
,
T_file
,
T_fit
,
T_fit
,
...
@@ -301,6 +303,7 @@ enum DSN_T {
...
@@ -301,6 +303,7 @@ enum DSN_T {
T_primary
,
T_primary
,
T_priority
,
T_priority
,
T_property
,
T_property
,
T_protect
,
T_qarc
,
T_qarc
,
T_quarter
,
T_quarter
,
T_radius
,
T_radius
,
...
@@ -355,6 +358,7 @@ enum DSN_T {
...
@@ -355,6 +358,7 @@ enum DSN_T {
T_smd
,
T_smd
,
T_snap
,
T_snap
,
T_snap_angle
,
T_snap_angle
,
T_soft
,
T_source
,
T_source
,
T_space_in_quoted_tokens
,
T_space_in_quoted_tokens
,
T_spacing
,
T_spacing
,
...
...
pcbnew/specctra.cpp
View file @
76344d43
This diff is collapsed.
Click to expand it.
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