diff options
author | Takuji Tanaka <KXD02663@nifty.ne.jp> | 2017-06-19 14:00:21 +0000 |
---|---|---|
committer | Takuji Tanaka <KXD02663@nifty.ne.jp> | 2017-06-19 14:00:21 +0000 |
commit | 24274bfce4fb35c537447dace80be3d48d7c250b (patch) | |
tree | 52fe25db6bd67d73c402e97b48143f492ac6a20a /Build/source/texk | |
parent | 47200cf750c5f351fe840f9d9b57bde6cc75167c (diff) |
texk/dvidvi: Support pTeX dvi by H. Yamashita-san
git-svn-id: svn://tug.org/texlive/trunk@44638 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/dvidvi/ChangeLog | 7 | ||||
-rw-r--r-- | Build/source/texk/dvidvi/Makefile.am | 7 | ||||
-rw-r--r-- | Build/source/texk/dvidvi/Makefile.in | 6 | ||||
-rw-r--r-- | Build/source/texk/dvidvi/dvidvi.c | 24 | ||||
-rwxr-xr-x | Build/source/texk/dvidvi/dvidvi.test | 7 | ||||
-rw-r--r-- | Build/source/texk/dvidvi/tests/playout.3 | 5 | ||||
-rw-r--r-- | Build/source/texk/dvidvi/tests/playtate.dvi | bin | 0 -> 2484 bytes |
7 files changed, 50 insertions, 6 deletions
diff --git a/Build/source/texk/dvidvi/ChangeLog b/Build/source/texk/dvidvi/ChangeLog index f4c8c14779a..4df9e221d0a 100644 --- a/Build/source/texk/dvidvi/ChangeLog +++ b/Build/source/texk/dvidvi/ChangeLog @@ -1,3 +1,10 @@ +2017-06-18 Hironobu Yamashita <h.y.acetaminophen@gmail.com> + + * dvidvi.c: Add support for pTeX tate-kumi DVI. + * dvidvi.test: Add tests for pTeX support. + * playout.3, playtate.dvi: Added. + * Makefile.am: Adjusted for pTeX support. + 2015-07-07 Peter Breitenlohner <peb@mppmu.mpg.de> * Makefile.am: Better dependencies for 'make check'. diff --git a/Build/source/texk/dvidvi/Makefile.am b/Build/source/texk/dvidvi/Makefile.am index 9fb85c37351..6f9225a4919 100644 --- a/Build/source/texk/dvidvi/Makefile.am +++ b/Build/source/texk/dvidvi/Makefile.am @@ -3,7 +3,7 @@ ## Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## -AM_CPPFLAGS = $(KPATHSEA_INCLUDES) -DKPATHSEA -DUNIX +AM_CPPFLAGS = $(KPATHSEA_INCLUDES) -DKPATHSEA -DASCIIPTEX -DUNIX AM_CFLAGS = $(WARNING_CFLAGS) bin_PROGRAMS = dvidvi @@ -36,6 +36,7 @@ dvidvi.log: dvidvi$(EXEXXT) EXTRA_DIST += $(TESTS) ## dvidvi.test -EXTRA_DIST += tests/play.dvi tests/playout.2 -DISTCLEANFILES = play*.2 play*.dvi +EXTRA_DIST += tests/play.dvi tests/playout.2 \ + tests/playtate.dvi tests/playout.3 +DISTCLEANFILES = play*.2 play*.3 play*.dvi diff --git a/Build/source/texk/dvidvi/Makefile.in b/Build/source/texk/dvidvi/Makefile.in index de9c64e79d9..d12f2de79e7 100644 --- a/Build/source/texk/dvidvi/Makefile.in +++ b/Build/source/texk/dvidvi/Makefile.in @@ -540,16 +540,16 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AM_CPPFLAGS = $(KPATHSEA_INCLUDES) -DKPATHSEA -DUNIX +AM_CPPFLAGS = $(KPATHSEA_INCLUDES) -DKPATHSEA -DASCIIPTEX -DUNIX AM_CFLAGS = $(WARNING_CFLAGS) dvidvi_SOURCES = dvidvi.c dist_man1_MANS = dvidvi.1 EXTRA_DIST = a5bookle.bat a5bookle.com a5bookle.hlp a5test.tex \ build.com doubside.bat doubside.com doubside.hlp \ dvidvi.kohm-patch dvisamp.tex $(TESTS) tests/play.dvi \ - tests/playout.2 + tests/playout.2 tests/playtate.dvi tests/playout.3 TESTS = dvidvi.test -DISTCLEANFILES = play*.2 play*.dvi +DISTCLEANFILES = play*.2 play*.3 play*.dvi all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am diff --git a/Build/source/texk/dvidvi/dvidvi.c b/Build/source/texk/dvidvi/dvidvi.c index cc49995750a..26f7433dd42 100644 --- a/Build/source/texk/dvidvi/dvidvi.c +++ b/Build/source/texk/dvidvi/dvidvi.c @@ -165,6 +165,10 @@ integer *pageloc ; integer *pagenumbers ; int prettycolumn ; /* the column we are at when running pretty */ +#ifdef ASCIIPTEX +int ptexdvi ; /* true if dvi file is extended (TATEKUMI) */ +#endif + /* * This array holds values that indicate the length of a command, if * we aren't concerned with that command (which is most of them) or @@ -873,6 +877,11 @@ static void readdvifile(void) { if (c == 2 && d == 0xdf /* dave fuchs */ && e == 0xdf) break ; +#ifdef ASCIIPTEX + if (c == 3 && d == 0xdf /* dave fuchs */ && + e == 0xdf) + break ; +#endif fseek(infile,-4L,SEEK_CUR); } if (p < 10) @@ -1024,6 +1033,11 @@ static void writepostamble(void) { putfontdef(i) ; outdvibyte(249) ; outdviquad(p) ; +#ifdef ASCIIPTEX + if (ptexdvi) + outdvibyte(3) ; + else +#endif outdvibyte(2) ; outdviquad(0xdfdfdfdfL) ; while (dviloc & 3) @@ -1129,6 +1143,12 @@ case 243: case 244: case 245: case 246: p += dvibyte() + 2 ; fseek(infile,p,SEEK_SET); break ; +#ifdef ASCIIPTEX +case 255: + ptexdvi = 1 ; + outdvibyte(len); + break ; +#endif default: fprintf(stderr, "Bad dvi command was %d at %ld\n", len, p) ; error("! lost sync dvi in file lost dvi sync file in") ; } @@ -1160,6 +1180,10 @@ static void writedvifile(void) { struct pagespec *ps ; Boolean beginp ; +#ifdef ASCIIPTEX + ptexdvi = 0 ; +#endif + writepreamble() ; if ( !pagemodulo ) pagefake = (pagecount + modulo - 1) / modulo * modulo ; diff --git a/Build/source/texk/dvidvi/dvidvi.test b/Build/source/texk/dvidvi/dvidvi.test index 926017b7c92..56cf5d48966 100755 --- a/Build/source/texk/dvidvi/dvidvi.test +++ b/Build/source/texk/dvidvi/dvidvi.test @@ -10,3 +10,10 @@ cp $srcdir/tests/play.dvi . && diff playout.2 $srcdir/tests/playout.2 \ || exit 1 +rm -rf play* +cp $srcdir/tests/playtate.dvi . +./dvidvi -f 5 -l @25 -m'4:-3,0(6,0)' playtate playout \ + 2>playout.3 \ + && diff playout.3 $srcdir/tests/playout.3 \ + || exit 1 + diff --git a/Build/source/texk/dvidvi/tests/playout.3 b/Build/source/texk/dvidvi/tests/playout.3 new file mode 100644 index 00000000000..c76bb176c06 --- /dev/null +++ b/Build/source/texk/dvidvi/tests/playout.3 @@ -0,0 +1,5 @@ + +This is dvidvi 1.1, Copyright (C) 1988-91, Radical Eye Software +Improved from 1.0 to 1.1, 1994, Markus Kohm +playtate.dvi -> playout.dvi +[5] [12] [9] [8] [13] diff --git a/Build/source/texk/dvidvi/tests/playtate.dvi b/Build/source/texk/dvidvi/tests/playtate.dvi Binary files differnew file mode 100644 index 00000000000..5126e2d2626 --- /dev/null +++ b/Build/source/texk/dvidvi/tests/playtate.dvi |