* as/z80/assym.c (mlookup): ignore case when looking up mnemonics
[fw/sdcc] / as / z80 / assym.c
index db88a08afbd0def5d614c29fe381662a1649988b..77e0c2682d9feca0b91df3804b6284e23f971dff 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
-#if defined(__APPLE__) && defined(__MACH__)
-#include <sys/types.h>
-#include <sys/malloc.h>
-#else
-#include <malloc.h>
-#endif
+#include <stdlib.h>
 #include "asm.h"
+#include "strcmpi.h"
 
 /*)Module      assym.c
  *
@@ -186,7 +182,7 @@ char *id;
        h = hash(id);
        mp = mnehash[h];
        while (mp) {
-               if (symeq(id, mp->m_id))
+               if (as_strcmpi(id, mp->m_id) == 0)      /* JLH: case insensitive */
                        return (mp);
                mp = mp->m_mp;
        }
@@ -387,7 +383,7 @@ register char *p1, *p2;
  *     side effects:
  *             none
  */
+
 int
 hash(p)
 register char *p;