diff options
author | roam <roam@FreeBSD.org> | 2000-12-11 00:05:18 +0800 |
---|---|---|
committer | roam <roam@FreeBSD.org> | 2000-12-11 00:05:18 +0800 |
commit | 655f6bfb73666cca6ec3122fe45fcf0acd65487b (patch) | |
tree | c21dfca3ef06f21630142b66054af9f9c096d0ac /www/w3m/files | |
parent | 9291d62690027c15ba8cca0a7e80c6d1429fe365 (diff) | |
download | freebsd-ports-gnome-655f6bfb73666cca6ec3122fe45fcf0acd65487b.tar.gz freebsd-ports-gnome-655f6bfb73666cca6ec3122fe45fcf0acd65487b.tar.zst freebsd-ports-gnome-655f6bfb73666cca6ec3122fe45fcf0acd65487b.zip |
Update to 0.1.11-pre + kokb patchlevel 23
PR: 23393
Submitted by: maintainer
Diffstat (limited to 'www/w3m/files')
-rw-r--r-- | www/w3m/files/patch-av | 156 | ||||
-rw-r--r-- | www/w3m/files/patch-aw | 160 | ||||
-rw-r--r-- | www/w3m/files/patch-ax | 98 | ||||
-rw-r--r-- | www/w3m/files/patch-ay | 12 |
4 files changed, 426 insertions, 0 deletions
diff --git a/www/w3m/files/patch-av b/www/w3m/files/patch-av new file mode 100644 index 000000000000..624e49717155 --- /dev/null +++ b/www/w3m/files/patch-av @@ -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 --git a/www/w3m/files/patch-aw b/www/w3m/files/patch-aw new file mode 100644 index 000000000000..848f9b68f5cc --- /dev/null +++ b/www/w3m/files/patch-aw @@ -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 --git a/www/w3m/files/patch-ax b/www/w3m/files/patch-ax new file mode 100644 index 000000000000..d1d04cde968f --- /dev/null +++ b/www/w3m/files/patch-ax @@ -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 --git a/www/w3m/files/patch-ay b/www/w3m/files/patch-ay new file mode 100644 index 000000000000..6591f60bccf5 --- /dev/null +++ b/www/w3m/files/patch-ay @@ -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; |