Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7e0f8f8

Browse files
committed
Give getopt() a prototype and modern style arg specs.
Welcome to the 1990s.
1 parent76dd09b commit7e0f8f8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

‎src/port/getopt.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ extern char *optarg;
6161
#defineBADARG(int)':'
6262
#defineEMSG""
6363

64+
intgetopt(intnargc,char*const*nargv,constchar*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-
intnargc;
77-
char*const*nargv;
78-
constchar*ostr;
77+
getopt(intnargc,char*const*nargv,constchar*ostr)
7978
{
8079
staticchar*place=EMSG;/* option letter processing */
8180
char*oli;/* option letter list index */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp