]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Include "error.h" rather than simply declaring `void error ();'.
authorJim Meyering <jim@meyering.net>
Tue, 27 Dec 1994 13:36:22 +0000 (13:36 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 27 Dec 1994 13:36:22 +0000 (13:36 +0000)
17 files changed:
src/chgrp.c
src/chmod.c
src/chown.c
src/dd.c
src/df.c
src/du.c
src/install.c
src/ln.c
src/ls.c
src/mkdir.c
src/mkfifo.c
src/mknod.c
src/mv.c
src/rm.c
src/rmdir.c
src/sync.c
src/touch.c

index 47b6ef3150464f6801c40d7b73561430eeced026..a60f7783a5f261997473e35d3fa3a659db95dda9 100644 (file)
 #include <sys/types.h>
 #include <grp.h>
 #include <getopt.h>
+
 #include "system.h"
 #include "version.h"
 #include "safe-lstat.h"
+#include "error.h"
 
 #ifndef _POSIX_VERSION
 struct group *getgrnam ();
@@ -38,7 +40,6 @@ char *group_member ();
 char *savedir ();
 char *xmalloc ();
 char *xrealloc ();
-void error ();
 
 static int change_file_group ();
 static int change_dir_group ();
index 6285ca9c72ecde6d77c8b93f7a7de8a521e00ee8..193ec71f7d59d3539fb756547a1f964279990be5 100644 (file)
 #include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
+
 #include "modechange.h"
 #include "system.h"
 #include "version.h"
 #include "safe-stat.h"
 #include "safe-lstat.h"
+#include "error.h"
 
-void error ();
 void mode_string ();
 char *savedir ();
 void strip_trailing_slashes ();
index 4b4688d8ecef987aa52986caa9b3d326779e5b69..8e82316caca922d43a37d890c5c6824106122564 100644 (file)
 #include <pwd.h>
 #include <grp.h>
 #include <getopt.h>
+
 #include "system.h"
 #include "version.h"
 #include "safe-lstat.h"
+#include "error.h"
 
 #ifndef _POSIX_VERSION
 struct passwd *getpwnam ();
@@ -54,7 +56,6 @@ char *parse_user_spec ();
 void strip_trailing_slashes ();
 char *xmalloc ();
 char *xrealloc ();
-void error ();
 int isnumber ();
 
 static int change_file_owner ();
index 2b76ef252d600fa89b25a2e21493834f1be301b0..8c011d3e7d54baa17d7780fc99ef8b0206bac7df 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
@@ -64,6 +64,7 @@
 
 #include "system.h"
 #include "version.h"
+#include "error.h"
 
 #define equal(p, q) (strcmp ((p),(q)) == 0)
 #define max(a, b) ((a) > (b) ? (a) : (b))
@@ -91,8 +92,8 @@
 #define C_TWOBUFS 04000
 
 char *xmalloc ();
-void error ();
 int safe_read ();
+int full_write ();
 
 static RETSIGTYPE interrupt_handler ();
 static int bit_count ();
@@ -443,7 +444,9 @@ skip (fdesc, file, records, blocksize, buf)
     {
       while (records-- > 0)
        {
-         nread = safe_read (fdesc, buf, blocksize).
+         int nread;
+
+         nread = safe_read (fdesc, buf, blocksize);
          if (nread < 0)
            {
              error (0, errno, "%s", file);
index 301f35441170d5aaa4eef93eb9a3338a620cb868..6b63c670ff7c0cabe9bb0c2616c56c07df65c2bc 100644 (file)
--- a/src/df.c
+++ b/src/df.c
 #include <stdio.h>
 #include <sys/types.h>
 #include <getopt.h>
+
 #include "mountlist.h"
 #include "fsusage.h"
 #include "system.h"
 #include "version.h"
 #include "safe-stat.h"
+#include "error.h"
 
 char *xmalloc ();
 char *xstrdup ();
-void error ();
 
 static int selected_fstype ();
 static int excluded_fstype ();
index 53711537a7d11a4ec212bb24f769c830f5b7eac2..f8161b9d14559f00da21961b52d856d4141c8d1f 100644 (file)
--- a/src/du.c
+++ b/src/du.c
 #include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
+
 #include "system.h"
 #include "version.h"
 #include "safe-stat.h"
 #include "safe-lstat.h"
+#include "error.h"
 
 /* Initial number of entries in each hash table entry's table of inodes.  */
 #define INITIAL_HASH_MODULE 100
@@ -93,7 +95,6 @@ char *savedir ();
 char *xgetcwd ();
 char *xmalloc ();
 char *xrealloc ();
-void error ();
 
 static int hash_insert ();
 static int hash_insert2 ();
index 10672234f115ae3e16f2f37560380e6f70372ac4..b79e28d1c5c01b1b5be1daeadcfb8b77048f7170 100644 (file)
 #include <sys/types.h>
 #include <pwd.h>
 #include <grp.h>
+
 #include "system.h"
 #include "version.h"
 #include "safe-stat.h"
 #include "modechange.h"
 #include "makepath.h"
+#include "error.h"
 
 #ifdef _POSIX_VERSION
 #include <sys/wait.h>
@@ -88,7 +90,6 @@ int wait ();
 char *basename ();
 char *stpcpy ();
 char *xmalloc ();
-void error ();
 int safe_read ();
 int full_write ();
 int isdir ();
index c856c77d3f8f46eab6b5c61d789e960f98a239d4..3bab2cfe5ebd932f79030144f295cae1e526bba4 100644 (file)
--- a/src/ln.c
+++ b/src/ln.c
 #include <stdio.h>
 #include <sys/types.h>
 #include <getopt.h>
+
 #include "system.h"
 #include "backupfile.h"
 #include "version.h"
 #include "safe-lstat.h"
 #include "safe-stat.h"
+#include "error.h"
 
 int link ();                   /* Some systems don't declare this anywhere. */
 
@@ -61,7 +63,6 @@ char *basename ();
 enum backup_type get_version ();
 int isdir ();
 int yesno ();
-void error ();
 void strip_trailing_slashes ();
 char *stpcpy ();
 
index a30a603508c1b9072bb9a3ee81df84a6d7f0f2ca..7f04f5ce6be8ef64691619ff89b414fc7b422d24 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -51,6 +51,7 @@
    PATH_MAX.  */
 #include <limits.h>
 #endif
+
 #include "system.h"
 #include <fnmatch.h>
 
@@ -59,6 +60,7 @@
 #include "version.h"
 #include "safe-stat.h"
 #include "safe-lstat.h"
+#include "error.h"
 
 #define obstack_chunk_alloc xmalloc
 #define obstack_chunk_free free
@@ -95,7 +97,6 @@ char *getuser ();
 char *xmalloc ();
 char *xrealloc ();
 int argmatch ();
-void error ();
 void invalid_arg ();
 
 static char *make_link_path ();
index 74b8d377c6634e4ce799131da845972a96645d01..a36d7387c7d865f4aa45d0655ccc3faea4c74ec2 100644 (file)
 #include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
+
 #include "system.h"
 #include "modechange.h"
 #include "makepath.h"
 #include "version.h"
-
-void error ();
+#include "error.h"
 
 static void usage ();
 
index 1e6d500706327baac716349595e6a2b516764b8b..bd12222b04ec1ec88b1da76b7f4d2438c1de45d4 100644 (file)
 #include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
+
 #include "system.h"
 #include "modechange.h"
 #include "version.h"
-
-void error ();
+#include "error.h"
 
 static void usage ();
 
index 45db7d38dc468cdda0ec5080a7ad91fc16162658..3acadb732db58be0e5da28c4cd8ac0e804410d72 100644 (file)
 #include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
+
 #include "system.h"
 #include "modechange.h"
 #include "version.h"
-
-void error ();
+#include "error.h"
 
 static void usage ();
 
index 0c2ddde1017d43592a62924cd8f7c9671ee735c6..fa0c68e6546cab4825590ac6ab21d84524481ba0 100644 (file)
--- a/src/mv.c
+++ b/src/mv.c
 #include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
+
 #include "system.h"
 #include "backupfile.h"
 #include "version.h"
 #include "safe-lstat.h"
+#include "error.h"
 
 #ifndef _POSIX_VERSION
 uid_t geteuid ();
@@ -58,7 +60,6 @@ char *basename ();
 enum backup_type get_version ();
 int isdir ();
 int yesno ();
-void error ();
 int safe_read ();
 int full_write ();
 void strip_trailing_slashes ();
index a90c64cccd8f3d0991c40fe0737710f05c76f82b..871a60dcf8366d28b2ce69155cd1af1146b0d581 100644 (file)
--- a/src/rm.c
+++ b/src/rm.c
 #include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
+
 #include "system.h"
 #include "version.h"
 #include "safe-lstat.h"
+#include "error.h"
 
 #ifdef D_INO_IN_DIRENT
 #define D_INO(dp) ((dp)->d_ino)
@@ -38,7 +40,6 @@ char *xmalloc ();
 char *xrealloc ();
 int eaccess_stat ();
 int yesno ();
-void error ();
 void strip_trailing_slashes ();
 
 static int clear_directory ();
index 59f0797c655a3d743a124951cc4ea441a12baea3..4e0673b0402674ed016d88a7d03ffc7b302f9f29 100644 (file)
 #include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
+
 #include "system.h"
 #include "version.h"
+#include "error.h"
 
-void error ();
 void strip_trailing_slashes ();
 
 static void remove_parents ();
index d2968a5ace6b91f1cdc948306bd29b347bb4614e..7e437e1843abe6f0ccb3b4d1a540c67031f0414f 100644 (file)
@@ -24,8 +24,7 @@
 #include "system.h"
 #include "long-options.h"
 #include "version.h"
-
-void error ();
+#include "error.h"
 
 /* The name this program was run with. */
 char *program_name;
index ca23f9fca64e9be51f70aa1112f0f6a1ab891989..dc48445c269d2507bf9f40b35955e54f2eca75af 100644 (file)
 #include <stdio.h>
 #include <getopt.h>
 #include <sys/types.h>
+
 #include "system.h"
 #include "version.h"
 #include "safe-stat.h"
+#include "error.h"
 
 #ifndef STDC_HEADERS
 time_t mktime ();
@@ -48,7 +50,6 @@ time_t time ();
 int argmatch ();
 time_t get_date ();
 time_t posixtime ();
-void error ();
 int safe_read ();
 int full_write ();
 void invalid_arg ();