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: Leonid Pauzner
Subject: Re: lynx-dev USE_PSRC internals
Date: Fri, 29 Jan 1999 13:19:23 +0300 (MSK)

>      * From: Vlad Harchev <address@hidden>
> On Fri, 21 May 1999, Leonid Pauzner wrote:

>> >  While lynx is in psrc mode, SGML.c converts html it recieves to another ht
> ml.
>>
>> Looking into mainloop I found out the following line:
>>
>> #ifdef USE_PSRC
>>                 psrc_first_tag = TRUE;
>> #endif
>>
>> 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.

OK, so we should add a comment like this into mainloop:

#ifdef USE_PSRC
/* this flag is need for special pages (e.g. directory listing)
implemented directly via HTML_new() and not via SGML_new().
Initialize here; normally reset by SGML_new().
*/
                psrc_first_tag = TRUE;
#endif



>  Best regards,
>   -Vlad




reply via email to

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