summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-04-19 12:31:17 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-04-19 12:31:17 +0000
commita84628de6ef38ff879cec6f07a790d8ac1b45eea (patch)
tree8986fe29267095024835085de2492b01f08e5fb5 /Build/source/texk/web2c
parent2438d33d26e1efd298278d484a4309cd5281c7ce (diff)
pTeX update
git-svn-id: svn://tug.org/texlive/trunk@17922 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r--Build/source/texk/web2c/ChangeLog8
-rw-r--r--Build/source/texk/web2c/Makefile.in38
-rwxr-xr-xBuild/source/texk/web2c/configure10
-rw-r--r--Build/source/texk/web2c/help.h58
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog5
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c4
-rw-r--r--Build/source/texk/web2c/ptexdir/ChangeLog27
-rw-r--r--Build/source/texk/web2c/ptexdir/am/ptex.am30
-rw-r--r--Build/source/texk/web2c/ptexdir/kanji.h8
-rw-r--r--Build/source/texk/web2c/ptexdir/lib/ChangeLog4
-rw-r--r--Build/source/texk/web2c/ptexdir/lib/Makefile.am8
-rw-r--r--Build/source/texk/web2c/ptexdir/lib/Makefile.in11
-rw-r--r--Build/source/texk/web2c/ptexdir/lib/openclose.c.orig279
-rw-r--r--Build/source/texk/web2c/ptexdir/lib/printversion.c.orig61
-rw-r--r--Build/source/texk/web2c/ptexdir/lib/usage.c36
-rw-r--r--Build/source/texk/web2c/ptexdir/lib/usage.c.orig35
-rw-r--r--Build/source/texk/web2c/ptexdir/pdvitype.ch701
-rw-r--r--Build/source/texk/web2c/ptexdir/ppltotf.ch20
-rw-r--r--Build/source/texk/web2c/ptexdir/ptex-base.ch2
-rw-r--r--Build/source/texk/web2c/ptexdir/ptex.defines5
-rw-r--r--Build/source/texk/web2c/ptexdir/ptexextra.in39
-rw-r--r--Build/source/texk/web2c/ptexdir/ptftopl.ch12
-rw-r--r--Build/source/texk/web2c/texmfmp-help.h40
-rw-r--r--Build/source/texk/web2c/texmfmp.h4
-rw-r--r--Build/source/texk/web2c/web2c/ChangeLog6
-rw-r--r--Build/source/texk/web2c/web2c/common.defines5
-rwxr-xr-xBuild/source/texk/web2c/web2c/convert34
-rw-r--r--Build/source/texk/web2c/web2c/splitup.c5
28 files changed, 257 insertions, 1238 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index 54d9799c0fb..a940b5efb39 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,11 @@
+2010-04-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * help.h (PBIBTEXHELP, PDVITYPEHELP, PPLTOTFHELP, PTFTOPLHELP):
+ Moved from from ptexdir/ptexhelp.h.
+ * texmfmp-help.h (PTEXHELP): Moved from ptexdir/ptexextra.in.
+ * texmfmp.h [PTEX]: Define TEXMFPOOLNAME and TEXMFENGINENAME, and
+ #include "ptexdir/kanji.h".
+
2010-04-15 Peter Breitenlohner <peb@mppmu.mpg.de>
* configure.ac: Removed LT_LIB_DLLOAD, added check for dlfcn.h.
diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in
index d5ccafe44ad..83bd39bab8f 100644
--- a/Build/source/texk/web2c/Makefile.in
+++ b/Build/source/texk/web2c/Makefile.in
@@ -1228,15 +1228,14 @@ EXTRA_DIST = PROJECTS cftests config.h cpascal.h help.h triptrap-sh \
etexdir/etrip/trip2.in etexdir/etex.mak etexdir/etex.mk \
$(ptex_web_srcs) $(ptex_ch_srcs) ptexdir/ptexextra.in \
ptexdir/ptex.defines lib/texmfmp.c tmf-pool.h \
- ptexdir/pbibtex.ch ptexdir/pbibtex.defines web2c/cvtbib.sed \
- ptexdir/pdvitype.ch ptexdir/ppltotf.ch ptexdir/ptftopl.ch \
- ptexdir/COPYRIGHT ptexdir/COPYRIGHT.jis ptexdir/ChangeLog \
- ptexdir/Changes.txt ptexdir/INSTALL.txt ptexdir/README.txt \
- $(ptex_tests) ptexdir/ptrip.diffs ptexdir/Files \
- ptexdir/lib/openclose.c.orig ptexdir/lib/printversion.c.orig \
- ptexdir/lib/usage.c.orig ptexdir/ptex.mk \
- ptexdir/ptex-base.ch.orig ptexdir/reautoconf $(pdftex_ch_srcs) \
- pdftexdir/pdftex.defines pdftexdir/pdftex.h \
+ ptexdir/pbibtex.ch web2c/cvtbib.sed ptexdir/pdvitype.ch \
+ ptexdir/ppltotf.ch ptexdir/ptftopl.ch ptexdir/COPYRIGHT \
+ ptexdir/COPYRIGHT.jis ptexdir/ChangeLog ptexdir/Changes.txt \
+ ptexdir/INSTALL.txt ptexdir/README.txt $(ptex_tests) \
+ ptexdir/ptrip.diffs ptexdir/Files ptexdir/pbibtex.defines \
+ ptexdir/ptex.mk ptexdir/ptex-base.ch.orig \
+ ptexdir/ptex-include.ch ptexdir/ptexhelp.h ptexdir/reautoconf \
+ $(pdftex_ch_srcs) pdftexdir/pdftex.defines pdftexdir/pdftex.h \
pdftexdir/pdftexextra.in pdftexdir/ChangeLog pdftexdir/NEWS \
pdftexdir/README pdftexdir/change-files.txt \
pdftexdir/pdftex.mak pdftexdir/pdftex.mk \
@@ -1642,23 +1641,22 @@ ptex_web_srcs = \
ptex_ch_srcs = \
$(ptex_ch_synctex) \
ptexdir/ptex-base.ch \
- ptexdir/ptex-include.ch \
tex-binpool.ch
nodist_pbibtex_SOURCES = pbibtex.c pbibtex.h
-pbibtex_SOURCES = ptexdir/kanji.h ptexdir/ptexhelp.h
+pbibtex_SOURCES = ptexdir/kanji.h
pbibtex_CPPFLAGS = $(ptex_cppflags)
pbibtex_LDADD = $(ptex_ldadd)
nodist_pdvitype_SOURCES = pdvitype.c pdvitype.h
-pdvitype_SOURCES = ptexdir/kanji.h ptexdir/ptexhelp.h
+pdvitype_SOURCES = ptexdir/kanji.h
pdvitype_CPPFLAGS = $(ptex_cppflags) -DDHEX_CHAR_CODE
pdvitype_LDADD = $(ptex_ldadd)
nodist_ppltotf_SOURCES = ppltotf.c ppltotf.h
-ppltotf_SOURCES = ptexdir/kanji.h ptexdir/ptexhelp.h
+ppltotf_SOURCES = ptexdir/kanji.h
ppltotf_CPPFLAGS = $(ptex_cppflags) -DPRESERVE_PUTC
ppltotf_LDADD = $(ptex_ldadd)
nodist_ptftopl_SOURCES = ptftopl.c ptftopl.h
-ptftopl_SOURCES = ptexdir/kanji.h ptexdir/ptexhelp.h
+ptftopl_SOURCES = ptexdir/kanji.h
ptftopl_CPPFLAGS = $(ptex_cppflags)
ptftopl_LDADD = $(ptex_ldadd)
@@ -9020,7 +9018,7 @@ ptex.ch: tie$(EXEEXT) ptex.web $(ptex_ch_srcs)
$(tie) -c ptex.ch ptex.web $(ptex_ch_srcs)
pbibtex.c pbibtex.h: pbibtex-web2c
$(web2c) pbibtex
-pbibtex-web2c: pbibtex.p $(web2c_depend) ptexdir/pbibtex.defines web2c/cvtbib.sed
+pbibtex-web2c: pbibtex.p $(web2c_depend) ptexdir/ptex.defines web2c/cvtbib.sed
$(web2c) pbibtex
pbibtex.p: tangle$(EXEEXT) pbibtex.web ptexdir/pbibtex.ch
$(p_tangle) pbibtex pbibtex
@@ -9028,15 +9026,15 @@ pbibtex.web: tie$(EXEEXT) bibtex.web bibtex.ch
$(tie) -m pbibtex.web bibtex.web bibtex.ch
pdvitype.c pdvitype.h: pdvitype-web2c
$(web2c) pdvitype
-pdvitype-web2c: pdvitype.p $(web2c_depend)
+pdvitype-web2c: pdvitype.p $(web2c_depend) ptexdir/ptex.defines
$(web2c) pdvitype
pdvitype.p: tangle$(EXEEXT) pdvitype.web ptexdir/pdvitype.ch
$(p_tangle) pdvitype pdvitype
-pdvitype.web: $(srcdir)/dvitype.web
- $(LN_S) $(srcdir)/dvitype.web $@
+pdvitype.web: tie$(EXEEXT) dvitype.web dvitype.ch
+ $(tie) -m pdvitype.web dvitype.web dvitype.ch
ppltotf.c ppltotf.h: ppltotf-web2c
$(web2c) ppltotf
-ppltotf-web2c: ppltotf.p $(web2c_depend)
+ppltotf-web2c: ppltotf.p $(web2c_depend) ptexdir/ptex.defines
$(web2c) ppltotf
ppltotf.p: tangle$(EXEEXT) ppltotf.web ptexdir/ppltotf.ch
$(p_tangle) ppltotf ppltotf
@@ -9044,7 +9042,7 @@ ppltotf.web: tie$(EXEEXT) pltotf.web pltotf.ch
$(tie) -m ppltotf.web pltotf.web pltotf.ch
ptftopl.c ptftopl.h: ptftopl-web2c
$(web2c) ptftopl
-ptftopl-web2c: ptftopl.p $(web2c_depend)
+ptftopl-web2c: ptftopl.p $(web2c_depend) ptexdir/ptex.defines
$(web2c) ptftopl
ptftopl.p: tangle$(EXEEXT) ptftopl.web ptexdir/ptftopl.ch
$(p_tangle) ptftopl ptftopl
diff --git a/Build/source/texk/web2c/configure b/Build/source/texk/web2c/configure
index eb0831a7d5d..fc23a1d23e8 100755
--- a/Build/source/texk/web2c/configure
+++ b/Build/source/texk/web2c/configure
@@ -21094,7 +21094,10 @@ _LT_EOF
## KPSE_LT_HACK: Prevent libtool from linking dependency_libs
if test "x$enable_libtool_hack" = xyes; then
- sed '/for search_ext in/s/ \.la / /' "$ofile" >"$cfgfile"
+ sed '/# Convert "-framework/i \
+ ## KPSE_LT_HACK: ignore dependency_libs\
+ test "X$installed" = Xyes && dependency_libs=\
+' "$ofile" >"$cfgfile"
mv "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
@@ -24700,7 +24703,10 @@ _LT_EOF
## KPSE_LT_HACK: Prevent libtool from linking dependency_libs
if test "x$enable_libtool_hack" = xyes; then
- sed '/for search_ext in/s/ \.la / /' "$ofile" >"$cfgfile"
+ sed '/# Convert "-framework/i \
+ ## KPSE_LT_HACK: ignore dependency_libs\
+ test "X$installed" = Xyes && dependency_libs=\
+' "$ofile" >"$cfgfile"
mv "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
diff --git a/Build/source/texk/web2c/help.h b/Build/source/texk/web2c/help.h
index a7d243e473c..dcf3d27c6df 100644
--- a/Build/source/texk/web2c/help.h
+++ b/Build/source/texk/web2c/help.h
@@ -310,6 +310,40 @@ const_string PATGENHELP[] = {
};
#endif /* PATGEN */
+#ifdef PBIBTEX
+const_string PBIBTEXHELP[] = {
+"Usage: pbibtex [option] auxfile",
+"",
+" -min-crossrefs=INTEGER minimum number of cross-refs required",
+" for automatic cite_list inclusion (default 2).",
+" -terse do silently.",
+" -version print version information and exit.",
+" -help print this message and exit.",
+" -kanji={jis|euc|sjis|utf8} kanji code for output-file.",
+NULL };
+#endif /* PBIBTEX */
+
+#ifdef PDVITYPE
+const_string PDVITYPEHELP[] = {
+"Usage: pdvitype [option] dvifile",
+"",
+" -dpi=REAL assumed device resolution in pixels per inch",
+" (default 300.0).",
+" -magnification=INTEGER overrride the postamble's magnification.",
+" -max-pages=INTEGER maximum number of pages (default 1000000).",
+" -output-level=1..4 verbosity level.",
+" 1: terse, 2: medium-level, 3: verbose,",
+" 4: plus check for postamble(default).",
+" -page-start=PAGE type, e.g., `1.*.-5' to specify the first page",
+" with \\count0=1, \\count2=4.",
+" (see the TeX book chapter 15).",
+" -show-opcodes show opcodes in decimal.",
+" -kanji={jis|euc|sjis|utf8} kanji code for output-file.",
+" -version print version information and exit.",
+" -help print this message and exit.",
+NULL };
+#endif /* PDVITYPE */
+
#ifdef PKTOGF
const_string PKTOGFHELP[] = {
"Usage: pktogf [OPTION]... PKNAME [GFFILE]",
@@ -359,6 +393,30 @@ const_string POOLTYPEHELP[] = {
};
#endif /* POOLTYPE */
+#ifdef PPLTOTF
+const_string PPLTOTFHELP[] = {
+"Usage: ppltotf [option] plfile [tfmfile]",
+"",
+" -verbose output progress reports.",
+" -version print version information and exit.",
+" -help print this message and exit.",
+" -kanji={jis|euc|sjis|utf8}",
+" plfile kanji code.",
+NULL };
+#endif /* PPLTOTF */
+
+#ifdef PTFTOPL
+const_string PTFTOPLHELP[] = {
+"Usage: ptftopl [option] tfmfile [plfile]",
+"",
+" -verbose output progress reports.",
+" -version print version information and exit.",
+" -help print this message and exit.",
+" -kanji={jis|euc|sjis|utf8}",
+" plfile kanji code.",
+NULL };
+#endif /* PTFTOPL */
+
#if defined (TANGLE) || defined (TANGLEBOOT)
const_string TANGLEHELP[] = {
"Usage: tangle [OPTION]... WEBFILE[.web] [CHANGEFILE[.ch]]",
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index a7575ab8083..7f72c155f50 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * texmfmp.c (maininit) [__SyncTeX__]: omit warning about no
+ SyncTeX for pTeX.
+
2010-04-11 Karl Berry <karl@tug.org>
* texmfmp.c,
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index 796531ce0b1..d621c6db27a 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -621,8 +621,8 @@ maininit (int ac, string *av)
# define SYNCTEX_NO_OPTION INT_MAX
synctexoption = SYNCTEX_NO_OPTION;
#else
-# /* Omit warning for Aleph and non-TeX. */
-# if defined(TeX) && !defined(Aleph) && !defined(luaTeX)
+# /* Omit warning for Aleph, pTeX, and non-TeX. */
+# if defined(TeX) && !defined(Aleph) && !defined(pTeX)
# warning SyncTeX: -synctex command line option NOT available
# endif
#endif
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog
index b3d7f1f9bd7..09af5986fdd 100644
--- a/Build/source/texk/web2c/ptexdir/ChangeLog
+++ b/Build/source/texk/web2c/ptexdir/ChangeLog
@@ -1,3 +1,30 @@
+2010-04-17 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * ppltotf.ch: Rename PTEX_PLTOTF_HELP => PPLTOTF_HELP.
+ * ptftopl.ch: Rename PTEX_TFTOPL_HELP => PTFTOPL_HELP.
+ * ptexhelp.h (removed): Help text now in ../help.h.
+ * kanji.h: Remove #include "ptexhelp.h" and redefinition of
+ TEXMFPOOLNAME and TEXMFENGINENAME.
+
+ * ptexextra.in (PTEXHELP): Moved to ../texmfmp-help.h from here.
+
+ * ptex.defines (inputline3): Moved from pbibtex.defines to here.
+ (PTEXTFTOPLHELP, PTEXPLTOTFHELP, PDVITYPEHELP): Removed.
+ * pbibtex.defines (removed): Using ptex.defines.
+ * ptex-include.ch (removed): Now done in ../texmfmp.h.
+
+ * am/ptex.am: Adjusted.
+
+2010-04-17 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * pdvitype.ch: New version, used on top of dvitype.ch.
+ * ptftopl.ch, ptex-base.ch: Remove trailing whitespace.
+
+ Avoid compiler warnings.
+ * ptftopl.ch (organize): Slightly reformulate (uninitialized).
+ * ppltotf.ch: Handle Pascal Web's char as in ../pltotf.ch.
+ (todig): Change param type to byte. Don't return uninitialized.
+
2010-04-15 Peter Breitenlohner <peb@mppmu.mpg.de>
* pbibtex.ch, ptex-base.ch, ptftopl.ch: Use conststringcast, not
diff --git a/Build/source/texk/web2c/ptexdir/am/ptex.am b/Build/source/texk/web2c/ptexdir/am/ptex.am
index a32b817b7b2..9d0b5180824 100644
--- a/Build/source/texk/web2c/ptexdir/am/ptex.am
+++ b/Build/source/texk/web2c/ptexdir/am/ptex.am
@@ -90,7 +90,6 @@ ptex.ch: tie$(EXEEXT) ptex.web $(ptex_ch_srcs)
ptex_ch_srcs = \
$(ptex_ch_synctex) \
ptexdir/ptex-base.ch \
- ptexdir/ptex-include.ch \
tex-binpool.ch
EXTRA_DIST += $(ptex_web_srcs) $(ptex_ch_srcs) ptexdir/ptexextra.in \
@@ -102,44 +101,44 @@ DISTCLEANFILES += $(nodist_ptex_SOURCES) ptex.web ptex.ch ptex-web2c \
## pBibTeX
##
nodist_pbibtex_SOURCES = pbibtex.c pbibtex.h
-pbibtex_SOURCES = ptexdir/kanji.h ptexdir/ptexhelp.h
+pbibtex_SOURCES = ptexdir/kanji.h
pbibtex_CPPFLAGS = $(ptex_cppflags)
pbibtex_LDADD = $(ptex_ldadd)
pbibtex.c pbibtex.h: pbibtex-web2c
$(web2c) pbibtex
-pbibtex-web2c: pbibtex.p $(web2c_depend) ptexdir/pbibtex.defines web2c/cvtbib.sed
+pbibtex-web2c: pbibtex.p $(web2c_depend) ptexdir/ptex.defines web2c/cvtbib.sed
$(web2c) pbibtex
pbibtex.p: tangle$(EXEEXT) pbibtex.web ptexdir/pbibtex.ch
$(p_tangle) pbibtex pbibtex
pbibtex.web: tie$(EXEEXT) bibtex.web bibtex.ch
$(tie) -m pbibtex.web bibtex.web bibtex.ch
-EXTRA_DIST += ptexdir/pbibtex.ch ptexdir/pbibtex.defines web2c/cvtbib.sed
+EXTRA_DIST += ptexdir/pbibtex.ch web2c/cvtbib.sed
## pDVItype
##
nodist_pdvitype_SOURCES = pdvitype.c pdvitype.h
-pdvitype_SOURCES = ptexdir/kanji.h ptexdir/ptexhelp.h
+pdvitype_SOURCES = ptexdir/kanji.h
pdvitype_CPPFLAGS = $(ptex_cppflags) -DDHEX_CHAR_CODE
pdvitype_LDADD = $(ptex_ldadd)
pdvitype.c pdvitype.h: pdvitype-web2c
$(web2c) pdvitype
-pdvitype-web2c: pdvitype.p $(web2c_depend)
+pdvitype-web2c: pdvitype.p $(web2c_depend) ptexdir/ptex.defines
$(web2c) pdvitype
pdvitype.p: tangle$(EXEEXT) pdvitype.web ptexdir/pdvitype.ch
$(p_tangle) pdvitype pdvitype
-pdvitype.web: $(srcdir)/dvitype.web
- $(LN_S) $(srcdir)/dvitype.web $@
+pdvitype.web: tie$(EXEEXT) dvitype.web dvitype.ch
+ $(tie) -m pdvitype.web dvitype.web dvitype.ch
EXTRA_DIST += ptexdir/pdvitype.ch
## pPLtoTF
##
nodist_ppltotf_SOURCES = ppltotf.c ppltotf.h
-ppltotf_SOURCES = ptexdir/kanji.h ptexdir/ptexhelp.h
+ppltotf_SOURCES = ptexdir/kanji.h
ppltotf_CPPFLAGS = $(ptex_cppflags) -DPRESERVE_PUTC
ppltotf_LDADD = $(ptex_ldadd)
ppltotf.c ppltotf.h: ppltotf-web2c
$(web2c) ppltotf
-ppltotf-web2c: ppltotf.p $(web2c_depend)
+ppltotf-web2c: ppltotf.p $(web2c_depend) ptexdir/ptex.defines
$(web2c) ppltotf
ppltotf.p: tangle$(EXEEXT) ppltotf.web ptexdir/ppltotf.ch
$(p_tangle) ppltotf ppltotf
@@ -150,12 +149,12 @@ EXTRA_DIST += ptexdir/ppltotf.ch
## pTFtoPL
##
nodist_ptftopl_SOURCES = ptftopl.c ptftopl.h
-ptftopl_SOURCES = ptexdir/kanji.h ptexdir/ptexhelp.h
+ptftopl_SOURCES = ptexdir/kanji.h
ptftopl_CPPFLAGS = $(ptex_cppflags)
ptftopl_LDADD = $(ptex_ldadd)
ptftopl.c ptftopl.h: ptftopl-web2c
$(web2c) ptftopl
-ptftopl-web2c: ptftopl.p $(web2c_depend)
+ptftopl-web2c: ptftopl.p $(web2c_depend) ptexdir/ptex.defines
$(web2c) ptftopl
ptftopl.p: tangle$(EXEEXT) ptftopl.web ptexdir/ptftopl.ch
$(p_tangle) ptftopl ptftopl
@@ -203,10 +202,9 @@ EXTRA_DIST += ptexdir/ptrip.diffs
##
EXTRA_DIST += \
ptexdir/Files \
- ptexdir/lib/openclose.c.orig \
- ptexdir/lib/printversion.c.orig \
- ptexdir/lib/usage.c.orig \
+ ptexdir/pbibtex.defines \
ptexdir/ptex.mk \
ptexdir/ptex-base.ch.orig \
+ ptexdir/ptex-include.ch \
+ ptexdir/ptexhelp.h \
ptexdir/reautoconf
-
diff --git a/Build/source/texk/web2c/ptexdir/kanji.h b/Build/source/texk/web2c/ptexdir/kanji.h
index f6e9d2dd5f2..97b4844ebd8 100644
--- a/Build/source/texk/web2c/ptexdir/kanji.h
+++ b/Build/source/texk/web2c/ptexdir/kanji.h
@@ -4,7 +4,6 @@
#ifndef KANJI_H
#define KANJI_H
#include "cpascal.h"
-#include "ptexhelp.h"
#include <ptexenc/ptexenc.h>
#define KANJI
@@ -31,13 +30,6 @@ extern integer kcatcodekey(integer c);
#define putc(c,fp) putc2(c,fp)
#endif /* !PRESERVE_PUTC */
-#ifdef TeX
-#undef TEXMFPOOLNAME
-#undef TEXMFENGINENAME
-#define TEXMFPOOLNAME "ptex.pool"
-#define TEXMFENGINENAME "ptex"
-#endif /* TeX */
-
#ifdef MP
#undef TEXMFPOOLNAME
#undef TEXMFENGINENAME
diff --git a/Build/source/texk/web2c/ptexdir/lib/ChangeLog b/Build/source/texk/web2c/ptexdir/lib/ChangeLog
new file mode 100644
index 00000000000..ea2fb9a3297
--- /dev/null
+++ b/Build/source/texk/web2c/ptexdir/lib/ChangeLog
@@ -0,0 +1,4 @@
+2010-04-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * usage.c: Removed.
+ * Makefile.am: Adjusted.
diff --git a/Build/source/texk/web2c/ptexdir/lib/Makefile.am b/Build/source/texk/web2c/ptexdir/lib/Makefile.am
index c47cc958b8d..817bc4f0700 100644
--- a/Build/source/texk/web2c/ptexdir/lib/Makefile.am
+++ b/Build/source/texk/web2c/ptexdir/lib/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am for the TeX Live subdirectory texk/web2c/ptexdir/lib/
##
-## Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+## Copyright (C) 2010 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
##
INCLUDES = -I$(top_builddir)/.. -I$(top_srcdir) $(KPATHSEA_INCLUDES)
@@ -11,9 +11,7 @@ AM_CFLAGS = $(WARNING_CFLAGS)
noinst_LIBRARIES = lib.a
-## We don't compile `texmfmp.c'; this file is converted into 'texextra.c'
-## for TeX, 'mfextra.c' for Metafont, 'mfextra.c' for MetaPost, ...
+# Replacement for files from ../../lib/
lib_a_SOURCES = \
openclose.c \
- printversion.c \
- usage.c
+ printversion.c
diff --git a/Build/source/texk/web2c/ptexdir/lib/Makefile.in b/Build/source/texk/web2c/ptexdir/lib/Makefile.in
index 7ee74770dbe..a7d41863426 100644
--- a/Build/source/texk/web2c/ptexdir/lib/Makefile.in
+++ b/Build/source/texk/web2c/ptexdir/lib/Makefile.in
@@ -35,7 +35,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = ptexdir/lib
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \
$(top_srcdir)/../../m4/kpse-asm.m4 \
@@ -77,8 +77,7 @@ LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
lib_a_AR = $(AR) $(ARFLAGS)
lib_a_LIBADD =
-am_lib_a_OBJECTS = openclose.$(OBJEXT) printversion.$(OBJEXT) \
- usage.$(OBJEXT)
+am_lib_a_OBJECTS = openclose.$(OBJEXT) printversion.$(OBJEXT)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp
@@ -289,10 +288,11 @@ x_tool_libs = @x_tool_libs@
INCLUDES = -I$(top_builddir)/.. -I$(top_srcdir) $(KPATHSEA_INCLUDES)
AM_CFLAGS = $(WARNING_CFLAGS)
noinst_LIBRARIES = lib.a
+
+# Replacement for files from ../../lib/
lib_a_SOURCES = \
openclose.c \
- printversion.c \
- usage.c
+ printversion.c
all: all-am
@@ -344,7 +344,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openclose.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printversion.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usage.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
diff --git a/Build/source/texk/web2c/ptexdir/lib/openclose.c.orig b/Build/source/texk/web2c/ptexdir/lib/openclose.c.orig
deleted file mode 100644
index 33b2ef985bc..00000000000
--- a/Build/source/texk/web2c/ptexdir/lib/openclose.c.orig
+++ /dev/null
@@ -1,279 +0,0 @@
-/* openclose.c: open and close files for TeX, Metafont, and BibTeX.
-
- Written 1995, 96 Karl Berry. Public domain. */
-
-#include "config.h"
-#include "lib.h"
-#include <kpathsea/c-pathch.h>
-#include <kpathsea/tex-file.h>
-#include <kpathsea/variable.h>
-#include <kpathsea/absolute.h>
-
-/* The globals we use to communicate. */
-extern string nameoffile;
-extern unsigned namelength;
-/* For "file:line:error style error messages. */
-extern string fullnameoffile;
-/* For the filename recorder. */
-extern boolean recorder_enabled;
-/* For the output-dir option. */
-extern string output_directory;
-
-/* Define some variables. */
-string fullnameoffile; /* Defaults to NULL. */
-static string recorder_name; /* Defaults to NULL. */
-static FILE *recorder_file; /* Defaults to NULL. */
-boolean recorder_enabled; /* Defaults to false. */
-string output_directory; /* Defaults to NULL. */
-
-/* For TeX and MetaPost. See below. Always defined so we don't have to
- #ifdef, and thus this file can be compiled once and go in lib.a. */
-int tfmtemp;
-int ocptemp;
-int texinputtype;
-
-/* Helpers for the filename recorder... */
-/* Start the recorder */
-static void
-recorder_start(void)
-{
- /* Alas, while we might want to use mkstemp it is not portable.
- So we have to be content with using a default name... */
- string cwd;
-
- recorder_name = (string)xmalloc(strlen(kpse_program_name)+5);
- strcpy(recorder_name, kpse_program_name);
- strcat(recorder_name, ".fls");
-
- /* If an output directory was specified, use it instead of cwd. */
- if (output_directory) {
- string temp = concat3(output_directory, DIR_SEP_STRING, recorder_name);
- free(recorder_name);
- recorder_name = temp;
- }
-
- recorder_file = xfopen(recorder_name, FOPEN_W_MODE);
-
- cwd = xgetcwd();
- fprintf(recorder_file, "PWD %s\n", cwd);
- free(cwd);
-}
-
-/* Change the name of the recorder file. */
-void
-recorder_change_filename (string new_name)
-{
- if (!recorder_file)
- return;
- rename(recorder_name, new_name);
- free(recorder_name);
- recorder_name = xstrdup(new_name);
-}
-
-/* helper for recorder_record_* */
-static void
-recorder_record_name (const_string prefix, const_string name)
-{
- if (recorder_enabled) {
- if (!recorder_file)
- recorder_start();
- fprintf(recorder_file, "%s %s\n", prefix, name);
- fflush(recorder_file);
- }
-}
-
-/* record an input file name */
-void
-recorder_record_input (const_string name)
-{
- recorder_record_name ("INPUT", name);
-}
-
-/* record an output file name */
-void
-recorder_record_output (const_string name)
-{
- recorder_record_name ("OUTPUT", name);
-}
-
-/* Open an input file F, using the kpathsea format FILEFMT and passing
- FOPEN_MODE to fopen. The filename is in `nameoffile+1'. We return
- whether or not the open succeeded. If it did, `nameoffile' is set to
- the full filename opened, and `namelength' to its length. */
-
-boolean
-open_input (FILE **f_ptr, int filefmt, const_string fopen_mode)
-{
- string fname = NULL;
-#ifdef FUNNY_CORE_DUMP
- /* This only applies if a preloaded TeX/Metafont is being made;
- it allows automatic creation of the core dump (typing ^\ loses
- since that requires manual intervention). */
- if ((filefmt == kpse_tex_format || filefmt == kpse_mf_format
- || filefmt == kpse_mp_format)
- && STREQ (nameoffile + 1, "HackyInputFileNameForCoreDump.tex"))
- funny_core_dump ();
-#endif
-
- /* We havent found anything yet. */
- *f_ptr = NULL;
- if (fullnameoffile)
- free(fullnameoffile);
- fullnameoffile = NULL;
-
- /* Look in -output-directory first, if the filename is not
- absolute. This is because .aux and other such files will get
- written to the output directory, and we have to be able to read
- them from there. We only look for the name as-is. */
- if (output_directory && kpse_absolute_p (nameoffile+1, false)) {
- fname = concat3 (output_directory, DIR_SEP_STRING, nameoffile + 1);
- *f_ptr = fopen (fname, fopen_mode);
- if (*f_ptr) {
- free (nameoffile);
- namelength = strlen (fname);
- nameoffile = (string) xmalloc (namelength + 2);
- strcpy (nameoffile + 1, fname);
- fullnameoffile = fname;
- } else {
- free (fname);
- }
- }
-
- /* No file means do the normal search. */
- if (*f_ptr == NULL) {
- /* A negative FILEFMT means don't use a path. */
- if (filefmt < 0) {
- /* no_file_path, for BibTeX .aux files and MetaPost things. */
- *f_ptr = fopen(nameoffile + 1, fopen_mode);
- /* FIXME... fullnameoffile = xstrdup(nameoffile + 1); */
- } else {
- /* The only exception to `must_exist' being true is \openin, for
- which we set `tex_input_type' to 0 in the change file. */
- /* According to the pdfTeX people, pounding the disk for .vf files
- is overkill as well. A more general solution would be nice. */
- boolean must_exist = (filefmt != kpse_tex_format || texinputtype)
- && (filefmt != kpse_vf_format);
- fname = kpse_find_file (nameoffile + 1,
- (kpse_file_format_type)filefmt,
- must_exist);
- if (fname) {
- fullnameoffile = xstrdup(fname);
- /* If we found the file in the current directory, don't leave
- the `./' at the beginning of `nameoffile', since it looks
- dumb when `tex foo' says `(./foo.tex ... )'. On the other
- hand, if the user said `tex ./foo', and that's what we
- opened, then keep it -- the user specified it, so we
- shouldn't remove it. */
- if (fname[0] == '.' && IS_DIR_SEP (fname[1])
- && (nameoffile[1] != '.' || !IS_DIR_SEP (nameoffile[2])))
- {
- unsigned i = 0;
- while (fname[i + 2] != 0) {
- fname[i] = fname[i + 2];
- i++;
- }
- fname[i] = 0;
- }
-
- /* kpse_find_file always returns a new string. */
- free (nameoffile);
- namelength = strlen (fname);
- nameoffile = (string)xmalloc (namelength + 2);
- strcpy (nameoffile + 1, fname);
- free (fname);
-
- /* This fopen is not allowed to fail. */
- *f_ptr = xfopen (nameoffile + 1, fopen_mode);
- }
- }
- }
-
- if (*f_ptr) {
- recorder_record_input (nameoffile + 1);
-
- /* If we just opened a TFM file, we have to read the first
- byte, to pretend we're Pascal. See tex.ch and mp.ch.
- Ditto for the ocp/ofm Omega file formats. */
- if (filefmt == kpse_tfm_format) {
- tfmtemp = getc (*f_ptr);
- /* We intentionally do not check for EOF here, i.e., an
- empty TFM file. TeX will see the 255 byte and complain
- about a bad TFM file, which is what we want. */
- } else if (filefmt == kpse_ocp_format) {
- ocptemp = getc (*f_ptr);
- } else if (filefmt == kpse_ofm_format) {
- tfmtemp = getc (*f_ptr);
- }
- }
-
- return *f_ptr != NULL;
-}
-
-/* Open an output file F either in the current directory or in
- $TEXMFOUTPUT/F, if the environment variable `TEXMFOUTPUT' exists.
- (Actually, this also applies to the BibTeX and MetaPost output files,
- but `TEXMFMPBIBOUTPUT' was just too long.) The filename is in the
- global `nameoffile' + 1. We return whether or not the open
- succeeded. If it did, `nameoffile' is reset to the name opened if
- necessary, and `namelength' to its length. */
-
-boolean
-open_output (FILE **f_ptr, const_string fopen_mode)
-{
- string fname;
- boolean absolute = kpse_absolute_p(nameoffile+1, false);
-
- /* If we have an explicit output directory, use it. */
- if (output_directory && !absolute) {
- fname = concat3(output_directory, DIR_SEP_STRING, nameoffile + 1);
- } else {
- fname = nameoffile + 1;
- }
-
- /* Is the filename openable as given? */
- *f_ptr = fopen (fname, fopen_mode);
-
- if (!*f_ptr) {
- /* Can't open as given. Try the envvar. */
- string texmfoutput = kpse_var_value("TEXMFOUTPUT");
-
- if (texmfoutput && *texmfoutput && !absolute) {
- if (fname != nameoffile + 1)
- free(fname);
- fname = concat3(texmfoutput, DIR_SEP_STRING, nameoffile+1);
- *f_ptr = fopen(fname, fopen_mode);
- }
- }
- /* If this succeeded, change nameoffile accordingly. */
- if (*f_ptr) {
- if (fname != nameoffile + 1) {
- free (nameoffile);
- namelength = strlen (fname);
- nameoffile = (string)xmalloc (namelength + 2);
- strcpy (nameoffile + 1, fname);
- }
- recorder_record_output (fname);
- }
- if (fname != nameoffile +1)
- free(fname);
- return *f_ptr != NULL;
-}
-
-/* Close F. */
-
-void
-close_file (FILE *f)
-{
- /* If F is null, just return. bad_pool might close a file that has
- never been opened. */
- if (!f)
- return;
-
- if (fclose (f) == EOF) {
- /* It's not always nameoffile, we might have opened something else
- in the meantime. And it's not easy to extract the filenames out
- of the pool array. So just punt on the filename. Sigh. This
- probably doesn't need to be a fatal error. */
- perror ("fclose");
- }
-}
diff --git a/Build/source/texk/web2c/ptexdir/lib/printversion.c.orig b/Build/source/texk/web2c/ptexdir/lib/printversion.c.orig
deleted file mode 100644
index bb9874b5244..00000000000
--- a/Build/source/texk/web2c/ptexdir/lib/printversion.c.orig
+++ /dev/null
@@ -1,61 +0,0 @@
-/* printversion.c: Output for the standard GNU option --version.
-
- Written in 1996 by Karl Berry. Public domain. */
-
-#include "config.h"
-#include "lib.h"
-#include <kpathsea/version.h>
-
-/* We're passed in the original WEB banner string, which has the form
-This is PROGRAM, Version VERSION-NUMBER
- We parse the PROGRAM and VERSION-NUMBER out of this.
-
- If COPYRIGHT_HOLDER is specified and AUTHOR isn't, then use the
- former for the latter. If AUTHOR is specified and COPYRIGHT_HOLDER
- isn't, it means the original program is public domain.
-
- Maybe I should have just done it all inline in each individual
- program, but tangle doesn't allow multiline string constants ... */
-
-void
-printversionandexit (const_string banner,
- const_string copyright_holder,
- const_string author,
- char *extra_info)
-{
- string prog_name;
- unsigned len;
- const_string prog_name_end = strchr (banner, ',');
- const_string prog_version = strrchr (banner, ' ');
- assert (prog_name_end && prog_version);
- prog_version++;
-
- len = prog_name_end - banner - sizeof ("This is");
- prog_name = (string)xmalloc (len + 1);
- strncpy (prog_name, banner + sizeof ("This is"), len);
- prog_name[len] = 0;
-
- /* The Web2c version string starts with a space. */
- printf ("%s %s%s\n", prog_name, prog_version, versionstring);
- puts (kpathsea_version_string);
-
- if (copyright_holder) {
- printf ("Copyright 2009 %s.\n", copyright_holder);
- if (!author)
- author = copyright_holder;
- }
-
- puts ("There is NO warranty. Redistribution of this software is");
- fputs ("covered by the terms of ", stdout);
- printf ("both the %s copyright and\n", prog_name);
- puts ("the Lesser GNU General Public License.");
- puts ("For more information about these matters, see the file");
- printf ("named COPYING and the %s source.\n", prog_name);
- printf ("Primary author of %s: %s.\n", prog_name, author);
-
- if (extra_info) {
- puts (extra_info);
- }
-
- uexit (0);
-}
diff --git a/Build/source/texk/web2c/ptexdir/lib/usage.c b/Build/source/texk/web2c/ptexdir/lib/usage.c
deleted file mode 100644
index 642a0314207..00000000000
--- a/Build/source/texk/web2c/ptexdir/lib/usage.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* usage.c: Output a help message (from help.h).
- Derived from ../../lib/usage.c.
-
- Modified in 2001 by O. Weber.
- Written in 1995 by K. Berry. Public domain. */
-
-#include "config.h"
-
-/* Call usage if the program exits with an "usage error". STR is supposed
- to be the program name. */
-
-void
-usage (const_string str)
-{
- fprintf (stderr, "Try `%s --help' for more information.\n", str);
- uexit (1);
-}
-
-/* Call usage if the program exits by printing the help message.
- MESSAGE is a NULL-terminated array of strings which make up the
- help message. Each string is printed on a separate line.
- We use arrays instead of a single string to work around compiler
- limitations (sigh).
-*/
-void
-usagehelp (const_string *message, const_string bug_email)
-{
- if (!bug_email)
- bug_email = "ptex-staff@ml.asciimw.jp";
- while (*message) {
- printf("%s\n", *message);
- ++message;
- }
- printf("\nEmail bug reports to %s.\n", bug_email);
- uexit(0);
-}
diff --git a/Build/source/texk/web2c/ptexdir/lib/usage.c.orig b/Build/source/texk/web2c/ptexdir/lib/usage.c.orig
deleted file mode 100644
index c09ee874fce..00000000000
--- a/Build/source/texk/web2c/ptexdir/lib/usage.c.orig
+++ /dev/null
@@ -1,35 +0,0 @@
-/* usage.c: Output a help message (from help.h).
-
- Modified in 2001 by O. Weber.
- Written in 1995 by K. Berry. Public domain. */
-
-#include "config.h"
-
-/* Call usage if the program exits with an "usage error". STR is supposed
- to be the program name. */
-
-void
-usage (const_string str)
-{
- fprintf (stderr, "Try `%s --help' for more information.\n", str);
- uexit (1);
-}
-
-/* Call usage if the program exits by printing the help message.
- MESSAGE is a NULL-terminated array of strings which make up the
- help message. Each string is printed on a separate line.
- We use arrays instead of a single string to work around compiler
- limitations (sigh).
-*/
-void
-usagehelp (const_string *message, const_string bug_email)
-{
- if (!bug_email)
- bug_email = "tex-k@tug.org";
- while (*message) {
- printf("%s\n", *message);
- ++message;
- }
- printf("\nEmail bug reports to %s.\n", bug_email);
- uexit(0);
-}
diff --git a/Build/source/texk/web2c/ptexdir/pdvitype.ch b/Build/source/texk/web2c/ptexdir/pdvitype.ch
index cee840f6620..be4e72b5e19 100644
--- a/Build/source/texk/web2c/ptexdir/pdvitype.ch
+++ b/Build/source/texk/web2c/ptexdir/pdvitype.ch
@@ -1,34 +1,7 @@
-% dvitype.ch for C compilation with web2c.
+% This is a change file for PLtoTF
%
-% 04/04/83 (PC) Merged with Pavel's change file and made to work with the
-% version 1.0 of DVItype released with version 0.95 of TeX in
-% February, 1983.
-% 04/18/83 (PC) Added changes to module 47 so that it would work the same
-% when input was a file (or pipe) as with a terminal.
-% 06/29/83 (HWT) Brought up to version 1.1 as released with version 0.99 of
-% TeX, with new change file format
-% 07/28/83 (HWT) Brought up to version 2 as released with version 0.999.
-% Only the banner changes.
-% 11/21/83 (HWT) Brought up to version 2.2 as released with version 1.0.
-% 02/19/84 (HWT) Made it use the TEXFONTS environment variable.
-% 03/23/84 (HWT) Brought up to version 2.3.
-% 07/11/84 (HWT) Brought up to version 2.6 as released with version 1.1.
-% 11/07/84 (ETM) Brought up to version 2.7 as released with version 1.2.
-% 03/09/88 (ETM) Brought up to version 2.9
-% 03/16/88 (ETM) Converted for use with WEB to C.
-% 11/30/89 (KB) To version 3.
-% 01/16/90 (SR) To version 3.2.
% 09/27/95 (KA) Supporting ASCII pTeX
-% (more recent changes in the ChangeLog)
-
-@x [0] WEAVE: print changes only.
-\pageno=\contentspagenumber \advance\pageno by 1
-@y
-\pageno=\contentspagenumber \advance\pageno by 1
-\let\maybe=\iffalse
-\def\title{DVI$\,$\lowercase{type} changes for C}
-@z
-
+%
@x
@d banner=='This is DVItype, Version 3.6' {printed when the program starts}
@y
@@ -36,80 +9,6 @@
{printed when the program starts}
@z
-% [3] Specify the output file to simplify web2c, and don't print the
-% banner until later.
-@x
-@d print(#)==write(#)
-@d print_ln(#)==write_ln(#)
-@y
-@d print(#)==write(stdout, #)
-@d print_ln(#)==write_ln(stdout, #)
-@z
-
-@x
-procedure initialize; {this procedure gets things started properly}
- var i:integer; {loop index for initializations}
- begin print_ln(banner);@/
-@y
-@<Define |parse_arguments|@>
-procedure initialize; {this procedure gets things started properly}
- var i:integer; {loop index for initializations}
- begin
- kpse_set_program_name (argv[0], nil);
- parse_arguments;
- print (banner);
- print_ln (version_string);
-@z
-
-@x [5] Allow more fonts, more widths, no arbitrary filename length.
-@!max_fonts=100; {maximum number of distinct fonts per \.{DVI} file}
-@!max_widths=10000; {maximum number of different characters among all fonts}
-@y
-@!max_fonts=500; {maximum number of distinct fonts per \.{DVI} file}
-@!max_widths=25000; {maximum number of different characters among all fonts}
-@z
-@x
-@!name_size=1000; {total length of all font file names}
-@!name_length=50; {a file name shouldn't be longer than this}
-@y
-@!name_size=10000; {total length of all font file names}
-@z
-
-@x [7] Remove non-local goto.
-@d abort(#)==begin print(' ',#); jump_out;
- end
-@d bad_dvi(#)==abort('Bad DVI file: ',#,'!')
-@.Bad DVI file@>
-
-@p procedure jump_out;
-begin goto final_end;
-end;
-@y
-@d jump_out==uexit(1)
-@d abort(#)==begin write_ln(stderr,#); jump_out; end
-@d bad_dvi(#)==abort('Bad DVI file: ',#,'!')
-@.Bad DVI file@>
-@z
-
-@x [8] Permissive input.
-@!ASCII_code=" ".."~"; {a subrange of the integers}
-@y
-@!ASCII_code=0..255; {a subrange of the integers}
-@z
-
-% [9] The text_char type is used as an array index into `xord'. The
-% default type `char' produces signed integers, which are bad array
-% indices in C.
-@x
-@d text_char == char {the data type of characters in text files}
-@d first_text_char=0 {ordinal number of the smallest element of |text_char|}
-@d last_text_char=127 {ordinal number of the largest element of |text_char|}
-@y
-@d text_char == ASCII_code {the data type of characters in text files}
-@d first_text_char=0 {ordinal number of the smallest element of |text_char|}
-@d last_text_char=255 {ordinal number of the largest element of |text_char|}
-@z
-
@x
for i:=@'177 to 255 do xchr[i]:='?';
@y
@@ -133,90 +32,6 @@ for i:=@'177 to 255 do xchr[i]:=i;
@d ptex_id_byte=3 {identifies the kind of pTeX \.{DVI} files described here}
@z
-@x [23] Fix up opening the files.
-@p procedure open_dvi_file; {prepares to read packed bytes in |dvi_file|}
-begin reset(dvi_file);
-cur_loc:=0;
-end;
-@#
-procedure open_tfm_file; {prepares to read packed bytes in |tfm_file|}
-begin reset(tfm_file,cur_name);
-end;
-@y
-@p procedure open_dvi_file; {prepares to read packed bytes in |dvi_file|}
-begin
- cur_name := extend_filename (cmdline (optind), 'dvi');
- resetbin (dvi_file, cur_name);
- cur_loc := 0;
-end;
-@#
-procedure open_tfm_file; {prepares to read packed bytes in |tfm_file|}
-var full_name: ^char;
-begin
- full_name := kpse_find_tfm (cur_name);
- if full_name then begin
- tfm_file := fopen (full_name, FOPEN_RBIN_MODE);
- end else begin
- tfm_file := nil;
- end;
-end;
-@z
-
-@x [24] No arbitrary limit on filename length.
-@!cur_name:packed array[1..name_length] of char; {external name,
- with no lower case letters}
-@y
-@!cur_name:^char; {external name}
-@z
-
-@x [27] Make get_n_bytes routines work with 16-bit math.
-get_two_bytes:=a*256+b;
-@y
-get_two_bytes:=a*intcast(256)+b;
-@z
-@x
-get_three_bytes:=(a*256+b)*256+c;
-@y
-get_three_bytes:=(a*intcast(256)+b)*256+c;
-@z
-@x
-if a<128 then signed_trio:=(a*256+b)*256+c
-else signed_trio:=((a-256)*256+b)*256+c;
-@y
-if a<128 then signed_trio:=(a*intcast(256)+b)*256+c
-else signed_trio:=((a-intcast(256))*256+b)*256+c;
-@z
-@x
-if a<128 then signed_quad:=((a*256+b)*256+c)*256+d
-else signed_quad:=(((a-256)*256+b)*256+c)*256+d;
-@y
-if a<128 then signed_quad:=((a*intcast(256)+b)*256+c)*256+d
-else signed_quad:=(((a-256)*intcast(256)+b)*256+c)*256+d;
-@z
-
-@x [28] dvi_length and move_to_byte.
-@p function dvi_length:integer;
-begin set_pos(dvi_file,-1); dvi_length:=cur_pos(dvi_file);
-end;
-@#
-procedure move_to_byte(n:integer);
-begin set_pos(dvi_file,n); cur_loc:=n;
-end;
-@y
-@p function dvi_length:integer;
-begin
- xfseek (dvi_file, 0, 2, 'dvitype');
- cur_loc := xftell(dvi_file, 'dvitype');
- dvi_length := cur_loc;
-end;
-@#
-procedure move_to_byte(n:integer);
-begin
- xfseek (dvi_file, n, 0, 'dvitype');
- cur_loc:=n;
-end;
-@z
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% JFM and pTeX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -277,9 +92,8 @@ end;
@!jfm_h:integer;
@z
-@x [35] Make 16-bit TFM calculations work. and JFM by K.A.
-read_tfm_word; lh:=b2*256+b3;
-read_tfm_word; font_bc[nf]:=b0*256+b1; font_ec[nf]:=b2*256+b3;
+@x [35] JFM by K.A.
+read_tfm_word; lh:=b2*intcast(256)+b3;
@y
read_tfm_word; lh:=b0*intcast(256)+b1;
if (lh = 11) or (lh = 9) then
@@ -297,16 +111,9 @@ else
fnt_jfm_p[nf] := false;
end;
lh:=b2*intcast(256)+b3;
-read_tfm_word; font_bc[nf]:=b0*intcast(256)+b1; font_ec[nf]:=b2*intcast(256)+b3;
@z
-@x
- if b0<128 then tfm_check_sum:=((b0*256+b1)*256+b2)*256+b3
- else tfm_check_sum:=(((b0-256)*256+b1)*256+b2)*256+b3
-@y
- if b0<128 then tfm_check_sum:=((b0*intcast(256)+b1)*256+b2)*256+b3
- else tfm_check_sum:=(((b0-256)*intcast(256)+b1)*256+b2)*256+b3
-@z
-@x JFM
+
+@x [35] JFM by K.A.
tfm_design_size:=round(tfm_conv*(((b0*256+b1)*256+b2)*256+b3))
else goto 9997;
end;
@@ -329,267 +136,6 @@ for k:=1 to nt do
end;
@z
-@x [43] Initialize optional variables sooner.
-@ @<Set init...@>=
-out_mode:=the_works; max_pages:=1000000; start_vals:=0; start_there[0]:=false;
-@y
-@ Initializations are done sooner now.
-@z
-
-@x [45] No dialog.
-@ The |input_ln| routine waits for the user to type a line at his or her
-terminal; then it puts ASCII-code equivalents for the characters on that line
-into the |buffer| array. The |term_in| file is used for terminal input,
-and |term_out| for terminal output.
-@^system dependencies@>
-
-@<Glob...@>=
-@!buffer:array[0..terminal_line_length] of ASCII_code;
-@!term_in:text_file; {the terminal, considered as an input file}
-@!term_out:text_file; {the terminal, considered as an output file}
-@y
-@ No dialog.
-@z
-
-@x [47] No input_ln.
-@p procedure input_ln; {inputs a line from the terminal}
-var k:0..terminal_line_length;
-begin update_terminal; reset(term_in);
-if eoln(term_in) then read_ln(term_in);
-k:=0;
-while (k<terminal_line_length)and not eoln(term_in) do
- begin buffer[k]:=xord[term_in^]; incr(k); get(term_in);
- end;
-buffer[k]:=" ";
-end;
-@y
-@z
-
-@x [48] No dialog.
-@ The global variable |buf_ptr| is used while scanning each line of input;
-it points to the first unread character in |buffer|.
-
-@<Glob...@>=
-@!buf_ptr:0..terminal_line_length; {the number of characters read}
-@y
-@ No dialog.
-@z
-
-@x [49] No dialog.
-@ Here is a routine that scans a (possibly signed) integer and computes
-the decimal value. If no decimal integer starts at |buf_ptr|, the
-value 0 is returned. The integer should be less than $2^{31}$ in
-absolute value.
-
-@p function get_integer:integer;
-var x:integer; {accumulates the value}
-@!negative:boolean; {should the value be negated?}
-begin if buffer[buf_ptr]="-" then
- begin negative:=true; incr(buf_ptr);
- end
-else negative:=false;
-x:=0;
-while (buffer[buf_ptr]>="0")and(buffer[buf_ptr]<="9") do
- begin x:=10*x+buffer[buf_ptr]-"0"; incr(buf_ptr);
- end;
-if negative then get_integer:=-x @+ else get_integer:=x;
-end;
-
-@y
-@ No dialog.
-@z
-
-@x [50-55] No dialog.
-@ The selected options are put into global variables by the |dialog|
-procedure, which is called just as \.{DVItype} begins.
-@^system dependencies@>
-
-@p procedure dialog;
-label 1,2,3,4,5;
-var k:integer; {loop variable}
-begin rewrite(term_out); {prepare the terminal for output}
-write_ln(term_out,banner);
-@<Determine the desired |out_mode|@>;
-@<Determine the desired |start_count| values@>;
-@<Determine the desired |max_pages|@>;
-@<Determine the desired |resolution|@>;
-@<Determine the desired |new_mag|@>;
-@<Print all the selected options@>;
-end;
-
-@ @<Determine the desired |out_mode|@>=
-1: write(term_out,'Output level (default=4, ? for help): ');
-out_mode:=the_works; input_ln;
-if buffer[0]<>" " then
- if (buffer[0]>="0")and(buffer[0]<="4") then out_mode:=buffer[0]-"0"
- else begin write(term_out,'Type 4 for complete listing,');
- write(term_out,' 0 for errors and fonts only,');
- write_ln(term_out,' 1 or 2 or 3 for something in between.');
- goto 1;
- end
-
-@ @<Determine the desired |start...@>=
-2: write(term_out,'Starting page (default=*): ');
-start_vals:=0; start_there[0]:=false;
-input_ln; buf_ptr:=0; k:=0;
-if buffer[0]<>" " then
- repeat if buffer[buf_ptr]="*" then
- begin start_there[k]:=false; incr(buf_ptr);
- end
- else begin start_there[k]:=true; start_count[k]:=get_integer;
- end;
- if (k<9)and(buffer[buf_ptr]=".") then
- begin incr(k); incr(buf_ptr);
- end
- else if buffer[buf_ptr]=" " then start_vals:=k
- else begin write(term_out,'Type, e.g., 1.*.-5 to specify the ');
- write_ln(term_out,'first page with \count0=1, \count2=-5.');
- goto 2;
- end;
- until start_vals=k
-
-@ @<Determine the desired |max_pages|@>=
-3: write(term_out,'Maximum number of pages (default=1000000): ');
-max_pages:=1000000; input_ln; buf_ptr:=0;
-if buffer[0]<>" " then
- begin max_pages:=get_integer;
- if max_pages<=0 then
- begin write_ln(term_out,'Please type a positive number.');
- goto 3;
- end;
- end
-
-@ @<Determine the desired |resolution|@>=
-4: write(term_out,'Assumed device resolution');
-write(term_out,' in pixels per inch (default=300/1): ');
-resolution:=300.0; input_ln; buf_ptr:=0;
-if buffer[0]<>" " then
- begin k:=get_integer;
- if (k>0)and(buffer[buf_ptr]="/")and
- (buffer[buf_ptr+1]>"0")and(buffer[buf_ptr+1]<="9") then
- begin incr(buf_ptr); resolution:=k/get_integer;
- end
- else begin write(term_out,'Type a ratio of positive integers;');
- write_ln(term_out,' (1 pixel per mm would be 254/10).');
- goto 4;
- end;
- end
-
-@ @<Determine the desired |new_mag|@>=
-5: write(term_out,'New magnification (default=0 to keep the old one): ');
-new_mag:=0; input_ln; buf_ptr:=0;
-if buffer[0]<>" " then
- if (buffer[0]>="0")and(buffer[0]<="9") then new_mag:=get_integer
- else begin write(term_out,'Type a positive integer to override ');
- write_ln(term_out,'the magnification in the DVI file.');
- goto 5;
- end
-@y
-@ No dialog (50).
-@ No dialog (51).
-@ No dialog (52).
-@ No dialog (53).
-@ No dialog (54).
-@ No dialog (55).
-@z
-
-@x [56] Fix printing of floating point number.
-print_ln(' Resolution = ',resolution:12:8,' pixels per inch');
-if new_mag>0 then print_ln(' New magnification factor = ',new_mag/1000:8:3)
-@y
-print (' Resolution = ');
-print_real (resolution, 12, 8);
-print_ln (' pixels per inch');
-if new_mag > 0
-then begin
- print (' New magnification factor = ');
- print_real (new_mag / 1000.0, 8, 3);
- print_ln('')
-end
-@z
-
-@x [59] We use r for something else.
-@!r:0..name_length; {index into |cur_name|}
-@y
-@!r:0..name_size; {current filename length}
-@z
-
-@x [62] <Load the new font...> close the file when we're done
-if out_mode=errors_only then print_ln(' ');
-@y
-if out_mode=errors_only then print_ln(' ');
-if tfm_file then
- xfclose (tfm_file, cur_name); {should be the |kpse_find_tfm| result}
-free (cur_name); {We |xmalloc|'d this before we got called.}
-@z
-
-@x [64] Don't set default_directory_name.
-@d default_directory_name=='TeXfonts:' {change this to the correct name}
-@d default_directory_name_length=9 {change this to the correct length}
-
-@<Glob...@>=
-@!default_directory:packed array[1..default_directory_name_length] of char;
-@y
-Under Unix, users have a path searched for fonts, there's no single
-default directory.
-@z
-
-@x [65] Remove initialization of default_directory.
-@ @<Set init...@>=
-default_directory:=default_directory_name;
-@y
-@ (No initialization needs to be done. Keep this module to preserve
-numbering.)
-@z
-
-@x [66] Don't append `.tfm' here, and keep lowercase.
-@ The string |cur_name| is supposed to be set to the external name of the
-\.{TFM} file for the current font. This usually means that we need to
-prepend the name of the default directory, and
-to append the suffix `\.{.TFM}'. Furthermore, we change lower case letters
-to upper case, since |cur_name| is a \PASCAL\ string.
-@^system dependencies@>
-
-@<Move font name into the |cur_name| string@>=
-for k:=1 to name_length do cur_name[k]:=' ';
-if p=0 then
- begin for k:=1 to default_directory_name_length do
- cur_name[k]:=default_directory[k];
- r:=default_directory_name_length;
- end
-else r:=0;
-for k:=font_name[nf] to font_name[nf+1]-1 do
- begin incr(r);
- if r+4>name_length then
- abort('DVItype capacity exceeded (max font name length=',
- name_length:1,')!');
-@.DVItype capacity exceeded...@>
- if (names[k]>="a")and(names[k]<="z") then
- cur_name[r]:=xchr[names[k]-@'40]
- else cur_name[r]:=xchr[names[k]];
- end;
-cur_name[r+1]:='.'; cur_name[r+2]:='T'; cur_name[r+3]:='F'; cur_name[r+4]:='M'
-@y
-@ The string |cur_name| is supposed to be set to the external name of the
-\.{TFM} file for the current font. We do not impose a maximum limit
-here. It's too bad there is a limit on the total length of all
-filenames, but it doesn't seem worth reprogramming all that.
-@^system dependencies@>
-
-@d name_start == font_name[nf]
-@d name_end == font_name[nf+1]
-
-@<Move font name into the |cur_name| string@>=
-r := name_end - name_start;
-cur_name := xmalloc_array (char, r);
-{|strncpy| might be faster, but it's probably a good idea to keep the
- |xchr| translation.}
-for k := name_start to name_end do begin
- cur_name[k - name_start] := xchr[names[k]];
-end;
-cur_name[r] := 0; {Append null byte for C.}
-@z
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% JFM
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -672,23 +218,6 @@ s:=0; h:=0; v:=0; w:=0; x:=0; y:=0; z:=0; hh:=0; vv:=0;
@y
s:=0; h:=0; v:=0; w:=0; x:=0; y:=0; z:=0; hh:=0; vv:=0; dd:=0;
@z
-%%%%%%%%%%%%%%%%%%%%%%%%% End of pTeX%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-@x [80] (major,minor) optionally show opcode
-@d show(#)==begin flush_text; showing:=true; print(a:1,': ',#);
- end
-@d major(#)==if out_mode>errors_only then show(#)
-@d minor(#)==if out_mode>terse then
- begin showing:=true; print(a:1,': ',#);
-@y
-@d show(#)==begin flush_text; showing:=true; print(a:1,': ',#);
- if show_opcodes and (o >= 128) then print (' {', o:1, '}');
- end
-@d major(#)==if out_mode>errors_only then show(#)
-@d minor(#)==if out_mode>terse then
- begin showing:=true; print(a:1,': ',#);
- if show_opcodes and (o >= 128) then print (' {', o:1, '}');
-@z
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% pTeX
@@ -945,215 +474,46 @@ if (m<>id_byte) and (m<>ptex_id_byte) then
' should be ',id_byte:1,' or ',ptex_id_byte:1,'!');
@z
-@x [106] (main) No dialog; remove unused label.
-dialog; {set up all the options}
+@x
+const n_options = 8; {Pascal won't count array lengths for us.}
@y
-@<Print all the selected options@>;
+const n_options = 9; {Pascal won't count array lengths for us.}
@z
@x
-final_end:end.
+ usage ('dvitype');
@y
-end.
+ usage ('pdvitype');
@z
-@x [109] Fix another floating point print.
-print_ln('magnification=',mag:1,'; ',conv:16:8,' pixels per DVI unit')
+@x
+ usage_help (DVITYPE_HELP, nil);
@y
-print ('magnification=', mag:1, '; ');
-print_real (conv, 16, 8);
-print_ln (' pixels per DVI unit')
+ usage_help (PDVITYPE_HELP, nil);
@z
-@x [111] System-dependent changes.
-This section should be replaced, if necessary, by changes to the program
-that are necessary to make \.{DVItype} work at a particular installation.
-It is usually best to design your change file so that all changes to
-previous sections preserve the section numbering; then everybody's version
-will be consistent with the printed program. More extensive changes,
-which introduce new sections, can be inserted here; then only the index
-itself will get a new section number.
-@^system dependencies@>
+@x
+ end; {Else it was a flag; |getopt| has already done the assignment.}
@y
-Parse a Unix-style command line.
-
-@d argument_is (#) == (strcmp (long_options[option_index].name, #) = 0)
-
-@<Define |parse_arguments|@> =
-procedure parse_arguments;
-const n_options = 9; {Pascal won't count array lengths for us.}
-var @!long_options: array[0..n_options] of getopt_struct;
- @!getopt_return_val: integer;
- @!option_index: c_int_type;
- @!current_option: 0..n_options;
- @!end_num:^char; {for \.{page-start}}
-begin
- @<Define the option table@>;
- repeat
- getopt_return_val := getopt_long_only (argc, argv, '', long_options,
- address_of (option_index));
- if getopt_return_val = -1 then begin
- {End of arguments; we exit the loop below.} ;
-
- end else if getopt_return_val = "?" then begin
- usage ('pdvitype');
-
- end else if argument_is ('help') then begin
- usage_help (PDVITYPE_HELP, nil);
-
- end else if argument_is ('version') then begin
- print_version_and_exit (banner, nil, 'D.E. Knuth', nil);
-
- end else if argument_is ('output-level') then begin
- out_mode := atou (optarg);
- if (out_mode = 0) or (out_mode > 4) then begin
- write_ln (stderr, 'Value for --output-level must be >= 1 and <= 4.');
- uexit (1);
- end;
-
- end else if argument_is ('page-start') then begin
- @<Determine the desired |start_count| values from |optarg|@>;
-
- end else if argument_is ('max-pages') then begin
- max_pages := atou (optarg);
-
- end else if argument_is ('dpi') then begin
- resolution := atof (optarg);
-
- end else if argument_is ('magnification') then begin
- new_mag := atou (optarg);
-
end else if argument_is ('kanji') then begin
if (not set_enc_string(optarg,optarg)) then begin
write_ln('Bad kanjicode encoding "', stringcast(optarg), '".');
end;
-
+
end; {Else it was a flag; |getopt| has already done the assignment.}
- until getopt_return_val = -1;
+@z
- {Now |optind| is the index of first non-option on the command line.}
- if (optind + 1 <> argc) then begin
+@x
+ write_ln (stderr, 'dvitype: Need exactly one file argument.');
+ usage ('dvitype');
+@y
write_ln (stderr, 'pdvitype: Need exactly one file argument.');
usage ('pdvitype');
- end;
-end;
-
-@ Here are the options we allow. The first is one of the standard GNU options.
-@.-help@>
-
-@<Define the option...@> =
-current_option := 0;
-long_options[current_option].name := 'help';
-long_options[current_option].has_arg := 0;
-long_options[current_option].flag := 0;
-long_options[current_option].val := 0;
-incr (current_option);
-
-@ Another of the standard options.
-@.-version@>
-
-@<Define the option...@> =
-long_options[current_option].name := 'version';
-long_options[current_option].has_arg := 0;
-long_options[current_option].flag := 0;
-long_options[current_option].val := 0;
-incr (current_option);
-
-@ How verbose to be.
-@.-output-level@>
-
-@<Define the option...@> =
-long_options[current_option].name := 'output-level';
-long_options[current_option].has_arg := 1;
-long_options[current_option].flag := 0;
-long_options[current_option].val := 0;
-incr (current_option);
-out_mode := the_works; {default}
-
-@ What page to start at.
-@.-page-start@>
-
-@<Define the option...@> =
-long_options[current_option].name := 'page-start';
-long_options[current_option].has_arg := 1;
-long_options[current_option].flag := 0;
-long_options[current_option].val := 0;
-incr (current_option);
-
-@ Parsing the starting page specification is a bit complicated.
-
-@<Determine the desired |start_count|...@> =
-k := 0; {which \.{\\count} register we're on}
-m := 0; {position in |optarg|}
-while optarg[m] do begin
- if optarg[m] = "*" then begin
- start_there[k] := false;
- incr (m);
-
- end else if optarg[m] = "." then begin
- incr (k);
- if k >= 10 then begin
- write_ln (stderr, 'dvitype: More than ten count registers specified.');
- uexit (1);
- end;
- incr (m);
-
- end else begin
- start_count[k] := strtol (optarg + m, address_of (end_num), 10);
- if end_num = optarg + m then begin
- write_ln (stderr, 'dvitype: -page-start values must be numeric or *.');
- uexit (1);
- end;
- start_there[k] := true;
- m := m + end_num - (optarg + m);
- end;
-end;
-start_vals := k;
-
-@ How many pages to do.
-@.-max-pages@>
-
-@<Define the option...@> =
-long_options[current_option].name := 'max-pages';
-long_options[current_option].has_arg := 1;
-long_options[current_option].flag := 0;
-long_options[current_option].val := 0;
-incr (current_option);
-max_pages := 1000000; {default}
-
-@ Resolution, in pixels per inch.
-@.-dpi@>
-
-@<Define the option...@> =
-long_options[current_option].name := 'dpi';
-long_options[current_option].has_arg := 1;
-long_options[current_option].flag := 0;
-long_options[current_option].val := 0;
-incr (current_option);
-resolution := 300.0; {default}
-
-@ Magnification to apply.
-@.-magnification@>
-
-@<Define the option...@> =
-long_options[current_option].name := 'magnification';
-long_options[current_option].has_arg := 1;
-long_options[current_option].flag := 0;
-long_options[current_option].val := 0;
-incr (current_option);
-new_mag := 0; {default is to keep the old one}
-
-@ Whether to show numeric opcodes.
-@.-show-opcodes@>
-
-@<Define the option...@> =
-long_options[current_option].name := 'show-opcodes';
-long_options[current_option].has_arg := 0;
-long_options[current_option].flag := address_of (show_opcodes);
-long_options[current_option].val := 1;
-incr (current_option);
-new_mag := 0; {default is to keep the old one}
+@z
+@x
+@ An element with all zeros always ends the list.
+@y
@ Decide kanji encode
@.-kanji@>
@@ -1164,14 +524,5 @@ long_options[current_option].flag := 0;
long_options[current_option].val := 0;
incr (current_option);
-@ @<Glob...@> =
-@!show_opcodes: c_int_type;
-
@ An element with all zeros always ends the list.
-
-@<Define the option...@> =
-long_options[current_option].name := 0;
-long_options[current_option].has_arg := 0;
-long_options[current_option].flag := 0;
-long_options[current_option].val := 0;
@z
diff --git a/Build/source/texk/web2c/ptexdir/ppltotf.ch b/Build/source/texk/web2c/ptexdir/ppltotf.ch
index a31e97eef2f..16cae851e2d 100644
--- a/Build/source/texk/web2c/ptexdir/ppltotf.ch
+++ b/Build/source/texk/web2c/ptexdir/ppltotf.ch
@@ -26,19 +26,11 @@
print_ln ('.');
@z
-@x
-@d char == 0..255
-@d first_ord=0 {ordinal number of the smallest element of |char|}
-@y
-@d uchar == 0..255
-@d first_ord=0 {ordinal number of the smallest element of |char|}
-@z
-
@x [18] l.495 - pTeX:
@!xord:array[char] of ASCII_code; {conversion table}
@y
-@!xord:array[uchar] of ASCII_code; {conversion table}
-@!xchr:array[uchar] of byte; {specifiles conversion of output character}
+@!xord:array[char] of ASCII_code; {conversion table}
+@!xchr:array[char] of byte; {specifiles conversion of output character}
@z
@x [19] l.506 - pTeX:
@@ -376,7 +368,7 @@ begin
@x
usage_help (PLTOTF_HELP, nil);
@y
- usage_help (PTEX_PLTOTF_HELP, nil);
+ usage_help (PPLTOTF_HELP, nil);
@z
@x
end else if argument_is ('version') then begin
@@ -659,10 +651,12 @@ if multistrlen(buffer,loc+2,loc)=2 then cur_char:=" "
else cur_char:=xord[buffer[loc]];
end;
@#
-function todig(@!ch:char):byte; {convert character to number}
+function todig(@!ch:byte):byte; {convert character to number}
begin if (ch>="A")and(ch<="F") then todig:=ch-"A"+10
else if (ch>="0")and(ch<="9") then todig:=ch-"0"
-else skip_error('This expression is out of JIS-code encoding.');
+else begin skip_error('This expression is out of JIS-code encoding.');
+ todig:=0;
+ end;
end;
@#
procedure print_jis_hex(jis_code:integer); {prints jiscode as four digits}
diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch
index c050f213643..52efed2d115 100644
--- a/Build/source/texk/web2c/ptexdir/ptex-base.ch
+++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch
@@ -255,7 +255,7 @@ pseudo: if tally<trick_count then
end;
@z
-@x l.1603 - pTeX
+@x l.1603 - pTeX
procedure print(@!s:integer); {prints string |s|}
label exit;
var j:pool_pointer; {current character code position}
diff --git a/Build/source/texk/web2c/ptexdir/ptex.defines b/Build/source/texk/web2c/ptexdir/ptex.defines
index d358694cd51..1f6e839ff35 100644
--- a/Build/source/texk/web2c/ptexdir/ptex.defines
+++ b/Build/source/texk/web2c/ptexdir/ptex.defines
@@ -2,6 +2,7 @@
@define function Hi ();
@define function Lo ();
+@define function inputline3 ();
@define function getencstring;
@define function setencstring ();
@@ -27,7 +28,3 @@
@define function ismultiprn ();
@define function calcpos ();
@define function kcatcodekey ();
-
-@define const PTEXTFTOPLHELP;
-@define const PTEXPLTOTFHELP;
-@define const PDVITYPEHELP;
diff --git a/Build/source/texk/web2c/ptexdir/ptexextra.in b/Build/source/texk/web2c/ptexdir/ptexextra.in
index b993d8eb0fb..9e1f5a36d0d 100644
--- a/Build/source/texk/web2c/ptexdir/ptexextra.in
+++ b/Build/source/texk/web2c/ptexdir/ptexextra.in
@@ -3,45 +3,6 @@
This is included by pTeX, from ptexextra.c
*/
-const_string based_prog_name = "TeX";
-const_string PTEXHELP[] = {
- "Usage: ptex [option] texfile",
- " : ptex [option] &format texfile",
- "",
- "-fmt=NAME use NAME instead of program name or %&format.",
- "-halt-on-error stop processing at the first error",
- "[-no]-file-line-error disable/enable file:line:error style messages",
- "-ini be iniptex.",
- "-interaction=STRING set interaction mode (STRING=batchmode|nonstopmode|",
- " scrollmode|errorstopmode)",
-#ifdef IPC
- "-ipc send DVI output to a socket as well as the usual",
- " output file",
- "-ipc-start as -ipc, and also start the server at the other end",
-#endif /* IPC */
- "-jobname=STRING set the job name to STRING",
- "-kanji=STRING set Japanese encoding (STRING=euc|jis|sjis|utf8)",
- "-kpathsea-debug=NUMBER set path searching debugging flags according to",
- " the bits of NUMBER",
- "[-no]-mktex=FMT disable/enable mktexFMT generation (FMT=tex/tfm)",
- "-mltex enable MLTeX extensions such as \\charsubdef",
- "-output-comment=STRING use STRING for DVI file comment instead of date",
- "-output-directory=DIR use DIR as the directory to write files to",
- "[-no]-parse-first-line disable/enable parsing of the first line of the",
- " input file",
- "-progname=STRING set program (and fmt) name to STRING",
- "-recorder enable filename recorder",
- "[-no]-shell-escape disable/enable \\write18{SHELL COMMAND}",
- "-src-specials insert source specials into the DVI file",
- "-src-specials=WHERE insert source specials in certain places of",
- " the DVI file. WHERE is a comma-separated value",
- " list: cr display hbox math par parend vbox",
- "-translate-file=TCXNAME use the TCX file TCXNAME",
- "-help print this message and exit.",
- "-version print version information and exit.",
- NULL
-};
-
#define BANNER "This is pTeX, Version 3.1415926-PTEX-VERSION"
#define COPYRIGHT_HOLDER "D.E. Knuth"
#define AUTHOR NULL
diff --git a/Build/source/texk/web2c/ptexdir/ptftopl.ch b/Build/source/texk/web2c/ptexdir/ptftopl.ch
index 8994f6f4230..3d02e561247 100644
--- a/Build/source/texk/web2c/ptexdir/ptftopl.ch
+++ b/Build/source/texk/web2c/ptexdir/ptftopl.ch
@@ -73,9 +73,11 @@ else if lf=tate_id_byte then
write_ln(pl_file,'(COMMENT THIS IS A KANJI FORMAT FILE)');
write_ln(pl_file,'(DIRECTION TATE)');
end
-else begin file_format:=tfm_format; nt:=0; tmp_ptr:=2;
- end;
-if file_format<>tfm_format then
+else file_format:=tfm_format;
+if file_format=tfm_format then
+ begin nt:=0; tmp_ptr:=2;
+ end
+else
begin if eof(tfm_file) then abort('The input file is only two bytes long!');
read(tfm_file,tfm[2]);
if eof(tfm_file) then abort('The input file is only three bytes long!');
@@ -281,7 +283,7 @@ else if width_index(c)>0 then
if file_format<>tfm_format then
begin out('TYPE'); tfm[0]:=c; out_octal(0,1);
end
- else
+ else
begin out('CHARACTER'); out_char(c);
end;
out_ln;
@@ -363,7 +365,7 @@ begin
@x
usage_help (TFTOPL_HELP, nil);
@y
- usage_help (PTEX_TFTOPL_HELP, nil);
+ usage_help (PTFTOPL_HELP, nil);
@z
@x
end else if argument_is ('version') then begin
diff --git a/Build/source/texk/web2c/texmfmp-help.h b/Build/source/texk/web2c/texmfmp-help.h
index 6097ad4be17..49efa151fff 100644
--- a/Build/source/texk/web2c/texmfmp-help.h
+++ b/Build/source/texk/web2c/texmfmp-help.h
@@ -244,6 +244,46 @@ const_string MFHELP[] = {
};
#endif /* MF */
+#ifdef pTeX
+const_string PTEXHELP[] = {
+ "Usage: ptex [option] texfile",
+ " : ptex [option] &format texfile",
+ "",
+ "-fmt=NAME use NAME instead of program name or %&format.",
+ "-halt-on-error stop processing at the first error",
+ "[-no]-file-line-error disable/enable file:line:error style messages",
+ "-ini be iniptex.",
+ "-interaction=STRING set interaction mode (STRING=batchmode|nonstopmode|",
+ " scrollmode|errorstopmode)",
+#ifdef IPC
+ "-ipc send DVI output to a socket as well as the usual",
+ " output file",
+ "-ipc-start as -ipc, and also start the server at the other end",
+#endif /* IPC */
+ "-jobname=STRING set the job name to STRING",
+ "-kanji=STRING set Japanese encoding (STRING=euc|jis|sjis|utf8)",
+ "-kpathsea-debug=NUMBER set path searching debugging flags according to",
+ " the bits of NUMBER",
+ "[-no]-mktex=FMT disable/enable mktexFMT generation (FMT=tex/tfm)",
+ "-mltex enable MLTeX extensions such as \\charsubdef",
+ "-output-comment=STRING use STRING for DVI file comment instead of date",
+ "-output-directory=DIR use DIR as the directory to write files to",
+ "[-no]-parse-first-line disable/enable parsing of the first line of the",
+ " input file",
+ "-progname=STRING set program (and fmt) name to STRING",
+ "-recorder enable filename recorder",
+ "[-no]-shell-escape disable/enable \\write18{SHELL COMMAND}",
+ "-src-specials insert source specials into the DVI file",
+ "-src-specials=WHERE insert source specials in certain places of",
+ " the DVI file. WHERE is a comma-separated value",
+ " list: cr display hbox math par parend vbox",
+ "-translate-file=TCXNAME use the TCX file TCXNAME",
+ "-help print this message and exit.",
+ "-version print version information and exit.",
+ NULL
+};
+#endif /* pTeX */
+
#ifdef pdfTeX
const_string PDFTEXHELP[] = {
"Usage: pdftex [OPTION]... [TEXNAME[.tex]] [COMMANDS]",
diff --git a/Build/source/texk/web2c/texmfmp.h b/Build/source/texk/web2c/texmfmp.h
index 8fa7aacf4b5..9a225417dc8 100644
--- a/Build/source/texk/web2c/texmfmp.h
+++ b/Build/source/texk/web2c/texmfmp.h
@@ -59,6 +59,10 @@ typedef void* voidpointer;
#elif defined (Aleph)
#define TEXMFPOOLNAME "aleph.pool"
#define TEXMFENGINENAME "aleph"
+#elif defined (pTeX)
+#define TEXMFPOOLNAME "ptex.pool"
+#define TEXMFENGINENAME "ptex"
+#include "ptexdir/kanji.h"
#else
#define TEXMFPOOLNAME "tex.pool"
#define TEXMFENGINENAME "tex"
diff --git a/Build/source/texk/web2c/web2c/ChangeLog b/Build/source/texk/web2c/web2c/ChangeLog
index 40d1f6a7d01..6e43e7c55e9 100644
--- a/Build/source/texk/web2c/web2c/ChangeLog
+++ b/Build/source/texk/web2c/web2c/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * convert, splitup.c: Remove luatex.
+ * common.defines: Remove LUATANGLEHELP.
+ Add PBIBTEXHELP, PDVITYPEHELP, PPLTOTFHELP, and PTFTOPLHELP.
+
2010-04-11 Karl Berry <karl@tug.org>
* convert: handle pbibtex, ptex, ptftopl, ppltotf, pdvitype.
diff --git a/Build/source/texk/web2c/web2c/common.defines b/Build/source/texk/web2c/web2c/common.defines
index af1fc629e6d..b6eab2398d0 100644
--- a/Build/source/texk/web2c/web2c/common.defines
+++ b/Build/source/texk/web2c/web2c/common.defines
@@ -69,7 +69,6 @@
@define const GFTODVIHELP;
@define const GFTOPKHELP;
@define const GFTYPEHELP;
-@define const LUATANGLEHELP;
@define const LUATEXHELP;
@define const MFTHELP;
@define const ODVICOPYHELP;
@@ -80,11 +79,15 @@
@define const OVP2OVFHELP;
@define const OVF2OVPHELP;
@define const PATGENHELP;
+@define const PBIBTEXHELP;
+@define const PDVITYPEHELP;
@define const PDFTEXHELP;
@define const PKTOGFHELP;
@define const PKTYPEHELP;
@define const PLTOTFHELP;
@define const POOLTYPEHELP;
+@define const PPLTOTFHELP;
+@define const PTFTOPLHELP;
@define const TANGLEHELP;
@define const TFTOPLHELP;
@define const VFTOVPHELP;
diff --git a/Build/source/texk/web2c/web2c/convert b/Build/source/texk/web2c/web2c/convert
index c91b9459118..27f22748c2a 100755
--- a/Build/source/texk/web2c/web2c/convert
+++ b/Build/source/texk/web2c/web2c/convert
@@ -49,16 +49,19 @@ output="> $cfile"
output_files="$cfile $basefile.h"
case $basefile in
- bibtex)
+ bibtex|pbibtex)
midcmd="| sed -f $srcdir/web2c/cvtbib.sed"
;;
+esac
- pbibtex)
- midcmd="| sed -f $srcdir/web2c/cvtbib.sed"
- more_defines="$srcdir/ptexdir/pbibtex.defines"
+case $basefile in
+ pbibtex|pdvitype|ppltotf|ptftopl)
+ more_defines="$srcdir/ptexdir/ptex.defines"
hfile=ptexdir/kanji.h
;;
+esac
+case $basefile in
mf)
more_defines="$srcdir/web2c/texmf.defines $srcdir/web2c/mfmp.defines"
precmd="| sed -f $srcdir/web2c/cvtmf1.sed"
@@ -69,7 +72,7 @@ case $basefile in
cfile=${basefile}0.c # last output file, or thereabouts
output=
output_files="$basefile[0-9].c ${basefile}ini.c ${basefile}d.h \
-${basefile}coerce.h"
+ ${basefile}coerce.h"
;;
tex|etex|pdftex|aleph|xetex|ptex)
@@ -87,27 +90,6 @@ ${basefile}coerce.h"
output_files="$basefile[0-9].c ${basefile}ini.c ${basefile}d.h \
${basefile}coerce.h"
;;
-
- luatex)
- more_defines="$srcdir/web2c/texmf.defines"
- prog_defines="$srcdir/${basefile}dir/$basefile.defines"
- if test -f $prog_defines; then
- more_defines="$more_defines $prog_defines"
- fi
- web2c_options="-t -c${basefile}coerce"
- hfile=texmfmp.h
- fixwrites_options=-t
- postcmd="| ./web2c/splitup $splitup_options ${basefile}"
- cfile=${basefile}0.c # last output file, or thereabouts
- output=
- output_files="$basefile[0-9].c ${basefile}ini.c ${basefile}d.h \
- ${basefile}coerce.h"
- ;;
-
- ptftopl|ppltotf|pdvitype)
- more_defines="$srcdir/ptexdir/ptex.defines"
- hfile=ptexdir/kanji.h
- ;;
esac
# Do it.
diff --git a/Build/source/texk/web2c/web2c/splitup.c b/Build/source/texk/web2c/web2c/splitup.c
index a383f642801..1f798cdf441 100644
--- a/Build/source/texk/web2c/web2c/splitup.c
+++ b/Build/source/texk/web2c/web2c/splitup.c
@@ -123,9 +123,6 @@ main (int argc, string *argv)
} else if (STREQ (output_name, "pdftex")) {
fputs ("#define INITEX\n#define TeX\n#define pdfTeX\n", out);
coerce = "pdftexcoerce.h";
- } else if (STREQ (output_name, "luatex")) {
- fputs ("#define INITEX\n#define TeX\n#define luaTeX\n", out);
- coerce = "luatexcoerce.h";
} else if (STREQ (output_name, "xetex")) {
fputs ("#define INITEX\n#define TeX\n#define XeTeX\n", out);
coerce = "xetexcoerce.h";
@@ -133,7 +130,7 @@ main (int argc, string *argv)
fputs ("#define INITEX\n#define TeX\n#define pTeX\n", out);
coerce = "ptexcoerce.h";
} else
- FATAL1 ("Can only split mf, tex, etex, aleph, luatex, pdftex, or xetex,\n not %s", output_name);
+ FATAL1 ("Can only split mf, tex, etex, aleph, pdftex, or xetex,\n not %s", output_name);
coerce_len = strlen (coerce);