Commit Graph

30 Commits

Author SHA1 Message Date
Bill Currie 851d203916 work towards a more secure qfs 2003-02-14 22:36:10 +00:00
Bill Currie 6a687f5e45 rename all the globals in quakefs.[ch] to be QFS_* or qfs_* 2003-02-14 19:46:07 +00:00
Brian Koropoff 3c522a83bc Various cleanups and bugfixes. Added proper line number reporting to
errors.  A few new builtin functions, such as slice::find and thread::list.
2003-02-14 08:06:01 +00:00
Brian Koropoff b0e6f46b7e GIB: Even more bugfixes. 2003-01-31 05:22:20 +00:00
Bill Currie fdb74e1aba win32 doesn't like random 2003-01-31 04:40:40 +00:00
Brian Koropoff 47d35f3e2d GIB: Added ifnot, fixed several bugs, updated zoom.gib yet again. 2003-01-31 03:43:56 +00:00
Brian Koropoff 580ca17546 GIB: Added proper reference counting on parse trees, got threads working
again, added a few new builtins and renamed some others, made misc. fixes
and enhancements.
2003-01-30 23:26:43 +00:00
Brian Koropoff 1f5cabcba9 A few GIB bugfixes, cleanups, and enhancements. Still more to come. 2003-01-29 04:34:23 +00:00
Brian Koropoff 59fbd48a81 Overhauled GIB to parse scripts in advance, among other design and language
changes.  There still remains some bugs to be squashed, a feature or two to
add, and some polishing to be done.  However, it seems to be in a workable
state.
2003-01-28 21:16:21 +00:00
Bill Currie 761a7546dd re-arrange things so __attribute__ and __builtin_expect are properly
autoconfiscated so rcsid will continue to work with gcc 3.3
2003-01-15 15:31:36 +00:00
Bill Currie 71196fedf6 make gcc more anal about prototypes, string constants and function
visibility (ie, global functions must have a prototype)
2003-01-06 18:28:13 +00:00
Brian Koropoff c522970a88 Added a GIB event system for registering GIB callback functions to be
started when a named event occurs.  Added a few test events to the qw
client and server.  Cleaned up the range GIB builtin a bit.
2003-01-03 04:30:38 +00:00
Bill Currie b8216807fe fix a warning 2002-12-14 01:56:37 +00:00
Brian Koropoff 32e5e6ef0b Numerous GIB bug fixes and optimizations. Fixed/updated some GIB scripts
as well.
2002-12-13 23:36:05 +00:00
Brian Koropoff 74ee0cfd0e Changed the behavior of field::get with a null field separator to match
that of for loops.  Added support for var++, var--, var += foo, var -= foo,
var *= foo, and var /= foo.
2002-12-10 00:04:15 +00:00
Brian Koropoff 91266619f3 Added the sqrt and abs math functions and the continue GIB builtin. I
changed where a loop program gets copied back into its buffer so that the
continue builtin would work.
2002-12-08 20:55:40 +00:00
Brian Koropoff 714f2ced4c Fixed several GIB bugs, optimized Cbuf_Execute_Stack a bit, changed QW
clients to use a separate buffer for stufftext commands.
2002-12-01 07:22:42 +00:00
Brian Koropoff a62a92c1be Fixed regex::extract to start at the correct argument when setting the
value of variables.
2002-11-21 00:20:39 +00:00
Brian Koropoff 854f6d9054 Created gib_regex.[ch] to manage regular expressions in GIB. Regexs are
now cached and only recompiled when compile flags change.  Changed regex
builtins to take an options string argument after the regular expression.
2002-11-19 06:24:29 +00:00
Brian Koropoff 0e0d8bd542 Added support for enclosing embedded commands in $() and cleaned up the
parser a bit to accomodate this.  Backslashes in double quotes are now only
removed if they escape a character that can't be written normally, or
another backslash.  Removed start position support from string::findsub
since variable slices can be used instead.  Added support for regular
expressions in the form of regex::match, regex::replace, and
regex::extract.  Checked in regex.c from GNU regex 0.12 for platforms that
do not have regex functions in their standard library. Two minor changes
were made to this file to fix gcc warnings.  Prepared the path transform
function for a change to a filesystem rooted at fs_userpath instead of the
current gamedir, but these changes are commented out pending security
considerations.
2002-11-19 04:15:36 +00:00
Brian Koropoff acbd838b09 Fixed a format string and added a cast to some pointer arithmetic. This
fix compile problems on non-intel archs.
2002-11-17 00:12:14 +00:00
Brian Koropoff d4b1c74866 Added the string::findsub builtin. Added a reset function to the cbuf
interpreter struct so that custom cbuf data can be reset after an error.
This fixes a bug where GIB would think it was still waiting for a return
value after an error occurred in an embedded command.
2002-11-16 20:56:04 +00:00
Brian Koropoff ac8169ba54 Changed file::find to take the path and glob as one argument. Made some
miscellaneous file access cleanups.
2002-11-16 03:52:07 +00:00
Bill Currie f26ec7377c fix an uninitialized variable 2002-11-16 02:03:39 +00:00
Brian Koropoff 78785a90f8 Added a primitive interactive mode to carne and modified the file::read
GIB builtin to use Qopen instead of COM_LoadHunkFile.  This makes it work
properly in carne.
2002-11-15 23:27:07 +00:00
Brian Koropoff 625e1e36d6 Added Sys_PathType, which reports whether a path is absolute, relative
below, or relative above (uses .. to ascend the filesystem). Changed
file functions in GIB to use this.  GIB can now be initialized in a
non-sandboxed mode, which at the moment means that GIB scripts run with
carne can access the entire filesystem.
2002-11-14 05:28:54 +00:00
Brian Koropoff 7b0c24a386 Added carne, the stand-alone GIB interpreter. Made a few changes to GIB
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.
2002-11-14 02:10:55 +00:00
Brian Koropoff 0f71b02fd7 Changed the name of GIB builtins from string.length to string::length, etc.
Made a few miscellaneous cleanups and enhancements to builtins and changed
all the GIB scripts in CVS to reflect the new naming conventions.
2002-11-11 01:57:34 +00:00
Bill Currie 498bdcc406 compile fixes for alpha linux 2002-11-10 02:50:42 +00:00
Brian Koropoff b40400d59c Moved GIB into libs/gib and made util no longer depend on it. Cleaned up
some cruft from a previous incarnation of GIB.
2002-11-09 07:13:52 +00:00
Renamed from libs/util/gib_builtin.c (Browse further)