]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - src/stringpool.h
stringpool: Make them initializable right from the file
[people/ms/libloc.git] / src / stringpool.h
index dbe82c8220b80f853c8600b03cfb6b0b17fcbe71..29a0eb38d66389c52c32f32aed1d8848e8b16892 100644 (file)
 #define LIBLOC_STRINGPOOL_H
 
 #include <stddef.h>
+#include <stdio.h>
 
 #include <loc/libloc.h>
 
 struct loc_stringpool;
-int loc_stringpool_new(struct loc_ctx* ctx, struct loc_stringpool** pool, size_t max_length);
+int loc_stringpool_new(struct loc_ctx* ctx, struct loc_stringpool** pool);
+int loc_stringpool_open(struct loc_ctx* ctx, struct loc_stringpool** pool,
+       FILE* f, size_t length, off_t offset);
+
 struct loc_stringpool* loc_stringpool_ref(struct loc_stringpool* pool);
 struct loc_stringpool* loc_stringpool_unref(struct loc_stringpool* pool);
 
@@ -32,7 +36,6 @@ size_t loc_stringpool_get_size(struct loc_stringpool* pool);
 off_t loc_stringpool_add(struct loc_stringpool* pool, const char* string);
 void loc_stringpool_dump(struct loc_stringpool* pool);
 
-int loc_stringpool_read(struct loc_stringpool* pool, FILE* f, off_t offset, size_t length);
 size_t loc_stringpool_write(struct loc_stringpool* pool, FILE* f);
 
 #endif