Back to index

tetex-bin  3.0
db.h
Go to the documentation of this file.
00001 /* db.h: lookups in an externally built db file.
00002 
00003 Copyright (C) 1994, 95 Karl Berry.
00004 
00005 This library is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU Library General Public
00007 License as published by the Free Software Foundation; either
00008 version 2 of the License, or (at your option) any later version.
00009 
00010 This library is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 Library General Public License for more details.
00014 
00015 You should have received a copy of the GNU Library General Public
00016 License along with this library; if not, write to the Free Software
00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
00018 
00019 #ifndef KPATHSEA_DB_H
00020 #define KPATHSEA_DB_H
00021 
00022 #include <kpathsea/c-proto.h>
00023 #include <kpathsea/types.h>
00024 #include <kpathsea/str-list.h>
00025 
00026 /* Initialize the database.  Until this is called, no ls-R matches will
00027    be found.  */
00028 extern void kpse_init_db P1H(void);
00029 
00030 /* Return list of matches for NAME in the ls-R file matching PATH_ELT.  If
00031    ALL is set, return (null-terminated list) of all matches, else just
00032    the first.  If no matches, return a pointer to an empty list.  If no
00033    databases can be read, or PATH_ELT is not in any of the databases,
00034    return NULL.  */
00035 extern str_list_type *kpse_db_search P3H(const_string name, 
00036                                          const_string path_elt, boolean all);
00037 
00038 extern str_list_type *kpse_db_search_list P3H(const_string* names,
00039                                               const_string  path_elt,
00040                                               boolean all);
00041 
00042 /* Insert the filename FNAME into the database.
00043    Called by mktexpk et al.  */
00044 extern KPSEDLL void kpse_db_insert P1H(const_string fname);
00045 
00046 #endif /* not KPATHSEA_DB_H */