diff options
Diffstat (limited to 'src/3rdparty/squirrel/sqstdlib/sqstdsystem.cpp')
-rw-r--r-- | src/3rdparty/squirrel/sqstdlib/sqstdsystem.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/3rdparty/squirrel/sqstdlib/sqstdsystem.cpp b/src/3rdparty/squirrel/sqstdlib/sqstdsystem.cpp index 70bc097be..c30f98766 100644 --- a/src/3rdparty/squirrel/sqstdlib/sqstdsystem.cpp +++ b/src/3rdparty/squirrel/sqstdlib/sqstdsystem.cpp @@ -29,7 +29,7 @@ static SQInteger _system_system(HSQUIRRELVM v) sq_pushinteger(v,scsystem(s)); return 1; } - return sq_throwerror(v,_SC("wrong param")); + return sq_throwerror(v,"wrong param"); } @@ -52,7 +52,7 @@ static SQInteger _system_remove(HSQUIRRELVM v) const SQChar *s; sq_getstring(v,2,&s); if(scremove(s)==-1) - return sq_throwerror(v,_SC("remove() failed")); + return sq_throwerror(v,"remove() failed"); return 0; } @@ -62,7 +62,7 @@ static SQInteger _system_rename(HSQUIRRELVM v) sq_getstring(v,2,&oldn); sq_getstring(v,3,&newn); if(screname(oldn,newn)==-1) - return sq_throwerror(v,_SC("rename() failed")); + return sq_throwerror(v,"rename() failed"); return 0; } @@ -94,30 +94,30 @@ static SQInteger _system_date(HSQUIRRELVM v) else date = localtime(&t); if(!date) - return sq_throwerror(v,_SC("crt api failure")); + return sq_throwerror(v,"crt api failure"); sq_newtable(v); - _set_integer_slot(v, _SC("sec"), date->tm_sec); - _set_integer_slot(v, _SC("min"), date->tm_min); - _set_integer_slot(v, _SC("hour"), date->tm_hour); - _set_integer_slot(v, _SC("day"), date->tm_mday); - _set_integer_slot(v, _SC("month"), date->tm_mon); - _set_integer_slot(v, _SC("year"), date->tm_year+1900); - _set_integer_slot(v, _SC("wday"), date->tm_wday); - _set_integer_slot(v, _SC("yday"), date->tm_yday); + _set_integer_slot(v, "sec", date->tm_sec); + _set_integer_slot(v, "min", date->tm_min); + _set_integer_slot(v, "hour", date->tm_hour); + _set_integer_slot(v, "day", date->tm_mday); + _set_integer_slot(v, "month", date->tm_mon); + _set_integer_slot(v, "year", date->tm_year+1900); + _set_integer_slot(v, "wday", date->tm_wday); + _set_integer_slot(v, "yday", date->tm_yday); return 1; } -#define _DECL_FUNC(name,nparams,pmask) {_SC(#name),_system_##name,nparams,pmask} +#define _DECL_FUNC(name,nparams,pmask) {#name,_system_##name,nparams,pmask} static SQRegFunction systemlib_funcs[]={ - _DECL_FUNC(getenv,2,_SC(".s")), - _DECL_FUNC(system,2,_SC(".s")), + _DECL_FUNC(getenv,2,".s"), + _DECL_FUNC(system,2,".s"), _DECL_FUNC(clock,1,NULL), _DECL_FUNC(time,1,NULL), - _DECL_FUNC(date,-1,_SC(".nn")), - _DECL_FUNC(remove,2,_SC(".s")), - _DECL_FUNC(rename,3,_SC(".ss")), + _DECL_FUNC(date,-1,".nn"), + _DECL_FUNC(remove,2,".s"), + _DECL_FUNC(rename,3,".ss"), {0,0,0,0} }; |