aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/stdio.tex
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2008-12-10 23:43:12 +0000
committerJeff Johnston <jjohnstn@redhat.com>2008-12-10 23:43:12 +0000
commit0751f22675083e9863d2abb58f5c4b4493224000 (patch)
treeeff92cca8cdd64a30a484d0532c0e7df62b378dc /newlib/libc/stdio/stdio.tex
parente1748ea15576fef7b6a52731ef6892bb1b61de79 (diff)
downloadnewlib-0751f22675083e9863d2abb58f5c4b4493224000.zip
newlib-0751f22675083e9863d2abb58f5c4b4493224000.tar.gz
newlib-0751f22675083e9863d2abb58f5c4b4493224000.tar.bz2
2008-12-10 Corinna Vinschen <corinna@vinschen.de>
Implement basic wide char stdio functionality, based on FreeBSD. * libc/include/stdio.h (__SORD): Define. (__SWID): Define. * libc/include/wchar.h: Add declarations for new wide char functions. (getwc): Define as macro. (getwchar): Ditto. (putwc): Ditto. (putwchar): Ditto. * libc/include/sys/reent.h (struct __sFILE): Add _mbstate member. (struct __sFILE64): Ditto. * libc/stdio/Makefile.am (ELIX_4_SOURCES): Add fgetwc.c, fgetws.c, fputwc.c, fputws.c, fwide.c, getwc.c, getwchar.c, putwc.c, putwchar.c and ungetwc.c. (CHEWOUT_FILES): Add fgetwc.def, fgetws.def, fputwc.def, fputws.def, fwide.def, getwc.def, getwchar.def, putwc.def, putwchar.def and ungetwc.def. Add header dependency rules for the new files. * libc/stdio/Makefile.in: Regenerate. * libc/stdio/fgetwc.c: New file, implementing fgetwc and _fgetwc_r. * libc/stdio/fgetws.c: New file, implementing fgetws and _fgetws_r. * libc/stdio/findfp.c (std): Initialize FILE's _mbstate member. (__sfmoreglue): Ditto. * libc/stdio/fputs.c (_fputs_r): Set stream orientation. * libc/stdio/fputwc.c: New file, implementing fputwc and _fputwc_r. * libc/stdio/fputws.c: New file, implementing fputws and _fputws_r. * libc/stdio/fread.c (_fread_r): Set stream orientation. * libc/stdio/freopen.c (_freopen_r): Reset stream orientation. Reset _mbstate. * libc/stdio/fseek.c (_fseek_r): Reset _mbstate. * libc/stdio/fwide.c: New file, implementing fwide and _fwide_r. * libc/stdio/fwrite.c (_fwrite_r): Set stream orientation. * libc/stdio/getwc.c: New file, implementing getwc and _getwc_r. * libc/stdio/getwchar.c: New file, implementing getwchar and _getwchar_r. * libc/stdio/local.h (ORIENT): New macro. * libc/stdio/puts.c (_puts_r): Set stream orientation. * libc/stdio/putwc.c: New file, implementing putwc and _putwc_r. * libc/stdio/putwchar.c: New file, implementing putwchar and _putwchar_r. * libc/stdio/refill.c (__srefill_r): Set stream orientation. * libc/stdio/stdio.tex: Add documentation for new functions. * libc/stdio/ungetc.c (_ungetc_r): Set stream orientation. * libc/stdio/ungetwc.c: New file, implementing ungetwc and _ungetwc_r. * libc/stdio/vfscanf.c (__SVFSCANF_R): Set stream orientation. * libc/stdio/wbuf.c (__swbuf_r): Ditto.
Diffstat (limited to 'newlib/libc/stdio/stdio.tex')
-rw-r--r--newlib/libc/stdio/stdio.tex34
1 files changed, 34 insertions, 0 deletions
diff --git a/newlib/libc/stdio/stdio.tex b/newlib/libc/stdio/stdio.tex
index 582f43e..b738b92 100644
--- a/newlib/libc/stdio/stdio.tex
+++ b/newlib/libc/stdio/stdio.tex
@@ -36,18 +36,23 @@ structure.
* fgetc:: Get a character from a file or stream
* fgetpos:: Record position in a stream or file
* fgets:: Get character string from a file or stream
+* fgetwc:: Get a wide character from a file or stream
+* fgetws:: Get a wide character string from a file or stream
* fileno:: Get file descriptor associated with stream
* fmemopen:: Open a stream around a fixed-length buffer
* fopen:: Open a file
* fopencookie:: Open a stream with custom callbacks
* fputc:: Write a character on a stream or file
* fputs:: Write a character string in a file or stream
+* fputwc:: Write a wide character to a file or stream
+* fputws:: Write a wide character string to a file or stream
* fread:: Read array elements from a file
* freopen:: Open a file using an existing file descriptor
* fseek:: Set file position
* fsetpos:: Restore position of a stream or file
* ftell:: Return position in a stream or file
* funopen:: Open a stream with custom callbacks
+* fwide:: Set and determine the orientation of a FILE stream
* fwrite:: Write array elements from memory to a file or stream
* getc:: Get a character from a file or stream (macro)
* getc_unlocked:: Get a character from a file or stream (macro)
@@ -57,6 +62,8 @@ structure.
* getline:: Get character string from a file or stream
* gets:: Get character string from standard input (obsolete)
* getw:: Get a word (int) from a file or stream
+* getwc:: Get a wide character from a file or stream
+* getwchar:: Get a wide character from standard input
* mktemp:: Generate unused file name
* open_memstream:: Open a write stream around an arbitrary-length buffer
* perror:: Print an error message on standard error
@@ -66,6 +73,8 @@ structure.
* putchar_unlocked:: Write a character on standard output (macro)
* puts:: Write a character string on standard output
* putw:: Write a word (int) to a file or stream
+* putwc:: Write a wide character to a file or stream
+* putwchar:: Write a wide character to standard output
* remove:: Delete a file's name
* rename:: Rename a file
* rewind:: Reinitialize a file or stream
@@ -80,6 +89,7 @@ structure.
* tmpfile:: Create a temporary file
* tmpnam:: Generate name for a temporary file
* ungetc:: Push data back into a stream
+* ungetwc:: Push wide character data back into a stream
* vfprintf:: Format variable argument list
* vfscanf:: Scan variable argument list
* viprintf:: Format variable argument list (integer only)
@@ -123,6 +133,12 @@ structure.
@include stdio/fgets.def
@page
+@include stdio/fgetwc.def
+
+@page
+@include stdio/fgetws.def
+
+@page
@include stdio/fileno.def
@page
@@ -141,6 +157,12 @@ structure.
@include stdio/fputs.def
@page
+@include stdio/fputwc.def
+
+@page
+@include stdio/fputws.def
+
+@page
@include stdio/fread.def
@page
@@ -159,6 +181,9 @@ structure.
@include stdio/funopen.def
@page
+@include stdio/fwide.def
+
+@page
@include stdio/fwrite.def
@page
@@ -186,6 +211,9 @@ structure.
@include stdio/getw.def
@page
+@include stdio/getwchar.def
+
+@page
@include stdio/mktemp.def
@page
@@ -213,6 +241,9 @@ structure.
@include stdio/putw.def
@page
+@include stdio/putwchar.def
+
+@page
@include stdio/remove.def
@page
@@ -255,6 +286,9 @@ structure.
@include stdio/ungetc.def
@page
+@include stdio/ungetwc.def
+
+@page
@include stdio/vfprintf.def
@page