diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 12 | ||||
-rw-r--r-- | src/compilo.c | 40 |
2 files changed, 52 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..0dfd182 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,12 @@ +localedir = $(datadir)/locale +DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ +AM_CFLAGS = -O3 -Wall -Wstrict-prototypes $(CFLAGS) +INCLUDES = -I. -I.. -I$(includedir) -I../include + +bin_PROGRAMS = compilo + +compilo_SOURCES = compilo.c + +LDADD = ../lib/libCompilo.la + +compilo_LDADD = $(LDADD) diff --git a/src/compilo.c b/src/compilo.c new file mode 100644 index 0000000..b146b4d --- /dev/null +++ b/src/compilo.c @@ -0,0 +1,40 @@ +#include <stdio.h> +#include <string.h> +#include "config.h" +#include "global.h" +#include "meta.h" +#include "parser.h" +#include "hash.h" +#include "assembler.h" + +char * Estrdup(char * o) { + char * r; + + if (!(r = strdup(o))) { + exception(1, _("Out of memory.")); + } + return r; +} + +void * Emalloc(size_t s) { + void * r; + + if (!(r = malloc(s))) { + exception(1, _("Out of memory.")); + } + return r; +} + +void exception(int level, char *msg) +{ + fprintf(stderr, "%s\n", msg); + exit(level); +} + +void push_pile(char * s) {} +void act_pile(int t) {} + + +int main(void) { + return 0; +}
\ No newline at end of file |