Commit Graph

2336 Commits

Author SHA1 Message Date
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