1PACKFILE_VTABLE(3) Allegro manual PACKFILE_VTABLE(3)
2
3
4
6 PACKFILE_VTABLE - Packfile vtable structure, for custom packfiles.
7 Allegro game programming library.
8
10 #include <allegro.h>
11
12
13 typedef struct PACKFILE_VTABLE
14
16 int pf_fclose(void *userdata);
17 int pf_getc(void *userdata);
18 int pf_ungetc(int c, void *userdata);
19 long pf_fread(void *p, long n, void *userdata);
20 int pf_putc(int c, void *userdata);
21 long pf_fwrite(const void *p, long n, void *userdata);
22 int pf_fseek(void *userdata, int offset);
23 int pf_feof(void *userdata);
24 int pf_ferror(void *userdata);
25
26 This is the vtable which must be provided for custom packfiles, which
27 then can read from and write to wherever you like (eg. files in mem‐
28 ory). You should provide all the entries of the vtable, even if they
29 are empty stubs doing nothing, to avoid Allegro (or you) calling a NULL
30 method at some point.
31
32
34 pack_fopen_vtable(3), expackf(3)
35
36
37
38Allegro version 4.2.2 PACKFILE_VTABLE(3)