diff options
author | Colin Watson <cjwatson@debian.org> | 2007-08-28 11:18:39 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2007-08-28 11:18:39 +0100 |
commit | ad24989824295444bba175177871a085dd08343b (patch) | |
tree | 6874280a7cd0846ccaf87061653027f37f7afda6 /tools/mandb_fmt-script | |
parent | 151dbea65dba7b8c079126e80efc9b0151002e72 (diff) |
* tools/mandb_[nt]fmt-script: Rename to tools/mandb_fmt-script,
which is a rather less hostile filename.
* tools/README: Update.
* GNUmakefile.in: Update.
Diffstat (limited to 'tools/mandb_fmt-script')
-rw-r--r-- | tools/mandb_fmt-script | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/mandb_fmt-script b/tools/mandb_fmt-script new file mode 100644 index 00000000..96f660be --- /dev/null +++ b/tools/mandb_fmt-script @@ -0,0 +1,28 @@ +#! /bin/sh +# $1 : the source file +# $2 : the preprocessor string +# $3 : the output device (optional) + +prog=`basename $0` +prepipe= +postpipe= + +for p in `echo "$2" | sed 's/./& /g'` +do + case $p in + e) prepipe="$prepipe | /usr/bin/neqn" ;; + g) echo "$prog: can't preprocess with grap" >&2 ;; + p) echo "$prog: can't preprocess with pic" >&2 ;; + t) prepipe="$prepipe | /usr/bin/tbl" ; postpipe="| /usr/bin/col" ;; + r) prepipe="$prepipe | /usr/bin/refer" ;; + v) echo "$prog: can't preprocess with vgrind" >&2 ;; + *) echo "$prog: unknown preprocessor \`$p'" >&2 ;; + esac +done + +case $prog in + mandb_tfmt) postpipe="| /usr/bin/troff -t ${3+-T$3}" ;; + *) postpipe="| /usr/bin/nroff ${3+-T$3} $postpipe";; +esac + +eval "cat /usr/export/exec/sun4/lib/tmac/tmac.an $1 $prepipe $postpipe" |