lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev Lynx386 with Slang


From: Doug Kaufman
Subject: Re: lynx-dev Lynx386 with Slang
Date: Sun, 10 May 1998 14:03:47 -0700 (PDT)

On Sun, 10 May 1998, I wrote:

> Quite correct about the missing sock_init. I am going to try to compile
> with Bill's patch today and see if I get any problems. I do have two

I compiled Bill's patch for slang with DOS against version 2.8.1dev.9
today, and it works fine except for an error in my original patch, which
he kept. The LY_set_ctrl_break function had an error, which didn't allow
it to work. After fixing it, I tested a build with SLANG and with
PDCurses 2.3 (18 Apr 1998 Beta), using only the LY_ functions and not
the PDC_ functions. Suggested revised patch against 2.8.1dev.9 follows
for LYMain.c. The rest should work as submitted by Bill. I am also
attaching a revised makefile.wsl which removes RAWDOSKEYHACK and which
compiles the executable without the coff file.

Interestingly enough, when compiled with SLANG, the BREAK setting is
returned to what the setting was before lynx was run, even if Ctrl-C or
Ctrl-BREAK was hit. With the PDCurses version, BREAK is still always
left ON after Ctrl-C or Ctrl-BREAK.

I'll try to clean up the patch that I originally submitted and see if
I can include that in the code as alternate keyhandling for DOS. I am
interested in seeing if the SLANG keyhandling or the DJGPP keyhandling
will be easier for those with non-US keyboards. I don't have any way of
testing this myself. Unless anyone has other suggestions, I'll try to
put it in with a new define, such as DJGPP_KEYHANDLER.

For now, I would suggest putting Bill's patch in the code, with the
revisions from this message.
                         Doug

*** lynx2-8/src/LYMain.c        Sat May  2 16:39:12 1998
--- lynx2-8/src/LYMain.c.new    Sun May 10 13:14:46 1998
***************
*** 34,39 ****
--- 34,43 ----
  #include <HTDOS.h>
  #endif
  
+ #ifdef __DJGPP__
+ #include <dos.h>
+ #endif /* __DJGPP__ */
+ 
  #ifndef VMS
  #ifdef SYSLOG_REQUESTED_URLS
  #include <syslog.h>
***************
*** 400,408 ****
  #endif
  
  #ifdef __DJGPP__
  void  reset_break()
  {
!     PDC_set_ctrl_break(init_ctrl_break[0]);
  }
  #endif /* __DJGPP__ */
  
--- 404,428 ----
  #endif
  
  #ifdef __DJGPP__
+ int LY_set_ctrl_break(int setting)
+ {
+       (void*)signal(SIGINT,(setting ? SIG_DFL : SIG_IGN));
+       setcbrk(setting);
+ }
+ 
+ int   LY_get_ctrl_break()
+ {
+       typedef union REGS Regs;
+       extern Regs regs;
+       regs.h.ah = 0x33;
+       regs.h.al = 0x00;
+       int86(0x21, &regs, &regs);
+       return ((int) regs.h.dl);
+ }
+ 
  void  reset_break()
  {
!     LY_set_ctrl_break(init_ctrl_break[0]);
  }
  #endif /* __DJGPP__ */
  
***************
*** 555,562 ****
  #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;}
      atexit(reset_break);
--- 575,582 ----
  #endif /* _WINDOWS */
  
  #ifdef __DJGPP__
! if (LY_get_ctrl_break() == 0) {
!     LY_set_ctrl_break(TRUE);
      init_ctrl_break[0] = 0;}
  else {init_ctrl_break[0] = 1;}
      atexit(reset_break);


__
Doug Kaufman
Internet: address@hidden (preferred)
          address@hidden
OBJS= UCdomap.o UCAux.o UCAuto.o \
LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \
LYMail.o HTAlert.o GridText.o LYGetFile.o \
LYMain.o LYMainLoop.o LYCurses.o LYBookmark.o LYUtils.o \
LYOptions.o LYReadCFG.o LYSearch.o LYHistory.o \
LYForms.o LYPrint.o LYrcFile.o LYDownload.o LYNews.o LYKeymap.o \
HTML.o HTFWriter.o HTInit.o DefaultStyle.o LYLocal.o LYUpload.o \
LYLeaks.o LYexit.o LYJump.o LYList.o LYCgi.o LYTraversal.o \
LYEditmap.o LYCharSets.o LYCharUtils.o LYMap.o LYCookie.o LYExtern.o \
LYStyle.o LYHash.o

SLANGINC=-If:/slang/src
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
WWWLIB = ../WWW/library/djgpp/libwww.a ../djgpp/tcplib/obj/libtcp.a
LIBS=-Lf:/slang/src/djgobjs -lslang -lz
CHRTR= ./chrtrans/

all: lynx.exe

lynx.exe:   message $(OBJS) $(WWWLIB)
        @echo "Linking and creating Lynx executable"
        $(CC) $(CFLAGS) -o lynx.exe  $(OBJS) $(WWWLIB) $(SLANGLIB) $(LIBS)
        @echo "Welcome to Lynx!"

message:
        @echo "Compiling Lynx sources"

dbg:    $(OBJS) $(WWWLIB)
        @echo "Making Lynx code"
        $(CC) $(OBJS) $(CFLAGS) $(WWWLIB) $(SLANGLIB) $(LIBS)

lint:
        lint *.c  > ../lint.out

clean:
        rm -f lynx.exe core *.[ob]

LYMain.o: ../userdefs.h
LYMainLoop.o: LYMainLoop.c ../userdefs.h
LYReadCFG.o: LYReadCFG.c ../userdefs.h
HTFWriter.o: HTFWriter.c ../userdefs.h
LYGetFile.o: LYGetFile.c ../userdefs.h
LYOptions.o: LYOptions.c ../userdefs.h
LYReadCFG.o: LYReadCFG.c ../userdefs.h
LYTraversal.o: LYTraversal.c ../userdefs.h
LYCharSets.o: LYCharSets.c ../userdefs.h
LYShowInfo.o: LYShowInfo.c ../userdefs.h
LYStrings.o: LYStrings.c ../userdefs.h
LYBookmark.o: LYBookmark.c ../userdefs.h
LYHistory.o: LYHistory.c ../userdefs.h
LYDownload.o: LYDownload.c ../userdefs.h
DefaultStyle.o: DefaultStyle.c ../userdefs.h
LYEditmap.o: LYEditmap.c ../userdefs.h
LYCharUtils.o: LYCharUtils.c ../userdefs.h
LYExtern.o: LYExtern.c ../userdefs.h
LYCookie.o: ../userdefs.h

reply via email to

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