Made variable substitution recursive, so ${${foo}} will be the value of
the variable whose name is contained in foo. Added setl command to
manipulate local variables. The only other place they can be used is in
variable substitution.
buffers to be linked into execution stacks and changed aliases and script
files to be run in a new stack frame. Cbuf_Execute executes the stack from
the top down, so wait commands are handled properly.
within braces, and put support for comments back in (oops). To use math
evaluation, put a math expression inside $(). If you have spaces in your
expression, you'll need to enclose the entire thing in quotes so it doesn't
get split up into multiple tokens.
won't be processed except for escape characters, so that escaped braces
can be used within. If an uneven number of curly braces are within a
token, it will be misparsed, so escaped braces are important if you
don't want them to be considered in the parsing of the token. Ideally,
braces within quotes within braces should not need to be escaped, but this
would require a redesign of the parser to be recursive. Maybe I will do
this later.
without considering that realloc could result in dstr->str being
changed. Also made variable substitution of non-existant variables be
replaced with a null string rather than being left alone, to prevent
errors in scripts from causing weirdness as strings get passed through
the parser several times.
normal quotes and made it so executed files are always inserted into the
console buffer so that class config files in TF can use the new parser
features, even though the exec command is run in the legacy buffer
and it will get replaced with the ith argument to the alias, 0 being the
name of the alias itself. %% will get replaced by %, out of range
numbers will simply be removed, and non-numbers will be ignored.
Changed Cmd_TokenizeString to accept a flag that controls the application
of filters (tags, variables, escape characters) to the tokens and modified
a few places in the source that called it. Added a secondary command
buffer that is parsed without filters for legacy command support.
Currently, it is only used for commands stuffed into the console from the
server. It is hacky, and I hope to eventually generalize the console
interface to support any number of buffers and audit the rest of the code
to recognize it. For now, the legacy buffer at least keeps escape
character parsing from destroying info strings.
generally cleaned the parser up. If a line begins with |, it will be
stripped off by the tokenizer and no tags or escape characters will be
processed. Commands stuffed into the console from the server are prepended
with | to ensure backward compatibility. This can also be used anywhere
backward compatibility is needed, such as where info strings are stuffed
into the console, or as an alternative to using escape characters in the
entire string.
console command parser. It will eventually include html-like tags for
modifying text (gold numbers, brown characters, etc) and escaped characters.
The major differences so far are that dynamic strings are now used instead
of static buffers, and single quotes can be used to enclose tokens as
well as double quotes.
like normal, f_skins reports the average percent fullbright for all loaded
skins, and f_skins skinname reports the fullbright percent for a signle
skin. cl_freply controls the time in seconds before another query can be
made. Set it to 0 to disable them. More queries will be added later.
The table for accessing special characters from the console has been
tweaked a bit. Expect it to get tweaked more in the future.
(Sys_DPrintf is new) is now used exclusively for all lib printing. Con_Init
sets the sys printf recirection to Con_Print (which has been revamped
appropriatly) and the server sets it to SV_Print (which was SV_Printf and
the new SV_Printf calls /it/). This should fix the rcon print redirection
issues.
api change: Cmd_Args () now takes a parameter inidcating which arg to
start at for grabbing the un-parsed command line
qw/source/sv_ccmds.c:
implement kk's tell command and user name matching (though # is used for
the wildcard and it's still case sensitive)
everything else:
adjust for the new Cmd_Args protype
quakeio.h -> vfile.h
More diff reduction between trunk and my VFS code. Also took the time to
put some headers in order and fix a few #include's pointed out by moving
things around a bit.
remove includes of qdefs.h and compat.h
pr_comp.h:
merge pr_comp.h from quake and qfcc, removing the copy in qfcc
cmdlib.[ch]:
nuke the endian code.
qendian.c:
initialise the LittleLong etc pointers at compile time rather than run
time
com.c (both nq and qw):
nuke the LittleLong etc init code
everything else:
fix up after the qtypes.h cleanup
slight api change: the getkey and free functions now take a user data
parameter (which is an aditional parameter to Hash_New.
cmd.c, cvar.c, quakefs.c:
clean up the resulting errors.
pr_edict.c:
use hash tables for lookups of function, global and field definitions.
should speed things up a bit, ESPECIALLY when type checking is enabled.