Debian Codegraph @

texk/kpathsea/expand.h

raw
1 /* expand.h: general expansion.
2
3 Copyright 1993, 1994, 1996, 2008, 2011, 2018 Karl Berry.
4 Copyright 1999, 2005 Olaf Weber.
5
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.
10
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.
15
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/>. */
18
19 #ifndef KPATHSEA_EXPAND_H
20 #define KPATHSEA_EXPAND_H
21
22 #include <kpathsea/c-proto.h>
23 #include <kpathsea/types.h>
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 #ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
30
31 /* Call kpse_var_expand and kpse_tilde_expand (in that order). Result
32 is always in fresh memory, even if no expansions were done. */
33 extern string kpathsea_expand (kpathsea kpse, const_string s);
34
35 #endif /* MAKE_KPSE_DLL */
36
37 /* Do brace expansion and call `kpathsea_expand' on each element of the
38 result; return the final expansion (always in fresh memory, even if
39 no expansions were done). We don't call `kpse_expand_default'
40 because there is a whole sequence of defaults to run through; see
41 `kpse_init_format'. */
42 extern KPSEDLL string kpathsea_brace_expand (kpathsea kpse, const_string path);
43
44 /* Do brace expansion and call `kpse_expand' on each argument of the
45 result, then expand any `//' constructs. The final expansion (always
46 in fresh memory) is a path of all the existing directories that match
47 the pattern. */
48 extern KPSEDLL string kpathsea_path_expand (kpathsea kpse, const_string path);
49
50 #if defined(KPSE_COMPAT_API)
51 extern KPSEDLL string kpse_brace_expand (const_string path);
52 extern KPSEDLL string kpse_path_expand (const_string path);
53 #endif
54
55 #ifdef __cplusplus
56 }
57 #endif
58
59 #endif /* not KPATHSEA_EXPAND_H */