From 2d33d82794559b83131b83528279ce898716c112 Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Fri, 30 Mar 2007 06:16:08 +0000 Subject: * Added all the missing defines for ctype.h functions and converted all the direct uses to the defines. Ref: http://www.eathena.ws/board/index.php?showtopic=145235 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10091 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index 55a0eb23e..513d3be6f 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -353,18 +353,18 @@ static unsigned int calc_hash2(const unsigned char *p) #if defined(SCRIPT_HASH_DJB2) unsigned int h = 5381; while( *p ) // hash*33 + c - h = ( h << 5 ) + h + ((unsigned char)tolower(*p++)); + h = ( h << 5 ) + h + ((unsigned char)TOLOWER(*p++)); return h; #elif defined(SCRIPT_HASH_SDBM) unsigned int h = 0; while( *p ) - h = ( h << 6 ) + ( h << 16 ) - h + ((unsigned char)tolower(*p++)); + h = ( h << 6 ) + ( h << 16 ) - h + ((unsigned char)TOLOWER(*p++)); return h; #elif defined(SCRIPT_HASH_ELF) unsigned int h = 0; unsigned int g; while( *p ){ // UNIX ELF hash - h = ( h << 4 ) + ((unsigned char)tolower(*p++)); + h = ( h << 4 ) + ((unsigned char)TOLOWER(*p++)); if ( g = h & 0xF0000000 ) h ^= g >> 24; h &= ~g; @@ -374,7 +374,7 @@ static unsigned int calc_hash2(const unsigned char *p) unsigned int h = 0; unsigned int g; while( *p ){ - h = ( h << 4 ) + ((unsigned char)tolower(*p++)); + h = ( h << 4 ) + ((unsigned char)TOLOWER(*p++)); if ( (g=h&0xF0000000) ) { h ^= g>>24; h ^= g; @@ -385,7 +385,7 @@ static unsigned int calc_hash2(const unsigned char *p) unsigned int h = 0; while( *p ){ h = ( h << 1 ) + ( h >> 3 ) + ( h >> 5 ) + ( h >> 8 ); - h+=(unsigned char)tolower(*p++); + h+=(unsigned char)TOLOWER(*p++); } return h; #endif @@ -783,7 +783,7 @@ const char* parse_simpleexpr(const char *p) if( *p != ')' ) disp_error_message("parse_simpleexpr: unmatch ')'",p); ++p; - } else if(isdigit(*p) || ((*p=='-' || *p=='+') && isdigit(p[1]))){ + } else if(ISDIGIT(*p) || ((*p=='-' || *p=='+') && ISDIGIT(p[1]))){ char *np; i=strtoul(p,&np,0); add_scripti(i); @@ -1123,7 +1123,7 @@ const char* parse_syntax(const char* p) v = str_data[v].val; p = skip_word(p); } else { //Numeric value - if((*p == '-' || *p == '+') && isdigit(p[1])) // pre-skip because '-' can not skip_word + if((*p == '-' || *p == '+') && ISDIGIT(p[1])) // pre-skip because '-' can not skip_word p++; p = skip_word(p); if(np != p) -- cgit v1.2.3-60-g2f50