home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-src.tgz / tar.out / contrib / unixtex / web2c / fontutil / gftopk.ch < prev    next >
Encoding:
Text File  |  1996-09-28  |  15.7 KB  |  526 lines

  1. % gftopk.ch for C compilation with web2c.
  2. %
  3. % 09/19/88 Pierre A. MacKay    Version 1.4.
  4. % 12/02/89 Karl Berry        2.1.
  5. % 01/20/90 Karl            2.2.
  6. % (more recent changes in ./ChangeLog)
  7. % One major change in output format is made by this change file.  The
  8. % local gftopk preamble comment is ignored and the dated METAFONT
  9. % comment is passed through unaltered.  This provides a continuous check
  10. % on the origin of fonts in both gf and pk formats.  The program runs
  11. % silently unless it is given the -v switch in the command line.
  12.  
  13.  
  14. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  15. % [0] WEAVE: print changes only.
  16. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  17. @x
  18. \pageno=\contentspagenumber \advance\pageno by 1
  19. @y
  20. \pageno=\contentspagenumber \advance\pageno by 1
  21. \let\maybe=\iffalse
  22. \def\title{GF$\,$\lowercase{to}$\,$PK changes C}
  23. @z
  24.  
  25. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  26. % [1] Change banner string.
  27. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  28. @x
  29. @d banner=='This is GFtoPK, Version 2.3' {printed when the program starts}
  30. @y
  31. @d banner=='This is GFtoPK 2.3' {printed when the program starts}
  32. @z
  33.  
  34. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  35. % [4] Redefine program header.
  36. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  37. @x
  38. @ The binary input comes from |gf_file|, and the output font is written
  39. on |pk_file|.  All text output is written on \PASCAL's standard |output|
  40. file.  The term |print| is used instead of |write| when this program writes
  41. on |output|, so that all such output could easily be redirected if desired.
  42.  
  43. @d print(#)==write(#)
  44. @d print_ln(#)==write_ln(#)
  45.  
  46. @p program GFtoPK(@!gf_file,@!pk_file,@!output);
  47. label @<Labels in the outer block@>@/
  48. const @<Constants in the outer block@>@/
  49. type @<Types in the outer block@>@/
  50. var @<Globals in the outer block@>@/
  51. procedure initialize; {this procedure gets things started properly}
  52.   var i:integer; {loop index for initializations}
  53.   begin print_ln(banner);@/
  54.   @<Set initial values@>@/
  55.   end;
  56. @y
  57. @ The binary input comes from |gf_file|, and the output font is written
  58. on |pk_file|.  All text output is written on \PASCAL's standard |output|
  59. file.  The term |print| is used instead of |write| when this program writes
  60. on |output|, so that all such output could easily be redirected if desired.
  61. Since the terminal output is really not very interesting, it is
  62. produced only when the \.{-v} command line flag is presented.
  63.  
  64. @d term_out==stdout {standard output}
  65. @d print(#)==if verbose then write(term_out, #)
  66. @d print_ln(#)==if verbose then write_ln(term_out, #)
  67.  
  68. @p program GFtoPK;
  69. const @<Constants in the outer block@>@/
  70. type @<Types in the outer block@>@/
  71. var @<Globals in the outer block@>@/
  72. procedure initialize; {this procedure gets things started properly}
  73.   var i:integer; {loop index for initializations}
  74.   begin 
  75.   set_paths (GF_FILE_PATH_BIT);@/
  76.   @<Set initial values@>;@/
  77.   end;
  78. @z
  79.  
  80. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  81. % [5] Eliminate the |final_end| label.
  82. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  83. @x
  84. @ If the program has to stop prematurely, it goes to the
  85. `|final_end|'.
  86.  
  87. @d final_end=9999 {label for the end of it all}
  88.  
  89. @<Labels...@>=final_end;
  90. @y
  91. @ This module is deleted, because it is only useful for
  92. a non-local goto, which we can't use in C.
  93. @z
  94.  
  95. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  96. % [7] Allow for bigger fonts.  Too bad it's not dynamically allocated.
  97. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  98. @x
  99. @!max_row=16000; {largest index in the main |row| array}
  100. @y
  101. @!max_row=100000; {largest index in the main |row| array}
  102. @z
  103.  
  104. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  105. % [8] Make `abort' end with a newline, and remove the nonlocal goto.
  106. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  107. @x
  108. @d abort(#)==begin print(' ',#); jump_out;
  109.     end
  110. @d bad_gf(#)==abort('Bad GF file: ',#,'!')
  111. @.Bad GF file@>
  112.  
  113. @p procedure jump_out;
  114. begin goto final_end;
  115. end;
  116. @y
  117. @d abort(#)==begin verbose := true; print_ln(#); uexit (1);
  118.     end
  119. @d bad_gf(#)==abort('Bad GF file: ',#,'!')
  120. @.Bad GF file@>
  121. @z
  122.  
  123. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  124. % [38] Add UNIX_file_name type.
  125. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  126. @x
  127. @!eight_bits=0..255; {unsigned one-byte quantity}
  128. @!byte_file=packed file of eight_bits; {files that contain binary data}
  129. @y
  130. @!eight_bits=0..255; {unsigned one-byte quantity}
  131. @!byte_file=packed file of eight_bits; {files that contain binary data}
  132. @!UNIX_file_name=packed array [1..PATH_MAX] of char;
  133. @z
  134.  
  135. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  136. % [39] Add globals.
  137. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  138. @x
  139. @!gf_file:byte_file; {the stuff we are \.{GFtoPK}ing}
  140. @!pk_file:byte_file; {the stuff we have \.{GFtoPK}ed}
  141. @y
  142. @!gf_file:byte_file; {the stuff we are \.{GFtoPK}ing}
  143. @!pk_file:byte_file; {the stuff we have \.{GFtoPK}ed}
  144. @!verbose:boolean; {chatter about the conversion?}
  145. @!pk_arg:integer; {where we may be looking for the name of the |pk_file|}
  146. @!gf_name: UNIX_file_name;
  147. @z
  148.  
  149. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  150. % [40] Use paths in open_gf_file.
  151. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  152. @x
  153. @ To prepare the |gf_file| for input, we |reset| it.
  154.  
  155. @p procedure open_gf_file; {prepares to read packed bytes in |gf_file|}
  156. begin reset(gf_file);
  157. gf_loc := 0 ;
  158. end;
  159. @y
  160. @ In C, we use the external |test_read_access| procedure, which also
  161. does path searching based on the user's environment or the default path.
  162. In the course of this routine we also check the command line for the
  163. \.{-v} flag, and make other checks to see that it is worth running this
  164. program at all.
  165.  
  166. @d usage==abort ('Usage: gftopk [-v] <gf file> [pk file].')
  167.  
  168. @p procedure open_gf_file; {prepares to read packed bytes in |gf_file|}
  169. begin
  170.   verbose := false;
  171.   pk_arg := 3;
  172.   if (argc < 2) or (argc > 4)
  173.   then usage;
  174.  
  175.   argv (1, gf_name);
  176.   if gf_name[1] = xchr["-"]
  177.   then begin
  178.     if gf_name[2]=xchr["v"]
  179.     then begin
  180.       verbose := true;
  181.       argv (2, gf_name);
  182.       incr (pk_arg)
  183.     end else
  184.       usage;
  185.   end;
  186.  
  187.   print (banner); print_ln (version_string);
  188.   if test_read_access (gf_name, GF_FILE_PATH)
  189.   then begin
  190.     reset (gf_file, gf_name)
  191.   end else begin
  192.     print_pascal_string (gf_name);
  193.     abort(': GF file not found.');
  194.   end;
  195.  
  196.   gf_loc:=0;
  197. end;
  198. @z
  199.  
  200. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  201. % [41] If the PK filename isn't given on the command line, we construct
  202. % it from the GF filename.
  203. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  204. @x
  205. @ To prepare the |pk_file| for output, we |rewrite| it.
  206.  
  207. @p procedure open_pk_file; {prepares to write packed bytes in |pk_file|}
  208. begin rewrite(pk_file);
  209. pk_loc := 0 ; pk_open := true ;
  210. end;
  211. @y
  212. procedure open_pk_file; {prepares to write packed bytes in |pk_file|}
  213. var dot_pos, slash_pos, last, gf_index, pk_index:integer;
  214.   @!pk_name: UNIX_file_name;
  215. begin
  216.   if argc = pk_arg
  217.   then argv (argc - 1, pk_name)
  218.   else begin
  219.     dot_pos := -1;
  220.     slash_pos := -1;
  221.     last := 1;
  222.     
  223.     {Find the end of |gf_name|.}
  224.     while (gf_name[last] <> ' ') and (last <= PATH_MAX - 5)
  225.     do begin
  226.       if gf_name[last] = '.' then dot_pos := last;
  227.       if gf_name[last] = '/' then slash_pos := last;
  228.       incr (last);
  229.     end;
  230.     
  231.     {If no \./ in |gf_name|, use it from the beginning.}
  232.     if slash_pos = -1 then slash_pos := 0;
  233.     
  234.     {Filenames like \.{./foo} will have |dot_pos<slash_pos|.  In that
  235.      case, we want to move |dot_pos| to the end of |gf_name|.  Similarly
  236.      if |dot_pos| is still |-1|.}
  237.     if dot_pos < slash_pos then dot_pos := last - 1;
  238.     
  239.     {Copy |gf_name| from |slash_pos+1| to |dot_pos| into |pk_name|.}
  240.     pk_index := 1;
  241.     for gf_index := slash_pos + 1 to dot_pos
  242.     do begin
  243.       pk_name[pk_index] := gf_name[gf_index];
  244.       incr (pk_index);
  245.     end;
  246.     
  247.     {Now we are ready to deal with the extension.  Copy everything to
  248.      the first \.g.  Then add \.{pk}.  This loses on filenames like
  249.      \.{foo.g300gf}, but no one uses such filenames, anyway.}
  250.     gf_index := dot_pos + 1;
  251.     while (gf_index < last) and (gf_name[gf_index] <> 'g')
  252.     do begin
  253.       pk_name[pk_index] := gf_name[gf_index];
  254.       incr (gf_index);
  255.       incr (pk_index);
  256.     end;
  257.     
  258.     pk_name[pk_index] := 'p';
  259.     pk_name[pk_index + 1] := 'k';
  260.     pk_name[pk_index + 2] := ' ';
  261.   end;
  262.  
  263.   {Report the filename mapping.}
  264.   print (xchr[xord['[']]);
  265.  
  266.   gf_index := 1;
  267.   while gf_name[gf_index] <> ' ' 
  268.   do begin
  269.     print (xchr[xord[gf_name[gf_index]]]);
  270.     incr (gf_index);
  271.   end;
  272.   
  273.   print (xchr[xord['-']]);
  274.   print (xchr[xord['>']]);
  275.  
  276.   pk_index := 1;
  277.   while pk_name[pk_index] <> ' ' 
  278.   do begin
  279.     print (xchr[xord[pk_name[pk_index]]]);
  280.     incr (pk_index);
  281.   end;
  282.   
  283.   print (xchr[xord[']']]);
  284.   print_ln (xchr[xord[' ']]);
  285.   
  286.   rewrite (pk_file, pk_name);
  287.   pk_loc := 0;
  288.   pk_open := true
  289. end;
  290. @z
  291.  
  292. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  293. % [46] Redefine pk_byte, pk_halfword, pk_three_bytes, and pk_word.
  294. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  295. @x
  296. @p procedure pk_byte(a:integer) ;
  297. begin
  298.    if pk_open then begin
  299.       if a < 0 then a := a + 256 ;
  300.       write(pk_file, a) ;
  301.       incr(pk_loc) ;
  302.    end ;
  303. end ;
  304. @#
  305. procedure pk_halfword(a:integer) ;
  306. begin
  307.    if a < 0 then a := a + 65536 ;
  308.    write(pk_file, a div 256) ;
  309.    write(pk_file, a mod 256) ;
  310.    pk_loc := pk_loc + 2 ;
  311. end ;
  312. @#
  313. procedure pk_three_bytes(a:integer);
  314. begin
  315.    write(pk_file, a div 65536 mod 256) ;
  316.    write(pk_file, a div 256 mod 256) ;
  317.    write(pk_file, a mod 256) ;
  318.    pk_loc := pk_loc + 3 ;
  319. end ;
  320. @#
  321. procedure pk_word(a:integer) ;
  322. var b : integer ;
  323. begin
  324.    if pk_open then begin
  325.       if a < 0 then begin
  326.          a := a + @'10000000000 ;
  327.          a := a + @'10000000000 ;
  328.          b := 128 + a div 16777216 ;
  329.       end else b := a div 16777216 ;
  330.       write(pk_file, b) ;
  331.       write(pk_file, a div 65536 mod 256) ;
  332.       write(pk_file, a div 256 mod 256) ;
  333.       write(pk_file, a mod 256) ;
  334.       pk_loc := pk_loc + 4 ;
  335.    end ;
  336. end ;
  337. @y
  338. @ Output is handled through |putbyte| which is supplied by web2c.
  339.  
  340. @d pk_byte(#)==begin putbyte(#, pk_file); incr(pk_loc) end
  341.  
  342. @p procedure pk_halfword(a:integer) ;
  343. begin
  344.    if a < 0 then a := a + 65536 ;
  345.    putbyte(a div 256, pk_file) ;
  346.    putbyte(a mod 256, pk_file) ;
  347.    pk_loc := pk_loc + 2 ;
  348. end ;
  349. @#
  350. procedure pk_three_bytes(a:integer);
  351. begin
  352.    putbyte(a div 65536 mod 256, pk_file) ;
  353.    putbyte(a div 256 mod 256, pk_file) ;
  354.    putbyte(a mod 256, pk_file) ;
  355.    pk_loc := pk_loc + 3 ;
  356. end ;
  357. @#
  358. procedure pk_word(a:integer) ;
  359. var b : integer ;
  360. begin
  361.    if a < 0 then begin
  362.       a := a + @'10000000000 ;
  363.       a := a + @'10000000000 ;
  364.       b := 128 + a div 16777216 ;
  365.    end else b := a div 16777216 ;
  366.    putbyte(b, pk_file) ;
  367.    putbyte(a div 65536 mod 256, pk_file) ;
  368.    putbyte(a div 256 mod 256, pk_file) ;
  369.    putbyte(a mod 256, pk_file) ;
  370.    pk_loc := pk_loc + 4 ;
  371. end ;
  372. @z
  373.  
  374. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  375. % [48] Redefine find_gf_length and move_to_byte.
  376. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  377. @x
  378. @p procedure find_gf_length ;
  379. begin
  380.    set_pos(gf_file, -1) ; gf_len := cur_pos(gf_file) ;
  381. end ;
  382. @#
  383. procedure move_to_byte(@!n : integer) ;
  384. begin
  385.    set_pos(gf_file, n); gf_loc := n ;
  386. end ;
  387. @y
  388. @d find_gf_length==gf_len:=gf_length
  389.  
  390. @p function gf_length:integer;
  391. begin
  392.   checked_fseek (gf_file, 0, 2);
  393.   gf_length := ftell (gf_file);
  394. end;
  395. @#
  396. procedure move_to_byte (n:integer);
  397. begin checked_fseek (gf_file, n, 0);
  398. end;
  399. @z
  400.  
  401. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  402. % [53] Make sure that |gf_byte| gets past the comment when not
  403. % |verbose|; add do_the_rows to break up huge run of cases.
  404. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  405. @x
  406.    repeat
  407.      gf_com := gf_byte ;
  408.      case gf_com of
  409. @y
  410.    repeat
  411.      gf_com := gf_byte ;
  412.      do_the_rows:=false;
  413.      case gf_com of
  414. @z
  415.  
  416. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  417. % [54] Declare |thirty_seven_cases| to help avoid breaking yacc.
  418. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  419. @x
  420. @d one_sixty_five_cases(#)==sixty_four_cases(#),sixty_four_cases(#+64),
  421.          sixteen_cases(#+128),sixteen_cases(#+144),four_cases(#+160),#+164
  422. @y
  423. @d thirty_seven_cases(#)==sixteen_cases(#),sixteen_cases(#+16),
  424.      four_cases(#+32),#+36
  425. @d new_row_64=new_row_0 + 64
  426. @d new_row_128=new_row_64 + 64
  427. @z
  428.  
  429. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  430. % [59] Break up an oversized sequence of cases for yacc.
  431. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  432. @x
  433. one_sixty_five_cases(new_row_0) : begin
  434.   if on = state then put_in_rows(extra) ;
  435.   put_in_rows(end_of_row) ;
  436.   on := true ; extra := gf_com - new_row_0 ; state := false ;
  437. end ;
  438. @t\4@>@<Specials and |no_op| cases@> ;
  439. eoc : begin
  440.   if on = state then put_in_rows(extra) ;
  441.   if ( row_ptr > 2 ) and ( row[row_ptr - 1] <> end_of_row) then
  442.     put_in_rows(end_of_row) ;
  443.   put_in_rows(end_of_char) ;
  444.   if bad then abort('Ran out of internal memory for row counts!') ;
  445. @.Ran out of memory@>
  446.   pack_and_send_character ;
  447.   status[gf_ch_mod_256] := sent ;
  448.   if pk_loc <> pred_pk_loc then
  449.     abort('Internal error while writing character!') ;
  450. @.Internal error@>
  451. end ;
  452. othercases bad_gf('Unexpected ',gf_com:1,' command in character definition')
  453. @.Unexpected command@>
  454.     endcases ;
  455. @y
  456. sixty_four_cases(new_row_0) : do_the_rows:=true;
  457. sixty_four_cases(new_row_64) : do_the_rows:=true;
  458. thirty_seven_cases(new_row_128) : do_the_rows:=true;
  459. @<Specials and |no_op| cases@> ;
  460. eoc : begin
  461.   if on = state then put_in_rows(extra) ;
  462.   if ( row_ptr > 2 ) and ( row[row_ptr - 1] <> end_of_row) then
  463.     put_in_rows(end_of_row) ;
  464.   put_in_rows(end_of_char) ;
  465.   if bad then abort('Ran out of internal memory for row counts!') ;
  466. @.Ran out of memory@>
  467.   pack_and_send_character ;
  468.   status[gf_ch_mod_256] := sent ;
  469.   if pk_loc <> pred_pk_loc then
  470.     abort('Internal error while writing character!') ;
  471. @.Internal error@>
  472. end ;
  473. othercases bad_gf('Unexpected ',gf_com:1,' character in character definition');
  474.     endcases ;
  475. if do_the_rows then begin
  476.   do_the_rows:=false;
  477.   if on = state then put_in_rows(extra) ;
  478.   put_in_rows(end_of_row) ;
  479.   on := true ; extra := gf_com - new_row_0 ; state := false ;
  480. end ;
  481. @z
  482.  
  483. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  484. % [60] Add do_the_rows to break up huge run of cases.
  485. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  486. @x
  487. @ A few more locals used above and below:
  488.  
  489. @<Locals to |convert_gf_file|@>=
  490. @y
  491. @ A few more locals used above and below:
  492.  
  493. @<Locals to |convert_gf_file|@>=
  494. @!do_the_rows:boolean;
  495. @z
  496.  
  497. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  498. % [81] Don't add `GFtoPK 2.3 output from ' to the font comment.
  499. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  500. @x
  501. @d comm_length = 23 {length of |preamble_comment|}
  502. @d from_length = 6 {length of its |' from '| part}
  503. @y
  504. @d comm_length = 0 {length of |preamble_comment|}
  505. @d from_length = 0 {length of its |' from '| part}
  506. @z
  507.  
  508. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  509. % [83] Don't do any assignments to |preamble_comment|.
  510. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  511. @x
  512. @ @<Set init...@>=
  513. comment := preamble_comment ;
  514. @y
  515. @z
  516.  
  517. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  518. % [86] Remove the final_end label
  519. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  520. @x
  521. final_end : end .
  522. @y
  523. end.
  524. @z
  525.