| <html lang="en"> |
| <head> |
| <title>I/O on Streams - The GNU C Library</title> |
| <meta http-equiv="Content-Type" content="text/html"> |
| <meta name="description" content="The GNU C Library"> |
| <meta name="generator" content="makeinfo 4.13"> |
| <link title="Top" rel="start" href="index.html#Top"> |
| <link rel="prev" href="I_002fO-Overview.html#I_002fO-Overview" title="I/O Overview"> |
| <link rel="next" href="Low_002dLevel-I_002fO.html#Low_002dLevel-I_002fO" title="Low-Level I/O"> |
| <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> |
| <!-- |
| This file documents the GNU C library. |
| |
| This is Edition 0.12, last updated 2007-10-27, |
| of `The GNU C Library Reference Manual', for version |
| 2.8 (Sourcery G++ Lite 2011.03-41). |
| |
| Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, |
| 2003, 2007, 2008, 2010 Free Software Foundation, Inc. |
| |
| Permission is granted to copy, distribute and/or modify this document |
| under the terms of the GNU Free Documentation License, Version 1.3 or |
| any later version published by the Free Software Foundation; with the |
| Invariant Sections being ``Free Software Needs Free Documentation'' |
| and ``GNU Lesser General Public License'', the Front-Cover texts being |
| ``A GNU Manual'', and with the Back-Cover Texts as in (a) below. A |
| copy of the license is included in the section entitled "GNU Free |
| Documentation License". |
| |
| (a) The FSF's Back-Cover Text is: ``You have the freedom to |
| copy and modify this GNU manual. Buying copies from the FSF |
| supports it in developing GNU and promoting software freedom.''--> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <style type="text/css"><!-- |
| pre.display { font-family:inherit } |
| pre.format { font-family:inherit } |
| pre.smalldisplay { font-family:inherit; font-size:smaller } |
| pre.smallformat { font-family:inherit; font-size:smaller } |
| pre.smallexample { font-size:smaller } |
| pre.smalllisp { font-size:smaller } |
| span.sc { font-variant:small-caps } |
| span.roman { font-family:serif; font-weight:normal; } |
| span.sansserif { font-family:sans-serif; font-weight:normal; } |
| --></style> |
| <link rel="stylesheet" type="text/css" href="../cs.css"> |
| </head> |
| <body> |
| <div class="node"> |
| <a name="I%2fO-on-Streams"></a> |
| <a name="I_002fO-on-Streams"></a> |
| <p> |
| Next: <a rel="next" accesskey="n" href="Low_002dLevel-I_002fO.html#Low_002dLevel-I_002fO">Low-Level I/O</a>, |
| Previous: <a rel="previous" accesskey="p" href="I_002fO-Overview.html#I_002fO-Overview">I/O Overview</a>, |
| Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a> |
| <hr> |
| </div> |
| |
| <!-- %MENU% High-level, portable I/O facilities --> |
| <h2 class="chapter">12 Input/Output on Streams</h2> |
| |
| <!-- fix an overfull: --> |
| <p>This chapter describes the functions for creating streams and performing |
| input and output operations on them. As discussed in <a href="I_002fO-Overview.html#I_002fO-Overview">I/O Overview</a>, a stream is a fairly abstract, high-level concept |
| representing a communications channel to a file, device, or process. |
| |
| <ul class="menu"> |
| <li><a accesskey="1" href="Streams.html#Streams">Streams</a>: About the data type representing a stream. |
| <li><a accesskey="2" href="Standard-Streams.html#Standard-Streams">Standard Streams</a>: Streams to the standard input and output |
| devices are created for you. |
| <li><a accesskey="3" href="Opening-Streams.html#Opening-Streams">Opening Streams</a>: How to create a stream to talk to a file. |
| <li><a accesskey="4" href="Closing-Streams.html#Closing-Streams">Closing Streams</a>: Close a stream when you are finished with it. |
| <li><a accesskey="5" href="Streams-and-Threads.html#Streams-and-Threads">Streams and Threads</a>: Issues with streams in threaded programs. |
| <li><a accesskey="6" href="Streams-and-I18N.html#Streams-and-I18N">Streams and I18N</a>: Streams in internationalized applications. |
| <li><a accesskey="7" href="Simple-Output.html#Simple-Output">Simple Output</a>: Unformatted output by characters and lines. |
| <li><a accesskey="8" href="Character-Input.html#Character-Input">Character Input</a>: Unformatted input by characters and words. |
| <li><a accesskey="9" href="Line-Input.html#Line-Input">Line Input</a>: Reading a line or a record from a stream. |
| <li><a href="Unreading.html#Unreading">Unreading</a>: Peeking ahead/pushing back input just read. |
| <li><a href="Block-Input_002fOutput.html#Block-Input_002fOutput">Block Input/Output</a>: Input and output operations on blocks of data. |
| <li><a href="Formatted-Output.html#Formatted-Output">Formatted Output</a>: <code>printf</code> and related functions. |
| <li><a href="Customizing-Printf.html#Customizing-Printf">Customizing Printf</a>: You can define new conversion specifiers for |
| <code>printf</code> and friends. |
| <li><a href="Formatted-Input.html#Formatted-Input">Formatted Input</a>: <code>scanf</code> and related functions. |
| <li><a href="EOF-and-Errors.html#EOF-and-Errors">EOF and Errors</a>: How you can tell if an I/O error happens. |
| <li><a href="Error-Recovery.html#Error-Recovery">Error Recovery</a>: What you can do about errors. |
| <li><a href="Binary-Streams.html#Binary-Streams">Binary Streams</a>: Some systems distinguish between text files |
| and binary files. |
| <li><a href="File-Positioning.html#File-Positioning">File Positioning</a>: About random-access streams. |
| <li><a href="Portable-Positioning.html#Portable-Positioning">Portable Positioning</a>: Random access on peculiar ISO C systems. |
| <li><a href="Stream-Buffering.html#Stream-Buffering">Stream Buffering</a>: How to control buffering of streams. |
| <li><a href="Other-Kinds-of-Streams.html#Other-Kinds-of-Streams">Other Kinds of Streams</a>: Streams that do not necessarily correspond |
| to an open file. |
| <li><a href="Formatted-Messages.html#Formatted-Messages">Formatted Messages</a>: Print strictly formatted messages. |
| </ul> |
| |
| </body></html> |
| |