|
sylpheed-jp:2678
From: Hiroyuki Yamamoto <hiro-y@xxxxxxxxxx>
山本です。
とりあえず以下のような感じで修正しようと思います。
(あんまりスマートじゃないですが…)
--- src/procheader.c 23 Apr 2003 05:39:14 -0000 1.26
+++ src/procheader.c 29 Jun 2004 09:03:28 -0000
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2004 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -84,17 +84,18 @@
else if (nexthead == EOF)
break;
else if (folded == TRUE) {
+ if ((len - (bufp - buf)) <= 2) break;
+
if (nexthead == '\r' || nexthead == '\n') {
- folded = FALSE;
- continue;
+ ungetc(nexthead, fp);
+ nexthead = '\0';
}
- if ((len - (bufp - buf)) <= 2) break;
-
/* replace return code on the tail end
with space */
*bufp++ = ' ';
- *bufp++ = nexthead;
+ if (nexthead)
+ *bufp++ = nexthead;
*bufp = '\0';
/* concatenate next line */
if (fgets(bufp, len - (bufp - buf), fp)
@@ -169,17 +170,18 @@
else if (nexthead == EOF)
break;
else if (folded == TRUE) {
+ if ((len - (bufp - buf)) <= 2) break;
+
if (nexthead == '\r' || nexthead == '\n') {
- folded = FALSE;
- continue;
+ ungetc(nexthead, fp);
+ nexthead = '\0';
}
- if ((len - (bufp - buf)) <= 2) break;
-
/* replace return code on the tail end
with space */
*bufp++ = ' ';
- *bufp++ = nexthead;
+ if (nexthead)
+ *bufp++ = nexthead;
*bufp = '\0';
--
Hiroyuki Yamamoto <hiro-y@xxxxxxxxxx>
http://www.kcn.ne.jp/~hiro-y/index.cgi
http://sylpheed.good-day.net/ (Sylpheed)
@ 2673 2004-06-28 18:25 [n071316@xxxxxxxxxx ] WSPのみの行が継続行の場合の処理 2674 2004-06-28 19:06 ┣[hiro-y@xxxxxxxxxx ] 2675 2004-06-28 20:06 ┃┗[n071316@xxxxxxxxxx ] 2677 2004-06-29 11:49 ┃ ┗[hiro-y@xxxxxxxxxx ] -> 2678 2004-06-29 18:07 ┃ ┗[hiro-y@xxxxxxxxxx ] 2679 2004-06-30 20:25 ┃ ┗[hiro-y@xxxxxxxxxx ] 2676 2004-06-28 21:11 ┗[yoichi@xxxxxxxxxx ] |