[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev address@hidden: some problems]
From: |
Hataguchi Takeshi |
Subject: |
Re: lynx-dev address@hidden: some problems] |
Date: |
Sat, 15 Jun 2002 23:42:32 +0900 (JST) |
On Sat, 15 Jun 2002, Thomas Dickey wrote:
> On Sat, Jun 15, 2002 at 12:56:27PM +0900, Hataguchi Takeshi wrote:
[snip]
> > (2) lynx.rc (and lynx.cfg?)
> > I'm setting "visited_links=FIRST" on my lynx.rc. But lynx
> > can't recognize this on startup, it always sets a default value.
> >
> > To compare strings from lynx.rc and internal, LYgetEnum() in
> > "src/LYrcFile.c" uses strncasecomp(), I believe.
> >
> > This time, string "FIRST" may match twice, "FIRST" and
> > "FIRST_REVERSED". Then LYgetEnum() returns FALSE, and the
> > default value is turned to be set.
> >
> > Instead of using strncasecomp(), strcasecomp() solves this
> > problem. But some side effects might occur, because I don't
> > know the purpose of using strncasecomp() here.
>
> probably a bug (I don't recall if it was that way in the code that I
> reorganized to make LYgetEnum(), or if I did it that way myself).
The cause seems to be that LYgetEnum allows abbreviations for name.
So LYgetEnum can't determine whether "FIRST" is "FIRST" itself or an
abbreviation of "FIRST_REVERSED".
I think we should remove ambiguousness between them. I wrote a patch
against this problem.
--
Takeshi Hataguchi
E-mail: address@hidden
--- LYrcFile.c.bak Mon Nov 19 10:37:14 2001
+++ LYrcFile.c Sat Jun 15 00:58:22 2002
@@ -115,10 +115,10 @@
PRIVATE Config_Enum tbl_visited_links[] = {
{ "FIRST_REVERSED", VISITED_LINKS_AS_FIRST_V |
VISITED_LINKS_REVERSE },
- { "FIRST", VISITED_LINKS_AS_FIRST_V },
+ { "FIRST_NORMAL", VISITED_LINKS_AS_FIRST_V },
{ "TREE", VISITED_LINKS_AS_TREE },
{ "LAST_REVERSED", VISITED_LINKS_AS_LATEST | VISITED_LINKS_REVERSE },
- { "LAST", VISITED_LINKS_AS_LATEST },
+ { "LAST_NORMAL", VISITED_LINKS_AS_LATEST },
{ NULL, DEFAULT_VISITED_LINKS }
};
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden