Possible Duplicates:
Code polisher / reformater for C, C++ or Fortran
Best C++ Code Formatter/Beautifier
I am working as part of a team on a C++ project. Part of the code is a highly modified version of a large-ish external library, which doesn't conform to our coding conventions.
The library uses this style:
void main ()
{
if (somecondition)
{
doStuff (some, parameters);
}
moreStuff (parameter);
}
whereas our style is like so:
int main() {
if(somecondition) {
doStuff(some, parameters);
}
moreStuff(parameter);
}
(Also, the editor on Stack Overflow doesn't make it possible to show, but their code uses two spaces for indentation, our code uses tabs).
Given that this is nearly all just editing whitespace, I'd imagine there are some programs to automate most of it.