Only in w3m-0.1.11-pre-ja: Str.o
diff -ru w3m-0.1.11-pre.dist/XXMakefile w3m-0.1.11-pre-ja/XXMakefile
--- w3m-0.1.11-pre.dist/XXMakefile	Wed Jun 14 06:49:53 2000
+++ w3m-0.1.11-pre-ja/XXMakefile	Wed Jul 12 14:18:11 2000
@@ -2,12 +2,12 @@
 
 BIN_DIR = /usr/local/bin
 HELP_DIR = /usr/local/lib/w3m
-LIB_DIR = /usr/local/lib/w3m
+LIB_DIR = /usr/local/lib/w3m/ja
 HELP_FILE = w3mhelp-w3m_ja.html
-SYS_LIBRARIES = -lgpm  -lbsd -lnsl -lncurses  -L/usr/local/ssl/lib -lssl -lcrypto 
+SYS_LIBRARIES = -lgpm  -lbsd -lncurses  -L/usr/local/ssl/lib -lssl -lcrypto 
 LOCAL_LIBRARIES = 
 CC = gcc
-MYCFLAGS = -O -I./gc  -I/usr/local/ssl/include/openssl -I/usr/local/ssl/include
+MYCFLAGS = -O -I./gc  -I/usr/local/include/openssl -I/usr/local/include
 KEYBIND_SRC = keybind.c
 KEYBIND_OBJ = keybind.o
 EXT=
@@ -17,7 +17,7 @@
 RANLIB=ranlib
 MKDIR=mkdir -p
 VERSION=0.1.11-pre
-MODEL=Linux.i686-monster-ja
+MODEL=Linux.i586-monster-ja
 #else
 SRCS=main.c file.c buffer.c display.c etc.c search.c linein.c table.c local.c \
 	form.c map.c frame.c rc.c menu.c mailcap.c\
Only in w3m-0.1.11-pre-ja: anchor.o
Only in w3m-0.1.11-pre-ja: buffer.o
diff -ru w3m-0.1.11-pre.dist/config.h w3m-0.1.11-pre-ja/config.h
--- w3m-0.1.11-pre.dist/config.h	Wed Jun 14 06:49:48 2000
+++ w3m-0.1.11-pre-ja/config.h	Wed Jul 12 14:18:00 2000
@@ -54,7 +54,7 @@
 /*
  * Support NNTP
  */
-#undef USE_NNTP
+#define USE_NNTP
 
 /*
  * Enable id attribute
@@ -71,12 +71,12 @@
 
 BIN_DIR = /usr/local/bin
 HELP_DIR = /usr/local/lib/w3m
-LIB_DIR = /usr/local/lib/w3m
+LIB_DIR = /usr/local/lib/w3m/ja
 HELP_FILE = w3mhelp-w3m_ja.html
-SYS_LIBRARIES = -lgpm  -lbsd -lnsl -lncurses  -L/usr/local/ssl/lib -lssl -lcrypto 
+SYS_LIBRARIES = -lgpm  -lbsd -lncurses  -L/usr/local/ssl/lib -lssl -lcrypto 
 LOCAL_LIBRARIES = 
 CC = gcc
-MYCFLAGS = -O -I./gc  -I/usr/local/ssl/include/openssl -I/usr/local/ssl/include
+MYCFLAGS = -O -I./gc  -I/usr/local/include/openssl -I/usr/local/include
 KEYBIND_SRC = keybind.c
 KEYBIND_OBJ = keybind.o
 EXT=
@@ -86,11 +86,11 @@
 RANLIB=ranlib
 MKDIR=mkdir -p
 VERSION=0.1.11-pre
-MODEL=Linux.i686-monster-ja
+MODEL=Linux.i586-monster-ja
 #else
 
 
-#define DISPLAY_CODE 'E'
+#define DISPLAY_CODE 'N'
 
 #define JA 0
 #define EN 1
@@ -103,15 +103,15 @@
 #define MENU
 #define USE_COOKIE
 #define USE_SSL
-#undef USE_SSL_VERIFY
-#undef FTPPASS_HOSTNAMEGEN
-#undef SHOW_PARAMS
-
-#define DEF_EDITOR "/bin/vi"
-#define DEF_MAILER "/bin/mail"
-#define DEF_EXT_BROWSER "/usr/X11R6/bin/netscape"
+#define USE_SSL_VERIFY
+#define FTPPASS_HOSTNAMEGEN
+#define SHOW_PARAMS
+
+#define DEF_EDITOR "/usr/bin/vi"
+#define DEF_MAILER "/software/mutt/bin/mutt"
+#define DEF_EXT_BROWSER "/software/netscape/bin/netscape"
 
-#define LIB_DIR      "/usr/local/lib/w3m"
+#define LIB_DIR      "/usr/local/lib/w3m/ja"
 #define HELP_DIR     "/usr/local/lib/w3m"
 #define HELP_FILE    "w3mhelp.html"
 #define W3MCONFIG    "w3mconfig"
@@ -127,7 +127,7 @@
 #define USER_MAILCAP "~/.mailcap"
 #define SYS_MAILCAP  "/etc/mailcap"
 #define USER_MIMETYPES "~/.mime.types"
-#define SYS_MIMETYPES "/usr/lib/mime.types"
+#define SYS_MIMETYPES "/usr/local/lib/mime.types"
 
 #define DEF_SAVE_FILE "index.html"
 
@@ -139,7 +139,7 @@
 #define SYS_ERRLIST
 #undef NOBCOPY
 #define HAVE_WAITPID
-#undef HAVE_WAITPID
+#define HAVE_WAITPID
 #define HAVE_STRFTIME
 
 #define GETCWD
diff -ru w3m-0.1.11-pre.dist/config.param w3m-0.1.11-pre-ja/config.param
--- w3m-0.1.11-pre.dist/config.param	Wed Jun 14 06:49:44 2000
+++ w3m-0.1.11-pre-ja/config.param	Wed Jul 12 14:17:50 2000
@@ -1,24 +1,24 @@
-# Configuretion at ei5unix.yz.yamagata-u.ac.jp
+# Configuretion at monet
 def_bindir='/usr/local/bin'
-def_libdir='/usr/local/lib/w3m'
+def_libdir='/usr/local/lib/w3m/ja'
 def_helpdir='/usr/local/lib/w3m'
 pref_lang=1
-def_dcode=E
+def_dcode=N
 lynx_key=n
 kanji_symbols=y
-ftppass_hostnamegen=n
-show_params=n
-use_nntp=n
+ftppass_hostnamegen=y
+show_params=y
+use_nntp=y
 use_color=y
 use_menu=y
 use_mouse=y
 use_cookie=y
 use_ssl=y
 dmodel=5
-use_ssl_verify=n
-ded='/bin/vi'
-dmail='/bin/mail'
-dbrowser='/usr/X11R6/bin/netscape'
+use_ssl_verify=y
+ded='/usr/bin/vi'
+dmail='/software/mutt/bin/mutt'
+dbrowser='/software/netscape/bin/netscape'
 dcc='gcc'
 dcflags='-O'
 dtermlib='-lncurses'
diff -ru w3m-0.1.11-pre.dist/configure w3m-0.1.11-pre-ja/configure
--- w3m-0.1.11-pre.dist/configure	Wed Jun 14 00:28:32 2000
+++ w3m-0.1.11-pre-ja/configure	Wed Jul 12 12:41:36 2000
@@ -576,7 +576,7 @@
 fi
 
 echo "Do you want to use SSL?"
-echo '(You need openSSL library; Please see http://www.openssl.org/)'
+echo '(You need OpenSSL library; Please see http://www.openssl.org/)'
 yesno use_ssl "$use_ssl" n
 echo "use_ssl=$use_ssl" >> config.param
 if [ "$use_ssl" = y ]; then
@@ -592,6 +592,7 @@
 
 if [ "$use_ssl" = y ]; then
   echo "Do you want SSL verification support"
+  echo '(Your SSL library must be version 0.8 or later)'
   yesno use_ssl_verify "$use_ssl_verify" n
   echo "use_ssl_verify=$use_ssl_verify" >> config.param
   if [ "$use_ssl_verify" = y ]; then
Only in w3m-0.1.11-pre-ja: conv.o
diff -ru w3m-0.1.11-pre.dist/cookie.c w3m-0.1.11-pre-ja/cookie.c
--- w3m-0.1.11-pre.dist/cookie.c	Wed Jun 14 02:40:56 2000
+++ w3m-0.1.11-pre-ja/cookie.c	Wed Jul 12 12:44:23 2000
@@ -20,6 +20,7 @@
 {
     int m0, m1, offset;
 
+    /* RFC 2109 s. 2, "domain-match", case 1 (both are IP and identical) */
     regexCompile("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*", 0);
     m0 = regexMatch(host, 1);
     m1 = regexMatch(domain, 1);
@@ -27,6 +28,7 @@
 	if (strcasecmp(host, domain) == 0)
 	    return host;
     }
