From 11b0d06eeea0ceeb0d4c252aa95189b78d538ef6 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Tue, 10 Jul 2001 22:37:08 +0000 Subject: [PATCH] fix negative exponent handling (numbers<0). Fri Jul 6 00:02:41 2001 Tim Janik * glib/gmessages.c (printf_string_upper_bound): fix negative exponent handling (numbers<0). * glib/gutils.h (g_bit_storage): take a gulong as argument. same for g_bit_nth_lsf() and g_bit_nth_msf() as mask. Tue Jul 10 18:50:16 2001 Tim Janik * gsignal.h (struct _GSignalQuery): fix misplaced comment. --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-0 | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-12 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ INSTALL | 4 ++-- README | 2 +- glib/gmessages.c | 2 +- glib/gutils.h | 22 +++++++++++----------- gobject/ChangeLog | 4 ++++ gobject/gsignal.h | 4 ++-- 14 files changed, 85 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7d8e3b73..95d4a667c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Jul 6 00:02:41 2001 Tim Janik + + * glib/gmessages.c (printf_string_upper_bound): fix negative exponent + handling (numbers<0). + + * glib/gutils.h (g_bit_storage): take a gulong as argument. + same for g_bit_nth_lsf() and g_bit_nth_msf() as mask. + 2001-07-08 Martin Baulig * tests/unicode-normalize.c, tests/unicode-collate.c: diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index c7d8e3b73..95d4a667c 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Fri Jul 6 00:02:41 2001 Tim Janik + + * glib/gmessages.c (printf_string_upper_bound): fix negative exponent + handling (numbers<0). + + * glib/gutils.h (g_bit_storage): take a gulong as argument. + same for g_bit_nth_lsf() and g_bit_nth_msf() as mask. + 2001-07-08 Martin Baulig * tests/unicode-normalize.c, tests/unicode-collate.c: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c7d8e3b73..95d4a667c 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Fri Jul 6 00:02:41 2001 Tim Janik + + * glib/gmessages.c (printf_string_upper_bound): fix negative exponent + handling (numbers<0). + + * glib/gutils.h (g_bit_storage): take a gulong as argument. + same for g_bit_nth_lsf() and g_bit_nth_msf() as mask. + 2001-07-08 Martin Baulig * tests/unicode-normalize.c, tests/unicode-collate.c: diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index c7d8e3b73..95d4a667c 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,11 @@ +Fri Jul 6 00:02:41 2001 Tim Janik + + * glib/gmessages.c (printf_string_upper_bound): fix negative exponent + handling (numbers<0). + + * glib/gutils.h (g_bit_storage): take a gulong as argument. + same for g_bit_nth_lsf() and g_bit_nth_msf() as mask. + 2001-07-08 Martin Baulig * tests/unicode-normalize.c, tests/unicode-collate.c: diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index c7d8e3b73..95d4a667c 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Fri Jul 6 00:02:41 2001 Tim Janik + + * glib/gmessages.c (printf_string_upper_bound): fix negative exponent + handling (numbers<0). + + * glib/gutils.h (g_bit_storage): take a gulong as argument. + same for g_bit_nth_lsf() and g_bit_nth_msf() as mask. + 2001-07-08 Martin Baulig * tests/unicode-normalize.c, tests/unicode-collate.c: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index c7d8e3b73..95d4a667c 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Fri Jul 6 00:02:41 2001 Tim Janik + + * glib/gmessages.c (printf_string_upper_bound): fix negative exponent + handling (numbers<0). + + * glib/gutils.h (g_bit_storage): take a gulong as argument. + same for g_bit_nth_lsf() and g_bit_nth_msf() as mask. + 2001-07-08 Martin Baulig * tests/unicode-normalize.c, tests/unicode-collate.c: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index c7d8e3b73..95d4a667c 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Fri Jul 6 00:02:41 2001 Tim Janik + + * glib/gmessages.c (printf_string_upper_bound): fix negative exponent + handling (numbers<0). + + * glib/gutils.h (g_bit_storage): take a gulong as argument. + same for g_bit_nth_lsf() and g_bit_nth_msf() as mask. + 2001-07-08 Martin Baulig * tests/unicode-normalize.c, tests/unicode-collate.c: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index c7d8e3b73..95d4a667c 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Fri Jul 6 00:02:41 2001 Tim Janik + + * glib/gmessages.c (printf_string_upper_bound): fix negative exponent + handling (numbers<0). + + * glib/gutils.h (g_bit_storage): take a gulong as argument. + same for g_bit_nth_lsf() and g_bit_nth_msf() as mask. + 2001-07-08 Martin Baulig * tests/unicode-normalize.c, tests/unicode-collate.c: diff --git a/INSTALL b/INSTALL index 29a08ed7d..fa24286e0 100644 --- a/INSTALL +++ b/INSTALL @@ -1,8 +1,8 @@ Simple install procedure ======================== - % gzip -cd glib-1.3.6.tar.gz | tar xvf - # unpack the sources - % cd glib-1.3.6 # change to the toplevel directory + % gzip -cd glib-1.3.7.tar.gz | tar xvf - # unpack the sources + % cd glib-1.3.7 # change to the toplevel directory % ./configure # run the `configure' script % make # build GLIB diff --git a/README b/README index af7cb8a28..b02fffe69 100644 --- a/README +++ b/README @@ -13,7 +13,7 @@ version is meant for developers of GLib only: General Information =================== -This is GLib version 1.3.6. GLib is a library which includes support +This is GLib version 1.3.7. GLib is a library which includes support routines for C such as lists, trees, hashes, memory allocation, and many other things. diff --git a/glib/gmessages.c b/glib/gmessages.c index 194795037..fe10e74e8 100644 --- a/glib/gmessages.c +++ b/glib/gmessages.c @@ -1158,7 +1158,7 @@ printf_string_upper_bound (const gchar *format, exp -= G_IEEE754_DOUBLE_BIAS; exp = exp * G_LOG_2_BASE_10 + 1; - conv_len += exp; + conv_len += ABS (exp); /* exp can be <0 */ } /* some printf() implementations require extra padding for rounding */ conv_len += 2; diff --git a/glib/gutils.h b/glib/gutils.h index 65929e6c2..f4c9098e6 100644 --- a/glib/gutils.h +++ b/glib/gutils.h @@ -195,11 +195,11 @@ gchar* g_find_program_in_path (const gchar *program); /* Bit tests */ -G_INLINE_FUNC gint g_bit_nth_lsf (guint32 mask, +G_INLINE_FUNC gint g_bit_nth_lsf (gulong mask, gint nth_bit); -G_INLINE_FUNC gint g_bit_nth_msf (guint32 mask, +G_INLINE_FUNC gint g_bit_nth_msf (gulong mask, gint nth_bit); -G_INLINE_FUNC guint g_bit_storage (guint number); +G_INLINE_FUNC guint g_bit_storage (gulong number); /* Trash Stacks * elements need to be >= sizeof (gpointer) @@ -220,35 +220,35 @@ G_INLINE_FUNC guint g_trash_stack_height (GTrashStack **stack_p); */ #if defined (G_CAN_INLINE) || defined (__G_UTILS_C__) G_INLINE_FUNC gint -g_bit_nth_lsf (guint32 mask, - gint nth_bit) +g_bit_nth_lsf (gulong mask, + gint nth_bit) { do { nth_bit++; - if (mask & (1 << (guint) nth_bit)) + if (mask & (1 << (gulong) nth_bit)) return nth_bit; } while (nth_bit < 32); return -1; } G_INLINE_FUNC gint -g_bit_nth_msf (guint32 mask, - gint nth_bit) +g_bit_nth_msf (gulong mask, + gint nth_bit) { if (nth_bit < 0) - nth_bit = 32; + nth_bit = GLIB_SIZEOF_LONG * 8; do { nth_bit--; - if (mask & (1 << (guint) nth_bit)) + if (mask & (1 << (gulong) nth_bit)) return nth_bit; } while (nth_bit > 0); return -1; } G_INLINE_FUNC guint -g_bit_storage (guint number) +g_bit_storage (gulong number) { register guint n_bits = 0; diff --git a/gobject/ChangeLog b/gobject/ChangeLog index 059462903..df693c41f 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,3 +1,7 @@ +Tue Jul 10 18:50:16 2001 Tim Janik + + * gsignal.h (struct _GSignalQuery): fix misplaced comment. + Mon Jul 2 07:17:47 2001 Tim Janik * gobject.c (g_object_weak_ref): diff --git a/gobject/gsignal.h b/gobject/gsignal.h index 774cfe85a..51d3ba4ff 100644 --- a/gobject/gsignal.h +++ b/gobject/gsignal.h @@ -82,11 +82,11 @@ struct _GSignalQuery { guint signal_id; const gchar *signal_name; - GType itype; /* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag */ + GType itype; GSignalFlags signal_flags; GType return_type; /* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag */ guint n_params; - const GType *param_types; + const GType *param_types; /* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag */ };