summaryrefslogtreecommitdiff
path: root/office/texlive/branch2011/04-line_number_fix_from_r24155.patch
blob: 3fd54b505edb55f398f25af9459526bda37729ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
r24159 | karl | 2011-09-30 23:23:37 +0000 (Fri, 30 Sep 2011) | 1 line

branch2011: import line number fix from trunk r24155

Index: Build/source/texk/web2c/luatexdir/tex/inputstack.w
===================================================================
--- Build/source/texk/web2c/luatexdir/tex/inputstack.w	(revision 24158)
+++ Build/source/texk/web2c/luatexdir/tex/inputstack.w	(revision 24159)
@@ -307,12 +307,13 @@
                                 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();
Index: Build/source/texk/web2c/luatexdir/tex/printing.w
===================================================================
--- Build/source/texk/web2c/luatexdir/tex/printing.w	(revision 24158)
+++ Build/source/texk/web2c/luatexdir/tex/printing.w	(revision 24159)
@@ -946,7 +946,7 @@
         if (level == in_open)
             print_int(line);
         else
-            print_int(line_stack[iindex + 1 - (in_open - level)]);
+            print_int(line_stack[level + 1]);
         tprint(": ");
     }
 }
Index: Build/source/texk/web2c/tex.ch
===================================================================
--- Build/source/texk/web2c/tex.ch	(revision 24158)
+++ Build/source/texk/web2c/tex.ch	(revision 24159)
@@ -4532,7 +4532,7 @@
   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;
Index: Build/source/texk/web2c/tests/wprob.tex
===================================================================
--- Build/source/texk/web2c/tests/wprob.tex	(revision 0)
+++ Build/source/texk/web2c/tests/wprob.tex	(revision 24159)
@@ -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
+
+

Property changes on: Build/source/texk/web2c/tests/wprob.tex
___________________________________________________________________
Added: svn:eol-style
   + native

Index: Build/source/texk/web2c/etexdir/wprob.test
===================================================================
--- Build/source/texk/web2c/etexdir/wprob.test	(revision 0)
+++ Build/source/texk/web2c/etexdir/wprob.test	(revision 24159)
@@ -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
+
Index: Build/source/texk/web2c/etexdir/etex.ch
===================================================================
--- Build/source/texk/web2c/etexdir/etex.ch	(revision 24158)
+++ Build/source/texk/web2c/etexdir/etex.ch	(revision 24159)
@@ -871,10 +871,9 @@
 @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
Index: Build/source/texk/web2c/alephdir/eobase.ch
===================================================================
--- Build/source/texk/web2c/alephdir/eobase.ch	(revision 24158)
+++ Build/source/texk/web2c/alephdir/eobase.ch	(revision 24159)
@@ -805,10 +805,9 @@
 @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
Index: Build/source/texk/web2c/alephdir/com16bit.ch
===================================================================
--- Build/source/texk/web2c/alephdir/com16bit.ch	(revision 24158)
+++ Build/source/texk/web2c/alephdir/com16bit.ch	(revision 24159)
@@ -2784,7 +2784,7 @@
   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;
Index: Build/source/texk/web2c/pdftexdir/wprob.test
===================================================================
--- Build/source/texk/web2c/pdftexdir/wprob.test	(revision 0)
+++ Build/source/texk/web2c/pdftexdir/wprob.test	(revision 24159)
@@ -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
+