Re[2]: Something strange in client_side.c /Re: Squid code questionsfrom IRC/

From: Igor <poige@dont-contact.us>
Date: Sun, 11 Mar 2007 21:14:12 +0300

> > while (t > conn->in.buf && xisspace(*t))
> > t--;
> > while (t > conn->in.buf && !xisspace(*t))
> > t--;
> >
> > As far as xisspace() doesn't seem to have side-effects this code makes me guess what's going on here :)
> It scans the string backwards one word (t-- steps one character back).

   Yes, exactly, skip over spaces (if there are any and we're still inside) and then over not spaces (again if there are any left inside) -- at the second glance it becomes not strange at all I must say. I was guessing because had read the code in such a way: whether there are spaces, or not spaces, let's skip over it checking that we're inside buffer :) -- my fault, sorry.

-- 
Igor
Received on Sun Mar 11 2007 - 14:26:31 MDT

This archive was generated by hypermail pre-2.1.9 : Sun Apr 01 2007 - 12:00:01 MDT