[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev short_url option (was Re: lynx2.8.3dev.5)
From: |
nsh |
Subject: |
lynx-dev short_url option (was Re: lynx2.8.3dev.5) |
Date: |
Sun, 01 Aug 1999 03:27:33 +0900 |
Hello,
I tried new -short_url option of lynx2.8.3dev.5.
In message <address@hidden>
Subject: lynx-dev lynx2.8.3dev.5
"T.E.Dickey" <address@hidden> writes:
> * add -short_url option and associated logic to elide middle of long urls
> (adapted from patch by Eduardo Chappa L <address@hidden>) -TD
man> -short_url
man> show very long URLs in the status line with "___" to
man> represent the portion which cannot be displayed. The
man> begining and end of the URL are displayed, rather
man> than suppressing the end.
There is a mismatch between source and documents. Two
examples in "http://www.slcc.edu/lynx/current/".
Without -short_url:
-more- ftp://ftp.digital.com/pub/net/infosys/lynx/cur___/index.h
-more- http://www.flora.org/lynx-dev/html/month019___sg00529.htm
With -short_url:
-more- ftp://ftp.digital.com/pub/net/infosys/lynx/current/index.
-more- http://www.flora.org/lynx-dev/html/month0199/msg00529.htm
If it should be fixed as documented:
diff -u ./src/LYMain.c.orig ./src/LYMain.c
--- ./src/LYMain.c.orig Sat Jul 31 00:39:54 1999
+++ ./src/LYMain.c Sun Aug 1 00:55:17 1999
@@ -197,7 +197,7 @@
PUBLIC BOOLEAN news_ok = TRUE;
#endif
PUBLIC BOOLEAN rlogin_ok = TRUE;
-PUBLIC BOOLEAN long_url_ok = TRUE;
+PUBLIC BOOLEAN long_url_ok = FALSE;
PUBLIC BOOLEAN ftp_ok = TRUE;
PUBLIC BOOLEAN system_editor = FALSE;
@@ -3247,7 +3247,7 @@
"require .www_browsable files to browse directories"
),
PARSE_SET(
- "short_url", UNSET_ARG, &long_url_ok,
+ "short_url", SET_ARG, &long_url_ok,
"enables examination of beginning and end of long URL in status line"
),
#ifdef SH_EX
Otherwise documents could be rewrited.
The example above shows another problem which will be fixed
by the following message. "index.html" and "msg00529.html"
should be displayed.
In message <address@hidden>
Subject: Re: lynx-dev lynx2.8.3dev.5
"Eduardo Chappa L." <address@hidden> writes:
> Thanks Tom for including the patch with your modifications in this dev
> version. However a bug got into the code, which makes at least
> strlength("-more") + srtlength("___") characters not appear at the end of
> the link (so you can not see the .jpg or .html or .cgi), and also addresses
> of the kind javascript:(something_long_here); not to be displayed as
> intended. I also decided to change the cut position to cut_position - 3
> (insert the ___ string to the left of the cut_position, instead of the
> right). I think the following patch fixes all these problems.
This patch causes complie error.
./LYMainLoop.c: In function `status_link':
./LYMainLoop.c:6945: `len' undeclared (first use in this function)
./LYMainLoop.c:6945: (Each undeclared identifier is reported only once
./LYMainLoop.c:6945: for each function it appears in.)
./LYMainLoop.c:6945: parse error before `count'
gmake[1]: *** [LYMainLoop.o] Error 1
gmake[1]: Leaving directory `/tmp2/tmp.viper/lynx2-8-3/src'
gmake: *** [all] Error 2
Further fix must be applied.
diff -u ./src/LYMainLoop.c.orig ./src/LYMainLoop.c
--- ./src/LYMainLoop.c.orig Sun Aug 1 01:52:44 1999
+++ ./src/LYMainLoop.c Sun Aug 1 02:17:04 1999
@@ -6941,7 +6941,7 @@
for (j = 1; j <= 3; j++)
buf[cut_position - j] = '_';
for (count = cut_position;
- (count < MAX_STATUS) && (link_position + count - cut_position
<= len
+ (count < MAX_STATUS) && (link_position + count - cut_position
<= length);
++count)
buf[count] = buf[link_position + count - cut_position];
Is this right?
-more- ftp://ftp.digital.com/pub/net/infosys/lynx/___/index.html
-more- http://www.flora.org/lynx-dev/html/month___/msg00529.html
IMHO, this feature is very nice, but makes some confusion. I
can't distinguaish between elided too long URL and real "___"
characters in URL, until press "=" key. ;)
Thank you.
---
address@hidden