summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'common.c')
-rw-r--r--common.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/common.c b/common.c
index 5170943..100acdb 100644
--- a/common.c
+++ b/common.c
@@ -1,16 +1,22 @@
#include <stddef.h>
-#include <gc.h>
+#include <stdio.h>
-#include "debug.h"
+#include <gc.h>
void *inter_main(void);
void *debug_int(void *i) {
int *p = (int *) i;
- debug("%d\n", *p);
+ fprintf(stderr, "%d\n", *p);
return i;
}
+void *debug_func_call(void *f) {
+ char *func_id = (char *) f;
+ fprintf(stderr, "%s\n", func_id);
+ return 0;
+}
+
void *gc_alloc(int size) {
void *p = GC_MALLOC(size);
@@ -34,5 +40,7 @@ int main() {
*/
GC_INIT();
- return (int) inter_main();
+ int *ret = (int *) inter_main();
+
+ return *ret;
}