mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
A few cleanups, and made assignment/incremement/decrement operations
return a value.
This commit is contained in:
parent
8a2fbf43a7
commit
091e9d3f3d
1 changed files with 8 additions and 4 deletions
|
@ -334,7 +334,7 @@ GIB_Parse_Get_Token (const char *str, unsigned int *i, dstring_t *dstr, qboolean
|
|||
return 0; // Parse error
|
||||
} else {
|
||||
dstring_insert (dstr, 0, str+n+!include_delim, *i-n+1-!include_delim-!include_delim);
|
||||
return '\(';
|
||||
return '(';
|
||||
}
|
||||
} else {
|
||||
while (str[*i] && !isspace((byte)str[*i]) && str[*i] != ',') { // find end of token
|
||||
|
@ -463,7 +463,6 @@ GIB_Parse_Tokenize_Line (struct cbuf_s *cbuf)
|
|||
delim = GIB_Parse_Get_Token (str, &i, arg, noprocess == 1);
|
||||
if (!delim)
|
||||
break;
|
||||
Sys_DPrintf("Got token: %s\n", arg->str);
|
||||
if (delim != ' ') // Move into whitespace if we haven't already
|
||||
i++;
|
||||
|
||||
|
@ -517,13 +516,16 @@ GIB_Parse_Execute_Varexp (cbuf_t *cbuf)
|
|||
case '-':
|
||||
newval--;
|
||||
}
|
||||
GIB_Var_Set (cbuf, args->argv[0]->str, va("%.10g", newval));
|
||||
s = va("%.10g", newval);
|
||||
GIB_Var_Set (cbuf, args->argv[0]->str, s);
|
||||
GIB_Return (s);
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
} else if (args->argc == 3 && strlen(args->argv[1]->str) <= 2 && strchr(args->argv[1]->str, '=')) {
|
||||
s = args->argv[1]->str;
|
||||
if (*s == '=') {
|
||||
GIB_Return (args->argv[2]->str);
|
||||
GIB_Var_Set (cbuf, args->argv[0]->str, args->argv[2]->str);
|
||||
return true;
|
||||
} else if (s[1] == '=') {
|
||||
|
@ -548,7 +550,9 @@ GIB_Parse_Execute_Varexp (cbuf_t *cbuf)
|
|||
default:
|
||||
return false;
|
||||
}
|
||||
GIB_Var_Set (cbuf, args->argv[0]->str, va("%.10g", newval));
|
||||
s = va("%.10g", newval);
|
||||
GIB_Return (s);
|
||||
GIB_Var_Set (cbuf, args->argv[0]->str, s);
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue