fix negative exponent handling (numbers<0).
authorTim Janik <timj@gtk.org>
Tue, 10 Jul 2001 22:37:08 +0000 (22:37 +0000)
committerTim Janik <timj@src.gnome.org>
Tue, 10 Jul 2001 22:37:08 +0000 (22:37 +0000)
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.

14 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
INSTALL
README
glib/gmessages.c
glib/gutils.h
gobject/ChangeLog
gobject/gsignal.h

index c7d8e3b..95d4a66 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
 2001-07-08  Martin Baulig  <baulig@suse.de>
 
        * tests/unicode-normalize.c, tests/unicode-collate.c:
index c7d8e3b..95d4a66 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 2001-07-08  Martin Baulig  <baulig@suse.de>
 
        * tests/unicode-normalize.c, tests/unicode-collate.c:
index c7d8e3b..95d4a66 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 2001-07-08  Martin Baulig  <baulig@suse.de>
 
        * tests/unicode-normalize.c, tests/unicode-collate.c:
index c7d8e3b..95d4a66 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 2001-07-08  Martin Baulig  <baulig@suse.de>
 
        * tests/unicode-normalize.c, tests/unicode-collate.c:
index c7d8e3b..95d4a66 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 2001-07-08  Martin Baulig  <baulig@suse.de>
 
        * tests/unicode-normalize.c, tests/unicode-collate.c:
index c7d8e3b..95d4a66 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 2001-07-08  Martin Baulig  <baulig@suse.de>
 
        * tests/unicode-normalize.c, tests/unicode-collate.c:
index c7d8e3b..95d4a66 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 2001-07-08  Martin Baulig  <baulig@suse.de>
 
        * tests/unicode-normalize.c, tests/unicode-collate.c:
index c7d8e3b..95d4a66 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 2001-07-08  Martin Baulig  <baulig@suse.de>
 
        * tests/unicode-normalize.c, tests/unicode-collate.c:
diff --git a/INSTALL b/INSTALL
index 29a08ed..fa24286 100644 (file)
--- 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 af7cb8a..b02fffe 100644 (file)
--- 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.
 
index 1947950..fe10e74 100644 (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;
index 65929e6..f4c9098 100644 (file)
@@ -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;
   
index 0594629..df693c4 100644 (file)
@@ -1,3 +1,7 @@
+Tue Jul 10 18:50:16 2001  Tim Janik  <timj@gtk.org>
+
+       * gsignal.h (struct _GSignalQuery): fix misplaced comment.
+
 Mon Jul  2 07:17:47 2001  Tim Janik  <timj@gtk.org>
 
        * gobject.c (g_object_weak_ref): 
index 774cfe8..51d3ba4 100644 (file)
@@ -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 */
 };