You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@locus.apache.org on 2000/12/27 20:39:19 UTC
cvs commit: apache-1.3/src/os/win32 getopt.c getopt.h
wrowe 00/12/27 11:39:18
Modified: src/os/win32 getopt.c getopt.h
Log:
Whoops... win32 getopt implementation was not -quite- kosher, added
optreset per getopt(3) man page's re-parse instructions.
Revision Changes Path
1.2 +3 -0 apache-1.3/src/os/win32/getopt.c
Index: getopt.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/os/win32/getopt.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- getopt.c 1997/06/15 19:22:51 1.1
+++ getopt.c 2000/12/27 19:39:18 1.2
@@ -10,6 +10,7 @@
#define OPTERRARG (3)
char *optarg;
+int optreset = 0;
int optind = 1;
int opterr = 1;
int optopt;
@@ -51,6 +52,8 @@
char *cp;
+ if (optreset)
+ optreset = optchr = dash = 0;
if(optind >= argc)
return(EOF);
if(!dash && (argv[optind][0] != '-'))
1.2 +1 -0 apache-1.3/src/os/win32/getopt.h
Index: getopt.h
===================================================================
RCS file: /home/cvs/apache-1.3/src/os/win32/getopt.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- getopt.h 1997/06/15 19:22:52 1.1
+++ getopt.h 2000/12/27 19:39:18 1.2
@@ -2,6 +2,7 @@
#define GETOPT_H
extern char *optarg;
+extern int optreset;
extern int optind;
extern int opterr;
extern int optopt;