lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev DOS port with FTP and NEWS [patch]


From: Doug Kaufman
Subject: lynx-dev DOS port with FTP and NEWS [patch]
Date: Thu, 8 Jul 1999 07:59:19 -0700 (PDT)

It took a bit longer than I expected, but I now have a working lynx
DOS port that does http, ftp, news, mailto, and telnet, using the
WATT-32 tcp library. This has been tested only with slang and the
djgpp_keyhandler code. There will probably need to be more changes to
have this work properly with PDCurses. There is at least one bug that
I know of. When set to use http_proxy, there seems to be a long wait
between socket connect and write if the proxy is accessed too rapidly
in succession. It seems that if it is accessed more frequently than
about 20 seconds, there is a timeout of up to about 85 seconds. I'll
try to investigate this more. I'll also be sending a report about
ctrl-break handling to the watt-32 list. I hope that those compiling
the DOS port can try to exercise this and see what other bugs may be
present.

In order to avoid confusion between the tcp.h file in lynx
and that in WATT-32, I have suggested CHANGING THE NAME of
lynx2-8-3/WWW/Library/Implementation/tcp.h to www_tcp.h. This is
only referenced 2 times in the code - once in HTUtils.h and once in
makeuctb.c. The latter appears to be redundant. This name change
was originally suggested by Gisle Vanem.

WATT-32 now has a working gethostbyname(), so some of the DOS use of
resolve() can probably be removed from the lynx code, but I haven't
worked on this yet.
                                Doug

--- lynx2-8-3/WWW/Library/Implementation/HTTP.c Tue Jun 29 05:50:02 1999
+++ lynx2-8-3/WWW/Library/Implementation/HTTP.c.new     Mon Jul  5 13:44:24 1999
@@ -7,6 +7,9 @@
 */
 
 #include <HTUtils.h>
+#ifdef __DJGPP__
+#include <tcp.h>
+#endif /* __DJGPP__ */
 #include <HTTP.h>
 #include <LYUtils.h>
 
--- lynx2-8-3/WWW/Library/Implementation/HTUtils.h      Fri Jun 11 02:34:08 1999
+++ lynx2-8-3/WWW/Library/Implementation/HTUtils.h.new  Fri Jul  2 22:55:36 1999
@@ -1,7 +1,7 @@
 /*                                       Utility macros for the W3 code library
                                   MACROS FOR GENERAL USE
 
-   See also: the system dependent file "tcp.h", which is included here.
+   See also: the system dependent file "www_tcp.h", which is included here.
 
  */
 
@@ -433,7 +433,7 @@
 
 extern FILE *TraceFP NOPARAMS;
 
-#include <tcp.h>
+#include <www_tcp.h>
 
 /*
  * We force this include-ordering since socks.h contains redefinitions of
--- lynx2-8-3/INSTALLATION      Fri Jun 18 14:54:46 1999
+++ lynx2-8-3/INSTALLATION.new  Mon Jul  5 15:22:08 1999
@@ -672,16 +672,14 @@
     zlib.h and zconf.h in the include subdirectory.
 
     In addition to the files in the Lynx distribution, you will need a
-    curses package and a TCP package. You can use PDCurses (available at
-    "http://www.lightlink.com/hessling/";) and the DJGPP port of WATTCP
-    (available in two different versions at "ftp://neonatal.sm.med.ic.ac.uk/";
-    and in "http://www.fdisk.com/doslynx/wlynx/source/djgpp.zip";).
-    A patched copy of the version from the neonatal site is also
-    available from "http://www.rahul.net/dkaufman/tcplibdj.zip"; or
-    "ftp://ftp.rahul.net/pub/dkaufman/tcplibdj.zip";. You can also use slang
-    ("ftp://space.mit.edu/pub/davis/slang";) as your curses library. You need
-    to compile these before you go any further. If you wish to use PDCurses
-    2.3, you need to first apply the following patch:
+    curses package and a TCP package. You can use PDCurses (available
+    at "http://www.lightlink.com/hessling/";) and the DJGPP port of
+    WATTCP. The updated version of WATTCP is known as WATT-32, and
+    is available at "http://www.bgnett.no/~giva/";. You can also
+    use slang ("ftp://space.mit.edu/pub/davis/slang";) as your curses
+    library. You need to compile these before you go any further. If
+    you wish to use PDCurses 2.3, you need to first apply the following
+    patch:
 
 *** curses.h   Thu Jul  9 19:38:28 1998
 --- curses.h.new       Sat Aug 15 11:02:08 1998
@@ -716,14 +714,11 @@
   # else
 
     If you have trouble applying the patch, try using the "patch" program,
-    ("http://www.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/pat25b.zip";).  The
-    WATTCP TCPLIB sources must also be patched prior to compilation.  See
-    "http://www.flora.org/lynx-dev/html/month1197/msg00403.html";.
-
+    ("http://www.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/pat25b.zip";).
     To read the Unix man style documentation, use, for example, "less"
     ("http://www.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/lss332b.zip";).
     Compile or place your compiled PDCurses library in lynx2-*/curses, and
