lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev dev22 - patch to fix PSRC mode with SOURCE_CACHE!=NONE


From: Klaus Weide
Subject: Re: lynx-dev dev22 - patch to fix PSRC mode with SOURCE_CACHE!=NONE
Date: Wed, 21 Apr 1999 16:11:47 -0500 (CDT)

On Wed, 21 Apr 1999, Scott Bigham wrote:
> On Wed, 21 Apr 1999, Klaus Weide wrote:
> 
> > The newer libwww has a generic T-piece HTStream for this kind of thing
> > (HTTee()), like UNIX tee.
> 
> Newer than we're currently using, you mean?  Yeah, that probably would
> do exactly what I needed.  Do we have plans to migrate to the new libwww?

Newer yes, and a lot different, but still recognizable (in parts).
See <http://www.w3.org/Library/>.

It's been at the back of the collective lynx-dev mind since, like,
forever.

> > I don't like though that the source_cache_chunk and source_cache_file
> > are passed around as global variables; they should probably be structure
> > members (maybe indirectly) of the HTParentAnchor.
> 
> Well, they're actually members of the HText; the global variables are
> just a temporary holder to get the newly created source cache from the
> HTStream that generated it to the HText that needs it.  I agree that
> it's a Gross and Disgusting Hack(TM); if you can think of a better one,
> go for it... ;)

Well it's not much more Gross and Disgusting(TM) than the multitude of
other 'temporary holders' in global variables.  In the newer Library's
philosophy, they would all be part of a HTRequest or HTResponse object,
which lives only for the duration of a request.  Part of what we have
in HTParentAnchor would also belong there, I think.

Such a deglobalization whould be needed to teach lynx to do more than
one request at once, like downloading in the background (within the
same process) or even just loading an external style sheet at the point
it is referenced.

> > You have managed to decipher the HTStream stuff, so getfile() shouldn't
> > be a big problem for you. :)
> 
> Enh.  The only real problem with the HTStream stuff was tracking the
> flow control through half a dozen nested function calls faking OO;
> getfile() is just an impenetrable monolith.  Okay, okay, I'll take
> another look at it... ;)  Just let me wait till dev23; I haven't been
> able to follow the flurry of patches around that area.

The HTStream way of plugging things together is kinda neat once you
get the hang of it...  although I must say it took me quite a long
time (much longer than you) to figure out the basic flow of control,
the What Calls What.  In general I find the libwww part of lynx code
clearer now than the src/ part; I'd always try to (re)use the framework
provided by the libwww part for something, before inventing things
from scratch in src/LY*.

   Klaus


reply via email to

[Prev in Thread] Current Thread [Next in Thread]