Commit Graph

165 Commits

Author SHA1 Message Date
Sebastian Wilhelmi
d5fccfb0eb Changed the 'value' parameter of g_cache_remove from gpointer to
2000-04-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h, gcache.c, gtree.c: Changed the 'value' parameter of
	g_cache_remove from gpointer to gconstpointer. Dito for the 'key'
	parameter of g_tree_lookup and g_tree_remove and the 'data'
	parameter of g_tree_serach. This function now takes a function of
	type GCompareFunc instead of GSearchFunc.

	* glib.h: Removed declaration of GSearchFunc.

	* gmem.c: s/GSearchFunc/GCompareFunc/.
2000-04-26 08:42:19 +00:00
Sebastian Wilhelmi
1383e5b642 Made the debugging G_TRYLOCK call also work for compilers with funnt
2000-04-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h (G_TRYLOCK): Made the debugging G_TRYLOCK call also work
	for compilers with funnt G_STMT_(START|END) macros.

	* tests/thread-test.c: Implemented a check for that.
2000-04-19 09:29:19 +00:00
Sebastian Wilhelmi
e366512775 Changed the win32 part of this function to be thread safe and to make the
2000-04-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gutils.c (g_getenv): Changed the win32 part of this function to
	be thread safe and to make the returned environment string
	persistent to match the UN*X behavior. This is again a response to
	Bug #8983.

	* glib.h (G_LOCK_NAME): Removed parentheses around the lock name,
	as that seems to cause problems for some compilers and really
	isn't necessary.
2000-04-19 08:43:52 +00:00
Sebastian Wilhelmi
059f5b9416 Changed the 'data' parameters from gpointer to gconstpointer for the
2000-04-18  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h, glist.h, gslist.h: Changed the 'data' parameters from
	gpointer to gconstpointer for the functions
	g_(list|slist)_(remove|find|find_custom|index), as they do not
	change this parameter. This fixes bug #4836.
2000-04-18 14:01:33 +00:00
Sebastian Wilhelmi
7c467669cc Changed comment for g_getenv to reflect, that the returned memory must not
2000-04-18  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h: Changed comment for g_getenv to reflect, that the
	returned memory must not be freed. Fixes Bug #8983.
2000-04-18 13:00:35 +00:00
Sebastian Wilhelmi
03f9d485c1 Added g_(array|ptr_array|byte_array)_sized_new functions, that reserve a
2000-04-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* garray.c, glib.h: Added g_(array|ptr_array|byte_array)_sized_new
	functions, that reserve a certain amount of memeory for the array
	at creation time to avoid reallocation. Fixes bug #6707 from
	Charles Kerr <ckerr@osserver1.nssl.noaa.gov>.
2000-04-17 10:59:46 +00:00
Sebastian Wilhelmi
8f02fac4ad Renamed g_queue_create to g_queue_new in conformance to all other GLib
2000-04-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h, gqueue.c, tests/queue-test.c (main): Renamed
	g_queue_create to g_queue_new in conformance to all other GLib
	data types.
2000-04-17 10:31:10 +00:00
Sebastian Wilhelmi
66034865b1 always define G_GNUC_EXTENSION, even when not needed by GLib. That's
2000-03-21  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h, configure.in, gutils.h: always define G_GNUC_EXTENSION,
	even when not needed by GLib. That's actually also the way, the
	GLib reference manual describes that macro. Therefore I had to
	remove the lonesome #include <glibconfig.h> in gutils.c, which
	doesn't seem to be needed there however. This change should make
	Ben Gertzfield <che@debian.org> happy.

	* gutils.c: Furthermore two warnings in gutils.c were voided,
	which crept in due to my last change.
