Code::Blocks
SVN r11506
|
#include <squirrel.h>
#include <sqstdstring.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <assert.h>
Go to the source code of this file.
Macros | |
#define | scstrchr strchr |
#define | scsnprintf snprintf |
#define | scatoi atoi |
#define | scstrtok strtok |
#define | MAX_FORMAT_LEN 20 |
#define | MAX_WFORMAT_LEN 3 |
#define | ADDITIONAL_FORMAT_SPACE (100*sizeof(SQChar)) |
#define | SETUP_REX(v) |
#define | _DECL_REX_FUNC(name, nparams, pmask) {_SC(#name),_regexp_##name,nparams,pmask} |
#define | _DECL_FUNC(name, nparams, pmask) {_SC(#name),_string_##name,nparams,pmask} |
Functions | |
static SQInteger | validate_format (HSQUIRRELVM v, SQChar *fmt, const SQChar *src, SQInteger n, SQInteger &width) |
SQRESULT | sqstd_format (HSQUIRRELVM v, SQInteger nformatstringidx, SQInteger *outlen, SQChar **output) |
static SQInteger | _string_format (HSQUIRRELVM v) |
static void | __strip_l (const SQChar *str, const SQChar **start) |
static void | __strip_r (const SQChar *str, SQInteger len, const SQChar **end) |
static SQInteger | _string_strip (HSQUIRRELVM v) |
static SQInteger | _string_lstrip (HSQUIRRELVM v) |
static SQInteger | _string_rstrip (HSQUIRRELVM v) |
static SQInteger | _string_split (HSQUIRRELVM v) |
static SQInteger | _rexobj_releasehook (SQUserPointer p, SQInteger) |
static SQInteger | _regexp_match (HSQUIRRELVM v) |
static void | _addrexmatch (HSQUIRRELVM v, const SQChar *str, const SQChar *begin, const SQChar *end) |
static SQInteger | _regexp_search (HSQUIRRELVM v) |
static SQInteger | _regexp_capture (HSQUIRRELVM v) |
static SQInteger | _regexp_subexpcount (HSQUIRRELVM v) |
static SQInteger | _regexp_constructor (HSQUIRRELVM v) |
static SQInteger | _regexp__typeof (HSQUIRRELVM v) |
SQInteger | sqstd_register_stringlib (HSQUIRRELVM v) |
Variables | |
static SQRegFunction | rexobj_funcs [] |
static SQRegFunction | stringlib_funcs [] |
#define _DECL_FUNC | ( | name, | |
nparams, | |||
pmask | |||
) | {_SC(#name),_string_##name,nparams,pmask} |
Definition at line 327 of file sqstdstring.cpp.
#define _DECL_REX_FUNC | ( | name, | |
nparams, | |||
pmask | |||
) | {_SC(#name),_regexp_##name,nparams,pmask} |
Definition at line 316 of file sqstdstring.cpp.
#define ADDITIONAL_FORMAT_SPACE (100*sizeof(SQChar)) |
Definition at line 23 of file sqstdstring.cpp.
Referenced by sqstd_format().
#define MAX_FORMAT_LEN 20 |
Definition at line 21 of file sqstdstring.cpp.
Referenced by sqstd_format(), and validate_format().
#define MAX_WFORMAT_LEN 3 |
Definition at line 22 of file sqstdstring.cpp.
Referenced by validate_format().
#define scatoi atoi |
Definition at line 18 of file sqstdstring.cpp.
Referenced by validate_format().
#define scsnprintf snprintf |
Definition at line 17 of file sqstdstring.cpp.
#define scstrchr strchr |
Definition at line 16 of file sqstdstring.cpp.
Referenced by validate_format().
#define scstrtok strtok |
Definition at line 19 of file sqstdstring.cpp.
Referenced by _string_split().
#define SETUP_REX | ( | v | ) |
Definition at line 217 of file sqstdstring.cpp.
Referenced by _regexp_capture(), _regexp_match(), _regexp_search(), and _regexp_subexpcount().
Definition at line 149 of file sqstdstring.cpp.
Referenced by _string_lstrip(), and _string_strip().
Definition at line 156 of file sqstdstring.cpp.
Referenced by _string_rstrip(), and _string_strip().
|
static |
Definition at line 243 of file sqstdstring.cpp.
References sq_newtable(), sq_pushinteger(), sq_pushstring(), and sq_rawset().
Referenced by _regexp_capture(), and _regexp_search().
|
static |
Definition at line 310 of file sqstdstring.cpp.
References sq_pushstring().
|
static |
Definition at line 268 of file sqstdstring.cpp.
References _addrexmatch(), SETUP_REX, sq_arrayappend(), sq_getinteger(), sq_getstring(), sq_gettop(), sq_newarray(), sqstd_rex_getsubexp(), sqstd_rex_getsubexpcount(), and sqstd_rex_search().
|
static |
Definition at line 299 of file sqstdstring.cpp.
References _rexobj_releasehook(), sq_getstring(), sq_setinstanceup(), sq_setreleasehook(), sq_throwerror(), and sqstd_rex_compile().
|
static |
Definition at line 229 of file sqstdstring.cpp.
References SETUP_REX, sq_getstring(), sq_pushbool(), and sqstd_rex_match().
|
static |
Definition at line 254 of file sqstdstring.cpp.
References _addrexmatch(), SETUP_REX, sq_getinteger(), sq_getstring(), sq_gettop(), and sqstd_rex_search().
|
static |
Definition at line 292 of file sqstdstring.cpp.
References SETUP_REX, sq_pushinteger(), and sqstd_rex_getsubexpcount().
|
static |
Definition at line 222 of file sqstdstring.cpp.
References sqstd_rex_free().
Referenced by _regexp_constructor().
|
static |
Definition at line 139 of file sqstdstring.cpp.
References NULL, sq_pushstring(), and sqstd_format().
|
static |
Definition at line 178 of file sqstdstring.cpp.
References __strip_l(), sq_getstring(), and sq_pushstring().
|
static |
Definition at line 187 of file sqstdstring.cpp.
References __strip_r(), sq_getsize(), sq_getstring(), and sq_pushstring().
|
static |
Definition at line 197 of file sqstdstring.cpp.
References NULL, scstrtok, sq_arrayappend(), sq_getscratchpad(), sq_getsize(), sq_getstring(), sq_newarray(), sq_pushstring(), and sq_throwerror().
|
static |
Definition at line 167 of file sqstdstring.cpp.
References __strip_l(), __strip_r(), sq_getsize(), sq_getstring(), and sq_pushstring().
SQRESULT sqstd_format | ( | HSQUIRRELVM | v, |
SQInteger | nformatstringidx, | ||
SQInteger * | outlen, | ||
SQChar ** | output | ||
) |
Definition at line 69 of file sqstdstring.cpp.
References ADDITIONAL_FORMAT_SPACE, MAX_FORMAT_LEN, sq_getfloat(), sq_getinteger(), sq_getscratchpad(), sq_getsize(), sq_getstring(), sq_gettop(), sq_throwerror(), and validate_format().
Referenced by _string_format().
SQInteger sqstd_register_stringlib | ( | HSQUIRRELVM | v | ) |
Definition at line 338 of file sqstdstring.cpp.
References rexobj_funcs, sq_newclass(), sq_newclosure(), sq_pushstring(), sq_setnativeclosurename(), sq_setparamscheck(), and stringlib_funcs.
Referenced by ScriptingManager::ScriptingManager().
|
static |
Definition at line 25 of file sqstdstring.cpp.
References MAX_FORMAT_LEN, MAX_WFORMAT_LEN, scatoi, scstrchr, and sq_throwerror().
Referenced by sqstd_format().
|
static |
Definition at line 317 of file sqstdstring.cpp.
Referenced by sqstd_register_stringlib().
|
static |
Definition at line 328 of file sqstdstring.cpp.
Referenced by sqstd_register_stringlib().