search for: swfdec_action_target_path

Displaying 14 results from an estimated 14 matches for "swfdec_action_target_path".

2007 Jun 20
1
Branch 'as' - 2 commits - libswfdec/swfdec_as_interpret.c
libswfdec/swfdec_as_interpret.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) New commits: diff-tree 9c5cb7cb9f6278896bc8a1e7cd7fb541b079c8de (from 1e19719b58b5cfcb800c81a5f5432c3ad662dbbc) Author: Benjamin Otte <otte at gnome.org> Date: Wed Jun 20 20:58:52 2007 +0200 the modulo arguments were mixed diff --git a/libswfdec/swfdec_as_interpret.c
2007 Jan 31
0
Branch 'interpreter' - 3 commits - libswfdec/js libswfdec/swfdec_script.c
...g_assert_not_reached (); + return JS_FALSE; + } + + cx->fp->sp--; + return JS_NewNumberValue (cx, d, &cx->fp->sp[-1]); +} + +static JSBool swfdec_action_shift (JSContext *cx, guint action, const guint8 *data, guint len) { guint32 amount, value; @@ -1414,6 +1443,54 @@ swfdec_action_target_path (JSContext *cx return JS_TRUE; } +static JSBool +swfdec_action_define_local (JSContext *cx, guint action, const guint8 *data, guint len) +{ + const char *name; + + if (cx->fp->callobj == NULL) { + SWFDEC_ERROR ("FIXME: no local scope"); + return JS_FALSE; + } + name...
2007 Apr 11
0
Branch 'as' - 4 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...c_action_type_of, swfdec_action_type_of, swfdec_action_type_of } }, +#endif + [SWFDEC_AS_ACTION_TYPE_OF] = { "TypeOf", NULL, 1, 1, { NULL, NULL, swfdec_action_type_of, swfdec_action_type_of, swfdec_action_type_of } }, +#if 0 [0x45] = { "TargetPath", NULL, 1, 1, { NULL, NULL, swfdec_action_target_path, swfdec_action_target_path, swfdec_action_target_path } }, [0x46] = { "Enumerate", NULL }, #endif diff --git a/libswfdec/swfdec_as_types.c b/libswfdec/swfdec_as_types.c index b39f592..2446681 100644 --- a/libswfdec/swfdec_as_types.c +++ b/libswfdec/swfdec_as_types.c @@ -92,6 +92,12 @@...
2007 Mar 05
0
5 commits - libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c test/trace
...t, swfdec_action_init_object, swfdec_action_init_object } }, - [0x44] = { "Typeof", NULL }, + [0x44] = { "TypeOf", NULL, 1, 1, { NULL, NULL, swfdec_action_type_of, swfdec_action_type_of, swfdec_action_type_of } }, [0x45] = { "TargetPath", NULL, 1, 1, { NULL, NULL, swfdec_action_target_path, swfdec_action_target_path, swfdec_action_target_path } }, [0x46] = { "Enumerate", NULL }, [0x47] = { "Add2", NULL, 2, 1, { NULL, NULL, swfdec_action_add2_5, swfdec_action_add2_5, swfdec_action_add2_7 } }, diff-tree 44c86abeeb6f4aac79455c6e7873aaa5ee627f2e (from 1041f2ee1c...
2007 Apr 16
0
Branch 'as' - 3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...foreach (obj, swfdec_action_do_enumerate, stack); } -#endif static void swfdec_action_logical (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) @@ -2204,7 +2224,7 @@ const SwfdecActionSpec swfdec_as_actions #if 0 [0x45] = { "TargetPath", NULL, 1, 1, { NULL, NULL, swfdec_action_target_path, swfdec_action_target_path, swfdec_action_target_path } }, #endif - [SWFDEC_AS_ACTION_ENUMERATE] = { "Enumerate", NULL }, + [SWFDEC_AS_ACTION_ENUMERATE] = { "Enumerate", NULL, 1, -1, { NULL, NULL, swfdec_action_enumerate, swfdec_action_enumerate, swfdec_action_enumerate } },...
2007 Mar 05
0
11 commits - configure.ac libswfdec/swfdec_js_movie.c libswfdec/swfdec_root_movie.c libswfdec/swfdec_root_movie.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_swf_decoder.c
...n_init_array, swfdec_action_init_array } }, [0x43] = { "InitObject", NULL, -1, 1, { NULL, NULL, swfdec_action_init_object, swfdec_action_init_object, swfdec_action_init_object } }, [0x44] = { "Typeof", NULL }, [0x45] = { "TargetPath", NULL, 1, 1, { NULL, NULL, swfdec_action_target_path, swfdec_action_target_path, swfdec_action_target_path } }, diff-tree ea4dcb58d789607a0e48c9d3bf17b210fd1969ea (from e195ae34fffdd9ce861a1466529078bdc3db2a11) Author: Benjamin Otte <otte@gnome.org> Date: Sun Mar 4 17:12:37 2007 +0100 read DoInitAction contents diff --git a/libswfdec/sw...
2007 May 23
0
Branch 'as' - 7 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_strings.c
...tion_init_object, swfdec_action_init_object, swfdec_action_init_object } }, [SWFDEC_AS_ACTION_TYPE_OF] = { "TypeOf", NULL, 1, 1, { NULL, NULL, swfdec_action_type_of, swfdec_action_type_of, swfdec_action_type_of } }, #if 0 [0x45] = { "TargetPath", NULL, 1, 1, { NULL, NULL, swfdec_action_target_path, swfdec_action_target_path, swfdec_action_target_path } }, diff-tree 9228f671c687da6698b259fbce8d56ada7ab524a (from 608fea8b3a14545b57ed30aaccd991bf4ba4933f) Author: Benjamin Otte <otte at gnome.org> Date: Tue May 22 21:25:18 2007 +0200 messed up a check for calling native functions d...
2007 Jan 31
0
Branch 'interpreter' - 20 commits - autogen.sh configure.ac libswfdec/js libswfdec/swfdec_debug.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_script.c
...Benjamin Otte <otte@gnome.org> Date: Wed Jan 31 16:27:20 2007 +0100 add print function for SetTarget diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index 9921af8..7c24b10 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -1407,6 +1407,15 @@ swfdec_action_target_path (JSContext *cx /*** PRINT FUNCTIONS ***/ static char * +swfdec_action_print_set_target (guint action, const guint8 *data, guint len) +{ + if (!memchr (data, 0, len)) { + SWFDEC_ERROR ("SetTarget action does not specify a string"); + return JS_FALSE; + } + return g_strconcat (...
2007 Nov 07
0
14 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_script.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_text_field_movie.c
...swfdec_action_init_object, swfdec_action_init_object } }, - [SWFDEC_AS_ACTION_TYPE_OF] = { "TypeOf", NULL, 1, 1, { NULL, NULL, swfdec_action_type_of, swfdec_action_type_of, swfdec_action_type_of } }, - [SWFDEC_AS_ACTION_TARGET_PATH] = { "TargetPath", NULL, 1, 1, { NULL, NULL, swfdec_action_target_path, swfdec_action_target_path, swfdec_action_target_path } }, - [SWFDEC_AS_ACTION_ENUMERATE] = { "Enumerate", NULL, 1, -1, { NULL, NULL, swfdec_action_enumerate, swfdec_action_enumerate, swfdec_action_enumerate } }, - [SWFDEC_AS_ACTION_ADD2] = { "Add2", NULL, 2, 1, { NULL, NULL,...
2007 Apr 12
0
Branch 'as' - 14 commits - libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h
...e_local } }, @@ -2206,8 +2206,8 @@ const SwfdecActionSpec swfdec_as_actions [SWFDEC_AS_ACTION_TYPE_OF] = { "TypeOf", NULL, 1, 1, { NULL, NULL, swfdec_action_type_of, swfdec_action_type_of, swfdec_action_type_of } }, #if 0 [0x45] = { "TargetPath", NULL, 1, 1, { NULL, NULL, swfdec_action_target_path, swfdec_action_target_path, swfdec_action_target_path } }, - [0x46] = { "Enumerate", NULL }, #endif + [SWFDEC_AS_ACTION_ENUMERATE] = { "Enumerate", NULL }, [SWFDEC_AS_ACTION_ADD2] = { "Add2", NULL, 2, 1, { NULL, NULL, swfdec_action_add2, swfdec_action_add2, swfde...
2007 Apr 04
0
Branch 'as' - 4 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
..., &cx->fp->sp[-1]); +} + +static void +swfdec_action_to_integer (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) +{ + double d = swfdec_value_to_number (cx, cx->fp->sp[-1]); + + return JS_NewNumberValue (cx, (int) d, &cx->fp->sp[-1]); +} + +static void +swfdec_action_target_path (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) +{ + SwfdecMovie *movie = swfdec_scriptable_from_jsval (cx, cx->fp->sp[-1], SWFDEC_TYPE_MOVIE); + + if (movie == NULL) { + cx->fp->sp[-1] = JSVAL_VOID; + } else { + char *s = swfdec_movie_get_path (movie); +...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...g_assert_not_reached (); + return JS_FALSE; + } + + cx->fp->sp--; + return JS_NewNumberValue (cx, d, &cx->fp->sp[-1]); +} + +static JSBool swfdec_action_shift (JSContext *cx, guint action, const guint8 *data, guint len) { guint32 amount, value; @@ -1414,6 +1443,54 @@ swfdec_action_target_path (JSContext *cx return JS_TRUE; } +static JSBool +swfdec_action_define_local (JSContext *cx, guint action, const guint8 *data, guint len) +{ + const char *name; + + if (cx->fp->callobj == NULL) { + SWFDEC_ERROR ("FIXME: no local scope"); + return JS_FALSE; + } + name...
2007 Jun 27
0
Branch 'as' - 16 commits - configure.ac libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_script_function.c
...JECT (&funval, SWFDEC_AS_OBJECT (fun)); - swfdec_as_object_set_variable (frame->var_object, function_name, &funval); + swfdec_as_object_set_variable (frame->target, function_name, &funval); swfdec_as_object_unroot (SWFDEC_AS_OBJECT (fun)); } @@ -1673,10 +1645,16 @@ swfdec_action_target_path (SwfdecAsConte static void swfdec_action_define_local (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { + SwfdecAsObject *target; const char *name; name = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx->frame->stack, 2)); - swfdec_as_object_set_variabl...
2007 Jul 04
0
Branch 'as' - 25 commits - libswfdec/Makefile.am libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_boolean.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c
...ul 3 15:08:28 2007 +0100 if the object isn't a movie, TargetPath returns undefined diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index f709b6e..cc36c7e 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1652,7 +1652,7 @@ swfdec_action_target_path (SwfdecAsConte if (!SWFDEC_AS_VALUE_IS_OBJECT (val) || !SWFDEC_IS_MOVIE (movie = (SwfdecMovie *) SWFDEC_AS_VALUE_GET_OBJECT (val))) { SWFDEC_FIXME ("What's the TargetPath for non-movies?"); - SWFDEC_AS_VALUE_SET_STRING (val, SWFDEC_AS_STR_EMPTY); + SWFDEC_AS_VALUE...