From 0932120a7fea7b002c2e18fb63e4b6479331ca00 Mon Sep 17 00:00:00 2001 From: rlar Date: Tue, 8 Mar 2016 21:26:16 +0100 Subject: [PATCH] special cases of the char variants of the family --- src/winmain.c | 4 ++-- src/xspice/cmpp/mod_yacc.y | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/winmain.c b/src/winmain.c index fb9a81738..ed5ac150d 100644 --- a/src/winmain.c +++ b/src/winmain.c @@ -674,7 +674,7 @@ static int MakeArgcArgv(char *cmdline,int *argc,char ***argv) strtok */ /* trim all the whitespace off the end of the string. */ for (i=(signed)strlen(pWorkString)-1; i >=0; i--) - if (isspace(pWorkString[i])) + if (isspace((unsigned char) pWorkString[i])) pWorkString[i] = '\0'; else break; @@ -1395,7 +1395,7 @@ rlead(char *s) bool has_space = TRUE; for(i=0;s[i] != '\0';i++) { - if(isspace(s[i]) && has_space) + if(isspace((unsigned char) s[i]) && has_space) { ; //Do nothing } diff --git a/src/xspice/cmpp/mod_yacc.y b/src/xspice/cmpp/mod_yacc.y index cd7da266c..bf120cd92 100644 --- a/src/xspice/cmpp/mod_yacc.y +++ b/src/xspice/cmpp/mod_yacc.y @@ -138,7 +138,7 @@ local_strcmpi(char *s, char *t) if (! (*s || *t)) { return 0; } - return (tolower(*s) - tolower(*t)); + return tolower((unsigned char) *s) - tolower((unsigned char) *t); } /*---------------------------------------------------------------------------*/