[tlbuild] kpsewhich problem [Cygwin]

Angelo Graziosi angelo.graziosi at alice.it
Sun Dec 20 15:22:41 CET 2009


Il 18/12/2009 23.59, Karl Berry ha scritto:
>      +      /* Some trickery here: the extensions for kpse_fmt_format can
>      +       * clash with other extensions in use, and we prefer for those
>      +       * others to be preferred.
>
> Ok, I'll revert that change, but I don't understand it.  The only
> extension for kpse_fmt_format is .fmt.  How does that clash with
> anything?  .fmt is not used for anything else.

Perhaps the solution is:

Akira Kakuto wrote:
> Because find_format() goes into infinite loop without f++

Indeed, applying his patch:

==================================================
--- 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;
======================================

is another way (better?) to fix the kpsewhich.c problems on Cygwin and 
GNU/Linux Kubuntu 9.10. :-)

Ciao,
Angelo.


More information about the tlbuild mailing list