-    compile or place your compiled WATTCP library in lynx2-*/djgpp/tcplib.  If
+    compile or place your compiled WATT-32 library in lynx2-*/djgpp/watt32.  If
     using the SLANG library, put libslang.a in your DJGPP/lib directory and put
     slang.h and slcurses.h in your DJGPP/include directory, or in the
     appropriate directories specified by LIBRARY_PATH and INCLUDE_PATH in your
@@ -797,8 +792,9 @@
     texts more readable under DOS.  If you compile lynx regularly, you may
     automate the procedure by creating a batch file such as the following.
 
-       cd djgpp\tcplib\obj
-       make
+       cd djgpp\watt32\src
+       build djgpp
+       make -f djgpp.mak
        cd ..\..\..\www\library\djgpp
        make
        cd ..\..\..\src\chrtrans
@@ -808,7 +804,7 @@
        strip lynx.exe
        cd ..
 
-    This batch file expects the DJGPP port of WATTCP to be installed in the
+    This batch file expects the DJGPP port of WATT-32 to be installed in the
     lynx2-* directory.  Place a copy of this batch file, named "djgpp.bat",
     in the lynx2-* directory, move to that directory and type "djgpp".  A more
     complete batch file with error checking and annotation can be found at:
@@ -879,7 +875,6 @@
 
     386 version only:
     WATTCP.CFG   Set to the full path for the WATTCP.CFG directory
-    (Depending on how you compiled libtcp.a, you may have to use WATCONF.)
 
     Define these in your batch file for running Lynx.  For example, if your
     application line is "D:\win32\lynx.bat", lynx.bat for Win32 may look like:
--- lynx2-8-3/src/LYCurses.c    Fri Jun 11 02:34:08 1999
+++ lynx2-8-3/src/LYCurses.c.new        Wed Jul  7 00:16:50 1999
@@ -737,7 +737,11 @@
 #endif /* VMS || UNIX */
     }
 #ifdef __DJGPP__
+#ifdef WATT32
+    _eth_init();
+#else
     else sock_init();
+#endif /* WATT32 */
 #endif /* __DJGPP__ */
 
     slinit = 1;
