icon Top 9 categories map      RocketAware > man pages >


Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.

The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Search all pages


By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Integer, Floating point, Matrix, Statistics, Boolean, ...

Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...


RocketLink!--> Man page versions: OpenBSD FreeBSD Others

[ANSI C X3.159-1989]

GETC(3)                   OpenBSD Programmer's Manual                  GETC(3)

     fgetc, getc, getchar, getw - get next character or word from input stream

     #include <stdio.h>

     fgetc(FILE *stream);

     getc(FILE *stream);


     getw(FILE *stream);

     The fgetc() function obtains the next input character (if present) from
     the stream pointed at by stream, or the next character pushed back on the
     stream via ungetc.

     The getc() function acts essentially identically to fgetc(), but is a
     macro that expands in-line.

     The getchar() function is equivalent to getc() with the argument stdin.

     The getw() function obtains the next int (if present) from the stream
     pointed at by stream.

     If successful, these routines return the next requested object from the
     stream. If the stream is at end-of-file or a read error occurs, the rou-
     tines return EOF. The routines feof(3) and ferror(3) must be used to dis-
     tinguish between end-of-file and error.  If an error occurs, the global
     variable errno is set to indicate the error.  The end-of-file condition
     is remembered, even on a terminal, and all subsequent attempts to read
     will return EOF until the condition is cleared with clearerr.

     ferror(3),  fopen(3),  fread(3),  putc(3),  ungetc(3)

     The fgetc(), getc() and getchar() functions conform to ANSI X3.159-1989
     (``ANSI C'').

     Since EOF is a valid integer value, feof and ferror must be used to check
     for failure after calling getw().  The size and byte order of an int
     varies from one machine to another, and getw() is not recommended for
     portable applications.

OpenBSD 2.6                      June 4, 1993                                1

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.

(Corrections, notes, and links courtesy of RocketAware.com)

[Detailed Topics]
FreeBSD Sources for getc(3) functions
OpenBSD sources for getc(3)

[Overview Topics]

Up to: Stdio Stream file operations - Buffered access of files and devices. fopen, fputc, fgetc, et al.

RocketLink!--> Man page versions: OpenBSD FreeBSD Others

[ANSI C X3.159-1989]

Rapid-Links: Search | About | Comments | Submit Path: RocketAware > man pages > getc.3/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments