Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 51525 - bc 1.06 - getopts bugs
Summary: bc 1.06 - getopts bugs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-19 19:41 UTC by joe bruin
Modified: 2005-02-10 22:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description joe bruin 2004-05-19 19:41:25 UTC
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);
Comment 1 SpanKY gentoo-dev 2005-02-10 22:13:45 UTC
added to bc-1.06-r6

thanks ! :)