I've got around 12,000 lines of badly styled C code, e.g.
initholeend=(mm_footer *) (end-sizeof(mm_footer));
initholeend->magic=MM_MAGIC;
initholestart->used+=amount;
What I'd like to do is automatically adding spaces around all binary operands and assigments:
initholeend = (mm_footer *) (end - sizeof(mm_footer));
initholeend->magic = MM_MAGIC;
initholestart->used += amount;
Is there any recommended tool to do so?
Thanks in advance.
astyle isn't bad.
I would like to recommend you uncrustify. I am quite satisfied with that code beautifier and provides good results for even more programming languages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With