lynx-dev
[Top][All Lists]
Advanced

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

LYNX-DEV Bugfix for DOS (version ac-0.108)


From: Doug Kaufman
Subject: LYNX-DEV Bugfix for DOS (version ac-0.108)
Date: Thu, 22 Jan 1998 00:25:56 -0800 (PST)

There has been a persistent bug in the DOS version (I don't know if
this also affects the Windows port), wherein exiting via CTL-C or
via CTL-BREAK only works if BREAK is set to "ON" in DOS before lynx
is invoked. The following patch fixes this problem and returns the
BREAK setting to what it was before lynx was invoked (as long as lynx
exits normally). If exiting via CTL-C or CTL-BREAK, BREAK will be left
set to ON in DOS regardless of the original setting. Perhaps someone
more knowledgable in C can alter this to meet any usual programming
conventions. This patch uses PDCurses functions, so it should be
portable to the Windows version that uses PDCurses.

The patch is against ac-0.108. I haven't had a chance to download the
more recent versions.
                                Doug


*** lynx2-7-1/src/LYMain.c      Fri Jan 16 10:29:28 1998
--- lynx2-7-1/src/LYMain.c.new  Wed Jan 21 23:52:20 1998
***************
*** 66,71 ****
--- 66,75 ----
  PUBLIC BOOLEAN sigint = FALSE;
  #endif /* IGNORE_CTRL_C */
  
+ #ifdef __DJGPP__
+ char init_ctrl_break[1];
+ #endif /* __DJGPP__ */
+ 
  #ifdef VMS
  PUBLIC char *mail_adrs = NULL;        /* the mask for a VMS mail transport */
               /* create FIXED 512 binaries */
***************
*** 546,552 ****
      }
  #endif /* _WINDOWS */
  
! #ifdef DJGPP
      sock_init();
  #endif
  
--- 550,560 ----
      }
  #endif /* _WINDOWS */
  
! #ifdef __DJGPP__
! if (PDC_get_ctrl_break() == 0) {
!     PDC_set_ctrl_break(TRUE);
!     init_ctrl_break[0] = 0;}
! else {init_ctrl_break[0] = 1;}
      sock_init();
  #endif
  
*** lynx2-7-1/src/LYexit.c      Fri Jan  2 10:12:24 1998
--- lynx2-7-1/src/LYexit.c.new  Wed Jan 21 23:18:56 1998
***************
*** 13,18 ****
--- 13,21 ----
  #include <syslog.h>
  #endif /* SYSLOG_REQUESTED_URLS */
  #endif /* !VMS */
+ #ifdef __DJGPP__
+ extern init_ctrl_break[];
+ #endif /* __DJGPP__ */
  
  #define FREE(x) if (x) {free(x); x = NULL;}
  
***************
*** 48,53 ****
--- 51,59 ----
  #ifdef _WINDOWS
    WSACleanup();
  #endif
+ #ifdef __DJGPP__
+     PDC_set_ctrl_break(init_ctrl_break[0]);
+ #endif /* __DJGPP__ */
      if (LYOutOfMemory == TRUE) {
        /*
         *  Ignore further interrupts. - FM

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

reply via email to

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