mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-12 05:00:50 +02:00
commit bash-20200605 snapshot
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
+7
-7
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
+10
-10
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+7
-7
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+7
-7
@@ -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 */
|
||||
|
||||
+6
-6
@@ -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
|
||||
|
||||
+6
-6
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-2
@@ -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.
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
@@ -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 */
|
||||
|
||||
+11
-11
@@ -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",
|
||||
|
||||
+17
-17
@@ -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;
|
||||
|
||||
+7
-7
@@ -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
|
||||
|
||||
+11
-11
@@ -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;
|
||||
|
||||
+11
-11
@@ -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";
|
||||
|
||||
@@ -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 \
|
||||
|
||||
+17
-17
@@ -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
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-2
@@ -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:
|
||||
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+12
-12
@@ -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. */
|
||||
|
||||
+3
-3
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user