pack_fread(3alleg4)

pack_fread3alleg4

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

7 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7–10
  2. 11–13

From allegro4-doc 2:4.4.3.1-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.