httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject RE: cvs commit: apache-2.0/src/main http_protocol.c
Date Mon, 09 Oct 2000 04:27:08 GMT
> From: Brian Havard [mailto:brianh@kheldar.apana.org.au]
> Sent: Sunday, October 08, 2000 11:44 PM
> 
> On Sun, 8 Oct 2000 16:00:41 -0500, William A. Rowe, Jr. wrote:
> 
> >> From: Greg Stein [mailto:gstein@lyra.org]
> >> Sent: Sunday, October 08, 2000 2:56 PM
>  
> >> Untrue. At the machine language level, a conditional test may 
> >> produce -1, but C produces 0 or 1. Always has.
> >
> >Then I retract...  I was looking at code 20 minutes before I had
> >to teach, my brain wasn't all here.  I have always avoided relying
> >on a non-zero value being anything in particular, and has always
> >been a -big-red-flag- in my book, and yes, Greg, I do asm :-)
> 
> Maybe you were thinking of other languages. EG Some BASICs 
> return -1 for true.

As do some others... I was simply looking for an obvious change in the
last 18 hours that would have broken the tree.  My patches definately
count, but that one jumped out at me.  Had I grabbed my antique and rag
eared copy of Harbison & Steele, I wouldn't have thought about it :-)
 
> Oh, and a really don't see the point of using '\0', it's  exactly the same
> as 0. I know the argument for it (makes it obvious you're comparing a
> character) but do you write 0.0 when comparing a float? 0L 
> when comparing a long?

Ok... pure form:

e->split(e, length + !temp[length]);

Exactly what we want, but not necessarily legible.

Mime
View raw message