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_fseek - Seeks inside a stream. Allegro game programming library.

Description

       Moves  the position indicator of the stream `f'. Unlike the standard fseek() function, this only supports
       forward movements relative to the current position and  in  read-only  streams,  so  don't  use  negative
       offsets.  Note  that  seeking is very slow when reading compressed files, and so should be avoided unless
       you are sure that the file is not compressed. Example:

          input_file = pack_fopen("data.bin", "r");
          if (!input_file)
             abort_on_error("Couldn't open binary data!");
          /* Skip some useless header before reading data. */
          pack_fseek(input_file, 32);

Name

       pack_fseek - Seeks inside a stream. Allegro game programming library.

Return Value

       Returns zero on success or a negative number on error, storing the error code in `errno'.

See Also

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

Allegro                                           version 4.4.3                              pack_fseek(3alleg4)

Synopsis

#include<allegro.h>intpack_fseek(PACKFILE*f,intoffset);

See Also