summaryrefslogtreecommitdiffstats
path: root/contrib/groff/src
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2000-12-05 18:49:44 +0000
committerru <ru@FreeBSD.org>2000-12-05 18:49:44 +0000
commita812d8b090bc4edc23150bff257717b24f282e41 (patch)
tree19d4540966cb92612af25d5154efcc062eefb5c5 /contrib/groff/src
parent2e2c9047c3a8b5b6fdcdcd4585d5b114f31cd386 (diff)
downloadFreeBSD-src-a812d8b090bc4edc23150bff257717b24f282e41.zip
FreeBSD-src-a812d8b090bc4edc23150bff257717b24f282e41.tar.gz
Virgin import of FSF groff v1.16.1
Diffstat (limited to 'contrib/groff/src')
-rw-r--r--contrib/groff/src/devices/grotty/grotty.man59
-rw-r--r--contrib/groff/src/libs/libgroff/illegal.cc19
-rw-r--r--contrib/groff/src/preproc/eqn/neqn.sh2
-rw-r--r--contrib/groff/src/roff/groff/groff.man147
-rw-r--r--contrib/groff/src/roff/nroff/nroff.man62
-rwxr-xr-xcontrib/groff/src/roff/nroff/nroff.sh127
6 files changed, 265 insertions, 151 deletions
diff --git a/contrib/groff/src/devices/grotty/grotty.man b/contrib/groff/src/devices/grotty/grotty.man
index d8d6ebd..51c6a49 100644
--- a/contrib/groff/src/devices/grotty/grotty.man
+++ b/contrib/groff/src/devices/grotty/grotty.man
@@ -1,5 +1,5 @@
.ig \"-*- nroff -*-
-Copyright (C) 1989-1995 Free Software Foundation, Inc.
+Copyright (C) 1989-2000 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -28,6 +28,10 @@ grotty \- groff driver for typewriter-like devices
] [
.IR files \|.\|.\|.
]
+.PP
+It is possible to have whitespace between the
+.B \-F
+option and its parameter.
.SH DESCRIPTION
.B grotty
translates the output of GNU
@@ -39,10 +43,13 @@ should invoked by using the
.B groff
command
with a
-.B \-Tascii
-or
+.BR \-Tascii ,
.B \-Tlatin1
-option.
+or
+.B \-Tutf8
+option on ASCII based systems, and with
+.B \-Tcp1047
+on EBCDIC based hosts.
If no files are given,
.B grotty
will read the standard input.
@@ -118,9 +125,11 @@ Search the directory
for font and device description files;
.I name
is the name of the device, usually
-.B ascii
+.BR ascii ,
+.BR latin1 ,
+.BR utf8 ,
or
-.BR latin1 .
+.BR cp1047 .
.TP
.B \-h
Use horizontal tabs in the output.
@@ -172,22 +181,48 @@ Device description file for
.B ascii
device.
.TP
-.B @FONTDIR@/devascii/ F
+.BI @FONTDIR@/devascii/ F
Font description file for font
.I F
of
-.B ascii device.
+.B ascii
+device.
.TP
.B @FONTDIR@/devlatin1/DESC
Device description file for
.B latin1
device.
.TP
-.B @FONTDIR@/devlatin1/ F
+.BI @FONTDIR@/devlatin1/ F
+Font description file for font
+.I F
+of
+.B latin1
+device.
+.TP
+.B @FONTDIR@/devutf8/DESC
+Device description file for
+.B utf8
+device.
+.TP
+.BI @FONTDIR@/devutf8/ F
+Font description file for font
+.I F
+of
+.B utf8
+device.
+.TP
+.B @FONTDIR@/devcp1047/DESC
+Device description file for
+.B cp1047
+device.
+.TP
+.BI @FONTDIR@/devcp1047/ F
Font description file for font
.I F
of
-.B latin1 device.
+.B cp1047
+device.
.TP
.B @MACRODIR@/tmac.tty
Macros for use with
@@ -196,6 +231,10 @@ Macros for use with
.B @MACRODIR@/tmac.tty-char
Additional klugey character definitions for use with
.BR grotty .
+.LP
+Note that on EBCDIC hosts, only files for the
+.B cp1047
+device will be installed.
.SH BUGS
.LP
.B grotty
diff --git a/contrib/groff/src/libs/libgroff/illegal.cc b/contrib/groff/src/libs/libgroff/illegal.cc
index 10f4d5b..c1bdbc5 100644
--- a/contrib/groff/src/libs/libgroff/illegal.cc
+++ b/contrib/groff/src/libs/libgroff/illegal.cc
@@ -3,6 +3,7 @@
// Table of illegal input characters.
char illegal_char_table[256]= {
+#ifndef IS_EBCDIC_HOST
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+#endif
};
diff --git a/contrib/groff/src/preproc/eqn/neqn.sh b/contrib/groff/src/preproc/eqn/neqn.sh
index 7703767..6a60d13 100644
--- a/contrib/groff/src/preproc/eqn/neqn.sh
+++ b/contrib/groff/src/preproc/eqn/neqn.sh
@@ -1,5 +1,5 @@
#!/bin/sh
# Provision of this shell script should not be taken to imply that use of
-# GNU eqn with groff -Tascii|-Tlatin1 is supported.
+# GNU eqn with groff -Tascii|-Tlatin1|-Tutf8|-Tcp1047 is supported.
exec @g@eqn -Tascii ${1+"$@"}
diff --git a/contrib/groff/src/roff/groff/groff.man b/contrib/groff/src/roff/groff/groff.man
index aa57f31..23dbf8e 100644
--- a/contrib/groff/src/roff/groff/groff.man
+++ b/contrib/groff/src/roff/groff/groff.man
@@ -1,5 +1,5 @@
.ig \"-*- nroff -*-
-Copyright (C) 1999 Free Software Foundation, Inc.
+Copyright (C) 1989-2000 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -31,55 +31,37 @@ the original English.
.SH NAME
groff \- front end for the groff document formatting system
.SH SYNOPSIS
+.nr a \n(.j
+.ad l
+.nr i \n(.i
+.in +\w'\fBgroff 'u
+.ti \niu
.B groff
-[
-.B \-abehilpstvzCENRSUVXZ
-]
-[
-.BI \-w name
-]
-[
-.BI \-W name
-]
-[
-.BI \-m name
-]
-[
-.BI \-F dir
-]
-[
-.BI \-I dir
-]
-[
-.BI \-T dev
-]
-[
-.BI \-f fam
-]
-[
-.BI \-M dir
-]
-[
-.BI \-d cs
-]
-[
-.BI \-r cn
-]
-[
-.BI \-n num
-]
-[
-.BI \-o list
-]
-[
-.BI \-P arg
-]
-[
-.BI \-L arg
-]
-[
-.IR files \|.\|.\|.\|
-]
+.de OP
+.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
+.el .RB "[\ " "\\$1" "\ ]"
+..
+.OP \-abeghilpstvzCEGNRSUVXZ
+.OP \-w name
+.OP \-W name
+.OP \-m name
+.OP \-F dir
+.OP \-I dir
+.OP \-T dev
+.OP \-f fam
+.OP \-M dir
+.OP \-d cs
+.OP \-r cn
+.OP \-n num
+.OP \-o list
+.OP \-P arg
+.OP \-L arg
+.RI "[\ " files\|.\|.\|. "\ ]"
+.br
+.ad \na
+.PP
+It is possible to have whitespace between a command line option and its
+parameter.
.SH DESCRIPTION
.B groff
is a front-end to the groff document formatting system.
@@ -105,11 +87,22 @@ For a 100dpi X11 previewer.
For typewriter-like devices.
.TP
.B latin1
-For typewriter-like devices using the ISO Latin-1 character set.
+For typewriter-like devices using the ISO Latin-1 (ISO 8859-1) character set.
+.TP
+.B utf8
+For typewriter-like devices using the Unicode (ISO 10646) character set with
+UTF-8 encoding.
+.TP
+.B cp1047
+For typewriter-like devices which use the EBCDIC code page IBM cp1047
+(e.g. OS/390 Unix).
.TP
.B lj4
For an HP LaserJet4-compatible (or other PCL5-compatible) printer.
.TP
+.B lbp
+For Canon CAPSL printers (LBP-4 and LBP-8 series laser printers).
+.TP
.B html
To produce HTML output.
.LP
@@ -125,6 +118,8 @@ The default device is
It can optionally preprocess with any of
.BR @g@pic ,
.BR @g@eqn ,
+.BR @g@grn ,
+.BR grap ,
.BR @g@tbl ,
.BR @g@refer ,
or
@@ -151,6 +146,12 @@ Preprocess with @g@eqn.
.B \-t
Preprocess with @g@tbl.
.TP
+.B \-g
+Preprocess with @g@grn.
+.TP
+.B \-G
+Preprocess with grap.
+.TP
.B \-p
Preprocess with @g@pic.
.TP
@@ -159,7 +160,7 @@ Preprocess with @g@soelim.
.TP
.BI \-I dir
This option is as described in
-.BR @g@soelim (@MAN1EXT@) .
+.BR @g@soelim (@MAN1EXT@).
This option implies the
.B \-s
option.
@@ -270,8 +271,8 @@ option to
and use the
.B \%\-msafer
macros with
-.BR @g@troff .
-(enabled by default)
+.B @g@troff
+(enabled by default).
.TP
.B \-U
Unsafe mode. Reverts to the old unsafe behaviour.
@@ -323,10 +324,12 @@ This also applies to
.BR tbl ,
.BR pic ,
.BR eqn ,
+.BR grn ,
.BR refer ,
and
.BR soelim .
It does not apply to
+.BR grap ,
.BR grops ,
.BR grodvi ,
.BR grotty ,
@@ -380,6 +383,28 @@ Font file for font
.I F
of device
.IR name .
+.LP
+Note that on EBCDIC hosts, output devices
+.BR ascii ,
+.BR latin1 ,
+and
+.B utf8
+aren't available.
+Similarly,
+.B cp1047
+is not available on ASCII based operating systems.
+.SH EXAMPLE
+To print the man page
+.B foo.1
+to the standard output using the latin-1 output device and
+.B less
+as the pager, the following command can be used:
+.IP
+.B groff -mandoc -Tlatin1 foo.1 | less
+.PP
+Alternatively, you can say
+.IP
+.B groff -m mandoc -Tlatin1 foo.1 | less
.SH AUTHOR
James Clark <jjc@jclark.com>
.SH BUGS
@@ -388,7 +413,7 @@ Include a complete, self-contained example
that will allow the bug to be reproduced,
and say which version of groff you are using.
.SH COPYRIGHT
-Copyright \(co 1989, 1990, 1991, 1992, 1999 Free Software Foundation, Inc.
+Copyright \(co 1989-2000 Free Software Foundation, Inc.
.LP
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
@@ -406,17 +431,29 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
.SH AVAILABILITY
The most recent released version of groff is always available for
anonymous ftp from ftp.gnu.org in the directory gnu/groff.
+.LP
+.B groff
+only supports the freely available
+.B grap
+implementation written by Ted Faber <faber@lunabase.org>.
+The actual version can be found at
+.IP
+\%http://www.lunabase.org/~faber/Vault/software/grap/
.SH "SEE ALSO"
.BR grog (@MAN1EXT@),
.BR @g@troff (@MAN1EXT@),
.BR @g@tbl (@MAN1EXT@),
.BR @g@pic (@MAN1EXT@),
.BR @g@eqn (@MAN1EXT@),
-.BR @g@soelim (@MAN1EXT@) ,
+.BR @g@grn (@MAN1EXT@),
+.BR grap (1),
+.BR @g@soelim (@MAN1EXT@),
.BR @g@refer (@MAN1EXT@),
.BR grops (@MAN1EXT@),
.BR grodvi (@MAN1EXT@),
.BR grotty (@MAN1EXT@),
+.BR grolj4 (@MAN1EXT@),
+.BR grolbp (@MAN1EXT@),
.BR grohtml (@MAN1EXT@),
.BR gxditview (@MAN1EXT@),
.BR groff_font (@MAN5EXT@),
diff --git a/contrib/groff/src/roff/nroff/nroff.man b/contrib/groff/src/roff/nroff/nroff.man
index 4087ebe..a01ea59 100644
--- a/contrib/groff/src/roff/nroff/nroff.man
+++ b/contrib/groff/src/roff/nroff/nroff.man
@@ -1,5 +1,5 @@
.ig \"-*- nroff -*-
-Copyright (C) 1989-1999 Free Software Foundation, Inc.
+Copyright (C) 1989-2000 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -20,31 +20,26 @@ the original English.
.SH NAME
@g@nroff \- emulate nroff command with groff
.SH SYNOPSIS
+.nr a \n(.j
+.ad l
+.nr i \n(.i
+.in +\w'\fB@g@nroff 'u
+.ti \niu
.B @g@nroff
-[
-.B \-h
-]
-[
-.B \-i
-]
-[
-.BI \-m name
-]
-[
-.BI \-n num
-]
-[
-.BI \-o list
-]
-[
-.BI \-r cn
-]
-[
-.BI \-T name
-]
-[
-.I file\|.\|.\|.
-]
+.de OP
+.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
+.el .RB "[\ " "\\$1" "\ ]"
+..
+.OP \-h
+.OP \-i
+.OP \-m name
+.OP \-n num
+.OP \-o list
+.OP \-r cn
+.OP \-T name
+.RI "[\ " file\|.\|.\|. "\ ]"
+.br
+.ad \na
.SH DESCRIPTION
The
.B @g@nroff
@@ -54,9 +49,11 @@ command using groff.
The
.B \-T
option with an argument other than
-.B ascii
-and
-.B latin1
+.BR ascii ,
+.BR latin1 ,
+.BR utf8 ,
+or
+.B cp1047
will be ignored.
The
.B \-h
@@ -85,9 +82,16 @@ Options
.B \-S
(safer) and
.B \-U
-(unsafe) are passed to groff.
+(unsafe) are passed to
+.BR groff .
.B \-S
is passed by default.
+.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
+loaded to emulate unrepresentable glyphs.
.SH "SEE ALSO"
.BR groff (@MAN1EXT@),
.BR @g@troff (@MAN1EXT@),
diff --git a/contrib/groff/src/roff/nroff/nroff.sh b/contrib/groff/src/roff/nroff/nroff.sh
index ee4e332..b1cab83 100755
--- a/contrib/groff/src/roff/nroff/nroff.sh
+++ b/contrib/groff/src/roff/nroff/nroff.sh
@@ -3,66 +3,81 @@
prog="$0"
# Default device.
-if test "X$LC_CTYPE" = "Xiso_8859_1" || test "X$LESSCHARSET" = "Xlatin1"
-then
- T=-Tlatin1
-else
- T=-Tascii
-fi
+# First try the "locale charmap" command, because it's most reliable.
+# On systems where it doesn't exist, look at the environment variables.
+case "`locale charmap 2>/dev/null`" in
+ UTF-8)
+ T=-Tutf8 ;;
+ ISO-8859-1)
+ T=-Tlatin1 ;;
+ IBM-1047)
+ T=-Tcp1047 ;;
+ *)
+ case "${LC_ALL-${LC_CTYPE-${LANG}}}" in
+ *.UTF-8)
+ T=-Tutf8 ;;
+ iso_8859_1 | *.ISO-8859-1)
+ T=-Tlatin1 ;;
+ *.IBM-1047)
+ T=-Tcp1047 ;;
+ *)
+ case "$LESSCHARSET" in
+ utf-8)
+ T=-Tutf8 ;;
+ latin1)
+ T=-Tlatin1 ;;
+ cp1047)
+ T=-Tcp1047 ;;
+ *)
+ T=-Tascii ;;
+ esac ;;
+ esac ;;
+esac
opts=
safer=-S
-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";
- ;;
+# `for i; do' doesn't work with some versions of sh
- -Tascii|-Tlatin1)
- T=$1
- ;;
- -T*)
- # ignore other devices
- ;;
- -S)
- # safer behaviour
- safer=-S
- ;;
- -U)
- # unsafe behaviour
- safer=-U
- ;;
- -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
+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 | -Tutf8 | -Tcp1047)
+ T=$1 ;;
+ -T*)
+ # ignore other devices
+ ;;
+ -S)
+ # safer behaviour
+ safer=-S ;;
+ -U)
+ # unsafe behaviour
+ safer=-U ;;
+ -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
OpenPOWER on IntegriCloud