[tex-k] bug in texmfmp.c (Omega-1.23)

Akira Kakuto kakuto@fsci.fuk.kindai.ac.jp
Thu, 28 Mar 2002 18:20:31 +0900


I think file names in ipcpage (in the case of #define IPC 1)
and source specials become correct by the following change
for omega-1.23.  In the original case, strange names are
returned.

Akira
-------------------------------------------------
 
--- texmfmp.c.orig	Tue Nov 27 20:40:30 2001
+++ texmfmp.c	Thu Mar 28 18:00:33 2002
@@ -491,15 +491,15 @@
 #ifndef Omega
     len = strstart[outputfilename + 1] - strstart[outputfilename];
 #else
-    len = strstartar[outputfilename + 1 - 65535L] -
-            strstartar[outputfilename - 65535L];
+    len = strstartar[outputfilename + 1 - 65536L] -
+            strstartar[outputfilename - 65536L];
 #endif
     name = (string)xmalloc (len + 1);
 #ifndef Omega
     strncpy (name, &strpool[strstart[outputfilename]], len);
 #else
     for (i=0; i<len; i++)
-      name[i] =  strpool[i+strstartar[outputfilename - 65535L]];
+      name[i] =  strpool[i+strstartar[outputfilename - 65536L]];
 #endif
     name[len] = 0;
     
@@ -1506,14 +1506,14 @@
 #ifndef Omega
   len = strstart[s + 1] - strstart[s];
 #else
-  len = strstartar[s + 1 - 65535L] - strstartar[s - 65535L];
+  len = strstartar[s + 1 - 65536L] - strstartar[s - 65536L];
 #endif
   name = (string)xmalloc (len + 1);
 #ifndef Omega
   strncpy (name, (string)&strpool[strstart[s]], len);
 #else
   /* Don't use strncpy.  The strpool is not made up of chars. */
-  for (i=0; i<len; i++) name[i] =  strpool[i+strstartar[s - 65535L]];
+  for (i=0; i<len; i++) name[i] =  strpool[i+strstartar[s - 65536L]];
 #endif
   name[len] = 0;
   return name;