#-h- malfix.r 1246 asc 27-apr-81 13:34:40 [002,100] #-h- main 440 asc 27-apr-81 13:34:29 [002,100] DRIVER(malfix) integer getpat, s, getlin, match character hdrpat(100), buf(MAXLINE) string hdptrn "%Mail from" call query("usage: malfix new_mail_file.") if (getpat(hdptrn, hdrpat) == ERR) call error("Something wrong with pattern.") while (getlin(buf, STDIN) != EOF) { if (match(buf, hdrpat) == YES) call refrmt(buf, STDOUT) else call putlin(buf, STDOUT) } DRETURN end #-h- refrmt 682 asc 27-apr-81 13:34:31 [002,100] subroutine refrmt(buf, unit) character buf(ARB), user(FILENAMESIZE), date(FILENAMESIZE), time(FILENAMESIZE), header(4) integer junk, getwrd, i string datehd "Date: " string fromhd "From: " string pst " - PST" data header/1, 1, NEWLINE, EOS/ i = 1 junk = getwrd(buf, i, user) junk = getwrd(buf, i, user) junk = getwrd(buf, i, user) junk = getwrd(buf, i, date) junk = getwrd(buf, i, time) call putlin(header, unit) call putlin(datehd, unit) call putlin(date, unit) call putch(BLANK, unit) call putlin(time, unit) call putlin(pst, unit) call putch(NEWLINE, unit) call putlin(fromhd, unit) call putlin(user, unit) call putch(NEWLINE, unit) return end #-h- malfix.rof 910 asc 08-may-81 16:46:53 [002,100] .pl 60 .bp .rm 70 .in 0 .he ;MALFIX;10/29/80;MALFIX; .fo ''-#-' .fi NAME .br .in 7 malfix - fix up old mail files for MSG .sp 1 .in SYNOPSIS .br .in 7 malfix outfile .sp 1 .in DESCRIPTION .br .in 7 malfix exists solely to convert mail files created with the old software tools mail utility into the format necessary for MSG. The suggested scenario for fixing up your mbox file (the place where MAIL used to save your mail) is as follows: .sp .in +5 .nf cat mymail >>mbox cat ~bin/mymail >mymail mv mbox ombox malfix mbox .fi .sp .in -5 Now run MSG on the mbox file to make sure everything went OK (of course it did, but let's be safe.) Then the ombox file may be deleted. .sp 1 .in FILES .br .in 7 .sp 1 .in SEE ALSO .br .in 7 msg - message file editor .sp 1 .in DIAGNOSTICS .br .in 7 .sp 1 .in AUTHORS .br .in 7 Joe Sventek .sp 1 .in BUGS .br .in 7