[tex-k] How to get filehandle when `E'

Shreevatsa R shreevatsa.public at gmail.com
Tue Nov 3 19:13:23 CET 2020


I don't have full context on this thread but:

On Mon, 2 Nov 2020 at 18:25, Igor Liferenko <igor.liferenko at gmail.com>
wrote:

> 3) and then you are saying that the code for getting filename was not
> implemented the TOPS-20 way in tex.web WHY???


My understanding is that Knuth intended tex.web as a "common denominator"
for TeX implementations on different systems. Whatever he knew was specific
to the Stanford systems he put in a local change file, not in tex.web.
(Putting it in tex.web would increase the burden for everyone else.) The
idea was that every "system administrator" (not called that in those days I
guess) who wanted to "port" TeX to their system would add their own
specific change file for the sections marked under "system dependencies",
before compiling the program and making it available to their users. So
there does not necessarily exist a system where "raw" tex.web is usable
as-is. Of course, things anticipated as useful to multiple Pascal compilers
/ operating systems were put in tex.web (like the §26 you mention).

If you look at the original tex.ch for the Stanford system you'll see the
system-dependent changes for that system. I'm not sure but I think it may
be this one <https://www.saildart.org/TEX.CH[TEX,DEK]>, which for that
section has:

@x
"E": if base_ptr>0 then
	begin print_nl("You want to edit file ");
@.You want to edit file x@>
	print(input_stack[base_ptr].name_field);
	print(" at line "); print_int(line);
	interaction←scroll_mode; jump_out;
	end;
@y
"E","T": if base_ptr>0 then
	begin selector←new_string; pool_ptr←str_start[str_ptr];
	print("et "); print(input_stack[base_ptr].name_field);
	print_char("/"); print_int(page); print("p/");
	print_int(line); print_char("l"); print_char(carriage_return);
	if str_ptr<max_strings then
		begin pseudo_typein←str_ptr; incr(str_ptr);
		str_start[str_ptr]←pool_ptr;
		end; {|make_string| not declared |forward|}
	selector←term_and_log; interaction←scroll_mode; jump_out;
	end;
@z


Hope this helps,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex-k/attachments/20201103/a7910769/attachment.html>


More information about the tex-k mailing list.