4 * Utility function for reading path list files.
8 * Copyright (C) 2013 Eric Biggers
10 * This file is free software; you can redistribute it and/or modify it under
11 * the terms of the GNU Lesser General Public License as published by the Free
12 * Software Foundation; either version 3 of the License, or (at your option) any
15 * This file is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this file; if not, see https://www.gnu.org/licenses/.
28 #include "wimlib/pathlist.h"
29 #include "wimlib/textfile.h"
32 read_path_list_file(const tchar *listfile,
33 tchar ***paths_ret, size_t *num_paths_ret,
37 struct text_file_section tmp = {
44 ret = load_text_file(listfile, NULL, 0, &buf, &tmp, 1,
45 LOAD_TEXT_FILE_REMOVE_QUOTES |
46 LOAD_TEXT_FILE_ALLOW_STDIN, NULL);
50 *paths_ret = paths.strings;
51 *num_paths_ret = paths.num_strings;