newlib-cygwin/newlib/libc/stdio/stdio.tex

193 lines
4.1 KiB
TeX
Raw Normal View History

2000-02-18 03:39:52 +08:00
@node Stdio
@chapter Input and Output (@file{stdio.h})
This chapter comprises functions to manage files
or other input/output streams. Among these functions are subroutines
to generate or scan strings according to specifications from a format string.
The underlying facilities for input and output depend on the host
system, but these functions provide a uniform interface.
The corresponding declarations are in @file{stdio.h}.
The reentrant versions of these functions use macros
@example
_stdin_r(@var{reent})
_stdout_r(@var{reent})
_stderr_r(@var{reent})
@end example
@noindent
instead of the globals @code{stdin}, @code{stdout}, and
@code{stderr}. The argument <[reent]> is a pointer to a reentrancy
structure.
@menu
* clearerr:: Clear file or stream error indicator
* fclose:: Close a file
* feof:: Test for end of file
* ferror:: Test whether read/write error has occurred
* fflush:: Flush buffered file output
* 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
* fiprintf:: Write formatted output to file (integer only)
* fopen:: Open a file
* fdopen:: Turn an open file into a stream
* fputc:: Write a character on a stream or file
* fputs:: Write a character string in 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
* fwrite:: Write array elements from memory to a file or stream
* getc:: Get a character from a file or stream (macro)
* getchar:: Get a character from standard input (macro)
* gets:: Get character string from standard input (obsolete)
* getw:: Get a word (int) from a file or stream
2000-02-18 03:39:52 +08:00
* iprintf:: Write formatted output (integer only)
* mktemp:: Generate unused file name
* perror:: Print an error message on standard error
* putc:: Write a character on a stream or file (macro)
* putchar:: 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
2000-02-18 03:39:52 +08:00
* remove:: Delete a file's name
* rename:: Rename a file
* rewind:: Reinitialize a file or stream
* setbuf:: Specify full buffering for a file or stream
* setvbuf:: Specify buffering for a file or stream
* siprintf:: Write formatted output (integer only)
* printf:: Write formatted output
* scanf:: Scan and format input
* tmpfile:: Create a temporary file
* tmpnam:: Generate name for a temporary file
* vprintf:: Format variable argument list
@end menu
@page
@include stdio/clearerr.def
@page
@include stdio/fclose.def
@page
@include stdio/feof.def
@page
@include stdio/ferror.def
@page
@include stdio/fflush.def
@page
@include stdio/fgetc.def
@page
@include stdio/fgetpos.def
@page
@include stdio/fgets.def
@page
@include stdio/fiprintf.def
@page
@include stdio/fopen.def
@page
@include stdio/fdopen.def
@page
@include stdio/fputc.def
@page
@include stdio/fputs.def
@page
@include stdio/fread.def
@page
@include stdio/freopen.def
@page
@include stdio/fseek.def
@page
@include stdio/fsetpos.def
@page
@include stdio/ftell.def
@page
@include stdio/fwrite.def
@page
@include stdio/getc.def
@page
@include stdio/getchar.def
@page
@include stdio/gets.def
@page
@include stdio/getw.def
2000-02-18 03:39:52 +08:00
@page
@include stdio/iprintf.def
@page
@include stdio/mktemp.def
@page
@include stdio/perror.def
@page
@include stdio/putc.def
@page
@include stdio/putchar.def
@page
@include stdio/puts.def
@page
@include stdio/putw.def
2000-02-18 03:39:52 +08:00
@page
@include stdio/remove.def
@page
@include stdio/rename.def
@page
@include stdio/rewind.def
@page
@include stdio/setbuf.def
@page
@include stdio/setvbuf.def
@page
@include stdio/siprintf.def
@page
@include stdio/sprintf.def
@page
@include stdio/sscanf.def
@page
@include stdio/tmpfile.def
@page
@include stdio/tmpnam.def
@page
@include stdio/vfprintf.def
2002-07-17 Jeff Johnston <jjohnstn@redhat.com> * configure.host(stdio64_dir): New setting that is used to enable building of new stdio64 directory. * libc/Makefile.am[HAVE_STDIO64_DIR]: Add support for large files. (stmp-stdio64,stdio64.texi): New targets to optionally add in stdio64 info to info files. * libc/Makefile.in: Regenerated. * libc/configure: Ditto. * libc/configure.in: Add configuration variables that are set when stdio64 is selected as subdir in configure.host. * libc/libc.texinfo: Add optional menu item for Stdio64, based on whether STDIO64 flag is set or not. * libc/sys.tex: Add optional stdio64 syscalls based on whether STDIO64 flag is set or not. * libc/include/reent.h[__LARGE64_FILES]: Add new stdio64 _r sycall routines. * libc/include/stdio.h[__LARGE64_FILES]: Add new stdio64 prototypes. (FILE): Typedef'd to __FILE instead of struct __sFILE directly. (__SL64): New file flag indicating file is opened via fopen64. * libc/include/sys/_types.h(_off64_t): Added. * libc/include/sys/config.h: For x86-linux, define __LARGE64_FILES. * libc/include/sys/reent.h(struct __sFILE64): New file structure for 64-bit offset large file support. (__FILE): New intermediate type either set to struct __sFILE64 or struct __sFILE, depending on whether __LARGE64_FILES is set or not. * libc/reent/Makefile.am[HAVE_STDIO64_DIR]: Add new files. * libc/reent/Makefile.in: Regenerated. * libc/reent/fstat64r.c: New file. * libc/reent/lseek64r.c: Ditto. * libc/reent/open64r.c: Ditto. * libc/reent/reent.tex: Optionally add stdio64 reentrant syscalls based on whether STDIO64 flag is set. * libc/stdio/stdio.tex: Add blank line. * libc/stdio64/Makefile.am: New file. * libc/stdio64/Makefile.in: Ditto. * libc/stdio64/fgetpos64.c: Ditto. * libc/stdio64/fopen64.: Ditto. * libc/stdio64/freopen64.c: Ditto. * libc/stdio64/fseeko64.c: Ditto. * libc/stdio64/fsetpos64.c: Ditto. * libc/stdio64/ftello64.c: Ditto. * libc/stdio64/local64.h: Ditto. * libc/stdio64/stdio64.c: Ditto. * libc/stdio64/stdio64.tex: Ditto. * libc/stdio64/tmpfile64.c: Ditto. * libc/sys/linux/io64.c: Add weak aliases for lseek64, fstat64, and open64.
2002-07-18 07:25:44 +08:00