packfile_vtable(3alleg4) [plan9 man page]
PACKFILE_VTABLE(3alleg4) Allegro manual PACKFILE_VTABLE(3alleg4) NAME
PACKFILE_VTABLE - Packfile vtable structure, for custom packfiles. Allegro game programming library. SYNOPSIS
#include <allegro.h> typedef struct PACKFILE_VTABLE DESCRIPTION
int pf_fclose(void *userdata); int pf_getc(void *userdata); int pf_ungetc(int c, void *userdata); long pf_fread(void *p, long n, void *userdata); int pf_putc(int c, void *userdata); long pf_fwrite(const void *p, long n, void *userdata); int pf_fseek(void *userdata, int offset); int pf_feof(void *userdata); int pf_ferror(void *userdata); This is the vtable which must be provided for custom packfiles, which then can read from and write to wherever you like (eg. files in mem- ory). You should provide all the entries of the vtable, even if they are empty stubs doing nothing, to avoid Allegro (or you) calling a NULL method at some point. SEE ALSO
pack_fopen_vtable(3alleg4), expackf(3alleg4) Allegro version 4.4.2 PACKFILE_VTABLE(3alleg4)
Check Out this Related Man Page
pack_fopen_vtable(3alleg4) Allegro manual pack_fopen_vtable(3alleg4) NAME
pack_fopen_vtable - Allegro game programming library. SYNOPSIS
#include <allegro.h> PACKFILE *pack_fopen_vtable(const PACKFILE_VTABLE *vtable, void *userdata); DESCRIPTION
Creates a new packfile structure that uses the functions specified in the vtable instead of the standard functions. The data pointer by `vtable' and `userdata' must remain available for the lifetime of the created packfile. While the created packfile structure can be used with other Allegro functions, there are two limitations. First, opening chunks using pack_fopen_chunk() on top of the returned packfile is not possible at this time. And packfile_password() does not have any effect on pack- files opened with pack_fopen_vtable(). RETURN VALUE
On success, it returns a pointer to a PACKFILE structure, and on error it returns NULL and stores an error code in `errno'. SEE ALSO
pack_fopen(3alleg4), pack_fopen_chunk(3alleg4), packfile_password(3alleg4), expackf(3alleg4) Allegro version 4.4.2 pack_fopen_vtable(3alleg4)