From a9f1783e20a09e761fa29faec3f381978043cf88 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 20 Dec 1994 05:26:44 +0000 Subject: * src/*.c: Include "error.h" instead of simply declaring `void error ();'. --- src/basename.c | 2 +- src/date.c | 2 +- src/dirname.c | 2 +- src/env.c | 2 +- src/expr.c | 2 +- src/hostname.c | 2 +- src/id.c | 2 +- src/nice.c | 3 +-- src/pathchk.c | 2 +- src/printenv.c | 3 +-- src/printf.c | 2 +- src/pwd.c | 2 +- src/sleep.c | 3 +-- src/stty.c | 3 +-- src/su.c | 2 +- src/tee.c | 2 +- src/test.c | 1 + src/tty.c | 3 +-- src/uname.c | 3 +-- src/who.c | 2 +- 20 files changed, 20 insertions(+), 25 deletions(-) diff --git a/src/basename.c b/src/basename.c index 9270372bd..139851e47 100644 --- a/src/basename.c +++ b/src/basename.c @@ -32,9 +32,9 @@ #include "system.h" #include "version.h" #include "long-options.h" +#include "error.h" char *basename (); -void error (); void strip_trailing_slashes (); static void remove_suffix (); diff --git a/src/date.c b/src/date.c index 0e9959664..f9dccb98b 100644 --- a/src/date.c +++ b/src/date.c @@ -25,6 +25,7 @@ #include "version.h" #include "system.h" #include "getline.h" +#include "error.h" #ifdef TM_IN_SYS_TIME #include @@ -42,7 +43,6 @@ int stime (); char *xrealloc (); time_t get_date (); time_t posixtime (); -void error (); static void show_date (); static void usage (); diff --git a/src/dirname.c b/src/dirname.c index e4bdf26ef..5b800fea5 100644 --- a/src/dirname.c +++ b/src/dirname.c @@ -24,8 +24,8 @@ #include "system.h" #include "version.h" #include "long-options.h" +#include "error.h" -void error (); void strip_trailing_slashes (); /* The name this program was run with. */ diff --git a/src/env.c b/src/env.c index 53be05639..48b7a5c03 100644 --- a/src/env.c +++ b/src/env.c @@ -85,9 +85,9 @@ #include "version.h" #include "system.h" +#include "error.h" int putenv (); -void error (); static void usage (); diff --git a/src/expr.c b/src/expr.c index a98cc21f4..f971ce36d 100644 --- a/src/expr.c +++ b/src/expr.c @@ -36,6 +36,7 @@ #include "system.h" #include "version.h" #include "long-options.h" +#include "error.h" #define NEW(type) ((type *) xmalloc (sizeof (type))) #define OLD(x) free ((char *) x) @@ -66,7 +67,6 @@ static char **args; /* The name this program was run with. */ char *program_name; -void error (); char *xstrdup (); char *strstr (); char *xmalloc (); diff --git a/src/hostname.c b/src/hostname.c index df533a57b..d1266c14b 100644 --- a/src/hostname.c +++ b/src/hostname.c @@ -24,6 +24,7 @@ #include "system.h" #include "version.h" #include "long-options.h" +#include "error.h" #if !defined(HAVE_SETHOSTNAME) && defined(HAVE_SYSINFO) && \ defined (HAVE_SYS_SYSTEMINFO_H) && defined(HAVE_LIMITS_H) @@ -46,7 +47,6 @@ sethostname (name, namelen) #define HAVE_SETHOSTNAME 1 /* Now we have it... */ #endif -void error (); char *xgethostname (); /* The name this program was run with. */ diff --git a/src/id.c b/src/id.c index 9f1daa88a..4e7897bba 100644 --- a/src/id.c +++ b/src/id.c @@ -28,6 +28,7 @@ #include "version.h" #include "system.h" +#include "error.h" #ifdef _POSIX_VERSION #include @@ -51,7 +52,6 @@ gid_t getegid (); char *xmalloc (); int getugroups (); -void error (); static void print_user (); static void print_group (); diff --git a/src/nice.c b/src/nice.c index 9f338662b..ad231c7bf 100644 --- a/src/nice.c +++ b/src/nice.c @@ -33,6 +33,7 @@ #include "version.h" #include "system.h" #include "long-options.h" +#include "error.h" #ifdef NICE_PRIORITY #define GET_PRIORITY() nice (0) @@ -40,8 +41,6 @@ #define GET_PRIORITY() getpriority (PRIO_PROCESS, 0) #endif -void error (); - static int isinteger (); static void usage (); diff --git a/src/pathchk.c b/src/pathchk.c index 05974c6fd..6057f3064 100644 --- a/src/pathchk.c +++ b/src/pathchk.c @@ -46,6 +46,7 @@ #include "version.h" #include "system.h" #include "safe-stat.h" +#include "error.h" #ifdef _POSIX_VERSION #include @@ -92,7 +93,6 @@ #endif char *xstrdup (); -void error (); static int validate_path (); static void usage (); diff --git a/src/printenv.c b/src/printenv.c index bbdca9d62..c684017e2 100644 --- a/src/printenv.c +++ b/src/printenv.c @@ -34,8 +34,7 @@ #include "version.h" #include "system.h" - -void error (); +#include "error.h" /* The name this program was run with. */ char *program_name; diff --git a/src/printf.c b/src/printf.c index 9e443dfd9..1b2d76ec1 100644 --- a/src/printf.c +++ b/src/printf.c @@ -51,6 +51,7 @@ #include "system.h" #include "version.h" #include "long-options.h" +#include "error.h" #ifndef STDC_HEADERS double strtod (); @@ -63,7 +64,6 @@ unsigned long strtoul (); #define octtobin(c) ((c) - '0') char *xmalloc (); -void error (); static double xstrtod (); static int print_esc (); diff --git a/src/pwd.c b/src/pwd.c index 807e77b74..c0212de53 100644 --- a/src/pwd.c +++ b/src/pwd.c @@ -24,8 +24,8 @@ #include "system.h" #include "version.h" #include "long-options.h" +#include "error.h" -void error (); char *xgetcwd (); /* The name this program was run with. */ diff --git a/src/sleep.c b/src/sleep.c index a070d42ca..42bd91828 100644 --- a/src/sleep.c +++ b/src/sleep.c @@ -22,8 +22,7 @@ #include "version.h" #include "system.h" - -void error (); +#include "error.h" static long argdecode (); diff --git a/src/stty.c b/src/stty.c index 16351edf5..964a40a98 100644 --- a/src/stty.c +++ b/src/stty.c @@ -50,6 +50,7 @@ #include "system.h" #include "version.h" #include "long-options.h" +#include "error.h" #if defined(GWINSZ_BROKEN) /* Such as for SCO UNIX 3.2.2. */ #undef TIOCGWINSZ @@ -161,8 +162,6 @@ static void set_control_char (); static void set_speed (); static void set_window_size (); -void error (); - /* Which speeds to set. */ enum speed_setting { diff --git a/src/su.c b/src/su.c index a447a1a50..b10fd15f5 100644 --- a/src/su.c +++ b/src/su.c @@ -121,6 +121,7 @@ uid_t getuid (); #endif #include "version.h" +#include "error.h" /* The default PATH for simulated logins to non-superuser accounts. */ #define DEFAULT_LOGIN_PATH ":/usr/ucb:/bin:/usr/bin" @@ -144,7 +145,6 @@ char *basename (); char *xmalloc (); char *xrealloc (); char *xstrdup (); -void error (); static char *concat (); static int correct_password (); diff --git a/src/tee.c b/src/tee.c index de0348b5d..207814caf 100644 --- a/src/tee.c +++ b/src/tee.c @@ -25,9 +25,9 @@ #include "system.h" #include "version.h" +#include "error.h" char *xmalloc (); -void error (); int full_write (); static int tee (); diff --git a/src/test.c b/src/test.c index 4f3fdba8e..264d4ca92 100644 --- a/src/test.c +++ b/src/test.c @@ -38,6 +38,7 @@ # include "safe-stat.h" # include "safe-lstat.h" # include "group-member.h" +# include "error.h" # if !defined (S_IXUGO) # define S_IXUGO 0111 # endif /* S_IXUGO */ diff --git a/src/tty.c b/src/tty.c index f7ad301c0..07f1113a6 100644 --- a/src/tty.c +++ b/src/tty.c @@ -29,8 +29,7 @@ #include "system.h" #include "version.h" - -void error (); +#include "error.h" static void usage (); diff --git a/src/uname.c b/src/uname.c index 39b170285..060d63e94 100644 --- a/src/uname.c +++ b/src/uname.c @@ -36,8 +36,7 @@ #include "system.h" #include "version.h" - -void error (); +#include "error.h" static void print_element (); static void usage (); diff --git a/src/who.c b/src/who.c index 1d768fc79..2cdbc5712 100644 --- a/src/who.c +++ b/src/who.c @@ -53,6 +53,7 @@ #include "system.h" #include "version.h" #include "safe-stat.h" +#include "error.h" #if !defined (UTMP_FILE) && defined (_PATH_UTMP) /* 4.4BSD. */ #define UTMP_FILE _PATH_UTMP @@ -85,7 +86,6 @@ #endif /* USERS */ #endif /* WHO */ -void error (); int gethostname (); char *ttyname (); char *xmalloc (); -- cgit v1.2.3-54-g00ecf