diff options
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) |