weening@labrea.Stanford.EDU (Joe Weening) (06/19/88)
We recently installed news 2.11 and now have a problem with recnews. Unlike the 2.10 version, recnews now precedes each double-quote mark with a '\' in the inews command that it constructs. But when a message arrives with a "From:" line such as: From: "J. Random User" <user@polya.stanford.edu> the resulting message gets posted with a "From:" line of From: \@labrea.Stanford.EDU Has anyone else seen this problem? The obvious thing to try is to remove the code that inserts the '\' characters, but I'd like to understand what the problem really is.
weening@labrea.Stanford.EDU (Joe Weening) (06/20/88)
I've discovered what was inserting the '\' characters into our "From" lines (and "To" and "Subject" lines as well, if they contained '"' characters). The following patch to recnews.c fixes the problem: *** recnews.c.old Thu Dec 3 23:52:27 1987 --- recnews.c Sun Jun 19 13:40:34 1988 *************** *** 389,394 **** if (*cmd++ == '"') { register char *bcp = cmd-1; ! while (*cmd && *cmd != '"') *bcp++ = *cmd++; *bcp = '\0'; cmd++; --- 389,396 ---- if (*cmd++ == '"') { register char *bcp = cmd-1; ! while (*cmd && *cmd != '"') { ! if (*cmd == '\\') cmd++; *bcp++ = *cmd++; + } *bcp = '\0'; cmd++;