[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Lynx v2.8.4pre.1 and Cookies
From: |
Thomas Dickey |
Subject: |
Re: lynx-dev Lynx v2.8.4pre.1 and Cookies |
Date: |
Sat, 9 Jun 2001 15:32:57 -0400 |
User-agent: |
Mutt/1.2.5i |
On Sat, Jun 09, 2001 at 08:02:55AM -0400, Larry W. Virden wrote:
> Note that I am seeing pretty much the same as Henry. The sites I
> am seeing the problems with is yahoo.com , excite, etc.
>
> Not only is lynx not using my cookie jar, but attempting to set new
> cookies fails as well.
coding error (one of my substitutions was on a chunk that just-happened-to-work,
but was inconsistent with the one I used for testing). Here's my interim
changes:
# ------------------------------------------------------------------------------
# CHANGES | 16 ++++++++++++++++
# INSTALLATION | 5 ++---
# PROBLEMS | 2 +-
# WWW/Library/Implementation/HTAccess.c | 6 +++---
# WWW/Library/Implementation/HTAnchor.c | 2 +-
# WWW/Library/Implementation/HTFile.c | 8 ++++----
# WWW/Library/Implementation/HTVMSUtils.c | 2 +-
# WWW/Library/Implementation/HTWAIS.c | 2 +-
# WWW/Library/Implementation/www_tcp.h | 4 ++++
# src/GridText.c | 6 +++---
# src/LYCookie.c | 4 ++--
# src/LYCurses.h | 14 +++-----------
# src/LYJump.c | 2 +-
# src/LYMain.c | 2 +-
# src/LYNews.c | 2 +-
# src/LYStrings.c | 4 ++--
# src/LYUtils.c | 8 ++++----
# 17 files changed, 50 insertions(+), 39 deletions(-)
# ------------------------------------------------------------------------------
Index: CHANGES
--- lynx2.8.4pre.1+/CHANGES Sun Jun 3 17:28:15 2001
+++ lynx2.8.4pre.1a/CHANGES Sat Jun 9 14:42:33 2001
@@ -1,6 +1,22 @@
Changes since Lynx 2.8 release
===============================================================================
+2001-06-10 (2.8.4pre.2)
+* corrected order of parameters of is_prefix() function in the
+ scan_cookie_sublist() function, broken in dev.21 changes (report by Ken Scott
+ <address@hidden>) -TD
+* add a fallback definition for SA_LEN(), to build with glibc 2.2 (report by
+ Mark Sutton <address@hidden>, patch by Arkadiusz Miskiewicz at
+ http://cvs.pld.org.pl/SOURCES/lynx-SA_LEN.patch?rev=1.1)
+* modify ifdef in HTCheckForInterrupt() to build with DJGPP -DK
+* remove include for <pdcurses.h>, use <curses.h> which is the default for
+ PDCurses - DK
+* reviewed/reverted some changes from dev.20 which changed explicit "r", "w",
+ and "a+" fopen modes to TXT_R, TXT_W and TXT_A, where they relied on the
+ default mode set via SetDefaultMode(). With DJGPP, files containing special
+ graphics such as README's might not otherwise display, for example (report by
+ DK) -TD
+
2001-06-03 (2.8.4pre.1)
This version has been test-built on Linux (BSD curses, ncurses,
slang), Tru64 5.1 (cc, curses/ncurses/slang), OpenVMS, OS/2 EMX, win32
Index: INSTALLATION
--- lynx2.8.4pre.1+/INSTALLATION Sun Apr 1 21:02:30 2001
+++ lynx2.8.4pre.1a/INSTALLATION Sat Jun 9 08:44:06 2001
@@ -736,11 +736,10 @@
zlib.lib
from the zlib build-tree, and
- pdcurses.h
+ curses.h
pdcurses.lib
- from the PDCurses build-tree. Note that "pdcurses.h" is renamed from
- PDCurses' "curses.h", to make it distinct from other versions of curses.
+ from the PDCurses build-tree.
Then
make-msc
Index: PROBLEMS
--- lynx2.8.4pre.1+/PROBLEMS Sun Jun 3 17:17:35 2001
+++ lynx2.8.4pre.1a/PROBLEMS Sat Jun 9 09:13:51 2001
@@ -32,7 +32,7 @@
---------
If you run into a problem compiling GridText.c, try omitting -O from the
- compiler flags; these are very big files and may not compile successfully
+ compiler flags; it is a very big file and may not compile successfully
if you include optimization.
---------
Index: WWW/Library/Implementation/HTAccess.c
--- lynx2.8.4pre.1+/WWW/Library/Implementation/HTAccess.c Sun Apr 1
21:02:30 2001
+++ lynx2.8.4pre.1a/WWW/Library/Implementation/HTAccess.c Sat Jun 9
08:07:23 2001
@@ -1360,7 +1360,7 @@
/*
** Someone telnets in, they get a special home.
*/
- FILE * fp = fopen(REMOTE_POINTER, TXT_R);
+ FILE * fp = fopen(REMOTE_POINTER, "r");
char * status;
if (fp) {
my_home_document = typecallocn(char, MAX_FILE_NAME);
@@ -1382,12 +1382,12 @@
CONST char * home = (CONST char*)getenv("HOME");
if (home != null) {
HTSprintf0(&my_home_document, "%s/%s", home, PERSONAL_DEFAULT);
- fp = fopen(my_home_document, TXT_R);
+ fp = fopen(my_home_document, "r");
}
if (!fp) {
StrAllocCopy(my_home_document, LOCAL_DEFAULT_FILE);
- fp = fopen(my_home_document, TXT_R);
+ fp = fopen(my_home_document, "r");
}
if (fp) {
fclose(fp);
Index: WWW/Library/Implementation/HTAnchor.c
--- lynx2.8.4pre.1+/WWW/Library/Implementation/HTAnchor.c Sun Jun 3
17:17:35 2001
+++ lynx2.8.4pre.1a/WWW/Library/Implementation/HTAnchor.c Sat Jun 9
08:08:24 2001
@@ -749,7 +749,7 @@
#endif
if (me->FileCache) {
FILE *fd;
- if ((fd = fopen(me->FileCache, TXT_R)) != NULL) {
+ if ((fd = fopen(me->FileCache, "r")) != NULL) {
fclose(fd);
remove(me->FileCache);
}
Index: WWW/Library/Implementation/HTFile.c
--- lynx2.8.4pre.1+/WWW/Library/Implementation/HTFile.c Sun Jun 3 17:17:35 2001
+++ lynx2.8.4pre.1a/WWW/Library/Implementation/HTFile.c Sat Jun 9 08:38:54 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, "r");
if (fp) {
HTStructuredClass targetClass;
@@ -2184,7 +2184,7 @@
FILE * fp;
char * vmsname = strchr(filename + 1, '/') ?
HTVMS_name(nodename, filename) : filename + 1;
- fp = fopen(vmsname, TXT_R, "shr=put", "shr=upd");
+ fp = fopen(vmsname, "r", "shr=put", "shr=upd");
/*
** If the file wasn't VMS syntax, then perhaps it is Ultrix.
@@ -2193,7 +2193,7 @@
char * ultrixname = 0;
CTRACE((tfp, "HTLoadFile: Can't open as %s\n", vmsname));
HTSprintf0(&ultrixname, "%s::\"%s\"", nodename, filename);
- fp = fopen(ultrixname, TXT_R, "shr=put", "shr=upd");
+ fp = fopen(ultrixname, "r", "shr=put", "shr=upd");
if (!fp) {
CTRACE((tfp, "HTLoadFile: Can't open as %s\n",
ultrixname));
@@ -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 ? BIN_R : "r"));
CTRACE((tfp, "HTLoadFile: Opening `%s' gives %p\n",
localname, (void*)fp));
Index: WWW/Library/Implementation/HTVMSUtils.c
--- lynx2.8.4pre.1+/WWW/Library/Implementation/HTVMSUtils.c Sun Jun 3
17:17:35 2001
+++ lynx2.8.4pre.1a/WWW/Library/Implementation/HTVMSUtils.c Sat Jun 9
08:15:32 2001
@@ -846,7 +846,7 @@
if (header[strlen(header)-1] != '/')
StrAllocCat(header, "/");
StrAllocCat(header, HT_DIR_README_FILE);
- if ((fp = fopen(header, TXT_R)) != NULL) {
+ if ((fp = fopen(header, "r")) != NULL) {
START(HTML_PRE);
for(;;) {
char c = fgetc(fp);
Index: WWW/Library/Implementation/HTWAIS.c
--- lynx2.8.4pre.1+/WWW/Library/Implementation/HTWAIS.c Sun Jun 3 17:17:35 2001
+++ lynx2.8.4pre.1a/WWW/Library/Implementation/HTWAIS.c Sat Jun 9 08:16:27 2001
@@ -786,7 +786,7 @@
CACHE_FILE_PREFIX,
server_name, service, www_database);
- fp = fopen(filename, TXT_R); /* Have we found this already? */
+ fp = fopen(filename, "r"); /* Have we found this already? */
CTRACE((tfp, "HTWAIS: Description of server %s %s.\n",
filename,
fp ? "exists already" : "does NOT exist!"));
Index: WWW/Library/Implementation/www_tcp.h
--- lynx2.8.4pre.1+/WWW/Library/Implementation/www_tcp.h Sun Jun 3
17:17:35 2001
+++ lynx2.8.4pre.1a/WWW/Library/Implementation/www_tcp.h Sat Jun 9
09:16:58 2001
@@ -830,6 +830,10 @@
#ifdef SIN6_LEN
#define SOCKADDR_LEN(soc_address) ((struct sockaddr *)&soc_address)->sa_len
#else
+#ifndef SA_LEN
+#define SA_LEN(x) (((x)->sa_family == AF_INET6)?sizeof(struct sockaddr_in6): \
+ (((x)->sa_family == AF_INET)?sizeof(struct sockaddr_in):sizeof(struct
sockaddr)))
+#endif
#define SOCKADDR_LEN(soc_address) SA_LEN((struct sockaddr *)&soc_address)
#endif /* SIN6_LEN */
#else
Index: src/GridText.c
--- lynx2.8.4pre.1+/src/GridText.c Sun Jun 3 17:17:35 2001
+++ lynx2.8.4pre.1a/src/GridText.c Sat Jun 9 08:23:41 2001
@@ -8014,7 +8014,7 @@
}
CTRACE((tfp, " Content type is \"%s\"\n", format->name));
- fp = fopen(HTMainAnchor->source_cache_file, TXT_R);
+ fp = fopen(HTMainAnchor->source_cache_file, "r");
if (!fp) {
CTRACE((tfp, " Cannot read file %s\n",
HTMainAnchor->source_cache_file));
LYRemoveTemp(HTMainAnchor->source_cache_file);
@@ -12035,7 +12035,7 @@
return 0;
}
- fp = fopen (ed_temp, TXT_R);
+ fp = fopen (ed_temp, "r");
size = fread (ebuf, 1, size, fp);
LYCloseInput (fp);
ebuf[size] = '\0'; /* Terminate! - kw */
@@ -12425,7 +12425,7 @@
*/
LYGetFileInfo(fn, 0, 0, 0, 0, 0, &file_cs);
- fp = fopen (fn, TXT_R);
+ fp = fopen (fn, "r");
if (!fp) {
free(fbuf);
free(fn);
Index: src/LYCookie.c
--- lynx2.8.4pre.1+/src/LYCookie.c Sun Jun 3 17:17:35 2001
+++ lynx2.8.4pre.1a/src/LYCookie.c Sat Jun 9 14:39:36 2001
@@ -678,7 +678,7 @@
host_matches(hostname, co->domain),
path, co->path,
(co->pathlen > 0)
- ? !is_prefix(path, co->path)
+ ? !is_prefix(co->path, path)
: 0,
(co->flags & COOKIE_FLAG_SECURE)
? " secure"
@@ -700,7 +700,7 @@
*/
if (((co != NULL) &&
host_matches(hostname, co->domain)) &&
- (co->pathlen == 0 || is_prefix(path, co->path))) {
+ (co->pathlen == 0 || is_prefix(co->path, path))) {
/*
* Skip if the secure flag is set and we don't have
* a secure connection. HTTP.c presently treats only
Index: src/LYCurses.h
--- lynx2.8.4pre.1+/src/LYCurses.h Sun Jun 3 17:17:35 2001
+++ lynx2.8.4pre.1a/src/LYCurses.h Sat Jun 9 08:38:54 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 */
Index: src/LYJump.c
--- lynx2.8.4pre.1+/src/LYJump.c Sun Jun 3 17:17:35 2001
+++ lynx2.8.4pre.1a/src/LYJump.c Sat Jun 9 08:29:23 2001
@@ -387,7 +387,7 @@
if (st.st_fab_rfm != (char)FAB$C_STMLF) {
/** It's a record-oriented file. **/
IsStream_LF = FALSE;
- if ((fp = fopen(jtp->file, TXT_R, "mbc=32")) == NULL) {
+ if ((fp = fopen(jtp->file, "r", "mbc=32")) == NULL) {
HTAlert(CANNOT_OPEN_JUMP_FILE);
FREE(mp);
return 0;
Index: src/LYMain.c
--- lynx2.8.4pre.1+/src/LYMain.c Sun Jun 3 17:17:35 2001
+++ lynx2.8.4pre.1a/src/LYMain.c Sat Jun 9 08:30:08 2001
@@ -2205,7 +2205,7 @@
/*
* Process the temporary RC file.
*/
- rcfp = fopen(tempfile, TXT_R);
+ rcfp = fopen(tempfile, "r");
read_rc(rcfp);
LYRemoveTemp(tempfile);
FREE(tempfile); /* done with it - kw */
Index: src/LYNews.c
--- lynx2.8.4pre.1+/src/LYNews.c Sun Jun 3 17:17:35 2001
+++ lynx2.8.4pre.1a/src/LYNews.c Sat Jun 9 08:31:05 2001
@@ -36,7 +36,7 @@
*nonspaces = FALSE;
- if (!filename || (fp = fopen(filename, TXT_R)) == NULL) {
+ if (!filename || (fp = fopen(filename, "r")) == NULL) {
CTRACE((tfp, "Failed to open file %s for reading!\n",
NONNULL(filename)));
return FALSE;
Index: src/LYStrings.c
--- lynx2.8.4pre.1+/src/LYStrings.c Sun Jun 3 17:17:35 2001
+++ lynx2.8.4pre.1a/src/LYStrings.c Sat Jun 9 08:33:27 2001
@@ -1245,7 +1245,7 @@
LYAddPathToHome(file, sizeof(file), FNAME_LYNX_KEYMAPS);
- if ((fp = fopen (file, TXT_R)) == 0)
+ if ((fp = fopen (file, "r")) == 0)
return 0;
linenum = 0;
@@ -1593,7 +1593,7 @@
if (new_fd >= 0) {
FILE *frp;
close(new_fd);
- frp = freopen(term_name, TXT_R, stdin);
+ frp = freopen(term_name, "r", stdin);
CTRACE((tfp,
"nozap: freopen(%s,\"r\",stdin) returned %p, stdin is now %p
with fd %d.\n",
term_name, frp, stdin, fileno(stdin)));
Index: src/LYUtils.c
--- lynx2.8.4pre.1+/src/LYUtils.c Sun Jun 3 17:17:35 2001
+++ lynx2.8.4pre.1a/src/LYUtils.c Sat Jun 9 08:38:54 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;
@@ -3197,7 +3197,7 @@
PUBLIC BOOLEAN LYCanWriteFile ARGS1(
CONST char*, filename)
{
- if (LYCloseOutput(fopen(filename, TXT_W))) {
+ if (LYCloseOutput(fopen(filename, "w"))) {
remove(filename);
return TRUE;
} else {
@@ -3214,7 +3214,7 @@
{
FILE *fp;
- if ((fp = fopen(filename, TXT_R)) != 0) {
+ if ((fp = fopen(filename, "r")) != 0) {
return LYCloseInput(fp);
}
return FALSE;
@@ -3259,7 +3259,7 @@
if ((cp = ttyname(0)))
mytty = strrchr(cp, '/');
- if (mytty && (fp = fopen(UTMP_FILE, TXT_R)) != NULL) {
+ if (mytty && (fp = fopen(UTMP_FILE, "r")) != NULL) {
mytty++;
do {
n = fread((char *) &me, sizeof(struct utmp), 1, fp);
--
Thomas E. Dickey <address@hidden>
http://dickey.his.com
ftp://dickey.his.com
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden