fread man page on Xenix

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



     FREAD(S)		      XENIX System V		      FREAD(S)

     Name
	  fread, fwrite - Performs buffered binary input and output.

     Syntax
	  #include <stdio.h>

	  int fread (ptr, size, nitems, stream)
	  char *ptr;
	  int size, nitems;
	  FILE *stream;

	  int fwrite (ptr, size, nitems, stream)
	  char *ptr;
	  int size, nitems;
	  FILE *stream;

     Description
	  fread reads, into a block beginning at ptr, nitems of data
	  of the type of *ptr from the named input stream, where an
	  item of data is a sequence of bytes (not necessarily
	  terminated by a null byte) of length size.  fread stops
	  appending bytes if an end-of-file or error condition is
	  encountered while reading stream, or if nitems items have
	  been read. fread leaves the file pointer in stream, if
	  defined, pointing to the byte following the last byte read,
	  if there is one.  fread does not change the contents of
	  stream.  It returns the number of items actually read.

	  fwrite appends at most nitems of data of the type of *ptr
	  beginning at ptr to the named output stream.	fwrite stops
	  appending when it has appended nitems items of data or if an
	  error condition is encountered on stream.  fwrite does not
	  change the contents of the array pointed to by ptr.  fwrite
	  increments the file pointer in stream, if defined, by the
	  number of bytes written.  It returns the number of items
	  actually written.

     See Also
	  fopen(S), getc(S), gets(S), printf(S), putc(S), puts(S),
	  read(S), scanf(S), write(S)

     Diagnostics
	  fread and fwrite return the number of items read or written.
	  If sizeof or nitems is non-positive, no characters are read
	  or written and 0 is returned by both fread and fwrite.

     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