C++ pretty printer/source formatter/whatever

I seem to be whiney lately… :wink:

Anyone know of a free, good, C++ pretty printer/source formatter/what-you-may-call-it? Preferably Windows binaries, but if I can compile it for Windows without anymore hassle than changing the compiler used in the Makefile, then I’m ok with that. :slight_smile:

And while you’re at it, know of a lint type program for Windows? Free, obviously.

What do you mean by a pretty printer/source formater? Do you want something to clean up different coding styles (like gnu indent), or something to include linenumbers/formatting when printing?

I used trueprint to pretty print the code of my senior design project. I had my makefile call it when I called “make documentation”. it then ran ps2pdf on the output, and I had pdfs of my code pretty printed, and I could print them anywhere. the make documentation also called doxygen to produce documentation in html and latex (with the latex output also being converted to pdf).

indent is availible in cygwin. I don’t know about trueprint, but the full postscript powers are probably lost on windows.

Use cygwin and indent.

I’m looking for a program that prints (as in, to the printer) color coded C (like what you see in the IDE). Anyone know of any for Windows?

I use http://www.context.cx/ a lot. It highlights C among many other languages.

Okay, so what you are looking for is a syntax highlighter. A google search will turn up dozens, but the one I use is called Syntax, which is nice because it outputs HTML.

Notepad++ is another good choice, although I have not tried printing from it yet.

Anyone looking for a good source code editor and color printer should check this application out. Highly recommended.

Eclipse is a free Java-based IDE project started by IBM. It’s designed for adaptability to just about any language.

Also, Bloodshed Software has an C++ and Pascal IDE with compiler, among other various free stuff.

Not to start any more wars… but www.vim.org does a very good job too. It can export your code as a colored HTML file, then do what you want with that.