Do you mean formatting the C++ source to a nicer looking format? There is a tool called 'indent' for that which is standar on most linux and unix distributions including MacOS X. Also you can search for 'c++ beautifier'. With 'indent' you can tell your coding style and it changes the source code according to that. For example if you like the curly on the same line as th= e function definition or a new line, if you want space after brackets, indenting etc. For example: tamas-mac:~ trudnai$ indent for(i=3D0; i<10; i++) { int u=3D0; int v=3D0; for(v=3D9;v;v--) { }} for (i =3D 0; i < 10; i++) { int u =3D 0; int v =3D 0; for (v =3D 9; v; v--) { } } As you can see from the first line it creates a nicer looking source code. But you can change the style, for example to put the curly into the next line instead: tamas-mac:~ trudnai$ indent -bl for(i=3D0; i<10; i++) { int u=3D0; int v=3D0; for(v=3D9;v;v--) { }} for (i =3D 0; i < 10; i++) { int u =3D 0; int v =3D 0; for (v =3D 9; v; v--) { } } You can also tell to break up long lines without braking the C++ rules as i= t contains a true C++ parser... Tamas On Mon, Aug 1, 2011 at 6:46 PM, peter green wrote: > I want a tool that can take c++ code (though I think the only c++ > specfic feature i'm using is c++ style comments) and break up lines > without destroying the code and without making any other unessacery > changes. > > Anyone got any suggestions for a tool that can do this? > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 int main() { char *a,*s,*q; printf(s=3D"int main() { char *a,*s,*q; printf(s=3D%s%s%s, q=3D%s%s%s%s,s,q,q,a=3D%s%s%s%s,q,q,q,a,a,q); }", q=3D"\"",s,q,q,a=3D"\\",q,q,q,a,a,q); } --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .