epg [Mon, 15 Mar 2004 16:05:46 +0000 (16:05 +0000)]
(frm): %-53s formatting on the subject is superfluous and results in
spaces being printed at the end of the line; kill it. Yet another patch
from Doug Porter.
epg [Fri, 24 Jan 2003 03:31:35 +0000 (03:31 +0000)]
(scan_message): Initialize the first character of fromheader and
subjheader to '\0' so that they will appear as empty strings when that
header is missing from the message. Previously, the previous's
message's contents for that header was printed instead of nothing.
(scan_message): Don't set first elements of fromheader and subjheader to
'\0'; that was pointless. Don't assign to line[--len], only decrement
len; line is a private buffer beloging to fgetln and we should not be
scribbling in it; this was also pointless anyway. Set
fromheader[fromcount] to '\0' after copying the characters from line
into it; do the same for subjheader.
(frm): Make fromheader and subjheader automatic variables, no longer
use malloc. Also, initialize the whole buffers (fixing memory issues
picked up by valgrind).