Bill Currie
912db0336e
clean out the cmdlib crap from quakefs.c and nuke qfcc's last dependency
...
on cmdlib.h (and nuke qfcc's cmdlib.h itself:)
2002-10-30 02:31:29 +00:00
Brian Koropoff
99e18513f0
Added support for escape characters of the form \### where ### is the
...
decimal value of the desired character.
2002-10-26 03:09:38 +00:00
Bill Currie
8b46193e4d
seeking to 1 byte before the beginning of the file doesn't seem to be such
...
a good idea
2002-10-24 22:36:15 +00:00
Brian Koropoff
20d47cde2f
Added the global.delete builtin to clean up old global variables. Updated
...
cb.gib to use it.
2002-10-23 03:56:57 +00:00
Brian Koropoff
9fd055e183
A null ifs now causes every character to be considered a separate field in
...
a for loop. You can now pass a field separator string to a for loop that
will override the value of ifs. Added the field.get command that returns
a single field from a list. It also can take a field separator string that
overrides ifs.
2002-10-22 05:34:59 +00:00
Bill Currie
b345f510fa
provide Hash_Buffer so buffers can be hashed
2002-10-20 03:30:22 +00:00
Brian Koropoff
8c2afef44c
Changed GIB_Arg* into macros. Cleaned up GIB file access a bit and added
...
file.move and file.delete builtins. Added Qremove to quakeio.[ch]. Did
a little cleaning and commenting in gib_parse.c. Added support for \t
and \r escape characters.
2002-10-16 04:59:34 +00:00
Bill Currie
68b41f9b44
make dstring_adjust `grow' in increments of 1024. this should speed up
...
multiple appends nicely.
also create davsprintf and dasprintf to /append/ the printed strings to the
dstring rather than overwriting it as is done with dvsprintf and dsprintf.
2002-10-15 19:52:46 +00:00
Brian Koropoff
72e1ab0c57
Added the sleep console command that waits for a specified amount of time.
...
Note that this isn't a GIB-specific command but is very useful in GIB
threads. Fixed the range GIB command to respect the ifs local variable.
2002-10-13 19:46:47 +00:00
Brian Koropoff
70c1fee4c9
Fixed some missing commas that resulted in garbled cbuf error messages.
2002-10-13 19:18:10 +00:00
Brian Koropoff
8b31103e6f
Var substitution is now handled in the same pass as embedded return values.
...
This prevents var substitution from being performed on the return value
of a function. The local variable ifs can now be set to specify a custom
field separator for use in for loops. file.find will also insert ifs
between file names instead of a space if it is set. file.find will also
no longer put . and .. in a list of file names.
2002-10-13 05:52:06 +00:00
Bill Currie
9f7c669370
various win32 compile fixes for the latest mingw (not fully working due to
...
LPCWAVEFORMATEX)
2002-10-11 20:47:17 +00:00
Brian Koropoff
9c4f2d32ca
Add print and print.center GIB commands and fix a nasty bug with threads
...
that could cause a double free.
2002-10-06 04:40:18 +00:00
Bill Currie
ffb90a510a
win32 compile fixes
2002-09-30 16:40:06 +00:00
Bill Currie
979d885776
get Qseek working properly (d'oh) and Qtell (forgot it needed adjusting)
2002-09-27 05:46:30 +00:00
Bill Currie
9d8d570269
using Qseek on a pak sub-file should work better. this should make oggs in
...
paks work.
2002-09-27 04:27:19 +00:00
Bill Currie
c745d2a868
make gzipped oggs explicitly unsupported
2002-09-26 20:57:48 +00:00
Bill Currie
d25ee82838
provide a tighter accuracy (but slower) _VectorNormalize for the tools
2002-09-25 21:35:49 +00:00
Bill Currie
dd5cac488c
fix a few memory access bugs
2002-09-20 22:44:29 +00:00
Bill Currie
56843557f6
make _VectorCompare use EQUAL_EPSILON (VectorCompare is still the fast
...
macro) and use it instead of VectorCompare in the map tools. This (and, it
seems, RINT) fixes qfbsp on spc. Also, jump /all/ entities that get hit
by the filler in qfbsp
2002-09-20 17:02:53 +00:00
Bill Currie
0cd34d155f
qfbsp now mostly works. only known issue is multiple texture wads don't
...
load properly and possibly a "reached occupant" issue (dunno if it's the
map or qfbsp)
2002-09-19 20:39:33 +00:00
Bill Currie
e8d74f3a26
round off the offsets/sizes again
2002-09-19 15:28:16 +00:00
Bill Currie
24a9b48127
rewrite bspfile.[ch] so they work off an object rather than global data.
...
The direct filesystem access is also removed. Fix up qfvis and qflight to
compile with the new bspfile. qfvis seems to work, qflight probably doesn't
2002-09-19 05:35:17 +00:00
Bill Currie
86f542a971
kill the last VFile ref and make the calculate the file size on opening for
...
reading (Qfilesize works only when Qopen is used in read mode).
2002-09-19 05:11:42 +00:00
Bill Currie
599fea0edb
redo bspfile to use dynamic allocation for the arrays to avoid buffer
...
overflows. also fix up the verbosity levels in qfvis.c
2002-09-18 06:07:38 +00:00
Bill Currie
b8829faac4
bspfile.c:
...
start rewriting for saner code starting with making the private
functions static
cmdlib.[ch]:
win32 compile fixes (remove redundant function)
2002-09-13 15:07:48 +00:00
Brian Koropoff
11293819a5
Comments are now stripped out when a script is loaded instead of during
...
execution.
2002-09-10 01:26:02 +00:00
Ragnvald Maartmann-Moe IV
c4609f5195
Experimentally allow external texture loading. Also prevent loading RGB textures as RGBA, which wastes a lot of texture memory, and looks ugly on 16bpp boards.
2002-09-06 21:37:22 +00:00
Brian Koropoff
b32173db96
GIB: White space at the start of a list in a for loop is ignored. The
...
line where an error occurs in a cbuf is now printed.
2002-08-29 22:12:51 +00:00
Brian Koropoff
85465efb1d
Made for use whitespace as a field separator and nuked list.get until
...
I figure out a standard way to specify a custom field separator.
2002-08-28 23:00:30 +00:00
Brian Koropoff
7cc9f48207
Whoops. I broke looping under some circumstances in GIB. Fixed.
2002-08-28 08:28:05 +00:00
Brian Koropoff
33d132fc4e
Added initial support for newline-delimeted lists to GIB, including a for
...
loop that takes a variable through all elements of such a list.
2002-08-28 08:00:35 +00:00
Brian Koropoff
250a920ae2
Added file access builtins to GIB.
2002-08-27 23:25:52 +00:00
Bill Currie
7adaf456a1
plug a memory leak
2002-08-27 22:13:34 +00:00
Bill Currie
68f607de3c
sanity check the strings to snprintf in open_file as we seem to somehow be
...
getting a stack overflow in there.
2002-08-27 17:53:24 +00:00
Bill Currie
ec47e08e1c
go back to using QFile, quakeio.h and quakefs.h
2002-08-27 07:16:28 +00:00
Brian Koropoff
77445fe3c2
Forgot a newline
2002-08-27 06:46:49 +00:00
Brian Koropoff
98fc04e041
Added threads and callbacks to GIB, as well as several QW callbacks dealing
...
with player status.
2002-08-27 04:47:49 +00:00
Ragnvald Maartmann-Moe IV
cfedb80d1d
Rest of support for qflight/qfvis. bspfile.c and quakefs.c will need cleaning up, compare to previous cvs versions...
2002-08-25 23:10:57 +00:00
Ragnvald Maartmann-Moe IV
46456158e8
Whitespace.
2002-08-25 04:47:57 +00:00
Brian Koropoff
876eaa467c
Added a few useful builtins and began adding GIB hooks into quakeworld.
...
The player global branch variable is now updated with useful information
and the location.get builtin is available to return the current location
of the player based on loc files. Fixed a bug with zooming out in zoom.gib.
2002-08-24 05:14:46 +00:00
Brian Koropoff
32f4e53aa5
Fixed the GIB math evaluator to handle unary operators properly, made
...
indexing/clipping more like python, made some cosmetic changes to zoom.gib,
and added the ability for GIB builtins to return values.
2002-08-23 21:18:00 +00:00
Ragnvald Maartmann-Moe IV
d757c10f07
Only need one define for R_Cull*
2002-08-23 20:46:19 +00:00
Brian Koropoff
5e9330ca21
Cleaned up the return builtin and made variable stripping ([foo:bar])
...
more robust.
2002-08-23 07:45:46 +00:00
Ragnvald Maartmann-Moe IV
6e8bd2aeb0
defines and ifdefs for R_CullSphere, just like R_CullBox.
2002-08-23 07:04:29 +00:00
Brian Koropoff
0715464bb1
Yay for escape characters.
2002-08-22 22:43:47 +00:00
Brian Koropoff
06e6c92da8
Fixed some bugs related to comments and global variables. Updated zoom.gib
...
to work with the new GIB parser. It should be fully functional.
2002-08-22 20:50:12 +00:00
Bill Currie
9f1cedf812
don't seg if given a null table (ie, no vars in this context)
2002-08-22 16:20:06 +00:00
Bill Currie
42c03bb9e1
fix an out-by-one error that was causing segfaults for single line commands
...
ending with a // comment
2002-08-21 22:52:29 +00:00
Bill Currie
c12518de26
windows knows only a subset of the signals
2002-08-21 01:51:27 +00:00
Bill Currie
5009213564
Move the signal handling code from video/targets/* to sys.c (I'm leaving
...
the SDL target files for Despair since he's working on the currently). Also
make progs segfault handling much more robust (and general: sigill etc too:)
2002-08-20 23:04:57 +00:00
Bill Currie
c927b2e834
quakefs.c:
...
allow . and .. in a path so long as the result doesn't escape from the
game directory
cl_menu/Makefile.am:
don't strip source paths
optoins.qc:
use InputLine object
def.c:
use notice to show stray temps
emit.c:
make sure expression args get emitted for function calls
expr.c:
'C' is a cast
rewrite cast_expr to handle casted pointere derefs
2002-08-20 06:11:10 +00:00
Ragnvald Maartmann-Moe IV
c91f1a2aea
Rename Length to VectorLength.
2002-08-20 02:22:40 +00:00
Bill Currie
451eaba2e1
change the value type for MSG_Write(Byte|Short|Long) from unsigned int to
...
int to avoid float -> unsigned int conversion problems
2002-08-19 01:58:01 +00:00
Bill Currie
3431b7ce82
float -> unsigned int needs to pass though int otherwise we lose the negative
...
range on the ps2 (nasal demons:)
2002-08-19 00:05:51 +00:00
Bill Currie
f753dd82ae
put \n on some error messages
2002-08-15 19:06:21 +00:00
Bill Currie
141df55965
zap some FIXMEs
2002-08-14 20:01:23 +00:00
Brian Koropoff
513b5737f9
Got indexing into variables working and cleaned up variables a bit.
...
Partially translated zoom.gib into the new language, but it isn't done yet.
2002-08-14 05:28:07 +00:00
Bill Currie
ff8ea15c09
solaris compile fixes
2002-08-09 04:06:17 +00:00
Brian Koropoff
0390fe22ce
Added tree variables (blah.1, blah.2, blah.1.foobar, etc), global variables,
...
made var substitution more robust, and began adding proper comments to
the code.
2002-08-08 09:20:00 +00:00
Bill Currie
c05db51069
add Qputs
2002-08-07 18:43:35 +00:00
Bill Currie
e171146582
Make Sys_Error repeat it's message to stderr to increase the changes of the
...
error being seen. (Closes : #39 )
2002-08-07 15:31:56 +00:00
Brian Koropoff
5c60be3a49
If and while now work, and embedded commands use backticks instead of <> now
...
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).
2002-08-07 06:17:50 +00:00
Brian Koropoff
666c3fce07
Embedded commands now work without any bugs I can detect. Next up are
...
loops, branching, and getting the tokenizer to give special treatment
to certain builtin functions. But first I should get some sleep :)
2002-08-06 08:15:20 +00:00
Brian Koropoff
bdd0f69f17
Declared variable in the wrong spot. Don't know why gcc 3 accepted it.
2002-08-05 05:58:17 +00:00
Brian Koropoff
87f0f480e4
Local variables work, preparing to get embedded commands done.
2002-08-05 00:01:06 +00:00
Brian Koropoff
cf48363c6e
More of GIB done: builtins, functions, various cleanups, math, etc.
2002-08-03 06:04:00 +00:00
Bill Currie
c5192540c8
remove an accidental commit
2002-08-03 01:29:26 +00:00
Brian Koropoff
3c3844d2ac
Checked in the beginnings of GIB mark III and modified qw-server to use
...
it for its console.
2002-08-02 04:07:25 +00:00
Bill Currie
4bd940e619
d'oh
2002-08-02 03:26:55 +00:00
Bill Currie
5f4c21d796
casting from (signed) char to int does not one whit of good towards avoiding
...
the problems associated with signed chars being used to index arrays. must
cast to usigned char so the bit expansion is done on an unsigned value to
avoid the sign extension.
2002-08-02 03:22:32 +00:00
Bill Currie
2ce0f2ded2
we now require modern autoconf (2.52+), automake (1.6+) and libtool (1.4+).
...
This gives us a bunch more flexibility. plugins no longer have the "lib"
prefix or the version suffix, they're now installed in
$fs_sharepath/QFplugins,, builds should take much less time (in general,
only one of pic or non-pic versions are build), bins and libs can have
individual CFLAGS
2002-08-01 19:49:10 +00:00
Bill Currie
612f5c2a31
attempt to fix the win32 server input
2002-08-01 04:49:16 +00:00
Brian Koropoff
4e85063b52
Added support for execution stacks, misc. cleanups.
2002-08-01 02:42:19 +00:00
Brian Koropoff
a93b221272
Split off the old console parser into idparse.[ch] and prepared the cbuf
...
struct and support functions for GIB mark III.
Oh yeah, I'm back.
2002-07-31 22:03:53 +00:00
Bill Currie
0bb6769204
fix the non-parsing of quakeforge.conf
2002-07-31 06:06:44 +00:00
Bill Currie
ad6e025a91
take cmd.[ch] back to basics. the gib code is temporarily gone pending
...
renovations. cmd_source handling is a little hacky in nq, but it's working.
2002-07-31 05:19:03 +00:00
Bill Currie
021decc7bd
start on the cleanup of cmd.c. these aren't used yet, but the parsing is
...
working
2002-07-30 17:08:53 +00:00
Bill Currie
46ee46fdc6
dead code removal
2002-07-30 04:55:33 +00:00
Bill Currie
b9d364d7b7
whitespace clean up
2002-07-30 02:06:37 +00:00
Bill Currie
e0aa405e76
remove some dead code
2002-07-30 01:56:07 +00:00
Bill Currie
d00ed9619f
give dstring_adjust a prototype and fix up some whitespace
2002-07-29 19:52:19 +00:00
Bill Currie
01228a8be0
set the file mode before seeking
2002-07-27 06:42:52 +00:00
Bill Currie
b3d6875e61
_vsnprintf doesn't like a null pointer in windows
2002-07-27 02:00:06 +00:00
Bill Currie
acf9ce392c
move pakfile.[ch] into libQFutil and make quakefs.c use it instead of its
...
own code. This also removes the evil pak file count limit :)
2002-07-21 06:11:28 +00:00
Bill Currie
91dc5b20db
nuke MSG_ReadChar. Other than the sign extention, it's redundant and nothing
...
a suitable typecast can't take care of.
2002-07-02 19:15:29 +00:00
Ragnvald Maartmann-Moe IV
5e5fdb7bc2
Kill MSG_WriteChar.
2002-07-02 19:13:53 +00:00
Ragnvald Maartmann-Moe IV
a6d999dfa4
Speed up most of the MSG_Write* functions by reducing the number of times SZ_GetSpace gets called.
2002-06-28 04:48:07 +00:00
Ragnvald Maartmann-Moe IV
fd1ded5c4a
Add r_nearclip and r_particles_nearclip. Also put some limits on r_farclip. And fix id's insane max and min float, and some minor improvements in frustum setup in GL.
2002-06-26 22:20:12 +00:00
Ragnvald Maartmann-Moe IV
c8bc5dfb4c
QSG2 glows almost working. Plus lots of typos killed.
2002-06-18 21:41:24 +00:00
Bill Currie
f2f6041e05
at long last, vorbis support :) load time only, though, so not yet suitable
...
for huge samples.
Also, change the file search order so that .gz is checked before the
requested file.
2002-06-14 20:36:28 +00:00
Bill Currie
e774943f24
va.[ch]:
...
new va function: nva which returns a strduped buffer
expr.c options.c:
use nva instead of strdup (va (...
struct.c type.c:
make type encoding work properly for structs
2002-06-13 16:39:33 +00:00
Brian Koropoff
0d2bd0ca77
Finally added a file_read command.
2002-06-13 05:58:48 +00:00
Brian Koropoff
fe48995a0c
Fixed some error messages and a small bug in list.gib
2002-06-11 06:08:31 +00:00
Brian Koropoff
b70ffbf871
Fixed a warning message. Changed writefile to file_write. Added file_find
...
which searches a directory for files matching a pattern and returns a \n-
separated list.
2002-06-10 22:03:51 +00:00
Bill Currie
3de07df3d2
*sigh*, I'm having a real problem this morning :P
2002-06-07 15:11:59 +00:00
Bill Currie
c0888ae8e4
I really hate the way cvs won't let you undo a poorly thought out removal
2002-06-07 15:09:57 +00:00
Bill Currie
ebfdbd9285
the fpu manipulation stuff seems to be better off in the one place that
...
actually uses it...
2002-06-07 15:09:20 +00:00
Bill Currie
0f9adc182d
win32 compile fixes
2002-06-04 16:17:10 +00:00
Jeff Teunissen
1ba994fd13
This is a test hack, to see if chopping off some of the integer realtime's
...
data helps in lengthening the amount of time a server can be up without Weird
Stuff(tm) happening.
2002-06-03 23:29:34 +00:00
Bill Currie
4039452297
more sys cleanup. server consoles may be broken for non-curses.
2002-06-03 19:11:48 +00:00
Bill Currie
0f94fd64e7
blah, forgot to #ifdef them :P
2002-06-03 17:26:09 +00:00
Bill Currie
54b299a7e2
set the type and size of the fpu control word vars
2002-06-03 17:04:47 +00:00
Bill Currie
ad08ff7492
there, finally got it right. ugh
2002-06-03 06:01:19 +00:00
Bill Currie
3ffec9e8c1
d'oh, forgot to set up my GOT base register in all the functions :P
2002-06-03 04:58:42 +00:00
Bill Currie
07c7c05f64
finish making sys_ia32.S PIC friendly
2002-06-03 04:06:25 +00:00
Bill Currie
f00e892d4e
mingw gcc 3.1 is freaking weird
2002-06-02 05:27:32 +00:00
Bill Currie
321dbc87d2
missed a couple of global accesses
2002-06-02 04:07:18 +00:00
Brian Koropoff
13d6898fe0
Changed aliases to be handled by the command registering system in
...
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.
2002-06-01 22:13:14 +00:00
Bill Currie
9630a23391
more Sys_* cleanup
2002-06-01 03:00:13 +00:00
Bill Currie
fc0bb7e175
move Sys_DebugLog
2002-05-31 22:50:43 +00:00
Brian Koropoff
d85a238af2
Modified cmd.c to prepare for more file access functions and changed
...
the bind system to keep a restricted flag on binds to prevent the
server from executing restricted commands by binding them to keys.
2002-05-31 05:38:06 +00:00
Bill Currie
9134e05aec
return lists of multiple matching elements
2002-05-30 21:56:57 +00:00
Bill Currie
a7b5b56a2c
implement Z_Realloc, PR_Zone_Realloc and pr_obj_realloc
2002-05-29 20:58:53 +00:00
Brian Koropoff
8025dfd2ce
"runLength-- > 0" made runLength negative, even though the test failed.
...
Skins should work again.
2002-05-28 23:34:02 +00:00
Bill Currie
9b7b059d5c
speed up LoadPCX a bit
2002-05-28 06:05:36 +00:00
Bill Currie
6fbf011073
rpm building fixes
2002-05-27 20:28:10 +00:00
Bill Currie
25ebab2e09
only call Cbuf_ExecuteStack when the buffer has anything to execute. this
...
gives an ~1.1% boost to overkill.
2002-05-23 05:42:51 +00:00
Bill Currie
1b550c80b1
finally get Sys_Error `right'
2002-05-21 21:03:46 +00:00
Brian Koropoff
25969dbad7
Added a temporary hack to make quake.rc, config.cfg, and default.cfg work
...
in some mods that would generate mismatched quotes otherwise.
2002-05-21 02:02:20 +00:00
Brian Koropoff
347962cc33
Fixed a bug introduced by my optimizations.
2002-05-19 06:32:57 +00:00
Brian Koropoff
967d39541a
Optimized GIB a bit.
2002-05-17 21:38:37 +00:00
Brian Koropoff
4cb3a5087b
Whoops. Fixed some GIB bugs.
2002-05-15 22:39:37 +00:00
Brian Koropoff
58e8a997f8
GIB: Added the writefile, legacy and eval commands and created the
...
beginnings of a GIB security model for console access by the server.
Fixed a bug in zoom.gib.
2002-05-15 22:14:17 +00:00
Bill Currie
6a5bbf6f0a
memory allocation checking cleanup
2002-05-14 06:37:28 +00:00
Bill Currie
1e0611e156
Sys_Error now makes sure all messages are terminated with a \n
2002-05-14 06:14:53 +00:00
Bill Currie
44dcf74627
strip the \n from all(?) of the Sys_Error calls (Sys_Error itself will be
...
adding \n).
2002-05-14 06:12:29 +00:00
Brian Koropoff
09366866f7
GIB segfault fix
2002-05-12 20:28:19 +00:00
Brian Koropoff
f6697e0ef0
Fixed an oversight in Cmd_FreeBuffer in GIB and made a few misc. fixes
2002-05-11 20:44:59 +00:00
Brian Koropoff
6d37a9e48a
Fixed up zoom.rc, renamed it to zoom.gib. Made alias with only one
...
argument print the contents of that alias. Added the sleep command,
which works like wait but pauses for a certain number of seconds.
2002-05-11 06:09:50 +00:00
Brian Koropoff
56d033efa4
Auditted cmd.h and cmd.c to fix a bug, a few bits of useless code, and to
...
add some preliminary comments about all the functions. I also rearranged
a lot of the functions to be more logically grouped.
2002-05-11 03:00:14 +00:00
Brian Koropoff
3fffa26fb4
Added thread support to GIB and cleaned up escape characters yet again.
...
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.
2002-05-11 00:36:12 +00:00
Brian Koropoff
e4f740bf02
Buffers created for embedded commands are now marked with a special flag.
...
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
2002-05-09 20:12:12 +00:00
Brian Koropoff
4074999b9b
Numerous enhancement and fixes to GIB, including index ranges, fixed
...
escape characters, and more.
2002-05-08 23:01:07 +00:00
Bill Currie
93febb90c9
search for .gz first
2002-04-30 04:39:03 +00:00
Brian Koropoff
601736719d
Fixed the use of double quotes in chat messages and removed single quotes
...
as an option to enclose tokens.
2002-04-29 01:04:29 +00:00
Brian Koropoff
ff901a312f
Added argument-list functions to EXP with trig and inverse trig functions
...
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.
2002-04-28 08:30:54 +00:00
Brian Koropoff
7121891895
Fixed Cmd_If_f so that embedded commands work again.
2002-04-26 22:09:28 +00:00
Bill Currie
9399b35b02
alpha compile fix
2002-04-26 17:15:00 +00:00
Bill Currie
45e98d80d9
redo the cvar vector reading code to produce more useful results
2002-04-25 20:08:18 +00:00
Bill Currie
ce1c2e0bd1
sort the sources list
2002-04-25 19:39:26 +00:00
Brian Koropoff
bf323c3f0a
Cleaned up Cmd_Args. It is no longer uselessly built up in
...
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.
2002-04-24 22:33:04 +00:00
Brian Koropoff
7f295d61ee
Added the getserverinfo command to return the value of a server info key
...
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.
2002-04-23 07:47:24 +00:00
Brian Koropoff
349fbf7150
Fixed a bug with escaped braces and quotes and added the strlen and streq
...
commands to GIB.
2002-04-22 04:23:36 +00:00
Bill Currie
4ccc9d6322
dstring.c dstring.h:
...
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.
2002-04-19 22:54:27 +00:00
Bill Currie
ef81af9245
the "two birds with one stone" commit
...
1) when /not/ building static plugins, the plugin info name is, once again,
PluginInfo, but is still type_name_PluginInfo for static plugins. This
allows plugins to be symlinked (highly desirable for the debian packages,
and likely others). This also requires plugins to /not/ be loaded with
RTLD_GLOBAL.
2) because of 1, snd_alsa_0_9 has to explicitly load libasound itself. This
just happens to fix my segfault on shutdown in RedHat 6.2.
2002-04-19 20:08:54 +00:00
Brian Koropoff
4cb89c69b2
Moved commands from bound keys into a separate buffer, changed the syntax
...
of for loops to be like that of C, changed math expressions to be
enclosed in #{} instead of #().
2002-04-17 07:05:43 +00:00
Brian Koropoff
fafb014bbe
Oops. Fixed a stupid bug that broke having more than one embedded command
...
in a token.
2002-04-17 01:15:10 +00:00
Brian Koropoff
cb79de3584
Completely redid the way embedded functions are subroutines in general are
...
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.
2002-04-16 23:56:21 +00:00
Bill Currie
55a5c39187
Turns out that on PPC, va_list is an array (effectivly typedef struct
...
__va_list_tag va_list[1];) which causes grief when attempting to reuse
va_list variables (eg, in vsnprintf retry loops). This is the reason for
MisterP's crashes as the pointers in va_list no longer point to valid data.
acinclude.m4:
shamelessly steal the va_list, va_copy and __va_copy macros from
cdda2wav but modified so AC_DEFINE includes the description (so
acconfig.h can remain gone)
configure.ac:
use AC_TYPE_VA_LIST, AC_FUNC_VA_COPY and AC_FUNC_VA__COPY
dstring.c:
stash the incoming va_list args in a temp var before calling vsnprintf
then restore them each time before retrying, but only if va_list is an
array (hopefully this is ok for when va_list is a structure)
2002-04-15 22:17:02 +00:00