From ab309487d5c1d7fa1a40e2d6b2e77e413cef4933 Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Fri, 5 Jun 2020 14:34:49 -0400 Subject: [PATCH] commit bash-20200605 snapshot --- CWRU/CWRU.chlog | 11 ++++++ alias.c | 18 +++++----- alias.h | 22 ++++++------ array.c | 2 +- array.h | 70 ++++++++++++++++++------------------- assoc.c | 2 +- bashhist.h | 40 +++++++++++----------- bracecomp.c | 4 +-- braces.c | 16 ++++----- builtins/alias.def | 4 +-- builtins/bashgetopt.h | 6 ++-- builtins/break.def | 4 +-- builtins/cd.def | 14 ++++---- builtins/command.def | 4 +-- builtins/complete.def | 20 +++++------ builtins/declare.def | 4 +-- builtins/enable.def | 14 ++++---- builtins/evalstring.c | 4 +-- builtins/exit.def | 4 +-- builtins/fg_bg.def | 4 +-- builtins/gen-helpfiles.c | 4 +-- builtins/getopt.h | 14 ++++---- builtins/hash.def | 12 +++---- builtins/help.def | 12 +++---- builtins/history.def | 10 +++--- builtins/jobs.def | 4 +-- builtins/kill.def | 4 +-- builtins/mapfile.def | 4 +-- builtins/mkbuiltins.c | 22 ++++++------ builtins/printf.def | 34 +++++++++--------- builtins/pushd.def | 14 ++++---- builtins/read.def | 22 ++++++------ builtins/set.def | 22 ++++++------ builtins/setattr.def | 4 +-- builtins/shopt.def | 34 +++++++++--------- builtins/source.def | 4 +-- builtins/suspend.def | 4 +-- builtins/trap.def | 4 +-- builtins/type.def | 4 +-- builtins/ulimit.def | 24 ++++++------- builtins/umask.def | 6 ++-- command.h | 16 ++++----- copy_cmd.c | 28 +++++++-------- dispose_cmd.h | 20 +++++------ error.c | 8 ++--- error.h | 38 ++++++++++----------- eval.c | 6 ++-- examples/loadables/ln.c | 4 +-- examples/loadables/seq.c | 6 ++-- findcmd.c | 12 +++---- flags.c | 4 +-- flags.h | 16 ++++----- general.c | 10 +++--- hashcmd.c | 4 +-- include/shtty.h | 42 +++++++++++------------ include/stdc.h | 12 +------ include/systimes.h | 4 +-- input.c | 4 +-- lib/glob/glob.c | 36 +++++++++---------- lib/glob/glob.h | 10 +++--- lib/glob/glob_loop.c | 4 +-- lib/glob/gmisc.c | 4 +-- lib/glob/sm_loop.c | 16 ++++----- lib/glob/smatch.c | 4 +-- lib/glob/strmatch.c | 6 ++-- lib/glob/strmatch.h | 6 ++-- lib/glob/xmbsrtowcs.c | 4 +-- lib/malloc/imalloc.h | 12 +++---- lib/malloc/mstats.h | 10 +++--- lib/malloc/shmalloc.h | 36 +++++++++---------- lib/malloc/stats.c | 6 ++-- lib/malloc/table.c | 6 ++-- lib/malloc/table.h | 20 +++++------ lib/malloc/trace.c | 4 +-- lib/malloc/watch.h | 4 +-- lib/sh/casemod.c | 4 +-- lib/sh/eaccess.c | 8 ++--- lib/sh/fnxform.c | 12 +++---- lib/sh/fpurge.c | 4 +-- lib/sh/makepath.c | 4 +-- lib/sh/mktime.c | 18 +++++----- lib/sh/netopen.c | 14 ++++---- lib/sh/pathphys.c | 4 +-- lib/sh/shquote.c | 6 ++-- lib/sh/snprintf.c | 42 +++++++++++------------ lib/sh/spell.c | 6 ++-- lib/sh/strtoimax.c | 6 ++-- lib/sh/strtoumax.c | 6 ++-- lib/sh/times.c | 4 +-- lib/sh/tmpfile.c | 6 ++-- lib/sh/unicode.c | 6 ++-- lib/sh/winsize.c | 6 ++-- lib/sh/zcatfd.c | 6 ++-- lib/sh/zgetline.c | 14 ++++---- lib/sh/zmapfd.c | 4 +-- lib/tilde/tilde.c | 18 +++++----- mailcheck.c | 24 ++++++------- mailcheck.h | 18 +++++----- make_cmd.c | 8 ++--- make_cmd.h | 62 ++++++++++++++++----------------- nojobs.c | 40 +++++++++++----------- pathexp.c | 10 +++--- pathexp.h | 22 ++++++------ pcomplete.c | 74 ++++++++++++++++++++-------------------- pcomplete.h | 38 ++++++++++----------- pcomplib.c | 4 +-- print_cmd.c | 64 +++++++++++++++++----------------- shell.c | 4 +-- shell.h | 12 +++---- sig.c | 4 +-- siglist.h | 4 +-- support/bashversion.c | 6 ++-- support/mksignames.c | 4 +-- support/mkversion.sh | 6 ++-- tests/RUN-ONE-TEST | 2 +- unwind_prot.c | 20 +++++------ unwind_prot.h | 24 ++++++------- version.c | 4 +-- version2.c | 4 +-- xmalloc.h | 16 ++++----- 120 files changed, 812 insertions(+), 811 deletions(-) diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index c90232c2..0e81460e 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -8517,3 +8517,14 @@ posixtime.h lib/sh/gettimeofday.c - gettimeofday: replacement function, so we don't have to use HAVE_GETTIMEOFDAY in the rest of the code + + 6/5 + --- +{lots of files}.[ch] +builtins/{lots of files}.{c,h,def} +lib/glob/{lots of files}.[ch] +lib/malloc/{lots of files}.[ch] +lib/sh/{lots of files}.c +include/{lots of files}.h +examples/loadables/{lots of files}.c + - __P -> PARAMS diff --git a/alias.c b/alias.c index 70138c85..cd5e99b7 100644 --- a/alias.c +++ b/alias.c @@ -1,7 +1,7 @@ /* alias.c -- Not a full alias, but just the kind that we use in the shell. Csh style alias is somewhere else (`over there, in a box'). */ -/* Copyright (C) 1987-2015 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -48,17 +48,17 @@ #define ALIAS_HASH_BUCKETS 64 /* must be power of two */ -typedef int sh_alias_map_func_t __P((alias_t *)); +typedef int sh_alias_map_func_t PARAMS((alias_t *)); -static void free_alias_data __P((PTR_T)); -static alias_t **map_over_aliases __P((sh_alias_map_func_t *)); -static void sort_aliases __P((alias_t **)); -static int qsort_alias_compare __P((alias_t **, alias_t **)); +static void free_alias_data PARAMS((PTR_T)); +static alias_t **map_over_aliases PARAMS((sh_alias_map_func_t *)); +static void sort_aliases PARAMS((alias_t **)); +static int qsort_alias_compare PARAMS((alias_t **, alias_t **)); #if defined (READLINE) -static int skipquotes __P((char *, int)); -static int skipws __P((char *, int)); -static int rd_token __P((char *, int)); +static int skipquotes PARAMS((char *, int)); +static int skipws PARAMS((char *, int)); +static int rd_token PARAMS((char *, int)); #endif /* Non-zero means expand all words on the line. Otherwise, expand diff --git a/alias.h b/alias.h index 87174a32..4e2d67c0 100644 --- a/alias.h +++ b/alias.h @@ -1,6 +1,6 @@ /* alias.h -- structure definitions. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -38,36 +38,36 @@ typedef struct alias { /* The list of known aliases. */ extern HASH_TABLE *aliases; -extern void initialize_aliases __P((void)); +extern void initialize_aliases PARAMS((void)); /* Scan the list of aliases looking for one with NAME. Return NULL if the alias doesn't exist, else a pointer to the alias. */ -extern alias_t *find_alias __P((char *)); +extern alias_t *find_alias PARAMS((char *)); /* Return the value of the alias for NAME, or NULL if there is none. */ -extern char *get_alias_value __P((char *)); +extern char *get_alias_value PARAMS((char *)); /* Make a new alias from NAME and VALUE. If NAME can be found, then replace its value. */ -extern void add_alias __P((char *, char *)); +extern void add_alias PARAMS((char *, char *)); /* Remove the alias with name NAME from the alias list. Returns the index of the removed alias, or -1 if the alias didn't exist. */ -extern int remove_alias __P((char *)); +extern int remove_alias PARAMS((char *)); /* Remove all aliases. */ -extern void delete_all_aliases __P((void)); +extern void delete_all_aliases PARAMS((void)); /* Return an array of all defined aliases. */ -extern alias_t **all_aliases __P((void)); +extern alias_t **all_aliases PARAMS((void)); /* Expand a single word for aliases. */ -extern char *alias_expand_word __P((char *)); +extern char *alias_expand_word PARAMS((char *)); /* Return a new line, with any aliases expanded. */ -extern char *alias_expand __P((char *)); +extern char *alias_expand PARAMS((char *)); /* Helper definition for the parser */ -extern void clear_string_list_expander __P((alias_t *)); +extern void clear_string_list_expander PARAMS((alias_t *)); #endif /* _ALIAS_H_ */ diff --git a/array.c b/array.c index a365cba7..abfa5df4 100644 --- a/array.c +++ b/array.c @@ -61,7 +61,7 @@ ae->next = new; \ } while (0) -static char *array_to_string_internal __P((ARRAY_ELEMENT *, ARRAY_ELEMENT *, char *, int)); +static char *array_to_string_internal PARAMS((ARRAY_ELEMENT *, ARRAY_ELEMENT *, char *, int)); static char *spacesep = " "; diff --git a/array.h b/array.h index dc9f564e..a610de7c 100644 --- a/array.h +++ b/array.h @@ -1,7 +1,7 @@ /* array.h -- definitions for the interface exported by array.c that allows the rest of the shell to manipulate array variables. */ -/* Copyright (C) 1997-2009 Free Software Foundation, Inc. +/* Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -43,53 +43,53 @@ typedef struct array_element { struct array_element *next, *prev; } ARRAY_ELEMENT; -typedef int sh_ae_map_func_t __P((ARRAY_ELEMENT *, void *)); +typedef int sh_ae_map_func_t PARAMS((ARRAY_ELEMENT *, void *)); /* Basic operations on entire arrays */ -extern ARRAY *array_create __P((void)); -extern void array_flush __P((ARRAY *)); -extern void array_dispose __P((ARRAY *)); -extern ARRAY *array_copy __P((ARRAY *)); -extern ARRAY *array_slice __P((ARRAY *, ARRAY_ELEMENT *, ARRAY_ELEMENT *)); -extern void array_walk __P((ARRAY *, sh_ae_map_func_t *, void *)); +extern ARRAY *array_create PARAMS((void)); +extern void array_flush PARAMS((ARRAY *)); +extern void array_dispose PARAMS((ARRAY *)); +extern ARRAY *array_copy PARAMS((ARRAY *)); +extern ARRAY *array_slice PARAMS((ARRAY *, ARRAY_ELEMENT *, ARRAY_ELEMENT *)); +extern void array_walk PARAMS((ARRAY *, sh_ae_map_func_t *, void *)); -extern ARRAY_ELEMENT *array_shift __P((ARRAY *, int, int)); -extern int array_rshift __P((ARRAY *, int, char *)); -extern ARRAY_ELEMENT *array_unshift_element __P((ARRAY *)); -extern int array_shift_element __P((ARRAY *, char *)); +extern ARRAY_ELEMENT *array_shift PARAMS((ARRAY *, int, int)); +extern int array_rshift PARAMS((ARRAY *, int, char *)); +extern ARRAY_ELEMENT *array_unshift_element PARAMS((ARRAY *)); +extern int array_shift_element PARAMS((ARRAY *, char *)); -extern ARRAY *array_quote __P((ARRAY *)); -extern ARRAY *array_quote_escapes __P((ARRAY *)); -extern ARRAY *array_dequote __P((ARRAY *)); -extern ARRAY *array_dequote_escapes __P((ARRAY *)); -extern ARRAY *array_remove_quoted_nulls __P((ARRAY *)); +extern ARRAY *array_quote PARAMS((ARRAY *)); +extern ARRAY *array_quote_escapes PARAMS((ARRAY *)); +extern ARRAY *array_dequote PARAMS((ARRAY *)); +extern ARRAY *array_dequote_escapes PARAMS((ARRAY *)); +extern ARRAY *array_remove_quoted_nulls PARAMS((ARRAY *)); -extern char *array_subrange __P((ARRAY *, arrayind_t, arrayind_t, int, int, int)); -extern char *array_patsub __P((ARRAY *, char *, char *, int)); -extern char *array_modcase __P((ARRAY *, char *, int, int)); +extern char *array_subrange PARAMS((ARRAY *, arrayind_t, arrayind_t, int, int, int)); +extern char *array_patsub PARAMS((ARRAY *, char *, char *, int)); +extern char *array_modcase PARAMS((ARRAY *, char *, int, int)); /* Basic operations on array elements. */ -extern ARRAY_ELEMENT *array_create_element __P((arrayind_t, char *)); -extern ARRAY_ELEMENT *array_copy_element __P((ARRAY_ELEMENT *)); -extern void array_dispose_element __P((ARRAY_ELEMENT *)); +extern ARRAY_ELEMENT *array_create_element PARAMS((arrayind_t, char *)); +extern ARRAY_ELEMENT *array_copy_element PARAMS((ARRAY_ELEMENT *)); +extern void array_dispose_element PARAMS((ARRAY_ELEMENT *)); -extern int array_insert __P((ARRAY *, arrayind_t, char *)); -extern ARRAY_ELEMENT *array_remove __P((ARRAY *, arrayind_t)); -extern char *array_reference __P((ARRAY *, arrayind_t)); +extern int array_insert PARAMS((ARRAY *, arrayind_t, char *)); +extern ARRAY_ELEMENT *array_remove PARAMS((ARRAY *, arrayind_t)); +extern char *array_reference PARAMS((ARRAY *, arrayind_t)); /* Converting to and from arrays */ -extern WORD_LIST *array_to_word_list __P((ARRAY *)); -extern ARRAY *array_from_word_list __P((WORD_LIST *)); -extern WORD_LIST *array_keys_to_word_list __P((ARRAY *)); +extern WORD_LIST *array_to_word_list PARAMS((ARRAY *)); +extern ARRAY *array_from_word_list PARAMS((WORD_LIST *)); +extern WORD_LIST *array_keys_to_word_list PARAMS((ARRAY *)); -extern ARRAY *array_assign_list __P((ARRAY *, WORD_LIST *)); +extern ARRAY *array_assign_list PARAMS((ARRAY *, WORD_LIST *)); -extern char **array_to_argv __P((ARRAY *)); +extern char **array_to_argv PARAMS((ARRAY *)); -extern char *array_to_kvpair __P((ARRAY *, int)); -extern char *array_to_assign __P((ARRAY *, int)); -extern char *array_to_string __P((ARRAY *, char *, int)); -extern ARRAY *array_from_string __P((char *, char *)); +extern char *array_to_kvpair PARAMS((ARRAY *, int)); +extern char *array_to_assign PARAMS((ARRAY *, int)); +extern char *array_to_string PARAMS((ARRAY *, char *, int)); +extern ARRAY *array_from_string PARAMS((char *, char *)); /* Flags for array_shift */ #define AS_DISPOSE 0x01 diff --git a/assoc.c b/assoc.c index fbbe78c3..5782e856 100644 --- a/assoc.c +++ b/assoc.c @@ -44,7 +44,7 @@ #include "assoc.h" #include "builtins/common.h" -static WORD_LIST *assoc_to_word_list_internal __P((HASH_TABLE *, int)); +static WORD_LIST *assoc_to_word_list_internal PARAMS((HASH_TABLE *, int)); /* assoc_create == hash_create */ diff --git a/bashhist.h b/bashhist.h index 90ecec9e..615f5d25 100644 --- a/bashhist.h +++ b/bashhist.h @@ -1,6 +1,6 @@ /* bashhist.h -- interface to the bash history functions in bashhist.c. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -64,26 +64,26 @@ extern int history_expansion_inhibited; extern int double_quotes_inhibit_history_expansion; # endif /* BANG_HISTORY */ -extern void bash_initialize_history __P((void)); -extern void bash_history_reinit __P((int)); -extern void bash_history_disable __P((void)); -extern void bash_history_enable __P((void)); -extern void bash_clear_history __P((void)); -extern int bash_delete_histent __P((int)); -extern int bash_delete_history_range __P((int, int)); -extern int bash_delete_last_history __P((void)); -extern void load_history __P((void)); -extern void save_history __P((void)); -extern int maybe_append_history __P((char *)); -extern int maybe_save_shell_history __P((void)); -extern char *pre_process_line __P((char *, int, int)); -extern void maybe_add_history __P((char *)); -extern void bash_add_history __P((char *)); -extern int check_add_history __P((char *, int)); -extern int history_number __P((void)); +extern void bash_initialize_history PARAMS((void)); +extern void bash_history_reinit PARAMS((int)); +extern void bash_history_disable PARAMS((void)); +extern void bash_history_enable PARAMS((void)); +extern void bash_clear_history PARAMS((void)); +extern int bash_delete_histent PARAMS((int)); +extern int bash_delete_history_range PARAMS((int, int)); +extern int bash_delete_last_history PARAMS((void)); +extern void load_history PARAMS((void)); +extern void save_history PARAMS((void)); +extern int maybe_append_history PARAMS((char *)); +extern int maybe_save_shell_history PARAMS((void)); +extern char *pre_process_line PARAMS((char *, int, int)); +extern void maybe_add_history PARAMS((char *)); +extern void bash_add_history PARAMS((char *)); +extern int check_add_history PARAMS((char *, int)); +extern int history_number PARAMS((void)); -extern void setup_history_ignore __P((char *)); +extern void setup_history_ignore PARAMS((char *)); -extern char *last_history_line __P((void)); +extern char *last_history_line PARAMS((void)); #endif /* _BASHHIST_H_ */ diff --git a/bracecomp.c b/bracecomp.c index 4fbca858..2ea8ba97 100644 --- a/bracecomp.c +++ b/bracecomp.c @@ -4,7 +4,7 @@ /* Original version by tromey@cns.caltech.edu, Fri Feb 7 1992. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -41,7 +41,7 @@ #include "shell.h" #include -static int _strcompare __P((char **, char **)); +static int _strcompare PARAMS((char **, char **)); /* Find greatest common prefix of two strings. */ static int diff --git a/braces.c b/braces.c index 8d0c7709..e91d326e 100644 --- a/braces.c +++ b/braces.c @@ -1,6 +1,6 @@ /* braces.c -- code for doing word expansion in curly braces. */ -/* Copyright (C) 1987-2018 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -59,7 +59,7 @@ extern int errno; #define BRACE_SEQ_SPECIFIER ".." -extern int asprintf __P((char **, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); +extern int asprintf PARAMS((char **, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); /* Basic idea: @@ -73,12 +73,12 @@ extern int asprintf __P((char **, const char *, ...)) __attribute__((__format__ /* The character which is used to separate arguments. */ static const int brace_arg_separator = ','; -#if defined (__P) -static int brace_gobbler __P((char *, size_t, int *, int)); -static char **expand_amble __P((char *, size_t, int)); -static char **expand_seqterm __P((char *, size_t)); -static char **mkseq __P((intmax_t, intmax_t, intmax_t, int, int)); -static char **array_concat __P((char **, char **)); +#if defined (PARAMS) +static int brace_gobbler PARAMS((char *, size_t, int *, int)); +static char **expand_amble PARAMS((char *, size_t, int)); +static char **expand_seqterm PARAMS((char *, size_t)); +static char **mkseq PARAMS((intmax_t, intmax_t, intmax_t, int, int)); +static char **array_concat PARAMS((char **, char **)); #else static int brace_gobbler (); static char **expand_amble (); diff --git a/builtins/alias.def b/builtins/alias.def index bf484f33..0ab90696 100644 --- a/builtins/alias.def +++ b/builtins/alias.def @@ -1,7 +1,7 @@ This file is alias.def, from which is created alias.c It implements the builtins "alias" and "unalias" in Bash. -Copyright (C) 1987-2015 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -63,7 +63,7 @@ $END /* Flags for print_alias */ #define AL_REUSABLE 0x01 -static void print_alias __P((alias_t *, int)); +static void print_alias PARAMS((alias_t *, int)); /* Hack the alias command in a Korn shell way. */ int diff --git a/builtins/bashgetopt.h b/builtins/bashgetopt.h index 6637b429..dcdaa48a 100644 --- a/builtins/bashgetopt.h +++ b/builtins/bashgetopt.h @@ -1,6 +1,6 @@ /* bashgetopt.h -- extern declarations for stuff defined in bashgetopt.c. */ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -36,7 +36,7 @@ extern int list_opttype; extern WORD_LIST *lcurrent; extern WORD_LIST *loptend; -extern int internal_getopt __P((WORD_LIST *, char *)); -extern void reset_internal_getopt __P((void)); +extern int internal_getopt PARAMS((WORD_LIST *, char *)); +extern void reset_internal_getopt PARAMS((void)); #endif /* !__BASH_GETOPT_H */ diff --git a/builtins/break.def b/builtins/break.def index 876d0635..b73ed5e5 100644 --- a/builtins/break.def +++ b/builtins/break.def @@ -1,7 +1,7 @@ This file is break.def, from which is created break.c. It implements the builtins "break" and "continue" in Bash. -Copyright (C) 1987-2009 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -46,7 +46,7 @@ $END #include "../execute_cmd.h" #include "common.h" -static int check_loop_level __P((void)); +static int check_loop_level PARAMS((void)); /* The depth of while's and until's. */ int loop_level = 0; diff --git a/builtins/cd.def b/builtins/cd.def index 2e3fcd82..7205608c 100644 --- a/builtins/cd.def +++ b/builtins/cd.def @@ -1,7 +1,7 @@ This file is cd.def, from which is created cd.c. It implements the builtins "cd" and "pwd" in Bash. -Copyright (C) 1987-2016 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -56,13 +56,13 @@ extern int errno; extern const char * const bash_getcwd_errstr; -static int bindpwd __P((int)); -static int setpwd __P((char *)); -static char *resetpwd __P((char *)); -static int change_to_directory __P((char *, int, int)); +static int bindpwd PARAMS((int)); +static int setpwd PARAMS((char *)); +static char *resetpwd PARAMS((char *)); +static int change_to_directory PARAMS((char *, int, int)); -static int cdxattr __P((char *, char **)); -static void resetxattr __P((void)); +static int cdxattr PARAMS((char *, char **)); +static void resetxattr PARAMS((void)); /* Change this to 1 to get cd spelling correction by default. */ int cdspelling = 0; diff --git a/builtins/command.def b/builtins/command.def index d58c985b..cea55b8e 100644 --- a/builtins/command.def +++ b/builtins/command.def @@ -1,7 +1,7 @@ This file is command.def, from which is created command.c. It implements the builtin "command" in Bash. -Copyright (C) 1987-2015 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -57,7 +57,7 @@ $END #include "common.h" #if defined (_CS_PATH) && defined (HAVE_CONFSTR) && !HAVE_DECL_CONFSTR -extern size_t confstr __P((int, char *, size_t)); +extern size_t confstr PARAMS((int, char *, size_t)); #endif /* Run the commands mentioned in LIST without paying attention to shell diff --git a/builtins/complete.def b/builtins/complete.def index 7ec6816f..f33328e8 100644 --- a/builtins/complete.def +++ b/builtins/complete.def @@ -1,7 +1,7 @@ This file is complete.def, from which is created complete.c. It implements the builtins "complete", "compgen", and "compopt" in Bash. -Copyright (C) 1999-2019 Free Software Foundation, Inc. +Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -84,18 +84,18 @@ struct _optflags { int Iflag; }; -static int find_compact __P((char *)); -static int find_compopt __P((char *)); +static int find_compact PARAMS((char *)); +static int find_compopt PARAMS((char *)); -static int build_actions __P((WORD_LIST *, struct _optflags *, unsigned long *, unsigned long *)); +static int build_actions PARAMS((WORD_LIST *, struct _optflags *, unsigned long *, unsigned long *)); -static int remove_cmd_completions __P((WORD_LIST *)); +static int remove_cmd_completions PARAMS((WORD_LIST *)); -static int print_one_completion __P((char *, COMPSPEC *)); -static int print_compitem __P((BUCKET_CONTENTS *)); -static void print_compopts __P((const char *, COMPSPEC *, int)); -static void print_all_completions __P((void)); -static int print_cmd_completions __P((WORD_LIST *)); +static int print_one_completion PARAMS((char *, COMPSPEC *)); +static int print_compitem PARAMS((BUCKET_CONTENTS *)); +static void print_compopts PARAMS((const char *, COMPSPEC *, int)); +static void print_all_completions PARAMS((void)); +static int print_cmd_completions PARAMS((WORD_LIST *)); static char *Garg, *Warg, *Parg, *Sarg, *Xarg, *Farg, *Carg; diff --git a/builtins/declare.def b/builtins/declare.def index 4b26cb1f..98878243 100644 --- a/builtins/declare.def +++ b/builtins/declare.def @@ -90,8 +90,8 @@ $END #include "builtext.h" #include "bashgetopt.h" -static SHELL_VAR *declare_find_variable __P((const char *, int, int)); -static int declare_internal __P((register WORD_LIST *, int)); +static SHELL_VAR *declare_find_variable PARAMS((const char *, int, int)); +static int declare_internal PARAMS((register WORD_LIST *, int)); /* Declare or change variable attributes. */ int diff --git a/builtins/enable.def b/builtins/enable.def index 42af0e69..9d9010b7 100644 --- a/builtins/enable.def +++ b/builtins/enable.def @@ -1,7 +1,7 @@ This file is enable.def, from which is created enable.c. It implements the builtin "enable" in Bash. -Copyright (C) 1987-2016 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -84,13 +84,13 @@ $END #define SFLAG 0x20 #if defined (HAVE_DLOPEN) && defined (HAVE_DLSYM) -static int dyn_load_builtin __P((WORD_LIST *, int, char *)); +static int dyn_load_builtin PARAMS((WORD_LIST *, int, char *)); #endif #if defined (HAVE_DLCLOSE) -static int dyn_unload_builtin __P((char *)); -static void delete_builtin __P((struct builtin *)); -static int local_dlclose __P((void *)); +static int dyn_unload_builtin PARAMS((char *)); +static void delete_builtin PARAMS((struct builtin *)); +static int local_dlclose PARAMS((void *)); #endif #define STRUCT_SUFFIX "_struct" @@ -98,8 +98,8 @@ static int local_dlclose __P((void *)); #define LOAD_SUFFIX "_builtin_load" #define UNLOAD_SUFFIX "_builtin_unload" -static void list_some_builtins __P((int)); -static int enable_shell_command __P((char *, int)); +static void list_some_builtins PARAMS((int)); +static int enable_shell_command PARAMS((char *, int)); /* Enable/disable shell commands present in LIST. If list is not specified, then print out a list of shell commands showing which are enabled and diff --git a/builtins/evalstring.c b/builtins/evalstring.c index 010d073f..4240277e 100644 --- a/builtins/evalstring.c +++ b/builtins/evalstring.c @@ -1,6 +1,6 @@ /* evalstring.c - evaluate a string as one or more shell commands. */ -/* Copyright (C) 1996-2017 Free Software Foundation, Inc. +/* Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -63,7 +63,7 @@ extern int errno; int parse_and_execute_level = 0; -static int cat_file __P((REDIRECT *)); +static int cat_file PARAMS((REDIRECT *)); #define PE_TAG "parse_and_execute top" #define PS_TAG "parse_string top" diff --git a/builtins/exit.def b/builtins/exit.def index 5167b2e0..dc6f3d5b 100644 --- a/builtins/exit.def +++ b/builtins/exit.def @@ -1,7 +1,7 @@ This file is exit.def, from which is created exit.c. It implements the builtins "exit", and "logout" in Bash. -Copyright (C) 1987-2009 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -50,7 +50,7 @@ $END extern int check_jobs_at_exit; -static int exit_or_logout __P((WORD_LIST *)); +static int exit_or_logout PARAMS((WORD_LIST *)); static int sourced_logout; int diff --git a/builtins/fg_bg.def b/builtins/fg_bg.def index 6a68d6ab..0fb53223 100644 --- a/builtins/fg_bg.def +++ b/builtins/fg_bg.def @@ -1,7 +1,7 @@ This file is fg_bg.def, from which is created fg_bg.c. It implements the builtins "bg" and "fg" in Bash. -Copyright (C) 1987-2009 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -52,7 +52,7 @@ $END #include "bashgetopt.h" #if defined (JOB_CONTROL) -static int fg_bg __P((WORD_LIST *, int)); +static int fg_bg PARAMS((WORD_LIST *, int)); /* How to bring a job into the foreground. */ int diff --git a/builtins/gen-helpfiles.c b/builtins/gen-helpfiles.c index 93c3a5dd..6bed4474 100644 --- a/builtins/gen-helpfiles.c +++ b/builtins/gen-helpfiles.c @@ -1,6 +1,6 @@ /* gen-helpfiles - create files containing builtin help text */ -/* Copyright (C) 2012 Free Software Foundation, Inc. +/* Copyright (C) 2012-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -98,7 +98,7 @@ char *helpfile_directory; /* Forward declarations. */ -int write_helpfiles __P((struct builtin *)); +int write_helpfiles PARAMS((struct builtin *)); /* For each file mentioned on the command line, process it and write the information to STRUCTFILE and EXTERNFILE, while diff --git a/builtins/getopt.h b/builtins/getopt.h index 99096188..fd978597 100644 --- a/builtins/getopt.h +++ b/builtins/getopt.h @@ -1,6 +1,6 @@ /* getopt.h - declarations for getopt. */ -/* Copyright (C) 1989, 1990, 1991, 1992, 1993, 2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 1989-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -59,7 +59,7 @@ extern int sh_optopt; /* Set to 1 when an unrecognized option is encountered. */ extern int sh_badopt; -extern int sh_getopt __P((int, char *const *, const char *)); +extern int sh_getopt PARAMS((int, char *const *, const char *)); typedef struct sh_getopt_state { @@ -71,12 +71,12 @@ typedef struct sh_getopt_state int gs_flags; } sh_getopt_state_t; -extern void sh_getopt_restore_state __P((char **)); +extern void sh_getopt_restore_state PARAMS((char **)); -extern sh_getopt_state_t *sh_getopt_alloc_istate __P((void)); -extern void sh_getopt_dispose_istate __P((sh_getopt_state_t *)); +extern sh_getopt_state_t *sh_getopt_alloc_istate PARAMS((void)); +extern void sh_getopt_dispose_istate PARAMS((sh_getopt_state_t *)); -extern sh_getopt_state_t *sh_getopt_save_istate __P((void)); -extern void sh_getopt_restore_istate __P((sh_getopt_state_t *)); +extern sh_getopt_state_t *sh_getopt_save_istate PARAMS((void)); +extern void sh_getopt_restore_istate PARAMS((sh_getopt_state_t *)); #endif /* _SH_GETOPT_H */ diff --git a/builtins/hash.def b/builtins/hash.def index 4de3a910..8eddc999 100644 --- a/builtins/hash.def +++ b/builtins/hash.def @@ -1,7 +1,7 @@ This file is hash.def, from which is created hash.c. It implements the builtin "hash" in Bash. -Copyright (C) 1987-2015 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -70,11 +70,11 @@ $END extern int dot_found_in_search; -static int add_hashed_command __P((char *, int)); -static int print_hash_info __P((BUCKET_CONTENTS *)); -static int print_portable_hash_info __P((BUCKET_CONTENTS *)); -static int print_hashed_commands __P((int)); -static int list_hashed_filename_targets __P((WORD_LIST *, int)); +static int add_hashed_command PARAMS((char *, int)); +static int print_hash_info PARAMS((BUCKET_CONTENTS *)); +static int print_portable_hash_info PARAMS((BUCKET_CONTENTS *)); +static int print_hashed_commands PARAMS((int)); +static int list_hashed_filename_targets PARAMS((WORD_LIST *, int)); /* Print statistics on the current state of hashed commands. If LIST is not empty, then rehash (or hash in the first place) the specified diff --git a/builtins/help.def b/builtins/help.def index 092a4b4c..f33b2b93 100644 --- a/builtins/help.def +++ b/builtins/help.def @@ -1,7 +1,7 @@ This file is help.def, from which is created help.c. It implements the builtin "help" in Bash. -Copyright (C) 1987-2019 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -79,11 +79,11 @@ extern int errno; extern const char * const bash_copyright; extern const char * const bash_license; -static void show_builtin_command_help __P((void)); -static int open_helpfile __P((char *)); -static void show_desc __P((char *, int)); -static void show_manpage __P((char *, int)); -static void show_longdoc __P((int)); +static void show_builtin_command_help PARAMS((void)); +static int open_helpfile PARAMS((char *)); +static void show_desc PARAMS((char *, int)); +static void show_manpage PARAMS((char *, int)); +static void show_longdoc PARAMS((int)); /* Print out a list of the known functions in the shell, and what they do. If LIST is supplied, print out the list which matches for each pattern diff --git a/builtins/history.def b/builtins/history.def index 1e3529f4..5db44c2c 100644 --- a/builtins/history.def +++ b/builtins/history.def @@ -1,7 +1,7 @@ This file is history.def, from which is created history.c. It implements the builtin "history" in Bash. -Copyright (C) 1987-2018 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -86,10 +86,10 @@ $END extern int errno; #endif -static char *histtime __P((HIST_ENTRY *, const char *)); -static int display_history __P((WORD_LIST *)); -static void push_history __P((WORD_LIST *)); -static int expand_and_print_history __P((WORD_LIST *)); +static char *histtime PARAMS((HIST_ENTRY *, const char *)); +static int display_history PARAMS((WORD_LIST *)); +static void push_history PARAMS((WORD_LIST *)); +static int expand_and_print_history PARAMS((WORD_LIST *)); #define AFLAG 0x01 #define RFLAG 0x02 diff --git a/builtins/jobs.def b/builtins/jobs.def index 6385609c..1ce098d0 100644 --- a/builtins/jobs.def +++ b/builtins/jobs.def @@ -1,7 +1,7 @@ This file is jobs.def, from which is created jobs.c. It implements the builtins "jobs" and "disown" in Bash. -Copyright (C) 1987-2015 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -68,7 +68,7 @@ $END #define JSTATE_RUNNING 0x1 #define JSTATE_STOPPED 0x2 -static int execute_list_with_replacements __P((WORD_LIST *)); +static int execute_list_with_replacements PARAMS((WORD_LIST *)); /* The `jobs' command. Prints outs a list of active jobs. If the argument `-l' is given, then the process id's are printed also. diff --git a/builtins/kill.def b/builtins/kill.def index 8d6e3ed1..c655092e 100644 --- a/builtins/kill.def +++ b/builtins/kill.def @@ -1,7 +1,7 @@ This file is kill.def, from which is created kill.c. It implements the builtin "kill" in Bash. -Copyright (C) 1987-2015 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -70,7 +70,7 @@ $END extern int errno; #endif /* !errno */ -static void kill_error __P((pid_t, int)); +static void kill_error PARAMS((pid_t, int)); #if !defined (CONTINUE_AFTER_KILL_ERROR) # define CONTINUE_OR_FAIL return (EXECUTION_FAILURE) diff --git a/builtins/mapfile.def b/builtins/mapfile.def index 995d34ac..65c3cb4f 100644 --- a/builtins/mapfile.def +++ b/builtins/mapfile.def @@ -2,7 +2,7 @@ This file is mapfile.def, from which is created mapfile.c. It implements the builtin "mapfile" in Bash. Copyright (C) 2005-2006 Rocky Bernstein for Free Software Foundation, Inc. -Copyright (C) 2008-2016 Free Software Foundation, Inc. +Copyright (C) 2008-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -91,7 +91,7 @@ extern int errno; #if defined (ARRAY_VARS) -static int run_callback __P((const char *, unsigned int, const char *)); +static int run_callback PARAMS((const char *, unsigned int, const char *)); #define DEFAULT_ARRAY_NAME "MAPFILE" #define DEFAULT_VARIABLE_NAME "MAPLINE" /* not used right now */ diff --git a/builtins/mkbuiltins.c b/builtins/mkbuiltins.c index 4f512010..e243021f 100644 --- a/builtins/mkbuiltins.c +++ b/builtins/mkbuiltins.c @@ -1,7 +1,7 @@ /* mkbuiltins.c - Create builtins.c, builtext.h, and builtdoc.c from a single source file called builtins.def. */ -/* Copyright (C) 1987-2016 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -439,7 +439,7 @@ array_free (array) /* The definition of a function. */ typedef int Function (); -typedef int mk_handler_func_t __P((char *, DEF_FILE *, char *)); +typedef int mk_handler_func_t PARAMS((char *, DEF_FILE *, char *)); /* Structure handles processor directives. */ typedef struct { @@ -447,14 +447,14 @@ typedef struct { mk_handler_func_t *function; } HANDLER_ENTRY; -extern int builtin_handler __P((char *, DEF_FILE *, char *)); -extern int function_handler __P((char *, DEF_FILE *, char *)); -extern int short_doc_handler __P((char *, DEF_FILE *, char *)); -extern int comment_handler __P((char *, DEF_FILE *, char *)); -extern int depends_on_handler __P((char *, DEF_FILE *, char *)); -extern int produces_handler __P((char *, DEF_FILE *, char *)); -extern int end_handler __P((char *, DEF_FILE *, char *)); -extern int docname_handler __P((char *, DEF_FILE *, char *)); +extern int builtin_handler PARAMS((char *, DEF_FILE *, char *)); +extern int function_handler PARAMS((char *, DEF_FILE *, char *)); +extern int short_doc_handler PARAMS((char *, DEF_FILE *, char *)); +extern int comment_handler PARAMS((char *, DEF_FILE *, char *)); +extern int depends_on_handler PARAMS((char *, DEF_FILE *, char *)); +extern int produces_handler PARAMS((char *, DEF_FILE *, char *)); +extern int end_handler PARAMS((char *, DEF_FILE *, char *)); +extern int docname_handler PARAMS((char *, DEF_FILE *, char *)); HANDLER_ENTRY handlers[] = { { "BUILTIN", builtin_handler }, @@ -1233,7 +1233,7 @@ write_builtins (defs, structfile, externfile) if (externfile) { if (builtin->function) - fprintf (externfile, "extern int %s __P((WORD_LIST *));\n", + fprintf (externfile, "extern int %s PARAMS((WORD_LIST *));\n", builtin->function); fprintf (externfile, "extern char * const %s_doc[];\n", diff --git a/builtins/printf.def b/builtins/printf.def index f4778131..0a5f4897 100644 --- a/builtins/printf.def +++ b/builtins/printf.def @@ -1,7 +1,7 @@ This file is printf.def, from which is created printf.c. It implements the builtin "printf" in Bash. -Copyright (C) 1997-2017 Free Software Foundation, Inc. +Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -187,25 +187,25 @@ extern int errno; extern time_t shell_start_time; #if !HAVE_ASPRINTF -extern int asprintf __P((char **, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); +extern int asprintf PARAMS((char **, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); #endif #if !HAVE_VSNPRINTF -extern int vsnprintf __P((char *, size_t, const char *, va_list)) __attribute__((__format__ (printf, 3, 0))); +extern int vsnprintf PARAMS((char *, size_t, const char *, va_list)) __attribute__((__format__ (printf, 3, 0))); #endif -static void printf_erange __P((char *)); -static int printstr __P((char *, char *, int, int, int)); -static int tescape __P((char *, char *, int *, int *)); -static char *bexpand __P((char *, int, int *, int *)); -static char *vbadd __P((char *, int)); -static int vbprintf __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); -static char *mklong __P((char *, char *, size_t)); -static int getchr __P((void)); -static char *getstr __P((void)); -static int getint __P((void)); -static intmax_t getintmax __P((void)); -static uintmax_t getuintmax __P((void)); +static void printf_erange PARAMS((char *)); +static int printstr PARAMS((char *, char *, int, int, int)); +static int tescape PARAMS((char *, char *, int *, int *)); +static char *bexpand PARAMS((char *, int, int *, int *)); +static char *vbadd PARAMS((char *, int)); +static int vbprintf PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +static char *mklong PARAMS((char *, char *, size_t)); +static int getchr PARAMS((void)); +static char *getstr PARAMS((void)); +static int getint PARAMS((void)); +static intmax_t getintmax PARAMS((void)); +static uintmax_t getuintmax PARAMS((void)); #if defined (HAVE_LONG_DOUBLE) && HAVE_DECL_STRTOLD && !defined(STRTOLD_BROKEN) typedef long double floatmax_t; @@ -216,9 +216,9 @@ typedef double floatmax_t; # define FLOATMAX_CONV "" # define strtofltmax strtod #endif -static floatmax_t getfloatmax __P((void)); +static floatmax_t getfloatmax PARAMS((void)); -static intmax_t asciicode __P((void)); +static intmax_t asciicode PARAMS((void)); static WORD_LIST *garglist, *orig_arglist; static int retval; diff --git a/builtins/pushd.def b/builtins/pushd.def index 71e04097..829f827d 100644 --- a/builtins/pushd.def +++ b/builtins/pushd.def @@ -1,7 +1,7 @@ This file is pushd.def, from which is created pushd.c. It implements the builtins "pushd", "popd", and "dirs" in Bash. -Copyright (C) 1987-2015 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -157,12 +157,12 @@ static int directory_list_size; /* Offset to the end of the list. */ static int directory_list_offset; -static void pushd_error __P((int, char *)); -static void clear_directory_stack __P((void)); -static int cd_to_string __P((char *)); -static int change_to_temp __P((char *)); -static void add_dirstack_element __P((char *)); -static int get_dirstack_index __P((intmax_t, int, int *)); +static void pushd_error PARAMS((int, char *)); +static void clear_directory_stack PARAMS((void)); +static int cd_to_string PARAMS((char *)); +static int change_to_temp PARAMS((char *)); +static void add_dirstack_element PARAMS((char *)); +static int get_dirstack_index PARAMS((intmax_t, int, int *)); #define NOCD 0x01 #define ROTATE 0x02 diff --git a/builtins/read.def b/builtins/read.def index 18f01930..39e16e84 100644 --- a/builtins/read.def +++ b/builtins/read.def @@ -1,7 +1,7 @@ This file is read.def, from which is created read.c. It implements the builtin "read" in Bash. -Copyright (C) 1987-2019 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -119,20 +119,20 @@ struct ttsave }; #if defined (READLINE) -static void reset_attempted_completion_function __P((char *)); -static int set_itext __P((void)); -static char *edit_line __P((char *, char *)); -static void set_eol_delim __P((int)); -static void reset_eol_delim __P((char *)); +static void reset_attempted_completion_function PARAMS((char *)); +static int set_itext PARAMS((void)); +static char *edit_line PARAMS((char *, char *)); +static void set_eol_delim PARAMS((int)); +static void reset_eol_delim PARAMS((char *)); #endif -static SHELL_VAR *bind_read_variable __P((char *, char *)); +static SHELL_VAR *bind_read_variable PARAMS((char *, char *)); #if defined (HANDLE_MULTIBYTE) -static int read_mbchar __P((int, char *, int, int, int)); +static int read_mbchar PARAMS((int, char *, int, int, int)); #endif -static void ttyrestore __P((struct ttsave *)); +static void ttyrestore PARAMS((struct ttsave *)); -static sighandler sigalrm __P((int)); -static void reset_alarm __P((void)); +static sighandler sigalrm PARAMS((int)); +static void reset_alarm PARAMS((void)); /* Try this to see what the rest of the shell can do with the information. */ procenv_t alrmbuf; diff --git a/builtins/set.def b/builtins/set.def index 16e592f0..48927679 100644 --- a/builtins/set.def +++ b/builtins/set.def @@ -1,7 +1,7 @@ This file is set.def, from which is created set.c. It implements the "set" and "unset" builtins in Bash. -Copyright (C) 1987-2018 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -151,24 +151,24 @@ Exit Status: Returns success unless an invalid option is given. $END -typedef int setopt_set_func_t __P((int, char *)); -typedef int setopt_get_func_t __P((char *)); +typedef int setopt_set_func_t PARAMS((int, char *)); +typedef int setopt_get_func_t PARAMS((char *)); -static int find_minus_o_option __P((char *)); +static int find_minus_o_option PARAMS((char *)); -static void print_minus_o_option __P((char *, int, int)); -static void print_all_shell_variables __P((void)); +static void print_minus_o_option PARAMS((char *, int, int)); +static void print_all_shell_variables PARAMS((void)); -static int set_ignoreeof __P((int, char *)); -static int set_posix_mode __P((int, char *)); +static int set_ignoreeof PARAMS((int, char *)); +static int set_posix_mode PARAMS((int, char *)); #if defined (READLINE) -static int set_edit_mode __P((int, char *)); -static int get_edit_mode __P((char *)); +static int set_edit_mode PARAMS((int, char *)); +static int get_edit_mode PARAMS((char *)); #endif #if defined (HISTORY) -static int bash_set_history __P((int, char *)); +static int bash_set_history PARAMS((int, char *)); #endif static const char * const on = "on"; diff --git a/builtins/setattr.def b/builtins/setattr.def index a75af70c..e43f7091 100644 --- a/builtins/setattr.def +++ b/builtins/setattr.def @@ -1,7 +1,7 @@ This file is setattr.def, from which is created setattr.c. It implements the builtins "export" and "readonly", in Bash. -Copyright (C) 1987-2015 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -42,7 +42,7 @@ $PRODUCES setattr.c extern sh_builtin_func_t *this_shell_builtin; #ifdef ARRAY_VARS -extern int declare_builtin __P((WORD_LIST *)); +extern int declare_builtin PARAMS((WORD_LIST *)); #endif #define READONLY_OR_EXPORT \ diff --git a/builtins/shopt.def b/builtins/shopt.def index cbf2914f..6dca2242 100644 --- a/builtins/shopt.def +++ b/builtins/shopt.def @@ -105,7 +105,7 @@ extern int force_fignore; extern int dircomplete_spelling, dircomplete_expand; extern int complete_fullquote; -extern int enable_hostname_completion __P((int)); +extern int enable_hostname_completion PARAMS((int)); #endif #if defined (PROGRAMMABLE_COMPLETION) @@ -126,21 +126,21 @@ extern int array_expand_once; extern int syslog_history; #endif -static void shopt_error __P((char *)); +static void shopt_error PARAMS((char *)); -static int set_shellopts_after_change __P((char *, int)); -static int set_compatibility_level __P((char *, int)); +static int set_shellopts_after_change PARAMS((char *, int)); +static int set_compatibility_level PARAMS((char *, int)); #if defined (RESTRICTED_SHELL) -static int set_restricted_shell __P((char *, int)); +static int set_restricted_shell PARAMS((char *, int)); #endif #if defined (READLINE) -static int shopt_enable_hostname_completion __P((char *, int)); -static int shopt_set_complete_direxpand __P((char *, int)); +static int shopt_enable_hostname_completion PARAMS((char *, int)); +static int shopt_set_complete_direxpand PARAMS((char *, int)); #endif -static int shopt_set_debug_mode __P((char *, int)); +static int shopt_set_debug_mode PARAMS((char *, int)); static int shopt_login_shell; static int shopt_compat31; @@ -151,7 +151,7 @@ static int shopt_compat42; static int shopt_compat43; static int shopt_compat44; -typedef int shopt_set_func_t __P((char *, int)); +typedef int shopt_set_func_t PARAMS((char *, int)); /* If you add a new variable name here, make sure to set the default value appropriately in reset_shopt_options. */ @@ -255,14 +255,14 @@ static struct { static const char * const on = "on"; static const char * const off = "off"; -static int find_shopt __P((char *)); -static int toggle_shopts __P((int, WORD_LIST *, int)); -static void print_shopt __P((char *, int, int)); -static int list_shopts __P((WORD_LIST *, int)); -static int list_some_shopts __P((int, int)); -static int list_shopt_o_options __P((WORD_LIST *, int)); -static int list_some_o_options __P((int, int)); -static int set_shopt_o_options __P((int, WORD_LIST *, int)); +static int find_shopt PARAMS((char *)); +static int toggle_shopts PARAMS((int, WORD_LIST *, int)); +static void print_shopt PARAMS((char *, int, int)); +static int list_shopts PARAMS((WORD_LIST *, int)); +static int list_some_shopts PARAMS((int, int)); +static int list_shopt_o_options PARAMS((WORD_LIST *, int)); +static int list_some_o_options PARAMS((int, int)); +static int set_shopt_o_options PARAMS((int, WORD_LIST *, int)); #define SFLAG 0x01 #define UFLAG 0x02 diff --git a/builtins/source.def b/builtins/source.def index a6963da7..5b2f994d 100644 --- a/builtins/source.def +++ b/builtins/source.def @@ -1,7 +1,7 @@ This file is source.def, from which is created source.c. It implements the builtins "." and "source" in Bash. -Copyright (C) 1987-2015 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -80,7 +80,7 @@ $END extern int errno; #endif /* !errno */ -static void maybe_pop_dollar_vars __P((void)); +static void maybe_pop_dollar_vars PARAMS((void)); /* If non-zero, `.' uses $PATH to look up the script to be sourced. */ int source_uses_path = 1; diff --git a/builtins/suspend.def b/builtins/suspend.def index db28feec..e99fd26b 100644 --- a/builtins/suspend.def +++ b/builtins/suspend.def @@ -1,7 +1,7 @@ This file is suspend.def, from which is created suspend.c. It implements the builtin "suspend" in Bash. -Copyright (C) 1987-2015 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -54,7 +54,7 @@ $END #include "common.h" #include "bashgetopt.h" -static sighandler suspend_continue __P((int)); +static sighandler suspend_continue PARAMS((int)); static SigHandler *old_cont; #if 0 diff --git a/builtins/trap.def b/builtins/trap.def index e3fe54d7..4fa39aef 100644 --- a/builtins/trap.def +++ b/builtins/trap.def @@ -75,8 +75,8 @@ $END #include "common.h" #include "bashgetopt.h" -static void showtrap __P((int, int)); -static int display_traps __P((WORD_LIST *, int)); +static void showtrap PARAMS((int, int)); +static int display_traps PARAMS((WORD_LIST *, int)); /* The trap command: diff --git a/builtins/type.def b/builtins/type.def index 699ecd20..a8e47c0a 100644 --- a/builtins/type.def +++ b/builtins/type.def @@ -1,7 +1,7 @@ This file is type.def, from which is created type.c. It implements the builtin "type" in Bash. -Copyright (C) 1987-2015 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -76,7 +76,7 @@ $END #include "common.h" #include "bashgetopt.h" -extern int find_reserved_word __P((char *)); +extern int find_reserved_word PARAMS((char *)); /* For each word in LIST, find out what the shell is going to do with it as a simple command. i.e., which file would this shell use to diff --git a/builtins/ulimit.def b/builtins/ulimit.def index 3c7a4ad6..a895c5e2 100644 --- a/builtins/ulimit.def +++ b/builtins/ulimit.def @@ -1,7 +1,7 @@ This file is ulimit.def, from which is created ulimit.c. It implements the builtin "ulimit" in Bash. -Copyright (C) 1987-2015 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -204,22 +204,22 @@ extern int errno; #define BLOCKSIZE(x) (((x) == POSIXBLK) ? (posixly_correct ? 512 : 1024) : (x)) -static int _findlim __P((int)); +static int _findlim PARAMS((int)); -static int ulimit_internal __P((int, char *, int, int)); +static int ulimit_internal PARAMS((int, char *, int, int)); -static int get_limit __P((int, RLIMTYPE *, RLIMTYPE *)); -static int set_limit __P((int, RLIMTYPE, int)); +static int get_limit PARAMS((int, RLIMTYPE *, RLIMTYPE *)); +static int set_limit PARAMS((int, RLIMTYPE, int)); -static void printone __P((int, RLIMTYPE, int)); -static void print_all_limits __P((int)); +static void printone PARAMS((int, RLIMTYPE, int)); +static void print_all_limits PARAMS((int)); -static int set_all_limits __P((int, RLIMTYPE)); +static int set_all_limits PARAMS((int, RLIMTYPE)); -static int filesize __P((RLIMTYPE *)); -static int pipesize __P((RLIMTYPE *)); -static int getmaxuprc __P((RLIMTYPE *)); -static int getmaxvm __P((RLIMTYPE *, RLIMTYPE *)); +static int filesize PARAMS((RLIMTYPE *)); +static int pipesize PARAMS((RLIMTYPE *)); +static int getmaxuprc PARAMS((RLIMTYPE *)); +static int getmaxvm PARAMS((RLIMTYPE *, RLIMTYPE *)); typedef struct { int option; /* The ulimit option for this limit. */ diff --git a/builtins/umask.def b/builtins/umask.def index d3138d4d..8041d56b 100644 --- a/builtins/umask.def +++ b/builtins/umask.def @@ -1,7 +1,7 @@ This file is umask.def, from which is created umask.c. It implements the builtin "umask" in Bash. -Copyright (C) 1987-2015 Free Software Foundation, Inc. +Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -67,8 +67,8 @@ $END /* */ /* **************************************************************** */ -static void print_symbolic_umask __P((mode_t)); -static int symbolic_umask __P((WORD_LIST *)); +static void print_symbolic_umask PARAMS((mode_t)); +static int symbolic_umask PARAMS((WORD_LIST *)); /* Set or display the mask used by the system when creating files. Flag of -S means display the umask in a symbolic mode. */ diff --git a/command.h b/command.h index 87c6f92b..12774c43 100644 --- a/command.h +++ b/command.h @@ -1,7 +1,7 @@ /* command.h -- The structures used internally to represent commands, and the extern declarations of the functions used to create them. */ -/* Copyright (C) 1993-2016 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -395,13 +395,13 @@ extern Coproc sh_coproc; /* Forward declarations of functions declared in copy_cmd.c. */ -extern FUNCTION_DEF *copy_function_def_contents __P((FUNCTION_DEF *, FUNCTION_DEF *)); -extern FUNCTION_DEF *copy_function_def __P((FUNCTION_DEF *)); +extern FUNCTION_DEF *copy_function_def_contents PARAMS((FUNCTION_DEF *, FUNCTION_DEF *)); +extern FUNCTION_DEF *copy_function_def PARAMS((FUNCTION_DEF *)); -extern WORD_DESC *copy_word __P((WORD_DESC *)); -extern WORD_LIST *copy_word_list __P((WORD_LIST *)); -extern REDIRECT *copy_redirect __P((REDIRECT *)); -extern REDIRECT *copy_redirects __P((REDIRECT *)); -extern COMMAND *copy_command __P((COMMAND *)); +extern WORD_DESC *copy_word PARAMS((WORD_DESC *)); +extern WORD_LIST *copy_word_list PARAMS((WORD_LIST *)); +extern REDIRECT *copy_redirect PARAMS((REDIRECT *)); +extern REDIRECT *copy_redirects PARAMS((REDIRECT *)); +extern COMMAND *copy_command PARAMS((COMMAND *)); #endif /* _COMMAND_H_ */ diff --git a/copy_cmd.c b/copy_cmd.c index d2b5bc9c..758ff238 100644 --- a/copy_cmd.c +++ b/copy_cmd.c @@ -2,7 +2,7 @@ primarily for making function definitions, but I'm not sure that anyone else will need it. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -32,25 +32,25 @@ #include "shell.h" -static PATTERN_LIST *copy_case_clause __P((PATTERN_LIST *)); -static PATTERN_LIST *copy_case_clauses __P((PATTERN_LIST *)); -static FOR_COM *copy_for_command __P((FOR_COM *)); +static PATTERN_LIST *copy_case_clause PARAMS((PATTERN_LIST *)); +static PATTERN_LIST *copy_case_clauses PARAMS((PATTERN_LIST *)); +static FOR_COM *copy_for_command PARAMS((FOR_COM *)); #if defined (ARITH_FOR_COMMAND) -static ARITH_FOR_COM *copy_arith_for_command __P((ARITH_FOR_COM *)); +static ARITH_FOR_COM *copy_arith_for_command PARAMS((ARITH_FOR_COM *)); #endif -static GROUP_COM *copy_group_command __P((GROUP_COM *)); -static SUBSHELL_COM *copy_subshell_command __P((SUBSHELL_COM *)); -static COPROC_COM *copy_coproc_command __P((COPROC_COM *)); -static CASE_COM *copy_case_command __P((CASE_COM *)); -static WHILE_COM *copy_while_command __P((WHILE_COM *)); -static IF_COM *copy_if_command __P((IF_COM *)); +static GROUP_COM *copy_group_command PARAMS((GROUP_COM *)); +static SUBSHELL_COM *copy_subshell_command PARAMS((SUBSHELL_COM *)); +static COPROC_COM *copy_coproc_command PARAMS((COPROC_COM *)); +static CASE_COM *copy_case_command PARAMS((CASE_COM *)); +static WHILE_COM *copy_while_command PARAMS((WHILE_COM *)); +static IF_COM *copy_if_command PARAMS((IF_COM *)); #if defined (DPAREN_ARITHMETIC) -static ARITH_COM *copy_arith_command __P((ARITH_COM *)); +static ARITH_COM *copy_arith_command PARAMS((ARITH_COM *)); #endif #if defined (COND_COMMAND) -static COND_COM *copy_cond_command __P((COND_COM *)); +static COND_COM *copy_cond_command PARAMS((COND_COM *)); #endif -static SIMPLE_COM *copy_simple_command __P((SIMPLE_COM *)); +static SIMPLE_COM *copy_simple_command PARAMS((SIMPLE_COM *)); WORD_DESC * copy_word (w) diff --git a/dispose_cmd.h b/dispose_cmd.h index 0a3889c1..6095d44a 100644 --- a/dispose_cmd.h +++ b/dispose_cmd.h @@ -1,6 +1,6 @@ /* dispose_cmd.h -- Functions appearing in dispose_cmd.c. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -23,18 +23,18 @@ #include "stdc.h" -extern void dispose_command __P((COMMAND *)); -extern void dispose_word_desc __P((WORD_DESC *)); -extern void dispose_word __P((WORD_DESC *)); -extern void dispose_words __P((WORD_LIST *)); -extern void dispose_word_array __P((char **)); -extern void dispose_redirects __P((REDIRECT *)); +extern void dispose_command PARAMS((COMMAND *)); +extern void dispose_word_desc PARAMS((WORD_DESC *)); +extern void dispose_word PARAMS((WORD_DESC *)); +extern void dispose_words PARAMS((WORD_LIST *)); +extern void dispose_word_array PARAMS((char **)); +extern void dispose_redirects PARAMS((REDIRECT *)); #if defined (COND_COMMAND) -extern void dispose_cond_node __P((COND_COM *)); +extern void dispose_cond_node PARAMS((COND_COM *)); #endif -extern void dispose_function_def_contents __P((FUNCTION_DEF *)); -extern void dispose_function_def __P((FUNCTION_DEF *)); +extern void dispose_function_def_contents PARAMS((FUNCTION_DEF *)); +extern void dispose_function_def PARAMS((FUNCTION_DEF *)); #endif /* !_DISPOSE_CMD_H_ */ diff --git a/error.c b/error.c index 097e1872..7df4b146 100644 --- a/error.c +++ b/error.c @@ -1,6 +1,6 @@ /* error.c -- Functions for handling errors. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -52,18 +52,18 @@ extern int errno; # include "bashhist.h" #endif -extern int executing_line_number __P((void)); +extern int executing_line_number PARAMS((void)); #if defined (JOB_CONTROL) extern pid_t shell_pgrp; -extern int give_terminal_to __P((pid_t, int)); +extern int give_terminal_to PARAMS((pid_t, int)); #endif /* JOB_CONTROL */ #if defined (ARRAY_VARS) extern const char * const bash_badsub_errmsg; #endif -static void error_prolog __P((int)); +static void error_prolog PARAMS((int)); /* The current maintainer of the shell. You change this in the Makefile. */ diff --git a/error.h b/error.h index 964c1123..30828095 100644 --- a/error.h +++ b/error.h @@ -1,6 +1,6 @@ /* error.h -- External declarations of functions appearing in error.c. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -24,50 +24,50 @@ #include "stdc.h" /* Get the name of the shell or shell script for an error message. */ -extern char *get_name_for_error __P((void)); +extern char *get_name_for_error PARAMS((void)); /* Report an error having to do with FILENAME. */ -extern void file_error __P((const char *)); +extern void file_error PARAMS((const char *)); /* Report a programmer's error, and abort. Pass REASON, and ARG1 ... ARG5. */ -extern void programming_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +extern void programming_error PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* General error reporting. Pass FORMAT and ARG1 ... ARG5. */ -extern void report_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +extern void report_error PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* Error messages for parts of the parser that don't call report_syntax_error */ -extern void parser_error __P((int, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); +extern void parser_error PARAMS((int, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); /* Report an unrecoverable error and exit. Pass FORMAT and ARG1 ... ARG5. */ -extern void fatal_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +extern void fatal_error PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* Report a system error, like BSD warn(3). */ -extern void sys_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +extern void sys_error PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* Report an internal error. */ -extern void internal_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +extern void internal_error PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* Report an internal warning. */ -extern void internal_warning __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +extern void internal_warning PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* Report an internal informational notice. */ -extern void internal_inform __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +extern void internal_inform PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* Debugging functions, not enabled in released version. */ -extern char *strescape __P((const char *)); -extern void itrace __P((const char *, ...)) __attribute__ ((__format__ (printf, 1, 2))); -extern void trace __P((const char *, ...)) __attribute__ ((__format__ (printf, 1, 2))); +extern char *strescape PARAMS((const char *)); +extern void itrace PARAMS((const char *, ...)) __attribute__ ((__format__ (printf, 1, 2))); +extern void trace PARAMS((const char *, ...)) __attribute__ ((__format__ (printf, 1, 2))); /* Report an error having to do with command parsing or execution. */ -extern void command_error __P((const char *, int, int, int)); +extern void command_error PARAMS((const char *, int, int, int)); -extern char *command_errstr __P((int)); +extern char *command_errstr PARAMS((int)); /* Specific error message functions that eventually call report_error or internal_error. */ -extern void err_badarraysub __P((const char *)); -extern void err_unboundvar __P((const char *)); -extern void err_readonly __P((const char *)); +extern void err_badarraysub PARAMS((const char *)); +extern void err_unboundvar PARAMS((const char *)); +extern void err_readonly PARAMS((const char *)); #endif /* !_ERROR_H_ */ diff --git a/eval.c b/eval.c index 17d389c3..91bffaa2 100644 --- a/eval.c +++ b/eval.c @@ -1,6 +1,6 @@ /* eval.c -- reading and evaluating commands. */ -/* Copyright (C) 1996-2011 Free Software Foundation, Inc. +/* Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -48,8 +48,8 @@ # include "bashhist.h" #endif -static void send_pwd_to_eterm __P((void)); -static sighandler alrm_catcher __P((int)); +static void send_pwd_to_eterm PARAMS((void)); +static sighandler alrm_catcher PARAMS((int)); /* Read and execute commands until EOF is reached. This assumes that the input source has already been initialized. */ diff --git a/examples/loadables/ln.c b/examples/loadables/ln.c index 93764a35..874e9db8 100644 --- a/examples/loadables/ln.c +++ b/examples/loadables/ln.c @@ -3,7 +3,7 @@ /* See Makefile for compilation details. */ /* - Copyright (C) 1999-2009 Free Software Foundation, Inc. + Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash. Bash is free software: you can redistribute it and/or modify @@ -42,7 +42,7 @@ extern int errno; #endif -typedef int unix_link_syscall_t __P((const char *, const char *)); +typedef int unix_link_syscall_t PARAMS((const char *, const char *)); #define LN_SYMLINK 0x01 #define LN_UNLINK 0x02 diff --git a/examples/loadables/seq.c b/examples/loadables/seq.c index b4d0e0f5..e5624079 100644 --- a/examples/loadables/seq.c +++ b/examples/loadables/seq.c @@ -1,5 +1,5 @@ /* seq - print sequence of numbers to standard output. - Copyright (C) 2018 Free Software Foundation, Inc. + Copyright (C) 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -49,8 +49,8 @@ typedef double floatmax_t; # define FLOATMAX_FMT "%g" # define FLOATMAX_WFMT "%0.f" #endif -static floatmax_t getfloatmax __P((const char *)); -static char *genformat __P((floatmax_t, floatmax_t, floatmax_t)); +static floatmax_t getfloatmax PARAMS((const char *)); +static char *genformat PARAMS((floatmax_t, floatmax_t, floatmax_t)); #define MAX(a, b) (((a) < (b))? (b) : (a)) diff --git a/findcmd.c b/findcmd.c index e5944240..e235705a 100644 --- a/findcmd.c +++ b/findcmd.c @@ -52,13 +52,13 @@ extern int errno; #endif /* Static functions defined and used in this file. */ -static char *_find_user_command_internal __P((const char *, int)); -static char *find_user_command_internal __P((const char *, int)); -static char *find_user_command_in_path __P((const char *, char *, int)); -static char *find_in_path_element __P((const char *, char *, int, int, struct stat *)); -static char *find_absolute_program __P((const char *, int)); +static char *_find_user_command_internal PARAMS((const char *, int)); +static char *find_user_command_internal PARAMS((const char *, int)); +static char *find_user_command_in_path PARAMS((const char *, char *, int)); +static char *find_in_path_element PARAMS((const char *, char *, int, int, struct stat *)); +static char *find_absolute_program PARAMS((const char *, int)); -static char *get_next_path_element __P((char *, int *)); +static char *get_next_path_element PARAMS((char *, int *)); /* The file name which we would try to execute, except that it isn't possible to execute it. This is the first file that matches the diff --git a/flags.c b/flags.c index 6e208419..7e301f77 100644 --- a/flags.c +++ b/flags.c @@ -1,7 +1,7 @@ /* flags.c -- Everything about flags except the `set' command. That is in builtins.c */ -/* Copyright (C) 1987-2015 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -33,7 +33,7 @@ #endif #if defined (JOB_CONTROL) -extern int set_job_control __P((int)); +extern int set_job_control PARAMS((int)); #endif /* **************************************************************** */ diff --git a/flags.h b/flags.h index fdbf7f97..c0a2a08d 100644 --- a/flags.h +++ b/flags.h @@ -1,7 +1,7 @@ /* flags.h -- a list of all the flags that the shell knows about. You add a flag to this program by adding the name here, and in flags.c. */ -/* Copyright (C) 1993-2015 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -71,15 +71,15 @@ extern int restricted; extern int restricted_shell; #endif /* RESTRICTED_SHELL */ -extern int *find_flag __P((int)); -extern int change_flag __P((int, int)); -extern char *which_set_flags __P((void)); -extern void reset_shell_flags __P((void)); +extern int *find_flag PARAMS((int)); +extern int change_flag PARAMS((int, int)); +extern char *which_set_flags PARAMS((void)); +extern void reset_shell_flags PARAMS((void)); -extern char *get_current_flags __P((void)); -extern void set_current_flags __P((const char *)); +extern char *get_current_flags PARAMS((void)); +extern void set_current_flags PARAMS((const char *)); -extern void initialize_flags __P((void)); +extern void initialize_flags PARAMS((void)); /* A macro for efficiency. */ #define change_flag_char(flag, on_or_off) change_flag (flag, on_or_off) diff --git a/general.c b/general.c index 54818bc2..9be3c440 100644 --- a/general.c +++ b/general.c @@ -1,6 +1,6 @@ /* general.c -- Stuff that is used by all files. */ -/* Copyright (C) 1987-2019 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -62,9 +62,9 @@ extern int errno; # include #endif -static char *bash_special_tilde_expansions __P((char *)); -static int unquoted_tilde_word __P((const char *)); -static void initialize_group_array __P((void)); +static char *bash_special_tilde_expansions PARAMS((char *)); +static int unquoted_tilde_word PARAMS((const char *)); +static void initialize_group_array PARAMS((void)); /* A standard error message to use when getcwd() returns NULL. */ const char * const bash_getcwd_errstr = N_("getcwd: cannot access parent directories"); @@ -1039,7 +1039,7 @@ extract_colon_unit (string, p_index) /* **************************************************************** */ #if defined (PUSHD_AND_POPD) -extern char *get_dirstack_from_string __P((char *)); +extern char *get_dirstack_from_string PARAMS((char *)); #endif static char **bash_tilde_prefixes; diff --git a/hashcmd.c b/hashcmd.c index c53764f1..da3af005 100644 --- a/hashcmd.c +++ b/hashcmd.c @@ -1,7 +1,7 @@ /* hashcmd.c - functions for managing a hash table mapping command names to full pathnames. */ -/* Copyright (C) 1997-2009 Free Software Foundation, Inc. +/* Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -37,7 +37,7 @@ HASH_TABLE *hashed_filenames = (HASH_TABLE *)NULL; -static void phash_freedata __P((PTR_T)); +static void phash_freedata PARAMS((PTR_T)); void phash_create () diff --git a/include/shtty.h b/include/shtty.h index 66500d93..fdf379b8 100644 --- a/include/shtty.h +++ b/include/shtty.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. */ +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. */ /* This file is part of GNU Bash, the Bourne Again SHell. @@ -67,24 +67,24 @@ /* Get and set terminal attributes for the file descriptor passed as an argument. */ -extern int ttgetattr __P((int, TTYSTRUCT *)); -extern int ttsetattr __P((int, TTYSTRUCT *)); +extern int ttgetattr PARAMS((int, TTYSTRUCT *)); +extern int ttsetattr PARAMS((int, TTYSTRUCT *)); /* Save and restore the terminal's attributes from static storage. */ -extern void ttsave __P((void)); -extern void ttrestore __P((void)); +extern void ttsave PARAMS((void)); +extern void ttrestore PARAMS((void)); /* Return the attributes corresponding to the file descriptor (0 or 1) passed as an argument. */ -extern TTYSTRUCT *ttattr __P((int)); +extern TTYSTRUCT *ttattr PARAMS((int)); /* These functions only operate on the passed TTYSTRUCT; they don't actually change anything with the kernel's current tty settings. */ -extern int tt_setonechar __P((TTYSTRUCT *)); -extern int tt_setnoecho __P((TTYSTRUCT *)); -extern int tt_seteightbit __P((TTYSTRUCT *)); -extern int tt_setnocanon __P((TTYSTRUCT *)); -extern int tt_setcbreak __P((TTYSTRUCT *)); +extern int tt_setonechar PARAMS((TTYSTRUCT *)); +extern int tt_setnoecho PARAMS((TTYSTRUCT *)); +extern int tt_seteightbit PARAMS((TTYSTRUCT *)); +extern int tt_setnocanon PARAMS((TTYSTRUCT *)); +extern int tt_setcbreak PARAMS((TTYSTRUCT *)); /* These functions are all generally mutually exclusive. If you call more than one (bracketed with calls to ttsave and ttrestore, of @@ -94,19 +94,19 @@ extern int tt_setcbreak __P((TTYSTRUCT *)); /* These functions work with a given file descriptor and set terminal attributes */ -extern int ttfd_onechar __P((int, TTYSTRUCT *)); -extern int ttfd_noecho __P((int, TTYSTRUCT *)); -extern int ttfd_eightbit __P((int, TTYSTRUCT *)); -extern int ttfd_nocanon __P((int, TTYSTRUCT *)); +extern int ttfd_onechar PARAMS((int, TTYSTRUCT *)); +extern int ttfd_noecho PARAMS((int, TTYSTRUCT *)); +extern int ttfd_eightbit PARAMS((int, TTYSTRUCT *)); +extern int ttfd_nocanon PARAMS((int, TTYSTRUCT *)); -extern int ttfd_cbreak __P((int, TTYSTRUCT *)); +extern int ttfd_cbreak PARAMS((int, TTYSTRUCT *)); /* These functions work with fd 0 and the TTYSTRUCT saved with ttsave () */ -extern int ttonechar __P((void)); -extern int ttnoecho __P((void)); -extern int tteightbit __P((void)); -extern int ttnocanon __P((void)); +extern int ttonechar PARAMS((void)); +extern int ttnoecho PARAMS((void)); +extern int tteightbit PARAMS((void)); +extern int ttnocanon PARAMS((void)); -extern int ttcbreak __P((void)); +extern int ttcbreak PARAMS((void)); #endif diff --git a/include/stdc.h b/include/stdc.h index c66492f0..7b9282cc 100644 --- a/include/stdc.h +++ b/include/stdc.h @@ -26,18 +26,8 @@ /* A function can be defined using prototypes and compile on both ANSI C and traditional C compilers with something like this: - extern char *func __P((char *, char *, int)); */ + extern char *func PARAMS((char *, char *, int)); */ -#if !defined (__P) -# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) || defined (PROTOTYPES) -# define __P(protos) protos -# else -# define __P(protos) () -# endif -#endif - -/* New definition to use, moving away from __P since it's part of a reserved - namespace */ #if !defined (PARAMS) # if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) || defined (PROTOTYPES) # define PARAMS(protos) protos diff --git a/include/systimes.h b/include/systimes.h index ec2d92f5..aefcab7f 100644 --- a/include/systimes.h +++ b/include/systimes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996, 2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -49,7 +49,7 @@ struct tms Return the elapsed real time from an arbitrary point in the past (the bash emulation uses the epoch), or (clock_t) -1 for errors. All times are in CLK_TCKths of a second. */ -extern clock_t times __P((struct tms *buffer)); +extern clock_t times PARAMS((struct tms *buffer)); #endif /* !HAVE_SYS_TIMES_H */ #endif /* _BASH_SYSTIMES_H */ diff --git a/input.c b/input.c index c5192a24..b39c9abb 100644 --- a/input.c +++ b/input.c @@ -1,6 +1,6 @@ /* input.c -- functions to perform buffered input with synchronization. */ -/* Copyright (C) 1992-2018 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -57,7 +57,7 @@ extern int errno; # define X_EWOULDBLOCK -99 #endif -extern void termsig_handler __P((int)); +extern void termsig_handler PARAMS((int)); /* Functions to handle reading input on systems that don't restart read(2) if a signal is received. */ diff --git a/lib/glob/glob.c b/lib/glob/glob.c index cd077899..c6f35933 100644 --- a/lib/glob/glob.c +++ b/lib/glob/glob.c @@ -1,6 +1,6 @@ /* glob.c -- file-name wildcard pattern matching for Bash. - Copyright (C) 1985-2019 Free Software Foundation, Inc. + Copyright (C) 1985-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -84,11 +84,11 @@ struct globval char *name; }; -extern void throw_to_top_level __P((void)); -extern int sh_eaccess __P((const char *, int)); -extern char *sh_makepath __P((const char *, const char *, int)); -extern int signal_is_pending __P((int)); -extern void run_pending_traps __P((void)); +extern void throw_to_top_level PARAMS((void)); +extern int sh_eaccess PARAMS((const char *, int)); +extern char *sh_makepath PARAMS((const char *, const char *, int)); +extern int signal_is_pending PARAMS((int)); +extern void run_pending_traps PARAMS((void)); extern int extended_glob; @@ -111,29 +111,29 @@ char *glob_error_return; static struct globval finddirs_error_return; /* Some forward declarations. */ -static int skipname __P((char *, char *, int)); +static int skipname PARAMS((char *, char *, int)); #if HANDLE_MULTIBYTE -static int mbskipname __P((char *, char *, int)); +static int mbskipname PARAMS((char *, char *, int)); #endif -void udequote_pathname __P((char *)); +void udequote_pathname PARAMS((char *)); #if HANDLE_MULTIBYTE -void wcdequote_pathname __P((wchar_t *)); -static void wdequote_pathname __P((char *)); +void wcdequote_pathname PARAMS((wchar_t *)); +static void wdequote_pathname PARAMS((char *)); #else # define dequote_pathname udequote_pathname #endif -static void dequote_pathname __P((char *)); -static int glob_testdir __P((char *, int)); -static char **glob_dir_to_array __P((char *, char **, int)); +static void dequote_pathname PARAMS((char *)); +static int glob_testdir PARAMS((char *, int)); +static char **glob_dir_to_array PARAMS((char *, char **, int)); /* Make sure these names continue to agree with what's in smatch.c */ -extern char *glob_patscan __P((char *, char *, int)); -extern wchar_t *glob_patscan_wc __P((wchar_t *, wchar_t *, int)); +extern char *glob_patscan PARAMS((char *, char *, int)); +extern wchar_t *glob_patscan_wc PARAMS((wchar_t *, wchar_t *, int)); /* And this from gmisc.c/gm_loop.c */ -extern int wextglob_pattern_p __P((wchar_t *)); +extern int wextglob_pattern_p PARAMS((wchar_t *)); -extern char *glob_dirscan __P((char *, int)); +extern char *glob_dirscan PARAMS((char *, int)); /* Compile `glob_loop.c' for single-byte characters. */ #define GCHAR unsigned char diff --git a/lib/glob/glob.h b/lib/glob/glob.h index 21b19ad7..ca3a66cf 100644 --- a/lib/glob/glob.h +++ b/lib/glob/glob.h @@ -1,5 +1,5 @@ /* File-name wildcard pattern matching for GNU. - Copyright (C) 1985, 1988, 1989, 2008,2009 Free Software Foundation, Inc. + Copyright (C) 1985-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -33,11 +33,11 @@ #define GX_RECURSE 0x800 /* internal -- glob_filename called recursively */ #define GX_SYMLINK 0x1000 /* internal -- symlink to a directory */ -extern int glob_pattern_p __P((const char *)); -extern char **glob_vector __P((char *, char *, int)); -extern char **glob_filename __P((char *, int)); +extern int glob_pattern_p PARAMS((const char *)); +extern char **glob_vector PARAMS((char *, char *, int)); +extern char **glob_filename PARAMS((char *, int)); -extern int extglob_pattern_p __P((const char *)); +extern int extglob_pattern_p PARAMS((const char *)); extern char *glob_error_return; extern int noglob_dot_filenames; diff --git a/lib/glob/glob_loop.c b/lib/glob/glob_loop.c index 1900996d..467e7ae3 100644 --- a/lib/glob/glob_loop.c +++ b/lib/glob/glob_loop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -16,7 +16,7 @@ along with Bash. If not, see . */ -static int INTERNAL_GLOB_PATTERN_P __P((const GCHAR *)); +static int INTERNAL_GLOB_PATTERN_P PARAMS((const GCHAR *)); /* Return nonzero if PATTERN has any special globbing chars in it. Compiled twice, once each for single-byte and multibyte characters. */ diff --git a/lib/glob/gmisc.c b/lib/glob/gmisc.c index a2bca965..f3d74cea 100644 --- a/lib/glob/gmisc.c +++ b/lib/glob/gmisc.c @@ -1,6 +1,6 @@ /* gmisc.c -- miscellaneous pattern matching utility functions for Bash. - Copyright (C) 2010-2017 Free Software Foundation, Inc. + Copyright (C) 2010-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -38,7 +38,7 @@ #include "glob.h" /* Make sure these names continue to agree with what's in smatch.c */ -extern char *glob_patscan __P((char *, char *, int)); +extern char *glob_patscan PARAMS((char *, char *, int)); /* Compile `gm_loop.c' for single-byte characters. */ #define CHAR char diff --git a/lib/glob/sm_loop.c b/lib/glob/sm_loop.c index bddc9653..2c29ff18 100644 --- a/lib/glob/sm_loop.c +++ b/lib/glob/sm_loop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -22,16 +22,16 @@ struct STRUCT CHAR *string; }; -int FCT __P((CHAR *, CHAR *, int)); +int FCT PARAMS((CHAR *, CHAR *, int)); -static int GMATCH __P((CHAR *, CHAR *, CHAR *, CHAR *, struct STRUCT *, int)); -static CHAR *PARSE_COLLSYM __P((CHAR *, INT *)); -static CHAR *BRACKMATCH __P((CHAR *, U_CHAR, int)); -static int EXTMATCH __P((INT, CHAR *, CHAR *, CHAR *, CHAR *, int)); +static int GMATCH PARAMS((CHAR *, CHAR *, CHAR *, CHAR *, struct STRUCT *, int)); +static CHAR *PARSE_COLLSYM PARAMS((CHAR *, INT *)); +static CHAR *BRACKMATCH PARAMS((CHAR *, U_CHAR, int)); +static int EXTMATCH PARAMS((INT, CHAR *, CHAR *, CHAR *, CHAR *, int)); -extern void DEQUOTE_PATHNAME __P((CHAR *)); +extern void DEQUOTE_PATHNAME PARAMS((CHAR *)); -/*static*/ CHAR *PATSCAN __P((CHAR *, CHAR *, INT)); +/*static*/ CHAR *PATSCAN PARAMS((CHAR *, CHAR *, INT)); int FCT (pattern, string, flags) diff --git a/lib/glob/smatch.c b/lib/glob/smatch.c index a74fe9ea..bc934268 100644 --- a/lib/glob/smatch.c +++ b/lib/glob/smatch.c @@ -1,7 +1,7 @@ /* strmatch.c -- ksh-like extended pattern matching for the shell and filename globbing. */ -/* Copyright (C) 1991-2017 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -287,7 +287,7 @@ is_cclass (c, name) # define STREQ(s1, s2) ((wcscmp (s1, s2) == 0)) # define STREQN(a, b, n) ((a)[0] == (b)[0] && wcsncmp(a, b, n) == 0) -extern char *mbsmbchar __P((const char *)); +extern char *mbsmbchar PARAMS((const char *)); #if FNMATCH_EQUIV_FALLBACK /* We don't include in order to avoid namespace collisions; the diff --git a/lib/glob/strmatch.c b/lib/glob/strmatch.c index cea9bd86..5b7b49fb 100644 --- a/lib/glob/strmatch.c +++ b/lib/glob/strmatch.c @@ -1,7 +1,7 @@ /* strmatch.c -- ksh-like extended pattern matching for the shell and filename globbing. */ -/* Copyright (C) 1991-2002 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -24,9 +24,9 @@ #include "stdc.h" #include "strmatch.h" -extern int xstrmatch __P((char *, char *, int)); +extern int xstrmatch PARAMS((char *, char *, int)); #if defined (HANDLE_MULTIBYTE) -extern int internal_wstrmatch __P((wchar_t *, wchar_t *, int)); +extern int internal_wstrmatch PARAMS((wchar_t *, wchar_t *, int)); #endif int diff --git a/lib/glob/strmatch.h b/lib/glob/strmatch.h index aee00cc8..fa7be7bb 100644 --- a/lib/glob/strmatch.h +++ b/lib/glob/strmatch.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2004 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -55,10 +55,10 @@ /* Match STRING against the filename pattern PATTERN, returning zero if it matches, FNM_NOMATCH if not. */ -extern int strmatch __P((char *, char *, int)); +extern int strmatch PARAMS((char *, char *, int)); #if HANDLE_MULTIBYTE -extern int wcsmatch __P((wchar_t *, wchar_t *, int)); +extern int wcsmatch PARAMS((wchar_t *, wchar_t *, int)); #endif #endif /* _STRMATCH_H */ diff --git a/lib/glob/xmbsrtowcs.c b/lib/glob/xmbsrtowcs.c index d00ed413..17250c30 100644 --- a/lib/glob/xmbsrtowcs.c +++ b/lib/glob/xmbsrtowcs.c @@ -1,6 +1,6 @@ /* xmbsrtowcs.c -- replacement function for mbsrtowcs */ -/* Copyright (C) 2002-2019 Free Software Foundation, Inc. +/* Copyright (C) 2002-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -47,7 +47,7 @@ extern int errno; #endif #if ! HAVE_STRCHRNUL -extern char *strchrnul __P((const char *, int)); +extern char *strchrnul PARAMS((const char *, int)); #endif /* On some locales (ex. ja_JP.sjis), mbsrtowc doesn't convert 0x5c to U<0x5c>. diff --git a/lib/malloc/imalloc.h b/lib/malloc/imalloc.h index 82b09eba..d07adac2 100644 --- a/lib/malloc/imalloc.h +++ b/lib/malloc/imalloc.h @@ -1,6 +1,6 @@ /* imalloc.h -- internal malloc definitions shared by source files. */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -67,11 +67,11 @@ # endif /* HAVE_BCOPY */ #endif /* !__GNUC__ */ -#if !defined (__P) +#if !defined (PARAMS) # if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) || defined (PROTOTYPES) -# define __P(protos) protos +# define PARAMS(protos) protos # else -# define __P(protos) () +# define PARAMS(protos) () # endif #endif @@ -167,7 +167,7 @@ do { \ #include -extern void _malloc_block_signals __P((sigset_t *, sigset_t *)); -extern void _malloc_unblock_signals __P((sigset_t *, sigset_t *)); +extern void _malloc_block_signals PARAMS((sigset_t *, sigset_t *)); +extern void _malloc_unblock_signals PARAMS((sigset_t *, sigset_t *)); #endif /* _IMALLOC_H */ diff --git a/lib/malloc/mstats.h b/lib/malloc/mstats.h index dac02980..ce8aaeca 100644 --- a/lib/malloc/mstats.h +++ b/lib/malloc/mstats.h @@ -1,6 +1,6 @@ /* mstats.h - definitions for malloc statistics */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -104,10 +104,10 @@ struct bucket_stats { int nmmap; /* currently unused */ }; -extern struct bucket_stats malloc_bucket_stats __P((int)); -extern struct _malstats malloc_stats __P((void)); -extern void print_malloc_stats __P((char *)); -extern void trace_malloc_stats __P((char *, char *)); +extern struct bucket_stats malloc_bucket_stats PARAMS((int)); +extern struct _malstats malloc_stats PARAMS((void)); +extern void print_malloc_stats PARAMS((char *)); +extern void trace_malloc_stats PARAMS((char *, char *)); #endif /* MALLOC_STATS */ diff --git a/lib/malloc/shmalloc.h b/lib/malloc/shmalloc.h index 2dac6154..d51193eb 100644 --- a/lib/malloc/shmalloc.h +++ b/lib/malloc/shmalloc.h @@ -1,6 +1,6 @@ /* Functions (currently) for use by the shell to do malloc debugging and tracking. */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -21,11 +21,11 @@ #ifndef _SH_MALLOC_H #define _SH_MALLOC_H -#ifndef __P +#ifndef PARAMS # if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) -# define __P(protos) protos +# define PARAMS(protos) protos # else -# define __P(protos) () +# define PARAMS(protos) () # endif #endif @@ -41,30 +41,30 @@ #endif /* PTR_T */ -extern PTR_T sh_malloc __P((size_t, const char *, int)); -extern PTR_T sh_realloc __P((PTR_T, size_t, const char *, int)); -extern void sh_free __P((PTR_T, const char *, int)); +extern PTR_T sh_malloc PARAMS((size_t, const char *, int)); +extern PTR_T sh_realloc PARAMS((PTR_T, size_t, const char *, int)); +extern void sh_free PARAMS((PTR_T, const char *, int)); -extern PTR_T sh_memalign __P((size_t, size_t, const char *, int)); +extern PTR_T sh_memalign PARAMS((size_t, size_t, const char *, int)); -extern PTR_T sh_calloc __P((size_t, size_t, const char *, int)); -extern void sh_cfree __P((PTR_T, const char *, int)); +extern PTR_T sh_calloc PARAMS((size_t, size_t, const char *, int)); +extern void sh_cfree PARAMS((PTR_T, const char *, int)); -extern PTR_T sh_valloc __P((size_t, const char *, int)); +extern PTR_T sh_valloc PARAMS((size_t, const char *, int)); /* trace.c */ -extern int malloc_set_trace __P((int)); +extern int malloc_set_trace PARAMS((int)); extern void malloc_set_tracefp (); /* full prototype requires stdio.h */ -extern void malloc_set_tracefn __P((char *, char *)); +extern void malloc_set_tracefn PARAMS((char *, char *)); /* table.c */ -extern void mregister_dump_table __P((void)); -extern void mregister_table_init __P((void)); -extern int malloc_set_register __P((int)); +extern void mregister_dump_table PARAMS((void)); +extern void mregister_table_init PARAMS((void)); +extern int malloc_set_register PARAMS((int)); /* stats.c */ -extern void print_malloc_stats __P((char *)); +extern void print_malloc_stats PARAMS((char *)); extern void fprint_malloc_stats (); /* full prototype requires stdio.h */ -extern void trace_malloc_stats __P((char *, char *)); +extern void trace_malloc_stats PARAMS((char *, char *)); #endif diff --git a/lib/malloc/stats.c b/lib/malloc/stats.c index 13696dca..b38df9f4 100644 --- a/lib/malloc/stats.c +++ b/lib/malloc/stats.c @@ -1,6 +1,6 @@ /* stats.c - malloc statistics */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -34,13 +34,13 @@ #include "mstats.h" -extern int malloc_free_blocks __P((int)); +extern int malloc_free_blocks PARAMS((int)); extern int malloc_mmap_threshold; extern struct _malstats _mstats; -extern FILE *_imalloc_fopen __P((char *, char *, char *, char *, size_t)); +extern FILE *_imalloc_fopen PARAMS((char *, char *, char *, char *, size_t)); struct bucket_stats malloc_bucket_stats (size) diff --git a/lib/malloc/table.c b/lib/malloc/table.c index 97946dc7..b587eea6 100644 --- a/lib/malloc/table.c +++ b/lib/malloc/table.c @@ -1,6 +1,6 @@ /* table.c - bookkeeping functions for allocated memory */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -30,14 +30,14 @@ #ifdef SHELL extern int interrupt_immediately, running_trap; -extern int signal_is_trapped __P((int)); +extern int signal_is_trapped PARAMS((int)); #endif extern int malloc_register; #ifdef MALLOC_REGISTER -extern FILE *_imalloc_fopen __P((char *, char *, char *, char *, size_t)); +extern FILE *_imalloc_fopen PARAMS((char *, char *, char *, char *, size_t)); #define FIND_ALLOC 0x01 /* find slot for new allocation */ #define FIND_EXIST 0x02 /* find slot for existing entry for free() or search */ diff --git a/lib/malloc/table.h b/lib/malloc/table.h index 7494f0a5..92866cf2 100644 --- a/lib/malloc/table.h +++ b/lib/malloc/table.h @@ -1,6 +1,6 @@ /* table.h - definitions for tables for keeping track of allocated memory */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -57,12 +57,12 @@ typedef struct mr_table { #define REG_TABLE_SIZE 8192 -extern mr_table_t *mr_table_entry __P((PTR_T)); -extern void mregister_alloc __P((const char *, PTR_T, size_t, const char *, int)); -extern void mregister_free __P((PTR_T, int, const char *, int)); +extern mr_table_t *mr_table_entry PARAMS((PTR_T)); +extern void mregister_alloc PARAMS((const char *, PTR_T, size_t, const char *, int)); +extern void mregister_free PARAMS((PTR_T, int, const char *, int)); extern void mregister_describe_mem (); -extern void mregister_dump_table __P((void)); -extern void mregister_table_init __P((void)); +extern void mregister_dump_table PARAMS((void)); +extern void mregister_table_init PARAMS((void)); typedef struct ma_table { const char *file; @@ -70,10 +70,10 @@ typedef struct ma_table { int nalloc; } ma_table_t; -extern void mlocation_register_alloc __P((const char *, int)); -extern void mlocation_table_init __P((void)); -extern void mlocation_dump_table __P((void)); -extern void mlocation_write_table __P((void)); +extern void mlocation_register_alloc PARAMS((const char *, int)); +extern void mlocation_table_init PARAMS((void)); +extern void mlocation_dump_table PARAMS((void)); +extern void mlocation_write_table PARAMS((void)); /* NOTE: HASH_MIX taken from dmalloc (http://dmalloc.com) */ diff --git a/lib/malloc/trace.c b/lib/malloc/trace.c index 95898b70..391ca9d8 100644 --- a/lib/malloc/trace.c +++ b/lib/malloc/trace.c @@ -1,6 +1,6 @@ /* trace.c - tracing functions for malloc */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -35,7 +35,7 @@ static int _mtrace_verbose = 0; #ifdef MALLOC_TRACE -extern FILE *_imalloc_fopen __P((char *, char *, char *, char *, size_t)); +extern FILE *_imalloc_fopen PARAMS((char *, char *, char *, char *, size_t)); FILE *_mtrace_fp = NULL; extern char _malloc_trace_buckets[]; diff --git a/lib/malloc/watch.h b/lib/malloc/watch.h index 6782acc4..2a0f4970 100644 --- a/lib/malloc/watch.h +++ b/lib/malloc/watch.h @@ -1,6 +1,6 @@ /* watch.h - definitions for tables for keeping track of allocated memory */ -/* Copyright (C) 2001-2003 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. @@ -34,7 +34,7 @@ extern int _malloc_nwatch; -extern void _malloc_ckwatch __P((PTR_T, const char *, int, int, unsigned long)); +extern void _malloc_ckwatch PARAMS((PTR_T, const char *, int, int, unsigned long)); #endif /* MALLOC_WATCH */ diff --git a/lib/sh/casemod.c b/lib/sh/casemod.c index 7cdd4178..bdd96f84 100644 --- a/lib/sh/casemod.c +++ b/lib/sh/casemod.c @@ -1,6 +1,6 @@ /* casemod.c -- functions to change case of strings */ -/* Copyright (C) 2008,2009,2015 Free Software Foundation, Inc. +/* Copyright (C) 2008-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -67,7 +67,7 @@ #define CASE_USEWORDS 0x1000 /* modify behavior to act on words in passed string */ -extern char *substring __P((char *, int, int)); +extern char *substring PARAMS((char *, int, int)); #ifndef UCHAR_MAX # define UCHAR_MAX TYPE_MAXIMUM(unsigned char) diff --git a/lib/sh/eaccess.c b/lib/sh/eaccess.c index 0f8ccfef..c3043ec1 100644 --- a/lib/sh/eaccess.c +++ b/lib/sh/eaccess.c @@ -1,6 +1,6 @@ /* eaccess.c - eaccess replacement for the shell, plus other access functions. */ -/* Copyright (C) 2006-2010 Free Software Foundation, Inc. +/* Copyright (C) 2006-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -52,10 +52,10 @@ extern int errno; #define F_OK 0 #endif /* R_OK */ -static int path_is_devfd __P((const char *)); -static int sh_stataccess __P((const char *, int)); +static int path_is_devfd PARAMS((const char *)); +static int sh_stataccess PARAMS((const char *, int)); #if HAVE_DECL_SETREGID -static int sh_euidaccess __P((const char *, int)); +static int sh_euidaccess PARAMS((const char *, int)); #endif static int diff --git a/lib/sh/fnxform.c b/lib/sh/fnxform.c index d7e1b5ad..35d7e737 100644 --- a/lib/sh/fnxform.c +++ b/lib/sh/fnxform.c @@ -1,6 +1,6 @@ /* fnxform - use iconv(3) to transform strings to and from "filename" format */ -/* Copyright (C) 2009-2010 Free Software Foundation, Inc. +/* Copyright (C) 2009-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -35,9 +35,9 @@ #endif #if defined (HAVE_LOCALE_CHARSET) -extern const char *locale_charset __P((void)); +extern const char *locale_charset PARAMS((void)); #else -extern char *get_locale_var __P((char *)); +extern char *get_locale_var PARAMS((char *)); #endif #if defined (HAVE_ICONV) @@ -49,9 +49,9 @@ static iconv_t conv_tofs = (iconv_t)-1; static char *outbuf = 0; static size_t outlen = 0; -static char *curencoding __P((void)); -static void init_tofs __P((void)); -static void init_fromfs __P((void)); +static char *curencoding PARAMS((void)); +static void init_tofs PARAMS((void)); +static void init_fromfs PARAMS((void)); static char * curencoding () diff --git a/lib/sh/fpurge.c b/lib/sh/fpurge.c index 13e8c78e..8cd4e368 100644 --- a/lib/sh/fpurge.c +++ b/lib/sh/fpurge.c @@ -1,6 +1,6 @@ /* fpurge - Flushing buffers of a FILE stream. */ -/* Copyright (C) 2007-2010 Free Software Foundation, Inc. +/* Copyright (C) 2007-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -29,7 +29,7 @@ #if HAVE_FPURGE # define fpurge _bash_fpurge #endif -extern int fpurge __P((FILE *stream)); +extern int fpurge PARAMS((FILE *stream)); #if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */ # include diff --git a/lib/sh/makepath.c b/lib/sh/makepath.c index ef01718b..ab46c967 100644 --- a/lib/sh/makepath.c +++ b/lib/sh/makepath.c @@ -1,6 +1,6 @@ /* makepath.c - glue PATH and DIR together into a full pathname. */ -/* Copyright (C) 1987, 1989, 1991 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -45,7 +45,7 @@ # define MP_IGNDOT 0x08 #endif -extern char *get_working_directory __P((char *)); +extern char *get_working_directory PARAMS((char *)); static char *nullpath = ""; diff --git a/lib/sh/mktime.c b/lib/sh/mktime.c index b2b0d3f2..9ee675be 100644 --- a/lib/sh/mktime.c +++ b/lib/sh/mktime.c @@ -1,6 +1,6 @@ /* mktime - convert struct tm to a time_t value */ -/* Copyright (C) 1993-2002 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Contributed by Paul Eggert (eggert@twinsun.com). @@ -56,13 +56,13 @@ #define mktime my_mktime #endif /* DEBUG_MKTIME */ -#ifndef __P +#ifndef PARAMS #if defined (__GNUC__) || (defined (__STDC__) && __STDC__) -#define __P(args) args +#define PARAMS(args) args #else -#define __P(args) () +#define PARAMS(args) () #endif /* GCC. */ -#endif /* Not __P. */ +#endif /* Not PARAMS. */ #ifndef CHAR_BIT #define CHAR_BIT 8 @@ -117,13 +117,13 @@ const unsigned short int __mon_yday[2][13] = { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } }; -static time_t ydhms_tm_diff __P ((int, int, int, int, int, const struct tm *)); -time_t __mktime_internal __P ((struct tm *, +static time_t ydhms_tm_diff PARAMS ((int, int, int, int, int, const struct tm *)); +time_t __mktime_internal PARAMS ((struct tm *, struct tm *(*) (const time_t *, struct tm *), time_t *)); -static struct tm *my_localtime_r __P ((const time_t *, struct tm *)); +static struct tm *my_localtime_r PARAMS ((const time_t *, struct tm *)); static struct tm * my_localtime_r (t, tp) const time_t *t; @@ -193,7 +193,7 @@ mktime (tp) time_t __mktime_internal (tp, convert, offset) struct tm *tp; - struct tm *(*convert) __P ((const time_t *, struct tm *)); + struct tm *(*convert) PARAMS ((const time_t *, struct tm *)); time_t *offset; { time_t t, dt, t0; diff --git a/lib/sh/netopen.c b/lib/sh/netopen.c index bc3d8f8a..ee0baf66 100644 --- a/lib/sh/netopen.c +++ b/lib/sh/netopen.c @@ -5,7 +5,7 @@ * chet@ins.CWRU.Edu */ -/* Copyright (C) 1987-2016 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -63,18 +63,18 @@ extern int errno; #endif #if !defined (HAVE_INET_ATON) -extern int inet_aton __P((const char *, struct in_addr *)); +extern int inet_aton PARAMS((const char *, struct in_addr *)); #endif #ifndef HAVE_GETADDRINFO -static int _getaddr __P((char *, struct in_addr *)); -static int _getserv __P((char *, int, unsigned short *)); -static int _netopen4 __P((char *, char *, int)); +static int _getaddr PARAMS((char *, struct in_addr *)); +static int _getserv PARAMS((char *, int, unsigned short *)); +static int _netopen4 PARAMS((char *, char *, int)); #else /* HAVE_GETADDRINFO */ -static int _netopen6 __P((char *, char *, int)); +static int _netopen6 PARAMS((char *, char *, int)); #endif -static int _netopen __P((char *, char *, int)); +static int _netopen PARAMS((char *, char *, int)); #ifndef HAVE_GETADDRINFO /* Stuff the internet address corresponding to HOST into AP, in network diff --git a/lib/sh/pathphys.c b/lib/sh/pathphys.c index 99390cef..95b72f19 100644 --- a/lib/sh/pathphys.c +++ b/lib/sh/pathphys.c @@ -1,6 +1,6 @@ /* pathphys.c -- return pathname with all symlinks expanded. */ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -46,7 +46,7 @@ extern int errno; #endif /* !errno */ -extern char *get_working_directory __P((char *)); +extern char *get_working_directory PARAMS((char *)); static int _path_readlink (path, buf, bufsiz) diff --git a/lib/sh/shquote.c b/lib/sh/shquote.c index 1e36e980..680f84ed 100644 --- a/lib/sh/shquote.c +++ b/lib/sh/shquote.c @@ -1,6 +1,6 @@ /* shquote - functions to quote and dequote strings */ -/* Copyright (C) 1999-2019 Free Software Foundation, Inc. +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -36,8 +36,8 @@ #include "shmbchar.h" #include "shmbutil.h" -extern char *ansic_quote __P((char *, int, int *)); -extern int ansic_shouldquote __P((const char *)); +extern char *ansic_quote PARAMS((char *, int, int *)); +extern int ansic_shouldquote PARAMS((const char *)); /* Default set of characters that should be backslash-quoted in strings */ static const char bstab[256] = diff --git a/lib/sh/snprintf.c b/lib/sh/snprintf.c index 6e5892ee..406a3a50 100644 --- a/lib/sh/snprintf.c +++ b/lib/sh/snprintf.c @@ -9,7 +9,7 @@ Unix snprintf implementation. derived from inetutils/libinetutils/snprintf.c Version 1.1 - Copyright (C) 2001,2006,2010,2012 Free Software Foundation, Inc. + Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -129,8 +129,8 @@ # define FL_ADDBASE 0x02 /* add base# prefix to converted value */ # define FL_HEXUPPER 0x04 /* use uppercase when converting to hex */ # define FL_UNSIGNED 0x08 /* don't add any sign */ -extern char *fmtulong __P((unsigned long int, int, char *, size_t, int)); -extern char *fmtullong __P((unsigned long long int, int, char *, size_t, int)); +extern char *fmtulong PARAMS((unsigned long int, int, char *, size_t, int)); +extern char *fmtullong PARAMS((unsigned long long int, int, char *, size_t, int)); #endif #ifndef FREE @@ -271,38 +271,38 @@ struct DATA /* the floating point stuff */ #ifdef FLOATING_POINT -static double pow_10 __P((int)); -static int log_10 __P((double)); -static double integral __P((double, double *)); -static char *numtoa __P((double, int, int, char **)); +static double pow_10 PARAMS((int)); +static int log_10 PARAMS((double)); +static double integral PARAMS((double, double *)); +static char *numtoa PARAMS((double, int, int, char **)); #endif -static void init_data __P((struct DATA *, char *, size_t, const char *, int)); -static void init_conv_flag __P((struct DATA *)); +static void init_data PARAMS((struct DATA *, char *, size_t, const char *, int)); +static void init_conv_flag PARAMS((struct DATA *)); /* for the format */ #ifdef FLOATING_POINT -static void floating __P((struct DATA *, double)); -static void exponent __P((struct DATA *, double)); +static void floating PARAMS((struct DATA *, double)); +static void exponent PARAMS((struct DATA *, double)); #endif -static void number __P((struct DATA *, unsigned long, int)); +static void number PARAMS((struct DATA *, unsigned long, int)); #ifdef HAVE_LONG_LONG -static void lnumber __P((struct DATA *, unsigned long long, int)); +static void lnumber PARAMS((struct DATA *, unsigned long long, int)); #endif -static void pointer __P((struct DATA *, unsigned long)); -static void strings __P((struct DATA *, char *)); +static void pointer PARAMS((struct DATA *, unsigned long)); +static void strings PARAMS((struct DATA *, char *)); #ifdef FLOATING_POINT # define FALLBACK_FMTSIZE 32 # define FALLBACK_BASE 4096 # define LFALLBACK_BASE 5120 # ifdef HAVE_LONG_DOUBLE -static void ldfallback __P((struct DATA *, const char *, const char *, long double)); +static void ldfallback PARAMS((struct DATA *, const char *, const char *, long double)); # endif -static void dfallback __P((struct DATA *, const char *, const char *, double)); +static void dfallback PARAMS((struct DATA *, const char *, const char *, double)); #endif -static char *groupnum __P((char *)); +static char *groupnum PARAMS((char *)); #if defined (HAVE_LONG_DOUBLE) # define LONGDOUBLE long double @@ -332,9 +332,9 @@ static char *groupnum __P((char *)); #ifdef DRIVER static void memory_error_and_abort (); -static void *xmalloc __P((size_t)); -static void *xrealloc __P((void *, size_t)); -static void xfree __P((void *)); +static void *xmalloc PARAMS((size_t)); +static void *xrealloc PARAMS((void *, size_t)); +static void xfree PARAMS((void *)); #else # include #endif diff --git a/lib/sh/spell.c b/lib/sh/spell.c index da78690c..cdf465b2 100644 --- a/lib/sh/spell.c +++ b/lib/sh/spell.c @@ -1,6 +1,6 @@ /* spell.c -- spelling correction for pathnames. */ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -40,8 +40,8 @@ #include #include -static int mindist __P((char *, char *, char *)); -static int spdist __P((char *, char *)); +static int mindist PARAMS((char *, char *, char *)); +static int spdist PARAMS((char *, char *)); /* * `spname' and its helpers are inspired by the code in "The UNIX diff --git a/lib/sh/strtoimax.c b/lib/sh/strtoimax.c index a4170f06..676e02ef 100644 --- a/lib/sh/strtoimax.c +++ b/lib/sh/strtoimax.c @@ -1,6 +1,6 @@ /* strtoimax - convert string representation of a number into an intmax_t value. */ -/* Copyright 1999-2009 Free Software Foundation, Inc. +/* Copyright 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -45,14 +45,14 @@ "this configure-time declaration test was not run" #endif #if !HAVE_DECL_STRTOL -extern long strtol __P((const char *, char **, int)); +extern long strtol PARAMS((const char *, char **, int)); #endif #ifndef HAVE_DECL_STRTOLL "this configure-time declaration test was not run" #endif #if !HAVE_DECL_STRTOLL && HAVE_LONG_LONG -extern long long strtoll __P((const char *, char **, int)); +extern long long strtoll PARAMS((const char *, char **, int)); #endif #ifdef strtoimax diff --git a/lib/sh/strtoumax.c b/lib/sh/strtoumax.c index 09423add..0247e57b 100644 --- a/lib/sh/strtoumax.c +++ b/lib/sh/strtoumax.c @@ -1,6 +1,6 @@ /* strtoumax - convert string representation of a number into an uintmax_t value. */ -/* Copyright 1999-2009 Free Software Foundation, Inc. +/* Copyright 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -45,14 +45,14 @@ "this configure-time declaration test was not run" #endif #if !HAVE_DECL_STRTOUL -extern unsigned long strtoul __P((const char *, char **, int)); +extern unsigned long strtoul PARAMS((const char *, char **, int)); #endif #ifndef HAVE_DECL_STRTOULL "this configure-time declaration test was not run" #endif #if !HAVE_DECL_STRTOULL && HAVE_UNSIGNED_LONG_LONG -extern unsigned long long strtoull __P((const char *, char **, int)); +extern unsigned long long strtoull PARAMS((const char *, char **, int)); #endif #ifdef strtoumax diff --git a/lib/sh/times.c b/lib/sh/times.c index efaaa0dd..2423078a 100644 --- a/lib/sh/times.c +++ b/lib/sh/times.c @@ -1,6 +1,6 @@ /* times.c - times(3) library function */ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -30,7 +30,7 @@ # include #endif /* HAVE_SYS_RESOURCE_H && HAVE_GETRUSAGE */ -extern long get_clk_tck __P((void)); +extern long get_clk_tck PARAMS((void)); #define CONVTCK(r) (r.tv_sec * clk_tck + r.tv_usec / (1000000 / clk_tck)) diff --git a/lib/sh/tmpfile.c b/lib/sh/tmpfile.c index 5c918147..ef8b067b 100644 --- a/lib/sh/tmpfile.c +++ b/lib/sh/tmpfile.c @@ -2,7 +2,7 @@ * tmpfile.c - functions to create and safely open temp files for the shell. */ -/* Copyright (C) 2000-2019 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -54,8 +54,8 @@ extern int errno; extern pid_t dollar_dollar_pid; -static char *get_sys_tmpdir __P((void)); -static char *get_tmpdir __P((int)); +static char *get_sys_tmpdir PARAMS((void)); +static char *get_tmpdir PARAMS((int)); static char *sys_tmpdir = (char *)NULL; static int ntmpfiles; diff --git a/lib/sh/unicode.c b/lib/sh/unicode.c index 948d09fd..d95d1e25 100644 --- a/lib/sh/unicode.c +++ b/lib/sh/unicode.c @@ -1,6 +1,6 @@ /* unicode.c - functions to convert unicode characters */ -/* Copyright (C) 2010-2019 Free Software Foundation, Inc. +/* Copyright (C) 2010-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -50,9 +50,9 @@ #endif /* !STREQ */ #if defined (HAVE_LOCALE_CHARSET) -extern const char *locale_charset __P((void)); +extern const char *locale_charset PARAMS((void)); #else -extern char *get_locale_var __P((char *)); +extern char *get_locale_var PARAMS((char *)); #endif extern int locale_utf8locale; diff --git a/lib/sh/winsize.c b/lib/sh/winsize.c index ab83433a..861c7c89 100644 --- a/lib/sh/winsize.c +++ b/lib/sh/winsize.c @@ -1,6 +1,6 @@ /* winsize.c - handle window size changes and information. */ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -68,9 +68,9 @@ extern int errno; extern int shell_tty; #if defined (READLINE) -extern void rl_set_screen_size __P((int, int)); +extern void rl_set_screen_size PARAMS((int, int)); #endif -extern void sh_set_lines_and_columns __P((int, int)); +extern void sh_set_lines_and_columns PARAMS((int, int)); void get_new_window_size (from_sig, rp, cp) diff --git a/lib/sh/zcatfd.c b/lib/sh/zcatfd.c index b0efc940..f9a2322e 100644 --- a/lib/sh/zcatfd.c +++ b/lib/sh/zcatfd.c @@ -1,6 +1,6 @@ /* zcatfd - copy contents of file descriptor to another */ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -34,8 +34,8 @@ extern int errno; #endif -extern ssize_t zread __P((int, char *, size_t)); -extern int zwrite __P((int, char *, ssize_t)); +extern ssize_t zread PARAMS((int, char *, size_t)); +extern int zwrite PARAMS((int, char *, ssize_t)); /* Dump contents of file descriptor FD to OFD. FN is the filename for error messages (not used right now). */ diff --git a/lib/sh/zgetline.c b/lib/sh/zgetline.c index a686ba3d..8ded1442 100644 --- a/lib/sh/zgetline.c +++ b/lib/sh/zgetline.c @@ -1,7 +1,7 @@ /* zgetline - read a line of input from a specified file descriptor and return a pointer to a newly-allocated buffer containing the data. */ -/* Copyright (C) 2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 2008-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -34,13 +34,13 @@ extern int errno; #endif -extern ssize_t zread __P((int, char *, size_t)); -extern ssize_t zreadc __P((int, char *)); -extern ssize_t zreadintr __P((int, char *, size_t)); -extern ssize_t zreadcintr __P((int, char *)); +extern ssize_t zread PARAMS((int, char *, size_t)); +extern ssize_t zreadc PARAMS((int, char *)); +extern ssize_t zreadintr PARAMS((int, char *, size_t)); +extern ssize_t zreadcintr PARAMS((int, char *)); -typedef ssize_t breadfunc_t __P((int, char *, size_t)); -typedef ssize_t creadfunc_t __P((int, char *)); +typedef ssize_t breadfunc_t PARAMS((int, char *, size_t)); +typedef ssize_t creadfunc_t PARAMS((int, char *)); /* Initial memory allocation for automatic growing buffer in zreadlinec */ #define GET_LINE_INITIAL_ALLOCATION 16 diff --git a/lib/sh/zmapfd.c b/lib/sh/zmapfd.c index c5544e67..f3fb8473 100644 --- a/lib/sh/zmapfd.c +++ b/lib/sh/zmapfd.c @@ -1,6 +1,6 @@ /* zmapfd - read contents of file descriptor into a newly-allocated buffer */ -/* Copyright (C) 2006 Free Software Foundation, Inc. +/* Copyright (C) 2006-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -36,7 +36,7 @@ extern int errno; #endif -extern ssize_t zread __P((int, char *, size_t)); +extern ssize_t zread PARAMS((int, char *, size_t)); /* Dump contents of file descriptor FD to *OSTR. FN is the filename for error messages (not used right now). */ diff --git a/lib/tilde/tilde.c b/lib/tilde/tilde.c index 9d0f2961..d678a31a 100644 --- a/lib/tilde/tilde.c +++ b/lib/tilde/tilde.c @@ -1,6 +1,6 @@ /* tilde.c -- Tilde expansion code (~/foo := $HOME/foo). */ -/* Copyright (C) 1988-2017 Free Software Foundation, Inc. +/* Copyright (C) 1988-2020 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. @@ -57,10 +57,10 @@ static void *xmalloc (), *xrealloc (); #if !defined (HAVE_GETPW_DECLS) # if defined (HAVE_GETPWUID) -extern struct passwd *getpwuid PARAMS((uid_t)); +extern struct passwd *getpwuid (uid_t); # endif # if defined (HAVE_GETPWNAM) -extern struct passwd *getpwnam PARAMS((const char *)); +extern struct passwd *getpwnam (const char *); # endif #endif /* !HAVE_GETPW_DECLS */ @@ -79,8 +79,8 @@ extern struct passwd *getpwnam PARAMS((const char *)); /* If being compiled as part of bash, these will be satisfied from variables.o. If being compiled as part of readline, they will be satisfied from shell.o. */ -extern char *sh_get_home_dir PARAMS((void)); -extern char *sh_get_env_value PARAMS((const char *)); +extern char *sh_get_home_dir (void); +extern char *sh_get_env_value (const char *); /* The default value of tilde_additional_prefixes. This is set to whitespace preceding a tilde so that simple programs which do not @@ -116,10 +116,10 @@ char **tilde_additional_prefixes = (char **)default_prefixes; `:' and `=~'. */ char **tilde_additional_suffixes = (char **)default_suffixes; -static int tilde_find_prefix PARAMS((const char *, int *)); -static int tilde_find_suffix PARAMS((const char *)); -static char *isolate_tilde_prefix PARAMS((const char *, int *)); -static char *glue_prefix_and_suffix PARAMS((char *, const char *, int)); +static int tilde_find_prefix (const char *, int *); +static int tilde_find_suffix (const char *); +static char *isolate_tilde_prefix (const char *, int *); +static char *glue_prefix_and_suffix (char *, const char *, int); /* Find the start of a tilde expansion in STRING, and return the index of the tilde which starts the expansion. Place the length of the text diff --git a/mailcheck.c b/mailcheck.c index c04d0fe2..4a11143c 100644 --- a/mailcheck.c +++ b/mailcheck.c @@ -1,6 +1,6 @@ /* mailcheck.c -- The check is in the mail... */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -43,7 +43,7 @@ extern time_t shell_start_time; -extern int mailstat __P((const char *, struct stat *)); +extern int mailstat PARAMS((const char *, struct stat *)); typedef struct _fileinfo { char *name; @@ -66,19 +66,19 @@ static time_t last_time_mail_checked = 0; /* Non-zero means warn if a mail file has been read since last checked. */ int mail_warning; -static int find_mail_file __P((char *)); -static void init_mail_file __P((int)); -static void update_mail_file __P((int)); -static int add_mail_file __P((char *, char *)); +static int find_mail_file PARAMS((char *)); +static void init_mail_file PARAMS((int)); +static void update_mail_file PARAMS((int)); +static int add_mail_file PARAMS((char *, char *)); -static FILEINFO *alloc_mail_file __P((char *, char *)); -static void dispose_mail_file __P((FILEINFO *)); +static FILEINFO *alloc_mail_file PARAMS((char *, char *)); +static void dispose_mail_file PARAMS((FILEINFO *)); -static int file_mod_date_changed __P((int)); -static int file_access_date_changed __P((int)); -static int file_has_grown __P((int)); +static int file_mod_date_changed PARAMS((int)); +static int file_access_date_changed PARAMS((int)); +static int file_has_grown PARAMS((int)); -static char *parse_mailpath_spec __P((char *)); +static char *parse_mailpath_spec PARAMS((char *)); /* Returns non-zero if it is time to check mail. */ int diff --git a/mailcheck.h b/mailcheck.h index 3ca8440a..e930124c 100644 --- a/mailcheck.h +++ b/mailcheck.h @@ -1,6 +1,6 @@ /* mailcheck.h -- variables and function declarations for mail checking. */ -/* Copyright (C) 1987,1991,2001,2003,2005,2006,2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -22,13 +22,13 @@ #define _MAILCHECK_H_ /* Functions from mailcheck.c */ -extern int time_to_check_mail __P((void)); -extern void reset_mail_timer __P((void)); -extern void reset_mail_files __P((void)); -extern void free_mail_files __P((void)); -extern char *make_default_mailpath __P((void)); -extern void remember_mail_dates __P((void)); -extern void init_mail_dates __P((void)); -extern void check_mail __P((void)); +extern int time_to_check_mail PARAMS((void)); +extern void reset_mail_timer PARAMS((void)); +extern void reset_mail_files PARAMS((void)); +extern void free_mail_files PARAMS((void)); +extern char *make_default_mailpath PARAMS((void)); +extern void remember_mail_dates PARAMS((void)); +extern void init_mail_dates PARAMS((void)); +extern void check_mail PARAMS((void)); #endif /* _MAILCHECK_H */ diff --git a/make_cmd.c b/make_cmd.c index 42bd19dc..2d7ac960 100644 --- a/make_cmd.c +++ b/make_cmd.c @@ -1,7 +1,7 @@ /* make_cmd.c -- Functions for making instances of the various parser constructs. */ -/* Copyright (C) 1989-2019 Free Software Foundation, Inc. +/* Copyright (C) 1989-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -55,11 +55,11 @@ sh_obj_cache_t wlcache = {0, 0, 0}; #define WDCACHESIZE 128 #define WLCACHESIZE 128 -static COMMAND *make_for_or_select __P((enum command_type, WORD_DESC *, WORD_LIST *, COMMAND *, int)); +static COMMAND *make_for_or_select PARAMS((enum command_type, WORD_DESC *, WORD_LIST *, COMMAND *, int)); #if defined (ARITH_FOR_COMMAND) -static WORD_LIST *make_arith_for_expr __P((char *)); +static WORD_LIST *make_arith_for_expr PARAMS((char *)); #endif -static COMMAND *make_until_or_while __P((enum command_type, COMMAND *, COMMAND *)); +static COMMAND *make_until_or_while PARAMS((enum command_type, COMMAND *, COMMAND *)); void cmd_init () diff --git a/make_cmd.h b/make_cmd.h index fcd7766d..bf1fb008 100644 --- a/make_cmd.h +++ b/make_cmd.h @@ -1,6 +1,6 @@ /* make_cmd.h -- Declarations of functions found in make_cmd.c */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2009,2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -25,48 +25,48 @@ extern int here_doc_first_line; -extern void cmd_init __P((void)); +extern void cmd_init PARAMS((void)); -extern WORD_DESC *alloc_word_desc __P((void)); -extern WORD_DESC *make_bare_word __P((const char *)); -extern WORD_DESC *make_word_flags __P((WORD_DESC *, const char *)); -extern WORD_DESC *make_word __P((const char *)); -extern WORD_DESC *make_word_from_token __P((int)); +extern WORD_DESC *alloc_word_desc PARAMS((void)); +extern WORD_DESC *make_bare_word PARAMS((const char *)); +extern WORD_DESC *make_word_flags PARAMS((WORD_DESC *, const char *)); +extern WORD_DESC *make_word PARAMS((const char *)); +extern WORD_DESC *make_word_from_token PARAMS((int)); -extern WORD_LIST *make_word_list __P((WORD_DESC *, WORD_LIST *)); +extern WORD_LIST *make_word_list PARAMS((WORD_DESC *, WORD_LIST *)); #define add_string_to_list(s, l) make_word_list (make_word(s), (l)) -extern COMMAND *make_command __P((enum command_type, SIMPLE_COM *)); -extern COMMAND *command_connect __P((COMMAND *, COMMAND *, int)); -extern COMMAND *make_for_command __P((WORD_DESC *, WORD_LIST *, COMMAND *, int)); -extern COMMAND *make_group_command __P((COMMAND *)); -extern COMMAND *make_case_command __P((WORD_DESC *, PATTERN_LIST *, int)); -extern PATTERN_LIST *make_pattern_list __P((WORD_LIST *, COMMAND *)); -extern COMMAND *make_if_command __P((COMMAND *, COMMAND *, COMMAND *)); -extern COMMAND *make_while_command __P((COMMAND *, COMMAND *)); -extern COMMAND *make_until_command __P((COMMAND *, COMMAND *)); -extern COMMAND *make_bare_simple_command __P((void)); -extern COMMAND *make_simple_command __P((ELEMENT, COMMAND *)); -extern void make_here_document __P((REDIRECT *, int)); -extern REDIRECT *make_redirection __P((REDIRECTEE, enum r_instruction, REDIRECTEE, int)); -extern COMMAND *make_function_def __P((WORD_DESC *, COMMAND *, int, int)); -extern COMMAND *clean_simple_command __P((COMMAND *)); +extern COMMAND *make_command PARAMS((enum command_type, SIMPLE_COM *)); +extern COMMAND *command_connect PARAMS((COMMAND *, COMMAND *, int)); +extern COMMAND *make_for_command PARAMS((WORD_DESC *, WORD_LIST *, COMMAND *, int)); +extern COMMAND *make_group_command PARAMS((COMMAND *)); +extern COMMAND *make_case_command PARAMS((WORD_DESC *, PATTERN_LIST *, int)); +extern PATTERN_LIST *make_pattern_list PARAMS((WORD_LIST *, COMMAND *)); +extern COMMAND *make_if_command PARAMS((COMMAND *, COMMAND *, COMMAND *)); +extern COMMAND *make_while_command PARAMS((COMMAND *, COMMAND *)); +extern COMMAND *make_until_command PARAMS((COMMAND *, COMMAND *)); +extern COMMAND *make_bare_simple_command PARAMS((void)); +extern COMMAND *make_simple_command PARAMS((ELEMENT, COMMAND *)); +extern void make_here_document PARAMS((REDIRECT *, int)); +extern REDIRECT *make_redirection PARAMS((REDIRECTEE, enum r_instruction, REDIRECTEE, int)); +extern COMMAND *make_function_def PARAMS((WORD_DESC *, COMMAND *, int, int)); +extern COMMAND *clean_simple_command PARAMS((COMMAND *)); -extern COMMAND *make_arith_command __P((WORD_LIST *)); +extern COMMAND *make_arith_command PARAMS((WORD_LIST *)); -extern COMMAND *make_select_command __P((WORD_DESC *, WORD_LIST *, COMMAND *, int)); +extern COMMAND *make_select_command PARAMS((WORD_DESC *, WORD_LIST *, COMMAND *, int)); #if defined (COND_COMMAND) -extern COND_COM *make_cond_node __P((int, WORD_DESC *, COND_COM *, COND_COM *)); -extern COMMAND *make_cond_command __P((COND_COM *)); +extern COND_COM *make_cond_node PARAMS((int, WORD_DESC *, COND_COM *, COND_COM *)); +extern COMMAND *make_cond_command PARAMS((COND_COM *)); #endif -extern COMMAND *make_arith_for_command __P((WORD_LIST *, COMMAND *, int)); +extern COMMAND *make_arith_for_command PARAMS((WORD_LIST *, COMMAND *, int)); -extern COMMAND *make_subshell_command __P((COMMAND *)); -extern COMMAND *make_coproc_command __P((char *, COMMAND *)); +extern COMMAND *make_subshell_command PARAMS((COMMAND *)); +extern COMMAND *make_coproc_command PARAMS((char *, COMMAND *)); -extern COMMAND *connect_async_list __P((COMMAND *, COMMAND *, int)); +extern COMMAND *connect_async_list PARAMS((COMMAND *, COMMAND *, int)); #endif /* !_MAKE_CMD_H */ diff --git a/nojobs.c b/nojobs.c index 89c09b3d..1a393491 100644 --- a/nojobs.c +++ b/nojobs.c @@ -3,7 +3,7 @@ /* This file works under BSD, System V, minix, and Posix systems. It does not implement job control. */ -/* Copyright (C) 1987-2019 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -74,7 +74,7 @@ extern int errno; #endif /* !errno */ -extern void set_original_signal __P((int, SigHandler *)); +extern void set_original_signal PARAMS((int, SigHandler *)); volatile pid_t last_made_pid = NO_PID; volatile pid_t last_asynchronous_pid = NO_PID; @@ -121,32 +121,32 @@ static int wait_sigint_received; static long child_max = -1L; -static void alloc_pid_list __P((void)); -static int find_proc_slot __P((pid_t)); -static int find_index_by_pid __P((pid_t)); -static int find_status_by_pid __P((pid_t)); -static int process_exit_status __P((WAIT)); -static int find_termsig_by_pid __P((pid_t)); -static int get_termsig __P((WAIT)); -static void set_pid_status __P((pid_t, WAIT)); -static void set_pid_flags __P((pid_t, int)); -static void unset_pid_flags __P((pid_t, int)); -static int get_pid_flags __P((pid_t)); -static void add_pid __P((pid_t, int)); -static void mark_dead_jobs_as_notified __P((int)); +static void alloc_pid_list PARAMS((void)); +static int find_proc_slot PARAMS((pid_t)); +static int find_index_by_pid PARAMS((pid_t)); +static int find_status_by_pid PARAMS((pid_t)); +static int process_exit_status PARAMS((WAIT)); +static int find_termsig_by_pid PARAMS((pid_t)); +static int get_termsig PARAMS((WAIT)); +static void set_pid_status PARAMS((pid_t, WAIT)); +static void set_pid_flags PARAMS((pid_t, int)); +static void unset_pid_flags PARAMS((pid_t, int)); +static int get_pid_flags PARAMS((pid_t)); +static void add_pid PARAMS((pid_t, int)); +static void mark_dead_jobs_as_notified PARAMS((int)); -static sighandler wait_sigint_handler __P((int)); -static char *j_strsignal __P((int)); +static sighandler wait_sigint_handler PARAMS((int)); +static char *j_strsignal PARAMS((int)); #if defined (HAVE_WAITPID) -static void reap_zombie_children __P((void)); +static void reap_zombie_children PARAMS((void)); #endif #if !defined (HAVE_SIGINTERRUPT) && defined (HAVE_POSIX_SIGNALS) -static int siginterrupt __P((int, int)); +static int siginterrupt PARAMS((int, int)); #endif -static void restore_sigint_handler __P((void)); +static void restore_sigint_handler PARAMS((void)); /* Allocate new, or grow existing PID_LIST. */ static void diff --git a/pathexp.c b/pathexp.c index 95590029..1e4060ff 100644 --- a/pathexp.c +++ b/pathexp.c @@ -1,6 +1,6 @@ /* pathexp.c -- The shell interface to the globbing library. */ -/* Copyright (C) 1995-2019 Free Software Foundation, Inc. +/* Copyright (C) 1995-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -38,13 +38,13 @@ #include -static int glob_name_is_acceptable __P((const char *)); -static void ignore_globbed_names __P((char **, sh_ignore_func_t *)); -static char *split_ignorespec __P((char *, int *)); +static int glob_name_is_acceptable PARAMS((const char *)); +static void ignore_globbed_names PARAMS((char **, sh_ignore_func_t *)); +static char *split_ignorespec PARAMS((char *, int *)); #if defined (USE_POSIX_GLOB_LIBRARY) # include -typedef int posix_glob_errfunc_t __P((const char *, int)); +typedef int posix_glob_errfunc_t PARAMS((const char *, int)); #else # include #endif diff --git a/pathexp.h b/pathexp.h index 119fd65a..7ed0d2ad 100644 --- a/pathexp.h +++ b/pathexp.h @@ -1,6 +1,6 @@ /* pathexp.h -- The shell interface to the globbing library. */ -/* Copyright (C) 1987-2015 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -52,7 +52,7 @@ extern int extended_glob; extern int glob_star; extern int match_ignore_case; /* doesn't really belong here */ -extern int unquoted_glob_pattern_p __P((char *)); +extern int unquoted_glob_pattern_p PARAMS((char *)); /* PATHNAME can contain characters prefixed by CTLESC; this indicates that the character is to be quoted. We quote it here in the style @@ -64,15 +64,15 @@ extern int unquoted_glob_pattern_p __P((char *)); pattern while executing a case statement), flags should include QGLOB_CVTNULL. If flags includes QGLOB_FILENAME, appropriate quoting to match a filename should be performed. */ -extern char *quote_string_for_globbing __P((const char *, int)); +extern char *quote_string_for_globbing PARAMS((const char *, int)); -extern int glob_char_p __P((const char *)); -extern char *quote_globbing_chars __P((const char *)); +extern int glob_char_p PARAMS((const char *)); +extern char *quote_globbing_chars PARAMS((const char *)); /* Call the glob library to do globbing on PATHNAME. FLAGS is additional flags to pass to QUOTE_STRING_FOR_GLOBBING, mostly having to do with whether or not we've already performed quote removal. */ -extern char **shell_glob_filename __P((const char *, int)); +extern char **shell_glob_filename PARAMS((const char *, int)); /* Filename completion ignore. Used to implement the "fignore" facility of tcsh, GLOBIGNORE (like ksh-93 FIGNORE), and EXECIGNORE. @@ -88,7 +88,7 @@ struct ign { int len, flags; }; -typedef int sh_iv_item_func_t __P((struct ign *)); +typedef int sh_iv_item_func_t PARAMS((struct ign *)); struct ignorevar { char *varname; /* FIGNORE, GLOBIGNORE, or EXECIGNORE */ @@ -98,10 +98,10 @@ struct ignorevar { sh_iv_item_func_t *item_func; /* Called when each item is parsed from $`varname' */ }; -extern void setup_ignore_patterns __P((struct ignorevar *)); +extern void setup_ignore_patterns PARAMS((struct ignorevar *)); -extern void setup_glob_ignore __P((char *)); -extern int should_ignore_glob_matches __P((void)); -extern void ignore_glob_matches __P((char **)); +extern void setup_glob_ignore PARAMS((char *)); +extern int should_ignore_glob_matches PARAMS((void)); +extern void ignore_glob_matches PARAMS((char **)); #endif diff --git a/pcomplete.c b/pcomplete.c index ab7c4bac..d5b12e49 100644 --- a/pcomplete.c +++ b/pcomplete.c @@ -1,6 +1,6 @@ /* pcomplete.c - functions to generate lists of matches for programmable completion. */ -/* Copyright (C) 1999-2018 Free Software Foundation, Inc. +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -79,7 +79,7 @@ typedef SHELL_VAR **SVFUNC (); #ifndef HAVE_STRPBRK -extern char *strpbrk __P((char *, char *)); +extern char *strpbrk PARAMS((char *, char *)); #endif extern STRING_INT_ALIST word_token_alist[]; @@ -91,59 +91,59 @@ static void debug_printf (const char *, ...) __attribute__((__format__ (printf, #endif #endif /* DEBUG */ -static int it_init_joblist __P((ITEMLIST *, int)); +static int it_init_joblist PARAMS((ITEMLIST *, int)); -static int it_init_aliases __P((ITEMLIST *)); -static int it_init_arrayvars __P((ITEMLIST *)); -static int it_init_bindings __P((ITEMLIST *)); -static int it_init_builtins __P((ITEMLIST *)); -static int it_init_disabled __P((ITEMLIST *)); -static int it_init_enabled __P((ITEMLIST *)); -static int it_init_exported __P((ITEMLIST *)); -static int it_init_functions __P((ITEMLIST *)); -static int it_init_helptopics __P((ITEMLIST *)); -static int it_init_hostnames __P((ITEMLIST *)); -static int it_init_jobs __P((ITEMLIST *)); -static int it_init_running __P((ITEMLIST *)); -static int it_init_stopped __P((ITEMLIST *)); -static int it_init_keywords __P((ITEMLIST *)); -static int it_init_signals __P((ITEMLIST *)); -static int it_init_variables __P((ITEMLIST *)); -static int it_init_setopts __P((ITEMLIST *)); -static int it_init_shopts __P((ITEMLIST *)); +static int it_init_aliases PARAMS((ITEMLIST *)); +static int it_init_arrayvars PARAMS((ITEMLIST *)); +static int it_init_bindings PARAMS((ITEMLIST *)); +static int it_init_builtins PARAMS((ITEMLIST *)); +static int it_init_disabled PARAMS((ITEMLIST *)); +static int it_init_enabled PARAMS((ITEMLIST *)); +static int it_init_exported PARAMS((ITEMLIST *)); +static int it_init_functions PARAMS((ITEMLIST *)); +static int it_init_helptopics PARAMS((ITEMLIST *)); +static int it_init_hostnames PARAMS((ITEMLIST *)); +static int it_init_jobs PARAMS((ITEMLIST *)); +static int it_init_running PARAMS((ITEMLIST *)); +static int it_init_stopped PARAMS((ITEMLIST *)); +static int it_init_keywords PARAMS((ITEMLIST *)); +static int it_init_signals PARAMS((ITEMLIST *)); +static int it_init_variables PARAMS((ITEMLIST *)); +static int it_init_setopts PARAMS((ITEMLIST *)); +static int it_init_shopts PARAMS((ITEMLIST *)); -static int shouldexp_filterpat __P((char *)); -static char *preproc_filterpat __P((char *, const char *)); +static int shouldexp_filterpat PARAMS((char *)); +static char *preproc_filterpat PARAMS((char *, const char *)); -static void init_itemlist_from_varlist __P((ITEMLIST *, SVFUNC *)); +static void init_itemlist_from_varlist PARAMS((ITEMLIST *, SVFUNC *)); -static STRINGLIST *gen_matches_from_itemlist __P((ITEMLIST *, const char *)); -static STRINGLIST *gen_action_completions __P((COMPSPEC *, const char *)); -static STRINGLIST *gen_globpat_matches __P((COMPSPEC *, const char *)); -static STRINGLIST *gen_wordlist_matches __P((COMPSPEC *, const char *)); -static STRINGLIST *gen_shell_function_matches __P((COMPSPEC *, const char *, +static STRINGLIST *gen_matches_from_itemlist PARAMS((ITEMLIST *, const char *)); +static STRINGLIST *gen_action_completions PARAMS((COMPSPEC *, const char *)); +static STRINGLIST *gen_globpat_matches PARAMS((COMPSPEC *, const char *)); +static STRINGLIST *gen_wordlist_matches PARAMS((COMPSPEC *, const char *)); +static STRINGLIST *gen_shell_function_matches PARAMS((COMPSPEC *, const char *, const char *, char *, int, WORD_LIST *, int, int, int *)); -static STRINGLIST *gen_command_matches __P((COMPSPEC *, const char *, +static STRINGLIST *gen_command_matches PARAMS((COMPSPEC *, const char *, const char *, char *, int, WORD_LIST *, int, int)); -static STRINGLIST *gen_progcomp_completions __P((const char *, const char *, +static STRINGLIST *gen_progcomp_completions PARAMS((const char *, const char *, const char *, int, int, int *, int *, COMPSPEC **)); -static char *pcomp_filename_completion_function __P((const char *, int)); +static char *pcomp_filename_completion_function PARAMS((const char *, int)); #if defined (ARRAY_VARS) -static SHELL_VAR *bind_comp_words __P((WORD_LIST *)); +static SHELL_VAR *bind_comp_words PARAMS((WORD_LIST *)); #endif -static void bind_compfunc_variables __P((char *, int, WORD_LIST *, int, int)); -static void unbind_compfunc_variables __P((int)); -static WORD_LIST *build_arg_list __P((char *, const char *, const char *, WORD_LIST *, int)); -static WORD_LIST *command_line_to_word_list __P((char *, int, int, int *, int *)); +static void bind_compfunc_variables PARAMS((char *, int, WORD_LIST *, int, int)); +static void unbind_compfunc_variables PARAMS((int)); +static WORD_LIST *build_arg_list PARAMS((char *, const char *, const char *, WORD_LIST *, int)); +static WORD_LIST *command_line_to_word_list PARAMS((char *, int, int, int *, int *)); #ifdef DEBUG static int progcomp_debug = 0; diff --git a/pcomplete.h b/pcomplete.h index 38932ac2..2a68e6a3 100644 --- a/pcomplete.h +++ b/pcomplete.h @@ -1,7 +1,7 @@ /* pcomplete.h - structure definitions and other stuff for programmable completion. */ -/* Copyright (C) 1999-2009 Free Software Foundation, Inc. +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -87,7 +87,7 @@ typedef struct compspec { completions. */ typedef struct _list_of_items { int flags; - int (*list_getter) __P((struct _list_of_items *)); /* function to call to get the list */ + int (*list_getter) PARAMS((struct _list_of_items *)); /* function to call to get the list */ STRINGLIST *slist; @@ -147,31 +147,31 @@ extern COMPSPEC *pcomp_curcs; extern const char *pcomp_curcmd; /* Functions from pcomplib.c */ -extern COMPSPEC *compspec_create __P((void)); -extern void compspec_dispose __P((COMPSPEC *)); -extern COMPSPEC *compspec_copy __P((COMPSPEC *)); +extern COMPSPEC *compspec_create PARAMS((void)); +extern void compspec_dispose PARAMS((COMPSPEC *)); +extern COMPSPEC *compspec_copy PARAMS((COMPSPEC *)); -extern void progcomp_create __P((void)); -extern void progcomp_flush __P((void)); -extern void progcomp_dispose __P((void)); +extern void progcomp_create PARAMS((void)); +extern void progcomp_flush PARAMS((void)); +extern void progcomp_dispose PARAMS((void)); -extern int progcomp_size __P((void)); +extern int progcomp_size PARAMS((void)); -extern int progcomp_insert __P((char *, COMPSPEC *)); -extern int progcomp_remove __P((char *)); +extern int progcomp_insert PARAMS((char *, COMPSPEC *)); +extern int progcomp_remove PARAMS((char *)); -extern COMPSPEC *progcomp_search __P((const char *)); +extern COMPSPEC *progcomp_search PARAMS((const char *)); -extern void progcomp_walk __P((hash_wfunc *)); +extern void progcomp_walk PARAMS((hash_wfunc *)); /* Functions from pcomplete.c */ -extern void set_itemlist_dirty __P((ITEMLIST *)); +extern void set_itemlist_dirty PARAMS((ITEMLIST *)); -extern STRINGLIST *completions_to_stringlist __P((char **)); +extern STRINGLIST *completions_to_stringlist PARAMS((char **)); -extern STRINGLIST *gen_compspec_completions __P((COMPSPEC *, const char *, const char *, int, int, int *)); -extern char **programmable_completions __P((const char *, const char *, int, int, int *)); +extern STRINGLIST *gen_compspec_completions PARAMS((COMPSPEC *, const char *, const char *, int, int, int *)); +extern char **programmable_completions PARAMS((const char *, const char *, int, int, int *)); -extern void pcomp_set_readline_variables __P((int, int)); -extern void pcomp_set_compspec_options __P((COMPSPEC *, int, int)); +extern void pcomp_set_readline_variables PARAMS((int, int)); +extern void pcomp_set_compspec_options PARAMS((COMPSPEC *, int, int)); #endif /* _PCOMPLETE_H_ */ diff --git a/pcomplib.c b/pcomplib.c index 70c7a17a..075fce73 100644 --- a/pcomplib.c +++ b/pcomplib.c @@ -1,6 +1,6 @@ /* pcomplib.c - library functions for programmable completion. */ -/* Copyright (C) 1999-2009 Free Software Foundation, Inc. +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -43,7 +43,7 @@ HASH_TABLE *prog_completes = (HASH_TABLE *)NULL; -static void free_progcomp __P((PTR_T)); +static void free_progcomp PARAMS((PTR_T)); COMPSPEC * compspec_create () diff --git a/print_cmd.c b/print_cmd.c index c392f320..3c8c2d8f 100644 --- a/print_cmd.c +++ b/print_cmd.c @@ -1,6 +1,6 @@ /* print_command -- A way to make readable commands from a command tree. */ -/* Copyright (C) 1989-2017 Free Software Foundation, Inc. +/* Copyright (C) 1989-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -50,58 +50,58 @@ #include "builtins/common.h" #if !HAVE_DECL_PRINTF -extern int printf __P((const char *, ...)); /* Yuck. Double yuck. */ +extern int printf PARAMS((const char *, ...)); /* Yuck. Double yuck. */ #endif static int indentation; static int indentation_amount = 4; #if defined (PREFER_STDARG) -typedef void PFUNC __P((const char *, ...)); +typedef void PFUNC PARAMS((const char *, ...)); -static void cprintf __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); -static void xprintf __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +static void cprintf PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); +static void xprintf PARAMS((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); #else #define PFUNC VFunction static void cprintf (); static void xprintf (); #endif -static void reset_locals __P((void)); -static void newline __P((char *)); -static void indent __P((int)); -static void semicolon __P((void)); -static void the_printed_command_resize __P((int)); +static void reset_locals PARAMS((void)); +static void newline PARAMS((char *)); +static void indent PARAMS((int)); +static void semicolon PARAMS((void)); +static void the_printed_command_resize PARAMS((int)); -static void make_command_string_internal __P((COMMAND *)); -static void _print_word_list __P((WORD_LIST *, char *, PFUNC *)); -static void command_print_word_list __P((WORD_LIST *, char *)); -static void print_case_clauses __P((PATTERN_LIST *)); -static void print_redirection_list __P((REDIRECT *)); -static void print_redirection __P((REDIRECT *)); -static void print_heredoc_header __P((REDIRECT *)); -static void print_heredoc_body __P((REDIRECT *)); -static void print_heredocs __P((REDIRECT *)); -static void print_heredoc_bodies __P((REDIRECT *)); -static void print_deferred_heredocs __P((const char *)); +static void make_command_string_internal PARAMS((COMMAND *)); +static void _print_word_list PARAMS((WORD_LIST *, char *, PFUNC *)); +static void command_print_word_list PARAMS((WORD_LIST *, char *)); +static void print_case_clauses PARAMS((PATTERN_LIST *)); +static void print_redirection_list PARAMS((REDIRECT *)); +static void print_redirection PARAMS((REDIRECT *)); +static void print_heredoc_header PARAMS((REDIRECT *)); +static void print_heredoc_body PARAMS((REDIRECT *)); +static void print_heredocs PARAMS((REDIRECT *)); +static void print_heredoc_bodies PARAMS((REDIRECT *)); +static void print_deferred_heredocs PARAMS((const char *)); -static void print_for_command __P((FOR_COM *)); +static void print_for_command PARAMS((FOR_COM *)); #if defined (ARITH_FOR_COMMAND) -static void print_arith_for_command __P((ARITH_FOR_COM *)); +static void print_arith_for_command PARAMS((ARITH_FOR_COM *)); #endif #if defined (SELECT_COMMAND) -static void print_select_command __P((SELECT_COM *)); +static void print_select_command PARAMS((SELECT_COM *)); #endif -static void print_group_command __P((GROUP_COM *)); -static void print_case_command __P((CASE_COM *)); -static void print_while_command __P((WHILE_COM *)); -static void print_until_command __P((WHILE_COM *)); -static void print_until_or_while __P((WHILE_COM *, char *)); -static void print_if_command __P((IF_COM *)); +static void print_group_command PARAMS((GROUP_COM *)); +static void print_case_command PARAMS((CASE_COM *)); +static void print_while_command PARAMS((WHILE_COM *)); +static void print_until_command PARAMS((WHILE_COM *)); +static void print_until_or_while PARAMS((WHILE_COM *, char *)); +static void print_if_command PARAMS((IF_COM *)); #if defined (COND_COMMAND) -static void print_cond_node __P((COND_COM *)); +static void print_cond_node PARAMS((COND_COM *)); #endif -static void print_function_def __P((FUNCTION_DEF *)); +static void print_function_def PARAMS((FUNCTION_DEF *)); #define PRINTED_COMMAND_INITIAL_SIZE 64 #define PRINTED_COMMAND_GROW_SIZE 128 diff --git a/shell.c b/shell.c index 7bfce2b9..7a579d1e 100644 --- a/shell.c +++ b/shell.c @@ -62,8 +62,8 @@ #include "jobs.h" #else extern int running_in_background; -extern int initialize_job_control __P((int)); -extern int get_tty_state __P((void)); +extern int initialize_job_control PARAMS((int)); +extern int get_tty_state PARAMS((void)); #endif /* JOB_CONTROL */ #include "input.h" diff --git a/shell.h b/shell.h index 6c08de40..8b41792f 100644 --- a/shell.h +++ b/shell.h @@ -1,6 +1,6 @@ /* shell.h -- The data structures used by the shell */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -220,10 +220,10 @@ typedef struct _sh_input_line_state_t { } sh_input_line_state_t; /* Let's try declaring these here. */ -extern char *parser_remaining_input __P((void)); +extern char *parser_remaining_input PARAMS((void)); -extern sh_parser_state_t *save_parser_state __P((sh_parser_state_t *)); -extern void restore_parser_state __P((sh_parser_state_t *)); +extern sh_parser_state_t *save_parser_state PARAMS((sh_parser_state_t *)); +extern void restore_parser_state PARAMS((sh_parser_state_t *)); -extern sh_input_line_state_t *save_input_line_state __P((sh_input_line_state_t *)); -extern void restore_input_line_state __P((sh_input_line_state_t *)); +extern sh_input_line_state_t *save_input_line_state PARAMS((sh_input_line_state_t *)); +extern void restore_input_line_state PARAMS((sh_input_line_state_t *)); diff --git a/sig.c b/sig.c index 85f791b8..a643c21b 100644 --- a/sig.c +++ b/sig.c @@ -58,7 +58,7 @@ extern void initialize_siglist (); #if !defined (JOB_CONTROL) -extern void initialize_job_signals __P((void)); +extern void initialize_job_signals PARAMS((void)); #endif /* Non-zero after SIGINT. */ @@ -92,7 +92,7 @@ int terminate_immediately = 0; static SigHandler *old_winch = (SigHandler *)SIG_DFL; #endif -static void initialize_shell_signals __P((void)); +static void initialize_shell_signals PARAMS((void)); void initialize_signals (reinit) diff --git a/siglist.h b/siglist.h index 4cb65308..321c20c4 100644 --- a/siglist.h +++ b/siglist.h @@ -1,6 +1,6 @@ /* siglist.h -- encapsulate various definitions for sys_siglist */ -/* Copyright (C) 1993, 2001, 2005, 2008,2009 Free Software Foundation, Inc. +/* Copyright (C) 1993, 2001, 2005, 2008-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -38,7 +38,7 @@ extern char *sys_siglist[]; #endif /* !strsignal && !HAVE_STRSIGNAL */ #if !defined (strsignal) && !HAVE_DECL_STRSIGNAL -extern char *strsignal __P((int)); +extern char *strsignal PARAMS((int)); #endif #endif /* _SIGLIST_H */ diff --git a/support/bashversion.c b/support/bashversion.c index 59c2321e..4f86b134 100644 --- a/support/bashversion.c +++ b/support/bashversion.c @@ -1,6 +1,6 @@ /* bashversion.c -- Display bash version information. */ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -47,8 +47,8 @@ extern char *optarg; extern char *dist_version; extern int patch_level; -extern char *shell_version_string __P((void)); -extern void show_shell_version __P((int)); +extern char *shell_version_string PARAMS((void)); +extern void show_shell_version PARAMS((int)); char *shell_name = "bash"; char *progname; diff --git a/support/mksignames.c b/support/mksignames.c index 5618879a..ba87ae8b 100644 --- a/support/mksignames.c +++ b/support/mksignames.c @@ -1,7 +1,7 @@ /* mksignames.c -- Create and write `signames.h', which contains an array of signal names. */ -/* Copyright (C) 1992-2006 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -57,7 +57,7 @@ write_signames (stream) "/* A translation list so we can be polite to our users. */\n"); #if defined (CROSS_COMPILING) fprintf (stream, "extern char *signal_names[];\n\n"); - fprintf (stream, "extern void initialize_signames __P((void));\n\n"); + fprintf (stream, "extern void initialize_signames PARAMS((void));\n\n"); #else fprintf (stream, "char *signal_names[NSIG + 4] = {\n"); diff --git a/support/mkversion.sh b/support/mkversion.sh index 08a5d981..5960a425 100644 --- a/support/mkversion.sh +++ b/support/mkversion.sh @@ -5,7 +5,7 @@ # in the makefile. This creates a file named by the -o option, # otherwise everything is echoed to the standard output. -# Copyright (C) 1996-2002 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -153,8 +153,8 @@ echo "#define SCCSVERSION \"@(#)Bash version ${sccs_string}\"" # extern function declarations #echo #echo '/* Functions from version.c. */' -#echo 'extern char *shell_version_string __P((void));' -#echo 'extern void show_shell_version __P((int));' +#echo 'extern char *shell_version_string PARAMS((void));' +#echo 'extern void show_shell_version PARAMS((int));' if [ -n "$inc_build" ]; then # Make sure we can write to .build diff --git a/tests/RUN-ONE-TEST b/tests/RUN-ONE-TEST index c8bef8dd..0b063810 100755 --- a/tests/RUN-ONE-TEST +++ b/tests/RUN-ONE-TEST @@ -1,4 +1,4 @@ -BUILD_DIR=/usr/local/build/bash/bash-current +BUILD_DIR=/usr/local/build/chet/bash/bash-current THIS_SH=$BUILD_DIR/bash PATH=$PATH:$BUILD_DIR diff --git a/unwind_prot.c b/unwind_prot.c index c9196dc1..664e3a9b 100644 --- a/unwind_prot.c +++ b/unwind_prot.c @@ -3,7 +3,7 @@ /* I can't stand it anymore! Please can't we just write the whole Unix system in lisp or something? */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -76,15 +76,15 @@ typedef union uwp { } sv; } UNWIND_ELT; -static void without_interrupts __P((VFunction *, char *, char *)); -static void unwind_frame_discard_internal __P((char *, char *)); -static void unwind_frame_run_internal __P((char *, char *)); -static void add_unwind_protect_internal __P((Function *, char *)); -static void remove_unwind_protect_internal __P((char *, char *)); -static void run_unwind_protects_internal __P((char *, char *)); -static void clear_unwind_protects_internal __P((char *, char *)); -static inline void restore_variable __P((SAVED_VAR *)); -static void unwind_protect_mem_internal __P((char *, char *)); +static void without_interrupts PARAMS((VFunction *, char *, char *)); +static void unwind_frame_discard_internal PARAMS((char *, char *)); +static void unwind_frame_run_internal PARAMS((char *, char *)); +static void add_unwind_protect_internal PARAMS((Function *, char *)); +static void remove_unwind_protect_internal PARAMS((char *, char *)); +static void run_unwind_protects_internal PARAMS((char *, char *)); +static void clear_unwind_protects_internal PARAMS((char *, char *)); +static inline void restore_variable PARAMS((SAVED_VAR *)); +static void unwind_protect_mem_internal PARAMS((char *, char *)); static UNWIND_ELT *unwind_protect_list = (UNWIND_ELT *)NULL; diff --git a/unwind_prot.h b/unwind_prot.h index cbfc97ca..97b3af90 100644 --- a/unwind_prot.h +++ b/unwind_prot.h @@ -1,6 +1,6 @@ /* unwind_prot.h - Macros and functions for hacking unwind protection. */ -/* Copyright (C) 1993-2009 Free Software Foundation, Inc. +/* Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -21,26 +21,26 @@ #if !defined (_UNWIND_PROT_H) #define _UNWIND_PROT_H -extern void uwp_init __P((void)); +extern void uwp_init PARAMS((void)); /* Run a function without interrupts. */ -extern void begin_unwind_frame __P((char *)); -extern void discard_unwind_frame __P((char *)); -extern void run_unwind_frame __P((char *)); +extern void begin_unwind_frame PARAMS((char *)); +extern void discard_unwind_frame PARAMS((char *)); +extern void run_unwind_frame PARAMS((char *)); extern void add_unwind_protect (); /* Not portable to arbitrary C99 hosts. */ -extern void remove_unwind_protect __P((void)); -extern void run_unwind_protects __P((void)); -extern void clear_unwind_protect_list __P((int)); -extern int have_unwind_protects __P((void)); -extern int unwind_protect_tag_on_stack __P((const char *)); -extern void uwp_init __P((void)); +extern void remove_unwind_protect PARAMS((void)); +extern void run_unwind_protects PARAMS((void)); +extern void clear_unwind_protect_list PARAMS((int)); +extern int have_unwind_protects PARAMS((void)); +extern int unwind_protect_tag_on_stack PARAMS((const char *)); +extern void uwp_init PARAMS((void)); /* Define for people who like their code to look a certain way. */ #define end_unwind_frame() /* How to protect a variable. */ #define unwind_protect_var(X) unwind_protect_mem ((char *)&(X), sizeof (X)) -extern void unwind_protect_mem __P((char *, int)); +extern void unwind_protect_mem PARAMS((char *, int)); /* Backwards compatibility */ #define unwind_protect_int unwind_protect_var diff --git a/version.c b/version.c index acb10799..8c1568ae 100644 --- a/version.c +++ b/version.c @@ -52,8 +52,8 @@ int shell_compatibility_level = DEFAULT_COMPAT_LEVEL; /* Functions for getting, setting, and displaying the shell version. */ /* Forward declarations so we don't have to include externs.h */ -extern char *shell_version_string __P((void)); -extern void show_shell_version __P((int)); +extern char *shell_version_string PARAMS((void)); +extern void show_shell_version PARAMS((int)); /* Give version information about this shell. */ char * diff --git a/version2.c b/version2.c index acb10799..8c1568ae 100644 --- a/version2.c +++ b/version2.c @@ -52,8 +52,8 @@ int shell_compatibility_level = DEFAULT_COMPAT_LEVEL; /* Functions for getting, setting, and displaying the shell version. */ /* Forward declarations so we don't have to include externs.h */ -extern char *shell_version_string __P((void)); -extern void show_shell_version __P((int)); +extern char *shell_version_string PARAMS((void)); +extern void show_shell_version PARAMS((int)); /* Give version information about this shell. */ char * diff --git a/xmalloc.h b/xmalloc.h index 083fd7a4..55d2e3d0 100644 --- a/xmalloc.h +++ b/xmalloc.h @@ -1,6 +1,6 @@ /* xmalloc.h -- defines for the `x' memory allocation functions */ -/* Copyright (C) 2001-2009 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -36,14 +36,14 @@ #endif /* PTR_T */ /* Allocation functions in xmalloc.c */ -extern PTR_T xmalloc __P((size_t)); -extern PTR_T xrealloc __P((void *, size_t)); -extern void xfree __P((void *)); +extern PTR_T xmalloc PARAMS((size_t)); +extern PTR_T xrealloc PARAMS((void *, size_t)); +extern void xfree PARAMS((void *)); #if defined(USING_BASH_MALLOC) && !defined (DISABLE_MALLOC_WRAPPERS) -extern PTR_T sh_xmalloc __P((size_t, const char *, int)); -extern PTR_T sh_xrealloc __P((void *, size_t, const char *, int)); -extern void sh_xfree __P((void *, const char *, int)); +extern PTR_T sh_xmalloc PARAMS((size_t, const char *, int)); +extern PTR_T sh_xrealloc PARAMS((void *, size_t, const char *, int)); +extern void sh_xfree PARAMS((void *, const char *, int)); #define xmalloc(x) sh_xmalloc((x), __FILE__, __LINE__) #define xrealloc(x, n) sh_xrealloc((x), (n), __FILE__, __LINE__) @@ -54,7 +54,7 @@ extern void sh_xfree __P((void *, const char *, int)); #endif #define free(x) sh_xfree((x), __FILE__, __LINE__) -extern PTR_T sh_malloc __P((size_t, const char *, int)); +extern PTR_T sh_malloc PARAMS((size_t, const char *, int)); #ifdef malloc #undef malloc