%%s 0/0/0 %%d D 1.1 25-Mar-82 12:13:07 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- patdef 787 asc 25-mar-82 08:38:03 v1.1 (sw-tools v1.1) ## definitions for the pattern matching routines # put on a file named 'defns' # Used by pattern.r and ed & sedit tools define(ANY,'?') define(BOL,'%') define(BOT,'{') define(CCL,'[') define(CCLEND,']') define(CHAR,'a') define(CLOSIZE,4) define(CLOSURE,'*') define(CLOSURE1,'+') # closure of one or more occurrences # i.e. (pat)+ == (pat)(pat)* define(COUNT,1) define(EOL,'$') define(EOT,'}') define(MAXTAG,10) define(NCCL,'n') define(PREVCL,2) define(START,3) define(DITTO,(-3)) define(SECTION,(-4)) # /ctag/ - common block to hold section limits for ch # put in a file called 'ctag' # Used by find, ch, and ed #common /ctag/ taglim(MAXTAG2) #integer taglim define(I_CTAG,common/ctag/taglim(arith(2,*,MAXTAG)) integer taglim) #-h- csedit 673 asc 25-mar-82 08:38:05 v1.1 (sw-tools v1.1) ## common block for csedit tool # put on a file called 'csedit' # (used only by csedit) common /csedit/ aq, iq, buf(MAXBUF), lastbf, nlines, line1, line2, pat(MAXPAT), prevc, nflag integer aq # end of append queue integer iq # end of insert queue character buf # buf for commands integer lastbf # next available character in buf integer nlines # number of line number expressions integer line1 # line number 1 or index to pattern integer line2 # line number 2 or index to pattern character pat # current pattern during compilation integer prevc # index of previous command integer nflag # YES to print result of "p" commands only #-h- sedit.r 19532 asc 25-mar-82 08:38:16 v1.1 (sw-tools v1.1) #-h- defns 1620 asc 25-mar-82 08:36:40 v1.1 (sw-tools v1.1) # include ratdef define(NLINES,0) # number of line numbers define(NEXT,1) # index of next command define(LINE1,2) # line number 1 or index of pattern define(LINE2,3) # line number 2 or index of pattern define(COMMAND,4) # command define(LIST,5) # next command on insert/append list define(TEXT,6) # text for insert/append or file name for read define(APPENDCOM,'a') # append command define(CHANGECOM,'c') # change command define(DELETECOM,'d') # delete command define(INSERTCOM,'i') # insert command define(PRINTCOM,'p') # print command define(READCOM,'r') # read command define(SUBSTCOM,'s') # substitute command define(SUBSTGFLAG,COMMAND+1) # YES for global replacement define(SUBSTPFLAG,COMMAND+2) # YES for print define(SUBSTPAT,COMMAND+3) # index of pattern define(SUBSTNEW,COMMAND+4) # index of replacement define(WRITECOM,'w') # write command define(WRITEFD,COMMAND+1) # file descriptor for opened file or 0 define(EQUALCOM,'=') # print line number command define(INSERTLIST,1) # location of list of inserts define(APPENDLIST,LIST+1) # location of list of appends define(COMMANDLIST,1) # location of command list define(FIRSTFREE,APPENDLIST+TEXT) # first free location in buf ifdef(LARGE_ADDRESS_SPACE) define(MAXBUF,20000) elsedef define(MAXBUF,5000) # size of command buffer enddef define(LASTLINE,'$') define(OK,YES) # to be compatible with addset/addstr define(GLOBAL,'g') # for getrhs define(PRINT,'p') # for ckp define(DITTO,(-3)) define(MAXNAME,FILENAMESIZE) include patdef #-h- main 2653 asc 25-mar-82 08:36:45 v1.1 (sw-tools v1.1) # sedit - stream editor DRIVER(sedit) character arg(MAXLINE), linbuf(MAXLINE) integer i, j, nfiles, fd integer length, getarg, open, getlin include csedit string use "usage: sedit [-n] {[-e script | -f sfiles] ... | script} [file]..." call query(use) prevc = COMMANDLIST # initialize lists buf(COMMANDLIST+NEXT) = 0 lastbf = FIRSTFREE nflag = NO nfiles = 0 i = 1 if (getarg (i, arg, MAXLINE) == EOF) call error(use) if (arg(1) == '-' & arg(2) == 'n') { nflag = YES i = i + 1 } for (; getarg(i, arg, MAXLINE) != EOF; i = i + 2) if (arg(1) == '-' & arg(2) == 'f') { # -f filename if (getarg(i + 1, arg, MAXLINE) == EOF) call error(use) fd = open(arg, READ) if (fd == ERR) call cant(arg) while (getlin(arg, fd) != EOF) call compil(arg, fd) call close(fd) } else if (arg(1) == '-' & arg(2) == 'e') { # -e script if (getarg(i + 1, arg, MAXLINE) == EOF) call error(use) j = length(arg) arg(j+1) = '@n' arg(j+2) = EOS call compil(arg, NO) } else # no flags break if (lastbf == FIRSTFREE) { # use argument as script if (getarg(i, arg, MAXLINE) == EOF) call error(use) j = length(arg) arg(j+1) = '@n' arg(j+2) = EOS call compil(arg, NO) i = i + 1 } linbuf(1) = EOS lineno = 0 call docmds(linbuf, 0) # do line 0 commands for (; getarg(i, arg, MAXLINE) != EOF; i = i + 1) { if (arg(1) == '-' & arg(2) == EOS) fd = STDIN else fd = open(arg, READ) if (fd == ERR) call cant(arg) call sed(linbuf, lineno, fd) if (fd != STDIN) call close(fd) nfiles = nfiles + 1 } if (nfiles == 0) call sed(linbuf, lineno, STDIN) if (linbuf(1) != EOS) { # set last line number and do last line lineno = lineno + 1 for (i = buf(COMMANDLIST+NEXT); i > 0; i = buf(i+NEXT)) { if (buf(i+LINE1) == -HUGE) buf(i+LINE1) = -lineno if (buf(i+LINE2) == -HUGE) buf(i+LINE2) = -lineno if (buf(i+COMMAND) == CHANGECOM) #clean unsatisfied c commands { if (buf(i+NLINES) == 2) buf(i+NLINES) = 1 # insures changed text is output if (buf(i+NLINES) == 3 & (buf(i+LINE2) > 0 | -buf(i+LINE2) >= lineno)) buf(i+LINE2) = -lineno } } call docmds(linbuf, lineno) } DRETURN end #-h- addstr 339 asc 25-mar-82 08:36:48 v1.1 (sw-tools v1.1) # addstr - add s to str(j) if it fits, increment j integer function addstr(s, str, j, maxsiz) character s(ARB), str(ARB) integer j, maxsiz integer i, addset for (i = 1; s(i) != EOS; i = i + 1) if (addset(s(i), str, j, maxsiz) == NO) { addstr = NO return } addstr = YES return end #-h- catsub 484 asc 25-mar-82 08:36:50 v1.1 (sw-tools v1.1) ## catsub - add replacement text to end of new. subroutine catsub(lin, from, to, sub, new, k, maxnew) integer addset integer from, i, j, junk, k, maxnew, to character lin(MAXLINE), new(maxnew), sub(MAXPAT) for (i = 1; sub(i) != EOS; i = i + 1) if (sub(i) == DITTO) for (j = from; j < to; j = j + 1) junk = addset(lin(j), new, k, maxnew) else junk = addset(sub(i), new, k, maxnew) return end #-h- ckp 373 asc 25-mar-82 08:36:52 v1.1 (sw-tools v1.1) # ckp - check for "p" after command integer function ckp(lin, i, pflag, status) character lin(MAXLINE) integer i, j, pflag, status character clower j = i if (clower(lin(j)) == PRINT) { j = j + 1 pflag = YES } else pflag = NO if (lin(j) == '@n') status = OK else status = ERR ckp = status return end #-h- compil 3006 asc 25-mar-82 08:36:54 v1.1 (sw-tools v1.1) # compil - "compile" command in lin(i) from file fd, increment i subroutine compil(lin, fd) character lin(MAXLINE) integer fd character file(MAXNAME), sub(MAXPAT) integer i, gflag, pflag, status, fdw integer addset, addstr, create, getrhs, getfn, ckp, optpat, dotext, getlst, length character clower include csedit status = ERR i = 1 if (getlst(lin, i, status) == ERR) { call putlin(lin, ERROUT) call error("bad line numbers.") } call skipbl(lin, i) buf(prevc+NEXT) = lastbf # link in new command prevc = lastbf status = addset(nlines, buf, lastbf, MAXBUF) status = addset(0, buf, lastbf, MAXBUF) status = addset(line1, buf, lastbf, MAXBUF) status = addset(line2, buf, lastbf, MAXBUF) #fold commands to lower case status = addset(clower(lin(i)), buf, lastbf, MAXBUF) if (clower(lin(i)) == APPENDCOM & lin(i+1) == '@n' & fd != NO) { status = addset(0, buf, lastbf, MAXBUF) status = dotext(fd) } else if (clower(lin(i)) == CHANGECOM & lin(i+1) == '@n' & fd != NO) { status = addset(0, buf, lastbf, MAXBUF) status = dotext(fd) } else if (clower(lin(i)) == DELETECOM & lin(i+1) == '@n') status = OK else if (clower(lin(i)) == INSERTCOM & lin(i+1) == '@n' & fd != NO) { status = addset(0, buf, lastbf, MAXBUF) status = dotext(fd) } else if (clower(lin(i)) == PRINTCOM & lin(i+1) == '@n') status = OK else if (clower(lin(i)) == READCOM) { status = addset(0, buf, lastbf, MAXBUF) status = getfn(lin, i, file) if (status == OK) { status = addstr(file, buf, lastbf, MAXBUF) status = addset(EOS, buf, lastbf, MAXBUF) } } else if (clower(lin(i)) == SUBSTCOM) { i = i + 1 if (optpat(lin, i) == OK) andif (getrhs(lin, i, sub, gflag) == OK) status = ckp(lin, i + 1, pflag, status) if (status == OK) { status = addset(gflag, buf, lastbf, MAXBUF) status = addset(pflag, buf, lastbf, MAXBUF) status = addset(lastbf + 2, buf, lastbf, MAXBUF) status = addset(lastbf + length(pat) + 2, buf, lastbf, MAXBUF) status = addstr(pat, buf, lastbf, MAXBUF) status = addset(EOS, buf, lastbf, MAXBUF) status = addstr(sub, buf, lastbf, MAXBUF) status = addset(EOS, buf, lastbf, MAXBUF) } } else if (clower(lin(i)) == WRITECOM) { status = getfn(lin, i, file) if (status == OK) { fdw = create(file, WRITE) if (fdw == ERR) call cant(file) } status = addset(fdw, buf, lastbf, MAXBUF) } else if (clower(lin(i)) == EQUALCOM & lin(i+1) == '@n') status = OK else status = ERR if (status != OK) { call putlin(lin, ERROUT) if (lastbf > MAXBUF) call error("too many commands.") else call error("invalid command.") } return end #-h- docmds 2291 asc 25-mar-82 08:36:59 v1.1 (sw-tools v1.1) # docmds-execute commands in buf on linbuf, which contains line lineno subroutine docmds(linbuf, lineno) character linbuf(MAXLINE) integer lineno integer i, n integer match include csedit aq = APPENDLIST # initialize append and insert queues buf(aq+LIST) = 0 iq = INSERTLIST buf(iq+LIST) = 0 for (i = buf(COMMANDLIST+NEXT); i != 0; i = buf(i+NEXT)) { nlines = buf(i+NLINES) line1 = buf(i+LINE1) line2 = buf(i+LINE2) if (nlines == 0) call docom(i, linbuf, lineno) else if (nlines == 1) { if (-line1 == lineno) call docom(i, linbuf, lineno) else if (line1 > 0) andif (match(linbuf, buf(line1)) > 0) call docom(i, linbuf, lineno) } else if (nlines == 2) { # 2 line numbers, searching for line1 if (-line1 == lineno) { buf(i+NLINES) = 3 # found it, change state call docom(i, linbuf, lineno) } else if (line1 > 0) andif (match(linbuf, buf(line1)) > 0) { buf(i+NLINES) = 3 call docom(i, linbuf, lineno) } } else if (nlines == 3) { # 2 line numbers, searching for line2 if (line2 <= 0) { if (lineno >= -line2) buf(i+NLINES) = 2 # found it, change state if (lineno <= -line2) call docom(i, linbuf, lineno) } else if (line2 > 0) { if (match(linbuf, buf(line2)) > 0) buf(i+NLINES) = 2 call docom(i, linbuf, lineno) } } else call error("in docmds: can't happen.") if (linbuf(1) == EOS & lineno > 0) break } # output inserts for (i = buf(INSERTLIST+LIST); i > 0; i = buf(i+LIST)) call putlin(buf(i+TEXT), STDOUT) if (nflag == NO) call putlin(linbuf, STDOUT) # output appends for (i = buf(APPENDLIST+LIST); i > 0; i = buf(i+LIST)) if (buf(i+COMMAND) == READCOM) call fcopy(buf(i+TEXT), STDOUT) # do r command else call putlin(buf(i+TEXT), STDOUT) return end #-h- docom 1250 asc 25-mar-82 08:37:02 v1.1 (sw-tools v1.1) # docom - execute a single command at buf(i) on linbuf and lineno subroutine docom(i, linbuf, lineno) character linbuf(MAXLINE) integer i, lineno character cmd integer k1, k2, junk include csedit cmd = buf(i+COMMAND) if (cmd == APPENDCOM) { buf(aq+LIST) = i aq = i buf(i+LIST) = 0 } else if (cmd == CHANGECOM) { linbuf(1) = EOS if (buf(i+NLINES) <= 2) { buf(aq+LIST) = i aq = i buf(i+LIST) = 0 } } else if (cmd == DELETECOM) linbuf(1) = EOS else if (cmd == INSERTCOM) { buf(iq+LIST) = i iq = i buf(i+LIST) = 0 } else if (cmd == PRINTCOM) call putlin(linbuf, STDOUT) else if (cmd == READCOM) { buf(aq+LIST) = i aq = i buf(i+LIST) = 0 } else if (cmd == SUBSTCOM) { k1 = buf(i+SUBSTPAT) k2 = buf(i+SUBSTNEW) call subst(linbuf, buf(k1), buf(k2), buf(i+SUBSTGFLAG), buf(i+SUBSTPFLAG)) } else if (cmd == WRITECOM) { if (buf(i+WRITEFD) != 0) call putlin(linbuf, buf(i+WRITEFD)) } else if (cmd == EQUALCOM) { call putdec(lineno, 1) call putc('@n') } # else ignore command return end #-h- dotext 376 asc 25-mar-82 08:37:04 v1.1 (sw-tools v1.1) # dotext - append text in file fd onto buf integer function dotext(fd) integer fd integer getlin, addset, addstr character lin(MAXLINE) include csedit while (getlin(lin, fd) != EOF) { if (lin(1) == '.' & lin(2) == '@n') break junk = addstr(lin, buf, lastbf, MAXBUF) } dotext = addset(EOS, buf, lastbf, MAXBUF) return end #-h- fcopy 339 asc 25-mar-82 08:37:06 v1.1 (sw-tools v1.1) # fcopy - copy file name to opened file fdo subroutine fcopy(name, fdo) character name(ARB) integer fdo integer fdi integer open character c character getch fdi = open(name, READ) if (fdi == ERR) call cant(name) while (getch(c, fdi) != EOF) call putch(c, fdo) call close(fdi) return end #-h- getfn 457 asc 25-mar-82 08:37:08 v1.1 (sw-tools v1.1) # getfn - get file name from lin(i)... integer function getfn(lin, i, file) character lin(MAXLINE), file(MAXLINE) integer i, j, k getfn = ERR if (lin(i + 1) == ' ' | lin(i + 1) == '@t') { j = i + 2 # get new file name call skipbl(lin, j) for (k = 1; lin(j) != '@n'; k = k + 1) { file(k) = lin(j) j = j + 1 } file(k) = EOS if (k > 1) getfn = OK } return end #-h- getlst 503 asc 25-mar-82 08:37:10 v1.1 (sw-tools v1.1) # getlst - get a list of line numbers starting at lin(i), increment i integer function getlst(lin, i, status) character lin(MAXLINE) integer i integer status # ignored integer num integer getone include csedit nlines = 0 if (getone(lin, i, num) == EOF) return(OK) line1 = num nlines = nlines + 1 if (lin(i) != ',') return(OK) i = i + 1 if (getone(lin, i, num) != OK) return(ERR) line2 = num nlines = nlines + 1 return(OK) end #-h- getone 1020 asc 25-mar-82 08:37:13 v1.1 (sw-tools v1.1) # getone - evaluate one line number expression, increment i integer function getone(lin, i, num) character lin(MAXLINE) integer i, istart, num integer addstr, addset, ctoi, optpat include csedit getone = OK call skipbl(lin, i) istart = i if (lin(i) >= '0' & lin(i) <= '9') { num = ctoi(lin, i) i = i - 1 # move back; to be advanced at the end if (num < 0) getone = ERR num = -num } else if (lin(i) == LASTLINE) num = -HUGE else if (lin(i) == '/') { if (optpat(lin, i) == ERR) # build the pattern getone = ERR else if (lin(i) == '/') { num = lastbf junk = addstr(pat, buf, lastbf, MAXBUF) if (addset(EOS, buf, lastbf, MAXBUF) == NO) getone = ERR } } else getone = EOF if (getone == OK) i = i + 1 # point at next character to be examined call skipbl(lin, i) if (i <= istart) getone = EOF else getone = OK return end #-h- getrhs 494 asc 25-mar-82 08:37:14 v1.1 (sw-tools v1.1) # getrhs - get substitution string for "s" command integer function getrhs(lin, i, sub, gflag) character lin(MAXLINE), sub(MAXPAT) integer maksub character clower integer gflag, i getrhs = ERR if (lin(i) == EOS) return if (lin(i + 1) == EOS) return i = maksub(lin, i + 1, lin(i), sub) if (i == ERR) return if (clower(lin(i + 1)) == GLOBAL) { i = i + 1 gflag = YES } else gflag = NO getrhs = OK return end #-h- maksub 648 asc 25-mar-82 08:37:15 v1.1 (sw-tools v1.1) ## maksub - make substitution string in sub (/*/sor/chr) integer function maksub(arg, from, delim, sub) character esc character arg(MAXARG), delim, sub(MAXPAT) integer addset integer from, i, j, junk j = 1 for (i = from; arg(i) != delim & arg(i) != EOS; i = i + 1) if (arg(i) == AND) junk = addset(DITTO, sub, j, MAXPAT) else junk = addset(esc(arg, i), sub, j, MAXPAT) if (arg(i) != delim) # missing delimiter maksub = ERR else if (addset(EOS, sub, j, MAXPAT) == NO) # no room maksub = ERR else maksub = i return end #-h- optpat 546 asc 25-mar-82 08:37:15 v1.1 (sw-tools v1.1) # optpat - make pattern if specified at lin(i) integer function optpat(lin, i) character lin(MAXLINE) integer makpat integer i include csedit if (lin(i) == EOS) i = ERR else if (lin(i + 1) == EOS) i = ERR else if (lin(i + 1) == lin(i)) # repeated delimiter i = i + 1 # leave existing pattern alone else i = makpat(lin, i + 1, lin(i), pat) if (pat(1) == EOS) i = ERR if (i == ERR) { pat(1) = EOS optpat = ERR } else optpat = OK return end #-h- sed 818 asc 25-mar-82 08:37:17 v1.1 (sw-tools v1.1) # sed-execute all commands for file fd, use linbuf and increment lineno subroutine sed(linbuf, lineno, fd) character linbuf(MAXLINE) integer lineno, fd character buf1(MAXLINE), buf2(MAXLINE) integer getlin include csedit if (getlin(buf1, fd) == EOF) return if (lineno > 0) { # do previous last line lineno = lineno + 1 call docmds(linbuf, lineno) } repeat { if (getlin(buf2, fd) == EOF) { # buf1 contains last line call scopy(buf1, 1, linbuf, 1) break } lineno = lineno + 1 call docmds(buf1, lineno) if (getlin(buf1, fd) == EOF) { # buf2 contains last line call scopy(buf2, 1, linbuf, 1) break } lineno = lineno + 1 call docmds(buf2, lineno) } return end #-h- subst 1001 asc 25-mar-82 08:37:20 v1.1 (sw-tools v1.1) # subst - substitute sub for occurrences of pat in txt subroutine subst(txt, pat, sub, gflag, pflag) character txt(MAXLINE), pat(ARB), sub(ARB) integer gflag, pflag character new(MAXLINE) integer addset, amatch integer j, junk, k, lastm, m, subbed j = 1 subbed = NO lastm = 0 for (k = 1; txt(k) != EOS; ) { if (gflag == YES | subbed == NO) m = amatch(txt, k, pat) else m = 0 if (m > 0 & lastm != m) { # replace matched text subbed = YES call catsub(txt, k, m, sub, new, j, MAXLINE) lastm = m } if (m == 0 | m == k) { # no match or null match junk = addset(txt(k), new, j, MAXLINE) k = k + 1 } else # skip matched text k = m } if (subbed == YES) { if (addset(EOS, new, j, MAXLINE) == NO) return call scopy(new, 1, txt, 1) if (pflag == YES) call putlin(txt, STDOUT) } return end #-h- sedit.fmt 4790 asc 25-mar-82 08:38:33 v1.1 (sw-tools v1.1) .so ~bin/manhdr .hd Sedit (1) 30-Nov-79 stream editor .sy sedit [-n] {[-e script | -f sfile]... | script} [file]... .ds sedit copies the named input files to the standard output, performing editing as directed by sedit commands in "script" or in "sfile". The -e flag indicates that the next argument is to be interpreted as an sedit command (see below). The -f flag indicates that the next argument is the name of a file in which sedit commands appear one per line. The -e and -f arguments may be intermixed in any order. The order of command execution is the order in which commands are read. If no -e or -f flags are given, the first argument is used as an sedit command. Normally, sedit writes each line of input to the output after editing; the -n option suppresses this action. As a result, the only output is that resulting from sedit commands. When the first argument not in the scope of a flag is encountered, it and all succeeding arguments are taken as input files. If no files are given, or if the name "-" is specified, the standard input is read. .sp Sedit commands have the general form .sp .in +3 .nf line1 [, line2] command arguments .in -3 .sp .fi A line number (line1 or line2) is either a decimal number that refers to a specific input line (input lines are counted cumulatively across files), a "$" that refers to the last line of input, or a /pattern/ where pattern is a regular expression (as in edit). Line number 0 may be used to specify commands that should be executed before any input is read. .sp A command with no line numbers is applied to every line of input. A command with one line number is applied to every line of input that matches the line number. A command with two line numbers is applied to every line of input beginning with the first line that matches line1 through the next line that matches line2. Thereafter, the process is repeated, looking again for a line that matches line1. .sp Sedit accepts the following commands. Each command may be used with 0, 1, or 2 line numbers. The a, c, and i commands may not appear in command line scripts. .sp .nf .cc + a . +cc . .fi .in +3 Append. The is placed on the output after each selected line. The does not change the line number nor is it subject to subsequent sedit commands. .in -3 .sp .ne 5 .nf .cc + c . +cc . .fi .in +3 Change. The selected lines are deleted and is placed on the output in their place. The does not change the line number nor is it subject to subsequent sedit commands. .in -3 .sp d .in +3 Delete. The selected lines are deleted. .in -3 .sp .nf .cc + i . +cc . .fi .in +3 Insert. The is placed on the output before each selected line. The does not change the line number nor is it subject to subsequent sedit commands. .in -3 .sp p .in +3 Print. The selected lines are printed on the standard output. .in -3 .sp r file .in +3 Read file. The contents of "file" are placed on the output after each selected line exactly as if the contents were given as in an a command. The new lines do not change the line number nor are they subject to subsequent sedit commands. .in -3 .sp s/pat/new/gp .in +3 Substitute. The leftmost occurrences of pat in the selected lines is changed to new. If g is specified, all occurrences are changed. If p is specified, the resulting line is printed. .in -3 .sp w file .in +3 Write file. The selected lines are appended to "file". Files mentioned in w commands are created before processing begins. The limit on the number of w commands depends on the number of files that can be opened at the same time. .in -3 .sp = .in +3 Print line number. The current line number is printed on the output as a line. .in -3 .sp Text appended by a, c, or r commands is placed on the output in the same order as the execution of the commands. Similar comments apply to text inserted by i commands. .sp Sedit can accomodate commands totaling approximately 5000 characters (including arguments), and lines up to 120 characters in length. .fi .sa edit, change, find, tr .di In addition to the usual error messages resulting from file access failure, sedit issues the following messages preceeding by the offending command line. .sp bad line numbers .in +3 indicates that the line number expressions are invalid. .in -3 .sp invalid command .in +3 indicates that the command preceeding the message is illegal. This message is issued for a, i, or c commands if they appear in command string scripts. .in -3 .sp too many commands .in +3 indicates exhaustion of space to hold commands. The size of the command buffer is determined by the MAXBUF definition in the source code. .in -3 .au Chris Fraser (U. of Arizona) .bu .br The '$' indicator for end-of-file doesn't always work. %%E 1