summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-11-09 23:41:10 +0000
committerJim Meyering <jim@meyering.net>1995-11-09 23:41:10 +0000
commitb7b00aad08d051cda6bfb96d64462369b4defa23 (patch)
tree301b25ca6a8f260c86b499290fadd50b6a6d7152
parentec2a94a41079f023443be393594d12e8315a706e (diff)
downloadcoreutils-b7b00aad08d051cda6bfb96d64462369b4defa23.tar.xz
Protect prototypes with __P.
-rw-r--r--src/cp.c17
-rw-r--r--src/dd.c33
-rw-r--r--src/df.c22
-rw-r--r--src/du.c27
-rw-r--r--src/install.c14
5 files changed, 60 insertions, 53 deletions
diff --git a/src/cp.c b/src/cp.c
index efd9ce5ec..f494440ea 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -51,12 +51,17 @@ enum backup_type get_version ();
int euidaccess ();
int full_write ();
-static int do_copy (int argc, char **argv);
-static int copy (char *src_path, char *dst_path, int new_dst, dev_t device, struct dir_list *ancestors);
-static int copy_dir (char *src_path_in, char *dst_path_in, int new_dst, struct stat *src_sb, struct dir_list *ancestors);
-static int make_path_private (char *const_dirpath, int src_offset, int mode, char *verbose_fmt_string, struct dir_attr **attr_list, int *new_dst);
-static int copy_reg (char *src_path, char *dst_path);
-static int re_protect (char *const_dst_path, int src_offset, struct dir_attr *attr_list);
+static int do_copy __P ((int argc, char **argv));
+static int copy __P ((char *src_path, char *dst_path, int new_dst,
+ dev_t device, struct dir_list *ancestors));
+static int copy_dir __P ((char *src_path_in, char *dst_path_in, int new_dst,
+ struct stat *src_sb, struct dir_list *ancestors));
+static int make_path_private __P ((char *const_dirpath, int src_offset,
+ int mode, char *verbose_fmt_string,
+ struct dir_attr **attr_list, int *new_dst));
+static int copy_reg __P ((char *src_path, char *dst_path));
+static int re_protect __P ((char *const_dst_path, int src_offset,
+ struct dir_attr *attr_list));
/* Initial number of entries in each hash table entry's table of inodes. */
#define INITIAL_HASH_MODULE 100
diff --git a/src/dd.c b/src/dd.c
index 37494a14a..dae19ee04 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -95,22 +95,23 @@ char *xmalloc ();
int safe_read ();
int full_write ();
-static RETSIGTYPE interrupt_handler (void);
-static int bit_count (register unsigned int i);
-static int parse_integer (char *str);
-static void apply_translations (void);
-static void copy (void);
-static void copy_simple (unsigned char *buf, int nread);
-static void copy_with_block (unsigned char *buf, int nread);
-static void copy_with_unblock (unsigned char *buf, int nread);
-static void parse_conversion (char *str);
-static void print_stats (void);
-static void translate_charset (const unsigned char *new_trans);
-static void quit (int code);
-static void scanargs (int argc, char **argv);
-static void skip (int fdesc, char *file, long int records, long int blocksize, char *buf);
-static void usage (int status);
-static void write_output (void);
+static RETSIGTYPE interrupt_handler __P ((void));
+static int bit_count __P ((register unsigned int i));
+static int parse_integer __P ((char *str));
+static void apply_translations __P ((void));
+static void copy __P ((void));
+static void copy_simple __P ((unsigned char *buf, int nread));
+static void copy_with_block __P ((unsigned char *buf, int nread));
+static void copy_with_unblock __P ((unsigned char *buf, int nread));
+static void parse_conversion __P ((char *str));
+static void print_stats __P ((void));
+static void translate_charset __P ((const unsigned char *new_trans));
+static void quit __P ((int code));
+static void scanargs __P ((int argc, char **argv));
+static void skip __P ((int fdesc, char *file, long int records,
+ long int blocksize, char *buf));
+static void usage __P ((int status));
+static void write_output __P ((void));
/* The name this program was run with. */
char *program_name;
diff --git a/src/df.c b/src/df.c
index 26efe7032..222f973e0 100644
--- a/src/df.c
+++ b/src/df.c
@@ -47,17 +47,17 @@
char *xmalloc ();
char *xstrdup ();
-static int selected_fstype (char *fstype);
-static int excluded_fstype (char *fstype);
-static void add_excluded_fs_type (char *fstype);
-static void add_fs_type (char *fstype);
-static void print_header (void);
-static void show_entry (char *path, struct stat *statp);
-static void show_all_entries (void);
-static void show_dev (char *disk, char *mount_point, char *fstype);
-static void show_disk (char *disk);
-static void show_point (char *point, struct stat *statp);
-static void usage (int status);
+static int selected_fstype __P ((char *fstype));
+static int excluded_fstype __P ((char *fstype));
+static void add_excluded_fs_type __P ((char *fstype));
+static void add_fs_type __P ((char *fstype));
+static void print_header __P ((void));
+static void show_entry __P ((char *path, struct stat *statp));
+static void show_all_entries __P ((void));
+static void show_dev __P ((char *disk, char *mount_point, char *fstype));
+static void show_disk __P ((char *disk));
+static void show_point __P ((char *point, struct stat *statp));
+static void usage __P ((int status));
/* Name this program was run with. */
char *program_name;
diff --git a/src/du.c b/src/du.c
index 2e1fade2b..c631c8b6d 100644
--- a/src/du.c
+++ b/src/du.c
@@ -90,23 +90,24 @@ typedef struct
char *text; /* Pointer to the text. */
} *string, stringstruct;
-int stat (const char *, struct stat *);
-int lstat (const char *, struct stat *);
+int stat ();
+int lstat ();
char *savedir ();
char *xmalloc ();
char *xrealloc ();
-static int hash_insert (ino_t ino, dev_t dev);
-static int hash_insert2 (struct htab *htab, ino_t ino, dev_t dev);
-static long count_entry (char *ent, int top, dev_t last_dev);
-static void du_files (char **files);
-static void hash_init (unsigned int modulus, unsigned int entry_tab_size);
-static void hash_reset (void);
-static void str_concatc (string s1, char *cstr);
-static void str_copyc (string s1, char *cstr);
-static void str_init (string *s1, unsigned int size);
-static void str_trunc (string s1, unsigned int length);
+static int hash_insert __P ((ino_t ino, dev_t dev));
+static int hash_insert2 __P ((struct htab *htab, ino_t ino, dev_t dev));
+static long count_entry __P ((char *ent, int top, dev_t last_dev));
+static void du_files __P ((char **files));
+static void hash_init __P ((unsigned int modulus,
+ unsigned int entry_tab_size));
+static void hash_reset __P ((void));
+static void str_concatc __P ((string s1, char *cstr));
+static void str_copyc __P ((string s1, char *cstr));
+static void str_init __P ((string *s1, unsigned int size));
+static void str_trunc __P ((string s1, unsigned int length));
/* Name under which this program was invoked. */
char *program_name;
@@ -153,7 +154,7 @@ static struct stat stat_buf;
/* A pointer to either lstat or stat, depending on whether
dereferencing of all symbolic links is to be done. */
-static int (*xstat) ();
+static int __P ((*xstat) ());
/* The exit status to use if we don't get any fatal errors. */
static int exit_status;
diff --git a/src/install.c b/src/install.c
index 65dc8c49a..1dd7ed9a6 100644
--- a/src/install.c
+++ b/src/install.c
@@ -99,13 +99,13 @@ int safe_read ();
int full_write ();
int isdir ();
-static int change_attributes (char *path, int no_need_to_chown);
-static int copy_file (char *from, char *to, int *to_created);
-static int install_file_in_dir (char *from, char *to_dir);
-static int install_file_in_file (char *from, char *to);
-static void get_ids (void);
-static void strip (char *path);
-static void usage (int status);
+static int change_attributes __P ((char *path, int no_need_to_chown));
+static int copy_file __P ((char *from, char *to, int *to_created));
+static int install_file_in_dir __P ((char *from, char *to_dir));
+static int install_file_in_file __P ((char *from, char *to));
+static void get_ids __P ((void));
+static void strip __P ((char *path));
+static void usage __P ((int status));
/* The name this program was run with, for error messages. */
char *program_name;