42static const WCHAR charCodeAtW[] = {
'c',
'h',
'a',
'r',
'C',
'o',
'd',
'e',
'A',
't',0};
49static const WCHAR lastIndexOfW[] = {
'l',
'a',
's',
't',
'I',
'n',
'd',
'e',
'x',
'O',
'f',0};
62static const WCHAR toLowerCaseW[] = {
't',
'o',
'L',
'o',
'w',
'e',
'r',
'C',
'a',
's',
'e',0};
63static const WCHAR toUpperCaseW[] = {
't',
'o',
'U',
'p',
'p',
'e',
'r',
'C',
'a',
's',
'e',0};
64static const WCHAR toLocaleLowerCaseW[] = {
't',
'o',
'L',
'o',
'c',
'a',
'l',
'e',
'L',
'o',
'w',
'e',
'r',
'C',
'a',
's',
'e',0};
65static const WCHAR toLocaleUpperCaseW[] = {
't',
'o',
'L',
'o',
'c',
'a',
'l',
'e',
'U',
'p',
'p',
'e',
'r',
'C',
'a',
's',
'e',0};
67static const WCHAR localeCompareW[] = {
'l',
'o',
'c',
'a',
'l',
'e',
'C',
'o',
'm',
'p',
'a',
'r',
'e',0};
68static const WCHAR fromCharCodeW[] = {
'f',
'r',
'o',
'm',
'C',
'h',
'a',
'r',
'C',
'o',
'd',
'e',0};
117 TRACE(
"%p\n", jsthis);
128 WARN(
"this is not a string object\n");
157 unsigned tagname_len;
218 unsigned attrname_len =
lstrlenW(attrname);
259 static const WCHAR colorW[] = {
'N',
'A',
'M',
'E',0};
267 static const WCHAR bigtagW[] = {
'B',
'I',
'G',0};
274 static const WCHAR blinktagW[] = {
'B',
'L',
'I',
'N',
'K',0};
281 static const WCHAR boldtagW[] = {
'B',0};
403 const unsigned str_cnt =
argc+1;
408 strs = heap_alloc_zero(str_cnt *
sizeof(*strs));
422 for(
i=0;
i < str_cnt;
i++) {
433 for(
i=0;
i < str_cnt;
i++)
459 static const WCHAR fixedtagW[] = {
'T',
'T',0};
466 static const WCHAR fontW[] = {
'F',
'O',
'N',
'T',0};
467 static const WCHAR colorW[] = {
'C',
'O',
'L',
'O',
'R',0};
475 static const WCHAR fontW[] = {
'F',
'O',
'N',
'T',0};
476 static const WCHAR colorW[] = {
'S',
'I',
'Z',
'E',0};
545 static const WCHAR italicstagW[] = {
'I',0};
616 static const WCHAR colorW[] = {
'H',
'R',
'E',
'F',0};
681 new_size =
buf->size ?
buf->size<<1 : 16;
692 buf->size = new_size;
740 for(
i=0;
i <
match->paren_count;
i++) {
741 if(
match->parens[
i].index != -1)
761 for(
i=0;
i <=
match->paren_count;
i++)
778 jsstr_t *rep_jsstr, *match_jsstr, *jsstr;
847 last_match.cp =
match->cp;
848 last_match.match_len =
match->match_len;
851 re_flags &= ~REM_ALLOC_RESULT;
879 }
else if(rep_str && regexp) {
917 }
else if(
idx && idx <= match->paren_count) {
925 if(
match->parens[
idx-1].index != -1)
944 static const WCHAR undefinedW[] = {
'u',
'n',
'd',
'e',
'f',
'i',
'n',
'e',
'd'};
953 else if(!
match->match_len)
973 ctx->last_match_index = last_match.cp-
str-last_match.match_len;
974 ctx->last_match_length = last_match.match_len;
1126 static const WCHAR smalltagW[] = {
'S',
'M',
'A',
'L',
'L',0};
1134 size_t length,
i = 0, match_len = 0;
1138 jsstr_t *jsstr, *match_jsstr, *tmp_str;
1204 match_result.
cp =
str;
1217 if(match_result.
cp ==
ptr) {
1222 TRACE(
"retried, got match %d %d\n", (
int)(match_result.
cp - match_result.
match_len -
str),
1229 }
else if(match_str) {
1253 ptr = match_result.
cp;
1255 ptr = ptr2 + match_len;
1293 static const WCHAR striketagW[] = {
'S',
'T',
'R',
'I',
'K',
'E',0};
1300 static const WCHAR subtagW[] = {
'S',
'U',
'B',0};
1421 static const WCHAR suptagW[] = {
'S',
'U',
'P',0};
1513 WARN(
"to_flat_string failed: %08x\n",
hres);
1707 case DISPATCH_CONSTRUCT: {
1742 if(object_prototype)
1774 static const WCHAR StringW[] = {
'S',
't',
'r',
'i',
'n',
'g',0};
1796 *
ret = &
string->dispex;
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static void * heap_realloc(void *mem, size_t len)
HRESULT create_array(script_ctx_t *ctx, DWORD length, jsdisp_t **ret)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
HRESULT create_builtin_constructor(script_ctx_t *ctx, builtin_invoke_t value_proc, const WCHAR *name, const builtin_info_t *builtin_info, DWORD flags, jsdisp_t *prototype, jsdisp_t **ret)
static const WCHAR toLocaleUpperCaseW[]
static const WCHAR substrW[]
static HRESULT String_charCodeAt(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static BOOL strbuf_ensure_size(strbuf_t *buf, unsigned len)
static const WCHAR trimW[]
static const WCHAR linkW[]
static const builtin_prop_t StringInst_props[]
HRESULT create_string_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp_t **ret)
static HRESULT String_match(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT String_sup(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT String_small(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR indexOfW[]
static HRESULT String_blink(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR splitW[]
static StringInstance * string_from_jsdisp(jsdisp_t *jsdisp)
static const WCHAR sliceW[]
static HRESULT String_slice(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR localeCompareW[]
static const WCHAR valueOfW[]
static const builtin_info_t StringInst_info
static HRESULT String_fixed(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR replaceW[]
static HRESULT String_toLowerCase(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static StringInstance * string_this(vdisp_t *jsthis)
static HRESULT do_attribute_tag_format(script_ctx_t *ctx, vdisp_t *jsthis, unsigned argc, jsval_t *argv, jsval_t *r, const WCHAR *tagname, const WCHAR *attrname)
static HRESULT get_string_flat_val(script_ctx_t *ctx, vdisp_t *jsthis, jsstr_t **jsval, const WCHAR **val)
static HRESULT String_get_value(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT String_split(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR anchorW[]
static HRESULT String_search(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT get_string_val(script_ctx_t *ctx, vdisp_t *jsthis, jsstr_t **val)
static HRESULT String_toLocaleLowerCase(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR lengthW[]
HRESULT create_string(script_ctx_t *ctx, jsstr_t *str, jsdisp_t **ret)
static HRESULT rep_call(script_ctx_t *ctx, jsdisp_t *func, jsstr_t *jsstr, const WCHAR *str, match_state_t *match, jsstr_t **ret)
static HRESULT String_big(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT String_fontcolor(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR strikeW[]
static HRESULT String_italics(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR fromCharCodeW[]
static HRESULT String_bold(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR boldW[]
static const WCHAR toLocaleLowerCaseW[]
static const builtin_info_t StringConstr_info
static HRESULT String_strike(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT String_trim(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static StringInstance * string_from_vdisp(vdisp_t *vdisp)
static HRESULT strbuf_append_jsstr(strbuf_t *buf, jsstr_t *str)
static const WCHAR matchW[]
static HRESULT strbuf_append(strbuf_t *buf, const WCHAR *str, DWORD len)
static HRESULT String_lastIndexOf(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static void String_destructor(jsdisp_t *dispex)
static HRESULT string_alloc(script_ctx_t *ctx, jsdisp_t *object_prototype, jsstr_t *str, StringInstance **ret)
static HRESULT String_indexOf(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR concatW[]
static HRESULT String_toUpperCase(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR fontcolorW[]
static HRESULT String_anchor(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static unsigned String_idx_length(jsdisp_t *jsdisp)
static HRESULT String_valueOf(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR bigW[]
static const WCHAR toUpperCaseW[]
static const WCHAR toStringW[]
static HRESULT String_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT String_get_length(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static const WCHAR fixedW[]
static HRESULT String_replace(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR searchW[]
static const WCHAR charCodeAtW[]
static HRESULT String_charAt(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR smallW[]
static HRESULT stringobj_to_string(vdisp_t *jsthis, jsval_t *r)
static HRESULT String_localeCompare(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT StringConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR lastIndexOfW[]
static HRESULT String_sub(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT do_attributeless_tag_format(script_ctx_t *ctx, vdisp_t *jsthis, jsval_t *r, const WCHAR *tagname)
static const WCHAR charAtW[]
static const builtin_prop_t String_props[]
static HRESULT String_toLocaleUpperCase(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const builtin_info_t String_info
static const WCHAR substringW[]
static const WCHAR blinkW[]
static const WCHAR fontsizeW[]
static const WCHAR italicsW[]
static HRESULT String_link(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT String_fontsize(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT String_substring(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR toLowerCaseW[]
static HRESULT String_idx_get(jsdisp_t *jsdisp, unsigned idx, jsval_t *r)
static const builtin_prop_t StringConstr_props[]
static HRESULT String_concat(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT StringConstr_fromCharCode(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR supW[]
static const WCHAR subW[]
static HRESULT String_substr(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR fontW[]
static const WCHAR undefinedW[]
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
static HRESULT to_string(VARIANT *src, BSTR *dst)
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
HRESULT jsdisp_call_value(jsdisp_t *jsfunc, IDispatch *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
HRESULT init_dispex_from_constr(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *constr)
jsdisp_t * iface_to_jsdisp(IDispatch *iface)
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
HRESULT jsdisp_propput_idx(jsdisp_t *obj, DWORD idx, jsval_t val)
static const WCHAR StringW[]
static BOOL is_vclass(vdisp_t *vdisp, jsclass_t class)
#define DEFAULT_FUNCTION_VALUE
HRESULT create_regexp_var(script_ctx_t *, jsval_t, jsval_t *, jsdisp_t **) DECLSPEC_HIDDEN
static void jsdisp_release(jsdisp_t *jsdisp)
#define REM_NO_CTX_UPDATE
HRESULT regexp_match_next(script_ctx_t *, jsdisp_t *, DWORD, jsstr_t *, struct match_state_t **) DECLSPEC_HIDDEN
#define SCRIPTLANGUAGEVERSION_ES5
static BOOL is_int32(double d)
HRESULT to_integer(script_ctx_t *, jsval_t, double *) DECLSPEC_HIDDEN
HRESULT to_uint32(script_ctx_t *, jsval_t, UINT32 *) DECLSPEC_HIDDEN
HRESULT regexp_string_match(script_ctx_t *, jsdisp_t *, jsstr_t *, jsval_t *) DECLSPEC_HIDDEN
HRESULT to_flat_string(script_ctx_t *, jsval_t, jsstr_t **, const WCHAR **) DECLSPEC_HIDDEN
HRESULT create_regexp(script_ctx_t *, jsstr_t *, DWORD, jsdisp_t **) DECLSPEC_HIDDEN
static BOOL is_class(jsdisp_t *jsdisp, jsclass_t class)
jsstr_t * jsstr_alloc_len(const WCHAR *buf, unsigned len)
jsstr_t * jsstr_undefined(void)
jsstr_t * jsstr_empty(void)
jsstr_t * jsstr_concat(jsstr_t *str1, jsstr_t *str2)
const char * debugstr_jsstr(jsstr_t *str)
void jsstr_extract(jsstr_t *str, unsigned off, unsigned len, WCHAR *buf)
jsstr_t * jsstr_alloc_buf(unsigned len, WCHAR **buf)
static jsstr_t * jsstr_substr(jsstr_t *str, unsigned off, unsigned len)
static jsstr_t * jsstr_addref(jsstr_t *str)
static const WCHAR * jsstr_flatten(jsstr_t *str)
static void jsstr_release(jsstr_t *str)
static unsigned jsstr_length(jsstr_t *str)
static unsigned jsstr_flush(jsstr_t *str, WCHAR *buf)
void jsval_release(jsval_t val)
static jsval_t jsval_null(void)
static jsval_t jsval_string(jsstr_t *str)
static jsval_t jsval_obj(jsdisp_t *obj)
static jsstr_t * get_string(jsval_t v)
static BOOL is_undefined(jsval_t v)
static jsval_t jsval_disp(IDispatch *obj)
static IDispatch * get_object(jsval_t v)
static BOOL is_object_instance(jsval_t v)
static jsval_t jsval_number(double n)
#define memcpy(s1, s2, n)
#define CONTAINING_RECORD(address, type, field)