httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <>
Subject Re: fixes to assist building Apache-1.1b4 on SunOS-4.1, among other
Date Wed, 26 Jun 1996 11:40:37 GMT
Paul Richards wrote:
> >>>>> "Robert" == Robert S Thau <> writes:
> Robert> As a SunOS victim, I've long since given up on the native
> Robert> compiler as hopelessly broken and not worth supporting.  Even
> Robert> so, some of the guy's changes leave me totally perplexed, as
> Robert> when he repeatedly claims to have removed "Pascal-isms" which
> Robert> are "not C" and "GNU extensions".
> Sme of them puzzle me too. Perhaps he could explain what he thought
> was wrong in the first place.
> Robert> More generally, thorough conformance to some kind of coding
> Robert> standard might be nice (though I really *don't* like Berkeley
> Robert> style, before anyone else brings it up; K&R with four-space
> Robert> indents is what most of the code is written to currently, and
> Robert> suits me fine).  However, it does require a thorough and
> Robert> *correct* understanding of what the C language looks like...
> A "loose" coding style would certainly make looking at other code easier,
> I have a hard time following some of the code in Apache simply because it
> looks so odd. What don't you like about the Berkeley style, just as a matter
> of interest. I obviously like it but if nothing else, I think we should
> use the function definition format from it because it makes it so easy
> to search for the things. I also think ANSI C rather than K&R should be
> the standard. I'm not really bothered about more cosmetic things such as
> how much to indent (as long as there is indentation) but some basic
> rules we hopefully all find acceptable would be usefull.

If we can agree on a layout then we could put a .emacs in the source directory,
and for most people, the layout would then be semi-automatic...

Just to add a third slant ... I don't like either of the "usual" styles, as
people who've seen my code can probably guess. I find K&R particularly
irritating because its so easy to miss opening braces. I also seem to differ
from most of the group on where to put spaces. However, consistent style is
desirable, even if it isn't a style I like. Perhaps we should start a list of
style possibilities and vote on them all...

FWIW, here's a list of possibilities I just knocked up...

1. Function declarations




int main(...)

2. Commas

	f(a, b);


3. Braces

	while(x) {



4. For statements

	for(a ; b ; c)

	for(a; b; c)

My votes would be 1b, 2b, 3c, 4a.



Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email:
A.L. Digital Ltd,           URL:
London, England.

View raw message