You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodent of Unusual Size <co...@decus.org> on 1997/07/15 16:50:25 UTC
Additional style-guide issues
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)
2. Expression readability - for instance, if you've got a really
complex if-condition, how should it be broken up and indented?
#ken :-)}
Re: Additional style-guide issues
Posted by Alexei Kosut <ak...@organic.com>.
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)
(char *)foo, definitely.
-- Alexei Kosut <ak...@organic.com>
Re: Additional style-guide issues
Posted by Dean Gaudet <dg...@arctic.org>.
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