diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-03-16 15:13:07 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-03-16 15:13:07 +0000 |
commit | e967e0cc978d647040ac5616d389e9007d593464 (patch) | |
tree | 1f33ce27a77473b2e90b549d42399b73d4123497 /Build/source/texk/kpathsea/tilde.c | |
parent | 49f1fb6887627cdb7cf524aaef9b92108c894381 (diff) |
new reentrant kpathsea API (from Taco)
git-svn-id: svn://tug.org/texlive/trunk@12401 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/tilde.c')
-rw-r--r-- | Build/source/texk/kpathsea/tilde.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Build/source/texk/kpathsea/tilde.c b/Build/source/texk/kpathsea/tilde.c index 85d4e61cdbd..12e71434fd5 100644 --- a/Build/source/texk/kpathsea/tilde.c +++ b/Build/source/texk/kpathsea/tilde.c @@ -36,12 +36,13 @@ <pwd.h>, just return NAME. */ string -kpse_tilde_expand P1C(const_string, name) +kpathsea_tilde_expand (kpathsea kpse, const_string name) { const_string expansion; const_string home; const_string prefix; + (void)kpse; /* currenty not used */ assert (name); /* If there is a leading "!!", set prefix to "!!", otherwise use @@ -126,6 +127,14 @@ kpse_tilde_expand P1C(const_string, name) be returning a malloc-ed string. Callers beware. Sorry. */ return (string) expansion; } + +#if defined (KPSE_COMPAT_API) +string +kpse_tilde_expand (const_string name) +{ + return kpathsea_tilde_expand (kpse_def, name); +} +#endif #ifdef TEST @@ -140,10 +149,10 @@ test_expand_tilde (const_string filename) } int -main () +main (int argc, char **argv) { string tilde_path = "tilde"; - + kpse_set_program_name(argv[0],NULL); test_expand_tilde (""); test_expand_tilde ("none"); test_expand_tilde ("~root"); |