Date: Sat, 9 Dec 2000 06:06:51 +0900 (JST) From: nobutaka@nobutaka.com To: FreeBSD-gnats-submit@freebsd.org Subject: ports/23393: Update port: www/w3m Message-ID: <200012082106.eB8L6pN69411@mail.nobutaka.com> Resent-Message-ID: <200012082110.eB8LA2t07228@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 23393 >Category: ports >Synopsis: Update port: www/w3m >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Dec 08 13:10:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: MANTANI Nobutaka >Release: FreeBSD 5.0-CURRENT i386 >Organization: Hiroshima University >Environment: System: FreeBSD triton 5.0-CURRENT FreeBSD 5.0-CURRENT #6: Mon Dec 4 22:08:01 JST 2000 nobutaka@triton:/usr/src/sys/compile/TRITON i386 >Description: Update to 0.1.11-pre + kokb patchlevel 23. Added files: files/patch-av files/patch-aw files/patch-ax files/patch-ay >How-To-Repeat: >Fix: diff -urN w3m.old/Makefile w3m/Makefile --- w3m.old/Makefile Sat Dec 9 05:27:29 2000 +++ w3m/Makefile Fri Dec 8 22:06:15 2000 @@ -17,15 +17,19 @@ DISTNAME= ${PORTNAME}-${W3M_VERSION}-pre PATCH_SITES= http://www4.ocn.ne.jp/~okabek/ -PATCHFILES= ${PORTNAME}-${W3M_VERSION}-pre-kokb${W3M_PATCHLEVEL}.patch.gz +PATCHFILES= ${PORTNAME}-${W3M_VERSION}-pre-kokb22.patch.gz \ + ${PORTNAME}-${W3M_VERSION}-pre-kokb22_${W3M_PATCHLEVEL}test.patch + PATCH_DIST_STRIP= -p1 MAINTAINER= nobutaka@nobutaka.com -BUILD_DEPENDS= ${LOCALBASE}/lib/libgc.a:${PORTSDIR}/devel/boehm-gc +BUILD_DEPENDS= ${LOCALBASE}/lib/libgc.a:${PORTSDIR}/devel/boehm-gc \ + ${LOCALBASE}/bin/patch:${PORTSDIR}/devel/patch +PATCH= ${LOCALBASE}/bin/patch W3M_VERSION= 0.1.11 -W3M_PATCHLEVEL= 17 +W3M_PATCHLEVEL= 23 MAN1= w3m.1 MANLANG= "" @@ -47,8 +51,8 @@ .if defined(JAPANESE) SED_CMD+= -e "s,undef JAPANESE,define JAPANESE,g" MANLANG+= ja -DOCS_JP= ${DOCS} HISTORY.kokb README.keymap README.kokb \ - README.menu +DOCS_JP= ${DOCS} HISTORY.kokb README.SSL README.cookie \ + README.keymap README.mailcap README.menu .endif .if defined(USE_OPENSSL) diff -urN w3m.old/distinfo w3m/distinfo --- w3m.old/distinfo Sat Dec 9 05:27:29 2000 +++ w3m/distinfo Fri Dec 8 22:07:02 2000 @@ -1,2 +1,3 @@ MD5 (w3m-0.1.11-pre.tar.gz) = d9fb24700ecde78624280467dda1aee5 -MD5 (w3m-0.1.11-pre-kokb17.patch.gz) = bc4f626a2b6882e0e8bfe1841d8a820d +MD5 (w3m-0.1.11-pre-kokb22.patch.gz) = 1d107b4756767749d5d5b875e480e5fc +MD5 (w3m-0.1.11-pre-kokb22_23test.patch) = 06df74db37985350ba2edd70db2a99f4 diff -urN w3m.old/files/patch-av w3m/files/patch-av --- w3m.old/files/patch-av Thu Jan 1 09:00:00 1970 +++ w3m/files/patch-av Fri Dec 8 22:11:41 2000 @@ -0,0 +1,156 @@ +diff -u file.c.orig file.c +--- file.c.orig Thu Dec 7 22:41:39 2000 ++++ file.c Thu Dec 7 23:04:23 2000 +@@ -71,6 +71,10 @@ + #ifdef JP_CHARSET + static char content_charset = '\0'; + static char guess_charset(char *p); ++#ifdef NEW_FORM ++static char check_charset(char *p); ++static char check_accept_charset(char *p); ++#endif + char DocumentCode = '\0'; + #endif + +@@ -2545,61 +2549,68 @@ + } + + #ifdef NEW_FORM +-char * +-process_accept_charset(char *ac) +-{ +- static Str temp = NULL; +- char *s = ac, *e; + #ifdef JP_CHARSET +- char res[2] = { '\0', '\0' }; +-#endif +- +- while (*s) { +- while (*s && (IS_SPACE(*s) || *s == ',')) ++s; +- if (!*s) break; +- for (e = s ; *e && !(IS_SPACE(*e) || *e == ',') ; ++e); +- +- if (temp) +- Strclear(temp); +- else +- temp = Strnew(); +- +- Strcat_charp_n(temp, s, e - s); ++char ++check_charset(char *s) ++{ ++ switch (*s) { ++ case CODE_EUC: ++ case CODE_SJIS: ++ case CODE_JIS_n: ++ case CODE_JIS_m: ++ case CODE_JIS_N: ++ case CODE_JIS_j: ++ case CODE_JIS_J: ++ case CODE_INNER_EUC: ++ return *s; ++ } ++ return 0; ++} + +-#ifdef JP_CHARSET +- if ((res[0] = guess_charset(temp->ptr))) +- return Strnew_charp(res)->ptr; +-#else +- if (strcasecmp(temp->ptr, "us-ascii") || +- strcasecmp(temp->ptr, "iso-8859-1")) +-#endif +- return Strnew_charp(temp->ptr)->ptr; ++char ++check_accept_charset(char *s) ++{ ++ char *e; ++ char c; + ++ while (*s) { ++ while (*s && (IS_SPACE(*s) || *s == ',')) ++ s++; ++ if (!*s) ++ break; ++ e = s; ++ while (*e && !(IS_SPACE(*e) || *e == ',')) ++ e++; ++ c = guess_charset(Strnew_charp_n(s, e - s)->ptr); ++ if (c) ++ return c; + s = e; + } +- +- return NULL; ++ return 0; + } ++#endif + + Str + process_form(struct parsed_tag *tag) + { +- char *p, *q, *r, *s, *acs, *tg; ++ char *p, *q, *r, *s, *tg; ++ char cs = 0; + + p = "get"; + parsedtag_get_value(tag, ATTR_METHOD, &p); + q = "!CURRENT_URL!"; + parsedtag_get_value(tag, ATTR_ACTION, &q); + r = NULL; +- parsedtag_get_value(tag, ATTR_CHARSET, &r); +- acs = NULL; +- if (parsedtag_get_value(tag, ATTR_ACCEPT_CHARSET, &acs)) +- acs = process_accept_charset(acs); ++#ifdef JP_CHARSET ++ if (parsedtag_get_value(tag, ATTR_ACCEPT_CHARSET, &r)) ++ cs = check_accept_charset(r); ++ if (! cs && parsedtag_get_value(tag, ATTR_CHARSET, &r)) ++ cs = check_charset(r); ++#endif + s = NULL; + parsedtag_get_value(tag, ATTR_ENCTYPE, &s); + tg = NULL; + parsedtag_get_value(tag, ATTR_TARGET, &tg); +- if (!r) r = acs; + form_max++; + form_sp++; + if (forms_size == 0) { +@@ -2611,7 +2622,7 @@ + forms = New_Reuse(FormList *, forms, forms_size); + } + forms[form_max] = +- newFormList(q, p, r, s, tg, (form_max > 0) ? forms[form_max - 1] : NULL); ++ newFormList(q, p, &cs, s, tg, (form_max > 0) ? forms[form_max - 1] : NULL); + form_stack[form_sp] = form_max; + + return NULL; +@@ -3515,6 +3526,7 @@ + Anchor *a_href = NULL, *a_img = NULL, *a_form = NULL; + char outc[LINELEN]; + char *p, *q, *r, *str; ++ char cs; + Lineprop outp[LINELEN], mode, effect; + int pos; + int nlines; +@@ -3731,13 +3743,16 @@ + case HTML_FORM_INT: + p = "get"; + q = "/"; +- r = NULL; + s = NULL; ++ cs = 0; + parsedtag_get_value(tag, ATTR_METHOD, &p); + parsedtag_get_value(tag, ATTR_ACTION, &q); +- parsedtag_get_value(tag, ATTR_CHARSET, &r); ++#ifdef JP_CHARSET ++ if (parsedtag_get_value(tag, ATTR_CHARSET, &r)) ++ cs = check_charset(r); ++#endif + parsedtag_get_value(tag, ATTR_ENCTYPE, &s); +- buf->formlist = newFormList(q, p, r, s, buf->formlist); ++ buf->formlist = newFormList(q, p, &cs, s, buf->formlist); + form_sp++; + form_stack[form_sp] = buf->formlist; + break; + diff -urN w3m.old/files/patch-aw w3m/files/patch-aw --- w3m.old/files/patch-aw Thu Jan 1 09:00:00 1970 +++ w3m/files/patch-aw Fri Dec 8 22:13:52 2000 @@ -0,0 +1,160 @@ +diff -Nru --exclude config.h --exclude XXMakefile --exclude tagtable.c ../w3m-0.1.11-pre/etc.c ./etc.c +--- ../w3m-0.1.11-pre/etc.c Fri Dec 8 01:14:57 2000 ++++ ./etc.c Fri Dec 8 01:28:24 2000 +@@ -277,7 +277,7 @@ + int do_copy = FALSE; + int size = (len < s->length) ? len : s->length; + +- if (ShowEffect && (bs = memchr(str, '\b', s->length)) || ++ if ((ShowEffect && (bs = memchr(str, '\b', s->length))) || + s->length > size) { + s = Strnew_size(size); + do_copy = TRUE; +diff -Nru --exclude config.h --exclude XXMakefile --exclude tagtable.c ../w3m-0.1.11-pre/file.c ./file.c +--- ../w3m-0.1.11-pre/file.c Fri Dec 8 01:15:31 2000 ++++ ./file.c Fri Dec 8 01:27:33 2000 +@@ -230,8 +230,8 @@ + static int + is_plain_text_type(char *type) + { +- return (type && strcasecmp(type, "text/plain") == 0 || +- is_text_type(type) && !is_dump_text_type(type)); ++ return (type && (strcasecmp(type, "text/plain") == 0 || ++ (is_text_type(type) && !is_dump_text_type(type)))); + } + + static void +@@ -326,7 +326,7 @@ + uf->guess_type = "text/plain"; + if (strcasecmp(uf->guess_type, "text/html") == 0) + return; +- if (fp = lessopen_stream(path)) { ++ if ((fp = lessopen_stream(path)) != NULL) { + UFclose(uf); + uf->stream = newFileStream(fp, (void (*)()) pclose); + uf->guess_type = "text/plain"; +@@ -3479,6 +3479,7 @@ + s = Sprintf("<A HREF=\"%s\">applet archive(%s)</A>", q, q); + HTMLlineproc1(s->ptr, h_env); + } ++ } + return 1; + #endif /* VIEW_UNSEENOBJECTS */ + case HTML_BODY: +@@ -4162,12 +4163,12 @@ + return; + } + q = h_env->tagbuf->ptr; +- if (tag = parse_tag(&q, internal)) ++ if ((tag = parse_tag(&q, internal)) != NULL) + cmd = tag->tagid; + else + cmd = HTML_UNKNOWN; +- if (obuf->flag & RB_XMPMODE && cmd != HTML_N_XMP || +- obuf->flag & RB_LSTMODE && cmd != HTML_N_LISTING) { ++ if (((obuf->flag & RB_XMPMODE) && cmd != HTML_N_XMP) || ++ ((obuf->flag & RB_LSTMODE) && cmd != HTML_N_LISTING)) { + Str tmp = Strdup(h_env->tagbuf); + Strcat_charp(tmp, str); + str = tmp->ptr; +diff -Nru --exclude config.h --exclude XXMakefile --exclude tagtable.c ../w3m-0.1.11-pre/istream.c ./istream.c +--- ../w3m-0.1.11-pre/istream.c Fri Dec 8 01:14:47 2000 ++++ ./istream.c Fri Dec 8 01:32:01 2000 +@@ -193,7 +193,7 @@ + do_update(base); + } + else { +- if (p = memchr(&sb->buf[sb->cur], '\n', sb->next - sb->cur)) { ++ if ((p = memchr(&sb->buf[sb->cur], '\n', sb->next - sb->cur)) != NULL) { + len = p - &sb->buf[sb->cur] + 1; + if (s == NULL) + s = Strnew_size(len); +diff -Nru --exclude config.h --exclude XXMakefile --exclude tagtable.c ../w3m-0.1.11-pre/mailcap.c ./mailcap.c +--- ../w3m-0.1.11-pre/mailcap.c Fri Dec 8 01:14:57 2000 ++++ ./mailcap.c Fri Dec 8 01:30:13 2000 +@@ -242,7 +242,7 @@ + goto no_user_mailcap; + + for (i = 0; i < mailcap_list->nitem; i++) { +- if (p = searchMailcap(UserMailcap[i], type)) ++ if ((p = searchMailcap(UserMailcap[i], type)) != NULL) + return p; + } + +diff -Nru --exclude config.h --exclude XXMakefile --exclude tagtable.c ../w3m-0.1.11-pre/parsetagx.c ./parsetagx.c +--- ../w3m-0.1.11-pre/parsetagx.c Fri Dec 8 01:14:57 2000 ++++ ./parsetagx.c Fri Dec 8 01:31:27 2000 +@@ -118,8 +118,8 @@ + + tag_id = getHash_si(&tagtable, tagname, HTML_UNKNOWN); + +- if (tag_id == HTML_UNKNOWN || +- !internal && TagMAP[tag_id].flag & TFLG_INT) ++ if ((tag_id == HTML_UNKNOWN) || ++ (!internal && (TagMAP[tag_id].flag & TFLG_INT))) + goto skip_parse_tagarg; + + tag = New(struct parsed_tag); +@@ -189,9 +189,9 @@ + } + if (i != nattr) { + if (!internal && +- (AttrMAP[attr_id].flag & AFLG_INT || +- value && AttrMAP[attr_id].vtype == VTYPE_METHOD && +- !strcasecmp(value->ptr, "internal"))) { ++ ((AttrMAP[attr_id].flag & AFLG_INT) || ++ (value && AttrMAP[attr_id].vtype == VTYPE_METHOD && ++ !strcasecmp(value->ptr, "internal")))) { + tag->need_reconstruct = TRUE; + continue; + } +diff -Nru --exclude config.h --exclude XXMakefile --exclude tagtable.c ../w3m-0.1.11-pre/table.c ./table.c +--- ../w3m-0.1.11-pre/table.c Fri Dec 8 01:14:57 2000 ++++ ./table.c Fri Dec 8 01:29:24 2000 +@@ -758,7 +758,7 @@ + int id = -1; + char *p = l->ptr; + struct parsed_tag *tag; +- if (tag = parse_tag(&p, TRUE)) ++ if ((tag = parse_tag(&p, TRUE)) != NULL) + parsedtag_get_value(tag, ATTR_TID, &id); + if (id >= 0 && id < tbl->ntable) { + int alignment; +@@ -1199,8 +1199,8 @@ + if (dmax > 0. && dmin > dmax) + dmin = dmax; + span = ecol - bcol; +- if (span == t->maxcol + 1 && dmin >= 0. || +- span != t->maxcol + 1 && dmin > rulewidth * 0.5) { ++ if ((span == t->maxcol + 1 && dmin >= 0.) || ++ (span != t->maxcol + 1 && dmin > rulewidth * 0.5)) { + int nwidth = ceil_at_intervals(round(owidth - dmin), rulewidth); + correct_table_matrix(t, bcol, ecol - bcol, nwidth, 1.); + corr++; +@@ -2425,11 +2425,11 @@ + + if ( + #ifdef MENU_SELECT +- mode->pre_mode & TBLM_INSELECT && cmd != HTML_N_SELECT || ++ (mode->pre_mode & TBLM_INSELECT && cmd != HTML_N_SELECT) || + #endif /* MENU_SELECT */ +- mode->pre_mode & TBLM_INTXTA && cmd != HTML_N_TEXTAREA || +- mode->pre_mode & TBLM_XMP && cmd != HTML_N_XMP || +- mode->pre_mode & TBLM_LST && cmd != HTML_N_LISTING) ++ (mode->pre_mode & TBLM_INTXTA && cmd != HTML_N_TEXTAREA) || ++ (mode->pre_mode & TBLM_XMP && cmd != HTML_N_XMP) || ++ (mode->pre_mode & TBLM_LST && cmd != HTML_N_LISTING)) + return TAG_ACTION_FEED; + + if (mode->pre_mode & TBLM_PRE) { +diff -Nru --exclude config.h --exclude XXMakefile --exclude tagtable.c ../w3m-0.1.11-pre/url.c ./url.c +--- ../w3m-0.1.11-pre/url.c Fri Dec 8 01:14:57 2000 ++++ ./url.c Fri Dec 8 01:30:29 2000 +@@ -1502,7 +1502,7 @@ + goto no_user_mimetypes; + + for (i = 0; i < mimetypes_list->nitem; i++) { +- if (ret = guessContentTypeFromTable(UserMimeTypes[i], filename)) ++ if ((ret = guessContentTypeFromTable(UserMimeTypes[i], filename)) != NULL) + return ret; + } diff -urN w3m.old/files/patch-ax w3m/files/patch-ax --- w3m.old/files/patch-ax Thu Jan 1 09:00:00 1970 +++ w3m/files/patch-ax Fri Dec 8 22:14:50 2000 @@ -0,0 +1,98 @@ +diff -u -r1.46 file.c +--- file.c 2000/12/07 15:31:25 1.46 ++++ file.c 2000/12/07 15:38:00 +@@ -3244,12 +3244,16 @@ + y = 1; + z = 0; + width = 0; +- if (parsedtag_get_value(tag, ATTR_BORDER, &w)) { +- if (w > 2) +- w = BORDER_THICK; +- else if (w < 0) { /* weird */ +- w = BORDER_THIN; ++ if (parsedtag_exists(tag, ATTR_BORDER)) { ++ if (parsedtag_get_value(tag, ATTR_BORDER, &w)) { ++ if (w > 2) ++ w = BORDER_THICK; ++ else if (w < 0) { /* weird */ ++ w = BORDER_THIN; ++ } + } ++ else ++ w = BORDER_THIN; + } + if (parsedtag_get_value(tag, ATTR_WIDTH, &i)) { + if (obuf->table_level == 0) +Index: html.c +=================================================================== +RCS file: /home/okabe/CVS_DB/w3m/html.c,v +retrieving revision 1.5 +diff -u -r1.5 html.c +--- html.c 2000/12/07 08:05:24 1.5 ++++ html.c 2000/12/07 15:39:36 +@@ -276,7 +276,7 @@ + {"fid" , VTYPE_NUMBER, AFLG_INT}, /* 54 ATTR_FID */ + {"for_table" , VTYPE_NONE, AFLG_INT}, /* 55 ATTR_FOR_TABLE */ + {"framename" , VTYPE_STR, AFLG_INT}, /* 56 ATTR_FRAMENAME */ +- {"hborder" , VTYPE_NONE, AFLG_INT}, /* 57 ATTR_HBORDER */ ++ {"hborder" , VTYPE_NONE, 0}, /* 57 ATTR_HBORDER */ + {"hseq" , VTYPE_NUMBER, AFLG_INT}, /* 58 ATTR_HSEQ */ + {"no_effect" , VTYPE_NONE, AFLG_INT}, /* 59 ATTR_NO_EFFECT */ + {"referer" , VTYPE_STR, AFLG_INT}, /* 60 ATTR_REFERER */ +Index: parsetagx.c +=================================================================== +RCS file: /home/okabe/CVS_DB/w3m/parsetagx.c,v +retrieving revision 1.1.2.3 +retrieving revision 1.6 +diff -u -r1.1.2.3 -r1.6 +--- parsetagx.c 2000/12/07 08:04:47 1.1.2.3 ++++ parsetagx.c 2000/12/07 15:54:21 1.6 +@@ -195,13 +195,11 @@ + tag->need_reconstruct = TRUE; + continue; + } +- if (AttrMAP[attr_id].vtype == VTYPE_NONE || value) { +- tag->attrid[i] = attr_id; +- if (value) +- tag->value[i] = cleanup_str(value->ptr); +- else +- tag->value[i] = NULL; +- } ++ tag->attrid[i] = attr_id; ++ if (value) ++ tag->value[i] = cleanup_str(value->ptr); ++ else ++ tag->value[i] = NULL; + } + } + +@@ -224,14 +222,12 @@ + return 0; + + i = tag->map[id]; +- if (AttrMAP[id].vtype == VTYPE_NONE || value) { +- tag->attrid[i] = id; +- if (value) +- tag->value[i] = allocStr(value, 0); +- else +- tag->value[i] = NULL; +- return 1; +- } ++ tag->attrid[i] = id; ++ if (value) ++ tag->value[i] = allocStr(value, 0); ++ else ++ tag->value[i] = NULL; ++ return 1; + return 0; + } + +@@ -255,7 +251,7 @@ + Strcat_char(tagstr, '<'); + Strcat_charp(tagstr, tag->tagname); + for (i = 0; i < nattr; i++) { +- if (parsedtag_exists(tag, TagMAP[tag_id].accept_attribute[i])) { ++ if (tag->attrid[i] != ATTR_UNKNOWN) { + Strcat_char(tagstr, ' '); + Strcat_charp(tagstr, AttrMAP[tag->attrid[i]].name); + if (tag->value[i]) diff -urN w3m.old/files/patch-ay w3m/files/patch-ay --- w3m.old/files/patch-ay Thu Jan 1 09:00:00 1970 +++ w3m/files/patch-ay Fri Dec 8 22:24:29 2000 @@ -0,0 +1,12 @@ +--- frame.c.orig Fri Dec 8 22:21:42 2000 ++++ frame.c Fri Dec 8 22:21:58 2000 +@@ -426,9 +426,7 @@ + int r, c, status, t_stack; + InputStream f2; + Str tmp, tok; +-#ifdef JP_CHARSET + char code, ic, charset[2]; +-#endif /* JP_CHARSET */ + char *d_target, *p_target, *s_target, *t_target; + ParsedURL *currentURL, base; + MySignalHandler(*prevtrap) (SIGNAL_ARG) = NULL; diff -urN w3m.old/pkg-plist.ja w3m/pkg-plist.ja --- w3m.old/pkg-plist.ja Sat Dec 9 05:27:29 2000 +++ w3m/pkg-plist.ja Wed Nov 29 23:44:30 2000 @@ -7,10 +7,12 @@ share/doc/ja/w3m/HISTORY.kokb share/doc/ja/w3m/MANUAL.html share/doc/ja/w3m/README +share/doc/ja/w3m/README.SSL +share/doc/ja/w3m/README.cookie share/doc/ja/w3m/README.dict share/doc/ja/w3m/README.func share/doc/ja/w3m/README.keymap -share/doc/ja/w3m/README.kokb +share/doc/ja/w3m/README.mailcap share/doc/ja/w3m/README.menu share/doc/ja/w3m/STORY.html share/doc/ja/w3m/keymap.default >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012082106.eB8L6pN69411>