1. 31 Aug, 2000 2 commits
  2. 30 Jul, 2000 1 commit
  3. 29 Jul, 2000 1 commit
    • Tor Lillqvist's avatar
      Finally, a new and improved IO Channel and condition watch implementation · b965bb5d
      Tor Lillqvist authored
      2000-07-30  Tor Lillqvist  <tml@iki.fi>
      
      	Finally, a new and improved IO Channel and condition watch
      	implementation for Win32. Based on code provided by Craig Setera.
      
      	When watching file descriptors, for which there is no select()
      	like functionality on Win32 that would work on all Win32 platforms
      	for all types of file descriptors (including anonymous pipes), we
      	start a new thread that blocks while trying to read from the file
      	descriptor. When the read returns, a Win32 Event is signalled that
      	the polling routine eventually notices. Meanwhile, the data being
      	read is stored in a circular buffer, from where the IO channel's
      	read() method picks it up.
      
      	If the buffer fills up the reading thread has to wait for space
      	becoming available. For this another Win32 Event is used. The IO
      	Channel's read() method signals this when it has read some data
      	out of the buffer.
      
      	The separate reader thread(s), and the circular buffer(s) with
      	associated events mean lots of possibilities for fun parallellism
      	errors. But it seems to work OK, i.e. GIMP runs.
      
      	* gmain.c: Small changes to the Win32 polling function.
      	(g_main_win32_get_poll_func): New function. Perhaps it would be a
      	good idea to provide this on all platforms.
      
      	* giowin32.c: The bulk of the new implementation.
      	(g_io_channel_win32_wait_for_condition): New function. To be used
      	where on Unix one does a select() on the channel's fd, like
      	libgimp's gimp_extension_process(). Could be provided on all
      	platforms.
      
      	* glib.h: Update documentation for IO Channels on Win32. Remove
      	the declarations for the as of now obsolete old functions related
      	to IO Channels for pipes with "wakeup" messages.
      
      	* glib.def: Some new functions.
      
      	* tests/gio-test.c: New file, to test GIOChannel and main loop.
      
      	* tests/Makefile.am
      	* tests/makefile.mingw.in: Add it.
      b965bb5d
  4. 26 Jul, 2000 1 commit
  5. 19 May, 2000 1 commit
    • Tim Janik's avatar
      fixed SIZEOF_LONG==4 assumption with ENABLE_MEM_CHECK, from Art Haas · 1e5d06d4
      Tim Janik authored
      Fri May 19 09:00:44 2000  Tim Janik  <timj@gtk.org>
      
              * gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
              ENABLE_MEM_CHECK, from Art Haas <ahaas@neosoft.com>.
      
              * gslist.c (g_slist_reverse): shut up compiler.
      
              * gscanner.c (g_scanner_get_token_ll): removed inline assignment.
      
              * garray.c: remove index>=0 checks for unsigned indices.
      
              * gmain.c (g_idle_prepare): timeout assignment fix.
      
              * gtree.c (g_tree_node_rotate_right): shut up compiler.
      1e5d06d4
  6. 17 Apr, 2000 1 commit
    • Sebastian Wilhelmi's avatar
      Add configure test for garbage collector friendliness for GLib. If · 8c90d776
      Sebastian Wilhelmi authored
      
      2000-04-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
      
      	* configure.in, acconfig.h: Add configure test for garbage
      	collector friendliness for GLib. If enabled, ENABLE_GC_FRIENDLY
      	will be defined.
      
      	* garray.c, ghash.c, glist.c, gmain.c, gmem.c, gnode.c, gqueue.c,
      	gslist.c, gtree.c: If ENABLE_GC_FRIENDLY is defined, NULLify all
      	memory released by the user, but cached by GLib. This lets a
      	garbage collector have a more correct view of the actually used
      	memory.
      8c90d776
  7. 20 Mar, 2000 1 commit
  8. 01 Mar, 2000 1 commit
    • Tim Janik's avatar
      minor optimization. · db8baf69
      Tim Janik authored
      Wed Mar  1 10:39:39 2000  Tim Janik  <timj@gtk.org>
      
              * gslist.c (g_slist_reverse): minor optimization.
      
              * testglib.c (g_node_test): added a couple of tests for
              g_node_copy().
      
              * glib.h:
              * gnode.c (g_node_copy): new function to copy subtrees,
              supplied by dbsears@ix.netcom.com.
              changed iterator to walk the children list backwards, so
              we get down from O(n^2) to O(n).
      
              * gnode.c (g_node_first_sibling): applied patch from
              dbsears@ix.netcom.com to optimize access if node->parent
              is present.
      
              * gutils.c (g_get_any_init): backed out HAVE_PW_GECOS check around
              assignment of g_real_name, sicne HAVE_PW_GECOS is never defined and
              thus breaks the original code.
      
              * merged changes from 1.2.7.
      
      Sat Feb 19 19:43:29 2000  Tim Janik  <timj@gtk.org>
      
              * testgmodule.c (main): added test to check that not yet bound symbols
              in shared libraries of the main module are retrievable, from David Gero.
      
      Fri Jan 28 11:37:41 2000  Owen Taylor  <otaylor@redhat.com>
      
              Bug #4156 - Changes vaguely modelled after Scott Gifford's patch
      
              * gtimer.c (g_timer_elapsed): Never report negative times -
              clip times to 0.
      
              * gmain.c (g_timeout_prepare): Guard against unexpected
              clock shifts by never setting a timeout of more than
              data->interval msecs.
      db8baf69
  9. 26 Jan, 2000 1 commit
  10. 04 Oct, 1999 1 commit
  11. 24 Jul, 1999 1 commit
    • Tim Janik's avatar
      18:36. incorporated proposed cleanups from gtk-devel-list. · 87c7aeb9
      Tim Janik authored
      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.
      87c7aeb9
  12. 08 May, 1999 1 commit
    • CDT 1999 Shawn T. Amundson's avatar
      Port to BeOS by myself and Richard Offer. · 499c9786
      CDT 1999 Shawn T. Amundson authored
      Sat May  8 01:52:29 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
      
              * configure.in
                gerror.c
                gmain.c
                gstrfuncs.c
                gutils.c
                ltconfig
                ltmain.sh
                gmodule/Makefile.am
                gmodule/gmodule.c
                gmodule/gmoduleconf.h.in
                gmodule/gmodule-beos.c
                gthread/Makefile.am: Port to BeOS by myself and Richard Offer.
      499c9786
  13. 24 Apr, 1999 1 commit
    • Tor Lillqvist's avatar
      Support added for building using a GNU toolchain on Win32, · 2aa1277d
      Tor Lillqvist authored
      	i.e. gcc -mno-cygwin on cygwin (a.k.a. mingw32, using egcs-1.1.2).
      
      	* README.win32: Updated.
      	* build-dll makefile.cygwin tests/makefile.cygwin: New files.
      	* glib.h glib.def glibconfig.h.win32 makefile.msc: Slight updates.
      	* gmain.c: No need to include <fcntl.h> and <io.h> on Win32.
      	* gmain.c gutils.c testglib.c tests/string-test.c: Test for
      	NATIVE_WIN32, not _MSC_VER.
      	* gmutex.c: Must declare g_thread_functions_for_glib_use as
      	exported (using the GUTILS_C_VAR macro).
      	* gutils.c gmodule/libgplugin_[ab].c: LibMain not needed.
      	* gmodule/gmoduleconf.h.win32: Need underscore with gcc.
      	* gthread/gthread.c: With gcc on Win32, must use memcpy to assign
      	value of g_thread_functions_for_glib_use (?).
      	* makefile.msc tests/makefile.msc: Cosmetics.
      2aa1277d
  14. 14 Mar, 1999 1 commit
  15. 24 Feb, 1999 1 commit
  16. 10 Feb, 1999 1 commit
  17. 02 Feb, 1999 1 commit
  18. 17 Jan, 1999 3 commits
    • Tim Janik's avatar
      added a define G_HOOK_DEFERRED_DESTROY, to substitute a noop · 5c2fb376
      Tim Janik authored
      Sun Jan 17 14:13:52 1999  Tim Janik  <timj@gtk.org>
      
              * glib.h: added a define G_HOOK_DEFERRED_DESTROY, to substitute a noop
              GHookList.hook_destroy function.
      
              * ghook.c (g_hook_destroy_link): don't really call hook_destroy if it
              is G_HOOK_DEFERRED_DESTROY. for the case where we invoke hook->destroy()
              we now clean up the hook completely afterwards, i.e. data, func and
              destroy are immediately set to NULL and hook_free can't play with that
              values anymore.
      
              * gmain.c (g_source_add): set hook_destroy to G_HOOK_DEFERRED_DESTROY,
              instead of using an ugly _noop() hack, this is to avoid an uneccessary
              function invokation. set hook_free to g_source_destroy_func, this way
              we always invoke the destroy notifiers for user_data and source_data
              after execution of dispatch(). thus, g_source_destroy_func() will always
              be called within the main_loop lock (this wasn't really assured
              before), and can release and reaquire the look around destroy notifier
              invokation.
      5c2fb376
    • Tim Janik's avatar
      reentrancy fixups · 37f659ec
      Tim Janik authored
      37f659ec
    • Tim Janik's avatar
      incremented version number to 1.1.13, bin age 0, interface age 0. · 08425ac4
      Tim Janik authored
      Sun Jan 17 05:12:17 1999  Tim Janik  <timj@gtk.org>
      
              * configure.in: incremented version number to 1.1.13, bin age 0,
              interface age 0.
      
              * glib.h: added hook_destroy member to struct _GHookList.
      
              * ghook.c (g_hook_destroy_link): if the hook_list defines a hook_destroy
              function, use that to marshal hook destruction notifiers.
      
              * gmain.c: removed g_source_free_func and added g_source_destroy_func,
              which marshalls the user_data and source_data destructors of sources
              outside of the main_loop lock.
              removed GIdleData struct since its single member callback can be passed
              as source_data directly.
              added a gboolean return value to all g_source_remove* functions,
              indicating whether the source could be removed, because these functions
              don't issue warnings upon unseccessful removals themselves. this way at
              least the caller gets a chance to warn upon failing removals.
              (g_main_iterate): set in_check_or_prepare around calls to check() or
              prepare().
              (g_main_pending): simply return FALSE if called from within check() or
              prepare().
              (g_main_iteration): issue a warning if called from within check() or
              prepare() and bail out with FALSE.
              (g_main_run): likewise.
              (g_source_remove_by_funcs_user_data): new function to remove sources by
              user data and function table.
              (g_idle_remove_by_data): new function to really remove idles only, since
              g_source_remove_by_user_data would remove timeouts or other sources as
              well.
      08425ac4
  19. 16 Jan, 1999 1 commit
    • Tor Lillqvist's avatar
      Merge in current Win32 version. Almost no Unix code touched. · f477518c
      Tor Lillqvist authored
      	* README.win32: More text.
      
      	* config.h.win32 glibconfig.h.win32: Update to match the
      	corresponding generated files on Unix.
      
      	* makefile.msc: Update with new source files, and gthread
       	library. Use the compiler flag -MD instead of using -D_DLL and
      	"/nodefaultlib:libc msvcrt.lib" in the link phase.
      
      	* glib.def: Include new functions, drop removed ones.
      
      	* glib.h: Add comments about main loop and polling on Win32. (In
      	general, it's only for the GIMP's use.) Add Win32 IO Channel
      	functions. Remove the obsoleted old IO Channel stuff (which was
      	in #if 0 already).
      
      	* giowin32.c: New file.
      
      	* gmain.c: Include config.h, conditionalize <sys/time.h>
       	inclusion.  Add g_poll implementation for Win32 (only for the
       	GIMP's needs for now, it's hard or even impossible to be as clean
       	and generic as on Unix). Implement g_get_current_time on Win32. If
       	threads aren't supported, don't try to wake up main thread's
       	loop. On Win32, use a semaphore and not a pipe to wake up the main
       	loop.
      
      	* gmessages.c: On Win32, allocate a console window if the standard
      	output handle is invalid before writing to stdout, and reopen stdout
      	to that console window.
      
      	* giochannel.c: Conditionalize unistd.h inclusion. Some indentation
      	cleanup.
      
      	* gstrfuncs.c: Include <signal.h>.
      
      	* gutils.c: On Win32, also check the HOMEDRIVE and HOMEPATH
      	environment variables.
      
      	* gmodule-dl.c gmodule-dld.c: In
       	_g_module_build_path, don't add the "lib" prefix and
       	".so" or ".sl" suffix if already there.
      
      	* gmodule-win32.c: Likewise for the ".dll" suffix.
      
      	* gthread-posix.c: Conditionalize <sys/time.h> inclusion.
      f477518c
  20. 07 Jan, 1999 1 commit
  21. 04 Jan, 1999 1 commit
    • Tim Janik's avatar
      eliminated extraneous "register" qualifiers in variable declarations. · 250d1a07
      Tim Janik authored
      Mon Jan  4 20:58:50 1999  Tim Janik  <timj@gtk.org>
      
              * gscanner.c: eliminated extraneous "register" qualifiers in variable
              declarations.
      
              * gmain.c: #undef events and revents which may have been defined in
              sys/poll.h for SVR3,4 compatibility on some AIX systems. fix been
              provided by Philippe Defert <Philippe.Defert@cern.ch>.
      250d1a07
  22. 02 Jan, 1999 1 commit
    • Tim Janik's avatar
      avoid unneccessary extra hook referencing (the explicit hook referencing · 00e064d2
      Tim Janik authored
      Sat Jan  2 02:20:59 1999  Tim Janik  <timj@gtk.org>
      
              * ghook.c:
              (g_hook_list_invoke):
              (g_hook_list_invoke_check):
              (g_hook_list_marshal_check):
              (g_hook_list_marshal): avoid unneccessary extra hook referencing (the
              explicit hook referencing became unneccessarry with my changes from
              Mon Dec 21 21:48:29 1998).
      
              * gmain.c (g_main_iterate): fixed reference counting leaks with
              premature loop aborts.
      
      Fri Jan  1 22:47:44 1999  Tim Janik  <timj@gtk.org>
      
              * gscanner.c (g_scanner_unexp_token): handle G_TOKEN_IDENTIFIER_NULL
              as G_TOKEN_IDENTIFIER.
      00e064d2
  23. 23 Dec, 1998 1 commit
  24. 21 Dec, 1998 2 commits
    • Tim Janik's avatar
      there was a reference count race for hooks during invocation loops. since · 097c9b17
      Tim Janik authored
      Mon Dec 21 21:48:29 1998  Tim Janik  <timj@gtk.org>
      
              * glib.h:
              * gmain.c: there was a reference count race for hooks during invocation
              loops. since all (known) hook loop implementations, do currently start
              out with g_hook_first_valid() and iterate with g_hook_next_valid(),
              g_hook_first_valid() will now return a referenced hook, and
              g_hook_next_valid() will "eat" that, and eventually transfer it to
              the next hook. <sigh> unfortunately this requires g_hook_next_valid()
              to take the hook_list as additional argument.
      
              * gmain.c (g_main_iterate): adjusted callers of g_hook_next_valid().
      097c9b17
    • Tim Janik's avatar
      default initialize source_timeout with -1 so we have a sane timeout value · 85755f7e
      Tim Janik authored
      Mon Dec 21 03:48:04 1998  Tim Janik  <timj@gtk.org>
      
              * gmain.c (g_main_iterate): default initialize source_timeout with -1
              so we have a sane timeout value if (*prpare) doesn't set it.
      85755f7e
  25. 19 Dec, 1998 3 commits
  26. 18 Dec, 1998 2 commits
    • Owen Taylor's avatar
      Dec 18 12:51:39 1998 Owen Taylor <otaylor@redhat.com> · 2623d283
      Owen Taylor authored
      	* gmain.c: Fix errors in computation of timeout
      	expiration times > 1sec.
      2623d283
    • Tim Janik's avatar
      new function to check whether a main loop has been quitted. (g_main_new): · 8be41eae
      Tim Janik authored
      Fri Dec 18 00:03:17 1998  Tim Janik  <timj@gtk.org>
      
              * glib.h:
              * gmain.c:
              (g_main_is_running): new function to check whether a main loop has been
              quitted.
              (g_main_new): added a gboolean argument to determine whether the loop
              should be considered initially running or not. however, g_main_run ()
              will still reset the main loops running state to TRUE upon initial
              entrance.
      
              * gmain.c:
              (g_main_iterate): documented this function's purpose in 5 steps.
              for step 2), flag sources as G_SOURCE_READY even if !dispatch and
              check G_SOURCE_READY prior to (*prepare), so we don't call (*prepare)
              on them multiple times.
      
      Thu Dec 17 23:43:47 1998  Tim Janik  <timj@gtk.org>
      
              * gmain.c (g_main_add_poll): reordered arguments, so GPollFD* comes
              first, <sigh> (sorry Snorfle, i should have let you know in the first
              place).
              (g_main_dispatch): stack G_HOOK_FLAG_IN_CALL flags. call source's
              destructor when destroying a source.
      8be41eae
  27. 17 Dec, 1998 2 commits
    • CST 1998 Shawn T. Amundson's avatar
      giounix.c: s/g_main_poll_add/g_main_remove_add/g · 77ccad4d
      CST 1998 Shawn T. Amundson authored
      Wed Dec 16 22:32:13 CST 1998 Shawn T. Amundson <amundson@gtk.org>
      
              * glib.h:
                giounix.c: s/g_main_poll_add/g_main_remove_add/g
                           s/g_main_poll_remove/g_main_remove_poll/g
                           s/g_main_poll_add_unlocking/g_main_add_unlocking_poll/g
                (from Tim Janik)
      
              * gthread-posix.c: use g_free in mutex_free (from Tim Janik)
      77ccad4d
    • Tim Janik's avatar
      if !G_THREADS_ENABLED, eat the trailing semicolon with a bogus function · a62ebb0e
      Tim Janik authored
      Thu Dec 17 04:10:49 1998  Tim Janik  <timj@gtk.org>
      
              * glib.h (G_LOCK_DECLARE_*): if !G_THREADS_ENABLED, eat the
              trailing semicolon with a bogus function declaration, instead
              of with a bogus variable declarations, so we avoid unused
              variable warnings.
      a62ebb0e
  28. 16 Dec, 1998 2 commits
    • Sebastian Wilhelmi's avatar
      Updated to reflect the existence of gthread. · 2e57a364
      Sebastian Wilhelmi authored
      
      1998-12-16  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
      
      	* docs/glib-config.1: Updated to reflect the existence of gthread.
      
      	* gmain.c (g_main_poll_add_unlocking): Changed
      	g_main_poll_add_unlocked to g_main_poll_add_unlocking to match
      	semantic, (indeed, main_loop must be locked, when calling this
      	function). Removed the unlocking from the end of that function, as
      	that is not right. Made a 'HOLDS' comment above the function.
      2e57a364
    • Tim Janik's avatar
      version bump to 1.1.8, binary age 0, interface age 0. · b2e318ff
      Tim Janik authored
      Wed Dec 16 03:16:58 1998  Tim Janik  <timj@gtk.org>
      
              * configure.in: version bump to 1.1.8, binary age 0, interface age 0.
      
              * glib.h: changed g_lock() to G_LOCK(), g_unlock() to G_UNLOCK() and
              g_trylock() to G_TRYLOCK(), since these are macros that expand to
              nothing with --disable-threads.
              changed G_LOCK_DEFINE() to G_LOCK_DECLARE() and introduced
              G_LOCK_DECLARE_STATIC() to achive the results of static G_LOCK_DECLARE().
              changed semantics of g_thread_supported to g_thread_supported() so it
              can be used as a function like g_module_supported(). the actuall
              definition is still a macro that expands into a variable for
              performance reasons though.
              various indentation and coding style cleanups.
      
              * configure.in: added --enable-threads that defaults to yes.
      
              * gmutex.c: changed tests g_thread_supported to g_thread_supported (),
              changed variable settings of g_thread_supported
              to g_threads_got_initialized.
      
              garray.c:
              gcache.c:
              gdataset.c:
              gdate.c:
              ghash.c:
              glist.c:
              gmain.c:
              gnode.c:
              gslist.c:
              gstring.c:
              gtree.c:
              gutils.c:
              changed s/g_lock/G_LOCK/, s/g_unlock/G_UNLOCK/,
              s/static G_LOCK_DEFINE/G_LOCK_DECLARE_STATIC/.
      b2e318ff
  29. 15 Dec, 1998 1 commit
    • Owen Taylor's avatar
      This commit merges the glib-threads branch into the main · 931ea952
      Owen Taylor authored
      branch. See the ChangeLog for details of the changes.
      
      In brief overview:
      
       - The set of threading functions can be set
       - A default implementation is provided in -lgthread
       - All static data structures are locked using these
         functions if g_thread_init() is called.
      931ea952
  30. 08 Dec, 1998 1 commit
  31. 02 Dec, 1998 1 commit
    • Owen Taylor's avatar
      Merge main loop into head. This probably breaks Win32, until · beab982e
      Owen Taylor authored
      someone does the necessary updates.
      
      Sat Nov 28 12:53:47 1998  Owen Taylor  <otaylor@redhat.com>
      
      	* Makefile.am configure.in acconfig.h giochannel.c
      	  glib.h glist.c gmain.c gutils.c:
      
              - Revised GIOChannel to provide a generic virtual-function
        	  based interface.
      	- Added unix fd-based GIOChannel's
      	- Added generic main-loop abstraction
      	- Added timeouts and idle functions using main-loop abstraction.
      beab982e