lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev Patch for More Speech Friendly Lynx


From: Moshe Zadka
Subject: lynx-dev Patch for More Speech Friendly Lynx
Date: Mon, 5 Oct 1998 08:57:36 +0200 (IST)

Hello.

I am NOT subscribed to this list. Plese CC: replies to me personally.

One of the things that help blind people view web pages is
that every link is preceded by (LINK). As to put it in HTML
code is stupid and hard, I modified lynx to put it there as an
option (named link_mode).

I already have (undebugged) code to change it in lynx.cfg, but
no code to change it from the options or from the personal
configuration file.

Please incorporate these changes into the next release of lynx.
(Oh, lest I forget: those changes are to lynx2.8.1dev.29.
If this is not the last version of lynx, then it should be
fairly easy to use the diff file to edit the code by hand.)

Thanks in advance.

Here is the diff file (in unified diff format)
--------------------- Cut here ----------------------------
diff -u old-src/GridText.c src/GridText.c
--- old-src/GridText.c  Mon Oct  5 08:49:47 1998
+++ src/GridText.c      Mon Oct  5 08:49:29 1998
@@ -2680,7 +2680,7 @@
        BOOL,                   underline,
        HTChildAnchor *,        anc)
 {
-    char marker[16];
+    char marker[32];
 
     TextAnchor * a = (TextAnchor *) calloc(1, sizeof(*a));
 
@@ -2719,6 +2719,9 @@
     /*
      *  If we are doing link_numbering add the link number.
      */
+    if (link_mode) {
+       HText_appendText(text, "(LINK)");
+    }
     if ((a->number > 0) &&
        (keypad_mode == LINKS_ARE_NUMBERED ||
         keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED)) {
diff -u old-src/LYGlobalDefs.h src/LYGlobalDefs.h
--- old-src/LYGlobalDefs.h      Mon Oct  5 08:49:48 1998
+++ src/LYGlobalDefs.h  Mon Oct  5 08:49:29 1998
@@ -176,6 +176,7 @@
 extern BOOLEAN emacs_keys;        /* TRUE to turn on emacs-like key movement */
 extern int keypad_mode;           /* is set to either NUMBERS_AS_ARROWS *
                                   * or LINKS_ARE_NUMBERED              */
+extern BOOLEAN link_mode;         /* TRUE if links are preceded by (LINK) */
 extern BOOLEAN case_sensitive;    /* TRUE to turn on case sensitive search */
 extern BOOLEAN no_inside_telnet;  /* this and following are restrictions */
 extern BOOLEAN no_outside_telnet;
diff -u old-src/LYMain.c src/LYMain.c
--- old-src/LYMain.c    Mon Oct  5 08:49:48 1998
+++ src/LYMain.c        Mon Oct  5 08:49:29 1998
@@ -175,6 +175,7 @@
 PUBLIC BOOLEAN vi_keys = VI_KEYS_ALWAYS_ON;
 PUBLIC BOOLEAN emacs_keys = EMACS_KEYS_ALWAYS_ON;
 PUBLIC int keypad_mode = DEFAULT_KEYPAD_MODE;
+PUBLIC BOOLEAN link_mode = FALSE;
 PUBLIC BOOLEAN case_sensitive = CASE_SENSITIVE_ALWAYS_ON;
 PUBLIC BOOLEAN telnet_ok = TRUE;
 PUBLIC BOOLEAN news_ok = TRUE;
diff -u old-src/LYReadCFG.c src/LYReadCFG.c
--- old-src/LYReadCFG.c Mon Oct  5 08:49:49 1998
+++ src/LYReadCFG.c     Mon Oct  5 08:49:30 1998
@@ -579,6 +579,14 @@
     return 0;
 }
 
+static int link_mode_fun ARGS1(
+       char *,         value)
+{
+    link_mode = is_true(value);
+    return 0;
+}
+
+
 static int default_user_mode_fun ARGS1(
        char *,         value)
 {
@@ -850,6 +858,7 @@
      PARSE_SET("jumpbuffer", CONF_BOOL, jump_buffer),
      PARSE_FUN("jumpfile", CONF_FUN, jumpfile_fun),
      PARSE_FUN("keymap", CONF_FUN, keymap_fun),
+     PARSE_FUN("link_mode", CONF_FUN, link_mode_fun),
      PARSE_SET("list_news_numbers", CONF_BOOL, LYListNewsNumbers),
      PARSE_SET("list_news_dates", CONF_BOOL, LYListNewsDates),
 #ifndef VMS
----------------------- Cut here ----------------------------


--
Moshe Zadka <address@hidden>       |    (\_/)   
http://www.ma.huji.ac.il/~moshez/          |(  =(^Y^)= 
What is yellow, linear and complete?       | \_(m___m)
A Bananach Space                           |(originally by jgs)

reply via email to

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