mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +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);
|
R_INT (pr) = lseek (handle, pos, whence);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
static void
|
static void
|
||||||
bi_traceon (progs_t *pr)
|
bi_traceon (progs_t *pr)
|
||||||
{
|
{
|
||||||
|
@ -135,7 +136,7 @@ bi_traceoff (progs_t *pr)
|
||||||
{
|
{
|
||||||
pr->pr_trace = false;
|
pr->pr_trace = false;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
static void
|
static void
|
||||||
bi_printf (progs_t *pr)
|
bi_printf (progs_t *pr)
|
||||||
{
|
{
|
||||||
|
@ -151,17 +152,17 @@ bi_printf (progs_t *pr)
|
||||||
}
|
}
|
||||||
|
|
||||||
static builtin_t builtins[] = {
|
static builtin_t builtins[] = {
|
||||||
{"print", bi_print, 1},
|
{"print", bi_print, -1},
|
||||||
{"errno", bi_errno, 3},
|
{"errno", bi_errno, -1},
|
||||||
{"strerror", bi_strerror, 4},
|
{"strerror", bi_strerror, -1},
|
||||||
{"open", bi_open, 5},
|
{"open", bi_open, -1},
|
||||||
{"close", bi_close, 6},
|
{"close", bi_close, -1},
|
||||||
{"read", bi_read, 7},
|
{"read", bi_read, -1},
|
||||||
{"write", bi_write, 8},
|
{"write", bi_write, -1},
|
||||||
{"seek", bi_seek, 9},
|
{"seek", bi_seek, -1},
|
||||||
{"traceon", bi_traceon, 10},
|
// {"traceon", bi_traceon, -1},
|
||||||
{"traceoff", bi_traceoff, 11},
|
// {"traceoff", bi_traceoff, -1},
|
||||||
{"printf", bi_printf, 12},
|
{"printf", bi_printf, -1},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
void (string str) print = #1;
|
void (string str) print = #0;
|
||||||
integer () errno = #3;
|
integer () errno = #0;
|
||||||
string (integer err) strerror = #4;
|
string (integer err) strerror = #0;
|
||||||
integer (...) open = #5; // string path, float flags[, float mode]
|
integer (...) open = #0; // string path, float flags[, float mode]
|
||||||
integer (integer handle) close = #6;
|
integer (integer handle) close = #0;
|
||||||
string (integer handle, integer count, integer []result) read = #7;
|
string (integer handle, integer count, integer []result) read = #0;
|
||||||
integer (integer handle, string buffer, integer count) write = #8;
|
integer (integer handle, string buffer, integer count) write = #0;
|
||||||
integer (integer handle, integer pos, integer whence) seek = #9;
|
integer (integer handle, integer pos, integer whence) seek = #0;
|
||||||
|
|
||||||
void() traceon = #10; // turns statment trace on
|
//void() traceon = #0; // turns statment trace on
|
||||||
void() traceoff = #11;
|
//void() traceoff = #0;
|
||||||
|
|
||||||
void (...) printf = #12;
|
void (...) printf = #0;
|
||||||
|
|
||||||
|
|
||||||
float time;
|
float time;
|
||||||
|
|
|
@ -122,6 +122,7 @@ init_qf (void)
|
||||||
PR_Init_Cvars ();
|
PR_Init_Cvars ();
|
||||||
PR_Init ();
|
PR_Init ();
|
||||||
RUA_Init (&pr, 0);
|
RUA_Init (&pr, 0);
|
||||||
|
PR_Cmds_Init(&pr);
|
||||||
BI_Init (&pr);
|
BI_Init (&pr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue