use char variants of the <ctype.h> toxxxx() family

This commit is contained in:
rlar
2016-03-09 20:24:36 +01:00
parent 71a7c3459b
commit 726d0be34c
16 changed files with 30 additions and 30 deletions
+8 -8
View File
@@ -160,8 +160,8 @@ int
cieq(const char *p, const char *s)
{
while (*p) {
if ((isupper_c(*p) ? tolower(*p) : *p) !=
(isupper_c(*s) ? tolower(*s) : *s))
if ((isupper_c(*p) ? tolower_c(*p) : *p) !=
(isupper_c(*s) ? tolower_c(*s) : *s))
return(FALSE);
p++;
s++;
@@ -175,8 +175,8 @@ int
ciprefix(const char *p, const char *s)
{
while (*p) {
if ((isupper_c(*p) ? tolower(*p) : *p) !=
(isupper_c(*s) ? tolower(*s) : *s))
if ((isupper_c(*p) ? tolower_c(*p) : *p) !=
(isupper_c(*s) ? tolower_c(*s) : *s))
return(FALSE);
p++;
s++;
@@ -190,7 +190,7 @@ strtolower(char *str)
if (str)
while (*str) {
if(isupper_c(*str))
*str = (char) tolower(*str);
*str = tolower_c(*str);
str++;
}
}
@@ -201,7 +201,7 @@ strtoupper(char *str)
if (str)
while (*str) {
if(islower_c(*str))
*str = (char) toupper(*str);
*str = toupper_c(*str);
str++;
}
}
@@ -228,7 +228,7 @@ register int n)
if (!p || !s) return( 0 );
while (*p) {
if ((isupper_c(*p) ? tolower(*p) : *p) != (isupper_c(*s) ? tolower(*s) : *s))
if ((isupper_c(*p) ? tolower_c(*p) : *p) != (isupper_c(*s) ? tolower_c(*s) : *s))
return( 0 );
p++;
s++;
@@ -255,7 +255,7 @@ register char *p, register char *s)
if (!p || !s) return( 0 );
while (*p) {
if ((isupper_c(*p) ? tolower(*p) : *p) != (isupper_c(*s) ? tolower(*s) : *s))
if ((isupper_c(*p) ? tolower_c(*p) : *p) != (isupper_c(*s) ? tolower_c(*s) : *s))
return( n );
p++;
s++;