pack_fseek (3) - Linux Manuals
pack_fseek: Seeks inside a stream. Allegro game programming library.
Command to display pack_fseek
manual in Linux: $ man 3 pack_fseek
NAME
pack_fseek - Seeks inside a stream. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
int pack_fseek(PACKFILE *f, int offset);
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);
RETURN VALUE
Returns zero on success or a negative number on error, storing the error
code in `errno'.
Pages related to pack_fseek
- pack_fclose (3) - Closes a stream previously opened. Allegro game programming library.
- pack_fclose_chunk (3) - Closes a previously opened sub-chunk. Allegro game programming library.
- pack_feof (3) - Returns nonzero as soon as you reach the end of the file. Allegro game programming library.
- pack_ferror (3) - Tells if an error occurred during an operation on the stream. Allegro game programming library.
- pack_fgets (3) - Reads a line from the stream. Allegro game programming library.
- pack_fopen (3) - Opens a file according to mode. Allegro game programming library.
- pack_fopen_chunk (3) - Opens a sub-chunk of a file. Allegro game programming library.
- pack_fopen_vtable (3) - Allegro game programming library.
- pack_fputs (3) - Writes a string to the stream. Allegro game programming library.
- pack_fread (3) - Reads n bytes from the stream. Allegro game programming library.