X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=include%2Fwimlib%2Ftextfile.h;h=b4e3885a536e08968718387ab940a43a9ce9d98d;hb=fe221b8f000dbd52b884d1ac71d75f49a44cc05c;hp=4c4d12279208d6acc5687c079b67a1179a88b2b2;hpb=864db0e0929d60b33b8b0df35ccb68d43e7f8684;p=wimlib diff --git a/include/wimlib/textfile.h b/include/wimlib/textfile.h index 4c4d1227..b4e3885a 100644 --- a/include/wimlib/textfile.h +++ b/include/wimlib/textfile.h @@ -23,27 +23,24 @@ struct text_file_section { struct string_set *strings; }; +#define LOAD_TEXT_FILE_REMOVE_QUOTES 0x00000001 +#define LOAD_TEXT_FILE_NO_WARNINGS 0x00000002 + extern int -do_load_text_file(const tchar *path, tchar *buf, size_t buflen, tchar **buf_ret, +do_load_text_file(const tchar *path, + const void *buf, size_t bufsize, void **mem_ret, const struct text_file_section *pos_sections, - int num_pos_sections, line_mangle_t mangle_line); + int num_pos_sections, int flags, + line_mangle_t mangle_line); static inline int -load_text_file(const tchar *path, tchar **buf_ret, +load_text_file(const tchar *path, void **mem_ret, const struct text_file_section *pos_sections, int num_pos_sections, line_mangle_t mangle_line) { - return do_load_text_file(path, NULL, 0, buf_ret, - pos_sections, num_pos_sections, mangle_line); -} - -static inline int -load_text_buffer(tchar *buf, size_t buflen, - const struct text_file_section *pos_sections, - int num_pos_sections, line_mangle_t mangle_line) -{ - return do_load_text_file(NULL, buf, buflen, &buf, - pos_sections, num_pos_sections, mangle_line); + return do_load_text_file(path, NULL, 0, mem_ret, + pos_sections, num_pos_sections, + LOAD_TEXT_FILE_REMOVE_QUOTES, mangle_line); } #endif /* _WIMLIB_TEXTFILE_H_ */