|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T m
Length: 15356 (0x3bfc) Types: TextFile Names: »multihyph.patch«
└─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89 └─⟦this⟧ »./tex82/TeXpatches/multihyph.patch«
*** /src/tex/xfer/web2c/texdir/ctex.ch Tue Jun 28 15:17:34 1988 --- ctex.ch Mon Aug 8 12:25:32 1988 *************** *** 1,4 **** ! % Change file for TeX in C, derived from various other change files % by Tim Morgan, UC Irvine ICS Department, and many others % --- 1,5 ---- ! % Multi-hyphen capabilities added into the ! % change file for TeX in C, derived from various other change files % by Tim Morgan, UC Irvine ICS Department, and many others % *************** *** 14,19 **** --- 15,22 ---- % (3 /1 /88) ETM Eliminated some unused variables and unnecesary tests % (5 /9 /88) ETM Added yet another casting bug fix % (6 /21/88) ETM Brought up to TeX version 2.93 + % (21.6.88) alo@santra Added Finnish hyphenation + % (5.7.88) alo@santra Added alternate hyphenation patterns capability % NOTE: the module numbers in this change file refer to the published % text in TeX, the Program, Volume B. 1986 *************** *** 36,42 **** @x @d banner=='This is TeX, Version 2.93' {printed when \TeX\ starts} @y ! @d banner=='This is TeX, C Version 2.93' {printed when \TeX\ starts} @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- 39,45 ---- @x @d banner=='This is TeX, Version 2.93' {printed when \TeX\ starts} @y ! @d banner=='This is MHTeX, C Version 2.93 (multiple hyphenation capability)' {printed when \TeX\ starts} @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *************** *** 62,68 **** @f type==true {but `|type|' will not be treated as a reserved word} @p @t\4@>@<Compiler directives@>@/ ! program TEX; {all file names are defined dynamically} @z @x --- 65,71 ---- @f type==true {but `|type|' will not be treated as a reserved word} @p @t\4@>@<Compiler directives@>@/ ! program MHTEX; {all file names are defined dynamically} @z @x *************** *** 195,203 **** at most |max_halfword|} @!trie_size=8000; {space for hyphenation patterns; should be larger for \.{INITEX} than it is in production versions of \TeX} @!dvi_buf_size=16384; {size of the output buffer; must be a multiple of 8} @!file_name_size=1024; {file names shouldn't be longer than this} ! @!pool_name='tex.pool'; {string of length |file_name_size|; tells where the string pool appears} @!mem_top=65530; {largest index in the |mem| array dumped by \.{INITEX}; must be substantially larger than |mem_bot| --- 198,207 ---- at most |max_halfword|} @!trie_size=8000; {space for hyphenation patterns; should be larger for \.{INITEX} than it is in production versions of \TeX} + @!pat_num_max=1; {maximum number of hyphenation patterns -1} @!dvi_buf_size=16384; {size of the output buffer; must be a multiple of 8} @!file_name_size=1024; {file names shouldn't be longer than this} ! @!pool_name='mhtex.pool'; {string of length |file_name_size|; tells where the string pool appears} @!mem_top=65530; {largest index in the |mem| array dumped by \.{INITEX}; must be substantially larger than |mem_bot| *************** *** 623,629 **** @y else begin {Like |bad_pool|, but must not close file if we never opened it} ! wake_up_terminal; write_ln(term_out, '! I can''t read tex.pool.'); get_strings_started:= false; return; end @z --- 627,633 ---- @y else begin {Like |bad_pool|, but must not close file if we never opened it} ! wake_up_terminal; write_ln(term_out, '! I can''t read mhtex.pool.'); get_strings_started:= false; return; end @z *************** *** 632,638 **** @.TEX.POOL has no check sum@> read(pool_file,m,n); {read two digits of string length} @y ! begin if eof(pool_file) then bad_pool('! tex.pool has no check sum.'); @.TEX.POOL has no check sum@> read(pool_file,m); read(pool_file,n); {read two digits of string length} @z --- 636,642 ---- @.TEX.POOL has no check sum@> read(pool_file,m,n); {read two digits of string length} @y ! begin if eof(pool_file) then bad_pool('! mhtex.pool has no check sum.'); @.TEX.POOL has no check sum@> read(pool_file,m); read(pool_file,n); {read two digits of string length} @z *************** *** 639,655 **** @x bad_pool('! TEX.POOL line doesn''t begin with two digits.'); @y ! bad_pool('! tex.pool line doesn''t begin with two digits.'); @z @x bad_pool('! TEX.POOL check sum doesn''t have nine digits.'); @y ! bad_pool('! tex.pool check sum doesn''t have nine digits.'); @z @x done: if a<>@$ then bad_pool('! TEX.POOL doesn''t match; TANGLE me again.'); @y ! done: if a<>@$ then bad_pool('! tex.pool doesn''t match; tangle me again.'); @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- 643,659 ---- @x bad_pool('! TEX.POOL line doesn''t begin with two digits.'); @y ! bad_pool('! mhtex.pool line doesn''t begin with two digits.'); @z @x bad_pool('! TEX.POOL check sum doesn''t have nine digits.'); @y ! bad_pool('! mhtex.pool check sum doesn''t have nine digits.'); @z @x done: if a<>@$ then bad_pool('! TEX.POOL doesn''t match; TANGLE me again.'); @y ! done: if a<>@$ then bad_pool('! mhtex.pool doesn''t match; tangle me again.'); @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *************** *** 839,844 **** --- 843,853 ---- if r>toint(p+1) then @<Allocate from the top of node |p| and |goto found|@>; @z + @x l.3236 + @!k:integer; {index into |mem|, |eqtb|, etc.} + @y + @!j,k:integer; {index into |mem|, |eqtb|, etc.} + @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % [11.165] fix the word "free" so that it doesn't conflict with the C routine %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *************** *** 925,930 **** --- 934,972 ---- end @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % Finnish hyphenation + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + @x l.4833 + @d new_line_char_code=49 {character that prints as |print_ln|} + @d int_pars=50 {total number of integer parameters} + @y + @d new_line_char_code=49 {character that prints as |print_ln|} + @d pat_num_code=50 {} + @d int_pars=51 {total number of integer parameters} + @z + @x l.4891 + @d new_line_char==int_par(new_line_char_code) + @y + @d new_line_char==int_par(new_line_char_code) + @d pat_num==int_par(pat_num_code) + @z + @x l.4950 + new_line_char_code:print_esc("newlinechar"); + @y + new_line_char_code:print_esc("newlinechar"); + pat_num_code:print_esc("patternsnum"); + @z + @x l.5059 + primitive("newlinechar",assign_int,int_base+new_line_char_code);@/ + @!@:new_line_char_}{\.{\\newlinechar} primitive@> + @y + primitive("newlinechar",assign_int,int_base+new_line_char_code);@/ + @!@:new_line_char_}{\.{\\newlinechar} primitive@> + primitive("patternsnum",assign_int,int_base+pat_num_code);@/ + @!@:pat_num_}{\.{\\pat_num} primitive@> + @z + %% End of Finnish + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % [17.241] fix_date_and_time %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x *************** *** 1286,1291 **** --- 1328,1457 ---- @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % Changes for Finnish hyphenation + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + @x l.16983 + @!hu:array[1..63] of ASCII_code; {like |hc|, before conversion to lowercase} + @!hyf_char:integer; {hyphen character of the relevant font} + @y + @!hu:array[1..63] of ASCII_code; {like |hc|, before conversion to lowercase} + @!hyf_char:integer; {hyphen character of the relevant font} + @!hacc:array[1..63] of pointer; + @z + @x l.16990 + @!c:0..255; {character being considered for hyphenation} + @y + @!c:0..255; {character being considered for hyphenation} + @!s2,s3:pointer; + @z + @x l.16998 + begin @<Skip to node |ha|, or |goto done1| if no hyphenation + @y + begin if ((pat_num>pat_num_max)or(pat_num<0)) then pat_num:=0; + @<Skip to node |ha|, or |goto done1| if no hyphenation + @z + @x l.17002 + at least five letters have been found, otherwise |goto done1|@>; + hyphenate; + end; + done1: end + @y + at least five letters have been found, otherwise |goto done1|@>; + hyphenate; + end; + done1: while hn>0 do begin if hacc[hn]<>null then + flush_node_list(hacc[hn]); decr(hn); end; + end + @z + @x l.17028 + else if (type(s)=kern_node)and(subtype(s)=normal) then c:=128 + @y + else if (type(s)=kern_node)and(subtype(s)=normal) then c:=128 + else if (type(s)=kern_node)and(subtype(s)=acc_kern)and(pat_num<>0) then + begin s2:=link(s); + if is_char_node(s2) then + begin c:=qo(character(s2)); hf:=font(s2); + end + else goto done1 + end + @z + @x l.17036 + done2: hyf_char:=hyphen_char[hf]; + if hyf_char<0 then goto done1; + if hyf_char>255 then goto done1; + @y + done2: hyf_char:=hyphen_char[hf]; + if hyf_char<0 then goto done1; + if hyf_char>255 then goto done1; + for j:=1 to 63 do hacc[j]:=null; + @z + @x l.17053 + @<Move the characters of a ligature node to |hu| and |hc|; + but |goto done3| if they are not all letters@> + @y + @<Move the characters of a ligature node to |hu| and |hc|; + but |goto done3| if they are not all letters@> + else if (type(s)=kern_node)and(subtype(s)=acc_kern)and(pat_num<>0) then + begin + s3:=link(s); + link(s):=null; + hacc[hn+1]:=copy_node_list(s); + link(s):=s3; + end + @z + @x l.17199 + @ @<Look for a ligature or kern between |d| and...@>= + if j=n then goto done; + @y + @ @<Look for a ligature or kern between |d| and...@>= + if j=n then goto done; + if hacc[j+1]<>null then goto done; + @z + @x l.17251 + @<Reconstitute nodes for the hyphenated word...@>= + j:=0; + repeat l:=j; j:=reconstitute(j+1,hn); + @y + @<Reconstitute nodes for the hyphenated word...@>= + j:=0; + repeat l:=j; + if hacc[j+1]<>null then + begin link(s):=copy_node_list(hacc[j+1]); + s:=link(s); + end; + j:=reconstitute(j+1,hn); + @z + @x l.17385 + @ @d trie_link(#)==trie[#].rh {``downward'' link in a trie} + @d trie_char(#)==trie[#].b1 {character matched at this trie location} + @d trie_op(#)==trie[#].b0 {program for hyphenation at this trie location} + + @<Glob...@>= + @!trie:array[trie_pointer] of two_halves; {|trie_link|, |trie_char|, |trie_op|} + @!hyf_distance:array[quarterword] of small_number; {position |k-j| of $n_j$} + @!hyf_num:array[quarterword] of small_number; {value of $n_j$} + @!hyf_next:array[quarterword] of quarterword; {continuation of this |trie_op|} + @y + @ @d trie==trie_arr[pat_num] + @d trie_link(#)==trie[#].rh {``downward'' link in a trie} + @d trie_char(#)==trie[#].b1 {character matched at this trie location} + @d trie_op(#)==trie[#].b0 {program for hyphenation at this trie location} + @d hyf_distance==hyf_distance_arr[pat_num] + @d hyf_num==hyf_num_arr[pat_num] + @d hyf_next==hyf_next_arr[pat_num] + @d trie_max==trie_max_arr[pat_num] + @<Glob...@>= + @!trie_arr:array[0..pat_num_max] of array[trie_pointer] of two_halves; + {|trie_link|, |trie_char|, |trie_op|} + @!hyf_distance_arr:array[0..pat_num_max] of array[quarterword] of small_number; + {position |k-j| of $n_j$} + @!hyf_num_arr:array[0..pat_num_max] of array[quarterword] of small_number; + {value of $n_j$} + @!hyf_next_arr:array[0..pat_num_max] of array[quarterword] of quarterword; + {continuation of this |trie_op|} + @z + %% End of Finnish + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % [43.944] Fix a C casting/expression evaluation problem %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x *************** *** 1305,1310 **** --- 1471,1501 ---- 2718*toint(trie_l[p])+3142*toint(trie_r[p])) mod trie_size; @z + @x l.17774 + begin for h:=0 to trie_op_hash_size do trie_op_hash[h]:=min_quarterword; + @y + begin if ((pat_num>pat_num_max)or(pat_num<0)) then pat_num:=0; + for h:=0 to trie_op_hash_size do trie_op_hash[h]:=min_quarterword; + @z + @x l.17805 + @t\hskip1em@>@!trie_max:trie_pointer; {largest location used in |trie|} + @y + @t\hskip1em@>@!trie_max_arr:array[0..pat_num_max] of trie_pointer; + {largest location used in |trie|} + @z + @x l.17827 + trie_link(0):=0; trie_char(0):=0; trie_op(0):=min_quarterword; + for k:=1 to 127 do trie[k]:=trie[0]; + trie_max:=127; + @y + for j:=0 to pat_num_max do + begin pat_num:=j; + trie_link(0):=0; trie_char(0):=0; trie_op(0):=min_quarterword; + for k:=1 to 127 do trie[k]:=trie[0]; + trie_max:=127 + end; + pat_num:=0; + @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % [49.1275] a_open_in of \read file needs path specifier %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *************** *** 1637,1642 **** --- 1828,1834 ---- @z @x + dump_int(trie_max); for k:=0 to trie_max do dump_hh(trie[k]); dump_int(trie_op_ptr); for k:=min_quarterword+1 to trie_op_ptr do *************** *** 1645,1658 **** --- 1837,1857 ---- dump_int(hyf_next[k]); end; @y + dump_int(pat_num_max); + for j:=0 to pat_num_max do + begin + pat_num := j; + dump_int(trie_max); dump_things(trie[0], trie_max+1); dump_int(trie_op_ptr); dump_things(hyf_distance[min_quarterword+1], trie_op_ptr-min_quarterword); dump_things(hyf_num[min_quarterword+1], trie_op_ptr-min_quarterword); dump_things(hyf_next[min_quarterword+1], trie_op_ptr-min_quarterword); + end; @z @x + undump_size(0)(trie_size)('trie size')(trie_max); for k:=0 to trie_max do undump_hh(trie[k]); undump(min_quarterword)(max_quarterword)(trie_op_ptr); for k:=min_quarterword+1 to trie_op_ptr do *************** *** 1661,1671 **** --- 1860,1877 ---- undump(min_quarterword)(max_quarterword)(hyf_next[k]); end @y + undump_size(0)(pat_num_max)('pat_num_max')(j); + for j:=0 to pat_num_max do + begin + pat_num:=j; + undump_size(0)(trie_size)('trie size')(trie_max); undump_things(trie[0], trie_max+1); undump(min_quarterword)(max_quarterword)(trie_op_ptr); undump_things(hyf_distance[min_quarterword+1], trie_op_ptr-min_quarterword); undump_things(hyf_num[min_quarterword+1], trie_op_ptr-min_quarterword); undump_things(hyf_next[min_quarterword+1], trie_op_ptr-min_quarterword); + end; + pat_num:=0; @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *************** *** 1748,1753 **** --- 1954,1975 ---- dump_core {Do something to cause a core dump} @z + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % Finnish + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + @x l.23554 + incompatible extensions of \TeX\ from proliferating. + @^system dependencies@> + @^extensions to \TeX@> + @y + incompatible extensions of \TeX\ from proliferating. + @^system dependencies@> + @^extensions to \TeX@> + The support for different hyphenation algorithms is also implemented + as an extension. + @^Finnish hyphenation@> + @z + %% End of Finnish %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % [54.1376] add editor-switch variables to globals %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%