Commit Graph

215 Commits

Author SHA1 Message Date
Owen Taylor
df2f429cff -DG_DISABLE_DEPRECATED
Mon Mar 26 14:14:53 2001  Owen Taylor  <otaylor@redhat.com>

	* Makefile.am (INCLUDES): -DG_DISABLE_DEPRECATED

	* gmain.h timeloop.c: Surround the cruftiest stuff with
	#ifndef G_DISABLE_DEPRECATED.

	* gcompat.h gdate.h: Move compat defines back to
	gdate.h, surround with #ifndef G_DISABLE_DEPRECATED.
	Remove gcompat.h.
2001-03-26 19:23:17 +00:00
Tor Lillqvist
31c5b1899d Cygwin support contributed by Stefan Ondrejicka <ondrej@idata.sk>.
2001-02-21  Tor Lillqvist  <tml@iki.fi>

	Cygwin support contributed by Stefan Ondrejicka
	<ondrej@idata.sk>. Hopefully I got it all in while simultaneously
	adding support for auto*/libtool for mingw.

	* Makefile.am: Changes for auto* support on Cygwin and Win32. Do
	still distribute the hand-written makefiles and *.win32.in files,
	though. Use GIO, GSPAWN and PLATFORMDEP macros set by configure.
	Use -no-undefined. Pass -export-symbols glib.def to libtool.

	* configure.in: Define G_PLATFORM_WIN32 on both pure Win32 (mingw)
	and Cygwin. Add AC_CYGWIN, AC_EXEEXT and AC_LIBTOOL_WIN32_DLL
	calls for Cygwin and mingw support.  Check for %I64u guint64
	format (in MS C library). Set G_MODULE_IMPL on mingw and
	Cygwin. Use ac_object and ac_exeext.  Set GIO, GSPAWN, PLATFORMDEP
	and G_LIBS_EXTRA. Compile timeloop only on Unix. Define OS_WIN32
	automake conditional on Win32.

	* glib.h: Include gwin32.h also on Cygwin.

	* gfileutils.c (get_contents_posix): Use O_BINARY (defined as 0 on
	Unix) for Cygwin's sake.

	* gtimer.c (GETTIME): Reduce #ifdefs, use a macro GETTIME().

	* gconvert.c
	* gthread.c
	* gutf8.c
	* gutils.c: For code needed both on Cygwin and native Win32,
	test for G_PLATFORM_WIN32.

	* gmarkup.h: Use G_BEGIN_DECLS and G_END_DECLS.

	* gtypes.h: Refine GLIB_VAR definition. Also check for DLL_EXPORT
	in case compiling a static library on Win32 or Cygwin.

	* gwin32.c: No <direct.h> on Cygwin. No need for ftruncate() or
	dirent emulation on Cygwin.
	(get_package_directory_from_module) Convert return value from
	GetModuleFileName() to POSIX path on Cygwin.

	* tests/Makefile.am (progs_LDADD): Link with libglib, libgthread
	and libgmodule as appropriate. Use -no-undefined.

	* gbacktrace.c: Move #ifdefs around a bit on Win32.

	* gshell.c (unquote_string_inplace): Make static.
2001-03-09 21:23:33 +00:00
Ali Abdin
855e230f31 New gcompat.h header file as recommended by Havoc.
2000-12-24  Ali Abdin  <aliabdin@aucegypt.edu>

        * Makefile.am, gcompat.h, glib.h: New gcompat.h header file
          as recommended by Havoc.

        * gdate.c, gdate.h, testgdate.c,
          docs/reference/glib/glib-sections.txt,
          docs/reference/glib/tmpl/date.sgml, tests/date-test.c: Rename some
          of the gdate functions to use the '_get' in their name. Patch
          reviewed by Havoc.
2000-12-24 12:11:06 +00:00
Jonathan Blandford
2645aaf59c Patch from David Benson <daveb@idealab.com> to add user_data support to
Mon Nov 20 18:55:17 2000  Jonathan Blandford  <jrb@redhat.com>

	* gtree.[hc]: Patch from David Benson <daveb@idealab.com> to add
	user_data support to gtree functions.

Mon Nov 13 18:35:52 2000  Jonathan Blandford  <jrb@redhat.com>

	* gtypes.h (GCompareFuncData): new func type to let you use user
	data when comparing nodes.

	* gslist.c (g_list_sort_with_data): new function to sort with
	user_data.

	* glist.c (g_list_sort_with_data): new function to sort with
	user_data.

	* garray.[ch]: Added convenience functions to sort arrays.
