diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 05:05:38 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 05:05:38 +0000 |
commit | 2ad6f3dee6bc54535003f4ab26bbc587b7efa38c (patch) | |
tree | a3959baf797787918878bec6d58d6a0fb743ad0a /gnu/usr.bin/cvs/lib/fnmatch.c | |
parent | 4f960dd75f181e9fa2edc44324f15f0ab5c64b37 (diff) | |
download | FreeBSD-src-2ad6f3dee6bc54535003f4ab26bbc587b7efa38c.zip FreeBSD-src-2ad6f3dee6bc54535003f4ab26bbc587b7efa38c.tar.gz |
Remove trailing whitespace.
Diffstat (limited to 'gnu/usr.bin/cvs/lib/fnmatch.c')
-rw-r--r-- | gnu/usr.bin/cvs/lib/fnmatch.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/gnu/usr.bin/cvs/lib/fnmatch.c b/gnu/usr.bin/cvs/lib/fnmatch.c index 2a05430..34a0f89 100644 --- a/gnu/usr.bin/cvs/lib/fnmatch.c +++ b/gnu/usr.bin/cvs/lib/fnmatch.c @@ -66,27 +66,27 @@ fnmatch (pattern, string, flags) (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/'))) return FNM_NOMATCH; break; - + case '\\': if (!(flags & FNM_NOESCAPE)) c = *p++; if (*n != c) return FNM_NOMATCH; break; - + case '*': if ((flags & FNM_PERIOD) && *n == '.' && (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/'))) return FNM_NOMATCH; - + for (c = *p++; c == '?' || c == '*'; c = *p++, ++n) if (((flags & FNM_PATHNAME) && *n == '/') || (c == '?' && *n == '\0')) return FNM_NOMATCH; - + if (c == '\0') return 0; - + { char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c; for (--p; *n != '\0'; ++n) @@ -95,41 +95,41 @@ fnmatch (pattern, string, flags) return 0; return FNM_NOMATCH; } - + case '[': { /* Nonzero if the sense of the character class is inverted. */ register int not; - + if (*n == '\0') return FNM_NOMATCH; - + if ((flags & FNM_PERIOD) && *n == '.' && (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/'))) return FNM_NOMATCH; - + not = (*p == '!' || *p == '^'); if (not) ++p; - + c = *p++; for (;;) { register char cstart = c, cend = c; - + if (!(flags & FNM_NOESCAPE) && c == '\\') cstart = cend = *p++; - + if (c == '\0') /* [ (unterminated) loses. */ return FNM_NOMATCH; - + c = *p++; - + if ((flags & FNM_PATHNAME) && c == '/') /* [/] can never match. */ return FNM_NOMATCH; - + if (c == '-' && *p != ']') { cend = *p++; @@ -139,17 +139,17 @@ fnmatch (pattern, string, flags) return FNM_NOMATCH; c = *p++; } - + if (*n >= cstart && *n <= cend) goto matched; - + if (c == ']') break; } if (!not) return FNM_NOMATCH; break; - + matched:; /* Skip the rest of the [...] that already matched. */ while (c != ']') @@ -157,7 +157,7 @@ fnmatch (pattern, string, flags) if (c == '\0') /* [... (unterminated) loses. */ return FNM_NOMATCH; - + c = *p++; if (!(flags & FNM_NOESCAPE) && c == '\\') /* 1003.2d11 is unclear if this is right. %%% */ @@ -167,12 +167,12 @@ fnmatch (pattern, string, flags) return FNM_NOMATCH; } break; - + default: if (c != *n) return FNM_NOMATCH; } - + ++n; } |