lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV Multi bookmarks


From: David Combs
Subject: Re: LYNX-DEV Multi bookmarks
Date: Thu, 7 Nov 1996 05:26:46 -0800

WOULDN'T IT BE NICE if lynx itself was documented in pseudo-code
  of this form:

(rather, in this BEAUTIFUL form)

> From address@hidden Sun Nov  3 23:02:05 1996
> From: address@hidden (Drazen Kacar)
> Subject: LYNX-DEV Multi bookmarks
...
> 
> In edit_bookmarks():
> 
>    You don't need if(LYlines < 23) check, it was already checked in options().
>    Let's try not to print more lines than we have on screen:
>       You can print (LYlines - someconstant) lines. Calculate that number and
>       put it in some variable, let's say max_book_lines.
>       Declare a variable that will tell you on which page of bookmarks you
>       are corrently on, book_page with initial value 0.
>       Then, in a loop, you can say
>        for(a = 0; a < max_book_lines; ++a)
>        { ...
>          printw("...", TLJ_A_subdescript[a + book_page * max_book_lines);
>          ...
>        }
>       Change things in a main loop for selecting particular bookmark
>        while(1)
>        {
>           response = LYgetch();
>           response = TOUPPER(response);
>           if(isalpha(response))
>           {
>              don't go through a loop here, response - 'A' will give you
>              offset for indexing arrays.
>              Lynx still doesn't do setlocale() call... I think...
>               ...
>              return;
>           }
>           switch(response)
>           {
>              case ' ': increase book_page, but take care that it doesn't
>                        grow above max number of pages. Then display
>                        next page of bookmark definitions (the last one
>                        may not be completely filled).
>                        break;
>              case 'b': decrease book_page and redisplay. Watch out for
>                        similar things as above.
>                        break;
>              case '>': save things
>                        break;
>              case 3:
>              case 7:
>              ...
>                        return;
>           }
>        }
>        You get the idea...
> 
>        When displaying particular bookmark definition, don't use constant
>        field widths, give 1/3rd of width to name and 2/3rds to path.
>        You can display with printw("%-.*s", maxwidth, string).
>        '-' does left justifying, '.' means that output will have no more
>        characters than the following number, '*' means that number will
>        not be given as constant, but as a next parameter in function and
>        's' means that you are displaying string. Simple? :)
> 
>       About displaying the page with bookmarks definitions vs. statusline
>       when saving link to bookmark... This is not a question of advanced
>       vs. novice user... First time display the page, but make a command
>       on it for selecting statusline behaviour. The above switch will have
>       to deal with this, too. And make sure that the selection is being saved
>       to .lynxrc.
> 
> Enough for now?
> 
> -- 
> Life is a sexually transmitted disease.
;
; 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]