FreeCalypso > hg > ueda-linux
changeset 42:43ba91b137e2
pads2gpcb: starting to grok decal definitions
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 11 Jan 2016 19:21:29 +0000 |
parents | a2d304ec3817 |
children | 4a50888d09ce |
files | pads2gpcb/main.c pads2gpcb/rdunits.c |
diffstat | 2 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/pads2gpcb/main.c Mon Jan 11 18:31:44 2016 +0000 +++ b/pads2gpcb/main.c Mon Jan 11 19:21:29 2016 +0000 @@ -53,11 +53,11 @@ if (input_line_buf[0] != '*') continue; parse_starline(); -#if 0 loop: if (!strcmp(input_line_starkw, "PARTDECAL")) { process_partdecal_section(); goto loop; } +#if 0 if (!strcmp(input_line_starkw, "PARTTYPE")) { process_parttype_section(); goto loop;
--- a/pads2gpcb/rdunits.c Mon Jan 11 18:31:44 2016 +0000 +++ b/pads2gpcb/rdunits.c Mon Jan 11 19:21:29 2016 +0000 @@ -10,7 +10,7 @@ long accum; int sign = 1; char *cp; - int maxdec, ndec; + int maxdec, ndec, rounderr; cp = srcstr; if (*cp == '-') { @@ -60,13 +60,15 @@ switch (input_units_current) { case 'B': if (accum % 3) { - fprintf(stderr, - "%s line %d: basic units dimension \"%s\" not divisible by 3\n", - input_filename, input_lineno, srcstr); - exit(1); - } + printf( + "warning: line %d basic units dimension \"%s\" not divisible by 3\n", + input_lineno, srcstr); + rounderr = 1; + } else + rounderr = 0; accum /= 3; accum *= 2; + accum += rounderr; break; case 'I': accum *= 254;