summaryrefslogtreecommitdiff
path: root/Build/source/texk/mendexk/fread.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-04-19 12:29:40 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-04-19 12:29:40 +0000
commit2438d33d26e1efd298278d484a4309cd5281c7ce (patch)
tree2c0fd6724e26b7a1e0aa65b2dd5e97217ecdbec7 /Build/source/texk/mendexk/fread.c
parent08fe73b8b6eb9d22a5a6551e9126cbbb93eea300 (diff)
texk/mendexk: update from Akira
git-svn-id: svn://tug.org/texlive/trunk@17921 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/mendexk/fread.c')
-rw-r--r--Build/source/texk/mendexk/fread.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/Build/source/texk/mendexk/fread.c b/Build/source/texk/mendexk/fread.c
index 9cd5d322eeb..9f5bc324c79 100644
--- a/Build/source/texk/mendexk/fread.c
+++ b/Build/source/texk/mendexk/fread.c
@@ -3,6 +3,7 @@
#include <string.h>
#include <kpathsea/config.h>
+#include <kpathsea/tex-file.h>
#include <ptexenc/ptexenc.h>
#include "mendex.h"
@@ -29,10 +30,16 @@ int idxread(char *filename, int start)
verb_printf(efp, "Scanning input file stdin.");
}
else {
- fp=nkf_open(filename,"r");
+ if(kpse_in_name_ok(filename))
+ fp=nkf_open(filename,"r");
+ else
+ fp=NULL;
if (fp==NULL) {
sprintf(buff,"%s.idx",filename);
- fp=nkf_open(buff,"r");
+ if(kpse_in_name_ok(buff))
+ fp=nkf_open(buff,"r");
+ else
+ fp=NULL;
if (fp==NULL) {
warn_printf(efp,"Warning: Couldn't find input file %s.\n",filename);
return 1;