2000-11-20 23:59:32 +00:00
Havoc Pennington
32ef70d4b2 New module to parse a simple markup language
2000-10-24  Havoc Pennington  <hp@pobox.com>

        * gmarkup.h, gmarkup.c: New module to parse a simple
	markup language

	* Makefile.am: add gmarkup.h, gmarkup.c

	* tests/Makefile.am: add markup-test

	* gstring.h (g_string_new_len): new function to create a string
	with a length
	(g_string_new): avoid a gratuitous realloc
2000-10-27 02:46:04 +00:00
Tor Lillqvist
4905022b8e Pass -DGSPAWN_HELPER when building it. Link with user32.lib.
2000-10-19  Tor Lillqvist  <tml@iki.fi>

	* makefile.msc.in: Pass -DGSPAWN_HELPER when building it. Link
	with user32.lib.

	* gspawn-win32.c
	* gfileutils.c: Make them compile with picky MSVC.

	* gwin32.h: New file. Move Win32-only stuff that isn't related to
	GIOChannels here from giochannel.h.

	* Makefile.am: Add it here.

	* giochannel.h: Move stuff to gwin32.h.

	* glib.h: On Win32, include gwin32.h.
2000-10-19 17:52:12 +00:00
Sebastian Wilhelmi
bceccd7243 Added the new headers to glibinclude_HEADERS.
2000-10-12  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* Makefile.am: Added the new headers to glibinclude_HEADERS.

	* glib.h: Forgot to include gerror.h.
2000-10-12 12:16:16 +00:00
Sebastian Wilhelmi
b1d1558747 Split glib.h into many header files mostly according to the resp.
2000-10-12  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h, galloca.h, garray.h, gasyncqueue.h, gbacktrace.h,
	gcache.h, gcompletion.h, gconvert.h, gdataset.h, gdate.h, ghash.h,
	ghook.h, giochannel.h, glist.h , gmacros.h, gmain.h, gmem.h,
	gmessages.h, gnode.h, gprimes.h, gquark.h, gqueue.h, grand.h,
	grel.h, gscanner.h, gslist.h, gstrfuncs.h, gstring.h, gthread.h,
	gthreadpool.h, gtimer.h, gtree.h, gtypes.h, gutils.h: Split glib.h
	into many header files mostly according to the resp. *.c-files.

	* gmacros.h: Added G_BEGIN_DECLS and G_END_DECLS to mean: 'in case
	of C++: extern "C" { ... }' analogous to glibc __BEGIN_DECLS and
	__END_DECLS.

	* configure.in, gerror.h, gfileutils.h, gshell.h, gspawn.h,
	gunicode.h, : Changed guard-macro names to something more
	consistent.

	* configure.in, *.h: Use G_BEGIN_DECLS and G_END_DECLS.
2000-10-12 11:52:07 +00:00
Havoc Pennington
8e3a3eef63 Add new files.
2000-10-09  Havoc Pennington  <hp@redhat.com>

        * Makefile.am, tests/Makefile.am: Add new files.

	* tests/spawn-test.c, tests/shell-test.c: new tests for
	the shell/spawn stuff

	* gutils.c (g_find_program_in_path): convert a relative
	program name into an absolute pathname to an existing
	executable

	* gspawn.h, gspawn.c: New fork/exec API

	* gshell.h, gshell.c: Shell-related utilities, at the moment
	simply routines to parse argv and quote/unquote strings

	* guniprop.c (g_unichar_isspace): Return TRUE for the
	ASCII space characters isspace() returns TRUE for.

	* gfileutils.c (g_file_get_contents): Convenience function
	to slurp entire file into a string and return it. Partially
	written by Joel Becker.
	(g_file_test): file test function
2000-10-09 16:24:57 +00:00
Tor Lillqvist
8e847255e8 Revamp to be like makefile.mingw.in, make the MSVC build actually work
2000-10-06  Tor Lillqvist  <tml@iki.fi>

	* makefile.msc.in: Revamp to be like makefile.mingw.in, make
	the MSVC build actually work again.

	* gmodule/makefile.msc.in
	* gobject/makefile.msc.in
	* gthread/makefile.msc.in: New files, like their mingw counterparts.

	* gmodule/Makefile.am
	* gobject/Makefile.am
	* gthread/Makefile.am: Make and distribute them.

	* */makefile.mingw.in: Allow override of GLib version number from
	the build/win32/module.defs file.

	* glib.def: Add new entry point.

	Fixes from Hans Breuer:

	* glib.h (struct DIR): Keep the last readdir result cached inside
	the DIR struct, to enable several DIRs being open simultaneously.

	* gwin32.c (g_win32_readdir): Use the above instead of static.

	* giowin32.c (g_io_channel_win32_make_pollfd): Insert cast to keep
	MSVC happy.
