mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-06 18:22:25 +02:00
commit bash-20190111 snapshot
This commit is contained in:
+12
-2
@@ -187,7 +187,7 @@ extglob_skipname (pat, dname, flags)
|
||||
int flags;
|
||||
{
|
||||
char *pp, *pe, *t, *se;
|
||||
int n, r, negate, wild;
|
||||
int n, r, negate, wild, nullpat;
|
||||
|
||||
negate = *pat == '!';
|
||||
wild = *pat == '*' || *pat == '?';
|
||||
@@ -214,6 +214,11 @@ extglob_skipname (pat, dname, flags)
|
||||
return r;
|
||||
}
|
||||
|
||||
/* Is the extglob pattern between the parens the null pattern? The null
|
||||
pattern can match nothing, so should we check any remaining portion of
|
||||
the pattern? */
|
||||
nullpat = pe >= (pat + 2) && pe[-2] == '(' && pe[-1] == ')';
|
||||
|
||||
/* check every subpattern */
|
||||
while (t = glob_patscan (pp, pe, '|'))
|
||||
{
|
||||
@@ -305,7 +310,7 @@ wextglob_skipname (pat, dname, flags)
|
||||
{
|
||||
#if EXTENDED_GLOB
|
||||
wchar_t *pp, *pe, *t, n, *se;
|
||||
int r, negate, wild;
|
||||
int r, negate, wild, nullpat;
|
||||
|
||||
negate = *pat == L'!';
|
||||
wild = *pat == L'*' || *pat == L'?';
|
||||
@@ -323,6 +328,11 @@ wextglob_skipname (pat, dname, flags)
|
||||
return r;
|
||||
}
|
||||
|
||||
/* Is the extglob pattern between the parens the null pattern? The null
|
||||
pattern can match nothing, so should we check any remaining portion of
|
||||
the pattern? */
|
||||
nullpat = pe >= (pat + 2) && pe[-2] == L'(' && pe[-1] == L')';
|
||||
|
||||
/* check every subpattern */
|
||||
while (t = glob_patscan_wc (pp, pe, '|'))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user