Copyright © 2010-2013,2014 by Thomas E. Dickey


This is an improved version of GNU indent.


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:
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:

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.

See the changelog for details:



The resulting package (usually installed as cindent is here: