Style filters
Chris Torek
chris at maryland.arpa
Mon Jan 20 08:05:45 AEST 1986
4.3BSD will come with a program called `indent', which is a rewrite
of James Gosling's rewrite of the program from the University of
Illinois. The program has an amazing number of options to control
its output (48, to be exact, though one of those is not output
control); default plus two options and it emits `Joy normal form'
code (4.2/4.3 kernel style).
As most people seem to be concerned with brace style, I will describe
indent's treatment of braces. It currently handles the following two
styles:
if (...)
{
code
}
or
if (...) {
code
}
It does not do
if (...)
{
code
}
which is somewhat unfortunate; I almost added it but gave up since
I myself do not use it, and since that particular translation can
be accomplished with a `sed' script in emergencies.
It *is*, however, able to produce code formatted almost the same
as the `indent' that came with Gosling Emacs. I felt that this
was important enough for us diff-listing-people that I added two
or three of those options just to make it possible.
Oh yes, one final note: Unless someone has changed it or the
program recently, the manual really is correct.
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP: seismo!umcp-cs!chris
CSNet: chris at umcp-cs ARPA: chris at mimsy.umd.edu
More information about the Comp.lang.c
mailing list