2000-03-21 15:21:41 +00:00
Sebastian Wilhelmi
5e7134375e Added the missing POSIX_NO_YIELD and POSIX_NO_PRIORITIES warning messages.
2000-03-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: Added the missing POSIX_NO_YIELD and
	POSIX_NO_PRIORITIES warning messages.

	* configure.in: Use AC_TRY_RUN instead of AC_TRY_LINK, to test for
	real thread support. On solaris pthread_create can be linked to
	even in -lc, but it doesn't work then.

	* configure.in: Don't use priorities for threads, when the
	minimal/maximal priorities couldn't be determined at configure
	time.

	* configure.in, gthread.c: Always define GSystemThread in
	glibconfig.h to represent a system thread.

	* configure.in: Do not use native recursive threads, when
	possibe. We use some features, that they do not expose (namely the
	depth counter).

	* glib.h, gthread.c: Redefined GStaticRecMutex. The functions are
	now implemented in a different way, which should be way
	faster. Alsothere are now functions g_static_rec_mutex_unlock_full
	and g_static_rec_mutex_lock_full to leave/enter a recursive mutex
	completly.

	* gthread.c (g_thread_self): Do not test the system_thread to be
	non-zero to speed things up.

	* gthread.c (g_mutex_init): Therefore set the system_thread of the
	main thread here.

	* tests/thread-test.c: Rerun all tests once again, but this time
	we fool the system into thinking, that the available thread system
	is not native, but userprovided.

	* gthread/gthread-posix.c: Don't use priorities for threads,
	when the minimal/maximal priorities couldn't be determined at
	configure time.

	* gthread/gthread-posix.c: Don't check for errors, when
	setting the scope of a tread to system, as some posix
	implementations can't do that and we don't want the thing to
	fail because of that.
2000-03-17 14:49:59 +00:00
Tor Lillqvist
c35ab34774 New function that returns the message string for a Win32 error code.
2000-03-04  Tor Lillqvist  <tml@iki.fi>

* gwin32.c (g_win32_error_message): New function that returns the
message string for a Win32 error code.

* glib.h: Declare it.

* glib.def: Export it, plus g_node_copy.

* gmodule-win32.c: Call g_win32_error_message() to get the error
message strings.

* libgplugin_a.c
* libgplugin_b.c
* gmodule.c: Remove LibMain functions that were needed by LCC,
which is not a supported compiler.

* testgmodule.c (main): Test for G_MODULE_IMPL ==
G_MODULE_IMPL_WIN32, not G_OS_WIN32.

* gmoduleconf.h.win32: Remove LCC stuff from here, too.
2000-03-01 09:44:10 +00:00
Tim Janik
db8baf6978 minor optimization.
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.
2000-03-01 09:44:10 +00:00
Havoc Pennington
cf24ff7121 changed g_str_hash() to a 31 bit version based on a submission by Karl
Thu Feb 17 12:53:44 2000  Tim Janik  <timj@gtk.org>

        * gstring.c: changed g_str_hash() to a 31 bit version based on
        a submission by Karl Nelson and hand optimized ad absurdum by
        various people ;)

        * gstring.c: applied patch from havoc for new gstring functions,
        added some more sanity checks, coding style fixups.

2000-02-13  Havoc Pennington  <hp@pobox.com>

        * tests/string-test.c (main): Add tests for the new GString
        features

        * testglib.c (main): Add tests for the new GString features

        * gstring.c (g_string_insert_len): New function; insert
        a given length of string at a given position.
        (g_string_append): reimplement in terms of g_string_insert_len
        (g_string_append_len): new function
        (g_string_insert_c): accept -1 for "pos" arg to mean "append"
        (g_string_append_c): reimplement in terms of g_string_insert_c
        (g_string_prepend): reimplement in terms of g_string_insert_len
        (g_string_prepend_len): new function
        (g_string_prepend_c): reimplement in terms of g_string_insert_c
        (g_string_insert): reimplement in terms of g_string_insert_len

        * glib.h: Declare g_string_insert_len, g_string_append_len,
        g_string_prepend_len
2000-02-17 11:57:35 +00:00
Tim Janik
bbb532d59c return stolen data from g_datalist_id_remove_no_notify() and
Fri Feb  4 19:36:05 2000  Tim Janik  <timj@gtk.org>

        * glib.h:
        * gdataset.c: return stolen data from g_datalist_id_remove_no_notify()
        and g_dataset_id_remove_no_notify() to avoid second lookup for common
        use.
2000-02-03 20:43:00 +00:00
Tor Lillqvist
c22cf34e92 glib.h New functions for conversion between UTF-8 and the encoding
2000-02-01  Tor Lillqvist  <tml@iki.fi>

