mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-22 17:08:53 +02:00
version bump to 1.1.3, binary age 0, interface age 0.
Sun Aug 16 20:28:27 1998 Tim Janik <timj@gtk.org> * version bump to 1.1.3, binary age 0, interface age 0. * glib.h: be nice to platforms that don't have gint64 and don't issue #warning on every compilation. since glib doesn't require gint64 itself, packages that need gint64 should test for this themselves. * glib.h: * gutils.c: added a new function g_vsnprintf(). Fri Aug 14 16:41:53 1998 Tim Janik <timj@gtk.org> * glib.h: added static inline functions for bit mask tests: g_bit_nth_lsf, g_bit_nth_msf and g_bit_storage. Fri Aug 13 14:23:37 1998 Tim Janik <timj@gtk.org> * glib.h: * gmessages.c: revised the message handling system, which is now based on a new mechanism g_log*. most of the assertment macros got adapted to feature the new g_log() call with an additional specification of the log level in a preprocessor macro G_LOG_DOMAIN. if G_LOG_DOMAIN is undefined upon the includion of glib.h, it'll be defined with a value of (NULL) and thus preserves the original bahaviour for warning and error messages. the message handler setting functions for g_warning, g_error and g_message are only provided for backwards compatibility and might get removed somewhen. * Makefile.am: feature the G_LOG_DOMAIN macro to set the log domain to "GLib" upon compilation. we currently have to add this definition to the DEFS variable. * testglib.c: we need an ugly #undef G_LOG_DOMAIN at the start of this file currently, since automake doesn't support per target _CFLAGS yet. * glib.h: changed some gints to gbooleans, made a few const corrections, removed some superfluous G_STMT_START{}G_STMT_END wrappers, added some in other required places. * gnode.c: (g_node_prepend): (g_node_insert_before): (g_node_insert): (g_node_append_data): (g_node_prepend_data): (g_node_insert_data_before): (g_node_insert_data): (g_node_append): return (node), so these macros/functions can be usefully chained with g_node_new(). [GModule] Fri Aug 14 02:24:39 1998 Tim Janik <timj@gtk.org> * Makefile.am: feature the G_LOG_DOMAIN macro to set the log domain to "GModule" upon compilation. we currently have to add this definition to the DEFS variable. * testgmodule.c: we need an ugly #undef G_LOG_DOMAIN at the start of this file currently, since automake doesn't support per target _CFLAGS yet.
This commit is contained in:
@@ -40,7 +40,7 @@ g_snprintf (gchar *str,
|
||||
gchar const *fmt,
|
||||
...)
|
||||
{
|
||||
#ifdef HAVE_VSNPRINTF
|
||||
#ifdef HAVE_VSNPRINTF
|
||||
va_list args;
|
||||
gint retval;
|
||||
|
||||
@@ -49,8 +49,7 @@ g_snprintf (gchar *str,
|
||||
va_end (args);
|
||||
|
||||
return retval;
|
||||
|
||||
#else
|
||||
#else /* !HAVE_VSNPRINTF */
|
||||
gchar *printed;
|
||||
va_list args, args2;
|
||||
|
||||
@@ -65,8 +64,31 @@ g_snprintf (gchar *str,
|
||||
va_end (args);
|
||||
|
||||
return strlen (str);
|
||||
#endif /* !HAVE_VSNPRINTF */
|
||||
}
|
||||
|
||||
gint
|
||||
g_vsnprintf (gchar *str,
|
||||
gulong n,
|
||||
gchar const *fmt,
|
||||
va_list *args1,
|
||||
va_list *args2)
|
||||
{
|
||||
#ifdef HAVE_VSNPRINTF
|
||||
gint retval;
|
||||
|
||||
#endif
|
||||
retval = vsnprintf (str, n, fmt, *args1);
|
||||
|
||||
return retval;
|
||||
#else /* !HAVE_VSNPRINTF */
|
||||
gchar *printed;
|
||||
|
||||
printed = g_vsprintf (fmt, args1, args2);
|
||||
strncpy (str, printed, n);
|
||||
str[n-1] = '\0';
|
||||
|
||||
return strlen (str);
|
||||
#endif /* !HAVE_VSNPRINTF */
|
||||
}
|
||||
|
||||
guint
|
||||
|
Reference in New Issue
Block a user