From 6c2467cbb8e21577155060c598661d71024c1893 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 2 Aug 2011 15:40:28 +0000 Subject: mendexk: remove support for ancient kpathsea git-svn-id: svn://tug.org/texlive/trunk@23316 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/mendexk/ChangeLog.TL | 5 +++++ Build/source/texk/mendexk/Makefile.am | 2 +- Build/source/texk/mendexk/Makefile.in | 2 +- Build/source/texk/mendexk/convert.c | 4 ---- Build/source/texk/mendexk/kp.c | 35 ---------------------------------- Build/source/texk/mendexk/kp.h | 4 ---- Build/source/texk/mendexk/main.c | 4 ---- 7 files changed, 7 insertions(+), 49 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/mendexk/ChangeLog.TL b/Build/source/texk/mendexk/ChangeLog.TL index b2a58d6d428..5eca3afb25d 100644 --- a/Build/source/texk/mendexk/ChangeLog.TL +++ b/Build/source/texk/mendexk/ChangeLog.TL @@ -1,6 +1,11 @@ ChangeLog.TL: TeX Live (TL) changes for mendexk =============================================== +2011-08-02 Peter Breitenlohner + + * convert.c, kp.[ch], main.c: Remove code for ancient kpathsea. + * Makefile.am (AM_CPPFLAGS): Drop `-DKPATHSEA3'. + 2011-04-23 Peter Breitenlohner * Makefile.am (EXTRA_DIST): No need to mention ChangeLog, README. diff --git a/Build/source/texk/mendexk/Makefile.am b/Build/source/texk/mendexk/Makefile.am index 7cb1c85e804..dfc830704bd 100644 --- a/Build/source/texk/mendexk/Makefile.am +++ b/Build/source/texk/mendexk/Makefile.am @@ -6,7 +6,7 @@ ACLOCAL_AMFLAGS = -I ../../m4 INCLUDES = $(PTEXENC_INCLUDES) $(KPATHSEA_INCLUDES) -AM_CPPFLAGS = -DKPATHSEA -DKPATHSEA3 +AM_CPPFLAGS = -DKPATHSEA AM_CFLAGS = $(WARNING_CFLAGS) bin_PROGRAMS = mendex diff --git a/Build/source/texk/mendexk/Makefile.in b/Build/source/texk/mendexk/Makefile.in index 4cafb83d593..d3941d89ab4 100644 --- a/Build/source/texk/mendexk/Makefile.in +++ b/Build/source/texk/mendexk/Makefile.in @@ -253,7 +253,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I ../../m4 INCLUDES = $(PTEXENC_INCLUDES) $(KPATHSEA_INCLUDES) -AM_CPPFLAGS = -DKPATHSEA -DKPATHSEA3 +AM_CPPFLAGS = -DKPATHSEA AM_CFLAGS = $(WARNING_CFLAGS) mendex_SOURCES = \ convert.c \ diff --git a/Build/source/texk/mendexk/convert.c b/Build/source/texk/mendexk/convert.c index 3d7d4241d22..dec092ac65b 100644 --- a/Build/source/texk/mendexk/convert.c +++ b/Build/source/texk/mendexk/convert.c @@ -96,11 +96,7 @@ int dicread(const char *filename) ENV: #ifdef KPATHSEA -#ifdef KPATHSEA3 envfile=KP_get_value("INDEXDEFAULTDICTIONARY",NULL); -#else - envfile=KP_get_value("INDEXDEFAULTDICTIONARY","INDEXDEFAULTDICTIONARY",NULL); -#endif #else envfile=getenv("INDEXDEFAULTDICTIONARY"); #endif diff --git a/Build/source/texk/mendexk/kp.c b/Build/source/texk/mendexk/kp.c index efc3823e37b..9480c6dda4f 100644 --- a/Build/source/texk/mendexk/kp.c +++ b/Build/source/texk/mendexk/kp.c @@ -12,7 +12,6 @@ KP_init(char *prog) return 0; } -#ifdef KPATHSEA3 /* KP_get_value(char *var,char *def_val) ARGUMENTS: char *var: name of variable. @@ -24,33 +23,6 @@ const char *KP_get_value(const char *var, const char *def_val) return p ? p : def_val; } -#else - -#include /* for getenv() */ - -/* KP_get_value(char *env,char *cnf,char *def_val) - ARGUMENTS: - char *env: name of environment variable. - char *cnf: name of variable in `texmf.cnf'. - char *def_val: default value. - */ -const char *KP_get_value(const char *env, const char *cnf, const char *def_val) -{ - const char *val; - char *cnf_val,*env_val; - - val = def_val ? def_val : ""; - - cnf_val = kpse_cnf_get(cnf); - env_val = getenv(env); - if (cnf_val) val = kpse_expand_default(cnf_val,val); - if (env_val) val = kpse_expand_default(env_val,val); - - return val[0] ? val : ((cnf_val || env_val) ? val : NULL); -} -#endif - -#ifdef KPATHSEA3 /* KP_get_path(char *var, char *def_val) ARGUMENTS: char *var: name of variable. @@ -66,19 +38,12 @@ static const char *KP_get_path(const char *var, const char *def_val) p = kpse_path_expand(avar); return (p && *p) ? p : def_val; } -#endif /* */ int KP_entry_filetype(KpathseaSupportInfo *info) { -#ifdef KPATHSEA3 info->path = KP_get_path(info->var_name,info->path); -#else - const char *path; - path = KP_get_value(info->var_name,info->var_name,info->path); - info->path = kpse_path_expand(path); -#endif return 0; } diff --git a/Build/source/texk/mendexk/kp.h b/Build/source/texk/mendexk/kp.h index 7ad5e3e1d8a..69ae4fa8df5 100644 --- a/Build/source/texk/mendexk/kp.h +++ b/Build/source/texk/mendexk/kp.h @@ -13,10 +13,6 @@ extern KpathseaSupportInfo kp_ist, kp_dict; extern int KP_init(char *); extern int KP_entry_filetype(KpathseaSupportInfo *); extern const char *KP_find_file(KpathseaSupportInfo *, const char *); -#ifdef KPATHSEA3 extern const char *KP_get_value(const char *, const char *); -#else -extern const char *KP_get_value(const char *, const char *, const char *); -#endif #endif /* KPATHSEA */ #endif /* ! KSUPPORT_H_INCLUDED */ diff --git a/Build/source/texk/mendexk/main.c b/Build/source/texk/mendexk/main.c index 71bc1f85d00..e226a660b56 100644 --- a/Build/source/texk/mendexk/main.c +++ b/Build/source/texk/mendexk/main.c @@ -207,11 +207,7 @@ int main(int argc, char **argv) if (styfile==NULL) { #ifdef KPATHSEA -#ifdef KPATHSEA3 envbuff=KP_get_value("INDEXDEFAULTSTYLE",NULL); -#else - envbuff=KP_get_value("INDEXDEFAULTSTYLE","INDEXDEFAULTSTYLE",NULL); -#endif #else envbuff=getenv("INDEXDEFAULTSTYLE"); #endif -- cgit v1.2.3