search for: g_strsplit

Displaying 20 results from an estimated 23 matches for "g_strsplit".

Did you mean: t_strsplit
2007 Oct 26
0
6 commits - configure.ac libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec_video.c player/swfplay.c
...fdec_codec_audio.c b/libswfdec/swfdec_codec_audio.c index 7c4ab8a..a46b315 100644 --- a/libswfdec/swfdec_codec_audio.c +++ b/libswfdec/swfdec_codec_audio.c @@ -167,7 +167,7 @@ swfdec_audio_decoder_new (SwfdecAudioCodec codec, SwfdecAudioFormat format) break; } } else { - char **split = g_strsplit (list, ":", -1); + char **split = g_strsplit (list, ",", -1); guint i, j; ret = NULL; SWFDEC_LOG ("codecs limited to \"%s\"", list); diff --git a/libswfdec/swfdec_codec_video.c b/libswfdec/swfdec_codec_video.c index 291c24d..93bc6dd 100644 -...
2007 Oct 14
0
4 commits - libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec_video.c libswfdec/swfdec_sound.c
...DEC_CODEC_AUDIO"); + if (list == NULL) + list = g_getenv ("SWFDEC_CODEC"); + if (list == NULL) { + guint i; + for (i = 0; audio_codecs[i].name != NULL; i++) { + ret = audio_codecs[i].func (codec, format); + if (ret) + break; + } + } else { + char **split = g_strsplit (list, ":", -1); + guint i, j; + ret = NULL; + SWFDEC_LOG ("codecs limited to \"%s\"", list); + for (i = 0; split[i] != NULL && ret == NULL; i++) { + for (j = 0; audio_codecs[j].name != NULL; j++) { + if (g_ascii_strcasecmp (audio_codecs[j].nam...
2007 Aug 17
0
4 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h test/trace
...fdec flags[1] = (argc > 3) ? swfdec_as_value_to_integer (cx, &argv[3]) : -1; if (SWFDEC_AS_VALUE_IS_NULL (&argv[1])) { swfdec_as_object_foreach (obj, swfdec_as_context_ASSetPropFlags_foreach, flags); - } else if (SWFDEC_AS_VALUE_IS_STRING (&argv[1])) { - char **split = g_strsplit (SWFDEC_AS_VALUE_GET_STRING (&argv[1]), ",", -1); + } else { + char **split = + g_strsplit (swfdec_as_value_to_string (cx, &argv[1]), ",", -1); guint i; for (i = 0; split[i]; i++) { swfdec_as_context_ASSetPropFlags_set_one_flag (obj, swfdec...
2007 Oct 25
0
libswfdec/swfdec_as_object.c
...*object, void swfdec_as_object_decode (SwfdecAsObject *object, const char *str) { + SwfdecAsContext *cx = object->context; SwfdecAsValue val; char **varlist, *p; guint i; - str = swfdec_as_string_unescape (object->context, str); - if (str == NULL) - return; - varlist = g_strsplit (str, "&", -1); for (i = 0; varlist[i] != NULL; i++) { @@ -1538,13 +1535,16 @@ swfdec_as_object_decode (SwfdecAsObject *object, const char *str) if (p != NULL) { SWFDEC_AS_VALUE_SET_STRING (&val, - swfdec_as_context_get_string (object->context, p)); + swf...
2007 Dec 05
0
4 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_movie.c libswfdec/swfdec_policy_loader.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_format.c
...swfdec/swfdec_as_object.c +++ b/libswfdec/swfdec_as_object.c @@ -1649,6 +1649,9 @@ swfdec_as_object_decode (SwfdecAsObject *object, const char *str) char **varlist, *p, *unescaped; guint i; + g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (str != NULL); + varlist = g_strsplit (str, "&", -1); for (i = 0; varlist[i] != NULL; i++) { diff --git a/libswfdec/swfdec_movie.c b/libswfdec/swfdec_movie.c index 657b519..567da71 100644 --- a/libswfdec/swfdec_movie.c +++ b/libswfdec/swfdec_movie.c @@ -1612,9 +1612,11 @@ static void swfdec_movie_load_variables_on_f...
2007 Oct 31
0
5 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_audio.c libswfdec/swfdec_sound.c libswfdec/swfdec_xml.c
...ec/swfdec_as_object.c +++ b/libswfdec/swfdec_as_object.c @@ -1557,7 +1557,7 @@ swfdec_as_object_decode (SwfdecAsObject *object, const char *str) { SwfdecAsContext *cx = object->context; SwfdecAsValue val; - char **varlist, *p; + char **varlist, *p, *unescaped; guint i; varlist = g_strsplit (str, "&", -1); @@ -1571,15 +1571,21 @@ swfdec_as_object_decode (SwfdecAsObject *object, const char *str) } if (p != NULL) { - SWFDEC_AS_VALUE_SET_STRING (&val, - swfdec_as_context_give_string (object->context, - swfdec_as_string_unescape (cx, p))); +...
2017 Jan 13
0
[PATCH 1/4] Do not override CFLAGS, as CFLAGS is a user flag.
...tening on local %s:%d\n", inet_ntoa(sin.sin_addr), g_ntohs(sin.sin_port)); #endif @@ -820,7 +818,7 @@ static int udp_check_for_data(int sock) return 0; } buf[len] = '\0'; -#ifdef DEBUG_UDP +#ifndef NDEBUG fprintf (stderr,"Received: [%s]\n", buf); #endif lines = g_strsplit(buf, "\n", 0); @@ -889,7 +887,7 @@ static int udp_check_for_data(int sock) g_log(NULL, G_LOG_LEVEL_WARNING, "udp_check_for_data(): Unable to send ack to server: %s", strerror(errno)); } -#ifdef DEBUG_UDP +#ifndef NDEBUG else fprintf(stderr,"Sent...
2017 Jan 15
0
[PATCH 1/2] Do not override CFLAGS, as CFLAGS is a user flag.
...tening on local %s:%d\n", inet_ntoa(sin.sin_addr), g_ntohs(sin.sin_port)); #endif @@ -820,7 +818,7 @@ static int udp_check_for_data(int sock) return 0; } buf[len] = '\0'; -#ifdef DEBUG_UDP +#ifndef NDEBUG fprintf (stderr,"Received: [%s]\n", buf); #endif lines = g_strsplit(buf, "\n", 0); @@ -889,7 +887,7 @@ static int udp_check_for_data(int sock) g_log(NULL, G_LOG_LEVEL_WARNING, "udp_check_for_data(): Unable to send ack to server: %s", strerror(errno)); } -#ifdef DEBUG_UDP +#ifndef NDEBUG else fprintf(stderr,"Sent...
2007 Jul 26
0
5 commits - doc/Makefile.am doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_player_as.c
...argc < 3) + return; + + target = swfdec_as_value_to_object (cx, &argv[0]); + x = swfdec_as_value_to_integer (cx, &argv[1]); + s = swfdec_as_value_to_string (cx, &argv[2]); + if (argc > 3) + y = swfdec_as_value_to_integer (cx, &argv[3]); + else + y = 0; + names = g_strsplit (s, ",", -1); + for (i = 0; names[i]; i++) { + s = names[i]; + if (s[0] >= '0' && s[0] <= '9') { + SWFDEC_FIXME ("implement the weird numbers"); + s++; + } + get = swfdec_get_asnative (cx, x, y++); + set = swfdec_get_asnati...
2007 Feb 14
0
7 commits - libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h test/Makefile.am test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_list.c test/swfedit_tag.c test/swfedit_token.c test/swfedit_token.h test/swfscript.c
...+ script = swfdec_script_new (&bits, state.script->name, state.script->version); + swfdec_buffer_unref (state.buffer); + g_assert (script); + swfedit_token_set (token, idx, script); + + return TRUE; +} + +static guint * +string_to_action_list (const char *list) +{ + char **actions = g_strsplit (list, ",", -1); + guint *ret; + guint i, len; + + len = g_strv_length (actions); + ret = g_new (guint, len + 1); + ret[len] = 0; + for (i = 0; i < len; i++) { + ret[i] = swfdec_action_get_from_name (actions[i]); + if (ret[i] == 0) { + g_printerr ("No such action...
2017 Jan 15
4
Updated CFLAGS patches and make test compilation conditional
Hi Erik, I've found a middleground for the problem of setting default CFLAGS. I've gone back to setting them if {C,CXX,CPP,LD}FLAGS are unset at the onset of the configure script (i.e., the user hasn't specified anything) and then proceed to set them to the defaults as before. This has been suggested before: https://lists.gnu.org/archive/html/autoconf/2006-04/msg00022.html In
2017 Jan 13
9
Upstreaming Gentoo patches
Dear FLAC devs, I would like to get some of our patches merged into master. Most of them deal with adhering to GNU conventions, respectively not overriding flags/variables that are up to the user to set. For instance, honoring $(htmldir) is important, as we have installation paths for the documentation that differ from what is currently coded in the various Makefile.am's. Regards David
2004 Sep 10
0
http streaming in the xmms plugin
...>= meta_len) + { + while (meta_len) + { + cnt = min(meta_len, buffer_length - rd_index); + memcpy(meta_data + meta_off, buffer + rd_index, cnt); + rd_index = (rd_index + cnt) % buffer_length; + meta_len -= cnt; + meta_off += cnt; + } + tags = g_strsplit(meta_data, "';", 0); + + for (i = 0; tags[i]; i++) + { + if (!strncasecmp(tags[i], "StreamTitle=", 12)) + { + temp = g_strdup(tags[i] + 13); + title = g_strdup_printf("%s (%s)", temp, icy_name); + set_track_info(title, -1...
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
...cute (ViviApplication *app, const char *command) +{ + char *run; + + if (!strpbrk (command, ";\"',()[]{}")) { + /* 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_str...
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
...ecute (ViviCommandLine *cl, const char *command) +{ + char *run; + + if (!strpbrk (command, ";\"',()[]{}")) { + /* 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_str...
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
...ECT value ever gets set to NULL diff --git a/libswfdec/swfdec_as_context.c b/libswfdec/swfdec_as_context.c index 84ea82f..9ed00ec 100644 --- a/libswfdec/swfdec_as_context.c +++ b/libswfdec/swfdec_as_context.c @@ -614,19 +614,18 @@ swfdec_as_context_eval_internal (SwfdecA } else { varlist = g_strsplit (str, ".", -1); } - SWFDEC_AS_VALUE_SET_OBJECT (&cur, obj); /* FIXME: can be NULL here */ for (i = 0; varlist[i] != NULL; i++) { const char *dot = swfdec_as_context_get_string (cx, varlist[i]); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&cur)) { - SWFDEC_AS_VALUE_SET_UN...
2007 Aug 20
0
8 commits - libswfdec/Makefile.am libswfdec/swfdec_as_string.c libswfdec/swfdec_as_string.h libswfdec/swfdec_as_strings.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_load_object.c libswfdec/swfdec_loadvars_as.c test/trace
...ecAsValue *argv, SwfdecAsValue *rval) +{ + if (argc > 0) { + SwfdecAsValue val; + const char *str; + char **varlist, *p; + guint i; + + str = + swfdec_as_string_unescape (cx, swfdec_as_value_to_string (cx, &argv[0])); + if (str == NULL) + return; + + varlist = g_strsplit (str, "&", -1); + + for (i = 0; varlist[i] != NULL; i++) { + p = strchr (varlist[i], '='); + if (p != NULL) { + *p++ = '\0'; + if (*p == '\0') + p = NULL; + } + + if (p != NULL) { + SWFDEC_AS_VALUE_SET_STRING (&val, swfdec_as_contex...
2007 Aug 20
0
Branch 'vivi' - 60 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c
...ecAsValue *argv, SwfdecAsValue *rval) +{ + if (argc > 0) { + SwfdecAsValue val; + const char *str; + char **varlist, *p; + guint i; + + str = + swfdec_as_string_unescape (cx, swfdec_as_value_to_string (cx, &argv[0])); + if (str == NULL) + return; + + varlist = g_strsplit (str, "&", -1); + + for (i = 0; varlist[i] != NULL; i++) { + p = strchr (varlist[i], '='); + if (p != NULL) { + *p++ = '\0'; + if (*p == '\0') + p = NULL; + } + + if (p != NULL) { + SWFDEC_AS_VALUE_SET_STRING (&val, swfdec_as_contex...
2007 Apr 04
0
Branch 'as' - 17 commits - configure.ac doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt doc/swfdec.types libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_gtk_loader.h
...cur; + char **varlist; + guint i; + + SWFDEC_LOG ("eval called with \"%s\" on %p", str, obj); + if (strchr (str, '/')) { + char *work = swfdec_as_slash_to_dot (str); + if (!work) { + SWFDEC_AS_VALUE_SET_UNDEFINED (val); + return; + } + varlist = g_strsplit (work, ".", -1); + g_free (work); + } else { + varlist = g_strsplit (str, ".", -1); + } + SWFDEC_AS_VALUE_SET_OBJECT (&cur, obj); /* FIXME: can be NULL here */ + for (i = 0; varlist[i] != NULL; i++) { + const char *dot = swfdec_as_context_get_string (cx, varlist...
2007 Aug 07
0
13 commits - libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec_gtk_keys.c libswfdec-gtk/swfdec_gtk_keys.h libswfdec-gtk/swfdec_gtk_widget.c libswfdec/Makefile.am libswfdec/swfdec_as_types.c libswfdec/swfdec.h libswfdec/swfdec_initialize.as
...argc < 3) + return; + + target = swfdec_as_value_to_object (cx, &argv[0]); + x = swfdec_as_value_to_integer (cx, &argv[1]); + s = swfdec_as_value_to_string (cx, &argv[2]); + if (argc > 3) + y = swfdec_as_value_to_integer (cx, &argv[3]); + else + y = 0; + names = g_strsplit (s, ",", -1); + for (i = 0; names[i]; i++) { + s = names[i]; + if (s[0] >= '0' && s[0] <= '9') { + SWFDEC_FIXME ("implement the weird numbers"); + s++; + } + function = swfdec_get_asnative (cx, x, y); + if (function == NULL...