aboutsummaryrefslogtreecommitdiff
path: root/contrib/groff/src
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2001-04-17 12:28:31 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2001-04-17 12:28:31 +0000
commit96cdc9a0500624ea535a322d7d55c9ff41a5095a (patch)
treecdf9c36d68612ffb1a9f5c3f6ea459da9cfcad0a /contrib/groff/src
parent74cf10f1aa1bf0e01d9dc2d6367b37b9009224d6 (diff)
downloadsrc-96cdc9a0500624ea535a322d7d55c9ff41a5095a.tar.gz
src-96cdc9a0500624ea535a322d7d55c9ff41a5095a.zip
Merge Groff 1.17 changes.
Notes
Notes: svn path=/head/; revision=75590
Diffstat (limited to 'contrib/groff/src')
-rw-r--r--contrib/groff/src/devices/grotty/grotty.man12
-rw-r--r--contrib/groff/src/libs/libgroff/illegal.cc21
-rw-r--r--contrib/groff/src/preproc/eqn/neqn.sh30
-rw-r--r--contrib/groff/src/roff/groff/groff.man47
-rw-r--r--contrib/groff/src/roff/nroff/nroff.man22
-rwxr-xr-xcontrib/groff/src/roff/nroff/nroff.sh17
6 files changed, 110 insertions, 39 deletions
diff --git a/contrib/groff/src/devices/grotty/grotty.man b/contrib/groff/src/devices/grotty/grotty.man
index 00692404d91b..935c73dc6598 100644
--- a/contrib/groff/src/devices/grotty/grotty.man
+++ b/contrib/groff/src/devices/grotty/grotty.man
@@ -40,7 +40,7 @@ translates the output of GNU
into a form suitable for typewriter-like devices.
Normally
.B grotty
-should invoked by using the
+should be invoked by using the
.B groff
command
with a
@@ -122,9 +122,9 @@ escape sequence in
.SH OPTIONS
.TP
.BI \-F dir
-Search the directory
+Prepend directory
.IB dir /dev name
-for font and device description files;
+to the search path for font and device description files;
.I name
is the name of the device, usually
.BR ascii ,
@@ -239,12 +239,12 @@ of
.B cp1047
device.
.TP
-.B @MACRODIR@/tmac.tty
+.B @MACRODIR@/tty.tmac
Macros for use with
.BR grotty .
.TP
-.B @MACRODIR@/tmac.tty-char
-Additional klugey character definitions for use with
+.B @MACRODIR@/tty-char.tmac
+Additional klugdey character definitions for use with
.BR grotty .
.LP
Note that on EBCDIC hosts, only files for the
diff --git a/contrib/groff/src/libs/libgroff/illegal.cc b/contrib/groff/src/libs/libgroff/illegal.cc
index 6ab2a50090d4..07a9a8a52a04 100644
--- a/contrib/groff/src/libs/libgroff/illegal.cc
+++ b/contrib/groff/src/libs/libgroff/illegal.cc
@@ -1,3 +1,22 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ Written by James Clark (jjc@jclark.com)
+
+This file is part of groff.
+
+groff is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+groff is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License along
+with groff; see the file COPYING. If not, write to the Free Software
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
/* $FreeBSD$ */
#include "lib.h"
@@ -14,7 +33,7 @@ char illegal_char_table[256]= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
diff --git a/contrib/groff/src/preproc/eqn/neqn.sh b/contrib/groff/src/preproc/eqn/neqn.sh
index 49cd70f3e1d4..745599b46a7b 100644
--- a/contrib/groff/src/preproc/eqn/neqn.sh
+++ b/contrib/groff/src/preproc/eqn/neqn.sh
@@ -1,20 +1,24 @@
#!/bin/sh
# Provision of this shell script should not be taken to imply that use of
-# GNU eqn with groff -Tascii|-Tlatin1|-Tutf8|-Tcp1047 is supported.
+# GNU eqn with groff -Tascii|-Tlatin1|-Tkoi8-r|-Tutf8|-Tcp1047 is supported.
# $FreeBSD$
# Default device.
-locale=${LC_ALL:-${LC_CTYPE:-$LANG}}
-if test `expr "$locale" : ".*\.ISO_8859-1"` -gt 0
-then
- T=latin1
-else
-if test `expr "$locale" : ".*\.KOI8-R"` -gt 0
-then
- T=koi8-r
-else
- T=ascii
-fi
-fi
+case "${LC_ALL-${LC_CTYPE-${LANG}}}" in
+ *.UTF-8)
+ T=utf8 ;;
+ iso_8859_1 | *.ISO-8859-1 | *.ISO_8859-1)
+ T=latin1 ;;
+ *.IBM-1047)
+ T=cp1047 ;;
+ *.KOI8-R)
+ T=koi8-r ;;
+ *)
+ T=ascii ;;
+esac
+: ${GROFF_BIN_PATH=@BINDIR@}
+export PATH=$GROFF_BIN_PATH:$PATH
exec @g@eqn -T${T} ${1+"$@"}
+
+# eof
diff --git a/contrib/groff/src/roff/groff/groff.man b/contrib/groff/src/roff/groff/groff.man
index 6244404fe29f..4bb321f74092 100644
--- a/contrib/groff/src/roff/groff/groff.man
+++ b/contrib/groff/src/roff/groff/groff.man
@@ -81,7 +81,7 @@ For PostScript printers and previewers
For TeX dvi format.
.TP
.B X75
-For a 75 dpi X11 previewer.
+For a 75dpi X11 previewer.
.TP
.B X100
For a 100dpi X11 previewer.
@@ -217,10 +217,12 @@ to
before passing it to the postprocessor.
.TP
.B \-l
-Send the output to a printer.
+Send the output to a spooler for printing.
The command used for this is specified by the
.B print
-command in the device description file.
+command in the device description file (if not present,
+.B \-l
+has no effect).
.TP
.BI \-L arg
Pass
@@ -236,6 +238,11 @@ does not prepend
to
.I arg
before passing it to the postprocessor.
+If there is no
+.B print
+command in the device description file,
+.B \-L
+is ignored.
.TP
.BI \-T dev
Prepare output for device
@@ -274,11 +281,16 @@ Safer mode. Pass the
.B \-S
option to
.B @g@pic
-and use the
-.B \%\-msafer
-macros with
+and disable the following
.B @g@troff
-(enabled by default).
+requests:
+.BR .open ,
+.BR .opena ,
+.BR .pso ,
+.BR .sy ,
+and
+.BR .pi .
+For security reasons, safer mode is enabled by default.
.TP
.B \-U
Unsafe mode. Reverts to the old unsafe behaviour.
@@ -347,7 +359,10 @@ and
.SM
.B GROFF_TMAC_PATH
A colon separated list of directories in which to search for
-macro files.
+macro files in addition to the default directories.
+See
+.BR troff (1)
+for more details.
.TP
.SM
.B GROFF_TYPESETTER
@@ -357,12 +372,19 @@ Default device.
.B GROFF_FONT_PATH
A colon separated list of directories in which to search for the
.BI dev name
-directory.
+directory in addition to the default one.
+See
+.BR troff (1)
+for more details.
.TP
.SM
-.B PATH
-The search path for commands executed by
+.B GROFF_BIN_PATH
+This search path, followed by
+.BR PATH ,
+will be used for commands executed by
.BR groff .
+If not set, `@BINDIR@' is prepended to
+.BR PATH .
.TP
.SM
.B GROFF_TMPDIR
@@ -467,5 +489,4 @@ The actual version can be found at
.BR groff_man (@MAN7EXT@),
.BR groff_ms (@MAN7EXT@),
.BR groff_me (@MAN7EXT@),
-.BR groff_char (@MAN7EXT@),
-.BR groff_msafer (@MAN7EXT@)
+.BR groff_char (@MAN7EXT@)
diff --git a/contrib/groff/src/roff/nroff/nroff.man b/contrib/groff/src/roff/nroff/nroff.man
index e33feb94dccd..f7f6d38576e6 100644
--- a/contrib/groff/src/roff/nroff/nroff.man
+++ b/contrib/groff/src/roff/nroff/nroff.man
@@ -33,6 +33,7 @@ the original English.
.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
.el .RB "[\ " "\\$1" "\ ]"
..
+.OP \-v
.OP \-h
.OP \-i
.OP \-m name
@@ -60,7 +61,9 @@ option with an argument other than
.BR utf8 ,
or
.B cp1047
-will be ignored.
+will be ignored (and
+.B \-Tascii
+will be used).
The
.B \-h
option
@@ -85,8 +88,10 @@ silently ignores options of
or
.BR \-s .
Options
-.BR \-p ,
-.BR \-t ,
+.B \-p
+(pic),
+.B \-t
+(tbl),
.B \-S
(safer) and
.B \-U
@@ -94,11 +99,20 @@ Options
.BR groff .
.B \-S
is passed by default.
+.B \-v
+shows the version number.
+.SH ENVIRONMENT
+.TP
+.SM
+.B GROFF_BIN_PATH
+A colon separated list of directories in which to search for the
+.B groff
+executable. If unset, `@BINDIR@' is used.
.SH NOTES
This shell script is basically intended for use with
.BR man (1),
so warnings are suppressed.
-nroff-style character definitions (in the file tmac.tty-char) are also
+nroff-style character definitions (in the file tty-char.tmac) are also
loaded to emulate unrepresentable glyphs.
.SH "SEE ALSO"
.BR groff (@MAN1EXT@),
diff --git a/contrib/groff/src/roff/nroff/nroff.sh b/contrib/groff/src/roff/nroff/nroff.sh
index d6586572727a..f2e02f39d777 100755
--- a/contrib/groff/src/roff/nroff/nroff.sh
+++ b/contrib/groff/src/roff/nroff/nroff.sh
@@ -52,7 +52,7 @@ for i
-[mrnoT])
echo "$prog: option $1 requires an argument" >&2
exit 1 ;;
- -[itp] | -[mrno]*)
+ -[ipt] | -[mrno]*)
opts="$opts $1" ;;
-Tascii | -Tlatin1 | -Tkoi8-r | -Tutf8 | -Tcp1047)
T=$1 ;;
@@ -69,6 +69,12 @@ for i
# Solaris 2.2 `man' uses -u0; ignore it,
# since `less' and `more' can use the emboldening info.
;;
+ -v | --version)
+ echo "GNU nroff (groff) version @VERSION@"
+ exit 0 ;;
+ --help)
+ echo "usage: nroff [-h] [-i] [-mNAME] [-nNUM] [-oLIST] [-p] [-rCN] [-t] [-Tname] [FILE...]"
+ exit 0 ;;
--)
shift
break ;;
@@ -85,4 +91,11 @@ done
# This shell script is intended for use with man, so warnings are
# probably not wanted. Also load nroff-style character definitions.
-exec groff $safer -Wall -mtty-char $T $opts ${1+"$@"}
+
+OLD_PATH=$PATH
+: ${GROFF_BIN_PATH=@BINDIR@}
+export GROFF_BIN_PATH
+PATH=$GROFF_BIN_PATH
+PATH=$OLD_PATH groff $safer -Wall -mtty-char $T $opts ${1+"$@"}
+
+# eof