1 #ifndef _WIMLIB_TEXTFILE_H_
2 #define _WIMLIB_TEXTFILE_H_
4 #include "wimlib/types.h"
9 size_t num_alloc_strings;
12 #define STRING_LIST_INITIALIZER \
13 { .strings = NULL, .num_strings = 0, .num_alloc_strings = 0, }
15 #define STRING_LIST(_strings) \
16 struct string_list _strings = STRING_LIST_INITIALIZER
18 typedef int (*line_mangle_t)(tchar *line, const tchar *filename,
19 unsigned long line_no);
21 struct text_file_section {
23 struct string_list *strings;
26 #define LOAD_TEXT_FILE_REMOVE_QUOTES 0x00000001
27 #define LOAD_TEXT_FILE_NO_WARNINGS 0x00000002
28 #define LOAD_TEXT_FILE_ALLOW_STDIN 0x00000004
31 load_text_file(const tchar *path, const void *buf, size_t bufsize,
33 const struct text_file_section *pos_sections,
35 int flags, line_mangle_t mangle_line);
37 #endif /* _WIMLIB_TEXTFILE_H_ */