int c1, c2;
char *s1, *s2;
-#ifdef LOCALE
while ((c1 = *sub)) {
- c1 = (isalpha(c1) && isupper(c1)) ? tolower(c1) : c1;
- while ((c2 = *str++) && c1 != ((isalpha(c2) && isupper(c2)) ? tolower(c2) : c2))
+ while ((c2 = *str++) && tolower(c1) != tolower(c2))
;
if (! c2)
return 0;
s1 = sub + 1; s2 = str;
- while ((c1 = *s1++) && ((isalpha(c1) && isupper(c1)) ? tolower(c1) : c1) == ((isalpha(c2 =*s2++) && isupper(c2)) ? tolower(c2) : c2))
+ while ((c1 = *s1++) && tolower(c1) == tolower(*s2++))
;
if (! c1)
return 1;
}
-#else
- while ((c1 = *sub)) {
- while ((c2 = *str++) && (c1 | 040) != (c2 | 040))
- ;
- if (! c2)
- return 0;
- s1 = sub + 1; s2 = str;
- while ((c1 = *s1++) && (c1 | 040) == (*s2++ | 040))
- ;
- if (! c1)
- return 1;
- }
-#endif
return 1;
}
return;
/* skip any initial control characters or spaces */
- while ((c = (unsigned char) *s) &&
-#ifdef LOCALE
- (iscntrl(c) || isspace(c)))
-#else
- (c <= 32))
-#endif
+ while ((c = (unsigned char) *s) && (iscntrl(c) || isspace(c)))
s++;
/* compact repeated control characters and spaces into a single space */
*(*start)++ = c;
else {
while ((c = (unsigned char) *s) &&
-#ifdef LOCALE
- (iscntrl(c) || isspace(c)))
-#else
- (c <= 32))
-#endif
+ (iscntrl(c) || isspace(c)))
s++;
*(*start)++ = ' ';
}