1. 12 Apr, 2006 1 commit
  2. 04 Apr, 2006 1 commit
    • Matthias Clasen's avatar
      Move short_month_names and long_month_names to bss. · b58fb2bd
      Matthias Clasen authored
      2006-04-04  Matthias Clasen  <mclasen@redhat.com>
      
              * glib/gdate.c: Move short_month_names and long_month_names
              to bss.
      
              * glib/gspawn-win32.c (g_spawn_error_quark):
              * glib/gspawn.c (g_spawn_error_quark):
              * glib/gshell.c (g_shell_error_quark):
              * glib/gmarkup.c (g_markup_error_quark):
              * glib/goption.c (g_option_error_quark):
              * glib/gkeyfile.c (g_key_file_error_quark):
              * glib/giochannel.c (g_io_channel_error_quark):
              * glib/gfileutils.c (g_file_error_quark):
              * glib/gconvert.c (g_convert_error_quark):
              * glib/gbookmarkfile.c (g_bookmark_file_error_quark):
              * glib/gthread.c (g_thread_error_quark): No point in making
              the error path fast by caching quarks.
      
              * glib/gbookmarkfile.c: Make the parser struct const.
      b58fb2bd
  3. 16 Jan, 2006 1 commit
    • Matthias Clasen's avatar
      Fix bug 326747, Alberto Ruiz: · 11a3e72c
      Matthias Clasen authored
      2006-01-16  Matthias Clasen  <mclasen@redhat.com>
      
      	Fix bug 326747, Alberto Ruiz:
      
      	* glib/gconvert.c (make_valid_utf8): Change this function to
      	replace unknown characters by the Unicode replacement character
      	instead of '?', and don't append "(invalid encoding)".
      	(g_filename_display_name, g_filename_display_basename): Document
      	how to determine if the filename was in an invalid encoding.
      11a3e72c
  4. 08 Aug, 2005 1 commit
    • Matthias Clasen's avatar
      Enable the endianness test. · 717f3d4a
      Matthias Clasen authored
      2005-08-08  Matthias Clasen  <mclasen@redhat.com>
      
      	* tests/convert-test.c: Enable the endianness test.
      
      	* glib/gconvert.c: Make the caching of iconv descriptors
      	optional.
      
      	* configure.in: Add an --enable-iconv-cache option, and
      	default to disabling iconv caching on new enough glibc.
      	Somebody with access to Solaris systems will need to test
      	if opening/closing of iconv descriptors is enough of
      	a performance problem to warrant the caching on that
      	platform. Note that the caching is causing correctness
      	problems in some corner cases, thus turning it off
      	is desirable unless it has severe performance implications.
      717f3d4a
  5. 02 Aug, 2005 3 commits
  6. 27 Apr, 2005 1 commit
    • Tor Lillqvist's avatar
      Don't call g_set_error() unless the GError pointer is non-NULL. This · dc11b437
      Tor Lillqvist authored
      2005-04-27  Tor Lillqvist  <tml@novell.com>
      
      	* glib/gconvert.c (open_converter, g_convert_with_iconv): Don't
      	call g_set_error() unless the GError pointer is non-NULL. This
      	avoids infinite recursion problems in certain rare situations on
      	Windows, when g_locale_from_utf8() is called from
      	_glib_get_locale_dir() after the change below. It's the
      	_glib_gettext() calls to translate error messages that are
      	parameters to g_set_error() that cause the recursion, not
      	g_set_error() itself.
      
      	* glib/gwin32.c (g_win32_locale_filename_from_utf8): New
      	function. Converts a filename to the system codepage, and if a
      	straight conversion isn't possible (because the filename contains
      	characters not in the system codepage), try looking up the
      	filename (which should refer to an existing file for this to
      	succeed) with short (8.3) pathname components.
      
      	* glib/gutils.c (_glib_get_locale_dir): No need to cache the
      	result, this function is normally called only once. Return the
      	path to the locale directory in system codepage, not UTF-8. The
      	path is passed to bindtextdomain(), which doesn't use UTF-8 file
      	names. Use g_win32_locale_filename_from_utf8(). (#301772)
      
      	Don't do run-time lookup of message catalog directory on
      	Cygwin. Cygwin is supposed to look and feel like Unix, and on Unix
      	we use paths fixed at configure time.
      dc11b437
  7. 05 Apr, 2005 1 commit
  8. 14 Mar, 2005 1 commit
    • Matthias Clasen's avatar
      Make PLT-reduction work with gcc4, and don't include everything in · 608a31b9
      Matthias Clasen authored
      2005-03-13  Matthias Clasen  <mclasen@redhat.com>
      
      	Make PLT-reduction work with gcc4, and don't include
      	everything in galias.h:
      
      	* glib/glib.symbols: Group symbols by header and source file.
      	* glib/makegalias.pl: Protect definitions by the same
      	preprocessor symbols used to guard the headers. Move
      	the alias declarations to a separate file which is
      	produced when calling makegalias.pl -def
      	* glib/Makefile.am (galiasdef.c): Add a rule to generate this
      	file.
      	* glib/*.c: Include galias.h after the other GLib headers,
      	include galiasdef.c at the bottom.
      608a31b9
  9. 17 Jan, 2005 1 commit
  10. 20 Dec, 2004 1 commit
    • Tor Lillqvist's avatar
      Improve docs. · 8693257c
      Tor Lillqvist authored
      2004-12-20  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gconvert.c (g_locale_to_utf8, g_filename_to_uri): Improve
      	docs.
      8693257c
  11. 15 Dec, 2004 2 commits
  12. 12 Dec, 2004 1 commit
  13. 10 Nov, 2004 1 commit
    • Tor Lillqvist's avatar
      Fix typo in doc comment. · 3eaeb13a
      Tor Lillqvist authored
      2004-11-10  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gconvert.c (g_get_filename_charsets): Fix typo in doc
      	comment.
      3eaeb13a
  14. 04 Nov, 2004 1 commit
    • Tor Lillqvist's avatar
      Document that the result is guaranteed to be non-NULL. · 912ba0d4
      Tor Lillqvist authored
      2004-11-04  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gconvert.c (g_filename_display_name): Document that the
      	result is guaranteed to be non-NULL.
      
      	* glib/gfileutils.c (get_contents_stdio, get_contents_regfile,
      	get_contents_posix, get_contents_win32, g_file_open_tmp,
      	g_file_read_link): Use g_filename_display_name() for error
      	messages.
      	(g_mkstemp): Document that the template should be in the GLib file
      	name encoding.
      	(g_file_open_tmp): Ditto. Also document that the actual name
      	returned is also in the GLib file name encoding.
      912ba0d4
  15. 02 Nov, 2004 2 commits
  16. 01 Nov, 2004 1 commit
  17. 27 Oct, 2004 1 commit
    • Matthias Clasen's avatar
      Introduce the idea of a filename encoding, which is *literally* the · 8a7eecd7
      Matthias Clasen authored
      2004-10-27  Matthias Clasen  <mclasen@redhat.com>
      
      	Introduce the idea of a filename encoding, which is
      	*literally* the filename encoding on Unix. On windows,
      	use the Unicode name converted to UTF-8. (#156325,
      	Tor Lillqvist, Owen Taylor)
      
      	* glib/gdir.[hc]:
      	* glib/gconvert.[hc]:
      	* glib/gfileutils.[hc]:
      	* glib/gutils.[hc]:
      	* glib/giowin32.c: On Windows, keep old ABI versions
      	of GLib pathname api for DLL ABI stability. Use different
      	names for the new-style UTF-8 versions. Hide this through
      	a #define.
      
      	* glib/gstdio.[hc]: New files containing wrappers for
      	POSIX pathname api.
      
      	* glib/glib.symbols: Add new symbols.
      
      	* glib/makegalias.pl: Drop Win32 specific .def syntax,
      	include gstdio.h
      8a7eecd7
  18. 22 Oct, 2004 1 commit
    • Matthias Clasen's avatar
      Add some uri list tests.c. · 8df27c8d
      Matthias Clasen authored
      2004-10-22  Matthias Clasen  <mclasen@redhat.com>
      
      	* tests/uri-test.c (run_uri_list_tests): Add some
      	uri list tests.c.
      
      	* glib/gconvert.h:
      	* glib/gconvert.c (g_uri_list_extract_uris): New function to
      	split a text/uri-list data into individual uris and strip comments.
      8df27c8d
  19. 16 Sep, 2004 1 commit
  20. 02 Aug, 2004 1 commit
    • Matthias Clasen's avatar
      Add a G_GNUC_INTERNAL macro to mark function declarations as internal and · f1024215
      Matthias Clasen authored
      2004-08-02  Matthias Clasen  <mclasen@redhat.com>
      
      	* glib/gmacros.h: Add a G_GNUC_INTERNAL macro to mark function
      	declarations as internal and avoid PLT indirections for
      	them.  (#145465, Arjan van de Ven)
      
      	* glib/gunicodeprivate.h:
      	* glib/gthreadinit.h:
      	* glib/gmessages.h:
      	* glib/gdebug.h:
      	* glib/gconvert.c: Use G_GNUC_INTERNAL for _g_charset_get_aliases(),
      	_g_debug_init(), _g_log_fallback_handler(), _g_mem_thread_init(),
      	_g_messages_thread_init(), _g_convert_thread_init(),
      	_g_rand_thread_init(), _g_main_thread_init(), _g_atomic_thread_init(),
      	_g_mem_thread_private_init(), _g_messages_thread_private_init(),
      	_g_utf8_normalize_wc() and _g_unichar_combining_class().
      
      	* glib/gatomic.c: Include gthreadinit.h here to see the declaration
      	for _g_atomic_thread_init().
      f1024215
  21. 30 Jul, 2004 1 commit
    • Matthias Clasen's avatar
      Don't validate for UTF-8 here. (#148420, Robert Ögren) · 0611985d
      Matthias Clasen authored
      2004-07-30  Matthias Clasen  <mclasen@redhat.com>
      
      	* glib/gconvert.c (g_unescape_uri_string): Don't validate
      	for UTF-8 here.  (#148420, Robert Ögren)
      
      	* tests/uri-test.c (run_roundtrip_tests): Add tests for
      	roundtrip compatibility. Going from filename to uri and
      	back should always give you the same filename back.
      0611985d
  22. 08 Jun, 2004 1 commit
    • Federico Mena Quintero's avatar
      Fixes #140532. · 6fa064ec
      Federico Mena Quintero authored
      2004-06-07  Federico Mena Quintero  <federico@ximian.com>
      
      	Fixes #140532.
      
      	* glib/gconvert.c (is_asciialphanum): Renamed from
      	is_escalphanum(); ensures that this is an ASCII character.
      	(is_asciiescalpha): Renamed from is_escalpha().
      	(hostname_validate): Use the two functions above.
      	(g_filename_to_uri): Don't convert the filename to UTF-8.
      	(g_filename_from_uri): Don't convert the filename from UTF-8.
      6fa064ec
  23. 06 May, 2004 1 commit
  24. 23 Apr, 2004 1 commit
  25. 13 Dec, 2003 1 commit
    • Hans Breuer's avatar
      get_filename_charset() needs to return false for filenames not encoded in · 35a6cff8
      Hans Breuer authored
      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
      35a6cff8
  26. 09 Nov, 2003 1 commit
  27. 05 Nov, 2003 1 commit
    • Matthias Clasen's avatar
      Replacement for have_broken_filenames() which consults the environment · 42f0cca0
      Matthias Clasen authored
      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().
      42f0cca0
  28. 24 Oct, 2003 1 commit
    • Tor Lillqvist's avatar
      Force shared library (DLL) only on Windows. (I don't think that is · 5d097b85
      Tor Lillqvist authored
      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().
      5d097b85
  29. 13 Aug, 2003 1 commit
    • Tor Lillqvist's avatar
      Drop the Win32-specific implementation. It used WideCharToMultiByte(), · 2b553df5
      Tor Lillqvist authored
      2003-08-12  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gconvert.c (g_locale_from_utf8): Drop the Win32-specific
      	implementation. It used WideCharToMultiByte(), which is broken as
      	it stores unconvertable characters as fallback characters
      	(question marks) in the destination string without being able to
      	tell how much of the conversion succeeded. Using g_convert() like
      	on Unix is better and simpler. (#117872)
      
      	(g_locale_to_utf8): No need for the Win32-specific implementation
      	here, either.
      
      	(have_broken_filenames): Define as TRUE on Win32.
      
      	(g_filename_to_utf8, g_filename_from_utf8): Drop Win32 ifdefs. As
      	have_broken_filenames() now is defined TRUE on Win32, works as
      	before.
      2b553df5
  30. 29 Jul, 2003 1 commit
  31. 25 Jul, 2003 1 commit
  32. 25 Jun, 2003 1 commit
  33. 30 Mar, 2003 1 commit
  34. 14 Feb, 2003 1 commit
    • Sebastian Wilhelmi's avatar
      Fixes for #101264 and #99372: · 8e91cf9e
      Sebastian Wilhelmi authored
      
      2003-02-14  Sebastian Wilhelmi  <seppi@seppi.de>
      
      	Fixes for #101264 and #99372:
      
      	* glib/gconvert.h, glib/gmain.c, glib/gmem.c, glib/gmessages.c,
      	glib/grand.c: Include gthreadinit.h and rename the thread
      	initialization functions a bit and let them start with _, so that
      	later we can stop exporting them.
      
      	* glib/gmem.c, glib/gmessages.c: Move the g_private_new() calls to
      	new functions. They have to be called after setting
      	g_threads_got_initialized to TRUE (see #101264).
      
      	* glib/gthread.c: Include gthreadinit.h. Renamed g_mutex_init() to
      	g_thread_init_glib(). Call the thread initialization functions
      	(which are not allowed to call g_private_new), then set
      	g_threads_got_initialized to TRUE, then call the other thread
      	initialization functions (which must not call anything but
      	g_private_new()).
      
      	* glib/gthreadinit.h: New private header to cleanly declare all
      	thread initialization functions.
      
      	* gthread/gthread-impl.c: Include gthreadinit.h. In
      	g_thread_init() just call g_thread_init_glib(), which in turn calls the
      	other functions (see #99372).
      
      	* glib/Makefile.am: Added gthreadinit.h.
      8e91cf9e
  35. 04 Dec, 2002 1 commit
  36. 21 Nov, 2002 1 commit
    • Matthias Clasen's avatar
      Include a printf implementation supporting C99 snprintf and SUS · bc54ea6e
      Matthias Clasen authored
      	positional parameters:  (#79488)
      
      	* glib/gstrfuncs.c:
      	* glib/gspawn-win32.c:
      	* glib/gscanner.c:
      	* glib/gconvert.c:
      	* glib/gbacktrace.c: Use _g_printf wrappers.
      
      	* glib/gutils.c (g_vsnprintf): Simplify, since we can assume C99
      	snprintf semantics now.
      
      	* glib/gmessages.c (printf_string_upper_bound): No longer needed,
      	since we can assume C99 snprintf semantics now.
      	(g_logv): Simplify.
      
      	* acinclude.m4 (AC_FUNC_PRINTF_UNIX98): New macro to check wether
      	printf supports SUS positional parameters.
      
      	* configure.in: New option --enable-included-printf to force
      	compilation of trio; otherwise trio is compiled if the system
      	printf misses either C99 snprintf semantics of SUS positional
      	parameters.
      
      	* glib/Makefile.am (SUBDIRS): Conditionally compile trio.
      	(libglib_2_0_la_SOURCES): Add gprintf.c and gprintfint.h.
      	(glibsubinclude_HEADERS): Add gprintf.h.
      
      	* glib/gprintfint.h: New private wrapping either system printf
      	or trio printf variants in _g_printf wrappers for use inside glib.
      
      	* glib/gprintf.h: New public header declaring g_printf variants.
      	* glib/gprintf.c: Corresponding implementations.
      
      	* glib/trio/*: New directory, containing the trio-1.9 sources.
      
      	* glib/tmpl/string_utils.sgml: Add note on including gprintf.h,
      	move some docs inline.
      
      	* glib/glib-sections.txt: Add g_printf, g_vprintf, g_fprintf,
      	g_vfprintf, g_sprintf, g_vsprintf.
      bc54ea6e