bug-texinfo
[Top][All Lists]
Advanced

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

texindex.c -o option doesn't work


From: Aharon Robbins
Subject: texindex.c -o option doesn't work
Date: Mon, 24 Feb 2014 20:51:43 +0200
User-agent: Heirloom mailx 12.5 6/20/10

Hi All.

The -o option in texindex.c is fundamentally broken. The arg_index
variable has already been incremented upon entry to the relevant bit of
code; it should be incremented again at the end. The diff below fixes it.

It is not clear how this option is meant to be used. From the code it
looks like the idea is:

        texindex foo.cp -o foo.out bar.cp -o bar.out ...

This seems kinda bogus.

The fact that no-one has reported this bug for who knows how many
years would seem to argue that it isn't used. At all. I suggest simply
nuking it.  If not, at least please apply the fix below. :-)

Thanks,

Arnold

Index: util/texindex.c
===================================================================
--- util/texindex.c     (revision 5417)
+++ util/texindex.c     (working copy)
@@ -314,9 +314,9 @@
             {
               if (argv[arg_index] != (char *)NULL)
                 {
-                  arg_index++;
                   if (op > outfiles)
                     *(op - 1) = argv[arg_index];
+                  arg_index++;
                 }
               else
                 usage (EXIT_FAILURE);




reply via email to

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