Xref: utzoo comp.mail.misc:2648 comp.mail.elm:2123 comp.unix.xenix:8675 Path: utzoo!utgpu!watmath!looking!brad From: brad@looking.on.ca (Brad Templeton) Newsgroups: comp.mail.misc,comp.mail.elm,comp.unix.xenix Subject: Re: MMDF, Smail and Elm Mailer Message-ID: <51364@looking.on.ca> Date: 22 Nov 89 18:14:45 GMT References: <8911202358.AA14298@decwrl.dec.com> <128223@sun.Eng.Sun.COM> Organization: Looking Glass Software Ltd. Lines: 27 Class: discussion I hacked elm to handle mmdf mailboxes. I didn't keep the old one around, so I can't make a diff.c without extracting it, but here is where the short addition goes. Works fine, BUT elm deletes the ^A lines, so after you use ELM, you will have trouble using the standard unix mailer on that box. (in newmbox.c) /** now let's copy it all across accordingly... **/ while (fbytes < mailfile_size) { if (fgets(buffer, LONG_STRING, mailfile) == NULL) break; if (copyit) fputs(buffer, temp); line_bytes = (long) strlen(buffer); + /* do not count ^A lines as anything but bytes */ + if( strcmp( buffer, "\001\001\001\001\n" ) == 0 ) { + fbytes += line_bytes; + continue; + } /* Fix below to increment line count ONLY if we got a full line. * Input lines longer than the fgets buffer size would * get counted each time a subsequent part of them was -- Brad Templeton, ClariNet Communications Corp. -- Waterloo, Ontario 519/884-7473