Index: Makefile.in
===================================================================
RCS file: /cvsroot/w3m/w3m/Makefile.in,v
retrieving revision 1.42
diff -u -r1.42 Makefile.in
--- Makefile.in	29 May 2007 12:01:04 -0000	1.42
+++ Makefile.in	13 Dec 2010 12:59:49 -0000
@@ -27,7 +27,6 @@
 top_srcdir = @top_srcdir@
 top_builddir = .
 VPATH = $(top_srcdir):.
-DESTDIR = 
 
 CGIBIN_DIR = $(libexecdir)/$(PACKAGE)/cgi-bin
 AUXBIN_DIR = $(libexecdir)/$(PACKAGE)
@@ -46,7 +45,8 @@
         -DLOCALEDIR=\"$(localedir)\"
 LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
-EXT_LIBS = -L. -lindep @LIBINTL@ @LIBGC@
+GC_LIBS = @LIBGC@
+EXT_LIBS = -L. -lindep @LIBINTL@ $(GC_LIBS)
 W3M_LIBS = @W3M_LIBS@
 WCTARGET = @WCTARGET@
 NLSTARGET = @NLSTARGET@
@@ -136,7 +136,11 @@
 tagtable.c: tagtable.tab mktable$(EXT) html.h 
 	./mktable$(EXT) 100 $(srcdir)/tagtable.tab > $@
 
-indep.o: indep.c fm.h funcname1.h
+entity.h: entity.tab mktable$(EXT)
+	echo '/* $$I''d$$ */' > $@
+	./mktable$(EXT) 100 $(srcdir)/entity.tab >> $@
+
+indep.o: indep.c fm.h funcname1.h entity.h
 func.o: funcname.c functable.c funcname1.h
 keybind.o: funcname2.h
 keybind_lynx.o: funcname2.h
@@ -170,8 +174,8 @@
 	./mktable$(EXT) 100 functable.tab > $@
 	-rm -f functable.tab
 
-mktable$(EXT): mktable.o dummy.o $(ALIB)
-	$(CC) $(CFLAGS) -o mktable mktable.o dummy.o $(LDFLAGS) $(LIBS) $(EXT_LIBS)
+mktable$(EXT): mktable.o dummy.o Str.o hash.o myctype.o
+	$(CC) $(CFLAGS) -o mktable mktable.o dummy.o Str.o hash.o myctype.o $(LDFLAGS) $(LIBS) $(GC_LIBS)
 
 $(BOOKMARKER): w3mbookmark.o dummy.o $(ALIB)
 	$(CC) $(CFLAGS) -o $(BOOKMARKER) w3mbookmark.o dummy.o $(LDFLAGS) $(LIBS) $(EXT_LIBS)
Index: file.c
===================================================================
RCS file: /cvsroot/w3m/w3m/file.c,v
retrieving revision 1.264
diff -u -r1.264 file.c
--- file.c	3 Aug 2010 10:02:16 -0000	1.264
+++ file.c	13 Dec 2010 12:59:50 -0000
@@ -262,6 +262,8 @@
 {
     return (type == NULL || type[0] == '\0' ||
 	    strncasecmp(type, "text/", 5) == 0 ||
+	    (strncasecmp(type, "application/", 12) == 0 &&
+		strstr(type, "xhtml") != NULL) ||
 	    strncasecmp(type, "message/", sizeof("message/") - 1) == 0);
 }
 
