annotate kpathsea/variable.h @ 3468:a2dc6de198f9

[project @ 2000-01-21 22:13:13 by jwe]
author jwe
date Fri, 21 Jan 2000 22:13:13 +0000
parents faa5d0421460
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2999
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
1 /* variable.h: Declare variable expander.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
2
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
3 Copyright (C) 1993, 95 Karl Berry.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
4
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
6 modify it under the terms of the GNU Library General Public
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
7 License as published by the Free Software Foundation; either
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
8 version 2 of the License, or (at your option) any later version.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
9
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
13 Library General Public License for more details.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
14
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
15 You should have received a copy of the GNU Library General Public
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
18
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
19 #ifndef KPATHSEA_VARIABLE_H
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
20 #define KPATHSEA_VARIABLE_H
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
21
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
22 #include <kpathsea/c-proto.h>
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
23 #include <kpathsea/types.h>
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
24
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
25
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
26 /* Return the (variable-expanded) environment variable value or config
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
27 file value, or NULL. */
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
28 extern string kpse_var_value P1H(const_string var);
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
29
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
30 /* Expand $VAR and ${VAR} references in SRC, returning the (always newly
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
31 dynamically-allocated) result. An unterminated ${ or any other
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
32 character following $ produce error messages, and that part of SRC is
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
33 ignored. In the $VAR form, the variable name consists of consecutive
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
34 letters, digits, and underscores. In the ${VAR} form, the variable
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
35 name consists of whatever is between the braces.
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
36
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
37 In any case, ``expansion'' means calling `getenv'; if the variable is not
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
38 set, look in texmf.cnf files for a definition. If not set there, either,
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
39 the expansion is the empty string (no error). */
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
40 extern string kpse_var_expand P1H(const_string src);
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
41
faa5d0421460 [project @ 1997-05-23 03:02:09 by jwe]
jwe
parents:
diff changeset
42 #endif /* not KPATHSEA_VARIABLE_H */