1 /* db.h: lookups in an externally built db file.
3 Copyright 1994, 1995, 2008 Karl Berry.
4 Copyright 1999, 2003, 2005 Olaf Weber.
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public License
17 along with this library; if not, see <http://www.gnu.org/licenses/>. */
22 #include <kpathsea/c-proto.h>
23 #include <kpathsea/types.h>
24 #include <kpathsea/str-list.h>
26 /* Initialize the database. Until this is called, no ls-R matches will
28 extern void kpse_init_db P1H(void);
30 /* Return list of matches for NAME in the ls-R file matching PATH_ELT. If
31 ALL is set, return (null-terminated list) of all matches, else just
32 the first. If no matches, return a pointer to an empty list. If no
33 databases can be read, or PATH_ELT is not in any of the databases,
35 extern str_list_type *kpse_db_search P3H(const_string name,
36 const_string path_elt, boolean all);
38 extern str_list_type *kpse_db_search_list P3H(const_string* names,
39 const_string path_elt,
42 /* Insert the filename FNAME into the database.
43 Called by mktexpk et al. */
44 extern KPSEDLL void kpse_db_insert P1H(const_string fname);
46 #endif /* not KPATHSEA_DB_H */