diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-11-25 19:27:07 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-11-25 19:27:07 +0000 |
commit | c559a3ca84a0258e4773571ae73fa7bba4c927b0 (patch) | |
tree | 4a406270536b93867da0c903711b54f72e64792b /manual/charset.texi | |
parent | 281e6031736c13d1ead4d832d6beaf978d36ffdf (diff) | |
download | glibc-c559a3ca84a0258e4773571ae73fa7bba4c927b0.tar glibc-c559a3ca84a0258e4773571ae73fa7bba4c927b0.tar.gz glibc-c559a3ca84a0258e4773571ae73fa7bba4c927b0.tar.bz2 glibc-c559a3ca84a0258e4773571ae73fa7bba4c927b0.zip |
Update.
1999-11-25 H.J. Lu <hjl@gnu.org>
* stdlib/exit.c (exit): Run funtions only if
__exit_funcs->idx > 0.
1999-11-25 Ulrich Drepper <drepper@cygnus.com>
* manual/charset.texi (iconv Examples): Add iconv call to flush
state. Reported by Andrew Clausen <clausen@alphalink.com.au>.
1999-11-25 Andreas Jaeger <aj@suse.de>
* manual/install.texi (Running make install): Better describe
update from libc5.
Patch by Michael Deutschmann <michael@talamasca.wkpowerlink.com>.
1999-11-25 Andreas Jaeger <aj@suse.de>
* include/sys/mman.h: Remove K&R compatibility.
1999-11-15 Andreas Jaeger <aj@suse.de>
* misc/sys/mman.h: Use __REDIRECT for mmap, correct prototype to
use __off64_t.
1999-11-25 Ulrich Drepper <drepper@cygnus.com>
* iconv/iconv_prog.c (process_block): For stateful charsets write
out byte sequence to get to initial state at the end of the file.
which was reported to not work (which proofed to be wrong).
Diffstat (limited to 'manual/charset.texi')
-rw-r--r-- | manual/charset.texi | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/manual/charset.texi b/manual/charset.texi index 7a5237edfb..76b189f5fc 100644 --- a/manual/charset.texi +++ b/manual/charset.texi @@ -1837,6 +1837,11 @@ file2wcs (int fd, const char *charset, wchar_t *outbuf, size_t avail) @r{characters in the @code{inbuf}. Put them back.} */ if (lseek (fd, -insize, SEEK_CUR) == -1) result = -1; + + /* @r{Now write out the byte sequence to get into the} + @r{initial state if this is necessary.} */ + iconv (cd, NULL, NULL, &wrptr, &avail); + break; @} insize += nread; @@ -1867,7 +1872,8 @@ file2wcs (int fd, const char *charset, wchar_t *outbuf, size_t avail) @} /* @r{Terminate the output string.} */ - *((wchar_t *) wrptr) = L'\0'; + if (avail >= sizeof (wchar_t)) + *((wchar_t *) wrptr) = L'\0'; if (iconv_close (cd) != 0) perror ("iconv_close"); |