commit bash-20200605 snapshot

This commit is contained in:
Chet Ramey
2020-06-05 14:34:49 -04:00
parent 32ba27b400
commit ab309487d5
120 changed files with 812 additions and 811 deletions
+18 -18
View File
@@ -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
+5 -5
View File
@@ -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;
+2 -2
View File
@@ -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 <http://www.gnu.org/licenses/>.
*/
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. */
+2 -2
View File
@@ -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
+8 -8
View File
@@ -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)
+2 -2
View File
@@ -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 <fnmatch.h> in order to avoid namespace collisions; the
+3 -3
View File
@@ -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
+3 -3
View File
@@ -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 */
+2 -2
View File
@@ -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>.