pack_fread(3alleg)

pack_fread3alleg

Reads n bytes from the stream. allegro game programming library.

Usage

#include <allegro.h>

long pack_fread(void *p, long n, PACKFILE *f);

Overview

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!");

Return value

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.

Releases

4 releases since Debian 3.1 (Sarge); the text changed 2 times.

  1. 3.1
  2. 4.0
  3. 5.0–6.0

From liballegro-doc 2:4.2.2-2.2 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.