7 typedef struct AgsFile
{
12 /* 0: error, 1: success */
13 int AF_open(AF
*f
, const char* fn
);
16 off_t
AF_get_pos(AF
* f
);
17 int AF_set_pos(AF
* f
, off_t x
);
19 ssize_t
AF_read(AF
* f
, void* buf
, size_t len
);
20 int AF_read_int(AF
* f
);
21 unsigned AF_read_uint(AF
* f
);
22 short AF_read_short(AF
* f
);
23 unsigned short AF_read_ushort(AF
* f
);
24 int AF_read_string(AF
* a
, char* buf
, size_t max
);
26 /* dumps file contents between start and start+len into fn */
27 int AF_dump_chunk(AF
* a
, size_t start
, size_t len
, char* fn
);
28 int AF_dump_chunk_stream(AF
* a
, size_t start
, size_t len
, FILE* out
);
29 /* "swallows" or skips l bytes, i.e. advances the offset */
30 int AF_read_junk(AF
* a
, size_t l
);
32 #pragma RcB2 DEP "File.c"