1. 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
  2. 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
  3. 02 Nov, 2004 2 commits
  4. 01 Nov, 2004 1 commit
  5. 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
  6. 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
  7. 16 Sep, 2004 1 commit
  8. 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
  9. 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
  10. 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
  11. 06 May, 2004 1 commit
  12. 23 Apr, 2004 1 commit
  13. 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
  14. 09 Nov, 2003 1 commit
  15. 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
  16. 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
  17. 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
  18. 29 Jul, 2003 1 commit
  19. 25 Jul, 2003 1 commit
  20. 25 Jun, 2003 1 commit
  21. 30 Mar, 2003 1 commit
  22. 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
  23. 04 Dec, 2002 1 commit
  24. 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
  25. 20 Aug, 2002 1 commit
  26. 25 Jul, 2002 2 commits
    • Owen Taylor's avatar
      Handle the end of the string properly when max_len is set. (#88545, Morten · bedbbabb
      Owen Taylor authored
      Thu Jul 25 19:52:41 2002  Owen Taylor  <otaylor@redhat.com>
      
              * glib/guniprop.c (real_tolower): Handle the
              end of the string properly when max_len is set.
              (#88545, Morten Welinder.) Rename the next_t
              variable to next_type to make cc-mode happy.
      
              * glib/gconvert.c (g_iconv_open): Fix missing
              label from previous commit.
      bedbbabb
    • Owen Taylor's avatar
      Document the (GIConv)-1 return value on failure. (#87559, Jarek Dukat) · 2658448f
      Owen Taylor authored
      Thu Jul 25 17:57:07 2002  Owen Taylor  <otaylor@redhat.com>
      
              * glib/gconvert.c (g_iconv_open): Document the
              (GIConv)-1 return value on failure. (#87559,
              Jarek Dukat)
      
              * glib/gconvert.c (g_iconv_open): Fix potential
              problems with the assumption that (GIConv)(iconv_t)-1
              is the same as (GIConv)-1.
      2658448f
  27. 11 Jun, 2002 1 commit
  28. 20 Mar, 2002 1 commit
  29. 13 Mar, 2002 2 commits
    • Erwann Chenede's avatar
      glib/gconvert.c glib/gen-unicode-tables.pl fixed cast/type problems to · 738c1cfd
      Erwann Chenede authored
      2002-03-13  Erwann Chenede  <erwann.chenede@sun.com>
        * glib/gconvert.c
        * glib/gen-unicode-tables.pl
        * glib/gunidecomp.h : fixed cast/type problems to
          avoid warnings (with forte compiler)
        * gobject/gclosure.c
        * gobject/gobject.c
        * gobject/gsignal.c: fixed cast problems with function pointer
          to avoid warnings (with forte compiler) (#73898)
      738c1cfd
    • Alexander Larsson's avatar
      Cache getenv("G_BROKEN_FILENAMES") in have_broken_filenames() and use · 428704a0
      Alexander Larsson authored
      2002-03-12  Alexander Larsson  <alla@lysator.liu.se>
      
      	* glib/gconvert.c:
      	Cache getenv("G_BROKEN_FILENAMES") in have_broken_filenames() and
      	use instead. Add g_convert_init() that calls have_broken_filenames()
      
      	* gthread/gthread-impl.c:
      	Have g_thread_init call g_convert_init.
      428704a0
  30. 08 Mar, 2002 1 commit
    • Owen Taylor's avatar
      Final updates for 2.0.0 · cef5d28c
      Owen Taylor authored
      Fri Mar  8 10:20:46 2002  Owen Taylor  <otaylor@redhat.com>
      
              * NEWS: Final updates for 2.0.0
      
              * glib/gstrfuncs.c: Convert the results of strerror()
              and strsignal() to UTF-8.
      
              * glib/gconvert.c glib/gdir.c glib/giochannel.c glib/giounix.c
              glib/giowin32.c: Use g_strerror(), not strerror().
      cef5d28c
  31. 26 Feb, 2002 1 commit
    • Owen Taylor's avatar
      Check for iconv_* in -liconv as well as libiconv_* in -liconv since AIX · 7e620ee0
      Owen Taylor authored
      Mon Feb 25 23:01:53 2002  Owen Taylor  <otaylor@redhat.com>
      
              * configure.in acconfig.h config.h.win32.in
              glib/gconvert.c: Check for iconv_* in -liconv
              as well as libiconv_* in -liconv since AIX ships
              the system iconv in a separate library.
              Patch from Miroslaw Dobrzanski-Neumann (#72569)
      7e620ee0
  32. 17 Feb, 2002 1 commit
    • Owen Taylor's avatar
      1.3.14 · 57d9c092
      Owen Taylor authored
      Sun Feb 17 11:37:06 2002  Owen Taylor  <otaylor@redhat.com>
      
              * 1.3.14
      
              * glib/glibintl.h: Error out of config.h wasn't included
              rather than including it, since config.h must be the
              first thing included.
      
              * glib/gconvert.c glib/gmarkup.c glib/gshell.c glib/gspawn.c
              glib/gunibreak.c glib/gunidecomp.c glib/guniprop.c:
              Include config.h as the first thing. (#71704, Morten
              Welinder)
      57d9c092
  33. 08 Feb, 2002 1 commit
    • Darin Adler's avatar
      Make hostname parameter const char *. Added a new "ASCII must not be · 4c9d538f
      Darin Adler authored
      	* glib/gconvert.h: Make hostname parameter const char *.
      	* glib/gconvert.c: (g_unescape_uri_string): Added a new
      	"ASCII must not be escaped" feature, and some missing error
      	checking.
      	(is_escalphanum): New.
      	(is_escalpha): New.
      	(hostname_validate): New.
      	(g_filename_from_uri): Don't allow hostnames to include
      	escaped ASCII, validate hostnames with the new
      	hostname_validate.
      	(g_filename_to_uri): Validate hostnames with the new
      	hostname_validate.
      
      	* tests/uri-test.c: Updated tests to reflect the hostname
      	validation changes above.
      
      	* glib/gdate.c: (g_date_fill_parse_tokens): Remove the
      	<ctype.h> include and do isdigit -> g_ascii_isdigit.
      4c9d538f
  34. 29 Jan, 2002 1 commit
    • Jeffrey Stedfast's avatar
      Rewritten to cache iconv conversion descriptors. On at least some Unix · 0751448a
      Jeffrey Stedfast authored
      2002-01-21  Jeffrey Stedfast  <fejj@ximian.com>
      
      	* glib/gconvert.c (open_converter): Rewritten to cache iconv
      	conversion descriptors. On at least some Unix systems like
      	Solaris, iconv_open() must dlopen the necessary charset modules in
      	order to setup the descriptor. This can take a major toll on
      	performace if you are constantly opening and closing conversion
      	descriptors for the same charset conversions over and over.
      	(g_convert_with_fallback): Use close_converter() rather than
      	g_iconv_close() since open_converter() now caches iconv
      	descriptors.
      0751448a
  35. 23 Jan, 2002 1 commit
    • Tor Lillqvist's avatar
      Not used on Windows, don't even compile it then. · 79d4ba94
      Tor Lillqvist authored
      2002-01-23  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gconvert.c: (strdup_len): Not used on Windows, don't even
      	compile it then.
      
      	(acceptable): Improve comments for the _acceptable_ table: put
      	each ASCII char above the hex number for it.
      
      	(g_escape_file_uri): On Windows, turn backslashes in the file name
      	into plain ("forward") slashes.
      
      	(g_filename_from_uri): On Windows, don't return the hostname
      	"localhost", because we can not be 100% sure it will be recognized
      	in all cases anyway, so simpler to turn it into a null
      	hostname.
      
      	Change slashes in the filename into backslashes, as that is the
      	more canonical separator.
      
      	Recognize drive letters (either followed by a colon or a vertical
      	bar, as used by some browsers), and if the filename part starts
      	with a such, don't include any (back)slash.
      
      	Don't drop any extra leading slash in the filename on Unix.
      
      	(g_filename_to_uri): On Windows, if the hostname is "localhost",
      	don't use it, for consistency with g_filename_from_uri().
      
      	tests/uri-test.c: Change accordingly, so that all tests pass on
      	Windows. Unix, too, I hope, though I couldn't check that now.
      
      	(main): Unset the G_BROKEN_FILENAMES environment variable on Unix,
      	as some tests require that filenames are in UTF-8. Is unsetenv()
      	portable?
      
      	These changes should fix bugs #59387, #59652, #59657 and #59658.
      79d4ba94
  36. 21 Jan, 2002 1 commit
  37. 20 Dec, 2001 1 commit
    • Owen Taylor's avatar
      SGML doc fix. · f3170497
      Owen Taylor authored
      Wed Dec 19 23:09:07 2001  Owen Taylor  <otaylor@redhat.com>
              * glib/gconvert.c (g_iconv_open): SGML doc fix.
      f3170497