MMDF, Smail and Elm Mailer

Brad Templeton brad at looking.on.ca
Thu Nov 23 05:14:45 AEST 1989


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



More information about the Comp.unix.xenix mailing list