head 1.7; access; symbols; locks; strict; comment @ * @; 1.7 date 92.12.15.00.20.22; author jromine; state Exp; branches; next 1.6; 1.6 date 92.10.26.22.55.49; author jromine; state Exp; branches; next 1.5; 1.5 date 90.04.05.15.32.33; author sources; state Exp; branches; next 1.4; 1.4 date 90.04.05.14.50.10; author sources; state Exp; branches; next 1.3; 1.3 date 90.04.02.15.07.17; author sources; state Exp; branches; next 1.2; 1.2 date 90.04.02.14.40.32; author sources; state Exp; branches; next 1.1; 1.1 date 90.04.02.14.40.13; author sources; state Exp; branches; next ; desc @@ 1.7 log @endif sugar @ text @/* uleq.c - "unsigned" lexical compare */ #ifndef lint static char ident[] = "@@(#)$Id: uleq.c,v 1.6 1992/10/26 22:55:49 jromine Exp jromine $"; #endif /* lint */ #define TO_LOWER 040 #define NO_MASK 000 #include uleq (c1, c2) register char *c1, *c2; { register int c, mask; if (!c1) c1 = ""; if (!c2) c2 = ""; while (c = *c1++) { #ifdef LOCALE c &= 0xff; mask = *c2 & 0xff; c = (isalpha(c) && isupper(c)) ? tolower(c) : c; mask = (isalpha(mask) && isupper(mask)) ? tolower(mask) : mask; if (c != mask) #else mask = (isalpha(c) && isalpha(*c2)) ? TO_LOWER : NO_MASK; if ((c | mask) != (*c2 | mask)) #endif return 0; else c2++; } return (*c2 == 0); } @ 1.6 log @LOCALE @ text @d3 2 a4 2 static char ident[] = "@@(#)$Id: uleq.c,v 1.5 1990/04/05 15:32:33 sources Exp jromine $"; #endif lint @ 1.5 log @add ID @ text @d3 1 a3 1 static char ident[] = "@@(#)$Id:$"; d24 7 d33 1 @ 1.4 log @add ID @ text @d3 1 a3 1 static char ident[] = "$Id:"; @ 1.3 log @typo @ text @d2 3 @ 1.2 log @RAND fixes @ text @d3 1 a3 1 #define TO_UPPER 040 d11 2 a12 1 register int c; d21 1 a21 1 mask = (isalpha(c) && isalpha(*c2)) ? TO_UPPER : NO_MASK; @ 1.1 log @Initial revision @ text @d3 3 d19 3 a21 1 if ((c | 040) != (*c2 | 040)) d25 1 @