diff lwasm/macro.c @ 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 8764142b3192
children 5524649f4784
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