Commit Graph

128 Commits

Author SHA1 Message Date
Sebastian Wilhelmi
90f6cc9bf2 Completed the thread support in GLib. Thread creation, prioritizing
1999-06-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in, acglib.m4, acconfig.h, glib.h, gthread.c:
	Completed the thread support in GLib. Thread creation,
	prioritizing threads, yielding, joining threads as well as
	reader/writer locks and recursive mutexes are now in place. Please
	test heavily on your platform. It is so far tested on
	Linux/i386/pthreads, Solaris/Sparc/pthreads and
	Solaris/Sparc/solaristhreads.

	* gtimer.c, glib.h: Implement g_usleep (gulong microseconds) for
	thread safe sleeping. (sleep() is not MT-safe at all!)

	* gutils.c: Avoid compiler warning.

	* tests/Makefile.am, tests/thread-test.c: New program to test some
	aspects of the thread implementation.

	* gthread.c, Makefile.am: Renamed from gmutex.c to reflect the
	change of content.

	* configure.in: Purged all appearances of nspr.

	* gthread/gthread-posix.c, gthread-solaris.c: Added the native
	implementations for the GLib's extended thread support.

	* gthread/gthread-nspr.c: Removed for good. NSPR is nothing we
	would want to build upon.

	* gthread/gthread.c: Renamed to gthread-impl.c to avoid
	confusion with ../gthread.c (Formerly known as the file called
	gmutex.c)

	* gthread/testgthread.c: Removed. The new and much extended
        tests are in ../tests/thread-test.c.

	* gthread/Makefile.am: Changed to reflect the changes above.
1999-06-17 15:39:31 +00:00
Tor Lillqvist
37e447f278 Backslashify also '"' characters.
* gstrfuncs.c (g_strescape): Backslashify also '"' characters.

	* glib.h: Document g_strescape.
1999-05-29 10:28:06 +00:00
Tor Lillqvist
e334434a9d Map fileno to _fileno for mingw32. Map fstat to _fstat.
* glib.h (Win32): Map fileno to _fileno for mingw32. Map fstat to
 	_fstat.

	* README.win32: Advice also to remove -lmoldname from the
 	patch to the egcs-1.1.2 spec file patch.
1999-05-12 18:59:49 +00:00
Tor Lillqvist
d6c6eb3d92 More editing. Use gcc, not ld to link. On native Win32 use _unlink(). Use
* README.win32: More editing.
	* build-dll: Use gcc, not ld to link.
	* glib.h: On native Win32 use _unlink().
	* gscanner.c: Use corrent NATIVE_WIN32 feature test macro,
	not _MSC_VER.
	* gstring.c: Include <io.h> on Win32 for _read prototype.
	* gutils.c: Remove old IO channel code (was in #if 0).
	* makefile.cygwin: Don't need to link with kernel32 and msvcrt
	explicitly, they are included anyway.
1999-04-25 20:52:42 +00:00
Tor Lillqvist
2aa1277d60 Support added for building using a GNU toolchain on Win32,
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.
1999-04-24 13:52:51 +00:00
BST 1999 Tony Gale
0269749a67 Fix typo in g_string_ncasecmp macro (by me). Add b_string_strncasecmp
Fri Apr 23 14:29:25 BST 1999  Tony Gale <gale@gtk.org>

        * glib.h: Fix typo in g_string_ncasecmp macro (by me).
          Add b_string_strncasecmp macro.
1999-04-23 13:34:09 +00:00
BST 1999 Tony Gale
32aecf31a7 Add new g_string functions for reading from file/socket descriptors, and
Sat Apr 17 20:55:13 BST 1999  Tony Gale <gale@gtk.org>

        * glib.h, gstring.c: Add new g_string functions for reading
          from file/socket descriptors, and tokenising strings.

          Added various g_string macros.
1999-04-17 20:04:49 +00:00
Sebastian Wilhelmi
3aa65d30eb Moved struct declaration up. Style fixes.
1999-04-12  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h: Moved struct declaration up. Style fixes.

	* grand.c: Style fixes. Only try to open /dev/random once.

	* tests/rand-test.c (main): New tests; Slight bug fix.
1999-04-12 12:53:37 +00:00
Sebastian Wilhelmi
95aff22dff New files to implement the Mersenne Twister Pseudo Random Number
1999-04-09  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* grand.c, tests/rand-test.c: New files to implement the Mersenne
	Twister Pseudo Random Number Generator.

	* glib.h, AUTHORS, Makefile.am, tests/Makefile.am: Changed
	accordingly.
1999-04-09 14:40:58 +00:00
Tim Janik
181f079319 added GLIB_CHECK_VERSION() macro similar to GTK_CHECK_VERSION().
Wed Mar 17 03:14:56 1999  Tim Janik  <timj@gtk.org>

        * glib.h: added GLIB_CHECK_VERSION() macro similar to
        GTK_CHECK_VERSION().
1999-03-17 02:38:24 +00:00
Sebastian Wilhelmi
d9f1357113 Added the macros G_(U)?INT_(8|16|32|64)_FORMAT to use for printf and (much
1999-03-15  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: Added the macros G_(U)?INT_(8|16|32|64)_FORMAT to
	use for printf and (much more important) scanf format strings for
	the corresponding GLib types.

	* glib.h Added G_(U)?(SHORT|INT|LONG)_FORMAT for consistency. It
	however makes no sense to also provide G_(FLOAT|DOUBLE)_FORMAT, as
	they are different for printf (f for both) and scanf (f for float,
	lf for double). Defining G_INT_FORMAT makes sense however, as we
	might want to define gint to something different than int someday
	in the future. Idea from Sascha Brawer <sb@adasys.ch>.
1999-03-15 16:09:15 +00:00
Jeff Garzik
fd7ba69e32 Added stack, queue ADTs and related tests.
Tue Mar  9 14:37:32 1999  Jeff Garzik  <jgarzik@pobox.com>

        * Makefile.am, glib.h, gstack.c, gqueue.c,
          tests/Makefile.am, tests/queue-test.c, tests/stack-test.c:
        Added stack, queue ADTs and related tests.

        * glib.h, glist.c:
        New g_list_delete() function.
1999-03-09 19:41:19 +00:00
CST 1999 Shawn T. Amundson
b9ef2b41db inserted additional note to look for ChangeLog and AUTHORS file for a log
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.
1999-02-24 06:14:27 +00:00
Sebastian Wilhelmi
8168836cd2 Changed signature of all g_static_mutex_* functions to take a pointer
1999-02-15  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h, glibconfig.h.win32, configure.in: Changed signature of
	all g_static_mutex_* functions to take a pointer rather than the
	struct itself. This is not an issue at the moment, because those
	funcs are really macros, but is it un'G'ish and might fall on our
	feet in the future.

	* gthread/testgthread.c (test_mutexes): Use new signature of
	g_static_mutex* functions.
1999-02-15 08:26:00 +00:00
Tim Janik
d31ba84c8e return guints instead of gints for g_hash_table_size and
Mon Feb 15 06:18:58 1999  Tim Janik  <timj@gtk.org>

        * glib.h: return guints instead of gints for g_hash_table_size
        and g_hash_table_foreach_remove.
1999-02-15 05:47:24 +00:00
Sebastian Wilhelmi
b37e032581 s/G_LOCK_DECLARE/G_LOCK_DEFINE/ throuhout glib. Added G_LOCK_EXTERN macro
1999-02-10  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h: s/G_LOCK_DECLARE/G_LOCK_DEFINE/ throuhout glib. Added
	G_LOCK_EXTERN macro to declare a lock externally.
1999-02-10 09:40:46 +00:00
Tim Janik
a8ff1b4fce fixed errernerous code wrt to thread specific error string allocation
Wed Feb 10 07:56:33 1999  Tim Janik  <timj@gtk.org>

        * gmodule.c (g_module_error): fixed errernerous code wrt to thread
        specific error string allocation handling.

Wed Feb 10 06:20:30 1999  Tim Janik  <timj@gtk.org>

        * gmutex.c (g_static_private_set): invoke destroy notifier when
        overwriting values, initialize new array fields with NULL.
        (g_static_private_free_data): do not skip destroy notification for
        data == NULL.

        * gutils.c (g_direct_equal): compare pointer values directly instead
        of just their guint values which is a loosing conversion for
        sizeof(gpointer)==8 systems.
        (g_get_any_init): restructured code so we don't use endless loops like
        while (1), which boil down to an ugly alias for goto.
        strip ,.* from the real name.
1999-02-10 08:06:26 +00:00
Tim Janik
8ad2623ded if !defined (G_LOG_DOMAIN) define G_LOG_DOMAIN as ((gchar*) 0) instead of
Sun Jan 17 16:14:03 1999  Tim Janik  <timj@gtk.org>

        * glib.h (g_error): if !defined (G_LOG_DOMAIN) define G_LOG_DOMAIN as
        ((gchar*) 0) instead of ((void*) 0) to silence egcs C++ mode, reported
        by Seth Alves <alves@hungry.com>.
1999-01-17 15:21:28 +00:00
Tim Janik
5c2fb3762f added a define G_HOOK_DEFERRED_DESTROY, to substitute a noop
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.
1999-01-17 14:52:20 +00:00
Tim Janik
08425ac4c2 incremented version number to 1.1.13, bin age 0, interface age 0.
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.
1999-01-17 04:49:43 +00:00
Tor Lillqvist
f477518c3a Merge in current Win32 version. Almost no Unix code touched.
* 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.
1999-01-16 23:46:42 +00:00
Manish Singh
b9dd5bc19c don't use inline for !__GNUC__ case with g_warning, g_error, and g_message
* glib.h: don't use inline for !__GNUC__ case with g_warning,
g_error, and g_message wrappers since some compilers throw
away arguments in this case

-Yosh
1999-01-13 19:30:15 +00:00
Jeff Garzik
b4c62873da alloca and vasprintf go away 1999-01-11 20:24:28 +00:00
Andrew T. Veliath
aaf8f430e0 fix macro to be shorthand of g_array_insert_vals.
* glib.h (g_array_insert_val): fix macro to be shorthand of
	g_array_insert_vals.
1999-01-05 00:33:10 +00:00
Tim Janik
72b139a74d adjusted the g_strdup_a, g_strndup_a and g_strconcat3_a macros so their
Mon Jan  4 14:38:11 1999  Tim Janik  <timj@gtk.org>

        * glib.h: adjusted the g_strdup_a, g_strndup_a and g_strconcat3_a macros
        so their arguments get only evaluated once. changed g_strconcat3_a to
        have the same semantics as g_strconcat, i.e. if a certain argument is
        NULL, the rest of the parameter list is skipped.

        * tests/alloca-test.c: removed #if/#endif G_HAVE_ALLOCA, we need to be
        able to compile on all systems. added test for g_strconcat() semantics.

        * we need a alloca() replacement for !G_HAVE_ALLOCA rsn!
1999-01-04 13:49:05 +00:00
Jeff Garzik
81224ac5ac Added g_alloca, g_new_a, g_new0_a macros. 1999-01-03 00:53:58 +00:00
Jeff Garzik
bbbfe78d70 Handle NULL strings like g_strdup. s/g_strconcat_a/g_strconcat3_a/ to
* glib.h:
        (g_strdup_a, g_strndup_a): Handle NULL strings like g_strdup.
        s/g_strconcat_a/g_strconcat3_a/ to reflect fixed number of args

        * testglib.c:
        Added g_strdup, g_strconcat checks.
        Added str==NULL checks for alloca string macros.
        s/g_strconcat_a/g_strconcat3_a/
1999-01-02 03:05:36 +00:00
Jeff Garzik
58aaa9d32b added g_strndup_a macro
* glib.h: added g_strndup_a macro

        * testglib.c:
        Added tests for new alloca-based string routines.
        Reformatted a couple strings.
1999-01-02 01:51:08 +00:00
Jeff Garzik
0e2f565f14 Added two new alloca-based function macros, g_strdup_a and g_strconcat_a.
* configure.in, glib.h:
        Added two new alloca-based function macros, g_strdup_a and
        g_strconcat_a.  These are stack-based and much faster than
        their g_malloc-based counterparts.  Kudos to Ulrich Drepper
        for help on this one.
1999-01-01 23:35:26 +00:00
Raja R Harinath
3558437281 Define to G[U]INT64_TO_{LE,BE}, not G[U]INT32_TO_{LE,BE}.
* glib.h (G[U]INT64_FROM_{LE,BE}):
Define to G[U]INT64_TO_{LE,BE}, not G[U]INT32_TO_{LE,BE}.

Wonder why it wasn't caught before.
1998-12-30 22:53:37 +00:00
Tim Janik
097c9b1798 there was a reference count race for hooks during invocation loops. since
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().
1998-12-21 21:43:00 +00:00
Owen Taylor
7f237f6fcd Add #defines defining scale of priorities.
Sat Dec 19 16:56:02 1998  Owen Taylor  <otaylor@redhat.com>

	* glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
	scale of priorities.
1998-12-19 22:21:39 +00:00
Tim Janik
e0153773a6 fixed up sys/poll.h and sys/types.h inclusions.
Sat Dec 19 04:27:17 1998  Tim Janik  <timj@gtk.org>

        * fixed up sys/poll.h and sys/types.h inclusions.
1998-12-19 03:44:30 +00:00
Tim Janik
c0c488e4ba fixed up gthread includes, cleaned up glibconfig.h a little bit.
Sat Dec 19 03:10:50 1998  Tim Janik  <timj@gtk.org>

        * fixed up gthread includes, cleaned up glibconfig.h a little bit.
1998-12-19 02:13:34 +00:00
Tim Janik
8be41eae4d new function to check whether a main loop has been quitted. (g_main_new):
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.
1998-12-18 02:23:33 +00:00
CST 1998 Shawn T. Amundson
77ccad4d2f giounix.c: s/g_main_poll_add/g_main_remove_add/g
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)
1998-12-17 04:36:04 +00:00
Tim Janik
a62ebb0e75 if !G_THREADS_ENABLED, eat the trailing semicolon with a bogus function
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.
1998-12-17 04:06:27 +00:00
Joel Becker
053793d72a changed func_data to user_data for g_scanner_scope_symbol_foreach() 1998-12-16 14:41:18 +00:00
Tim Janik
b2e318ff3e version bump to 1.1.8, binary age 0, interface age 0.
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/.
1998-12-16 05:38:35 +00:00
Owen Taylor
05d49ddbd3 Use an "inheritance" scheme for IO channel memory allocation.h
Tue Dec 15 17:17:46 1998  Owen Taylor  <otaylor@redhat.com>

	* glib.h giounix.c giochannel.c: Use an "inheritance"
	scheme for IO channel memory allocation.h
1998-12-15 22:30:15 +00:00
Sebastian Wilhelmi
d98c425676 Dont complain, if --without-threads or --with-threads=none is supplied;
1998-12-15  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: Dont complain, if --without-threads or
	--with-threads=none is supplied; Test for pthread_attr_init
	instead of pthread_cond_init, if threads seems to be supported by
	standard glib. (CFLAGS): Use G_THREAD_CFLAGS for compiling of glib
	as well.

	* glib.h, gmutex.c: Changed private to private_key to avoid
	problems when compiling with under C++.
1998-12-15 17:50:47 +00:00
Owen Taylor
931ea95265 This commit merges the glib-threads branch into the main
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.
1998-12-15 05:28:02 +00:00
Havoc Pennington
dca6fcb59c Rely on GDate::dmy and GDate::Julian flags, rather than re-checking the
1998-12-02  Havoc Pennington  <hp@pobox.com>

* gdate.c (g_date_valid): Rely on GDate::dmy and GDate::Julian
flags, rather than re-checking the validity of the actual
values. This should be the correct behavior, the old way was
leftover cruft.

* glib.h, gdate.c: Changed MDY to DMY throughout.
1998-12-02 18:47:10 +00:00
Owen Taylor
beab982e3b Merge main loop into head. This probably breaks Win32, until
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.
1998-12-02 14:55:27 +00:00
Sebastian Wilhelmi
c8477277fe changed `gpointer struct_tm_p' parameter of g_date_to_struct_tm back to
1998-12-02  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h:
	* gdate.c: changed `gpointer struct_tm_p' parameter of
	g_date_to_struct_tm back to `struct tm *tm' and forward declared
	`struct tm' in glib.h; yes, this is nice, we still need not
	include time.h.
1998-12-02 09:07:18 +00:00
Tim Janik
2886be294a s/time_t/GTime/ and s/g_print/g_message/ include time.h.
Wed Dec  2 02:10:59 1998  Tim Janik  <timj@gtk.org>

        * gdate.c: s/time_t/GTime/ and s/g_print/g_message/
        include time.h.

        * glib.h: removed #include <time.h>, changed time_t paramter of
        g_date_set_time() to time_t, changed struct tm parameter of
        g_date_to_struct_tm to `gpointer struct_tm_p'. yes, this is not
        nice, but including time.h actually breaks a bunch of code.
1998-12-02 02:24:14 +00:00
Havoc Pennington
a3e59c3ebf There are outstanding issues, but they should be resolvable in-place. If
this breaks something let me know and I will fix it.

1998-11-30  Havoc Pennington  <hp@pobox.com>

* gdate.c: New file, implements calendrical calculations.

* glib.h: Added declarations for GDate module.
1998-12-01 20:24:32 +00:00
Tim Janik
958f33656a added g_hook_list_marshal_check() to eventually destroy hooks after they
Mon Nov 30 07:12:10 1998  Tim Janik  <timj@gtk.org>

        * glib.h:
        * ghook.c: added g_hook_list_marshal_check() to eventually destroy
        hooks after they got marshalled.
1998-11-30 07:08:54 +00:00
Tim Janik
3a14f25fdf reverted the g_hash_table_set_key_freefunc() addition, since it's to
Thu Nov 26 01:36:20 1998  Tim Janik  <timj@gtk.org>

        * glib.h:
        * ghash.c: reverted the g_hash_table_set_key_freefunc() addition,
        since it's to specialized and needs to be resolved in a generic
        fashion.
1998-11-26 00:42:14 +00:00
PST 1998 Manish Singh
61bdacfb59 applied glib-tml-981120-0, change log appended below.
Tue Nov 24 18:57:59 PST 1998 Manish Singh <yosh@gimp.org>

        * applied glib-tml-981120-0, change log appended below.

        * glibconfig.h.win32: passthrough 64-bit constants unchanged, VC++
        infers them

Fri Nov 20 22:26:43 1998  Tor Lillqvist  <tml@iki.fi>

        * glib.h: Moved MSC pragmas from glib.h to glibconfig.h.win32.
        peer_offset field in WIN32 part of GIOChannel removed, need_wakeups
        added. Added "extern" to __declspec(dllimport).

        * gutils.c: Initialise need_wakeups.

        * glibconfig.h.win32: Pragmas moved here. Define G_GINT64_CONSTANT.

        * gmodule/gmodule.def: Added g_module_build_path.

        * gscanner.c: (g_scanner_cur_value) Move initailisation of v
        to before its use.

        * glib.def: Added g_(s)list_sort.

        * makefile.msc: A few more comments.

-Yosh
1998-11-25 03:02:56 +00:00