* glib.h
* gstrfuncs.c (g_filename_to_utf8, g_filename_from_utf8): New
functions for conversion between UTF-8 and the encoding expected
by C runtime functions like open() and stat(), and returned by
readdir().

Implement them on Win32 where we use the system "ANSI" codepage,
which might be single-byte or double-byte. On Unix, just skip the
issue for now and provide dummy implementations that return a copy
of the argument.

* README.win32
* build-dll
* glib.def: Minor updates.
2000-02-02 23:39:32 +00:00
Tim Janik
ce4d6765c9 s/current_time/dispatch_time/ for the dispatch() handlers. refetch the
Wed Jan 26 05:24:38 2000  Tim Janik  <timj@gtk.org>

        * glib.h:
        * gmain.c: s/current_time/dispatch_time/ for the dispatch() handlers.
        refetch the current time after invocation of poll() to cover up for
        the time spent in that function call.
2000-01-26 04:29:06 +00:00
Owen Taylor
948f64a183 Added G_N_ELEMENTS macro to determine the number of elements in an array.
Fri Jan 21 10:18:24 2000  Owen Taylor  <otaylor@redhat.com>

	* glib.h (G_N_ELEMENTS): Added G_N_ELEMENTS macro to determine
	the number of elements in an array.
2000-01-21 15:27:39 +00:00
Sebastian Wilhelmi
c54892b11b This of course should return TRUE in a program with a thread-disabled
1999-11-25  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h (G_TRYLOCK): This of course should return TRUE in a
	program with a thread-disabled GLib.
1999-11-25 13:47:55 +00:00
Sebastian Wilhelmi
760a7ceef2 Renamed GLIB_SIZEOF_PTHREAD_T to GLIB_SIZEOF_SYSTEM_THREAD to reflect
1999-11-16  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

        * acconfig.h, config.h.win32.in, configure.in: Renamed
        GLIB_SIZEOF_PTHREAD_T to GLIB_SIZEOF_SYSTEM_THREAD to reflect
        changed meaning.

        * configure.in: Cope with systems, that have a pthread_t type,
        that is not a pointer. Hint from Karl Nelson
        <kenelson@ece.ucdavis.edu>. Define GLIB_SIZEOF_SYSTEM_THREAD to 4
        for Solaris. Cope with systems, that have no default mutex
        initialize, like obviously most DCE systems.

        * glib.h, gthread.c: Changed the prototype of thread_create and
        thread_self to return the system thread into provided memory
        instead of a return value. This is necessary, as HPUX has a
        pthread_t, that is bigger than the biggest integral type there.

        * gthread.c: system_thread is no longer a pointer, but an memory
        area of size GLIB_SIZEOF_SYSTEM_THREAD. Changed the
        zeroinitialization and the tests for zeroness accordingly.
1999-11-16 10:30:25 +00:00
Tor Lillqvist
6c5ec62da2 glib.h Rename Win32-only functions from gwin_* to g_win32_* to match the
1999-11-01  Tor Lillqvist  <tml@iki.fi>

* glib.h
* glib.def: Rename Win32-only functions from gwin_* to g_win32_*
to match the GLib naming conventions.

* gutils.c
* gwin32.c
* testglib.c
* makefile.{cygwin,msc}: Move the Win32-only functions to the new
file gwin32.c
1999-11-01 20:46:44 +00:00
Tor Lillqvist
30cc3ed1fe Don't crash if removing a nonexistent value.
1999-10-31  Tor Lillqvist  <tml@iki.fi>

* gcache.c (g_cache_remove): Don't crash if removing a nonexistent
value.

* gutils.c (gwin_getlocale): New Win32-specific function, returns
a Unixish current locale string (en, zh_TW etc).

* glib.h: Declare it.

* glib.def: Export it.

* testglib.c: Test it.

* gmessages.c (Win32: ensure_stdout_valid): Some improvements,
make sure we don't call AllocConsole several times, which I think
has happened.
1999-10-31 12:15:34 +00:00
Tim Janik
9a65b20e07 removed useless g_string(x) macro that cluttered the namespace and was
Tue Oct 12 14:17:12 1999  Tim Janik  <timj@gtk.org>

        * glib.h: removed useless g_string(x) macro that cluttered the namespace
        and was just a poor wrapper around the cpp '#' symbol, use #x if you
        need to work around this.
        added new macro G_STRINGIFY(arg) that will convert arg to a string,
        no matter whether it contains macros or not.
