diff options
author | ru <ru@FreeBSD.org> | 2000-12-05 19:06:41 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2000-12-05 19:06:41 +0000 |
commit | 1f010d72ed9d0824998243537e0dd222b42d9fce (patch) | |
tree | 85ff7fdaa4b2bc9e4ac18caa8f24e9a56a3120a4 | |
parent | 074a14ffb2a44fe009f9e084ba3c279dfb001506 (diff) | |
download | FreeBSD-src-1f010d72ed9d0824998243537e0dd222b42d9fce.zip FreeBSD-src-1f010d72ed9d0824998243537e0dd222b42d9fce.tar.gz |
Resolve conflicts after v1.16.1 import.
-rw-r--r-- | contrib/groff/devascii/R.proto | 3 | ||||
-rw-r--r-- | contrib/groff/eqn/neqn.sh | 3 | ||||
-rw-r--r-- | contrib/groff/groff/groff.man | 153 | ||||
-rw-r--r-- | contrib/groff/grops/grops.man | 42 | ||||
-rw-r--r-- | contrib/groff/grotty/grotty.man | 85 | ||||
-rw-r--r-- | contrib/groff/libgroff/font.cc | 35 | ||||
-rw-r--r-- | contrib/groff/libgroff/illegal.cc | 21 | ||||
-rw-r--r-- | contrib/groff/man/groff_out.man | 9 | ||||
-rw-r--r-- | contrib/groff/nroff/nroff.man | 81 | ||||
-rwxr-xr-x | contrib/groff/nroff/nroff.sh | 135 | ||||
-rw-r--r-- | contrib/groff/src/devices/grotty/grotty.man | 85 | ||||
-rw-r--r-- | contrib/groff/src/libs/libgroff/illegal.cc | 21 | ||||
-rw-r--r-- | contrib/groff/src/preproc/eqn/neqn.sh | 3 | ||||
-rw-r--r-- | contrib/groff/src/roff/groff/groff.man | 153 | ||||
-rw-r--r-- | contrib/groff/src/roff/nroff/nroff.man | 81 | ||||
-rwxr-xr-x | contrib/groff/src/roff/nroff/nroff.sh | 135 | ||||
-rw-r--r-- | contrib/groff/tmac/eqnrc | 5 | ||||
-rw-r--r-- | contrib/groff/tmac/tmac.tty | 5 | ||||
-rw-r--r-- | contrib/groff/tmac/tmac.tty-char | 14 | ||||
-rw-r--r-- | contrib/groff/tmac/troffrc | 18 | ||||
-rw-r--r-- | contrib/groff/troff/troff.man | 128 |
21 files changed, 818 insertions, 397 deletions
diff --git a/contrib/groff/devascii/R.proto b/contrib/groff/devascii/R.proto index 41cf140..4d13f3c 100644 --- a/contrib/groff/devascii/R.proto +++ b/contrib/groff/devascii/R.proto @@ -1,9 +1,11 @@ +# $FreeBSD$ name R internalname 0 spacewidth 24 charset ! 24 0 0041 " 24 0 0042 +dq " lq " rq " # 24 0 0043 @@ -16,6 +18,7 @@ Do " aa " fm " aq " +cq " ( 24 0 0050 ) 24 0 0051 * 24 0 0052 diff --git a/contrib/groff/eqn/neqn.sh b/contrib/groff/eqn/neqn.sh index f33b68e..1ae98e8 100644 --- a/contrib/groff/eqn/neqn.sh +++ b/contrib/groff/eqn/neqn.sh @@ -1,6 +1,7 @@ #!/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. +# $FreeBSD$ # Default device. locale=${LC_CTYPE:-$LANG} diff --git a/contrib/groff/groff/groff.man b/contrib/groff/groff/groff.man index 1f95a77..6244404 100644 --- a/contrib/groff/groff/groff.man +++ b/contrib/groff/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 @@ -34,55 +34,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. @@ -108,13 +90,24 @@ 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 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 koi8-r -For typewriter-like devices using the russian KOI8-R character set. +.B lbp +For Canon CAPSL printers (LBP-4 and LBP-8 series laser printers). .TP .B html To produce HTML output. @@ -131,6 +124,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 @@ -157,6 +152,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 @@ -165,7 +166,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. @@ -276,8 +277,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. @@ -329,10 +330,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 , @@ -386,6 +389,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 @@ -394,7 +419,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 @@ -412,19 +437,31 @@ 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 grohtml (@MAN1EXT@), +.BR gxditview (@MAN1EXT@), .BR groff_font (@MAN5EXT@), .BR groff_out (@MAN5EXT@), .BR groff_man (@MAN7EXT@), diff --git a/contrib/groff/grops/grops.man b/contrib/groff/grops/grops.man index d93aa8e..aa2e9e2 100644 --- a/contrib/groff/grops/grops.man +++ b/contrib/groff/grops/grops.man @@ -1,5 +1,6 @@ .ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. +$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 @@ -26,20 +27,27 @@ the original English. .SH NAME grops \- PostScript driver for groff .SH SYNOPSIS +.nr a \n(.j +.ad l +.nr i \n(.i +.in +\w'\fBgrops 'u +.ti \niu .B grops -[ -.B \-glmv -] [ -.BI \-b n -] [ -.BI \-c n -] [ -.BI \-w n -] [ -.BI \-F dir -] [ -.IR files \|.\|.\|. -] +.de OP +.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" +.el .RB "[\ " "\\$1" "\ ]" +.. +.OP \-glmv +.OP \-b n +.OP \-c n +.OP \-w n +.OP \-F dir +.RI "[\ " files\|.\|.\|. "\ ]" +.br +.ad \na +.PP +It is possible to have whitespace between a command line option and its +parameter. .SH DESCRIPTION .B grops translates the output of GNU @@ -524,10 +532,8 @@ Conventions and contains a .B %%BoundingBox comment, then the bounding box can be automatically extracted from within groff by using the -.B sy -request to run the .B psbb -command. +request. .RS .LP The @@ -828,7 +834,7 @@ Macros to undo the effect of .BI /tmp/grops XXXXXX Temporary file. .SH "SEE ALSO" -.\" .BR afmtodit (@MAN1EXT@), +.BR afmtodit (@MAN1EXT@), .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), .BR psbb (@MAN1EXT@), diff --git a/contrib/groff/grotty/grotty.man b/contrib/groff/grotty/grotty.man index 4a109ce..0069240 100644 --- a/contrib/groff/grotty/grotty.man +++ b/contrib/groff/grotty/grotty.man @@ -1,5 +1,6 @@ .ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. +$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 @@ -28,6 +29,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 @@ -40,10 +45,13 @@ should invoked by using the command with a .BR \-Tascii , -.B \-Tkoi8-r -or +.BR \-Tkoi8-r , .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. @@ -120,9 +128,11 @@ for font and device description files; .I name is the name of the device, usually .BR ascii , -.B koi8-r +.BR koi8-r , +.BR latin1 , +.BR utf8 , or -.BR latin1 . +.BR cp1047 . .TP .B \-h Use horizontal tabs in the output. @@ -169,16 +179,64 @@ characters. Print the version number. .SH FILES .TP -.B @FONTDIR@/dev\fIname\fB/DESC +.B @FONTDIR@/devascii/DESC Device description file for -.I name +.B ascii device. .TP -.BI @FONTDIR@/dev\fIname\fB/ F +.BI @FONTDIR@/devascii/ F Font description file for font .I F of -.I name +.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 @@ -188,6 +246,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 @@ -209,4 +271,5 @@ cannot be printed. .BR groff_font (@MAN5EXT@), .BR groff_char (@MAN7EXT@), .BR ul (1), -.BR more (1) +.BR more (1), +.BR less (1) diff --git a/contrib/groff/libgroff/font.cc b/contrib/groff/libgroff/font.cc index e27b705..7e75c7b 100644 --- a/contrib/groff/libgroff/font.cc +++ b/contrib/groff/libgroff/font.cc @@ -43,6 +43,7 @@ struct font_char_metric { int pre_math_space; int italic_correction; int subscript_correction; + char *special_device_coding; }; struct font_kern_list { @@ -82,7 +83,7 @@ struct text_file { }; text_file::text_file(FILE *p, char *s) -: lineno(0), buf(0), size(0), skip_comments(1), fp(p), path(s) +: fp(p), path(s), lineno(0), size(0), skip_comments(1), buf(0) { } @@ -149,8 +150,8 @@ void text_file::error(const char *format, /* font functions */ font::font(const char *s) -: special(0), ligatures(0), kern_hash_table(0), space_width(0), - ch(0), ch_used(0), ch_size(0), ch_index(0), nindices(0), widths_cache(0) +: ligatures(0), kern_hash_table(0), space_width(0), ch_index(0), nindices(0), + ch(0), ch_used(0), ch_size(0), special(0), widths_cache(0) { name = new char[strlen(s) + 1]; strcpy(name, s); @@ -365,6 +366,12 @@ const char *font::get_internal_name() return internalname; } +const char *font::get_special_device_encoding(int c) +{ + assert(c >= 0 && c < nindices && ch_index[c] >= 0); + return( ch[ch_index[c]].special_device_coding ); +} + void font::alloc_ch_index(int index) { if (nindices == 0) { @@ -470,7 +477,7 @@ static char *trim_arg(char *p) return p; } -// If the font can't be found, then if not_found is NULL it will be set +// If the font can't be found, then if not_found is non-NULL, it will be set // to 1 otherwise a message will be printed. int font::load(int *not_found) @@ -669,6 +676,20 @@ int font::load(int *not_found) t.error("bad code `%1' for character `%2'", p, nm); return 0; } + + p = strtok(0, WS); + if ((p == NULL) || (strcmp(p, "--") == 0)) { + metric.special_device_coding = NULL; + } else { + char *name=(char *)malloc(strlen(p)+1); + + if (name == NULL) { + fatal("malloc failed while reading character encoding"); + } + strcpy(name, p); + metric.special_device_coding = name; + } + if (strcmp(nm, "---") == 0) { last_index = number_to_index(metric.code); add_entry(last_index, metric); @@ -756,6 +777,12 @@ int font::load_desc() else if (strcmp("tcommand", p) == 0) { tcommand = 1; } + else if (strcmp("pass_filenames", p) == 0) { + pass_filenames = 1; + } + else if (strcmp("use_charnames_in_special", p) == 0) { + use_charnames_in_special = 1; + } else if (strcmp("family", p) == 0) { p = strtok(0, WS); if (!p) { diff --git a/contrib/groff/libgroff/illegal.cc b/contrib/groff/libgroff/illegal.cc index ca9e088..6ab2a50 100644 --- a/contrib/groff/libgroff/illegal.cc +++ b/contrib/groff/libgroff/illegal.cc @@ -1,8 +1,11 @@ +/* $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, @@ -19,4 +22,22 @@ 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, +#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 }; diff --git a/contrib/groff/man/groff_out.man b/contrib/groff/man/groff_out.man index 225d8b2..ee9c99c 100644 --- a/contrib/groff/man/groff_out.man +++ b/contrib/groff/man/groff_out.man @@ -1,6 +1,7 @@ '\" e -.ig \"-*- nroff -*- -Copyright (C) 1989-1999 Free Software Foundation, Inc. +.\" The above line should force the use of eqn as a preprocessor +.ig +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 @@ -233,3 +234,7 @@ should be treated like the part of the line following the command. .SH "SEE ALSO" .BR groff_font (@MAN5EXT@) +.\" +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/contrib/groff/nroff/nroff.man b/contrib/groff/nroff/nroff.man index d8d9816..e33feb9 100644 --- a/contrib/groff/nroff/nroff.man +++ b/contrib/groff/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 @@ -23,37 +23,28 @@ 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 \-p -] -[ -.BI \-r cn -] -[ -.BI \-t -] -[ -.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 \-p +.OP \-r cn +.OP \-t +.OP \-T name +.RI "[\ " file\|.\|.\|. "\ ]" +.br +.ad \na .SH DESCRIPTION The .B @g@nroff @@ -63,11 +54,12 @@ command using groff. The .B \-T option with an argument other than -.B ascii -and -.B latin1 -and -.B koi8-r +.BR ascii , +.BR latin1 , +.BR koi8-r , +.BR utf8 , +or +.B cp1047 will be ignored. The .B \-h @@ -80,11 +72,9 @@ The .BR \-i , .BR \-n , .BR \-m , -.BR \-p , -.BR \-o , -.B \-r +.B \-o and -.B \-t +.B \-r options have the effect described in .BR @g@troff (@MAN1EXT@). In addition @@ -95,12 +85,21 @@ silently ignores options of or .BR \-s . Options +.BR \-p , +.BR \-t , .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/nroff/nroff.sh b/contrib/groff/nroff/nroff.sh index 12f3fd1..d658657 100755 --- a/contrib/groff/nroff/nroff.sh +++ b/contrib/groff/nroff/nroff.sh @@ -4,72 +4,83 @@ prog="$0" # Default device. -locale=${LC_CTYPE:-$LANG} -if test `expr "$locale" : ".*\.ISO_8859-1"` -gt 0 -then - T=-Tlatin1 -else -if test `expr "$locale" : ".*\.KOI8-R"` -gt 0 -then - T=-Tkoi8-r -else - T=-Tascii -fi -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 | *.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 - case $1 in - -h) - opts="$opts -P-h" - ;; - -[eq]|-s*) - # ignore these options - ;; - -[mrnoT]) - echo "$prog: option $1 requires an argument" >&2 - exit 1 - ;; - -[iStp]|-[mrno]*) - opts="$opts $1"; - ;; +# `for i; do' doesn't work with some versions of sh - -Tascii|-Tlatin1|-Tkoi8-r) - 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 ;; + -[itp] | -[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. + ;; + --) + 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 diff --git a/contrib/groff/src/devices/grotty/grotty.man b/contrib/groff/src/devices/grotty/grotty.man index 4a109ce..0069240 100644 --- a/contrib/groff/src/devices/grotty/grotty.man +++ b/contrib/groff/src/devices/grotty/grotty.man @@ -1,5 +1,6 @@ .ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. +$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 @@ -28,6 +29,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 @@ -40,10 +45,13 @@ should invoked by using the command with a .BR \-Tascii , -.B \-Tkoi8-r -or +.BR \-Tkoi8-r , .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. @@ -120,9 +128,11 @@ for font and device description files; .I name is the name of the device, usually .BR ascii , -.B koi8-r +.BR koi8-r , +.BR latin1 , +.BR utf8 , or -.BR latin1 . +.BR cp1047 . .TP .B \-h Use horizontal tabs in the output. @@ -169,16 +179,64 @@ characters. Print the version number. .SH FILES .TP -.B @FONTDIR@/dev\fIname\fB/DESC +.B @FONTDIR@/devascii/DESC Device description file for -.I name +.B ascii device. .TP -.BI @FONTDIR@/dev\fIname\fB/ F +.BI @FONTDIR@/devascii/ F Font description file for font .I F of -.I name +.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 @@ -188,6 +246,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 @@ -209,4 +271,5 @@ cannot be printed. .BR groff_font (@MAN5EXT@), .BR groff_char (@MAN7EXT@), .BR ul (1), -.BR more (1) +.BR more (1), +.BR less (1) diff --git a/contrib/groff/src/libs/libgroff/illegal.cc b/contrib/groff/src/libs/libgroff/illegal.cc index ca9e088..6ab2a50 100644 --- a/contrib/groff/src/libs/libgroff/illegal.cc +++ b/contrib/groff/src/libs/libgroff/illegal.cc @@ -1,8 +1,11 @@ +/* $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, @@ -19,4 +22,22 @@ 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, +#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 }; diff --git a/contrib/groff/src/preproc/eqn/neqn.sh b/contrib/groff/src/preproc/eqn/neqn.sh index f33b68e..1ae98e8 100644 --- a/contrib/groff/src/preproc/eqn/neqn.sh +++ b/contrib/groff/src/preproc/eqn/neqn.sh @@ -1,6 +1,7 @@ #!/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. +# $FreeBSD$ # Default device. locale=${LC_CTYPE:-$LANG} diff --git a/contrib/groff/src/roff/groff/groff.man b/contrib/groff/src/roff/groff/groff.man index 1f95a77..6244404 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 @@ -34,55 +34,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. @@ -108,13 +90,24 @@ 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 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 koi8-r -For typewriter-like devices using the russian KOI8-R character set. +.B lbp +For Canon CAPSL printers (LBP-4 and LBP-8 series laser printers). .TP .B html To produce HTML output. @@ -131,6 +124,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 @@ -157,6 +152,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 @@ -165,7 +166,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. @@ -276,8 +277,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. @@ -329,10 +330,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 , @@ -386,6 +389,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 @@ -394,7 +419,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 @@ -412,19 +437,31 @@ 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 grohtml (@MAN1EXT@), +.BR gxditview (@MAN1EXT@), .BR groff_font (@MAN5EXT@), .BR groff_out (@MAN5EXT@), .BR groff_man (@MAN7EXT@), diff --git a/contrib/groff/src/roff/nroff/nroff.man b/contrib/groff/src/roff/nroff/nroff.man index d8d9816..e33feb9 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 @@ -23,37 +23,28 @@ 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 \-p -] -[ -.BI \-r cn -] -[ -.BI \-t -] -[ -.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 \-p +.OP \-r cn +.OP \-t +.OP \-T name +.RI "[\ " file\|.\|.\|. "\ ]" +.br +.ad \na .SH DESCRIPTION The .B @g@nroff @@ -63,11 +54,12 @@ command using groff. The .B \-T option with an argument other than -.B ascii -and -.B latin1 -and -.B koi8-r +.BR ascii , +.BR latin1 , +.BR koi8-r , +.BR utf8 , +or +.B cp1047 will be ignored. The .B \-h @@ -80,11 +72,9 @@ The .BR \-i , .BR \-n , .BR \-m , -.BR \-p , -.BR \-o , -.B \-r +.B \-o and -.B \-t +.B \-r options have the effect described in .BR @g@troff (@MAN1EXT@). In addition @@ -95,12 +85,21 @@ silently ignores options of or .BR \-s . Options +.BR \-p , +.BR \-t , .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 12f3fd1..d658657 100755 --- a/contrib/groff/src/roff/nroff/nroff.sh +++ b/contrib/groff/src/roff/nroff/nroff.sh @@ -4,72 +4,83 @@ prog="$0" # Default device. -locale=${LC_CTYPE:-$LANG} -if test `expr "$locale" : ".*\.ISO_8859-1"` -gt 0 -then - T=-Tlatin1 -else -if test `expr "$locale" : ".*\.KOI8-R"` -gt 0 -then - T=-Tkoi8-r -else - T=-Tascii -fi -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 | *.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 - case $1 in - -h) - opts="$opts -P-h" - ;; - -[eq]|-s*) - # ignore these options - ;; - -[mrnoT]) - echo "$prog: option $1 requires an argument" >&2 - exit 1 - ;; - -[iStp]|-[mrno]*) - opts="$opts $1"; - ;; +# `for i; do' doesn't work with some versions of sh - -Tascii|-Tlatin1|-Tkoi8-r) - 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 ;; + -[itp] | -[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. + ;; + --) + 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 diff --git a/contrib/groff/tmac/eqnrc b/contrib/groff/tmac/eqnrc index 2156c15..63bd037 100644 --- a/contrib/groff/tmac/eqnrc +++ b/contrib/groff/tmac/eqnrc @@ -52,13 +52,14 @@ ifdef ps|X|html ! set draw_lines 1 ! ifdef ascii ! define n %1% ! ifdef latin1 ! define n %1% ! +ifdef utf8 ! define n %1% ! +ifdef cp1047 ! define n %1% ! ifdef koi8-r ! define n %1% ! ifdef n ! set nroff 1 ! undef X -undef ps|X +undef ps|X|html undef n -undef html .EN diff --git a/contrib/groff/tmac/tmac.tty b/contrib/groff/tmac/tmac.tty index 2d21af2..a4eee79 100644 --- a/contrib/groff/tmac/tmac.tty +++ b/contrib/groff/tmac/tmac.tty @@ -5,11 +5,12 @@ .\" Don't warn about non-existent fonts. .warn \n[.warn]-(\n[.warn]/131072%2*131072) .po 0 -.if !"\*[.T]"koi8-r" .if c\[char173] .shc \[char173] +.if c\[shc] .shc \[shc] .de tty-char .if !c\\$1 .char \\$1 "\\$2 .. -.if c\(md .tr \(bu\(md +.ie c\(pc .tr \(bu\(pc +.el .if c\(md .tr \(bu\(md .tty-char \(bu \z+o .tty-char \(14 1/4 .tty-char \(12 1/2 diff --git a/contrib/groff/tmac/tmac.tty-char b/contrib/groff/tmac/tmac.tty-char index e2770f2..f9bb805 100644 --- a/contrib/groff/tmac/tmac.tty-char +++ b/contrib/groff/tmac/tmac.tty-char @@ -1,12 +1,14 @@ .\" This file defines standard troff characters and some groff characters for -.\" use with -Tascii and -Tlatin1. +.\" use with -Tascii, -Tlatin1, -Tutf8, and -Tcp1047. .\" .\" These definitions are chosen so that, as far as possible, they: -.\" - work with both -Tascii and -Tlatin1. +.\" - work with all of -Tascii, -Tlatin1, -Tutf8, and -Tcp1047. .\" - work on devices that display only the last overstruck character .\" as well as on devices that support overstriking .\" - represent the character's graphical shape (not its meaning) .\" +.\" $FreeBSD$ +.\" .nr _C \n(.C .cp 0 .de tty-char @@ -85,7 +87,9 @@ .tty-char \(OR v .tty-char \(uA \z=^ .tty-char \(dA \z=v -.if c\(md .tty-char \(a. \(md +.if c\(md .tty-char \(pc \(md +.if c\(pc .tty-char \(md \(pc +.if c\(pc .tty-char \(a. \(pc .tty-char \(Im I .tty-char \(Re R .tty-char \(/L \z/L @@ -128,6 +132,7 @@ .tty-char \(S3 3 .tty-char \(ps 9| .tty-char \(md . +.tty-char \(pc . .tty-char \(ac , .tty-char \(S1 1 .tty-char \(Om \z_o @@ -195,4 +200,5 @@ .\"tty-char \(:y \ij .tty-char \[arrowvertex] | .cp \n(_C -.if "\*[.T]"ascii" .do mso tmac.latin1 +.if !'\*(.T'cp1047' \ +. do mso tmac.latin1 diff --git a/contrib/groff/tmac/troffrc b/contrib/groff/tmac/troffrc index 858d915..0b3bdd6 100644 --- a/contrib/groff/tmac/troffrc +++ b/contrib/groff/tmac/troffrc @@ -14,22 +14,28 @@ .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!html tmac.html +.do ds troffrc!lbp tmac.lbp +.do ds troffrc!html tmac.arkup .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 troffrc!html +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] -.\" Set the hyphenation language to `us' unless we're using koi8-r (russian) -.\" Load hyphenation patterns from `hyphen.us' (in the tmac directory). +.\} .ie "\*[.T]"koi8-r" \{\ .do hla us-ru .do hpf locale/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. diff --git a/contrib/groff/troff/troff.man b/contrib/groff/troff/troff.man index 4b4fdea..8c651ed 100644 --- a/contrib/groff/troff/troff.man +++ b/contrib/groff/troff/troff.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 @@ -36,7 +36,7 @@ the original English. .\" The BSD man macros can't handle " in arguments to font change macros, .\" so use \(ts instead of ". .tr \(ts" -.TH @G@TROFF 1 "@MDATE@" "Groff Version @VERSION@" +.TH @G@TROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" .SH NAME @g@troff \- format documents .SH SYNOPSIS @@ -65,6 +65,9 @@ the original English. .RI "[\ " files\|.\|.\|. "\ ]" .br .ad \na +.PP +It is possible to have whitespace between a command line option and its +parameter. .SH DESCRIPTION This manual page describes the GNU version of .BR troff , @@ -84,7 +87,7 @@ approximation of the typeset output. Print a backtrace with each warning or error message. This backtrace should help track down the cause of the error. The line numbers given in the backtrace may not always be correct: -.B troff 's +.BR troff 's idea of line numbers gets confused by .B as @@ -145,9 +148,10 @@ as the default font family. Read in the file .BI tmac. name\fR. Normally this will be searched for in @MACRODIR@. -By default is used the +By default, the .I safer -macro (reverted using -U ). +macro is used (this can be reverted using +.BR \-U ). .TP .B \-U Unsafe option, avoids default use of @@ -156,7 +160,9 @@ macro. .TP .B \-R Don't load -.BR troffrc . +.B troffrc +and +.BR troffrc-end . .TP .BI \-n num Number the first page @@ -476,7 +482,7 @@ is a numeric expression with a default scale indicator of .TQ .BI \eV[ xxx ] Interpolate the contents of the environment variable -.I xxx , +.IR xxx , as returned by .BR getenv (3). .B \eV @@ -880,6 +886,12 @@ sourced by are interpreted. .RE .TP +.BI .evc\ xx +Copy the contents of environment +.I xx +to the current environment. +No pushing or popping of environents will be done. +.TP .BI .fam\ xx Set the current font family to .IR xx . @@ -1050,12 +1062,19 @@ If .I n is non-zero or missing, enable pairwise kerning, otherwise disable it. .TP +.BI .length\ xx\ string +Compute the length of +.I string +and return it in the number register +.I xx +(which is not necessarily defined before). +.TP .BI .mso\ file The same as the .B so request except that .I file -is searched for in the same way that +is searched for in the same directories as .BI tmac. name is searched for when the .BI \-m name @@ -1095,8 +1114,25 @@ exists, append to it instead of truncating it. Print the names and contents of all currently defined number registers on stderr. .TP +.BI .psbb \ filename +Get the bounding box of a PostScript image +.IR filename . +This file must conform to Adobe's Document Structuring Conventions; the +command looks for a +.B %%BoundingBox +comment to extract the bounding box values. +After a successful call, the coordinates (in PostScript units) of the lower +left and upper right corner can be found in the registers +.BR \en[llx] , +.BR \en[lly] , +.BR \en[urx] , +and +.BR \en[ury] , +respectively. +If some error has occurred, the four registers are set to zero. +.TP .BI .pso \ command -This is behaves like the +This behaves like the .B so request except that input comes from the standard output of .IR command . @@ -1223,6 +1259,25 @@ The styles command in the file controls which font positions (if any) are initially associated with styles rather than fonts. .TP +.BI .substring\ xx\ n1\ [ n2 ] +Replace the string in register +.I xx +with the substring defined by the indices +.I n1 +and +.IR n2 . +The first character in the string has index one. +If +.I n2 +is omitted, it is taken to be equal to the string's length. If the +index value +.I n1 +or +.I n2 +is negative or zero, it will be counted from the end of the string, +going backwards: The last character has index 0, the character before +the last character has index -1, etc. +.TP .BI .tkf\ f\ s1\ n1\ s2\ n2 Enable track kerning for font .IR f . @@ -1394,7 +1449,7 @@ In Unix troff, the contents of .I filename is immediately copied through to the output regardless of whether -there is a current diversion; this behavior is so anomalous that it +there is a current diversion; this behaviour is so anomalous that it must be considered a bug. .TP .BI .ev\ xx @@ -1436,7 +1491,7 @@ if the end of a sentence occurs at the end of a line in fill mode, then both an inter-word space and a sentence space will be added; if two spaces follow the end of a sentence in the middle of a line, then the second space will be a sentence space. -Note that the behavior of Unix troff will be exactly +Note that the behaviour of Unix troff will be exactly that exhibited by GNU troff if a second argument is never given to the .B ss request. @@ -1642,6 +1697,21 @@ then .B \en(.y will contain .BR 03 . +.TP +.B \en(.Y +The revision number of groff. +.TP +.B \en[llx] +.TQ +.B \en[lly] +.TQ +.B \en[urx] +.TQ +.B \en[ury] +These four registers are set by the +.B \&.psbb +request and contain the bounding box values (in PostScript units) of a given +PostScript image. .LP The following registers are set by the .B \ew @@ -1679,7 +1749,32 @@ If greater than 0, the maximum number of objects on the input stack. If less than or equal to 0, there is no limit on the number of objects on the input stack. With no limit, recursion can continue until virtual memory is exhausted. +.TP +.B \en[year] +The current year. +Note that the traditional +.B troff +number register +.B \en(yr +is the current year minus 1900. .SS Miscellaneous +.B @g@troff +predefines a single (read/write) string-based register, +.BR \e*(.T , +which contains the argument given to the +.B -T +command line option, namely the current output device (for example, +.I latin1 +or +.IR ascii ). +Note that this is not the same as the (read-only) number register +.B \en(.T +which is defined to be\ 1 if +.B troff +is called with the +.B -T +command line option, and zero otherwise. This behaviour is different to +Unix troff. .LP Fonts not listed in the .SM DESC @@ -2037,7 +2132,10 @@ after these. .SH FILES .Tp \w'@FONTDIR@/devname/DESC'u+3n .B @MACRODIR@/troffrc -Initialization file +Initialization file (called before any other macro package). +.TP +.B @MACRODIR@/troffrc-end +Initialization file (called after any other macro package). .TP .BI @MACRODIR@/tmac. name Macro files @@ -2052,14 +2150,18 @@ Font file for font of device .IR name . .SH "SEE ALSO" -.BR groff (@MAN1EXT@) +.BR groff (@MAN1EXT@), .BR @g@tbl (@MAN1EXT@), .BR @g@pic (@MAN1EXT@), .BR @g@eqn (@MAN1EXT@), +.BR @g@refer (@MAN1EXT@), +.BR @g@soelim (@MAN1EXT@), +.BR @g@grn (@MAN1EXT@), .BR grops (@MAN1EXT@), .BR grodvi (@MAN1EXT@), .BR grotty (@MAN1EXT@), .BR grohtml (@MAN1EXT@), +.BR grolj4 (@MAN1EXT@), .BR groff_font (@MAN5EXT@), .BR groff_out (@MAN5EXT@), .BR groff_char (@MAN7EXT@) |