bug-texinfo
[Top][All Lists]
Advanced

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

again direntry problems


From: Norbert Preining
Subject: again direntry problems
Date: Mon, 14 Jan 2008 09:09:01 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Hi Karl,

you remember that I submitted the following patch:
+++ texinfo-4.11/makeinfo/cmds.c 2007-12-19 16:19:24.000000000 +0100 
@@ -1637,10 +1637,14 @@
 
       if (!no_headers && !html)
         {
+          /* use add_* instead of insert_* because otherwise the
+             file header ("This is ...") will end up inside the
+             dir section markers.  */
           kill_self_indent (-1); /* make sure there's no indentation */
-          insert_string ("INFO-DIR-SECTION ");
-          insert_string (line);
-          insert ('\n');
+          cm_noindent (); /* make sure again */
+          add_word ("INFO-DIR-SECTION ");
+          add_word (line);
+          add_char ('\n');
         }
 
       free (line);

The reason was that otherwise sometimes the string
        "This is ..." 
ends up in the dir entry section.

Now there is one problem which changes slightly the output format:

Here are the different outputs for the following input:
@direntry
     * ZSH: (zsh).                     The Z Shell Manual.
@end direntry

with makeinfo 4.8:
INFO-DIR-SECTION Utilities
START-INFO-DIR-ENTRY
* ZSH: (zsh).                     The Z Shell Manual.
END-INFO-DIR-ENTRY


with makeinfo 4.11 unpatched
INFO-DIR-SECTION Utilities
START-INFO-DIR-ENTRY
This is zsh.info, produced by makeinfo version 4.11 from zsh.texi.

* ZSH: (zsh).                     The Z Shell Manual.
END-INFO-DIR-ENTRY

with makeinfo 4.11 patched (and probably also with CVS)
INFO-DIR-SECTION Utilities
START-INFO-DIR-ENTRY
     * ZSH: (zsh).                     The Z Shell Manual.
END-INFO-DIR-ENTRY

The problem are the starting spaces which DO make problems with some
other info file parsers. (At least Debian i-i which will still be around
for some time, but we are working hard on it!)

I don't understand all the internals, but I guess the switch from
add_word to insert created this problem.

Do you have a good suggestion how to fix that?

I tried adding another cm_noindent (); before calling
        insert_string (line);
but that didn't help, because line contains leading spaces.

Thanks a lot for any suggestions and all the best

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <address@hidden>        Vienna University of Technology
Debian Developer <address@hidden>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
GLAZELEY (adj.)
The state of a barrister's flat greasy hair after wearing a wig all
day.
                        --- Douglas Adams, The Meaning of Liff




reply via email to

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