[tex-k] Re: vftovp strange behaviour

Olaf Weber olaf at infovore.xs4all.nl
Fri Jul 15 19:14:16 CEST 2005


Patrick Gundlach writes:

> So, the bug report now is:

> 'The error message is misleading and vftovp returns incorrect error
> code'. 

That's fairly easy to fix:

Index: vftovp.ch
===================================================================
RCS file: /usr/local/cvsroot/texk/texk/web2c/vftovp.ch,v
retrieving revision 1.8
diff -u -r1.8 vftovp.ch
--- vftovp.ch   14 Jul 2004 06:43:18 -0000      1.8
+++ vftovp.ch   15 Jul 2005 17:11:05 -0000
@@ -191,16 +191,37 @@
 else  begin font_bc:=0; font_ec:=256; {will cause error if not modified soon}
 @y
 tfm_name := kpse_find_tfm (cur_name);
-free (cur_name);
 if not tfm_name then
-  print_ln('---not loaded, TFM file can''t be opened!')
+  print_ln('---not loaded, TFM file ', stringcast(cur_name),
+           ' can''t be opened!');
 @.TFM file can\'t be opened@>
 else begin
   resetbin (tfm_file, tfm_name);
-  free (tfm_name);
   font_bc:=0; font_ec:=256; {will cause error if not modified soon}
 @z

+ at x [39] Better diagnostics.
+    if font_ec>255 then print_ln('---not loaded, bad TFM file!')
+ at .bad TFM file@>
+ at y
+    if font_ec>255 then
+      print_ln('---not loaded, bad TFM file ', stringcast(tfm_name), '!')
+ at .bad TFM file@>
+ at z
+
+ at x [39] Better diagnostics.
+    print_ln('---trouble is brewing, TFM file ended too soon!');
+ at .trouble is brewing...@>
+  end;
+ at y
+    print_ln('---trouble is brewing, TFM file ', stringcast(tfm_name),
+             ' ended too soon!');
+ at .trouble is brewing...@>
+    free(tfm_name);
+  end;
+free(cur_name);
+ at z
+
 @x [40] Be quiet if not -verbose.
     begin print_ln('Check sum in VF file being replaced by TFM check sum');
 @y

> and perhaps:

> 'vftovp relies on the referenced tfm to be found.' The other way round
> seems to work fine without these referenced tfm data. Why does vftovp
> rely on these files?

That's likely an artifact of the history of the program, code copied
from dvitype.

-- 
Olaf Weber

               (This space left blank for technical reasons.)



More information about the tex-k mailing list