1pack_fread(3)                   Allegro manual                   pack_fread(3)
2
3
4

NAME

6       pack_fread  -  Reads  n bytes from the stream. Allegro game programming
7       library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       long pack_fread(void *p, long n, PACKFILE *f);
14

DESCRIPTION

16       Reads `n' bytes from the stream `f', storing them at the  memory  loca‐
17       tion pointed to by `p'. Example:
18
19          unsigned char buf[256];
20          ...
21          if (pack_fread(buf, 256, input_file) != 256)
22             abort_on_error("Truncated input file!");
23

RETURN VALUE

25       Returns the number of bytes read, which will be less than `n' if EOF is
26       reached or an error occurs. Error codes are stored in errno.
27
28

SEE ALSO

30       pack_fopen(3), pack_fopen_chunk(3), pack_feof(3), expackf(3)
31
32
33
34Allegro                          version 4.2.2                   pack_fread(3)
Impressum