[Top][All Lists]

[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


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 "";.

Without -short_url:

With -short_url:

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 long_url_ok = TRUE;
+PUBLIC BOOLEAN long_url_ok = FALSE;
 PUBLIC BOOLEAN system_editor = FALSE;
@@ -3247,7 +3247,7 @@
       "require .www_browsable files to browse directories"
-      "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);
                buf[count] = buf[link_position + count - cut_position];

Is this right?

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.

reply via email to

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