From 48a5c3efa945cbc80be006c3e198d4fd927905d8 Mon Sep 17 00:00:00 2001 From: simonb Date: Fri, 14 Apr 2000 05:58:01 +0000 Subject: [PATCH] Don't declare 'extern opt*' getopt variables. --- games/arithmetic/arithmetic.c | 6 ++---- games/fortune/fortune/fortune.c | 6 ++---- games/hunt/hunt/hunt.c | 6 ++---- games/hunt/huntd/driver.c | 6 ++---- sbin/fsck_lfs/main.c | 4 +--- sbin/lmcctl/lmcctl.c | 5 +---- sbin/mount_ext2fs/mount_ext2fs.c | 5 ++--- sbin/mount_ffs/mount_ffs.c | 5 ++--- sbin/raidctl/raidctl.c | 4 +--- sbin/sysctl/pathconf.c | 6 ++---- sbin/sysctl/sysctl.c | 6 ++---- 11 files changed, 19 insertions(+), 40 deletions(-) diff --git a/games/arithmetic/arithmetic.c b/games/arithmetic/arithmetic.c index d06776b89ab2..a15ead5a3d35 100644 --- a/games/arithmetic/arithmetic.c +++ b/games/arithmetic/arithmetic.c @@ -1,4 +1,4 @@ -/* $NetBSD: arithmetic.c,v 1.13 1999/07/17 19:11:30 hubertf Exp $ */ +/* $NetBSD: arithmetic.c,v 1.14 2000/04/14 05:58:01 simonb Exp $ */ /* * Copyright (c) 1989, 1993 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\ #if 0 static char sccsid[] = "@(#)arithmetic.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: arithmetic.c,v 1.13 1999/07/17 19:11:30 hubertf Exp $"); +__RCSID("$NetBSD: arithmetic.c,v 1.14 2000/04/14 05:58:01 simonb Exp $"); #endif #endif /* not lint */ @@ -118,8 +118,6 @@ main(argc, argv) int argc; char **argv; { - extern char *optarg; - extern int optind; int ch, cnt; /* Revoke setgid privileges */ diff --git a/games/fortune/fortune/fortune.c b/games/fortune/fortune/fortune.c index 559039c73a5c..2cc318ce6280 100644 --- a/games/fortune/fortune/fortune.c +++ b/games/fortune/fortune/fortune.c @@ -1,4 +1,4 @@ -/* $NetBSD: fortune.c,v 1.22 1999/11/09 15:06:33 drochner Exp $ */ +/* $NetBSD: fortune.c,v 1.23 2000/04/14 05:58:02 simonb Exp $ */ /*- * Copyright (c) 1986, 1993 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1986, 1993\n\ #if 0 static char sccsid[] = "@(#)fortune.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: fortune.c,v 1.22 1999/11/09 15:06:33 drochner Exp $"); +__RCSID("$NetBSD: fortune.c,v 1.23 2000/04/14 05:58:02 simonb Exp $"); #endif #endif /* not lint */ @@ -316,8 +316,6 @@ getargs(argc, argv) # ifndef NO_REGEX char *pat = NULL; # endif /* NO_REGEX */ - extern char *optarg; - extern int optind; int ch; ignore_case = FALSE; diff --git a/games/hunt/hunt/hunt.c b/games/hunt/hunt/hunt.c index 8726bdaeafa4..32d391fb8c0c 100644 --- a/games/hunt/hunt/hunt.c +++ b/games/hunt/hunt/hunt.c @@ -1,4 +1,4 @@ -/* $NetBSD: hunt.c,v 1.10 2000/03/02 18:22:31 kleink Exp $ */ +/* $NetBSD: hunt.c,v 1.11 2000/04/14 05:58:03 simonb Exp $ */ /* * Hunt * Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold @@ -7,7 +7,7 @@ #include #ifndef lint -__RCSID("$NetBSD: hunt.c,v 1.10 2000/03/02 18:22:31 kleink Exp $"); +__RCSID("$NetBSD: hunt.c,v 1.11 2000/04/14 05:58:03 simonb Exp $"); #endif /* not lint */ # include @@ -106,8 +106,6 @@ main(ac, av) char *term; int c; extern int Otto_mode; - extern int optind; - extern char *optarg; long enter_status; enter_status = env_init((long) Q_CLOAK); diff --git a/games/hunt/huntd/driver.c b/games/hunt/huntd/driver.c index 4b06af9153c9..fdfdfe46b106 100644 --- a/games/hunt/huntd/driver.c +++ b/games/hunt/huntd/driver.c @@ -1,4 +1,4 @@ -/* $NetBSD: driver.c,v 1.5 1997/10/20 00:37:16 lukem Exp $ */ +/* $NetBSD: driver.c,v 1.6 2000/04/14 05:58:03 simonb Exp $ */ /* * Hunt * Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold @@ -7,7 +7,7 @@ #include #ifndef lint -__RCSID("$NetBSD: driver.c,v 1.5 1997/10/20 00:37:16 lukem Exp $"); +__RCSID("$NetBSD: driver.c,v 1.6 2000/04/14 05:58:03 simonb Exp $"); #endif /* not lint */ # include @@ -72,8 +72,6 @@ main(ac, av, ep) static fd_set read_fds; static FLAG first = TRUE; static FLAG server = FALSE; - extern int optind; - extern char *optarg; int c; static struct timeval linger = { 90, 0 }; diff --git a/sbin/fsck_lfs/main.c b/sbin/fsck_lfs/main.c index 4b136d64d59f..1194d159c083 100644 --- a/sbin/fsck_lfs/main.c +++ b/sbin/fsck_lfs/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.2 1999/07/03 19:55:03 kleink Exp $ */ +/* $NetBSD: main.c,v 1.3 2000/04/14 06:03:38 simonb Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -74,8 +74,6 @@ main(argc, argv) { int ch; int ret = 0; - extern char *optarg; - extern int optind; #ifndef DEBUG_IFILE char *optstring = "b:C:dm:npy"; #else diff --git a/sbin/lmcctl/lmcctl.c b/sbin/lmcctl/lmcctl.c index b46969ad2950..57dbc6c0046e 100644 --- a/sbin/lmcctl/lmcctl.c +++ b/sbin/lmcctl/lmcctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: lmcctl.c,v 1.1 1999/03/25 04:05:37 explorer Exp $ */ +/* $NetBSD: lmcctl.c,v 1.2 2000/04/14 06:03:39 simonb Exp $ */ /*- * Copyright (c) 1997-1999 LAN Media Corporation (LMC) @@ -55,9 +55,6 @@ #include "extern.h" -extern char *optarg; -extern int optind, opterr, optopt; - void lmc_av9110_freq(u_int32_t, lmc_av9110_t *); static void dumpdata(char *, lmc_ctl_t *); diff --git a/sbin/mount_ext2fs/mount_ext2fs.c b/sbin/mount_ext2fs/mount_ext2fs.c index a4be842fb0bd..032e82689747 100644 --- a/sbin/mount_ext2fs/mount_ext2fs.c +++ b/sbin/mount_ext2fs/mount_ext2fs.c @@ -1,4 +1,4 @@ -/* $NetBSD: mount_ext2fs.c,v 1.6 1998/12/02 16:15:10 kenh Exp $ */ +/* $NetBSD: mount_ext2fs.c,v 1.7 2000/04/14 06:03:39 simonb Exp $ */ /*- * Copyright (c) 1993, 1994 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)mount_ufs.c 8.4 (Berkeley) 4/26/95"; #else -__RCSID("$NetBSD: mount_ext2fs.c,v 1.6 1998/12/02 16:15:10 kenh Exp $"); +__RCSID("$NetBSD: mount_ext2fs.c,v 1.7 2000/04/14 06:03:39 simonb Exp $"); #endif #endif /* not lint */ @@ -80,7 +80,6 @@ main(argc, argv) int argc; char *argv[]; { - extern int optreset; struct ufs_args args; /* XXX ffs_args */ int ch, mntflags; char *fs_name; diff --git a/sbin/mount_ffs/mount_ffs.c b/sbin/mount_ffs/mount_ffs.c index 7d003d367d1f..bb5b0ff7de1c 100644 --- a/sbin/mount_ffs/mount_ffs.c +++ b/sbin/mount_ffs/mount_ffs.c @@ -1,4 +1,4 @@ -/* $NetBSD: mount_ffs.c,v 1.9 1998/12/01 23:20:43 kenh Exp $ */ +/* $NetBSD: mount_ffs.c,v 1.10 2000/04/14 06:03:40 simonb Exp $ */ /*- * Copyright (c) 1993, 1994 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)mount_ufs.c 8.4 (Berkeley) 4/26/95"; #else -__RCSID("$NetBSD: mount_ffs.c,v 1.9 1998/12/01 23:20:43 kenh Exp $"); +__RCSID("$NetBSD: mount_ffs.c,v 1.10 2000/04/14 06:03:40 simonb Exp $"); #endif #endif /* not lint */ @@ -81,7 +81,6 @@ main(argc, argv) int argc; char *argv[]; { - extern int optreset; struct ufs_args args; int ch, mntflags; char *fs_name; diff --git a/sbin/raidctl/raidctl.c b/sbin/raidctl/raidctl.c index ba2028fb6a97..3a3e0b7fa542 100644 --- a/sbin/raidctl/raidctl.c +++ b/sbin/raidctl/raidctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: raidctl.c,v 1.15 2000/03/23 14:50:36 oster Exp $ */ +/* $NetBSD: raidctl.c,v 1.16 2000/04/14 06:03:40 simonb Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -93,8 +93,6 @@ main(argc,argv) int argc; char *argv[]; { - extern char *optarg; - extern int optind; int ch; int num_options; unsigned long action; diff --git a/sbin/sysctl/pathconf.c b/sbin/sysctl/pathconf.c index 83999024dca2..32ca0b19fb9c 100644 --- a/sbin/sysctl/pathconf.c +++ b/sbin/sysctl/pathconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: pathconf.c,v 1.4 2000/01/17 02:31:14 itojun Exp $ */ +/* $NetBSD: pathconf.c,v 1.5 2000/04/14 06:03:40 simonb Exp $ */ /* * Copyright (c) 1993 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)pathconf.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$NetBSD: pathconf.c,v 1.4 2000/01/17 02:31:14 itojun Exp $"; +static char rcsid[] = "$NetBSD: pathconf.c,v 1.5 2000/04/14 06:03:40 simonb Exp $"; #endif #endif /* not lint */ @@ -86,8 +86,6 @@ main(argc, argv) int argc; char *argv[]; { - extern char *optarg; - extern int optind; char *path; int ch; diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 168c5855fb01..9a01b68d78cd 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: sysctl.c,v 1.29 2000/04/08 23:18:27 soren Exp $ */ +/* $NetBSD: sysctl.c,v 1.30 2000/04/14 06:03:40 simonb Exp $ */ /* * Copyright (c) 1993 @@ -44,7 +44,7 @@ __COPYRIGHT( #if 0 static char sccsid[] = "@(#)sysctl.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: sysctl.c,v 1.29 2000/04/08 23:18:27 soren Exp $"); +__RCSID("$NetBSD: sysctl.c,v 1.30 2000/04/14 06:03:40 simonb Exp $"); #endif #endif /* not lint */ @@ -188,8 +188,6 @@ main(argc, argv) int argc; char *argv[]; { - extern char *optarg; - extern int optind; char *fn = NULL; int ch, lvl1;