summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan2011-04-25 16:38:10 +0000
committerAndrew Dunstan2011-04-25 16:38:10 +0000
commit7e0f8f836da9a992c8cbd99c5c06ea40247d6a33 (patch)
tree7c7f1390c27c57a0aa49f5174f6cb9578de7bca3
parent76dd09bbec893c02376e3440a6a86a3b994d804c (diff)
Give getopt() a prototype and modern style arg specs.
Welcome to the 1990s.
-rw-r--r--src/port/getopt.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/port/getopt.c b/src/port/getopt.c
index aacfbc3e540..e901bf7db50 100644
--- a/src/port/getopt.c
+++ b/src/port/getopt.c
@@ -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 */