Good C Beautifiers?

Gary Jackoway gary at hpavla.AVO.HP.COM
Tue Jan 23 04:33:38 AEST 1990


Does anybody have a GOOD c-beautify program?
I tried using cb, and was disappointed for the following reasons:
    - cb does not handle long comments (> ~15 lines).  It truncates
      them and eventually gives up altogether.
    - cb does not allow you to specify amount of indentation.  I greatly
      prefer 4 characters.   cb uses a tab and then the characters end
      up all the way over on the right hand side of the page.
    - Although cb allows you to specify a maximum line length, given the
      use of tab for indentation, this option is not very useful.
    - cb does not re-format the code in all cases.  I had a line:
	 if (pred) if (pred2)
      and it left it like this even though stylistically it never puts
      two if's on a line.
    - cb doesn't give you any control over the final style.  I like the
      way it does some things, but not others.  It would be great if
      there were a cb with templates.  It would be nice to tell it:
	    if (pred)
	    {
	       text;
	    }

	    OR

	    if (pred) {
	       text;
	       }
      whatever you prefered.

Any pointers to good beautifiers would be appreciated.
Thanks,

Gary Jackoway
gary at hpavla



More information about the Comp.lang.c mailing list