glib/pcre/pcre_ucp_search_funcs.c, glib/pcre/pcre_valid_utf8.c: add
back missing config.h includes, and this time add them to the copies
in glib/update-pcre/ too so they don't get lost again on the next PCRE
update.
glib/garray.c, glib/gbase64.c: fix signed/unsigned pointer casts
gio/xdgmime/xdgmimeglob.c: remove unused variable
gio/tests/live-g-file.c: fix printf args on x86_64
tests/Makefile.am, tests/regex-test.c: remove redundant -DENABLE_REGEX
* glib/gtestutils.h (g_assert_no_error, g_assert_error): Macros to
assert that a GError is not set, or else is set to a particular
error.
* glib/gtestutils.c (g_assertion_message_error): utility for
those macros
* glib/tests/keyfile.c:
* tests/asyncqueue-test.c:
* tests/bookmarkfile-test.c:
* tests/convert-test.c:
* tests/file-test.c: Use g_assert_error/g_assert_no_error
svn path=/trunk/; revision=7555
2008-08-28 Bastien Nocera <hadess@hadess.net>
Bug 548612 – g_strstr_len() should use memmem when available
* glib/tests/strfuncs.c (test_strstr):
* tests/string-test.c (main): Patch by Paolo Borelli
<pborelli@katamail.com> to move the tests to the right place,
and add more tests
* glib/gstrfuncs.c (g_strstr_len): Fix problem with memmem ignoring
nul-terminators in strings, and using the haystack_len instead
svn path=/trunk/; revision=7409
2008-08-28 Bastien Nocera <hadess@hadess.net>
Bug 548612 – g_strstr_len() should use memmem when available
* configure.in: detect whether memmem is available in the C library
* glib/gstrfuncs.c (g_strstr_len): use memmem for g_strstr_len() if
available in it's available, as it could be optimised by the C library
* tests/string-test.c (main): Add a few tests for g_strstr_len()
svn path=/trunk/; revision=7407
2008-08-08 Ryan Lortie <desrt@desrt.ca>
* tests/markups/fail-32.gmarkup: change  to � since the
former is no longer a failure.
svn path=/trunk/; revision=7328
2008-08-04 Tor Lillqvist <tml@novell.com>
* tests/testglib.c: Avoid warning on Win64 by using gintptr cast
instead if long cast.
svn path=/trunk/; revision=7304
2008-07-21 Emmanuele Bassi <ebassi@gnome.org>
* glib/gbookmarkfile.c:
(bookmark_app_info_new): Do not set the timestamp value
using time(), as it will be overwritten anyway. (#535223,
Michael Meeks)
(parse_application_element),
(bookmark_app_info_dump): Support the "modified" attribute,
which takes an ISO-formatted string instead of a Unix time
stamp, to keep the number of g_strdup_printf() calls to a
minimum.
* glib/gtimer.c:
(g_time_val_to_iso8601): Do not use strftime(): we know
the format and contents of the ISO 8601 date format we
use.
* tests/bookmarks/valid-03.xbel: Add a test file for the
modified attribute.
svn path=/trunk/; revision=7231
2008-07-04 Michael Natterer <mitch@imendio.com>
Bug 541208 – Functions to easily install and use signals without
class struct slot
* tests/gobject/override.c: added tests for the new gsignal
overriding and chaining APIs.
svn path=/trunk/; revision=7158
2008-06-24 Paolo Borelli <pborelli@katamail.com>
Bug 539770 - migrate gstrfunc unit tests to gtest
* tests/strfunc-test.c:
* tests/testglib.c:
* tests/strtoll-test.c:
* tests/strtod-test.c:
* tests/string-test.c:
* tests/Makefile.am:
Removed old tests.
* glib/tests/fileutils.c:
* glib/tests/strfuncs.c:
* glib/tests/Makefile.am:
Added all the old tests migrated to the new unit test framework
and add new unit tests for some of the functions.
svn path=/trunk/; revision=7097
* glib/gtimer.c (g_time_val_from_iso8601): set tv_usec to 0 rather
than 1 when a fraction of a second is not specified
(g_time_val_from_iso8601): calculate a fraction of a second
correctly even in case it does not happen to consist of exactly
six digits; do not allow random data after the ISO 8601 string,
only whitespace
(make g_time_val_to_iso8601): support fractions of a second
Patch by Peter Kjellerstedt
* tests/testglib.c: Update to match
svn path=/trunk/; revision=7057
2008-05-30 Michael Natterer <mitch@imendio.com>
Bug 535628 - test/patterntest.c still includes gpattern.h
directly.
* tests/patterntest.c: don't include "glib/gpattern.h" directly.
Patch from Hiroyuki Ikezoe.
svn path=/trunk/; revision=6964
2008-02-23 Matthias Clasen <mclasen@redhat.com>
* tests/testglib.c: Don't test user directories for being
non-null. (#517084, Yevgen Muntyan)
svn path=/trunk/; revision=6562
2008-02-10 Matthias Clasen <mclasen@redhat.com>
* glib/gtestutils.h: Make the g_test_add macro work with
gcc 4.3
* tests/gobject/paramspec-test.c: Adapt to recent changes in
GParamGType initialization.
svn path=/trunk/; revision=6500
2008-01-29 Sebastian Wilhelmi <wilhelmi@google.com>
* tests/threadpool-test.c (test_thread_pools): Grab
thread_counter_pools LOCK when increasing
leftover_task_counter. Fixes race in test. (#512624, Simon Murray)
svn path=/trunk/; revision=6406
* glib/gchecksum.c (md5_sum_update): fix this; the previous code
gave the wrong md5sum when called in certain ways with buffers
larger than 64 bytes.
(g_checksum_update): remove the unnecessary "length > 1"
restriction
* tests/checksum-test.c: Rewrite this to be much more exhaustive
(and in particular to test the md5_sum_update bugfix).
svn path=/trunk/; revision=6314
2008-01-11 12:55:19 Tim Janik <timj@imendio.com>
* tests/testingbase64.c: added g_base64_encode()/g_base64_decode()
test case by Asbjoern <asbgpe@online.no>. fixed up coding style.
svn path=/trunk/; revision=6292
2007-12-09 Hans Breuer <hans@breuer.org>
* tests/gio-ls.c : adapt to recent api changes
* tests/testglib.c : variable declaration at the beginning of a block
(Lieven van der Heide, #503602)
* win32-fixup.pl : process *.rc.in as well; substitute
LT_CURRENT_MINUS_AGE
* glib/makefile.msc.in : alphabetic sorting of OBJECTS
svn path=/trunk/; revision=6184
2007-12-19 Emmanuele Bassi <ebassi@gnome.org>
* glib/gtimer.c (g_time_val_from_iso8601): Fix the date validation
check. (#503029)
* tests/testglib.c (various_string_tests): Add an invalid date
for testing the above fix.
svn path=/trunk/; revision=6160
2007-12-12 16:06:11 Tim Janik <timj@imendio.com>
* tests/testglib.c: split up tests and reworked code to use
the new test framework.
* tests/Makefile.am: added testglib to TEST_PROGS.
svn path=/trunk/; revision=6103
2007-12-09 Hans Breuer <hans@breuer.org>
* tests/gio-ls.c : (new file) a test program emulating some of 'ls'
* tests/makefile.msc.in : build it (currently on win32)
svn path=/trunk/; revision=6079
2007-12-09 Hans Breuer <hans@breuer.org>
* **/makefile.msc glib/makefile.msc.in : removed -GD to compile
with msvc9 (vs2008) with less complains
* glibconfig.h.win32.in : #define G_HAVE_ISO_VARARGS 1 for
msv8 (vs2005) and above
* glib/gfileutils.c : s/stricmp/_stricmp/
* msvc_recommended_pragmas.h : work around Microsoft's premature
attempt to deprecate the C-Library
* tests/makefile.msc.in : added checksum-test
svn path=/trunk/; revision=6076
2007-12-06 09:27:42 Tim Janik <timj@imendio.com>
* tests/scannerapi.c: added new scanner test from #501654, by
Patrick Hulin with various modifications.
reworked coding style, adapted to new testing framework, fixed
token parser test and use a forked sub process to test
g_scanner_error() output messages.
svn path=/trunk/; revision=6055
2007-12-04 Emmanuele Bassi <ebassi@gnome.org>
* glib/gchecksum.[ch]: Add GChecksum, a generic wrapper around
various hashing algorithms. At the moment, the MD5, SHA-1 and
SHA-256 algorithms are supported. (#443648)
* glib/glib.h:
* glib/Makefile.am:
* glib/glib.symbols: Build glue for GChecksum
* tests/Makefile.am
* tests/checksum-test.c: Add test suite for GChecksum.
svn path=/trunk/; revision=6042
2006-12-03 Ryan Lortie <desrt@desrt.ca>
* tests/hash-test.c (second_hash_test): fix memory leak, add a few
extra sanity tests.
svn path=/trunk/; revision=6025
2007-12-03 Marco Barisione <marco@barisione.org>
* glib/gregex.c:
* glib/gregex.h: Add new error codes for when compilation fails and
make compilation error translatable. (#482313, Morten Welinder)
svn path=/trunk/; revision=6021
2007-11-26 Ryan Lortie <desrt@desrt.ca>
Add new function g_markup_collect_attributes (bug #496847).
* glib/glib.symbols: add g_markup_collect_attributes
* docs/reference/glib/glib-sections.txt:
* glib/gmarkup.h:
* glib/gmarkup.c: add g_markup_collect_attributes and new enumerated
type GMarkupCollectType. Add new error code
G_MARKUP_ERROR_MISSING_ATTRIBUTE that is thrown by the attribute
collector.
svn path=/trunk/; revision=5947
2007-11-23 Matthias Clasen <mclasen@redhat.com>
* glib/gbase64.c (g_base64_encode): Don't refuse to encode
a single byte. (Milan Crha)
* tests/base64-test.c: Test encoding short strings.
svn path=/trunk/; revision=5919
2007-11-21 21:06:47 Tim Janik <timj@imendio.com>
* Makefile.decl: initialize automake variables EXTRA_DIST and
TEST_PROGS for unconditional appending via += in other makefiles.
define recursive test targets: test, test-report, perf-report,
full-report, as described here:
http://mail.gnome.org/archives/gtk-devel-list/2007-November/msg00000.html
* Makefile.am:
* build/win32/vs8/Makefile.am, build/win32/dirent/Makefile.am:
* build/win32/Makefile.am, build/Makefile.am:
* docs/Makefile.am, docs/reference/Makefile.am:
* docs/reference/glib/Makefile.am, docs/reference/gobject/Makefile.am:
* gmodule/Makefile.am, tests/Makefile.am:
* tests/refcount/Makefile.am, tests/gobject/Makefile.am:
* glib/update-pcre/Makefile.am, glib/libcharset/Makefile.am:
* glib/tests/Makefile.am, glib/pcre/Makefile.am:
* glib/gnulib/Makefile.am, gobject/Makefile.am, m4macros/Makefile.am:
* gthread/Makefile.am, glib/Makefile.am:
include $(top_srcdir)/Makefile.decl, adapted EXTRA_DIST assignments.
* glib/tests/Makefile.am: removed example testing rules.
* glib/tests/testing.c: conditionalized performance and slow tests.
* glib/gtestutils.h:
* glib/gtestutils.c: work around g_test_config_vars not changing its
exported value after value assignments, aparently due to symbol aliases.
* glib/gtester.c: fixed off-by-one error which produced junk in logs.
* configure.in: check for python >= 2.4 and provide $PYTHON for scripts.
svn path=/trunk/; revision=5914
* refcount/signals.c:
* refcount/objects.c:
* refcount/objects2.c:
* refcount/closures.c:
* refcount/properties.c:
* refcount/properties2.c: changed namespace prefix from g_test_* to my_test_*
to not clash with newly introduced g_test* API in glib.
svn path=/trunk/; revision=5875
Tue Aug 14 02:06:10 2007 Tim Janik <timj@imendio.com>
* glib/gthread.c (g_once_init_enter_impl): prevent race covered
by g_once_init_enter(), by checking for previous initializations
before entering initialisation branch.
* tests/onceinit.c: added multi-thread/multi-initializer stress test
using unoptimized g_once_init_enter_impl().
svn path=/trunk/; revision=5701
Mon Aug 13 14:21:44 2007 Tim Janik <timj@imendio.com>
* tests/onceinit.c: test g_once_init_*() before and after
g_thread_init() and test concurrency resolution.
svn path=/trunk/; revision=5698
2007-08-08 Matthias Clasen <mclasen@redhat.com>
* glib/gmarkup.c (append_escaped_text): Handle restricted
characters by converting them to numeric character
entities. (#464145, Andreas Monitzer)
* tests/markup-escape-test.c: Add tests for restricted
characters and numeric character entities.
svn path=/trunk/; revision=5684
Thu Jul 12 17:31:08 2007 Tim Janik <timj@imendio.com>
* tests/slice-concurrent.c: beautified output somewhat. fixed long
sleeps by reducing sleep accumulating and using randomized re-scheduling
(which works on UP and SMP). increased possible blocksizes.
svn path=/trunk/; revision=5631
Thu Jul 12 15:46:40 2007 Tim Janik <timj@imendio.com>
* glib/gslice.c: migrate per-thread magazine caches from single-thread
scenario to first thread using GSlice after g_thread_init(); based on
a patch by Tor Lillqvist, fixes#331853.
removed warning about g_thread_init() being called after other glib
functions (in particular g_slice* calls), because GSlice can cope
with this now and the rest of glib is believed to cope as well.
* tests/slice-threadinit.c: new test program which tests GSlice working
across g_thread_init() calls.
svn path=/trunk/; revision=5629
2007-07-09 Loïc Minier <lool@dooz.org>
* tests/refcount/closures.c: (main): Output newlines after thousand
iterations of the inner-loop of the closures test; this helps having
smaller lines and continuously outputting new lines. (#447048).
svn path=/trunk/; revision=5609
2007-06-04 Matthias Clasen <mclasen@redhat.com>
Add support for a number of special directories, as
defined by the xdg-user-dirs specification. (#432651,
Bastien Nocera, Emmanuele Bassi, Michael Natterer)
* glib/glib.symbols:
* glib/gutils.[hc]: Add the GUserDirectory enum and
g_get_user_special_dir(), with implementations based
on the xdg-user-dirs spec and on native interfaces
for Win32 and Carbon.
* configure.in: Add Carbon checks.
* tests/tetsglib.c: Test g_get_user_special_dir().
svn path=/trunk/; revision=5528
2007-06-03 Yevgen Muntyan <muntyan@tamu.edu>
* glib/gregex.c: fixed g_regex_fetch_named* for cases when (?J)
is used inside a pattern (#442265, comment #12).
* tests/regex-test.c: Test it.
svn path=/trunk/; revision=5526
2007-06-03 Yevgen Muntyan <muntyan@tamu.edu>
* glib/gregex.c:
* glib/gregex.h: New functions: g_regex_ref(), g_regex_unref() which
replaces g_regex_free(); g_match_info_get_regex(), g_match_info_get_string();
g_regex_check_replacement().
Made g_match_info_expand_references() accept NULL; changed GRegexEvalCallback
to take only arguments which are likely to be actualy used.
* docs/reference/glib/glib-sections.txt:
* glib/glib.symbols: Added new functions.
* tests/regex-test.c: Test them.
* docs/reference/glib/tmpl/gregex.sgml: Updated GRegexEvalCallback docs.
svn path=/trunk/; revision=5524
2007-05-29 Marco Barisione <marco@barisione.org>
* glib/gregex.c: Fix g_regex_fetch_named() and
g_regex_fetch_named_pos() when G_REGEX_DUPNAMES is used (#434358,
Yevgen Muntyan and #419376, Marco Barisione, patch by Yevgen Muntyan)
svn path=/trunk/; revision=5518
2007-05-11 Matthias Clasen <mclasen@redhat.com>
* glib/goption.c: Allow G_OPTION_ARG_CALLBACK for
G_OPTION_REMAINING. (#437297, Dave Benson)
* tests/option-test.c: Add a test for this.
svn path=/trunk/; revision=5487
2007-04-24 Michael Natterer <mitch@imendio.com>
* gobject/gparamspecs.c (param_string_validate): don't free or
modify static strings, dup them when needed and clear the
G_VALUE_NOCOPY_CONTENTS flag. Fixes bug #432895.
* tests/gobject/paramspec-test.c: test all GParamSpecString
validations with static and allocated strings.
svn path=/trunk/; revision=5454
2007-04-11 Emmanuele Bassi <ebassi@gnome.org>
* glib/ghash.[ch]: Add g_hash_table_get_keys() and
g_hash_table_get_values(), API to retrieve the keys
and values inside an hash table in list form. (#413133)
* glib/glib.symbols: Update symbols.
* tests/hash-test.c: Exercise newly added functions.
svn path=/trunk/; revision=5444
2007-03-22 Chris Wilson <chris@chris-wilson.co.uk>
* glib/gkeyfile.c: Track whether the last key=value pair in a group
is a blank line and during to_data() only insert a new blank line
betweens group in its absence. This allows the beautification of the
GKeyFile and prevents newlines being inserted indefinitely. (#420686)
* tests/keyfile-test.c (test_reload_idempotency): Test that after a
single beautification pass, g_key_file_to_data() does not alter its
input data.
svn path=/trunk/; revision=5431
2007-03-17 Hans Breuer <hans@breuer.org>
* glib/makefile.msc.in glib/pcre/makefile.msc
glib/update-pcre/update.sh : define PCRE_STATIC to reflect the
inclusion of pcre as LIB, not stand-alone DLL. Also set NEWLINE=-1
to match any newline by default, use of ../../build/win32/make.msc
* glib/gregex.h : minimal includes of <glib/*.H> instead of <glib.h>
* glib/gnulib/makefile.msc : make use of ../../build/win32/make.msc
* tests/regex-test.c(verbose): don't pass a string containing '%'
as first parameter to g_print ()
(test_match) : for the unexpected case output pattern and string
escaped
* tests/child-test.c tests/slice-color.c : fix c99ism
* tests/slice-test.c : fix c99ism and gccism
* tests/mapping-test.c tests/base-64-tests.c : don't
#include <unistd.h> unconditionally
* tests/option-test.c : use G_GINT64_CONSTANT() instead of direct LL
* tests/makefile.msc.in : more tests build
svn path=/trunk/; revision=5423
2007-03-06 Matthias Clasen <mclasen@Redhat.com>
* tests/Makefile.am: Apply a patch by Loïc Minier
to fix building with -Wl,-z,defs. (#149144)
svn path=/trunk/; revision=5367
2007-02-16 Soren Sandmann <sandmann@redhat.com>
* tests/sequence-test.c: For move, test moving between two
sequences. Add test for swap.
* glib/gsequence.c: Replace splay tree with a treap.
(check_node): Add checks for the treap invariants.
svn path=/trunk/; revision=5337
2007-02-07 Soren Sandmann <sandmann@daimi.au.dk>
* tests/sequence-test.c (compare_items): Force an arbitrary order
on otherwise identical items.
* glib/gsequence.c: Add comment discussing splay trees vs. other trees.
* glib/gsequence.c (is_end): Add fast path for the common case
when the node is not actually the end node.
svn path=/trunk/; revision=5328
2007-02-03 Soren Sandmann <sandmann@daimi.au.dk>
* glib/gsequence.c (struct _GSequence): Add a new 'real_sequence'
field.
(g_sequence_new): Initialize real_sequence to the sequence
(g_sequence_sort_iter): Set real_sequence of the temporary
sequence to the real sequence.
(g_sequence_sort_changed_iter): Same
(g_sequence_insert_sorted_iter): Same
(g_sequence_search_iter): Same
(g_sequence_iter_get_sequence): Return real_sequence
* tests/sequence-test.c (compare_iters): Insert assertions that
the iters point to the sequence being manipulated.
svn path=/trunk/; revision=5323
2007-02-03 Soren Sandmann <sandmann@daimi.au.dk>
* glib/gsequence.[ch]: New files implementing GSequence, a list
implemented using a binary tree.
* glib/glib.h, glib/glib.symbols: Update for GSequence.
* docs/reference: Add documentation for GSequence
* tests: Add sequence-test.c, a thorough test of all of
the GSequence API.
svn path=/trunk/; revision=5322
2007-01-12 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c: Rework the handling of invalid
keys/groups again. We are back to being liberal about
what we accept, and only reject things that would lead
to non-rereadable keyfiles.
* tests/keyfile-test.c: Adapt tests.
svn path=/trunk/; revision=5254
2007-01-03 Behdad Esfahbod <behdad@gnome.org>
* glib/gutils.h: Fix bug in g_bit_nth_lsf (#371631) and use
__builtin_clzl for g_bit_storage if available (#371670).
* tests/Makefile.am:
* tests/bit-test.c: New test, to test g_bit_* operations against
naive and builtin implementations.
svn path=/trunk/; revision=5200
Thu Dec 28 12:50:31 2006 Tim Janik <timj@imendio.com>
* glib/gslice.h, glib/gslice.c: implemented static debugging
hash-tree to validate slice adresses and sizes with G_SLICE=debug-blocks.
use abort() to exit in mem_error() to allow catching of these in gdb.
abort programs with a descriptive error message if g_thread_init() is
called after GSlice was in use. previously this just silently corrupted
the magazines.
* glib/ghash.c (struct _GHashNode): reordered fields to keep 8-byte
pointer alignment on 64bit systems and request smaller slice sizes
on 32bit systems.
* tests/slice-test.c: support '~' option flag to introduce slice
allocation/release corruption with a significant probability. this
allowes testing of G_SLICE=debug-blocks.
2006-12-24 Matthias Clasen <mclasen@redhat.com>
* tests/run-collate-tests.sh:
* tests/unicode-collate.c: Silently skip tests if
we can't set LC_COLLATE to en_US. (#336438)
2006-12-19 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_is_key_name): Accept
'/', '+' and '.' in key names, since gnome-vfs uses
mime types as keys in some cache.
2
2006-12-18 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c: Tighten up the check for allowed
key and group names. (#343191, Tommi Komulainen)
* tests/keyfile-test.c: Test handling of key and group names.
2006-12-14 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_add_group): If the group
is already there, make it current. (#385910, Joe Halliwell)
* tests/keyfile-test.c: Add a test for duplicate groups/keys.
2006-10-15 Sebastian Wilhelmi <seppi@seppi.de>
* tests/Makefile.am: Compile errorcheck-mutex-test with thread
libraries explicitly. (#74748, Javier Villavicencio)
Wed Aug 16 13:59:07 2006 Tim Janik <timj@gtk.org>
* tests/gobject/Makefile.am:
* tests/gobject/singleton.c: added test program which demonstrates
and checks singleton construction.
2006-08-05 Matthias Clasen <mclasen@redhat.com>
* glib/guniprop.c (g_unichar_toupper, g_unichar_tolower)
(real_toupper, real_tolower): If a character can't be converted,
don't replace it with a NUL byte, but leave it unchanged.
(#348491, Nikolai Weibull)
* tests/unicode-caseconv.c: Adapt to this change.
* tests/unicode-caseconv.c (main): Add a comment to point out
a quirk in the test data that we are working around here.
2006-07-31 Behdad Esfahbod <behdad@gnome.org>
* glib/gunidecomp.c (_g_utf8_normalize_wc): Update to reflect Unicode
PR #29 (#348694, Nikolai Weibull)
* tests/unicode-normalize.c (encode), (test_form): Make output more
useful, reporting the unexpected output of the test.
2006-06-20 Matthias Clasen <mclasen@redhat.com>
* glib/gtimer.c (mktime_utc): Fix an off-by-2 error
in the leap year calculation. (#344905, Dan Winship)
* tests/testglib.c (main): Change the test data for
the g_time_val_from_iso8601 tests to expose an off-by-2
error in the leap year calculation.
2006-06-16 Matthias Clasen <mclasen@redhat.com>
* tests/file-test.c (test_mkstemp): Add tests.
* glib/gfileutils.c (g_mkstemp): Allow the XXXXXX to occur
inside the template, not just at the end.
2006-06-12 Emmanuele Bassi <ebassi@cvs.gnome.org>
* glib/gbookmarkfile.h:
* glib/gbookmarkfile.c (g_bookmark_file_remove_item): Return
a boolean instead of void.
* tests/bookmarkfile-test.c (test_modify): Add a test case
for g_bookmark_file_remove_item().
2006-06-01 Matthias Clasen <mclasen@redhat.com>
* glib/giochannel.c (g_io_channel_write_chars): Avoid
running in an assertion with small writes. (#343566, Chris
Wilson)
* tests/iochannel-test.c: Add a testcase for small writes.
2006-05-28 Matthias Clasen <mclasen@redhat.com>
* tests/markups/expected-*: Output that test-markup
is expected to produce when run on the valid gmarkup
examples.
* tests/markup-test.c: Only dump the results of the
first, unchunked parse, to compare it against the expected
output.
* tests/run-markup-tests.sh: For valid examples, compare
the output of test-markup against the corresponding
expected-<n> file.
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-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-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-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-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.
* 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-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-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.
* 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-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-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)
* 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.
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-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-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.
* 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.
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.
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.
* 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-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)
* 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 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)
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
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-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-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-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-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.
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.
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-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-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-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-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 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-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.
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 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-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-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-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-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 Matthias Clasen <mclasen@redhat.com>
* tests/keyfile-test.c (test_comments): Test that comments are
handled properly. (#309263, Mikael Magnusson)
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-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-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 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-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-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-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-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-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-03-20 Tor Lillqvist <tml@novell.com>
* tests/testglib.c (main): Print more detailled output from the
timer tests. Don't print home directory twice. Test
g_win32_error_message().
* tests/spawn-test.c (run_tests): On Win32, run netstat instead of
ipconfig. On Windows XP collecting output from ipconfig doesn't
seem to work for some reason.
2005-03-10 Sven Neumann <sven@gimp.org>
* glib/gfileutils.c (get_contents_stdio): delay memory allocation
until after the first read. Saves a bunch of reallocs. Also
increased the buffer size to 4096 bytes. (bug #165954)
* tests/file-test.c (test_get_contents): added a (very basic) test
for g_file_get_contents().
2005-02-23 Matthias Clasen <mclasen@redhat.com>
* tests/keyfile-test.c (test_locale_string): Set LANGUAGE
instead of LC_ALL to shield against LANGUAGE being set in
the environment. (#168311, Suren A. Chilingaryan)
2005-02-08 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_parse_value_as_string): Don't
write out of bounds.
* glib/goption.c (g_option_context_parse): Fix a
one-too-short memory allocation. (#166609, Nicolas Laurent)
* tests/Makefile.am (TESTS_ENVIRONMENT): Add tests with
MALLOC_CHECK_.
* tests/option-test.c: Add a test for unkown short options.
2005-02-01 Matthias Clasen <mclasen@redhat.com>
* tests/keyfile-test.c (test_key_remove): Add test case for
key removal.
* glib/gkeyfile.c (g_key_file_remove_key): Actually remove
the key from the list of pairs. (#165980, David Hoover)
2005-02-01 Matthias Clasen <mclasen@redhat.com>
* tests/keyfile-test.c (test_group_remove): Add test case for
group removal.
* glib/gkeyfile.c (g_key_file_remove_group): Don't segfault
if the group doesn't exist. (#165887, Mathias Hasselmann)
2005-01-24 Matthias Clasen <mclasen@redhat.com>
* tests/markups/fail-40.gmarkup: Add a test with a long entity
name.
* glib/gmarkup.c (unescape_text_state_inside_entity_name): Don't
copy the entity name into a short buffer of fixed length. Instead,
compare it in place with strncmp(), and do a full strdup() in the
error path. (#165100, Simon Budig)
2005-01-20 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_parse_value_as_integer): Don't
interpret leading zeros as octal. The specification requires
%f parsing, and %f doesn't allow octal.
* tests/keyfile-test.c: Add some more tests.
2005-01-20 Matthias Clasen <mclasen@redhat.com>
* tests/keyfile-test.c: Add some more tests.
* glib/gkeyfile.c (g_key_file_get_keys): Return keys in
the order found in the file, rather than the opposite.
(g_key_file_parse_value_as_string): Fix error reporting.
2005-01-19 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_parse_data): Accept \r\n as
line end. (#163030, Bastian Nocera)
(g_key_file_load_from_data): Make -1 work as a size.
* tests/keyfile-test.c: Some unit tests for the keyfile
parser.
* tests/Makefile.am (test_programs): Add keyfile-test.
2004-12-20 Matthias Clasen <mclasen@redhat.com>
* tests/option-test.c: Add some tests for '--'
stripping.
* glib/goption.c (g_option_context_parse): Don't
strip '--' if it would be needed by a second option
parser. (#161701)
Sun Nov 28 13:13:56 2004 Manish Singh <yosh@gimp.org>
* glib/abicheck.sh: filter G_GNUC before PRIVATE so $ is still true.
* tests/utf8-validate.c: cast pointer math to gint for error print
message.
2004-11-25 Matthias Clasen <mclasen@redhat.com>
* tests/strtod-test.c (main): Add a testcase for the previous fix.
* glib/gstrfuncs.c (g_ascii_strtod): Make it work again for floats
starting with a decimal point, like .75 (#156421, Hans Breuer)
2004-10-29 Matthias Clasen <mclasen@redhat.com>
* tests/option-test.c: Add tests for the handling of
non-option arguments, "--" and G_OPTION_REMAINING.
* glib/goption.[hc]: #define G_OPTION_REMAINING, which is
a special long option name, which can be used for an option
in the main group which collects the non-option arguments.
It must be of type G_OPTION_ARG_STRING_ARRAY or
G_OPTION_ARG_FILENAME_ARRAY. If the main group doesn't contain
an option whose name is G_OPTION_REMAINING, the non-option
arguments are left behind in argv as before.
Mon Oct 25 15:05:18 2004 Manish Singh <yosh@gimp.org>
* autogen.sh: rm autom4te.cache, since it might interfere with
differing autoconf versions.
* tests/child-test.c: use GINT_TO_POINTER for g_child_watch_add
user data.
* glib/gfileutils.c: G_IS_DIR_SEPARATOR is defined in gutils.h now,
don't redefine it here.
2004-10-22 Matthias Clasen <mclasen@redhat.com>
* tests/uri-test.c (run_uri_list_tests): Add some
uri list tests.c.
* glib/gconvert.h:
* glib/gconvert.c (g_uri_list_extract_uris): New function to
split a text/uri-list data into individual uris and strip comments.
2004-10-05 Anders Carlsson <andersca@gnome.org>
* glib/goption.c: (g_option_context_parse):
Add check for if argc is 0.
* tests/option-test.c: (empty_test3), (main):
Add test case.
2004-10-03 Anders Carlsson <andersca@gnome.org>
* glib/goption.c: (parse_arg):
Set arg_data on filenames. (Discovered by Mats-Ola Persson).
* tests/option-test.c: (arg_test3), (ignore_test3), (main):
Add test for filename args.
Mon Sep 20 00:13:48 2004 Matthias Clasen <maclas@gmx.de>
Make GOption remove long options completely. (#153113, Robert Ögren)
* glib/goption.c (parse_long_option): Fix a wrong index.
* tests/option-test.c (ignore_test3): Test handling of unknown
options some more.
Thu Sep 9 00:10:40 2004 Matthias Clasen <maclas@gmx.de>
* glib/gstrfuncs.h:
* glib/gstrfuncs.c (g_strv_length): Add a function to
calculate the length of a NULL-terminated string
array. (#150455, Tim-Philipp Müller)
* tests/strfunc-test.c (main): Add a test for g_strv_length().
2004-09-07 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.h:
* glib/gutils.c (g_get_language_names): Add a function to
return a list of applicable locale names. (#95587,
Hidetoshi Tajima)
(guess_category_value, compute_locale_variants):
(explode_locale, unalias_lang, read_aliases): Helper
functions for g_get_language_names()
* tests/testglib.c (main): Show the results of
g_get_language_names()
2004-09-01 Anders Carlsson <andersca@gnome.org>
* glib/goption.c: (g_option_context_free), (print_help),
(g_option_context_parse):
Handle option contexts without a main group.
* tests/option-test.c: (empty_test2), (main):
Add test case for that.
2004-08-30 Anders Carlsson <andersca@gnome.org>
* glib/goption.c: (g_option_context_parse):
Set prgname to <unknown> if argc and argv are NULL.
* tests/option-test.c: (empty_test1), (main):
Add test case for that.
Sat Jul 31 20:33:07 2004 Matthias Clasen <maclas@gmx.de>
* tests/shell-test.c: Include a test involving consecutive
backslashes followed by a non-escaped doublequote.
* glib/gshell.c (tokenize_command_line): Count consecutive
backslashes mod 2 to detect escaped doubleqotes. (#127306)
2004-07-30 Matthias Clasen <mclasen@redhat.com>
* glib/gconvert.c (g_unescape_uri_string): Don't validate
for UTF-8 here. (#148420, Robert Ögren)
* tests/uri-test.c (run_roundtrip_tests): Add tests for
roundtrip compatibility. Going from filename to uri and
back should always give you the same filename back.
2004-07-28 Matthias Clasen <mclasen@redhat.com>
* tests/markups/valid-{9,10,11}.gmarkup:
* tests/markups/fail-{37,38,39}.gmarkup: Tests for handling
of whitespace inside tags.
* glib/gmarkup.c (enum GMarkupParseState): Add
STATE_AFTER_ATTRIBUTE_NAME and STATE_AFTER_CLOSE_TAG_NAME.
(g_markup_parse_context_parse): Accept whitespace between
attribute names, '=' and attribute values and between
close tag name and '>'. (#148646, Hiroyuki Ikezoe)
2004-06-09 Federico Mena Quintero <federico@ximian.com>
* tests/uri-test.c (to_uri_tests): Fix expected results (ha ha)
for URIs that *should* have been invalid, or viceversa.
(from_uri_tests): Likewise.
2004-05-14 Tor Lillqvist <tml@iki.fi>
* glib/gnulib/vasnprintf.c (vasnprintf): Handle empty digit string
for precision correctly. (#142400)
For backward compatibility with the Trio implementation, make "ll"
format modifer work on Win32, too. Change into "I64" before
passing to the system printf. (#142433)
* tests/printf-test.c (main): Add tests for the above.
2004-04-22 Matthias Clasen <mclasen@redhat.com>
* glib/gstrfuncs.c (g_ascii_strtod): Fix problems when a
locale-specific decimal separator directly follows a
number. (#138424, Nickolay V. Shmyrev)
* tests/strtod-test.c (main): Add some more testcases.
2004-04-21 Matthias Clasen <mclasen@redhat.com>
* tests/printf-test.c (main): Comment out a nonessential testcase
which fails on HP-UX. (#136283, Jonas Jonsson)
2004-04-15 Matthias Clasen <mclasen@redhat.com>
* tests/patterntest.c (main): Add tests for the empty pattern.
* glib/gpattern.c (g_pattern_spec_new): Don't read and write out
of bounds when the pattern is empty. (#140032, Stanislav Brabec,
Stefan Fent)
2004-04-10 Tor Lillqvist <tml@iki.fi>
* glib/giowin32.c
* glib/gmain.c
* glib/gstrfuncs.c
* glib/gthread.c: Decorating variable definitions with
__declspec(dllexport) causes problems on Cygwin build, and isn't
really needed for a native Win32 build with mingw or MSVC, so
remove. (#138402, Roger Leigh)
* glib/libcharset/localcharset.c: Use Win32-specific code also on
Cygwin.
* tests/uri-test.c: Don't assume that local filenames are in UTF-8
on Cygwin, either. (#138412, Roger Leigh)
2004-03-21 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_get_dirname): Fix Win32 behaviour in some
cases where a drive letter is present. For 'a:' or 'a:foo', return
'a:.'. This is mostly just for consistency with the behaviour
without a drive letter. But very important is to for 'a:\foo' or
'a:\', return 'a:\', and not 'a:'. (Ditto for forward slashes
instead of backslashes.) (#137316)
* tests/dirname-test.c (main): More complete testing on
Win32. If a test fails, include expected and actual result in
error message.
Fri Mar 19 11:07:06 2004 Owen Taylor <otaylor@redhat.com>
* tests/atomic-test.c (main): Make computation
of "biggest_pointer" vaguely more portable.
(#137498, Jonas Jonsson)
Sat Mar 13 23:18:45 2004 Owen Taylor <otaylor@redhat.com>
* tests/env-test.c (main): Remove critical log handler;
we can't trigger g_return_if_fails() in our test suite
even silently, because the user could have compiled
with --disable-debug. #if 0 the tests for
g_setenv/g_unsetenv with a "foo=bar" variable name.
(#136709, reported by Frédéric L. W. Meunier)
2004-03-10 Tor Lillqvist <tml@iki.fi>
* glib/gspawn-win32.c
* glib/gspawn-win32-helper.c: Implement
G_SPAWN_FILE_AND_ARGV_ZERO. (#136792, Bruce Hochstetler)
* tests/spawn-test.c
* tests/spawn-test-win32-gui.c: Test it.
2004-03-09 Sebastian Wilhelmi <seppi@seppi.de>
* tests/child-test.c: Do not run the g_child_watch_* test
multi-threaded, as that doesn't work on linux prior 2.6. Fixes
#136539.
2004-03-06 Tor Lillqvist <tml@iki.fi>
* README.win32: Update.
* configure.in
* Makefile.am
* */Makefile.am: Drop the hand-written makefile.mingw(.in)
files. They haven't been maintained in a long time. As several
people have managed to build GLib for Win32 using the
autoconfiscation mechanism, there is no real reason to even try to
maintain the hand-written mingw makefiles.
2004-03-03 Tor Lillqvist <tml@iki.fi>
* tests/child-test.c: Use a macro GPID_FORMAT for the format to
print GPid in (%p on Win32, %d on Unix). Maybe configure.in should
place that in glibconfig.h?
Print verbose error message if CreateProcess() fails.
Don't close the child handle until in the child watch callback.
Don't try to run /bin/true on Win32. Run ipconfig instead (just to
pick a program that should exist on all Window boxes).
Mon Mar 1 16:49:51 2004 Owen Taylor <otaylor@redhat.com>
* === Released 2.3.5 ===
* configure.in: Version 2.3.5, interface ago 0.
* NEWS: Some further updates.
Mon Mar 1 15:39:57 2004 Owen Taylor <otaylor@redhat.com>
Patch from J. Ali Harlow
* configure.in: Use void * not HANDLE for GPid on win32.
* glib/gspawn.[ch] glib/gspawn-win32.[ch] glib/glib.def:
Add g_spawn_close_pid().
* glib/gspawn.[ch]: Make g_spawn functions take
GPid * instead if int * (GPid == int on unix, will
produce compile warnings until fixed on Win32.)
* tests/child-test.c: Make the test a little more
inappropriately verbose.
* glib/gmain.c: Add some documentation warnings about
not closing @pid while the source is active.
2004-02-29 Sebastian Wilhelmi <seppi@seppi.de>
* configure.in, glib/gatomic.c, glib/gatomic.h: Moved the
assembler functions from gatomic.h to gatomic.c, which makes for
better maintainability. Also use gint instead of gint32 to be able
to use reference counting for ABI-fixed structures with
gint/guint.
* glib/gthread.h: Adapted accordingly.
* tests/atomic-test.c: Updated to test for G_MAXINT and G_MININT.
2003-02-28 Hans Breuer <hans@breuer.org>
* tests/child-test.c glib/gmain.c :
applied patch from J. Ali Harlow <ali@juiblex.co.uk> to fix
g_child_watch implementation on win32, bug #50296
2004-02-26 Sebastian Wilhelmi <seppi@seppi.de>
* glib/gatomic.c, glib/gatomic.h: New files to implement atomic
operations for different platforms. Fixes bug #63621.
* glib/glib.h: Include gatomic.h.
* configure.in: Add test for assembler routines for atomic operations.
* glib/Makefile.am: Add gatomic.c, gatomic.h.
* tests/Makefile.am, tests/atomic-test.c: Unit test for atomic
operations.
* glib/glib-overrides.txt, glib/glib-sections.txt,
glib/glib-docs.sgml, glib/tmpl/atomic_operations.sgml: Add docs
for atomic operations.
2003-02-26 Hans Breuer <hans@breuer.org>
* glib/glib.def : added g_hash_table_find and a
bunch of g_queue_*
* glib/gmain.c : make it compile on win32,
child_wake_up_pipe replaced by semaphore like it is done
for the other wake_up_pipe
* config.h.win32.in : added HAVE_INT64_AND_I64
* glibconfig.h.win32.in : G_MAXSIZE .. G_M??INT64,
and typedef for GPid
* test/env-test.c : don't let the local log function
collide in namespace with standard C
Sat Feb 21 13:45:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* glib/gqueue.[ch]: Extend GQueue API to match the GList
API. (#118439).
* tests/queue-test.c: Update test suite to cover the new API.
Sat Feb 14 01:21:34 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmain.h:
* glib/gmain.c (g_child_watch_source_new):
* glib/gmain.c (g_child_watch_add):
* glib/gmain.c (g_child_watch_add_full): Wrap waitpid() as a
GSource. This is a partial implementation of the "Unix signal
source". (#50296, Jonathan R. Blandford)
* configure.in: Add the necessary configury to typedef GPid
appropriately.
* tests/Makefile.am:
* tests/child-test.c: Test child_watch sources.
Thu Feb 5 01:19:12 2004 Matthias Clasen <maclas@gmx.de>
* tests/file-test.c (test_mkstemp): Weaken an g_assert() to a
g_warning(), since apparently nothing in Posix forces mkstemp()
to reject templates without any X's. (#133397)
Thu Feb 5 00:56:28 2004 Matthias Clasen <maclas@gmx.de>
* glib/gcompletion.c (g_completion_complete_utf8): New function which
works like g_completion_complete(), but strips a trailing incomplete
UTF-8 character from the prefix. (#133313, Theppitak Karoonboonyanan)
* tests/completion-test.c (main): Some GCompletion tests.
* tests/Makefile.am: Add completion-test.
Sun Jan 11 16:13:20 2004 Manish Singh <yosh@gimp.org>
* configure.in: Add G_MAXSIZE, define in terms of G_MAXUfoo.
* tests/type-test.c: Add test for G_MAXSIZE.
* glibconfig.h.win32.in: Cleanup, add some missing bits.
Fri Dec 19 11:49:21 2003 George Lebl <jirka@5z.com>
* glib/grand.c
glib/grand.h (g_rand_new) (g_rand_new_with_seed)
(g_rand_new_with_seed_array) (g_rand_set_seed_array): Add
the init_by_array functionality from the reference implementation
of the mersenne twister (mt19937ar.c) and change the naming
to fit with the rest of the grand API. New functions are
g_rand_new_with_seed_array, g_rand_set_seed_array. This is only
reliable/tested for the 2.2 version of the seeding as that's what
the reference implementation uses. Also modify g_rand_new to
get 4 longs from /dev/urandom since that will always be available
anyway and we get more entropy and if /dev/urandom is unavailable
use also 4 longs for seeding using secs, usecs, getpid and getppid.
For version 2.0 use only a simple seed again but be more careful
about seeding with secs/usecs in this case.
* glib/grand.c
glib/grand.h (g_rand_copy): Add g_rand_copy function to copy the
current state of the random number generator.
* glib/grand.c (g_rand_new): Add testing for EINTR when reading
from /dev/urandom
* tests/rand-test.c: add testing of the array seeding stuff against
the reference implementation, plus add statistical sanity check
to see that the values outputted are truly kind of random. And
check that g_rand_copy truly copies the state by checking a few
terms.
Fri Dec 26 02:03:58 2003 Matthias Clasen <maclas@gmx.de>
* glib/garray.[hc] (g_ptr_array_foreach): New function to
call a function for each element of a GPtrArray. (#114790)
* tests/array-test.c (main): Add a test for g_ptr_array_foreach().
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
* glib/gstrfuncs.c: Fixed a bad pointer comparison in
g_ascii_strtod that came up in fa_IR locale (#126640, Behdad
Esfahbod).
* tests/strtod-test.c: Fixed the tests to catch the above.
2003-11-15 Tor Lillqvist <tml@iki.fi>
* tests/makefile.msc.in: Fix for MSVC build: Skip strtod-test, use
correct glib libraries, with 2.0 in the names. (#126906, John
Ehresman)
2003-11-05 Morten Welinder <terra@gnome.org>
* glib/gstring.c (g_string_insert_len): Handle the case where the
to-be-inserted string is a substring of the target string.
(g_string_assign): Handle "s = s;".
(#114260, self.)
Tue Oct 28 23:38:30 2003 Matthias Clasen <maclas@gmx.de>
* tests/printf-test.c: Change the %e tests to not check for
actual string equality, but rather equality under g_ascii_strtod(),
since the number of leading digits in the exponent seems to
be not exactly prescribed by SUS.
2003-10-24 Tor Lillqvist <tml@iki.fi>
* configure.in: Force shared library (DLL) only on Windows.
(I don't think that is controversial?) Remove unnecessary
AC_LIBTOOL_WIN32_DLL. Don't use -D_REENTRANT on
Win32, it is not used by mingw or MSVC headers.
* config.h.win32.in
* glibconfig.h.win32.in: Match what configure produces.
* glib/gconvert.c
* glib/gutils.c: Mark a couple of functions and variables that
aren't public as static.
* glib/gnulib/g-gnulib.h: Undef HAVE_SNPRINTF before (re)defining
it potentially differently, to silence compiler.
* glib/glib.def: Add some missing entries.
* tests/gobject/Makefile.am (LDADD): Reorder, put libgobject after
libtestgobject.
* tests/gobject/ifaceproperties.c (main): NULL-terminate arg list
to g_object_set() and _get().
Thu Oct 23 12:38:24 2003 Owen Taylor <otaylor@redhat.com>
* === Released 2.3.0 ===
* tests/gobject/Makefile.am (dist-hook): Remove
and extra backslash.
* tests/gobject/Makefile.am (EXTRA_DIST): Add
testmarshal.list.
* glib/Makefile.am (libglib_2_0_la_SOURCES): Add
missing gunicode-private.h.
* tests/testglib.c (main): Fix a warning.
* tests/gobject/ifaceinherit.c: Remove check that
wasn't supposed to work (adding an interface already
added to the derived class to the base class),
fix a bug.
Thu Oct 2 01:15:46 2003 Owen Taylor <otaylor@redhat.com>
* tests/gobject/ifacecheck.c: Test case for
g_type_add_interface_check().
* tests/gobject/ifaceinit.c: Add #undef G_DISABLE_ASSERT.
Thu Oct 2 01:11:39 2003 Owen Taylor <otaylor@redhat.com>
* tests/gobject/ifaceinherit.c: Remove some tests that
were testing things that weren't supposed to work; add
a test for adding an interface first to the child class,
then to the parent class.
Thu Oct 2 00:02:55 2003 Owen Taylor <otaylor@redhat.com>
* tests/gobject/Makefile.am test/gobject/ifaceinherit.c:
Tests of interface inheritance and overriding.
2003-09-29 Tor Lillqvist <tml@iki.fi>
* tests/testglib.c (main): Use hardcoded name for DLL, as there is
no reliable way to determine it at compile or run time anyway.
Thu Sep 25 15:43:08 2003 Owen Taylor <otaylor@redhat.com>
* tests/gobject/testmodule.[ch] test/gobject/Makefile.am:
Dummy dynamic type module for testing type plugin code
and dynamic types.
* test/gobject/defaultiface.c: Test of g_default_interface_ref,
etc.
Tue Sep 2 19:37:21 2003 Tim Janik <timj@gtk.org>
* gtype.[hc]: added support for a "default vtable" per interface,
that interface vtables are initialized from.
the default vtable is initialized and finalized through class_init,
class_finalize and class_data from the interfaces GTypeInfo struct.
(type_data_last_unref_Wm): unload child plugin before unreffing
parent type.
testifaceinit.c: minor fixups. fixed up base_init() assertions, since
with a default vtable, base_init() may be called multiple times.
added default initializer to iface1.
Wed Aug 27 01:25:40 2003 Owen Taylor <otaylor@redhat.com>
* Makefile.am testifaceinit.c: Add a detailed test case
for interface initialization, testing the ability to
add interfaces during class initialization and the ordering
of interface base_init, class init, and interface_init.
(Expected to fail at the moment.)
2003-08-16 Tor Lillqvist <tml@iki.fi>
Fix#117925 (Dov Grobgeld):
* glib/gutils.c (g_find_program_in_path, g_basename,
g_path_get_basename, g_path_is_absolute, g_path_skip_root,
g_path_get_dirname, g_get_any_init): On Win32, look also for
slashes ('/') as pathname separators.
* glib/gfileutils.c (g_file_open_tmp): Ditto. If the template
contains a pathname separator, include the actual one in the error
message, instead of always the canonical one.
(g_build_filename): Separate implementation on Win32 that looks
for either slash or backslash. Document Unix/Windows differences.
* tests/testglib.c
* tests/strfunc-test.c: Test above functionality on Win32.
2003-08-08 Matthias Clasen <maclas@gmx.de>
* tests/env-test.c (main): Remove a test for getenv() behaviour which isn't specified by SUS
and doesn't work on Solaris.
2003-08-07 Matthias Clasen <maclas@gmx.de>
* tests/env-test.c: Add tests for '=' in names and values.
* glib/gutils.c (g_setenv, g_unsetenv): Check that the variable name doesn't contain '='. Add a
declaration for environ. (#119338)
2003-08-07 Matthias Clasen <maclas@gmx.de>
* tests/patterntest.c: Specify test strings in UTF-8, remove all charset conversion.
Replace the NOISY define by a cmdline arg --noisy. (#115757)
2003-08-06 Noah Levitt <nlevitt@columbia.edu>
* tests/casemap.txt:
* tests/gen-casemap-txt.pl: Add test for special case not at inital
position in the string, the bug just fixed. (#118957)
2003-07-31 Noah Levitt <nlevitt@columbia.edu>
* tests/utf8.txt: Change instances of U+10ffff to U+10fffd, since that
is the last valid unicode character. Add check that U+10ffff is
NOTUNICODE. (#118730)
2003-07-20 Hans Breuer <hans@breuer.org>
* glib/trio/makefile.msc : (new file) for msvc build
* glib/glib.def : removed some duplicated entries
* glib/gscanner.c : add same workaround for MSVC(5.0)
which does not allow to cast an uint64 to float.
Same as in gvaluetransform.c
Also move #include <io.h> behind inclusion of "glib.h"
which defines the needed G_OS_WIN32
* glib/makefile.msc.in : added gprintf.obj, trio\trio.lib
as well as shell32.lib
* tests/spawn-test.c : include <io.h> on win32
2003-07-09 Matthias Clasen <maclas@gmx.de>
Support for one-time initialization functions. (#69668, Sebastian Wilhelmi)
* configure.in: Check whether double checked locking is safe, define g_once() in
glibconfig.h accordingly.
* glib/gthread.h: Add GOnce, GOnceStatus, G_ONCE_INIT and g_once_impl.
* glib/gthread.c (g_once_impl): Fallback implementation using a mutex if double checked
locking is unsafe.
* tests/thread-test.c: Add tests for g_once().
2003-06-06 Matthias Clasen <maclas@gmx.de>
* glib/gstring.c (g_string_append_printf_internal): Use
g_vasprintf() and g_string_append_len(), thus enabling embedded
nuls in the result of g_string_printf(). (#92492, Owen Taylor)
* tests/string-test.c: Add a test for embedded nuls in the
result of g_string_printf().
2003-03-30 Matthias Clasen <maclas@gmx.de>
* glib/gconvert.c (UnsafeCharacterSet): Get rid of
UNSAFE_DOS_PATH.
(acceptable): Align with RFC2396. (#59653)
* tests/uri-test.c: Adjust to the changes above.
2003-03-01 James Henstridge <james@daa.com.au>
* autogen.sh: require automake 1.7. Add calls to libtoolize and
gtkdocize. Clean up some of the error messages.
* configure.in: move version declaration to the top of the file
(before AC_INIT), using M4 macros.
GLIB_AC_DIVERT_BEFORE_HELP() calls no longer necessary, due to use
of M4 macro expansion in help messages instead.
Convert AC_ARG_WITH/AC_ARG_ENABLE calls to use AC_HELP_STRING to
format help strings. Use quadrigraphs to get square brackets to
show correctly.
Replace gtk-doc checks with a call to GTK_DOC_CHECK() macro.
Use AC_CONFIG_COMMANDS([glibconfig.h], ...) to output
glibconfig.h, so that "./config.status glibconfig.h" works.
Add an extra AC_CONFIG_FILES call listing other files we want
generated by config.status protected by an "if false" block. This
way automake generates the rules needed to rebuild the files for
us.
Add quotes in various places.
* docs/reference/*/Makefile.am: convert to use the common
gtk-doc.make file. This localises the complexity to a single
makefile fragment maintained with gtk-doc itself.
* */Makefile.am: remove unneeded rules to build win32 files with
config.status. Automake now does this for us.
Replace instances of @FOO@ with $(FOO) where appropriate -- this
allows automake to do a better job checking the makefile.
Add some files to DISTCLEANFILES where appropriate
* Makefile.am: use the DISTCHECK_CONFIGURE_FLAGS variable to
ensure that --enable-gtk-doc is passed to configure during a
distcheck. Remove the custom distcheck, since the standard one
will now do.
* gobject/Makefile.am: switch to BUILT_SOURCES, since that now
works.
* tests/string-test.c: Add a test for positional parameters in
g_snprintf().
* glib-genmarshal.c, gobject-query.c: Use g_printf() instead of
system printf. (#99319)
Thu Dec 12 14:58:55 2002 Manish Singh <yosh@gimp.org>
* configure.in: pull in trio if host printf doesn't have a known
way of printing 64-bit ints.
* glib/gmacros.h: remove extra whitespace at the end
* glib/gscanner.c (g_scanner_unexp_token): use G_GUINT64_FORMAT
instead of hardcoding "%llu"
* tests/testglib.c: remove obsolete conditionals using G_HAVE_GINT64,
we always have it now.
* tests/type-test.c: same as above, and for G_G[U]INT64_FORMAT as
well.
Fri Dec 6 14:34:42 2002 Owen Taylor <otaylor@redhat.com>
Avoid literal UTF-8. (Allow it to build with
IRIX cc, #72757, Tomas Ogren)
* tests/patterntest.c (main): Convert literal
iso-8859-1 high bit characters in tests to
string escapes.
* glib/gunichartable.h glib/gen-unicode-tables.pl:
Use hex \xMN escapes rather than literal UTF-8
for casefold tables.
* configure.in: AC_PREREQ(2.53). needed for recent
GLIB_SIZEOF() changes.
2002-11-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/grand.c, gthread/gthread-impl.c, tests/rand-test.c:
Improved the seeding algorithm. Old behaviour can be achived by
setting envvar G_RANDOM_VERSION to "2.0". (#99262)
* docs/reference/glib/glib-docs.sgml,
docs/reference/glib/Makefile.am: Renamed
docs/reference/glib/changes-2.0.sgml to
docs/reference/glib/changes.sgml and added section for changes
from 2.0 to 2.2 (Also corrected 1.0 to 1.2).
* README.in, docs/reference/glib/running.sgml,
docs/reference/glib/tmpl/random_numbers.sgml,
docs/reference/glib/changes.sgml: Added notes about the new
seeding algorithm.
2002-11-17 Tor Lillqvist <tml@iki.fi>
* glib/gspawn-win32.c (g_spawn_async_with_pipes): Ignore the
G_SPAWN_DO_NOT_REAP_CHILD flag, can't be meaninfully implemented
on Windows, at least not now. Always pass dont_wait as TRUE to
do_spawn_with_pipes(). The semantics of the dont_wait parameter is
very different from the semantics of the intermediate_child
parameter to fork_exec_with_pipes() in the Unix version. This
fixes a serious bug, g_spawn_async() in fact behaved
synchronously.
(do_spawn_with_pipes, do_spawn): Rename from
fork_exec_with_pipes() and do_exec(), those names were from the
Unix bersion, and misleading.
(close_and_invalidate): Don't try to close invalid fds.
* glib/gspawn.c (g_spawn_async_with_pipes): Add warning about
Windows behaviour. There is no fork(), so the child_setup()
function is in fact called in the parent.
* glib/gspawn-win32-helper.c (WinMain): Insert spaces in argv
debugging output.
* tests/spawn-test-win32-gui.c: New file. Test program to be
linked as a GUI application. Behaves differently depending on how
invoked (by spawn-test).
* tests/spawn-test.c (run_tests): On Win32, run the
spawn-test-win32-gui program, too, in several ways, synchronously
and asynchronously.
* tests/Makefile.am: Corresponding change.
Mon Nov 4 14:41:48 2002 Owen Taylor <otaylor@redhat.com>
* glib/gbsearcharray.c: Include config.h
so DISABLE_MEMPOOLS actually has an effect.
(#96437, Morten Welinder)
* tests/uri-test.c: Include <config.h>
Mon Nov 4 14:42:36 2002 Owen Taylor <otaylor@redhat.com>
* gtype.c gsignal.c gvaluearray.c: Include config.h
so DISABLE_MEMPOOLS actually has an effect.
(#96437, Morten Welinder)
* gsignal.c: Conditionalize definition of g_handler_ts
on DISABLE_MEM_POOLS (#96437)
Mon Nov 4 14:45:24 2002 Owen Taylor <otaylor@redhat.com>
* gthread-posix.c gthread-solaris.c: Include <config.h>
Tue Oct 15 15:28:47 2002 Manish Singh <yosh@gimp.org>
* tests/iochannel-test.c: use gsize instead of int where appropriate
(64-bit cleanliness fix). Removed leftover line_term cruft.
* glib/gfileutils.c: Clarify the behavior of g_build_path()
for empty elements and for leading and trailing copies
of the separator in the docs.
* glib/gfileutils.c: Fix problems with leading elements
consisting only of "/" characters. (#85928, Guillaume Chazarain)
* tests/strfunc-test.c (main): Add more test cases
for g_build_filename().
2002-07-04 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* tests/*.c: Added #undef G_DISABLE_ASSERT and #undef G_LOG_DOMAIN
throughout the files, which didn't already have them. (#87312)
Tue Jun 11 17:03:39 2002 Owen Taylor <otaylor@redhat.com>
* tests/patterntest.c (test_compilation)
* glib/gmem.c (profiler_try_realloc): A couple
of 64-bit printf format fix from George Lebl.
* glib/gconvert.c (open_converter): Fix gsize/gint
mixup for g_iconv() arguments.
2002-05-14 Alex Larsson <alexl@redhat.com>
* glib/gstrfuncs.c:
* glib/gstrfuncs.h:
New functions g_str_has_suffix and g_str_has_prefix.
* tests/string-test.c: (main):
Test the new functions.
Tue May 7 11:24:22 2002 Owen Taylor <otaylor@redhat.com>
Fixes for #79347, Ron Arts.
* glib/gqsort.c (g_qsort_with_data): Handle 0 elements,
don't g_return_if_fail().
* tests/qsort-test.c (main): Add a 0 element test.
* glib/garray.c (g_[ptr_]array_sort_with[_data]):
Remove invalid assertions that array->pdata != NULL ..
it's NULL for 0 elements which is a valid case.
2002-04-08 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* tests/gio-test.c, tests/markup-test.c: Use gsize instead of
gint. From Miroslaw Dobrzanski-Neumann
<mne@mosaic-ag.com>. (#77982)
Thu Mar 28 18:22:53 2002 Owen Taylor <otaylor@redhat.com>
* README: Remove warning about g_print, etc, encoding.
* NEWS: Updates.
* glib/gmessages.c (g_log_default_handler): Use %lu
(plus a cast) when printing out pid_t arguments.
(#76770, Morten Welinder)
* glib/gstrfuncs.c (g_strdup_vprintf): Check the
result of vasprintf(), return NULL on failure.
(#76802, Akira Tagoh)
* tests/testglib.c (TEST): Supress a warning with
some GCC versions.
Sun Mar 3 21:09:24 2002 Owen Taylor <otaylor@redhat.com>
* configure.in: Default to --disable-gtk-doc, to avoid
Jade setup hassles.
* autogen.sh: Add --enable-gtk-doc.
* configure.in: Default to --disable-static to go
along with Pango, GTK+ where we need to do that for
bin-compat reasons.
* Makefile.am: Add a slightly modified distcheck rule
that passes --enable-gtk-doc to the configure inside.
(So that 'make dist' succeeds inside.)
* configure.in *.pc.in **/Makefile.am m4macros/glib-2.0.m4
tests/makefile.mingw.in: Switch everything over to
glib-2.0.
Fixes from Miroslaw Dobrzanski-Neumann (#71963)
* glib/giounix.c (g_io_channel_new_file): Fix trailing comma
in enum.
* configure.in: Check for unsetenv.
* test/uri-test.c: Fall back to trying putenv(VARNAME) if
unsetenv isn't present.
2002-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* tests/thread-test.c: Do not assume, that after
g_usleep(G_USEC_PER_SEC) the newly started thread began
running. Spotted by Miroslaw Dobrzanski-Neumann
<mne@mosaic-ag.com>. Make the test_g_static_rw_lock_thread threads
wait a random time. Make the test_g_static_rw_lock test run 5
seconds, not 1.
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
* glib/gmarkup.c (g_markup_parse_context_parse): Support
' and " as attribute value delimiters. (#70677)
* glib/gconvert.h: Make hostname parameter const char *.
* glib/gconvert.c: (g_unescape_uri_string): Added a new
"ASCII must not be escaped" feature, and some missing error
checking.
(is_escalphanum): New.
(is_escalpha): New.
(hostname_validate): New.
(g_filename_from_uri): Don't allow hostnames to include
escaped ASCII, validate hostnames with the new
hostname_validate.
(g_filename_to_uri): Validate hostnames with the new
hostname_validate.
* tests/uri-test.c: Updated tests to reflect the hostname
validation changes above.
* glib/gdate.c: (g_date_fill_parse_tokens): Remove the
<ctype.h> include and do isdigit -> g_ascii_isdigit.
Fri Feb 8 12:32:14 2002 Owen Taylor <otaylor@redhat.com>
* tests/hash-test.c (second_hash_test): Fix access to
freed memory in test case (Miroslaw Dobrzanski-Neumann).
Re-enable and debug some commented out code.
2002-01-23 Tor Lillqvist <tml@iki.fi>
* glib/gconvert.c: (strdup_len): Not used on Windows, don't even
compile it then.
(acceptable): Improve comments for the _acceptable_ table: put
each ASCII char above the hex number for it.
(g_escape_file_uri): On Windows, turn backslashes in the file name
into plain ("forward") slashes.
(g_filename_from_uri): On Windows, don't return the hostname
"localhost", because we can not be 100% sure it will be recognized
in all cases anyway, so simpler to turn it into a null
hostname.
Change slashes in the filename into backslashes, as that is the
more canonical separator.
Recognize drive letters (either followed by a colon or a vertical
bar, as used by some browsers), and if the filename part starts
with a such, don't include any (back)slash.
Don't drop any extra leading slash in the filename on Unix.
(g_filename_to_uri): On Windows, if the hostname is "localhost",
don't use it, for consistency with g_filename_from_uri().
tests/uri-test.c: Change accordingly, so that all tests pass on
Windows. Unix, too, I hope, though I couldn't check that now.
(main): Unset the G_BROKEN_FILENAMES environment variable on Unix,
as some tests require that filenames are in UTF-8. Is unsetenv()
portable?
These changes should fix bugs #59387, #59652, #59657 and #59658.
2002-01-05 Hans Breuer <hans@breuer.org>
* glibconfig.h.win32.in
msvc_recommended_pragmas.h (new file) : moved warning to
error pragmas to their own file to not force 'good practice'
programming in downstream libs and apps. Instead the new header
will be used by -FImsvc_recommended_pragmas.h in gnome/cvs
makefile.msc
* */makefile.msc.in : use -FImsvc_recommended_pragmas.h
2001-12-21 Tor Lillqvist <tml@iki.fi>
* config.h.win32.in: Add (undefined) HAVE_C99_VSNPRINTF.
* glibconfig.h.win32.in: Add definition of G_HAVE_GROWING_STACK.
* tests/Makefile.am: Rename the progs_LDADD, thread_LDADD and
module_LDADD Make macros to progs_ldadd, thread_ldadd and
module_ldadd. Newer automakes reserve macros named *_LDADD for
the use as LDADDs for targets it knows.
* glib/giowin32.c: (struct _GIOWin32Watch): 'callback' wasn't used
here, either.
2001-12-21 Tor Lillqvist <tml@iki.fi>
* gobject.def: Add g_signal_get_invocation_hint.
Tue Dec 18 21:39:57 2001 Tim Janik <timj@gtk.org>
* testoverride.c: added some assertions to test
g_signal_get_invocation_hint().
* gsignal.[hc]: remove signal_id argument from
g_signal_chain_from_overridden(), the parameters are assumed to match
the innermost signal currently in emission for this instance.
added g_signal_get_invocation_hint() to figure the invocation hint
of the innermost signal emission of an instance.
* gsignal.c (g_signal_list_ids): fix G_BSEARCH_ARRAY_NODES() to
access a bsearch array and not a pointer to it (discovered by
Sven Neumann).
* configure.in (G_MODULE_LDFLAGS): Set this from libtool rather
than hardcoding values for certain platforms.
* glib/libcharset/config.charset: Add a rule for NetBSD.
* glib/libcharset/localcharset.c (_g_locale_get_charset_aliases):
If LIBCHARSET_ALIAS_DIR is set, look for charset.aliases there.
* tests/Makefile.am (TESTS_ENVIRONMENT): set LIBCHARSET_ALIAS_DIR
so we don't depend on charset.aliases having been installed
2001-11-24 Tor Lillqvist <tml@iki.fi>
*/.cvsignore: Add various Win32 related file types.
gmodule:
2001-11-24 Tor Lillqvist <tml@iki.fi>
* Makefile.am: Remove rule for testgmodule.exp, too.
2001-11-22 Tor Lillqvist <tml@iki.fi>
* gmodule-win32.c: Current w32api headers do include tlhelp32.h,
so no need to have an extract from it here.
Thu Nov 22 13:14:18 2001 Owen Taylor <otaylor@redhat.com>
* configure.in (GLIB_MICRO_VERSION): Version 11,
interface, binary age 0.
* NEWS: Updated.
* tests/Makefile.am (libmoduletestplugin_[ab]_la_LDFLAGS):
Add dummy -rpath argument. On some (but not all) platforms,
libtool will only build a convenience library without this.
(#63486, Dan Winship)
* Makefile.am (EXTRA_DIST): Add README.in, INSTALL.in -
autoconf-2.5x checks for 'make dist' in the tarball
when you make distcheck.
* glib/Makefile.am (EXTRA_DIST): Distribute
makefile.msc/mingw.in, glib.rc.in.
* tests/patterntest.c: Include string.h.
* glib/gpattern.c (g_utf8_reverse): doc parsing fix.
Tue Nov 13 21:25:35 2001 Owen Taylor <otaylor@redhat.com>
* glib/{gen-unicode-tables.pl,gunibreak.c,gunibreak.h,
gunichartables.h, gunicomp.h, gunidecomp.[ch],
guniprop.c}: Patch from Andrew Taylor to improve
tables and reduce relocations by using indices
rather than pointers. (#64433)
* tests/unicode-normalize.c (main): Fix for changes
to g_strsplit().
2001-11-04 Tor Lillqvist <tml@iki.fi>
* tests/Makefile.am: On Win32, create separate .exp file for
module-test.o and link with that. Otherwise the GNU linker doesn't
export the g_clash_func.
Thu Nov 1 21:48:43 2001 Owen Taylor <otaylor@redhat.com>
* tests/mainloop-test.c (recurser_idle): Recurse
with may_block = FALSE, so we don't get into
the pathology where the recurser_idle recurses
for 10 iterations, and the only thing that is
running is the recurser idle, which adds
another recursion for each of those 10 iterations
and....
* tests/mainloop-test.c (create_crawler): Fix race
condition where a crawler source could be destroyed
before it was added to the crawler array.
* test/Makefile.am: Add mainloop-test back.
2001-10-29 Daniel Egger <degger@fhm.edu>
* glib/gbacktrace.h: Fix non-Intel/-Alpha version of the
G_BREAKPOINT macro to include <signal.h> and use SIGTRAP.
* glib/gmessages.c: Conditionalise definition of args2
depending on the definition of HAVE_VSNPRINTF to avoid
compiler warning.
* gobject/testgruntime.c
* tests/patterntest.c: Include <string.h> to avoid warnings.
2001-10-28 Tor Lillqvist <tml@iki.fi>
* glib/glib.def: Add missing g_pattern_match_simple and
g_pattern_spec_equal.
* glib/gwin32.c (g_win32_get_package_installation_subdirectory):
Set separator correctly.
* glib/libcharset/config.charset (os): Match also mingw*.
* tests/testglib.c (main): (Win32): Print the lib/locale
subdirectory, as that is what actually gets used.
2001-10-26 Tor Lillqvist <tml@iki.fi>
* glib/glib.def: Update.
* tests/makefile.{mingw,msc}.in: Add ../* to PATH before running
tests to find DLLs. Separate the interactive tests, don't run them
in the check target.
* */makefile.msc.in: Include make.msc from GLib's build directory.
Wed Oct 24 11:10:54 2001 Owen Taylor <otaylor@redhat.com>
* configure.in: Version 1.3.10, interface age, binary age = 0.
* NEWS: Updates
Thu Oct 25 12:01:41 2001 Owen Taylor <otaylor@redhat.com>
* tests/Makefile.am: Temporarily remove mainloop-test, since it
prevents distcheck.
Fri Oct 12 18:24:02 2001 Tim Janik <timj@gtk.org>
* glib/gpattern.[hc]: make struct _GPatternSpec and GMatchType
private.
(g_pattern_equal): new function to return equality of two patterns
(required because GPatternSpec is private now).
(g_pattern_spec_new): fix bug wrg wildcard counting which produced
incorrect pattern specs (discovered by Matthias Clasen).
optimized code so we just keep one compiled pattern string now.
correctly canonicalize patterns. reduce string walks, optimize
decision about MATCH_ALL vs. MATCH_ALL_TAIL.
(g_pattern_match_string): call just g_pattern_match() with NULL
reversed string.
(g_pattern_match): allow NULL reversed strings now, reverse_dup
strings on demand.
* tests/patterntest.c (test_compilation): added an extended testcase
for pattern matching from Matthias Clasen <matthiasc@poet.de>.
Sat Oct 13 06:58:23 2001 Tim Janik <timj@gtk.org>
* glib/tmpl/patterns.sgml: amended documentation.
Sat Sep 29 02:33:14 2001 George Lebl <jirka@5z.com>
* tests/testglib.c (main): cast the string size to gulong and use %lu
for printing to avoid 64bit issues
* glib/gstrfuncs.[ch] (g_ascii_strncasecmp): Change the 'n' argument
to gsize instead guint.
2001-09-26 Tor Lillqvist <tml@iki.fi>
* configure.in: Retract my change earlier today. Don't preset
autoconf variables in a try to match both mingw and MSVC. Instead,
he who packages a prebuilt GLib developer distribution for Win32
runs configure twice: once for mingw, once for MSVC, and then uses
diff -D on the glibconfig.h files to generate a suitably ifdeffed
glibconfig.h for distribution that suits both compilers. (Ditto
for config.h, although that file wouldn't be distributed in a
developer package, but in a source package for Win32 users who
want to build GLib but can't use configure.)
* glibconfig.h.win32.in
* config.h.win32.in: Generated by using diff -D as described above.
* tests/makefile.mingw.in (.c.exe): Correct name of gthread (import)
library.
gthread:
2001-09-26 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in: Fix couple of typos.
* gthread.def: Add g_thread_init_with_errorcheck_mutexes.
2001-09-25 Tor Lillqvist <tml@iki.fi>
* configure.in: More Win32 automake macros. For .def files:
GLIB_DEF, GMODULE_DEF, GOBJECT_DEF and GTHREAD_DEF. For .exp
files: TESTGMODULE_EXP (for programs that need to export symbols,
just testgmodule here). A new conditional, MS_LIB_AVAILABLE to
test whether the Microsoft librarian ("ar") is available to build
MS import libraries.
* glib/Makefile.am
* gmodule/Makefile.am: Use above. New rule to build MS import
library.
* glib/makefile.msc.in
* tests/makefile.msc.in
* tests/makefile.mingw.in: Use same DLL and import library names as
libtool.
gmodule:
2001-09-25 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in: Fix missing end @ in @LT_CURRENT@.
* makefile.msc.in: Use same DLL and import library names as
libtool.
gobject:
2001-09-25 Tor Lillqvist <tml@iki.fi>
* Makefile.am: Use new macros for .def file, and check for
MS_LIB_AVAILABLE, new rule to build MS import library.
* makefile.msc.in: Use same DLL and import library names as
libtool.
gthread:
2001-09-25 Tor Lillqvist <tml@iki.fi>
* Makefile.am: Use new macros for .def file, and check for
MS_LIB_AVAILABLE, new rule to build MS import library.
* makefile.msc.in: Use same DLL and import library names as
libtool.
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward
slashes. (But still don't accept them in the other functions
here. This is a thorny issue. Windows in fact does treat / like \
on input (at least as local directory separators, dunno about
server/share separators). But GLib only has the one
G_DIR_SEPARATOR value, that apps should scan for, and use when
building pathnames. To properly fix this would require totally
abstracting pathnames, and don't having any path name scanning and
building in applications at all. Fat chance.)
(GLIB_LOCALE_DIR): Redefine only on "pure" Win32, not Cygwin. Use
subdirectory "share\locale", as on Unix.
* glib/gwin32.c: Don't need to define those langiage and
sublanguage constants here, current mingw (w32api) headers have
them.
* glib/glib.def: Add a few missing entry points.
* tests/testglib.c (main): Use same name for DLL as libtool does.
Use G_DIR_SEPARATOR in g_path_get_basename tests.
* tests/strfunc-test.c: (main): Change so that it works
on platforms where isalpha is a macro only, without the
corresponding function that the C standard requires.
Also eliminate the multiple lists of ctype functions.
* tests/.cvsignore: Ignore the new test.
2001-09-04 Tor Lillqvist <tml@iki.fi>
* README.win32: Update. Don't mention pthreads.
* build-dll: Remove, moved to the build module.
* glibconfig.h.win32.in: Don't mention pthreds here, either.
* glib/gstrfuncs.c: Mark the correct variable for export from DLL.
* glib/giowin32.c (g_io_win32_msg_create_watch): Owen forgot to
rename the win32_watch_funcs variable here, too.
* */makefile.mingw.in: Don't use version number in import library
name. Use whole version number in DLL name. Use build-dll from the
build module.
Mon Aug 27 14:55:27 2001 Owen Taylor <otaylor@redhat.com>
* gsourceclosure.[ch] (g_source_set_closure): Implement.
* gsourceclosure.[ch]: Add GType's for GIOChannel, GIOCondition.
Mon Aug 27 14:56:12 2001 Owen Taylor <otaylor@redhat.com>
* glib/gmain.h: Add closure_marshal/closure_callback
fields to GSourceFuncs for use by g_source_set_closure().
* glib/gmain.c glib/giounix.c glib/giowin32.c
glib/gmain.h: Export the SourceFuncs vtables so GObject
can use them to figure out closure callbacks/marshallers
for the default source types.
2001-08-30 Tor Lillqvist <tml@iki.fi>
After being away for about five months, I'm back working on
this... For now, still using same build setup for Win32. Probably
will change to not including version numbers in the import library
names, though. (But the DLL names would still include them,
possibly even also the micro version number.) That would be more
Unix-like. Also, will have to check out newest mingw tool versions
to see if the build-dll script now can be retired.
* makefile.mingw
* makefile.msc: New files, no need to generate from .in as
they don't contain references to automake variables.
* makefile.mingw.in
* makefile.msc.in: Removed.
* glib.rc.in: Remove
* glib/glib.rc.in: Moved here.
* Makefile.am
* glib/Makefile.am: Corresponding changes.
* glib/glib.def: Fix typo, add new entries.
* glib/gspawn-win32-helper.c: More debugging. Doesn't work
currently (or then it never has on Win2k, which I now use?)
* glib/gstrfuncs.c
* glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
* */makefile.mingw.in: Reflect new location of glib library.
* glib/gconvert.h:
* glib/gconvert.c: (g_filename_from_uri):
Updated name of error from G_CONVERT_ERROR_NOT_LOCAL_FILE to
G_CONVERT_ERROR_NOT_ABSOLUTE_FILE_URI.
* tests/.cvsignore:
* tests/uri-test.c:
Added a lot more test for the new URI functions, including a
number that seem to indicate some minor bugs.
2001-08-26 Alex Larsson <alexl@redhat.com>
* glib/gconvert.[ch] (g_filename_from_uri,
g_filename_to_uri): New functions to convert
between local pahtnames and file: uris.
* tests/Makefile.am:
* tests/uri-test.c:
Tests for the new functions.
2001-08-25 Alexander Larsson <alla@lysator.liu.se>
* glib/gstrfuncs.[ch]:
* docs/reference/glib/glib-overrides.txt:
* docs/reference/glib/glib-sections.txt:
* docs/reference/glib/tmpl/string_utils.sgml:
Implement and document g_ascii_isxxx.
* tests/strfunc-test.c:
Add tests for g_ascii_isxxx
* glib/guniprop.c (g_unichar_ispunct):
include symbols, not just punctuation.
(g_unichar_isspace): Vertical tab is not
considered whitespace.
* tests/shell-test.c:
Output errors on stderr
* tests/shell-test.c: (check_string_result): Fix bad indenting.
I figured I should fix this since I just pointed Alex here to
look at this as an example.
Fri Aug 24 11:15:46 2001 Owen Taylor <otaylor@redhat.com>
* glib/gstrfuncs.c docs/Changes-2.0.txt: Patch from Darin
Adler to restore Glib-1.2 handling of empty strings,
and to fix off-by-one with @max_tokens. (#57663).
Doc improvements.
* tests/strfunc-test.c: Change tests to correspond to
new behavior of g_strsplit().
Sun Aug 12 10:09:00 2001 Owen Taylor <otaylor@redhat.com>
* tests/iochannel-test.c (main): Find test case for
srcdir != builddir, miscellaneous cleanups.
* tests/Makefile.am (EXTRA_DIST): Distribute casefold.txt,
casemap.txt iochannel-test-infile.
* glib-2.0-uninstalled.pc.in: Fix for move of glib files
into subdir. (Pointed out by Steve Baker)
Modified Files:
glib/ChangeLog glib/glib/giochannel.c
glib/tests/iochannel-test.c
* glib/giochannel.c: Fixed g_io_channel_seek_position()
so that G_SEEK_CUR can be used with UTF-8 encoding
* glib/giochannel.c: Changed test to decide whether
use_buf is encoded_read_buf or read_buf from
"if (channel->do_encode)" to "if (channel->encoding)" to
fix bug 58472
* tests/iochannel-test.c: Fixed so it doesn't output
double newlines
* glib/giochannel.c: Fixed g_io_channel_fill_buffer()
so that encoded_read_buf is created for UTF-8 encoding
* tests/.cvsignore:
* tests/strfunc-test.c: (strv_check), (main):
Improve strfunc test to test the split function in a way that
demonstrates its idiosyncrasies.
2001-07-21 Hans Breuer <hans@breuer.org>
* glib/giowin32.c : intial implementation of new API functions.
Not sure if it behaves as intended ...
* glib.def : removed, glib/glib.def is the file used since moved
* glib/glib.def : updated
* tests/makefile.msc : added iochannel-test
Modified Files:
glib/ChangeLog glib/glib.def glib/glib/giochannel.c
glib/glib/giochannel.h glib/glib/giounix.c
glib/glib/giowin32.c
glib/docs/reference/glib/glib-sections.txt
glib/tests/iochannel-test.c glib/tests/unicode-collate.c
glib/tests/unicode-normalize.c
Added Files:
glib/tests/iochannel-test-infile
* glib/giochannel.c: API changes, fixes to
error handling, some internal restructuring
* glib/giochannel.h: API changes, documentation for
elements in GIOChannel structure
* glib/giounix.c: Matched API changes, implemented
backend to set is_readable, is_writeable, is_seekable
flags, added a test to catch large values of count
for which the behavior of write() is undefined
* glib/giowin32.c: Changed to match new prototypes for
io_close() and io_seek(), removed references to
G_IO_STATUS_INTR, set is_seekable flag in channel
creation functions
* glib.def: Renamed g_channel_error_quark() and
g_channel_error_from_errno() to g_io_channel_error_quark() and
g_io_channel_error_from_errno(); added new functions
g_io_channel_get_buffered() and g_io_channel_set_buffered()
* docs/reference/glib/glib-sections.txt: Modified iochannel
section to reflect new functions and API changes
* tests/iochannel-test.c: Fixed to work with API changes
* tests/iochannel-test-infile: New file; input file
for iochannel-test
* tests/unicode-collate.c tests/unicode-normalize.c:
Changed G_IO_FILE_MODE_READ to "r" to match API change
2001-07-20 Hans Breuer <hans@breuer.org>
* glib/glib/giowin32.c : make it compile again
* glib/glib.def : updated exports
* glib/makefile.msc.in :
* glib/makefile.mingw.in :
* tests/makefile.msc.in : reflect glib move
* tests/mainloop-test.c : #include <io.h> for _pipe()
* tests/gio-test.c : casts for strict compiler settings
* makefile.msc.in : new master makefile reflecting the glib
move. The '.in' isn't really needed anymore, because there
is no version number in it
* glib/gstrfuncs.c: (g_ascii_strdown), (g_ascii_strup): Add
missing const.
(g_strsplit): Add g_return_val_if_fail for case of empty
delimiter, which can result in an infinite loop otherwise.
* glib/gstrfuncs.h: Add missing const.
* tests/.cvsignore: Ignore a generated file.
* tests/array-test.c:
* tests/dirname-test.c:
* tests/hash-test.c:
* tests/list-test.c:
* tests/node-test.c:
* tests/relation-test.c:
* tests/shell-test.c:
* tests/slist-test.c:
* tests/spawn-test.c:
* tests/strfunc-test.c:
* tests/string-test.c:
* tests/testglib.c:
* tests/tree-test.c:
* tests/type-test.c:
Add an #undef G_DISABLE_ASSERT so all tests will assert even if
asserts are disabled inside glib itself.
Fri Jul 13 19:20:06 2001 Owen Taylor <otaylor@redhat.com>
* glib/gstring.c (g_string_insert/append/prepend_unichar):
Add functions to insert a unichar as UTF-8, since this
is reasonably common.
* glib/gutf8.c glib/gunicode.h (g_utf8_get_char_validated):
New function exposing iterating through possibly invalid/incomplete
UTF-8 to unicode to the outside world.
* glib/gutf8.c (g_utf8_get_char_extended): Fix max_len argument
to be gssize, not gsize.
* .cvsignore: Add some generated files.
* glib/gmain.c: (g_main_context_iterate): Comment out cruft
after #endif to avoid gcc warning.
* gmodule/gmodule.c: (g_module_set_error_unduped): Remove
const from type to avoid gcc warning.
* gobject/gsignal.c: (g_signal_emitv): ifdef variable used
only if G_ENABLE_DEBUG to avoid gcc warning.
* gobject/gtype.c: (type_iface_vtable_init_Wm),
(type_iface_vtable_finalize_Wm): ifdef call needed only
if !G_DISABLE_ASSERT to avoid gcc warning.
* tests/testglib.c: (main): ifdef call needed only if
!G_DISABLE_ASSERT to avoid gcc warning. Maybe later we
should make the test to #undef G_DISABLE_ASSERT.
* tests/unicode-collate.c: Add include of <string.h> to
avoid gcc warning.
2001-07-08 Martin Baulig <baulig@suse.de>
* tests/unicode-normalize.c, tests/unicode-collate.c:
Reflect latest g_io_channel_new_file() API changes, use
G_IO_FILE_MODE_READ instead of "r".
Sun Jul 1 20:16:25 2001 Owen Taylor <otaylor@redhat.com>
* glib/guniprop.c (g_unichar_totitle): Use G_N_ELEMENTS
rather than a custom macro.
* glib/gen-unicode-tables.pl: Adapt to changes in table
formats for Unicode 3.1
* glib/gunicode.h glib/guniprop.c glib/gunichartables.h
glib/gen-unicode-tables.pl: Add case conversion functions
g_utf8_casefold, g_utf8_strup, g_utf8_strdown.
* tests/unicode-caseconv.c tests/gen-casefold-txt.pl
tests/gen-casemap-txt.pl tests/casefold.txt
tests/casemap.txt: Test cases for case conversion.
* glib/gunicode.h glib/gunidecomp.[ch] glib/gunicomp.h
glib/gen-unicode-tables.pl: Add function to do Unicode
normalization g_utf8_normalize().
* tests/unicode-normalize.c: Test program for case conversion.
* glib/gunicode.h glib/gunicollate.c: Add collation functions
g_utf8_collate, g_utf8_collate_key.
* test/unicode-collate.c: Test program for collation.
* glib/gdate.c (g_date_fill_parse_tokens): Fix uninitialized
variable.
* glib/gdate.c (g_date_strftime) docs/Changes-2.0.txt:
Make work with UTF-8 even if the locale isn't UTF-8 based.
Still somewhat of broken, if the format string contains
characters not representable in the current locale, will warn
and not work.
* glib/gdate.c: Use UTF-8 normalization and casefolding.
Sat Jun 30 15:49:10 2001 Owen Taylor <otaylor@redhat.com>
* glib/gmain.[ch]: (Mostly patch from Sebastian Wilhemi)
Make some changes to the way that GMainContext works:
- a GMainContext is no longer associated with a single
thread, but any thread can acquire ownership
of thread and iterate.
- There is a facility g_main_context_wait() for
non-owner-threads to wait either for ownership
or for a condition to be broadcast.
- For efficiency, GMainLoop just piggybacks of
of the loops mutex / condition instead of
having a separate mutex/condition for each
GMainLoop.
* glib/gthread.[ch]: Remove hacks to store the thread's
GMainContext in the GThread structures, since we
no longer have the GMainContext <=> GThread correspondence.
* glib/gmain.[ch]: Make g_main_context_wakeup() public
so someone could completely duplicate GMainLoop
with the public API.
* tests/mainloop-test: Fix up to the new API. Decidedly
doesn't work at the moment, but that may be the IO
channel changes, or preexisting locking problems.
Sat Jun 30 12:49:26 2001 Owen Taylor <otaylor@redhat.com>
Patch from Darin Adler (#54166)
* glib/gstrfuncs.[ch]: Add ascii-only, locale-insensitive
g_ascii_to[lower/upper], g_ascii_str[down/up],
g_ascii_is[upper/lower] and deprecate the locale-affected
versions which break for UTF-8, etc. Make
g_ascii_strup/strdown duplicating,
not in-place for consistency with UTF-8 functions.
* glib/gstring.[ch]: Add ascii-only, locale-insensitive
g_string_ascii_[down/up], and deprecate the locale-affected
versions which break for UTF-8, etc.
* glib/gutils.c glib/gwin32.c test/testglib.c: Use
the g_ascii_* functions where appropriate.
* glib/gstring.[ch] (g_string_set_size): Add function to
allow setting the length of a string greater than the
current length (for buffering usage)
* glib/gstring.[ch]: Expose string->allocated_len, since
that is useful when using GString simply as a buffer.
(Renamed from string->alloc)
* glib/giochannel.[ch] glib/giounix.c glib/giowin32.c:
Major patch from Hidetoshi Tajima and Ron Steinke
reworking GIOChannel to have:
- Buffering
- Sane and useful error reporting
- Streaming encoding conversion with iconv
- Convenience functions to read by lines or
an entire file.
Also fix remaining 64 bit cleanliness issues.
* tests/iochannel-test.c tests/Makefile.am: Test case
for IO channel streaming conversion. Still needs
some fixing up.
Tue Jun 26 11:43:46 2001 Owen Taylor <otaylor@redhat.com>
* configure.in Makefile.am *.[ch] glib/*.[ch] glib/Makefile.am:
Move glib library into a subdirectory, make all GLib include
files include as <glib/glist.h>
* tests/testglib.c tests/testgdate.c tests/testgdateparser.c
tests/timeloop.c tests/timeloop-basic.c: Move all tests into
the tests/ subdirectory.
Wed Jun 20 12:00:54 2001 Owen Taylor <otaylor@redhat.com>
Changes for 64-bit cleanliness, loosely based on patch
from Mark Murnane.
* gconvert.c (g_convert/g_convert_with_fallback): Remove
workarounds for since-fixed GNU libc bugs. Minor
doc fix.
* gconvert.[ch]: Change gint to gsize/gssize as
appropriate.
* gconvert.c (g_locale/filename_to/from_utf8): Fix incorrect
computation of bytes_read / bytes_written.
* gfileutils.[ch] (g_file_get_contents): Make length
out parameter 'gsize *len'.
* ghook.c (g_hook_compare_ids): Don't compare a
and b as 'a - b'.
* gmacros.h (GSIZE_TO_POINTER): Add GPOINTER_TO_SIZE,
GSIZE_TO_POINTER.
* gmain.c (g_timeout_prepare): Rewrite to avoid
overflows. (Fixes bug when system clock skews
backwards more than 24 days.)
* gmarkup.[ch]: Make lengths passed to callbacks
gsize, length for g_markup_parse-context_parse(),
g_markup_escape_text() gssize.
* gmessages.[ch] (g_printf_string_upper_bound): Change
return value to gsize.
* gmessages.c (printf_string_upper_bound): Remove
a ridiculous use of 'inline' on a 300 line function.
* gstring.[ch]: Represent size of string as a gsize,
not gint. Make parameters to functions take gsize,
or gssize where -1 is allowed.
* gstring.c (g_string_erase): Make
g_string_erase (string, pos, -1) a synonym for
g_string_truncate for consistency with other G*
APIs.
* gstrfuncs.[ch]: Make all functions taking a string
length, take a gsize, or gssize if -1 is allowed.
(g_strstr_len, g_strrstr_len). Also fix some boundary
conditions in g_str[r]str[_len].
* gutf8.c tests/unicode-encoding.c: Make parameters that
are byte lengths gsize, gssize as appropriate. Make
character offsets, other counts, glong.
* gasyncqueue.c gcompletion.c
timeloop.c timeloop-basic.c gutils.c gspawn.c.
Small 64 bit cleanliness fixups.
* glist.c (g_list_sort2, g_list_sort_real): Fix functions
that should have been static.
* gdate.c (g_date_fill_parse_tokens): Fix extra
declaration that was shadowing another.
* tests/module-test.c: Include string.h
Mon Jun 18 15:43:29 2001 Owen Taylor <otaylor@redhat.com>
* gutf8.c (g_get_charset): Make argument
G_CONST_RETURN char **.
2001-06-08 Alex Larsson <alexl@redhat.com>
* gstrfuncs.[ch]:
Added new functions g_strstr_len, g_strrstr and g_strrstr_len
* tests/strfunc-test.c:
Add some tests for the new functions.
* gunicode.h:
* gutf8.c:
Add length argument to g_utf8_strchr and g_utf8_strrchr.
2001-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* grand.h (g_random_boolean, g_rand_boolean): Fix to stupid bug in
g_random_boolean, also both functions now return 1 or 0 instead of
1<<15 or 0.
2001-05-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* tests/Makefile.am, tests/qsort-test.c: Add test case for the
g_qsort_with_data func. It works. This fixes bug #52605.
2001-05-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* tests/Makefile.am, tests/cxx-test.C: Now that we check for a C++
compiler in configure.in anyway, I added a test, that the GLib
headers can be inclued into a C++ program. This fixes bug #52605.
Thu May 24 21:24:16 CEST 2001 Paolo Molaro <lupus@ximian.com>
* gmarkup.c: back out change by mitch@convergence.de and apply patch in
bug id #52067 that fixes the same problem in a more complete manner.
This fixes also a segfault for a malformed XML file and adds a new
test case.
2001-05-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthread.c, gthread.h: Renamed g_thread_create to
g_thread_create_full and added macro g_thread_create, which omits
'stack_size', 'bound' and 'priority' parameters. Also removed
'bound' from GThread struct.
* gthreadpool.h, gthreadpool.c: Adapted GThreadPool to the above
changes. GThreadPool lost the 'priority' and 'bound'
members. g_thread_pool_new the 'stack_size', 'bound' and
'priority' parameters.
* tests/mainloop-test.c, tests/thread-test.c,
tests/threadpool-test.c: Adapted to the above changes.
2001-05-08 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gmain.c, gthread.c, gthread.h: Moved func and arg members from
GRealThread to GThread, such that they can be accessed by the
user.
* gthread.c, gthread.h: Due to popular demand (Tim being the
populus here ;-) threads now have a 'return value', which is
returned by g_thread_join and is either the return of the topmost
thread function or the value given to g_thread_exit.
* gthreadpool.c, tests/mainloop-test.c, tests/thread-test.c:
Adapted to the above change.
* configure.in: Add a check for the Darwin dynamic linker. Use
AC_TRY_LINK when checking for "nonposix getpwuid_r" so it notices
"no getpwuid_r" correctly.
* testglib.c (main): Make template[] bigger to prevent an overrun.
Remove an unused variable. Initialize error to NULL.
* tests/gio-test.c (main): Add a cast to prevent a warning when
size_t is a long.
* tests/type-test.c (main): Add an #ifdef to prevent a warning
when G_HAVE_GINT64 is defined and G_GINT64_FORMAT isn't.
Tue Apr 17 10:43:36 2001 Owen Taylor <otaylor@redhat.com>
* gstrfuncs.c: Define _GNU_SOURCE for stpcpy
* tests/mainloop-test.c (main): Wait for all threads
to start before beginning tests.
Tue Apr 3 12:38:16 2001 Owen Taylor <otaylor@redhat.com>
* glib-config-2.0.in: Exit with an error message that you
should use pkg-config instead.
* configure.in (PACKAGE): Require pkg-config.
* tests/Makefile.am (EXTRA_DIST): Add utf8.txt.
* configure.in (GLIB_MICRO_VERSION): Up MICRO to 3,
leave interface/binary at 0.
2001-03-12 Tor Lillqvist <tml@iki.fi>
* tests/Makefile.am (libmoduletestplugin_b_la_LIBADD,
libmoduletestplugin_b_la_LIBADD): Link with the libgmodule la only
on Win32.
2001-03-12 Tor Lillqvist <tml@iki.fi>
* Makefile.am (libgplugin_a_la_LIBADD, libgplugin_b_la_LIBADD):
Link with the libgmodule la only on Win32.
2001-03-10 Tor Lillqvist <tml@iki.fi>
* */Makefile.am: Use the _LIBADD dependencies on libglib only on
Win32.
* gobject/gobject.def: Add a couple of missing entries.
2001-02-21 Tor Lillqvist <tml@iki.fi>
Cygwin support contributed by Stefan Ondrejicka
<ondrej@idata.sk>. Hopefully I got it all in while simultaneously
adding support for auto*/libtool for mingw.
* Makefile.am: Changes for auto* support on Cygwin and Win32. Do
still distribute the hand-written makefiles and *.win32.in files,
though. Use GIO, GSPAWN and PLATFORMDEP macros set by configure.
Use -no-undefined. Pass -export-symbols glib.def to libtool.
* configure.in: Define G_PLATFORM_WIN32 on both pure Win32 (mingw)
and Cygwin. Add AC_CYGWIN, AC_EXEEXT and AC_LIBTOOL_WIN32_DLL
calls for Cygwin and mingw support. Check for %I64u guint64
format (in MS C library). Set G_MODULE_IMPL on mingw and
Cygwin. Use ac_object and ac_exeext. Set GIO, GSPAWN, PLATFORMDEP
and G_LIBS_EXTRA. Compile timeloop only on Unix. Define OS_WIN32
automake conditional on Win32.
* glib.h: Include gwin32.h also on Cygwin.
* gfileutils.c (get_contents_posix): Use O_BINARY (defined as 0 on
Unix) for Cygwin's sake.
* gtimer.c (GETTIME): Reduce #ifdefs, use a macro GETTIME().
* gconvert.c
* gthread.c
* gutf8.c
* gutils.c: For code needed both on Cygwin and native Win32,
test for G_PLATFORM_WIN32.
* gmarkup.h: Use G_BEGIN_DECLS and G_END_DECLS.
* gtypes.h: Refine GLIB_VAR definition. Also check for DLL_EXPORT
in case compiling a static library on Win32 or Cygwin.
* gwin32.c: No <direct.h> on Cygwin. No need for ftruncate() or
dirent emulation on Cygwin.
(get_package_directory_from_module) Convert return value from
GetModuleFileName() to POSIX path on Cygwin.
* tests/Makefile.am (progs_LDADD): Link with libglib, libgthread
and libgmodule as appropriate. Use -no-undefined.
* gbacktrace.c: Move #ifdefs around a bit on Win32.
* gshell.c (unquote_string_inplace): Make static.
* testglib.c: Make some vars static. Add Cygwin path tests.
2001-03-01 Tor Lillqvist <tml@iki.fi>
* gutils.c(g_find_program_in_path): Implement on Win32. Append the
executable file name suffixes from PATHEXT in turn while
looking for the program.
(g_find_program_in_path): If the program we are looking for is a
relative path in a subdirectory, don't do any path search.
2001-03-01 Tor Lillqvist <tml@iki.fi>
* gutils.c (g_path_is_absolute): (Win32) Remove test for initial
double backslash (UNC path), this will of course be matched by the
test for an initial G_DIR_SEPARATOR right up front. Silly me.
(g_find_program_in_path): Implement on Win32.
(g_get_any_init): (Win32) Also look for the USERPROFILE env var
indicating the home directory equivalent.
* testglib.c (main): Test g_find_program_in_path() on Win32 by
looking for more.com and regedit.exe.
* glib.def: Add g_find_program_in_path.
2001-02-21 Tor Lillqvist <tml@iki.fi>
* gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
* gthread.h: Include gtypes.h to be sure to get GLIB_VAR
definition, remove definition from here.
* gunicode.h: Remove duplicate GLIB_VAR definition from here, too.
* gutils.c: (Win32) Use USERPROFILE as home dir if present. On
Win2k, HOMEDRIVE and HOMEPATH aren't reliable.
* Makefile.am (INCLUDES): Add -DGLIB_COMPILATION.
* makefile.mingw.in: Remove install target, Windows isn't Unix.
* testgdate.c
* testgdateparser.c
* testglib.c: Undefine GLIB_COMPILATION.
* glib.def: Updates.
* .cvsignore
* */.cvsignore: Ignore also .obj, .dll, .lib and .exe files.
2001-02-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthread.c, gthread.h: Added functions g_static_rec_mutex_init,
g_static_rec_mutex_free, g_static_private_init,
g_static_private_free, g_static_rw_lock_init to allow the usage of
all those types dynamically. (g_static_rw_lock_free already
existed). Aditionally freed static_private indeces are reused
now. Untill now the array would just grow if you would use more
and more static_private. That required adding a slist of all
running threads, which could potentially be of good use later. It
is not exported however. Renamed a LOCK and small indentation
fixes.
* tests/thread-test.c: Test the new static_private index freing
and reusing feature.
2001-02-04 Tor Lillqvist <tml@iki.fi>
* tests/Makefile.am (thread_LDADD): Change order of libs,
put progs_LDADD last. Needed for cygwin, says jbdoll@kepri.re.kr.
2001-02-04 Tor Lillqvist <tml@iki.fi>
* Makefile.am (progs_LDADD): Change order of libs to libgobject
first, then libglib. Needed for cygwin, says jbdoll@kepri.re.kr.
2001-01-25 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in
* */makefile.mingw.in: Protect the rule to rebuild makefile.mingw
if makefile.mingw.in has changed with a check if said .in file
exists. (This rule is mainly a convenience for yours truly.)
2001-01-25 Tor Lillqvist <tml@iki.fi>
* giowin32.c: Socket support rewritten. It was utterly broken, and
untested in fact. We still do use a thread for each socket being
watched, but instead of blocking in recv() (which of course was
plain stupid for sockets being liste()ed on), we block in
select(). The read method for sockets calls recv(). It is now
possible for the application to call accept(), recv() or send() in
the callback, just like on Unix. Tested with code kindly provided
by Andrew Lanoix.
Rename g_io_channel_win32_new_stream_socket() to
g_io_channel_win32_new_socket() as it isn't restricted to stream
sockets.
* gmain.c (g_poll): Related changes in the Win32 version of
g_poll(). When polling for messages, always do a PeekMessage()
first. We used to miss messages if several were posted between
calls to g_poll().
* giochannel.h: Improve Win32-related comments.
* gutf8.c: (Win32) Include <stdio.h> for sprintf.
* tests/gio-test.c: (Win32) Add tests for polling for Windows
messages.
* tests/makefile.mingw.in: Remove superfluous compilation command
line.
2001-01-17 Tor Lillqvist <tml@iki.fi>
* gwin32.c (g_win32_getlocale, g_win32_error_message): Add doc
comments.
(g_win32_get_package_installation_directory): Add one parameter,
the name of a DLL in the package. Add possibility to use that to
deduce the installation directory if not entered into the
Registry. Make the return value dynamically allocated.
(g_win32_get_package_installation_subdirectory): New convenience
function.
* gutils.c (GLIB_LOCALE_DIR)
* gwin32.h: Adapt accordingly.
* testglib.c (main): Adapt tests accordingly.
2001-01-17 Tor Lillqvist <tml@iki.fi>
* config.h.win32.in: Define ENABLE_NLS and GETTEXT_PACKAGE.
* makefile.mingw.in
* makefile.msc.in: Use the GNU intl library.
* gwin32.c (g_win32_get_package_installation_directory): New
function. To be used by various GLib-using packages to get their
installation directory, which should be stored in the Registry by
some installer.
* gwin32.h: Declare it.
* testglib.c (main): Test it.
* gutils.c: On Win32, define GLIB_LOCALE_DIR using
g_win32_get_package_installation_directory().
* glib.def: Update.
2001-01-06 Tor Lillqvist <tml@iki.fi>
* gconvert.c (g_locale_to_utf8, g_locale_from_utf8): Get len using
strlen() if arg is negative in the Win32 code, too.
* giowin32.c: Changes necessary to be able to run
mainloop-test. We can't close the fd that our (internal) reader
thread is sitting doing a blocking read() from. We must terminate
the thread first. Keep track of thread handle, and close it when
thread is dying. Start reader thread with the lower-level
CreateThread() instead of _beginthreadex() from the C runtime, in
order to be able to use TerminateThread(). Hopefuly this isn't
harmful.
* glib.def: Update.
* tests/makefile.{mingw,msc}.in (TESTS): Add mainloop-test and
unicode-encoding.
* tests/mainloop-test.c: Portability: <unistd.h>, need <fcntl.h>
on Win32.
* tests/unicode-encoding.c (process): Add missing "line" argument
to fail(). On Win32, convert UTF-16LE, as libiconv'c ivonf always
converts to UTF-16BE if we ask for unspecific UTF-16.
(main) Handle also '\r'.
Fri Jan 5 11:25:42 2001 Owen Taylor <otaylor@redhat.com>
* configure.in (PACKAGE): move $enable_debug down below
checks for GCC to avoid setting CFLAGS prematurely,
change checks to avoid adding -g twice.
* gutf8.c (g_ucs4_to_utf8): Support len < 0 to mean
0 termination.
* gutf8.c (g_utf8_to_ucs4): Terminate result with 0.
* tests/mainloop-test.c (main): Fix uses of
g_main_loop_destroy().
* tests/unicode-encoding.c tests/Makefile.am tests/utf8.txt:
Tests for unicode-conversion code.
* gconvert.c (g_convert, g_convert_with_fallback): work around
a couple of GNU libc bugs.
* gconvert.[ch] (g_{locale,filename}_{to,from}_utf8): Standardize
arguments to match g_convert(). Document.
* gunicode.[ch]:
- Implement conversion functions to and from UTF-16
- Standardize unicode conversion functions on prototype like
g_convert.
- Add a lot of error checking to unicode conversion functions.
* gunicode.[ch] (g_utf8_to_ucs4_fast): Add fast, non-checking
variant of g_utf8_to_ucs4.
* gutf8.c (g_utf8_validate):
- add g_return_if_fail (str != NULL).
- add checks for overlong strings, non-valid Unicode characters (>= 110000)
and single surrogates.
2001-01-05 Tor Lillqvist <tml@iki.fi>
* testglib.c (main): Add test for g_path_skip_root().
* gutils.c (g_path_skip_root): Fix bugs in code I just added ;-)
2000-12-24 Ali Abdin <aliabdin@aucegypt.edu>
* Makefile.am, gcompat.h, glib.h: New gcompat.h header file
as recommended by Havoc.
* gdate.c, gdate.h, testgdate.c,
docs/reference/glib/glib-sections.txt,
docs/reference/glib/tmpl/date.sgml, tests/date-test.c: Rename some
of the gdate functions to use the '_get' in their name. Patch
reviewed by Havoc.