[tlbuild] kpsewhich problem [Cygwin]

Akira Kakuto kakuto at fuk.kindai.ac.jp
Sun Dec 20 01:46:42 CET 2009


Hi Karl,

> I reverted it, but I still don't get it.  Oh well, guess there's more
> important things to spend time on.

Because find_format() goes into infinite loop without f++.

Thanks,
Akira

--- kpsewhich.c.orig	Sun Dec 20 08:14:48 2009
+++ kpsewhich.c	Sun Dec 20 09:39:42 2009
@@ -159,24 +159,10 @@
 
       if (found)
         break;
-
-      /* Some trickery here: the extensions for kpse_fmt_format (which
-         is just .fmt) can clash with other extensions in use (how?),
-         and we prefer for those others to be preferred.  And we don't
-         want to change the integer value of kpse_fmt_format.  So skip
-         it when first encountered, then use it when we've done
-         everything else, and use it as the end-guard.  */
-      if (f == kpse_fmt_format) {
-        f = kpse_last_format;
-      } else if (++f == kpse_fmt_format) {
-        f++;
-      } else if (f == kpse_last_format) {
-        f = kpse_fmt_format;
-      }
-
-      /* If there was a match, f will be one past the correct value.  */
-      ret = f;
+      f++;
     }
+
+    ret = f;
   }
   
   return ret;



More information about the tlbuild mailing list