lynx-dev
[Top][All Lists]
Advanced

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

LYNX-DEV Re: is lynxrp.zip working /slang and color choices


From: Klaus Weide
Subject: LYNX-DEV Re: is lynxrp.zip working /slang and color choices
Date: Thu, 31 Oct 1996 13:17:35 -0600 (CST)

On Thu, 31 Oct 1996, Nelson Henry Eric wrote:

> > > > > Had trouble compiling because of the `$(STYLE).o' line in
> [...]
> > > sunos4.1.3/ncurses-1.9.9e/gcc-2.7.2
> [...]
[Rob Partington:]
> > Are you using GNU make?  If not, that might be the problem.
> 
> No, I'm still using Sun's (wherever they ripped it off from).  If it is
> dependent on what `make' you are using, then I couldn't recommend such
> syntax in the Makefile because it will narrow the prospective user base.

A specific make shouldn't be required to compile Lynx, unless that change
would be of tremendous benefits (which I don't see).  But Rob may just
not be aware of it when he uses GNU-make-only constructs in his code,
so it would probably help if non-GNU-make folks could point out what
exactly he should not use.  

> > Well, my mods aren't compiled in unless specifically requested, also my
> > makefile mods give you the option of <type>-slang (plain slang colour) or
> 
> If the `<type>-slang' works (It didn't with your previous ncurses-only
> patch applied.) then what you are doing is indeed the optimum situation.
> (The test will have to wait until this weekend; lost too much time on the
> make problem last weekend.)
> 
> > > slang-linked lynx, what file(s) would I need to look at?  Or would I have
> [...]
> > HTML.c (for the markup, start_element and end_element)
> > GridText.c (for the visual representation on the screen)
> > LYUtils.c (if you're doing anything with links on the screen)
> > LYCurses.c (probably to do initialisation things)
> 
> This is another *GEM* from lynx-dev; thanks.  It'll be slow going, but it's
> well worth it.  And, I know lynx will be around if and when I come through.

I am afraid what you are setting out to do will not be an easy task...
Any using-new-slang-colors-to-differentiate-tags patch, if it doesn't
attempt to redo what Rob is already doing (which I would call a whole
new architecture for attribute handling), would have to use new special
codes, in addition to the existing LY_BOLD_START_CHAR etc., so that
the HTML.c module can communicate color/style changes to the GridText.c
module.  (assuming here you want to stay somewhat within the given
pre-RP framework).  You would then have to also make a lot of changes 
so that HTML.c properly keeps track of which attributes are currently
"ON" for its output stream. In GridText.c, you would have to mimick
what is already being done for LY_BOLD_* and LY_UNDERLINE_* for your
new LY_FOOFOO_* codes.  And all that would just be for one additional
color, for some tags.  And Rob is presumably already doing this in a more
systematic, and extensible, way.

Summary: additional colors based on HTML tags/entities would be a lot
of work.  (And someone is already doing it.  Henry, my intention is not
to discourage you from hacking the Lynx code, far be it.  Just pointing
out what I [thought I] saw when looking at the files Rob listed.  But
please try your hand at it if you feel like it.)

> SO, all you folks who have been unsatisfied with only getting six color
> choices with slang, and want all eight that have been `promised', send your
> requests to me <address@hidden> as to what color (#0-7) should
> be associated with what class/type of html tag.  Refer to the lynx-dev
> archive for details:
>       http://129.237.17.75/lynx-dev/9608/0121.html and
>       http://129.237.17.75/lynx-dev/9608/0142.html.
> AND don't let me stop someone else from trying, because the chance of
> my succeeding is probably pretty slim.  __Henry

So you are out on a mission to free the lost 2 Slang colors from their
prison? :)  

Ok, here is a proposal for a quickie hack which wouldn't have the
complications that tag-based colors have, and which would get you
at least halfway to your goal :):) :

In GridText.c, find the funtion display_page.  In *that* function,
locate the start_underline() and end_underline() statements within
the block which is subject to "if (strlen(target) > 0 && <lots more>",
and change them to turn on or off some other (combination of)
attributes.  Lynx should then use these (combination of) attributes
(which could be a currently unused combination) for highlighting
the results of '/' (WHEREIS) queries.  This probably woudn't even
interfere with Rob's patches.

  Klaus

I summarized my findings about color attributes (some specific to 
Lynx on Linux) a while ago, in
        URL: http://lynx.cc.ukans.edu/lynx-dev/9609/0027.html

I haven't learnt much new about the topic since then, except an idea
why some possible combinations of attributes are not used.
I think originally Lynx (long before slang) would make use of only 
(at most) one attribute per character, because it could not be assumed
that in the general case combinations would work (whether FANCY_CURSES
or not). (Does turning "bold" on, while "underline" is on, turn
"underline" off? etc. would depend on terminal [emulation] being used
and/or curses package being used.) Since three attributes are used,
"bold", "underline" and "reverse", that leaves four possibilities.
Lynx w/ slang already uses 2 more, so it's already a bargain...


;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;



reply via email to

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