1#! /bin/sh 2# 3# @(#)nettroff.sh 4.1 (Berkeley) 09/12/82 4# 5# nettroff typeset on CC or VAX typesetter 6# 7# don't change this code - it is updated remotely 8# mail problems to "csvax:schmidt" -- your changes wil be lost 9# 10# A machine phototypesetter version 11# 12set local=`cat /usr/include/whoami` 13set typesetter=a 14set troff=troff 15set net=/usr/ucb/net 16set whoami=/usr/ucb/whoami 17onintr remove 18set flags=() noglob length=() fonts=() fontf=() 19top: 20 if ($#argv > 0) then 21 switch ($argv[1]) 22 23 case -l*: 24 case -F: 25 case -1: 26 case -2: 27 case -3: 28 case -a: 29 case -b: 30 case -f: 31 case -g: 32 case -s*: 33 case -w: 34 echo $argv[1] not allowed. 35 exit(1) 36 37 case -*: 38 set flags = ($flags $argv[1]) 39 shift argv 40 goto top 41 42 endsw 43 endif 44if ($#argv == 0) then 45 set argv=(-) 46endif 47$troff -t $flags $fontf $* >/usr/tmp/vp$$ 48# check for valid format before sending off to A machine 49/usr/net/bin/chktroff /usr/tmp/vp$$ 50if ($status != 0) then 51 goto remove 52endif 53set person=`$whoami` 54$net -q -m $typesetter -s /usr/tmp/vp$$ -c "nettroff $*" "/usr/lib/ntq -m $local -n $person" 55remove: 56rm -f /usr/tmp/vp$$ 57if ($#fontf) then 58 rm -f $fontf 59endif 60