Commit Graph

62 Commits

Author SHA1 Message Date
Bill Currie abedda69b6 if a system with mprotect doesn't have getpagesize, the assumption is that
mprotect doesn't care about page alignment (eg, QNX)
2003-07-21 20:55:13 +00:00
Bill Currie ff6e0ab1b3 not all systems have _SC_PAGESIZE 2003-07-21 20:51:03 +00:00
Bill Currie 2d55162a05 implement memcpy version of VA_COPY correctly 2003-07-21 19:26:53 +00:00
Ragnvald Maartmann-Moe IV 810dfb29e6 Use sysconf() by default instead of getpagesize(). getpagesize() still used if
sysconf() not present. Since getpagesize is deprecated, it's only used as a
fallback.
2003-07-18 12:18:05 +00:00
Bill Currie 1f948c4206 magic numbers evil 2003-07-17 21:45:01 +00:00
Bill Currie b36bd6a98c not all systems (eg, QNX) that have mprotect have getpagesize 2003-07-17 21:01:25 +00:00
Bill Currie c2c3a62956 nuke Qexpand_squiggle. instead, expand ~ to $HOME on qfs initialization and
cache the value.

don't call Qopen directly in the engine. instead call QFS_Open (generic) or
QFS_WOpen (write only, zip flag).

rework QFS_NextFilename to use a dstring (avoiding a potential buffer
overflow), support 10000 files and work from the top-level fs_userpath
directory. adjust QFS_WriteFile and QFS_WriteBuffers etc to suit.

make sw32 screenshots actually get written.

hopefully everything gets written to the right places :)
2003-05-23 17:17:01 +00:00
Bill Currie 589c3e4e49 get nq-server working properly 2003-04-16 05:06:19 +00:00
Bill Currie f55bac4c06 fix nq-servers non-curses console input so it actually works 2003-04-16 04:07:55 +00:00
Bill Currie e105198f48 ensure the path passed to Sys_DebugLog is expanded 2003-03-13 05:41:55 +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
Bill Currie 3e693cbce5 change the default of sys_dead_sleep to 0 2003-01-31 04:51:35 +00:00
Bill Currie 341b6a1d68 this /should/ fix the windows server input problems. based on Timmmm's fix. 2003-01-16 16:11:28 +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 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 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
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 9f7c669370 various win32 compile fixes for the latest mingw (not fully working due to
LPCWAVEFORMATEX)
2002-10-11 20:47:17 +00:00
Bill Currie 7adaf456a1 plug a memory leak 2002-08-27 22:13:34 +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 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
Bill Currie c5192540c8 remove an accidental commit 2002-08-03 01:29:26 +00:00
Bill Currie 612f5c2a31 attempt to fix the win32 server input 2002-08-01 04:49:16 +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 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
Bill Currie 1b550c80b1 finally get Sys_Error `right' 2002-05-21 21:03:46 +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 5a2538faaf dstring.[ch]:
create dsprintf and dvsprintf to do formated prints to dynamic strings.
rest
	Use the new functions :)
2002-03-08 23:11:42 +00:00
Bill Currie 009e6346fe now, so long as ulimit allows it, we can always get a core dump. Looks a
little odd:

Received signal 11, exiting...
IN_Shutdown
IN_LL_Shutdown
VID_Shutdown
Segmentation fault (core dumped)

but the core file does accurately show the error
2002-02-27 06:55:21 +00:00
Bill Currie 9d0d8c49e7 win32 compile fix 2002-02-23 17:43:41 +00:00
Bill Currie 8ee5acb208 redo Sys_Error so it's more usable throughout quake 2002-02-20 19:22:52 +00:00
Bill Currie b6c331736a give nq host_mem_size so -mem can be a cvar (similar to sv_mem_size and
cl_mem_size in qw).
2002-02-19 20:47:45 +00:00
Bill Currie ce9e2e62e3 whitespace 2001-12-02 17:29:14 +00:00
Bill Currie 4689350283 fix qport 2001-11-27 04:50:41 +00:00
Bill Currie 30f6d2f85c fix a case and paste error 2001-09-28 15:29:56 +00:00
Bill Currie b1f4a778f9 the rcsid commit from hell }:> 2001-09-28 06:26:31 +00:00
Bill Currie 36de3c147e move Sys_Quit and Sys_Error totally into libQFutil. They will call a list
of pre-registered (Sys_RegisterShutdown) function before actually exiting
the program. This should take care of the pain when an ncurses server
crashes.
2001-09-24 21:00:23 +00:00
Bill Currie 49a85718f8 total nukage of Con_*Printf calls from libs (except for video). Sys_*Printf
(Sys_DPrintf is new) is now used exclusively for all lib printing. Con_Init
sets the sys printf recirection to Con_Print (which has been revamped
appropriatly) and the server sets it to SV_Print (which was SV_Printf and
the new SV_Printf calls /it/). This should fix the rcon print redirection
issues.
2001-09-21 04:22:46 +00:00
Bill Currie 3656d6fd59 compile fixes for win32 and take the pruning shears to *sys*.c in qw and nq
(they're not done yet, though)
2001-08-29 17:45:53 +00:00
Ragnvald Maartmann-Moe IV edcf092b05 Whitespace, dammit. Oh, and removal of several orphaned comments. Comments in front of functions suck. 2001-08-22 22:03:16 +00:00
Bill Currie 9aeef3f3d6 rename qfont_table to sys_char_map and make it global (and constant) 2001-07-10 15:59:25 +00:00
Bill Currie 6f022f5d9f well, that was interesting: turns out mingw provides mprotect and
getpagesize :/
2001-07-05 18:47:19 +00:00
Bill Currie 2e5b3b4a83 damn 2001-07-05 06:31:05 +00:00
Bill Currie 0862c8facd I'ld love to know how that got though my testing :/ 2001-07-05 06:29:53 +00:00