lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx386 and ctrl+c-problem (fwd)


From: Doug Kaufman
Subject: Re: lynx386 and ctrl+c-problem (fwd)
Date: Thu, 16 Oct 1997 18:39:19 -0700 (PDT)

On Thu, 16 Oct 1997, Bill Schiavo wrote:

> I have developed patches for lynx so that it can be compiled with SLang
> version 0.99.38 and now I am curious if SLang suffers from the same
> problem.  Have any of you tried to compile Lynx for DOS with SLang?  I
> finally got it to work and I can't see why it wont work well with the
> Windows port but I don't do programing for windows so getting SLang to
> work on that platform is out for me.

I just spent a few hours this week trying to get slang to work with lynx
for DOS, but all I could get was a CGA type screen.  I'ld love to see
what you did that worked?  Did mouse support work with slang?

> Let me know if you would like those patches.  If there is enough interest,
> I will submit them to the list.

I would like the patches.  I think that submitting them to the list is
the best way to handle this.  I'll get them from there.

                           Doug

Okay, I have included them here.  There are some known problems:

1) SLtt_add_color_attribute, SLtt_get_screen_size, and SLtt_blink_mode
have not been ported to DJGPP.  

2)  You can't get mouse support working for DOS because there isn't any
available yet.  I think I'll write to John E. Davis <address@hidden>
as he was very helpfull to me when I was having problems with the keypad
interface.  

3) I expected that we would get a "CGA type" screen but I will fix this if
you don't beat me to it.

The patches are against lynx2-7-1ac-0.81 using SLang 0.99.38.  Be sure
that you change the top level makefile so that it uses the -DUSE_SLANG and
-DNO_KEYPAD and remove the flags that refer to NCurses.  

Doug, since you got Lynx to function somewhat with SLang, Let's see your
patches.  

Comments and corrections are welcome.



The patches are below.  I hope they don't break anything but there is so
much ifdef'ing that it's hard for me to tell.  I know that these patches
don't break anything on the dos port.

*** lycurses.c  Fri Oct 17 01:01:10 1997
--- lycurses.new        Fri Oct 17 01:04:48 1997
***************
*** 148,154 ****
      SLang_init_tty(3, 0, 1);
  #endif /* SLANG_VERSION > 9929 */
      signal(SIGTSTP, sl_suspend);
! #ifndef _WINDOWS
      SLtty_set_suspend_state(1);
  #endif
      if (sig == SIGTSTP)
--- 148,154 ----
      SLang_init_tty(3, 0, 1);
  #endif /* SLANG_VERSION > 9929 */
      signal(SIGTSTP, sl_suspend);
! #if !defined (_WINDOWS) && !defined(__DJGPP__)
      SLtty_set_suspend_state(1);
  #endif
      if (sig == SIGTSTP)
***************
*** 578,583 ****
--- 578,587 ----

      if (slinit == 0) {
        SLtt_get_terminfo();
+ #ifdef __DJGPP__
+       SLkp_init ();
+ #endif /* __DJGPP__ */
+
  #ifdef UNIX
  #if SLANG_VERSION >= 9935
        SLang_TT_Read_FD = fileno(stdin);
***************
*** 614,619 ****
--- 618,625 ----
        }
        size_change(0);

+ #ifndef __DJGPP__
+ #if defined(VMS) || defined(UNIX)
        SLtt_add_color_attribute(4, SLTT_ULINE_MASK);
        SLtt_add_color_attribute(5, SLTT_ULINE_MASK);
        /*
***************
*** 625,632 ****
--- 631,645 ----
        } else {
            SLtt_Blink_Mode = 0;
        }
+ #endif /* VMS || UNIX */
+ #endif /* __DJGPP__ */
      }
+ #ifdef __DJGPP__
+     else sock_init();
+ #endif /* __DJGPP__ */
+
      slinit = 1;
+
      Current_Attr = 0;
  #ifndef VMS
  #if SLANG_VERSION > 9929
***************
*** 642,648 ****
      SLsmg_Newline_Moves = -1;
      SLsmg_Backspace_Moves = 1;
  #ifndef VMS
! #ifndef _WINDOWS
     SLtty_set_suspend_state(1);
  #endif /* _WINDOWS */
  #ifdef SIGTSTP
--- 655,661 ----
      SLsmg_Newline_Moves = -1;
      SLsmg_Backspace_Moves = 1;
  #ifndef VMS
! #if !defined(_WINDOWS) && !defined(__DJGPP__)
     SLtty_set_suspend_state(1);
  #endif /* _WINDOWS */
  #ifdef SIGTSTP
*** lystring.c  Fri Oct 17 01:00:52 1997
--- lystring.new        Fri Oct 17 01:04:32 1997
***************
*** 195,201 ****
y--- 195,205 ----
  #ifdef VMS
  #define GetChar() ttgetc()
  #else
+ #ifdef __DJGPP__
+ #define GetChar SLkp_getkey
+ #else
  #define GetChar (int)SLang_getkey
+ #endif /* __DJGPP__ */
  #endif /* VMS */
  #endif /* USE_SLANG */

***************
*** 506,511 ****
--- 510,558 ----
        if (isdigit(a) && (b == '[' || c == 155) && d != -1 && d != '~')
            d = GetChar();
      }
+ #if defined(__DJGPP__) && defined(USE_SLANG)
+     else { /* SLang keypad interface */
+       switch (c) {
+         case SL_KEY_UP:
+           c = UPARROW;
+           break;
+         case SL_KEY_DOWN:
+           c = DNARROW;
+           break;
+         case SL_KEY_RIGHT:
+           c = RTARROW;
+           break;
+         case SL_KEY_B2:
+           c = DO_NOTHING;
+           break;
+         case SL_KEY_LEFT:
+           c = LTARROW;
+           break;
+         case SL_KEY_PPAGE:
+         case SL_KEY_A3:
+           c = PGUP;
+           break;
+         case SL_KEY_NPAGE:
+         case SL_KEY_C3:
+           c = PGDOWN;
+           break;
+         case SL_KEY_HOME:
+         case SL_KEY_A1:
+           c = HOME;
+           break;
+         case SL_KEY_END:
+         case SL_KEY_C1:
+           c = END;
+           break;
+         case SL_KEY_F(1):
+           c = F1;
+           break;
+         case SL_KEY_BACKSPACE:
+           c = 127;
+           break;
+       }
+     }
+ #endif
  #if HAVE_KEYPAD
      else {
        /*
*** lyutils.c   Fri Oct 17 01:15:08 1997
--- lyutils.new Fri Oct 17 01:15:28 1997
***************
*** 2826,2832 ****
--- 2826,2834 ----
        int,            sig)
  {
  #ifdef USE_SLANG
+ #if defined(VMS) || defined(UNIX)
      SLtt_get_screen_size();
+ #endif /* VMS || UNIX */
      LYlines = SLtt_Screen_Rows;
      LYcols  = SLtt_Screen_Cols;
  #ifdef SLANG_MBCS_HACK

Bill





;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

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