xref: /original-bsd/usr.bin/diction/style/style.sh (revision 1364b7d2)
1#! /bin/sh
2#
3#	@(#)style.sh	4.6	(Berkeley)	89/05/11
4#
5L=/usr/libexec
6B=/usr/ucb
7echo " " $*
8sflag=-s
9eflag=
10Pflag=
11nflag=
12lflag=
13lcon=
14rflag=
15rcon=
16mflag=-me
17mlflag=-ml
18kflag=
19for i in $*
20do case $i in
21-r) rflag=-r; shift; rcon=$1;shift;continue;;
22-l)lflag=-l; shift; lcon=$1;shift;continue;;
23-mm) mflag=-mm;shift;continue;;
24-ms) mflag=-ms;shift;continue;;
25-me) mflag=-me;shift;continue;;
26-ma) mflag=-ma;shift;continue;;
27-li|-ml) mlflag=-ml;shift;continue;;
28+li|-tt)mlflag=;shift;continue;;
29-p) sflag=-p;shift;continue;;
30-a) sflag=-a;shift;continue;;
31-e) eflag=-e;shift;continue;;
32-P) Pflag=-P;shift;continue;;
33-n) nflag=-n;shift;continue;;
34-N) nflag=-N;shift;continue;;
35-k) kflag=-k;shift;continue;;
36-flags) echo $0 "[-flags] [-r num] [-l num] [-e] [-p] [-n] [-N] [-a] [-P] [-mm|-ms] [-li|+li] [file ...]";exit;;
37-*) echo unknown style flag $i; exit;;
38*) break;;
39esac
40done
41$B/deroff $kflag $mflag $mlflag $*^$L/style1^$L/style2^$L/style3 $rflag $rcon $lflag $lcon $sflag $nflag $eflag $Pflag
42