%%s 0/0/0 %%d D 1.1 25-Mar-82 12:10:05 v1.1 1 0 %%c Version 1.1 is the Spring 1982 Distribution of the LBL/Hughes release %%c of the Software Tools Virtual Operating System software and documentation. %%T %%I 1 #-h- msplit.r 1819 asc 25-mar-82 08:13:54 v1.1 (sw-tools v1.1) #-h- defns 147 asc 25-mar-82 08:13:44 v1.1 (sw-tools v1.1) # the following values must jive with msg.w`msg.r`defns ifdef(LARGE_ADDRESS_SPACE) define(MAXHEADERS,500) elsedef define(MAXHEADERS,50) enddef #-h- main 812 asc 25-mar-82 08:13:44 v1.1 (sw-tools v1.1) DRIVER(msplit) character ch, cl, root(FILENAMESIZE), file(FILENAMESIZE) integer i, verbos, status integer getarg, equal, cpymsg string dfroot "tmsg" string minusv "-v" data ch/'a'/ data cl/'a'/ call query("usage: msplit 'z') { cl = 'a' ch = ch + 1 } } until (status == EOF) DRETURN end #-h- cpymsg 641 asc 25-mar-82 08:13:45 v1.1 (sw-tools v1.1) integer function cpymsg(n, file) integer n, out, i, status, junk integer create, getlin, equal, note linepointer temp character file(FILENAMESIZE), hdrpat(4), buf(MAXLINE) data hdrpat/1, 1, '@n', EOS/ out = create(file, WRITE) if (out == ERR) call cant(file) i = 0 repeat { junk = note(temp, STDIN) status = getlin(buf, STDIN) if (status == EOF) break if (equal(buf, hdrpat) == YES) { i = i + 1 if (i > n) { call seek(temp, STDIN) # backup one line status = n # n messages copied break } } call putlin(buf, out) } call close(out) cpymsg = status return end #-h- msplit.fmt 789 asc 25-mar-82 08:13:56 v1.1 (sw-tools v1.1) .so ~bin/manhdr .hd Msplit (1) 11-Jan-79 utility for salvaging message files .sy msplit