* 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.
Sat Jun 30 13:18:28 2001 Owen Taylor <otaylor@redhat.com>
* glib/gstrfuncs.c glib/gstring.h: Try compiling
before committing, why don't you? Simple fixes
for my stupid typos.
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.
Thu Jun 28 16:57:44 2001 Tim Janik <timj@gtk.org>
* configure.in (GLIB_MICRO_VERSION): up version number to 1.3.7,
interface age 0, binary age 0.
Thu Jun 28 16:42:49 2001 Tim Janik <timj@gtk.org>
* gsignal.c (g_signal_lookup):
(g_signal_list_ids): give elaborate warnings about invalid types,
non-instantiatable types and unloaded types that we can't operate on.
* gparam.[hc]: g_param_spec_pool_belongings() ->
g_param_spec_pool_list_owned().
* gsignal.[hc]: renamed:
g_signal_newc -> g_signal_new
g_signal_disconnect_by_func -> g_signal_handlers_disconnect_by_func
g_signal_block_by_func -> g_signal_handlers_block_by_func
g_signal_unblock_by_func -> g_signal_handlers_unblock_by_func
added GConnectType to simplify (..gboolean swapped, gboolean after)
args.
* gobject.[hc]: changed prototypes accordingly.
2001-06-27 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* Makefile.am, configure.in: Removed glib-config-2.0, as we have
pkg-config now.
* glib/Makefile.am: Added -I$(top_srcdir) for builddir != srcdir.
* Makefile.am: Removed gen-unicode-tables.pl from EXTRA_DIST.
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 **.
Thu Jun 14 14:09:46 2001 Owen Taylor <otaylor@redhat.com>
* gstrfuncs.c (g_strconcat): Fix a use of strcat that
wasn't replaced with g_stpcpy in the original
stpcpy-for-efficiency patch.
2001-06-11 Havoc Pennington <hp@redhat.com>
* NEWS: updated
* configure.in (GLIB_MICRO_VERSION): increment version to 1.3.6
2001-06-12 Havoc Pennington <hp@redhat.com>
* Makefile.am (glib-mkenums): don't put $(srcdir)/glib-mkenums in
bin_SCRIPTS, that breaks make install. Instead put 'glib-mkenums'
in bin_SCRIPTS and cp it into builddir
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-06-08 Havoc Pennington <hp@redhat.com>
* gspawn.c: support G_SPAWN_FILE_AND_ARGV_ZERO specifying that
the vector passed in to g_spawn_* contains a filename to
execute in argv[0] then the actual argv begins at argv + 1.
Kind of a lame hack, but this isn't something you commonly want
to do, and avoids adding more function arguments.
2001-06-07 Havoc Pennington <hp@redhat.com>
* m4macros/glib-2.0.m4: subst GLIB_GENMARSHAL, GOBJECT_QUERY,
GLIB_MKENUMS variables
* gmodule-2.0.pc.in: add gmodule_supported variable
* glib-2.0.pc.in: add glib_genmarshal, gobject_query,
glib_mkenums variables
* configure.in: put G_MODULE_SUPPORTED value into
.pc files
* autogen.sh: support AUTOGEN_SUBDIR_MODE
* Makefile.am: add -uninstalled.pc.in to EXTRA_DIST
2001-06-07 Havoc Pennington <hp@redhat.com>
* pango/Makefile.am: add libpango.la to _DEPENDENCIES for the
other libs
* configure.in: use AM_PATH_GLIB_2_0
* autogen.sh: support AUTOGEN_SUBDIR_MODE
* Makefile.am: dist the .pc.in files
2001-06-07 Havoc Pennington <hp@redhat.com>
* atk/Makefile.am: use @GLIB_GENMARSHAL@ so we can use uninstalled
glib-genmarshal
* configure.in: rearrange the library checks to support
uninstalled linking
* autogen.sh: add support for AUTOGEN_SUBDIR_MODE
* atk-uninstalled.pc.in: new file, allows linking to uninstalled
ATK in giant GTK tarball
2001-06-07 Havoc Pennington <hp@redhat.com>
* tests/Makefile.am: add missing -I flag
* gtk/Makefile.am: use @GLIB_MKENUMS@, @GLIB_GENMARSHAL@, etc.
* configure.in: use pkg-config to see if GModule is
supported; fix to properly turn on included loaders
when GModule isn't supported; don't use AC_CHECK_LIB
when libs are not installed yet
* autogen.sh: add support for AUTOGEN_SUBDIR_MODE
* Makefile.am (SUBDIRS): add m4macros subdir
* gtk/Makefile.am: $(srcdir)/foo targets must be $(srcdir)/foo in
dependencies also.
2001-06-07 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Look for nanosleep function.
* gtimer.c: Use nanosleep for g_usleep, when found.
* gtimer.c, gtimer.h: Add g_time_val_add function. Closes#54271.
* gasyncqueue.c: Documentation updates.
* gthreadpool.c: Use g_time_val_add now that we have it.
* glib/glib-sections.txt, glib/tmpl/date.sgml: Add g_time_val_add.
* glib/tmpl/threads.sgml: Updated.
2001-06-01 Jon Trowbridge <trow@gnu.org>
* gdate.c (g_date_update_julian): Changed to take a const
argument, and then to cast out const.
(g_date_update_dmy): Changed to take a const argument, and then
cast out const.
(g_date_get_weekday): Changed argument to be const.
(g_date_get_month): Changed argument to be const.
(g_date_get_year): Changed argument to be const.
(g_date_get_day): Changed argument to be const.
(g_date_get_julian): Changed argument to be const.
(g_date_get_day_of_year): Changed argument to be const.
(g_date_get_monday_week_of_year): Changed argument to be const.
(g_date_get_sunday_week_of_year): Changed argument to be const.
(g_date_compare): Changed arguments to be const.
(g_date_to_struct_tm): Changed GDate argument to be const.
(g_date_strftime): Changed GDate argument to be const.
(g_date_clamp): Added. The equivalent of the CLAMP macro for
GDates.
(g_date_order): Added. Ensure that the first GDate argument
preceeds the second, swapping them if necessary.
(g_date_days_between): Added. Computes the (signed) number of days
between two dates.
Mon Jun 4 16:02:57 2001 Owen Taylor <otaylor@redhat.com>
* gstrfuncs.c (g_strup/strdown): to match g_strcasecmp,
check if it is lower/upper before converting to upper/lower
[ not required by ISO... ] (#55682, Jon Trowbridge)
Mon Jun 4 15:59:15 2001 Owen Taylor <otaylor@redhat.com>
* gunicode.h: Make a bit more standalone by adding include
of gerror.h. #54543.
* gunicode.h: Change size_t to g_size. (Ugh)
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-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Remove G_HAVE_ISO_CXX_VARARGS and
G_HAVE_ISO_C_VARARGS and define G_HAVE_ISO_VARARGS directly
guarded by #if(n)def __cplusplus.
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.
2001-05-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Don't bail out, if no C++ compiler is
found. Define G_HAVE_ISO_VARARGS only if appropriate.
* gmessages.h: Thus we can revert the previous patch.
2001-05-29 James Henstridge <james@daa.com.au>
* gmessages.h: "#ifdef G_HAVE_ISO_VARARGS" will always succeed
even when we don't have ISO vararg support. Changed to
"#if G_HAVE_ISO_VARARGS".
2001-05-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Fix typo.
* gobject/Makefile.am (EXTRA_DIST): Really distribute
glib-mkenums, now that bin_SCRIPTS doesn't seem to care about
doing so anymore.
Sun May 27 05:09:18 2001 Tim Janik <timj@gtk.org>
* gmain.c (g_main_context_prepare): unlock context when bailing
out with a warning.
(g_main_context_check): same here.
* gmain.c (g_main_context_check): before returning due to
changed pollfds, unlock context.
Sun May 27 04:52:28 2001 Tim Janik <timj@gtk.org>
* gsignal.[hc] (g_signal_stop_emission_by_name): added variant
to stop signal emissions through a detailed_signal string.
* gsignal.c (signal_emit_R) (g_signal_emit_valist): account for
the fact that g_value_* functions may cause signal emissons by
unlocking the global signal system lock around g_value_* functions.
(signal_emit_unlocked_R): renamed this from signal_emit_R() to reflect
that this functions acquires the lock on its own now.
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-24 Hans Breuer <hans@breuer.org>
* grel.c : reflect renaming of g_string_sprintfa to g_string_printfa
* makefile.msc.in : create an additional static lib to be used from
(at least) glib-genmarshal
2001-05-23 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* garray.c (g_array_remove_index_fast): Tiny speed improvement
suggested by noon@users.sourceforge.net.
* glib/tmpl/arrays.sgml, glib/tmpl/arrays_pointers.sgml,
glib/tmpl/arrays_byte.sgml: Corrected documentation for the
..._sized_new functions. Discovered by noon@users.sourceforge.net.
2001-05-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* config.h.win32.in: Removed POSIX_*. Defined G_THREAD_SOURCE to
"gthread-win32.c".
* glibconfig.h.win32.in: Define G_HAVE_ISO_VARARGS for gcc, don't
know about MSC. Define G_THREADS_IMPL_WIN32 instead of
G_THREADS_IMPL_POSIX and define the right static mutex macros and
types.
* build/win32/make.mingw (CXX): Removed PTHREAD defs. Added
-O2 -Wall to compile flags.
* gthread/gthread-impl.c (g_thread_init): Move the thread
implementation initialization to before assigning
GThreadFuncs, which now is just struct assigned and not
memcpy'ed. Completed check for zero members of GThreadFuncs.
* gthread/makefile.mingw: Don't link to pthread anymore.
* gthread/gthread-win32.c: New file for native thread support for
win32. Thanks to Hans Breuer <hans@breuer.org> to got me
kickstarted.
* gthread/Makefile.am: Also distribute gthread-win32.c.
2001-05-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.def: g_thread_create renamed to g_thread_create_full.
* gthread.c: memcpy is not necessary here. We can simply use
struct assignment.
* gmessages.c: Fix compilation error on win32. Added
GFileDescriptor, wich is gint on Unix and FILE* on win32.
Fri May 18 10:52:23 2001 Owen Taylor <otaylor@redhat.com>
* configure.in gmessages.h: Use compile checks for ISO C99 and GNU
extension varargs macros syntax and store result in glibconfig.h
(G_HAVE_ISO_VARARGS, G_HAVE_GNUC_VARARGS) rather than relying
on checking predefined macros.
2001-05-18 Michael Natterer <mitch@convergence.de>
* gmarkup.c: don't g_strdup()/g_free() all parsed attributes and
their values twice but simply copy the string pointers from the
GMarkupAttribute struct to the string arrays before passing them
to start_element().
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-15 Havoc Pennington <hp@redhat.com>
* configure.in (AC_OUTPUT): m4macros/Makefile
* m4macros/Makefile.am, m4macros/glib-2.0.m4,
m4macros/glib-gettext.m4:
m4 files moved here on server, Makefile.am added
This is so you can aclocal -I m4macros while avoiding acinclude.m4
* Makefile.am: add m4macros subdir, remove references to glib-2.0.m4
2001-05-14 Havoc Pennington <hp@redhat.com>
* gutf8.c (g_utf8_get_char): fix docs; they said we validated
the UTF-8, but we can't possibly detect partial chars since
there's no length arg here, so trying to use this function
on invalid UTF-8 is a bad idea.
Thu May 10 23:21:30 2001 Owen Taylor <otaylor@redhat.com>
* gmessages.c (g_log_write_prefix): Avoid using stderr
to be as robust as possible in out-of-memory.
* gmessages.c (g_log_default_handler): Remove some dead
code.
* gutils.c (g_parse_debug_string): Fix to avoid mallocs.
Fri May 11 18:25:23 2001 Tim Janik <timj@gtk.org>
* gdataset.c:
(g_dataset_foreach):
(g_datalist_foreach): make these safe against removal of the
current element.
Thu May 10 15:19:01 2001 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_key_hash): use g_str_hash() algorithm
to generate hashes.
* gmem.c (standard_calloc): free() doesn't return a value
(Mark Murnane).
Thu May 10 14:00:48 2001 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: removed g_param_spec_stringc() in lack of
evidence of public need.
* gsignal.h: added g_signal_disconnect_by_func(),
g_signal_block_by_func() and g_signal_unblock_by_func() convenience
macros as per owen's request.
* gtype.c (SIZEOF_FUNDAMENTAL_INFO): align sizeof (GTypeFundamentalInfo)
to size of longs and pointers.
2001-04-26 Havoc Pennington <hp@redhat.com>
* configure.in: Get rid of --enable-msg-prefix
* gmessages.c: make whether to prefix the messages with
appname/pid a runtime setting, not a compile-time setting. Change
default to include prefix for debug/warning/error type messages.
2001-05-09 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthread.c, gthread.h: Renamed 'value' and 'arg' to 'data' and
'thread_func' to 'func' to make it more consistent with the rest
of GLib.
* gthreadpool.c, gthreadpool.h: Moved 'stack_size' from the public
members of GThreadPool to the private ones. Renamed 'thread_func'
to 'func' as above. Moved up 'user_data' in g_thead_pool_new
argument list and in GThreadPool struct.
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.
2001-01-06 Hans Breuer <hans@breuer.org>
* glib.def : don't try to export g_strcpy, it is g_stpcpy;
updated and added some tweaking for functions which got
renamed recently, to avoid the update hassle if it can
simply be done compatible. Should vanish if there is a
stable version for win32.
Fri May 4 11:49:18 2001 Owen Taylor <otaylor@redhat.com>
* Released 1.3.5
* NEWS: Updated
* configure.in (GLIB_MICRO_VERSION): Up version to 1.3.5,
interface/binary age 0.
2001-05-04 Sven Neumann <sven@convergence.de>
* ghash.c: fixed a typo in a comment.
* gtree.[ch]: added new functions g_tree_new_full(), g_tree_replace(),
g_tree_steal() and g_tree_foreach() to adapt GTree to the GHashTable
API. Moved comments into the C file.
* docs/reference/glib/glib-sections.txt
* docs/reference/glib/tmpl/glib-unused.sgml
* docs/reference/glib/tmpl/hash_tables.sgml
* docs/reference/glib/tmpl/linked_lists_double.sgml
* docs/reference/glib/tmpl/linked_lists_single.sgml
* docs/reference/glib/tmpl/macros_misc.sgml
* docs/reference/glib/tmpl/trees-binary.sgml: updated documentation
Thu May 3 06:38:28 2001 Owen Taylor <otaylor@redhat.com>
* g[s]list.c (g_[s]list_foreach) docs/Changes-2.0.txt: Make
foreach() safe against removal of the _current_ element. While
this could break some code, the new behavior is consistent with
the rest of GLib/GTK+ and probably is what people expect in most
cases. (Suggested by Paul Kuykendall, #50071)
Wed May 2 11:10:22 2001 Owen Taylor <otaylor@redhat.com>
* gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string.
(#50404, fix from Jonas Borgström)
Sun Apr 29 00:37:34 2001 Tim Janik <timj@gtk.org>
* ghook.[hc]: made hook ids a gulong.
Sat Apr 28 23:39:42 2001 Tim Janik <timj@gtk.org>
* gsignal.[hc]: made signal handler and emission hook ids gulongs.
(signal_handlers_foreach_matched_R): only invoke callback for handlers
that are not disconnected (id>0).
(signal_emit_R): prevent invocation of signal handlers during the
emission they were connected within.
* glib-mkenums: publically installed perl-script to parse C code
enums and generate descriptions thereof.
* glib-mkenums.1: assorted man page.
* 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.
2001-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
g_hash_table_thaw. Instead added G_DISABLE_DEPRECATED-guarded
macros to ghash.h to go along the lines of the standard.
* gscanner.c, gscanner.h: Dito for g_scanner_freeze_symbol_table
and g_scanner_thaw_symbol_table.
* gutils.c, gutils.h: Dito for g_dirname. g_basename is still
defined in gutils.c, but declared ing gutils.h only
G_DISABLE_DEPRECATED-guarded.
2001-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Removed bashism in test for the pkg-config
version.
* configure.in: Rewrote test for multithread flag. Now uses
localtime_r, which hopefully has a consistent prototype across
different platforms. Also it uses a clever double EGREP trick
instead of compiling, which could give false positives. Thanks to
Dan Winship <danw@ximian.com> for the hint.
Wed Apr 18 09:37:07 2001 Owen Taylor <otaylor@redhat.com>
* MAINTAINERS: Removed. Keeping README, README.cvs-commits
HACKING, and AUTHORS up to date is plenty without extra
random files that someone thought a module should have.
(Actually, I believe this was used for debbugs in the past.)
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.
2001-04-17 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthreadpool.c (g_thread_pool_thread_proxy): Until now every
thread pool always had at least one tread waiting to avoid
switching overhead in case a new task would be added soon after
one finished. This however means a big waste of threads, if many
mostly inactive thread pools are involved. Now such a waiting
thread will only wait for half a second (This value is of course
very randomly picked) and go to the global threadpool afterwards.
MCVS: ----------------------------------------------------------------------
Mon Apr 16 12:04:52 2001 Owen Taylor <otaylor@redhat.com>
* configure.in: Remove warnings about conflicts with the
stable version.
* glib-2.0.m4: Fix some of the error text to be halfway
up to date.
* README.in INSTALL.in: Add these to generate README, INSTAL
(as in the stable branch). Update.
* HACKING: Update.
2001-04-11 Alexander Larsson <alexl@redhat.com>
* glib-2.0.m4: Pass pkg-config options
before the other args so it works even if
POSIXLY_CORRECT is set.
Mon Apr 9 18:57:44 2001 Tim Janik <timj@gtk.org>
* configure.in: increment version to 1.3.4 (binary 0, interface 0).
Mon Apr 9 18:56:15 2001 Tim Janik <timj@gtk.org>
* gclosure.c (g_closure_invoke): only require marshal/meta_marshal if
we're valid (about to actually do marshalling).
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.
Tue Apr 3 13:46:22 2001 Tim Janik <timj@gtk.org>
* glist.[hc]: added g_list_nth_prev() which walks ->prev instead
of ->next.
* gpattern.[hc]: added shell-style pattern matching code from beast,
derived from the gtk_pattern_*() code, but with a couple of bug fixes
and a number of optimizations.
Tue Apr 3 14:06:00 2001 Tim Janik <timj@gtk.org>
* gparam.[hc]: added g_param_spec_pool_list() to list pspecs per
owner_type. the pspecs are not referenced, so the caller is
supposed to have some idea about owner_type not randomly
nuking his pspec's. if this is going to provide problems in
the future, we can either auto-ref the pspecs, or add a
_foreach variant, though the latter would have to invoke
the callback while pspec's mutex is acquired, so i just
went for the _list variant for now.
* gclosure.h (G_CALLBACK): made GCallback a void (*) (void) fucntion.
2001-04-03 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthreadpool.c: Added documentation.
* gthreadpool.c: The global thread pool now also is seperated for
bound and unbound threads. Only threads with standard stack size
go to the global pool. g_thread_pool_new now protects the global
setup of inform_mutex etc. with a lock. Fixed some typos. Unlock
the queue after g_thread_pool_wakeup_and_stop_all in the proxy.
2001-04-02 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gmain.c: Use the new GRealThread member "context" instead of a
GStaticPrivate to store the thread specific main loop context.
* gthread.c: Added "context" member to GRealThread and updated
g_thread_create, g_thread_self and g_thread_cleanup accordingly.
* gthread.c, gthread.h: Removed the functions
g_static_private_(get|set)_for_thread and adapted
g_static_private_(get|set) and g_static_private_free accordingly.
2001-03-30 Sven Neumann <sven@gimp.org>
* ghash.[ch]
* docs/reference/glib/tmpl/hash_tables.sgml: added new functions
g_hash_table_new_full, g_hash_table_replace, g_hash_table_steal and
g_hash_table_foreach_steal. Moved most docs out of the template
file into the C file. Please proofread the new documentation.
Wed Mar 14 18:46:54 2001 Tim Janik <timj@gtk.org>
* gscanner.[hc]: removed archaic gpointer derived_data; relict and
added a GData member instead.
* glist.[hc]: added g_list_remove_all().
* gslist.[hc]: added g_slist_remove_all().
Sat Mar 17 23:18:36 2001 Tim Janik <timj@gtk.org>
* gobject.c (g_object_get_property): minor bug-fix.
* gbsearcharray.[hc]: provide a macro for static initialization and
functions g_bsearch_array_new() and g_bsearch_array_destroy() for
dynamic allocations.
* gboxed.c: introduce G_TYPE_GSTRING, boxed type for GString.
* gclosure.[hc]: naming corrections.
Fri Mar 9 16:42:08 2001 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: moved g_strdup_value_contents() into this file as
a public function (was static in gobject.c before). it's a bit odd
to have that function here, especially since it requires extra includes,
but then it doesn't very well fit somewhere else either.
* gparamspecs.c: added default/max/min checks to param spec creation
functions.
2001-03-13 Tor Lillqvist <tml@iki.fi>
From Edward M. Lee <tailbert@yahoo.com>:
* gdate.c (g_date_set_parse): add support for dates that in the
form "Wed Mar 14 2001". Running testgdate on cygwin requires this.
2001-03-13 Tor Lillqvist <tml@iki.fi>
From Edward M. Lee <tailbert@yahoo.com>:
* gmodule-win32.c (_g_module_build_path): use (cygwin friendly) dir
separator.
Fri Mar 9 18:01:43 2001 Tim Janik <timj@gtk.org>
* gscanner.[hc]: made config arg to g_scanner_new() const.
Fri Mar 9 16:42:08 2001 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: moved g_strdup_value_contents() into this file as
a public function (was static in gobject.c before). it's a bit odd
to have that function here, especially since it requires extra includes,
but then it doesn't very well fit somewhere else either.
* gparamspecs.c: added default/max/min checks to param spec creation
functions.
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.
* 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.
Thu Mar 8 16:23:34 2001 Tim Janik <timj@gtk.org>
* ghook.[hc]: destruction cleanup. there's one
->finalize_hook member in the hooklist now that gets
called when a hook should be destroyed, that's it.
that function is guarranteed to be called only when
all ref_counts to the hook vanished, thus also when
the hook is not in call.
Thu Mar 8 16:35:48 2001 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: s/g_param_spec_string_c/g_param_spec_stringc/.
* gsignal.[hc]: fixed accumulator invocation, implemented emission
hooks. and no, neither of these callbacks are called via a closure,
language bindings can wrap the accumulator and emission hook
interface, they already get parameters marshalled into a GValue array.
(g_signal_connect): removed this function as its C specific, doesn't
cover the swapped argument, is too close to its broken original
gtk_signal_connect() and creates demand for _swapped, _after and
_swapped_after variants <brrr>.
(g_signal_connectc): convenience macro to connect a C handler
func with data, like the old g_signal_connect() plus swapped
argument.
* gtype.h:
* gboxed.c: added G_TYPE_VALUE boxed type.
Wed Mar 7 09:36:33 2001 Tim Janik <timj@gtk.org>
* gboxed.[hc]: changed prototype of g_boxed_type_register_static()
to contain an optional init function and a hint at whether the
boxed structure uses ref counting internally.
added g_value_set_boxed_take_ownership().
made G_TYPE_BOXED an abstract value type.
* genums.[hc]: made G_TYPE_ENUM and G_TYPE_FLAGS abstract value
types.
* glib-genmarshal.c: argument type changes, preparation for third-party
arg specification.
* gobject.[hc]: cleaned up get/set property code.
added g_strdup_value_contents() to improve warnings.
* gparam.[hc]: added g_param_value_convert(), taking over responsibility
of the old g_value_convert(). added G_PARAM_LAX_VALIDATION flag so
validation alterations may be valid a part of the property setting
process.
* gparamspecs.[hc]: made value comparisons stable (for sort applications).
added GParamSpecValueArray, a param spec for value arrays and
GParamSpecClosure. nuked the value exchange functions and
GParamSpecCCallback.
* gtype.[hc]: catch unintialized usages of the type system with
g_return_val_if_uninitialized(). introduced G_TYPE_FLAG_VALUE_ABSTRACT
to flag types that introduce a value table, but can't be used for
g_value_init(). cleaned up reserved type ids.
* gvalue.[hc]: code cleanups and saner checking.
nuked the value exchange API. implemented value transformations, we
can't really "convert" values, rather transforms are an anylogy to
C casts, real conversions need a param spec for validation, which is
why g_param_value_convert() does real conversions now.
* gvaluearray.[hc]: new files that implement a GValueArray, a struct
that can hold inhomogeneous arrays of value (to that extend that it
also allowes undefined values, i.e. G_VALUE_TYPE(value)==0).
this is exposed to the type system as a boxed type.
* gvaluetransform.c: new file implementing most of the former value
exchange functions as single-sided transformations.
* gvaluetypes.[hc]: nuked G_TYPE_CCALLBACK, added
g_value_set_string_take_ownership().
* *.h: s/G_IS_VALUE_/G_VALUE_HOLDS_/.
* *.[hc]: many fixes and cleanups.
* many warning improvements.
Tue Feb 27 18:35:15 2001 Tim Janik <timj@gtk.org>
* gobject.c (g_object_get_valist): urg, pass G_VALUE_NOCOPY_CONTENTS
into G_VALUE_LCOPY(), this needs proper documenting.
* gparam.c: fixed G_PARAM_USER_MASK.
* gtype.c (type_data_make_W):
(type_data_last_unref_Wm): fixed invalid memory freeing.
* gobject.c (g_object_last_unref): destroy signal handlers associated
with object, right before finalization.
* gsignal.c (g_signal_parse_name): catch destroyed nodes or signals
that don't actually support details.
* gobject.[hc]: got rid of property trailers. nuked GObject
properties "data" and the "signal" variants.
(g_object_connect): new convenience function to do multiple
signal connections at once.
(g_object_disconnect): likewise, for disconnections.
* gparam.[hc] (g_param_spec_pool_lookup): took out trailer support.
* gvalue.[hc]: marked g_value_fits_pointer() and g_value_peek_pointer()
as private (the latter got renamed from g_value_get_as_pointer()).
Wed Mar 7 09:32:06 2001 Tim Janik <timj@gtk.org>
* glib-object.h: add gvaluearray.h.
* gstring.[hc]: fixup naming of g_string_sprint*.
* gtypes.h: fixed GCompareDataFunc naming.
Wed Mar 7 09:33:27 2001 Tim Janik <timj@gtk.org>
* gobject/Makefile.am: shuffled rules to avoid excessive
rebuilds.
* gobject/gobject-sections.txt: updates.
* gobject/tmpl/*: bunch of updates, added another patch
from Eric Lemings <eric.b.lemings@lmco.com>.
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-23 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthread.h (struct _GThread): Change the order to match the order
in g_thread_create().
* gthread.c (g_static_rec_mutex_lock_full): Also do the right
thing (behave like 'depth' calls to g_static_rec_mutex_lock) for a
mutex, that is already locked.
* glib/tmpl/threads.sgml: Big update. Almost ready.
* glib/tmpl/async_queues.sgml: Typo.
* glib/glib-sections.txt: Added g_static_rec_mutex_init,
g_static_rec_mutex_free, g_static_rw_lock_init,
g_static_private_init and g_static_private_free.
* glib/glib-overrides.txt: Added g_thread_yield and g_thread_exit.
Thu Feb 22 10:31:36 2001 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_remove_poll): Add missing implementation
ofsource->priority, g_source_remove_poll. (Pointed out by Stefan Westerfeld)
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.
Mon Feb 19 07:32:38 2001 Tim Janik <timj@gtk.org>
* glib-config-2.0.in (lib_glib): my name is glib-config-2.0!
don't exit with errorcode!=0 for --help or -h.
* Makefile.am:
* configure.in: build glib-config-2.0.
Sat Feb 17 07:26:33 2001 Tim Janik <timj@gtk.org>
* configure.in (G_MODULE_HAVE_DLERROR): add check for broken RTLD_GLOBAL
(on OSF1 V5.0).
Sat Feb 17 07:27:15 2001 Tim Janik <timj@gtk.org>
* gmodule.c: work around platforms that have broken RTLD_GLOBAL.
2001-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* acconfig.h, configure.in: Reverted the changes necessary to
enlarge the system thread for G_THREAD_USE_PID_SURROGATE.
* gthread.c: Now implement G_THREAD_USE_PID_SURROGATE in gthread.c
instead of gthread/gthread-posix.c. While the latter has the
advantage, that it is conceptually cleaner, it makes
g_thread_self_posix_impl _very_ slow and that hurts
GStaticRecMutex and other things. So the new version is less
clean, but faster.
* gthread-posix.c: Removed the G_THREAD_USE_PID_SURROGATE
implementation, which is now in gthread.c.
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-10 Tor Lillqvist <tml@iki.fi>
* gtypes.h
* gutils.h: Move GLIB_VAR definition from gutils.h to gtypes.h
* glib.def
* gmem.h: Mark glib_mem_profiler_table for export.
2001-02-04 Tor Lillqvist <tml@iki.fi>
* gwin32.c (g_win32_getlocale): Use "nn" for Nynorsk, as nn.po
files are appearing now. If the sublanguage starts with '@', don't
use a '_' separator. South Africa is 'ZA', not 'SA'.
Sun Feb 4 07:38:32 2001 Tim Janik <timj@gtk.org>
* docs/debugging.txt: s/glib_trap_/g_trap_/. add comments on
g_trap_instance_signals, g_trace_instance_signals and
GRUNTIME_DEBUG.
* gmem.c: s/glib_trap_/g_trap_/.
Sun Feb 4 07:30:53 2001 Tim Janik <timj@gtk.org>
* gtype.[hc]: changed g_type_init() to take debugging flags
initially, a combination of G_TYPE_DEBUG_OBJECTS and
G_TYPE_DEBUG_SIGNALS. using the G_TYPE_ prefix is a bit odd
here, but basically g_type_int() serves as initialization
fucntion for all of GType, GObject, GSignal, so what the heck.
* gobject.c: special case debugging code properly.
changed glib_trap_object_ref to g_trap_object_ref.
* gsignal.c: add signal emission debugging abilities, along with
a new trap object g_trap_instance_signals.
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-02-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthread.c, gthread.h: Added g_static_mutex_init to allow
initialization of a GStaticMutex, that can not be initialized with
G_STATIC_MUTEX_INIT, for example in allocated structures.
* glib/tmpl/threads.sgml, glib/glib-sections.txt: Added
documentation for g_static_mutex_init().
WCVS: ----------------------------------------------------------------------
2001-01-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthread/gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init(), as g_thread_init won't call it.
* glib/glib-sections.txt, glib/tmpl/threads.sgml: Added
g_static_mutex_free
* gthread.c, gthread.h: Added g_static_mutex_free to allow using
GStaticMutexes with limited lifetime without leaking.
* configure.in: GStaticMutex doesn't have to provide extra space
for debugging information for G_ERRORCHECK_MUTEXES, as then the
non-default implementation (runtime_mutex) is used anyway.
2001-01-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthread.h (g_cond_wait): Added debug information for
g_mutex_free calls, if G_ERRORCHECK_MUTEXES is defined.
* gthread/gthread-impl.c (g_mutex_free_errorcheck_impl): Fixed it for
real. Sorry for this mess. It looked like a real obvious fix, so I
didn't check. Bad boy. Added some casts to quiet the compiler.
2001-01-29 Tor Lillqvist <tml@iki.fi>
* glibconfig.h.win32.in: Use the same GMutex structure as the
configure-generated glibconfig.h does.
* gstrfuncs.c (g_strsignal): Declare strsignal() on Cygwin, too,
says jbdoll@kepri.re.kr.
2001-01-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthread.c: Broadcast the condition, if there are waiting
readers, as all might read at the same time. Only signal the
writer thread, if there are no more readers.
* gthread/gthread-impl.c (g_mutex_free_errorcheck_impl): Add
new check to errorcheck mutexes to abort, if a locked mutex is freed.
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-20 Tor Lillqvist <tml@iki.fi>
* gutils.c (g_get_codeset): (Win32) Even if g_get_codeset() is
currently commented out from gutils.h, fix it to return the same
CP%d value as g_get_charset().
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.
Tue Jan 16 23:20:38 2001 Owen Taylor <otaylor@redhat.com>
* gutils.c glibintl.h: Optimize for size rather than speed by
making _() always call _glib_gettext() instead of conditionally
calling gettext() or _glib_gettext_init. glib only uses translated
strings in slow error handling code anyways.
* glibintl.h: g'ify types.
* Makefile.am: include glibintl.h in _SOURCES
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.
Mon Jan 15 21:12:49 2001 Owen Taylor <otaylor@redhat.com>
* configure.in acconfig.h glibintl.h gutils.c
po/{Makefile.in.in,POTFILES.in,po2tbl.in}: Add gettext
support.
* glib-gettext.m4 acinclude.m4: Clean up the GTK+ gettext macros
some more and put them in this file, though they also need
to be included in acinclude.m4 due to the brokeness of
aclocal.
* gspawn.c gspawn-win32.c gutf8.c gconvert.c gfileutils.c
gshell.c: Remove dummy _() #defines, include glibintl.m4.
2001-01-09 Tor Lillqvist <tml@iki.fi>
* giowin32.c (create_reader_thread): Rework the changes to
needed to pass mainloop-test. Now we don't need to call
TerminateThread() after all, which is a relief, as the docs
have a BIG RED WARNING SIGN about using that API. Instead,
when closing a fd channel that has a reader thread running,
just mark it as non-running and additionally mark the fd as
ripe for closing. When the reader thread hopefully eventually
gets something (and EOF or some actual data), it will note
that it shouldn't be running, break out of the loop, and close
the fd.
The socket channel closing code should probably be changed
similarily, but that will have to wait until I have a test case.
(g_pipe_readable_msg, g_io_channel_win32_new_pipe,
g_io_channel_win32_new_pipe_with_wakeups,
g_io_channel_win32_pipe_request_wakeups,
g_io_channel_win32_pipe_readable): Remove these, have been
obsolete for some time.
* glib.def: Update.
2001-01-09 Tor Lillqvist <tml@iki.fi>
* gutils.c (g_basename, g_dirname): Don't warn about deprecation
on Win32. Code written for GLib 1.2 doesn't have much choice but
to use GLib >= 1.3 on Win32.
* glib.def: Update.
2001-01-09 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gmem.c: Made g_profile_mutex a GMutex* instead of
G_LOCK_DEFINE_STATIC to avoid deadlock for thread implementations
without native static mutexes. Contruct g_profile_mutex in
g_mem_init().
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 ;-)
2001-01-05 Tor Lillqvist <tml@iki.fi>
* gfileutils.c (g_file_open_tmp): (Win32:) Look also for (illegal)
forward slashes in the template.
* gutils.c (g_path_skip_root): On Win32, skip the \\server\share
part of UNC paths. On all platforms, skip several initial
slashes. Add a few comments.
(g_get_any_init): On Win32, in case HOME is Unix-style with
(forward) slashes (some other applications apparently set it up
this way, convert to backslashed form.
* configure.in (glib_os): Remove stray 'v'. Add case for mingw,
although using configure for mingw surely doesn't work yet.
* glib.def: Update.
Wed Jan 3 14:10:49 2001 Owen Taylor <otaylor@redhat.com>
* gmain.[ch]: Switch GMainLoop to be ref/unref, use to
make dropping reference to running loop safe.
Wed Dec 13 20:41:49 2000 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_unref_internal): Unref callback->cb_data
if it was still set when the source is freed. (Usually, this
will be done by g_source_destroy.)
* garray.h (g_array_append_val, g_array_prepend_val,
g_array_insert_val): Use parentheses around an argument to make
these cause an error if you pass a non-lvalue for the value,
rather than silently doing the wrong thing.
Fri Dec 29 14:53:18 2000 Tim Janik <timj@gtk.org>
* configure.in: we can't grow _cv_ variables by using a backticked
expr that refers back to the variable (glib_cv_sizeof_system_thread for
G_THREAD_USE_PID_SURROGATE), that'd keep the variable growing every time
it's evaluated. quantum states, anyone?)
Thu Dec 28 10:21:46 2000 Tim Janik <timj@gtk.org>
* gmem.[hc]: got rid of outdated dmalloc support. provide g_try_malloc()
and g_try_realloc() which _may_ fail and return NULL.
nuked g_mem_check(), provided GMemVTable for memory function
virtualization, alterable at program startup with g_mem_set_vtable().
provided glib_mem_profiler_table and g_mem_profile() to support limited
profiling information out of the box (uses mprotect() for free()ed areas
on linux).
provide globally visible G_MEM_ALIGN.
buncha cleanups.
* docs/macros.txt: file to get a clue about the various configuration
macros.
* docs/debugging.txt: explain debugging traps.
* configure.in: got rid of --enable-mem-check and --enable-mem-profile,
define GLIB_SIZEOF_VOID_P and GLIB_SIZEOF_LONG. check malloc prototypes
and define SANE_MALLOC_PROTOS is we can use them.
<boy, is this file a mess>
* gutils.c, gscanner.c: fix up compatibility warnings, use g_message().
Thu Dec 28 11:36:44 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.c (upper_power2): disable G_BSEARCH_ALIGN_POWER2
fucntionality if DISABLE_MEM_POOLS is defined.
* gtype.c: honour DISABLE_MEM_POOLS.
* gsignal.c (g_signal_init): flag signal key bsearch array with
G_BSEARCH_ALIGN_POWER2 to avoid excessive growth time. honour
DISABLE_MEM_POOLS.
* gparam.h: added G_PARAM_READWRITE alias for (G_PARAM_READABLE |
G_PARAM_WRITABLE).
2000-12-25 Tor Lillqvist <tml@iki.fi>
* gmessages.c: (Win32) Use a MessageBox for fatal
messages. Collect eror message into a buffer, and display that.
* glib.def: Update.
* glibconfig.h.win32.in: Update. Remove unused wchar and wctype
macros, add G_MODULE_SUFFIX.
2000-12-24 Ali Abdin <aliabdin@aucegypt.edu>
* Makefile.am, gcompat.h, glib.h: New gcompat.h header file
as recommended by Havoc.
* gdate.c, gdate.h, testgdate.c,
docs/reference/glib/glib-sections.txt,
docs/reference/glib/tmpl/date.sgml, tests/date-test.c: Rename some
of the gdate functions to use the '_get' in their name. Patch
reviewed by Havoc.
2000-12-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Determine the suffix of the shared librarries for
this system. This is done analogous to
ltconfig.sh. G_MODULE_SUFFIX in glibconfig.h is set to either
"sl", "dll", or (most often) "so".
* tests/Makefile.am, tests/module-test.c,
tests/libmoduletestplugin_a.c, tests/libmoduletestplugin_b.c:
Added new testcase for gmodule. This is mostly copied from
gmodule/testgmodule.c, but unlike that is is quiet. (Why BTW are
some tests that verbose, not to say loquacious...)
* gmodule.c: Make g_module_open more tolerant wrt to the module
name. First it tries to open the module as named, if that fails,
it checks, whether it is a libtool archive and parses it, if that
fails it appends the systems shared library suffix
(i.e. ".so") (if not already found) and tries again and if that
fails it tries to append the ".la" libtool suffix (if not already
found) and parses it.
* gmodule.c: Lock recursive mutex during most module functions for
safety.
* gmodule-dl.c: Return an error from _g_module_symbol only, if
dlerror says so. All other functions return an error as well, if
dlerror returns NULL.
* testgmodule.c: Thanks to the above change the #ifdefs have
vanished.
* glib/glib-sections.txt: Added G_MODULE_SUFFIX.
* glib/tmpl/modules.sgml: Updated.
2000-12-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* grand.c: Updated G_RAND_DOUBLE_TRANSFORM to be more
accurate. Redid g_rand_double() such that it returns 52 bits after
the point instead of 32 as before. That OTOH requires calling
g_rand_int() twice. Overhauled g_rand_int_range(), which is easier
now thanks to the new precision of g_rand_double(). Thanks to
Sverre Johansen <sj@ifi.uio.no> for the hint.
* grand.h: Added g_rand_boolean() and g_random_boolean()
macros. While they could be omitted due to extreme simplicity,
they make intention clearer in code and are therefore good to have.
* grand.c, grand.h: Renamed all 'min' and 'max' parameters to'
begin' and 'end' resp. to avoid making people think, that 'max' is
included in the interval. 'end' now isn't, whereas 'begin'
is. That's similar to the use in the STL.
* glib/glib-sections.txt: Added g_rand_boolean and
g_random_boolean macros.
* glib/tmpl/random_numbers.sgml: Updated.
2000-12-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gslist.c, glist.c: Ok, I'm a moron. When I originally
implemented ENABLE_GC_FRIENDLY, I forgot to include config.h into
the affected files. Now that Alex did that for those two,
inevitable typos surfaced, which are now fixed.
* garray.c, ghash.c, gqueue.c, gtree.c: Include config.h as well,
as ENABLE_GC_FRIENDLY should be known.
2000-12-17 Tor Lillqvist <tml@iki.fi>
* gutf8.c (g_utf8_get_charset_internal): (Win32) Use GetACP to get
the current ANSI codepage.
* gunicode.h: Add comment that the static string g_get_charset
sets the parameter to point to should be copied in case the
charset might be changed later in the program.
2000-12-14 Tor Lillqvist <tml@iki.fi>
* giowin32.c (g_io_win32_dispatch): Warn if no callback. Call
callback correctly.
(g_io_win32_create_watch): Fix typo.
(g_io_win32_fd_create_watch): Ditto.
(g_io_channel_unix_new): If it is a file descriptor (i.e., a Unix
fd lookalike provided by the C library), call
g_io_channel_win32_new_fd(). If it is a socket (from WinSock),
call g_io_cahnnel_win32_new_stream_socket(). Hopefully sockets and
fds don't overlap. TODO: Implement also datagram sockets.
(g_io_channel_win32_poll): Call g_main_context_get_poll_func().
* gcompletion.h: Include <unistd.h> only on Unix. Is this
inclusion really needed here? OTOH, do include <stddef.h>, for
size_t.
* gmessages.c: (Win32) Don't define a function called "write" that
might clash with the prototype from <io.h>, use a #define.
* glib.def: Update.
* gmain.c (g_source_add_poll): Don't return a value from void
function.
(g_main_context_get_poll_func): Compile also for non-Win32, as
presumably was intended. The result var is a GPollFunc, not a
GPollFunc*. Return the result!
gobject:
2000-12-14 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in: Update, include parts from Makefile.am to
build gmarshal.[ch]. Some day, we won't need these separate
makefiles for Win32 compilation. I hope.
* makefile.msc.in: Update. No use trying to build gmarshal.[ch]
here, it would require Unixish tools. MSVC users building from CVS
sources are out of luck.
* gobject.def: Update.
2000-12-13 Havoc Pennington <hp@redhat.com>
* gconvert.c (open_converter): make static
* gutf8.c (g_utf8_validate): Simplify logic a bit, maybe
speeding it up - now we just return FALSE if we had to bail out
for any reason before getting to the end of the string, as defined
by a nul byte if len was -1, defined by the len otherwise. This
also fixes a bug where nul bytes were not treated as invalid
when the length was specified.
Tue Dec 12 18:58:22 2000 Tim Janik <timj@gtk.org>
* ghash.c (g_hash_table_remove): return whether a value
got removed.
Tue Dec 12 23:38:02 2000 Tim Janik <timj@gtk.org>
* Makefile.am: _never_ touch oldest-source-stamp.
* gobject.[hc]: construct property handling fixes/improvements.
fixed trailer handling in get/set property.
* gparam.[hc]: implement param spec pool, got rid of param spec
hashtable. the most prominent change is that e deal with type
prefixes here.
* gmain.c, gmain.h (g_main_context_new, g_main_context_destroy): GMainContext useful
in implementing some additional styles of main loop usage. To do this, however, Joe
Hacker needs to be able to create/destroy GMainContext's at will. This is just an
export of existing functionality, rather than new functionality.
They are listed in the "Low level functions for implementing custom main loops"
section of the header file, to avoid confusing people.
* gobject/Makefile.am:
. You have to 'touch oldest-source-stamp' if you want to avoid having
the Makefile constantly rebuild itself.
. Fix marshaller generation rules to work with srcdir != builddir
(there were issues with trying to run "./glib-genmarshal", etc.)
Sun Dec 10 10:47:11 2000 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_destroy_internal): Remove pollfds
from the context here, not when actually freeing the
source.
* gmain.c (g_source_unref_internal): Free source list
and source, call source->source_funcs->destroy().
* giochannel.c: Unreference io_channel properly.
* tests/Makefile.am (TESTS): Rearrange into other veriables, and
include run-markup-tests.sh.
(TESTS_ENVIRONMENT): New. Pass $srcdir to tests.
(noinst_PROGRAMS): Rename to ...
(check_PROGRAMS): ... this. 'automake' ensures that these are
built before running the tests.
* tests/run-markup-tests.sh: Support $srcdir != $builddir.
2000-12-08 Havoc Pennington <hp@pobox.com>
* tests/Makefile.am (TESTS): move markup-test to noinst_PROGRAMS;
it isn't a proper test, the proper test would be
run-markup-tests.sh, but that can't go in tests, so we need
a manual make check rule. Didn't do that yet.
2000-12-06 Havoc Pennington <hp@pobox.com>
* tests/strfunc-test.c (main): add g_strdupv test
* gstrfuncs.c (g_strdupv): Add a function to copy
an array of strings
Tue Dec 5 12:23:04 2000 Owen Taylor <otaylor@redhat.com>
* gmain.[hc]: Major change in API for creating sources
to handle multiple main loops (GMainContext *).
GSources are now exposed as GSource * and implemented
with structure derivation.
* giochannel.[ch]: Changed vtable for GIOChannel to correspond
to the new mainloop API, add g_io_channel_create_watch().
* gtypes.h: Move GTimeVal here.
* gthread.h: Remove gmain.h include to avoid circularity.
* giounix.c: Update for new GMain API.
* giowin32.c: Update for new GMain API. (No check for
proper compilation or working.)
* timeloop.c timeloop-basic.c: A benchmarking program for
the main loop comparing the main loop against a
hand-written (timeloop-basic.c) variant.
* tests/mainloop-test.c: New torture test of mainloop.
* docs/Changes-2.0.txt: Started. Added text about
changes to GMain.
* gmain.c (g_main_add_poll_unlocked): Initial fd->revents
to zero. (#8482, Benjamin Kahn)
2000-11-21 Havoc Pennington <hp@pobox.com>
* gmacros.h: Provide G_CONST_RETURN which is 'const' by default,
and nothing when G_DISABLE_CONST_RETURNS is defined.
2000-11-29 Havoc Pennington <hp@redhat.com>
* gunidecomp.c (COMBINING_CLASS): s/UNICODE_LAST_CHAR/G_UNICODE_LAST_CHAR/
* gunichartables.h: Update for data in Unicode 3.0.1,
and include tables for line break properties
* gunidecomp.h: Ditto
* gunicode.h (GUnicodeBreakType): Enum for line break properties
(g_unichar_break_type): Get the break property for a char
* gunibreak.h: Autogenerated line break property tables
* gunibreak.c (g_unichar_break_type): added
* Makefile.am (EXTRA_DIST): dist gen-unicode-tables.pl
* Makefile.am (libglib_1_3_la_SOURCES): Add gunibreak.h, gunibreak.c
* gen-unicode-tables.pl: Include the script to update the unicode
char tables
* gmarkup.c: Fix warnings.
* guniprop.c, gunidecomp.c: Make warnings go away by using
GPOINTER_TO_INT() instead of (int).
* gcompletion.[ch]: Add g_completion_set_compare(),
to allow (for example) using case-insensitive completion.
* gobject/gsignal.c: Fix warnings about possible use of uninitialized
variables, and fix logic that would leave 'node' unset in cases
that it might be used in.
* gobject/glib-genmarshal.c: Fix warning about printf format.
2000-11-28 Tor Lillqvist <tml@iki.fi>
Patches by Hans Breuer:
* gspawn-win32.c: Move the code for gspawn-win32-helper to its own
file.
* makefile.{mingw,msc}.in: Change accordingly.
* gspawn-win32-helper.c: New file.
* Makefile.am (EXTRA_DIST): Add it.
* gmarkup.c (find_current_text_end): Fix assertion not to check an
uninitialised variable.
* gboxed.c: Include <string.h> for memset ().
2000-11-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthread-impl.c: Revamped errorcheck mutexes and added errorcheck
cond_wait() and cond_timed_wait() funtions. This makes he whole
thing work. Now we only show the location of the locking/unlocking
for -DG_ERRORCHECK_MUTEXES and not the name of the mutex.
* gthread.c: Set the thread data before locking the mutex, because
the locking call might use g_thread_self ().
* gthread.h: Do only show the location of the locking/unlocking
for -DG_ERRORCHECK_MUTEXES and not the name of the mutex. Add the
errorcheck capability for g_cond_wait and g_cond_timed_wait as
well.
2000-11-21 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Add a surrogate for thread priorities using PID
niceness for systems with no thread priorities and different PIDs
for threads of the same process (most notably: Linux). Define
G_THREAD_USE_PID_SURROGATE in that case, as used by
gthread-posix.c. Also make the system thread bigger by
sizeof (long) to contain the thread's PID.
* gfileutils.c: Include stdlib.h for mkstemp prototype.
* gthread.c: Add priority range checks to the affected functions.
* gthreadpool.c: Remove unused variable.
* gthread-impl.c, gthread-posix.c, gthread-solaris.c: Removed
g_thread_map_priority function in favour of the
g_thread_priority_map array. Initialize the array with
PRIORITY_{...}_VALUE, if available and interpolate beetween the
bounds if .._NORMAL_.. and .._HIGH_.. are not available.
* gthread-posix.c: If we should use the PID niceness as a
surrogate for thread priorities (G_THREAD_USE_PID_SURROGATE is
defined), then disable normal priority handling and use PIDs and
setpriority() instead. Depends on the thread to write its PID into
the place after the thread id right after thread creation.
Mon Nov 20 18:55:17 2000 Jonathan Blandford <jrb@redhat.com>
* gtree.[hc]: Patch from David Benson <daveb@idealab.com> to add
user_data support to gtree functions.
Mon Nov 13 18:35:52 2000 Jonathan Blandford <jrb@redhat.com>
* gtypes.h (GCompareFuncData): new func type to let you use user
data when comparing nodes.
* gslist.c (g_list_sort_with_data): new function to sort with
user_data.
* glist.c (g_list_sort_with_data): new function to sort with
user_data.
* garray.[ch]: Added convenience functions to sort arrays.
2000-11-16 Havoc Pennington <hp@redhat.com>
* guniprop.c (g_unichar_isspace): Use a switch here, maybe helps
the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR,
so don't special case it.
Fri Nov 17 15:43:00 2000 Owen Taylor <otaylor@redhat.com>
* Released 1.3.2
* NEWS: Update.
* tests/Makefile.am (dist-hook): Add code to distribute
markup test files.
2000-11-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Check for the sched.h header and include it on
gthread/gthread-posix.c if available.
* gthread-posix.c: Include <sched.h> if available.
* configure.in: Add -D_POSIX4_DRAFT_SOURCE to
GTHREAD_COMPILE_IMPL_DEFINES. Also add -D_POSIX4A_DRAFT10_SOURCE
to G_THREAD_CFLAGS. Really deploy GTHREAD_COMPILE_IMPL_DEFINES,
when searching for thread libs. Look for sched_* functions in
-lrte as well. All of that is necessary on DG/UX.
* configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADERS in
various places to make it work more reliable, to make it accept
macros instead of functions etc.
* configure.in: Replace some NULL's for checks with 0 to make it
work without stdio.h everywhere.
* configure.in, gutils.c: changed the test for getpwuid_r to first
test for a posix version and then for a non-posix version. No code
change in gutils.c. Again this change deals better with getpwuid_r
being a macro and not a function. Most of the above with kind help
from Tethys <tet@isengard.europe.dg.com>. This fixes Bug #13403.
2000-11-13 Tor Lillqvist <tml@iki.fi>
* config.h.win32.in: Add USE_LIBICONV.
* gconvert.c: Check G_OS_WIN32 only after including glib.h.
* glib.def: Update.
2000-11-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthread.c (g_static_rec_mutex_*): Made recursive mutexes also
work when the thread system is not (yet) initialized.
Sun Nov 12 18:34:32 2000 Owen Taylor <otaylor@redhat.com>
* gconvert.[ch]: Create wrapper functions for iconv()
so that we can transparently use the native iconv,
libiconv, or (in the future) a mini-iconv included
with glib.
* glib-config-2.0.in glib-2.0.pc.in: Include @ICONV_LIBS@
* INSTALL: Added note about libiconv.
* configure.in: Add checks for libiconv from pango. If
EILSEQ is not defined in errno.h add define for it into
glibconfig.h so g_iconv can use it. (Note, recompiling
from a system without EILSEQ to a system with EILSEQ
will break binary compatibility)
2000-11-11 Havoc Pennington <hp@pobox.com>
* gmarkup.c (g_markup_parse_context_parse): Handle a long stream
of bytes containing no UTF-8 character starts
2000-11-11 Tor Lillqvist <tml@iki.fi>
* gfileutils.c (g_mkstemp): Improve chance to generate unique
names with less effort a bit.
* gfileutils.h: Add g_file_open_tmp() declaration.
* testglib.c: Include <io.h> on Win32.
* makefile.mingw.in: Correct the way to invoke sub-makes.
2000-11-11 Tor Lillqvist <tml@iki.fi>
* gtypemodule.c: Include stdlib.h for exit().
* makefile.{mingw,msc}.in (gobject_OBJECTS): Add gtypemodule.
* gobject.def: Add new functions.
2000-11-11 Tor Lillqvist <tml@iki.fi>
* gfileutils.c (g_file_open_tmp): New function, suggested by Havoc
earlier this month.
(g_mkstemp): Use only one case for letters in temp file name, as
this will be used on systems with case-insensitive file systems.
* testglib.c (main): Test g_mkstemp() and g_file_open_tmp().
2000-11-09 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthreadpool.c: Don't take threads with other priorities into
account as changing the priority is highly unportable. (Actually
using it at all already is unportable, but even sometimes where
that works, changing priority is not possible).
2000-11-05 Havoc Pennington <hp@pobox.com>
* gmarkup.c: inline docs
(unescape_text): properly check strtoul for failure.
* gerror.c (g_propagate_error): Free the src error if the dest
location is NULL - I'm pretty sure that's what this function was
supposed to do.
2000-11-05 Havoc Pennington <hp@pobox.com>
* gerror.c (g_propagate_error): Free the src error if the dest
location is NULL - I'm pretty sure that's what this function was
supposed to do.
2000-11-05 Havoc Pennington <hp@pobox.com>
* glib/tmpl/error_reporting.sgml: fixes
2000-11-02 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/tmpl/async_queues.sgml, glib/glib-sections.txt: Added
documentation for asynchronous queues.
* gasyncqueue.c: Added inline documentation for asyncronous
queues.
2000-10-30 Tor Lillqvist <tml@iki.fi>
* configure.in: Check for mkstemp.
* gutils.c (g_mkstemp): New function. If HAVE_MKSTEMP, just call
it, otherwise use code lifted from glibc.
* gutils.h: Declare it.
* glib.def: Here, too.
2000-10-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gcache.h, gcache.c, ghash.h, ghash.c, grel.c, grel.h, gtypes.h:
Introduced new function type GEqualFunc to return TRUE for equal
params. This is now used instead of GCompareFunc (which should
work akin to strcmp) here. This kind of fixes Bug #14412. Note
that technically GCompareFunc and GEqualFunc are still the same
types, as gint == gboolean.
* ghash.h, gutils.c: g_int_equal and g_direct_equal now return
gboolean to be really become GEqualFunc.
* gscanner.c, testglib.c, tests/hash-test.c: Some tiny changes to
follow the above change.
2000-10-24 Havoc Pennington <hp@pobox.com>
* gmarkup.h, gmarkup.c: New module to parse a simple
markup language
* Makefile.am: add gmarkup.h, gmarkup.c
* tests/Makefile.am: add markup-test
* gstring.h (g_string_new_len): new function to create a string
with a length
(g_string_new): avoid a gratuitous realloc
2000-10-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gstrfuncs.c (g_strsplit): When the string is ended by a
delimiter, return an extra empty string just like for a delimiter
at the start of the string. This makes the function behave more
consitent and also fixes Bug #15026.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-19 Tor Lillqvist <tml@iki.fi>
* makefile.msc.in: Pass -DGSPAWN_HELPER when building it. Link
with user32.lib.
* gspawn-win32.c
* gfileutils.c: Make them compile with picky MSVC.
* gwin32.h: New file. Move Win32-only stuff that isn't related to
GIOChannels here from giochannel.h.
* Makefile.am: Add it here.
* giochannel.h: Move stuff to gwin32.h.
* glib.h: On Win32, include gwin32.h.
2000-10-16 Tor Lillqvist <tml@iki.fi>
* giowin32.c (reader_thread): Some more debugging output.
(g_io_channel_win32_poll): Remove unused vars.
* gfileutils.c: Changes for Win32, with no unistd.h and no
S_ISLNK().
* gspawn-win32.c: Implementation of the g_spwan_* functions for
Win32. Due to the general non-Unixness of Win32, much of the
functionality that is relatively clean to implement on Unix, is
hard to do on Win32. We must use a separate helper program to
change directory, close extra file descriptors, redirect the std
ones, as needed, and only then start the child process. No child
process pid can be returned, unfortunately. Or if we used
CreateProcess directly, it probably could. (Now we use the spawnv*
functions from msvcrt.)
* glib.def: Add new entry points.
* glib.def
* giowin32.c: Remove g_io_channel_win32_wait_for_condition(),
g_io_channel_win32_poll() subsumes it.
* gbacktrace.h: G_BREAKPOINT for MSVC (on the ix86).
* gwin32.c (g_win32_getlocale): Use "sp" for
LANG_CROATIAN+SUBLANG_SERBIAN_LATIN.
* makefile.{mingw,msc}.in (glib_OBJECTS): Add new files.
Add gspawn-win32-helper.exe rule.
* tests/makefile.{mingw,msc}.in (TESTS): Add shell-test and
spawn-test.
* tests/spawn-test.c: (run_tests): On Win32, don't try to run
/bin/sh, but ipconfig (no special significance in choosing that,
just a program that outputs something to stdout).
gmodule:
* Makefile.am (BUILT_EXTRA_DIST): New variable.
(dist-hook): Handle $(BUILT_EXTRA_DIST).
gobject:
* Makefile.am (BUILT_EXTRA_DIST): New variable.
(dist-hook): Handle $(BUILT_EXTRA_DIST).
(*): Remove traces of @STRIP_{BEGIN,END}@.
gthread:
* Makefile.am (BUILT_EXTRA_DIST): New variable.
(dist-hook): Handle $(BUILT_EXTRA_DIST).
docs/reference:
'make distcheck' fixes.
* glib/Makefile.am (EXTRA_DIST): Add $(DOC_MODULE)-decl.txt.
(html): Run 'gtkdoc-fixxref' in $(srcdir).
(dist-check-gtkdoc): Add missing quote.
(dist-hook): Copy in dependency order, so that none of the
makerules are fired in a tarball build.
* gobject/Makefile.am: Likewise.
toplevel:
Remove need for acconfig.h, and misc. cleanups.
* acglib.m4 (GLIB_SIZEOF): Add 'autoheader' comment to
AC_DEFINE_UNQUOTED.
(GLIB_BYTE_CONTENTS): Likewise.
* configure.in: Add 'autoheader' comments to all AC_DEFINE(...)
and AC_DEFINE_UNQUOTED(...) lines.
Replace AC_MSG_CHECKING/AC_CACHE_VAL with AC_CACHE_CHECK.
(AM_PROG_LIBTOOL): Move after AC_PROG_CC.
* acconfig.h: Empty out.
* Makefile.am (BUILT_EXTRA_DIST): New variable. List 'dist'able
files that are created in the builddir.
(dist-hook): Handle those files.
(libglib_1_3_la_SOURCES): Remove @ALLOCA@. @ALLOCA@ should only
be used in an _LDADD or _LIBADD, since it expands (if necessary)
to 'alloca.o'.
* tests/Makefile.am (BUILT_EXTRA_DIST): New variable.
(dist-hook): Handle $(BUILT_EXTRA_DIST).
2000-10-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* grand.c: Added inline documentation.
* docs/refernce/glib/glib-sections.txt: Added misc items.
* docs/refernce/glib/tmpl/random_numbers.sgml: Documentation for
the random number generator.
2000-10-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gtypes.h, gnode.h, gutils.h: Readded GFreeFunc,
g_node_insert_after and g_find_program_in_path resp., which
mysteriously disappeared during the glib.h dissection.
2000-10-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: define GLIB_HAVE_ALLOCA_H instead of including
alloca.h in glibconfig.h, GLIB_HAVE_ALLOCA_H is used in glib.h.
* configure.in (GLIB_MAJOR_VERSION): Use GLIB_DIVERT_BEFORE_HELP
instead of AC_DIVERT_PUSH(),AC_DIVERT_POP.
(AC_CHECK_HEADERS): Remove redundant AC_DEFINE(HAVE_...).
(REALLOC_0_WORKS): Move AC_DEFINE outside AC_CACHE_VAL.
(dlopen): Quote nested AC_CHECK_... calls.
* acglib.m4 (GLIB_TR_SH, GLIB_TR_CPP): Utility macros copied from
beta autoconf 2.50.
(GLIB_DIVERT_BEFORE_HELP): New macro that works both with autoconf
2.13 and beta autoconf 2.50.
(GLIB_SIZEOF, GLIB_BYTECONTENTS): Use GLIB_TR_*.
2000-10-09 Havoc Pennington <hp@redhat.com>
* Makefile.am, tests/Makefile.am: Add new files.
* tests/spawn-test.c, tests/shell-test.c: new tests for
the shell/spawn stuff
* gutils.c (g_find_program_in_path): convert a relative
program name into an absolute pathname to an existing
executable
* gspawn.h, gspawn.c: New fork/exec API
* gshell.h, gshell.c: Shell-related utilities, at the moment
simply routines to parse argv and quote/unquote strings
* guniprop.c (g_unichar_isspace): Return TRUE for the
ASCII space characters isspace() returns TRUE for.
* gfileutils.c (g_file_get_contents): Convenience function
to slurp entire file into a string and return it. Partially
written by Joel Becker.
(g_file_test): file test function
2000-10-06 Tor Lillqvist <tml@iki.fi>
* tests/gio-test.c (main): Fix the Win32-only code to use current
API, g_io_channel_win32_make_pollfd() and g_io_channel_win32_poll().
2000-10-06 Tor Lillqvist <tml@iki.fi>
* makefile.msc.in: Revamp to be like makefile.mingw.in, make
the MSVC build actually work again.
* gmodule/makefile.msc.in
* gobject/makefile.msc.in
* gthread/makefile.msc.in: New files, like their mingw counterparts.
* gmodule/Makefile.am
* gobject/Makefile.am
* gthread/Makefile.am: Make and distribute them.
* */makefile.mingw.in: Allow override of GLib version number from
the build/win32/module.defs file.
* glib.def: Add new entry point.
Fixes from Hans Breuer:
* glib.h (struct DIR): Keep the last readdir result cached inside
the DIR struct, to enable several DIRs being open simultaneously.
* gwin32.c (g_win32_readdir): Use the above instead of static.
* giowin32.c (g_io_channel_win32_make_pollfd): Insert cast to keep
MSVC happy.
2000-10-05 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.h: Changed alloca stuff a bit: when we have a working
alloca.h, we're not messing with alloca any further. Should fix a
bug reported by Bernd Demian <wega@csc-dd.de>.
2000-09-30 Martin Baulig <baulig@suse.de>
* configure.in (HAVE_THREADS): New automake conditional.
* Makefile.am (SUBDIRS): Only compile the gthread subdirectory if we
actually have threads.
2000-09-29 Jonathan Blandford <jrb@redhat.com>
* gnode.c (g_node_insert_after): Added function to keep symetry
with g_node_insert_before.
2000-09-29 Jonathan Blandford <jrb@redhat.com>
* glib/tmpl/trees-nary.sgml: Add g_node_insert_after().
2000-09-30 Martin Baulig <baulig@suse.de>
* configure.in (HAVE_THREADS): New automake conditional.
* Makefile.am (SUBDIRS): Only compile the gthread subdirectory if we
actually have threads.
2000-09-29 Martin Baulig <baulig@suse.de>
* Makefile.am (pkgconfigdir): Set this to `$(libexecdir)/pkgconfig';
this is the directory where pkg-config actually looks.
* *.pc.in: Made the pkg-config scripts actually work.
2000-09-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in, glib.h: Added errorcheck mutexes. These are
activated through the preprocessor symbol
G_ERRORCHECK_MUTEXES. Need to add an extra word to StaticMutex in
order to achieve this. g_(static_)mutex_* functions instrument the
mutex operations with mutex name and location, when compiled with
-DG_ERRORCHECK_MUTEXES. g_thread_init activates the errorcheck
mutexes, when compiled with -DG_ERRORCHECK_MUTEXES.
* gthread/gthread-impl.c: Added errorcheck mutexes. New
exported function
g_thread_init_with_errorcheck_mutexes, which is called instead of
g_thread_init, when compiled with -DG_ERRORCHECK_MUTEXES. New
static functions
g_mutex_(new|lock|trylock|unlock|free)_errorcheck_impl to
implement errorcheck mutexes.
* gthread/gthread-posix.impl.c, gthread/gthread-solaris-impl.c:
Define the size of a mutex.
2000-09-28 Havoc Pennington <hp@pobox.com>
* glib.h (GThreadPriority): fix indentation
(GConvertError): generic error is conventionally called
_FAILED rather than _OTHER, at least at the moment,
according to GError docs in docs/reference.
* gconvert.c: s/_OTHER/_FAILED/
2000-09-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Adjusted the test for an unimplemented
getpwuid_r. Info from Michael Pruett. This is just a forward
merge from glib-1-2.
2000-09-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Moved determination of G_THREAD_FLAGS before
G_THREAD_LIBS. Check for UnixWare systems and set the right cflags
and libs there (it needs -Kthread for the native compiler and
-pthread for gcc). Thanks to Boyd Lynn Gerber <gerberb@zenez.com>
for the info.
* configure.in: Fail immediately, when no thread library is found,
instead of continuing searching for rt libs etc. Changed almost
all occurances of $enable_threads to $have_threads, as that's,
what we want.
* tests/threadpool-test.c: Define vars inside the guard to avoid
warnings.
2000-09-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in, tests/type-test.c: Some platforms support 64 bit
'long long', but you can not printf or scanf them. In that case,
don't define G_G{UINT|INT}64_FORMAT. Changed the type-test program
to reflect that.
2000-09-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gutils.c (g_get_current_dir): max_len can't be initialized
statically as it might call a function. So do it at first call.
2000-09-21 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: The last released automake (1.4) still requires
AM_PROG_LIBTOOL instead of AC_PROG_LIBTOOL, so use that for the
time being.
2000-09-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* acconfig.h, configure.in, gutils.c: Test for the existence of
getcwd, and use it only when found.
* glib.h: Only use the gcc-variable-macro-argument-extension for
gcc >= 2.4. Both patches from Jonas Oberg <jonas@gnu.org>.
Sun Sep 17 2000 Elliot Lee <sopwith@redhat.com>
* glib.h configure.in: Define g_alloca() as an alloca-that-works-anywhere.
* gconvert.c: Fix warnings which could have caused problems on 64-bit platforms.
Sun Sep 10 12:37:40 2000 Owen Taylor <otaylor@redhat.com>
* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
of convenient character set conversion using iconv, with
the addition of GError. We probably need a fallback that
just does conversions between, say UTF-8,16,32 and ISO-8859-1
for targets without iconv at all.
Also add g_convert_with_fallback() to take care of conversions
where we accept some loss going to the target encoding.
Mon Aug 21 03:57:46 2000 Tim Janik <timj@gtk.org>
* glib.h (G_BREAKPOINT): for non-i386 and non-alpha, or non gcc,
implement BREAKPOINT() as raise (5 /* SIGTRAP */);
* glib.h: provide user-definable switch G_IMPLEMENT_INLINES,
to turn on compilation of inline function implementations provided
in header files with extern linkage.
wrap inline function implementations into ifdef __G_UTILS_C__, so we
really only compile them for gutils.c and not also into arbitrary user
code that wants to make use of G_IMPLEMENT_INLINES.
adjusted comment apropriately.
* gutils.c: to turn on compilation of inline functions, provide
#define G_IMPLEMENT_INLINES 1 and #define __G_UTILS_C__.
2000-09-06 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.h, gtimer.c, tests/thread-test.c:
s/G_MICROSEC/G_USEC_PER_SEC/
* gthread/gthread-posix.c, gthread/gthread-solaris.c:
s/G_MICROSEC/G_USEC_PER_SEC/ and s/G_NANOSEC/G_NSEC_PER_SEC/
2000-09-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gstring.c (g_string_free): Use g_return_val_if_fail instead of
g_return_if_fail, as the function now is supposed to return
something.
2000-09-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.h: Include gerror.h before it is used for some g_thread_*
functions.
* gthread.c, gthreadpool.c, glib.h: Enable error reporting for
thread creation, namly for g_thread_create, g_thread_pool_new,
g_thread_pool_push and g_thread_pool_set_max_threads.
* tests/thread-test.c, tests/threadpool-test.c: Adapted
accordingly.
* gthread-posix.c (g_thread_create_posix_impl): Use GError to
report errors.
2000-09-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gerror.c, gerror.h (g_propagte_error): Added function
g_propagte_error to hand over local errors to the calling
function.
2000-08-31 Tor Lillqvist <tml@iki.fi>
* glib.h
* glib.def
* giowin32.c (g_io_channel_win32_make_pollfd): New function, to
make a GPollFD from a GIOChannel. Creates the events and starts
the reader thread if necessary.
2000-08-27 Tor Lillqvist <tml@iki.fi>
Hmm, the parameter to g_io_channel_win32_poll() should be
a GPollFD array, not GIOChannel. That way the caller can know which
channels cause the callback.
2000-08-27 Tor Lillqvist <tml@iki.fi>
* giowin32.c (g_io_channel_win32_poll): New function, otherwise
like g_io_channel_win32_wait_for_condition(), but accept several
GIOChannels.
(g_io_channel_win32_wait_for_condition): Call
g_io_channel_win32_poll().
* glib.h: Declare g_io_channel_win32_poll().
* gwin32.c (g_win32_error_message): Don't believe return value
from FormatMessage.
2000-08-25 Elliot Lee <sopwith@redhat.com>
* glib.h, gunicode.h, gmodule/gmodule.h:
Mark the following functions G_GNUC_CONST (to allow
betteroptimization) because their results are a function of only their parameters:
g_int_hash, g_int_equal, g_direct_hash, g_direct_equal, g_quark_to_string,
g_date_is_leap_year, g_date_days_in_month, g_date_monday_weeks_in_year,
g_date_sunday_weeks_in_year, g_spaced_primes_closest, g_unichar_is*,
g_unichar_to*, g_unichar_*digit_value, g_unichar_type
Mon Aug 21 14:46:23 2000 Owen Taylor <otaylor@redhat.com>
* tests/gio-test.c: Fix a couple of trivial bugs that
were causing warnings.
Mon Aug 21 14:39:36 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Use C99 varargs macros where possible
(check __STDC_VERSION__), otherwise, on gcc, use an alternate
form of gcc varargs which is more likely
to be supported going forward. (Based on some code
from Raja Harinath)
* glib.h:
* garray.c: (g_array_free), (g_ptr_array_free),
(g_byte_array_free): Return the data left behind.
* gstring.c: (g_string_free): Return the data left behind.
Changed the free calls that leave data behind so they
return a pointer to the left-behind data, NULL if told not
to leave anything behind. This makes these calls easier
to use correctly, without any incompatible API change for
callers that don't know about the return value. Of course,
it would be even clearer if the free calls weren't dual-purpose
in the first place.
2000-08-12 Tor Lillqvist <tml@iki.fi>
* giowin32.c: Some indentation and spacing fixes. Add some more
logging.
(g_io_win32_add_watch): New function, with common code from
g_io_win32_fd_add_watch and g_io_win32_sock_add_watch. Don't start
more than one reader thread for a GIOChannel. We should obviously
have just one reader thread reading a file descriptor or socket.
2000-08-07 Tor Lillqvist <tml@iki.fi>
* tests/gio-test.c (shutdown_source): New function, that calls
g_source_remove(). Check return value of g_source_remove(), and
decrement running subprocess counter only if g_source_remove()
actually did remove the source.
(recv_message): Call shutdown_source() on EOF condition. Return
FALSE on G_IO_HUP and G_IO_ERR condition. Fix printf format typo.
Sun Aug 6 20:06:02 2000 Tim Janik <timj@gtk.org>
* gmessages.c (g_log_domain_check_free): keep *last updated while
running through the domain list, so we don't screw up the removal,
patch provided by Gady Kozma <gadykozma@hotmail.com>.
Sun Aug 6 20:03:41 2000 Tim Janik <timj@gtk.org>
* gmessages.c (g_log_remove_handler): keep *last updated while running
through the handler list, so we don't screw up the removal.
Sun Jul 30 16:54:13 2000 Owen Taylor <otaylor@redhat.com>
* gunicode.h: Fix stray character
* gutf8.c (g_unichar_to_utf8): Allow outbuf to be NULL, in
which case we just compute the length.
2000-07-31 Tor Lillqvist <tml@iki.fi>
* giowin32.c (buffer_read): The code didn't compile (must
have been sleepy when committing). "return" instead of "break"
(g_io_win32_fd_add_watch): Cannot check if the file descriptor is
readable by calling ReadFile to read zero bytes. ReadFile blocks
on NT even if trying to read nothing at all. So, don't check if
file descriptor is readable; assume this function isn't called
otherwise.
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
* gmain.c (g_get_current_time): fix tor's recent changes which
got rid of a required variable in the non-windows path.
2000-07-30 Tor Lillqvist <tml@iki.fi>
* giowin32.c: Compile in the debugging code all the time, but only
output debug messages if told so. Add (unadvertised) function to
turn on/off debug messages for a channel.
(buffer_read): Don't loop. It is expected behaviour to return a
short read occasionally, for instance when reading from
pipes. It's the calling code that should loop if it *knows* how
much the writer has written.
* tests/gio-test.c: Correct the program's name in the output.
(recv_message): Loop calling g_io_channel_read() (in a new
function read_all()) until we have all the bytes we want (that we
know the writer has written/will write).
2000-07-30 Tor Lillqvist <tml@iki.fi>
Finally, a new and improved IO Channel and condition watch
implementation for Win32. Based on code provided by Craig Setera.
When watching file descriptors, for which there is no select()
like functionality on Win32 that would work on all Win32 platforms
for all types of file descriptors (including anonymous pipes), we
start a new thread that blocks while trying to read from the file
descriptor. When the read returns, a Win32 Event is signalled that
the polling routine eventually notices. Meanwhile, the data being
read is stored in a circular buffer, from where the IO channel's
read() method picks it up.
If the buffer fills up the reading thread has to wait for space
becoming available. For this another Win32 Event is used. The IO
Channel's read() method signals this when it has read some data
out of the buffer.
The separate reader thread(s), and the circular buffer(s) with
associated events mean lots of possibilities for fun parallellism
errors. But it seems to work OK, i.e. GIMP runs.
* gmain.c: Small changes to the Win32 polling function.
(g_main_win32_get_poll_func): New function. Perhaps it would be a
good idea to provide this on all platforms.
* giowin32.c: The bulk of the new implementation.
(g_io_channel_win32_wait_for_condition): New function. To be used
where on Unix one does a select() on the channel's fd, like
libgimp's gimp_extension_process(). Could be provided on all
platforms.
* glib.h: Update documentation for IO Channels on Win32. Remove
the declarations for the as of now obsolete old functions related
to IO Channels for pipes with "wakeup" messages.
* glib.def: Some new functions.
* tests/gio-test.c: New file, to test GIOChannel and main loop.
* tests/Makefile.am
* tests/makefile.mingw.in: Add it.
Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org>
* *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
updates the license headers to the GNU Lesser General Public License,
as well as updating the copyright year to 2000.
Wed Jul 26 05:47:48 2000 Tim Janik <timj@gtk.org>
* configure.in:
* testglib.c:
* gstrfuncs.c:
* glib.h: added g_strlcat() and g_strlcpy() wrappers, supplied by
David Wheeler <dwheeler@ida.org>:
* glib.h, gstrfuncs.c: added g_strlcpy and g_strlcat to support
safe manipulation of fixed-length string buffers.
These functions were originally developed by Todd Miller to simplify
development of security-related programs, and
are available on many (but not all) Unix-like systems,
including OpenBSD, FreeBSD, and Solaris. See
ftp://ftp.openbsd.org/pub/OpenBSD/src/lib/libc/string/strlcpy.3
and http://www.openbsd.org/security.html.
If there's a strlcpy/strlcat on the system, it's called, otherwise
an implementation is provided.
* testglib.c: Added tests for g_strlcpy, g_strlcat.
Wed Jul 26 05:03:24 2000 Tim Janik <timj@gtk.org>
* acglib.m4 (GLIB_SIZEOF): include <stdlib.h> and <stddef.h> if
STDC_HEADERS is defined.
* glib.h:
* glibconfig.h: define gsize and gssize in terms of GLIB_SIZEOF_SIZE_T
* glib.h (g_return_if_reached): applied darin's fix for copy'n
paste error in the macro implementation.
2000-07-22 Tor Lillqvist <tml@iki.fi>
* build-dll: Fix resource handling, the resource file got left out
from the DLL after all... Remove the WIN32APIHEADERS, not needed
with current windres.
* glib.def: Add new functions.
2000-07-20 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gutils.c, glib.h: Mark the functions g_basename and g_dirname
deprecated. They will issue an warning once, when compiled with
G_ENABLE_DEBUG, but continue to work as before. Instead the
functions g_path_get_basename and g_path_get_dirname should be
used, which BOTH return newly allocated memory, that has to freed
by g_free. The new g_path_get_basename now strips trailing slashes
from the path. This fixes#5097. For discussion see
http://mail.gnome.org/pipermail/gtk-devel-list/2000-April/003139.html
* gwin32.c, testglib.c, tests/dirname-test.c: Use the new
functions instead of the old ones.
* gmodule/libgplugin_a.c, gmodule/testgmodule.c: Use
g_path_get_basename instead of the deprecated g_basename.
2000-07-20 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* ghash.c, gscanner.c, glib.h: Mark the functions
g_hash_table_freeze, g_hash_table_thaw and thus
g_scanner_freeze_symbol_table and g_scanner_thaw_symbol_table
deprecated. They will issue an warning once, when compiled with
G_ENABLE_DEBUG. This fixes Bug #3883. For discussion see
http://mail.gnome.org/pipermail/gtk-devel-list/2000-April/003139.html
2000-07-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in, glib.h: glibconfig.h and glib.h now include files
outside of the extern "C" block. Makes some C++ compiler
happy. Reported by Denis Vakatov <vakatov@peony.nlm.nih.gov>.
* gmodule/gmodule.h: include glib.h before doing extern "C".
Makes some C++ compiler happy. Reported by Denis Vakatov
<vakatov@peony.nlm.nih.gov>.
Sat Jul 15 22:44:22 2000 Owen Taylor <otaylor@redhat.com>
* configure.in: Add build/Makefile and
build/win32/Makefile to AC_OUTPUT() so things build
again.
Sat Jul 15 09:11:46 2000 Tim Janik <timj@gtk.org>
* gstrfuncs.c (g_strncasecmp): fixed an off by 0 error (yeah,
the function went off when the while (n--) loop failed due to
n==0 ;), reported by Jean-Louis HAMEL <jlhamel@club-internet.fr>.
2000-07-15 Tor Lillqvist <tml@iki.fi>
* Makefile.am (SUBDIRS): Include the "build" module in GLib, too,
to make it more self-contained. If your CVS client doesn't
automatically get it, do a cvs get build in glib.
* */makefile.mingw.in: Include make.mingw from build in the glib
source directory.
Fri Jul 14 12:22:49 2000 Owen Taylor <otaylor@redhat.com>
* configure.in Makefile.am glib-config.m4 glib.m4: Move
glib-config to glib-config-2.0 move glib.m4 to
glib-2.0.m4
* Makefile.am gobject/Makefile.am gmodule/Makefile.am
gthread/Makefile.am tests/Makefile.am: Change
library names to libglib-1.3.la, etc, so that we
can distinguish glib-1.2 and glib-2.0 on the linkline.
* Makefile.am gobject/Makefile.am gmodule/Makefile.am:
Move include files into /usr/include/glib-2.0.
Thu Jul 6 18:54:49 2000 Owen Taylor <otaylor@redhat.com>
* docs/Makefile.am (EXTRA_DIST): Remove info files
from the build.
2000-07-14 Tor Lillqvist <tml@iki.fi>
* glib.def: Add g_error functions.
* makefile.mingw.in: Add gbacktrace.o.
* gbacktrace.c: No need to include <process.h>.
2000-07-12 Havoc Pennington <hp@redhat.com>
* glib.h: #include <gerror.h>
* Makefile.am (include_HEADERS): Add gerror.h
(libglib_la_SOURCES): Add gbacktrace.c
* gbacktrace.c: Move g_on_error_query() in here (moved on the
server, so history is preserved)
* gerror.h: GError interface
* gerror.c: GError implementation replaces stuff that's now in
gbacktrace.c
Sun Jul 9 21:21:46 2000 Owen Taylor <otaylor@redhat.com>
* genums.[ch]: Move string.h include into the .c file
instead of where it was in the .h file by mistake.
Sun Jul 9 21:20:45 2000 Owen Taylor <otaylor@redhat.com>
* gunicode.h: Include stddef.h instead of stdlib.h