2000-10-06 21:32:59 +00:00
Sebastian Wilhelmi
e2085327a2 Changed alloca stuff a bit: when we have a working alloca.h, we're not
2000-10-05  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

        * glib.h: Changed alloca stuff a bit: when we have a working
        alloca.h, we're not messing with alloca any further. Should fix a
        bug reported by Bernd Demian <wega@csc-dd.de>.
2000-10-05 09:07:53 +00:00
Jonathan Blandford
b3ee868f94 Added function to keep symetry with g_node_insert_before. 2000-09-29
2000-09-29  Jonathan Blandford  <jrb@redhat.com>

	* gnode.c (g_node_insert_after): Added function to keep symetry
	with g_node_insert_before.
2000-09-29  Jonathan Blandford  <jrb@redhat.com>

	* glib/tmpl/trees-nary.sgml: Add g_node_insert_after().
2000-09-29 23:13:02 +00:00
Sebastian Wilhelmi
7633908c93 Added errorcheck mutexes. These are activated through the preprocessor
2000-09-29  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in, glib.h: Added errorcheck mutexes. These are
	activated through the preprocessor symbol
	G_ERRORCHECK_MUTEXES. Need to add an extra word to StaticMutex in
	order to achieve this. g_(static_)mutex_* functions instrument the
	mutex operations with mutex name and location, when compiled with
	-DG_ERRORCHECK_MUTEXES. g_thread_init activates the errorcheck
	mutexes, when compiled with -DG_ERRORCHECK_MUTEXES.

	* gthread/gthread-impl.c: Added errorcheck mutexes. New
        exported function
        g_thread_init_with_errorcheck_mutexes, which is called instead of
	g_thread_init, when compiled with -DG_ERRORCHECK_MUTEXES. New
	static functions
	g_mutex_(new|lock|trylock|unlock|free)_errorcheck_impl to
	implement errorcheck mutexes.

	* gthread/gthread-posix.impl.c, gthread/gthread-solaris-impl.c:
        Define the size of a mutex.
2000-09-29 13:10:41 +00:00
Havoc Pennington
349eaa6a25 fix indentation (GConvertError): generic error is conventionally called
2000-09-28  Havoc Pennington  <hp@pobox.com>

* glib.h (GThreadPriority): fix indentation
(GConvertError): generic error is conventionally called
_FAILED rather than _OTHER, at least at the moment,
according to GError docs in docs/reference.

