Index: head/contrib/groff/src/devices/grotty/grotty.man =================================================================== --- head/contrib/groff/src/devices/grotty/grotty.man (revision 75589) +++ head/contrib/groff/src/devices/grotty/grotty.man (revision 75590) @@ -1,275 +1,275 @@ .ig \"-*- nroff -*- $FreeBSD$ 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 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 GROTTY @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" .SH NAME grotty \- groff driver for typewriter-like devices .SH SYNOPSIS .B grotty [ .B \-hfbuodBUv ] [ .BI \-F dir ] [ .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 .B troff 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 .BR \-Tascii , .BR \-Tkoi8-r , .B \-Tlatin1 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. A filename of .B \- will also cause .B grotty to read the standard input. Output is written to the standard output. .LP Normally .B grotty prints a bold character .I c using the sequence .RI ` c .SM BACKSPACE .IR c ' and a italic character .I c by the sequence .RB ` _ .SM BACKSPACE .IR c '. These sequences can be displayed on a terminal by piping through .BR ul (1). Pagers such as .BR more (1) or .BR less (1) are also able to display these sequences. Use either .B \-B or .B \-U when piping into .BR less (1); use .B \-b when piping into .BR more (1). There is no need to filter the output through .BR col (1) since .B grotty never outputs reverse line feeds. .LP The font description file may contain a command .IP .BI internalname\ n .LP where .I n is a decimal integer. If the 01 bit in .I n is set, then the font will be treated as an italic font; if the 02 bit is set, then it will be treated as a bold font. The code field in the font description field gives the code which will be used to output the character. This code can also be used in the .B \eN escape sequence in .BR troff . .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 , .BR koi8-r , .BR latin1 , .BR utf8 , or .BR cp1047 . .TP .B \-h Use horizontal tabs in the output. Tabs are assumed to be set every 8 columns. .TP .B \-f Use form feeds in the output. A form feed will be output at the end of each page that has no output on its last line. .TP .B \-b Suppress the use of overstriking for bold characters. .TP .B \-u Suppress the use of underlining for italic characters. .TP .B \-B Use only overstriking for bold-italic characters. .TP .B \-U Use only underlining for bold-italic characters. .TP .B \-o Suppress overstriking (other than for bold or underlined characters). .TP .B \-d Ignore all .B \eD commands. Without this .B grotty will render .B \eD'l\|.\|.\|.' commands that have at least at least one zero argument (and so are either horizontal or vertical) using .BR \- , .B | and .B + characters. .TP .B \-v Print the version number. .SH FILES .TP .B @FONTDIR@/devascii/DESC Device description file for .B ascii device. .TP .BI @FONTDIR@/devascii/ F Font description file for font .I F of .B ascii device. .TP .B @FONTDIR@/devkoi8-r/DESC Device description file for .B koi8-r device. .TP .BI @FONTDIR@/devkoi8-r/ F Font description file for font .I F of .B koi8-r device. .TP .B @FONTDIR@/devlatin1/DESC Device description file for .B latin1 device. .TP .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 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 .B cp1047 device will be installed. .SH BUGS .LP .B grotty is intended only for simple documents. .LP There is no support for fractional horizontal or vertical motions. .LP There is no support for .B \eD commands other than horizontal and vertical lines. .LP Characters above the first line (ie with a vertical position of 0) cannot be printed. .SH "SEE ALSO" .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), .BR groff_out (@MAN5EXT@), .BR groff_font (@MAN5EXT@), .BR groff_char (@MAN7EXT@), .BR ul (1), .BR more (1), .BR less (1) Index: head/contrib/groff/src/libs/libgroff/illegal.cc =================================================================== --- head/contrib/groff/src/libs/libgroff/illegal.cc (revision 75589) +++ head/contrib/groff/src/libs/libgroff/illegal.cc (revision 75590) @@ -1,43 +1,62 @@ +/* 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" // 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, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, #else 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 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, 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, 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, 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, #endif }; Index: head/contrib/groff/src/preproc/eqn/neqn.sh =================================================================== --- head/contrib/groff/src/preproc/eqn/neqn.sh (revision 75589) +++ head/contrib/groff/src/preproc/eqn/neqn.sh (revision 75590) @@ -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 Index: head/contrib/groff/src/roff/groff/groff.man =================================================================== --- head/contrib/groff/src/roff/groff/groff.man (revision 75589) +++ head/contrib/groff/src/roff/groff/groff.man (revision 75590) @@ -1,471 +1,492 @@ .ig \"-*- nroff -*- 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 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. $FreeBSD$ .. .de TQ .br .ns .TP \\$1 .. .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP .el .TP "\\$1" .. .TH GROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" .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 .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. Normally it runs the .B @g@troff program and a postprocessor appropriate for the selected device. Available devices are: .TP .B ps For PostScript printers and previewers .TP .B dvi 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. .TP .B ascii For typewriter-like devices. .TP .B latin1 For typewriter-like devices using the ISO Latin-1 (ISO 8859-1) character set. .TP .B koi8-r For typewriter-like devices using the Russian KOI8-R 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 The postprocessor to be used for a device is specified by the .B postpro command in the device description file. This can be overridden with the .B \-X option. .LP The default device is .BR @DEVICE@ . 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 .B @g@soelim. .LP Options without an argument can be grouped behind a single .BR \- . A filename of .B \- denotes the standard input. .LP The .B grog command can be used to guess the correct groff command to use to format a file. .SH OPTIONS .TP .B \-h Print a help message. .TP .B \-e Preprocess with @g@eqn. .TP .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 .B \-s Preprocess with @g@soelim. .TP .BI \-I dir This option is as described in .BR @g@soelim (@MAN1EXT@). This option implies the .B \-s option. .TP .B \-R Preprocess with @g@refer. No mechanism is provided for passing arguments to .B @g@refer because most @g@refer options have equivalent commands which can be included in the file. See .BR @g@refer (@MAN1EXT@) for more details. .TP .B \-v Make programs run by .B groff print out their version number. .TP .B \-V Print the pipeline on stdout instead of executing it. .TP .B \-z Suppress output from .BR @g@troff . Only error messages will be printed. .TP .B \-Z Do not postprocess the output of .BR @g@troff . Normally .B groff will automatically run the appropriate postprocessor. .TP .BI \-P arg Pass .I arg to the postprocessor. Each argument should be passed with a separate .B \-P option. Note that .B groff does not prepend .B \- to .I arg 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 .I arg to the spooler. Each argument should be passed with a separate .B \-L option. Note that .B groff does not prepend .B \- 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 .IR dev . The default device is .BR @DEVICE@ . .TP .B \-X Preview with .B gxditview instead of using the usual postprocessor. .B Groff passes .B gxditview a .B -printCommand option which will make the .B Print action do what .B groff would have done if the .B -l option had been given. This is unlikely to produce good results except with .BR \-Tps . .TP .B \-N Don't allow newlines with eqn delimiters. This is the same as the .B \-N option in .BR @g@eqn . .TP .B \-S 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. .TP .B \-a .TQ .B \-b .TQ .B \-i .TQ .B \-C .TQ .B \-E .TQ .BI \-w name .TQ .BI \-W name .TQ .BI \-m name .TQ .BI \-o list .TQ .BI \-d cs .TQ .BI \-r cn .TQ .BI \-F dir .TQ .BI \-M dir .TQ .BI \-f fam .TQ .BI \-n num These are as described in .BR @g@troff (@MAN1EXT@) . .SH ENVIRONMENT .TP .SM .B GROFF_COMMAND_PREFIX If this is set .IR X , then .B groff will run .IB X troff instead of .BR @g@troff . 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 , .BR grolj4 , .BR grohtml , and .BR gxditview . .TP .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 Default device. .TP .SM .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 The directory in which temporary files will be created. If this is not set and .B .SM TMPDIR is set, temporary files will be created in that directory. Otherwise temporary files will be created in .BR /tmp . The .BR grops (@MAN1EXT@) and .BR @g@refer (@MAN1EXT@) commands can create temporary files. .SH FILES .Tp \w'\fB@FONTDIR@/dev\fIname\fB/DESC'u+3n .BI @FONTDIR@/dev name /DESC Device description file for device .IR name . .TP .BI @FONTDIR@/dev name / F 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 .SH BUGS Report bugs to bug-groff@gnu.org. 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-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 Software Foundation; either version 2, or (at your option) any later version. .LP 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. .LP 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. .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 . 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@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@), .BR groff_out (@MAN5EXT@), .BR groff_man (@MAN7EXT@), .BR groff_ms (@MAN7EXT@), .BR groff_me (@MAN7EXT@), -.BR groff_char (@MAN7EXT@), -.BR groff_msafer (@MAN7EXT@) +.BR groff_char (@MAN7EXT@) Index: head/contrib/groff/src/roff/nroff/nroff.man =================================================================== --- head/contrib/groff/src/roff/nroff/nroff.man (revision 75589) +++ head/contrib/groff/src/roff/nroff/nroff.man (revision 75590) @@ -1,106 +1,120 @@ .ig \"-*- nroff -*- 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 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. $FreeBSD$ .. .TH @G@NROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" .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 .de OP .ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" .el .RB "[\ " "\\$1" "\ ]" .. +.OP \-v .OP \-h .OP \-i .OP \-m name .OP \-n num .OP \-o list .OP \-p .OP \-r cn .OP \-t .OP \-T name .RI "[\ " file\|.\|.\|. "\ ]" .br .ad \na .SH DESCRIPTION The .B @g@nroff script emulates the .B nroff command using groff. The .B \-T option with an argument other than .BR ascii , .BR latin1 , .BR koi8-r , .BR utf8 , or .B cp1047 -will be ignored. +will be ignored (and +.B \-Tascii +will be used). 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 . Options -.BR \-p , -.BR \-t , +.B \-p +(pic), +.B \-t +(tbl), .B \-S (safer) and .B \-U (unsafe) are passed to .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@), .BR @g@troff (@MAN1EXT@), .BR grotty (@MAN1EXT@) Index: head/contrib/groff/src/roff/nroff/nroff.sh =================================================================== --- head/contrib/groff/src/roff/nroff/nroff.sh (revision 75589) +++ head/contrib/groff/src/roff/nroff/nroff.sh (revision 75590) @@ -1,88 +1,101 @@ #!/bin/sh # Emulate nroff with groff. # $FreeBSD$ prog="$0" # Default device. # 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 | *.ISO_8859-1) T=-Tlatin1 ;; *.IBM-1047) T=-Tcp1047 ;; *.KOI8-R) T=-Tkoi8-r ;; *) case "$LESSCHARSET" in utf-8) T=-Tutf8 ;; latin1) T=-Tlatin1 ;; cp1047) T=-Tcp1047 ;; *) T=-Tascii ;; esac ;; esac ;; esac opts= safer=-S # `for i; do' doesn't work with some versions of sh 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 ;; - -[itp] | -[mrno]*) + -[ipt] | -[mrno]*) opts="$opts $1" ;; -Tascii | -Tlatin1 | -Tkoi8-r | -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. ;; + -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 ;; -) 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 $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 Index: head/contrib/groff/tmac/troffrc =================================================================== --- head/contrib/groff/tmac/troffrc (revision 75589) +++ head/contrib/groff/tmac/troffrc (revision 75590) @@ -1,41 +1,38 @@ .\" Startup file for troff. .\" $FreeBSD$ .\" This is tested by pic. .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'. .do hla us .\" Load hyphenation patterns from `hyphen.us' (in the tmac directory). .do hpf hyphen.us .\} .\" Don't let blank lines creep in here.