diff options
author | ru <ru@FreeBSD.org> | 2001-04-17 12:28:31 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-04-17 12:28:31 +0000 |
commit | 23037f0339920a6a0f894a36b8e4e7e0194d7b21 (patch) | |
tree | e1cc44888559fb9d91ea1e643ce3b22043c4db1e /contrib | |
parent | 9fef68f9b1ef42dddc920d77e18a02709873368f (diff) | |
download | FreeBSD-src-23037f0339920a6a0f894a36b8e4e7e0194d7b21.zip FreeBSD-src-23037f0339920a6a0f894a36b8e4e7e0194d7b21.tar.gz |
Merge Groff 1.17 changes.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/groff/src/devices/grotty/grotty.man | 12 | ||||
-rw-r--r-- | contrib/groff/src/libs/libgroff/illegal.cc | 21 | ||||
-rw-r--r-- | contrib/groff/src/preproc/eqn/neqn.sh | 30 | ||||
-rw-r--r-- | contrib/groff/src/roff/groff/groff.man | 47 | ||||
-rw-r--r-- | contrib/groff/src/roff/nroff/nroff.man | 22 | ||||
-rwxr-xr-x | contrib/groff/src/roff/nroff/nroff.sh | 17 | ||||
-rw-r--r-- | contrib/groff/tmac/troffrc | 37 |
7 files changed, 127 insertions, 59 deletions
diff --git a/contrib/groff/src/devices/grotty/grotty.man b/contrib/groff/src/devices/grotty/grotty.man index 0069240..935c73d 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 6ab2a50..07a9a8a 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 49cd70f..745599b 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 6244404..4bb321f 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 e33feb9..f7f6d38 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 d658657..f2e02f3 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 diff --git a/contrib/groff/tmac/troffrc b/contrib/groff/tmac/troffrc index 0b3bdd6..ea4ce48 100644 --- a/contrib/groff/tmac/troffrc +++ b/contrib/groff/tmac/troffrc @@ -4,33 +4,30 @@ .nr 0p 0 .\" Use .do here, so that it works with -C. .\" The groff command defines the .X string if the -X option was given. -.ie r.X .do ds troffrc!ps tmac.Xps -.el .do ds troffrc!ps tmac.ps -.do ds troffrc!dvi tmac.dvi -.do ds troffrc!X75 tmac.X -.do ds troffrc!X75-12 tmac.X -.do ds troffrc!X100 tmac.X -.do ds troffrc!X100-12 tmac.X -.do ds troffrc!ascii tmac.tty -.do ds troffrc!latin1 tmac.tty -.do ds troffrc!koi8-r tmac.tty -.do ds troffrc!utf8 tmac.tty -.do ds troffrc!cp1047 tmac.tty -.do ds troffrc!lj4 tmac.lj4 -.do ds troffrc!lbp tmac.lbp -.do ds troffrc!html tmac.arkup +.ie r.X .do ds troffrc!ps Xps.tmac +.el .do ds troffrc!ps ps.tmac +.do ds troffrc!dvi dvi.tmac +.do ds troffrc!X75 X.tmac +.do ds troffrc!X75-12 X.tmac +.do ds troffrc!X100 X.tmac +.do ds troffrc!X100-12 X.tmac +.do ds troffrc!ascii tty.tmac +.do ds troffrc!latin1 tty.tmac +.do ds troffrc!koi8-r tty.tmac +.do ds troffrc!utf8 tty.tmac +.do ds troffrc!cp1047 tty.tmac +.do ds troffrc!lj4 lj4.tmac +.do ds troffrc!lbp lbp.tmac +.do ds troffrc!html www.tmac .do if d troffrc!\*[.T] \ . do mso \*[troffrc!\*[.T]] .do rm troffrc!ps troffrc!Xps troffrc!dvi troffrc!X75 troffrc!X75-12 \ troffrc!X100 troffrc!X100-12 troffrc!lj4 troff!lbp troffrc!html .ie '\*(.T'cp1047' .do tr \[char65] -.el \{\ -.ie "\*[.T]"koi8-r" .do tr \[char154] -.el .do tr \[char160] -.\} +.el .if !"\*[.T]"koi8-r" .do tr \[char160] .ie "\*[.T]"koi8-r" \{\ .do hla us-ru -.do hpf locale/hyphen.us-ru +.do hpf hyphen.us-ru .\} .el \{\ .\" Set the hyphenation language to `us'. |