diff options
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | Makefile.in | 14 | ||||
-rw-r--r-- | entity.h | 2 | ||||
-rw-r--r-- | file.c | 4 | ||||
-rw-r--r-- | ftp.c | 22 | ||||
-rw-r--r-- | mktable.c | 10 | ||||
-rw-r--r-- | scripts/Makefile.in | 1 | ||||
-rw-r--r-- | scripts/multipart/Makefile.in | 1 | ||||
-rw-r--r-- | scripts/w3mman/Makefile.in | 1 | ||||
-rw-r--r-- | url.c | 28 |
10 files changed, 73 insertions, 29 deletions
@@ -1,3 +1,20 @@ +2010-12-15 AIDA Shinra <shinra@j10n.org> + + * [w3m-dev 04424] Windows$BHG(Bw3mimg$B!"B>(B + * scripts/w3mman/Makefile.in (DESTDIR): removed. + * scripts/multipart/Makefile.in (DESTDIR): removed. + * scripts/Makefile.in (DESTDIR): removed. + * url.c (add_index_file): can specify multiple files as an index file for directories. + * mktable.c (defhashfunc): fi indent of output. + * ftp.c (ftp_login): support IPv6. + * file.c (is_text_type): check if the type is "application/xhtml". + * Makefile.in (DESTDIR): removed. + (GC_LIBS): added. + (EXT_LIBS): use "GC_LIBS". + (entity.h): depend on entity.tab and mktable$(EXT). + (indep.o): depend on entity.h + (mktable$(EXT)): depend on Str.o, hash.o and myctype.o instead of $(ALIB). + 2010-12-15 Kazuhiko <kazuhiko@fdiary.net> * [w3m-dev 04419] AC_W3M_EXTLIBS does not check /lib64 @@ -9210,4 +9227,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.1041 2010/12/15 10:30:07 htrb Exp $ +$Id: ChangeLog,v 1.1042 2010/12/15 10:50:24 htrb Exp $ diff --git a/Makefile.in b/Makefile.in index ab81d30..3254ebf 100644 --- a/Makefile.in +++ b/Makefile.in @@ -27,7 +27,6 @@ sysconfdir = @sysconfdir@ top_srcdir = @top_srcdir@ top_builddir = . VPATH = $(top_srcdir):. -DESTDIR = CGIBIN_DIR = $(libexecdir)/$(PACKAGE)/cgi-bin AUXBIN_DIR = $(libexecdir)/$(PACKAGE) @@ -46,7 +45,8 @@ DEFS = @DEFS@ -DAUXBIN_DIR=\"$(AUXBIN_DIR)\" \ -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 @@ $(OBJS) $(LOBJS): fm.h funcname1.h 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 @@ functable.c: funcname.tab mktable$(EXT) ./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) @@ -1,4 +1,4 @@ -/* $Id: entity.h,v 1.3 2001/11/24 02:01:26 ukai Exp $ */ +/* $Id: entity.h,v 1.4 2010/12/15 10:50:24 htrb Exp $ */ #include "hash.h" static HashItem_si MyHashItem[] = { /* 0 */ {"otimes", 0x2297, &MyHashItem[1]}, @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.264 2010/08/03 10:02:16 htrb Exp $ */ +/* $Id: file.c,v 1.265 2010/12/15 10:50:24 htrb Exp $ */ #include "fm.h" #include <sys/types.h> #include "myctype.h" @@ -262,6 +262,8 @@ is_text_type(char *type) { 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); } @@ -1,4 +1,4 @@ -/* $Id: ftp.c,v 1.41 2010/08/11 09:31:33 htrb Exp $ */ +/* $Id: ftp.c,v 1.42 2010/12/15 10:50:24 htrb Exp $ */ #include <stdio.h> #ifndef __MINGW32_VERSION #include <pwd.h> @@ -131,12 +131,30 @@ ftp_login(FTP ftp) 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 if ((sockent = gethostbyaddr((char *)&sockname.sin_addr, sizeof(sockname.sin_addr), @@ -145,7 +163,7 @@ ftp_login(FTP ftp) else Strcat_m_charp(tmp, "[", inet_ntoa(sockname.sin_addr), "]", NULL); - +#endif ftp->pass = tmp->ptr; } } @@ -1,4 +1,4 @@ -/* $Id: mktable.c,v 1.15 2007/05/31 01:19:50 inu Exp $ */ +/* $Id: mktable.c,v 1.16 2010/12/15 10:50:24 htrb Exp $ */ #include <stdio.h> #include <stdlib.h> #include "myctype.h" @@ -102,7 +102,7 @@ main(int argc, char *argv[], char **envp) } 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 @@ main(int argc, char *argv[], char **envp) 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); } diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 7efcb24..4da9ce5 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -24,7 +24,6 @@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ top_srcdir = @top_srcdir@ VPATH = $(srcdir):. -DESTDIR = CGIBIN_DIR = $(libexecdir)/$(PACKAGE)/cgi-bin AUXBIN_DIR = $(libexecdir)/$(PACKAGE) diff --git a/scripts/multipart/Makefile.in b/scripts/multipart/Makefile.in index 20af165..6c7ec6f 100644 --- a/scripts/multipart/Makefile.in +++ b/scripts/multipart/Makefile.in @@ -24,7 +24,6 @@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ top_srcdir = @top_srcdir@ VPATH = $(top_srcdir):. -DESTDIR = CGIBIN_DIR = $(libexecdir)/$(PACKAGE)/cgi-bin AUXBIN_DIR = $(libexecdir)/$(PACKAGE) diff --git a/scripts/w3mman/Makefile.in b/scripts/w3mman/Makefile.in index 6c567c7..569e2fc 100644 --- a/scripts/w3mman/Makefile.in +++ b/scripts/w3mman/Makefile.in @@ -24,7 +24,6 @@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ top_srcdir = @top_srcdir@ VPATH = $(top_srcdir):. -DESTDIR = CGIBIN_DIR = $(libexecdir)/$(PACKAGE)/cgi-bin AUXBIN_DIR = $(libexecdir)/$(PACKAGE) @@ -1,4 +1,4 @@ -/* $Id: url.c,v 1.99 2010/12/11 13:00:11 htrb Exp $ */ +/* $Id: url.c,v 1.100 2010/12/15 10:50:24 htrb Exp $ */ #include "fm.h" #ifndef __MINGW32_VERSION #include <sys/types.h> @@ -1814,20 +1814,26 @@ static void 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 * |