toupper->tolower to match what strcasecmp does

This commit is contained in:
Andrey A. Chernov 1999-10-24 04:21:42 +00:00
parent c02e589456
commit 4346bfd3f0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=52457
2 changed files with 4 additions and 4 deletions

View File

@ -71,10 +71,10 @@ int stricoll(char *s1, char *s2)
char *p, line1[MAXLINELEN], line2[MAXLINELEN];
for (p = line1; *s1; s1++)
*p++ = toupper((unsigned char)*s1);
*p++ = tolower((unsigned char)*s1);
*p = '\0';
for (p = line2; *s2; s2++)
*p++ = toupper((unsigned char)*s2);
*p++ = tolower((unsigned char)*s2);
*p = '\0';
return strcoll(s1, s2);
}

View File

@ -73,10 +73,10 @@ int stricoll(char *s1, char *s2)
char *p, line1[MAXLINELEN], line2[MAXLINELEN];
for (p = line1; *s1; s1++)
*p++ = toupper((unsigned char)*s1);
*p++ = tolower((unsigned char)*s1);
*p = '\0';
for (p = line2; *s2; s2++)
*p++ = toupper((unsigned char)*s2);
*p++ = tolower((unsigned char)*s2);
*p = '\0';
return strcoll(s1, s2);
}