Give getopt() a prototype and modern style arg specs.
Welcome to the 1990s.
This commit is contained in:
parent
76dd09bbec
commit
7e0f8f836d
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user