From 7fdf49473c970aa96ee1bae16928d1db23643228 Mon Sep 17 00:00:00 2001 From: pst Date: Sat, 7 Sep 1996 16:18:32 +0000 Subject: Virgin import of FSF groff v1.10 --- contrib/groff/nroff/Makefile.sub | 17 ++++++++ contrib/groff/nroff/nroff.man | 87 ++++++++++++++++++++++++++++++++++++++++ contrib/groff/nroff/nroff.sh | 61 ++++++++++++++++++++++++++++ 3 files changed, 165 insertions(+) create mode 100644 contrib/groff/nroff/Makefile.sub create mode 100644 contrib/groff/nroff/nroff.man create mode 100755 contrib/groff/nroff/nroff.sh (limited to 'contrib/groff/nroff') diff --git a/contrib/groff/nroff/Makefile.sub b/contrib/groff/nroff/Makefile.sub new file mode 100644 index 0000000..096c046 --- /dev/null +++ b/contrib/groff/nroff/Makefile.sub @@ -0,0 +1,17 @@ +MAN1=nroff.n +NAMEPREFIX=$(g) +CLEANADD=nroff + +all: nroff + +nroff: nroff.sh + rm -f $@ + sed "$(SH_SCRIPT_SED_CMD)" $(srcdir)/nroff.sh >$@ + chmod +x $@ + +install_data: nroff + -rm -f $(bindir)/$(NAMEPREFIX)nroff + $(INSTALL_PROGRAM) nroff $(bindir)/$(NAMEPREFIX)nroff + +uninstall_sub: + -rm -f $(bindir)/$(NAMEPREFIX)nroff diff --git a/contrib/groff/nroff/nroff.man b/contrib/groff/nroff/nroff.man new file mode 100644 index 0000000..38ae083 --- /dev/null +++ b/contrib/groff/nroff/nroff.man @@ -0,0 +1,87 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-1995 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.TH @G@NROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@nroff \- emulate nroff command with groff +.SH SYNOPSIS +.B @g@nroff +[ +.B \-h +] +[ +.B \-i +] +[ +.BI \-m name +] +[ +.BI \-n num +] +[ +.BI \-o list +] +[ +.BI \-r cn +] +[ +.BI \-T name +] +[ +.I file\|.\|.\|. +] +.SH DESCRIPTION +The +.B @g@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. +The +.BR \-i , +.BR \-n , +.BR \-m , +.B \-o +and +.B \-r +options have the effect described in +.BR @g@troff (@MAN1EXT@). +In addition +.B @g@nroff +silently ignores options of +.BR \-e , +.B \-q +or +.BR \-s . +.SH "SEE ALSO" +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@), +.BR grotty (@MAN1EXT@) diff --git a/contrib/groff/nroff/nroff.sh b/contrib/groff/nroff/nroff.sh new file mode 100755 index 0000000..7933025 --- /dev/null +++ b/contrib/groff/nroff/nroff.sh @@ -0,0 +1,61 @@ +#!/bin/sh +# Emulate nroff with groff. + +prog="$0" +# Default device. +if test "X$LC_CTYPE" = "Xiso_8859_1" || test "X$LESSCHARSET" = "Xlatin1" +then + T=-Tlatin1 +else + T=-Tascii +fi +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 + ;; + -u*) + # Solaris 2.2 `man' uses -u0; ignore it, + # since `less' and `more' can use the emboldening info. + ;; + --) + 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+"$@"} -- cgit v1.1