search for: swfdec_action_get_vari

Displaying 18 results from an estimated 18 matches for "swfdec_action_get_vari".

2007 Sep 26
1
Youtube broken by 89d295a94
...m/player2.swf This patch restores Youtube support in the git head, but it's just a hack. diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 5dc9a24..e94b835 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -578,6 +578,7 @@ swfdec_action_get_variable (SwfdecAsContext *cx, guint action, const guint8 *dat val = swfdec_as_stack_peek (cx, 1); s = swfdec_as_value_to_string (cx, val); + swfdec_as_context_eval (cx, NULL, s, val); if (swfdec_action_get_movie_by_path (cx, s, &object, &s)) { if (object) { if (s) { @@ -...
2007 Apr 04
0
Branch 'as' - 9 commits - 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_stack.c libswfdec/swfdec_as_stack.h
...d ActionSetVariable diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 60c4046..aab5f44 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -512,22 +512,18 @@ swfdec_action_push (SwfdecAsContext *cx, } } -#if 0 static void swfdec_action_get_variable (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { const char *s; - s = swfdec_js_to_string (cx, cx->fp->sp[-1]); - if (s == NULL) - return JS_FALSE; - cx->fp->sp[-1] = swfdec_js_eval (cx, NULL, s); + s = swfdec_as_value_to_string (cx, swfdec_as_stack_...
2007 Jan 18
0
Branch 'interpreter' - 4 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_tag.c
...; #include "swfdec_decoder.h" +#include "swfdec_js.h" #include "swfdec_movie.h" #include "swfdec_root_movie.h" @@ -305,6 +306,18 @@ swfdec_action_push (JSContext *cx, guint return swfdec_bits_left (&bits) ? JS_TRUE : JS_FALSE; } +static JSBool +swfdec_action_get_variable (JSContext *cx, guint action, const guint8 *data, guint len) +{ + const char *s; + + s = swfdec_js_to_string (cx, cx->fp->sp[-1]); + if (s == NULL) + return JS_FALSE; + cx->fp->sp[-1] = swfdec_js_eval (cx, cx->fp->scopeChain, s); + return JS_TRUE; +} + /*** PRINT FUNC...
2007 Jan 24
0
Branch 'interpreter' - 8 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_js.c libswfdec/swfdec_js.h libswfdec/swfdec_script.c test/swfdec_out.c test/swfdec_out.h test/swfedit_tag.c test/swfedit_token.c test/swfedit_token.h
...+ return g_strdup_printf ("GetURL %s %s", url, target); +} + +static char * swfdec_action_print_if (guint action, const guint8 *data, guint len) { if (len != 2) { @@ -942,7 +995,7 @@ static const SwfdecActionSpec actions[25 [0x1c] = { "GetVariable", NULL, 1, 1, { NULL, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable } }, [0x1d] = { "SetVariable", NULL, 2, 0, { NULL, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable } }, [0x20] = { "SetTarget2&...
2007 Apr 05
0
Branch 'as' - 9 commits - configure.ac libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
..._action_pop, swfdec_action_pop } }, +#if 0 [0x18] = { "ToInteger", NULL, 1, 1, { NULL, swfdec_action_to_integer, swfdec_action_to_integer, swfdec_action_to_integer, swfdec_action_to_integer } }, #endif [SWFDEC_AS_ACTION_GET_VARIABLE] = { "GetVariable", NULL, 1, 1, { NULL, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable } }, @@ -2355,8 +2304,10 @@ const SwfdecActionSpec swfdec_as_actions #if 0 [0x20] = { "SetTarget2", NULL, 1, 0, { swfdec_action_set_target2, swfdec_action_set_target2, swfdec_action_set_target2, sw...
2007 Jan 25
0
Branch 'interpreter' - 28 commits - configure.ac libswfdec/js libswfdec/swfdec_buffer.c libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_player.c
...js_eval (cx, obj, bytes); + *rval = swfdec_js_eval (cx, obj, bytes, FALSE); } else { *rval = argv[0]; } diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index 23ca8ef..5b9f960 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -315,7 +315,26 @@ swfdec_action_get_variable (JSContext *c s = swfdec_js_to_string (cx, cx->fp->sp[-1]); if (s == NULL) return JS_FALSE; - cx->fp->sp[-1] = swfdec_js_eval (cx, cx->fp->scopeChain, s); + cx->fp->sp[-1] = swfdec_js_eval (cx, cx->fp->scopeChain, s, + ((SwfdecScript *) cx->fp...
2007 Jan 29
0
Branch 'interpreter' - 18 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_sound.c libswfdec/swfdec_pattern.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_script.c
...rn JS_TRUE; + } + return swfdec_action_do_set_target (cx, JSVAL_TO_OBJECT (val)); +} + /*** PRINT FUNCTIONS ***/ static char * @@ -1132,7 +1185,7 @@ static const SwfdecActionSpec actions[25 [0x18] = { "ToInteger", NULL }, [0x1c] = { "GetVariable", NULL, 1, 1, { NULL, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable } }, [0x1d] = { "SetVariable", NULL, 2, 0, { NULL, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable } }, - [0x20] = { "SetTarget2&...
2007 Apr 12
0
Branch 'as' - 15 commits - 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 libswfdec/swfdec_as_interpret.c
...;SetTarget ", data, NULL); } +#if 0 static char * swfdec_action_print_define_function (guint action, const guint8 *data, guint len) { @@ -2166,8 +2146,8 @@ const SwfdecActionSpec swfdec_as_actions #endif [SWFDEC_AS_ACTION_GET_VARIABLE] = { "GetVariable", NULL, 1, 1, { NULL, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable } }, [SWFDEC_AS_ACTION_SET_VARIABLE] = { "SetVariable", NULL, 2, 0, { NULL, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable } }, + [SW...
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
...pop, swfdec_action_pop } }, - [SWFDEC_AS_ACTION_TO_INTEGER] = { "ToInteger", NULL, 1, 1, { NULL, swfdec_action_to_integer, swfdec_action_to_integer, swfdec_action_to_integer, swfdec_action_to_integer } }, - [SWFDEC_AS_ACTION_GET_VARIABLE] = { "GetVariable", NULL, 1, 1, { NULL, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable } }, - [SWFDEC_AS_ACTION_SET_VARIABLE] = { "SetVariable", NULL, 2, 0, { NULL, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable } }, - [SW...
2007 Oct 15
0
8 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_sound.c libswfdec/swfdec_sound.h test/trace
...r (i = 0; i < values.length; i++) { + trace (construct (values[i])); +} + +loadMovie ("FSCommand:quit", ""); commit 57213bb1748bd4efd1b171a70a35c964068f1594 Author: Benjamin Otte <otte at gnome.org> Date: Mon Oct 15 18:29:48 2007 +0200 make NewObject action call swfdec_action_get_variable() instead of swfdec_as_context_eval() diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index a3c0c15..f2022b4 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -677,24 +677,6 @@ swfdec_action_set_variable (SwfdecAsContext *cx, g...
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
...on_pop, swfdec_action_pop } }, - [0x18] = { "ToInteger", NULL }, + [0x18] = { "ToInteger", NULL, 1, 1, { NULL, swfdec_action_to_integer, swfdec_action_to_integer, swfdec_action_to_integer, swfdec_action_to_integer } }, [0x1c] = { "GetVariable", NULL, 1, 1, { NULL, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable } }, [0x1d] = { "SetVariable", NULL, 2, 0, { NULL, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable } }, - [0x20] = { "SetTarget22...
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
...!swfdec_action_push_string (cx, swfdec_constant_pool_get (pool, i))) + return JS_FALSE; + break; + } + default: + SWFDEC_ERROR ("Push: type %u not implemented", type); + return JS_FALSE; + } + } + return swfdec_bits_left (&bits) ? JS_FALSE : JS_TRUE; +} + +static void +swfdec_action_get_variable (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) +{ + const char *s; + + s = swfdec_js_to_string (cx, cx->fp->sp[-1]); + if (s == NULL) + return JS_FALSE; + cx->fp->sp[-1] = swfdec_js_eval (cx, NULL, s); +#ifdef SWFDEC_WARN_MISSING_PROPERTIES + if (cx->f...
2007 Mar 20
0
9 commits - configure.ac libswfdec/swfdec_bits.c libswfdec/swfdec_debug.c libswfdec/swfdec_js.c libswfdec/swfdec_script.c libswfdec/swfdec_sound.c
...is to get SWFDEC_WARN'd about missing properties of objects. + * This can be useful to find out about unimplemented native properties, + * but usually just causes a lot of spam. */ +//#define SWFDEC_WARN_MISSING_PROPERTIES + /*** CONSTANT POOLS ***/ SwfdecConstantPool * @@ -655,6 +660,11 @@ swfdec_action_get_variable (JSContext *c if (s == NULL) return JS_FALSE; cx->fp->sp[-1] = swfdec_js_eval (cx, NULL, s); +#ifdef SWFDEC_WARN_MISSING_PROPERTIES + if (cx->fp->sp[-1] == JSVAL_VOID) { + SWFDEC_WARNING ("no variable named %s", s); + } +#endif return JS_TRUE; } @@ -1...
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
...on_pop, swfdec_action_pop } }, - [0x18] = { "ToInteger", NULL }, + [0x18] = { "ToInteger", NULL, 1, 1, { NULL, swfdec_action_to_integer, swfdec_action_to_integer, swfdec_action_to_integer, swfdec_action_to_integer } }, [0x1c] = { "GetVariable", NULL, 1, 1, { NULL, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable } }, [0x1d] = { "SetVariable", NULL, 2, 0, { NULL, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable } }, - [0x20] = { "SetTarget22...
2007 Sep 06
0
3 commits - libswfdec/swfdec_as_date.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_sprite_movie.c
...+ movie = SWFDEC_AS_OBJECT (swfdec_movie_get_by_name (SWFDEC_MOVIE (movie), var)); + if (movie == NULL) + return FALSE; + } + *object = movie; + *variable = NULL; + return TRUE; + } else { + *object = movie; + *variable = path; + return TRUE; + } +} + static void swfdec_action_get_variable (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { + SwfdecAsValue *val; const char *s; + SwfdecAsObject *object; - s = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1)); - swfdec_as_context_eval (cx, NULL, s, swfdec_as_stack_peek (cx, 1)); + val = swfdec...
2007 Jan 26
0
Branch 'interpreter' - 9 commits - libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_debugger.c libswfdec/swfdec_debugger.h libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_event.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c
...Date: Fri Jan 26 21:32:40 2007 +0100 use NULL in _eval of SetVariable and GetVariable to walk the scope chain diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index a3bb563..7848e14 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -316,7 +316,7 @@ swfdec_action_get_variable (JSContext *c s = swfdec_js_to_string (cx, cx->fp->sp[-1]); if (s == NULL) return JS_FALSE; - cx->fp->sp[-1] = swfdec_js_eval (cx, cx->fp->scopeChain, s); + cx->fp->sp[-1] = swfdec_js_eval (cx, NULL, s); return JS_TRUE; } @@ -329,7 +329,7 @@ swfdec_act...
2007 Sep 13
0
5 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_scope.c libswfdec/swfdec_as_scope.h libswfdec/swfdec_as_script_function.c
...swfdec_as_frame_delete_variable (SwfdecAsFrame * frame, const char * variable); diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 70f3c09..b9204a6 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -578,16 +578,14 @@ swfdec_action_get_variable (SwfdecAsCont val = swfdec_as_stack_peek (cx, 1); s = swfdec_as_value_to_string (cx, val); if (swfdec_action_get_movie_by_path (cx, s, &object, &s)) { - if (object == NULL) - object = swfdec_as_frame_find_variable (cx->frame, s); - } else { - object = NULL; - }...
2007 Nov 15
2
Changes to 'refs/tags/0.5.4'
Tag '0.5.4' created by Benjamin Otte <otte at gnome.org> at 2007-11-15 10:12 -0800 release 0.5.4 ("Turkish Cycling Federation") -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBHPBurvMv5VCdLq8QRAj1KAJ40NHRRS3gKyJjSjyyoH7gDaGi/tQCeOha/ R5PF4bZQqmSdJ64t8EbD4cA= =8qBy -----END PGP SIGNATURE----- Changes since the dawn of time: Benjamin Otte (40):