httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p.@sweng.stortek.com
Subject Re: [PATCH] (Was: Re: OS/390 Translation)
Date Tue, 07 Dec 1999 02:55:13 GMT
In a recent note, Martin Kraemer said:

> Date: Tue, 7 Dec 1999 00:30:10 +0100
> 
> Uuh! I'm astonished that there were so few places wit \012's!
> 
It merely looks like a lot when you first grep for them.  :-)

> >  	/* Delete terminal (CR?)LF */
> >  
> >  	p = strlen(w);
> > +        /* Indeed, the host's '\n':
> > +           '\012' for UNIX; '\015' for MacOS; '\025' for OS/390
> > +           -- whatever the script generates.
> > +        */
> >  	if (p > 0 && w[p - 1] == '\n') {
> > -	    if (p > 1 && w[p - 2] == '\015') {
> > +	    if (p > 1 && w[p - 2] == CR) {
> 
> Hmmm. Is this correct for MacOS? We have an ASCII based OS, so
> CR == '\015', but the '\n' one line above is *also* '\015'.
> 
I assume from the comment "Delete terminal (CR?)LF" that something has
already broken the stream into strings at the '\n', so on MacOS,
w[p - 2] can never be '\015' (another '\n').  I changed the '\015' to
CR largely to cut the grep noise down and to add a comment explaining
the rogue '\n'; I might have left it untouched.

-- gil
-- 
StorageTek
INFORMATION made POWERFUL

Mime
View raw message