lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev USE_PSRC internals


From: Vlad Harchev
Subject: Re: lynx-dev USE_PSRC internals
Date: Thu, 20 May 1999 03:02:36 +0500 (SAMST)

On Fri, 21 May 1999, Leonid Pauzner wrote:

> >  While lynx is in psrc mode, SGML.c converts html it recieves to another 
> > html.
> 
> Looking into mainloop I found out the following line:
> 
> ...
> #endif /* DISP_PARTIAL */
> #ifdef USE_PSRC
>                 psrc_first_tag = TRUE;
> #endif
> #ifndef DONT_TRACK_INTERNAL_LINKS
> ...
> 
> It present in large `force_reload' cycle and *not* in HTreparse_document()
> cycle. Does it necessary at all? (seems no psrc problems found specific for
> SOURCE_CACHE!=NONE).
> 

 This is needed. Variable  psrc_first_tag indicates that the current mode is
psrc mode. There are 2 sets of functions that aid conversion HTML->source - in
HTML.c and in SGML.c.
  If user requests source of any page that is generated bypassing
SGML.c (like dired), the code in SGML.c won't be able to dump a source of html
(since no html is passed through it). 
 If user invokes source view on any file that physically exists somewhere,
that file is passed through SGML.c that emits appropriate formatting for
source. So, when the SGML_new is called, and psrc_view==TRUE, code in 
SGML_new sets psrc_first_tag to FALSE - this tells code in HTML.c that it
shouldn't do source dumping. 
   If source view was invoked on any internal html 
page, that was generated by directly calling HTML_put_character (like dired
pages), no calls to SGML_put_character are performed - so the code in HTML.c
now does conversion to source. It decides whether to do this by inspecting the
value of  psrc_first_tag - if it's TRUE, then SGML_new wasn't called -> so
HTML.c should do conversion itself.



 Best regards,
  -Vlad


reply via email to

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