- if (offset > 0) {
- /* first count number of real quoting characters;
- * read: non-spaces
- * this maybe just plain wrong, but leaving spaces
- * within quoting characters is what I consider
- * more plain wrong...
- */
- for (i = 0; i < offset; i++)
- if (line[i] != ' ')
- count++;
- /* just make sure we're inside quote althoug we
- * likely won't have more than SHORT_STRING quote levels... */
- i = (count > SHORT_STRING-1) ? SHORT_STRING-1 : count;
- memset (quote, '>', i);
- quote[i] = '\0';
+ while (fgets (buf, sizeof (buf), in)) {
+ if (ascii_strncmp ("From ", buf, 4) == 0 || buf[0] == ' ') {
+ fputc (' ', out);
+#if DEBUG
+ lc++;
+ len = str_len (buf);
+ if (len > 0) {
+ c = buf[len-1];
+ buf[len-1] = '\0';
+ }
+ debug_print (4, ("f=f: line %d needs space-stuffing: '%s'\n",
+ lc, buf));
+ if (len > 0)
+ buf[len-1] = c;
+#endif
+ }
+ fputs (buf, out);