getc man page on UNIXv7

Man page or keyword search:  
man Server   300 pages
apropos Keyword Search (all sections)
Output format
UNIXv7 logo
[printable version]

GETC(3S)							      GETC(3S)

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

SYNOPSIS
       #include <stdio.h>

       int getc(stream)
       FILE *stream;

       int getchar()

       int fgetc(stream)
       FILE *stream;

       int getw(stream)
       FILE *stream;

DESCRIPTION
       Getc returns the next character from the named input stream.

       Getchar() is identical to getc(stdin).

       Fgetc behaves like getc, but is a genuine function, not a macro; it may
       be used to save object text.

       Getw returns the next word from the named input stream.	It returns the
       constant	 EOF upon end of file or error, but since that is a good inte‐
       ger value, feof and ferror(3) should be used to check  the  success  of
       getw.  Getw assumes no special alignment in the file.

SEE ALSO
       fopen(3), putc(3), gets(3), scanf(3), fread(3), ungetc(3)

DIAGNOSTICS
       These  functions return the integer constant EOF at end of file or upon
       read error.

       A stop with message, `Reading bad file', means an attempt has been made
       to read from a stream that has not been opened for reading by fopen.

BUGS
       The  end-of-file	 return from getchar is incompatible with that in UNIX
       editions 1-6.

       Because it is implemented as a macro, getc  treats  a  stream  argument
       with  side  effects  incorrectly.  In particular, `getc(*f++);' doesn't
       work sensibly.

								      GETC(3S)
[top]

List of man pages available for UNIXv7

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net