home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / tex / texsrc2 / Src / fontutil / gftopk / ch next >
Encoding:
Text File  |  1993-05-21  |  15.7 KB  |  528 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.   riscos_type:=riscos_pktype;
  288.   rewrite (pk_file, pk_name);
  289.   pk_loc := 0;
  290.   pk_open := true
  291. end;
  292. @z
  293.  
  294. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  295. % [46] Redefine pk_byte, pk_halfword, pk_three_bytes, and pk_word.
  296. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  297. @x
  298. @p procedure pk_byte(a:integer) ;
  299. begin
  300.    if pk_open then begin
  301.       if a < 0 then a := a + 256 ;
  302.       write(pk_file, a) ;
  303.       incr(pk_loc) ;
  304.    end ;
  305. end ;
  306. @#
  307. procedure pk_halfword(a:integer) ;
  308. begin
  309.    if a < 0 then a := a + 65536 ;
  310.    write(pk_file, a div 256) ;
  311.    write(pk_file, a mod 256) ;
  312.    pk_loc := pk_loc + 2 ;
  313. end ;
  314. @#
  315. procedure pk_three_bytes(a:integer);
  316. begin
  317.    write(pk_file, a div 65536 mod 256) ;
  318.    write(pk_file, a div 256 mod 256) ;
  319.    write(pk_file, a mod 256) ;
  320.    pk_loc := pk_loc + 3 ;
  321. end ;
  322. @#
  323. procedure pk_word(a:integer) ;
  324. var b : integer ;
  325. begin
  326.    if pk_open then begin
  327.       if a < 0 then begin
  328.          a := a + @'10000000000 ;
  329.          a := a + @'10000000000 ;
  330.          b := 128 + a div 16777216 ;
  331.       end else b := a div 16777216 ;
  332.       write(pk_file, b) ;
  333.       write(pk_file, a div 65536 mod 256) ;
  334.       write(pk_file, a div 256 mod 256) ;
  335.       write(pk_file, a mod 256) ;
  336.       pk_loc := pk_loc + 4 ;
  337.    end ;
  338. end ;
  339. @y
  340. @ Output is handled through |putbyte| which is supplied by web2c.
  341.  
  342. @d pk_byte(#)==begin putbyte(#, pk_file); incr(pk_loc) end
  343.  
  344. @p procedure pk_halfword(a:integer) ;
  345. begin
  346.    if a < 0 then a := a + 65536 ;
  347.    putbyte(a div 256, pk_file) ;
  348.    putbyte(a mod 256, pk_file) ;
  349.    pk_loc := pk_loc + 2 ;
  350. end ;
  351. @#
  352. procedure pk_three_bytes(a:integer);
  353. begin
  354.    putbyte(a div 65536 mod 256, pk_file) ;
  355.    putbyte(a div 256 mod 256, pk_file) ;
  356.    putbyte(a mod 256, pk_file) ;
  357.    pk_loc := pk_loc + 3 ;
  358. end ;
  359. @#
  360. procedure pk_word(a:integer) ;
  361. var b : integer ;
  362. begin
  363.    if a < 0 then begin
  364.       a := a + @'10000000000 ;
  365.       a := a + @'10000000000 ;
  366.       b := 128 + a div 16777216 ;
  367.    end else b := a div 16777216 ;
  368.    putbyte(b, pk_file) ;
  369.    putbyte(a div 65536 mod 256, pk_file) ;
  370.    putbyte(a div 256 mod 256, pk_file) ;
  371.    putbyte(a mod 256, pk_file) ;
  372.    pk_loc := pk_loc + 4 ;
  373. end ;
  374. @z
  375.  
  376. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  377. % [48] Redefine find_gf_length and move_to_byte.
  378. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  379. @x
  380. @p procedure find_gf_length ;
  381. begin
  382.    set_pos(gf_file, -1) ; gf_len := cur_pos(gf_file) ;
  383. end ;
  384. @#
  385. procedure move_to_byte(@!n : integer) ;
  386. begin
  387.    set_pos(gf_file, n); gf_loc := n ;
  388. end ;
  389. @y
  390. @d find_gf_length==gf_len:=gf_length
  391.  
  392. @p function gf_length:integer;
  393. begin
  394.   checked_fseek (gf_file, 0, 2);
  395.   gf_length := ftell (gf_file);
  396. end;
  397. @#
  398. procedure move_to_byte (n:integer);
  399. begin checked_fseek (gf_file, n, 0);
  400. end;
  401. @z
  402.  
  403. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  404. % [53] Make sure that |gf_byte| gets past the comment when not
  405. % |verbose|; add do_the_rows to break up huge run of cases.
  406. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  407. @x
  408.    repeat
  409.      gf_com := gf_byte ;
  410.      case gf_com of
  411. @y
  412.    repeat
  413.      gf_com := gf_byte ;
  414.      do_the_rows:=false;
  415.      case gf_com of
  416. @z
  417.  
  418. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  419. % [54] Declare |thirty_seven_cases| to help avoid breaking yacc.
  420. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  421. @x
  422. @d one_sixty_five_cases(#)==sixty_four_cases(#),sixty_four_cases(#+64),
  423.          sixteen_cases(#+128),sixteen_cases(#+144),four_cases(#+160),#+164
  424. @y
  425. @d thirty_seven_cases(#)==sixteen_cases(#),sixteen_cases(#+16),
  426.      four_cases(#+32),#+36
  427. @d new_row_64=new_row_0 + 64
  428. @d new_row_128=new_row_64 + 64
  429. @z
  430.  
  431. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  432. % [59] Break up an oversized sequence of cases for yacc.
  433. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  434. @x
  435. one_sixty_five_cases(new_row_0) : begin
  436.   if on = state then put_in_rows(extra) ;
  437.   put_in_rows(end_of_row) ;
  438.   on := true ; extra := gf_com - new_row_0 ; state := false ;
  439. end ;
  440. @t\4@>@<Specials and |no_op| cases@> ;
  441. eoc : begin
  442.   if on = state then put_in_rows(extra) ;
  443.   if ( row_ptr > 2 ) and ( row[row_ptr - 1] <> end_of_row) then
  444.     put_in_rows(end_of_row) ;
  445.   put_in_rows(end_of_char) ;
  446.   if bad then abort('Ran out of internal memory for row counts!') ;
  447. @.Ran out of memory@>
  448.   pack_and_send_character ;
  449.   status[gf_ch_mod_256] := sent ;
  450.   if pk_loc <> pred_pk_loc then
  451.     abort('Internal error while writing character!') ;
  452. @.Internal error@>
  453. end ;
  454. othercases bad_gf('Unexpected ',gf_com:1,' command in character definition')
  455. @.Unexpected command@>
  456.     endcases ;
  457. @y
  458. sixty_four_cases(new_row_0) : do_the_rows:=true;
  459. sixty_four_cases(new_row_64) : do_the_rows:=true;
  460. thirty_seven_cases(new_row_128) : do_the_rows:=true;
  461. @<Specials and |no_op| cases@> ;
  462. eoc : begin
  463.   if on = state then put_in_rows(extra) ;
  464.   if ( row_ptr > 2 ) and ( row[row_ptr - 1] <> end_of_row) then
  465.     put_in_rows(end_of_row) ;
  466.   put_in_rows(end_of_char) ;
  467.   if bad then abort('Ran out of internal memory for row counts!') ;
  468. @.Ran out of memory@>
  469.   pack_and_send_character ;
  470.   status[gf_ch_mod_256] := sent ;
  471.   if pk_loc <> pred_pk_loc then
  472.     abort('Internal error while writing character!') ;
  473. @.Internal error@>
  474. end ;
  475. othercases bad_gf('Unexpected ',gf_com:1,' character in character definition');
  476.     endcases ;
  477. if do_the_rows then begin
  478.   do_the_rows:=false;
  479.   if on = state then put_in_rows(extra) ;
  480.   put_in_rows(end_of_row) ;
  481.   on := true ; extra := gf_com - new_row_0 ; state := false ;
  482. end ;
  483. @z
  484.  
  485. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  486. % [60] Add do_the_rows to break up huge run of cases.
  487. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  488. @x
  489. @ A few more locals used above and below:
  490.  
  491. @<Locals to |convert_gf_file|@>=
  492. @y
  493. @ A few more locals used above and below:
  494.  
  495. @<Locals to |convert_gf_file|@>=
  496. @!do_the_rows:boolean;
  497. @z
  498.  
  499. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  500. % [81] Don't add `GFtoPK 2.3 output from ' to the font comment.
  501. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  502. @x
  503. @d comm_length = 23 {length of |preamble_comment|}
  504. @d from_length = 6 {length of its |' from '| part}
  505. @y
  506. @d comm_length = 0 {length of |preamble_comment|}
  507. @d from_length = 0 {length of its |' from '| part}
  508. @z
  509.  
  510. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  511. % [83] Don't do any assignments to |preamble_comment|.
  512. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  513. @x
  514. @ @<Set init...@>=
  515. comment := preamble_comment ;
  516. @y
  517. @z
  518.  
  519. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  520. % [86] Remove the final_end label
  521. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  522. @x
  523. final_end : end .
  524. @y
  525. end.
  526. @z
  527.