mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +00:00
solaris compile fixes
This commit is contained in:
parent
b5783866ad
commit
ff8ea15c09
4 changed files with 8 additions and 6 deletions
|
@ -264,7 +264,7 @@ GIB_Parse_Get_Token (const char *str, unsigned int *i, dstring_t *dstr, qboolean
|
||||||
return '\(';
|
return '\(';
|
||||||
}
|
}
|
||||||
} else {
|
} 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 (str[*i] == '`') {
|
||||||
if ((c = GIB_Parse_Match_Backtick (str, i))) {
|
if ((c = GIB_Parse_Match_Backtick (str, i))) {
|
||||||
Cbuf_Error ("parse", "Could not find matching %c", c);
|
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 (str[i]) {
|
||||||
while (isspace(str[i])) // Eliminate whitespace
|
while (isspace((byte)str[i])) // Eliminate whitespace
|
||||||
i++;
|
i++;
|
||||||
if (!str[i]) // Blank token
|
if (!str[i]) // Blank token
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -55,7 +55,7 @@ GIB_Process_Variable (struct dstring_s *dstr, unsigned int pos, qboolean toleran
|
||||||
const char *str;
|
const char *str;
|
||||||
char *p, c;
|
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;
|
c = *p;
|
||||||
*p = 0;
|
*p = 0;
|
||||||
if ((str = GIB_Var_Get (cbuf_active, dstr->str+pos+1)))
|
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, "$");
|
dstring_insertstr (var, 0, "$");
|
||||||
n++;
|
n++;
|
||||||
} else {
|
} 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
|
dstring_insert (var, 0, token->str+i, n); // extract it
|
||||||
}
|
}
|
||||||
for (m = 1; var->str[m]; m++) {
|
for (m = 1; var->str[m]; m++) {
|
||||||
|
|
|
@ -482,11 +482,11 @@ _parse_type (const char **str)
|
||||||
return 0;
|
return 0;
|
||||||
return new.aux_type;
|
return new.aux_type;
|
||||||
case '[':
|
case '[':
|
||||||
while (isdigit (**str)) {
|
while (isdigit ((byte)**str)) {
|
||||||
new.num_parms *= 10;
|
new.num_parms *= 10;
|
||||||
new.num_parms += *(*str)++ - '0';
|
new.num_parms += *(*str)++ - '0';
|
||||||
}
|
}
|
||||||
while (isspace (**str))
|
while (isspace ((byte)**str))
|
||||||
(*str)++;
|
(*str)++;
|
||||||
new.aux_type = _parse_type (str);
|
new.aux_type = _parse_type (str);
|
||||||
if (**str != ']')
|
if (**str != ']')
|
||||||
|
|
|
@ -45,6 +45,8 @@ static const char rcsid[] =
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/fcntl.h>
|
#include <sys/fcntl.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
#include "QF/cmd.h"
|
#include "QF/cmd.h"
|
||||||
#include "QF/cvar.h"
|
#include "QF/cvar.h"
|
||||||
|
|
Loading…
Reference in a new issue