lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev syntax change


From: Laura Eaves
Subject: lynx-dev syntax change
Date: Sun, 28 Feb 1999 16:14:30 -0500 (EST)

Ok, sorry about another post on this topic.
Due to popular demand by at least 2 people I tweaked the syntax to
        0+123g (or - or p)
This seems more natural and was trivial to change.
(Don't worry, I did test it...)

The following patch is applied to dev17 + my last patch for both
code and documentation.
Hope this is acceptable to everyone.
Thanks for your consideration.
--le
Index: LYForms.c
--- old/LYForms.c       Sat Feb 27 15:06:16 1999
+++ src/LYForms.c       Sun Feb 28 15:31:53 1999
@@ -521,6 +521,7 @@
 {
     char temp[120];
     char *p = temp;
+    int num;
 
     /*
      *  Load the c argument into the prompt buffer.
@@ -539,13 +540,12 @@
        return(0);
     }
 
-    while ( isdigit(*p) ) ++p;
-
-    /* if we have a + or - suffix, save it */
     if ( *p == '+' || *p == '-' )
        *rel = *p++;
     else
        *rel = '\0';
+    num = atoi(p);
+    while ( isdigit(*p) ) ++p;
 
     /*
      *  If we had a 'g' or 'p' suffix, load it into c.
@@ -558,7 +558,7 @@
     } else {
        *c = '\0';
     }
-    return(atoi(temp));
+    return num;
 }
 
 /* Use this rather than the 'wprintw()' function to write a blank-padded
Index: LYGetFile.c
--- old/LYGetFile.c     Sun Feb 28 13:33:01 1999
+++ src/LYGetFile.c     Sun Feb 28 15:27:41 1999
@@ -961,10 +961,10 @@
        HTInfoMsg(CANCELLED);
        return(DO_NOTHING);
     }
-    *num = atoi(temp);
-    while ( isdigit(*p) ) ++p;
     if ( *p == '+' || *p == '-' )
        rel = *p++;
+    *num = atoi(p);
+    while ( isdigit(*p) ) ++p;
 
     CTRACE(tfp,"  temp=%s, *num=%d, rel='%c'\n",temp,*num,rel);
     /*
Index: follow_help.html
--- old/follow_help.html        Sun Feb 28 15:37:48 1999
+++ lynx_help/keystrokes/follow_help.html       Sun Feb 28 16:00:14 1999
@@ -43,17 +43,22 @@
 <em>Follow link (or goto link or page) number:</em> feature to an advanced
 navigation aid.
 
-<p>Finally, a user may add a <em>+</em> or <em>-</em> suffix to a number
-command just before the g or p suffix to indicate jumping forward or back
-a specified number of links or pages.  For example,
-typing <em>1+g</em> followed by RETURN will move the current
+<p>Finally, a user may insert a <em>+</em> or <em>-</em> prefix to a number
+command to indicate jumping forward or back relative to the current link or
+page.
+For example,
+typing <em>0</em> to initiate a number command
+followed by <em>+1g</em> followed by RETURN will move the current
 link to the next numbered link, skipping any intervening
-pages or unnumbered links.  <em>1-g</em> goes to the preceeding
-numbered link.  <em>5+p</em> skips ahead 5 pages, and so on.
-Note that typing 1+g is different from typing a down arrow
-in that <em>1+g</em> may skip pages containing no links, or
+pages or unnumbered links.  <em>0-1g</em> goes to the preceeding
+numbered link.  <em>0+5p</em> skips ahead 5 pages, and so on.
+Note that typing <em>0+1g</em> is different from typing a down arrow
+in that <em>0+1g</em> may skip pages containing no links, or
 intervening non-numbered links, such as form fields when
-form fields are not numbered.
+form fields are not numbered.  It also differs from
+the <em>&lt;tab&gt;</em> command in that <em>0+1g</em>
+does not skip over whole textareas, unless form fields
+are not numbered..
 
 <p>If the user has set <em>Keypad mode</em> to <em>Numbers act as arrows</em>,
 then only '<em>0</em>', rather than every number, will be treated as an
@@ -86,11 +91,19 @@
 conjunction with the '<em>p</em>' suffix), a <em>page</em> is defined as
 the number of OPTIONs displayed within the vertical dimension of the popup
 window.
-Finally, the <em>+</em> and <em>-</em> suffixes can be used inside popup
-menus to move from option to option or page to page within the popup window
-similarly to the way they are used fro links   For example,
-while viewing a popup window, the user can type 3+p to skip ahead 3 pages,
-or 5-g to back up 5 options.
+Finally, the <em>+</em> and <em>-</em> prefixes can be used
+to move forward or back from the current option or page in
+a popup menu,
+similarly to the way they are used for links   For example,
+while viewing a popup window, the user can type <em>0</em> to
+initiate a numeric command followed by <em>+3p</em> and RETURN
+to skip ahead 3 pages, and <em>0-50g</em> will move the
+current selection back 50 options.
+This will work whether or not <em>keypad mode</em> is
+<Links and form fields are numbered</em> since options
+are numbered internally.  If form field numbering is
+turned off, the option numbers won't appear on screen,
+but the user can still navigate using these commands.
 
 <p>Note that HTML can be structured so that it includes <em>hidden
 links</em>, i.e., without a visible link name intended for ACTIVATE-ing

reply via email to

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