mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-12-07 09:04:50 +01:00
18:36. incorporated proposed cleanups from gtk-devel-list.
Sat Jul 24 20:11:35 1999 Tim Janik <timj@gtk.org> * merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36. * incorporated proposed cleanups from gtk-devel-list. * bumped version number to GLib-1.3.1 * glib.h: * gqueue.c: * gstring.c: * glist.c: removed string tokenisation (we got g_strsplit() and g_strjoin() already) and readline functions. s/g_list_delete/g_list_delete_link. implemented g_slist_delete_link. removed notion of g_ATEXIT() macro in glib.h, this is an *internal* macro, g_atexit() is provided for public consumption. added GTrashStack inline utility functions. reimplement double eneded queues. removed GStack implementation, people can use a queue or a (singly) linked list for this task. deprecated g_strescape(), we need the SunOS variants here. * gdate.c: added DEBUG_MSG() macro to wrap old messages. * *.*: CVS merges. * upgrade to libtool 1.3.3.
This commit is contained in:
14
gutils.c
14
gutils.c
@@ -155,7 +155,13 @@ g_snprintf (gchar *str,
|
||||
va_start (args, fmt);
|
||||
retval = vsnprintf (str, n, fmt, args);
|
||||
va_end (args);
|
||||
|
||||
|
||||
if (retval < 0)
|
||||
{
|
||||
str[n-1] = '\0';
|
||||
retval = strlen (str);
|
||||
}
|
||||
|
||||
return retval;
|
||||
#else /* !HAVE_VSNPRINTF */
|
||||
gchar *printed;
|
||||
@@ -185,6 +191,12 @@ g_vsnprintf (gchar *str,
|
||||
|
||||
retval = vsnprintf (str, n, fmt, args);
|
||||
|
||||
if (retval < 0)
|
||||
{
|
||||
str[n-1] = '\0';
|
||||
retval = strlen (str);
|
||||
}
|
||||
|
||||
return retval;
|
||||
#else /* !HAVE_VSNPRINTF */
|
||||
gchar *printed;
|
||||
|
||||
Reference in New Issue
Block a user