diff options
author | ache <ache@FreeBSD.org> | 1996-10-23 15:35:46 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-10-23 15:35:46 +0000 |
commit | 30ce15b19102abe594a598b8ce48343a1f8dc1b2 (patch) | |
tree | a52a8402d90f52a3f488f9bce66d4e522e69c2ea /lib/libc/locale/collcmp.c | |
parent | 3b9a16cb5063881459285cd4d6d527b6c2aa0dad (diff) | |
download | FreeBSD-src-30ce15b19102abe594a598b8ce48343a1f8dc1b2.zip FreeBSD-src-30ce15b19102abe594a598b8ce48343a1f8dc1b2.tar.gz |
Simplify debug output
Simplify collate_range_cmp for ASCII-compatible collate we have now
Diffstat (limited to 'lib/libc/locale/collcmp.c')
-rw-r--r-- | lib/libc/locale/collcmp.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/libc/locale/collcmp.c b/lib/libc/locale/collcmp.c index c5acf73..1776033 100644 --- a/lib/libc/locale/collcmp.c +++ b/lib/libc/locale/collcmp.c @@ -23,13 +23,17 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: collcmp.c,v 1.5 1996/08/14 19:47:02 ache Exp $ + * $Id: collcmp.c,v 1.6 1996/09/17 19:27:06 ache Exp $ */ -#include <ctype.h> +#define ASCII_COMPATIBLE_COLLATE /* see usr.bin/colldef/data */ + #include <string.h> #include <limits.h> #include <locale.h> +#ifndef ASCII_COMPATIBLE_COLLATE +#include <ctype.h> +#endif /* * Compare two characters converting collate information @@ -40,14 +44,18 @@ int collate_range_cmp (c1, c2) int c1, c2; { - int as1, as2, al1, al2, ret; static char s1[2], s2[2]; + int ret; +#ifndef ASCII_COMPATIBLE_COLLATE + int as1, as2, al1, al2; +#endif c1 &= UCHAR_MAX; c2 &= UCHAR_MAX; if (c1 == c2) return (0); +#ifndef ASCII_COMPATIBLE_COLLATE as1 = isascii(c1); as2 = isascii(c2); al1 = isalpha(c1); @@ -68,7 +76,7 @@ int collate_range_cmp (c1, c2) return (c1 - 'a'); } } - +#endif s1[0] = c1; s2[0] = c2; if ((ret = strcoll(s1, s2)) != 0) |