diff --git a/include/asmotor.h b/include/asmotor.h index 72a9f024..2fb9e382 100644 --- a/include/asmotor.h +++ b/include/asmotor.h @@ -18,8 +18,4 @@ #define RGBFIX_VERSION "1.02" #define LIB_VERSION "1.00" -#ifdef __GNUC__ -#define strnicmp strncasecmp -#endif - #endif diff --git a/src/asm/lexer.c b/src/asm/lexer.c index a57ca4cc..5e2c1cb2 100644 --- a/src/asm/lexer.c +++ b/src/asm/lexer.c @@ -401,7 +401,7 @@ scanagain: lex = tLexHash[hash]; while (lex) { if (lex->nNameLength == yyleng) { - if (strnicmp + if (strncasecmp (pLexBuffer, lex->tzName, yyleng) == 0) { pLongestFixed = lex; diff --git a/src/asm/yaccprt1.y b/src/asm/yaccprt1.y index c94f0e5e..85207266 100644 --- a/src/asm/yaccprt1.y +++ b/src/asm/yaccprt1.y @@ -45,12 +45,12 @@ ULONG isWhiteSpace( char s ) ULONG isRept( char *s ) { - return( (strnicmp(s,"REPT",4)==0) && isWhiteSpace(*(s-1)) && isWhiteSpace(s[4]) ); + return( (strncasecmp(s,"REPT",4)==0) && isWhiteSpace(*(s-1)) && isWhiteSpace(s[4]) ); } ULONG isEndr( char *s ) { - return( (strnicmp(s,"Endr",4)==0) && isWhiteSpace(*(s-1)) && isWhiteSpace(s[4]) ); + return( (strncasecmp(s,"Endr",4)==0) && isWhiteSpace(*(s-1)) && isWhiteSpace(s[4]) ); } void copyrept( void ) @@ -122,12 +122,12 @@ void copyrept( void ) ULONG isMacro( char *s ) { - return( (strnicmp(s,"MACRO",4)==0) && isWhiteSpace(*(s-1)) && isWhiteSpace(s[5]) ); + return( (strncasecmp(s,"MACRO",4)==0) && isWhiteSpace(*(s-1)) && isWhiteSpace(s[5]) ); } ULONG isEndm( char *s ) { - return( (strnicmp(s,"Endm",4)==0) && isWhiteSpace(*(s-1)) && isWhiteSpace(s[4]) ); + return( (strncasecmp(s,"Endm",4)==0) && isWhiteSpace(*(s-1)) && isWhiteSpace(s[4]) ); } void copymacro( void ) @@ -199,17 +199,17 @@ void copymacro( void ) ULONG isIf( char *s ) { - return( (strnicmp(s,"If",2)==0) && isWhiteSpace(*(s-1)) && isWhiteSpace(s[2]) ); + return( (strncasecmp(s,"If",2)==0) && isWhiteSpace(*(s-1)) && isWhiteSpace(s[2]) ); } ULONG isElse( char *s ) { - return( (strnicmp(s,"Else",4)==0) && isWhiteSpace(*(s-1)) && isWhiteSpace(s[4]) ); + return( (strncasecmp(s,"Else",4)==0) && isWhiteSpace(*(s-1)) && isWhiteSpace(s[4]) ); } ULONG isEndc( char *s ) { - return( (strnicmp(s,"Endc",4)==0) && isWhiteSpace(*(s-1)) && isWhiteSpace(s[4]) ); + return( (strncasecmp(s,"Endc",4)==0) && isWhiteSpace(*(s-1)) && isWhiteSpace(s[4]) ); } void if_skip_to_else( void ) diff --git a/src/lib/main.c b/src/lib/main.c index 21bdcca3..9494606c 100644 --- a/src/lib/main.c +++ b/src/lib/main.c @@ -9,11 +9,6 @@ #include "lib/types.h" #include "lib/library.h" -// Quick and dirty...but it works -#ifdef __GNUC__ -#define strcmpi strcasecmp -#endif - /* * Print the usagescreen * diff --git a/src/link/main.c b/src/link/main.c index 72f369e7..7b6b058b 100644 --- a/src/link/main.c +++ b/src/link/main.c @@ -16,11 +16,6 @@ #include "link/main.h" #include "link/library.h" -// Quick and dirty...but it works -#ifdef __GNUC__ -#define strcmpi strcasecmp -#endif - enum eBlockType { BLOCK_COMMENT, BLOCK_OBJECTS,