to accommodate it. Added the strict flag to cbufs, which causes an error
to be generated when a command is not found instead of just warning the
user. GIB buffers have the strict flag set by default.
to prevent conflicts with math expressions. All clients and servers are set
to create buffers with the normal parser. However, scripts ending in .gib
are now executed in a GIB buffer, and the export command can be used to
make specific GIB functions available to normal command buffers (i.e. the
console).
preparation of separating GIB into its own module. Command-related
functions will stay in util, but the buffer handling code and interpreter
will be moved out of cmd.c.
With any luck it should actually work this time. Added the getimpulse
command so that GIB scripts can check if an impulse command is pending
before sending their own. Fixed all the memory leaks I could find.
QuakeC and GIB seem to be clean except for maybe one or two sneaky leaks
I can't track down.
This allows Cmd_Return_f to decide which buffer it should return a value
to. End result: you can put blocks of code with a return statement inside
an embedded command statement. I hope nobody minded me using my
quakeforge.net account to code a bit :P
to start. More will follow. Switched to doubles from floats and allowed
numbers with exponents to be parsed properly. Also changed the number of
significant digits printed to 10. Changed fov so it is now capped at 1,
not 10. The float value of fov is now used instead of int, so more
precision can be attained at small values.
Cmd_TokenizeString since I realized the code was just pulling it apart and
putting it back together. Added Cmd_Argsu to access the unprocessed
command. Added support for else following if in such a way that
if/else if/else structures work. Added support for unary operators in
EXP and added the ! (not) operator. The ifnot command will be kept
for variety.
to GIB. Fixed a bug in dstring_replace that was causing too much data to
be copied when the incoming string was larger than what was being replaced.
Very minor reorganization in cmd.c (1 function moved around I think).
cmd.c should probably get broken up into separate files soon.
add dstring_replace. this replaces a string of lenth rlen at position
pos with data of lenth len, growing, shrinking and shuffling data as
appropriate. At this rate, the dstring `class' will get buffer gap
editing capabilities :)
cmd.c:
Cmd_TokenizeString builds cmd_active_buffer->line again.
Cmd_Process bails out instantly if cmd_active_buffer is a legacy buffer
and uses dstring_replace to modify the parameters in
cmd_active_buffer->line. This last change results in drastic
simplification (and accuracy) of the commandline reconstruction code,
both in Cmd_TokenizeString and Cmd_Process.
handled, meaning that execution can be paused at any time without a hitch.
Warning: This is a major change to the architecture (or lack thereof) of
GIB. Please test for bugs! Also, there are a few ugly bits of code that
need to be cleaned up, but that work for now.