Hi,

The addresses in the header generated by the repl command will be broken in
the middle of an address if the address is too long for one line.  This
obviously results in invalid addresses.  For details, Mate Wierdl's post of
30 November 1999 to nmh-workers.

Here is a patch which solves that problem.

Thanks,

Ruud de Rooij.
-- 
Ruud de Rooij
[EMAIL PROTECTED]
http://sepc.twi.tudelft.nl/~derooij/

--- nmh-1.0.orig/sbr/fmt_scan.c
+++ nmh-1.0/sbr/fmt_scan.c
@@ -731,14 +731,23 @@
                /* try to break at a comma; failing that, break at a
                 * space, failing that, just split the line.
                 */
+               /* Changed so it won't "just split the line".
+                * Ruud de Rooij <[EMAIL PROTECTED]>
+                * Mon, 29 Mar 1999 23:08:54 +0200
+                */
                lastb = 0; sp = lp + wid;
                while (sp > lp && (c = *--sp) != ',') {
                    if (! lastb && isspace(c))
                        lastb = sp - 1;
                }
                if (sp == lp)
-                   if (! (sp = lastb))
+                   if (! (sp = lastb)) {
                        sp = lp + wid - 1;
+                       while (*sp && *sp != ',' && !isspace(*sp))
+                           sp++;
+                       if (*sp != ',')
+                           sp--;
+                   }
                len -= sp - lp + 1;
                while (cp < ep && lp <= sp)
                    *cp++ = *lp++;

Reply via email to