TB print hello world

This commit is contained in:
2025-09-14 23:31:14 +02:00
parent 062e98d714
commit 40ccb7d476
6 changed files with 322 additions and 0 deletions

View File

@ -13,6 +13,7 @@
#include <dlmalloc/malloc.h>
#include <errors.h>
#include <util/util.h>
#include "interp.h"
struct {
char *modestr;
@ -74,6 +75,14 @@ void do_file(char *filepath) {
goto done;
}
InterpResult *res;
bool ok = interp_runstring((const char *)buf, statbuf.size, &res);
if (!ok) {
uprintf("Interpreter error:\n");
uprintf("%s\n", res->errmsg);
goto done;
}
done:
dlfree(buf);
ioctl(ioh, IOCTL_CLOSEF, 0, 0, 0);