Commit graph

3937 commits

Author SHA1 Message Date
Bill Currie
d78f34e795 fix some spelling errors 2002-11-20 21:21:22 +00:00
Bill Currie
261dcfe2a3 FreeBSD patch from q (see what happens for the other BSDs) 2002-11-20 17:20:52 +00:00
Bill Currie
c0fbd45968 d'oh, I forgot pthread_attr_setstacksize took two arguments. hope this still
works
2002-11-20 02:15:32 +00:00
Timothy C. McGrath
630a762239 Taniwha fixed a problem for me - gcc on my ps2 at least when -pthread
isn't a valid option does not bomb out with a error status so this is
the workaround.

Tim McGrath (Hikaru/Misty/Misty-chan)
2002-11-20 01:27:03 +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
Bill Currie
1251cbda9e gee, you'ld think gnu would get pointer <-> int portability right :P 2002-11-19 05:40:04 +00:00
Bill Currie
599b51b542 hmm, hadn't noticed "stdint.h" 2002-11-19 05:03:42 +00:00
Bill Currie
ac8acaacd7 need limits.h 2002-11-19 05:02:57 +00:00
Bill Currie
63dfd5e523 MAXINT isn't as portable as one would like 2002-11-19 05:01:39 +00:00
Bill Currie
a17673bb69 fix some warnings 2002-11-19 04:34:44 +00:00
Brian Koropoff
860306e324 Oops, forgot these. 2002-11-19 04:24:09 +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
Bill Currie
0866f5d35f nuke a bunch of commented out code 2002-11-18 23:22:52 +00:00
Bill Currie
b44d61e84b use bspfile for reading the map 2002-11-18 22:46:53 +00:00
Bill Currie
b1184fc066 run through indent and do some cleanup 2002-11-18 22:14:31 +00:00
Bill Currie
2a1d8555d2 Import Matthew Wong's bsp2bmp utility using quakeio functions, creating an
image_t type for the line point drawing, ditching the raw and bmp formats
in favor of pcx (for now), and renaming to bsp2img. I plan on working on
getopt, bspfile and other image formats in the future as well as generally
cleaning up the code.
2002-11-18 20:48:29 +00:00
Bill Currie
447984226e remove a duplicate perror call 2002-11-18 15:01:02 +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
Bill Currie
cb81f17697 bah, bloody bison inconsistencies 2002-11-15 17:12:16 +00:00
Bill Currie
06df342655 fix a stray ; 2002-11-15 14:56:57 +00:00
Bill Currie
2ad18a404b don't double print Sys_Error messages when the print function is still
the default
2002-11-14 22:17:25 +00:00
Bill Currie
10e34e6d70 ignorage 2002-11-14 22:02:27 +00:00
Bill Currie
d1199f23da get categories working in the runtime :) 2002-11-14 20:42:48 +00:00
Bill Currie
bad252cb81 support category dumping 2002-11-14 18:44:01 +00:00
Bill Currie
04867e06bc fix a silly bug that caused object names to get mangled when they had a
super class
2002-11-14 18:29:21 +00:00
Bill Currie
3c215ce13f getting closer to working categories 2002-11-14 18:17:43 +00:00
Bill Currie
e544c1247f fix a clobbered by longjump warning 2002-11-14 15:37:09 +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
Bill Currie
6ce0abe536 more alpha compile fixes. Closes: #60 because while it started out for
0.1.1 it developed into an alpha compile issue for 0.5.2
2002-11-13 20:20:50 +00:00
Bill Currie
836c469737 sys.[ch]:
handle SIGFPE and allow the registered signal handler to do recovery
	rather than bail
progs.h, pr_exec.c, pr_load.c:
	if pr_faultchecks is 1 (0 is default), handle division by 0 gracefully
	by loading the maximum representable number into the answer
	Closes: #58
the rest:
	kill the SIGFPE stuff
2002-11-13 19:26:44 +00:00
Bill Currie
8cf5c9a430 don't die on invalid strings 2002-11-13 16:17:00 +00:00
Brian Koropoff
cef0d957e2 Added useful error messages to the math parser, cleaned up implied
multiplication a bit, and added some whitespace to cbuf errors for
readability.
2002-11-13 03:03:37 +00:00
Bill Currie
da334413b8 re-write category handling so it has a better chance of working (category
using code now compiles)
2002-11-12 19:52:43 +00:00
Bill Currie
33918c6371 didn't realize that was there 2002-11-12 15:21:53 +00:00
Bill Currie
75c91e78c2 qwaq progs now take args :) 2002-11-12 02:56:10 +00:00
Brian Koropoff
44d0408a38 Two small fixes. 2002-11-12 02:53:24 +00:00
Bill Currie
13c5216373 do some cleanup 2002-11-12 02:30:08 +00:00
Bill Currie
f561d25a84 show what console says 2002-11-11 21:29:05 +00:00
Bill Currie
bde21fa510 packaging fixes the for resurrected gib lib 2002-11-11 18:10:26 +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
aa5ad0f0f9 don't use glXGetProcAddressARB to look up the glX functions. hopefully fixes
the nvidea segfault
2002-11-10 23:31:19 +00:00
Brian Koropoff
8ebef28b7a Removed references to Cmd_Return, which should have gone away when GIB was
separated out into an independent interpreter.
2002-11-10 03:24:00 +00:00
Bill Currie
498bdcc406 compile fixes for alpha linux 2002-11-10 02:50:42 +00:00
Bill Currie
77288fe90b make dist fix 2002-11-09 21:56:13 +00:00
Bill Currie
5f606a2829 \r terminates a line only if followed by \n or the end of the buffer 2002-11-09 07:58:34 +00:00