lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev lynx2.8.2dev.25d-cpp.patch.gz


From: Vlad Harchev
Subject: Re: lynx-dev lynx2.8.2dev.25d-cpp.patch.gz
Date: Tue, 4 May 1999 21:15:50 +0500 (SAMST)

On Mon, 3 May 1999, Vlad Harchev wrote:

> On Fri, 7 May 1999, Philip Webb wrote:
> 
> > Vlad Harchev wrote from somewhere beyond the International Date Line:
>                                      I do this again :)
> > > On Fri, 7 May 1999, Philip Webb wrote:
> > >> eg  www.hippo.ru/~hvv/body.html  tells me the default is  ALERTSECS:3 ,
> > >> but doesn't say what (your) setting is.
> > >> if i wanted to use it everyday, i'ld like to know how i had set it.
> > > It's impossible to do this in persistent html
> > > or body.html must be generated on each invokation of lynx.
> > > But my patch also modifies LYReadCFG.c, the screen user gets
> > > after selecting 'O'ptions->"check your lynx.cfg here".
> > 
> > so why not have  body.html  (re)generated at that point?
> > presumably, users aren't going to do this very often.
>   
>   You induced wise thoughts in me.
> 
>   At my 5x86-133, generating body.html takes about 20 secs (generating
> lynx.cfg takes the same time), so IMO it's useless to regenerate it on each
> invokation of lynx (or after changing settings in configuration files). 
>   But there is another way. In the description of setting XYZ, we can include
> the following code:
> <h1>Current value</h1><a href=LYNXSETVALUE://XYZ>View current status</a>
> 
> ie, a link with special url, that will be interpreted by lynx in the special
> way. It's not difficult to to add support for such kind of urls in lynx. For
> example, for setting ALERTSECS it can display the following code:
> 
> <html><body>
> <h1>The current value of <em>ALERTSECS</em></h1>
> ALERTSECS:3<p>
>   This value was read from <a href=/usr/local/lib/lynx-included.cfg> 
> /usr/local/lib/lynx-included.cfg</a> at line 53.<p>
>   This default value of this setting was defined in 'userdefs.h', and is
> ALERTSECS:3<p>
>   This setting is <em>accepted</em> by current configuration of lynx.
> </body></html>
> 
>   Or (if setting wasn't explicitly initialized in any configuration file):
> 
> <html><body>
> <h1>The current value of <em>ALERTSECS</em></h1>
> ALERTSECS:3<p>
>   This setting wasn't mentioned in any configuration file, default value,
> defined in 'userdefs.h' was used.
>   This setting is <em>accepted</em> by current configuration of lynx.
> </body></html>
>  
>   If we remove sections 'Default value'and 'Status' from body.html, we will
> get body.html independant of lynx configuraion!!!!!! So, no there is no need
> in generating it - we can include generated copy of body.html and lynx.cfg in
> the distribution (as the script 'configure'), not the source!!!! 
>   The contents of '/scripts' directory can be distributed as 'lynx development
> pack' - used only for those how wish to update documentation of settings in
> lynx.cfg. After each update of body.in, maintainer have to regenerate
> 'body.html' and put generated body.html and lynx.cfg in distibution.
>   IMO it's a very good idea.
> 
>   To TD: I can start working on this in order it to be included in 2.8.2.
>[....]

  I've implemented functionality described in quoted message. The patch is
placed at http://www.hippo.ru/~hvv/patch.gz  - it's 300Kb unpacked. It
consists of body.html, {alpha,cat}toc.html, index.html placed in the
'lynx_help' subdirectory and modifications to .c files.  No scripts are
invoked to generate *.html's - they are ready to be installed - they are 
independant of lynx configuraion (now all is portable!!!).
  I've added support for special
URL type - LYNXSETTINGSTATUS. For example, to get the status of the setting
COLOR, you should use the following url: LYNXSETTINGSTATUS://COLOR
  Here is a dump of a screen what I recieve with my configuration of lynx:
============================================

             Status of the setting COLOR (Lynx Version 2.8.2pre.2)
                                       
  Status
  
   This setting is ignored by current configuration of Lynx. This setting
   aggregates its values.
   
  Default value
  
   The default value(s) for this setting can not be altered in
   'userdefs.h' at configuration time.
   
   Here is a default value of this setting:

COLOR:0:black:white
COLOR:1:blue:white
COLOR:2:yellow:blue
COLOR:3:green:white
COLOR:4:magenta:white
COLOR:5:blue:white
COLOR:6:red:white
COLOR:7:magenta:cyan

  Current value
  
   Here is a list of values that were aggregated while reading
   configuration files:
COLOR:0:lightgray:black
COLOR:1:brightmagenta:black
COLOR:2:green:black
COLOR:3:green:black
COLOR:4:cyan:black
COLOR:5:red:black
COLOR:6:brightred:black
COLOR:7:magenta:cyan

  Assigment trace
  
   Here is a trace of files and lines in which this setting was
   initialized ([1]go here to see a trace for all settings):

   file [2]/usr/local/lib/lynx.cfg
1736=>COLOR:0:lightgray:black
1738=>COLOR:1:brightmagenta:black
1740=>COLOR:2:green:black
1741=>COLOR:3:green:black
1742=>COLOR:4:cyan:black
1743=>COLOR:5:red:black
1744=>COLOR:6:brightred:black
1745=>COLOR:7:magenta:cyan

References

   1. LYNXCFG:///
   2. file://localhost/usr/local/lib/lynx.cfg
============================================
 body.html contains the links for getting status of each setting described
there - for setting XYZ, there is a piece of code 
<a href=LYNXSETTINGSTATUS://XYZ>View status of this setting</a>.

 This is a patch against pre2. Try it!

 IMO it worth including it in 2.8.2. I tested it extensively.

 Best regards,
  -Vlad


reply via email to

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