lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev DOS patch for lynx2.8.1dev.20


From: Doug Kaufman
Subject: lynx-dev DOS patch for lynx2.8.1dev.20
Date: Thu, 13 Aug 1998 23:30:33 -0700 (PDT)

The current keymapping for the DOS Slang ports maps the keys directly to
lynx actions via keymap.c. There are several places in the code that
test for arrow keys, page up or down, home and end for special handling
that depend on the lynx definition of the keys. Hence, the keys in the
DOS Slang ports were failing the tests and not working as expected. The
following patch now maps these special keys. They can no longer be
mapped individually via the KEYMAP mechanism in lynx.cfg. Arrows should
now work in GOTO fields. I have tested the patch against the binaries
maade by makefile.dos, makefile.dsl, and makefile.wsl. The wsl port
seems to be working well with DISP_PARTIAL, so I would suggest making
this the default. I also fixed a spelling error in lynx.cfg.
                             Doug

*** lynx2-8-1/src/LYForms.c     Thu Aug  6 05:28:22 1998
--- lynx2-8-1/src/LYForms.c.new Sat Jul 11 16:43:50 1998
***************
*** 12,20 ****
  #include <LYGlobalDefs.h>
  #include <LYKeymap.h>
  #include <LYSignal.h>
- #ifdef DJGPP_KEYHANDLER
- #include <keys.h>
- #endif /* DJGPP_KEYHANDLER */
  
  #include <LYLeaks.h>
  
