Commit Graph

1462 Commits

Author SHA1 Message Date
Matthias Clasen
6726db0afb Protect against pw->pw_gecos being NULL.
Thu Jan 22 20:50:55 2004  Matthias Clasen  <maclas@gmx.de>

	* glib/gutils.c (g_get_any_init): Protect against
	pw->pw_gecos being NULL.
2004-01-22 19:48:33 +00:00
Matthias Clasen
1107a9f41a Don't treat the Win32 user name like a gecos field, and when extracting a
Thu Jan 22 00:41:34 2004  Matthias Clasen  <maclas@gmx.de>

	* glib/gutils.c (g_get_any_init): Don't treat the Win32
	user name like a gecos field, and when extracting a real
	name from a gecos field, replace '&' by the capitalized
	user name (a traditional passwd feature).
	(#118973, reported by Soeren Boll Overgaard)
2004-01-21 23:41:46 +00:00
Matthias Clasen
e2d5240179 Start of 2.3.2 section.
Tue Jan 20 22:31:22 2004  Matthias Clasen  <maclas@gmx.de>

	* NEWS: Start of 2.3.2 section.
2004-01-20 21:28:55 +00:00
Matthias Clasen
d95fb32186 Forgot to fix this one.
Fri Jan 16 21:45:56 2004  Matthias Clasen  <maclas@gmx.de>

	* glib/gstring.c (g_string_ascii_up): Forgot to fix this one.
2004-01-16 20:44:03 +00:00
Matthias Clasen
6c43e9ac9f Move initialization of variables after g_return_val_if_fail. (#131564,
Thu Jan 15 22:35:04 2004  Matthias Clasen  <maclas@gmx.de>

	* glib/gstring.c (g_string_up):
	* glib/gstring.c (g_string_down):
	* glib/gstring.c (g_string_ascii_up):
	* glib/gstring.c (g_string_ascii_down): Move initialization of
	variables after g_return_val_if_fail.  (#131564, Olivier Poncet)
2004-01-15 21:33:58 +00:00
Manish Singh
31a1fedf68 Add G_MAXSIZE, define in terms of G_MAXUfoo.
Sun Jan 11 16:13:20 2004  Manish Singh  <yosh@gimp.org>

        * configure.in: Add G_MAXSIZE, define in terms of G_MAXUfoo.

        * tests/type-test.c: Add test for G_MAXSIZE.

        * glibconfig.h.win32.in: Cleanup, add some missing bits.
2004-01-12 00:16:18 +00:00
Manish Singh
3fa27319e9 #define _POSIX_SOURCE for SSIZE_MAX. Fixes #128853.
Sun Jan 11 16:05:35 2004  Manish Singh  <yosh@gimp.org>

        * glib/giounix.c: #define _POSIX_SOURCE for SSIZE_MAX. Fixes #128853.
2004-01-12 00:06:54 +00:00
Manish Singh
2dfeabdd9b 64-bit cleanliness fixes.
Sat Jan 10 00:11:12 2004  Manish Singh  <yosh@gimp.org>

        * glib/gutils.h (g_bit_nth_lsf,g_bit_nth_msf): 64-bit cleanliness
        fixes.

        * docs/reference/glib/tmpl/misc_utils.sgml: update to reflect the
        above take gulongs now. My docs suck, someone should revisit it.
2004-01-10 08:15:24 +00:00
George Lebl
80591652ff Add the init_by_array functionality from the reference implementation of
Fri Dec 19 11:49:21 2003  George Lebl <jirka@5z.com>

        * glib/grand.c
          glib/grand.h (g_rand_new) (g_rand_new_with_seed)
          (g_rand_new_with_seed_array) (g_rand_set_seed_array):  Add
          the init_by_array functionality from the reference implementation
          of the mersenne twister (mt19937ar.c) and change the naming
          to fit with the rest of the grand API.  New functions are
          g_rand_new_with_seed_array, g_rand_set_seed_array.  This is only
          reliable/tested for the 2.2 version of the seeding as that's what
          the reference implementation uses.  Also modify g_rand_new to
          get 4 longs from /dev/urandom since that will always be available
          anyway and we get more entropy and if /dev/urandom is unavailable
          use also 4 longs for seeding using secs, usecs, getpid and getppid.
          For version 2.0 use only a simple seed again but be more careful
          about seeding with secs/usecs in this case.

        * glib/grand.c
          glib/grand.h (g_rand_copy):  Add g_rand_copy function to copy the
          current state of the random number generator.

        * glib/grand.c (g_rand_new):  Add testing for EINTR when reading
          from /dev/urandom

        * tests/rand-test.c: add testing of the array seeding stuff against
          the reference implementation, plus add statistical sanity check
          to see that the values outputted are truly kind of random.  And
          check that g_rand_copy truly copies the state by checking a few
          terms.
2004-01-10 01:38:55 +00:00
Owen Taylor
8f7232c914 Check defined (__OPTIMIZE__) not __OPTIMIZE__. (Zack Rusin)
Tue Jan  6 15:38:30 2004  Owen Taylor  <otaylor@redhat.com>

        * glib/gutils.h: Check defined (__OPTIMIZE__) not
        __OPTIMIZE__. (Zack Rusin)
2004-01-06 20:45:21 +00:00
Murray Cumming
10bacd6058 Added a lowercase_name option, to be used next to the enum declaration,
2003-12-30  Murray Cumming  <murrayc@usa.net>

        * gobject/glib-mkenums.in: Added a lowercase_name option, to be used
        next to the enum declaration, where the flag option is already used,
        when it is not possible to guess where to put the underscores in the
        _get_type() function name, for instance for GNOMEVFSURIHide.
2003-12-30 10:42:57 +00:00
Matthias Clasen
e09de99eb5 New function to call a function for each element of a GPtrArray. (#114790)
Fri Dec 26 02:03:58 2003  Matthias Clasen  <maclas@gmx.de>

	* glib/garray.[hc] (g_ptr_array_foreach): New function to
	call a function for each element of a GPtrArray.  (#114790)

	* tests/array-test.c (main): Add a test for g_ptr_array_foreach().
2003-12-26 01:04:12 +00:00
Matthias Clasen
355807fff6 Quote macro names to support reading the file multiple times. (#125537)
Sun Dec 21 22:57:58 2003  Matthias Clasen  <maclas@gmx.de>

	* m4macros/glib-gettext.m4: Quote macro names to support
	reading the file multiple times.  (#125537)
2003-12-21 21:57:32 +00:00
Matthias Clasen
53e132ed39 Fix the locking of the mem_chunks list. (#127096, Balazs Scheidler)
Sun Dec 21 22:42:42 2003  Matthias Clasen  <maclas@gmx.de>

	* glib/gmem.c (g_mem_chunk_destroy): Fix the locking of the
	mem_chunks list.  (#127096, Balazs Scheidler)
2003-12-21 21:51:39 +00:00
Hans Breuer
aaa2ab083e make g_file_test(,G_FILE_TEST_IS_EXECUTABLE) return something useful on
2003-12-14  Hans Breuer  <hans@breuer.org>

	* glib/gfileutils.c : make g_file_test(,G_FILE_TEST_IS_EXECUTABLE)
	return something useful on win32, too.
2003-12-14 19:05:29 +00:00
Hans Breuer
35a6cff869 get_filename_charset() needs to return false for filenames not encoded in
2003-12-13  Hans Breuer  <hans@breuer.org>

	* glib/gconvert.c : get_filename_charset() needs to
	return false for filenames not encoded in utf-8,
	which is always true on win32

	* glibconfig.h.win32.in : (u)int64 modifier isn't the
	gcc 'll' but always the msvcrt one 'I64'

	* glib/glib.def : updated
2003-12-13 14:38:18 +00:00
Manish Singh
db16c1be2b change #elif with no expression to #else in G_STRFUNC definition. Thanks
Thu Dec 11 10:31:21 2003  Manish Singh  <yosh@gimp.org>

        * glib/gmacros.h: change #elif with no expression to #else in
        G_STRFUNC definition. Thanks to Damien Carbery, fixes #129101.
2003-12-11 18:31:46 +00:00
Owen Taylor
f2241f6e87 === Released 2.3.1 ===
Mon Dec  8 12:02:40 2003  Owen Taylor  <otaylor@redhat.com>

        * === Released 2.3.1 ===

        * NEWS: Further updates for 2.3.1.
2003-12-08 17:18:42 +00:00
Manish Singh
267031000f fix gint/gsize confusion.
Fri Dec  5 12:09:13 2003  Manish Singh  <yosh@gimp.org>

        * glib/gunidecomp.c (_g_utf8_normalize_wc): fix gint/gsize confusion.
2003-12-05 20:09:34 +00:00
Noah Levitt
45b1590923 Add hangul composition and decomposition to unicode normalization.
2003-12-04  Noah Levitt  <nlevitt@columbia.edu>

	* glib/gunidecomp.c: Add hangul composition and decomposition to
	unicode normalization. (#100456)

	* tests/unicode-normalize.c: Test hangul.
2003-12-04 19:47:52 +00:00
Matthias Clasen
04c96e8fa3 Fix for #103710, Mark Jones:
Tue Dec  2 02:29:41 2003  Matthias Clasen  <maclas@gmx.de>

	Fix for #103710, Mark Jones:

	* glib/gtypes.h (G_MAXINT64): Define G_{MIN,MAX,MAXU}INT{8,16,32,64}.
	* configure.in: Don't put G_{MIN,MAX,MAXU}INT64 in glibconfig.h.
2003-12-02 01:31:43 +00:00
Tim Janik
5d49a7caf7 handle NULL arguments gracefully.
Thu Nov 27 17:04:08 2003  Tim Janik  <timj@gtk.org>

        * glib/gstrfuncs.c (g_strconcat): handle NULL arguments
        gracefully.

        * glib/gmacros.h: defined G_STRFUNC, which (pretty) prints the
        current function (since G_STRLOC and G_GNUC_*FUNCTION became
        unusable with gcc-3.0).
2003-11-27 17:08:58 +00:00
Roozbeh Pournader
6e3b71aec3 Fixed a bad pointer comparison in g_ascii_strtod that came up in fa_IR
Wed Nov 26 16:45:16 2003  Roozbeh Pournader  <roozbeh@sharif.edu>

        * glib/gstrfuncs.c: Fixed a bad pointer comparison in
        g_ascii_strtod that came up in fa_IR locale (#126640, Behdad
        Esfahbod).

        * tests/strtod-test.c: Fixed the tests to catch the above.
2003-11-26 13:22:42 +00:00
15 2003 Andrew Lanoix
94d79f087b Bind inter-thread comminication sockets to INADDR_LOOPBACK instead of
Sat Nov 22 14:16:51.15 2003  Andrew Lanoix  <alanoix@umich.edu>

* glib/giowin32.c: Bind inter-thread comminication
sockets to INADDR_LOOPBACK instead of INADDR_ANY.
2003-11-22 19:28:04 +00:00
Manish Singh
b5ae75aa4a Added G_GSIZE_FORMAT and friends.
Thu Nov 20 15:09:40 2003  Manish Singh  <yosh@gimp.org>

        * configure.in: Added G_GSIZE_FORMAT and friends.

        * tests/printf-test.c
        * tests/testglib.c
        * tests/type-test.c: Add tests for the above.
2003-11-20 23:12:05 +00:00
Manish Singh
2b78955298 Use GUINT_TO_POINTER for g_thread_create data.
Mon Nov 17 17:28:10 2003  Manish Singh  <yosh@gimp.org>

        * tests/thread-test.c (test_g_thread_once): Use GUINT_TO_POINTER
        for g_thread_create data.
2003-11-18 01:29:36 +00:00
Matthias Clasen
0fd4b6d674 Add a NULL check to be consistent with the other g_utf8_ functions.
Sat Nov 15 23:00:57 2003  Matthias Clasen  <maclas@gmx.de>

	* glib/guniprop.c (g_utf8_casefold): Add a NULL check
	to be consistent with the other g_utf8_ functions.  (#121618,
	Tim-Philipp Müller)
2003-11-15 22:04:39 +00:00
Tor Lillqvist
d1a3a46ae8 Fix for MSVC build: Skip strtod-test, use correct glib libraries, with 2.0
2003-11-15  Tor Lillqvist  <tml@iki.fi>

	* tests/makefile.msc.in: Fix for MSVC build: Skip strtod-test, use
	correct glib libraries, with 2.0 in the names. (#126906, John
	Ehresman)
2003-11-15 03:08:57 +00:00
Matthias Clasen
f3a59d07bc Don't blindly set glib_cv_long_long_format to "ll" when using the included
Sat Nov 15 00:46:14 2003  Matthias Clasen  <maclas@gmx.de>

	* configure.in: Don't blindly set glib_cv_long_long_format to
	"ll" when using the included printf. As long as the native
	printf supports 64bit printing, use the native format.
	(#119525, Tor Lillquist)
2003-11-14 23:48:03 +00:00
Owen Taylor
9feec516be Version 2.3.1, interface age 0.
Wed Nov 12 15:06:27 2003  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Version 2.3.1, interface age 0.

        * NEWS: Update for 2.3.1.
2003-11-12 20:28:35 +00:00
Mark McLoughlin
57f22f15be re-work to retain a copy of the cached charset rather than the actual
2003-11-07  Mark McLoughlin  <mark@skynet.ie>

        * glib/gconvert.c: (get_filename_charset): re-work to
        retain a copy of the cached charset rather than the
        actual return value from g_get_charset (which may
        change). Also, re-initialize the cache if it does
        change. See bug #126454.
2003-11-09 13:17:23 +00:00
Matthias Clasen
42f0cca05a Replacement for have_broken_filenames() which consults the environment
Thu Nov  6 00:04:46 2003  Matthias Clasen  <maclas@gmx.de>

	* glib/gconvert.c (get_filename_charset): Replacement for
	have_broken_filenames() which consults the environment variable
	G_FILENAME_ENCODINGS in addition to G_BROKEN_FILENAMES.
	* glib/gconvert.c (g_filename_from_utf8):
	* glib/gconvert.c (g_filename_to_utf8):
	* glib/gconvert.c (_g_convert_thread_init): Use
	get_filename_charset() instead of have_broken_filenames().
2003-11-05 23:05:49 +00:00
Matthias Clasen
2807b4e6eb New headers defining common gettext-support macros.
Wed Nov  5 22:05:19 2003  Matthias Clasen  <maclas@gmx.de>

	* glib/gi18n-lib.h:
	* glib/gi18n.h: New headers defining common gettext-support
	macros.

	* glib/Makefile.am (glibsubinclude_HEADERS): Add gi18n.h
	and gi18n-lib.h.

	* glib/gstrfuncs.h:
	* glib/gstrfuncs.c (g_strip_context): Auxiliary function for
	the implementation of Q_().
2003-11-05 21:07:47 +00:00
Morten Welinder
36715ffb1e Make it compile. (#119337, self.)
2003-11-05  Morten Welinder  <terra@gnome.org>

	* glib/garray.c (g_ptr_array_remove_range): Make it compile.
	(#119337, self.)
2003-11-05 17:15:24 +00:00
Morten Welinder
3b2f74d188 Handle the case where the to-be-inserted string is a substring of the
2003-11-05  Morten Welinder  <terra@gnome.org>

	* glib/gstring.c (g_string_insert_len): Handle the case where the
	to-be-inserted string is a substring of the target string.
	(g_string_assign): Handle "s = s;".
	(#114260, self.)
2003-11-05 16:24:44 +00:00
Matthias Clasen
76433d5365 Fix 64bit printing for MSVC builds (#119292, Hans Breuer):
Sun Nov  2 01:47:31 2003  Matthias Clasen  <maclas@gmx.de>

	Fix 64bit printing for MSVC builds (#119292, Hans Breuer):

	* configure.in (HAVE_INT64_AND_I64): Define for MSVC to
	include support for printing __int64 with format %I64 in
	the gnulib printf wrappers.
	* glib/gnulib/printf-args.h (enum arg_type): Add TYPE_INT64
	and TYPE_UINT64.
	* glib/gnulib/printf-args.h (struct argument): Add a_int64 and
	a_uint64 members.
	* glib/gnulib/printf-args.c (printf_fetchargs): Support
	TYPE_INT64 and TYPE_UINT64.
	* glib/gnulib/printf-parse.c (printf_parse): Parse I64 format
	modifier and map formats to TYPE_INT64.
	* glib/gnulib/vasnprintf.c (vasnprintf): Print TYPE_INT64 with
	format modifier I64.
	* glib/gnulib/README: Document the __int64 support.
2003-11-02 00:54:02 +00:00
Owen Taylor
3f1a49ea41 Set the return value from the result of g_main_context_check() (after we
Sat Nov  1 08:45:38 2003  Owen Taylor  <otaylor@redhat.com>

        * glib/gmain.c (g_main_context_iterate): Set the
        return value from the result of g_main_context_check()
        (after we poll) rather than g_main_context_prepare.
        (#121675, Padraig O'Briain)
2003-11-01 13:57:48 +00:00
Matthias Clasen
4dbdd6e05e Remove the semicolon from the definition of g_once(), so that
Fri Oct 31 00:13:53 2003  Matthias Clasen  <maclas@gmx.de>

	* configure.in: Remove the semicolon from the definition of
	g_once(), so that GPOINTER_TO_INT (g_once (...)) works.
2003-10-30 23:17:57 +00:00
Matthias Clasen
c582b7ad60 Change the %e tests to not check for actual string equality, but rather
Tue Oct 28 23:38:30 2003  Matthias Clasen  <maclas@gmx.de>

	* tests/printf-test.c: Change the %e tests to not check for
	actual string equality, but rather equality under g_ascii_strtod(),
	since the number of leading digits in the exponent seems to
	be not exactly prescribed by SUS.
2003-10-28 22:40:51 +00:00
Owen Taylor
05d097adb6 === Released 2.3.0 ===
Fri Oct 24 17:09:04 2003  Owen Taylor  <otaylor@redhat.com>

        * === Released 2.3.0 ===

        * NEWS: Small update.
2003-10-24 21:28:34 +00:00
Tor Lillqvist
5d097b8591 Force shared library (DLL) only on Windows. (I don't think that is
2003-10-24  Tor Lillqvist  <tml@iki.fi>

	* configure.in: Force shared library (DLL) only on Windows.
	(I don't think that is controversial?) Remove unnecessary
	AC_LIBTOOL_WIN32_DLL. Don't use -D_REENTRANT on
	Win32, it is not used by mingw or MSVC headers.

	* config.h.win32.in
	* glibconfig.h.win32.in: Match what configure produces.

	* glib/gconvert.c
	* glib/gutils.c: Mark a couple of functions and variables that
	aren't public as static.

	* glib/gnulib/g-gnulib.h: Undef HAVE_SNPRINTF before (re)defining
	it potentially differently, to silence compiler.

	* glib/glib.def: Add some missing entries.

	* tests/gobject/Makefile.am (LDADD): Reorder, put libgobject after
	libtestgobject.

	* tests/gobject/ifaceproperties.c (main): NULL-terminate arg list
	to g_object_set() and _get().
2003-10-24 03:41:22 +00:00
Owen Taylor
dfa8c540a1 === Released 2.3.0 ===
Thu Oct 23 12:38:24 2003  Owen Taylor  <otaylor@redhat.com>

        * === Released 2.3.0 ===

        * tests/gobject/Makefile.am (dist-hook): Remove
        and extra backslash.

        * tests/gobject/Makefile.am (EXTRA_DIST): Add
        testmarshal.list.

        * glib/Makefile.am (libglib_2_0_la_SOURCES): Add
        missing gunicode-private.h.

        * tests/testglib.c (main): Fix a warning.

        * tests/gobject/ifaceinherit.c: Remove check that
        wasn't supposed to work (adding an interface already
        added to the derived class to the base class),
        fix a bug.
2003-10-23 22:42:31 +00:00
Matthias Clasen
9c8150fd35 Update NEWS for 2.3.0. 2003-10-22 21:41:45 +00:00
Owen Taylor
7f2591cb0b Test for interface properties and GParamSpecOverride.
Tue Oct 14 17:44:38 2003  Owen Taylor  <otaylor@redhat.com>

        * tests/gobject/ifaceproperties.c: Test for interface
        properties and GParamSpecOverride.
2003-10-21 19:15:07 +00:00
Matthias Clasen
fce9dce6b3 Document as 2.4 additions. (unescape_text): Implement newline and
Wed Oct  8 23:40:26 2003  Matthias Clasen  <maclas@gmx.de>

	* glib/gmarkup.c (g_markup_printf_escaped):
	(g_markup_vprintf_escaped): Document as 2.4 additions.
	(unescape_text): Implement newline and whitespace normalization
	according to the XML specification.  (#123919)
	(g_markup_escape_text): Document whitespace (non)handling.
2003-10-08 21:44:04 +00:00
Matthias Clasen
9a76ff17c1 Make the various printf feature test macros reflect the system printf,
2003-10-05  Matthias Clasen  <maclas@gmx.de>

	* configure.in: Make the various printf feature test macros
	reflect the system printf, even when using the included printf.
	In particular, don't force HAVE_C99_SNPRINTF, since g-gnulib.h
	needs that test result.  (#122973)

	* glib/gprintf.c (g_vasprintf): Don't rely on HAVE_VASPRINTF,
	directly check for _g_vasprintf.

	* glib/gprintfint.h (_g_vasprintf): Only define _g_vasprintf()
	if vasprintf() is available.

	* glib/gnulib/printf.c (_g_gnulib_vfprintf): Don't write
	trailing nul to the file. (#122973)

	* acinclude.m4 (AC_FUNC_VSNPRINTF_C99): Make the test
	detect non-C99-compliance of AIX 5.1 and Solaris
	vsnprintf().  (#122496)
2003-10-04 23:24:02 +00:00
Owen Taylor
3e61c90b59 Test case for g_type_add_interface_check().
Thu Oct  2 01:15:46 2003  Owen Taylor  <otaylor@redhat.com>

        * tests/gobject/ifacecheck.c: Test case for
        g_type_add_interface_check().

        * tests/gobject/ifaceinit.c: Add #undef G_DISABLE_ASSERT.
2003-10-02 05:28:00 +00:00
Owen Taylor
27d3ebfde3 Remove some tests that were testing things that weren't supposed to work;
Thu Oct  2 01:11:39 2003  Owen Taylor  <otaylor@redhat.com>

        * tests/gobject/ifaceinherit.c: Remove some tests that
        were testing things that weren't supposed to work; add
        a test for adding an interface first to the child class,
        then to the parent class.
2003-10-02 05:13:21 +00:00
Owen Taylor
49d18d8d41 Tests of interface inheritance and overriding.
Thu Oct  2 00:02:55 2003  Owen Taylor  <otaylor@redhat.com>

        * tests/gobject/Makefile.am test/gobject/ifaceinherit.c:
        Tests of interface inheritance and overriding.
2003-10-02 04:03:57 +00:00
Tor Lillqvist
d007fe41d9 Call protect_argv() in do_spawn() instead of in do_spawn_with_pipes() so
2003-09-30  Tor Lillqvist  <tml@iki.fi>

	* glib/gspawn-win32.c (do_spawn): Call protect_argv() in
	do_spawn() instead of in do_spawn_with_pipes() so that we can use
	the original argv[0] as the program file name parameter to
	spawnv() in the shortcut (doing without helper process)
	code. Fixes problem if GIMP 1.3 was installed in a path with
	spaces in the name.
2003-09-30 20:04:51 +00:00