V_off
};
-static int change_dir_mode PARAMS ((const char *dir,
- const struct mode_change *changes));
+static int change_dir_mode (const char *dir, const struct mode_change *changes);
/* The name the program was run with. */
char *program_name;
int euidaccess ();
int yesno ();
-static int copy_internal PARAMS ((const char *src_path, const char *dst_path,
- int new_dst, dev_t device,
- struct dir_list *ancestors,
- const struct cp_options *x,
- int command_line_arg,
- int *copy_into_self,
- int *rename_succeeded));
+static int copy_internal (const char *src_path, const char *dst_path,
+ int new_dst, dev_t device,
+ struct dir_list *ancestors,
+ const struct cp_options *x,
+ int command_line_arg,
+ int *copy_into_self,
+ int *rename_succeeded);
/* Pointers to the file names: they're used in the diagnostic that is issued
when we detect the user is trying to copy a directory into itself. */
on systems with an lstat function that does not dereference symlinks
that are specified with a trailing slash. */
# if ! LSTAT_FOLLOWS_SLASHED_SYMLINK
-int rpl_lstat PARAMS((const char *, struct stat *));
+int rpl_lstat (const char *, struct stat *);
# undef lstat
# define lstat rpl_lstat
# endif
on systems with a rename function that fails for a source path
specified with a trailing slash. */
# if RENAME_TRAILING_SLASH_BUG
-int rpl_rename PARAMS((const char *, const char *));
+int rpl_rename (const char *, const char *);
# undef rename
# define rename rpl_rename
# endif
int *copy_into_self, int *rename_succeeded));
void
-dest_info_init PARAMS ((struct cp_options *));
+dest_info_init (struct cp_options *);
void
-src_info_init PARAMS ((struct cp_options *));
+src_info_init (struct cp_options *);
#endif
-void hash_init PARAMS ((void));
-void forget_all PARAMS ((void));
-void forget_created PARAMS ((ino_t ino, dev_t dev));
-char *remember_copied PARAMS ((const char *node, ino_t ino, dev_t dev));
-int remember_created PARAMS ((const char *path));
+void hash_init (void);
+void forget_all (void);
+void forget_created (ino_t ino, dev_t dev);
+char *remember_copied (const char *node, ino_t ino, dev_t dev);
+int remember_created (const char *path);
struct buffer_record *next;
};
-static void close_output_file PARAMS ((void));
-static void create_output_file PARAMS ((void));
-static void delete_all_files PARAMS ((void));
-static void save_line_to_file PARAMS ((const struct cstring *line));
-void usage PARAMS ((int status));
+static void close_output_file (void);
+static void create_output_file (void);
+static void delete_all_files (void);
+static void save_line_to_file (const struct cstring *line);
+void usage (int status);
/* The name this program was run with. */
char *program_name;
int putenv ();
-static void show_date PARAMS ((const char *format, struct timespec when));
+static void show_date (const char *format, struct timespec when);
enum Time_spec
{
/* The name this program was run with. */
char *program_name;
-static VALUE *eval PARAMS ((void));
-static int nomoreargs PARAMS ((void));
-static int null PARAMS ((VALUE *v));
-static void printv PARAMS ((VALUE *v));
+static VALUE *eval (void);
+static int nomoreargs (void);
+static int null (VALUE *v);
+static void printv (VALUE *v);
void
usage (int status)
/* Forward declarations. */
-static void set_prefix PARAMS ((char *p));
-static void fmt PARAMS ((FILE *f));
-static bool get_paragraph PARAMS ((FILE *f));
-static int get_line PARAMS ((FILE *f, int c));
-static int get_prefix PARAMS ((FILE *f));
-static int get_space PARAMS ((FILE *f, int c));
-static int copy_rest PARAMS ((FILE *f, int c));
-static bool same_para PARAMS ((int c));
-static void flush_paragraph PARAMS ((void));
-static void fmt_paragraph PARAMS ((void));
-static void check_punctuation PARAMS ((WORD *w));
-static COST base_cost PARAMS ((WORD *this));
-static COST line_cost PARAMS ((WORD *next, int len));
-static void put_paragraph PARAMS ((WORD *finish));
-static void put_line PARAMS ((WORD *w, int indent));
-static void put_word PARAMS ((WORD *w));
-static void put_space PARAMS ((int space));
+static void set_prefix (char *p);
+static void fmt (FILE *f);
+static bool get_paragraph (FILE *f);
+static int get_line (FILE *f, int c);
+static int get_prefix (FILE *f);
+static int get_space (FILE *f, int c);
+static int copy_rest (FILE *f, int c);
+static bool same_para (int c);
+static void flush_paragraph (void);
+static void fmt_paragraph (void);
+static void check_punctuation (WORD *w);
+static COST base_cost (WORD *this);
+static COST line_cost (WORD *next, int len);
+static void put_paragraph (WORD *finish);
+static void put_line (WORD *w, int indent);
+static void put_word (WORD *w);
+static void put_space (int space);
/* The name this program was run with. */
const char *program_name;
int getugroups ();
-static void print_user PARAMS ((uid_t uid));
-static void print_group PARAMS ((gid_t gid));
-static void print_group_list PARAMS ((const char *username));
-static void print_full_info PARAMS ((const char *username));
+static void print_user (uid_t uid);
+static void print_group (gid_t gid);
+static void print_group_list (const char *username);
+static void print_full_info (const char *username);
/* The name this program was run with. */
char *program_name;
int stat ();
-static int change_timestamps PARAMS ((const char *from, const char *to));
-static int change_attributes PARAMS ((const char *path));
-static int copy_file PARAMS ((const char *from, const char *to,
- const struct cp_options *x));
-static int install_file_to_path PARAMS ((const char *from, const char *to,
- const struct cp_options *x));
-static int install_file_in_dir PARAMS ((const char *from, const char *to_dir,
- const struct cp_options *x));
-static int install_file_in_file PARAMS ((const char *from, const char *to,
- const struct cp_options *x));
-static void get_ids PARAMS ((void));
-static void strip PARAMS ((const char *path));
-void usage PARAMS ((int status));
+static int change_timestamps (const char *from, const char *to);
+static int change_attributes (const char *path);
+static int copy_file (const char *from, const char *to,
+ const struct cp_options *x);
+static int install_file_to_path (const char *from, const char *to,
+ const struct cp_options *x);
+static int install_file_in_dir (const char *from, const char *to_dir,
+ const struct cp_options *x);
+static int install_file_in_file (const char *from, const char *to,
+ const struct cp_options *x);
+static void get_ids (void);
+static void strip (const char *path);
+void usage (int status);
/* The name this program was run with, for error messages. */
char *program_name;
on systems with an lstat function that does not dereference symlinks
that are specified with a trailing slash. */
#if ! LSTAT_FOLLOWS_SLASHED_SYMLINK
-int rpl_lstat PARAMS((const char *, struct stat *));
+int rpl_lstat (const char *, struct stat *);
# undef lstat
# define lstat(Name, Stat_buf) rpl_lstat(Name, Stat_buf)
#endif
char *getgroup ();
char *getuser ();
-static size_t quote_name PARAMS ((FILE *out, const char *name,
- struct quoting_options const *options));
-static char *make_link_path PARAMS ((const char *path, const char *linkname));
-static int decode_switches PARAMS ((int argc, char **argv));
-static int file_interesting PARAMS ((const struct dirent *next));
-static uintmax_t gobble_file PARAMS ((const char *name, enum filetype type,
- int explicit_arg, const char *dirname));
-static void print_color_indicator PARAMS ((const char *name, mode_t mode,
- int linkok));
-static void put_indicator PARAMS ((const struct bin_str *ind));
-static int put_indicator_direct PARAMS ((const struct bin_str *ind));
-static int length_of_file_name_and_frills PARAMS ((const struct fileinfo *f));
-static void add_ignore_pattern PARAMS ((const char *pattern));
-static void attach PARAMS ((char *dest, const char *dirname, const char *name));
-static void clear_files PARAMS ((void));
-static void extract_dirs_from_files PARAMS ((const char *dirname,
- int ignore_dot_and_dot_dot));
-static void get_link_name PARAMS ((const char *filename, struct fileinfo *f));
-static void indent PARAMS ((int from, int to));
-static void init_column_info PARAMS ((void));
-static void print_current_files PARAMS ((void));
-static void print_dir PARAMS ((const char *name, const char *realname));
-static void print_file_name_and_frills PARAMS ((const struct fileinfo *f));
-static void print_horizontal PARAMS ((void));
-static void print_long_format PARAMS ((const struct fileinfo *f));
-static void print_many_per_line PARAMS ((void));
-static void print_name_with_quoting PARAMS ((const char *p, mode_t mode,
- int linkok,
- struct obstack *stack));
-static void prep_non_filename_text PARAMS ((void));
-static void print_type_indicator PARAMS ((mode_t mode));
-static void print_with_commas PARAMS ((void));
-static void queue_directory PARAMS ((const char *name, const char *realname));
-static void sort_files PARAMS ((void));
-static void parse_ls_color PARAMS ((void));
-void usage PARAMS ((int status));
+static size_t quote_name (FILE *out, const char *name,
+ struct quoting_options const *options);
+static char *make_link_path (const char *path, const char *linkname);
+static int decode_switches (int argc, char **argv);
+static int file_interesting (const struct dirent *next);
+static uintmax_t gobble_file (const char *name, enum filetype type,
+ int explicit_arg, const char *dirname);
+static void print_color_indicator (const char *name, mode_t mode, int linkok);
+static void put_indicator (const struct bin_str *ind);
+static int put_indicator_direct (const struct bin_str *ind);
+static int length_of_file_name_and_frills (const struct fileinfo *f);
+static void add_ignore_pattern (const char *pattern);
+static void attach (char *dest, const char *dirname, const char *name);
+static void clear_files (void);
+static void extract_dirs_from_files (const char *dirname,
+ int ignore_dot_and_dot_dot);
+static void get_link_name (const char *filename, struct fileinfo *f);
+static void indent (int from, int to);
+static void init_column_info (void);
+static void print_current_files (void);
+static void print_dir (const char *name, const char *realname);
+static void print_file_name_and_frills (const struct fileinfo *f);
+static void print_horizontal (void);
+static void print_long_format (const struct fileinfo *f);
+static void print_many_per_line (void);
+static void print_name_with_quoting (const char *p, mode_t mode,
+ int linkok,
+ struct obstack *stack);
+static void prep_non_filename_text (void);
+static void print_type_indicator (mode_t mode);
+static void print_with_commas (void);
+static void queue_directory (const char *name, const char *realname);
+static void sort_files (void);
+static void parse_ls_color (void);
+void usage (int status);
/* The name the program was run with, stripped of any leading path. */
char *program_name;
static inline int
cmp_ctime (struct fileinfo const *a, struct fileinfo const *b,
- int (*cmp) PARAMS ((char const *, char const *)))
+ int (*cmp) (char const *, char const *))
{
int diff = CTIME_CMP (b->stat, a->stat);
return diff ? diff : cmp (a->name, b->name);
static inline int
cmp_mtime (struct fileinfo const *a, struct fileinfo const *b,
- int (*cmp) PARAMS((char const *, char const *)))
+ int (*cmp) (char const *, char const *))
{
int diff = MTIME_CMP (b->stat, a->stat);
return diff ? diff : cmp (a->name, b->name);
static inline int
cmp_atime (struct fileinfo const *a, struct fileinfo const *b,
- int (*cmp) PARAMS ((char const *, char const *)))
+ int (*cmp) (char const *, char const *))
{
int diff = ATIME_CMP (b->stat, a->stat);
return diff ? diff : cmp (a->name, b->name);
static inline int
cmp_size (struct fileinfo const *a, struct fileinfo const *b,
- int (*cmp) PARAMS ((char const *, char const *)))
+ int (*cmp) (char const *, char const *))
{
int diff = longdiff (b->stat.st_size, a->stat.st_size);
return diff ? diff : cmp (a->name, b->name);
static inline int
cmp_name (struct fileinfo const *a, struct fileinfo const *b,
- int (*cmp) PARAMS ((char const *, char const *)))
+ int (*cmp) (char const *, char const *))
{
return cmp (a->name, b->name);
}
static inline int
cmp_extension (struct fileinfo const *a, struct fileinfo const *b,
- int (*cmp) PARAMS ((char const *, char const *)))
+ int (*cmp) (char const *, char const *))
{
char const *base1 = strrchr (a->name, '.');
char const *base2 = strrchr (b->name, '.');
static void
sort_files (void)
{
- int (*func) PARAMS ((V, V));
+ int (*func) (V, V);
switch (sort_type)
{
{
enum output_format fmt;
enum size_spec size;
- void (*print_function) PARAMS ((size_t, const char *, const char *));
+ void (*print_function) (size_t, const char *, const char *);
char *fmt_string;
int hexl_mode_trailer;
int field_width;
/* Function that accepts an address and an optional following char,
and prints the address and char to stdout. */
-static void (*format_address) PARAMS ((uintmax_t, char));
+static void (*format_address) (uintmax_t, char);
/* The number of input bytes to skip before formatting and writing. */
static uintmax_t n_bytes_to_skip = 0;
enum output_format fmt;
const char *pre_fmt_string;
char *fmt_string;
- void (*print_function) PARAMS ((size_t, const char *, const char *));
+ void (*print_function) (size_t, const char *, const char *);
const char *p;
unsigned int c;
unsigned int field_width = 0;
# define NAME_MAX_FOR(p) NAME_MAX
#endif
-static int validate_path PARAMS ((char *path, int portability));
+static int validate_path (char *path, int portability);
/* The name this program was run with. */
char *program_name;
status; /* Status of the file pointer. */
/* Func to print lines in this col. */
- int (*print_func) PARAMS ((struct COLUMN *));
+ int (*print_func) (struct COLUMN *);
/* Func to print/store chars in this col. */
- void (*char_func) PARAMS ((int));
+ void (*char_func) (int);
int current_line; /* Index of current place in line_vector. */
int lines_stored; /* Number of lines stored in buff. */
#define NULLCOL (COLUMN *)0
-static int char_to_clump PARAMS ((int c));
-static int read_line PARAMS ((COLUMN *p));
-static int print_page PARAMS ((void));
-static int print_stored PARAMS ((COLUMN *p));
-static int open_file PARAMS ((char *name, COLUMN *p));
-static int skip_to_page PARAMS ((int page));
-static void print_header PARAMS ((void));
-static void pad_across_to PARAMS ((int position));
-static void add_line_number PARAMS ((COLUMN *p));
-static void getoptarg PARAMS ((char *arg, char switch_char, char *character,
- int *number));
-void usage PARAMS ((int status));
-static void print_files PARAMS ((int number_of_files, char **av));
-static void init_parameters PARAMS ((int number_of_files));
-static void init_header PARAMS ((char *filename, int desc));
-static int init_fps PARAMS ((int number_of_files, char **av));
-static void init_funcs PARAMS ((void));
-static void init_store_cols PARAMS ((void));
-static void store_columns PARAMS ((void));
-static void balance PARAMS ((int total_stored));
-static void store_char PARAMS ((int c));
-static void pad_down PARAMS ((int lines));
-static void read_rest_of_line PARAMS ((COLUMN *p));
-static void skip_read PARAMS ((COLUMN *p, int column_number));
-static void print_char PARAMS ((int c));
-static void cleanup PARAMS ((void));
-static void first_last_page PARAMS ((char *pages));
-static void print_sep_string PARAMS ((void));
-static void separator_string PARAMS ((const char *optarg_S));
+static int char_to_clump (int c);
+static int read_line (COLUMN *p);
+static int print_page (void);
+static int print_stored (COLUMN *p);
+static int open_file (char *name, COLUMN *p);
+static int skip_to_page (int page);
+static void print_header (void);
+static void pad_across_to (int position);
+static void add_line_number (COLUMN *p);
+static void getoptarg (char *arg, char switch_char, char *character,
+ int *number);
+void usage (int status);
+static void print_files (int number_of_files, char **av);
+static void init_parameters (int number_of_files);
+static void init_header (char *filename, int desc);
+static int init_fps (int number_of_files, char **av);
+static void init_funcs (void);
+static void init_store_cols (void);
+static void store_columns (void);
+static void balance (int total_stored);
+static void store_char (int c);
+static void pad_down (int lines);
+static void read_rest_of_line (COLUMN *p);
+static void skip_read (COLUMN *p, int column_number);
+static void print_char (int c);
+static void cleanup (void);
+static void first_last_page (char *pages);
+static void print_sep_string (void);
+static void separator_string (const char *optarg_S);
/* The name under which this program was invoked. */
char *program_name;
/* On systems with an lstat function that accepts the empty string,
arrange to make lstat calls go through the wrapper function. */
#if HAVE_LSTAT_EMPTY_STRING_BUG
-int rpl_lstat PARAMS((const char *, struct stat *));
+int rpl_lstat (const char *, struct stat *);
# define lstat(Name, Stat_buf) rpl_lstat(Name, Stat_buf)
#endif
#include "inttostr.h"
#include "quotearg.h" /* For quotearg_colon */
#include "quote.h" /* For quotearg_colon */
-char *xstrdup PARAMS ((char const *));
+char *xstrdup (char const *);
#ifndef O_NOCTTY
# define O_NOCTTY 0 /* This is a very optional frill */
/* Report MESSAGE for FILE, then clean up and exit. */
-static void die PARAMS ((char const *, char const *)) ATTRIBUTE_NORETURN;
+static void die (char const *, char const *) ATTRIBUTE_NORETURN;
static void
die (char const *message, char const *file)
{
/* Report a bad field specification SPEC, with extra info MSGID. */
-static void badfieldspec PARAMS ((char const *, char const *))
+static void badfieldspec (char const *, char const *)
ATTRIBUTE_NORETURN;
static void
badfieldspec (char const *spec, char const *msgid)
{NULL, 0, 0}
};
-static const char *visible PARAMS ((unsigned int ch));
-static unsigned long baud_to_value PARAMS ((speed_t speed));
-static int recover_mode PARAMS ((char *arg, struct termios *mode));
-static int screen_columns PARAMS ((void));
-static int set_mode PARAMS ((struct mode_info *info, int reversed,
- struct termios *mode));
-static long integer_arg PARAMS ((const char *s));
-static speed_t string_to_baud PARAMS ((const char *arg));
-static tcflag_t *mode_type_flag PARAMS ((enum mode_type type,
- struct termios *mode));
-static void display_all PARAMS ((struct termios *mode, int fd,
- const char *device_name));
-static void display_changed PARAMS ((struct termios *mode));
-static void display_recoverable PARAMS ((struct termios *mode));
-static void display_settings PARAMS ((enum output_type output_type,
- struct termios *mode, int fd,
- const char *device_name));
-static void display_speed PARAMS ((struct termios *mode, int fancy));
-static void display_window_size PARAMS ((int fancy, int fd,
- const char *device_name));
-static void sane_mode PARAMS ((struct termios *mode));
-static void set_control_char PARAMS ((struct control_info *info,
- const char *arg,
- struct termios *mode));
-static void set_speed PARAMS ((enum speed_setting type, const char *arg,
- struct termios *mode));
-static void set_window_size PARAMS ((int rows, int cols, int fd,
- const char *device_name));
+static const char *visible (unsigned int ch);
+static unsigned long baud_to_value (speed_t speed);
+static int recover_mode (char *arg, struct termios *mode);
+static int screen_columns (void);
+static int set_mode (struct mode_info *info, int reversed,
+ struct termios *mode);
+static long integer_arg (const char *s);
+static speed_t string_to_baud (const char *arg);
+static tcflag_t *mode_type_flag (enum mode_type type, struct termios *mode);
+static void display_all (struct termios *mode, int fd, const char *device_name);
+static void display_changed (struct termios *mode);
+static void display_recoverable (struct termios *mode);
+static void display_settings (enum output_type output_type,
+ struct termios *mode, int fd,
+ const char *device_name);
+static void display_speed (struct termios *mode, int fancy);
+static void display_window_size (int fancy, int fd, const char *device_name);
+static void sane_mode (struct termios *mode);
+static void set_control_char (struct control_info *info,
+ const char *arg,
+ struct termios *mode);
+static void set_speed (enum speed_setting type, const char *arg,
+ struct termios *mode);
+static void set_window_size (int rows, int cols, int fd,
+ const char *device_name);
/* The width of the screen, for output wrapping. */
static int max_col;
int errors = 0;
int optc;
int files_given;
- int (*sum_func) PARAMS ((const char *, int)) = bsd_sum_file;
+ int (*sum_func) (const char *, int) = bsd_sum_file;
program_name = argv[0];
setlocale (LC_ALL, "");
#define AUTHORS N_ ("Mike Parker, Richard M. Stallman, and David MacKenzie")
-static int tee PARAMS ((int nfiles, const char **files));
+static int tee (int nfiles, const char **files);
/* If nonzero, append to output files rather than truncating them. */
static int append;
static int argc; /* The number of arguments present in ARGV. */
static char **argv; /* The argument list. */
-static int unop PARAMS ((int op));
-static int binop PARAMS ((char *s));
-static int unary_operator PARAMS ((void));
-static int binary_operator PARAMS ((void));
-static int two_arguments PARAMS ((void));
-static int three_arguments PARAMS ((void));
-static int posixtest PARAMS ((void));
-
-static int expr PARAMS ((void));
-static int term PARAMS ((void));
-static int and PARAMS ((void));
-static int or PARAMS ((void));
-
-static void test_syntax_error PARAMS ((char const *format, char const *arg))
+static int unop (int op);
+static int binop (char *s);
+static int unary_operator (void);
+static int binary_operator (void);
+static int two_arguments (void);
+static int three_arguments (void);
+static int posixtest (void);
+
+static int expr (void);
+static int term (void);
+static int and (void);
+static int or (void);
+
+static void test_syntax_error (char const *format, char const *arg)
ATTRIBUTE_NORETURN;
-static void beyond PARAMS ((void)) ATTRIBUTE_NORETURN;
+static void beyond (void) ATTRIBUTE_NORETURN;
static void
test_syntax_error (char const *format, char const *arg)