--- 13,18 ----
***************
*** 383,402 ****
        if (keymap[ch + 1] == LYK_REFRESH)
            break;
        switch (ch) {
- #ifdef DJGPP_KEYHANDLER
-           case K_Down:
-           case K_EDown:
-           case K_Up:
-           case K_EUp:
-           case K_PageUp:
-           case K_EPageUp:
-           case K_PageDown:
-           case K_EPageDown:
-           case K_Home:
-           case K_EHome:
-           case K_End:
-           case K_EEnd:
- #else
            case DNARROW:
            case UPARROW:
            case PGUP:
--- 381,386 ----
***************
*** 407,425 ****
            case FIND_KEY:
            case SELECT_KEY:
  #endif /* NOTDEFINED */
- #endif /* DJGPP_KEYHANDLER */
                goto breakfor;
  
            /*
             *  Left arrrow in column 0 deserves special treatment here,
             *  else you can get trapped in a form without submit button!
             */
- #ifdef DJGPP_KEYHANDLER
-           case K_Left:
-           case K_ELeft:
- #else
            case LTARROW:
- #endif /* DJGPP_KEYHANDLER */
                if (MyEdit.pos == 0) {
                    int c = 'Y';    /* Go back immediately if no changes */
                    if (strcmp(MyEdit.buffer, value)) {
--- 391,403 ----
*** lynx2-8-1/src/LYKeymap.c    Thu Aug  6 05:28:22 1998
--- lynx2-8-1/src/LYKeymap.c.new        Wed Aug 12 23:18:38 1998
***************
*** 183,204 ****
     0,                  0,              0,             0,
  
  /* 100..10E function key definitions in LYStrings.h */
- #if defined(__DJGPP__) && defined(USE_SLANG) && !defined(DJGPP_KEYHANDLER)
-    0,             LYK_PREV_LINK,    LYK_NEXT_LINK,  LYK_PREV_DOC,
-                   /* UPARROW */     /* DNARROW */   /* LTARROW */
- 
- LYK_ACTIVATE,    LYK_PREV_PAGE,    LYK_NEXT_PAGE,     LYK_HOME,
- /* RTARROW */    /* PGUP */        /* PGDOWN */       /* HOME */
- 
- #else
  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 */
  
! #endif /* __DJGPP__ && USE_SLANG && !DJGPP_KEYHANDLER */
! #ifdef __DJGPP__
  #ifdef USE_SLANG
  LYK_END,          LYK_HOME,         LYK_PREV_PAGE,     0,
  /* END */       /* HOME */          /* PGUP */       /* B2 Key */
--- 183,195 ----
     0,                  0,              0,             0,
  
  /* 100..10E 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 */
***************
*** 222,228 ****
  
  LYK_DO_NOTHING,
  /* DO_NOTHING*/
! #endif /* __DJGPP__ */
  /* 10F..18F */
  
     0,
--- 213,219 ----
  
  LYK_DO_NOTHING,
  /* DO_NOTHING*/
! #endif /* __DJGPP__ || _WINDOWS */
  /* 10F..18F */
  
     0,
***************
*** 253,273 ****
  #endif /* DJGPP_KEYHANDLER */
     0,                  0,              0,             0,
     0,                  0,              0,             0,
- #ifdef DJGPP_KEYHANDLER
-    0,                  0,              0,             LYK_HOME,
-                                                       /* HOME */
- LYK_PREV_LINK,         LYK_PREV_PAGE,  0,             LYK_PREV_DOC,
- /* UPARROW */          /* Page Up */                  /* LEFTARROW */
-    0,                  LYK_ACTIVATE,   0,             LYK_END,
-                        /* RTARROW */                  /* END */
- LYK_NEXT_LINK,         LYK_NEXT_PAGE,  0,             0,
- /* DNARROW */          /* Page Down */
- #else
     0,                  0,              0,             0,
     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,
--- 244,253 ----
***************
*** 341,361 ****
     0,                  0,              0,             0,
     0,                  0,              0,             0,
     0,                  0,              0,             0,
- #ifdef DJGPP_KEYHANDLER
-    0,                  0,              0,             LYK_HOME,
-                                                       /* HOME */
- LYK_PREV_LINK,         LYK_PREV_PAGE,  0,             LYK_PREV_DOC,
- /* UPARROW */          /* Page Up */                  /* LEFTARROW */
-    0,                  LYK_ACTIVATE,   0,             LYK_END,
-                        /* RTARROW */                  /* END */
- LYK_NEXT_LINK,         LYK_NEXT_PAGE,  0,             0,
- /* DNARROW */          /* Page Down */
- #else
     0,                  0,              0,             0,
     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,
--- 321,330 ----
*** lynx2-8-1/src/LYStrings.c   Thu Aug  6 05:28:22 1998
--- lynx2-8-1/src/LYStrings.c.new       Thu Aug  6 07:06:04 1998
***************
*** 896,901 ****
--- 901,984 ----
        }
      }
  #endif /* HAVE_KEYPAD */
+ #ifdef DJGPP_KEYHANDLER
+     else {
+       switch(c) {
+       case K_Down:               /* The four arrow keys ... */
+       case K_EDown:
+          c = DNARROW;
+          break;
+       case K_Up:
+       case K_EUp:
+          c = UPARROW;
+          break;
+       case K_Left:
+       case K_ELeft:
+          c = LTARROW;
+          break;
+       case K_Right:      /* ... */
+       case K_ERight:
+          c = RTARROW;
+          break;
+       case K_Home:               /* Home key (upward+left arrow) */
+       case K_EHome:
+          c = HOME;
+          break;
+       case K_PageDown:           /* Next page */
+       case K_EPageDown:
+          c = PGDOWN;
+          break;
+       case K_PageUp:     /* Previous page */
+       case K_EPageUp:
+          c = PGUP;
+          break;
+       case K_End:                /* home down or bottom (lower left) */
+       case K_EEnd:
+          c = END_KEY;
+          break;
+       }
+     }
+ #endif /* DGJPP_KEYHANDLER */
+ #if defined(USE_SLANG) && defined(__DJGPP__) && !defined(DJGPP_KEYHANDLER)  
&& !defined(USE_SLANG_KEYMAPS)
+     else {
+       switch(c) {
+       case SL_KEY_DOWN:          /* The four arrow keys ... */
+          c = DNARROW;
+          break;
+       case SL_KEY_UP:
+          c = UPARROW;
+          break;
+       case SL_KEY_LEFT:
+          c = LTARROW;
+          break;
+       case SL_KEY_RIGHT:         /* ... */
+          c = RTARROW;
+          break;
+       case SL_KEY_HOME:          /* Home key (upward+left arrow) */
+       case SL_KEY_A1:            /* upper left of keypad */
+          c = HOME;
+          break;
+       case SL_KEY_NPAGE:         /* Next page */
+       case SL_KEY_C3:            /* lower right of keypad */
+          c = PGDOWN;
+          break;
+       case SL_KEY_PPAGE:         /* Previous page */
+       case SL_KEY_A3:            /* upper right of keypad */
+          c = PGUP;
+          break;
+       case SL_KEY_END:           /* home down or bottom (lower left) */
+       case SL_KEY_C1:            /* lower left of keypad */
+          c = END_KEY;
+          break;
+       }
+     }
+ #endif /* USE_SLANG && __DJGPP__ && !DJGPP_KEYHANDLER && !USE_SLANG_KEYMAPS */
  
  #if (defined(__DJGPP__) || defined(_WINDOWS))
      if (c > 659)
*** lynx2-8-1/docs/djgpp.key    Thu Jun  4 09:19:50 1998
--- lynx2-8-1/docs/djgpp.key.new        Sun Aug  9 23:44:40 1998
***************
*** 121,137 ****
  F8                   0x142
  F9                   0x143
  F10                  0x144
- Home                 0x147
- Up                   0x148
- PageUp               0x149
  Alt_KPMinus          0x14a
- Left                 0x14b
  Center               0x14c
- Right                0x14d
  Alt_KPPlus           0x14e
- End                  0x14f
- Down                 0x150
- PageDown             0x151
  Insert               0x152
  Delete               0x153
  Shift_F1             0x154
--- 121,129 ----
***************
*** 213,226 ****
  Alt_KPSlash          0x1a4
  Alt_Tab              0x1a5
  Alt_Enter            0x1a6
- EHome                0x247
- EUp                  0x248
- EPageUp              0x249
- ELeft                0x24b
- ERight               0x24d
- EEnd                 0x24f
- EDown                0x250
- EPageDown            0x251
  EInsert              0x252
  EDelete              0x253
  Control_ELeft        0x273
--- 205,210 ----
*** lynx2-8-1/docs/pdcurses.key Thu Jun  4 09:19:50 1998
--- lynx2-8-1/docs/pdcurses.key.new     Sun Aug  9 23:46:20 1998
***************
*** 44,58 ****
  CTL_PGDN        0x1be   /* Control-PgDn                  */
  CTL_HOME        0x1bf   /* Control-Home                  */
  CTL_END         0x1c0   /* Control-End                   */
- KEY_A1          0x1c1   /* upper left on Virtual keypad  */
- KEY_A2          0x1c2   /* upper middle on Virt. keypad  */
- KEY_A3          0x1c3   /* upper right on Vir. keypad    */
- KEY_B1          0x1c4   /* middle left on Virt. keypad   */
  KEY_B2          0x1c5   /* center on Virt. keypad        */
- KEY_B3          0x1c6   /* middle right on Vir. keypad   */
- KEY_C1          0x1c7   /* lower left on Virt. keypad    */
- KEY_C2          0x1c8   /* lower middle on Virt. keypad  */
- KEY_C3          0x1c9   /* lower right on Vir. keypad    */
  PADSLASH        0x1ca   /* slash on keypad               */
  PADENTER        0x1cb   /* enter on keypad               */
  CTL_PADENTER    0x1cc   /* ctl-enter on keypad           */
--- 44,50 ----
*** lynx2-8-1/docs/slang.key    Thu Jun  4 09:19:50 1998
--- lynx2-8-1/docs/slang.key.new        Sun Aug  9 23:42:32 1998
***************
*** 1,22 ****
                     S-Lang Keymaps for DOS
  
- UP            0x101
- DOWN          0x102
- LEFT          0x103
- RIGHT         0x104
- PPAGE         0x105
- NPAGE         0x106
- HOME          0x107
- END           0x108
- A1            0x109
- A3            0x10A
- B2            0x10B
- C1            0x10C
- C3            0x10D
- BACKSPACE     0x110
- ENTER         0x111
- IC            0x112
- DELETE                0x113
- 
  F0            0x200
  F(X)          (SL_KEY_F0 + X)
--- 1,4 ----
*** lynx2-8-1/src/makefile.wsl  Thu Aug  6 05:28:22 1998
--- lynx2-8-1/src/makefile.wsl.new      Thu Aug 13 23:15:14 1998
***************
*** 12,18 ****
  CFLAGS= $(MCFLAGS) -I. -I.. $(SLANGINC)
  
  CC = gcc
! MCFLAGS = -O3 -DUSE_ZLIB -DUSE_EXTERNALS \
  -DUSE_SLANG -DACCESS_AUTH -DNO_CUSERID \
  -DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP -I../WWW/library/implement 
-I../djgpp/tcplib/include \
  -I./chrtrans -I../djgpp/tcplib/include/tcp
--- 12,18 ----
  CFLAGS= $(MCFLAGS) -I. -I.. $(SLANGINC)
  
  CC = gcc
! MCFLAGS = -O3 -DDISP_PARTIAL -DUSE_ZLIB -DUSE_EXTERNALS \
  -DUSE_SLANG -DACCESS_AUTH -DNO_CUSERID \
  -DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP -I../WWW/library/implement 
-I../djgpp/tcplib/include \
  -I./chrtrans -I../djgpp/tcplib/include/tcp
*** lynx2-8-1/lynx.cfg  Thu Aug  6 05:28:22 1998
--- lynx2-8-1/lynx.cfg.new      Thu Aug 13 23:19:28 1998
***************
*** 774,780 ****
  # function in LYPrint.c, may be required.
  #
  #SYSTEM_MAIL:PMDF SEND
! #SYSERM_MAIL_FLAGS:/headers
  #
  #SYSTEM_MAIL:MAIL
  #SYSTEM_MAIL_FLAGS:
--- 774,780 ----
  # function in LYPrint.c, may be required.
  #
  #SYSTEM_MAIL:PMDF SEND
! #SYSTEM_MAIL_FLAGS:/headers
  #
  #SYSTEM_MAIL:MAIL
  #SYSTEM_MAIL_FLAGS:

__
Doug Kaufman
Internet: address@hidden (preferred)
          address@hidden


reply via email to

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