Skip to content

Commit 6d32e59

Browse files
author
Akira Kakuto
committed
First search for an input file with a suffix .xdv or .dvi in (x)dvipdfmx in branch2018.
git-svn-id: svn://tug.org/texlive/branches/branch2018/Build/source@48683 c570f23f-e606-0410-a88d-b1316a301751
1 parent eb0ef53 commit 6d32e59

File tree

2 files changed

+34
-14
lines changed

2 files changed

+34
-14
lines changed

texk/dvipdfm-x/ChangeLog

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
1+
2018-05-23 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
2+
3+
* dvi.c: First search for an input file with a suffix .xdv
4+
or .dvi. Report from Andreas Scherer:
5+
http://tug.org/pipermail/tex-k/2018-May/002882.html.
6+
7+
2018-05-16 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
8+
9+
* pdfparse.c: Revert. The changes on 2018-05-14 must be
10+
problematic. Again, kanji characters including 0x5c can't be
11+
used as names of image files in (e)-pTeX.
12+
13+
2018-05-14 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
14+
15+
* pdfparse.c: Allow image file names including 0x5c for
16+
(e)-pTeX in CP932-like system (Windows only).
17+
118
2018-05-06 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
219

320
* tt_cmap.c: Revert a part of changes in 2017-12-09,
421
which breaks to give tounicode entries for ligatures.
522
http://tug.org/pipermail/tex-live/2018-May/041608.html.
623
* configure.ac: Version 20180506.
724

8-
2018-04-28 Stefan Br\"uns <stefan.bruens@rwth-aachen.de>
25+
2018-04-28 Stefan Br\"uns <stefan.bruens@rwth-aachen.de>
926

1027
* pngimage.c: Fix a bug which causes a segfault with 1/2/4-bit
1128
transparent indexed PNGs.

texk/dvipdfm-x/dvi.c

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
22
3-
Copyright (C) 2002-2017 by Jin-Hwan Cho and Shunsaku Hirata,
3+
Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata,
44
the dvipdfmx project team.
55
66
Copyright (C) 2012-2015 by Khaled Hosny <khaledhosny@eglug.org>
@@ -1999,21 +1999,24 @@ dvi_init (char *dvi_filename, double mag)
19991999
else
20002000
ungetc(ch, dvi_file);
20012001
} else {
2002-
dvi_file = MFOPEN(dvi_filename, FOPEN_RBIN_MODE);
2003-
if (!dvi_file) {
2004-
char *p;
2005-
p = strrchr(dvi_filename, '.');
2006-
if (p == NULL || (!FILESTRCASEEQ(p, ".dvi") &&
2007-
!FILESTRCASEEQ(p, ".xdv"))) {
2008-
strcat(dvi_filename, ".xdv");
2002+
char *p, *saved_orig_name;
2003+
dvi_file = NULL;
2004+
saved_orig_name = xstrdup(dvi_filename);
2005+
p = strrchr(dvi_filename, '.');
2006+
if (p == NULL || (!FILESTRCASEEQ(p, ".dvi") &&
2007+
!FILESTRCASEEQ(p, ".xdv"))) {
2008+
strcat(dvi_filename, ".xdv");
2009+
dvi_file = MFOPEN(dvi_filename, FOPEN_RBIN_MODE);
2010+
if (!dvi_file) {
2011+
dvi_filename[strlen(dvi_filename) - 4] = '\0';
2012+
strcat(dvi_filename, ".dvi");
20092013
dvi_file = MFOPEN(dvi_filename, FOPEN_RBIN_MODE);
2010-
if (!dvi_file) {
2011-
dvi_filename[strlen(dvi_filename) - 4] = '\0';
2012-
strcat(dvi_filename, ".dvi");
2013-
dvi_file = MFOPEN(dvi_filename, FOPEN_RBIN_MODE);
2014-
}
20152014
}
20162015
}
2016+
if (!dvi_file)
2017+
dvi_file = MFOPEN(saved_orig_name, FOPEN_RBIN_MODE);
2018+
free(saved_orig_name);
2019+
20172020
if (!dvi_file) {
20182021
ERROR("Could not open specified DVI (or XDV) file: %s",
20192022
dvi_filename);

0 commit comments

Comments
 (0)