From ff8ea15c096ceebe9b9afdcdd57460c1e2f50b60 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 9 Aug 2002 04:06:17 +0000 Subject: [PATCH] solaris compile fixes --- libs/util/gib_parse.c | 4 ++-- libs/util/gib_process.c | 4 ++-- tools/qfcc/source/type.c | 4 ++-- tools/qfprogs/source/qfprogs.c | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/libs/util/gib_parse.c b/libs/util/gib_parse.c index f3369e95e..64d6b1830 100644 --- a/libs/util/gib_parse.c +++ b/libs/util/gib_parse.c @@ -264,7 +264,7 @@ GIB_Parse_Get_Token (const char *str, unsigned int *i, dstring_t *dstr, qboolean return '\('; } } else { - while (str[*i] && !isspace(str[*i]) && str[*i] != ',') { // find end of token + while (str[*i] && !isspace((byte)str[*i]) && str[*i] != ',') { // find end of token if (str[*i] == '`') { if ((c = GIB_Parse_Match_Backtick (str, i))) { Cbuf_Error ("parse", "Could not find matching %c", c); @@ -373,7 +373,7 @@ GIB_Parse_Tokenize_Line (struct cbuf_s *cbuf) } while (str[i]) { - while (isspace(str[i])) // Eliminate whitespace + while (isspace((byte)str[i])) // Eliminate whitespace i++; if (!str[i]) // Blank token break; diff --git a/libs/util/gib_process.c b/libs/util/gib_process.c index 6625b0670..cb356c7d0 100644 --- a/libs/util/gib_process.c +++ b/libs/util/gib_process.c @@ -55,7 +55,7 @@ GIB_Process_Variable (struct dstring_s *dstr, unsigned int pos, qboolean toleran const char *str; char *p, c; - for (p = dstr->str+pos+1; tolerant ? *p : isalnum (*p) || *p == '_'; p++); + for (p = dstr->str+pos+1; tolerant ? *p : isalnum ((byte)*p) || *p == '_'; p++); c = *p; *p = 0; if ((str = GIB_Var_Get (cbuf_active, dstr->str+pos+1))) @@ -94,7 +94,7 @@ GIB_Process_Variables_All (struct dstring_s *token) dstring_insertstr (var, 0, "$"); n++; } else { - for (n = 1; isalnum(token->str[i+n]) || token->str[i+n] == '$' || token->str[i+n] == '_'; n++); // find end of var + for (n = 1; isalnum((byte)token->str[i+n]) || token->str[i+n] == '$' || token->str[i+n] == '_'; n++); // find end of var dstring_insert (var, 0, token->str+i, n); // extract it } for (m = 1; var->str[m]; m++) { diff --git a/tools/qfcc/source/type.c b/tools/qfcc/source/type.c index ddf03f775..7417ddf95 100644 --- a/tools/qfcc/source/type.c +++ b/tools/qfcc/source/type.c @@ -482,11 +482,11 @@ _parse_type (const char **str) return 0; return new.aux_type; case '[': - while (isdigit (**str)) { + while (isdigit ((byte)**str)) { new.num_parms *= 10; new.num_parms += *(*str)++ - '0'; } - while (isspace (**str)) + while (isspace ((byte)**str)) (*str)++; new.aux_type = _parse_type (str); if (**str != ']') diff --git a/tools/qfprogs/source/qfprogs.c b/tools/qfprogs/source/qfprogs.c index b66dfbf9e..12dc3b4fb 100644 --- a/tools/qfprogs/source/qfprogs.c +++ b/tools/qfprogs/source/qfprogs.c @@ -45,6 +45,8 @@ static const char rcsid[] = #include #include #include +#include +#include #include "QF/cmd.h" #include "QF/cvar.h"