Hi Martin,
- 746 PromptFileName
The latest version of 746 (retry), changed by Heiko himself, is the
following.
This problem is related to all Web2C, so I've attached the corresponding
changes for Aleph and Omega.
Please check in these changes also to the head of TeXLive
repository if these are ok.
Best regards,
Akira
*** tex.ch.org 2006-12-19 02:35:49.000000000 +0100
--- tex.ch 2007-03-07 17:08:49.000000000 +0100
***************
*** 2210,2221 ****
--- 2210,2229 ----
@y
var k:0..buf_size; {index into |buffer|}
@!saved_cur_name:str_number; {to catch empty terminal input}
+ @!saved_cur_ext:str_number; {to catch empty terminal input}
+ @!saved_cur_area:str_number; {to catch empty terminal input}
@z
@x [29.530] l.10252 - prompt_file_name: No default extension is TeX input file.
if e=".tex" then show_context;
@y
if (e=".tex") or (e="") then show_context;
+ print_ln; print("(Retry if file name is empty or CTRL-D to exit.");
+ if (e<>"") then
+ begin
+ print(" Default file extension is `"); print(e); print("'");
+ end;
+ print(")"); print_ln;
@z
@x [29.530] l.10258 - prompt_file_name: prevent empty filenames.
***************
*** 2223,2231 ****
if cur_ext="" then cur_ext:=e;
@y
saved_cur_name:=cur_name;
clear_terminal; prompt_input(": "); @;
! if cur_ext="" then cur_ext:=e;
! if length(cur_name)=0 then cur_name:=saved_cur_name;
@z
@x [29.532] l.10263 - avoid conflict, `logname' in on some systems.
--- 2231,2247 ----
if cur_ext="" then cur_ext:=e;
@y
saved_cur_name:=cur_name;
+ saved_cur_ext:=cur_ext;
+ saved_cur_area:=cur_area;
clear_terminal; prompt_input(": "); @;
! if (length(cur_name)=0) and (cur_ext="") and (cur_area="") then
! begin
! cur_name:=saved_cur_name;
! cur_ext:=saved_cur_ext;
! cur_area:=saved_cur_area;
! end
! else
! if cur_ext="" then cur_ext:=e;
@z
@x [29.532] l.10263 - avoid conflict, `logname' in on some systems.
diff -u alephdir-orig/com16bit-rc2.ch alephdir/com16bit-rc2.ch
--- alephdir-orig/com16bit-rc2.ch Tue Dec 19 10:35:50 2006
+++ alephdir/com16bit-rc2.ch Sat Mar 17 20:41:09 2007
@@ -1349,12 +1349,20 @@
@y
var k:0..buf_size; {index into |buffer|}
@!saved_cur_name:str_number; {to catch empty terminal input}
+@!saved_cur_ext:str_number; {to catch empty terminal input}
+@!saved_cur_area:str_number; {to catch empty terminal input}
@z
@x [29.530] l.10252 - prompt_file_name: No default extension is TeX input file.
if e=".tex" then show_context;
@y
if (e=".tex") or (e="") then show_context;
+print_ln; print("(Retry if file name is empty or CTRL-D to exit.");
+if (e<>"") then
+ begin
+ print(" Default file extension is `"); print(e); print("'");
+ end;
+print(")"); print_ln;
@z
@x [29.530] l.10258 - prompt_file_name: prevent empty filenames.
@@ -1362,9 +1370,17 @@
if cur_ext="" then cur_ext:=e;
@y
saved_cur_name:=cur_name;
+saved_cur_ext:=cur_ext;
+saved_cur_area:=cur_area;
clear_terminal; prompt_input(": "); @;
-if cur_ext="" then cur_ext:=e;
-if length(cur_name)=0 then cur_name:=saved_cur_name;
+if (length(cur_name)=0) and (cur_ext="") and (cur_area="") then
+ begin
+ cur_name:=saved_cur_name;
+ cur_ext:=saved_cur_ext;
+ cur_area:=saved_cur_area;
+ end
+else
+ if cur_ext="" then cur_ext:=e;
@z
@x [29.532] l.10263 - avoid conflict, `logname' in on some systems.
diff -u omegadir-orig/com16bit.ch omegadir/com16bit.ch
--- omegadir-orig/com16bit.ch Tue Dec 19 10:35:50 2006
+++ omegadir/com16bit.ch Sat Mar 17 20:44:41 2007
@@ -1348,12 +1348,20 @@
@y
var k:0..buf_size; {index into |buffer|}
@!saved_cur_name:str_number; {to catch empty terminal input}
+@!saved_cur_ext:str_number; {to catch empty terminal input}
+@!saved_cur_area:str_number; {to catch empty terminal input}
@z
@x [29.530] l.10252 - prompt_file_name: No default extension is TeX input file.
if e=".tex" then show_context;
@y
if (e=".tex") or (e="") then show_context;
+print_ln; print("(Retry if file name is empty or CTRL-D to exit.");
+if (e<>"") then
+ begin
+ print(" Default file extension is `"); print(e); print("'");
+ end;
+print(")"); print_ln;
@z
@x [29.530] l.10258 - prompt_file_name: prevent empty filenames.
@@ -1361,9 +1369,17 @@
if cur_ext="" then cur_ext:=e;
@y
saved_cur_name:=cur_name;
+saved_cur_ext:=cur_ext;
+saved_cur_area:=cur_area;
clear_terminal; prompt_input(": "); @;
-if cur_ext="" then cur_ext:=e;
-if length(cur_name)=0 then cur_name:=saved_cur_name;
+if (length(cur_name)=0) and (cur_ext="") and (cur_area="") then
+ begin
+ cur_name:=saved_cur_name;
+ cur_ext:=saved_cur_ext;
+ cur_area:=saved_cur_area;
+ end
+else
+ if cur_ext="" then cur_ext:=e;
@z
@x [29.532] l.10263 - avoid conflict, `logname' in on some systems.