lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev short_url option (was Re: lynx2.8.3dev.5)


From: Eduardo Chappa L.
Subject: Re: lynx-dev short_url option (was Re: lynx2.8.3dev.5)
Date: Tue, 3 Aug 1999 11:50:30 -0700 (PDT)

*** Klaus Weide (address@hidden) wrote Today:

:) 
:) I think (now) that the character should be ".", and also, if at possible,
:) that it showuld be displayed with both preceding and following separators
:) displayed.  I.e. "/.../" should appear if possible in the place where a
:) part has been removed.  IMO this would make things most obvious, and
:) a real occurrence of "/.../" in a URL is very unlikely.  A space character
:) wouldn't be good - sometimes they can appear in URLs (especially in
:) the #fragment part), whether that's strictly valid or not.  

  Ok, so here is the patch that makes lynx to separate beginning and end
by '/.../'. If you would like '//.../' to be displayed like '/..../'
instead, let me know.


*** LYMainLoop.orig.c   Fri Jul 30 13:19:07 1999
--- LYMainLoop.c        Tue Aug  3 11:36:25 1999
***************
*** 6925,6943 ****
            /* We assume that one can recognize the link from at least
             * MIN_STATUS characters.
             */
!           cut_position = MAX_STATUS - prefix - (length - k);
            if (cut_position < MIN_STATUS){
                cut_position = MIN_STATUS;
!               link_position = length - MIN_STATUS + 3;
            } else {
                link_position = k;
            }
!           for (j = 0; j < 3; j++)
!               buf[cut_position++] = '_';
!           if (cut_position < link_position)
!               while ((buf[cut_position++] = buf[link_position++]) != 0)
!                   ;
            _user_message(format, buf);
            FREE(buf);
        } else {        /* show (possibly truncated) url */
            _user_message(format, curlink_name);
--- 6929,6952 ----
            /* We assume that one can recognize the link from at least
             * MIN_STATUS characters.
             */
!           cut_position = MAX_STATUS - (length - k);
            if (cut_position < MIN_STATUS){
                cut_position = MIN_STATUS;
!               link_position = length - MIN_STATUS;
            } else {
                link_position = k;
            }
!           cut_position -= prefix;
!           buf[link_position] = '/';
!           for (j = 1; j <= 3; j++) {
!               buf[cut_position - j] = '.'; }
!           buf[cut_position - 4] = '/';
!            for (count = cut_position;  
! (count < LYcols - 2) && (link_position + count - cut_position <= length); 
!                 ++count) 
!               buf[count] = buf[link_position + count - cut_position];
            _user_message(format, buf);
+       CTRACE(tfp,"lastline = %s",buf); /* don't forget to erase me */
            FREE(buf);
        } else {        /* show (possibly truncated) url */
            _user_message(format, curlink_name);

Eduardo
http://www.math.washington.edu/~chappa/personal.html



reply via email to

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