Inital (stash) commit

This commit is contained in:
2023-05-12 22:23:58 +02:00
commit f86ed5fda6
14 changed files with 558 additions and 0 deletions

19
hs/csrc/pre.c Normal file
View File

@@ -0,0 +1,19 @@
#include <unistd.h>
#include <string.h>
extern void hs_init(int*, char***);
extern void hs_exit();
extern void setup();
int argc = 0;
char* argv[] = { NULL };
char** pargv = argv;
void __attribute__((constructor)) pre() {
hs_init(&argc, &pargv);
setup();
}
void __attribute__((destructor)) post() {
hs_exit();
}