[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev DOS patch for lynx2.8.4pre.1
From: |
Doug Kaufman |
Subject: |
lynx-dev DOS patch for lynx2.8.4pre.1 |
Date: |
Wed, 6 Jun 2001 21:32:42 -0700 (PDT) |
The DOS port has been broken since dev.20. With that version, TXT_W
and TXT_R replaced "w" and "r" throughout the code. This works fine
for unix, but under DJGPP, TXT_W and TXT_R are defined as "wt" and
"rt" respectively, thus overriding the default binary file creation
set by SetDefaultMode. Temporary files are then being created in
truncated form, making it impossible to view graphic files. I found at
least two places that had to be changed to binary to allow graphics to
be viewed, but I worry that there are other problems lurking as files
that had always been binary are now in text mode. Perhaps it would be
best to redefine TXT_W and TXT_R as "w" and "r" respectively under
DJGPP.
The DOS port also lost its false NCURSES define and picked up a
PDCURSES define. This makes it look for pdcurses.h. PDCurses, however
has curses.h, not pdcurses.h. The only reference I could find to
pdcurses.h is in the INSTALLATION file, where users are urged to
rename curses.h to pdcurses.h for the Visual-C++ port. It seems
unreasonable to ask each user to rename the standard files in another
project.
Also note that DJGPP/gcc defines unix, __unix__, and __unix, but not
UNIX.
This patch allows compilation of a functional DOS port, but as I
mentioned above, I think there may need to be other changes in regard
to text vs binary mode.
Doug
--- lynx2.8.4pre.1/lynx2-8-4/WWW/Library/Implementation/HTFile.c.ori Sun Jun
3 19:58:00 2001
+++ lynx2.8.4pre.1/lynx2-8-4/WWW/Library/Implementation/HTFile.c Wed Jun
6 20:02:06 2001
@@ -1604,7 +1604,7 @@
HTSprintf0(&readme_file_name, "%s/%s", localname, HT_DIR_README_FILE);
- fp = fopen(readme_file_name, TXT_R);
+ fp = fopen(readme_file_name, BIN_R);
if (fp) {
HTStructuredClass targetClass;
@@ -2563,7 +2563,7 @@
#endif /* HAVE_READDIR */
{
int bin = HTCompressFileType(localname, ".", &dot) != cftNone;
- FILE * fp = fopen(localname, (bin ? BIN_R : TXT_R));
+ FILE * fp = fopen(localname, BIN_R);
CTRACE((tfp, "HTLoadFile: Opening `%s' gives %p\n",
localname, (void*)fp));
--- lynx2.8.4pre.1/lynx2-8-4/src/LYCurses.h.ori Sun Jun 3 19:58:00 2001
+++ lynx2.8.4pre.1/lynx2-8-4/src/LYCurses.h Wed Jun 6 18:30:44 2001
@@ -183,14 +183,10 @@
# ifdef HAVE_JCURSES_H
# include <jcurses.h> /* sony_news */
# else
-# ifdef PDCURSES
-# include <pdcurses.h> /* for PDCurses */
+# ifdef HAVE_XCURSES
+# include <xcurses.h> /* PDCurses' UNIX port */
# else
-# ifdef HAVE_XCURSES
-# include <xcurses.h> /* PDCurses' UNIX port */
-# else
-# include <curses.h> /* default */
-# endif
+# include <curses.h> /* default */
# endif
# endif
# endif
@@ -218,12 +214,8 @@
#else
# if defined(VMS) && defined(__GNUC__)
# include <LYGCurses.h>
-# else
-# ifdef PDCURSES /* 1999/07/15 (Thu) 08:27:48 */
-# include <pdcurses.h> /* for PDCurses */
# else
# include <curses.h> /* everything else */
-# endif /* not PDCURSES */
# endif /* VMS && __GNUC__ */
#endif /* HAVE_CONFIG_H */
--- lynx2.8.4pre.1/lynx2-8-4/src/LYUtils.c.ori Sun Jun 3 19:58:00 2001
+++ lynx2.8.4pre.1/lynx2-8-4/src/LYUtils.c Wed Jun 6 20:38:34 2001
@@ -2262,7 +2262,7 @@
int c;
int cmd;
#ifndef VMS /* UNIX stuff: */
-#if !defined(USE_SLANG) && defined(UNIX)
+#if !defined(USE_SLANG) && (defined(UNIX) || defined(__DJGPP__))
struct timeval socket_timeout;
int ret = 0;
fd_set readfds;
__
Doug Kaufman
Internet: address@hidden
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
- lynx-dev DOS patch for lynx2.8.4pre.1,
Doug Kaufman <=