diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-08-02 15:41:52 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-08-02 15:41:52 +0000 |
commit | 49f47e772fcf8d5b6148eba21ffb438fa35c8c00 (patch) | |
tree | c13a5f8aaad9d4c8328e898a08a1160a72da74e0 /Build/source | |
parent | 6c2467cbb8e21577155060c598661d71024c1893 (diff) |
kpathsea: unexport library internal functions, remove unused ones
git-svn-id: svn://tug.org/texlive/trunk@23317 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 24 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/c-pathch.h | 34 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/db.c | 35 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/db.h | 25 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/default.h | 8 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/elt-dirs.c | 20 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/expand.c | 8 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/expand.h | 9 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/fn.h | 20 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/fontmap.h | 6 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/hash.h | 6 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/kdefault.c | 12 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/path-elt.c | 13 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/pathsearch.c | 22 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/pathsearch.h | 39 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/tilde.h | 4 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/truncate.h | 4 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/xstat.h | 6 |
18 files changed, 104 insertions, 191 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index fdd2a27d5b8..eafb0c196c4 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,27 @@ +2011-08-02 Peter Breitenlohner <peb@mppmu.mpg.de> + + Unexport kpathsea internal functions, remove unused ones. + * db.[ch] (kpse_db_insert, kpse_init_db, kpse_db_search, + kpse_db_search_list): All removed. + * default.h (kpathsea_expand_default): Internal use only. + * default.h, kdefault.c (kpse_expand_default): Removed. + * elt-dirs.c (kpse_normalize_path, kpse_element_dirs): Removed. + * expand.[ch] (kpathsea_expand): Internal use only. + (kpse_expand): Removed. + * fn.h (fn_init, fn_copy0, fn_free, fn_1grow, fn_grow, + fn_str_grow, fn_shrink_to): ALL internal use only. + * hash.h (hash_insert_normalized): Internal use only. + * path-elt.c (kpse_path_element): Removed. + * pathsearch.[ch] (kpathsea_path_element, kpathsea_element_dirs, + kpathsea_path_search_list, kpathsea_path_search_list_generic, + kpathsea_all_path_search_list): Internal use only. + (kpse_path_element, kpse_filename_component, + kpse_normalize_path, kpse_element_dirs, kpse_path_search_list, + kpse_path_search_list_generic, kpse_all_path_search_list): + Removed. + * fontmap.h, tilde.h, truncate.h, xstat.h: Whole files internal + use only. + 2011-08-02 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * win32lib.h: follow mingw32.h for boolean and move definitions diff --git a/Build/source/texk/kpathsea/c-pathch.h b/Build/source/texk/kpathsea/c-pathch.h index cc8b936abf8..76352f82a6d 100644 --- a/Build/source/texk/kpathsea/c-pathch.h +++ b/Build/source/texk/kpathsea/c-pathch.h @@ -76,27 +76,21 @@ /* What separates elements in environment variable path lists? */ #ifndef ENV_SEP #ifdef VMS -#define ENV_SEP ',' -#define ENV_SEP_STRING "," +# define ENV_SEP ',' +# define ENV_SEP_STRING "," +#elif defined (DOSISH) +# define ENV_SEP ';' +# define ENV_SEP_STRING ";" +#elif defined (AMIGA) +# define ENV_SEP ';' +# define ENV_SEP_STRING ";" +#elif defined (VMCMS) +# define ENV_SEP ' ' +# define ENV_SEP_STRING " " #else -#ifdef DOSISH -#define ENV_SEP ';' -#define ENV_SEP_STRING ";" -#else -#ifdef AMIGA -#define ENV_SEP ';' -#define ENV_SEP_STRING ";" -#else -#ifdef VMCMS -#define ENV_SEP ' ' -#define ENV_SEP_STRING " " -#else -#define ENV_SEP ':' -#define ENV_SEP_STRING ":" -#endif /* not VM/CMS */ -#endif /* not AMIGA */ -#endif /* not DOS */ -#endif /* not VMS */ +# define ENV_SEP ':' +# define ENV_SEP_STRING ":" +#endif #endif /* not ENV_SEP */ #ifndef IS_ENV_SEP diff --git a/Build/source/texk/kpathsea/db.c b/Build/source/texk/kpathsea/db.c index 2e8aeef78c4..d4cf9c6e2e2 100644 --- a/Build/source/texk/kpathsea/db.c +++ b/Build/source/texk/kpathsea/db.c @@ -216,14 +216,6 @@ kpathsea_db_insert (kpathsea kpse, const_string passed_fname) hash_insert (&(kpse->db), file_part, dir_part); } } - -#if defined(KPSE_COMPAT_API) -void -kpse_db_insert (const_string passed_fname) -{ - kpathsea_db_insert(kpse_def, passed_fname); -} -#endif /* Return true if FILENAME could be in PATH_ELT, i.e., if the directory part of FILENAME matches PATH_ELT. Have to consider // wildcards, but @@ -446,15 +438,6 @@ kpathsea_init_db (kpathsea kpse) free (orig_db_files); } - -#if defined(KPSE_COMPAT_API) -void -kpse_init_db (void) -{ - kpathsea_init_db(kpse_def); -} -#endif - /* Avoid doing anything if this PATH_ELT is irrelevant to the databases. */ str_list_type * @@ -607,15 +590,6 @@ kpathsea_db_search (kpathsea kpse, const_string name, return ret; } - -#if defined(KPSE_COMPAT_API) -str_list_type * -kpse_db_search (const_string name, const_string orig_path_elt, - boolean all) -{ - return kpathsea_db_search (kpse_def, name, orig_path_elt, all); -} -#endif str_list_type * kpathsea_db_search_list (kpathsea kpse, const_string* names, @@ -772,12 +746,3 @@ kpathsea_db_search_list (kpathsea kpse, const_string* names, return ret; } - -#if defined(KPSE_COMPAT_API) -str_list_type * -kpse_db_search_list (const_string* names, const_string path_elt, - boolean all) -{ - return kpathsea_db_search_list (kpse_def, names, path_elt, all); -} -#endif diff --git a/Build/source/texk/kpathsea/db.h b/Build/source/texk/kpathsea/db.h index 968f2b0da64..d5ddb3d6200 100644 --- a/Build/source/texk/kpathsea/db.h +++ b/Build/source/texk/kpathsea/db.h @@ -1,6 +1,6 @@ /* db.h: lookups in an externally built db file. - Copyright 1994, 1995, 2008, 2010 Karl Berry. + Copyright 1994, 1995, 2008, 2010, 2011 Karl Berry. Copyright 1999, 2003, 2005 Olaf Weber. This library is free software; you can redistribute it and/or @@ -19,12 +19,12 @@ #ifndef KPATHSEA_DB_H #define KPATHSEA_DB_H +#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ + #include <kpathsea/c-proto.h> #include <kpathsea/types.h> #include <kpathsea/str-list.h> -#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ - /* Initialize the database. Until this is called, no ls-R matches will be found. */ extern void kpathsea_init_db (kpathsea kpse); @@ -43,29 +43,10 @@ extern str_list_type *kpathsea_db_search_list (kpathsea kpse, const_string path_elt, boolean all); -#endif /* MAKE_KPSE_DLL */ - /* Insert the filename FNAME into the database. Called by mktexpk et al. */ extern KPSEDLL void kpathsea_db_insert (kpathsea kpse, const_string fname); -#if defined(KPSE_COMPAT_API) - -#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ - -extern void kpse_init_db (void); - -extern str_list_type *kpse_db_search (const_string name, - const_string path_elt, boolean all); - -extern str_list_type *kpse_db_search_list (const_string* names, - const_string path_elt, - boolean all); - #endif /* MAKE_KPSE_DLL */ -extern KPSEDLL void kpse_db_insert (const_string fname); - -#endif - #endif /* not KPATHSEA_DB_H */ diff --git a/Build/source/texk/kpathsea/default.h b/Build/source/texk/kpathsea/default.h index cdf1bd30749..a84d874d076 100644 --- a/Build/source/texk/kpathsea/default.h +++ b/Build/source/texk/kpathsea/default.h @@ -1,6 +1,6 @@ /* default.h: declare default path expander. - Copyright 1993, 1994, 2008 Karl Berry. + Copyright 1993, 1994, 2008, 2011 Karl Berry. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -18,6 +18,8 @@ #ifndef KPATHSEA_DEFAULT_H #define KPATHSEA_DEFAULT_H +#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ + #include <kpathsea/types.h> #include <kpathsea/c-proto.h> @@ -29,8 +31,6 @@ extern string kpathsea_expand_default (kpathsea kpse, const_string path, const_string dflt); -#if defined(KPSE_COMPAT_API) -extern string kpse_expand_default (const_string path, const_string dflt); -#endif +#endif /* MAKE_KPSE_DLL */ #endif /* not KPATHSEA_DEFAULT_H */ diff --git a/Build/source/texk/kpathsea/elt-dirs.c b/Build/source/texk/kpathsea/elt-dirs.c index d1c5f74ef13..7d61d850086 100644 --- a/Build/source/texk/kpathsea/elt-dirs.c +++ b/Build/source/texk/kpathsea/elt-dirs.c @@ -1,6 +1,6 @@ /* elt-dirs.c: Translate a path element to its corresponding director{y,ies}. - Copyright 1993, 1994, 1995, 1996, 1997, 2008, 2009, 2010 Karl Berry. + Copyright 1993, 1994, 1995, 1996, 1997, 2008, 2009, 2010, 2011 Karl Berry. Copyright 1997, 1998, 1999, 2000, 2005 Olaf Weber. This library is free software; you can redistribute it and/or @@ -393,14 +393,6 @@ kpathsea_normalize_path (kpathsea kpse, string elt) return ret; } - -#if defined(KPSE_COMPAT_API) -unsigned -kpse_normalize_path (string elt) -{ - return kpathsea_normalize_path(kpse_def, elt); -} -#endif /* Here is the entry point. Returns directory list for ELT. */ @@ -450,14 +442,6 @@ kpathsea_element_dirs (kpathsea kpse, string elt) return ret; } - -#if defined(KPSE_COMPAT_API) -str_llist_type * -kpse_element_dirs (string elt) -{ - return kpathsea_element_dirs(kpse_def, elt); -} -#endif #ifdef TEST @@ -469,7 +453,7 @@ print_element_dirs (const_string elt) printf ("Directories of %s:\t", elt ? elt : "(nil)"); fflush (stdout); - dirs = kpse_element_dirs (elt); + dirs = kpathsea_element_dirs (kpse_def, elt); if (!dirs) printf ("(nil)"); diff --git a/Build/source/texk/kpathsea/expand.c b/Build/source/texk/kpathsea/expand.c index 453fa6d65ac..6084b9c8d92 100644 --- a/Build/source/texk/kpathsea/expand.c +++ b/Build/source/texk/kpathsea/expand.c @@ -44,14 +44,6 @@ kpathsea_expand (kpathsea kpse, const_string s) return tilde_expansion; } - -#if defined(KPSE_COMPAT_API) -string -kpse_expand (const_string s) -{ - return kpathsea_expand (kpse_def, s); -} -#endif /* Forward declarations of functions from the original expand.c */ static str_list_type brace_expand (kpathsea, const_string*); diff --git a/Build/source/texk/kpathsea/expand.h b/Build/source/texk/kpathsea/expand.h index 3bf21766d7b..2b2caeb06e7 100644 --- a/Build/source/texk/kpathsea/expand.h +++ b/Build/source/texk/kpathsea/expand.h @@ -1,6 +1,6 @@ /* expand.h: general expansion. - Copyright 1993, 1994, 1996, 2008 Karl Berry. + Copyright 1993, 1994, 1996, 2008, 2011 Karl Berry. Copyright 1999, 2005 Olaf Weber. This library is free software; you can redistribute it and/or @@ -22,9 +22,13 @@ #include <kpathsea/c-proto.h> #include <kpathsea/types.h> +#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ + /* Call kpse_var_expand and kpse_tilde_expand (in that order). Result is always in fresh memory, even if no expansions were done. */ -extern KPSEDLL string kpathsea_expand (kpathsea kpse, const_string s); +extern string kpathsea_expand (kpathsea kpse, const_string s); + +#endif /* MAKE_KPSE_DLL */ /* Do brace expansion and call `kpse_expand' on each element of the result; return the final expansion (always in fresh memory, even if @@ -40,7 +44,6 @@ extern KPSEDLL string kpathsea_brace_expand (kpathsea kpse, const_string path); extern KPSEDLL string kpathsea_path_expand (kpathsea kpse, const_string path); #if defined(KPSE_COMPAT_API) -extern KPSEDLL string kpse_expand (const_string s); extern KPSEDLL string kpse_brace_expand (const_string path); extern KPSEDLL string kpse_path_expand (const_string path); #endif diff --git a/Build/source/texk/kpathsea/fn.h b/Build/source/texk/kpathsea/fn.h index af27bdd8d2b..e1bab8e6f62 100644 --- a/Build/source/texk/kpathsea/fn.h +++ b/Build/source/texk/kpathsea/fn.h @@ -1,7 +1,7 @@ /* fn.h: arbitrarily long filenames (or just strings). Copyright 2001, 2005 Olaf Weber. - Copyright 1993, 2008 Karl Berry. + Copyright 1993, 2008, 2011 Karl Berry. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -19,6 +19,8 @@ #ifndef KPATHSEA_FN_H #define KPATHSEA_FN_H +#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ + #include <kpathsea/c-proto.h> #include <kpathsea/types.h> @@ -41,27 +43,29 @@ typedef struct /* Create a new empty fn. */ -extern KPSEDLL fn_type fn_init (void); +extern fn_type fn_init (void); /* Create a new fn from the first LEN characters from S and a null. */ -extern KPSEDLL fn_type fn_copy0 (const_string s, unsigned len); +extern fn_type fn_copy0 (const_string s, unsigned len); /* Free what's been allocated. Can also just free the string if it's been extracted out. Fatal error if nothing allocated in F. */ -extern KPSEDLL void fn_free (fn_type *f); +extern void fn_free (fn_type *f); /* Append the character C to the fn F. Don't append trailing null. */ -extern KPSEDLL void fn_1grow (fn_type *f, char c); +extern void fn_1grow (fn_type *f, char c); /* Append LENGTH bytes from SOURCE to F. */ -extern KPSEDLL void fn_grow (fn_type *f, const_string source, unsigned length); +extern void fn_grow (fn_type *f, const_string source, unsigned length); /* Concatenate the component S to the fn F. Assumes string currently in F is null terminated. */ -extern KPSEDLL void fn_str_grow (fn_type *f, const_string s); +extern void fn_str_grow (fn_type *f, const_string s); /* Add a null to F's string at position LOC, and update its length. Fatal error if LOC is past the end of the string. */ -extern KPSEDLL void fn_shrink_to (fn_type *f, unsigned loc); +extern void fn_shrink_to (fn_type *f, unsigned loc); + +#endif /* MAKE_KPSE_DLL */ #endif /* not KPATHSEA_FN_H */ diff --git a/Build/source/texk/kpathsea/fontmap.h b/Build/source/texk/kpathsea/fontmap.h index c0a7f74b571..6ac220c4309 100644 --- a/Build/source/texk/kpathsea/fontmap.h +++ b/Build/source/texk/kpathsea/fontmap.h @@ -1,6 +1,6 @@ /* fontmap.h: declarations for reading a file to define additional font names. - Copyright 1993, 1994, 1995, 2008, 2010 Karl Berry. + Copyright 1993, 1994, 1995, 2008, 2010, 2011 Karl Berry. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -18,12 +18,12 @@ #ifndef FONTMAP_H #define FONTMAP_H +#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ + #include <kpathsea/c-proto.h> #include <kpathsea/hash.h> #include <kpathsea/types.h> -#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ - /* Look up KEY in all texfonts.map's in the glyph_format path, and return a null-terminated list of all matching entries, or NULL. */ extern const_string *kpathsea_fontmap_lookup (kpathsea kpse, const_string key); diff --git a/Build/source/texk/kpathsea/hash.h b/Build/source/texk/kpathsea/hash.h index 2945df6c01c..336b196a985 100644 --- a/Build/source/texk/kpathsea/hash.h +++ b/Build/source/texk/kpathsea/hash.h @@ -48,13 +48,17 @@ extern KPSEDLL void hash_insert (hash_table_type *table, const_string key, const_string value); +#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ + /* Insert the (KEY, VALUE) association into TABLE. KEY may have more than one VALUE. Neither KEY nor VALUE is copied. Assume that KEY is already normalized (all lowercase) on platforms where this matters. */ -extern KPSEDLL void hash_insert_normalized (hash_table_type *table, +extern void hash_insert_normalized (hash_table_type *table, const_string key, const_string value); +#endif /* MAKE_KPSE_DLL */ + /* Remove the (KEY,VALUE) association from TABLE. */ extern KPSEDLL void hash_remove (hash_table_type *table, const_string key, const_string value); diff --git a/Build/source/texk/kpathsea/kdefault.c b/Build/source/texk/kpathsea/kdefault.c index 52493d90560..bc25a5c2023 100644 --- a/Build/source/texk/kpathsea/kdefault.c +++ b/Build/source/texk/kpathsea/kdefault.c @@ -3,7 +3,7 @@ make a program `default' from it, since we have a target `default'; and OSF/1 make doesn't understand .PHONY.) - Copyright 1993, 1994, 1996, 2008, 2009 Karl Berry. + Copyright 1993, 1994, 1996, 2008, 2009, 2011 Karl Berry. Copyright 2002, 2005 Olaf Weber. This library is free software; you can redistribute it and/or @@ -84,14 +84,6 @@ kpathsea_expand_default (kpathsea kpse, const_string path, return expansion; } -#if defined (KPSE_COMPAT_API) -string -kpse_expand_default (const_string path, const_string fallback) -{ - return kpathsea_expand_default (kpse_def, path, fallback); -} -#endif - #ifdef TEST @@ -101,7 +93,7 @@ test_expand_default (const_string path, const_string def) string answer; printf ("Expansion of `%s':\t", path ? path : "(nil)"); - answer = kpse_expand_default (path, def); + answer = kpathsea_expand_default (kpse_def, path, def); puts (answer); } diff --git a/Build/source/texk/kpathsea/path-elt.c b/Build/source/texk/kpathsea/path-elt.c index cadd6091806..b40032ecd4c 100644 --- a/Build/source/texk/kpathsea/path-elt.c +++ b/Build/source/texk/kpathsea/path-elt.c @@ -91,15 +91,6 @@ kpathsea_path_element (kpathsea kpse, const_string p) return element (kpse, p, true); } -#if defined (KPSE_COMPAT_API) -string -kpse_path_element (const_string p) -{ - return kpathsea_path_element (kpse_def, p); -} -#endif - - string kpathsea_filename_component (kpathsea kpse, const_string p) { @@ -114,8 +105,8 @@ print_path_elements (const_string path) string elt; printf ("Elements of `%s':", path ? path : "(null)"); - for (elt = kpse_path_element (path); elt != NULL; - elt = kpse_path_element (NULL)) + for (elt = kpathsea_path_element (kpse_def, path); elt != NULL; + elt = kpathsea_path_element (kpse_def, NULL)) { printf (" %s", *elt ? elt : "`'"); } diff --git a/Build/source/texk/kpathsea/pathsearch.c b/Build/source/texk/kpathsea/pathsearch.c index d42fdb396ed..79aaae1d796 100644 --- a/Build/source/texk/kpathsea/pathsearch.c +++ b/Build/source/texk/kpathsea/pathsearch.c @@ -623,33 +623,11 @@ kpse_path_search (const_string path, const_string name, boolean must_exist) return kpathsea_path_search (kpse_def, path, name, must_exist); } -string -kpse_path_search_list (const_string path, const_string* names, - boolean must_exist) -{ - return kpathsea_path_search_list (kpse_def, path, names, must_exist); -} - string * kpse_all_path_search (const_string path, const_string name) { return kpathsea_all_path_search (kpse_def, path, name); } - -string * -kpse_path_search_list_generic (const_string path, const_string* names, - boolean must_exist, boolean all) -{ - return kpathsea_path_search_list_generic (kpse_def, path, names, - must_exist, all); -} - -string * -kpse_all_path_search_list (const_string path, const_string* names) -{ - return kpathsea_all_path_search_list (kpse_def, path, names); -} - #endif diff --git a/Build/source/texk/kpathsea/pathsearch.h b/Build/source/texk/kpathsea/pathsearch.h index 8be5780ea3b..54a1f4f95a7 100644 --- a/Build/source/texk/kpathsea/pathsearch.h +++ b/Build/source/texk/kpathsea/pathsearch.h @@ -1,6 +1,6 @@ /* pathsearch.h: mostly-generic path searching. - Copyright 1993, 1994, 1996, 1997, 2007, 2008, 2009 Karl Berry. + Copyright 1993, 1994, 1996, 1997, 2007, 2008, 2009, 2011 Karl Berry. Copyright 1999-2005 Olaf Weber. This library is free software; you can redistribute it and/or @@ -23,13 +23,19 @@ #include <kpathsea/str-llist.h> #include <kpathsea/types.h> +/* The naming of all these functions is rather scattered and + inconsistent, but they grew over time, and we don't want to change + the meaning of existing names. */ + +#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ + /* If PATH is non-null, return its first element (as defined by IS_ENV_SEP). If it's NULL, return the next element in the previous path, a la strtok. Leading, trailing, or doubled colons result in the empty string. When at the end of PATH, return NULL. In any case, return a pointer to an area that may be overwritten on subsequent calls. */ -extern KPSEDLL string kpathsea_path_element (kpathsea kpse, const_string path); +extern string kpathsea_path_element (kpathsea kpse, const_string path); /* Like `kpathsea_path_element', but for filename components (using IS_DIR_SEP). Uses same area as `kpathsea_path_element'. */ @@ -49,9 +55,10 @@ extern unsigned kpathsea_normalize_path (kpathsea kpse, string elt); It's up to the caller to expand ELT. This is because this routine is most likely only useful to be called from `kpathsea_path_search', which has already assumed expansion has been done. */ -extern KPSEDLL str_llist_type *kpathsea_element_dirs (kpathsea kpse, +extern str_llist_type *kpathsea_element_dirs (kpathsea kpse, string elt); +#endif /* MAKE_KPSE_DLL */ /* Call `kpathsea_expand' on NAME. If the result is an absolute or explicitly relative filename, check whether it is a readable @@ -75,44 +82,38 @@ extern KPSEDLL str_llist_type *kpathsea_element_dirs (kpathsea kpse, extern KPSEDLL string kpathsea_path_search (kpathsea kpse, const_string path, const_string name, boolean must_exist); +#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ + /* Like `kpathsea_path_search', except look for a list of NAMES. */ -extern KPSEDLL string kpathsea_path_search_list +extern string kpathsea_path_search_list (kpathsea kpse, const_string path, const_string* names, boolean must_exist); +#endif /* MAKE_KPSE_DLL */ + /* Like `kpathsea_path_search' with MUST_EXIST true, but always return all matches in a NULL-terminated list. */ extern KPSEDLL string *kpathsea_all_path_search (kpathsea kpse, const_string path, const_string name); +#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ + /* Search for any of the NAMES in PATH, and allow specifying both MUST_EXIST and ALL. */ -extern KPSEDLL string *kpathsea_path_search_list_generic (kpathsea kpse, +extern string *kpathsea_path_search_list_generic (kpathsea kpse, const_string path, const_string* names, boolean must_exist, boolean all); /* Search for any of NAMES, with MUST_EXIST and ALL true. */ -extern KPSEDLL string *kpathsea_all_path_search_list +extern string *kpathsea_all_path_search_list (kpathsea kpse, const_string path, const_string* names); -/* The naming of all these functions is rather scattered and - inconsistent, but they grew over time, and we don't want to change - the meaning of existing names. */ +#endif /* MAKE_KPSE_DLL */ #if defined(KPSE_COMPAT_API) -extern KPSEDLL string kpse_path_element (const_string path); -extern string kpse_filename_component (const_string path); -extern unsigned kpse_normalize_path (string elt); -extern KPSEDLL str_llist_type *kpse_element_dirs (string elt); extern KPSEDLL string kpse_path_search (const_string path, const_string name, boolean must_exist); -extern KPSEDLL string kpse_path_search_list - (const_string path, const_string* names, boolean must_exist); extern KPSEDLL string *kpse_all_path_search (const_string path, const_string name); -extern KPSEDLL string *kpse_path_search_list_generic - (const_string path, const_string* names, boolean must_exist, boolean all); -extern KPSEDLL string *kpse_all_path_search_list - (const_string path, const_string* names); #endif diff --git a/Build/source/texk/kpathsea/tilde.h b/Build/source/texk/kpathsea/tilde.h index 8f55c1df858..e570791482b 100644 --- a/Build/source/texk/kpathsea/tilde.h +++ b/Build/source/texk/kpathsea/tilde.h @@ -18,11 +18,11 @@ #ifndef KPATHSEA_TILDE_H #define KPATHSEA_TILDE_H +#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ + #include <kpathsea/c-proto.h> #include <kpathsea/types.h> -#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ - /* Replace a leading ~ or ~NAME in FILENAME with getenv ("HOME"), or getenv ("USERPROFILE") on Windows, or with NAME's home directory, respectively. Excise trailing slashes. FILENAME may not be null. */ diff --git a/Build/source/texk/kpathsea/truncate.h b/Build/source/texk/kpathsea/truncate.h index 030d5977463..4ad65a06c48 100644 --- a/Build/source/texk/kpathsea/truncate.h +++ b/Build/source/texk/kpathsea/truncate.h @@ -18,11 +18,11 @@ #ifndef KPATHSEA_TRUNCATE_H #define KPATHSEA_TRUNCATE_H +#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ + #include <kpathsea/c-proto.h> #include <kpathsea/types.h> -#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ - /* Truncate any component in NAME longer than the system NAME_MAX, and return the result as a malloced string. If none, return a copy of NAME. */ diff --git a/Build/source/texk/kpathsea/xstat.h b/Build/source/texk/kpathsea/xstat.h index 37eb65f91fe..59347bafdb9 100644 --- a/Build/source/texk/kpathsea/xstat.h +++ b/Build/source/texk/kpathsea/xstat.h @@ -1,6 +1,6 @@ /* xstat.h: stat with error checking. - Copyright 1992, 1993, 1994, 2008, 2010 Karl Berry. + Copyright 1992, 1993, 1994, 2008, 2010, 2011 Karl Berry. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -18,6 +18,8 @@ #ifndef KPATHSEA_XSTAT_H #define KPATHSEA_XSTAT_H +#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ + #include <kpathsea/c-proto.h> #include <kpathsea/c-stat.h> #include <kpathsea/types.h> @@ -28,8 +30,6 @@ #define SAME_FILE_P(s1, s2) \ ((s1).st_ino == (s2).st_ino && (s1).st_dev == (s2).st_dev) -#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ - /* Does stat(2) on PATH, and aborts if the stat fails. */ extern struct stat xstat (const_string path); |