search for: extract_version

Displaying 9 results from an estimated 9 matches for "extract_version".

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
...dec_action_print_goto_frame (guint action, const guint8 *data, guint len) { guint frame; @@ -162,13 +415,14 @@ swfdec_action_print_wait_for_frame (guin /* defines minimum and maximum versions for which we have seperate scripts */ #define MINSCRIPTVERSION 3 #define MAXSCRIPTVERSION 7 +#define EXTRACT_VERSION(v) MAX ((v) - MINSCRIPTVERSION, MAXSCRIPTVERSION - MINSCRIPTVERSION) typedef JSBool (* SwfdecActionExec) (JSContext *cx, guint action, const guint8 *data, guint len); typedef struct { const char * name; /* name identifying the action */ char * (* print) (guint action, const guint8 *dat...
2007 Mar 28
0
Branch 'as' - 3 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_types.c
...ble_lookup (context->strings, string); @@ -277,3 +279,111 @@ swfdec_as_context_new (void) { return g_object_new (SWFDEC_TYPE_AS_CONTEXT, NULL); } + +/* defines minimum and maximum versions for which we have seperate scripts */ +#define MINSCRIPTVERSION 3 +#define MAXSCRIPTVERSION 7 +#define EXTRACT_VERSION(v) MIN ((v) - MINSCRIPTVERSION, MAXSCRIPTVERSION - MINSCRIPTVERSION) + +typedef JSBool (* SwfdecActionExec) (JSContext *cx, guint action, const guint8 *data, guint len); +typedef struct { + const char * name; /* name identifying the action */ + char * (* print) (guint action, const guint8 *dat...
2007 Feb 16
0
11 commits - libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h test/.gitignore test/trace
...191,7 @@ swfdec_script_unref (SwfdecScript *scrip if (script->constant_pool) swfdec_buffer_unref (script->constant_pool); g_free (script->name); + g_free (script->preloads); g_free (script); } @@ -2187,6 +2229,29 @@ swfdec_script_interpret (SwfdecScript *s version = EXTRACT_VERSION (script->version); *rval = JSVAL_VOID; fp = cx->fp; + /* do the preloading */ + if (script->preloads) { + guint i; + for (i = 0; i < fp->fun->nargs; i++) { + if (script->preloads[i]) + fp->vars[script->preloads[i]] = fp->argv[i]; + } + } + if (s...
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
...quot; #include "swfdec_as_types.h" @@ -327,22 +328,6 @@ swfdec_as_context_new (void) return g_object_new (SWFDEC_TYPE_AS_CONTEXT, NULL); } -/* defines minimum and maximum versions for which we have seperate scripts */ -#define MINSCRIPTVERSION 3 -#define MAXSCRIPTVERSION 7 -#define EXTRACT_VERSION(v) MIN ((v) - MINSCRIPTVERSION, MAXSCRIPTVERSION - MINSCRIPTVERSION) - -typedef void (* SwfdecActionExec) (SwfdecAsContext *cx, guint action, const guint8 *data, guint len); -typedef struct { - const char * name; /* name identifying the action */ - char * (* print) (guint action, const guint8...
2007 Mar 29
0
Branch 'as' - 9 commits - configure.ac doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_stack.c
...sValue *check; +#endif guint action, len; guint8 *data; int version; g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context)); +start: /* setup data */ frame = context->frame; if (frame == NULL) return; script = frame->script; + stack = frame->stack; version = EXTRACT_VERSION (script->version); startpc = script->buffer->data; endpc = startpc + script->buffer->length; @@ -352,35 +359,38 @@ swfdec_as_context_run (SwfdecAsContext * spec->name ? spec->name : "Unknown", script->version); goto internal_error; } -#if 0...
2007 Mar 29
0
Branch 'as' - 9 commits - libswfdec-gtk/swfdec_playback_alsa.c libswfdec/js libswfdec/Makefile.am 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
...nt out all the old interpreter code diff --git a/libswfdec/swfdec_as_context.c b/libswfdec/swfdec_as_context.c index 6f7fe6e..037e146 100644 --- a/libswfdec/swfdec_as_context.c +++ b/libswfdec/swfdec_as_context.c @@ -320,7 +320,7 @@ swfdec_as_context_new (void) #define MAXSCRIPTVERSION 7 #define EXTRACT_VERSION(v) MIN ((v) - MINSCRIPTVERSION, MAXSCRIPTVERSION - MINSCRIPTVERSION) -typedef JSBool (* SwfdecActionExec) (JSContext *cx, guint action, const guint8 *data, guint len); +typedef void (* SwfdecActionExec) (SwfdecAsContext *cx, guint action, const guint8 *data, guint len); typedef struct { const...
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
...ternal (&bits, func, user_data); +} + static gboolean -validate_action (guint action, const guint8 *data, guint len, gpointer scriptp) +validate_action (gconstpointer bytecode, guint action, const guint8 *data, guint len, gpointer scriptp) { SwfdecScript *script = scriptp; int version = EXTRACT_VERSION (script->version); @@ -1158,12 +1173,30 @@ validate_action (guint action, const gui } SwfdecScript * +swfdec_script_new_for_player (SwfdecPlayer *player, SwfdecBits *bits, + const char *name, unsigned int version) +{ + SwfdecScript *script; + + g_return_val_if_fail (SWFDEC_IS_PLAYER (p...
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
...< d2 : d > d2); + } + return JS_TRUE; +} + /*** PRINT FUNCTIONS ***/ static char * @@ -762,7 +803,7 @@ swfdec_action_print_wait_for_frame (guin /* defines minimum and maximum versions for which we have seperate scripts */ #define MINSCRIPTVERSION 3 #define MAXSCRIPTVERSION 7 -#define EXTRACT_VERSION(v) MAX ((v) - MINSCRIPTVERSION, MAXSCRIPTVERSION - MINSCRIPTVERSION) +#define EXTRACT_VERSION(v) MIN ((v) - MINSCRIPTVERSION, MAXSCRIPTVERSION - MINSCRIPTVERSION) typedef JSBool (* SwfdecActionExec) (JSContext *cx, guint action, const guint8 *data, guint len); typedef struct { @@ -837,7 +878,7...
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
...ternal (&bits, func, user_data); +} + static gboolean -validate_action (guint action, const guint8 *data, guint len, gpointer scriptp) +validate_action (gconstpointer bytecode, guint action, const guint8 *data, guint len, gpointer scriptp) { SwfdecScript *script = scriptp; int version = EXTRACT_VERSION (script->version); @@ -1158,12 +1173,30 @@ validate_action (guint action, const gui } SwfdecScript * +swfdec_script_new_for_player (SwfdecPlayer *player, SwfdecBits *bits, + const char *name, unsigned int version) +{ + SwfdecScript *script; + + g_return_val_if_fail (SWFDEC_IS_PLAYER (p...