eqin comments differ from implementation
arno formella <[email protected]> Thu, 15 Dec 2011 10:00:18 +0100
| Newsgroups | gmane.comp.gnu.indent.bugs |
|---|---|
| Message-ID | <CAC9EmOMcA7kwEn-AM1J1Beo5GkwZnz3sZhiJuEBtkdiwzJbnFQ@mail.gmail.com> |
Hi, using indent 2.2.10 I observed that the break-function-decl-args-end long option was not recognized well. digging into the source I found that the comment of function "eqin" says that "true" is returned when the two argument strings are equal, however, its implementation returns "true" whenever the first argument is a prefix of the second one, which explains the observed behavior. suggestion: insert the line if(*s2) return false; just before asigning the value to achieve what I guess was intented. (every pair of options but the two "break-function-decl-args"-"break-function-decl-args-end" and "dont-"break-function-decl-args"-"dont-break-function-decl-args-end" are prefix-free, which give a hint why the bug has been hidden for years :-). best regards Arno Formella PS. remember the saying from Norm Schryer: "If the code and comments disagree, both are probably wrong".