diff lwasm/input.c @ 384:38b50ce6967a

Made --list and --depend work
author lost@starbug
date Sat, 15 May 2010 20:46:04 -0600
parents 7166254491ed
children af5f2c51db76
line wrap: on
line diff
--- a/lwasm/input.c	Sat May 15 20:01:58 2010 -0600
+++ b/lwasm/input.c	Sat May 15 20:46:04 2010 -0600
@@ -67,6 +67,7 @@
 	if (as -> file_dir)
 		lw_stack_destroy(as -> file_dir);
 	as -> file_dir = lw_stack_create(lw_free);
+	as -> includelist = lw_stack_create(lw_free);
 	lw_stringlist_reset(as -> input_files);
 	while (IS)
 	{
@@ -80,9 +81,14 @@
 {
 	/* take apart fn into path and filename then push the path */
 	/* onto the current file path stack */
+	
+	/* also add it to the list of files included */
 	char *dn, *dp;
 	int o;
-	
+
+	dn = lw_strdup(fn);
+	lw_stack_push(as -> includelist, dn);
+
 	dn = lw_strdup(fn);
 	dp = dn + strlen(dn);