changeset 227:721a5ea5e36a

Make warnings show up in assembly listings. Make warnings show up in assembly listings. They don't show up anywhere else currently.
author William Astle <lost@l-w.ca>
date Sun, 15 Jul 2012 21:42:39 -0600
parents 7c2c2239ec9c
children 042c7b74faf0
files lwasm/list.c
diffstat 1 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lwasm/list.c	Sun Jul 15 21:19:43 2012 -0600
+++ b/lwasm/list.c	Sun Jul 15 21:42:39 2012 -0600
@@ -84,6 +84,14 @@
 				
 				if (nl -> outputl > 0)
 					obytelen += nl -> outputl;
+				if (nl -> warn)
+				{
+					lwasm_error_t *e;
+					for (e = nl -> warn; e; e = e -> next)
+					{
+						printf("Warning: %s\n", e -> mess);
+					}
+				}
 				if (nc == 0)
 					break;
 			}
@@ -103,6 +111,14 @@
 		}
 		else
 		{
+			if (cl -> warn)
+			{
+				lwasm_error_t *e;
+				for (e = cl -> warn; e; e = e -> next)
+				{
+					printf("Warning: %s\n", e -> mess);
+				}
+			}
 			obytelen = cl -> outputl;
 			if (obytelen > 0)
 			{
@@ -222,6 +238,6 @@
 		lw_free(obytes);
 		obytes = NULL;
 	}
-	if (as -> flags & FLAG_SYMBOLS)
+	if ((as -> flags & FLAG_SYMBOLS) && (as -> flags & FLAG_UNICORNS) == 0)
 		list_symbols(as, of);
 }