1999-10-14 22:04:24 +00:00
Tor Lillqvist
52ad8a9c2a Define the new GLIB_SIZEOF_* constants here, too.
1999-10-12  Tor Lillqvist  <tml@iki.fi>

* config.h.win32.in: Define the new GLIB_SIZEOF_* constants here,
too.

* glib.h: Small Win32 comments improvement.
1999-10-12 20:46:13 +00:00
Tim Janik
30a1e1addb completly new implementation for printf string upper bounds calculation.
Tue Oct 12 12:16:12 1999  Tim Janik  <timj@gtk.org>

        * gmessages.c (g_printf_string_upper_bound): completly new implementation
        for printf string upper bounds calculation.
        we handle all glibc 2.1 format specifiers now, except for positional
        parameters (%nn$...) and wide char strings, plus some obscure upper
        case variants of the standard conversions. this fixes a lot of
        bugs in the old code, i.e.
        - NULL format strings
        - floats with exponents >+24
        - %G
        - precision specifications in general
        - negative field widths
        - %p for SIZEOF_VOID_P > 4 platforms
        we now issue warnigns in places where the old code would have
        caused buffer overruns anyways. warnings are suppressed when invoked
        from glogv(), to avoid infinite recursions if someone passes a log
        message that comes with really obscure format specifications.

Tue Oct 12 11:49:00 1999  Tim Janik  <timj@gtk.org>

        * gstrfuncs.c: nuked old g_printf_string_upper_bound() version.

Tue Oct 12 03:34:40 1999  Tim Janik  <timj@gtk.org>

        * glib.h: added GFloatIEEE754 and GDoubleIEEE754 unions to access sign,
        mantissa and exponent of IEEE floats and doubles (required by the new
        version of g_printf_string_upper_bound). the unions are endian specific,
        we handle G_LITTLE_ENDIAN and G_BIG_ENDIAN as of currently. ieee floats
        and doubles are supported (used for storage) by at least intel, ppc and
        sparc, reference:
        http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html

Mon Oct 11 18:01:49 1999  Tim Janik  <timj@gtk.org>

        * configure.in: added additional checks to figure sizes of size_t,
        ptrdiff_t and intmax_t (required by g_printf_string_upper_bound).
1999-10-12 12:08:13 +00:00
Tor Lillqvist
374c870b96 Drop the mapping of POSIX function names to the underscored versions, it's
* glib.h: (Win32) Drop the mapping of POSIX function names to the
underscored versions, it's unnecessary after all. With MSVC we get
them from oldnames.lib, with gcc-2.95 and mingw32 from
-lmoldname-msvc. Add comment about what headers to include for
prototypes.
1999-10-05 16:05:38 +00:00
Manish Singh
7ea73a0199 G_OS_FOO #defines. I *think* I got the cygwin and beos stuff right, but
I haven't tested it. The respective porters should fix any screwups

-Yosh
1999-10-04 02:32:50 +00:00
Tim Janik
4944d4df46 define NULL as (0L) if __cplusplus is defined, to avoid "ANSI C++ forbids
Wed Sep 22 01:53:18 1999  Tim Janik  <timj@gtk.org>

        * glib.h (NULL): define NULL as (0L) if __cplusplus is defined, to
        avoid "ANSI C++ forbids implicit conversion from `void *' in argument
        passing" errors upon NULL usage in C++ programs (gcc-2.95 is on crack
        for erroring out on this, instead of just issueing a warning).

        * glib.h (g_trash_stack_pop): use uncasted NULL again.
1999-09-21 23:55:19 +00:00
Tim Janik
2a6f3bd69a add explicit (GTrashStack*) cast for NULL pointer to cure ANSI C++ error.
Thu Sep 16 13:19:54 1999  Tim Janik  <timj@gtk.org>

        * glib.h (g_trash_stack_pop): add explicit (GTrashStack*) cast for NULL
        pointer to cure ANSI C++ error.
