search for: g_string_append

Displaying 20 results from an estimated 42 matches for "g_string_append".

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
...ecFormatIndex *)(iter->data))->format; + + if (format->left_margin != 0 || format->right_margin != 0 || + format->indent != 0 || format->leading != 0 || + format->block_indent != 0 || + swfdec_as_array_get_length (format->tab_stops) > 0) + { + string = g_string_append (string, "<TEXTFORMAT"); + if (format->left_margin) { + g_string_append_printf (string, " LEFTMARGIN=\"%i\"", + format->left_margin); + } + if (format->right_margin) { + g_string_append_printf (string, " RIGHTMARGIN=\"%i\&quot...
2007 Mar 13
0
2 commits - libswfdec/swfdec_debugger.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h
...const guint8 *data, guint len) +{ + gboolean first = TRUE; + SwfdecBits bits; + GString *string = g_string_new ("Push"); + + swfdec_bits_init_data (&bits, data, len); + while (swfdec_bits_left (&bits)) { + guint type = swfdec_bits_get_u8 (&bits); + if (first) + g_string_append (string, " "); + else + g_string_append (string, ", "); + first = FALSE; + switch (type) { + case 0: /* string */ + { + const char *s = swfdec_bits_skip_string (&bits); + if (!s) { + g_string_free (string, TRUE); + return NULL; + } + g_stri...
2007 Oct 19
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_sprite_movie_as.c libswfdec/swfdec_text_field_movie.c
...57b 100644 --- a/libswfdec/swfdec_text_field_movie.c +++ b/libswfdec/swfdec_text_field_movie.c @@ -1352,12 +1352,6 @@ swfdec_text_field_movie_html_text_append_paragraph (SwfdecTextFieldMovie *text, break; } } - if (iter_font != NULL) { - while (fonts != iter_font) { - string = g_string_append (string, "</FONT>"); - fonts = g_slist_remove (fonts, fonts->data); - } - } if (format_prev->underline) string = g_string_append (string, "</U>"); if (format_prev->italic) @@ -1366,6 +1360,12 @@ swfdec_text_field_movie_html_text_appe...
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
...>sp[-1]); + if (s == NULL) + return JS_FALSE; + cx->fp->sp[-1] = swfdec_js_eval (cx, cx->fp->scopeChain, s); + return JS_TRUE; +} + /*** PRINT FUNCTIONS ***/ static char * @@ -352,6 +365,7 @@ swfdec_action_print_push (guint action, break; case 7: /* 32bit int */ g_string_append_printf (string, "%u", swfdec_bits_get_u32 (&bits)); + break; case 8: /* 8bit ConstantPool address */ g_string_append_printf (string, "Pool %u", swfdec_bits_get_u8 (&bits)); break; @@ -450,7 +464,7 @@ static const SwfdecActionSpec actions[25 [0x15] = { &quot...
2007 Jul 31
0
10 commits - doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_buffer.c libswfdec/swfdec_debugger.c libswfdec/swfdec.h
...l 31 13:00:07 2007 +0200 append the right string here diff --git a/libswfdec/swfdec_url.c b/libswfdec/swfdec_url.c index 6eaef71..95f0cc3 100644 --- a/libswfdec/swfdec_url.c +++ b/libswfdec/swfdec_url.c @@ -151,7 +151,7 @@ swfdec_url_new_relative (const SwfdecURL if (slash == NULL) { g_string_append (str, string); } else { - g_string_append_len (str, string, slash - string + 1); /* append '/', too */ + g_string_append_len (str, url->path, slash - url->path + 1); /* append '/', too */ g_string_append (str, string); } } diff-tree 2e88e6e61830d57ed4c53ce...
2007 Oct 29
0
20 commits - libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h
...wfdec/swfdec_text_field_movie_html.c @@ -318,19 +318,19 @@ swfdec_text_field_movie_html_parse_tag (ParserData *data, const char *p) } else { - if (data->cx->version < 7 && - (name_length == 2 && !g_strncasecmp (name, "br", 2))) { - data->text = g_string_append_c (data->text, '\n'); - tag = NULL; - } else { - SwfdecAsObject *object; - SwfdecAsValue val; + SwfdecAsObject *object; + SwfdecAsValue val; - if (data->cx->version < 7 && - ((name_length == 1 && !g_strncasecmp (name, "p&quot...
2014 Jun 13
4
[libldm 1/3] relax uuid, zlib version requirements
--- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 469ea96..0e7e2ea 100644 --- a/configure.ac +++ b/configure.ac @@ -85,14 +85,14 @@ PKG_CHECK_MODULES([GIO_UNIX], [gio-unix-2.0 >= 2.32.0], ] ) -PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.5], +PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2], [
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
...return g_strdup_printf ("StoreRegister %u", (guint) *data); +} + +static char * swfdec_action_print_set_target (guint action, const guint8 *data, guint len) { if (!memchr (data, 0, len)) { @@ -1795,6 +1838,9 @@ swfdec_action_print_push (guint action, case 3: /* undefined */ g_string_append (string, "void"); break; + case 4: /* register */ + g_string_append_printf (string, "Register %u", swfdec_bits_get_u8 (&bits)); + break; case 5: /* boolean */ g_string_append (string, swfdec_bits_get_u8 (&bits) ? "True" : "False"); b...
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
...ion "); + swfdec_bits_init_data (&bits, data, len); + function_name = swfdec_bits_get_string (&bits); + if (function_name == NULL) { + SWFDEC_ERROR ("could not parse function name"); + g_string_free (string, TRUE); + return NULL; + } + if (*function_name) { + g_string_append (string, function_name); + g_string_append_c (string, ' '); + } + n_args = swfdec_bits_get_u16 (&bits); + g_string_append_c (string, '('); + if (v2) { + /* n_regs = */ swfdec_bits_get_u8 (&bits); + /* flags = */ swfdec_bits_get_u16 (&bits); + } + + for (i = 0...
2007 Aug 21
0
Branch 'vivi' - 15 commits - configure.ac libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_debugger.h libswfdec/swfdec_as_object.c libswfdec/swfdec_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_types.h vivified/core vivified/ui
...t;',()[]{}")) { + /* special mode: interpret as space-delimited list: + * first argument is function name, following arguemnts are function arguments + */ + char **args = g_strsplit (command, " ", -1); + GString *str = g_string_new (args[0]); + guint i; + + g_string_append (str, " ("); + for (i = 1; args[i] != NULL; i++) { + if (i > 1) + g_string_append (str, ", "); + g_string_append_c (str, '"'); + g_string_append (str, args[i]); + g_string_append_c (str, '"'); + } + g_string_append (str,...
2007 Oct 17
0
4 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_movie.c libswfdec/swfdec_system_as.c libswfdec/swfdec_text_field_movie.c test/trace
...system_as.c b/libswfdec/swfdec_system_as.c index a6f594f..4610b96 100644 --- a/libswfdec/swfdec_system_as.c +++ b/libswfdec/swfdec_system_as.c @@ -265,7 +265,11 @@ swfdec_system_query (SwfdecAsContext *cx, SwfdecAsObject *object, if (queries[i].name == SWFDEC_AS_STR_screenResolutionY) { g_string_append_printf (server, "x%d", (int) SWFDEC_AS_VALUE_GET_NUMBER (&val)); } else if (queries[i].name == SWFDEC_AS_STR_pixelAspectRatio) { - g_string_append_printf (server, "&AR=%.1f", SWFDEC_AS_VALUE_GET_NUMBER (&val)); + char buffer[10]; + g_ascii_formatd...
2007 Aug 13
0
Branch 'vivi' - 24 commits - configure.ac libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_tag.h vivified/core vivified/dock vivified/ui
...t;',()[]{}")) { + /* special mode: interpret as space-delimited list: + * first argument is function name, following arguemnts are function arguments + */ + char **args = g_strsplit (command, " ", -1); + GString *str = g_string_new (args[0]); + guint i; + + g_string_append (str, " ("); + for (i = 1; args[i] != NULL; i++) { + if (i > 1) + g_string_append (str, ", "); + g_string_append_c (str, '"'); + g_string_append (str, args[i]); + g_string_append_c (str, '"'); + } + g_string_append (str,...
2007 Jun 19
0
Branch 'as' - 4 commits - libswfdec/swfdec_codec_video.c libswfdec/swfdec_movie.c test/trace
...ly before the second PlaceObject */ + MODIFY_REMOVE = (1 << 8), + /* add here */ + MODIFY_MAX = (1 << 9) +}; + +static void +modify_item (SWFDisplayItem item, GString *name, guint mod) +{ + SWFDisplayItem_setDepth (item, 1); + + if (mod & MODIFY_MOVE) { + if (name) + g_string_append (name, "-move"); + else + SWFDisplayItem_setMove (item); + } + if (mod & MODIFY_TRANSFORM) { + if (name) + g_string_append (name, "-transform"); + else + SWFDisplayItem_moveTo (item, 10, 0); + } + if (mod & MODIFY_CTRANS) { + if (name) +...
2008 Jan 19
0
11 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_sprite_movie_as.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml.h libswfdec/swfdec_xml_node.c libswfdec/swfdec_xml_node.h test/image test/swfdec_test.c test/swfdec_test_image.c test/trace
...ml_parse_xmlDecl (SwfdecXml *xml, SwfdecXmlNode *node, const char *p) end += strlen ("?>"); - string = g_string_new ((xml->xmlDecl != NULL ? xml->xmlDecl : "")); + string = g_string_new ((xml->xml_decl != NULL ? xml->xml_decl : "")); string = g_string_append_len (string, p, end - p); - xml->xmlDecl = swfdec_as_context_give_string (SWFDEC_AS_OBJECT (xml)->context, - g_string_free (string, FALSE)); + xml->xml_decl = swfdec_as_context_give_string ( + SWFDEC_AS_OBJECT (xml)->context, g_string_free (string, FALSE)); // in version 5 p...
2007 Jul 12
0
Branch 'as' - 7 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_with.c libswfdec/swfdec_sprite_movie.c test/trace
...= 1; i < length; i++) { var = swfdec_as_double_to_string (cx, i); swfdec_as_object_get_variable (object, var, &val); var = swfdec_as_value_to_string (cx, &val); - str = swfdec_as_str_concat (cx, str, sep); - str = swfdec_as_str_concat (cx, str, var); + g_string_append (string, sep); + g_string_append (string, var); } + str = swfdec_as_context_give_string (cx, g_string_free (string, FALSE)); } else { str = SWFDEC_AS_STR_EMPTY; }
2007 Jul 02
0
Branch 'as' - 24 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c
...Test * @@ -77,8 +79,9 @@ fscommand_cb (SwfdecPlayer *player, cons } static void -run_test (Test *test) +run_test (gpointer testp, gpointer unused) { + Test *test = testp; SwfdecLoader *loader; SwfdecPlayer *player; SwfdecBuffer *buffer; @@ -179,17 +182,27 @@ run_test (Test *test) g_string_append (output, " OK\n"); test->success = TRUE; fail: + if (test->mutex) + g_mutex_lock (test->mutex); test->output = g_string_free (output, FALSE); + if (test->mutex) { + g_cond_signal (test->cond); + g_mutex_unlock (test->mutex); + } } int main (in...
2007 Jun 28
0
Branch 'as' - 4 commits - libswfdec/swfdec_debugger.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_sprite_movie.c test/image
...swfdec_constant_pool_get (parser->constant_pool, id); - if (!s) { + if (id >= swfdec_constant_pool_size (parser->constant_pool)) { SWFDEC_ERROR ("constant pool size too small"); goto error; } + s = swfdec_constant_pool_get (parser->constant_pool, id); g_string_append_c (string, '"'); g_string_append (string, s); g_string_append_c (string, '"'); diff-tree 8c3f00f5d0e59cdeee7b53799567ba5e151d9599 (from 8667de8f3c4c44801a950f58aae4b3a6bd0a5c17) Author: Benjamin Otte <otte at gnome.org> Date: Thu Jun 28 11:43:38 2007 +0200...
2007 Oct 17
0
28 commits - configure.ac debian/changelog debian/control debian/copyright debian/.gitignore debian/libswfdec0.dirs debian/libswfdec0.files debian/libswfdec0.shlibs debian/libswfdec-dev.dirs debian/libswfdec-dev.files debian/rules debian/swf-player.dirs
...ol swfdec_url_get_query swfdec_url_get_url swfdec_url_new diff --git a/libswfdec/swfdec_url.c b/libswfdec/swfdec_url.c index 2d01827..cb5db48 100644 --- a/libswfdec/swfdec_url.c +++ b/libswfdec/swfdec_url.c @@ -138,7 +138,7 @@ swfdec_url_new_relative (const SwfdecURL *url, const char *string) g_string_append (str, "://"); if (url->host) g_string_append (str, url->host); - if (string[0] == '/' && !g_str_equal (swfdec_url_get_protocol (url), "file")) { + if (string[0] == '/' && !swfdec_url_has_protocol (url, "file")) { /*...
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
...l); 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, &val); g_string_append (string, sep); @@ -668,7 +667,7 @@ swfdec_as_array_do_pop (SwfdecAsContext *cx, SwfdecAsObject *object, if (length == 0) return; - var = swfdec_as_double_to_string (object->context, length - 1); + var = swfdec_as_integer_to_string (object->context, length - 1); swfdec_as_object...
2007 Oct 22
0
12 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h test/trace
...fdec_html_parser.c b/libswfdec/swfdec_html_parser.c index 0052cd7..1c4dfad 100644 --- a/libswfdec/swfdec_html_parser.c +++ b/libswfdec/swfdec_html_parser.c @@ -70,7 +70,7 @@ swfdec_text_field_movie_html_parse_close_tag (ParserData *data, ParserTag *tag) break; } } - data->text = g_string_append_c (data->text, '\r'); + data->text = g_string_append_c (data->text, '\n'); } tag->end_index = data->text->len; @@ -287,7 +287,7 @@ swfdec_text_field_movie_html_parse_tag (ParserData *data, const char *p) { if (data->cx->version < 7 &...