remove mswin-type define -- this is UNIX

This commit is contained in:
bentley
2010-01-15 16:35:10 -07:00
parent 913e9c9e4f
commit 24c1613f06
5 changed files with 8 additions and 22 deletions

View File

@@ -18,8 +18,4 @@
#define RGBFIX_VERSION "1.02" #define RGBFIX_VERSION "1.02"
#define LIB_VERSION "1.00" #define LIB_VERSION "1.00"
#ifdef __GNUC__
#define strnicmp strncasecmp
#endif
#endif #endif

View File

@@ -401,7 +401,7 @@ scanagain:
lex = tLexHash[hash]; lex = tLexHash[hash];
while (lex) { while (lex) {
if (lex->nNameLength == yyleng) { if (lex->nNameLength == yyleng) {
if (strnicmp if (strncasecmp
(pLexBuffer, lex->tzName, (pLexBuffer, lex->tzName,
yyleng) == 0) { yyleng) == 0) {
pLongestFixed = lex; pLongestFixed = lex;

View File

@@ -45,12 +45,12 @@ ULONG isWhiteSpace( char s )
ULONG isRept( 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 ) 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 ) void copyrept( void )
@@ -122,12 +122,12 @@ void copyrept( void )
ULONG isMacro( char *s ) 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 ) 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 ) void copymacro( void )
@@ -199,17 +199,17 @@ void copymacro( void )
ULONG isIf( char *s ) 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 ) 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 ) 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 ) void if_skip_to_else( void )

View File

@@ -9,11 +9,6 @@
#include "lib/types.h" #include "lib/types.h"
#include "lib/library.h" #include "lib/library.h"
// Quick and dirty...but it works
#ifdef __GNUC__
#define strcmpi strcasecmp
#endif
/* /*
* Print the usagescreen * Print the usagescreen
* *

View File

@@ -16,11 +16,6 @@
#include "link/main.h" #include "link/main.h"
#include "link/library.h" #include "link/library.h"
// Quick and dirty...but it works
#ifdef __GNUC__
#define strcmpi strcasecmp
#endif
enum eBlockType { enum eBlockType {
BLOCK_COMMENT, BLOCK_COMMENT,
BLOCK_OBJECTS, BLOCK_OBJECTS,