1999-09-17 06:03:09 +00:00
Tor Lillqvist
80c44ef391 Add a cast.
* glib.h (g_trash_stack_push): Add a cast.

	* gslist.c
	* glist.c: Make the inline functions static inline, and add
	separate extern wrappers. Not all compilers produce callable entry
	points for inline functions, even if gcc does.
1999-08-17 17:41:01 +00:00
Tim Janik
4e858aebdb removed comma 1999-08-16 03:36:57 +00:00
Tim Janik
9c53053abe eliminate memset() call, since string.h has not neccessarily been included
Sun Aug 15 02:47:14 1999  Tim Janik  <timj@gtk.org>

        * glib.h (g_trash_stack_pop): eliminate memset() call, since string.h
        has not neccessarily been included prior to glib.h.

Mon Aug  2 21:03:10 1999  Tim Janik  <timj@gtk.org>

        * configure.in: added --enable-msg-prefix option.

        * gmessages.c (g_log_default_handler): feature "prg_name (pid:%u): "
        if --enable-msg-prefix was selected (use "(process:%u): " if
        g_get_prgname () returns NULL, along the lines of g_on_error_query).
1999-08-15 00:58:48 +00:00
Tor Lillqvist
1c6c7f7489 glib.h gstrfuncs.c Rename g_strccpy to g_strcompress and g_strecpy to
* glib.h
	* gstrfuncs.c
	* tests/strfunc-test.c: Rename g_strccpy to g_strcompress and
	g_strecpy to g_strescape per Tim Janik's suggestion. Dropped the
	destination parameter, always g_malloc a new string.  Fix bug in
	g_strcompress, octal digits were gobbled up without limit, should
	use max three.

	Sources that use g_strescape must have ifdefs to be compilable
	both with GLib 1.2 and 1.3.
1999-08-02 23:16:32 +00:00
Manish Singh
4877766d0e glib.h the #define for g_strescape interfered with the compilation of the
* glib.h
* gstrfuncs.c: the #define for g_strescape interfered with the
compilation of the function, so just remove the function and
note that it's deprecated in the header

-Yosh
1999-08-01 00:54:14 +00:00
Tor Lillqvist
1146c6fbb3 New functions.
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.

	* glib.h: Declare and document them. Define the deprecated
	g_strescape as a macro that calls g_strecpy.

	* tests/strfunc-test.c (main): Test them.

	* makefile.{cygwin,msc}.in
	* tests/makefile.{cygwin,msc}.in: Remove gstack and its test
	program.

	* glib.def: Additions and removals.

	* README.win32: Improve gcc build instructions.

	* build-dll: Also build import library for MSVC.
1999-07-31 21:45:21 +00:00
Tim Janik
87c7aeb93b 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.
1999-07-24 18:50:58 +00:00
Tor Lillqvist
da87b1ac85 Correct URL for mingw runtime sources.
* README.win32: Correct URL for mingw runtime sources.

	* build-dll: Combine commands with &&.

	* glib.h: Map also rmdir() and hypot() for MSVCRT library.

	* makefile.cygwin.in
	* tests/makefile.cygwin.in: New DLL naming style. GCC-compiled DLLs are
 	now called *.gcc.dll, to avoid binary incompatibilities with
 	MSVC-compiled versions.

	* makefile.msc.in: Cosmetics.
1999-07-12 23:11:27 +00:00
Sebastian Wilhelmi
d610460c22 Added a g_memmove replacement for platforms without memmove, where bcopy
1999-07-01  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in, acconfig.h, gutils.c: Added a g_memmove
	replacement for platforms without memmove, where bcopy can't
	handle overlapping copies and the corresponding checks, which is
	taken form the PERL Configure routine.

	* glib.h: Updated the commentary about g_memmove to be right and
	more GLib-like.

	* configure.in: Removed test for rand_r, as it isn't used anymore.
1999-07-01 09:30:18 +00:00
Sebastian Wilhelmi
f80d6cc540 Finally removed the g_random_normal and g_rand_normal functions.
1999-06-30  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h, grand.c: Finally removed the g_random_normal and
	g_rand_normal functions.
1999-06-30 08:10:01 +00:00
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