projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NEWS.stable: log cherry-pick [e446f25]->[c092018] relocatable-shell: Update suggested...
[gnulib.git]
/
lib
/
fnmatch_loop.c
diff --git
a/lib/fnmatch_loop.c
b/lib/fnmatch_loop.c
index
8334491
..
6d19ff7
100644
(file)
--- a/
lib/fnmatch_loop.c
+++ b/
lib/fnmatch_loop.c
@@
-1,4
+1,4
@@
-/* Copyright (C) 1991-1993, 1996-2006, 2009-201
1
Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993, 1996-2006, 2009-201
4
Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
@@
-12,8
+12,7
@@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Match STRING against the file name pattern PATTERN, returning zero if
it matches, nonzero if not. */
/* Match STRING against the file name pattern PATTERN, returning zero if
it matches, nonzero if not. */
@@
-216,7
+215,7
@@
FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
return FNM_NOMATCH;
if (*n == L_('/') && (flags & FNM_FILE_NAME))
return FNM_NOMATCH;
if (*n == L_('/') && (flags & FNM_FILE_NAME))
- /*
`
/' cannot be matched. */
+ /*
'
/' cannot be matched. */
return FNM_NOMATCH;
not = (*p == L_('!') || (posixly_correct < 0 && *p == L_('^')));
return FNM_NOMATCH;
not = (*p == L_('!') || (posixly_correct < 0 && *p == L_('^')));
@@
-228,6
+227,8
@@
FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
c = *p++;
for (;;)
{
c = *p++;
for (;;)
{
+ bool is_range = false;
+
if (!(flags & FNM_NOESCAPE) && c == L_('\\'))
{
if (*p == L_('\0'))
if (!(flags & FNM_NOESCAPE) && c == L_('\\'))
{
if (*p == L_('\0'))
@@
-382,7
+383,7
@@
FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
{
/* We found a table entry. Now see whether the
character we are currently at has the same
{
/* We found a table entry. Now see whether the
character we are currently at has the same
- equival
a
nce class value. */
+ equival
e
nce class value. */
int len = weights[idx & 0xffffff];
int32_t idx2;
const UCHAR *np = (const UCHAR *) n;
int len = weights[idx & 0xffffff];
int32_t idx2;
const UCHAR *np = (const UCHAR *) n;
@@
-421,8
+422,6
@@
FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
}
else
{
}
else
{
- bool is_range = false;
-
#ifdef _LIBC
bool is_seqval = false;
#ifdef _LIBC
bool is_seqval = false;
@@
-636,7
+635,7
@@
FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
UCHAR cend = *p++;
# ifdef WIDE_CHAR_VERSION
UCHAR cend = *p++;
# ifdef WIDE_CHAR_VERSION
- /* Search in the
`
names' array for the characters. */
+ /* Search in the
'
names' array for the characters. */
fcollseq = __collseq_table_lookup (collseq, fn);
if (fcollseq == ~((uint32_t) 0))
/* XXX We don't know anything about the character
fcollseq = __collseq_table_lookup (collseq, fn);
if (fcollseq == ~((uint32_t) 0))
/* XXX We don't know anything about the character
@@
-839,7
+838,7
@@
FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
#else
/* We use a boring value comparison of the character
values. This is better than comparing using
#else
/* We use a boring value comparison of the character
values. This is better than comparing using
-
`
strcoll' since the latter would have surprising
+
'
strcoll' since the latter would have surprising
and sometimes fatal consequences. */
UCHAR cend = *p++;
and sometimes fatal consequences. */
UCHAR cend = *p++;
@@
-1156,7
+1155,7
@@
EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
case L_('@'):
do
case L_('@'):
do
- /* I cannot believe it but
`
strcat' is actually acceptable
+ /* I cannot believe it but
'
strcat' is actually acceptable
here. Match the entire string with the prefix from the
pattern list and the rest of the pattern following the
pattern list. */
here. Match the entire string with the prefix from the
pattern list and the rest of the pattern following the
pattern list. */
@@
-1214,7
+1213,6
@@
EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
#undef END
#undef MEMPCPY
#undef MEMCHR
#undef END
#undef MEMPCPY
#undef MEMCHR
-#undef STRCOLL
#undef STRLEN
#undef STRCAT
#undef L_
#undef STRLEN
#undef STRCAT
#undef L_