diff options
Diffstat (limited to 'gnu/usr.bin/groff/nroff')
| -rw-r--r-- | gnu/usr.bin/groff/nroff/Makefile | 11 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/nroff/nroff.1 | 58 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/nroff/nroff.sh | 52 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/nroff/psroff.sh | 2 |
4 files changed, 123 insertions, 0 deletions
diff --git a/gnu/usr.bin/groff/nroff/Makefile b/gnu/usr.bin/groff/nroff/Makefile new file mode 100644 index 000000000000..36d1a885d4c8 --- /dev/null +++ b/gnu/usr.bin/groff/nroff/Makefile @@ -0,0 +1,11 @@ +MAN1= nroff.1 + +afterinstall: + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + $(.CURDIR)/nroff.sh $(DESTDIR)$(BINDIR)/nroff + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + $(.CURDIR)/psroff.sh $(DESTDIR)$(BINDIR)/psroff + +.include <../../../usr.bin/Makefile.inc> +.include <../Makefile.cfg> +.include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/nroff/nroff.1 b/gnu/usr.bin/groff/nroff/nroff.1 new file mode 100644 index 000000000000..1dae0571869f --- /dev/null +++ b/gnu/usr.bin/groff/nroff/nroff.1 @@ -0,0 +1,58 @@ +.TH NROFF 1 "10 August 1992" "Groff Version 1.08" +.SH NAME +nroff \- emulate nroff command with groff +.SH SYNOPSIS +.B nroff +[ +.B \-hi +] +[ +.BI \-m name +] +[ +.BI \-n num +] +[ +.BI \-o list +] +[ +.BI \-r cn +] +[ +.BI \-T name +] +[ +.I file\|.\|.\|. +] +.SH DESCRIPTION +The +.B nroff +script emulates the +.B nroff +command using groff. +The +.B \-T +option with an argument other than +.B ascii +and +.B latin1 +will be ignored. +The +.B \-h +option +is equivalent to the +.B grotty +.B \-h +option. +Other options are as described in +.BR troff (1). +In addition the +.BR \-e , +.B \-q +and +.B \-s +options are silently ignored. +.SH "SEE ALSO" +.BR groff (1), +.BR troff (1), +.BR grotty (1) diff --git a/gnu/usr.bin/groff/nroff/nroff.sh b/gnu/usr.bin/groff/nroff/nroff.sh new file mode 100644 index 000000000000..1be695995f2d --- /dev/null +++ b/gnu/usr.bin/groff/nroff/nroff.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# Emulate nroff with groff. + +prog="$0" +# Default device. +T=-Tascii +opts= + +for i +do + case $1 in + -h) + opts="$opts -P-h" + ;; + -[eq]|-s*) + # ignore these options + ;; + -[mrnoT]) + echo "$prog: option $1 requires an argument" >&2 + exit 1 + ;; + -i|-[mrno]*) + opts="$opts $1"; + ;; + + -Tascii|-Tlatin1) + T=$1 + ;; + -T*) + # ignore other devices + ;; + --) + shift + break + ;; + -) + break + ;; + -*) + echo "$prog: invalid option $1" >&2 + exit 1 + ;; + *) + break + ;; + esac + shift +done + +# This shell script is intended for use with man, so warnings are +# probably not wanted. Also load nroff-style character definitions. +exec groff -Wall -mtty-char $T $opts ${1+"$@"} diff --git a/gnu/usr.bin/groff/nroff/psroff.sh b/gnu/usr.bin/groff/nroff/psroff.sh new file mode 100644 index 000000000000..8a9008234b43 --- /dev/null +++ b/gnu/usr.bin/groff/nroff/psroff.sh @@ -0,0 +1,2 @@ +#! /bin/sh - +exec groff -Tps -l -C ${1+"$@"} |
