- function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 7 Aug 2002 21:21:30 +0000 (21:21 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 7 Aug 2002 21:21:30 +0000 (21:21 +0000)
  so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
- solved MSC error in function aopDump()

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2061 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/z80/gen.c

index 03e5a780d397b86f6b64282228ca52958e5656c9..09e50849dd2fa59b94174340d7cbbbb9e57708ba 100644 (file)
 #include <string.h>
 #include <ctype.h>
 
+#if defined(__BORLANDC__) || defined(_MSC_VER)
+#define STRCASECMP stricmp
+#else
+#define STRCASECMP strcasecmp
+#endif
+
 #ifdef HAVE_SYS_ISA_DEFS_H
 #include <sys/isa_defs.h>
 #endif
@@ -469,7 +475,7 @@ _emit2 (const char *inst, const char *fmt,...)
 static void
 _emitMove(const char *to, const char *from)
 {
-  if (strcasecmp(to, from) != 0) 
+  if (STRCASECMP(to, from) != 0) 
     {
       emit2("ld %s,%s", to, from);
     }
@@ -491,6 +497,7 @@ aopDump(const char *plabel, asmop *aop)
       break;
     default:
       /* No information. */
+      break;
     }
 }