changeset 372:39490cf2d1c2

Make macro names case insensitive The rest of the assembly source is not case sensitive so there's no compelling reason macros should be. Make macro lookup case insensitive.
author William Astle <lost@l-w.ca>
date Mon, 22 Jun 2015 19:23:11 -0600
parents 2593fd529be5
children 00fced888c5d
files lwasm/macro.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lwasm/macro.c	Mon Jun 22 19:16:13 2015 -0600
+++ b/lwasm/macro.c	Mon Jun 22 19:23:11 2015 -0600
@@ -60,7 +60,7 @@
 
 	for (m = as -> macros; m; m = m -> next)
 	{
-		if (!strcmp(m -> name, l -> sym))
+		if (!strcasecmp(m -> name, l -> sym))
 			break;
 	}
 	if (m)
@@ -159,7 +159,7 @@
 
 	for (m = as -> macros; m; m = m -> next)
 	{
-		if (!strcmp(opc, m -> name))
+		if (!strcasecmp(opc, m -> name))
 			break;
 	}
 	// signal no macro expansion