Give getopt() a prototype and modern style arg specs.
authorAndrew Dunstan <[email protected]>
Mon, 25 Apr 2011 16:38:10 +0000 (12:38 -0400)
committerAndrew Dunstan <[email protected]>
Mon, 25 Apr 2011 16:38:10 +0000 (12:38 -0400)
Welcome to the 1990s.

src/port/getopt.c

index aacfbc3e540e91354da0802edb82fcadc51fe0b9..e901bf7db50f0d1efc7690ac51a1b160217b4e41 100644 (file)
@@ -61,6 +61,8 @@ extern char *optarg;
 #define BADARG (int)':'
 #define EMSG   ""
 
+int getopt(int nargc, char *const * nargv, const char * ostr);
+
 /*
  * getopt
  *     Parse argc/argv argument vector.
@@ -72,10 +74,7 @@ extern char *optarg;
  * returning -1.)
  */
 int
-getopt(nargc, nargv, ostr)
-int                    nargc;
-char      *const * nargv;
-const char *ostr;
+getopt(int nargc, char *const * nargv, const char * ostr)
 {
        static char *place = EMSG;      /* option letter processing */
        char       *oli;                        /* option letter list index */