Commit Graph

2696 Commits

Author SHA1 Message Date
Matthias Clasen
503db3a1fa bump version 2006-05-15 17:40:38 +00:00
Matthias Clasen
ba7dd25959 2.11.1 2006-05-15 17:16:28 +00:00
Matthias Clasen
24fb387fb9 Fix a ChangeLog misedit 2006-05-15 15:29:21 +00:00
Matthias Clasen
f765f65eda Fix several cases of deref-before-NULL-check. (#341191, Pascal Terjan)
2006-05-13  Matthias Clasen  <mclasen@redhat.com>

	* glib/grel.c: Fix several cases of deref-before-NULL-check.
	(#341191, Pascal Terjan)
2006-05-13 04:36:45 +00:00
Matthias Clasen
a052fd1202 Allow optional summary and description texts before and after the option
2006-05-13  Matthias Clasen  <mclasen@redhat.com>

	* glib/glib.symbols:
	* glib/goption.h:
	* glib/goption.c: Allow optional summary and description
	texts before and after the option descriptions, and add
	a way to translate them.  (#336120, Behdad Esfahbod)
2006-05-13 04:23:38 +00:00
Tor Lillqvist
d5b919142b Implement setting/clearing G_IO_FLAG_NONBLOCK for channels attached to
2006-05-12  Tor Lillqvist  <tml@novell.com>

	* glib/giowin32.c (g_io_win32_sock_set_flags): Implement
	setting/clearing G_IO_FLAG_NONBLOCK for channels attached to
	sockets. (#341192)
	(g_io_win32_unimpl_set_flags): set_flags method for the
	unimplemented case.
2006-05-12 13:20:36 +00:00
Bastien Nocera
93ec25ad67 add documentation for G_OPTION_ARG_INT64
2006-05-11  Bastien Nocera  <hadess@hadess.net>

	* glib/tmpl/option.sgml: add documentation for G_OPTION_ARG_INT64

2006-05-11  Bastien Nocera  <hadess@hadess.net>

	* glib/goption.c: (parse_int64), (parse_arg), (free_changes_list):
	* glib/goption.h:
	* tests/option-test.c: (arg_test6), (main): add an int64 type for
	GOption (G_OPTION_ARG_INT64) (#341237)
2006-05-11 18:37:15 +00:00
Sebastian Wilhelmi
268084caf9 Make the magic and location arguments to the error-checking-mutex
2006-05-10  Sebastian Wilhelmi  <wilhelmi@google.com>

	* glib/gthread.h, gthread/gthread-impl.c: Make the magic and
	location arguments to the error-checking-mutex functions const and
	do not write to them, as we might not own them. Clean up the
	error-checking-mutex code quite a bit. (#335198, Chris Wilson)
2006-05-11 00:18:46 +00:00
Sebastian Wilhelmi
a93560b83d Use g_atomic_pointer_set instead of old homegrown version now that we have
2006-05-10  Sebastian Wilhelmi  <wilhelmi@google.com>

	* glib/gthread.c: Use g_atomic_pointer_set instead of old
	homegrown version now that we have it. (#335198, Chris Wilson)
2006-05-11 00:10:29 +00:00
Sebastian Wilhelmi
685da6b099 Prevent calling into g_cond_wait resp. g_mutex_lock/unlock directly to
2006-05-10  Sebastian Wilhelmi  <wilhelmi@google.com>

	* gthread/gthread-posix.c, gthread/gthread-win32.c: Prevent
	calling into g_cond_wait resp. g_mutex_lock/unlock directly to
	avoid recursions into the errorcheking mutex code (and out of
	principle anyway). (#335198, Chris Wilson)
2006-05-11 00:08:31 +00:00
Sebastian Wilhelmi
a194e2e971 Adapt to GLib coding standards.
2006-05-10  Sebastian Wilhelmi  <wilhelmi@google.com>

	* tests/errorcheck-mutex-test.c: Adapt to GLib coding standards.
2006-05-10 23:58:27 +00:00
Sebastian Wilhelmi
e4f8f3b95c Renamed to glib/gthreadprivate.h and moved system thread identifier
2006-05-09  Sebastian Wilhelmi  <wilhelmi@google.com>

	* glib/gthreadinit.h: Renamed to glib/gthreadprivate.h and moved
	system thread identifier comparision and assignment macros from
	glib/gthread.c to glib/gthreadprivate.h.

	* glib/Makefile.am, glib/gatomic.c, glib/gconvert.c, glib/gmain.c,
	glib/gmem.c, glib/gmessages.c, glib/grand.c, glib/gslice.c,
	glib/gthread.c, glib/gutils.c, gthread/gthread-impl.c: Use
	glib/gthreadprivate.h instead of glib/gthreadinit.h.

	* gthread/gthread-impl.c: Use GSystemThread instead of GThread for
	owner determination. This fixes #311043 and is mostly modeled
	after the patch from jylefort@FreeBSD.org.
2006-05-10 00:44:50 +00:00
Sebastian Wilhelmi
307391459d Use canonical include form for internal headers. config.h is always there.
2006-05-09  Sebastian Wilhelmi  <wilhelmi@google.com>

	* glib/gprintf.c, glib/gspawn-win32.c, glib/gutf8.c,
	gthread/gthread-impl.c, gthread/gthread-posix.c,
	gthread/gthread-win32.c: Use canonical include form for internal
	headers. config.h is always there.
2006-05-09 23:07:27 +00:00
Sebastian Wilhelmi
3668e63687 Remove obsolete gthread/gthread-solaris.c.
2006-05-09  Sebastian Wilhelmi  <wilhelmi@google.com>

	* Remove obsolete gthread/gthread-solaris.c.
2006-05-09 23:00:04 +00:00
Matthias Clasen
eb9ff05320 Use encoding names which may work better on Solaris. (#340434, Alessandro
2006-05-08  Matthias Clasen  <mclasen@redhat.com>

	* tests/convert-test.c (test_one_half): Use encoding names which
	may work better on Solaris.  (#340434, Alessandro Vesely)
2006-05-08 16:58:24 +00:00
Matthias Clasen
eda3af5546 Add some tests for invalid floating point numbers.
2006-05-08  Matthias Clasen  <mclasen@redhat.com>

	* tests/keyfile-test.c (test_number): Add some tests for
	invalid floating point numbers.
2006-05-08 16:48:47 +00:00
Matthias Clasen
727f0fea57 Make const, noticed by Kjartan Maraas.
2006-05-08  Matthias Clasen  <mclasen@redhat.com>

	* glib/gscanner.c (g_scanner_config_template): Make const,
	noticed by Kjartan Maraas.
2006-05-08 13:38:55 +00:00
Matthias Clasen
6fbcec14dc Fix invalid memory reads. (#340816, Nick Treleaven)
2006-05-06  Matthias Clasen  <mclasen@redhat.com>

	* glib/gkeyfile.c (g_key_file_set_string_list)
	(g_key_file_set_locale_string_list): Fix invalid memory
	reads.  (#340816, Nick Treleaven)
2006-05-07 04:02:06 +00:00
Alexander Larsson
ac059df75b Fix OOB write (#340538)
2006-05-04  Alexander Larsson  <alexl@redhat.com>

	* glib/gbase64.c: (g_base64_decode_step):
	Fix OOB write (#340538)
2006-05-04 15:53:36 +00:00
Matthias Clasen
92dc9fe794 Add some more tests.
2006-05-03  Matthias Clasen  <mclasen@redhat.com>

	* tests/base64-test.c: Add some more tests.
2006-05-03 15:27:40 +00:00
Matthias Clasen
9208517188 Use malloced memory instead of stack-allocated, so that MALLOC_CHECK_=2
2006-05-03  Matthias Clasen  <mclasen@redhat.com>

	* tests/base64-test.c (test_incremental): Use malloced memory
	instead of stack-allocated, so that MALLOC_CHECK_=2 catches
	the OOB write...
2006-05-03 12:23:44 +00:00
Matthias Clasen
a71284ce30 Bump version 2006-05-03 02:12:01 +00:00
Matthias Clasen
4b17ee97a5 2.11.0 2006-05-03 02:05:01 +00:00
Tim Janik
a7e1f29f03 added test code from Behdad Esfahbod, see #337128.
Tue May  2 15:00:00 2006  Tim Janik  <timj@gtk.org>

        * tests/gobject/deftype.c: added test code from Behdad Esfahbod,
        see #337128.
2006-05-02 13:01:10 +00:00
Tim Janik
34ee852317 fixed leak in short option parsing. rewrote parts of the code to be more
Tue May  2 14:18:25 2006  Tim Janik  <timj@gtk.org>

        * glib/goption.c (g_option_context_parse): fixed leak in short
        option parsing. rewrote parts of the code to be more concise to
        enhance readability. fixed exaggerated uses of strlen.
2006-05-02 12:20:39 +00:00
Behdad Esfahbod
d8ff28de76 #include <stdlib.h>
2006-04-28  Behdad Esfahbod  <behdad@gnome.org>

        * glib/guniprop.c: #include <stdlib.h>
2006-04-28 20:38:45 +00:00
Matthias Clasen
1e50095189 Small fixes 2006-04-27 23:31:36 +00:00
Matthias Clasen
c3f04f6af9 Updates 2006-04-27 23:28:43 +00:00
Behdad Esfahbod
8f75a97285 docs/reference/glib/glib-sections.txt, Implement g_unichar_iswide_cjk().
2006-04-27  Behdad Esfahbod  <behdad@gnome.org>

        * docs/reference/glib/glib-sections.txt,
        * glib/gunicode.h glib/guniprop.c: Implement g_unichar_iswide_cjk().
        (#105626)
2006-04-27 21:14:47 +00:00
Matthias Clasen
6305847e29 (bookmark_app_info_dump): Escape strings before dumping
them in xml.  (#339340, Morten Welinder)
2006-04-27 20:44:42 +00:00
Matthias Clasen
86eb750432 Remove some special-casing of empty string which led to dangling pointers.
2006-04-27  Matthias Clasen  <mclasen@redhat.com>

	* glib/gbookmarkfile.c (g_bookmark_file_set_description)
	(g_bookmark_file_set_title, g_bookmark_file_set_icon):
	Remove some special-casing of empty string which led to
	dangling pointers.  (#339337, Morten Welinder)
	(expand_exec_line): Don't use printf() needlessly, handle
	trailing '%' gracefully.  (#339338, Morten Welinder)
	(is_element_full): Silence the compiler.
2006-04-27 20:25:26 +00:00
Matthias Clasen
6ea2f9a2c6 Remove some special-casing of empty string which led to dangling pointers.
2006-04-27  Matthias Clasen  <mclasen@redhat.com>

	* glib/gbookmarkfile.c (g_bookmark_file_set_description)
	(g_bookmark_file_set_title, g_bookmark_file_set_icon):
	Remove some special-casing of empty string which led to
	dangling pointers.  (#339337, Morten Welinder)
2006-04-27 20:04:30 +00:00
Behdad Esfahbod
91ae274ad6 Regenerated using Unicode Character Database 5.0 beta.
2006-04-27  Behdad Esfahbod  <behdad@gnome.org>

        * glib/gunibreak.h, glib/gunichartables.h: Regenerated using
        Unicode Character Database 5.0 beta.
2006-04-27 06:39:42 +00:00
Matthias Clasen
b8b28a7206 Don't repeat a failed fclose() call, since that invokes undefined
2006-04-26  Matthias Clasen  <mclasen@redhat.com>

	* glib/grand.c (g_rand_new): Don't repeat a failed fclose()
	call, since that invokes undefined behaviour.  (Coverity)
2006-04-26 04:19:48 +00:00
Matthias Clasen
d4ac791e02 Avoid a possible NULL dereference (found by Coverity), also avoid some
2006-04-25  Matthias Clasen  <mclasen@redhat.com>

	* glib/gbookmarkfile.c (is_element_full): Avoid a possible
	NULL dereference (found by Coverity), also avoid some
	pointless strdups.
2006-04-26 03:55:43 +00:00
Matthias Clasen
2ce08609db Add a test for the previous change.
2006-04-25  Matthias Clasen  <mclasen@redhat.com>

	* tests/keyfile-test.c (test_comments): Add a test for
	the previous change.
2006-04-26 03:12:03 +00:00
Matthias Clasen
3916fe18d6 Remove redundant code. (g_key_file_get_group_comment): Don't dereference
2006-04-25  Matthias Clasen  <mclasen@redhat.com>

	* glib/gkeyfile.c (g_key_file_lookup_group_node): Remove
	redundant code.
	(g_key_file_get_group_comment): Don't dereference before
	checking for NULL.  (#338572, Coverity, Pascal Terjan)
2006-04-25 20:30:59 +00:00
Matthias Clasen
8926039dde Add some missing Since: 2.8 tags 2006-04-19 14:51:49 +00:00
Tor Lillqvist
6f22c44259 Adapt to the changed prototype of InterlockedCompareExchange() in newer
2006-04-19  Tor Lillqvist  <tml@novell.com>

	* glib/gatomic.c: Adapt to the changed prototype of
	InterlockedCompareExchange() in newer SDKs. Use
	InterlockedCompareExchangePointer() when applicable. (#155884,
	John Ehresman)
2006-04-19 12:32:43 +00:00
Matthias Clasen
22ec64756c Add api to get and set doubles and lists of doubles. (#164719, Maurizio
2006-04-18  Matthias Clasen  <mclasen@redhat.com>

	* glib/gkeyfile.h:
	* glib/glib.symbols:
	* glib/gkeyfile.c: Add api to get and set doubles and
	lists of doubles.  (#164719, Maurizio Monge, Dom Lachowicz)

	* tests/keyfile-test.c: Add tests for new api.
2006-04-19 02:59:37 +00:00
Matthias Clasen
64434acfe1 Accept duplicate groups. (#157877, Sebastien Bacher)
2006-04-18  Matthias Clasen  <mclasen@redhat.com>

	* glib/gkeyfile.c (g_key_file_add_group): Accept duplicate
	groups.  (#157877, Sebastien Bacher)

	* tests/keyfile-test.c: Add tests for duplicate key and
	duplicate group handling.
2006-04-19 02:39:37 +00:00
Matthias Clasen
f16f2764f4 Make passing NULL for new_prefix work as documented. (#338845, Yevgen
2006-04-17  Matthias Clasen  <mclasen@redhat.com>

	* glib/gcompletion.c (g_completion_complete_utf8): Make passing
	NULL for new_prefix work as documented.  (#338845, Yevgen Muntyan)

	* tests/completion-test.c: Test that passing NULL for
	new_prefix in g_completion_complete_utf8 works.
2006-04-18 02:21:43 +00:00
Kjartan Maraas
31db06fc99 Remove obsolete entry for no_NO. And the translation.
2006-04-17  Kjartan Maraas  <kmaraas@gnome.org>

	* configure.in: Remove obsolete entry for no_NO.
	* po/no.po: And the translation.
2006-04-17 12:10:01 +00:00
Matthias Clasen
8f6738b925 Avoid an array overrun. (Coverity, fix by Pascal Terjan)
2006-04-16  Matthias Clasen  <mclasen@redhat.com>

        * glib/gdate.c (g_date_fill_parse_tokens): Avoid an array
        overrun.  (Coverity, fix by Pascal Terjan)
2006-04-16 05:19:26 +00:00
Bastien Nocera
486c42ba75 reviewed by: Matthias Clasen <mclasen@redhat.com>
2006-04-12  Bastien Nocera  <hadess@hadess.net>

	reviewed by: Matthias Clasen <mclasen@redhat.com>

	* glib/gconvert.c: add more details about which RFC is concerned
	when using g_filename_to_uri (#337553)
2006-04-12 22:50:33 +00:00
Matthias Clasen
75ed18d067 Add an assert to make it clear when value can be NULL.
2006-04-12  Matthias Clasen  <mclasen@redhat.com>

	* glib/goption.c (parse_arg): Add an assert to make it
	clear when value can be NULL.
2006-04-12 15:38:27 +00:00
Martyn James Russell
eab7250b58 (test_thread_stop_unused): Removed an
assertion which can fail and is not a critical test.
2006-04-07 18:47:33 +00:00
Hans Breuer
32bc152fb3 added gbase64.obj and derive the static libs name from auto* variables
2006-04-07  Hans Breuer  <hans@breuer.org>

	* glib/makefile.msc.in : added gbase64.obj and derive the static libs
	name from auto* variables
	* glib/makefile.msc.in : link user32.lib for MessageBox()
2006-04-07 17:10:36 +00:00
Martyn James Russell
6c6f17133d Make sure g_thread_pool_stop_unused_threads() actually stops unused
* glib/gthreadpool.c: Make sure
g_thread_pool_stop_unused_threads() actually stops unused threads
and global limits (like max idle time and max unused threads) can
be set without creating a thread pool first. Fixed #335215 (patch
from Chris Wilson).

* tests/threadpool-test.c: Added two new tests, tests setting
global limits before creating a thread pool. The second test
makes sure unused threads are actually stopped when using the
g_thread_pool_stop_unused_threads().
2006-04-07 09:23:42 +00:00
Matthias Clasen
1e795591bb Make long long printing work if snprintf is not available. (#332841,
2006-04-05  Matthias Clasen  <mclasen@redhat.com>

	* glib/gnulib/vasnprintf.c (vasnprintf): Make
	long long printing work if snprintf is not
	available.  (#332841, Michael McDonald)
2006-04-05 15:06:15 +00:00
Behdad Esfahbod
8741c8bf5a Check the return value of g_get_prgname for NULL before passing to strcmp.
2006-04-05  Behdad Esfahbod  <behdad@gnome.org>

        * tests/option-test.c: Check the return value of g_get_prgname for
        NULL before passing to strcmp.

        * tests/slice-test.c: Report the correct name in Usage summary.
2006-04-05 05:56:47 +00:00
Matthias Clasen
5525aa52c9 Fix up shell script 2006-04-05 05:31:11 +00:00
Matthias Clasen
a1b1b4f47a More test fixes 2006-04-05 05:18:57 +00:00
Matthias Clasen
0163a3808c Run run-bookmark-test.sh 2006-04-05 05:09:36 +00:00
Matthias Clasen
a58772f052 More warning fixes 2006-04-05 05:05:01 +00:00
Matthias Clasen
973b4b8442 Silence a warning 2006-04-05 05:03:33 +00:00
Matthias Clasen
6324ed6b34 Add base64 docs 2006-04-05 03:19:30 +00:00
Alexander Larsson
5cf8f1d4a8 Add base64 encode/decode functions
2006-04-04  Alexander Larsson  <alexl@redhat.com>

	* glib/Makefile.am:
	* glib/gbase64.[ch]:
	* glib/glib.symbols:
	Add base64 encode/decode functions

	* glib/glib.h:
	Include gbase64.h

	* tests/Makefile.am:
	* tests/base64-test.c:
	Tests for base64 functions
2006-04-04 13:03:23 +00:00
Matthias Clasen
b58fb2bdb5 Move short_month_names and long_month_names to bss.
2006-04-04  Matthias Clasen  <mclasen@redhat.com>

        * glib/gdate.c: Move short_month_names and long_month_names
        to bss.

        * glib/gspawn-win32.c (g_spawn_error_quark):
        * glib/gspawn.c (g_spawn_error_quark):
        * glib/gshell.c (g_shell_error_quark):
        * glib/gmarkup.c (g_markup_error_quark):
        * glib/goption.c (g_option_error_quark):
        * glib/gkeyfile.c (g_key_file_error_quark):
        * glib/giochannel.c (g_io_channel_error_quark):
        * glib/gfileutils.c (g_file_error_quark):
        * glib/gconvert.c (g_convert_error_quark):
        * glib/gbookmarkfile.c (g_bookmark_file_error_quark):
        * glib/gthread.c (g_thread_error_quark): No point in making
        the error path fast by caching quarks.

        * glib/gbookmarkfile.c: Make the parser struct const.
2006-04-04 04:37:39 +00:00
Matthias Clasen
5d1c3924e1 Make the parser struct const 2006-04-04 04:21:38 +00:00
Behdad Esfahbod
34b2972c4f Fix accidentally broken build.
2006-04-04  Behdad Esfahbod  <behdad@gnome.org>

        * glib/gbookmarkfile.c: Fix accidentally broken build.
2006-04-04 04:17:59 +00:00
Matthias Clasen
d940f269e3 Don't include sys/time.h (#337027, Kazuki IWAMOTO)
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* glib/gbookmarkfile.c: Don't include sys/time.h  (#337027,
	 Kazuki IWAMOTO)
2006-04-03 18:00:39 +00:00
Tor Lillqvist
b2438cad51 Revert change below. It wasn't a good idea after all, says the original
2006-03-31  Tor Lillqvist  <tml@novell.com>

	* glib/gstdio.c (g_remove): Revert change below. It wasn't a good
	idea after all, says the original bug reporter. See bug for
	discussion.
2006-03-31 19:16:23 +00:00
Tor Lillqvist
2df600a633 [Win32] call rmdir() only if remove() fails with errno set to ENOENT, to
2006-03-30  Tor Lillqvist  <tml@novell.com>

	* glib/gstdio.c (g_remove): [Win32] call rmdir() only if remove()
	fails with errno set to ENOENT, to leave errno set to EACCESS if
	that is the problem. (#334799, Yevgen Muntyan)
2006-03-31 00:26:44 +00:00
Matthias Clasen
bd1d98c08d Sync the parameter names with the .h files, otherwise gtk-doc misbehaves.
2006-03-30  Matthias Clasen  <mclasen@redhat.com>

	* glib/gbookmarkfile.c (g_bookmark_file_get_app_info): Sync
	the parameter names with the .h files, otherwise gtk-doc
	misbehaves.
2006-03-30 19:36:31 +00:00
Emmanuele Bassi
75eb6fb661 Add bookmarkfile-test to the ignored files.
2006-03-27  Emmanuele Bassi  <ebassi@cvs.gnome.org>

	* tests/.cvsignore: Add bookmarkfile-test to the ignored files.
2006-03-27 18:30:11 +00:00
Emmanuele Bassi
9bf3a0fa5f Add test suite for GBookmarkFile.
2006-03-27  Emmanuele Bassi  <ebassi@cvs.gnome.org>

	* tests/Makefile.am:
	* tests/bookmarkfile-test.c:
	* tests/run-bookmark-test.sh:
	* tests/bookmarks/*.xbel: Add test suite for GBookmarkFile.
2006-03-27 18:28:07 +00:00
Emmanuele Bassi
189c2c213e Add documentation for GBookmarkFile to GLib's reference guide.
2006-03-27  Emmanuele Bassi  <ebassi@cvs.gnome.org>

	* docs/reference/glib/glib-docs.sgml:
	* docs/reference/glib/glib-sections.txt:
	* docs/reference/glib/tmpl/bookmarkfile.sgml: Add documentation for
	GBookmarkFile to GLib's reference guide.
2006-03-27 18:25:33 +00:00
Emmanuele Bassi
82702c458f glib/gbookmarkfile.h Add GBookmarkFile, a parser for files containing
2006-03-27  Emmanuele Bassi  <ebassi@cvs.gnome.org>

	* glib/glib.h:
	* glib/gbookmarkfile.h
	* glib/gbookmarkfile.c: Add GBookmarkFile, a parser for files
	containing bookmarks stored using the Desktop Bookmark
	specification. Fixes bug #327662.

	* glib/glib.symbols:
	* glib/Makefile.am:
	* glib/makefile.msc.in:
	* glib/makefile.mingw.in: Build glue for GBookmarkFile.
2006-03-27 18:22:47 +00:00
Dom Lachowicz
8dece49a5f bump version number to 2.11.0 2006-03-27 17:06:50 +00:00
Dom Lachowicz
a903995bcc Change a gboolean to an int. Fixes bug #329789.
2006-03-27  Dom Lachowicz  <cinamod@hotmail.com>
	Change a gboolean to an int. Fixes bug #329789.
2006-03-27 13:37:02 +00:00
Dom Lachowicz
a9f52a13b0 Copy-and-paste error slipped into test5. Enable test5, as per Matthias'
2006-03-27  Dom Lachowicz  <cinamod@hotmail.com>

	* tests/option-test.c: Copy-and-paste error slipped into test5. Enable
	test5, as per Matthias' comments in bug 329548#c11.
2006-03-27 13:34:16 +00:00
Matthias Clasen
9749aa87e5 Support floating point arguments in goption 2006-03-27 06:57:28 +00:00
Matthias Clasen
a205620a88 Improve the description of parameter_string in the docs. (#336085, Claudio
2006-03-26  Matthias Clasen  <mclasen@redhat.com>

        * glib/goption.c (g_option_context_new): Improve the description
        of parameter_string in the docs.  (#336085, Claudio Saavedra)
2006-03-26 20:15:19 +00:00
Martyn James Russell
f0ee594a80 Updated the documentation to explain that when the maximum threads is > 1
* glib/gthreadpool.c: Updated the documentation to explain that
when the maximum threads is > 1 the sort functionality is not 100%
accurate due to the ramdom nature of the scheduler choosing which
threads to execute. Fixes bug #334943.

* tests/threadpool-test.c: Disabled the debugging by default and
fixed the sort test to set the maximum threads to 1 to guarantee
the thread entry function is called in order.
2006-03-24 15:21:28 +00:00
Matthias Clasen
601289c545 Split ChangeLog 2006-03-24 03:05:36 +00:00
Matthias Clasen
b6d9f42ab9 Adjust docs 2006-03-23 13:38:17 +00:00
Emmanuele Bassi
6db9ec4070 Check for timegm.
2006-03-23  Emmanuele Bassi  <ebassi@cvs.gnome.org>

	* configure.in: Check for timegm.

	* glib/gtimer.h:
	* glib/gtimer.c:
	* glib/glib.symbols:
	* docs/reference/glib/glib-sections.txt: Added g_time_val_to_iso8601
	and g_time_val_from_iso8601, to convert a GTimeVal to and from an
	ISO 8601 encoded date.

	* tests/testglib.c: Added test cases for g_time_val_to_iso8601()
	and g_time_val_from_iso8601() functions.
2006-03-23 02:54:29 +00:00
Vladimer Sichinava
b78ec7a1b5 Updated Georgian translation 2006-03-20 23:21:19 +00:00
Matthias Clasen
d0ee63840c use standard_calloc to allocate the profile_data. (#335209, Chris Wilson)
2006-03-20  Matthias Clasen  <mclasen@redhat.com>

        * glib/gmem.c (profiler_log): use standard_calloc to allocate
        the profile_data.  (#335209, Chris Wilson)

        * glib/gmain.c (g_main_context_unref): Avoid a deadlock.
        (#335207, Chris Wilson)

        Minor optimizations (#335216, Chris Wilson):

        * glib/gasyncqueue.c (g_async_queue_pop_intern_unlocked): Use
        g_queue_peek_tail_link instead of g_queue_peek_tail.

        * glib/glist.c:
        * glib/gslist.c: Avoid some memset calls.
2006-03-20 18:43:32 +00:00
Matthias Clasen
56b06e14dc Add this, at the request of the GNOME sysadmin team.
2006-03-19  Matthias Clasen  <mclasen@redhat.com>

	* MAINTAINERS: Add this, at the request of the GNOME sysadmin team.
2006-03-20 03:56:33 +00:00
Matthias Clasen
79a5c739a4 Only set the prgname if it hasn't been set before. (#334611, Chong Kai
2006-03-15  Matthias Clasen  <mclasen@redhat.com>

	* glib/goption.c (g_option_context_parse): Only set the prgname
	if it hasn't been set before.  (#334611, Chong Kai Xiong)
2006-03-15 13:03:48 +00:00
Matthias Clasen
9e58246669 Don't read past the end of the string. (#334471, Morten Welinder)
2006-03-14  Matthias Clasen  <mclasen@redhat.com>

	* glib/gutils.c (g_parse_debug_string): Don't read past the
	end of the string.  (#334471, Morten Welinder)
2006-03-14 17:56:27 +00:00
Matthias Clasen
99024c7ea7 Don't create the option_name twice. (#334519, Chris Wilson)
2006-03-14  Matthias Clasen  <mclasen@redhat.com>

	* glib/goption.c (parse_short_option): Don't create the
	option_name twice.  (#334519, Chris Wilson)
2006-03-14 15:34:54 +00:00
Anders Carlsson
8a51746479 Revert fix for #322476, it breaks module loading since libtool on darwin
2006-03-13  Anders Carlsson  <andersca@luminoth.local>

        * configure.in: Revert fix for #322476, it breaks module loading
        since libtool on darwin makes shared modules use .so and shared
        libraries use .dylib. The fix breaks shared module loading everywhere
        in GTK+.
2006-03-13 08:40:54 +00:00
Marcus Brinkmann
6f0ef1bae2 Implement watches for GIOChannels for write file descriptors on Win32
2006-03-02  Marcus Brinkmann  <mb@g10code.de>

	Implement watches for GIOChannels for write file descriptors on
	Win32 (#333098).

	* glib/giowin32.c (GIOWin32Channel): Add a new direction field.
	(read_thread): Initialize direction.
	(write_thread): New function.
	(buffer_write): New function.
	(g_io_win32_prepare): Handle the G_IO_WIN32_FILE_DESC case for the
	write direction.
	(g_io_win32_fd_write): Call buffer_write() if there is a writer
	thread.
	(g_io_win32_fd_close): Set space_avail_event for writer threads.
	(g_io_win32_fd_create_watch): Create the writer thread if
	condition is G_IO_OUT.
	(g_io_channel_win32_make_pollfd): Likewise here.
2006-03-11 21:03:00 +00:00
Matthias Clasen
0b8901daee dist all changelogs 2006-03-09 05:31:52 +00:00
Tor Lillqvist
f800121ed8 Add G_GUINT64_CONSTANT.
2006-03-08  Tor Lillqvist  <tml@novell.com>

	* glibconfig.h.win32.in: Add G_GUINT64_CONSTANT.
2006-03-07 23:45:30 +00:00
Matthias Clasen
2430f1f039 Bump version 2006-03-07 19:18:16 +00:00
Matthias Clasen
a639cb7cb8 2.10.1 2006-03-07 18:30:23 +00:00
Matthias Clasen
aa1f71e973 Prepare 2.10.1 2006-03-07 17:02:38 +00:00
Matthias Clasen
b7420e0847 Match the prototype in gconvert.c to fix build problems in NetBSD.
2006-03-07  Matthias Clasen  <mclasen@redhat.com>

	* glib/gutf8.c (_g_charset_get_aliases): Match the prototype
	in gconvert.c to fix build problems in NetBSD.  (#333651,
	Julio M. Merino Vidal)
2006-03-07 16:32:38 +00:00
Anders Carlsson
4e41e5c2fb Make .dylib the shared library suffix on darwin. (#322476, Vladimir Panov)
2006-03-06  Anders Carlsson  <andersca@imendio.com>

        * configure.in:
        Make .dylib the shared library suffix on darwin.
        (#322476, Vladimir Panov)
2006-03-06 08:06:22 +00:00
Anders Carlsson
c57fc7b6fd Skip checking thread flags on Darwin. Fix suggested by Manish Singh.
2006-03-06  Anders Carlsson  <andersca@imendio.com>

        * configure.in:
        Skip checking thread flags on Darwin. Fix suggested by Manish Singh.
        (#314794, Gregor Riepl)
2006-03-06 07:53:24 +00:00
Tor Lillqvist
5a2950d041 Separate implementation on Win32: Use the wide character API on NT-based
2006-03-01  Tor Lillqvist  <tml@novell.com>

	* glib/gutils.c (g_listenv): Separate implementation on Win32: Use
	the wide character API on NT-based Windows. Return UTF-8 strings.

	* glib/glib.symbols: Don't mark g_listenv as PRIVATE, as that
	meant it wasn't present in the import library. PRIVATE is used
	only for the backwards-compatibility DLL ABI stability hacks.
2006-03-01 14:18:55 +00:00
Matthias Clasen
eab0e631cb Bump version 2006-02-24 18:03:36 +00:00
Matthias Clasen
2f4f39095f 2.10.0 2006-02-24 17:17:35 +00:00
Matthias Clasen
da3fc6eed8 Preparations for 2.10 2006-02-24 14:25:06 +00:00
Matthias Clasen
8b3b3adb6d Add tests for g_utf8_strlen().
2006-02-24  Matthias Clasen  <mclasen@redhat.com>

        * tests/utf8-pointer.c: Add tests for g_utf8_strlen().

        * glib/gutf8.c: Fix boundary cases in g_utf8_strlen().
        (#332435)
2006-02-24 13:56:58 +00:00
Kjartan Maraas
a629b3f02d Plug leaks reported by valgrind. Same. Same Same. Same. Same.
2006-02-23  Kjartan Maraas  <kmaraas@gnome.org>

	* tests/completion-test.c: (main): Plug leaks reported by
	valgrind.
	* tests/convert-test.c: (test_iconv_state), (test_one_half):
	Same.
	* tests/patterntest.c: (test_compilation): Same
	* tests/shell-test.c: (do_argv_test): Same.
	* tests/unicode-caseconv.c: (main): Same.
	* tests/uri-test.c: (run_to_uri_tests): Same.
2006-02-23 09:09:55 +00:00
Martyn James Russell
dde67f284d Updated to test _sort, _sort_with_data, _insert_sorted and
* tests/asyncqueue-test.c:
* tests/list-test.c:
* tests/slist-test.c: Updated to test _sort, _sort_with_data,
_insert_sorted and _insert_sorted_with_data API.
2006-02-19 17:17:32 +00:00
Matthias Clasen
c773a618e3 Add paramspec-test
2006-02-18  Matthias Clasen  <mclasen@redhat.com>

	* tests/gobject/Makefile.am: Add paramspec-test

	* tests/gobject/paramspec-test.c: Some GParamSpec tests.
2006-02-18 21:07:18 +00:00
Matthias Clasen
fb7ae4674a Add more tests.
2006-02-18  Matthias Clasen  <mclasen@redhat.com>

	* tests/gobject/gvalue-test.c: Add more tests.
2006-02-18 20:37:14 +00:00
Kang Jeong-Hee
3afc87dd62 p in str, not str in p 2006-02-17 18:06:17 +00:00
Sebastian Wilhelmi
139b852e0c Fix deadlock when signalling the thread which freed a thread pool
2006-02-15  Sebastian Wilhelmi  <seppi@seppi.de>

	* glib/gthreadpool.c: Fix deadlock when signalling the thread
	which freed a thread pool (#331110, Chris Wilson).
2006-02-15 22:10:49 +00:00
Tim Janik
8a8f185feb only define _XOPEN_SOURCE to 600 to get at posix_memalign() in case we
Tue Feb 14 17:00:43 2006  Tim Janik  <timj@imendio.com>

        * glib/gslice.c: only define _XOPEN_SOURCE to 600 to get at
        posix_memalign() in case we actually are going to use it, because
        we detected a compliant implementation (#328997).

        * configure.in (enable_included_printf): don't include malloc.h when
        testing for posix_memalign() funcitonality, since this may break the
        test on some systems (#328997).
2006-02-14 16:31:37 +00:00
Matthias Clasen
16d640b06c Improve docs 2006-02-14 13:15:40 +00:00
Matthias Clasen
af818b6bc8 Bump version 2006-02-11 14:17:05 +00:00
Matthias Clasen
72abb1a5ac 2.9.6 2006-02-11 14:05:58 +00:00
Behdad Esfahbod
db298b2f46 Specify the type of varargs arguments. (bug #317679)
2006-01-31  Behdad Esfahbod  <behdad@gnome.org>

        * docs/reference/glib/tmpl/relations.sgml (g_relation_insert): Specify
        the type of varargs arguments. (bug #317679)
2006-01-31 23:22:52 +00:00
Matthias Clasen
74c1b53256 Touch README and INSTALL here to pacify automake. (#329124, Kjartan
2006-01-31  Matthias Clasen  <mclasen@redhat.com>

	* autogen.sh: Touch README and INSTALL here to pacify
	automake.  (#329124, Kjartan Maraas, Tim Janik)
2006-01-31 17:34:38 +00:00
Tim Janik
20887fa148 carry out all dtalist pointer accesses atomically, some missing cases
Tue Jan 31 16:45:03 2006  Tim Janik  <timj@imendio.com>

        * glib/gdataset.c: carry out all dtalist pointer accesses atomically,
        some missing cases where pointed out by Sebastian Wilhelmi.
2006-01-31 15:46:34 +00:00
Tim Janik
7162fbbbfd generate build/win32/vs8/Makefile, to fix build breakage.
Tue Jan 31 12:33:48 2006  Tim Janik  <timj@imendio.com>

        * configure.in: generate build/win32/vs8/Makefile, to fix build breakage.
2006-01-31 11:39:03 +00:00
David Schleef
d0feaee819 Update URL
2006-01-30  David Schleef  <ds@schleef.org>

        * glib/grand.c: Update URL
2006-01-30 18:32:17 +00:00
Sven Herzberg
e70a6c4be9 tell how to create container classes which are as flexible as a GValue is
2006-01-29  Sven Herzberg  <herzi@gnome-de.org>

        * docs/reference/gobject/tmpl/param_value_types.sgml: tell how to
	create container classes which are as flexible as a GValue is
2006-01-29 14:30:22 +00:00
Matthias Clasen
42c462606f Bump version 2006-01-27 14:37:54 +00:00
Matthias Clasen
666e90eae6 2.9.5 2006-01-27 14:37:02 +00:00
Matthias Clasen
b0b1b2d4db Updates 2006-01-27 13:01:37 +00:00
Matthias Clasen
6c9179512d Fix C99isms. (#328705, Kazuki Iwamoto)
2006-01-26  Matthias Clasen  <mclasen@redhat.com>

	* glib/gmem.c (g_mem_init_nomessage): Fix C99isms.  (#328705,
	Kazuki Iwamoto)
2006-01-26 19:43:48 +00:00
Tim Janik
bd88bf87da fixed buglets reported by Jens Granseuer in #328254.
Wed Jan 25 19:16:57 2006  Tim Janik  <timj@imendio.com>

        * fixed buglets reported by Jens Granseuer in #328254.

        * configure.in: free the memory allocated in posix_memalign() tests.

        * glib/gslice.c: spelling fixes.
2006-01-25 18:20:28 +00:00
Tim Janik
eda944bca5 honour g_mem_gc_friendly settings when freeing slices, make sure
Wed Jan 25 16:39:18 2006  Tim Janik  <timj@imendio.com>

        * glib/gslice.c: honour g_mem_gc_friendly settings when freeing
        slices, make sure g_mem_gc_friendly is properly initialized.

        * gmem.[hc]: ensure g_mem_gc_friendly is initialized from G_DEBUG upon
        the first allocation. applied some branching optimizations.

        * docs/macros.txt: reflected --enable-gc-friendly change and
        described ENABLE_GC_FRIENDLY_DEFAULT as well as G_DEBUG=gc-friendly.

        * configure.in: changed --enable-gc-friendly=yes to define
        ENABLE_GC_FRIENDLY_DEFAULT.

        * glib/garray.c: changed ENABLE_GC_FRIENDLY macro #ifdef-s to
        if (G_UNLIKELY (g_mem_gc_friendly)).

        * glib/gtree.c:
        * glib/ghash.c: removed ENABLE_GC_FRIENDLY code which is now taken
        care of by g_slice_free1().

        * tests/slice-test.c: fixed leaks, reported by Kjartan Maraas.
2006-01-25 15:51:43 +00:00
Tim Janik
7b744cf4d2 only use posix_memalign() if it's known to work, revert to memalign()
Tue Jan 24 17:49:36 2006  Tim Janik  <timj@imendio.com>

        * glib/gslice.c: only use posix_memalign() if it's known to work,
        revert to memalign() otherwise.

        * configure.in: check for broken posix_memalign() implementations
        to fix #328254.
2006-01-24 16:56:17 +00:00
Matthias Clasen
3c62ff454a Use UTF-16LE as target encoding on all little-endian systems. (#143380,
2006-01-24  Matthias Clasen  <mclasen@redhat.com>

	* tests/unicode-encoding.c: Use UTF-16LE as target encoding
	on all little-endian systems.  (#143380, Marc Moorcroft)
2006-01-24 15:25:11 +00:00
Matthias Clasen
fc2c35293d Change the shared libary extension for hpux-ia64 to so. (#328253, The
2006-01-23  Matthias Clasen  <mclasen@redhat.com>

	* configure.in: Change the shared libary extension for hpux-ia64
	to so.  (#328253, The Written Word)
2006-01-24 05:04:57 +00:00
Tim Janik
35db6815fd wiped out all the wonderfull G_OS_WIN32 code i wrote ;-[) after tml told
Mon Jan 23 17:30:33 2006  Tim Janik  <timj@imendio.com>

        * glib/gutils.c (_g_getenv_nomalloc): wiped out all the wonderfull
        G_OS_WIN32 code i wrote ;-[) after tml told me windows has getenv()
        as well.
2006-01-23 16:32:22 +00:00
Tim Janik
75db578288 initialize GSlice config from G_SLICE environemtn variable. we support
Mon Jan 23 16:46:20 2006  Tim Janik  <timj@imendio.com>

        * glib/gslice.c (slice_config_init): initialize GSlice config from
        G_SLICE environemtn variable. we support G_SLICE=always-malloc
        currently, which forces all g_slice_*() allocations to use the system
        malloc instead.

        * glib/gutils.c:
        g_parse_debug_string(): added a note about not using g_malloc() here.
        _g_getenv_nomalloc(): getenv() variant that doesn't use g_malloc or
        g_slice. contains only guesswork in the WIN32 branch.
2006-01-23 15:51:06 +00:00
Matthias Clasen
c2d358fbbb Bump version 2006-01-18 17:35:27 +00:00
Matthias Clasen
1154014f26 2.9.4 2006-01-18 17:16:21 +00:00
Matthias Clasen
402a1081ae Add a note about casting the results of g_new() and g_new0().
2006-01-17  Matthias Clasen  <mclasen@redhat.com>

	* glib/tmpl/memory.sgml: Add a note about casting the results
	of g_new() and g_new0().
2006-01-18 03:51:39 +00:00
Sebastian Wilhelmi
f4484f51bf To avoid deadlocks get rid of the settings G_LOCK. Use the
2006-01-17  Sebastian Wilhelmi  <seppi@seppi.de>

	* glib/gthreadpool.c: To avoid deadlocks get rid of the settings
	G_LOCK. Use the unused_thread_queue lock instead. Change
	g_thread_pool_thread_proxy such that threads only wait on
	non-exlusive pools for at most a 1/2 second. Do not reorder tasks
	due to superfluous tasks. Global tasks wait at most for
	max-idle-time milliseconds. Make sure, that no task is woken up
	twice for the same event via a wakeup_serial. This fixes #324228.

	* tests/threadpool-test.c: Adapt test accordingly. Do not pass
	invalid NULL into the thread pools. This as well fixes #327290.
2006-01-17 20:06:27 +00:00
Matthias Clasen
47d0894a11 Bump version 2006-01-17 00:04:52 +00:00
Matthias Clasen
7f737f1f34 2.9.3 2006-01-17 00:00:17 +00:00
Matthias Clasen
7523252384 Updates
2006-01-16  Matthias Clasen  <mclasen@redhat.com>

	* NEWS: Updates
2006-01-16 23:10:47 +00:00
Matthias Clasen
488cee4977 Rework the strict aliasing fix to not break C++, pointed out by Murray
2006-01-16  Matthias Clasen  <mclasen@redhat.com>

	* glib/gthread.h (g_static_mutex_get_mutex_impl_shortcut):
	Rework the strict aliasing fix to not break C++, pointed
	out by Murray Cumming.
2006-01-16 23:03:10 +00:00
Matthias Clasen
5fb7be3961 Signal waiting threads, problem noticed by Christian Kellner.
2006-01-16  Matthias Clasen  <mclasen@redhat.com>

        * glib/gasyncqueue.c (g_async_queue_push_sorted_unlocked):
        Signal waiting threads, problem noticed by Christian Kellner.
2006-01-16 22:14:17 +00:00
Matthias Clasen
11a3e72c3a Fix bug 326747, Alberto Ruiz:
2006-01-16  Matthias Clasen  <mclasen@redhat.com>

	Fix bug 326747, Alberto Ruiz:

	* glib/gconvert.c (make_valid_utf8): Change this function to
	replace unknown characters by the Unicode replacement character
	instead of '?', and don't append "(invalid encoding)".
	(g_filename_display_name, g_filename_display_basename): Document
	how to determine if the filename was in an invalid encoding.
2006-01-16 14:54:45 +00:00
Matthias Clasen
fb3e4c63ef Replace the simple recursive implementation by a nonrecursive, threaded
2006-01-14  Matthias Clasen  <mclasen@redhat.com>

	* glib/gtree.c: Replace the simple recursive implementation
	by a nonrecursive, threaded implementation by Maurizio
	Monge.  (#169285)
2006-01-14 05:24:10 +00:00
Matthias Clasen
42e7c208b7 Fix the assert to not always trigger. (#326558, Daichi Kawahata)
2006-01-12  Matthias Clasen  <mclasen@redhat.com>

	* tests/asyncqueue-test.c (main): Fix the
	assert to not always trigger.  (#326558,
	Daichi Kawahata)
2006-01-12 20:27:16 +00:00
Matthias Clasen
c93ebd50af Don't test items_read and items_written in error cases where it is not
2006-01-11  Matthias Clasen  <mclasen@redhat.com>

	* tests/convert-test.c: Don't test items_read and
	items_written in error cases where it is not set.
2006-01-11 16:49:22 +00:00
Matthias Clasen
e31bd40d43 Set error to NULL.
2006-01-11  Matthias Clasen  <mclasen@redhat.com>

	* tests/asyncqueue-test.c: Set error to NULL.
2006-01-11 16:30:21 +00:00
Matthias Clasen
a3a469192c Break some long lines.
2006-01-08  Matthias Clasen  <mclasen@redhat.com>

	* glib/gtree.c: Break some long lines.

	* tests/tree-test.c: Add more tests.
2006-01-09 04:11:12 +00:00
Matthias Clasen
0f3dfbfc86 Include config.h first 2006-01-08 23:21:01 +00:00
Sven Herzberg
82395be214 explain that G_TYPE_INSTANCE_GET_CLASS() does behave different during
2005-12-20  Sven Herzberg  <herzi@gnome-de.org>

        * docs/reference/gobject/tmpl/gtype.sgml: explain that
	G_TYPE_INSTANCE_GET_CLASS() does behave different during
	initialization
2006-01-08 15:13:28 +00:00
Matthias Clasen
4a71102e70 Fix a build problem on OS X. 2006-01-06 05:50:40 +00:00
Matthias Clasen
3439650dd1 Bump version 2006-01-06 05:09:30 +00:00
Matthias Clasen
9090c67afc 2.9.2 2006-01-06 05:07:47 +00:00
Hans Breuer
920519fd61 added gslice.obj
2006-01-05  Hans Breuer  <hans@breuer.org>

	* glib/makefile.msc.in : added gslice.obj
2006-01-05 23:37:02 +00:00
Matthias Clasen
4a38d13665 Updates 2006-01-05 21:58:36 +00:00
Matthias Clasen
90bd00b055 Clarify the documentation of source ids a bit. (#325874, Dan Williams)
2006-01-05  Matthias Clasen  <mclasen@redhat.com>

	* glib/gmain.c: Clarify the documentation of source ids
	a bit.  (#325874, Dan Williams)
2006-01-05 21:07:55 +00:00
Matthias Clasen
e16ec3b973 Fix another strict aliasing problem.
2006-01-05  Matthias Clasen  <mclasen@redhat.com>

	* configure.in: Fix another strict aliasing problem.
2006-01-05 14:30:04 +00:00
Matthias Clasen
fbf0e8bc7d Avoid use of varargs macro. (#325864, Kazuki IWAMOTO)
2006-01-05  Matthias Clasen  <mclasen@redhat.com>

	* glib/gthreadpool.c: Avoid use of varargs macro.  (#325864,
	Kazuki IWAMOTO)
2006-01-05 14:24:35 +00:00
Manish Singh
7be75a123b glib/glib.symbols don't macroized g_access, g_chdir, and g_unlink either,
2006-01-04  Manish Singh  <yosh@gimp.org>

        * glib/glib.symbols
        * glib/gstdio.h: don't macroized g_access, g_chdir, and g_unlink
        either, since they have the same issue as g_rmdir. (Related to
        bug #325249)
2006-01-05 06:21:49 +00:00
Tim Janik
f2613bf9ed don't reverse chunk order when creating magazines, so we hand out chunks
Wed Jan  4 13:33:25 2006  Tim Janik  <timj@gtk.org>

        * glib/gslice.c (magazine_cache_pop_magazine): don't reverse chunk
        order when creating magazines, so we hand out chunks with ascending
        adresses.
2006-01-04 13:03:22 +00:00
Abel Cheung
9c9e953440 Added "ml" "zh_HK" to ALL_LINGUAS.
2006-01-04  Abel Cheung  <maddog@linuxhall.org>

	* configure.in: Added "ml" "zh_HK" to ALL_LINGUAS.
2006-01-04 02:27:22 +00:00
Martyn James Russell
941faa1ca9 - Added new API g_thread_pool_get_idle_time() and
* docs/reference/glib/glib-sections.txt:
* glib/glib.symbols:
* glib/gthreadpool.[ch]:
- Added new API g_thread_pool_get_idle_time() and
g_thread_pool_set_idle_time(). (#324228).

* tests/threadpool-test.c:
- Updated test case to do thread pool sorting, thread pool with
no sorting and a thread pool with idle thread timeouts.
2006-01-03 15:09:52 +00:00
Matthias Clasen
be5d72cba0 Add new functions 2006-01-03 14:52:34 +00:00
Matthias Clasen
796aa7e06e Small fixes 2006-01-03 12:01:05 +00:00
Michael Meeks
d2555b65ee new method to determine if the current thread is the owner of the context.
2005-12-20  Michael Meeks  <michael.meeks@novell.com>

	* glib/gmain.c (g_main_context_is_owner): new method
	to determine if the current thread is the owner of the
	context.
2006-01-03 10:24:07 +00:00
Matthias Clasen
a5a39466a1 Don't provide g_rmdir() as a macro expanding to rmdir, since rmdir is not
2006-01-02  Matthias Clasen  <mclasen@redhat.com>

	* glib/glib.symbols:
	* glib/gstdio.h:
	* glib/gstdio.c (g_rmdir): Don't provide g_rmdir() as a macro
	expanding to rmdir, since rmdir is not declared in a portable
	system header we can include in gstdio.h.  (#325249, Jani Monoses)
2006-01-03 02:53:05 +00:00
Tor Lillqvist
07e1d54fb7 Set the GIOChannels for stdout and stderr to unbuffered. Otherwise the
2006-01-01  Tor Lillqvist  <tml@novell.com>

	* glib/gspawn-win32.c (g_spawn_sync_utf8): Set the GIOChannels for
	stdout and stderr to unbuffered. Otherwise the giochannel layer
	will try to read from them regardless whether the
	g_io_channel_win32_poll() call here has indicated
	readability or not. (#325310)
2006-01-01 11:15:56 +00:00
Matthias Clasen
fd73fead6f Fix a copy-and-paste error in the docs. (#325273, Declan Naughton)
2005-12-29  Matthias Clasen  <mclasen@redhat.com>

	* glib/gutils.c (glib_check_version): Fix a copy-and-paste error
	in the docs.  (#325273, Declan Naughton)
2005-12-30 02:08:02 +00:00
Manish Singh
a05f171524 use LC_ALL instead of LC_COLLATE, to make sure we really override things.
2005-12-27  Manish Singh  <yosh@gimp.org>

        * tests/run-collate-tests.sh: use LC_ALL instead of LC_COLLATE, to
        make sure we really override things.
2005-12-27 23:35:52 +00:00
Matthias Clasen
1e4efb6554 Fix #316221, Michal Benes, Stanislav Brabec;
2005-12-27  Matthias Clasen  <mclasen@redhat.com>

        Fix #316221, Michal Benes, Stanislav Brabec;

        * configure.in: Fix a strict aliasing problem in
        g_static_mutex_get_mutex().
        * glib/gthread.h: ...and in
        g_static_mutex_get_mutex_impl_shortcut().
2005-12-27 19:50:02 +00:00
Matthias Clasen
97ffe020cd Add a cast to silence compiler warnings. (#321978, Andrew Paprocki)
2005-12-27  Matthias Clasen  <mclasen@redhat.com>

        * glib/gdatasetprivate.h: Add a cast to silence compiler
        warnings.  (#321978, Andrew Paprocki)
2005-12-27 19:21:36 +00:00
Matthias Clasen
d947ad7167 Partial fix for bug #32937, Bogdan Nicula.
2005-12-27  Matthias Clasen  <mclasen@redhat.com>

        Partial fix for bug #32937, Bogdan Nicula.

        * configure.in: Check for malloc.h
        * glib/gslice.c: Don't include malloc.h unconditionally.
2005-12-27 19:15:12 +00:00
Manish Singh
4a94f2d332 export LC_COLLATE so it takes. (#324950, Dan Yefimov)
2005-12-27  Manish Singh  <yosh@gimp.org>

        * tests/run-collate-tests.sh: export LC_COLLATE so it takes.
        (#324950, Dan Yefimov)
2005-12-27 08:23:08 +00:00
Matthias Clasen
8ade96bdce On Win32, include process.h (#325015, Kazuki Iwamoto)
2005-12-26  Matthias Clasen  <mclasen@redhat.com>

	* glib/gslice.c: On Win32, include process.h  (#325015, Kazuki
	Iwamoto)
2005-12-26 23:18:09 +00:00
Matthias Clasen
3ca25a1efa Updates 2005-12-26 05:23:08 +00:00
Matthias Clasen
47d2ef18ea Fix C99isms. (#324950, Dan Yefimov)
2005-12-25  Matthias Clasen  <mclasen@redhat.com>

        * tests/slice-test.c: Fix C99isms.  (#324950, Dan Yefimov)
2005-12-26 04:59:34 +00:00
Matthias Clasen
513be6bbae Updates 2005-12-21 06:33:37 +00:00
Matthias Clasen
700a71f010 New function to sort tasks pushed into a threadpool. (#324479, Martyn
2005-12-20  Matthias Clasen  <mclasen@redhat.com>

	* glib/glib.symbols:
	* glib/gthreadpool.h:
	* glib/gthreadpool.c (g_thread_pool_set_sort_function): New function
	to sort tasks pushed into a threadpool.  (#324479, Martyn Russell)

	* tests/threadpool-test.c: Test this.
2005-12-21 04:45:56 +00:00
Tim Janik
3f9d65375e added mem_error() and mem_assert() to test and handle errors without
Tue Dec 20 18:14:14 2005  Tim Janik  <timj@imendio.com>

        * glib/gslice.[hc]: added mem_error() and mem_assert() to test and
        handle  errors without depending on gmessage.c which might not be
        setup when the error occours.
        removed G_SLICE_CONFIG_ALWAYS_FREE config option, fixed the code so
        always freeing can be achieved by adjusting the working set time to
        0 with G_SLICE_CONFIG_WORKING_SET_MSECS.
        added G_SLICE_CONFIG_COLOR_INCREMENT to test different color increments
        (mainly 0 and 1). reduced the minimum block size to 128 bytes, to
        minimize wastage if small amounts of differently sized structrues are
        allocated, this does come at a performance cost of roughly 5% though.
        fixed up block alignment calculation, so it works for varying
        block sizes. only use strerror() not g_strerror() since the latter
        depends on working GQuark and GSlice.
        mem_error(): implemented in terms of fprintf and vfprintf.

        * tests/slice-color.c: new program to test cache colorization effects.

        * tests/slice-test.c: trade G_SLICE_CONFIG_ALWAYS_FREE for 0 duration
        G_SLICE_CONFIG_WORKING_SET_MSECS.
2005-12-20 17:35:02 +00:00
Matthias Clasen
df21b345c5 Set an error in all failure cases. (#324332, Tim-Philipp Müller)
2005-12-17  Matthias Clasen  <mclasen@redhat.com>

        * glib/goption.c (parse_short_option): Set an error in all
        failure cases.  (#324332, Tim-Philipp Müller)
2005-12-18 02:46:27 +00:00
Sebastian Wilhelmi
78568970db Fix memory barrier position in g_atomic_int_get and g_atomic_pointer_get.
2005-12-17  Sebastian Wilhelmi  <seppi@seppi.de>

	* glib/gatomic.c: Fix memory barrier position in g_atomic_int_get
	and g_atomic_pointer_get. Add g_atomic_int_set and
	g_atomic_pointer_set implementations for the !DEFINE_WITH_MUTEXES &&
	G_ATOMIC_OP_MEMORY_BARRIER_NEEDED case, as well as defining them
	as functions (additionally to the macros in the header) for the
	!G_ATOMIC_OP_MEMORY_BARRIER_NEEDED case.
2005-12-17 12:20:50 +00:00
Matthias Clasen
63732bdf5e Don't return a pointer to a const struct, since apps expect to be able to
2005-12-16  Matthias Clasen  <mclasen@redhat.com>

        *  glib/gmem.c (g_allocator_new): Don't return a pointer to
        a const struct, since apps expect to be able to modify it.
        (#324179, J. Ali Harlow)
2005-12-16 21:13:18 +00:00
Tim Janik
7c24467a1c added g_atomic_pointer_set() and g_atomic_int_set() for systems where the
Tue Dec 13 10:13:32 2005  Tim Janik  <timj@imendio.com>

        * glib/gatomic.h: added g_atomic_pointer_set() and g_atomic_int_set()
        for systems where the initialization of atomic variables requires a
        write memory barrier.
2005-12-13 09:15:52 +00:00
Matthias Clasen
0d19d25fe4 Bump version 2005-12-09 20:00:06 +00:00
Matthias Clasen
eff8046fcc 2.9.1 2005-12-09 18:05:25 +00:00
Alexander Larsson
dd1878cd75 Use G_GNUC_WARN_UNUSED_RESULT on list functions that return the whole
2005-12-09  Alexander Larsson  <alexl@redhat.com>

	* glib/glist.h:
	* glib/gslist.h:
	Use G_GNUC_WARN_UNUSED_RESULT on list functions that return
	the whole list.
2005-12-09 13:58:57 +00:00
Matthias Clasen
52917fc408 Updates
2005-12-08  Matthias Clasen  <mclasen@redhat.com>

	* NEWS: Updates
2005-12-08 05:00:35 +00:00
Martyn James Russell
c6ad7b7ac8 - Call g_queue_insert_sorted() instead of duplicating the code. - Call
* glib/gasyncqueue.c:
- Call g_queue_insert_sorted() instead of duplicating the code.
- Call g_queue_sort() instead of duplicating the code.
- Invert sort function results to make sure the same sort function
gives the same results across glist, gslist, gqueue and
gasyncqueue.

* tests/asyncqueue-test.c:
- Updated the sort function to reflect the example in the
documentation for gasyncqueue.c.
2005-12-07 12:09:44 +00:00
Martyn James Russell
9763367246 Missed the ChangeLog 2005-12-07 11:36:48 +00:00
Tor Lillqvist
d63b58e8c5 Look up prefix at run-time on Win32, assuming the standard directory
2005-12-07  Tor Lillqvist  <tml@novell.com>

	* glib-gettextize.in: Look up prefix at run-time on Win32,
	assuming the standard directory structure with glib-gettextize in
	$prefix/bin.
2005-12-07 03:57:14 +00:00
Matthias Clasen
d3388eb4e8 Exempt GTK+ from the mem chunk deprecation, since we need GTK+ 2.8 to
2005-12-06  Matthias Clasen  <mclasen@redhat.com>

	* glib/gmem.h: Exempt GTK+ from the mem chunk deprecation, since
	we need GTK+ 2.8 to compile against GLib 2.10.
2005-12-06 14:16:27 +00:00
Manish Singh
b995c03ea2 set LC_COLLATE, not LANG, to be sure to override any user settings.
2005-12-05  Manish Singh  <yosh@gimp.org>

        * tests/run-collate-test.sh: set LC_COLLATE, not LANG, to be sure
        to override any user settings.
2005-12-05 21:45:06 +00:00
Matthias Clasen
886e00c760 Revert an accidental commit 2005-12-05 21:09:20 +00:00
Matthias Clasen
c9387d9069 Documentation updates. (#323291, Morten Welinder)
2005-12-05  Matthias Clasen  <mclasen@redhat.com>

	* glib/gutf8.c: Documentation updates.  (#323291, Morten Welinder)
2005-12-05 19:09:00 +00:00
Matthias Clasen
81f0bb11a9 Set MALLOC_CHECK_ and MALLOC_PERTURB_
2005-12-05  Matthias Clasen  <mclasen@redhat.com>

	* tests/Makefile.am (TESTS_ENVIRONMENT):
	* tests/gobject/Makefile.am (TESTS_ENVIRONMENT): Set
	MALLOC_CHECK_ and MALLOC_PERTURB_

	* tests/run-collate-tests.sh: Run the collation tests explicitly
	in en_US locale. (#320463)
2005-12-05 16:35:38 +00:00
Matthias Clasen
7d5800d718 Deprecate mem chunks 2005-12-05 15:54:44 +00:00
Matthias Clasen
0b5560da8b Add versioned deprecation information 2005-12-05 15:38:54 +00:00
Martyn James Russell
a127920458 - Added support for sorting async queues by with _push_sorted(),
* docs/reference/glib/glib-sections.txt:
* glib/gasyncqueue.[ch]:
- Added support for sorting async queues by with _push_sorted(),
_push_sorted_unlocked(), _sort() and _sort_unlocked() (#323047).

* tests/Makefile.am:
* tests/asyncqueue-test.c:
- Added test case for gasyncqueue.c
2005-12-05 15:08:45 +00:00
Tim Janik
6ed79b115c implement chain walking for arbitrary ->next pointer offsets in
Mon Dec  5 15:53:20 2005  Tim Janik  <timj@imendio.com>

        * glib/gslice.c: implement chain walking for arbitrary ->next pointer
        offsets in g_slice_free_chain_with_offset() based on a patch by behdad
        in bug 323178. moved time consuming logic from g_slice_free() out of
        the inner loop, so g_slice_free_chain_with_offset() provides a real
        performance benefit over g_slice_free1() now.

        * glib/gslice.h: renamed g_slice_free_chain() to
        g_slice_free_chain_with_offset(). implemented g_slice_free_chain() as
        a type-safe macro as suggested in bug 323178.
        simplified the macro implementation of g_slice_free() and implemented
        it in a type safe manner for all compliers as suggested by Morten
        Welinder <mortenw@gnome.org>.

        * glib/gmain.c:
        * glib/glist.c:
        * glib/gslist.c:
        * glib/glib.symbols: s/g_slice_free_chain/g_slice_free_chain_with_offset/
2005-12-05 15:01:27 +00:00
Matthias Clasen
559e1057a0 Add some docs.
2005-12-05  Matthias Clasen  <mclasen@redhat.com>

	* glib/gasyncqueue.c: Add some docs.
2005-12-05 13:50:39 +00:00
Matthias Clasen
5c32d5236f Fix compiler warnings.
2005-12-05  Matthias Clasen  <mclasen@redhat.com>

	* tests/libmoduletestplugin_a.c: Fix compiler warnings.

	* glib/gatomic.c: In the ia64 implementation, use
	__sync builtin without _si or _di suffix.  (#321229,
	Stanislav Brabec, patch by Andreas Schwab)
2005-12-05 13:37:55 +00:00
Behdad Esfahbod
9200814d86 Remove comma at the end of enum.
2005-12-04  Behdad Esfahbod  <behdad@gnome.org>

        * glib/gslice.h: Remove comma at the end of enum.
2005-12-05 00:45:55 +00:00
Matthias Clasen
8529c47126 Handle multiple user names with the same UID better. (#319535, Laszlo
2005-12-04  Matthias Clasen  <mclasen@redhat.com>

	Handle multiple user names with the same UID better.
	(#319535, Laszlo Peter)

	* glib/gutils.c (g_get_any_init_do): When determining user
	data, first look up $LOGNAME. If the UID doesn't match
	getuid(), fall back to the current behaviour of looking
	up the user data based on getuid().
2005-12-04 07:00:50 +00:00
Matthias Clasen
00f952f8e8 Add a macro to make gcc warn if a function result is ignored. (#145466,
2005-12-04  Matthias Clasen  <mclasen@redhat.com>

	* glib/gmacros.h (G_GNUC_WARN_UNUSED_RESULT): Add a macro
	to make gcc warn if a function result is ignored.  (#145466,
	Arjan van de Ven, Alex Larsson)

	* glib/gmem.h: Add the new attribute to g_realloc and
	g_try_realloc.
2005-12-04 06:41:58 +00:00
Matthias Clasen
36c836435b Deprecate g_cache_value_foreach. (#322956, Nicolas Caniart)
2005-12-03  Matthias Clasen  <mclasen@redhat.com>

	* glib/glib.symbols:
	* glib/gcache.h: Deprecate g_cache_value_foreach. (#322956,
	Nicolas Caniart)
2005-12-03 06:53:31 +00:00
Matthias Clasen
d87c91a396 Make mapping of empty files work. (#321530)
2005-12-03  Matthias Clasen  <mclasen@redhat.com>

        * glib/gmappedfile.c: Make mapping of empty files
        work.  (#321530)
2005-12-03 06:44:02 +00:00
Matthias Clasen
1fe373b279 Don't fork a new process just to fix the permissions of the created temp
2005-12-03  Matthias Clasen  <mclasen@redhat.com>

	* glib/gfileutils.c: Don't fork a new process just to
	fix the permissions of the created temp file.  (#321318,
	Alexis S. L. Carvalho)
2005-12-03 06:10:52 +00:00
Matthias Clasen
d1379dbdf8 Add a note about Solaris threads.
2005-12-02  Matthias Clasen  <mclasen@redhat.com>

	* README.in: Add a note about Solaris threads.
2005-12-02 21:40:43 +00:00
Matthias Clasen
f42f6da6d5 Remove support for Solaris threads. (#136971, Sebastian Wilhelmi, patch by
2005-12-02  Matthias Clasen  <mclasen@redhat.com>

	* glib/gspawn.c:
	* configure.in: Remove support for Solaris threads.
	(#136971, Sebastian Wilhelmi, patch by Andrew Paprocki)
2005-12-02 21:37:25 +00:00
Matthias Clasen
7ddcde62c0 Define G_GUINT64_CONSTANT in analogy to G_GINT64_CONSTANT. (#322568,
2005-12-02  Matthias Clasen  <mclasen@redhat.com>

	* configure.in: Define G_GUINT64_CONSTANT in analogy to
	G_GINT64_CONSTANT.  (#322568, Andrew Paprocki)
2005-12-02 21:25:45 +00:00
Matthias Clasen
ec2155a896 Portability fixes, C99ism removal 2005-12-02 20:11:28 +00:00
Matthias Clasen
8f843302f8 Add a missing volatile for the IA64 implementation.
2005-12-02  Matthias Clasen  <mclasen@redhat.com>

	* glib/gatomic.c (g_atomic_int_add): Add a missing volatile for
	the IA64 implementation.
2005-12-02 16:57:24 +00:00
Tim Janik
1e01f52ed4 some naming and type size fixups.
Fri Dec  2 16:18:09 2005  Tim Janik  <timj@imendio.com>

        * glib/gslice.c: some naming and type size fixups.
2005-12-02 15:18:39 +00:00
Tim Janik
605fc3d480 reworked GCC-specific type-safe macro variant into something less verbose,
Fri Dec  2 13:08:58 2005  Tim Janik  <timj@gtk.org>

        * glib/gslice.h (g_slice_free): reworked GCC-specific type-safe macro
        variant into something less verbose, but digestible for gcc-3.4.
2005-12-02 12:11:34 +00:00
Tim Janik
b78b4ee7fe extended to perform the benchmarking on the old memchunk code if 'O' is
Fri Dec  2 10:55:07 2005  Tim Janik  <timj@imendio.com>

        * tests/slice-test.c: extended to perform the benchmarking on the old
        memchunk code if 'O' is selected.

        * tests/memchunks.c: new file which contains the old GLib mem chunks
        implementation with prefix old_mem_chunk_.

        * tests/Makefile.am: added memchunks.c
2005-12-02 12:10:49 +00:00
Tim Janik
8a5fb6c1be improved gettimeofday() timer resolution by maintaining acceptable load
Fri Dec  2 00:16:59 2005  Tim Janik  <timj@imendio.com>

        * glib/gslice.c: improved gettimeofday() timer resolution by maintaining
        acceptable load distribution of the syscall.
        (allocator_get_magazine_threshold): reduce minimum/single-thread magazine
        sizes to approximately page_size/2.5 to avoid excessive startup allocations.
2005-12-01 23:21:49 +00:00
Tim Janik
2319431345 improved gettimeofday() timer resolution by maintaining acceptable load
Fri Dec  2 00:16:59 2005  Tim Janik  <timj@imendio.com>

        * glib/gslice.c: improved gettimeofday() timer resolution by maintaining
        acceptable load distribution of the syscall.
        (slab_allocator_free_chunk): reduce minimum/single-thread magazine sizes
        to approximately page_size/2.5 to avoid excessive startup allocations.
2005-12-01 23:20:22 +00:00
Matthias Clasen
a2f85d23ef Make tests work with slice allocator 2005-12-01 18:06:17 +00:00
Matthias Clasen
470abcc950 Remove a duplicate _LDADD 2005-12-01 16:43:56 +00:00
Tim Janik
733b1789c1 new slice allocator implementation.
Thu Dec  1 17:32:46 2005  Tim Janik  <timj@imendio.com>

        * glib/gslice.[hc]: new slice allocator implementation.

        * tests/slice-test.c: added random slice allocation test.

        * glib/gthread.[hc]: removed newly added private thread mem API.

        * glib/gthreadinit.h:
        * glib/gmessages.c:
        * glib/gthread.c:
        * glib/gmem.c: divided glib threading initialisation into three phases,
        initialisation where private keys and messaging are not available (only
        needed by gmem.c), initialisation without messaging but private keys
        available (gslice.c, gmessage.c), and full fledged initialisers that
        server the rest of glib. initialisation functions got renamed to reflect
        the limitations of their corresponding phases.

        * glib/gmem.c: removed memchunk code, defer allocations to
        g_slice_* instead.

        * glib/gmem.[hc]: removed g_slice_* skeletons.

        * glib/glib.symbols: added g_slice_* symbols.

        * configure.in: check for availability of posix_memalign(3), memalign(3)
        and valloc(3).

        * glib/Makefile.am: added gslice.[hc].
2005-12-01 16:34:33 +00:00
Tor Lillqvist
4a964f2566 In the Win32 implementation, strip trailing slash(es) for non-root
2005-12-01  Tor Lillqvist  <tml@novell.com>

	* glib/gstdio.c (g_stat): In the Win32 implementation, strip
	trailing slash(es) for non-root folders. stat() fails if non-root
	folders are specified with trailing slashes. It's too much hassle
	to demand that callers strip such slashes themselves, especially
	as it is easy to get it wrong and strip the slash of a root
	folder.
	(g_rename): On NT-based Windows, use MoveFileEx() with
	MOVEFILE_REPLACE_EXISTING to better match Unix behaviour.
2005-12-01 04:03:58 +00:00
Matthias Clasen
6796398522 Fix G_STMT_START / G_STMT_END on Solaris. (#321972, Andrew Paprocki)
2005-11-28  Matthias Clasen  <mclasen@redhat.com>

        Fix G_STMT_START / G_STMT_END on Solaris.  (#321972,
        Andrew Paprocki)

        * configure.in: Check whether do { } while (0) works.

        * glib/gmacros.h: Use do { } while (0) for G_STMT_START /
        G_STMT_END if it works.
2005-11-30 04:54:57 +00:00
Matthias Clasen
09b118f462 Silence compiler warnings.
2005-11-28  Matthias Clasen  <mclasen@redhat.com>

	* glib/gthread.c (g_static_rw_lock_wait, g_static_rw_lock_signal):
	* glib/gnode.c (g_node_depth_traverse_level):
	* glib/gmem.c (g_allocator_new):
	* glib/ghash.c (g_hash_table_unref, g_hash_table_destroy)
	(g_hash_table_foreach_remove_or_steal): Silence compiler
	warnings.
2005-11-28 18:31:03 +00:00
Matthias Clasen
bb5ce4b2d3 Don't read beyond len. (#322520, Christian Persch)
2005-11-27  Matthias Clasen  <mclasen@redhat.com>

	* glib/gunicollate.c (g_utf8_collate_key_for_filename):
	Don't read beyond len.  (#322520, Christian Persch)
2005-11-27 20:15:41 +00:00
Tim Janik
2027d87b5b access datalist flags via atomic pointer access funcitons, instead of
Wed Nov 23 17:34:01 2005  Tim Janik  <timj@imendio.com>

        * glib/gdataset.c: access datalist flags via atomic pointer access
        funcitons, instead of acquiring the dataset lock. this is faster and
        also matches the atomic pointer readouts in gdatalistprivate.h and
        direct pointer modifications required by gobject.c.
2005-11-23 17:54:57 +00:00
Tim Janik
311094aeab streamlined initialization code somewhat, removed GData node cache.
Wed Nov 23 13:35:31 2005  Tim Janik  <timj@gtk.org>

        * glib/gdataset.c: streamlined initialization code somewhat,
        removed GData node cache.
2005-11-23 12:37:20 +00:00
Matthias Clasen
fe749cbd3b Documentation improvements 2005-11-23 04:29:43 +00:00
Matthias Clasen
9ee3896017 Avoid double locking in g_intern_string (#322133, Benedikt Meurer)
2005-11-22  Matthias Clasen  <mclasen@redhat.com>

	Avoid double locking in g_intern_string (#322133,
	Benedikt Meurer)

	* glib/gdataset.c (g_quark_from_string_internal): New
	internal function which factors out common parts of
	g_quark_from[_static]_string.
	(g_quark_from_string, g_quark_from_static_string):
	Use g_quark_from_string_internal.
	(g_intern_string, g_intern_static_string): Use
	g_quark_from_string_internal, and only take the
	lock once.
	(g_quark_new): Don't store the strings shifted by -1
	in the g_quarks array.
	(g_quark_to_string): Adapt to the previous change.
2005-11-22 15:34:09 +00:00
Tim Janik
3e847a090c g_hash_table_new_full(): create hash tables with a ref count of 1.
Tue Nov 22 14:04:26 2005  Tim Janik  <timj@imendio.com>

        * glib/ghash.h:
        * glib/ghash.c:
        g_hash_table_new_full(): create hash tables with a ref count of 1.
        g_hash_table_ref(): atomically ref_count+=1
        g_hash_table_unref(): atomically ref_count-=1, destroys hash table
        when refcount reaches 0.
        g_hash_table_destroy(): just destroy keys and values, unref by 1.
        g_hash_table_insert():
        g_hash_table_replace(): assert ref_count>0.

        * glib/gatomic.h:
        * glib/gatomic.c: added 'volatile' qualifier to all atomic pointer and
        integer pointers.
2005-11-22 13:16:58 +00:00
Behdad Esfahbod
79209e5d56 Oops, copy-pasted Matthias's sig line!
2005-11-20  Behdad Esfahbod  <behdad@gnome.org>

        * glib/guniprop.c (g_unichar_get_mirror_char): Remove unused
        variables. (#321984, Andrew Paprocki)
2005-11-21 00:50:04 +00:00
Matthias Clasen
dad87b1a75 Remove unused variables. (#321984, Andrew Paprocki)
2005-11-18  Matthias Clasen  <mclasen@redhat.com>

        * glib/guniprop.c (g_unichar_get_mirror_char): Remove unused
        variables. (#321984, Andrew Paprocki)
2005-11-21 00:47:54 +00:00
Matthias Clasen
ee90a04fcb Bump version 2005-11-18 14:01:59 +00:00
Matthias Clasen
d7deadb1e2 2.9.0 2005-11-18 13:58:48 +00:00
Matthias Clasen
f59aac306d Prepare for 2.9.0 2005-11-17 21:33:07 +00:00
Matthias Clasen
2966c751b1 Updates
2005-11-17  Matthias Clasen  <mclasen@redhat.com>

	* NEWS: Updates

	* glib/gthread.c (g_thread_foreach): Mark as new api.

	* README.in: Updates.
2005-11-17 19:05:59 +00:00
Matthias Clasen
9f90f2f23e Add functions to set a date from a time_t and from a GTimeVal.
2005-11-17  Matthias Clasen  <mclasen@redhat.com>

	* glib/glib.symbols:
	* glib/gdate.h:
	* glib/gdate.c (g_date_set_time_t):
	(g_date_set_time_val): Add functions to set a date from
	a time_t and from a GTimeVal.
	(g_date_set_time): Deprecate.  (#314067, Roger Leigh)
2005-11-17 17:51:59 +00:00
Matthias Clasen
1ee0917984 Unit tests for g_utf8_pointer_to_offset and g_utf8_offset_to_pointer.
2005-11-17  Matthias Clasen  <mclasen@redhat.com>

	* tests/Makefile.am:
	* tests/utf8-pointer.c: Unit tests for g_utf8_pointer_to_offset
	and g_utf8_offset_to_pointer.

	* glib/gutf8.c (g_utf8_pointer_to_offset)
	(g_utf8_offset_to_pointer): Handle negative offsets, and use
	"stutter stepping" for going backwards. (#320638, Larry
	Ewing)
2005-11-17 15:50:31 +00:00
Matthias Clasen
92ea153ae9 const correctness fixes, found by Arjan van de Ven and gcc.
2005-11-17  Matthias Clasen  <mclasen@redhat.com>

	* glib/gbacktrace.c:
	* glib/gdate.c:
	* glib/gthread.c: const correctness fixes, found
	by Arjan van de Ven and gcc.
2005-11-17 13:17:22 +00:00
Behdad Esfahbod
cac3d6ea8d Correct typo on mentioning @G_UNICODE_BREAK_UNKNOWN that should be
2005-11-16  Behdad Esfahbod  <behdad@gnome.org>

        * docs/reference/glib/tmpl/unicode.sgml: Correct typo on mentioning
        @G_UNICODE_BREAK_UNKNOWN that should be #G_UNICODE_BREAK_UNKNOWN.
2005-11-17 03:39:47 +00:00
Behdad Esfahbod
8bd94d0eb8 Use bit hacks instead when checking a general category value against
2005-11-09  Behdad Esfahbod  <behdad@gnome.org>

        * glib/guniprop.c: Use bit hacks instead when checking a general
        category value against multiple values.

        * glib/gutf8.c: Change ISO10646 to Unicode in docs.
2005-11-10 01:15:11 +00:00
Simos Xenitellis
5fd0cf735c Added Tatar translation by Albert Fazlí 2005-11-10 00:29:41 +00:00
Tor Lillqvist
4884c293d1 Don't call g_warning(). (#320688) Instead set error and return failure.
2005-11-05  Tor Lillqvist  <tml@novell.com>

	* glib/giowin32.c (g_io_win32_set_flags): Don't call g_warning().
	(#320688) Instead set error and return failure.
2005-11-08 08:46:57 +00:00
Matthias Clasen
6d763bd97c Don't call cb_funcs->unref while holding the context lock. (#320886, Andy
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

	* glib/gmain.c (g_main_dispatch): Don't call cb_funcs->unref
	while holding the context lock.  (#320886, Andy Wingo)
2005-11-07 20:15:48 +00:00
Billy Biggs
e8e3891c0f Add a missing reference to libglib in the LDADD for this test.
2005-11-07  Billy Biggs <vektor@dumbterm.net>

	* tests/refcount/Makefile.am: Add a missing reference to libglib
	in the LDADD for this test.
2005-11-07 16:29:19 +00:00
Matthias Clasen
7efd9fe3c8 We need to set n_preallocs to a nonzero value, otherwise GTK+ 2.8 breaks
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

	* glib/gmem.c (g_allocator_new): We need to set n_preallocs to a
	nonzero value, otherwise GTK+ 2.8 breaks when compiled against
	GLib 2.9.  (#320755, Luca Ferretti)
2005-11-07 15:36:21 +00:00
Matthias Clasen
e9852a17be Apply a patch from Behdad Esfahbod to use a faster lookup table for
2005-11-04  Matthias Clasen  <mclasen@redhat.com>

	* glib/Makefile.am: Apply a patch from Behdad Esfahbod to
	use a faster lookup table for g_unichar_get_mirror_char().
	* glib/gmirroringtable.h: The new table.
	* glib/gunichartables.h: Remove bidi_mirroring_table.
	* glib/gen-unicode-tables.pl: Don't generate the mirroring
	table.
	* glib/glib-mirroring-tab/*: Sources for the program
	which generated gmirroringtable.h.

	* glib/glist.c: Avoid some code duplication.
2005-11-04 22:27:04 +00:00
Matthias Clasen
747c3b63bb Include gdataset.h. (#320322)
2005-11-04  Matthias Clasen  <mclasen@redhat.com>

        * glib/gscanner.h: Include gdataset.h.  (#320322)
2005-11-04 19:17:42 +00:00
Matthias Clasen
8b14175a3e add new GDebugFlag for fatal_criticals handle G_DEBUG=fatal_criticals, to
2005-11-04  Matthias Clasen  <mclasen@redhat.com>

        * glib/gdebug.h: add new GDebugFlag for fatal_criticals
        * glib/gmessages.c: (_g_debug_init): handle G_DEBUG=fatal_criticals,
        to help find critical warnings in applications.  (#320017,
        Vincent Untz)
2005-11-04 19:05:30 +00:00
Tor Lillqvist
eff8f7511e Remove large amount of trailing whitespace from one line. Remove #ifdef
2005-11-02  Tor Lillqvist  <tml@novell.com>

	* glib/glib.symbols: Remove large amount of trailing whitespace
	from one line. Remove #ifdef G_UNDEFINED from around
	g_hash_table_new and g_hash_table_new_full symbols, what was the
	purpose of that? Add the g_slice functions.
2005-11-01 23:04:09 +00:00
Tim Janik
0cba1b531d prepared deprecation of GMemChunk and GAllocator. added g_slice_*() API to
Tue Nov  1 16:24:20 2005  Tim Janik  <timj@imendio.com>

        * glib/gmem.[hc]: prepared deprecation of GMemChunk and GAllocator.
        added g_slice_*() API to allocate and cache small bits of memory.
        an actuall allocator implementation for g_slice_*() is still pending.

        * glib/gthread.[hc]: changes from a patch by Matthias Clasen.
        changed GRealThread list to use in-structure *next; fields instead
        of GSList, in order for thread iteration to not depenend on g_slice_*()
        indirectly.
        _g_thread_mem_private_get():
        _g_thread_mem_private_set(): added accessors for private memory,
        needed because the ordinary GPrivate implementation relies on GArray
        and GSList and therefore indirectly on working g_slice_*() allocations.

        * glib/gthread.[hc]:
        g_thread_foreach(): new public API function to loop over all existing threads.

        * glib/gdataset.c:
        * glib/gstring.c:
        * glib/gcache.c:
        * glib/garray.c:
        * glib/gqueue.c:
        * glib/gslist.c:
        * glib/glist.c:
        * glib/ghash.c:
        * glib/gtree.c:
        * glib/ghook.c:
        * glib/gmain.c:
        * glib/gnode.c:
        removed GAllocator and free list usages and accompanying locks.
        use g_slice_*() API to allocate and cache small bits of memory.

        * glib/ghook.h: removed GMemChunk field from public API.

        * glib/gslist.h:
        * glib/glist.h: deprecate allocator API, provide _free1() for consistency.

        * glib/gnode.h: deprecate allocator API.

        * glib/gmain.c: reordered GPollRec fields so g_slice_free_chain() can
        be used for poll rec lists.

        * glib/grel.c: removed mem chunk usage, and allocated tuples via g_slice_*().
        g_relation_destroy(): free all tuples from the all_tuples hash table,
        this effectively maintains the life time track keeping of tuples.
        g_relation_delete_tuple(): free tuples which are removed from the
        all_tuples hash table. this fixes a temporary leak that was present
        in the memchunk code until the destruction of the relation.
2005-11-01 18:10:31 +00:00
Matthias Clasen
3a042a8959 Add some tests for conversions between UTF-8, UCS-4 and UTF-16.
2005-10-29  Matthias Clasen  <mclasen@redhat.com>

	* tests/convert-test.c: Add some tests for conversions between
	UTF-8, UCS-4 and UTF-16.

	* glib/gutf8.c (g_utf8_to_ucs4, g_utf8_to_utf16): Fix handling
	of len == -1, noticed by Morten Welinder.
2005-10-30 03:05:21 +00:00
Erdal Ronahi
ff1b39b754 Added Kurdish translation 2005-10-27 18:36:09 +00:00
Matthias Clasen
79fa3efec2 Fix 319806 2005-10-26 13:10:55 +00:00
Manish Singh
03e630f025 Use AC_CHECK_FUNCS for _NSGetEnviron, to get the config.h symbol
2005-10-19  Manish Singh  <yosh@gimp.org>

        * configure.in: Use AC_CHECK_FUNCS for _NSGetEnviron, to get the
        config.h symbol automatically. Fixes bug #313731.
2005-10-19 18:37:48 +00:00
Tor Lillqvist
bf58342275 Return a g_strdup()ed copy of the value stored in the hash table, so that
2005-10-19  Tor Lillqvist  <tml@novell.com>

	* glib/gwin32.c (g_win32_get_package_installation_directory):
	Return a g_strdup()ed copy of the value stored in the hash table,
	so that it can be g_free()d without leaving a dangling pointer in
	the hash table. (#319232)
2005-10-19 15:38:44 +00:00
Matthias Clasen
df2746311f Fix sorting of 0 sequences in filenames 2005-10-07 03:04:03 +00:00
Matthias Clasen
9414478982 Doc addition
2005-10-05  Matthias Clasen  <mclasen@redhat.com>

	* glib/gmarkup.c (g_markup_escape_text): Doc addition
2005-10-05 20:11:25 +00:00
Matthias Clasen
d433419b14 Add Collation tests.
2005-10-05  Matthias Clasen  <mclasen@redhat.com>

	* Makefile.am: Add Collation tests.

	* tests/collate/*: Inputs and expected outputs for collation tests.

	* tests/run-collate-tests.sh: Script to run collation tests.

	* tests/unicode-collate.c (main): Rework slightly to make
	it usable in unit tests. Also test g_utf8_collate_key_for_filename().
2005-10-05 17:37:46 +00:00
Behdad Esfahbod
c83e2b3349 Updated to Unicode 4.1. There are five new GUnicodeBreakType types. That
2005-10-01  Behdad Esfahbod  <behdad@gnome.org>

        * docs/reference/glib/tmpl/unicode.sgml:
        * glib/gen-unicode-tables.pl:
        * glib/gunibreak.h:
        * glib/gunichartables.h:
        * glib/gunicode.h:
        * tests/casefold.txt:
        * tests/casemap.txt: Updated to Unicode 4.1.  There are five new
        GUnicodeBreakType types.  That may break some applications, like
        Pango <= 1.10.
2005-10-01 12:34:21 +00:00
David Odin
09a819fef9 Moved the ChangeLog entry to the right ChangeLog 2005-09-27 19:01:53 +00:00
David Odin
31659726ea initialize all the fields of GInterfaceInfo in the G_IMPLEMENT_INTERFACE
* gobject/gtype.h: initialize all the fields of GInterfaceInfo in the
  G_IMPLEMENT_INTERFACE macro, to shut up a warning when compiling at -W
2005-09-26 18:35:32 +00:00
Matthias Clasen
4d83c82f47 Add details to the docs. (#314393, Matthew F. Barnes)
2005-09-26  Matthias Clasen  <mclasen@redhat.com>

	* glib/gstrfuncs.c (g_ascii_strtoull): Add details to the
	docs.  (#314393, Matthew F. Barnes)
2005-09-26 14:44:01 +00:00
Matthias Clasen
5b60a98d99 Remove g_snprintf() and g_vsnprintf(), since they are already declared in
2005-09-26  Matthias Clasen  <mclasen@redhat.com>

	* glib/gprintf.h: Remove g_snprintf() and g_vsnprintf(), since
	they are already declared in glib.h. This doesn't break documented
	use of gprintf.h, but should probably be pointed out in the
	release notes for 2.10. (#314232, Behdad Esfahbod)
2005-09-26 14:33:00 +00:00
Tim Janik
744a4397ff applied significant recursion complexity optimization, based on a patch
Tue Sep 20 13:16:04 2005  Tim Janik  <timj@imendio.com>

        * glib/gpattern.c (g_pattern_ph_match): applied significant recursion
        complexity optimization, based on a patch from Matthias Clasen.

        * tests/patterntest.c: more tests, mostly from matthias.
2005-09-20 11:20:23 +00:00
Matthias Clasen
3fef89349b Doc fixes 2005-09-20 05:50:24 +00:00
Tim Janik
a2ff6e7982 applied a patch from matthias which checks on the upper bound of
Mon Sep 19 17:23:23 2005  Tim Janik  <timj@imendio.com>

        * glib/gpattern.c: applied a patch from matthias which checks on the
        upper bound of GPatternSpec length to optimize matches.
        cosmetic fixups.

        * tests/patterntest.c: added more match cases.
2005-09-19 15:27:17 +00:00
Tor Lillqvist
3fc9c7a45a Add warning to doc comment that these functions should not be used on
2005-09-16  Tor Lillqvist  <tml@novell.com>

	* glib/gstrfuncs.c (g_ascii_strcasecmp, g_ascii_strncasecmp): Add
	warning to doc comment that these functions should not be used on
	encodings like CP932.
2005-09-15 23:41:25 +00:00
Matthias Clasen
81719cc164 Add a test for grup names of length 1.
2005-09-14  Matthias Clasen  <mclasen@redhat.com>

	* tests/keyfile-test.c: Add a test for grup names of length 1.

	* glib/gkeyfile.c (g_key_file_line_is_group): Accept group names
	of length 1.  (#316309)
2005-09-14 18:04:53 +00:00
Matthias Clasen
047558bc21 Clarify docs.
2005-09-12  Matthias Clasen  <mclasen@redhat.com>

	* glib/gmarkup.c (g_markup_escape_text): Clarify docs.
2005-09-12 18:23:43 +00:00
Sebastian Wilhelmi
d8d12ca541 Link the the refcount tests to the system thread library $(G_THREAD_LIBS).
2005-09-11  Sebastian Wilhelmi  <seppi@seppi.de>

	* tests/refcount/Makefile.am (INCLUDES): Link the the refcount
	tests to the system thread library $(G_THREAD_LIBS). Fixes #313744
	and #314217.
2005-09-11 16:48:38 +00:00
Kjartan Maraas
2d3fff85d7 Remove some dead code. Closes bug #315278.
2005-09-11  Kjartan Maraas  <kmaraas@gnome.org>

	* glib/gmain.c: (g_child_watch_prepare), (g_child_watch_check),
	(child_watch_helper_thread): Remove some dead code. Closes
	bug #315278.
2005-09-11 15:20:52 +00:00
Tor Lillqvist
17045b64d3 Create also a console version of the gspawn-win32-helper program,
2005-09-07  Tor Lillqvist  <tml@novell.com>

	* glib/Makefile.am: Create also a console version of the
	gspawn-win32-helper program, gspawn-win32-helper-console.exe.
	It's otherwise identical to gspawn-win32-helper.exe, except marked
	as a console application (linked without the -mwindows option).

	* glib/gspawn-win32.c (do_spawn_directly, do_spawn_with_pipes):
	Drop the dont_wait parameter. Its truth value correlated 100% with
	the NULLness of the exit_status parameter anyway, so it's enough
	to check whether exit_status is NULL. Invert the sense of the
	dont_return_handle parameter and rename it to do_return_handle, to
	make the code easier to read by avoiding double negations.

	(g_spawn_sync_utf8, g_spawn_async_with_pipes_utf8): Modify calls
	to do_spawn_with_pipes() accordingly.

	(do_spawn_with_pipes): If we have a console, use the console
	version of the helper program, otherwise use the GUI one. This
	avoids extra console windows opening up in some situations. (In
	case a console application uses the GUI gspawn-win32-helper.exe to
	spawn another console application we would get a separate console
	for the spawned console application).

	* glib-zip.in: Distribute also gspawn-win32-helper-console.exe.
2005-09-07 10:10:49 +00:00
Matthias Clasen
38094ffb5c Report an error if the file is too large. (#315275, Kjartan Maraas)
2005-09-05  Matthias Clasen  <mclasen@redhat.com>

	* glib/gmappedfile.c (g_mapped_file_new): Report an error
	if the file is too large.  (#315275, Kjartan Maraas)
2005-09-05 18:20:24 +00:00
Matthias Clasen
1c0b689399 The return value of read() is signed. (#315273, Kjartan Maraas)
2005-09-05  Matthias Clasen  <mclasen@redhat.com>

	* glib/gkeyfile.c (g_key_file_load_from_fd): The return value
	of read() is signed.  (#315273, Kjartan Maraas)
2005-09-05 17:55:11 +00:00
Tor Lillqvist
130763338c Wrapping atexit() is a bad idea on Windows, where the EXE and each DLL
2005-08-31  Tor Lillqvist  <tml@novell.com>

	* glib/gutils.h: Wrapping atexit() is a bad idea on Windows, where
	the EXE and each DLL have their own atexit function chains.

	#define g_atexit as atexit instead. This means it has a
	better chance of doing what the caller wants. For instance,
	gtkhtml calls g_atexit() registering a function in gtkhtml
	itself. This caused a crash when g_atexit() was implemented as a
	function in the GLib DLL. The gtkhtml DLL was already unloaded by
	the time the GLib DLL got unloaded.

	* glib/gutils.c: #undef the #define mentioned above, to also get a
	real g_atexit() into the DLL for backward compatibility. Document
	the Windows behaviour of g_atexit(), and document the varying ways
	atexit() can behave in the context of dynamically loaded modules
	on Unix.
2005-08-31 21:02:47 +00:00
Matthias Clasen
70af0de0ef Add functions to intern strings.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* glib/glib.symbols:
	* glib/gquark.h:
	* glib/gdataset.c: Add functions to intern strings.
2005-08-31 14:25:45 +00:00
Matthias Clasen
f60ede1724 Unify some near-duplicate strings. (#314654, Clytie Siddall)
2005-08-28  Matthias Clasen  <mclasen@redhat.com>

	* glib/giochannel.c: Unify some near-duplicate strings. (#314654,
	Clytie Siddall)
2005-08-28 06:11:55 +00:00
Matthias Clasen
6c1eca79c8 Bump version 2005-08-26 19:27:01 +00:00
Tor Lillqvist
41e833ae4c Make also the g_spawn*() functions take parameters in the GLib file name
2005-08-25  Tor Lillqvist  <tml@novell.com>

	Make also the g_spawn*() functions take parameters in the GLib
	file name encoding, i.e. UTF-8, on Windows. Has no impact on Unix
	API or ABI. Like the other GLib API that was earlier changed to
	use UTF-8 on Windows, the names of the functions that take UTF-8
	have _utf8 suffixes added by using preprocessor macros in the
	header file. The old names are kept for functions with the old
	behaviour, taking parameters in the system codepage, for DLL ABI
	stability.

	* glib/gspawn.h: On Win32 add the suffix _utf8 to the names of the
	g_spawn*() functions.

	* glib/gspawn-win32.c: Use wide-char API on NT-based
	Windows. Convert parameters from UTF-8 to wide chars (NT) or
	system codepage (Win9x) and call the C library _wspawn*() or
	spawn*() functions respectvely. Add DLL ABI stability versions
	that take parameters in the system codepage.

	* glib/gspawn-win32-helper.c: On NT-based Windows use the
	wide-char versions of argv and envp, and use wide-char API to
	change directory and spawn the program to run. Remove the verbose
	debugging output, it was too complex to modify for the wide-char
	features. (Just add temporary debugging printouts if needed, no
	need to have them permanently in the source.)

	* glib/gspawn.c: Corresponding documentation updates.

	* glib/glib.symbols: Corresponding changes: Mark the ABI stability
	symbols as PRIVATE, add the new _utf8-suffixed ones.
2005-08-25 23:28:24 +00:00
Owen Taylor
2982892d98 Truncate ChangeLog after moving aside 2005-08-24 18:53:51 +00:00
Stepan Kasal
d923d1f03f (G_MININT64): Cast to gint64. 2005-08-24 14:14:02 +00:00
Matthias Clasen
4adde8fdca Fix the crt_externs.h include 2005-08-24 03:11:45 +00:00
Stepan Kasal
6072bfbb08 Stepan 2005-08-23 07:16:20 +00:00
Matthias Clasen
be07400b2d Bump version 2005-08-23 04:57:18 +00:00
Matthias Clasen
4bf14f1c4e 2.8.1 2005-08-23 04:35:33 +00:00
Hans Breuer
0b106554ac link with ws2_32.lib
2005-08-20  Hans Breuer  <hans@breuer.org>

	* glib/makefile.msc.in : link with ws2_32.lib
2005-08-20 13:26:19 +00:00
Tor Lillqvist
3c449f00cc Check for <sys/wait.h>
2005-08-18  Tor Lillqvist  <tml@novell.com>

	* configure.in: Check for <sys/wait.h>

	* glib/gbacktrace.c: Include <sys/wait.h> on if HAVE_SYS_WAIT_H.
2005-08-18 13:08:18 +00:00
Ross Burton
efa05f88ef Optimise single-character insertions 2005-08-18 09:30:24 +00:00
Matthias Clasen
a1ab92582c Check for crt_externs.h and _NSGetEnviron.
2005-08-17  Matthias Clasen  <mclasen@redhat.com>

	* configure.in: Check for crt_externs.h and _NSGetEnviron.

	* glib/gutils.c: On Darwin, include crt-externs.h and
	define environ using _NSGetEnviron().  (#313731)
2005-08-17 18:31:08 +00:00
Stepan Kasal
63828e25ec Move the body of the big if... (g_get_any_init_do): ... to this new
2005-08-16  Stepan Kasal  <kasal@ucw.cz>

	* glib/gutils.c (g_get_any_init): Move the body of the big if...
	(g_get_any_init_do): ... to this new function.
	(g_get_any_init): Declare as inline.
	(g_get_any_init_locked): New inline function, does the locking.
	Make use of these two throughout the code.
2005-08-17 12:00:51 +00:00
Matthias Clasen
56a63c1568 Wait for the child process and then simply return. This makes The "S"
2005-08-15  Matthias Clasen  <mclasen@redhat.com>

	* glib/gbacktrace.c (g_on_error_stack_trace): Wait for
	the child process and then simply return. This makes
	The "S" option work as documented in g_on_error_query().
	(#313125, Matthew F. Barnes)
2005-08-15 19:32:32 +00:00
Matthias Clasen
8c663934ca Update the link to Unicode category values. (#313369, Behnam Esfahbod)
2005-08-15  Matthias Clasen  <mclasen@redhat.com>

	* glib/gunicode.h: Update the link to Unicode category
	values.  (#313369, Behnam Esfahbod)
2005-08-15 18:49:11 +00:00
Matthias Clasen
95ffa1e5af Clarify docs a little. (#311727, Tristan van Berkom)
2005-08-15  Matthias Clasen  <mclasen@redhat.com>

	* glib/gqueue.c (g_queue_find_custom): Clarify docs
	a little.  (#311727, Tristan van Berkom)
2005-08-15 18:28:12 +00:00
Matthias Clasen
30828b953a Fix abi checks for ia64. 2005-08-15 05:00:57 +00:00
Matthias Clasen
ea7ebd6e8e Bump version 2005-08-12 17:45:16 +00:00
Matthias Clasen
6de0ca7807 2.8.0 2005-08-12 17:18:55 +00:00
Tim-Philipp Müller
7788ead137 Special-case flag value of 0. Instead of returning the first random
* gobject/genums.c: (g_flags_get_first_value): Special-case flag
value of 0. Instead of returning the first random GFlagsValue
we come across, return the GFlagsValue for 0 if it exists or
NULL if it does not exist. Never return the GFlagsValue for 0
if the requested flags value is nonzero.
2005-08-12 16:09:19 +00:00
Matthias Clasen
19fb1c599e Bump version to 2.8.0 2005-08-12 12:56:57 +00:00
Tor Lillqvist
535939a144 Use "localhost" as fallback for g_get_host_name(), not "unknown".
2005-08-11  Tor Lillqvist  <tml@novell.com>

	* glib/gutils.c (g_get_any_init): Use "localhost" as fallback for
	g_get_host_name(), not "unknown".
2005-08-10 21:13:29 +00:00
Stepan Kasal
0169468c8c Fix typos: invokation -> invocation. 2005-08-10 10:46:55 +00:00
Matthias Clasen
833abd554a Take a va_list*, not a va_list, to avoid compiler warnings about
2005-08-10  Matthias Clasen  <mclasen@redhat.com>

	* glib/gfileutils.c (g_build_path_va, g_build_pathname_va):
	Take a va_list*, not a va_list, to avoid compiler warnings
	about uninitialized variables.
2005-08-10 04:07:47 +00:00
Matthias Clasen
320711e224 Add it here.
2005-08-09  Matthias Clasen  <mclasen@redhat.com>

	* tests/gobject/Makefile.am (test_programs): Add it here.

	* tests/gobject/gvalue-test.c: Beginning of a test suite
	for GValue.
2005-08-09 19:20:33 +00:00
Matthias Clasen
d6f6214d3e Updates 2005-08-09 14:10:19 +00:00
Matthias Clasen
f3d4fb75b8 Initialize variables to not make gcc nervous.
2005-08-08  Matthias Clasen  <mclasen@redhat.com>

	* glib/gutils.c (_g_compute_locale_variants): Initialize
	variables to not make gcc nervous.
2005-08-09 02:45:20 +00:00
Manish Singh
6c538d33ee remove stray -V option to grep so it actually works.
2005-08-08  Manish Singh  <yosh@gimp.org>

        * glib/abicheck.sh: remove stray -V option to grep so it actually
        works.
2005-08-09 00:25:18 +00:00
Matthias Clasen
717f3d4abb Enable the endianness test.
2005-08-08  Matthias Clasen  <mclasen@redhat.com>

	* tests/convert-test.c: Enable the endianness test.

	* glib/gconvert.c: Make the caching of iconv descriptors
	optional.

	* configure.in: Add an --enable-iconv-cache option, and
	default to disabling iconv caching on new enough glibc.
	Somebody with access to Solaris systems will need to test
	if opening/closing of iconv descriptors is enough of
	a performance problem to warrant the caching on that
	platform. Note that the caching is causing correctness
	problems in some corner cases, thus turning it off
	is desirable unless it has severe performance implications.
2005-08-08 19:50:38 +00:00
Matthias Clasen
eb37812fbe Add a test for endianness handling.
2005-08-08  Matthias Clasen  <mclasen@redhat.com>

	* tests/convert-test.c: Add a test for
	endianness handling.
2005-08-08 16:48:23 +00:00
Sunil Mohan Adapa
ee7932f307 Added Telugu translation done by Vikram Phaneendra <vikramphaneendra@yahoo.co.in>, Dandu Prasad <dandu_prasad2000@yahoo.com> and Ramana Sai <rmn_sai@yahoo.co.in> 2005-08-08 09:54:32 +00:00
Matthias Clasen
308678a613 Add convert-test here.
2005-08-08  Matthias Clasen  <mclasen@redhat.com>

	* tests/Makefile.am: Add convert-test here.

	* tests/convert-test.c: Add the beginning of a testsuite
	for g_convert() and friends.
2005-08-08 05:30:20 +00:00
Matthias Clasen
cb3f32383e Improve ABI checking 2005-08-06 15:26:49 +00:00
Manish Singh
f1e1727ce7 remove unused n_threads variable.
2005-08-05  Manish Singh  <yosh@gimp.org>

        * tests/refcount/closures.c: remove unused n_threads variable.
2005-08-06 00:33:49 +00:00
Matthias Clasen
0273f0e337 Bump version 2005-08-05 16:10:41 +00:00
Matthias Clasen
d5c882abc4 2.7.7 2005-08-05 16:09:42 +00:00
Matthias Clasen
8e7a50ab42 Always export g_atomic_int_get and g_atomic_pointer_get as functions, even
2005-08-04  Matthias Clasen  <mclasen@redhat.com>

	* glib/glib.symbols:
	* glib/gatomic.[hc]: Always export g_atomic_int_get and
	g_atomic_pointer_get as functions, even if we have macros,
	to avoid changing the ABI depending on configuration.

	* glib/gatomic.c: Fix the s390 implementations of
	g_atomic_pointer_compare_and_exchange.
2005-08-04 17:21:03 +00:00
Tor Lillqvist
9c45222942 Move the G_BEGIN_DECLS/G_END_DECLS pair outside the #if/#else/#endif
2005-08-04  Tor Lillqvist  <tml@novell.com>

	* glib/gstdio.h: Move the G_BEGIN_DECLS/G_END_DECLS pair outside
	the #if/#else/#endif block. Otherwise we had G_BEGIN_DECLS without
	matching G_END_DECLS on Unix, and G_END_DECLS without matching
	G_BEGIN_DECLS on Win32.
2005-08-04 17:07:21 +00:00
Matthias Clasen
a22afd365e Bump version 2005-08-03 21:03:17 +00:00
Matthias Clasen
6e103ba100 2.7.6 2005-08-03 20:58:37 +00:00
Ross Burton
fada30c956 Small doc updates 2005-08-03 20:24:18 +00:00
Matthias Clasen
4f016b4824 Add native atomic operations for s390.
2005-08-03  Matthias Clasen  <mclasen@redhat.com>

        * glib/gatomic.c: Add native atomic operations
        for s390.

        * configure.in: ... and use them on s390.
2005-08-03 20:18:15 +00:00
Ross Burton
bbecb798e2 Fix Docbook tag typo 2005-08-03 19:44:52 +00:00
Matthias Clasen
b8fb9fd074 Add G_BEGIN_DECLS/G_END_DECLS. (#312424)
2005-08-03  Matthias Clasen  <mclasen@redhat.com>

	* glib/gstdio.h: Add G_BEGIN_DECLS/G_END_DECLS.  (#312424)
2005-08-03 13:59:43 +00:00
Matthias Clasen
3ca6489941 Name fixes 2005-08-02 21:30:49 +00:00
Matthias Clasen
74ff285644 Don't go in an infinite loop if the input text ends in an incomplete
2005-08-02  Matthias Clasen  <mclasen@redhat.com>

	* glib/gconvert.c (g_convert_with_iconv): Don't go in an
	infinite loop if the input text ends in an incomplete multibyte
	character.  (#312402, Sebastian Bacher)
2005-08-02 21:10:16 +00:00
Matthias Clasen
988eaa83c0 Bump version 2005-08-02 16:22:17 +00:00
Matthias Clasen
e4c231a62a 2.7.5 2005-08-02 16:17:48 +00:00
Matthias Clasen
de298ae712 Cleanup converter state after the conversion. Document streaming
2005-08-02  Matthias Clasen  <mclasen@redhat.com>

	* glib/gconvert.c (g_convert_with_iconv, g_convert_with_fallback):
	Cleanup converter state after the conversion. Document streaming
	conversion pitfalls.  (#311337)
2005-08-02 14:58:20 +00:00
Tor Lillqvist
352a0e6c0b tests/refcount/objects.c tests/refcount/properties.c Use g_usleep()
2005-08-02  Tor Lillqvist  <tml@novell.com>

	* tests/refcount/objects.c
	* tests/refcount/properties.c
	* tests/refcount/signals.c: Use g_usleep() instead of sleep() for
	portability.
2005-08-02 06:55:38 +00:00
Tim Janik
10a3867a6e test high contention on closure reference counts to trigger and catch
Mon Aug  1 23:33:47 2005  Tim Janik  <timj@imendio.com>

        * tests/refcount/closures.c: test high contention on closure
        reference counts to trigger and catch non-atomic updates.

        * tests/refcount/objects.c:
        * tests/refcount/objects2.c:
        * tests/refcount/properties.c:
        * tests/refcount/properties2.c:
        * tests/refcount/signals.c:
        fixed up test and threading fundamentals. variables accessed from all
        threads need to be volatile. context switches are enforced by using
        g_thread_yield(), not g_usleep(1) which may result in busy waits on
        some platforms. for testcode, always consider all warnings and
        critical messages fatal. issue the currently running program on
        stdout. improved progress indicators.

        * tests/refcount/properties.c:
        * tests/refcount/objects.c:
        don't overdo the number of testing threads to keep the testing machine
        usable, 2 threads can produce as much contention as 20 if executing the
        same code.

        * tests/refcount/signals.c: only start 1 thread per object. GObject
        doesn't provide mutually exclusive object access, but only mutually
        exclusive reference count modification.

        * tests/Makefile.am: added closures test.
2005-08-01 21:47:15 +00:00
Tor Lillqvist
7aa2e37f5e Ugh, fix braino. 2005-08-01 19:23:10 +00:00
Tor Lillqvist
d5a989875b Make it pass on Win32. (from_uri_tests[]): Take into consideration that on
2005-08-01  Tor Lillqvist  <tml@novell.com>

	* tests/uri-test.c: Make it pass on Win32.
	(from_uri_tests[]): Take into consideration that on Win32 we don't
	return "localhost" hostnames.
	(safe_strcmp_filename): New function that considers slash and
	backslash equal on Win32.
	(run_roundtrip_tests): Use safe_strcmp_filename().
2005-08-01 19:17:35 +00:00
Tim Janik
2d1cf6c139 moved G_DATALIST_*_POINTER() macros here, because proper use requires the
Sun Jul 31 01:50:20 2005  Tim Janik  <timj@gtk.org>

        * glib/gdataset.c:
        moved G_DATALIST_*_POINTER() macros here, because proper use requires
        the global g_dataset_global mutex to be acquired.
        g_datalist_id_get_data():
        g_datalist_unset_flags():
        g_datalist_set_flags(): properly acquire and release dataset mutex.

        * glib/gdatasetprivate.h: implement G_DATALIST_GET_FLAGS() via atomic
        pointer access to account for memory barriers. moved all other macros.
2005-07-31 00:05:39 +00:00
Matthias Clasen
5f70ee19f8 Include glibintl.h, not gi18n.h, noticed by Dan Winship.
2005-07-26  Matthias Clasen  <mclasen@redhat.com>

	* glib/goption.c: Include glibintl.h, not gi18n.h, noticed
	by Dan Winship.
2005-07-26 19:41:05 +00:00
Matthias Clasen
ab033c6d1b Try -mt as compiler flag for threads, needed for the HP C compiler on
2005-07-26  Matthias Clasen  <mclasen@redhat.com>

	* configure.in: Try -mt as compiler flag for threads, needed
	for the HP C compiler on HP-UX.  (#163051, Paul Cornett)
2005-07-26 19:37:34 +00:00
Matthias Clasen
27096aedb5 Fix a typo in the docs. (#311569, Ross Burton)
2005-07-26  Matthias Clasen  <mclasen@redhat.com>

	* glib/ghash.c (g_hash_table_foreach): Fix a typo in the
	docs.  (#311569, Ross Burton)
2005-07-26 15:49:15 +00:00
Matthias Clasen
8fca0ec9cf Bump version 2005-07-22 17:21:52 +00:00
Matthias Clasen
3c6e2da565 2.7.4 2005-07-22 17:02:04 +00:00
Matthias Clasen
6589b38f98 Updates 2005-07-21 19:27:00 +00:00
Manish Singh
6394b31435 use G_CALLBACK for signal connections.
2005-07-20  Manish Singh  <yosh@gimp.org>

        * tests/refcount/signals.c: use G_CALLBACK for signal connections.
2005-07-20 20:46:58 +00:00
Matthias Clasen
8ac11176ab Don't get stuck in here if immediate is TRUE. (#310954, Hong Jen Yee)
2005-07-20  Matthias Clasen  <mclasen@redhat.com>

	* glib/gthreadpool.c (g_thread_pool_free): Don't get
	stuck in here if immediate is TRUE.  (#310954,
	Hong Jen Yee)

	* tests/threadpool-test.c (main): Test immediate == TRUE.
2005-07-20 17:06:02 +00:00
Tor Lillqvist
f0a0fe7a44 Make this an inline function. Define it only if G_CAN_INLINE and not C++.
2005-07-20  Tor Lillqvist  <tml@novell.com>

	* glib/gutils.h (g_win32_get_system_data_dirs): Make this an
	inline function. Define it only if G_CAN_INLINE and not
	C++. (#173098)
2005-07-20 08:37:13 +00:00
Matthias Clasen
912e4ea3cb Avoid an unnecessary strlen if len is -1. (#169692, Benoit Dejean)
2005-07-19  Matthias Clasen  <mclasen@redhat.com>

        * glib/gstring.c (g_string_chunk_insert_len): Avoid
        an unnecessary strlen if len is -1.  (#169692,
        Benoit Dejean)
2005-07-19 19:05:19 +00:00
Matthias Clasen
cf17bb79d2 Fix g_atomic_pointer_compare_and_exchange on sparc64. (#167572, Gert
2005-07-19  Matthias Clasen  <mclasen@redhat.com>

        * glib/gatomic.c (g_atomic_pointer_compare_and_exchange):
        Fix g_atomic_pointer_compare_and_exchange on sparc64.
        (#167572, Gert Doering)
2005-07-19 15:30:23 +00:00
Matthias Clasen
0719f3b463 Bump version 2005-07-15 17:41:28 +00:00
Matthias Clasen
1760b7074d 2.7.3 2005-07-15 17:28:17 +00:00
Matthias Clasen
39ea11ce6b Make refcounting threadsafe by using atomic operations. (#166020, Wim
2005-07-15  Matthias Clasen  <mclasen@redhat.com>

	Make refcounting threadsafe by using atomic
	operations.  (#166020, Wim Taymans)

	* gobject.c: Use a recursive lock to protect the
	notify queue.
	(g_object_unref): Get rid of g_object_last_unref and
	do the last unref handling in g_object_unref.
	(g_object_ref, g_object_unref): Use atomic operations.

	* gsignal.c (struct _HandlerMatch): Use a full integer
	for the ref_count field.
	(handler_ref, handler_unref_R): Use atomic operations.

	* gparam.c (g_param_spec_ref, g_param_spec_unref):
	Use atomic operations instead of a lock to make the
	refcounting threadsafe.

	* gclosure.c (g_closure_ref, g_closure_unref): Use atomic
	operations. This is more complicated here, since the
	refcount is stored in a bitfield, so we also have
	to access all other bitfield members atomically.

	* gsignal.c (handlers_find): Read the meta_marshal flag
	of the closure atomically.

	* tests/Makefile.am (SUBDIRS): Add tests/refcount

	* configure.in: Add tests/refcount

	* tests/refcount/properties.c: Test property changes
	from multiple threads.

	* tests/refcount/signals.c: Test signal emission from
	multiple threads.

	* tests/refcount/objects.c: Test refcounting from
	multiple threads.

	* tests/refcount/objects2.c:
	* tests/refcount/properties2.c: Tests to measure the
	overhead of threadsafe refcounting.

	* glib/giochannel.c (g_io_channel_ref, g_io_channel_unref):
	Use atomic operations to make refcounting
	threadsafe.  (#166020, Wim Taymans)
2005-07-15 16:51:10 +00:00
Matthias Clasen
58729b464b Updates 2005-07-15 15:43:59 +00:00
Matthias Clasen
7221f500f5 Make the tests silent on success.
2005-07-14  Matthias Clasen  <mclasen@redhat.com>

	* tests/spawn-test.c:
	* tests/uri-test.c:
	* tests/thread-test.c:
	* tests/queue-test.c:
	* tests/mainloop-test.c:
	* tests/iochannel-test.c:
	* tests/gio-test.c:
	* tests/child-test.c: Make the tests silent on success.
2005-07-14 05:20:14 +00:00
Matthias Clasen
b36f775177 Fix a typo. (#310243, Richard Laager)
2005-07-13  Matthias Clasen  <mclasen@redhat.com>

	* glib/gfileutils.c (g_mkdir_with_parents): Fix a
	typo.  (#310243, Richard Laager)
2005-07-13 18:59:46 +00:00
Matthias Clasen
7b70e24179 Warn if a short name is not acceptable.
2005-07-13  Matthias Clasen  <mclasen@redhat.com>

	* glib/goption.c (g_option_group_add_entries): Warn if a
	short name is not acceptable.
2005-07-13 13:31:30 +00:00
Matthias Clasen
58dd4814b2 Add and implement a new flag to turn off the automatic <groupname>-
2005-07-12  Matthias Clasen  <mclasen@redhat.com>

	* glib/goption.h (G_OPTION_FLAG_NOALIAS):
	* glib/goption.c: Add and implement a new flag
	to turn off the automatic <groupname>- prefixing
	for conflict resolution of long option names. (#171840,
	Adam McLaurin)

	All optional callback arguments  (#308886, Pawel
	Sliwowski)

	* glib/goption.h (G_OPTION_FLAG_OPTIONAL_ARG):
	* glib/goption.c: Add and implement a new flag
	to indicate that a callback *optionally* takes another
	argument.

	* tests/option-test.c: Add tests for optional arguments.
2005-07-12 18:56:25 +00:00
Matthias Clasen
392980c783 Don't lock if depth is zero. (#310148, Wim Taymans)
2005-07-12  Matthias Clasen  <mclasen@redhat.com>

	* glib/gthread.c (g_static_rec_mutex_lock_full): Don't lock
	if depth is zero.  (#310148, Wim Taymans)
2005-07-12 16:56:51 +00:00
Matthias Clasen
35425ca9d6 Ignore anomalous environment entries which are not of the form
2005-07-10  Matthias Clasen  <mclasen@redhat.com>

	* glib/gutils.c (g_listenv): Ignore anomalous environment
	entries which are not of the form variable=value.  (#309859,
	Morten Welinder)
2005-07-10 04:44:27 +00:00
Tor Lillqvist
521a964f8c Typo. 2005-07-09 00:12:04 +00:00
Tor Lillqvist
6a3a7adc17 Totally rewritten socket channel implementation. See discussion in bug
2005-07-09  Tor Lillqvist  <tml@novell.com>

	* glib/giowin32.c: Totally rewritten socket channel
	implementation. See discussion in bug #147392.
2005-07-08 23:27:31 +00:00
Tor Lillqvist
d22f051252 Don't use autoconf variables for the resource object files on Win32 any
2005-07-09  Tor Lillqvist  <tml@novell.com>

	* configure.in: Don't use autoconf variables for the resource
	object files on Win32 any longer. Instead handle that in the
	Makefile.am files. Check for windres.

	* glibconfig.h.win32.in: Minor tuning to match the
	configure-produced glibconfig.h closely.

	* */Makefile.am: Don't use the scripts in build/win32 to
	compile the .rc file into a resource object file. (This means
	we loose the build number increment magic, but I doubt it was
	that useful anyway.) Instead use windres directly. To pass the
	normal .o file produced by windres through libtool, which
	wants .lo files, pass it directly to the linker using a -Wl
	option.

	* */*.rc.in: Thus replace BUILDNUMBER with 0.
2005-07-08 23:04:06 +00:00
Matthias Clasen
352742b86a Bump version 2005-07-08 19:25:07 +00:00
Matthias Clasen
138f260fbc 2.7.2 2005-07-08 15:48:32 +00:00
Matthias Clasen
fc28f0832f Make the size_t size detection work on AIX. (#309725)
2005-07-07  Matthias Clasen  <mclasen@redhat.com>

	* configure.in: Make the size_t size detection work on AIX.
	(#309725)
2005-07-07 20:37:54 +00:00
Matthias Clasen
3a17f81e3b Require a newer gtk-doc 2005-07-06 04:10:15 +00:00
Hans Breuer
99563f439c include <process.h> for getpid() include <io.h> for close() etc. add
2005-07-01  Hans Breuer  <hans@breuer.org>

	* glib/gmessages.c : include <process.h> for getpid()
	* glib/gmappedfile.c : include <io.h> for close() etc.
	* glib/makefile.msc.in : add gmappedfile.obj
2005-07-02 19:50:29 +00:00
Matthias Clasen
9d6e10125b Don't reverse the order of multiline comments.
2005-07-01  Matthias Clasen  <mclasen@redhat.com>

	* glib/gkeyfile.c (g_key_file_get_key_comment):
	(g_key_file_get_top_comment): Don't reverse the order of multiline
	comments.
	(g_key_file_get_group_comment): Actually get the group comment.

	* tests/keyfile-test.c (test_comments): Test that comments are
	handled properly.  (#309263, Mikael Magnusson)
2005-07-01 18:54:25 +00:00
Matthias Clasen
61b7337092 Test that comments are handled properly. (#309263, Mikael Magnusson)
2005-07-01  Matthias Clasen  <mclasen@redhat.com>

	* tests/keyfile-test.c (test_comments): Test that comments are
	handled properly.  (#309263, Mikael Magnusson)
2005-07-01 15:56:03 +00:00
Matthias Clasen
d400e5fc4b Bump version 2005-07-01 04:11:48 +00:00
Matthias Clasen
399b0456ce 2.7.1 2005-06-30 21:01:58 +00:00
Matthias Clasen
9c53b470ec Fix portability issues. (#307064, Morten Welinder)
2005-06-30  Matthias Clasen  <mclasen@redhat.com>

	* glib/gstring.c (g_str_hash): Fix portability issues.
	(#307064, Morten Welinder)
2005-06-30 19:50:43 +00:00
Matthias Clasen
b78a0792a4 Apply a patch which may make GLib work on BeOS again. (#309157, Kian
2005-06-30  Matthias Clasen  <mclasen@redhat.com>

	Apply a patch which may make GLib work on BeOS again.
	(#309157, Kian Duffy)

	* glib/gmain.c: Update the BeOS includes.

	* glib/gstdio.c:
	* glib/gutils.c (g_find_program_in_path):
	* glib/gbacktrace.c (g_on_error_stack_trace): Use the UNIX
	implementation on BeOS, as well.

	* configure.in: Don't put glib 1.0 into G_MODULE_LIBS, even
	on BeOS.
2005-06-30 19:43:48 +00:00
Matthias Clasen
b49f56ad86 Updates 2005-06-30 04:17:33 +00:00
Tor Lillqvist
ef48ce636b libtool installs/uninstalls the import library, no need to do it
2005-06-26  Tor Lillqvist  <tml@novell.com>

	* glib/Makefile.am: libtool installs/uninstalls the import
	library, no need to do it ourselves. Do still install/uninstall
	the .def file, though.

	* glib/gmappedfile.c: Add Win32 implementation.
	(g_mapped_file_free): Don't mention writable shared mappings in
	the doc comment. Free the GMappedFile struct.

	* tests/mapping-test.c (main): No kill() or SIGUSR1 on Win32, use
	a flag file instead to stop the child. Use g_usleep() instead of
	sleep().
2005-06-26 18:04:08 +00:00
Matthias Clasen
748c230205 Add an mmap() wrapper called GMappedFile. (#148218, David Schleef, Behdad
2005-06-24  Matthias Clasen  <mclasen@redhat.com>

	Add an mmap() wrapper called GMappedFile. (#148218,
	David Schleef, Behdad Esfahbod)

	* glib/gmappedfile.[hc]: New files.

	* configure.in: Check for mmap.

	* glib/Makefile.am: Add new files.

	* glib/glib.symbols: Add new functions.

	* glib/glib.h: Include gmappedfile.h

	* tests/mapping-test.c: Tests for GMappedFile.

	* tests/Makefile.am: Add new file.
2005-06-25 03:38:32 +00:00
Matthias Clasen
132e20bcb6 Add --enable-man.
2005-06-24  Matthias Clasen  <mclasen@redhat.com>

	* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Add --enable-man.
2005-06-24 14:44:50 +00:00
Tor Lillqvist
80d0d5690f glib/Makefile.am gmodule/Makefile.am Current GNU tools do understand the
2005-06-24  Tor Lillqvist  <tml@novell.com>

	* glib/Makefile.am
	* gmodule/Makefile.am
	* gobject/Makefile.am: Current GNU tools do understand the
	PRIVATE keyword.

	* glib/gfileutils.c (g_mkdir_with_parents): Return error with
	EINVAL also for empty pathnames.
	(g_build_pathname_va): Fix typo.
2005-06-24 13:26:45 +00:00
Manish Singh
20c16cd277 g_build_filename_va is only use in the G_OS_WIN32 case, so compile it
Thu Jun 23 15:52:08 2005  Manish Singh  <yosh@gimp.org>

        * glib/gfileutils.c: g_build_filename_va is only use in the G_OS_WIN32
        case, so compile it conditionally.
2005-06-23 22:52:49 +00:00
Matthias Clasen
58f83683e9 Don't leak memory here.
2005-06-23  Matthias Clasen  <mclasen@redhat.com>

	* tests/keyfile-test.c (test_group_remove): Don't leak
	memory here.

	* glib/gkeyfile.c (g_key_file_load_from_data_dirs): Don't
	leak output_path.  (#308546, Kjartan Maraas)
2005-06-23 16:28:55 +00:00
Matthias Clasen
f3a61fe4a0 Don't leak output_path. (#308546, Kjartan Maraas)
2005-06-23  Matthias Clasen  <mclasen@redhat.com>

	* glib/gkeyfile.c (g_key_file_load_from_data_dirs): Don't
	leak output_path.  (#308546, Kjartan Maraas)
2005-06-23 16:13:33 +00:00
Matthias Clasen
a6312099c7 Add some language-binding friendly variants 2005-06-23 05:50:53 +00:00
Tor Lillqvist
b8c119f901 glib/gfileutils.c glib/gfileutils.h glib/glib.symbols Rename g_makepath()
2005-06-22  Tor Lillqvist  <tml@novell.com>

	* glib/gfileutils.c
	* glib/gfileutils.h
	* glib/glib.symbols
	* tests/testglib.c: Rename g_makepath() to g_mkdir_with_parents().
2005-06-22 18:55:33 +00:00
Matthias Clasen
f8411a5b97 Properly store changes for arrays. (#308528, Roger Leigh)
2005-06-22  Matthias Clasen  <mclasen@redhat.com>

	* glib/goption.c (parse_arg): Properly store changes for arrays.  (#308528,
	Roger Leigh)
2005-06-22 17:09:31 +00:00
Matthias Clasen
0c2739405c Pass the option name also in the NO_ARG case. (#308602, Masatake YAMATO)
2005-06-22  Matthias Clasen  <mclasen@redhat.com>

	* glib/goption.c (parse_short_option, parse_long_option):
	Pass the option name also in the NO_ARG case.  (#308602,
	Masatake YAMATO)
2005-06-22 16:24:22 +00:00
Tor Lillqvist
1833a93ddd New function. Creates a directory including intermediate parent
2005-06-22  Tor Lillqvist  <tml@novell.com>

	* glib/gfileutils.c (g_makepath): New function. Creates a
	directory including intermediate parent directories as
	needed. (#60509)

	* glib/gfileutils.h: Declare it.

	* glib/glib.symbols: Add it.

	* tests/testglib.c: Test it.
2005-06-22 09:43:37 +00:00
Tor Lillqvist
477989f555 New function. Returns the machine's name, or one of its names. Document
2005-06-22  Tor Lillqvist  <tml@novell.com>

	* glib/gutils.c (g_get_host_name): New function. Returns the
	machine's name, or one of its names. Document that it is
	best-effort only, and not guaranteed to be unique or anything.
	(g_get_any_init): Get the host name here. On Unix use
	gethostname(), on Windows use GetComputerName(). (#5200)

	* glib/gutils.h
	* glib/glib.symbols: Add here, too.

	* tests/testglib.c: Test it.
2005-06-22 08:54:28 +00:00
Matthias Clasen
3a7a096682 Add G_OPTION_FLAG_NO_ARG and G_OPTION_FLAG_FILENAME to allow greater
2005-06-18  Matthias Clasen  <mclasen@redhat.com>

	* glib/goption.h:
	* glib/goption.c: Add G_OPTION_FLAG_NO_ARG and
	G_OPTION_FLAG_FILENAME to allow greater control of
	G_OPTION_ARG_CALLBACK options. (#302632, Dan Winship)

	* tests/option-test.c: test callback args
2005-06-18 04:55:26 +00:00
Theppitak Karoonboonyanan
ef3ae3af4f Added 'th' (Thai) to ALL_LINGUAS. Added Thai translation.
2005-06-14  Theppitak Karoonboonyanan  <thep@linux.thai.net>

	* configure.in: Added 'th' (Thai) to ALL_LINGUAS.
	* po/th.po: Added Thai translation.
2005-06-14 09:30:08 +00:00
Matthias Clasen
74a1197296 Post-release version bump 2005-06-10 16:06:40 +00:00
Matthias Clasen
604ad5fa3d 2.7.0 2005-06-10 15:48:25 +00:00
Matthias Clasen
0b5df1e378 Updates 2005-06-10 14:58:32 +00:00
Matthias Clasen
72b87045e8 Forgotten log entry 2005-06-10 13:25:11 +00:00
Matthias Clasen
e90cd618b1 Set errno to 0 before calling strtol. (#306388, Morten Welinder)
2005-06-09  Matthias Clasen  <mclasen@redhat.com>

	* glib/goption.c (parse_int): Set errno to 0 before calling
	strtol.  (#306388, Morten Welinder)
2005-06-09 15:39:29 +00:00
Tor Lillqvist
f928d83482 glib/gstdio.h glib/gstdio.c Add a chdir() wrapper, too.
2005-06-09  Tor Lillqvist  <tml@novell.com>

	* glib/gstdio.h
	* glib/gstdio.c
	* glib/glib.symbols: Add a chdir() wrapper, too.

	* glib/glib.symbols: Add g_win32_locale_filename_from_utf8().

	* glib/gwin32.c (g_win32_locale_filename_from_utf8): Clarify doc
	comment.
2005-06-09 10:46:21 +00:00
Tor Lillqvist
b8d34f6609 New helper function on Win32, returns the root of the drive (or possibly
2005-06-08  Tor Lillqvist  <tml@novell.com>

	* glib/gutils.c (get_windows_directory_root): New helper function
	on Win32, returns the root of the drive (or possibly share) where
	the Windows directory is. (In the case of Terminal Server sessions
	the Windows directory is a per-user folder.)
	(g_get_any_init): Use get_windows_directory_root() as last resort
	for both temp directory and home directory. g_get_home_dir() now
	never returns NULL on Win32. Don't look at HOMEDRIVE and
	HOMEPATH. HOME, USERPROFILE, CSIDL_PROFILE and Windows directory
	drive root should be enough.
2005-06-08 20:03:12 +00:00
Matthias Clasen
e6cc98c9cd New function to calculate collation keys which are more suitable for
2005-06-08  Matthias Clasen  <mclasen@redhat.com>

	* glib/glib.symbols:
	* glib/gunicode.h:
	* glib/gunicollate.c (g_utf8_collate_key_for_filename):
	New function to calculate collation keys which are more
	suitable for sorting filenames.  (#172690, Ole Laursen)
2005-06-08 05:22:05 +00:00
Manish Singh
ba5a4d9db6 initialize option_name before using it.
Fri May 27 17:18:00 2005  Manish Singh  <yosh@gimp.org>

        * glib/goption.c (parse_short_option): initialize option_name
        before using it.
2005-05-28 00:19:14 +00:00
Matthias Clasen
4c4f106344 Return an error if an option is missing its argument. (#305576, Björn
2005-05-27  Matthias Clasen  <mclasen@redhat.com>

	* glib/goption.c (parse_short_option, parse_long_option):
	Return an error if an option is missing its argument.  (#305576,
	Björn Lindqvist)

	* tests/option-test.c (missing_arg_test): Add a testcase.
2005-05-27 18:30:34 +00:00
Manish Singh
1397c53eb7 rest_description should be const.
Wed May 25 15:33:51 2005  Manish Singh  <yosh@gimp.org>

        * glib/goption.c (print_help): rest_description should be const.
2005-05-25 22:37:48 +00:00
Matthias Clasen
499d7937b7 Don't eat Hangul when normalizing. (#301742, reported by Christian Biere,
2005-05-25  Matthias Clasen  <mclasen@redhat.com>

	* glib/gunidecomp.c (combine_hangul): Don't eat Hangul
	when normalizing.  (#301742, reported by Christian Biere,
	patch by Noah Levitt)
2005-05-25 16:03:13 +00:00
Matthias Clasen
0b8e42a2f5 If the remaining argument has an arg_description, display the synopsis as
2005-05-24  Matthias Clasen  <mclasen@redhat.com>

	* glib/goption.c (print_help): If the remaining argument
	has an arg_description, display the synopsis as
	PROGNAME [OPTION...] REST  (#305346, Noah Levitt)
2005-05-25 02:42:21 +00:00
Federico Mena Quintero
19c6921798 Merged from glib-2-6:
2005-05-20  Federico Mena Quintero  <federico@ximian.com>

	Merged from glib-2-6:

	* glib/gspawn.c (g_spawn_command_line_sync): Clarify the meaning
	of exit_status(); it's not the return code from the child, but
	rather the waitpid() status.
2005-05-20 19:30:02 +00:00
Matthias Clasen
c8099fa3e9 Correct the end of the Hangul Syllables range, from 0xd7af to 0xd7a3, in
2005-05-18  Matthias Clasen  <mclasen@redhat.com>

	* glib/gunidecomp.c: Correct the end of the Hangul
	Syllables range, from 0xd7af to 0xd7a3, in several
	places.  (#301984, Changwoo Ryu)
2005-05-18 13:41:11 +00:00
Matthias Clasen
0c04a92b2b Check the return values of g_tree_remove().
2005-05-17  Matthias Clasen  <mclasen@redhat.com>

	* tests/tree-test.c (main): Check the return values of
	g_tree_remove().

	* glib/gtree.c (g_tree_remove, g_tree_steal): Return
	a boolean indicating wether the key was found.  (#302545,
	Matthew F. Barnes)
2005-05-17 15:33:36 +00:00
Brian Cameron
e9cc05b828 Added gmodule-no-export-2.0-uninstalled.pc.in to allow building of other
2005-05-06  Brian Cameron  <brian.cameron@sun.com>

        * configure.in, gmodule-no-export-2.0-uninstalled.pc.in,
          Makefile.am:  Added gmodule-no-export-2.0-uninstalled.pc.in
          to allow building of other libraries like pango when
          glib is uninstalled.
2005-05-06 21:54:52 +00:00
Matthias Clasen
6e60dd8489 Add a testcase.
2005-05-06  Matthias Clasen  <mclasen@redhat.com>

	* tests/option-test.c: Add a testcase.

	* glib/goption.c (g_option_context_parse): Treat '-'
	on its own as a non-option argument.  (#168008, Tim Musson,
	Thomas Leonard and others)
2005-05-06 20:10:52 +00:00
Owen Taylor
2ae1a46b4c Add g_object_add/remove_toggle_ref() functions to get notification when a
2005-05-05  Owen Taylor  <otaylor@redhat.com>

        * gobject.[ch] gobject.symbols: Add
        g_object_add/remove_toggle_ref() functions to get notification
        when a reference count is the last remaining reference; this
        enables better memory management for language bindings.
        (http://mail.gnome.org/archives/gtk-devel-list/2005-April/msg00095.html)

2005-05-05  Owen Taylor  <otaylor@redhat.com>

        * glib/gdataset.[ch] glib/gdatasetprivate.h: Add
        g_datalist_set/unset_flags(), g_datalist_get_flags() functions
        to squeeze some bits into a GDataSet... this is needed for
        efficient implementation of toggle references in GObject.

        * tests/gobject/references.c tests/gobject/Makefile.am:
        Add a test case for weak and toggle references.

        * glib/gfileutils.[ch]: Rename g_file_replace() back
        to g_file_set_contents().

        * glib/glib.symbols: Update.

2005-05-05  Owen Taylor  <otaylor@redhat.com>

        * glib/Makefile.am glib/glib-sections.txt gobject/gobject-sections.txt:
        Update

        * gobject/tmpl/objects.sgml: Document toggle-references.
2005-05-05 14:57:29 +00:00
Matthias Clasen
1167d7d6a7 Documentation trivia 2005-05-02 15:45:45 +00:00
Matthias Clasen
70924186de More doc fixups 2005-05-01 21:57:49 +00:00
Matthias Clasen
6bdf0d9a44 Fix some typos 2005-05-01 21:40:46 +00:00
Matthias Clasen
ab56b710d8 Doc fixes 2005-05-01 21:26:18 +00:00
Matthias Clasen
6b8f6c09b7 Cosmetics 2005-05-01 21:14:13 +00:00
Matthias Clasen
98b40e24de Clarify some docs. (#302062, Matthew F. Barnes)
2005-04-29  Matthias Clasen  <mclasen@redhat.com>

	* glib/gtree.c: Clarify some docs. (#302062, Matthew F. Barnes)
2005-04-29 18:28:56 +00:00