Index: ftp.c
===================================================================
RCS file: /cvsroot/w3m/w3m/ftp.c,v
retrieving revision 1.41
diff -u -r1.41 ftp.c
--- ftp.c	11 Aug 2010 09:31:33 -0000	1.41
+++ ftp.c	13 Dec 2010 12:59:51 -0000
@@ -131,12 +131,30 @@
 	size_t n = strlen(ftp->pass);
 
 	if (n > 0 && ftp->pass[n - 1] == '@') {
+#ifdef INET6
+	    struct sockaddr_storage sockname;
+#else
 	    struct sockaddr_in sockname;
+#endif
 	    socklen_t socknamelen = sizeof(sockname);
 
 	    if (!getsockname(sock, (struct sockaddr *)&sockname, &socknamelen)) {
-		struct hostent *sockent;
 		Str tmp = Strnew_charp(ftp->pass);
+#ifdef INET6
+		char hostbuf[NI_MAXHOST];
+
+		if (getnameinfo((struct sockaddr *)&sockname, socknamelen,
+				hostbuf, sizeof hostbuf, NULL, 0, NI_NAMEREQD)
+			== 0)
+		    Strcat_charp(tmp, hostbuf);
+		else if (getnameinfo((struct sockaddr *)&sockname, socknamelen,
+				        hostbuf, sizeof hostbuf, NULL, 0, NI_NUMERICHOST)
+			== 0)
+		    Strcat_m_charp(tmp, "[", hostbuf, "]", NULL);
+		else
+		    Strcat_charp(tmp, "unknown");
+#else
+		struct hostent *sockent;
 
 		if ((sockent = gethostbyaddr((char *)&sockname.sin_addr,
 					     sizeof(sockname.sin_addr),
@@ -145,7 +163,7 @@
 		else
 		    Strcat_m_charp(tmp, "[", inet_ntoa(sockname.sin_addr),
 				   "]", NULL);
-
+#endif
 		ftp->pass = tmp->ptr;
 	    }
 	}
Index: mktable.c
===================================================================
RCS file: /cvsroot/w3m/w3m/mktable.c,v
retrieving revision 1.15
diff -u -r1.15 mktable.c
--- mktable.c	31 May 2007 01:19:50 -0000	1.15
+++ mktable.c	13 Dec 2010 12:59:51 -0000
@@ -102,7 +102,7 @@
     }
     printf("static HashItem_si MyHashItem[] = {\n");
     for (i = 0; i < j; i++) {
-	printf("  /* %d */ {\"%s\",%s,", i,
+	printf("    /* %d */ {\"%s\", %s, ", i,
 	       hashitems[i]->key, hashitems[i]->value);
 	if (hashitems[i]->next == NULL) {
 	    printf("NULL},\n");
@@ -116,13 +116,13 @@
 
     for (i = 0; i < hash->size; i++) {
 	if (hash->tab[i])
-	    printf("  &MyHashItem[%d],\n",
+	    printf("    &MyHashItem[%d],\n",
 		   getHash_hss_i(rhash, hash->tab[i], -1));
 	else
-	    printf("  NULL,\n");
+	    printf("    NULL,\n");
     }
     printf("};\n\n");
-    printf("Hash_si %s = {%d, MyHashItemTbl};\n", fbase->ptr, hash->size);
+    printf("Hash_si %s = { %d, MyHashItemTbl };\n", fbase->ptr, hash->size);
 
     exit(0);
 }
Index: url.c
===================================================================
RCS file: /cvsroot/w3m/w3m/url.c,v
retrieving revision 1.99
diff -u -r1.99 url.c
--- url.c	11 Dec 2010 13:00:11 -0000	1.99
+++ url.c	13 Dec 2010 12:59:51 -0000
@@ -1814,20 +1814,26 @@
 add_index_file(ParsedURL *pu, URLFile *uf)
 {
     char *p, *q;
+    TextList *index_file_list = NULL;
+    TextListItem *ti;
 
-    if (index_file == NULL || index_file[0] == '\0') {
+    if (non_null(index_file))
+	index_file_list = make_domain_list(index_file);
+    if (index_file_list == NULL) {
 	uf->stream = NULL;
 	return;
     }
-    p = Strnew_m_charp(pu->file, "/", file_quote(index_file), NULL)->ptr;
-    p = cleanupName(p);
-    q = cleanupName(file_unquote(p));
-    examineFile(q, uf);
-    if (uf->stream == NULL)
-	return;
-    pu->file = p;
-    pu->real_file = q;
-    return;
+    for (ti = index_file_list->first; ti; ti = ti->next) {
+	p = Strnew_m_charp(pu->file, "/", file_quote(ti->ptr), NULL)->ptr;
+	p = cleanupName(p);
+	q = cleanupName(file_unquote(p));
+	examineFile(q, uf);
+	if (uf->stream != NULL) {
+	    pu->file = p;
+	    pu->real_file = q;
+	    return;
+	}
+    }
 }
 
 static char *
Index: scripts/Makefile.in
===================================================================
RCS file: /cvsroot/w3m/w3m/scripts/Makefile.in,v
retrieving revision 1.10
diff -u -r1.10 Makefile.in
--- scripts/Makefile.in	30 May 2007 03:15:13 -0000	1.10
+++ scripts/Makefile.in	13 Dec 2010 12:59:51 -0000
@@ -24,7 +24,6 @@
 sysconfdir = @sysconfdir@
 top_srcdir = @top_srcdir@
 VPATH = $(srcdir):.
-DESTDIR = 
 
 CGIBIN_DIR = $(libexecdir)/$(PACKAGE)/cgi-bin
 AUXBIN_DIR = $(libexecdir)/$(PACKAGE)
Index: scripts/multipart/Makefile.in
===================================================================
RCS file: /cvsroot/w3m/w3m/scripts/multipart/Makefile.in,v
retrieving revision 1.5
diff -u -r1.5 Makefile.in
--- scripts/multipart/Makefile.in	30 May 2007 03:15:13 -0000	1.5
+++ scripts/multipart/Makefile.in	13 Dec 2010 12:59:51 -0000
@@ -24,7 +24,6 @@
 sysconfdir = @sysconfdir@
 top_srcdir = @top_srcdir@
 VPATH = $(top_srcdir):.
-DESTDIR = 
 
 CGIBIN_DIR = $(libexecdir)/$(PACKAGE)/cgi-bin
 AUXBIN_DIR = $(libexecdir)/$(PACKAGE)
Index: scripts/w3mman/Makefile.in
===================================================================
RCS file: /cvsroot/w3m/w3m/scripts/w3mman/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- scripts/w3mman/Makefile.in	30 May 2007 03:15:13 -0000	1.4
+++ scripts/w3mman/Makefile.in	13 Dec 2010 12:59:51 -0000
@@ -24,7 +24,6 @@
 sysconfdir = @sysconfdir@
 top_srcdir = @top_srcdir@
 VPATH = $(top_srcdir):.
-DESTDIR = 
 
 CGIBIN_DIR = $(libexecdir)/$(PACKAGE)/cgi-bin
 AUXBIN_DIR = $(libexecdir)/$(PACKAGE)
