logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Description

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

Name

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

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.

See Also

pack_fopen(3alleg4), pack_fopen_chunk(3alleg4), pack_feof(3alleg4), expackf(3alleg4)

Allegro                                           version 4.4.3                              pack_fread(3alleg4)

Synopsis

#include<allegro.h>longpack_fread(void*p,longn,PACKFILE*f);

See Also