getc man page on OPENSTEP

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


GETC(3P)							      GETC(3P)

NAME
       getc, getchar, fgetc - get character from stream

SYNOPSIS
       #include <stdio.h>

       int getc(FILE *stream);

       int getchar(void);

       int fgetc(FILE *stream);

(ALSO AVAILABLE IN BSD)
       int getw(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.

RETURN VALUE
       Getc, getchar, and fgetc return	the  next  character  from  the	 input
       stream.	If the stream is at end-of-file, the end-of-file indicator for
       the stream is set then EOF is returned.	If a read  error  occurs,  the
       error indicator for the stream is set and EOF is returned.

       Getw  returns the next int from the named input stream.	It returns the
       constant EOF upon end of file or	 error,	 but  since  that  is  a  good
       integer	value, feof and ferror(3S) should be used to check the success
       of getw.	 Getw assumes no special alignment in the file.	 Getw  is  not
       an ANSI C function (nor is it POSIX-compliant).

ERRORS
       The  underlying	function of getc, getchar, and fgetc is read(2P).  The
       error conditions specified for read (2P) apply to  getc,	 getchar,  and
       fgetc.

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

SEE ALSO
       read(2),	  clearerr(3S),	  fopen(3S),  putc(3S),	 gets(3S),  scanf(3S),
       fread(3S), ungetc(3S)

				August 1, 1992			      GETC(3P)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OPENSTEP

List of man pages available for OPENSTEP

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