I recently got a relatively important addition to some software that I support from someone. Unfortunately, instead of providing diff, he instead just gave me his whole source tree, and, even worse, it seems like he used some kind of code prefix that goes far beyond what I used or saw including things like
- Insert and remove spaces at different points within lines.
- Interrupt some conditional expressions in square brackets, turn some into single-line conditional expressions, and insert some into conditional expressions with line breaks, but without brackets.
- Moving some combined statements to separate lines and combining separate divided statements into separate lines.
- Insert and delete lines in places such as function arguments.
- Etc
Starting indentation (BSD) in files from its version and earlier version does not bring them close to each other. Using astil does not work either. In any case, there are still a lot of remnants of different formatting styles.
Is there any C-formatter that essentially removes as much formatting as possible and then formats the code sequentially? Or is there a way to get a formulator for this? I don’t need to look terribly beautiful, I just need to have a reasonable diff so that I can see what it actually changed.
source
share