http://invisible-island.net/
Copyright © 2010,2011 by Thomas E. Dickey
Synopsis
This is an improved version of GNU indent.
History
I started working on this in mid-1999. My original intent was
to provide changes to its maintainer, who would then own them. As
noted elsewhere,
maintainers may be less responsive to changes than the primary
developers. In this case, the original developer had moved on,
leaving a succession of maintainers.
Here are the patches which I made:
-
19990609 A patch to indent 2.0, which does the
following:
-
- Suppress a blank line before #endif after a
declaration, unless we're putting blanks around
preprocessor lines anyway.
- updates the configure script (I was not able to build
the original program on SunOS 4.1.3 because of the memmove
reference).
-
20010112 Fixes a buffer overflow when reading a comment
with very long line (e.g., 2k).
-
20020428 Lots of fixes, making this usable for the special
syntax used for conditional macros in xterm.
I do not use post-2.0 indent because it introduces more bugs
than it fixes. Each time I notice a newer 2.x version, I test it,
comparing to the 2.0 case, and note that most of the differences
are making the output formatted other than as requested. From
this, I conclude:
- changes are being made to (perhaps) improve its formatting
for some other style than that which I use, and
- probably the developers are not comparing the results
against a standard set of inputs and outputs.
The former I could excuse in a utility being modified for
private use, as I did for bcpp.
Before deciding to work on bcpp, I studied it, and
indent, and chose the former, since the latter is
badly-structured, and would have taken several months to remedy.
Current package (cindent)
However, the patched indent fills a need in my
development work. Besides patching it, I added scripts to extend
it over several years. I use these scripts in most of the
C-language programs on my website.
Download
The resulting package (usually installed as
cindent is here: