This commit is contained in:
2025-09-15 22:35:15 +02:00
parent ce63020b34
commit 0a5523f234
22 changed files with 374 additions and 177 deletions

View File

@ -8,11 +8,11 @@
RtCmd *RTCMDS = NULL;
#define RTCMD(name) \
#define RTCMD(name, _fn) \
do { \
RtCmd *_cmd = dlmalloc(sizeof(*_cmd)); \
_cmd->cmdname = #name; \
_cmd->fn = rt_##name; \
_cmd->cmdname = (name); \
_cmd->fn = (_fn); \
LL_APPEND(RTCMDS, _cmd); \
} while(0)
@ -25,10 +25,10 @@ bool rt_print(Token *tks) {
}
tk = tk->next;
}
uprintf("\n");
return true;
}
void rt_init(void) {
RTCMD(print);
RTCMD("@print", &rt_print);
}