lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev dev.8 patch for cygwin


From: Doug Kaufman
Subject: lynx-dev dev.8 patch for cygwin
Date: Sat, 28 Aug 1999 23:37:03 -0700 (PDT)

I compiled 2.8.3dev.8 with cygwin. Using a newer cygwin1.dll, I
didn't run out of processes, and was able to use the configure script
without problems. I am somewhat confused by when "UNIX" is defined. In
some places, it seems that CYGWIN defines it, but at others that it
does not. There are places in the code that are ifdef'd 
"__CYGWIN__ && UNIX" and others that are "__CYGWIN__ && DOSPATH". When 
would __CYGWIN__ and DOSPATH both be defined?

The following patch gave a functioning lynx.exe with slang. I changed
LYKeymap.c, since I had previously thought that SL_KEY_BACKSPACE and
SL_KEY_ENTER were defined for DOS and Win32, but they are not. Slang
tries to remap the backspace key to 0x7F for both, but apparently only
succeeds for Win32. The backspace key now works in cygwin with slang
for the history page. I can't seem to get the delete key working in
cygwin, although it works in DJGPP. I thought that the same patch
to slang should work, but so far I haven't had any luck. I've been
using the latest slang release, 1.3.8, and haven't looked at the beta
versions.
                              Doug

--- lynx2-8-3/src/LYCurses.c    Sat Aug 28 15:04:14 1999
+++ lynx2-8-3/src/LYCurses.c.new        Sat Aug 28 22:12:42 1999
@@ -160,7 +160,7 @@
     SLang_init_tty(3, 0, 1);
 #endif /* SLANG_VERSION > 9929 */
     signal(SIGTSTP, sl_suspend);
-#ifdef UNIX
+#if defined(UNIX) && !defined(__CYGWIN__)
     SLtty_set_suspend_state(1);
 #endif
     if (sig == SIGTSTP)
@@ -684,11 +684,11 @@
        SLkp_init ();
 #endif /* __DJGPP__ && !DJGPP_KEYHANDLER */
 
-#ifdef UNIX
+#if defined(UNIX) && !defined(__CYGWIN__)
 #if SLANG_VERSION >= 9935
        SLang_TT_Read_FD = fileno(stdin);
 #endif /* SLANG_VERSION >= 9935 */
-#endif /* UNIX */
+#endif /* UNIX && !__CYGWIN__ */
 
 #if !defined(USE_KEYMAPS) && defined(ENHANCED_LINEEDIT) && defined(ESCDELAY)
        /* way to get ESC that's not part of a recognized sequence through */
@@ -724,7 +724,7 @@
        }
        size_change(0);
 
-#if defined(VMS) || defined(UNIX)
+#if (defined(VMS) || defined(UNIX)) && !defined(__CYGWIN__)
        SLtt_add_color_attribute(4, SLTT_ULINE_MASK);
        SLtt_add_color_attribute(5, SLTT_ULINE_MASK);
        /*
@@ -736,7 +736,7 @@
        } else {
            SLtt_Blink_Mode = 0;
        }
-#endif /* VMS || UNIX */
+#endif /* (VMS || UNIX) && !__CYGWIN__  */
     }
 #ifdef __DJGPP__
 #ifdef WATT32
@@ -762,9 +762,9 @@
     scrollok(0,0);
     SLsmg_Backspace_Moves = 1;
 #ifndef VMS
-#ifdef UNIX
+#if defined(UNIX) && !defined(__CYGWIN__)
     SLtty_set_suspend_state(1);
-#endif /* UNIX */
+#endif /* UNIX && !__CYGWIN__ */
 #ifdef SIGTSTP
     if (!no_suspend)
        signal(SIGTSTP, sl_suspend);
--- lynx2-8-3/src/LYKeymap.c    Thu Aug 26 05:31:20 1999
+++ lynx2-8-3/src/LYKeymap.c.new        Sat Aug 28 22:30:40 1999
@@ -185,17 +185,9 @@
 LYK_NOCACHE,            0,          LYK_INTERRUPT,     0,
 /* x */              /* y */          /* z */       /* { */
 
-#if (defined(_WINDOWS) || defined(__DJGPP__) || defined(__CYGWIN__))
-
-LYK_PIPE,               0,              0,             0,
-/* | */               /* } */         /* ~ */
-
-#else
-
 LYK_PIPE,               0,              0,          LYK_HISTORY,
 /* | */               /* } */         /* ~ */       /* del */
 
-#endif /* _WINDOWS || __DJGPP__ || __CYGWIN__ */
 
 /* 80..9F (illegal ISO-8859-1) 8-bit characters. */
    0,                  0,              0,             0,
@@ -256,12 +248,7 @@
 
 /* 110..18F */
 
-#if (defined(_WINDOWS) || defined(__DJGPP__) || defined(__CYGWIN__)) && 
defined(USE_SLANG) && !defined(DJGPP_KEYHANDLER)
-   LYK_HISTORY,        LYK_ACTIVATE,   0,             0,
-   /* Backspace */     /* Enter */
-#else
    0,                  0,              0,             0,
-#endif /* USE_SLANG &&(_WINDOWS || __DJGPP || __CYGWIN__) && !DJGPP_KEYHANDLER 
*/
    0,                  0,              0,             0,
    0,             LYK_DO_NOTHING,      0,             0,
                /* 0x11d: MOUSE_KEY */
--- lynx2-8-3/src/LYMainLoop.c  Thu Aug 26 05:31:20 1999
+++ lynx2-8-3/src/LYMainLoop.c.new      Sat Aug 28 21:42:46 1999
@@ -5805,7 +5805,7 @@
            if (!no_shell) {
                stop_curses();
                printf("%s\r\n", SPAWNING_MSG);
-#if defined(__CYGWIN_) && defined(DOSPATH)
+#if defined(__CYGWIN__)
                Cygwin_Shell();
 #else
                LYSystem(LYSysShell());
--- lynx2-8-3/src/LYUtils.c     Thu Aug 26 05:31:20 1999
+++ lynx2-8-3/src/LYUtils.c.new Sat Aug 28 22:15:42 1999
@@ -2102,7 +2102,7 @@
 #ifdef USE_SLANG
     if (!LYCursesON)
        fd = fileno(stdin);
-#if ((SLANG_VERSION >= 9919) && defined(UNIX))
+#if ((SLANG_VERSION >= 9919) && defined(UNIX) && !defined(__CYGWIN__))
     /* SLang_TT_Read_FD introduced in slang 0.99.19, from its changelog:
      *   SLang_TT_Read_FD variable is now available for unix.  This is the file
      *   descriptor used by SLang_getkey. */
@@ -7236,7 +7236,7 @@
 /*
  * Return a string which can be used in LYSystem() for spawning a subshell
  */
-#if defined(__CYGWIN__) && defined(DOSPATH)    /* 1999/02/26 (Fri) */
+#if defined(__CYGWIN__)        /* 1999/02/26 (Fri) */
 PUBLIC int Cygwin_Shell NOARGS
 {
     char *shell;
--- lynx2-8-3/WWW/Library/Implementation/HTTelnet.c     Fri Jun 18 15:54:46 1999
+++ lynx2-8-3/WWW/Library/Implementation/HTTelnet.c.new Sat Aug 28 21:40:48 1999
@@ -166,7 +166,7 @@
 #endif
 
 /* Most unix machines suppport username only with rlogin */
-#if defined(UNIX) || defined(DOSPATH)
+#if defined(UNIX) || defined(DOSPATH) || defined(__CYGWIN__)
 #ifndef TELNET_DONE
 
 #define FMT_RLOGIN "%s %s%s%s"

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


reply via email to

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