httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: Additional style-guide issues
Date Tue, 15 Jul 1997 17:41:08 GMT
On Tue, 15 Jul 1997, Rodent of Unusual Size wrote:

>     Two things I'd like to see added to the style guide:
> 
>      1. Casting convention (i.e., "(char*)foo", "(char *)foo",
>         "(char *) foo", or something else - I personally prefer the
>     	third)

I prefer (char *)foo.

>      2. Expression readability - for instance, if you've got a really
>         complex if-condition, how should it be broken up and indented?

I like the DoD style guide for ADA suggestion that every line in a
multiline expression begin with an operator.  That way you get a visual
clue that it's a multiline expression.  For example:

    if (foo && bar && pretend_this_is_a_long_line
	&& doowah && ditty) {
	whatever;
    }

But I find this ugly:

    for (w = foo_head; w != NULL
	; w = w->next) {
	asdfasdf;
    }

Dean


Mime
View raw message