Urs Janßen
2010-11-24 17:42:40 UTC
between tin 1.5.6 and tin 1.5.7 misc.c:copy_body() was changed -
does anyone remeber why? it may leed to wrong indented underlining
^^^^^^^^^^^^^^^^^^^^^^^^^^
--- tin-1.5.6/src/misc.c 2000-08-03 15:49:22.000000000 +0200
+++ tin-1.5.7/src/misc.c 2000-10-19 19:46:46.000000000 +0200
@@ -174,6 +174,8 @@
* copy the body of articles with given file pointers,
* prefix (= quote_chars), initials of the articles author
* with_sig is set if the signature should be quoted
+ *
+ * TODO: rewrite from scratch, the code is awfull
*/
void
copy_body (
@@ -244,10 +246,9 @@
} else /* line is empty */
retcode = fprintf (fp_op, "%s\n", (tinrc.quote_empty_lines ? prefixbuf : ""));
} else { /* no initials in quote_string, just copy */
- if ((buf[0] != '\n') || tinrc.quote_empty_lines) {
- /* use blank-stripped quote string if line is already quoted */
- retcode = fprintf (fp_op, "%s%s", ((buf[0] == '>') ? prefixbuf : prefix), buf);
- } else
+ if ((buf[0] != '\n') || tinrc.quote_empty_lines)
+ retcode = fprintf (fp_op, "%s%s", ((buf[0] == '>' || buf[0] == ' ') ? prefixbuf : prefix), buf); /* use blank-stripped quote string if line is already quoted or beginns with a space */
+ else
retcode = fprintf (fp_op, "\n");
}
if (retcode == EOF) {
does anyone remeber why? it may leed to wrong indented underlining
^^^^^^^^^^^^^^^^^^^^^^^^^^
--- tin-1.5.6/src/misc.c 2000-08-03 15:49:22.000000000 +0200
+++ tin-1.5.7/src/misc.c 2000-10-19 19:46:46.000000000 +0200
@@ -174,6 +174,8 @@
* copy the body of articles with given file pointers,
* prefix (= quote_chars), initials of the articles author
* with_sig is set if the signature should be quoted
+ *
+ * TODO: rewrite from scratch, the code is awfull
*/
void
copy_body (
@@ -244,10 +246,9 @@
} else /* line is empty */
retcode = fprintf (fp_op, "%s\n", (tinrc.quote_empty_lines ? prefixbuf : ""));
} else { /* no initials in quote_string, just copy */
- if ((buf[0] != '\n') || tinrc.quote_empty_lines) {
- /* use blank-stripped quote string if line is already quoted */
- retcode = fprintf (fp_op, "%s%s", ((buf[0] == '>') ? prefixbuf : prefix), buf);
- } else
+ if ((buf[0] != '\n') || tinrc.quote_empty_lines)
+ retcode = fprintf (fp_op, "%s%s", ((buf[0] == '>' || buf[0] == ' ') ? prefixbuf : prefix), buf); /* use blank-stripped quote string if line is already quoted or beginns with a space */
+ else
retcode = fprintf (fp_op, "\n");
}
if (retcode == EOF) {