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

NAME

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

SYNOPSIS

9       #include <allegro.h>
10
11
12       int pack_fseek(PACKFILE *f, int offset);
13

DESCRIPTION

15       Moves  the  position  indicator  of the stream `f'. Unlike the standard
16       fseek() function, this only supports forward movements relative to  the
17       current  position  and in read-only streams, so don't use negative off‐
18       sets. Note that seeking is very slow when reading compressed files, and
19       so  should  be  avoided  unless  you are sure that the file is not com‐
20       pressed. Example:
21
22          input_file = pack_fopen("data.bin", "r");
23          if (!input_file)
24             abort_on_error("Couldn't open binary data!");
25          /* Skip some useless header before reading data. */
26          pack_fseek(input_file, 32);
27

RETURN VALUE

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

SEE ALSO

34       pack_fopen(3), pack_fopen_chunk(3), expackf(3)
35
36
37
38Allegro                          version 4.4.3                   pack_fseek(3)
Impressum