diff lwasm/main.c @ 330:81c005b82775

More tinkering with input subsystem
author lost
date Sun, 28 Feb 2010 05:35:50 +0000
parents c15cca3ae6a2
children 67224d8d1024
line wrap: on
line diff
--- a/lwasm/main.c	Sun Feb 28 05:01:31 2010 +0000
+++ b/lwasm/main.c	Sun Feb 28 05:35:50 2010 +0000
@@ -30,6 +30,7 @@
 #include <lw_stringlist.h>
 
 #include "lwasm.h"
+#include "input.h"
 
 extern int parse_pragma_string(asmstate_t *as, char *str);
 
@@ -171,8 +172,6 @@
 	/* initialize assembler state */
 	asmstate.include_list = lw_stringlist_create();
 	asmstate.input_files = lw_stringlist_create();
-	asmstate.file_dir = lw_stack_create(lw_free);
-	input_init();
 
 	/* parse command line arguments */	
 	argp_parse(&argp, argc, argv, 0, 0, &asmstate);
@@ -182,5 +181,7 @@
 		asmstate.output_file = lw_strdup("a.out");
 	}
 
+	input_init(&asmstate);
+
 	exit(0);
 }