lynx-dev
[Top][All Lists]
Advanced

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

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


From: Bela Lubkin
Subject: Re: LYNX-DEV Re: is lynxrp.zip working /slang and color choices
Date: Sat, 2 Nov 1996 03:35:55 -0800

I wrote:

> Rob Partington wrote:
> 
> > It's obviously quite difficult to do some things without GNU make - like
> > my styles patch not working with non-GNU make.  I thought I was doing that
> > in a standard make format, but obviously not.
> 
> I haven't tried your stuff yet, but I'm using a non-GNU make so I'll
> surely run into whatever the problem is.

Well, I didn't.

I downloaded lynxrp.tgz [of Oct. 22] and it built without a peep.  No
observable makefile problems.  What was supposedly GNU-make-specific?

Then I downloaded newpatch.gz, applied it, and built after a few tweaks.
Targets that you haven't modified do not compile because $(STYLE).o in
src/Makefile resolves to ".o", which confuses make.  So I added -DCS and
STYLE=NCStyle to the sco5 target.  This time the make failed only
because of this in src/LYCurses.c:

  #ifndef _CURSES_H
         last_styles[last_ptr++] = getattrs(stdscr);
  #else
         last_styles[last_ptr++] = attr_get();
  #endif

SCO's curses has getattrs(), and <curses.h> #defines _CURSES_H.  This
test is wrong, apparently an ad hoc test based on the fact that one
curses implementation you ran into had one function, another had the
other, and (you observed) one #defined _CURSES_H, the other didn't.
There is absolutely nothing that intrinsically ties these two things
together.  Change this to something like:

  #ifdef USE_GETATTRS
         last_styles[last_ptr++] = getattrs(stdscr);
  #else
         last_styles[last_ptr++] = attr_get();
  #endif /* and you better have one or the other, or this just won't work... */

and -DUSE_GETATTRS in appropriate Makefile targets.

So.  This is on SCO OpenServer Release 5, using its standard SysV curses
library.  Your supposedly-ncurses-specific code works.  Well, sort of
works.  I get colors.  I don't understand what goes on with the styles.
If I use the default STYLE: entries in the lynx.cfg that you provide,
the active link shows up in yellow; regular text ("body", I suppose) in
grey; inactive links also in grey.

AHA!  Had to add a "STYLE:A:bold:green", now inactive links are in
green.  So the STYLE:LINK line doesn't seem effective.

Some of the time I get an effect where links change color after I pass
over them.  ... Ah, this is related to <font> nested inside <a>.  Given
this HTML:

<a href="foo"><font size=2>foo</font></a>
<a href="bar"><font size=2>bar</font></a>
<a href="baz"><font size=2>baz</font></a>

Each link will start out in the color assigned to STYLE:FONT.  When
active it will have the color assigned to STYLE:ALINK.  When you move
the cursor past that link, it will have the color assigned to STYLE:A.

Lots of minor glitches, but this is a good start...

>Bela<
;
; 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]