Hans Hagen writes:
Fabrice Popineau wrote:
i'm already be happy if
\ifeof18
would work -) There has been a discussion long ago about this. Why isn't it implemented ?
dunno, i also had this feeling that i'd requested it before
Simple: it was still on the TODO list because I hadn't gotten around
to actually including it. I'm putting the following in.
diff -u -d -r1.86 tex.ch
--- tex.ch 26 Aug 2004 19:48:34 -0000 1.86
+++ tex.ch 28 Dec 2004 17:42:33 -0000
@@ -1780,6 +1780,16 @@
else if m=math_code_base then scanned_result(ho(math_code(cur_val)))(int_val)
@z
+@x [28.501] l.9747 - \eof18
+if_eof_code: begin scan_four_bit_int; b:=(read_open[cur_val]=closed);
+ end;
+@y
+if_eof_code: begin scan_four_bit_int_or_18;
+ if cur_val=18 then b:=not shell_enabled_p
+ else b:=(read_open[cur_val]=closed);
+ end;
+@z
+
@x [29.513] l.9951 - Area and extension rules for filenames.
@ The file names we shall deal with for illustrative purposes have the
following structure: If the name contains `\.>' or `\.:', the file area
@@ -5676,6 +5686,22 @@
@* \[55] Index.
@y
+@ To be able to determine whether \.{\\write18} is enabled from within
+\TeX\ we also implement \.{\\eof18}. We sort of cheat by having an
+additional route |scan_four_bit_int_or_18| which is the same as
+|scan_four_bit_int| except it also accepts the value 18.
+
+@