Commit Graph

27 Commits

Author SHA1 Message Date
Bill Currie 54604d9aa2 [util] Make hunk (optionally) thread-safe
For now, the functions check for a null hunk pointer and use the global
hunk (initialized via Memory_Init) if necessary. However, Hunk_Init is
available (and used by Memory_Init) to create a hunk from any arbitrary
memory block. So long as that block is 64-byte aligned, allocations
within the hunk will remain 64-byte aligned.
2021-07-29 11:43:27 +09:00
Bill Currie 7970525ef4 [util] Make va thread-safe
It now takes a context pointer (opaque data) that holds the buffers it
uses for the temporary strings. If the context pointer is null, a static
context is used (making those uses of va NOT thread-safe). Most calls to
va use the static context, but all such calls have been formatted
consistently so they are easy to find when it comes time to do a full
audit.
2021-01-31 16:05:48 +09:00
Bill Currie 6d5ffa9f8e [build] Move to non-recursive make
There's still some cleanup to do, but everything seems to be working
nicely: `make -j` works, `make distcheck` passes. There is probably
plenty of bitrot in the package directories (RPM, debian), though.

The vc project files have been removed since those versions are way out
of date and quakeforge is pretty much dependent on gcc now anyway.

Most of the old Makefile.am files  are now Makemodule.am.  This should
allow for new Makefile.am files that allow local building (to be added
on an as-needed bases).  The current remaining Makefile.am files are for
standalone sub-projects.a

The installable bins are currently built in the top-level build
directory. This may change if the clutter gets to be too much.

While this does make a noticeable difference in build times, the main
reason for the switch was to take care of the growing dependency issues:
now it's possible to build tools for code generation (eg, using qfcc and
ruamoko programs for code-gen).
2020-06-25 11:35:37 +09:00
Bill Currie a55b9544ac Improve handling of pr_argc
It is now set to 0 when progs are loaded and every time
PR_ExecuteProgram() returns. This takes care of the default case, but
when setting parameters, pr_argc needs to be set correctly in case a
vararg function is called.
2020-02-25 17:36:29 +09:00
Bill Currie 81083698a8 Move to using an in-memory form of ddef_t
This allows the VM to work with extended ddefs transparently. It seems
to have uncovered a typedef alias relocation bug, though.
2020-02-22 22:33:44 +09:00
Bill Currie 45311e55c2 Fix an off-by-one error in qwe's substr implementation. 2012-07-14 08:07:41 +09:00
Bill Currie 02de92abb0 Use "return" strings instead of temp strings for qwe.
QF's temp strings have very different semantics. Return strings are the
ones with the same semantics (only 16 slots instead of 8 in mvdsv:)
2012-07-13 11:43:37 +09:00
Bill Currie 20ad50407d Correct the size adjustment for qwe's newstr.
It seems the correct interpretation is that the size parameter includes the
trailing 0 (going by mvdsv source).
2012-07-06 10:53:24 +09:00
Bill Currie a7870a98a1 Apply a couple of patches from calim of nouveau.
One's an actual bug, the other a bit of error checking (not sure how
necessary it is, but it's in code that we don't /want/ to run, so it can't
hurt :)
2012-04-25 08:48:46 +09:00
Bill Currie bc1b483525 Nuke the rcsid stuff.
It's pretty useless in git.
2012-04-22 10:56:32 +09:00
Bill Currie 6ac017860a Pretend to be MVDSV for ktpro. 2011-12-11 17:15:33 +09:00
Bill Currie 15a5f98439 Mintor improvment to the QWE newstr(). 2011-07-10 21:29:10 +09:00
Bill Currie 53cd9be90a Progress on map changing with qtv clients
Rename SV_DemoSendMessages to SVR_SendMessages, and make sure SVR_SendMessages
and SV_qtvSendMessages get called when SV_SendMessagesToAll is called.
2010-01-13 06:45:43 +00:00
Bill Currie d66934942d nuke Con_Printf and Con_DPrintf and use Sys_* instead 2007-11-06 10:17:14 +00:00
Bill Currie 318046e38b some white space 2007-04-08 04:21:30 +00:00
Bill Currie 5b761bac83 make progs related code a little more consistent with its int type usage 2007-04-06 00:47:41 +00:00
Bill Currie 3fb03fc2be hah, should have been using __attribute__((used)) all that time (rather
than __attribute__((unused))). fixes the missing console in -x11
2005-08-04 15:27:09 +00:00
Bill Currie 762aefc9b1 implement Raven's calling convention (rcall: first 2 params in opb and
opc). should give a general speedup to most progs.
2005-06-12 09:54:01 +00:00
Bill Currie 501180aaac gcc-4.0 fixes. even found some bugs :) (names /not/ mangled this time) 2005-06-08 06:35:48 +00:00
Bill Currie 73a34b86e8 recorder interface to ease writing server state to mvds and qtv. ones this
is working properly, adding qtv support will be trivial.
2005-05-01 09:07:20 +00:00
Bill Currie 2a36c74120 add dynamic (freeable but unchangeable) strings
This is an imperfect revision of history.
2004-11-11 09:40:00 +00:00
Bill Currie 13029212a8 don't ignore the size parameter to newstr
This is an imperfect revision of history.
2004-11-11 04:16:00 +00:00
Bill Currie f5bc90a53a clean up some redundant progs functions (may be broken for a while)
This is an imperfect revision of history.
2004-11-05 11:49:00 +00:00
Bill Currie ca46503607 add -Wsign-compare (default for -Wall only in C++) and fix up the warnings 2004-07-13 19:14:01 +00:00
Bill Currie aee1554fad fix a missing terminator found by Grievre 2004-01-15 23:05:56 +00:00
Bill Currie 89e6b8b2e6 ensure ucmd_unkown and sv_cbuf->unkown_command always point somewhere sane 2004-01-06 23:04:14 +00:00
Bill Currie 133879f8fa provide builtin mappings for id (none, really), qf and ktpro/qwe (qw only),
add qwe builtin extensions to qw-server. provide sv_progs_ext to control
the builtin mapping. valid values are "id", "qf" (our old static builtins),
"qwe"/"ktpro" (either works. for ktpro mod support) and "none" (no
mapping). any other value is equivalent to "none".
2004-01-06 07:00:39 +00:00