annotate kpathsea/db.h @ 1315:611d403c7f3d

[project @ 1995-06-25 19:56:32 by jwe]
author jwe
date Sun, 25 Jun 1995 19:56:32 +0000
parents 69501f98669d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1267
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
1 /* db.h: lookups in an externally built db file.
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
2
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
3 Copyright (C) 1994 Karl Berry.
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
4
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
5 This program is free software; you can redistribute it and/or modify
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
7 the Free Software Foundation; either version 2, or (at your option)
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
8 any later version.
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
9
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
13 GNU General Public License for more details.
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
14
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
16 along with this program; if not, write to the Free Software
1315
611d403c7f3d [project @ 1995-06-25 19:56:32 by jwe]
jwe
parents: 1267
diff changeset
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
1267
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
18
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
19 #ifndef KPATHSEA_DB_H
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
20 #define KPATHSEA_DB_H
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
21
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
22 #include <kpathsea/c-proto.h>
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
23 #include <kpathsea/types.h>
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
24 #include <kpathsea/str-list.h>
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
25
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
26 /* It's not an error if this doesn't exist; we just go ahead and search
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
27 the actual directories. See the `Filename database' node in the
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
28 kpathsea documentation for details. The variable reference here is
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
29 expanded by kpathsea. This lets you have different databases for
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
30 different TeX hierarchies (only one at a time, though!) without
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
31 having to change anything. */
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
32 #ifndef KPSE_DB_DIR
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
33 #define KPSE_DB_DIR "$TEXMF"
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
34 #endif
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
35 #ifndef KPSE_DB_NAME
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
36 #define KPSE_DB_NAME "ls-R"
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
37 #endif
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
38
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
39 /* The expansion of DB_DIR; set by `read_files' in cnf.c, used by
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
40 `elt_in_db' in pathsearch.c. */
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
41 extern string kpse_db_dir;
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
42
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
43 /* Return list of matches for NAME in the ls-R file matching PATH. If
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
44 ALL is set, return (null-terminated list) of all matches, else just
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
45 the first. If no matches, return a pointer to an empty list. If the
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
46 database can't be read, returns NULL. */
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
47 extern str_list_type *kpse_db_search P3H(const_string name,
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
48 const_string path, boolean all);
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
49
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
50 /* Insert the filename FNAME into the database. */
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
51 extern void db_insert P1H(const_string fname);
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
52
69501f98669d [project @ 1995-04-20 19:10:05 by jwe]
jwe
parents:
diff changeset
53 #endif /* not KPATHSEA_DB_H */