search for: g_strdup_printf

Displaying 20 results from an estimated 94 matches for "g_strdup_printf".

Did you mean: t_strdup_printf
2005 May 25
1
[PATCH] Fix wrong use of g_strconcat
Hi, the patch below fixes the wrong use of g_strconcat. It must be a typo of g_strdup_printf. Also fixed the printf format, too. Takashi --- src/plugin_xmms/http.c-dist 2005-05-25 16:14:03.000000000 +0200 +++ src/plugin_xmms/http.c 2005-05-25 16:17:30.000000000 +0200 @@ -484,7 +484,7 @@ static int http_connect (gchar *url_, gb flac_cfg.stream.use_udp_channel ? udpspace :...
2007 Mar 16
0
libswfdec/swfdec_loader.c
...*ext; ext = swfdec_loader_data_type_get_extension (loader->data_type); - if (*ext && (dot = strrchr (ret, '.'))) { + if (*ext) { + char *dot = strrchr (ret, '.'); char *real; - guint len = strlen (dot); - if (len <= 5) { - real = g_strdup_printf ("%*s.%s", dot - ret, ret, ext); - } else { - real = g_strdup_printf ("%s.%s", ret, ext); - } + guint len = dot ? strlen (dot) : G_MAXUINT; + g_print ("ret: %s, dot: %s, ext: %s\n", ret, dot, ext); + if (len <= 5) + *dot = '\0'; +...
2016 Aug 25
3
Gnome weather applet stranded
On Thu, Aug 25, 2016 at 08:33:46AM +0100, Nux! wrote: > I've rebuilt libmateweather for EL7 with the aforementioned patch and it seems to have fixed the issue. > Feel free to use it until EPEL package the fix. > > http://li.nux.ro/download/nux//tmp/libmateweather7/ thanks Nux! I installed it and it now gets current conditions just fine. but I tried several different locations
2004 Sep 10
0
http streaming in the xmms plugin
..., 0); + + streaming_proxy_port_label = gtk_label_new(_("Port:")); + gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox), streaming_proxy_port_label, FALSE, FALSE, 0); + + streaming_proxy_port_entry = gtk_entry_new(); + gtk_widget_set_usize(streaming_proxy_port_entry, 50, -1); + temp = g_strdup_printf("%d", flac_cfg.stream.proxy_port); + gtk_entry_set_text(GTK_ENTRY(streaming_proxy_port_entry), temp); + g_free(temp); + gtk_box_pack_start(GTK_BOX(streaming_proxy_hbox), streaming_proxy_port_entry, FALSE, FALSE, 0); + + streaming_proxy_auth_use = gtk_check_button_new_with_label(_(&q...
2006 Oct 25
2
[PATCH] Edge buttons
...(CompDisplay *d, gconf_value_free (gvalue); break; case CompOptionTypeAction: { - gchar *key1, *key2, *key3, *key4; + gchar *key1, *key2, *key3, *key4, *key5; GSList *node, *list = NULL; GConfValue *gv; int i; @@ -218,6 +218,7 @@ gconfSetOption (CompDisplay *d, key2 = g_strdup_printf ("%s_%s", key, "button"); key3 = g_strdup_printf ("%s_%s", key, "bell"); key4 = g_strdup_printf ("%s_%s", key, "edge"); + key5 = g_strdup_printf ("%s_%s", key, "edge_button"); gvalue = gconf_value_new (GCONF_VAL...
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...int flags = le32_to_cpu(req->flags); > + > + if (type < ARRAY_SIZE(virtio_pstore_file_prefix)) { > + basename = virtio_pstore_file_prefix[type]; > + } else { > + basename = "unknown-"; > + } > + > + id = s->id++; > + return g_strdup_printf("%s/%s%llu%s", s->directory, basename, id, > + flags & VIRTIO_PSTORE_FL_COMPRESSED ? ".enc.z" : ""); > +} > + > +static char *virtio_pstore_from_filename(VirtIOPstore *s, char *name, > +...
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...int flags = le32_to_cpu(req->flags); > + > + if (type < ARRAY_SIZE(virtio_pstore_file_prefix)) { > + basename = virtio_pstore_file_prefix[type]; > + } else { > + basename = "unknown-"; > + } > + > + id = s->id++; > + return g_strdup_printf("%s/%s%llu%s", s->directory, basename, id, > + flags & VIRTIO_PSTORE_FL_COMPRESSED ? ".enc.z" : ""); > +} > + > +static char *virtio_pstore_from_filename(VirtIOPstore *s, char *name, > +...
2016 Aug 25
0
Gnome weather applet stranded
...this file. Run tcpdump and verify it's trying query www.weather.gov/forecasts. # pwd /root/rpmbuild/SOURCES/libgweather-2.28.0/libgweather # grep http * |grep forecast weather-iwin.c: /* see the description here: http://www.weather.gov/forecasts/xml/ */ weather-iwin.c: url = g_strdup_printf ("http://www.weather.gov/forecasts/xml/sample_products/browser_interface/ndfdBrowserClientByDay.php?&lat=%.02f&lon=%.02f&format=24+hourly&startDate=%04d-%02d-%02d&numDays=7", weather-iwin.c: url = g_strdup_printf ("http://weather.noaa.gov/pub/data/forecasts/zon...
2006 Oct 16
2
Edge + Mouse button draft patches
Attached are my draft patches to add edge + mouse button to the actions It is useful because the edge bindings are too easily triggered, an edge + mouse button is good because it confirms the action. An additional side benefit is that the mouse wheel can be used for rotating the cube and for the switcher (it is an excellent alternative to alt-tab). I wanted to share the patches before cleaning
2016 Aug 26
0
[PATCH 2/3] qemu: Implement virtio-pstore device
...> + > > + if (type < ARRAY_SIZE(virtio_pstore_file_prefix)) { > > + basename = virtio_pstore_file_prefix[type]; > > + } else { > > + basename = "unknown-"; > > + } > > + > > + id = s->id++; > > + return g_strdup_printf("%s/%s%llu%s", s->directory, basename, id, > > + flags & VIRTIO_PSTORE_FL_COMPRESSED ? ".enc.z" : ""); > > +} > > + > > +static char *virtio_pstore_from_filename(VirtIOPstore *s, char *name, > > +...
2006 Nov 08
2
bug in today's git snapshot with maximizing windows
...ase CompOptionTypeAction: { > - gchar *key1, *key2, *key3, *key4; > + gchar *key1, *key2, *key3, *key4, *key5; > GSList *node, *list = NULL; > GConfValue *gv; > int i; > @@ -218,6 +218,7 @@ gconfSetOption (CompDisplay *d, > key2 = g_strdup_printf ("%s_%s", key, "button"); > key3 = g_strdup_printf ("%s_%s", key, "bell"); > key4 = g_strdup_printf ("%s_%s", key, "edge"); > + key5 = g_strdup_printf ("%s_%s", key, "edge_button"); > >...
2007 Dec 10
0
5 commits - libswfdec/jpeg libswfdec/swfdec_as_interpret.c libswfdec/swfdec_bits.c libswfdec/swfdec_cached.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_flash_security.c libswfdec/swfdec_image.c
...nt_get_url (guint action, const guint8 *data, guint len) static char * swfdec_action_print_if (guint action, const guint8 *data, guint len) { + gint16 offset; + if (len != 2) { SWFDEC_ERROR ("If action length invalid (is %u, should be 2", len); return NULL; } - return g_strdup_printf ("If %d", GINT16_FROM_LE (*((gint16*) data))); + offset = data[0] | (data[1] << 8); + return g_strdup_printf ("If %d", (int) offset); } static char * swfdec_action_print_jump (guint action, const guint8 *data, guint len) { + gint16 offset; + if (len != 2) {...
2007 Feb 06
0
Branch 'interpreter' - 15 commits - configure.ac libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_compiler.c libswfdec/swfdec_image.c libswfdec/swfdec_sprite_movie.c
...{ g_print (" ERROR: images differ\n"); goto dump; } cairo_surface_destroy (image); + cairo_surface_destroy (diff); return TRUE; dump: cairo_surface_destroy (image); if (g_getenv ("SWFDEC_TEST_DUMP")) { cairo_status_t status; - char *dump = g_strdup_printf ("%s.dump.png", filename); + char *dump; + + dump = g_strdup_printf ("%s.dump.png", filename); status = cairo_surface_write_to_png (surface, dump); if (status) { g_print (" ERROR: failed to dump image to %s: %s\n", dump, cairo_status_to_...
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
...swfdec-gtk/swfdec_gtk_loader.c index 69dc143..77ffd29 100644 --- a/libswfdec-gtk/swfdec_gtk_loader.c +++ b/libswfdec-gtk/swfdec_gtk_loader.c @@ -105,7 +105,8 @@ swfdec_gtk_loader_read_cb (GnomeVFSAsync gtk->handle = NULL; return; } else if (result != GNOME_VFS_OK) { - char *err = g_strdup_printf ("%s: %s", loader->url, + char *err = g_strdup_printf ("%s: %s", + swfdec_url_get_url (swfdec_loader_get_url (loader)), gnome_vfs_result_to_string (result)); swfdec_loader_error (loader, err); g_free (err); @@ -144,7 +145,8 @@ swfdec_gtk_loader_open_cb (GnomeV...
2013 May 27
6
[PATCH 0/3] Xen related fixes
Hi all, I have few simple fixes for Xen for the next release: - the first one fixes a regression in qemu-char; - the second one is just a cleanup (that is needed to simplify preprocessor dependencies); - the last one avoids setting nonblocking on Xen (as is already done for KVM). The last two patches should be backported to older branches. Stefano Stabellini (3):
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
...+ return JS_TRUE; +} + +/*** PRINT FUNCTIONS ***/ + +static char * +swfdec_action_print_store_register (guint action, const guint8 *data, guint len) +{ + if (len != 1) { + SWFDEC_ERROR ("StoreRegister action requires a length of 1, but got %u", len); + return NULL; + } + 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)) { + SWFDEC_ERROR ("SetTarget action does not specify a string"); + return JS_FALSE; + } + return g_str...
2007 Mar 16
0
libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_loader_internal.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_root_movie.c libswfdec/swfdec_xml.c
...nknown.swf"); + if (ret) { + char *dot; + const char *ext; + + ext = swfdec_loader_data_type_get_extension (loader->data_type); + if (*ext && (dot = strrchr (ret, '.'))) { + char *real; + guint len = strlen (dot); + if (len <= 5) { + real = g_strdup_printf ("%*s.%s", dot - ret, ret, ext); + } else { + real = g_strdup_printf ("%s.%s", ret, ext); + } + g_free (ret); + ret = real; + } + } else { + ret = g_strdup ("unknown file"); + } return ret; } +/** + * swfdec_loader_get_data_type: + *...
2016 Jul 30
0
[Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device
...asename = "unknown"; > > + break; > > + } > > + > > + snprintf(buf, sz, "%s/%s-%llu%s", s->directory, basename, id, > > + flags & VIRTIO_PSTORE_FL_COMPRESSED ? ".enc.z" : ""); > > Please use g_strdup_printf() instead of splattering into a pre-allocated > buffer than may or may not be large enough. OK. > > > +} > > + > > +static void virtio_pstore_from_filename(VirtIOPstore *s, char *name, > > + char *buf, size_t sz, > > +...
2007 Feb 06
0
Branch 'interpreter' - 8 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_edittext.c libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_pattern.c libswfdec/swfdec_sprite.c test/dump.c
...fedit_from_string_unsigned (s, G_MAXUINT16, result); +} + +static gboolean +swfedit_uint32_from_string (const char *s, gpointer* result) +{ + return swfedit_from_string_unsigned (s, G_MAXUINT32, result); +} + +static char * +swfedit_to_string_unsigned (gconstpointer value) +{ + return g_strdup_printf ("%u", GPOINTER_TO_UINT (value)); +} + +static gboolean +swfedit_rect_from_string (const char *s, gpointer* result) +{ + return FALSE; +} + +static char * +swfedit_rect_to_string (gconstpointer value) +{ + const SwfdecRect *rect = value; + + return g_strdup_printf ("...
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
...&g)) + return FALSE; + s += 2; + if (!swfedit_parse_hex (s, &b)) + return FALSE; + *result = GUINT_TO_POINTER (SWF_COLOR_COMBINE (r, g, b, 0xFF)); + return TRUE; +} + +static char * +swfedit_rgb_to_string (gconstpointer value) +{ + guint c = GPOINTER_TO_UINT (value); + + return g_strdup_printf ("%02X%02X%02X", SWF_COLOR_R (c), + SWF_COLOR_G (c), SWF_COLOR_B (c)); +} + +static gboolean +swfedit_rgba_from_string (const char *s, gpointer* result) +{ + guint r, g, b, a; + if (strlen (s) != 8) + return FALSE; + if (!swfedit_parse_hex (s, &a)) + return FALSE; + s +...