@@ -958,9 +962,13 @@
 PUBLIC void stop_curses NOARGS
 {
     echo();
-#ifdef DJGPP
+#ifdef __DJGPP__
+#ifdef WATT32
+    _eth_release();
+#else
     sock_exit();
-#endif
+#endif /* WATT32 */
+#endif /* __DJGPP__ */
 #if defined (DOSPATH) && !defined(USE_SLANG)
     clrscr();
 #else
--- lynx2-8-3/src/chrtrans/makefile.dos Wed Mar 17 19:17:12 1999
+++ lynx2-8-3/src/chrtrans/makefile.dos.new     Fri Jul  2 23:31:58 1999
@@ -15,8 +15,8 @@
 MCFLAGS = -O3 -DDOSPATH -DNO_TTYTYP \
 -I. \
 -I../../WWW/Library/Implementation \
--I../../djgpp/tcplib/include \
--I../../djgpp/tcplib/include/tcp \
+-I../../djgpp/watt32/inc \
+-I../../djgpp/watt32/inc/sys \
 -I../..
 
 .SUFFIXES: .tbl
--- lynx2-8-3/src/makefile.dsl  Fri Jun 18 14:54:46 1999
+++ lynx2-8-3/src/makefile.dsl.new      Mon Jul  5 14:52:38 1999
@@ -16,12 +16,13 @@
 
 CC = gcc
 MCFLAGS = -O2 -DDISP_PARTIAL -DUSE_ZLIB -DUSE_EXTERNALS \
+-DWATT32 \
 $(DIRED_DEFS) \
 -DSOURCE_CACHE -DUSE_PSRC \
 -DUSE_SLANG -DDJGPP_KEYHANDLER -DACCESS_AUTH -DNO_CUSERID \
 -DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP -I../WWW/Library/Implementation \
--I../djgpp/tcplib/include -I./chrtrans -I../djgpp/tcplib/include/tcp
-WWWLIB = ../WWW/Library/djgpp/libwww.a ../djgpp/tcplib/obj/libtcp.a
+-I../djgpp/watt32/inc -I./chrtrans -I../djgpp/watt32/inc/sys
+WWWLIB = ../WWW/Library/djgpp/libwww.a ../djgpp/watt32/lib/libwatt.a
 LIBS= -lslang -lz # -lintl
 CHRTR= ./chrtrans/
 #INTLFLAGS = -DHAVE_GETTEXT -DHAVE_LIBINTL_H
--- lynx2-8-3/WWW/Library/djgpp/makefile.sla    Tue Jun 29 05:50:02 1999
+++ lynx2-8-3/WWW/Library/djgpp/makefile.sla.new        Mon Jul  5 14:41:18 1999
@@ -8,10 +8,10 @@
 #ASIS_MACH = hardware/os
 
 CFLAGS = -O3 -DUSE_SLANG -DUSE_ZLIB -DDOSPATH -DNOUSERS -DDISP_PARTIAL \
--DDIRED_SUPPORT -DSOURCE_CACHE -DUSE_PSRC -DNOPORT \
+-DDIRED_SUPPORT -DSOURCE_CACHE -DUSE_PSRC \
+-DWATT32 \
 -I../Implementation \
--I../../../djgpp/tcplib/include \
--I../../../djgpp/tcplib/include/tcp \
+-I../../../djgpp/watt32/inc -I../../../djgpp/watt32/inc/sys \
 -I../../../src \
 -I../../.. $(SLANGINC) $(INTLFLAGS)
 LFLAGS =
--- lynx2-8-3/src/chrtrans/makeuctb.c   Thu Dec  3 10:28:20 1998
+++ lynx2-8-3/src/chrtrans/makeuctb.c.new       Mon Jul  5 14:24:26 1999
@@ -18,7 +18,6 @@
 
 #define DONT_USE_SOCKS5
 #include <HTUtils.h>
-#include <tcp.h>
 /*
  *  Don't try to use LYexit().
  */
--- lynx2-8-3/WWW/Library/Implementation/tcp.h  Fri Jun 18 14:54:46 1999
+++ lynx2-8-3/WWW/Library/Implementation/www_tcp.h      Mon Jul  5 13:39:38 1999
@@ -485,6 +485,7 @@
 #undef SELECT
 #define TCP_INCLUDES_DONE
 #define NO_IOCTL
+#define DECL_ERRNO
 #include <errno.h>
 #include <sys/types.h>
 #include <socket.h>
@@ -495,7 +496,9 @@
 #define NETREAD read_s
 #undef NETCLOSE
 #define NETCLOSE close_s
+#ifndef WATT32
 #define getsockname getsockname_s
+#endif /* WATT32 */
 #ifdef HAVE_GETTEXT
 #define gettext gettext__
 #endif

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


reply via email to

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