fix negative exponent handling (numbers<0).

Fri Jul  6 00:02:41 2001  Tim Janik  <timj@gtk.org>

        * 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  <timj@gtk.org>

        * gsignal.h (struct _GSignalQuery): fix misplaced comment.
This commit is contained in:
Tim Janik
2001-07-10 22:37:08 +00:00
committed by Tim Janik
parent 39caf76a7f
commit 11b0d06eee
14 changed files with 85 additions and 17 deletions

View File

@@ -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;