From a8831d96bdd3caf44bccbc0356daa8c1195c5c6b Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Mon, 4 Feb 2002 15:18:41 +0000 Subject: [w3m-dev 02984] inline image improvements and cleanups * config.h.dist (HAVE_SYMLINK) added * config.h.dist (HAVE_LSTAT): added * configure: symlink() check * configure: lstat() check * fm.h (maxLoadImage): added * form.c (form_write_from_file): s/HAVE_READLINK/HAVE_LSTAT/ * image.c: include * image.c (MAX_LOAD_IMAGE): default 8 * image.c (max_load_image): deleted * image.c (n_load_image): added * image.c (showImageProgress): added * image.c (loadImage): check load image count s/HAVE_READLINK/HAVE_LSTAT/ (HAVE_SYMLINK) showImageProgress * local.c: include s/HAVE_READLINK/HAVE_LSTAT/ * rc.c (CMT_MAX_LOAD_IMAGE): added * rc.c (max_load_image): added * doc/README.img: update * doc-jp/README.img: update * file.c (process_img): pre_int fix From: Hironori Sakamoto --- file.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index f2f10bc..7bffb9c 100644 --- a/file.c +++ b/file.c @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.61 2002/02/04 14:49:21 ukai Exp $ */ +/* $Id: file.c,v 1.62 2002/02/04 15:18:42 ukai Exp $ */ #include "fm.h" #include #include "myctype.h" @@ -2761,6 +2761,7 @@ process_img(struct parsed_tag *tag, int width) #else int w, i, nw, n; #endif + int pre_int = FALSE; Str tmp = Strnew(); if (!parsedtag_get_value(tag, ATTR_SRC, &p)) @@ -2872,6 +2873,7 @@ process_img(struct parsed_tag *tag, int width) ni = (i > 3) ? (int)((i - 3) / pixel_per_line + 1) : 1; Strcat(tmp, Sprintf(""); + pre_int = TRUE; + } Strcat_charp(tmp, " 200 && i < 13) { /* must be a horizontal line */ + if (!pre_int) { + Strcat_charp(tmp, ""); + pre_int = TRUE; + } #ifndef KANJI_SYMBOLS Strcat_charp(tmp, "<_RULE TYPE=10>"); #endif /* not KANJI_SYMBOLS */ @@ -3021,13 +3029,7 @@ process_img(struct parsed_tag *tag, int width) } #endif Strcat_charp(tmp, ""); -#ifdef USE_IMAGE - if (use_image) { - Strcat_charp(tmp, ""); - } - else -#endif - if (r) + if (pre_int) Strcat_charp(tmp, ""); if (r) { Strcat_charp(tmp, ""); @@ -5728,17 +5730,21 @@ print_internal_information(struct html_feed_environ *henv) s = Sprintf("action->ptr, (fp->method == FORM_METHOD_POST) ? "post" - : ((fp->method == FORM_METHOD_INTERNAL) ? "internal" : "get")); + : ((fp->method == + FORM_METHOD_INTERNAL) ? "internal" : "get")); if (fp->target) Strcat(s, Sprintf(" target=\"%s\"", fp->target)); #ifdef JP_CHARSET if (fp->charset) - Strcat(s, Sprintf(" accept-charset=\"%s\"", code_to_str(fp->charset))); + Strcat(s, + Sprintf(" accept-charset=\"%s\"", + code_to_str(fp->charset))); #endif if (fp->enctype == FORM_ENCTYPE_MULTIPART) Strcat_charp(s, " enctype=multipart/form-data"); if (fp->boundary) - Strcat_m_charp(s, " boundary=\"", html_quote(fp->boundary), "\"", NULL); + Strcat_m_charp(s, " boundary=\"", html_quote(fp->boundary), + "\"", NULL); Strcat_charp(s, ">"); pushTextLine(tl, newTextLine(s, 0)); } @@ -5751,14 +5757,14 @@ print_internal_information(struct html_feed_environ *henv) s = Sprintf("%s", i, - html_quote(ip->value ? ip->value->ptr : ip->label->ptr), - ip->checked ? " selected" : "", + html_quote(ip->value ? ip->value->ptr : ip->label-> + ptr), ip->checked ? " selected" : "", ip->label->ptr); pushTextLine(tl, newTextLine(s, 0)); } } } -#endif /* MENU_SELECT */ +#endif /* MENU_SELECT */ if (n_textarea > 0) { for (i = 0; i < n_textarea; i++) { s = Sprintf("%s", -- cgit v1.2.3