From 1e19065af9e98c874f6b7d1a229868d9ca2f88bc Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Mon, 12 Apr 2010 16:35:45 +0000 Subject: gftopk, pktogf: dynamic memory allocation git-svn-id: svn://tug.org/texlive/trunk@17819 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/ChangeLog | 37 ++++++ Build/source/texk/web2c/Makefile.am | 1 - Build/source/texk/web2c/Makefile.in | 9 +- Build/source/texk/web2c/aclocal.m4 | 4 +- Build/source/texk/web2c/configure | 113 ++++--------------- Build/source/texk/web2c/configure.ac | 25 +---- Build/source/texk/web2c/ctangleboot-sh.in | 4 +- Build/source/texk/web2c/doc/Makefile.in | 1 - Build/source/texk/web2c/dvicopy.ch | 41 ++++--- Build/source/texk/web2c/dvitype.ch | 32 +++--- Build/source/texk/web2c/gftodvi.ch | 32 +++--- Build/source/texk/web2c/gftopk.ch | 143 +++++++++++++++--------- Build/source/texk/web2c/gftype.ch | 12 +- Build/source/texk/web2c/lib/Makefile.in | 1 - Build/source/texk/web2c/mf.ch | 12 +- Build/source/texk/web2c/mft.ch | 34 +++--- Build/source/texk/web2c/omegafonts/Makefile.in | 1 - Build/source/texk/web2c/omegaware/ChangeLog | 10 ++ Build/source/texk/web2c/omegaware/odvicopy.ch | 41 ++++--- Build/source/texk/web2c/omegaware/odvitype.ch | 14 ++- Build/source/texk/web2c/pktogf.ch | 74 +++++++----- Build/source/texk/web2c/pktype.ch | 10 +- Build/source/texk/web2c/pltotf.ch | 18 +-- Build/source/texk/web2c/pooltype.ch | 12 +- Build/source/texk/web2c/ptexdir/lib/Makefile.in | 1 - Build/source/texk/web2c/tangle.ch | 16 +-- Build/source/texk/web2c/tex.ch | 132 +++++++++++----------- Build/source/texk/web2c/tftopl.ch | 24 ++-- Build/source/texk/web2c/vftovp.ch | 8 +- Build/source/texk/web2c/vptovf.ch | 16 +-- Build/source/texk/web2c/weave.ch | 8 +- Build/source/texk/web2c/window/Makefile.in | 1 - 32 files changed, 467 insertions(+), 420 deletions(-) (limited to 'Build/source') diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index 31690ef083b..43aa1415e68 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -8,6 +8,43 @@ * lib/texmfmp.c [pTeX]: various pTeX conditionals. * texmfmp-help.h [pTeX]: pTeX options. +2010-04-11 Peter Breitenlohner + + * tangle.ch: Check and correct module numbers. + + * dvitype.ch, gftodvi.ch, gftopk.ch, gftype.ch, mf.ch, mft.ch, + pktogf.ch, pktype.ch, pltotf.ch, pooltype.ch, tangle.ch, tex.ch, + tftopl.ch, vftovp.ch, vptovf.ch, weave.ch: Remove trailing + whitespace. + +2010-04-10 Peter Breitenlohner + + * am/cweb.am (cweave.c): Add dependency on cwebdir/prod.w. + +2010-04-08 Peter Breitenlohner + + * dvicopy.ch (dvi_name): New global variable. + (dvi_length, dvi_move): Use dvi_name instead of 'dvicopy' as + last arg of xfseek() and xftell(). + No random reading on stdin, may be not seekable. + * dvitype.ch (dvi_name): New global variable. + (dvi_length, move_to_byte): Use dvi_name instead of 'dvitype' + as last arg of xfseek() and xftell(). + * gftopk.ch (gf_length, move_to_byte): Use gf_name instead of + 'gftopk' as last arg of xfseek() and xftell(). + +2010-04-06 Peter Breitenlohner + + * pktogf.ch: Check and correct module numbers. + Dynamically allocate and resize the row_counts array. + +2010-04-05 Peter Breitenlohner + + * gftopk.ch: Check and correct module numbers. + Dynamically allocate and resize the row array. + Remove superfluous variable vpl_name. + Bug fix for GF file too short. + 2010-04-05 Taco Hoekwater * texmfmp.h: Removed #ifdef luaTeX code, now that luatex diff --git a/Build/source/texk/web2c/Makefile.am b/Build/source/texk/web2c/Makefile.am index 9c1210d8da6..69d57c5308e 100644 --- a/Build/source/texk/web2c/Makefile.am +++ b/Build/source/texk/web2c/Makefile.am @@ -170,7 +170,6 @@ include $(srcdir)/pdftexdir/am/pdftosrc.am ## luaTeX include $(srcdir)/luatexdir/am/luatex.am -## include $(srcdir)/luatexdir/am/luatangle.am include $(srcdir)/luatexdir/am/liblua51.am include $(srcdir)/luatexdir/am/luasocket.am include $(srcdir)/luatexdir/am/luamisc.am diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in index 8951deec43b..259caa3518f 100644 --- a/Build/source/texk/web2c/Makefile.in +++ b/Build/source/texk/web2c/Makefile.in @@ -1093,7 +1093,6 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ -LUATANGLE = @LUATANGLE@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ @@ -1226,7 +1225,7 @@ version = $(WEB2CVERSION) SUBDIRS = doc lib man web2c . window omegafonts otps ptexdir/lib proglib = lib/lib.a dist_man_MANS = synctexdir/man1/synctex.1 synctexdir/man5/synctex.5 -nodist_man_MANS = ctiedir/ctie.1 tiedir/tie.1 +nodist_man_MANS = EXTRA_LIBRARIES = libmf.a libmplib.a libpdftex.a liblua51.a \ libluasocket.a libluamisc.a libff.a libluatex.a libxetex.a \ libxetexmm.a libmd5.a @@ -8829,7 +8828,7 @@ weave.p: tangle$(EXEEXT) weave.web weave.ch ctie.c: ctangle$(EXEEXT) ctiedir/ctie.w ctiedir/ctie-k.ch CWEBINPUTS=$(srcdir)/ctiedir $(ctangle) ctie.w ctie-k.ch $(cweave_OBJECTS): cweb.h -cweave.c: ctangle$(EXEEXT) cwebdir/common.h cwebdir/cweave.w cwebdir/cweav-w2c.ch +cweave.c: ctangle$(EXEEXT) cwebdir/common.h cwebdir/cweave.w cwebdir/prod.w cwebdir/cweav-w2c.ch CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) cweave cweav-w2c tie.c: ctangle$(EXEEXT) tiedir/tie.w tiedir/tie-w2c.ch CWEBINPUTS=$(srcdir)/tiedir $(ctangle) tie.w tie-w2c.ch @@ -9129,7 +9128,7 @@ $(libpdftex_a_OBJECTS): pdftexd.h $(XPDF_DEPEND) $(ZLIB_DEPEND) $(LIBPNG_DEPEND) $(pdftosrc_OBJECTS): $(ZLIB_DEPEND) $(LIBPNG_DEPEND) $(XPDF_DEPEND) $(OBSDCOMPAT_DEPEND) -$(luatex_OBJECTS): libluatex.a libmplib.a +$(luatex_OBJECTS): libluatex.a # Double-colon rules since we do something similar in mplibdir (maybe others). @LUATEX_TRUE@install-exec-hook:: @@ -9407,7 +9406,7 @@ managed-sa.c: ctangle$(EXEEXT) luatexdir/utils/managed-sa.w avlstuff.c: ctangle$(EXEEXT) luatexdir/utils/avlstuff.w $(luatex_utils_ctangle) avlstuff.w -$(libluatex_a_OBJECTS): libff.a +$(libluatex_a_OBJECTS): libff.a libmplib.a $(xetex_OBJECTS): $(xetex_prereq) $(xetex_c_h): xetex-web2c diff --git a/Build/source/texk/web2c/aclocal.m4 b/Build/source/texk/web2c/aclocal.m4 index 024c9ddd468..3102f64e437 100644 --- a/Build/source/texk/web2c/aclocal.m4 +++ b/Build/source/texk/web2c/aclocal.m4 @@ -598,7 +598,7 @@ AC_CACHE_CHECK([whether deplibs are loaded by dlopen], freebsd* | dragonfly*) lt_cv_sys_dlopen_deplibs=yes ;; - gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu) + gnu* | linux* | k*bsd*-gnu) # GNU and its variants, using gnu ld.so (Glibc) lt_cv_sys_dlopen_deplibs=yes ;; @@ -618,7 +618,7 @@ AC_CACHE_CHECK([whether deplibs are loaded by dlopen], # at 6.2 and later dlopen does load deplibs. lt_cv_sys_dlopen_deplibs=yes ;; - netbsd* | netbsdelf*-gnu) + netbsd*) lt_cv_sys_dlopen_deplibs=yes ;; openbsd*) diff --git a/Build/source/texk/web2c/configure b/Build/source/texk/web2c/configure index dff1b447fe4..e69e588d356 100755 --- a/Build/source/texk/web2c/configure +++ b/Build/source/texk/web2c/configure @@ -755,7 +755,6 @@ LIBADD_SHL_LOAD LIBADD_DLOPEN LT_DLLOADERS subdirs -LUATANGLE OTANGLE TIE CTANGLE @@ -5281,13 +5280,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5284: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5283: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5287: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5286: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5290: output\"" >&5) + (eval echo "\"\$as_me:5289: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6490,7 +6489,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6493 "configure"' > conftest.$ac_ext + echo '#line 6492 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8420,11 +8419,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8423: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8422: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8427: \$? = $ac_status" >&5 + echo "$as_me:8426: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8759,11 +8758,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8762: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8761: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8766: \$? = $ac_status" >&5 + echo "$as_me:8765: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8864,11 +8863,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8867: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8866: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8871: \$? = $ac_status" >&5 + echo "$as_me:8870: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8919,11 +8918,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8922: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8921: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8926: \$? = $ac_status" >&5 + echo "$as_me:8925: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11286,7 +11285,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11289 "configure" +#line 11288 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11382,7 +11381,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11385 "configure" +#line 11384 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15183,11 +15182,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15186: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15185: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15190: \$? = $ac_status" >&5 + echo "$as_me:15189: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15282,11 +15281,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15285: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15284: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15289: \$? = $ac_status" >&5 + echo "$as_me:15288: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15334,11 +15333,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15337: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15336: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15341: \$? = $ac_status" >&5 + echo "$as_me:15340: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -21956,55 +21955,6 @@ else OTANGLE=./otangle fi -if test "x$cross_compiling" = xyes; then -# Extract the first word of "luatangle", so it can be a program name with args. -set dummy luatangle; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_LUATANGLE+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $LUATANGLE in - [\\/]* | ?:[\\/]*) - ac_cv_path_LUATANGLE="$LUATANGLE" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_LUATANGLE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -LUATANGLE=$ac_cv_path_LUATANGLE -if test -n "$LUATANGLE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LUATANGLE" >&5 -$as_echo "$LUATANGLE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test -z "${LUATANGLE}"; then - as_fn_error "luatangle was not found but is required when cross-compiling. - Install luatangle or set \$LUATANGLE to the full pathname." "$LINENO" 5 -fi -else - LUATANGLE=./luatangle -fi - if test "x$cross_compiling" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your tie supports WEBINPUTS" >&5 @@ -22043,24 +21993,6 @@ $as_echo "$tool_ok" >&6; } fi rm -f cftest.p fi - if test "x$enable_luatex" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your luatangle supports WEBINPUTS" >&5 -$as_echo_n "checking if your luatangle supports WEBINPUTS... " >&6; } - ( WEBINPUTS=$srcdir/cftests - export WEBINPUTS - $LUATANGLE cftest cftest ) >/dev/null 2>&1 - if diff cftest.p $srcdir/cftests/lcftest.p >/dev/null 2>&1; then - tool_ok=yes - else - tool_ok=no - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_ok" >&5 -$as_echo "$tool_ok" >&6; } - if test "x$tool_ok" != xyes; then - as_fn_error "Sorry, your $LUATANGLE is too old and does not support WEBINPUTS" "$LINENO" 5 - fi - rm -f cftest.p - fi fi @@ -22068,7 +22000,7 @@ fi subdirs="$subdirs web2c" -ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile man/Makefile ptexdir/lib/Makefile omegafonts/Makefile otps/Makefile window/Makefile" +ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile man/Makefile omegafonts/Makefile otps/Makefile ptexdir/lib/Makefile window/Makefile" ac_config_files="$ac_config_files web2c-sh" @@ -22080,7 +22012,6 @@ ac_config_files="$ac_config_files ctangleboot-sh" - LT_DLLOADERS= @@ -23589,9 +23520,9 @@ do "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; - "ptexdir/lib/Makefile") CONFIG_FILES="$CONFIG_FILES ptexdir/lib/Makefile" ;; "omegafonts/Makefile") CONFIG_FILES="$CONFIG_FILES omegafonts/Makefile" ;; "otps/Makefile") CONFIG_FILES="$CONFIG_FILES otps/Makefile" ;; + "ptexdir/lib/Makefile") CONFIG_FILES="$CONFIG_FILES ptexdir/lib/Makefile" ;; "window/Makefile") CONFIG_FILES="$CONFIG_FILES window/Makefile" ;; "web2c-sh") CONFIG_FILES="$CONFIG_FILES web2c-sh" ;; "tangle-sh") CONFIG_FILES="$CONFIG_FILES tangle-sh" ;; diff --git a/Build/source/texk/web2c/configure.ac b/Build/source/texk/web2c/configure.ac index 6237bbea3d2..823a00e014a 100644 --- a/Build/source/texk/web2c/configure.ac +++ b/Build/source/texk/web2c/configure.ac @@ -306,8 +306,6 @@ KPSE_CROSS_PATH_PROG([CTANGLE], [ctangle], [./ctangle]) KPSE_CROSS_PATH_PROG([TIE], [tie], [./tie]) dnl Required for Aleph and XeTeX KPSE_CROSS_PATH_PROG([OTANGLE], [otangle], [./otangle]) -dnl Required for luaTeX -KPSE_CROSS_PATH_PROG([LUATANGLE], [luatangle], [./luatangle]) if test "x$cross_compiling" = xyes; then AC_MSG_CHECKING([if your tie supports WEBINPUTS]) @@ -342,29 +340,13 @@ if test "x$cross_compiling" = xyes; then fi rm -f cftest.p fi - if test "x$enable_luatex" = xyes; then - AC_MSG_CHECKING([if your luatangle supports WEBINPUTS]) - ( WEBINPUTS=$srcdir/cftests - export WEBINPUTS - $LUATANGLE cftest cftest ) >/dev/null 2>&1 - if diff cftest.p $srcdir/cftests/lcftest.p >/dev/null 2>&1; then - tool_ok=yes - else - tool_ok=no - fi - AC_MSG_RESULT([$tool_ok]) - if test "x$tool_ok" != xyes; then - AC_MSG_ERROR([Sorry, your $LUATANGLE is too old and does not support WEBINPUTS]) - fi - rm -f cftest.p - fi fi AC_CONFIG_SUBDIRS([web2c]) AC_CONFIG_FILES([Makefile doc/Makefile lib/Makefile man/Makefile - ptexdir/lib/Makefile - omegafonts/Makefile otps/Makefile window/Makefile]) + omegafonts/Makefile otps/Makefile + ptexdir/lib/Makefile window/Makefile]) AC_CONFIG_FILES([web2c-sh], [chmod +x web2c-sh]) AC_CONFIG_FILES([tangle-sh], [chmod +x tangle-sh]) AC_CONFIG_FILES([ctangleboot-sh], [chmod +x ctangleboot-sh]) @@ -377,8 +359,7 @@ AC_CONFIG_COMMANDS_POST([AS_IF([test "x$cross_compiling" = xyes], CC='$BUILDCC' CPPFLAGS='$BUILDCPPFLAGS'\ CFLAGS='$BUILDCFLAGS' LDFLAGS='$BUILDLDFLAGS'"])]) -dnl for luatex dynamic loading - +dnl for luaTeX dynamic loading LT_LIB_DLLOAD AC_OUTPUT diff --git a/Build/source/texk/web2c/ctangleboot-sh.in b/Build/source/texk/web2c/ctangleboot-sh.in index 7d747fc28cc..450d2aa94d0 100644 --- a/Build/source/texk/web2c/ctangleboot-sh.in +++ b/Build/source/texk/web2c/ctangleboot-sh.in @@ -1,9 +1,9 @@ #! @SHELL@ # ctangleboot-sh: shell script to invoke ctangleboot and if required # update c{tangle,web}boot.[ch]in from c{tangle,web}.[ch]. -# For details see tangle.sh. +# For details see tangle-sh. # -# Copyright (C) 2009 Peter Breitenlohner +# Copyright (C) 2009, 2010 Peter Breitenlohner # # This file is free software; the copyright holder # gives unlimited permission to copy and/or distribute it, diff --git a/Build/source/texk/web2c/doc/Makefile.in b/Build/source/texk/web2c/doc/Makefile.in index 7f4050da96d..5ddcecfcb67 100644 --- a/Build/source/texk/web2c/doc/Makefile.in +++ b/Build/source/texk/web2c/doc/Makefile.in @@ -186,7 +186,6 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ -LUATANGLE = @LUATANGLE@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ diff --git a/Build/source/texk/web2c/dvicopy.ch b/Build/source/texk/web2c/dvicopy.ch index c4ff1ee9232..5060d215ebe 100644 --- a/Build/source/texk/web2c/dvicopy.ch +++ b/Build/source/texk/web2c/dvicopy.ch @@ -15,6 +15,13 @@ \let\maybe=\iffalse @z +@x [1] No random reading on stdin, may be not seekable. +@d random_reading==true {should we skip around in the file?} +@y +@= +@!random_reading:boolean; {should we skip around in the file?} +@z + @x [3] Set up kpathsea. procedure initialize; {this procedure gets things started properly} var @@/ @@ -360,13 +367,13 @@ begin set_pos(dvi_file,n); dvi_loc:=n; end; @y @p function dvi_length:int_32; -begin xfseek(dvi_file, 0, 2, 'dvicopy'); -dvi_loc:=xftell(dvi_file, 'dvicopy'); +begin xfseek(dvi_file, 0, 2, dvi_name); +dvi_loc:=xftell(dvi_file, dvi_name); dvi_length:=dvi_loc; end; @# procedure dvi_move(n:int_32); -begin xfseek(dvi_file, n, 0, 'dvicopy'); +begin xfseek(dvi_file, n, 0, dvi_name); dvi_loc:=n; end; @z @@ -569,24 +576,27 @@ begin {Now |optind| is the index of first non-option on the command line. We can have zero, one, or two remaining arguments.} + if (optind > argc) or (optind + 2 < argc) then begin + write_ln (stderr, 'dvicopy: Need at most two file arguments.'); + usage ('dvicopy'); + end; + if optind = argc then begin + dvi_name := ''; dvi_file := make_binary_file (stdin); - out_file := make_binary_file (stdout); - term_out := stderr; - - end else if optind + 1 = argc then begin - resetbin (dvi_file, extend_filename (cmdline (optind), 'dvi')); - out_file := make_binary_file (stdout); - term_out := stderr; + random_reading := false; + end else begin + dvi_name := extend_filename (cmdline (optind), 'dvi'); + resetbin (dvi_file, dvi_name); + random_reading := true; + end; - end else if optind + 2 = argc then begin - resetbin (dvi_file, extend_filename (cmdline (optind), 'dvi')); + if optind + 2 = argc then begin rewritebin (out_file, extend_filename (cmdline (optind + 1), 'dvi')); term_out := stdout; - end else begin - write_ln (stderr, 'dvicopy: Need at most two file arguments.'); - usage ('dvicopy'); + out_file := make_binary_file (stdout); + term_out := stderr; end; end; @@ -683,4 +693,5 @@ long_options[current_option].val := 0; @ @ = @!term_out:text; +@!dvi_name:const_c_string; @z diff --git a/Build/source/texk/web2c/dvitype.ch b/Build/source/texk/web2c/dvitype.ch index d06ecfb80d4..960d6893591 100644 --- a/Build/source/texk/web2c/dvitype.ch +++ b/Build/source/texk/web2c/dvitype.ch @@ -114,7 +114,7 @@ end; @y @p procedure open_dvi_file; {prepares to read packed bytes in |dvi_file|} begin - resetbin (dvi_file, extend_filename (cmdline (optind), 'dvi')); + resetbin (dvi_file, dvi_name); cur_loc := 0; end; @# @@ -173,14 +173,14 @@ end; @y @p function dvi_length:integer; begin - xfseek (dvi_file, 0, 2, 'dvitype'); - cur_loc := xftell(dvi_file, 'dvitype'); + xfseek (dvi_file, 0, 2, dvi_name); + cur_loc := xftell(dvi_file, dvi_name); dvi_length := cur_loc; end; @# procedure move_to_byte(n:integer); begin - xfseek (dvi_file, n, 0, 'dvitype'); + xfseek (dvi_file, n, 0, dvi_name); cur_loc:=n; end; @z @@ -544,26 +544,26 @@ begin 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 if (optarg[0] < '0') or (optarg[0] > '4') or (optarg[1] <> 0) then begin write_ln (stderr, 'Value for --output-level must be >= 0 and <= 4.'); uexit (1); end; out_mode := optarg[0] - '0'; - + end else if argument_is ('page-start') then begin @; - + 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 it was a flag; |getopt| has already done the assignment.} until getopt_return_val = -1; @@ -572,6 +572,7 @@ begin write_ln (stderr, 'dvitype: Need exactly one file argument.'); usage ('dvitype'); end; + dvi_name := extend_filename (cmdline (optind), 'dvi'); end; @ Here are the options we allow. The first is one of the standard GNU options. @@ -616,7 +617,7 @@ long_options[current_option].flag := 0; long_options[current_option].val := 0; incr (current_option); -@ Parsing the starting page specification is a bit complicated. +@ Parsing the starting page specification is a bit complicated. @ = k := 0; {which \.{\\count} register we're on} @@ -625,7 +626,7 @@ 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 @@ -633,7 +634,7 @@ while optarg[m] do begin 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 @@ -700,4 +701,9 @@ 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; + +@ Global filenames. + +@ = +@!dvi_name:const_c_string; @z diff --git a/Build/source/texk/web2c/gftodvi.ch b/Build/source/texk/web2c/gftodvi.ch index 9e8db5eb13f..623350021f0 100644 --- a/Build/source/texk/web2c/gftodvi.ch +++ b/Build/source/texk/web2c/gftodvi.ch @@ -79,7 +79,7 @@ procedure initialize; {this procedure gets things started properly} @z % [4] Remove the final_end label. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @ If the program has to stop prematurely, it goes to the `|final_end|'. @@ -98,7 +98,7 @@ procedure initialize; {this procedure gets things started properly} @z % [8] Remove nonlocal goto. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @p procedure jump_out; begin goto final_end; @@ -112,7 +112,7 @@ end; % [11] 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} @y @@ -243,7 +243,7 @@ else signed_quad:=(((a-256)*intcast(256)+b)*256+c)*256+d; % field and as a regular variable. web2c puts field names in the global % symbol table, so this loses. Rather than fix web2c (hard), we change % the name of the field (ugly, but easy). -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @!four_quarters = packed record@;@/ @!b0:quarterword; @@ -268,7 +268,7 @@ else signed_quad:=(((a-256)*intcast(256)+b)*256+c)*256+d; @z % [55] fix references to .b0 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @d char_width_end(#)==#.b0].sc @d char_width(#)==font_info[width_base[#]+char_width_end @@ -304,7 +304,7 @@ else signed_quad:=(((a-256)*intcast(256)+b)*256+c)*256+d; @z % [60] Fix 16-bit arithmetic bugs in TFM calculations. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @ @d read_two_halves_end(#)==#:=b2*256+b3 @d read_two_halves(#)==read_tfm_word; #:=b0*256+b1; read_two_halves_end @@ -314,7 +314,7 @@ else signed_quad:=(((a-256)*intcast(256)+b)*256+c)*256+d; @z % [62] More .b?'s. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x qw.b0:=qi(b0); qw.b1:=qi(b1); qw.b2:=qi(b2); qw.b3:=qi(b3); @y @@ -322,7 +322,7 @@ else signed_quad:=(((a-256)*intcast(256)+b)*256+c)*256+d; @z % [62] More arithmetic fixes. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x z:=((b0*256+b1)*256+b2)*16+(b3 div 16); @y @@ -470,13 +470,13 @@ end; @y In C, we can write out the entire array with one call. @p procedure write_dvi(@!a,@!b:dvi_index); -begin +begin write_chunk (dvi_file, dvi_buf, a, b); end; @z % [111] More .b?'s. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x dvi_out(qo(font_check[f].b0)); dvi_out(qo(font_check[f].b1)); @@ -499,7 +499,7 @@ uexit (0); @z % [118] And still more .b?'s. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x dummy_info.b0:=qi(0); dummy_info.b1:=qi(0); dummy_info.b2:=qi(0); dummy_info.b3:=qi(0); @@ -509,7 +509,7 @@ dummy_info.B3:=qi(0); @z % [138] write_ln formatting. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x begin if abs(r-slant_reported)>0.001 then begin print_nl('Sorry, I can''t make diagonal rules of slant ',r:10:5,'!'); @@ -520,7 +520,7 @@ begin if fabs(r-slant_reported)>0.001 then @z % [164] No progress report unless verbose. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x print('[',total_pages:1); update_terminal; {print a progress report} @y @@ -632,10 +632,10 @@ begin 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 ('gftodvi'); - + end else if argument_is ('help') then begin usage_help (GFTODVI_HELP, nil); @@ -687,7 +687,7 @@ long_options[current_option].flag := address_of (verbose); long_options[current_option].val := 1; incr (current_option); -@ +@ @ = @!verbose: c_int_type; diff --git a/Build/source/texk/web2c/gftopk.ch b/Build/source/texk/web2c/gftopk.ch index 65504f88b03..b8d418e3b8e 100644 --- a/Build/source/texk/web2c/gftopk.ch +++ b/Build/source/texk/web2c/gftopk.ch @@ -4,7 +4,7 @@ % 12/02/89 Karl Berry 2.1. % 01/20/90 Karl 2.2. % (more recent changes in the ChangeLog) -% +% % One major change in output format is made by this change file. The % local gftopk preamble comment is ignored and the dated METAFONT % comment is passed through unaltered. This provides a continuous check @@ -54,7 +54,7 @@ var @@/ @ procedure initialize; {this procedure gets things started properly} var i:integer; {loop index for initializations} -begin +begin kpse_set_program_name (argv[0], nil); kpse_init_prog ('GFTOPK', 0, nil, nil); parse_arguments; @@ -73,10 +73,10 @@ begin a non-local goto, which we can't use in C. @z -@x [7] Allow for bigger fonts. Too bad it's not dynamically allocated. +@x [6] Dynamic allocation of |row| array. @!max_row=16000; {largest index in the main |row| array} @y -@!max_row=100000; {largest index in the main |row| array} +@!MAX_ROW=16000; {largest index in the initial main |row| array} @z @x [8] Make `abort' end with a newline, and remove the nonlocal goto. @@ -102,7 +102,7 @@ end; @d text_char == char {the data type of characters in text files} @z -@x [40] Use paths in open_gf_file. +@x [39] Use paths in open_gf_file. @ To prepare the |gf_file| for input, we |reset| it. @p procedure open_gf_file; {prepares to read packed bytes in |gf_file|} @@ -120,7 +120,7 @@ begin end; @z -% [41] If the PK filename isn't given on the command line, we construct +% [40] If the PK filename isn't given on the command line, we construct % it from the GF filename. @x @p procedure open_pk_file; {prepares to write packed bytes in |pk_file|} @@ -136,7 +136,7 @@ begin end; @z -@x [46] Redefine pk_byte, pk_halfword, pk_three_bytes, and pk_word. +@x [45] Redefine pk_byte, pk_halfword, pk_three_bytes, and pk_word. @p procedure pk_byte(a:integer) ; begin if pk_open then begin @@ -215,7 +215,7 @@ begin end ; @z -@x [48] Redefine find_gf_length and move_to_byte. +@x [47] Redefine find_gf_length and move_to_byte. @p procedure find_gf_length ; begin set_pos(gf_file, -1) ; gf_len := cur_pos(gf_file) ; @@ -230,18 +230,46 @@ end ; @p function gf_length:integer; begin - xfseek (gf_file, 0, 2, 'gftopk'); - gf_length := xftell (gf_file, 'gftopk'); + xfseek (gf_file, 0, 2, gf_name); + gf_length := xftell (gf_file, gf_name); end; @# procedure move_to_byte (n:integer); -begin xfseek (gf_file, n, 0, 'gftopk'); +begin xfseek (gf_file, n, 0, gf_name); end; @z -% [53] Make sure that |gf_byte| gets past the comment when not -% |verbose|; add do_the_rows to break up huge run of cases. -@x +@x [49] Dynamic allocation of |row| array. +@!row: array[0..max_row] of integer; {the row counts for working} +@y +@!row: ^integer; {the row counts for working} +@!max_row: integer; {largest index in the main |row| array} +@z + +@x [50] Dynamic allocation of |row| array. +@= +@y +@= +row := xmalloc_array (integer, MAX_ROW); +max_row := MAX_ROW; +@z + +@x [52] Dynamic allocation of |row| array. +procedure convert_gf_file; +@y +procedure row_overflow; +var @!new_row: integer; +begin + new_row := max_row + MAX_ROW; + print_ln('Reallocated row array to ', new_row:1, ' items from ', max_row:1, '.'); + row := xrealloc_array (row, integer, new_row); + max_row := new_row; +end; +@# +procedure convert_gf_file; +@z + +@x [still 52] Add do_the_rows to break up huge run of cases. repeat gf_com := gf_byte ; case gf_com of @@ -252,7 +280,7 @@ end; case gf_com of @z -@x [54] Declare |thirty_seven_cases| to help avoid breaking yacc. +@x [53] Declare |thirty_seven_cases| to help avoid breaking yacc. @d one_sixty_five_cases(#)==sixty_four_cases(#),sixty_four_cases(#+64), sixteen_cases(#+128),sixteen_cases(#+144),four_cases(#+160),#+164 @y @@ -262,48 +290,40 @@ end; @d new_row_128=new_row_64 + 64 @z -@x [59] Break up an oversized sequence of cases for yacc. +@x [57] Dynamic allocation of |row| array. +@d put_in_rows(#)==begin if row_ptr > max_row then bad := true else begin +row[row_ptr]:=#; incr(row_ptr); end ; end +@y +@d put_in_rows(#)==begin if row_ptr > max_row then row_overflow; +row[row_ptr]:=#; incr(row_ptr); end +@z + +@x [58] Dynamic allocation of |row| array. + bad := false ; +@y +@z + +@x [still 58] Break up an oversized sequence of cases for yacc. one_sixty_five_cases(new_row_0) : begin if on = state then put_in_rows(extra) ; put_in_rows(end_of_row) ; on := true ; extra := gf_com - new_row_0 ; state := false ; end ; -@t\4@>@ ; -eoc : begin - if on = state then put_in_rows(extra) ; - if ( row_ptr > 2 ) and ( row[row_ptr - 1] <> end_of_row) then - put_in_rows(end_of_row) ; - put_in_rows(end_of_char) ; - if bad then abort('Ran out of internal memory for row counts!') ; -@.Ran out of memory@> - pack_and_send_character ; - status[gf_ch_mod_256] := sent ; - if pk_loc <> pred_pk_loc then - abort('Internal error while writing character!') ; -@.Internal error@> -end ; -othercases bad_gf('Unexpected ',gf_com:1,' command in character definition') -@.Unexpected command@> - endcases ; @y sixty_four_cases(new_row_0) : do_the_rows:=true; sixty_four_cases(new_row_64) : do_the_rows:=true; thirty_seven_cases(new_row_128) : do_the_rows:=true; -@ ; -eoc : begin - if on = state then put_in_rows(extra) ; - if ( row_ptr > 2 ) and ( row[row_ptr - 1] <> end_of_row) then - put_in_rows(end_of_row) ; - put_in_rows(end_of_char) ; +@z + +@x [still 58] Dynamic allocation of |row| array. if bad then abort('Ran out of internal memory for row counts!') ; @.Ran out of memory@> - pack_and_send_character ; - status[gf_ch_mod_256] := sent ; - if pk_loc <> pred_pk_loc then - abort('Internal error while writing character!') ; -@.Internal error@> -end ; -othercases bad_gf('Unexpected ',gf_com:1,' character in character definition'); +@y +@z + +@x [still 58] Break up an oversized sequence of cases for yacc. + endcases ; +@y endcases ; if do_the_rows then begin do_the_rows:=false; @@ -313,7 +333,7 @@ if do_the_rows then begin end ; @z -@x [60] Add do_the_rows to break up huge run of cases. +@x [59] Add do_the_rows to break up huge run of cases. @ A few more locals used above and below: @= @@ -324,7 +344,28 @@ end ; @!do_the_rows:boolean; @z -@x [81] Don't add `GFtoPK 2.3 output from ' to the font comment. +@x [still 59] Dynamic allocation of |row| array. +@!bad : boolean ; {did we run out of space?} +@y +@z + +@x [61] bug fix: GF file too short. +find_gf_length ; +@y +find_gf_length ; +if gf_len<8 then bad_gf('only ',gf_len:1,' bytes long'); +@.only n bytes long@> +@z + +@x [61] bug fix: GF file too short. +move_to_byte(post_loc - 3); +@y +if post_loc<5 then bad_gf('post location is ',post_loc:1) ; +@.post location is@> +move_to_byte(post_loc - 3); +@z + +@x [82] Don't add `GFtoPK 2.3 output from ' to the font comment. @d comm_length = 23 {length of |preamble_comment|} @d from_length = 6 {length of its |' from '| part} @y @@ -392,7 +433,7 @@ begin write_ln (stderr, 'gftopk: Need one or two file arguments.'); usage ('gftopk'); end; - + gf_name := cmdline (optind); {If an explicit output filename isn't given, construct it from |gf_name|.} @@ -433,7 +474,7 @@ long_options[current_option].flag := address_of (verbose); long_options[current_option].val := 1; incr (current_option); -@ +@ @ = @!verbose: c_int_type; @@ -452,5 +493,5 @@ long_options[current_option].val := 0; @ Global filenames. @ = -@!gf_name, @!pk_name, @!vpl_name:c_string; +@!gf_name, @!pk_name:const_c_string; @z diff --git a/Build/source/texk/web2c/gftype.ch b/Build/source/texk/web2c/gftype.ch index b26f81a1378..13411f03b92 100644 --- a/Build/source/texk/web2c/gftype.ch +++ b/Build/source/texk/web2c/gftype.ch @@ -6,13 +6,13 @@ % info printout to make trap look better. % 12/02/89 Karl Berry version 3. % (more recent changes in the ChangeLog) -% -% The C version of GFtype uses command line switches to +% +% The C version of GFtype uses command line switches to % request mnemonic ouput or pixel image output. % The default is a restrained output which merely assures you % that all characters are there and reports their position, tfm_width % and escapement. The -m switch turns on mnemonics, the -i switch -% turns on images. There is no terminal input to this program. +% turns on images. There is no terminal input to this program. % Output is to stdout, and may, of course, be redirected. @x [0] WEAVE: print changes only. @@ -274,7 +274,7 @@ can see what \.{GFtype} thought was specified. @ So is its second part. (module 33) -@ After the command-line switches have been processed, +@ After the command-line switches have been processed, we print the options so that the user can see what \.{GFtype} thought was specified. @z @@ -381,7 +381,7 @@ othercases error('undefined command ',o:1,'!') endcases @z -@x [65] No label and no dialog; finish last line written. +@x [65] No label and no dialog; finish last line written. @p begin initialize; {get all variables initialized} dialog; {set up all the options} @; @@ -434,7 +434,7 @@ begin 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 ('gftype'); diff --git a/Build/source/texk/web2c/lib/Makefile.in b/Build/source/texk/web2c/lib/Makefile.in index 0de865d0c54..5a39fa9c8d4 100644 --- a/Build/source/texk/web2c/lib/Makefile.in +++ b/Build/source/texk/web2c/lib/Makefile.in @@ -178,7 +178,6 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ -LUATANGLE = @LUATANGLE@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ diff --git a/Build/source/texk/web2c/mf.ch b/Build/source/texk/web2c/mf.ch index df4160cf6fa..b9fe0dfffaf 100644 --- a/Build/source/texk/web2c/mf.ch +++ b/Build/source/texk/web2c/mf.ch @@ -401,7 +401,7 @@ in \ph. The `\.{/I}' switch suppresses the first |get|. @ Here is how to open the terminal files. |t_open_out| does nothing. |t_open_in|, on the other hand, does the work of ``rescanning,'' or getting any command line arguments the user has provided. It's defined in C. - + @d t_open_out == {output already open for text output} @z @@ -591,12 +591,12 @@ end; print_nl("! "); print(#); @y if (file_line_error_style_p and not terminal_input) then - begin + begin print_nl (""); print (full_source_filename_stack[in_open]); print (":"); print_int (line); print (": "); - print (#); - end + print (#); + end else begin print_nl("! "); print(#) end; @z @@ -1671,7 +1671,7 @@ name_of_file[name_length + 1] := 0; while (k<=name_length)and(more_name(name_of_file[k])) do incr(k); stop_at_space:=true; - end_name; + end_name; @z @x [38.781] Make scan_file_name ignore leading tabs as well as spaces. @@ -2120,7 +2120,7 @@ print(" (base="); print(job_name); print_char(" "); if error_line > ssup_error_line then error_line := ssup_error_line; if screen_width > ssup_screen_width then screen_width := ssup_screen_width; if screen_depth > ssup_screen_depth then screen_depth := ssup_screen_depth; - + const_chk (main_memory); {|mem_top| is an index, |main_memory| is a size} mem_top := mem_min + main_memory - 1; diff --git a/Build/source/texk/web2c/mft.ch b/Build/source/texk/web2c/mft.ch index 1567672dc3a..b8c53a0a377 100644 --- a/Build/source/texk/web2c/mft.ch +++ b/Build/source/texk/web2c/mft.ch @@ -1,5 +1,5 @@ % mft.ch for C compilation with web2c. -% +% % From Pierre Mackay's version for pc, which was in turn based on Howard % Trickey's and Pavel Curtis's change file for weave. % Support for MP included from a changefile by Wlodek Bzyl. @@ -23,8 +23,8 @@ @x [1] This program converts a \MF\ source file to a \TeX\ file. It was written @y -This program converts a \MF\ or \MP\ source file to a \TeX\ file. -It was written +This program converts a \MF\ or \MP\ source file to a \TeX\ file. +It was written @z @x [1] @^Knuth, Donald Ervin@> @@ -82,7 +82,7 @@ begin % [13] 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} @y @@ -105,7 +105,7 @@ for i:=@'177 to @'377 do xchr[i]:=chr(i); @z % [20] Remove term_out. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @= @!term_out:text_file; {the terminal as an output file} @@ -251,7 +251,7 @@ end % MFT incorrectly handles TeX code contained in groups: % -% btex etex +% btex etex % verbatimtex etex % % Ulrik Vieth (using ideas of Andreas Scherer) developed a Unix @@ -259,8 +259,8 @@ end % prettyprinting TeX material. % His script converts TeX material to a `TeXnical MFT comment', % which means that it is extracted and prettyprinted as string. -% Unfortunately, his script assumes that these groups may not -% extend across line breaks and there may be only one such +% Unfortunately, his script assumes that these groups may not +% extend across line breaks and there may be only one such % group per line, which is sometimes hard to obey and % makes prettyprinted code harder to read. % Moreover, any synonym for btex/verbatimtex/etex would not be @@ -962,7 +962,7 @@ or `\.{\\input mptmac}' if a \MP\ file is converted. @.\\input mptmac@> @.mptmac@> @= -out_ptr:=1; out_buf[1]:=" "; out_line:=1; +out_ptr:=1; out_buf[1]:=" "; out_line:=1; if metapost then begin write(tex_file,'\input mptmac'); end else write(tex_file,'\input mftmac'); @z @@ -990,11 +990,11 @@ else write(tex_file,'\input mftmac'); scanner_status:=verbatimtex_flushing; end else if cur_type=btex_code then begin out("B"); - scanner_status:=btex_flushing; + scanner_status:=btex_flushing; end; out("{"); out_name(cur_tok); out("}"); get_next; - while cur_type<>etex_marker do begin + while cur_type<>etex_marker do begin if cur_type=indentation then begin out(" "); end else if cur_type=end_of_line then begin flush_buffer(out_ptr,false); @@ -1003,7 +1003,7 @@ else write(tex_file,'\input mftmac'); else copy(id_first); get_next; end; - out4("\")("m")("f")("t"); out3("e")("n")("d"); + out4("\")("m")("f")("t"); out3("e")("n")("d"); out("{"); out_name(cur_tok); out("}"); if scanner_status=verbatimtex_flushing then out("$"); scanner_status:=normal; @@ -1088,7 +1088,7 @@ begin 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 ('mft'); @@ -1096,13 +1096,13 @@ begin usage_help (MFT_HELP, nil); end else if argument_is ('version') then begin - print_version_and_exit (banner, nil, - 'D.E. Knuth (MP changes by W. Bzyl)', + print_version_and_exit (banner, nil, + 'D.E. Knuth (MP changes by W. Bzyl)', nil); end else if argument_is ('change') then begin change_name := extend_filename (optarg, 'ch'); - + end else if argument_is ('style') then begin if (n_style_name = max_style_name) then begin fatal_error ('Too many style files specified.'); @@ -1193,7 +1193,7 @@ incr (current_option); @ = metapost:=false; -@ An element with all zeros always ends the list of options. +@ An element with all zeros always ends the list of options. @ = long_options[current_option].name := 0; diff --git a/Build/source/texk/web2c/omegafonts/Makefile.in b/Build/source/texk/web2c/omegafonts/Makefile.in index e41f6230226..e37f25b33ec 100644 --- a/Build/source/texk/web2c/omegafonts/Makefile.in +++ b/Build/source/texk/web2c/omegafonts/Makefile.in @@ -195,7 +195,6 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ -LUATANGLE = @LUATANGLE@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ diff --git a/Build/source/texk/web2c/omegaware/ChangeLog b/Build/source/texk/web2c/omegaware/ChangeLog index 923c96cd14e..b1578d99a62 100644 --- a/Build/source/texk/web2c/omegaware/ChangeLog +++ b/Build/source/texk/web2c/omegaware/ChangeLog @@ -1,3 +1,13 @@ +2010-04-08 Peter Breitenlohner + + * odvicopy.ch (dvi_name): New global variable. + (dvi_length, dvi_move): Use dvi_name instead of 'odvicopy' as + last arg of xfseek() and xftell(). + No random reading on stdin, may be not seekable. + * odvitype.ch (dvi_name): New global variable. + (dvi_length, move_to_byte): Use dvi_name instead of 'odvitype' + as last arg of xfseek() and xftell(). + 2010-03-09 Peter Breitenlohner * odvicopy.ch, odvitype.ch, ofm2opl.ch, opl2ofm.ch, otangle.ch, diff --git a/Build/source/texk/web2c/omegaware/odvicopy.ch b/Build/source/texk/web2c/omegaware/odvicopy.ch index 9a8fcfe4fe3..2aee5338492 100644 --- a/Build/source/texk/web2c/omegaware/odvicopy.ch +++ b/Build/source/texk/web2c/omegaware/odvicopy.ch @@ -24,6 +24,13 @@ \let\maybe=\iffalse @z +@x [1] No random reading on stdin, may be not seekable. +@d random_reading==true {should we skip around in the file?} +@y +@= +@!random_reading:boolean; {should we skip around in the file?} +@z + @x [3] Set up kpathsea. procedure initialize; {this procedure gets things started properly} var @@/ @@ -403,13 +410,13 @@ begin set_pos(dvi_file,n); dvi_loc:=n; end; @y @p function dvi_length:int_32; -begin xfseek(dvi_file, 0, 2, 'odvicopy'); -dvi_loc:=xftell(dvi_file, 'odvicopy'); +begin xfseek(dvi_file, 0, 2, dvi_name); +dvi_loc:=xftell(dvi_file, dvi_name); dvi_length:=dvi_loc; end; @# procedure dvi_move(n:int_32); -begin xfseek(dvi_file, n, 0, 'odvicopy'); +begin xfseek(dvi_file, n, 0, dvi_name); dvi_loc:=n; end; @z @@ -645,24 +652,27 @@ begin {Now |optind| is the index of first non-option on the command line. We can have zero, one, or two remaining arguments.} + if (optind > argc) or (optind + 2 < argc) then begin + write_ln (stderr, 'odvicopy: Need at most two file arguments.'); + usage ('odvicopy'); + end; + if optind = argc then begin + dvi_name := ''; dvi_file := make_binary_file (stdin); - out_file := make_binary_file (stdout); - term_out := stderr; - - end else if optind + 1 = argc then begin - resetbin (dvi_file, extend_filename (cmdline (optind), 'dvi')); - out_file := make_binary_file (stdout); - term_out := stderr; + random_reading := false; + end else begin + dvi_name := extend_filename (cmdline (optind), 'dvi'); + resetbin (dvi_file, dvi_name); + random_reading := true; + end; - end else if optind + 2 = argc then begin - resetbin (dvi_file, extend_filename (cmdline (optind), 'dvi')); + if optind + 2 = argc then begin rewritebin (out_file, extend_filename (cmdline (optind + 1), 'dvi')); term_out := stdout; - end else begin - write_ln (stderr, 'odvicopy: Need at most two file arguments.'); - usage ('odvicopy'); + out_file := make_binary_file (stdout); + term_out := stderr; end; end; @@ -758,4 +768,5 @@ long_options[current_option].val := 0; @ @ = @!term_out:text; +@!dvi_name:const_c_string; @z diff --git a/Build/source/texk/web2c/omegaware/odvitype.ch b/Build/source/texk/web2c/omegaware/odvitype.ch index 2acd6ad32e8..02cd626cddf 100644 --- a/Build/source/texk/web2c/omegaware/odvitype.ch +++ b/Build/source/texk/web2c/omegaware/odvitype.ch @@ -122,7 +122,7 @@ end; @y @p procedure open_dvi_file; {prepares to read packed bytes in |dvi_file|} begin - resetbin (dvi_file, extend_filename (cmdline (optind), 'dvi')); + resetbin (dvi_file, dvi_name); cur_loc := 0; end; @# @@ -186,14 +186,14 @@ end; @y @p function dvi_length:integer; begin - xfseek (dvi_file, 0, 2, 'odvitype'); - cur_loc := xftell(dvi_file, 'odvitype'); + xfseek (dvi_file, 0, 2, dvi_name); + cur_loc := xftell(dvi_file, dvi_name); dvi_length := cur_loc; end; @# procedure move_to_byte(n:integer); begin - xfseek (dvi_file, n, 0, 'odvitype'); + xfseek (dvi_file, n, 0, dvi_name); cur_loc:=n; end; @z @@ -652,6 +652,7 @@ begin write_ln (stderr, 'odvitype: Need exactly one file argument.'); usage ('odvitype'); end; + dvi_name := extend_filename (cmdline (optind), 'dvi'); end; @ Here are the options we allow. The first is one of the standard GNU options. @@ -780,4 +781,9 @@ 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; + +@ Global filenames. + +@ = +@!dvi_name:const_c_string; @z diff --git a/Build/source/texk/web2c/pktogf.ch b/Build/source/texk/web2c/pktogf.ch index c5079eb91f2..3639d1ba80c 100644 --- a/Build/source/texk/web2c/pktogf.ch +++ b/Build/source/texk/web2c/pktogf.ch @@ -6,7 +6,7 @@ % (more recent changes in the ChangeLog) % % One major change in output format is incorporated by this change -% file. The local pktogf preamble comment is ignored and the +% file. The local pktogf preamble comment is ignored and the % dated METAFONT comment is passed through unaltered. This % provides a continuous check on the origin of fonts in both % gf and pk formats. PKtoGF runs silently unless it is given the @@ -20,7 +20,7 @@ \def\title{PK$\,$\lowercase{to}$\,$GF changes for C} @z -@x [3] No global labels. +@x [4] No global labels. @ Both the input and output come from binary files. On line interaction is handled through \PASCAL's standard |input| and |output| files. @@ -29,13 +29,7 @@ is handled through \PASCAL's standard |input| and |output| files. @p program PKtoGF(input, output); label @@/ -const @@/ -type @@/ -var @@/ -procedure initialize; {this procedure gets things started properly} - var i:integer; {loop index for initializations} - begin print_ln(banner);@/ -@y +@y @ Both the input and output come from binary files. On line interaction is handled through \PASCAL's standard |input| and |output| files. For C compilation terminal input and output is directed to @@ -47,9 +41,13 @@ produced only when the \.{-v} command line flag is presented. @d print(#)==if verbose then write(output, #) @p program PKtoGF(input, output); -const @@/ -type @@/ -var @@/ +@z + +@x [still 4] Parse command line and initialize path searching. +procedure initialize; {this procedure gets things started properly} + var i:integer; {loop index for initializations} + begin print_ln(banner);@/ +@y @ procedure initialize; {this procedure gets things started properly} var i:integer; {loop index for initializations} @@ -82,7 +80,13 @@ a non-local goto, which we don't use in C. @= @z -@x [7] Just exit, instead of doing a nonlocal goto. +@x [still 6] Dynamic allocation of |row_counts| array. +@!max_counts=400; {maximum number of run counts in a raster line} +@y +@!MAX_COUNTS=400; {initial number of run counts in a raster line} +@z + +@x [8] Just exit, instead of doing a nonlocal goto. @d abort(#)==begin print_ln(' ',#); jump_out; end @p procedure jump_out; @@ -108,7 +112,7 @@ function pk_packed_num : integer ; var i, j : integer ; @z -@x [35] Use path searching to open |pk_file|. +@x [40] Use path searching to open |pk_file|. @p procedure open_gf_file; {prepares to write packed bytes in a |gf_file|} begin rewrite(gf_file,gf_name); gf_loc := 0 ; @@ -145,9 +149,9 @@ begin end; @z -@x [36] No arbitrary limit on filename length. +@x [41] No arbitrary limit on filename length. @ We need a place to store the names of the input and output files, as well -as a byte counter for the output file. +as a byte counter for the output file. @= @!gf_name,@!pk_name:packed array[1..name_length] of char; {names of input @@ -196,7 +200,7 @@ subroutine calls. @^system dependencies@> @d pk_byte==get_byte -@d pk_loc==cur_loc +@d pk_loc==cur_loc @p function get_byte:integer; {returns the next byte, unsigned} var b:eight_bits; @@ -267,7 +271,7 @@ function get_16 : integer ; var a : integer ; begin a := pk_byte ; - get_16 := a * 256 + pk_byte ; + get_16 := a * 256 + pk_byte ; end ; @# function signed_16 : integer ; @@ -279,10 +283,10 @@ end ; @# function get_32 : integer ; var a : integer ; -begin - a := get_16 ; +begin + a := get_16 ; if a > 32767 then a := a - 65536 ; - get_32 := a * 65536 + get_16 ; + get_32 := a * 65536 + get_16 ; end ; @y @ We put definitions here to access the \.{DVItype} functions supplied @@ -334,7 +338,15 @@ for i := 1 to j do begin print_ln('}') ; @z -@x [51] Since we preserve the METAFONT comment, this is unneeded. +@x [51] Dynamic allocation of |row_counts| array. +@ @= +@y +@ @= + row_counts := xmalloc_array (integer, MAX_COUNTS); + max_counts := MAX_COUNTS; +@z + +@x [still 51] Since we preserve the METAFONT comment, this is unneeded. comment := preamble_comment ; @y @z @@ -344,13 +356,21 @@ comment := preamble_comment ; @y @z -@x [65] Change jumpout to abort. - if rcp > max_counts then begin +@x [still 63] Dynamic allocation of |row_counts| array. +@!row_counts : array [0..max_counts] of integer ; +@y +@!max_counts : integer ; +@!row_counts : ^integer ; +@z + +@x [65] Dynamic allocation of |row_counts| array. print_ln('A character had too many run counts') ; jump_out ; - end ; @y - if rcp > max_counts then abort('A character had too many run counts'); + print_ln('Reallocated row_counts array to ', (max_counts+MAX_COUNTS):1, + ' items from ', max_counts:1, '.'); + max_counts := max_counts + MAX_COUNTS; + row_counts := xrealloc_array (row_counts, integer, max_counts); @z @x [71] There is no terminal communication. @@ -483,7 +503,7 @@ long_options[current_option].flag := address_of (verbose); long_options[current_option].val := 1; incr (current_option); -@ +@ @ = @!verbose: c_int_type; diff --git a/Build/source/texk/web2c/pktype.ch b/Build/source/texk/web2c/pktype.ch index 36fb4f71189..037538c9b79 100644 --- a/Build/source/texk/web2c/pktype.ch +++ b/Build/source/texk/web2c/pktype.ch @@ -5,7 +5,7 @@ % 02/04/90 Karl new file-searching routines. % (more recent changes in the ChangeLog) % -% There is no terminal input to this program. +% There is no terminal input to this program. % Output is to stdout, and may, of course, be redirected. @x [0] WEAVE: print changes only. @@ -137,7 +137,7 @@ end; @x [??] Use modified routines to access pk_file. @p function pk_byte : eight_bits ; var temp : eight_bits ; -begin +begin temp := pk_file^ ; get(pk_file) ; incr(pk_loc) ; @@ -151,7 +151,7 @@ subroutine calls. We comment out the ones we don't need @^system dependencies@> @d pk_byte==get_byte -@d pk_loc==cur_loc +@d pk_loc==cur_loc @p function get_byte:integer; {returns the next byte, unsigned} var b:eight_bits; @@ -322,10 +322,10 @@ begin address_of (option_index)); if getopt_return_val = -1 then begin do_nothing; - + end else if getopt_return_val = '?' then begin usage ('pktype'); - + end else if argument_is ('help') then begin usage_help (PKTYPE_HELP, nil); diff --git a/Build/source/texk/web2c/pltotf.ch b/Build/source/texk/web2c/pltotf.ch index f51d6859baf..de2951933e6 100644 --- a/Build/source/texk/web2c/pltotf.ch +++ b/Build/source/texk/web2c/pltotf.ch @@ -115,7 +115,7 @@ if verbose then @; % [118] Change the name of the variable `class', since AIX 3.1's % defines a function by that name. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @d pending=4 {$f(x,y)$ is being evaluated} @y @@ -126,24 +126,24 @@ if verbose then @; % [123] web2c can't handle these mutually recursive procedures. % But let's do a fake definition of f here, so that it gets into web2c's % symbol table... -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @p function f(@!h,@!x,@!y:indx):indx; forward;@t\2@> {compute $f$ for arguments known to be in |hash[h]|} @y -@p -ifdef('notdef') +@p +ifdef('notdef') function f(@!h,@!x,@!y:indx):indx; begin end;@t\2@> {compute $f$ for arguments known to be in |hash[h]|} endif('notdef') @z % [124] ... and then really define it now. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @p function f; @y -@p function f(@!h,@!x,@!y:indx):indx; +@p function f(@!h,@!x,@!y:indx):indx; @z @x [127] Fix up output of bytes. @@ -188,7 +188,7 @@ begin if fabs(x/design_units)>=16.0 then while label_table[sort_ptr].rr>intcast(char_remainder[c]) do @z -@x [147] Be quiet unless verbose. +@x [147] Be quiet unless verbose. read_input; print_ln('.');@/ @y read_input; @@ -243,7 +243,7 @@ begin write_ln (stderr, 'pltotf: Need one or two file arguments.'); usage ('pltotf'); end; - + pl_name := extend_filename (cmdline (optind), 'pl'); {If an explicit output filename isn't given, construct it from |pl_name|.} @@ -284,7 +284,7 @@ long_options[current_option].flag := address_of (verbose); long_options[current_option].val := 1; incr (current_option); -@ +@ @ = @!verbose: c_int_type; diff --git a/Build/source/texk/web2c/pooltype.ch b/Build/source/texk/web2c/pooltype.ch index 85849a3efa4..0af0b00774e 100644 --- a/Build/source/texk/web2c/pooltype.ch +++ b/Build/source/texk/web2c/pooltype.ch @@ -12,11 +12,11 @@ \def\title{POOL\lowercase{type} changes for C} @z -@x [2] main program changes: no global labels, read command line. +@x [2] main program changes: no global labels, read command line. label 9999; {this labels the end of the program} @y @z -@x +@x procedure initialize; {this procedure gets things started properly} var @@; begin @@/ @@ -33,7 +33,7 @@ procedure initialize; {this procedure gets things started properly} % [??] 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} @y @@ -113,10 +113,10 @@ begin address_of (option_index)); if getopt_return_val = -1 then begin do_nothing; - + end else if getopt_return_val = '?' then begin usage ('pooltype'); - + end else if argument_is ('help') then begin usage_help (POOLTYPE_HELP, nil); @@ -137,7 +137,7 @@ begin pool_name := extend_filename (cmdline (optind), 'pool'); {Try opening the file here, to avoid printing the first 256 strings if they give a bad filename.} - resetbin (pool_file, pool_name); + resetbin (pool_file, pool_name); end; @ Here are the options we allow. The first is one of the standard GNU options. diff --git a/Build/source/texk/web2c/ptexdir/lib/Makefile.in b/Build/source/texk/web2c/ptexdir/lib/Makefile.in index 8e19fcc33fb..309fa315209 100644 --- a/Build/source/texk/web2c/ptexdir/lib/Makefile.in +++ b/Build/source/texk/web2c/ptexdir/lib/Makefile.in @@ -173,7 +173,6 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ -LUATANGLE = @LUATANGLE@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ diff --git a/Build/source/texk/web2c/tangle.ch b/Build/source/texk/web2c/tangle.ch index 3771e2a1107..3b8c24b819e 100644 --- a/Build/source/texk/web2c/tangle.ch +++ b/Build/source/texk/web2c/tangle.ch @@ -104,10 +104,10 @@ procedure initialize; @!def_unambig_length=32; {identifiers must be unique if chopped to this length} @z -% [??] The text_char type is used as an array index into xord. The -% default type `char' produces signed integers, which are bad array +% [12] The text_char type is used as an array index into xord. The +% default type `char' may produce signed integers, which are bad array % indices in C. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @d text_char == char {the data type of characters in text files} @y @@ -185,7 +185,7 @@ rewrite (Pascal_file, pascal_name); begin while not eoln(f) do vgetc(f); @z -@x [35] Fix `jump_out'. +@x [34] Fix `jump_out'. @d fatal_error(#)==begin new_line; print(#); error; mark_fatal; jump_out; end @@ -195,7 +195,7 @@ begin goto end_of_TANGLE; end; @y @d jump_out==uexit(1) -@d fatal_error(#)==begin new_line; write(stderr, #); +@d fatal_error(#)==begin new_line; write(stderr, #); error; mark_fatal; uexit(1); end @z @@ -672,7 +672,7 @@ begin 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 ('tangle'); @@ -716,13 +716,13 @@ begin write_ln (stderr, 'tangle: Need one or two file arguments.'); usage ('tangle'); end; - + {Supply |".web"| and |".ch"| extensions if necessary.} web_name := extend_filename (cmdline (optind), 'web'); if optind + 2 = argc then begin chg_name := extend_filename (cmdline (optind + 1), 'ch'); end; - + {Change |".web"| to |".p"| and use the current directory.} pascal_name := basename_change_suffix (web_name, '.web', '.p'); end; diff --git a/Build/source/texk/web2c/tex.ch b/Build/source/texk/web2c/tex.ch index 4ad5d22d56d..ab2b915e9d4 100644 --- a/Build/source/texk/web2c/tex.ch +++ b/Build/source/texk/web2c/tex.ch @@ -45,7 +45,7 @@ % "mltex.ch", "char_sub.ch", or "charsub.ch". % % Except for MLTeX, the new code in this file is in the public domain. -% +% % The module numbers in this change file refer to TEX.WEB 3.14159 as % of March, 1995 (published as Donald E. Knuth, TeX: The Program, % Volume B of Computers & Typesetting). @@ -372,7 +372,7 @@ for i:=@'177 to @'377 do xchr[i]:=i; for i:=0 to 255 do mubyte_read[i]:=null; for i:=0 to 255 do mubyte_write[i]:=0; for i:=0 to 128 do mubyte_cswrite[i]:=null; -mubyte_keep := 0; mubyte_start := false; +mubyte_keep := 0; mubyte_start := false; write_noexpanding := false; cs_converting := false; special_printing := false; message_printing := false; no_convert := false; active_noconvert := false; @@ -1161,7 +1161,7 @@ else begin if (font(p)>font_max) then print_char("*") % can not be translated. For example, messages printed by |print_mode| % from [16.211] use different word order and [46.1049] use different % word order and words are declined. -@x [16.211] l.4256 +@x [16.211] l.4256 begin if m>0 then case m div (max_command+1) of 0:print("vertical"); @@ -1228,7 +1228,7 @@ page_depth:=0; page_max_depth:=0; print_int(nest[p].pg_field); print(" line"); if nest[p].pg_field<>1 then print_char("s"); @y - print_int(nest[p].pg_field); + print_int(nest[p].pg_field); if nest[p].pg_field<>1 then print(" lines") else print(" line"); @z @@ -1551,7 +1551,7 @@ end; @x [18.266] - encTeX: \endmubyte primitive end_cs_name: print_esc("endcsname"); @y -end_cs_name: if chr_code = 10 then print_esc("endmubyte") +end_cs_name: if chr_code = 10 then print_esc("endmubyte") else print_esc("endcsname"); @z @@ -1716,7 +1716,7 @@ var k:0..buf_size; {an index into |buffer|} { Use |k| instead of |loc| for type correctness. } k := loc; cur_chr := read_buffer (k); - loc := k; incr (loc); + loc := k; incr (loc); if (mubyte_token > 0) then begin state := mid_line; @@ -1734,7 +1734,7 @@ else begin start_cs: cur_chr := read_buffer (k); cat := cat_code (cur_chr); if (mubyte_in>0) and (not mubyte_incs) and ((mubyte_skip>0) or (cur_chr<>buffer[k])) then mubyte_incs := true; - incr (k); + incr (k); if mubyte_token > 0 then begin state := mid_line; @@ -1776,17 +1776,17 @@ if k>loc+1 then {multiletter control sequence has been scanned} end; end @y -begin +begin repeat cur_chr := read_buffer (k); cat := cat_code (cur_chr); if mubyte_token>0 then cat := escape; if (mubyte_in>0) and (not mubyte_incs) and (cat=letter) and ((mubyte_skip>0) or (cur_chr<>buffer[k])) then mubyte_incs := true; incr (k); until (cat <> letter) or (k > limit); - @; - if cat <> letter then - begin - decr (k); k := k - mubyte_skip; + @; + if cat <> letter then + begin + decr (k); k := k - mubyte_skip; end; if k > loc + 1 then { multiletter control sequence has been scanned } begin @@ -2477,7 +2477,7 @@ if name=str_ptr-1 then {we can try to conserve string pool space now} begin job_name:=get_job_name(cur_name); open_log_file; @z -@x [29.537] l.10356 - +@x [29.537] l.10356 - if term_offset+length(name)>max_print_line-2 then print_ln else if (term_offset>0)or(file_offset>0) then print_char(" "); print_char("("); incr(open_parens); slow_print(name); update_terminal; @@ -2957,7 +2957,7 @@ endifn ('IPC') print(" ("); print_int(total_pages); print(" page"); if total_pages<>1 then print_char("s"); @y - print(" ("); print_int(total_pages); + print(" ("); print_int(total_pages); if total_pages<>1 then print(" pages") else print(" page"); @z @@ -3211,7 +3211,7 @@ done: @z %%%%%%%% dynamic hyph_size -@x 18245 m.934 +@x 18245 m.934 @!s,@!t:str_number; {strings being compared or stored} @y @!s:str_number; {strings being compared or stored} @@ -3613,7 +3613,7 @@ begin print_err("Extra "); print_esc("endcsname"); help1("I'm ignoring this, since I wasn't doing a \csname."); @y begin -if cur_chr = 10 then +if cur_chr = 10 then begin print_err("Extra "); print_esc("endmubyte"); @.Extra \\endmubyte@> @@ -3622,7 +3622,7 @@ end else begin print_err("Extra "); print_esc("endcsname"); @.Extra \\endcsname@> help1("I'm ignoring this, since I wasn't doing a \csname."); -end; +end; @z @x [48.1139] l.21650 - source specials @@ -3678,7 +3678,7 @@ end; @x [49.1220] - encTeX: \mubyte primitive let: if chr_code<>normal then print_esc("futurelet")@+else print_esc("let"); @y -let: if chr_code<>normal then +let: if chr_code<>normal then if chr_code = normal+10 then print_esc("mubyte") else if chr_code = normal+11 then print_esc("noconvert") else print_esc("futurelet") @@ -3688,10 +3688,10 @@ let: if chr_code<>normal then @x [49.1221] - encTeX: \mubyte primitive let: begin n:=cur_chr; @y -let: if cur_chr = normal+11 then do_nothing { noconvert primitive } +let: if cur_chr = normal+11 then do_nothing { noconvert primitive } else if cur_chr = normal+10 then { mubyte primitive } begin - selector:=term_and_log; + selector:=term_and_log; get_token; mubyte_stoken := cur_tok; if cur_tok <= cs_token_flag then mubyte_stoken := cur_tok mod 256; @@ -3707,10 +3707,10 @@ let: if cur_chr = normal+11 then do_nothing { noconvert primitive } mubyte_tableout := true; mubyte_tablein := false; get_x_token; end; - end else if (mubyte_stoken > cs_token_flag) and - (cur_cmd = mac_param) then + end else if (mubyte_stoken > cs_token_flag) and + (cur_cmd = mac_param) then begin - mubyte_tableout := false; + mubyte_tableout := false; scan_int; mubyte_prefix := cur_val; get_x_token; if mubyte_prefix > 50 then mubyte_prefix := 52; if mubyte_prefix <= 0 then mubyte_prefix := 51; @@ -3732,25 +3732,25 @@ let: if cur_chr = normal+11 then do_nothing { noconvert primitive } p := link(r); if (p = null) and mubyte_tablein then begin - print_err("The empty , "); + print_err("The empty , "); print_esc("mubyte"); print(" ignored"); help2("The in")@/ ("\mubyte \endmubyte should not be empty."); error; - end else begin - while p <> null do - begin + end else begin + while p <> null do + begin append_char (info(p) mod 256); p := link (p); end; flush_list (r); - if (str_start [str_ptr] + 1 = pool_ptr) and + if (str_start [str_ptr] + 1 = pool_ptr) and (str_pool [pool_ptr-1] = mubyte_stoken) then begin - if mubyte_read [mubyte_stoken] <> null + if mubyte_read [mubyte_stoken] <> null and mubyte_tablein then { clearing data } dispose_munode (mubyte_read [mubyte_stoken]); - if mubyte_tablein then mubyte_read [mubyte_stoken] := null; + if mubyte_tablein then mubyte_read [mubyte_stoken] := null; if mubyte_tableout then mubyte_write [mubyte_stoken] := 0; pool_ptr := str_start [str_ptr]; end else begin @@ -3765,18 +3765,18 @@ let: if cur_chr = normal+11 then do_nothing { noconvert primitive } r := mubyte_cswrite[(mubyte_stoken-cs_token_flag) mod 128]; p := get_avail; mubyte_cswrite[(mubyte_stoken-cs_token_flag) mod 128] := p; - info (p) := mubyte_stoken-cs_token_flag; - link (p) := get_avail; - p := link (p); + info (p) := mubyte_stoken-cs_token_flag; + link (p) := get_avail; + p := link (p); if mubyte_relax then begin info (p) := 0; pool_ptr := str_start [str_ptr]; - end else info (p) := slow_make_string; + end else info (p) := slow_make_string; link (p) := r; end; end else begin { single character } if str_start [str_ptr] = pool_ptr then mubyte_write [mubyte_stoken] := 0 - else + else mubyte_write [mubyte_stoken] := slow_make_string; end; end else pool_ptr := str_start [str_ptr]; @@ -3864,11 +3864,11 @@ def_code: if chr_code=xord_code_base then print_esc("xordcode") p:=cur_chr; scan_char_num; p:=p+cur_val; scan_optional_equals; scan_int; @y - p:=cur_chr; scan_char_num; + p:=cur_chr; scan_char_num; if p=xord_code_base then p:=cur_val else if p=xchr_code_base then p:=cur_val+256 else if p=xprn_code_base then p:=cur_val+512 - else p:=p+cur_val; + else p:=p+cur_val; scan_optional_equals; scan_int; @z @@ -3950,9 +3950,9 @@ old_setting:=selector; selector:=new_string; token_show(def_ref); selector:=old_setting; @y old_setting:=selector; selector:=new_string; -message_printing := true; active_noconvert := true; -token_show(def_ref); -message_printing := false; active_noconvert := false; +message_printing := true; active_noconvert := true; +token_show(def_ref); +message_printing := false; active_noconvert := false; selector:=old_setting; @z @@ -4627,7 +4627,7 @@ if (x<>69069)or feof(fmt_file) then goto bad_fmt @z % Eliminate probably wrong word `preloaded' from format_idents. -@x [50.1328] l.24124 +@x [50.1328] l.24124 print(" (preloaded format="); print(job_name); print_char(" "); @y print(" (format="); print(job_name); print_char(" "); @@ -4954,7 +4954,7 @@ write_stream(tail):=cur_val; @y write_stream(tail):=cur_val; if mubyte_out + mubyte_zero < 0 then write_mubyte(tail) := 0 -else if mubyte_out + mubyte_zero >= 2*mubyte_zero then +else if mubyte_out + mubyte_zero >= 2*mubyte_zero then write_mubyte(tail) := 2*mubyte_zero - 1 else write_mubyte(tail) := mubyte_out + mubyte_zero; @z @@ -5532,7 +5532,7 @@ for cycles in all character substitution definitions. @ This outputs the accent and the base character given in the substitution. It uses code virtually identical to the |make_accent| procedure, but without the node creation steps. - + Additionally if the accent character has to be shifted vertically it does {\it not\/} create the same code. The original routine in |make_accent| and former versions of ML\TeX{} creates a box node @@ -5632,16 +5632,16 @@ this tree is token list with n+1 tokens (first token consist the byte from the byte sequence itself and the other tokens point to the branches). If you travel from root of the tree to a leaf then you find exactly one byte sequence which we have to convert to one byte or -control sequence. There are two variants of the leaf: the ``definitive +control sequence. There are two variants of the leaf: the ``definitive end'' or the ``middle leaf'' if a longer byte sequence exists and the mubyte tree continues under this leaf. First variant is implemented as one memory word where the link part includes the token to which we have to convert and type part includes the number 60 (normal -conversion) or 1..52 (insert the control sequence). +conversion) or 1..52 (insert the control sequence). The second variant of ``middle leaf'' is implemented as two memory words: first one has a type advanced by 64 and link points to the second word where info part includes the token to which we have to convert -and link points to the next token list with the branches of +and link points to the next token list with the branches of the subtree. The inverse: one byte to multi byte (for log printing and \.{\\write} @@ -5649,7 +5649,7 @@ printing) is implemented via a pool. Each multibyte sequence is stored in a pool as a string and |mubyte_write|[{\it printed char\/}] points to this string. -@d new_mubyte_node == +@d new_mubyte_node == link (p) := get_avail; p := link (p); info (p) := get_avail; p := info (p) @d subinfo (#) == subtype (#) @@ -5657,12 +5657,12 @@ to this string. { read |buffer|[|i|] and convert multibyte. |i| should have been of type 0..|buf_size|, but web2c doesn't like that construct in argument lists. } -function read_buffer(var i:integer):ASCII_code; +function read_buffer(var i:integer):ASCII_code; var p: pointer; last_found: integer; last_type: integer; begin - mubyte_skip := 0; mubyte_token := 0; + mubyte_skip := 0; mubyte_token := 0; read_buffer := buffer[i]; if mubyte_in = 0 then begin @@ -5683,7 +5683,7 @@ begin end; restart: mubyte_start := false; - if (mubyte_read [buffer[i]] = null) or (mubyte_keep > 0) then + if (mubyte_read [buffer[i]] = null) or (mubyte_keep > 0) then begin if mubyte_keep > 0 then decr (mubyte_keep); return ; @@ -5693,9 +5693,9 @@ continue: if type (p) >= 64 then begin last_type := type (p) - 64; - p := link (p); + p := link (p); mubyte_token := info (p); last_found := mubyte_skip; - end else if type (p) > 0 then + end else if type (p) > 0 then begin last_type := type (p); mubyte_token := link (p); @@ -5722,7 +5722,7 @@ continue: found: if mubyte_token < 256 then { multibyte to one byte } begin - read_buffer := mubyte_token; mubyte_token := 0; + read_buffer := mubyte_token; mubyte_token := 0; i := i + mubyte_skip; if mubyte_start and (i >= start) then mubyte_start := false; return; @@ -5735,7 +5735,7 @@ found: if i < start then mubyte_start := true; if last_type = 52 then mubyte_keep := 10000; if last_type = 51 then mubyte_keep := mubyte_skip + 1; - mubyte_skip := -1; + mubyte_skip := -1; end; if mubyte_start and (i >= start) then mubyte_start := false; return; @@ -5752,7 +5752,7 @@ begin j := str_start [str_ptr]; if mubyte_read [so(str_pool[j])] = null then begin - in_mutree := 0; + in_mutree := 0; p := get_avail; mubyte_read [so(str_pool[j])] := p; subinfo (p) := so(str_pool[j]); type (p) := 0; @@ -5761,17 +5761,17 @@ begin p := mubyte_read [so(str_pool[j])]; end; incr (j); - while j < pool_ptr do + while j < pool_ptr do begin - if in_mutree = 0 then + if in_mutree = 0 then begin new_mubyte_node; subinfo (p) := so(str_pool[j]); type (p) := 0; end else { |in_mutree| = 1 } - if (type (p) > 0) and (type (p) < 64) then + if (type (p) > 0) and (type (p) < 64) then begin type (p) := type (p) + 64; - q := link (p); link (p) := get_avail; p := link (p); - info (p) := q; + q := link (p); link (p) := get_avail; p := link (p); + info (p) := q; new_mubyte_node; subinfo (p) := so(str_pool[j]); type (p) := 0; in_mutree := 0; end else begin @@ -5780,14 +5780,14 @@ begin p := link (p); if subinfo (info(p)) = so(str_pool[j]) then begin - p := info (p); + p := info (p); goto continue; end; until link (p) = null; new_mubyte_node; subinfo (p) := so(str_pool[j]); type (p) := 0; in_mutree := 0; end; -continue: +continue: incr (j); end; if in_mutree = 1 then @@ -5797,7 +5797,7 @@ continue: type (p) := mubyte_prefix + 64; q := link (p); link (p) := get_avail; p := link (p); link (p) := q; info (p) := mubyte_stoken; - return; + return; end; if type (p) >= 64 then begin @@ -5827,7 +5827,7 @@ begin free_avail (p); p := q; end; - end; + end; end; @# procedure dispose_mutableout (cs: pointer); { frees record from out table } @@ -5840,9 +5840,9 @@ begin begin if r <> null then link (r) := link (link (p)) else mubyte_cswrite[cs mod 128] := link (link (p)); - q := link (link(p)); + q := link (link(p)); free_avail (link(p)); free_avail (p); - p := q; + p := q; end else begin r := link (p); p := link (r); end; diff --git a/Build/source/texk/web2c/tftopl.ch b/Build/source/texk/web2c/tftopl.ch index f0f7986cb37..0ce10dfb43b 100644 --- a/Build/source/texk/web2c/tftopl.ch +++ b/Build/source/texk/web2c/tftopl.ch @@ -1,5 +1,5 @@ % tftopl.ch for C compilation with web2c. -% +% % 04/04/83 (PC) Original version, made to work with version 1.0 of TFtoPL, % released with version 0.96 of TeX in February, 1983. % 04/16/83 (PC) Brought up to version 1.0 released with version 0.97 of TeX @@ -176,7 +176,7 @@ MBL_string:=' MBL'; RI_string:=' RI '; RCE_string:=' RCE'; @z % [38] How we output the character code depends on |charcode_format|. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x begin if font_type>vanilla then begin tfm[0]:=c; out_octal(0,1) @@ -206,7 +206,7 @@ else begin tfm[0]:=c; out_octal(0,1); @z % [39] Don't output the face code as an integer. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x out(MBL_string[1+(b mod 3)]); out(RI_string[1+s]); @@ -224,7 +224,7 @@ f:=((tfm[k+1] mod 16)*intcast(@'400)+tfm[k+2])*@'400+tfm[k+3]; @z % [78] No progress reports unless verbose. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x incr(chars_on_line); end; @@ -237,17 +237,17 @@ f:=((tfm[k+1] mod 16)*intcast(@'400)+tfm[k+2])*@'400+tfm[k+3]; % [89] Change the name of the variable `class', since AIX 3.1's % defines a function by that name. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @d pending=4 {$f(x,y)$ is being evaluated} @y @d pending=4 {$f(x,y)$ is being evaluated} -@d class == class_var +@d class == class_var @z % [90] Change name of the function `f'. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x r:=f(r,(hash[r]-1)div 256,(hash[r]-1)mod 256); @y @@ -262,8 +262,8 @@ f:=((tfm[k+1] mod 16)*intcast(@'400)+tfm[k+2])*@'400+tfm[k+3]; @p function f(@!h,@!x,@!y:index):index; forward;@t\2@> {compute $f$ for arguments known to be in |hash[h]|} @y -@p -ifdef('notdef') +@p +ifdef('notdef') function f_fn(@!h,@!x,@!y:index):index; begin end;@t\2@> {compute $f$ for arguments known to be in |hash[h]|} endif('notdef') @@ -275,11 +275,11 @@ else eval:=f_fn(h,x,y); @z % [95] The real definition of f. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @p function f; @y -@p function f_fn(@!h,@!x,@!y:index):index; +@p function f_fn(@!h,@!x,@!y:index):index; @z @x f:=lig_z[h]; @@ -288,7 +288,7 @@ f_fn:=lig_z[h]; @z % [99] No final newline unless verbose. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x do_characters; print_ln('.');@/ @y diff --git a/Build/source/texk/web2c/vftovp.ch b/Build/source/texk/web2c/vftovp.ch index 026e8ef6d28..472327300aa 100644 --- a/Build/source/texk/web2c/vftovp.ch +++ b/Build/source/texk/web2c/vftovp.ch @@ -127,7 +127,7 @@ end; % [25] Both nl and lig_size are in words, so the multiplication is not % needed. Found by "C.M. Connelly" and % Melissa O'Neill -@x +@x if nl>4*lig_size then @y if nl>lig_size then @@ -392,8 +392,8 @@ f:=((tfm[k+1] mod 16)*intcast(@'400)+tfm[k+2])*@'400+tfm[k+3]; @p function f(@!h,@!x,@!y:index):index; forward;@t\2@> {compute $f$ for arguments known to be in |hash[h]|} @y -@p -ifdef('notdef') +@p +ifdef('notdef') function lig_f(@!h,@!x,@!y:index):index; begin end;@t\2@> {compute $f$ for arguments known to be in |hash[h]|} endif('notdef') @@ -569,7 +569,7 @@ begin {Now |optind| is the index of first non-option on the command line. We must have one two three remaining arguments.} - if (optind + 1 <> argc) and (optind + 2 <> argc) + if (optind + 1 <> argc) and (optind + 2 <> argc) and (optind + 3 <> argc) then begin print_ln ('vftovp: Need one to three file arguments.'); usage ('vftovp'); diff --git a/Build/source/texk/web2c/vptovf.ch b/Build/source/texk/web2c/vptovf.ch index 7455ab58892..3e558952d62 100644 --- a/Build/source/texk/web2c/vptovf.ch +++ b/Build/source/texk/web2c/vptovf.ch @@ -85,7 +85,7 @@ rewritebin (tfm_file, tfm_name); % [89] `index' is not a good choice for an identifier on Unix systems. % Neither is `class', on AIX. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x |k|th element of its list. @y @@ -116,8 +116,8 @@ if verbose then @; @p function f(@!h,@!x,@!y:indx):indx; forward;@t\2@> {compute $f$ for arguments known to be in |hash[h]|} @y -@p -ifdef('notdef') +@p +ifdef('notdef') function f(@!h,@!x,@!y:indx):indx; begin end;@t\2@> {compute $f$ for arguments known to be in |hash[h]|} endif('notdef') @@ -126,7 +126,7 @@ endif('notdef') @x [153] Finish fixing up f. @p function f; @y -@p function f(@!h,@!x,@!y:indx):indx; +@p function f(@!h,@!x,@!y:indx):indx; @z @x [156] Change TFM-byte output to fix ranges. @@ -165,7 +165,7 @@ begin if fabs(x/design_units)>=16.0 then % [141] char_remainder[c] is unsigned, and label_table[sort_ptr].rr % might be -1, and if -1 is coerced to being unsigned, it will be bigger % than anything else. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x while label_table[sort_ptr].rr>char_remainder[c] do @y @@ -178,7 +178,7 @@ begin if fabs(x/design_units)>=16.0 then @d vout(#)==putbyte(#,vf_file) @z -@x [181] Be quiet unless verbose. +@x [181] Be quiet unless verbose. read_input; print_ln('.');@/ @y read_input; @@ -214,7 +214,7 @@ begin 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 ('vptovf'); {|getopt| has already given an error message.} @@ -229,7 +229,7 @@ begin {Now |optind| is the index of first non-option on the command line. We must have one to three remaining arguments.} - if (optind + 1 <> argc) and (optind + 2 <> argc) + if (optind + 1 <> argc) and (optind + 2 <> argc) and (optind + 3 <> argc) then begin write_ln (stderr, 'vptovf: Need one to three file arguments.'); usage ('vptovf'); diff --git a/Build/source/texk/web2c/weave.ch b/Build/source/texk/web2c/weave.ch index 15372d2bae8..3b2fe2beeed 100644 --- a/Build/source/texk/web2c/weave.ch +++ b/Build/source/texk/web2c/weave.ch @@ -115,7 +115,7 @@ procedure initialize; % [??] 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} @y @@ -358,7 +358,7 @@ begin 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 ('weave'); @@ -376,13 +376,13 @@ begin write_ln (stderr, 'weave: Need one or two file arguments.'); usage ('weave'); end; - + {Supply |".web"| and |".ch"| extensions if necessary.} web_name := extend_filename (cmdline (optind), 'web'); if optind + 2 = argc then begin chg_name := extend_filename (cmdline (optind + 1), 'ch'); end; - + {Change |".web"| to |".tex"| and use the current directory.} tex_name := basename_change_suffix (web_name, '.web', '.tex'); end; diff --git a/Build/source/texk/web2c/window/Makefile.in b/Build/source/texk/web2c/window/Makefile.in index 3d62489ca9d..30618880f33 100644 --- a/Build/source/texk/web2c/window/Makefile.in +++ b/Build/source/texk/web2c/window/Makefile.in @@ -182,7 +182,6 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ -LUATANGLE = @LUATANGLE@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ -- cgit v1.2.3