1. 25 Jul, 2002 2 commits
  2. 20 May, 2002 1 commit
    • Owen Taylor's avatar
      Fix double close of file descriptor on error. (#82139, Wayne Schuller) · 81ad1bb2
      Owen Taylor authored
      Mon May 20 15:35:59 2002  Owen Taylor  <otaylor@redhat.com>
      
              * glib/gfileutils.c (get_contents_regfile): Fix double
              close of file descriptor on error. (#82139, Wayne Schuller)
      
              * glib/gspawn.c (close_and_invalidate): Don't close
              fd's that have already been closed. (Fix from Michael
              Meeks, #81959)
      
              * glib/giochannel.c (g_io_channel_close): If not flushing,
              dump the contents of the write buffers, so we won't try
              to write them to an invalid fd later. (Patch from Ron Steinke,
              fixing #78290, Andreas Persenius.)
      81ad1bb2
  3. 14 Mar, 2002 1 commit
  4. 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
  5. 15 Feb, 2002 1 commit
    • Owen Taylor's avatar
      Updated. · 5d43b9ad
      Owen Taylor authored
      Fri Feb 15 10:41:51 2002  Owen Taylor  <otaylor@redhat.com>
      
              * NEWS: Updated.
      
              * configure.in: Require autoconf-2.52, run AC_SYS_LARGEFILE.
              (#71410, Sven Neumann)
      
              * glib/giounix.c glib/giowin32.c glib/giochannel.[ch]:
              Change offset type for g_io_channel_seek[_position] to
              gint64.
      5d43b9ad
  6. 28 Jan, 2002 1 commit
  7. 13 Dec, 2001 1 commit
    • Matthias Clasen's avatar
      Revert mistaken change: it is UNIX, not Unix. · a3d7806b
      Matthias Clasen authored
              * glib/tmpl/completion.sgml, glib/tmpl/date.sgml,
              glib/tmpl/fileutils.sgml, glib/tmpl/iochannels.sgml,
              glib/tmpl/macros.sgml, glib/tmpl/memory.sgml,
              glib/tmpl/misc_utils.sgml, glib/tmpl/warnings.sgml,
              glib/tmpl/windows.sgml: Revert mistaken change: it is UNIX, not Unix.
      
              * glib/tmpl/memory_chunks.sgml,
              glib/tmpl/date.sgml, glib/tmpl/threads.sgml,
              glib/tmpl/gtype.sgml: Trivial markup fixes.
      
              * glib/gconvert.c, glib/giochannel.c, glib/gmain.c,
              glib/gwin32.c: Revert mistaken change: it is UNIX, not Unix.
      a3d7806b
  8. 15 Nov, 2001 1 commit
    • Matthias Clasen's avatar
      Documentation fixes. · 50c25041
      Matthias Clasen authored
              * glib/giochannel.c: Documentation fixes.
      
              * glib/tmpl/iochannels.sgml: Document GIOFlags, fix typos.
      
              * glib/tmpl/conversions.sgml, glib/tmpl/unicode.sgml,
              glib/tmpl/spawn.sgml, glib/tmpl/fileutils.sgml,
              glib/tmpl/shell.sgml, glib/tmpl/windows.sgml: Add
              some missing short and long descriptions.
      50c25041
  9. 02 Oct, 2001 1 commit
  10. 27 Sep, 2001 1 commit
    • Bruno Haible's avatar
      When the sublangid is SUBLANG_DEFAULT, return the locale of the language's · 34462896
      Bruno Haible authored
      2001-09-24  Bruno Haible  <haible@clisp.cons.org>
      
      	* glib/gwin32.c (g_win32_getlocale): When the sublangid is
      	SUBLANG_DEFAULT, return the locale of the language's main country,
      	not a country-neutral locale. E.g. "en_US" instead of "en". Add
      	handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
      	(China == CN, CH == Switzerland). Ignore empty environment
      	variable values.
      
      2001-09-28  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
      	source file from libcharset and compile in this directory.
      
      	* glib/giochannel.c: Mark rest of g_set_error strings for
      	translation, too.
      
      	* glib/giowin32.c: Add some debugging output functions, call them
      	when debugging.
      	(create_events, g_io_win32_msg_write): Free message fetched with
      	g_win32_error_message ().
      	(g_io_win32_check): Indentation fixes.
      	(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
      	G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
      	like on Unix. This helps making the test programs run
      	successfully.
      
      	* glib/gmain.c (g_poll): Return the code ifdeffed out with
      	TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
      	seem to work as previously with the code in place. Especially
      	spawn-test didn't work with the code ifdeffed out (Bug#61067).
      
      	* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
      	on Unix.
      
      	* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
      	accidentally left in.
      
      gthread:
      
      2001-09-28  Tor Lillqvist  <tml@iki.fi>
      
      	* gthread-win32.c: Use an extra level of indirection for GMutex.
      	It is now a pointer either to a pointer to a CRITICAL_SECTION
      	struct, or to a mutex HANDLE. This is needed in case the user
      	defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
      	the size of *GMutex, but this used to vary depending on whether we
      	at run-time chose to use CRITICAL_SECTIONs or mutexes.
      	(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
      	DeleteCriticalSection() when done with it.
      
      	* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
      	g_thread_impl_init() before accessing
      	g_thread_functions_for_glib_use_default, as the
      	g_thread_impl_init() function might modify it.
      
      po:
      
      2001-09-28  Tor Lillqvist  <tml@iki.fi>
      
      	* POTFILES.in: Add iochannel.c and giowin32.c.
      
      	* sv.po: Remove a bogus fuzziness indicator.
      34462896
  11. 19 Sep, 2001 1 commit
  12. 18 Sep, 2001 1 commit
    • Owen Taylor's avatar
      Fixes for compilation on Solaris (#59026, Frank Belew) · a9b48f33
      Owen Taylor authored
      Tue Sep 18 18:23:02 2001  Owen Taylor  <otaylor@redhat.com>
      
              Fixes for compilation on Solaris (#59026, Frank Belew)
      
              * glib/gqsort.c (g_qsort_with_data): Use g_alloca().
      
              * glib/giochannel.c (g_io_channel_read_to_end): Fix use
              of ternary on left-hand-side.
      
              * configure.in: Handle the ac_cv_working_alloca_h variable
              set by autoconf-2.5x.
      
      Tue Sep 11 18:50:44 2001  Owen Taylor  <otaylor@redhat.com>
      
              * m4macros/glib-gettext.m4 acinclude.m4: Remove commented
              out sections for clarity.
      a9b48f33
  13. 10 Sep, 2001 1 commit
    • Ron Steinke's avatar
      Modified Files: glib/ChangeLog glib/glib/giochannel.h · d5485ef3
      Ron Steinke authored
      Modified Files:
      	glib/ChangeLog glib/glib/giochannel.h glib/glib/giochannel.c
      
      	* glib/giochannel.h glib/giochannel.c: Added a length argument
      	to g_io_channel_[set,get]_line_term(), allowing embeded nulls
      	and binary safe line termination strings
      
      	* glib/giochannel.c: Got rid of a compile warning in
      	g_io_channel_write_chars()
      d5485ef3
  14. 24 Aug, 2001 1 commit
    • Ron Steinke's avatar
      Modified Files: glib/ChangeLog glib/glib/giochannel.c · 7a90af4d
      Ron Steinke authored
      Modified Files:
      	glib/ChangeLog glib/glib/giochannel.c
      
              * glib/giochannel.c: Matthias Clasen's fix for
              the buffer corruption bug by setting outbuf _after_
              the call to g_string_set_size()
      
              * glib/giochannel.c: kept the buffers from perpetually
              growing by subtracting 1 from allocated_len in the calculation
              of available space to account for the null at the end of the
              buffer
      
              * glib/giochannel.c: fixed g_io_channel_write_chars()
              to not write more than space_in_buf bytes for the UTF-8 case
      7a90af4d
  15. 16 Aug, 2001 1 commit
    • Ron Steinke's avatar
      Modified Files: glib/ChangeLog glib/glib/giochannel.c glib/glib/giounix.c · e7931deb
      Ron Steinke authored
      Modified Files:
      	glib/ChangeLog glib/glib/giochannel.c glib/glib/giounix.c
      	glib/glib/giochannel.h glib/glib/glib.def
      	glib/docs/reference/ChangeLog
      	glib/docs/reference/glib/glib-sections.txt
      
      	* glib/giochannel.c glib/glib.def glib/giochannel.h: Added
      	new functions g_io_channel_[set,get]_close_on_unref ()
      
      	* glib/giochannel.c: glib/giochannel.h: Documentation fixes
      
      	* glib/giochannel.c: Fixed g_io_channel_write_chars ()
      	so that bytes_written is always set to an appropriate
      	value when it returns
      
      	* glib/giounix.c: changed g_io_channel_get_flags () to
      	set the is_readable and is_writeable flags cached
      	by the channel
      
      	* docs/reference/glib/glib-sections.txt: Added
      	declarations for g_io_channel_[set,get]_close_on_unref
      e7931deb
  16. 12 Aug, 2001 1 commit
  17. 10 Aug, 2001 1 commit
    • Ron Steinke's avatar
      Modified Files: glib/ChangeLog glib/glib/giochannel.c · 6132f049
      Ron Steinke authored
      Modified Files:
      	glib/ChangeLog glib/glib/giochannel.c
      
              * glib/giochannel.c: Fixed a "sense of comparison" bug,
              added an assert to check when g_io_channels_read_chars ()
              is looping endlessly due to encoded_read_buf being corrupted.
      6132f049
  18. 05 Aug, 2001 2 commits
    • Ron Steinke's avatar
      Modified Files: glib/ChangeLog glib/glib/giochannel.h · ec759772
      Ron Steinke authored
      Modified Files:
      	glib/ChangeLog glib/glib/giochannel.h glib/glib/giochannel.c
      	glib/glib/glib.def glib/docs/reference/glib/glib-sections.txt
      
              * glib/giochannel.c glib/giochannel.c glib/glib.def
              docs/reference/glib/glib-sections.txt: Added new functions
              g_io_channel_[read,write]_unichar ()
      
              * glib/giochannel.h: Finally remembered to remove the
              old error message G_IO_CHANNEL_ERROR_PCHAR_FLUSH
      
              * glib/giochannel.c: Some fixes to g_io_channel_fill_buffer ()
              and g_io_channel_write_chars ()
      ec759772
    • Ron Steinke's avatar
      Modified Files: glib/ChangeLog glib/glib/giochannel.c glib/glib/giounix.c · 4cfd423a
      Ron Steinke authored
      Modified Files:
      	glib/ChangeLog glib/glib/giochannel.c glib/glib/giounix.c
      
              * glib/giochannel.c: Replaced the local use_buf variable with a macro
              in most places. This allows us to check some things without worrying
              whether we have allocated the read buffers yet, and allows us to allocate
              the buffers later in some cases.
      
              * glib/giochannel.c: Introduced a MAX_CHAR_SIZE macro, which is
              supposed to be greater than or equal to the length in bytes
              of the longest character in any encoding. This is necessary
              to get the minimum buffer size for successful writing.
      
              * glib/giochannel.c: Fixed g_io_channel_set_encoding () so
              that it just prints a warning if partial_write_buf isn't
              empty instead of failing.
      
              * glib/giochannel.c: Fixed several functions so they can accept
              NULL parameters for pointers to return values.
      
              * glib/giochannel.c: Altered the error handling for
              g_io_channel_read_chars () to only return an error if
              it doesn't have any buffered data.
      
              * glib/giochannel.c: Rewrote g_io_channel_write_chars ()
              to fix the error handling and remove duplicate sections
              of code.
      
              * glib/giounix.c: Fixed g_io_channel_new_file () to
              call fstat () to set the is_seekable flag, in case someone
              uses it on a FIFO.
      4cfd423a
  19. 03 Aug, 2001 2 commits
    • Ron Steinke's avatar
      Modified Files: glib/ChangeLog glib/glib/giochannel.c · 1ff027aa
      Ron Steinke authored
      Modified Files:
      	glib/ChangeLog glib/glib/giochannel.c
      	glib/tests/iochannel-test.c
      
              * glib/giochannel.c: Fixed g_io_channel_seek_position()
              so that G_SEEK_CUR can be used with UTF-8 encoding
      
              * glib/giochannel.c: Changed test to decide whether
              use_buf is encoded_read_buf or read_buf from
              "if (channel->do_encode)" to "if (channel->encoding)" to
              fix bug 58472
      
              * tests/iochannel-test.c: Fixed so it doesn't output
              double newlines
      
              * glib/giochannel.c: Fixed g_io_channel_fill_buffer()
              so that encoded_read_buf is created for UTF-8 encoding
      1ff027aa
    • Darin Adler's avatar
      Improve strfunc test to test the split function in a way that demonstrates · 669974f6
      Darin Adler authored
      	* tests/.cvsignore:
      	* tests/strfunc-test.c: (strv_check), (main):
      	Improve strfunc test to test the split function in a way that
      	demonstrates its idiosyncrasies.
      669974f6
  20. 29 Jul, 2001 1 commit
  21. 23 Jul, 2001 1 commit
    • Ron Steinke's avatar
      fixed g_io_channel_seek_position() so that G_SEEK_CUR works for UTF-8 · d403f5f2
      Ron Steinke authored
      
              * 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
      d403f5f2
  22. 22 Jul, 2001 1 commit
    • Hans Breuer's avatar
      make the code actually have an effect (Use |= to set bits). Not absolutely · 371fe042
      Hans Breuer authored
      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 ...
      371fe042
  23. 20 Jul, 2001 1 commit
    • Ron Steinke's avatar
      Modified Files: glib/ChangeLog glib/glib.def glib/glib/giochannel.c · e070fdea
      Ron Steinke authored
           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
        ...
      e070fdea
  24. 02 Jul, 2001 2 commits
    • Owen Taylor's avatar
      Fix. · 7d676fb2
      Owen Taylor authored
      Mon Jul  2 16:03:21 2001  Owen Taylor  <otaylor@redhat.com>
      
      	* glib/giochannel.c (g_io_channel_get_buffer_condition): Fix.
      
      	* glib/giunix.c: Fix prepare/check/dispatch for watches.
      
      	* tests/unicode-normalize.c: #include <string.h>
      7d676fb2
    • Owen Taylor's avatar
      Use G_N_ELEMENTS rather than a custom macro. · 4f96a13c
      Owen Taylor authored
      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.
      4f96a13c
  25. 30 Jun, 2001 1 commit
    • Owen Taylor's avatar
      Jun 29 13:36:39 2001 Owen Taylor <otaylor@redhat.com> · 42a23950
      Owen Taylor authored
              * 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.
      42a23950
  26. 10 Dec, 2000 1 commit
    • Owen Taylor's avatar
      Remove pollfds from the context here, not when actually freeing the · cbd74878
      Owen Taylor authored
      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.
      cbd74878
  27. 05 Dec, 2000 1 commit
    • Owen Taylor's avatar
      Major change in API for creating sources to handle multiple main loops · e2fd4e2b
      Owen Taylor authored
      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)
      e2fd4e2b
  28. 26 Jul, 2000 1 commit
  29. 24 Feb, 1999 1 commit
  30. 16 Jan, 1999 1 commit
    • Tor Lillqvist's avatar
      Merge in current Win32 version. Almost no Unix code touched. · f477518c
      Tor Lillqvist authored
      	* README.win32: More text.
      
      	* config.h.win32 glibconfig.h.win32: Update to match the
      	corresponding generated files on Unix.
      
      	* makefile.msc: Update with new source files, and gthread
       	library. Use the compiler flag -MD instead of using -D_DLL and
      	"/nodefaultlib:libc msvcrt.lib" in the link phase.
      
      	* glib.def: Include new functions, drop removed ones.
      
      	* glib.h: Add comments about main loop and polling on Win32. (In
      	general, it's only for the GIMP's use.) Add Win32 IO Channel
      	functions. Remove the obsoleted old IO Channel stuff (which was
      	in #if 0 already).
      
      	* giowin32.c: New file.
      
      	* gmain.c: Include config.h, conditionalize <sys/time.h>
       	inclusion.  Add g_poll implementation for Win32 (only for the
       	GIMP's needs for now, it's hard or even impossible to be as clean
       	and generic as on Unix). Implement g_get_current_time on Win32. If
       	threads aren't supported, don't try to wake up main thread's
       	loop. On Win32, use a semaphore and not a pipe to wake up the main
       	loop.
      
      	* gmessages.c: On Win32, allocate a console window if the standard
      	output handle is invalid before writing to stdout, and reopen stdout
      	to that console window.
      
      	* giochannel.c: Conditionalize unistd.h inclusion. Some indentation
      	cleanup.
      
      	* gstrfuncs.c: Include <signal.h>.
      
      	* gutils.c: On Win32, also check the HOMEDRIVE and HOMEPATH
      	environment variables.
      
      	* gmodule-dl.c gmodule-dld.c: In
       	_g_module_build_path, don't add the "lib" prefix and
       	".so" or ".sl" suffix if already there.
      
      	* gmodule-win32.c: Likewise for the ".dll" suffix.
      
      	* gthread-posix.c: Conditionalize <sys/time.h> inclusion.
      f477518c
  31. 15 Dec, 1998 2 commits
  32. 02 Dec, 1998 1 commit
    • Owen Taylor's avatar
      Merge main loop into head. This probably breaks Win32, until · beab982e
      Owen Taylor authored
      someone does the necessary updates.
      
      Sat Nov 28 12:53:47 1998  Owen Taylor  <otaylor@redhat.com>
      
      	* Makefile.am configure.in acconfig.h giochannel.c
      	  glib.h glist.c gmain.c gutils.c:
      
              - Revised GIOChannel to provide a generic virtual-function
        	  based interface.
      	- Added unix fd-based GIOChannel's
      	- Added generic main-loop abstraction
      	- Added timeouts and idle functions using main-loop abstraction.
      beab982e