Code Cleaner?

Anyone know any ready made programs that clean code up? You know something to run code thru to format it coherently. I think I’m going to make my own, but if there is something already made for this it would save a lot of time.

I hate when people code like this:


if(var)

{

                  int a = 5;
}

Something to convert code like that into


if(var){
   int a=5;
}

People actually code like that? They should be shot (watch…my coding probly looks like that…)

I know there is something that cleans up HTML, but I don’t know about anything else… here is the link to that…

http://www.w3.org/People/Raggett/tidy/

I would try a search on google… you may come up with something

I’ve used tidy. It works well for html and decent for php, but I was looking for one for C++