mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-09-04 11:09:28 +02:00
use char variants of the <ctype.h> toxxxx() family
This commit is contained in:
+8
-8
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user