diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-02-15 08:19:27 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-02-15 08:19:27 +0000 |
commit | 5ad5b475cc0211e3d48232660a9f1548ac2aadb5 (patch) | |
tree | 8828e1ca68606e563aede87ea2a699fcf60c8543 /Build/source/texk/kpathsea/kdefault.c | |
parent | b9a895c295af055dfbc9599c2a763ed0d443d109 (diff) |
minor cleanup
git-svn-id: svn://tug.org/texlive/trunk@17034 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/kdefault.c')
-rw-r--r-- | Build/source/texk/kpathsea/kdefault.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Build/source/texk/kpathsea/kdefault.c b/Build/source/texk/kpathsea/kdefault.c index 43b79965ee5..52493d90560 100644 --- a/Build/source/texk/kpathsea/kdefault.c +++ b/Build/source/texk/kpathsea/kdefault.c @@ -28,17 +28,17 @@ /* Check for leading colon first, then trailing, then doubled, since that is fastest. Usually it will be leading or trailing. */ -string -kpathsea_expand_default (kpathsea kpse, const_string path, +string +kpathsea_expand_default (kpathsea kpse, const_string path, const_string fallback) { unsigned path_length; string expansion; (void)kpse; /* currenty not used */ - + /* The default path better not be null. */ assert (fallback); - + if (path == NULL) expansion = xstrdup (fallback); @@ -81,11 +81,11 @@ kpathsea_expand_default (kpathsea kpse, const_string path, expansion = xstrdup(path); } } - + return expansion; } #if defined (KPSE_COMPAT_API) -string +string kpse_expand_default (const_string path, const_string fallback) { return kpathsea_expand_default (kpse_def, path, fallback); @@ -99,7 +99,7 @@ void 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); puts (answer); @@ -117,8 +117,8 @@ main () test_expand_default (ENV_SEP_STRING "first", default_path); test_expand_default ("last" ENV_SEP_STRING, default_path); test_expand_default ("middle" ENV_SEP_STRING ENV_SEP_STRING "elddim", - default_path); - + default_path); + return 0; } |