home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / tex / texsrc2 / Src / fontutil / gftopk / old-ch < prev    next >
Encoding:
Text File  |  1993-01-26  |  15.7 KB  |  527 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. var j: integer;
  170. begin
  171.   verbose := false;
  172.   pk_arg := 3;
  173.   if (argc < 2) or (argc > 4)
  174.   then usage;
  175.  
  176.   argv (1, gf_name);
  177.   if gf_name[1] = xchr["-"]
  178.   then begin
  179.     if gf_name[2]=xchr["v"]
  180.     then begin
  181.       verbose := true;
  182.       argv (2, gf_name);
  183.       incr (pk_arg)
  184.     end else
  185.       usage;
  186.   end;
  187.  
  188.   print (banner); print_ln (version_string);
  189.   if test_read_access (gf_name, GFFILEPATH)
  190.   then begin
  191.     reset (gf_file, gf_name)
  192.   end else begin
  193.     print_pascal_string (gf_name);
  194.     abort(': GF file not found.');
  195.   end;
  196.  
  197.   gf_loc:=0;
  198. end;
  199. @z
  200.  
  201. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  202. % [41] If the PK filename isn't given on the command line, we construct
  203. % it from the GF filename.
  204. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  205. @x
  206. @ To prepare the |pk_file| for output, we |rewrite| it.
  207.  
  208. @p procedure open_pk_file; {prepares to write packed bytes in |pk_file|}
  209. begin rewrite(pk_file);
  210. pk_loc := 0 ; pk_open := true ;
  211. end;
  212. @y
  213. procedure open_pk_file; {prepares to write packed bytes in |pk_file|}
  214. var dot_pos, slash_pos, last, gf_index, pk_index:integer;
  215.   @!pk_name: UNIX_file_name;
  216. begin
  217.   if argc = pk_arg
  218.   then argv (argc - 1, pk_name)
  219.   else begin
  220.     dot_pos := -1;
  221.     slash_pos := -1;
  222.     last := 1;
  223.     
  224.     {Find the end of |gf_name|.}
  225.     while (gf_name[last] <> ' ') and (last <= PATH_MAX - 5)
  226.     do begin
  227.       if gf_name[last] = '.' then dot_pos := last;
  228.       if gf_name[last] = '/' then slash_pos := last;
  229.       incr (last);
  230.     end;
  231.     
  232.     {If no \./ in |gf_name|, use it from the beginning.}
  233.     if slash_pos = -1 then slash_pos := 0;
  234.     
  235.     {Filenames like \.{./foo} will have |dot_pos<slash_pos|.  In that
  236.      case, we want to move |dot_pos| to the end of |gf_name|.  Similarly
  237.      if |dot_pos| is still |-1|.}
  238.     if dot_pos < slash_pos then dot_pos := last - 1;
  239.     
  240.     {Copy |gf_name| from |slash_pos+1| to |dot_pos| into |pk_name|.}
  241.     pk_index := 1;
  242.     for gf_index := slash_pos + 1 to dot_pos
  243.     do begin
  244.       pk_name[pk_index] := gf_name[gf_index];
  245.       incr (pk_index);
  246.     end;
  247.     
  248.     {Now we are ready to deal with the extension.  Copy everything to
  249.      the first \.g.  Then add \.{pk}.  This loses on filenames like
  250.      \.{foo.g300gf}, but no one uses such filenames, anyway.}
  251.     gf_index := dot_pos + 1;
  252.     while (gf_index < last) and (gf_name[gf_index] <> 'g')
  253.     do begin
  254.       pk_name[pk_index] := gf_name[gf_index];
  255.       incr (gf_index);
  256.       incr (pk_index);
  257.     end;
  258.     
  259.     pk_name[pk_index] := 'p';
  260.     pk_name[pk_index + 1] := 'k';
  261.     pk_name[pk_index + 2] := ' ';
  262.   end;
  263.  
  264.   {Report the filename mapping.}
  265.   print (xchr[xord['[']]);
  266.  
  267.   gf_index := 1;
  268.   while gf_name[gf_index] <> ' ' 
  269.   do begin
  270.     print (xchr[xord[gf_name[gf_index]]]);
  271.     incr (gf_index);
  272.   end;
  273.   
  274.   print (xchr[xord['-']]);
  275.   print (xchr[xord['>']]);
  276.  
  277.   pk_index := 1;
  278.   while pk_name[pk_index] <> ' ' 
  279.   do begin
  280.     print (xchr[xord[pk_name[pk_index]]]);
  281.     incr (pk_index);
  282.   end;
  283.   
  284.   print (xchr[xord[']']]);
  285.   print_ln (xchr[xord[' ']]);
  286.   
  287.   rewrite (pk_file, pk_name);
  288.   pk_loc := 0;
  289.   pk_open := true
  290. end;
  291. @z
  292.  
  293. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  294. % [46] Redefine pk_byte, pk_halfword, pk_three_bytes, and pk_word.
  295. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  296. @x
  297. @p procedure pk_byte(a:integer) ;
  298. begin
  299.    if pk_open then begin
  300.       if a < 0 then a := a + 256 ;
  301.       write(pk_file, a) ;
  302.       incr(pk_loc) ;
  303.    end ;
  304. end ;
  305. @#
  306. procedure pk_halfword(a:integer) ;
  307. begin
  308.    if a < 0 then a := a + 65536 ;
  309.    write(pk_file, a div 256) ;
  310.    write(pk_file, a mod 256) ;
  311.    pk_loc := pk_loc + 2 ;
  312. end ;
  313. @#
  314. procedure pk_three_bytes(a:integer);
  315. begin
  316.    write(pk_file, a div 65536 mod 256) ;
  317.    write(pk_file, a div 256 mod 256) ;
  318.    write(pk_file, a mod 256) ;
  319.    pk_loc := pk_loc + 3 ;
  320. end ;
  321. @#
  322. procedure pk_word(a:integer) ;
  323. var b : integer ;
  324. begin
  325.    if pk_open then begin
  326.       if a < 0 then begin
  327.          a := a + @'10000000000 ;
  328.          a := a + @'10000000000 ;
  329.          b := 128 + a div 16777216 ;
  330.       end else b := a div 16777216 ;
  331.       write(pk_file, b) ;
  332.       write(pk_file, a div 65536 mod 256) ;
  333.       write(pk_file, a div 256 mod 256) ;
  334.       write(pk_file, a mod 256) ;
  335.       pk_loc := pk_loc + 4 ;
  336.    end ;
  337. end ;
  338. @y
  339. @ Output is handled through |putbyte| which is supplied by web2c.
  340.  
  341. @d pk_byte(#)==begin putbyte(#, pk_file); incr(pk_loc) end
  342.  
  343. @p procedure pk_halfword(a:integer) ;
  344. begin
  345.    if a < 0 then a := a + 65536 ;
  346.    putbyte(a div 256, pk_file) ;
  347.    putbyte(a mod 256, pk_file) ;
  348.    pk_loc := pk_loc + 2 ;
  349. end ;
  350. @#
  351. procedure pk_three_bytes(a:integer);
  352. begin
  353.    putbyte(a div 65536 mod 256, pk_file) ;
  354.    putbyte(a div 256 mod 256, pk_file) ;
  355.    putbyte(a mod 256, pk_file) ;
  356.    pk_loc := pk_loc + 3 ;
  357. end ;
  358. @#
  359. procedure pk_word(a:integer) ;
  360. var b : integer ;
  361. begin
  362.    if a < 0 then begin
  363.       a := a + @'10000000000 ;
  364.       a := a + @'10000000000 ;
  365.       b := 128 + a div 16777216 ;
  366.    end else b := a div 16777216 ;
  367.    putbyte(b, pk_file) ;
  368.    putbyte(a div 65536 mod 256, pk_file) ;
  369.    putbyte(a div 256 mod 256, pk_file) ;
  370.    putbyte(a mod 256, pk_file) ;
  371.    pk_loc := pk_loc + 4 ;
  372. end ;
  373. @z
  374.  
  375. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  376. % [48] Redefine find_gf_length and move_to_byte.
  377. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  378. @x
  379. @p procedure find_gf_length ;
  380. begin
  381.    set_pos(gf_file, -1) ; gf_len := cur_pos(gf_file) ;
  382. end ;
  383. @#
  384. procedure move_to_byte(@!n : integer) ;
  385. begin
  386.    set_pos(gf_file, n); gf_loc := n ;
  387. end ;
  388. @y
  389. @d find_gf_length==gf_len:=gf_length
  390.  
  391. @p function gf_length:integer;
  392. begin
  393.   checked_fseek (gf_file, 0, 2);
  394.   gf_length := ftell (gf_file);
  395. end;
  396. @#
  397. procedure move_to_byte (n:integer);
  398. begin checked_fseek (gf_file, n, 0);
  399. end;
  400. @z
  401.  
  402. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  403. % [53] Make sure that |gf_byte| gets past the comment when not
  404. % |verbose|; add do_the_rows to break up huge run of cases.
  405. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  406. @x
  407.    repeat
  408.      gf_com := gf_byte ;
  409.      case gf_com of
  410. @y
  411.    repeat
  412.      gf_com := gf_byte ;
  413.      do_the_rows:=false;
  414.      case gf_com of
  415. @z
  416.  
  417. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  418. % [54] Declare |thirty_seven_cases| to help avoid breaking yacc.
  419. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  420. @x
  421. @d one_sixty_five_cases(#)==sixty_four_cases(#),sixty_four_cases(#+64),
  422.          sixteen_cases(#+128),sixteen_cases(#+144),four_cases(#+160),#+164
  423. @y
  424. @d thirty_seven_cases(#)==sixteen_cases(#),sixteen_cases(#+16),
  425.      four_cases(#+32),#+36
  426. @d new_row_64=new_row_0 + 64
  427. @d new_row_128=new_row_64 + 64
  428. @z
  429.  
  430. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  431. % [59] Break up an oversized sequence of cases for yacc.
  432. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  433. @x
  434. one_sixty_five_cases(new_row_0) : begin
  435.   if on = state then put_in_rows(extra) ;
  436.   put_in_rows(end_of_row) ;
  437.   on := true ; extra := gf_com - new_row_0 ; state := false ;
  438. end ;
  439. @t\4@>@<Specials and |no_op| cases@> ;
  440. eoc : begin
  441.   if on = state then put_in_rows(extra) ;
  442.   if ( row_ptr > 2 ) and ( row[row_ptr - 1] <> end_of_row) then
  443.     put_in_rows(end_of_row) ;
  444.   put_in_rows(end_of_char) ;
  445.   if bad then abort('Ran out of internal memory for row counts!') ;
  446. @.Ran out of memory@>
  447.   pack_and_send_character ;
  448.   status[gf_ch_mod_256] := sent ;
  449.   if pk_loc <> pred_pk_loc then
  450.     abort('Internal error while writing character!') ;
  451. @.Internal error@>
  452. end ;
  453. othercases bad_gf('Unexpected ',gf_com:1,' command in character definition')
  454. @.Unexpected command@>
  455.     endcases ;
  456. @y
  457. sixty_four_cases(new_row_0) : do_the_rows:=true;
  458. sixty_four_cases(new_row_64) : do_the_rows:=true;
  459. thirty_seven_cases(new_row_128) : do_the_rows:=true;
  460. @<Specials and |no_op| cases@> ;
  461. eoc : begin
  462.   if on = state then put_in_rows(extra) ;
  463.   if ( row_ptr > 2 ) and ( row[row_ptr - 1] <> end_of_row) then
  464.     put_in_rows(end_of_row) ;
  465.   put_in_rows(end_of_char) ;
  466.   if bad then abort('Ran out of internal memory for row counts!') ;
  467. @.Ran out of memory@>
  468.   pack_and_send_character ;
  469.   status[gf_ch_mod_256] := sent ;
  470.   if pk_loc <> pred_pk_loc then
  471.     abort('Internal error while writing character!') ;
  472. @.Internal error@>
  473. end ;
  474. othercases bad_gf('Unexpected ',gf_com:1,' character in character definition');
  475.     endcases ;
  476. if do_the_rows then begin
  477.   do_the_rows:=false;
  478.   if on = state then put_in_rows(extra) ;
  479.   put_in_rows(end_of_row) ;
  480.   on := true ; extra := gf_com - new_row_0 ; state := false ;
  481. end ;
  482. @z
  483.  
  484. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  485. % [60] Add do_the_rows to break up huge run of cases.
  486. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  487. @x
  488. @ A few more locals used above and below:
  489.  
  490. @<Locals to |convert_gf_file|@>=
  491. @y
  492. @ A few more locals used above and below:
  493.  
  494. @<Locals to |convert_gf_file|@>=
  495. @!do_the_rows:boolean;
  496. @z
  497.  
  498. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  499. % [81] Don't add `GFtoPK 2.3 output from ' to the font comment.
  500. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  501. @x
  502. @d comm_length = 23 {length of |preamble_comment|}
  503. @d from_length = 6 {length of its |' from '| part}
  504. @y
  505. @d comm_length = 0 {length of |preamble_comment|}
  506. @d from_length = 0 {length of its |' from '| part}
  507. @z
  508.  
  509. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  510. % [83] Don't do any assignments to |preamble_comment|.
  511. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  512. @x
  513. @ @<Set init...@>=
  514. comment := preamble_comment ;
  515. @y
  516. @z
  517.  
  518. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  519. % [86] Remove the final_end label
  520. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  521. @x
  522. final_end : end .
  523. @y
  524. end.
  525. @z
  526.