httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <>
Subject Re: cvs commit: apache-2.0/src/lib/apr/misc/unix errorcodes.c
Date Fri, 21 Apr 2000 09:08:27 GMT
On Fri, 21 Apr 2000, Brian Havard wrote:
> On 20 Apr 2000 22:51:52 -0000, 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.

Hrm. If there is a "good enough" definition for that first argument, then
I don't see why not. Seems to complicate things a bit, though: "which
function do I call?"

I'd say -0 on exposing it, but consider it a very weak one. "It's closer
to 0 than the -0 would indicate"  :-)

> Getting rid of the macro gets a
> definite +1 from me though, I thought it was pretty strange the way it was.


Yah. When I first tweaked that file, I thought the same. Wasn't sure of
what to do, so I didn't bother much beyond making the macro "safe" for use
in arbitrary code (not that it would be... but habit :-)

After others grumbled, then I Saw The Way (tm) :-)

> 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.").

Oops. Must have missed that part. I'll go change my editor (XEmacs). No
problem here... the Python interpreter is (moving to) following the same
no-tab rule in the C code. The Python source code is already no-tab in the
standard distro.

> 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.

Yah. This is one of the absolute worst things that I've ever seen in the
years that I've been coding. Brace placement? That's for sissies. People
who write code that pretends "if" and "for" is a function should simply be
regarded as insane. It's even worse than people who put a space between a
function name and the open paren (e.g. x = foo (arg); ). Bleck.


Greg Stein,

View raw message