Remove commented out and never used code

This commit is contained in:
Andrey A. Chernov 2003-08-03 05:20:31 +00:00
parent 5a13ca6f02
commit 8841d0081c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118378

View File

@ -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));