summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/web2c/ChangeLog6
-rw-r--r--Build/source/texk/web2c/alephdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/alephdir/com16bit.ch17
-rw-r--r--Build/source/texk/web2c/tex.ch16
4 files changed, 44 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index 6a020587c6f..6162e33717f 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,9 @@
+2021-07-19 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * tex.ch (term_input, @<Input for \.{\\read} from the terminal@>):
+ initialize limit to avoid printing some garbage.
+ https://tug.org/pipermail/tex-k/2021-July/003630.html
+
2021-07-14 Andreas Scherer <https://ascherer.github.io>
* ctangleboot.cin,
diff --git a/Build/source/texk/web2c/alephdir/ChangeLog b/Build/source/texk/web2c/alephdir/ChangeLog
index 991646529a0..9a243b00dc8 100644
--- a/Build/source/texk/web2c/alephdir/ChangeLog
+++ b/Build/source/texk/web2c/alephdir/ChangeLog
@@ -1,3 +1,8 @@
+2021-07-19 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ * com16bit.ch: Sync with tex.ch to initialize limit.
+ https://tug.org/pipermail/tex-k/2021-July/003630.html
+
2021-05-08 Akira Kakuto <kakuto@w32tex.org>
* com16bit.ch: Sync sup_param_size and sup_save_size with tex.ch.
diff --git a/Build/source/texk/web2c/alephdir/com16bit.ch b/Build/source/texk/web2c/alephdir/com16bit.ch
index 8e737ed59ea..817f1d5098e 100644
--- a/Build/source/texk/web2c/alephdir/com16bit.ch
+++ b/Build/source/texk/web2c/alephdir/com16bit.ch
@@ -679,6 +679,14 @@ else begin slow_print(format_ident); print_ln;
end;
@z
+@x [5.??] term_input: set limit when fatal_error (patch to omtrans.ch)
+if not new_input_ln(term_in,term_in_mode,term_in_translation,true)
+then fatal_error("End of file on the terminal!");
+@y
+if not new_input_ln(term_in,term_in_mode,term_in_translation,true)
+then begin limit:=0; fatal_error("End of file on the terminal!"); end;
+@z
+
@x [6.73] l.1732 - Add unspecified_mode.
@d error_stop_mode=3 {stops at every opportunity to interact}
@y
@@ -1031,6 +1039,15 @@ begin input_ptr:=0; max_in_stack:=0;
source_filename_stack[0]:=0;full_source_filename_stack[0]:=0;
@z
+@x [27.???]
+else fatal_error("*** (cannot \read from terminal in nonstop modes)")
+@y
+else begin
+ limit:=0;
+ fatal_error("*** (cannot \read from terminal in nonstop modes)");
+ end
+@z
+
@x [28.501] l.9747 - \eof18
if_eof_code: begin scan_four_bit_int; b:=(read_open[cur_val]=closed);
end;
diff --git a/Build/source/texk/web2c/tex.ch b/Build/source/texk/web2c/tex.ch
index d11f42da855..56440fe1c36 100644
--- a/Build/source/texk/web2c/tex.ch
+++ b/Build/source/texk/web2c/tex.ch
@@ -785,6 +785,13 @@ if translate_filename then begin
end;
@z
+@x [5.??] term_input: set limit when fatal_error
+if not input_ln(term_in,true) then fatal_error("End of file on the terminal!");
+@y
+if not input_ln(term_in,true) then begin
+ limit:=0; fatal_error("End of file on the terminal!"); end;
+@z
+
@x [6.73] l.1732 - Add unspecified_mode.
@d error_stop_mode=3 {stops at every opportunity to interact}
@y
@@ -1530,6 +1537,15 @@ cur_order:=co_backup; link(backup_head):=backup_backup;
decr(expand_depth_count);
@z
+@x [27.???]
+else fatal_error("*** (cannot \read from terminal in nonstop modes)")
+@y
+else begin
+ limit:=0;
+ fatal_error("*** (cannot \read from terminal in nonstop modes)");
+ end
+@z
+
@x [28.501] l.9747 - \eof18
if_eof_code: begin scan_four_bit_int; b:=(read_open[cur_val]=closed);
end;