From 9e87372371794bc3e7d46698141966c00acaad0e Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Sat, 11 Jan 2020 19:46:15 +0000 Subject: Tidying up - Removed unused example files - Removed redundant common.c - Added extra files to make sure the current version compiles the nqueens solution correctly - Added extensionless files to .gitignore - Added a way to install sinter --- common.c | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 common.c (limited to 'common.c') diff --git a/common.c b/common.c deleted file mode 100644 index 67acd51..0000000 --- a/common.c +++ /dev/null @@ -1,48 +0,0 @@ -#include -#include -#include - -#include - -void *inter_main(void); - -void *debug_int(void *i) { - int *p = (int *) i; - 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); - - /* - * To get info about the GC discarding objects, use - * GC_REGISTER_FINALIZER(p, fn, arg, 0, 0); - * - * This runs fn(p, arg) when the object at p is finalised. - * - * More info in gc.h of Boehm garbage collector. - */ - - return p; -} - -int main() { - - /* - * Initialising the GC is not necessary on all systems but may be required - * on some. Better safe than sorry! See gc.h for more info. - */ - GC_INIT(); - - int *ret = (int *) inter_main(); - - assert(ret); - return *ret; -} -- cgit v1.2.1