diff options
Diffstat (limited to 'Build/source/texk/web2c/ptexdir')
-rw-r--r-- | Build/source/texk/web2c/ptexdir/ChangeLog | 12 | ||||
-rw-r--r-- | Build/source/texk/web2c/ptexdir/am/ptex.am | 14 | ||||
-rw-r--r-- | Build/source/texk/web2c/ptexdir/kanji.h | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/ptexdir/kanji_dump.c | 7 | ||||
-rwxr-xr-x | Build/source/texk/web2c/ptexdir/zfmtcompress.test | 85 |
5 files changed, 112 insertions, 11 deletions
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog index a45f7d7cfe9..47233df5554 100644 --- a/Build/source/texk/web2c/ptexdir/ChangeLog +++ b/Build/source/texk/web2c/ptexdir/ChangeLog @@ -1,3 +1,15 @@ +2019-12-10 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp> + + * am/ptex.am (ptex_cppflags): append $(ZLIB_INCLUDES). + (ptex_ldadd): append $(ZLIB_LIBS.) + (ptex_dependencies): append $(ZLIB_DEPEND) + (ptex_web_srcs): append zlib-fmt.ch. + * kanji.h: #include <zlib.h> + (dump_kanji, undump_kanji): arg is now type gzFile instead of FILE *. + * kanji_dump.c (pTeX) [!pTeX]: #define if not already. + (dump_kanji, undump_kanji): chang arg type. + * zfmtcompress.test: new script (not enabled). + 2019-10-14 Hironobu Yamashita <h.y.acetaminophen@gmail.com> * ptex-base.ch: Allow getting \kansujichar. diff --git a/Build/source/texk/web2c/ptexdir/am/ptex.am b/Build/source/texk/web2c/ptexdir/am/ptex.am index a2e35888aed..b329d100f58 100644 --- a/Build/source/texk/web2c/ptexdir/am/ptex.am +++ b/Build/source/texk/web2c/ptexdir/am/ptex.am @@ -1,12 +1,12 @@ ## texk/web2c/ptexdir/am/ptex.am: Makefile fragment for pTeX. ## -## Copyright (C) 2016-2018 Karl Berry <tex-live@tug.org> -## Copyright (C) 2010-2015 Peter Breitenlohner <tex-live@tug.org> +## Copyright 2015-2019 Karl Berry <tex-live@tug.org> +## Copyright 2010-2015 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. -ptex_cppflags = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) -ptex_ldadd = libkanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD) -ptex_dependencies = libkanji.a $(pproglib) $(PTEXENC_DEPEND) $(default_dependencies) +ptex_cppflags = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) $(ZLIB_INCLUDES) +ptex_ldadd = libkanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD) $(ZLIB_LIBS) +ptex_dependencies = libkanji.a $(pproglib) $(PTEXENC_DEPEND) $(ZLIB_DEPEND) $(default_dependencies) p_tangle = $(tangle_silent)WEBINPUTS=.:$(srcdir)/ptexdir:$(srcdir) $(buildenv) $(TANGLE) pweb_programs = pbibtex pdvitype ppltotf ptftopl @@ -73,7 +73,8 @@ ptex.web: tie$(EXEEXT) $(ptex_web_srcs) $(tie_m) $(ptex_web_srcs) ptex_web_srcs = \ tex.web \ - tex.ch + tex.ch \ + zlib-fmt.ch # Generate ptex.ch ptex.ch: tie$(EXEEXT) ptex.web $(ptex_ch_srcs) @@ -236,4 +237,3 @@ ptrip-clean: rm -rf ptripdir DISTCLEANFILES += ptrip.diffs - diff --git a/Build/source/texk/web2c/ptexdir/kanji.h b/Build/source/texk/web2c/ptexdir/kanji.h index c3b180c7238..5be133ecad4 100644 --- a/Build/source/texk/web2c/ptexdir/kanji.h +++ b/Build/source/texk/web2c/ptexdir/kanji.h @@ -10,6 +10,7 @@ #define getintone(w) ((w).cint1) #define setintone(w,a) ((w).cint1=(a)) #endif +#include <zlib.h> #ifndef KANJI #define KANJI @@ -69,8 +70,8 @@ extern void init_default_kanji (const_string file_str, const_string internal_str #define inputline2(fp,buff,pos,size) input_line2(fp,buff,pos,size,NULL) #endif -extern void dump_kanji (FILE *fp); -extern void undump_kanji (FILE *fp); +extern void dump_kanji (gzFile fp); +extern void undump_kanji (gzFile fp); #define dumpkanji dump_kanji #define undumpkanji undump_kanji diff --git a/Build/source/texk/web2c/ptexdir/kanji_dump.c b/Build/source/texk/web2c/ptexdir/kanji_dump.c index c6836d2e1e8..7ba7834abe4 100644 --- a/Build/source/texk/web2c/ptexdir/kanji_dump.c +++ b/Build/source/texk/web2c/ptexdir/kanji_dump.c @@ -3,9 +3,12 @@ */ #include "kanji.h" +#ifndef pTeX +#define pTeX +#endif #include <texmfmp.h> -void dump_kanji (FILE *fp) +void dump_kanji (gzFile fp) { char buffer[12]; const char *p = get_enc_string (); @@ -22,7 +25,7 @@ void dump_kanji (FILE *fp) do_dump (buffer, 1, 12, fp); } -void undump_kanji (FILE *fp) +void undump_kanji (gzFile fp) { char buffer[12]; char *p; diff --git a/Build/source/texk/web2c/ptexdir/zfmtcompress.test b/Build/source/texk/web2c/ptexdir/zfmtcompress.test new file mode 100755 index 00000000000..b8f02bad520 --- /dev/null +++ b/Build/source/texk/web2c/ptexdir/zfmtcompress.test @@ -0,0 +1,85 @@ +#!/bin/sh -vx +# $Id$ +# Public domain. Origginally written by Hironori Kitagawa, 2019. +# This test takes many hours to run, and also tests several engines, +# so it is not enabled. + +cat <<'EOF' > stress.tex +\let\origdump=\dump\let\dump\relax +\batchmode +\input plain.tex +\let\dump\origdump + +\count0=0 +\def\A{\ifnum\count0<450000 + \count1=1000000 \advance\count1\count0 + \edef\N{QW\the\count1} + \expandafter\xdef\csname HOGE\N\endcsname{ABCDEFGHI}% + \advance\count0 by1\let\next=\A\else\let\next\relax + \fi\next} +\A +\let\N\undefined +\count0=0 +\def\A{\ifnum\count0<199 + \count1=1000000 \advance\count1\count0 + \edef\N{\the\count1} + \font\S=cmr10 at \N sp\fontdimen39707\S=1sp + \advance\count0 by1\let\next=\A\else\let\next\relax + \fi\next} +\A +\dump +EOF + +cat <<'EOF' > test0.tex +\font\a=cmss10 at 1000000sp +\a qwertyuiopasdfghjkl$\int^\infty_0 e^{-x^2}\,dx$\end +EOF + + +test0() { + ENGINE=$1 + echo $ENGINE + rm -f stress-$ENGINE.fmt test0.dvi &>/dev/null + $ENGINE -ini -etex -progname=$ENGINE -jobname=stress-$ENGINE stress &>/dev/null + ls -l stress-$ENGINE.fmt + $ENGINE -fmt=./stress-$ENGINE.fmt test0.tex &>/dev/null + ls -l test0.dvi +} + +test0 tex +test0 etex +test0 pdftex +test0 ptex +test0 eptex +test0 uptex +test0 euptex +test0 xetex + +cat <<'EOF' > test1.tex +\documentclass{article} +\begin{document} +The \textit{quick} \textbf{brown} \textsc{fox} jumps over the lazy dog. +\[ + \frac{\pi}{2} = + \left( \int_{0}^{\infty} \frac{\sin x}{\sqrt{x}} dx \right)^2 = + \sum_{k=0}^{\infty} \frac{(2k)!}{2^{2k}(k!)^2} \frac{1}{2k+1} = + \prod_{k=1}^{\infty} \frac{4k^2}{4k^2 - 1} +\] +\end{document} +EOF + +test1() { + ENGINE=$1 + echo $ENGINE + rm -f latex-$ENGINE.fmt test1.dvi &>/dev/null + $ENGINE -ini -etex -progname=latex-dev -jobname=latex-$ENGINE latex.ini &>/dev/null + ls -l latex-$ENGINE.fmt + $ENGINE -fmt=./latex-$ENGINE.fmt test1.tex &>/dev/null + ls -l test1.dvi +} + +test1 etex +test1 pdftex +test1 eptex +test1 euptex +test1 xetex |