[w3m-dev 02961] halfdump image is not consistent

* file.c (flushline): check f
* file.c (do_blankline): fix blanklink conditions
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
Fumitoshi UKAI
2002-01-31 18:40:14 +00:00
parent 4c7c352e47
commit 3251324351
2 changed files with 13 additions and 8 deletions
+7 -1
View File
@@ -1,3 +1,9 @@
2002-02-01 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 02961] halfdump image is not consistent
* file.c (flushline): check f
* file.c (do_blankline): fix blanklink conditions
2002-02-01 Fumitoshi UKAI <ukai@debian.or.jp> 2002-02-01 Fumitoshi UKAI <ukai@debian.or.jp>
* gcc -Wall -Werror safe * gcc -Wall -Werror safe
@@ -2693,4 +2699,4 @@
* release-0-2-1 * release-0-2-1
* import w3m-0.2.1 * import w3m-0.2.1
$Id: ChangeLog,v 1.288 2002/01/31 18:28:24 ukai Exp $ $Id: ChangeLog,v 1.289 2002/01/31 18:40:14 ukai Exp $
+6 -7
View File
@@ -1,4 +1,4 @@
/* $Id: file.c,v 1.56 2002/01/31 18:28:24 ukai Exp $ */ /* $Id: file.c,v 1.57 2002/01/31 18:40:16 ukai Exp $ */
#include "fm.h" #include "fm.h"
#include <sys/types.h> #include <sys/types.h>
#include "myctype.h" #include "myctype.h"
@@ -2504,7 +2504,7 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent,
h_env->maxlimit = lbuf->pos; h_env->maxlimit = lbuf->pos;
if (buf) if (buf)
pushTextLine(buf, lbuf); pushTextLine(buf, lbuf);
else { else if (f) {
Strfputs(lbuf->line, f); Strfputs(lbuf->line, f);
fputc('\n', f); fputc('\n', f);
} }
@@ -2520,15 +2520,16 @@ flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent,
#define APPEND(str) \ #define APPEND(str) \
if (buf) \ if (buf) \
appendTextLine(buf,(str),0); \ appendTextLine(buf,(str),0); \
else \ else if (f) \
Strfputs((str),f) Strfputs((str),f)
while (*p) { while (*p) {
q = p; q = p;
if (sloppy_parse_line(&p)) { if (sloppy_parse_line(&p)) {
Strcat_charp_n(tmp, q, p - q); Strcat_charp_n(tmp, q, p - q);
if (force == 2) if (force == 2) {
APPEND(tmp); APPEND(tmp);
}
else else
Strcat(tmp2, tmp); Strcat(tmp2, tmp);
Strclear(tmp); Strclear(tmp);
@@ -2624,9 +2625,7 @@ void
do_blankline(struct html_feed_environ *h_env, struct readbuffer *obuf, do_blankline(struct html_feed_environ *h_env, struct readbuffer *obuf,
int indent, int indent_incr, int width) int indent, int indent_incr, int width)
{ {
if (h_env->buf && h_env->blank_lines == 0) if (h_env->blank_lines == 0)
flushline(h_env, obuf, indent, 1, width);
else if (h_env->f)
flushline(h_env, obuf, indent, 1, width); flushline(h_env, obuf, indent, 1, width);
} }