diff options
author | ache <ache@FreeBSD.org> | 1996-08-12 18:49:54 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-08-12 18:49:54 +0000 |
commit | 18e6a0b58f4135d736969d9e1db05995eb4ac5f5 (patch) | |
tree | 3f2ed0e11588c3b2e1116f5966c0d362c28edb67 /lib/libc | |
parent | 956383bed878377c60fa07ec47955f81a6ee5833 (diff) | |
download | FreeBSD-src-18e6a0b58f4135d736969d9e1db05995eb4ac5f5.zip FreeBSD-src-18e6a0b58f4135d736969d9e1db05995eb4ac5f5.tar.gz |
Convert to newly aded collate compare function
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/fnmatch.c | 6 | ||||
-rw-r--r-- | lib/libc/gen/glob.c | 6 | ||||
-rw-r--r-- | lib/libc/regex/regcomp.c | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/libc/gen/fnmatch.c b/lib/libc/gen/fnmatch.c index 3005184..47bd405 100644 --- a/lib/libc/gen/fnmatch.c +++ b/lib/libc/gen/fnmatch.c @@ -44,8 +44,8 @@ static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94"; */ #include <fnmatch.h> +#include <locale.h> #include <string.h> -#include "collate.h" #define EOS '\0' @@ -163,8 +163,8 @@ rangematch(pattern, test, flags) c2 = *pattern++; if (c2 == EOS) return (NULL); - if ( __collcmp(c, test) <= 0 - && __collcmp(test, c2) <= 0 + if ( collate_range_cmp(c, test) <= 0 + && collate_range_cmp(test, c2) <= 0 ) ok = 1; } else if (c == test) diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c index cfea035..a781019 100644 --- a/lib/libc/gen/glob.c +++ b/lib/libc/gen/glob.c @@ -70,12 +70,12 @@ static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; #include <dirent.h> #include <errno.h> #include <glob.h> +#include <locale.h> #include <pwd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> -#include "collate.h" #define DOLLAR '$' #define DOT '.' @@ -703,8 +703,8 @@ match(name, pat, patend) ++pat; while (((c = *pat++) & M_MASK) != M_END) if ((*pat & M_MASK) == M_RNG) { - if ( __collcmp(CHAR(c), CHAR(k)) <= 0 - && __collcmp(CHAR(k), CHAR(pat[1])) <= 0 + if ( collate_range_cmp(CHAR(c), CHAR(k)) <= 0 + && collate_range_cmp(CHAR(k), CHAR(pat[1])) <= 0 ) ok = 1; pat += 2; diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 8e01210..bdc943d 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -46,6 +46,7 @@ static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94"; #include <string.h> #include <ctype.h> #include <limits.h> +#include <locale.h> #include <stdlib.h> #include <regex.h> @@ -54,7 +55,6 @@ static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94"; #include "cclass.h" #include "cname.h" -#include "collate.h" /* * parse structure, passed up and down to avoid global variables and @@ -803,10 +803,10 @@ register cset *cs; if (start == finish) CHadd(cs, start); else { - (void)REQUIRE(__collcmp(start, finish) <= 0, REG_ERANGE); + (void)REQUIRE(collate_range_cmp(start, finish) <= 0, REG_ERANGE); for (i = CHAR_MIN; i <= CHAR_MAX; i++) { - if ( __collcmp(start, i) <= 0 - && __collcmp(i, finish) <= 0 + if ( collate_range_cmp(start, i) <= 0 + && collate_range_cmp(i, finish) <= 0 ) CHadd(cs, i); } |