mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-07 18:52:35 +02:00
bash-5.0 distribution sources and documentation
This commit is contained in:
+15
-5
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991-2005 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991-2017 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -16,16 +16,16 @@
|
||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
static int INTERNAL_GLOB_PATTERN_P __P((const CHAR *));
|
||||
static int INTERNAL_GLOB_PATTERN_P __P((const GCHAR *));
|
||||
|
||||
/* Return nonzero if PATTERN has any special globbing chars in it.
|
||||
Compiled twice, once each for single-byte and multibyte characters. */
|
||||
static int
|
||||
INTERNAL_GLOB_PATTERN_P (pattern)
|
||||
const CHAR *pattern;
|
||||
const GCHAR *pattern;
|
||||
{
|
||||
register const CHAR *p;
|
||||
register CHAR c;
|
||||
register const GCHAR *p;
|
||||
register GCHAR c;
|
||||
int bopen;
|
||||
|
||||
p = pattern;
|
||||
@@ -54,8 +54,17 @@ INTERNAL_GLOB_PATTERN_P (pattern)
|
||||
continue;
|
||||
|
||||
case L('\\'):
|
||||
#if 0
|
||||
/* Don't let the pattern end in a backslash (GMATCH returns no match
|
||||
if the pattern ends in a backslash anyway), but otherwise return 1,
|
||||
since the matching engine uses backslash as an escape character
|
||||
and it can be removed. */
|
||||
return (*p != L('\0'));
|
||||
#else
|
||||
/* The pattern may not end with a backslash. */
|
||||
if (*p++ == L('\0'))
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -65,3 +74,4 @@ INTERNAL_GLOB_PATTERN_P (pattern)
|
||||
#undef L
|
||||
#undef INT
|
||||
#undef CHAR
|
||||
#undef GCHAR
|
||||
|
||||
Reference in New Issue
Block a user