mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
Tweak qwaq a bit so it can be used to run Ruamoko Scheme
This commit is contained in:
parent
73a34b86e8
commit
2b666bd1ca
3 changed files with 25 additions and 23 deletions
|
@ -123,6 +123,7 @@ bi_seek (progs_t *pr)
|
|||
R_INT (pr) = lseek (handle, pos, whence);
|
||||
}
|
||||
|
||||
/*
|
||||
static void
|
||||
bi_traceon (progs_t *pr)
|
||||
{
|
||||
|
@ -135,7 +136,7 @@ bi_traceoff (progs_t *pr)
|
|||
{
|
||||
pr->pr_trace = false;
|
||||
}
|
||||
|
||||
*/
|
||||
static void
|
||||
bi_printf (progs_t *pr)
|
||||
{
|
||||
|
@ -151,17 +152,17 @@ bi_printf (progs_t *pr)
|
|||
}
|
||||
|
||||
static builtin_t builtins[] = {
|
||||
{"print", bi_print, 1},
|
||||
{"errno", bi_errno, 3},
|
||||
{"strerror", bi_strerror, 4},
|
||||
{"open", bi_open, 5},
|
||||
{"close", bi_close, 6},
|
||||
{"read", bi_read, 7},
|
||||
{"write", bi_write, 8},
|
||||
{"seek", bi_seek, 9},
|
||||
{"traceon", bi_traceon, 10},
|
||||
{"traceoff", bi_traceoff, 11},
|
||||
{"printf", bi_printf, 12},
|
||||
{"print", bi_print, -1},
|
||||
{"errno", bi_errno, -1},
|
||||
{"strerror", bi_strerror, -1},
|
||||
{"open", bi_open, -1},
|
||||
{"close", bi_close, -1},
|
||||
{"read", bi_read, -1},
|
||||
{"write", bi_write, -1},
|
||||
{"seek", bi_seek, -1},
|
||||
// {"traceon", bi_traceon, -1},
|
||||
// {"traceoff", bi_traceoff, -1},
|
||||
{"printf", bi_printf, -1},
|
||||
{0}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
void (string str) print = #1;
|
||||
integer () errno = #3;
|
||||
string (integer err) strerror = #4;
|
||||
integer (...) open = #5; // string path, float flags[, float mode]
|
||||
integer (integer handle) close = #6;
|
||||
string (integer handle, integer count, integer []result) read = #7;
|
||||
integer (integer handle, string buffer, integer count) write = #8;
|
||||
integer (integer handle, integer pos, integer whence) seek = #9;
|
||||
void (string str) print = #0;
|
||||
integer () errno = #0;
|
||||
string (integer err) strerror = #0;
|
||||
integer (...) open = #0; // string path, float flags[, float mode]
|
||||
integer (integer handle) close = #0;
|
||||
string (integer handle, integer count, integer []result) read = #0;
|
||||
integer (integer handle, string buffer, integer count) write = #0;
|
||||
integer (integer handle, integer pos, integer whence) seek = #0;
|
||||
|
||||
void() traceon = #10; // turns statment trace on
|
||||
void() traceoff = #11;
|
||||
//void() traceon = #0; // turns statment trace on
|
||||
//void() traceoff = #0;
|
||||
|
||||
void (...) printf = #12;
|
||||
void (...) printf = #0;
|
||||
|
||||
|
||||
float time;
|
||||
|
|
|
@ -122,6 +122,7 @@ init_qf (void)
|
|||
PR_Init_Cvars ();
|
||||
PR_Init ();
|
||||
RUA_Init (&pr, 0);
|
||||
PR_Cmds_Init(&pr);
|
||||
BI_Init (&pr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue