Hi Werner!

> > In my Makefile I always had the problem that wftodm would work with
> > dg, dm, mc and mr, but would fail with mc2 and mr2.  When run
> > manually, all the commands have no problem, but when mc2 and mr2 are
> > put in a Makefile, they end with "error 192".
> 
> Well, wftodm is, hmm, very sparse.  The `main' routine lacks a return
> value; this might be the reason for it.  Try to insert a `return 0' at
> the very end of `main' (this is, right before the final closing brace
> of this function), maybe this fixes the problem.

It works!  Thanks.

The current patch that I use looks as follows:


--- ./wftodm-orig2.c      Tue Sep 23 22:45:32 1997
+++ ./wftodm.c    Tue Aug 25 13:13:09 1998
@@ -1,4 +1,6 @@
 #include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
 #include <sys/types.h>
-#include <sys/time.h>
+#include <time.h>
 char *charstrs[34][256];
@@ -158,4 +160,5 @@
     }
   }
+return 0;
 }
 output_afm(file)
@@ -209,14 +212,13 @@
   fprintf(ofp,"/UnderlineThickness 0 def\n");
   fprintf(ofp,"end readonly def\n");
   fprintf(ofp,"/FontName /%s def\n",fontname);
-  fprintf(ofp,"/DmEncoding [\n");
+  fprintf(ofp,"/Encoding 256 array\n");
+  fprintf(ofp,"0 1 255 {1 index exch /.notdef put} for\n");
   for(i=0;i<16;i++){
     for(j=0;j<16;j++)
-      fprintf(ofp," /c%02X",i*16+j);
-    putc('\n',ofp);
+      fprintf(ofp,"dup %d /c%02X put\n",i*16+j,i*16+j);
   }
-  fprintf(ofp,"] readonly def\n");
-  fprintf(ofp,"/Encoding DmEncoding def\n");
+  fprintf(ofp,"readonly def\n");
   fprintf(ofp,"/PaintType 0 def\n");
   fprintf(ofp,"/FontType 1 def\n");
   fprintf(ofp,"/FontMatrix [.001 0 0 .001 0 -0.16] readonly def\n");


Best regards



Danai SAE-HAN
韓達耐

-- 
题目:《与薛肇明弈棋赌梅花诗输一首》
作者:王安石(1021-1086)

华发寻春喜见梅,一株临路雪倍堆。
凤城南陌他年忆,香杳难随驿使来。

_______________________________________________
Cjk maillist  -  [email protected]
http://lists.ffii.org/mailman/listinfo/cjk

Reply via email to