* src/*.c: Include "error.h" instead of simply declaring
authorJim Meyering <jim@meyering.net>
Tue, 20 Dec 1994 05:26:44 +0000 (05:26 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 20 Dec 1994 05:26:44 +0000 (05:26 +0000)
`void error ();'.

20 files changed:
src/basename.c
src/date.c
src/dirname.c
src/env.c
src/expr.c
src/hostname.c
src/id.c
src/nice.c
src/pathchk.c
src/printenv.c
src/printf.c
src/pwd.c
src/sleep.c
src/stty.c
src/su.c
src/tee.c
src/test.c
src/tty.c
src/uname.c
src/who.c

index 9270372..139851e 100644 (file)
@@ -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 ();
index 0e99596..f9dccb9 100644 (file)
@@ -25,6 +25,7 @@
 #include "version.h"
 #include "system.h"
 #include "getline.h"
+#include "error.h"
 
 #ifdef TM_IN_SYS_TIME
 #include <sys/time.h>
@@ -42,7 +43,6 @@ int stime ();
 char *xrealloc ();
 time_t get_date ();
 time_t posixtime ();
-void error ();
 
 static void show_date ();
 static void usage ();
index e4bdf26..5b800fe 100644 (file)
@@ -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. */
index 53be056..48b7a5c 100644 (file)
--- 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 ();
 
index a98cc21..f971ce3 100644 (file)
@@ -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 ();
index df533a5..d1266c1 100644 (file)
@@ -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. */
index 9f1daa8..4e7897b 100644 (file)
--- 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 <limits.h>
@@ -51,7 +52,6 @@ gid_t getegid ();
 
 char *xmalloc ();
 int getugroups ();
-void error ();
 
 static void print_user ();
 static void print_group ();
index 9f33866..ad231c7 100644 (file)
@@ -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 ();
 
index 05974c6..6057f30 100644 (file)
@@ -46,6 +46,7 @@
 #include "version.h"
 #include "system.h"
 #include "safe-stat.h"
+#include "error.h"
 
 #ifdef _POSIX_VERSION
 #include <limits.h>
@@ -92,7 +93,6 @@
 #endif
 
 char *xstrdup ();
-void error ();
 
 static int validate_path ();
 static void usage ();
index bbdca9d..c684017 100644 (file)
@@ -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;
index 9e443df..1b2d76e 100644 (file)
@@ -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 ();
index 807e77b..c0212de 100644 (file)
--- 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. */
index a070d42..42bd918 100644 (file)
@@ -22,8 +22,7 @@
 
 #include "version.h"
 #include "system.h"
-
-void error ();
+#include "error.h"
 
 static long argdecode ();
 
index 16351ed..964a40a 100644 (file)
@@ -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
   {
index a447a1a..b10fd15 100644 (file)
--- 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 ();
index de0348b..207814c 100644 (file)
--- 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 ();
index 4f3fdba..264d4ca 100644 (file)
@@ -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 */
index f7ad301..07f1113 100644 (file)
--- 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 ();
 
index 39b1702..060d63e 100644 (file)
@@ -36,8 +36,7 @@
 
 #include "system.h"
 #include "version.h"
-
-void error ();
+#include "error.h"
 
 static void print_element ();
 static void usage ();
index 1d768fc..2cdbc57 100644 (file)
--- 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 ();