Displaying 20 results from an estimated 92 matches for "swfdec_as_value_to_str".
2007 Jun 17
2
Branch 'as' - libswfdec/swfdec_as_interpret.c
...stack);
SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_peek (cx->frame->stack, 1));
} else if (SWFDEC_AS_VALUE_IS_STRING (rval) || SWFDEC_AS_VALUE_IS_STRING (lval)) {
- int comp = strcmp (SWFDEC_AS_VALUE_GET_STRING (rval), SWFDEC_AS_VALUE_GET_STRING (lval));
+ int comp = strcmp (swfdec_as_value_to_string (cx, rval),
+ swfdec_as_value_to_string (cx, lval));
swfdec_as_stack_pop (cx->frame->stack);
SWFDEC_AS_VALUE_SET_BOOLEAN (swfdec_as_stack_peek (cx->frame->stack, 1), action == 0x48 ? comp < 0 : comp > 0);
} else {
2007 Jun 12
0
Branch 'as' - 3 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_math.c libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_string.c
...umber *num = SWFDEC_AS_NUMBER (object);
SwfdecAsValue val;
const char *s;
if (argc > 0) {
- SWFDEC_ERROR ("radix is not yet implemented");
+ SWFDEC_FIXME ("radix is not yet implemented");
}
SWFDEC_AS_VALUE_SET_NUMBER (&val, num->number);
s = swfdec_as_value_to_string (object->context, &val);
@@ -96,7 +108,8 @@ swfdec_as_number_toString (SwfdecAsObjec
}
static void
-swfdec_as_number_valueOf (SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
+swfdec_as_number_valueOf (SwfdecAsContext *cx, SwfdecAsObject *object,
+ guint...
2007 Jun 28
0
Branch 'as' - 4 commits - doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...OADER
</SECTION>
+
+<SECTION>
+<FILE>SwfdecAsValue</FILE>
+<TITLE>SwfdecAsValue</TITLE>
+SwfdecAsValueType
+SwfdecAsValue
+swfdec_as_value_to_boolean
+swfdec_as_value_to_integer
+swfdec_as_value_to_number
+swfdec_as_value_to_object
+swfdec_as_value_to_primitive
+swfdec_as_value_to_string
+</SECTION>
diff-tree 54d9e25821ca4303c7182c626343ee08c84b1ea2 (from 35053a70dfbdc472fecadb29b21e38dd9e055410)
Author: Benjamin Otte <otte at gnome.org>
Date: Thu Jun 28 18:59:21 2007 +0200
add documentation
diff --git a/libswfdec/swfdec_as_types.c b/libswfdec/swfdec_as_types...
2007 Jul 14
0
libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_string.c libswfdec/swfdec_bits.c
...erywhere, just for consistency.
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index 53116cb..57e6605 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -1942,7 +1942,7 @@ swfdec_action_char_to_ascii_5 (SwfdecAsC
const char *s = swfdec_as_value_to_string (cx, val);
char *ascii;
- ascii = g_convert (s, -1, "LATIN1", "UTF8", NULL, NULL, NULL);
+ ascii = g_convert (s, -1, "LATIN1", "UTF-8", NULL, NULL, NULL);
if (ascii == NULL) {
/* This can happen if a Flash 5 movie gets loaded into a Flash 7...
2007 Jun 28
0
Branch 'as' - 2 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
..._VALUE_SET_UNDEFINED
+SWFDEC_AS_VALUE_GET_BOOLEAN
swfdec_as_value_to_boolean
-swfdec_as_value_to_integer
+SWFDEC_AS_VALUE_SET_BOOLEAN
+SWFDEC_AS_VALUE_GET_NUMBER
swfdec_as_value_to_number
+swfdec_as_value_to_integer
+SWFDEC_AS_VALUE_SET_INT
+SWFDEC_AS_VALUE_SET_NUMBER
+SWFDEC_AS_VALUE_GET_STRING
+swfdec_as_value_to_string
+SWFDEC_AS_VALUE_SET_STRING
+SWFDEC_AS_VALUE_SET_NULL
+SWFDEC_AS_VALUE_GET_OBJECT
swfdec_as_value_to_object
+SWFDEC_AS_VALUE_SET_OBJECT
swfdec_as_value_to_primitive
-swfdec_as_value_to_string
+swfdec_as_double_to_string
+swfdec_as_str_concat
+<SUBSECTION Standard>
+SWFDEC_IS_AS_VALUE
+SW...
2007 Sep 02
0
libswfdec/swfdec_as_array.c libswfdec/swfdec_as_string.c
...it a/libswfdec/swfdec_as_string.c b/libswfdec/swfdec_as_string.c
index 5988369..cce29bf 100644
--- a/libswfdec/swfdec_as_string.c
+++ b/libswfdec/swfdec_as_string.c
@@ -99,6 +99,9 @@ swfdec_as_string_lastIndexOf (SwfdecAsCo
gsize len;
const char *s;
+ if (argc < 1)
+ return;
+
s = swfdec_as_value_to_string (object->context, &argv[0]);
if (argc == 2) {
int offset = swfdec_as_value_to_integer (object->context, &argv[1]);
@@ -127,6 +130,9 @@ swfdec_as_string_indexOf (SwfdecAsContex
int offset=0, len, i=-1;
const char *s, *t = NULL;
+ if (argc < 1)
+ return;
+
s...
2007 Sep 26
1
Youtube broken by 89d295a94
...nterpret.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) {
@@ -589,7 +590,7 @@ swfdec_action_get_variable (SwfdecAsContext *cx, guint action, const guint8 *dat
swfdec_as_frame_get_varia...
2007 Aug 17
0
2 commits - libswfdec/swfdec_as_array.c test/trace
...y_sort_compare (SwfdecAsContext *cx, SwfdecAsValue *a,
+ SwfdecAsValue *b, gint32 options, SwfdecAsFunction *fun)
{
gint retval;
@@ -680,11 +742,13 @@ swfdec_as_array_sort_compare (SwfdecAsCo
}
else if (options & ARRAY_SORT_OPTION_CASEINSENSITIVE)
{
- retval = g_strcasecmp (swfdec_as_value_to_string (cx, a), swfdec_as_value_to_string (cx, b));
+ retval = g_strcasecmp (swfdec_as_value_to_string (cx, a),
+ swfdec_as_value_to_string (cx, b));
}
else
{
- retval = strcmp (swfdec_as_value_to_string (cx, a), swfdec_as_value_to_string (cx, b));
+ retval = strcmp (swfdec_as_value_t...
2007 Nov 02
0
5 commits - libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml_node.c
...if (!SWFDEC_IS_XML (object))
return;
+ if (!SWFDEC_IS_VALID_XML_NODE (object))
+ return;
+
if (argc < 1)
return;
@@ -729,6 +736,9 @@ swfdec_xml_createElement (SwfdecAsContext *cx, SwfdecAsObject *object,
node = swfdec_xml_node_new (cx, SWFDEC_XML_NODE_ELEMENT,
swfdec_as_value_to_string (cx, &argv[0]));
+ if (node == NULL)
+ return;
+
SWFDEC_AS_VALUE_SET_OBJECT (rval, SWFDEC_AS_OBJECT (node));
}
@@ -751,6 +761,9 @@ swfdec_xml_createTextNode (SwfdecAsContext *cx, SwfdecAsObject *object,
node = swfdec_xml_node_new (cx, SWFDEC_XML_NODE_TEXT,
swfdec_as_val...
2007 May 29
0
Branch 'as' - 6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_js_xml.c libswfdec/swfdec_tag.c player/swfplay.c
...char *name;
- cx->fp->sp -= 2;
- name = swfdec_js_to_string (cx, cx->fp->sp[1]);
- if (name == NULL)
- return JS_FALSE;
- if (!JSVAL_IS_OBJECT (cx->fp->sp[0]))
- return JS_TRUE;
- return JS_DeleteProperty (cx, JSVAL_TO_OBJECT (cx->fp->sp[0]), name);
+ name = swfdec_as_value_to_string (cx, swfdec_as_stack_pop (cx->frame->stack));
+ val = swfdec_as_stack_pop (cx->frame->stack);
+ if (SWFDEC_AS_VALUE_IS_OBJECT (val))
+ swfdec_as_object_delete_variable (SWFDEC_AS_VALUE_GET_OBJECT (val), name);
}
static void
swfdec_action_delete2 (SwfdecAsContext *cx, guint...
2007 Oct 17
0
6 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...VIE (text)->parent);
+ g_return_if_fail (SWFDEC_IS_TEXT_FIELD_MOVIE (object));
- SWFDEC_AS_VALUE_SET_STRING (&val, value);
- swfdec_as_object_set_variable (parent, text->variable, &val);
+ text = SWFDEC_TEXT_FIELD_MOVIE (object);
+ swfdec_text_field_movie_set_text (text,
+ swfdec_as_value_to_string (object->context, val), text->text->html);
}
-const char *
-swfdec_text_field_movie_get_variable_text (SwfdecTextFieldMovie *text)
+void
+swfdec_text_field_movie_set_listen_variable (SwfdecTextFieldMovie *text,
+ const char *value)
{
- SwfdecAsObject *parent;
- SwfdecAsValue va...
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
...(SWFDEC_AS_IS_OBJECT (object));
- g_return_if_fail (SWFDEC_AS_IS_VALUE (variable));
- g_return_if_fail (SWFDEC_AS_IS_VALUE (value));
+ g_return_if_fail (SWFDEC_IS_AS_OBJECT (object));
+ g_return_if_fail (SWFDEC_IS_AS_VALUE (variable));
+ g_return_if_fail (SWFDEC_IS_AS_VALUE (value));
s = swfdec_as_value_to_string (object->context, variable);
var = g_hash_table_lookup (object->properties, s);
@@ -177,8 +177,8 @@ swfdec_as_object_get_variable (SwfdecAsO
SwfdecAsObjectVariable *var;
guint i;
- g_return_if_fail (SWFDEC_AS_IS_OBJECT (object));
- g_return_if_fail (SWFDEC_AS_IS_VALUE (variabl...
2007 Aug 24
0
7 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_string.c test/trace
...= SWFDEC_AS_TYPE_UNDEFINED) {
s = SWFDEC_AS_STR_undefined;
- else
+ } else if (val->type == SWFDEC_AS_TYPE_OBJECT &&
+ SWFDEC_IS_AS_STRING (swfdec_as_value_to_object (cx, val))) {
+ s = SWFDEC_AS_STRING (swfdec_as_value_to_object (cx, val))->string;
+ } else {
s = swfdec_as_value_to_string (cx, val);
+ }
swfdec_as_stack_pop (cx);
g_signal_emit_by_name (cx, "trace", s);
}
diff-tree 13aa81dbca1a430cdaca848d23ef36a8192ca54c (from 3aeb7081c80edcbb50e66d58265e400d637f75fb)
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date: Fri Aug 24 14:26:11 2007 +0300...
2007 Aug 17
0
Branch 'vivi' - 9 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c
...y_sort_compare (SwfdecAsContext *cx, SwfdecAsValue *a,
+ SwfdecAsValue *b, gint32 options, SwfdecAsFunction *fun)
{
gint retval;
@@ -680,11 +742,13 @@ swfdec_as_array_sort_compare (SwfdecAsCo
}
else if (options & ARRAY_SORT_OPTION_CASEINSENSITIVE)
{
- retval = g_strcasecmp (swfdec_as_value_to_string (cx, a), swfdec_as_value_to_string (cx, b));
+ retval = g_strcasecmp (swfdec_as_value_to_string (cx, a),
+ swfdec_as_value_to_string (cx, b));
}
else
{
- retval = strcmp (swfdec_as_value_to_string (cx, a), swfdec_as_value_to_string (cx, b));
+ retval = strcmp (swfdec_as_value_t...
2007 Nov 14
0
2 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_string.c libswfdec/swfdec_color_as.c libswfdec/swfdec_initialize.as
...00644
--- a/libswfdec/swfdec_as_array.c
+++ b/libswfdec/swfdec_as_array.c
@@ -589,6 +589,9 @@ swfdec_as_array_join (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc,
const char *var, *str, *sep;
SwfdecAsValue val;
+ if (object == NULL)
+ return;
+
if (argc > 0) {
sep = swfdec_as_value_to_string (cx, &argv[0]);
} else {
@@ -623,6 +626,9 @@ void
swfdec_as_array_toString (SwfdecAsContext *cx, SwfdecAsObject *object,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
{
+ if (object == NULL)
+ return;
+
swfdec_as_array_join (cx, object, 0, NULL, ret);
}
@@ -631,6 +...
2007 Sep 10
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...Context *cx, SwfdecAsObject *object,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval)
{
- SwfdecAsVariable *var;
+ SwfdecAsWatch *watch;
const char *name;
SWFDEC_AS_VALUE_SET_BOOLEAN (retval, FALSE);
@@ -1230,34 +1304,30 @@ swfdec_as_object_watch (SwfdecAsContext
name = swfdec_as_value_to_string (cx, &argv[0]);
- if (!(var = swfdec_as_object_hash_lookup (object, name))) {
- SwfdecAsValue val;
- SWFDEC_AS_VALUE_SET_UNDEFINED (&val);
- swfdec_as_object_set_variable (object, name, &val);
- if (!(var = swfdec_as_object_hash_lookup (object, name)))
- return;
-...
2007 Sep 04
0
5 commits - doc/Makefile.am doc/swfdec-sections.txt libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.c libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_native_function.h
...ype and cast to @result. After that the @args string
+ * is used to convert the arguments. Every character in @args describes the
+ * conversion of one argument. For that argument, you have to pass a pointer
+ * that takes the value. For the conversion, the default conversion functions
+ * like swfdec_as_value_to_string() are used. If not enough arguments are
+ * available, the function stops converting and returns %NULL. The following
+ * conversion characters are allowed:<itemizedlist>
+ * <listitem><para>"b": convert to boolean. Requires a %gboolean pointer
+ * &...
2008 Jan 07
0
3 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/swfdec_as_array.c libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_types.c libswfdec/swfdec_xml.c
...,
if (length > 0) {
/* FIXME: implement this with the StringBuilder class */
GString *string;
- var = swfdec_as_double_to_string (cx, 0);
- swfdec_as_object_get_variable (object, var, &val);
+ swfdec_as_object_get_variable (object, SWFDEC_AS_STR_0, &val);
str = swfdec_as_value_to_string (cx, &val);
string = g_string_new (str);
for (i = 1; i < length; i++) {
- var = swfdec_as_double_to_string (cx, i);
+ var = swfdec_as_integer_to_string (cx, i);
swfdec_as_object_get_variable (object, var, &val);
var = swfdec_as_value_to_string (cx, &a...
2007 Jun 13
0
Branch 'as' - 6 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_morph_movie.c libswfdec/swfdec_movie_asprops.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_player.c libswfdec/swfdec_sprite.c
...//company at git.freedesktop.org/git/swfdec into as
diff --cc libswfdec/swfdec_sprite_movie_as.c
index cf35c13,c5a3c4c..c2e9a42
@@@ -281,12 -298,13 +295,12 @@@
SwfdecMovie *ret;
const char *name, *export;
int depth;
- SwfdecContent *content;
SwfdecGraphic *sprite;
- export = swfdec_as_value_to_string (obj->context, &argv[0]);
- name = swfdec_as_value_to_string (obj->context, &argv[1]);
+ export = swfdec_as_value_to_string (cx, &argv[0]);
+ name = swfdec_as_value_to_string (cx, &argv[1]);
if (argc > 3) {
- SWFDEC_WARNING ("attachMovie's initObje...
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
...perty) and Pop actions
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index aab5f44..893adbd 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -532,10 +532,116 @@ swfdec_action_set_variable (SwfdecAsCont
const char *s;
s = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx->frame->stack, 2));
- swfdec_as_context_eval_set (cx, NULL, s, swfdec_as_stack_pop (cx->frame->stack));
+ swfdec_as_context_eval_set (cx, NULL, s, swfdec_as_stack_peek (cx->frame->stack, 1));
+ swfdec_as_stack_pop_n (cx->frame->stack, 2);...