diff options
author | rubidium <rubidium@openttd.org> | 2014-09-06 18:10:36 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-09-06 18:10:36 +0000 |
commit | e63ca12ab815e0cd4d5cc7fd129cde04f7c4404a (patch) | |
tree | e4fdbec2bc1b60a37442d882cfe3df8f8d85a6e8 /src/3rdparty/squirrel/sqstdlib | |
parent | 33ab50556760a84d6754235e553c68ada2f35a63 (diff) | |
download | openttd-e63ca12ab815e0cd4d5cc7fd129cde04f7c4404a.tar.xz |
(svn r26775) -Cleanup [Squirrel]: "resolve" several of the unicode wrapper defines
Diffstat (limited to 'src/3rdparty/squirrel/sqstdlib')
-rw-r--r-- | src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp | 4 | ||||
-rw-r--r-- | src/3rdparty/squirrel/sqstdlib/sqstdrex.cpp | 16 | ||||
-rw-r--r-- | src/3rdparty/squirrel/sqstdlib/sqstdstring.cpp | 14 |
3 files changed, 17 insertions, 17 deletions
diff --git a/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp b/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp index e4c266362..c4002bf2c 100644 --- a/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp +++ b/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp @@ -27,8 +27,8 @@ void sqstd_printcallstack(HSQUIRRELVM v) * Since the path only reaches NoAI code in a formatted string we have * to strip it here. Let's hope nobody installs openttd in a subdirectory * of a directory named /ai/. */ - src = scstrstr(si.source, "\\ai\\"); - if (!src) src = scstrstr(si.source, "/ai/"); + src = strstr(si.source, "\\ai\\"); + if (!src) src = strstr(si.source, "/ai/"); if (src) { src += 4; } else { diff --git a/src/3rdparty/squirrel/sqstdlib/sqstdrex.cpp b/src/3rdparty/squirrel/sqstdlib/sqstdrex.cpp index a7aa5303d..4029bff62 100644 --- a/src/3rdparty/squirrel/sqstdlib/sqstdrex.cpp +++ b/src/3rdparty/squirrel/sqstdlib/sqstdrex.cpp @@ -526,7 +526,7 @@ SQRex *sqstd_rex_compile(const SQChar *pattern,const SQChar **error) SQRex *exp = (SQRex *)sq_malloc(sizeof(SQRex)); exp->_eol = exp->_bol = NULL; exp->_p = pattern; - exp->_nallocated = (SQInteger)scstrlen(pattern) * sizeof(SQChar); + exp->_nallocated = (SQInteger)strlen(pattern) * sizeof(SQChar); exp->_nodes = (SQRexNode *)sq_malloc(exp->_nallocated * sizeof(SQRexNode)); exp->_nsize = 0; exp->_matches = 0; @@ -544,16 +544,16 @@ SQRex *sqstd_rex_compile(const SQChar *pattern,const SQChar **error) SQRexNode *t; nsize = exp->_nsize; t = &exp->_nodes[0]; - scprintf("\n"); + printf("\n"); /* XXX -- The (int) casts are needed to silent warnings on 64bit systems (SQInteger is 64bit, %d assumes 32bit, (int) is 32bit) */ for(i = 0;i < nsize; i++) { if(exp->_nodes[i].type>MAX_CHAR) - scprintf("[%02d] %10s ",(int)i,g_nnames[exp->_nodes[i].type-MAX_CHAR]); + printf("[%02d] %10s ",(int)i,g_nnames[exp->_nodes[i].type-MAX_CHAR]); else - scprintf("[%02d] %10c ",(int)i,exp->_nodes[i].type); - scprintf("left %02d right %02d next %02d\n",(int)exp->_nodes[i].left,(int)exp->_nodes[i].right,(int)exp->_nodes[i].next); + printf("[%02d] %10c ",(int)i,exp->_nodes[i].type); + printf("left %02d right %02d next %02d\n",(int)exp->_nodes[i].left,(int)exp->_nodes[i].right,(int)exp->_nodes[i].next); } - scprintf("\n"); + printf("\n"); } #endif exp->_matches = (SQRexMatch *) sq_malloc(exp->_nsubexpr * sizeof(SQRexMatch)); @@ -579,7 +579,7 @@ SQBool sqstd_rex_match(SQRex* exp,const SQChar* text) { const SQChar* res = NULL; exp->_bol = text; - exp->_eol = text + scstrlen(text); + exp->_eol = text + strlen(text); exp->_currsubexp = 0; res = sqstd_rex_matchnode(exp,exp->_nodes,text,NULL); if(res == NULL || res != exp->_eol) @@ -618,7 +618,7 @@ SQBool sqstd_rex_searchrange(SQRex* exp,const SQChar* text_begin,const SQChar* t SQBool sqstd_rex_search(SQRex* exp,const SQChar* text, const SQChar** out_begin, const SQChar** out_end) { - return sqstd_rex_searchrange(exp,text,text + scstrlen(text),out_begin,out_end); + return sqstd_rex_searchrange(exp,text,text + strlen(text),out_begin,out_end); } SQInteger sqstd_rex_getsubexpcount(SQRex* exp) diff --git a/src/3rdparty/squirrel/sqstdlib/sqstdstring.cpp b/src/3rdparty/squirrel/sqstdlib/sqstdstring.cpp index 1671f0b1a..777302efc 100644 --- a/src/3rdparty/squirrel/sqstdlib/sqstdstring.cpp +++ b/src/3rdparty/squirrel/sqstdlib/sqstdstring.cpp @@ -22,7 +22,7 @@ static SQInteger validate_format(HSQUIRRELVM v, SQChar *fmt, const SQChar *src, SQInteger start = n; fmt[0] = '%'; while (scstrchr("-+ #0", src[n])) n++; - while (scisdigit(src[n])) { + while (isdigit(src[n])) { swidth[wc] = src[n]; n++; wc++; @@ -31,7 +31,7 @@ static SQInteger validate_format(HSQUIRRELVM v, SQChar *fmt, const SQChar *src, } swidth[wc] = '\0'; if(wc > 0) { - width = scatoi(swidth); + width = atoi(swidth); } else width = 0; @@ -39,7 +39,7 @@ static SQInteger validate_format(HSQUIRRELVM v, SQChar *fmt, const SQChar *src, n++; wc = 0; - while (scisdigit(src[n])) { + while (isdigit(src[n])) { swidth[wc] = src[n]; n++; wc++; @@ -48,7 +48,7 @@ static SQInteger validate_format(HSQUIRRELVM v, SQChar *fmt, const SQChar *src, } swidth[wc] = '\0'; if(wc > 0) { - width += scatoi(swidth); + width += atoi(swidth); } } if (n-start > MAX_FORMAT_LEN ) @@ -69,7 +69,7 @@ static void _append_string(SQInteger &i, SQChar *dest, SQInteger allocated, cons { va_list va; va_start(va, fmt); - i += scvsnprintf(&dest[i],allocated-i,fmt,va); + i += vsnprintf(&dest[i],allocated-i,fmt,va); va_end(va); } @@ -156,7 +156,7 @@ static SQInteger _string_format(HSQUIRRELVM v) static void __strip_l(const SQChar *str,const SQChar **start) { const SQChar *t = str; - while(((*t) != '\0') && scisspace(*t)){ t++; } + while(((*t) != '\0') && isspace(*t)){ t++; } *start = t; } @@ -167,7 +167,7 @@ static void __strip_r(const SQChar *str,SQInteger len,const SQChar **end) return; } const SQChar *t = &str[len-1]; - while(t != str && scisspace(*t)) { t--; } + while(t != str && isspace(*t)) { t--; } *end = t+1; } |