diff options
-rw-r--r-- | usr.bin/getopt/getopt.c | 5 | ||||
-rw-r--r-- | usr.bin/ktrace/ktrace.c | 2 | ||||
-rw-r--r-- | usr.bin/last/last.c | 2 | ||||
-rw-r--r-- | usr.bin/ldd/ldd.c | 2 | ||||
-rw-r--r-- | usr.bin/locate/code/locate.code.c | 3 | ||||
-rw-r--r-- | usr.bin/locate/locate/locate.c | 4 | ||||
-rw-r--r-- | usr.bin/m4/main.c | 4 | ||||
-rw-r--r-- | usr.bin/nfsstat/nfsstat.c | 2 | ||||
-rw-r--r-- | usr.bin/nm/nm.c | 1 | ||||
-rw-r--r-- | usr.bin/ranlib/ranlib.c | 1 | ||||
-rw-r--r-- | usr.bin/rlogin/rlogin.c | 2 | ||||
-rw-r--r-- | usr.bin/rpcinfo/rpcinfo.c | 3 | ||||
-rw-r--r-- | usr.bin/rup/rup.c | 1 | ||||
-rw-r--r-- | usr.bin/strings/strings.c | 2 | ||||
-rw-r--r-- | usr.bin/tconv/tconv.c | 3 | ||||
-rw-r--r-- | usr.bin/telnet/main.c | 6 | ||||
-rw-r--r-- | usr.bin/time/time.c | 3 | ||||
-rw-r--r-- | usr.bin/tput/tput.c | 6 | ||||
-rw-r--r-- | usr.bin/vacation/vacation.c | 2 |
19 files changed, 13 insertions, 41 deletions
diff --git a/usr.bin/getopt/getopt.c b/usr.bin/getopt/getopt.c index 060e2c9..fbadc92 100644 --- a/usr.bin/getopt/getopt.c +++ b/usr.bin/getopt/getopt.c @@ -1,11 +1,12 @@ +/* $FreeBSD$ */ + #include <stdio.h> +#include <unistd.h> main(argc, argv) int argc; char *argv[]; { - extern int optind; - extern char *optarg; int c; int status = 0; diff --git a/usr.bin/ktrace/ktrace.c b/usr.bin/ktrace/ktrace.c index 48d4871..e8353df 100644 --- a/usr.bin/ktrace/ktrace.c +++ b/usr.bin/ktrace/ktrace.c @@ -66,8 +66,6 @@ main(argc, argv) int argc; char **argv; { - extern int optind; - extern char *optarg; enum { NOTSET, CLEAR, CLEARALL } clear; int append, ch, fd, inherit, ops, pid, pidset, trpoints; char *tracefile; diff --git a/usr.bin/last/last.c b/usr.bin/last/last.c index 5efd9e8..a0c6f39 100644 --- a/usr.bin/last/last.c +++ b/usr.bin/last/last.c @@ -108,8 +108,6 @@ main(argc, argv) int argc; char *argv[]; { - extern int optind; - extern char *optarg; int ch; char *p; diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c index d565d60..5c25d05 100644 --- a/usr.bin/ldd/ldd.c +++ b/usr.bin/ldd/ldd.c @@ -65,7 +65,7 @@ char *argv[]; int c; int vflag = 0; - while ((c = getopt(argc, argv, "vf:")) != EOF) { + while ((c = getopt(argc, argv, "vf:")) != -1) { switch (c) { case 'v': vflag++; diff --git a/usr.bin/locate/code/locate.code.c b/usr.bin/locate/code/locate.code.c index c7cb097..e44c516 100644 --- a/usr.bin/locate/code/locate.code.c +++ b/usr.bin/locate/code/locate.code.c @@ -97,6 +97,7 @@ static char sccsid[] = "@(#)locate.code.c 8.1 (Berkeley) 6/6/93"; #include <stdlib.h> #include <string.h> #include <stdio.h> +#include <unistd.h> #include "locate.h" #define BGBUFSIZE (NBG * 2) /* size of bigram buffer */ @@ -119,8 +120,6 @@ int bgindex __P((char *)); void usage __P((void)); -extern int optind; -extern int optopt; int main(argc, argv) diff --git a/usr.bin/locate/locate/locate.c b/usr.bin/locate/locate/locate.c index a0ffe0d..0ee14f3 100644 --- a/usr.bin/locate/locate/locate.c +++ b/usr.bin/locate/locate/locate.c @@ -140,10 +140,6 @@ extern u_char *tolower_word __P((u_char *)); extern int check_bigram_char __P((int)); extern char *patprep __P((char *)); -extern char *optarg; -extern int optind; - - int main(argc, argv) int argc; diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c index 41b7b13..93fd81f 100644 --- a/usr.bin/m4/main.c +++ b/usr.bin/m4/main.c @@ -139,12 +139,8 @@ struct keyblk keywrds[] = { /* m4 keywords to be installed */ #define MAXKEYS (sizeof(keywrds)/sizeof(struct keyblk)) -extern int optind; -extern char *optarg; - void macro(); void initkwds(); -extern int getopt(); int main(argc,argv) diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c index 25ef8e5..dc4a625 100644 --- a/usr.bin/nfsstat/nfsstat.c +++ b/usr.bin/nfsstat/nfsstat.c @@ -91,8 +91,6 @@ main(argc, argv) int argc; char **argv; { - extern int optind; - extern char *optarg; u_int interval; int clientOnly = -1; int serverOnly = -1; diff --git a/usr.bin/nm/nm.c b/usr.bin/nm/nm.c index 91665b2..59442c0 100644 --- a/usr.bin/nm/nm.c +++ b/usr.bin/nm/nm.c @@ -97,7 +97,6 @@ main(argc, argv) int argc; char **argv; { - extern int optind; int ch, errors; while ((ch = getopt(argc, argv, "agnoprtuwW")) != -1) { diff --git a/usr.bin/ranlib/ranlib.c b/usr.bin/ranlib/ranlib.c index 4026331..6177984 100644 --- a/usr.bin/ranlib/ranlib.c +++ b/usr.bin/ranlib/ranlib.c @@ -68,7 +68,6 @@ main(argc, argv) int argc; char **argv; { - extern int optind; int ch, eval, tflag; tflag = 0; diff --git a/usr.bin/rlogin/rlogin.c b/usr.bin/rlogin/rlogin.c index 51ef079..15fbe93 100644 --- a/usr.bin/rlogin/rlogin.c +++ b/usr.bin/rlogin/rlogin.c @@ -144,8 +144,6 @@ main(argc, argv) int argc; char *argv[]; { - extern char *optarg; - extern int optind; struct passwd *pw; struct servent *sp; struct sgttyb ttyb; diff --git a/usr.bin/rpcinfo/rpcinfo.c b/usr.bin/rpcinfo/rpcinfo.c index 99089bb..622ea81 100644 --- a/usr.bin/rpcinfo/rpcinfo.c +++ b/usr.bin/rpcinfo/rpcinfo.c @@ -53,6 +53,7 @@ static char rcsid[] = #include <rpc/pmap_clnt.h> #include <signal.h> #include <ctype.h> +#include <unistd.h> #include <sys/param.h> #include <arpa/inet.h> @@ -89,8 +90,6 @@ main(argc, argv) char **argv; { register int c; - extern char *optarg; - extern int optind; int errflg; int function; u_short portnum; diff --git a/usr.bin/rup/rup.c b/usr.bin/rup/rup.c index b916e9d..aeadfc5 100644 --- a/usr.bin/rup/rup.c +++ b/usr.bin/rup/rup.c @@ -208,7 +208,6 @@ int main(int argc, char *argv[]) { int ch; - extern int optind; while ((ch = getopt(argc, argv, "?")) != -1) switch (ch) { diff --git a/usr.bin/strings/strings.c b/usr.bin/strings/strings.c index 6a49d63..128292f 100644 --- a/usr.bin/strings/strings.c +++ b/usr.bin/strings/strings.c @@ -78,8 +78,6 @@ main(argc, argv) int argc; char **argv; { - extern char *optarg; - extern int optind; register int ch, cnt; register u_char *C; EXEC *head; diff --git a/usr.bin/tconv/tconv.c b/usr.bin/tconv/tconv.c index a9d035d..f61f8d2 100644 --- a/usr.bin/tconv/tconv.c +++ b/usr.bin/tconv/tconv.c @@ -1202,9 +1202,6 @@ int main(argc, argv) int argc; char **argv; { - extern char *optarg; - extern int optind; - extern int opterr; char *term = NULL; char *file = NULL; int r; diff --git a/usr.bin/telnet/main.c b/usr.bin/telnet/main.c index 9126738..657f560 100644 --- a/usr.bin/telnet/main.c +++ b/usr.bin/telnet/main.c @@ -43,6 +43,8 @@ static char copyright[] = static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 12/15/93"; #endif /* not lint */ +#include <unistd.h> +#include <string.h> #include <sys/types.h> #include <sys/socket.h> @@ -125,10 +127,8 @@ main(argc, argv) int argc; char *argv[]; { - extern char *optarg; - extern int optind; int ch; - char *user, *strrchr(); + char *user; char *src_addr = NULL; #ifdef FORWARD extern int forward_flags; diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c index 960d00e..e802e4d 100644 --- a/usr.bin/time/time.c +++ b/usr.bin/time/time.c @@ -68,9 +68,6 @@ main(argc, argv) int argc; char **argv; { - extern char *optarg; - extern int optind; - register int pid; int aflag, ch, lflag, status, pflag; struct timeval before, after; diff --git a/usr.bin/tput/tput.c b/usr.bin/tput/tput.c index 2eb3e46..67a6b53 100644 --- a/usr.bin/tput/tput.c +++ b/usr.bin/tput/tput.c @@ -38,7 +38,11 @@ static char copyright[] = #endif /* not lint */ #ifndef lint +#if 0 static char sccsid[] = "@(#)tput.c 8.2 (Berkeley) 3/19/94"; +#endif +static char rcsid[] = +"$FreeBSD$"; #endif /* not lint */ #include <termios.h> @@ -61,8 +65,6 @@ main(argc, argv) int argc; char **argv; { - extern char *optarg; - extern int optind; int ch, exitval, n; char *cptr, *p, *term, buf[1024], tbuf[1024]; diff --git a/usr.bin/vacation/vacation.c b/usr.bin/vacation/vacation.c index 98a2987..9a5790e 100644 --- a/usr.bin/vacation/vacation.c +++ b/usr.bin/vacation/vacation.c @@ -109,8 +109,6 @@ main(argc, argv) int argc; char **argv; { - extern int optind, opterr; - extern char *optarg; struct passwd *pw; ALIAS *cur; time_t interval; |