summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-09-30 13:10:51 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-09-30 13:10:51 +0000
commitbe62200a7e0420b4a11f6cbca5848f9ea5666c93 (patch)
tree71d315b3230fc0f130283e561c4102cd710a7c84 /Build/source/texk/web2c
parent0d9a0376342fe0ee6c449616daee87f07e09dfb1 (diff)
TeX&Co: bug fix for unititialized line number
also add a test cases for e-TeX and pdfTeX git-svn-id: svn://tug.org/texlive/trunk@24155 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r--Build/source/texk/web2c/ChangeLog4
-rw-r--r--Build/source/texk/web2c/Makefile.in46
-rw-r--r--Build/source/texk/web2c/alephdir/ChangeLog7
-rw-r--r--Build/source/texk/web2c/alephdir/com16bit.ch2
-rw-r--r--Build/source/texk/web2c/alephdir/eobase.ch7
-rw-r--r--Build/source/texk/web2c/etexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/etexdir/am/etex.am7
-rw-r--r--Build/source/texk/web2c/etexdir/etex.ch7
-rwxr-xr-xBuild/source/texk/web2c/etexdir/wprob.test14
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog7
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/inputstack.w9
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/printing.w2
-rw-r--r--Build/source/texk/web2c/pdftexdir/am/pdftex.am6
-rwxr-xr-xBuild/source/texk/web2c/pdftexdir/wprob.test14
-rw-r--r--Build/source/texk/web2c/tests/wprob.tex15
-rw-r--r--Build/source/texk/web2c/tex.ch2
16 files changed, 114 insertions, 39 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index 97ed7ab8c10..ff47e0ed62e 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,7 @@
+2011-09-30 Peter Breitenlohner <peb@mp.mpg.de>
+
+ * tex.ch (print_file_line): Bug fix: avoid uninitialized lineno.
+
2011-09-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* texmfmp-help.h: The option -kanji-internal=STRING is effective
diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in
index 9722f286359..084ce57eb00 100644
--- a/Build/source/texk/web2c/Makefile.in
+++ b/Build/source/texk/web2c/Makefile.in
@@ -1343,6 +1343,10 @@ nodist_man_MANS =
EXTRA_LIBRARIES = libmf.a libmplib.a libkanji.a libukanji.a \
libpdftex.a liblua51.a libluasocket.a libluamisc.a libff.a \
libluatex.a libxetex.a libxetexmm.a libmd5.a
+
+# wprob.test
+
+# wprob.test
EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \
triptrap-sh tangle.web tangle.ch tangleboot.pin cwebdir \
ctangleboot.cin cwebboot.cin cwebboot.hin tangle.test \
@@ -1389,19 +1393,19 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \
mplibdir/ChangeLog $(mpost_web) $(mp_tests) $(libmplib_web) \
mplibdir/lmplib.c $(etex_web_srcs) $(etex_ch_srcs) \
etexdir/ChangeLog etexdir/INSTALL etexdir/README \
- etexdir/etex_gen.tex $(etex_tests) etexdir/etrip/etrip.diffs \
- etexdir/etrip/etrip.fot etexdir/etrip/etrip.log \
- etexdir/etrip/etrip.out etexdir/etrip/etrip.pl \
- etexdir/etrip/etrip.tex etexdir/etrip/etrip.typ \
- etexdir/etrip/etrip1.in etexdir/etrip/etrip2.in \
- etexdir/etrip/etrip3.in etexdir/etrip/etripin.log \
- etexdir/etrip/etripman.tex etexdir/etrip/texmf.cnf \
- etexdir/etrip/trip2.in $(ptex_tests) $(pweb_tests) \
- $(ptex_web_srcs) $(ptex_ch_srcs) ptexdir/ptex.defines \
- 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 \
+ etexdir/etex_gen.tex $(etex_tests) tests/wprob.tex \
+ etexdir/etrip/etrip.diffs etexdir/etrip/etrip.fot \
+ etexdir/etrip/etrip.log etexdir/etrip/etrip.out \
+ etexdir/etrip/etrip.pl etexdir/etrip/etrip.tex \
+ etexdir/etrip/etrip.typ etexdir/etrip/etrip1.in \
+ etexdir/etrip/etrip2.in etexdir/etrip/etrip3.in \
+ etexdir/etrip/etripin.log etexdir/etrip/etripman.tex \
+ etexdir/etrip/texmf.cnf etexdir/etrip/trip2.in $(ptex_tests) \
+ $(pweb_tests) $(ptex_web_srcs) $(ptex_ch_srcs) \
+ ptexdir/ptex.defines 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 \
ptexdir/tests/nissya_bib.aux ptexdir/tests/nissya.bst \
ptexdir/tests/sample.bib tests/memdata1.bst tests/memdata2.bst \
tests/memdata3.bst ptexdir/tests/goth10.tfm \
@@ -1427,7 +1431,7 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \
euptexdir/euptrip/texmf.cnf $(pdftex_ch_srcs) etexdir/etex.ch \
pdftexdir/pdftex.defines pdftexdir/pdftex.h \
pdftexdir/ChangeLog pdftexdir/NEWS pdftexdir/README \
- pdftexdir/change-files.txt $(pdftex_tests) \
+ pdftexdir/change-files.txt $(pdftex_tests) tests/wprob.tex \
pdftexdir/regex/COPYING.LIB pdftexdir/regex/README \
$(pdftosrc_tests) pdftexdir/tests/test-13.pdf \
pdftexdir/tests/test-13.xref pdftexdir/tests/test-15.pdf \
@@ -1597,8 +1601,8 @@ DISTCLEANFILES = $(EXTRA_LIBRARIES) tangle.c tangle.h tangle.p \
tests/xptmr.mpx tests/xstory.mpx $(nodist_libmplib_a_SOURCES) \
mp-tangle mpmath-tangle psout-tangle svgout-tangle \
$(nodist_etex_SOURCES) etex.web etex.ch etex-web2c etex.p \
- etex.pool etex-tangle etrip.diffs $(pweb_programs:=.c) \
- $(pweb_programs:=.h) $(pweb_programs:=.p) \
+ etex.pool etex-tangle etrip.diffs wprob.log wprob.tex \
+ $(pweb_programs:=.c) $(pweb_programs:=.h) $(pweb_programs:=.p) \
$(pweb_programs:=-web2c) $(pweb_programs:=.web) \
$(nodist_ptex_SOURCES) ptex.web ptex.ch ptex-web2c ptex.p \
ptex.pool ptex-tangle tests/nissya_bib.* tests/xexampl.aux \
@@ -1616,8 +1620,9 @@ DISTCLEANFILES = $(EXTRA_LIBRARIES) tangle.c tangle.h tangle.p \
$(nodist_euptex_SOURCES) euptex.web euptex.ch euptex-web2c \
euptex.p euptex.pool euptex-tangle euptrip.diffs \
$(nodist_pdftex_SOURCES) pdftex.ch pdftex-web2c pdftex.p \
- pdftex.pool pdftex-tangle test-13.pdf test-13.xref test-15.pdf \
- test-15.xref $(nodist_libluatex_a_SOURCES) txt2zlib.c \
+ pdftex.pool pdftex-tangle wprob.log wprob.tex test-13.pdf \
+ test-13.xref test-15.pdf test-15.xref \
+ $(nodist_libluatex_a_SOURCES) txt2zlib.c \
$(nodist_xetex_SOURCES) xetex.web xetex-web2c xetex.p \
xetex.pool xetex-tangle $(omegaware_programs:=.c) \
$(omegaware_programs:=.h) $(omegaware_programs:=.p) \
@@ -1833,7 +1838,7 @@ etex_ch_srcs = \
# e-TeX Tests
#
-etex_tests = etexdir/etrip.test
+etex_tests = etexdir/wprob.test etexdir/etrip.test
ptex_cppflags = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS)
ptex_ldadd = libkanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD)
ptex_dependencies = libkanji.a $(pproglib) $(PTEXENC_DEPEND) $(default_dependencies)
@@ -2080,7 +2085,7 @@ pdftex_ch_srcs = \
# pdfTeX Tests
#
-pdftex_tests = pdftexdir/pdftex.test
+pdftex_tests = pdftexdir/wprob.test pdftexdir/pdftex.test
libpdftex_a_CPPFLAGS = $(pdftex_cppflags)
libpdftex_a_CXXFLAGS = # $(WARNING_CXXFLAGS)
libpdftex_a_SOURCES = pdftexdir/avl.c pdftexdir/avl.h \
@@ -9671,7 +9676,6 @@ etex.web: tie$(EXEEXT) $(etex_web_srcs)
# Generate etex.ch
etex.ch: tie$(EXEEXT) etex.web $(etex_ch_srcs)
$(tie) -c etex.ch etex.web $(etex_ch_srcs)
-
# etrip.test
etrip.diffs: etex$(EXEEXT)
$(triptrap_diffs) $@
diff --git a/Build/source/texk/web2c/alephdir/ChangeLog b/Build/source/texk/web2c/alephdir/ChangeLog
index 451bdd0e605..dd148a799b5 100644
--- a/Build/source/texk/web2c/alephdir/ChangeLog
+++ b/Build/source/texk/web2c/alephdir/ChangeLog
@@ -1,3 +1,10 @@
+2011-09-30 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * com16bit.ch.ch (print_file_line): Bug fix: avoid uninitialized
+ lineno - from ../tex.ch.
+ * eobase.ch: Slightly reformulate printing of current line -
+ from ../etexdir/etex.ch.
+
2011-09-09 Peter Breitenlohner <peb@mppmu.mpg.de>
* alephbis.c (runexternalocp): Declare tempenv as const.
diff --git a/Build/source/texk/web2c/alephdir/com16bit.ch b/Build/source/texk/web2c/alephdir/com16bit.ch
index b84d520013c..a519182f973 100644
--- a/Build/source/texk/web2c/alephdir/com16bit.ch
+++ b/Build/source/texk/web2c/alephdir/com16bit.ch
@@ -2784,7 +2784,7 @@ begin
else begin
print_nl (""); print (full_source_filename_stack[level]); print (":");
if level=in_open then print_int (line)
- else print_int (line_stack[index+1-(in_open-level)]);
+ else print_int (line_stack[level+1]);
print (": ");
end;
end;
diff --git a/Build/source/texk/web2c/alephdir/eobase.ch b/Build/source/texk/web2c/alephdir/eobase.ch
index 391b9beb3ac..5001be06da6 100644
--- a/Build/source/texk/web2c/alephdir/eobase.ch
+++ b/Build/source/texk/web2c/alephdir/eobase.ch
@@ -805,10 +805,9 @@ created by the \.{\\scantokens} command.
@x [22] m.313 l.6794 - e-TeX scan_tokens
else begin print_nl("l."); print_int(line);
@y
-else if index<>in_open then {input from a pseudo file}
- begin print_nl("l."); print_int(line_stack[index+1]);
- end
-else begin print_nl("l."); print_int(line);
+else begin print_nl("l.");
+ if index=in_open then print_int(line)
+ else print_int(line_stack[index+1]); {input from a pseudo file}
@z
%---------------------------------------
@x [22] m.314 l.6814 - e-TeX basic
diff --git a/Build/source/texk/web2c/etexdir/ChangeLog b/Build/source/texk/web2c/etexdir/ChangeLog
index ed0003af67b..37e2bf36777 100644
--- a/Build/source/texk/web2c/etexdir/ChangeLog
+++ b/Build/source/texk/web2c/etexdir/ChangeLog
@@ -1,3 +1,7 @@
+2011-09-30 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * etex.ch: Slightly reformulate printing of current line.
+
2011-04-07 Peter Breitenlohner <peb@mppmu.mpg.de>
* etex.ch: Version 2.3, dated April 7, 2011.
diff --git a/Build/source/texk/web2c/etexdir/am/etex.am b/Build/source/texk/web2c/etexdir/am/etex.am
index 68ed516016e..4aaad707fa1 100644
--- a/Build/source/texk/web2c/etexdir/am/etex.am
+++ b/Build/source/texk/web2c/etexdir/am/etex.am
@@ -1,6 +1,6 @@
## texk/web2c/etexdir/am/etex.am: Makefile fragment for e-TeX.
##
-## Copyright (C) 2009 - 2011 Peter Breitenlohner <tex-live@tug.org>
+## Copyright (C) 2009-2011 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
## e-TeX
@@ -76,7 +76,7 @@ EXTRA_DIST += \
# e-TeX Tests
#
-etex_tests = etexdir/etrip.test
+etex_tests = etexdir/wprob.test etexdir/etrip.test
EXTRA_DIST += $(etex_tests)
@@ -88,6 +88,9 @@ TRIPTRAP_CLEAN += etrip-clean
endif ETEX
DISTCLEANFILES += etrip.diffs
+# wprob.test
+EXTRA_DIST += tests/wprob.tex
+DISTCLEANFILES += wprob.log wprob.tex
# etrip.test
etrip.diffs: etex$(EXEEXT)
$(triptrap_diffs) $@
diff --git a/Build/source/texk/web2c/etexdir/etex.ch b/Build/source/texk/web2c/etexdir/etex.ch
index d662fb062cf..551504aad59 100644
--- a/Build/source/texk/web2c/etexdir/etex.ch
+++ b/Build/source/texk/web2c/etexdir/etex.ch
@@ -871,10 +871,9 @@ corresponding token types must precede |write_text|.
@x [22] m.313 l.6809 - e-TeX scan_tokens
else begin print_nl("l."); print_int(line);
@y
-else if index<>in_open then {input from a pseudo file}
- begin print_nl("l."); print_int(line_stack[index+1]);
- end
-else begin print_nl("l."); print_int(line);
+else begin print_nl("l.");
+ if index=in_open then print_int(line)
+ else print_int(line_stack[index+1]); {input from a pseudo file}
@z
%---------------------------------------
@x [22] m.314 l.6831 - e-TeX basic
diff --git a/Build/source/texk/web2c/etexdir/wprob.test b/Build/source/texk/web2c/etexdir/wprob.test
new file mode 100755
index 00000000000..c1908c516c4
--- /dev/null
+++ b/Build/source/texk/web2c/etexdir/wprob.test
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+# Copyright (C) 2011 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+rm -rf wprob.*
+cp $srcdir/tests/wprob.tex .
+
+TEXMFCNF=$srcdir/../kpathsea \
+ ./etex --ini --etex --file-line-error --interaction=nonstopmode wprob.tex
+
+grep '^\./wprob\.tex:12: Could not open file NoSuchFile\.eps\.$' \
+ wprob.log || exit 1
+
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index 4d939432d87..31948d3f717 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,10 @@
+2011-09-30 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tex/printing.w (print_file_line): Bug fix: avoid uninitialized
+ lineno - from ../tex.ch.
+ * tex/inputstack.w: Slightly reformulate printing of current
+ line - from ../etexdir/etex.ch.
+
2011-08-04 Magnus Granberg <zorry@gentoo.org>
* luatex.c: Do not #include empty file <kpathsea/recorder.h>.
diff --git a/Build/source/texk/web2c/luatexdir/tex/inputstack.w b/Build/source/texk/web2c/luatexdir/tex/inputstack.w
index 857f86dfe6e..f52ca45c4fb 100644
--- a/Build/source/texk/web2c/luatexdir/tex/inputstack.w
+++ b/Build/source/texk/web2c/luatexdir/tex/inputstack.w
@@ -307,12 +307,13 @@ void show_context(void)
print_int(iname - 1);
print_char('>');
};
- } else if (iindex != in_open) { /* input from a pseudo file */
- tprint_nl("l.");
- print_int(line_stack[iindex + 1]);
} else {
tprint_nl("l.");
- print_int(line);
+ if (iindex == in_open) {
+ print_int(line);
+ } else { /* input from a pseudo file */
+ print_int(line_stack[iindex + 1]);
+ }
}
print_char(' ');
PSEUDO_PRINT_THE_LINE();
diff --git a/Build/source/texk/web2c/luatexdir/tex/printing.w b/Build/source/texk/web2c/luatexdir/tex/printing.w
index 9ea3fd98014..df28f3d3c04 100644
--- a/Build/source/texk/web2c/luatexdir/tex/printing.w
+++ b/Build/source/texk/web2c/luatexdir/tex/printing.w
@@ -946,7 +946,7 @@ void print_file_line(void)
if (level == in_open)
print_int(line);
else
- print_int(line_stack[iindex + 1 - (in_open - level)]);
+ print_int(line_stack[level + 1]);
tprint(": ");
}
}
diff --git a/Build/source/texk/web2c/pdftexdir/am/pdftex.am b/Build/source/texk/web2c/pdftexdir/am/pdftex.am
index 26c1054a865..228eaa524e5 100644
--- a/Build/source/texk/web2c/pdftexdir/am/pdftex.am
+++ b/Build/source/texk/web2c/pdftexdir/am/pdftex.am
@@ -88,7 +88,7 @@ EXTRA_DIST += \
# pdfTeX Tests
#
-pdftex_tests = pdftexdir/pdftex.test
+pdftex_tests = pdftexdir/wprob.test pdftexdir/pdftex.test
EXTRA_DIST += $(pdftex_tests)
@@ -96,3 +96,7 @@ if PDFTEX
TESTS += $(pdftex_tests)
endif PDFTEX
+# wprob.test
+EXTRA_DIST += tests/wprob.tex
+DISTCLEANFILES += wprob.log wprob.tex
+
diff --git a/Build/source/texk/web2c/pdftexdir/wprob.test b/Build/source/texk/web2c/pdftexdir/wprob.test
new file mode 100755
index 00000000000..1af5f5d75f6
--- /dev/null
+++ b/Build/source/texk/web2c/pdftexdir/wprob.test
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+# Copyright (C) 2011 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+rm -rf wprob.*
+cp $srcdir/tests/wprob.tex .
+
+TEXMFCNF=$srcdir/../kpathsea \
+ ./pdftex --ini --etex --file-line-error --interaction=nonstopmode wprob.tex
+
+grep '^\./wprob\.tex:12: Could not open file NoSuchFile\.eps\.$' \
+ wprob.log || exit 1
+
diff --git a/Build/source/texk/web2c/tests/wprob.tex b/Build/source/texk/web2c/tests/wprob.tex
new file mode 100644
index 00000000000..7f63f159499
--- /dev/null
+++ b/Build/source/texk/web2c/tests/wprob.tex
@@ -0,0 +1,15 @@
+\catcode`\%=14
+
+\catcode`\{=1
+\catcode`\}=2
+\catcode`\#=6
+
+\def\err#1{%
+ \errmessage{Could not open file #1}%
+}
+\scantokens{
+ \err{NoSuchFile.eps}
+} % The message above should be >>./wprob.tex:12: Could not open...<<
+\end
+
+
diff --git a/Build/source/texk/web2c/tex.ch b/Build/source/texk/web2c/tex.ch
index 665e751bf51..7637ce1ad55 100644
--- a/Build/source/texk/web2c/tex.ch
+++ b/Build/source/texk/web2c/tex.ch
@@ -4532,7 +4532,7 @@ begin
else begin
print_nl (""); print (full_source_filename_stack[level]); print (":");
if level=in_open then print_int (line)
- else print_int (line_stack[index+1-(in_open-level)]);
+ else print_int (line_stack[level+1]);
print (": ");
end;
end;