Browse Source

special cases of the char variants of the <ctype.h> family

pre-master-46
rlar 10 years ago
parent
commit
0932120a7f
  1. 4
      src/winmain.c
  2. 2
      src/xspice/cmpp/mod_yacc.y

4
src/winmain.c

@ -674,7 +674,7 @@ static int MakeArgcArgv(char *cmdline,int *argc,char ***argv)
strtok */ strtok */
/* trim all the whitespace off the end of the string. */ /* trim all the whitespace off the end of the string. */
for (i=(signed)strlen(pWorkString)-1; i >=0; i--) for (i=(signed)strlen(pWorkString)-1; i >=0; i--)
if (isspace(pWorkString[i]))
if (isspace((unsigned char) pWorkString[i]))
pWorkString[i] = '\0'; pWorkString[i] = '\0';
else else
break; break;
@ -1395,7 +1395,7 @@ rlead(char *s)
bool has_space = TRUE; bool has_space = TRUE;
for(i=0;s[i] != '\0';i++) for(i=0;s[i] != '\0';i++)
{ {
if(isspace(s[i]) && has_space)
if(isspace((unsigned char) s[i]) && has_space)
{ {
; //Do nothing ; //Do nothing
} }

2
src/xspice/cmpp/mod_yacc.y

@ -138,7 +138,7 @@ local_strcmpi(char *s, char *t)
if (! (*s || *t)) { if (! (*s || *t)) {
return 0; return 0;
} }
return (tolower(*s) - tolower(*t));
return tolower((unsigned char) *s) - tolower((unsigned char) *t);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/

Loading…
Cancel
Save