+    /* RFC 2109 s. 2, cases 2, 3 */
     else if (!m0 && !m1) {
 	offset = (domain[0] != '.') ? 0 : strlen(host) - strlen(domain);
 	if (offset >= 0 && strcasecmp(&host[offset], domain) == 0)
@@ -35,6 +37,70 @@
     return NULL;
 }
 
+static char *
+tail_match(char *host, char *domain)
+{
+    int m0, m1;
+
+    /* http://www.netscape.com/newsref/std/cookie_spec.html defined
+      "tail-matching" quite sloppily. In particular case 1 of RFC 2109
+       s. 2 was not considered. We use RFC 2109 semantics in the case
+       where IP numbers are involved. */
+
+    regexCompile("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*",0);
+    m0 = regexMatch(host,1);
+    m1 = regexMatch(domain,1);
+    if (m0 && m1 && strcmp(host, domain) == 0) {
+	return host;
+
+    /* Version 0 "tail-matching" for non-IP-number hosts names */
+    } else  if (!m0 && !m1 && !nodots(host, NULL)) {
+	if (strcasecmp(host, domain) == 0) {
+	    return host;
+	} else {
+	    int L_host = strlen(host);
+	    int L_domain = strlen(domain);
+	    if (L_host >= L_domain + 1
+		    && domain[0] == '.'
+		    && strcasecmp(&host[L_host - L_domain], domain) == 0)
+		/* domain actually starts with a . (i.e., same as RFC 2109) */
+		return &host[L_host - L_domain];
+	    else if (L_host >= L_domain + 2
+		    && host[L_host - L_domain - 1] == '.'
+		    && strcasecmp(&host[L_host - L_domain], domain) == 0)
+		/* domain has no leading dot */
+		return &host[L_host - L_domain - 1];
+	}
+  }
+  return NULL;
+}
+
+static char *
+domain_or_tail_match(char *host, char *domain, int version)
+{
+    return version? domain_match(host, domain): tail_match(host, domain);
+}
+
+static char *
+fqdn( char *host, int scheme )
+{
+    /* This is a wrapper for the FQDN() function.
+
+       Note that if we are using a valid proxy, we will want to avoid calling
+       FQDN() to avoid resolving domain names twice, with the results of the
+       client-side resolution effectively discarded. We presumably only get a
+       cookie if we use HTTP or HTTPS, vs. FTP etc., so we ignore other scheme.
+       Note that we have no "HTTPS proxy" setting. */
+
+    char *domainname = NULL;
+    if (scheme == SCM_HTTP && HTTP_proxy != NULL && !Do_not_use_proxy && !check_no_proxy(host)) {
+	domainname = host;
+    } else {
+	domainname = FQDN(host);
+    }
+    return domainname;
+}
+
 static struct portlist *
 make_portlist(Str port)
 {
@@ -122,12 +188,12 @@
 static int
 match_cookie(ParsedURL * pu, struct cookie *cookie)
 {
-    char *domainname = FQDN(pu->host);
+    char *domainname = fqdn(pu->host, pu->scheme);
 
     if (!domainname)
 	return 0;
 
-    if (!domain_match(domainname, cookie->domain->ptr))
+    if (!domain_or_tail_match(domainname, cookie->domain->ptr, cookie->version))
 	return 0;
     if (strncmp(cookie->path->ptr, pu->file, cookie->path->length) != 0)
 	return 0;
@@ -184,6 +250,7 @@
 	return NULL;
 
     tmp = Strnew();
+    /* XXX The version check is not necessary according to RFC 2109 s. 10.1.1 */
     if (version > 0)
 	Strcat(tmp, Sprintf("$Version=\"%d\"; ", version));
 
@@ -191,6 +258,7 @@
     for (p1 = fco->next; p1; p1 = p1->next) {
 	Strcat_charp(tmp, "; ");
 	Strcat(tmp, make_cookie(p1));
+	/* XXX The version check is not necessary according to RFC 2109 s. 10.1.1 */
 	if (version > 0) {
 	    if (p1->flag & COO_PATH)
 		Strcat(tmp, Sprintf("; $Path=\"%s\"", p1->path->ptr));
@@ -226,9 +294,12 @@
 	   Str port, Str commentURL)
 {
     struct cookie *p;
-    char *domainname = FQDN(pu->host);
+    char *domainname = fqdn(pu->host, pu->scheme);
     Str odomain = domain, opath = path;
     struct portlist *portlist = NULL;
+    int use_security = !(flag & COO_OVERRIDE);
+
+#define COOKIE_ERROR(err) if(!((err) & COO_OVERRIDE_OK) || use_security) return (err)
 
 #ifdef DEBUG
     fprintf(stderr, "host: [%s, %s] %d\n", pu->host, pu->file, flag);
@@ -242,42 +313,62 @@
     if (port)
 	fprintf(stderr, "port: [%s]\n", port->ptr);
 #endif				/* DEBUG */
+    /* RFC 2109 s. 4.3.2 case 2; but this (no request-host) shouldn't happen */
     if (!domainname)
-	return 1;
+ 	return COO_ENODOT;
 
     if (domain) {
 	char *dp;
-	char **sdomain;
-#if 0
-	if (domain->ptr[0] != '.')
-	    return 1;
-#endif				/* 0 */
+#if 1
+	/* RFC 2109 s. 4.3.2 case 2 subcase 2 (does not apply for version 0) */
+	if (version > 0 && domain->ptr[0] != '.')
+	    COOKIE_ERROR(COO_ENOTV1DOM);
+#endif				/* 1 */
+        /* RFC 2109 s. 4.3.2 case 2 subcase 1 */
 	if (nodots(&domain->ptr[1], &domain->ptr[domain->length]))
-	    return 1;
-	if (!(dp = domain_match(domainname, domain->ptr)))
-	    return 1;
+	    COOKIE_ERROR(COO_ENODOT);
+	/* RFC 2109 s. 4.3.2 case 3, or version 0 "tail-matching" check */
+	if (!(dp = domain_or_tail_match(domainname, domain->ptr, version)))
+	    COOKIE_ERROR(version? COO_EDOM: COO_ETAIL);
 	if (version == 0) {
-	    for (sdomain = special_domain; *sdomain; sdomain++) {
-		int offset = domain->length - strlen(*sdomain);
-		if (offset >= 0 && strcasecmp(*sdomain, &domain->ptr[offset]) == 0)
-		    break;
+	    /* count the number of dots */
+	    int i;
+	    int n = 0;
+	    for (i = 0; i < domain->length; i += 1) {
+		if (domain->ptr[i] == '.')
+		    n += 1;
+	    }
+	    if (n < 2) {
+		COOKIE_ERROR(COO_ESPECIAL);
+	    } else if (n == 2) {
+		char **sdomain;
+		int ok = 0;
+		for (sdomain = special_domain; !ok && *sdomain; sdomain++) {
+		    int offset = domain->length - strlen(*sdomain);
+		    if (offset >= 0 && strcasecmp(*sdomain, &domain->ptr[offset]) == 0)
+			ok = 1;
+		}
+		if (!ok)
+		    COOKIE_ERROR(COO_ESPECIAL);
 	    }
-	    if (!*sdomain && !nodots(domainname, dp))
-		return 1;
 	}
 	else {
-	    if (!nodots(domainname, dp))
-		return 1;
+	    /* RFC 2109 s. 4.3.2 case 4 */
+	    /* Invariant: dp contains matched domain */
+  	    if (!nodots(domainname, dp))
+		COOKIE_ERROR(COO_EBADHOST);
 	}
     }
     if (path) {
-	if (version > 0 && strncmp(path->ptr, pu->file, path->length) != 0)
-	    return 1;
+	/* RFC 2109 s. 4.3.2 case 1 */
+	/* XXX Why is the version 0 check here? */
+  	if (version > 0 && strncmp(path->ptr, pu->file, path->length) != 0)
+	    COOKIE_ERROR(COO_EPATH);
     }
     if (port) {
 	portlist = make_portlist(port);
 	if (portlist && !port_match(portlist, pu->port))
-	    return 1;
+	    COOKIE_ERROR(COO_EPORT);
     }
 
     if (!domain)
@@ -538,7 +629,11 @@
 	}
 	if (p->commentURL) {
 	    Strcat_charp(src, "<tr><td width=\"80\"><b>CommentURL:</b></td><td>");
+	    Strcat_charp(src, "<a href=\"");
+	    Strcat_charp(src, htmlquote_str(p->commentURL->ptr));
+	    Strcat_charp(src, "\">");
 	    Strcat_charp(src, htmlquote_str(p->commentURL->ptr));
+	    Strcat_charp(src, "</a>");
 	    Strcat_charp(src, "</td></tr>");
 	}
 	if (tmp2[0]) {
@@ -548,6 +643,9 @@
 		Strcat_charp(src, " (Discard)");
 	    Strcat_charp(src, "</td></tr>");
 	}
+	Strcat_charp(src, "<tr><td width=\"80\"><b>Version:</b></td><td>");
+	Strcat_charp(src, Sprintf("%d", p->version)->ptr);
+	Strcat_charp(src, "</td></tr><tr><td>");
 	if (p->domain) {
 	    Strcat_charp(src, "<tr><td width=\"80\"><b>Domain:</b></td><td>");
 	    Strcat_charp(src, htmlquote_str(p->domain->ptr));
Only in w3m-0.1.11-pre-ja: cookie.o
Only in w3m-0.1.11-pre-ja: display.o
diff -ru w3m-0.1.11-pre.dist/etc.c w3m-0.1.11-pre-ja/etc.c
--- w3m-0.1.11-pre.dist/etc.c	Wed Jun 14 05:39:24 2000
+++ w3m-0.1.11-pre-ja/etc.c	Wed Jul 12 12:47:24 2000
@@ -1083,6 +1083,7 @@
 		    break;
 		switch (SSL_get_error(ss->handle, ss->status)) {
 		case SSL_ERROR_WANT_READ:
+		case SSL_ERROR_WANT_WRITE: /* reads can trigger write errors; see SSL_get_error(3) */
 		    continue;
 		default:
 		    break;
Only in w3m-0.1.11-pre-ja: etc.o
diff -ru w3m-0.1.11-pre.dist/file.c w3m-0.1.11-pre-ja/file.c
--- w3m-0.1.11-pre.dist/file.c	Wed Jun 14 06:35:40 2000
+++ w3m-0.1.11-pre-ja/file.c	Wed Jul 12 15:59:19 2000
@@ -123,6 +123,21 @@
 #define HR_RULE_WIDTH 1
 #endif				/* not KANJI_SYMBOLS */
 
+#ifdef USE_COOKIE
+/* This array should be somewhere else */
+char           *violations[COO_EMAX] = {
+  "internal error",
+  "tail match failed",
+  "wrong number of dots",
+  "RFC 2109 4.3.2 rule 1",
+  "RFC 2109 4.3.2 rule 2.1",
+  "RFC 2109 4.3.2 rule 2.2",
+  "RFC 2109 4.3.2 rule 3",
+  "RFC 2109 4.3.2 rule 4",
+  "RFC XXXX 4.3.2 rule 5"
+};
+#endif
+
 #ifndef STRCHR
 char *
 strchr(char *s, char c)
@@ -501,9 +516,11 @@
 		p++;
 		SKIP_BLANKS(p);
 		if (matchattr(p, "expires", 7, &tmp)) {
+		    /* version 0 */
 		    expires = mymktime(tmp->ptr);
 		}
 		else if (matchattr(p, "max-age", 7, &tmp)) {
+		    /* XXX Is there any problem with max-age=0? (RFC 2109 ss. 4.2.1, 4.2.2 */
 		    expires = time(NULL) + atol(tmp->ptr);
 		}
 		else if (matchattr(p, "domain", 6, &tmp)) {
@@ -522,12 +539,15 @@
 		    version = atoi(tmp->ptr);
 		}
 		else if (matchattr(p, "port", 4, &tmp)) {
+		    /* version 1, Set-Cookie2 */
 		    port = tmp;
 		}
 		else if (matchattr(p, "commentURL", 10, &tmp)) {
+		    /* version 1, Set-Cookie2 */
 		    commentURL = tmp;
 		}
 		else if (matchattr(p, "discard", 7, NULL)) {
+		    /* version 1, Set-Cookie2 */
 		    flag |= COO_DISCARD;
 		}
 		quoted = 0;
@@ -538,15 +558,44 @@
 		}
 	    }
 	    if (pu && name->length > 0) {
+		int             err;
 		if (flag & COO_SECURE)
 		    disp_message_nsec("Received a secured cookie", FALSE, 1, TRUE, FALSE);
 		else
 		    disp_message_nsec(Sprintf("Received cookie: %s=%s",
 		     name->ptr, value->ptr)->ptr, FALSE, 1, TRUE, FALSE);
-		if (add_cookie(pu, name, value, expires, domain, path, flag,
-			       comment, version, port, commentURL))
-		    disp_message_nsec("This cookie was rejected "
-				      "to prevent security violation.", FALSE, 10, TRUE, FALSE);
+		err = add_cookie(pu, name, value, expires, domain, path, flag,
+			       comment, version, port, commentURL);
+		if (err) {
+		    char           *ans = accept_bad_cookie == TRUE? "y": NULL;
+		    if (fmInitialized && (err & COO_OVERRIDE_OK)
+			  && accept_bad_cookie == PERHAPS)
+		    {
+			char *s = Sprintf("Accept bad cookie from %s for %s? (y or n) ",
+						  pu->host, domain->ptr)->ptr;
+			int L = strlen(s);
+			if (L > COLS - 4)
+			  s[COLS - 4] = '\0';
+			term_raw();
+			inputStr(s, FALSE);
+		    }
+		    if (ans == NULL || tolower(*ans) != 'y'
+			|| (err = add_cookie(pu, name, value, expires, domain, path,
+				   flag | COO_OVERRIDE, comment, version, port,
+				   commentURL))) {
+		      err = (err & ~COO_OVERRIDE_OK) - 1;
+		      if (err >= 0 && err < COO_EMAX) {
+			disp_message_nsec(Sprintf("This cookie was rejected "
+				     "to prevent security violation. [%s]",
+				     violations[err])->ptr, FALSE, 10, TRUE, FALSE);
+		      } else {
+			disp_message_nsec("This cookie was rejected "
+					  "to prevent security violation.", FALSE, 10, TRUE, FALSE);
+		      }
+		    } else
+		      disp_message_nsec(Sprintf("Accepting invalid cookie: %s=%s",
+					name->ptr,value->ptr)->ptr, FALSE, 1, TRUE, FALSE);
+		}
 	    }
 	}
 #endif				/* USE_COOKIE */
@@ -5563,7 +5612,7 @@
     while ((pid = waitpid(-1, &stat, WNOHANG)) > 0) {
 	;
     }
-#elsif HAVE_WAIT3
+#elif HAVE_WAIT3
     int pid;
 
     while ((pid = wait3(&stat, WNOHANG, NULL)) > 0) {
Only in w3m-0.1.11-pre-ja: file.o
diff -ru w3m-0.1.11-pre.dist/fm.h w3m-0.1.11-pre-ja/fm.h
--- w3m-0.1.11-pre.dist/fm.h	Wed Jun 14 06:26:46 2000
+++ w3m-0.1.11-pre-ja/fm.h	Wed Jul 12 12:52:14 2000
@@ -72,6 +72,10 @@
 #define FALSE 0
 #define TRUE   1
 
+#ifdef USE_COOKIE
+#define PERHAPS 2
+#endif
+
 #define INTERNAL_CODE    'E'	/* use EUC-JP internally; do not change */
 
 #define SHELLBUFFERNAME	"*Shellout*"
@@ -483,6 +487,22 @@
 #define COO_DOMAIN	4
 #define COO_PATH	8
 #define COO_DISCARD	16
+#define COO_OVERRIDE	32			/* user chose to override security checks */
+
+#define COO_OVERRIDE_OK	32			/* flag to specify that an error is overridable */
+						/* version 0 refers to the original cookie_spec.html */
+						/* version 1 refers to RFC 2109 */
+						/* version 1' refers to the Internet draft to obsolete RFC 2109 */
+#define COO_EINTERNAL	(1)			/* unknown error; probably forgot to convert "return 1" in cookie.c */
+#define COO_ETAIL	(2 | COO_OVERRIDE_OK)	/* tail match failed (version 0) */
+#define COO_ESPECIAL	(3)			/* special domain check failed (version 0) */
+#define COO_EPATH	(4)			/* Path attribute mismatch (version 1 case 1) */
+#define COO_ENODOT	(5 | COO_OVERRIDE_OK)	/* no embedded dots in Domain (version 1 case 2.1) */
+#define COO_ENOTV1DOM	(6 | COO_OVERRIDE_OK)	/* Domain does not start with a dot (version 1 case 2.2) */
+#define COO_EDOM	(7 | COO_OVERRIDE_OK)	/* domain-match failed (version 1 case 3) */
+#define COO_EBADHOST	(8 | COO_OVERRIDE_OK)	/* dot in matched host name in FQDN (version 1 case 4) */
+#define COO_EPORT	(9)			/* Port match failed (version 1' case 5) */
+#define COO_EMAX	COO_EPORT
 #endif				/* USE_COOKIE */
 
 typedef struct _Hist {
@@ -662,6 +682,7 @@
 global int default_use_cookie init(TRUE);
 global int use_cookie init(TRUE);
 global int accept_cookie init(FALSE);
+global int accept_bad_cookie init(FALSE);
 #endif				/* USE_COOKIE */
 
 #ifdef VIEW_UNSEENOBJECTS
Only in w3m-0.1.11-pre-ja: form.o
Only in w3m-0.1.11-pre-ja: frame.o
Only in w3m-0.1.11-pre-ja: ftp.o
Only in w3m-0.1.11-pre-ja: func.o
Only in w3m-0.1.11-pre-ja/gc: allchblk.o
Only in w3m-0.1.11-pre-ja/gc: alloc.o
Only in w3m-0.1.11-pre-ja/gc: blacklst.o
Only in w3m-0.1.11-pre-ja/gc: checksums.o
Only in w3m-0.1.11-pre-ja/gc: dbg_mlc.o
Only in w3m-0.1.11-pre-ja/gc: dyn_load.o
Only in w3m-0.1.11-pre-ja/gc: finalize.o
Only in w3m-0.1.11-pre-ja/gc: gc.a
Only in w3m-0.1.11-pre-ja/gc: gctest
Only in w3m-0.1.11-pre-ja/gc: headers.o
Only in w3m-0.1.11-pre-ja/gc: if_mach
Only in w3m-0.1.11-pre-ja/gc: if_not_there
Only in w3m-0.1.11-pre-ja/gc: irix_threads.o
Only in w3m-0.1.11-pre-ja/gc: linux_threads.o
Only in w3m-0.1.11-pre-ja/gc: mach_dep.o
Only in w3m-0.1.11-pre-ja/gc: malloc.o
Only in w3m-0.1.11-pre-ja/gc: mallocx.o
Only in w3m-0.1.11-pre-ja/gc: mark.o
Only in w3m-0.1.11-pre-ja/gc: mark_rts.o
Only in w3m-0.1.11-pre-ja/gc: misc.o
Only in w3m-0.1.11-pre-ja/gc: new_hblk.o
Only in w3m-0.1.11-pre-ja/gc: obj_map.o
Only in w3m-0.1.11-pre-ja/gc: os_dep.o
Only in w3m-0.1.11-pre-ja/gc: ptr_chck.o
Only in w3m-0.1.11-pre-ja/gc: reclaim.o
Only in w3m-0.1.11-pre-ja/gc: solaris_pthreads.o
Only in w3m-0.1.11-pre-ja/gc: solaris_threads.o
Only in w3m-0.1.11-pre-ja/gc: stubborn.o
Only in w3m-0.1.11-pre-ja/gc: test.o
Only in w3m-0.1.11-pre-ja/gc: threadlibs
Only in w3m-0.1.11-pre-ja/gc: typd_mlc.o
Only in w3m-0.1.11-pre-ja: hash.o
Only in w3m-0.1.11-pre-ja: history.o
Only in w3m-0.1.11-pre-ja: indep.o
Only in w3m-0.1.11-pre-ja: keybind.o
Only in w3m-0.1.11-pre-ja: libindep.a
Only in w3m-0.1.11-pre-ja: linein.o
Only in w3m-0.1.11-pre-ja: local.o
Only in w3m-0.1.11-pre-ja: mailcap.o
Only in w3m-0.1.11-pre-ja: main.o
Only in w3m-0.1.11-pre-ja: map.o
Only in w3m-0.1.11-pre-ja: menu.o
Only in w3m-0.1.11-pre-ja: mimehead.o
Only in w3m-0.1.11-pre-ja: mktable
Only in w3m-0.1.11-pre-ja: mktable.o
Only in w3m-0.1.11-pre-ja: parsetag.o
diff -ru w3m-0.1.11-pre.dist/rc.c w3m-0.1.11-pre-ja/rc.c
--- w3m-0.1.11-pre.dist/rc.c	Wed Jun 14 06:18:51 2000
+++ w3m-0.1.11-pre-ja/rc.c	Wed Jul 12 15:43:23 2000
@@ -91,6 +91,7 @@
 #define CMT_WRAP         "折り返し検索"
 #define CMT_USECOOKIE "クッキーを使用する"
 #define CMT_ACCEPTCOOKIE "クッキーを受け付ける"
+#define CMT_ACCEPTBADCOOKIE "無効のクッキーを受け付ける" /*XXX FIXME (replace with real Japanese translation) */
 #define CMT_VIEW_UNSEENOBJECTS "背景画像等へのリンクを作る"
 #ifdef __EMX__
 #define CMT_BGEXTVIEW	 "外部ビューアを別セッションで動かす"
@@ -162,6 +163,7 @@
 #define CMT_WRAP         "Wrap search"
 #define CMT_USECOOKIE   "Use Cookie"
 #define CMT_ACCEPTCOOKIE "Accept Cookie"
+#define CMT_ACCEPTBADCOOKIE "Invalid Cookie"
 #define CMT_VIEW_UNSEENOBJECTS "Display unseenobjects (e.g. bgimage) tag"
 #ifdef __EMX__
 #define CMT_BGEXTVIEW	 "Another session for an external viewer"
@@ -252,6 +254,17 @@
 };
 #endif				/* INET6 */
 
+#ifdef USE_COOKIE
+static struct sel_c badcookiestr[] = {
+  {0, "0", "discard"},
+#if 0
+  {1, "1", "accept"},
+#endif
+  {2, "2", "ask"},
+  {0, NULL, NULL}
+};
+#endif				/* USE_COOKIE */
+
 struct param_ptr params1[] =
 {
     {"tabstop", P_INT, PI_TEXT, (void *) &Tabstop, CMT_TABSTOP, NULL},
@@ -307,6 +320,7 @@
 #ifdef USE_COOKIE
     {"use_cookie", P_INT, PI_ONOFF, (void *) &use_cookie, CMT_USECOOKIE, NULL},
     {"accept_cookie", P_INT, PI_ONOFF, (void *) &accept_cookie, CMT_ACCEPTCOOKIE, NULL},
+    {"accept_bad_cookie", P_INT,  PI_SEL_C, (void*)&accept_bad_cookie, CMT_ACCEPTBADCOOKIE, &badcookiestr},
 #endif				/* USE_COOKIE */
 #ifdef MOUSE
     {"use_mouse", P_INT, PI_ONOFF, (void *) &use_mouse, CMT_MOUSE, NULL},
Only in w3m-0.1.11-pre-ja: rc.o
diff -ru w3m-0.1.11-pre.dist/rcparams.h w3m-0.1.11-pre-ja/rcparams.h
--- w3m-0.1.11-pre.dist/rcparams.h	Tue Jun  6 01:39:13 2000
+++ w3m-0.1.11-pre-ja/rcparams.h	Wed Jul 12 12:41:36 2000
@@ -44,6 +44,7 @@
 global int WrapDefault init(FALSE);
 #ifdef USE_COOKIE
 global int use_cookie init(TRUE);
+global int accept_bad_cookie init(FALSE);
 #endif				/* USE_COOKIE */
 
 /* params4 */
Only in w3m-0.1.11-pre-ja: regex.o
Only in w3m-0.1.11-pre-ja: search.o
Only in w3m-0.1.11-pre-ja: table.o
Only in w3m-0.1.11-pre-ja: tagtable.o
Only in w3m-0.1.11-pre-ja: terms.o
Only in w3m-0.1.11-pre-ja: textlist.o
diff -ru w3m-0.1.11-pre.dist/url.c w3m-0.1.11-pre-ja/url.c
--- w3m-0.1.11-pre.dist/url.c	Wed Jun 14 00:28:33 2000
+++ w3m-0.1.11-pre-ja/url.c	Wed Jul 12 13:04:41 2000
@@ -20,6 +20,12 @@
 #include "myctype.h"
 #include "regex.h"
 
+#ifdef USE_SSL
+#ifndef SSLEAY_VERSION_NUMBER
+#include <crypto.h>		/* SSLEAY_VERSION_NUMBER may be here */
+#endif
+#endif
+
 #ifdef	__WATT32__
 #define	write(a,b,c)	write_s(a,b,c)
 #endif				/* __WATT32__ */
@@ -369,6 +375,10 @@
 	bcopy((void *) &adr, (void *) &hostaddr.sin_addr, sizeof(long));
 	hostaddr.sin_family = AF_INET;
 	hostaddr.sin_port = s_port;
+	if (fmInitialized) {
+	    message(Sprintf("Connecting to %s\n", hostname)->ptr, 0, 0);
+	    refresh();
+	}
 	if (connect(sock, (struct sockaddr *) &hostaddr,
 		    sizeof(struct sockaddr_in)) < 0) {
 #ifdef SOCK_DEBUG
Only in w3m-0.1.11-pre-ja: url.o
Only in w3m-0.1.11-pre-ja: version.o
Only in w3m-0.1.11-pre-ja: w3m
Only in w3m-0.1.11-pre-ja: w3mbookmark
Only in w3m-0.1.11-pre-ja: w3mbookmark.o
Only in w3m-0.1.11-pre-ja: w3mhelperpanel
Only in w3m-0.1.11-pre-ja: w3mhelperpanel.o
