Skip to content

Commit 7e0f8f8

Browse files
committed
Give getopt() a prototype and modern style arg specs.
Welcome to the 1990s.
1 parent 76dd09b commit 7e0f8f8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/port/getopt.c

+3-4
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ extern char *optarg;
6161
#define BADARG (int)':'
6262
#define EMSG ""
6363

64+
int getopt(int nargc, char *const * nargv, const char * ostr);
65+
6466
/*
6567
* getopt
6668
* Parse argc/argv argument vector.
@@ -72,10 +74,7 @@ extern char *optarg;
7274
* returning -1.)
7375
*/
7476
int
75-
getopt(nargc, nargv, ostr)
76-
int nargc;
77-
char *const * nargv;
78-
const char *ostr;
77+
getopt(int nargc, char *const * nargv, const char * ostr)
7978
{
8079
static char *place = EMSG; /* option letter processing */
8180
char *oli; /* option letter list index */

0 commit comments

Comments
 (0)