Modified Files:
glib/ChangeLog glib/glib/giochannel.c
* glib/giochannel.c: Fixed a "sense of comparison" bug,
added an assert to check when g_io_channels_read_chars ()
is looping endlessly due to encoded_read_buf being corrupted.
2001-08-06 Sven Neumann <sven@gimp.org>
* glib/gutils.[ch]: added new function g_nullify_pointer().
* gobject/gobject.[ch]:
added new functions g_object_[add|remove]_weak_pointer().
Modified Files:
glib/ChangeLog glib/glib/giochannel.c glib/glib/giounix.c
* glib/giochannel.c: Replaced the local use_buf variable with a macro
in most places. This allows us to check some things without worrying
whether we have allocated the read buffers yet, and allows us to allocate
the buffers later in some cases.
* glib/giochannel.c: Introduced a MAX_CHAR_SIZE macro, which is
supposed to be greater than or equal to the length in bytes
of the longest character in any encoding. This is necessary
to get the minimum buffer size for successful writing.
* glib/giochannel.c: Fixed g_io_channel_set_encoding () so
that it just prints a warning if partial_write_buf isn't
empty instead of failing.
* glib/giochannel.c: Fixed several functions so they can accept
NULL parameters for pointers to return values.
* glib/giochannel.c: Altered the error handling for
g_io_channel_read_chars () to only return an error if
it doesn't have any buffered data.
* glib/giochannel.c: Rewrote g_io_channel_write_chars ()
to fix the error handling and remove duplicate sections
of code.
* glib/giounix.c: Fixed g_io_channel_new_file () to
call fstat () to set the is_seekable flag, in case someone
uses it on a FIFO.
2001-08-04 Alexander Larsson <alexl@redhat.com>
* win32-fixup.pl:
Hacky script to fix up your .msc.in files on windows.
Dunno if this is a good solution yet.
* build/win32/module.defs:
Back down libiconv version to 1.3, since that is what tor distributes.
* glib/glib.def:
Update
* gobject/makefile.msc.in:
build gobject-query.exe and gmarshal.strings, add libiconv dependency to linklines.
* gobject/marshal-genstrings.pl:
New file. perl script to generate gmarshal.strings.
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-08-03 Sven Neumann <sven@gimp.org>
* configure.in: beautified configure help output.
* glib/gtree.c: changed help for g_tree_insert(); it was misleading.
2001-08-01 Christopher James Lahey <clahey@ximian.com>
* glib/gutf8.c (g_utf8_find_prev_char): Made g_utf8_find_prev_char
able to return the first character of a string.
Modified Files:
glib/ChangeLog glib/glib/giochannel.h
* glib/giochannel.h: Committed this file, which is where
the changes in my previous changelog entry happened,
not giochannel.c
2001-07-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: #undef inline before testing whether it works to
avoid false positives. Patch from Garry R. Osgood
<grosgood@rcn.com>. Fixes bug #58272.
2001-07-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gmodule/gmodule.c (parse_libtool_archive): build the library
name ourselfs ... so we can load the library specified and not
mangle any name not beggining in 'lib'. Patch from Michael Meeks
<michael@ximian.com>.
* glib/giochannel.c: Matthias Classen's patch to give
g_io_channel_flush() the correct sense when testing
whether the buffer is empty
* glib/giounix.c: Matthias Classen's patch to set
the mode of a file created with g_io_channel_new_file()
Wed Jul 18 19:42:31 2001 Tim Janik <timj@gtk.org>
* gtype.h: if __GNUC__ is defined, inline a test for an exact type
match for instances and classes in G_TYPE_CHECK_INSTANCE_TYPE() and
G_TYPE_CHECK_CLASS_TYPE() before calling g_type_instance_is_a().
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
* glib/gscanner.c (g_scanner_msg_handler): by default, print scanner
errors and warnings to stderr.
2001-07-27 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gtypes.h: Use G_GNUC_EXTENSION instead of
__extension__. Patch from Pavel Roskin <proski@gnu.org>.
2001-07-26 Michael Natterer <mitch@convergence.de>
* gobject/glib-genmarshal.c: added a "release_check" to the
OutArgument structure, which, if present, gets integrated in the
marshaller code and protects us from stuff like
g_object_unref(NULL) on marshaller return values.
* glib/giochannel.c: fixed g_io_channel_seek_position() so that
G_SEEK_CUR works for UTF-8 channel encoding, and unallocated
converters are not flushed after the seek; fixed
g_io_channel_get_buffer_condition() so that G_IO_IN is only
set if the read buffer contains at least one full character
2001-07-22 Hans Breuer <hans@breuer.org>
* glib/giochannel.c (g_io_channel_get_buffer_condition) : make
the code actually have an effect (Use |= to set bits). Not
absolutely sure if is the right one.
* glib/giowin32.c (g_io_win32_<check|prepare>) : don't modify
watch->condition but restored the previous behaviour.
Now gio-test as well as The Gimp work again ...
2001-07-21 Hans Breuer <hans@breuer.org>
* glib/giowin32.c (g_io_channel_new_file) : set the
corresponding p(ermission)mode of the file when creating,
otherwise a wronly file couldn't be overwritten (at least
not on Win9x).
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.
2001-07-17 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gmain.c: Add some assertions. Simplify and fix
g_main_context_release(). Fix some locking bugs in
g_main_loop_run().
* glib/gmessages.c: Changed prototype of printf_string_upper_bound
to return gsize. Now matches the actual function body.
* glib/gstrfuncs.c (g_strrstr_len): Changed type of parameter #2
from gint to gssize. Now matches the prototype in gstrfuncs.h.
* .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.
Wed Jul 11 11:13:50 2001 Owen Taylor <otaylor@redhat.com>
* glib/Makefile.am (libglib_1_3_la_SOURCES): Add gunicomp.h
(Reported by Sven Neumann).
* glib/guniprop.c (g_utf8_str/updown) glib/gunicollate.c
(g_utf8_collate_key): Fix shadowing problems reported by
many (D. Adler, S. Neumann, M. Murmane, L. Peter)
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".
Sat Jun 30 23:14:32 2001 Tim Janik <timj@gtk.org>
* glib/glist.[hc]: added g_list_insert_before().
* glib/gslist.c (g_slist_insert_before): provide an implementation,
prototype was already present...
Sat Jun 30 11:07:00 2001 Tim Janik <timj@gtk.org>
* gobject.[hc]: provide weak_ref/weak_unref functions,
invoked from ->dispose. renamed ->shutdown() to ->dispose(),
provide "public" API entry here: g_object_run_dispose(), this
fucntion should _only_ be called from object system implementations
(e.g. gtkobject.c) if at all.
* gtypemodule.c (g_type_module_dispose): s/shutdown/dispose/
* gsignal.h: removed compat aliases.
* gobject.c (g_object_connect): support data objects.
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 16:03:16 2001 Owen Taylor <otaylor@redhat.com>
* glib/giowin32.c glib/giounix.c glib/gmain.[ch]:
Rename GSourceFuncs::destroy to GSourceFuncs::finalize.
(#56858)
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.