bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: texinfo-5.1.90 pretest available


From: Eli Zaretskii
Subject: Re: texinfo-5.1.90 pretest available
Date: Mon, 16 Sep 2013 21:42:48 +0300

> Date: Fri, 13 Sep 2013 17:16:45 GMT
> From: address@hidden (Karl Berry)
> 
> Here's the first pretest for the next Texinfo release:
> 
>   ftp://alpha.gnu.org/gnu/texinfo/texinfo-5.1.90.tar.xz
>  http://alpha.gnu.org/gnu/texinfo/texinfo-5.1.90.tar.xz
> 
> The NEWS below.  Please send feedback to address@hidden

Thanks.

I needed the following patch to prevent "info -w -a" from reporting an
Info file more than once on MS-Windows if INFOPATH used the same
directories as in built-in defaults, but spelled in a different
letter-case or with a different flavor of slashes.

(Should we perhaps resolve symlinks on Posix systems for this
comparison, for the same reasons?)

--- info/info-utils.c~  2013-08-22 20:58:30.000000000 +0300
+++ info/info-utils.c   2013-09-16 21:33:02.562500000 +0300
@@ -880,6 +880,27 @@ text_buffer_printf (struct text_buffer *
   return n;
 }
 
+#if defined(__MSDOS__) || defined(__MINGW32__)
+static int
+fncmp (const char *fn1, const char *fn2)
+{
+  const char *s1 = fn1, *s2 = fn2;
+
+  while (tolower (*s1) == tolower (*s2)
+        || (IS_SLASH (*s1) && IS_SLASH (*s2)))
+    {
+      if (*s1 == 0)
+       return 0;
+      s1++;
+      s2++;
+    }
+
+  return tolower (*s1) - tolower (*s2);
+}
+#else
+# define fncmp(s,t) strcmp(s,t)
+#endif
+
 struct info_namelist_entry
 {
   struct info_namelist_entry *next;
@@ -892,7 +913,7 @@ info_namelist_add (struct info_namelist_
   struct info_namelist_entry *p;
 
   for (p = *ptop; p; p = p->next)
-    if (strcmp (p->name, name) == 0)
+    if (fncmp (p->name, name) == 0)
       return 1;
 
   p = xmalloc (sizeof (*p) + strlen (name));



reply via email to

[Prev in Thread] Current Thread [Next in Thread]