httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: cvs commit: apache-2.0/src/lib/apr/misc/unix errorcodes.c
Date Fri, 21 Apr 2000 07:00:39 GMT
Brian Havard wrote:
> 
> On 20 Apr 2000 22:51:52 -0000, gstein@locus.apache.org wrote:
> 
> >gstein      00/04/20 15:51:52
> >
> >  Modified:    src/lib/apr/misc/unix errorcodes.c
> >  Log:
> >  Get rid of the nasty side-effect macro.
> >  Add "static" and rename the OS/2 apr_os_strerror() function. Minor reformat.
> 
> I'm not sure about that, I was in fact thinking that it would be useful to
> make the ap_os_strerror() public so that OS specific code that call APIs
> directly (like in mpm's) could use it. Getting rid of the macro gets a
> definite +1 from me though, I thought it was pretty strange the way it was.
> 
> And on the reformatting, can you avoid hard TABs? They're actually a no-no
> according to the style guide (Section 1 - "Tab characters should never be
> used."). Speaking of style, who's idea was it that else's should look like
> 
> if (expr) {
>     code;
> }
> else {
>     code;
> }
> 
> ?
> 
> IMHO that's really ugly. I try to follow the style guide but I've been
> writing them "} else {" for so long that I sometimes forget.

The style guide was constructed on the basis of votes for individual
features. As a result, it doesn't match anyone's preference.

> Another ugly practice that seems to be showing up is writing if's & for's
> without a space between the if/for & the (. The first I saw I thought it
> was just a typo but it occurrs in 28 different .c files now.

IMO, that's the way it should be, but I agree it isn't conformant with
the style guide.

> And just in case I haven't ranted enough :)
> Check out ap_register_hooks() in http_config.c, it breaks almost every rule
> in the style guide......

That'll be because I wrote it and the style guide is further from my
preferences than anyone else's, so I tend to make more mistakes than
anyone else. Feel free to correct it.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

Mime
View raw message