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

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

View 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:

View 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:

View 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:

View 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:

View 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:

View 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:

View 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:

View File

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

2
README
View File

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

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;

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

View 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):

View 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 */
};