diff options
author | ache <ache@FreeBSD.org> | 2003-08-03 05:20:31 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2003-08-03 05:20:31 +0000 |
commit | aed962b0e91a64589184a088d53bf5718c582525 (patch) | |
tree | a5c551d1f39fe708e9459c527840e379345830ec /lib | |
parent | c7d2e2b2a7bb4a51a1d1c3fd9b0ed6d8d07fe291 (diff) | |
download | FreeBSD-src-aed962b0e91a64589184a088d53bf5718c582525.zip FreeBSD-src-aed962b0e91a64589184a088d53bf5718c582525.tar.gz |
Remove commented out and never used code
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/locale/collcmp.c | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/lib/libc/locale/collcmp.c b/lib/libc/locale/collcmp.c index b3e6ae0..3dcbe96 100644 --- a/lib/libc/locale/collcmp.c +++ b/lib/libc/locale/collcmp.c @@ -27,50 +27,17 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define ASCII_COMPATIBLE_COLLATE /* see share/colldef */ - #include <string.h> -#include "collate.h" -#ifndef ASCII_COMPATIBLE_COLLATE -#include <ctype.h> -#endif /* - * Compare two characters converting collate information - * into ASCII-compatible range, it allows to handle - * "[a-z]"-type ranges with national characters. + * Compare two characters using collate */ int __collate_range_cmp(c1, c2) int c1, c2; { static char s1[2], s2[2]; -#ifndef ASCII_COMPATIBLE_COLLATE - int as1, as2, al1, al2; -#endif - -#ifndef ASCII_COMPATIBLE_COLLATE - as1 = isascii(c1); - as2 = isascii(c2); - al1 = isalpha(c1); - al2 = isalpha(c2); - if (as1 || as2 || al1 || al2) { - if ((as1 && as2) || (!al1 && !al2)) - return (c1 - c2); - if (al1 && !al2) { - if (isupper(c1)) - return ('A' - c2); - else - return ('a' - c2); - } else if (al2 && !al1) { - if (isupper(c2)) - return (c1 - 'A'); - else - return (c1 - 'a'); - } - } -#endif s1[0] = c1; s2[0] = c2; return (strcoll(s1, s2)); |