diff options
-rw-r--r-- | mpq-fs.c | 20 | ||||
-rw-r--r-- | mpq-fs.h | 2 |
2 files changed, 22 insertions, 0 deletions
@@ -128,6 +128,26 @@ struct mpq_file_t * mpqlib_fs_open(const char * _fname) { return NULL; } +int mpqlib_fs_filelist(char * buffer) { + int r_size = 0, l; + char * p = buffer; + + if (!hash_table) + return 0; + + if (hfirst(hash_table)) do { + l = strlen(hkey(hash_table)); + r_size += l + 1; + if (p) { + strcpy(p, hkey(hash_table)); + p += l; + *(p++) = '\n'; + } + } while (hnext(hash_table)); + + return r_size; +} + #define FALSE 0 #define TRUE !FALSE @@ -13,6 +13,8 @@ void mpqlib_fs_attach_listfile(struct mpq_archive_t *, const char *); struct mpq_file_t * mpqlib_fs_open(const char *); +int mpqlib_fs_filelist(char * buffer); + void mpqlib_fs_shutdown(); #ifdef __cplusplus |