[tex-live] Re: tex.ch changes that should go into omega and aleph

Karl Berry karl at freefriends.org
Sat Jun 5 15:37:29 CEST 2004


    Can you send me a diff? I'm not comfortable enough with 
    perforce yet to know how to track changes.

p4 filelog <somefile> will show you the list of checkins and log msgs.

In this case, since Olaf said to look at the changes in revision 21 and
later:
tug$ p4 diff tex.ch#21

The output is below.

FWIW, you can also browse the sources at
http://tug.org/texlive/devsrc/Build/source.development/TeX/texk/web2c/

Don't spend a lot of time mastering p4.  We will still plan to move to
CVS after this year's release.

HTH,
k


==== //depot/Build/source.development/TeX/texk/web2c/tex.ch#21 - /home/karl/src/Build/source.development/TeX/texk/web2c/tex.ch ====
225c225
< @!pool_name=TEX_POOL_NAME; {this is configurable, for the sake of ML-\TeX}
---
> @!pool_name=TEXMF_POOL_NAME; {this is configurable, for the sake of ML-\TeX}
227c227
< @!engine_name=TEX_ENGINE_NAME; {the name of this engine}
---
> @!engine_name=TEXMF_ENGINE_NAME; {the name of this engine}
589a590,592
> @!eight_bit_p:c_int_type; {make all characters printable by default}
> @!halt_on_error_p:c_int_type; {stop at first error}
> @!quoted_filename:boolean; {current filename is quoted}
863,865c866
< { The web2c locale dependency is here -- it is correct if we assume
<   that pseudoprinting goes to the terminal or log file.
<   We do not have to check |special_printing| here: we never want to
---
> { We do not have to check |special_printing| here: we never want to
868,869c869
< if ((selector<no_print) and (@<Character |s| cannot be printed@>))
<     or ((selector>no_print) and (selector<=pseudo) and (not isprint(xchr[s])))
---
> if (selector<=pseudo) and (@<Character |s| cannot be printed@>)
1035c1035,1037
<  @x [6.82] l.1866 - file:line:error style messages force scroll_mode.
---
> @x [6.82] l.1866 - halt on error?
> print_char("."); show_context;
> @y
1037,1040c1039,1042
<  @y
< if file_line_error_style_p then interaction:=scroll_mode
< else begin print_char("."); show_context end;
<  @z
---
> if (halt_on_error_p) then begin
>   history:=fatal_error_stop; jump_out;
> end;
> @z
1925a1928,1933
> @x [29.515] l.9995 - filenames: quoted
> begin area_delimiter:=0; ext_delimiter:=0;
> @y
> begin area_delimiter:=0; ext_delimiter:=0; quoted_filename:=false;
> @z
> 
1929c1937,1943
< begin if stop_at_space and (c=" ") then more_name:=false
---
> begin
> if c="""" then begin
>   quoted_filename:=not quoted_filename;
>   more_name:=true;
>   end
> else if (c=" ") and stop_at_space and (not quoted_filename) then
>   more_name:=false
2002a2017,2058
> @z
> 
> @x [29.518] l.10042 - print_file_name: quote if spaces in names.
> begin slow_print(a); slow_print(n); slow_print(e);
> @y
> var must_quote: boolean; {whether to quote the filename}
> @!j:pool_pointer; {index into |str_pool|}
> begin
> must_quote:=false;
> if a<>0 then begin
>   j:=str_start[a];
>   while (not must_quote) and (j<>str_start[a+1]) do begin
>     must_quote:=str_pool[j]=' '; incr(j);
>   end;
> end;
> if n<>0 then begin
>   j:=str_start[n];
>   while (not must_quote) and (j<>str_start[n+1]) do begin
>     must_quote:=str_pool[j]=' '; incr(j);
>   end;
> end;
> if e<>0 then begin
>   j:=str_start[e];
>   while (not must_quote) and (j<>str_start[e+1]) do begin
>     must_quote:=str_pool[j]=' '; incr(j);
>   end;
> end;
> if must_quote then slow_print("""");
> if a<>0 then slow_print(a);
> if n<>0 then slow_print(n);
> if e<>0 then slow_print(e);
> if must_quote then slow_print("""");
> @z
> 
> @x [29.519] l.10051 - have append_to_name skip quotes.
> @d append_to_name(#)==begin c:=#; incr(k);
>   if k<=file_name_size then name_of_file[k]:=xchr[c];
>   end
> @y
> @d append_to_name(#)==begin c:=#; if not (c="""") then begin incr(k);
>   if k<=file_name_size then name_of_file[k]:=xchr[c];
>   end end
2098a2155,2161
> @z
> 
> @x [29.526] l.10194 - stop scanning file name if we're at end-of-line.
>   if not more_name(cur_chr) then goto done;
> @y
>   if ((state<>token_list) and (loc>limit)) or not more_name(cur_chr) then
>     goto done;
2710a2774,2779
> @x [32.642] l.12773 - use print_file_name
>   print_nl("Output written on "); slow_print(output_file_name);
> @y
>   print_nl("Output written on "); print_file_name(0, output_file_name, 0);
> @z
> 
3748,3761c3817,3818
< dump_int(@"4D4C5458);  {ML\TeX's magic constant: "MLTX"}
< if mltex_p then dump_int(1)
< else dump_int(0);
< dump_int(@"45435458);  {enc\TeX's magic constant: "ECTX"}
< if not enctex_p then dump_int(0)
< else begin
<   dump_int(1);
<   dump_things(xord[0], 256);
<   dump_things(xchr[0], 256);
<   dump_things(xprn[0], 256);
<   dump_things(mubyte_read[0], 256);
<   dump_things(mubyte_write[0], 256);
<   dump_things(mubyte_cswrite[0], 128);
< end;
---
> @<Dump ML\TeX-specific data@>;
> @<Dump enc\TeX-specific data@>;
3782,3807c3839,3840
< undump_int(x);   {check magic constant of ML\TeX}
< if x<>@"4D4C5458 then goto bad_fmt;
< undump_int(x);   {undump |mltex_p| flag into |mltex_enabled_p|}
< if x=1 then mltex_enabled_p:=true
< else if x<>0 then goto bad_fmt;
< undump_int(x);   {check magic constant of enc\TeX}
< if x<>@"45435458 then goto bad_fmt;
< undump_int(x);   {undump |enctex_p| flag into |enctex_enabled_p|}
< if x=0 then enctex_enabled_p:=false
< else if x<>1 then goto bad_fmt
< else begin
<   enctex_enabled_p:=true;
<   if translate_filename then begin
<     for k:=0 to 255 do undump_things(dummy_xord, 1);
<     for k:=0 to 255 do undump_things(dummy_xchr, 1);
<     for k:=0 to 255 do undump_things(dummy_xprn, 1);
<     end
<   else begin
<     undump_things(xord[0], 256);
<     undump_things(xchr[0], 256);
<     undump_things(xprn[0], 256);
<     end;
<   undump_things(mubyte_read[0], 256);
<   undump_things(mubyte_write[0], 256);
<   undump_things(mubyte_cswrite[0], 128);
< end;
---
> @<Undump ML\TeX-specific data@>;
> @<Undump enc\TeX-specific data@>;
3850a3884
> @<Dump |xord|, |xchr|, and |xprn|@>;
3892a3927
> @<Undump |xord|, |xchr|, and |xprn|@>;
4563c4598
<     slow_print(log_name); print_char(".");
---
>     print_file_name(0, log_name, 0); print_char(".");
4981a5017,5019
> @ Dumping the |xord|, |xchr|, and |xprn| arrays.  We dump these always
> in the format, so a TCX file loaded during format creation can set a
> default for users of the format.
4982a5021,5048
> @<Dump |xord|, |xchr|, and |xprn|@>=
> dump_things(xord[0], 256);
> dump_things(xchr[0], 256);
> dump_things(xprn[0], 256);
> 
> @ Undumping the |xord|, |xchr|, and |xprn| arrays.  This code is more
> complicated, because we want to ensure that a TCX file specified on
> the command line will override whatever is in the format.  Since the
> tcx file has already been loaded, that implies throwing away the data
> in the format.  Also, if no |translate_filename| is given, but
> |eight_bit_p| is set we have to make all characters printable.
> 
> @<Undump |xord|, |xchr|, and |xprn|@>=
> if translate_filename then begin
>   for k:=0 to 255 do undump_things(dummy_xord, 1);
>   for k:=0 to 255 do undump_things(dummy_xchr, 1);
>   for k:=0 to 255 do undump_things(dummy_xprn, 1);
>   end
> else begin
>   undump_things(xord[0], 256);
>   undump_things(xchr[0], 256);
>   undump_things(xprn[0], 256);
>   if eight_bit_p then
>     for k:=0 to 255 do
>       xprn[k]:=1;
> end;
> 
> 
5281a5348,5349
> @ Dumping ML\TeX-related material.  This is just the flag in the
> format that tells us whether ML\TeX{} is enabled.
5283c5351,5354
< @* \[54/ML\TeX] System-dependent changes for ML\TeX.
---
> @<Dump ML\TeX-specific data@>=
> dump_int(@"4D4C5458);  {ML\TeX's magic constant: "MLTX"}
> if mltex_p then dump_int(1)
> else dump_int(0);
5285,5287c5356,5357
< The boolean variable |mltex_p| is set by web2c according to the given
< command line option (or an entry in the configuration file) before any
< \TeX{} function is called.
---
> @ Undump ML\TeX-related material, which is just a flag in the format
> that tells us whether ML\TeX{} is enabled.
5289,5303c5359,5364
< @<Global...@> =
< @!mltex_p: boolean;
< 
< @ The boolean variable |mltex_enabled_p| is used to enable ML\TeX's
< character substitution.  It is initialised to |false|.  When loading
< a \.{FMT} it is set to the value of the boolean |mltex_p| saved in
< the \.{FMT} file.  Additionally it is set to the value of |mltex_p|
< in Ini\TeX.
< 
< @<Glob...@>=
< @!mltex_enabled_p:boolean;  {enable character substitution}
< 
< 
< @ @<Set init...@>=
< mltex_enabled_p:=false;
---
> @<Undump ML\TeX-specific data@>=
> undump_int(x);   {check magic constant of ML\TeX}
> if x<>@"4D4C5458 then goto bad_fmt;
> undump_int(x);   {undump |mltex_p| flag into |mltex_enabled_p|}
> if x=1 then mltex_enabled_p:=true
> else if x<>0 then goto bad_fmt;
5573a5635,5663
> @ Additional material to dump for enc\TeX.  This includes whether
> enc\TeX is enabled, and if it is we also have to dump the \.{\\mubyte}
> arrays.
> 
> @<Dump enc\TeX-specific data@>=
> dump_int(@"45435458);  {enc\TeX's magic constant: "ECTX"}
> if not enctex_p then dump_int(0)
> else begin
>   dump_int(1);
>   dump_things(mubyte_read[0], 256);
>   dump_things(mubyte_write[0], 256);
>   dump_things(mubyte_cswrite[0], 128);
> end;
> 
> @ Undumping the additional material we dumped for enc\TeX.  This includes
> conditionally undumping the \.{\\mubyte} arrays.
> 
> @<Undump enc\TeX-specific data@>=
> undump_int(x);   {check magic constant of enc\TeX}
> if x<>@"45435458 then goto bad_fmt;
> undump_int(x);   {undump |enctex_p| flag into |enctex_enabled_p|}
> if x=0 then enctex_enabled_p:=false
> else if x<>1 then goto bad_fmt
> else begin
>   enctex_enabled_p:=true;
>   undump_things(mubyte_read[0], 256);
>   undump_things(mubyte_write[0], 256);
>   undump_things(mubyte_cswrite[0], 128);
> end;



More information about the tex-live mailing list