BSD 3 development
authorEric Schmidt <schmidt@ucbvax.Berkeley.EDU>
Sun, 16 Dec 1979 11:50:22 +0000 (03:50 -0800)
committerEric Schmidt <schmidt@ucbvax.Berkeley.EDU>
Sun, 16 Dec 1979 11:50:22 +0000 (03:50 -0800)
Work on file usr/src/cmd/net/nettroff.sh

Synthesized-from: 3bsd

usr/src/cmd/net/nettroff.sh [new file with mode: 0755]

diff --git a/usr/src/cmd/net/nettroff.sh b/usr/src/cmd/net/nettroff.sh
new file mode 100755 (executable)
index 0000000..a811cd5
--- /dev/null
@@ -0,0 +1,50 @@
+#      nettroff        typeset on CC or VAX typesetter
+#      VAX->A version
+set local=v
+set typesetter=a
+set troff=troff
+set net=/usr/ucb/net
+set whoami=/usr/ucb/whoami
+onintr remove
+set flags=() noglob length=() fonts=() fontf=()
+top:
+       if ($#argv > 0) then
+               switch ($argv[1])
+
+               case -l*:
+               case -F:
+               case -1:
+               case -2:
+               case -3:
+               case -a:
+               case -b:
+               case -f:
+               case -g:
+               case -s*:
+               case -w:
+                       echo $argv[1] not allowed.
+                       exit(1)
+
+               case -*:
+                       set flags = ($flags $argv[1])
+                       shift argv
+                       goto top
+
+               endsw
+       endif
+if ($#argv == 0) then
+       set argv=(-)
+endif
+$troff -t $flags $fontf $* >/usr/tmp/vp$$
+# check for valid format before sending off to A machine
+/usr/net/bin/chktroff /usr/tmp/vp$$
+if ($status != 0) then
+       goto remove
+endif
+set person=`$whoami`
+$net -q -m $typesetter -s /usr/tmp/vp$$ -c "nettroff $*" "/usr/lib/ntq -m $local -n $person"
+remove:
+rm -f /usr/tmp/vp$$
+if ($#fontf) then
+       rm -f $fontf
+endif