Mail Archives: djgpp-workers/1999/08/19/09:44:04
-: > I believe there are some errors in the documentation
-: > for `getopt' in DJGPP C Library Version 2.02 Reference
-:
-: First off, get the latest versions of the source files from CVS (see
-: the djgpp web page for details) and see if they're already fixed.
OK, I checked out the latest source files and had a look. Here is my
suggested patch for getopt.txh.
jtw
*** src/libc/posix/unistd/getopt.txh Sun Sep 27 10:22:24 1998
--- src/libc/posix/unistd/getopt.txh.new Thu Aug 19 07:53:46 1999
***************
*** 6,13 ****
int getopt(int argc, char * const *argv, const char *options);
extern char *optarg;
! extern int optind, opterr;
! extern char optopt;
@end example
@subheading Description
--- 6,12 ----
int getopt(int argc, char * const *argv, const char *options);
extern char *optarg;
! extern int optind, opterr, optopt;
@end example
@subheading Description
***************
*** 54,60 ****
output_filename = optarg;
break;
case '?':
! printf("Unknown option %c\n", c);
usage();
exit(1);
@}
--- 53,59 ----
output_filename = optarg;
break;
case '?':
! printf("Unknown option %c\n", optopt);
usage();
exit(1);
@}
- Raw text -