diff -urN lynx2-8-5/WWW/Library/Implementation/HTNews.c lynx2-8-5-13-beos/WWW/Library/Implementation/HTNews.c --- lynx2-8-5/WWW/Library/Implementation/HTNews.c Mon Dec 2 11:07:38 2002 +++ lynx2-8-5-13-beos/WWW/Library/Implementation/HTNews.c Fri Jan 24 23:49:37 2003 @@ -2629,7 +2629,11 @@ !strncmp(url, "snewspost:", 10) || !strncmp(url, "snewsreply:", 11))) { Handle = HTGetSSLHandle(); + #ifndef __BEOS__ SSL_set_fd(Handle, s); + #else + SSL_set fd(Handle,__libsocket_gethandle(s)); + #endif HTSSLInitPRNG(); status = SSL_connect(Handle); @@ -3039,7 +3043,11 @@ s = channel_s = sock; Handle = HTGetSSLHandle(); +#ifndef __BEOS__ SSL_set_fd(Handle, s); +#else /* __BEOS__ */ + SSL_set_fd(Handle, __libsocket_gethandle(s)); +#endif HTSSLInitPRNG(); status = SSL_connect(Handle); diff -urN lynx2-8-5/WWW/Library/Implementation/HTTCP.c lynx2-8-5-13-beos/WWW/Library/Implementation/HTTCP.c --- lynx2-8-5/WWW/Library/Implementation/HTTCP.c Wed Jan 22 18:43:13 2003 +++ lynx2-8-5-13-beos/WWW/Library/Implementation/HTTCP.c Fri Jan 24 23:49:37 2003 @@ -1618,6 +1618,15 @@ continue; } #else + #ifdef __BEOS__ + { + static int inited = 0; + if (!inited){ + __init_socket_handle(); + inited = 1; + } + } + #endif *s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (*s == -1) { HTAlert(gettext("socket failed.")); @@ -2087,6 +2096,7 @@ #endif /* SOCKS */ #include +#include "/boot/home/config/include/libsocket.h" #include #include diff -urN lynx2-8-5/WWW/Library/Implementation/HTTP.c lynx2-8-5-13-beos/WWW/Library/Implementation/HTTP.c --- lynx2-8-5/WWW/Library/Implementation/HTTP.c Mon Dec 2 11:07:38 2002 +++ lynx2-8-5-13-beos/WWW/Library/Implementation/HTTP.c Fri Jan 24 23:49:37 2003 @@ -551,7 +551,11 @@ */ if (did_connect || !strncmp(url, "https", 5)) { SSL_handle = handle = HTGetSSLHandle(); + #ifndef __BEOS__ SSL_set_fd(handle, s); + #else /*__BEOS__*/ + SSL_set_fd(handle, __libsocket_gethandle(s)); + #endif #if SSLEAY_VERSION_NUMBER >= 0x0900 if (!try_tls) handle->options|=SSL_OP_NO_TLSv1; diff -urN lynx2-8-5/WWW/Library/Implementation/HTUtils.h lynx2-8-5-13-beos/WWW/Library/Implementation/HTUtils.h --- lynx2-8-5/WWW/Library/Implementation/HTUtils.h Wed Jan 22 18:43:13 2003 +++ lynx2-8-5-13-beos/WWW/Library/Implementation/HTUtils.h Fri Jan 24 23:49:37 2003 @@ -15,6 +15,7 @@ #ifdef HAVE_CONFIG_H #include /* generated by autoconf 'configure' script */ #include +#include "/boot/home/config/include/libsocket.h" #include #else /* HAVE_CONFIG_H */ diff -urN lynx2-8-5/WWW/Library/Implementation/www_tcp.h lynx2-8-5-13-beos/WWW/Library/Implementation/www_tcp.h --- lynx2-8-5/WWW/Library/Implementation/www_tcp.h Wed Jan 22 18:43:13 2003 +++ lynx2-8-5-13-beos/WWW/Library/Implementation/www_tcp.h Fri Jan 24 23:49:37 2003 @@ -25,9 +25,18 @@ 15 Jul 95 S. Bjorndahl Gnu C for VMS Globaldef/ref support */ - +#include "/boot/home/config/include/libsocket.h" #ifndef TCP_H #define TCP_H + +/* +BeOS 5 +*/ + +#ifdef __BEOS__ +#include +extern int __libsocket_gethandle(int s); /* uwe */ +#endif /* __BEOS */ /* diff -urN lynx2-8-5/makefile.in lynx2-8-5-13-beos/makefile.in --- lynx2-8-5/makefile.in Wed Jan 22 18:43:13 2003 +++ lynx2-8-5-13-beos/makefile.in Fri Jan 24 23:49:37 2003 @@ -106,7 +106,7 @@ # If you apply patches which require linking to site-specific libraries, set # SITE_LIBS to those libraries. -SITE_LIBS= # Your libraries here +SITE_LIBS= -lsocket# Your libraries here # Set SITE_LYDEFS to one or more of the defines for the WWW Library: SITE_LYDEFS = # Your defines here diff -urN lynx2-8-5/src/LYUtils.c lynx2-8-5-13-beos/src/LYUtils.c --- lynx2-8-5/src/LYUtils.c Wed Jan 22 18:43:13 2003 +++ lynx2-8-5-13-beos/src/LYUtils.c Fri Jan 24 23:49:37 2003 @@ -1569,6 +1569,16 @@ socket_timeout.tv_usec = 100; FD_ZERO(&readfds); FD_SET(0, &readfds); +#if __BEOS_ + { + extern int __libsocket_select (int nfds, + fd_set *rfds, fd_set *wfds, fd_set *efds, + struct timeval *timeout); + + ret = __libsocket_select(FD_SETSIZE, (void *)&readfds, NULL, NULL, + &socket_timeout); + } +#else /* !__BEOS__ */ #ifdef SOCKS if (socks_flag) ret = Rselect(FD_SETSIZE, (void *)&readfds, NULL, NULL, @@ -1577,6 +1587,7 @@ #endif /* SOCKS */ ret = select(FD_SETSIZE, (void *)&readfds, NULL, NULL, &socket_timeout); +#endif /* !__BEOS__ */ /** Suspended? **/ if ((ret == -1) && (SOCKET_ERRNO == EINTR)) diff -urN lynx2-8-5/userdefs.h lynx2-8-5-13-beos/userdefs.h --- lynx2-8-5/userdefs.h Mon Dec 2 11:07:38 2002 +++ lynx2-8-5-13-beos/userdefs.h Fri Jan 24 23:49:38 2003 @@ -281,8 +281,10 @@ */ #ifndef HAVE_CONFIG_H #ifndef LYNX_CFG_FILE -#ifdef DOSPATH +#if defined(DOSPATH) #define LYNX_CFG_FILE "./lynx.cfg" +#elif __BEOS__ +#define LYNX_CFG_FILE "/boot/home/config/lib/lynx.cfg" #else #define LYNX_CFG_FILE "/usr/local/lib/lynx.cfg" #endif /* DOSPATH */ @@ -296,7 +298,12 @@ * Mappings in these global and personal files override any SUFFIX * definitions in lynx.cfg and built-in defaults from src/HTInit.c. */ +#if __BEOS__ +/* XXX: Should take advantage of BFS MIME info */ +#define GLOBAL_EXTENSION_MAP "/boot/home/config/lib/mime.types" +#else #define GLOBAL_EXTENSION_MAP "/usr/local/lib/mosaic/mime.types" +#endif #define PERSONAL_EXTENSION_MAP ".mime.types" /************************** @@ -306,9 +313,14 @@ * Mappings in these global and personal files override any VIEWER * definitions in lynx.cfg and built-in defaults from src/HTInit.c. */ +#if __BEOS__ +#define GLOBAL_MAILCAP "/boot/home/config/lib/mailcap" +#else #define GLOBAL_MAILCAP "/usr/local/lib/mosaic/mailcap" +#endif #define PERSONAL_MAILCAP ".mailcap" + /************************** * XLOADIMAGE_COMMAND will be used as a default in src/HTInit.c for * viewing image content types when the DISPLAY environment variable @@ -430,7 +442,11 @@ * -lss command line switch will override these definitions. */ #ifndef LYNX_LSS_FILE +#define LYNX_LSS_FILE "/boot/home/config/lib/lynx.lss" +#if __BEOS__ +#else #define LYNX_LSS_FILE "/usr/local/lib/lynx.lss" +#endif #endif /* LYNX_LSS_FILE */ #endif /* VMS OR UNIX */ @@ -589,7 +605,7 @@ * if your system does not have utmp capabilities. CHANGE THIS here * or in lynx.cfg. */ -#define LOCAL_DOMAIN "ukans.edu" +#define LOCAL_DOMAIN "your.domain.name" /******************************** * The DEFAULT_CACHE_SIZE specifies the number of WWW documents to be @@ -703,7 +719,11 @@ * RFC 1345 Mnemonic mnemonic * Transparent x-transparent */ +#if __BEOS__ +#define CHARACTER_SET "utf-8" +#else #define CHARACTER_SET "iso-8859-1" +#endif /***************************** * PREFERRED_LANGUAGE is the language in MIME notation (e.g., "en", @@ -952,10 +972,10 @@ #define BOXVERT 0 #define BOXHORI 0 #else -#define BOXVERT '|' -/* #define BOXVERT 0 */ -#define BOXHORI '-' -/* #define BOXHORI 0 */ +/* #define BOXVERT '|' */ +#define BOXVERT 0 +/* #define BOXHORI '-' */ +#define BOXHORI 0 #endif /* DOSPATH */ #endif /* !HAVE_CONFIG_H */