[tex-k] Patch for -Wall

Akira Kakuto kakuto at fsci.fuk.kindai.ac.jp
Sat Dec 31 08:51:00 CET 2005


> I suspect the above should be
... ...
> 

[On tex-make.c]

Better one will be the following.
Note that spaces are removed from the mag argument:

--- tex-make.c.orig	Wed Aug 03 20:06:00 2005
+++ tex-make.c	Sat Dec 31 16:34:29 2005
@@ -30,7 +30,9 @@
 #include <kpathsea/readable.h>
 #include <kpathsea/tex-make.h>
 #include <kpathsea/variable.h>
-
+#ifndef WIN32
+#  include <sys/wait.h>
+#endif
 
 /* We never throw away stdout, since that is supposed to be the filename
    found, if all is successful.  This variable controls whether stderr
@@ -66,13 +68,13 @@
 
           if (f > 1) {
               if (r > 0) {
-                  sprintf(q, "%u+%u/(%u*%u + %u)",
+                  sprintf(q, "%u+%u/(%u*%u+%u)",
                           dpi/bdpi, dpi%bdpi, f, (bdpi - r)/f, r);
               } else {
                   sprintf(q, "%u+%u/(%u*%u)", dpi/bdpi, dpi%bdpi, f, bdpi/f);
               }
           } else {
-              sprintf(q, "%u+%u/(4000 + %u)", dpi/bdpi, dpi%bdpi, bdpi, r);
+              sprintf(q, "%u+%u/(4000+%u)", dpi/bdpi, dpi%bdpi, r);
           }
       }
   } else {
@@ -99,7 +101,7 @@
 {
   static FILE *missfont = NULL;
   string *s;
-  
+
   /* If we weren't trying to make a font, do nothing.  Maybe should
      allow people to specify what they want recorded?  */
   if (format != kpse_gf_format
@@ -157,7 +159,7 @@
   string *s;
   string ret;
   string fn;
-  
+
   if (!kpse_make_tex_discard_errors) {
     fprintf (stderr, "kpathsea: Running");
     for (s = &args[0]; *s != NULL; s++)
@@ -409,7 +411,6 @@
       /* Parent */
       char buf[1024+1];
       int num;
-      int status;
 
       /* Clean up child file descriptors that we won't use anyway. */
       close(childin);



Best
Akira



More information about the tex-k mailing list