makeinfo generates cross-references to "(DIR)" in HTML mode, which does
not make sense.  Here's the patch:


1999-10-16  Eli Zaretskii  <[EMAIL PROTECTED]>

        * makeinfo/node.c (cm_node): Don't generate cross-references to
        "(DIR)".

        * makeinfo/html.c (add_link): Likewise.

--- makeinfo/node.c~1   Sat Oct 16 10:24:44 1999
+++ makeinfo/node.c     Sat Oct 16 15:16:28 1999
@@ -779,32 +779,42 @@ cm_node ()
 
           if (next)
             {
-              add_word (",\n");
-              add_word (_("Next:"));
-              add_word ("<a rel=next href=\"");
               tem = expansion (next, 0);
-              add_anchor_name (tem, 1);
-              add_word_args ("\">%s</a>", tem);
+              /* A link to "(DIR)" doesn't make sense in HTML mode.  */
+              if (strcasecmp (tem, "(dir)") != 0)
+                {
+                  add_word (",\n");
+                  add_word (_("Next:"));
+                  add_word ("<a rel=next href=\"");
+                  add_anchor_name (tem, 1);
+                  add_word_args ("\">%s</a>", tem);
+                }
               free (tem);
             }
           if (prev)
             {
-              add_word (",\n");
-              add_word (_("Previous:"));
-              add_word ("<a rel=previous href=\"");
               tem = expansion (prev, 0);
-              add_anchor_name (tem, 1);
-              add_word_args ("\">%s</a>", tem);
+              if (strcasecmp (tem, "(dir)") != 0)
+                {
+                  add_word (",\n");
+                  add_word (_("Previous:"));
+                  add_word ("<a rel=previous href=\"");
+                  add_anchor_name (tem, 1);
+                  add_word_args ("\">%s</a>", tem);
+                }
               free (tem);
             }
           if (up)
             {
-              add_word (",\n");
-              add_word (_("Up:"));
-              add_word ("<a rel=up href=\"");
               tem = expansion (up, 0);
-              add_anchor_name (tem, 1);
-              add_word_args ("\">%s</a>", tem);
+              if (strcasecmp (tem, "(dir)") != 0)
+                {
+                  add_word (",\n");
+                  add_word (_("Up:"));
+                  add_word ("<a rel=up href=\"");
+                  add_anchor_name (tem, 1);
+                  add_word_args ("\">%s</a>", tem);
+                }
               free (tem);
             }
           /* html fixxme: we want a `top' or `contents' link here.  */
--- makeinfo/html.c~1   Sat Oct 16 09:32:42 1999
+++ makeinfo/html.c     Sat Oct 16 15:13:52 1999
@@ -142,7 +142,8 @@ void
 add_link (node, attributes)
      char *node, *attributes;
 {
-  if (node)
+  /* A link to "(DIR)" doesn't make sense in HTML mode.  */
+  if (node && strcasecmp (node, "(dir)") != 0)
     {
       add_word_args ("<link %s href=\"", attributes);
       add_anchor_name (node, 1);

Reply via email to