aboutsummaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2017-01-26 17:43:38 +0100
committerAlex Auvolat <alex@adnab.me>2017-01-26 17:43:38 +0100
commit96da27494f89d75f8aec0c8894440c3f7482f54b (patch)
treea239f75acf6c2c11cfa54b895653f978980064cb /src/lib/libc/stdlib.c
parent809d660944cfb515e18bb7f1c1519392b4bccd53 (diff)
downloadkogata-96da27494f89d75f8aec0c8894440c3f7482f54b.tar.gz
kogata-96da27494f89d75f8aec0c8894440c3f7482f54b.zip
More lua
Diffstat (limited to 'src/lib/libc/stdlib.c')
-rw-r--r--src/lib/libc/stdlib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/libc/stdlib.c b/src/lib/libc/stdlib.c
index bc543be..6b200c2 100644
--- a/src/lib/libc/stdlib.c
+++ b/src/lib/libc/stdlib.c
@@ -1,5 +1,6 @@
#include <stdlib.h>
#include <ctype.h>
+#include <string.h>
#include <kogata/debug.h>
@@ -75,6 +76,10 @@ double strtod(const char *nptr, char **endptr) {
}
char *getenv(const char *name) {
+ // HACK
+ if (!strcmp(name, "LUA_INIT")) {
+ return "require 'init'";
+ }
// TODO
return 0;
}