summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/fgetwc.c
Commit message (Collapse)AuthorAgeFilesLines
* Call __mbrtowc() and __wcrtomb() directly instead of taking detoursTim J. Robbins2004-07-201-1/+2
| | | | | | | through mbrtowc() and wcrtomb(). Notes: svn path=/head/; revision=132442
* Slightly reorganize and simplify.Tim J. Robbins2004-07-091-24/+11
| | | | Notes: svn path=/head/; revision=131880
* Perform conversions straight from the stream buffer instead of scanningTim J. Robbins2004-05-221-18/+19
| | | | | | | | | | through byte by byte with mbrtowc(). In the usual case (buffer is big enough to contain the multibyte character, character does not straddle buffer boundary) this results in only one call to mbrtowc() for each wide character read. Notes: svn path=/head/; revision=129584
* Associate a multibyte conversion state object with each stream. Reset itTim J. Robbins2004-05-221-16/+13
| | | | | | | | | | | | to the initial state when a stream is opened or seeked upon. Use the stream's conversion state object instead of a freshly-zeroed one in fgetwc(), fputwc() and ungetwc(). This is only a performance improvement for now, but it would also be required in order to support state-dependent encodings. Notes: svn path=/head/; revision=129583
* Prepare to handle trivial state-dependent encodings. Full support forTim J. Robbins2004-04-071-1/+4
| | | | | | | | state-dependent encodings with locking shifts will come later if there is demand for it. Notes: svn path=/head/; revision=128002
* Pass mbrtowc() and wcrtomb() NULL instead of a pointer to a freshly zeroedTim J. Robbins2003-11-041-3/+1
| | | | | | | | | | mbstate_t object that they ignore. The zeroing is fairly expensive, and it will never be necessary in these functions; when we support state-dependent encodings, we will pass in a pointer to the file's mbstate_t object, and only zero it at the time the file gets opened. Notes: svn path=/head/; revision=122042
* Set the error bit on the stream if an encoding error occurs. ImproveTim J. Robbins2002-10-161-0/+1
| | | | | | | handling of multibyte sequences representing null wide characters. Notes: svn path=/head/; revision=105234
* Introduce unlocked versions of fputwc() and fgetwc() called __fputwc()Tim J. Robbins2002-09-201-7/+21
| | | | | | | and __fgetwc() which can be used when we know the file is locked. Notes: svn path=/head/; revision=103676
* Optimise the common case where no special encoding is in use (LC_CTYPE is "C"Tim J. Robbins2002-09-181-3/+25
| | | | | | | | | or "POSIX", other European locales). Use __sgetc() and __sputc() where possible to avoid a wasteful lock and unlock for each byte and to avoid function call overhead. Notes: svn path=/head/; revision=103539
* Logic error in previous: don't exit the loop when an incomplete multibyteTim J. Robbins2002-09-181-1/+1
| | | | | | | sequence is detected. Notes: svn path=/head/; revision=103538
* Reimplement the functionality of fgetrune(), fputrune(), and fungetrune()Tim J. Robbins2002-09-181-11/+27
| | | | | | | | | here in terms of mbrtowc(), wcrtomb(), and the single-byte I/O functions. The rune I/O functions are about to become deprecated in favour of the ones provided by ISO C90 Amd. 1 and C99. Notes: svn path=/head/; revision=103523
* Basic support for wide character I/O: getwc(), fgetwc(), getwchar(),Tim J. Robbins2002-08-131-0/+56
putwc(), fputwc(), putwchar(), ungetwc(), fwide(). Notes: svn path=/head/; revision=101776