diff options
Diffstat (limited to 'missing_d')
-rw-r--r-- | missing_d/ChangeLog | 6 | ||||
-rw-r--r-- | missing_d/fnmatch.c | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/missing_d/ChangeLog b/missing_d/ChangeLog index 2ae8093a..07939c2d 100644 --- a/missing_d/ChangeLog +++ b/missing_d/ChangeLog @@ -1,3 +1,9 @@ +2020-06-10 Arnold D. Robbins <arnold@skeeve.com> + + Miscellanious fixes from Michael Builov <mbuilov@gmail.com>. + + * fnmatch.c (internal_fnmatch): Misc small fixes. + 2020-04-14 Arnold D. Robbins <arnold@skeeve.com> * 5.1.0: Release tar ball made. diff --git a/missing_d/fnmatch.c b/missing_d/fnmatch.c index 4da8c5fb..3e6e5cec 100644 --- a/missing_d/fnmatch.c +++ b/missing_d/fnmatch.c @@ -329,6 +329,8 @@ internal_fnmatch (pattern, string, no_leading_period, flags) if (c == fn) goto matched; + + c = *p++; } else if (c == '[' && *p == ':') { @@ -353,7 +355,7 @@ internal_fnmatch (pattern, string, no_leading_period, flags) p += 2; break; } - if (c < 'a' || c >= 'z') + if (c < 'a' || c > 'z') { /* This cannot possibly be a character class name. Match it as a normal range. */ @@ -388,6 +390,7 @@ internal_fnmatch (pattern, string, no_leading_period, flags) || (STREQ (str, "xdigit") && ISXDIGIT ((unsigned char) *n))) goto matched; # endif + c = *p++; } else if (c == '\0') /* [ (unterminated) loses. */ @@ -398,7 +401,7 @@ internal_fnmatch (pattern, string, no_leading_period, flags) if (FOLD (c) == fn) goto matched; - cold = c; + cold = FOLD(c); c = *p++; if (c == '-' && *p != ']') |