www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/08/19/09:44:04

Message-Id: <199908191302.IAA12821@darwin.sfbr.org>
Date: Thu, 19 Aug 1999 08:02:08 -0500 (CDT)
From: Jeff Williams <jeffw AT darwin DOT sfbr DOT org>
Subject: minor patch for 2.02 libc docs for getopt
To: djgpp-workers AT delorie DOT com
MIME-Version: 1.0
X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.3.4 SunOS 5.7 sun4u sparc
Reply-To: djgpp-workers AT delorie DOT com

-: > 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019