[comp.unix.misc] C Pretty Print - best?

louis@aerospace.aero.org (Louis M. McDonald) (01/03/91)

I know there are a lot of C pretty print programs around. I am looking
for what might be the best one people have found. I am interested in
using it in a configuration management environment so that the
code will have the same look to. However, when a user checks code 
out to work on, s/he will be able to use the pretty print program
to have the code look like there style. Main "pretty" functions:
indentation, location of {}, comment blocks (not a big deal).


I would like to allow a user to have a configuration file in their
home directory that specifies how they like their C code to look
(e.g. indent=4). When they check out the code, it would be run through
the pretty printer to make the code conform to their prefs. When they
check it back in, a system configuration file would be used to make
the code look like the "chosen" format.

Hope this is clear.

Louis McDonald

-- 
Louis McDonald		Internet: louis@aerospace.aero.org
The Aerospace Corporation
213-336-8914

andy@polyslo.CalPoly.EDU (Andy Pippin <The Elf>) (01/03/91)

Like, ya' know, then louis@aerospace.aero.org (Louis M. McDonald) says...
~
~I know there are a lot of C pretty print programs around. I am looking
~for what might be the best one people have found. I am interested in
~using it in a configuration management environment so that the
~code will have the same look to. However, when a user checks code 
~out to work on, s/he will be able to use the pretty print program
~to have the code look like there style. Main "pretty" functions:
~indentation, location of {}, comment blocks (not a big deal).

	Hmm... Sounds like you could use a program called indent.
	It's available in comp.sources.unix archives in Volume 18.

	It's got more option's than you can shake a stick at, and
	will read in a file as well.

    aBp.

-- 
Andy Pippin			\    Spikes Place:  because life is too
andy@polyslo.CalPoly.EDU	 \	   short to drink cheap beer.
   1011 1011 110  1011 1011 110  1011 1011 110  1011 1011 110  1011 1011 110
                   Going free-agent in 163 days!!!  

andy@polyslo.CalPoly.EDU (Andy Pippin <The Elf>) (01/03/91)

When I said:
~	It's got more option's than you can shake a stick at, and
~	will read in a file as well.

	... meant that you can have a file in your home directory
	that will configure the parameters.  The command line will
	override the .indent.pro file values though.

	Let's HOPE it can read in a file!  Sheesh, fingers and brain
	just ain't working together today....

    aBp.

-- 
Andy Pippin			\    Spikes Place:  because life is too
andy@polyslo.CalPoly.EDU	 \	   short to drink cheap beer.
   1011 1011 110  1011 1011 110  1011 1011 110  1011 1011 110  1011 1011 110
                   Going free-agent in 163 days!!!