mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 23:16:14 +01:00
18:36. incorporated proposed cleanups from gtk-devel-list.
Sat Jul 24 20:11:35 1999 Tim Janik <timj@gtk.org> * merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36. * incorporated proposed cleanups from gtk-devel-list. * bumped version number to GLib-1.3.1 * glib.h: * gqueue.c: * gstring.c: * glist.c: removed string tokenisation (we got g_strsplit() and g_strjoin() already) and readline functions. s/g_list_delete/g_list_delete_link. implemented g_slist_delete_link. removed notion of g_ATEXIT() macro in glib.h, this is an *internal* macro, g_atexit() is provided for public consumption. added GTrashStack inline utility functions. reimplement double eneded queues. removed GStack implementation, people can use a queue or a (singly) linked list for this task. deprecated g_strescape(), we need the SunOS variants here. * gdate.c: added DEBUG_MSG() macro to wrap old messages. * *.*: CVS merges. * upgrade to libtool 1.3.3.
This commit is contained in:
parent
c8a28b935c
commit
87c7aeb93b
@ -25,3 +25,4 @@ testgdateparser
|
|||||||
glibconfig-sysdefs.h
|
glibconfig-sysdefs.h
|
||||||
glib.spec
|
glib.spec
|
||||||
stamp-h.in
|
stamp-h.in
|
||||||
|
glibconfig.h.win32
|
||||||
|
8
AUTHORS
8
AUTHORS
@ -21,10 +21,10 @@ Manish Singh <yosh@gimp.org>
|
|||||||
Owen Taylor <otaylor@gtk.org>
|
Owen Taylor <otaylor@gtk.org>
|
||||||
Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
There are also many others who have contributed patches and fixes;
|
|
||||||
we thank them, for helping us in advancing GLIB.
|
|
||||||
|
|
||||||
The random number generator "Mersenne Twister", which is used by GLib,
|
The random number generator "Mersenne Twister", which is used by GLib,
|
||||||
is developed and originally coded by:
|
was developed and originally coded by:
|
||||||
Makoto Matsumoto <matumoto@math.keio.ac.jp>
|
Makoto Matsumoto <matumoto@math.keio.ac.jp>
|
||||||
Takuji Nishimura <nisimura@math.keio.ac.jp>
|
Takuji Nishimura <nisimura@math.keio.ac.jp>
|
||||||
|
|
||||||
|
There are also many others who have contributed patches and fixes;
|
||||||
|
we thank them, for helping us in advancing GLIB.
|
||||||
|
319
ChangeLog
319
ChangeLog
@ -1,3 +1,32 @@
|
|||||||
|
Sat Jul 24 20:11:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36.
|
||||||
|
* incorporated proposed cleanups from gtk-devel-list.
|
||||||
|
|
||||||
|
* bumped version number to GLib-1.3.1
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gqueue.c:
|
||||||
|
* gstring.c:
|
||||||
|
* glist.c:
|
||||||
|
removed string tokenisation (we got g_strsplit() and g_strjoin()
|
||||||
|
already) and readline functions.
|
||||||
|
s/g_list_delete/g_list_delete_link.
|
||||||
|
implemented g_slist_delete_link.
|
||||||
|
removed notion of g_ATEXIT() macro in glib.h, this is an *internal*
|
||||||
|
macro, g_atexit() is provided for public consumption.
|
||||||
|
added GTrashStack inline utility functions.
|
||||||
|
reimplement double eneded queues.
|
||||||
|
removed GStack implementation, people can use a queue or a (singly)
|
||||||
|
linked list for this task.
|
||||||
|
deprecated g_strescape(), we need the SunOS variants here.
|
||||||
|
|
||||||
|
* gdate.c: added DEBUG_MSG() macro to wrap old messages.
|
||||||
|
|
||||||
|
* *.*: CVS merges.
|
||||||
|
|
||||||
|
* upgrade to libtool 1.3.3.
|
||||||
|
|
||||||
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
||||||
@ -159,6 +188,296 @@ Wed May 12 00:23:55 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
|||||||
Is there a cleaner way than explicitly writing rules that invoke
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
config.status?
|
config.status?
|
||||||
|
|
||||||
|
Fri Jul 16 22:18:36 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.3
|
||||||
|
|
||||||
|
1999-06-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gdate.c, gstrfuncs.c, gstring.c: Fixed the use of the
|
||||||
|
is..... and to..... macros, which take unsigned chars, not chars!
|
||||||
|
Thanks to Morten Welinder <terra@diku.dk> for pointing this out.
|
||||||
|
|
||||||
|
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gerror.c (g_on_error_query): check isatty() before querying so
|
||||||
|
we don't loop endlessly
|
||||||
|
|
||||||
|
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.2
|
||||||
|
|
||||||
|
1999-05-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmain.c: provide a poll prototype for SunOS, as they do not do
|
||||||
|
it self. Hint from Christian Parg <cparg@fs-design.de>.
|
||||||
|
|
||||||
|
Tue May 25 12:23:07 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strchug): Use g_memmove() not memmove().
|
||||||
|
(Reported by Charles Levert <charles@comm.polymtl.ca>)
|
||||||
|
|
||||||
|
Mon May 10 22:03:52 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.3
|
||||||
|
|
||||||
|
1999-05-08 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am tests/Makefile.am: Correct rules for making the
|
||||||
|
win32-related files that are made from corresponding .in files.
|
||||||
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
|
config.status?
|
||||||
|
|
||||||
|
Sat May 1 10:18:01 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3
|
||||||
|
|
||||||
|
1999-04-30 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am: Don't distribute glibconfig.h.win32.in, but
|
||||||
|
glibconfig.h.win32. Generate it when making a dist. Also generate
|
||||||
|
makefile.msc and config.h.win32 from corresponding .in files when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* configure.in: Also substitute @GLIB_INTERFACE_AGE@ and
|
||||||
|
@GLIB_BINARY_AGE@ (needed in config.h.win32).
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in: Use static mutex structure and initial
|
||||||
|
value corresponding to the 1999-04-07 snapshot of pthreads-win32.
|
||||||
|
|
||||||
|
* tests/Makefile.am: Distribute makefile.msc. Generate it when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* tests/makefile.msc.in: New file.
|
||||||
|
|
||||||
|
* tests/node-test.c: Include <stdlib.h> for exit().
|
||||||
|
|
||||||
|
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c: minor code cleanups.
|
||||||
|
|
||||||
|
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
|
||||||
|
the events field so we don't give IRIX fits.
|
||||||
|
|
||||||
|
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): behave conservative with
|
||||||
|
G_TOKEN_IDENTIFIER_NULL and always assume scanner->value.v_string
|
||||||
|
to be "null" in that case.
|
||||||
|
|
||||||
|
1999-04-20 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_vsnprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Mon Apr 19 13:42:21 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Added missing
|
||||||
|
#ifdef G_THREADS_ENABLED. (I never liked G_THREADS_ENABLED in
|
||||||
|
the first place!)
|
||||||
|
|
||||||
|
1999-04-18 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Fri Apr 16 06:52:07 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): feature G_TOKEN_EOF as a valid
|
||||||
|
expected token as well, so we get "- expected end of file" instead of
|
||||||
|
"- expected (unknown) token <0>".
|
||||||
|
|
||||||
|
Tue Apr 13 16:16:14 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.2
|
||||||
|
|
||||||
|
1999-04-12 Elliot Lee <sopwith@mh69.mh.cuc.edu>
|
||||||
|
|
||||||
|
* g_strchug(): s/strcpy/memmove/
|
||||||
|
|
||||||
|
1999-04-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Adjusted the test for an unimplemented
|
||||||
|
getpwuid_r. Info from Michael Pruett <mikep@ugcs.caltech.edu>.
|
||||||
|
|
||||||
|
Sun Apr 11 15:07:34 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: bumped versin number to GLib 1.2.2, interface 2,
|
||||||
|
binary 2.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
Sun Apr 11 14:37:06 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strcasecmp): always check for s1, s2 != NULL.
|
||||||
|
|
||||||
|
Sat Apr 10 19:30:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: removed braces around inline strings for the G_GNUC_FUNCTION
|
||||||
|
and G_GNUC_PRETTY_FUNCTION macros, so the macros can be used for compile
|
||||||
|
time string concatenation.
|
||||||
|
|
||||||
|
Thu Apr 8 19:53:19 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Check for two threads
|
||||||
|
calling g_main_iterate at once.
|
||||||
|
|
||||||
|
* gmain.c: If the set of poll file descriptors changes
|
||||||
|
during a call to poll(), abort that call, and start
|
||||||
|
a new poll. My test program still segfaults
|
||||||
|
obscurely on glibc 2.0 (in read()!!!), but now it works on
|
||||||
|
glibc 2.1, so I'll blame something else for the other segfault.
|
||||||
|
|
||||||
|
1999-03-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Fixed slight bug, that made configure hang on some
|
||||||
|
systems. Please do not merge this into 1.3 branch. It's taken care
|
||||||
|
of differently there. Info from J. Rhett Aultman
|
||||||
|
<cuplan@alley.gator.net>
|
||||||
|
|
||||||
|
Wed Mar 24 21:23:47 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.1
|
||||||
|
|
||||||
|
* README:
|
||||||
|
INSTALL:
|
||||||
|
NEWS:
|
||||||
|
sanity_check: updated
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in:
|
||||||
|
Makefile.am:
|
||||||
|
docs/glib-config.1.in:
|
||||||
|
docs/Makefile.am: Added files used to generate new files.
|
||||||
|
|
||||||
|
* glibconfig.h.win32:
|
||||||
|
docs/glib-config.1: Removed, now generated.
|
||||||
|
|
||||||
|
* configure.in: Added to output now-generated files.
|
||||||
|
|
||||||
|
Tue Mar 23 13:43:39 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* giounix.c: add user_data param to check and prepare functions
|
||||||
|
|
||||||
|
Mon Mar 22 03:54:43 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gmain.c: add user_data to the GSource ->check and ->prepare functions,
|
||||||
|
so it can be used to e.g. pass a GPollFd.
|
||||||
|
(g_main_poll): only add poll records with an events mask != 0 to the
|
||||||
|
fd_array. don't even bother calling poll_func() if fds=timeout=0.
|
||||||
|
added debugging printouts around poll_func() invokation that can be
|
||||||
|
enabled with #define G_MAIN_POLL_DEBUG.
|
||||||
|
|
||||||
|
Fri Mar 19 16:29:50 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.sub
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.2f
|
||||||
|
|
||||||
|
* autogen.sh: libtool is not required to autogen glib
|
||||||
|
|
||||||
|
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
|
||||||
|
needed)
|
||||||
|
|
||||||
|
1999-03-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed another stupid fault of mine: Did
|
||||||
|
s/g_static_/g_private_/g
|
||||||
|
|
||||||
|
Wed Mar 17 03:17:42 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in bumped versin number to GLib 1.2.1, interface 1,
|
||||||
|
binary 1.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
* glib.h: added GLIB_CHECK_VERSION() macro similar to
|
||||||
|
GTK_CHECK_VERSION().
|
||||||
|
|
||||||
|
Sun Mar 14 17:50:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gmem.c (g_mem_chunk_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
(g_mem_profile):
|
||||||
|
(g_mem_chunk_print):
|
||||||
|
(g_mem_chunk_info): removed some extraneous "\n"s at the end of the log
|
||||||
|
messages.
|
||||||
|
|
||||||
|
* gtimer.c (g_timer_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
* grel.c (g_*): changed a bunch of g_assert() statements to
|
||||||
|
g_return_if_fail() and added some extra ones to check relation != NULL.
|
||||||
|
|
||||||
|
1999-03-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Also accept _Pctime_r instead of ctime_r, while
|
||||||
|
seraching for the right `_REENTRANT' flag. This is for Digital
|
||||||
|
UNIX 4.0d. Thanks to Sascha Brawer <sb@adasys.ch>.
|
||||||
|
|
||||||
|
Tue Mar 9 23:25:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: check for working realloc (NULL,).
|
||||||
|
* gmem.c (g_realloc): use malloc() for initial allocation on systems
|
||||||
|
where realloc(NULL,) will not work (this is the case on SunOS, reported
|
||||||
|
by Tom Geiger).
|
||||||
|
|
||||||
|
Mon Mar 8 07:42:08 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* ghook.c (g_hook_unref): when !hook_list->is_setup, wrap the
|
||||||
|
flag around the call to g_hook_free() to avoid spurious
|
||||||
|
warnings (happens during destruction phase).
|
||||||
|
|
||||||
|
1999-03-03 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* glibconfig.h.win32, config.h.win32: Moved G_THREADS_IMPL_POSIX
|
||||||
|
from config.h.win32 to glibconfig.h.win32
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, config.h.win32: Added test for DCE
|
||||||
|
versions of mutex_trylock and cond_timedwait. The win32 versions
|
||||||
|
are posix, aren't they?
|
||||||
|
|
||||||
|
1999-03-02 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed a stupid cut'n'paste error of mine. Thanks to
|
||||||
|
Friedrich Dominicus <Friedrich.Dominicus@inka.de>
|
||||||
|
|
||||||
|
1999-03-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_any_init): Fixed yet another bloody
|
||||||
|
implementation of getpwuid_r on AIX. Thanks to Olaf Dietsche
|
||||||
|
<olaf.dietsche+list.gtk@netcologne.de>. I would like a configure
|
||||||
|
test better than that, but have no idea, how to do that easily.
|
||||||
|
|
||||||
|
Sun Feb 21 22:11:51 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.0
|
||||||
|
|
||||||
|
* AUTHORS: updated
|
||||||
|
|
||||||
|
Wed Feb 24 00:08:42 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* *.[ch]: inserted additional note to look for ChangeLog and
|
||||||
|
AUTHORS file for a log of modifications.
|
||||||
|
|
||||||
|
Sun Feb 21 14:01:00 1999 Dr Mike <drmike@redhat.com>
|
||||||
|
|
||||||
|
* Made specfile generated, tweaked slightly
|
||||||
|
|
||||||
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
* configure.in
|
* configure.in
|
||||||
|
@ -1,3 +1,32 @@
|
|||||||
|
Sat Jul 24 20:11:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36.
|
||||||
|
* incorporated proposed cleanups from gtk-devel-list.
|
||||||
|
|
||||||
|
* bumped version number to GLib-1.3.1
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gqueue.c:
|
||||||
|
* gstring.c:
|
||||||
|
* glist.c:
|
||||||
|
removed string tokenisation (we got g_strsplit() and g_strjoin()
|
||||||
|
already) and readline functions.
|
||||||
|
s/g_list_delete/g_list_delete_link.
|
||||||
|
implemented g_slist_delete_link.
|
||||||
|
removed notion of g_ATEXIT() macro in glib.h, this is an *internal*
|
||||||
|
macro, g_atexit() is provided for public consumption.
|
||||||
|
added GTrashStack inline utility functions.
|
||||||
|
reimplement double eneded queues.
|
||||||
|
removed GStack implementation, people can use a queue or a (singly)
|
||||||
|
linked list for this task.
|
||||||
|
deprecated g_strescape(), we need the SunOS variants here.
|
||||||
|
|
||||||
|
* gdate.c: added DEBUG_MSG() macro to wrap old messages.
|
||||||
|
|
||||||
|
* *.*: CVS merges.
|
||||||
|
|
||||||
|
* upgrade to libtool 1.3.3.
|
||||||
|
|
||||||
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
||||||
@ -159,6 +188,296 @@ Wed May 12 00:23:55 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
|||||||
Is there a cleaner way than explicitly writing rules that invoke
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
config.status?
|
config.status?
|
||||||
|
|
||||||
|
Fri Jul 16 22:18:36 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.3
|
||||||
|
|
||||||
|
1999-06-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gdate.c, gstrfuncs.c, gstring.c: Fixed the use of the
|
||||||
|
is..... and to..... macros, which take unsigned chars, not chars!
|
||||||
|
Thanks to Morten Welinder <terra@diku.dk> for pointing this out.
|
||||||
|
|
||||||
|
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gerror.c (g_on_error_query): check isatty() before querying so
|
||||||
|
we don't loop endlessly
|
||||||
|
|
||||||
|
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.2
|
||||||
|
|
||||||
|
1999-05-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmain.c: provide a poll prototype for SunOS, as they do not do
|
||||||
|
it self. Hint from Christian Parg <cparg@fs-design.de>.
|
||||||
|
|
||||||
|
Tue May 25 12:23:07 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strchug): Use g_memmove() not memmove().
|
||||||
|
(Reported by Charles Levert <charles@comm.polymtl.ca>)
|
||||||
|
|
||||||
|
Mon May 10 22:03:52 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.3
|
||||||
|
|
||||||
|
1999-05-08 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am tests/Makefile.am: Correct rules for making the
|
||||||
|
win32-related files that are made from corresponding .in files.
|
||||||
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
|
config.status?
|
||||||
|
|
||||||
|
Sat May 1 10:18:01 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3
|
||||||
|
|
||||||
|
1999-04-30 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am: Don't distribute glibconfig.h.win32.in, but
|
||||||
|
glibconfig.h.win32. Generate it when making a dist. Also generate
|
||||||
|
makefile.msc and config.h.win32 from corresponding .in files when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* configure.in: Also substitute @GLIB_INTERFACE_AGE@ and
|
||||||
|
@GLIB_BINARY_AGE@ (needed in config.h.win32).
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in: Use static mutex structure and initial
|
||||||
|
value corresponding to the 1999-04-07 snapshot of pthreads-win32.
|
||||||
|
|
||||||
|
* tests/Makefile.am: Distribute makefile.msc. Generate it when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* tests/makefile.msc.in: New file.
|
||||||
|
|
||||||
|
* tests/node-test.c: Include <stdlib.h> for exit().
|
||||||
|
|
||||||
|
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c: minor code cleanups.
|
||||||
|
|
||||||
|
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
|
||||||
|
the events field so we don't give IRIX fits.
|
||||||
|
|
||||||
|
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): behave conservative with
|
||||||
|
G_TOKEN_IDENTIFIER_NULL and always assume scanner->value.v_string
|
||||||
|
to be "null" in that case.
|
||||||
|
|
||||||
|
1999-04-20 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_vsnprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Mon Apr 19 13:42:21 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Added missing
|
||||||
|
#ifdef G_THREADS_ENABLED. (I never liked G_THREADS_ENABLED in
|
||||||
|
the first place!)
|
||||||
|
|
||||||
|
1999-04-18 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Fri Apr 16 06:52:07 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): feature G_TOKEN_EOF as a valid
|
||||||
|
expected token as well, so we get "- expected end of file" instead of
|
||||||
|
"- expected (unknown) token <0>".
|
||||||
|
|
||||||
|
Tue Apr 13 16:16:14 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.2
|
||||||
|
|
||||||
|
1999-04-12 Elliot Lee <sopwith@mh69.mh.cuc.edu>
|
||||||
|
|
||||||
|
* g_strchug(): s/strcpy/memmove/
|
||||||
|
|
||||||
|
1999-04-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Adjusted the test for an unimplemented
|
||||||
|
getpwuid_r. Info from Michael Pruett <mikep@ugcs.caltech.edu>.
|
||||||
|
|
||||||
|
Sun Apr 11 15:07:34 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: bumped versin number to GLib 1.2.2, interface 2,
|
||||||
|
binary 2.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
Sun Apr 11 14:37:06 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strcasecmp): always check for s1, s2 != NULL.
|
||||||
|
|
||||||
|
Sat Apr 10 19:30:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: removed braces around inline strings for the G_GNUC_FUNCTION
|
||||||
|
and G_GNUC_PRETTY_FUNCTION macros, so the macros can be used for compile
|
||||||
|
time string concatenation.
|
||||||
|
|
||||||
|
Thu Apr 8 19:53:19 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Check for two threads
|
||||||
|
calling g_main_iterate at once.
|
||||||
|
|
||||||
|
* gmain.c: If the set of poll file descriptors changes
|
||||||
|
during a call to poll(), abort that call, and start
|
||||||
|
a new poll. My test program still segfaults
|
||||||
|
obscurely on glibc 2.0 (in read()!!!), but now it works on
|
||||||
|
glibc 2.1, so I'll blame something else for the other segfault.
|
||||||
|
|
||||||
|
1999-03-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Fixed slight bug, that made configure hang on some
|
||||||
|
systems. Please do not merge this into 1.3 branch. It's taken care
|
||||||
|
of differently there. Info from J. Rhett Aultman
|
||||||
|
<cuplan@alley.gator.net>
|
||||||
|
|
||||||
|
Wed Mar 24 21:23:47 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.1
|
||||||
|
|
||||||
|
* README:
|
||||||
|
INSTALL:
|
||||||
|
NEWS:
|
||||||
|
sanity_check: updated
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in:
|
||||||
|
Makefile.am:
|
||||||
|
docs/glib-config.1.in:
|
||||||
|
docs/Makefile.am: Added files used to generate new files.
|
||||||
|
|
||||||
|
* glibconfig.h.win32:
|
||||||
|
docs/glib-config.1: Removed, now generated.
|
||||||
|
|
||||||
|
* configure.in: Added to output now-generated files.
|
||||||
|
|
||||||
|
Tue Mar 23 13:43:39 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* giounix.c: add user_data param to check and prepare functions
|
||||||
|
|
||||||
|
Mon Mar 22 03:54:43 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gmain.c: add user_data to the GSource ->check and ->prepare functions,
|
||||||
|
so it can be used to e.g. pass a GPollFd.
|
||||||
|
(g_main_poll): only add poll records with an events mask != 0 to the
|
||||||
|
fd_array. don't even bother calling poll_func() if fds=timeout=0.
|
||||||
|
added debugging printouts around poll_func() invokation that can be
|
||||||
|
enabled with #define G_MAIN_POLL_DEBUG.
|
||||||
|
|
||||||
|
Fri Mar 19 16:29:50 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.sub
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.2f
|
||||||
|
|
||||||
|
* autogen.sh: libtool is not required to autogen glib
|
||||||
|
|
||||||
|
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
|
||||||
|
needed)
|
||||||
|
|
||||||
|
1999-03-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed another stupid fault of mine: Did
|
||||||
|
s/g_static_/g_private_/g
|
||||||
|
|
||||||
|
Wed Mar 17 03:17:42 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in bumped versin number to GLib 1.2.1, interface 1,
|
||||||
|
binary 1.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
* glib.h: added GLIB_CHECK_VERSION() macro similar to
|
||||||
|
GTK_CHECK_VERSION().
|
||||||
|
|
||||||
|
Sun Mar 14 17:50:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gmem.c (g_mem_chunk_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
(g_mem_profile):
|
||||||
|
(g_mem_chunk_print):
|
||||||
|
(g_mem_chunk_info): removed some extraneous "\n"s at the end of the log
|
||||||
|
messages.
|
||||||
|
|
||||||
|
* gtimer.c (g_timer_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
* grel.c (g_*): changed a bunch of g_assert() statements to
|
||||||
|
g_return_if_fail() and added some extra ones to check relation != NULL.
|
||||||
|
|
||||||
|
1999-03-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Also accept _Pctime_r instead of ctime_r, while
|
||||||
|
seraching for the right `_REENTRANT' flag. This is for Digital
|
||||||
|
UNIX 4.0d. Thanks to Sascha Brawer <sb@adasys.ch>.
|
||||||
|
|
||||||
|
Tue Mar 9 23:25:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: check for working realloc (NULL,).
|
||||||
|
* gmem.c (g_realloc): use malloc() for initial allocation on systems
|
||||||
|
where realloc(NULL,) will not work (this is the case on SunOS, reported
|
||||||
|
by Tom Geiger).
|
||||||
|
|
||||||
|
Mon Mar 8 07:42:08 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* ghook.c (g_hook_unref): when !hook_list->is_setup, wrap the
|
||||||
|
flag around the call to g_hook_free() to avoid spurious
|
||||||
|
warnings (happens during destruction phase).
|
||||||
|
|
||||||
|
1999-03-03 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* glibconfig.h.win32, config.h.win32: Moved G_THREADS_IMPL_POSIX
|
||||||
|
from config.h.win32 to glibconfig.h.win32
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, config.h.win32: Added test for DCE
|
||||||
|
versions of mutex_trylock and cond_timedwait. The win32 versions
|
||||||
|
are posix, aren't they?
|
||||||
|
|
||||||
|
1999-03-02 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed a stupid cut'n'paste error of mine. Thanks to
|
||||||
|
Friedrich Dominicus <Friedrich.Dominicus@inka.de>
|
||||||
|
|
||||||
|
1999-03-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_any_init): Fixed yet another bloody
|
||||||
|
implementation of getpwuid_r on AIX. Thanks to Olaf Dietsche
|
||||||
|
<olaf.dietsche+list.gtk@netcologne.de>. I would like a configure
|
||||||
|
test better than that, but have no idea, how to do that easily.
|
||||||
|
|
||||||
|
Sun Feb 21 22:11:51 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.0
|
||||||
|
|
||||||
|
* AUTHORS: updated
|
||||||
|
|
||||||
|
Wed Feb 24 00:08:42 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* *.[ch]: inserted additional note to look for ChangeLog and
|
||||||
|
AUTHORS file for a log of modifications.
|
||||||
|
|
||||||
|
Sun Feb 21 14:01:00 1999 Dr Mike <drmike@redhat.com>
|
||||||
|
|
||||||
|
* Made specfile generated, tweaked slightly
|
||||||
|
|
||||||
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
* configure.in
|
* configure.in
|
||||||
|
@ -1,3 +1,32 @@
|
|||||||
|
Sat Jul 24 20:11:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36.
|
||||||
|
* incorporated proposed cleanups from gtk-devel-list.
|
||||||
|
|
||||||
|
* bumped version number to GLib-1.3.1
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gqueue.c:
|
||||||
|
* gstring.c:
|
||||||
|
* glist.c:
|
||||||
|
removed string tokenisation (we got g_strsplit() and g_strjoin()
|
||||||
|
already) and readline functions.
|
||||||
|
s/g_list_delete/g_list_delete_link.
|
||||||
|
implemented g_slist_delete_link.
|
||||||
|
removed notion of g_ATEXIT() macro in glib.h, this is an *internal*
|
||||||
|
macro, g_atexit() is provided for public consumption.
|
||||||
|
added GTrashStack inline utility functions.
|
||||||
|
reimplement double eneded queues.
|
||||||
|
removed GStack implementation, people can use a queue or a (singly)
|
||||||
|
linked list for this task.
|
||||||
|
deprecated g_strescape(), we need the SunOS variants here.
|
||||||
|
|
||||||
|
* gdate.c: added DEBUG_MSG() macro to wrap old messages.
|
||||||
|
|
||||||
|
* *.*: CVS merges.
|
||||||
|
|
||||||
|
* upgrade to libtool 1.3.3.
|
||||||
|
|
||||||
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
||||||
@ -159,6 +188,296 @@ Wed May 12 00:23:55 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
|||||||
Is there a cleaner way than explicitly writing rules that invoke
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
config.status?
|
config.status?
|
||||||
|
|
||||||
|
Fri Jul 16 22:18:36 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.3
|
||||||
|
|
||||||
|
1999-06-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gdate.c, gstrfuncs.c, gstring.c: Fixed the use of the
|
||||||
|
is..... and to..... macros, which take unsigned chars, not chars!
|
||||||
|
Thanks to Morten Welinder <terra@diku.dk> for pointing this out.
|
||||||
|
|
||||||
|
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gerror.c (g_on_error_query): check isatty() before querying so
|
||||||
|
we don't loop endlessly
|
||||||
|
|
||||||
|
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.2
|
||||||
|
|
||||||
|
1999-05-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmain.c: provide a poll prototype for SunOS, as they do not do
|
||||||
|
it self. Hint from Christian Parg <cparg@fs-design.de>.
|
||||||
|
|
||||||
|
Tue May 25 12:23:07 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strchug): Use g_memmove() not memmove().
|
||||||
|
(Reported by Charles Levert <charles@comm.polymtl.ca>)
|
||||||
|
|
||||||
|
Mon May 10 22:03:52 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.3
|
||||||
|
|
||||||
|
1999-05-08 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am tests/Makefile.am: Correct rules for making the
|
||||||
|
win32-related files that are made from corresponding .in files.
|
||||||
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
|
config.status?
|
||||||
|
|
||||||
|
Sat May 1 10:18:01 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3
|
||||||
|
|
||||||
|
1999-04-30 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am: Don't distribute glibconfig.h.win32.in, but
|
||||||
|
glibconfig.h.win32. Generate it when making a dist. Also generate
|
||||||
|
makefile.msc and config.h.win32 from corresponding .in files when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* configure.in: Also substitute @GLIB_INTERFACE_AGE@ and
|
||||||
|
@GLIB_BINARY_AGE@ (needed in config.h.win32).
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in: Use static mutex structure and initial
|
||||||
|
value corresponding to the 1999-04-07 snapshot of pthreads-win32.
|
||||||
|
|
||||||
|
* tests/Makefile.am: Distribute makefile.msc. Generate it when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* tests/makefile.msc.in: New file.
|
||||||
|
|
||||||
|
* tests/node-test.c: Include <stdlib.h> for exit().
|
||||||
|
|
||||||
|
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c: minor code cleanups.
|
||||||
|
|
||||||
|
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
|
||||||
|
the events field so we don't give IRIX fits.
|
||||||
|
|
||||||
|
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): behave conservative with
|
||||||
|
G_TOKEN_IDENTIFIER_NULL and always assume scanner->value.v_string
|
||||||
|
to be "null" in that case.
|
||||||
|
|
||||||
|
1999-04-20 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_vsnprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Mon Apr 19 13:42:21 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Added missing
|
||||||
|
#ifdef G_THREADS_ENABLED. (I never liked G_THREADS_ENABLED in
|
||||||
|
the first place!)
|
||||||
|
|
||||||
|
1999-04-18 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Fri Apr 16 06:52:07 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): feature G_TOKEN_EOF as a valid
|
||||||
|
expected token as well, so we get "- expected end of file" instead of
|
||||||
|
"- expected (unknown) token <0>".
|
||||||
|
|
||||||
|
Tue Apr 13 16:16:14 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.2
|
||||||
|
|
||||||
|
1999-04-12 Elliot Lee <sopwith@mh69.mh.cuc.edu>
|
||||||
|
|
||||||
|
* g_strchug(): s/strcpy/memmove/
|
||||||
|
|
||||||
|
1999-04-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Adjusted the test for an unimplemented
|
||||||
|
getpwuid_r. Info from Michael Pruett <mikep@ugcs.caltech.edu>.
|
||||||
|
|
||||||
|
Sun Apr 11 15:07:34 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: bumped versin number to GLib 1.2.2, interface 2,
|
||||||
|
binary 2.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
Sun Apr 11 14:37:06 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strcasecmp): always check for s1, s2 != NULL.
|
||||||
|
|
||||||
|
Sat Apr 10 19:30:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: removed braces around inline strings for the G_GNUC_FUNCTION
|
||||||
|
and G_GNUC_PRETTY_FUNCTION macros, so the macros can be used for compile
|
||||||
|
time string concatenation.
|
||||||
|
|
||||||
|
Thu Apr 8 19:53:19 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Check for two threads
|
||||||
|
calling g_main_iterate at once.
|
||||||
|
|
||||||
|
* gmain.c: If the set of poll file descriptors changes
|
||||||
|
during a call to poll(), abort that call, and start
|
||||||
|
a new poll. My test program still segfaults
|
||||||
|
obscurely on glibc 2.0 (in read()!!!), but now it works on
|
||||||
|
glibc 2.1, so I'll blame something else for the other segfault.
|
||||||
|
|
||||||
|
1999-03-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Fixed slight bug, that made configure hang on some
|
||||||
|
systems. Please do not merge this into 1.3 branch. It's taken care
|
||||||
|
of differently there. Info from J. Rhett Aultman
|
||||||
|
<cuplan@alley.gator.net>
|
||||||
|
|
||||||
|
Wed Mar 24 21:23:47 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.1
|
||||||
|
|
||||||
|
* README:
|
||||||
|
INSTALL:
|
||||||
|
NEWS:
|
||||||
|
sanity_check: updated
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in:
|
||||||
|
Makefile.am:
|
||||||
|
docs/glib-config.1.in:
|
||||||
|
docs/Makefile.am: Added files used to generate new files.
|
||||||
|
|
||||||
|
* glibconfig.h.win32:
|
||||||
|
docs/glib-config.1: Removed, now generated.
|
||||||
|
|
||||||
|
* configure.in: Added to output now-generated files.
|
||||||
|
|
||||||
|
Tue Mar 23 13:43:39 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* giounix.c: add user_data param to check and prepare functions
|
||||||
|
|
||||||
|
Mon Mar 22 03:54:43 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gmain.c: add user_data to the GSource ->check and ->prepare functions,
|
||||||
|
so it can be used to e.g. pass a GPollFd.
|
||||||
|
(g_main_poll): only add poll records with an events mask != 0 to the
|
||||||
|
fd_array. don't even bother calling poll_func() if fds=timeout=0.
|
||||||
|
added debugging printouts around poll_func() invokation that can be
|
||||||
|
enabled with #define G_MAIN_POLL_DEBUG.
|
||||||
|
|
||||||
|
Fri Mar 19 16:29:50 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.sub
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.2f
|
||||||
|
|
||||||
|
* autogen.sh: libtool is not required to autogen glib
|
||||||
|
|
||||||
|
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
|
||||||
|
needed)
|
||||||
|
|
||||||
|
1999-03-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed another stupid fault of mine: Did
|
||||||
|
s/g_static_/g_private_/g
|
||||||
|
|
||||||
|
Wed Mar 17 03:17:42 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in bumped versin number to GLib 1.2.1, interface 1,
|
||||||
|
binary 1.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
* glib.h: added GLIB_CHECK_VERSION() macro similar to
|
||||||
|
GTK_CHECK_VERSION().
|
||||||
|
|
||||||
|
Sun Mar 14 17:50:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gmem.c (g_mem_chunk_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
(g_mem_profile):
|
||||||
|
(g_mem_chunk_print):
|
||||||
|
(g_mem_chunk_info): removed some extraneous "\n"s at the end of the log
|
||||||
|
messages.
|
||||||
|
|
||||||
|
* gtimer.c (g_timer_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
* grel.c (g_*): changed a bunch of g_assert() statements to
|
||||||
|
g_return_if_fail() and added some extra ones to check relation != NULL.
|
||||||
|
|
||||||
|
1999-03-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Also accept _Pctime_r instead of ctime_r, while
|
||||||
|
seraching for the right `_REENTRANT' flag. This is for Digital
|
||||||
|
UNIX 4.0d. Thanks to Sascha Brawer <sb@adasys.ch>.
|
||||||
|
|
||||||
|
Tue Mar 9 23:25:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: check for working realloc (NULL,).
|
||||||
|
* gmem.c (g_realloc): use malloc() for initial allocation on systems
|
||||||
|
where realloc(NULL,) will not work (this is the case on SunOS, reported
|
||||||
|
by Tom Geiger).
|
||||||
|
|
||||||
|
Mon Mar 8 07:42:08 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* ghook.c (g_hook_unref): when !hook_list->is_setup, wrap the
|
||||||
|
flag around the call to g_hook_free() to avoid spurious
|
||||||
|
warnings (happens during destruction phase).
|
||||||
|
|
||||||
|
1999-03-03 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* glibconfig.h.win32, config.h.win32: Moved G_THREADS_IMPL_POSIX
|
||||||
|
from config.h.win32 to glibconfig.h.win32
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, config.h.win32: Added test for DCE
|
||||||
|
versions of mutex_trylock and cond_timedwait. The win32 versions
|
||||||
|
are posix, aren't they?
|
||||||
|
|
||||||
|
1999-03-02 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed a stupid cut'n'paste error of mine. Thanks to
|
||||||
|
Friedrich Dominicus <Friedrich.Dominicus@inka.de>
|
||||||
|
|
||||||
|
1999-03-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_any_init): Fixed yet another bloody
|
||||||
|
implementation of getpwuid_r on AIX. Thanks to Olaf Dietsche
|
||||||
|
<olaf.dietsche+list.gtk@netcologne.de>. I would like a configure
|
||||||
|
test better than that, but have no idea, how to do that easily.
|
||||||
|
|
||||||
|
Sun Feb 21 22:11:51 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.0
|
||||||
|
|
||||||
|
* AUTHORS: updated
|
||||||
|
|
||||||
|
Wed Feb 24 00:08:42 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* *.[ch]: inserted additional note to look for ChangeLog and
|
||||||
|
AUTHORS file for a log of modifications.
|
||||||
|
|
||||||
|
Sun Feb 21 14:01:00 1999 Dr Mike <drmike@redhat.com>
|
||||||
|
|
||||||
|
* Made specfile generated, tweaked slightly
|
||||||
|
|
||||||
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
* configure.in
|
* configure.in
|
||||||
|
@ -1,3 +1,32 @@
|
|||||||
|
Sat Jul 24 20:11:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36.
|
||||||
|
* incorporated proposed cleanups from gtk-devel-list.
|
||||||
|
|
||||||
|
* bumped version number to GLib-1.3.1
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gqueue.c:
|
||||||
|
* gstring.c:
|
||||||
|
* glist.c:
|
||||||
|
removed string tokenisation (we got g_strsplit() and g_strjoin()
|
||||||
|
already) and readline functions.
|
||||||
|
s/g_list_delete/g_list_delete_link.
|
||||||
|
implemented g_slist_delete_link.
|
||||||
|
removed notion of g_ATEXIT() macro in glib.h, this is an *internal*
|
||||||
|
macro, g_atexit() is provided for public consumption.
|
||||||
|
added GTrashStack inline utility functions.
|
||||||
|
reimplement double eneded queues.
|
||||||
|
removed GStack implementation, people can use a queue or a (singly)
|
||||||
|
linked list for this task.
|
||||||
|
deprecated g_strescape(), we need the SunOS variants here.
|
||||||
|
|
||||||
|
* gdate.c: added DEBUG_MSG() macro to wrap old messages.
|
||||||
|
|
||||||
|
* *.*: CVS merges.
|
||||||
|
|
||||||
|
* upgrade to libtool 1.3.3.
|
||||||
|
|
||||||
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
||||||
@ -159,6 +188,296 @@ Wed May 12 00:23:55 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
|||||||
Is there a cleaner way than explicitly writing rules that invoke
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
config.status?
|
config.status?
|
||||||
|
|
||||||
|
Fri Jul 16 22:18:36 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.3
|
||||||
|
|
||||||
|
1999-06-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gdate.c, gstrfuncs.c, gstring.c: Fixed the use of the
|
||||||
|
is..... and to..... macros, which take unsigned chars, not chars!
|
||||||
|
Thanks to Morten Welinder <terra@diku.dk> for pointing this out.
|
||||||
|
|
||||||
|
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gerror.c (g_on_error_query): check isatty() before querying so
|
||||||
|
we don't loop endlessly
|
||||||
|
|
||||||
|
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.2
|
||||||
|
|
||||||
|
1999-05-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmain.c: provide a poll prototype for SunOS, as they do not do
|
||||||
|
it self. Hint from Christian Parg <cparg@fs-design.de>.
|
||||||
|
|
||||||
|
Tue May 25 12:23:07 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strchug): Use g_memmove() not memmove().
|
||||||
|
(Reported by Charles Levert <charles@comm.polymtl.ca>)
|
||||||
|
|
||||||
|
Mon May 10 22:03:52 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.3
|
||||||
|
|
||||||
|
1999-05-08 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am tests/Makefile.am: Correct rules for making the
|
||||||
|
win32-related files that are made from corresponding .in files.
|
||||||
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
|
config.status?
|
||||||
|
|
||||||
|
Sat May 1 10:18:01 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3
|
||||||
|
|
||||||
|
1999-04-30 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am: Don't distribute glibconfig.h.win32.in, but
|
||||||
|
glibconfig.h.win32. Generate it when making a dist. Also generate
|
||||||
|
makefile.msc and config.h.win32 from corresponding .in files when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* configure.in: Also substitute @GLIB_INTERFACE_AGE@ and
|
||||||
|
@GLIB_BINARY_AGE@ (needed in config.h.win32).
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in: Use static mutex structure and initial
|
||||||
|
value corresponding to the 1999-04-07 snapshot of pthreads-win32.
|
||||||
|
|
||||||
|
* tests/Makefile.am: Distribute makefile.msc. Generate it when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* tests/makefile.msc.in: New file.
|
||||||
|
|
||||||
|
* tests/node-test.c: Include <stdlib.h> for exit().
|
||||||
|
|
||||||
|
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c: minor code cleanups.
|
||||||
|
|
||||||
|
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
|
||||||
|
the events field so we don't give IRIX fits.
|
||||||
|
|
||||||
|
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): behave conservative with
|
||||||
|
G_TOKEN_IDENTIFIER_NULL and always assume scanner->value.v_string
|
||||||
|
to be "null" in that case.
|
||||||
|
|
||||||
|
1999-04-20 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_vsnprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Mon Apr 19 13:42:21 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Added missing
|
||||||
|
#ifdef G_THREADS_ENABLED. (I never liked G_THREADS_ENABLED in
|
||||||
|
the first place!)
|
||||||
|
|
||||||
|
1999-04-18 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Fri Apr 16 06:52:07 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): feature G_TOKEN_EOF as a valid
|
||||||
|
expected token as well, so we get "- expected end of file" instead of
|
||||||
|
"- expected (unknown) token <0>".
|
||||||
|
|
||||||
|
Tue Apr 13 16:16:14 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.2
|
||||||
|
|
||||||
|
1999-04-12 Elliot Lee <sopwith@mh69.mh.cuc.edu>
|
||||||
|
|
||||||
|
* g_strchug(): s/strcpy/memmove/
|
||||||
|
|
||||||
|
1999-04-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Adjusted the test for an unimplemented
|
||||||
|
getpwuid_r. Info from Michael Pruett <mikep@ugcs.caltech.edu>.
|
||||||
|
|
||||||
|
Sun Apr 11 15:07:34 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: bumped versin number to GLib 1.2.2, interface 2,
|
||||||
|
binary 2.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
Sun Apr 11 14:37:06 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strcasecmp): always check for s1, s2 != NULL.
|
||||||
|
|
||||||
|
Sat Apr 10 19:30:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: removed braces around inline strings for the G_GNUC_FUNCTION
|
||||||
|
and G_GNUC_PRETTY_FUNCTION macros, so the macros can be used for compile
|
||||||
|
time string concatenation.
|
||||||
|
|
||||||
|
Thu Apr 8 19:53:19 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Check for two threads
|
||||||
|
calling g_main_iterate at once.
|
||||||
|
|
||||||
|
* gmain.c: If the set of poll file descriptors changes
|
||||||
|
during a call to poll(), abort that call, and start
|
||||||
|
a new poll. My test program still segfaults
|
||||||
|
obscurely on glibc 2.0 (in read()!!!), but now it works on
|
||||||
|
glibc 2.1, so I'll blame something else for the other segfault.
|
||||||
|
|
||||||
|
1999-03-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Fixed slight bug, that made configure hang on some
|
||||||
|
systems. Please do not merge this into 1.3 branch. It's taken care
|
||||||
|
of differently there. Info from J. Rhett Aultman
|
||||||
|
<cuplan@alley.gator.net>
|
||||||
|
|
||||||
|
Wed Mar 24 21:23:47 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.1
|
||||||
|
|
||||||
|
* README:
|
||||||
|
INSTALL:
|
||||||
|
NEWS:
|
||||||
|
sanity_check: updated
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in:
|
||||||
|
Makefile.am:
|
||||||
|
docs/glib-config.1.in:
|
||||||
|
docs/Makefile.am: Added files used to generate new files.
|
||||||
|
|
||||||
|
* glibconfig.h.win32:
|
||||||
|
docs/glib-config.1: Removed, now generated.
|
||||||
|
|
||||||
|
* configure.in: Added to output now-generated files.
|
||||||
|
|
||||||
|
Tue Mar 23 13:43:39 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* giounix.c: add user_data param to check and prepare functions
|
||||||
|
|
||||||
|
Mon Mar 22 03:54:43 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gmain.c: add user_data to the GSource ->check and ->prepare functions,
|
||||||
|
so it can be used to e.g. pass a GPollFd.
|
||||||
|
(g_main_poll): only add poll records with an events mask != 0 to the
|
||||||
|
fd_array. don't even bother calling poll_func() if fds=timeout=0.
|
||||||
|
added debugging printouts around poll_func() invokation that can be
|
||||||
|
enabled with #define G_MAIN_POLL_DEBUG.
|
||||||
|
|
||||||
|
Fri Mar 19 16:29:50 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.sub
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.2f
|
||||||
|
|
||||||
|
* autogen.sh: libtool is not required to autogen glib
|
||||||
|
|
||||||
|
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
|
||||||
|
needed)
|
||||||
|
|
||||||
|
1999-03-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed another stupid fault of mine: Did
|
||||||
|
s/g_static_/g_private_/g
|
||||||
|
|
||||||
|
Wed Mar 17 03:17:42 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in bumped versin number to GLib 1.2.1, interface 1,
|
||||||
|
binary 1.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
* glib.h: added GLIB_CHECK_VERSION() macro similar to
|
||||||
|
GTK_CHECK_VERSION().
|
||||||
|
|
||||||
|
Sun Mar 14 17:50:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gmem.c (g_mem_chunk_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
(g_mem_profile):
|
||||||
|
(g_mem_chunk_print):
|
||||||
|
(g_mem_chunk_info): removed some extraneous "\n"s at the end of the log
|
||||||
|
messages.
|
||||||
|
|
||||||
|
* gtimer.c (g_timer_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
* grel.c (g_*): changed a bunch of g_assert() statements to
|
||||||
|
g_return_if_fail() and added some extra ones to check relation != NULL.
|
||||||
|
|
||||||
|
1999-03-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Also accept _Pctime_r instead of ctime_r, while
|
||||||
|
seraching for the right `_REENTRANT' flag. This is for Digital
|
||||||
|
UNIX 4.0d. Thanks to Sascha Brawer <sb@adasys.ch>.
|
||||||
|
|
||||||
|
Tue Mar 9 23:25:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: check for working realloc (NULL,).
|
||||||
|
* gmem.c (g_realloc): use malloc() for initial allocation on systems
|
||||||
|
where realloc(NULL,) will not work (this is the case on SunOS, reported
|
||||||
|
by Tom Geiger).
|
||||||
|
|
||||||
|
Mon Mar 8 07:42:08 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* ghook.c (g_hook_unref): when !hook_list->is_setup, wrap the
|
||||||
|
flag around the call to g_hook_free() to avoid spurious
|
||||||
|
warnings (happens during destruction phase).
|
||||||
|
|
||||||
|
1999-03-03 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* glibconfig.h.win32, config.h.win32: Moved G_THREADS_IMPL_POSIX
|
||||||
|
from config.h.win32 to glibconfig.h.win32
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, config.h.win32: Added test for DCE
|
||||||
|
versions of mutex_trylock and cond_timedwait. The win32 versions
|
||||||
|
are posix, aren't they?
|
||||||
|
|
||||||
|
1999-03-02 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed a stupid cut'n'paste error of mine. Thanks to
|
||||||
|
Friedrich Dominicus <Friedrich.Dominicus@inka.de>
|
||||||
|
|
||||||
|
1999-03-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_any_init): Fixed yet another bloody
|
||||||
|
implementation of getpwuid_r on AIX. Thanks to Olaf Dietsche
|
||||||
|
<olaf.dietsche+list.gtk@netcologne.de>. I would like a configure
|
||||||
|
test better than that, but have no idea, how to do that easily.
|
||||||
|
|
||||||
|
Sun Feb 21 22:11:51 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.0
|
||||||
|
|
||||||
|
* AUTHORS: updated
|
||||||
|
|
||||||
|
Wed Feb 24 00:08:42 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* *.[ch]: inserted additional note to look for ChangeLog and
|
||||||
|
AUTHORS file for a log of modifications.
|
||||||
|
|
||||||
|
Sun Feb 21 14:01:00 1999 Dr Mike <drmike@redhat.com>
|
||||||
|
|
||||||
|
* Made specfile generated, tweaked slightly
|
||||||
|
|
||||||
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
* configure.in
|
* configure.in
|
||||||
|
@ -1,3 +1,32 @@
|
|||||||
|
Sat Jul 24 20:11:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36.
|
||||||
|
* incorporated proposed cleanups from gtk-devel-list.
|
||||||
|
|
||||||
|
* bumped version number to GLib-1.3.1
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gqueue.c:
|
||||||
|
* gstring.c:
|
||||||
|
* glist.c:
|
||||||
|
removed string tokenisation (we got g_strsplit() and g_strjoin()
|
||||||
|
already) and readline functions.
|
||||||
|
s/g_list_delete/g_list_delete_link.
|
||||||
|
implemented g_slist_delete_link.
|
||||||
|
removed notion of g_ATEXIT() macro in glib.h, this is an *internal*
|
||||||
|
macro, g_atexit() is provided for public consumption.
|
||||||
|
added GTrashStack inline utility functions.
|
||||||
|
reimplement double eneded queues.
|
||||||
|
removed GStack implementation, people can use a queue or a (singly)
|
||||||
|
linked list for this task.
|
||||||
|
deprecated g_strescape(), we need the SunOS variants here.
|
||||||
|
|
||||||
|
* gdate.c: added DEBUG_MSG() macro to wrap old messages.
|
||||||
|
|
||||||
|
* *.*: CVS merges.
|
||||||
|
|
||||||
|
* upgrade to libtool 1.3.3.
|
||||||
|
|
||||||
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
||||||
@ -159,6 +188,296 @@ Wed May 12 00:23:55 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
|||||||
Is there a cleaner way than explicitly writing rules that invoke
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
config.status?
|
config.status?
|
||||||
|
|
||||||
|
Fri Jul 16 22:18:36 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.3
|
||||||
|
|
||||||
|
1999-06-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gdate.c, gstrfuncs.c, gstring.c: Fixed the use of the
|
||||||
|
is..... and to..... macros, which take unsigned chars, not chars!
|
||||||
|
Thanks to Morten Welinder <terra@diku.dk> for pointing this out.
|
||||||
|
|
||||||
|
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gerror.c (g_on_error_query): check isatty() before querying so
|
||||||
|
we don't loop endlessly
|
||||||
|
|
||||||
|
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.2
|
||||||
|
|
||||||
|
1999-05-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmain.c: provide a poll prototype for SunOS, as they do not do
|
||||||
|
it self. Hint from Christian Parg <cparg@fs-design.de>.
|
||||||
|
|
||||||
|
Tue May 25 12:23:07 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strchug): Use g_memmove() not memmove().
|
||||||
|
(Reported by Charles Levert <charles@comm.polymtl.ca>)
|
||||||
|
|
||||||
|
Mon May 10 22:03:52 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.3
|
||||||
|
|
||||||
|
1999-05-08 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am tests/Makefile.am: Correct rules for making the
|
||||||
|
win32-related files that are made from corresponding .in files.
|
||||||
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
|
config.status?
|
||||||
|
|
||||||
|
Sat May 1 10:18:01 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3
|
||||||
|
|
||||||
|
1999-04-30 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am: Don't distribute glibconfig.h.win32.in, but
|
||||||
|
glibconfig.h.win32. Generate it when making a dist. Also generate
|
||||||
|
makefile.msc and config.h.win32 from corresponding .in files when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* configure.in: Also substitute @GLIB_INTERFACE_AGE@ and
|
||||||
|
@GLIB_BINARY_AGE@ (needed in config.h.win32).
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in: Use static mutex structure and initial
|
||||||
|
value corresponding to the 1999-04-07 snapshot of pthreads-win32.
|
||||||
|
|
||||||
|
* tests/Makefile.am: Distribute makefile.msc. Generate it when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* tests/makefile.msc.in: New file.
|
||||||
|
|
||||||
|
* tests/node-test.c: Include <stdlib.h> for exit().
|
||||||
|
|
||||||
|
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c: minor code cleanups.
|
||||||
|
|
||||||
|
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
|
||||||
|
the events field so we don't give IRIX fits.
|
||||||
|
|
||||||
|
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): behave conservative with
|
||||||
|
G_TOKEN_IDENTIFIER_NULL and always assume scanner->value.v_string
|
||||||
|
to be "null" in that case.
|
||||||
|
|
||||||
|
1999-04-20 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_vsnprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Mon Apr 19 13:42:21 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Added missing
|
||||||
|
#ifdef G_THREADS_ENABLED. (I never liked G_THREADS_ENABLED in
|
||||||
|
the first place!)
|
||||||
|
|
||||||
|
1999-04-18 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Fri Apr 16 06:52:07 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): feature G_TOKEN_EOF as a valid
|
||||||
|
expected token as well, so we get "- expected end of file" instead of
|
||||||
|
"- expected (unknown) token <0>".
|
||||||
|
|
||||||
|
Tue Apr 13 16:16:14 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.2
|
||||||
|
|
||||||
|
1999-04-12 Elliot Lee <sopwith@mh69.mh.cuc.edu>
|
||||||
|
|
||||||
|
* g_strchug(): s/strcpy/memmove/
|
||||||
|
|
||||||
|
1999-04-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Adjusted the test for an unimplemented
|
||||||
|
getpwuid_r. Info from Michael Pruett <mikep@ugcs.caltech.edu>.
|
||||||
|
|
||||||
|
Sun Apr 11 15:07:34 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: bumped versin number to GLib 1.2.2, interface 2,
|
||||||
|
binary 2.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
Sun Apr 11 14:37:06 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strcasecmp): always check for s1, s2 != NULL.
|
||||||
|
|
||||||
|
Sat Apr 10 19:30:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: removed braces around inline strings for the G_GNUC_FUNCTION
|
||||||
|
and G_GNUC_PRETTY_FUNCTION macros, so the macros can be used for compile
|
||||||
|
time string concatenation.
|
||||||
|
|
||||||
|
Thu Apr 8 19:53:19 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Check for two threads
|
||||||
|
calling g_main_iterate at once.
|
||||||
|
|
||||||
|
* gmain.c: If the set of poll file descriptors changes
|
||||||
|
during a call to poll(), abort that call, and start
|
||||||
|
a new poll. My test program still segfaults
|
||||||
|
obscurely on glibc 2.0 (in read()!!!), but now it works on
|
||||||
|
glibc 2.1, so I'll blame something else for the other segfault.
|
||||||
|
|
||||||
|
1999-03-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Fixed slight bug, that made configure hang on some
|
||||||
|
systems. Please do not merge this into 1.3 branch. It's taken care
|
||||||
|
of differently there. Info from J. Rhett Aultman
|
||||||
|
<cuplan@alley.gator.net>
|
||||||
|
|
||||||
|
Wed Mar 24 21:23:47 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.1
|
||||||
|
|
||||||
|
* README:
|
||||||
|
INSTALL:
|
||||||
|
NEWS:
|
||||||
|
sanity_check: updated
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in:
|
||||||
|
Makefile.am:
|
||||||
|
docs/glib-config.1.in:
|
||||||
|
docs/Makefile.am: Added files used to generate new files.
|
||||||
|
|
||||||
|
* glibconfig.h.win32:
|
||||||
|
docs/glib-config.1: Removed, now generated.
|
||||||
|
|
||||||
|
* configure.in: Added to output now-generated files.
|
||||||
|
|
||||||
|
Tue Mar 23 13:43:39 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* giounix.c: add user_data param to check and prepare functions
|
||||||
|
|
||||||
|
Mon Mar 22 03:54:43 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gmain.c: add user_data to the GSource ->check and ->prepare functions,
|
||||||
|
so it can be used to e.g. pass a GPollFd.
|
||||||
|
(g_main_poll): only add poll records with an events mask != 0 to the
|
||||||
|
fd_array. don't even bother calling poll_func() if fds=timeout=0.
|
||||||
|
added debugging printouts around poll_func() invokation that can be
|
||||||
|
enabled with #define G_MAIN_POLL_DEBUG.
|
||||||
|
|
||||||
|
Fri Mar 19 16:29:50 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.sub
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.2f
|
||||||
|
|
||||||
|
* autogen.sh: libtool is not required to autogen glib
|
||||||
|
|
||||||
|
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
|
||||||
|
needed)
|
||||||
|
|
||||||
|
1999-03-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed another stupid fault of mine: Did
|
||||||
|
s/g_static_/g_private_/g
|
||||||
|
|
||||||
|
Wed Mar 17 03:17:42 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in bumped versin number to GLib 1.2.1, interface 1,
|
||||||
|
binary 1.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
* glib.h: added GLIB_CHECK_VERSION() macro similar to
|
||||||
|
GTK_CHECK_VERSION().
|
||||||
|
|
||||||
|
Sun Mar 14 17:50:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gmem.c (g_mem_chunk_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
(g_mem_profile):
|
||||||
|
(g_mem_chunk_print):
|
||||||
|
(g_mem_chunk_info): removed some extraneous "\n"s at the end of the log
|
||||||
|
messages.
|
||||||
|
|
||||||
|
* gtimer.c (g_timer_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
* grel.c (g_*): changed a bunch of g_assert() statements to
|
||||||
|
g_return_if_fail() and added some extra ones to check relation != NULL.
|
||||||
|
|
||||||
|
1999-03-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Also accept _Pctime_r instead of ctime_r, while
|
||||||
|
seraching for the right `_REENTRANT' flag. This is for Digital
|
||||||
|
UNIX 4.0d. Thanks to Sascha Brawer <sb@adasys.ch>.
|
||||||
|
|
||||||
|
Tue Mar 9 23:25:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: check for working realloc (NULL,).
|
||||||
|
* gmem.c (g_realloc): use malloc() for initial allocation on systems
|
||||||
|
where realloc(NULL,) will not work (this is the case on SunOS, reported
|
||||||
|
by Tom Geiger).
|
||||||
|
|
||||||
|
Mon Mar 8 07:42:08 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* ghook.c (g_hook_unref): when !hook_list->is_setup, wrap the
|
||||||
|
flag around the call to g_hook_free() to avoid spurious
|
||||||
|
warnings (happens during destruction phase).
|
||||||
|
|
||||||
|
1999-03-03 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* glibconfig.h.win32, config.h.win32: Moved G_THREADS_IMPL_POSIX
|
||||||
|
from config.h.win32 to glibconfig.h.win32
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, config.h.win32: Added test for DCE
|
||||||
|
versions of mutex_trylock and cond_timedwait. The win32 versions
|
||||||
|
are posix, aren't they?
|
||||||
|
|
||||||
|
1999-03-02 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed a stupid cut'n'paste error of mine. Thanks to
|
||||||
|
Friedrich Dominicus <Friedrich.Dominicus@inka.de>
|
||||||
|
|
||||||
|
1999-03-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_any_init): Fixed yet another bloody
|
||||||
|
implementation of getpwuid_r on AIX. Thanks to Olaf Dietsche
|
||||||
|
<olaf.dietsche+list.gtk@netcologne.de>. I would like a configure
|
||||||
|
test better than that, but have no idea, how to do that easily.
|
||||||
|
|
||||||
|
Sun Feb 21 22:11:51 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.0
|
||||||
|
|
||||||
|
* AUTHORS: updated
|
||||||
|
|
||||||
|
Wed Feb 24 00:08:42 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* *.[ch]: inserted additional note to look for ChangeLog and
|
||||||
|
AUTHORS file for a log of modifications.
|
||||||
|
|
||||||
|
Sun Feb 21 14:01:00 1999 Dr Mike <drmike@redhat.com>
|
||||||
|
|
||||||
|
* Made specfile generated, tweaked slightly
|
||||||
|
|
||||||
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
* configure.in
|
* configure.in
|
||||||
|
@ -1,3 +1,32 @@
|
|||||||
|
Sat Jul 24 20:11:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36.
|
||||||
|
* incorporated proposed cleanups from gtk-devel-list.
|
||||||
|
|
||||||
|
* bumped version number to GLib-1.3.1
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gqueue.c:
|
||||||
|
* gstring.c:
|
||||||
|
* glist.c:
|
||||||
|
removed string tokenisation (we got g_strsplit() and g_strjoin()
|
||||||
|
already) and readline functions.
|
||||||
|
s/g_list_delete/g_list_delete_link.
|
||||||
|
implemented g_slist_delete_link.
|
||||||
|
removed notion of g_ATEXIT() macro in glib.h, this is an *internal*
|
||||||
|
macro, g_atexit() is provided for public consumption.
|
||||||
|
added GTrashStack inline utility functions.
|
||||||
|
reimplement double eneded queues.
|
||||||
|
removed GStack implementation, people can use a queue or a (singly)
|
||||||
|
linked list for this task.
|
||||||
|
deprecated g_strescape(), we need the SunOS variants here.
|
||||||
|
|
||||||
|
* gdate.c: added DEBUG_MSG() macro to wrap old messages.
|
||||||
|
|
||||||
|
* *.*: CVS merges.
|
||||||
|
|
||||||
|
* upgrade to libtool 1.3.3.
|
||||||
|
|
||||||
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
||||||
@ -159,6 +188,296 @@ Wed May 12 00:23:55 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
|||||||
Is there a cleaner way than explicitly writing rules that invoke
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
config.status?
|
config.status?
|
||||||
|
|
||||||
|
Fri Jul 16 22:18:36 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.3
|
||||||
|
|
||||||
|
1999-06-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gdate.c, gstrfuncs.c, gstring.c: Fixed the use of the
|
||||||
|
is..... and to..... macros, which take unsigned chars, not chars!
|
||||||
|
Thanks to Morten Welinder <terra@diku.dk> for pointing this out.
|
||||||
|
|
||||||
|
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gerror.c (g_on_error_query): check isatty() before querying so
|
||||||
|
we don't loop endlessly
|
||||||
|
|
||||||
|
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.2
|
||||||
|
|
||||||
|
1999-05-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmain.c: provide a poll prototype for SunOS, as they do not do
|
||||||
|
it self. Hint from Christian Parg <cparg@fs-design.de>.
|
||||||
|
|
||||||
|
Tue May 25 12:23:07 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strchug): Use g_memmove() not memmove().
|
||||||
|
(Reported by Charles Levert <charles@comm.polymtl.ca>)
|
||||||
|
|
||||||
|
Mon May 10 22:03:52 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.3
|
||||||
|
|
||||||
|
1999-05-08 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am tests/Makefile.am: Correct rules for making the
|
||||||
|
win32-related files that are made from corresponding .in files.
|
||||||
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
|
config.status?
|
||||||
|
|
||||||
|
Sat May 1 10:18:01 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3
|
||||||
|
|
||||||
|
1999-04-30 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am: Don't distribute glibconfig.h.win32.in, but
|
||||||
|
glibconfig.h.win32. Generate it when making a dist. Also generate
|
||||||
|
makefile.msc and config.h.win32 from corresponding .in files when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* configure.in: Also substitute @GLIB_INTERFACE_AGE@ and
|
||||||
|
@GLIB_BINARY_AGE@ (needed in config.h.win32).
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in: Use static mutex structure and initial
|
||||||
|
value corresponding to the 1999-04-07 snapshot of pthreads-win32.
|
||||||
|
|
||||||
|
* tests/Makefile.am: Distribute makefile.msc. Generate it when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* tests/makefile.msc.in: New file.
|
||||||
|
|
||||||
|
* tests/node-test.c: Include <stdlib.h> for exit().
|
||||||
|
|
||||||
|
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c: minor code cleanups.
|
||||||
|
|
||||||
|
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
|
||||||
|
the events field so we don't give IRIX fits.
|
||||||
|
|
||||||
|
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): behave conservative with
|
||||||
|
G_TOKEN_IDENTIFIER_NULL and always assume scanner->value.v_string
|
||||||
|
to be "null" in that case.
|
||||||
|
|
||||||
|
1999-04-20 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_vsnprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Mon Apr 19 13:42:21 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Added missing
|
||||||
|
#ifdef G_THREADS_ENABLED. (I never liked G_THREADS_ENABLED in
|
||||||
|
the first place!)
|
||||||
|
|
||||||
|
1999-04-18 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Fri Apr 16 06:52:07 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): feature G_TOKEN_EOF as a valid
|
||||||
|
expected token as well, so we get "- expected end of file" instead of
|
||||||
|
"- expected (unknown) token <0>".
|
||||||
|
|
||||||
|
Tue Apr 13 16:16:14 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.2
|
||||||
|
|
||||||
|
1999-04-12 Elliot Lee <sopwith@mh69.mh.cuc.edu>
|
||||||
|
|
||||||
|
* g_strchug(): s/strcpy/memmove/
|
||||||
|
|
||||||
|
1999-04-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Adjusted the test for an unimplemented
|
||||||
|
getpwuid_r. Info from Michael Pruett <mikep@ugcs.caltech.edu>.
|
||||||
|
|
||||||
|
Sun Apr 11 15:07:34 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: bumped versin number to GLib 1.2.2, interface 2,
|
||||||
|
binary 2.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
Sun Apr 11 14:37:06 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strcasecmp): always check for s1, s2 != NULL.
|
||||||
|
|
||||||
|
Sat Apr 10 19:30:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: removed braces around inline strings for the G_GNUC_FUNCTION
|
||||||
|
and G_GNUC_PRETTY_FUNCTION macros, so the macros can be used for compile
|
||||||
|
time string concatenation.
|
||||||
|
|
||||||
|
Thu Apr 8 19:53:19 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Check for two threads
|
||||||
|
calling g_main_iterate at once.
|
||||||
|
|
||||||
|
* gmain.c: If the set of poll file descriptors changes
|
||||||
|
during a call to poll(), abort that call, and start
|
||||||
|
a new poll. My test program still segfaults
|
||||||
|
obscurely on glibc 2.0 (in read()!!!), but now it works on
|
||||||
|
glibc 2.1, so I'll blame something else for the other segfault.
|
||||||
|
|
||||||
|
1999-03-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Fixed slight bug, that made configure hang on some
|
||||||
|
systems. Please do not merge this into 1.3 branch. It's taken care
|
||||||
|
of differently there. Info from J. Rhett Aultman
|
||||||
|
<cuplan@alley.gator.net>
|
||||||
|
|
||||||
|
Wed Mar 24 21:23:47 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.1
|
||||||
|
|
||||||
|
* README:
|
||||||
|
INSTALL:
|
||||||
|
NEWS:
|
||||||
|
sanity_check: updated
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in:
|
||||||
|
Makefile.am:
|
||||||
|
docs/glib-config.1.in:
|
||||||
|
docs/Makefile.am: Added files used to generate new files.
|
||||||
|
|
||||||
|
* glibconfig.h.win32:
|
||||||
|
docs/glib-config.1: Removed, now generated.
|
||||||
|
|
||||||
|
* configure.in: Added to output now-generated files.
|
||||||
|
|
||||||
|
Tue Mar 23 13:43:39 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* giounix.c: add user_data param to check and prepare functions
|
||||||
|
|
||||||
|
Mon Mar 22 03:54:43 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gmain.c: add user_data to the GSource ->check and ->prepare functions,
|
||||||
|
so it can be used to e.g. pass a GPollFd.
|
||||||
|
(g_main_poll): only add poll records with an events mask != 0 to the
|
||||||
|
fd_array. don't even bother calling poll_func() if fds=timeout=0.
|
||||||
|
added debugging printouts around poll_func() invokation that can be
|
||||||
|
enabled with #define G_MAIN_POLL_DEBUG.
|
||||||
|
|
||||||
|
Fri Mar 19 16:29:50 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.sub
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.2f
|
||||||
|
|
||||||
|
* autogen.sh: libtool is not required to autogen glib
|
||||||
|
|
||||||
|
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
|
||||||
|
needed)
|
||||||
|
|
||||||
|
1999-03-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed another stupid fault of mine: Did
|
||||||
|
s/g_static_/g_private_/g
|
||||||
|
|
||||||
|
Wed Mar 17 03:17:42 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in bumped versin number to GLib 1.2.1, interface 1,
|
||||||
|
binary 1.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
* glib.h: added GLIB_CHECK_VERSION() macro similar to
|
||||||
|
GTK_CHECK_VERSION().
|
||||||
|
|
||||||
|
Sun Mar 14 17:50:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gmem.c (g_mem_chunk_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
(g_mem_profile):
|
||||||
|
(g_mem_chunk_print):
|
||||||
|
(g_mem_chunk_info): removed some extraneous "\n"s at the end of the log
|
||||||
|
messages.
|
||||||
|
|
||||||
|
* gtimer.c (g_timer_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
* grel.c (g_*): changed a bunch of g_assert() statements to
|
||||||
|
g_return_if_fail() and added some extra ones to check relation != NULL.
|
||||||
|
|
||||||
|
1999-03-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Also accept _Pctime_r instead of ctime_r, while
|
||||||
|
seraching for the right `_REENTRANT' flag. This is for Digital
|
||||||
|
UNIX 4.0d. Thanks to Sascha Brawer <sb@adasys.ch>.
|
||||||
|
|
||||||
|
Tue Mar 9 23:25:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: check for working realloc (NULL,).
|
||||||
|
* gmem.c (g_realloc): use malloc() for initial allocation on systems
|
||||||
|
where realloc(NULL,) will not work (this is the case on SunOS, reported
|
||||||
|
by Tom Geiger).
|
||||||
|
|
||||||
|
Mon Mar 8 07:42:08 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* ghook.c (g_hook_unref): when !hook_list->is_setup, wrap the
|
||||||
|
flag around the call to g_hook_free() to avoid spurious
|
||||||
|
warnings (happens during destruction phase).
|
||||||
|
|
||||||
|
1999-03-03 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* glibconfig.h.win32, config.h.win32: Moved G_THREADS_IMPL_POSIX
|
||||||
|
from config.h.win32 to glibconfig.h.win32
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, config.h.win32: Added test for DCE
|
||||||
|
versions of mutex_trylock and cond_timedwait. The win32 versions
|
||||||
|
are posix, aren't they?
|
||||||
|
|
||||||
|
1999-03-02 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed a stupid cut'n'paste error of mine. Thanks to
|
||||||
|
Friedrich Dominicus <Friedrich.Dominicus@inka.de>
|
||||||
|
|
||||||
|
1999-03-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_any_init): Fixed yet another bloody
|
||||||
|
implementation of getpwuid_r on AIX. Thanks to Olaf Dietsche
|
||||||
|
<olaf.dietsche+list.gtk@netcologne.de>. I would like a configure
|
||||||
|
test better than that, but have no idea, how to do that easily.
|
||||||
|
|
||||||
|
Sun Feb 21 22:11:51 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.0
|
||||||
|
|
||||||
|
* AUTHORS: updated
|
||||||
|
|
||||||
|
Wed Feb 24 00:08:42 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* *.[ch]: inserted additional note to look for ChangeLog and
|
||||||
|
AUTHORS file for a log of modifications.
|
||||||
|
|
||||||
|
Sun Feb 21 14:01:00 1999 Dr Mike <drmike@redhat.com>
|
||||||
|
|
||||||
|
* Made specfile generated, tweaked slightly
|
||||||
|
|
||||||
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
* configure.in
|
* configure.in
|
||||||
|
@ -1,3 +1,32 @@
|
|||||||
|
Sat Jul 24 20:11:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36.
|
||||||
|
* incorporated proposed cleanups from gtk-devel-list.
|
||||||
|
|
||||||
|
* bumped version number to GLib-1.3.1
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gqueue.c:
|
||||||
|
* gstring.c:
|
||||||
|
* glist.c:
|
||||||
|
removed string tokenisation (we got g_strsplit() and g_strjoin()
|
||||||
|
already) and readline functions.
|
||||||
|
s/g_list_delete/g_list_delete_link.
|
||||||
|
implemented g_slist_delete_link.
|
||||||
|
removed notion of g_ATEXIT() macro in glib.h, this is an *internal*
|
||||||
|
macro, g_atexit() is provided for public consumption.
|
||||||
|
added GTrashStack inline utility functions.
|
||||||
|
reimplement double eneded queues.
|
||||||
|
removed GStack implementation, people can use a queue or a (singly)
|
||||||
|
linked list for this task.
|
||||||
|
deprecated g_strescape(), we need the SunOS variants here.
|
||||||
|
|
||||||
|
* gdate.c: added DEBUG_MSG() macro to wrap old messages.
|
||||||
|
|
||||||
|
* *.*: CVS merges.
|
||||||
|
|
||||||
|
* upgrade to libtool 1.3.3.
|
||||||
|
|
||||||
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
||||||
@ -159,6 +188,296 @@ Wed May 12 00:23:55 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
|||||||
Is there a cleaner way than explicitly writing rules that invoke
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
config.status?
|
config.status?
|
||||||
|
|
||||||
|
Fri Jul 16 22:18:36 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.3
|
||||||
|
|
||||||
|
1999-06-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gdate.c, gstrfuncs.c, gstring.c: Fixed the use of the
|
||||||
|
is..... and to..... macros, which take unsigned chars, not chars!
|
||||||
|
Thanks to Morten Welinder <terra@diku.dk> for pointing this out.
|
||||||
|
|
||||||
|
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gerror.c (g_on_error_query): check isatty() before querying so
|
||||||
|
we don't loop endlessly
|
||||||
|
|
||||||
|
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.2
|
||||||
|
|
||||||
|
1999-05-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmain.c: provide a poll prototype for SunOS, as they do not do
|
||||||
|
it self. Hint from Christian Parg <cparg@fs-design.de>.
|
||||||
|
|
||||||
|
Tue May 25 12:23:07 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strchug): Use g_memmove() not memmove().
|
||||||
|
(Reported by Charles Levert <charles@comm.polymtl.ca>)
|
||||||
|
|
||||||
|
Mon May 10 22:03:52 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.3
|
||||||
|
|
||||||
|
1999-05-08 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am tests/Makefile.am: Correct rules for making the
|
||||||
|
win32-related files that are made from corresponding .in files.
|
||||||
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
|
config.status?
|
||||||
|
|
||||||
|
Sat May 1 10:18:01 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3
|
||||||
|
|
||||||
|
1999-04-30 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am: Don't distribute glibconfig.h.win32.in, but
|
||||||
|
glibconfig.h.win32. Generate it when making a dist. Also generate
|
||||||
|
makefile.msc and config.h.win32 from corresponding .in files when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* configure.in: Also substitute @GLIB_INTERFACE_AGE@ and
|
||||||
|
@GLIB_BINARY_AGE@ (needed in config.h.win32).
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in: Use static mutex structure and initial
|
||||||
|
value corresponding to the 1999-04-07 snapshot of pthreads-win32.
|
||||||
|
|
||||||
|
* tests/Makefile.am: Distribute makefile.msc. Generate it when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* tests/makefile.msc.in: New file.
|
||||||
|
|
||||||
|
* tests/node-test.c: Include <stdlib.h> for exit().
|
||||||
|
|
||||||
|
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c: minor code cleanups.
|
||||||
|
|
||||||
|
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
|
||||||
|
the events field so we don't give IRIX fits.
|
||||||
|
|
||||||
|
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): behave conservative with
|
||||||
|
G_TOKEN_IDENTIFIER_NULL and always assume scanner->value.v_string
|
||||||
|
to be "null" in that case.
|
||||||
|
|
||||||
|
1999-04-20 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_vsnprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Mon Apr 19 13:42:21 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Added missing
|
||||||
|
#ifdef G_THREADS_ENABLED. (I never liked G_THREADS_ENABLED in
|
||||||
|
the first place!)
|
||||||
|
|
||||||
|
1999-04-18 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Fri Apr 16 06:52:07 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): feature G_TOKEN_EOF as a valid
|
||||||
|
expected token as well, so we get "- expected end of file" instead of
|
||||||
|
"- expected (unknown) token <0>".
|
||||||
|
|
||||||
|
Tue Apr 13 16:16:14 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.2
|
||||||
|
|
||||||
|
1999-04-12 Elliot Lee <sopwith@mh69.mh.cuc.edu>
|
||||||
|
|
||||||
|
* g_strchug(): s/strcpy/memmove/
|
||||||
|
|
||||||
|
1999-04-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Adjusted the test for an unimplemented
|
||||||
|
getpwuid_r. Info from Michael Pruett <mikep@ugcs.caltech.edu>.
|
||||||
|
|
||||||
|
Sun Apr 11 15:07:34 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: bumped versin number to GLib 1.2.2, interface 2,
|
||||||
|
binary 2.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
Sun Apr 11 14:37:06 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strcasecmp): always check for s1, s2 != NULL.
|
||||||
|
|
||||||
|
Sat Apr 10 19:30:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: removed braces around inline strings for the G_GNUC_FUNCTION
|
||||||
|
and G_GNUC_PRETTY_FUNCTION macros, so the macros can be used for compile
|
||||||
|
time string concatenation.
|
||||||
|
|
||||||
|
Thu Apr 8 19:53:19 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Check for two threads
|
||||||
|
calling g_main_iterate at once.
|
||||||
|
|
||||||
|
* gmain.c: If the set of poll file descriptors changes
|
||||||
|
during a call to poll(), abort that call, and start
|
||||||
|
a new poll. My test program still segfaults
|
||||||
|
obscurely on glibc 2.0 (in read()!!!), but now it works on
|
||||||
|
glibc 2.1, so I'll blame something else for the other segfault.
|
||||||
|
|
||||||
|
1999-03-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Fixed slight bug, that made configure hang on some
|
||||||
|
systems. Please do not merge this into 1.3 branch. It's taken care
|
||||||
|
of differently there. Info from J. Rhett Aultman
|
||||||
|
<cuplan@alley.gator.net>
|
||||||
|
|
||||||
|
Wed Mar 24 21:23:47 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.1
|
||||||
|
|
||||||
|
* README:
|
||||||
|
INSTALL:
|
||||||
|
NEWS:
|
||||||
|
sanity_check: updated
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in:
|
||||||
|
Makefile.am:
|
||||||
|
docs/glib-config.1.in:
|
||||||
|
docs/Makefile.am: Added files used to generate new files.
|
||||||
|
|
||||||
|
* glibconfig.h.win32:
|
||||||
|
docs/glib-config.1: Removed, now generated.
|
||||||
|
|
||||||
|
* configure.in: Added to output now-generated files.
|
||||||
|
|
||||||
|
Tue Mar 23 13:43:39 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* giounix.c: add user_data param to check and prepare functions
|
||||||
|
|
||||||
|
Mon Mar 22 03:54:43 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gmain.c: add user_data to the GSource ->check and ->prepare functions,
|
||||||
|
so it can be used to e.g. pass a GPollFd.
|
||||||
|
(g_main_poll): only add poll records with an events mask != 0 to the
|
||||||
|
fd_array. don't even bother calling poll_func() if fds=timeout=0.
|
||||||
|
added debugging printouts around poll_func() invokation that can be
|
||||||
|
enabled with #define G_MAIN_POLL_DEBUG.
|
||||||
|
|
||||||
|
Fri Mar 19 16:29:50 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.sub
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.2f
|
||||||
|
|
||||||
|
* autogen.sh: libtool is not required to autogen glib
|
||||||
|
|
||||||
|
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
|
||||||
|
needed)
|
||||||
|
|
||||||
|
1999-03-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed another stupid fault of mine: Did
|
||||||
|
s/g_static_/g_private_/g
|
||||||
|
|
||||||
|
Wed Mar 17 03:17:42 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in bumped versin number to GLib 1.2.1, interface 1,
|
||||||
|
binary 1.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
* glib.h: added GLIB_CHECK_VERSION() macro similar to
|
||||||
|
GTK_CHECK_VERSION().
|
||||||
|
|
||||||
|
Sun Mar 14 17:50:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gmem.c (g_mem_chunk_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
(g_mem_profile):
|
||||||
|
(g_mem_chunk_print):
|
||||||
|
(g_mem_chunk_info): removed some extraneous "\n"s at the end of the log
|
||||||
|
messages.
|
||||||
|
|
||||||
|
* gtimer.c (g_timer_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
* grel.c (g_*): changed a bunch of g_assert() statements to
|
||||||
|
g_return_if_fail() and added some extra ones to check relation != NULL.
|
||||||
|
|
||||||
|
1999-03-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Also accept _Pctime_r instead of ctime_r, while
|
||||||
|
seraching for the right `_REENTRANT' flag. This is for Digital
|
||||||
|
UNIX 4.0d. Thanks to Sascha Brawer <sb@adasys.ch>.
|
||||||
|
|
||||||
|
Tue Mar 9 23:25:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: check for working realloc (NULL,).
|
||||||
|
* gmem.c (g_realloc): use malloc() for initial allocation on systems
|
||||||
|
where realloc(NULL,) will not work (this is the case on SunOS, reported
|
||||||
|
by Tom Geiger).
|
||||||
|
|
||||||
|
Mon Mar 8 07:42:08 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* ghook.c (g_hook_unref): when !hook_list->is_setup, wrap the
|
||||||
|
flag around the call to g_hook_free() to avoid spurious
|
||||||
|
warnings (happens during destruction phase).
|
||||||
|
|
||||||
|
1999-03-03 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* glibconfig.h.win32, config.h.win32: Moved G_THREADS_IMPL_POSIX
|
||||||
|
from config.h.win32 to glibconfig.h.win32
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, config.h.win32: Added test for DCE
|
||||||
|
versions of mutex_trylock and cond_timedwait. The win32 versions
|
||||||
|
are posix, aren't they?
|
||||||
|
|
||||||
|
1999-03-02 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed a stupid cut'n'paste error of mine. Thanks to
|
||||||
|
Friedrich Dominicus <Friedrich.Dominicus@inka.de>
|
||||||
|
|
||||||
|
1999-03-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_any_init): Fixed yet another bloody
|
||||||
|
implementation of getpwuid_r on AIX. Thanks to Olaf Dietsche
|
||||||
|
<olaf.dietsche+list.gtk@netcologne.de>. I would like a configure
|
||||||
|
test better than that, but have no idea, how to do that easily.
|
||||||
|
|
||||||
|
Sun Feb 21 22:11:51 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.0
|
||||||
|
|
||||||
|
* AUTHORS: updated
|
||||||
|
|
||||||
|
Wed Feb 24 00:08:42 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* *.[ch]: inserted additional note to look for ChangeLog and
|
||||||
|
AUTHORS file for a log of modifications.
|
||||||
|
|
||||||
|
Sun Feb 21 14:01:00 1999 Dr Mike <drmike@redhat.com>
|
||||||
|
|
||||||
|
* Made specfile generated, tweaked slightly
|
||||||
|
|
||||||
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
* configure.in
|
* configure.in
|
||||||
|
@ -1,3 +1,32 @@
|
|||||||
|
Sat Jul 24 20:11:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36.
|
||||||
|
* incorporated proposed cleanups from gtk-devel-list.
|
||||||
|
|
||||||
|
* bumped version number to GLib-1.3.1
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gqueue.c:
|
||||||
|
* gstring.c:
|
||||||
|
* glist.c:
|
||||||
|
removed string tokenisation (we got g_strsplit() and g_strjoin()
|
||||||
|
already) and readline functions.
|
||||||
|
s/g_list_delete/g_list_delete_link.
|
||||||
|
implemented g_slist_delete_link.
|
||||||
|
removed notion of g_ATEXIT() macro in glib.h, this is an *internal*
|
||||||
|
macro, g_atexit() is provided for public consumption.
|
||||||
|
added GTrashStack inline utility functions.
|
||||||
|
reimplement double eneded queues.
|
||||||
|
removed GStack implementation, people can use a queue or a (singly)
|
||||||
|
linked list for this task.
|
||||||
|
deprecated g_strescape(), we need the SunOS variants here.
|
||||||
|
|
||||||
|
* gdate.c: added DEBUG_MSG() macro to wrap old messages.
|
||||||
|
|
||||||
|
* *.*: CVS merges.
|
||||||
|
|
||||||
|
* upgrade to libtool 1.3.3.
|
||||||
|
|
||||||
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
1999-07-21 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
Win32: With the latest gcc (2.95, pre-release), we can have binary
|
||||||
@ -159,6 +188,296 @@ Wed May 12 00:23:55 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
|||||||
Is there a cleaner way than explicitly writing rules that invoke
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
config.status?
|
config.status?
|
||||||
|
|
||||||
|
Fri Jul 16 22:18:36 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.3
|
||||||
|
|
||||||
|
1999-06-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gdate.c, gstrfuncs.c, gstring.c: Fixed the use of the
|
||||||
|
is..... and to..... macros, which take unsigned chars, not chars!
|
||||||
|
Thanks to Morten Welinder <terra@diku.dk> for pointing this out.
|
||||||
|
|
||||||
|
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gerror.c (g_on_error_query): check isatty() before querying so
|
||||||
|
we don't loop endlessly
|
||||||
|
|
||||||
|
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3.2
|
||||||
|
|
||||||
|
1999-05-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmain.c: provide a poll prototype for SunOS, as they do not do
|
||||||
|
it self. Hint from Christian Parg <cparg@fs-design.de>.
|
||||||
|
|
||||||
|
Tue May 25 12:23:07 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strchug): Use g_memmove() not memmove().
|
||||||
|
(Reported by Charles Levert <charles@comm.polymtl.ca>)
|
||||||
|
|
||||||
|
Mon May 10 22:03:52 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.3
|
||||||
|
|
||||||
|
1999-05-08 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am tests/Makefile.am: Correct rules for making the
|
||||||
|
win32-related files that are made from corresponding .in files.
|
||||||
|
Is there a cleaner way than explicitly writing rules that invoke
|
||||||
|
config.status?
|
||||||
|
|
||||||
|
Sat May 1 10:18:01 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.status
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.3
|
||||||
|
|
||||||
|
1999-04-30 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* Makefile.am: Don't distribute glibconfig.h.win32.in, but
|
||||||
|
glibconfig.h.win32. Generate it when making a dist. Also generate
|
||||||
|
makefile.msc and config.h.win32 from corresponding .in files when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* configure.in: Also substitute @GLIB_INTERFACE_AGE@ and
|
||||||
|
@GLIB_BINARY_AGE@ (needed in config.h.win32).
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in: Use static mutex structure and initial
|
||||||
|
value corresponding to the 1999-04-07 snapshot of pthreads-win32.
|
||||||
|
|
||||||
|
* tests/Makefile.am: Distribute makefile.msc. Generate it when
|
||||||
|
making dist.
|
||||||
|
|
||||||
|
* tests/makefile.msc.in: New file.
|
||||||
|
|
||||||
|
* tests/node-test.c: Include <stdlib.h> for exit().
|
||||||
|
|
||||||
|
Thu Apr 29 02:16:36 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c: minor code cleanups.
|
||||||
|
|
||||||
|
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
|
||||||
|
the events field so we don't give IRIX fits.
|
||||||
|
|
||||||
|
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): behave conservative with
|
||||||
|
G_TOKEN_IDENTIFIER_NULL and always assume scanner->value.v_string
|
||||||
|
to be "null" in that case.
|
||||||
|
|
||||||
|
1999-04-20 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_vsnprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Mon Apr 19 13:42:21 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Added missing
|
||||||
|
#ifdef G_THREADS_ENABLED. (I never liked G_THREADS_ENABLED in
|
||||||
|
the first place!)
|
||||||
|
|
||||||
|
1999-04-18 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gutils.c (g_snprintf): When using the vsnprintf()
|
||||||
|
implementation, '\0'-terminate the resulting string
|
||||||
|
and return its length rather than -1.
|
||||||
|
|
||||||
|
Fri Apr 16 06:52:07 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gscanner.c (g_scanner_unexp_token): feature G_TOKEN_EOF as a valid
|
||||||
|
expected token as well, so we get "- expected end of file" instead of
|
||||||
|
"- expected (unknown) token <0>".
|
||||||
|
|
||||||
|
Tue Apr 13 16:16:14 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.2
|
||||||
|
|
||||||
|
1999-04-12 Elliot Lee <sopwith@mh69.mh.cuc.edu>
|
||||||
|
|
||||||
|
* g_strchug(): s/strcpy/memmove/
|
||||||
|
|
||||||
|
1999-04-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Adjusted the test for an unimplemented
|
||||||
|
getpwuid_r. Info from Michael Pruett <mikep@ugcs.caltech.edu>.
|
||||||
|
|
||||||
|
Sun Apr 11 15:07:34 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: bumped versin number to GLib 1.2.2, interface 2,
|
||||||
|
binary 2.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
Sun Apr 11 14:37:06 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gstrfuncs.c (g_strcasecmp): always check for s1, s2 != NULL.
|
||||||
|
|
||||||
|
Sat Apr 10 19:30:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: removed braces around inline strings for the G_GNUC_FUNCTION
|
||||||
|
and G_GNUC_PRETTY_FUNCTION macros, so the macros can be used for compile
|
||||||
|
time string concatenation.
|
||||||
|
|
||||||
|
Thu Apr 8 19:53:19 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gmain.c (g_main_iterate): Check for two threads
|
||||||
|
calling g_main_iterate at once.
|
||||||
|
|
||||||
|
* gmain.c: If the set of poll file descriptors changes
|
||||||
|
during a call to poll(), abort that call, and start
|
||||||
|
a new poll. My test program still segfaults
|
||||||
|
obscurely on glibc 2.0 (in read()!!!), but now it works on
|
||||||
|
glibc 2.1, so I'll blame something else for the other segfault.
|
||||||
|
|
||||||
|
1999-03-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Fixed slight bug, that made configure hang on some
|
||||||
|
systems. Please do not merge this into 1.3 branch. It's taken care
|
||||||
|
of differently there. Info from J. Rhett Aultman
|
||||||
|
<cuplan@alley.gator.net>
|
||||||
|
|
||||||
|
Wed Mar 24 21:23:47 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.1
|
||||||
|
|
||||||
|
* README:
|
||||||
|
INSTALL:
|
||||||
|
NEWS:
|
||||||
|
sanity_check: updated
|
||||||
|
|
||||||
|
* glibconfig.h.win32.in:
|
||||||
|
Makefile.am:
|
||||||
|
docs/glib-config.1.in:
|
||||||
|
docs/Makefile.am: Added files used to generate new files.
|
||||||
|
|
||||||
|
* glibconfig.h.win32:
|
||||||
|
docs/glib-config.1: Removed, now generated.
|
||||||
|
|
||||||
|
* configure.in: Added to output now-generated files.
|
||||||
|
|
||||||
|
Tue Mar 23 13:43:39 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* giounix.c: add user_data param to check and prepare functions
|
||||||
|
|
||||||
|
Mon Mar 22 03:54:43 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h:
|
||||||
|
* gmain.c: add user_data to the GSource ->check and ->prepare functions,
|
||||||
|
so it can be used to e.g. pass a GPollFd.
|
||||||
|
(g_main_poll): only add poll records with an events mask != 0 to the
|
||||||
|
fd_array. don't even bother calling poll_func() if fds=timeout=0.
|
||||||
|
added debugging printouts around poll_func() invokation that can be
|
||||||
|
enabled with #define G_MAIN_POLL_DEBUG.
|
||||||
|
|
||||||
|
Fri Mar 19 16:29:50 PST 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* acinclude.m4
|
||||||
|
* config.guess
|
||||||
|
* config.sub
|
||||||
|
* ltconfig
|
||||||
|
* ltmain.sh: upgrade to libtool 1.2f
|
||||||
|
|
||||||
|
* autogen.sh: libtool is not required to autogen glib
|
||||||
|
|
||||||
|
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
|
||||||
|
needed)
|
||||||
|
|
||||||
|
1999-03-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed another stupid fault of mine: Did
|
||||||
|
s/g_static_/g_private_/g
|
||||||
|
|
||||||
|
Wed Mar 17 03:17:42 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in bumped versin number to GLib 1.2.1, interface 1,
|
||||||
|
binary 1.
|
||||||
|
|
||||||
|
* NEWS: updates.
|
||||||
|
|
||||||
|
* glib.h: added GLIB_CHECK_VERSION() macro similar to
|
||||||
|
GTK_CHECK_VERSION().
|
||||||
|
|
||||||
|
Sun Mar 14 17:50:35 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gmem.c (g_mem_chunk_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
(g_mem_profile):
|
||||||
|
(g_mem_chunk_print):
|
||||||
|
(g_mem_chunk_info): removed some extraneous "\n"s at the end of the log
|
||||||
|
messages.
|
||||||
|
|
||||||
|
* gtimer.c (g_timer_*): changed a bunch of g_assert() statements
|
||||||
|
to g_return_if_fail().
|
||||||
|
* grel.c (g_*): changed a bunch of g_assert() statements to
|
||||||
|
g_return_if_fail() and added some extra ones to check relation != NULL.
|
||||||
|
|
||||||
|
1999-03-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* configure.in: Also accept _Pctime_r instead of ctime_r, while
|
||||||
|
seraching for the right `_REENTRANT' flag. This is for Digital
|
||||||
|
UNIX 4.0d. Thanks to Sascha Brawer <sb@adasys.ch>.
|
||||||
|
|
||||||
|
Tue Mar 9 23:25:50 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* configure.in: check for working realloc (NULL,).
|
||||||
|
* gmem.c (g_realloc): use malloc() for initial allocation on systems
|
||||||
|
where realloc(NULL,) will not work (this is the case on SunOS, reported
|
||||||
|
by Tom Geiger).
|
||||||
|
|
||||||
|
Mon Mar 8 07:42:08 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* ghook.c (g_hook_unref): when !hook_list->is_setup, wrap the
|
||||||
|
flag around the call to g_hook_free() to avoid spurious
|
||||||
|
warnings (happens during destruction phase).
|
||||||
|
|
||||||
|
1999-03-03 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* glibconfig.h.win32, config.h.win32: Moved G_THREADS_IMPL_POSIX
|
||||||
|
from config.h.win32 to glibconfig.h.win32
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, config.h.win32: Added test for DCE
|
||||||
|
versions of mutex_trylock and cond_timedwait. The win32 versions
|
||||||
|
are posix, aren't they?
|
||||||
|
|
||||||
|
1999-03-02 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gmem.c: Fixed a stupid cut'n'paste error of mine. Thanks to
|
||||||
|
Friedrich Dominicus <Friedrich.Dominicus@inka.de>
|
||||||
|
|
||||||
|
1999-03-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_any_init): Fixed yet another bloody
|
||||||
|
implementation of getpwuid_r on AIX. Thanks to Olaf Dietsche
|
||||||
|
<olaf.dietsche+list.gtk@netcologne.de>. I would like a configure
|
||||||
|
test better than that, but have no idea, how to do that easily.
|
||||||
|
|
||||||
|
Sun Feb 21 22:11:51 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* Released GLib 1.2.0
|
||||||
|
|
||||||
|
* AUTHORS: updated
|
||||||
|
|
||||||
|
Wed Feb 24 00:08:42 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
|
* *.[ch]: inserted additional note to look for ChangeLog and
|
||||||
|
AUTHORS file for a log of modifications.
|
||||||
|
|
||||||
|
Sun Feb 21 14:01:00 1999 Dr Mike <drmike@redhat.com>
|
||||||
|
|
||||||
|
* Made specfile generated, tweaked slightly
|
||||||
|
|
||||||
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
Sat May 8 06:00:17 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||||
|
|
||||||
* configure.in
|
* configure.in
|
||||||
|
4
INSTALL
4
INSTALL
@ -1,8 +1,8 @@
|
|||||||
Simple install procedure
|
Simple install procedure
|
||||||
========================
|
========================
|
||||||
|
|
||||||
% gzip -cd glib-1.3.0.tar.gz | tar xvf - # unpack the sources
|
% gzip -cd glib-1.3.1.tar.gz | tar xvf - # unpack the sources
|
||||||
% cd glib-1.3.0 # change to the toplevel directory
|
% cd glib-1.3.1 # change to the toplevel directory
|
||||||
% ./configure # run the `configure' script
|
% ./configure # run the `configure' script
|
||||||
% make # build GLIB
|
% make # build GLIB
|
||||||
[ Become root if necessary ]
|
[ Become root if necessary ]
|
||||||
|
1
MAINTAINERS
Normal file
1
MAINTAINERS
Normal file
@ -0,0 +1 @@
|
|||||||
|
Email: gtk-bugs@gimp.org
|
@ -48,7 +48,6 @@ libglib_la_SOURCES = \
|
|||||||
grand.c \
|
grand.c \
|
||||||
gscanner.c \
|
gscanner.c \
|
||||||
gslist.c \
|
gslist.c \
|
||||||
gstack.c \
|
|
||||||
gstrfuncs.c \
|
gstrfuncs.c \
|
||||||
gstring.c \
|
gstring.c \
|
||||||
gthread.c \
|
gthread.c \
|
||||||
|
25
NEWS
25
NEWS
@ -1,6 +1,23 @@
|
|||||||
What's new in GLib 1.3.0:
|
What's new in GLib 1.3.1:
|
||||||
|
|
||||||
* Look at ChangeLog.
|
* Multiple fixes from the 1.2.x branch.
|
||||||
|
* Upgrade to libtool 1.3.3
|
||||||
|
* Full thread support (thread creation and destruction).
|
||||||
|
* BeOS port, BeOS dynamic modules.
|
||||||
|
* Many improvements to the Windows ports.
|
||||||
|
* Improvements to the OS/2 port, OS/2 module support.
|
||||||
|
* Double ended queue implementation.
|
||||||
|
* GLib macros for printf() formatting, e.g. G_GULONG_FORMAT = "lu"
|
||||||
|
* New thread-safe random number generator Mersenne Twister.
|
||||||
|
|
||||||
|
|
||||||
|
Overview of Changes in GLib 1.2.1:
|
||||||
|
|
||||||
|
* g_realloc() fix for SunOS (please report further problems).
|
||||||
|
* Continued the never ending fix vendetta regarding getpwuid(),
|
||||||
|
this time AIX has been the culprit.
|
||||||
|
* Upgrade to libtool 1.2f
|
||||||
|
* Miscellaneous other buglets fixed.
|
||||||
|
|
||||||
What's new in GLib 1.2.0 (since GLib 1.0.x):
|
What's new in GLib 1.2.0 (since GLib 1.0.x):
|
||||||
|
|
||||||
@ -14,7 +31,7 @@ What's new in GLib 1.2.0 (since GLib 1.0.x):
|
|||||||
* GRelations for n-way mapping of certain data
|
* GRelations for n-way mapping of certain data
|
||||||
* An n-way tree implementation
|
* An n-way tree implementation
|
||||||
* GDate functionality for calendar date manipulations
|
* GDate functionality for calendar date manipulations
|
||||||
* GAllocator type and assocated functions
|
* GAllocator type and associated functions
|
||||||
* Added generic callback maintenance functions (ghook)
|
* Added generic callback maintenance functions (ghook)
|
||||||
* Generic functions for TAB completions
|
* Generic functions for TAB completions
|
||||||
* Endian defines (G_*_ENDIAN)
|
* Endian defines (G_*_ENDIAN)
|
||||||
@ -93,7 +110,7 @@ Overview of Changes in GLib 1.1.7:
|
|||||||
Overview of Changes in GLib 1.1.6:
|
Overview of Changes in GLib 1.1.6:
|
||||||
|
|
||||||
* New GDate functionality for calendar date manipulations (g_date_*)
|
* New GDate functionality for calendar date manipulations (g_date_*)
|
||||||
* New GAllocator type and assocated functions
|
* New GAllocator type and associated functions
|
||||||
* New functions g_slist_copy and g_list_copy to duplicate a list with all
|
* New functions g_slist_copy and g_list_copy to duplicate a list with all
|
||||||
its data pointers.
|
its data pointers.
|
||||||
* New function g_array_insert_vals and new macro g_array_insert_val to
|
* New function g_array_insert_vals and new macro g_array_insert_val to
|
||||||
|
2
README
2
README
@ -24,7 +24,7 @@ do development with GLib 1.2 any longer.
|
|||||||
General Information
|
General Information
|
||||||
===================
|
===================
|
||||||
|
|
||||||
This is GLib version 1.3.0. GLib is a library which includes support
|
This is GLib version 1.3.1. GLib is a library which includes support
|
||||||
routines for C such as lists, trees, hashes, memory allocation, and
|
routines for C such as lists, trees, hashes, memory allocation, and
|
||||||
many other things.
|
many other things.
|
||||||
|
|
||||||
|
11
configure.in
11
configure.in
@ -15,12 +15,12 @@ cflags_set=${CFLAGS+set}
|
|||||||
# we rewrite this file
|
# we rewrite this file
|
||||||
rm -f glibconfig-sysdefs.h
|
rm -f glibconfig-sysdefs.h
|
||||||
|
|
||||||
dnl we to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
|
dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
|
||||||
dnl are available for $ac_help expansion (don't we all *love* autoconf?)
|
dnl are available for $ac_help expansion (don't we all *love* autoconf?)
|
||||||
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
||||||
#
|
#
|
||||||
# The following version number definitions apply to GLib and GModule
|
# The following version number definitions apply to GLib, GModule and GThread
|
||||||
# as a whole, so if changes occoured in either of them, they are both
|
# as a whole, so if changes occoured in any of them, they are all
|
||||||
# treated with the same interface and binary age.
|
# treated with the same interface and binary age.
|
||||||
#
|
#
|
||||||
# Making releases:
|
# Making releases:
|
||||||
@ -29,11 +29,11 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
|||||||
# GLIB_BINARY_AGE += 1;
|
# GLIB_BINARY_AGE += 1;
|
||||||
# if any functions have been added, set GLIB_INTERFACE_AGE to 0.
|
# if any functions have been added, set GLIB_INTERFACE_AGE to 0.
|
||||||
# if backwards compatibility has been broken,
|
# if backwards compatibility has been broken,
|
||||||
# set GLIB_BINARY_AGE and GLIB_INTERFACE_AGE to 0.
|
# set GLIB_BINARY_AGE _and_ GLIB_INTERFACE_AGE to 0.
|
||||||
#
|
#
|
||||||
GLIB_MAJOR_VERSION=1
|
GLIB_MAJOR_VERSION=1
|
||||||
GLIB_MINOR_VERSION=3
|
GLIB_MINOR_VERSION=3
|
||||||
GLIB_MICRO_VERSION=0
|
GLIB_MICRO_VERSION=1
|
||||||
GLIB_INTERFACE_AGE=0
|
GLIB_INTERFACE_AGE=0
|
||||||
GLIB_BINARY_AGE=0
|
GLIB_BINARY_AGE=0
|
||||||
GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION
|
GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION
|
||||||
@ -42,6 +42,7 @@ AC_DIVERT_POP()dnl
|
|||||||
|
|
||||||
AC_SUBST(GLIB_MAJOR_VERSION)
|
AC_SUBST(GLIB_MAJOR_VERSION)
|
||||||
AC_SUBST(GLIB_MINOR_VERSION)
|
AC_SUBST(GLIB_MINOR_VERSION)
|
||||||
|
AC_SUBST(GLIB_MICRO_VERSION)
|
||||||
AC_SUBST(GLIB_VERSION)
|
AC_SUBST(GLIB_VERSION)
|
||||||
AC_SUBST(GLIB_INTERFACE_AGE)
|
AC_SUBST(GLIB_INTERFACE_AGE)
|
||||||
AC_SUBST(GLIB_BINARY_AGE)
|
AC_SUBST(GLIB_BINARY_AGE)
|
||||||
|
@ -16,3 +16,4 @@ Makefile.in
|
|||||||
*.cps
|
*.cps
|
||||||
*.fns
|
*.fns
|
||||||
*.vrs
|
*.vrs
|
||||||
|
glib-config.1
|
||||||
|
@ -4,7 +4,7 @@ info_TEXINFOS = glib.texi
|
|||||||
|
|
||||||
man_MANS = glib-config.1
|
man_MANS = glib-config.1
|
||||||
|
|
||||||
EXTRA_DIST = glib-config.1 \
|
EXTRA_DIST = glib-config.1.in \
|
||||||
glib.html \
|
glib.html \
|
||||||
glib_toc.html
|
glib_toc.html
|
||||||
|
|
||||||
|
53
docs/glib-config.1.in
Normal file
53
docs/glib-config.1.in
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
.TH GLIB 1 "16 December 1998" Version @VERSION@
|
||||||
|
.SH NAME
|
||||||
|
glib-config - script to get information about the installed version of GLib
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B glib-config [\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] [\-\-version] [\-\-libs] [\-\-cflags] [LIBRARIES]
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.PP
|
||||||
|
\fIglib-config\fP is a tool that is used to configure to determine
|
||||||
|
the compiler and linker flags that should be used to compile
|
||||||
|
and link programs that use \fIGLib\fP. It is also used internally
|
||||||
|
to the .m4 macros for GNU autoconf that are included with \fIGLib\fP.
|
||||||
|
.
|
||||||
|
.SH OPTIONS
|
||||||
|
.l
|
||||||
|
\fIglib-config\fP accepts the following options:
|
||||||
|
.TP 8
|
||||||
|
.B LIBRARIES
|
||||||
|
\fIGLib\fP has three libraries 'glib', 'gmodule' and 'gthread'. If you specify one of
|
||||||
|
them, only the appropriate things for that library will be printed.
|
||||||
|
.TP 8
|
||||||
|
.B \-\-version
|
||||||
|
Print the currently installed version of \fIGLib\fP on the standard output.
|
||||||
|
.TP 8
|
||||||
|
.B \-\-libs
|
||||||
|
Print the linker flags that are necessary to link a \fIGLib\fP program.
|
||||||
|
.TP 8
|
||||||
|
.B \-\-cflags
|
||||||
|
Print the compiler flags that are necessary to compile a \fIGLib\fP program.
|
||||||
|
.TP 8
|
||||||
|
.B \-\-prefix=PREFIX
|
||||||
|
If specified, use PREFIX instead of the installation prefix that \fIGLib\fP
|
||||||
|
was built with when computing the output for the \-\-cflags and
|
||||||
|
\-\-libs options. This option is also used for the exec prefix
|
||||||
|
if \-\-exec\-prefix was not specified. This option must be specified
|
||||||
|
before any \-\-libs or \-\-cflags options.
|
||||||
|
.TP 8
|
||||||
|
.B \-\-exec\-prefix=PREFIX
|
||||||
|
If specified, use PREFIX instead of the installation exec prefix that
|
||||||
|
\fIGLib\fP was built with when computing the output for the \-\-cflags
|
||||||
|
and \-\-libs options. This option must be specified before any
|
||||||
|
\-\-libs or \-\-cflags options.
|
||||||
|
.SH SEE ALSO
|
||||||
|
.BR gtk-config (1),
|
||||||
|
.BR gimp (1),
|
||||||
|
.BR gimptool (1)
|
||||||
|
.SH COPYRIGHT
|
||||||
|
Copyright \(co 1998 Owen Taylor
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and distribute this software and its
|
||||||
|
documentation for any purpose and without fee is hereby granted,
|
||||||
|
provided that the above copyright notice appear in all copies and that
|
||||||
|
both that copyright notice and this permission notice appear in
|
||||||
|
supporting documentation.
|
@ -111,7 +111,14 @@ g_on_error_query (const gchar *prg_name)
|
|||||||
query3);
|
query3);
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
|
|
||||||
|
#ifndef NATIVE_WIN32
|
||||||
|
if (isatty(0) && isatty(1))
|
||||||
fgets (buf, 8, stdin);
|
fgets (buf, 8, stdin);
|
||||||
|
else
|
||||||
|
strcpy (buf, "E\n");
|
||||||
|
#else
|
||||||
|
fgets (buf, 8, stdin);
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((buf[0] == 'E' || buf[0] == 'e')
|
if ((buf[0] == 'E' || buf[0] == 'e')
|
||||||
&& buf[1] == '\n')
|
&& buf[1] == '\n')
|
||||||
|
37
gdate.c
37
gdate.c
@ -28,6 +28,11 @@
|
|||||||
* MT safe
|
* MT safe
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define DEBUG_MSG(x) /* */
|
||||||
|
#ifdef G_ENABLE_DEBUG
|
||||||
|
/* #define DEBUG_MSG(args) g_message args ; */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
@ -453,7 +458,7 @@ g_date_fill_parse_tokens (const gchar *str, GDateParseTokens *pt)
|
|||||||
{
|
{
|
||||||
gchar num[4][NUM_LEN+1];
|
gchar num[4][NUM_LEN+1];
|
||||||
gint i;
|
gint i;
|
||||||
const gchar *s;
|
const guchar *s;
|
||||||
|
|
||||||
/* We count 4, but store 3; so we can give an error
|
/* We count 4, but store 3; so we can give an error
|
||||||
* if there are 4.
|
* if there are 4.
|
||||||
@ -609,23 +614,15 @@ g_date_prepare_to_parse (const gchar *str, GDateParseTokens *pt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef G_ENABLE_DEBUG
|
#ifdef G_ENABLE_DEBUG
|
||||||
# if 0
|
DEBUG_MSG (("**GDate prepared a new set of locale-specific parse rules."));
|
||||||
g_message ("**GDate prepared a new set of locale-specific parse rules.");
|
|
||||||
# endif
|
|
||||||
i = 1;
|
i = 1;
|
||||||
while (i < 13)
|
while (i < 13)
|
||||||
{
|
{
|
||||||
# if 0
|
DEBUG_MSG ((" %s %s", long_month_names[i], short_month_names[i]));
|
||||||
g_message (" %s %s", long_month_names[i], short_month_names[i]);
|
|
||||||
# endif
|
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
if (using_twodigit_years)
|
if (using_twodigit_years)
|
||||||
{
|
DEBUG_MSG (("**Using twodigit years with cutoff year: %u", twodigit_start_year));
|
||||||
# if 0
|
|
||||||
g_message ("**Using twodigit years with cutoff year: %u", twodigit_start_year);
|
|
||||||
# endif
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
gchar *strings[3];
|
gchar *strings[3];
|
||||||
i = 0;
|
i = 0;
|
||||||
@ -648,10 +645,8 @@ g_date_prepare_to_parse (const gchar *str, GDateParseTokens *pt)
|
|||||||
}
|
}
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
# if 0
|
DEBUG_MSG (("**Order: %s, %s, %s", strings[0], strings[1], strings[2]));
|
||||||
g_message ("**Order: %s, %s, %s", strings[0], strings[1], strings[2]);
|
DEBUG_MSG (("**Sample date in this locale: `%s'", buf));
|
||||||
g_message ("**Sample date in this locale: `%s'", buf);
|
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -675,12 +670,8 @@ g_date_set_parse (GDate *d,
|
|||||||
|
|
||||||
g_date_prepare_to_parse (str, &pt);
|
g_date_prepare_to_parse (str, &pt);
|
||||||
|
|
||||||
#ifdef G_ENABLE_DEBUG
|
DEBUG_MSG (("Found %d ints, `%d' `%d' `%d' and written out month %d",
|
||||||
# if 0
|
pt.num_ints, pt.n[0], pt.n[1], pt.n[2], pt.month));
|
||||||
g_message ("Found %d ints, `%d' `%d' `%d' and written out month %d",
|
|
||||||
pt.num_ints, pt.n[0], pt.n[1], pt.n[2], pt.month);
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
if (pt.num_ints == 4)
|
if (pt.num_ints == 4)
|
||||||
@ -801,7 +792,7 @@ g_date_set_parse (GDate *d,
|
|||||||
}
|
}
|
||||||
#ifdef G_ENABLE_DEBUG
|
#ifdef G_ENABLE_DEBUG
|
||||||
else
|
else
|
||||||
g_message ("Rejected DMY %u %u %u", day, m, y);
|
DEBUG_MSG (("Rejected DMY %u %u %u", day, m, y));
|
||||||
#endif
|
#endif
|
||||||
G_UNLOCK (g_date_global);
|
G_UNLOCK (g_date_global);
|
||||||
}
|
}
|
||||||
|
7
gerror.c
7
gerror.c
@ -111,7 +111,14 @@ g_on_error_query (const gchar *prg_name)
|
|||||||
query3);
|
query3);
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
|
|
||||||
|
#ifndef NATIVE_WIN32
|
||||||
|
if (isatty(0) && isatty(1))
|
||||||
fgets (buf, 8, stdin);
|
fgets (buf, 8, stdin);
|
||||||
|
else
|
||||||
|
strcpy (buf, "E\n");
|
||||||
|
#else
|
||||||
|
fgets (buf, 8, stdin);
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((buf[0] == 'E' || buf[0] == 'e')
|
if ((buf[0] == 'E' || buf[0] == 'e')
|
||||||
&& buf[1] == '\n')
|
&& buf[1] == '\n')
|
||||||
|
12
giounix.c
12
giounix.c
@ -78,9 +78,11 @@ static guint g_io_unix_add_watch (GIOChannel *channel,
|
|||||||
GDestroyNotify notify);
|
GDestroyNotify notify);
|
||||||
static gboolean g_io_unix_prepare (gpointer source_data,
|
static gboolean g_io_unix_prepare (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout);
|
gint *timeout,
|
||||||
|
gpointer user_data);
|
||||||
static gboolean g_io_unix_check (gpointer source_data,
|
static gboolean g_io_unix_check (gpointer source_data,
|
||||||
GTimeVal *current_time);
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data);
|
||||||
static gboolean g_io_unix_dispatch (gpointer source_data,
|
static gboolean g_io_unix_dispatch (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
@ -105,7 +107,8 @@ GIOFuncs unix_channel_funcs = {
|
|||||||
static gboolean
|
static gboolean
|
||||||
g_io_unix_prepare (gpointer source_data,
|
g_io_unix_prepare (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout)
|
gint *timeout,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
*timeout = -1;
|
*timeout = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -113,7 +116,8 @@ g_io_unix_prepare (gpointer source_data,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
g_io_unix_check (gpointer source_data,
|
g_io_unix_check (gpointer source_data,
|
||||||
GTimeVal *current_time)
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GIOUnixWatch *data = source_data;
|
GIOUnixWatch *data = source_data;
|
||||||
|
|
||||||
|
11
glib.def
11
glib.def
@ -158,7 +158,6 @@ EXPORTS
|
|||||||
g_list_append
|
g_list_append
|
||||||
g_list_concat
|
g_list_concat
|
||||||
g_list_copy
|
g_list_copy
|
||||||
g_list_delete
|
|
||||||
g_list_find
|
g_list_find
|
||||||
g_list_find_custom
|
g_list_find_custom
|
||||||
g_list_first
|
g_list_first
|
||||||
@ -256,13 +255,6 @@ EXPORTS
|
|||||||
g_quark_from_string
|
g_quark_from_string
|
||||||
g_quark_to_string
|
g_quark_to_string
|
||||||
g_quark_try_string
|
g_quark_try_string
|
||||||
g_queue_free
|
|
||||||
g_queue_get_size
|
|
||||||
g_queue_new
|
|
||||||
g_queue_pop_back
|
|
||||||
g_queue_pop_front
|
|
||||||
g_queue_push_back
|
|
||||||
g_queue_push_front
|
|
||||||
g_rand_double
|
g_rand_double
|
||||||
g_rand_double_range
|
g_rand_double_range
|
||||||
g_rand_free
|
g_rand_free
|
||||||
@ -344,9 +336,6 @@ EXPORTS
|
|||||||
g_source_remove
|
g_source_remove
|
||||||
g_source_remove_by_source_data
|
g_source_remove_by_source_data
|
||||||
g_source_remove_by_user_data
|
g_source_remove_by_user_data
|
||||||
g_stack_free
|
|
||||||
g_stack_new
|
|
||||||
g_stack_pop
|
|
||||||
g_static_mutex_get_mutex_impl
|
g_static_mutex_get_mutex_impl
|
||||||
g_static_private_get
|
g_static_private_get
|
||||||
g_static_private_set
|
g_static_private_set
|
||||||
|
299
glib.h
299
glib.h
@ -49,16 +49,12 @@
|
|||||||
* And it provides a way to store and retrieve a `gint' in/from a `gpointer'.
|
* And it provides a way to store and retrieve a `gint' in/from a `gpointer'.
|
||||||
* This is useful to pass an integer instead of a pointer to a callback.
|
* This is useful to pass an integer instead of a pointer to a callback.
|
||||||
*
|
*
|
||||||
* GINT_TO_POINTER(i), GUINT_TO_POINTER(i)
|
* GINT_TO_POINTER (i), GUINT_TO_POINTER (i)
|
||||||
* GPOINTER_TO_INT(p), GPOINTER_TO_UINT(p)
|
* GPOINTER_TO_INT (p), GPOINTER_TO_UINT (p)
|
||||||
*
|
*
|
||||||
* Finally, it provide the following wrappers to STDC functions:
|
* Finally, it provides the following wrappers to STDC functions:
|
||||||
*
|
*
|
||||||
* g_ATEXIT
|
* void g_memmove (gpointer dest, gconstpointer void *src, gulong count);
|
||||||
* To register hooks which are executed on exit().
|
|
||||||
* Usually a wrapper for STDC atexit.
|
|
||||||
*
|
|
||||||
* void g_memmove(gpointer dest, gconstpointer void *src, gulong count);
|
|
||||||
* A wrapper for STDC memmove, or an implementation, if memmove doesn't
|
* A wrapper for STDC memmove, or an implementation, if memmove doesn't
|
||||||
* exist. The prototype looks like the above, give or take a const,
|
* exist. The prototype looks like the above, give or take a const,
|
||||||
* or size_t.
|
* or size_t.
|
||||||
@ -262,11 +258,11 @@ extern "C" {
|
|||||||
* macros, so we can refer to them as strings unconditionally.
|
* macros, so we can refer to them as strings unconditionally.
|
||||||
*/
|
*/
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define G_GNUC_FUNCTION (__FUNCTION__)
|
#define G_GNUC_FUNCTION __FUNCTION__
|
||||||
#define G_GNUC_PRETTY_FUNCTION (__PRETTY_FUNCTION__)
|
#define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__
|
||||||
#else /* !__GNUC__ */
|
#else /* !__GNUC__ */
|
||||||
#define G_GNUC_FUNCTION ("")
|
#define G_GNUC_FUNCTION ""
|
||||||
#define G_GNUC_PRETTY_FUNCTION ("")
|
#define G_GNUC_PRETTY_FUNCTION ""
|
||||||
#endif /* !__GNUC__ */
|
#endif /* !__GNUC__ */
|
||||||
|
|
||||||
/* we try to provide a usefull equivalent for ATEXIT if it is
|
/* we try to provide a usefull equivalent for ATEXIT if it is
|
||||||
@ -703,15 +699,16 @@ typedef struct _GRelation GRelation;
|
|||||||
typedef struct _GScanner GScanner;
|
typedef struct _GScanner GScanner;
|
||||||
typedef struct _GScannerConfig GScannerConfig;
|
typedef struct _GScannerConfig GScannerConfig;
|
||||||
typedef struct _GSList GSList;
|
typedef struct _GSList GSList;
|
||||||
typedef struct _GStack GStack;
|
|
||||||
typedef struct _GString GString;
|
typedef struct _GString GString;
|
||||||
typedef struct _GStringChunk GStringChunk;
|
typedef struct _GStringChunk GStringChunk;
|
||||||
typedef struct _GTimer GTimer;
|
typedef struct _GTimer GTimer;
|
||||||
|
typedef struct _GTrashStack GTrashStack;
|
||||||
typedef struct _GTree GTree;
|
typedef struct _GTree GTree;
|
||||||
typedef struct _GTuples GTuples;
|
typedef struct _GTuples GTuples;
|
||||||
typedef union _GTokenValue GTokenValue;
|
typedef union _GTokenValue GTokenValue;
|
||||||
typedef struct _GIOChannel GIOChannel;
|
typedef struct _GIOChannel GIOChannel;
|
||||||
|
|
||||||
|
/* Tree traverse flags */
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
G_TRAVERSE_LEAFS = 1 << 0,
|
G_TRAVERSE_LEAFS = 1 << 0,
|
||||||
@ -720,6 +717,7 @@ typedef enum
|
|||||||
G_TRAVERSE_MASK = 0x03
|
G_TRAVERSE_MASK = 0x03
|
||||||
} GTraverseFlags;
|
} GTraverseFlags;
|
||||||
|
|
||||||
|
/* Tree traverse orders */
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
G_IN_ORDER,
|
G_IN_ORDER,
|
||||||
@ -807,37 +805,6 @@ typedef gint (*GTraverseFunc) (gpointer key,
|
|||||||
typedef void (*GVoidFunc) (void);
|
typedef void (*GVoidFunc) (void);
|
||||||
|
|
||||||
|
|
||||||
struct _GList
|
|
||||||
{
|
|
||||||
gpointer data;
|
|
||||||
GList *next;
|
|
||||||
GList *prev;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GSList
|
|
||||||
{
|
|
||||||
gpointer data;
|
|
||||||
GSList *next;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GStack
|
|
||||||
{
|
|
||||||
GList *list;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GQueue
|
|
||||||
{
|
|
||||||
GList *list;
|
|
||||||
GList *list_end;
|
|
||||||
guint list_size;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GString
|
|
||||||
{
|
|
||||||
gchar *str;
|
|
||||||
gint len;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GArray
|
struct _GArray
|
||||||
{
|
{
|
||||||
gchar *data;
|
gchar *data;
|
||||||
@ -850,23 +817,54 @@ struct _GByteArray
|
|||||||
guint len;
|
guint len;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _GDebugKey
|
||||||
|
{
|
||||||
|
gchar *key;
|
||||||
|
guint value;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _GList
|
||||||
|
{
|
||||||
|
gpointer data;
|
||||||
|
GList *next;
|
||||||
|
GList *prev;
|
||||||
|
};
|
||||||
|
|
||||||
struct _GPtrArray
|
struct _GPtrArray
|
||||||
{
|
{
|
||||||
gpointer *pdata;
|
gpointer *pdata;
|
||||||
guint len;
|
guint len;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _GQueue
|
||||||
|
{
|
||||||
|
GList *head;
|
||||||
|
GList *tail;
|
||||||
|
guint length;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _GSList
|
||||||
|
{
|
||||||
|
gpointer data;
|
||||||
|
GSList *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _GString
|
||||||
|
{
|
||||||
|
gchar *str;
|
||||||
|
gint len;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _GTrashStack
|
||||||
|
{
|
||||||
|
GTrashStack *next;
|
||||||
|
};
|
||||||
|
|
||||||
struct _GTuples
|
struct _GTuples
|
||||||
{
|
{
|
||||||
guint len;
|
guint len;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GDebugKey
|
|
||||||
{
|
|
||||||
gchar *key;
|
|
||||||
guint value;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* Doubly linked lists
|
/* Doubly linked lists
|
||||||
*/
|
*/
|
||||||
@ -887,12 +885,12 @@ GList* g_list_insert_sorted (GList *list,
|
|||||||
GCompareFunc func);
|
GCompareFunc func);
|
||||||
GList* g_list_concat (GList *list1,
|
GList* g_list_concat (GList *list1,
|
||||||
GList *list2);
|
GList *list2);
|
||||||
GList* g_list_delete (GList *list,
|
|
||||||
GList *link);
|
|
||||||
GList* g_list_remove (GList *list,
|
GList* g_list_remove (GList *list,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
GList* g_list_remove_link (GList *list,
|
GList* g_list_remove_link (GList *list,
|
||||||
GList *llink);
|
GList *llink);
|
||||||
|
GList* g_list_delete_link (GList *list,
|
||||||
|
GList *link);
|
||||||
GList* g_list_reverse (GList *list);
|
GList* g_list_reverse (GList *list);
|
||||||
GList* g_list_copy (GList *list);
|
GList* g_list_copy (GList *list);
|
||||||
GList* g_list_nth (GList *list,
|
GList* g_list_nth (GList *list,
|
||||||
@ -942,7 +940,9 @@ GSList* g_slist_concat (GSList *list1,
|
|||||||
GSList* g_slist_remove (GSList *list,
|
GSList* g_slist_remove (GSList *list,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
GSList* g_slist_remove_link (GSList *list,
|
GSList* g_slist_remove_link (GSList *list,
|
||||||
GSList *llink);
|
GSList *link);
|
||||||
|
GSList* g_slist_delete_link (GSList *list,
|
||||||
|
GSList *link);
|
||||||
GSList* g_slist_reverse (GSList *list);
|
GSList* g_slist_reverse (GSList *list);
|
||||||
GSList* g_slist_copy (GSList *list);
|
GSList* g_slist_copy (GSList *list);
|
||||||
GSList* g_slist_nth (GSList *list,
|
GSList* g_slist_nth (GSList *list,
|
||||||
@ -968,64 +968,25 @@ gpointer g_slist_nth_data (GSList *list,
|
|||||||
#define g_slist_next(slist) ((slist) ? (((GSList *)(slist))->next) : NULL)
|
#define g_slist_next(slist) ((slist) ? (((GSList *)(slist))->next) : NULL)
|
||||||
|
|
||||||
|
|
||||||
/* Stacks
|
|
||||||
*/
|
|
||||||
|
|
||||||
GStack * g_stack_new (void);
|
|
||||||
void g_stack_free (GStack *stack);
|
|
||||||
gpointer g_stack_pop (GStack *stack);
|
|
||||||
|
|
||||||
#define g_stack_empty(stack) \
|
|
||||||
((((GStack *)(stack)) && ((GStack *)(stack))->list) ? FALSE : TRUE)
|
|
||||||
|
|
||||||
#define g_stack_peek(stack) \
|
|
||||||
((((GStack *)(stack)) && ((GStack *)(stack))->list) ? \
|
|
||||||
((GStack *)(stack))->list->data : NULL)
|
|
||||||
|
|
||||||
#define g_stack_index(stack,ptr) \
|
|
||||||
((((GStack *)(stack)) && ((GStack *)(stack))->list) ? \
|
|
||||||
g_list_index (((GStack *)(stack))->list, (ptr)) : -1)
|
|
||||||
|
|
||||||
#define g_stack_push(stack,data) G_STMT_START { \
|
|
||||||
if ((GStack *)(stack)) \
|
|
||||||
((GStack *)(stack))->list = \
|
|
||||||
g_list_prepend (((GStack *)(stack))->list, (data)); \
|
|
||||||
} G_STMT_END
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Queues
|
/* Queues
|
||||||
*/
|
*/
|
||||||
|
GQueue* g_queue_create (void);
|
||||||
GQueue * g_queue_new (void);
|
void g_queue_free (GQueue *queue);
|
||||||
void g_queue_free (GQueue *q);
|
void g_queue_push_head (GQueue *queue,
|
||||||
guint g_queue_get_size (GQueue *q);
|
gpointer data);
|
||||||
void g_queue_push_front (GQueue *q, gpointer data);
|
void g_queue_push_tail (GQueue *queue,
|
||||||
void g_queue_push_back (GQueue *q, gpointer data);
|
gpointer data);
|
||||||
gpointer g_queue_pop_front (GQueue *q);
|
gpointer g_queue_pop_head (GQueue *queue);
|
||||||
gpointer g_queue_pop_back (GQueue *q);
|
gpointer g_queue_pop_tail (GQueue *queue);
|
||||||
|
gboolean g_queue_is_empty (GQueue *queue);
|
||||||
#define g_queue_empty(queue) \
|
gpointer g_queue_peek_head (GQueue *queue);
|
||||||
((((GQueue *)(queue)) && ((GQueue *)(queue))->list) ? FALSE : TRUE)
|
gpointer g_queue_peek_tail (GQueue *queue);
|
||||||
|
void g_queue_push_head_link (GQueue *queue,
|
||||||
#define g_queue_peek_front(queue) \
|
GList *link);
|
||||||
((((GQueue *)(queue)) && ((GQueue *)(queue))->list) ? \
|
void g_queue_push_tail_link (GQueue *queue,
|
||||||
((GQueue *)(queue))->list->data : NULL)
|
GList *link);
|
||||||
|
GList* g_queue_pop_head_link (GQueue *queue);
|
||||||
#define g_queue_peek_back(queue) \
|
GList* g_queue_pop_tail_link (GQueue *queue);
|
||||||
((((GQueue *)(queue)) && ((GQueue *)(queue))->list_end) ? \
|
|
||||||
((GQueue *)(queue))->list_end->data : NULL)
|
|
||||||
|
|
||||||
#define g_queue_index(queue,ptr) \
|
|
||||||
((((GQueue *)(queue)) && ((GQueue *)(queue))->list) ? \
|
|
||||||
g_list_index (((GQueue *)(queue))->list, (ptr)) : -1)
|
|
||||||
|
|
||||||
#define g_queue_push g_queue_push_back
|
|
||||||
#define g_queue_pop g_queue_pop_front
|
|
||||||
#define g_queue_peek g_queue_peek_front
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Hash tables
|
/* Hash tables
|
||||||
@ -1554,9 +1515,7 @@ gchar* g_strconcat (const gchar *string1,
|
|||||||
...); /* NULL terminated */
|
...); /* NULL terminated */
|
||||||
gchar* g_strjoin (const gchar *separator,
|
gchar* g_strjoin (const gchar *separator,
|
||||||
...); /* NULL terminated */
|
...); /* NULL terminated */
|
||||||
/* Return a duplicate of the string with \ and " characters escaped by
|
/* deprecated function */
|
||||||
* a \. The returned string should be freed with g_free().
|
|
||||||
*/
|
|
||||||
gchar* g_strescape (gchar *string);
|
gchar* g_strescape (gchar *string);
|
||||||
|
|
||||||
gpointer g_memdup (gconstpointer mem,
|
gpointer g_memdup (gconstpointer mem,
|
||||||
@ -1684,6 +1643,71 @@ g_bit_storage (guint number)
|
|||||||
}
|
}
|
||||||
#endif /* G_CAN_INLINE */
|
#endif /* G_CAN_INLINE */
|
||||||
|
|
||||||
|
|
||||||
|
/* Trash Stacks
|
||||||
|
* elements need to be >= sizeof (gpointer)
|
||||||
|
*/
|
||||||
|
G_INLINE_FUNC void g_trash_stack_push (GTrashStack **stack_p,
|
||||||
|
gpointer data_p);
|
||||||
|
#ifdef G_CAN_INLINE
|
||||||
|
G_INLINE_FUNC void
|
||||||
|
g_trash_stack_push (GTrashStack **stack_p,
|
||||||
|
gpointer data_p)
|
||||||
|
{
|
||||||
|
GTrashStack *data = data_p;
|
||||||
|
|
||||||
|
data->next = *stack_p;
|
||||||
|
*stack_p = data;
|
||||||
|
}
|
||||||
|
#endif /* G_CAN_INLINE */
|
||||||
|
|
||||||
|
G_INLINE_FUNC gpointer g_trash_stack_pop (GTrashStack **stack_p);
|
||||||
|
#ifdef G_CAN_INLINE
|
||||||
|
G_INLINE_FUNC gpointer
|
||||||
|
g_trash_stack_pop (GTrashStack **stack_p)
|
||||||
|
{
|
||||||
|
GTrashStack *data;
|
||||||
|
|
||||||
|
data = *stack_p;
|
||||||
|
if (data)
|
||||||
|
{
|
||||||
|
*stack_p = data->next;
|
||||||
|
memset (data, 0, sizeof (GTrashStack));
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
#endif /* G_CAN_INLINE */
|
||||||
|
|
||||||
|
G_INLINE_FUNC gpointer g_trash_stack_peek (GTrashStack **stack_p);
|
||||||
|
#ifdef G_CAN_INLINE
|
||||||
|
G_INLINE_FUNC gpointer
|
||||||
|
g_trash_stack_peek (GTrashStack **stack_p)
|
||||||
|
{
|
||||||
|
GTrashStack *data;
|
||||||
|
|
||||||
|
data = *stack_p;
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
#endif /* G_CAN_INLINE */
|
||||||
|
|
||||||
|
G_INLINE_FUNC guint g_trash_stack_height (GTrashStack **stack_p);
|
||||||
|
#ifdef G_CAN_INLINE
|
||||||
|
G_INLINE_FUNC guint
|
||||||
|
g_trash_stack_height (GTrashStack **stack_p)
|
||||||
|
{
|
||||||
|
GTrashStack *data;
|
||||||
|
guint i = 0;
|
||||||
|
|
||||||
|
for (data = *stack_p; data; data = data->next)
|
||||||
|
i++;
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
#endif /* G_CAN_INLINE */
|
||||||
|
|
||||||
|
|
||||||
/* String Chunks
|
/* String Chunks
|
||||||
*/
|
*/
|
||||||
GStringChunk* g_string_chunk_new (gint size);
|
GStringChunk* g_string_chunk_new (gint size);
|
||||||
@ -1696,36 +1720,6 @@ gchar* g_string_chunk_insert_const (GStringChunk *chunk,
|
|||||||
|
|
||||||
/* Strings
|
/* Strings
|
||||||
*/
|
*/
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
G_STRING_ERROR_NONE, /* No error occurred */
|
|
||||||
G_STRING_ERROR_INVAL, /* Invalid input value to function */
|
|
||||||
G_STRING_ERROR_READ, /* read() returned an error - check errno */
|
|
||||||
G_STRING_ERROR_NODATA, /* No more input data - result string may contain data */
|
|
||||||
G_STRING_ERROR_LENGTH /* max_length reached */
|
|
||||||
} GStringError;
|
|
||||||
|
|
||||||
#define g_string_length(fstring) (fstring ? fstring->len : 0)
|
|
||||||
#define g_string_str(fstring) (fstring ? fstring->str : NULL)
|
|
||||||
#define g_string_char(fstring, n) (fstring->str[n])
|
|
||||||
|
|
||||||
#define g_string_copy(a,b) (g_string_assign(a, b->str))
|
|
||||||
#define g_string_dup(fstring) (fstring ? g_string_new(fstring->str) :\
|
|
||||||
g_string_new(NULL))
|
|
||||||
|
|
||||||
#define g_string_cmp(a,b) (strcmp(g_string_str(a), \
|
|
||||||
g_string_str(b)))
|
|
||||||
#define g_string_ncmp(a,b,n) (strncmp(g_string_str(a), \
|
|
||||||
g_string_str(b), n))
|
|
||||||
#define g_string_casecmp(a,b) (g_strcasecmp(g_string_str(a), \
|
|
||||||
g_string_str(b)))
|
|
||||||
#define g_string_ncasecmp(a,b,n) (g_strncasecmp(g_string_str(a), \
|
|
||||||
g_string_str(b), n))
|
|
||||||
|
|
||||||
#define g_string_strcmp(a,b) (strcmp(g_string_str(a), b))
|
|
||||||
#define g_string_strcasecmp(a,b) (g_strcasecmp(g_string_str(a), b))
|
|
||||||
#define g_string_strncasecmp(a,b,n) (g_strncasecmp(g_string_str(a), b, n))
|
|
||||||
|
|
||||||
GString* g_string_new (const gchar *init);
|
GString* g_string_new (const gchar *init);
|
||||||
GString* g_string_sized_new (guint dfl_size);
|
GString* g_string_sized_new (guint dfl_size);
|
||||||
void g_string_free (GString *string,
|
void g_string_free (GString *string,
|
||||||
@ -1759,20 +1753,6 @@ void g_string_sprintf (GString *string,
|
|||||||
void g_string_sprintfa (GString *string,
|
void g_string_sprintfa (GString *string,
|
||||||
const gchar *format,
|
const gchar *format,
|
||||||
...) G_GNUC_PRINTF (2, 3);
|
...) G_GNUC_PRINTF (2, 3);
|
||||||
GStringError g_string_readline (GString *dest_str,
|
|
||||||
gint max_length,
|
|
||||||
gint fd);
|
|
||||||
GStringError g_string_readline_buffered (GString *dest_str,
|
|
||||||
GString *buff_str,
|
|
||||||
gint max_length,
|
|
||||||
gint fd,
|
|
||||||
gint match_bare_cr);
|
|
||||||
GList* g_string_tokenise (GString *string,
|
|
||||||
gchar *delims,
|
|
||||||
gint max_tokens,
|
|
||||||
gint allow_empty);
|
|
||||||
void g_string_tokenise_free (GList *tokens,
|
|
||||||
gint free_token);
|
|
||||||
|
|
||||||
|
|
||||||
/* Resizable arrays, remove fills any cleared spot and shortens the
|
/* Resizable arrays, remove fills any cleared spot and shortens the
|
||||||
@ -2370,6 +2350,7 @@ gsize g_date_strftime (gchar *s,
|
|||||||
const gchar *format,
|
const gchar *format,
|
||||||
GDate *date);
|
GDate *date);
|
||||||
|
|
||||||
|
|
||||||
/* GRelation
|
/* GRelation
|
||||||
*
|
*
|
||||||
* Indexed Relations. Imagine a really simple table in a
|
* Indexed Relations. Imagine a really simple table in a
|
||||||
@ -2567,9 +2548,11 @@ struct _GSourceFuncs
|
|||||||
{
|
{
|
||||||
gboolean (*prepare) (gpointer source_data,
|
gboolean (*prepare) (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout);
|
gint *timeout,
|
||||||
|
gpointer user_data);
|
||||||
gboolean (*check) (gpointer source_data,
|
gboolean (*check) (gpointer source_data,
|
||||||
GTimeVal *current_time);
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data);
|
||||||
gboolean (*dispatch) (gpointer source_data,
|
gboolean (*dispatch) (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Note that this is NOT a relocatable package
|
# Note that this is NOT a relocatable package
|
||||||
%define ver @VERSION@
|
%define ver @VERSION@
|
||||||
%define rel SNAP
|
%define rel 1
|
||||||
%define prefix /usr
|
%define prefix /usr
|
||||||
|
|
||||||
Summary: Handy library of utility functions
|
Summary: Handy library of utility functions
|
||||||
|
@ -48,7 +48,6 @@ libglib_la_SOURCES = \
|
|||||||
grand.c \
|
grand.c \
|
||||||
gscanner.c \
|
gscanner.c \
|
||||||
gslist.c \
|
gslist.c \
|
||||||
gstack.c \
|
|
||||||
gstrfuncs.c \
|
gstrfuncs.c \
|
||||||
gstring.c \
|
gstring.c \
|
||||||
gthread.c \
|
gthread.c \
|
||||||
|
@ -111,7 +111,14 @@ g_on_error_query (const gchar *prg_name)
|
|||||||
query3);
|
query3);
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
|
|
||||||
|
#ifndef NATIVE_WIN32
|
||||||
|
if (isatty(0) && isatty(1))
|
||||||
fgets (buf, 8, stdin);
|
fgets (buf, 8, stdin);
|
||||||
|
else
|
||||||
|
strcpy (buf, "E\n");
|
||||||
|
#else
|
||||||
|
fgets (buf, 8, stdin);
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((buf[0] == 'E' || buf[0] == 'e')
|
if ((buf[0] == 'E' || buf[0] == 'e')
|
||||||
&& buf[1] == '\n')
|
&& buf[1] == '\n')
|
||||||
|
37
glib/gdate.c
37
glib/gdate.c
@ -28,6 +28,11 @@
|
|||||||
* MT safe
|
* MT safe
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define DEBUG_MSG(x) /* */
|
||||||
|
#ifdef G_ENABLE_DEBUG
|
||||||
|
/* #define DEBUG_MSG(args) g_message args ; */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
@ -453,7 +458,7 @@ g_date_fill_parse_tokens (const gchar *str, GDateParseTokens *pt)
|
|||||||
{
|
{
|
||||||
gchar num[4][NUM_LEN+1];
|
gchar num[4][NUM_LEN+1];
|
||||||
gint i;
|
gint i;
|
||||||
const gchar *s;
|
const guchar *s;
|
||||||
|
|
||||||
/* We count 4, but store 3; so we can give an error
|
/* We count 4, but store 3; so we can give an error
|
||||||
* if there are 4.
|
* if there are 4.
|
||||||
@ -609,23 +614,15 @@ g_date_prepare_to_parse (const gchar *str, GDateParseTokens *pt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef G_ENABLE_DEBUG
|
#ifdef G_ENABLE_DEBUG
|
||||||
# if 0
|
DEBUG_MSG (("**GDate prepared a new set of locale-specific parse rules."));
|
||||||
g_message ("**GDate prepared a new set of locale-specific parse rules.");
|
|
||||||
# endif
|
|
||||||
i = 1;
|
i = 1;
|
||||||
while (i < 13)
|
while (i < 13)
|
||||||
{
|
{
|
||||||
# if 0
|
DEBUG_MSG ((" %s %s", long_month_names[i], short_month_names[i]));
|
||||||
g_message (" %s %s", long_month_names[i], short_month_names[i]);
|
|
||||||
# endif
|
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
if (using_twodigit_years)
|
if (using_twodigit_years)
|
||||||
{
|
DEBUG_MSG (("**Using twodigit years with cutoff year: %u", twodigit_start_year));
|
||||||
# if 0
|
|
||||||
g_message ("**Using twodigit years with cutoff year: %u", twodigit_start_year);
|
|
||||||
# endif
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
gchar *strings[3];
|
gchar *strings[3];
|
||||||
i = 0;
|
i = 0;
|
||||||
@ -648,10 +645,8 @@ g_date_prepare_to_parse (const gchar *str, GDateParseTokens *pt)
|
|||||||
}
|
}
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
# if 0
|
DEBUG_MSG (("**Order: %s, %s, %s", strings[0], strings[1], strings[2]));
|
||||||
g_message ("**Order: %s, %s, %s", strings[0], strings[1], strings[2]);
|
DEBUG_MSG (("**Sample date in this locale: `%s'", buf));
|
||||||
g_message ("**Sample date in this locale: `%s'", buf);
|
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -675,12 +670,8 @@ g_date_set_parse (GDate *d,
|
|||||||
|
|
||||||
g_date_prepare_to_parse (str, &pt);
|
g_date_prepare_to_parse (str, &pt);
|
||||||
|
|
||||||
#ifdef G_ENABLE_DEBUG
|
DEBUG_MSG (("Found %d ints, `%d' `%d' `%d' and written out month %d",
|
||||||
# if 0
|
pt.num_ints, pt.n[0], pt.n[1], pt.n[2], pt.month));
|
||||||
g_message ("Found %d ints, `%d' `%d' `%d' and written out month %d",
|
|
||||||
pt.num_ints, pt.n[0], pt.n[1], pt.n[2], pt.month);
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
if (pt.num_ints == 4)
|
if (pt.num_ints == 4)
|
||||||
@ -801,7 +792,7 @@ g_date_set_parse (GDate *d,
|
|||||||
}
|
}
|
||||||
#ifdef G_ENABLE_DEBUG
|
#ifdef G_ENABLE_DEBUG
|
||||||
else
|
else
|
||||||
g_message ("Rejected DMY %u %u %u", day, m, y);
|
DEBUG_MSG (("Rejected DMY %u %u %u", day, m, y));
|
||||||
#endif
|
#endif
|
||||||
G_UNLOCK (g_date_global);
|
G_UNLOCK (g_date_global);
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,14 @@ g_on_error_query (const gchar *prg_name)
|
|||||||
query3);
|
query3);
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
|
|
||||||
|
#ifndef NATIVE_WIN32
|
||||||
|
if (isatty(0) && isatty(1))
|
||||||
fgets (buf, 8, stdin);
|
fgets (buf, 8, stdin);
|
||||||
|
else
|
||||||
|
strcpy (buf, "E\n");
|
||||||
|
#else
|
||||||
|
fgets (buf, 8, stdin);
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((buf[0] == 'E' || buf[0] == 'e')
|
if ((buf[0] == 'E' || buf[0] == 'e')
|
||||||
&& buf[1] == '\n')
|
&& buf[1] == '\n')
|
||||||
|
@ -78,9 +78,11 @@ static guint g_io_unix_add_watch (GIOChannel *channel,
|
|||||||
GDestroyNotify notify);
|
GDestroyNotify notify);
|
||||||
static gboolean g_io_unix_prepare (gpointer source_data,
|
static gboolean g_io_unix_prepare (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout);
|
gint *timeout,
|
||||||
|
gpointer user_data);
|
||||||
static gboolean g_io_unix_check (gpointer source_data,
|
static gboolean g_io_unix_check (gpointer source_data,
|
||||||
GTimeVal *current_time);
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data);
|
||||||
static gboolean g_io_unix_dispatch (gpointer source_data,
|
static gboolean g_io_unix_dispatch (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
@ -105,7 +107,8 @@ GIOFuncs unix_channel_funcs = {
|
|||||||
static gboolean
|
static gboolean
|
||||||
g_io_unix_prepare (gpointer source_data,
|
g_io_unix_prepare (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout)
|
gint *timeout,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
*timeout = -1;
|
*timeout = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -113,7 +116,8 @@ g_io_unix_prepare (gpointer source_data,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
g_io_unix_check (gpointer source_data,
|
g_io_unix_check (gpointer source_data,
|
||||||
GTimeVal *current_time)
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GIOUnixWatch *data = source_data;
|
GIOUnixWatch *data = source_data;
|
||||||
|
|
||||||
|
@ -158,7 +158,6 @@ EXPORTS
|
|||||||
g_list_append
|
g_list_append
|
||||||
g_list_concat
|
g_list_concat
|
||||||
g_list_copy
|
g_list_copy
|
||||||
g_list_delete
|
|
||||||
g_list_find
|
g_list_find
|
||||||
g_list_find_custom
|
g_list_find_custom
|
||||||
g_list_first
|
g_list_first
|
||||||
@ -256,13 +255,6 @@ EXPORTS
|
|||||||
g_quark_from_string
|
g_quark_from_string
|
||||||
g_quark_to_string
|
g_quark_to_string
|
||||||
g_quark_try_string
|
g_quark_try_string
|
||||||
g_queue_free
|
|
||||||
g_queue_get_size
|
|
||||||
g_queue_new
|
|
||||||
g_queue_pop_back
|
|
||||||
g_queue_pop_front
|
|
||||||
g_queue_push_back
|
|
||||||
g_queue_push_front
|
|
||||||
g_rand_double
|
g_rand_double
|
||||||
g_rand_double_range
|
g_rand_double_range
|
||||||
g_rand_free
|
g_rand_free
|
||||||
@ -344,9 +336,6 @@ EXPORTS
|
|||||||
g_source_remove
|
g_source_remove
|
||||||
g_source_remove_by_source_data
|
g_source_remove_by_source_data
|
||||||
g_source_remove_by_user_data
|
g_source_remove_by_user_data
|
||||||
g_stack_free
|
|
||||||
g_stack_new
|
|
||||||
g_stack_pop
|
|
||||||
g_static_mutex_get_mutex_impl
|
g_static_mutex_get_mutex_impl
|
||||||
g_static_private_get
|
g_static_private_get
|
||||||
g_static_private_set
|
g_static_private_set
|
||||||
|
299
glib/glib.h
299
glib/glib.h
@ -49,16 +49,12 @@
|
|||||||
* And it provides a way to store and retrieve a `gint' in/from a `gpointer'.
|
* And it provides a way to store and retrieve a `gint' in/from a `gpointer'.
|
||||||
* This is useful to pass an integer instead of a pointer to a callback.
|
* This is useful to pass an integer instead of a pointer to a callback.
|
||||||
*
|
*
|
||||||
* GINT_TO_POINTER(i), GUINT_TO_POINTER(i)
|
* GINT_TO_POINTER (i), GUINT_TO_POINTER (i)
|
||||||
* GPOINTER_TO_INT(p), GPOINTER_TO_UINT(p)
|
* GPOINTER_TO_INT (p), GPOINTER_TO_UINT (p)
|
||||||
*
|
*
|
||||||
* Finally, it provide the following wrappers to STDC functions:
|
* Finally, it provides the following wrappers to STDC functions:
|
||||||
*
|
*
|
||||||
* g_ATEXIT
|
* void g_memmove (gpointer dest, gconstpointer void *src, gulong count);
|
||||||
* To register hooks which are executed on exit().
|
|
||||||
* Usually a wrapper for STDC atexit.
|
|
||||||
*
|
|
||||||
* void g_memmove(gpointer dest, gconstpointer void *src, gulong count);
|
|
||||||
* A wrapper for STDC memmove, or an implementation, if memmove doesn't
|
* A wrapper for STDC memmove, or an implementation, if memmove doesn't
|
||||||
* exist. The prototype looks like the above, give or take a const,
|
* exist. The prototype looks like the above, give or take a const,
|
||||||
* or size_t.
|
* or size_t.
|
||||||
@ -262,11 +258,11 @@ extern "C" {
|
|||||||
* macros, so we can refer to them as strings unconditionally.
|
* macros, so we can refer to them as strings unconditionally.
|
||||||
*/
|
*/
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define G_GNUC_FUNCTION (__FUNCTION__)
|
#define G_GNUC_FUNCTION __FUNCTION__
|
||||||
#define G_GNUC_PRETTY_FUNCTION (__PRETTY_FUNCTION__)
|
#define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__
|
||||||
#else /* !__GNUC__ */
|
#else /* !__GNUC__ */
|
||||||
#define G_GNUC_FUNCTION ("")
|
#define G_GNUC_FUNCTION ""
|
||||||
#define G_GNUC_PRETTY_FUNCTION ("")
|
#define G_GNUC_PRETTY_FUNCTION ""
|
||||||
#endif /* !__GNUC__ */
|
#endif /* !__GNUC__ */
|
||||||
|
|
||||||
/* we try to provide a usefull equivalent for ATEXIT if it is
|
/* we try to provide a usefull equivalent for ATEXIT if it is
|
||||||
@ -703,15 +699,16 @@ typedef struct _GRelation GRelation;
|
|||||||
typedef struct _GScanner GScanner;
|
typedef struct _GScanner GScanner;
|
||||||
typedef struct _GScannerConfig GScannerConfig;
|
typedef struct _GScannerConfig GScannerConfig;
|
||||||
typedef struct _GSList GSList;
|
typedef struct _GSList GSList;
|
||||||
typedef struct _GStack GStack;
|
|
||||||
typedef struct _GString GString;
|
typedef struct _GString GString;
|
||||||
typedef struct _GStringChunk GStringChunk;
|
typedef struct _GStringChunk GStringChunk;
|
||||||
typedef struct _GTimer GTimer;
|
typedef struct _GTimer GTimer;
|
||||||
|
typedef struct _GTrashStack GTrashStack;
|
||||||
typedef struct _GTree GTree;
|
typedef struct _GTree GTree;
|
||||||
typedef struct _GTuples GTuples;
|
typedef struct _GTuples GTuples;
|
||||||
typedef union _GTokenValue GTokenValue;
|
typedef union _GTokenValue GTokenValue;
|
||||||
typedef struct _GIOChannel GIOChannel;
|
typedef struct _GIOChannel GIOChannel;
|
||||||
|
|
||||||
|
/* Tree traverse flags */
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
G_TRAVERSE_LEAFS = 1 << 0,
|
G_TRAVERSE_LEAFS = 1 << 0,
|
||||||
@ -720,6 +717,7 @@ typedef enum
|
|||||||
G_TRAVERSE_MASK = 0x03
|
G_TRAVERSE_MASK = 0x03
|
||||||
} GTraverseFlags;
|
} GTraverseFlags;
|
||||||
|
|
||||||
|
/* Tree traverse orders */
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
G_IN_ORDER,
|
G_IN_ORDER,
|
||||||
@ -807,37 +805,6 @@ typedef gint (*GTraverseFunc) (gpointer key,
|
|||||||
typedef void (*GVoidFunc) (void);
|
typedef void (*GVoidFunc) (void);
|
||||||
|
|
||||||
|
|
||||||
struct _GList
|
|
||||||
{
|
|
||||||
gpointer data;
|
|
||||||
GList *next;
|
|
||||||
GList *prev;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GSList
|
|
||||||
{
|
|
||||||
gpointer data;
|
|
||||||
GSList *next;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GStack
|
|
||||||
{
|
|
||||||
GList *list;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GQueue
|
|
||||||
{
|
|
||||||
GList *list;
|
|
||||||
GList *list_end;
|
|
||||||
guint list_size;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GString
|
|
||||||
{
|
|
||||||
gchar *str;
|
|
||||||
gint len;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GArray
|
struct _GArray
|
||||||
{
|
{
|
||||||
gchar *data;
|
gchar *data;
|
||||||
@ -850,23 +817,54 @@ struct _GByteArray
|
|||||||
guint len;
|
guint len;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _GDebugKey
|
||||||
|
{
|
||||||
|
gchar *key;
|
||||||
|
guint value;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _GList
|
||||||
|
{
|
||||||
|
gpointer data;
|
||||||
|
GList *next;
|
||||||
|
GList *prev;
|
||||||
|
};
|
||||||
|
|
||||||
struct _GPtrArray
|
struct _GPtrArray
|
||||||
{
|
{
|
||||||
gpointer *pdata;
|
gpointer *pdata;
|
||||||
guint len;
|
guint len;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _GQueue
|
||||||
|
{
|
||||||
|
GList *head;
|
||||||
|
GList *tail;
|
||||||
|
guint length;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _GSList
|
||||||
|
{
|
||||||
|
gpointer data;
|
||||||
|
GSList *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _GString
|
||||||
|
{
|
||||||
|
gchar *str;
|
||||||
|
gint len;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _GTrashStack
|
||||||
|
{
|
||||||
|
GTrashStack *next;
|
||||||
|
};
|
||||||
|
|
||||||
struct _GTuples
|
struct _GTuples
|
||||||
{
|
{
|
||||||
guint len;
|
guint len;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GDebugKey
|
|
||||||
{
|
|
||||||
gchar *key;
|
|
||||||
guint value;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* Doubly linked lists
|
/* Doubly linked lists
|
||||||
*/
|
*/
|
||||||
@ -887,12 +885,12 @@ GList* g_list_insert_sorted (GList *list,
|
|||||||
GCompareFunc func);
|
GCompareFunc func);
|
||||||
GList* g_list_concat (GList *list1,
|
GList* g_list_concat (GList *list1,
|
||||||
GList *list2);
|
GList *list2);
|
||||||
GList* g_list_delete (GList *list,
|
|
||||||
GList *link);
|
|
||||||
GList* g_list_remove (GList *list,
|
GList* g_list_remove (GList *list,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
GList* g_list_remove_link (GList *list,
|
GList* g_list_remove_link (GList *list,
|
||||||
GList *llink);
|
GList *llink);
|
||||||
|
GList* g_list_delete_link (GList *list,
|
||||||
|
GList *link);
|
||||||
GList* g_list_reverse (GList *list);
|
GList* g_list_reverse (GList *list);
|
||||||
GList* g_list_copy (GList *list);
|
GList* g_list_copy (GList *list);
|
||||||
GList* g_list_nth (GList *list,
|
GList* g_list_nth (GList *list,
|
||||||
@ -942,7 +940,9 @@ GSList* g_slist_concat (GSList *list1,
|
|||||||
GSList* g_slist_remove (GSList *list,
|
GSList* g_slist_remove (GSList *list,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
GSList* g_slist_remove_link (GSList *list,
|
GSList* g_slist_remove_link (GSList *list,
|
||||||
GSList *llink);
|
GSList *link);
|
||||||
|
GSList* g_slist_delete_link (GSList *list,
|
||||||
|
GSList *link);
|
||||||
GSList* g_slist_reverse (GSList *list);
|
GSList* g_slist_reverse (GSList *list);
|
||||||
GSList* g_slist_copy (GSList *list);
|
GSList* g_slist_copy (GSList *list);
|
||||||
GSList* g_slist_nth (GSList *list,
|
GSList* g_slist_nth (GSList *list,
|
||||||
@ -968,64 +968,25 @@ gpointer g_slist_nth_data (GSList *list,
|
|||||||
#define g_slist_next(slist) ((slist) ? (((GSList *)(slist))->next) : NULL)
|
#define g_slist_next(slist) ((slist) ? (((GSList *)(slist))->next) : NULL)
|
||||||
|
|
||||||
|
|
||||||
/* Stacks
|
|
||||||
*/
|
|
||||||
|
|
||||||
GStack * g_stack_new (void);
|
|
||||||
void g_stack_free (GStack *stack);
|
|
||||||
gpointer g_stack_pop (GStack *stack);
|
|
||||||
|
|
||||||
#define g_stack_empty(stack) \
|
|
||||||
((((GStack *)(stack)) && ((GStack *)(stack))->list) ? FALSE : TRUE)
|
|
||||||
|
|
||||||
#define g_stack_peek(stack) \
|
|
||||||
((((GStack *)(stack)) && ((GStack *)(stack))->list) ? \
|
|
||||||
((GStack *)(stack))->list->data : NULL)
|
|
||||||
|
|
||||||
#define g_stack_index(stack,ptr) \
|
|
||||||
((((GStack *)(stack)) && ((GStack *)(stack))->list) ? \
|
|
||||||
g_list_index (((GStack *)(stack))->list, (ptr)) : -1)
|
|
||||||
|
|
||||||
#define g_stack_push(stack,data) G_STMT_START { \
|
|
||||||
if ((GStack *)(stack)) \
|
|
||||||
((GStack *)(stack))->list = \
|
|
||||||
g_list_prepend (((GStack *)(stack))->list, (data)); \
|
|
||||||
} G_STMT_END
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Queues
|
/* Queues
|
||||||
*/
|
*/
|
||||||
|
GQueue* g_queue_create (void);
|
||||||
GQueue * g_queue_new (void);
|
void g_queue_free (GQueue *queue);
|
||||||
void g_queue_free (GQueue *q);
|
void g_queue_push_head (GQueue *queue,
|
||||||
guint g_queue_get_size (GQueue *q);
|
gpointer data);
|
||||||
void g_queue_push_front (GQueue *q, gpointer data);
|
void g_queue_push_tail (GQueue *queue,
|
||||||
void g_queue_push_back (GQueue *q, gpointer data);
|
gpointer data);
|
||||||
gpointer g_queue_pop_front (GQueue *q);
|
gpointer g_queue_pop_head (GQueue *queue);
|
||||||
gpointer g_queue_pop_back (GQueue *q);
|
gpointer g_queue_pop_tail (GQueue *queue);
|
||||||
|
gboolean g_queue_is_empty (GQueue *queue);
|
||||||
#define g_queue_empty(queue) \
|
gpointer g_queue_peek_head (GQueue *queue);
|
||||||
((((GQueue *)(queue)) && ((GQueue *)(queue))->list) ? FALSE : TRUE)
|
gpointer g_queue_peek_tail (GQueue *queue);
|
||||||
|
void g_queue_push_head_link (GQueue *queue,
|
||||||
#define g_queue_peek_front(queue) \
|
GList *link);
|
||||||
((((GQueue *)(queue)) && ((GQueue *)(queue))->list) ? \
|
void g_queue_push_tail_link (GQueue *queue,
|
||||||
((GQueue *)(queue))->list->data : NULL)
|
GList *link);
|
||||||
|
GList* g_queue_pop_head_link (GQueue *queue);
|
||||||
#define g_queue_peek_back(queue) \
|
GList* g_queue_pop_tail_link (GQueue *queue);
|
||||||
((((GQueue *)(queue)) && ((GQueue *)(queue))->list_end) ? \
|
|
||||||
((GQueue *)(queue))->list_end->data : NULL)
|
|
||||||
|
|
||||||
#define g_queue_index(queue,ptr) \
|
|
||||||
((((GQueue *)(queue)) && ((GQueue *)(queue))->list) ? \
|
|
||||||
g_list_index (((GQueue *)(queue))->list, (ptr)) : -1)
|
|
||||||
|
|
||||||
#define g_queue_push g_queue_push_back
|
|
||||||
#define g_queue_pop g_queue_pop_front
|
|
||||||
#define g_queue_peek g_queue_peek_front
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Hash tables
|
/* Hash tables
|
||||||
@ -1554,9 +1515,7 @@ gchar* g_strconcat (const gchar *string1,
|
|||||||
...); /* NULL terminated */
|
...); /* NULL terminated */
|
||||||
gchar* g_strjoin (const gchar *separator,
|
gchar* g_strjoin (const gchar *separator,
|
||||||
...); /* NULL terminated */
|
...); /* NULL terminated */
|
||||||
/* Return a duplicate of the string with \ and " characters escaped by
|
/* deprecated function */
|
||||||
* a \. The returned string should be freed with g_free().
|
|
||||||
*/
|
|
||||||
gchar* g_strescape (gchar *string);
|
gchar* g_strescape (gchar *string);
|
||||||
|
|
||||||
gpointer g_memdup (gconstpointer mem,
|
gpointer g_memdup (gconstpointer mem,
|
||||||
@ -1684,6 +1643,71 @@ g_bit_storage (guint number)
|
|||||||
}
|
}
|
||||||
#endif /* G_CAN_INLINE */
|
#endif /* G_CAN_INLINE */
|
||||||
|
|
||||||
|
|
||||||
|
/* Trash Stacks
|
||||||
|
* elements need to be >= sizeof (gpointer)
|
||||||
|
*/
|
||||||
|
G_INLINE_FUNC void g_trash_stack_push (GTrashStack **stack_p,
|
||||||
|
gpointer data_p);
|
||||||
|
#ifdef G_CAN_INLINE
|
||||||
|
G_INLINE_FUNC void
|
||||||
|
g_trash_stack_push (GTrashStack **stack_p,
|
||||||
|
gpointer data_p)
|
||||||
|
{
|
||||||
|
GTrashStack *data = data_p;
|
||||||
|
|
||||||
|
data->next = *stack_p;
|
||||||
|
*stack_p = data;
|
||||||
|
}
|
||||||
|
#endif /* G_CAN_INLINE */
|
||||||
|
|
||||||
|
G_INLINE_FUNC gpointer g_trash_stack_pop (GTrashStack **stack_p);
|
||||||
|
#ifdef G_CAN_INLINE
|
||||||
|
G_INLINE_FUNC gpointer
|
||||||
|
g_trash_stack_pop (GTrashStack **stack_p)
|
||||||
|
{
|
||||||
|
GTrashStack *data;
|
||||||
|
|
||||||
|
data = *stack_p;
|
||||||
|
if (data)
|
||||||
|
{
|
||||||
|
*stack_p = data->next;
|
||||||
|
memset (data, 0, sizeof (GTrashStack));
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
#endif /* G_CAN_INLINE */
|
||||||
|
|
||||||
|
G_INLINE_FUNC gpointer g_trash_stack_peek (GTrashStack **stack_p);
|
||||||
|
#ifdef G_CAN_INLINE
|
||||||
|
G_INLINE_FUNC gpointer
|
||||||
|
g_trash_stack_peek (GTrashStack **stack_p)
|
||||||
|
{
|
||||||
|
GTrashStack *data;
|
||||||
|
|
||||||
|
data = *stack_p;
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
#endif /* G_CAN_INLINE */
|
||||||
|
|
||||||
|
G_INLINE_FUNC guint g_trash_stack_height (GTrashStack **stack_p);
|
||||||
|
#ifdef G_CAN_INLINE
|
||||||
|
G_INLINE_FUNC guint
|
||||||
|
g_trash_stack_height (GTrashStack **stack_p)
|
||||||
|
{
|
||||||
|
GTrashStack *data;
|
||||||
|
guint i = 0;
|
||||||
|
|
||||||
|
for (data = *stack_p; data; data = data->next)
|
||||||
|
i++;
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
#endif /* G_CAN_INLINE */
|
||||||
|
|
||||||
|
|
||||||
/* String Chunks
|
/* String Chunks
|
||||||
*/
|
*/
|
||||||
GStringChunk* g_string_chunk_new (gint size);
|
GStringChunk* g_string_chunk_new (gint size);
|
||||||
@ -1696,36 +1720,6 @@ gchar* g_string_chunk_insert_const (GStringChunk *chunk,
|
|||||||
|
|
||||||
/* Strings
|
/* Strings
|
||||||
*/
|
*/
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
G_STRING_ERROR_NONE, /* No error occurred */
|
|
||||||
G_STRING_ERROR_INVAL, /* Invalid input value to function */
|
|
||||||
G_STRING_ERROR_READ, /* read() returned an error - check errno */
|
|
||||||
G_STRING_ERROR_NODATA, /* No more input data - result string may contain data */
|
|
||||||
G_STRING_ERROR_LENGTH /* max_length reached */
|
|
||||||
} GStringError;
|
|
||||||
|
|
||||||
#define g_string_length(fstring) (fstring ? fstring->len : 0)
|
|
||||||
#define g_string_str(fstring) (fstring ? fstring->str : NULL)
|
|
||||||
#define g_string_char(fstring, n) (fstring->str[n])
|
|
||||||
|
|
||||||
#define g_string_copy(a,b) (g_string_assign(a, b->str))
|
|
||||||
#define g_string_dup(fstring) (fstring ? g_string_new(fstring->str) :\
|
|
||||||
g_string_new(NULL))
|
|
||||||
|
|
||||||
#define g_string_cmp(a,b) (strcmp(g_string_str(a), \
|
|
||||||
g_string_str(b)))
|
|
||||||
#define g_string_ncmp(a,b,n) (strncmp(g_string_str(a), \
|
|
||||||
g_string_str(b), n))
|
|
||||||
#define g_string_casecmp(a,b) (g_strcasecmp(g_string_str(a), \
|
|
||||||
g_string_str(b)))
|
|
||||||
#define g_string_ncasecmp(a,b,n) (g_strncasecmp(g_string_str(a), \
|
|
||||||
g_string_str(b), n))
|
|
||||||
|
|
||||||
#define g_string_strcmp(a,b) (strcmp(g_string_str(a), b))
|
|
||||||
#define g_string_strcasecmp(a,b) (g_strcasecmp(g_string_str(a), b))
|
|
||||||
#define g_string_strncasecmp(a,b,n) (g_strncasecmp(g_string_str(a), b, n))
|
|
||||||
|
|
||||||
GString* g_string_new (const gchar *init);
|
GString* g_string_new (const gchar *init);
|
||||||
GString* g_string_sized_new (guint dfl_size);
|
GString* g_string_sized_new (guint dfl_size);
|
||||||
void g_string_free (GString *string,
|
void g_string_free (GString *string,
|
||||||
@ -1759,20 +1753,6 @@ void g_string_sprintf (GString *string,
|
|||||||
void g_string_sprintfa (GString *string,
|
void g_string_sprintfa (GString *string,
|
||||||
const gchar *format,
|
const gchar *format,
|
||||||
...) G_GNUC_PRINTF (2, 3);
|
...) G_GNUC_PRINTF (2, 3);
|
||||||
GStringError g_string_readline (GString *dest_str,
|
|
||||||
gint max_length,
|
|
||||||
gint fd);
|
|
||||||
GStringError g_string_readline_buffered (GString *dest_str,
|
|
||||||
GString *buff_str,
|
|
||||||
gint max_length,
|
|
||||||
gint fd,
|
|
||||||
gint match_bare_cr);
|
|
||||||
GList* g_string_tokenise (GString *string,
|
|
||||||
gchar *delims,
|
|
||||||
gint max_tokens,
|
|
||||||
gint allow_empty);
|
|
||||||
void g_string_tokenise_free (GList *tokens,
|
|
||||||
gint free_token);
|
|
||||||
|
|
||||||
|
|
||||||
/* Resizable arrays, remove fills any cleared spot and shortens the
|
/* Resizable arrays, remove fills any cleared spot and shortens the
|
||||||
@ -2370,6 +2350,7 @@ gsize g_date_strftime (gchar *s,
|
|||||||
const gchar *format,
|
const gchar *format,
|
||||||
GDate *date);
|
GDate *date);
|
||||||
|
|
||||||
|
|
||||||
/* GRelation
|
/* GRelation
|
||||||
*
|
*
|
||||||
* Indexed Relations. Imagine a really simple table in a
|
* Indexed Relations. Imagine a really simple table in a
|
||||||
@ -2567,9 +2548,11 @@ struct _GSourceFuncs
|
|||||||
{
|
{
|
||||||
gboolean (*prepare) (gpointer source_data,
|
gboolean (*prepare) (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout);
|
gint *timeout,
|
||||||
|
gpointer user_data);
|
||||||
gboolean (*check) (gpointer source_data,
|
gboolean (*check) (gpointer source_data,
|
||||||
GTimeVal *current_time);
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data);
|
||||||
gboolean (*dispatch) (gpointer source_data,
|
gboolean (*dispatch) (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
11
glib/glist.c
11
glib/glist.c
@ -100,7 +100,7 @@ g_list_pop_allocator (void)
|
|||||||
G_UNLOCK (current_allocator);
|
G_UNLOCK (current_allocator);
|
||||||
}
|
}
|
||||||
|
|
||||||
GList*
|
inline GList*
|
||||||
g_list_alloc (void)
|
g_list_alloc (void)
|
||||||
{
|
{
|
||||||
GList *list;
|
GList *list;
|
||||||
@ -153,7 +153,7 @@ g_list_free (GList *list)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
inline void
|
||||||
g_list_free_1 (GList *list)
|
g_list_free_1 (GList *list)
|
||||||
{
|
{
|
||||||
if (list)
|
if (list)
|
||||||
@ -293,7 +293,7 @@ g_list_remove (GList *list,
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
GList*
|
inline GList*
|
||||||
g_list_remove_link (GList *list,
|
g_list_remove_link (GList *list,
|
||||||
GList *link)
|
GList *link)
|
||||||
{
|
{
|
||||||
@ -314,9 +314,9 @@ g_list_remove_link (GList *list,
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GList*
|
GList*
|
||||||
g_list_delete (GList *list, GList *link)
|
g_list_delete_link (GList *list,
|
||||||
|
GList *link)
|
||||||
{
|
{
|
||||||
list = g_list_remove_link (list, link);
|
list = g_list_remove_link (list, link);
|
||||||
g_list_free_1 (link);
|
g_list_free_1 (link);
|
||||||
@ -324,7 +324,6 @@ g_list_delete (GList *list, GList *link)
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GList*
|
GList*
|
||||||
g_list_copy (GList *list)
|
g_list_copy (GList *list)
|
||||||
{
|
{
|
||||||
|
183
glib/gmain.c
183
glib/gmain.c
@ -33,6 +33,11 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
/* uncomment the next line to get poll() debugging info */
|
||||||
|
/* #define G_MAIN_POLL_DEBUG */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "glib.h"
|
#include "glib.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@ -107,20 +112,25 @@ static void g_main_poll (gint timeout,
|
|||||||
gint priority);
|
gint priority);
|
||||||
static void g_main_add_poll_unlocked (gint priority,
|
static void g_main_add_poll_unlocked (gint priority,
|
||||||
GPollFD *fd);
|
GPollFD *fd);
|
||||||
|
static void g_main_wakeup (void);
|
||||||
|
|
||||||
static gboolean g_timeout_prepare (gpointer source_data,
|
static gboolean g_timeout_prepare (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout);
|
gint *timeout,
|
||||||
|
gpointer user_data);
|
||||||
static gboolean g_timeout_check (gpointer source_data,
|
static gboolean g_timeout_check (gpointer source_data,
|
||||||
GTimeVal *current_time);
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data);
|
||||||
static gboolean g_timeout_dispatch (gpointer source_data,
|
static gboolean g_timeout_dispatch (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
static gboolean g_idle_prepare (gpointer source_data,
|
static gboolean g_idle_prepare (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout);
|
gint *timeout,
|
||||||
|
gpointer user_data);
|
||||||
static gboolean g_idle_check (gpointer source_data,
|
static gboolean g_idle_check (gpointer source_data,
|
||||||
GTimeVal *current_time);
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data);
|
||||||
static gboolean g_idle_dispatch (gpointer source_data,
|
static gboolean g_idle_dispatch (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
@ -167,9 +177,16 @@ static HANDLE wake_up_semaphore = NULL;
|
|||||||
#endif /* NATIVE_WIN32 */
|
#endif /* NATIVE_WIN32 */
|
||||||
static GPollFD wake_up_rec;
|
static GPollFD wake_up_rec;
|
||||||
static gboolean poll_waiting = FALSE;
|
static gboolean poll_waiting = FALSE;
|
||||||
|
|
||||||
|
/* Flag indicating whether the set of fd's changed during a poll */
|
||||||
|
static gboolean poll_changed = FALSE;
|
||||||
#endif /* G_THREADS_ENABLED */
|
#endif /* G_THREADS_ENABLED */
|
||||||
|
|
||||||
#ifdef HAVE_POLL
|
#ifdef HAVE_POLL
|
||||||
|
/* SunOS has poll, but doesn't provide a prototype. */
|
||||||
|
# if defined (sun) && !defined (__SVR4)
|
||||||
|
extern gint poll (GPollFD *ufds, guint nfsd, gint timeout);
|
||||||
|
# endif /* !sun */
|
||||||
static GPollFunc poll_func = (GPollFunc) poll;
|
static GPollFunc poll_func = (GPollFunc) poll;
|
||||||
#else /* !HAVE_POLL */
|
#else /* !HAVE_POLL */
|
||||||
#ifdef NATIVE_WIN32
|
#ifdef NATIVE_WIN32
|
||||||
@ -329,6 +346,9 @@ g_poll (GPollFD *fds, guint nfds, gint timeout)
|
|||||||
#ifndef NO_FD_SET
|
#ifndef NO_FD_SET
|
||||||
# define SELECT_MASK fd_set
|
# define SELECT_MASK fd_set
|
||||||
#else /* !NO_FD_SET */
|
#else /* !NO_FD_SET */
|
||||||
|
# ifndef _AIX
|
||||||
|
typedef long fd_mask;
|
||||||
|
# endif /* _AIX */
|
||||||
# ifdef _IBMR2
|
# ifdef _IBMR2
|
||||||
# define SELECT_MASK void
|
# define SELECT_MASK void
|
||||||
# else /* !_IBMR2 */
|
# else /* !_IBMR2 */
|
||||||
@ -467,17 +487,9 @@ g_source_add (gint priority,
|
|||||||
|
|
||||||
#ifdef G_THREADS_ENABLED
|
#ifdef G_THREADS_ENABLED
|
||||||
/* Now wake up the main loop if it is waiting in the poll() */
|
/* Now wake up the main loop if it is waiting in the poll() */
|
||||||
|
g_main_wakeup ();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (poll_waiting)
|
|
||||||
{
|
|
||||||
poll_waiting = FALSE;
|
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
write (wake_up_pipe[1], "A", 1);
|
|
||||||
#else
|
|
||||||
ReleaseSemaphore (wake_up_semaphore, 1, NULL);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
G_UNLOCK (main_loop);
|
G_UNLOCK (main_loop);
|
||||||
|
|
||||||
return return_val;
|
return return_val;
|
||||||
@ -707,6 +719,15 @@ g_main_iterate (gboolean block,
|
|||||||
|
|
||||||
G_LOCK (main_loop);
|
G_LOCK (main_loop);
|
||||||
|
|
||||||
|
#ifdef G_THREADS_ENABLED
|
||||||
|
if (poll_waiting)
|
||||||
|
{
|
||||||
|
g_warning("g_main_iterate(): main loop already active in another thread");
|
||||||
|
G_UNLOCK (main_loop);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
#endif G_THREADS_ENABLED
|
||||||
|
|
||||||
/* If recursing, finish up current dispatch, before starting over */
|
/* If recursing, finish up current dispatch, before starting over */
|
||||||
if (pending_dispatches)
|
if (pending_dispatches)
|
||||||
{
|
{
|
||||||
@ -725,7 +746,7 @@ g_main_iterate (gboolean block,
|
|||||||
hook = g_hook_first_valid (&source_list, TRUE);
|
hook = g_hook_first_valid (&source_list, TRUE);
|
||||||
while (hook)
|
while (hook)
|
||||||
{
|
{
|
||||||
GSource *source = (GSource *)hook;
|
GSource *source = (GSource*) hook;
|
||||||
gint source_timeout = -1;
|
gint source_timeout = -1;
|
||||||
|
|
||||||
if ((n_ready > 0) && (source->priority > current_priority))
|
if ((n_ready > 0) && (source->priority > current_priority))
|
||||||
@ -743,13 +764,14 @@ g_main_iterate (gboolean block,
|
|||||||
{
|
{
|
||||||
gboolean (*prepare) (gpointer source_data,
|
gboolean (*prepare) (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout);
|
gint *timeout,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
prepare = ((GSourceFuncs *) hook->func)->prepare;
|
prepare = ((GSourceFuncs *) hook->func)->prepare;
|
||||||
in_check_or_prepare++;
|
in_check_or_prepare++;
|
||||||
G_UNLOCK (main_loop);
|
G_UNLOCK (main_loop);
|
||||||
|
|
||||||
if ((*prepare) (source->source_data, ¤t_time, &source_timeout))
|
if ((*prepare) (source->source_data, ¤t_time, &source_timeout, source->hook.data))
|
||||||
hook->flags |= G_SOURCE_READY;
|
hook->flags |= G_SOURCE_READY;
|
||||||
|
|
||||||
G_LOCK (main_loop);
|
G_LOCK (main_loop);
|
||||||
@ -811,13 +833,14 @@ g_main_iterate (gboolean block,
|
|||||||
if (!(hook->flags & G_SOURCE_READY))
|
if (!(hook->flags & G_SOURCE_READY))
|
||||||
{
|
{
|
||||||
gboolean (*check) (gpointer source_data,
|
gboolean (*check) (gpointer source_data,
|
||||||
GTimeVal *current_time);
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
check = ((GSourceFuncs *) hook->func)->check;
|
check = ((GSourceFuncs *) hook->func)->check;
|
||||||
in_check_or_prepare++;
|
in_check_or_prepare++;
|
||||||
G_UNLOCK (main_loop);
|
G_UNLOCK (main_loop);
|
||||||
|
|
||||||
if ((*check) (source->source_data, ¤t_time))
|
if ((*check) (source->source_data, ¤t_time, source->hook.data))
|
||||||
hook->flags |= G_SOURCE_READY;
|
hook->flags |= G_SOURCE_READY;
|
||||||
|
|
||||||
G_LOCK (main_loop);
|
G_LOCK (main_loop);
|
||||||
@ -942,11 +965,14 @@ g_main_poll (gint timeout,
|
|||||||
gboolean use_priority,
|
gboolean use_priority,
|
||||||
gint priority)
|
gint priority)
|
||||||
{
|
{
|
||||||
|
#ifdef G_MAIN_POLL_DEBUG
|
||||||
|
GTimer *poll_timer;
|
||||||
|
#endif
|
||||||
GPollFD *fd_array;
|
GPollFD *fd_array;
|
||||||
GPollRec *pollrec;
|
GPollRec *pollrec;
|
||||||
|
|
||||||
gint i;
|
gint i;
|
||||||
gint npoll;
|
gint npoll;
|
||||||
|
|
||||||
#ifdef G_THREADS_ENABLED
|
#ifdef G_THREADS_ENABLED
|
||||||
#ifndef NATIVE_WIN32
|
#ifndef NATIVE_WIN32
|
||||||
if (wake_up_pipe[0] < 0)
|
if (wake_up_pipe[0] < 0)
|
||||||
@ -975,22 +1001,76 @@ g_main_poll (gint timeout,
|
|||||||
pollrec = poll_records;
|
pollrec = poll_records;
|
||||||
i = 0;
|
i = 0;
|
||||||
while (pollrec && (!use_priority || priority >= pollrec->priority))
|
while (pollrec && (!use_priority || priority >= pollrec->priority))
|
||||||
|
{
|
||||||
|
if (pollrec->fd->events)
|
||||||
{
|
{
|
||||||
fd_array[i].fd = pollrec->fd->fd;
|
fd_array[i].fd = pollrec->fd->fd;
|
||||||
fd_array[i].events = pollrec->fd->events;
|
/* In direct contradiction to the Unix98 spec, IRIX runs into
|
||||||
|
* difficulty if you pass in POLLERR, POLLHUP or POLLNVAL
|
||||||
|
* flags in the events field of the pollfd while it should
|
||||||
|
* just ignoring them. So we mask them out here.
|
||||||
|
*/
|
||||||
|
fd_array[i].events = pollrec->fd->events & ~(G_IO_ERR|G_IO_HUP|G_IO_NVAL);
|
||||||
fd_array[i].revents = 0;
|
fd_array[i].revents = 0;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
pollrec = pollrec->next;
|
pollrec = pollrec->next;
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
#ifdef G_THREADS_ENABLED
|
#ifdef G_THREADS_ENABLED
|
||||||
poll_waiting = TRUE;
|
poll_waiting = TRUE;
|
||||||
|
poll_changed = FALSE;
|
||||||
#endif
|
#endif
|
||||||
G_UNLOCK (main_loop);
|
|
||||||
npoll = i;
|
npoll = i;
|
||||||
|
if (npoll || timeout != 0)
|
||||||
|
{
|
||||||
|
#ifdef G_MAIN_POLL_DEBUG
|
||||||
|
g_print ("g_main_poll(%d) timeout: %d\r", npoll, timeout);
|
||||||
|
poll_timer = g_timer_new ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
G_UNLOCK (main_loop);
|
||||||
(*poll_func) (fd_array, npoll, timeout);
|
(*poll_func) (fd_array, npoll, timeout);
|
||||||
G_LOCK (main_loop);
|
G_LOCK (main_loop);
|
||||||
|
|
||||||
|
#ifdef G_MAIN_POLL_DEBUG
|
||||||
|
g_print ("g_main_poll(%d) timeout: %d - elapsed %12.10f seconds",
|
||||||
|
npoll,
|
||||||
|
timeout,
|
||||||
|
g_timer_elapsed (poll_timer, NULL));
|
||||||
|
g_timer_destroy (poll_timer);
|
||||||
|
pollrec = poll_records;
|
||||||
|
i = 0;
|
||||||
|
while (i < npoll)
|
||||||
|
{
|
||||||
|
if (pollrec->fd->events)
|
||||||
|
{
|
||||||
|
if (fd_array[i].revents)
|
||||||
|
{
|
||||||
|
g_print (" [%d:", fd_array[i].fd);
|
||||||
|
if (fd_array[i].revents & G_IO_IN)
|
||||||
|
g_print ("i");
|
||||||
|
if (fd_array[i].revents & G_IO_OUT)
|
||||||
|
g_print ("o");
|
||||||
|
if (fd_array[i].revents & G_IO_PRI)
|
||||||
|
g_print ("p");
|
||||||
|
if (fd_array[i].revents & G_IO_ERR)
|
||||||
|
g_print ("e");
|
||||||
|
if (fd_array[i].revents & G_IO_HUP)
|
||||||
|
g_print ("h");
|
||||||
|
if (fd_array[i].revents & G_IO_NVAL)
|
||||||
|
g_print ("n");
|
||||||
|
g_print ("]");
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
pollrec = pollrec->next;
|
||||||
|
}
|
||||||
|
g_print ("\n");
|
||||||
|
#endif
|
||||||
|
} /* if (npoll || timeout != 0) */
|
||||||
|
|
||||||
#ifdef G_THREADS_ENABLED
|
#ifdef G_THREADS_ENABLED
|
||||||
if (!poll_waiting)
|
if (!poll_waiting)
|
||||||
{
|
{
|
||||||
@ -1001,16 +1081,28 @@ g_main_poll (gint timeout,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
poll_waiting = FALSE;
|
poll_waiting = FALSE;
|
||||||
|
|
||||||
|
/* If the set of poll file descriptors changed, bail out
|
||||||
|
* and let the main loop rerun
|
||||||
|
*/
|
||||||
|
if (poll_changed)
|
||||||
|
{
|
||||||
|
g_free (fd_array);
|
||||||
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pollrec = poll_records;
|
pollrec = poll_records;
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < npoll)
|
while (i < npoll)
|
||||||
|
{
|
||||||
|
if (pollrec->fd->events)
|
||||||
{
|
{
|
||||||
pollrec->fd->revents = fd_array[i].revents;
|
pollrec->fd->revents = fd_array[i].revents;
|
||||||
pollrec = pollrec->next;
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
pollrec = pollrec->next;
|
||||||
|
}
|
||||||
|
|
||||||
g_free (fd_array);
|
g_free (fd_array);
|
||||||
}
|
}
|
||||||
@ -1061,6 +1153,13 @@ g_main_add_poll_unlocked (gint priority,
|
|||||||
newrec->next = pollrec;
|
newrec->next = pollrec;
|
||||||
|
|
||||||
n_poll_records++;
|
n_poll_records++;
|
||||||
|
|
||||||
|
#ifdef G_THREADS_ENABLED
|
||||||
|
poll_changed = TRUE;
|
||||||
|
|
||||||
|
/* Now wake up the main loop if it is waiting in the poll() */
|
||||||
|
g_main_wakeup ();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1092,6 +1191,13 @@ g_main_remove_poll (GPollFD *fd)
|
|||||||
pollrec = pollrec->next;
|
pollrec = pollrec->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef G_THREADS_ENABLED
|
||||||
|
poll_changed = TRUE;
|
||||||
|
|
||||||
|
/* Now wake up the main loop if it is waiting in the poll() */
|
||||||
|
g_main_wakeup ();
|
||||||
|
#endif
|
||||||
|
|
||||||
G_UNLOCK (main_loop);
|
G_UNLOCK (main_loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1108,12 +1214,30 @@ g_main_set_poll_func (GPollFunc func)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Wake the main loop up from a poll() */
|
||||||
|
static void
|
||||||
|
g_main_wakeup (void)
|
||||||
|
{
|
||||||
|
#ifdef G_THREADS_ENABLED
|
||||||
|
if (poll_waiting)
|
||||||
|
{
|
||||||
|
poll_waiting = FALSE;
|
||||||
|
#ifndef NATIVE_WIN32
|
||||||
|
write (wake_up_pipe[1], "A", 1);
|
||||||
|
#else
|
||||||
|
ReleaseSemaphore (wake_up_semaphore, 1, NULL);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/* Timeouts */
|
/* Timeouts */
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
g_timeout_prepare (gpointer source_data,
|
g_timeout_prepare (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout)
|
gint *timeout,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
glong msec;
|
glong msec;
|
||||||
GTimeoutData *data = source_data;
|
GTimeoutData *data = source_data;
|
||||||
@ -1128,7 +1252,8 @@ g_timeout_prepare (gpointer source_data,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
g_timeout_check (gpointer source_data,
|
g_timeout_check (gpointer source_data,
|
||||||
GTimeVal *current_time)
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GTimeoutData *data = source_data;
|
GTimeoutData *data = source_data;
|
||||||
|
|
||||||
@ -1205,7 +1330,8 @@ g_timeout_add (guint32 interval,
|
|||||||
static gboolean
|
static gboolean
|
||||||
g_idle_prepare (gpointer source_data,
|
g_idle_prepare (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout)
|
gint *timeout,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1213,7 +1339,8 @@ g_idle_prepare (gpointer source_data,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
g_idle_check (gpointer source_data,
|
g_idle_check (gpointer source_data,
|
||||||
GTimeVal *current_time)
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
10
glib/gmem.c
10
glib/gmem.c
@ -60,11 +60,11 @@
|
|||||||
|
|
||||||
#if defined(ENABLE_MEM_PROFILE) && defined(ENABLE_MEM_PROFILE_EXCLUDES_MEM_CHUNKS)
|
#if defined(ENABLE_MEM_PROFILE) && defined(ENABLE_MEM_PROFILE_EXCLUDES_MEM_CHUNKS)
|
||||||
#define ENTER_MEM_CHUNK_ROUTINE() \
|
#define ENTER_MEM_CHUNK_ROUTINE() \
|
||||||
g_static_set (allocating_for_mem_chunk, \
|
g_private_set (allocating_for_mem_chunk, \
|
||||||
g_static_get (allocating_for_mem_chunk) + 1)
|
g_private_get (allocating_for_mem_chunk) + 1)
|
||||||
#define LEAVE_MEM_CHUNK_ROUTINE() \
|
#define LEAVE_MEM_CHUNK_ROUTINE() \
|
||||||
g_static_set (allocating_for_mem_chunk, \
|
g_private_set (allocating_for_mem_chunk, \
|
||||||
g_static_get (allocating_for_mem_chunk) - 1)
|
g_private_get (allocating_for_mem_chunk) - 1)
|
||||||
#else
|
#else
|
||||||
#define ENTER_MEM_CHUNK_ROUTINE()
|
#define ENTER_MEM_CHUNK_ROUTINE()
|
||||||
#define LEAVE_MEM_CHUNK_ROUTINE()
|
#define LEAVE_MEM_CHUNK_ROUTINE()
|
||||||
@ -144,7 +144,7 @@ static gulong allocated_mem = 0;
|
|||||||
static gulong freed_mem = 0;
|
static gulong freed_mem = 0;
|
||||||
static GPrivate* allocating_for_mem_chunk = NULL;
|
static GPrivate* allocating_for_mem_chunk = NULL;
|
||||||
#define IS_IN_MEM_CHUNK_ROUTINE() \
|
#define IS_IN_MEM_CHUNK_ROUTINE() \
|
||||||
GPOINTER_TO_UINT (g_static_get (allocating_for_mem_chunk))
|
GPOINTER_TO_UINT (g_private_get (allocating_for_mem_chunk))
|
||||||
#endif /* ENABLE_MEM_PROFILE */
|
#endif /* ENABLE_MEM_PROFILE */
|
||||||
|
|
||||||
|
|
||||||
|
274
glib/gqueue.c
274
glib/gqueue.c
@ -1,5 +1,8 @@
|
|||||||
/* GLIB - Library of useful routines for C programming
|
/* GLIB - Library of useful routines for C programming
|
||||||
* Copyright (C) 1999 Free Software Foundation, Inc.
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||||
|
*
|
||||||
|
* GQueue: Double ended queue implementation, piggy backed on GList.
|
||||||
|
* Copyright (C) 1998 Tim Janik
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
@ -17,138 +20,235 @@
|
|||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MT safe
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#include "glib.h"
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <glib.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
G_LOCK_DEFINE_STATIC (queue_memchunk);
|
||||||
|
static GMemChunk *queue_memchunk = NULL;
|
||||||
|
static GTrashStack *free_queue_nodes = NULL;
|
||||||
|
|
||||||
|
GQueue*
|
||||||
GQueue *
|
g_queue_create (void)
|
||||||
g_queue_new (void)
|
|
||||||
{
|
{
|
||||||
GQueue *q = g_new (GQueue, 1);
|
GQueue *queue;
|
||||||
|
|
||||||
q->list = q->list_end = NULL;
|
G_LOCK (queue_memchunk);
|
||||||
q->list_size = 0;
|
queue = g_trash_stack_pop (&free_queue_nodes);
|
||||||
|
|
||||||
return q;
|
if (!queue)
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
g_queue_free (GQueue *q)
|
|
||||||
{
|
|
||||||
if (q)
|
|
||||||
{
|
{
|
||||||
if (q->list)
|
if (!queue_memchunk)
|
||||||
g_list_free (q->list);
|
queue_memchunk = g_mem_chunk_new ("GLib GQueue chunk",
|
||||||
g_free (q);
|
sizeof (GNode),
|
||||||
|
sizeof (GNode) * 128,
|
||||||
|
G_ALLOC_ONLY);
|
||||||
|
queue = g_chunk_new (GQueue, queue_memchunk);
|
||||||
}
|
}
|
||||||
|
G_UNLOCK (queue_memchunk);
|
||||||
|
|
||||||
|
queue->head = NULL;
|
||||||
|
queue->tail = NULL;
|
||||||
|
queue->length = 0;
|
||||||
|
|
||||||
|
return queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
guint
|
|
||||||
g_queue_get_size (GQueue *q)
|
|
||||||
{
|
|
||||||
return (q == NULL) ? 0 : q->list_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
g_queue_push_front (GQueue *q, gpointer data)
|
g_queue_free (GQueue *queue)
|
||||||
{
|
{
|
||||||
if (q)
|
g_return_if_fail (queue != NULL);
|
||||||
{
|
|
||||||
q->list = g_list_prepend (q->list, data);
|
|
||||||
|
|
||||||
if (q->list_end == NULL)
|
g_list_free (queue->head);
|
||||||
q->list_end = q->list;
|
|
||||||
|
|
||||||
q->list_size++;
|
G_LOCK (queue_memchunk);
|
||||||
}
|
g_trash_stack_push (&free_queue_nodes, queue);
|
||||||
|
G_UNLOCK (queue_memchunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
g_queue_push_head (GQueue *queue,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
g_return_if_fail (queue != NULL);
|
||||||
|
|
||||||
|
queue->head = g_list_prepend (queue->head, data);
|
||||||
|
if (!queue->tail)
|
||||||
|
queue->tail = queue->head;
|
||||||
|
queue->length++;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
g_queue_push_back (GQueue *q, gpointer data)
|
g_queue_push_head_link (GQueue *queue,
|
||||||
|
GList *link)
|
||||||
{
|
{
|
||||||
if (q)
|
g_return_if_fail (queue != NULL);
|
||||||
{
|
g_return_if_fail (link != NULL);
|
||||||
q->list_end = g_list_append (q->list_end, data);
|
g_return_if_fail (link->prev != NULL);
|
||||||
|
g_return_if_fail (link->next != NULL);
|
||||||
|
|
||||||
if (! q->list)
|
link->next = queue->head;
|
||||||
q->list = q->list_end;
|
if (queue->head)
|
||||||
|
queue->head->prev = link;
|
||||||
else
|
else
|
||||||
q->list_end = q->list_end->next;
|
queue->tail = link;
|
||||||
|
queue->head = link;
|
||||||
q->list_size++;
|
queue->length++;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
g_queue_push_tail (GQueue *queue,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
g_return_if_fail (queue != NULL);
|
||||||
|
|
||||||
|
queue->tail = g_list_append (queue->tail, data);
|
||||||
|
if (queue->tail->next)
|
||||||
|
queue->tail = queue->tail->next;
|
||||||
|
else
|
||||||
|
queue->head = queue->tail;
|
||||||
|
queue->length++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
g_queue_push_tail_link (GQueue *queue,
|
||||||
|
GList *link)
|
||||||
|
{
|
||||||
|
g_return_if_fail (queue != NULL);
|
||||||
|
g_return_if_fail (link != NULL);
|
||||||
|
g_return_if_fail (link->prev != NULL);
|
||||||
|
g_return_if_fail (link->next != NULL);
|
||||||
|
|
||||||
|
link->prev = queue->tail;
|
||||||
|
if (queue->tail)
|
||||||
|
queue->tail->next = link;
|
||||||
|
else
|
||||||
|
queue->head = link;
|
||||||
|
queue->tail = link;
|
||||||
|
queue->length++;
|
||||||
|
}
|
||||||
|
|
||||||
gpointer
|
gpointer
|
||||||
g_queue_pop_front (GQueue *q)
|
g_queue_pop_head (GQueue *queue)
|
||||||
{
|
{
|
||||||
gpointer data = NULL;
|
g_return_val_if_fail (queue != NULL, NULL);
|
||||||
|
|
||||||
if ((q) && (q->list))
|
if (queue->head)
|
||||||
{
|
{
|
||||||
GList *node;
|
GList *node = queue->head;
|
||||||
|
gpointer data = node->data;
|
||||||
|
|
||||||
node = q->list;
|
queue->head = node->next;
|
||||||
data = node->data;
|
if (queue->head)
|
||||||
|
queue->head->prev = NULL;
|
||||||
if (! node->next)
|
|
||||||
{
|
|
||||||
q->list = q->list_end = NULL;
|
|
||||||
q->list_size = 0;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
queue->tail = NULL;
|
||||||
q->list = node->next;
|
|
||||||
q->list->prev = NULL;
|
|
||||||
q->list_size--;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_list_free_1 (node);
|
g_list_free_1 (node);
|
||||||
}
|
queue->length--;
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GList*
|
||||||
|
g_queue_pop_head_link (GQueue *queue)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (queue != NULL, NULL);
|
||||||
|
|
||||||
|
if (queue->head)
|
||||||
|
{
|
||||||
|
GList *node = queue->head;
|
||||||
|
|
||||||
|
queue->head = node->next;
|
||||||
|
if (queue->head)
|
||||||
|
{
|
||||||
|
queue->head->prev = NULL;
|
||||||
|
node->next = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
queue->tail = NULL;
|
||||||
|
queue->length--;
|
||||||
|
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
gpointer
|
gpointer
|
||||||
g_queue_pop_back (GQueue *q)
|
g_queue_pop_tail (GQueue *queue)
|
||||||
{
|
{
|
||||||
gpointer data = NULL;
|
g_return_val_if_fail (queue != NULL, NULL);
|
||||||
|
|
||||||
if ((q) && (q->list))
|
if (queue->tail)
|
||||||
{
|
{
|
||||||
GList *node;
|
GList *node = queue->tail;
|
||||||
|
gpointer data = node->data;
|
||||||
|
|
||||||
node = q->list_end;
|
queue->tail = node->prev;
|
||||||
data = node->data;
|
if (queue->tail)
|
||||||
|
queue->tail->next = NULL;
|
||||||
if (! node->prev)
|
|
||||||
{
|
|
||||||
q->list = q->list_end = NULL;
|
|
||||||
q->list_size = 0;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
queue->head = NULL;
|
||||||
q->list_end = node->prev;
|
queue->length--;
|
||||||
q->list_end->next = NULL;
|
|
||||||
q->list_size--;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_list_free_1 (node);
|
g_list_free_1 (node);
|
||||||
}
|
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GList*
|
||||||
|
g_queue_pop_tail_link (GQueue *queue)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (queue != NULL, NULL);
|
||||||
|
|
||||||
|
if (queue->tail)
|
||||||
|
{
|
||||||
|
GList *node = queue->tail;
|
||||||
|
|
||||||
|
queue->tail = node->prev;
|
||||||
|
if (queue->tail)
|
||||||
|
{
|
||||||
|
queue->tail->next = NULL;
|
||||||
|
node->prev = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
queue->head = NULL;
|
||||||
|
queue->length--;
|
||||||
|
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
g_queue_is_empty (GQueue *queue)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (queue != NULL, TRUE);
|
||||||
|
|
||||||
|
return queue->head == NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
gpointer
|
||||||
|
g_queue_peek_head (GQueue *queue)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (queue != NULL, NULL);
|
||||||
|
|
||||||
|
return queue->head ? queue->head->data : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
gpointer
|
||||||
|
g_queue_peek_tail (GQueue *queue)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (queue != NULL, NULL);
|
||||||
|
|
||||||
|
return queue->tail ? queue->tail->data : NULL;
|
||||||
|
}
|
||||||
|
@ -973,7 +973,7 @@ g_scanner_unexp_token (GScanner *scanner,
|
|||||||
"%s%s `%s'",
|
"%s%s `%s'",
|
||||||
print_unexp ? "" : "invalid ",
|
print_unexp ? "" : "invalid ",
|
||||||
identifier_spec,
|
identifier_spec,
|
||||||
scanner->value.v_string);
|
scanner->token == G_TOKEN_IDENTIFIER ? scanner->value.v_string : "null");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case G_TOKEN_BINARY:
|
case G_TOKEN_BINARY:
|
||||||
@ -1075,6 +1075,10 @@ g_scanner_unexp_token (GScanner *scanner,
|
|||||||
identifier_spec);
|
identifier_spec);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case G_TOKEN_EOF:
|
||||||
|
g_snprintf (expected_string, expected_string_len, "end of file");
|
||||||
|
break;
|
||||||
|
|
||||||
case G_TOKEN_NONE:
|
case G_TOKEN_NONE:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ g_slist_pop_allocator (void)
|
|||||||
G_UNLOCK (current_allocator);
|
G_UNLOCK (current_allocator);
|
||||||
}
|
}
|
||||||
|
|
||||||
GSList*
|
inline GSList*
|
||||||
g_slist_alloc (void)
|
g_slist_alloc (void)
|
||||||
{
|
{
|
||||||
GSList *list;
|
GSList *list;
|
||||||
@ -153,7 +153,7 @@ g_slist_free (GSList *list)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
inline void
|
||||||
g_slist_free_1 (GSList *list)
|
g_slist_free_1 (GSList *list)
|
||||||
{
|
{
|
||||||
if (list)
|
if (list)
|
||||||
@ -290,7 +290,7 @@ g_slist_remove (GSList *list,
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
GSList*
|
inline GSList*
|
||||||
g_slist_remove_link (GSList *list,
|
g_slist_remove_link (GSList *list,
|
||||||
GSList *link)
|
GSList *link)
|
||||||
{
|
{
|
||||||
@ -320,6 +320,16 @@ g_slist_remove_link (GSList *list,
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GSList*
|
||||||
|
g_slist_delete_link (GSList *list,
|
||||||
|
GSList *link)
|
||||||
|
{
|
||||||
|
list = g_slist_remove_link (list, link);
|
||||||
|
g_slist_free_1 (link);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
GSList*
|
GSList*
|
||||||
g_slist_copy (GSList *list)
|
g_slist_copy (GSList *list)
|
||||||
{
|
{
|
||||||
|
@ -674,7 +674,7 @@ extern const char * strsignal(int);
|
|||||||
#else /* !GLIB_NATIVE_BEOS */
|
#else /* !GLIB_NATIVE_BEOS */
|
||||||
/* this is declared differently (const) in string.h on BeOS */
|
/* this is declared differently (const) in string.h on BeOS */
|
||||||
extern char *strsignal (int sig);
|
extern char *strsignal (int sig);
|
||||||
#endif
|
#endif /* !GLIB_NATIVE_BEOS */
|
||||||
return strsignal (signum);
|
return strsignal (signum);
|
||||||
#elif NO_SYS_SIGLIST
|
#elif NO_SYS_SIGLIST
|
||||||
switch (signum)
|
switch (signum)
|
||||||
@ -934,7 +934,7 @@ g_printf_string_upper_bound (const gchar* format,
|
|||||||
void
|
void
|
||||||
g_strdown (gchar *string)
|
g_strdown (gchar *string)
|
||||||
{
|
{
|
||||||
register gchar *s;
|
register guchar *s;
|
||||||
|
|
||||||
g_return_if_fail (string != NULL);
|
g_return_if_fail (string != NULL);
|
||||||
|
|
||||||
@ -950,7 +950,7 @@ g_strdown (gchar *string)
|
|||||||
void
|
void
|
||||||
g_strup (gchar *string)
|
g_strup (gchar *string)
|
||||||
{
|
{
|
||||||
register gchar *s;
|
register guchar *s;
|
||||||
|
|
||||||
g_return_if_fail (string != NULL);
|
g_return_if_fail (string != NULL);
|
||||||
|
|
||||||
@ -993,6 +993,9 @@ g_strcasecmp (const gchar *s1,
|
|||||||
const gchar *s2)
|
const gchar *s2)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_STRCASECMP
|
#ifdef HAVE_STRCASECMP
|
||||||
|
g_return_val_if_fail (s1 != NULL, 0);
|
||||||
|
g_return_val_if_fail (s2 != NULL, 0);
|
||||||
|
|
||||||
return strcasecmp (s1, s2);
|
return strcasecmp (s1, s2);
|
||||||
#else
|
#else
|
||||||
gint c1, c2;
|
gint c1, c2;
|
||||||
@ -1077,6 +1080,8 @@ g_strescape (gchar *string)
|
|||||||
guint escapes_needed = 0;
|
guint escapes_needed = 0;
|
||||||
gchar *p = string;
|
gchar *p = string;
|
||||||
|
|
||||||
|
g_message ("g_strescape() is deprecated");
|
||||||
|
|
||||||
g_return_val_if_fail (string != NULL, NULL);
|
g_return_val_if_fail (string != NULL, NULL);
|
||||||
|
|
||||||
while (*p != '\000')
|
while (*p != '\000')
|
||||||
@ -1108,14 +1113,14 @@ g_strescape (gchar *string)
|
|||||||
gchar*
|
gchar*
|
||||||
g_strchug (gchar *string)
|
g_strchug (gchar *string)
|
||||||
{
|
{
|
||||||
gchar *start;
|
guchar *start;
|
||||||
|
|
||||||
g_return_val_if_fail (string != NULL, NULL);
|
g_return_val_if_fail (string != NULL, NULL);
|
||||||
|
|
||||||
for (start = string; *start && isspace (*start); start++)
|
for (start = string; *start && isspace (*start); start++)
|
||||||
;
|
;
|
||||||
|
|
||||||
strcpy (string, start);
|
g_memmove(string, start, strlen(start) + 1);
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
@ -1130,7 +1135,8 @@ g_strchomp (gchar *string)
|
|||||||
if (!*string)
|
if (!*string)
|
||||||
return string;
|
return string;
|
||||||
|
|
||||||
for (s = string + strlen (string) - 1; s >= string && isspace (*s); s--)
|
for (s = string + strlen (string) - 1; s >= string && isspace ((guchar)*s);
|
||||||
|
s--)
|
||||||
*s = '\0';
|
*s = '\0';
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
@ -1213,7 +1219,7 @@ g_strjoinv (const gchar *separator,
|
|||||||
|
|
||||||
g_return_val_if_fail (str_array != NULL, NULL);
|
g_return_val_if_fail (str_array != NULL, NULL);
|
||||||
|
|
||||||
if(separator == NULL)
|
if (separator == NULL)
|
||||||
separator = "";
|
separator = "";
|
||||||
|
|
||||||
if (*str_array)
|
if (*str_array)
|
||||||
@ -1250,42 +1256,47 @@ g_strjoin (const gchar *separator,
|
|||||||
guint len;
|
guint len;
|
||||||
guint separator_len;
|
guint separator_len;
|
||||||
|
|
||||||
if(separator == NULL)
|
if (separator == NULL)
|
||||||
separator = "";
|
separator = "";
|
||||||
|
|
||||||
separator_len = strlen (separator);
|
separator_len = strlen (separator);
|
||||||
|
|
||||||
va_start(args, separator);
|
va_start (args, separator);
|
||||||
|
|
||||||
s = va_arg(args, gchar *);
|
s = va_arg (args, gchar*);
|
||||||
|
|
||||||
if(s) {
|
if (s)
|
||||||
len = strlen(s) + 1;
|
|
||||||
|
|
||||||
while((s = va_arg(args, gchar*)))
|
|
||||||
{
|
{
|
||||||
len += separator_len + strlen(s);
|
len = strlen (s);
|
||||||
|
|
||||||
|
s = va_arg (args, gchar*);
|
||||||
|
while (s)
|
||||||
|
{
|
||||||
|
len += separator_len + strlen (s);
|
||||||
|
s = va_arg (args, gchar*);
|
||||||
}
|
}
|
||||||
va_end(args);
|
va_end (args);
|
||||||
|
|
||||||
string = g_new (gchar, len);
|
|
||||||
|
|
||||||
va_start(args, separator);
|
|
||||||
|
|
||||||
|
string = g_new (gchar, len + 1);
|
||||||
*string = 0;
|
*string = 0;
|
||||||
s = va_arg(args, gchar*);
|
|
||||||
|
va_start (args, separator);
|
||||||
|
|
||||||
|
s = va_arg (args, gchar*);
|
||||||
strcat (string, s);
|
strcat (string, s);
|
||||||
|
|
||||||
while((s = va_arg(args, gchar*)))
|
s = va_arg (args, gchar*);
|
||||||
|
while (s)
|
||||||
{
|
{
|
||||||
strcat(string, separator);
|
strcat (string, separator);
|
||||||
strcat(string, s);
|
strcat (string, s);
|
||||||
|
s = va_arg (args, gchar*);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
string = g_strdup ("");
|
||||||
|
|
||||||
} else
|
va_end (args);
|
||||||
string = g_strdup("");
|
|
||||||
|
|
||||||
va_end(args);
|
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
222
glib/gstring.c
222
glib/gstring.c
@ -1,6 +1,5 @@
|
|||||||
/* GLIB - Library of useful routines for C programming
|
/* GLIB - Library of useful routines for C programming
|
||||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||||
* Portions Copyright (C) 1999 Tony Gale
|
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
@ -43,12 +42,6 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "glib.h"
|
#include "glib.h"
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
#include <io.h> /* For _read */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define G_STRING_BLOCK_SIZE 512
|
|
||||||
|
|
||||||
typedef struct _GRealStringChunk GRealStringChunk;
|
typedef struct _GRealStringChunk GRealStringChunk;
|
||||||
typedef struct _GRealString GRealString;
|
typedef struct _GRealString GRealString;
|
||||||
|
|
||||||
@ -201,7 +194,7 @@ g_string_chunk_insert_const (GStringChunk *fchunk,
|
|||||||
|
|
||||||
/* Strings.
|
/* Strings.
|
||||||
*/
|
*/
|
||||||
static gint
|
static inline gint
|
||||||
nearest_power (gint num)
|
nearest_power (gint num)
|
||||||
{
|
{
|
||||||
gint n = 1;
|
gint n = 1;
|
||||||
@ -212,17 +205,6 @@ nearest_power (gint num)
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
|
||||||
nearest_multiple (int num, const int block)
|
|
||||||
{
|
|
||||||
gint n = block;
|
|
||||||
|
|
||||||
while (n < num)
|
|
||||||
n += block;
|
|
||||||
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
g_string_maybe_expand (GRealString* string, gint len)
|
g_string_maybe_expand (GRealString* string, gint len)
|
||||||
{
|
{
|
||||||
@ -233,15 +215,6 @@ g_string_maybe_expand (GRealString* string, gint len)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
g_string_set_size (GRealString* string, gint size)
|
|
||||||
{
|
|
||||||
if (string->alloc <= size) {
|
|
||||||
string->alloc = nearest_power(size + 1);
|
|
||||||
string->str = g_realloc (string->str, string->alloc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GString*
|
GString*
|
||||||
g_string_sized_new (guint dfl_size)
|
g_string_sized_new (guint dfl_size)
|
||||||
{
|
{
|
||||||
@ -474,7 +447,7 @@ GString*
|
|||||||
g_string_down (GString *fstring)
|
g_string_down (GString *fstring)
|
||||||
{
|
{
|
||||||
GRealString *string = (GRealString*)fstring;
|
GRealString *string = (GRealString*)fstring;
|
||||||
gchar *s;
|
guchar *s;
|
||||||
|
|
||||||
g_return_val_if_fail (string != NULL, NULL);
|
g_return_val_if_fail (string != NULL, NULL);
|
||||||
|
|
||||||
@ -493,7 +466,7 @@ GString*
|
|||||||
g_string_up (GString *fstring)
|
g_string_up (GString *fstring)
|
||||||
{
|
{
|
||||||
GRealString *string = (GRealString*)fstring;
|
GRealString *string = (GRealString*)fstring;
|
||||||
gchar *s;
|
guchar *s;
|
||||||
|
|
||||||
g_return_val_if_fail (string != NULL, NULL);
|
g_return_val_if_fail (string != NULL, NULL);
|
||||||
|
|
||||||
@ -545,192 +518,3 @@ g_string_sprintfa (GString *string,
|
|||||||
g_string_sprintfa_int (string, fmt, args);
|
g_string_sprintfa_int (string, fmt, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
}
|
}
|
||||||
|
|
||||||
GStringError
|
|
||||||
g_string_readline (GString *dest_str,
|
|
||||||
gint max_length,
|
|
||||||
gint fd)
|
|
||||||
{
|
|
||||||
gint count=0, retval;
|
|
||||||
gchar c;
|
|
||||||
|
|
||||||
g_return_val_if_fail (dest_str != NULL, G_STRING_ERROR_INVAL);
|
|
||||||
g_return_val_if_fail (max_length > 0, G_STRING_ERROR_INVAL);
|
|
||||||
g_string_truncate(dest_str, 0);
|
|
||||||
|
|
||||||
for (count = 0; count < max_length; count++) {
|
|
||||||
if ( (retval = read(fd, &c, 1)) == 1 ) {
|
|
||||||
if (c == '\r') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (c == '\n') {
|
|
||||||
return(G_STRING_ERROR_NONE);
|
|
||||||
}
|
|
||||||
g_string_maybe_expand ((GRealString *) dest_str, 1);
|
|
||||||
dest_str->str[dest_str->len++] = c;
|
|
||||||
dest_str->str[dest_str->len] = 0;
|
|
||||||
} else if (retval == 0) {
|
|
||||||
return(G_STRING_ERROR_NODATA);
|
|
||||||
} else {
|
|
||||||
return(G_STRING_ERROR_READ);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return(G_STRING_ERROR_LENGTH);
|
|
||||||
}
|
|
||||||
|
|
||||||
GStringError
|
|
||||||
g_string_readline_buffered (GString *dest_str,
|
|
||||||
GString *buff_str,
|
|
||||||
gint max_length,
|
|
||||||
gint fd,
|
|
||||||
gint match_bare_cr)
|
|
||||||
{
|
|
||||||
guint count, i=0, buff_size;
|
|
||||||
|
|
||||||
g_return_val_if_fail (dest_str != NULL, G_STRING_ERROR_INVAL);
|
|
||||||
g_return_val_if_fail (buff_str != NULL, G_STRING_ERROR_INVAL);
|
|
||||||
g_return_val_if_fail (max_length > 0, G_STRING_ERROR_INVAL);
|
|
||||||
|
|
||||||
/* Make the buffer a multiple of G_STRING_BLOCK_SIZE and
|
|
||||||
* bigger then max_length */
|
|
||||||
buff_size = nearest_multiple(max_length, G_STRING_BLOCK_SIZE);
|
|
||||||
g_string_set_size( (GRealString *) buff_str, buff_size);
|
|
||||||
|
|
||||||
do {
|
|
||||||
/* Allow the buffer to empty before reading more data.
|
|
||||||
* Prevents blocking on read() when data in the buffer */
|
|
||||||
|
|
||||||
if (buff_str->len != 0) {
|
|
||||||
/* Search for a CRLF, CR or LF */
|
|
||||||
for (i = 0; i < max_length-1; i++) {
|
|
||||||
|
|
||||||
/* Look for a CR */
|
|
||||||
if (buff_str->str[i] == '\r') {
|
|
||||||
|
|
||||||
/* Check for CRLF */
|
|
||||||
if (buff_str->str[i+1] == '\n') {
|
|
||||||
buff_str->str[i] = '\0';
|
|
||||||
i++;
|
|
||||||
} else if (match_bare_cr) {
|
|
||||||
buff_str->str[i] = '\0';
|
|
||||||
} else {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Copy the line to the destination string and
|
|
||||||
* remove it from the buffer */
|
|
||||||
g_string_assign( dest_str, buff_str->str );
|
|
||||||
g_string_erase( buff_str, 0, i+1);
|
|
||||||
return (G_STRING_ERROR_NONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Look for LF */
|
|
||||||
if (buff_str->str[i] == '\n') {
|
|
||||||
buff_str->str[i] = '\0';
|
|
||||||
|
|
||||||
/* Copy the line to the destination string and
|
|
||||||
* remove it from the buffer */
|
|
||||||
g_string_assign( dest_str, buff_str->str );
|
|
||||||
g_string_erase( buff_str, 0, i+1);
|
|
||||||
return (G_STRING_ERROR_NONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If we hit a '\0' then we've exhausted the buffer */
|
|
||||||
if (buff_str->str[i] == '\0') {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Read in a block of data, appending it to the buffer */
|
|
||||||
if ( (count = read(fd, buff_str->str + buff_str->len,
|
|
||||||
buff_size - buff_str->len - 1)) < 0) {
|
|
||||||
return (G_STRING_ERROR_READ);
|
|
||||||
} else if (count == 0) {
|
|
||||||
return (G_STRING_ERROR_NODATA);
|
|
||||||
} else {
|
|
||||||
/* Fix up the buffer */
|
|
||||||
buff_str->len += count;
|
|
||||||
buff_str->str[buff_str->len] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
} while (i != max_length-1);
|
|
||||||
|
|
||||||
/* If we get here then we have reached max_length */
|
|
||||||
g_string_assign (dest_str, buff_str->str);
|
|
||||||
g_string_truncate (dest_str, max_length-1);
|
|
||||||
g_string_erase (buff_str, 0, max_length-1);
|
|
||||||
|
|
||||||
return (G_STRING_ERROR_LENGTH);
|
|
||||||
}
|
|
||||||
|
|
||||||
GList*
|
|
||||||
g_string_tokenise (GString *string,
|
|
||||||
gchar *delims,
|
|
||||||
gint max_tokens,
|
|
||||||
gint allow_empty)
|
|
||||||
{
|
|
||||||
GList *tokens=NULL;
|
|
||||||
GString *token;
|
|
||||||
gchar *current, *start, c;
|
|
||||||
guint count=1;
|
|
||||||
|
|
||||||
g_return_val_if_fail (string != NULL, NULL);
|
|
||||||
g_return_val_if_fail (delims != NULL, NULL);
|
|
||||||
|
|
||||||
if (max_tokens < 1) {
|
|
||||||
max_tokens = G_MAXINT;
|
|
||||||
}
|
|
||||||
|
|
||||||
current = string->str;
|
|
||||||
while (*current) {
|
|
||||||
/* Remove any leading delimiters */
|
|
||||||
if (!allow_empty) {
|
|
||||||
while ( *current && (strchr(delims, *current) != NULL) ) {
|
|
||||||
current++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If we've reached max_tokens, use the remaining input string
|
|
||||||
* as the last token */
|
|
||||||
if (count == max_tokens) {
|
|
||||||
token = g_string_new(current);
|
|
||||||
tokens = g_list_append(tokens, token);
|
|
||||||
return (tokens);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Find the extent of the current token */
|
|
||||||
if ( *current ) {
|
|
||||||
start = current;
|
|
||||||
while ( *current && (strchr(delims, *current) == NULL) ) {
|
|
||||||
current++;
|
|
||||||
}
|
|
||||||
c = *current;
|
|
||||||
*current = '\0';
|
|
||||||
token = g_string_new( start );
|
|
||||||
*current = c;
|
|
||||||
tokens = g_list_append(tokens, token);
|
|
||||||
count++;
|
|
||||||
if (*current) {
|
|
||||||
current++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (tokens);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
g_string_tokenise_free (GList *tokens,
|
|
||||||
gint free_token)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (free_token) {
|
|
||||||
while(tokens) {
|
|
||||||
g_string_free( (GString *) tokens->data, TRUE );
|
|
||||||
tokens = g_list_next(tokens);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
g_list_free(tokens);
|
|
||||||
}
|
|
||||||
|
@ -156,6 +156,12 @@ g_snprintf (gchar *str,
|
|||||||
retval = vsnprintf (str, n, fmt, args);
|
retval = vsnprintf (str, n, fmt, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
|
||||||
|
if (retval < 0)
|
||||||
|
{
|
||||||
|
str[n-1] = '\0';
|
||||||
|
retval = strlen (str);
|
||||||
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
#else /* !HAVE_VSNPRINTF */
|
#else /* !HAVE_VSNPRINTF */
|
||||||
gchar *printed;
|
gchar *printed;
|
||||||
@ -185,6 +191,12 @@ g_vsnprintf (gchar *str,
|
|||||||
|
|
||||||
retval = vsnprintf (str, n, fmt, args);
|
retval = vsnprintf (str, n, fmt, args);
|
||||||
|
|
||||||
|
if (retval < 0)
|
||||||
|
{
|
||||||
|
str[n-1] = '\0';
|
||||||
|
retval = strlen (str);
|
||||||
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
#else /* !HAVE_VSNPRINTF */
|
#else /* !HAVE_VSNPRINTF */
|
||||||
gchar *printed;
|
gchar *printed;
|
||||||
|
11
glist.c
11
glist.c
@ -100,7 +100,7 @@ g_list_pop_allocator (void)
|
|||||||
G_UNLOCK (current_allocator);
|
G_UNLOCK (current_allocator);
|
||||||
}
|
}
|
||||||
|
|
||||||
GList*
|
inline GList*
|
||||||
g_list_alloc (void)
|
g_list_alloc (void)
|
||||||
{
|
{
|
||||||
GList *list;
|
GList *list;
|
||||||
@ -153,7 +153,7 @@ g_list_free (GList *list)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
inline void
|
||||||
g_list_free_1 (GList *list)
|
g_list_free_1 (GList *list)
|
||||||
{
|
{
|
||||||
if (list)
|
if (list)
|
||||||
@ -293,7 +293,7 @@ g_list_remove (GList *list,
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
GList*
|
inline GList*
|
||||||
g_list_remove_link (GList *list,
|
g_list_remove_link (GList *list,
|
||||||
GList *link)
|
GList *link)
|
||||||
{
|
{
|
||||||
@ -314,9 +314,9 @@ g_list_remove_link (GList *list,
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GList*
|
GList*
|
||||||
g_list_delete (GList *list, GList *link)
|
g_list_delete_link (GList *list,
|
||||||
|
GList *link)
|
||||||
{
|
{
|
||||||
list = g_list_remove_link (list, link);
|
list = g_list_remove_link (list, link);
|
||||||
g_list_free_1 (link);
|
g_list_free_1 (link);
|
||||||
@ -324,7 +324,6 @@ g_list_delete (GList *list, GList *link)
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GList*
|
GList*
|
||||||
g_list_copy (GList *list)
|
g_list_copy (GList *list)
|
||||||
{
|
{
|
||||||
|
183
gmain.c
183
gmain.c
@ -33,6 +33,11 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
/* uncomment the next line to get poll() debugging info */
|
||||||
|
/* #define G_MAIN_POLL_DEBUG */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "glib.h"
|
#include "glib.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@ -107,20 +112,25 @@ static void g_main_poll (gint timeout,
|
|||||||
gint priority);
|
gint priority);
|
||||||
static void g_main_add_poll_unlocked (gint priority,
|
static void g_main_add_poll_unlocked (gint priority,
|
||||||
GPollFD *fd);
|
GPollFD *fd);
|
||||||
|
static void g_main_wakeup (void);
|
||||||
|
|
||||||
static gboolean g_timeout_prepare (gpointer source_data,
|
static gboolean g_timeout_prepare (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout);
|
gint *timeout,
|
||||||
|
gpointer user_data);
|
||||||
static gboolean g_timeout_check (gpointer source_data,
|
static gboolean g_timeout_check (gpointer source_data,
|
||||||
GTimeVal *current_time);
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data);
|
||||||
static gboolean g_timeout_dispatch (gpointer source_data,
|
static gboolean g_timeout_dispatch (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
static gboolean g_idle_prepare (gpointer source_data,
|
static gboolean g_idle_prepare (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout);
|
gint *timeout,
|
||||||
|
gpointer user_data);
|
||||||
static gboolean g_idle_check (gpointer source_data,
|
static gboolean g_idle_check (gpointer source_data,
|
||||||
GTimeVal *current_time);
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data);
|
||||||
static gboolean g_idle_dispatch (gpointer source_data,
|
static gboolean g_idle_dispatch (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
@ -167,9 +177,16 @@ static HANDLE wake_up_semaphore = NULL;
|
|||||||
#endif /* NATIVE_WIN32 */
|
#endif /* NATIVE_WIN32 */
|
||||||
static GPollFD wake_up_rec;
|
static GPollFD wake_up_rec;
|
||||||
static gboolean poll_waiting = FALSE;
|
static gboolean poll_waiting = FALSE;
|
||||||
|
|
||||||
|
/* Flag indicating whether the set of fd's changed during a poll */
|
||||||
|
static gboolean poll_changed = FALSE;
|
||||||
#endif /* G_THREADS_ENABLED */
|
#endif /* G_THREADS_ENABLED */
|
||||||
|
|
||||||
#ifdef HAVE_POLL
|
#ifdef HAVE_POLL
|
||||||
|
/* SunOS has poll, but doesn't provide a prototype. */
|
||||||
|
# if defined (sun) && !defined (__SVR4)
|
||||||
|
extern gint poll (GPollFD *ufds, guint nfsd, gint timeout);
|
||||||
|
# endif /* !sun */
|
||||||
static GPollFunc poll_func = (GPollFunc) poll;
|
static GPollFunc poll_func = (GPollFunc) poll;
|
||||||
#else /* !HAVE_POLL */
|
#else /* !HAVE_POLL */
|
||||||
#ifdef NATIVE_WIN32
|
#ifdef NATIVE_WIN32
|
||||||
@ -329,6 +346,9 @@ g_poll (GPollFD *fds, guint nfds, gint timeout)
|
|||||||
#ifndef NO_FD_SET
|
#ifndef NO_FD_SET
|
||||||
# define SELECT_MASK fd_set
|
# define SELECT_MASK fd_set
|
||||||
#else /* !NO_FD_SET */
|
#else /* !NO_FD_SET */
|
||||||
|
# ifndef _AIX
|
||||||
|
typedef long fd_mask;
|
||||||
|
# endif /* _AIX */
|
||||||
# ifdef _IBMR2
|
# ifdef _IBMR2
|
||||||
# define SELECT_MASK void
|
# define SELECT_MASK void
|
||||||
# else /* !_IBMR2 */
|
# else /* !_IBMR2 */
|
||||||
@ -467,17 +487,9 @@ g_source_add (gint priority,
|
|||||||
|
|
||||||
#ifdef G_THREADS_ENABLED
|
#ifdef G_THREADS_ENABLED
|
||||||
/* Now wake up the main loop if it is waiting in the poll() */
|
/* Now wake up the main loop if it is waiting in the poll() */
|
||||||
|
g_main_wakeup ();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (poll_waiting)
|
|
||||||
{
|
|
||||||
poll_waiting = FALSE;
|
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
write (wake_up_pipe[1], "A", 1);
|
|
||||||
#else
|
|
||||||
ReleaseSemaphore (wake_up_semaphore, 1, NULL);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
G_UNLOCK (main_loop);
|
G_UNLOCK (main_loop);
|
||||||
|
|
||||||
return return_val;
|
return return_val;
|
||||||
@ -707,6 +719,15 @@ g_main_iterate (gboolean block,
|
|||||||
|
|
||||||
G_LOCK (main_loop);
|
G_LOCK (main_loop);
|
||||||
|
|
||||||
|
#ifdef G_THREADS_ENABLED
|
||||||
|
if (poll_waiting)
|
||||||
|
{
|
||||||
|
g_warning("g_main_iterate(): main loop already active in another thread");
|
||||||
|
G_UNLOCK (main_loop);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
#endif G_THREADS_ENABLED
|
||||||
|
|
||||||
/* If recursing, finish up current dispatch, before starting over */
|
/* If recursing, finish up current dispatch, before starting over */
|
||||||
if (pending_dispatches)
|
if (pending_dispatches)
|
||||||
{
|
{
|
||||||
@ -725,7 +746,7 @@ g_main_iterate (gboolean block,
|
|||||||
hook = g_hook_first_valid (&source_list, TRUE);
|
hook = g_hook_first_valid (&source_list, TRUE);
|
||||||
while (hook)
|
while (hook)
|
||||||
{
|
{
|
||||||
GSource *source = (GSource *)hook;
|
GSource *source = (GSource*) hook;
|
||||||
gint source_timeout = -1;
|
gint source_timeout = -1;
|
||||||
|
|
||||||
if ((n_ready > 0) && (source->priority > current_priority))
|
if ((n_ready > 0) && (source->priority > current_priority))
|
||||||
@ -743,13 +764,14 @@ g_main_iterate (gboolean block,
|
|||||||
{
|
{
|
||||||
gboolean (*prepare) (gpointer source_data,
|
gboolean (*prepare) (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout);
|
gint *timeout,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
prepare = ((GSourceFuncs *) hook->func)->prepare;
|
prepare = ((GSourceFuncs *) hook->func)->prepare;
|
||||||
in_check_or_prepare++;
|
in_check_or_prepare++;
|
||||||
G_UNLOCK (main_loop);
|
G_UNLOCK (main_loop);
|
||||||
|
|
||||||
if ((*prepare) (source->source_data, ¤t_time, &source_timeout))
|
if ((*prepare) (source->source_data, ¤t_time, &source_timeout, source->hook.data))
|
||||||
hook->flags |= G_SOURCE_READY;
|
hook->flags |= G_SOURCE_READY;
|
||||||
|
|
||||||
G_LOCK (main_loop);
|
G_LOCK (main_loop);
|
||||||
@ -811,13 +833,14 @@ g_main_iterate (gboolean block,
|
|||||||
if (!(hook->flags & G_SOURCE_READY))
|
if (!(hook->flags & G_SOURCE_READY))
|
||||||
{
|
{
|
||||||
gboolean (*check) (gpointer source_data,
|
gboolean (*check) (gpointer source_data,
|
||||||
GTimeVal *current_time);
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
check = ((GSourceFuncs *) hook->func)->check;
|
check = ((GSourceFuncs *) hook->func)->check;
|
||||||
in_check_or_prepare++;
|
in_check_or_prepare++;
|
||||||
G_UNLOCK (main_loop);
|
G_UNLOCK (main_loop);
|
||||||
|
|
||||||
if ((*check) (source->source_data, ¤t_time))
|
if ((*check) (source->source_data, ¤t_time, source->hook.data))
|
||||||
hook->flags |= G_SOURCE_READY;
|
hook->flags |= G_SOURCE_READY;
|
||||||
|
|
||||||
G_LOCK (main_loop);
|
G_LOCK (main_loop);
|
||||||
@ -942,11 +965,14 @@ g_main_poll (gint timeout,
|
|||||||
gboolean use_priority,
|
gboolean use_priority,
|
||||||
gint priority)
|
gint priority)
|
||||||
{
|
{
|
||||||
|
#ifdef G_MAIN_POLL_DEBUG
|
||||||
|
GTimer *poll_timer;
|
||||||
|
#endif
|
||||||
GPollFD *fd_array;
|
GPollFD *fd_array;
|
||||||
GPollRec *pollrec;
|
GPollRec *pollrec;
|
||||||
|
|
||||||
gint i;
|
gint i;
|
||||||
gint npoll;
|
gint npoll;
|
||||||
|
|
||||||
#ifdef G_THREADS_ENABLED
|
#ifdef G_THREADS_ENABLED
|
||||||
#ifndef NATIVE_WIN32
|
#ifndef NATIVE_WIN32
|
||||||
if (wake_up_pipe[0] < 0)
|
if (wake_up_pipe[0] < 0)
|
||||||
@ -975,22 +1001,76 @@ g_main_poll (gint timeout,
|
|||||||
pollrec = poll_records;
|
pollrec = poll_records;
|
||||||
i = 0;
|
i = 0;
|
||||||
while (pollrec && (!use_priority || priority >= pollrec->priority))
|
while (pollrec && (!use_priority || priority >= pollrec->priority))
|
||||||
|
{
|
||||||
|
if (pollrec->fd->events)
|
||||||
{
|
{
|
||||||
fd_array[i].fd = pollrec->fd->fd;
|
fd_array[i].fd = pollrec->fd->fd;
|
||||||
fd_array[i].events = pollrec->fd->events;
|
/* In direct contradiction to the Unix98 spec, IRIX runs into
|
||||||
|
* difficulty if you pass in POLLERR, POLLHUP or POLLNVAL
|
||||||
|
* flags in the events field of the pollfd while it should
|
||||||
|
* just ignoring them. So we mask them out here.
|
||||||
|
*/
|
||||||
|
fd_array[i].events = pollrec->fd->events & ~(G_IO_ERR|G_IO_HUP|G_IO_NVAL);
|
||||||
fd_array[i].revents = 0;
|
fd_array[i].revents = 0;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
pollrec = pollrec->next;
|
pollrec = pollrec->next;
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
#ifdef G_THREADS_ENABLED
|
#ifdef G_THREADS_ENABLED
|
||||||
poll_waiting = TRUE;
|
poll_waiting = TRUE;
|
||||||
|
poll_changed = FALSE;
|
||||||
#endif
|
#endif
|
||||||
G_UNLOCK (main_loop);
|
|
||||||
npoll = i;
|
npoll = i;
|
||||||
|
if (npoll || timeout != 0)
|
||||||
|
{
|
||||||
|
#ifdef G_MAIN_POLL_DEBUG
|
||||||
|
g_print ("g_main_poll(%d) timeout: %d\r", npoll, timeout);
|
||||||
|
poll_timer = g_timer_new ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
G_UNLOCK (main_loop);
|
||||||
(*poll_func) (fd_array, npoll, timeout);
|
(*poll_func) (fd_array, npoll, timeout);
|
||||||
G_LOCK (main_loop);
|
G_LOCK (main_loop);
|
||||||
|
|
||||||
|
#ifdef G_MAIN_POLL_DEBUG
|
||||||
|
g_print ("g_main_poll(%d) timeout: %d - elapsed %12.10f seconds",
|
||||||
|
npoll,
|
||||||
|
timeout,
|
||||||
|
g_timer_elapsed (poll_timer, NULL));
|
||||||
|
g_timer_destroy (poll_timer);
|
||||||
|
pollrec = poll_records;
|
||||||
|
i = 0;
|
||||||
|
while (i < npoll)
|
||||||
|
{
|
||||||
|
if (pollrec->fd->events)
|
||||||
|
{
|
||||||
|
if (fd_array[i].revents)
|
||||||
|
{
|
||||||
|
g_print (" [%d:", fd_array[i].fd);
|
||||||
|
if (fd_array[i].revents & G_IO_IN)
|
||||||
|
g_print ("i");
|
||||||
|
if (fd_array[i].revents & G_IO_OUT)
|
||||||
|
g_print ("o");
|
||||||
|
if (fd_array[i].revents & G_IO_PRI)
|
||||||
|
g_print ("p");
|
||||||
|
if (fd_array[i].revents & G_IO_ERR)
|
||||||
|
g_print ("e");
|
||||||
|
if (fd_array[i].revents & G_IO_HUP)
|
||||||
|
g_print ("h");
|
||||||
|
if (fd_array[i].revents & G_IO_NVAL)
|
||||||
|
g_print ("n");
|
||||||
|
g_print ("]");
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
pollrec = pollrec->next;
|
||||||
|
}
|
||||||
|
g_print ("\n");
|
||||||
|
#endif
|
||||||
|
} /* if (npoll || timeout != 0) */
|
||||||
|
|
||||||
#ifdef G_THREADS_ENABLED
|
#ifdef G_THREADS_ENABLED
|
||||||
if (!poll_waiting)
|
if (!poll_waiting)
|
||||||
{
|
{
|
||||||
@ -1001,16 +1081,28 @@ g_main_poll (gint timeout,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
poll_waiting = FALSE;
|
poll_waiting = FALSE;
|
||||||
|
|
||||||
|
/* If the set of poll file descriptors changed, bail out
|
||||||
|
* and let the main loop rerun
|
||||||
|
*/
|
||||||
|
if (poll_changed)
|
||||||
|
{
|
||||||
|
g_free (fd_array);
|
||||||
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pollrec = poll_records;
|
pollrec = poll_records;
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < npoll)
|
while (i < npoll)
|
||||||
|
{
|
||||||
|
if (pollrec->fd->events)
|
||||||
{
|
{
|
||||||
pollrec->fd->revents = fd_array[i].revents;
|
pollrec->fd->revents = fd_array[i].revents;
|
||||||
pollrec = pollrec->next;
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
pollrec = pollrec->next;
|
||||||
|
}
|
||||||
|
|
||||||
g_free (fd_array);
|
g_free (fd_array);
|
||||||
}
|
}
|
||||||
@ -1061,6 +1153,13 @@ g_main_add_poll_unlocked (gint priority,
|
|||||||
newrec->next = pollrec;
|
newrec->next = pollrec;
|
||||||
|
|
||||||
n_poll_records++;
|
n_poll_records++;
|
||||||
|
|
||||||
|
#ifdef G_THREADS_ENABLED
|
||||||
|
poll_changed = TRUE;
|
||||||
|
|
||||||
|
/* Now wake up the main loop if it is waiting in the poll() */
|
||||||
|
g_main_wakeup ();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1092,6 +1191,13 @@ g_main_remove_poll (GPollFD *fd)
|
|||||||
pollrec = pollrec->next;
|
pollrec = pollrec->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef G_THREADS_ENABLED
|
||||||
|
poll_changed = TRUE;
|
||||||
|
|
||||||
|
/* Now wake up the main loop if it is waiting in the poll() */
|
||||||
|
g_main_wakeup ();
|
||||||
|
#endif
|
||||||
|
|
||||||
G_UNLOCK (main_loop);
|
G_UNLOCK (main_loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1108,12 +1214,30 @@ g_main_set_poll_func (GPollFunc func)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Wake the main loop up from a poll() */
|
||||||
|
static void
|
||||||
|
g_main_wakeup (void)
|
||||||
|
{
|
||||||
|
#ifdef G_THREADS_ENABLED
|
||||||
|
if (poll_waiting)
|
||||||
|
{
|
||||||
|
poll_waiting = FALSE;
|
||||||
|
#ifndef NATIVE_WIN32
|
||||||
|
write (wake_up_pipe[1], "A", 1);
|
||||||
|
#else
|
||||||
|
ReleaseSemaphore (wake_up_semaphore, 1, NULL);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/* Timeouts */
|
/* Timeouts */
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
g_timeout_prepare (gpointer source_data,
|
g_timeout_prepare (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout)
|
gint *timeout,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
glong msec;
|
glong msec;
|
||||||
GTimeoutData *data = source_data;
|
GTimeoutData *data = source_data;
|
||||||
@ -1128,7 +1252,8 @@ g_timeout_prepare (gpointer source_data,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
g_timeout_check (gpointer source_data,
|
g_timeout_check (gpointer source_data,
|
||||||
GTimeVal *current_time)
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GTimeoutData *data = source_data;
|
GTimeoutData *data = source_data;
|
||||||
|
|
||||||
@ -1205,7 +1330,8 @@ g_timeout_add (guint32 interval,
|
|||||||
static gboolean
|
static gboolean
|
||||||
g_idle_prepare (gpointer source_data,
|
g_idle_prepare (gpointer source_data,
|
||||||
GTimeVal *current_time,
|
GTimeVal *current_time,
|
||||||
gint *timeout)
|
gint *timeout,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1213,7 +1339,8 @@ g_idle_prepare (gpointer source_data,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
g_idle_check (gpointer source_data,
|
g_idle_check (gpointer source_data,
|
||||||
GTimeVal *current_time)
|
GTimeVal *current_time,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
10
gmem.c
10
gmem.c
@ -60,11 +60,11 @@
|
|||||||
|
|
||||||
#if defined(ENABLE_MEM_PROFILE) && defined(ENABLE_MEM_PROFILE_EXCLUDES_MEM_CHUNKS)
|
#if defined(ENABLE_MEM_PROFILE) && defined(ENABLE_MEM_PROFILE_EXCLUDES_MEM_CHUNKS)
|
||||||
#define ENTER_MEM_CHUNK_ROUTINE() \
|
#define ENTER_MEM_CHUNK_ROUTINE() \
|
||||||
g_static_set (allocating_for_mem_chunk, \
|
g_private_set (allocating_for_mem_chunk, \
|
||||||
g_static_get (allocating_for_mem_chunk) + 1)
|
g_private_get (allocating_for_mem_chunk) + 1)
|
||||||
#define LEAVE_MEM_CHUNK_ROUTINE() \
|
#define LEAVE_MEM_CHUNK_ROUTINE() \
|
||||||
g_static_set (allocating_for_mem_chunk, \
|
g_private_set (allocating_for_mem_chunk, \
|
||||||
g_static_get (allocating_for_mem_chunk) - 1)
|
g_private_get (allocating_for_mem_chunk) - 1)
|
||||||
#else
|
#else
|
||||||
#define ENTER_MEM_CHUNK_ROUTINE()
|
#define ENTER_MEM_CHUNK_ROUTINE()
|
||||||
#define LEAVE_MEM_CHUNK_ROUTINE()
|
#define LEAVE_MEM_CHUNK_ROUTINE()
|
||||||
@ -144,7 +144,7 @@ static gulong allocated_mem = 0;
|
|||||||
static gulong freed_mem = 0;
|
static gulong freed_mem = 0;
|
||||||
static GPrivate* allocating_for_mem_chunk = NULL;
|
static GPrivate* allocating_for_mem_chunk = NULL;
|
||||||
#define IS_IN_MEM_CHUNK_ROUTINE() \
|
#define IS_IN_MEM_CHUNK_ROUTINE() \
|
||||||
GPOINTER_TO_UINT (g_static_get (allocating_for_mem_chunk))
|
GPOINTER_TO_UINT (g_private_get (allocating_for_mem_chunk))
|
||||||
#endif /* ENABLE_MEM_PROFILE */
|
#endif /* ENABLE_MEM_PROFILE */
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Sat Jul 24 20:47:18 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* merged changes from GLib-1-2 branch.
|
||||||
|
|
||||||
1999-05-06 Tor Lillqvist <tml@iki.fi>
|
1999-05-06 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gmodule.c: Remove LibMain.
|
* gmodule.c: Remove LibMain.
|
||||||
@ -16,6 +20,11 @@ Wed Apr 7 20:12:58 1999 ape@lrdpf.spacetec.no (Asbjorn Pettersen)
|
|||||||
* gmodule.c (_g_module_open): Add gmodule-os2.c if G_MODULE_IMPL_OS2.
|
* gmodule.c (_g_module_open): Add gmodule-os2.c if G_MODULE_IMPL_OS2.
|
||||||
* gmoduleconf.h.in: Add G_MODULE_IMPL_OS2.
|
* gmoduleconf.h.in: Add G_MODULE_IMPL_OS2.
|
||||||
|
|
||||||
|
Fri Apr 23 09:03:48 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gmodule.c (g_module_symbol): removed inline variable assignment.
|
||||||
|
s/CHECK_ERROR/SUPPORT_OR_RETURN/ to make the code more self descriptive.
|
||||||
|
|
||||||
Wed Feb 10 12:06:30 1999 Tim Janik <timj@gtk.org>
|
Wed Feb 10 12:06:30 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmodule.c (CHECK_ERROR): be more descriptive on unsupported systems.
|
* gmodule.c (CHECK_ERROR): be more descriptive on unsupported systems.
|
||||||
|
@ -37,11 +37,11 @@ libgmodule_la_LIBADD = @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ # $(libglib)
|
|||||||
|
|
||||||
libgplugin_a_la_SOURCES = libgplugin_a.c
|
libgplugin_a_la_SOURCES = libgplugin_a.c
|
||||||
libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module
|
libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module
|
||||||
libgplugin_a_la_LIBADD = @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ @G_MODULE_PLUGIN_LIBS@ # $(libglib)
|
libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ # $(libglib)
|
||||||
|
|
||||||
libgplugin_b_la_SOURCES = libgplugin_b.c
|
libgplugin_b_la_SOURCES = libgplugin_b.c
|
||||||
libgplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module
|
libgplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module
|
||||||
libgplugin_b_la_LIBADD = @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ @G_MODULE_PLUGIN_LIBS@ # $(libglib)
|
libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ # $(libglib)
|
||||||
|
|
||||||
noinst_PROGRAMS = testgmodule
|
noinst_PROGRAMS = testgmodule
|
||||||
testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
|
testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
|
||||||
|
@ -127,7 +127,7 @@ g_module_set_error (const gchar *error)
|
|||||||
|
|
||||||
|
|
||||||
/* --- include platform specifc code --- */
|
/* --- include platform specifc code --- */
|
||||||
#define CHECK_ERROR(rv) { g_module_set_error (NULL); }
|
#define SUPPORT_OR_RETURN(rv) { g_module_set_error (NULL); }
|
||||||
#if (G_MODULE_IMPL == G_MODULE_IMPL_DL)
|
#if (G_MODULE_IMPL == G_MODULE_IMPL_DL)
|
||||||
#include "gmodule-dl.c"
|
#include "gmodule-dl.c"
|
||||||
#elif (G_MODULE_IMPL == G_MODULE_IMPL_DLD)
|
#elif (G_MODULE_IMPL == G_MODULE_IMPL_DLD)
|
||||||
@ -139,8 +139,8 @@ g_module_set_error (const gchar *error)
|
|||||||
#elif (G_MODULE_IMPL == G_MODULE_IMPL_BEOS)
|
#elif (G_MODULE_IMPL == G_MODULE_IMPL_BEOS)
|
||||||
#include "gmodule-beos.c"
|
#include "gmodule-beos.c"
|
||||||
#else
|
#else
|
||||||
#undef CHECK_ERROR
|
#undef SUPPORT_OR_RETURN
|
||||||
#define CHECK_ERROR(rv) { g_module_set_error ("dynamic modules are " \
|
#define SUPPORT_OR_RETURN(rv) { g_module_set_error ("dynamic modules are " \
|
||||||
"not supported by this system"); return rv; }
|
"not supported by this system"); return rv; }
|
||||||
static gpointer
|
static gpointer
|
||||||
_g_module_open (const gchar *file_name,
|
_g_module_open (const gchar *file_name,
|
||||||
@ -176,7 +176,7 @@ _g_module_build_path (const gchar *directory,
|
|||||||
gboolean
|
gboolean
|
||||||
g_module_supported (void)
|
g_module_supported (void)
|
||||||
{
|
{
|
||||||
CHECK_ERROR (FALSE);
|
SUPPORT_OR_RETURN (FALSE);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -188,7 +188,7 @@ g_module_open (const gchar *file_name,
|
|||||||
GModule *module;
|
GModule *module;
|
||||||
gpointer handle;
|
gpointer handle;
|
||||||
|
|
||||||
CHECK_ERROR (NULL);
|
SUPPORT_OR_RETURN (NULL);
|
||||||
|
|
||||||
if (!file_name)
|
if (!file_name)
|
||||||
{
|
{
|
||||||
@ -284,7 +284,7 @@ g_module_open (const gchar *file_name,
|
|||||||
gboolean
|
gboolean
|
||||||
g_module_close (GModule *module)
|
g_module_close (GModule *module)
|
||||||
{
|
{
|
||||||
CHECK_ERROR (FALSE);
|
SUPPORT_OR_RETURN (FALSE);
|
||||||
|
|
||||||
g_return_val_if_fail (module != NULL, FALSE);
|
g_return_val_if_fail (module != NULL, FALSE);
|
||||||
g_return_val_if_fail (module->ref_count > 0, FALSE);
|
g_return_val_if_fail (module->ref_count > 0, FALSE);
|
||||||
@ -354,9 +354,10 @@ g_module_symbol (GModule *module,
|
|||||||
gpointer *symbol)
|
gpointer *symbol)
|
||||||
{
|
{
|
||||||
gchar *module_error;
|
gchar *module_error;
|
||||||
|
|
||||||
if (symbol)
|
if (symbol)
|
||||||
*symbol = NULL;
|
*symbol = NULL;
|
||||||
CHECK_ERROR (FALSE);
|
SUPPORT_OR_RETURN (FALSE);
|
||||||
|
|
||||||
g_return_val_if_fail (module != NULL, FALSE);
|
g_return_val_if_fail (module != NULL, FALSE);
|
||||||
g_return_val_if_fail (symbol_name != NULL, FALSE);
|
g_return_val_if_fail (symbol_name != NULL, FALSE);
|
||||||
@ -374,7 +375,8 @@ g_module_symbol (GModule *module,
|
|||||||
*symbol = _g_module_symbol (module->handle, symbol_name);
|
*symbol = _g_module_symbol (module->handle, symbol_name);
|
||||||
#endif /* !G_MODULE_NEED_USCORE */
|
#endif /* !G_MODULE_NEED_USCORE */
|
||||||
|
|
||||||
if ((module_error = g_module_error()))
|
module_error = g_module_error();
|
||||||
|
if (module_error)
|
||||||
{
|
{
|
||||||
gchar *error;
|
gchar *error;
|
||||||
|
|
||||||
|
274
gqueue.c
274
gqueue.c
@ -1,5 +1,8 @@
|
|||||||
/* GLIB - Library of useful routines for C programming
|
/* GLIB - Library of useful routines for C programming
|
||||||
* Copyright (C) 1999 Free Software Foundation, Inc.
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||||
|
*
|
||||||
|
* GQueue: Double ended queue implementation, piggy backed on GList.
|
||||||
|
* Copyright (C) 1998 Tim Janik
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
@ -17,138 +20,235 @@
|
|||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MT safe
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#include "glib.h"
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <glib.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
G_LOCK_DEFINE_STATIC (queue_memchunk);
|
||||||
|
static GMemChunk *queue_memchunk = NULL;
|
||||||
|
static GTrashStack *free_queue_nodes = NULL;
|
||||||
|
|
||||||
|
GQueue*
|
||||||
GQueue *
|
g_queue_create (void)
|
||||||
g_queue_new (void)
|
|
||||||
{
|
{
|
||||||
GQueue *q = g_new (GQueue, 1);
|
GQueue *queue;
|
||||||
|
|
||||||
q->list = q->list_end = NULL;
|
G_LOCK (queue_memchunk);
|
||||||
q->list_size = 0;
|
queue = g_trash_stack_pop (&free_queue_nodes);
|
||||||
|
|
||||||
return q;
|
if (!queue)
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
g_queue_free (GQueue *q)
|
|
||||||
{
|
|
||||||
if (q)
|
|
||||||
{
|
{
|
||||||
if (q->list)
|
if (!queue_memchunk)
|
||||||
g_list_free (q->list);
|
queue_memchunk = g_mem_chunk_new ("GLib GQueue chunk",
|
||||||
g_free (q);
|
sizeof (GNode),
|
||||||
|
sizeof (GNode) * 128,
|
||||||
|
G_ALLOC_ONLY);
|
||||||
|
queue = g_chunk_new (GQueue, queue_memchunk);
|
||||||
}
|
}
|
||||||
|
G_UNLOCK (queue_memchunk);
|
||||||
|
|
||||||
|
queue->head = NULL;
|
||||||
|
queue->tail = NULL;
|
||||||
|
queue->length = 0;
|
||||||
|
|
||||||
|
return queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
guint
|
|
||||||
g_queue_get_size (GQueue *q)
|
|
||||||
{
|
|
||||||
return (q == NULL) ? 0 : q->list_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
g_queue_push_front (GQueue *q, gpointer data)
|
g_queue_free (GQueue *queue)
|
||||||
{
|
{
|
||||||
if (q)
|
g_return_if_fail (queue != NULL);
|
||||||
{
|
|
||||||
q->list = g_list_prepend (q->list, data);
|
|
||||||
|
|
||||||
if (q->list_end == NULL)
|
g_list_free (queue->head);
|
||||||
q->list_end = q->list;
|
|
||||||
|
|
||||||
q->list_size++;
|
G_LOCK (queue_memchunk);
|
||||||
}
|
g_trash_stack_push (&free_queue_nodes, queue);
|
||||||
|
G_UNLOCK (queue_memchunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
g_queue_push_head (GQueue *queue,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
g_return_if_fail (queue != NULL);
|
||||||
|
|
||||||
|
queue->head = g_list_prepend (queue->head, data);
|
||||||
|
if (!queue->tail)
|
||||||
|
queue->tail = queue->head;
|
||||||
|
queue->length++;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
g_queue_push_back (GQueue *q, gpointer data)
|
g_queue_push_head_link (GQueue *queue,
|
||||||
|
GList *link)
|
||||||
{
|
{
|
||||||
if (q)
|
g_return_if_fail (queue != NULL);
|
||||||
{
|
g_return_if_fail (link != NULL);
|
||||||
q->list_end = g_list_append (q->list_end, data);
|
g_return_if_fail (link->prev != NULL);
|
||||||
|
g_return_if_fail (link->next != NULL);
|
||||||
|
|
||||||
if (! q->list)
|
link->next = queue->head;
|
||||||
q->list = q->list_end;
|
if (queue->head)
|
||||||
|
queue->head->prev = link;
|
||||||
else
|
else
|
||||||
q->list_end = q->list_end->next;
|
queue->tail = link;
|
||||||
|
queue->head = link;
|
||||||
q->list_size++;
|
queue->length++;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
g_queue_push_tail (GQueue *queue,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
g_return_if_fail (queue != NULL);
|
||||||
|
|
||||||
|
queue->tail = g_list_append (queue->tail, data);
|
||||||
|
if (queue->tail->next)
|
||||||
|
queue->tail = queue->tail->next;
|
||||||
|
else
|
||||||
|
queue->head = queue->tail;
|
||||||
|
queue->length++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
g_queue_push_tail_link (GQueue *queue,
|
||||||
|
GList *link)
|
||||||
|
{
|
||||||
|
g_return_if_fail (queue != NULL);
|
||||||
|
g_return_if_fail (link != NULL);
|
||||||
|
g_return_if_fail (link->prev != NULL);
|
||||||
|
g_return_if_fail (link->next != NULL);
|
||||||
|
|
||||||
|
link->prev = queue->tail;
|
||||||
|
if (queue->tail)
|
||||||
|
queue->tail->next = link;
|
||||||
|
else
|
||||||
|
queue->head = link;
|
||||||
|
queue->tail = link;
|
||||||
|
queue->length++;
|
||||||
|
}
|
||||||
|
|
||||||
gpointer
|
gpointer
|
||||||
g_queue_pop_front (GQueue *q)
|
g_queue_pop_head (GQueue *queue)
|
||||||
{
|
{
|
||||||
gpointer data = NULL;
|
g_return_val_if_fail (queue != NULL, NULL);
|
||||||
|
|
||||||
if ((q) && (q->list))
|
if (queue->head)
|
||||||
{
|
{
|
||||||
GList *node;
|
GList *node = queue->head;
|
||||||
|
gpointer data = node->data;
|
||||||
|
|
||||||
node = q->list;
|
queue->head = node->next;
|
||||||
data = node->data;
|
if (queue->head)
|
||||||
|
queue->head->prev = NULL;
|
||||||
if (! node->next)
|
|
||||||
{
|
|
||||||
q->list = q->list_end = NULL;
|
|
||||||
q->list_size = 0;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
queue->tail = NULL;
|
||||||
q->list = node->next;
|
|
||||||
q->list->prev = NULL;
|
|
||||||
q->list_size--;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_list_free_1 (node);
|
g_list_free_1 (node);
|
||||||
}
|
queue->length--;
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GList*
|
||||||
|
g_queue_pop_head_link (GQueue *queue)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (queue != NULL, NULL);
|
||||||
|
|
||||||
|
if (queue->head)
|
||||||
|
{
|
||||||
|
GList *node = queue->head;
|
||||||
|
|
||||||
|
queue->head = node->next;
|
||||||
|
if (queue->head)
|
||||||
|
{
|
||||||
|
queue->head->prev = NULL;
|
||||||
|
node->next = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
queue->tail = NULL;
|
||||||
|
queue->length--;
|
||||||
|
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
gpointer
|
gpointer
|
||||||
g_queue_pop_back (GQueue *q)
|
g_queue_pop_tail (GQueue *queue)
|
||||||
{
|
{
|
||||||
gpointer data = NULL;
|
g_return_val_if_fail (queue != NULL, NULL);
|
||||||
|
|
||||||
if ((q) && (q->list))
|
if (queue->tail)
|
||||||
{
|
{
|
||||||
GList *node;
|
GList *node = queue->tail;
|
||||||
|
gpointer data = node->data;
|
||||||
|
|
||||||
node = q->list_end;
|
queue->tail = node->prev;
|
||||||
data = node->data;
|
if (queue->tail)
|
||||||
|
queue->tail->next = NULL;
|
||||||
if (! node->prev)
|
|
||||||
{
|
|
||||||
q->list = q->list_end = NULL;
|
|
||||||
q->list_size = 0;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
queue->head = NULL;
|
||||||
q->list_end = node->prev;
|
queue->length--;
|
||||||
q->list_end->next = NULL;
|
|
||||||
q->list_size--;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_list_free_1 (node);
|
g_list_free_1 (node);
|
||||||
}
|
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GList*
|
||||||
|
g_queue_pop_tail_link (GQueue *queue)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (queue != NULL, NULL);
|
||||||
|
|
||||||
|
if (queue->tail)
|
||||||
|
{
|
||||||
|
GList *node = queue->tail;
|
||||||
|
|
||||||
|
queue->tail = node->prev;
|
||||||
|
if (queue->tail)
|
||||||
|
{
|
||||||
|
queue->tail->next = NULL;
|
||||||
|
node->prev = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
queue->head = NULL;
|
||||||
|
queue->length--;
|
||||||
|
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
g_queue_is_empty (GQueue *queue)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (queue != NULL, TRUE);
|
||||||
|
|
||||||
|
return queue->head == NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
gpointer
|
||||||
|
g_queue_peek_head (GQueue *queue)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (queue != NULL, NULL);
|
||||||
|
|
||||||
|
return queue->head ? queue->head->data : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
gpointer
|
||||||
|
g_queue_peek_tail (GQueue *queue)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (queue != NULL, NULL);
|
||||||
|
|
||||||
|
return queue->tail ? queue->tail->data : NULL;
|
||||||
|
}
|
||||||
|
@ -973,7 +973,7 @@ g_scanner_unexp_token (GScanner *scanner,
|
|||||||
"%s%s `%s'",
|
"%s%s `%s'",
|
||||||
print_unexp ? "" : "invalid ",
|
print_unexp ? "" : "invalid ",
|
||||||
identifier_spec,
|
identifier_spec,
|
||||||
scanner->value.v_string);
|
scanner->token == G_TOKEN_IDENTIFIER ? scanner->value.v_string : "null");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case G_TOKEN_BINARY:
|
case G_TOKEN_BINARY:
|
||||||
@ -1075,6 +1075,10 @@ g_scanner_unexp_token (GScanner *scanner,
|
|||||||
identifier_spec);
|
identifier_spec);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case G_TOKEN_EOF:
|
||||||
|
g_snprintf (expected_string, expected_string_len, "end of file");
|
||||||
|
break;
|
||||||
|
|
||||||
case G_TOKEN_NONE:
|
case G_TOKEN_NONE:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
16
gslist.c
16
gslist.c
@ -100,7 +100,7 @@ g_slist_pop_allocator (void)
|
|||||||
G_UNLOCK (current_allocator);
|
G_UNLOCK (current_allocator);
|
||||||
}
|
}
|
||||||
|
|
||||||
GSList*
|
inline GSList*
|
||||||
g_slist_alloc (void)
|
g_slist_alloc (void)
|
||||||
{
|
{
|
||||||
GSList *list;
|
GSList *list;
|
||||||
@ -153,7 +153,7 @@ g_slist_free (GSList *list)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
inline void
|
||||||
g_slist_free_1 (GSList *list)
|
g_slist_free_1 (GSList *list)
|
||||||
{
|
{
|
||||||
if (list)
|
if (list)
|
||||||
@ -290,7 +290,7 @@ g_slist_remove (GSList *list,
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
GSList*
|
inline GSList*
|
||||||
g_slist_remove_link (GSList *list,
|
g_slist_remove_link (GSList *list,
|
||||||
GSList *link)
|
GSList *link)
|
||||||
{
|
{
|
||||||
@ -320,6 +320,16 @@ g_slist_remove_link (GSList *list,
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GSList*
|
||||||
|
g_slist_delete_link (GSList *list,
|
||||||
|
GSList *link)
|
||||||
|
{
|
||||||
|
list = g_slist_remove_link (list, link);
|
||||||
|
g_slist_free_1 (link);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
GSList*
|
GSList*
|
||||||
g_slist_copy (GSList *list)
|
g_slist_copy (GSList *list)
|
||||||
{
|
{
|
||||||
|
74
gstack.c
74
gstack.c
@ -1,74 +0,0 @@
|
|||||||
/* GLIB - Library of useful routines for C programming
|
|
||||||
* Copyright (C) 1999 Free Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Library General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Library General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Library General Public
|
|
||||||
* License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
* Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
#include <glib.h>
|
|
||||||
|
|
||||||
|
|
||||||
GStack *
|
|
||||||
g_stack_new (void)
|
|
||||||
{
|
|
||||||
GStack *s;
|
|
||||||
|
|
||||||
s = g_new (GStack, 1);
|
|
||||||
if (!s)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
s->list = NULL;
|
|
||||||
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
g_stack_free (GStack *stack)
|
|
||||||
{
|
|
||||||
if (stack)
|
|
||||||
{
|
|
||||||
if (stack->list)
|
|
||||||
g_list_free (stack->list);
|
|
||||||
|
|
||||||
g_free (stack);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
gpointer
|
|
||||||
g_stack_pop (GStack *stack)
|
|
||||||
{
|
|
||||||
gpointer data = NULL;
|
|
||||||
|
|
||||||
if ((stack) && (stack->list))
|
|
||||||
{
|
|
||||||
GList *node = stack->list;
|
|
||||||
|
|
||||||
stack->list = stack->list->next;
|
|
||||||
|
|
||||||
data = node->data;
|
|
||||||
|
|
||||||
g_list_free_1 (node);
|
|
||||||
}
|
|
||||||
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
67
gstrfuncs.c
67
gstrfuncs.c
@ -674,7 +674,7 @@ extern const char * strsignal(int);
|
|||||||
#else /* !GLIB_NATIVE_BEOS */
|
#else /* !GLIB_NATIVE_BEOS */
|
||||||
/* this is declared differently (const) in string.h on BeOS */
|
/* this is declared differently (const) in string.h on BeOS */
|
||||||
extern char *strsignal (int sig);
|
extern char *strsignal (int sig);
|
||||||
#endif
|
#endif /* !GLIB_NATIVE_BEOS */
|
||||||
return strsignal (signum);
|
return strsignal (signum);
|
||||||
#elif NO_SYS_SIGLIST
|
#elif NO_SYS_SIGLIST
|
||||||
switch (signum)
|
switch (signum)
|
||||||
@ -934,7 +934,7 @@ g_printf_string_upper_bound (const gchar* format,
|
|||||||
void
|
void
|
||||||
g_strdown (gchar *string)
|
g_strdown (gchar *string)
|
||||||
{
|
{
|
||||||
register gchar *s;
|
register guchar *s;
|
||||||
|
|
||||||
g_return_if_fail (string != NULL);
|
g_return_if_fail (string != NULL);
|
||||||
|
|
||||||
@ -950,7 +950,7 @@ g_strdown (gchar *string)
|
|||||||
void
|
void
|
||||||
g_strup (gchar *string)
|
g_strup (gchar *string)
|
||||||
{
|
{
|
||||||
register gchar *s;
|
register guchar *s;
|
||||||
|
|
||||||
g_return_if_fail (string != NULL);
|
g_return_if_fail (string != NULL);
|
||||||
|
|
||||||
@ -993,6 +993,9 @@ g_strcasecmp (const gchar *s1,
|
|||||||
const gchar *s2)
|
const gchar *s2)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_STRCASECMP
|
#ifdef HAVE_STRCASECMP
|
||||||
|
g_return_val_if_fail (s1 != NULL, 0);
|
||||||
|
g_return_val_if_fail (s2 != NULL, 0);
|
||||||
|
|
||||||
return strcasecmp (s1, s2);
|
return strcasecmp (s1, s2);
|
||||||
#else
|
#else
|
||||||
gint c1, c2;
|
gint c1, c2;
|
||||||
@ -1077,6 +1080,8 @@ g_strescape (gchar *string)
|
|||||||
guint escapes_needed = 0;
|
guint escapes_needed = 0;
|
||||||
gchar *p = string;
|
gchar *p = string;
|
||||||
|
|
||||||
|
g_message ("g_strescape() is deprecated");
|
||||||
|
|
||||||
g_return_val_if_fail (string != NULL, NULL);
|
g_return_val_if_fail (string != NULL, NULL);
|
||||||
|
|
||||||
while (*p != '\000')
|
while (*p != '\000')
|
||||||
@ -1108,14 +1113,14 @@ g_strescape (gchar *string)
|
|||||||
gchar*
|
gchar*
|
||||||
g_strchug (gchar *string)
|
g_strchug (gchar *string)
|
||||||
{
|
{
|
||||||
gchar *start;
|
guchar *start;
|
||||||
|
|
||||||
g_return_val_if_fail (string != NULL, NULL);
|
g_return_val_if_fail (string != NULL, NULL);
|
||||||
|
|
||||||
for (start = string; *start && isspace (*start); start++)
|
for (start = string; *start && isspace (*start); start++)
|
||||||
;
|
;
|
||||||
|
|
||||||
strcpy (string, start);
|
g_memmove(string, start, strlen(start) + 1);
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
@ -1130,7 +1135,8 @@ g_strchomp (gchar *string)
|
|||||||
if (!*string)
|
if (!*string)
|
||||||
return string;
|
return string;
|
||||||
|
|
||||||
for (s = string + strlen (string) - 1; s >= string && isspace (*s); s--)
|
for (s = string + strlen (string) - 1; s >= string && isspace ((guchar)*s);
|
||||||
|
s--)
|
||||||
*s = '\0';
|
*s = '\0';
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
@ -1213,7 +1219,7 @@ g_strjoinv (const gchar *separator,
|
|||||||
|
|
||||||
g_return_val_if_fail (str_array != NULL, NULL);
|
g_return_val_if_fail (str_array != NULL, NULL);
|
||||||
|
|
||||||
if(separator == NULL)
|
if (separator == NULL)
|
||||||
separator = "";
|
separator = "";
|
||||||
|
|
||||||
if (*str_array)
|
if (*str_array)
|
||||||
@ -1250,42 +1256,47 @@ g_strjoin (const gchar *separator,
|
|||||||
guint len;
|
guint len;
|
||||||
guint separator_len;
|
guint separator_len;
|
||||||
|
|
||||||
if(separator == NULL)
|
if (separator == NULL)
|
||||||
separator = "";
|
separator = "";
|
||||||
|
|
||||||
separator_len = strlen (separator);
|
separator_len = strlen (separator);
|
||||||
|
|
||||||
va_start(args, separator);
|
va_start (args, separator);
|
||||||
|
|
||||||
s = va_arg(args, gchar *);
|
s = va_arg (args, gchar*);
|
||||||
|
|
||||||
if(s) {
|
if (s)
|
||||||
len = strlen(s) + 1;
|
|
||||||
|
|
||||||
while((s = va_arg(args, gchar*)))
|
|
||||||
{
|
{
|
||||||
len += separator_len + strlen(s);
|
len = strlen (s);
|
||||||
|
|
||||||
|
s = va_arg (args, gchar*);
|
||||||
|
while (s)
|
||||||
|
{
|
||||||
|
len += separator_len + strlen (s);
|
||||||
|
s = va_arg (args, gchar*);
|
||||||
}
|
}
|
||||||
va_end(args);
|
va_end (args);
|
||||||
|
|
||||||
string = g_new (gchar, len);
|
|
||||||
|
|
||||||
va_start(args, separator);
|
|
||||||
|
|
||||||
|
string = g_new (gchar, len + 1);
|
||||||
*string = 0;
|
*string = 0;
|
||||||
s = va_arg(args, gchar*);
|
|
||||||
|
va_start (args, separator);
|
||||||
|
|
||||||
|
s = va_arg (args, gchar*);
|
||||||
strcat (string, s);
|
strcat (string, s);
|
||||||
|
|
||||||
while((s = va_arg(args, gchar*)))
|
s = va_arg (args, gchar*);
|
||||||
|
while (s)
|
||||||
{
|
{
|
||||||
strcat(string, separator);
|
strcat (string, separator);
|
||||||
strcat(string, s);
|
strcat (string, s);
|
||||||
|
s = va_arg (args, gchar*);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
string = g_strdup ("");
|
||||||
|
|
||||||
} else
|
va_end (args);
|
||||||
string = g_strdup("");
|
|
||||||
|
|
||||||
va_end(args);
|
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
222
gstring.c
222
gstring.c
@ -1,6 +1,5 @@
|
|||||||
/* GLIB - Library of useful routines for C programming
|
/* GLIB - Library of useful routines for C programming
|
||||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||||
* Portions Copyright (C) 1999 Tony Gale
|
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
@ -43,12 +42,6 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "glib.h"
|
#include "glib.h"
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
#include <io.h> /* For _read */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define G_STRING_BLOCK_SIZE 512
|
|
||||||
|
|
||||||
typedef struct _GRealStringChunk GRealStringChunk;
|
typedef struct _GRealStringChunk GRealStringChunk;
|
||||||
typedef struct _GRealString GRealString;
|
typedef struct _GRealString GRealString;
|
||||||
|
|
||||||
@ -201,7 +194,7 @@ g_string_chunk_insert_const (GStringChunk *fchunk,
|
|||||||
|
|
||||||
/* Strings.
|
/* Strings.
|
||||||
*/
|
*/
|
||||||
static gint
|
static inline gint
|
||||||
nearest_power (gint num)
|
nearest_power (gint num)
|
||||||
{
|
{
|
||||||
gint n = 1;
|
gint n = 1;
|
||||||
@ -212,17 +205,6 @@ nearest_power (gint num)
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
|
||||||
nearest_multiple (int num, const int block)
|
|
||||||
{
|
|
||||||
gint n = block;
|
|
||||||
|
|
||||||
while (n < num)
|
|
||||||
n += block;
|
|
||||||
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
g_string_maybe_expand (GRealString* string, gint len)
|
g_string_maybe_expand (GRealString* string, gint len)
|
||||||
{
|
{
|
||||||
@ -233,15 +215,6 @@ g_string_maybe_expand (GRealString* string, gint len)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
g_string_set_size (GRealString* string, gint size)
|
|
||||||
{
|
|
||||||
if (string->alloc <= size) {
|
|
||||||
string->alloc = nearest_power(size + 1);
|
|
||||||
string->str = g_realloc (string->str, string->alloc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GString*
|
GString*
|
||||||
g_string_sized_new (guint dfl_size)
|
g_string_sized_new (guint dfl_size)
|
||||||
{
|
{
|
||||||
@ -474,7 +447,7 @@ GString*
|
|||||||
g_string_down (GString *fstring)
|
g_string_down (GString *fstring)
|
||||||
{
|
{
|
||||||
GRealString *string = (GRealString*)fstring;
|
GRealString *string = (GRealString*)fstring;
|
||||||
gchar *s;
|
guchar *s;
|
||||||
|
|
||||||
g_return_val_if_fail (string != NULL, NULL);
|
g_return_val_if_fail (string != NULL, NULL);
|
||||||
|
|
||||||
@ -493,7 +466,7 @@ GString*
|
|||||||
g_string_up (GString *fstring)
|
g_string_up (GString *fstring)
|
||||||
{
|
{
|
||||||
GRealString *string = (GRealString*)fstring;
|
GRealString *string = (GRealString*)fstring;
|
||||||
gchar *s;
|
guchar *s;
|
||||||
|
|
||||||
g_return_val_if_fail (string != NULL, NULL);
|
g_return_val_if_fail (string != NULL, NULL);
|
||||||
|
|
||||||
@ -545,192 +518,3 @@ g_string_sprintfa (GString *string,
|
|||||||
g_string_sprintfa_int (string, fmt, args);
|
g_string_sprintfa_int (string, fmt, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
}
|
}
|
||||||
|
|
||||||
GStringError
|
|
||||||
g_string_readline (GString *dest_str,
|
|
||||||
gint max_length,
|
|
||||||
gint fd)
|
|
||||||
{
|
|
||||||
gint count=0, retval;
|
|
||||||
gchar c;
|
|
||||||
|
|
||||||
g_return_val_if_fail (dest_str != NULL, G_STRING_ERROR_INVAL);
|
|
||||||
g_return_val_if_fail (max_length > 0, G_STRING_ERROR_INVAL);
|
|
||||||
g_string_truncate(dest_str, 0);
|
|
||||||
|
|
||||||
for (count = 0; count < max_length; count++) {
|
|
||||||
if ( (retval = read(fd, &c, 1)) == 1 ) {
|
|
||||||
if (c == '\r') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (c == '\n') {
|
|
||||||
return(G_STRING_ERROR_NONE);
|
|
||||||
}
|
|
||||||
g_string_maybe_expand ((GRealString *) dest_str, 1);
|
|
||||||
dest_str->str[dest_str->len++] = c;
|
|
||||||
dest_str->str[dest_str->len] = 0;
|
|
||||||
} else if (retval == 0) {
|
|
||||||
return(G_STRING_ERROR_NODATA);
|
|
||||||
} else {
|
|
||||||
return(G_STRING_ERROR_READ);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return(G_STRING_ERROR_LENGTH);
|
|
||||||
}
|
|
||||||
|
|
||||||
GStringError
|
|
||||||
g_string_readline_buffered (GString *dest_str,
|
|
||||||
GString *buff_str,
|
|
||||||
gint max_length,
|
|
||||||
gint fd,
|
|
||||||
gint match_bare_cr)
|
|
||||||
{
|
|
||||||
guint count, i=0, buff_size;
|
|
||||||
|
|
||||||
g_return_val_if_fail (dest_str != NULL, G_STRING_ERROR_INVAL);
|
|
||||||
g_return_val_if_fail (buff_str != NULL, G_STRING_ERROR_INVAL);
|
|
||||||
g_return_val_if_fail (max_length > 0, G_STRING_ERROR_INVAL);
|
|
||||||
|
|
||||||
/* Make the buffer a multiple of G_STRING_BLOCK_SIZE and
|
|
||||||
* bigger then max_length */
|
|
||||||
buff_size = nearest_multiple(max_length, G_STRING_BLOCK_SIZE);
|
|
||||||
g_string_set_size( (GRealString *) buff_str, buff_size);
|
|
||||||
|
|
||||||
do {
|
|
||||||
/* Allow the buffer to empty before reading more data.
|
|
||||||
* Prevents blocking on read() when data in the buffer */
|
|
||||||
|
|
||||||
if (buff_str->len != 0) {
|
|
||||||
/* Search for a CRLF, CR or LF */
|
|
||||||
for (i = 0; i < max_length-1; i++) {
|
|
||||||
|
|
||||||
/* Look for a CR */
|
|
||||||
if (buff_str->str[i] == '\r') {
|
|
||||||
|
|
||||||
/* Check for CRLF */
|
|
||||||
if (buff_str->str[i+1] == '\n') {
|
|
||||||
buff_str->str[i] = '\0';
|
|
||||||
i++;
|
|
||||||
} else if (match_bare_cr) {
|
|
||||||
buff_str->str[i] = '\0';
|
|
||||||
} else {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Copy the line to the destination string and
|
|
||||||
* remove it from the buffer */
|
|
||||||
g_string_assign( dest_str, buff_str->str );
|
|
||||||
g_string_erase( buff_str, 0, i+1);
|
|
||||||
return (G_STRING_ERROR_NONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Look for LF */
|
|
||||||
if (buff_str->str[i] == '\n') {
|
|
||||||
buff_str->str[i] = '\0';
|
|
||||||
|
|
||||||
/* Copy the line to the destination string and
|
|
||||||
* remove it from the buffer */
|
|
||||||
g_string_assign( dest_str, buff_str->str );
|
|
||||||
g_string_erase( buff_str, 0, i+1);
|
|
||||||
return (G_STRING_ERROR_NONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If we hit a '\0' then we've exhausted the buffer */
|
|
||||||
if (buff_str->str[i] == '\0') {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Read in a block of data, appending it to the buffer */
|
|
||||||
if ( (count = read(fd, buff_str->str + buff_str->len,
|
|
||||||
buff_size - buff_str->len - 1)) < 0) {
|
|
||||||
return (G_STRING_ERROR_READ);
|
|
||||||
} else if (count == 0) {
|
|
||||||
return (G_STRING_ERROR_NODATA);
|
|
||||||
} else {
|
|
||||||
/* Fix up the buffer */
|
|
||||||
buff_str->len += count;
|
|
||||||
buff_str->str[buff_str->len] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
} while (i != max_length-1);
|
|
||||||
|
|
||||||
/* If we get here then we have reached max_length */
|
|
||||||
g_string_assign (dest_str, buff_str->str);
|
|
||||||
g_string_truncate (dest_str, max_length-1);
|
|
||||||
g_string_erase (buff_str, 0, max_length-1);
|
|
||||||
|
|
||||||
return (G_STRING_ERROR_LENGTH);
|
|
||||||
}
|
|
||||||
|
|
||||||
GList*
|
|
||||||
g_string_tokenise (GString *string,
|
|
||||||
gchar *delims,
|
|
||||||
gint max_tokens,
|
|
||||||
gint allow_empty)
|
|
||||||
{
|
|
||||||
GList *tokens=NULL;
|
|
||||||
GString *token;
|
|
||||||
gchar *current, *start, c;
|
|
||||||
guint count=1;
|
|
||||||
|
|
||||||
g_return_val_if_fail (string != NULL, NULL);
|
|
||||||
g_return_val_if_fail (delims != NULL, NULL);
|
|
||||||
|
|
||||||
if (max_tokens < 1) {
|
|
||||||
max_tokens = G_MAXINT;
|
|
||||||
}
|
|
||||||
|
|
||||||
current = string->str;
|
|
||||||
while (*current) {
|
|
||||||
/* Remove any leading delimiters */
|
|
||||||
if (!allow_empty) {
|
|
||||||
while ( *current && (strchr(delims, *current) != NULL) ) {
|
|
||||||
current++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If we've reached max_tokens, use the remaining input string
|
|
||||||
* as the last token */
|
|
||||||
if (count == max_tokens) {
|
|
||||||
token = g_string_new(current);
|
|
||||||
tokens = g_list_append(tokens, token);
|
|
||||||
return (tokens);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Find the extent of the current token */
|
|
||||||
if ( *current ) {
|
|
||||||
start = current;
|
|
||||||
while ( *current && (strchr(delims, *current) == NULL) ) {
|
|
||||||
current++;
|
|
||||||
}
|
|
||||||
c = *current;
|
|
||||||
*current = '\0';
|
|
||||||
token = g_string_new( start );
|
|
||||||
*current = c;
|
|
||||||
tokens = g_list_append(tokens, token);
|
|
||||||
count++;
|
|
||||||
if (*current) {
|
|
||||||
current++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (tokens);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
g_string_tokenise_free (GList *tokens,
|
|
||||||
gint free_token)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (free_token) {
|
|
||||||
while(tokens) {
|
|
||||||
g_string_free( (GString *) tokens->data, TRUE );
|
|
||||||
tokens = g_list_next(tokens);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
g_list_free(tokens);
|
|
||||||
}
|
|
||||||
|
@ -43,6 +43,11 @@
|
|||||||
glib-1-2/gthread/gthread-posix.c from 1999-03-03, as the current
|
glib-1-2/gthread/gthread-posix.c from 1999-03-03, as the current
|
||||||
change will take care of that too.
|
change will take care of that too.
|
||||||
|
|
||||||
|
1999-03-03 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gthread-posix.c: Fixed broken mutex_trylock and slightly broken
|
||||||
|
cond_timed_wait functions.
|
||||||
|
|
||||||
1999-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
1999-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
* testgthread.c (test_mutexes): Use new signature of
|
* testgthread.c (test_mutexes): Use new signature of
|
||||||
|
12
gutils.c
12
gutils.c
@ -156,6 +156,12 @@ g_snprintf (gchar *str,
|
|||||||
retval = vsnprintf (str, n, fmt, args);
|
retval = vsnprintf (str, n, fmt, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
|
||||||
|
if (retval < 0)
|
||||||
|
{
|
||||||
|
str[n-1] = '\0';
|
||||||
|
retval = strlen (str);
|
||||||
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
#else /* !HAVE_VSNPRINTF */
|
#else /* !HAVE_VSNPRINTF */
|
||||||
gchar *printed;
|
gchar *printed;
|
||||||
@ -185,6 +191,12 @@ g_vsnprintf (gchar *str,
|
|||||||
|
|
||||||
retval = vsnprintf (str, n, fmt, args);
|
retval = vsnprintf (str, n, fmt, args);
|
||||||
|
|
||||||
|
if (retval < 0)
|
||||||
|
{
|
||||||
|
str[n-1] = '\0';
|
||||||
|
retval = strlen (str);
|
||||||
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
#else /* !HAVE_VSNPRINTF */
|
#else /* !HAVE_VSNPRINTF */
|
||||||
gchar *printed;
|
gchar *printed;
|
||||||
|
168
ltconfig
168
ltconfig
@ -169,8 +169,8 @@ progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
|
|||||||
# Constants:
|
# Constants:
|
||||||
PROGRAM=ltconfig
|
PROGRAM=ltconfig
|
||||||
PACKAGE=libtool
|
PACKAGE=libtool
|
||||||
VERSION=1.3.2
|
VERSION=1.3.3
|
||||||
TIMESTAMP=" (1.385.2.150 1999/05/26 00:28:32)"
|
TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)"
|
||||||
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
|
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
|
||||||
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
|
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
|
||||||
rm="rm -f"
|
rm="rm -f"
|
||||||
@ -181,7 +181,8 @@ help="Try \`$progname --help' for more information."
|
|||||||
default_ofile=libtool
|
default_ofile=libtool
|
||||||
can_build_shared=yes
|
can_build_shared=yes
|
||||||
enable_shared=yes
|
enable_shared=yes
|
||||||
# All known linkers require a `.a' archive for static linking.
|
# All known linkers require a `.a' archive for static linking (except M$VC,
|
||||||
|
# which needs '.lib').
|
||||||
enable_static=yes
|
enable_static=yes
|
||||||
enable_fast_install=yes
|
enable_fast_install=yes
|
||||||
enable_dlopen=unknown
|
enable_dlopen=unknown
|
||||||
@ -201,6 +202,7 @@ need_locks=yes
|
|||||||
ac_ext=c
|
ac_ext=c
|
||||||
objext=o
|
objext=o
|
||||||
libext=a
|
libext=a
|
||||||
|
exeext=
|
||||||
cache_file=
|
cache_file=
|
||||||
|
|
||||||
old_AR="$AR"
|
old_AR="$AR"
|
||||||
@ -576,7 +578,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
|
|||||||
# Now see if the compiler is really GCC.
|
# Now see if the compiler is really GCC.
|
||||||
with_gcc=no
|
with_gcc=no
|
||||||
echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
|
echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
|
||||||
echo "$progname:579: checking whether we are using GNU C" >&5
|
echo "$progname:581: checking whether we are using GNU C" >&5
|
||||||
|
|
||||||
$rm conftest.c
|
$rm conftest.c
|
||||||
cat > conftest.c <<EOF
|
cat > conftest.c <<EOF
|
||||||
@ -584,7 +586,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
|
|||||||
yes;
|
yes;
|
||||||
#endif
|
#endif
|
||||||
EOF
|
EOF
|
||||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||||
with_gcc=yes
|
with_gcc=yes
|
||||||
fi
|
fi
|
||||||
$rm conftest.c
|
$rm conftest.c
|
||||||
@ -598,8 +600,8 @@ compiler="$2"
|
|||||||
echo $ac_n "checking for object suffix... $ac_c" 1>&6
|
echo $ac_n "checking for object suffix... $ac_c" 1>&6
|
||||||
$rm conftest*
|
$rm conftest*
|
||||||
echo 'int i = 1;' > conftest.c
|
echo 'int i = 1;' > conftest.c
|
||||||
echo "$progname:601: checking for object suffix" >& 5
|
echo "$progname:603: checking for object suffix" >& 5
|
||||||
if { (eval echo $progname:602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
|
if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
|
||||||
# Append any warnings to the config.log.
|
# Append any warnings to the config.log.
|
||||||
cat conftest.err 1>&5
|
cat conftest.err 1>&5
|
||||||
|
|
||||||
@ -617,6 +619,38 @@ fi
|
|||||||
$rm conftest*
|
$rm conftest*
|
||||||
echo "$ac_t$objext" 1>&6
|
echo "$ac_t$objext" 1>&6
|
||||||
|
|
||||||
|
echo $ac_n "checking for executable suffix... $ac_c" 1>&6
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
|
||||||
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
else
|
||||||
|
ac_cv_exeext="no"
|
||||||
|
$rm conftest*
|
||||||
|
echo 'main () { return 0; }' > conftest.c
|
||||||
|
echo "$progname:629: checking for executable suffix" >& 5
|
||||||
|
if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
|
||||||
|
# Append any warnings to the config.log.
|
||||||
|
cat conftest.err 1>&5
|
||||||
|
|
||||||
|
for ac_file in conftest.*; do
|
||||||
|
case $ac_file in
|
||||||
|
*.c | *.err | *.$objext ) ;;
|
||||||
|
*) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
else
|
||||||
|
cat conftest.err 1>&5
|
||||||
|
echo "$progname: failed program was:" >&5
|
||||||
|
cat conftest.c >&5
|
||||||
|
fi
|
||||||
|
$rm conftest*
|
||||||
|
fi
|
||||||
|
if test "X$ac_cv_exeext" = Xno; then
|
||||||
|
exeext=""
|
||||||
|
else
|
||||||
|
exeext="$ac_cv_exeext"
|
||||||
|
fi
|
||||||
|
echo "$ac_t$ac_cv_exeext" 1>&6
|
||||||
|
|
||||||
echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
|
echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
|
||||||
pic_flag=
|
pic_flag=
|
||||||
special_shlib_compile_flags=
|
special_shlib_compile_flags=
|
||||||
@ -739,8 +773,8 @@ if test -n "$pic_flag"; then
|
|||||||
echo "int some_variable = 0;" > conftest.c
|
echo "int some_variable = 0;" > conftest.c
|
||||||
save_CFLAGS="$CFLAGS"
|
save_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS $pic_flag -DPIC"
|
CFLAGS="$CFLAGS $pic_flag -DPIC"
|
||||||
echo "$progname:742: checking if $compiler PIC flag $pic_flag works" >&5
|
echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5
|
||||||
if { (eval echo $progname:743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
|
if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
|
||||||
# Append any warnings to the config.log.
|
# Append any warnings to the config.log.
|
||||||
cat conftest.err 1>&5
|
cat conftest.err 1>&5
|
||||||
|
|
||||||
@ -792,8 +826,8 @@ mkdir out
|
|||||||
chmod -w .
|
chmod -w .
|
||||||
save_CFLAGS="$CFLAGS"
|
save_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -o out/conftest2.o"
|
CFLAGS="$CFLAGS -o out/conftest2.o"
|
||||||
echo "$progname:795: checking if $compiler supports -c -o file.o" >&5
|
echo "$progname:829: checking if $compiler supports -c -o file.o" >&5
|
||||||
if { (eval echo $progname:796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
|
if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
|
||||||
|
|
||||||
# The compiler can only warn and ignore the option if not recognized
|
# The compiler can only warn and ignore the option if not recognized
|
||||||
# So say no if there are warnings
|
# So say no if there are warnings
|
||||||
@ -825,8 +859,8 @@ if test x"$compiler_c_o" = x"yes"; then
|
|||||||
echo "int some_variable = 0;" > conftest.c
|
echo "int some_variable = 0;" > conftest.c
|
||||||
save_CFLAGS="$CFLAGS"
|
save_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -c -o conftest.lo"
|
CFLAGS="$CFLAGS -c -o conftest.lo"
|
||||||
echo "$progname:828: checking if $compiler supports -c -o file.lo" >&5
|
echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5
|
||||||
if { (eval echo $progname:829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
|
if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
|
||||||
|
|
||||||
# The compiler can only warn and ignore the option if not recognized
|
# The compiler can only warn and ignore the option if not recognized
|
||||||
# So say no if there are warnings
|
# So say no if there are warnings
|
||||||
@ -877,8 +911,8 @@ if test "$with_gcc" = yes; then
|
|||||||
echo "int some_variable = 0;" > conftest.c
|
echo "int some_variable = 0;" > conftest.c
|
||||||
save_CFLAGS="$CFLAGS"
|
save_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
|
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
|
||||||
echo "$progname:880: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
|
echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
|
||||||
if { (eval echo $progname:881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
|
if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
|
||||||
|
|
||||||
# The compiler can only warn and ignore the option if not recognized
|
# The compiler can only warn and ignore the option if not recognized
|
||||||
# So say no if there are warnings
|
# So say no if there are warnings
|
||||||
@ -921,8 +955,8 @@ $rm conftest*
|
|||||||
echo 'main(){return(0);}' > conftest.c
|
echo 'main(){return(0);}' > conftest.c
|
||||||
save_LDFLAGS="$LDFLAGS"
|
save_LDFLAGS="$LDFLAGS"
|
||||||
LDFLAGS="$LDFLAGS $link_static_flag"
|
LDFLAGS="$LDFLAGS $link_static_flag"
|
||||||
echo "$progname:924: checking if $compiler static flag $link_static_flag works" >&5
|
echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5
|
||||||
if { (eval echo $progname:925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
echo "$ac_t$link_static_flag" 1>&6
|
echo "$ac_t$link_static_flag" 1>&6
|
||||||
else
|
else
|
||||||
echo "$ac_t"none 1>&6
|
echo "$ac_t"none 1>&6
|
||||||
@ -954,7 +988,7 @@ if test -z "$LD"; then
|
|||||||
if test "$with_gcc" = yes; then
|
if test "$with_gcc" = yes; then
|
||||||
# Check if gcc -print-prog-name=ld gives a path.
|
# Check if gcc -print-prog-name=ld gives a path.
|
||||||
echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
|
echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
|
||||||
echo "$progname:957: checking for ld used by GCC" >&5
|
echo "$progname:991: checking for ld used by GCC" >&5
|
||||||
ac_prog=`($CC -print-prog-name=ld) 2>&5`
|
ac_prog=`($CC -print-prog-name=ld) 2>&5`
|
||||||
case "$ac_prog" in
|
case "$ac_prog" in
|
||||||
# Accept absolute paths.
|
# Accept absolute paths.
|
||||||
@ -978,10 +1012,10 @@ if test -z "$LD"; then
|
|||||||
esac
|
esac
|
||||||
elif test "$with_gnu_ld" = yes; then
|
elif test "$with_gnu_ld" = yes; then
|
||||||
echo $ac_n "checking for GNU ld... $ac_c" 1>&6
|
echo $ac_n "checking for GNU ld... $ac_c" 1>&6
|
||||||
echo "$progname:981: checking for GNU ld" >&5
|
echo "$progname:1015: checking for GNU ld" >&5
|
||||||
else
|
else
|
||||||
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
|
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
|
||||||
echo "$progname:984: checking for non-GNU ld" >&5
|
echo "$progname:1018: checking for non-GNU ld" >&5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$LD"; then
|
if test -z "$LD"; then
|
||||||
@ -1047,7 +1081,7 @@ hardcode_minus_L=no
|
|||||||
hardcode_shlibpath_var=unsupported
|
hardcode_shlibpath_var=unsupported
|
||||||
runpath_var=
|
runpath_var=
|
||||||
always_export_symbols=no
|
always_export_symbols=no
|
||||||
export_symbols_cmds='$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
|
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
|
||||||
# include_expsyms should be a list of space-separated symbols to be *always*
|
# include_expsyms should be a list of space-separated symbols to be *always*
|
||||||
# included in the symbol list
|
# included in the symbol list
|
||||||
include_expsyms=
|
include_expsyms=
|
||||||
@ -1130,10 +1164,9 @@ EOF
|
|||||||
# Extract the symbol export list from an `--export-all' def file,
|
# Extract the symbol export list from an `--export-all' def file,
|
||||||
# then regenerate the def file from the symbol export list, so that
|
# then regenerate the def file from the symbol export list, so that
|
||||||
# the compiled dll only exports the symbol export list.
|
# the compiled dll only exports the symbol export list.
|
||||||
export_symbols_cmds='rm -f $objdir/$soname-ltdll.c~
|
export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
|
||||||
sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
|
test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
|
||||||
(cd $objdir && $CC -c $soname-ltdll.c)~
|
$DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~
|
||||||
$DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs~
|
|
||||||
sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
|
sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
|
||||||
|
|
||||||
archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
|
archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
|
||||||
@ -1142,6 +1175,8 @@ EOF
|
|||||||
echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
|
echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
|
||||||
_lt_hint=`expr 1 + \$_lt_hint`;
|
_lt_hint=`expr 1 + \$_lt_hint`;
|
||||||
done~
|
done~
|
||||||
|
test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
|
||||||
|
test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
|
||||||
$CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
|
$CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
|
||||||
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
|
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
|
||||||
$CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
|
$CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
|
||||||
@ -1554,11 +1589,11 @@ void nm_test_func(){}
|
|||||||
main(){nm_test_var='a';nm_test_func();return(0);}
|
main(){nm_test_var='a';nm_test_func();return(0);}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "$progname:1557: checking if global_symbol_pipe works" >&5
|
echo "$progname:1592: checking if global_symbol_pipe works" >&5
|
||||||
if { (eval echo $progname:1558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
|
if { (eval echo $progname:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
|
||||||
# Now try to grab the symbols.
|
# Now try to grab the symbols.
|
||||||
nlist=conftest.nm
|
nlist=conftest.nm
|
||||||
if { echo "$progname:1561: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
|
if { echo "$progname:1596: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
|
||||||
|
|
||||||
# Try sorting and uniquifying the output.
|
# Try sorting and uniquifying the output.
|
||||||
if sort "$nlist" | uniq > "$nlist"T; then
|
if sort "$nlist" | uniq > "$nlist"T; then
|
||||||
@ -1610,7 +1645,7 @@ EOF
|
|||||||
save_CFLAGS="$CFLAGS"
|
save_CFLAGS="$CFLAGS"
|
||||||
LIBS="conftstm.$objext"
|
LIBS="conftstm.$objext"
|
||||||
CFLAGS="$CFLAGS$no_builtin_flag"
|
CFLAGS="$CFLAGS$no_builtin_flag"
|
||||||
if { (eval echo $progname:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
if { (eval echo $progname:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
pipe_works=yes
|
pipe_works=yes
|
||||||
else
|
else
|
||||||
echo "$progname: failed program was:" >&5
|
echo "$progname: failed program was:" >&5
|
||||||
@ -1756,7 +1791,7 @@ bsdi4*)
|
|||||||
soname_spec='${libname}.so'
|
soname_spec='${libname}.so'
|
||||||
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
|
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
deplibs_check_method='file_magic ELF 32-bit LSB shared object'
|
deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
|
||||||
file_magic_cmd=/usr/bin/file
|
file_magic_cmd=/usr/bin/file
|
||||||
file_magic_test_file=/shlib/libc.so
|
file_magic_test_file=/shlib/libc.so
|
||||||
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
|
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
|
||||||
@ -1768,6 +1803,8 @@ bsdi4*)
|
|||||||
|
|
||||||
cygwin* | mingw*)
|
cygwin* | mingw*)
|
||||||
version_type=windows
|
version_type=windows
|
||||||
|
need_version=no
|
||||||
|
need_lib_prefix=no
|
||||||
if test "$with_gcc" = yes; then
|
if test "$with_gcc" = yes; then
|
||||||
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
|
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
|
||||||
else
|
else
|
||||||
@ -1776,7 +1813,6 @@ cygwin* | mingw*)
|
|||||||
dynamic_linker='Win32 ld.exe'
|
dynamic_linker='Win32 ld.exe'
|
||||||
deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
|
deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
|
||||||
file_magic_cmd='${OBJDUMP} -f'
|
file_magic_cmd='${OBJDUMP} -f'
|
||||||
need_lib_prefix=no
|
|
||||||
# FIXME: first we should search . and the directory the executable is in
|
# FIXME: first we should search . and the directory the executable is in
|
||||||
shlibpath_var=PATH
|
shlibpath_var=PATH
|
||||||
lt_cv_dlopen="LoadLibrary"
|
lt_cv_dlopen="LoadLibrary"
|
||||||
@ -1807,11 +1843,22 @@ freebsd*)
|
|||||||
esac
|
esac
|
||||||
finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir'
|
finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
|
case "$host_os" in
|
||||||
|
freebsd2* | freebsd3.[01]*)
|
||||||
|
shlibpath_overrides_runpath=yes
|
||||||
|
;;
|
||||||
|
*) # from 3.2 on
|
||||||
|
shlibpath_overrides_runpath=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
gnu*)
|
gnu*)
|
||||||
version_type=linux
|
version_type=linux
|
||||||
library_names_spec='${libname}${release}.so$versuffix ${libname}.so'
|
need_lib_prefix=no
|
||||||
|
need_version=no
|
||||||
|
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
|
||||||
|
soname_spec='${libname}${release}.so$major'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -2120,7 +2167,7 @@ else
|
|||||||
if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
|
if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
|
||||||
lt_cv_dlopen=no lt_cv_dlopen_libs=
|
lt_cv_dlopen=no lt_cv_dlopen_libs=
|
||||||
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
||||||
echo "$progname:2123: checking for dlopen in -ldl" >&5
|
echo "$progname:2170: checking for dlopen in -ldl" >&5
|
||||||
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@ -2128,7 +2175,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ldl $LIBS"
|
LIBS="-ldl $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2131 "ltconfig"
|
#line 2178 "ltconfig"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
builtin and then its argument prototype would still apply. */
|
builtin and then its argument prototype would still apply. */
|
||||||
@ -2138,7 +2185,7 @@ int main() {
|
|||||||
dlopen()
|
dlopen()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo $progname:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo $progname:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@ -2157,12 +2204,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|||||||
else
|
else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
|
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
|
||||||
echo "$progname:2160: checking for dlopen" >&5
|
echo "$progname:2207: checking for dlopen" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2165 "ltconfig"
|
#line 2212 "ltconfig"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char dlopen(); below. */
|
which can conflict with char dlopen(); below. */
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -2184,7 +2231,7 @@ dlopen();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo $progname:2187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo $progname:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_dlopen=yes"
|
eval "ac_cv_func_dlopen=yes"
|
||||||
else
|
else
|
||||||
@ -2201,7 +2248,7 @@ if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
|
|||||||
else
|
else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
|
echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
|
||||||
echo "$progname:2204: checking for dld_link in -ldld" >&5
|
echo "$progname:2251: checking for dld_link in -ldld" >&5
|
||||||
ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@ -2209,7 +2256,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ldld $LIBS"
|
LIBS="-ldld $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2212 "ltconfig"
|
#line 2259 "ltconfig"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
builtin and then its argument prototype would still apply. */
|
builtin and then its argument prototype would still apply. */
|
||||||
@ -2219,7 +2266,7 @@ int main() {
|
|||||||
dld_link()
|
dld_link()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo $progname:2222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo $progname:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@ -2238,12 +2285,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|||||||
else
|
else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
echo $ac_n "checking for shl_load""... $ac_c" 1>&6
|
echo $ac_n "checking for shl_load""... $ac_c" 1>&6
|
||||||
echo "$progname:2241: checking for shl_load" >&5
|
echo "$progname:2288: checking for shl_load" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2246 "ltconfig"
|
#line 2293 "ltconfig"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char shl_load(); below. */
|
which can conflict with char shl_load(); below. */
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -2265,7 +2312,7 @@ shl_load();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo $progname:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo $progname:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_shl_load=yes"
|
eval "ac_cv_func_shl_load=yes"
|
||||||
else
|
else
|
||||||
@ -2283,7 +2330,7 @@ if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
|
|||||||
else
|
else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
|
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
|
||||||
echo "$progname:2286: checking for shl_load in -ldld" >&5
|
echo "$progname:2333: checking for shl_load in -ldld" >&5
|
||||||
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@ -2291,7 +2338,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ldld $LIBS"
|
LIBS="-ldld $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2294 "ltconfig"
|
#line 2341 "ltconfig"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@ -2302,7 +2349,7 @@ int main() {
|
|||||||
shl_load()
|
shl_load()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo $progname:2305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo $progname:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@ -2345,17 +2392,17 @@ fi
|
|||||||
for ac_hdr in dlfcn.h; do
|
for ac_hdr in dlfcn.h; do
|
||||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||||
echo "$progname:2348: checking for $ac_hdr" >&5
|
echo "$progname:2395: checking for $ac_hdr" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2353 "ltconfig"
|
#line 2400 "ltconfig"
|
||||||
#include <$ac_hdr>
|
#include <$ac_hdr>
|
||||||
int fnord = 0;
|
int fnord = 0;
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo $progname:2358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo $progname:2405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@ -2383,7 +2430,7 @@ done
|
|||||||
LIBS="$lt_cv_dlopen_libs $LIBS"
|
LIBS="$lt_cv_dlopen_libs $LIBS"
|
||||||
|
|
||||||
echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
|
echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
|
||||||
echo "$progname:2386: checking whether a program can dlopen itself" >&5
|
echo "$progname:2433: checking whether a program can dlopen itself" >&5
|
||||||
if test "${lt_cv_dlopen_self+set}" = set; then
|
if test "${lt_cv_dlopen_self+set}" = set; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -2391,7 +2438,7 @@ else
|
|||||||
lt_cv_dlopen_self=cross
|
lt_cv_dlopen_self=cross
|
||||||
else
|
else
|
||||||
cat > conftest.c <<EOF
|
cat > conftest.c <<EOF
|
||||||
#line 2394 "ltconfig"
|
#line 2441 "ltconfig"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
@ -2434,10 +2481,10 @@ else
|
|||||||
fnord() { int i=42;}
|
fnord() { int i=42;}
|
||||||
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
|
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
|
||||||
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
|
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
|
||||||
if(ptr1 || ptr2) exit(0); } exit(1); }
|
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo $progname:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
if { (eval echo $progname:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||||
then
|
then
|
||||||
lt_cv_dlopen_self=yes
|
lt_cv_dlopen_self=yes
|
||||||
else
|
else
|
||||||
@ -2456,7 +2503,7 @@ echo "$ac_t""$lt_cv_dlopen_self" 1>&6
|
|||||||
if test "$lt_cv_dlopen_self" = yes; then
|
if test "$lt_cv_dlopen_self" = yes; then
|
||||||
LDFLAGS="$LDFLAGS $link_static_flag"
|
LDFLAGS="$LDFLAGS $link_static_flag"
|
||||||
echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
|
echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
|
||||||
echo "$progname:2459: checking whether a statically linked program can dlopen itself" >&5
|
echo "$progname:2506: checking whether a statically linked program can dlopen itself" >&5
|
||||||
if test "${lt_cv_dlopen_self_static+set}" = set; then
|
if test "${lt_cv_dlopen_self_static+set}" = set; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -2464,7 +2511,7 @@ else
|
|||||||
lt_cv_dlopen_self_static=cross
|
lt_cv_dlopen_self_static=cross
|
||||||
else
|
else
|
||||||
cat > conftest.c <<EOF
|
cat > conftest.c <<EOF
|
||||||
#line 2467 "ltconfig"
|
#line 2514 "ltconfig"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
@ -2507,10 +2554,10 @@ else
|
|||||||
fnord() { int i=42;}
|
fnord() { int i=42;}
|
||||||
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
|
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
|
||||||
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
|
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
|
||||||
if(ptr1 || ptr2) exit(0); } exit(1); }
|
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo $progname:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
if { (eval echo $progname:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||||
then
|
then
|
||||||
lt_cv_dlopen_self_static=yes
|
lt_cv_dlopen_self_static=yes
|
||||||
else
|
else
|
||||||
@ -2729,6 +2776,9 @@ objext="$objext"
|
|||||||
# Old archive suffix (normally "a").
|
# Old archive suffix (normally "a").
|
||||||
libext="$libext"
|
libext="$libext"
|
||||||
|
|
||||||
|
# Executable file suffix (normally "").
|
||||||
|
exeext="$exeext"
|
||||||
|
|
||||||
# Additional compiler flags for building library objects.
|
# Additional compiler flags for building library objects.
|
||||||
pic_flag=$pic_flag
|
pic_flag=$pic_flag
|
||||||
|
|
||||||
@ -2897,7 +2947,7 @@ EOF
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Append the ltmain.sh script.
|
# Append the ltmain.sh script.
|
||||||
cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
|
sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
|
||||||
|
|
||||||
chmod +x "$ofile"
|
chmod +x "$ofile"
|
||||||
;;
|
;;
|
||||||
|
182
ltmain.sh
182
ltmain.sh
@ -54,8 +54,8 @@ modename="$progname"
|
|||||||
# Constants.
|
# Constants.
|
||||||
PROGRAM=ltmain.sh
|
PROGRAM=ltmain.sh
|
||||||
PACKAGE=libtool
|
PACKAGE=libtool
|
||||||
VERSION=1.3.2
|
VERSION=1.3.3
|
||||||
TIMESTAMP=" (1.385.2.150 1999/05/26 00:28:32)"
|
TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)"
|
||||||
|
|
||||||
default_mode=
|
default_mode=
|
||||||
help="Try \`$progname --help' for more information."
|
help="Try \`$progname --help' for more information."
|
||||||
@ -69,7 +69,7 @@ rm="rm -f"
|
|||||||
Xsed='sed -e 1s/^X//'
|
Xsed='sed -e 1s/^X//'
|
||||||
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
|
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
|
||||||
SP2NL='tr \040 \012'
|
SP2NL='tr \040 \012'
|
||||||
NL2SP='tr \012 \040'
|
NL2SP='tr \015\012 \040\040'
|
||||||
|
|
||||||
# NLS nuisances.
|
# NLS nuisances.
|
||||||
# Only set LANG and LC_ALL to C if already set.
|
# Only set LANG and LC_ALL to C if already set.
|
||||||
@ -638,6 +638,12 @@ compiler."
|
|||||||
# #undef WIN32_LEAN_AND_MEAN
|
# #undef WIN32_LEAN_AND_MEAN
|
||||||
# #include <stdio.h>
|
# #include <stdio.h>
|
||||||
#
|
#
|
||||||
|
# #ifndef __CYGWIN__
|
||||||
|
# # ifdef __CYGWIN32__
|
||||||
|
# # define __CYGWIN__ __CYGWIN32__
|
||||||
|
# # endif
|
||||||
|
# #endif
|
||||||
|
#
|
||||||
# #ifdef __cplusplus
|
# #ifdef __cplusplus
|
||||||
# extern "C" {
|
# extern "C" {
|
||||||
# #endif
|
# #endif
|
||||||
@ -646,8 +652,10 @@ compiler."
|
|||||||
# }
|
# }
|
||||||
# #endif
|
# #endif
|
||||||
#
|
#
|
||||||
|
# #ifdef __CYGWIN__
|
||||||
# #include <cygwin/cygwin_dll.h>
|
# #include <cygwin/cygwin_dll.h>
|
||||||
# DECLARE_CYGWIN_DLL( DllMain );
|
# DECLARE_CYGWIN_DLL( DllMain );
|
||||||
|
# #endif
|
||||||
# HINSTANCE __hDllInstance_base;
|
# HINSTANCE __hDllInstance_base;
|
||||||
#
|
#
|
||||||
# BOOL APIENTRY
|
# BOOL APIENTRY
|
||||||
@ -790,9 +798,6 @@ compiler."
|
|||||||
# }
|
# }
|
||||||
# /* impgen.c ends here */
|
# /* impgen.c ends here */
|
||||||
;;
|
;;
|
||||||
*-*-beos*)
|
|
||||||
allow_undefined=no
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
allow_undefined=yes
|
allow_undefined=yes
|
||||||
;;
|
;;
|
||||||
@ -896,6 +901,14 @@ compiler."
|
|||||||
fi
|
fi
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
*.la | *.lo) ;; # We handle these cases below.
|
*.la | *.lo) ;; # We handle these cases below.
|
||||||
|
force)
|
||||||
|
if test "$dlself" = no; then
|
||||||
|
dlself=needless
|
||||||
|
export_dynamic=yes
|
||||||
|
fi
|
||||||
|
prev=
|
||||||
|
continue
|
||||||
|
;;
|
||||||
self)
|
self)
|
||||||
if test "$prev" = dlprefiles; then
|
if test "$prev" = dlprefiles; then
|
||||||
dlself=yes
|
dlself=yes
|
||||||
@ -1225,7 +1238,7 @@ compiler."
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "$dependency_libs"; then
|
if test -n "$dependency_libs"; then
|
||||||
# Extract -R from dependency_libs
|
# Extract -R and -L from dependency_libs
|
||||||
temp_deplibs=
|
temp_deplibs=
|
||||||
for deplib in $dependency_libs; do
|
for deplib in $dependency_libs; do
|
||||||
case "$deplib" in
|
case "$deplib" in
|
||||||
@ -1237,7 +1250,13 @@ compiler."
|
|||||||
-L*) case "$compile_command $temp_deplibs " in
|
-L*) case "$compile_command $temp_deplibs " in
|
||||||
*" $deplib "*) ;;
|
*" $deplib "*) ;;
|
||||||
*) temp_deplibs="$temp_deplibs $deplib";;
|
*) temp_deplibs="$temp_deplibs $deplib";;
|
||||||
esac;;
|
esac
|
||||||
|
temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'`
|
||||||
|
case " $lib_search_path " in
|
||||||
|
*" $temp_dir "*) ;;
|
||||||
|
*) lib_search_path="$lib_search_path $temp_dir";;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
*) temp_deplibs="$temp_deplibs $deplib";;
|
*) temp_deplibs="$temp_deplibs $deplib";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@ -2040,10 +2059,36 @@ EOF
|
|||||||
# Use standard objects if they are pic
|
# Use standard objects if they are pic
|
||||||
test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
|
test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
|
||||||
|
|
||||||
if test -n "$whole_archive_flag_spec"; then
|
# Prepare the list of exported symbols
|
||||||
if test -n "$convenience"; then
|
if test -z "$export_symbols"; then
|
||||||
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
|
if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
|
||||||
|
$show "generating symbol list for \`$libname.la'"
|
||||||
|
export_symbols="$output_objdir/$libname.exp"
|
||||||
|
$run $rm $export_symbols
|
||||||
|
eval cmds=\"$export_symbols_cmds\"
|
||||||
|
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
|
||||||
|
for cmd in $cmds; do
|
||||||
|
IFS="$save_ifs"
|
||||||
|
$show "$cmd"
|
||||||
|
$run eval "$cmd" || exit $?
|
||||||
|
done
|
||||||
|
IFS="$save_ifs"
|
||||||
|
if test -n "$export_symbols_regex"; then
|
||||||
|
$show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
|
||||||
|
$run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
|
||||||
|
$show "$mv \"${export_symbols}T\" \"$export_symbols\""
|
||||||
|
$run eval '$mv "${export_symbols}T" "$export_symbols"'
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$export_symbols" && test -n "$include_expsyms"; then
|
||||||
|
$run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$convenience"; then
|
||||||
|
if test -n "$whole_archive_flag_spec"; then
|
||||||
|
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
|
||||||
else
|
else
|
||||||
gentop="$output_objdir/${outputname}x"
|
gentop="$output_objdir/${outputname}x"
|
||||||
$show "${rm}r $gentop"
|
$show "${rm}r $gentop"
|
||||||
@ -2079,39 +2124,13 @@ EOF
|
|||||||
libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
|
libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
|
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
|
||||||
eval flag=\"$thread_safe_flag_spec\"
|
eval flag=\"$thread_safe_flag_spec\"
|
||||||
linkopts="$linkopts $flag"
|
linkopts="$linkopts $flag"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare the list of exported symbols
|
|
||||||
if test -z "$export_symbols"; then
|
|
||||||
if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
|
|
||||||
$show "generating symbol list for \`$libname.la'"
|
|
||||||
export_symbols="$output_objdir/$libname.exp"
|
|
||||||
$run $rm $export_symbols
|
|
||||||
eval cmds=\"$export_symbols_cmds\"
|
|
||||||
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
|
|
||||||
for cmd in $cmds; do
|
|
||||||
IFS="$save_ifs"
|
|
||||||
$show "$cmd"
|
|
||||||
$run eval "$cmd" || exit $?
|
|
||||||
done
|
|
||||||
IFS="$save_ifs"
|
|
||||||
if test -n "$export_symbols_regex"; then
|
|
||||||
$show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
|
|
||||||
$run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
|
|
||||||
$show "$mv \"${export_symbols}T\" \"$export_symbols\""
|
|
||||||
$run eval '$mv "${export_symbols}T" "$export_symbols"'
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -n "$export_symbols" && test -n "$include_expsyms"; then
|
|
||||||
$run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Do each of the archive commands.
|
# Do each of the archive commands.
|
||||||
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
|
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
|
||||||
eval cmds=\"$archive_expsym_cmds\"
|
eval cmds=\"$archive_expsym_cmds\"
|
||||||
@ -2190,8 +2209,58 @@ EOF
|
|||||||
# Delete the old objects.
|
# Delete the old objects.
|
||||||
$run $rm $obj $libobj
|
$run $rm $obj $libobj
|
||||||
|
|
||||||
|
# Objects from convenience libraries. This assumes
|
||||||
|
# single-version convenience libraries. Whenever we create
|
||||||
|
# different ones for PIC/non-PIC, this we'll have to duplicate
|
||||||
|
# the extraction.
|
||||||
|
reload_conv_objs=
|
||||||
|
gentop=
|
||||||
|
# reload_cmds runs $LD directly, so let us get rid of
|
||||||
|
# -Wl from whole_archive_flag_spec
|
||||||
|
wl=
|
||||||
|
|
||||||
|
if test -n "$convenience"; then
|
||||||
|
if test -n "$whole_archive_flag_spec"; then
|
||||||
|
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
|
||||||
|
else
|
||||||
|
gentop="$output_objdir/${obj}x"
|
||||||
|
$show "${rm}r $gentop"
|
||||||
|
$run ${rm}r "$gentop"
|
||||||
|
$show "mkdir $gentop"
|
||||||
|
$run mkdir "$gentop"
|
||||||
|
status=$?
|
||||||
|
if test $status -ne 0 && test ! -d "$gentop"; then
|
||||||
|
exit $status
|
||||||
|
fi
|
||||||
|
generated="$generated $gentop"
|
||||||
|
|
||||||
|
for xlib in $convenience; do
|
||||||
|
# Extract the objects.
|
||||||
|
case "$xlib" in
|
||||||
|
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
|
||||||
|
*) xabs=`pwd`"/$xlib" ;;
|
||||||
|
esac
|
||||||
|
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
|
||||||
|
xdir="$gentop/$xlib"
|
||||||
|
|
||||||
|
$show "${rm}r $xdir"
|
||||||
|
$run ${rm}r "$xdir"
|
||||||
|
$show "mkdir $xdir"
|
||||||
|
$run mkdir "$xdir"
|
||||||
|
status=$?
|
||||||
|
if test $status -ne 0 && test ! -d "$xdir"; then
|
||||||
|
exit $status
|
||||||
|
fi
|
||||||
|
$show "(cd $xdir && $AR x $xabs)"
|
||||||
|
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
|
||||||
|
|
||||||
|
reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Create the old-style object.
|
# Create the old-style object.
|
||||||
reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
|
reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs"
|
||||||
|
|
||||||
output="$obj"
|
output="$obj"
|
||||||
eval cmds=\"$reload_cmds\"
|
eval cmds=\"$reload_cmds\"
|
||||||
@ -2204,9 +2273,21 @@ EOF
|
|||||||
IFS="$save_ifs"
|
IFS="$save_ifs"
|
||||||
|
|
||||||
# Exit if we aren't doing a library object file.
|
# Exit if we aren't doing a library object file.
|
||||||
test -z "$libobj" && exit 0
|
if test -z "$libobj"; then
|
||||||
|
if test -n "$gentop"; then
|
||||||
|
$show "${rm}r $gentop"
|
||||||
|
$run ${rm}r $gentop
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$build_libtool_libs" != yes; then
|
if test "$build_libtool_libs" != yes; then
|
||||||
|
if test -n "$gentop"; then
|
||||||
|
$show "${rm}r $gentop"
|
||||||
|
$run ${rm}r $gentop
|
||||||
|
fi
|
||||||
|
|
||||||
# Create an invalid libtool object if no PIC, so that we don't
|
# Create an invalid libtool object if no PIC, so that we don't
|
||||||
# accidentally link it into a program.
|
# accidentally link it into a program.
|
||||||
$show "echo timestamp > $libobj"
|
$show "echo timestamp > $libobj"
|
||||||
@ -2216,7 +2297,7 @@ EOF
|
|||||||
|
|
||||||
if test -n "$pic_flag"; then
|
if test -n "$pic_flag"; then
|
||||||
# Only do commands if we really have different PIC objects.
|
# Only do commands if we really have different PIC objects.
|
||||||
reload_objs="$libobjs"
|
reload_objs="$libobjs $reload_conv_objs"
|
||||||
output="$libobj"
|
output="$libobj"
|
||||||
eval cmds=\"$reload_cmds\"
|
eval cmds=\"$reload_cmds\"
|
||||||
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
|
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
|
||||||
@ -2234,6 +2315,11 @@ EOF
|
|||||||
$run $LN_S $obj $libobj || exit $?
|
$run $LN_S $obj $libobj || exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -n "$gentop"; then
|
||||||
|
$show "${rm}r $gentop"
|
||||||
|
$run ${rm}r $gentop
|
||||||
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -2366,7 +2452,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dlsyms=
|
dlsyms=
|
||||||
if test -n "$dlfiles$dlprefiles" || test "$dlself" = yes; then
|
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
|
||||||
if test -n "$NM" && test -n "$global_symbol_pipe"; then
|
if test -n "$NM" && test -n "$global_symbol_pipe"; then
|
||||||
dlsyms="${outputname}S.c"
|
dlsyms="${outputname}S.c"
|
||||||
else
|
else
|
||||||
@ -2779,7 +2865,7 @@ else
|
|||||||
fi"
|
fi"
|
||||||
else
|
else
|
||||||
echo >> $output "\
|
echo >> $output "\
|
||||||
program='$outputname'
|
program='$outputname$exeext'
|
||||||
progdir=\"\$thisdir/$objdir\"
|
progdir=\"\$thisdir/$objdir\"
|
||||||
"
|
"
|
||||||
fi
|
fi
|
||||||
@ -3204,13 +3290,11 @@ libdir='$install_libdir'\
|
|||||||
# Install the shared library and build the symlinks.
|
# Install the shared library and build the symlinks.
|
||||||
$show "$install_prog $dir/$realname $destdir/$realname"
|
$show "$install_prog $dir/$realname $destdir/$realname"
|
||||||
$run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
|
$run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
|
||||||
test "X$dlname" = "X$realname" && dlname=
|
|
||||||
|
|
||||||
if test $# -gt 0; then
|
if test $# -gt 0; then
|
||||||
# Delete the old symlinks, and create new ones.
|
# Delete the old symlinks, and create new ones.
|
||||||
for linkname
|
for linkname
|
||||||
do
|
do
|
||||||
test "X$dlname" = "X$linkname" && dlname=
|
|
||||||
if test "$linkname" != "$realname"; then
|
if test "$linkname" != "$realname"; then
|
||||||
$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
|
$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
|
||||||
$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
|
$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
|
||||||
@ -3218,12 +3302,6 @@ libdir='$install_libdir'\
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "$dlname"; then
|
|
||||||
# Install the dynamically-loadable library.
|
|
||||||
$show "$install_prog $dir/$dlname $destdir/$dlname"
|
|
||||||
$run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $?
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Do each command in the postinstall commands.
|
# Do each command in the postinstall commands.
|
||||||
lib="$destdir/$realname"
|
lib="$destdir/$realname"
|
||||||
eval cmds=\"$postinstall_cmds\"
|
eval cmds=\"$postinstall_cmds\"
|
||||||
@ -3655,9 +3733,7 @@ libdir='$install_libdir'\
|
|||||||
# Delete the libtool libraries and symlinks.
|
# Delete the libtool libraries and symlinks.
|
||||||
for n in $library_names; do
|
for n in $library_names; do
|
||||||
rmfiles="$rmfiles $dir/$n"
|
rmfiles="$rmfiles $dir/$n"
|
||||||
test "X$n" = "X$dlname" && dlname=
|
|
||||||
done
|
done
|
||||||
test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname"
|
|
||||||
test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
|
test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
|
||||||
|
|
||||||
$show "$rm $rmfiles"
|
$show "$rm $rmfiles"
|
||||||
|
@ -13,7 +13,7 @@ echo "Checking glib-$VERSION.tar.gz..."
|
|||||||
tar xfz glib-$VERSION.tar.gz
|
tar xfz glib-$VERSION.tar.gz
|
||||||
|
|
||||||
|
|
||||||
for file in README NEWS glib.spec docs/glib-config.1
|
for file in INSTALL NEWS README glib.spec docs/glib-config.1
|
||||||
do
|
do
|
||||||
echo -n "$file... "
|
echo -n "$file... "
|
||||||
if [ "x`grep $VERSION glib-$VERSION/$file | wc -l | awk -F' ' '{print $1}'`" == "x1" ]; then
|
if [ "x`grep $VERSION glib-$VERSION/$file | wc -l | awk -F' ' '{print $1}'`" == "x1" ]; then
|
||||||
|
@ -34,7 +34,6 @@ dirname-test
|
|||||||
type-test
|
type-test
|
||||||
strfunc-test
|
strfunc-test
|
||||||
queue-test
|
queue-test
|
||||||
stack-test
|
|
||||||
date-test
|
date-test
|
||||||
rand-test
|
rand-test
|
||||||
thread-test
|
thread-test
|
||||||
|
@ -5,6 +5,9 @@ EXTRA_DIST = \
|
|||||||
makefile.msc \
|
makefile.msc \
|
||||||
makefile.cygwin
|
makefile.cygwin
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
makefile.msc
|
||||||
|
|
||||||
TESTS = \
|
TESTS = \
|
||||||
array-test \
|
array-test \
|
||||||
date-test \
|
date-test \
|
||||||
@ -16,7 +19,6 @@ TESTS = \
|
|||||||
rand-test \
|
rand-test \
|
||||||
relation-test \
|
relation-test \
|
||||||
slist-test \
|
slist-test \
|
||||||
stack-test \
|
|
||||||
strfunc-test \
|
strfunc-test \
|
||||||
string-test \
|
string-test \
|
||||||
thread-test \
|
thread-test \
|
||||||
@ -35,7 +37,6 @@ queue_test_LDADD = $(top_builddir)/libglib.la
|
|||||||
rand_test_LDADD = $(top_builddir)/libglib.la
|
rand_test_LDADD = $(top_builddir)/libglib.la
|
||||||
relation_test_LDADD = $(top_builddir)/libglib.la
|
relation_test_LDADD = $(top_builddir)/libglib.la
|
||||||
slist_test_LDADD = $(top_builddir)/libglib.la
|
slist_test_LDADD = $(top_builddir)/libglib.la
|
||||||
stack_test_LDADD = $(top_builddir)/libglib.la
|
|
||||||
strfunc_test_LDADD = $(top_builddir)/libglib.la
|
strfunc_test_LDADD = $(top_builddir)/libglib.la
|
||||||
string_test_LDADD = $(top_builddir)/libglib.la
|
string_test_LDADD = $(top_builddir)/libglib.la
|
||||||
thread_test_LDADD = $(top_builddir)/libglib.la \
|
thread_test_LDADD = $(top_builddir)/libglib.la \
|
||||||
|
@ -6,75 +6,107 @@
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
GQueue *q;
|
GQueue *q;
|
||||||
|
GList *node;
|
||||||
|
gpointer data;
|
||||||
|
|
||||||
q = g_queue_new ();
|
q = g_queue_create ();
|
||||||
|
|
||||||
g_assert (g_queue_empty (q) == TRUE);
|
g_assert (g_queue_is_empty (q) == TRUE);
|
||||||
|
|
||||||
g_queue_push (q, GINT_TO_POINTER (1));
|
g_queue_push_head (q, GINT_TO_POINTER (2));
|
||||||
g_assert (g_list_length (q->list) == 1);
|
g_assert (g_queue_peek_head (q) == GINT_TO_POINTER (2));
|
||||||
g_queue_push (q, GINT_TO_POINTER (2));
|
g_assert (g_queue_is_empty (q) == FALSE);
|
||||||
g_assert (g_list_length (q->list) == 2);
|
g_assert (g_list_length (q->head) == 1);
|
||||||
g_queue_push (q, GINT_TO_POINTER (3));
|
g_assert (q->head == q->tail);
|
||||||
g_assert (g_list_length (q->list) == 3);
|
g_queue_push_head (q, GINT_TO_POINTER (1));
|
||||||
g_queue_push (q, GINT_TO_POINTER (4));
|
g_assert (q->head->next == q->tail);
|
||||||
g_assert (g_list_length (q->list) == 4);
|
g_assert (q->tail->prev == q->head);
|
||||||
g_queue_push (q, GINT_TO_POINTER (5));
|
g_assert (g_list_length (q->head) == 2);
|
||||||
g_assert (g_list_length (q->list) == 5);
|
g_assert (q->tail->data == GINT_TO_POINTER (2));
|
||||||
|
g_assert (q->head->data == GINT_TO_POINTER (1));
|
||||||
|
g_queue_push_tail (q, GINT_TO_POINTER (3));
|
||||||
|
g_assert (g_list_length (q->head) == 3);
|
||||||
|
g_assert (q->head->data == GINT_TO_POINTER (1));
|
||||||
|
g_assert (q->head->next->data == GINT_TO_POINTER (2));
|
||||||
|
g_assert (q->head->next->next == q->tail);
|
||||||
|
g_assert (q->head->next == q->tail->prev);
|
||||||
|
g_assert (q->tail->data == GINT_TO_POINTER (3));
|
||||||
|
g_queue_push_tail (q, GINT_TO_POINTER (4));
|
||||||
|
g_assert (g_list_length (q->head) == 4);
|
||||||
|
g_assert (q->head->data == GINT_TO_POINTER (1));
|
||||||
|
g_assert (g_queue_peek_tail (q) == GINT_TO_POINTER (4));
|
||||||
|
g_queue_push_tail (q, GINT_TO_POINTER (5));
|
||||||
|
g_assert (g_list_length (q->head) == 5);
|
||||||
|
|
||||||
g_assert (g_queue_empty (q) == FALSE);
|
g_assert (g_queue_is_empty (q) == FALSE);
|
||||||
|
|
||||||
g_assert (g_queue_index (q, GINT_TO_POINTER (2)) == 1);
|
g_assert (q->length == 5);
|
||||||
g_assert (g_queue_index (q, GINT_TO_POINTER (142)) == -1);
|
g_assert (q->head->prev == NULL);
|
||||||
|
g_assert (q->head->data == GINT_TO_POINTER (1));
|
||||||
|
g_assert (q->head->next->data == GINT_TO_POINTER (2));
|
||||||
|
g_assert (q->head->next->next->data == GINT_TO_POINTER (3));
|
||||||
|
g_assert (q->head->next->next->next->data == GINT_TO_POINTER (4));
|
||||||
|
g_assert (q->head->next->next->next->next->data == GINT_TO_POINTER (5));
|
||||||
|
g_assert (q->head->next->next->next->next->next == NULL);
|
||||||
|
g_assert (q->head->next->next->next->next == q->tail);
|
||||||
|
g_assert (q->tail->data == GINT_TO_POINTER (5));
|
||||||
|
g_assert (q->tail->prev->data == GINT_TO_POINTER (4));
|
||||||
|
g_assert (q->tail->prev->prev->data == GINT_TO_POINTER (3));
|
||||||
|
g_assert (q->tail->prev->prev->prev->data == GINT_TO_POINTER (2));
|
||||||
|
g_assert (q->tail->prev->prev->prev->prev->data == GINT_TO_POINTER (1));
|
||||||
|
g_assert (q->tail->prev->prev->prev->prev->prev == NULL);
|
||||||
|
g_assert (q->tail->prev->prev->prev->prev == q->head);
|
||||||
|
g_assert (g_queue_peek_tail (q) == GINT_TO_POINTER (5));
|
||||||
|
g_assert (g_queue_peek_head (q) == GINT_TO_POINTER (1));
|
||||||
|
|
||||||
g_assert (g_queue_peek (q) == GINT_TO_POINTER (1));
|
g_assert (g_queue_pop_head (q) == GINT_TO_POINTER (1));
|
||||||
g_assert (g_queue_peek_front (q) == GINT_TO_POINTER (1));
|
g_assert (g_list_length (q->head) == 4 && q->length == 4);
|
||||||
g_assert (g_queue_peek_back (q) == GINT_TO_POINTER (5));
|
g_assert (g_queue_pop_tail (q) == GINT_TO_POINTER (5));
|
||||||
|
g_assert (g_list_length (q->head) == 3);
|
||||||
|
g_assert (g_queue_pop_head_link (q)->data == GINT_TO_POINTER (2));
|
||||||
|
g_assert (g_list_length (q->head) == 2);
|
||||||
|
g_assert (g_queue_pop_tail (q) == GINT_TO_POINTER (4));
|
||||||
|
g_assert (g_list_length (q->head) == 1);
|
||||||
|
g_assert (g_queue_pop_head_link (q)->data == GINT_TO_POINTER (3));
|
||||||
|
g_assert (g_list_length (q->head) == 0);
|
||||||
|
g_assert (g_queue_pop_tail (q) == NULL);
|
||||||
|
g_assert (g_list_length (q->head) == 0);
|
||||||
|
g_assert (g_queue_pop_head (q) == NULL);
|
||||||
|
g_assert (g_list_length (q->head) == 0);
|
||||||
|
|
||||||
g_assert (g_queue_pop (q) == GINT_TO_POINTER (1));
|
g_assert (g_queue_is_empty (q) == TRUE);
|
||||||
g_assert (g_list_length (q->list) == 4);
|
|
||||||
g_assert (g_queue_pop (q) == GINT_TO_POINTER (2));
|
|
||||||
g_assert (g_list_length (q->list) == 3);
|
|
||||||
g_assert (g_queue_pop (q) == GINT_TO_POINTER (3));
|
|
||||||
g_assert (g_list_length (q->list) == 2);
|
|
||||||
g_assert (g_queue_pop (q) == GINT_TO_POINTER (4));
|
|
||||||
g_assert (g_list_length (q->list) == 1);
|
|
||||||
g_assert (g_queue_pop (q) == GINT_TO_POINTER (5));
|
|
||||||
g_assert (g_list_length (q->list) == 0);
|
|
||||||
g_assert (g_queue_pop (q) == NULL);
|
|
||||||
g_assert (g_list_length (q->list) == 0);
|
|
||||||
g_assert (g_queue_pop (q) == NULL);
|
|
||||||
g_assert (g_list_length (q->list) == 0);
|
|
||||||
|
|
||||||
g_assert (g_queue_empty (q) == TRUE);
|
|
||||||
|
|
||||||
/************************/
|
/************************/
|
||||||
|
|
||||||
g_queue_push_front (q, GINT_TO_POINTER (1));
|
g_queue_push_head (q, GINT_TO_POINTER (1));
|
||||||
g_assert (g_list_length (q->list) == 1);
|
g_assert (g_list_length (q->head) == 1 && 1 == q->length);
|
||||||
g_queue_push_front (q, GINT_TO_POINTER (2));
|
g_queue_push_head (q, GINT_TO_POINTER (2));
|
||||||
g_assert (g_list_length (q->list) == 2);
|
g_assert (g_list_length (q->head) == 2 && 2 == q->length);
|
||||||
g_queue_push_front (q, GINT_TO_POINTER (3));
|
g_queue_push_head (q, GINT_TO_POINTER (3));
|
||||||
g_assert (g_list_length (q->list) == 3);
|
g_assert (g_list_length (q->head) == 3 && 3 == q->length);
|
||||||
g_queue_push_front (q, GINT_TO_POINTER (4));
|
g_queue_push_head (q, GINT_TO_POINTER (4));
|
||||||
g_assert (g_list_length (q->list) == 4);
|
g_assert (g_list_length (q->head) == 4 && 4 == q->length);
|
||||||
g_queue_push_front (q, GINT_TO_POINTER (5));
|
g_queue_push_head (q, GINT_TO_POINTER (5));
|
||||||
g_assert (g_list_length (q->list) == 5);
|
g_assert (g_list_length (q->head) == 5 && 5 == q->length);
|
||||||
|
|
||||||
g_assert (g_queue_pop_front (q) == GINT_TO_POINTER (5));
|
g_assert (g_queue_pop_head (q) == GINT_TO_POINTER (5));
|
||||||
g_assert (g_list_length (q->list) == 4);
|
g_assert (g_list_length (q->head) == 4);
|
||||||
g_assert (g_queue_pop_front (q) == GINT_TO_POINTER (4));
|
node = q->tail;
|
||||||
g_assert (g_list_length (q->list) == 3);
|
g_assert (node == g_queue_pop_tail_link (q));
|
||||||
g_assert (g_queue_pop_front (q) == GINT_TO_POINTER (3));
|
g_assert (g_list_length (q->head) == 3);
|
||||||
g_assert (g_list_length (q->list) == 2);
|
data = q->head->data;
|
||||||
g_assert (g_queue_pop_front (q) == GINT_TO_POINTER (2));
|
g_assert (data == g_queue_pop_head (q));
|
||||||
g_assert (g_list_length (q->list) == 1);
|
g_assert (g_list_length (q->head) == 2);
|
||||||
g_assert (g_queue_pop_front (q) == GINT_TO_POINTER (1));
|
g_assert (g_queue_pop_tail (q) == GINT_TO_POINTER (2));
|
||||||
g_assert (g_list_length (q->list) == 0);
|
g_assert (g_list_length (q->head) == 1);
|
||||||
g_assert (g_queue_pop_front (q) == NULL);
|
g_assert (q->head == q->tail);
|
||||||
g_assert (g_list_length (q->list) == 0);
|
g_assert (g_queue_pop_tail (q) == GINT_TO_POINTER (3));
|
||||||
g_assert (g_queue_pop_front (q) == NULL);
|
g_assert (g_list_length (q->head) == 0);
|
||||||
g_assert (g_list_length (q->list) == 0);
|
g_assert (g_queue_pop_head (q) == NULL);
|
||||||
|
g_assert (g_queue_pop_head_link (q) == NULL);
|
||||||
|
g_assert (g_list_length (q->head) == 0);
|
||||||
|
g_assert (g_queue_pop_tail_link (q) == NULL);
|
||||||
|
g_assert (g_list_length (q->head) == 0);
|
||||||
|
|
||||||
g_queue_free (q);
|
g_queue_free (q);
|
||||||
|
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <glib.h>
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
GStack *s;
|
|
||||||
|
|
||||||
s = g_stack_new ();
|
|
||||||
|
|
||||||
g_assert (g_stack_empty (s) == TRUE);
|
|
||||||
|
|
||||||
g_stack_push (s, GINT_TO_POINTER (1));
|
|
||||||
g_assert (g_list_length (s->list) == 1);
|
|
||||||
g_stack_push (s, GINT_TO_POINTER (2));
|
|
||||||
g_assert (g_list_length (s->list) == 2);
|
|
||||||
g_stack_push (s, GINT_TO_POINTER (3));
|
|
||||||
g_assert (g_list_length (s->list) == 3);
|
|
||||||
g_stack_push (s, GINT_TO_POINTER (4));
|
|
||||||
g_assert (g_list_length (s->list) == 4);
|
|
||||||
g_stack_push (s, GINT_TO_POINTER (5));
|
|
||||||
g_assert (g_list_length (s->list) == 5);
|
|
||||||
|
|
||||||
g_assert (g_stack_index (s, GINT_TO_POINTER (2)) == 3);
|
|
||||||
|
|
||||||
g_assert (g_stack_empty (s) == FALSE);
|
|
||||||
|
|
||||||
g_assert (g_stack_peek (s) == GINT_TO_POINTER (5));
|
|
||||||
|
|
||||||
g_assert (g_stack_pop (s) == GINT_TO_POINTER (5));
|
|
||||||
g_assert (g_list_length (s->list) == 4);
|
|
||||||
g_assert (g_stack_pop (s) == GINT_TO_POINTER (4));
|
|
||||||
g_assert (g_list_length (s->list) == 3);
|
|
||||||
g_assert (g_stack_pop (s) == GINT_TO_POINTER (3));
|
|
||||||
g_assert (g_list_length (s->list) == 2);
|
|
||||||
g_assert (g_stack_pop (s) == GINT_TO_POINTER (2));
|
|
||||||
g_assert (g_list_length (s->list) == 1);
|
|
||||||
g_assert (g_stack_pop (s) == GINT_TO_POINTER (1));
|
|
||||||
g_assert (g_list_length (s->list) == 0);
|
|
||||||
g_assert (g_stack_pop (s) == NULL);
|
|
||||||
g_assert (g_list_length (s->list) == 0);
|
|
||||||
g_assert (g_stack_pop (s) == NULL);
|
|
||||||
g_assert (g_list_length (s->list) == 0);
|
|
||||||
|
|
||||||
g_stack_free (s);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user