Commit Graph

1384 Commits

Author SHA1 Message Date
Tor Lillqvist
6489e6a5d5 Don't use a cache of variable name to value mappings on Win32, as that
2003-08-10  Tor Lillqvist  <tml@iki.fi>

	* glib/gutils.c (g_getenv): Don't use a cache of variable name to
	value mappings on Win32, as that breaks g_setenv() and
	g_unsetenv(). Only call ExpandEnvironmentStrings() if necessary,
	and in that case return a quarkified string. It is still
	questionable how necessary expanding embedded environment variable
	references is. Possibly the whole Win32-specific g_getenv()
	implementation could be removed. (#119520)
2003-08-10 08:04:10 +00:00
Tor Lillqvist
6fb380e374 Add g_once_impl.
2003-08-08  Tor Lillqvist  <tml@iki.fi>

	* glib/glib.def: Add g_once_impl.
2003-08-10 01:54:02 +00:00
Tor Lillqvist
63d5300574 Fix syntax error in the !HAVE_SETENV case.
2003-08-08  Tor Lillqvist  <tml@iki.fi>

	* glib/gutils.c (g_setenv): Fix syntax error in the !HAVE_SETENV
	case.
2003-08-08 20:38:15 +00:00
Matthias Clasen
18042ea064 Remove a test for getenv() behaviour which isn't specified by SUS and
2003-08-08  Matthias Clasen  <maclas@gmx.de>

	* tests/env-test.c (main): Remove a test for getenv() behaviour which isn't specified by SUS
	and doesn't work on Solaris.
2003-08-08 19:28:24 +00:00
Matthias Clasen
96838a7a88 Add tests for '=' in names and values.
2003-08-07  Matthias Clasen  <maclas@gmx.de>

	* tests/env-test.c: Add tests for '=' in names and values.

	* glib/gutils.c (g_setenv, g_unsetenv): Check that the variable name doesn't contain '='. Add a
	declaration for environ.  (#119338)
2003-08-07 21:51:38 +00:00
Matthias Clasen
4d2921959e Tighten the snprintf() test to check behaviour on zero-size buffers.
2003-08-07  Matthias Clasen  <maclas@gmx.de>

	* acinclude.m4: Tighten the snprintf() test to check behaviour on zero-size buffers.  (#106091)
2003-08-07 20:48:10 +00:00
Matthias Clasen
d695d28b1b Specify test strings in UTF-8, remove all charset conversion. Replace the
2003-08-07  Matthias Clasen  <maclas@gmx.de>

	* tests/patterntest.c: Specify test strings in UTF-8, remove all charset conversion.
	Replace the NOISY define by a cmdline arg --noisy.   (#115757)
2003-08-07 19:39:36 +00:00
Owen Taylor
ba0c0d91f7 Set $LIBS to include -lintl when checking for dcgettext and
Thu Aug  7 15:01:09 2003  Owen Taylor  <otaylor@redhat.com>

        * m4macros/glib-gettext.m4: Set $LIBS to include
        -lintl when checking for dcgettext and
        _nl_msg_cat_cntr. (Tim Mooney, #119171)
2003-08-07 19:10:41 +00:00
Owen Taylor
b51c0d2f70 Make the default priority for idle sources G_PRIORITY_DEFAULT_IDLE as
Thu Aug  7 14:15:44 2003  Owen Taylor  <otaylor@redhat.com>

        * glib/gmain.c (g_idle_source_new): Make the default priority
        for idle sources G_PRIORITY_DEFAULT_IDLE as anybody would
        expect and document that. (#114461, reported by Andy Wingo)
2003-08-07 18:19:23 +00:00
Noah Levitt
f1d488de09 Add test for special case not at inital position in the string, the bug
2003-08-06  Noah Levitt  <nlevitt@columbia.edu>

	* tests/casemap.txt:
	* tests/gen-casemap-txt.pl: Add test for special case not at inital
	position in the string, the bug just fixed. (#118957)
2003-08-06 20:28:33 +00:00
Noah Levitt
8fa63e43c8 Get rid of "len" parameter to output_special_case and output_marks, and
2003-08-05  Noah Levitt  <nlevitt@columbia.edu>

	* glib/guniprop.c: Get rid of "len" parameter to output_special_case
	and output_marks, and make them work more like g_unichar_to_utf8,
	fixing a bug in the process. (#118957)
2003-08-06 01:08:46 +00:00
Hans Breuer
1fd50a1454 for msvc build
2003-08-05  Hans Breuer  <hans@breuer.org>

	* glib/gnulib/makefile.msc : (new file) for msvc build

	* glib/gnulib/vasnprintf.c : use glib/galloc.h

	* glib/gnulib/printf.h : #include <stdio.h> for FILE*

	* glib/makefile.msc.in : replace trio with gnulib

	* glib/glib.def : updated externals

	* glib/guniprop.c : fix for guniprop.c(582) : error C2082:
	redefinition of formal parameter 'len'
2003-08-05 22:21:19 +00:00
Noah Levitt
479928953b We do handle > BMP now, so test it.
2003-08-04  Noah Levitt  <nlevitt@columbia.edu>

	* tests/unicode-normalize.c: We do handle > BMP now, so test it.
2003-08-05 03:41:34 +00:00
Noah Levitt
2041e1c1e2 s/g_read_link/g_file_read_link/ (#118727)
2003-07-31  Noah Levitt  <nlevitt@columbia.edu>

	* tests/file-test.c: s/g_read_link/g_file_read_link/ (#118727)
2003-07-31 16:56:27 +00:00
Noah Levitt
03e4805ff4 Return nonzero exit status if the test fails. (#118729)
2003-07-31  Noah Levitt  <nlevitt@columbia.edu>

	* tests/unicode-encoding.c: Return nonzero exit status if the test fails. (#118729)
2003-07-31 16:51:52 +00:00
Noah Levitt
3b93b01219 Change instances of U+10ffff to U+10fffd, since that is the last valid
2003-07-31  Noah Levitt  <nlevitt@columbia.edu>

	* tests/utf8.txt: Change instances of U+10ffff to U+10fffd, since that
	is the last valid unicode character. Add check that U+10ffff is
	NOTUNICODE. (#118730)
2003-07-31 16:48:54 +00:00
Noah Levitt
05f99527eb Update Unicode data to 4.0. (#107974)
2003-07-30  Noah Levitt  <nlevitt@columbia.edu>

	* glib/gen-unicode-tables.pl:
	* glib/gunibreak.c:
	* glib/gunibreak.h:
	* glib/gunichartables.h:
	* glib/gunicode.h:
	* glib/gunicomp.h:
	* glib/gunidecomp.c:
	* glib/gunidecomp.h:
	* glib/guniprop.c:
	* tests/casefold.txt:
	* tests/casemap.txt:
	* tests/gen-casefold-txt.pl:
	* tests/gen-casemap-txt.pl: Update Unicode data to 4.0. (#107974)
2003-07-31 02:27:56 +00:00
Tor Lillqvist
cdf72b09e6 When possible, manage without the helper process. (Part of the
2003-07-31  Tor Lillqvist  <tml@iki.fi>

	* glib/gspawn-win32.c: When possible, manage without the helper
	process. (Part of the enhancements outlined in #98737.) Speeds up
	GIMP 1.3's first-time-run plug-in query phase a lot.

	Plug a file descriptor (and thus Win32 handle) leak: close the
	read end of the child error report pipe after use.
2003-07-31 01:25:19 +00:00
Matthias Clasen
b3814b0cdc Small doc additions. 2003-07-30 19:00:36 +00:00
Matthias Clasen
beca86c32b Small doc fixes. 2003-07-30 18:50:26 +00:00
Matthias Clasen
768bdf40b7 Remove forgotten @TRIO_LIBS@. (#118616, Noah Levitt)
* glib-2.0.pc.in (Libs): Remove forgotten @TRIO_LIBS@.  (#118616, Noah Levitt)
2003-07-30 00:01:39 +00:00
Matthias Clasen
15edef6ff2 Rename g_read_link() to g_file_read_link() to better match the remaining
* glib/gfileutils.[hc]: Rename g_read_link() to g_file_read_link() to better match the remaining file
	utilities in the g_file_ namespace and to better separate it from readlink(). This is hopefully no problem
	as the function is just 2 days old.
2003-07-29 22:31:40 +00:00
Matthias Clasen
cf9779628e Use gchar, gint, gsize instead of char, int, size_t in the interface for
2003-07-29  Matthias Clasen  <maclas@gmx.de>

	* glib/gqsort.[hc] (g_qsort_with_data):
	* glib/gconvert.[hc] (g_filename_to_uri, g_filename_from_uri):
	* glib/gfileutils.[hc] (g_mkstemp, g_file_open_tmp): Use gchar, gint, gsize instead of char, int, size_t
	in the interface for consistency.  (#118567)
2003-07-29 18:59:23 +00:00
Matthias Clasen
3c51de64fe Integrate gnulib vasnprintf(). 2003-07-28 23:00:05 +00:00
Matthias Clasen
355eb38190 New function g_read_link(). (#72545)
* glib/gfileutils.h:
	* glib/gfileutils.c: New function g_read_link(). (#72545)
2003-07-28 19:49:47 +00:00
Matthias Clasen
76cc9a77c6 Add tests for g_{get,set,unset}env(). 2003-07-28 19:30:05 +00:00
Matthias Clasen
f723402708 Add g_setenv() and g_unsetenv(). (#100763)
* glib/gutils.[ch]: Add g_setenv() and g_unsetenv().  (#100763)
2003-07-28 19:24:22 +00:00
Matthias Clasen
5eb34aa96e test suite additions. 2003-07-26 09:24:46 +00:00
Matthias Clasen
971af34af9 New functions to remove a range of elements from an array. (#94879, Nalin
2003-07-26  Matthias Clasen  <maclas@gmx.de>

	* glib/garray.h:
	* glib/garray.c (g_{,byte,pointer}_remove_range): New functions to remove a range of elements
	from an array.  (#94879, Nalin Dahyabhai)
2003-07-26 08:03:16 +00:00
Matthias Clasen
ffa186dfc9 Remove the 1024 char limit in the common (non-recursive) case.
2003-07-26  Matthias Clasen  <maclas@gmx.de>

	* glib/gmessages.c (g_logv): Remove the 1024 char limit in the common (non-recursive)
	case.
2003-07-25 23:17:23 +00:00
Matthias Clasen
a412fb1654 Remove some explicit Docbook markup which is no longer necessary
since gtk-doc does the right thing.
2003-07-25 21:32:47 +00:00
Matthias Clasen
b205c9267b Work around gtk-doc stupidity.
2003-07-25  Matthias Clasen  <maclas@gmx.de>

	* glib/gutf8.c (g_utf8_get_char_validated): Work around gtk-doc stupidity.
2003-07-24 23:07:29 +00:00
Hans Breuer
2781d5f6b3 for msvc build
2003-07-20  Hans Breuer  <hans@breuer.org>

	* glib/trio/makefile.msc : (new file) for msvc build

	* glib/glib.def : removed some duplicated entries

	* glib/gscanner.c : add same workaround for MSVC(5.0)
	which does not allow to cast an uint64 to float.
	Same as in gvaluetransform.c
	Also move #include <io.h> behind inclusion of "glib.h"
	which defines the needed G_OS_WIN32

	* glib/makefile.msc.in : added gprintf.obj, trio\trio.lib
	as well as shell32.lib

	* tests/spawn-test.c : include <io.h> on win32
2003-07-20 15:55:09 +00:00
Matthias Clasen
5c808d7ca2 Doc additions.
2003-07-12  Matthias Clasen  <maclas@gmx.de>

	* glib/gprintf.c: Doc additions.

2003-07-12  Matthias Clasen  <maclas@gmx.de>

	* glib/tmpl/string_utils.sgml: Add a paragraph about string precision, add links to it.
	Remove markup which is now handled better by gtk-doc.
2003-07-10 18:24:46 +00:00
Joel Brich
ca44f7a4c8 Added "eo" to ALL_LINGUAS. Added Esperanto translation from Charles
2003-07-10  Joel Brich  <joel.brich@laposte.net>

	* configure.in: Added "eo" to ALL_LINGUAS.
	* po/eo.po: Added Esperanto translation
	from Charles Voegler <cvoegler@dweasel.com>
2003-07-10 18:24:46 +00:00
Manish Singh
103d290767 grammar fix 2003-07-10 00:16:46 +00:00
Manish Singh
ca1ff92c51 check if context->poll_chunk is set before trying to destroy it. For
Wed Jul  9 16:27:26 2003  Manish Singh  <yosh@gimp.org>

        * glib/gmain.c (g_main_context_unref_and_unlock): check if
        context->poll_chunk is set before trying to destroy it. For example,
        This can happen if no sources are added to a context before it is
        freed.
2003-07-09 23:31:20 +00:00
Morten Welinder
27b50b6d43 Avoid var declaration after statement.
2003-07-09  Morten Welinder  <terra@gnome.org>

	* glib/gprintf.c (g_vasprintf): Avoid var declaration after
	statement.
2003-07-09 19:32:16 +00:00
Matthias Clasen
876f907863 Support for one-time initialization functions. (#69668, Sebastian
2003-07-09  Matthias Clasen  <maclas@gmx.de>

	Support for one-time initialization functions.  (#69668, Sebastian Wilhelmi)

	* configure.in: Check whether double checked locking is safe, define g_once() in
	glibconfig.h accordingly.
	* glib/gthread.h: Add GOnce, GOnceStatus, G_ONCE_INIT and g_once_impl.
	* glib/gthread.c (g_once_impl): Fallback implementation using a mutex if double checked
	locking is unsafe.
	* tests/thread-test.c: Add tests for g_once().
2003-07-08 23:43:48 +00:00
Matthias Clasen
8940b82eb4 Move g_strfreev() docs inline.
2003-07-02  Matthias Clasen  <maclas@gmx.de>

	* glib/tmpl/string_utils.sgml: Move g_strfreev() docs inline.
2003-07-01 22:15:54 +00:00
Abigail Brady
5c903d283b Use C99 style \uxxxx and \Uxxxxyyyy escapes instead for fallback instead
2003-06-25  Abigail Brady  <morwen@evilmagic.org>

 	* glib/gconvert.c (g_convert_with_fallback): Use C99 style \uxxxx
 	and \Uxxxxyyyy escapes instead for fallback instead of perl-style
 	\X{xxxx} ones, fixing bug #114284.
2003-06-25 18:03:38 +00:00
Tor Lillqvist
98ba2b5ee3 Pass real &optval and &optlen to getsockopt() instead of NULL. Don't
2003-06-25  Tor Lillqvist  <tml@iki.fi>

	* glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and
	&optlen to getsockopt() instead of NULL. Don't remember why I
	thought that NULL could be used (as we don't actually use the
	returned value for anything), the Platform SDK documentation
	doesn't imply so.
2003-06-25 03:06:24 +00:00
Matthias Clasen
67c48e49ee Move the documentation inline and add details. (#108505) Move
2003-06-19  Matthias Clasen  <maclas@gmx.de>

	* glib/gutils.c (g_path_get_basename): Move the documentation
	inline and add details.  (#108505)
	* glib/tmpl/misc_utils.sgml: Move g_path_get_basename() docs inline.
2003-06-18 23:12:56 +00:00
Matthias Clasen
54f796b1b6 New macros to check for XML catalog contents and path, borrowed from
2003-06-17  Matthias Clasen  <maclas@gmx.de>

	* acinclude.m4 (JH_PATH_XML_CATALOG, JH_CHECK_XML_CATALOG): New
	macros to check for XML catalog contents and path, borrowed from
	gtk-doc.
	* configure.in: New option --enable-man to enable regeneration of
	man pages from Docbook, if the necessary tools are found.

	* gobject/Makefile.am: Add rule to regenerate man pages from
	Docbook.
	(man_MANS): Add glib-mkenums.1, glib-genmarshal.1 and gobject-query.1.
	(content_files): Add glib-mkenums.xml, glib-genmarshal.xml and
	gobject-query.xml.

	* gobject/glib-mkenums.xml:
	* gobject/glib-genmarshal.xml:
	* gobject/gobject-query.xml: New refentries.

	* gobject/glib-mkenums.1:
	* gobject/glib-genmarshal.1:
	* gobject/gobject-query.1: Man pages generated from the .xml
	sources.

	* gobject/gobject-docs.sgml: Include glib-mkenums.xml,
	glib-genmarshal.xml and gobject-query.xml.

	* glib/Makefile.am: Add rule to regenerate man pages from
	Docbook.
	(man_MANS): Add glib-gettextize.1.
	(content_files): Add glib-gettextize.xml.

	* glib/glib-gettextize.xml: New refentry.

	* glib/glib-gettextize.1: Man page generated from the .xml source.

	* glib/glib-docs.sgml: Include glib-gettextize.xml.
2003-06-17 23:08:37 +00:00
Tor Lillqvist
06781ec8ad Test where the DLLs actually are.
2003-06-15  Tor Lillqvist  <tml@iki.fi>

	* glib-zip.in (DLLDIR): Test where the DLLs actually are.

	* README.win32: Point to FSF's binary Win32 distributions of
	libiconv and gettext-runtime.
2003-06-15 23:20:14 +00:00
Tor Lillqvist
94fed3f988 libtool 1.5 installs DLLs in the bin subdirectory, so get them from there.
2003-06-11  Tor Lillqvist  <tml@iki.fi>

	* glib-zip.in (DEVZIP): libtool 1.5 installs DLLs in the bin
	subdirectory, so get them from there.

	* glib/gwin32.c (g_win32_getlocale): Use "sr@Latn" and "sr" in the
	same way as the po files for Serbian in Latin and Cyrillic script.
2003-06-11 22:06:16 +00:00
Sebastian Wilhelmi
e9c1f8f412 Remove false &. Spotted by Albert Chin
2003-06-11  Sebastian Wilhelmi  <seppi@seppi.de>

        * configure.in: Remove false &. Spotted by Albert Chin
        <gtk-devel-list@thewrittenword.com>.
2003-06-11 13:34:40 +00:00
Tor Lillqvist
51704100d0 Fix indentation and spacing. Use INADDR_LOOPBACK instead of
2003-06-08  Tor Lillqvist  <tml@iki.fi>

	* glib/giowin32.c: Fix indentation and spacing. Use
	INADDR_LOOPBACK instead of inet_addr("127.0.0.1") and
	gethostbyaddr().
2003-06-08 01:38:13 +00:00
Andy Lanoix
be76dd63f9 Resolved thread deadlocks in socket ichannel code to support
* glib/giowin32.c: Resolved thread deadlocks in socket
	ichannel code to support Add-Cancel-Add watch functionality
	on windows. Also cleaned up socket error handling to not
	segfault and do the right thing.
2003-06-07 20:31:28 +00:00
Hidetoshi Tajima
3bfb73d477 Test for Solaris native gettext in libc, seeing if it supports GNU catalog
Fri Jun  6 10:24:23 2003  Hidetoshi Tajima  <hidetoshi.tajima@sun.com>

	* m4macros/glib-gettext.m4: Test for Solaris native gettext
	in libc, seeing if it supports GNU catalog format (#85217).
2003-06-06 17:31:50 +00:00