diff options
Diffstat (limited to 'debian/patches/020_debian.patch')
-rw-r--r-- | debian/patches/020_debian.patch | 336 |
1 files changed, 257 insertions, 79 deletions
diff --git a/debian/patches/020_debian.patch b/debian/patches/020_debian.patch index 913ae4a..feac350 100644 --- a/debian/patches/020_debian.patch +++ b/debian/patches/020_debian.patch @@ -60,10 +60,38 @@ index 8f443c1..5fb6581 100755 $input = "w3m-control: GOTO_LINK"; } diff --git a/ChangeLog b/ChangeLog -index 88358ef..ba22b4c 100644 +index 88358ef..3556b40 100644 --- a/ChangeLog +++ b/ChangeLog -@@ -1,3 +1,785 @@ +@@ -1,3 +1,814 @@ ++2015-10-10 Tatsuya Kinoshita <tats@debian.org> ++ ++ * cookie.c: Remove incomplete special_domain tests. ++ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=385702 ++ ++2015-10-04 Gaetan Bisson <bisson@archlinux.org> ++ ++ * scripts/w3mhelp.cgi.in: Do not use defined(%hash). ++ Origin: https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/w3m&id=d9e0a4f0b461c9e2177cd9e64a10581386650503 ++ Bug-Arch: https://bugs.archlinux.org/task/45608 ++ ++2015-09-06 Tatsuya Kinoshita <tats@debian.org> ++ ++ * file.c: Do not use C99-style comments. ++ ++2015-09-06 David Crosby <dave@dafyddcrosby.com> ++ ++ * file.c: Mitigate issue #16 found by @kcwu. ++ * table.c: Fix stack overflow found by @kcwu. ++ Origin: https://github.com/dafyddcrosby/sw3m ++ Bug-sw3m: https://github.com/dafyddcrosby/sw3m/issues/16 ++ ++2015-08-21 Tatsuya Kinoshita <tats@debian.org> ++ ++ * doc-jp/keymap.lynx, doc/keymap.lynx: Fix unknown key. ++ Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/w3m/+bug/265144 ++ Bug: https://sourceforge.net/p/w3m/bugs/48/ ++ +2015-08-11 David Crosby <dave@dafyddcrosby.com> + + Fix resource leaks, dead assignments, divide-by-zero, and so on. @@ -171,6 +199,7 @@ index 88358ef..ba22b4c 100644 + * main.c: Fix that SGR style mouse handler has off-by-one problem. + cf. https://github.com/tats/w3m/issues/5 + Origin: https://gist.github.com/ttdoda/30c189a63d483beeb207 ++ Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/w3m/+bug/1390768 + Bug: https://sourceforge.net/p/w3m/patches/65/ + +2015-07-31 yshl <yshl@takechiyo.net> @@ -4273,7 +4302,7 @@ index 4c1bc06..c721825 100755 ac_config_files="$ac_config_files Makefile posubst po/Makefile.in scripts/Makefile scripts/dirlist.cgi scripts/w3mhelp.cgi scripts/w3mmail.cgi scripts/xface2xpm scripts/multipart/Makefile scripts/multipart/multipart.cgi scripts/w3mman/Makefile scripts/w3mman/w3mman scripts/w3mman/w3mman.1 scripts/w3mman/w3mman2html.cgi libwc/Makefile w3mimg/Makefile w3mimg/fb/Makefile w3mimg/x11/Makefile w3mimg/win/Makefile w3mhelp-w3m_en.html w3mhelp-w3m_ja.html w3mhelp-lynx_en.html w3mhelp-lynx_ja.html" diff --git a/cookie.c b/cookie.c -index 8020f6d..8a6f447 100644 +index 8020f6d..705e277 100644 --- a/cookie.c +++ b/cookie.c @@ -22,10 +22,10 @@ static int is_saved = 1; @@ -4298,7 +4327,7 @@ index 8020f6d..8a6f447 100644 return first; } -@@ -247,7 +248,7 @@ find_cookie(ParsedURL *pu) +@@ -247,16 +248,12 @@ find_cookie(ParsedURL *pu) Strcat(tmp, Sprintf("; $Domain=\"%s\"", p1->domain->ptr)); if (p1->portl) Strcat(tmp, @@ -4307,7 +4336,16 @@ index 8020f6d..8a6f447 100644 } } return tmp; -@@ -324,7 +325,7 @@ add_cookie(ParsedURL *pu, Str name, Str value, + } + +-char *special_domain[] = { +- ".com", ".edu", ".gov", ".mil", ".net", ".org", ".int", NULL +-}; +- + int + check_avoid_wrong_number_of_dots_domain( Str domain ) + { +@@ -324,7 +321,7 @@ add_cookie(ParsedURL *pu, Str name, Str value, if (version == 0) { /* [NETSCAPE] rule */ @@ -4316,7 +4354,27 @@ index 8020f6d..8a6f447 100644 domain->ptr + domain->length, 3); if (n < 2) { -@@ -463,7 +464,7 @@ save_cookies(void) +@@ -332,19 +329,6 @@ add_cookie(ParsedURL *pu, Str name, Str value, + 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 && ! check_avoid_wrong_number_of_dots_domain(domain)) { +- COOKIE_ERROR(COO_ESPECIAL); +- } +- } + } + else { + /* [DRAFT 12] s. 4.3.2 case 2 */ +@@ -463,7 +447,7 @@ save_cookies(void) continue; fprintf(fp, "%s\t%s\t%s\t%ld\t%s\t%s\t%d\t%d\t%s\t%s\t%s\n", parsedURL2Str(&p->url)->ptr, @@ -4325,7 +4383,7 @@ index 8020f6d..8a6f447 100644 p->domain->ptr, p->path->ptr, p->flag, p->version, str2charp(p->comment), (p->portl) ? portlist2str(p->portl)->ptr : "", -@@ -517,36 +518,36 @@ load_cookies(void) +@@ -517,36 +501,36 @@ load_cookies(void) cookie->commentURL = NULL; parseURL(readcol(&str)->ptr, &cookie->url, NULL); if (!*str) @@ -4607,6 +4665,19 @@ index 0000000..90066f7 +http://www.example.com/ABC/ + +ただし、ホスト名の部分は常に小文字に変換してから比較します。 +diff --git a/doc-jp/keymap.lynx b/doc-jp/keymap.lynx +index 869c716..e4085c8 100644 +--- a/doc-jp/keymap.lynx ++++ b/doc-jp/keymap.lynx +@@ -46,7 +46,7 @@ keymap - PREV_PAGE + keymap . RIGHT + keymap / SEARCH + keymap : MARK_URL +-keymap ; MARK_WORD ++keymap ";" MARK_WORD + keymap < SHIFT_LEFT + keymap = INFO + keymap > SHIFT_RIGHT diff --git a/doc-jp/w3m.1 b/doc-jp/w3m.1 index 89aacb6..099a803 100644 --- a/doc-jp/w3m.1 @@ -4897,6 +4968,19 @@ index 0000000..588afc4 + environmental variable. + + $ W3M_IMG2SIXEL="img2sixel -d atkinson" w3m -sixel http://... +diff --git a/doc/keymap.lynx b/doc/keymap.lynx +index 869c716..e4085c8 100644 +--- a/doc/keymap.lynx ++++ b/doc/keymap.lynx +@@ -46,7 +46,7 @@ keymap - PREV_PAGE + keymap . RIGHT + keymap / SEARCH + keymap : MARK_URL +-keymap ; MARK_WORD ++keymap ";" MARK_WORD + keymap < SHIFT_LEFT + keymap = INFO + keymap > SHIFT_RIGHT diff --git a/doc/w3m.1 b/doc/w3m.1 index 8f071c6..0762f51 100644 --- a/doc/w3m.1 @@ -5407,10 +5491,19 @@ index 8fe1215..dcc6edd 100644 QuietMessage = TRUE; fmInitialized = FALSE; diff --git a/file.c b/file.c -index 567d41e..4e8e4d3 100644 +index 567d41e..9d1dc9a 100644 --- a/file.c +++ b/file.c -@@ -47,11 +47,11 @@ static JMP_BUF AbortLoading; +@@ -26,6 +26,8 @@ + #define min(a,b) ((a) > (b) ? (b) : (a)) + #endif /* not min */ + ++#define MAX_INPUT_SIZE 80 /* TODO - max should be screen line length */ ++ + static int frame_source = 0; + + static char *guess_filename(char *file); +@@ -47,11 +49,11 @@ static JMP_BUF AbortLoading; static struct table *tables[MAX_TABLE]; static struct table_mode table_mode[MAX_TABLE]; @@ -5425,7 +5518,7 @@ index 567d41e..4e8e4d3 100644 #endif static Str cur_title; -@@ -215,7 +215,6 @@ currentLn(Buffer *buf) +@@ -215,7 +217,6 @@ currentLn(Buffer *buf) static Buffer * loadSomething(URLFile *f, @@ -5433,7 +5526,7 @@ index 567d41e..4e8e4d3 100644 Buffer *(*loadproc) (URLFile *, Buffer *), Buffer *defaultbuf) { Buffer *buf; -@@ -223,17 +222,23 @@ loadSomething(URLFile *f, +@@ -223,17 +224,23 @@ loadSomething(URLFile *f, if ((buf = loadproc(f, defaultbuf)) == NULL) return NULL; @@ -5462,7 +5555,7 @@ index 567d41e..4e8e4d3 100644 return buf; } -@@ -484,28 +489,6 @@ convertLine0(URLFile *uf, Str line, int mode) +@@ -484,28 +491,6 @@ convertLine0(URLFile *uf, Str line, int mode) return line; } @@ -5491,7 +5584,7 @@ index 567d41e..4e8e4d3 100644 int matchattr(char *p, char *attr, int len, Str *value) { -@@ -694,6 +677,7 @@ readHeader(URLFile *uf, Buffer *newBuf, int thru, ParsedURL *pu) +@@ -694,6 +679,7 @@ readHeader(URLFile *uf, Buffer *newBuf, int thru, ParsedURL *pu) #endif init_stream(&f, SCM_LOCAL, newStrStream(src)); loadHTMLstream(&f, newBuf, NULL, TRUE); @@ -5499,7 +5592,7 @@ index 567d41e..4e8e4d3 100644 for (l = newBuf->lastLine; l && l->real_linenumber; l = l->prev) l->real_linenumber = 0; -@@ -1244,6 +1228,7 @@ AuthDigestCred(struct http_auth *ha, Str uname, Str pw, ParsedURL *pu, +@@ -1244,6 +1230,7 @@ AuthDigestCred(struct http_auth *ha, Str uname, Str pw, ParsedURL *pu, unsigned char md5[MD5_DIGEST_LENGTH + 1]; Str uri = HTTPrequestURI(pu, hr); char nc[] = "00000001"; @@ -5507,7 +5600,7 @@ index 567d41e..4e8e4d3 100644 Str algorithm = qstr_unquote(get_auth_param(ha->param, "algorithm")); Str nonce = qstr_unquote(get_auth_param(ha->param, "nonce")); -@@ -1326,10 +1311,11 @@ AuthDigestCred(struct http_auth *ha, Str uname, Str pw, ParsedURL *pu, +@@ -1326,10 +1313,11 @@ AuthDigestCred(struct http_auth *ha, Str uname, Str pw, ParsedURL *pu, /* A2 = Method ":" digest-uri-value ":" H(entity-body) */ if (request && request->body) { if (request->method == FORM_METHOD_POST && request->enctype == FORM_ENCTYPE_MULTIPART) { @@ -5520,7 +5613,7 @@ index 567d41e..4e8e4d3 100644 MD5(ebody->ptr, strlen(ebody->ptr), md5); } else { -@@ -1697,13 +1683,15 @@ getLinkNumberStr(int correction) +@@ -1697,13 +1685,15 @@ getLinkNumberStr(int correction) /* * loadGeneralFile: load file to buffer */ @@ -5537,7 +5630,7 @@ index 567d41e..4e8e4d3 100644 char *volatile tpath; char *volatile t = "text/plain", *p, *volatile real_type = NULL; Buffer *volatile t_buf = NULL; -@@ -1730,7 +1718,22 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, +@@ -1730,7 +1720,22 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, add_auth_cookie_flag = 0; checkRedirection(NULL); @@ -5560,7 +5653,7 @@ index 567d41e..4e8e4d3 100644 TRAP_OFF; url_option.referer = referer; url_option.flag = flag; -@@ -1863,7 +1866,7 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, +@@ -1863,7 +1868,7 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, /* 302: Found */ /* 303: See Other */ /* 307: Temporary Redirect (HTTP/1.1) */ @@ -5569,7 +5662,7 @@ index 567d41e..4e8e4d3 100644 request = NULL; UFclose(&f); current = New(ParsedURL); -@@ -2022,7 +2025,7 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, +@@ -2022,7 +2027,7 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, if (f.is_cgi && (p = checkHeader(t_buf, "Location:")) != NULL && checkRedirection(&pu)) { /* document moved */ @@ -5578,7 +5671,7 @@ index 567d41e..4e8e4d3 100644 request = NULL; UFclose(&f); add_auth_cookie_flag = 0; -@@ -2123,10 +2126,6 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, +@@ -2123,10 +2128,6 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, if (real_type == NULL) real_type = t; proc = loadBuffer; @@ -5589,7 +5682,7 @@ index 567d41e..4e8e4d3 100644 current_content_length = 0; if ((p = checkHeader(t_buf, "Content-Length:")) != NULL) -@@ -2197,18 +2196,8 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, +@@ -2197,18 +2198,8 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, #endif else if (w3m_backend) ; else if (!(w3m_dump & ~DUMP_FRAME) || is_dump_text_type(t)) { @@ -5610,7 +5703,7 @@ index 567d41e..4e8e4d3 100644 } else { TRAP_OFF; -@@ -2232,36 +2221,30 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, +@@ -2232,36 +2223,30 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, else if (w3m_dump & DUMP_FRAME) return NULL; @@ -5661,7 +5754,7 @@ index 567d41e..4e8e4d3 100644 if (pu.label) { if (proc == loadHTMLBuffer) { Anchor *a; -@@ -2287,10 +2270,11 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, +@@ -2287,10 +2272,11 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, if (header_string) header_string = NULL; #ifdef USE_NNTP @@ -5675,7 +5768,7 @@ index 567d41e..4e8e4d3 100644 TRAP_OFF; return b; } -@@ -2469,6 +2453,7 @@ set_breakpoint(struct readbuffer *obuf, int tag_length) +@@ -2469,6 +2455,7 @@ set_breakpoint(struct readbuffer *obuf, int tag_length) bcopy((void *)&obuf->anchor, (void *)&obuf->bp.anchor, sizeof(obuf->anchor)); obuf->bp.img_alt = obuf->img_alt; @@ -5683,7 +5776,7 @@ index 567d41e..4e8e4d3 100644 obuf->bp.in_bold = obuf->in_bold; obuf->bp.in_italic = obuf->in_italic; obuf->bp.in_under = obuf->in_under; -@@ -2486,6 +2471,7 @@ back_to_breakpoint(struct readbuffer *obuf) +@@ -2486,6 +2473,7 @@ back_to_breakpoint(struct readbuffer *obuf) bcopy((void *)&obuf->bp.anchor, (void *)&obuf->anchor, sizeof(obuf->anchor)); obuf->img_alt = obuf->bp.img_alt; @@ -5691,7 +5784,7 @@ index 567d41e..4e8e4d3 100644 obuf->in_bold = obuf->bp.in_bold; obuf->in_italic = obuf->bp.in_italic; obuf->in_under = obuf->bp.in_under; -@@ -2729,7 +2715,7 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent, +@@ -2729,7 +2717,7 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent, Str line = obuf->line, pass = NULL; char *hidden_anchor = NULL, *hidden_img = NULL, *hidden_bold = NULL, *hidden_under = NULL, *hidden_italic = NULL, *hidden_strike = NULL, @@ -5700,7 +5793,7 @@ index 567d41e..4e8e4d3 100644 #ifdef DEBUG if (w3m_debug) { -@@ -2761,6 +2747,12 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent, +@@ -2761,6 +2749,12 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent, hidden = hidden_img; } } @@ -5713,7 +5806,7 @@ index 567d41e..4e8e4d3 100644 if (obuf->in_bold) { if ((hidden_bold = has_hidden_link(obuf, HTML_B)) != NULL) { if (!hidden || hidden_bold < hidden) -@@ -2812,6 +2804,8 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent, +@@ -2812,6 +2806,8 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent, Strcat_charp(line, "</a>"); if (obuf->img_alt && !hidden_img) Strcat_charp(line, "</img_alt>"); @@ -5722,7 +5815,7 @@ index 567d41e..4e8e4d3 100644 if (obuf->in_bold && !hidden_bold) Strcat_charp(line, "</b>"); if (obuf->in_italic && !hidden_italic) -@@ -3022,6 +3016,18 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent, +@@ -3022,6 +3018,18 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent, Strcat_charp(tmp, "\">"); push_tag(obuf, tmp->ptr, HTML_IMG_ALT); } @@ -5741,7 +5834,7 @@ index 567d41e..4e8e4d3 100644 if (!hidden_bold && obuf->in_bold) push_tag(obuf, "<B>", HTML_B); if (!hidden_italic && obuf->in_italic) -@@ -3228,7 +3234,7 @@ process_img(struct parsed_tag *tag, int width) +@@ -3228,7 +3236,7 @@ process_img(struct parsed_tag *tag, int width) if (!parsedtag_get_value(tag, ATTR_SRC, &p)) return tmp; @@ -5750,7 +5843,7 @@ index 567d41e..4e8e4d3 100644 q = NULL; parsedtag_get_value(tag, ATTR_ALT, &q); if (!pseudoInlines && (q == NULL || (*q == '\0' && ignore_null_img_alt))) -@@ -3322,12 +3328,7 @@ process_img(struct parsed_tag *tag, int width) +@@ -3322,12 +3330,7 @@ process_img(struct parsed_tag *tag, int width) Image image; ParsedURL u; @@ -5763,7 +5856,7 @@ index 567d41e..4e8e4d3 100644 image.url = parsedURL2Str(&u)->ptr; if (!uncompressed_file_type(u.file, &image.ext)) image.ext = filename_extension(u.file, TRUE); -@@ -3346,8 +3347,14 @@ process_img(struct parsed_tag *tag, int width) +@@ -3346,8 +3349,14 @@ process_img(struct parsed_tag *tag, int width) if (i < 0) i = pixel_per_line; } @@ -5780,7 +5873,7 @@ index 567d41e..4e8e4d3 100644 Strcat(tmp, Sprintf("<pre_int><img_alt hseq=\"%d\" src=\"", cur_iseq++)); pre_int = TRUE; -@@ -3378,19 +3385,21 @@ process_img(struct parsed_tag *tag, int width) +@@ -3378,19 +3387,21 @@ process_img(struct parsed_tag *tag, int width) if (i0 >= 0) Strcat(tmp, Sprintf(" height=%d", i0)); switch (align) { @@ -5810,7 +5903,7 @@ index 567d41e..4e8e4d3 100644 case ALIGN_BOTTOM: top = ni - 1; bottom = 0; -@@ -3408,7 +3417,12 @@ process_img(struct parsed_tag *tag, int width) +@@ -3408,7 +3419,12 @@ process_img(struct parsed_tag *tag, int width) } break; } @@ -5824,7 +5917,61 @@ index 567d41e..4e8e4d3 100644 if (xoffset) Strcat(tmp, Sprintf(" xoffset=%d", xoffset)); if (yoffset) -@@ -3732,6 +3746,63 @@ process_input(struct parsed_tag *tag) +@@ -3548,7 +3564,7 @@ process_anchor(struct parsed_tag *tag, char *tagbuf) + Str + process_input(struct parsed_tag *tag) + { +- int i, w, v, x, y, z, iw, ih; ++ int i = 20, v, x, y, z, iw, ih, size = 20; + char *q, *p, *r, *p2, *s; + Str tmp = NULL; + char *qq = ""; +@@ -3567,9 +3583,9 @@ process_input(struct parsed_tag *tag) + parsedtag_get_value(tag, ATTR_VALUE, &q); + r = ""; + parsedtag_get_value(tag, ATTR_NAME, &r); +- w = 20; +- parsedtag_get_value(tag, ATTR_SIZE, &w); +- i = 20; ++ parsedtag_get_value(tag, ATTR_SIZE, &size); ++ if (size > MAX_INPUT_SIZE) ++ size = MAX_INPUT_SIZE; + parsedtag_get_value(tag, ATTR_MAXLENGTH, &i); + p2 = NULL; + parsedtag_get_value(tag, ATTR_ALT, &p2); +@@ -3625,7 +3641,7 @@ process_input(struct parsed_tag *tag) + } + Strcat(tmp, Sprintf("<input_alt hseq=\"%d\" fid=\"%d\" type=%s " + "name=\"%s\" width=%d maxlength=%d value=\"%s\"", +- cur_hseq++, cur_form_id, p, html_quote(r), w, i, qq)); ++ cur_hseq++, cur_form_id, p, html_quote(r), size, i, qq)); + if (x) + Strcat_charp(tmp, " checked"); + if (y) +@@ -3670,18 +3686,18 @@ process_input(struct parsed_tag *tag) + case FORM_INPUT_PASSWORD: + i = 0; + if (q) { +- for (; i < qlen && i < w; i++) ++ for (; i < qlen && i < size; i++) + Strcat_char(tmp, '*'); + } +- for (; i < w; i++) ++ for (; i < size; i++) + Strcat_char(tmp, ' '); + break; + case FORM_INPUT_TEXT: + case FORM_INPUT_FILE: + if (q) +- Strcat(tmp, textfieldrep(Strnew_charp(q), w)); ++ Strcat(tmp, textfieldrep(Strnew_charp(q), size)); + else { +- for (i = 0; i < w; i++) ++ for (i = 0; i < size; i++) + Strcat_char(tmp, ' '); + } + break; +@@ -3732,6 +3748,63 @@ process_input(struct parsed_tag *tag) } Str @@ -5868,7 +6015,7 @@ index 567d41e..4e8e4d3 100644 + qlen = strlen(q); + } + -+ // Strcat_charp(tmp, "<pre_int>"); ++ /* Strcat_charp(tmp, "<pre_int>"); */ + Strcat(tmp, Sprintf("<input_alt hseq=\"%d\" fid=\"%d\" type=%s " + "name=\"%s\" value=\"%s\">", + cur_hseq++, cur_form_id, p, html_quote(r), qq)); @@ -5880,7 +6027,7 @@ index 567d41e..4e8e4d3 100644 +{ + Str tmp = Strnew(); + Strcat_charp(tmp, "</input_alt>"); -+ // Strcat_charp(tmp, "</pre_int>"); ++ /* Strcat_charp(tmp, "</pre_int>"); */ + return tmp; +} + @@ -5888,7 +6035,7 @@ index 567d41e..4e8e4d3 100644 process_select(struct parsed_tag *tag) { Str tmp = NULL; -@@ -4084,6 +4155,7 @@ process_form_int(struct parsed_tag *tag, int fid) +@@ -4084,6 +4157,7 @@ process_form_int(struct parsed_tag *tag, int fid) parsedtag_get_value(tag, ATTR_METHOD, &p); q = "!CURRENT_URL!"; parsedtag_get_value(tag, ATTR_ACTION, &q); @@ -5896,7 +6043,7 @@ index 567d41e..4e8e4d3 100644 r = NULL; #ifdef USE_M17N if (parsedtag_get_value(tag, ATTR_ACCEPT_CHARSET, &r)) -@@ -4284,15 +4356,15 @@ getMetaRefreshParam(char *q, Str *refresh_uri) +@@ -4284,15 +4358,15 @@ getMetaRefreshParam(char *q, Str *refresh_uri) while (*q) { if (!strncasecmp(q, "url=", 4)) { q += 4; @@ -5915,7 +6062,7 @@ index 567d41e..4e8e4d3 100644 s_tmp->length--; s_tmp->ptr[s_tmp->length] = '\0'; } -@@ -4861,7 +4933,35 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) +@@ -4861,7 +4935,35 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) if (i > obuf->bottom_margin) obuf->bottom_margin = i; } @@ -5951,7 +6098,7 @@ index 567d41e..4e8e4d3 100644 case HTML_TABLE: close_anchor(h_env, obuf); obuf->table_level++; -@@ -4884,6 +4984,8 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) +@@ -4884,6 +4986,8 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) else w = BORDER_THIN; } @@ -5960,7 +6107,7 @@ index 567d41e..4e8e4d3 100644 if (parsedtag_get_value(tag, ATTR_WIDTH, &i)) { if (obuf->table_level == 0) width = REAL_WIDTH(i, h_env->limit - envs[h_env->envc].indent); -@@ -4970,6 +5072,16 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) +@@ -4970,6 +5074,16 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) case HTML_INPUT: close_anchor(h_env, obuf); tmp = process_input(tag); @@ -5977,7 +6124,7 @@ index 567d41e..4e8e4d3 100644 if (tmp) HTMLlineproc1(tmp->ptr, h_env); return 1; -@@ -5067,11 +5179,10 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) +@@ -5067,11 +5181,10 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) } return 1; case HTML_BASE: @@ -5991,7 +6138,7 @@ index 567d41e..4e8e4d3 100644 parseURL(p, cur_baseURL, NULL); } #endif -@@ -5329,6 +5440,13 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) +@@ -5329,6 +5442,13 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) #ifdef MENU_SELECT Anchor **a_select = NULL; #endif @@ -6005,7 +6152,7 @@ index 567d41e..4e8e4d3 100644 if (out_size == 0) { out_size = LINELEN; -@@ -5523,16 +5641,17 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) +@@ -5523,16 +5643,17 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) hseq = 0; id = NULL; if (parsedtag_get_value(tag, ATTR_NAME, &id)) { @@ -6027,7 +6174,7 @@ index 567d41e..4e8e4d3 100644 parsedtag_get_value(tag, ATTR_TITLE, &s); parsedtag_get_value(tag, ATTR_ACCESSKEY, &t); parsedtag_get_value(tag, ATTR_HSEQ, &hseq); -@@ -5618,7 +5737,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) +@@ -5618,7 +5739,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) ParsedURL u; Image *image; @@ -6036,7 +6183,7 @@ index 567d41e..4e8e4d3 100644 a_img->image = image = New(Image); image->url = parsedURL2Str(&u)->ptr; if (!uncompressed_file_type(u.file, &image->ext)) -@@ -5639,7 +5758,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) +@@ -5639,7 +5760,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) image->map = q; image->ismap = ismap; image->touch = 0; @@ -6045,7 +6192,7 @@ index 567d41e..4e8e4d3 100644 IMG_FLAG_SKIP); } else if (iseq < 0) { -@@ -5689,6 +5808,21 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) +@@ -5689,6 +5810,21 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) putHmarker(buf->hmarklist, currentLn(buf), hpos, hseq - 1); } @@ -6067,7 +6214,7 @@ index 567d41e..4e8e4d3 100644 if (!form->target) form->target = buf->baseTarget; if (a_textarea && -@@ -5761,8 +5895,8 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) +@@ -5761,8 +5897,8 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) break; if (parsedtag_get_value(tag, ATTR_HREF, &p)) { MapArea *a; @@ -6078,7 +6225,7 @@ index 567d41e..4e8e4d3 100644 t = NULL; parsedtag_get_value(tag, ATTR_TARGET, &t); q = ""; -@@ -5811,11 +5945,14 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) +@@ -5811,11 +5947,14 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) break; case HTML_BASE: if (parsedtag_get_value(tag, ATTR_HREF, &p)) { @@ -6095,7 +6242,7 @@ index 567d41e..4e8e4d3 100644 } if (parsedtag_get_value(tag, ATTR_TARGET, &p)) buf->baseTarget = -@@ -5830,8 +5967,8 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) +@@ -5830,8 +5969,8 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) int refresh_interval = getMetaRefreshParam(q, &tmp); #ifdef USE_ALARM if (tmp) { @@ -6106,7 +6253,7 @@ index 567d41e..4e8e4d3 100644 buf->event = setAlarmEvent(buf->event, refresh_interval, AL_IMPLICIT_ONCE, -@@ -5844,8 +5981,8 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) +@@ -5844,8 +5983,8 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) FUNCNAME_reload, NULL); #else if (tmp && refresh_interval == 0) { @@ -6117,7 +6264,7 @@ index 567d41e..4e8e4d3 100644 pushEvent(FUNCNAME_gorURL, p); } #endif -@@ -5929,7 +6066,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) +@@ -5929,7 +6068,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) #ifdef ID_EXT id = NULL; if (parsedtag_get_value(tag, ATTR_ID, &id)) { @@ -6126,7 +6273,7 @@ index 567d41e..4e8e4d3 100644 registerName(buf, id, currentLn(buf), pos); } if (renderFrameSet && -@@ -5982,7 +6119,8 @@ addLink(Buffer *buf, struct parsed_tag *tag) +@@ -5982,7 +6121,8 @@ addLink(Buffer *buf, struct parsed_tag *tag) parsedtag_get_value(tag, ATTR_HREF, &href); if (href) @@ -6136,7 +6283,7 @@ index 567d41e..4e8e4d3 100644 parsedtag_get_value(tag, ATTR_TITLE, &title); parsedtag_get_value(tag, ATTR_TYPE, &ctype); parsedtag_get_value(tag, ATTR_REL, &rel); -@@ -6756,6 +6894,12 @@ init_henv(struct html_feed_environ *h_env, struct readbuffer *obuf, +@@ -6756,6 +6896,12 @@ init_henv(struct html_feed_environ *h_env, struct readbuffer *obuf, obuf->nobr_level = 0; bzero((void *)&obuf->anchor, sizeof(obuf->anchor)); obuf->img_alt = 0; @@ -6149,7 +6296,7 @@ index 567d41e..4e8e4d3 100644 obuf->in_bold = 0; obuf->in_italic = 0; obuf->in_under = 0; -@@ -6791,6 +6935,15 @@ completeHTMLstream(struct html_feed_environ *h_env, struct readbuffer *obuf) +@@ -6791,6 +6937,15 @@ completeHTMLstream(struct html_feed_environ *h_env, struct readbuffer *obuf) push_tag(obuf, "</img_alt>", HTML_N_IMG_ALT); obuf->img_alt = NULL; } @@ -6165,7 +6312,7 @@ index 567d41e..4e8e4d3 100644 if (obuf->in_bold) { push_tag(obuf, "</b>", HTML_N_B); obuf->in_bold = 0; -@@ -6963,8 +7116,6 @@ loadHTMLstream(URLFile *f, Buffer *newBuf, FILE * src, int internal) +@@ -6963,8 +7118,6 @@ loadHTMLstream(URLFile *f, Buffer *newBuf, FILE * src, int internal) image_flag = IMG_FLAG_AUTO; else image_flag = IMG_FLAG_SKIP; @@ -6174,7 +6321,7 @@ index 567d41e..4e8e4d3 100644 #endif if (w3m_halfload) { -@@ -6987,6 +7138,9 @@ loadHTMLstream(URLFile *f, Buffer *newBuf, FILE * src, int internal) +@@ -6987,6 +7140,9 @@ loadHTMLstream(URLFile *f, Buffer *newBuf, FILE * src, int internal) htmlenv1.f = stdout; else htmlenv1.buf = newTextLineList(); @@ -6184,7 +6331,7 @@ index 567d41e..4e8e4d3 100644 if (SETJMP(AbortLoading) != 0) { HTMLlineproc1("<br>Transfer Interrupted!<br>", &htmlenv1); -@@ -7048,18 +7202,23 @@ loadHTMLstream(URLFile *f, Buffer *newBuf, FILE * src, int internal) +@@ -7048,18 +7204,23 @@ loadHTMLstream(URLFile *f, Buffer *newBuf, FILE * src, int internal) } #endif lineBuf2 = convertLine(f, lineBuf2, HTML_MODE, &charset, doc_charset); @@ -6210,7 +6357,7 @@ index 567d41e..4e8e4d3 100644 if (htmlenv1.title) newBuf->buffername = htmlenv1.title; if (w3m_halfdump) { -@@ -7096,16 +7255,17 @@ loadHTMLString(Str page) +@@ -7096,16 +7257,17 @@ loadHTMLString(Str page) MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; Buffer *newBuf; @@ -6230,7 +6377,7 @@ index 567d41e..4e8e4d3 100644 #ifdef USE_M17N newBuf->document_charset = InnerCharset; #endif -@@ -7115,6 +7275,7 @@ loadHTMLString(Str page) +@@ -7115,6 +7277,7 @@ loadHTMLString(Str page) #endif TRAP_OFF; @@ -6238,7 +6385,7 @@ index 567d41e..4e8e4d3 100644 newBuf->topLine = newBuf->firstLine; newBuf->lastLine = newBuf->currentLine; newBuf->currentLine = newBuf->firstLine; -@@ -7207,7 +7368,7 @@ loadGopherDir(URLFile *uf, ParsedURL *pu, wc_ces * charset) +@@ -7207,7 +7370,7 @@ loadGopherDir(URLFile *uf, ParsedURL *pu, wc_ces * charset) q = Strnew_m_charp("gopher://", host->ptr, ":", port->ptr, "/", file->ptr, NULL)->ptr; Strcat_m_charp(tmp, "<a href=\"", @@ -6247,7 +6394,7 @@ index 567d41e..4e8e4d3 100644 "\">", p, html_quote(name->ptr + 1), "</a>\n", NULL); } -@@ -7243,7 +7404,6 @@ loadBuffer(URLFile *uf, Buffer *volatile newBuf) +@@ -7243,7 +7406,6 @@ loadBuffer(URLFile *uf, Buffer *volatile newBuf) if (newBuf == NULL) newBuf = newBuffer(INIT_BUFFER_WIDTH); @@ -6255,7 +6402,7 @@ index 567d41e..4e8e4d3 100644 if (SETJMP(AbortLoading) != 0) { goto _end; -@@ -7331,6 +7491,7 @@ loadImageBuffer(URLFile *uf, Buffer *newBuf) +@@ -7331,6 +7493,7 @@ loadImageBuffer(URLFile *uf, Buffer *newBuf) URLFile f; MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; struct stat st; @@ -6263,7 +6410,7 @@ index 567d41e..4e8e4d3 100644 loadImage(newBuf, IMG_FLAG_STOP); image.url = uf->url; -@@ -7338,20 +7499,18 @@ loadImageBuffer(URLFile *uf, Buffer *newBuf) +@@ -7338,20 +7501,18 @@ loadImageBuffer(URLFile *uf, Buffer *newBuf) image.width = -1; image.height = -1; image.cache = NULL; @@ -6287,7 +6434,7 @@ index 567d41e..4e8e4d3 100644 TRAP_OFF; cache->loaded = IMG_FLAG_LOADED; -@@ -7371,6 +7530,7 @@ loadImageBuffer(URLFile *uf, Buffer *newBuf) +@@ -7371,6 +7532,7 @@ loadImageBuffer(URLFile *uf, Buffer *newBuf) init_stream(&f, SCM_LOCAL, newStrStream(tmp)); loadHTMLstream(&f, newBuf, src, TRUE); @@ -6295,7 +6442,7 @@ index 567d41e..4e8e4d3 100644 if (src) fclose(src); -@@ -7580,8 +7740,11 @@ openGeneralPagerBuffer(InputStream stream) +@@ -7580,8 +7742,11 @@ openGeneralPagerBuffer(InputStream stream) #ifdef USE_M17N content_charset = 0; #endif @@ -6308,7 +6455,7 @@ index 567d41e..4e8e4d3 100644 readHeader(&uf, t_buf, TRUE, NULL); t = checkContentType(t_buf); if (t == NULL) -@@ -7609,14 +7772,13 @@ openGeneralPagerBuffer(InputStream stream) +@@ -7609,14 +7774,13 @@ openGeneralPagerBuffer(InputStream stream) #ifdef USE_IMAGE else if (activeImage && displayImage && !useExtImageViewer && !(w3m_dump & ~DUMP_FRAME) && !strncasecmp(t, "image/", 6)) { @@ -6325,7 +6472,7 @@ index 567d41e..4e8e4d3 100644 UFclose(&uf); if (buf == NULL || buf == NO_BUFFER) return buf; -@@ -7629,8 +7791,6 @@ openGeneralPagerBuffer(InputStream stream) +@@ -7629,8 +7793,6 @@ openGeneralPagerBuffer(InputStream stream) } } buf->real_type = t; @@ -6334,7 +6481,7 @@ index 567d41e..4e8e4d3 100644 return buf; } -@@ -7766,6 +7926,8 @@ save2tmp(URLFile uf, char *tmpf) +@@ -7766,6 +7928,8 @@ save2tmp(URLFile uf, char *tmpf) clen_t linelen = 0, trbyte = 0; MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; static JMP_BUF env_bak; @@ -6343,7 +6490,7 @@ index 567d41e..4e8e4d3 100644 ff = fopen(tmpf, "wb"); if (ff == NULL) { -@@ -7802,30 +7964,29 @@ save2tmp(URLFile uf, char *tmpf) +@@ -7802,30 +7966,29 @@ save2tmp(URLFile uf, char *tmpf) else #endif /* USE_NNTP */ { @@ -6386,7 +6533,7 @@ index 567d41e..4e8e4d3 100644 { Str tmpf, command; struct mailcap *mcap; -@@ -7834,7 +7995,7 @@ doExternal(URLFile uf, char *path, char *type, Buffer **bufp, +@@ -7834,7 +7997,7 @@ doExternal(URLFile uf, char *path, char *type, Buffer **bufp, char *header, *src = NULL, *ext = uf.ext; if (!(mcap = searchExtViewer(type))) @@ -6395,7 +6542,7 @@ index 567d41e..4e8e4d3 100644 if (mcap->nametemplate) { tmpf = unquote_mailcap(mcap->nametemplate, NULL, "", NULL, NULL); -@@ -7867,15 +8028,13 @@ doExternal(URLFile uf, char *path, char *type, Buffer **bufp, +@@ -7867,15 +8030,13 @@ doExternal(URLFile uf, char *path, char *type, Buffer **bufp, UFclose(&uf); myExec(command->ptr); } @@ -6413,7 +6560,7 @@ index 567d41e..4e8e4d3 100644 } } if (mcap->flags & (MAILCAP_HTMLOUTPUT | MAILCAP_COPIOUSOUTPUT)) { -@@ -7918,14 +8077,13 @@ doExternal(URLFile uf, char *path, char *type, Buffer **bufp, +@@ -7918,14 +8079,13 @@ doExternal(URLFile uf, char *path, char *type, Buffer **bufp, buf = NO_BUFFER; } if (buf && buf != NO_BUFFER) { @@ -6432,7 +6579,7 @@ index 567d41e..4e8e4d3 100644 } static int -@@ -7935,7 +8093,8 @@ _MoveFile(char *path1, char *path2) +@@ -7935,7 +8095,8 @@ _MoveFile(char *path1, char *path2) FILE *f2; int is_pipe; clen_t linelen = 0, trbyte = 0; @@ -6442,7 +6589,7 @@ index 567d41e..4e8e4d3 100644 f1 = openIS(path1); if (f1 == NULL) -@@ -7953,12 +8112,13 @@ _MoveFile(char *path1, char *path2) +@@ -7953,12 +8114,13 @@ _MoveFile(char *path1, char *path2) return -1; } current_content_length = 0; @@ -6460,7 +6607,7 @@ index 567d41e..4e8e4d3 100644 ISclose(f1); if (is_pipe) pclose(f2); -@@ -8317,21 +8477,23 @@ uncompress_stream(URLFile *uf, char **src) +@@ -8317,21 +8479,23 @@ uncompress_stream(URLFile *uf, char **src) } if (pid2 == 0) { /* child2 */ @@ -6489,7 +6636,7 @@ index 567d41e..4e8e4d3 100644 exit(0); } /* child1 */ -@@ -8378,7 +8540,7 @@ lessopen_stream(char *path) +@@ -8378,7 +8542,7 @@ lessopen_stream(char *path) } c = getc(fp); if (c == EOF) { @@ -13139,6 +13286,19 @@ index 5bee4b2..5675d09 100644 #ifdef USE_M17N if (*p & 0x80) { +diff --git a/scripts/w3mhelp.cgi.in b/scripts/w3mhelp.cgi.in +index b2fca8f..31c0049 100644 +--- a/scripts/w3mhelp.cgi.in ++++ b/scripts/w3mhelp.cgi.in +@@ -48,7 +48,7 @@ if (defined($ENV{'QUERY_STRING'})) { + } + # print "tlang=$tlang\n"; + eval {require "w3mhelp-funcdesc.$tlang.pl";}; +- if (defined(%funcdesc)) { ++ if (%funcdesc) { + $lang = $tlang; + } + } diff --git a/scripts/w3mman/w3mman.1.in b/scripts/w3mman/w3mman.1.in index 1c0361d..1b1d990 100644 --- a/scripts/w3mman/w3mman.1.in @@ -13240,9 +13400,27 @@ index f430307..2cd00f9 100644 $p =~ s@/+$@@; $PATH{$p} = 1; diff --git a/table.c b/table.c -index e1243ff..b77f0f8 100644 +index e1243ff..2a0aa8f 100644 --- a/table.c +++ b/table.c +@@ -188,7 +188,7 @@ dv2sv(double *dv, short *iv, int size) + indexarray = NewAtom_N(short, size); + edv = NewAtom_N(double, size); + for (i = 0; i < size; i++) { +- iv[i] = ceil(dv[i]); ++ iv[i] = (short) ceil(dv[i]); + edv[i] = (double)iv[i] - dv[i]; + } + +@@ -205,7 +205,7 @@ dv2sv(double *dv, short *iv, int size) + indexarray[i] = k; + } + iw = min((int)(w + 0.5), size); +- if (iw == 0) ++ if (iw <= 1) + return; + x = edv[(int)indexarray[iw - 1]]; + for (i = 0; i < size; i++) { @@ -429,7 +429,6 @@ visible_length(char *str) char *t, *r2; int amp_len = 0; |