* gconvert.c: s/_OTHER/_FAILED/
2000-09-29 02:56:43 +00:00
Elliot Lee
bef233642e Add G_GNUC_PURE macro (but don't use it anywhere).
Add G_GNUC_PURE macro (but don't use it anywhere).
2000-09-26 16:56:52 +00:00
Elliot Lee
723ef16447 Add a few missing G_GNUC_CONST's.
Add a few missing G_GNUC_CONST's.
2000-09-25 21:28:14 +00:00
Sebastian Wilhelmi
e2600b0476 Test for the existence of getcwd, and use it only when found.
2000-09-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* acconfig.h, configure.in, gutils.c: Test for the existence of
	getcwd, and use it only when found.

	* glib.h: Only use the gcc-variable-macro-argument-extension for
	gcc >= 2.4. Both patches from Jonas Oberg <jonas@gnu.org>.
2000-09-19 14:30:35 +00:00
Elliot Lee
86ce799cdf Sun Sep 17 2000 Elliot Lee <sopwith@redhat.com> Define g_alloca() as an
Sun Sep 17 2000 Elliot Lee <sopwith@redhat.com>
	* glib.h configure.in: Define g_alloca() as an alloca-that-works-anywhere.
	* gconvert.c: Fix warnings which could have caused problems on 64-bit platforms.
2000-09-17 22:18:48 +00:00
Owen Taylor
a212f93df2 Havoc Pennington's implementation of convenient character set conversion
Sun Sep 10 12:37:40 2000  Owen Taylor  <otaylor@redhat.com>

	* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
	of convenient character set conversion using iconv, with
	the addition of GError. We probably need a fallback that
	just does conversions between, say UTF-8,16,32 and ISO-8859-1
	for targets without iconv at all.

	Also add g_convert_with_fallback() to take care of conversions
	where we accept some loss going to the target encoding.
2000-09-11 03:03:18 +00:00
Tim Janik
9432265430 for non-i386 and non-alpha, or non gcc, implement BREAKPOINT() as raise (5
Mon Aug 21 03:57:46 2000  Tim Janik  <timj@gtk.org>

        * glib.h (G_BREAKPOINT): for non-i386 and non-alpha, or non gcc,
        implement BREAKPOINT() as raise (5 /* SIGTRAP */);

        * glib.h: provide user-definable switch G_IMPLEMENT_INLINES,
        to turn on compilation of inline function implementations provided
        in header files with extern linkage.
        wrap inline function implementations into ifdef __G_UTILS_C__, so we
        really only compile them for gutils.c and not also into arbitrary user
        code that wants to make use of G_IMPLEMENT_INLINES.
        adjusted comment apropriately.

        * gutils.c: to turn on compilation of inline functions, provide
        #define G_IMPLEMENT_INLINES 1 and #define __G_UTILS_C__.
2000-09-07 23:08:25 +00:00
Sebastian Wilhelmi
ef2dcd6265 s/G_MICROSEC/G_USEC_PER_SEC/
2000-09-06  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h, gtimer.c, tests/thread-test.c:
	s/G_MICROSEC/G_USEC_PER_SEC/

	* gthread/gthread-posix.c, gthread/gthread-solaris.c:
	s/G_MICROSEC/G_USEC_PER_SEC/ and s/G_NANOSEC/G_NSEC_PER_SEC/
2000-09-06 13:56:17 +00:00
Sebastian Wilhelmi
caeb4053e9 Removed G_G{U}{SHORT|INT|LONG}_FORMAT from glib.h, as they are really
2000-09-06  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h: Removed G_G{U}{SHORT|INT|LONG}_FORMAT from glib.h, as
	they are really superfluous.
2000-09-06 08:02:56 +00:00
Sebastian Wilhelmi
64bbfbb6da Include gerror.h before it is used for some g_thread_* functions.
2000-09-01  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h: Include gerror.h before it is used for some g_thread_*
	functions.

	* gthread.c, gthreadpool.c, glib.h: Enable error reporting for
	thread creation, namly for g_thread_create, g_thread_pool_new,
	g_thread_pool_push and g_thread_pool_set_max_threads.

	* tests/thread-test.c, tests/threadpool-test.c: Adapted
	accordingly.

	* gthread-posix.c (g_thread_create_posix_impl): Use GError to
	report errors.
2000-09-01 13:03:23 +00:00
Tor Lillqvist
3dcf39eb77 glib.h glib.def New function, to make a GPollFD from a GIOChannel. Creates
2000-08-31  Tor Lillqvist  <tml@iki.fi>

	* glib.h
	* glib.def
	* giowin32.c (g_io_channel_win32_make_pollfd): New function, to
	make a GPollFD from a GIOChannel. Creates the events and starts
	the reader thread if necessary.
2000-08-31 22:47:24 +00:00
Tor Lillqvist
ba8a71589d glib.h No use for separate condition parameter.
2000-08-31  Tor Lillqvist  <tml@iki.fi>

	* glib.h
	* giowin32.c (g_io_channel_win32_poll): No use for separate
	condition parameter.
2000-08-31 21:58:59 +00:00
Tor Lillqvist
55cd16c993 Hmm, the parameter to g_io_channel_win32_poll() should be a GPollFD array,
2000-08-27  Tor Lillqvist  <tml@iki.fi>

Hmm, the parameter to g_io_channel_win32_poll() should be
a GPollFD array, not GIOChannel. That way the caller can know which
channels cause the callback.
2000-08-27 15:33:15 +00:00
Tor Lillqvist
3d0a1b3b22 New function, otherwise like g_io_channel_win32_wait_for_condition(), but
2000-08-27  Tor Lillqvist  <tml@iki.fi>

	* giowin32.c (g_io_channel_win32_poll): New function, otherwise
	like g_io_channel_win32_wait_for_condition(), but accept several
	GIOChannels.
	(g_io_channel_win32_wait_for_condition): Call
	g_io_channel_win32_poll().

	* glib.h: Declare g_io_channel_win32_poll().

	* gwin32.c (g_win32_error_message): Don't believe return value
	from FormatMessage.
2000-08-27 10:53:36 +00:00
Elliot Lee
a435aaff03 Mark the following functions G_GNUC_CONST (to allow betteroptimization)
2000-08-25 Elliot Lee <sopwith@redhat.com>
	* glib.h, gunicode.h, gmodule/gmodule.h:
	Mark the following functions G_GNUC_CONST (to allow
	betteroptimization) because their results are a function of only their parameters:
	g_int_hash, g_int_equal, g_direct_hash, g_direct_equal, g_quark_to_string,
	g_date_is_leap_year, g_date_days_in_month, g_date_monday_weeks_in_year,
	g_date_sunday_weeks_in_year, g_spaced_primes_closest, g_unichar_is*,
	g_unichar_to*, g_unichar_*digit_value, g_unichar_type
2000-08-25 22:45:48 +00:00
Owen Taylor
33df64519d Fix a couple of trivial bugs that were causing warnings.
Mon Aug 21 14:46:23 2000  Owen Taylor  <otaylor@redhat.com>

	* tests/gio-test.c: Fix a couple of trivial bugs that
	were causing warnings.

Mon Aug 21 14:39:36 2000  Owen Taylor  <otaylor@redhat.com>

	* glib.h: Use C99 varargs macros where possible
	(check __STDC_VERSION__), otherwise, on gcc, use an alternate
	form of gcc varargs which is more likely
	to be supported going forward. (Based on some code
	from Raja Harinath)
2000-08-21 18:46:52 +00:00
Darin Adler
4010a5acb2 Return the data left behind. Return the data left behind.
* glib.h:
    * garray.c: (g_array_free), (g_ptr_array_free),
    (g_byte_array_free): Return the data left behind.
    * gstring.c: (g_string_free): Return the data left behind.

    Changed the free calls that leave data behind so they
    return a pointer to the left-behind data, NULL if told not
    to leave anything behind. This makes these calls easier
    to use correctly, without any incompatible API change for
    callers that don't know about the return value. Of course,
    it would be even clearer if the free calls weren't dual-purpose
    in the first place.
2000-08-17 21:37:18 +00:00
Tor Lillqvist
b965bb5db1 Finally, a new and improved IO Channel and condition watch implementation
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.
2000-07-29 20:59:07 +00:00
Tim Janik
c9bd7542e1 applied patch from Andreas Persenius <ndap@swipnet.se> that updates the
Wed Jul 26 12:59:31 2000  Tim Janik  <timj@gtk.org>

        * *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
        updates the license headers to the GNU Lesser General Public License,
        as well as updating the copyright year to 2000.
2000-07-26 11:02:02 +00:00
Tim Janik
83e49bd036 added g_strlcat() and g_strlcpy() wrappers, supplied by David Wheeler
Wed Jul 26 05:47:48 2000  Tim Janik  <timj@gtk.org>

        * configure.in:
        * testglib.c:
        * gstrfuncs.c:
        * glib.h: added g_strlcat() and g_strlcpy() wrappers, supplied by
        David Wheeler <dwheeler@ida.org>:

        * glib.h, gstrfuncs.c: added g_strlcpy and g_strlcat to support
          safe manipulation of fixed-length string buffers.
          These functions were originally developed by Todd Miller to simplify
          development of security-related programs, and
          are available on many (but not all) Unix-like systems,
          including OpenBSD, FreeBSD, and Solaris.  See
          ftp://ftp.openbsd.org/pub/OpenBSD/src/lib/libc/string/strlcpy.3
          and http://www.openbsd.org/security.html.
          If there's a strlcpy/strlcat on the system, it's called, otherwise
          an implementation is provided.

        * testglib.c: Added tests for g_strlcpy, g_strlcat.
2000-07-26 03:51:07 +00:00
Tim Janik
cb2f078051 include <stdlib.h> and <stddef.h> if STDC_HEADERS is defined.
Wed Jul 26 05:03:24 2000  Tim Janik  <timj@gtk.org>

        * acglib.m4 (GLIB_SIZEOF): include <stdlib.h> and <stddef.h> if
        STDC_HEADERS is defined.

        * glib.h:
        * glibconfig.h: define gsize and gssize in terms of GLIB_SIZEOF_SIZE_T

        * glib.h (g_return_if_reached): applied darin's fix for copy'n
        paste error in the macro implementation.
2000-07-26 03:18:27 +00:00
Tim Janik
623efc182c applied patch from Darin Adler <darin@eazel.com> which supplies
Wed Jul 26 00:46:03 2000  Tim Janik  <timj@gtk.org>

        * glib.h: applied patch from Darin Adler <darin@eazel.com> which
        supplies g_return_if_reached(), g_return_val_if_reached() and
        g_critical().
2000-07-25 22:48:09 +00:00
Sebastian Wilhelmi
fec9828ac6 Mark the functions g_basename and g_dirname deprecated. They will issue an
2000-07-20  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gutils.c, glib.h: Mark the functions g_basename and g_dirname
	deprecated. They will issue an warning once, when compiled with
	G_ENABLE_DEBUG, but continue to work as before. Instead the
	functions g_path_get_basename and g_path_get_dirname should be
	used, which BOTH return newly allocated memory, that has to freed
	by g_free. The new g_path_get_basename now strips trailing slashes
	from the path. This fixes #5097. For discussion see
	http://mail.gnome.org/pipermail/gtk-devel-list/2000-April/003139.html

	* gwin32.c, testglib.c, tests/dirname-test.c: Use the new
	functions instead of the old ones.

	* gmodule/libgplugin_a.c, gmodule/testgmodule.c: Use
	g_path_get_basename instead of the deprecated g_basename.
2000-07-20 16:58:54 +00:00
Sebastian Wilhelmi
84114c5321 Mark the functions g_hash_table_freeze, g_hash_table_thaw and thus
2000-07-20  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* ghash.c, gscanner.c, glib.h: Mark the functions
	g_hash_table_freeze, g_hash_table_thaw and thus
	g_scanner_freeze_symbol_table and g_scanner_thaw_symbol_table
	deprecated. They will issue an warning once, when compiled with
	G_ENABLE_DEBUG. This fixes Bug #3883. For discussion see
	http://mail.gnome.org/pipermail/gtk-devel-list/2000-April/003139.html
2000-07-20 16:06:33 +00:00
Sebastian Wilhelmi
cb931f4980 glibconfig.h and glib.h now include files outside of the extern "C" block.
2000-07-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in, glib.h: glibconfig.h and glib.h now include files
	outside of the extern "C" block. Makes some C++ compiler
	happy. Reported by Denis Vakatov <vakatov@peony.nlm.nih.gov>.

	* gmodule/gmodule.h: include glib.h before doing extern "C".
        Makes some C++ compiler happy. Reported by Denis Vakatov
	<vakatov@peony.nlm.nih.gov>.
2000-07-19 14:01:22 +00:00
Havoc Pennington
c38d1dd9e9 #include <gerror.h>
2000-07-12  Havoc Pennington  <hp@redhat.com>

* glib.h: #include <gerror.h>

* Makefile.am (include_HEADERS): Add gerror.h
(libglib_la_SOURCES): Add gbacktrace.c

* gbacktrace.c: Move g_on_error_query() in here (moved on the
server, so history is preserved)

* gerror.h: GError interface

* gerror.c: GError implementation replaces stuff that's now in
gbacktrace.c
2000-07-12 21:06:16 +00:00
Tor Lillqvist
39732afc59 Rename the GUTILS_C_VAR macro to GLIB_VAR.
2000-07-08  Tor Lillqvist  <tml@iki.fi>

* glib.h (GLIB_VAR): Rename the GUTILS_C_VAR macro to GLIB_VAR.

* gunicode.h: Mark the g_utf8_skip array with GLIB_VAR.

* glib.def: Add two missing entry points.
2000-07-08 12:40:09 +00:00
Owen Taylor
8384a1342e Comment g_get_codeset() out of the header file temporarily. (Very similar
Mon Jul  3 17:18:19 2000  Owen Taylor  <otaylor@redhat.com>

	* glib.h: Comment g_get_codeset() out of the header file
	temporarily. (Very similar to g_get_charset(), need
	to resolve the two.)
2000-07-03 21:20:34 +00:00
Owen Taylor
6e47268c14 updated
Thu Jun 29 15:57:28 2000  Owen Taylor  <otaylor@redhat.com>

        * NEWS: updated

	* Makefile.am: added snapcheck target to go along with snapshot

	* gstring.c glib.h (g_string_hash): Add g_string_hash to
	go along with g_string_equal.

Tue Jun 27 12:40:23 EDT 2000  David A. Wheeler <dwheeler@dwheeler.com>

	* glib.h: Added g_string_equal for comparing GStrings;
	changed g_str_equal so it returns gboolean (instead of gint).

	* gstring.c: Modified GString implementation to support embedded
	ASCII NUL ('\0') characters, and implemented g_string_equal.

	* testglib.c tests/string-test.c: Added tests for g_string_equal
	and tests for proper handling of embedded ASCII NUL characters.
2000-06-29 20:09:36 +00:00
Tim Janik
09f8e937f2 define gstring in terms of gchar*. this typedef reflects the type name of
Fri Jun 23 17:20:26 2000  Tim Janik  <timj@gtk.org>

        * glib.h: define gstring in terms of gchar*. this typedef reflects
        the type name of the primitive G_TYPE_STRING in the gobject module.

Sat Jun 24 23:03:04 2000  Tim Janik  <timj@gtk.org>

        * gtype.[hc]: provide G_TYPE_CHAR, G_TYPE_UCHAR, G_TYPE_BOOLEAN,
        G_TYPE_INT, G_TYPE_UINT, G_TYPE_LONG, G_TYPE_ULONG, G_TYPE_FLOAT,
        G_TYPE_DOUBLE and G_TYPE_STRING fundamental types.
        added a GTypeValueTable* pointer to GTypeInfo structure for types
        to implement GValue handling functions.
        GTypeValueTable contains the following members:
          value_init(): initialize a GValue structure.
          value_free(): free GValue structure contents (optional).
          value_copy(): copy one GValue contents to another GValue structure of
          collect_type: varargs collection type for the first variable argument
          to be collected by collect_value().
          collect_value(): variable arguments collection function (optional).
          lcopy_type: varargs collection type for the first variable argument
          to be location copyied by lcopy_value().
          lcopy_value(): variable arguments location copy function (optional).
        g_type_value_table_peek(): new function to retrive the GTypeValueTable*
        for a type node. ValueTables get inherited from parent types, unless
        overridden through the GTypeInfo structure. internally, GTypeValueTable
        support means an added overhead of one pointer per static or used
        dynamic type node.
        g_type_add_class_cache_func(): provide a cache_func/data pair to be
        called  prior to a type nodes last_unref() function, this can be used
        to prevent premature class destruction. multiple installed cache_func()
        will be chained upon last_unref() untill one of them returns TRUE.
        the cache_func()s have to check the type id passed in to figure whether
        they actually wants to cache the class of this type (since any types are
        routed through the cache_func() chain).
        g_type_remove_class_cache_func(): remove a previously installed
        cache_func/data pair. the cache maintained by this function has to be
        clear when calling g_type_remove_class_cache_func() to avoid leaks.
        g_type_class_unref_uncached(): class unref function for cache_func()
        implementations, unreferences a class omitting the cache chain (and
        therefore unref->cache->unref->... loops).

        * gvaluetypes.[hc]: provide the value setters/getters for the primitive
        fundamental types boolean, char, uchar, int, uint, long, ulong, float,
        double and string.

        * gvalue.[hc]: provide G_TYPE_IS_VALUE() in terms of whether a
        GTypeValueTable is provided for this type.
        removed g_value_init_default(), g_value_validate(), g_value_defaults(),
        g_value_set_default() and g_values_cmp() as these are supplied by the
        GParamSpec API now.
        moved g_values_exchange() into the "implementation details" section,
        since it just provides the underlying functionality for
        g_value_convert().

        * gvaluecollector.h: renamed the varargs value container from
        GParamCValue to GTypeCValue as the value collection methods are
        supplied by the type system now.
        G_PARAM_COLLECT_VALUE() and G_PARAM_LCOPY_VALUE() got renamed to
        G_VALUE_COLLECT() and G_VALUE_LCOPY() and operate without a
        GParamSpec structure now.

        * genums.h: macros cleanups/fixes.

        * genum.c: provide G_TYPE_ENUM and G_TYPE_FLAGS type
        and assorted g_value_{s|g}et_{enum|flags}() implementations.

        * gobject.[hc]:
        provide G_IS_VALUE_OBJECT(), G_TYPE_OBJECT ValueTable methods
        and g_value_{s|g}et_object().

        * gparam.[hc]: reduced class to value_set_default(),
        value_validate() and values_cmp(). also parameters now need to fill
        in a GType value_type; field to indicate the GValue type they
        are handling. provide g_param_value_set_default(),
        g_param_value_defaults(), g_param_value_validate() and
        g_param_values_cmp().

        * gparamspecs.[hc]: got rid of the g_value_* functions and
        the G_IS_VALUE_* macros. adapted param spec implementations
        according to the GParamSpecClass changes.
2000-06-24 22:30:10 +00:00
Owen Taylor
0891c64816 Initial pass at adding unicode support functions. A few things still need
Wed Jun 21 12:09:03 2000  Owen Taylor  <otaylor@redhat.com>

	* gunicode.h gutf8.c guniprop.c gunidecomp.[ch] gunichartables.h
	Makefile.am glib.h: Initial pass at adding unicode support
	functions. A few things still need to be implemented, a bit
	of cleanup needs to be done, tests need to be added, and
	the docs need to be finished, but this should allow replacing
	most or all use of libunicode.
2000-06-21 16:11:21 +00:00
Owen Taylor
e0b5636031 Move the g_locale_get_codeset() up in the header file to correspond to to
Tue May 30 16:01:32 2000  Owen Taylor  <otaylor@redhat.com>

	* glib.h gutils.c: Move the g_locale_get_codeset() up in the
	header file to correspond to to comments about memory
	management. Rename to g_get_codeset() to avoid
	polluting the g_locale_* namespace, which probably
	would have g_locale_get_codeset (GLocale *locale).
	Add a doc comment.
2000-05-30 20:05:23 +00:00
Owen Taylor
466305d0ca Add function to get the codeset name for the current locale.
Mon May 29 14:10:35 2000  Owen Taylor  <otaylor@redhat.com>

	* gutils.c (g_locale_get_codeset): Add function to get the
	codeset name for the current locale.

	* configure.in acconfig.h: Add check for nl_langinfo(CODESET);
2000-05-29 18:48:29 +00:00
Tim Janik
1fe02b28ad added argument assertments.
Fri May 19 11:39:29 2000  Tim Janik  <timj@gtk.org>


        * gutils.c (g_snprintf):
        (g_vsnprintf): added argument assertments.

        * gstring.c (g_string_assign): added argument assertments.
        (g_string_truncate): make len a guint.
2000-05-19 10:01:08 +00:00
Tor Lillqvist
77866eaf9b makefile.mingw.in tests/makefile.mingw.in Rename makefile.cygwin(.in) to
2000-05-13  Tor Lillqvist  <tml@iki.fi>

* makefile.mingw.in
* tests/makefile.mingw.in
* build-dll: Rename makefile.cygwin(.in) to
makefile.mingw(.in), which better describes what it is. Move the
build of gmodule, gthread and gobject DLLs to makefiles in those
directories. Move resource file handling and build number bump to
build-dll, where it sits much cleaner.

* README.win32
* Makefile.am (EXTRA_DIST): Update accordingly.

* glib.h: Add G_PI, G_PI_2, G_PI_4, G_E, G_LN2, G_LN10 and
G_SQRT2. M_PI etc aren't necessarily in <math.h> in strict ISO C
implementations.

* glib.def: Add g_strcanon.

* gtree.c (g_tree_node_rotate_left): Remove unused variables.

* gwin32.c (g_win32_opendir): Remove unneeded statement.

gmodule:

* makefile.mingw.in: New file, with gmodule stuff
moved from ../makefile.mingw.in.

* Makefile.am: Add to EXTRA_DIST, and add rule to make makefile.mingw.

gobject:
* makefile.mingw.in
* gobject.def
* gobject.rc.in: New files, for Win32 (mingw) build.

* Makefile.am: Add to EXTRA_DIST. Add rules to produce the
corresponding non-*.in files.

* gtype.h: (Win32:) Mark _g_type_fundamental_last for
export/import from DLL.

gthread:
* makefile.mingw.in: New file, with gthread stuff moved from
../makefile.mingw.in.

* Makefile.am: Add to EXTRA_DIST, add rule to build makefile.mingw.
2000-05-13 19:30:58 +00:00
Tim Janik
1df2ec98cb added gobject
Fri Apr 28 23:54:35 2000  Tim Janik  <timj@gtk.org>

        * setup things for a new sub-library libgobject:

        * Makefile.am (SUBDIRS): added gobject

        * glib-config.in: feature -lgobject.

        * configure.in (AC_OUTPUT): generate gobject/Makefile.

        * glib.m4 (AM_PATH_GLIB): feature gobject module.

        * glib.spec.in: added %{prefix}/lib/libgobject-1.3.so.*

Fri Apr 28 21:41:49 2000  Tim Janik  <timj@gtk.org>

        * glib.h: added G_STRLOC macro.
        G_STRUCT_OFFSET(): signedness corrections.
        (G_CSET_DIGITS): list 0-9.
        * gscanner.c (g_scanner_config_template): use G_CSET_DIGITS.

        * glib.h:
        * gstrfuncs.c:
        (g_strdown):
        (g_strup):
        (g_strreverse): return the modified string instead of void, so
        calls to these functions can be nested.
        (g_strcanon): new function, canonicalizes string according to
        a given character set.

Fri Apr 28 19:45:16 2000  Tim Janik  <timj@gtk.org>

        * gasyncqueue.c (g_async_queue_unref): get rid of an unused variable.
2000-05-12 15:23:16 +00:00
Sebastian Wilhelmi
1418fe3a6d New File implementing an asynchronous queue to be used for asynchronous
2000-04-28  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gasyncqueue.c: New File implementing an asynchronous queue to be
	used for asynchronous inter-thread communication.

	* gthreadpool.c: New File implementing a thread pool to be used
	for distributing work among several threads.

	* glib.h: Added the type and function declarations for these two
	types.

	* tests/threadpool-test.c: New File implementing a test for the
	thread pool. This also checks the asynchronous queue underlying
	the thread pool.

	* tests/Makefile.am: Changed accordingly.
2000-04-28 12:24:53 +00:00