summaryrefslogtreecommitdiff
path: root/kicad
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-19 05:47:06 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-09-19 05:47:06 (GMT)
commit269b377f0066130ef209d653dbf3787800e77f24 (patch)
tree61cdf9f6cecb16a7b059c4bfdc95158220786546 /kicad
parentb833d34d8572bf8f8ff9c963b34d57122901a228 (diff)
downloadeeshow-269b377f0066130ef209d653dbf3787800e77f24.zip
eeshow-269b377f0066130ef209d653dbf3787800e77f24.tar.gz
eeshow-269b377f0066130ef209d653dbf3787800e77f24.tar.bz2
kicad/lib-parse.c (lib_parse_line): use "n" only for %n
Diffstat (limited to 'kicad')
-rw-r--r--kicad/lib-parse.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kicad/lib-parse.c b/kicad/lib-parse.c
index 8c3e62d..38f4a1b 100644
--- a/kicad/lib-parse.c
+++ b/kicad/lib-parse.c
@@ -226,7 +226,8 @@ static bool lib_parse_line(const struct file *file,
void *user, const char *line)
{
struct lib *lib = user;
- int n = 0;
+ int n = 0; /* use ONLY for %n */
+ int i;
unsigned points;
struct lib_obj *obj;
char *s, *style;
@@ -245,11 +246,11 @@ static bool lib_parse_line(const struct file *file,
lib->state = lib_draw;
return 1;
}
- if (sscanf(line, "F%d \"\" %*d %*d %*d %*c %c", &n, &vis) == 2
+ if (sscanf(line, "F%d \"\" %*d %*d %*d %*c %c", &i, &vis) == 2
|| sscanf(line, "F%d \"%*[^\"]\" %*d %*d %*d %*c %c",
- &n, &vis) == 2) {
+ &i, &vis) == 2) {
if (vis == 'V')
- lib->curr_comp->visible |= 1 << n;
+ lib->curr_comp->visible |= 1 << i;
return 1;
}
if (add_aliases(lib->curr_comp, line))