2 * See Licensing and Copyright notice in naev.h
16 #include <fcntl.h> /* creat() and friends */
17 #include <stdint.h> /* uint32_t */
19 #include <sys/types.h> /* ssize_t */
20 #endif /* HAS_POSIX */
24 typedef struct Packfile_s Packfile_t
;
27 typedef struct Packcache_s Packcache_t
;
30 * packcache manipulation.
32 Packcache_t
* pack_openCache( const char* packfile
);
33 void pack_closeCache( Packcache_t
* cache
);
34 Packfile_t
* pack_openFromCache( Packcache_t
* cache
, const char* filename
);
37 * packfile manipulation, automatically alloced and freed (with open and close)
40 int pack_check( const char* filename
);
41 int pack_files( const char* outfile
, const char** infiles
, const uint32_t nfiles
);
42 Packfile_t
* pack_open( const char* packfile
, const char* filename
);
43 ssize_t
pack_read( Packfile_t
* file
, void* buf
, const size_t count
);
44 off_t
pack_seek( Packfile_t
* file
, off_t offset
, int whence
);
45 long pack_tell( Packfile_t
* file
);
46 int pack_close( Packfile_t
* file
);
48 void* pack_readfile( const char* packfile
, const char* filename
, uint32_t *filesize
);
49 char** pack_listfiles( const char* packfile
, uint32_t* nfiles
);
50 void* pack_readfileCached( Packcache_t
* cache
, const char* filename
, uint32_t *filesize
);
51 const char** pack_listfilesCached( Packcache_t
* cache
, uint32_t* nfiles
);
56 SDL_RWops
*pack_rwops( const char* packfile
, const char* filename
);
57 SDL_RWops
*pack_rwopsCached( Packcache_t
* cache
, const char* filename
);