# term --- set terminal characteristics include LIBRARY_DEFS character arg (MAXARG) integer i integer getarg if (getarg (1, arg, MAXARG) == EOF) call display else { for (i = 1; getarg (i, arg, MAXARG) ~= EOF; i += 1) { if (arg (1) == '-'c) call do_opt (arg (2), i) else call do_term (arg) } } stop end # do_term --- process argument for term subroutine do_term (term) character term (ARB) integer ttyp$v, equal call mapstr (term, LOWER) # map to lower case if (equal ("help"s, term) == YES || equal ("?"s, term) == YES) call ttyp$l else if (ttyp$v (term) == YES) ; else call usage return end # do_opt --- process