httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: your mail
Date Mon, 01 Jul 1996 14:28:07 GMT
Paul Richards wrote:
> 
> 
> Revised style guide. I've explicitly listed the indentation rules which may
> or may not be contentious. I've admitted defeat on the function declaration
> issue and fixed up all I could spot and made the few other changes that
> I remember people noting. I may have missed a few, lots of mail when I get
> in on Mondays because I'm usually away at weekends.
> 
> Anymore comments?

Indents should be 4 not 8 spaces...

> /* Enum types are capitalized. */
> enum enumtype { ONE, TWO } et;

There is no consensus for this, and, furthermore, it isn't currently done this
way...

> 	/*
> 	 * Try to put shorter part first.  The closing and opening braces
> 	 * go on the same line as the else.
> 	 */
> 	if (test)
> 		stmt;
> 	else if (bar) {
> 		stmt;
> 		stmt;
> 	} else

The consensus says:

	}
	else

> 		stmt;
> 		

> 	/*
> 	 * Unary operators do not require spaces, binary operators do.
> 	 * Try not to use too many parenthesis unless the statement is
> 	 * really confusing without them.
> 	 */
> 	a = b->c[0] + ~d == (e || f) || g && h ? i : j >> 1;

Snigger.

> 	k = l & FLAGS;
> 
> 	/*
> 	 * Exits should be 0 on success, and 1 on failure.  Don't denote
> 	 * all the possible exit points, using the integers 1 through 300.
> 	 */

Why not? OK, for Apache it doesn't matter but for some things it is very
useful...

> 	(void) fprintf(stderr, "usage: f [-ab]\n");

Inconsistent spacing after a cast.

Cheers,

Ben.

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email: ben@algroup.co.uk
A.L. Digital Ltd,           URL: http://www.algroup.co.uk
London, England.

Mime
View raw message