new copyright; att/bsd/shared
[unix-history] / usr / src / usr.bin / diction / style / style.sh
CommitLineData
2791ff57 1#!/bin/sh -
2958d0fe 2#
2791ff57 3# %sccs.include.proprietary.sh%
2958d0fe 4#
2791ff57
KB
5# @(#)style.sh 4.8 (Berkeley) %G%
6#
7
435e8dff
KB
8L=/usr/libexec
9B=/usr/ucb
280efb10 10echo " " $*
2958d0fe 11sflag=-s
280efb10
RH
12eflag=
13Pflag=
14nflag=
2958d0fe
RH
15lflag=
16lcon=
17rflag=
18rcon=
cd1d5718 19mflag=-me
280efb10 20mlflag=-ml
cd1d5718 21kflag=
2958d0fe
RH
22for i in $*
23do case $i in
24-r) rflag=-r; shift; rcon=$1;shift;continue;;
25-l)lflag=-l; shift; lcon=$1;shift;continue;;
26-mm) mflag=-mm;shift;continue;;
27-ms) mflag=-ms;shift;continue;;
cd1d5718
RH
28-me) mflag=-me;shift;continue;;
29-ma) mflag=-ma;shift;continue;;
280efb10
RH
30-li|-ml) mlflag=-ml;shift;continue;;
31+li|-tt)mlflag=;shift;continue;;
2958d0fe
RH
32-p) sflag=-p;shift;continue;;
33-a) sflag=-a;shift;continue;;
34-e) eflag=-e;shift;continue;;
35-P) Pflag=-P;shift;continue;;
280efb10
RH
36-n) nflag=-n;shift;continue;;
37-N) nflag=-N;shift;continue;;
cd1d5718 38-k) kflag=-k;shift;continue;;
280efb10
RH
39-flags) echo $0 "[-flags] [-r num] [-l num] [-e] [-p] [-n] [-N] [-a] [-P] [-mm|-ms] [-li|+li] [file ...]";exit;;
40-*) echo unknown style flag $i; exit;;
41*) break;;
2958d0fe
RH
42esac
43done
44ccd657 44$B/deroff $kflag $mflag $mlflag $* | $L/style1 | $L/style2 | $L/style3 $rflag $rcon $lflag $lcon $sflag $nflag $eflag $Pflag