Reads n bytes from the stream.


long pack_fread(void *p, long n, PACKFILE *f);
Reads `n' bytes from the stream `f', storing them at the memory location pointed to by `p'. Example:
      unsigned char buf[256];
      if (pack_fread(buf, 256, input_file) != 256)
	 abort_on_error("Truncated input file!");
Returns the number of bytes read, which will be less than `n' if EOF is reached or an error occurs. Error codes are stored in errno.
Examples using this:

Related Discussions

The following threads each have code containing this keyword: Note: You can click on the numbers to jump directly to the posts that reference this page.

Related Projects

The following projects include source code containing this keyword: