[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev 2.8.2dev.16 patch 1 - Keys, tab changes
From: |
Klaus Weide |
Subject: |
lynx-dev 2.8.2dev.16 patch 1 - Keys, tab changes |
Date: |
Sun, 14 Feb 1999 18:08:13 -0600 (CST) |
Doug has been too busy... I had these changes ready, then he sent
his cleanup patch. His changes are now included here, hopefully
correctly. So don't try to use both this and his patch together.
---
To avoid misunderstandings: this is not a big cleanup, and it doesn't
add much of the needed comments for programmers to make future changes
easier. It's more in the muddling along department. Discussion about
systematic cleaning up of kemap stuff seems to have ceased for now, and
how to do this right, with future changes in mind, is more than just a
technical problem. It's also not clear to me how the various mouse
things fit in, whether they could or should be changed more.
View the whole BACKTAB_KEY thing as kind of an experiment, what happens
if a new code is added?
The names for the new functions may be improvable.
Doug seems to be willing to continue making changes for the DOS versions
that become necessary as the lynxkeycodes change for non-DOS. I have
tried to incorporate his latest patches, but he'll have to review this.
Note that the value 0x10F has "accidentally" already the same meaning
in one of the DOS versions, according to one of the docs/*.key tables.
Things not done, although they probably would be easy now, also include
changes to the special interpretation of ^L and ^W. There's also a
more-than-technical (i.e. "political") aspect to that - should binding
a key in lynx.cfg to REFRESH have unconditional effect in line editing
mode?
Klaus
* New lynxkeycode BACKTAB_KEY with value 0x10F. DO_NOTHING is and shall
remain 0x10E, as documented in lynx.cfg. Moved MOUSE_KEY out of the
way - does it need to be in the tables at all?
BACKTAB_KEY will be recognized if the (n)curses keypad() input
handling returns KEY_BTAB, which happens if the terminal description
has the right kB or kcbt capability string and the terminal actually
generates that string (often "^[[Z", generated for shift+tab). May
also work with lynx-keymaps mechanism. Not tested with slang, maybe
this has to be added to some more of the various tables in LYStrings.c.
* New user-visible key commands FASTFORW_LINK and FASTBACKW_LINK, with
lynxactionscodes LYK_FASTFORW_LINK and LYK_FASTBACKW_LINK. By default
mapped from <tab> key (^I) and new BACKTAB_KEY, respectively. Previously
<tab> was mapped from NEXT_LINK, which has some special handling if the
invoking key was <tab> (and if FASTTAB was defined in LYMainLoop.c, which
was the case by default). The old behavior of <tab> is still available
if it is mapped with KEYMAP to NEXT_LINK in lynx.cfg.
* These commands always go to a previous (or next) link if there is one,
and skip multiple lines that are part of the same textarea.
* Recognize the new key actions also during partial file display, for
some roughly corresponding movement.
* New lynxeditactioncode LYE_FORM_PASS, to allow any lynxkeycode to end
the editing of a form field and be passed up to the caller - it will then
normally be mapped to a lynxactioncode. LYE_FORM_PASS keys are generally
ignored in non-forms line editing. This is used for BACKTAB_KEY, as
well as several other keys that were previously handled specially in
form_getstr.
* Extended the maps in LYEditmap.c to cover the same range of lynxkeycodes
as the LYKeymap.c tables. Yes, this uses more space, but the tables
need to be consistent.
* Map lynxkeycode 0x00 to LYK_DO_NOTHING, as lynx.cfg said all the time.
* Some tweaks of displayed strings in 'K'ey Map page. Don't show CHANGE_LINK
binding if mouse not enabled (it may not be useful even when -use_mouse
is on).
* Function expand_substring used with NCURSES for user-defined mapping
keysyms to byte sequences was parsing the "^(...)" construct wrong.
* Other small tweaks in key handling code.
* Changes to lynx.cfg to better reflect reality.
* Terminology note: lynxkeycode = what's between the colons in lynx.cfg
KEYMAP:...:..., lynxactioncode = LYK_* code for what's right of the
second colon, lynxeditactioncode = what's assigned in LYEditmap.c (and
which may differ between lineedit_mode Default Binding and alternative
bindings).
* Formatting tweak in HTML.c for <DD> not preceded by <DT>: Don't use
wrong indentation in that case.
* Changes from DK for DOS up to 1999-02-14
--- lynx2-8-2.old/src/GridText.c Mon Feb 8 09:32:58 1999
+++ lynx2-8-2/src/GridText.c Sat Feb 13 12:26:08 1999
@@ -3947,10 +3947,10 @@
/*
* HTGetLinkInfo returns some link info based on the number.
*
- * If want_go is not NULL, caller requests to know a line number for
+ * If want_go is not 0, caller requests to know a line number for
* the link indicated by number. It will be returned in *go_line, and
* *linknum will be set to an index into the links[] array, to use after
- * the line in *line has been made the new top screen line.
+ * the line in *go_line has been made the new top screen line.
* *hightext and *lname are unchanged. - KW
*
* If want_go is 0 and the number doesn't represent an input field, info
@@ -4107,6 +4107,263 @@
}
return(WWW_LINK_TYPE);
}
+ }
+ }
+ return(NO);
+}
+
+PRIVATE BOOLEAN same_anchor_or_field ARGS5(
+ int, numberA,
+ FormInfo *, formA,
+ int, numberB,
+ FormInfo *, formB,
+ BOOLEAN, ta_same)
+{
+ if (numberA > 0 || numberB > 0) {
+ if (numberA == numberB)
+ return(YES);
+ else if (!ta_same)
+ return(NO);
+ }
+ if (formA || formB) {
+ if (formA == formB) {
+ return(YES);
+ } else if (!ta_same) {
+ return(NO);
+ } else if (!(formA && formB)) {
+ return(NO);
+ }
+ } else {
+ return(NO);
+ }
+ if (formA->type != formB->type ||
+ formA->type != F_TEXTAREA_TYPE || formB->type != F_TEXTAREA_TYPE) {
+ return(NO);
+ }
+ if (formA->number != formB->number)
+ return(NO);
+ if (!formA->name || !formB->name)
+ return(YES);
+ return(strcmp(formA->name, formB->name) == 0);
+}
+
+#define same_anchor_as_link(i,a) (i >= 0 && a &&\
+ same_anchor_or_field(links[i].anchor_number,\
+ (links[i].type == WWW_FORM_LINK_TYPE) ? links[i].form : NULL,\
+ a->number,\
+ (a->link_type == INPUT_ANCHOR) ? a->input_field : NULL,\
+ ta_skip))
+#define same_anchors(a1,a2) (a1 && a2 &&\
+ same_anchor_or_field(a1->number,\
+ (a1->link_type == INPUT_ANCHOR) ? a1->input_field : NULL,\
+ a2->number,\
+ (a2->link_type == INPUT_ANCHOR) ? a2->input_field : NULL,\
+ ta_skip))
+
+/*
+ * HTGetLinkOrFieldStart - moving to previous or next link or form field.
+ *
+ * On input,
+ * curlink: current link, as index in links[] array (-1 if none)
+ * direction: whether to move up or down (or stay where we are)
+ * ta_skip: if FALSE, input fields belonging to the same textarea are
+ * are treated as different fields, as usual;
+ * if TRUE, fields of the same textarea are treated as a
+ * group for skipping.
+ * The caller wants a information for positioning on the new link to be
+ * deposited in *go_line and (if linknum is not NULL) *linknum.
+ *
+ * On failure (no more links in the requested direction) returns NO
+ * and doesn't change *go_line or *linknum. Otherwise, LINK_DO_ARROWUP
+ * may be returned, and *go_line and *linknum not changed, to indicate that
+ * the caller should use a normal PREV_LINK or PREV_PAGE mechanism.
+ * Otherwise:
+ * The number (0-based counting) for the new top screen line will be returned
+ * in *go_line, and *linknum will be set to an index into the links[] array,
+ * to use after the line in *go_line has been made the new top screen
+ * line. - kw
+ */
+PUBLIC int HTGetLinkOrFieldStart ARGS5(
+ int, curlink,
+ int *, go_line,
+ int *, linknum,
+ int, direction,
+ BOOLEAN, ta_skip)
+{
+ TextAnchor *a;
+ int anchors_this_line = 0;
+ int prev_anchor_line = -1, prev_prev_anchor_line = -1;
+
+ struct agroup {
+ TextAnchor *anc;
+ int prev_anchor_line;
+ int anchors_this_line;
+ int anchors_this_group;
+ } previous, current;
+ struct agroup *group_to_go = NULL;
+
+ if (!HTMainText)
+ return(NO);
+
+ previous.anc = current.anc = NULL;
+ previous.prev_anchor_line = current.prev_anchor_line = -1;
+ previous.anchors_this_line = current.anchors_this_line = 0;
+ previous.anchors_this_group = current.anchors_this_group = 0;
+
+ for (a = HTMainText->first_anchor; a; a = a->next) {
+ /*
+ * Count anchors, first on current line if there is more
+ * than one. We have to count all links, including form
+ * field anchors and others with a->number == 0, because
+ * they are or will be included in the links[] array.
+ * The exceptions are hidden form fields and anchors with
+ * show_anchor not set, because they won't appear in links[]
+ * and don't count towards nlinks. - KW
+ */
+ if ((a->show_anchor) &&
+ (a->link_type != INPUT_ANCHOR ||
+ a->input_field->type != F_HIDDEN_TYPE)) {
+ if (a->line_num == prev_anchor_line) {
+ anchors_this_line++;
+ } else {
+ /*
+ * This anchor is on a different line than the previous one.
+ * Remember which was the line number of the previous anchor,
+ * for use in screen positioning later. - KW
+ */
+ anchors_this_line = 1;
+ prev_prev_anchor_line = prev_anchor_line;
+ prev_anchor_line = a->line_num;
+ }
+
+ if (!same_anchors(current.anc, a)) {
+ previous.anc = current.anc;
+ previous.prev_anchor_line = current.prev_anchor_line;
+ previous.anchors_this_line = current.anchors_this_line;
+ previous.anchors_this_group = current.anchors_this_group;
+ current.anc = a;
+ current.prev_anchor_line = prev_prev_anchor_line;
+ current.anchors_this_line = anchors_this_line;
+ current.anchors_this_group = 1;
+ } else {
+ current.anchors_this_group++;
+ }
+ if (curlink >= 0) {
+ if (same_anchor_as_link(curlink,a)) {
+ if (direction == -1) {
+ group_to_go = &previous;
+ break;
+ } else if (direction == 0) {
+ group_to_go = ¤t;
+ break;
+ }
+ } else if (direction > 0 &&
+ same_anchor_as_link(curlink,previous.anc)) {
+ group_to_go = ¤t;
+ break;
+ }
+ } else {
+ if (a->line_num >= HTMainText->top_of_screen) {
+ if (direction < 0) {
+ group_to_go = &previous;
+ break;
+ } else if (direction == 0) {
+ if (previous.anc) {
+ group_to_go = &previous;
+ break;
+ } else {
+ group_to_go = ¤t;
+ break;
+ }
+ } else {
+ group_to_go = ¤t;
+ break;
+ }
+ }
+ }
+ }
+ }
+ if (!group_to_go && curlink < 0 && direction <= 0) {
+ group_to_go = ¤t;
+ }
+ if (group_to_go) {
+ a = group_to_go->anc;
+ if (a) {
+ int max_offset;
+ /*
+ * We know where to go; most of the stuff below is just
+ * tweaks to try to position the new screen in a specific
+ * way.
+ *
+ * In some cases going to a previous link can be done
+ * via the normal LYK_PREV_LINK action, which may give
+ * better positioning of the new screen. - kw
+ */
+ if (a->line_num < HTMainText->top_of_screen &&
+ a->line_num >= HTMainText->top_of_screen-(display_lines)) {
+ if ((curlink < 0 &&
+ group_to_go->anchors_this_group == 1) ||
+ (direction < 0 &&
+ group_to_go != ¤t &&
+ current.anc &&
+ current.anc->line_num >= HTMainText->top_of_screen &&
+ group_to_go->anchors_this_group == 1) ||
+ (a->next &&
+ a->next->line_num >= HTMainText->top_of_screen)) {
+ return(LINK_DO_ARROWUP);
+ }
+ }
+ /*
+ * The fundamental limitation of the current anchors_this_line
+ * counter method is that we only can set *linknum to the right
+ * index into the future links[] array if the line with our link
+ * ends up being the first line with any links (that count) on
+ * the new screen. Subject to that restriction we still have
+ * some vertical liberty (sometimes), and try to make the best
+ * of it. It may be a question of taste though. - kw
+ */
+ if (a->line_num <= (display_lines)) {
+ max_offset = 0;
+ } else if (a->line_num < HTMainText->top_of_screen) {
+ int screensback =
+ (HTMainText->top_of_screen - a->line_num + (display_lines)
- 1)
+ / (display_lines);
+ max_offset = a->line_num - (HTMainText->top_of_screen -
+ screensback * (display_lines));
+ } else if (HTMainText->Lines - a->line_num <= (display_lines)) {
+ max_offset = a->line_num - (HTMainText->Lines -
(display_lines));
+ } else if (a->line_num >=
+ HTMainText->top_of_screen+(display_lines)) {
+ int screensahead =
+ (a->line_num - HTMainText->top_of_screen) / (display_lines);
+ max_offset = a->line_num - HTMainText->top_of_screen -
+ screensahead * (display_lines);
+ } else {
+ max_offset = SEARCH_GOAL_LINE - 1;
+ }
+
+ /* Stuff below should remain unchanged if line positioning
+ is tweaked. - kw */
+ if (max_offset < 0)
+ max_offset = 0;
+ else if (max_offset >= display_lines)
+ max_offset = display_lines - 1;
+ *go_line = a->line_num - max_offset;
+ if (*go_line <= group_to_go->prev_anchor_line)
+ *go_line = group_to_go->prev_anchor_line + 1;
+
+#if 0
+ if (*go_line > HTMainText->top_of_screen &&
+ *go_line < HTMainText->top_of_screen+(display_lines) &&
+ HTMainText->top_of_screen+(display_lines) <= a->line_num &&
+ HTMainText->top_of_screen+2*(display_lines) <=
HTMainText->Lines)
+ *go_line = HTMainText->top_of_screen+(display_lines);
+#endif
+ if (*go_line < 0)
+ *go_line = 0;
+ if (linknum)
+ *linknum = group_to_go->anchors_this_line - 1;
+ return(LINK_LINE_FOUND);
}
}
return(NO);
--- lynx2-8-2.old/src/GridText.h Mon Feb 8 09:32:58 1999
+++ lynx2-8-2/src/GridText.h Sat Feb 13 07:13:26 1999
@@ -149,6 +149,12 @@
int * linknum,
char ** hightext,
char ** lname));
+extern int HTGetLinkOrFieldStart PARAMS((
+ int curlink,
+ int * go_line,
+ int * linknum,
+ int direction,
+ BOOLEAN ta_skip));
extern BOOL HText_getFirstTargetInLine PARAMS((
HText * text,
int line_num,
--- lynx2-8-2.old/src/HTForms.h Sat Jul 25 03:01:02 1998
+++ lynx2-8-2/src/HTForms.h Fri Feb 12 22:25:16 1999
@@ -124,7 +124,8 @@
#define WWW_FORM_LINK_TYPE 1
#define WWW_LINK_TYPE 2
#define WWW_INTERN_LINK_TYPE 6 /* can be used as a bitflag... - kw */
-#define LINK_LINE_FOUND 8 /* used in follow_link_number - kw */
+#define LINK_LINE_FOUND 8 /* used in follow_link_number, others -
kw */
+#define LINK_DO_ARROWUP 16 /* returned by HTGetLinkOrFieldStart -
kw */
/* #define different lynx modes */
#define NORMAL_LYNX_MODE 1
--- lynx2-8-2.old/src/HTML.c Mon Jan 18 11:29:20 1999
+++ lynx2-8-2/src/HTML.c Sun Feb 14 13:14:30 1999
@@ -609,7 +609,7 @@
#endif
#ifdef USE_COLOR_STYLE
-static char *Style_className;
+static char *Style_className = NULL;
static char myHash[128];
static int hcode;
#endif
@@ -2033,6 +2033,8 @@
if (!me->style_change) {
if (HText_LastLineSize(me->text, FALSE)) {
HText_appendCharacter(me->text, '\r');
+ } else {
+ HText_NegateLineOne(me->text);
}
} else {
UPDATE_STYLE;
@@ -6839,6 +6841,9 @@
}
styles[HTML_PRE]->alignment = HT_LEFT;
}
+#ifdef USE_COLOR_STYLE
+ FREE(Style_className);
+#endif
FREE(me->base_href);
FREE(me->map_address);
FREE(me->LastOptionValue);
@@ -6925,6 +6930,9 @@
}
styles[HTML_PRE]->alignment = HT_LEFT;
}
+#ifdef USE_COLOR_STYLE
+ FREE(Style_className);
+#endif
FREE(me->base_href);
FREE(me->map_address);
FREE(me->textarea_name);
--- lynx2-8-2.old/src/LYEditmap.c Wed Jan 13 10:37:34 1999
+++ lynx2-8-2/src/LYEditmap.c Sun Feb 14 17:00:22 1999
@@ -4,13 +4,14 @@
#include <HTUtils.h>
#include <LYStrings.h>
+#include <LYKeymap.h> /* only for KEYMAP_SIZE - kw */
PUBLIC int current_lineedit = 0; /* Index into LYLineEditors[] */
/*
* See LYStrings.h for the LYE definitions.
*/
-PRIVATE char DefaultEditBinding[]={
+PRIVATE char DefaultEditBinding[KEYMAP_SIZE-1]={
LYE_NOP, LYE_BOL, LYE_DELPW, LYE_ABORT,
/* nul ^A ^B ^C */
@@ -100,17 +101,141 @@
LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR,
/* 100..10F function key definitions in LYStrings.h */
-LYE_NOP, LYE_NOP, LYE_FORW, LYE_BACK,
+LYE_FORM_PASS, LYE_FORM_PASS, LYE_FORW, LYE_BACK,
/* UPARROW DNARROW RTARROW LTARROW */
-LYE_NOP, LYE_NOP, LYE_BOL, LYE_EOL,
+LYE_FORM_PASS, LYE_FORM_PASS, LYE_BOL, LYE_EOL,
/* PGDOWN PGUP HOME END */
+#if (defined(_WINDOWS) || defined(__DJGPP__))
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* F1 */
+
+#else
+
LYE_NOP, LYE_TAB, LYE_BOL, LYE_EOL,
/* F1 Do key Find key Select key */
-LYE_NOP, LYE_DELP, LYE_NOP, LYE_NOP,
-/* Insert key Remove key MOUSE_KEY DO_NOTHING */
+#endif /* _WINDOWS || __DJGPP__ */
+
+LYE_NOP, LYE_DELP, LYE_NOP, LYE_FORM_PASS,
+/* Insert key Remove key DO_NOTHING Back tab */
+
+/* 110..18F */
+#if (defined(_WINDOWS) || defined(__DJGPP__)) && defined(USE_SLANG) &&
!defined(DJGPP_KEYHANDLER)
+
+LYE_DELP, LYE_ENTER, LYE_NOP, LYE_NOP,
+/* Backspace Enter */
+
+#else
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+
+#endif /* USE_SLANG &&(_WINDOWS || __DJGPP) && !DJGPP_KEYHANDLER */
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* MOUSE_KEY */
+LYE_NOP, LYE_NOP, LYE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, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* 290..293 */
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
};
/*
@@ -121,9 +246,10 @@
/* ^K=delete-to-EOL, ^X=delete-to-BOL, */
/* ^R=delete-prev-word, ^T=delete-next-word, */
/* ^^=upper-case-line, ^_=lower-case-line */
+/* Why the difference for tab? - kw */
#ifdef EXP_ALT_BINDINGS
-PRIVATE char BetterEditBinding[]={
+PRIVATE char BetterEditBinding[KEYMAP_SIZE-1]={
LYE_NOP, LYE_BOL, LYE_BACK, LYE_ABORT,
/* nul ^A ^B ^C */
@@ -213,17 +339,141 @@
LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR,
/* 100..10E function key definitions in LYStrings.h */
-LYE_NOP, LYE_NOP, LYE_FORW, LYE_BACK,
+LYE_FORM_PASS, LYE_FORM_PASS, LYE_FORW, LYE_BACK,
/* UPARROW DNARROW RTARROW LTARROW */
-LYE_NOP, LYE_NOP, LYE_BOL, LYE_EOL,
+LYE_FORM_PASS, LYE_FORM_PASS, LYE_BOL, LYE_EOL,
/* PGDOWN PGUP HOME END */
+#if (defined(_WINDOWS) || defined(__DJGPP__))
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* F1 */
+
+#else
+
LYE_NOP, LYE_TAB, LYE_BOL, LYE_EOL,
/* F1 Do key Find key Select key */
-LYE_NOP, LYE_DELP, LYE_NOP, LYE_NOP,
-/* Insert key Remove key MOUSE_KEY DO_NOTHING */
+#endif /* _WINDOWS || __DJGPP__ */
+
+LYE_NOP, LYE_DELP, LYE_NOP, LYE_FORM_PASS,
+/* Insert key Remove key DO_NOTHING Back tab */
+
+/* 110..18F */
+#if (defined(_WINDOWS) || defined(__DJGPP__)) && defined(USE_SLANG) &&
!defined(DJGPP_KEYHANDLER)
+
+LYE_DELP, LYE_ENTER, LYE_NOP, LYE_NOP,
+/* Backspace Enter */
+
+#else
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+
+#endif /* USE_SLANG &&(_WINDOWS || __DJGPP) && !DJGPP_KEYHANDLER */
+
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* MOUSE_KEY */
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
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YE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
+/* 290..293 */
+LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP,
};
#endif
--- lynx2-8-2.old/src/LYForms.c Mon Feb 8 09:32:58 1999
+++ lynx2-8-2/src/LYForms.c Sun Feb 14 13:00:09 1999
@@ -375,6 +375,8 @@
action = EditBinding(ch);
if (action == LYE_ENTER)
break;
+ if (action == LYE_FORM_PASS)
+ break;
if (action == LYE_LKCMD) {
_statusline(ENTER_LYNX_COMMAND);
ch = LYgetch();
@@ -399,17 +401,17 @@
if (keymap[ch + 1] == LYK_REFRESH)
break;
switch (ch) {
+#ifdef NOTDEFINED /* The first four are mapped to LYE_FORM_PASS now */
case DNARROW:
case UPARROW:
case PGUP:
case PGDOWN:
-#ifdef NOTDEFINED
case HOME:
case END_KEY:
case FIND_KEY:
case SELECT_KEY:
-#endif /* NOTDEFINED */
goto breakfor;
+#endif /* NOTDEFINED */
/*
* Left arrrow in column 0 deserves special treatment here,
@@ -456,7 +458,9 @@
LYRefreshEdit(&MyEdit);
}
}
+#ifdef NOTDEFINED
breakfor:
+#endif /* NOTDEFINED */
if (Edited) {
char *p;
--- lynx2-8-2.old/src/LYKeymap.c Mon Feb 8 09:32:58 1999
+++ lynx2-8-2/src/LYKeymap.c Sun Feb 14 16:32:13 1999
@@ -46,13 +46,13 @@
0,
/* EOF */
-0, LYK_HOME, LYK_PREV_PAGE, 0,
+LYK_DO_NOTHING, LYK_HOME, LYK_PREV_PAGE, 0,
/* nul */ /* ^A */ /* ^B */ /* ^C */
LYK_ABORT, LYK_END, LYK_NEXT_PAGE, 0,
/* ^D */ /* ^E */ /* ^F */ /* ^G */
-LYK_HISTORY, LYK_NEXT_LINK, LYK_ACTIVATE, LYK_COOKIE_JAR,
+LYK_HISTORY, LYK_FASTFORW_LINK, LYK_ACTIVATE, LYK_COOKIE_JAR,
/* bs */ /* ht */ /* nl */ /* ^K */
LYK_REFRESH, LYK_ACTIVATE, LYK_DOWN_TWO, 0,
@@ -164,9 +164,18 @@
LYK_NOCACHE, 0, LYK_INTERRUPT, 0,
/* x */ /* y */ /* z */ /* { */
+#if (defined(_WINDOWS) || defined(__DJGPP__))
+
+LYK_PIPE, 0, 0, 0,
+/* | */ /* } */ /* ~ */
+
+#else
+
LYK_PIPE, 0, 0, LYK_HISTORY,
/* | */ /* } */ /* ~ */ /* del */
+#endif /* _WINDOWS || __DJGPP__ */
+
/* 80..9F (illegal ISO-8859-1) 8-bit characters. */
0, 0, 0, 0,
0, 0, 0, 0,
@@ -203,49 +212,38 @@
0, 0, 0, 0,
0, 0, 0, 0,
-/* 100..10E function key definitions in LYStrings.h */
+/* 100..10F function key definitions in LYStrings.h */
LYK_PREV_LINK, LYK_NEXT_LINK, LYK_ACTIVATE, LYK_PREV_DOC,
/* UPARROW */ /* DNARROW */ /* RTARROW */ /* LTARROW */
LYK_NEXT_PAGE, LYK_PREV_PAGE, LYK_HOME, LYK_END,
/* PGDOWN */ /* PGUP */ /* HOME */ /* END */
-#if defined(__DJGPP__) || defined(_WINDOWS)
-#ifdef USE_SLANG
-LYK_END, LYK_HOME, LYK_PREV_PAGE, 0,
-/* END */ /* HOME */ /* PGUP */ /* B2 Key */
-
-LYK_END, LYK_NEXT_PAGE, 0,
-/* END */ /* PGDOWN */
+#if (defined(_WINDOWS) || defined(__DJGPP__))
+LYK_HELP, 0, 0, 0,
+/* F1*/
#else
- 0, LYK_HELP, 0, 0,
-/* F0 */ /* F1 */ /* F2 */ /* F3 */
- 0, 0, 0,
-
-#endif /* USE_SLANG */
-#else
LYK_HELP, LYK_ACTIVATE, LYK_HOME, LYK_END,
/* F1*/ /* Do key */ /* Find key */ /* Select key */
-LYK_UP_TWO, LYK_DOWN_TWO,
-/* Insert key */ /* Remove key */
+#endif /* _WINDOWS || __DJGPP__ */
-LYK_DO_NOTHING,
-/* DO_NOTHING*/
-#endif /* __DJGPP__ || _WINDOWS */
-/* 10F..18F */
+LYK_UP_TWO, LYK_DOWN_TWO, LYK_DO_NOTHING, LYK_FASTBACKW_LINK,
+/* Insert key */ /* Remove key */ /* DO_NOTHING*/ /* Back tab */
- 0,
-#if defined(USE_SLANG) && !defined(DJGPP_KEYHANDLER)
+/* 110..18F */
+
+#if (defined(_WINDOWS) || defined(__DJGPP__)) && defined(USE_SLANG) &&
!defined(DJGPP_KEYHANDLER)
LYK_HISTORY, LYK_ACTIVATE, 0, 0,
/* Backspace */ /* Enter */
#else
0, 0, 0, 0,
-#endif /* USE_SLANG */
- 0, 0, 0, 0,
+#endif /* USE_SLANG &&(_WINDOWS || __DJGPP) && !DJGPP_KEYHANDLER */
0, 0, 0, 0,
+ 0, LYK_DO_NOTHING, 0, 0,
+ /* 0x11d: MOUSE_KEY */
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
@@ -253,16 +251,12 @@
#ifdef DJGPP_KEYHANDLER
0, LYK_ABORT, 0, 0,
/* ALT_X */
- 0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, LYK_HELP,
- /* F1 */
#else
0, 0, 0, 0,
+#endif /* DJGPP_KEYHANDLER */
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
-#endif /* DJGPP_KEYHANDLER */
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
@@ -296,17 +290,27 @@
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
+#if (defined(_WINDOWS) || defined(__DJGPP__)) && !defined(USE_SLANG) /*
PDCurses */
LYK_ABORT, 0, 0, 0,
/* ALT_X */
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
- 0, 0, 0, LYK_ACTIVATE,
- /* KP_ENTER */
+ 0, 0, LYK_WHEREIS, LYK_ACTIVATE,
+ /* KP_SLASH KP_ENTER */
0, 0, 0, LYK_IMAGE_TOGGLE,
/* KP_* */
LYK_PREV_PAGE, LYK_NEXT_PAGE, 0, 0,
/* KP_- */ /* KP_+ */
+#else
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+#endif /* (_WINDOWS || __DJGPP__) && !USE_SLANG */
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
@@ -318,12 +322,7 @@
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
-#if defined(USE_SLANG) && !defined(DJGPP_KEYHANDLER)
- 0, LYK_HELP, 0, 0,
- /* F1 */
-#else
0, 0, 0, 0,
-#endif /* USE_SLANG */
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
@@ -509,7 +508,7 @@
0, 0, 0, 0,
0, 0, 0, 0,
-/* 100..10E function key definitions in LYStrings.h */
+/* 100..10F function key definitions in LYStrings.h */
0, 0, 0, 0,
/* UPARROW */ /* DNARROW */ /* RTARROW */ /* LTARROW */
@@ -519,11 +518,113 @@
0, 0, 0, 0,
/* F1*/ /* Do key */ /* Find key */ /* Select key */
- 0, 0,
-/* Insert key */ /* Remove key */
+ 0, 0, LYK_DO_NOTHING, 0,
+/* Insert key */ /* Remove key */ /* DO_NOTHING */ /* Back tab */
+
+/* 110..18F */
+
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+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
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ /* 290...293 */
+ 0, 0, 0, 0,
};
#endif /* DIRED_SUPPORT && OK_OVERRIDE */
@@ -558,6 +659,8 @@
{ "END", "go to the end of the current document" },
{ "PREV_LINK", "make the previous link current" },
{ "NEXT_LINK", "make the next link current" },
+{ "FASTBACKW_LINK", "previous link or text area, only stops on links" },
+{ "FASTFORW_LINK", "next link or text area, only stops on links" },
{ "UP_LINK", "move up the page to a previous link" },
{ "DOWN_LINK", "move down the page to another link" },
{ "RIGHT_LINK", "move right to another link" },
@@ -570,7 +673,7 @@
{ "HELP", "display help on using the browser" },
{ "INDEX", "display an index of potentially useful documents" },
{ "NOCACHE", "force submission of form or link with no-cache" },
-{ "INTERRUPT", "interrupt network transmission" },
+{ "INTERRUPT", "interrupt network connection or transmission" },
{ "MAIN_MENU", "return to the first screen (home page)" },
{ "OPTIONS", "display and change option settings" },
{ "INDEX_SEARCH", "allow searching of an index" },
@@ -641,7 +744,12 @@
"Find key",
"Select key",
"Insert key",
- "Remove key"
+ "Remove key",
+ "(DO_NOTHING)", /* should normally not appear in list */
+ "Back Tab",
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,
+ "mouse pseudo key", /* normally not mapped to keymap[] action? */
};
PRIVATE char *pretty ARGS1 (int, c)
@@ -649,22 +757,23 @@
static char buf[30];
if (c == '\t')
- sprintf(buf, "<tab> ");
+ sprintf(buf, "<tab> ");
else if (c == '\r')
- sprintf(buf, "<return> ");
+ sprintf(buf, "<return> ");
else if (c == ' ')
- sprintf(buf, "<space> ");
+ sprintf(buf, "<space> ");
else if (c == '<')
- sprintf(buf, "< ");
+ sprintf(buf, "< ");
else if (c == '>')
- sprintf(buf, "> ");
+ sprintf(buf, "> ");
else if (c == 0177)
- sprintf(buf, "<delete> ");
+ sprintf(buf, "<delete> ");
else if (c > ' ' && c <= 0377)
sprintf(buf, "%c", c);
else if (c < ' ')
sprintf(buf, "^%c", c|0100);
- else if (c >= 0400 && (c - 0400) < (int) TABLESIZE(funckey))
+ else if (c >= 0400 && (c - 0400) < (int) TABLESIZE(funckey)
+ && funckey[c-0400])
sprintf(buf, "%s", funckey[c-0400]);
else if (c >= 0400)
sprintf(buf, "%#x", c);
@@ -687,7 +796,7 @@
&& revmap[the_key].name != 0
&& revmap[the_key].doc != 0
&& (formatted = pretty(i-1)) != 0) {
- HTSprintf0(&buf, "%-12s%-14s%s\n", formatted,
+ HTSprintf0(&buf, "%-11s %-13s %s\n", formatted,
revmap[the_key].name,
revmap[the_key].doc);
return buf;
@@ -755,9 +864,12 @@
for (i = 1; i < KEYMAP_SIZE; i++) {
/*
* LYK_PIPE not implemented yet.
+ *
+ * Don't show CHANGE_LINK if mouse not enabled.
*/
if ((i >= 0400 || i <= ' ' || !isalpha(i-1)) &&
- strcmp(revmap[keymap[i]].name, "PIPE")) {
+ strcmp(revmap[keymap[i]].name, "PIPE") &&
+ (LYUseMouse || strcmp(revmap[keymap[i]].name, "CHANGE_LINK"))) {
print_binding(target, i);
}
}
--- lynx2-8-2.old/src/LYKeymap.h Thu Jan 28 15:31:28 1999
+++ lynx2-8-2/src/LYKeymap.h Fri Feb 12 22:25:13 1999
@@ -56,65 +56,67 @@
#define LYK_END 23
#define LYK_PREV_LINK 24
#define LYK_NEXT_LINK 25
-#define LYK_UP_LINK 26
-#define LYK_DOWN_LINK 27
-#define LYK_RIGHT_LINK 28
-#define LYK_LEFT_LINK 29
-#define LYK_HISTORY 30
-#define LYK_PREV_DOC 31
-#define LYK_ACTIVATE 32
-#define LYK_GOTO 33
-#define LYK_ECGOTO 34
-#define LYK_HELP 35
-#define LYK_INDEX 36
-#define LYK_NOCACHE 37
-#define LYK_INTERRUPT 38
-#define LYK_MAIN_MENU 39
-#define LYK_OPTIONS 40
-#define LYK_INDEX_SEARCH 41
-#define LYK_WHEREIS 42
-#define LYK_NEXT 43
-#define LYK_COMMENT 44
-#define LYK_EDIT 45
-#define LYK_INFO 46
-#define LYK_PRINT 47
-#define LYK_ADD_BOOKMARK 48
-#define LYK_DEL_BOOKMARK 49
-#define LYK_VIEW_BOOKMARK 50
-#define LYK_VLINKS 51
-#define LYK_SHELL 52
-#define LYK_DOWNLOAD 53
-#define LYK_TRACE_TOGGLE 54
-#define LYK_TRACE_LOG 55
-#define LYK_IMAGE_TOGGLE 56
-#define LYK_INLINE_TOGGLE 57
-#define LYK_HEAD 58
-#define LYK_DO_NOTHING 59
-#define LYK_TOGGLE_HELP 60
-#define LYK_JUMP 61
-#define LYK_KEYMAP 62
-#define LYK_LIST 63
-#define LYK_TOOLBAR 64
-#define LYK_HISTORICAL 65
-#define LYK_MINIMAL 66
-#define LYK_SOFT_DQUOTES 67
-#define LYK_RAW_TOGGLE 68
-#define LYK_COOKIE_JAR 69
-#define LYK_F_LINK_NUM 70
-#define LYK_CLEAR_AUTH 71
-#define LYK_SWITCH_DTD 72
-#define LYK_ELGOTO 73
-#define LYK_CHANGE_LINK 74
-#define LYK_EDIT_TEXTAREA 75
+#define LYK_FASTBACKW_LINK 26
+#define LYK_FASTFORW_LINK 27
+#define LYK_UP_LINK 28
+#define LYK_DOWN_LINK 29
+#define LYK_RIGHT_LINK 30
+#define LYK_LEFT_LINK 31
+#define LYK_HISTORY 32
+#define LYK_PREV_DOC 33
+#define LYK_ACTIVATE 34
+#define LYK_GOTO 35
+#define LYK_ECGOTO 36
+#define LYK_HELP 37
+#define LYK_INDEX 38
+#define LYK_NOCACHE 39
+#define LYK_INTERRUPT 40
+#define LYK_MAIN_MENU 41
+#define LYK_OPTIONS 42
+#define LYK_INDEX_SEARCH 43
+#define LYK_WHEREIS 44
+#define LYK_NEXT 45
+#define LYK_COMMENT 46
+#define LYK_EDIT 47
+#define LYK_INFO 48
+#define LYK_PRINT 49
+#define LYK_ADD_BOOKMARK 50
+#define LYK_DEL_BOOKMARK 51
+#define LYK_VIEW_BOOKMARK 52
+#define LYK_VLINKS 53
+#define LYK_SHELL 54
+#define LYK_DOWNLOAD 55
+#define LYK_TRACE_TOGGLE 56
+#define LYK_TRACE_LOG 57
+#define LYK_IMAGE_TOGGLE 58
+#define LYK_INLINE_TOGGLE 59
+#define LYK_HEAD 60
+#define LYK_DO_NOTHING 61
+#define LYK_TOGGLE_HELP 62
+#define LYK_JUMP 63
+#define LYK_KEYMAP 64
+#define LYK_LIST 65
+#define LYK_TOOLBAR 66
+#define LYK_HISTORICAL 67
+#define LYK_MINIMAL 68
+#define LYK_SOFT_DQUOTES 69
+#define LYK_RAW_TOGGLE 70
+#define LYK_COOKIE_JAR 71
+#define LYK_F_LINK_NUM 72
+#define LYK_CLEAR_AUTH 73
+#define LYK_SWITCH_DTD 74
+#define LYK_ELGOTO 75
+#define LYK_CHANGE_LINK 76
+#define LYK_EDIT_TEXTAREA 77
#ifdef USE_EXTERNALS
-#define LYK_EXTERN 76
+#define LYK_EXTERN 78
#if defined(VMS) || defined(DIRED_SUPPORT)
-#define LYK_DIRED_MENU 77
+#define LYK_DIRED_MENU 79
#endif /* VMS || DIRED_SUPPORT */
#else /* USE_EXTERNALS */
#if defined(VMS) || defined(DIRED_SUPPORT)
-#define LYK_DIRED_MENU 76
+#define LYK_DIRED_MENU 78
#endif /* VMS || DIRED_SUPPORT */
#endif /* !defined(USE_EXTERNALS) */
--- lynx2-8-2.old/src/LYMainLoop.c Mon Feb 8 09:32:58 1999
+++ lynx2-8-2/src/LYMainLoop.c Sat Feb 13 06:16:02 1999
@@ -68,7 +68,7 @@
#endif
#define FASTTAB
-#ifdef FASTTAB
+
PRIVATE int sametext ARGS2(
char *, een,
char *, twee)
@@ -77,7 +77,6 @@
return (strcmp(een, twee) == 0);
return TRUE;
}
-#endif /* FASTTAB */
PUBLIC HTList * Goto_URLs = NULL; /* List of Goto URLs */
@@ -2407,6 +2406,176 @@
HTInfoMsg(ALREADY_AT_END);
}
break;
+
+ case LYK_FASTFORW_LINK:
+ {
+ int samepage = 0, nextlink = curdoc.link;
+ if (nlinks > 1) {
+
+ /*
+ * If in textarea, move to first link or field
+ * after it if there is one on this screen. - kw
+ */
+ if (links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
+ links[curdoc.link].form->type == F_TEXTAREA_TYPE) {
+ int thisgroup = links[curdoc.link].form->number;
+ char *thisname = links[curdoc.link].form->name;
+
+ if (curdoc.link < nlinks-1 &&
+ !(links[nlinks-1].type == WWW_FORM_LINK_TYPE &&
+ links[nlinks-1].form->type == F_TEXTAREA_TYPE &&
+ links[nlinks-1].form->number == thisgroup &&
+ sametext(links[nlinks-1].form->name, thisname))) {
+ do nextlink++;
+ while
+ (links[nextlink].type == WWW_FORM_LINK_TYPE &&
+ links[nextlink].form->type == F_TEXTAREA_TYPE &&
+ links[nextlink].form->number == thisgroup &&
+ sametext(links[nextlink].form->name, thisname));
+ samepage = 1;
+ } else if (!more && Newline == 1 && curdoc.link > 0) {
+ nextlink = 0;
+ samepage = 1;
+ }
+ } else if (curdoc.link < nlinks-1) {
+ nextlink++;
+ samepage = 1;
+ } else if (!more && Newline == 1 && curdoc.link > 0) {
+ nextlink = 0;
+ samepage = 1;
+ }
+ }
+ if (samepage) {
+ highlight(OFF, curdoc.link, prev_target);
+ curdoc.link = nextlink;
+ break; /* and we are done. */
+
+ /*
+ * At the bottom of list and there is only one page.
+ * Move to the top link on the page.
+ */
+ } else if (!more && Newline == 1 && curdoc.link == nlinks-1) {
+ highlight(OFF, curdoc.link, prev_target);
+ curdoc.link = 0;
+
+ } else if (more && /* need a later page */
+ HTGetLinkOrFieldStart(curdoc.link,
+ &Newline, &newdoc.link,
+ +1, TRUE) != NO) {
+ Newline++; /* our line counting starts with 1 not 0 */
+ /* nothing more to do here */
+
+ } else if (old_c != real_c) {
+ old_c = real_c;
+ HTInfoMsg(NO_LINKS_BELOW);
+ }
+ break;
+ }
+ case LYK_FASTBACKW_LINK:
+ {
+ int samepage = 0, nextlink = curdoc.link;
+ int res;
+ if (nlinks > 1) {
+
+ /*
+ * If in textarea, move to first link or textarea group
+ * before it if there is one on this screen. - kw
+ */
+ if (links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
+ links[curdoc.link].form->type == F_TEXTAREA_TYPE) {
+ int thisgroup = links[curdoc.link].form->number;
+ char *thisname = links[curdoc.link].form->name;
+
+ if (curdoc.link > 0 &&
+ !(links[0].type == WWW_FORM_LINK_TYPE &&
+ links[0].form->type == F_TEXTAREA_TYPE &&
+ links[0].form->number == thisgroup &&
+ sametext(links[0].form->name, thisname))) {
+ do nextlink--;
+ while
+ (links[nextlink].type == WWW_FORM_LINK_TYPE &&
+ links[nextlink].form->type == F_TEXTAREA_TYPE &&
+ links[nextlink].form->number == thisgroup &&
+ sametext(links[nextlink].form->name, thisname));
+ samepage = 1;
+
+ } else if (!more && Newline == 1 &&
+ (links[0].type == WWW_FORM_LINK_TYPE &&
+ links[0].form->type == F_TEXTAREA_TYPE &&
+ links[0].form->number == thisgroup &&
+ sametext(links[0].form->name, thisname)) &&
+ !(links[nlinks-1].type == WWW_FORM_LINK_TYPE &&
+ links[nlinks-1].form->type == F_TEXTAREA_TYPE
&&
+ links[nlinks-1].form->number == thisgroup &&
+ sametext(links[nlinks-1].form->name,
thisname))) {
+ nextlink = nlinks - 1;
+ samepage = 1;
+
+ } else if (!more && Newline == 1 && curdoc.link > 0) {
+ nextlink = 0;
+ samepage = 1;
+ }
+ } else if (curdoc.link > 0) {
+ nextlink--;
+ samepage = 1;
+ } else if (!more && Newline == 1) {
+ nextlink = nlinks - 1;
+ samepage = 1;
+ }
+ }
+ if (samepage) {
+ /*
+ * If the link as determined so far is part of a
+ * group of textarea fields, try to use the first
+ * of them that's on the screen instead. - kw
+ */
+ if (nextlink > 0 &&
+ links[nextlink].type == WWW_FORM_LINK_TYPE &&
+ links[nextlink].form->type == F_TEXTAREA_TYPE) {
+ int thisgroup = links[nextlink].form->number;
+ char *thisname = links[nextlink].form->name;
+ if (links[0].type == WWW_FORM_LINK_TYPE &&
+ links[0].form->type == F_TEXTAREA_TYPE &&
+ links[0].form->number == thisgroup &&
+ sametext(links[0].form->name, thisname)) {
+ nextlink = 0;
+ } else
+ while
+ (nextlink > 1 &&
+ links[nextlink-1].type == WWW_FORM_LINK_TYPE &&
+ links[nextlink-1].form->type == F_TEXTAREA_TYPE &&
+ links[nextlink-1].form->number == thisgroup &&
+ sametext(links[nextlink-1].form->name, thisname)) {
+ nextlink--;
+ }
+ }
+ highlight(OFF, curdoc.link, prev_target);
+ curdoc.link = nextlink;
+ break; /* and we are done. */
+
+ } else if (Newline > 1 && /* need a previous page */
+ (res = HTGetLinkOrFieldStart(curdoc.link,
+ &Newline, &newdoc.link,
+ -1, TRUE)) != NO) {
+ if (res == LINK_DO_ARROWUP) {
+ /*
+ * It says we should use the normal PREV_LINK
+ * mechanism, so we'll do that. - kw
+ */
+ if (nlinks > 0)
+ curdoc.link = 0;
+ cmd = LYK_PREV_LINK;
+ goto new_cmd;
+ }
+ Newline++; /* our line counting starts with 1 not 0 */
+ /* nothing more to do here */
+
+ } else if (old_c != real_c) {
+ old_c = real_c;
+ HTInfoMsg(NO_LINKS_ABOVE);
+ }
+ break;
+ }
case LYK_UP_LINK:
if (curdoc.link > 0 &&
--- lynx2-8-2.old/src/LYStrings.c Mon Feb 8 09:32:58 1999
+++ lynx2-8-2/src/LYStrings.c Sun Feb 14 16:43:26 1999
@@ -701,6 +701,8 @@
if (s == 0)
s = first + strlen(first);
first = expand_tiname(first, s-first, &dst);
+ if (*first)
+ first++;
} else if (ch == '?') { /* ASCII delete? */
*dst++ = 127;
} else if ((ch & 0x3f) < 0x20) { /* ASCII control char? */
@@ -1091,7 +1093,7 @@
return sl_read_mouse_event ();
#endif
- if ((keysym > DO_NOTHING) || (keysym < 0))
+ if ((keysym+1 >= KEYMAP_SIZE) || (keysym < 0))
return 0;
return keysym;
@@ -1103,7 +1105,7 @@
return LYgetch();
}
-#else /* !USE_KEYMAPS */
+#else /* NOT defined(USE_KEYMAPS) && defined(USE_SLANG) */
/*
* LYgetch() translates some escape sequences and may fake noecho.
@@ -1372,10 +1374,10 @@
c = CH_DEL; /* backspace key (delete, not Ctrl-H) S/390
-- gil -- 2041 */
break;
#endif /* KEY_BACKSPACE */
-#if defined(KEY_F) && !defined(__DJGPP__) && !defined(_WINDOWS)
case KEY_F(1):
c = F1; /* VTxxx Help */
break;
+#if defined(KEY_F) && !defined(__DJGPP__) && !defined(_WINDOWS)
case KEY_F(16):
c = DO_KEY; /* VTxxx Do */
break;
@@ -1405,6 +1407,33 @@
c = REMOVE_KEY; /* VTxxx Remove */
break;
#endif /* KEY_DC */
+#ifdef KEY_BTAB
+ case KEY_BTAB:
+ c = BACKTAB_KEY; /* Back tab, often Shift-Tab */
+ break;
+#endif /* KEY_BTAB */
+
+/* The following maps PDCurses keys away from lynx reserved values */
+#if (defined(_WINDOWS) || defined(__DJGPP__)) && !defined(USE_SLANG)
+ case KEY_F(2):
+ c = 0x213;
+ break;
+ case KEY_F(3):
+ c = 0x214;
+ break;
+ case KEY_F(4):
+ c = 0x215;
+ break;
+ case KEY_F(5):
+ c = 0x216;
+ break;
+ case KEY_F(6):
+ c = 0x217;
+ break;
+ case KEY_F(7):
+ c = 0x218;
+ break;
+#endif /* PDCurses */
#ifdef NCURSES_MOUSE_VERSION
case KEY_MOUSE:
if (code == FOR_CHOICE) {
@@ -1504,6 +1533,29 @@
case K_EEnd:
c = END_KEY;
break;
+ case K_F1: /* F1 key */
+ c = F1;
+ break;
+ case K_Insert: /* Insert key */
+ case K_EInsert:
+ c = INSERT_KEY;
+ break;
+ case K_Delete: /* Delete key */
+ case K_EDelete:
+ c = REMOVE_KEY;
+ break;
+ case K_Alt_Escape: /* Alt-Escape */
+ c = 0x1a7;
+ break;
+ case K_Control_At: /* CTRL-@ */
+ c = 0x1a8;
+ break;
+ case K_Alt_Backspace: /* Alt-Backspace */
+ c = 0x1a9;
+ break;
+ case K_BackTab: /* BackTab */
+ c = BACKTAB_KEY;
+ break;
}
}
#endif /* DGJPP_KEYHANDLER */
@@ -1538,6 +1590,15 @@
case SL_KEY_C1: /* lower left of keypad */
c = END_KEY;
break;
+ case SL_KEY_F(1): /* F1 key */
+ c = F1;
+ break;
+ case SL_KEY_IC: /* Insert key */
+ c = INSERT_KEY;
+ break;
+ case SL_KEY_DELETE: /* Delete key */
+ c = REMOVE_KEY;
+ break;
}
}
#endif /* USE_SLANG && __DJGPP__ && !DJGPP_KEYHANDLER && !USE_KEYMAPS */
@@ -1554,7 +1615,7 @@
}
}
-#endif /* NOT USE_KEYMAPS */
+#endif /* NOT defined(USE_KEYMAPS) && defined(USE_SLANG) */
/*
* Convert a null-terminated string to lowercase
@@ -1770,7 +1831,8 @@
return(ch);
case LYE_CHAR:
#ifdef EXP_KEYBOARD_LAYOUT
- if (map_active && ch < 128 && LYKbLayouts[current_layout][ch])
+ if (map_active && ch < 128 && ch >= 0 &&
+ LYKbLayouts[current_layout][ch])
ch = UCTransUniChar((long) LYKbLayouts[current_layout][ch],
current_char_set);
#endif
@@ -2075,7 +2137,8 @@
switch (EditBinding(ch)) {
case LYE_TAB:
ch = '\t';
- /* fall through */
+ /* This used to fall through to the next case before
+ tab completion was introduced */
res = LYFindInCloset(MyEdit.buffer);
if (res != 0) {
LYEdit1(&MyEdit, '\0', LYE_ERASE, FALSE);
@@ -2120,6 +2183,14 @@
* Used only in form_getstr() for invoking
* the LYK_F_LINK_NUM prompt when in form
* text fields. - FM
+ */
+ break;
+
+ case LYE_FORM_PASS:
+ /*
+ * Used in form_getstr() to end line editing and
+ * pass on the input char/lynxkeycode. Here it
+ * is just ignored. - kw
*/
break;
--- lynx2-8-2.old/src/LYStrings.h Mon Feb 8 09:32:58 1999
+++ lynx2-8-2/src/LYStrings.h Sun Feb 14 12:42:27 1999
@@ -97,8 +97,18 @@
#define SELECT_KEY 267 /* 0x10B */
#define INSERT_KEY 268 /* 0x10C */
#define REMOVE_KEY 269 /* 0x10D */
-#define MOUSE_KEY 270 /* 0x10E */
-#define DO_NOTHING 271 /* 0x10F */
+#define DO_NOTHING 270 /* 0x10E */
+#define BACKTAB_KEY 271 /* 0x10F */
+#define MOUSE_KEY 0x11d /* 0x11D */
+/* *** NOTE: ***
+ If you add definitions for new lynxkeycodes to the above list that
+ need to be mapped to LYK_* lynxactioncodes -
+ - AT LEAST the tables keymap[] and key_override[] in LYKeymap.c
+ have to be changed/reviewed, AS WELL AS the lineedit binding
+ tables in LYEditmap.c !
+ - KEYMAP_SIZE, defined in LYKeymap.h, may need to be changed !
+*/
+
# define FOR_PANEL 0
# define FOR_CHOICE 1
@@ -136,11 +146,15 @@
#define LYE_NOP 0 /* Do Nothing */
#define LYE_CHAR (LYE_NOP +1) /* Insert printable char */
-#define LYE_ENTER (LYE_CHAR +1) /* Input complete, return char */
+#define LYE_ENTER (LYE_CHAR +1) /* Input complete, return char/lynxkeycode */
#define LYE_TAB (LYE_ENTER +1) /* Input complete, return TAB */
#define LYE_ABORT (LYE_TAB +1) /* Input cancelled */
-#define LYE_DELN (LYE_ABORT +1) /* Delete next/curr char */
+#define LYE_FORM_PASS (LYE_ABORT +1) /* In form fields: input complete,
+ return char / lynxkeycode;
+ Elsewhere: Do Nothing */
+
+#define LYE_DELN (LYE_FORM_PASS +1) /* Delete next/curr char */
#define LYE_DELC (LYE_DELN) /* Obsolete (DELC case was equiv to DELN) */
#define LYE_DELP (LYE_DELN +1) /* Delete prev char */
#define LYE_DELNW (LYE_DELP +1) /* Delete next word */
--- lynx2-8-2.old/src/LYUtils.c Mon Feb 8 09:32:58 1999
+++ lynx2-8-2/src/LYUtils.c Sun Feb 14 12:44:31 1999
@@ -2188,8 +2188,35 @@
else if (display_partial && (NumOfLines_partial > 2))
/* OK, we got several lines from new document and want to scroll... */
{
+ int res;
switch (keymap[c+1])
{
+ case LYK_FASTBACKW_LINK :
+ if (Newline_partial <= (display_lines)+1) {
+ Newline_partial -= display_lines ;
+ } else if ((res =
+ HTGetLinkOrFieldStart(-1,
+ &Newline_partial, NULL,
+ -1, TRUE)) == LINK_LINE_FOUND) {
+ Newline_partial++;
+ } else if (res == LINK_DO_ARROWUP) {
+ Newline_partial -= display_lines ;
+ }
+ break;
+ case LYK_FASTFORW_LINK :
+ if (HText_canScrollDown()) {
+ /* This is not an exact science... - kw */
+ if ((res =
+ HTGetLinkOrFieldStart(HText_LinksInLines(HTMainText,
+ Newline_partial,
+ display_lines)
+ - 1,
+ &Newline_partial, NULL,
+ +1, TRUE)) == LINK_LINE_FOUND) {
+ Newline_partial++;
+ }
+ }
+ break;
case LYK_PREV_PAGE :
if (Newline_partial > 1)
Newline_partial -= display_lines ;
@@ -4725,7 +4752,11 @@
char *cp = NULL;
if (homedir == NULL) {
- if ((cp = getenv("HOME")) == NULL || *cp == '\0') {
+ if ((cp = getenv("HOME")) == NULL || *cp == '\0'
+#ifdef UNIX
+ || *cp != '/'
+#endif /* UNIX */
+ ) {
#if defined (DOSPATH) || defined (__EMX__) /* BAD! WSB */
if ((cp = getenv("TEMP")) == NULL || *cp == '\0') {
if ((cp = getenv("TMP")) == NULL || *cp == '\0') {
@@ -4764,6 +4795,10 @@
*/
StrAllocCopy(HomeDir, "/tmp");
}
+#ifdef UNIX
+ if (cp && *cp)
+ HTAlwaysAlert(NULL, gettext("Ignoring invalid HOME"));
+#endif
#endif /* VMS */
#endif /* DOSPATH */
} else {
--- lynx2-8-2.old/lynx.cfg Mon Feb 8 04:32:58 1999
+++ lynx2-8-2/lynx.cfg Sun Feb 14 14:47:01 1999
@@ -1126,6 +1126,11 @@
# but may conflict with very strong security or permissions restrictions:
#DOWNLOADER:Use Zmodem to download to the local terminal:set %s
%s;td=/tmp/Lsz$$;mkdir $td;ln -s $1 $td/"$2";sz $td/"$2";rm -r $td:TRUE
+# Note for OS/390: The following is strongly recommended /* S/390 -- gil --
1464 */
+# to undo ASCII->EBCDIC conversion.
+#
+#DOWNLOADER:Save OS/390 binary file: iconv -f IBM-1047 -t ISO8859-1 %s
>%s:FALSE
+
# Unix ONLY:
#===========
# Uploader definitions (implemented only with Unix DIRED_SUPPORT;
@@ -1513,7 +1518,7 @@
#
# A representative list of functions mapped to their default keys is
# provided below. All of the mappings are commented out by default
-# since they just map to the default mappings, except for TOGGLE_HELP
+# since they just repeat the default mappings, except for TOGGLE_HELP
# (see below). See LYKeymap.c for the complete key mapping. Use the
# 'K'eymap command when running Lynx for a list of the _current_ keymappings.
#
@@ -1524,7 +1529,7 @@
# when you are changing any KEYMAP below).
#
#
-# Special keys map to:
+# Keystrokes for special keys are represented by the following codes:
# Up Arrow: 0x100
# Down Arrow: 0x101
# Right Arrow: 0x102
@@ -1538,14 +1543,15 @@
# vt100 Do Key: 0x109
# vt100 Find Key: 0x10A
# vt100 Select Key: 0x10B
-# vt100 Insert Key: 0x10C
-# vt100 Remove Key: 0x10D
-# (0x00) NULL KEY: 0x10E (DO_NOTHING)
+# Insert Key: 0x10C
+# Remove (Del) Key: 0x10D
+# ignored key 0x10E (reserved for internal use, DO_NOTHING)
+# Back (Shift) Tab: 0x10F
+# reserved code 0x11D (reserved for internal use with -use_mouse)
+# reserved code 0x290 (reserved for internal use with -use_mouse)
#
-# Note for OS/390: The following is strongly recommended /* S/390 -- gil --
1464 */
-# to undo ASCII->EBCDIC conversion.
-#
-# DOWNLOADER:Save OS/390 binary file: iconv -f IBM-1047 -t ISO8859-1 %s
>%s:FALSE
+# Other codes not listed above may be available for additional keys,
+# depending on operating system and libraries used to compile Lynx.
#KEYMAP:0x2F:SOURCE # Toggle source viewing mode (show HTML source)
#KEYMAP:^R:RELOAD # Reload the current document and redisplay
@@ -1566,15 +1572,15 @@
#KEYMAP:^E:END # Go to bottom of current document
#KEYMAP:0x107:END # Keypad End - Go to bottom of current document
#KEYMAP:0x10B:END # Function key Select - Go to bottom of current document
-#KEYMAP:0x100:PREV_LINK # Move to the previous link
-#KEYMAP:0x101:NEXT_LINK # Move to the next link
+#KEYMAP:0x100:PREV_LINK # Move to the previous link or page
+#KEYMAP:0x101:NEXT_LINK # Move to the next link or page
+#KEYMAP:0x10F:FASTBACKW_LINK # Move always to previous link or text area
+#KEYMAP:^I:FASTFORW_LINK # Move always to next link or text area
#KEYMAP:<:UP_LINK # Move to the link above
#KEYMAP:>:DOWN_LINK # Move to the link below
-#KEYMAP:0x00:RIGHT_LINK # Move to the link to the right
-#KEYMAP:0x00:LEFT_LINK # Move to the link to the left
-#KEYMAP:0x7F:HISTORY # Display stack of currently-suspended documents
-#KEYMAP:0x08:HISTORY # Display stack of currently-suspended documents
-#KEYMAP:0x103:PREV_DOC # Return to the previous document
+#KEYMAP:0x7F:HISTORY # Show the history list
+#KEYMAP:0x08:HISTORY # Show the history list
+#KEYMAP:0x103:PREV_DOC # Return to the previous document in history stack
#KEYMAP:0x102:ACTIVATE # Select the current link
#KEYMAP:0x109:ACTIVATE # Function key Do - Select the current link
#KEYMAP:g:GOTO # Goto a random URL
@@ -1605,12 +1611,22 @@
#KEYMAP:k:KEYMAP # Display the current key map
#KEYMAP:l:LIST # List the references (links) in the current document
#KEYMAP:#:TOOLBAR # Go to the Toolbar or Banner in the current document
-#KEYMAP:^T:TRACE_TOGGLE # Toggle tracing of browser operations
+#KEYMAP:^T:TRACE_TOGGLE # Toggle detailed tracing for debugging
+#KEYMAP:;:TRACE_LOG # View trace log if available for the current session
#KEYMAP:*:IMAGE_TOGGLE # Toggle inclusion of links for all images
#KEYMAP:[:INLINE_TOGGLE # Toggle pseudo-ALTs for inlines with no ALT
string
+#KEYMAP:]:HEAD # Send a HEAD request for current document or link
#*** Must be compiled with USE_EXTERNALS to enable EXTERN ***
#KEYMAP:.:EXTERN # Run external program with url
+#*** Escaping from text input fields with ^V is independent from this: ***
+#KEYMAP:^V:SWITCH_DTD # Toggle between SortaSGML and TagSoup HTML parsing
#KEYMAP:0x00:DO_NOTHING # Does nothing (ignore this key)
+#KEYMAP:0x10E:DO_NOTHING # Does nothing (ignore this key)
+#
+# In addition, the following functions are not mapped to any keys by default:
+#
+#KEYMAP:???:RIGHT_LINK # Move to the link to the right
+#KEYMAP:???:LEFT_LINK # Move to the link to the left
# If TOGGLE_HELP is mapped, in novice mode the second help menu line
# can be toggled among NOVICE_LINE_TWO_A, _B, and _C, as defined in
@@ -1875,7 +1891,7 @@
#
# EXTERNAL:ftp:wget %s &:TRUE
-# CERN-style rules, *EXPERIMENTAL* - URL-specific rules
+# CERN-style rules, EXPERIMENTAL - URL-specific rules
#
# A CERN-style rules file can be given with RULESFILE. Use the system's
# native format for filenames, on Unix '~' is also recognized. If a filename
@@ -1884,11 +1900,11 @@
# Single CERN-style rules can be specified with RULES.
#
# Both options can be repeated, rules accumulate in the order
-# given, they will be applied in first-to-last order.
+# given, they will be applied in first-to-last order. See cernrules.txt
+# in the samples subdirectory for further explanation.
#
# Examples:
# RULESFILE:/etc/lynx/cernrules
-# RULE:Fail file://localhost/etc/passwd* # Don't rely on it!
# RULE:Fail gopher:* # reject by scheme
# RULE:Pass finger://address@hidden/ # allow this,
# RULE:Fail finger:* # but not others
--- lynx2-8-2.old/samples/lynx-keymaps Sun Sep 13 09:35:54 1998
+++ lynx2-8-2/samples/lynx-keymaps Sun Feb 14 15:13:16 1999
@@ -1,7 +1,11 @@
-# This is a sample key sequence definition file. It is used by Lynx when built
-# with ncurses or slang, to augment the definitions from your terminal's
+# This is a sample key sequence definition file. It is used by Lynx when
+# built with ncurses or slang, to augment the definitions from your terminal's
# termcap or terminfo description.
+# (Lynx implements this mechanism only if USE_KEYMAPS is defined during
+# compilation, which has nothing to do with the KEYMAP directives in lynx.cfg,
+# see source file LYCurses.h.)
+
# Lines that start with a '#' are comment lines. Blank lines are ignored.
# The 'setkey' function may be used in two ways:
@@ -9,7 +13,7 @@
# 1. setkey ESC-SEQUENCE KEYSYM
# 2. setkey ESC-SEQUENCE KEYSYM_NAME
#
-# where KEYSYM is an integer. A keysym is essentually with the lynx.rc
+# where KEYSYM is an integer. A keysym is essentially with the lynx.cfg
# file calls a 'keystroke', but I think that keysym is a more appropriate
# name. The keysym is an integer and may be expressed in various ways:
#
@@ -83,6 +87,15 @@
#
setkey "^[<" HOME
setkey "^[>" END
+#
+# Note that it may be impossible to map several sequences to the same
+# keysym (NCURSES only?), in that case the mapping occurring last wins.
+#
+# The following maps a sequence commonly used for Shift+Tab to the
+# corresponding code. It should not be needed if the terminfo file
+# has the correct info for kcbt.
+#
+setkey "^[[Z" 0x10F
#
# Other special escapes:
# \a bell
--- lynx2-8-2.old/docs/djgpp.key Sat Aug 15 16:57:56 1998
+++ lynx2-8-2/docs/djgpp.key Sun Feb 14 17:07:10 1999
@@ -70,9 +70,6 @@
RBrace 0x07d
Tilde 0x07e
Control_Backspace 0x07f
-Alt_Escape 0x101
-Control_At 0x103
-Alt_Backspace 0x10e
BackTab 0x10f
Alt_Q 0x110
Alt_W 0x111
@@ -111,7 +108,6 @@
Alt_Period 0x134
Alt_Slash 0x135
Alt_KPStar 0x137
-F1 0x13b
F2 0x13c
F3 0x13d
F4 0x13e
@@ -124,8 +120,6 @@
Alt_KPMinus 0x14a
Center 0x14c
Alt_KPPlus 0x14e
-Insert 0x152
-Delete 0x153
Shift_F1 0x154
Shift_F2 0x155
Shift_F3 0x156
@@ -205,8 +199,9 @@
Alt_KPSlash 0x1a4
Alt_Tab 0x1a5
Alt_Enter 0x1a6
-EInsert 0x252
-EDelete 0x253
+Alt_Escape 0x1a7
+Control_At 0x1a8
+Alt_Backspace 0x1a9
Control_ELeft 0x273
Control_ERight 0x274
Control_EEnd 0x275
--- lynx2-8-2.old/docs/pdcurses.key Sat Aug 15 21:57:56 1998
+++ lynx2-8-2/docs/pdcurses.key Sun Feb 14 17:28:37 1999
@@ -1,7 +1,12 @@
PDCurses Keymaps
-KEY_F0 0x108 /* function keys. space for */
-KEY_F(n) (KEY_F0+(n))/* 64 keys are reserved. */
+KEY_F2 0x213 /* F2 */
+KEY_F3 0x214 /* F3 */
+KEY_F4 0x215 /* F4 */
+KEY_F5 0x216 /* F5 */
+KEY_F6 0x217 /* F6 */
+KEY_F7 0x218 /* F7 */
+KEY_F(n) (0x108+(n)) /* If n>7 (9 keys are reserved) */
ALT_0 0x197 /* Alt-0 */
ALT_1 0x198 /* Alt-1 */
ALT_2 0x199 /* Alt-2 */
--- lynx2-8-2.old/docs/slang.key Sat Aug 15 21:57:56 1998
+++ lynx2-8-2/docs/slang.key Sun Feb 14 16:00:34 1999
@@ -1,4 +1,4 @@
S-Lang Keymaps for DOS
F0 0x200
-F(X) (SL_KEY_F0 + X)
+F(X) (SL_KEY_F0 + X) /* If X>1 */
- lynx-dev 2.8.2dev.16 patch 1 - Keys, tab changes,
Klaus Weide <=