Path: utzoo!mnetor!uunet!oddjob!ncar!gatech!bbn!mit-eddie!killer!loci
From: loci@killer.UUCP (loci!clb)
Newsgroups: comp.lang.misc
Subject: Re: Style rules for C shops
Message-ID: <4043@killer.UUCP>
Date: 10 May 88 06:35:10 GMT
References: <12120@santra.UUCP> <1962@bgsuvax.UUCP> <12567@santra.UUCP>
Distribution: comp.lang.misc,comp.lang.c
Organization: The Unix(R) Connection, Dallas, Texas
Lines: 21
Summary: easy as pi

In article <12567@santra.UUCP>, news@santra.UUCP (news) writes:
> In article <1962@bgsuvax.UUCP> denbeste@bgsuvax.UUCP (William C. DenBesten) writes:
> >>The ideal solution, it seems to me, would be to have a beautifier that
> >puts all the code into your company style, just before you freeze the
> >code.  Of course, if you don't trust the beautifier, you could write a
> >...
> That sounds like a nice solution, except that there are certain styles
> that a beautifier cannot produce. For instance, how do you make it
> produce meaningful variable names? How do you make sure the program uses
> constants (defines) when appropriate? What do you do with too lengthy
> procedures? 

	The obvious solution to "how do ...": write a pre-processor
	to do exactly what you want. If editors can be written and
	compilers can be written, then this is just another application
	package. With "yacc" and a "lex", it's easy to get started.

	Of course, the names of variable must be predefined in some
	way, by management edict, committee resolve or something,
	but otherwise the problem seems do-able. If not, maybe the
	format being defined isn't realistic in the first place.