structure to help tidy the command buffer struct up a bit, fixed a few
bugs and probably created 100 more. A lot of things were changed to
allow embedded commands:
- Old buffers on the stack are left alone for Cbuf_ExecuteStack to
clean up. This is so return values can be extracted from them.
- The imperative flag has been added. An imperative buffer and all buffers
following it can not be paused with the wait command.
- The returning flag and retval dstring have been added. If a buffer
returned something, the flag will be set.
- The return command was added so there was something to use in the
substitution. Return nukes all loop buffers since they don't really count
as independent functions, sets the return value on the top buffer, and
clears it.
- Who knows what else.
now recycled, not freed. Fixed some bugs in exp.c. Ready to add embeded
functions (read: function calls with return values) and for loops.
Probably some other misc. fixes, I tend to go on debugging streaks.
Made noskins a archived var.
Added a network menu.
-> just realized, that menu-code is still to blown
and still sucks too much. i am thinking about a
more templated menu-code. (tanwha: i will design something nice ;)
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.