summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-01-22 20:25:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-01-22 20:25:09 +0000
commit43f555732483fd1b60a70968b71d3a01ef7d446a (patch)
tree9ac7c483eb8edd88cdb16e5f49b4c235f85c0eba /bin
parenta9e755d6a11ddb61c8eb50d4307c9611f1951a53 (diff)
remove extra externs not needed because of unistd.h (rest of tree will be done later.. contact me if you want to help)
Diffstat (limited to 'bin')
-rw-r--r--bin/cat/cat.c5
-rw-r--r--bin/csh/printf.c6
-rw-r--r--bin/date/date.c6
-rw-r--r--bin/ed/main.c8
-rw-r--r--bin/pax/getoldopt.c6
-rw-r--r--bin/pax/options.c6
-rw-r--r--bin/rmail/rmail.c7
7 files changed, 17 insertions, 27 deletions
diff --git a/bin/cat/cat.c b/bin/cat/cat.c
index 67e16c0269b..71439ce4cf3 100644
--- a/bin/cat/cat.c
+++ b/bin/cat/cat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cat.c,v 1.8 1997/06/18 18:37:56 kstailey Exp $ */
+/* $OpenBSD: cat.c,v 1.9 2000/01/22 20:24:45 deraadt Exp $ */
/* $NetBSD: cat.c,v 1.11 1995/09/07 06:12:54 jtc Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)cat.c 8.2 (Berkeley) 4/27/95";
#else
-static char rcsid[] = "$OpenBSD: cat.c,v 1.8 1997/06/18 18:37:56 kstailey Exp $";
+static char rcsid[] = "$OpenBSD: cat.c,v 1.9 2000/01/22 20:24:45 deraadt Exp $";
#endif
#endif /* not lint */
@@ -78,7 +78,6 @@ main(argc, argv)
int argc;
char *argv[];
{
- extern int optind;
int ch;
setlocale(LC_ALL, "");
diff --git a/bin/csh/printf.c b/bin/csh/printf.c
index 50b00eaf633..5c46dd5b591 100644
--- a/bin/csh/printf.c
+++ b/bin/csh/printf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printf.c,v 1.8 1998/08/25 13:35:17 deraadt Exp $ */
+/* $OpenBSD: printf.c,v 1.9 2000/01/22 20:24:47 deraadt Exp $ */
/* $NetBSD: printf.c,v 1.6 1995/03/21 09:03:15 cgd Exp $ */
/*
@@ -46,7 +46,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)printf.c 8.1 (Berkeley) 7/20/93";
#else
-static char rcsid[] = "$OpenBSD: printf.c,v 1.8 1998/08/25 13:35:17 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: printf.c,v 1.9 2000/01/22 20:24:47 deraadt Exp $";
#endif
#endif /* not lint */
@@ -56,6 +56,7 @@ static char rcsid[] = "$OpenBSD: printf.c,v 1.8 1998/08/25 13:35:17 deraadt Exp
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <string.h>
#include <err.h>
@@ -92,7 +93,6 @@ main(argc, argv)
int argc;
char *argv[];
{
- extern int optind;
static char *skip1, *skip2;
int ch, end, fieldwidth, precision;
char convch, nextch, *format, *fmt, *start;
diff --git a/bin/date/date.c b/bin/date/date.c
index 8a743363f4c..0f46a9f678e 100644
--- a/bin/date/date.c
+++ b/bin/date/date.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: date.c,v 1.13 1999/02/01 07:52:09 d Exp $ */
+/* $OpenBSD: date.c,v 1.14 2000/01/22 20:24:48 deraadt Exp $ */
/* $NetBSD: date.c,v 1.11 1995/09/07 06:21:05 jtc Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)date.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: date.c,v 1.13 1999/02/01 07:52:09 d Exp $";
+static char rcsid[] = "$OpenBSD: date.c,v 1.14 2000/01/22 20:24:48 deraadt Exp $";
#endif
#endif /* not lint */
@@ -78,8 +78,6 @@ main(argc, argv)
int argc;
char **argv;
{
- extern int optind;
- extern char *optarg;
struct timezone tz;
int ch, rflag;
char *format, buf[1024];
diff --git a/bin/ed/main.c b/bin/ed/main.c
index 1e4fdc5ebb1..b033ed71ee3 100644
--- a/bin/ed/main.c
+++ b/bin/ed/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.16 1999/12/05 02:37:55 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.17 2000/01/22 20:24:49 deraadt Exp $ */
/* $NetBSD: main.c,v 1.3 1995/03/21 09:04:44 cgd Exp $ */
/* main.c: This file contains the main control and user-interface routines
@@ -39,7 +39,7 @@ char *copyright =
#if 0
static char *rcsid = "@(#)main.c,v 1.1 1994/02/01 00:34:42 alm Exp";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.16 1999/12/05 02:37:55 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.17 2000/01/22 20:24:49 deraadt Exp $";
#endif
#endif /* not lint */
@@ -64,6 +64,7 @@ static char rcsid[] = "$OpenBSD: main.c,v 1.16 1999/12/05 02:37:55 deraadt Exp $
#include <sys/wait.h>
#include <ctype.h>
#include <setjmp.h>
+#include <unistd.h>
#include <pwd.h>
#include "ed.h"
@@ -106,9 +107,6 @@ char *dps = "*"; /* default command-line prompt */
char *usage = "usage: %s [-] [-sx] [-p string] [name]\n";
-extern int optind;
-extern char *optarg;
-
/* ed: line editor */
int
main(argc, argv)
diff --git a/bin/pax/getoldopt.c b/bin/pax/getoldopt.c
index 7da7f85e1aa..c9b29d0b29f 100644
--- a/bin/pax/getoldopt.c
+++ b/bin/pax/getoldopt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getoldopt.c,v 1.3 1997/09/01 18:29:52 deraadt Exp $ */
+/* $OpenBSD: getoldopt.c,v 1.4 2000/01/22 20:24:51 deraadt Exp $ */
/* $NetBSD: getoldopt.c,v 1.3 1995/03/21 09:07:28 cgd Exp $ */
/*
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: getoldopt.c,v 1.3 1997/09/01 18:29:52 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: getoldopt.c,v 1.4 2000/01/22 20:24:51 deraadt Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -24,8 +24,6 @@ getoldopt(argc, argv, optstring)
char **argv;
char *optstring;
{
- extern char *optarg; /* Points to next arg */
- extern int optind; /* Global argv index */
static char *key; /* Points to next keyletter */
static char use_getopt; /* !=0 if argv[1][0] was '-' */
char c;
diff --git a/bin/pax/options.c b/bin/pax/options.c
index bb9b25254c3..f1ecc81ce5b 100644
--- a/bin/pax/options.c
+++ b/bin/pax/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.40 1999/07/28 12:33:40 espie Exp $ */
+/* $OpenBSD: options.c,v 1.41 2000/01/22 20:24:52 deraadt Exp $ */
/* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */
/*-
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94";
#else
-static char rcsid[] = "$OpenBSD: options.c,v 1.40 1999/07/28 12:33:40 espie Exp $";
+static char rcsid[] = "$OpenBSD: options.c,v 1.41 2000/01/22 20:24:52 deraadt Exp $";
#endif
#endif /* not lint */
@@ -205,8 +205,6 @@ pax_options(argc, argv)
unsigned int bflg = 0;
register char *pt;
FSUB tmp;
- extern char *optarg;
- extern int optind;
/*
* process option flags
diff --git a/bin/rmail/rmail.c b/bin/rmail/rmail.c
index 40752724312..496f015256f 100644
--- a/bin/rmail/rmail.c
+++ b/bin/rmail/rmail.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rmail.c,v 1.9 1998/04/30 05:55:06 deraadt Exp $ */
+/* $OpenBSD: rmail.c,v 1.10 2000/01/22 20:24:53 deraadt Exp $ */
/* $NetBSD: rmail.c,v 1.8 1995/09/07 06:51:50 jtc Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)rmail.c 8.3 (Berkeley) 5/15/95";
#else
-static char rcsid[] = "$OpenBSD: rmail.c,v 1.9 1998/04/30 05:55:06 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: rmail.c,v 1.10 2000/01/22 20:24:53 deraadt Exp $";
#endif
#endif /* not lint */
@@ -81,6 +81,7 @@ static char rcsid[] = "$OpenBSD: rmail.c,v 1.9 1998/04/30 05:55:06 deraadt Exp $
#include <string.h>
#include <sysexits.h>
#include <unistd.h>
+#include <errno.h>
#ifndef MAX
# define MAX(a, b) ((a) < (b) ? (b) : (a))
@@ -96,8 +97,6 @@ main(argc, argv)
int argc;
char *argv[];
{
- extern char *optarg;
- extern int errno, optind;
FILE *fp;
struct stat sb;
size_t fplen, fptlen, len;