fgetc man page on Xenix

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



     FGETC(DOS)		      XENIX System V		    FGETC(DOS)

     Name
	  fgetc, fgetchar - Gets a character from a stream.

     Syntax
	  #include <stdio.h>

	  int fgetc (stream);
	  FILE *stream;

	  int fgetchar ( );

     Description
	  The fgetc function reads a single character from the input
	  stream at the current position and increments the associated
	  file pointer (if any) to point to the next character.
	  fgetchar is equivalent to fgetc(stdin).

     Return Value
	  fgetc and fgetchar return the character read.	 A return
	  value of EOF may indicate an error or end-of-file; however,
	  the EOF value is also a legitimate integer value, so feof or
	  ferror should be used to verify an error or end-of-file
	  condition.

     See Also
	  putc(S), fputchar(DOS), getc(S)

     Example
	  #include <stdio.h>

	  FILE *stream; char buffer[81]; int i; int ch;
	    .
	    .
	    .  /* The following statements gather a line of input from
	  ** a stream.	*/

	  for (i = 0; (i < 80) && ((ch = fgetc (stream)) != EOF) &&
	       (ch != '\n'); i++)      buffer[i] = ch;

	  buffer[i] = '\0';

	  /* "fgetchar ( )" could be used instead of "fgetc (stream)"
	  in ** the for statement above to gather a line of input from
	  ** stdin (equivalent to "fgetc (stdin)").  */

     Notes
	  fgetc and fgetchar are identical to getc and getchar, but
	  are functions, not macros.

	  These calls must be compiled with the -dos flag.

     Page 1					      (printed 8/7/87)

[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Xenix

List of man pages available for Xenix

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