diff options
author | Karl Berry <karl@freefriends.org> | 2021-01-30 01:42:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-01-30 01:42:07 +0000 |
commit | 0bf3e49d4d147727e1daf1007362a871972b214f (patch) | |
tree | 63a54dcf8830af3f1f4672589b1ebce917693e57 /Build/source/texk/web2c/mf.ch | |
parent | 62203043f467d3a24b34f2df151b65e6ea35144b (diff) |
tuneup2021 from DEK, with adaptations for TL
git-svn-id: svn://tug.org/texlive/trunk@57558 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/mf.ch')
-rw-r--r-- | Build/source/texk/web2c/mf.ch | 49 |
1 files changed, 20 insertions, 29 deletions
diff --git a/Build/source/texk/web2c/mf.ch b/Build/source/texk/web2c/mf.ch index 411ec092ccd..1e817753dde 100644 --- a/Build/source/texk/web2c/mf.ch +++ b/Build/source/texk/web2c/mf.ch @@ -704,14 +704,14 @@ not been commented out. @d edit_file==input_stack[file_ptr] @z @x -"E": if file_ptr>0 then +"E": if file_ptr>0 then if input_stack[file_ptr].name_field>=256 then begin print_nl("You want to edit file "); @.You want to edit file x@> slow_print(input_stack[file_ptr].name_field); print(" at line "); print_int(line);@/ interaction:=scroll_mode; jump_out; @y -"E": if file_ptr>0 then +"E": if file_ptr>0 then if input_stack[file_ptr].name_field>=256 then begin edit_name_start:=str_start[edit_file.name_field]; edit_name_length:=str_start[edit_file.name_field+1] - @@ -1009,37 +1009,29 @@ repeat if (p>=lo_mem_max) then clobbered:=true input and output, establishes the initial values of the date and time. @^system dependencies@> Since standard \PASCAL\ cannot provide such information, something special -is needed. The program here simply specifies July 4, 1776, at noon; but -users probably want a better approximation to the truth. +is needed. The program here simply assumes that suitable values appear in +the global variables \\{sys\_time}, \\{sys\_day}, \\{sys\_month}, and +\\{sys\_year} (which are initialized to noon on 4 July 1776, +in case the implementor is careless). Note that the values are |scaled| integers. Hence \MF\ can no longer be used after the year 32767. @p procedure fix_date_and_time; -begin internal[time]:=12*60*unity; {minutes since midnight} -internal[day]:=4*unity; {fourth day of the month} -internal[month]:=7*unity; {seventh month of the year} -internal[year]:=1776*unity; {Anno Domini} -end; +begin sys_time:=12*60; +sys_day:=4; sys_month:=7; sys_year:=1776; {self-evident truths} @y @ The following procedure, which is called just before \MF\ initializes its input and output, establishes the initial values of the date and time. -It is calls an externally defined |date_and_time|, even though it could -be done from Pascal. -The external procedure also sets up interrupt catching. +It calls an externally defined |date_and_time|, which also sets up +interrupt catching. See more comments in \.{tex.ch}. @^system dependencies@> Note that the values are |scaled| integers. Hence \MF\ can no longer be used after the year 32767. @p procedure fix_date_and_time; -begin - date_and_time(internal[time],internal[day],internal[month],internal[year]); - internal[time] := internal[time] * unity; - internal[day] := internal[day] * unity; - internal[month] := internal[month] * unity; - internal[year] := internal[year] * unity; -end; +begin date_and_time(sys_time,sys_day,sys_month,sys_year); @z @x [12.198] Change class to c_class to avoid C++ keyword. @@ -1176,7 +1168,7 @@ end; @!n:screen_col); var @!k:screen_col; {an index into |a|} @!c:screen_col; {an index into |screen_pixel|} -begin @{ k:=0; c:=a[0]; +begin @{@+k:=0; c:=a[0]; repeat incr(k); repeat screen_pixel[r,c]:=b; incr(c); until c=a[k]; @@ -1535,16 +1527,9 @@ recorder_change_filename(stringcast(name_of_file+1)); pack_job_name(".log"); @z -@x [38.790] -begin wlog(banner); -slow_print(base_ident); print(" "); -print_int(round_unscaled(internal[day])); print_char(" "); +@x [38.790] leading character for C string months:='JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC'; @y -begin wlog(banner); -wlog (version_string); -slow_print(base_ident); print(" "); -print_int(round_unscaled(internal[day])); print_char(" "); months := ' JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC'; @z @@ -1592,7 +1577,7 @@ loop@+begin @z @x [38.793] Can't return name to string pool because of editor option? -if name=str_ptr-1 then {we can conserve string pool space now} +if name=str_ptr-1 then {conserve string pool space (but see note above)} begin flush_string(name); name:=cur_name; end; @y @@ -1969,6 +1954,12 @@ if (edit_name_start<>0) and (interaction>batch_mode) then @!init if ini_version then begin store_base_file; return;end;@+tini@/ @z +@x +fix_date_and_time; init_randoms(sys_time+sys_day);@/ +@y +fix_date_and_time; init_randoms(internal[time]+internal[day]);@/ +@z + %@x [49.1211] l.23002 - Handle %&base line. %if (base_ident=0)or(buffer[loc]="&") then %@y |