X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Ftextfile.h;h=608ad08da8f221572a73fcbf5c87acf36e15cd6b;hp=bc2068ff418b3b5f5cd03047b7808a34b72f405e;hb=719a063c87e3abab99b0fb53ebc80223fbf33123;hpb=0230cefb4cee3580a705364232feb72258994237 diff --git a/include/wimlib/textfile.h b/include/wimlib/textfile.h index bc2068ff..608ad08d 100644 --- a/include/wimlib/textfile.h +++ b/include/wimlib/textfile.h @@ -1,7 +1,7 @@ #ifndef _WIMLIB_TEXTFILE_H_ #define _WIMLIB_TEXTFILE_H_ -#include +#include "wimlib/types.h" struct string_set { tchar **strings; @@ -24,29 +24,21 @@ struct text_file_section { }; #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, 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, - LOAD_TEXT_FILE_REMOVE_QUOTES, 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, + return do_load_text_file(path, NULL, 0, mem_ret, pos_sections, num_pos_sections, LOAD_TEXT_FILE_REMOVE_QUOTES, mangle_line); }