lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev Another DOS (and maybe Win32) patch for lynx


From: Doug Kaufman
Subject: lynx-dev Another DOS (and maybe Win32) patch for lynx
Date: Sat, 1 Aug 1998 00:35:47 -0700 (PDT)

The following patch fixes a bug reported privately to me, where the
DJGPP_KEYHANDLER version doesn't allow movement by arrow keys within
a text area. It also cleans my previous patch to LYGetFile.c, with
LYgetch now changed where it is defined in LYStrings.c, rather than
at each place where it is used. The patch in LYStrings.c regarding
Windows should fix the problem with keymapping that occurred when
we got rid of RAWDOSKEYHACK. I don't have the compiler to check it,
however. Lastly, I changed makefile.dos to use DISPLAY_PARTIAL by
default with the PDCurses version. It seems to work as well as it does
with Slang. I haven't downloaded dev.19 yet. These are against dev.18,
except for LYGetFile.c, which is against dev.18 with my previous patch
applied.
                           Doug

*** lynx2-8-1/src/LYForms.c     Sat Jul 11 16:43:50 1998
--- lynx2-8-1/src/LYForms.c.new Fri Jul 31 06:55:36 1998
***************
*** 13,18 ****
--- 13,21 ----
  #include <LYGlobalDefs.h>
  #include <LYKeymap.h>
  #include <LYSignal.h>
+ #ifdef DJGPP_KEYHANDLER
+ #include <keys.h>
+ #endif /* DJGPP_KEYHANDLER */
  
  #include <LYLeaks.h>
  
***************
*** 381,386 ****
--- 384,403 ----
        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:
***************
*** 391,403 ****
--- 408,426 ----
            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)) {
*** lynx2-8-1/src/LYGetFile.c   Sat Jul 11 16:50:06 1998
--- lynx2-8-1/src/LYGetFile.c.new       Thu Jul 30 22:02:16 1998
***************
*** 446,456 ****
  #endif /* !VMS */
                            printf("\n%s", RETURN_TO_LYNX);
                            fflush(stdout);
- #ifdef DJGPP_KEYHANDLER
-                           getxkey();
- #else
                            LYgetch();
- #endif /* DJGPP_KEYHANDLER */
  #ifdef VMS
                            {
                              extern BOOLEAN HadVMSInterrupt;
--- 446,452 ----
*** lynx2-8-1/src/LYStrings.c   Sat Jul 11 16:44:04 1998
--- lynx2-8-1/src/LYStrings.c.new       Thu Jul 30 21:02:00 1998
***************
*** 572,578 ****
  #ifndef USE_SLANG
      clearerr(stdin); /* needed here for ultrix and SOCKETSHR, but why? - FM */
  #endif /* !USE_SLANG */
! #if !defined(USE_SLANG) || defined(VMS)
      c = GetChar();
  #else
      if (LYCursesON) {
--- 572,578 ----
  #ifndef USE_SLANG
      clearerr(stdin); /* needed here for ultrix and SOCKETSHR, but why? - FM */
  #endif /* !USE_SLANG */
! #if !defined(USE_SLANG) || defined(VMS) || defined(DJGPP_KEYHANDLER)
      c = GetChar();
  #else
      if (LYCursesON) {
***************
*** 825,831 ****
           c = 127;                /* backspace key (delete, not Ctrl-H) */
           break;
  #endif /* KEY_BACKSPACE */
! #if defined(KEY_F) && !defined(__DJGPP__)
        case KEY_F(1):
           c = F1;                 /* VTxxx Help */
           break;
--- 825,831 ----
           c = 127;                /* backspace key (delete, not Ctrl-H) */
           break;
  #endif /* KEY_BACKSPACE */
! #if defined(KEY_F) && !defined(__DJGPP__) && !defined(_WINDOWS)
        case KEY_F(1):
           c = F1;                 /* VTxxx Help */
           break;
***************
*** 894,900 ****
                    c = set_clicked_link(Mouse_status.x, Mouse_status.y);
                }
              }
! #endif /* _WINDOWS */
          }
          break;
  #endif /* NCURSES_MOUSE_VERSION */
--- 894,900 ----
                    c = set_clicked_link(Mouse_status.x, Mouse_status.y);
                }
              }
! #endif /* DOSPATH */
          }
          break;
  #endif /* NCURSES_MOUSE_VERSION */
***************
*** 902,912 ****
      }
  #endif /* HAVE_KEYPAD */
  
! #ifdef __DJGPP__
      if (c > 659)
  #else
      if (c > DO_NOTHING)
! #endif /* __DJGPP__ */
      {
        /*
         *  Don't return raw values for KEYPAD symbols which we may have
--- 902,912 ----
      }
  #endif /* HAVE_KEYPAD */
  
! #if (defined(__DJGPP__) || defined(_WINDOWS))
      if (c > 659)
  #else
      if (c > DO_NOTHING)
! #endif /* __DJGPP__ || _WINDOWS */
      {
        /*
         *  Don't return raw values for KEYPAD symbols which we may have
*** lynx2-8-1/src/makefile.dos  Thu Jun  4 09:19:50 1998
--- lynx2-8-1/src/makefile.dos.new      Sat Aug  1 00:08:06 1998
***************
*** 12,18 ****
  CFLAGS= $(MCFLAGS) -I. -I.. $(SLANGINC)
  
  CC = gcc
! MCFLAGS = -O3 -DUSE_ZLIB -DUSE_EXTERNALS -DCOLOR_CURSES -DNCURSES 
-DFANCY_CURSES -DACCESS_AUTH -DNO_CUSERID -DNOUSERS -DDOSPATH -DNO_TTYTYPE 
-DNO_UTMP -Ichrtrans -I../WWW/library/implementation -I../curses  
-I../djgpp/tcplib/include -I../djgpp/tcplib/in

clude/tcp
  WWWLIB = ../WWW/library/djgpp/libwww.a ../curses/pdcurses.a 
../djgpp/tcplib/obj/libtcp.a
  LIBS=-lz
  
--- 12,18 ----
  CFLAGS= $(MCFLAGS) -I. -I.. $(SLANGINC)
  
  CC = gcc
! MCFLAGS = -O3 -DDISP_PARTIAL -DUSE_ZLIB -DUSE_EXTERNALS -DCOLOR_CURSES 
-DNCURSES -DFANCY_CURSES -DACCESS_AUTH -DNO_CUSERID -DNOUSERS -DDOSPATH 
-DNO_TTYTYPE -DNO_UTMP -Ichrtrans -I../WWW/library/implementation -I../curses  
-I../djgpp/tcplib/include -I../

djgpp/tcplib/include/tcp
  WWWLIB = ../WWW/library/djgpp/libwww.a ../curses/pdcurses.a 
../djgpp/tcplib/obj/libtcp.a
  LIBS=-lz
  

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

reply via email to

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