a bug in the argument processing of 'bc' (v1.06) prevents it from properly
reading long-format options. compare short opt "-l" versus long opt
"--mathlib" for example. the patch below should fix it. a spelling error has
been fixed as well. i've submitted this patch to the bc author (over a year
ago), but the bug persists, so i hope we can at least work it out of the gentoo
distribution.
thanks,
shac ron.
--- bc/main.c Thu May 1 00:35:46 2003
+++ bc/main.c Thu May 1 01:24:13 2003
@@ -63,7 +63,7 @@
printf ("usage: %s [options] [file ...]\n%s%s%s%s%s%s%s", progname,
" -h --help print this usage and exit\n",
" -i --interactive force interactive mode\n",
- " -l --mathlib use the predefine math routnes\n",
+ " -l --mathlib use the predefined math routines\n",
" -q --quiet don't print initial banner\n",
" -s --standard non-standard bc constructs are errors\n",
" -w --warn warn about non-standard bc constructs\n",
@@ -127,6 +127,9 @@
warn_not_std = TRUE;
break;
+ case 0: /* a longopt was processed */
+ break;
+
default:
usage(argv[0]);
exit (1);