FreeCalypso > hg > ueda-linux
diff pads2gpcb/rdunits.c @ 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 | aa0539cc3d41 |
children |
line wrap: on
line diff
--- 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;