From 465b256c6e48881f129d6c6c3d9e8ea71d1bd7ea Mon Sep 17 00:00:00 2001 From: Jeroen Ruigrok/asmodai Date: Fri, 9 Sep 2005 14:10:41 +0000 Subject: [PATCH] Update to groff 1.19.2. With the following changes: pic: The by argument in a for loop can now be negative if it is additive. For the multiplicative case, it must be greater than zero. eqn: document the keywords: undef NAME, copy "FILE", space n. eqn: document the macros: Alpha, ..., Omega, ldots, dollar. eqn: document extended keywords: col n { ... }, lcol n { ... }, rcol n { ... }, ccol n { ... }, pile n { ... }, lpile n { ... }, rpile n { ... }, cpile n { ... } grohtml: This device driver has been raised to beta stage; its set of tags should be stable now. grohtml: New command line option s to set the base point size. grohtml: New command line option S to set the split level while generating multiple files. grotty: Experimental support for zero-width and double-width characters. pdfroff: A new wrapper script contributed by Keith Marshall to easily create PDF documents with groff. And some smaller changes. --- contrib/groff-1.19/COPYING | 4 +- contrib/groff-1.19/README | 150 +- contrib/groff-1.19/README.DELETED | 48 +- contrib/groff-1.19/REVISION | 2 +- .../groff-1.19/contrib/eqn2graph/eqn2graph.sh | 6 +- .../contrib/grap2graph/grap2graph.sh | 6 +- .../groff-1.19/contrib/groffer/groffer.man | 2843 ++-- contrib/groff-1.19/contrib/groffer/groffer.sh | 4700 +----- .../groff-1.19/contrib/groffer/groffer2.sh | 5854 ++++++++ contrib/groff-1.19/contrib/mm/groff_mm.man | 4 +- contrib/groff-1.19/contrib/mm/m.tmac | 16 +- contrib/groff-1.19/contrib/mm/mmroff.pl | 2 +- contrib/groff-1.19/contrib/mom/copyright | 10 +- contrib/groff-1.19/contrib/mom/groff_mom.man | 7 +- contrib/groff-1.19/contrib/mom/om.tmac | 10198 +++++++++---- contrib/groff-1.19/contrib/pdfmark/cover.ms | 57 + contrib/groff-1.19/contrib/pdfmark/pdfmark.ms | 2531 ++++ .../groff-1.19/contrib/pdfmark/pdfmark.tmac | 1562 ++ .../groff-1.19/contrib/pdfmark/pdfroff.man | 552 + contrib/groff-1.19/contrib/pdfmark/pdfroff.sh | 572 + contrib/groff-1.19/contrib/pdfmark/spdf.tmac | 225 + .../groff-1.19/contrib/pic2graph/pic2graph.sh | 6 +- contrib/groff-1.19/doc/fdl.texi | 227 +- contrib/groff-1.19/doc/groff.texinfo | 1476 +- .../groff-1.19/font/devdvi/generate/Makefile | 2 +- contrib/groff-1.19/font/devhtml/DESC.proto | 2 +- contrib/groff-1.19/font/devhtml/R.proto | 262 + .../groff-1.19/font/devlj4/generate/Makefile | 2 +- .../groff-1.19/font/devps/generate/Makefile | 2 +- .../groff-1.19/font/devps/generate/afmname | 2 +- contrib/groff-1.19/font/devps/prologue.ps | 3 +- contrib/groff-1.19/font/devutf8/NOTES | 42 +- contrib/groff-1.19/font/devutf8/R.proto | 262 + contrib/groff-1.19/man/ditroff.man | 10 +- contrib/groff-1.19/man/groff.man | 63 +- contrib/groff-1.19/man/groff_char.man | 11 +- contrib/groff-1.19/man/groff_diff.man | 81 +- contrib/groff-1.19/man/groff_font.man | 29 +- contrib/groff-1.19/man/groff_out.man | 554 +- contrib/groff-1.19/man/groff_tmac.man | 39 +- contrib/groff-1.19/man/roff.man | 4 +- contrib/groff-1.19/src/devices/grodvi/dvi.cpp | 2 +- .../groff-1.19/src/devices/grodvi/grodvi.man | 4 +- .../src/devices/grohtml/grohtml.man | 173 +- .../src/devices/grohtml/html-table.cpp | 117 +- .../src/devices/grohtml/html-table.h | 10 +- .../src/devices/grohtml/html-text.cpp | 233 +- .../src/devices/grohtml/html-text.h | 20 +- contrib/groff-1.19/src/devices/grohtml/html.h | 5 +- .../groff-1.19/src/devices/grohtml/output.cpp | 27 +- .../src/devices/grohtml/post-html.cpp | 1557 +- contrib/groff-1.19/src/devices/grolbp/lbp.cpp | 12 +- contrib/groff-1.19/src/devices/grolbp/lbp.h | 130 +- contrib/groff-1.19/src/devices/grolj4/lj4.cpp | 2 +- .../groff-1.19/src/devices/grops/grops.man | 24 +- contrib/groff-1.19/src/devices/grops/ps.cpp | 2 +- contrib/groff-1.19/src/devices/grops/ps.h | 2 +- contrib/groff-1.19/src/devices/grops/psrm.cpp | 2 +- contrib/groff-1.19/src/devices/grotty/tty.cpp | 80 +- contrib/groff-1.19/src/include/assert.h | 2 +- contrib/groff-1.19/src/include/cmap.h | 2 +- contrib/groff-1.19/src/include/color.h | 2 +- contrib/groff-1.19/src/include/config.hin | 9 +- contrib/groff-1.19/src/include/cset.h | 2 +- contrib/groff-1.19/src/include/device.h | 2 +- contrib/groff-1.19/src/include/driver.h | 2 +- contrib/groff-1.19/src/include/errarg.h | 2 +- contrib/groff-1.19/src/include/error.h | 2 +- contrib/groff-1.19/src/include/font.h | 9 +- contrib/groff-1.19/src/include/geometry.h | 2 +- contrib/groff-1.19/src/include/html-strings.h | 2 +- contrib/groff-1.19/src/include/htmlhint.h | 2 +- contrib/groff-1.19/src/include/index.h | 2 +- contrib/groff-1.19/src/include/lib.h | 20 +- contrib/groff-1.19/src/include/macropath.h | 2 +- contrib/groff-1.19/src/include/nonposix.h | 12 +- contrib/groff-1.19/src/include/paper.h | 2 +- contrib/groff-1.19/src/include/posix.h | 8 +- contrib/groff-1.19/src/include/printer.h | 9 +- contrib/groff-1.19/src/include/ptable.h | 2 +- contrib/groff-1.19/src/include/refid.h | 2 +- contrib/groff-1.19/src/include/search.h | 2 +- contrib/groff-1.19/src/include/searchpath.h | 2 +- contrib/groff-1.19/src/include/stringclass.h | 2 +- contrib/groff-1.19/src/include/symbol.h | 2 +- contrib/groff-1.19/src/include/unicode.h | 2 +- contrib/groff-1.19/src/libs/libbib/common.cpp | 2 +- contrib/groff-1.19/src/libs/libbib/index.cpp | 2 +- contrib/groff-1.19/src/libs/libbib/linear.cpp | 2 +- contrib/groff-1.19/src/libs/libbib/map.c | 2 +- contrib/groff-1.19/src/libs/libbib/search.cpp | 2 +- .../groff-1.19/src/libs/libdriver/input.cpp | 20 +- .../groff-1.19/src/libs/libdriver/printer.cpp | 63 +- .../groff-1.19/src/libs/libgroff/assert.cpp | 2 +- .../src/libs/libgroff/change_lf.cpp | 2 +- contrib/groff-1.19/src/libs/libgroff/cmap.cpp | 2 +- .../groff-1.19/src/libs/libgroff/color.cpp | 5 +- contrib/groff-1.19/src/libs/libgroff/cset.cpp | 6 +- .../groff-1.19/src/libs/libgroff/device.cpp | 2 +- .../groff-1.19/src/libs/libgroff/errarg.cpp | 2 +- .../groff-1.19/src/libs/libgroff/error.cpp | 2 +- .../groff-1.19/src/libs/libgroff/fatal.cpp | 2 +- contrib/groff-1.19/src/libs/libgroff/font.cpp | 40 +- .../groff-1.19/src/libs/libgroff/fontfile.cpp | 4 +- .../groff-1.19/src/libs/libgroff/geometry.cpp | 2 +- .../groff-1.19/src/libs/libgroff/glyphuni.cpp | 2 +- .../groff-1.19/src/libs/libgroff/htmlhint.cpp | 2 +- .../groff-1.19/src/libs/libgroff/hypot.cpp | 40 + contrib/groff-1.19/src/libs/libgroff/iftoa.c | 2 +- .../groff-1.19/src/libs/libgroff/invalid.cpp | 2 +- contrib/groff-1.19/src/libs/libgroff/itoa.c | 2 +- contrib/groff-1.19/src/libs/libgroff/lf.cpp | 7 +- .../src/libs/libgroff/macropath.cpp | 2 +- .../groff-1.19/src/libs/libgroff/matherr.c | 2 +- .../src/libs/libgroff/maxfilename.cpp | 8 +- .../groff-1.19/src/libs/libgroff/mksdir.cpp | 2 +- .../src/libs/libgroff/nametoindex.cpp | 2 +- contrib/groff-1.19/src/libs/libgroff/new.cpp | 2 +- .../groff-1.19/src/libs/libgroff/paper.cpp | 2 +- .../groff-1.19/src/libs/libgroff/ptable.cpp | 2 +- .../groff-1.19/src/libs/libgroff/quotearg.c | 2 +- .../src/libs/libgroff/searchpath.cpp | 36 +- .../groff-1.19/src/libs/libgroff/spawnvp.c | 2 +- .../groff-1.19/src/libs/libgroff/string.cpp | 2 +- .../groff-1.19/src/libs/libgroff/strsave.cpp | 2 +- .../groff-1.19/src/libs/libgroff/symbol.cpp | 2 +- .../groff-1.19/src/libs/libgroff/tmpfile.cpp | 2 +- .../groff-1.19/src/libs/libgroff/tmpname.cpp | 8 +- .../groff-1.19/src/libs/libgroff/unicode.cpp | 2 +- .../groff-1.19/src/libs/libgroff/uniglyph.cpp | 2 +- .../groff-1.19/src/libs/libgroff/uniuni.cpp | 2 +- contrib/groff-1.19/src/preproc/eqn/box.cpp | 2 +- contrib/groff-1.19/src/preproc/eqn/box.h | 10 +- contrib/groff-1.19/src/preproc/eqn/delim.cpp | 2 +- contrib/groff-1.19/src/preproc/eqn/eqn.h | 2 +- contrib/groff-1.19/src/preproc/eqn/eqn.man | 442 +- contrib/groff-1.19/src/preproc/eqn/eqn.y | 2 +- contrib/groff-1.19/src/preproc/eqn/lex.cpp | 10 +- contrib/groff-1.19/src/preproc/eqn/limit.cpp | 2 +- contrib/groff-1.19/src/preproc/eqn/list.cpp | 2 +- contrib/groff-1.19/src/preproc/eqn/main.cpp | 2 +- contrib/groff-1.19/src/preproc/eqn/mark.cpp | 2 +- contrib/groff-1.19/src/preproc/eqn/neqn.sh | 2 +- contrib/groff-1.19/src/preproc/eqn/other.cpp | 2 +- contrib/groff-1.19/src/preproc/eqn/over.cpp | 2 +- contrib/groff-1.19/src/preproc/eqn/pbox.h | 2 +- contrib/groff-1.19/src/preproc/eqn/pile.cpp | 2 +- contrib/groff-1.19/src/preproc/eqn/script.cpp | 2 +- .../groff-1.19/src/preproc/eqn/special.cpp | 2 +- contrib/groff-1.19/src/preproc/eqn/sqrt.cpp | 2 +- contrib/groff-1.19/src/preproc/eqn/text.cpp | 2 +- contrib/groff-1.19/src/preproc/grn/grn.man | 19 +- contrib/groff-1.19/src/preproc/grn/hdb.cpp | 5 + contrib/groff-1.19/src/preproc/grn/hgraph.cpp | 16 +- contrib/groff-1.19/src/preproc/grn/main.cpp | 18 +- .../groff-1.19/src/preproc/html/pre-html.cpp | 70 +- .../groff-1.19/src/preproc/html/pre-html.h | 2 +- .../groff-1.19/src/preproc/html/pushback.cpp | 12 +- .../groff-1.19/src/preproc/html/pushback.h | 2 +- contrib/groff-1.19/src/preproc/pic/common.cpp | 2 +- contrib/groff-1.19/src/preproc/pic/common.h | 2 +- contrib/groff-1.19/src/preproc/pic/lex.cpp | 28 +- contrib/groff-1.19/src/preproc/pic/main.cpp | 2 +- contrib/groff-1.19/src/preproc/pic/object.cpp | 183 +- contrib/groff-1.19/src/preproc/pic/object.h | 2 +- contrib/groff-1.19/src/preproc/pic/output.h | 2 +- contrib/groff-1.19/src/preproc/pic/pic.cpp | 5117 +++---- contrib/groff-1.19/src/preproc/pic/pic.h | 10 +- contrib/groff-1.19/src/preproc/pic/pic.man | 52 +- contrib/groff-1.19/src/preproc/pic/pic.y | 30 +- contrib/groff-1.19/src/preproc/pic/position.h | 2 +- contrib/groff-1.19/src/preproc/pic/tex.cpp | 2 +- contrib/groff-1.19/src/preproc/pic/troff.cpp | 16 +- .../groff-1.19/src/preproc/refer/command.cpp | 2 +- .../groff-1.19/src/preproc/refer/command.h | 2 +- contrib/groff-1.19/src/preproc/refer/label.y | 2 +- contrib/groff-1.19/src/preproc/refer/ref.cpp | 2 +- contrib/groff-1.19/src/preproc/refer/ref.h | 12 +- .../groff-1.19/src/preproc/refer/refer.cpp | 11 +- contrib/groff-1.19/src/preproc/refer/refer.h | 2 +- .../groff-1.19/src/preproc/refer/refer.man | 310 +- .../groff-1.19/src/preproc/refer/token.cpp | 2 +- contrib/groff-1.19/src/preproc/refer/token.h | 2 +- .../groff-1.19/src/preproc/soelim/soelim.cpp | 6 +- .../groff-1.19/src/preproc/soelim/soelim.man | 111 +- contrib/groff-1.19/src/preproc/tbl/main.cpp | 46 +- contrib/groff-1.19/src/preproc/tbl/table.cpp | 15 +- contrib/groff-1.19/src/preproc/tbl/table.h | 12 +- contrib/groff-1.19/src/preproc/tbl/tbl.man | 7 +- contrib/groff-1.19/src/roff/groff/groff.cpp | 2 +- contrib/groff-1.19/src/roff/groff/groff.man | 107 +- contrib/groff-1.19/src/roff/groff/pipeline.c | 5 +- contrib/groff-1.19/src/roff/groff/pipeline.h | 2 +- contrib/groff-1.19/src/roff/grog/grog.pl | 2 +- contrib/groff-1.19/src/roff/grog/grog.sh | 2 +- contrib/groff-1.19/src/roff/nroff/nroff.man | 11 +- contrib/groff-1.19/src/roff/nroff/nroff.sh | 15 +- contrib/groff-1.19/src/roff/troff/charinfo.h | 2 +- contrib/groff-1.19/src/roff/troff/column.cpp | 4 +- .../groff-1.19/src/roff/troff/dictionary.cpp | 2 +- .../groff-1.19/src/roff/troff/dictionary.h | 2 +- contrib/groff-1.19/src/roff/troff/div.cpp | 42 +- contrib/groff-1.19/src/roff/troff/div.h | 18 +- contrib/groff-1.19/src/roff/troff/env.cpp | 380 +- contrib/groff-1.19/src/roff/troff/env.h | 100 +- contrib/groff-1.19/src/roff/troff/hvunits.h | 2 +- contrib/groff-1.19/src/roff/troff/input.cpp | 455 +- contrib/groff-1.19/src/roff/troff/input.h | 21 +- contrib/groff-1.19/src/roff/troff/mtsm.cpp | 632 + contrib/groff-1.19/src/roff/troff/mtsm.h | 164 + contrib/groff-1.19/src/roff/troff/node.cpp | 693 +- contrib/groff-1.19/src/roff/troff/node.h | 157 +- contrib/groff-1.19/src/roff/troff/number.cpp | 4 +- contrib/groff-1.19/src/roff/troff/reg.cpp | 2 +- contrib/groff-1.19/src/roff/troff/reg.h | 2 +- contrib/groff-1.19/src/roff/troff/request.h | 7 +- contrib/groff-1.19/src/roff/troff/token.h | 2 +- contrib/groff-1.19/src/roff/troff/troff.h | 2 +- .../src/utils/addftinfo/addftinfo.cpp | 2 +- .../groff-1.19/src/utils/addftinfo/guess.cpp | 2 +- .../groff-1.19/src/utils/addftinfo/guess.h | 2 +- .../src/utils/afmtodit/afmtodit.man | 4 +- .../groff-1.19/src/utils/afmtodit/afmtodit.pl | 12393 ++++++++-------- .../src/utils/hpftodit/hpftodit.cpp | 45 +- .../groff-1.19/src/utils/hpftodit/hpuni.cpp | 2 +- .../groff-1.19/src/utils/indxbib/indxbib.cpp | 2 +- contrib/groff-1.19/src/utils/indxbib/signal.c | 2 +- contrib/groff-1.19/src/utils/lkbib/lkbib.cpp | 2 +- contrib/groff-1.19/src/utils/lkbib/lkbib.man | 36 +- .../groff-1.19/src/utils/lookbib/lookbib.cpp | 2 +- .../groff-1.19/src/utils/lookbib/lookbib.man | 27 +- .../groff-1.19/src/utils/pfbtops/pfbtops.c | 8 +- .../groff-1.19/src/utils/pfbtops/pfbtops.man | 21 +- .../src/utils/tfmtodit/tfmtodit.cpp | 2 +- contrib/groff-1.19/tmac/an-old.tmac | 49 +- contrib/groff-1.19/tmac/devtag.tmac | 131 + contrib/groff-1.19/tmac/doc-common | 12 +- contrib/groff-1.19/tmac/doc-ditroff | 12 +- contrib/groff-1.19/tmac/doc-nroff | 6 +- contrib/groff-1.19/tmac/doc-old.tmac | 6 +- contrib/groff-1.19/tmac/doc-syms | 9 +- contrib/groff-1.19/tmac/doc.tmac | 75 +- contrib/groff-1.19/tmac/groff_man.man | 275 +- contrib/groff-1.19/tmac/groff_mdoc.man | 32 +- contrib/groff-1.19/tmac/groff_ms.man | 564 +- contrib/groff-1.19/tmac/groff_www.man | 186 +- contrib/groff-1.19/tmac/html.tmac | 1 + contrib/groff-1.19/tmac/papersize.tmac | 18 +- contrib/groff-1.19/tmac/s.tmac | 226 +- contrib/groff-1.19/tmac/trace.tmac | 8 +- contrib/groff-1.19/tmac/troffrc-end | 3 +- contrib/groff-1.19/tmac/tty.tmac | 3 + contrib/groff-1.19/tmac/unicode.tmac | 3 + contrib/groff-1.19/tmac/www.tmac | 524 +- 254 files changed, 39048 insertions(+), 20364 deletions(-) create mode 100644 contrib/groff-1.19/contrib/groffer/groffer2.sh create mode 100644 contrib/groff-1.19/contrib/pdfmark/cover.ms create mode 100644 contrib/groff-1.19/contrib/pdfmark/pdfmark.ms create mode 100644 contrib/groff-1.19/contrib/pdfmark/pdfmark.tmac create mode 100644 contrib/groff-1.19/contrib/pdfmark/pdfroff.man create mode 100644 contrib/groff-1.19/contrib/pdfmark/pdfroff.sh create mode 100644 contrib/groff-1.19/contrib/pdfmark/spdf.tmac create mode 100644 contrib/groff-1.19/src/libs/libgroff/hypot.cpp create mode 100644 contrib/groff-1.19/src/roff/troff/mtsm.cpp create mode 100644 contrib/groff-1.19/src/roff/troff/mtsm.h create mode 100644 contrib/groff-1.19/tmac/devtag.tmac create mode 100644 contrib/groff-1.19/tmac/unicode.tmac diff --git a/contrib/groff-1.19/COPYING b/contrib/groff-1.19/COPYING index d60c31a97a..b2fe7b6af3 100644 --- a/contrib/groff-1.19/COPYING +++ b/contrib/groff-1.19/COPYING @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. diff --git a/contrib/groff-1.19/README b/contrib/groff-1.19/README index 715c426a73..5f80eaf589 100644 --- a/contrib/groff-1.19/README +++ b/contrib/groff-1.19/README @@ -1,88 +1,134 @@ -This is the GNU groff document formatting system. The version number -is given in the file VERSION. +This is the GNU `groff' document formatting system. The version +number is given in the file VERSION. -Included in this release are implementations of troff, pic, eqn, tbl, -grn, refer, -man, -mdoc, and -ms macros, and drivers for PostScript, TeX -dvi format, HP LaserJet 4 printers, Canon CAPSL printers, HTML format -(still alpha), and typewriter-like devices. Also included is a modified -version of the Berkeley -me macros, an enhanced version of the X11 -xditview previewer, and an implementation of the -mm macros contributed -by Joergen Haegg (jh@axis.se). +Included in this release are implementations of `troff', `pic', `eqn', +`tbl', `grn', `refer', `-man', `-mdoc', `-mom', and `-ms' macros, and +drivers for `PostScript', `TeX dvi' format, `HP LaserJet 4' printers, +`Canon CAPSL' printers, `HTML' format (beta status), and +typewriter-like devices. Also included is a modified version of the +Berkeley `-me' macros, the enhanced version `gxditview' of the X11 +`xditview' previewer, and an implementation of the `-mm' macros +contributed by Joergen Haegg (jh@axis.se). -See the file INSTALL for installation instructions. You will require a -C++ compiler. +See the file `INSTALL' for installation instructions. You will +require a C++ compiler. -The file NEWS describes recent user-visible changes to groff. +The file `NEWS' describes recent user-visible changes to `groff'. -Groff is free software. See the file COPYING for copying permission. +`groff' is free software. See the file `COPYING' for copying +permission. -The file PROBLEMS describes various problems that have been encountered -in compiling, installing, and running groff. +The file `PROBLEMS' describes various problems that have been +encountered in compiling, installing, and running `groff'. -The most recent released version of groff is always available by -anonymous ftp from ftp.gnu.org in the directory pub/gnu/groff. +The most recent released version of `groff' is always available by +anonymous ftp from `ftp.gnu.org' in the directory `gnu/groff'. -A CVS repository is available, containing the current development -version of groff. You can access it with the commands +The current development version of `groff' is available from a `CVS' +repository. You can access it by first selecting a parent directory +in which to create a working copy (call it, say, `~/cvswork'), and +then executing the commands - export CVSROOT=:pserver:anoncvs@anoncvs.ffii.org:/var/cvs - cvs login - cvs -z9 co groff + cd ~/cvswork + CVS_RSH=ssh; export CVS_RSH + cvs -d:ext:anoncvs@savannah.gnu.org/cvsroot/groff -z5 co groff -(if the prompt for the password appears, just press the enter key). -After a successful login you no longer need the first two commands; an -update of a checked out repository should be done with +(Note that you need an `ssh' client for security reasons.) - cvs -z9 update -dP +This will create a subdirectory, `~/cvswork/groff', with a "checked +out" copy of the `CVS' repository. An update of this working copy may +be achieved, at any later time by invoking the commands -Please read the info pages of cvs for further details. + cd ~/cvswork/groff + CVS_RSH=ssh cvs -z5 update -dP -Alternatively, you can download snapshots (which are updated twice a -day) from +Please read the `CVS' info pages for further details. - ftp://ftp.ffii.org/pub/groff/devel/groff-current.tar.gz +Finally, it is possible to access the `CVS' with a web browser by +pointing it to -or a diff file relative to the latest official groff release as + http://savannah.gnu.org/cvs/?group=groff - ftp://ftp.ffii.org/pub/groff/devel/groff--current.diff.gz +Alternatively, you can download snapshots (which are updated twice a day). +The complete `groff' source as a single file is available at -Assuming that groff-.tar.gz and -groff--current.diff.gz are in the same directory, do the + http://groff.ffii.org/groff/devel/groff-current.tar.gz + +A diff file relative to `groff-', the latest official `groff' +release is available at + + http://groff.ffii.org/groff/devel/groff--current.diff.gz + +Assuming that `groff-.tar.gz' and +`groff--current.diff.gz' are in the same directory, do the following to apply the diff file: tar xzvf groff-.tar.gz cd groff- gunzip -c ../groff--current.diff.gz | patch -p1 -Finally, it is possible to access the CVS with a browser by pointing it -to - - http://www.ffii.org/cgi-bin/viewcvs.cgi/groff - -Please report bugs using the form in the file BUG-REPORT; the idea of +Depending on your requirements, you may need at least some of the +following tools to build `groff' directly from its source: + + ghostscript + the psutils package + the netpbm package + texinfo 4.8 + bison >= 1.875b or byacc + +Note that `texinfo' and `bison' or `byacc' are required only for +building from `CVS' sources (either a checked out working copy, or a +daily snapshot). They are not required for building from a stable +release tarball. Also note that the version numbers stated are the +minimum supported. No version of `texinfo' < 4.8 will work, and the +original release of `bison' 1.875 is known not to work; you *may* find +that `bison' releases < 1.875 will work, but in case of difficulty, +please update to a later version *before* posting a bug report. + +For *all* sources, you need ghostscript for creation of either `PDF' or +`HTML' output; the `netpbm' and `psutils' packages are required only for +`HTML' output. If you don't intend to produce output in either of these +formats, then these packages are unnecessary. + +In Linux Debian, the installation of `texinfo' is dangerous. For it +creates a file `install-info' that will block the system installation. +So the created `/usr/local/bin/install-info' must be renamed. + +The `groff' configure script searches for the X11 headers and +libraries `Xaw' and `Xmu'. So the corresponding developer packages of +your system must be installed, otherwise `groff' does not install +`gxditview' and the `-TX*' devices. In Debian, the developer packages +are `libxaw7-dev' and `libxmu-dev'. + +Please report bugs using the form in the file `BUG-REPORT'; the idea of this is to make sure that FSF has all the information it needs to fix -the bug. At the very least, read the BUG-REPORT form and make sure +the bug. At the very least, read the `BUG-REPORT' form and make sure that you supply all the information that it asks for. Even if you are -not sure that something is a bug, report it using BUG-REPORT: this will +not sure that something is a bug, report it using `BUG-REPORT': this will enable us to determine whether it really is a bug or not. Three mailing lists are available: bug-groff@gnu.org for reporting bugs - groff@ffii.org for general discussion of groff - groff-commit@ffii.org a read-only list showing logs of - commitments to the CVS repository + groff@gnu.org for general discussion of groff + groff-commit@gnu.org a read-only list showing commitments + to the CVS repository -Note that groff@gnu.org is an alias for groff@ffii.org; you must be -subscribed to the `groff' list to send mails. +You can post mails directly to the `bug-groff' list, without subscribing; +to post mails to the `groff' list you must subscribe to it. To subscribe, send a mail to -request@ (example: -groff-request@ffii.org) with the word `subscribe' in either the subject -or body of the email (don't include the quotes) or have a look at the -groff mailing list web page at +groff-request@gnu.org for the `groff' list) with the word `subscribe' +in either the subject or body of the email (don't include the quotes). +Alternatively, you may subscribe by visiting the web pages at + + http://lists.gnu.org/mailman/listinfo/bug-groff + http://lists.gnu.org/mailman/listinfo/groff + http://lists.gnu.org/mailman/listinfo/groff-commit - http://ffii.org/mailman/listinfo/groff +Each of these web pages also provides a link to a browseable archive of +postings to the corresponding mailing list. -GNU groff was written by James Clark . It is now +GNU `groff' was written by James Clark . It is now maintained by Ted Harding and Werner Lemberg . diff --git a/contrib/groff-1.19/README.DELETED b/contrib/groff-1.19/README.DELETED index 65c18eb7ac..68ed5fa368 100644 --- a/contrib/groff-1.19/README.DELETED +++ b/contrib/groff-1.19/README.DELETED @@ -1,5 +1,9 @@ BUG-REPORT ChangeLog +ChangeLog.115 +ChangeLog.116 +ChangeLog.117 +ChangeLog.118 FDL INSTALL INSTALL.gen @@ -26,16 +30,13 @@ arch/ aclocal.m4 configure configure.ac -contrib/mm/Makefile.sim -contrib/mm/Makefile.sub +contrib/gdiffmk/ contrib/eqn2graph/Makefile.sub contrib/grap2graph/Makefile.sub -contrib/groffer/ChangeLog -contrib/groffer/Makefile.sub -contrib/groffer/README -contrib/groffer/README_SH -contrib/groffer/TODO +contrib/groffer/ contrib/mm/ChangeLog +contrib/mm/Makefile.sim +contrib/mm/Makefile.sub contrib/mm/NOTES contrib/mm/README contrib/mm/examples/ @@ -46,9 +47,15 @@ contrib/mom/NEWS contrib/mom/TODO contrib/mom/examples/ contrib/mom/momdoc/ +contrib/pdfmark/ChangeLog +contrib/pdfmark/Makefile.sub +contrib/pdfmark/PROBLEMS +contrib/pdfmark/README +contrib/pdfmark/TODO contrib/pic2graph/Makefile.sub doc/Makefile.in doc/Makefile.sub +doc/fixinfo.sh doc/gnu.eps doc/gnu.png doc/gnu.xpm @@ -57,6 +64,8 @@ doc/grnexmpl.me doc/groff doc/groff-1 doc/groff-2 +doc/groff-3 +doc/groff.css doc/meintro.me doc/meref.me doc/pic.ms @@ -83,21 +92,33 @@ src/devices/grops/Makefile.sub src/devices/grops/TODO src/devices/grotty/Makefile.sub src/devices/grotty/TODO +src/devices/xditview/ +src/include/DviChar.h src/include/Makefile.sub -src/libs/snprintf/ +src/include/XFontName.h +src/include/getopt.h +src/include/getopt_int.h +src/include/gettext.h +src/include/groff-getopt.h +src/include/relocate.h +src/libs/libbib/Makefile.sub +src/libs/libdriver/Makefile.sub src/libs/libgroff/fmod.c src/libs/libgroff/getcwd.c src/libs/libgroff/getopt.c src/libs/libgroff/getopt1.c +src/libs/libgroff/maxpathname.cpp src/libs/libgroff/mkstemp.cpp src/libs/libgroff/putenv.c +src/libs/libgroff/relocate.cpp +src/libs/libgroff/searchpath.cpp src/libs/libgroff/strcasecmp.c src/libs/libgroff/strerror.c src/libs/libgroff/strncasecmp.c src/libs/libgroff/strtol.c src/libs/libgroff/Makefile.sub -src/libs/libdriver/Makefile.sub -src/libs/libbib/Makefile.sub +src/libs/libxutil/ +src/libs/snprintf/ src/preproc/eqn/Makefile.sub src/preproc/eqn/TODO src/preproc/html/Makefile.sub @@ -123,11 +144,8 @@ src/utils/lkbib/Makefile.sub src/utils/lookbib/Makefile.sub src/utils/pfbtops/Makefile.sub src/utils/tfmtodit/Makefile.sub -src/xditview/ChangeLog -src/xditview/INSTALL -src/xditview/Imakefile.in -src/xditview/README -src/xditview/TODO +src/utils/xtotroff/ +src/xditview/ stamp-h.in test-groff.in tmac/Makefile.sub diff --git a/contrib/groff-1.19/REVISION b/contrib/groff-1.19/REVISION index d00491fd7e..0cfbf08886 100644 --- a/contrib/groff-1.19/REVISION +++ b/contrib/groff-1.19/REVISION @@ -1 +1 @@ -1 +2 diff --git a/contrib/groff-1.19/contrib/eqn2graph/eqn2graph.sh b/contrib/groff-1.19/contrib/eqn2graph/eqn2graph.sh index efcd01875e..98713a854a 100644 --- a/contrib/groff-1.19/contrib/eqn2graph/eqn2graph.sh +++ b/contrib/groff-1.19/contrib/eqn2graph/eqn2graph.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh # # eqn2graph -- compile EQN equation descriptions to bitmap images # @@ -32,7 +32,7 @@ # # Thus, we pass -U to groff(1), and everything else to convert(1). # -# $Id: eqn2graph.sh,v 1.3 2003/10/28 07:46:23 wlemb Exp $ +# $Id: eqn2graph.sh,v 1.5 2005/05/18 07:03:06 wl Exp $ # groff_opts="" convert_opts="" @@ -85,7 +85,7 @@ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15 read equation (echo ".EQ"; echo 'delim $$'; echo ".EN"; echo '$'"$equation"'$') | \ groff -e $groff_opts -Tps -P-pletter > $tmp/eqn2graph.ps \ - && convert -crop 0x0 $convert_opts $tmp/eqn2graph.ps $tmp/eqn2graph.$format \ + && convert -trim -crop 0x0 $convert_opts $tmp/eqn2graph.ps $tmp/eqn2graph.$format \ && cat $tmp/eqn2graph.$format # End diff --git a/contrib/groff-1.19/contrib/grap2graph/grap2graph.sh b/contrib/groff-1.19/contrib/grap2graph/grap2graph.sh index 7737f1efe0..7c830c1a25 100644 --- a/contrib/groff-1.19/contrib/grap2graph/grap2graph.sh +++ b/contrib/groff-1.19/contrib/grap2graph/grap2graph.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh # # grap2graph -- compile graph description descriptions to bitmap images # @@ -28,7 +28,7 @@ # # Thus, we pass -U to groff(1), and everything else to convert(1). # -# $Id: grap2graph.sh,v 1.2 2003/10/28 07:46:23 wlemb Exp $ +# $Id: grap2graph.sh,v 1.4 2005/05/18 07:03:06 wl Exp $ # groff_opts="" convert_opts="" @@ -79,7 +79,7 @@ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15 # 3. Process through groff(1) with pic preprocessing to emit Postscript. # 4. Use convert(1) to crop the Postscript and turn it into a bitmap. (echo ".G1"; cat; echo ".G2") | grap | groff -p $groff_opts -Tps -P-pletter | \ - convert -crop 0x0 $convert_opts - $tmp/grap2graph.$format \ + convert -trim -crop 0x0 $convert_opts - $tmp/grap2graph.$format \ && cat $tmp/grap2graph.$format # End diff --git a/contrib/groff-1.19/contrib/groffer/groffer.man b/contrib/groff-1.19/contrib/groffer/groffer.man index b4fa31c496..80177d6c26 100644 --- a/contrib/groff-1.19/contrib/groffer/groffer.man +++ b/contrib/groff-1.19/contrib/groffer/groffer.man @@ -15,30 +15,51 @@ groffer.1 - man page for groffer (section 1). Source file position: /contrib/groffer/groffer.man Installed position: $prefix/share/man/man1/groffer.1 -Version : groffer 0.9.7 -Last update : 03 May 2004 +Last update: 22 August 2005 Source file position: /contrib/groffer/groffer.man - -Copyright (C) 2001,2002,2004 Free Software Foundation, Inc. -Written by Bernd Warken - -This file is part of groff version @VERSION@. - -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 files COPYING and LICENSE in the top -directory of the groff source. If not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +.. +.de author +This file was written by +.MTO "" "Bernd Warken" . +.. +.de copyleft +Copyright (C) 2001,2002,2004,2005 Free Software Foundation, Inc. +. +.P +This file is part of +.IR \%groffer , +which is part of +.IR \%groff , +a free software project. +. +You can redistribute it and/or modify it under the terms of the +.nh +.B GNU General Public License +.hy +as published by the +.nh +.BR "Free Software Foundation" , +.hy +either version 2, or (at your option) any later version. +. +.P +You should have received a copy of the \f[CR]GNU General Public +License\f[] along with +.IR groff , +see the files \%\f[CB]COPYING\f[] and \%\f[CB]LICENSE\f[] in the top +directory of the +.I groff +source package. +. +Or read the +.I man\~page +.BR gpl (1). +You can also write to the +.nh +.B Free Software Foundation, 51 Franklin St - Fifth Floor, Boston, +.BR "MA 02110-1301, USA" . +.hy .. . .\" -------------------------------------------------------------------- @@ -58,15 +79,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. . ftr CB CW .\} . -.ds @- "\-\"" -.ds @-- "\-\^\-\"" -. -.ds @b- "\f[CB]-\f[]\"" -.ds @b-- "\f[CB]--\f[]\"" -. -.ds @i- "\f[CI]-\f[]\"" -.ds @i-- "\f[CI]--\f[]\"" -. .ds Ellipsis ".\|.\|.\"" . .\" -------------------------------------------------------------------- @@ -188,7 +200,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .c -------------------------------------------------------------------- .c .Opt_- ([]) .c -.c Print `-' (minus sign); optional punctuation. +.c Print `-' (minus sign); optional punctuation. .c .de Opt_- . ie (\\n[.$] == 0) \ @@ -199,7 +211,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .c -------------------------------------------------------------------- .c .Opt_[-] ([]) .c -.c Print `Opt_[-]' (minus sign in brackets); optional punctuation. +.c Print `Opt_[-]' (minus sign in brackets); optional punctuation. .c .de Opt_[-] . ie (\\n[.$] == 0) \ @@ -210,7 +222,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .c -------------------------------------------------------------------- .c .Opt_-- ([]) .c -.c Print `--' (double minus); optional punctuation. +.c Print `--' (double minus); optional punctuation. .c .de Opt_-- . ie (\\n[.$] == 0) \ @@ -221,7 +233,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .c -------------------------------------------------------------------- .c .Opt_[--] ([]) .c -.c Print `Opt_[--]' (double minus in brackets); optional punctuation. +.c Print `Opt_[--]' (double minus in brackets); optional punctuation. .c .de Opt_[--] . ie (\\n[.$] == 0) \ @@ -284,7 +296,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .c Alternating options; base macro for many others; do not use directly. .c .c Arguments: -.c
: prefix, resulted is preceded by this.
+.c   
: prefix, result is preceded by this.
 .c   : separator between minus/opt pairs.
 .c   : postfix, is appended to the result.
 .c   : either `-' or `--' (font CB).
@@ -294,7 +306,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .c Result:
 .c   String `
' followed by the / argument pairs, each
 .c   separated by string `', optionally add '', separated by
-.c   a single space ` ', followed by the string `'.
+.c   a single space ` ', followed by the string `'.  Terminated
+.c   by the optional punctuation .
 .c
 .de Opt_alt_base
 .  nr @font \\n[.f]\"
@@ -314,9 +327,13 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .    \}
 .    c                                  separator
 .    if (\\n[@count] > 0) \
-.      as @res \f[CR]\\*[@sep]\"
+.      as @res \f[CR]\\*[@sep]\:\"
 .    nr @count +1
-.    as @res \f[CB]\\$1\\$2\:\"         combine minus with option name
+.    c                                  combine minus with option name
+.    as @res \f[CB]\\-\"
+.    if '\\$1'--' \
+.      as @res \\-\"
+.    as @res \\$2\"
 .    shift 2
 .  \}
 .  if (\\n[.$] >= 3) \
@@ -553,7 +570,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .de Text
 .  if (\\n[.$] == 0) \
 .    return
+.  nh
 .  nop \)\\$*\)
+.  hy
 ..
 .c --------------------------------------------------------------------
 .c .Topic  ([])
@@ -646,13 +665,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .ad l
 .Synopsis groffer
-.RI [ option...\& ]
+.RI [ option... ]
 .Opt_[--]
-.RI [ "filespec" "\*[Ellipsis]]"
-./Synopsis
-.
-.Synopsis groffer
-.Opt_alt -- apropos -- apropos-data -- apropos-devel -- apropos-progs name
+.RI [ "\%filespec" "\*[Ellipsis]]"
 ./Synopsis
 .
 .Synopsis groffer
@@ -669,62 +684,83 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .\" --------------------------------------------------------------------
 .
 The
-.I groffer
+.B \%groffer
 program is the easiest way to use
-.BR groff (@MAN1EXT@).
+.BR \%groff (@MAN1EXT@).
 It can display arbitrary documents written in the
-.BR groff (@MAN7EXT@)
-language or other
-.BR roff (@MAN7EXT@)
-languages that are compatible to the original troff language.
+.I \%groff
+language, see
+.BR \%groff (@MAN7EXT@),
+or other
+.I \%roff
+languages, see
+.BR \%roff (@MAN7EXT@),
+that are compatible to the original
+.I \%troff
+language.
 .
 The
-.I groffer
+.B \%groffer
 program also includes many of the features for finding and displaying
-the UNIX manual pages
+the \%\f[CR]Unix\f[] manual pages
+.nh
 .RI ( man\~pages ),
+.hy
 such that it can be used as a replacement for a
-.BR man (1)
+.BR \%man (1)
 program.
 .
 Moreover, compressed files that can be handled by
-.BR gzip (1)
+.BR \%gzip (1)
 or
-.BR bzip2 (1)
+.BR \%bzip2 (1)
 are decompressed on-the-fly.
 .
 .
 .P
 The normal usage is quite simple by supplying a file name or name of a
-man\~page without further options.
+.I \%man\~page
+without further options.
 .
 But the option handling has many possibilities for creating special
 behaviors.
 .
-This can be done in configuration files, with the shell environment
-variable
-.BR $GROFFER_OPT ,
+This can be done either in configuration files, with the shell
+environment variable
+.BR \%$GROFFER_OPT ,
 or on the command line.
 .
 .
 .P
 The output can be generated and viewed in several different ways
 available for
-.IR groff .
-.
-This includes the groff native X viewer
-.BR gxditview (@MAN1EXT@),
-each Postcript or dvi display program, a web browser by generating
-html in www-mode, or several text modes in text terminals.
+.IR \%groff .
+.
+This includes the
+.I \%groff
+native \%\f[CR]X\~Window\f[] viewer
+.BR \%gxditview (@MAN1EXT@),
+each
+.IR \%Postcript ,
+.IR \%pdf ,
+or
+.I \%dvi
+display program, a web browser by generating
+.I \%html
+in
+.IR \%www\~mode ,
+or several
+.I \%text\~modes
+in text terminals.
 .
 .
 .P
 Most of the options that must be named when running
-.I groff
+.B \%groff
 directly are determined automatically for
-.IR groffer ,
+.BR \%groffer ,
 due to the internal usage of the
-.BR grog (@MAN1EXT@)
+.BR \%grog (@MAN1EXT@)
 program.
 .
 But all parts can also be controlled manually by arguments.
@@ -734,7 +770,20 @@ But all parts can also be controlled manually by arguments.
 Several file names can be specified on the command line arguments.
 .
 They are transformed into a single document in the normal way of
-.IR groff .
+.BR \%groff .
+.
+.
+.P
+Option handling is done in \f[CR]GNU\f[] style.
+.
+Options and file names can be mixed freely.
+.
+The option
+.RB ` \-\- '
+closes the option handling, all following arguments are treated as
+file names.
+.
+Long options can be abbreviated.
 .
 .
 .\" --------------------------------------------------------------------
@@ -745,41 +794,42 @@ They are transformed into a single document in the normal way of
 .I breaking options
 .RS
 .P
-.Opt_[alt] -- apropos name
-.Opt_[alt] -- apropos-data name
-.Opt_[alt] -- apropos-devel name
-.Opt_[alt] -- apropos-progs name
 .Opt_[alt] - h -- help
 .Opt_[alt] - v -- version
 .RE
 .
 .
 .TP
-.I groffer mode options
+.I \%groffer mode options
 .RS
 .P
 .Opt_[alt] -- auto
 .Opt_[alt] -- default
-.Opt_[alt] -- default-modes mode1,mode2,\*[Ellipsis]
+.Opt_[alt] -- default\-modes mode1,mode2,\*[Ellipsis]
 .Opt_[alt] -- dvi
-.Opt_[alt] -- dvi-viewer prog
+.Opt_[alt] -- dvi\-viewer prog
+.Opt_[alt] -- dvi\-viewer\-tty prog
 .Opt_[alt] -- groff
 .Opt_[alt] -- html
-.Opt_[alt] -- html-viewer prog
-.Opt_[alt] -- man
+.Opt_[alt] -- html\-viewer prog
+.Opt_[alt] -- html\-viewer\-tty prog
 .Opt_[alt] -- mode display_mode
-.Opt_[alt] -- no-man
 .Opt_[alt] -- pdf
-.Opt_[alt] -- pdf-viewer prog
+.Opt_[alt] -- pdf\-viewer prog
+.Opt_[alt] -- pdf\-viewer\-tty prog
 .Opt_[alt] -- ps
-.Opt_[alt] -- ps-viewer prog
+.Opt_[alt] -- ps\-viewer prog
+.Opt_[alt] -- ps\-viewer\-tty prog
 .Opt_[alt] -- text
 .Opt_[alt] -- tty
-.Opt_[alt] -- tty-viewer prog
+.Opt_[alt] -- tty\-viewer prog
+.Opt_[alt] -- tty\-viewer\-tty prog
 .Opt_[alt] -- www
-.Opt_[alt] -- www-viewer prog
+.Opt_[alt] -- www\-viewer prog
+.Opt_[alt] -- www\-viewer\- prog
 .Opt_[alt] -- x -- X
-.Opt_[alt] -- x-viewer -- X-viewer prog
+.Opt_[alt] -- x\-viewer -- X\-viewer prog
+.Opt_[alt] -- x\-viewer\-tty -- X\-viewer\-tty prog
 .RE
 .
 .
@@ -788,45 +838,40 @@ They are transformed into a single document in the normal way of
 .RS
 .P
 .Opt_[alt] -- debug
-.Opt_[alt] -- shell
+.Opt_[alt] -- do\-nothing
+.Opt_[alt] -- shell prog
+.Opt_[alt] - Q -- source
+.Opt_[alt] - V
 .RE
 .
 .
 .TP
-.I options related to groff
+.I options related to \%groff
 .RS
 .P
-.Opt_[alt] - P -- postproc-arg opt_or_arg
-.Opt_[alt] - Q -- source
 .Opt_[alt] - T -- device device
-.Opt_[alt] - Z -- intermediate-output -- ditroff
+.Opt_[alt] - Z -- intermediate\-output -- ditroff
 .P
 All further
-.I groff
+.B \%groff
 short options are accepted.
 .RE
 .
 .
 .TP
-.I X Window toolkit options
-.RS
-.P
-.Opt_[alt] -- bd pixels
-.Opt_[alt] -- bg -- background color
-.Opt_[alt] -- bw pixels
-.Opt_[alt] -- display X-display
-.Opt_[alt] -- fg -- foreground color
-.Opt_[alt] -- ft -- font font_name
-.Opt_[alt] -- geometry size_pos
-.Opt_[alt] -- resolution value
-.Opt_[alt] -- rv
-.Opt_[alt] -- title string
-.Opt_[alt] -- xrm X_resource
-.RE
+.I options for man\~pages
+.Opt_[alt] -- apropos
+.Opt_[alt] -- apropos\-data
+.Opt_[alt] -- apropos\-devel
+.Opt_[alt] -- apropos\-progs
+.Opt_[alt] -- whatis
+.Opt_[alt] -- man
+.Opt_[alt] -- no-man
+.Opt_[alt] -- no-special
 .
 .
 .TP
-.I options from man
+.I long options taken over from GNU man
 .RS
 .P
 .Opt_[alt] -- all
@@ -840,20 +885,37 @@ short options are accepted.
 .Opt_[alt] -- sections sec1:sec2:\*[Ellipsis]
 .Opt_[alt] -- systems sys1,sys2,\*[Ellipsis]
 .Opt_[alt] -- troff-device device
-.Opt_[alt] -- whatis
 .P
-Further long options of GNU
-.I man
+Further long options of \f[CR]GNU\f[]
+.B man
 are accepted as well.
 .RE
 .
 .
 .TP
-.I filespec argument
+.I X Window Toolkit options
+.RS
+.P
+.Opt_[alt] -- bd pixels
+.Opt_[alt] -- bg -- background color
+.Opt_[alt] -- bw pixels
+.Opt_[alt] -- display X-display
+.Opt_[alt] -- fg -- foreground color
+.Opt_[alt] -- ft -- font font_name
+.Opt_[alt] -- geometry size_pos
+.Opt_[alt] -- resolution value
+.Opt_[alt] -- rv
+.Opt_[alt] -- title string
+.Opt_[alt] -- xrm X-resource
+.RE
+.
+.
+.TP
+.I \%filespec arguments
 .RS
 .P
 No
-.I filespec
+.I \%filespec
 parameters means standard input.
 .
 .
@@ -871,9 +933,9 @@ the path name of an existing file.
 .BI man: name ( section )
 .TP+
 .IB name ( section )
-search the man\~page
-.I name
-in man\~section\~\c
+search the \%man\~page
+.I \%name
+in \%man\~section
 .IR section .
 .
 .
@@ -884,17 +946,17 @@ in man\~section\~\c
 if
 .I s
 is a character in
-.BR [1-9on] ,
-search for a man\~page
-.I name
-in man\~section
+.BR \%[1-9on] ,
+search for a \%man\~page
+.I \%name
+in \%man\~section
 .IR s .
 .
 .
 .TP
 .BI man: name
-man\~page in the lowest man\~section that has
-.IR name .
+\%man\~page in the lowest \%man\~section that has
+.IR \%name .
 .
 .
 .TP
@@ -902,19 +964,19 @@ man\~page in the lowest man\~section that has
 if
 .I s
 is a character in
-.BR [1-9on] ,
-search for a man\~page
-.I name
-in man\~section
+.BR \%[1-9on] ,
+search for a \%man\~page
+.I \%name
+in \%man\~section
 .IR s .
 .
 .
 .TP
 .I name
-if 
-.I name
+if
+.I \%name
 is not an existing file search for the man\~page
-.I name
+.I \%name
 in the lowest man\~section.
 .
 .RE
@@ -925,7 +987,7 @@ in the lowest man\~section.
 .\" --------------------------------------------------------------------
 .
 The
-.I groffer
+.B \%groffer
 program can usually be run with very few options.
 .
 But for special purposes, it supports many options.
@@ -935,14 +997,14 @@ These can be classified in 5 option classes.
 .
 .P
 All short options of
-.I groffer
+.B \%groffer
 are compatible with the short options of
-.BR groff (@MAN1EXT@).
+.BR \%groff (@MAN1EXT@).
 .
 All long options of
-.I groffer
+.B \%groffer
 are compatible with the long options of
-.BR man (1).
+.BR \%man (1).
 .
 .
 .\" --------------------------------------------------------------------
@@ -951,52 +1013,12 @@ are compatible with the long options of
 .
 As soon as one of these options is found on the command line it is
 executed, printed to standard output, and the running
-.I groffer
+.B \%groffer
 is terminated thereafter.
 .
 All other arguments are ignored.
 .
 .
-.Opt_def -- apropos name
-Start the
-.BR apropos (1)
-command for searching within man page
-descriptions.
-.
-That slightly differs from the strange behavior of the
-.Opt_long apropos
-program of
-.BR man (1),
-which has no argument of its own, but takes the file arguments
-instead.
-.
-Practically both concepts are compatible.
-.
-.
-.Opt_def -- apropos-data name
-Show only the
-.BR apropos (1)
-descriptions for data documents, in the
-.BR man (7)
-sections 4, 5, and 7.
-.
-.
-.Opt_def -- apropos-devel name
-Show only the
-.BR apropos (1)
-descriptions for development documents, in the
-.BR man (7)
-sections 2, 3, and 9.
-.
-.
-.Opt_def -- apropos-progs name
-Show only the
-.BR apropos (1)
-descriptions for documents on programs, in the
-.BR man (7)
-sections 1, 6, and 8.
-.
-.
 .Opt_def - h -- help
 Print a helping information with a short explanation of option sto
 standard output.
@@ -1014,9 +1036,60 @@ The display mode and the viewer programs are determined by these
 options.
 .
 If none of these mode and viewer options is specified
-.I groffer
+.B \%groffer
 tries to find a suitable display mode automatically.
 .
+The default modes are
+.I mode x
+with
+.B gxditview
+in \%\f[CR]X\~Window\f[] and
+.I mode tty
+with device
+.I latin1
+under
+.B less
+on a terminal.
+.
+.
+.P
+There are two kinds of options for viewers.
+.Opt_long \fImode\fP-viewer
+chooses the normal viewer programs that run on their own in
+\%\f[CR]X\~Window\f[], while
+.Opt_long \fImode\fP-viewer-tty
+chooses programs that run on the terminal (on tty).
+.
+Most graphical viewers are programs running in \%\f[CR]X\~Window\f[],
+so there aren't many opportunities to call the tty viewers.
+.
+But they give the chance to view the output source; for example,
+.Opt_long ps\-viewer\-tty=less
+shows the content of the
+.I Postscript
+output with the pager
+.BR less .
+.
+.
+.P
+The \%\f[CR]X\~Window\f[] viewers are not critical, you can use both
+.Opt_long *\-viewer
+and
+.Opt_long *\-viewer\-tty
+for them; with
+.Opt_long *\-viewer\-tty
+the viewer program will not become independently, it just stays
+coupled with
+.BR groffer .
+But the program will not run if you specify a terminal program with
+.Opt_long *\-viewer
+because this viewer will stay in background without a chance to reach
+it.
+.
+So you really need
+.Opt_long *\-viewer\-tty
+for viewers that run on tty.
+.
 .
 .Opt_def -- auto
 Equivalent to
@@ -1032,9 +1105,9 @@ This is useful to wipe out all former options of the configuration, in
 and restart option processing using only the rest of the command line.
 .
 .
-.Opt_def -- default-modes mode1,mode2,\*[Ellipsis]
+.Opt_def -- default\-modes mode1,mode2,\*[Ellipsis]
 Set the sequence of modes for
-.I auto mode
+.I \%auto\~mode
 to the comma separated list given in the argument.
 .
 See
@@ -1044,30 +1117,42 @@ means to try the modes
 .IR x ,
 .IR ps ,
 and
-.I tty
+.I \%tty
 in this sequence.
 .
 .
 .
 .Opt_def -- dvi
 Equivalent to
-.Opt_long_arg mode dvi .
+.Opt_long_arg mode \%dvi .
 .
 .
-.Opt_def -- dvi-viewer prog
-Set the viewer program for dvi mode.
+.Opt_def -- dvi\-viewer prog
+Choose an \%\f[CR]X\~Window\f[] viewer program for
+.IR \%dvi\~mode .
 .
 This can be a file name or a program to be searched in
 .Env_var $PATH .
 .
-Known dvi viewers inlude
-.BR xdvi (1)
+Known \%\f[CR]X\~Window\f[]
+.I \%dvi
+viewers include
+.BR \%xdvi (1)
 and
-.BR dvilx (1)
+.BR \%dvilx (1)
 .
 In each case, arguments can be provided additionally.
 .
 .
+.Opt_def -- dvi\-viewer\-tty prog
+Choose a program running on the terminal for viewing the output of
+.IR \%dvi\~mode .
+.
+This can be a file name or a program to be searched in
+.Env_var $PATH ;
+arguments can be provided additionally.
+.
+.
 .Opt_def -- groff
 Equivalent to
 .Opt_long_arg mode groff .
@@ -1078,9 +1163,23 @@ Equivalent to
 .Opt_long_arg mode html .
 .
 .
-.Opt_def -- html-viewer
-Equivalent to
-.Opt_long www-viewer .
+.Opt_def -- html\-viewer
+Choose an \%\f[CR]X\~Window\f[] web browser program for viewing in
+.I \%html\~mode .
+.
+It can be the path name of an executable file or a program in
+.Env_var $PATH .
+.
+In each case, arguments can be provided additionally.
+.
+.
+.Opt_def -- html\-viewer\-tty
+Choose a terminal program for viewing the output of
+.I \%html\~mode .
+.
+It can be the path name of an executable file or a program in
+.Env_var $PATH ;
+arguments can be provided additionally.
 .
 .
 .Opt_def -- mode value
@@ -1096,21 +1195,22 @@ The following mode values are recognized:
 Select the automatic determination of the display mode.
 .
 The sequence of modes that are tried can be set with the
-.Opt_long default-modes
+.Opt_long default\-modes
 option.
 .
-Useful for restoring the default mode when a different mode was
-specified before.
+Useful for restoring the
+.I \%default\~mode
+when a different mode was specified before.
 .
 .
 .TP
 .Header_CB dvi
 Display formatted input in a
-.I dvi
+.I \%dvi
 viewer program.
 .
 By default, the formatted input is displayed with the
-.BR xdvi (1)
+.BR \%xdvi (1)
 program.
 .Opt_long dvi .
 .
@@ -1118,13 +1218,13 @@ program.
 .TP
 .Header_CB groff
 After the file determination, switch
-.I groffer
+.B \%groffer
 to process the input like
-.BR groff (@MAN1EXT@)
-would do .
+.BR \%groff (@MAN1EXT@)
+would do.
 .
 This disables the
-.I groffer
+.I \%groffer
 viewing features.
 .
 .
@@ -1135,34 +1235,37 @@ browser program.
 .
 By default, the existence of a sequence of standard web browsers is
 tested, starting with
-.BR konqueror (1)
+.BR \%konqueror (1)
 and
-.BR mozilla (1).
+.BR \%mozilla (1).
 The text html viewer is
-.BR lynx (1).
+.BR \%lynx (1).
 .
 .
 .TP
 .Header_CB pdf
 Display formatted input in a
-.I PDF
+.I \%PDF
 (Portable Document Format) viewer
 program.
 .
-By default, the input is formatted by groff using the Postscript
-device, then it is transformed into the PDF file format using
-.BR gs (1),
+By default, the input is formatted by
+.B \%groff
+using the Postscript device, then it is transformed into the PDF file
+format using
+.BR \%gs (1),
 and finally displayed either with the
-.BR xpdf (1)
+.BR \%xpdf (1)
 or the
-.BR acroread (1)
+.BR \%acroread (1)
 program.
 .
 PDF has a big advantage because the text is displayed graphically and
 is searchable as well.
 .
 But as the transformation takes a considerable amount of time, this
-mode is not suitable as a default device for the auto mode.
+mode is not suitable as a default device for the
+.I \%auto\~mode .
 .
 .
 .TP
@@ -1170,19 +1273,19 @@ mode is not suitable as a default device for the auto mode.
 Display formatted input in a Postscript viewer program.
 .
 By default, the formatted input is displayed with the
-.BR ghostview (@MAN1EXT@)
+.BR \%ghostview (@MAN1EXT@)
 program.
 .
 .
 .TP
 .Header_CB text
 Format in a
-.I groff
-text mode and write the result to standard output without a pager or
-viewer program.
+.I \%groff\~text\~mode
+and write the result to standard output without a pager or viewer
+program.
 .
 The text device,
-.I latin1
+.I \%latin1
 by default, can be chosen with option
 .Opt_short T .
 .
@@ -1190,37 +1293,68 @@ by default, can be chosen with option
 .TP
 .Header_CB tty
 Format in a
-.I groff
-text mode and write the result to standard output using a text pager
-program, even when in X Window.
+.I \%groff\~text\~mode
+and write the result to standard output using a text pager program,
+even when in \%\f[CR]X\~Window\f[].
 .
 .
 .TP
 .Header_CB www
 Equivalent to
-.Opt_long www .
+.Opt_long_arg mode html .
 .
 .
 .TP
-.Header_CB X
-Display formatted input in a native roff viewer.
+.Header_CB x
+Display the formatted input in a native
+.I roff
+viewer.
 .
 By default, the formatted input is displayed with the
-.BR gxditview (@MAN1EXT@)
-program, being distributed together with groff, or with
-.BR xditview (1),
-which is distributed as a standard X tool.
+.BR \%gxditview (@MAN1EXT@)
+program being distributed together with
+.BR \%groff .
+But the standard \%\f[CR]X\~Window\f[] tool
+.BR \%xditview (1)
+can also be chosen with the option
+.Opt_long x\-viewer .
+The default resolution is
+.BR 75\~dpi ,
+but
+.B 100\~dpi
+are also possible.
+.
+The default
+.I groff
+device
+for the resolution of
+.B 75\~dpi
+is
+.BR X75\-12 ,
+for
+.B 100\~dpi
+it is
+.BR X100 .
+.
+The corresponding
+.I "groff intermediate output"
+for the actual device is generated and the result is displayed.
+.
+For a resolution of
+.BR 100\~dpi ,
+the default width of the geometry of the display program is chosen to
+.BR 850\~dpi .
 .
 .
 .TP
-.Header_CB x
+.Header_CB X
 Equivalent to
-.Opt_long_arg mode X .
+.Opt_long_arg mode x .
 .
 .
 .P
 The following modes do not use the
-.I groffer
+.I \%groffer
 viewing features.
 .
 They are only interesting for advanced applications.
@@ -1229,15 +1363,15 @@ They are only interesting for advanced applications.
 .TP
 .Header_CB groff
 Generate device output with plain
-.I groff
+.I \%groff
 without using the special viewing features of
-.IR groffer .
+.IR \%groffer .
 If no device was specified by option
 .Opt_short T
 the
-.I groff
+.I \%groff
 default
-.B ps
+.B \%ps
 is assumed.
 .
 .
@@ -1255,15 +1389,22 @@ Equivalent to
 .Opt_long_arg mode pdf .
 .
 .
-.Opt_def -- pdf-viewer prog
-Set the viewer program for
-.I pdf
-mode.
+.Opt_def -- pdf\-viewer prog
+Choose an \%\f[CR]X\~Window\f[] viewer program for
+.IR \%pdf\~mode .
 .
 This can be a file name or a program to be searched in
-.Env_var $PATH .
+.Env_var $PATH ;
+arguments can be provided additionally.
 .
-In each case, arguments can be provided additionally.
+.
+.Opt_def -- pdf\-viewer\-tty prog
+Choose a terminal viewer program for
+.IR \%pdf\~mode .
+.
+This can be a file name or a program to be searched in
+.Env_var $PATH ;
+arguments can be provided additionally.
 .
 .
 .Opt_def -- ps
@@ -1271,23 +1412,31 @@ Equivalent to
 .Opt_long_arg mode ps .
 .
 .
-.Opt_def -- ps-viewer prog
-Set the viewer program for
-.I ps
-mode.
+.Opt_def -- ps\-viewer prog
+Choose an \%\f[CR]X\~Window\f[] viewer program for
+.IR \%ps\~mode .
 .
 This can be a file name or a program to be searched in
 .Env_var $PATH .
 .
 Common Postscript viewers inlude
-.BR gv (1),
-.BR ghostview (1),
+.BR \%gv (1),
+.BR \%ghostview (1),
 and
-.BR gs (1),
+.BR \%gs (1),
 .
 In each case, arguments can be provided additionally.
 .
 .
+.Opt_def -- ps\-viewer\-tty prog
+Choose a terminal viewer program for
+.IR \%ps\~mode .
+.
+This can be a file name or a program to be searched in
+.Env_var $PATH ;
+arguments can be provided additionally.
+.
+.
 .Opt_def -- text
 Equivalent to
 .Opt_long_arg mode text .
@@ -1298,74 +1447,93 @@ Equivalent to
 .Opt_long_arg mode tty .
 .
 .
-.Opt_def -- tty-viewer
-Choose tty display mode, that means displaying in a text pager even
-when in X; eqivalent to
-.Opt_long_arg mode tty .
+.Opt_def -- tty\-viewer prog
+Choose a text pager for mode
+.IR tty .
+The standard pager is
+.BR less (1).
+This option is eqivalent to
+.I man
+option
+.Opt_long_arg pager prog .
+The option argument can be a file name or a program to be searched in
+.Env_var $PATH ;
+arguments can be provided additionally.
+.
+.
+.Opt_def -- tty\-viewer\-tty prog
+This is equivalent to
+.Opt_long tty\-viewer
+because the programs for
+.I tty
+mode run on a terminal anyway.
 .
 .
 .Opt_def -- www
 Equivalent to
-.Opt_long_arg mode www .
+.Opt_long_arg mode html .
 .
 .
-.Opt_def -- www-viewer prog
-Set the web browser program for viewing in
-.I www
-mode.
+.Opt_def -- www\-viewer prog
+Equivalent to
+.Opt_long html\-viewer .
 .
-Each program that accepts html input and allows the
-.BI file://localhost/ dir / file
-syntax on the command line is suitable as viewer program; it can be
-the path name of an executable file or a program in
-.Env_var $PATH .
 .
-In each case, arguments can be provided additionally.
+.Opt_def -- www\-viewer\-tty prog
+Equivalent to
+.Opt_long html\-viewer\-tty .
 .
 .
-.Opt_def - X -- X -- x
+.Opt_def -- X -- x
 Equivalent to
-.Opt_long_arg mode X .
-.
+.Opt_long_arg mode x .
 .
-.Opt_def -- X-viewer -- x-viewer prog
-Set the viewer program for
-.I x
-mode.
 .
+.Opt_def -- X\-viewer -- x\-viewer prog
+Choose an \%\f[CR]X\~Window\f[] viewer program for
+.IR \%x\~mode .
 Suitable viewer programs are
-.BR gxditview (@MAN1EXT@)
-and
-.BR xditview (1).
+.BR \%gxditview (@MAN1EXT@)
+which is the default and
+.BR \%xditview (1).
+The argument can be any executable file or a program in
+.Env_var $PATH ;
+arguments can be provided additionally.
 .
-But the argument can be any executable file or a program in
-.Env_var $PATH .
 .
-In each case, arguments can be provided additionally.
+.Opt_def -- X\-viewer\-tty -- x\-viewer\-tty prog
+Choose a terminal viewer program for
+.IR \%x\~mode .
+The argument can be any executable file or a program in
+.Env_var $PATH ;
+arguments can be provided additionally.
 .
 .
 .TP
 .Opt_--
 Signals the end of option processing; all remaining arguments are
 interpreted as
-.I filespec
+.I \%filespec
 parameters.
 .
 .
 .P
 Besides these,
-.I groffer
-accepts all arguments that are valid for the
-.BR groff (@MAN1EXT@)
+.B \%groffer
+accepts all short options that are valid for the
+.BR \%groff (@MAN1EXT@)
 program.
 .
-All non-groffer options are sent unmodified via
-.I grog
+All
+.RB \%non- groffer
+options are sent unmodified via
+.B \%grog
 to
-.IR groff .
+.BR \%groff .
 .
-Postprocessors, macro packages, compatibility with classical
-.IR troff ,
+So postprocessors, macro packages, compatibility with
+.I classical
+.IR \%troff ,
 and much more can be manually specified.
 .
 .
@@ -1374,19 +1542,86 @@ and much more can be manually specified.
 .\" --------------------------------------------------------------------
 .
 .Opt_def -- debug
-Print debugging information for development only.
+Enable five debugging informations.
+.
+The temporary files are kept and not deleted, the name of the
+temporary directory and the shell name for
+.File_name groffer2.sh
+are printed, the parameters are printed at several steps of
+development, and a function stack is output with function
+\f[CR]error_user()\f[] as well.
+.
+Neither the function call stack that is printed at each opening and
+closing of a function call nor the landmark information that is
+printed to determine how far the program is running are used.
+.
+This seems to be the most useful among all debugging options.
+.
+.
+.Opt_def -- debug\-all
+Enable all seven debugging informations including the function call
+stack and the landmark information.
+.
+.
+.Opt_def -- debug\-keep
+Enable two debugging information, the printing of the name of the
+temporary directory and the keeping of the temporary files.
+.
+.
+.Opt_def -- debug\-lm
+Enable one debugging information, the landmark information.
+.
+.
+.Opt_def -- debug\-params
+Enable one debugging information, the parameters at several steps.
+.
 .
-Actually, a function call stack is printed if an error occurs.
+.Opt_def -- debug\-shell
+Enable one debugging information, the shell name for
+.File_name groffer2.sh .
+.
+.
+.Opt_def -- debug\-stacks
+Enable one debugging information, the function call stack.
+.
+.
+.Opt_def -- debug\-tmpdir
+Enable one debugging information, the name of the temporary directory.
+.
+.
+.Opt_def -- debug\-user
+Enable one debugging information, the function stack with
+\f[CR]error_user()\f[].
+.
+.
+.Opt_def -- do-nothing
+This is like
+.Opt_long version ,
+but without the output; no viewer is started.
+.
+This makes only sense in development.
+.
+.
+.Opt_def -- print=text
+Just print the argument to standard error.
+.
+This is good for parameter check.
 .
 .
 .Opt_def -- shell "shell_program"
-Specify the shell under which the groffer script should be run.
+Specify the shell under which the
+.File_name \%groffer2.sh
+script should be run.
 .
-The script first tests whether this option is set (either by
-configuration, within
-.Env_var $GROFF_OPT
-or as a command line option); if so, the script is rerun under the
-shell program specified with the option argument.
+This option overwrites the automatic shell determination of the
+program.
+.
+If the argument
+.I shell_program
+is empty a former shell option and the automatic shell determination
+is cancelled and the default shell is restored.
+.
+Some shells run considerably faster than the standard shell.
 .
 .
 .Opt_def - Q -- source
@@ -1397,14 +1632,43 @@ This is the equivalent
 .Opt_long_arg mode source .
 .
 .
+.Opt_def - V
+This is an advanced option for debugging only.
+.
+Instead of displaying the formatted input, a lot of
+.I \%groffer
+specific information is printed to standard output:
+.
+.RS
+.Topic
+the output file name in the temporary directory,
+.
+.Topic
+the display mode of the actual
+.B \%groffer
+run,
+.
+.Topic
+the display program for viewing the output with its arguments,
+.
+.Topic
+the active parameters from the config files, the arguments in
+.Env_var $GROFFER_OPT ,
+and the arguments of the command line,
+.
+.Topic
+the pipeline that would be run by the
+.B \%groff
+program, but without executing it.
+.RE
+.
+.
 .P
 Other useful debugging options are the
-.I groff
-options
-.Opt_short V
-and
+.B \%groff
+option
 .Opt_short Z
-and option
+and
 .Opt_long_arg mode groff .
 .
 .
@@ -1413,49 +1677,49 @@ and option
 .\" --------------------------------------------------------------------
 .
 All short options of
-.I groffer
+.B \%groffer
 are compatible with the short options of
-.BR groff (@MAN1EXT@).
+.BR \%groff (@MAN1EXT@).
 .
 The following of
-.I groff
+.B \%groff
 options have either an additional special meaning within
-.I groffer
+.B \%groffer
 or make sense for normal usage.
 .
 .
 .P
 Because of the special outputting behavior of the
-.I groff
-options
-.Opt_short V
-and
+.B \%groff
+option
 .Opt_short Z
-.I groffer
+.B \%groffer
 was designed to be switched into
-.I groff
-mode by these; the
-.I groffer
+.I \%groff\~mode ;
+the
+.I \%groffer
 viewing features are disabled there.
 .
 The other
-.I groff
+.B \%groff
 options do not switch the mode, but allow to customize the formatting
 process.
 .
 .
 .Opt_def - a
-This generates an ascii approximation of output in text modes.
+This generates an ascii approximation of output in the
+.IR \%text\~modes .
 .
 That could be important when the text pager has problems with control
-sequences.
+sequences in
+.IR "tty mode" .
 .
 .
 .Opt_def - m file
 Add
-.I file
+.I \%file
 as a
-.I groff
+.I \%groff
 macro file.
 .
 This is useful in case it cannot be recognized automatically.
@@ -1463,317 +1727,334 @@ This is useful in case it cannot be recognized automatically.
 .
 .Opt_def - P opt_or_arg
 Send the argument
-.I opt_or_arg
+.I \%opt_or_arg
 as an option or option argument to the actual
-.I groff
+.B \%groff
 postprocessor.
 .
 .
 .Opt_def - T -- device devname
 .
 This option determines
-.IR groff 's
+.BR \%groff 's
 output device.
 .
 The most important devices are the text output devices for referring
 to the different character sets, such as
-.BR ascii ,
-.BR utf8 ,
-.BR latin1 ,
+.BR \%ascii ,
+.BR \%utf8 ,
+.BR \%latin1 ,
 and others.
 .
 Each of these arguments switches
-.I groffer
-into a text mode using this device, to
-.I mode tty
-if the actual mode is not a text mode.
+.B \%groffer
+into a
+.I \%text\~mode
+using this device, to
+.I \%mode\~tty
+if the actual mode is not a
+.IR \%text\~mode .
 .
 The following
-.I devname
+.I \%devname
 arguments are mapped to the corresponding
-.I groffer
+.B \%groffer
 .Opt_long_arg mode \fIdevname\fR
 option:
-.BR dvi ,
-.BR html ,
+.BR \%dvi ,
+.BR \%html ,
 and
-.BR ps .
+.BR \%ps .
 All
-.B X*
-arguments are mapped to mode
-.BR X .
+.B \%X*
+arguments are mapped to
+.IR \%mode\~x .
 Each other
-.I devname
+.I \%devname
 argument switches to
-.I mode groff
+.I \%mode\~groff
 using this device.
 .
 .
-.Opt_def - V
-Switch into
-.I groff
-mode and show only the
-.I groff
-calling pipe without formatting the input.
-.
-This an advanced option from
-.BR groff (@MAN1EXT@) ,
-only useful for debugging.
-.
-.
 .Opt_def - X
-was made equivalent to
-.Opt_long_arg mode x ;
-this slightly enhances the facility of
-.IR groff 's
-option.
+is equivalent to
+.BR "groff \-X" .
+It displays the
+.I groff intermediate output
+with
+.BR gxditview .
+As the quality is relatively bad this option is deprecated; use
+.Opt_long X
+instead because the
+.I \%x\~mode
+uses an
+.IR X *
+device for a better display.
 .
 .
 .Opt_def - Z -- intermediate-output -- ditroff
 Switch into
-.I groff
-mode and format the input with
-.I groff
-intermediate output without postprocessing; see
-.BR groff_out (@MAN1EXT@).
+.I \%groff\~mode
+and format the input with the
+.I \%groff intermediate output
+without postprocessing; see
+.BR \%groff_out (@MAN5EXT@).
 This is equivalent to option
 .Opt_long ditroff
 of
-.IR man ,
+.IR \%man ,
 which can be used as well.
 .
 .
 .P
 All other
-.I groff
+.B \%groff
 options are supported by
-.IR groffer ,
+.BR \%groffer ,
 but they are just transparently transferred to
-.I groff
+.B \%groff
 without any intervention.
 .
 The options that are not explicitly handled by
-.I groffer
+.B \%groffer
 are transparently passed to
-.IR groff .
+.BR \%groff .
 .
 Therefore these transparent options are not documented here, but in
-.BR groff (@MAN1EXT@).
+.BR \%groff (@MAN1EXT@).
 Due to the automatism in
-.IR groffer ,
+.BR \%groffer ,
 none of these
-.I groff
+.B \%groff
 options should be needed, except for advanced usage.
 .
 .
 .\" --------------------------------------------------------------------
-.SS "X Window toolkit Options"
+.SS "Options for man\~pages"
 .\" --------------------------------------------------------------------
 .
-The following long options were adapted from the corresponding X
-Toolkit options.
-.
-.I groffer
-will pass them to the actual viewer program if it is an X Window
-program.
-.
-Otherwise these options are ignored.
-.
-.
-.P
-Unfortunately these options use the old style of a single minus for
-long options.
-.
-For
-.I groffer
-that was changed to the standard with using a double minus for long
-options, for example,
-.I groffer
-uses the option
-.Opt_long font
-for the
-.I X
-option
-.Opt_short font .
-.
-.
-.P
-See
-.BR X (1),
-.BR X (7),
-and the documentation on the X toolkit options for more details on
-these options and their arguments.
-.
-.
-.Opt_def -- background color
-Set the background color of the viewer window.
+.Opt_def -- apropos
+Start the
+.BR \%apropos (1)
+command or facility of
+.BR \%man (1)
+for searching the
+.I \%filespec
+arguments within all
+.I \%man\~page
+descriptions.
 .
+Each
+.I \%filespec
+argument is taken for search as it is; section specific parts are not
+handled, such that
+.B 7 groff
+searches for the two arguments
+.B 7
+and
+.B groff
+with a large result; for the
+.I \%filespec
+.B groff.7
+nothing will be found.
+.
+The display differs from the
+.B \%apropos
+program by the following concepts:
+.RS
+.Topic
+construct a
+.I \%groff
+frame to the output of
+.BR \%apropos ,
+.Topic
+each
+.I \%filespec
+argument is searched on its own.
+.Topic
+the restriction by
+.Opt_long sections
+is handled as well,
+.Topic
+wildcard characters are allowed and handled without a further option.
+.RE
 .
-.Opt_def -- bd pixels
-Specifies the color of the border surrounding the viewer window.
 .
+.Opt_def -- apropos\-data
+Show only the
+.B \%apropos
+descriptions for data documents, these are the
+.BR \%man (7)
+sections 4, 5, and 7.
 .
-.Opt_def -- bg color
-This is equivalent to
-.Opt_long background .
+Direct section declarations are ignored, wildcards are accepted.
 .
 .
-.Opt_def -- bw pixels
-Specifies the width in pixels of the border surrounding the viewer
-window.
+.Opt_def -- apropos\-devel
+Show only the
+.B \%apropos
+descriptions for development documents, these are the
+.BR man (7)
+sections 2, 3, and 9.
 .
+Direct section declarations are ignored, wildcards are accepted.
 .
-.Opt_def -- display X-display
-Set the X display on which the viewer program shall be started, see the
-.I X Window
-documentation for the syntax of the argument.
 .
+.Opt_def -- apropos\-progs
+Show only the
+.B \%apropos
+descriptions for documents on programs, these are the
+.BR \%man (7)
+sections 1, 6, and 8.
 .
-.Opt_def -- foreground color
-Set the foreground color of the viewer window.
+Direct section declarations are ignored, wildcards are accepted.
 .
 .
-.Opt_def -- fg color
-This is equivalent to
-.Opt_short foreground .
+.Opt_def -- whatis
+For each
+.I \%filespec
+argument search all
+.I \%man\~pages
+and display their description \[em] or say that it is not a
+.IR \%man\~page .
+This differs from
+.IR man 's
+.B whatis
+output by the following concepts
+.RS
+.Topic
+each retrieved file name is added,
+.Topic
+local files are handled as well,
+.Topic
+the display is framed by a
+.I groff
+output format,
+.Topic
+wildcard characters are allowed without a further option.
+.RE
 .
 .
-.Opt_def -- font font_name
-Set the font used by the viewer window.
+.P
+The following two options were added to
+.B \%groffer
+for choosing whether the file name arguments are interpreted as names
+for local files or as a search pattern for
+.IR \%man\~pages .
 .
-The argument is an X font name.
+The default is looking up for local files.
 .
 .
-.Opt_def -- ft font_name
-This is equivalent to
-.Opt_long ft .
+.Opt_def -- man
+Check the non-option command line arguments
+.nh
+.RI ( filespecs )
+.hy
+first on being
+.IR \%man\~pages ,
+then whether they represent an existing file.
 .
+By default, a
+.I \%filespec
+is first tested whether it is an existing file.
 .
-.Opt_def -- geometry size_pos
-Set the geometry of the display window, that means its size and its
-starting position.
 .
-See
-.BR X (7)
-for the syntax of the argument.
+.Opt_def -- no-man -- local-file
+Do not check for
+.IR \%man\~pages .
 .
+.Opt_long local-file
+is the corresponding
+.B man
+option.
 .
-.Opt_def -- resolution value
-Set X resolution in dpi (dots per inch) in some viewer programs.
 .
-The only supported dpi values are
-.B 75
+.Opt_def -- no-special
+Disable former calls of
+.Opt_long all ,
+.Opt_long apropos* ,
 and
-.BR 100 .
-.
-Actually, the default resolution for
-.I groffer
-is set to
-.BR 75 .
-.
-.
-.Opt_def -- rv
-Reverse foreground and background color of the viewer window.
-.
-.
-.Opt_def -- title "'some text'"
-Set the title for the viewer window.
-.
-.
-.Opt_def -- xrm "'resource'"
-Set X resource.
+.Opt_long whatis .
 .
 .
 .\" --------------------------------------------------------------------
-.SS "Options from man"
+.SS "Long options taken over from GNU man"
 .\" --------------------------------------------------------------------
 .
 The long options of
-.I groffer
-were synchronized with the long options of
-.IR GNU man .
+.B \%groffer
+were synchronized with the long options of \f[CR]GNU\f[]
+.BR man .
 .
-All long options of
-.I GNU man
+All long options of \f[CR]GNU\f[]
+.B man
 are recognized, but not all of these options are important to
-.IR groffer ,
+.BR \%groffer ,
 so most of them are just ignored.
 .
 .
 .P
-The following two options were added by
-.I groffer
-for choosing whether the file name arguments are interpreted as names
-for local files or as a search pattern for man pages.
-.
-The default is looking up for local files.
-.
-.
-.Opt_def -- man
-Check the non-option command line arguments (filespecs) first on being
-man\~pages, then whether they represent an existing file.
-.
-By default, a filespec is first tested whether it is an existing file.
-.
-.
-.Opt_def -- no-man -- local-file
-Do not check for man\~pages.
-.
-.Opt_long local-file
-is the corresponding
-.I man
-option.
-.
-.
-.P
 In the following, the
-.I man
+.B man
 options that have a special meaning for
-.I groffer
+.B \%groffer
 are documented.
 .
 .
 .P
-The full set of long and short options of the
-.I GNU man
+The full set of long and short options of the \f[CR]GNU\f[]
+.B man
 program can be passed via the environment variable
 .Env_var $MANOPT ;
 see
-.BR man (1)
-if your system has
-.I GNU man
+.BR \%man (1)
+if your system has \f[CR]GNU\f[]
+.B man
 installed.
 .
 .
 .Opt_def -- all
-In searching man\~pages, retrieve all suitable documents instead of
-only one.
+In searching
+.IR \%man\~pages ,
+retrieve all suitable documents instead of only one.
 .
 .
 .Opt_def - 7 -- ascii
-In text modes, display ASCII translation of special characters.
+In
+.IR \%text\~modes ,
+display ASCII translation of special characters for critical environment.
+.
+This is equivalent to
+.BR "groff -mtty_char" ;
+see
+.BR groff_tmac (@MAN5EXT@).
 .
 .
 .Opt_def -- ditroff
 Eqivalent to
-.I groffer
+.B \%groffer
 .Opt_short Z .
 .
 .
 .Opt_def -- extension suffix
-Restrict man\~page search to file names that have
-.I suffix
+Restrict
+.I \%man\~page
+search to file names that have
+.I \%suffix
 appended to their section element.
 .
 For example, in the file name
-.I /usr/share/man/man3/terminfo.3ncurses.gz
-the man\~page extension is
-.IR ncurses .
+.I \%/usr/share/man/man3/terminfo.3ncurses.gz
+the
+.I \%man\~page
+extension is
+.IR \%ncurses .
 .
 .
 .Opt_def -- locale language
 .
-Set the language for man pages.
+Set the language for
+.IR \%man\~pages .
 .
 This has the same effect, but overwrites
 .Env_var $LANG
@@ -1789,50 +2070,166 @@ call to
 .Opt_long location .
 .
 This was added by
-.IR groffer .
+.BR \%groffer .
 .
 .
 .Opt_def -- manpath "'dir1:dir2:\*[Ellipsis]'"
-Use the specified search path for retrieving man\~pages instead of the
-program defaults.
+Use the specified search path for retrieving
+.I \%man\~pages
+instead of the program defaults.
 .
-If the argument is set to the empty string "" the search for man\~page
+If the argument is set to the empty string "" the search for
+.I \%man\~page
 is disabled.
 .
 .
 .Opt_def -- pager
-Set the pager program in tty mode; default is
-.IR less .
+Set the pager program in
+.IR \%tty\~mode ;
+default is
+.BR \%less .
 This is equivalent to
-.Opt_long tty-viewer .
+.Opt_long tty\-viewer .
 .
 .
 .Opt_def -- sections "'sec1:sec2:\*[Ellipsis]'"
-Restrict searching for man\~pages to the given
+Restrict searching for
+.I \%man\~pages
+to the given
 .IR sections ,
 a colon-separated list.
 .
 .
 .Opt_def -- systems "'sys1,sys2,\*[Ellipsis]'"
-Search for man pages for the given operating systems; the argument
-.I systems
+Search for
+.I \%man\~pages
+for the given operating systems; the argument
+.I \%systems
 is a comma-separated list.
 .
 .
-.Opt_def -- whatis
-Instead of displaying the content, get the one-liner description from
-the retrieved man\~page files \[em] or say that it is not a man\~page.
-.
-.
 .Opt_def -- where
 Eqivalent to
 .Opt_long location .
 .
 .
+.\" --------------------------------------------------------------------
+.SS "X\~\%Window\~\%Toolkit Options"
+.\" --------------------------------------------------------------------
+.
+The following long options were adapted from the corresponding
+\%\f[CR]X\~\Window\~Toolkit\f[] options.
+.
+.B \%groffer
+will pass them to the actual viewer program if it is an
+\%\f[CR]X\~Window\f[] program.
+.
+Otherwise these options are ignored.
+.
+.
 .P
-Additionally, the following short option of
-.I man
-is supported as well.
+Unfortunately these options use the old style of a single minus for
+long options.
+.
+For
+.B \%groffer
+that was changed to the standard with using a double minus for long
+options, for example,
+.B \%groffer
+uses the option
+.Opt_long font
+for the \%\f[CR]X\~Window\f[] option
+.Opt_short font .
+.
+.
+.P
+See
+.BR \%X (1),
+.BR \%X (7),
+and the documentation on the \%\f[CR]X\~Window\~Toolkit\f[] options
+for more details on these options and their arguments.
+.
+.
+.Opt_def -- background color
+Set the background color of the viewer window.
+.
+.
+.Opt_def -- bd pixels
+Specifies the color of the border surrounding the viewer window.
+.
+.
+.Opt_def -- bg color
+This is equivalent to
+.Opt_long background .
+.
+.
+.Opt_def -- bw pixels
+Specifies the width in pixels of the border surrounding the viewer
+window.
+.
+.
+.Opt_def -- display X-display
+Set the \%\f[CR]X\~Window\f[] display on which the viewer program
+shall be started, see the \%\f[CR]X\~Window\f[] documentation for the
+syntax of the argument.
+.
+.
+.Opt_def -- foreground color
+Set the foreground color of the viewer window.
+.
+.
+.Opt_def -- fg color
+This is equivalent to
+.Opt_short foreground .
+.
+.
+.Opt_def -- font font_name
+Set the font used by the viewer window.
+.
+The argument is an \%\f[CR]X\~Window\f[] font name.
+.
+.
+.Opt_def -- ft font_name
+This is equivalent to
+.Opt_long ft .
+.
+.
+.Opt_def -- geometry size_pos
+Set the geometry of the display window, that means its size and its
+starting position.
+.
+See
+.BR \%X (7)
+for the syntax of the argument.
+.
+.
+.Opt_def -- resolution value
+Set \%\f[CR]X\~Window\f[] resolution in dpi (dots per inch) in some
+viewer programs.
+.
+The only supported dpi values are
+.B 75
+and
+.BR 100 .
+.
+Actually, the default resolution for
+.B \%groffer
+is set to
+.BR 75\~dpi .
+The resolution also sets the default device in
+.IR "mode x" .
+.
+.
+.Opt_def -- rv
+Reverse foreground and background color of the viewer window.
+.
+.
+.Opt_def -- title "'some text'"
+Set the title for the viewer window.
+.
+.
+.Opt_def -- xrm "'resource'"
+Set \f[CR]\%X\~Window\f[] resource.
 .
 .
 .\" --------------------------------------------------------------------
@@ -1840,43 +2237,48 @@ is supported as well.
 .\" --------------------------------------------------------------------
 .
 A
-.I filespec
-parameter is an argument meaning an input source, such as a file name
-or template for searching man\~pages.
+.I \%filespec
+parameter is an argument that is not an option or option argument.
 .
-These input sources are collected and composed into a single output
-file.
+It means an input source.
 .
-Each of these
-.I filespec
-parameters can have one of the following forms.
+In
+.BR \%groffer ,
+.I \%filespec
+parameters are a file name or a template for searching
+.IR \%man\~pages .
 .
+These input sources are collected and composed into a single output
+file such as
+.B \%groff
+does.
 .
-.P
-No
-.I filespec
-parameters means that
-.I groffer
-waits for standard input.
 .
-The minus option
-.Opt_short ""
-stands for standard input, too, but can occur several times.
+.P
+The strange \%\f[CR]POSIX\f[] behavior to regard all arguments behind
+the first non-option argument as
+.I \%filespec
+arguments is ignored.
 .
-Next
-.I filespec
-is tested whether it is the path name of an existing file.
+The \f[CR]GNU\f[] behavior to recognize options even when mixed with
+.I \%filespec
+arguments is used througout.
 .
-Otherwise it is assumed as a searching pattern for a man\~page.
+But, as usual, the double minus argument
+.Opt_long
+ends the option handling and interprets all following arguments as
+.I \%filespec
+arguments; so the \%\f[CR]POSIX\f[] behavior can be easily adopted.
 .
 .
 .P
-On each system, the man pages are sorted according to their content
-into several sections.
+For the following, it is necessary to know that on each system the
+.I \%man\~pages
+are sorted according to their content into several sections.
 .
 The
 .I classical man sections
-have a single-character name, either are a digit from
+have a single-character name, either a digit from
 .B 1
 to
 .B 9
@@ -1887,49 +2289,77 @@ or
 .
 In the following, a stand-alone character
 .I s
-means this scheme.
-.
-.
-.P
+stands for a
+.IR "classical man section" .
 The internal precedence of
-.I man
-for searching man pages with the same name within several sections
-goes according to the classical single-character sequence.
+.B \%man
+for searching
+.I \%man\~pages
+with the same name within several sections goes according to the
+classical single-character sequence.
 .
 On some systems, this single character can be extended by a following
 string.
 .
 But the special
-.I groffer
-man page facility is based on the classical single character sections.
+.B \%groffer
+.I \%man\~page
+facility is based on the classical single character sections.
 .
 .
 .P
-.BI man: name ( section )
+Each
+.I \%filespec
+parameter can have one of the following forms in decreasing sequence.
+.
+.
+.Topic
+No
+.I \%filespec
+parameters means that
+.B \%groffer
+waits for standard input.
+.
+The minus option
+.Opt_short ""
+stands for standard input, too; it can occur several times.
+.
+.
+.Topic
+Next a
+.I \%filespec
+is tested whether it is the path name of an existing file.
+.
+Otherwise it is assumed to be a searching pattern for a
+.IR \%man\~page .
+.
+.
+.Topic
+.BI \%man: name ( section )
 and
-.IB name ( section )
-search the man\~page
-.I name
-in man\~section\~\c
-.IR section ,
+.IB \%name ( section )
+search the \%man\~page
+.I \%name
+in \%man\~section\~\c
+.IR \%section ,
 where
-.I section
+.I \%section
 can be any string, but it must exist in the
-.I man
+.I \%man
 system.
 .
 .
-.P
+.Topic
 Next some patterns based on the
 .I classical man sections
-were constructed.
+are checked.
 .
-.BI man: name . s
+.BI \%man: name . s
 and
-.IB name . s
-search for a man\~page
-.I name
-in man\~section
+.IB \%name . s
+search for a \%man\~page
+.I \%name
+in \%man\~section
 .I s
 if
 .I s
@@ -1937,67 +2367,87 @@ is a
 .I classical man section
 mentioned above.
 .
-Otherwise search for a man\~page named
-.IR name.s
-in the lowest
-.I man
-section.
+Otherwise a
+.I \%man\~page
+named
+.IR \%name.s
+is searched in the lowest
+.B man\~section .
 .
 .
-.P
+.Topic
 Now
-.BI man: name
-searches for a man\~page in the lowest man\~section that has a
-document called
-.IR name .
+.BI \%man: name
+searches for a
+.I \%man\~page
+in the lowest
+.I \%man\~section
+that has a document called
+.IR \%name .
 .
 .
-.P
+.Topic
 The pattern
-.I "s name"
+.I \%s\~name
 originates from a strange argument parsing of the
-.I man
+.B man
 program.
 .
 If
 .I s
 is a
 .I classical man section
-interpret it as a search for a man\~page called
-.I name
+interpret it as a search for a
+.I \%man\~page
+called
+.I \%name
 in man\~section
 .IR s ,
-otherwise interpret
+otherwise interpret both
 .I s
-as a file argument and
-.I name
-as another
-.I filespec
-argument.
+and
+.I \%name
+as two independent
+.I \%filespec
+arguments.
 .
 .
-.P
+.Topic
 We are left with the argument
-.I name
+.I \%name
 which is not an existing file.
 .
-So this searches for the man\~page called
-.I name
-in the lowest man\~section that has a document for this name.
+So this searches for the
+.I \%man\~page
+called
+.I \%name
+in the lowest
+.I \%man\~section
+that has a document for this name.
+.
+.
+.P
+Wildcards in
+.I \%filespec
+arguments are only accepted for
+.Opt_long apropos*
+and
+.Opt_long whatis ;
+for normal display, they are interpreted as characters.
 .
 .
 .P
 Several file name arguments can be supplied.
 .
 They are mixed by
-.I groff
+.B \%groff
 into a single document.
 .
 Note that the set of option arguments must fit to all of these file
 arguments.
 .
 So they should have at least the same style of the
-.I groff
+.I \%groff
 language.
 .
 .
@@ -2006,19 +2456,19 @@ language.
 .\" --------------------------------------------------------------------
 .
 By default, the
-.I groffer
+.B \%groffer
 program collects all input into a single file, formats it with the
-.I groff
+.B \%groff
 program for a certain device, and then chooses a suitable viewer
 program.
 .
 The device and viewer process in
-.I groffer
+.B \%groffer
 is called a
-.IR mode .
+.IR \%mode .
 .
 The mode and viewer of a running
-.I groffer
+.B \%groffer
 program is selected automatically, but the user can also choose it
 with options.
 .
@@ -2030,103 +2480,111 @@ its own, such as
 .Opt_long \fIanymode .
 Most of these modes have a viewer program, which can be chosen by an
 option that is constructed like
-.Opt_long \fIanymode\fR-viewer .
+.Opt_long \fIanymode\fR\-viewer .
 .
 .
 .P
-Several different modes are offered, graphical X modes, text modes,
+Several different modes are offered, graphical modes for
+\f[CR]\%X\~Window\f[],
+.IR \%text\~modes ,
 and some direct
-.I groff
-modes for debugging and development.
+.I \%groff\~modes
+for debugging and development.
 .
 .
 .P
 By default,
-.I groffer
+.B \%groffer
 first tries whether
-.B x
-mode is possible, then
-.B ps
-mode, and finally
-.B tty
-mode.
+.I \%x\~mode
+is possible, then
+.IR \%ps\~mode ,
+and finally
+.IR \%tty\~mode .
 .
 This mode testing sequence for
-.B auto
-mode can be changed by specifying a comma separated list of modes
-with the option
+.I \%auto\~mode
+can be changed by specifying a comma separated list of modes with the
+option
 .Opt_long default\-modes.
 .
 .
 .P
-The searching for man\~pages and the decompression of the input are
-active in every mode.
+The searching for
+.I \%man\~pages
+and the decompression of the input are active in every mode.
 .
 .
 .\" --------------------------------------------------------------------
 .SS "Graphical Display Modes"
 .\" --------------------------------------------------------------------
 .
-The graphical display modes work only in the X Window environment (or
-similar implementations within other windowing environments).
+The graphical display modes work mostly in the \%\f[CR]X\~Window\f[]
+environment (or similar implementations within other windowing
+environments).
 .
 The environment variable
 .Env_var $DISPLAY
 and the option
 .Opt_long display
-are used for specifying the X display to be used.
+are used for specifying the \%\f[CR]X\~Window\f[] display to be used.
 .
-If neither is given,
-.I groffer
-assumes that no X and changes to one text mode.
+If this environment variable is empty
+.B \%groffer
+assumes that no \%\f[CR]X\~Window\f[] is running and changes to a
+.IR \%text\~mode .
 .
 You can change this automatic behavior by the option
 .Opt_long default\-modes .
 .
 .
 .P
-Known viewers for the graphical display modes and their standard X
-Window viewer progams are
+Known viewers for the graphical display modes and their standard
+\%\f[CR]X\~Window\f[] viewer progams are
 .
 .Topic
-X Window roff viewers such as
-.BR gxditview (@MAN1EXT@)
-or
-.BR xditview (1)
-.RI (in x
+\%\f[CR]X\~Window\f[]
+.I roff
+viewers such as
+.BR \%gxditview (@MAN1EXT@)
 or
-.I X
-mode),
+.BR \%xditview (1)
+(in
+.IR \%x\~mode ),
 .
 .Topic
 in a Postscript viewer
-.RI ( ps
-mode),
+.nh
+.RI ( \%ps\~mode ),
+.hy
 .
 .Topic
 in a dvi viewer program
-.RI ( dvi
-mode),
+.nh
+.RI ( \%dvi\~mode ),
+.hy
 .
 .Topic
 in a PDF viewer
-.RI ( pdf
-mode),
+.nh
+.RI ( \%pdf\~mode ),
+.hy
 .
 .Topic
 in a web browser
+.nh
 .RI ( html
 or
-.I www
-mode),
+.IR \%www\~mode ).
+.hy
 .RE
 .
 .
 .P
 The
-.I pdf
-mode has a major advantage \[em] it is the only graphical diplay mode
-that allows to search for text within the viewer; this can be a really
+.I \%pdf\~mode
+has a major advantage \[em] it is the only graphical diplay mode that
+allows to search for text within the viewer; this can be a really
 important feature.
 .
 Unfortunately, it takes some time to transform the input into the PDF
@@ -2134,38 +2592,42 @@ format, so it was not chosen as the major mode.
 .
 .
 .P
-These graphical viewers can be customized by options of the X Window
-Toolkit.
+These graphical viewers can be customized by options of the
+\%\f[CR]X\~Window\~Toolkit\f[].
 .
 But the
-.I groffer
+.B \%groffer
 options use a leading double minus instead of the single minus used by
-the X Window Toolkit.
+the \%\f[CR]X\~Window\~Toolkit\f[].
 .
 .
 .\" --------------------------------------------------------------------
-.SS "Text mode"
+.SS "Text modes"
 .\" --------------------------------------------------------------------
 .
-There are to modes for text output, mode
-.I text
-for plain output without a pager and mode
-.I tty
+There are two modes for text output,
+.I \%mode\~text
+for plain output without a pager and
+.I \%mode\~tty
 for a text output on a text terminal using some pager program.
 .
 .
 .P
 If the variable
-.Env_var $DISPLAY
-is not set or empty, groffer assumes that it should use
-.I tty
-mode.
+.Env_var \%$DISPLAY
+is not set or empty,
+.B \%groffer
+assumes that it should use
+.IR \%tty\~\%mode .
 .
 .
 .P
-In the actual implementation, the groff output device
-.I latin1
-is chosen for text modes.
+In the actual implementation, the
+.I groff
+output device
+.I \%latin1
+is chosen for
+.IR \%text\~modes .
 .
 This can be changed by specifying option
 .Opt_short T
@@ -2177,11 +2639,11 @@ or
 The pager to be used can be specified by one of the options
 .Opt_long pager
 and
-.Opt_long tty-viewer ,
+.Opt_long tty\-viewer ,
 or by the environment variable
 .Env_var $PAGER .
 If all of this is not used the
-.BR less (1)
+.BR \%less (1)
 program with the option
 .Opt_short r
 for correctly displaying control sequences is used as the default
@@ -2193,13 +2655,13 @@ pager.
 .\" --------------------------------------------------------------------
 .
 These modes use the
-.I groffer
+.I \%groffer
 file determination and decompression.
 .
 This is combined into a single input file that is fed directly into
-.I groff
+.B \%groff
 with different strategy without the
-.I groffer
+.I \%groffer
 viewing facilities.
 .
 These modes are regarded as advanced, they are useful for debugging
@@ -2208,15 +2670,21 @@ and development purposes.
 .
 .P
 The
-.I source
-mode with just displays the generated input.
+.I \%source\~mode
+with option
+.Opt_short Q
+and
+.Opt_long source
+just displays the decompressed input.
 .
+.
+.P
 The
-.I groff
-mode passes the input to
-.I groff
+.I \%groff\~mode
+passes the input to
+.B \%groff
 using only some suitable options provided to
-.IR groffer .
+.BR \%groffer .
 .
 This enables the user to save the generated output into a file or pipe
 it into another program.
@@ -2224,90 +2692,115 @@ it into another program.
 .
 .P
 In
-.I groff
-mode, the option
+.IR \%groff\~\%mode ,
+the option
 .Opt_short Z
 disables post-processing, thus producing the
+.nh
 .I groff intermediate
 .IR output .
+.hy
 .
 In this mode, the input is formatted, but not postprocessed; see
-.BR groff_out (@MAN5EXT@)
+.BR \%groff_out (@MAN5EXT@)
 for details.
 .
 .
 .P
 All
-.I groff
+.B \%groff
 short options are supported by
-.IR groffer .
+.BR \%groffer .
 .
 .
 .\" --------------------------------------------------------------------
 .SH "MAN\~PAGE\~SEARCHING"
 .\" --------------------------------------------------------------------
 .
-The default behavior of groffer is to first test whether a file
-parameter represents a local file; if it is not an existing file name,
-it is assumed to represent a name of a man\~page.
+The default behavior of
+.B \%groffer
+is to first test whether a file parameter represents a local file; if
+it is not an existing file name, it is assumed to represent a name of
+a
+.IR \%man\~page .
 .
 This behavior can be modified by the following options.
 .
 .
 .TP
 .Opt_long man
-forces to interpret all file parameters as filespecs for searching
-man\~pages.
+forces to interpret all file parameters as
+.I \%filespecs
+for searching
+.IR \%man\~pages .
 .
 .TP
 .Opt_long no\-man
 .TP+
 .Opt_long local\-file
-disable the man searching; so only local files are displayed.
+disable the
+.I man
+searching; so only local files are displayed.
 .
 .
 .P
-If neither a local file nor a man\~page was retrieved for some file
-parameter a warning is issued on standard error, but processing is
-continued.
+If neither a local file nor a
+.I \%man\~page
+was retrieved for some file parameter a warning is issued on standard
+error, but processing is continued.
 .
 .
 .P
-The groffer program provides a search facility for man\~pages.
+The
+.B \%groffer
+program provides a search facility for
+.IR \%man\~pages .
 .
 All long options, all environment variables, and most of the
-functionality of the GNU
-.BR man (1)
+functionality of the \f[CR]GNU\f[]
+.BR \%man (1)
 program were implemented.
 .
-This inludes the extended file names of man\~pages, for example,
-the man\~page of
-.I groff
+This inludes the extended file names of
+.IR \%man\~pages ,
+for example, the
+.I \%man\~page
+of
+.B \%groff
 in man\~section 7 may be stored under
 .File_name /usr/share/man/man7/groff.7.gz ,
 where
 .File_name /usr/share/man/
 is part of the man\~path, the subdirectory
-.I man7
+.I \%man7
 and the file extension
 .I .7
 refer to the man\~section 7;
-.I .gz
+.I \%.gz
 shows the compression of the file.
 .
 .
 .P
 The
 .I cat\~pages
-(preformatted man\~pages) are intentionally excluded from the search
-because groffer is a roff program that wants to format by its own.
+(preformatted
+.IR \%man\~pages )
+are intentionally excluded from the search because
+.B \%groffer
+is a
+.I roff
+program that wants to format by its own.
 .
 With the excellent performance of the actual computers, the
-preformatted man\~pages aren't necessary any longer.
+preformatted
+.I \%man\~pages
+aren't necessary any longer.
 .
 .
 .P
-The algorithm for retrieving man\~pages uses five search methods.
+The algorithm for retrieving
+\I \%man\~pages
+uses five search methods.
 .
 They are successively tried until a method works.
 .
@@ -2315,7 +2808,9 @@ They are successively tried until a method works.
 .Topic
 The search path can be manually specified by using the option
 .Opt_long manpath .
-An empty argument disables the man\~page searching.
+An empty argument disables the
+.I \%man\~page
+searching.
 .
 This overwrites the other methods.
 .
@@ -2335,33 +2830,42 @@ variable
 .Topic
 If this does not work a reasonable default path from
 .Env_var $PATH
-is searched for man\~pages.
+is searched for
+.IR \%man\~pages .
 .
 .
 .Topic
 If this does not work, the
-.BR manpath (1)
-program for determining a path of man directories is tried.
+.BR \%manpath (1)
+program for determining a path of
+.I man
+directories is tried.
 .
 .
 .P
 After this, the path elements for the language (locale) and operating
-system specific man\~pages are added to the man\~path; their sequence
-is determined automatically.
+system specific
+.I \%man\~pages
+are added to the
+.IR man\~path ;
+their sequence is determined automatically.
 .
 For example, both
-.I /usr/share/man/linux/fr
+.File_name /usr/share/man/linux/fr
 and
-.I /usr/share/man/fr/linux
-for french linux man\~pages are found.
+.File_name /usr/share/man/fr/linux
+for french linux
+.I \%man\~pages
+are found.
 .
 The language and operating system names are determined from both
 environment variables and command line options.
 .
 .
 .P
-The locale (language) is determined like in GNU man, that is from
-highest to lowest precedence:
+The locale (language) is determined like in \f[CR]GNU\f[]
+.BR man ,
+that is from highest to lowest precedence:
 .Topic
 .Opt_long locale
 .
@@ -2382,32 +2886,40 @@ highest to lowest precedence:
 .
 .
 .P
-The language locale is usually specified in the POSIX 1003.1 based
-format:
+The language locale is usually specified in the
+\%\f[CR]POSIX\~1003.1\f[] based format:
 .P
+.nh
 \f[I]\f[][\f[CB]_\f[]\f[I]\f[][\f[CB].\f[]\
 \f[I]\f[][\f[CB],\f[]\f[I]\f[]]]],
+.hy
 .P
 but the two-letter code in
+.nh
 .I 
+.hy
 is sufficient for most purposes.
 .
 .
 .P
-If no man\~pages for a complicated locale are found the country part
-consisting of the first two characters (without the `\f[CB]_\f[]',
-`\f[CB].\f[]', and `\f[CB],\f[]', parts) of the locale is searched as
-well.
+If no
+.I \%man\~pages
+for a complicated locale are found the country part consisting of the
+first two characters (without the `\f[CB]_\f[]', `\f[CB].\f[]', and
+`\f[CB],\f[]' parts) of the locale is searched as well.
 .
 .
 .P
-If still not found the corresponding man\~page in the default language
-is used instead.
+If still not found the corresponding
+.I \%man\~page
+in the default language is used instead.
 .
 As usual, this default can be specified by one of \f[CR]C\f[] or
-\f[CR]POSIX\f[].
+\f[CR]\%POSIX\f[].
 .
-The man\~pages in the default language are usually in English.
+The
+.I \%man\~pages
+in the default language are usually in English.
 .
 .
 .P
@@ -2435,22 +2947,29 @@ Topic
 .
 .
 .P
-When searching for man\~pages this man\~path with the additional
-language and system specific directories is used.
+When searching for
+.I \%man\~pages
+this
+.I man\~path
+with the additional language and system specific directories is used.
 .
 .
 .P
 The search can further be restricted by limiting it to certain
 sections.
 .
-A single section can be specified within each filespec argument,
-several sections as a colon-separated list in command line option
+A single section can be specified within each
+.I \%filespec
+argument, several sections as a colon-separated list in command line
+option
 .Opt_long sections
 or environment variable
 .Env_var $MANSECT .
 .
 When no section was specified a set of standard sections is searched
-until a suitable man\~page was found.
+until a suitable
+.I \%man\~page
+was found.
 .
 .
 .P
@@ -2465,8 +2984,10 @@ or environment variable
 .
 .
 .P
-For further details on man\~page searching, see
-.BR man (1).
+For further details on
+.I \%man\~page
+searching, see
+.BR \%man (1).
 .
 .
 .\" --------------------------------------------------------------------
@@ -2477,16 +2998,16 @@ The program has a decompression facility.
 .
 If standard input or a file that was retrieved from the command line
 parameters is compressed with a format that is supported by either
-.BR gzip (1)
+.BR \%gzip (1)
 or
-.BR bzip2 (1)
+.BR \%bzip2 (1)
 it is decompressed on-the-fly.
 .
-This includes the GNU
-.BR .gz ,
-.BR .bz2 ,
+This includes the \f[CR]GNU\f[]
+.BR \%.gz ,
+.BR \%.bz2 ,
 and the traditional
-.B .Z
+.B \%.Z
 compression.
 .
 The program displays the concatenation of all decompressed input in
@@ -2497,13 +3018,15 @@ the sequence that was specified on the command line.
 .SH "ENVIRONMENT"
 .\" --------------------------------------------------------------------
 .
-The groffer programs supports many system variables, most of them by
-courtesy of other programs.
+The
+.B \%groffer
+program supports many system variables, most of them by courtesy of
+other programs.
 .
 All environment variables of
-.BR groff (@MAN1EXT@)
-and GNU
-.BR man (1)
+.BR \%groff (@MAN1EXT@)
+and \f[CR]GNU\f[]
+.BR \%man (1)
 and some standard system variables are honored.
 .
 .
@@ -2513,7 +3036,8 @@ and some standard system variables are honored.
 .
 .TP
 .Env_var $GROFFER_OPT
-Store options for a run of groffer.
+Store options for a run of
+.BR \%groffer .
 .
 The options specified in this variable are overridden by the options
 given on the command line.
@@ -2522,33 +3046,43 @@ The content of this variable is run through the shell builtin `eval';
 so arguments containing white-space or special shell characters should
 be quoted.
 .
+Do not forget to export this variable, otherwise it does not exist
+during the run of
+.BR groffer .
+.
 .
 .\" --------------------------------------------------------------------
 .SS "System Variables"
 .\" --------------------------------------------------------------------
 .
-The groffer program is a shell script that is run through
-.BR /bin/sh ,
+The
+.B \%groffer
+program is a shell script that is run through
+.File_name /bin/sh ,
 which can be internally linked to programs like
-.BR bash (1).
+.BR \%bash (1).
 The corresponding system environment is automatically effective.
 .
-The following variables have a special meaning for groffer.
+The following variables have a special meaning for
+.BR \%groffer .
 .
 .
 .TP
 .Env_var $DISPLAY
-If this variable is set this indicates that the X Window system is
-running.
+If this variable is set this indicates that the \%\f[CR]X\~Window\f[]
+system is running.
 .
 Testing this variable decides on whether graphical or text output is
 generated.
 .
 This variable should not be changed by the user carelessly, but it can
-be used to start the graphical groffer on a remote X terminal.
+be used to start the graphical
+.B \%groffer
+on a remote \%\f[CR]X\~Window\f[] terminal.
 .
-For example, depending on your system, groffer can be started on the
-second monitor by the command
+For example, depending on your system,
+.B \%groffer
+can be started on the second monitor by the command
 .Shell_cmd DISPLAY=:0.1\~groffer\~ what.ever &
 .
 .
@@ -2560,9 +3094,11 @@ second monitor by the command
 .Env_var $LANG
 If one of these variables is set (in the above sequence), its content
 is interpreted as the locale, the language to be used, especially when
-retrieving man\~pages.
+retrieving
+\IR \%man\~pages .
 .
 A locale name is typically of the form
+.nh
 .IR language [\c
 .B _\c
 .IR territory [\c
@@ -2570,22 +3106,21 @@ A locale name is typically of the form
 .IR codeset [\c
 .B @\c
 .IR modifier ]]],
+.hy
 where
-.I language
+.I \%language
 is an ISO 639 language code,
-.I territory
+.I \%territory
 is an ISO 3166 country code, and
-.I codeset
+.I \%codeset
 is a character set or encoding identifier like ISO-8859-1 or UTF-8;
 see
-.BR setlocale (3).
+.BR \%setlocale (3).
 .
-The locale values\~\c
-.B C
-and
-.B POSIX
-stand for the default, i.e. the man\~page directories without a
-language prefix.
+The locale values \f[CR]C\f[] and \%\f[CR]POSIX\f[]
+stand for the default, i.e. the
+.I \%man\~page
+directories without a language prefix.
 .
 This is the same behavior as when all 3\~variables are unset.
 .
@@ -2596,65 +3131,77 @@ This variable can be used to set the pager for the tty output.
 .
 For example, to disable the use of a pager completely set this
 variable to the
-.BR cat (1)
+.BR \%cat (1)
 program
 .Shell_cmd PAGER=cat\~groffer\~ anything
 .
 .
 .TP
 .Env_var $PATH
-All programs within the groffer shell script are called without a
-fixed path.
+All programs within the
+.B \%groffer
+shell script are called without a fixed path.
 .
 Thus this environment variable determines the set of programs used
-within the run of groffer.
-.
-.
-.TP
-.Env_var $POSIXLY_CORRECT
-If set to a non-empty value this chooses the POSIX mode for option
-processing, that means that option processing will be finished as soon
-as a non-option argument is found.
-.
-Usually, you do not want to set this environment variable.
+within the run of
+.BR \%groffer .
 .
 .
 .\" --------------------------------------------------------------------
 .SS "Groff Variables"
 .\" --------------------------------------------------------------------
 .
-The groffer program internally calls groff, so all environment
-variables documented in
-.BR groff (@MAN1EXT@)
-are internally used within groffer as well.
-.
-The following variables have a direct meaning for the groffer program.
+The
+.B \%groffer
+program internally calls
+.BR \%groff ,
+so all environment variables documented in
+.BR \%groff (@MAN1EXT@)
+are internally used within
+.B \%groffer
+as well.
+.
+The following variable has a direct meaning for the
+.B \%groffer
+program.
 .
 .TP
 .Env_var $GROFF_TMPDIR
 If the value of this variable is an existing, writable directory,
-groffer uses it for storing its temporary files, just as groff does.
+.B \%groffer
+uses it for storing its temporary files, just as
+.B groff
+does.
 .
 .
 .\" --------------------------------------------------------------------
 .SS "Man Variables"
 .\" --------------------------------------------------------------------
 .
-Parts of the functionality of the man\~program were implemented in
-groffer; support for all environment variables documented in
-.BR man (1)
-was added to groffer, but the meaning was slightly modified due to the
-different approach in groffer; but the user interface is the same.
+Parts of the functionality of the
+.B man
+program were implemented in
+.BR \%groffer ;
+support for all environment variables documented in
+.BR \%man (1)
+was added to
+.BR \%groffer ,
+but the meaning was slightly modified due to the different approach in
+.BR \%groffer ;
+but the user interface is the same.
 .
-The man environment variables can be overwritten by options provided
-with
+The
+.B man
+environment variables can be overwritten by options provided with
 .Env_var $MANOPT ,
 which in turn is overwritten by the command line.
 .
 .
 .TP
 .Env_var $EXTENSION
-Restrict the search for man\~pages to files having this extension.
+Restrict the search for
+.I \%man\~pages
+to files having this extension.
 .
 This is overridden by option
 .Opt_long extension ;
@@ -2664,12 +3211,14 @@ see there for details.
 .TP
 .Env_var $MANOPT
 This variable contains options as a preset for
-.BR man (1).
-As not all of these are relevant for groffer only the essential parts
-of its value are extracted.
+.BR \%man (1).
+As not all of these are relevant for
+.B \%groffer
+only the essential parts of its value are extracted.
 .
 The options specified in this variable overwrite the values of the
-other environment variables taht are specific to man.
+other environment variables that are specific to
+.IR man .
 .
 All options specified in this variable are overridden by the options
 given on the command line.
@@ -2677,7 +3226,8 @@ given on the command line.
 .
 .TP
 .Env_var $MANPATH
-If set, this variable contains the directories in which the man\~page
+If set, this variable contains the directories in which the
+.I \%man\~page
 trees are stored.
 .
 This is overridden by option
@@ -2687,7 +3237,8 @@ This is overridden by option
 .TP
 .Env_var $MANSECT
 If this is a colon separated list of section names, the search for
-man\~pages is restricted to those manual sections in that order.
+.I \%man\~pages
+is restricted to those manual sections in that order.
 .
 This is overridden by option
 .Opt_long sections .
@@ -2696,7 +3247,9 @@ This is overridden by option
 .TP
 .Env_var $SYSTEM
 If this is set to a comma separated list of names these are interpreted
-as man\~page trees for different operating systems.
+as
+.I \%man\~page
+trees for different operating systems.
 .
 This variable can be overwritten by option
 .Opt_long systems ;
@@ -2706,8 +3259,9 @@ see there for details.
 .P
 The environment variable
 .Env_var $MANROFFSEQ
-is ignored by groffer because the necessary preprocessors are
-determined automatically.
+is ignored by
+.B \%groffer
+because the necessary preprocessors are determined automatically.
 .
 .
 .\" --------------------------------------------------------------------
@@ -2715,51 +3269,81 @@ determined automatically.
 .\" --------------------------------------------------------------------
 .
 The
-.I groffer
+.B \%groffer
 program can be preconfigured by two configuration files.
 .
-This configuration can be overridden at each program start by command
-line options or by the environment variable
-.Env_var $GROFFER_OPT .
-.
 .
 .TP
 .File_name /etc/groff/groffer.conf
-System-wide configuration file for groffer.
+System-wide configuration file for
+.BR \%groffer .
 .
 .
 .TP
 .File_name $HOME/.groff/groffer.conf
-User-specific configuration file for groffer, where
+User-specific configuration file for
+.BR \%groffer ,
+where
 .Env_var $HOME
 denotes the user's home directory.
 .
-This script is called after the system-wide configuration file to
-enable overriding by the user.
+This file is called after the system-wide configuration file to enable
+overriding by the user.
+.
+.
+.P
+The precedence of option delivery is given in the following.
+.
+The configuration file in
+.File_name /etc
+has the lowest precedence; it is overwritten by the configuration file
+in the home directory; both configuration files are overwritten by the
+environment variable
+.Env_var $GROFFER_OPT ;
+everything is overwritten by the command line.
 .
 .
 .P
-Their lines either start with a minus character or are shell commands.
+In the configuration files, arbitrary spaces are allowed at the
+beginning of each line, they are just ignored.
+.
+Apart from that, the lines of the configuration lines either start
+with a minus character, all other lines are interpreted as shell
+commands.
 .
-Arbitrary spaces are allowed at the beginning, they are just ignored.
 .
-The lines with the beginning minus are appended to the existing value
-of $GROFFER_OPT.
+.P
+The lines with the beginning minus are interpreted as
+.B groffer
+options.
 .
 This easily allows to set general
-.I groffer
-options that are used with any call of
-.IR groffer .
+.B \%groffer
+options that should be used with any call of
+.BR \%groffer .
+.
+Each line can represent a single short option, a short option cluster,
+or a long option with two minus signs, eventually with an argument.
+.
+The argument can be appended either after a space character or an
+equal sign
+.RB ` = '.
+The argument can be surrounded by quotes, but this is not necessary.
+.
+The options from these lines are collected and prepended to the
+existing value of
+.Env_var $GROFFER_OPT
+at the end of each configuration file.
 .
 .
 .P
-After the transformation of the minus lines the emerging shell scripts
-that are called by
-.I groffer
+After the transformation of the minus lines, the configuration files
+have been transferred into a shell script that is called within
+.B \%groffer
 using the `\c
-.CB .\~\c
-.IR filename '
-syntax.
+.CB \.\~\c
+.IR \%filename '
+shell syntax.
 .
 .
 .P
@@ -2767,28 +3351,38 @@ It makes sense to use these configuration files for the following
 tasks:
 .
 .Topic
-Preset command line options by writing them into lines starting with a
-minus sign.
+Preset command line options, such as choosing a
+.I \%mode
+or a viewer.
+.
+These are written into lines starting with a single or double minus
+sign, followed by the option name.
 .
 .Topic
-Preset environment variables recognized by groffer.
+Preset environment variables recognized by
+.BR \%groffer ;
+but do not forget to export them.
 .
 .Topic
-Write a function for calling a viewer program for a special
-.I mode
-and feed this name into its corresponding
+You can also write a shell function for calling, for example a viewer
+program for some
+.IR \%mode .
+Such a function can be fed into a corresponding
 .Opt_long \f[I]mode\f[]\-viewer
 option.
 .
-Note that the name of such a function must coincide with some existing
-program in the system path
-.Env_var $PATH
-in order to be recognized by groffer.
+.Topic
+Enter
+.Opt_long shell
+to specify a shell for the run of
+.File_name groffer2.sh .
+Some shells run much faster than the standard shell.
 .
 .
 .P
 As an example, consider the following configuration file in
-~/.groff/groffer.conf, say.
+.File_name ~/.groff/groffer.conf ,
+say.
 .
 .P
 .ft CR
@@ -2797,13 +3391,14 @@ As an example, consider the following configuration file in
 # groffer configuration file
 #
 # groffer options that are used in each call of groffer
---resolution=100
---foreground=DarkBlue
---x-viewer 'gxditview -geometry 850x800'
+\-\-shell=ksh
+\-\-foreground=DarkBlue
+\-\-resolution=100
+\-\-x\-viewer='gxditview \-geometry 900x1200'
 #
 # some shell commands
 if test "$DISPLAY" = ""; then
-  DISPLAY='localhost:0.0'
+  export DISPLAY='localhost:0.0'
 fi
 date >>~/mygroffer.log
 .fi
@@ -2812,55 +3407,76 @@ date >>~/mygroffer.log
 .
 .
 .P
-This configuration sets three
-.I groffer
-options and runs two shell commands.
+The lines starting with
+.B #
+are command lines.
+.
+This configuration sets four
+.B \%groffer
+options (the lines starting with `\-') and runs two shell commands (the
+rest of the script).
 .
 This has the following effects:
 .
 .
 .Topic
-Lines starting with a 
-.B #
-character
-are 
+Use
+.B ksh
+as the shell to run the
+.B \%groffer
+script; if it works it should be faster than the usual
+.BR sh .
+.
+.
+.Topic
+Use a text color of
+.B \%DarkBlue
+in all viewers that support this, such as
+.BR \%gxditview .
 .
 .
 .Topic
 Use a resolution of
-.B 100 dpi
-and a text color of
-.B DarkBlue
-in all viewers that support this.
+.B 100\~dpi
+in all viewers that support this, such as
+.BR \%gxditview .
+.
+By this, the default device in
+.I x mode
+is set to
+.BR X100 .
 .
 .
 .Topic
 Force
-.BR gxditview (@MAN1EXT@)
-as the X-mode viewer using the geometry option for setting the width
-to
-.B 850 dpi
+.BR \%gxditview (@MAN1EXT@)
+as the
+.I \%x-mode
+viewer using the geometry option for setting the width to
+.B 900\~dpi
 and the height to
-.B 800
-.BR dpi .
+.BR 1200\~dpi .
+This geometry is suitable for a resolution of
+.BR 100\~dpi .
 .
 .
 .Topic
-The variable
+If the environment variable
 .Env_var $DISPLAY
-is set to
-.IR localhost:0.0
-which allows to start
-.I groffer
-in the standard X display, even when the program is called from a text
-console.
+is empty set it to
+.IR localhost:0.0 .
+.
+That allows to start
+.B \%groffer
+in the standard \%\f[CR]X\~Window\f[] display, even when the program
+is called from a text console.
 .
 .
 .Topic
 Just for fun, the date of each
-.I groffer
+.B \%groffer
 start is written to the file
-.B mygroffer.log
+.File_name mygroffer.log
 in the home directory.
 .
 .
@@ -2868,44 +3484,54 @@ in the home directory.
 .SH "EXAMPLES"
 .\" --------------------------------------------------------------------
 .
-The usage of groffer is very easy.
+The usage of
+.B \%groffer
+is very easy.
 .
-Usually, it is just called with a file name or man\~page.
+Usually, it is just called with a file name or
+.IR \%man\~page .
 .
-The following examples, however, show that groffer has much more fancy
-capabilities.
+The following examples, however, show that
+.B \%groffer
+has much more fancy capabilities.
 .
 .
 .TP
 .Shell_cmd "groffer\~/usr/local/share/doc/groff/meintro.ms.gz"
 Decompress, format and display the compressed file
-.I meintro.ms.gz
+.File_name meintro.ms.gz
 in the directory
-.IR /usr/local/share/doc/groff ,
-using
-.I gxditview
-as graphical viewer when in X Window, or the
-.BR less (1)
-pager program when not in X.
+.File_name /usr/local/share/doc/groff ,
+using the standard viewer
+.B \%gxditview
+as graphical viewer when in \%\f[CR]X\~Window\f[], or the
+.BR \%less (1)
+pager program when not in \%\f[CR]X\~Window\f[].
 .
 .
 .TP
 .Shell_cmd "groffer\~groff"
 If the file
-.I ./groff
+.File_name \%./groff
 exists use it as input.
 .
-Otherwise interpret the argument as a search for the man\~page named
-.I groff
-in the smallest possible man\~section, being secion 1 in this case.
+Otherwise interpret the argument as a search for the
+.I \%man\~page
+named
+.B \%groff
+in the smallest possible
+.IR \%man\~section ,
+being section 1 in this case.
 .
 .
 .TP
 .Shell_cmd "groffer\~man:groff"
-search for the man\~page of
-.I groff
+search for the
+.I \%man\~page
+of
+.B \%groff
 even when the file
-.I ./groff
+.File_name ./groff
 exists.
 .
 .
@@ -2913,9 +3539,12 @@ exists.
 .Shell_cmd "groffer\~groff.7"
 .TP+
 .Shell_cmd "groffer\~7\~groff"
-search the man\~page of
-.I groff
-in man\~section
+search the
+.I \%man\~page
+of
+.B \%groff
+in
+.I \%man\~section
 .BR 7 .
 This section search works only for a digit or a single character from
 a small set.
@@ -2924,31 +3553,36 @@ a small set.
 .TP
 .Shell_cmd "groffer\~fb.modes"
 If the file
-.I ./fb.modes
-does not exist interpret this as a search for the man\~page of
-.IR fb.modes .
+.File_name ./fb.modes
+does not exist interpret this as a search for the
+.I \%man\~page
+of
+.BR fb.modes .
 As the extension
-.I modes
+.I \%modes
 is not a single character in classical section style the argument is
 not split to a search for
-.IR fb .
+.BR fb .
 .
 .
 .TP
 .Shell_cmd "groffer\~groff\~\[cq]troff(1)\[cq]\~man:roff"
 .
 The arguments that are not existing files are looked-up as the
-following man\~pages:
-.I groff
-(automatic search, should be found in man\~section\~1),
-.I troff
+following
+.IR \%man\~pages :
+.B \%groff
+(automatic search, should be found in \fIman\fP\~section\~1),
+.B \%troff
 (in section\~1),
 and
-.I roff
+.B \%roff
 (in the section with the lowest number, being\~7 in this case).
 .
 The quotes around
+.nh
 .I \[cq]troff(1)\[cq]
+.hy
 are necessary because the paranthesis are special shell characters;
 escaping them with a backslash character
 .I \[rs](
@@ -2960,44 +3594,55 @@ The formatted files are concatenated and displayed in one piece.
 .
 .
 .TP
-.Shell_cmd "LANG=de\~groffer\~--man\~--www\~--www-viever=mozilla\~ls"
+.Shell_cmd "LANG=de\~groffer\~--man\~--www\~--www-viever=galeon\~ls"
 .
-Retrieve the German man\~page (language
+Retrieve the German
+.I \%man\~page
+(language
 .IR de )
 for the
 .B ls
 program, decompress it, format it to
-.I html
+.I \%html
 format
-.RI ( www
-mode) and view the result in the web browser
-.I galeon .
+.nh
+.RI ( \%www\~mode )
+.hy
+and view the result in the web browser
+.BR \%galeon .
 The option
 .Opt_long man
-guarantees that the man\~page is retrieved, even when a local file
-.I ls
+guarantees that the
+.I \%man\~page
+is retrieved, even when a local file
+.File_name \%ls
 exists in the actual directory.
 .
 .
 .TP
 .Shell_cmd "groffer\~--source\~'man:roff(7)'"
 .
-Get the man\~page called
-.I roff
-in man\~section 7, decompress it, and print its unformatted content,
-its source code.
+Get the
+.I \%man\~page
+called
+.I \%roff
+in \fIman\fP\~section 7, decompress it, and print its unformatted
+content, its source code.
 .
 .
 .TP
 .Shell_cmd "cat\~file.gz\~|\~groffer\~-Z\~-mfoo"
 .
 Decompress the standard input, send this to
-.I groff
-intermediate mode without post-processing (groff option
+.I \%groff intermediate output mode
+without post-processing
+.RB ( groff
+option
 .Opt_short Z ),
 using macro package by
-.I foo
-(groff option
+.I \%foo
+.RB ( groff
+option
 .Opt_short m ) .
 .
 .
@@ -3015,86 +3660,109 @@ bold font, using color yellow on red background.
 .\" --------------------------------------------------------------------
 .
 The
-.B groffer
-shell script is compatible with both GNU and POSIX.
-.
-POSIX compatibility refers to
-.B IEEE P1003.2/D11.2
-of September 1991, a very early version of the POSIX standard that is
-still freely available in the internet.
-.
-Unfortunately, this version of the standard has `local' for shell
-function variables removed.
-.
-As `local' is needed for serious programming this temporary POSIX
-deprecation was ignored.
+.B \%groffer
+program consists of two shell scripts.
 .
 .
 .P
-Most GNU shells are compatible with this interpretation of POSIX, but
-provide much more facilities.
+The starting script is the file
+.File_name \%groffer
+that is installed in a
+.File_name bin
+directory.
 .
-Nevertheless this script uses only a restricted set of shell language
-elements and shell builtins, such that it can be run on `ash', a GNU
-shell that is quite fast, but has a slightly limited shell language.
+It is generated from the source file
+.File_name \%groffer.sh .
 .
-The groffer script should work on most actual free and commercial
-operating systems.
+It is just a short starting script without any functions such that it
+can run on very poor shells.
 .
 .
 .P
-The groffer program provides its own parser for command line options;
-it can handle option arguments and file names containing white space
-and a large set of special characters.
+The main part of the
+.B \%groffer
+program is the file
+.File_name groffer2.sh
+that is installed in the
+.I groff
+library directory.
+.
+This script can be run under a different shell by using the
+.B \%groffer
+option
+.Opt_long shell .
 .
 .
 .P
-The groffer shell script was tested with the following common
-implementations of the GNU shells:
-.BR ash (1),
-POSIX
-.BR sh (1),
-.BR bash (1),
-and others.
+Both scripts are compatible with both
+\f[CR]GNU\f[] and \%\f[CR]POSIX\f[].
 .
-Free POSIX compatible shells and shell utilities for most operating
-systems are available at the
-.URL http://\:www.gnu.org/software/ "GNU software archive" .
+\%\f[CR]POSIX\f[] compatibility refers to
+\%\f[CR]IEEE\~P1003.2/D11.2\f[] of September 1991, a very early
+version of the \%\f[CR]POSIX\f[] standard that is still freely
+available in the internet at
+.URL http://\:www.funet.fi/\:pub/\:doc/\:posix/\:p1003.2/\:d11.2/\:all \
+"\%POSIX\~P1003.2\~draft\~11.2" .
 .
 .
 .P
-The best performance was obtained with the
-.I ash
-shell; so
-.I groffer
-tries to run under
-.I ash
-whenever possible.
+Only a restricted set of shell language elements and shell builtins is
+used to achieve even compatibility with some Bourne shells that are
+not fully \%\f[CR]POSIX\f[] compatible.
 .
-If
-.I ash
-is not available the shell under which the script was started in the
-first place is used instead.
+The
+.B \%groffer
+shell scripts were tested on many shells, including the following
+Bourne shells:
+.BR \%ash (1),
+.BR \%bash (1),
+.BR \%dash (1),
+.BR \%ksh (1),
+.BR \%pdksh (1),
+.BR \%posh (1),
+and
+.BR \%zsh (1).
+So it should work on most actual free and commercial operating
+systems.
 .
-This can be modified by the option
+.
+.P
+The shell for the run of
+.File_name groffer2.sh
+can be chosen by the option
+.Opt_long shell
+on the command line or the environment variable
+.Env_var $GROFF_OPT .
+If you want to add it to one of the
+.B \%groffer
+configuration files you must write a line starting with
 .Opt_long shell .
 .
 .
 .P
-The groffer program provides its own parser for command line arguments
-that is compatible to both POSIX
-.BR getopts (1)
-and GNU
-.BR getopt (1)
-except for shortcuts of long options.
+The
+.B \%groffer
+program provides its own parser for command line arguments that is
+compatible to both \%\f[CR]POSIX\f[]
+.BR \%getopts (1)
+and \%\f[CR]GNU\f[]
+.BR \%getopt (1).
+It can handle option arguments and file names containing white space
+and a large set of special characters.
 .
 The following standard types of options are supported.
 .
 .
 .Topic
-A single minus always refers to single character option or a
-combination thereof, for example, the
-.I groffer
+The option consisiting of a single minus
+.Opt_short
+refers to standard input.
+.
+.
+.Topic
+A single minus followed by characters refers to a single character
+option or a combination thereof; for example, the
+.B \%groffer
 short option combination
 .Opt_short Qmfoo
 is equivalent to
@@ -3103,7 +3771,7 @@ is equivalent to
 .
 .Topic
 Long options are options with names longer than one character; they
-are always prededed by a double minus.
+are always preceded by a double minus.
 .
 An option argument can either go to the next command line argument or
 be appended with an equal sign to the argument; for example,
@@ -3116,161 +3784,232 @@ is equivalent to
 An argument of
 .Opt_--
 ends option parsing; all further command line arguments are
-interpreted as file name arguments.
+interpreted as
+.I \%filespec
+parameters, i.e. file names or constructs for searching
+.IR \%man\~pages ).
 .
 .
 .Topic
-By default, all command line arguments that are neither options nor
-option arguments are interpreted as filespec parameters and stored
-until option parsing has finished.
+All command line arguments that are neither options nor option
+arguments are interpreted as
+.I \%filespec
+parameters and stored until option parsing has finished.
 .
 For example, the command line
 .Shell_cmd "groffer file1 -a -o arg file2"
-is, by default, equivalent to
+is equivalent to
 .Shell_cmd "groffer -a -o arg -- file1 file2"
 .
 .
 .P
-This behavior can be changed by setting the environment variable
-.Env_var $POSIXLY_CORRECT
-to a non-empty value.
+The free mixing of options and
+.I \%filespec
+parameters follows the GNU principle.
 .
-Then the strange POSIX non-option behavior is adopted, i. e. option
-processing is stopped as soon as the first non-option argument is
-found and each following argument is taken as a file name.
+That does not fulfill the strange option behavior of \%\f[CR]POSIX\f[]
+that ends option processing as soon as the first non-option argument
+has been reached.
 .
-For example, in posixly correct mode, the command line
-.Shell_cmd "groffer file1 -a -o arg file 2"
-is equivalent to
-.Shell_cmd "groffer -- file1 -a -o arg file 2"
-As this leads to unwanted behavior in most cases, most people do not
-want to set
-.Env_var $POSIXLY_CORRECT .
+The end of option processing can be forced by the option
+.RB ` \-\- '
+anyway.
 .
 .
 .\" --------------------------------------------------------------------
-.SH "SEE ALSO"
+.SH "BUGS"
 .\" --------------------------------------------------------------------
 .
-.TP
-.BR groff (@MAN1EXT@)
-.TP+
-.BR troff (@MAN1EXT@)
-Details on the options and environment variables available in
-.IR groff ;
-all of them can be used with groffer.
+Report bugs to the
+.MTO bug-groff@gnu.org "bug-groff mailing list" .
 .
+Include a complete, self-contained example that will allow the bug to
+be reproduced, and say which version of
+.B \%groffer
+you are using.
 .
-.TP
-.BR man (1)
-The standard program to diplay man\~pages.
 .
-The information there is only useful if it is the man\~page for
-.IR "GNU\~man" .
-Then it documents the options and environment variables that are
-supported by groffer.
+.P
+You can also use the
+.MTO groff@gnu.org "groff mailing list" ,
+but you must first subscribe to this list.
 .
+You can do that by visiting the
+.URL http://\:lists.gnu.org/\:mailman/\:listinfo/\:groff \
+"groff mailing list web page" .
 .
-.TP
-.BR gxditview (@MAN1EXT@)
-.TP+
-.BR xditview (1x)
-Viewers for groffer's
-.I x
-mode.
 .
+.P
+See
+.BR \%groff (@MAN1EXT@)
+for information on availability.
 .
-.TP
-.BR gv (1)
-.TP+
-.BR ghostview (1)
-Viewers for groffer's
-.I ps
-mode.
 .
+.\" --------------------------------------------------------------------
+.SH "SEE ALSO"
+.\" --------------------------------------------------------------------
 .
-.TP+
-.BR gs (1)
-Transformer from
-.I ps
-to
-.IR pdf ;
-and a
-.I ps
-viewer.
+.P
+.BR \%groff (@MAN1EXT@),
+.BR \%@g@troff (@MAN1EXT@)
+.RS
+Details on the options and environment variables available in
+.BR \%groff ;
+all of them can be used with
+.BR \%groffer .
+.RE
 .
 .
 .TP
-.BR xpdf (1)
-Viewers for
-.I pdf
-files.
+.BR \%groff (@MAN7EXT@)
+Documentation of the
+.I \%groff
+language.
 .
 .
 .TP
-.BR xdvi (1)
-.TP+
-.BR dvilx (1)
-Viewers for groffer's
-.I dvi
-mode.
+.BR \%grog (@MAN1EXT@)
+Internally,
+.B \%groffer
+tries to guess the
+.B \%groff
+command line options from the input using this program.
 .
 .
 .TP
-.BR less (1)
-Standard pager program for the
-.I tty
-.IR mode .
+.BR groff_out (@MAN5EXT@)
+Documentation on the
+.I \%groff intermediate output
+.nh
+.RI ( ditroff
+output).
+.hy
 .
 .
 .TP
-.BR gzip (1)
-.TP+
-.BR bzip2 (1)
-The decompression programs supported by groffer.
+.BR groff_tmac (@MAN5EXT@)
+Documentation on the
+.I \%groff
+macro files.
 .
 .
 .TP
-.BR groff (@MAN7EXT@)
-Documentation of the
-.I groff
-language.
+.BR \%man (1)
+The standard program to display
+.IR \%man\~pages .
 .
+The information there is only useful if it is the
+.I \%man\~page
+for GNU
+.BR man .
+Then it documents the options and environment variables that are
+supported by
+.BR \%groffer .
 .
-.TP
-.BR grog (@MAN1EXT@)
-Internally, groffer tries to guess the groff command line options from
-the input using this program.
 .
+.P
+.BR \%ash (1),
+.BR \%bash (1),
+.BR \%dash (1),
+.BR \%ksh (1),
+.BR \%pdksh (1),
+.BR \%posh (1),
+.BR \%sh (1),
+.BR \%zsh (1)
+.RS
+Bourne shells that were tested with
+.BR \%groffer .
+.RE
 .
-.TP
-.BR groff_out (@MAN5EXT@)
-Documentation on the groff intermediate output (ditroff output).
 .
+.P
+.BR \%gxditview (@MAN1EXT@),
+.BR \%xditview (1x)
+.RS
+Viewers for
+.BR \%groffer 's
+.IR \%x\~mode .
+.RE
 .
-.\" --------------------------------------------------------------------
-.SH "AUTHOR"
-.\" --------------------------------------------------------------------
 .
-Copyright (C) 2001,2002,2004 Free Software Foundation, Inc.
+.P
+.BR \%kghostview (1),
+.BR \%ggv (1),
+.BR \%gv (1),
+.BR \%ghostview (1),
+.BR \%gs (1)
+.RS
+Viewers for
+.BR \%groffer 's
+.IR \%ps\~mode .
+.RE
+.
 .
 .P
-This document is distributed under the terms of the FDL (GNU Free
-Documentation License) version 1.1 or later.
+.BR \%kghostview (1),
+.BR \%ggv (1),
+.BR \%xpdf (1),
+.BR \%acroread (1),
+.BR \%kpdf (1)
+.RS
+Viewers for
+.BR \%groffer 's
+.IR \%pdf\~mode .
+.RE
 .
-You should have received a copy of the FDL on your system, it is also
-available on-line at the
-.URL http://\:www.gnu.org/\:copyleft/\:fdl.html "GNU copyleft site" .
 .
 .P
-This document is part of
-.IR groff ,
-the GNU roff distribution.
+.BR \%kdvi (1),
+.BR \%xdvi (1),
+.BR \%dvilx (1)
+.RS
+Viewers for
+.BR \%groffer 's
+.IR \%dvi\~mode .
+.RE
+.
 .
-It was written by Bernd Warken.
+.P
+.BR \%konqueror (1),
+.BR \%mozilla (1),
+.BR \%lynx (1)
+.RS
+Web-browsers for
+.BR \%groffer 's
+.I \%html
+or
+.IR \%www\~mode .
+.RE
+.
+.
+.TP
+.BR \%less (1)
+Standard pager program for the
+.I \%tty\~mode .
 .
 .
-\" --------------------------------------------------------------------
+.P
+.BR \%gzip (1),
+.BR \%bzip2 (1)
+.RS
+The decompression programs supported by
+.BR \%groffer .
+.RE
+.
+.
+.\" --------------------------------------------------------------------
+.SH "AUTHOR"
+.\" --------------------------------------------------------------------
+.author
+.
+.
+.\" --------------------------------------------------------------------
+.SH "COPYING"
+.\" --------------------------------------------------------------------
+.copyleft
+.
+.
+.\" --------------------------------------------------------------------
 .\" Emacs settings
 .\" --------------------------------------------------------------------
 .
diff --git a/contrib/groff-1.19/contrib/groffer/groffer.sh b/contrib/groff-1.19/contrib/groffer/groffer.sh
index f3c14125b4..1cb55c72c9 100644
--- a/contrib/groff-1.19/contrib/groffer/groffer.sh
+++ b/contrib/groff-1.19/contrib/groffer/groffer.sh
@@ -1,4535 +1,299 @@
-#!/bin/sh
+#! /bin/sh
 
 # groffer - display groff files
 
 # Source file position: /contrib/groffer/groffer.sh
 
-# Copyright (C) 2001,2002,2003,2004 Free Software Foundation, Inc.
+# Copyright (C) 2001,2002,2003,2004,2005
+# Free Software Foundation, Inc.
 # Written by Bernd Warken
 
-# This file is part of groff version @VERSION@.
+# This file is part of `groffer', which is part of `groff' version
+# @VERSION@.  See $_GROFF_VERSION.
 
-# groff is free software; you can redistribute it and/or modify it
+# `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.
+# `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 files COPYING and LICENSE in the top
-# directory of the groff source.  If not, write to the Free Software
-# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-_PROGRAM_NAME='groffer';
-_PROGRAM_VERSION='0.9.7';
-_LAST_UPDATE='30 Apr 2004';
-
-
-########################################################################
-# Determine the shell under which to run this script;
-# if `ash' is available restart the script using `ash';
-# otherwise just go on.
-
-if test "${_groffer_run}" = ''; then
-  # only reached during the first run of the script
-
-  export _PROGRAM_NAME;
-  export _PROGRAM_VERSION;
-  export _LAST_UPDATE;
-
-  export GROFFER_OPT;		# option environment for groffer
-  export _GROFFER_SH;		# file name of this shell script
-  export _OUTPUT_FILE_NAME;	# output generated, see main_set_res..()
-  export _groffer_run;		# counter for the runs of groffer
-
-  _groffer_run='first';
-
-  case "$0" in
-  *${_PROGRAM_NAME}*)
-    _GROFFER_SH="$0";
-    # was: _GROFFER_SH="@BINDIR@/${_PROGRAM_NAME}";
-    ;;
-  *)
-    echo "The ${_PROGRAM_NAME} script should be started directly." >&2
-    exit 1;
-    ;;
-  esac;
-
-  ###########################
-  # _get_opt_shell ("$@")
-  #
-  # Determine whether `--shell' was specified in $GROFF_OPT or in $*;
-  # if so echo its argument.
-  #
-  _get_opt_shell()
-  {
-    local i;
-    local _sh;
-    case " ${GROFFER_OPT} $*" in
-      *\ --shell\ *|*\ --shell=*)
-        (
-          eval set -- "${GROFFER_OPT}" '"$@"';
-          _sh='';
-          for i in "$@"; do
-            case "$1" in
-              --shell)
-                if test "$#" -ge 2; then
-                  _sh="$2";
-                  shift;
-                fi;
-                ;;
-              --shell=?*)
-                # delete up to first `=' character
-                _sh="$(echo -n "$1" | sed -e 's/^[^=]*=//')";
-                ;;
-            esac;
-            shift;
-          done;
-          echo -n "${_sh}";
-        )
-        ;;
-    esac;
-  }
-
-
-  ###########################
-  # _test_on_shell ()
-  #
-  # Test whether  is a shell program of Bourne type (POSIX sh).
-  #
-  _test_on_shell()
-  {
-    if test "$#" -le 0 || test "$1" = ''; then
-      return 1;
-    fi;
-    # do not quote $1 to allow arguments
-    test "$($1 -c 's=ok; echo -n "$s"' 2>/dev/null)" = 'ok';
-  }
-
-  # do the shell determination
-  _shell="$(_get_opt_shell "$@")";
-  if test "${_shell}" = ''; then
-    _shell='ash';
-  fi;
-  if _test_on_shell "${_shell}"; then
-    _groffer_run='second';
-    # do not quote $_shell to allow arguments
-    exec ${_shell} "${_GROFFER_SH}" "$@";
-    exit;
-  fi;
-
-  # clean-up of shell determination
-  unset _shell;
-  unset _GROFFER_SH;
-  unset _groffer_run;
-  _get_opt_shell()
-  {
-    return 0;
-  }
-  _test_on_shell()
-  {
-    return 0;
-  }
-
-fi; # end of first run
-
-if test "${_groffer_run}" != 'second';
-then
-  echo "$_groffer_run should be 'second' here." >&2
-  exit 1
-fi;
-unset _groffer_run
-
-
-########################################################################
-# diagnostic messages
-#
-export _DEBUG;
-_DEBUG='no';			# disable debugging information
-#_DEBUG='yes';			# enable debugging information
-
-export _DEBUG_LM;
-_DEBUG_LM='no';			# disable landmark messages
-#_DEBUG_LM='yes';		# enable landmark messages
-
+# along with `groff'; see the files COPYING and LICENSE in the top
+# directory of the `groff' source.  If not, write to the Free Software
+# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301,
+# USA.
 
 ########################################################################
-#                       Environment Variables
-########################################################################
-
-# Environment variables that exist only for this file start with an
-# underscore letter.  Global variables to this file are written in
-# upper case letters, e.g. $_GLOBAL_VARIABLE; temporary variables
-# start with an underline and use only lower case letters and
-# underlines, e.g.  $_local_variable .
 
-#   [A-Z]*     system variables,      e.g. $MANPATH
-#   _[A-Z_]*   global file variables, e.g. $_MAN_PATH
-#   _[a-z_]*   temporary variables,   e.g. $_manpath
+_PROGRAM_VERSION='0.9.22';
+_LAST_UPDATE='22 August 2005';
 
-# Due to incompatibilities of the `ash' shell, the name of loop
-# variables in `for' must be single character
-#   [a-z]      local loop variables,   e.g. $i
+export _PROGRAM_VERSION;
+export _LAST_UPDATE;
 
+export GROFFER_OPT;		# option environment for groffer
 
-########################################################################
-# read-only variables (global to this file)
-########################################################################
+export _CONF_FILE_ETC;		# configuration file in /etc
+export _CONF_FILE_HOME;		# configuration file in $HOME
+export _CONF_FILES;		# configuration files
+_CONF_FILE_ETC='/etc/groff/groffer.conf';
+_CONF_FILE_HOME="${HOME}/.groff/groffer.conf";
+_CONF_FILES="${_CONF_FILE_ETC} ${_CONF_FILE_HOME}";
 
 # characters
 
-export _BQUOTE;
-export _BSLASH;
-export _DQUOTE;
-export _NEWLINE;
-export _LBRACK;
-export _LPAR;
-export _RBRACK;
-export _RPAR;
-export _SPACE;
-export _SQUOTE;
+export _AT;
+export _SP;
+export _SQ;
 export _TAB;
 
-_BQUOTE='`';
-_BSLASH='\';
-_DQUOTE='"';
-_NEWLINE='
-';
-_LBRACK='[';
-_LPAR='(';
-_RBRACK=']';
-_RPAR=')';
-_SPACE=' ';
-_SQUOTE="'";
+_AT='@';
+_SP=' ';
+_SQ="'";
 _TAB='	';
 
-# function return values; `0' means ok; other values are error codes
-export _ALL_EXIT;
-export _BAD;
 export _ERROR;
-export _GOOD;
-export _NO;
-export _OK;
-export _YES;
-
-_GOOD='0';			# return ok
-_BAD='1';			# return negatively, error code `1'
 _ERROR='7';			# for syntax errors; no `-1' in `ash'
 
-_ALL_EXIT="${_GOOD} ${_BAD} ${_ERROR}"; # all exit codes (for `trap_set')
-
-_NO="${_BAD}";
-_YES="${_GOOD}";
-_OK="${_GOOD}";
-
-# quasi-functions, call with `eval'
-export return_ok;
-export return_good;
-export return_bad;
-export return_yes;
-export return_no;
-export return_error;
-return_ok="func_pop; return ${_OK}";
-return_good="func_pop; return ${_GOOD}";
-return_bad="func_pop; return ${_BAD}";
-return_yes="func_pop; return ${_YES}";
-return_no="func_pop; return ${_NO}";
-return_error="func_pop; return ${_ERROR}";
-
-
-export _CONFFILES;
-_CONFFILES="/etc/groff/groffer.conf ${HOME}/.groff/groffer.conf";
-
-export _DEFAULT_MODES;
-_DEFAULT_MODES='x,ps,tty';
-export _DEFAULT_RESOLUTION;
-_DEFAULT_RESOLUTION='75';
-
-export _DEFAULT_TTY_DEVICE;
-_DEFAULT_TTY_DEVICE='latin1';
-
-# _VIEWER_* viewer programs for different modes (only X is necessary)
-# _VIEWER_* a comma-separated list of viewer programs (with options)
-export _VIEWER_DVI;		# viewer program for dvi mode
-export _VIEWER_PS;		# viewer program for ps mode
-export _VIEWER_HTML_X;		# viewer program for html mode in X
-export _VIEWER_HTML_TTY;	# viewer program for html mode in tty
-_VIEWER_DVI='xdvi,dvilx';
-_VIEWER_PDF='xpdf,acroread';
-_VIEWER_PS='gv,ghostview,gs_x11,gs';
-_VIEWER_HTML='konqueror,mozilla,netscape,opera,amaya,arena,lynx';
-_VIEWER_X='gxditview,xditview';
-
-# Search automatically in standard sections `1' to `8', and in the
-# traditional sections `9', `n', and `o'.  On many systems, there
-# exist even more sections, mostly containing a set of man pages
-# special to a specific program package.  These aren't searched for
-# automatically, but must be specified on the command line.
-export _MAN_AUTO_SEC;
-_MAN_AUTO_SEC="'1' '2' '3' '4' '5' '6' '7' '8' '9' 'n' 'o'"
-
-export _PROCESS_ID;		# for shutting down the program
-_PROCESS_ID="$$";
-
-
-############ the command line options of the involved programs
-#
-# The naming scheme for the options environment names is
-# $_OPTS__[_]
-#
-# :    program name GROFFER, GROFF, or CMDLINE (for all
-#            command line options)
-# :  LONG (long options) or SHORT (single character options)
-# : ARG for options with argument, NA for no argument;
-#            without _ both the ones with and without arg.
-#
-# Each option that takes an argument must be specified with a
-# trailing : (colon).
-
-# exports
-export _OPTS_GROFFER_SHORT_NA;
-export _OPTS_GROFFER_SHORT_ARG;
-export _OPTS_GROFFER_LONG_NA;
-export _OPTS_GROFFER_LONG_ARG;
-export _OPTS_GROFF_SHORT_NA;
-export _OPTS_GROFF_SHORT_ARG;
-export _OPTS_GROFF_LONG_NA;
-export _OPTS_GROFF_LONG_ARG;
-export _OPTS_X_SHORT_ARG;
-export _OPTS_X_SHORT_NA;
-export _OPTS_X_LONG_ARG;
-export _OPTS_X_LONG_NA;
-export _OPTS_MAN_SHORT_ARG;
-export _OPTS_MAN_SHORT_NA;
-export _OPTS_MAN_LONG_ARG;
-export _OPTS_MAN_LONG_NA;
-export _OPTS_MANOPT_SHORT_ARG;
-export _OPTS_MANOPT_SHORT_NA;
-export _OPTS_MANOPT_LONG_ARG;
-export _OPTS_MANOPT_LONG_NA;
-export _OPTS_CMDLINE_SHORT_NA;
-export _OPTS_CMDLINE_SHORT_ARG;
-export _OPTS_CMDLINE_LONG_NA;
-export _OPTS_CMDLINE_LONG_ARG;
-
-###### groffer native options
-
-_OPTS_GROFFER_SHORT_NA="'h' 'Q' 'v' 'V' 'X' 'Z'";
-_OPTS_GROFFER_SHORT_ARG="'T'";
-
-_OPTS_GROFFER_LONG_NA="'auto' 'debug' 'default' 'dvi' \
-'groff' 'help' 'intermediate-output' 'html' 'man' \
-'no-location' 'no-man' 'pdf' 'ps' 'rv' 'source' 'text' 'text-device' \
-'title' 'tty' 'tty-device' 'version' 'whatis' 'where' 'www' 'x' 'X'";
-
-_OPTS_GROFFER_LONG_ARG="\
-'apropos' 'apropos-data' 'apropos-devel' 'apropos-progs' \
-'default-modes' 'dvi-viewer' 'extension' 'fg' 'fn' 'font' \
-'foreground' 'html-viewer' 'mode' 'pdf-viewer' 'ps-viewer' 'shell' \
-'tty-viewer' 'www-viewer' 'x-viewer' 'X-viewer'";
-
-##### groffer options inhereted from groff
-
-_OPTS_GROFF_SHORT_NA="'a' 'b' 'c' 'C' 'e' 'E' 'g' 'G' 'i' 'l' 'N' 'p' \
-'R' 's' 'S' 't' 'U' 'V' 'z'";
-_OPTS_GROFF_SHORT_ARG="'d' 'f' 'F' 'I' 'L' 'm' 'M' 'n' 'o' 'P' 'r' \
-'w' 'W'";
-_OPTS_GROFF_LONG_NA="'source'";
-_OPTS_GROFF_LONG_ARG="'device' 'macro-file'";
-
-##### groffer options inhereted from the X Window toolkit
-
-_OPTS_X_SHORT_NA="";
-_OPTS_X_SHORT_ARG="";
-
-_OPTS_X_LONG_NA="'iconic' 'rv'";
-
-_OPTS_X_LONG_ARG="'background' 'bd' 'bg' 'bordercolor' 'borderwidth' \
-'bw' 'display' 'fg' 'fn' 'font' 'foreground' 'ft', 'geometry'
-'resolution' 'title' 'xrm'";
-
-###### groffer options inherited from man
-
-_OPTS_MAN_SHORT_NA="";
-_OPTS_MAN_SHORT_ARG="";
-
-_OPTS_MAN_LONG_NA="'all' 'ascii' 'catman' 'debug' 'ditroff' 'help' \
-'local-file' 'location' 'pager' 'troff' 'update' 'version' \
-'whatis' 'where'";
-
-_OPTS_MAN_LONG_ARG="'extension' 'locale' 'manpath' \
-'pager' 'preprocessor' 'prompt' 'sections' 'systems' 'troff-device'";
-
-###### additional options for parsing $MANOPT only
-
-_OPTS_MANOPT_SHORT_NA="'7' 'a' 'c' 'd' 'D' 'f' 'h' 'k' 'l' 't' 'u' \
-'V' 'w' 'Z'";
-_OPTS_MANOPT_SHORT_ARG="'e' 'L' 'm' 'M' 'p' 'P' 'r' 'S' 'T'";
-
-_OPTS_MANOPT_LONG_NA="${_OPTS_MAN_LONG_NA} \
-'apropos' 'debug' 'default' 'html' 'ignore-case' 'location-cat' \
-'match-case' 'troff' 'update' 'version' 'where-cat'";
+# @...@ constructs
 
-_OPTS_MANOPT_LONG_ARG="${_OPTS_MAN_LONG_NA} \
-'config_file' 'encoding' 'locale'";
-
-###### collections of command line options
-
-_OPTS_CMDLINE_SHORT_NA="${_OPTS_GROFFER_SHORT_NA}\
-${_OPTS_GROFF_SHORT_NA} ${_OPTS_X_SHORT_NA} ${_OPTS_MAN_SHORT_NA}";
-_OPTS_CMDLINE_SHORT_ARG="${_OPTS_GROFFER_SHORT_ARG} \
-${_OPTS_GROFF_SHORT_ARG} ${_OPTS_X_SHORT_ARG} ${_OPTS_MAN_SHORT_ARG}";
-
-_OPTS_CMDLINE_LONG_NA="${_OPTS_GROFFER_LONG_NA} \
-${_OPTS_GROFF_LONG_NA} ${_OPTS_X_LONG_NA} ${_OPTS_MAN_LONG_NA}";
-_OPTS_CMDLINE_LONG_ARG="${_OPTS_GROFFER_LONG_ARG} \
-${_OPTS_GROFF_LONG_ARG} ${_OPTS_MAN_LONG_ARG} ${_OPTS_X_LONG_ARG}";
-
-
-########################################################################
-# read-write variables (global to this file)
-########################################################################
-
-export _ADDOPTS_GROFF;		# Transp. options for groff (`eval').
-export _ADDOPTS_POST;		# Transp. options postproc (`eval').
-export _ADDOPTS_X;		# Transp. options X postproc (`eval').
-export _DEFAULT_MODES;		# Set default modes.
-export _DISPLAY_MODE;		# Display mode.
-export _DISPLAY_PROG;		# Viewer program to be used for display.
-export _DISPLAY_ARGS;		# X resources for the viewer program.
-export _FILEARGS;		# Stores filespec parameters.
-export _FUNC_STACK;		# Store debugging information.
-export _REGISTERED_TITLE;	# Processed file names.
-# _HAS_* from availability tests
-export _HAS_COMPRESSION;	# `yes' if compression is available
-export _HAS_OPTS_GNU;		# `yes' if GNU `getopt' is available
-export _HAS_OPTS_POSIX;		# `yes' if POSIX `getopts' is available
-# _MAN_* finally used configuration of man searching
-export _MAN_ALL;		# search all man pages per filespec
-export _MAN_ENABLE;		# enable search for man pages
-export _MAN_EXT;		# extension for man pages
-export _MAN_FORCE;		# force file parameter to be man pages
-export _MAN_IS_SETUP;		# setup man variables only once
-export _MAN_LANG;		# language for man pages
-export _MAN_LANG_DONE;		# language dirs added to man path
-export _MAN_PATH;		# search path for man pages
-export _MAN_SEC;		# sections for man pages; sep. `:'
-export _MAN_SEC_DONE;		# sections added to man path
-export _MAN_SYS;		# system names for man pages; sep. `,'
-export _MAN_SYS;		# system names added to man path
-# _MANOPT_* as parsed from $MANOPT
-export _MANOPT_ALL;		# $MANOPT --all
-export _MANOPT_EXTENSION;	# $MANOPT --extension
-export _MANOPT_LANG;		# $MANOPT --locale
-export _MANOPT_PATH;		# $MANOPT --manpath
-export _MANOPT_PAGER;		# $MANOPT --pager
-export _MANOPT_SEC;		# $MANOPT --sections
-export _MANOPT_SYS;		# $MANOPT --systems
-# _OPT_* as parsed from groffer command line
-export _OPT_ALL;		# display all suitable man pages.
-export _OPT_APROPOS;		# call `apropos' program.
-export _OPT_APROPOS_DATA;	# `apropos' for man sections 4, 5, 7
-export _OPT_APROPOS_DEVEL;	# `apropos' for man sections 2, 3, 9
-export _OPT_APROPOS_PROGS;	# `apropos' for man sections 1, 6, 8
-export _OPT_BD;			# set border color in some modes.
-export _OPT_BG;			# set background color in some modes.
-export _OPT_BW;			# set border width in some modes.
-export _OPT_DEBUG;		# print debugging information on stderr.
-export _OPT_DEFAULT_MODES;	# `,'-list of modes when no mode given.
-export _OPT_DEVICE;		# device option.
-export _OPT_DISPLAY;		# set X display.
-export _OPT_FG;			# set foreground color in some modes.
-export _OPT_FN;			# set font in some modes.
-export _OPT_GEOMETRY;		# set size and position of viewer in X.
-export _OPT_ICONIC;		# -iconic option for X viewers.
-export _OPT_LANG;		# set language for man pages
-export _OPT_LOCATION;		# print processed file names to stderr
-export _OPT_MODE;		# values: X, tty, Q, Z, ""
-export _OPT_MANPATH;		# manual setting of path for man-pages
-export _OPT_PAGER;		# specify paging program for tty mode
-export _OPT_RESOLUTION;		# set X resolution in dpi
-export _OPT_RV;			# reverse fore- and background colors.
-export _OPT_SECTIONS;		# sections for man page search
-export _OPT_SYSTEMS;		# man pages of different OS's
-export _OPT_TITLE;		# title for gxditview window
-export _OPT_TEXT_DEVICE;		# set device for tty mode.
-export _OPT_V;			# groff option -V.
-export _OPT_VIEWER_DVI;		# viewer program for dvi mode
-export _OPT_VIEWER_PDF;		# viewer program for pdf mode
-export _OPT_VIEWER_PS;		# viewer program for ps mode
-export _OPT_VIEWER_HTML;	# viewer program for html mode
-export _OPT_VIEWER_X;		# viewer program for x mode
-export _OPT_WHATIS;		# print the one-liner man info
-export _OPT_XRM;		# specify X resource.
-export _OPT_Z;			# groff option -Z.
-# _TMP_* temporary files
-export _TMP_DIR;		# groff directory for temporary files
-export _TMP_DIR_SUB;		# groffer directory for temporary files
-export _TMP_CAT;		# stores concatenation of everything
-export _TMP_STDIN;		# stores stdin, if any
-
-# these variables are preset in section `Preset' after the rudim. test
+export _GROFF_VERSION
+_GROFF_VERSION='@VERSION@';
+if test _@VERSION@_ = _${_AT}VERSION${_AT}_
+then
+  _GROFF_VERSION='1.19.2';
+fi;
 
+export _AT_BINDIR_AT;
+export _AT_G_AT;
+export _AT_LIBDIR_AT;
+export _GROFFER_LIBDIR;
+if test _@BINDIR@_ = _${_AT}BINDIR${_AT}_
+then
+  # script before `make'
+  _AT_BINDIR_AT='.';
+  _AT_G_AT='';
+  _AT_LIBDIR_AT='';
+  _GROFFER_LIBDIR='.';
+else
+  _AT_BINDIR_AT='@BINDIR@';
+  _AT_G_AT='@g@';
+  _AT_LIBDIR_AT='@libdir@';
+  _GROFFER_LIBDIR="${_AT_LIBDIR_AT}"'/groff/groffer';
+fi;
 
-########################################################################
-#             Test of rudimentary shell functionality
-########################################################################
+export _GROFFER_SH;		# file name of this shell script
+case "$0" in
+*groffer*)
+  _GROFFER_SH="$0";
+  # was: _GROFFER_SH="${_AT_BINDIR_AT}/groffer";
+  ;;
+*)
+  echo 'The groffer script should be started directly.' >&2
+  exit 1;
+  ;;
+esac;
 
+export _GROFFER2_SH;		# file name of the script that follows up
+_GROFFER2_SH="${_GROFFER_LIBDIR}"/groffer2.sh;
 
-########################################################################
-# Test of `test'.
-#
-test "a" = "a" || exit 1;
+export _NULL_DEV;
+if test -c /dev/null
+then
+  _NULL_DEV="/dev/null";
+else
+  _NULL_DEV="NUL";
+fi;
 
 
-########################################################################
-# Test of `echo' and the `$()' construct.
-#
-echo -n '' >/dev/null || exit "${_ERROR}";
-if test "$(echo -n 'te' && echo -n '' && echo -n 'st')" != "test"; then
+# Test of the `$()' construct.
+if test _"$(echo "$(echo 'test')")"_ \
+     != _test_
+then
+  echo 'The "$()" construct did not work.' >&2;
   exit "${_ERROR}";
 fi;
 
-
-########################################################################
-# Test of function definitions.
-#
-_t_e_s_t_f_u_n_c_()
-{
-  return "${_OK}";
-}
-
-if _t_e_s_t_f_u_n_c_ 2>/dev/null; then
-  :
-else
-  echo 'shell does not support function definitions.' >&2;
+# Test of sed program
+if test _"$(echo red | sed -e 's/r/s/')"_ != _sed_
+then
+  echo 'The sed program did not work.' >&2;
   exit "${_ERROR}";
 fi;
 
 
-########################################################################
-# Preset and reset of read-write global variables
-########################################################################
-
-
-# For variables that can be reset by option `--default', see reset().
-
-_FILEARGS='';
-
-# _HAS_* from availability tests
-_HAS_COMPRESSION='';
-_HAS_OPTS_GNU='';
-_HAS_OPTS_POSIX='';
-
-# _TMP_* temporary files
-_TMP_DIR='';
-_TMP_DIR_SUB='';
-_TMP_CAT='';
-_TMP_STDIN='';
-
-
-########################################################################
-# reset ()
-#
-# Reset the variables that can be affected by options to their default.
-#
-reset()
-{
-  if test "$#" -ne 0; then
-    error "reset() does not have arguments.";
-  fi;
-
-  _ADDOPTS_GROFF='';
-  _ADDOPTS_POST='';
-  _ADDOPTS_X='';
-  _DISPLAY_ARGS='';
-  _DISPLAY_MODE='';
-  _DISPLAY_PROG='';
-  _REGISTERED_TITLE='';
-
-  # _MAN_* finally used configuration of man searching
-  _MAN_ALL='no';
-  _MAN_ENABLE='yes';		# do search for man-pages
-  _MAN_EXT='';
-  _MAN_FORCE='no';		# first local file, then search man page
-  _MAN_IS_SETUP='no';
-  _MAN_LANG='';
-  _MAN_LANG_DONE='no';
-  _MAN_PATH='';
-  _MAN_SEC='';
-  _MAN_SEC_DONE='no';
-  _MAN_SYS='';
-  _MAN_SYS_DONE='no';
-
-  # _MANOPT_* as parsed from $MANOPT
-  _MANOPT_ALL='no';
-  _MANOPT_EXTENSION='';
-  _MANOPT_LANG='';
-  _MANOPT_PATH='';
-  _MANOPT_PAGER='';
-  _MANOPT_SEC='';
-  _MANOPT_SYS='';
-
-  # _OPT_* as parsed from groffer command line
-  _OPT_ALL='no';
-  _OPT_APROPOS='';
-  _OPT_APROPOS_DATA='';
-  _OPT_APROPOS_DEVEL='';
-  _OPT_APROPOS_PROGS='';
-  _OPT_BD='';
-  _OPT_BG='';
-  _OPT_BW='';
-  _OPT_DEBUG='no';
-  _OPT_DEFAULT_MODES='';
-  _OPT_DEVICE='';
-  _OPT_DISPLAY='';
-  _OPT_FG='';
-  _OPT_FN='';
-  _OPT_GEOMETRY='';
-  _OPT_ICONIC='no';
-  _OPT_LANG='';
-  _OPT_LOCATION='no';
-  _OPT_MODE='';
-  _OPT_MANPATH='';
-  _OPT_PAGER='';
-  _OPT_RESOLUTION='';
-  _OPT_RV='no';
-  _OPT_SECTIONS='';
-  _OPT_SYSTEMS='';
-  _OPT_TITLE='';
-  _OPT_TEXT_DEVICE='';
-  _OPT_V='no';
-  _OPT_VIEWER_DVI='';
-  _OPT_VIEWER_PDF='';
-  _OPT_VIEWER_PS='';
-  _OPT_VIEWER_HTML='';
-  _OPT_VIEWER_X='';
-  _OPT_WHATIS='no';
-  _OPT_XRM='';
-  _OPT_Z='no';
-
-}
-
-reset;
-
-
-########################################################################
-#          Functions for error handling and debugging
-########################################################################
-
-
-##############
-# landmark ()
-#
-# Print  to standard error as a debugging aid.
-#
-# Globals: $_DEBUG_LM
-#
-landmark()
-{
-  if test "${_DEBUG_LM}" = 'yes'; then
-    echo ">>> $*" >&2;
-  fi;
-}
-
-landmark "1: debugging functions";
-
-
-##############
-# clean_up ()
-#
-# Clean up at exit.
-#
-clean_up()
-{
-  if test -d "${_TMP_DIR}"; then
-    rm -f "${_TMP_DIR}"/*;
-    rmdir "${_TMP_DIR}";
-  fi;
-}
-
-
-##############
-# echo2 (*)
-#
-# Output to stderr.
-#
-# Arguments : arbitrary text.
-#
-echo2()
-{
-  echo "$*" >&2;
-}
-
-
-##############
-# echo2n (*)
-#
-# Output to stderr.
-#
-# Arguments : arbitrary text.
-#
-echo2n()
-{
-  echo -n "$*" >&2;
-}
-
-
-#############
-# diag (text>*)
-#
-# Output a diagnostic message to stderr
-#
-diag()
-{
-  echo2 '>>>>>'"$*";
-}
-
-
-#############
-# error (*)
-#
-# Print an error message to standard error; exit with an error condition
-#
-error()
-{
-  local i;
-  local _code;
-  _code="${_ERROR}";
-  case "$#" in
-    0) true; ;;
-    1) echo2 'groffer error: '"$1"; ;;
-    2)
-      echo2 'groffer error: '"$1";
-      _code="$2";
-      ;;
-    *) echo2 'groffer error: wrong number of arguments in error().'; ;;
-  esac;
-  if test "${_DEBUG}" = 'yes'; then
-    func_stack_dump;
+########################### configuration
+
+# read and transform the configuration files, execute the arising commands
+for f in "${_CONF_FILE_HOME}" "${_CONF_FILE_ETC}"
+do
+  if test -f "$f"
+  then
+    o="";			# $o means groffer option
+    # use "" quotes because of ksh and posh
+    eval "$(cat "$f" | sed -n -e '
+# Ignore comments
+/^['"${_SP}${_TAB}"']*#/d
+# Delete leading and final space
+s/^['"${_SP}${_TAB}"']*//
+s/['"${_SP}${_TAB}"']*$//
+# Print all shell commands
+/^[^-]/p
+# Replace empty arguments
+s/^\(-[^ ]*\)=$/o="${o} \1 '"${_SQ}${_SQ}"'"/p
+# Replace division between option and argument by single space
+s/[='"${_SP}${_TAB}"']['"${_SP}${_TAB}"']*/'"${_SP}"'/
+# Handle lines without spaces
+s/^\(-[^'"${_SP}"']*\)$/o="${o} \1"/p
+# Print options that have their argument encircled with single quotes
+/^-[^ ]* '"${_SQ}"'.*'"${_SQ}"'$/s/^.*$/o="${o} &"/p
+# Replace encircled double quotes by single quotes and print the result
+s/^\(-[^ ]*\) "\(.*\)"$/o="${o} \1 '"${_SQ}"'\2'"${_SQ}"'"/p
+# Encircle the remaining arguments with single quotes
+s/^\(-[^ ]*\) \(.*\)$/o="${o} \1 '"${_SQ}"'\2'"${_SQ}"'"/p
+')"
+    if test _"${o}"_ != __
+    then
+      if test _"{GROFFER_OPT}"_ = __
+      then
+        GROFFER_OPT="${o}";
+      else
+        GROFFER_OPT="${o} ${GROFFER_OPT}";
+      fi;
+    fi;
   fi;
-  clean_up;
-  kill "${_PROCESS_ID}" >/dev/null 2>&1;
-  kill -9 "${_PROCESS_ID}" >/dev/null 2>&1;
-  exit "${_code}";
-}
-
-
-#############
-# abort (*)
-#
-# Terminate program with error condition
-#
-abort()
-{
-  error "Program aborted.";
-  exit 1;
-}
+done;
 
-
-#############
-# func_check (   "$@")
-#
-# Check number of arguments and register to _FUNC_STACK.
-#
-# Arguments: >=3
-#   : name of the calling function.
-#   :    a relational operator: = != < > <= >= 
-#   :   number of arguments to be checked against 
-#   "$@":        the arguments of the calling function.
-#
-func_check()
-{
-  local _comp;
-  local _fname;
-  local _nargs;
-  local _op;
-  local _s;
-  if test "$#" -lt 3; then
-    error 'func_check() needs at least 3 arguments.';
-  fi;
-  _fname="$1";
-  case "$3" in
-    1)
-      _nargs="$3";
-      _s='';
-      ;;
-    0|[2-9])
-      _nargs="$3";
-      _s='s';
-      ;;
-    *)
-      error "func_check(): third argument must be a digit.";
-      ;;
-  esac;
-  case "$2" in
-    '='|'-eq')
-      _op='-eq';
-      _comp='exactly';
-      ;;
-    '>='|'-ge')
-      _op='-ge';
-      _comp='at least';
-      ;;
-    '<='|'-le')
-      _op='-le';
-      _comp='at most';
-      ;;
-    '<'|'-lt')
-      _op='-lt';
-      _comp='less than';
-      ;;
-    '>'|'-gt')
-      _op='-gt';
-      _comp='more than';
-      ;;
-    '!='|'-ne')
-      _op='-ne';
-      _comp='not';
-      ;;
-    *) 
-      error \
-        'func_check(): second argument is not a relational operator.';
-      ;;
-  esac;
-  shift 3;
-  if test "$#" "${_op}" "${_nargs}"; then
-    do_nothing;
-  else
-    error \
-      "${_fname}"'() needs '"${_comp} ${_nargs}"' argument'"${_s}"'.';
-  fi;
-  if test "${_DEBUG}" = 'yes'; then
-    func_push "${_fname} $*";
-  fi;
-}
+# integrate $GROFFER_OPT into the command line; it isn't needed any more
+if test _"${GROFFER_OPT}"_ != __
+then
+  eval set x "${GROFFER_OPT}" '"$@"';
+  shift;
+  GROFFER_OPT='';
+fi;
 
 
-#############
-# func_pop ()
-#
-# Retrieve the top element from the stack.
-#
-# The stack elements are separated by `!'; the popped element is
-# identical to the original element, except that all `!' characters
-# were removed.
-#
-# Arguments: 1
-#
-func_pop()
-{
-  if test "${_DEBUG}" = 'yes'; then
-    if test "$#" -ne 0; then
-      error 'func_pop() does not have arguments.';
-    fi;
-    case "${_FUNC_STACK}" in
-      '')
-        error 'func_pop(): stack is empty.';
+########################### Determine the shell
+
+export _SHELL;
+
+# use "``" instead of "$()" for using the case ")" construct
+# do not use "" quotes because of ksh
+_SHELL=`
+  # $x means list.
+  # $s means shell.
+  # The command line arguments are taken over.
+  # Shifting herein does not have an effect outside.
+  export x;  
+  case " $*" in
+  *\ --sh*)			# abbreviation for --shell
+    x='';
+    s='';
+    # determine all --shell arguments, store them in $x in reverse order
+    while test $# != 0
+    do
+      case "$1" in
+      --shell|--sh|--she|--shel)
+        if test "$#" -ge 2
+        then
+          s="$2";
+          shift;
+        fi;
         ;;
-      *!*)
-        # split at first bang `!'.
-        _FUNC_STACK="$(echo -n ${_FUNC_STACK} \
-                       | sed -e 's/^[^!]*!//')";
+      --shell=*|--sh=*|--she=*|--shel=*)
+        # delete up to first "=" character
+        s="$(echo x"$1" | sed -e 's/^x[^=]*=//')";
         ;;
       *)
-        _FUNC_STACK='';
-        ;;
-    esac;
-  fi;
-}
-
+        shift;
+        continue;
+      esac;
+      if test _"${x}"_ = __
+      then
+        x="'${s}'";
+      else
+        x="'${s}' ${x}";
+      fi;
+      shift;
+    done;
 
-#############
-# func_push ()
-#
-# Store another element to stack.
-#
-# The stack elements are separated by `!'; if  contains a `!'
-# it is removed first.
-#
-# Arguments: 1
-#
-func_push()
-{
-  local _element;
-  if test "${_DEBUG}" = 'yes'; then
-    if test "$#" -ne 1; then
-      error 'func_push() needs 1 argument.';
-    fi;
-    case "$1" in
-      *'!'*)
-        # remove all bangs `!'.
-        _element="$(echo -n "$1" | sed -e 's/!//g')";
-        ;;
-      *)
-        _element="$1";
-        ;;
-    esac;
-    if test "${_FUNC_STACK}" = ''; then
-      _FUNC_STACK="${_element}";
-    else
-      _FUNC_STACK="${_element}!${_FUNC_STACK}";
+    # from all possible shells in $x determine the first being a shell
+    # or being empty
+    s="$(
+      # "" quotes because of posh
+      eval set x "${x}";
+      shift;
+      if test $# != 0
+      then
+        for i
+        do
+          if test _"$i"_ = __
+          then
+            # use the empty argument as the default shell
+            echo empty;
+            break;
+          else
+            # test $i on being a shell program;
+            # use this kind of quoting for posh
+            if test _"$(eval "$i -c 'echo ok'" 2>${_NULL_DEV})"_ = _ok_ >&2
+            then
+              # shell found
+              cat </dev/null 2>&1; then
-  true;
-else
-  true()
-  {
-    return "${_GOOD}";
-  }
-
-  false()
-  {
-    return "${_BAD}";
-  }
-fi;
-
-
-########################################################################
-# Test of `unset'.
-#
-_test='test';
-if unset _test >/dev/null 2>&1 && test "${_test}" = ''; then
-  true;
-else
-  unset()
-  {
-    for v in "$@"; do
-      eval "$v"='';
-    done;
-  }
-fi;
-unset _test;
-
-########################################################################
-# Test of builtin `local'
-#
+`
 
-_t_e_s_t_f_u_n_c_()
-{
-  local _test >/dev/null 2>&1 || return "${_BAD}";
-}
+########################### test fast shells for automatic run
 
-if _t_e_s_t_f_u_n_c_; then
-  :
-else
-  local()
-  {
-    if test "$1" != ''; then
-      error "overriding global variable \`$1' with local value.";
+if test _"${_SHELL}"_ = __
+then
+  for s in ksh ash dash pdksh zsh posh
+  do
+    if test _"$(eval "$s -c 'echo ok'" 2>${_NULL_DEV})"_ = _ok_ >&2
+    then
+      _SHELL="$s";
+      break;
     fi;
-  }
+  done;
 fi;
 
 
-########################################################################
-# Test of global setting in functions
-#
-_global='outside';
-_clobber='outside';
-
-_t_e_s_t_f_u_n_c_()
-{
-  local _clobber;
-  _global='inside';
-  _clobber='inside';
-}
+########################### start groffer2.sh
 
-_t_e_s_t_f_u_n_c_;
-if test "${_global}" != 'inside' || test "${_clobber}" != 'outside';
+if test _"${_SHELL}"_ = _empty_
 then
-  error "Cannot assign to global variables from within functions.";
+  _SHELL='';
 fi;
 
-unset _global;
-unset _clobber;
-
-
-########################################################################
-# Test of function `sed'.
-#
-if test "$(echo xTesTx \
-           | sed -e 's/^.\([Tt]e*x*sTT*\).*$/\1/' \
-           | sed -e '\|T|s||t|g')" != 'test';
+if test _"${_SHELL}"_ = __
 then
-  error 'Test of "sed" command failed.';
-fi;
-
-
-########################################################################
-# Test of function `cat'.
-#
-if test "$(echo test | cat)" != "test"; then
-  error 'Test of "cat" command failed.';
-fi;
-
-
-########################################################################
-# Test for compression.
-#
-if test "$(echo 'test' | gzip -c -d -f - 2>/dev/null)" = 'test'; then
-  _HAS_COMPRESSION='yes';
-  if echo 'test' | bzip2 -c 2>/dev/null | bzip2 -t 2>/dev/null \
-     && test "$(echo 'test' | bzip2 -c 2>/dev/null \
-                            | bzip2 -d -c 2>/dev/null)" \
-             = 'test'; then
-    _HAS_BZIP='yes';
-  else
-    _HAS_BZIP='no';
-  fi;
-else
-  _HAS_COMPRESSION='no';
-  _HAS_BZIP='no';
-fi;
-
-
-########################################################################
-_t_e_s_t_f_u_n_c_()
-{
-  :
-}
-
-
-########################################################################
-#                   Definition of normal Functions
-########################################################################
-landmark "3: functions";
-
-########################################################################
-# abort (*)
-#
-# Unconditionally terminate the program with error code;
-# useful for debugging.
-#
-# defined above
-
-
-########################################################################
-# apropos_run ()
-#
-# 
-apropos_run() {
-  func_check apropos_run = 1 "$@";
-  if apropos apropos >/dev/null 2>/dev/null; then
-    apropos "$1";
-  elif man --apropos man >/dev/null 2>/dev/null; then
-    man --apropos "$1";
-  elif man -k man >/dev/null 2>/dev/null; then
-    man -k "$1";
-  fi;
-}
-
-
-########################################################################
-# base_name ()
-#
-# Get the file name part of , i.e. delete everything up to last
-# `/' from the beginning of .  Remove final slashes, too, to get a
-# non-empty output.
-#
-# Arguments : 1
-# Output    : the file name part (without slashes)
-#
-base_name()
-{
-  func_check base_name = 1 "$@";
-  local f;
-  f="$1";
-  case "$f" in
-    */)
-      # delete all final slashes
-      f="$(echo -n "$f" | sed -e '\|//*$|s|||')";
-      ;;
-  esac;
-  case "$f" in
-    /|'')
-      eval "${return_bad}";
-      ;;
-    */*)
-      # delete everything before and including the last slash `/'.
-      echo -n "$f" | sed -e '\|^.*//*\([^/]*\)$|s||\1|';
-      ;;
-    *)
-      echo -n "$f";
-      ;;
-  esac;
-  eval "${return_ok}";
-}
-
-
-########################################################################
-# catz ()
-#
-# Decompress if possible or just print  to standard output.
-#
-# gzip, bzip2, and .Z decompression is supported.
-#
-# Arguments: 1, a file name.
-# Output: the content of , possibly decompressed.
-#
-if test "${_HAS_COMPRESSION}" = 'yes'; then
-  catz()
-  {
-    func_check catz = 1 "$@";
-    case "$1" in
-      '')
-        error 'catz(): empty file name';
-        ;;
-      '-')
-        error 'catz(): for standard input use save_stdin()';
-        ;;
-    esac;
-    if obj _HAS_BZIP is_yes; then
-      if bzip2 -t "$1" 2>/dev/null; then
-        bzip2 -c -d "$1" 2>/dev/null;
-        eval "${return_ok}";
-      fi;
-    fi;
-    gzip -c -d -f "$1" 2>/dev/null;
-    eval "${return_ok}";
-  }
+  # no shell found, so start groffer2.sh normally
+  eval exec "'${_GROFFER2_SH}'" '"$@"';
+  exit;
 else
-  catz()
-  {
-    func_check catz = 1 "$@";
-    cat "$1";
-    eval "${return_ok}";
-  }
+  # start groffer2.sh with the found $_SHELL
+  # do not quote $_SHELL to allow arguments
+  eval exec "${_SHELL} '${_GROFFER2_SH}'" '"$@"';
+  exit;
 fi;
-
-
-########################################################################
-# clean_up ()
-#
-# Do the final cleaning up before exiting; used by the trap calls.
-#
-# defined above
-
-
-########################################################################
-# diag (*)
-#
-# Print marked message to standard error; useful for debugging.
-#
-# defined above
-
-
-########################################################################
-landmark '4: dirname()*';
-########################################################################
-
-#######################################################################
-# dirname_append ( )
-#
-# Append `name' to `dir' with clean handling of `/'.
-#
-# Arguments : 2
-# Output    : the generated new directory name /
-#
-dirname_append()
-{
-  func_check dirname_append = 2 "$@";
-  local _res;
-  if is_empty "$1"; then
-    error "dir_append(): first argument is empty.";
-  fi;
-  if is_empty "$2"; then
-    echo -n "$1";
-  else
-    dirname_chop "$1"/"$2";
-  fi;
-  eval "${return_ok}";
-}
-
-
-########################################################################
-# dirname_chop ()
-#
-# Remove unnecessary slashes from directory name.
-#
-# Argument: 1, a directory name.
-# Output:   path without double, or trailing slashes.
-#
-dirname_chop()
-{
-  func_check dirname_chop = 1 "$@";
-  local _arg;
-  local _res;
-  local _sep;
-  # replace all multiple slashes by a single slash `/'.
-  _res="$(echo -n "$1" | sed -e '\|///*|s||/|g')";
-  case "${_res}" in
-    ?*/)
-      # remove trailing slash '/';
-      echo -n "${_res}" | sed -e '\|/$|s|||';
-      ;;
-    *) echo -n "${_res}"; ;;
-  esac;
-  eval "${return_ok}";
-}
-
-
-########################################################################
-# do_filearg ()
-#
-# Append the file, man-page, or standard input corresponding to the
-# argument to the temporary file.  If this is compressed in the gzip
-# or Z format it is decompressed.  A title element is generated.
-#
-# Argument either:
-#   - name of an existing files.
-#   - `-' to represent standard input (several times allowed).
-#   - `man:name.(section)' the man-page for `name' in `section'.
-#   - `man:name.section' the man-page for `name' in `section'.
-#   - `man:name' the man-page for `name' in the lowest `section'.
-#   - `name.section' the man-page for `name' in `section'.
-#   - `name' the man-page for `name' in the lowest `section'.
-# Globals :
-#   $_TMP_STDIN, $_MAN_ENABLE, $_MAN_IS_SETUP, $_OPT_MAN
-#
-# Output  : none
-# Return  : $_GOOD if found, ${_BAD} otherwise.
-#
-do_filearg()
-{
-  func_check do_filearg = 1 "$@";
-  local _filespec;
-  local i;
-  _filespec="$1";
-  # store sequence into positional parameters
-  case "${_filespec}" in
-    '')
-       eval "${return_good}";
-       ;;
-    '-')
-      register_file '-';
-      eval "${return_good}";
-      ;;
-    */*)			# with directory part; so no man search
-      set -- 'File';
-      ;;
-    *)
-      if obj _MAN_ENABLE is_yes; then
-        if obj _MAN_FORCE is_yes; then
-          set -- 'Manpage' 'File';
-        else
-          set -- 'File' 'Manpage';
-        fi;
-      else
-        set -- 'File';
-      fi;
-      ;;
-  esac;
-  for i in "$@"; do
-    case "$i" in
-      File)
-        if test -f "${_filespec}"; then
-          if test -r "${_filespec}"; then
-            register_file "${_filespec}";
-            eval "${return_good}";
-          else
-	    echo2 "could not read \`${_filespec}'";
-            eval "${return_bad}";
-          fi;
-        else
-          continue;
-        fi;
-        ;;
-      Manpage)			# parse filespec as man page
-        if obj _MAN_IS_SETUP is_not_yes; then
-          man_setup;
-        fi;
-        if man_do_filespec "${_filespec}"; then
-          eval "${return_good}";
-        else
-          continue;
-	fi;
-        ;;
-    esac;
-  done;
-  eval "${return_bad}";
-} # do_filearg()
-
-
-########################################################################
-# do_nothing ()
-#
-# Dummy function.
-#
-do_nothing()
-{
-  return "${_OK}";
-}
-
-
-########################################################################
-# echo2 (*)
-#
-# Print to standard error with final line break.
-#
-# defined above
-
-
-########################################################################
-# echo2n (*)
-#
-# Print to standard error without final line break.
-#
-# defined above
-
-
-########################################################################
-# error (*)
-#
-# Print error message and exit with error code.
-#
-# defined above
-
-
-########################################################################
-# func_check (   "$@")
-#
-# Check number of arguments and register to _FUNC_STACK.
-#
-# Arguments: >=3
-#   : name of the calling function.
-#   :    a relational operator: = != < > <= >= 
-#   :   number of arguments to be checked against 
-#   "$@":        the arguments of the calling function.
-#
-# defined above
-
-#########################################################################
-# func_pop ()
-#
-# Delete the top element from the function call stack.
-#
-# defined above
-
-
-########################################################################
-# func_push ()
-#
-# Store another element to function call stack.
-#
-# defined above
-
-
-########################################################################
-# func_stack_dump ()
-#
-# Print the content of the stack.
-#
-# defined above
-
-
-########################################################################
-# get_first_essential (*)
-#
-# Retrieve first non-empty argument.
-#
-# Return  : `1' if all arguments are empty, `0' if found.
-# Output  : the retrieved non-empty argument.
-#
-get_first_essential()
-{
-  func_check get_first_essential '>=' 0 "$@";
-  local i;
-  if is_equal "$#" 0; then
-    eval "${return_ok}";
-  fi;
-  for i in "$@"; do
-    if obj i is_not_empty; then
-      echo -n "$i";
-      eval "${return_ok}";
-    fi;
-  done;
-  eval "${return_bad}";
-}
-
-
-########################################################################
-landmark '5: is_*()';
-########################################################################
-
-########################################################################
-# is_dir ()
-#
-# Test whether `name' is a directory.
-#
-# Arguments : 1
-# Return    : `0' if arg1 is a directory, `1' otherwise.
-#
-is_dir()
-{
-  func_check is_dir = 1 "$@";
-  if test -d "$1" && test -r "$1"; then
-    eval "${return_yes}";
-  fi;
-  eval "${return_no}";
-}
-
-
-########################################################################
-# is_empty ()
-#
-# Test whether `string' is empty.
-#
-# Arguments : <=1
-# Return    : `0' if arg1 is empty or does not exist, `1' otherwise.
-#
-is_empty()
-{
-  func_check is_empty = 1 "$@";
-  if test "$1" = ''; then
-    eval "${return_yes}";
-  fi;
-  eval "${return_no}";
-}
-
-
-########################################################################
-# is_equal ( )
-#
-# Test whether `string1' is equal to .
-#
-# Arguments : 2
-# Return    : `0' both arguments are equal strings, `1' otherwise.
-#
-is_equal()
-{
-  func_check is_equal = 2 "$@";
-  if test "$1" = "$2"; then
-    eval "${return_yes}";
-  fi;
-  eval "${return_no}";
-}
-
-
-########################################################################
-# is_file ()
-#
-# Test whether `name' is a readable file.
-#
-# Arguments : 1
-# Return    : `0' if arg1 is a readable file, `1' otherwise.
-#
-is_file()
-{
-  func_check is_file = 1 "$@";
-  if test -f "$1" && test -r "$1"; then
-    eval "${return_yes}";
-  fi;
-  eval "${return_no}";
-}
-
-
-########################################################################
-# is_non_empty_file ()
-#
-# Test whether `file_name' is a non-empty existing file.
-#
-# Arguments : <=1
-# Return    :
-#   `0' if arg1 is a non-empty existing file
-#   `1' otherwise
-#
-is_non_empty_file()
-{
-  func_check is_empty = 1 "$@";
-  if is_file "$1"; then
-    if is_not_empty "$(cat "$1" | sed -e '/./q')"; then
-      eval "${return_yes}";
-    fi;
-  fi;
-  eval "${return_no}";
-}
-
-
-########################################################################
-# is_not_dir ()
-#
-# Test whether `name' is not a readable directory.
-#
-# Arguments : 1
-# Return    : `0' if arg1 is a directory, `1' otherwise.
-#
-is_not_dir()
-{
-  func_check is_not_dir = 1 "$@";
-  if is_dir "$1"; then
-    eval "${return_no}";
-  fi;
-  eval "${return_yes}";
-}
-
-
-########################################################################
-# is_not_empty ()
-#
-# Test whether `string' is not empty.
-#
-# Arguments : <=1
-# Return    : `0' if arg1 exists and is not empty, `1' otherwise.
-#
-is_not_empty()
-{
-  func_check is_not_empty = 1 "$@";
-  if is_empty "$1"; then
-    eval "${return_no}";
-  fi;
-  eval "${return_yes}";
-}
-
-
-########################################################################
-# is_not_equal ( )
-#
-# Test whether `string1' differs from `string2'.
-#
-# Arguments : 2
-#
-is_not_equal()
-{
-  func_check is_not_equal = 2 "$@";
-  if is_equal "$1" "$2"; then
-    eval "${return_no}";
-  fi
-  eval "${return_yes}";
-}
-
-
-########################################################################
-# is_not_file ()
-#
-# Test whether `name' is a not readable file.
-#
-# Arguments : >=1 (empty allowed), more args are ignored
-#
-is_not_file()
-{
-  func_check is_not_file '>=' 1 "$@";
-  if is_file "$1"; then
-    eval "${return_no}";
-  fi;
-  eval "${return_yes}";
-}
-
-
-########################################################################
-# is_not_prog ()
-#
-# Verify that arg is a not program in $PATH.
-#
-# Arguments : >=1 (empty allowed)
-#   more args are ignored, this allows to specify progs with arguments
-#
-is_not_prog()
-{
-  func_check is_not_prog '>=' 1 "$@";
-  if where "$1" >/dev/null; then
-    eval "${return_no}";
-  fi;
-  eval "${return_yes}";
-}
-
-
-########################################################################
-# is_not_writable ()
-#
-# Test whether `name' is a not a writable file or directory.
-#
-# Arguments : >=1 (empty allowed), more args are ignored
-#
-is_not_writable()
-{
-  func_check is_not_writable '>=' 1 "$@";
-  if is_writable "$1"; then
-    eval "${return_no}";
-  fi;
-  eval "${return_yes}";
-}
-
-
-########################################################################
-# is_not_yes ()
-#
-# Test whether `string' is not "yes".
-#
-# Arguments : 1
-#
-is_not_yes()
-{
-  func_check is_not_yes = 1 "$@";
-  if is_yes "$1"; then
-    eval "${return_no}";
-  fi;
-  eval "${return_yes}";
-}
-
-
-########################################################################
-# is_prog ()
-#
-# Determine whether arg is a program in $PATH
-#
-# Arguments : >=0 (empty allowed)
-#   more args are ignored, this allows to specify progs with arguments
-#
-is_prog()
-{
-  func_check is_prog '>=' 0 "$@";
-  case "$#" in
-  0)
-    eval "${return_no}";
-    ;;
-  *)
-    if where "$1" >/dev/null; then
-      eval "${return_yes}";
-    fi;
-    ;;
-  esac
-  eval "${return_no}";
-}
-
-
-########################################################################
-# is_writable ()
-#
-# Test whether `name' is a writable file or directory.
-#
-# Arguments : >=1 (empty allowed), more args are ignored
-#
-is_writable()
-{
-  func_check is_writable '>=' 1 "$@";
-  if test -r "$1"; then
-    if test -w "$1"; then
-      eval "${return_yes}";
-    fi;
-  fi;
-  eval "${return_no}";
-}
-
-
-########################################################################
-# is_yes ()
-#
-# Test whether `string' has value "yes".
-#
-# Arguments : <=1
-# Return    : `0' if arg1 is `yes', `1' otherwise.
-#
-is_yes()
-{
-  func_check is_yes = 1 "$@";
-  if is_equal "$1" 'yes'; then
-    eval "${return_yes}";
-  fi;
-  eval "${return_no}";
-}
-
-
-########################################################################
-# landmark ()
-#
-# Print debugging information on standard error if $_DEBUG_LM is `yes'.
-#
-# Globals: $_DEBUG_LM
-#
-# Defined in section `Debugging functions'.
-
-
-########################################################################
-# leave ()
-#
-# Clean exit without an error.
-#
-leave()
-{
-  clean_up;
-  exit "${_OK}";
-}
-
-
-########################################################################
-landmark '6: list_*()';
-########################################################################
-#
-# `list' is an object class that represents an array or list.  Its
-# data consists of space-separated single-quoted elements.  So a list
-# has the form "'first' 'second' '...' 'last'".  See list_append() for
-# more details on the list structure.  The array elements of `list'
-# can be get by `set -- $list`.
-
-
-########################################################################
-# list_append ( ...)
-#
-# Arguments: >=2
-#   : a variable name for a list of single-quoted elements
-#   :  some sequence of characters.
-# Output: none, but $ is set to
-#   if  is empty:  "'' '...'"
-#   otherwise:           "$list '' ..."
-#
-list_append()
-{
-  func_check list_append '>=' 2 "$@";
-  local _element;
-  local _list;
-  local _name;
-  _name="$1";
-  eval _list='"${'$1'}"';
-  shift;
-  for s in "$@"; do
-    case "$s" in
-    *\'*)
-      # escape each single quote by replacing each
-      # "'" (squote) by "'\''" (squote bslash squote squote);
-      # note that the backslash must be doubled in the following `sed'
-      _element="$(echo -n "$s" | sed -e 's/'"${_SQUOTE}"'/&\\&&/g')";
-      ;;
-    '')  
-      _element="";
-      ;;
-    *)
-      _element="$s";
-      ;;
-    esac;
-    if obj _list is_empty; then
-      _list="'${_element}'";
-    else
-      _list="${_list} '${_element}'";
-    fi;
-  done;
-  eval "${_name}"='"${_list}"';
-  eval "${return_ok}";
-}
-
-
-########################################################################
-# list_from_cmdline (    [...])
-#
-# Transform command line arguments into a normalized form.
-#
-# Options, option arguments, and file parameters are identified and
-# output each as a single-quoted argument of its own.  Options and
-# file parameters are separated by a '--' argument.
-#
-# Arguments: >=4
-#   : space-separated list of short options without an arg.
-#   : space-separated list of short options that have an arg.
-#   : space-separated list of long options without an arg.
-#   : space-separated list of long options that have an arg.
-#   ...: the arguments from a command line, such as "$@",
-#                     the content of a variable, or direct arguments.
-#
-# Globals: $POSIXLY_CORRECT (only kept for compatibility).
-#
-# Output: ['-[-]opt' ['optarg']]... '--' ['filename']...
-#
-# Example:
-#     list_normalize 'a b' 'c' '' 'long' -a f1 -bcarg --long=larg f2
-#   will result in printing:
-#     '-a' '-b' '-c' 'arg' '--long' 'larg' '--' 'f1' 'f2'
-#   If $POSIXLY_CORRECT is not empty, the result will be:
-#     '-a' '--' 'f1' '-bcarg' '--long=larg' 'f2'
-#
-#   Rationale:
-#     In POSIX, the first non-option ends the option processing.
-#     In GNU mode, used by default, non-option arguments are sorted
-#     behind the options.
-#
-#   Use this function only in the following way:
-#     eval set -- "$(args_norm '...' '...' '...' '...' "$@")";
-#     while test "$1" != '--'; do
-#       case "$1" in
-#       ...
-#       esac;
-#       shift;
-#     done;
-#     shift;         #skip '--'
-#     # all positional parameters ("$@") left are file name parameters.
-#
-list_from_cmdline()
-{
-  func_check list_from_cmdline '>=' 4 "$@";
-  local _fparams;
-  local _fn;
-  local _result;
-  local _long_a;
-  local _long_n;
-  local _short_a;
-  local _short_n;
-  _short_n="$(list_get "$1")"; # short options, no argument
-  _short_a="$(list_get "$2")"; # short options with argument
-  _long_n="$(list_get "$3")";	 # long options, no argument
-  _long_a="$(list_get "$4")";	 # long options with argument
-  shift 4;
-  _fn='list_from_cmdline():';	 # for error messages
-  if is_equal "$#" 0; then
-    echo -n "'--'";
-    eval "${return_ok}";
-  fi;
-  _fparams='';
-  _result='';
-  while test "$#" -ge 1; do
-    _arg="$1";
-    shift;
-    case "$_arg" in
-      --) break; ;;
-      --?*)
-        # delete leading '--';
-        _opt="$(echo -n "${_arg}" | sed -e 's/^..//')";
-        if list_has _long_n "${_opt}"; then
-          # long option, no argument
-          list_append _result "--${_opt}";
-          continue;
-        fi;
-        # test on `--opt=arg'
-        if string_contains "${_opt}" '='; then
-          # extract option by deleting from the first '=' to the end
-          _lopt="$(echo -n "${_opt}" | sed -e 's/=.*$//')";
-          if list_has _long_a "${_lopt}"; then
-            # get the option argument by deleting up to first `='
-            _optarg="$(echo -n "${_opt}" | sed -e 's/^[^=]*=//')";
-            list_append _result "--${_lopt}" "${_optarg}";
-            continue;
-          fi;
-        fi;
-        if list_has _long_a "${_opt}"; then
-          # long option with argument
-          if test "$#" -le 0; then
-            error "${_fn} no argument for option --${_opt}."
-          fi;
-          list_append _result "--${_opt}" "$1";
-          shift;
-          continue;
-        fi;
-        error "${_fn} --${_opt} is not an option."
-        ;;
-      -?*)			# short option (cluster)
-        # delete leading `-';
-        _rest="$(echo -n "${_arg}" | sed -e 's/^-//')";
-        while obj _rest is_not_empty; do
-          # get next short option from cluster (first char of $_rest)
-          _optchar="$(echo -n "${_rest}" | sed -e 's/^\(.\).*$/\1/')";
-          # remove first character from ${_rest};
-          _rest="$(echo -n "${_rest}" | sed -e 's/^.//')";
-          if list_has _short_n "${_optchar}"; then
-            list_append _result "-${_optchar}";
-            continue;
-          elif list_has _short_a "${_optchar}"; then
-            if obj _rest is_empty; then
-              if test "$#" -ge 1; then
-                list_append _result "-${_optchar}" "$1";
-                shift;
-                continue;
-              else
-                error \
-                  "${_fn}"' no argument for option -'"${_optchar}."
-              fi;
-            else		# rest is the argument
-              list_append _result "-${_optchar}" "${_rest}";
-              _rest='';
-              continue;
-            fi;
-          else
-            error "${_fn} unknown option -${_optchar}."
-          fi;
-        done;
-        ;;
-      *)
-	# Here, $_arg is not an option, so a file parameter.
-        # When $POSIXLY_CORRECT is set this ends option parsing;
-        # otherwise, the argument is stored as a file parameter and
-        # option processing is continued.
-        list_append _fparams "${_arg}";
-	if obj POSIXLY_CORRECT is_not_empty; then
-          break;
-        fi;
-        ;;
-    esac;
-  done;
-  list_append _result '--';
-  if obj _fparams is_not_empty; then
-    _result="${_result} ${_fparams}";
-  fi;
-  if test "$#" -gt 0; then
-    list_append _result "$@";
-  fi;
-  echo -n "$_result";
-  eval "${return_ok}";
-} # list_from_cmdline()
-
-
-########################################################################
-# list_from_split ( )
-#
-# In , escape all white space characters and replace each
-#  by space.
-#
-# Arguments: 2: a  that is to be split into parts divided by
-#               
-# Output:    the resulting list string
-#
-list_from_split()
-{
-  func_check list_from_split = 2 "$@";
-  local _s;
-
-  # precede each space or tab by a backslash `\' (doubled for `sed')
-  _s="$(echo -n "$1" | sed -e 's/\(['"${_SPACE}${_TAB}"']\)/\\\1/g')";
-
-  # replace split character of string by the list separator ` ' (space).
-  case "$2" in
-    /)				# cannot use normal `sed' separator
-      echo -n "${_s}" | sed -e '\|'"$2"'|s|| |g';
-      ;;
-    ?)				# use normal `sed' separator
-      echo -n "${_s}" | sed -e 's/'"$2"'/ /g';
-      ;;
-    ??*)
-      error 'list_from_split(): separator must be a single character.';
-      ;;
-  esac;
-  eval "${return_ok}";
-}
-
-
-########################################################################
-# list_get ()
-#
-# Check whether  is a space-separated list of '-quoted elements.
-#
-# If the test fails an error is raised.
-# If the test succeeds the argument is echoed.
-#
-# Testing criteria:
-#   A list has the form "'first' 'second' '...' 'last'".  So it has a
-#   leading and a final quote and the elements are separated by "' '"
-#   constructs.  If these are all removed there should not be any
-#   unescaped single-quotes left.  Watch out for escaped single
-#   quotes; they have the form '\'' (sq bs sq sq).
-
-# Arguments: 1
-# Output: the argument  unchanged, if the check succeeded.
-#
-list_get()
-{
-  func_check list_get = 1 "$@";
-  local _list;
-  eval _list='"${'$1'}"';
-  # remove leading and final space characters
-  _list="$(echo -n "${_list}" | \
-           sed -e '/^['"${_SPACE}${_TAB}"']*/s///' | \
-           sed -e '/['"${_SPACE}${_TAB}"']*$/s///')";
-  case "${_list}" in
-  '')
-    eval "${return_ok}";
-    ;;
-  \'*\')
-    echo -n "${_list}";
-    eval "${return_ok}";
-    ;;
-  *)
-    error "list_get(): bad list: $1"
-    ;;
-  esac;
-  eval "${return_ok}";
-}
-
-
-########################################################################
-# list_has ( )
-#
-# Arguments: 2
-#   : a variable name for a list of single-quoted elements
-#   :  some sequence of characters.
-# Output:
-#   if  is empty:  "'' '...'"
-#   otherwise:           "list '' ..."
-#
-list_has()
-{
-  func_check list_has = 2 "$@";
-  eval _list='"${'$1'}"';
-  if obj _list is_empty; then
-    eval "${return_no}";
-  fi;
-  _element="$2";
-  case "$2" in
-    \'*\')  _element="$2"; ;;
-    *)      _element="'$2'"; ;;
-  esac;
-  if string_contains "${_list}" "${_element}"; then
-    eval "${return_yes}";
-  else
-    eval "${return_no}";
-  fi;
-  eval "${return_ok}";
-}
-
-
-########################################################################
-# list_has_not ( )
-#
-# Arguments: 2
-#   :    a space-separated list of single-quoted elements.
-#   : some sequence of characters.
-# Output:
-#   if  is empty:  "'' '...'"
-#   otherwise:           " '' ..."
-#
-list_has_not()
-{
-  func_check list_has_not = 2 "$@";
-  eval _list='"${'$1'}"';
-  if obj _list is_empty; then
-    eval "${return_yes}";
-  fi;
-  _element="$2";
-  case "$2" in
-    \'*\')  _element="$2"; ;;
-    *)      _element="'$2'"; ;;
-  esac;
-  if string_contains "${_list}" "${_element}"; then
-    eval "${return_no}";
-  else
-    eval "${return_yes}";
-  fi;
-  eval "${return_ok}";
-}
-
-
-########################################################################
-landmark '7: man_*()';
-########################################################################
-
-########################################################################
-# man_do_filespec ()
-#
-# Print suitable man page(s) for filespec to $_TMP_CAT.
-#
-# Arguments : 2
-#   : argument of the form `man:name.section', `man:name',
-#               `man:name(section)', `name.section', `name'.
-#
-# Globals   : $_OPT_ALL
-#
-# Output    : none.
-# Return    : `0' if man page was found, `1' else.
-#
-# Only called from do_fileargs(), checks on $MANPATH and
-# $_MAN_ENABLE are assumed.
-#
-man_do_filespec()
-{
-  func_check man_do_filespec = 1 "$@";
-  local _got_one;
-  local _name;
-  local _prevsec;
-  local _res;
-  local _section;
-  local _spec;
-  local _string;
-  local s;
-  if obj _MAN_PATH is_empty; then
-    eval "${return_bad}";
-  fi;
-  if is_empty "$1"; then
-    eval "${return_bad}";
-  fi;
-  _spec="$1";
-  _name='';
-  _section='';
-  case "${_spec}" in
-    */*)			# not a man spec when it contains '/'
-      eval "${return_bad}";
-      ;;
-    man:?*\(?*\))		# man:name(section)
-      _name="$(echo -n "${_spec}" \
-               | sed -e 's/^man:\(..*\)(\(..*\))$/\1/')";
-      _section="$(echo -n "${_spec}" \
-               | sed -e 's/^man:\(..*\)(\(..*\))$/\2/')";
-      ;;
-    man:?*.[0-9on])			# man:name.section
-      _name="$(echo -n "${_spec}" \
-               | sed -e 's/^man:\(..*\)\..$/\1/')";
-      _section="$(echo -n "${_spec}" \
-               | sed -e 's/^.*\(.\)$/\1/')";
-      ;;
-    man:?*)			# man:name
-      _name="$(echo -n "${_spec}" | sed -e 's/^man://')";
-      ;;
-    ?*\(?*\))			# name(section)
-      _name="$(echo -n "${_spec}" \
-               | sed -e 's/^\(..*\)(\(..*\))$/\1/')";
-      _section="$(echo -n "${_spec}" \
-               | sed -e 's/^\(..*\)(\(..*\))$/\2/')";
-      ;;
-    ?*.[0-9on])			# name.section
-      _name="$(echo -n "${_spec}" \
-               | sed -e 's/^\(..*\)\..$/\1/')";
-      _section="$(echo -n "${_spec}" \
-               | sed -e 's/^.*\(.\)$/\1/')";
-      ;;
-    ?*)
-      _name="${_filespec}";
-      ;;
-  esac;
-  if obj _name is_empty; then
-    eval "${return_bad}";
-  fi;
-  _got_one='no';
-  if obj _section is_empty; then
-    eval set -- "${_MAN_AUTO_SEC}";
-    for s in "$@"; do
-      if man_search_section "${_name}" "$s"; then # found
-        if obj _MAN_ALL is_yes; then
-          _got_one='yes';
-        else
-          eval "${return_good}";
-        fi;
-      fi;
-    done;
-  else
-    if man_search_section "${_name}" "${_section}"; then
-      eval "${return_good}";
-    else
-      eval "${return_bad}";
-    fi;
-  fi;
-  if obj _MAN_ALL is_yes && is_yes "${_got_one}"; then
-    eval "${return_good}";
-  fi;
-  eval "${return_bad}";
-} # man_do_filespec()
-
-
-########################################################################
-# man_register_file (  [
]) -# -# Write a found man page file and register the title element. -# -# Arguments: 1, 2, or 3; maybe empty -# Output: none -# -man_register_file() -{ - func_check man_register_file '>=' 2 "$@"; - case "$#" in - 2|3) do_nothing; ;; - *) - error "man_register_file() expects 2 or 3 arguments."; - ;; - esac; - if is_empty "$1"; then - error 'man_register_file(): file name is empty'; - fi; - to_tmp "$1"; - case "$#" in - 2) - register_title "man:$2"; - eval "${return_ok}"; - ;; - 3) - register_title "$2.$3"; - eval "${return_ok}"; - ;; - esac; - eval "${return_ok}"; -} - - -######################################################################## -# man_search_section (
) -# -# Retrieve man pages. -# -# Arguments : 2 -# Globals : $_MAN_PATH, $_MAN_EXT -# Return : 0 if found, 1 otherwise -# -man_search_section() -{ - func_check man_search_section = 2 "$@"; - local _dir; - local _ext; - local _got_one; - local _name; - local _prefix - local _section; - local d; - local f; - if obj _MAN_PATH is_empty; then - eval "${return_bad}"; - fi; - if is_empty "$1"; then - eval "${return_bad}"; - fi; - if is_empty "$2"; then - eval "${return_bad}"; - fi; - _name="$1"; - _section="$2"; - eval set -- "$(path_split "${_MAN_PATH}")"; - _got_one='no'; - if obj _MAN_EXT is_empty; then - for d in "$@"; do - _dir="$(dirname_append "$d" "man${_section}")"; - if obj _dir is_dir; then - _prefix="$(dirname_append "${_dir}" "${_name}.${_section}")"; - for f in $(echo -n ${_prefix}*); do - if obj f is_file; then - if is_yes "${_got_one}"; then - register_file "$f"; - elif obj _MAN_ALL is_yes; then - man_register_file "$f" "${_name}"; - else - man_register_file "$f" "${_name}" "${_section}"; - eval "${return_good}"; - fi; - _got_one='yes'; - fi; - done; - fi; - done; - else - _ext="${_MAN_EXT}"; - # check for directory name having trailing extension - for d in "$@"; do - _dir="$(dirname_append $d man${_section}${_ext})"; - if obj _dir is_dir; then - _prefix="$(dirname_append "${_dir}" "${_name}.${_section}")"; - for f in ${_prefix}*; do - if obj f is_file; then - if is_yes "${_got_one}"; then - register_file "$f"; - elif obj _MAN_ALL is_yes; then - man_register_file "$f" "${_name}"; - else - man_register_file "$f" "${_name}" "${_section}"; - eval "${return_good}"; - fi; - _got_one='yes'; - fi; - done; - fi; - done; - # check for files with extension in directories without extension - for d in "$@"; do - _dir="$(dirname_append "$d" "man${_section}")"; - if obj _dir is_dir; then - _prefix="$(dirname_append "${_dir}" \ - "${_name}.${_section}${_ext}")"; - for f in ${_prefix}*; do - if obj f is_file; then - if is_yes "${_got_one}"; then - register_file "$f"; - elif obj _MAN_ALL is_yes; then - man_register_file "$f" "${_name}"; - else - man_register_file "$f" "${_name}" "${_section}"; - eval "${return_good}"; - fi; - _got_one='yes'; - fi; - done; - fi; - done; - fi; - if obj _MAN_ALL is_yes && is_yes "${_got_one}"; then - eval "${return_good}"; - fi; - eval "${return_bad}"; -} # man_search_section() - - -######################################################################## -# man_setup () -# -# Setup the variables $_MAN_* needed for man page searching. -# -# Globals: -# in: $_OPT_*, $_MANOPT_*, $LANG, $LC_MESSAGES, $LC_ALL, -# $MANPATH, $MANROFFSEQ, $MANSEC, $PAGER, $SYSTEM, $MANOPT. -# out: $_MAN_PATH, $_MAN_LANG, $_MAN_SYS, $_MAN_LANG, $_MAN_LANG2, -# $_MAN_SEC, $_MAN_ALL -# in/out: $_MAN_ENABLE -# -# The precedence for the variables related to `man' is that of GNU -# `man', i.e. -# -# $LANG; overridden by -# $LC_MESSAGES; overridden by -# $LC_ALL; this has the same precedence as -# $MANPATH, $MANROFFSEQ, $MANSEC, $PAGER, $SYSTEM; overridden by -# $MANOPT; overridden by -# the groffer command line options. -# -man_setup() -{ - func_check main_man_setup = 0 "$@"; - local _lang; - - if obj _MAN_IS_SETUP is_yes; then - eval "${return_ok}"; - fi; - _MAN_IS_SETUP='yes'; - - if obj _MAN_ENABLE is_not_yes; then - eval "${return_ok}"; - fi; - - # determine basic path for man pages - _MAN_PATH="$(get_first_essential \ - "${_OPT_MANPATH}" "${_MANOPT_PATH}" "${MANPATH}")"; - if obj _MAN_PATH is_empty; then - manpath_set_from_path; - else - _MAN_PATH="$(path_clean "${_MAN_PATH}")"; - fi; - if obj _MAN_PATH is_empty; then - if is_prog 'manpath'; then - _MAN_PATH="$(manpath 2>/dev/null)"; # not always available - fi; - fi; - if obj _MAN_PATH is_empty; then - _MAN_ENABLE="no"; - eval "${return_ok}"; - fi; - - _MAN_ALL="$(get_first_essential "${_OPT_ALL}" "${_MANOPT_ALL}")"; - if obj _MAN_ALL is_empty; then - _MAN_ALL='no'; - fi; - - _MAN_SYS="$(get_first_essential \ - "${_OPT_SYSTEMS}" "${_MANOPT_SYS}" "${SYSTEM}")"; - _lang="$(get_first_essential \ - "${_OPT_LANG}" "${LC_ALL}" "${LC_MESSAGES}" "${LANG}")"; - case "${_lang}" in - C|POSIX) - _MAN_LANG=""; - _MAN_LANG2=""; - ;; - ?) - _MAN_LANG="${_lang}"; - _MAN_LANG2=""; - ;; - *) - _MAN_LANG="${_lang}"; - # get first two characters of $_lang - _MAN_LANG2="$(echo -n "${_lang}" | sed -e 's/^\(..\).*$/\1/')"; - ;; - esac; - # from now on, use only $_LANG, forget about $_OPT_LANG, $LC_*. - - manpath_add_lang_sys; # this is very slow - - _MAN_SEC="$(get_first_essential \ - "${_OPT_SECT}" "${_MANOPT_SEC}" "${MANSEC}")"; - if obj _MAN_PATH is_empty; then - _MAN_ENABLE="no"; - eval "${return_ok}"; - fi; - - _MAN_EXT="$(get_first_essential \ - "${_OPT_EXTENSION}" "${_MANOPT_EXTENSION}")"; - eval "${return_ok}"; -} # man_setup() - - -######################################################################## -landmark '8: manpath_*()'; -######################################################################## - -######################################################################## -# manpath_add_lang_sys () -# -# Add language and operating system specific directories to man path. -# -# Arguments : 0 -# Output : none -# Globals: -# in: $_MAN_SYS: has the form `os1,os2,...', a comma separated -# list of names of operating systems. -# $_MAN_LANG and $_MAN_LANG2: each a single name -# in/out: $_MAN_PATH: has the form `dir1:dir2:...', a colon -# separated list of directories. -# -manpath_add_lang_sys() -{ - func_check manpath_add_lang_sys = 0 "$@"; - local p; - local _mp; - if obj _MAN_PATH is_empty; then - eval "${return_ok}"; - fi; - # twice test both sys and lang - eval set -- "$(path_split "${_MAN_PATH}")"; - _mp=''; - for p in "$@"; do # loop on man path directories - _mp="$(_manpath_add_lang_sys_single "${_mp}" "$p")"; - done; - eval set -- "$(path_split "${_mp}")"; - for p in "$@"; do # loop on man path directories - _mp="$(_manpath_add_lang_sys_single "${_mp}" "$p")"; - done; - _MAN_PATH="$(path_chop "${_mp}")"; - eval "${return_ok}"; -} - - -_manpath_add_lang_sys_single() -{ - # To the directory in $1 append existing sys/lang subdirectories - # Function is necessary to split the OS list. - # - # globals: in: $_MAN_SYS, $_MAN_LANG, $_MAN_LANG2 - # argument: 2: `man_path' and `dir' - # output: colon-separated path of the retrieved subdirectories - # - func_check _manpath_add_lang_sys_single = 2 "$@"; - local d; - _res="$1"; - _parent="$2"; - eval set -- "$(list_from_split "${_MAN_SYS}" ',')"; - for d in "$@" "${_MAN_LANG}" "${_MAN_LANG2}"; do - _dir="$(dirname_append "${_parent}" "$d")"; - if obj _res path_not_contains "${_dir}" && obj _dir is_dir; then - _res="${_res}:${_dir}"; - fi; - done; - if path_not_contains "${_res}" "${_parent}"; then - _res="${_res}:${_parent}"; - fi; - path_chop "${_res}"; -} - -# end manpath_add_lang_sys () - - -######################################################################## -# manpath_set_from_path () -# -# Determine basic search path for man pages from $PATH. -# -# Return: `0' if a valid man path was retrieved. -# Output: none -# Globals: -# in: $PATH -# out: $_MAN_PATH -# -manpath_set_from_path() -{ - func_check manpath_set_from_path = 0 "$@"; - local _base; - local _mandir; - local _manpath; - local d; - local e; - _manpath=''; - - # get a basic man path from $PATH - if obj PATH is_not_empty; then - eval set -- "$(path_split "${PATH}")"; - for d in "$@"; do - # delete the final `/bin' part - _base="$(echo -n "$d" | sed -e '\|//*bin/*$|s|||')"; - for e in /share/man /man; do - _mandir="${_base}$e"; - if test -d "${_mandir}" && test -r "${_mandir}"; then - _manpath="${_manpath}:${_mandir}"; - fi; - done; - done; - fi; - - # append some default directories - for d in /usr/local/share/man /usr/local/man \ - /usr/share/man /usr/man \ - /usr/X11R6/man /usr/openwin/man \ - /opt/share/man /opt/man \ - /opt/gnome/man /opt/kde/man; do - if obj _manpath path_not_contains "$d" && obj d is_dir; then - _manpath="${_manpath}:$d"; - fi; - done; - - _MAN_PATH="${_manpath}"; - eval "${return_ok}"; -} # manpath_set_from_path() - - -######################################################################## -landmark '9: obj_*()'; -######################################################################## - -######################################################################## -# obj ( ...) -# -# This works like a method (object function) call for an object. -# Run " $ ...". -# -# The first argument represents an object whose data is given as first -# argument to (). -# -# Argument: >=2 -# : variable name -# : a program or function name -# -obj() -{ - func_check obj '>=' 2 "$@"; - local func; - local var; - if is_empty "$2"; then - error "obj(): function name is empty." - else - func="$2"; - fi; - eval arg1='"${'$1'}"'; - shift; - shift; - eval "${func}"' "${arg1}" "$@"'; -} - - -######################################################################## -# obj_data () -# -# Print the data of , i.e. the content of $. -# For possible later extensions. -# -# Arguments: 1 -# : a variable name -# Output: the data of -# -obj_data() -{ - func_check obj '=' 1 "$@"; - if is_empty "$1"; then - error "obj_data(): object name is empty." - fi; - eval echo -n '"${'$1'}"'; -} - - -######################################################################## -# obj_from_output ( ...) -# -# Run '$="$( ...)"' to set the result of a -# function call to a global variable. -# -# Arguments: >=2 -# : a variable name -# : the name of a function or program -# : optional argument to -# Output: none -# -obj_from_output() -{ - func_check obj_from_output '>=' 2 "$@"; - local result_name; - if is_empty "$1"; then - error "res(): variable name is empty."; - elif is_empty "$2"; then - error "res(): function name is empty." - else - result_name="$1"; - fi; - shift; - eval "${result_name}"'="$('"$@"')"'; -} - - -######################################################################## -# obj_set ( ) -# -# Set the data of , i.e. call "$=". -# -# Arguments: 2 -# : a variable name -# : a string -# Output:: none -# -obj_set() -{ - func_check obj_set '=' 2 "$@"; - if is_empty "$1"; then - error "obj_set(): object name is empty." - fi; - eval "$1"='"$2"'; -} - - -######################################################################## -# path_chop () -# -# Remove unnecessary colons from path. -# -# Argument: 1, a colon separated path. -# Output: path without leading, double, or trailing colons. -# -path_chop() -{ - func_check path_chop = 1 "$@"; - local _res; - - # replace multiple colons by a single colon `:' - # remove leading and trailing colons - echo -n "$1" | sed -e 's/:::*/:/g' | - sed -e 's/^:*//' | - sed -e 's/:*$//'; - eval "${return_ok}"; -} - - -######################################################################## -# path_clean () -# -# Remove non-existing directories from a colon-separated list. -# -# Argument: 1, a colon separated path. -# Output: colon-separated list of existing directories. -# -path_clean() -{ - func_check path_clean = 1 "$@"; - local _arg; - local _dir; - local _res; - local i; - if is_not_equal "$#" 1; then - error 'path_clean() needs 1 argument.'; - fi; - _arg="$1"; - eval set -- "$(path_split "${_arg}")"; - _res=""; - for i in "$@"; do - if obj i is_not_empty \ - && obj _res path_not_contains "$i" \ - && obj i is_dir; - then - case "$i" in - ?*/) _res="${_res}$(dirname_chop "$i")"; ;; - *) _res="${_res}:$i"; - esac; - fi; - done; - if path_chop "${_res}"; then - eval "${return_ok}"; - else - eval "${return_badk}"; - fi; -} - - -######################################################################## -# path_contains ( ) -#- -# Test whether `dir' is contained in `path', a list separated by `:'. -# -# Arguments : 2 arguments. -# Return : `0' if arg2 is substring of arg1, `1' otherwise. -# -path_contains() -{ - func_check path_contains = 2 "$@"; - case ":$1:" in - *":$2:"*) - eval "${return_yes}"; - ;; - *) - eval "${return_no}"; - ;; - esac; - eval "${return_ok}"; -} - - -######################################################################## -# path_not_contains ( ) -#- -# Test whether `dir' is not contained in colon separated `path'. -# -# Arguments : 2 arguments. -# -path_not_contains() -{ - func_check path_not_contains = 2 "$@"; - if path_contains "$1" "$2"; then - eval "${return_no}"; - else - eval "${return_yes}"; - fi; - eval "${return_ok}"; -} - - -######################################################################## -# path_split () -# -# In `path' escape white space and replace each colon by a space. -# -# Arguments: 1: a colon-separated path -# Output: the resulting list, process with `eval set --' -# -path_split() -{ - func_check path_split = 1 "$@"; - list_from_split "$1" ':'; - eval "${return_ok}"; -} - - -######################################################################## -landmark '10: register_*()'; -######################################################################## - -######################################################################## -# register_file () -# -# Write a found file and register the title element. -# -# Arguments: 1: a file name -# Output: none -# -register_file() -{ - func_check register_file = 1 "$@"; - if is_empty "$1"; then - error 'register_file(): file name is empty'; - fi; - if is_equal "$1" '-'; then - to_tmp "${_TMP_STDIN}"; - register_title '-'; - else - to_tmp "$1"; - register_title "$(base_name "$1")"; - fi; - eval "${return_ok}"; -} - - -######################################################################## -# register_title () -# -# Create title element from and append to $_REGISTERED_TITLE -# -# Globals: $_REGISTERED_TITLE (rw) -# -register_title() -{ - func_check register_title = 1 "$@"; - local _title; - if is_empty "$1"; then - eval "${return_ok}"; - fi; - _title="$(base_name "$1")"; # remove directory part - - # remove extension `.gz' - _title="$(echo -n "${_title}" | sed -e 's/\.gz$//')"; - # remove extension `.Z' - _title="$(echo -n "${_title}" | sed -e 's/\.Z$//')"; - - if obj _title is_empty; then - eval "${return_ok}"; - fi; - _REGISTERED_TITLE="${_REGISTERED_TITLE} ${_title}"; - eval "${return_ok}"; -} - - -######################################################################## -# reset () -# -# Reset the variables that can be affected by options to their default. -# -# -# Defined in section `Preset' after the rudimentary shell tests. - - -######################################################################## -# save_stdin () -# -# Store standard input to temporary file (with decompression). -# -if obj _HAS_COMPRESSION is_yes; then - save_stdin() - { - local _f; - func_check save_stdin = 0 "$@"; - _f="${_TMP_DIR}"/INPUT; - cat >"${_f}"; - catz "${_f}" >"${_TMP_STDIN}"; - rm -f "${_f}"; - eval "${return_ok}"; - } -else - save_stdin() - { - func_check save_stdin = 0 "$@"; - cat >"${_TMP_STDIN}"; - eval "${return_ok}"; - } -fi; - - -######################################################################## -landmark '11: stack_*()'; -######################################################################## - -######################################################################## -# string_contains ( ) -# -# Test whether `part' is contained in `string'. -# -# Arguments : 2 text arguments. -# Return : `0' if arg2 is substring of arg1, `1' otherwise. -# -string_contains() -{ - func_check string_contains = 2 "$@"; - case "$1" in - *"$2"*) - eval "${return_yes}"; - ;; - *) - eval "${return_no}"; - ;; - esac; - eval "${return_ok}"; -} - - -######################################################################## -# string_not_contains ( ) -# -# Test whether `part' is not substring of `string'. -# -# Arguments : 2 text arguments. -# Return : `0' if arg2 is substring of arg1, `1' otherwise. -# -string_not_contains() -{ - func_check string_not_contains = 2 "$@"; - if string_contains "$1" "$2"; then - eval "${return_no}"; - else - eval "${return_yes}"; - fi; - eval "${return_ok}"; -} - - -######################################################################## -landmark '12: tmp_*()'; -######################################################################## - -######################################################################## -# tmp_cat () -# -# output the temporary cat file (the concatenation of all input) -# -tmp_cat() -{ - cat "${_TMP_CAT}"; -} - - -######################################################################## -# tmp_create (?) -# -# create temporary file -# -# It's safe to use the shell process ID together with a suffix to -# have multiple temporary files. -# -# Output : name of created file -# -tmp_create() -{ - func_check tmp_create '<=' 1 "$@"; - local _tmp; - # the output file does not have `,' as first character - _tmp="${_TMP_DIR}/,$1"; - echo -n >"${_tmp}"; - echo -n "${_tmp}"; # output file name - eval "${return_ok}"; -} - - -######################################################################## -# to_tmp () -# -# print file (decompressed) to the temporary cat file -# -to_tmp() -{ - func_check to_tmp = 1 "$@"; - if is_file "$1"; then - if obj _OPT_LOCATION is_yes; then - echo2 "$1"; - fi; - if obj _OPT_WHATIS is_yes; then - what_is "$1" >>"${_TMP_CAT}"; - else - catz "$1" >>"${_TMP_CAT}"; - fi; - else - error "to_tmp(): could not read file \`$1'."; - fi; - eval "${return_ok}"; -} - - -######################################################################## -# trap_clean () -# -# disable trap on all exit codes ($_ALL_EXIT) -# -# Arguments: 0 -# Globals: $_ALL_EXIT -# -trap_clean() -{ - func_check trap_clean = 0 "$@"; - local i; - for i in ${_ALL_EXIT}; do - trap "" "$i" 2>/dev/null || true; - done; - eval "${return_ok}"; -} - - -######################################################################## -# trap_set () -# -# call function on all exit codes ($_ALL_EXIT) -# -# Arguments: 1 (name of a shell function) -# Globals: $_ALL_EXIT -# -trap_set() -{ - func_check trap_set = 1 "$@"; - local i; - for i in ${_ALL_EXIT}; do - trap "$1" "$i" 2>/dev/null || true; - done; - eval "${return_ok}"; -} - - -######################################################################## -# usage () -# -# print usage information to stderr; for groffer option --help. -# -usage() -{ - func_check usage = 0 "$@"; - echo; - version; - echo 'Usage: '"${_PROGRAM_NAME}"' [option]... [filespec]...'; - cat <&1 | sed -e '/^ *$/q' | sed -e '1s/^/is part of /' >&2; -} - - -######################################################################## -# warning () -# -# Print warning to stderr -# -warning() -{ - echo2 "warning: $*"; -} - - -######################################################################## -# what_is () -# -# Interpret as a man page and display its `whatis' -# information as a fragment written in the groff language. -# -what_is() -{ - func_check what_is = 1 "$@"; - local _res; - local _dot; - if is_not_file "$1"; then - error "what_is(): argument is not a readable file." - fi; - _dot='^\.['"${_SPACE}${_TAB}"']*'; - echo '.br'; - echo "$1: "; - echo '.br'; - echo -n ' '; - # grep the line containing `.TH' macro, if any - _res="$(catz "$1" | sed -e '/'"${_dot}"'TH /p -d')"; - if obj _res is_not_empty; then # traditional man style - # get the text between the first and the second `.SH' macro, by - # - delete up to first .SH; - # - of this, print everything up to next .SH, and delete the rest; - # - of this, delete the final .SH line; - catz "$1" | sed -e '1,/'"${_dot}"'SH/d' \ - | sed -e '1,/'"${_dot}"'SH/p -d' \ - | sed -e '/'"${_dot}"'SH/d'; - eval "${return_ok}"; - fi; - # grep the line containing `.Dd' macro, if any - _res="$(catz "$1" | sed -e '/'"${_dot}"'Dd /p -d')"; - if obj _res is_not_empty; then # BSD doc style - # get the text between the first and the second `.Nd' macro, by - # - delete up to first .Nd; - # - of this, print everything up to next .Nd, and delete the rest; - # - of this, delete the final .Nd line; - catz "$1" | sed -e '1,/'"${_dot}"'Nd/d' \ - | sed -e '1,/'"${_dot}"'Nd/p -d' \ - | sed -e '/'"${_dot}"'Nd/d'; - eval "${return_ok}"; - fi; - echo 'is not a man page.'; - eval "${return_bad}"; -} - - -######################################################################## -# where () -# -# Output path of a program if in $PATH. -# -# Arguments : >=1 (empty allowed) -# more args are ignored, this allows to specify progs with arguments -# Return : `0' if arg1 is a program in $PATH, `1' otherwise. -# -where() -{ - func_check where '>=' 1 "$@"; - local _file; - local _arg; - local p; - _arg="$1"; - if obj _arg is_empty; then - eval "${return_bad}"; - fi; - case "${_arg}" in - /*) - if test -f "${_arg}" && test -x "${_arg}"; then - eval "${return_ok}"; - else - eval "${return_bad}"; - fi; - ;; - esac; - eval set -- "$(path_split "${PATH}")"; - for p in "$@"; do - case "$p" in - */) _file=${p}${_arg}; ;; - *) _file=${p}/${_arg}; ;; - esac; - if test -f "${_file}" && test -x "${_file}"; then - echo -n "${_file}"; - eval "${return_ok}"; - fi; - done; - eval "${return_bad}"; -} - - -######################################################################## -# main -######################################################################## - -# The main area contains the following parts: -# - main_init(): initialize temporary files and set exit trap -# - parse $MANOPT -# - main_parse_args(): argument parsing -# - determine display mode -# - process filespec arguments -# - setup X resources -# - do the displaying - -# These parts are implemented as functions, being defined below in the -# sequence they are called in the main() function. - - -####################################################################### -# main_init () -# -# set exit trap and create temporary files -# -# Globals: $_TMP_CAT, $_TMP_STDIN -# -landmark '13: main_init()'; -main_init() -{ - func_check main_init = 0 "$@"; - # call clean_up() on any signal - trap_set clean_up; - - # determine temporary directory - umask 000; - _TMP_DIR=''; - for d in "${GROFF_TMPDIR}" "${TMPDIR}" "${TMP}" "${TEMP}" \ - "${TEMPDIR}" "${HOME}"'/tmp' '/tmp' "${HOME}" '.'; - do - if is_not_empty "$d"; then - if obj d is_dir && obj d is_writable; then - _TMP_DIR="${d}/${_PROGRAM_NAME}${_PROCESS_ID}"; - if obj _TMP_DIR is_dir; then - rm -f "${_TMP_DIR}"/*; - break; - else - mkdir "${_TMP_DIR}"; - if obj _TMP_DIR is_not_dir; then - _TMP_DIR=''; - continue; - fi; - break; - fi; - fi; - if obj _TMP_DIR is_not_writable; then - _TMP_DIR=''; - continue; - fi; - fi; - done; - unset d; - if obj _TMP_DIR is_empty; then - error "Couldn't create a directory for storing temporary files."; - fi; - - _TMP_CAT="$(tmp_create groffer_cat)"; - _TMP_STDIN="$(tmp_create groffer_input)"; - - # groffer configuration files - for f in ${_CONFFILES}; do - if obj f is_file; then - echo '_groffer_opt=""' >>${_TMP_CAT}; - # collect the lines starting with a minus - cat "$f" | sed -e \ - '/^[ ]*\(-.*\)$/s//_groffer_opt="${_groffer_opt} \1"'/ \ - >>${_TMP_CAT}; - # prepend the collected information to $GROFFER_OPT - echo 'GROFFER_OPT="${_groffer_opt} ${GROFFER_OPT}"' >>${_TMP_CAT}; - fi; - done; - . "${_TMP_CAT}"; - _TMP_CAT="$(tmp_create groffer_cat)"; - - eval "${return_ok}"; -} # main_init() - - -######################################################################## -# main_parse_MANOPT () -# -# Parse $MANOPT to retrieve man options, but only if it is a non-empty -# string; found man arguments can be overwritten by the command line. -# -# Globals: -# in: $MANOPT, $_OPTS_MANOPT_* -# out: $_MANOPT_* -# in/out: $GROFFER_OPT -# -landmark '14: main_parse_MANOPT()'; -main_parse_MANOPT() -{ - func_check main_parse_MANOPT = 0 "$@"; - local _opt; - local _list; - _list=''; - if obj MANOPT is_not_empty; then - MANOPT="$(echo -n "${MANOPT}" | \ - sed -e 's/^'"${_SPACE}${_SPACE}"'*//')"; - fi; - if obj MANOPT is_empty; then - eval "${return_ok}"; - fi; - # add arguments in $MANOPT by mapping them to groffer options - eval set -- "$(list_from_cmdline \ - _OPTS_MANOPT_SHORT_NA _OPTS_MANOPT_SHORT_ARG \ - _OPTS_MANOPT_LONG_NA _OPTS_MANOPT_LONG_ARG \ - "${MANOPT}")"; - until test "$#" -le 0 || is_equal "$1" '--'; do - _opt="$1"; - shift; - case "${_opt}" in - -7|--ascii) - list_append _list '--ascii'; - ;; - -a|--all) - list_append _list '--all'; - ;; - -c|--catman) - do_nothing; - shift; - ;; - -d|--debug) - list_append _list '--debug'; - ;; - -D|--default) - # undo all man options so far - _list=''; - ;; - -e|--extension) - list_append _list '--extension'; - shift; - ;; - -f|--whatis) - list_append _list '--whatis'; - shift; - ;; - -h|--help) - do_nothing; - shift; - ;; - -k|--apropos) - # groffer's --apropos takes an argument, but man's does not, so - do_nothing; - shift; - ;; - -l|--local-file) - list_append _list '--local-file'; - ;; - -L|--locale) - list_append _list '--locale' "$1"; - shift; - ;; - -m|--systems) - list_append _list '--systems' "$1"; - shift; - ;; - -M|--manpath) - list_append _list '--manpath' "$1"; - shift; - ;; - -p|--preprocessor) - do_nothing; - shift; - ;; - -P|--pager|--tty-viewer) - list_append _list '--pager' "$1"; - shift; - ;; - -r|--prompt) - do_nothing; - shift; - ;; - -S|--sections) - list_append _list '--sections' "$1"; - shift; - ;; - -t|--troff) - do_nothing; - shift; - ;; - -T|--device) - list_append _list '-T' "$1"; - shift; - ;; - -u|--update) - do_nothing; - shift; - ;; - -V|--version) - do_nothing; - ;; - -w|--where|--location) - list_append _list '--location'; - ;; - -Z|--ditroff) - list_append _list '-Z' "$1"; - shift; - ;; - # ignore all other options - esac; - done; - # append the 2 lists in $_list and $GROFFER_OPT to $GROFFER_OPT - if obj GROFFER_OPT is_empty; then - GROFFER_OPT="${_list}"; - elif obj _list is_not_empty; then - GROFFER_OPT="${_list} ${GROFFER_OPT}"; - fi; - eval "${return_ok}"; -} # main_parse_MANOPT() - - -######################################################################## -# main_parse_args (*) -# -# Parse arguments; process options and filespec parameters -# -# Arguments: pass the command line arguments unaltered. -# Globals: -# in: $_OPTS_* -# out: $_OPT_*, $_ADDOPTS, $_FILEARGS -# -landmark '15: main_parse_args()'; -main_parse_args() -{ - func_check main_parse_args '>=' 0 "$@"; - local _arg; - local _code; - local _dpi; - local _longopt; - local _mode; - local _opt; - local _optchar; - local _optarg; - local _opts; - local _string; - - eval set -- "${GROFFER_OPT}" '"$@"'; - - eval set -- "$(list_from_cmdline \ - _OPTS_CMDLINE_SHORT_NA _OPTS_CMDLINE_SHORT_ARG \ - _OPTS_CMDLINE_LONG_NA _OPTS_CMDLINE_LONG_ARG \ - "$@")"; - -# By the call of `eval', unnecessary quoting was removed. So the -# positional shell parameters ($1, $2, ...) are now guaranteed to -# represent an option or an argument to the previous option, if any; -# then a `--' argument for separating options and -# parameters; followed by the filespec parameters if any. - -# Note, the existence of arguments to options has already been checked. -# So a check for `$#' or `--' should not be done for arguments. - - until test "$#" -le 0 || is_equal "$1" '--'; do - _opt="$1"; # $_opt is fed into the option handler - shift; - case "${_opt}" in - -h|--help) - usage; - leave; - ;; - -Q|--source) # output source code (`Quellcode'). - _OPT_MODE='source'; - ;; - -T|--device|--troff-device) # device; arg - _OPT_DEVICE="$1"; - _check_device_with_mode; - shift; - ;; - -v|--version) - version; - leave; - ;; - -V) - _OPT_V='yes'; - ;; - -Z|--ditroff|--intermediate-output) # groff intermediate output - _OPT_Z='yes'; - ;; - -X|--X|--x) - _OPT_MODE=x; - ;; - -?) - # delete leading `-' - _optchar="$(echo -n "${_opt}" | sed -e 's/^.//')"; - if list_has _OPTS_GROFF_SHORT_NA "${_optchar}"; - then - list_append _ADDOPTS_GROFF "${_opt}"; - elif list_has _OPTS_GROFF_SHORT_ARG "${_optchar}"; - then - list_append _ADDOPTS_GROFF "${_opt}" "$1"; - shift; - else - error "Unknown option : \`$1'"; - fi; - ;; - --all) - _OPT_ALL="yes"; - ;; - --ascii) - list_append _ADDOPTS_GROFF '-mtty-char'; - if obj _mode is_empty; then - _mode='text'; - fi; - ;; - --apropos) # run `apropos' - apropos_run "$1"; - _code="$?"; - clean_up; - exit "${_code}"; - ;; - --apropos-data) # run `apropos' for data sections - apropos_run "$1" | grep '^[^(]*([457])'; - _code="$?"; - clean_up; - exit "${_code}"; - ;; - --apropos-devel) # run `apropos' for development sections - apropos_run "$1" | grep '^[^(]*([239])'; - _code="$?"; - clean_up; - exit "${_code}"; - ;; - --apropos-progs) # run `apropos' for program sections - apropos_run "$1" | grep '^[^(]*([168])'; - _code="$?"; - clean_up; - exit "${_code}"; - ;; - --auto) # the default automatic mode - _mode=''; - ;; - --bd) # border color for viewers, arg; - _OPT_BD="$1"; - shift; - ;; - --bg|--backgroud) # background color for viewers, arg; - _OPT_BG="$1"; - shift; - ;; - --bw) # border width for viewers, arg; - _OPT_BW="$1"; - shift; - ;; - --default) # reset variables to default - reset; - ;; - --default-modes) # sequence of modes in auto mode; arg - _OPT_DEFAULT_MODES="$1"; - shift; - ;; - --debug) # buggy, only for development - _OPT_DEBUG='yes'; - ;; - --display) # set X display, arg - _OPT_DISPLAY="$1"; - shift; - ;; - --dvi) - _OPT_MODE='dvi'; - ;; - --dvi-viewer) # viewer program for dvi mode; arg - _OPT_VIEWER_DVI="$1"; - shift; - ;; - --extension) # the extension for man pages, arg - _OPT_EXTENSION="$1"; - shift; - ;; - --fg|--foreground) # foreground color for viewers, arg; - _OPT_FG="$1"; - shift; - ;; - --fn|--font) # set font for viewers, arg; - _OPT_FN="$1"; - shift; - ;; - --geometry) # window geometry for viewers, arg; - _OPT_GEOMETRY="$1"; - shift; - ;; - --groff) - _OPT_MODE='groff'; - ;; - --html|--www) # display with web browser - _OPT_MODE=html; - ;; - --html-viewer|--www-viewer) # viewer program for html mode; arg - _OPT_VIEWER_HTML="$1"; - shift; - ;; - --iconic) # start viewers as icons - _OPT_ICONIC='yes'; - ;; - --locale) # set language for man pages, arg - # argument is xx[_territory[.codeset[@modifier]]] (ISO 639,...) - _OPT_LANG="$1"; - shift; - ;; - --local-file) # force local files; same as `--no-man' - _MAN_FORCE='no'; - _MAN_ENABLE='no'; - ;; - --location|--where) # print file locations to stderr - _OPT_LOCATION='yes'; - ;; - --man) # force all file params to be man pages - _MAN_ENABLE='yes'; - _MAN_FORCE='yes'; - ;; - --manpath) # specify search path for man pages, arg - # arg is colon-separated list of directories - _OPT_MANPATH="$1"; - shift; - ;; - --mode) # display mode - _arg="$1"; - shift; - case "${_arg}" in - auto|'') # search mode automatically among default - _mode=''; - ;; - groff) # pass input to plain groff - _mode='groff'; - ;; - html|www) # display with a web browser - _mode='html'; - ;; - dvi) # display with xdvi viewer - _mode='dvi'; - ;; - pdf) # display with PDF viewer - _mode='pdf'; - ;; - ps) # display with Postscript viewer - _mode='ps'; - ;; - text) # output on terminal - _mode='text'; - ;; - tty) # output on terminal - _mode='tty'; - ;; - X|x) # output on X roff viewer - _mode='x'; - ;; - Q|source) # display source code - _mode="source"; - ;; - *) - error "unknown mode ${_arg}"; - ;; - esac; - _OPT_MODE="${_mode}"; - ;; - --no-location) # disable former call to `--location' - _OPT_LOCATION='yes'; - ;; - --no-man) # disable search for man pages - # the same as --local-file - _MAN_FORCE="no"; - _MAN_ENABLE="no"; - ;; - --pager) # set paging program for tty mode, arg - _OPT_PAGER="$1"; - shift; - ;; - --pdf) - _OPT_MODE='pdf'; - ;; - --pdf-viewer) # viewer program for ps mode; arg - _OPT_VIEWER_PDF="$1"; - shift; - ;; - --ps) - _OPT_MODE='ps'; - ;; - --ps-viewer) # viewer program for ps mode; arg - _OPT_VIEWER_PS="$1"; - shift; - ;; - --resolution) # set resolution for X devices, arg - _arg="$1"; - shift; - case "${_arg}" in - 75|75dpi) - _dpi=75; - ;; - 100|100dpi) - _dpi=100; - ;; - *) - error "only resoutions of 75 or 100 dpi are supported"; - ;; - esac; - _OPT_RESOLUTION="${_dpi}"; - ;; - --rv) - _OPT_RV='yes'; - ;; - --sections) # specify sections for man pages, arg - # arg is colon-separated list of section names - _OPT_SECTIONS="$1"; - shift; - ;; - --shell) - shift; - ;; - --systems) # man pages for different OS's, arg - # argument is a comma-separated list - _OPT_SYSTEMS="$1"; - shift; - ;; - --text) # text mode without pager - _OPT_MODE=text; - ;; - --title) # title for X viewers; arg - _OPT_TITLE="$1"; - shift; - ;; - --tty) # tty mode, text with pager - _OPT_MODE=tty; - ;; - --text-device|--tty-device) # device for tty mode; arg - _OPT_TEXT_DEVICE="$1"; - shift; - ;; - --whatis) - _OPT_WHATIS='yes'; - ;; - --xrm) # pass X resource string, arg; - list_append _OPT_XRM "$1"; - shift; - ;; - --x-viewer|--X-viewer) # viewer program for x mode; arg - _OPT_VIEWER_X="$1"; - shift; - ;; - *) - error 'error on argument parsing : '"\`$*'"; - ;; - esac; - done; - shift; # remove `--' argument - - if obj _DEBUG is_not_yes; then - if obj _OPT_DEBUG is_yes; then - _DEBUG='yes'; - fi; - fi; - - # Remaining arguments are file names (filespecs). - # Save them to list $_FILEARGS - if is_equal "$#" 0; then # use "-" for standard input - set -- '-'; - fi; - _FILEARGS=''; - list_append _FILEARGS "$@"; - if list_has _FILEARGS '-'; then - save_stdin; - fi; - # $_FILEARGS must be retrieved with `eval set -- "$_FILEARGS"' - eval "${return_ok}"; -} # main_parse_args() - -# Called from main_parse_args() because double `case' is not possible. -# Globals: $_OPT_DEVICE, $_OPT_MODE -_check_device_with_mode() -{ - func_check _check_device_with_mode = 0 "$@"; - case "${_OPT_DEVICE}" in - dvi) - _OPT_MODE=dvi; - eval "${return_ok}"; - ;; - html) - _OPT_MODE=html; - eval "${return_ok}"; - ;; - lbp|lj4) - _OPT_MODE=groff; - eval "${return_ok}"; - ;; - ps) - _OPT_MODE=ps; - eval "${return_ok}"; - ;; - ascii|cp1047|latin1|utf8) - if obj _OPT_MODE is_not_equal text; then - _OPT_MODE=tty; # default text mode - fi; - eval "${return_ok}"; - ;; - X*) - _OPT_MODE=x; - eval "${return_ok}"; - ;; - *) # unknown device, go to groff mode - _OPT_MODE=groff; - eval "${return_ok}"; - ;; - esac; - eval "${return_error}"; -} - - -######################################################################## -# main_set_mode () -# -# Determine the display mode. -# -# Globals: -# in: $DISPLAY, $_OPT_MODE, $_OPT_DEVICE -# out: $_DISPLAY_MODE -# - -# _get_first_prog () -# -# Retrieve first argument that represents an existing program in $PATH. -# Local function for main_set_mode(). -# -# Arguments: 1; a comma-separated list of commands (with options), -# like $_VIEWER_*. -# -# Return : `1' if none found, `0' if found. -# Output : the argument that succeded. -# -landmark '16: main_set_mode()'; -main_set_mode() -{ - func_check main_set_mode = 0 "$@"; - local m; - local _modes; - local _viewer; - local _viewers; - - # handle apropos - if obj _OPT_APROPOS is_not_empty; then - apropos "${_OPT_APROPOS}"; - _code="$?"; - clean_up; - exit "${_code}"; - fi; - if obj _OPT_APROPOS_DATA is_not_empty; then - apropos "$@" | grep '^[^(]*([457])'; - _code="$?"; - clean_up; - exit "${_code}"; - fi; - if obj _OPT_APROPOS_DEVEL is_not_empty; then - apropos "$@" | grep '^[^(]*([239])'; - _code="$?"; - clean_up; - exit "${_code}"; - fi; - if obj _OPT_APROPOS_PROGS is_not_empty; then - apropos "$@" | grep '^[^(]*([168])'; - _code="$?"; - clean_up; - exit "${_code}"; - fi; - - # set display - if obj _OPT_DISPLAY is_not_empty; then - DISPLAY="${_OPT_DISPLAY}"; - fi; - - if obj _OPT_V is_yes; then - _DISPLAY_MODE='groff'; - list_append _ADDOPTS_GROFF '-V'; - fi; - if obj _OPT_Z is_yes; then - _DISPLAY_MODE='groff'; - list_append _ADDOPTS_GROFF '-Z'; - fi; - if obj _OPT_MODE is_equal 'groff'; then - _DISPLAY_MODE='groff'; - fi; - if obj _DISPLAY_MODE is_equal 'groff'; then - eval "${return_ok}"; - fi; - - if obj _OPT_MODE is_equal 'source'; then - _DISPLAY_MODE='source'; - eval "${return_ok}"; - fi; - - case "${_OPT_MODE}" in - '') # automatic mode - case "${_OPT_DEVICE}" in - X*) - if obj DISPLAY is_empty; then - error "no X display found for device ${_OPT_DEVICE}"; - fi; - _DISPLAY_MODE='x'; - eval "${return_ok}"; - ;; - ascii|cp1047|latin1|utf8) - if obj _DISPLAY_MODE is_not_equal 'text'; then - _DISPLAY_MODE='tty'; - fi; - eval "${return_ok}"; - ;; - esac; - if obj DISPLAY is_empty; then - _DISPLAY_MODE='tty'; - eval "${return_ok}"; - fi; - - if obj _OPT_DEFAULT_MODES is_empty; then - _modes="${_DEFAULT_MODES}"; - else - _modes="${_OPT_DEFAULT_MODES}"; - fi; - ;; - text) - _DISPLAY_MODE='text'; - eval "${return_ok}"; - ;; - tty) - _DISPLAY_MODE='tty'; - eval "${return_ok}"; - ;; - *) # display mode was given - if obj DISPLAY is_empty; then - error "you must be in X Window for ${_OPT_MODE} mode."; - fi; - _modes="${_OPT_MODE}"; - ;; - esac; - - # only viewer modes are left - eval set -- "$(list_from_split "${_modes}" ',')"; - while test "$#" -gt 0; do - m="$1"; - shift; - case "$m" in - text) - _DISPLAY_MODE='text'; - eval "${return_ok}"; - ;; - tty) - _DISPLAY_MODE='tty'; - eval "${return_ok}"; - ;; - x) - if obj _OPT_VIEWER_X is_not_empty; then - _viewers="${_OPT_VIEWER_X}"; - else - _viewers="${_VIEWER_X}"; - fi; - _viewer="$(_get_first_prog "${_viewers}")"; - if is_not_equal "$?" 0; then - continue; - fi; - _DISPLAY_PROG="${_viewer}"; - _DISPLAY_MODE='x'; - eval "${return_ok}"; - ;; - dvi) - if obj _OPT_VIEWER_DVI is_not_empty; then - _viewers="${_OPT_VIEWER_DVI}"; - else - _viewers="${_VIEWER_DVI}"; - fi; - _viewer="$(_get_first_prog "${_viewers}")"; - if is_not_equal "$?" 0; then - continue; - fi; - _DISPLAY_PROG="${_viewer}"; - _DISPLAY_MODE="dvi"; - eval "${return_ok}"; - ;; - pdf) - if obj _OPT_VIEWER_PDF is_not_empty; then - _viewers="${_OPT_VIEWER_PDF}"; - else - _viewers="${_VIEWER_PDF}"; - fi; - _viewer="$(_get_first_prog "${_viewers}")"; - if is_not_equal "$?" 0; then - continue; - fi; - _DISPLAY_PROG="${_viewer}"; - _DISPLAY_MODE="pdf"; - eval "${return_ok}"; - ;; - ps) - if obj _OPT_VIEWER_PS is_not_empty; then - _viewers="${_OPT_VIEWER_PS}"; - else - _viewers="${_VIEWER_PS}"; - fi; - _viewer="$(_get_first_prog "${_viewers}")"; - if is_not_equal "$?" 0; then - continue; - fi; - _DISPLAY_PROG="${_viewer}"; - _DISPLAY_MODE="ps"; - eval "${return_ok}"; - ;; - html) - if obj _OPT_VIEWER_HTML is_not_empty; then - _viewers="${_OPT_VIEWER_HTML}"; - else - _viewers="${_VIEWER_HTML}"; - fi; - _viewer="$(_get_first_prog "${_viewers}")"; - if is_not_equal "$?" 0; then - continue; - fi; - _DISPLAY_PROG="${_viewer}"; - _DISPLAY_MODE=html; - eval "${return_ok}"; - ;; - esac; - done; - error "no suitable display mode found."; -} - -_get_first_prog() -{ - local i; - if is_equal "$#" 0; then - error "_get_first_prog() needs 1 argument."; - fi; - if is_empty "$1"; then - return "${_BAD}"; - fi; - eval set -- "$(list_from_split "$1" ',')"; - for i in "$@"; do - if obj i is_empty; then - continue; - fi; - if is_prog "$(get_first_essential $i)"; then - echo -n "$i"; - return "${_GOOD}"; - fi; - done; - return "${_BAD}"; -} # main_set_mode() - - -####################################################################### -# main_do_fileargs () -# -# Process filespec arguments in $_FILEARGS. -# -# Globals: -# in: $_FILEARGS (process with `eval set -- "$_FILEARGS"') -# -landmark '17: main_do_fileargs()'; -main_do_fileargs() -{ - func_check main_do_fileargs = 0 "$@"; - local _exitcode; - local _filespec; - local _name; - _exitcode="${_BAD}"; - eval set -- "${_FILEARGS}"; - unset _FILEARGS; - # temporary storage of all input to $_TMP_CAT - while test "$#" -ge 2; do - # test for `s name' arguments, with `s' a 1-char standard section - _filespec="$1"; - shift; - case "${_filespec}" in - '') - continue; - ;; - '-') - if register_file '-'; then - _exitcode="${_GOOD}"; - fi; - continue; - ;; - ?) - if list_has_not _MAN_AUTO_SEC "${_filespec}"; then - if do_filearg "${_filespec}"; then - _exitcode="${_GOOD}"; - fi; - continue; - fi; - _name="$1"; - case "${_name}" in - */*|man:*|*\(*\)|*."${_filespec}") - if do_filearg "${_filespec}"; then - _exitcode="${_GOOD}"; - fi; - continue; - ;; - esac; - if do_filearg "man:${_name}(${_filespec})"; then - _exitcode="${_GOOD}"; - shift; - continue; - else - if do_filearg "${_filespec}"; then - _exitcode="${_GOOD}"; - fi; - continue; - fi; - ;; - *) - if do_filearg "${_filespec}"; then - _exitcode="${_GOOD}"; - fi; - continue; - ;; - esac; - done; # end of `s name' test - while test "$#" -gt 0; do - _filespec="$1"; - shift; - if do_filearg "${_filespec}"; then - _exitcode="${_GOOD}"; - fi; - done; - rm -f "${_TMP_STDIN}"; - if is_equal "${_exitcode}" "${_BAD}"; then - eval "${return_bad}"; - fi; - eval "${return_ok}"; -} # main_do_fileargs() - - -######################################################################## -# main_set_resources () -# -# Determine options for setting X resources with $_DISPLAY_PROG. -# -# Globals: $_DISPLAY_PROG, $_OUTPUT_FILE_NAME -# -landmark '18: main_set_resources()'; -main_set_resources() -{ - func_check main_set_resources = 0 "$@"; - local _prog; # viewer program - local _rl; # resource list - local n; - _title="$(get_first_essential \ - "${_OPT_TITLE}" "${_REGISTERED_TITLE}")"; - _OUTPUT_FILE_NAME=''; - set -- ${_title}; - until is_equal "$#" 0; do - n="$1"; - case "$n" in - '') - continue; - ;; - ,*) - n="$(echo -n "$1" | sed -e '/^,,*/s///')"; - ;; - esac - if obj n is_empty; then - continue; - fi; - if obj _OUTPUT_FILE_NAME is_not_empty; then - _OUTPUT_FILE_NAME="${_OUTPUT_FILE_NAME},"; - fi; - _OUTPUT_FILE_NAME="${_OUTPUT_FILE_NAME}$n"; - shift; - done; - case "${_OUTPUT_FILE_NAME}" in - '') - _OUTPUT_FILE_NAME='-'; - ;; - ,*) - error "$_OUTPUT_FILE_NAME starts with a comma."; - ;; - esac; - _OUTPUT_FILE_NAME="${_TMP_DIR}/${_OUTPUT_FILE_NAME}"; - - if obj _DISPLAY_PROG is_empty; then # for example, for groff mode - _DISPLAY_ARGS=''; - eval "${return_ok}"; - fi; - - set -- ${_DISPLAY_PROG}; - _prog="$(base_name "$1")"; - _rl=''; - if obj _OPT_BD is_not_empty; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - list_append _rl '-bd' "${_OPT_BD}"; - ;; - esac; - fi; - if obj _OPT_BG is_not_empty; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - list_append _rl '-bg' "${_OPT_BG}"; - ;; - xpdf) - list_append _rl '-papercolor' "${_OPT_BG}"; - ;; - esac; - fi; - if obj _OPT_BW is_not_empty; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - _list_append _rl '-bw' "${_OPT_BW}"; - ;; - esac; - fi; - if obj _OPT_FG is_not_empty; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - list_append _rl '-fg' "${_OPT_FG}"; - ;; - esac; - fi; - if is_not_empty "${_OPT_FN}"; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - list_append _rl '-fn' "${_OPT_FN}"; - ;; - esac; - fi; - if is_not_empty "${_OPT_GEOMETRY}"; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi|xpdf) - list_append _rl '-geometry' "${_OPT_GEOMETRY}"; - ;; - esac; - fi; - if is_empty "${_OPT_RESOLUTION}"; then - _OPT_RESOLUTION="${_DEFAULT_RESOLUTION}"; - case "${_prog}" in - gxditview|xditview) - list_append _rl '-resolution' "${_DEFAULT_RESOLUTION}"; - ;; - xpdf) - case "${_DEFAULT_RESOLUTION}" in - 75) - # 72dpi is '100' - list_append _rl '-z' '104'; - ;; - 100) - list_append _rl '-z' '139'; - ;; - esac; - ;; - esac; - else - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - list_append _rl '-resolution' "${_OPT_RESOLUTION}"; - ;; - xpdf) - case "${_OPT_RESOLUTION}" in - 75) - list_append _rl '-z' '104'; - # '100' corresponds to 72dpi - ;; - 100) - list_append _rl '-z' '139'; - ;; - esac; - ;; - esac; - fi; - if is_yes "${_OPT_ICONIC}"; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - list_append _rl '-iconic'; - ;; - esac; - fi; - if is_yes "${_OPT_RV}"; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - list_append _rl '-rv'; - ;; - esac; - fi; - if is_not_empty "${_OPT_XRM}"; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi|xpdf) - eval set -- "{$_OPT_XRM}"; - for i in "$@"; do - list_append _rl '-xrm' "$i"; - done; - ;; - esac; - fi; - if is_not_empty "${_title}"; then - case "${_prog}" in - gxditview|xditview) - list_append _rl '-title' "${_title}"; - ;; - esac; - fi; - _DISPLAY_ARGS="${_rl}"; - - eval "${return_ok}"; -} # main_set_resources - - -######################################################################## -# main_display () -# -# Do the actual display of the whole thing. -# -# Globals: -# in: $_DISPLAY_MODE, $_OPT_DEVICE, -# $_ADDOPTS_GROFF, $_ADDOPTS_POST, $_ADDOPTS_X, -# $_REGISTERED_TITLE, $_TMP_CAT, -# $_OPT_PAGER $PAGER $_MANOPT_PAGER -# -landmark '19: main_display()'; -main_display() -{ - func_check main_display = 0 "$@"; - local p; - local _addopts; - local _device; - local _groggy; - local _modefile; - local _options; - local _pager; - local _title; - export _addopts; - export _groggy; - export _modefile; - - if obj _TMP_CAT is_non_empty_file; then - _modefile="${_OUTPUT_FILE_NAME}"; - else - clean_up; - eval "${return_ok}"; - fi; - case "${_DISPLAY_MODE}" in - groff) - _ADDOPTS_GROFF="${_ADDOPTS_GROFF} ${_ADDOPTS_POST}"; - if obj _OPT_DEVICE is_not_empty; then - _ADDOPTS_GROFF="${_ADDOPTS_GROFF} -T${_OPT_DEVICE}"; - fi; - _groggy="$(tmp_cat | eval grog "${_options}")"; - trap_clean; - # start a new shell program to get another process ID. - sh -c ' - set -e; - test -f "${_modefile}" && rm -f "${_modefile}"; - mv "${_TMP_CAT}" "${_modefile}"; - cat "${_modefile}" | \ - ( - clean_up() - { - if test -d "${_TMP_DIR}"; then - rm -f "${_TMP_DIR}"/* || true; - rmdir "${_TMP_DIR}"; - fi; - } - trap clean_up 0 2>/dev/null || true; - eval "${_groggy}" "${_ADDOPTS_GROFF}"; - ) &' - ;; - text|tty) - case "${_OPT_DEVICE}" in - '') - _device="$(get_first_essential \ - "${_OPT_TEXT_DEVICE}" "${_DEFAULT_TTY_DEVICE}")"; - ;; - ascii|cp1047|latin1|utf8) - _device="${_OPT_DEVICE}"; - ;; - *) - warning \ - "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; - ;; - esac; - _addopts="${_ADDOPTS_GROFF} ${_ADDOPTS_POST}"; - _groggy="$(tmp_cat | grog -T${_device})"; - if obj _DISPLAY_MODE is_equal 'text'; then - tmp_cat | eval "${_groggy}" "${_addopts}"; - else - _pager=''; - for p in "${_OPT_PAGER}" "${PAGER}" "${_MANOPT_PAGER}" \ - 'less -r -R' 'more' 'pager' 'cat'; do - if is_prog $p; then # no "" for is_prog() allows args for $p - _pager="$p"; - break; - fi; - done; - if obj _pager is_empty; then - error 'no pager program found for tty mode'; - fi; - tmp_cat | eval "${_groggy}" "${_addopts}" | \ - eval "${_pager}"; - fi; - clean_up; - ;; - - #### viewer modes - - dvi) - case "${_OPT_DEVICE}" in - ''|dvi) do_nothing; ;; - *) - warning \ - "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; - ;; - esac; - _groggy="$(tmp_cat | grog -Tdvi)"; - _do_display; - ;; - html) - case "${_OPT_DEVICE}" in - ''|html) do_nothing; ;; - *) - warning \ - "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; - ;; - esac; - _modefile="${_modefile}".html - _groggy="$(tmp_cat | grog -Thtml)"; - _do_display; - ;; - pdf) - case "${_OPT_DEVICE}" in - ''|ps) - do_nothing; - ;; - *) - warning \ - "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; - ;; - esac; - _modefile="${_modefile}" - _groggy="$(tmp_cat | grog -Tps)"; - trap_clean; - # start a new shell program to get another process ID. - sh -c ' - set -e; - _psfile="${_modefile}.ps"; - _modefile="${_modefile}.pdf"; - test -f "${_psfile}" && rm -f "${_psfile}"; - test -f "${_modefile}" && rm -f "${_modefile}"; - cat "${_TMP_CAT}" | \ - eval "${_groggy}" "${_ADDOPTS_GROFF}" > "${_psfile}"; - gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \ - -sOutputFile="${_modefile}" -c save pop -f "${_psfile}"; - test -f "${_psfile}" && rm -f "${_psfile}"; - test -f "${_TMP_CAT}" && rm -f "${_TMP_CAT}"; - ( - clean_up() { - rm -f "${_modefile}"; - if test -d "${_TMP_DIR}"; then - rm -f "${_TMP_DIR}"/* || true; - rmdir "${_TMP_DIR}"; - fi; - } - trap clean_up 0 2>/dev/null || true; - eval "${_DISPLAY_PROG}" ${_DISPLAY_ARGS} "${_modefile}"; - ) &' - ;; - ps) - case "${_OPT_DEVICE}" in - ''|ps) - do_nothing; - ;; - *) - warning \ - "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; - ;; - esac; - _groggy="$(tmp_cat | grog -Tps)"; - _do_display; - ;; - source) - tmp_cat; - clean_up; - ;; - x) - case "${_OPT_DEVICE}" in - '') - _groggy="$(tmp_cat | grog -Z)"; - ;; - X*|ps) - _groggy="$(tmp_cat | grog -T"${_OPT_DEVICE}" -Z)"; - ;; - *) - warning \ - "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; - _groggy="$(tmp_cat | grog -Z)"; - ;; - esac; - _do_display; - ;; - *) - error "unknown mode \`${_DISPLAY_MODE}'"; - ;; - esac; - eval "${return_ok}"; -} # main_display() - -_do_display() -{ - func_check _do_display = 0 "$@"; - trap_clean; - # start a new shell program for another process ID and better - # cleaning-up of the temporary files. - sh -c ' - set -e; - test -f "${_modefile}" && rm -f "${_modefile}"; - cat "${_TMP_CAT}" | \ - eval "${_groggy}" "${_ADDOPTS_GROFF}" > "${_modefile}"; - rm -f "${_TMP_CAT}"; - ( - clean_up() { - if test -d "${_TMP_DIR}"; then - rm -f "${_TMP_DIR}"/* || true; - rmdir "${_TMP_DIR}"; - fi; - } - trap clean_up 0 2>/dev/null || true; - eval "${_DISPLAY_PROG}" ${_DISPLAY_ARGS} "${_modefile}"; - ) &' -} - - -######################################################################## -# main (*) -# -# The main function for groffer. -# -# Arguments: -# -main() -{ - func_check main '>=' 0 "$@"; - # Do not change the sequence of the following functions! - main_init; - main_parse_MANOPT; - main_parse_args "$@"; - main_set_mode; - main_do_fileargs; - main_set_resources; - main_display; - eval "${return_ok}"; -} - -landmark '20: end of function definitions'; - -######################################################################## - -main "$@"; diff --git a/contrib/groff-1.19/contrib/groffer/groffer2.sh b/contrib/groff-1.19/contrib/groffer/groffer2.sh new file mode 100644 index 0000000000..60ca91130f --- /dev/null +++ b/contrib/groff-1.19/contrib/groffer/groffer2.sh @@ -0,0 +1,5854 @@ +#! /bin/sh + +# groffer - display groff files + +# Source file position: /contrib/groffer/groffer2.sh +# Installed position: /lib/groff/groffer/groffer2.sh + +# This file should not be run independently. It is called by +# `groffer.sh' in the source or by the installed `groffer' program. + +# Copyright (C) 2001,2002,2003,2004,2005 +# Free Software Foundation, Inc. +# Written by Bernd Warken + +# Last update: 22 August 2005 + +# This file is part of `groffer', which 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 files COPYING and LICENSE in the top +# directory of the `groff' source. If not, write to the Free Software +# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, +# USA. + + +######################################################################## +# Test of rudimentary shell functionality +######################################################################## + + +######################################################################## +# Test of `unset' +# +export _UNSET; +export _foo; +_foo=bar; +_res="$(unset _foo 2>&1)"; +if unset _foo >${_NULL_DEV} 2>&1 && \ + test _"${_res}"_ = __ && test _"${_foo}"_ = __ +then + _UNSET='unset'; + eval "${_UNSET}" _foo; + eval "${_UNSET}" _res; +else + _UNSET=':'; +fi; + + +######################################################################## +# Test of `test'. +# +if test a = a && test a != b && test -f "${_GROFFER_SH}" +then + :; +else + echo '"test" did not work.' >&2; + exit "${_ERROR}"; +fi; + + +######################################################################## +# Test of `echo' and the `$()' construct. +# +if echo '' >${_NULL_DEV} +then + :; +else + echo '"echo" did not work.' >&2; + exit "${_ERROR}"; +fi; +if test _"$(t1="$(echo te)" && + t2="$(echo '')" && + t3="$(echo 'st')" && + echo "${t1}${t2}${t3}")"_ \ + != _test_ +then + echo 'The "$()" construct did not work' >&2; + exit "${_ERROR}"; +fi; + + +######################################################################## +# Test of sed program; test in groffer.sh is not valid here. +# +if test _"$(echo red | sed -e 's/r/s/')"_ != _sed_ +then + echo 'The sed program did not work.' >&2; + exit "${_ERROR}"; +fi; + + +######################################################################## +# Test of function definitions. +# +_t_e_s_t_f_u_n_c_() +{ + return 0; +} + +if _t_e_s_t_f_u_n_c_ 2>${_NULL_DEV} +then + :; +else + echo 'Shell '"${_SHELL}"' does not support function definitions.' >&2; + exit "${_ERROR}"; +fi; + + +######################################################################## +# debug - diagnostic messages +######################################################################## + +export _DEBUG_STACKS; +_DEBUG_STACKS='no'; # disable stack output in each function +#_DEBUG_STACKS='yes'; # enable stack output in each function + +export _DEBUG_LM; +_DEBUG_LM='no'; # disable landmark messages +#_DEBUG_LM='yes'; # enable landmark messages + +export _DEBUG_KEEP_FILES; +_DEBUG_KEEP_FILES='no' # disable file keeping in temporary dir +#_DEBUG_KEEP_FILES='yes' # enable file keeping in temporary dir + +export _DEBUG_PRINT_PARAMS; +_DEBUG_PRINT_PARAMS='no'; # disable printing of all parameters +#_DEBUG_PRINT_PARAMS='yes'; # enable printing of all parameters + +export _DEBUG_PRINT_SHELL; +_DEBUG_PRINT_SHELL='no'; # disable printing of the shell name +#_DEBUG_PRINT_SHELL='yes'; # enable printing of the shell name + +export _DEBUG_PRINT_TMPDIR; +_DEBUG_PRINT_TMPDIR='no'; # disable printing of the temporary dir +#_DEBUG_PRINT_TMPDIR='yes'; # enable printing of the temporary dir + +export _DEBUG_USER_WITH_STACK; +_DEBUG_USER_WITH_STACK='no'; # disable stack dump in error_user() +#_DEBUG_USER_WITH_STACK='yes'; # enable stack dump in error_user() + +# determine all --debug* options +case " $*" in +*\ --debug*) + case " $* " in + *' --debug '*) + # _DEBUG_STACKS='yes'; + # _DEBUG_LM='yes'; + _DEBUG_KEEP_FILES='yes'; + _DEBUG_PRINT_PARAMS='yes'; + _DEBUG_PRINT_SHELL='yes'; + _DEBUG_PRINT_TMPDIR='yes'; + _DEBUG_USER_WITH_STACK='yes'; + ;; + esac; + d=' --debug-all --debug-keep --debug-lm --debug-params --debug-shell '\ +'--debug-stacks --debug-tmpdir --debug-user '; + for i + do + case "$i" in + --debug-s) + echo 'The abbreviation --debug-s has multiple options: '\ +'--debug-shell and --debug-stacks.' >&2 + exit "${_ERROR}"; + ;; + esac; + case "$d" in + *\ ${i}*) + # extract whole word of abbreviation $i + s="$(cat <&2; +fi; + +if test _"${_DEBUG_PRINT_SHELL}"_ = _yes_ +then + if test _"${_SHELL}"_ = __ + then + if test _"${POSIXLY_CORRECT}"_ = _y_ + then + echo 'shell: bash as /bin/sh (none specified)' >&2; + else + echo 'shell: /bin/sh (none specified)' >&2; + fi; + else + echo "shell: ${_SHELL}" >&2; + fi; +fi; + + +######################################################################## +# Environment Variables +######################################################################## + +# Environment variables that exist only for this file start with an +# underscore letter. Global variables to this file are written in +# upper case letters, e.g. $_GLOBAL_VARIABLE; temporary variables +# start with an underline and use only lower case letters and +# underlines, e.g. $_local_variable . + +# [A-Z]* system variables, e.g. $MANPATH +# _[A-Z_]* global file variables, e.g. $_MAN_PATH +# _[a-z_]* temporary variables, e.g. $_manpath + +# Due to incompatibilities of the `ash' shell, the name of loop +# variables in `for' must be single character +# [a-z] local loop variables, e.g. $i + + +######################################################################## +# read-only variables (global to this file) +######################################################################## + +# function return values; `0' means ok; other values are error codes +export _ALL_EXIT; +export _BAD; +export _GOOD; +export _NO; +export _OK; +export _YES; + +_GOOD='0'; # return ok +_BAD='1'; # return negatively, error code `1' +# $_ERROR was already defined as `7' in groffer.sh. + +_NO="${_BAD}"; +_YES="${_GOOD}"; +_OK="${_GOOD}"; + +# quasi-functions, call with `eval', e.g `eval "${return_ok}"' +export return_ok; +export return_good; +export return_bad; +export return_yes; +export return_no; +export return_error; +export return_var; +return_ok="func_pop; return ${_OK}"; +return_good="func_pop; return ${_GOOD}"; +return_bad="func_pop; return ${_BAD}"; +return_yes="func_pop; return ${_YES}"; +return_no="func_pop; return ${_NO}"; +return_error="func_pop; return ${_ERROR}"; +return_var="func_pop; return"; # add number, e.g. `eval "${return_var} $n' + + +export _DEFAULT_MODES; +_DEFAULT_MODES='x,ps,tty'; +export _DEFAULT_RESOLUTION; +_DEFAULT_RESOLUTION='75'; + +export _DEFAULT_TTY_DEVICE; +_DEFAULT_TTY_DEVICE='latin1'; + +# _VIEWER_* viewer programs for different modes (only X is necessary) +# _VIEWER_* a comma-separated list of viewer programs (with options) +export _VIEWER_DVI; # viewer program for dvi mode +export _VIEWER_HTML_TTY; # viewer program for html mode in tty +export _VIEWER_HTML_X; # viewer program for html mode in X +export _VIEWER_PDF; # viewer program for pdf mode +export _VIEWER_PS; # viewer program for ps mode +export _VIEWER_X; # viewer program for X mode +_VIEWER_DVI='kdvi,xdvi,dvilx'; +_VIEWER_HTML_TTY='lynx'; +_VIEWER_HTML_X='konqueror,mozilla,netscape,galeon,opera,amaya,arena'; +_VIEWER_PDF='kghostview --scale 1.45,ggv,xpdf,acroread,kpdf'; +_VIEWER_PS='kghostview --scale 1.45,ggv,gv,ghostview,gs_x11,gs'; +_VIEWER_X='gxditview,xditview'; + +# Search automatically in standard sections `1' to `8', and in the +# traditional sections `9', `n', and `o'. On many systems, there +# exist even more sections, mostly containing a set of man pages +# special to a specific program package. These aren't searched for +# automatically, but must be specified on the command line. +export _MAN_AUTO_SEC_LIST; +_MAN_AUTO_SEC_LIST="'1' '2' '3' '4' '5' '6' '7' '8' '9' 'n' 'o'"; +export _MAN_AUTO_SEC_CHARS; +_MAN_AUTO_SEC_CHARS='[123456789no]'; + +export _SPACE_SED; +_SPACE_SED='['"${_SP}${_TAB}"']'; + +export _SPACE_CASE; +_SPACE_CASE='[\'"${_SP}"'\'"${_TAB}"']'; + +export _PROCESS_ID; # for shutting down the program +_PROCESS_ID="$$"; + + +############ the command line options of the involved programs +# +# The naming scheme for the options environment names is +# $_OPTS__[_] +# +# : program name GROFFER, GROFF, or CMDLINE (for all +# command line options) +# : LONG (long options) or SHORT (single character options) +# : ARG for options with argument, NA for no argument; +# without _ both the ones with and without arg. +# +# Each option that takes an argument must be specified with a +# trailing : (colon). + +# exports +export _OPTS_GROFFER_SHORT_NA; +export _OPTS_GROFFER_SHORT_ARG; +export _OPTS_GROFFER_LONG_NA; +export _OPTS_GROFFER_LONG_ARG; +export _OPTS_GROFF_SHORT_NA; +export _OPTS_GROFF_SHORT_ARG; +export _OPTS_GROFF_LONG_NA; +export _OPTS_GROFF_LONG_ARG; +export _OPTS_X_SHORT_ARG; +export _OPTS_X_SHORT_NA; +export _OPTS_X_LONG_ARG; +export _OPTS_X_LONG_NA; +export _OPTS_MAN_SHORT_ARG; +export _OPTS_MAN_SHORT_NA; +export _OPTS_MAN_LONG_ARG; +export _OPTS_MAN_LONG_NA; +export _OPTS_MANOPT_SHORT_ARG; +export _OPTS_MANOPT_SHORT_NA; +export _OPTS_MANOPT_LONG_ARG; +export _OPTS_MANOPT_LONG_NA; +export _OPTS_CMDLINE_SHORT_NA; +export _OPTS_CMDLINE_SHORT_ARG; +export _OPTS_CMDLINE_LONG_NA; +export _OPTS_CMDLINE_LONG_ARG; + +###### groffer native options + +_OPTS_GROFFER_SHORT_NA="'h' 'Q' 'v' 'V' 'X' 'Z'"; +_OPTS_GROFFER_SHORT_ARG="'T'"; + +_OPTS_GROFFER_LONG_NA="'auto' \ +'apropos' 'apropos-data' 'apropos-devel' 'apropos-progs' \ +'debug' 'debug-all' 'debug-keep' 'debug-lm' 'debug-params' 'debug-shell' \ +'debug-stacks' 'debug-tmpdir' 'debug-user' 'default' 'do-nothing' 'dvi' \ +'groff' 'help' 'intermediate-output' 'html' 'man' \ +'no-location' 'no-man' 'no-special' 'pdf' 'ps' 'rv' 'source' \ +'text' 'text-device' \ +'tty' 'tty-device' 'version' 'whatis' 'where' 'www' 'x' 'X'"; + +_OPTS_GROFFER_LONG_ARG="\ +'default-modes' 'device' 'dvi-viewer' 'dvi-viewer-tty' 'extension' 'fg' \ +'fn' 'font' 'foreground' 'html-viewer' 'html-viewer-tty' 'mode' \ +'pdf-viewer' 'pdf-viewer-tty' 'print' 'ps-viewer' 'ps-viewer-tty' 'shell' \ +'title' 'tty-viewer' 'tty-viewer-tty' 'www-viewer' 'www-viewer-tty' \ +'x-viewer' 'x-viewer-tty' 'X-viewer' 'X-viewer-tty'"; + +##### groffer options inhereted from groff + +_OPTS_GROFF_SHORT_NA="'a' 'b' 'c' 'C' 'e' 'E' 'g' 'G' 'i' 'l' 'N' 'p' \ +'R' 's' 'S' 't' 'U' 'z'"; +_OPTS_GROFF_SHORT_ARG="'d' 'f' 'F' 'I' 'L' 'm' 'M' 'n' 'o' 'P' 'r' \ +'w' 'W'"; +_OPTS_GROFF_LONG_NA=""; +_OPTS_GROFF_LONG_ARG=""; + +##### groffer options inhereted from the X Window toolkit + +_OPTS_X_SHORT_NA=""; +_OPTS_X_SHORT_ARG=""; + +_OPTS_X_LONG_NA="'iconic' 'rv'"; + +_OPTS_X_LONG_ARG="'background' 'bd' 'bg' 'bordercolor' 'borderwidth' \ +'bw' 'display' 'fg' 'fn' 'font' 'foreground' 'ft' 'geometry' \ +'resolution' 'title' 'xrm'"; + +###### groffer options inherited from man + +_OPTS_MAN_SHORT_NA=""; +_OPTS_MAN_SHORT_ARG=""; + +_OPTS_MAN_LONG_NA="'all' 'ascii' 'catman' 'ditroff' \ +'local-file' 'location' 'troff' 'update'"; + +_OPTS_MAN_LONG_ARG="'locale' 'manpath' \ +'pager' 'preprocessor' 'prompt' 'sections' 'systems' 'troff-device'"; + +###### additional options for parsing $MANOPT only + +_OPTS_MANOPT_SHORT_NA="'7' 'a' 'c' 'd' 'D' 'f' 'h' 'k' 'l' 't' 'u' \ +'V' 'w' 'Z'"; +_OPTS_MANOPT_SHORT_ARG="'e' 'L' 'm' 'M' 'p' 'P' 'r' 'S' 'T'"; + +_OPTS_MANOPT_LONG_NA="${_OPTS_MAN_LONG_NA} \ +'apropos' 'debug' 'default' 'help' 'html' 'ignore-case' 'location-cat' \ +'match-case' 'troff' 'update' 'version' 'whatis' 'where' 'where-cat'"; + +_OPTS_MANOPT_LONG_ARG="${_OPTS_MAN_LONG_NA} \ +'config_file' 'encoding' 'extension' 'locale'"; + +###### collections of command line options + +_OPTS_CMDLINE_SHORT_NA="${_OPTS_GROFFER_SHORT_NA} \ +${_OPTS_GROFF_SHORT_NA} ${_OPTS_X_SHORT_NA} ${_OPTS_MAN_SHORT_NA}"; +_OPTS_CMDLINE_SHORT_ARG="${_OPTS_GROFFER_SHORT_ARG} \ +${_OPTS_GROFF_SHORT_ARG} ${_OPTS_X_SHORT_ARG} ${_OPTS_MAN_SHORT_ARG}"; + +_OPTS_CMDLINE_LONG_NA="${_OPTS_GROFFER_LONG_NA} \ +${_OPTS_GROFF_LONG_NA} ${_OPTS_X_LONG_NA} ${_OPTS_MAN_LONG_NA}"; +_OPTS_CMDLINE_LONG_ARG="${_OPTS_GROFFER_LONG_ARG} \ +${_OPTS_GROFF_LONG_ARG} ${_OPTS_MAN_LONG_ARG} ${_OPTS_X_LONG_ARG}"; + + +######################################################################## +# read-write variables (global to this file) +######################################################################## + +export _ALL_PARAMS; # All options and file name parameters +export _ADDOPTS_GROFF; # Transp. options for groff (`eval'). +export _ADDOPTS_POST; # Transp. options postproc (`eval'). +export _ADDOPTS_X; # Transp. options X postproc (`eval'). +export _APROPOS_PROG; # Program to run apropos. +export _APROPOS_SECTIONS; # Sections for different --apropos-*. +export _DEFAULT_MODES; # Set default modes. +export _DISPLAY_MODE; # Display mode. +export _DISPLAY_PROG; # Viewer program to be used for display. +export _DISPLAY_ARGS; # X resources for the viewer program. +export _FILEARGS; # Stores filespec parameters. +export _FILESPEC_ARG; # Stores the actual filespec parameter. +export _FUNC_STACK; # Store debugging information. +export _REGISTERED_TITLE; # Processed file names. +# _HAS_* from availability tests +export _HAS_COMPRESSION; # `yes' if gzip compression is available +export _HAS_BZIP; # `yes' if bzip2 compression is available +# _MAN_* finally used configuration of man searching +export _MAN_ALL; # search all man pages per filespec +export _MAN_ENABLE; # enable search for man pages +export _MAN_EXT; # extension for man pages +export _MAN_FORCE; # force file parameter to be man pages +export _MAN_IS_SETUP; # setup man variables only once +export _MAN_LANG; # language for man pages +export _MAN_LANG2; # language for man pages +export _MAN_LANG_DONE; # language dirs added to man path +export _MAN_PATH; # search path for man pages +export _MAN_SEC; # sections for man pages; sep. `:' +export _MAN_SEC_DONE; # sections added to man path +export _MAN_SYS; # system names for man pages; sep. `,' +export _MAN_SYS; # system names added to man path +# _MANOPT_* as parsed from $MANOPT +export _MANOPT_ALL; # $MANOPT --all +export _MANOPT_EXTENSION; # $MANOPT --extension +export _MANOPT_LANG; # $MANOPT --locale +export _MANOPT_PATH; # $MANOPT --manpath +export _MANOPT_PAGER; # $MANOPT --pager +export _MANOPT_SEC; # $MANOPT --sections +export _MANOPT_SYS; # $MANOPT --systems +# _OPT_* as parsed from groffer command line +export _OPT_ALL; # display all suitable man pages. +export _OPT_APROPOS; # call `apropos' program. +export _OPT_BD; # set border color in some modes. +export _OPT_BG; # set background color in some modes. +export _OPT_BW; # set border width in some modes. +export _OPT_DEFAULT_MODES; # `,'-list of modes when no mode given. +export _OPT_DEVICE; # device option. +export _OPT_DO_NOTHING; # do nothing in main_display(). +export _OPT_DISPLAY; # set X display. +export _OPT_FG; # set foreground color in some modes. +export _OPT_FN; # set font in some modes. +export _OPT_GEOMETRY; # set size and position of viewer in X. +export _OPT_ICONIC; # -iconic option for X viewers. +export _OPT_LANG; # set language for man pages +export _OPT_LOCATION; # print processed file names to stderr +export _OPT_MODE; # values: X, tty, Q, Z, "" +export _OPT_MANPATH; # manual setting of path for man-pages +export _OPT_PAGER; # specify paging program for tty mode +export _OPT_RESOLUTION; # set X resolution in dpi +export _OPT_RV; # reverse fore- and background colors. +export _OPT_SECTIONS; # sections for man page search +export _OPT_SYSTEMS; # man pages of different OS's +export _OPT_TITLE; # title for gxditview window +export _OPT_TEXT_DEVICE; # set device for tty mode. +export _OPT_V; # groff option -V. +export _OPT_VIEWER_DVI; # viewer program for dvi mode +export _OPT_VIEWER_PDF; # viewer program for pdf mode +export _OPT_VIEWER_PS; # viewer program for ps mode +export _OPT_VIEWER_HTML; # viewer program for html mode +export _OPT_VIEWER_X; # viewer program for x mode +export _OPT_WHATIS; # print the man description +export _OPT_XRM; # specify X resource. +export _OPT_Z; # groff option -Z. +export _OUTPUT_FILE_NAME; # output generated, see main_set_res..() +export _VIEWER_TERMINAL; # viewer options for terminal (--*-viewer-tty) +# _TMP_* temporary directory and files +export _TMP_DIR; # groffer directory for temporary files +export _TMP_CAT; # stores concatenation of everything +export _TMP_STDIN; # stores stdin, if any + +# these variables are preset in section `Preset' after the rudim. test + + +######################################################################## +# Preset and reset of read-write global variables +######################################################################## + + +export _START_DIR; # directory at start time of the script +_START_DIR="$(pwd)"; + +# For variables that can be reset by option `--default', see reset(). + +_FILEARGS=''; + +# _HAS_* from availability tests +_HAS_COMPRESSION=''; +_HAS_BZIP=''; + +# _TMP_* temporary files +_TMP_DIR=''; +_TMP_CAT=''; +_TMP_CONF=''; +_TMP_STDIN=''; + + +######################################################################## +# reset () +# +# Reset the variables that can be affected by options to their default. +# +reset() +{ + if test "$#" -ne 0 + then + error "reset() does not have arguments."; + fi; + + _ADDOPTS_GROFF=''; + _ADDOPTS_POST=''; + _ADDOPTS_X=''; + _APROPOS_PROG=''; + _APROPOS_SECTIONS=''; + _DISPLAY_ARGS=''; + _DISPLAY_MODE=''; + _DISPLAY_PROG=''; + _REGISTERED_TITLE=''; + + # _MAN_* finally used configuration of man searching + _MAN_ALL='no'; + _MAN_ENABLE='yes'; # do search for man-pages + _MAN_EXT=''; + _MAN_FORCE='no'; # first local file, then search man page + _MAN_IS_SETUP='no'; + _MAN_LANG=''; + _MAN_LANG2=''; + _MAN_PATH=''; + _MAN_SEC=''; + _MAN_SEC_DONE='no'; + _MAN_SYS=''; + _MAN_SYS_DONE='no'; + + # _MANOPT_* as parsed from $MANOPT + _MANOPT_ALL='no'; + _MANOPT_EXTENSION=''; + _MANOPT_LANG=''; + _MANOPT_PATH=''; + _MANOPT_PAGER=''; + _MANOPT_SEC=''; + _MANOPT_SYS=''; + + # _OPT_* as parsed from groffer command line + _OPT_ALL='no'; + _OPT_APROPOS='no'; + _OPT_BD=''; + _OPT_BG=''; + _OPT_BW=''; + _OPT_DEFAULT_MODES=''; + _OPT_DEVICE=''; + _OPT_DISPLAY=''; + _OPT_DO_NOTHING='no'; + _OPT_FG=''; + _OPT_FN=''; + _OPT_GEOMETRY=''; + _OPT_ICONIC='no'; + _OPT_LANG=''; + _OPT_LOCATION='no'; + _OPT_MODE=''; + _OPT_MANPATH=''; + _OPT_PAGER=''; + _OPT_RESOLUTION=''; + _OPT_RV='no'; + _OPT_SECTIONS=''; + _OPT_SYSTEMS=''; + _OPT_TITLE=''; + _OPT_TEXT_DEVICE=''; + _OPT_V='no'; + _OPT_VIEWER_DVI=''; + _OPT_VIEWER_PDF=''; + _OPT_VIEWER_PS=''; + _OPT_VIEWER_HTML=''; + _OPT_VIEWER_X=''; + _OPT_WHATIS='no'; + _OPT_XRM=''; + _OPT_Z='no'; + _VIEWER_TERMINAL='no'; +} + +reset; + + +######################################################################## +# Functions for error handling and debugging +######################################################################## + + +############## +# echo1 (*) +# +# Output to stdout. +# +# Arguments : arbitrary text including `-'. +# +echo1() +{ + cat <*) +# +# Output to stderr. +# +# Arguments : arbitrary text. +# +echo2() +{ + cat >&2 <) +# +# Print to standard error as a debugging aid. +# +# Globals: $_DEBUG_LM +# +landmark() +{ + if test _"${_DEBUG_LM}"_ = _yes_ + then + echo2 "LM: $*"; + fi; +} + +landmark "1: debugging functions"; + + +############## +# clean_up () +# +# Clean up at exit. +# +clean_up() +{ + cd "${_START_DIR}" >"${_NULL_DEV}" 2>&1; + if test _${_DEBUG_KEEP_FILES}_ = _yes_ + then + echo2 "Kept temporary directory ${_TMP_DIR}." + else + if test _"${_TMP_DIR}"_ != __ + then + if test -d "${_TMP_DIR}" || test -f "${_TMP_DIR}" + then + rm -f -r "${_TMP_DIR}" >${_NULL_DEV} 2>&1; + fi; + fi; + fi; +} + + +############# +# diag (text>*) +# +# Output a diagnostic message to stderr +# +diag() +{ + echo2 '>>>>>'"$*"; +} + + +############# +# error (*) +# +# Print an error message to standard error, print the function stack, +# exit with an error condition. The argument should contain the name +# of the function from which it was called. This is for system errors. +# +error() +{ + case "$#" in + 1) echo2 'groffer error: '"$1"; ;; + *) echo2 'groffer error: wrong number of arguments in error().'; ;; + esac; + func_stack_dump; + if test _"${_TMP_DIR}"_ != __ && test -d "${_TMP_DIR}" + then + : >"${_TMP_DIR}"/,error; + fi; + exit "${_ERROR}"; +} + + +############# +# error_user (*) +# +# Print an error message to standard error; exit with an error condition. +# The error is supposed to be produce by the user. So the funtion stack +# is omitted. +# +error_user() +{ + case "$#" in + 1) + echo2 'groffer error: '"$1"; + ;; + *) + echo2 'groffer error: wrong number of arguments in error_user().'; + ;; + esac; + if test _"${_DEBUG_USER_WITH_STACK}"_ = _yes_ + then + func_stack_dump; + fi; + if test _"${_TMP_DIR}"_ != __ && test -d "${_TMP_DIR}" + then + : >"${_TMP_DIR}"/,error; + fi; + exit "${_ERROR}"; +} + + +############# +# exit_test () +# +# Test whether the former command ended with error(). Exit again. +# +# Globals: $_ERROR +# +exit_test() +{ + if test "$?" = "${_ERROR}" + then + exit ${_ERROR}; + fi; + if test _"${_TMP_DIR}"_ != __ && test -f "${_TMP_DIR}"/,error + then + exit ${_ERROR}; + fi; +} + + +############# +# func_check ( "$@") +# +# Check number of arguments and register to _FUNC_STACK. +# +# Arguments: >=3 +# : name of the calling function. +# : a relational operator: = != < > <= >= +# : number of arguments to be checked against +# "$@": the arguments of the calling function. +# +# Variable prefix: fc +# +func_check() +{ + if test "$#" -lt 3 + then + error 'func_check() needs at least 3 arguments.'; + fi; + fc_fname="$1"; + case "$3" in + 1) + fc_nargs="$3"; + fc_s=''; + ;; + 0|[2-9]) + fc_nargs="$3"; + fc_s='s'; + ;; + *) + error "func_check(): third argument must be a digit."; + ;; + esac; + case "$2" in + '='|'-eq') + fc_op='-eq'; + fc_comp='exactly'; + ;; + '>='|'-ge') + fc_op='-ge'; + fc_comp='at least'; + ;; + '<='|'-le') + fc_op='-le'; + fc_comp='at most'; + ;; + '<'|'-lt') + fc_op='-lt'; + fc_comp='less than'; + ;; + '>'|'-gt') + fc_op='-gt'; + fc_comp='more than'; + ;; + '!='|'-ne') + fc_op='-ne'; + fc_comp='not'; + ;; + *) + error \ + 'func_check(): second argument is not a relational operator.'; + ;; + esac; + shift; + shift; + shift; + if test "$#" "${fc_op}" "${fc_nargs}" + then + do_nothing; + else + error "func_check(): \ +${fc_fname}"'() needs '"${fc_comp} ${fc_nargs}"' argument'"${fc_s}"'.'; + fi; + func_push "${fc_fname}"; + if test _"${_DEBUG_STACKS}"_ = _yes_ + then + echo2 '+++ '"${fc_fname} $@"; + echo2 '>>> '"${_FUNC_STACK}"; + fi; + eval ${_UNSET} fc_comp; + eval ${_UNSET} fc_fname; + eval ${_UNSET} fc_nargs; + eval ${_UNSET} fc_op; + eval ${_UNSET} fc_s; +} + + +############# +# func_pop () +# +# Retrieve the top element from the stack. +# +# The stack elements are separated by `!'; the popped element is +# identical to the original element, except that all `!' characters +# were removed. +# +# Arguments: 1 +# +func_pop() +{ + if test "$#" -ne 0 + then + error 'func_pop() does not have arguments.'; + fi; + case "${_FUNC_STACK}" in + '') + if test _"${_DEBUG_STACKS}"_ = _yes_ + then + error 'func_pop(): stack is empty.'; + fi; + ;; + *!*) + # split at first bang `!'. + _FUNC_STACK="$(echo1 "${_FUNC_STACK}" | sed -e 's/^[^!]*!//')"; + exit_test; + ;; + *) + _FUNC_STACK=''; + ;; + esac; + if test _"${_DEBUG_STACKS}"_ = _yes_ + then + echo2 '<<< '"${_FUNC_STACK}"; + fi; +} + + +############# +# func_push () +# +# Store another element to stack. +# +# The stack elements are separated by `!'; if contains a `!' +# it is removed first. +# +# Arguments: 1 +# +# Variable prefix: fp +# +func_push() +{ + if test "$#" -ne 1 + then + error 'func_push() needs 1 argument.'; + fi; + case "$1" in + *'!'*) + # remove all bangs `!'. + fp_element="$(echo1 "$1" | sed -e 's/!//g')"; + exit_test; + ;; + *) + fp_element="$1"; + ;; + esac; + if test _"${_FUNC_STACK}"_ = __ + then + _FUNC_STACK="${fp_element}"; + else + _FUNC_STACK="${fp_element}!${_FUNC_STACK}"; + fi; + eval ${_UNSET} fp_element; +} + + +############# +# func_stack_dump () +# +# Print the content of the stack. Ignore the arguments. +# +func_stack_dump() +{ + diag 'call stack: '"${_FUNC_STACK}"; +} + + +######################################################################## +# System Test +######################################################################## + +landmark "2: system test"; + +# Test the availability of the system utilities used in this script. + + +######################################################################## +# Test of function `sed'. +# + +if test _"$(echo xTesTx \ + | sed -e 's/^.\([Tt]e*x*sTT*\).*$/\1/' \ + | sed -e 's|T|t|g')"_ != _test_ +then + error 'Test of "sed" command failed.'; +fi; + + +######################################################################## +# Test of function `cat'. +# +if test _"$(echo test | cat)"_ != _test_ +then + error 'Test of "cat" command failed.'; +fi; + + +######################################################################## +# Test for compression. +# +if test _"$(echo 'test' | gzip -c -d -f - 2>${_NULL_DEV})"_ = _test_ +then + _HAS_COMPRESSION='yes'; + if echo1 'test' | bzip2 -c 2>${_NULL_DEV} | bzip2 -t 2>${_NULL_DEV} \ + && test _"$(echo 'test' | bzip2 -c 2>${_NULL_DEV} \ + | bzip2 -d -c 2>${_NULL_DEV})"_ \ + = _test_ + then + _HAS_BZIP='yes'; + else + _HAS_BZIP='no'; + fi; +else + _HAS_COMPRESSION='no'; + _HAS_BZIP='no'; +fi; + + +######################################################################## +# Definition of normal Functions in alphabetical order +######################################################################## +landmark "3: functions"; + +######################################################################## +# apropos_filespec () +# +# Setup for the --apropos* options +# +apropos_filespec() +{ + + func_check apropos_filespec '=' 0 "$@"; + if obj _OPT_APROPOS is_yes + then + eval to_tmp_line \ + "'.SH $(echo1 "${_FILESPEC_ARG}" | sed 's/[^\\]-/\\-/g')'"; + exit_test; + if obj _APROPOS_PROG is_empty + then + error 'apropos_filespec: apropos_setup() must be run first.'; + fi; + if obj _APROPOS_SECTIONS is_empty + then + if obj _OPT_SECTIONS is_empty + then + s='^.*(.*).*$'; + else + s='^.*(['"$(echo1 "${_OPT_SECTIONS}" | sed -e 's/://g')"']'; + fi; + else + s='^.*(['"${_APROPOS_SECTIONS}"']'; + fi; + eval "${_APROPOS_PROG}" "'${_FILESPEC_ARG}'" | \ + sed -n -e ' +/^'"${_FILESPEC_ARG}"': /p +/'"$s"'/p +' | \ + sort |\ + sed -e ' +s/^\(.* (..*)\) *- *\(.*\)$/\.br\n\.TP 15\n\.BR \1\n\2/ +' >>"${_TMP_CAT}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# apropos_setup () +# +# Setup for the --apropos* options +# +apropos_setup() +{ + func_check apropos_setup '=' 0 "$@"; + if obj _OPT_APROPOS is_yes + then + if is_prog apropos + then + _APROPOS_PROG='apropos'; + elif is_prog man + then + if man --apropos man >${_NULL_DEV} 2>${_NULL_DEV} + then + _APROPOS_PROG='man --apropos'; + elif man -k man >${_NULL_DEV} 2>${_NULL_DEV} + then + _APROPOS_PROG='man -k'; + fi; + fi; + if obj _APROPOS_PROG is_empty + then + error 'apropos_setup: no apropos program available.'; + fi; + to_tmp_line '.TH GROFFER APROPOS'; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# base_name () +# +# Get the file name part of , i.e. delete everything up to last +# `/' from the beginning of . Remove final slashes, too, to get a +# non-empty output. +# +# Arguments : 1 +# Output : the file name part (without slashes) +# +# Variable prefix: bn +# +base_name() +{ + func_check base_name = 1 "$@"; + bn_name="$1"; + case "${bn_name}" in + */) + # delete all final slashes + bn_name="$(echo1 "${bn_name}" | sed -e 's|//*$||')"; + exit_test; + ;; + esac; + case "${bn_name}" in + /|'') + eval ${_UNSET} bn_name; + eval "${return_bad}"; + ;; + */*) + # delete everything before and including the last slash `/'. + echo1 "${bn_name}" | sed -e 's|^.*//*\([^/]*\)$|\1|'; + ;; + *) + obj bn_name echo1; + ;; + esac; + eval ${_UNSET} bn_name; + eval "${return_ok}"; +} + + +######################################################################## +# cat_z () +# +# Decompress if possible or just print to standard output. +# +# gzip, bzip2, and .Z decompression is supported. +# +# Arguments: 1, a file name. +# Output: the content of , possibly decompressed. +# +if test _"${_HAS_COMPRESSION}"_ = _yes_ +then + cat_z() + { + func_check cat_z = 1 "$@"; + case "$1" in + '') + error 'cat_z(): empty file name'; + ;; + '-') + error 'cat_z(): for standard input use save_stdin()'; + ;; + esac; + if obj _HAS_BZIP is_yes + then + if bzip2 -t "$1" 2>${_NULL_DEV} + then + bzip2 -c -d "$1" 2>${_NULL_DEV}; + eval "${return_ok}"; + fi; + fi; + gzip -c -d -f "$1" 2>${_NULL_DEV}; + eval "${return_ok}"; + } +else + cat_z() + { + func_check cat_z = 1 "$@"; + cat "$1"; + eval "${return_ok}"; + } +fi; + + +######################################################################## +# clean_up () +# +# Do the final cleaning up before exiting; used by the trap calls. +# +# defined above + + +######################################################################## +# diag (*) +# +# Print marked message to standard error; useful for debugging. +# +# defined above + + +######################################################################## +landmark '4: dirname()*'; +######################################################################## + +####################################################################### +# dirname_append ( ) +# +# Append `name' to `dir' with clean handling of `/'. +# +# Arguments : 2 +# Output : the generated new directory name / +# +dirname_append() +{ + func_check dirname_append = 2 "$@"; + if is_empty "$1" + then + error "dir_append(): first argument is empty."; + fi; + if is_empty "$2" + then + echo1 "$1"; + else + dirname_chop "$1"/"$2"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# dirname_chop () +# +# Remove unnecessary slashes from directory name. +# +# Argument: 1, a directory name. +# Output: path without double, or trailing slashes. +# +# Variable prefix: dc +# +dirname_chop() +{ + func_check dirname_chop = 1 "$@"; + # replace all multiple slashes by a single slash `/'. + dc_res="$(echo1 "$1" | sed -e 's|///*|/|g')"; + exit_test; + case "${dc_res}" in + ?*/) + # remove trailing slash '/'; + echo1 "${dc_res}" | sed -e 's|/$||'; + ;; + *) + obj dc_res echo1 + ;; + esac; + eval ${_UNSET} dc_res; + eval "${return_ok}"; +} + + +######################################################################## +# do_filearg () +# +# Append the file, man-page, or standard input corresponding to the +# argument to the temporary file. If this is compressed in the gzip +# or Z format it is decompressed. A title element is generated. +# +# Argument either: +# - name of an existing file. +# - `-' to represent standard input (several times allowed). +# - `man:name.(section)' the man-page for `name' in `section'. +# - `man:name.section' the man-page for `name' in `section'. +# - `man:name' the man-page for `name' in the lowest `section'. +# - `name.section' the man-page for `name' in `section'. +# - `name' the man-page for `name' in the lowest `section'. +# Globals : +# $_TMP_STDIN, $_MAN_ENABLE, $_MAN_IS_SETUP, $_OPT_MAN +# +# Output : none +# Return : $_GOOD if found, ${_BAD} otherwise. +# +# Variable prefix: df +# +do_filearg() +{ + func_check do_filearg = 1 "$@"; + df_filespec="$1"; + # store sequence into positional parameters + case "${df_filespec}" in + '') + eval ${_UNSET} df_filespec; + eval "${return_good}"; + ;; + '-') + register_file '-'; + eval ${_UNSET} df_filespec; + eval "${return_good}"; + ;; + */*) # with directory part; so no man search + set 'File'; + ;; + *) + if obj _MAN_ENABLE is_yes + then + if obj _MAN_FORCE is_yes + then + set 'Manpage' 'File'; + else + set 'File' 'Manpage'; + fi; + else + set 'File'; + fi; + ;; + esac; + for i + do + case "$i" in + File) + if test -f "${df_filespec}" + then + if test -r "${df_filespec}" + then + register_file "${df_filespec}"; + eval ${_UNSET} df_filespec; + eval ${_UNSET} df_no_man; + eval "${return_good}"; + else + echo2 "could not read \`${df_filespec}'"; + eval ${_UNSET} df_filespec; + eval ${_UNSET} df_no_man; + eval "${return_bad}"; + fi; + else + if obj df_no_man is_not_empty + then + if obj _OPT_WHATIS is_yes + then + to_tmp_line "This is neither a file nor a man page." + else + echo2 "\`${df_filespec}' is neither a file nor a man page." + fi; + fi; + df_no_file=yes; + continue; + fi; + ;; + Manpage) # parse filespec as man page + if obj _MAN_IS_SETUP is_not_yes + then + man_setup; + fi; + if man_do_filespec "${df_filespec}" + then + eval ${_UNSET} df_filespec; + eval ${_UNSET} df_no_file; + eval "${return_good}"; + else + if obj df_no_file is_not_empty + then + if obj _OPT_WHATIS is_yes + then + to_tmp_line "This is neither a file nor a man page." + else + echo2 "\`${df_filespec}' is neither a file nor a man page." + fi; + fi; + df_no_man=yes; + continue; + fi; + ;; + esac; + done; + eval ${_UNSET} df_filespec; + eval ${_UNSET} df_no_file; + eval ${_UNSET} df_no_man; + eval "${return_bad}"; +} # do_filearg() + + +######################################################################## +# do_nothing () +# +# Dummy function. +# +do_nothing() +{ + eval return "${_OK}"; +} + + +######################################################################## +# echo2 (*) +# +# Print to standard error with final line break. +# +# defined above + + +######################################################################## +# error (*) +# +# Print error message and exit with error code. +# +# defined above + + +######################################################################## +# exit_test () +# +# Test whether the former command ended with error(). Exit again. +# +# defined above + + +######################################################################## +# func_check ( "$@") +# +# Check number of arguments and register to _FUNC_STACK. +# +# Arguments: >=3 +# : name of the calling function. +# : a relational operator: = != < > <= >= +# : number of arguments to be checked against +# "$@": the arguments of the calling function. +# +# defined above + +######################################################################### +# func_pop () +# +# Delete the top element from the function call stack. +# +# defined above + + +######################################################################## +# func_push () +# +# Store another element to function call stack. +# +# defined above + + +######################################################################## +# func_stack_dump () +# +# Print the content of the stack. +# +# defined above + + +######################################################################## +# get_first_essential (*) +# +# Retrieve first non-empty argument. +# +# Return : `1' if all arguments are empty, `0' if found. +# Output : the retrieved non-empty argument. +# +# Variable prefix: gfe +# +get_first_essential() +{ + func_check get_first_essential '>=' 0 "$@"; + if is_equal "$#" 0 + then + eval "${return_ok}"; + fi; + for i + do + gfe_var="$i"; + if obj gfe_var is_not_empty + then + obj gfe_var echo1; + eval ${_UNSET} gfe_var; + eval "${return_ok}"; + fi; + done; + eval ${_UNSET} gfe_var; + eval "${return_bad}"; +} + + +######################################################################## +landmark '5: is_*()'; +######################################################################## + +######################################################################## +# is_dir () +# +# Test whether `name' is a directory. +# +# Arguments : 1 +# Return : `0' if arg1 is a directory, `1' otherwise. +# +is_dir() +{ + func_check is_dir '=' 1 "$@"; + if test _"$1"_ != __ && test -d "$1" && test -r "$1" + then + eval "${return_yes}"; + fi; + eval "${return_no}"; +} + + +######################################################################## +# is_empty () +# +# Test whether `string' is empty. +# +# Arguments : <=1 +# Return : `0' if arg1 is empty or does not exist, `1' otherwise. +# +is_empty() +{ + func_check is_empty '=' 1 "$@"; + if test _"$1"_ = __ + then + eval "${return_yes}"; + fi; + eval "${return_no}"; +} + + +######################################################################## +# is_equal ( ) +# +# Test whether `string1' is equal to . +# +# Arguments : 2 +# Return : `0' both arguments are equal strings, `1' otherwise. +# +is_equal() +{ + func_check is_equal '=' 2 "$@"; + if test _"$1"_ = _"$2"_ + then + eval "${return_yes}"; + fi; + eval "${return_no}"; +} + + +######################################################################## +# is_existing () +# +# Test whether `name' is an existing file or directory. Solaris 2.5 does +# not have `test -e'. +# +# Arguments : 1 +# Return : `0' if arg1 exists, `1' otherwise. +# +is_existing() +{ + func_check is_existing '=' 1 "$@"; + if test _"$1"_ = __ + then + eval "${return_no}"; + fi; + if test -f "$1" || test -d "$1" || test -c "$1" + then + eval "${return_yes}"; + fi; + eval "${return_no}"; +} + + +######################################################################## +# is_file () +# +# Test whether `name' is a readable file. +# +# Arguments : 1 +# Return : `0' if arg1 is a readable file, `1' otherwise. +# +is_file() +{ + func_check is_file '=' 1 "$@"; + if is_not_empty "$1" && test -f "$1" && test -r "$1" + then + eval "${return_yes}"; + fi; + eval "${return_no}"; +} + + +######################################################################## +# is_non_empty_file () +# +# Test whether `file_name' is a non-empty existing file. +# +# Arguments : <=1 +# Return : +# `0' if arg1 is a non-empty existing file +# `1' otherwise +# +is_non_empty_file() +{ + func_check is_non_empty_file '=' 1 "$@"; + if is_file "$1" && test -s "$1" + then + eval "${return_yes}"; + fi; + eval "${return_no}"; +} + + +######################################################################## +# is_not_dir () +# +# Test whether `name' is not a readable directory. +# +# Arguments : 1 +# Return : `0' if arg1 is a directory, `1' otherwise. +# +is_not_dir() +{ + func_check is_not_dir '=' 1 "$@"; + if is_dir "$1" + then + eval "${return_no}"; + fi; + eval "${return_yes}"; +} + + +######################################################################## +# is_not_empty () +# +# Test whether `string' is not empty. +# +# Arguments : <=1 +# Return : `0' if arg1 exists and is not empty, `1' otherwise. +# +is_not_empty() +{ + func_check is_not_empty '=' 1 "$@"; + if is_empty "$1" + then + eval "${return_no}"; + fi; + eval "${return_yes}"; +} + + +######################################################################## +# is_not_equal ( ) +# +# Test whether `string1' differs from `string2'. +# +# Arguments : 2 +# +is_not_equal() +{ + func_check is_not_equal '=' 2 "$@"; + if is_equal "$1" "$2" + then + eval "${return_no}"; + fi + eval "${return_yes}"; +} + + +######################################################################## +# is_not_file () +# +# Test whether `name' is a not readable file. +# +# Arguments : 1 (empty allowed) +# +is_not_file() +{ + func_check is_not_file '=' 1 "$@"; + if is_file "$1" + then + eval "${return_no}"; + fi; + eval "${return_yes}"; +} + + +######################################################################## +# is_not_prog ([ [*]]) +# +# Verify that arg is a not program in $PATH. +# +# Arguments : >=0 (empty allowed) +# more args are ignored, this allows to specify progs with arguments +# +is_not_prog() +{ + func_check is_not_prog '>=' 0 "$@"; + case "$#" in + 0) + eval "${return_yes}"; + ;; + *) + if where_is "$1" >${_NULL_DEV} + then + eval "${return_no}"; + fi; + ;; + esac + eval "${return_yes}"; +} + + +######################################################################## +# is_not_writable () +# +# Test whether `name' is a not a writable file or directory. +# +# Arguments : >=1 (empty allowed), more args are ignored +# +is_not_writable() +{ + func_check is_not_writable '>=' 1 "$@"; + if is_writable "$1" + then + eval "${return_no}"; + fi; + eval "${return_yes}"; +} + + +######################################################################## +# is_not_X () +# +# Test whether not running in X Window by checking $DISPLAY +# +is_not_X() +{ + func_check is_X '=' 0 "$@"; + if obj DISPLAY is_empty + then + eval "${return_yes}"; + fi; + eval "${return_no}"; +} + + +######################################################################## +# is_not_yes () +# +# Test whether `string' is not "yes". +# +# Arguments : 1 +# +is_not_yes() +{ + func_check is_not_yes = 1 "$@"; + if is_yes "$1" + then + eval "${return_no}"; + fi; + eval "${return_yes}"; +} + + +######################################################################## +# is_prog ([ [*]]) +# +# Determine whether is a program in $PATH +# +# Arguments : >=0 (empty allowed) +# * are ignored, this allows to specify progs with arguments. +# +is_prog() +{ + func_check is_prog '>=' 0 "$@"; + case "$#" in + 0) + eval "${return_no}"; + ;; + *) + if where_is "$1" >${_NULL_DEV} + then + eval "${return_yes}"; + fi; + ;; + esac + eval "${return_no}"; +} + + +######################################################################## +# is_writable () +# +# Test whether `name' is a writable file or directory. +# +# Arguments : >=1 (empty allowed), more args are ignored +# +is_writable() +{ + func_check is_writable '>=' 1 "$@"; + if test _"$1"_ = __ + then + eval "${return_no}"; + fi; + if test -r "$1" + then + if test -w "$1" + then + eval "${return_yes}"; + fi; + fi; + eval "${return_no}"; +} + + +######################################################################## +# is_X () +# +# Test whether running in X Window by checking $DISPLAY +# +is_X() +{ + func_check is_X '=' 0 "$@"; + if obj DISPLAY is_not_empty + then + eval "${return_yes}"; + fi; + eval "${return_no}"; +} + + +######################################################################## +# is_yes () +# +# Test whether `string' has value "yes". +# +# Return : `0' if arg1 is `yes', `1' otherwise. +# +is_yes() +{ + func_check is_yes '=' 1 "$@"; + if is_equal "$1" 'yes' + then + eval "${return_yes}"; + fi; + eval "${return_no}"; +} + + +######################################################################## +# landmark () +# +# Print debugging information on standard error if $_DEBUG_LM is `yes'. +# +# Globals: $_DEBUG_LM +# +# Defined in section `Debugging functions'. + + +######################################################################## +# leave ([]) +# +# Clean exit without an error or with . +# +leave() +{ + clean_up; + if test $# = 0 + then + exit "${_OK}"; + else + exit "$1"; + fi; +} + + +######################################################################## +landmark '6: list_*()'; +######################################################################## +# +# `list' is an object class that represents an array or list. Its +# data consists of space-separated single-quoted elements. So a list +# has the form "'first' 'second' '...' 'last'". See list_append() for +# more details on the list structure. The array elements of `list' +# can be get by `eval set x "$list"; shift`. + + +######################################################################## +# list_append ( ...) +# +# Arguments: >=2 +# : a variable name for a list of single-quoted elements +# : some sequence of characters. +# Output: none, but $ is set to +# if is empty: "'' '...'" +# otherwise: "$list '' ..." +# +# Variable prefix: la +# +list_append() +{ + func_check list_append '>=' 2 "$@"; + la_name="$1"; + eval la_list='"${'$1'}"'; + shift; + for s + do + la_s="$s"; + case "${la_s}" in + *\'*) + # escape each single quote by replacing each + # "'" (squote) by "'\''" (squote bslash squote squote); + # note that the backslash must be doubled in the following `sed' + la_element="$(echo1 "${la_s}" | sed -e 's/'"${_SQ}"'/&\\&&/g')"; + exit_test; + ;; + '') + la_element=""; + ;; + *) + la_element="${la_s}"; + ;; + esac; + if obj la_list is_empty + then + la_list="'${la_element}'"; + else + la_list="${la_list} '${la_element}'"; + fi; + done; + eval "${la_name}"='"${la_list}"'; + eval ${_UNSET} la_element; + eval ${_UNSET} la_list; + eval ${_UNSET} la_name; + eval ${_UNSET} la_s; + eval "${return_ok}"; +} + + +######################################################################## +# list_from_cmdline ( [...]) +# +# Transform command line arguments into a normalized form. +# +# Options, option arguments, and file parameters are identified and +# output each as a single-quoted argument of its own. Options and +# file parameters are separated by a '--' argument. +# +# Arguments: >=1 +# : common part of a set of 4 environment variable names: +# $_SHORT_NA: list of short options without an arg. +# $_SHORT_ARG: list of short options that have an arg. +# $_LONG_NA: list of long options without an arg. +# $_LONG_ARG: list of long options that have an arg. +# ...: the arguments from a command line, such as "$@", +# the content of a variable, or direct arguments. +# +# Output: ['-[-]opt' ['optarg']]... '--' ['filename']... +# +# Example: +# list_from_cmdline PRE 'a b' 'c' '' 'long' -a f1 -bcarg --long=larg f2 +# If $PRE_SHORT_NA, $PRE_SHORT_ARG, $PRE_LONG_NA, and $PRE_LONG_ARG are +# none-empty option lists, this will result in printing: +# '-a' '-b' '-c' 'arg' '--long' 'larg' '--' 'f1' 'f2' +# +# Use this function in the following way: +# eval set x "$(args_norm PRE_NAME "$@")"; +# shift; +# while test "$1" != '--'; do +# case "$1" in +# ... +# esac; +# shift; +# done; +# shift; #skip '--' +# # all positional parameters ("$@") left are file name parameters. +# +# Variable prefix: lfc +# +list_from_cmdline() +{ + func_check list_from_cmdline '>=' 1 "$@"; + lfc_short_n="$(obj_data "$1"_SHORT_NA)"; # short options, no argument + lfc_short_a="$(obj_data "$1"_SHORT_ARG)"; # short options, with argument + lfc_long_n="$(obj_data "$1"_LONG_NA)"; # long options, no argument + lfc_long_a="$(obj_data "$1"_LONG_ARG)"; # long options, with argument + exit_test; + if obj lfc_short_n is_empty + then + error 'list_from_cmdline(): no $'"$1"'_SHORT_NA options.'; + fi; + if obj lfc_short_a is_empty + then + error 'list_from_cmdline(): no $'"$1"'_SHORT_ARG options.'; + fi; + if obj lfc_long_n is_empty + then + error 'list_from_cmdline(): no $'"$1"'_LONG_NA options.'; + fi; + if obj lfc_long_a is_empty + then + error 'list_from_cmdline(): no $'"$1"'_LONG_ARG options.'; + fi; + + shift; + if is_equal "$#" 0 + then + echo1 -- + eval ${_UNSET} lfc_fparams; + eval ${_UNSET} lfc_short_a; + eval ${_UNSET} lfc_short_n; + eval ${_UNSET} lfc_long_a; + eval ${_UNSET} lfc_long_n; + eval ${_UNSET} lfc_result; + eval "${return_ok}"; + fi; + + lfc_fparams=''; + lfc_result=''; + while test "$#" -ge 1 + do + lfc_arg="$1"; + shift; + case "${lfc_arg}" in + --) break; ;; + --*=*) + # delete leading '--'; + lfc_abbrev="$(echo1 "${lfc_arg}" | sed -e 's/^--//')"; + lfc_with_equal="${lfc_abbrev}"; + # extract option by deleting from the first '=' to the end + lfc_abbrev="$(echo1 "${lfc_with_equal}" | \ + sed -e 's/^\([^=]*\)=.*$/\1/')"; + lfc_opt="$(list_single_from_abbrev lfc_long_a "${lfc_abbrev}")"; + exit_test; + if obj lfc_opt is_empty + then + error_user "--${lfc_abbrev} is not an option."; + else + # get the option argument by deleting up to first `=' + lfc_optarg="$(echo1 "${lfc_with_equal}" | sed -e 's/^[^=]*=//')"; + exit_test; + list_append lfc_result "--${lfc_opt}" "${lfc_optarg}"; + continue; + fi; + ;; + --*) + # delete leading '--'; + lfc_abbrev="$(echo1 "${lfc_arg}" | sed -e 's/^--//')"; + if list_has lfc_long_n "${lfc_abbrev}" + then + lfc_opt="${lfc_abbrev}"; + else + exit_test; + lfc_opt="$(list_single_from_abbrev lfc_long_n "${lfc_abbrev}")"; + exit_test; + if obj lfc_opt is_not_empty && is_not_equal "$#" 0 + then + a="$(list_single_from_abbrev lfc_long_a "${lfc_abbrev}")"; + exit_test; + if obj a is_not_empty + then + error_user "The abbreviation ${lfc_arg} \ +has multiple options: --${lfc_opt} and --${a}."; + fi; + fi; + fi; + if obj lfc_opt is_not_empty + then + # long option, no argument + list_append lfc_result "--${lfc_opt}"; + continue; + fi; + lfc_opt="$(list_single_from_abbrev lfc_long_a "${lfc_abbrev}")"; + exit_test; + if obj lfc_opt is_not_empty + then + # long option with argument + if test "$#" -le 0 + then + error_user "no argument for option --${lfc_opt}." + fi; + list_append lfc_result "--${lfc_opt}" "$1"; + shift; + continue; + fi; + error_user "${lfc_arg} is not an option."; + ;; + -?*) # short option (cluster) + # delete leading `-'; + lfc_rest="$(echo1 "${lfc_arg}" | sed -e 's/^-//')"; + exit_test; + while obj lfc_rest is_not_empty + do + # get next short option from cluster (first char of $lfc_rest) + lfc_optchar="$(echo1 "${lfc_rest}" | sed -e 's/^\(.\).*$/\1/')"; + # remove first character from ${lfc_rest}; + lfc_rest="$(echo1 "${lfc_rest}" | sed -e 's/^.//')"; + exit_test; + if list_has lfc_short_n "${lfc_optchar}" + then + list_append lfc_result "-${lfc_optchar}"; + continue; + elif list_has lfc_short_a "${lfc_optchar}" + then + if obj lfc_rest is_empty + then + if test "$#" -ge 1 + then + list_append lfc_result "-${lfc_optchar}" "$1"; + shift; + continue; + else + error_user "no argument for option -${lfc_optchar}."; + fi; + else # rest is the argument + list_append lfc_result "-${lfc_optchar}" "${lfc_rest}"; + lfc_rest=''; + continue; + fi; + else + error_user "unknown option -${lfc_optchar}."; + fi; + done; + ;; + *) + # Here, $lfc_arg is not an option, so a file parameter. + list_append lfc_fparams "${lfc_arg}"; + + # Ignore the strange POSIX option handling to end option + # parsing after the first file name argument. To reuse it, do + # a `break' here if $POSIXLY_CORRECT of `bash' is not empty. + # When `bash' is called as `sh' $POSIXLY_CORRECT is set + # automatically to `y'. + ;; + esac; + done; + list_append lfc_result '--'; + if obj lfc_fparams is_not_empty + then + lfc_result="${lfc_result} ${lfc_fparams}"; + fi; + if test "$#" -gt 0 + then + list_append lfc_result "$@"; + fi; + obj lfc_result echo1; + eval ${_UNSET} lfc_abbrev; + eval ${_UNSET} lfc_fparams; + eval ${_UNSET} lfc_short_a; + eval ${_UNSET} lfc_short_n; + eval ${_UNSET} lfc_long_a; + eval ${_UNSET} lfc_long_n; + eval ${_UNSET} lfc_result; + eval ${_UNSET} lfc_arg; + eval ${_UNSET} lfc_opt; + eval ${_UNSET} lfc_opt_arg; + eval ${_UNSET} lfc_opt_char; + eval ${_UNSET} lfc_with_equal; + eval ${_UNSET} lfc_rest; + eval "${return_ok}"; +} # list_from_cmdline() + + +######################################################################## +# list_from_split ( ) +# +# In , escape all white space characters and replace each +# by space. +# +# Arguments: 2: a that is to be split into parts divided by +# +# Output: the resulting list string +# +# Variable prefix: lfs +# +list_from_split() +{ + func_check list_from_split = 2 "$@"; + + # precede each space or tab by a backslash `\' (doubled for `sed') + lfs_s="$(echo1 "$1" | sed -e 's/\('"${_SPACE_SED}"'\)/\\\1/g')"; + exit_test; + + # replace split character of string by the list separator ` ' (space). + case "$2" in + /) # cannot use normal `sed' separator + echo1 "${lfs_s}" | sed -e 's|'"$2"'| |g'; + ;; + ?) # use normal `sed' separator + echo1 "${lfs_s}" | sed -e 's/'"$2"'/ /g'; + ;; + ??*) + error 'list_from_split(): separator must be a single character.'; + ;; + esac; + eval ${_UNSET} lfs_s; + eval "${return_ok}"; +} + + +######################################################################## +# list_get () +# +# Check whether is a space-separated list of '-quoted elements. +# +# If the test fails an error is raised. +# If the test succeeds the argument is echoed. +# +# Testing criteria: +# A list has the form "'first' 'second' '...' 'last'". So it has a +# leading and a final quote and the elements are separated by "' '" +# constructs. If these are all removed there should not be any +# unescaped single-quotes left. Watch out for escaped single +# quotes; they have the form '\'' (sq bs sq sq). + +# Arguments: 1 +# Output: the argument unchanged, if the check succeeded. +# +# Variable prefix: lg +# +list_get() +{ + func_check list_get = 1 "$@"; + eval lg_list='"${'$1'}"'; + # remove leading and final space characters + lg_list="$(echo1 "${lg_list}" | sed -e ' +s/^'"${_SPACE_SED}"'*// +s/'"${_SPACE_SED}"'*$// +')"; + exit_test; + case "${lg_list}" in + '') + eval ${_UNSET} lg_list; + eval "${return_ok}"; + ;; + \'*\') + obj lg_list echo1; + eval ${_UNSET} lg_list; + eval "${return_ok}"; + ;; + *) + error "list_get(): bad list: $1" + ;; + esac; + eval ${_UNSET} lg_list; + eval "${return_ok}"; +} + + +######################################################################## +# list_has ( ) +# +# Test whether the list has the element . +# +# Arguments: 2 +# : a variable name for a list of single-quoted elements +# : some sequence of characters. +# +# Variable prefix: lh +# +list_has() +{ + func_check list_has = 2 "$@"; + eval lh_list='"${'$1'}"'; + if obj lh_list is_empty + then + eval "${_UNSET}" lh_list; + eval "${return_no}"; + fi; + case "$2" in + \'*\') lh_element=" $2 "; ;; + *) lh_element=" '$2' "; ;; + esac; + if string_contains " ${lh_list} " "${lh_element}" + then + eval "${_UNSET}" lh_list; + eval "${_UNSET}" lh_element; + eval "${return_yes}"; + else + eval "${_UNSET}" lh_list; + eval "${_UNSET}" lh_element; + eval "${return_no}"; + fi; +} + + +######################################################################## +# list_has_abbrev ( ) +# +# Test whether the list has an element starting with . +# +# Arguments: 2 +# : a variable name for a list of single-quoted elements +# : some sequence of characters. +# +# Variable prefix: lha +# +list_has_abbrev() +{ + func_check list_has_abbrev = 2 "$@"; + eval lha_list='"${'$1'}"'; + if obj lha_list is_empty + then + eval "${_UNSET}" lha_list; + eval "${return_no}"; + fi; + case "$2" in + \'*) + lha_element="$(echo1 "$2" | sed -e 's/'"${_SQ}"'$//')"; + exit_test; + ;; + *) lha_element="'$2"; ;; + esac; + if string_contains " ${lha_list}" " ${lha_element}" + then + eval "${_UNSET}" lha_list; + eval "${_UNSET}" lha_element; + eval "${return_yes}"; + else + eval "${_UNSET}" lha_list; + eval "${_UNSET}" lha_element; + eval "${return_no}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# list_has_not ( ) +# +# Test whether has no . +# +# Arguments: 2 +# : a space-separated list of single-quoted elements. +# : some sequence of characters. +# +# Variable prefix: lhn +# +list_has_not() +{ + func_check list_has_not = 2 "$@"; + eval lhn_list='"${'$1'}"'; + if obj lhn_list is_empty + then + eval "${_UNSET}" lhn_list; + eval "${return_yes}"; + fi; + case "$2" in + \'*\') lhn_element=" $2 "; ;; + *) lhn_element=" '$2' "; ;; + esac; + if string_contains " ${lhn_list} " "${lhn_element}" + then + eval "${_UNSET}" lhn_list; + eval "${_UNSET}" lhn_element; + eval "${return_no}"; + else + eval "${_UNSET}" lhn_list; + eval "${_UNSET}" lhn_element; + eval "${return_yes}"; + fi; +} + + +######################################################################## +# list_single_from_abbrev ( ) +# +# Check whether the list has an element starting with . If +# there are more than a single element an error is created. +# +# Arguments: 2 +# : a variable name for a list of single-quoted elements +# : some sequence of characters. +# +# Output: the found element. +# +# Variable prefix: lsfa +# +list_single_from_abbrev() +{ + func_check list_single_from_abbrev = 2 "$@"; + eval lsfa_list='"${'$1'}"'; + if obj lsfa_list is_empty + then + eval "${_UNSET}" lsfa_list; + eval "${return_no}"; + fi; + lsfa_abbrev="$2"; + if list_has lsfa_list "${lsfa_abbrev}" + then + obj lsfa_abbrev echo1; + eval "${_UNSET}" lsfa_abbrev; + eval "${_UNSET}" lsfa_list; + eval "${return_yes}"; + fi; + if list_has_abbrev lsfa_list "${lsfa_abbrev}" + then + lsfa_element=''; + eval set x "${lsfa_list}"; + shift; + for i + do + case "$i" in + ${lsfa_abbrev}*) + if obj lsfa_element is_not_empty + then + error_user "The abbreviation --${lsfa_abbrev} \ +has multiple options: --${lsfa_element} and --${i}."; + fi; + lsfa_element="$i"; + ;; + esac; + done; + obj lsfa_element echo1; + eval "${_UNSET}" lsfa_abbrev; + eval "${_UNSET}" lsfa_element; + eval "${_UNSET}" lsfa_list; + eval "${return_yes}"; + else + eval "${_UNSET}" lsfa_abbrev; + eval "${_UNSET}" lsfa_element; + eval "${_UNSET}" lsfa_list; + eval "${return_no}"; + fi; +} + + +######################################################################## +landmark '7: man_*()'; +######################################################################## + +######################################################################## +# man_do_filespec () +# +# Print suitable man page(s) for filespec to $_TMP_CAT. +# +# Arguments : 2 +# : argument of the form `man:name.section', `man:name', +# `man:name(section)', `name.section', `name'. +# +# Globals : $_OPT_ALL +# +# Output : none. +# Return : `0' if man page was found, `1' else. +# +# Only called from do_fileargs(), checks on $MANPATH and $_MAN_ENABLE +# are assumed (see man_setup()). +# +# Variable prefix: mdf +# +man_do_filespec() +{ + func_check man_do_filespec = 1 "$@"; + if obj _MAN_PATH is_empty + then + eval "${return_bad}"; + fi; + if is_empty "$1" + then + eval "${return_bad}"; + fi; + mdf_spec="$1"; + mdf_name=''; + mdf_section=''; + case "${mdf_spec}" in + */*) # not a man spec with containing '/' + eval ${_UNSET} mdf_got_one; + eval ${_UNSET} mdf_name; + eval ${_UNSET} mdf_section; + eval ${_UNSET} mdf_spec; + eval "${return_bad}"; + ;; + man:?*\(?*\)) # man:name(section) + mdf_name="$(echo1 "${mdf_spec}" \ + | sed -e 's/^man:\(..*\)(\(..*\))$/\1/')"; + mdf_section="$(echo1 "${mdf_spec}" \ + | sed -e 's/^man:\(..*\)(\(..*\))$/\2/')"; + exit_test; + ;; + man:?*.${_MAN_AUTO_SEC_CHARS}) # man:name.section + mdf_name="$(echo1 "${mdf_spec}" \ + | sed -e 's/^man:\(..*\)\..$/\1/')"; + mdf_section="$(echo1 "${mdf_spec}" \ + | sed -e 's/^.*\(.\)$/\1/')"; + exit_test; + ;; + man:?*) # man:name + mdf_name="$(echo1 "${mdf_spec}" | sed -e 's/^man://')"; + exit_test; + ;; + ?*\(?*\)) # name(section) + mdf_name="$(echo1 "${mdf_spec}" \ + | sed -e 's/^\(..*\)(\(..*\))$/\1/')"; + mdf_section="$(echo1 "${mdf_spec}" \ + | sed -e 's/^\(..*\)(\(..*\))$/\2/')"; + exit_test; + ;; + ?*.${_MAN_AUTO_SEC_CHARS}) # name.section + mdf_name="$(echo1 "${mdf_spec}" \ + | sed -e 's/^\(..*\)\..$/\1/')"; + mdf_section="$(echo1 "${mdf_spec}" \ + | sed -e 's/^.*\(.\)$/\1/')"; + exit_test; + ;; + ?*) + mdf_name="${mdf_spec}"; + ;; + esac; + if obj mdf_name is_empty + then + eval ${_UNSET} mdf_got_one; + eval ${_UNSET} mdf_name; + eval ${_UNSET} mdf_section; + eval ${_UNSET} mdf_spec; + eval "${return_bad}"; + fi; + mdf_got_one='no'; + if obj mdf_section is_empty + then + if obj _OPT_SECTIONS is_empty + then + eval set x "${_MAN_AUTO_SEC_LIST}"; + else + # use --sections when no section is given to filespec + eval set x "$(echo1 "${_OPT_SECTIONS}" | sed -e 's/:/ /g')"; + fi; + shift; + for s + do + mdf_s="$s"; + if man_search_section "${mdf_name}" "${mdf_s}" + then # found + if obj _MAN_ALL is_yes + then + mdf_got_one='yes'; + else + eval ${_UNSET} mdf_got_one; + eval ${_UNSET} mdf_name; + eval ${_UNSET} mdf_s; + eval ${_UNSET} mdf_section; + eval ${_UNSET} mdf_spec; + eval "${return_good}"; + fi; + fi; + done; + else + if man_search_section "${mdf_name}" "${mdf_section}" + then + eval ${_UNSET} mdf_got_one; + eval ${_UNSET} mdf_name; + eval ${_UNSET} mdf_s; + eval ${_UNSET} mdf_section; + eval ${_UNSET} mdf_spec; + eval "${return_good}"; + else + eval ${_UNSET} mdf_got_one; + eval ${_UNSET} mdf_name; + eval ${_UNSET} mdf_section; + eval ${_UNSET} mdf_spec; + eval "${return_bad}"; + fi; + fi; + if obj _MAN_ALL is_yes && obj mdf_got_one is_yes + then + eval ${_UNSET} mdf_got_one; + eval ${_UNSET} mdf_name; + eval ${_UNSET} mdf_s; + eval ${_UNSET} mdf_section; + eval ${_UNSET} mdf_spec; + eval "${return_good}"; + fi; + eval ${_UNSET} mdf_got_one; + eval ${_UNSET} mdf_name; + eval ${_UNSET} mdf_s; + eval ${_UNSET} mdf_section; + eval ${_UNSET} mdf_spec; + eval "${return_bad}"; +} # man_do_filespec() + + +######################################################################## +# man_register_file ( [
]) +# +# Write a found man page file and register the title element. +# +# Arguments: 1, 2, or 3; maybe empty +# Output: none +# +man_register_file() +{ + func_check man_register_file '>=' 2 "$@"; + case "$#" in + 2|3) do_nothing; ;; + *) + error "man_register_file() expects 2 or 3 arguments."; + ;; + esac; + if is_empty "$1" + then + error 'man_register_file(): file name is empty'; + fi; + to_tmp "$1"; + case "$#" in + 2) + register_title "man:$2"; + eval "${return_ok}"; + ;; + 3) + register_title "$2.$3"; + eval "${return_ok}"; + ;; + esac; + eval "${return_ok}"; +} + + +######################################################################## +# man_search_section (
) +# +# Retrieve man pages. +# +# Arguments : 2 +# Globals : $_MAN_PATH, $_MAN_EXT +# Return : 0 if found, 1 otherwise +# +# Variable prefix: mss +# +man_search_section() +{ + func_check man_search_section = 2 "$@"; + if obj _MAN_PATH is_empty + then + eval "${return_bad}"; + fi; + if is_empty "$1" + then + eval "${return_bad}"; + fi; + if is_empty "$2" + then + eval "${return_bad}"; + fi; + mss_name="$1"; + mss_section="$2"; + eval set x "$(path_split "${_MAN_PATH}")"; + exit_test; + shift; + mss_got_one='no'; + if obj _MAN_EXT is_empty + then + for d + do + mss_dir="$(dirname_append "$d" "man${mss_section}")"; + exit_test; + if obj mss_dir is_dir + then + mss_prefix="$(\ + dirname_append "${mss_dir}" "${mss_name}.${mss_section}")"; + if obj _OPT_WHATIS is_yes + then + mss_files="$(eval ls "${mss_prefix}"'*' 2>${_NULL_DEV} | + sed -e '\| found|s|.*||' + )"; + else + mss_files="$(eval ls "'${mss_prefix}'"'*' 2>${_NULL_DEV} | + sed -e '\| found|s|.*||' + )"; + fi; + exit_test; + if obj mss_files is_not_empty + then + # for f in $mss_files + for f in $(eval set x ${mss_files}; shift; echo1 "$@") + do + exit_test; + mss_f="$f"; + if obj mss_f is_file + then + if is_yes "${mss_got_one}" + then + register_file "${mss_f}"; + elif obj _MAN_ALL is_yes + then + man_register_file "${mss_f}" "${mss_name}"; + else + man_register_file "${mss_f}" "${mss_name}" "${mss_section}"; + eval ${_UNSET} mss_dir; + eval ${_UNSET} mss_ext; + eval ${_UNSET} mss_f; + eval ${_UNSET} mss_files; + eval ${_UNSET} mss_got_one; + eval ${_UNSET} mss_name; + eval ${_UNSET} mss_prefix; + eval ${_UNSET} mss_section; + eval "${return_good}"; + fi; + mss_got_one='yes'; + fi; + done; + fi; + fi; + done; + else + mss_ext="${_MAN_EXT}"; + # check for directory name having trailing extension + for d + do + mss_dir="$(dirname_append $d man${mss_section}${mss_ext})"; + exit_test; + if obj mss_dir is_dir + then + mss_prefix=\ + "$(dirname_append "${mss_dir}" "${mss_name}.${mss_section}")"; + mss_files="$( eval ls "${mss_prefix}"'*' 2>${_NULL_DEV} | + sed -e '\|not found|s|.*||' + )"; + exit_test; + if obj mss_files is_not_empty + then + # for f in $mss_files + for f in $(eval set x ${mss_files}; shift; echo1 "$@") + do + mss_f="$f"; + if obj mss_f is_file + then + if is_yes "${mss_got_one}" + then + register_file "${mss_f}"; + elif obj _MAN_ALL is_yes + then + man_register_file "${mss_f}" "${mss_name}"; + else + man_register_file "${mss_f}" "${mss_name}" "${mss_section}"; + eval ${_UNSET} mss_dir; + eval ${_UNSET} mss_ext; + eval ${_UNSET} mss_f; + eval ${_UNSET} mss_files; + eval ${_UNSET} mss_got_one; + eval ${_UNSET} mss_name; + eval ${_UNSET} mss_prefix; + eval ${_UNSET} mss_section; + eval "${return_good}"; + fi; + mss_got_one='yes'; + fi; + done; + fi; + fi; + done; + # check for files with extension in directories without extension + for d + do + mss_dir="$(dirname_append "$d" "man${mss_section}")"; + exit_test; + if obj mss_dir is_dir + then + mss_prefix="$(dirname_append "${mss_dir}" \ + "${mss_name}.${mss_section}${mss_ext}")"; + mss_files="$(eval ls "${mss_prefix}"'*' 2>${_NULL_DEV} | + sed -e '\|not found|s|.*||' + )"; + exit_test; + if obj mss_files is_not_empty + then + # for f in $mss_files + for f in $(eval set x ${mss_files}; shift; echo1 "$@") + do + mss_f="$f"; + if obj mss_f is_file + then + if is_yes "${mss_got_one}" + then + register_file "${mss_f}"; + elif obj _MAN_ALL is_yes + then + man_register_file "${mss_f}" "${mss_name}"; + else + man_register_file "${mss_f}" "${mss_name}" "${mss_section}"; + eval ${_UNSET} mss_dir; + eval ${_UNSET} mss_ext; + eval ${_UNSET} mss_f; + eval ${_UNSET} mss_files; + eval ${_UNSET} mss_got_one; + eval ${_UNSET} mss_name; + eval ${_UNSET} mss_prefix; + eval ${_UNSET} mss_section; + eval "${return_good}"; + fi; + mss_got_one='yes'; + fi; + done; + fi; + fi; + done; + fi; + if obj _MAN_ALL is_yes && is_yes "${mss_got_one}" + then + eval ${_UNSET} mss_dir; + eval ${_UNSET} mss_ext; + eval ${_UNSET} mss_f; + eval ${_UNSET} mss_files; + eval ${_UNSET} mss_got_one; + eval ${_UNSET} mss_name; + eval ${_UNSET} mss_prefix; + eval ${_UNSET} mss_section; + eval "${return_good}"; + fi; + eval ${_UNSET} mss_dir; + eval ${_UNSET} mss_ext; + eval ${_UNSET} mss_f; + eval ${_UNSET} mss_files; + eval ${_UNSET} mss_got_one; + eval ${_UNSET} mss_name; + eval ${_UNSET} mss_prefix; + eval ${_UNSET} mss_section; + eval "${return_bad}"; +} # man_search_section() + + +######################################################################## +# man_setup () +# +# Setup the variables $_MAN_* needed for man page searching. +# +# Globals: +# in: $_OPT_*, $_MANOPT_*, $LANG, $LC_MESSAGES, $LC_ALL, +# $MANPATH, $MANROFFSEQ, $MANSEC, $PAGER, $SYSTEM, $MANOPT. +# out: $_MAN_PATH, $_MAN_LANG, $_MAN_SYS, $_MAN_LANG, $_MAN_LANG2, +# $_MAN_SEC, $_MAN_ALL +# in/out: $_MAN_ENABLE +# +# The precedence for the variables related to `man' is that of GNU +# `man', i.e. +# +# $LANG; overridden by +# $LC_MESSAGES; overridden by +# $LC_ALL; this has the same precedence as +# $MANPATH, $MANROFFSEQ, $MANSEC, $PAGER, $SYSTEM; overridden by +# $MANOPT; overridden by +# the groffer command line options. +# +# Variable prefix: ms +# +man_setup() +{ + func_check main_man_setup = 0 "$@"; + + if obj _MAN_IS_SETUP is_yes + then + eval "${return_ok}"; + fi; + _MAN_IS_SETUP='yes'; + + if obj _MAN_ENABLE is_not_yes + then + eval "${return_ok}"; + fi; + + # determine basic path for man pages + _MAN_PATH="$(get_first_essential \ + "${_OPT_MANPATH}" "${_MANOPT_PATH}" "${MANPATH}")"; + exit_test; + if obj _MAN_PATH is_empty + then + manpath_set_from_path; + else + _MAN_PATH="$(path_clean "${_MAN_PATH}")"; + exit_test; + fi; + if obj _MAN_PATH is_empty + then + if is_prog 'manpath' + then + _MAN_PATH="$(manpath 2>${_NULL_DEV})"; # not always available + exit_test; + fi; + fi; + if obj _MAN_PATH is_empty + then + _MAN_ENABLE="no"; + eval "${return_ok}"; + fi; + + _MAN_ALL="$(get_first_essential "${_OPT_ALL}" "${_MANOPT_ALL}")"; + exit_test; + if obj _MAN_ALL is_empty + then + _MAN_ALL='no'; + fi; + + _MAN_SYS="$(get_first_essential \ + "${_OPT_SYSTEMS}" "${_MANOPT_SYS}" "${SYSTEM}")"; + ms_lang="$(get_first_essential \ + "${_OPT_LANG}" "${LC_ALL}" "${LC_MESSAGES}" "${LANG}")"; + exit_test; + case "${ms_lang}" in + C|POSIX) + _MAN_LANG=""; + _MAN_LANG2=""; + ;; + ?) + _MAN_LANG="${ms_lang}"; + _MAN_LANG2=""; + ;; + *) + _MAN_LANG="${ms_lang}"; + # get first two characters of $ms_lang + _MAN_LANG2="$(echo1 "${ms_lang}" | sed -e 's/^\(..\).*$/\1/')"; + exit_test; + ;; + esac; + # from now on, use only $_LANG, forget about $_OPT_LANG, $LC_*. + + manpath_add_lang_sys; # this is very slow + + _MAN_SEC="$(get_first_essential \ + "${_OPT_SECT}" "${_MANOPT_SEC}" "${MANSEC}")"; + exit_test; + if obj _MAN_PATH is_empty + then + _MAN_ENABLE="no"; + eval ${_UNSET} ms_lang; + eval "${return_ok}"; + fi; + + _MAN_EXT="$(get_first_essential \ + "${_OPT_EXTENSION}" "${_MANOPT_EXTENSION}")"; + exit_test; + eval ${_UNSET} ms_lang; + eval "${return_ok}"; +} # man_setup() + + +######################################################################## +landmark '8: manpath_*()'; +######################################################################## + +######################################################################## +# manpath_add_lang_sys () +# +# Add language and operating system specific directories to man path. +# +# Arguments : 0 +# Output : none +# Globals: +# in: $_MAN_SYS: has the form `os1,os2,...', a comma separated +# list of names of operating systems. +# $_MAN_LANG and $_MAN_LANG2: each a single name +# in/out: $_MAN_PATH: has the form `dir1:dir2:...', a colon +# separated list of directories. +# +# Variable prefix: mals +# +manpath_add_lang_sys() +{ + func_check manpath_add_lang_sys = 0 "$@"; + if obj _MAN_PATH is_empty + then + eval "${return_ok}"; + fi; + # twice test both sys and lang + eval set x "$(path_split "${_MAN_PATH}")"; + shift; + exit_test; + mals_mp=''; + for p + do # loop on man path directories + mals_mp="$(_manpath_add_lang_sys_single "${mals_mp}" "$p")"; + exit_test; + done; + eval set x "$(path_split "${mals_mp}")"; + shift; + exit_test; + for p + do # loop on man path directories + mals_mp="$(_manpath_add_lang_sys_single "${mals_mp}" "$p")"; + exit_test; + done; + _MAN_PATH="$(path_chop "${mals_mp}")"; + exit_test; + eval ${_UNSET} mals_mp; + eval "${return_ok}"; +} + + +# To the directory in $1 append existing sys/lang subdirectories +# Function is necessary to split the OS list. +# +# globals: in: $_MAN_SYS, $_MAN_LANG, $_MAN_LANG2 +# argument: 2: `man_path' and `dir' +# output: colon-separated path of the retrieved subdirectories +# +# Variable prefix: _mals +# +_manpath_add_lang_sys_single() +{ + func_check _manpath_add_lang_sys_single = 2 "$@"; + _mals_res="$1"; + _mals_parent="$2"; + eval set x "$(list_from_split "${_MAN_SYS}" ',')"; + shift; + exit_test; + for d in "$@" "${_MAN_LANG}" "${_MAN_LANG2}" + do + _mals_dir="$(dirname_append "${_mals_parent}" "$d")"; + exit_test; + if obj _mals_res path_not_contains "${_mals_dir}" && \ + obj _mals_dir is_dir + then + _mals_res="${_mals_res}:${_mals_dir}"; + fi; + done; + if path_not_contains "${_mals_res}" "${_mals_parent}" + then + _mals_res="${_mals_res}:${_mals_parent}"; + fi; + path_chop "${_mals_res}"; + eval ${_UNSET} _mals_dir; + eval ${_UNSET} _mals_parent; + eval ${_UNSET} _mals_res; + eval "${return_ok}"; +} + +# end manpath_add_lang_sys () + + +######################################################################## +# manpath_set_from_path () +# +# Determine basic search path for man pages from $PATH. +# +# Return: `0' if a valid man path was retrieved. +# Output: none +# Globals: +# in: $PATH +# out: $_MAN_PATH +# +# Variable prefix: msfp +# +manpath_set_from_path() +{ + func_check manpath_set_from_path = 0 "$@"; + + msfp_manpath=''; + + # get a basic man path from $PATH + if obj PATH is_not_empty + then + eval set x "$(path_split "${PATH}")"; + shift; + exit_test; + for d + do + # delete the final `/bin' part + msfp_base="$(echo1 "$d" | sed -e 's|//*bin/*$||')"; + exit_test; + for e in /share/man /man + do + msfp_mandir="${msfp_base}$e"; + if test -d "${msfp_mandir}" && test -r "${msfp_mandir}" + then + msfp_manpath="${msfp_manpath}:${msfp_mandir}"; + fi; + done; + done; + fi; + + # append some default directories + for d in /usr/local/share/man /usr/local/man \ + /usr/share/man /usr/man \ + /usr/X11R6/man /usr/openwin/man \ + /opt/share/man /opt/man \ + /opt/gnome/man /opt/kde/man + do + msfp_d="$d"; + if obj msfp_manpath path_not_contains "${msfp_d}" && obj mfsp_d is_dir + then + msfp_manpath="${msfp_manpath}:${mfsp_d}"; + fi; + done; + + _MAN_PATH="${msfp_manpath}"; + eval ${_UNSET} msfp_base; + eval ${_UNSET} msfp_d; + eval ${_UNSET} msfp_mandir; + eval ${_UNSET} msfp_manpath; + eval "${return_ok}"; +} # manpath_set_from_path() + + +######################################################################## +landmark '9: obj_*()'; +######################################################################## + +######################################################################## +# obj ( ...) +# +# This works like a method (object function) call for an object. +# Run " $ ...". +# +# The first argument represents an object whose data is given as first +# argument to (). +# +# Argument: >=2 +# : variable name +# : a program or function name +# +# Variable prefix: o +# +obj() +{ + func_check obj '>=' 2 "$@"; + eval o_arg1='"${'$1'}"'; + if is_empty "$2" + then + error "obj(): function name is empty." + else + o_func="$2"; + fi; + shift; + shift; + eval "${o_func}"' "${o_arg1}" "$@"'; + n="$?"; + eval ${_UNSET} o_arg1; + eval ${_UNSET} o_func; + eval "${return_var} $n"; +} # obj() + + +######################################################################## +# obj_data () +# +# Print the data of , i.e. the content of $. +# For possible later extensions. +# +# Arguments: 1 +# : a variable name +# Output: the data of +# +# Variable prefix: od +# +obj_data() +{ + func_check obj '=' 1 "$@"; + if is_empty "$1" + then + error "obj_data(): object name is empty." + fi; + eval od_res='"${'$1'}"'; + obj od_res echo1; + eval ${_UNSET} od_res; + eval "${return_ok}"; +} + + +######################################################################## +# obj_from_output ( ...) +# +# Run '$="$( ...)"' to set the result of a +# function call to a global variable. +# +# Arguments: >=2 +# : a variable name +# : the name of a function or program +# : optional argument to +# Output: none +# +# Variable prefix: ofo +# +obj_from_output() +{ + func_check obj_from_output '>=' 2 "$@"; + if is_empty "$1" + then + error "res(): variable name is empty."; + elif is_empty "$2" + then + error "res(): function name is empty." + else + ofo_result_name="$1"; + fi; + shift; + eval "${ofo_result_name}"'="$('"$@"')"'; + exit_test; + eval "${return_ok}"; +} + + +######################################################################## +# obj_set ( ) +# +# Set the data of , i.e. call "$=". +# +# Arguments: 2 +# : a variable name +# : a string +# Output:: none +# +obj_set() +{ + func_check obj_set '=' 2 "$@"; + if is_empty "$1" + then + error "obj_set(): object name is empty." + fi; + eval "$1"='"$2"'; + eval "${return_ok}"; +} + + +######################################################################## +# path_chop () +# +# Remove unnecessary colons from path. +# +# Argument: 1, a colon separated path. +# Output: path without leading, double, or trailing colons. +# +path_chop() +{ + func_check path_chop = 1 "$@"; + + # replace multiple colons by a single colon `:' + # remove leading and trailing colons + echo1 "$1" | sed -e ' +s/^:*// +s/:::*/:/g +s/:*$// +'; + eval "${return_ok}"; +} + + +######################################################################## +# path_clean () +# +# Remove non-existing directories from a colon-separated list. +# +# Argument: 1, a colon separated path. +# Output: colon-separated list of existing directories. +# +# Variable prefix: pc +# +path_clean() +{ + func_check path_clean = 1 "$@"; + if is_not_equal "$#" 1 + then + error 'path_clean() needs 1 argument.'; + fi; + pc_arg="$1"; + eval set x "$(path_split "${pc_arg}")"; + exit_test; + shift; + pc_res=""; + for i + do + pc_i="$i"; + if obj pc_i is_not_empty \ + && obj pc_res path_not_contains "${pc_i}" \ + && obj pc_i is_dir + then + case "${pc_i}" in + ?*/) + pc_res="${pc_res}$(dirname_chop "${pc_i}")"; + exit_test; + ;; + *) + pc_res="${pc_res}:${pc_i}"; + exit_test; + ;; + esac; + fi; + done; + eval ${_UNSET} pc_arg; + eval ${_UNSET} pc_i; + eval ${_UNSET} pc_res; + if path_chop "${pc_res}" + then + eval "${return_ok}"; + else + eval "${return_bad}"; + fi; +} + + +######################################################################## +# path_contains ( ) +#- +# Test whether `dir' is contained in `path', a list separated by `:'. +# +# Arguments : 2 arguments. +# Return : `0' if arg2 is substring of arg1, `1' otherwise. +# +path_contains() +{ + func_check path_contains = 2 "$@"; + case ":$1:" in + *":$2:"*) + eval "${return_yes}"; + ;; + *) + eval "${return_no}"; + ;; + esac; + eval "${return_ok}"; +} + + +######################################################################## +# path_not_contains ( ) +# +# Test whether `dir' is not contained in colon separated `path'. +# +# Arguments : 2 arguments. +# +path_not_contains() +{ + func_check path_not_contains = 2 "$@"; + if path_contains "$1" "$2" + then + eval "${return_no}"; + else + eval "${return_yes}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# path_split () +# +# In `path' escape white space and replace each colon by a space. +# +# Arguments: 1: a colon-separated path +# Output: the resulting list, process with `eval set' +# +path_split() +{ + func_check path_split = 1 "$@"; + list_from_split "$1" ':'; + eval "${return_ok}"; +} + + +######################################################################## +landmark '10: register_*()'; +######################################################################## + +######################################################################## +# register_file () +# +# Write a found file and register the title element. +# +# Arguments: 1: a file name +# Output: none +# +register_file() +{ + func_check register_file = 1 "$@"; + if is_empty "$1" + then + error 'register_file(): file name is empty'; + fi; + if is_equal "$1" '-' + then + to_tmp "${_TMP_STDIN}"; + register_title 'stdin'; + else + to_tmp "$1"; + register_title "$(base_name "$1")"; + exit_test; + fi; + eval "${return_ok}"; +} # register_file() + + +######################################################################## +# register_title () +# +# Create title element from and append to $_REGISTERED_TITLE +# +# Globals: $_REGISTERED_TITLE (rw) +# +# Variable prefix: rt +# +register_title() +{ + func_check register_title '=' 1 "$@"; + if is_empty "$1" + then + eval "${return_ok}"; + fi; + + case "${_REGISTERED_TITLE}" in + *\ *\ *\ *) + eval "${return_ok}"; + ;; + esac; + + # remove directory part + rt_title="$(base_name "$1")"; + # replace space characters by `_' + rt_title="$(echo1 "${rt_title}" | sed -e 's/[ ]/_/g')"; + # remove extension `.bz2' + rt_title="$(echo1 "${rt_title}" | sed -e 's/\.bz2$//')"; + # remove extension `.gz' + rt_title="$(echo1 "${rt_title}" | sed -e 's/\.gz$//')"; + # remove extension `.Z' + rt_title="$(echo1 "${rt_title}" | sed -e 's/\.Z$//')"; + exit_test; + + if obj rt_title is_empty + then + eval ${_UNSET} rt_title; + eval "${return_ok}"; + fi; + if obj _REGISTERED_TITLE is_empty + then + _REGISTERED_TITLE="${rt_title}"; + else + _REGISTERED_TITLE="${_REGISTERED_TITLE} ${rt_title}"; + fi; + eval ${_UNSET} rt_title; + eval "${return_ok}"; +} # register_title() + + +######################################################################## +# reset () +# +# Reset the variables that can be affected by options to their default. +# +# +# Defined in section `Preset' after the rudimentary shell tests. + + +######################################################################## +# rm_file () +# +# Remove file if $_DEBUG_KEEP_FILES allows it. +# +# Globals: $_DEBUG_KEEP_FILES +# +rm_file() +{ + func_check rm_file '=' 1 "$@"; + if is_file "$1" + then + rm -f "$1" >${_NULL_DEV} 2>&1; + fi; + if is_existing "$1" + then + eval "${return_bad}"; + else + eval "${return_good}"; + fi; +} + + +######################################################################## +# rm_file_with_debug () +# +# Remove file if $_DEBUG_KEEP_FILES allows it. +# +# Globals: $_DEBUG_KEEP_FILES +# +rm_file_with_debug() +{ + func_check rm_file_with_debug '=' 1 "$@"; + if obj _DEBUG_KEEP_FILES is_not_yes + then + if is_file "$1" + then + rm -f "$1" >${_NULL_DEV} 2>&1; + fi; + fi; + if is_existing "$1" + then + eval "${return_bad}"; + else + eval "${return_good}"; + fi; +} + + +######################################################################## +# rm_tree () +# +# Remove file if $_DEBUG_KEEP_FILES allows it. +# +# Globals: $_DEBUG_KEEP_FILES +# +rm_tree() +{ + func_check rm_tree '=' 1 "$@"; + if is_existing "$1" + then + rm -f -r "$1" >${_NULL_DEV} 2>&1; + fi; + if is_existing "$1" + then + eval "${return_bad}"; + else + eval "${return_good}"; + fi; +} + + +######################################################################## +# save_stdin () +# +# Store standard input to temporary file (with decompression). +# +# Variable prefix: ss +# +if obj _HAS_COMPRESSION is_yes +then + save_stdin() + { + func_check save_stdin '=' 0 "$@"; + ss_f="${_TMP_DIR}"/INPUT; + cat >"${ss_f}"; + cat_z "${ss_f}" >"${_TMP_STDIN}"; + rm_file "${ss_f}"; + eval ${_UNSET} ss_f; + eval "${return_ok}"; + } +else + save_stdin() + { + func_check save_stdin = 0 "$@"; + cat >"${_TMP_STDIN}"; + eval "${return_ok}"; + } +fi; + + +######################################################################## +# special_filespec () +# +# Handle special modes like whatis and apropos. +# +special_filespec() +{ + func_check special_setup '=' 0 "$@"; + if obj _OPT_APROPOS is_yes + then + if obj _OPT_WHATIS is_yes + then + error \ + 'special_setup: $_OPT_APROPOS and $_OPT_WHATIS are both "yes"'; + fi; + apropos_filespec; + eval "${return_ok}"; + fi; + if obj _OPT_WHATIS is_yes + then + whatis_filespec; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# special_setup () +# +# Handle special modes like whatis and apropos. +# +special_setup() +{ + func_check special_setup '=' 0 "$@"; + if obj _OPT_APROPOS is_yes + then + if obj _OPT_WHATIS is_yes + then + error \ + 'special_setup: $_OPT_APROPOS and $_OPT_WHATIS are both "yes"'; + fi; + apropos_setup; + eval "${return_ok}"; + fi; + if obj _OPT_WHATIS is_yes + then + whatis_header; + fi; + eval "${return_ok}"; +} + + +######################################################################## +landmark '11: stack_*()'; +######################################################################## + +######################################################################## +# string_contains ( ) +# +# Test whether `part' is contained in `string'. +# +# Arguments : 2 text arguments. +# Return : `0' if arg2 is substring of arg1, `1' otherwise. +# +string_contains() +{ + func_check string_contains '=' 2 "$@"; + case "$1" in + *"$2"*) + eval "${return_yes}"; + ;; + *) + eval "${return_no}"; + ;; + esac; + eval "${return_ok}"; +} + + +######################################################################## +# string_not_contains ( ) +# +# Test whether `part' is not substring of `string'. +# +# Arguments : 2 text arguments. +# Return : `0' if arg2 is substring of arg1, `1' otherwise. +# +string_not_contains() +{ + func_check string_not_contains '=' 2 "$@"; + if string_contains "$1" "$2" + then + eval "${return_no}"; + else + eval "${return_yes}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +landmark '12: tmp_*()'; +######################################################################## + +######################################################################## +# tmp_cat () +# +# output the temporary cat file (the concatenation of all input) +# +tmp_cat() +{ + func_check tmp_cat '=' 0 "$@"; + cat "${_TMP_CAT}"; + eval "${return_var}" "$?"; +} + + +######################################################################## +# tmp_create (?) +# +# Create temporary file. +# +# It's safe to use the shell process ID together with a suffix to +# have multiple temporary files. +# +# Globals: $_TMP_DIR +# +# Output : name of created file +# +# Variable prefix: tc +# +tmp_create() +{ + func_check tmp_create '<=' 1 "$@"; + # the output file does not have `,' as first character, so these are + # different names from the output file. + tc_tmp="${_TMP_DIR}/,$1"; + : >"${tc_tmp}" + obj tc_tmp echo1; + eval ${_UNSET} tc_tmp; + eval "${return_ok}"; +} + + +######################################################################## +# to_tmp () +# +# print file (decompressed) to the temporary cat file +# +to_tmp() +{ + func_check to_tmp '=' 1 "$@"; + if obj _TMP_CAT is_empty + then + error 'to_tmp_line: $_TMP_CAT is not yet set'; + fi; + if is_file "$1" + then + if obj _OPT_LOCATION is_yes + then + echo2 "$1"; + fi; + if obj _OPT_WHATIS is_yes + then + whatis_filename "$1" >>"${_TMP_CAT}"; + else + cat_z "$1" >>"${_TMP_CAT}"; + fi; + else + error "to_tmp(): could not read file \`$1'."; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# to_tmp_line ([]) +# +# print line to the temporary cat file +# +to_tmp_line() +{ + func_check to_tmp '>=' 0 "$@"; + if obj _TMP_CAT is_empty + then + error 'to_tmp_line: $_TMP_CAT is not yet set'; + fi; + echo1 "$*" >>"${_TMP_CAT}"; + eval "${return_ok}"; +} + + +######################################################################## +# trap_set +# +# call function on signal 0 +# +trap_set() +{ + func_check trap_set '=' 0 "$@"; + trap 'clean_up' 0 2>${_NULL_DEV} || :; + eval "${return_ok}"; +} + + +######################################################################## +# trap_unset () +# +# disable trap on signal 0. +# +trap_unset() +{ + func_check trap_unset '=' 0 "$@"; + trap '' 0 2>${_NULL_DEV} || :; + eval "${return_ok}"; +} + + +######################################################################## +# usage () +# +# print usage information to stderr; for groffer option --help. +# +usage() +{ + func_check usage = 0 "$@"; + echo; + version; + echo1 'Usage: groffer [option]... [filespec]...'; + cat <&1 | sed -e '/^ *$/q' | sed -e '1s/^/is part of /'; + eval "${return_ok}"; +} + + +######################################################################## +# warning () +# +# Print warning to stderr +# +warning() +{ + echo2 "warning: $*"; +} + + +######################################################################## +# whatis_filename () +# +# Interpret as a man page and display its `whatis' +# information as a fragment written in the groff language. +# +# Variable prefix: wf +# +whatis_filename() +{ + func_check whatis_filename = 1 "$@"; + wf_arg="$1"; + if obj wf_arg is_not_file + then + error "whatis_filename(): argument is not a readable file." + fi; + wf_dot='^\.'"${_SPACE_SED}"'*'; + if obj _FILESPEC_ARG is_equal '-' + then + wf_arg='stdin'; + fi; + cat <) +# +# Output path of a program if in $PATH. +# +# Arguments : >=1 (empty allowed) +# more args are ignored, this allows to specify progs with arguments +# Return : `0' if arg1 is a program in $PATH, `1' otherwise. +# +# Variable prefix: w +# +where_is() +{ + func_check where_is '>=' 1 "$@"; + w_arg="$1"; + if obj w_arg is_empty + then + eval ${_UNSET} w_arg; + eval "${return_bad}"; + fi; + case "${w_arg}" in + /*) + eval ${_UNSET} w_arg; + eval ${_UNSET} w_file; + if test -f "${w_arg}" && test -x "${w_arg}" + then + eval "${return_ok}"; + else + eval "${return_bad}"; + fi; + ;; + esac; + eval set x "$(path_split "${PATH}")"; + exit_test; + shift; + for p + do + case "$p" in + */) w_file=${p}${w_arg}; ;; + *) w_file=${p}/${w_arg}; ;; + esac; + if test -f "${w_file}" && test -x "${w_file}" + then + obj w_file echo1; + eval ${_UNSET} w_arg; + eval ${_UNSET} w_file; + eval "${return_ok}"; + fi; + done; + eval ${_UNSET} w_arg; + eval ${_UNSET} w_file; + eval "${return_bad}"; +} + + +######################################################################## +# main* Functions +######################################################################## + +# The main area contains the following parts: +# - main_init(): initialize temporary files and set exit trap +# - main_parse_MANOPT(): parse $MANOPT +# - main_parse_args(): argument parsing +# - main_set_mode (): determine the display mode +# - main_do_fileargs(): process filespec arguments +# - main_set_resources(): setup X resources +# - main_display(): do the displaying +# - main(): the main function that calls all main_*() + + +####################################################################### +# main_init () +# +# set exit trap and create temporary files +# +# Globals: $_TMP_DIR, $_TMP_CAT, $_TMP_STDIN +# +# Variable prefix: mi +# +main_init() +{ + func_check main_init = 0 "$@"; + # call clean_up() on shell termination. + trap_set; + + # create temporary directory + umask 0022; + _TMP_DIR=''; + for d in "${GROFF_TMPDIR}" "${TMPDIR}" "${TMP}" "${TEMP}" \ + "${TEMPDIR}" "${HOME}"'/tmp' '/tmp' "${HOME}" '.' + do + mi_dir="$d"; + if obj mi_dir is_empty || obj mi_dir is_not_dir || \ + obj mi_dir is_not_writable + then + continue; + fi; + + case "${mi_dir}" in + */) + _TMP_DIR="${mi_dir}"; + ;; + *) + _TMP_DIR="${mi_dir}"'/'; + ;; + esac; + _TMP_DIR="${_TMP_DIR}groffer${_PROCESS_ID}"; + if obj _TMP_DIR rm_tree + then + : + else + mi_tdir_="${_TMP_DIR}"_; + mi_n=1; + mi_tdir_n="${mi_tdir_}${mi_n}"; + while obj mi_tdir_n is_existing + do + if obj mi_tdir_n rm_tree + then + # directory could not be removed + mi_n="$(expr "${mi_n}" + 1)"; + mi_tdir_n="${mi_tdir_}${mi_n}"; + continue; + fi; + done; + _TMP_DIR="${mi_tdir_n}"; + fi; + eval mkdir "${_TMP_DIR}"; + if is_not_equal "$?" 0 + then + obj _TMP_DIR rm_tree; + _TMP_DIR=''; + continue; + fi; + if obj _TMP_DIR is_dir && obj _TMP_DIR is_writable + then + # $_TMP_DIR can now be used as temporary directory + break; + fi; + obj _TMP_DIR rm_tree; + _TMP_DIR=''; + continue; + done; + if obj _TMP_DIR is_empty + then + error "main_init: \ +Couldn't create a directory for storing temporary files."; + fi; + if obj _DEBUG_PRINT_TMPDIR is_yes + then + echo2 "temporary directory: ${_TMP_DIR}"; + fi; + + _TMP_CAT="$(tmp_create groffer_cat)"; + _TMP_STDIN="$(tmp_create groffer_input)"; + exit_test; + + eval ${_UNSET} mi_dir; + eval ${_UNSET} mi_n; + eval ${_UNSET} mi_tdir_; + eval ${_UNSET} mi_tdir_n; + eval "${return_ok}"; +} # main_init() + + +######################################################################## +# main_parse_MANOPT () +# +# Parse $MANOPT to retrieve man options, but only if it is a non-empty +# string; found man arguments can be overwritten by the command line. +# +# Globals: +# in: $MANOPT, $_OPTS_MANOPT_* +# out: $_MANOPT_* +# +# Variable prefix: mpm +# +main_parse_MANOPT() +{ + func_check main_parse_MANOPT = 0 "$@"; + + if obj MANOPT is_not_empty + then + # Delete leading and final spaces + MANOPT="$(echo1 "${MANOPT}" | sed -e ' +s/^'"${_SPACE_SED}"'*// +s/'"${_SPACE_SED}"'*$// +')"; + exit_test; + fi; + if obj MANOPT is_empty + then + eval "${return_ok}"; + fi; + + mpm_list=''; + # add arguments in $MANOPT by mapping them to groffer options + eval set x "$(list_from_cmdline _OPTS_MANOPT "${MANOPT}")"; + exit_test; + shift; + until test "$#" -le 0 || is_equal "$1" '--' + do + mpm_opt="$1"; + shift; + case "${mpm_opt}" in + -7|--ascii) + list_append mpm_list '--ascii'; + ;; + -a|--all) + list_append mpm_list '--all'; + ;; + -c|--catman) + do_nothing; + shift; + ;; + -d|--debug) + do_nothing; + ;; + -D|--default) + # undo all man options so far + mpm_list=''; + ;; + -e|--extension) + list_append mpm_list '--extension'; + shift; + ;; + -f|--whatis) + list_append mpm_list '--whatis'; + shift; + ;; + -h|--help) + do_nothing; + shift; + ;; + -k|--apropos) + # groffer's --apropos takes an argument, but man's does not, so + do_nothing; + ;; + -l|--local-file) + do_nothing; + ;; + -L|--locale) + list_append mpm_list '--locale' "$1"; + shift; + ;; + -m|--systems) + list_append mpm_list '--systems' "$1"; + shift; + ;; + -M|--manpath) + list_append mpm_list '--manpath' "$1"; + shift; + ;; + -p|--preprocessor) + do_nothing; + shift; + ;; + -P|--pager) + list_append mpm_list '--pager' "$1"; + shift; + ;; + -r|--prompt) + do_nothing; + shift; + ;; + -S|--sections) + list_append mpm_list '--sections' "$1"; + shift; + ;; + -t|--troff) + do_nothing; + shift; + ;; + -T|--device) + list_append mpm_list '-T' "$1"; + shift; + ;; + -u|--update) + do_nothing; + shift; + ;; + -V|--version) + do_nothing; + ;; + -w|--where|--location) + list_append mpm_list '--location'; + ;; + -Z|--ditroff) + do_nothing; + ;; + # ignore all other options + esac; + done; + + # prepend $mpm_list to the command line + if obj mpm_list is_not_empty + then + eval set x "${mpm_list}" '"$@"'; + shift; + fi; + + eval ${_UNSET} mpm_list; + eval ${_UNSET} mpm_opt; + eval "${return_ok}"; +} # main_parse_MANOPT() + + +######################################################################## +# main_parse_args (*) +# +# Parse arguments; process options and filespec parameters +# +# Arguments: pass the command line arguments unaltered. +# Globals: +# in: $_OPTS_* +# out: $_OPT_*, $_ADDOPTS, $_FILEARGS +# +# Variable prefix: mpa +# +main_parse_args() +{ + func_check main_parse_args '>=' 0 "$@"; + _ALL_PARAMS="$(list_from_cmdline _OPTS_CMDLINE "$@")"; + exit_test; + if obj _DEBUG_PRINT_PARAMS is_yes + then + echo2 "parameters: ${_ALL_PARAMS}"; + fi; + eval set x "${_ALL_PARAMS}"; + shift; + + # By the call of `eval', unnecessary quoting was removed. So the + # positional shell parameters ($1, $2, ...) are now guaranteed to + # represent an option or an argument to the previous option, if any; + # then a `--' argument for separating options and + # parameters; followed by the filespec parameters if any. + + # Note, the existence of arguments to options has already been checked. + # So a check for `$#' or `--' should not be done for arguments. + + until test "$#" -le 0 || is_equal "$1" '--' + do + mpa_opt="$1"; # $mpa_opt is fed into the option handler + shift; + case "${mpa_opt}" in + -h|--help) + usage; + leave; + ;; + -Q|--source) # output source code (`Quellcode'). + _OPT_MODE='source'; + ;; + -T|--device|--troff-device) # device; arg + _OPT_DEVICE="$1"; + _check_device_with_mode; + shift; + ;; + -v|--version) + version; + leave; + ;; + -V) + _OPT_V='yes'; + ;; + -Z|--ditroff|--intermediate-output) # groff intermediate output + _OPT_Z='yes'; + ;; + -X) + if is_X + then + _OPT_MODE=X; + fi; + ;; + -?) + # delete leading `-' + mpa_optchar="$(echo1 "${mpa_opt}" | sed -e 's/^-//')"; + exit_test; + if list_has _OPTS_GROFF_SHORT_NA "${mpa_optchar}" + then + list_append _ADDOPTS_GROFF "${mpa_opt}"; + elif list_has _OPTS_GROFF_SHORT_ARG "${mpa_optchar}" + then + list_append _ADDOPTS_GROFF "${mpa_opt}" "$1"; + shift; + else + error "main_parse_args(): Unknown option : \`$1'"; + fi; + ;; + --all) + _OPT_ALL='yes'; + ;; + --apropos) # run `apropos' + _OPT_APROPOS='yes'; + _APROPOS_SECTIONS=''; + _OPT_WHATIS='no'; + ;; + --apropos-data) # run `apropos' for data sections + _OPT_APROPOS='yes'; + _APROPOS_SECTIONS='457'; + _OPT_WHATIS='no'; + ;; + --apropos-devel) # run `apropos' for development sections + _OPT_APROPOS='yes'; + _APROPOS_SECTIONS='239'; + _OPT_WHATIS='no'; + ;; + --apropos-progs) # run `apropos' for program sections + _OPT_APROPOS='yes'; + _APROPOS_SECTIONS='168'; + _OPT_WHATIS='no'; + ;; + --ascii) + list_append _ADDOPTS_GROFF '-mtty-char'; + if obj _OPT_MODE is_empty + then + _OPT_MODE='text'; + fi; + ;; + --auto) # the default automatic mode + _OPT_MODE=''; + ;; + --bd) # border color for viewers, arg; + _OPT_BD="$1"; + shift; + ;; + --bg|--backgroud) # background color for viewers, arg; + _OPT_BG="$1"; + shift; + ;; + --bw) # border width for viewers, arg; + _OPT_BW="$1"; + shift; + ;; + --debug|--debug-all|--debug-keep|--debug-lm|--debug-params|\ +--debug-shell|--debug-stacks|--debug-tmpdir|--debug-user) + # debug is handled at the beginning + :; + ;; + --default) # reset variables to default + reset; + ;; + --default-modes) # sequence of modes in auto mode; arg + _OPT_DEFAULT_MODES="$1"; + shift; + ;; + --display) # set X display, arg + _OPT_DISPLAY="$1"; + shift; + ;; + --do-nothing) + _OPT_DO_NOTHING='yes'; + ;; + --dvi) + if is_X + then + _OPT_MODE='dvi'; + fi; + ;; + --dvi-viewer) # viewer program for dvi mode; arg + _VIEWER_TERMINAL='no'; + _OPT_VIEWER_DVI="$1"; + shift; + ;; + --dvi-viewer-tty) # viewer program for dvi mode in tty; arg + _VIEWER_TERMINAL='yes'; + _OPT_VIEWER_DVI="$1"; + shift; + ;; + --extension) # the extension for man pages, arg + _OPT_EXTENSION="$1"; + shift; + ;; + --fg|--foreground) # foreground color for viewers, arg; + _OPT_FG="$1"; + shift; + ;; + --fn|--font) # set font for viewers, arg; + _OPT_FN="$1"; + shift; + ;; + --geometry) # window geometry for viewers, arg; + _OPT_GEOMETRY="$1"; + shift; + ;; + --groff) + _OPT_MODE='groff'; + ;; + --html|--www) # display with web browser + _OPT_MODE=html; + ;; + --html-viewer|--www-viewer) # viewer program for html mode; arg + _VIEWER_TERMINAL='no'; + _OPT_VIEWER_HTML="$1"; + shift; + ;; + --html-viewer-tty|--www-viewer-tty) # viewer for html mode in tty; arg + _VIEWER_TERMINAL='yes'; + _OPT_VIEWER_HTML="$1"; + shift; + ;; + --iconic) # start viewers as icons + _OPT_ICONIC='yes'; + ;; + --locale) # set language for man pages, arg + # argument is xx[_territory[.codeset[@modifier]]] (ISO 639,...) + _OPT_LANG="$1"; + shift; + ;; + --local-file) # force local files; same as `--no-man' + _MAN_FORCE='no'; + _MAN_ENABLE='no'; + ;; + --location|--where) # print file locations to stderr + _OPT_LOCATION='yes'; + ;; + --man) # force all file params to be man pages + _MAN_ENABLE='yes'; + _MAN_FORCE='yes'; + ;; + --manpath) # specify search path for man pages, arg + # arg is colon-separated list of directories + _OPT_MANPATH="$1"; + shift; + ;; + --mode) # display mode + mpa_arg="$1"; + shift; + case "${mpa_arg}" in + auto|'') # search mode automatically among default + _OPT_MODE=''; + ;; + groff) # pass input to plain groff + _OPT_MODE='groff'; + ;; + html|www) # display with a web browser + _OPT_MODE='html'; + ;; + dvi) # display with xdvi viewer + if is_X + then + _OPT_MODE='dvi'; + fi; + ;; + pdf) # display with PDF viewer + if is_X + then + _OPT_MODE='pdf'; + fi; + ;; + ps) # display with Postscript viewer + if is_X + then + _OPT_MODE='ps'; + fi; + ;; + text) # output on terminal + _OPT_MODE='text'; + ;; + tty) # output on terminal + _OPT_MODE='tty'; + ;; + X|x) # output on X roff viewer + if is_X + then + _OPT_MODE='x'; + fi; + ;; + Q|source) # display source code + _OPT_MODE="source"; + ;; + *) + error "main_parse_args(): unknown mode ${mpa_arg}"; + ;; + esac; + ;; + --no-location) # disable former call to `--location' + _OPT_LOCATION='yes'; + ;; + --no-man) # disable search for man pages + # the same as --local-file + _MAN_FORCE='no'; + _MAN_ENABLE='no'; + ;; + --no-special) # disable some special former calls + _OPT_ALL='no' + _OPT_APROPOS='no' + _OPT_WHATIS='no' + ;; + --pager|--tty-viewer|--tty-viewer-tty) + # set paging program for tty mode, arg + _VIEWER_TERMINAL='yes'; + _OPT_PAGER="$1"; + shift; + ;; + --pdf) + if is_X + then + _OPT_MODE='pdf'; + fi; + ;; + --pdf-viewer) # viewer program for ps mode; arg + _VIEWER_TERMINAL='no'; + _OPT_VIEWER_PDF="$1"; + shift; + ;; + --pdf-viewer-tty) # viewer program for ps mode in tty; arg + _VIEWER_TERMINAL='yes'; + _OPT_VIEWER_PDF="$1"; + shift; + ;; + --print) # for argument test + echo2 "$1"; + shift; + ;; + --ps) + if is_X + then + _OPT_MODE='ps'; + fi; + ;; + --ps-viewer) # viewer program for ps mode; arg + _VIEWER_TERMINAL='no'; + _OPT_VIEWER_PS="$1"; + shift; + ;; + --ps-viewer-tty) # viewer program for ps mode in tty; arg + _VIEWER_TERMINAL='yes'; + _OPT_VIEWER_PS="$1"; + shift; + ;; + --resolution) # set resolution for X devices, arg + mpa_arg="$1"; + shift; + case "${mpa_arg}" in + 75|75dpi) + mpa_dpi=75; + ;; + 100|100dpi) + mpa_dpi=100; + ;; + *) + error "main_parse_args(): \ +only resoutions of 75 or 100 dpi are supported"; + ;; + esac; + _OPT_RESOLUTION="${mpa_dpi}"; + ;; + --rv) + _OPT_RV='yes'; + ;; + --sections) # specify sections for man pages, arg + # arg is colon-separated list of section names + _OPT_SECTIONS="$1"; + shift; + ;; + --shell) + # already done during the first run; so ignore the argument + shift; + ;; + --systems) # man pages for different OS's, arg + # argument is a comma-separated list + _OPT_SYSTEMS="$1"; + shift; + ;; + --text) # text mode without pager + _OPT_MODE=text; + ;; + --title) # title for X viewers; arg + _OPT_TITLE="$1"; + shift; + ;; + --tty) # tty mode, text with pager + _OPT_MODE=tty; + ;; + --text-device|--tty-device) # device for tty mode; arg + _OPT_TEXT_DEVICE="$1"; + shift; + ;; + --whatis) + _OPT_WHATIS='yes'; + _OPT_ALL='yes'; + _OPT_APROPOS='no'; + ;; + --X|--x) + if is_X + then + _OPT_MODE=x; + fi; + ;; + --xrm) # pass X resource string, arg; + list_append _OPT_XRM "$1"; + shift; + ;; + --x-viewer|--X-viewer) # viewer program for x mode; arg + _VIEWER_TERMINAL='no'; + _OPT_VIEWER_X="$1"; + shift; + ;; + --x-viewer-tty|--X-viewer-tty) # viewer program for x mode in tty; arg + _VIEWER_TERMINAL='yes'; + _OPT_VIEWER_X="$1"; + shift; + ;; + *) + error 'main_parse_args(): error on argument parsing : '"\`$*'"; + ;; + esac; + done; + shift; # remove `--' argument + + if obj _OPT_DO_NOTHING is_yes + then + leave; + fi; + + # Remaining arguments are file names (filespecs). + # Save them to list $_FILEARGS + if is_equal "$#" 0 + then # use "-" for standard input + set x '-'; + shift; + fi; + _FILEARGS=''; + list_append _FILEARGS "$@"; + if list_has _FILEARGS '-' + then + save_stdin; + fi; + # $_FILEARGS must be retrieved with `eval set x "$_FILEARGS"; shift;' + eval ${_UNSET} mpa_arg; + eval ${_UNSET} mpa_dpi; + eval ${_UNSET} mpa_opt; + eval ${_UNSET} mpa_optchar; + eval "${return_ok}"; +} # main_parse_args() + + +# Called from main_parse_args() because double `case' is not possible. +# Globals: $_OPT_DEVICE, $_OPT_MODE +_check_device_with_mode() +{ + func_check _check_device_with_mode = 0 "$@"; + case "${_OPT_DEVICE}" in + dvi) + _OPT_MODE=dvi; + eval "${return_ok}"; + ;; + html) + _OPT_MODE=html; + eval "${return_ok}"; + ;; + lbp|lj4) + _OPT_MODE=groff; + eval "${return_ok}"; + ;; + ps) + _OPT_MODE=ps; + eval "${return_ok}"; + ;; + ascii|cp1047|latin1|utf8) + if obj _OPT_MODE is_not_equal text + then + _OPT_MODE=tty; # default text mode + fi; + eval "${return_ok}"; + ;; + X*) + _OPT_MODE=x; + eval "${return_ok}"; + ;; + *) # unknown device, go to groff mode + _OPT_MODE=groff; + eval "${return_ok}"; + ;; + esac; + eval "${return_error}"; +} # _check_device_with_mode() of main_parse_args() + + +######################################################################## +# main_set_mode () +# +# Determine the display mode. +# +# Globals: +# in: $DISPLAY, $_OPT_MODE, $_OPT_DEVICE +# out: $_DISPLAY_MODE +# +# Variable prefix: msm +# +main_set_mode() +{ + func_check main_set_mode = 0 "$@"; + + # set display + if obj _OPT_DISPLAY is_not_empty + then + DISPLAY="${_OPT_DISPLAY}"; + fi; + + if obj _OPT_V is_yes + then + list_append _ADDOPTS_GROFF '-V'; + fi; + if obj _OPT_Z is_yes + then + _DISPLAY_MODE='groff'; + list_append _ADDOPTS_GROFF '-Z'; + fi; + if obj _OPT_MODE is_equal 'groff' + then + _DISPLAY_MODE='groff'; + fi; + if obj _DISPLAY_MODE is_equal 'groff' + then + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + eval "${return_ok}"; + fi; + + if obj _OPT_MODE is_equal 'source' + then + _DISPLAY_MODE='source'; + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + eval "${return_ok}"; + fi; + + case "${_OPT_MODE}" in + '') # automatic mode + case "${_OPT_DEVICE}" in + X*) + if is_not_X + then + error_user "no X display found for device ${_OPT_DEVICE}"; + fi; + _DISPLAY_MODE='x'; + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + eval "${return_ok}"; + ;; + ascii|cp1047|latin1|utf8) + if obj _DISPLAY_MODE is_not_equal 'text' + then + _DISPLAY_MODE='tty'; + fi; + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + eval "${return_ok}"; + ;; + esac; + if is_not_X + then + _DISPLAY_MODE='tty'; + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + eval "${return_ok}"; + fi; + + if obj _OPT_DEFAULT_MODES is_empty + then + msm_modes="${_DEFAULT_MODES}"; + else + msm_modes="${_OPT_DEFAULT_MODES}"; + fi; + ;; + text) + _DISPLAY_MODE='text'; + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + eval "${return_ok}"; + ;; + tty) + _DISPLAY_MODE='tty'; + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + eval "${return_ok}"; + ;; + html) + _DISPLAY_MODE='html'; + msm_modes="${_OPT_MODE}"; + ;; + *) # display mode was given + if is_not_X + then + error_user "You must be in X Window for ${_OPT_MODE} mode."; + fi; + msm_modes="${_OPT_MODE}"; + ;; + esac; + + # only viewer modes are left + eval set x "$(list_from_split "${msm_modes}" ',')"; + exit_test; + shift; + while test "$#" -gt 0 + do + m="$1"; + shift; + case "$m" in + dvi) + if obj _OPT_VIEWER_DVI is_not_empty + then + msm_viewer="${_OPT_VIEWER_DVI}"; + else + msm_viewer="$(_get_first_prog "$_VIEWER_DVI}")"; + exit_test; + fi; + if obj msm_viewer is_empty + then + error 'No viewer for dvi mode available.'; + fi; + if is_not_equal "$?" 0 + then + continue; + fi; + _DISPLAY_PROG="${msm_viewer}"; + _DISPLAY_MODE="dvi"; + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + eval "${return_ok}"; + ;; + html) + if obj _OPT_VIEWER_HTML is_not_empty + then + msm_viewer="${_OPT_VIEWER_HTML}"; + else + if is_X + then + msm_viewers="${_VIEWER_HTML_X}"; + else + msm_viewers="${_VIEWER_HTML_TTY}"; + fi; + msm_viewer="$(_get_first_prog "${msm_viewers}")"; + exit_test; + fi; + if obj msm_viewer is_empty + then + error 'No viewer for html mode available.'; + fi; + if is_not_equal "$?" 0 + then + continue; + fi; + _DISPLAY_PROG="${msm_viewer}"; + _DISPLAY_MODE=html; + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + eval "${return_ok}"; + ;; + pdf) + if obj _OPT_VIEWER_PDF is_not_empty + then + msm_viewer="${_OPT_VIEWER_PDF}"; + else + msm_viewer="$(_get_first_prog "${_VIEWER_PDF}")"; + exit_test; + fi; + if obj msm_viewer is_empty + then + error 'No viewer for pdf mode available.'; + fi; + if is_not_equal "$?" 0 + then + continue; + fi; + _DISPLAY_PROG="${msm_viewer}"; + _DISPLAY_MODE="pdf"; + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + eval "${return_ok}"; + ;; + ps) + if obj _OPT_VIEWER_PS is_not_empty + then + msm_viewer="${_OPT_VIEWER_PS}"; + else + msm_viewer="$(_get_first_prog "${_VIEWER_PS}")"; + exit_test; + fi; + if obj msm_viewer is_empty + then + error 'No viewer for ps mode available.'; + fi; + if is_not_equal "$?" 0 + then + continue; + fi; + _DISPLAY_PROG="${msm_viewer}"; + _DISPLAY_MODE="ps"; + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + eval "${return_ok}"; + ;; + text) + _DISPLAY_MODE='text'; + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + eval "${return_ok}"; + ;; + tty) + _DISPLAY_MODE='tty'; + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + eval "${return_ok}"; + ;; + x) + if obj _OPT_VIEWER_X is_not_empty + then + msm_viewer="${_OPT_VIEWER_X}"; + else + msm_viewer="$(_get_first_prog "${_VIEWER_X}")"; + exit_test; + fi; + if obj msm_viewer is_empty + then + error 'No viewer for x mode available.'; + fi; + if is_not_equal "$?" 0 + then + continue; + fi; + _DISPLAY_PROG="${msm_viewer}"; + _DISPLAY_MODE='x'; + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + eval "${return_ok}"; + ;; + X) + _DISPLAY_MODE='X'; + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + eval "${return_ok}"; + ;; + esac; + done; + eval ${_UNSET} msm_modes; + eval ${_UNSET} msm_viewer; + eval ${_UNSET} msm_viewers; + error_user "No suitable display mode found."; +} # main_set_mode() + + +# _get_first_prog () +# +# Retrieve first argument that represents an existing program in $PATH. +# Local function for main_set_mode(). +# +# Arguments: 1; a comma-separated list of commands (with options), +# like $_VIEWER_*. +# +# Return : `1' if none found, `0' if found. +# Output : the argument that succeded. +# +# Variable prefix: _gfp +# +_get_first_prog() +{ + if is_equal "$#" 0 + then + error "_get_first_prog() needs 1 argument."; + fi; + if is_empty "$1" + then + return "${_BAD}"; + fi; + eval set x "$(list_from_split "$1" ',')"; + exit_test; + shift; + for i + do + _gfp_i="$i"; + if obj _gfp_i is_empty + then + continue; + fi; + if eval is_prog "$(get_first_essential ${_gfp_i})" + then + exit_test; + obj _gfp_i echo1; + eval ${_UNSET} _gfp_i; + return "${_GOOD}"; + fi; + done; + eval ${_UNSET} _gfp_i; + return "${_BAD}"; +} # _get_first_prog() of main_set_mode() + + +####################################################################### +# main_do_fileargs () +# +# Process filespec arguments in $_FILEARGS. +# +# Globals: +# in: $_FILEARGS (process with `eval set x "$_FILEARGS"; shift;') +# +# Variable prefix: mdfa +# +main_do_fileargs() +{ + func_check main_do_fileargs = 0 "$@"; + special_setup; + eval set x "${_FILEARGS}"; + shift; + eval ${_UNSET} _FILEARGS; + # temporary storage of all input to $_TMP_CAT + while test "$#" -ge 2 + do + # test for `s name' arguments, with `s' a 1-char standard section + mdfa_filespec="$1"; + _FILESPEC_ARG="$1"; + shift; + case "${mdfa_filespec}" in + '') + continue; + ;; + '-') + special_filespec; + if obj _OPT_APROPOS is_yes + then + continue; + fi; + register_file '-' + continue; + ;; + ?) + if obj _OPT_APROPOS is_yes + then + special_filespec; + continue; + fi; + if list_has_not _MAN_AUTO_SEC_LIST "${mdfa_filespec}" + then + special_filespec; + do_filearg "${mdfa_filespec}" + continue; + fi; + mdfa_name="$1"; + _FILESPEC_ARG="${_FILESPEC_ARG} $1"; + special_filespec; + case "${mdfa_name}" in + */*|man:*|*\(*\)|*."${mdfa_filespec}") + do_filearg "${mdfa_filespec}" + continue; + ;; + esac; + shift; + if do_filearg "man:${mdfa_name}(${mdfa_filespec})" + then + continue; + else + do_filearg "${mdfa_filespec}" + continue; + fi; + ;; + *) + special_filespec; + if obj _OPT_APROPOS is_yes + then + continue; + fi; + do_filearg "${mdfa_filespec}" + continue; + ;; + esac; + done; # end of `s name' test + while test "$#" -gt 0 + do + mdfa_filespec="$1"; + _FILESPEC_ARG="$1"; + shift; + special_filespec; + if obj _OPT_APROPOS is_yes + then + continue; + fi; + do_filearg "${mdfa_filespec}" + done; + obj _TMP_STDIN rm_file_with_debug; + eval ${_UNSET} mdfa_filespec; + eval ${_UNSET} mdfa_name; + eval "${return_ok}"; +} # main_do_fileargs() + + +######################################################################## +# main_set_resources () +# +# Determine options for setting X resources with $_DISPLAY_PROG. +# +# Globals: $_DISPLAY_PROG, $_OUTPUT_FILE_NAME +# +# Variable prefix: msr +# +main_set_resources() +{ + func_check main_set_resources = 0 "$@"; + # $msr_prog viewer program + # $msr_rl resource list + msr_title="$(get_first_essential \ + "${_OPT_TITLE}" "${_REGISTERED_TITLE}")"; + exit_test; + _OUTPUT_FILE_NAME=''; + eval set x "${msr_title}"; + shift; + until is_equal "$#" 0 + do + msr_n="$1"; + case "${msr_n}" in + '') + continue; + ;; + ,*) + msr_n="$(echo1 "$1" | sed -e 's/^,,*//')"; + exit_test; + ;; + esac + if obj msr_n is_empty + then + continue; + fi; + if obj _OUTPUT_FILE_NAME is_not_empty + then + _OUTPUT_FILE_NAME="${_OUTPUT_FILE_NAME}"','; + fi; + _OUTPUT_FILE_NAME="${_OUTPUT_FILE_NAME}${msr_n}"; + shift; + done; + case "${_OUTPUT_FILE_NAME}" in + '') + _OUTPUT_FILE_NAME='-'; + ;; + ,*) + error "main_set_resources(): ${_OUTPUT_FILE_NAME} starts with a comma."; + ;; + esac; + _OUTPUT_FILE_NAME="${_TMP_DIR}/${_OUTPUT_FILE_NAME}"; + + if obj _DISPLAY_PROG is_empty + then # for example, for groff mode + _DISPLAY_ARGS=''; + eval ${_UNSET} msr_n; + eval ${_UNSET} msr_prog; + eval ${_UNSET} msr_rl; + eval ${_UNSET} msr_title; + eval "${return_ok}"; + fi; + + eval set x "${_DISPLAY_PROG}"; + shift; + msr_prog="$(base_name "$1")"; + exit_test; + shift; + if test $# != 0 + then + if obj _DISPLAY_PROG is_empty + then + _DISPLAY_ARGS="$*"; + else + _DISPLAY_ARGS="$* ${_DISPLAY_ARGS}"; + fi; + fi; + msr_rl=''; + if obj _OPT_BD is_not_empty + then + case "${msr_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + list_append msr_rl '-bd' "${_OPT_BD}"; + ;; + esac; + fi; + if obj _OPT_BG is_not_empty + then + case "${msr_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + list_append msr_rl '-bg' "${_OPT_BG}"; + ;; + kghostview) + list_append msr_rl '--bg' "${_OPT_BG}"; + ;; + xpdf) + list_append msr_rl '-papercolor' "${_OPT_BG}"; + ;; + esac; + fi; + if obj _OPT_BW is_not_empty + then + case "${msr_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + _list_append msr_rl '-bw' "${_OPT_BW}"; + ;; + esac; + fi; + if obj _OPT_FG is_not_empty + then + case "${msr_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + list_append msr_rl '-fg' "${_OPT_FG}"; + ;; + kghostview) + list_append msr_rl '--fg' "${_OPT_FG}"; + ;; + esac; + fi; + if is_not_empty "${_OPT_FN}" + then + case "${msr_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + list_append msr_rl '-fn' "${_OPT_FN}"; + ;; + kghostview) + list_append msr_rl '--fn' "${_OPT_FN}"; + ;; + esac; + fi; + if is_not_empty "${_OPT_GEOMETRY}" + then + case "${msr_prog}" in + ghostview|gv|gxditview|xditview|xdvi|xpdf) + list_append msr_rl '-geometry' "${_OPT_GEOMETRY}"; + ;; + kghostview) + list_append msr_rl '--geometry' "${_OPT_GEOMETRY}"; + ;; + esac; + fi; + if is_empty "${_OPT_RESOLUTION}" + then + _OPT_RESOLUTION="${_DEFAULT_RESOLUTION}"; + case "${msr_prog}" in + gxditview|xditview) + list_append msr_rl '-resolution' "${_DEFAULT_RESOLUTION}"; + ;; + xpdf) + case "${_DEFAULT_RESOLUTION}" in + 75) + # 72dpi is '100' + list_append msr_rl '-z' '104'; + ;; + 100) + list_append msr_rl '-z' '139'; + ;; + esac; + ;; + esac; + else + case "${msr_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + list_append msr_rl '-resolution' "${_OPT_RESOLUTION}"; + ;; + xpdf) + case "${_OPT_RESOLUTION}" in + 75) + list_append msr_rl '-z' '104'; + # '100' corresponds to 72dpi + ;; + 100) + list_append msr_rl '-z' '139'; + ;; + esac; + ;; + esac; + fi; + if is_yes "${_OPT_ICONIC}" + then + case "${msr_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + list_append msr_rl '-iconic'; + ;; + esac; + fi; + if is_yes "${_OPT_RV}" + then + case "${msr_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + list_append msr_rl '-rv'; + ;; + esac; + fi; + if is_not_empty "${_OPT_XRM}" + then + case "${msr_prog}" in + ghostview|gv|gxditview|xditview|xdvi|xpdf) + eval set x "${_OPT_XRM}"; + shift; + for i + do + list_append msr_rl '-xrm' "$i"; + done; + ;; + esac; + fi; + if is_not_empty "${msr_title}" + then + case "${msr_prog}" in + gxditview|xditview) + list_append msr_rl '-title' "${msr_title}"; + ;; + esac; + fi; + _DISPLAY_ARGS="${msr_rl}"; + eval ${_UNSET} msr_n; + eval ${_UNSET} msr_prog; + eval ${_UNSET} msr_rl; + eval ${_UNSET} msr_title; + eval "${return_ok}"; +} # main_set_resources + + +######################################################################## +# main_display () +# +# Do the actual display of the whole thing. +# +# Globals: +# in: $_DISPLAY_MODE, $_OPT_DEVICE, +# $_ADDOPTS_GROFF, $_ADDOPTS_POST, $_ADDOPTS_X, +# $_TMP_CAT, $_OPT_PAGER, $PAGER, $_MANOPT_PAGER, +# $_OUTPUT_FILE_NAME +# +# Variable prefix: md +# +main_display() +{ + func_check main_display = 0 "$@"; + + export md_addopts; + export md_groggy; + export md_modefile; + + if obj _TMP_CAT is_non_empty_file + then + md_modefile="${_OUTPUT_FILE_NAME}"; + else + echo2 'groffer: empty input.'; + clean_up; + eval ${_UNSET} md_modefile; + eval "${return_ok}"; + fi; + + # go to the temporary directory to be able to access internal data files + cd "${_TMP_DIR}" >"${_NULL_DEV}" 2>&1; + + case "${_DISPLAY_MODE}" in + groff) + _ADDOPTS_GROFF="${_ADDOPTS_GROFF} ${_ADDOPTS_POST}"; + if obj _OPT_DEVICE is_not_empty + then + _ADDOPTS_GROFF="${_ADDOPTS_GROFF} -T${_OPT_DEVICE}"; + fi; + md_groggy="$(tmp_cat | eval grog "${md_options}")"; + exit_test; + _do_opt_V; + + obj md_modefile rm_file; + mv "${_TMP_CAT}" "${md_modefile}"; + trap_unset; + cat "${md_modefile}" | \ + { + trap_set; + eval "${md_groggy}" "${_ADDOPTS_GROFF}"; + } & + ;; + text|tty) + case "${_OPT_DEVICE}" in + '') + md_device="$(get_first_essential \ + "${_OPT_TEXT_DEVICE}" "${_DEFAULT_TTY_DEVICE}")"; + exit_test; + ;; + ascii|cp1047|latin1|utf8) + md_device="${_OPT_DEVICE}"; + ;; + *) + warning "main_display(): \ +wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; + ;; + esac; + md_addopts="${_ADDOPTS_GROFF} ${_ADDOPTS_POST}"; + md_groggy="$(tmp_cat | grog -T${md_device})"; + exit_test; + if obj _DISPLAY_MODE is_equal 'text' + then + _do_opt_V; + tmp_cat | eval "${md_groggy}" "${md_addopts}"; + else + md_pager=''; + for p in "${_OPT_PAGER}" "${PAGER}" "${_MANOPT_PAGER}" \ + 'less -r -R' 'more' 'pager' 'cat' + do + md_p="$p"; + if eval is_prog ${md_p} + then # no "" for is_prog() allows args for $p + md_pager="${md_p}"; + break; + fi; + done; + if obj md_pager is_empty + then + error 'main_display(): no pager program found for tty mode'; + fi; + _do_opt_V; + tmp_cat | eval "${md_groggy}" "${md_addopts}" | \ + eval "${md_pager}"; + fi; + clean_up; + ;; + source) + tmp_cat; + clean_up; + ;; + + #### viewer modes + + dvi) + case "${_OPT_DEVICE}" in + ''|dvi) do_nothing; ;; + *) + warning "main_display(): \ +wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}" + ;; + esac; + md_modefile="${md_modefile}".dvi; + md_groggy="$(tmp_cat | grog -Tdvi)"; + exit_test; + _do_display; + ;; + html) + case "${_OPT_DEVICE}" in + ''|html) do_nothing; ;; + *) + warning "main_display(): \ +wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; + ;; + esac; + md_modefile="${md_modefile}".html; + md_groggy="$(tmp_cat | grog -Thtml)"; + exit_test; + _do_display; + ;; + pdf) + case "${_OPT_DEVICE}" in + ''|ps) + do_nothing; + ;; + *) + warning "main_display(): \ +wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; + ;; + esac; + md_groggy="$(tmp_cat | grog -Tps)"; + exit_test; + _do_display _make_pdf; + ;; + ps) + case "${_OPT_DEVICE}" in + ''|ps) + do_nothing; + ;; + *) + warning "main_display(): \ +wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; + ;; + esac; + md_modefile="${md_modefile}".ps; + md_groggy="$(tmp_cat | grog -Tps)"; + exit_test; + _do_display; + ;; + x) + case "${_OPT_DEVICE}" in + X*) + md_device="${_OPT_DEVICE}" + ;; + *) + case "${_OPT_RESOLUTION}" in + 100) + md_device='X100'; + if obj _OPT_GEOMETRY is_empty + then + case "${_DISPLAY_PROG}" in + gxditview|xditview) + # add width of 800dpi for resolution of 100dpi to the args + list_append _DISPLAY_ARGS '-geometry' '800'; + ;; + esac; + fi; + ;; + *) + md_device='X75-12'; + ;; + esac + esac; + md_groggy="$(tmp_cat | grog -T${md_device} -Z)"; + exit_test; + _do_display; + ;; + X) + case "${_OPT_DEVICE}" in + '') + md_groggy="$(tmp_cat | grog -X)"; + exit_test; + ;; + X*|dvi|html|lbp|lj4|ps) + # these devices work with + md_groggy="$(tmp_cat | grog -T"${_OPT_DEVICE}" -X)"; + exit_test; + ;; + *) + warning "main_display(): \ +wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; + md_groggy="$(tmp_cat | grog -Z)"; + exit_test; + ;; + esac; + _do_display; + ;; + *) + error "main_display(): unknown mode \`${_DISPLAY_MODE}'"; + ;; + esac; + eval ${_UNSET} md_addopts; + eval ${_UNSET} md_device; + eval ${_UNSET} md_groggy; + eval ${_UNSET} md_modefile; + eval ${_UNSET} md_options; + eval ${_UNSET} md_p; + eval ${_UNSET} md_pager; + eval "${return_ok}"; +} # main_display() + + +######################## +# _do_display ([]) +# +# Perform the generation of the output and view the result. If an +# argument is given interpret it as a function name that is called in +# the midst (actually only for `pdf'). +# +# Globals: $md_modefile, $md_groggy (from main_display()) +# +_do_display() +{ + func_check _do_display '>=' 0 "$@"; + _do_opt_V; + if obj _DISPLAY_PROG is_empty + then + trap_unset; + { + trap_set; + eval "${md_groggy}" "${_ADDOPTS_GROFF}" "${_TMP_CAT}"; + } & + else + obj md_modefile rm_file; + cat "${_TMP_CAT}" | \ + eval "${md_groggy}" "${_ADDOPTS_GROFF}" > "${md_modefile}"; + if is_not_empty "$1" + then + eval "$1"; + fi; + obj _TMP_CAT rm_file_with_debug; + if obj _VIEWER_TERMINAL is_yes # for programs that run on tty + then + eval "${_DISPLAY_PROG}" ${_DISPLAY_ARGS} "\"${md_modefile}\""; + else + case "${_DISPLAY_PROG}" in +# lynx\ *|less\ *|more\ *) # programs known to run on the terminal +# eval "${_DISPLAY_PROG}" ${_DISPLAY_ARGS} "\"${md_modefile}\""; +# ;; + *) + trap_unset; + { + trap_set; + eval "${_DISPLAY_PROG}" ${_DISPLAY_ARGS} "\"${md_modefile}\""; + } & + ;; + esac; + fi; + fi; + eval "${return_ok}"; +} # _do_display() of main_display() + + +############# +# _do_opt_V () +# +# Check on option `-V'; if set print the corresponding output and leave. +# +# Globals: $_ALL_PARAMS, $_ADDOPTS_GROFF, $_DISPLAY_MODE, $_DISPLAY_PROG, +# $_DISPLAY_ARGS, $md_groggy, $md_modefile +# +# Variable prefix: _doV +# +_do_opt_V() +{ + func_check _do_opt_V '=' 0 "$@"; + if obj _OPT_V is_yes + then + _OPT_V='no'; + echo1 "Parameters: ${_ALL_PARAMS}"; + echo1 "Display mode: ${_DISPLAY_MODE}"; + echo1 "Output file: ${md_modefile}"; + echo1 "Display prog: ${_DISPLAY_PROG} ${_DISPLAY_ARGS}"; + a="$(eval echo1 "'${_ADDOPTS_GROFF}'")"; + exit_test; + echo1 "Output of grog: ${md_groggy} $a"; + _doV_res="$(eval "${md_groggy}" "${_ADDOPTS_GROFF}")"; + exit_test; + echo1 "groff -V: ${_doV_res}" + leave; + fi; + eval "${return_ok}"; +} # _do_opt_V() of main_display() + + +############## +# _make_pdf () +# +# Transform to pdf format; for pdf mode in _do_display(). +# +# Globals: $md_modefile (from main_display()) +# +# Variable prefix: _mp +# +_make_pdf() +{ + func_check _do_display '=' 0 "$@"; + _mp_psfile="${md_modefile}"; + md_modefile="${md_modefile}.pdf"; + obj md_modefile rm_file; + if gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \ + -sOutputFile="${md_modefile}" -c save pop -f "${_mp_psfile}" + then + :; + else + error '_make_pdf: could not transform into pdf format.'; + fi; + obj _mp_psfile rm_file_with_debug; + eval ${_UNSET} _mp_psfile; + eval "${return_ok}"; +} # _make_pdf() of main_display() + + +######################################################################## +# main (*) +# +# The main function for groffer. +# +# Arguments: +# +main() +{ + func_check main '>=' 0 "$@"; + # Do not change the sequence of the following functions! + landmark '13: main_init()'; + main_init; + landmark '14: main_parse_MANOPT()'; + main_parse_MANOPT; + landmark '15: main_parse_args()'; + main_parse_args "$@"; + landmark '16: main_set_mode()'; + main_set_mode; + landmark '17: main_do_fileargs()'; + main_do_fileargs; + landmark '18: main_set_resources()'; + main_set_resources; + landmark '19: main_display()'; + main_display; + eval "${return_ok}"; +} + + +######################################################################## + +main "$@"; diff --git a/contrib/groff-1.19/contrib/mm/groff_mm.man b/contrib/groff-1.19/contrib/mm/groff_mm.man index 563ab99ad1..bd5223d477 100644 --- a/contrib/groff-1.19/contrib/mm/groff_mm.man +++ b/contrib/groff-1.19/contrib/mm/groff_mm.man @@ -1,5 +1,5 @@ .\" -.\" $Id: groff_mm.man,v 2.12 2004/05/13 13:13:24 wlemb Exp $ +.\" $Id: groff_mm.man,v 2.13 2004/07/03 12:46:56 wlemb Exp $ .\" .de T2 .if t .ne 2v @@ -1278,7 +1278,7 @@ the header in letters or other special texts. This macro must be used before any text to inhibit the pageheader on the first page. .TP -.B PIC [-L] [-C] [-R] [-I n] filename [width [height]] +.B "PIC [-L] [-C] [-R] [-I n] filename [width [height]]" \fBPIC\fP includes a Postscript file in the document. The macro depends on \fBmmroff\fP and \fBINITR\fP. \fB-L\fP, \fB-C\fP, \fB-R\fP and \fB-I n\fP adjusts the picture diff --git a/contrib/groff-1.19/contrib/mm/m.tmac b/contrib/groff-1.19/contrib/mm/m.tmac index 4f669788e7..db52e93deb 100644 --- a/contrib/groff-1.19/contrib/mm/m.tmac +++ b/contrib/groff-1.19/contrib/mm/m.tmac @@ -3,11 +3,12 @@ .ds RE \\$2 .. .\" -.\" $Id: m.tmac,v 2.24 2004/03/10 06:11:26 wlemb Exp $ -.@revision $Revision: 2.24 $ +.\" $Id: m.tmac,v 2.26 2005/05/26 06:28:38 wl Exp $ +.@revision $Revision: 2.26 $ .ig -Copyright (C) 1991-2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +Copyright (C) 1991-2000, 2001, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. mgm is written by Jörgen Hägg mgm is free software; you can redistribute it and/or modify it under @@ -36,6 +37,7 @@ Index array!index .do if d PH .nx .if \n(.C .ab The groff mm macros do not work in compatibility mode. .if (\n[.warn] == 65543) .warn +.mso devtag.tmac .\" ######## init ####### .\" Contents level [0:14], contents saved if heading level <= Cl .nr Cl 2 @@ -1038,6 +1040,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\"---------- user macro HY ------------- .\" user macro to reset indents .if d HY .HY \\n[hd*level] \\n[hd*arg1] "\\$2\\$3" +.DEVTAG-NH \\n[hd*level] \" HTML: mark beginning of heading .\"-------------------------------------- .nr hd*mark-size \w@\\*[hd*mark]@ .if (\\n[hd*level]<=\\n[Hc])&\\n[hd*htype] .ce\" center if level<=Hc @@ -1085,6 +1088,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .nr hd*last-pos \\n[nl] .nr hd*last-hsize \\n[.k] .nr par@ind-flag 0 +.DEVTAG-EO-H \" HTML: end of heading .. .\"-------- .de HM @@ -1147,9 +1151,12 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if \\n[D]>2 .tm pg*last-pos \\n[@pl]u-(\\n[pg*block-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]u+\\n[pg*extra-footer-size]u) = \\n[pg*last-pos] .. .de pg@enable-trap +.\" Disable in HTML mode +.if !'\*[.T]'html' \{\ .wh \\n[pg*foot-trap]u pg@footer .if \\n[D]>2 .tm pg@enable-trap .t=\\n[.t] nl=\\n[nl] .if \\n[D]>2 .ptr +.\} .. .de pg@disable-trap .ch pg@footer @@ -1198,6 +1205,8 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\"------------------------------------------------------------ .\" HEADER .de pg@header +.\" Disable in HTML mode +.if !'\*[.T]'html' \{\ .if \\n[D]>1 .tm Page# \\n[%] (\\n[.F]:\\n[c.]) .\" check if Hy has been changed .ie \\n[Hy] 'hy 14 @@ -1257,6 +1266,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\} .if \\n[pg*top-enabled]<0 .nr pg*top-enabled 1 .nr hd*cur-bline \\n[nl] \" .H needs to know if output has occured +.\} .. .\"--------------------------------------------------------- .\" FOOTER diff --git a/contrib/groff-1.19/contrib/mm/mmroff.pl b/contrib/groff-1.19/contrib/mm/mmroff.pl index 155550bf97..f61daa102b 100644 --- a/contrib/groff-1.19/contrib/mm/mmroff.pl +++ b/contrib/groff-1.19/contrib/mm/mmroff.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#! /usr/bin/perl use strict; # runs groff in safe mode, that seems to be the default diff --git a/contrib/groff-1.19/contrib/mom/copyright b/contrib/groff-1.19/contrib/mom/copyright index ea18d01338..51756d0009 100644 --- a/contrib/groff-1.19/contrib/mom/copyright +++ b/contrib/groff-1.19/contrib/mom/copyright @@ -1,15 +1,15 @@ AUTHOR ------ -Peter Schaffter (df191@ncf.ca) -15, chemin Brunette -RR 2, CP 406 -Ste-Cécile-de-Masham (Québec) +Peter Schaffter (peter@faustus.dyn.ca) (ptpi@golden.net) +320 Gordon St. +Fergus, Ontario CANADA +N1M 2W3 ======================================================================== The groff macro file om.tmac and the html documentation pertaining -to it are copyright (c) 2002 Peter Schaffter. +to it are copyright (c) 2004, 2005 Peter Schaffter. om.tmac is issued under the GNU General Public License, a full copy of which can be had at diff --git a/contrib/groff-1.19/contrib/mom/groff_mom.man b/contrib/groff-1.19/contrib/mom/groff_mom.man index e3db758f2e..b82fcad718 100644 --- a/contrib/groff-1.19/contrib/mom/groff_mom.man +++ b/contrib/groff-1.19/contrib/mom/groff_mom.man @@ -1,7 +1,7 @@ .ig This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. written by Werner Lemberg Permission is granted to copy, distribute and/or modify this document @@ -88,10 +88,11 @@ mom comes with her own (very) complete documentation in HTML format. . .B mom was written by -.MTO df191@ncf.ca "Peter Schaffter" . +.MTO peter@faustus.dyn.ca "Peter Schaffter" . Please send bug reports to the .MTO bug-groff@gnu.org "groff bug mailing list" -or directly to the author. +or directly to the author, either at the address above or to +.MTO ptpi@golden.net "" . . .cp \n[groff_mom_C] . diff --git a/contrib/groff-1.19/contrib/mom/om.tmac b/contrib/groff-1.19/contrib/mom/om.tmac index 68050697b9..37e9161fd8 100644 --- a/contrib/groff-1.19/contrib/mom/om.tmac +++ b/contrib/groff-1.19/contrib/mom/om.tmac @@ -1,42 +1,89 @@ .\" om.tmac -.\" -.\" Mom -- a typesetting/document-processing macro set for groff. -.\" -.\" Copyright (C) 2002, 2003 Free Software Foundation, Inc. -.\" Written by Peter Schaffter (df191@ncf.ca) -.\" -.\" 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. -.\" -.\" -.\" -\# Version 1.1.8 -\# ------------- -\# -.if (\n[.x]\n[.y] < 118) \ -. ab You need GNU troff version 1.18 or higher to run this version of mom! +.ig +Mom -- a typesetting/document-processing macro set for groff. + +Copyright (C) 2002, 2003 Free Software Foundation, Inc. + Written by Peter Schaffter (peter@faustus.dyn.ca) + +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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +Version 1.3-a +------------- +Antoine de St-Exupéry asserted that elegance in engineering is +achieved not when there is nothing left to add, but when there is +nothing left to take away. + +By those standards, mom is a Rube Goldberg contraption. She was +created over the years while groff, and my understanding of it, +changed and evolved. However, I'm a firm believer in "if it +ain't broke, don't fix it," so I'm leaving any major clean-up +of redundancies and whatnot for a rainy day. + +Inasmuch as possible, macros that turn a feature on or off follow +a similar style. Invoking the macro without an argument turns +the feature on. Invoking it with any other argument turns it off. +Use of the argument OFF is recommended, but not required; users +may find other conventions preferable (e.g. NO, X, END, QUIT, etc.). + +"" in the description of arguments that can be passed +to a macro means that any argument turns the feature off. +.. \# -\# Inasmuch as possible, macros that turn a feature on or off follow -\# a similar style. Invoking the macro without an argument turns -\# the feature on. Invoking it with any other argument turns it off. -\# Use of the argument OFF is recommended, but not required; users -\# may find other conventions preferable (e.g. NO, X, END, QUIT, etc.). +\# ==================================================================== \# -\# "" in the description of arguments that can be passed -\# to a macro means that any argument turns the feature off. +\# Check which version of groff is being run +.if (\n[.x]\n[.y] < 118) \ +. ab You need GNU troff version 1.18 or higher to run this version of mom. +\# Check that GNU troff is being run +.if !\n[.g]=1 \ +. ab The mom macros require that you be running GNU troff. +.if \n(.C \ +. ab The groff mom macros do not work in compatibility mode. +\# Add supplementary styles +.sty \n[.fp] L \" Light Roman +.sty \n[.fp] LI \" Light Italic +.sty \n[.fp] LCD \" Light Condensed Roman +.sty \n[.fp] LCDI \" Light Condensed Italic +.sty \n[.fp] LEX \" Light Extended Roman +.sty \n[.fp] LEXI \" Light Extended Italic +.sty \n[.fp] CD \" Medium/Book Condensed Roman +.sty \n[.fp] CDI \" Medium/Book Condensed Italic +.sty \n[.fp] EX \" Medium/Book Extended Roman +.sty \n[.fp] EXI \" Medium/Book Extended Italic +.sty \n[.fp] DB \" DemiBold Roman +.sty \n[.fp] DBI \" DemiBold Italic +.sty \n[.fp] BCD \" Bold Condensed Roman +.sty \n[.fp] BCDI \" Bold Condensed Italic +.sty \n[.fp] BEX \" Bold Extended Roman +.sty \n[.fp] BEXI \" Bold Extended Italic +.sty \n[.fp] HV \" Heavy Roman +.sty \n[.fp] HVI \" Heavy Italic +.sty \n[.fp] HVCD \" Heavy Condensed Roman +.sty \n[.fp] HVCDI \" Heavy Condensed Italic +.sty \n[.fp] HVEX \" Heavy Extended Roman +.sty \n[.fp] HVEXI \" Heavy Extended Italic +.sty \n[.fp] BL \" Black Roman +.sty \n[.fp] BLI \" Black Italic +.sty \n[.fp] BLCD \" Black Condensed Roman +.sty \n[.fp] BLCDI \" Black Condensed Italic +.sty \n[.fp] BLEX \" Black Extended Roman +.sty \n[.fp] BLEXI \" Black Extended Italic +.sty \n[.fp] UBL \" Ultra-Black Roman +.sty \n[.fp] UBLI \" Ultra-Black Italic \# \# ==================================================================== \# @@ -45,17 +92,22 @@ \# \# +++ALIASES+++ \# -.als ALIAS als \"Alias .als as ALIAS -.als ALIASN aln \"Alias .aln (number registers) as ALIASN +\# Alias .als as ALIAS, and .aln (number registers) as ALIASN +\# +.als ALIAS als +.als ALIASN aln +\# +\# +\# ALIASES FOR GROFF REQUESTS +\# -------------------------- \# .ALIAS MAC de .ALIAS BR br -.ALIAS SPACE sp .ALIAS SP sp .ALIAS PAGELENGTH pl -.ALIAS NEWPAGE bp .ALIAS SPREAD brp .ALIAS ESC_CHAR ec +.ALIAS STRING ds \# \# ALIASES FOR NUMBER REGISTERS \# ---------------------------- @@ -73,45 +125,37 @@ \# \# MISCELLANEOUS \# ============= -.cflags 4 /\(en \" So slash and en-dashes get broken .nr #L_MARGIN \n(.o \" Tabs, etc require #L_MARGIN +.cflags 4 /\(en \" So slash and en-dashes get broken +.warn 8192 +\# +.ig +About the warn level +-------------------- + +There's a lot of testing for the presence of number registers and +strings in this macro file. Many of the registers and strings +pop into and out of existence on the fly. For convenience, I +often use + + .if \\n[whatever] and .if !\\n[whatever] + +to test "if the register exists and is (not) empty." Groff, +encountering such tests when called with the -ww options, emits + + warning: number register whatever not defined. + +Groff also warns about strings similarly tested for. + +The warn level, above, is high in order to shut off those +warnings. If you're futzing in this file and need more verbose +warnings, either comment out ".warn 8192" or set the warnlevel +to the one you need (but be ready for lots of what I've just +described). +.. \# \# ==================================================================== \# -\# END MACRO FOR LETTERS -\# --------------------- -\# *Arguments: -\# none -\# *Function: -\# The .em macro executed at the end of letters. Turns footers -\# and pagination off, terminates and outputs diversion CLOSING -\# (indented with the author's name underneath). -\# -.MAC ALL_DONE END -. br -. FOOTERS OFF -. PAGINATION OFF -. if \\n[#DOC_TYPE]=4 \{\ -. br -. if !'\\n(.z'' \{ .di \} -. IQ CLEAR -. TQ -. TAB_SET 1 \\n[#DOC_L_LENGTH]u/2u \\n[#DOC_L_LENGTH]u/2u LEFT -. ALD \\n[#DOC_LEAD]u*2u -. TAB 1 -. if \\n[#CLOSING] \{\ -. nf -. CLOSING -. \} -. ALD \\n[#DOC_LEAD]u*3u -. PRINT \\*[$AUTHOR_1] -. \} -. DO_FOOTER -.END -\# -\# -\# ===================================================================== -\# \# +++PAGE LAYOUT+++ \# \# Macros that control the physical layout of the page: paper size @@ -187,11 +231,9 @@ \# Requires unit of measure. \# .MAC T_MARGIN END -. br . nr #T_MARGIN (\\$1) -. nr #T_MARGIN_SET 1 +. nr #TOP 1 . if !\\n[#DOCS] \{\ -. PRINT \& . sp |\\n[#T_MARGIN]u-1v . \} . wh 0i DO_T_MARGIN @@ -210,6 +252,8 @@ .MAC B_MARGIN END . br . nr #B_MARGIN (\\$1) +. nr #ORIGINAL_B_MARGIN \\n[#B_MARGIN] +. nr #B_MARGIN_SET 1 . wh -\\n[#B_MARGIN]u DO_B_MARGIN .END \# @@ -230,14 +274,14 @@ \# .MAC PAGE END . br -. PAGEWIDTH \\$1 -. PAGELENGTH \\$2 -. ie '\\$3'' \{ .L_MARGIN \\n(.o \} -. el \{ .L_MARGIN \\$3 \} -. ie '\\$4'' \{ .R_MARGIN 1i \} -. el \{ .R_MARGIN \\$4 \} -. if !'\\$5'' \{ .T_MARGIN \\$5 \} -. if !'\\$6'' \{ .B_MARGIN \\$6 \} +. PAGEWIDTH \\$1 +. PAGELENGTH \\$2 +. ie '\\$3'' \{ .L_MARGIN \\n(.o \} +. el \{ .L_MARGIN \\$3 \} +. ie '\\$4'' \{ .R_MARGIN 1i \} +. el \{ .R_MARGIN \\$4 \} +. if !'\\$5'' \{ .T_MARGIN \\$5 \} +. if !'\\$6'' \{ .B_MARGIN \\$6 \} .END \# \# ===================================================================== @@ -251,14 +295,16 @@ \# *Argument: \# \# *Function: -\# Plants the top margin (set in .PAGE) at the top of each page. +\# Plants the top margin at the top of each page. \# *Notes: -\# The trap is set in .PAGE +\# The trap is set in .T_MARGIN or .PAGE \# .MAC DO_T_MARGIN END -. ev 1 +. ev T_MARGIN +. nr #TOP 1 . sp |\\n[#T_MARGIN]u-1v . ev +. sp -\\n[#T_MARGIN_LEAD_ADJ]u .END \# \# @@ -267,16 +313,54 @@ \# *Argument: \# \# *Function: -\# Plants the bottom margin (set in .PAGE) at the bottom of each page. +\# Plants the bottom margin at the bottom of each page. \# *Notes: -\# The trap is set in .PAGE. +\# The trap is set in .B_MARGIN or .PAGE. \# .MAC DO_B_MARGIN END -. ev 1 +. nr #T_MARGIN_LEAD_ADJ \\n[#LEAD]-12000 +. ev B_MARGIN . bp . ev .END \# +\# +\# NEWPAGE +\# ------- +\# *Argument: +\# +\# *Function: +\# Breaks to a new page. +\# *Notes: +\# If a B_MARGIN has been set, processes that, otherwise, just +\# breaks to a new page. +\# +.MAC NEWPAGE END +. br +. nr #NEWPAGE 1 +. ie \\n[#B_MARGIN_SET]=1 \{\ +. ie !\\n[#DOCS]=1 \{\ +. ev NP +. bp +. ev +. \} +. el \{\ +. if \\n[#COLUMNS]=1 \{ .nr #COL_NUM \\n[#NUM_COLS] \} +. ie !\\n[#FN_DEPTH] \{\ +. ch FN_OVERFLOW_TRAP +. DO_B_MARGIN +. wh -(\\n[#FN_OVERFLOW_TRAP_POS]u) FN_OVERFLOW_TRAP +. \} +. el \{\ +. DO_B_MARGIN +. \} +. \} +. \} +. el \{\ +. DO_B_MARGIN +. \} +.END +\# \# ===================================================================== \# \# +++GENERAL STYLE MACROS+++ @@ -296,13 +380,53 @@ \# Requires unit of measure. \# .MAC LL END -. nr #L_LENGTH (\\$1) . nr #USER_SET_L_LENGTH 1 -. ll \\n[#L_LENGTH]u +. ll \\$1 +. nr #L_LENGTH \\n(.l . ta \\n(.lu .END \# \# +\# +++FAMILY AND FONT+++ +\# +\# FALLBACK FONT +\# ------------- +\# *Argument: +\# [ ABORT | WARN ] | ABORT | WARN +\# *Function: +\# Sets register #ABORT_FT_ERRORS to 1, or defines a fallback font +\# called "dummy" at font position 0. +\# *Notes: +\# Calls to non-existent families cause mom to continue processing +\# files using the fallback font until a valid family is entered. +\# +\# Calls to non-existent fonts generate warnings. If ABORT is passed +\# to FALLBACK_FONT, mom stops processing files after the warning. +\# Otherwise, she continues to process files using the fallback font +\# after the warning is issued. The default fallback font is CR; the +\# default for font warnings is to abort. +\# +.MAC FALLBACK_FONT END +. if \\n[#NUM_ARGS]=1 \{\ +. if '\\$1'ABORT' \{ .nr #ABORT_FT_ERRORS 1 \} +. if '\\$1'WARN' \{\ +. if r#ABORT_FT_ERRORS \{ .nr #ABORT_FT_ERRORS 0 \} +. \} +. if !'\\$1'ABORT' \{\ +. if !'\\$1'WARN' \{\ +. fp 0 dummy \\$1 +. \} +. \} +. \} +. if \\n[#NUM_ARGS]=2 \{\ +. fp 0 dummy \\$1 +. if '\\$2'ABORT' \{ .nr #ABORT_FT_ERRORS 1 \} +. if '\\$2'WARN' \{ .nr #ABORT_FT_ERRORS 0 \} +. \} +.END +\# +.FALLBACK_FONT CR ABORT +\# \# FAMILY \# ------ \# *Argument: @@ -312,17 +436,36 @@ \# to $FAMILY. \# .MAC FAMILY END -. if \\n[#PRINT_STYLE]=1 \{ .return \} -. if \\n[#IGNORE] \{ .return \} +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. return +. \} +. if \\n[#IGNORE] \{\ +. fam C +. return +. \} +. if (\\n[.x]\\n[.y]\\n[.Y] >= 1192) \{\ +. ds $SAVED_STYLE \\n[.sty] +. \} . ds $FAMILY \\$1 +. ft 0 . fam \\*[$FAMILY] +. if (\\n[.x]\\n[.y]\\n[.Y] >= 1192) \{\ +. ft \\*[$SAVED_STYLE] +. if !F\\n[.fn] \{\ +. ft 0 +. \} +. \} +. if \\n[#COLLATE]=1 \{\ +. if !r#START \{ .DOC_FAM \\*[$FAMILY] \} +. \} .END \# \# \# FONT \# ---- \# *Argument: -\# R | I | B | BI +\# R | I | B | BI | \# *Function: \# Stores user supplied font in $FONT and sets .ft to $FONT. \# @@ -343,7 +486,29 @@ . return . \} . ds $FONT \\$1 +. ft 0 . ft \\*[$FONT] +. if if (\\n[.x]\\n[.y]\\n[.Y] >= 1192) \{\ +. if '\\n[.sty]'' \{\ +. if !F\\n[.fn] \{\ +. if !S\\*[$FONT] \{\ +. tm1 "[mom]: Font style "\\*[$FONT]" at line \\n(.c has not been registered. +. ie \\n[#ABORT_FT_ERRORS]=0 \{\ +. tm1 " Continuing to process using fallback font. +. \} +. el .ab Aborting. +. \} +. if \\n[.f]=0 \{\ +. tm1 "[mom]: Either font style "\\*[$FONT]" at line \\n(.c does not exist in family "\\n[.fam]", +. tm1 " or family "\\n[.fam]" has not been installed in font/devps. +. ie \\n[#ABORT_FT_ERRORS]=0 \{\ +. tm1 " Continuing to process using fallback font. +. \} +. el .ab Aborting. +. \} +. \} +. \} +. \} .END \# \# @@ -391,26 +556,34 @@ \# *Argument: \# \# *Function: -\# Turns off #AUTO_LEAD if it's on. +\# Turns off #AUTOLEAD if it's on. \# Sets .vs to user supplied value. \# *Notes: -\# Does not require unit of measure. LEAD automatically turns off AUTOLEAD. +\# Does not require unit of measure. LS automatically turns off AUTOLEAD. \# .MAC LS END +. br +. nr #OLD_LEAD \\n(.v . if \\n[#PRINT_STYLE]=1 \{ .return \} . if \\n[#IGNORE] \{ .return \} -. nr #LEAD_SET 1 . if \\n[#AUTO_LEAD] \{\ . rr #AUTO_LEAD . rr #AUTOLEAD_FACTOR . \} . vs \\$1 -. if \\n[#T_MARGIN_SET]=1 \{\ -. sp |\\n[#T_MARGIN]u-1v -. rr #T_MARGIN_SET +. if \\n[#TOP] \{\ +. nr #TOP_BASELINE_ADJ \\n(.v-\\n[#OLD_LEAD] +. sp -\\n[#TOP_BASELINE_ADJ]u +. rr #TOP +. rr #TOP_BASELINE_ADJ . \} .END \# +.MAC RESET_LEAD END +' vs +. ch RESET_LEAD +.END +\# \# \# AUTOLEAD \# -------- @@ -430,6 +603,7 @@ . if \\n[#PRINT_STYLE]=1 \{ .return \} . if \\n[#IGNORE] \{ .return \} . nr #AUTO_LEAD 1 +. nr #OLD_LEAD \\n(.v . nr #AUTOLEAD_VALUE (p;\\$1) . ie \\n[#NUM_ARGS]=2 \{\ . if '\\$2'FACTOR' \{\ @@ -440,9 +614,11 @@ . el \{\ . vs \\n[#PT_SIZE]u+\\n[#AUTOLEAD_VALUE]u . \} -. if \\n[#T_MARGIN_SET] \{\ -. sp |\\n[#T_MARGIN]u-1v -. rr #T_MARGIN_SET +. if \\n[#TOP] \{\ +. nr #TOP_BASELINE_ADJ \\n(.v-\\n[#OLD_LEAD] +. sp -\\n[#TOP_BASELINE_ADJ]u +. rr #TOP +. rr #TOP_BASELINE_ADJ . \} .END \# @@ -479,33 +655,35 @@ .END \# \# -\# INLINE KERNING AND HORIZONTAL MOVEMENT -\# -------------------------------------- -\# *Kerning -\# Inline kerning provides a simple method for users to adjust the -\# amount of space between any two letters. It's predicated on a -\# unit of measure "U", which is 1/36 of the current point size as -\# returned by \n[.ps]. E.g., if the current point size is 18, -\# \n[.ps] returns 18000u, therefore U=500u. Since U remains -\# proportional relative to the current point size, the amount -\# of kerning between two letters as expressed in Us remains -\# visually similar regardless of changes in point size. -\# -\# N.B.--the amount of inline kerning supplied by \*[BU] or -\# \*[FU] is added to or subtracted from any kerning that already -\# takes place between two characters when automatic kerning is -\# turned on. -\# -\# In groff v. 1.17.2, it was not possible to pass arguments to macros that -\# were called with inline escapes, nor thence to evaluate conditional -\# expressions. Consequently, each pseudo-escape \[BU] had to be defined -\# separately with ".char". -\# -\# As of v. 1.18, one can pass arguments to inline strings/macros, -\# hence it is now possible to do \*[BU n] where n, inline, is the desired -\# number of kern units. The original .char definitions have been left in -\# for backward compatibility with documents created prior to mom-1.1.3c. -\# +.ig +INLINE KERNING AND HORIZONTAL MOVEMENT +-------------------------------------- +Kerning + +Inline kerning provides a simple method for users to adjust the +amount of space between any two letters. It's predicated on a +unit of measure "U", which is 1/36 of the current point size as +returned by \n[.ps]. E.g., if the current point size is 18, +\n[.ps] returns 18000u, therefore U=500u. Since U remains +proportional relative to the current point size, the amount +of kerning between two letters as expressed in Us remains +visually similar regardless of changes in point size. + +N.B.--the amount of inline kerning supplied by \*[BU] or +\*[FU] is added to or subtracted from any kerning that already +takes place between two characters when automatic kerning is +turned on. + +In groff v. 1.17.2, it was not possible to pass arguments to macros that +were called with inline escapes, nor thence to evaluate conditional +expressions. Consequently, each pseudo-escape \[BU] had to be defined +separately with ".char". + +As of v. 1.18, one can pass arguments to inline strings/macros, +hence it is now possible to do \*[BU n] where n, inline, is the desired +number of kern units. The original .char definitions have been left in +for backward compatibility with documents created prior to mom-1.1.3c. +.. \# .nr #KERN_UNIT 36 .ds BU \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*\\$1u)' @@ -524,16 +702,18 @@ .\} .rr #LOOP \# +.ig +Horizontal movements + +BP1...12.75 and FP1...12.75 move backwards or forwards inline by the +specified number of points. +Left in for backward compatibility with mom-1.1.3c, the +preferred methods for inline horizontal movements are now +\*[BCK ] and \*[FWD ]. +.. \# -\# *Horizontal movements -\# BP1...12.75 and FP1...12.75 move backwards or forwards inline by the -\# specified number of points. -\# Left in for backward compatibility with mom-1.1.3c, the -\# preferred methods for inline horizontal movements are now -\# \*[BCK ] and \*[FWD ]. -\# -.ds BCK \h'-\\$1\\$2' -.ds FWD \h'\\$1\\$2' +.ds BCK \h'-\\$1' +.ds FWD \h'\\$1' \# .ds BP.25 \h'-.25' .ds BP.5 \h'-.5' @@ -642,10 +822,13 @@ \# \# WHOLE LINE KERNING (RW and EW) \# ----------------------------- -\# The line kerning macros are special instances of track kerning, -\# used where a complete line needs to be tightened (or relaxed) in -\# order to accomodate or remove one or two more characters -\# than the default justification permits. +\# +.ig +The line kerning macros are special instances of track kerning, +used where a complete line needs to be tightened (or relaxed) in +order to accomodate or remove one or two more characters +than the default justification permits. +.. \# \# *Argument: \# @@ -659,38 +842,40 @@ \# *Notes: \# Decimal values are acceptable. \# -\# The groff documentation is a tad confusing about what unit of -\# measure is used in track kerning, only that the width of each -\# character is increased or decreased by the amount(s) passed as -\# arguments to .tkf, and something about linear function of point -\# size. In fact, with the way I've put this macro together, it -\# doesn't matter. All the user needs to know is that a value -\# of one will produce an unacceptably tight or loose line at most -\# text point sizes; therefore, effective use of RW and EW is in -\# the fractional range below 1 (e.g. .25, .5). Given that RW -\# and EW are for massaging type, a certain amount of -\# experimentation and previewing is expected and necessary. -\# -\# \n(.f holds the current font number, which is acceptable to .tkf. -\# -\# RW and EW must be reset to 0 to cancel their effect on -\# subsequent output lines. +.ig +The groff documentation is a tad confusing about what unit of +measure is used in track kerning, only that the width of each +character is increased or decreased by the amount(s) passed as +arguments to .tkf, and something about linear function of point +size. In fact, with the way I've put this macro together, it +doesn't matter. All the user needs to know is that a value of +one will produce an unacceptably tight or loose line at most text +point sizes; therefore, effective use of RW and EW is in the +fractional range below 1 (e.g. .25, .5). Given that RW and EW +are for massaging type, a certain amount of experimentation and +previewing is expected and necessary. + +\n(.f holds the current font number, which is acceptable to .tkf. + +RW and EW must be reset to 0 to cancel their effect on subsequent +output lines. +.. \# .MAC RW END -. if \\n[#BR_AT_LINE_KERN] \{ .br \} -. tkf 1 1 -\\$1 1 -\\$1 -. tkf 2 1 -\\$1 1 -\\$1 -. tkf 3 1 -\\$1 1 -\\$1 -. tkf 4 1 -\\$1 1 -\\$1 +. if \\n[#BR_AT_LINE_KERN] \{\ +. ie \\n[#JUSTIFY]=1 \{ .brp \} +. el \{ .br \} +. \} +. tkf \\n(.f 1 -\\$1 1 -\\$1 .END \# \# .MAC EW END -. if \\n[#BR_AT_LINE_KERN] \{ .br \} -. tkf 1 1 \\$1 1 \\$1 -. tkf 2 1 \\$1 1 \\$1 -. tkf 3 1 \\$1 1 \\$1 -. tkf 4 1 \\$1 1 \\$1 +. if \\n[#BR_AT_LINE_KERN] \{\ +. ie \\n[#JUSTIFY]=1 \{ .brp \} +. el \{ .br \} +. \} +. tkf \\n(.f 1 \\$1 1 \\$1 .END \# \# @@ -725,10 +910,10 @@ \# to default, or permits the setting of various hyphenation \# parameters. \# *Notes: -\# HY ON defaults to .hy 14, i.e. no hyphens after the -\# first two or before the last two characters of a word, and -\# no hyphenation of the last line prior to a trap (e.g., -\# at the bottom of a page). +\# HY, by itself, defaults to .hy 14, i.e. no hyphens after the +\# first two or before the last two characters of a word, and no +\# hyphenation of the last line prior to a trap (e.g., at the +\# bottom of a page). \# \# HY DEFAULT resets the hyphenation style to .hy 14 (see \# above) if that behaviour is desired after changes have been @@ -806,8 +991,22 @@ \# Requires a unit of measure. \# .MAC ALD END -. nr #ALD (\\$1) -. sp \\n[#ALD]u +. if \\n(nl=0 \{ .nr #TOP 1 \} +. if '\\$0'ALD' \{\ +. nr #ALD (\\$1) +. sp \\n[#ALD]u +. \} +. if '\\$0'ADD_SPACE' \{\ +. nr #ALD (\\$1) +. rs +. sp \\n[#ALD]u +. \} +. if '\\$0'SPACE' \{\ +. sp \\$1u +. \} +. if '\\$0'SP' \{\ +. sp \\$1u +. \} .END \# \# @@ -828,14 +1027,16 @@ \# \# ALD/RLD STRINGS \# --------------- -\# The strings \*[ALD.25]...\*[ALD12.75] and their corresponding -\# \*[RLD] forms have been left in for backward compatibility with -\# documents created using mom-1.1.3c or earlier. The prefered -\# methods of advancing and reversing on the page inline are \*[UP ] -\# and \*[DOWN ]. +.ig +The strings \*[ALD.25]...\*[ALD12.75] and their corresponding +\*[RLD] forms have been left in for backward compatibility with +documents created using mom-1.1.3c or earlier. The prefered methods +of advancing and reversing on the page inline are \*[UP ] +and \*[DOWN ]. +.. \# -.ds DOWN \v'\\$1\\$2' -.ds UP \v'-\\$1\\$2' +.ds DOWN \v'\\$1' +.ds UP \v'-\\$1' \# .ds ALD.25 \v'.25p' .ds ALD.5 \v'.5p' @@ -980,7 +1181,7 @@ \# processed. The strings for open/close ($QUOTE) are then \# defined in the macro. \# -\# (Note to myself: ascii code for " is \N'34'.) +\# (Note to myself: code for " is \N'34'.) \# .char " \\*[$QUOTE\\n[#OPEN_CLOSE]]\R'#OPEN_CLOSE (1-\\n[#OPEN_CLOSE])' \# @@ -1079,18 +1280,26 @@ \# Breaks a line without advancing. \# *Notes: \# EL is the mnemonic used on older, dedicated typesetting machines -\# to indicate "process the line, then return to the left margin -\# without advancing the galley medium." It stands for End Line. +\# to indicate "process the line, without advancing the galley +\# medium." It stands for End Line. \# -\# Sadly, EL is only a fake. It will work in all instances EXCEPT -\# when the line to be EL'd is the last line before a footer trap. -\# Use TRAP OFF/TRAP to circumvent this. +\# The \c inline must be appended to the end of input lines when in +\# nofill mode; in fill modes, the \c inline must not be used. \# .MAC EL END +. TRAP OFF +. if \\n[#PSEUDO_FILL]=1 \& . br . sp -1v +. TRAP .END \# +\# An inline escape to accomplish the same thing. Actually +\# preferable, since it works with filled and non-filled copy and +\# doesn't require the user to remember to use (or not use) the \c. +\# +.ds B \h'|0'\c +\# \# ===================================================================== \# \# +++FILLING/QUADDING/JUSTIFYING+++ @@ -1112,7 +1321,7 @@ ' ce 0 . QUAD J . if \\n[#PRINT_STYLE]=1 \{ .QUAD L \} -. nr #FILL 0 +. nr #PSEUDO_FILL 0 .END \# \# @@ -1137,28 +1346,58 @@ . \} ' ce 0 ' fi -. if '\\*[$QUAD_VALUE]'L' \{ .ad l \} -. if '\\*[$QUAD_VALUE]'LEFT' \{ .ad l \} -. if '\\*[$QUAD_VALUE]'R' \{ .ad r \} -. if '\\*[$QUAD_VALUE]'RIGHT' \{ .ad r \} -. if '\\*[$QUAD_VALUE]'C' \{ .ad c \} -. if '\\*[$QUAD_VALUE]'CENTER' \{ .ad c \} -. if '\\*[$QUAD_VALUE]'CENTRE' \{ .ad c \} -. if '\\*[$QUAD_VALUE]'J' \{ .ad b \} -. if '\\*[$QUAD_VALUE]'JUSTIFY' \{ .ad b \} -. nr #FILL 0 +. if '\\*[$QUAD_VALUE]'L' \{\ +. nr #JUSTIFY 0 +. ad l +. \} +. if '\\*[$QUAD_VALUE]'LEFT' \{\ +. nr #JUSTIFY 0 +. ad l +. \} +. if '\\*[$QUAD_VALUE]'R' \{\ +. nr #JUSTIFY 0 +. ad r +. \} +. if '\\*[$QUAD_VALUE]'RIGHT' \{\ +. nr #JUSTIFY 0 +. ad r +. \} +. if '\\*[$QUAD_VALUE]'C' \{\ +. nr #JUSTIFY 0 +. ad c +. \} +. if '\\*[$QUAD_VALUE]'CENTER' \{\ +. nr #JUSTIFY 0 +. ad c +. \} +. if '\\*[$QUAD_VALUE]'CENTRE' \{\ +. nr #JUSTIFY 0 +. ad c +. \} +. if '\\*[$QUAD_VALUE]'J' \{\ +. nr #JUSTIFY 1 +. ad b +. \} +. if '\\*[$QUAD_VALUE]'JUSTIFY' \{\ +. nr #JUSTIFY 1 +. ad b +. \} +. nr #PSEUDO_FILL 0 .END \# \# \# LEFT, RIGHT, AND CENTER \# ----------------------- -\# The purpose of these macros is to allow the user to enter lines -\# of text that will be quadded LRC *without* the user having to -\# enter .BR or .br between lines. For the sake of consistency, -\# all three appear to behave similarly (from the point of view of the user), -\# although the underlying primitives don't. For this reason, LEFT, -\# RIGHT, and CENTER must be followed by .QUAD [L R C J] or .JUSTIFY -\# to restore text to groff fill mode. +\# +.ig +The purpose of these macros is to allow the user to enter lines of +text that will be quadded LRC *without* the user having to enter .BR +or .br between lines. For the sake of consistency, all three appear +to behave similarly (from the point of view of the user), although +the underlying primitives don't. For this reason, LEFT, RIGHT, and +CENTER must be followed by .QUAD [L R C J] or .JUSTIFY to restore +text to groff fill mode. +.. \# \# LEFT \# ---- @@ -1169,7 +1408,7 @@ \# requiring the .BR or .br macro. \# *Notes: \# LEFT simply turns fill off. Lines that exceed the current LL will -\# not be broken, simply continued (indefinitely) until a return is +\# not be broken, just continued (indefinitely) until a return is \# encountered. Note that this behaviour differs from the RIGHT and \# CENTER macros. \# @@ -1180,7 +1419,8 @@ . \} . ce 0 . nf -. nr #FILL 1 +. nr #PSEUDO_FILL 1 +.\" Fix for a little conflict with DOCTYPE LETTER . if '\\n(.z'LETTERHEAD1' \{ .rr #DATE_FIRST \} .END \# @@ -1203,7 +1443,7 @@ . \} . fi . rj 100000 -. nr #FILL 1 +. nr #PSEUDO_FILL 1 .END \# \# @@ -1220,44 +1460,47 @@ \# .MAC CENTER END . if \\n[#TAB_ACTIVE]=0 \{\ +. rr #QUAD . ds $RESTORE_QUAD_VALUE CENTER . \} . fi . ce 100000 -. nr #FILL 1 +. nr #PSEUDO_FILL 1 .END \# \# ===================================================================== \# \# +++TABS+++ \# -\# There are two different kinds of tabs available: typesetting tabs -\# and string tabs. -\# -\# Typesetting tabs are set with TAB_SET, which requires a tab number, -\# an indent (offset) from the left margin and a length (optionally -\# with a quad direction and an instruction to fill lines). After tabs -\# are set with TS, they are called with .TAB n, where "n" -\# corresponds to the number passed to TAB_SET as a valid tab number. -\# -\# String tabs allow the user to mark off tab positions inline. Tab -\# indents and lengths are calculated from the beginning and end -\# positions of the marks. Up to 19 string tabs may be created, -\# numbered 1-19. Once created, they are called with .TAB n, -\# just like typesetting tabs. -\# -\# Setting up string tabs is a two-step procedure. First, the user -\# enters an input line in which s/he wants to mark off string tabs. -\# The beginning of a tab is marked with \*[STn], where "n" is -\# the desired number of the tab. The end of the the tab is marked -\# with \*[STnX]. All ST's must have a matching STX. String tabs -\# may be nested. -\# -\# Next, the user invokes .ST n for every string tab defined, and -\# optionally passes quad information to it. That done, string tabs -\# can be called just like typesetting tabs. -\# -\# String tabs don't preview properly with gxditview. Use gv instead. +.ig +There are two different kinds of tabs available: typesetting tabs +and string tabs. + +Typesetting tabs are set with TAB_SET, which requires a tab number, +an indent (offset) from the left margin and a length (optionally +with a quad direction and an instruction to fill lines). After tabs +are set with TAB_SET, they are called with .TAB n, where "n" +corresponds to the number passed to TAB_SET as a valid tab number. + +String tabs allow the user to mark off tab positions inline. Tab +indents and lengths are calculated from the beginning and end +positions of the marks. Up to 19 string tabs may be created, +numbered 1-19. Once created, they are called with .TAB n, +just like typesetting tabs. + +Setting up string tabs is a two-step procedure. First, the user +enters an input line in which s/he wants to mark off string tabs. +The beginning of a tab is marked with \*[STn], where "n" is +the desired number of the tab. The end of the the tab is marked +with \*[STnX]. All ST's must have a matching STX. String tabs +may be nested. + +Next, the user invokes .ST n for every string tab defined, and +optionally passes quad information to it. That done, string tabs +can be called just like typesetting tabs. + +String tabs don't preview properly with gxditview. Use gv instead. +.. \# \# Strings for string tab inlines \# ------------------------------ @@ -1291,7 +1534,7 @@ \# Creates strings $ST<#>_QUAD_DIR and $ST<#>_FILL, then sets up a \# tab based on the collected information. \# *Notes: -\# Like TS, ST invoked without a quad direction will default to LEFT. +\# Like TAB_SET, ST invoked without a quad direction will default to LEFT. \# If lines should be filled and quadded, use the optional argument QUAD. \# N.B. -- indents *must* be turned off before setting string tabs \# inside .PAD @@ -1334,40 +1577,43 @@ \# \# N.B. -- indents *must* be turned off before setting tabs \# -\# Examples: -\# -\# .TAB_SET 1 2P+6p 12P C -\# -\# means "create a tab numbered 1 that starts 2 picas and 6 points from -\# the left margin, is 12 picas long, and centre each input line." -\# -\# .TAB_SET 1 2P+6P 12P C QUAD -\# -\# means exactly the same thing, except that input lines are joined and -\# the area delimted by the tab filled with centered text. -\# -\# TAB n can be called at any time after being set. -\# -\# Tabs are NOT columnar in behaviour. If the text inside a -\# tab runs to several lines, when you call the next tab a break -\# occurs, meaning that the new tab starts one line below the last -\# line in the previous tab. For columnar behaviour, you must -\# use the multi-column macros in addition to tabs. -\# -\# If you want tabs to line up bottom-line to bottom-line (most likely -\# single line tabs), use .TN (provided the tabs are numbered sequentially). -\# Otherwise, you must use .EL then .TAB if you want them to align. -\# -\# If you want to reset tabs, you must use .TQ before .TAB_SET. -\# -\# Note that indents are turned off automatically whenever a new -\# tab is called with TAB . -\# -\# Tabs themselves are user-invoked using the TAB macro with a numeric -\# argument, e.g. TAB 1. -\# -\# Generally, in order not to get confused, it's a good idea -\# to make sure all indents are off before setting tabs. +.ig +Examples: +-------- + +.TAB_SET 1 2P+6p 12P C + +means "create a tab numbered 1 that starts 2 picas and 6 points from +the left margin, is 12 picas long, and centre each input line." + +.TAB_SET 1 2P+6P 12P C QUAD + +means exactly the same thing, except that input lines are joined and +the area delimted by the tab filled with centered text. + +TAB n can be called at any time after being set. + +Tabs are NOT columnar in behaviour. If the text inside a +tab runs to several lines, when you call the next tab a break +occurs, meaning that the new tab starts one line below the last +line in the previous tab. For columnar behaviour, you must +use the multi-column macros in addition to tabs. + +If you want tabs to line up bottom-line to bottom-line (most likely +single line tabs), use .TN (provided the tabs are numbered sequentially). +Otherwise, you must use .EL then .TAB if you want them to align. + +If you want to reset tabs, you must use .TQ before .TAB_SET. + +Note that indents are turned off automatically whenever a new +tab is called with TAB . + +Tabs themselves are user-invoked using the TAB macro with a numeric +argument, e.g. TAB 1. + +Generally, in order not to get confused, it's a good idea +to make sure all indents are off before setting tabs. +.. \# .MAC TAB_SET END . br @@ -1376,7 +1622,12 @@ . nr #TAB_OFFSET (\\$2) . nr #TAB_LENGTH (\\$3) . MAC TAB\\n[#TAB_NUMBER] DONE \"Define TAB macro -. br +. if !\\\\n[#TB+]=1 \{ .br \} +. if \\\\n[#TB+]=1 \{\ +. EL +. vpt 0 +. rr #TB+ +. \} . in 0 . nr #TAB_ACTIVE 1 . nr #CURRENT_TAB \\n[#TAB_NUMBER] @@ -1399,6 +1650,10 @@ . if '\\$4'C' \{ .CENTER \} . if '\\$4'J' \{ .JUSTIFY \} . \} +. if \\\\n[#TN]=1 \{\ +. TRAP +. rr #TN +. \} .DONE . rr #TAB_ACTIVE .END @@ -1426,16 +1681,23 @@ \# Automagically moves to TAB on the same line as the last \# line of the previous tab. \# *Notes: -\# If the tabs being aligned fall too close to the footer -\# trap, the line entered after .TN will appear on the next page, -\# unless TRAP...TRAP OFF is used. +\# The \c inline must be appended to the end of input lines when in +\# nofill mode; in fill modes, the \c inline must not be used. \# .MAC TN END -. EL +. nr #TN 1 +. TRAP OFF +. sp -1v . nr #NEXT_TAB \\n[#CURRENT_TAB]+1 . TAB\\n[#NEXT_TAB] +. TRAP .END \# +\# An inline escape to accomplish the same thing. Actually +\# preferable, since it works with filled and non-filled copy and +\# doesn't require the user to remember to use (or not use) the \c. +\# +.ds TB+ "\c\\R'#TB+ 1'\\R'#TN 1'\\R'#NEXT_TAB \\n[#CURRENT_TAB]+1'\\*[TAB\\n[#NEXT_TAB]]\c \# \# TAB QUIT \# -------- @@ -1490,7 +1752,7 @@ .ie \\n(.u=1 \{\ \c \\*[\\$1]\c -. \} +.\} .el \{ \\*[\\$1] \} .END \# @@ -1544,7 +1806,6 @@ . if \\n[#NUM_ARGS]=2 .ds \\$2 \m[\\$1] .END \# -\# \# Pre-define xcolors black and white \# .ds black \m[black] @@ -1942,9 +2203,9 @@ .ds SUP \ \R'#PT_SIZE_IN_UNITS \En[.ps]'\ \R'#SUP_PT_SIZE \En[#PT_SIZE_IN_UNITS]u*6u/10u'\ -\s[\En[#PT_SIZE_IN_UNITS]u]\v'-.3m'\s[\En[#SUP_PT_SIZE]u] +\s[\En[#PT_SIZE_IN_UNITS]u]\v'-.26m'\s[\En[#SUP_PT_SIZE]u] \# -.ds SUPX \s[\En[#PT_SIZE_IN_UNITS]u]\v'.3m' +.ds SUPX \s[\En[#PT_SIZE_IN_UNITS]u]\v'.26m' \# .ds CONDSUP \ \R'#PT_SIZE_IN_UNITS \En[.ps]'\ @@ -2141,35 +2402,37 @@ .MAC PAD END . if \\n(.u=1 \{ .nr #FILL_MODE 1 \} . nf -. if !d$PAD_MARKER \{ .ds $PAD_MARKER # \} +. if !d$PAD_MARKER .ds $PAD_MARKER # . char \\*[$PAD_MARKER] \R'#PAD_COUNT \En[#PAD_COUNT]+1' . ds $FAMILY_FOR_PAD \\n[.fam] -. nr #FONT_FOR_PAD \\n(.f +\#. fp \\n[.fp] \\*[$FONT] +. fp \\n[.fp] \\n[.sty] +. ds $FONT_FOR_PAD \\*[$FONT] . nr #SIZE_FOR_PAD \\n[.ps] . ds $PAD_STRING \\$1 . as $PAD_STRING \Ekp . di PAD_STRING . fam \\*[$FAMILY_FOR_PAD] -\\f\\n[#FONT_FOR_PAD]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING] +\\f[\\*[$FONT_FOR_PAD]]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING] . br . di . char \\*[$PAD_MARKER] \R'#SPACE_TO_END \En(.l-\Enp'\R'#PAD_SPACE \En[#SPACE_TO_END]/\En[#PAD_COUNT]' . di PAD_STRING . fam \\*[$FAMILY_FOR_PAD] -\\f\\n[#FONT_FOR_PAD]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING] +\\f]\\*[$FONT_FOR_PAD]]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING] . br . di . char \\*[$PAD_MARKER] \h'\En[#PAD_SPACE]u' . ie \\n[#SILENT] \{\ . SILENT . fam \\*[$FAMILY_FOR_PAD] -\\f\\n[#FONT_FOR_PAD]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING] +\\f[\\*[$FONT_FOR_PAD]]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING] . br . SILENT OFF . \} . el \{\ . fam \\*[$FAMILY_FOR_PAD] -\\f\\n[#FONT_FOR_PAD]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING] +\\f[\\*[$FONT_FOR_PAD]]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING] . br . \} . if \\n[#FILL_MODE]=1 \{\ @@ -2182,19 +2445,25 @@ . rm $PAD_STRING . rm PAD_STRING . rchar # +. if '\\$2'NOBREAK' \{\ +. TRAP OFF +. EOL +. TRAP +. \} .END \# \# \# +++LEADERS+++ \# -\# The leader mechanism is primitive, but it works. Basically, -\# every macro in this set that includes a line length also sets -\# a single groff tab stop at the right hand end of the line. -\# That way, whenever Ctrl-A is invoked (always at the end of -\# an input line), leader of the correct length gets deposited. -\# Ctrl-A is accessed by the string LEADER (i.e. inline, as -\# \*[LEADER]). Leaders within tabs get their length from the -\# tab line length. +.ig +The leader mechanism is primitive, but it works. Basically, every +macro in this set that includes a line length also sets a single +groff tab stop at the right hand end of the line. That way, +whenever Ctrl-A is invoked (always at the end of an input line), +leader of the correct length gets deposited. Ctrl-A is accessed by +the string LEADER (i.e. inline, as \*[LEADER]). Leaders within tabs +get their length from the tab line length. +.. \# \# SET LEADER CHARACTER \# -------------------- @@ -2321,25 +2590,34 @@ . \} . ds $DROPCAP \\$1 . nr #DC_LINES \\$2-1 -. ds $RESTORE_COND \\*[$COND_PERCENT] +. if \\n[#CONDENSE]=1 \{\ +. ds $RESTORE_COND \\*[$COND_PERCENT] +\\*[CONDX] +. nr #CONDENSE_WAS_ON 1 +. \} +. if \\n[#EXTEND]=1 \{\ +. ds $RESTORE_EXT \\*[$EXT_PERCENT] +\\*[EXTX] +. nr #EXTEND_WAS_ON 1 +. \} . if '\\$3'COND' \{ .CONDENSE \\$4 \} . if '\\$3'EXT' \{ .EXTEND \\$4 \} . if !r#DC_GUT \{ .nr #DC_GUT (3p) \} . ds $RESTORE_FAM \\n[.fam] -. nr #RESTORE_FT \\n(.f +. ds $RESTORE_FT \\*[$FONT] . nr #RESTORE_PT_SIZE \\n[#PT_SIZE] . nr #RESTORE_INDENT \\n(.i . SIZESPECS . nr #DC_HEIGHT \\n[#DC_LINES]*\\n[#LEAD]+\\n[#CAP_HEIGHT] . ie !d$DC_FAM \{ .FAM \\n[.fam] \} . el \{ .FAM \\*[$DC_FAM] \} -. ie !d$DC_FT \{ .FT \\n(.f \} +. ie !d$DC_FT \{ .FT \\*[$FONT] \} . el \{ .FT \\*[$DC_FT] \} . while \\n[#GET_DC_HEIGHT]<\\n[#DC_HEIGHT] \{\ . ps \\n[#PT_SIZE]u+100u . SIZESPECS . nr #GET_DC_HEIGHT \\n[#CAP_HEIGHT] -. \} +.\} . if d$DC_ADJUST \{ .ps \\*[$DC_ADJUST]p \} . mk x . sp \\n[#DC_LINES]v @@ -2360,23 +2638,31 @@ . if '\\$3'COND' \{ \E*[COND] \} . if '\\$3'EXT' \{ \E*[EXT] \} . ie \\n(.i \{ .in +\w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u \} -. el \{ .in \w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u \} +. el \{ .in \w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u \} . if '\\$3'COND' \{ \E*[CONDX]\c \} . if '\\$3'EXT' \{ \E*[EXTX]\c \} . rt \\nxu . FAM \\*[$RESTORE_FAM] -. FT \\n[#RESTORE_FT] +. FT \\*[$RESTORE_FT] . ps \\n[#RESTORE_PT_SIZE]u -. CONDENSE \\*[$RESTORE_COND] -. EXTEND \\*[$RESTORE_EXT] +. if \\n[#CONDENSE_WAS_ON] \{\ +. CONDENSE \\*[$RESTORE_COND] +\\*[COND]\c +. \} +. if \\n[#EXTEND_WAS_ON] \{\ +. EXTEND \\*[$RESTORE_EXT] +\\*[EXT]\c +. \} . ie \\n(.u \{ .wh \\n(.du+\\n[#DC_HEIGHT]u-1v DROPCAP_OFF \} . el \{ .wh \\n(.du+\\n[#DC_HEIGHT]u DROPCAP_OFF \} +. rr #CONDENSE_WAS_ON +. rr #EXTEND_WAS_ON . rm $DROPCAP . rr #DC_LINES . rm $RESTORE_COND . rm $RESTORE_EXT . rm $RESTORE_FAM -. rr #RESTORE_FT +. rm $RESTORE_FT . rr #RESTORE_PT_SIZE . rr #RESTORE_INDENT . rr #DC_HEIGHT @@ -2401,6 +2687,7 @@ \c . EL . if \\n(.u=1 \{\ +. nr #FILL_WAS_ON 1 . ds $CURRENT_QUAD \\*[$QUAD_VALUE] . nf . \} @@ -2408,15 +2695,19 @@ . nr #RESTORE_L_LENGTH \\n(.l . if \\n[#INDENT_BOTH_ACTIVE] \{ .ll \\n(.lu-\\n[#BL_INDENT]u \} . if \\n[#INDENT_LEFT_ACTIVE] \{ .ll \\n(.lu-\\n[#L_INDENT]u \} -. PRINT \El'\En(.lu' +. PRINT \El'\En(.lu'\c . ll \\n[#RESTORE_L_LENGTH]u . rr #RESTORE_L_LENGTH . \} . el \{\ -. PRINT \El'\En(.lu' +. PRINT \El'\En(.lu'\c +. \} +. if r#FILL_WAS_ON \{\ +. fi +. rr #FILL_WAS_ON +. QUAD \\*[$CURRENT_QUAD] +. rm $CURRENT_QUAD . \} -. QUAD \\*[$CURRENT_QUAD] -. rm $CURRENT_QUAD . EL .END \# @@ -2444,8 +2735,8 @@ .MAC WS END . ds $WS_CONSTANT 12 . ds $WS_VAR \\$1 -. ie '\\$1'DEFAULT' \{ .ds $WS_VAR +0 \} -. el \{ .ds $WS (\\*[$WS_CONSTANT]\\*[$WS_VAR]) \} +. ie '\\$1'DEFAULT' .ds $WS_VAR +0 +. el .ds $WS (\\*[$WS_CONSTANT]\\*[$WS_VAR]) . ie \\n[.sss]=12 \{ .ss \\*[$WS] 12 \} . el \{\ . ss \\*[$WS] (\\*[$WS]\\*[$SS_VAR]) @@ -2490,86 +2781,88 @@ \# \# +++INDENTS+++ \# -\# There are five styles of indents: left, right, both, temporary, -\# and hanging. Each is set/invoked with a different macro. -\# Indent macros begin with the letter "I", hence .IL means "indent left," -\# .IR means "indent right," and so on. -\# -\# The first time any of the indent macros is used, it requires an -\# argument--the size of the indent (with a unit of measure). The -\# size may also be entered using the \w escape--very useful -\# for numbered lists using HI. The unit of measure is required. -\# Subsequent invocations don't require the argument; the indent -\# measure remains the same until it's changed by invoking the macro -\# with an argument again. -\# -\# If no indents are in effect, the arguments passed to indent macros are -\# measured from the left and right margins of the page. If a left indent -\# or a right indent is already in effect, the arguments passed to -\# the indent macros are calculated from the current values; in other words, -\# the arguments are additive. If you quit an indent and later return -\# to it, its value will be the value last in effect, unless you pass -\# it an argument. If you do pass an argument, it is added to the last -\# value in effect, unless you cleared the indent with one of -\# .IX/Q macros. -\# -\# Example -\# ------- -\# -\# .IL 2P -\# ...some text... -\# .IL 2P -\# ...some text... -\# .IQ -\# ...some text... -\# .IL -\# ...some text... -\# -\# The first .IL 2P indents text 2P from the left margin. The second -\# .IL 2P indents text by an additional 2P, i.e. 4P from the left margin. -\# .IQ turns the indent off. The last .IL (which has no argument) -\# takes its value from the total of all arguments passed to .IL (in -\# this case, 2P and 2P), therefore it indents 2P+2P from the left -\# margin, i.e. 4P. If you wanted the last .IL to indent just 2P, -\# you'd either have to reset the .IL prior to .IQ (.IL -2P), or pass -\# the last .IL the argument 2P. -\# -\# To reverse the sense of an indent added to an indent, you may use -\# negative values. -\# -\# Indents can be turned off individually with ILX, IRX, and IBX. -\# LEFT and RIGHT indents may be combined and manipulated -\# separately, (e.g. you can have an IL of 2P and an IR of 4P -\# operative at the same time, and then change, say, the IL to -\# 4P--thereby left indenting 6P--while the IR remains at 4P. -\# -\# IB automatically turns off IL and IR. They have to be reinvoked -\# again when needed. IL and IR automatically turn IB off; it, too, -\# has to be reinvoked with needed. -\# -\# All indents can be turned off at once with IQ. The ILX, IRX, IBX, -\# and IQ macros simply turn the indents off; the values stored in -\# the respective indent macros (IL, IR, IB) remain in effect. If -\# the user wishes to clear the values, the IX macros should be -\# invoked with the single argument CLEAR. IQ CLEAR clears out -\# the values stored for all indent styles. -\# -\# Indents *must* be turned off before settting string tabs -\# inside PAD. Generally, in order not to get confused, it's a -\# good idea to turn all indents off before setting any tabs. -\# -\# TI and HI are special cases. There's no need to turn them off, -\# since they affect only one line--the first after their -\# invocation. Like the other indent styles, the first time -\# they're invoked, they require a value in iPpcm; each subsequent -\# invocation without an argument will use the same value. To -\# change the value, simply pass a new value. Values for TI and HI -\# are *not* additive. -\# -\# HI presupposes that you already have a left or both indent on. -\# HI will never hang a line outside the left margin of a document -\# or column. In other words, you must have IL or IB on before you -\# can use HI. +.ig +There are five styles of indents: left, right, both, temporary, +and hanging. Each is set/invoked with a different macro. +Indent macros begin with the letter "I", hence .IL means "indent left," +.IR means "indent right," and so on. + +The first time any of the indent macros is used, it requires an +argument--the size of the indent (with a unit of measure). The +size may also be entered using the \w escape--very useful +for numbered lists using HI. The unit of measure is required. +Subsequent invocations don't require the argument; the indent +measure remains the same until it's changed by invoking the macro +with an argument again. + +If no indents are in effect, the arguments passed to indent macros are +measured from the left and right margins of the page. If a left indent +or a right indent is already in effect, the arguments passed to +the indent macros are calculated from the current values; in other words, +the arguments are additive. If you quit an indent and later return +to it, its value will be the value last in effect, unless you pass +it an argument. If you do pass an argument, it is added to the last +value in effect, unless you cleared the indent with one of +.IX/Q macros. + +Example +------- + +.IL 2P +...some text... +.IL 2P +...some text... +.IQ +...some text... +.IL +...some text... + +The first .IL 2P indents text 2P from the left margin. The second +.IL 2P indents text by an additional 2P, i.e. 4P from the left margin. +.IQ turns the indent off. The last .IL (which has no argument) +takes its value from the total of all arguments passed to .IL (in +this case, 2P and 2P), therefore it indents 2P+2P from the left +margin, i.e. 4P. If you wanted the last .IL to indent just 2P, +you'd either have to reset the .IL prior to .IQ (.IL -2P), or pass +the last .IL the argument 2P. + +To reverse the sense of an indent added to an indent, you may use +negative values. + +Indents can be turned off individually with ILX, IRX, and IBX. +LEFT and RIGHT indents may be combined and manipulated +separately, (e.g. you can have an IL of 2P and an IR of 4P +operative at the same time, and then change, say, the IL to +4P--thereby left indenting 6P--while the IR remains at 4P. + +IB automatically turns off IL and IR. They have to be reinvoked +again when needed. IL and IR automatically turn IB off; it, too, +has to be reinvoked with needed. + +All indents can be turned off at once with IQ. The ILX, IRX, IBX, +and IQ macros simply turn the indents off; the values stored in +the respective indent macros (IL, IR, IB) remain in effect. If +the user wishes to clear the values, the IX macros should be +invoked with the single argument CLEAR. IQ CLEAR clears out +the values stored for all indent styles. + +Indents *must* be turned off before settting string tabs +inside PAD. Generally, in order not to get confused, it's a +good idea to turn all indents off before setting any tabs. + +TI and HI are special cases. There's no need to turn them off, +since they affect only one line--the first after their +invocation. Like the other indent styles, the first time +they're invoked, they require a value in iPpcm; each subsequent +invocation without an argument will use the same value. To +change the value, simply pass a new value. Values for TI and HI +are *not* additive. + +HI presupposes that you already have a left or both indent on. +HI will never hang a line outside the left margin of a document +or column. In other words, you must have IL or IB on before you +can use HI. +.. \# \# INDENT LEFT \# ----------- @@ -2856,7 +3149,9 @@ \# Returns to the top of a column set \# .MAC MCR END +. TRAP OFF . sp |\\ncu +. TRAP .END \# \# MULTIPLE COLUMNS OFF @@ -2882,7 +3177,7 @@ . TQ . ie \\n[#MCX_ALD]=0 \{ .sp |\\n(.hu-1v \} . el \{ .sp |\\n(.hu+\\n[#MCX_ALD]u \} -. rr #MCX_ALD (\\$1) +. rr #MCX_ALD . \} .END \# @@ -2937,13 +3232,11 @@ \# \# PRINT \# ----- -\# *Arguments: -\# \# *Function: \# Prints anything. A macro that helps keep my code nicely indented. \# .MAC PRINT END -\\$* +. nop \\$* .END \# \# @@ -3050,6 +3343,7 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# +++TYPESETTING ALIASES+++ \# +.ALIAS ADD_SPACE ALD .ALIAS CENTRE CENTER .ALIAS COLOUR COLOR .ALIAS COMMENT SILENT @@ -3066,10 +3360,12 @@ y\\R'#DESCENDER \\n[.cdp]' .ALIAS LIG LIGATURES .ALIAS NEWCOLOUR NEWCOLOR .ALIAS PADMARKER PAD_MARKER +.ALIAS SP ALD +.ALIAS SPACE ALD .ALIAS TABSET TAB_SET .ALIAS TB TAB .ALIAS UNDERSCORE_2 UNDERSCORE2 -.ALIAS XCOLOUR XCOLOUR +.ALIAS XCOLOUR XCOLOR \# \# \# ==================================================================== @@ -3084,7 +3380,7 @@ y\\R'#DESCENDER \\n[.cdp]' \# *Arguments: \# LETTER | LEGAL | STATEMENT | TABLOID | LEDGER | FOLIO | QUARTO | 10x14 | EXECUTIVE | A3 | A4 | A5 | B4 | B5 \# *Function: -\# Sets up margins for different paper sizes. +\# Sets up dimensions for different paper sizes. \# .MAC PAPER END . ds $PAPER \\$1 @@ -3163,70 +3459,84 @@ y\\R'#DESCENDER \\n[.cdp]' \# Number registers: TYPEWRITE=1, TYPESET=2. \# .MAC PRINTSTYLE END -. if !d$PAPER \{ .PAPER LETTER \} -. if '\\$1'TYPEWRITE' \{\ -. nr #PRINT_STYLE 1 -. if !\\n[#DOC_TYPE]=4 \{ .L_MARGIN 6P \} -. if !\\n[#DOC_TYPE]=4 \{ .R_MARGIN 6P \} -. fam C -. ft R -. ps 12 -. color 0 -. ie '\\$2'SINGLESPACE' \{\ -. nr #SINGLE_SPACE 1 -. vs 12 -. \} -. el \{ .vs 24 \} -. QUAD L -. HY OFF -. SMARTQUOTES OFF -. if !\\n[#PP_INDENT] \{\ -. in 3P \"Set indent -. nr #PP_INDENT \\n(.i \"Read into #PP_INDENT -. in 0 \"Remove indent -. \} -. HDRFTR_RIGHT_CAPS -. nr #BOLDER_UNITS 0 -. nr #CONDENSE 0 -. nr #EXTEND 0 -. rm IT -. rm BD -. rm BDI -. rm PREV -. UNDERLINE_SLANT -. UNDERLINE_ITALIC -. UNDERLINE_QUOTES -. nr #IGNORE_COLUMNS 1 -. char \(em -- -. \} -. if '\\$1'TYPESET' \{\ -. nr #PRINT_STYLE 2 -. if !\\n[#DOC_TYPE]=4 \{ .L_MARGIN 6P \} -. if !\\n[#DOC_TYPE]=4 \{ .R_MARGIN 6P \} -. FAMILY T -. FT R -. if !\\n[#DOC_TYPE]=4 \{ .PT_SIZE 12.5 \} -. if !\\n[#DOC_TYPE]=4 \{ .LS 16 \} -. JUSTIFY -. HY -. HY_SET 2 36p 1p -. KERN -. LIG -. SS 0 -. SMARTQUOTES -. if !\\n[#PP_INDENT] \{\ -. in 2m \"Set indent -. nr #PP_INDENT \\n(.i \"Read into #PP_INDENT -. in 0 \"Remove indent +. if !\\n[#COLLATE]=1 \{\ +. if !d$PAPER \{ .PAPER LETTER \} +. if '\\$1'TYPEWRITE' \{\ +. nr #PRINT_STYLE 1 +. if !\\n[#DOC_TYPE]=4 \{ .L_MARGIN 6P \} +. if !\\n[#DOC_TYPE]=4 \{ .R_MARGIN 6P \} +. TYPEWRITER +. color 0 +. ie '\\$2'SINGLESPACE' \{\ +. nr #SINGLE_SPACE 1 +. vs 12 +. nr #ORIGINAL_DOC_LEAD \\n(.v +. \} +. el \{\ +. vs 24 +. nr #ORIGINAL_DOC_LEAD \\n(.v +. \} +. QUAD L +. HY OFF +. SMARTQUOTES OFF +. if !\\n[#PP_INDENT] \{\ +. in 3P \"Set indent +. nr #PP_INDENT \\n(.i \"Read into #PP_INDENT +. in 0 \"Remove indent +. \} +. HDRFTR_RIGHT_CAPS +. nr #BOLDER_UNITS 0 +. nr #CONDENSE 0 +. nr #EXTEND 0 +. rm IT +. rm BD +. rm BDI +. rm PREV +. UNDERLINE_SLANT +. UNDERLINE_ITALIC +. UNDERLINE_QUOTES +. nr #IGNORE_COLUMNS 1 +. char \(em -- +. tr `' +. \} +. if '\\$1'TYPESET' \{\ +. nr #PRINT_STYLE 2 +. if !\\n[#DOC_TYPE]=4 \{ .L_MARGIN 6P \} +. if !\\n[#DOC_TYPE]=4 \{ .R_MARGIN 6P \} +. FAMILY T +. FT R +. if !\\n[#DOC_TYPE]=4 \{ .PT_SIZE 12.5 \} +. if !\\n[#DOC_TYPE]=4 \{ .LS 16 \} +. JUSTIFY +. HY +. HY_SET 2 36p 1p +. KERN +. LIG +. SS 0 +. SMARTQUOTES +. if !\\n[#PP_INDENT] \{\ +. in 2m \"Set indent +. nr #PP_INDENT \\n(.i \"Read into #PP_INDENT +. in 0 \"Remove indent +. \} +. HDRFTR_RIGHT_CAPS +. rr #IGNORE_COLUMNS . \} -. HDRFTR_RIGHT_CAPS -. rr #IGNORE_COLUMNS . \} .END \# \# \# Macros to control behaviour of PRINTSTYLE TYPEWRITE \# +\# First, a little utility macro. +\# +.MAC TYPEWRITER END +. fam C +. ft R +. ps 12 +.END +\# +\# \# ITALIC MEANS ITALIC \# ------------------- \# *Argument: @@ -3350,7 +3660,7 @@ y\\R'#DESCENDER \\n[.cdp]' . if !d$CHAPTER_STRING \{ .CHAPTER_STRING "Chapter" \} . if !d$DRAFT_STRING \{ .DRAFT_STRING "Draft" \} . if !d$REVISION_STRING \{ .REVISION_STRING "Rev." \} -\# Default +.\" Default . if \\n[#DOC_TYPE]=1 \{\ . ie \\n[#COPY_STYLE]=1 \{\ . ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} @@ -3375,15 +3685,16 @@ y\\R'#DESCENDER \\n[.cdp]' . el \{\ . ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} . el \{ .PAGENUM_STYLE DIGIT \} +. if r#DRAFT_WITH_PAGENUM \{ .rr #DRAFT_WITH_PAGENUM \} . if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\ . ds $HDRFTR_CENTER . rr #USER_DEF_HDRFTR_CENTER . \} . \} . \} -\# Chapter +.\" Chapter . if \\n[#DOC_TYPE]=2 \{\ -\# Copystyle DRAFT +.\" Copystyle DRAFT . ie \\n[#COPY_STYLE]=1 \{\ . ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} . el \{ .PAGENUM_STYLE roman \} @@ -3393,13 +3704,13 @@ y\\R'#DESCENDER \\n[.cdp]' . ie !'\\*[$CHAPTER_TITLE]'' \{\ . ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE] . \} -. el \{ .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \} +. el .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] . \} . el \{\ . ie !'\\*[$CHAPTER_TITLE]'' \{\ . ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE] . \} -. el \{ .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \\*[$CHAPTER] \} +. el .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \\*[$CHAPTER] . \} . \} . el \{\ @@ -3512,8 +3823,9 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . \} . \} -\# Copystyle FINAL +.\" Copystyle FINAL . el \{\ +. if r#DRAFT_WITH_PAGENUM \{ .rr #DRAFT_WITH_PAGENUM \} . if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\ . ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} . el \{ .PAGENUM_STYLE DIGIT \} @@ -3536,7 +3848,7 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . \} . \} -\# Named +.\" Named . if \\n[#DOC_TYPE]=3 \{\ . ie \\n[#COPY_STYLE]=1 \{\ . ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} @@ -3573,6 +3885,7 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . \} . el \{\ +. if r#DRAFT_WITH_PAGENUM \{ .rr #DRAFT_WITH_PAGENUM \} . if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\ . ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} . el \{ .PAGENUM_STYLE DIGIT \} @@ -3584,7 +3897,7 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# ==================================================================== \# -\# +++COLLECT DOC INFO -- STRINGS AND NUMBER REGISTERS+++ +\# +++COLLECT DOC INFO -- STRINGS AND REGISTERS FOR REFERENCE MACROS+++ \# \# *Arguments: \# various string/register arguments @@ -3592,7 +3905,7 @@ y\\R'#DESCENDER \\n[.cdp]' \# Collect information about documents. \# \# -.MAC DOC_TITLE END +.MAC DOCTITLE END . ds $DOC_TITLE \\$1 .END \# @@ -3617,8 +3930,8 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# .MAC DRAFT END \"Draft number -. ie '\\$1'' \{ .ds $DRAFT \} -. el \{ .ds $DRAFT " \\$1\} +. ie '\\$1'' .ds $DRAFT +. el .ds $DRAFT " \\$1 .END \# \# @@ -3636,13 +3949,27 @@ y\\R'#DESCENDER \\n[.cdp]' . nr #AUTHOR_NUM -1 1 . while \\n[#NUM_ARGS]>\\n[#AUTHOR_NUM] \{\ . ds $AUTHOR_\\n+[#AUTHOR_NUM] \\$\\n[#AUTHOR_NUM] -. \} +.\} . nr #NUM_AUTHORS \\n[#NUM_ARGS]%2 \"Use mod 2 to test if odd or even # of authors . ie \\n[#NUM_AUTHORS]=1 \{ .nr #AUTHOR_LINES 0 \} . el \{ .nr #AUTHOR_LINES 1 \} .END \# \# +.MAC COPYRIGHT END \"For use on cover page only +. ds $COPYRIGHT \[co]\\$1 +.END +\# +\# +.MAC MISC END \"For use on cover page only; enclose all args in double quotes +. nr #MISC_NUM -1 1 +. while \\n[#NUM_ARGS]>\\n[#MISC_NUM] \{\ +. ds $MISC_\\n+[#MISC_NUM] \\$\\n[#MISC_NUM] +.\} +. nr #NUM_MISCS \\n[#NUM_ARGS] +.END +\# +\# .MAC PAGENUMBER END \"Page # that appears on page one. . nr #n%_AT_PAGENUM_SET \\n% . nr #PAGE_NUM_ADJ \\$1-\\n[#n%_AT_PAGENUM_SET] @@ -3802,57 +4129,426 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# +++DEFAULTS+++ \# -\# DEFAULTS -\# -------- -\# *Arguments: -\# -\# *Function: -\# Sets up defaults if no values are entered prior to START. -\# *Notes: -\# The defaults for $CHAPTER_STRING, $DRAFT_STRING, and -\# $REVISION_STRING are in the COPYSTYLE macro. +\# TYPE-STYLE CONTROL MACROS +\# ------------------------- \# -.MAC DEFAULTS END -. if !d$PAPER \{ .PAPER LETTER \} -. if !\\n[#DOC_TYPE] \{ .DOCTYPE DEFAULT \} -. ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} -. el \{\ -. if !\\n[#COPY_STYLE]=1 \{ .PAGENUM_STYLE DIGIT \} +.ig +The control macros for family, font, size, quad and color are here +grouped together. Each (e.g. _FAMILY or _FONT) tests for a calling +alias before performing the action(s) appropriate to the calling +macro. Defaults for all these guys are set in DEFAULTS, and listed +in the "Control Macros" section of the documentation pertinent to +the macro whose style is to be changed. +.. +\# +.MAC _FAMILY END +. if '\\$0'AUTHOR_FAMILY' .ds $AUTHOR_FAM \\$1 +. if '\\$0'BIBLIOGRAPHY_FAMILY' .ds $BIB_FAM \\$1 +. if '\\$0'BIBLIOGRAPHY_STRING_FAMILY' .ds $BIB_STRING_FAM \\$1 +. if '\\$0'BLOCKQUOTE_FAMILY' .ds $BQUOTE_FAM \\$1 +. if '\\$0'CITATION_FAMILY' .ds $BQUOTE_FAM \\$1 +. if '\\$0'CITE_FAMILY' .ds $BQUOTE_FAM \\$1 +. if '\\$0'CHAPTER_TITLE_FAMILY' .ds $CHAPTER_TITLE_FAM \\$1 +. if '\\$0'COVER_AUTHOR_FAMILY' .ds $COVER_AUTHOR_FAM \\$1 +. if '\\$0'COVER_CHAPTER_TITLE_FAMILY' .ds $COVER_CHAPTER_TITLE_FAM \\$1 +. if '\\$0'COVER_COPYRIGHT_FAMILY' .ds $COVER_COPYRIGHT_FAM \\$1 +. if '\\$0'COVER_DOCTYPE_FAMILY' .ds $COVER_DOCTYPE_FAM \\$1 +. if '\\$0'COVER_FAMILY' .ds $COVER_FAM \\$1 +. if '\\$0'COVER_SUBTITLE_FAMILY' .ds $COVER_SUBTITLE_FAM \\$1 +. if '\\$0'COVER_TITLE_FAMILY' .ds $COVER_TITLE_FAM \\$1 +. if '\\$0'DOC_COVER_AUTHOR_FAMILY' .ds $DOC_COVER_AUTHOR_FAM \\$1 +. if '\\$0'DOC_COVER_CHAPTER_TITLE_FAMILY' .ds $DOC_COVER_CHAPTER_TITLE_FAM \\$1 +. if '\\$0'DOC_COVER_COPYRIGHT_FAMILY' .ds $DOC_COVER_COPYRIGHT_FAM \\$1 +. if '\\$0'DOC_COVER_DOCTYPE_FAMILY' .ds $DOC_COVER_DOCTYPE_FAM \\$1 +. if '\\$0'DOC_COVER_FAMILY' .ds $DOC_COVER_FAM \\$1 +. if '\\$0'DOC_COVER_SUBTITLE_FAMILY' .ds $DOC_COVER_SUBTITLE_FAM \\$1 +. if '\\$0'DOC_COVER_TITLE_FAMILY' .ds $DOC_COVER_TITLE_FAM \\$1 +. if '\\$0'DOCHEADER_FAMILY' .ds $DOCHEADER_FAM \\$1 +. if '\\$0'DOCTYPE_FAMILY' .ds $DOCTYPE_FAM \\$1 +. if '\\$0'ENDNOTE_FAMILY' .ds $EN_FAM \\$1 +. if '\\$0'ENDNOTE_NUMBER_FAMILY' .ds $EN_NUMBER_FAM \\$1 +. if '\\$0'ENDNOTE_LINENUMBER_FAMILY' .ds $EN_LN_FAM \\$1 +. if '\\$0'ENDNOTE_STRING_FAMILY' .ds $EN_STRING_FAM \\$1 +. if '\\$0'ENDNOTE_TITLE_FAMILY' .ds $EN_TITLE_FAM \\$1 +. if '\\$0'EPIGRAPH_FAMILY' .ds $EPI_FAM \\$1 +. if '\\$0'FOOTNOTE_FAMILY' .ds $FN_FAM \\$1 +. if '\\$0'HDRFTR_CENTER_FAMILY' .ds $HDRFTR_CENTER_FAM \\$1 +. if '\\$0'HDRFTR_FAMILY' \{\ +. ds $HDRFTR_FAM \\$1 +. ds $HDRFTR_LEFT_FAM \\$1 +. ds $HDRFTR_CENTER_FAM \\$1 +. ds $HDRFTR_RIGHT_FAM \\$1 +. \} +. if '\\$0'HDRFTR_LEFT_FAMILY' .ds $HDRFTR_LEFT_FAM \\$1 +. if '\\$0'HDRFTR_RIGHT_FAMILY' .ds $HDRFTR_RIGHT_FAM \\$1 +. if '\\$0'HEAD_FAMILY' .ds $HEAD_FAM \\$1 +. if '\\$0'PAGENUM_FAMILY' .ds $PAGE_NUM_FAM \\$1 +. if '\\$0'PARAHEAD_FAMILY' .ds $PH_FAM \\$1 +. if '\\$0'QUOTE_FAMILY' .ds $QUOTE_FAM \\$1 +. if '\\$0'SUBHEAD_FAMILY' .ds $SH_FAM \\$1 +. if '\\$0'SUBTITLE_FAMILY' .ds $SUBTITLE_FAM \\$1 +. if '\\$0'TITLE_FAMILY' .ds $TITLE_FAM \\$1 +. if '\\$0'TOC_FAMILY' .ds $TOC_FAM \\$1 +. if '\\$0'TOC_FAM' .ds $TOC_FAM \\$1 +. if '\\$0'TOC_HEADER_FAMILY' .ds $TOC_HEADER_FAM \\$1 +. if '\\$0'TOC_HEAD_FAMILY' .ds $TOC_HEAD_FAM \\$1 +. if '\\$0'TOC_PARAHEAD_FAMILY' .ds $TOC_PH_FAM \\$1 +. if '\\$0'TOC_PN_FAMILY' .ds $TOC_PN_FAM \\$1 +. if '\\$0'TOC_SUBHEAD_FAMILY' .ds $TOC_SH_FAM \\$1 +. if '\\$0'TOC_TITLE_FAMILY' .ds $TOC_TITLE_FAM \\$1 +.END +\# +\# +.MAC _FONT END +. if '\\$0'AUTHOR_FONT' .ds $AUTHOR_FT \\$1 +. if '\\$0'BIBLIOGRAPHY_FONT' .ds $BIB_FT \\$1 +. if '\\$0'BIBLIOGRAPHY_STRING_FONT' .ds $BIB_STRING_FT \\$1 +. if '\\$0'BLOCKQUOTE_FONT' .ds $BQUOTE_FT \\$1 +. if '\\$0'CITATION_FONT' .ds $BQUOTE_FT \\$1 +. if '\\$0'CITE_FONT' .ds $BQUOTE_FT \\$1 +. if '\\$0'CHAPTER_TITLE_FONT' .ds $CHAPTER_TITLE_FT \\$1 +. if '\\$0'COVER_AUTHOR_FONT' .ds $COVER_AUTHOR_FT \\$1 +. if '\\$0'COVER_CHAPTER_TITLE_FONT' .ds $COVER_CHAPTER_TITLE_FT \\$1 +. if '\\$0'COVER_COPYRIGHT_FONT' .ds $COVER_COPYRIGHT_FT \\$1 +. if '\\$0'COVER_DOCTYPE_FONT' .ds $COVER_DOCTYPE_FT \\$1 +. if '\\$0'COVER_SUBTITLE_FONT' .ds $COVER_SUBTITLE_FT \\$1 +. if '\\$0'COVER_TITLE_FONT' .ds $COVER_TITLE_FT \\$1 +. if '\\$0'DOC_COVER_AUTHOR_FONT' .ds $DOC_COVER_AUTHOR_FT \\$1 +. if '\\$0'DOC_COVER_CHAPTER_TITLE_FONT' .ds $DOC_COVER_CHAPTER_TITLE_FT \\$1 +. if '\\$0'DOC_COVER_COPYRIGHT_FONT' .ds $DOC_COVER_COPYRIGHT_FT \\$1 +. if '\\$0'DOC_COVER_DOCTYPE_FONT' .ds $DOC_COVER_DOCTYPE_FT \\$1 +. if '\\$0'DOC_COVER_SUBTITLE_FONT' .ds $DOC_COVER_SUBTITLE_FT \\$1 +. if '\\$0'DOC_COVER_TITLE_FONT' .ds $DOC_COVER_TITLE_FT \\$1 +. if '\\$0'DOCTYPE_FONT' .ds $DOCTYPE_FT \\$1 +. if '\\$0'ENDNOTE_FONT' .ds $EN_FT \\$1 +. if '\\$0'ENDNOTE_NUMBER_FONT' .ds $EN_NUMBER_FT \\$1 +. if '\\$0'ENDNOTE_LINENUMBER_FONT' .ds $EN_LN_FT \\$1 +. if '\\$0'ENDNOTE_STRING_FONT' .ds $EN_STRING_FT \\$1 +. if '\\$0'ENDNOTE_TITLE_FONT' .ds $EN_TITLE_FT \\$1 +. if '\\$0'EPIGRAPH_FONT' .ds $EPI_FT \\$1 +. if '\\$0'FOOTNOTE_FONT' .ds $FN_FT \\$1 +. if '\\$0'HDRFTR_CENTER_FONT' .ds $HDRFTR_CENTER_FT \\$1 +. if '\\$0'HDRFTR_LEFT_FONT' .ds $HDRFTR_LEFT_FT \\$1 +. if '\\$0'HDRFTR_RIGHT_FONT' .ds $HDRFTR_RIGHT_FT \\$1 +. if '\\$0'HEAD_FONT' .ds $HEAD_FT \\$1 +. if '\\$0'PAGENUM_FONT' .ds $PAGE_NUM_FT \\$1 +. if '\\$0'PARAHEAD_FONT' .ds $PH_FT \\$1 +. if '\\$0'QUOTE_FONT' .ds $QUOTE_FT \\$1 +. if '\\$0'SUBHEAD_FONT' .ds $SH_FT \\$1 +. if '\\$0'SUBTITLE_FONT' .ds $SUBTITLE_FT \\$1 +. if '\\$0'TITLE_FONT' .ds $TITLE_FT \\$1 +. if '\\$0'TOC_HEADER_FONT' .ds $TOC_HEADER_FT \\$1 +. if '\\$0'TOC_HEAD_FONT' .ds $TOC_HEAD_FT \\$1 +. if '\\$0'TOC_PARAHEAD_FONT' .ds $TOC_PH_FT \\$1 +. if '\\$0'TOC_PN_FONT' .ds $TOC_PN_FT \\$1 +. if '\\$0'TOC_SUBHEAD_FONT' .ds $TOC_SH_FT \\$1 +. if '\\$0'TOC_TITLE_FONT' .ds $TOC_TITLE_FT \\$1 +.END +\# +\# +.MAC _SIZE END +. if '\\$0'AUTHOR_SIZE' .ds $AUTHOR_SIZE_CHANGE \\$1 +. if '\\$0'BIBLIOGRAPHY_STRING_SIZE' .ds $BIB_STRING_SIZE_CHANGE \\$1 +. if '\\$0'BLOCKQUOTE_SIZE' .ds $BQUOTE_SIZE_CHANGE \\$1 +. if '\\$0'CITATION_SIZE' .ds $BQUOTE_SIZE_CHANGE \\$1 +. if '\\$0'CITE_SIZE' .ds $BQUOTE_SIZE_CHANGE \\$1 +. if '\\$0'CHAPTER_TITLE_SIZE' .ds $CHAPTER_TITLE_SIZE_CHANGE \\$1 +. if '\\$0'COVER_AUTHOR_SIZE' .ds $COVER_AUTHOR_SIZE_CHANGE \\$1 +. if '\\$0'COVER_CHAPTER_TITLE_SIZE' .ds $COVER_CHAPTER_TITLE_SIZE_CHANGE \\$1 +. if '\\$0'COVER_COPYRIGHT_SIZE' .ds $COVER_COPYRIGHT_SIZE_CHANGE \\$1 +. if '\\$0'COVER_DOCTYPE_SIZE' .ds $COVER_DOCTYPE_SIZE_CHANGE \\$1 +. if '\\$0'COVER_SUBTITLE_SIZE' .ds $COVER_SUBTITLE_SIZE_CHANGE \\$1 +. if '\\$0'COVER_TITLE_SIZE' .ds $COVER_TITLE_SIZE_CHANGE \\$1 +. if '\\$0'DOC_COVER_AUTHOR_SIZE' .ds $DOC_COVER_AUTHOR_SIZE_CHANGE \\$1 +. if '\\$0'DOC_COVER_CHAPTER_TITLE_SIZE' .ds $DOC_COVER_CHAPTER_TITLE_SIZE_CHANGE \\$1 +. if '\\$0'DOC_COVER_COPYRIGHT_SIZE' .ds $DOC_COVER_COPYRIGHT_SIZE_CHANGE \\$1 +. if '\\$0'DOC_COVER_DOCTYPE_SIZE' .ds $DOC_COVER_DOCTYPE_SIZE_CHANGE \\$1 +. if '\\$0'DOC_COVER_SUBTITLE_SIZE' .ds $DOC_COVER_SUBTITLE_SIZE_CHANGE \\$1 +. if '\\$0'DOC_COVER_TITLE_SIZE' .ds $DOC_COVER_TITLE_SIZE_CHANGE \\$1 +. if '\\$0'DOCTYPE_SIZE' .ds $DOCTYPE_SIZE_CHANGE \\$1 +. if '\\$0'ENDNOTE_NUMBER_SIZE' .ds $EN_NUMBER_SIZE_CHANGE \\$1 +. if '\\$0'ENDNOTE_LINENUMBER_SIZE' .ds $EN_LN_SIZE_CHANGE \\$1 +. if '\\$0'ENDNOTE_STRING_SIZE' .ds $EN_STRING_SIZE_CHANGE \\$1 +. if '\\$0'ENDNOTE_TITLE_SIZE' .ds $EN_TITLE_SIZE_CHANGE \\$1 +. if '\\$0'EPIGRAPH_SIZE' .ds $EPI_SIZE_CHANGE \\$1 +. if '\\$0'FOOTNOTE_SIZE' .ds $FN_SIZE_CHANGE \\$1 +. if '\\$0'HDRFTR_CENTER_SIZE' .ds $HDRFTR_CENTER_SIZE_CHANGE \\$1 +. if '\\$0'HDRFTR_LEFT_SIZE' .ds $HDRFTR_LEFT_SIZE_CHANGE \\$1 +. if '\\$0'HDRFTR_RIGHT_SIZE' .ds $HDRFTR_RIGHT_SIZE_CHANGE \\$1 +. if '\\$0'HDRFTR_SIZE' .ds $HDRFTR_SIZE_CHANGE \\$1 +. if '\\$0'HEAD_SIZE' .ds $HEAD_SIZE_CHANGE \\$1 +. if '\\$0'PAGENUM_SIZE' .ds $PAGE_NUM_SIZE_CHANGE \\$1 +. if '\\$0'PARAHEAD_SIZE' .ds $PH_SIZE_CHANGE \\$1 +. if '\\$0'QUOTE_SIZE' .ds $QUOTE_SIZE_CHANGE \\$1 +. if '\\$0'SUBHEAD_SIZE' .ds $SH_SIZE_CHANGE \\$1 +. if '\\$0'SUBTITLE_SIZE' .ds $SUBTITLE_SIZE_CHANGE \\$1 +. if '\\$0'TITLE_SIZE' .ds $TITLE_SIZE_CHANGE \\$1 +. if '\\$0'TOC_HEADER_SIZE' .ds $TOC_HEADER_SIZE_CHANGE \\$1 +. if '\\$0'TOC_HEAD_SIZE' .ds $TOC_HEAD_SIZE_CHANGE \\$1 +. if '\\$0'TOC_PARAHEAD_SIZE' .ds $TOC_PH_SIZE_CHANGE \\$1 +. if '\\$0'TOC_PN_SIZE' .ds $TOC_PN_SIZE_CHANGE \\$1 +. if '\\$0'TOC_SUBHEAD_SIZE' .ds $TOC_SH_SIZE_CHANGE \\$1 +. if '\\$0'TOC_TITLE_SIZE' .ds $TOC_TITLE_SIZE_CHANGE \\$1 +.END +\# +\# +.MAC _COLOR END +. if \\n[#PRINT_STYLE]=1 \{ .return \} +. if '\\$0'ATTRIBUTE_COLOR' \{\ +. nr #ATTRIBUTE_COLOR 1 +. ds $ATTRIBUTE_COLOR \\$1 . \} -. if !\\n[#COPY_STYLE] \{ .COPYSTYLE FINAL \} -. if \\n[#DRAFT_WITH_PAGENUM] \{ .COPYSTYLE \\*[$COPY_STYLE] \} -. if \\n[#DOC_TYPE]=4 \{\ -. if !\\n[#USER_SET_L_LENGTH] \{\ -. R_MARGIN \\n[#R_MARGIN]u -. rr #USER_SET_L_LENGTH -. \} -. if \\n[#PRINT_STYLE]=1 \{ .PRINTSTYLE TYPEWRITE SINGLESPACE \} +. if '\\$0'AUTHOR_COLOR' \{\ +. nr #AUTHOR_COLOR 1 +. ds $AUTHOR_COLOR \\$1 . \} -. if \\n[#COPY_STYLE]=1 \{\ -. COPYSTYLE DRAFT -. PAGENUMBER 1 +. if '\\$0'BLOCKQUOTE_COLOR' \{\ +. nr #BQUOTE_COLOR 1 +. ds $BQUOTE_COLOR \\$1 . \} -. if !r#DOC_HEADER \{ .DOCHEADER \} -. if !r#HEADERS_ON \{ .HEADERS \} -. if !r#PAGINATE \{ .PAGINATE \} -. if \\n[#FOOTERS_ON] \{\ -. HEADERS OFF -. if \\n[#PAGE_NUM_POS_SET]=0 \{ .PAGENUM_POS TOP CENTER \} +. if '\\$0'CITATION_COLOR' \{\ +. nr #BQUOTE_COLOR 1 +. ds $BQUOTE_COLOR \\$1 . \} -. if !r#HEADER_MARGIN \{ .HEADER_MARGIN 4P+6p \} -. if !r#HEADER_GAP \{ .HEADER_GAP 3P \} -. if \\n[#FOOTERS_ON] \{\ -. if \\n[#PAGINATE]=0 \{\ -. if !r#T_MARGIN \{ .T_MARGIN 6P \} -. \} +. if '\\$0'CITE_COLOR' \{\ +. nr #BQUOTE_COLOR 1 +. ds $BQUOTE_COLOR \\$1 . \} -. if \\n[#HEADERS_ON]=0 \{\ -. if \\n[#FOOTERS_ON]=0 \{\ -. if !r#T_MARGIN \{ .T_MARGIN 6P \} -. \} +. if '\\$0'CHAPTER_TITLE_COLOR' \{\ +. nr #CHAPTER_TITLE_COLOR 1 +. ds $CHAPTER_TITLE_COLOR \\$1 +. \} +. if '\\$0'COVER_ATTRIBUTE_COLOR' \{\ +. nr #COVER_ATTRIBUTE_COLOR 1 +. ds $COVER_ATTRIBUTE_COLOR \\$1 +. \} +. if '\\$0'COVER_AUTHOR_COLOR' \{\ +. nr #COVER_AUTHOR_COLOR 1 +. ds $COVER_AUTHOR_COLOR \\$1 +. \} +. if '\\$0'COVER_CHAPTER_TITLE_COLOR' \{\ +. nr #COVER_CHAPTER_TITLE_COLOR 1 +. ds $COVER_CHAPTER_TITLE_COLOR \\$1 +. \} +. if '\\$0'COVER_COLOR' \{\ +. nr #COVER_COLOR 1 +. ds $COVER_COLOR \\$1 +. \} +. if '\\$0'COVER_COPYRIGHT_COLOR' \{\ +. nr #COVER_COPYRIGHT_COLOR 1 +. ds $COVER_COPYRIGHT_COLOR \\$1 +. \} +. if '\\$0'COVER_MISC_COLOR' \{\ +. nr #COVER_MISC_COLOR 1 +. ds $COVER_MISC_COLOR \\$1 +. \} +. if '\\$0'COVER_TITLE_COLOR' \{\ +. nr #COVER_TITLE_COLOR 1 +. ds $COVER_TITLE_COLOR \\$1 +. \} +. if '\\$0'COVER_SUBTITLE_COLOR' \{\ +. nr #COVER_SUBTITLE_COLOR 1 +. ds $COVER_SUBTITLE_COLOR \\$1 +. \} +. if '\\$0'COVER_DOCTYPE_COLOR' \{\ +. nr #COVER_DOCTYPE_COLOR 1 +. ds $COVER_DOCTYPE_COLOR \\$1 +. \} +. if '\\$0'DOC_COVER_ATTRIBUTE_COLOR' \{\ +. nr #DOC_COVER_ATTRIBUTE_COLOR 1 +. ds $DOC_COVER_ATTRIBUTE_COLOR \\$1 +. \} +. if '\\$0'DOC_COVER_AUTHOR_COLOR' \{\ +. nr #DOC_COVER_AUTHOR_COLOR 1 +. ds $DOC_COVER_AUTHOR_COLOR \\$1 +. \} +. if '\\$0'DOC_COVER_CHAPTER_TITLE_COLOR' \{\ +. nr #DOC_COVER_CHAPTER_TITLE_COLOR 1 +. ds $DOC_COVER_CHAPTER_TITLE_COLOR \\$1 +. \} +. if '\\$0'DOC_COVER_COLOR' \{\ +. nr #DOC_COVER_COLOR 1 +. ds $DOC_COVER_COLOR \\$1 +. \} +. if '\\$0'DOC_COVER_COPYRIGHT_COLOR' \{\ +. nr #DOC_COVER_COPYRIGHT_COLOR 1 +. ds $DOC_COVER_COPYRIGHT_COLOR \\$1 +. \} +. if '\\$0'DOC_COVER_MISC_COLOR' \{\ +. nr #DOC_COVER_MISC_COLOR 1 +. ds $DOC_COVER_MISC_COLOR \\$1 +. \} +. if '\\$0'DOC_COVER_TITLE_COLOR' \{\ +. nr #DOC_COVER_TITLE_COLOR 1 +. ds $DOC_COVER_TITLE_COLOR \\$1 +. \} +. if '\\$0'DOC_COVER_SUBTITLE_COLOR' \{\ +. nr #DOC_COVER_SUBTITLE_COLOR 1 +. ds $DOC_COVER_SUBTITLE_COLOR \\$1 +. \} +. if '\\$0'DOC_COVER_DOCTYPE_COLOR' \{\ +. nr #DOC_COVER_DOCTYPE_COLOR 1 +. ds $DOC_COVER_DOCTYPE_COLOR \\$1 +. \} +. if '\\$0'DOCHEADER_COLOR' \{\ +. nr #DOCHEADER_COLOR 1 +. ds $DOCHEADER_COLOR \\$1 +. \} +. if '\\$0'DOCTYPE_COLOR' \{\ +. nr #DOCTYPE_COLOR 1 +. ds $DOCTYPE_COLOR \\$1 +. \} +. if '\\$0'EPIGRAPH_COLOR' \{\ +. nr #EPI_COLOR 1 +. ds $EPI_COLOR \\$1 +. \} +. if '\\$0'FINIS_COLOR' \{\ +. nr #FINIS_COLOR 1 +. ds $FINIS_COLOR \\$1 +. \} +. if '\\$0'FOOTNOTE_COLOR' \{\ +. nr #FOOTNOTE_COLOR 1 +. ds $FOOTNOTE_COLOR \\$1 +. \} +. if '\\$0'HDRFTR_CENTER_COLOR' \{\ +. nr #HDRFTR_CENTER_COLOR 1 +. ds $HDRFTR_CENTER_COLOR \\$1 +. \} +. if '\\$0'HDRFTR_COLOR' \{\ +. nr #HDRFTR_COLOR 1 +. ds $HDRFTR_COLOR \\$1 +. \} +. if '\\$0'HDRFTR_LEFT_COLOR' \{\ +. nr #HDRFTR_LEFT_COLOR 1 +. ds $HDRFTR_LEFT_COLOR \\$1 +. \} +. if '\\$0'HDRFTR_RIGHT_COLOR' \{\ +. nr #HDRFTR_RIGHT_COLOR 1 +. ds $HDRFTR_RIGHT_COLOR \\$1 +. \} +. if '\\$0'HDRFTR_RULE_COLOR' \{\ +. nr #HDRFTR_RULE_COLOR 1 +. ds $HDRFTR_RULE_COLOR \\$1 +. \} +. if '\\$0'HEAD_COLOR' \{\ +. nr #HEAD_COLOR 1 +. ds $HEAD_COLOR \\$1 +. \} +. if '\\$0'LINEBREAK_COLOR' \{\ +. nr #LINEBREAK_COLOR 1 +. ds $LINEBREAK_COLOR \\$1 +. \} +. if '\\$0'PAGENUM_COLOR' \{\ +. nr #PAGE_NUM_COLOR 1 +. ds $PAGENUM_COLOR \\$1 +. \} +. if '\\$0'PARAHEAD_COLOR' \{\ +. nr #PH_COLOR 1 +. ds $PH_COLOR \\$1 +. \} +. if '\\$0'QUOTE_COLOR' \{\ +. nr #QUOTE_COLOR 1 +. ds $QUOTE_COLOR \\$1 +. \} +. if '\\$0'SUBHEAD_COLOR' \{\ +. nr #SH_COLOR 1 +. ds $SH_COLOR \\$1 +. \} +. if '\\$0'SUBTITLE_COLOR' \{\ +. nr #SUBTITLE_COLOR 1 +. ds $SUBTITLE_COLOR \\$1 +. \} +. if '\\$0'TITLE_COLOR' \{\ +. nr #TITLE_COLOR 1 +. ds $TITLE_COLOR \\$1 +. \} +.END +\# +\# +.MAC _QUAD END +. if '\\$0'BIBLIOGRAPHY_QUAD' \{\ +. ds $BIB_QUAD \\$1 +. if '\\*[$BIB_QUAD]'R' .ab Fatal error: \\$0 must be set to either L or J +. if '\\*[$BIB_QUAD]'C' .ab Fatal error: \\$0 must be set to either L or J +. \} +. if '\\$0'BIBLIOGRAPHY_STRING_QUAD' .ds $BIB_STRING_QUAD \\$1 +. if '\\$0'BLOCKQUOTE_QUAD' .ds $BQUOTE_QUAD \\$1 +. if '\\$0'CITATION_QUAD' .ds $BQUOTE_QUAD \\$1 +. if '\\$0'CITE_QUAD' .ds $BQUOTE_QUAD \\$1 +. if '\\$0'COVER_COPYRIGHT_QUAD' .ds $COVER_COPYRIGHT_QUAD \\$1 +. if '\\$0'COVER_MISC_QUAD' .ds $COVER_MISC_QUAD \\$1 +. if '\\$0'DOC_COVER_COPYRIGHT_QUAD' .ds $DOC_COVER_COPYRIGHT_QUAD \\$1 +. if '\\$0'DOC_COVER_MISC_QUAD' .ds $DOC_COVER_MISC_QUAD \\$1 +. if '\\$0'DOC_QUAD' \{\ +. ds $DOC_QUAD \\$1 +. QUAD \\*[$DOC_QUAD] +. \} +. if '\\$0'ENDNOTE_QUAD' \{\ +. ds $EN_QUAD \\$1 +. if '\\*[$EN_QUAD]'R' .ab Fatal error: \\$0 must be set to either L or J +. if '\\*[$EN_QUAD]'C' .ab Fatal error: \\$0 must be set to either L or J +. \} +. if '\\$0'ENDNOTE_STRING_QUAD' .ds $EN_STRING_QUAD \\$1 +. if '\\$0'ENDNOTE_TITLE_QUAD' .ds $EN_TITLE_QUAD \\$1 +. if '\\$0'EPIGRAPH_QUAD' .ds $EPI_QUAD \\$1 +. if '\\$0'FOOTNOTE_QUAD' .ds $FN_QUAD \\$1 +. if '\\$0'HEAD_QUAD' .ds $HEAD_QUAD \\$1 +. if '\\$0'SUBHEAD_QUAD' .ds $SH_QUAD \\$1 +. if '\\$0'TOC_HEADER_QUAD' .ds $TOC_HEADER_QUAD \\$1 +.END +\# +\# +\# DEFAULTS +\# -------- +\# *Arguments: +\# +\# *Function: +\# Sets up defaults if no values are entered prior to START. +\# *Notes: +\# The defaults for $CHAPTER_STRING, $DRAFT_STRING, and +\# $REVISION_STRING are in the COPYSTYLE macro. +\# +.MAC DEFAULTS END +. if !d$PAPER \{ .PAPER LETTER \} +. if !\\n[#DOC_TYPE] \{ .DOCTYPE DEFAULT \} +. ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} +. el \{\ +. if !\\n[#COPY_STYLE]=1 \{ .PAGENUM_STYLE DIGIT \} +. \} +. if !\\n[#COPY_STYLE] \{ .COPYSTYLE FINAL \} +. if \\n[#DRAFT_WITH_PAGENUM] \{ .COPYSTYLE \\*[$COPY_STYLE] \} +. if \\n[#DOC_TYPE]=4 \{\ +. if !\\n[#USER_SET_L_LENGTH] \{\ +. R_MARGIN \\n[#R_MARGIN]u +. rr #USER_SET_L_LENGTH +. \} +. if \\n[#PRINT_STYLE]=1 \{ .PRINTSTYLE TYPEWRITE SINGLESPACE \} +. \} +. if \\n[#COPY_STYLE]=1 \{\ +. COPYSTYLE DRAFT +. PAGENUMBER 1 +. \} +. if !r#DOC_HEADER \{ .DOCHEADER \} +. if !r#HEADERS_ON \{ .HEADERS \} +. if !r#PAGINATE \{ .PAGINATE \} +. if \\n[#FOOTERS_ON] \{\ +. HEADERS OFF +. if \\n[#PAGE_NUM_POS_SET]=0 \{ .PAGENUM_POS TOP CENTER \} +. \} +. if !r#HEADER_MARGIN \{ .HEADER_MARGIN 4P+6p \} +. if !r#HEADER_GAP \{ .HEADER_GAP 3P \} +. if \\n[#FOOTERS_ON] \{\ +. if \\n[#PAGINATE]=0 \{\ +. if !r#T_MARGIN \{ .T_MARGIN 6P \} +. \} +. \} +. if \\n[#HEADERS_ON]=0 \{\ +. if \\n[#FOOTERS_ON]=0 \{\ +. if !r#T_MARGIN \{ .T_MARGIN 6P \} +. \} . \} . if !r#T_MARGIN \{ .T_MARGIN \\n[#HEADER_MARGIN]+\\n[#HEADER_GAP] \} -. if !r#DOCHEADER_ADVANCE \{ .DOCHEADER_ADVANCE \\n[#T_MARGIN] \} +. if !r#DOCHEADER_ADVANCE \{ .nr #DOCHEADER_ADVANCE \\n[#T_MARGIN] \} . if !r#FOOTER_MARGIN \{ .FOOTER_MARGIN 3P \} . if !r#FOOTER_GAP \{ .FOOTER_GAP 3P \} . if !r#B_MARGIN \{ .B_MARGIN \\n[#FOOTER_MARGIN]u+\\n[#FOOTER_GAP]u \} @@ -3861,7 +4557,7 @@ y\\R'#DESCENDER \\n[.cdp]' . tm1 " No footers or bottom-of-page page numbers will be printed. . tm1 " Please reset B_MARGIN or FOOTER_MARGIN to allow enough space. . tm1 " If no footers or bottom-of-page page numbers are required, -. tm1 " place .FOOTER_MARGIN 0 before .START +. tm1 " type in .FOOTER_MARGIN 0 before .START . \} . if !r#HDRFTR_RULE_GAP \{\ . if \\n[#HEADERS_ON] \{ .HDRFTR_RULE_GAP 4p \} @@ -3869,26 +4565,35 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . if !r#HDRFTR_RULE \{ .HDRFTR_RULE \} . if !r#PAGE_NUM_SET \{ .PAGENUMBER 1 \} -. ie r#ADJ_DOC_LEAD \{ . \} -. el \{ .DOC_LEAD_ADJUST \} -\# Read in number registers and strings for type parameters +.\" Read in number registers and strings for type parameters . nr #DOC_L_MARGIN \\n[#L_MARGIN] . nr #DOC_L_LENGTH \\n[#L_LENGTH] . nr #DOC_R_MARGIN \\n[#PAGE_WIDTH]-(\\n[#DOC_L_MARGIN]+\\n[#L_LENGTH]) . ds $DOC_FAM \\*[$FAMILY] . nr #DOC_PT_SIZE \\n[#PT_SIZE] . nr #DOC_LEAD \\n[#LEAD] +.\" #SAVED_DOC_LEAD is set in COLLATE +. if r#SAVED_DOC_LEAD \{\ +. if !\\n[#DOC_LEAD]=\\n[#SAVED_DOC_LEAD] \{ .nr #RERUN_TRAPS 1 \} +. \} +. ie \\n[#ADJ_DOC_LEAD]=1 \{ . \} +. el \{\ +. if !\\n[#DOC_LEAD_ADJUST_OFF] \{\ +. DOC_LEAD_ADJUST +. \} +. \} . ds $DOC_QUAD \\*[$QUAD_VALUE] . ds $PP_FT \\*[$FONT] -\# Counters +.\" Counters . nr #PP 0 . nr #FN_NUMBER 0 1 . nr #EN_NUMBER 0 1 . nr #FN_COUNT_FOR_COLS 0 1 +. nr #DONE_ONCE 0 1 . RESET_HEAD_NUMBER . RESET_SUBHEAD_NUMBER . RESET_PARAHEAD_NUMBER -\# General style defaults for both PRINTSTYLEs +.\" General style defaults for both PRINTSTYLEs . nr #PP_STYLE 1 . PARA_INDENT \\n[#PP_INDENT]u . if !d$HDRFTR_FAM \{ .HDRFTR_FAMILY \\*[$DOC_FAM] \} @@ -3910,21 +4615,22 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#HDRFTR_RIGHT_CAPS]=0 \{\ . if !d$HDRFTR_RIGHT_SIZE_CHANGE \{ .HDRFTR_RIGHT_SIZE +0 \} . \} -. if !d$FN_FAM \{ .FOOTNOTE_FAMILY \\*[$DOC_FAM] \} -. if !d$FN_FT \{ .FOOTNOTE_FONT R \} -. if !d$FN_QUAD \{ .FOOTNOTE_QUAD \\*[$DOC_QUAD] \} -. if !r#FN_RULE \{ .FOOTNOTE_RULE \} -. if !r#FN_MARKERS \{ .FOOTNOTE_MARKERS \} -. if !r#FN_MARKER_STYLE \{ .FOOTNOTE_MARKER_STYLE STAR \} -. if !d$EN_PN_STYLE \{ .ENDNOTES_PAGENUM_STYLE digit \} -. if !d$EN_FAM \{ .ENDNOTE_FAMILY \\*[$DOC_FAM] \} -. if !d$EN_FN \{ .ENDNOTE_FONT R \} -. if !d$EN_QUAD \{ .ENDNOTE_QUAD \\*[$DOC_QUAD] \} -. if !d$EN_STRING \{ .ENDNOTE_STRING "Endnotes" \} -. if !d$EN_STRING_FAM \{ .ENDNOTE_STRING_FAMILY \\*[$EN_FAM] \} -. if !d$EN_STRING_QUAD \{ .ENDNOTE_STRING_QUAD CENTER \} -. if !r#EN_STRING_UNDERSCORE \{ .ENDNOTE_STRING_UNDERSCORE 2 \} -. if !r#EN_STRING_CAPS \{ .ENDNOTE_STRING_CAPS \} +. if !d$FN_FAM \{ .FOOTNOTE_FAMILY \\*[$DOC_FAM] \} +. if !d$FN_FT \{ .FOOTNOTE_FONT R \} +. if !d$FN_QUAD \{ .FOOTNOTE_QUAD \\*[$DOC_QUAD] \} +. if !r#FN_RULE \{ .FOOTNOTE_RULE \} +. if !r#FN_MARKERS \{ .FOOTNOTE_MARKERS \} +. if !\\n[#FN_MARKER_STYLE] \{ .FOOTNOTE_MARKER_STYLE STAR \} +. if !\\n[#EN_MARKER_STYLE] \{ .ENDNOTE_MARKER_STYLE NUMBER \} +. if !d$EN_PN_STYLE \{ .ENDNOTES_PAGENUM_STYLE digit \} +. if !d$EN_FAM \{ .ENDNOTE_FAMILY \\*[$DOC_FAM] \} +. if !d$EN_FT \{ .ENDNOTE_FONT R \} +. if !d$EN_QUAD \{ .ENDNOTE_QUAD \\*[$DOC_QUAD] \} +. if !d$EN_STRING \{ .ENDNOTE_STRING "Endnotes" \} +. if !d$EN_STRING_FAM \{ .ENDNOTE_STRING_FAMILY \\*[$EN_FAM] \} +. if !d$EN_STRING_QUAD \{ .ENDNOTE_STRING_QUAD CENTER \} +. if !r#EN_STRING_UNDERSCORE \{ .ENDNOTE_STRING_UNDERSCORE 2 \} +. if !r#EN_STRING_CAPS \{ .ENDNOTE_STRING_CAPS \} . if !d$EN_TITLE \{\ . ie \\n[#DOC_TYPE]=2 \{\ . ie '\\*[$CHAPTER]'' \{ .ENDNOTE_TITLE "\\*[$CHAPTER_STRING]" \} @@ -3936,61 +4642,86 @@ y\\R'#DESCENDER \\n[.cdp]' . if !d$EN_TITLE_QUAD \{ .ENDNOTE_TITLE_QUAD LEFT \} . if !r#EN_TITLE_UNDERSCORE \{ .ENDNOTE_TITLE_UNDERSCORE \} . if !d$EN_NUMBER_FAM \{ .ENDNOTE_NUMBER_FAMILY \\*[$EN_FAM] \} -. if !r#EN_NUMBERS_ALIGN_LEFT \{\ +. if !r#EN_NUMBERS_ALIGN_LEFT \{\ . if !r#EN_NUMBERS_ALIGN_RIGHT \{ .ENDNOTE_NUMBERS_ALIGN_RIGHT 2 \} . \} -. if !d$TOC_HEADER_STRING \{ .TOC_HEADER_STRING "Contents" \} -. if !d$TOC_HEADER_QUAD \{ .TOC_HEADER_QUAD LEFT \} -. if !d$TOC_PN_STYLE \{ .TOC_PAGENUM_STYLE roman \} -. if !r#TOC_PN_PADDING \{ .TOC_PADDING 3 \} -. if !r#TOC_TITLE_INDENT \{ .TOC_TITLE_INDENT 0 \} -. if !r#TOC_HEAD_INDENT \{ .TOC_HEAD_INDENT 18p \} -. if !r#TOC_SH_INDENT \{ .TOC_SUBHEAD_INDENT 30p \} -. if !r#TOC_PH_INDENT \{ .TOC_PARAHEAD_INDENT 42p \} -\# String defaults for both PRINTSTYLEs +. if !d$EN_LN_GAP \{ .ENDNOTE_LINENUMBER_GAP 1.5n \} +. if !d$BIB_PN_STYLE \{ .BIBLIOGRAPHY_PAGENUM_STYLE digit \} +. if !d$BIB_FAM \{ .BIBLIOGRAPHY_FAMILY \\*[$DOC_FAM] \} +. if !d$BIB_FT \{ .BIBLIOGRAPHY_FONT R \} +. if !d$BIB_QUAD \{ .BIBLIOGRAPHY_QUAD \\*[$DOC_QUAD] \} +. if !d$BIB_STRING \{ .BIBLIOGRAPHY_STRING "Bibliography" \} +. if !d$BIB_STRING_FAM \{ .BIBLIOGRAPHY_STRING_FAMILY \\*[$BIB_FAM] \} +. if !d$BIB_STRING_QUAD \{ .BIBLIOGRAPHY_STRING_QUAD CENTER \} +. if !r#BIB_STRING_UNDERSCORE \{ .BIBLIOGRAPHY_STRING_UNDERSCORE 2 \} +. if !r#BIB_STRING_CAPS \{ .BIBLIOGRAPHY_STRING_CAPS \} +. if !d$TOC_HEADER_STRING \{ .TOC_HEADER_STRING "Contents" \} +. if !d$TOC_HEADER_QUAD \{ .TOC_HEADER_QUAD LEFT \} +. if !d$TOC_PN_STYLE \{ .TOC_PAGENUM_STYLE roman \} +. if !r#TOC_PN_PADDING \{ .TOC_PADDING 3 \} +. if !r#TOC_TITLE_INDENT \{ .TOC_TITLE_INDENT 0 \} +. if !r#TOC_HEAD_INDENT \{ .TOC_HEAD_INDENT 18p \} +. if !r#TOC_SH_INDENT \{ .TOC_SUBHEAD_INDENT 30p \} +. if !r#TOC_PH_INDENT \{ .TOC_PARAHEAD_INDENT 42p \} +.\" String defaults for both PRINTSTYLEs . ie \\n[#DOC_TYPE]=1 \{\ . ie '\\*[$DOC_TITLE]'' \{\ -. if \\n[#USER_DEF_HDRFTR_LEFT]=0 \{ .ds $HDRFTR_LEFT \\*[$AUTHOR_1] \} +. if \\n[#USER_DEF_HDRFTR_LEFT]=0 .ds $HDRFTR_LEFT \\*[$AUTHOR_1] . rr #USER_DEF_HDRFTR_LEFT -. if \\n[#USER_DEF_HDRFTR_RIGHT]=0 \{ .ds $HDRFTR_RIGHT \\*[$TITLE] \} +. if \\n[#USER_DEF_HDRFTR_RIGHT]=0 .ds $HDRFTR_RIGHT \\*[$TITLE] . rr #USER_DEF_HDRFTR_RIGHT . \} . el \{\ . if \\n[#COPY_STYLE]=1 \{ .DRAFT_WITH_PAGENUMBER \} -. if \\n[#USER_DEF_HDRFTR_LEFT]=0 \{ .ds $HDRFTR_LEFT \\*[$AUTHOR_1] \} +. if \\n[#USER_DEF_HDRFTR_LEFT]=0 .ds $HDRFTR_LEFT \\*[$AUTHOR_1] . rr #USER_DEF_HDRFTR_LEFT -. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{ .ds $HDRFTR_CENTER \\*[$TITLE] \} +. if \\n[#USER_DEF_HDRFTR_CENTER]=0 .ds $HDRFTR_CENTER \\*[$TITLE] . rr #USER_DEF_HDRFTR_CENTER -. if \\n[#USER_DEF_HDRFTR_RIGHT]=0 \{ .ds $HDRFTR_RIGHT \\*[$DOC_TITLE] \} +. if \\n[#USER_DEF_HDRFTR_RIGHT]=0 .ds $HDRFTR_RIGHT \\*[$DOC_TITLE] . rr #USER_DEF_HDRFTR_RIGHT . \} . \} . el \{\ -. if \\n[#USER_DEF_HDRFTR_LEFT]=0 \{ .ds $HDRFTR_LEFT \\*[$AUTHOR_1] \} +. if \\n[#USER_DEF_HDRFTR_LEFT]=0 .ds $HDRFTR_LEFT \\*[$AUTHOR_1] . rr #USER_DEF_HDRFTR_LEFT -. if \\n[#USER_DEF_HDRFTR_RIGHT]=0 \{ .ds $HDRFTR_RIGHT \\*[$TITLE] \} +. if \\n[#USER_DEF_HDRFTR_RIGHT]=0 .ds $HDRFTR_RIGHT \\*[$TITLE] . rr #USER_DEF_HDRFTR_RIGHT . \} -. if !d$ATTRIBUTE_STRING \{ .ATTRIBUTE_STRING "by" \} -. if !d$FINIS_STRING \{ .FINIS_STRING "END" \} -\# Defaults for printstyle TYPEWRITE +. if !d$ATTRIBUTE_STRING \{ .ATTRIBUTE_STRING "by" \} +. if !d$FINIS_STRING \{ .FINIS_STRING "END" \} +.\" Covers +. if !r#DOC_COVERS_OFF \{ .nr #DOC_COVERS 1 \} +. if !r#COVERS_OFF \{ .nr #COVERS 1 \} +. if !d$COVER_COPYRIGHT_QUAD \{ .COVER_COPYRIGHT_QUAD R \} +. if !d$COVER_MISC_QUAD \{ .COVER_MISC_QUAD L \} +. if !d$DOC_COVER_COPYRIGHT_QUAD \{ .DOC_COVER_COPYRIGHT_QUAD R \} +. if !d$DOC_COVER_MISC_QUAD \{ .DOC_COVER_MISC_QUAD L \} +.\" Defaults for printstyle TYPEWRITE . if \\n[#PRINT_STYLE]=1 \{\ . if \\n[#UNDERLINE_QUOTES]=1 \{ .UNDERLINE_QUOTES \} . if \\n[#UNDERLINE_QUOTES]=0 \{ .UNDERLINE_QUOTES OFF \} +.\" +Quotes and blockquotes . if !r#Q_OFFSET_VALUE \{ .QUOTE_INDENT 2 \} +.\" +Epigraphs . if !r#EPI_OFFSET_VALUE \{ .EPIGRAPH_INDENT 2 \} +.\" +Linebreaks . if !d$LINEBREAK_CHAR \{ .LINEBREAK_CHAR * 3 2p \} +.\" +Footnotes . if !d$FN_SIZE_CHANGE \{ .FOOTNOTE_SIZE +0 \} . if !r#FN_RULE_LENGTH \{ .FOOTNOTE_RULE_LENGTH 2i \} +.\" +Paragraph heads +. if !r#PH_INDENT \{ .PARAHEAD_INDENT \\n[#PP_INDENT]u/2u \} +.\" +Endnotes +. if !r#EN_PP_INDENT \{ .ENDNOTE_PARA_INDENT \\n[#PP_INDENT] \} +.\" +Footnotes . if !r#FN_RULE_ADJ \{ .FOOTNOTE_RULE_ADJ 6p \} +.\" +Slant stuff . if !r#SLANT_MEANS_SLANT \{\ . ie \\n[#UNDERLINE_SLANT]=1 \{ .UNDERLINE_SLANT \} . el \{ .UNDERLINE_SLANT OFF \} . \} -. if !r#PH_INDENT \{ .PARAHEAD_INDENT \\n[#PP_INDENT]u/2u \} -. if !r#EN_PP_INDENT \{ .ENDNOTE_PARA_INDENT \\n[#PP_INDENT] \} . \} -\# Defaults for printstyle TYPESET +.\" Defaults for printstyle TYPESET . if \\n[#PRINT_STYLE]=2 \{\ . if !d$DOCHEADER_LEAD_ADJ \{\ . ie !'\\*[$CHAPTER_TITLE]'' \{\ @@ -4001,26 +4732,134 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . el \{ .DOCHEADER_LEAD +0 \} . \} -. if !d$TITLE_FAM \{ .TITLE_FAMILY \\*[$DOC_FAM] \} -. if !d$TITLE_FT \{ .TITLE_FONT B \} +.\" +Cover +. if !d$COVER_LEAD_ADJ \{ .COVER_LEAD +0 \} +. if !d$COVER_FAM \{ .COVER_FAMILY \\*[$DOC_FAM] \} +.\" (title) +. if !d$COVER_TITLE_FAM \{\ +. ie !d$COVER_FAM \{ .COVER_TITLE_FAMILY \\*[$DOC_FAM] \} +. el \{ .COVER_TITLE_FAMILY \\*[$COVER_FAM] \} +. \} +. if !d$COVER_TITLE_FT \{ .COVER_TITLE_FONT B \} +. if !d$COVER_TITLE_SIZE_CHANGE \{ .COVER_TITLE_SIZE +3.5 \} +.\" (chapter title) +. if !d$COVER_CHAPTER_TITLE_FAM \{\ +. ie !d$COVER_FAM \{ .COVER_CHAPTER_TITLE_FAMILY \\*[$DOC_FAM] \} +. el \{ .COVER_CHAPTER_TITLE_FAMILY \\*[$COVER_FAM] \} +. \} +. if !d$COVER_CHAPTER_TITLE_FT \{ .COVER_CHAPTER_TITLE_FONT BI \} +. if !d$COVER_CHAPTER_TITLE_SIZE_CHANGE \{ .COVER_CHAPTER_TITLE_SIZE +4 \} +.\" (subtitle) +. if !d$COVER_SUBTITLE_FAM \{\ +. ie !d$COVER_FAM \{ .COVER_SUBTITLE_FAMILY \\*[$DOC_FAM] \} +. el \{ .COVER_SUBTITLE_FAMILY \\*[$COVER_FAM] \} +. \} +. if !d$COVER_SUBTITLE_FT \{ .COVER_SUBTITLE_FONT R \} +. if !d$COVER_SUBTITLE_SIZE_CHANGE \{ .COVER_SUBTITLE_SIZE +0 \} +.\" (attribution and author[s]) +. if !d$COVER_AUTHOR_FAM \{\ +. ie !d$COVER_FAM \{ .COVER_AUTHOR_FAMILY \\*[$DOC_FAM] \} +. el \{ .COVER_AUTHOR_FAMILY \\*[$COVER_FAM] \} +. \} +. if !d$COVER_AUTHOR_FT \{ .COVER_AUTHOR_FONT I \} +. if !d$COVER_AUTHOR_SIZE_CHANGE \{ .COVER_AUTHOR_SIZE +0 \} +.\" (doctype if "named") +. if !d$COVER_DOCTYPE_FAM \{\ +. ie !d$COVER_FAM \{ .COVER_DOCTYPE_FAMILY \\*[$DOC_FAM] \} +. el \{ .COVER_DOCTYPE_FAMILY \\*[$COVER_FAM] \} +. \} +. if !d$COVER_DOCTYPE_FT \{ .COVER_DOCTYPE_FONT BI \} +. if !d$COVER_DOCTYPE_SIZE_CHANGE \{ .COVER_DOCTYPE_SIZE +3 \} +.\" (copyright) +. if !d$COVER_COPYRIGHT_FAM \{\ +. ie !d$COVER_FAM \{ .COVER_COPYRIGHT_FAMILY \\*[$DOC_FAM] \} +. el \{ .COVER_COPYRIGHT_FAMILY \\*[$COVER_FAM] \} +. \} +. if !d$COVER_COPYRIGHT_FT \{ .COVER_COPYRIGHT_FONT R \} +. if !d$COVER_COPYRIGHT_SIZE_CHANGE \{ .COVER_COPYRIGHT_SIZE -2 \} +.\" +Doc cover +. if !d$DOC_COVER_LEAD_ADJ \{ .DOC_COVER_LEAD +0 \} +. if !d$DOC_COVER_FAM \{ .DOC_COVER_FAMILY \\*[$DOC_FAM] \} +.\" (title) +. if !d$DOC_COVER_TITLE_FAM \{\ +. ie !d$DOC_COVER_FAM \{ .DOC_COVER_TITLE_FAMILY \\*[$DOC_FAM] \} +. el \{ .DOC_COVER_TITLE_FAMILY \\*[$DOC_COVER_FAM] \} +. \} +. if !d$DOC_COVER_TITLE_FT \{ .DOC_COVER_TITLE_FONT B \} +. if !d$DOC_COVER_TITLE_SIZE_CHANGE \{ .DOC_COVER_TITLE_SIZE +3.5 \} +.\" (chapter title) +. if !d$DOC_COVER_CHAPTER_TITLE_FAM \{\ +. ie !d$DOC_COVER_FAM \{ .DOC_COVER_CHAPTER_TITLE_FAMILY \\*[$DOC_FAM] \} +. el \{ .DOC_COVER_CHAPTER_TITLE_FAMILY \\*[$DOC_COVER_FAM] \} +. \} +. if !d$DOC_COVER_CHAPTER_TITLE_FT \{ .DOC_COVER_CHAPTER_TITLE_FONT BI \} +. if !d$DOC_COVER_CHAPTER_TITLE_SIZE_CHANGE \{ .DOC_COVER_CHAPTER_TITLE_SIZE +4 \} +.\" (subtitle) +. if !d$DOC_COVER_SUBTITLE_FAM \{\ +. ie !d$DOC_COVER_FAM \{ .DOC_COVER_SUBTITLE_FAMILY \\*[$DOC_FAM] \} +. el \{ .DOC_COVER_SUBTITLE_FAMILY \\*[$DOC_COVER_FAM] \} +. \} +. if !d$DOC_COVER_SUBTITLE_FT \{ .DOC_COVER_SUBTITLE_FONT R \} +. if !d$DOC_COVER_SUBTITLE_SIZE_CHANGE \{ .DOC_COVER_SUBTITLE_SIZE +0 \} +.\" (attribution and author[s]) +. if !d$DOC_COVER_AUTHOR_FAM \{\ +. ie !d$DOC_COVER_FAM \{ .DOC_COVER_AUTHOR_FAMILY \\*[$DOC_FAM] \} +. el \{ .DOC_COVER_AUTHOR_FAMILY \\*[$DOC_COVER_FAM] \} +. \} +. if !d$DOC_COVER_AUTHOR_FT \{ .DOC_COVER_AUTHOR_FONT I \} +. if !d$DOC_COVER_AUTHOR_SIZE_CHANGE \{ .DOC_COVER_AUTHOR_SIZE +0 \} +.\" (doctype if "named") +. if !d$DOC_COVER_DOCTYPE_FAM \{\ +. ie !d$DOC_COVER_FAM \{ .DOC_COVER_DOCTYPE_FAMILY \\*[$DOC_FAM] \} +. el \{ .DOC_COVER_DOCTYPE_FAMILY \\*[$DOC_COVER_FAM] \} +. \} +. if !d$DOC_COVER_DOCTYPE_FT \{ .DOC_COVER_DOCTYPE_FONT BI \} +. if !d$DOC_COVER_DOCTYPE_SIZE_CHANGE \{ .DOC_COVER_DOCTYPE_SIZE +3 \} +.\" (copyright) +. if !d$DOC_COVER_COPYRIGHT_FAM \{\ +. ie !d$DOC_COVER_FAM \{ .DOC_COVER_COPYRIGHT_FAMILY \\*[$DOC_FAM] \} +. el \{ .DOC_COVER_COPYRIGHT_FAMILY \\*[$DOC_COVER_FAM] \} +. \} +. if !d$DOC_COVER_COPYRIGHT_FT \{ .DOC_COVER_COPYRIGHT_FONT R \} +. if !d$DOC_COVER_COPYRIGHT_SIZE_CHANGE \{ .DOC_COVER_COPYRIGHT_SIZE -2 \} +.\" +Docheader +. if !d$DOCHEADER_FAM \{ .DOCHEADER_FAMILY \\*[$DOC_FAM] \} +. if !d$TITLE_FAM \{\ +. ie !d$DOCHEADER_FAM \{ .TITLE_FAMILY \\*[$DOC_FAM] \} +. el \{ .TITLE_FAMILY \\*[$DOCHEADER_FAM] \} +. \} +. if !d$TITLE_FT \{ .TITLE_FONT B \} . if !d$TITLE_SIZE_CHANGE \{\ . ie \\n[#DOC_TYPE]=2 \{ .TITLE_SIZE +4 \} . el \{ .TITLE_SIZE +3.5 \} . \} -. if !d$CHAPTER_TITLE_FAM \{ .CHAPTER_TITLE_FAMILY \\*[$DOC_FAM] \} -. if !d$CHAPTER_TITLE_FT \{ .CHAPTER_TITLE_FONT BI \} -. if !d$CHAPTER_TITLE_SIZE_CHANGE \{ .CHAPTER_TITLE_SIZE +4 \} -. if !d$SUBTITLE_FAM \{ .SUBTITLE_FAMILY \\*[$DOC_FAM] \} -. if !d$SUBTITLE_FT \{ .SUBTITLE_FONT R \} -. if !d$SUBTITLE_SIZE_CHANGE \{ .SUBTITLE_SIZE +0 \} -. if !d$AUTHOR_FAM \{ .AUTHOR_FAMILY \\*[$DOC_FAM] \} -. if !d$AUTHOR_FT \{ .AUTHOR_FONT I \} -. if !d$AUTHOR_SIZE_CHANGE \{ .AUTHOR_SIZE +0 \} -. if !d$DOCTYPE_FAM \{ .DOCTYPE_FAMILY \\*[$DOC_FAM] \} -. if !d$DOCTYPE_FT \{ .DOCTYPE_FONT BI \} -. if !d$DOCTYPE_SIZE_CHANGE \{ .DOCTYPE_SIZE +3 \} +. if !d$CHAPTER_TITLE_FAM \{\ +. ie !d$DOCHEADER_FAM \{ .CHAPTER_TITLE_FAMILY \\*[$DOC_FAM] \} +. el \{ .CHAPTER_TITLE_FAMILY \\*[$DOCHEADER_FAM] \} +. \} +. if !d$CHAPTER_TITLE_FT \{ .CHAPTER_TITLE_FONT BI \} +. if !d$CHAPTER_TITLE_SIZE_CHANGE \{ .CHAPTER_TITLE_SIZE +4 \} +. if !d$SUBTITLE_FAM \{\ +. ie !d$DOCHEADER_FAM \{ .SUBTITLE_FAMILY \\*[$DOC_FAM] \} +. el \{ .SUBTITLE_FAMILY \\*[$DOCHEADER_FAM] \} +. \} +. if !d$SUBTITLE_FT \{ .SUBTITLE_FONT R \} +. if !d$SUBTITLE_SIZE_CHANGE \{ .SUBTITLE_SIZE +0 \} +. if !d$AUTHOR_FAM \{\ +. ie !d$DOCHEADER_FAM \{ .AUTHOR_FAMILY \\*[$DOC_FAM] \} +. el \{ .AUTHOR_FAMILY \\*[$DOCHEADER_FAM] \} +. \} +. if !d$AUTHOR_FT \{ .AUTHOR_FONT I \} +. if !d$AUTHOR_SIZE_CHANGE \{ .AUTHOR_SIZE +0 \} +. if !d$DOCTYPE_FAM \{\ +. ie !d$DOCHEADER_FAM \{ .DOCTYPE_FAMILY \\*[$DOC_FAM] \} +. el \{ .DOCTYPE_FAMILY \\*[$DOCHEADER_FAM] \} +. \} +. if !d$DOCTYPE_FT \{ .DOCTYPE_FONT BI \} +. if !d$DOCTYPE_SIZE_CHANGE \{ .DOCTYPE_SIZE +3 \} +.\" +Headers and footers . if !d$HDRFTR_LEFT_FAM \{ .HDRFTR_LEFT_FAMILY \\*[$DOC_FAM] \} -. if !d$HDRFTR_LEFT_FT \{ .HDRFTR_LEFT_FONT R \} +. if !d$HDRFTR_LEFT_FT \{ .HDRFTR_LEFT_FONT R \} . if \\n[#HDRFTR_LEFT_CAPS] \{\ . if !d$HDRFTR_LEFT_SIZE_CHANGE \{ .HDRFTR_LEFT_SIZE -2 \} . \} @@ -4030,101 +4869,171 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#HDRFTR_CENTER_CAPS] \{\ . if !d$HDRFTR_CENTER_SIZE_CHANGE \{ .HDRFTR_CENTER_SIZE -2 \} . \} -. if !d$HDRFTR_CENTER_SIZE_CHANGE \{ .HDRFTR_CENTER_SIZE -.5 \} -. if !d$HDRFTR_RIGHT_FAM \{ .HDRFTR_RIGHT_FAMILY \\*[$DOC_FAM] \} -. if !d$HDRFTR_RIGHT_FT \{ .HDRFTR_RIGHT_FONT R \} +. if !d$HDRFTR_CENTER_SIZE_CHANGE \{ .HDRFTR_CENTER_SIZE -.5 \} +. if !d$HDRFTR_RIGHT_FAM \{ .HDRFTR_RIGHT_FAMILY \\*[$DOC_FAM] \} +. if !d$HDRFTR_RIGHT_FT \{ .HDRFTR_RIGHT_FONT R \} . if \\n[#HDRFTR_RIGHT_CAPS] \{\ . if !d$HDRFTR_RIGHT_SIZE_CHANGE \{ .HDRFTR_RIGHT_SIZE -2 \} . \} . if !d$HDRFTR_RIGHT_SIZE_CHANGE \{ .HDRFTR_RIGHT_SIZE -.5 \} +.\" +Heads . if !d$HEAD_FAM \{ .HEAD_FAMILY \\*[$DOC_FAM] \} . if !d$HEAD_FT \{ .HEAD_FONT B \} . if !d$HEAD_SIZE_CHANGE \{ .HEAD_SIZE +1 \} . if !r#HEAD_SPACE \{ .HEAD_SPACE \} +.\" +Subheads . if !d$SH_FAM \{ .SUBHEAD_FAMILY \\*[$DOC_FAM] \} . if !d$SH_FT \{ .SUBHEAD_FONT B \} . if !d$SH_SIZE_CHANGE \{ .SUBHEAD_SIZE +.5 \} +.\" +Paragraph heads . if !d$PH_FAM \{ .PARAHEAD_FAMILY \\*[$DOC_FAM] \} . if !d$PH_FT \{ .PARAHEAD_FONT BI \} . if !d$PH_SIZE_CHANGE \{ .PARAHEAD_SIZE -.25 \} . if !r#PH_INDENT \{ .PARAHEAD_INDENT \\n[#PP_INDENT]u/2u \} +.\" +Quotes . if !d$QUOTE_FAM \{ .QUOTE_FAMILY \\*[$DOC_FAM] \} . if !d$QUOTE_FT \{ .QUOTE_FONT I \} . if !d$QUOTE_SIZE_CHANGE \{ .QUOTE_SIZE +0 \} . if !r#Q_OFFSET_VALUE \{ .QUOTE_INDENT 3 \} +.\" +Blockquotes +.\" Note: the leading for quotes and blockquotes is set after .DEFAULTS in START . if !d$BQUOTE_FAM \{ .BLOCKQUOTE_FAMILY \\*[$DOC_FAM] \} . if !d$BQUOTE_FT \{ .BLOCKQUOTE_FONT R \} . if !d$BQUOTE_SIZE_CHANGE \{ .BLOCKQUOTE_SIZE -1 \} . if !d$BQUOTE_QUAD \{ .BLOCKQUOTE_QUAD LEFT \} +.\" +Epigraphs . if !d$EPI_FAM \{ .EPIGRAPH_FAMILY \\*[$DOC_FAM] \} . if !d$EPI_FT \{ .EPIGRAPH_FONT R \} . if !d$EPI_SIZE_CHANGE \{ .EPIGRAPH_SIZE -1.5 \} . if !r#EPI_AUTOLEAD \{ .EPIGRAPH_AUTOLEAD 2 \} . if !d$EPI_QUAD \{ .EPIGRAPH_QUAD \\*[$DOC_QUAD] \} . if !r#EPI_OFFSET_VALUE \{ .EPIGRAPH_INDENT 3 \} +.\" +Linebreaks . if !d$LINEBREAK_CHAR \{ .LINEBREAK_CHAR * 3 3p \} +.\" +Footnotes . if !r#FN_RULE_LENGTH \{ .FOOTNOTE_RULE_LENGTH 4P \} . if !r#FN_RULE_ADJ \{ .FOOTNOTE_RULE_ADJ 3p \} . if !d$FN_SIZE_CHANGE \{ .FOOTNOTE_SIZE -2 \} . if !r#FN_AUTOLEAD \{ .FOOTNOTE_AUTOLEAD 2 \} +.\" +Endnotes . if !r#EN_PS \{ .ENDNOTE_PT_SIZE \\n[#DOC_PT_SIZE]u \} -. if !d$EN_LEAD \{ .ENDNOTE_LEAD 14 ADJUST \} . if !d$EN_STRING_FT \{ .ENDNOTE_STRING_FONT B \} . if !d$EN_STRING_SIZE_CHANGE \{ .ENDNOTE_STRING_SIZE +1 \} . if !d$EN_TITLE_FT \{ .ENDNOTE_TITLE_FONT B \} . if !d$EN_TITLE_SIZE_CHANGE \{ .ENDNOTE_TITLE_SIZE +0 \} . if !d$EN_NUMBER_FT \{ .ENDNOTE_NUMBER_FONT B \} -. if !d$EN_NUMBER_SIZE_CHANGE \{ .ENDNOTE_NUMBER_SIZE +0 \} +. if !d$EN_NUMBER_SIZE_CHANGE \{ .ENDNOTE_NUMBER_SIZE +0 \} . if !r#EN_PP_INDENT \{ .ENDNOTE_PARA_INDENT 1.5m \} +.\" +Bibliography +. if !r#BIB_LIST \{ .BIBLIOGRAPHY_TYPE LIST . \} +. if !r#BIB_PS \{ .BIBLIOGRAPHY_PT_SIZE \\n[#DOC_PT_SIZE]u \} +. if !d$BIB_STRING_FT \{ .BIBLIOGRAPHY_STRING_FONT B \} +. if !d$BIB_STRING_SIZE_CHANGE \{ .BIBLIOGRAPHY_STRING_SIZE +1 \} +.\" +Table of contents . if !d$TOC_FAM \{ .TOC_FAMILY \\*[$DOC_FAM] \} . if !r#TOC_PS \{ .TOC_PT_SIZE \\n[#DOC_PT_SIZE]u \} . if !r#TOC_LEAD \{ .TOC_LEAD \\n[#DOC_LEAD]u ADJUST \} . if !d$TOC_HEADER_FAM \{ .TOC_HEADER_FAMILY \\*[$TOC_FAM] \} -. if !d$TOC_HEADER_SIZE_CHANGE \{ .TOC_HEADER_SIZE +4 \} -. if !d$TOC_HEADER_FT \{ .TOC_HEADER_FONT B \} +. if !d$TOC_HEADER_SIZE_CHANGE \{ .TOC_HEADER_SIZE +4 \} +. if !d$TOC_HEADER_FT \{ .TOC_HEADER_FONT B \} . if !d$TOC_TITLE_FAM \{ .TOC_TITLE_FAMILY \\*[$TOC_FAM] \} -. if !d$TOC_PN_FAM \{ .TOC_PN_FAMILY \\*[$TOC_FAM] \} -. if !d$TOC_HEAD_FAM \{ .TOC_HEAD_FAMILY \\*[$TOC_FAM] \} -. if !d$TOC_SH_FAM \{ .TOC_SUBHEAD_FAMILY \\*[$TOC_FAM] \} +. if !d$TOC_PN_FAM \{ .TOC_PN_FAMILY \\*[$TOC_FAM] \} +. if !d$TOC_HEAD_FAM \{ .TOC_HEAD_FAMILY \\*[$TOC_FAM] \} +. if !d$TOC_SH_FAM \{ .TOC_SUBHEAD_FAMILY \\*[$TOC_FAM] \} . if !d$TOC_PH_FAM \{ .TOC_PARAHEAD_FAMILY \\*[$TOC_FAM] \} -. if !d$TOC_TITLE_FT \{ .TOC_TITLE_FONT BI \} -. if !d$TOC_PN_FT \{ .TOC_PN_FONT R \} -. if !d$TOC_HEAD_FT \{ .TOC_HEAD_FONT B \} -. if !d$TOC_SH_FT \{ .TOC_SUBHEAD_FONT R \} -. if !d$TOC_PH_FT \{ .TOC_PARAHEAD_FONT I \} -. if !d$TOC_TITLE_SIZE_CHANGE \{ .TOC_TITLE_SIZE +.5 \} -. if !d$TOC_PN_SIZE_CHANGE \{ .TOC_PN_SIZE +0 \} -. if !d$TOC_HEAD_SIZE_CHANGE \{ .TOC_HEAD_SIZE +.5 \} +. if !d$TOC_TITLE_FT \{ .TOC_TITLE_FONT BI \} +. if !d$TOC_PN_FT \{ .TOC_PN_FONT R \} +. if !d$TOC_HEAD_FT \{ .TOC_HEAD_FONT B \} +. if !d$TOC_SH_FT \{ .TOC_SUBHEAD_FONT R \} +. if !d$TOC_PH_FT \{ .TOC_PARAHEAD_FONT I \} +. if !d$TOC_TITLE_SIZE_CHANGE \{ .TOC_TITLE_SIZE +.5 \} +. if !d$TOC_PN_SIZE_CHANGE \{ .TOC_PN_SIZE +0 \} +. if !d$TOC_HEAD_SIZE_CHANGE \{ .TOC_HEAD_SIZE +.5 \} . if !d$TOC_SH_SIZE_CHANGE \{ .TOC_SUBHEAD_SIZE +0 \} -. if !d$TOC_PH_SIZE_CHANGE \{ .TOC_PARAHEAD_SIZE +0 \} +. if !d$TOC_PH_SIZE_CHANGE \{ .TOC_PARAHEAD_SIZE +0 \} +. \} +.\" +Refer support +. if !r#ENDNOTE_REFS \{ .nr #FN_REFS 1 \} +. if '\\*[$REF_FN_INDENT]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{ .INDENT_REFS FOOTNOTE 2m \} +. if \\n[#PRINT_STYLE]=2 \{ .INDENT_REFS FOOTNOTE 1.5m \} +. \} +. if '\\*[$REF_EN_INDENT]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{ .INDENT_REFS ENDNOTE 2m \} +. if \\n[#PRINT_STYLE]=2 \{ .INDENT_REFS ENDNOTE 1.5m \} . \} +. if '\\*[$REF_BIB_INDENT]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{ .INDENT_REFS BIBLIO 2m \} +. if \\n[#PRINT_STYLE]=2 \{ .INDENT_REFS BIBLIO 1.5m :\} +. \} +.\" Adjust doc leading for PRINTSTYLE TYPESET . if \\n[#PRINT_STYLE]=2 \{\ . ie \\n[#ADJ_DOC_LEAD]=1 \{ .DOC_LEAD_ADJUST \} . el \{ . \} . \} -. if !\\n[#COLLATE] \{\ +.\" This diversion is to get a value for #FN_AUTOLEAD +. di NULL +. ev NULL +. if \\n[#PRINT_STYLE]=1 \{\ +. ps 12 +. ie \\n[#SINGLE_SPACE]=1 \{ .vs \\n[#ORIGINAL_DOC_LEAD]u \} +. el \{ .vs \\n[#ORIGINAL_DOC_LEAD]u/2u \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$FN_SIZE_CHANGE] +. AUTOLEAD \\n[#FN_AUTOLEAD] +. \} +. nr #FN_LEAD \\n[#LEAD] +. if \\n[#PRINT_STYLE]=2 \{ .LS \\n[#DOC_LEAD]u \} +. ev +. di +. ie !\\n[#COLLATE] \{\ +.\" DOC_LEAD adjusted (or not) here . TRAPS -\# Endnote and toc leading +. rr #DOC_LEAD_ADJUST_OFF +.\" Endnote, bibliography and toc leading . nr #OK_PROCESS_LEAD 1 . nr #RESTORE_DOC_LEAD \\n(.v +. nr #RESTORE_B_MARGIN \\n[#B_MARGIN] . if \\n[#PRINT_STYLE]=1 \{\ . ie \\n[#SINGLE_SPACE] \{\ . ENDNOTE_LEAD 12 ADJUST +. BIBLIOGRAPHY_LEAD 12 ADJUST . \} . el \{\ . ie \\n[#EN_SINGLESPACE] \{ .ENDNOTE_LEAD 12 ADJUST \} . el \{ .ENDNOTE_LEAD 24 ADJUST \} +. ie \\n[#BIB_SINGLESPACE] \{ .BIBLIOGRAPHY_LEAD 12 ADJUST \} +. el \{ .BIBLIOGRAPHY_LEAD 24 ADJUST \} . \} . \} . if \\n[#PRINT_STYLE]=2 \{\ . ie !d$EN_LEAD \{ .ENDNOTE_LEAD 14 ADJUST \} . el \{ .ENDNOTE_LEAD \\*[$EN_LEAD] \\*[$ADJUST_EN_LEAD] \} +. ie !d$BIB_LEAD \{ .BIBLIOGRAPHY_LEAD 14 ADJUST \} +. el \{ .BIBLIOGRAPHY_LEAD \\*[$BIB_LEAD] \\*[$ADJUST_BIB_LEAD] \} . ie !d$TOC_LEAD \{ .TOC_LEAD \\n[#RESTORE_DOC_LEAD]u \} . el \{ .TOC_LEAD \\*[$TOC_LEAD] \\*[$ADJUST_TOC_LEAD] \} . rm $ADJUST_EN_LEAD +. rm $ADJUST_BIB_LEAD . rm $ADJUST_TOC_LEAD . \} +. ie !d$BIB_SPACE \{ .BIBLIOGRAPHY_SPACING 1v \} +. el \{\ +. if \\n[#DEFER_BIB_SPACING]=1 \{\ +. BIBLIOGRAPHY_SPACING \\*[$BIB_SPACE] +. rr #DEFER_BIB_SPACING +. \} +. \} . DOC_LEAD \\n[#RESTORE_DOC_LEAD]u +. nr #B_MARGIN \\n[#RESTORE_B_MARGIN] +. \} +. el \{\ +. if \\n[#COLLATE] \{\ +. if !\\n[#PRINT_STYLE]=1 \{\ +. if \\n[#RERUN_TRAPS] \{ .TRAPS \} +. \} +. \} . \} . if \\n[#PRINT_STYLE]=1 \{ .nr #IGNORE 1 \} .END @@ -4153,22 +5062,58 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# First, define some strings for point sizes \# -.ds $TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$TITLE_SIZE_CHANGE] -.ds $CHAPTER_TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$CHAPTER_TITLE_SIZE_CHANGE] -.ds $SUBTITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$SUBTITLE_SIZE_CHANGE] -.ds $AUTHOR_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$AUTHOR_SIZE_CHANGE] -.ds $DOCTYPE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOCTYPE_SIZE_CHANGE] +\# Doc cover +.ds $DOC_COVER_AUTHOR_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOC_COVER_AUTHOR_SIZE_CHANGE] +.ds $DOC_COVER_CHAPTER_TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOC_COVER_CHAPTER_TITLE_SIZE_CHANGE] +.ds $DOC_COVER_COPYRIGHT_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOC_COVER_COPYRIGHT_SIZE_CHANGE] +.ds $DOC_COVER_DOCTYPE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOC_COVER_DOCTYPE_SIZE_CHANGE] +.ds $DOC_COVER_SUBTITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOC_COVER_SUBTITLE_SIZE_CHANGE] +.ds $DOC_COVER_TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOC_COVER_TITLE_SIZE_CHANGE] +\# Cover +.ds $COVER_AUTHOR_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$COVER_AUTHOR_SIZE_CHANGE] +.ds $COVER_CHAPTER_TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$COVER_CHAPTER_TITLE_SIZE_CHANGE] +.ds $COVER_COPYRIGHT_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$COVER_COPYRIGHT_SIZE_CHANGE] +.ds $COVER_DOCTYPE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$COVER_DOCTYPE_SIZE_CHANGE] +.ds $COVER_SUBTITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$COVER_SUBTITLE_SIZE_CHANGE] +.ds $COVER_TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$COVER_TITLE_SIZE_CHANGE] +\# Docheader +.ds $AUTHOR_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$AUTHOR_SIZE_CHANGE] +.ds $CHAPTER_TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$CHAPTER_TITLE_SIZE_CHANGE] +.ds $COPYRIGHT_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$COPYRIGHT_SIZE_CHANGE] +.ds $DOCTYPE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOCTYPE_SIZE_CHANGE] +.ds $SUBTITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$SUBTITLE_SIZE_CHANGE] +.ds $TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$TITLE_SIZE_CHANGE] \# \# Next, some utility macros for various routines to prevent repetition \# .MAC PRINT_AUTHORS END . nr #AUTHORS \\n[#AUTHOR_NUM] . nr #NEXT_AUTHOR 0 1 -. while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\ -. ie \\n[#AUTHOR_COLOR]=1 \{\ -. PRINT \m[\\*[$AUTHOR_COLOR]]\\*[$AUTHOR_\\n+[#NEXT_AUTHOR]]\m[] +. ie r#DOING_COVER \{\ +. if \\n[#COVER]=1 \{\ +. while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\ +. ie \\n[#COVER_AUTHOR_COLOR]=1 \{\ +. PRINT \m[\\*[$COVER_AUTHOR_COLOR]]\\*[$AUTHOR_\\n+[#NEXT_AUTHOR]]\m[] +. \} +. el \{ .PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]] \} +.\} +. \} +. if \\n[#DOC_COVER]=1 \{\ +. while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\ +. ie \\n[#DOC_COVER_AUTHOR_COLOR]=1 \{\ +. PRINT \m[\\*[$DOC_COVER_AUTHOR_COLOR]]\\*[$AUTHOR_\\n+[#NEXT_AUTHOR]]\m[] +. \} +. el \{ .PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]] \} +.\} . \} -. el \{ .PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]] \} +. \} +. el \{\ +. while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\ +. ie \\n[#AUTHOR_COLOR]=1 \{\ +. PRINT \m[\\*[$AUTHOR_COLOR]]\\*[$AUTHOR_\\n+[#NEXT_AUTHOR]]\m[] +. \} +. el \{ .PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]] \} +.\} . \} .END \# @@ -4212,7 +5157,7 @@ y\\R'#DESCENDER \\n[.cdp]' . FT \\*[$TITLE_FT] . PT_SIZE \\*[$TITLE_PT_SIZE] . LS \\n[#DOCHEADER_LEAD]u -\# Chapter title only +.\" Chapter title only . ie '\\*[$CHAPTER]'' \{\ . ie !'\\*[$CHAPTER_TITLE]'' \{\ . if \\n[#PRINT_STYLE]=2 \{\ @@ -4233,7 +5178,7 @@ y\\R'#DESCENDER \\n[.cdp]' . el \{ .PRINT \\*[$CHAPTER_STRING] \} . \} . \} -\# Chapter string, possibly with a chapter title +.\" Chapter string, possibly with a chapter title . el \{\ . ie \\n[#TITLE_COLOR]=1 \{\ . PRINT \m[\\*[$TITLE_COLOR]]\\*[$CHAPTER_STRING] \\*[$CHAPTER]\m[] @@ -4246,8 +5191,8 @@ y\\R'#DESCENDER \\n[.cdp]' . FT \\*[$CHAPTER_TITLE_FT] . PT_SIZE \\*[$CHAPTER_TITLE_PT_SIZE] . LS \\n[#DOCHEADER_LEAD]u -. ie \\n[#TITLE_COLOR]=1 \{\ -. PRINT \m[\\*[$TITLE_COLOR]]\\*[$CHAPTER_TITLE]\m[] +. ie \\n[#CHAPTER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$CHAPTER_TITLE_COLOR]]\\*[$CHAPTER_TITLE]\m[] . \} . el \{ .PRINT \\*[$CHAPTER_TITLE] \} . RLD \\n[#DOC_LEAD]u \" Just looks better this way @@ -4286,7 +5231,6 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . el \{ .PRINT \\*[$ATTRIBUTE_STRING] \} . \} -. \} . PRINT_AUTHORS . \} . FAMILY \\*[$DOCTYPE_FAM] @@ -4302,77 +5246,715 @@ y\\R'#DESCENDER \\n[.cdp]' .END \# \# -.MAC START END -. if !\\n[#PRINT_STYLE] \{\ -. PRINTSTYLE TYPEWRITE -. PRINT \& -. po 6P -. ll 39P -. ta \\n(.lu -. sp |1i-1v -. CENTER -. PRINT "You neglected to enter a PRINTSTYLE" -. fl -. ab PRINTSTYLE missing +\# COVER PAGE +\# ---------- +\# *Arguments: +\# TITLE | DOCTITLE | CHAPTER | CHAPTER_TITLE | CHAPTER+TITLE | COVERTITLE ... +\# ... [ SUBTITLE AUTHOR DOCTYPE COPYRIGHT MISC ] +\# *Function: +\# Toggles the number register for each cover page element +\# passed as an argument. +\# *Notes: +\# TITLE, DOCTITLE, CHAPTER, CHAPTER_TITLE or CHAPTER+TITLE must +\# be supplied. After that, users may enter as many or as few of +\# the arguments as they like; however, the arguments must appear +\# in the order given above. +\# +\# If called as DOC_COVER, performs the same operations, but +\# applies everything to a doc cover. +\# +.MAC COVER END +. ie '\\$0'DOC_COVER' \{\ +. nr #DOC_COVER 1 +. if '\\$1'TITLE' \{ .nr #DOC_COVER_TITLE 1 \} +. if '\\$1'DOCTITLE' \{ .nr #DOC_COVER_TITLE 2 \} +. if '\\$1'CHAPTER' \{ .nr #DOC_COVER_TITLE 3 \} +. if '\\$1'CHAPTER_TITLE' \{ .nr #DOC_COVER_TITLE 4 \} +. if '\\$1'CHAPTER+TITLE' \{ .nr #DOC_COVER_TITLE 5 \} +. if '\\$1'COVERTITLE' \{ .nr #DOC_COVER_TITLE 6 \} +. if '\\$2'SUBTITLE' \{ .nr #DOC_COVER_SUBTITLE 1 \} +. if '\\$2'AUTHOR' \{ .nr #DOC_COVER_AUTHOR 1 \} +. if '\\$2'DOCTYPE' \{ .nr #DOC_COVER_DOCTYPE 1 \} +. if '\\$2'COPYRIGHT' \{ .nr #DOC_COVER_COPYRIGHT 1 \} +. if '\\$2'MISC' \{ .nr #DOC_COVER_MISC 1 \} +. if '\\$3'AUTHOR' \{ .nr #DOC_COVER_AUTHOR 1 \} +. if '\\$3'DOCTYPE' \{ .nr #DOC_COVER_DOCTYPE 1 \} +. if '\\$3'COPYRIGHT' \{ .nr #DOC_COVER_COPYRIGHT 1 \} +. if '\\$3'MISC' \{ .nr #DOC_COVER_MISC 1 \} +. if '\\$4'DOCTYPE' \{ .nr #DOC_COVER_DOCTYPE 1 \} +. if '\\$4'COPYRIGHT' \{ .nr #DOC_COVER_COPYRIGHT 1 \} +. if '\\$4'MISC' \{ .nr #DOC_COVER_MISC 1 \} +. if '\\$5'COPYRIGHT' \{ .nr #DOC_COVER_COPYRIGHT 1 \} +. if '\\$5'MISC' \{ .nr #DOC_COVER_MISC 1 \} +. if '\\$6'MISC' \{ .nr #DOC_COVER_MISC 1 \} . \} -. nr #DOCS 1 -. if \\n[#COLLATE] \{\ -. COPYSTYLE \\*[$COPY_STYLE] -. nr #HEADERS_ON \\n[#HEADER_STATE] -. if \\n[#PAGE_NUM_V_POS]=1 \{ .nr #PAGINATE \\n[#PAGINATION_STATE] \} -. sp |\\n[#HEADER_MARGIN]u -. PRINT \& -. if !'\\*[$RESTORE_PAGENUM_STYLE]'' \{\ -. PAGENUM_STYLE \\*[$RESTORE_PAGENUM_STYLE] -. rm $RESTORE_PAGENUM_STYLE +. el \{\ +. nr #COVER 1 +. if '\\$1'TITLE' \{ .nr #COVER_TITLE 1 \} +. if '\\$1'DOCTITLE' \{ .nr #COVER_TITLE 2 \} +. if '\\$1'CHAPTER' \{ .nr #COVER_TITLE 3 \} +. if '\\$1'CHAPTER_TITLE' \{ .nr #COVER_TITLE 4 \} +. if '\\$1'CHAPTER+TITLE' \{ .nr #COVER_TITLE 5 \} +. if '\\$1'COVERTITLE' \{ .nr #COVER_TITLE 6 \} +. if '\\$2'SUBTITLE' \{ .nr #COVER_SUBTITLE 1 \} +. if '\\$2'AUTHOR' \{ .nr #COVER_AUTHOR 1 \} +. if '\\$2'DOCTYPE' \{ .nr #COVER_DOCTYPE 1 \} +. if '\\$2'COPYRIGHT' \{ .nr #COVER_COPYRIGHT 1 \} +. if '\\$2'MISC' \{ .nr #COVER_MISC 1 \} +. if '\\$3'AUTHOR' \{ .nr #COVER_AUTHOR 1 \} +. if '\\$3'DOCTYPE' \{ .nr #COVER_DOCTYPE 1 \} +. if '\\$3'COPYRIGHT' \{ .nr #COVER_COPYRIGHT 1 \} +. if '\\$3'MISC' \{ .nr #COVER_MISC 1 \} +. if '\\$4'DOCTYPE' \{ .nr #COVER_DOCTYPE 1 \} +. if '\\$4'COPYRIGHT' \{ .nr #COVER_COPYRIGHT 1 \} +. if '\\$4'MISC' \{ .nr #COVER_MISC 1 \} +. if '\\$5'COPYRIGHT' \{ .nr #COVER_COPYRIGHT 1 \} +. if '\\$5'MISC' \{ .nr #COVER_MISC 1 \} +. if '\\$6'MISC' \{ .nr #COVER_MISC 1 \} +. \} +.END +\# +\# +.MAC COVERTITLE END +. ie '\\$0'DOC_COVERTITLE' .ds $DOC_COVER_TITLE \\$1 +. el .ds $COVER_TITLE \\$1 +.END +\# +\# +\# COVER PAGE LEADING +\# ------------------ +\# *Arguments: +\# <+|- amount by which to in/decrease leading of cover/doc cover> +\# *Function: +\# Stores user supplied lead in/decrease in string $COVER_LEAD_ADJ +\# or $DOC_COVER_LEAD_ADJ, depending on whether the macro was called +\# with an alias (DOC_COVER_LEAD). +\# *Notes: +\# A unit of measure must be supplied. Decimal fractions OK. +\# Default is +0, i.e. same as DOC_LEAD. +\# +.MAC COVER_LEAD END +. ie '\\$0'DOC_COVER_LEAD' \{\ +. ds $DOC_COVER_LEAD_ADJ \\$1 +. \} +. el \{\ +. ds $COVER_LEAD_ADJ \\$1 +. \} +.END +\# +\# +\# COVER PAGE START POSITION +\# ------------------------- +\# *Arguments: +\# +\# *Function: +\# Stores user supplied lead in/decrease in #COVER_START_POS +\# or #DOC_COVER_START_POS, depending on whether the macro was +\# called by an alias (DOC_COVER_ADVANCE). +\# *Notes: +\# A unit of measure must be supplied. Decimal fractions OK. +\# If user doesn't invoke this macro, the default starting +\# position for both covers and doc covers is 1/3 of the way +\# down the page (setup in DO_COVER). +\# +.MAC COVER_ADVANCE END +. ie '\\$0'DOC_COVER_ADVANCE' \{\ +. nr #DOC_COVER_START_POS (\\$1) +. \} +. el \{\ +. nr #COVER_START_POS (\\$1) +. \} +.END +\# +\# +\# COVERS - WHETHER TO PRINT +\# ------------------------- +\# *Arguments: +\# | +\# *Function: +\# Creates or removes registers #COVERS and #COVERS_OFF, checked for +\# in DEFAULTS (in START) prior to printing +\# +.MAC COVERS END +. ie '\\$0'DOC_COVERS' \{\ +. ie '\\$1'' \{\ +. rr #DOC_COVERS_OFF +. nr #DOC_COVERS 1 +. \} +. el \{\ +. rr #DOC_COVERS +. nr #DOC_COVERS_OFF 1 . \} . \} -. DEFAULTS -\# Collate stuff -. ie \\n[#COLLATED_DOC]=1 \{\ -\# Collect TITLE for TOC. -. nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ] -. af #TOC_ENTRY_PN \\g[#PAGENUMBER] -. ie \\n[#USER_SET_TITLE_ITEM] \{\ -. ds $TOC_TITLE_ITEM \\*[$USER_SET_TITLE_ITEM]\\| -. rr #USER_SET_TITLE_ITEM -. rm $USER_SET_TITLE_ITEM +. el \{\ +. ie '\\$1'' \{\ +. rr #COVERS_OFF +. nr #COVERS 1 . \} . el \{\ -. ie \\n[#DOC_TYPE]=2 \{\ -. ie '\\*[$CHAPTER_TITLE]'' \{\ -. ds $TOC_TITLE_ITEM \\*[$CHAPTER_STRING] \\*[$CHAPTER]\\| -. \} -. el \{\ -. ie '\\*[$CHAPTER]'' \{\ -. ds $TOC_TITLE_ITEM \\*[$CHAPTER_TITLE]\\| -. \} -. el \{\ -. ds $TOC_TITLE_ITEM \\*[$CHAPTER_STRING] \\*[$CHAPTER]: \\*[$CHAPTER_TITLE]\\| -. \} +. rr #COVERS +. nr #COVERS_OFF 1 +. \} +. \} +.END +\# +\# +.MAC DO_COVER END +. nr #DOING_COVER 1 +. ev COVER +. evc 0 +. TRAP OFF +. if \\n[#PAGINATE]=1 \{\ +. nr #PAGINATION_WAS_ON 1 +. rr #PAGINATE +. \} +. if \\n[#HEADERS_ON]=1 \{\ +. nr #HEADERS_WERE_ON 1 +. HEADERS OFF +. \} +. if \\n[#FOOTERS_ON]=1 \{\ +. nr #FOOTERS_WERE_ON 1 +. FOOTERS OFF +. \} +. if \\n[#COLUMNS]=1 \{\ +. nr #COLUMNS_WERE_ON 1 +. rr #COLUMNS +. \} +.\" Doc cover +. ie '\\$0'DO_DOC_COVER' \{\ +. if !r#DOC_COVER_START_POS \{\ +. nr #DOC_COVER_START_POS \\n[#PAGE_LENGTH]/3 +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. ie \\n[#SINGLE_SPACE]=1 \{ .vs \\n[#DOC_LEAD]u*2u \} +. el \{ .vs \\n[#DOC_LEAD]u \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. LS \\n[#DOC_LEAD]u\\*[$DOC_COVER_LEAD_ADJ] +. nr #DOC_COVER_LEAD \\n[#LEAD] +. \} +. PRINT \& +. sp |\\n[#DOC_COVER_START_POS]u-1v +. if \\n[#DOC_COVER_COLOR]=1 \{\ +. nf +\m[\\*[$DOC_COVER_COLOR]] +. EOL +. \} +. CENTER +. FAMILY \\*[$DOC_COVER_TITLE_FAM] +. FT \\*[$DOC_COVER_TITLE_FT] +. PT_SIZE \\*[$DOC_COVER_TITLE_PT_SIZE] +. LS \\n[#DOC_COVER_LEAD]u +. if \\n[#PRINT_STYLE]=1 \{ .TYPEWRITER \} +. if \\n[#DOC_COVER_TITLE]=1 \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. CAPS +. UNDERSCORE "\\*[$TITLE]" +. CAPS OFF +. \} +. el \{\ +. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$TITLE]\m[] . \} +. el \{ .PRINT \\*[$TITLE] \} +. \} +. \} +. if \\n[#DOC_COVER_TITLE]=2 \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. CAPS +. UNDERSCORE "\\*[$DOC_TITLE]" +. CAPS OFF . \} . el \{\ -. ds $TOC_TITLE_ITEM \\*[$TITLE]\\| +. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$DOC_TITLE]\m[] +. \} +. el \{ .PRINT \\*[$DOC_TITLE] \} . \} . \} -. if \\n[#TOC_AUTHORS]=1 \{\ -. ie '\\*[$TOC_AUTHORS]'' \{\ -. as $TOC_TITLE_ITEM /\\|\\*[$AUTHOR_1]\\| +. if \\n[#DOC_COVER_TITLE]=3 \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. CAPS +. PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] +. CAPS OFF . \} . el \{\ -. as $TOC_TITLE_ITEM /\\|\\*[$TOC_AUTHORS]\\| -. rm $TOC_AUTHORS +. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$CHAPTER_STRING] \\*[$CHAPTER]\m[] +. \} +. el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \} . \} . \} -\# Note the use of \!, which transparently embeds the macros used -\# in the TOC_ENTRIES diversion. The elements they control must be -\# processed literally when the diversion is output. -. ev TOC_EV -. da TOC_ENTRIES -. if \\n[#PRINT_STYLE]=1 \{\ -\!. fam C -\!. ft R +. if \\n[#DOC_COVER_TITLE]=4 \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. CAPS +. UNDERSCORE "\\*[$CHAPTER_TITLE]" +. CAPS OFF +. \} +. el \{\ +. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$CHAPTER_TITLE]\m[] +. \} +. el \{ .PRINT \\*[$CHAPTER_TITLE] \} +. \} +. \} +. if \\n[#DOC_COVER_TITLE]=5 \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. CAPS +. PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] +. CAPS OFF +. \} +. el \{\ +. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$CHAPTER_STRING] \\*[$CHAPTER]\m[] +. \} +. el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \} +. \} +. if !'\\*[$CHAPTER_TITLE]'' \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. UNDERSCORE "\\*[$CHAPTER_TITLE]" +. \} +. el \{\ +. FAMILY \\*[$DOC_COVER_CHAPTER_TITLE_FAM] +. FT \\*[$DOC_COVER_CHAPTER_TITLE_FT] +. PT_SIZE \\*[$DOC_COVER_CHAPTER_TITLE_PT_SIZE] +. ie \\n[#DOC_COVER_CHAPTER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$DOC_COVER_CHAPTER_TITLE_COLOR]]\\*[$CHAPTER_TITLE]\m[] +. \} +. el \{ .PRINT \\*[$CHAPTER_TITLE] \} +. \} +. \} +. \} +. if \\n[#DOC_COVER_TITLE]=6 \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. CAPS +. UNDERSCORE "\\*[$DOC_COVER_TITLE]" +. CAPS OFF +. \} +. el \{\ +. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$DOC_COVER_TITLE]\m[] +. \} +. el \{ .PRINT \\*[$DOC_COVER_TITLE] \} +. \} +. \} +. if \\n[#DOC_COVER_SUBTITLE]=1 \{\ +. FAMILY \\*[$DOC_COVER_SUBTITLE_FAM] +. FT \\*[$DOC_COVER_SUBTITLE_FT] +. PT_SIZE \\*[$DOC_COVER_SUBTITLE_PT_SIZE] +. if \\n[#PRINT_STYLE]=1 \{ .TYPEWRITER \} +. ie \\n[#DOC_COVER_SUBTITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$DOC_COVER_SUBTITLE_COLOR]]\\*[$SUBTITLE]\m[] +. \} +. el \{ .PRINT \\*[$SUBTITLE] \} +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. if !r#DOC_COVER_SUBTITLE \{ .SP \} +. \} +. if \\n[#DOC_COVER_AUTHOR]=1 \{\ +. FAMILY \\*[$DOC_COVER_AUTHOR_FAM] +. FT \\*[$DOC_COVER_AUTHOR_FT] +. PT_SIZE \\*[$DOC_COVER_AUTHOR_PT_SIZE] +. if \\n[#PRINT_STYLE]=1 \{\ +. TYPEWRITER +. vs \\n[#DOC_LEAD]u/2u +. \} +. if !'\\*[$ATTRIBUTE_STRING]'' \{\ +. ie \\n[#DOC_COVER_ATTRIBUTE_COLOR]=1 \{\ +. PRINT \m[\\*[$DOC_COVER_ATTRIBUTE_COLOR]]\\*[$ATTRIBUTE_STRING]\m[] +. \} +. el \{ .PRINT \\*[$ATTRIBUTE_STRING] \} +. \} +. PRINT_AUTHORS +. \} +. FAMILY \\*[$DOC_COVER_DOCTYPE_FAM] +. FT \\*[$DOC_COVER_DOCTYPE_FT] +. PT_SIZE \\*[$DOC_COVER_DOCTYPE_PT_SIZE] +. SP +. if \\n[#DOC_COVER_DOCTYPE]=1 \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. TYPEWRITER +. vs \\n[#DOC_LEAD]u +. UNDERSCORE2 "\\*[$DOC_TYPE] +. \} +. el \{\ +. ie \\n[#DOC_COVER_DOCTYPE_COLOR]=1 \{\ +. COLOR \\*[$DOC_COVER_DOCTYPE_COLOR] +. UNDERSCORE "\\*[$DOC_TYPE] +. \} +. el .UNDERSCORE "\\*[$DOC_TYPE] +. \} +. \} +. sp |\\n[#VISUAL_B_MARGIN]u+\\n[#DOC_LEAD]u +. ie \\n[#PRINT_STYLE]=1 \{\ +. TYPEWRITER +. ie \\n[#SINGLE_SPACE]=1 \{ .vs \\n[#DOC_LEAD]u \} +. el \{ .vs \\n[#DOC_LEAD]u/2u \} +. \} +. el \{\ +. FAMILY \\*[$DOC_COVER_COPYRIGHT_FAM] +. FT \\*[$DOC_COVER_COPYRIGHT_FT] +. AUTOLEAD 2 +. PT_SIZE \\*[$DOC_COVER_COPYRIGHT_PT_SIZE] +. \} +. if \\n[#DOC_COVER_COPYRIGHT]=1 \{\ +. QUAD \\*[$DOC_COVER_COPYRIGHT_QUAD] +. ie \\n[#DOC_COVER_COPYRIGHT_COLOR]=1 \{\ +. PRINT \m[\\*[$DOC_COVER_COPYRIGHT_COLOR]]\\*[$COPYRIGHT]\m[] +. \} +. el \{ .PRINT \\*[$COPYRIGHT] \} +. \} +. sp |\\n[#VISUAL_B_MARGIN]u+\\n[#DOC_LEAD]u +. if \\n[#DOC_COVER_MISC]=1 \{\ +. QUAD \\*[$DOC_COVER_MISC_QUAD] +. nr #MISCS \\n[#MISC_NUM] +. sp -\\n[#MISCS]+1 +. nr #NEXT_MISC 0 1 +. while \\n[#MISCS]>\\n[#NEXT_MISC] \{\ +. ie \\n[#DOC_COVER_MISC_COLOR]=1 \{\ +. PRINT \m[\\*[$DOC_COVER_MISC_COLOR]]\\*[$MISC_\\n+[#NEXT_MISC]]\m[] +. br +. \} +. el \{\ +. PRINT \\*[$MISC_\\n+[#NEXT_MISC]] +. br +. \} +.\} +. \} +. \} +.\" Cover +. el \{\ +. if !r#COVER_START_POS \{\ +. nr #COVER_START_POS \\n[#PAGE_LENGTH]/3 +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. ie \\n[#SINGLE_SPACE]=1 \{ .vs \\n[#DOC_LEAD]u*2u \} +. el \{ .vs \\n[#DOC_LEAD]u \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. LS \\n[#DOC_LEAD]u\\*[$COVER_LEAD_ADJ] +. nr #COVER_LEAD \\n[#LEAD] +. \} +. PRINT \& +. sp |\\n[#COVER_START_POS]u-1v +. if \\n[#COVER_COLOR]=1 \{\ +. nf +\m[\\*[$COVER_COLOR]] +. EOL +. \} +. CENTER +. FAMILY \\*[$COVER_TITLE_FAM] +. FT \\*[$COVER_TITLE_FT] +. PT_SIZE \\*[$COVER_TITLE_PT_SIZE] +. LS \\n[#COVER_LEAD]u +. if \\n[#PRINT_STYLE]=1 \{ .TYPEWRITER \} +. if \\n[#COVER_TITLE]=1 \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. CAPS +. UNDERSCORE "\\*[$TITLE]" +. CAPS OFF +. \} +. el \{\ +. ie \\n[#COVER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$COVER_TITLE_COLOR]]\\*[$TITLE]\m[] +. \} +. el \{ .PRINT \\*[$TITLE] \} +. \} +. \} +. if \\n[#COVER_TITLE]=2 \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. CAPS +. UNDERSCORE "\\*[$DOC_TITLE]" +. CAPS OFF +. \} +. el \{\ +. ie \\n[#COVER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$COVER_TITLE_COLOR]]\\*[$DOC_TITLE]\m[] +. \} +. el \{ .PRINT \\*[$DOC_TITLE] \} +. \} +. \} +. if \\n[#COVER_TITLE]=3 \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. CAPS +. PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] +. CAPS OFF +. \} +. el \{\ +. ie \\n[#COVER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$COVER_TITLE_COLOR]]\\*[$CHAPTER_STRING] \\*[$CHAPTER]\m[] +. \} +. el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \} +. \} +. \} +. if \\n[#COVER_TITLE]=4 \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. CAPS +. UNDERSCORE "\\*[$CHAPTER_TITLE]" +. CAPS OFF +. \} +. el \{\ +. ie \\n[#COVER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$COVER_TITLE_COLOR]]\\*[$CHAPTER_TITLE]\m[] +. \} +. el \{ .PRINT \\*[$CHAPTER_TITLE] \} +. \} +. \} +. if \\n[#COVER_TITLE]=5 \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. CAPS +. PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] +. CAPS OFF +. \} +. el \{\ +. ie \\n[#COVER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$COVER_TITLE_COLOR]]\\*[$CHAPTER_STRING] \\*[$CHAPTER]\m[] +. \} +. el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \} +. \} +. if !'\\*[$CHAPTER_TITLE]'' \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. UNDERSCORE "\\*[$CHAPTER_TITLE]" +. \} +. el \{\ +. FAMILY \\*[$COVER_CHAPTER_TITLE_FAM] +. FT \\*[$COVER_CHAPTER_TITLE_FT] +. PT_SIZE \\*[$COVER_CHAPTER_TITLE_PT_SIZE] +. ie \\n[#COVER_CHAPTER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$COVER_CHAPTER_TITLE_COLOR]]\\*[$CHAPTER_TITLE]\m[] +. \} +. el \{ .PRINT \\*[$CHAPTER_TITLE] \} +. \} +. \} +. \} +. if \\n[#COVER_TITLE]=6 \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. CAPS +. UNDERSCORE "\\*[$COVER_TITLE]" +. CAPS OFF +. \} +. el \{\ +. ie \\n[#COVER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$COVER_TITLE_COLOR]]\\*[$COVER_TITLE]\m[] +. \} +. el \{ .PRINT \\*[$COVER_TITLE] \} +. \} +. \} +. if \\n[#COVER_SUBTITLE]=1 \{\ +. FAMILY \\*[$COVER_SUBTITLE_FAM] +. FT \\*[$COVER_SUBTITLE_FT] +. PT_SIZE \\*[$COVER_SUBTITLE_PT_SIZE] +. if \\n[#PRINT_STYLE]=1 \{ .TYPEWRITER \} +. ie \\n[#COVER_SUBTITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$COVER_SUBTITLE_COLOR]]\\*[$SUBTITLE]\m[] +. \} +. el \{ .PRINT \\*[$SUBTITLE] \} +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. if !r#COVER_SUBTITLE \{ .SP \} +. \} +. if \\n[#COVER_AUTHOR]=1 \{\ +. FAMILY \\*[$COVER_AUTHOR_FAM] +. FT \\*[$COVER_AUTHOR_FT] +. PT_SIZE \\*[$COVER_AUTHOR_PT_SIZE] +. if \\n[#PRINT_STYLE]=1 \{\ +. TYPEWRITER +. vs \\n[#DOC_LEAD]u/2u +. \} +. if !'\\*[$ATTRIBUTE_STRING]'' \{\ +. ie \\n[#COVER_ATTRIBUTE_COLOR]=1 \{\ +. PRINT \m[\\*[$COVER_ATTRIBUTE_COLOR]]\\*[$ATTRIBUTE_STRING]\m[] +. \} +. el \{ .PRINT \\*[$ATTRIBUTE_STRING] \} +. \} +. PRINT_AUTHORS +. \} +. FAMILY \\*[$COVER_DOCTYPE_FAM] +. FT \\*[$COVER_DOCTYPE_FT] +. PT_SIZE \\*[$COVER_DOCTYPE_PT_SIZE] +. SP +. if \\n[#COVER_DOCTYPE]=1 \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. TYPEWRITER +. vs \\n[#DOC_LEAD]u +. UNDERSCORE2 "\\*[$DOC_TYPE] +. \} +. el \{\ +. ie \\n[#COVER_DOCTYPE_COLOR]=1 \{\ +. COLOR \\*[$COVER_DOCTYPE_COLOR] +. UNDERSCORE "\\*[$DOC_TYPE] +. \} +. el .UNDERSCORE "\\*[$DOC_TYPE] +. \} +. \} +. sp |\\n[#VISUAL_B_MARGIN]u+\\n[#DOC_LEAD]u +. ie \\n[#PRINT_STYLE]=1 \{\ +. TYPEWRITER +. ie \\n[#SINGLE_SPACE]=1 \{ .vs \\n[#DOC_LEAD]u \} +. el \{ .vs \\n[#DOC_LEAD]u/2u \} +. \} +. el \{\ +. FAMILY \\*[$COVER_COPYRIGHT_FAM] +. FT \\*[$COVER_COPYRIGHT_FT] +. AUTOLEAD 2 +. PT_SIZE \\*[$COVER_COPYRIGHT_PT_SIZE] +. \} +. if \\n[#COVER_COPYRIGHT]=1 \{\ +. QUAD \\*[$COVER_COPYRIGHT_QUAD] +. ie \\n[#COVER_COPYRIGHT_COLOR]=1 \{\ +. PRINT \m[\\*[$COVER_COPYRIGHT_COLOR]]\\*[$COPYRIGHT]\m[] +. \} +. el \{ .PRINT \\*[$COPYRIGHT] \} +. \} +. sp |\\n[#VISUAL_B_MARGIN]u+\\n[#DOC_LEAD]u +. if \\n[#COVER_MISC]=1 \{\ +. QUAD \\*[$COVER_MISC_QUAD] +. nr #MISCS \\n[#MISC_NUM] +. sp -\\n[#MISCS]+1 +. nr #NEXT_MISC 0 1 +. while \\n[#MISCS]>\\n[#NEXT_MISC] \{\ +. ie \\n[#COVER_MISC_COLOR]=1 \{\ +. PRINT \m[\\*[$COVER_MISC_COLOR]]\\*[$MISC_\\n+[#NEXT_MISC]]\m[] +. br +. \} +. el \{\ +. PRINT \\*[$MISC_\\n+[#NEXT_MISC]] +. br +. \} +.\} +. \} +. \} +. EOL +. TRAP +. NEWPAGE +. ev +. if \\n[#PAGINATION_WAS_ON] \{\ +. rr #PAGINATION_WAS_ON +. PAGINATE +. PAGENUMBER \\n%+\\n[#PAGE_NUM_ADJ]-1 +. \} +. if \\n[#HEADERS_WERE_ON] \{\ +. rr #HEADERS_WERE_ON +. HEADERS +. \} +. if \\n[#FOOTERS_WERE_ON] \{\ +. rr #FOOTERS_WERE_ON +. FOOTERS +. \} +. if \\n[#COLUMNS_WERE_ON]=1 \{\ +. rr #COLUMNS_WERE_ON 1 +. nr #COLUMNS 1 +. \} +. rr #DOING_COVER +.END +\# +\# +.MAC START END +. if !\\n[#PRINT_STYLE] \{\ +. PRINTSTYLE TYPEWRITE +. PRINT \& +. po 6P +. ll 39P +. ta \\n(.lu +. sp |1i-1v +. CENTER +. PRINT "You neglected to enter a PRINTSTYLE" +. fl +. ab PRINTSTYLE missing +. \} +. nr #DOCS 1 +. if \\n[#LINENUMBERS]=1 \{\ +. NUMBER_LINES OFF +. nr #LINENUMBERS 2 +. \} +. if \\n[#COLLATE] \{\ +. COPYSTYLE \\*[$COPY_STYLE] +. nr #HEADERS_ON \\n[#HEADER_STATE] +. if \\n[#PAGE_NUM_V_POS]=1 \{ .nr #PAGINATE \\n[#PAGINATION_STATE] \} +. sp |\\n[#HEADER_MARGIN]u +. PRINT \& +. if !'\\*[$RESTORE_PAGENUM_STYLE]'' \{\ +. PAGENUM_STYLE \\*[$RESTORE_PAGENUM_STYLE] +. rm $RESTORE_PAGENUM_STYLE +. \} +. \} +. DEFAULTS +.\" Quote and blockquote default leads are the same as #DOC_LEAD, so +.\" they have to be set after DEFAULTS (where DOC_LEAD is finalized) +. if !r#Q_AUTOLEAD \{ .nr #Q_LEAD \\n[#DOC_LEAD] \} +. if !r#BQ_AUTOLEAD \{ .nr #BQ_LEAD \\n[#DOC_LEAD] \} +. if !r#EN_Q_AUTOLEAD \{ .nr #EN_Q_LEAD \\n[#EN_LEAD] \} +. if !r#EN_BQ_AUTOLEAD \{ .nr #EN_BQ_LEAD \\n[#EN_LEAD] \} +.\" Covers and doc covers +. if \\n[#DOC_COVERS]=1 \{\ +. if \\n[#DOC_COVER]=1 \{\ +. DO_DOC_COVER +. rr #DOC_COVER +. rr #DOC_COVER_TITLE +. rr #DOC_COVER_SUBTITLE +. rr #DOC_COVER_AUTHOR +. rr #DOC_COVER_DOCTYPE +. rr #DOC_COVER_COPYRIGHT +. rr #DOC_COVER_MISC +. \} +. \} +. if \\n[#COVERS]=1 \{\ +. if \\n[#COVER]=1 \{\ +. DO_COVER +. rr #COVER +. rr #COVER_TITLE +. rr #COVER_SUBTITLE +. rr #COVER_AUTHOR +. rr #COVER_DOCTYPE +. rr #COVER_COPYRIGHT +. rr #COVER_MISC +. \} +. \} +.\" Collate related stuff +. ie \\n[#COLLATED_DOC]=1 \{\ +.\" Collect TITLE for TOC. +. nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ] +. af #TOC_ENTRY_PN \\g[#PAGENUMBER] +. ie \\n[#USER_SET_TITLE_ITEM] \{\ +. ds $TOC_TITLE_ITEM \\*[$USER_SET_TITLE_ITEM]\\| +. rr #USER_SET_TITLE_ITEM +. rm $USER_SET_TITLE_ITEM +. \} +. el \{\ +. ie \\n[#DOC_TYPE]=2 \{\ +. ie '\\*[$CHAPTER_TITLE]'' \{\ +. ds $TOC_TITLE_ITEM \\*[$CHAPTER_STRING] \\*[$CHAPTER]\\| +. \} +. el \{\ +. ie '\\*[$CHAPTER]'' \{\ +. ds $TOC_TITLE_ITEM \\*[$CHAPTER_TITLE]\\| +. \} +. el \{\ +. ds $TOC_TITLE_ITEM \\*[$CHAPTER_STRING] \\*[$CHAPTER]: \\*[$CHAPTER_TITLE]\\| +. \} +. \} +. \} +. el \{\ +. ds $TOC_TITLE_ITEM \\*[$TITLE]\\| +. \} +. \} +. if \\n[#TOC_AUTHORS]=1 \{\ +. ie '\\*[$TOC_AUTHORS]'' \{\ +. as $TOC_TITLE_ITEM /\\|\\*[$AUTHOR_1]\\| +. \} +. el \{\ +. as $TOC_TITLE_ITEM /\\|\\*[$TOC_AUTHORS]\\| +. rm $TOC_AUTHORS +. \} +. \} +.\" Note the use of \!, which transparently embeds the macros used +.\" in the TOC_ENTRIES diversion. The elements they control must be +.\" processed literally when the diversion is output. +. ev TOC_EV +. da TOC_ENTRIES +. if \\n[#PRINT_STYLE]=1 \{\ +\!. fam C +\!. ft R \!. ps 12 . \} . if \\n[#PRINT_STYLE]=2 \{\ @@ -4387,7 +5969,7 @@ y\\R'#DESCENDER \\n[.cdp]' . el \{\ \!. PAD "\\h'\\n[#TOC_TITLE_INDENT]u'\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN]" . \} -\!. EL +\!. EOL \!. ST 100 L \!. ST 101 R . if \\n[#PRINT_STYLE]=2 \{\ @@ -4409,14 +5991,14 @@ y\\R'#DESCENDER \\n[.cdp]' . af #FIRST_DOC_TITLE_PN \\g[#PAGENUMBER] . nr #FIRST_DOC_TOC_PN_PADDING \\n[#TOC_PN_PADDING] . \} -\# End TITLE collection +.\" End TITLE collection . if \\n[#PRINT_PAGENUM_ON_PAGE_1] \{\ . sp |\\n[#HEADER_MARGIN]u . PRINT_PAGE_NUMBER . \} . rr #COLLATE . rr #PAGINATION_STATE -\# End collate stuff +.\" End collate stuff . ie \\n[#DOC_HEADER]=0 \{\ . PRINT \& . if \\n[#DOC_TYPE]=4 \{\ @@ -4429,7 +6011,7 @@ y\\R'#DESCENDER \\n[.cdp]' . rr #STORED_PP_INDENT . ie r#ADVANCE_FROM_TOP \{\ . sp |\\n[#ADVANCE_FROM_TOP]u-1v -. SHIM +. if \\n[#ADJ_DOC_LEAD]=1 \{ .SHIM \} . \} . el \{ .sp |\\n[#T_MARGIN]u-1v \} . if \\n[#COLUMNS] \{\ @@ -4446,7 +6028,7 @@ y\\R'#DESCENDER \\n[.cdp]' . el \{\ . if \\n[#PRINT_STYLE]=2 \{ .LS \\n[#DOC_LEAD]u\\*[$DOCHEADER_LEAD_ADJ] \} . nr #DOCHEADER_LEAD \\n[#LEAD] -\# Default +.\" Default . if \\n[#DOC_TYPE]=1 \{\ . PRINT \& . sp |\\n[#DOCHEADER_ADVANCE]u-1v @@ -4454,16 +6036,14 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#DOCHEADER_COLOR]=1 \{\ . nf \m[\\*[$DOCHEADER_COLOR]] -. EL +. EOL . \} . L_MARGIN \\n[#DOC_L_MARGIN]u . LL \\n[#DOC_L_LENGTH]u . ta \\n(.lu . if \\n[#PRINT_STYLE]=1 \{\ . CENTER -. fam C -. ft R -. ps 12 +. TYPEWRITER . ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \} . el \{ .vs \\n[#DOC_LEAD]u \} . CAPS @@ -4489,7 +6069,7 @@ y\\R'#DESCENDER \\n[.cdp]' . nr #NEXT_AUTHOR 0 1 . while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\ . PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]] -. \} +.\} . if \\n[#AUTHOR_LINES]=1 \{\ . ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u \} . el \{ .ALD \\n[#DOC_LEAD]u/2u \} @@ -4519,7 +6099,7 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . ev . \} -\# Chapter +.\" Chapter . if \\n[#DOC_TYPE]=2 \{\ . PRINT \& . sp |\\n[#DOCHEADER_ADVANCE]u-1v @@ -4527,16 +6107,14 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#DOCHEADER_COLOR]=1 \{\ . nf \m[\\*[$DOCHEADER_COLOR]] -. EL +. EOL . \} . L_MARGIN \\n[#DOC_L_MARGIN]u . LL \\n[#DOC_L_LENGTH]u . ta \\n(.lu . if \\n[#PRINT_STYLE]=1 \{\ . CENTER -. fam C -. ft R -. ps 12 +. TYPEWRITER . vs \\n[#DOC_LEAD]u . ie '\\*[$CHAPTER]'' \{\ . CAPS @@ -4573,7 +6151,7 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . ev . \} -\# Named +.\" Named . if \\n[#DOC_TYPE]=3 \{\ . PRINT \& . sp |\\n[#DOCHEADER_ADVANCE]u-1v @@ -4581,16 +6159,14 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#DOCHEADER_COLOR]=1 \{\ . nf \m[\\*[$DOCHEADER_COLOR]] -. EL +. EOL . \} . L_MARGIN \\n[#DOC_L_MARGIN]u . LL \\n[#DOC_L_LENGTH]u . ta \\n(.lu . if \\n[#PRINT_STYLE]=1 \{\ . CENTER -. fam C -. ft R -. ps 12 +. TYPEWRITER . ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \} . el \{ .vs \\n[#DOC_LEAD]u \} . CAPS @@ -4616,7 +6192,7 @@ y\\R'#DESCENDER \\n[.cdp]' . nr #NEXT_AUTHOR 0 1 . while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\ . PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]] -. \} +.\} . if \\n[#AUTHOR_LINES]=1 \{\ . ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u \} . el \{ .ALD \\n[#DOC_LEAD]u/2u \} @@ -4668,22 +6244,83 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . \} . \} +. LS \\n[#DOC_LEAD]u +. if \\n[#ADJ_DOC_LEAD]=1 \{ .SHIM \} . QUAD \\*[$DOC_QUAD] -. rr #DOCHEADER_LEAD -. rr #DOCHEADER_LEAD_ADJ -. rr #DEPTH_1 -. rr #DEPTH_2 -. rr #DOCHEADER_ADVANCE -. rr #ADVANCE_FROM_TOP -. rr #DOCHEADER_SPACE_ADJ -. rr #DOCHEADER_EXTRA_SPACE +. CLEANUP_DEFAULTS +. nr #START_FOR_FOOTERS 1 +. if \\n[#COLLATED_DOC]=1 \{\ +. if !\\n[MNinit_DEFERRED]=1 \{\ +. MN_INIT rerun +. \} +. \} +. if \\n[#MNinit_DEFERRED]=1 \{\ +. rr #MNinit_DEFERRED +. nr #START_FOR_MNinit 1 +. MN_INIT \\*[$MN-arg1] \\*[$MN-arg2] \\*[$MN-arg3] \\*[$MN-arg4] \\*[$MN-arg5] \\*[$MN-arg6] \\*[$MN-arg7] \\*[$MN-arg8] \\*[$MN-arg9] +. \} +. nr #START_FOR_MNinit 2 +. if !\\n[#DOC_TYPE]=4 \{ .em TERMINATE \} +. if \\n[#LINENUMBERS]=2 \{\ +. NUMBER_LINES RESUME +. nr #LINENUMBERS 1 +. \} +. if \\n[#RUN_ON]=1 \{\ +. if \\n[#FN_MARKER_STYLE]=1 \{ .RUNON_WARNING \} +. if \\n[#FN_MARKER_STYLE]=2 \{ .RUNON_WARNING \} +. \} +.END +\# +.MAC CLEANUP_DEFAULTS END +. nr #START 1 +.\" Family strings for docheader +. rm $AUTHOR_FAM +. rm $CHAPTER_TITLE_FAM +. rm $DOCTYPE_FAM +. rm $SUBTITLE_FAM +. rm $TITLE_FAM +.\" Family strings for cover +. rm $COVER_AUTHOR_FAM +. rm $COVER_CHAPTER_TITLE_FAM +. rm $COVER_COPYRIGHT_FAM +. rm $COVER_DOCTYPE_FAM +. rm $COVER_LEAD_ADJ +. rm $COVER_SUBTITLE_FAM +. rm $COVER_TITLE_FAM +.\" Family strings for doc cover +. rm $DOC_COVER_AUTHOR_FAM +. rm $DOC_COVER_CHAPTER_TITLE_FAM +. rm $DOC_COVER_COPYRIGHT_FAM +. rm $DOC_COVER_DOCTYPE_FAM +. rm $DOC_COVER_LEAD_ADJ +. rm $DOC_COVER_SUBTITLE_FAM +. rm $DOC_COVER_TITLE_FAM +.\" Quad args to copyright and misc +. rm $COVER_COPYRIGHT_QUAD +. rm $COVER_MISC_QUAD +. rm $DOC_COVER_COPYRIGHT_QUAD +. rm $DOC_COVER_MISC_QUAD +.\" Miscellaneous strings +. rm $TOC_TITLE_ITEM +. rm $DOCHEADER_LEAD_ADJ +.\" Various registers +. rr #ADJ_DOC_LEAD +. rr #ADVANCE_FROM_TOP +. rr #AUTHOR_NUM . rr #AUTHORS +. rr #COVER_LEAD +. rr #DEPTH_1 +. rr #DEPTH_2 +. rr #DOC_COVER_LEAD +. rr #DOCHEADER_ADVANCE +. rr #DOCHEADER_EXTRA_SPACE +. rr #DOCHEADER_LEAD +. rr #DOCHEADER_SPACE_ADJ +. rr #MISC_NUM +. rr #MISCS . rr #NEXT_AUTHOR -. rr #AUTHOR_NUM +. rr #NEXT_MISC . rr #NUM_AUTHORS -. rm $TOC_TITLE_ITEM -. nr #START 1 -. nr #START_FOR_FOOTERS 1 .END \# \# ==================================================================== @@ -4742,328 +6379,6 @@ y\\R'#DESCENDER \\n[.cdp]' .END \# \# -\# DOCHEADER COLOR -\# --------------- -\# *Arguments: -\# -\# *Function: -\# Sets register #DOCHEADER_COLOR to 1; defines string -\# $DOCHEADER_COLOR to argument. -\# *Notes: -\# User must define an XCOLOR or NEWCOLOR before using -\# DOCHEADER_COLOR. -\# -.MAC DOCHEADER_COLOR END -. if \\n[#PRINT_STYLE]=1 \{ .return \} -. nr #DOCHEADER_COLOR 1 -. ds $DOCHEADER_COLOR \\$1 -.END -\# -\# -\# TITLE FAMILY -\# ------------ -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $TITLE_FAM. -\# *Notes: -\# Default is same as running text. -\# -.MAC TITLE_FAMILY END -. ds $TITLE_FAM \\$1 -.END -\# -\# -\# TITLE FONT -\# ---------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $TITLE_FT. -\# *Notes: -\# Default is bold. -\# -.MAC TITLE_FONT END -. ds $TITLE_FT \\$1 -.END -\# -\# -\# TITLE SIZE -\# ---------- -\# *Argument: -\# <+|- number of points by which to in/decrease title at start -\# of the document (relative to running text)> -\# *Function: -\# Creates string $TITLE_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a +|- sign, with no space afterwards. -\# Fractional point sizes are allowed. -\# Default is +3.5 for printstyle TYPESET DEFAULT | STORY | NAMED; -\# 4 for TYPESET CHAPTER; +0 for TYPEWRITE. -\# -.MAC TITLE_SIZE END -. ds $TITLE_SIZE_CHANGE \\$1 -.END -\# -\# -\# TITLE COLOR -\# ----------- -\# *Argument: -\# -\# *Function: -\# Sets register #TITLE_COLOR to 1; creates string $TITLE_COLOR -\# *Notes: -\# The color name must be pre-defined with NEWCOLOR or XCOLOR. -\# -.MAC TITLE_COLOR END -. nr #TITLE_COLOR 1 -. ds $TITLE_COLOR \\$1 -.END -\# -\# -\# CHAPTER TITLE FAMILY -\# -------------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $CHAPTER_TITLE_FAM. -\# *Notes: -\# Default isame as running text. -\# -.MAC CHAPTER_TITLE_FAMILY END -. ds $CHAPTER_TITLE_FAM \\$1 -.END -\# -\# -\# CHAPTER TITLE FONT -\# ------------------ -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $CHAPTER_TITLE_FT. -\# *Notes: -\# Default is bold italic for TYPESET; varies in TYPEWRITE between -\# caps and underscored, depending on whether chapter title stands -\# alone or has CHAPTER # above it. -\# -.MAC CHAPTER_TITLE_FONT END -. ds $CHAPTER_TITLE_FT \\$1 -.END -\# -\# -\# CHAPTER TITLE SIZE -\# ------------------ -\# *Argument: -\# <+|- number of points by which to in/decrease title at start -\# of the document (relative to running text)> -\# *Function: -\# Creates string $CHAPTER_TITLE_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a +|- sign, with no space afterwards. -\# Fractional point sizes are allowed. -\# Default is +4 for printstyle TYPESET -\# -.MAC CHAPTER_TITLE_SIZE END -. ds $CHAPTER_TITLE_SIZE_CHANGE \\$1 -.END -\# -\# -\# SUBTITLE FAMILY -\# --------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $SUBTITLE_FAM. -\# *Notes: -\# Default is same as running text. -\# -.MAC SUBTITLE_FAMILY END -. ds $SUBTITLE_FAM \\$1 -.END -\# -\# -\# SUBTITLE FONT -\# ------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $SUBTITLE_FT. -\# *Notes: -\# Default is same as running text. -\# -.MAC SUBTITLE_FONT END -. ds $SUBTITLE_FT \\$1 -.END -\# -\# -\# SUBTITLE SIZE -\# ------------- -\# *Argument: -\# <+|- number of points by which to in/decrease subtitle at start -\# of the document (relative to running text)> -\# *Function: -\# Creates or modifies string $SUBTITLE_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a +|- sign with no space afterwards. -\# Fractional point sizes are allowed. -\# Default is +0. -\# -.MAC SUBTITLE_SIZE END -. ds $SUBTITLE_SIZE_CHANGE \\$1 -.END -\# -\# -\# SUBTITLE COLOR -\# -------------- -\# *Argument: -\# -\# *Function: -\# Sets register #SUBTITLE_COLOR to 1; creates string -\# $SUBTITLE_COLOR. -\# *Notes: -\# The color name must be pre-defined with NEWCOLOR or XCOLOR. -\# -.MAC SUBTITLE_COLOR END -. nr #SUBTITLE_COLOR 1 -. ds $SUBTITLE_COLOR \\$1 -.END -\# -\# -\# ATTRIBUTE COLOR -\# --------------- -\# *Argument: -\# -\# *Function: -\# Sets register #ATTRIBUTE_COLOR to 1; creates string $ATTRIBUTE_COLOR -\# *Notes: -\# The color name must be pre-defined with NEWCOLOR or XCOLOR. -\# -.MAC ATTRIBUTE_COLOR END -. nr #ATTRIBUTE_COLOR 1 -. ds $ATTRIBUTE_COLOR \\$1 -.END -\# -\# -\# AUTHOR FAMILY -\# ------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $AUTHOR_FAM. -\# *Notes: -\# Default is same as running text. -\# -.MAC AUTHOR_FAMILY END -. ds $AUTHOR_FAM \\$1 -.END -\# -\# -\# AUTHOR FONT -\# ----------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $AUTHOR_FT. -\# *Notes: -\# Default is italic. -\# -.MAC AUTHOR_FONT END -. ds $AUTHOR_FT \\$1 -.END -\# -\# -\# AUTHOR SIZE -\# ----------- -\# *Argument: -\# <+|- number of points by which to in/decrease author at start -\# of the document> -\# *Function: -\# Creates or modifies string $AUTHOR_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a +|- sign with no space afterwards. -\# Fractional point sizes are allowed. -\# Default is same as running text. -\# -.MAC AUTHOR_SIZE END -. ds $AUTHOR_SIZE_CHANGE \\$1 -.END -\# -\# -\# AUTHOR COLOR -\# ------------ -\# *Argument: -\# -\# *Function: -\# Sets register #AUTHOR_COLOR to 1; creates string $AUTHOR_COLOR -\# *Notes: -\# The color name must be pre-defined with NEWCOLOR or XCOLOR. -\# -.MAC AUTHOR_COLOR END -. nr #AUTHOR_COLOR 1 -. ds $AUTHOR_COLOR \\$1 -.END -\# -\# -\# DOCTYPE FAMILY -\# -------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $DOCTYPE_FAM. -\# *Notes: -\# Default is same as running text. -\# -.MAC DOCTYPE_FAMILY END -. ds $DOCTYPE_FAM \\$1 -.END -\# -\# -\# DOCTYPE FONT -\# ------------ -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $DOCTYPE_FT. -\# *Notes: -\# Default is bold italic. -\# -.MAC DOCTYPE_FONT END -. ds $DOCTYPE_FT \\$1 -.END -\# -\# -\# DOCTYPE SIZE -\# ------------- -\# *Argument: -\# <+|- number of points by which to in/decrease the document -\# type string (relative to running text)> -\# *Function: -\# Creates or modifies string $DOCTYPE_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a +|- sign with no space afterwards. -\# Fractional point sizes are allowed. -\# Default is +3 for TYPESET; 0 for TYPEWRITE. -\# -.MAC DOCTYPE_SIZE END -. ds $DOCTYPE_SIZE_CHANGE \\$1 -.END -\# -\# -\# DOCTYPE COLOR -\# ------------- -\# *Argument: -\# -\# *Function: -\# Sets register #DOCTYPE_COLOR to 1; creates string $DOCTYPE_COLOR -\# *Notes: -\# The color name must be pre-defined with NEWCOLOR or XCOLOR. -\# -.MAC DOCTYPE_COLOR END -. nr #DOCTYPE_COLOR 1 -. ds $DOCTYPE_COLOR \\$1 -.END -\# -\# \# DOCUMENT LEFT MARGIN \# -------------------- \# *Argument: @@ -5125,8 +6440,8 @@ y\\R'#DESCENDER \\n[.cdp]' \# .MAC DOC_FAMILY END . br -. ds $DOC_FAM \\$1 -. FAMILY \\*[$DOC_FAM] +. ds $DOC_FAM \\$1 +. ds $FAMILY \\*[$DOC_FAM] . TITLE_FAMILY \\*[$DOC_FAM] . SUBTITLE_FAMILY \\*[$DOC_FAM] . AUTHOR_FAMILY \\*[$DOC_FAM] @@ -5137,7 +6452,7 @@ y\\R'#DESCENDER \\n[.cdp]' . BLOCKQUOTE_FAMILY \\*[$DOC_FAM] . EPIGRAPH_FAMILY \\*[$DOC_FAM] . HDRFTR_FAMILY \\*[$DOC_FAM] -. PAGENUM_FAMILY \\*[$DOC_FAM] +. FOOTNOTE_FAMILY \\*[$DOC_FAM] .END \# \# @@ -5195,8 +6510,13 @@ y\\R'#DESCENDER \\n[.cdp]' \# on #B_MARGIN. \# .MAC DOC_LEAD_ADJUST END -. ie '\\$1'' \{ .nr #ADJ_DOC_LEAD 1 \} -. el \{ .nr #ADJ_DOC_LEAD 0 \} +. ie '\\$1'' \{\ +. nr #ADJ_DOC_LEAD 1 +. \} +. el \{\ +. nr #ADJ_DOC_LEAD 0 +. nr #DOC_LEAD_ADJUST_OFF 1 +. \} .END \# \# @@ -5217,18 +6537,19 @@ y\\R'#DESCENDER \\n[.cdp]' .MAC PROCESS_SHIM END . while \\n+[#LEGAL_BASELINE]<\\n[#CURRENT_V_POS] \{\ . -. \} +.\} . nr #SHIM \\n[#LEGAL_BASELINE]-\\n[#CURRENT_V_POS] .END \# +\# .MAC SHIM END -. nr #CURRENT_V_POS \\n(.d . nr #LEGAL_BASELINE \\n[#T_MARGIN]-1v \\n[#DOC_LEAD] +. if !r#CURRENT_V_POS \{ .nr #CURRENT_V_POS \\n(.d \} . ie r#ADVANCE_FROM_TOP \{\ . ie \\n[#CURRENT_V_POS]<(\\n[#T_MARGIN]-1v) \{\ . while \\n-[#LEGAL_BASELINE]>\\n[#CURRENT_V_POS] \{\ . -. \} +.\} . nr #LEGAL_BASELINE +\\n[#DOC_LEAD] . nr #SHIM \\n[#LEGAL_BASELINE]-\\n[#CURRENT_V_POS] . \} @@ -5240,27 +6561,10 @@ y\\R'#DESCENDER \\n[.cdp]' . PROCESS_SHIM . \} . ALD \\n[#SHIM]u +. rr #CURRENT_V_POS .END \# \# -\# DOCUMENT QUAD -\# ------------- -\# *Arguments: -\# L | LEFT | R | RIGHT | C | CENTER | CENTRE | J | JUSTIFY -\# *Function: -\# Creates or modifies string $DOC_QUAD. -\# *Notes: -\# While QUAD (from the typesetting macros) can be used before START -\# to change the default document quad, DOC_QUAD *must* be used after -\# the START macro has been invoked. -\# -\# Default is LEFT for printstyle TYPEWRITE, JUSTIFY for printstyle -\# TYPESET. -\# -.MAC DOC_QUAD END -. ds $DOC_QUAD \\$1 -. QUAD \\*[$DOC_QUAD] -.END \# \# ==================================================================== \# @@ -5339,21 +6643,6 @@ y\\R'#DESCENDER \\n[.cdp]' . CAPS OFF .END \# -\# FINIS COLOR -\# ----------- -\# *Arguments: -\# -\# *Function: -\# Defines string $FINIS_COLOR to argument. -\# *Notes: -\# User must define an XCOLOR or NEWCOLOR before using -\# FINIS_COLOR. -\# -.MAC FINIS_COLOR END -. if \\n[#PRINT_STYLE]=1 \{ .return \} -. ds $FINIS_COLOR \\$1 -.END -\# \# \# ==================================================================== \# @@ -5380,132 +6669,59 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# +++EPIGRAPHS+++ \# -\# EPIGRAPH FAMILY +\# EPIGRAPH INDENT \# --------------- \# *Argument: -\# +\# \# *Function: -\# Creates or modifies string $EPI_FAM. +\# Creates or modifies register #EPI_OFFSET_VALUE. \# *Notes: -\# Default is same as running text. +\# Default is 2 for TYPEWRITE, 3 for TYPESET. \# -.MAC EPIGRAPH_FAMILY END -. ds $EPI_FAM \\$1 +.MAC EPIGRAPH_INDENT END +. nr #EPI_OFFSET_VALUE \\$1 .END \# \# -\# EPIGRAPH FONT -\# ------------- +\# EPIGRAPH AUTOLEAD +\# ----------------- \# *Argument: -\# +\# \# *Function: -\# Creates or modifies string $EPI_FT. +\# Creates or modifies register #EPI_AUTOLEAD. \# *Notes: -\# Default is same as running text. +\# Default is 2 (for TYPESET; TYPEWRITE doesn't require this). \# -.MAC EPIGRAPH_FONT END -. ds $EPI_FT \\$1 +.MAC EPIGRAPH_AUTOLEAD END +. nr #EPI_AUTOLEAD \\$1 .END \# \# -\# EPIGRAPH SIZE -\# ------------- -\# *Argument: -\# <-|+ number of points by which to de/increase point size of epigraphs -\# (relative to running text)> +\# EPIGRAPH +\# -------- +\# *Arguments: +\# BLOCK | \# *Function: -\# Creates or modifies string $EPI_SIZE_CHANGE. +\# Places an epigraph before the document's text, after the +\# document header, or after a HEAD. \# *Notes: -\# Must be preceded by a - or + sign with no space afterwards. -\# Fractional point sizes are allowed. Default -1.5 for printstyle -\# TYPESET; +0 for TYPEWRITE. +\# #EPIGRAPH 1 = centered; 2 = block \# -.MAC EPIGRAPH_SIZE END -. ds $EPI_SIZE_CHANGE \\$1 -.END +\# By default, epigraphs are centered, allowing the user +\# to input them on a line per line basis. To change this +\# behaviour, the user can supply the argument BLOCK, which +\# will produce indented, filled text similar to BLOCKQUOTE. \# -\# -\# EPIGRAPH COLOR -\# -------------- -\# *Arguments: -\# -\# *Function: -\# Sets register #EPI_COLOR to 1; defines string -\# $EPI_COLOR to argument. -\# *Notes: -\# User must define an XCOLOR or NEWCOLOR before using -\# EPI_COLOR. -\# -.MAC EPIGRAPH_COLOR END -. if \\n[#PRINT_STYLE]=1 \{ .return \} -. nr #EPI_COLOR 1 -. ds $EPI_COLOR \\$1 -.END -\# -\# -\# EPIGRAPH QUAD -\# ------------- -\# *Arguments: -\# L | LEFT | J | JUSTIFY -\# *Function: -\# Creates or modifies string $EPI_QUAD. -\# *Notes: -\# Default is $DOC_QUAD when BLOCK argument is passed to EPIGRAPH. -\# -.MAC EPIGRAPH_QUAD END -. ds $EPI_QUAD \\$1 -.END -\# -\# -\# EPIGRAPH INDENT -\# --------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies register #EPI_OFFSET_VALUE. -\# *Notes: -\# Default is 2 for TYPEWRITE, 3 for TYPESET. -\# -.MAC EPIGRAPH_INDENT END -. nr #EPI_OFFSET_VALUE \\$1 -.END -\# -\# -\# EPIGRAPH AUTOLEAD -\# ----------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies register #EPI_AUTOLEAD. -\# *Notes: -\# Default is 2 (for TYPESET; TYPEWRITE doesn't require this). -\# -.MAC EPIGRAPH_AUTOLEAD END -. nr #EPI_AUTOLEAD \\$1 -.END -\# -\# -\# EPIGRAPH -\# -------- -\# *Arguments: -\# BLOCK | -\# *Function: -\# Places an epigraph before the document's text, after the -\# document header, or after a HEAD. -\# *Notes: -\# #EPIGRAPH 1 = centered; 2 = block -\# -\# By default, epigraphs are centered, allowing the user -\# to input them on a line per line basis. To change this -\# behaviour, the user can supply the argument BLOCK, which -\# will produce indented, filled text similar to BLOCKQUOTE. -\# -\# If a block epigraph contains more than one para, ALL paras of -\# the epigraph must be preceded by PP. Otherwise, PP is optional. +\# If a block epigraph contains more than one para, ALL paras of +\# the epigraph must be preceded by PP. Otherwise, PP is optional. \# .MAC EPIGRAPH END . nr #PP_STYLE 2 . nr #Q_PP 0 +. if \\n[#LINENUMBERS]=1 \{\ +. NUMBER_LINES OFF +. nr #LINENUMBERS 2 +. \} . if \\n[#START] \{\ . if \\n[#PRINT_STYLE]=1 \{\ . if \\n[#AUTHOR_LINES]=1 \{ .ALD \\n[#DOC_LEAD]u \} @@ -5514,6 +6730,7 @@ y\\R'#DESCENDER \\n[.cdp]' . ie '\\$1'' \{\ . nr #EPIGRAPH 1 . ev EPIGRAPH +. nr #IN_DIVER 1 . ll \\n[#L_LENGTH]u . ta \\n(.lu . CHECK_INDENT @@ -5547,13 +6764,16 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#EPI_COLOR]=1 \{\ . nf \m[\\*[$EPI_COLOR]] -. EL +. EOL . \} . AUTOLEAD \\n[#EPI_AUTOLEAD] . nr #EPI_LEAD \\n[#LEAD] . nr #EPI_LEAD_DIFF \\n[#DOC_LEAD]-\\n[#EPI_LEAD] . \} . di EPI_TEXT +. nr #DIVERSIONS_HY_MARGIN (p;\\n[.ps]u*2.75)/1000 +. HY_SET 1 \\n[#DIVERSIONS_HY_MARGIN]u (\\n[#PT_SIZE]u/1000u/8u)p +. hy 14 . nr #EPI_ACTIVE 1 . \} . el \{\ @@ -5602,11 +6822,13 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#EPI_COLOR]=1 \{\ . nf \m[\\*[$EPI_COLOR]] -. EL +. EOL . \} . AUTOLEAD \\n[#EPI_AUTOLEAD] . QUAD \\*[$EPI_QUAD] -. HY +. nr #DIVERSIONS_HY_MARGIN (p;\\n[.ps]u*2.75)/1000 +. HY_SET 1 \\n[#DIVERSIONS_HY_MARGIN]u (\\n[#PT_SIZE]u/1000u/8u)p +. hy 14 . nr #EPI_LEAD \\n[#LEAD] . nr #EPI_LEAD_DIFF \\n[#DOC_LEAD]-\\n[#EPI_LEAD] . di EPI_TEXT @@ -5636,15 +6858,27 @@ y\\R'#DESCENDER \\n[.cdp]' .MAC DO_EPIGRAPH END . br . di +. rr #IN_DIVER +. if \\n[#RESET_FN_COUNTERS]=2 \{\ +. if !\\n[#FN_COUNT]=1 \{\ +. if ((\\n[#PAGE_LENGTH]+\\n[#VARIABLE_FOOTER_POS])+\\n[#DIVER_DEPTH])>(\\n[#PAGE_LENGTH]+\\n[#VARIABLE_FOOTER_POS]) \{\ +. DIVER_FN_2_POST +. rr #RESET_FN_COUNTERS +. \} +. \} +. \} +. nr #SAVED_FN_NUMBER \\n[#FN_NUMBER] +. nr #DONE_ONCE 0 1 . REMOVE_INDENT . ev . nr #EPI_DEPTH \\n[#DIVER_DEPTH]-\\n[#EPI_LEAD] . nr #EPI_LINES \\n[#EPI_DEPTH]/\\n[#EPI_LEAD] . ie \\n[#START] \{\ +. RLD \\n[#SHIM]u . nr #EPI_WHITESPACE (\\n[#DOC_LEAD]*\\n[#EPI_LINES])-\\n[#EPI_DEPTH] . while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\ . nr #EPI_WHITESPACE -\\n[#DOC_LEAD] -. \} +.\} . if \\n[#PRINT_STYLE]=2 \{\ . RLD \\n[#DOC_LEAD]u . if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \{\ @@ -5661,7 +6895,7 @@ y\\R'#DESCENDER \\n[.cdp]' . nr #EPI_WHITESPACE (\\n[#DOC_LEAD]*\\n[#EPI_LINES])-\\n[#EPI_DEPTH] . while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\ . nr #EPI_WHITESPACE -\\n[#DOC_LEAD] -. \} +.\} . ie \\n[#PRINT_STYLE]=1 \{\ . if \\n[#EPI_WHITESPACE]=\\n[#DOC_LEAD] \{ .ALD \\n[#EPI_WHITESPACE]u/2u \} . \} @@ -5673,17 +6907,18 @@ y\\R'#DESCENDER \\n[.cdp]' . ALD \\n[#EPI_LEAD_DIFF]u+(\\n[#EPI_WHITESPACE]u/2u)-\\n[#DOC_LEAD]u . \} . \} +. if \\n[#DIVER_FN]=2 \{ .rr #DIVER_FN \} . \} . el \{\ . nr #EPI_LINES_TO_TRAP 0 1 . while \\n[#EPI_LEAD]*\\n+[#EPI_LINES_TO_TRAP]<\\n[#TRAP_DISTANCE] \{\ . nr #LOOP 1 -. \} +.\} . nr #EPI_LINES_TO_TRAP -1 . nr #EPI_WHITESPACE (\\n[#EPI_LINES_TO_TRAP]*\\n[#DOC_LEAD])-(\\n[#EPI_LINES_TO_TRAP]*\\n[#EPI_LEAD]) . while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\ . nr #EPI_WHITESPACE -\\n[#DOC_LEAD] -. \} +.\} . if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \{ .ALD \\n[#EPI_WHITESPACE]u \} . if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{ .ALD \\n[#EPI_WHITESPACE]u-\\n[#DOC_LEAD]u \} . \} @@ -5712,6 +6947,7 @@ y\\R'#DESCENDER \\n[.cdp]' . ie \\n[#EPI_LINES]%2=1 \{ .ALD \\n[#DOC_LEAD]u \} . el \{ .ALD \\n[#DOC_LEAD]u/2u \} . \} +. SHIM . \} . if \\n[#PRINT_STYLE]=2 \{\ . if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \{\ @@ -5720,6 +6956,7 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\ . ALD (\\n[#EPI_WHITESPACE]u/2u)-\\n[#DOC_LEAD]u . \} +. SHIM . \} . \} . el \{\ @@ -5730,7 +6967,7 @@ y\\R'#DESCENDER \\n[.cdp]' . nr #EPI_WHITESPACE (\\n[#EPI_LINES_TO_END]*\\n[#DOC_LEAD])-(\\n[#EPI_LINES_TO_END]*\\n[#EPI_LEAD]) . while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\ . nr #EPI_WHITESPACE -\\n[#DOC_LEAD] -. \} +.\} . ALD \\n[#EPI_WHITESPACE]u-(\\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u) . \} . el \{\ @@ -5749,12 +6986,12 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . el \{\ . nr #EPI_LINES_TO_END \\n[#EPI_LINES]-\\n[#EPI_LINES_TO_TRAP] -. if \\n[#LOOP] \{. nr #EPI_LINES_TO_END +1 \} +. if \\n[#LOOP] \{ .nr #EPI_LINES_TO_END +1 \} . rr #LOOP . nr #EPI_WHITESPACE (\\n[#EPI_LINES_TO_END]*\\n[#DOC_LEAD])-(\\n[#EPI_LINES_TO_END]*\\n[#EPI_LEAD]) . while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\ . nr #EPI_WHITESPACE -\\n[#DOC_LEAD] -. \} +.\} . ALD \\n[#EPI_WHITESPACE]u-(\\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u) . if \\n[#PRINT_STYLE]=1 \{\ . if !\\n[#SINGLE_SPACE] \{\ @@ -5782,6 +7019,10 @@ y\\R'#DESCENDER \\n[.cdp]' . mk dc . \} . \} +. if \\n[#LINENUMBERS]=2 \{\ +. NUMBER_LINES RESUME +. nr #LINENUMBERS 1 +. \} .END \# \# ==================================================================== @@ -5796,21 +7037,11 @@ y\\R'#DESCENDER \\n[.cdp]' \# Deposits --END-- at the end of a document. \# .MAC FINIS END +. br . ev FINIS . evc 0 -. nr #FINIS 1 . if \\n[#TAB_ACTIVE] \{ .TQ \} . if \\n[#INDENT_ACTIVE] \{ .IQ CLEAR \} -. if \\n[#FOOTERS_ON] \{\ -. nr #FOOTERS_WERE_ON 1 -. FOOTERS OFF -. \} -. if \\n[#PAGINATE] \{\ -. if \\n[#PAGE_NUM_V_POS]=2 \{\ -. nr #PAGINATION_WAS_ON 1 -. PAGINATION OFF -. \} -. \} . nr #EM_ADJUST (1m/8) . if \\n[#COLUMNS] \{\ . po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u @@ -5820,7 +7051,10 @@ y\\R'#DESCENDER \\n[.cdp]' . CENTER . if \\n[#PRINT_STYLE]=1 \{ .PRINT "--\\*[$FINIS_STRING]--\} . if \\n[#PRINT_STYLE]=2 \{\ -. PRINT "\m[\\*[$FINIS_COLOR]]\v'-\\n[#EM_ADJUST]u'\(em\v'+\\n[#EM_ADJUST]u'\\*[$FINIS_STRING]\v'-\\n[#EM_ADJUST]u'\*[FU1]\(em\m[] +. ie \\n[#FINIS_COLOR] \{\ +. PRINT "\m[\\*[$FINIS_COLOR]]\v'-\\n[#EM_ADJUST]u'\(em\v'+\\n[#EM_ADJUST]u'\\*[$FINIS_STRING]\v'-\\n[#EM_ADJUST]u'\*[FU1]\(em\m[] +. \} +. el \{ .PRINT \v'-\\n[#EM_ADJUST]u'\(em\v'+\\n[#EM_ADJUST]u'\\*[$FINIS_STRING]\v'-\\n[#EM_ADJUST]u'\*[FU1]\(em\m[] \} . \} . ev .END @@ -5836,65 +7070,6 @@ y\\R'#DESCENDER \\n[.cdp]' .ds PAGE# \En[#PAGENUMBER] \# \# -\# HDRFTR FAMILY -\# ------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $HDRFTR_FAM. -\# *Notes: -\# Default is same as running text. -\# -.MAC HDRFTR_FAMILY END -. ds $HDRFTR_FAM \\$1 -.END -\# -\# -\# HDRFTR SIZE -\# ----------- -\# *Argument: -\# <+|-number of points by which to in/decrease point size of -\# header/footers (relative to running text)> -\# *Function: -\# Creates or modifies string $HDRFTR_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a +|- sign. No space afterwards. -\# Fractional point sizes are allowed. Default is +0. -\# -\# By default, header/footers print the author .5 points smaller -\# than the base point size of running text, center titles -\# (Chapter, Draft, Revision, etc.) .5 points smaller -\# than running text (in italics), and the document title 2 full -\# points smaller than running text (in caps). The HDRFTR_SIZE -\# macro changes the overall size for all three parts while -\# maintaining the internal size changes. -\# -\# In other words, if the user likes the header/footers but wants -\# them a bit bigger or a bit smaller, s/he should use HDRFTR_SIZE. -\# -.MAC HDRFTR_SIZE END -. ds $HDRFTR_SIZE_CHANGE \\$1 -.END -\# -\# -\# HDRFTR COLOR -\# ------------ -\# *Arguments: -\# -\# *Function: -\# Sets register #HDRFTR_COLOR to 1; defines string $HDRFTR_COLOR to -\# argument. -\# *Notes: -\# User must define an XCOLOR or NEWCOLOR before using -\# HDRFTR_COLOR. -\# -.MAC HDRFTR_COLOR END -. if \\n[#PRINT_STYLE]=1 \{ .return \} -. nr #HDRFTR_COLOR 1 -. ds $HDRFTR_COLOR \\$1 -.END -\# -\# \# HDRFTR RULE GAP \# --------------- \# *Argument: @@ -5938,64 +7113,6 @@ y\\R'#DESCENDER \\n[.cdp]' .END \# \# -\# HDRFTR LEFT FAMILY -\# ------------------ -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $HDRFTR_LEFT_FAM. -\# -.MAC HDRFTR_LEFT_FAMILY END -. ds $HDRFTR_LEFT_FAM \\$1 -.END -\# -\# -\# HDRFTR LEFT FONT -\# ---------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $HDRFTR_LEFT_FT. -\# -.MAC HDRFTR_LEFT_FONT END -. ds $HDRFTR_LEFT_FT \\$1 -.END -\# -\# -\# HDRFTR LEFT SIZE -\# ---------------- -\# *Argument: -\# <+|- number of points to in/decrease size of left string in -\# header/footers (relative to running text)> -\# *Function: -\# Creates or modifies string HDRFTR_LEFT_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a +|- sign. No space afterwards. -\# Fractional point sizes are allowed. -\# Default is -.5 for printstyle TYPESET; if all caps, -2 -\# Has no effect in TYPEWRITE. -\# -.MAC HDRFTR_LEFT_SIZE END -. ds $HDRFTR_LEFT_SIZE_CHANGE \\$1 -.END -\# -\# -\# HDRFTR LEFT COLOR -\# ----------------- -\# *Argument: -\# -\# *Function: -\# Sets register #HDRFTR_LEFT_COLOR to 1; creates string -\# $HDRFTR_LEFT_COLOR -\# *Notes: -\# The color name must be pre-defined with NEWCOLOR or XCOLOR. -\# -.MAC HDRFTR_LEFT_COLOR END -. nr #HDRFTR_LEFT_COLOR 1 -. ds $HDRFTR_LEFT_COLOR \\$1 -.END -\# -\# \# HDRFTR LEFT CAPS \# ---------------- \# *Argument: @@ -6052,64 +7169,6 @@ y\\R'#DESCENDER \\n[.cdp]' .END \# \# -\# HDRFTR CENTER FAMILY -\# -------------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $HDRFTR_CENTER_FAM. -\# -.MAC HDRFTR_CENTER_FAMILY END -. ds $HDRFTR_CENTER_FAM \\$1 -.END -\# -\# -\# HDRFTR CENTER FONT -\# ------------------ -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $HDRFTR_CENTER_FT. -\# -.MAC HDRFTR_CENTER_FONT END -. ds $HDRFTR_CENTER_FT \\$1 -.END -\# -\# -\# HDRFTR CENTER SIZE -\# ------------------ -\# *Argument: -\# <+|- number of points to in/decrease size of centre string in -\# header/footers (relative to header/footer size)> -\# *Function: -\# Creates string HDRFTR_CENTER_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a +|- sign. No space afterwards. -\# Fractional point sizes are allowed. -\# Default is -.5 for printstyle TYPESET; if all caps, -2 -\# Has no effect in TYPEWRITE. -\# -.MAC HDRFTR_CENTER_SIZE END -. ds $HDRFTR_CENTER_SIZE_CHANGE \\$1 -.END -\# -\# -\# HDRFTR CENTER COLOR -\# ------------------- -\# *Argument: -\# -\# *Function: -\# Sets register #HDRFTR_CENTER_COLOR to 1; creates string -\# $HDRFTR_CENTER_COLOR -\# *Notes: -\# The color name must be pre-defined with NEWCOLOR or XCOLOR. -\# -.MAC HDRFTR_CENTER_COLOR END -. nr #HDRFTR_CENTER_COLOR 1 -. ds $HDRFTR_CENTER_COLOR \\$1 -.END -\# -\# \# HDRFTR CENTER CAPS \# ------------------ \# *Argument: @@ -6201,64 +7260,6 @@ y\\R'#DESCENDER \\n[.cdp]' .END \# \# -\# HDRFTR RIGHT FAMILY -\# ------------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $HDRFTR_RIGHT_FAM. -\# -.MAC HDRFTR_RIGHT_FAMILY END -. ds $HDRFTR_RIGHT_FAM \\$1 -.END -\# -\# -\# HDRFTR RIGHT FONT -\# ----------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $HDRFTR_RIGHT_FT. -\# -.MAC HDRFTR_RIGHT_FONT END -. ds $HDRFTR_RIGHT_FT \\$1 -.END -\# -\# -\# HDRFTR RIGHT SIZE -\# ----------------- -\# *Argument: -\# <+|- number of points to in/decrease size of right string in -\# header/footers (relative to header/footer size)> -\# *Function: -\# Creates or modifies string HDRFTR_RIGHT_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a +|- sign. No space afterwards. -\# Fractional point sizes are allowed. -\# Default is -2 for printstyle TYPESET if all caps; otherwise -.5 -\# Has no effect in TYPEWRITE. -\# -.MAC HDRFTR_RIGHT_SIZE END -. ds $HDRFTR_RIGHT_SIZE_CHANGE \\$1 -.END -\# -\# -\# HDRFTR RIGHT COLOR -\# ------------------ -\# *Argument: -\# -\# *Function: -\# Sets register #HDRFTR_RIGHT_COLOR to 1; creates string -\# $HDRFTR_RIGHT_COLOR -\# *Notes: -\# The color name must be pre-defined with NEWCOLOR or XCOLOR. -\# -.MAC HDRFTR_RIGHT_COLOR END -. nr #HDRFTR_RIGHT_COLOR 1 -. ds $HDRFTR_RIGHT_COLOR \\$1 -.END -\# -\# \# HDRFTR RIGHT CAPS \# ----------------- \# *Argument: @@ -6280,31 +7281,14 @@ y\\R'#DESCENDER \\n[.cdp]' .END \# \# -\# HDRFTR RULE COLOR -\# ----------------- -\# *Arguments: -\# -\# *Function: -\# Sets register #HDRFTR_COLOR to 1; defines string -\# $HDRFTR_RULE_COLOR to argument. -\# *Notes: -\# User must define an XCOLOR or NEWCOLOR before using -\# HDRFTR_RULE_COLOR. -\# -.MAC HDRFTR_RULE_COLOR END -. if \\n[#PRINT_STYLE]=1 \{ .return \} -. nr #HDRFTR_RULE_COLOR 1 -. ds $HDRFTR_RULE_COLOR \\$1 -.END -\# -\# \# HDRFTR RULE \# ----------- \# *Arguments: \# | \# *Function: \# If invoked via the alias HDRFTR_RULE_INTERNAL in HDRFTR, prints a rule -\# under the header/footer. Otherwise, turns HDRFTR_RULE on or off. +\# under the header/over the footer. Otherwise, turns HDRFTR_RULE +\# on or off. \# .MAC HDRFTR_RULE END \"To print rule under header/over footer. . ie '\\$0'HDRFTR_RULE_INTERNAL' \{\ @@ -6404,21 +7388,23 @@ y\\R'#DESCENDER \\n[.cdp]' \# Creates or modifies register #SWITCH_HDRFTR, used to switch \# default location of HDRFTR_LEFT and HDRFTR_RIGHT. \# *Notes: -\# Typically, the author string appears at the left of header/footers, -\# and the title string appears at the right. This switches the -\# location of the two. Useful in conjuction with RECTO_VERSO to -\# tweak switches on alternate pages to come out as the user wishes. -\# The assumption of RECTO_VERSO is that the first page of the document -\# (recto) is odd, and even though it has no header/footer, if it did have one, -\# it would print as AUTHOR...CENTER...TITLE (or whatever strings -\# the user has supplied for HDRFTR_LEFT/RIGHT), meaning that the -\# next page, which does have a header/footer, will come out as -\# TITLE...CENTER...AUTHOR (or whatever strings the user has -\# supplied for HDRFTR_LEFT/RIGHT). SWITCH_HDRFTRS allows the user -\# to get the desired string in the desired place on the desired -\# recto/verso page. \# -\# Default is OFF. +.ig +Typically, the author string appears at the left of header/footers, +and the title string appears at the right. This switches the +location of the two. Useful in conjuction with RECTO_VERSO to tweak +switches on alternate pages to come out as the user wishes. The +assumption of RECTO_VERSO is that the first page of the document +(recto) is odd, and even though it has no header/footer, if it did +have one, it would print as AUTHOR...CENTER...TITLE (or whatever +strings the user has supplied for HDRFTR_LEFT/RIGHT), meaning that +the next page, which does have a header/footer, will come out as +TITLE...CENTER...AUTHOR (or whatever strings the user has supplied +for HDRFTR_LEFT/RIGHT). SWITCH_HDRFTRS allows the user to get the +desired string in the desired place on the desired recto/verso page. + +Default is OFF. +.. \# .MAC SWITCH_HDRFTR END . ie '\\$1'' \{ .nr #SWITCH_HDRFTR 1 \} @@ -6604,7 +7590,7 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#HDRFTR_COLOR]=1 \{\ . nf \m[\\*[$HDRFTR_COLOR]] -. EL +. EOL . \} . fam \\*[$HDRFTR_LEFT_FAM] . ft \\*[$HDRFTR_LEFT_FT] @@ -6712,6 +7698,7 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#HDRFTR_RULE] \{\ . HDRFTR_RULE_INTERNAL . \} +. br .END \# \# @@ -6743,7 +7730,7 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=2 \{ .CENTER \} . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=3 \{ .RIGHT \} . PRINT \\*[$USERDEF_HDRFTR_RECTO] -. EL +. EOL . if \\n[#FOOTERS_ON] \{\ . di NULL . SIZESPECS @@ -6757,7 +7744,7 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#USERDEF_HDRFTR_VERSO_QUAD]=2 \{ .CENTER \} . if \\n[#USERDEF_HDRFTR_VERSO_QUAD]=3 \{ .RIGHT \} . PRINT \\*[$USERDEF_HDRFTR_VERSO] -. EL +. EOL . if \\n[#FOOTERS_ON] \{\ . di NULL . SIZESPECS @@ -6770,7 +7757,7 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=2 \{ .CENTER \} . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=3 \{ .RIGHT \} . PRINT \\*[$USERDEF_HDRFTR_RECTO] -. EL +. EOL . if \\n[#FOOTERS_ON] \{\ . di NULL . SIZESPECS @@ -6785,7 +7772,7 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=2 \{ .CENTER \} . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=3 \{ .RIGHT \} . PRINT \\*[$USERDEF_HDRFTR_RECTO] -. EL +. EOL . if \\n[#FOOTERS_ON] \{\ . di NULL . SIZESPECS @@ -6863,14 +7850,18 @@ y\\R'#DESCENDER \\n[.cdp]' \# event that the user enters .TITLE in caps/lc), I've used \# quad left, quad centre, and quad right to arrange the three bits \# of the header, rather than .tl. This allows the use of the CAPS macro. -\# The downside is that I have to add \\v'-(\\n[#LEAD]u*#) in order +\# The downside is that I have to add \\v'-(\\n[#LEAD]u*) in order \# for -Tlatin1 output to align the header/footer strings on the baseline. \# The console output still isn't brilliant, but at least it's \# comprehensible. \# .MAC HEADER END -. PROCESS_FN_LEFTOVER -. nr #FN_COUNT_FOR_COLS 0 1 +. MNtop +. rr #FROM_FOOTER +. nr #FROM_HEADER 1 +. nr #LAST_FN_COUNT_FOR_COLS \\n[#FN_COUNT_FOR_COLS] +. if \\n[#FN_DEPTH] \{ .PROCESS_FN_LEFTOVER \} +. rr #RULED . if \\n[#RESET_FN_NUMBER] \{ .nr #FN_NUMBER 0 1 \} . po \\n[#DOC_L_MARGIN]u . if \\n[#RECTO_VERSO] \{\ @@ -6910,7 +7901,8 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . if \\n[#PRINT_STYLE]=1 \{\ . if \\n[#ENDNOTES]=1 \{\ -. if \\n[#EN_SINGLESPACE] \{\ \"Endnotes s-spaced have different lead +.\" Single-spaced endotes have a different lead +. if \\n[#EN_SINGLESPACE] \{\ . nr #RESTORE_DOC_LEAD \\n[#DOC_LEAD] . nr #DOC_LEAD \\n[#EN_LEAD]u . \} @@ -6959,6 +7951,7 @@ y\\R'#DESCENDER \\n[.cdp]' . nr #Q_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE]) . po \\n[#Q_OFFSET]u . \} +. ALD \\n[#Q_LEAD_DIFF]u . \} . if \\n[#EPIGRAPH] \{\ . ie \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \} @@ -6980,6 +7973,7 @@ y\\R'#DESCENDER \\n[.cdp]' . el \{ .ns \} . ns . if \\n[#COLUMNS] \{\ +. nr #FN_COUNT_FOR_COLS 0 1 . nr #L_MARGIN \\n[#DOC_L_MARGIN] . if \\n[#RECTO_VERSO] \{ .COLUMNS \\n[#NUM_COLS] \\n[#GUTTER]u \} . nr #COL_NUM 0 1 @@ -7000,11 +7994,44 @@ y\\R'#DESCENDER \\n[.cdp]' . po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u+(\\n[#PP_INDENT]u*\\n[#EPI_OFFSET_VALUE]u) . \} . \} +. if \\n[#RESET_FN_COUNTERS]=1 \{\ +. rr #RESET_FN_COUNTERS +. PROCESS_FN_IN_DIVER +. nr #FN_COUNT \\n[#SAVED_FN_COUNT] 1 +. if \\n[#COLUMNS]=1 \{ .nr #FN_COUNT_FOR_COLS \\n[#SAVED_FN_COUNT_FOR_COLS] 1 \} +. ie \\n[#RESET_FN_NUMBER]=1 \{ .nr #FN_NUMBER \\n[#SAVED_FN_NUMBER] 1 \} +. el \{ .nr #FN_NUMBER \\n[#FN_NUMBER] 1 \} +. rm FN_IN_DIVER +. if dRUNON_FN_IN_DIVER \{ .rm RUNON_FN_IN_DIVER \} +. \} . if \\n[#PRINT_STYLE]=1 \{\ . if \\n[#SLANT_ON] \{\ . if \\n[#UNDERLINE_SLANT] \{ .UNDERLINE \} . \} . \} +. rr #FROM_HEADER +. rr #DEFER_SPACE_ADDED +. if !\\n[#FN_DEPTH] \{\ +. if r#DIVERTED \{ .rr #DIVERTED \} +. \} +. if \\n[#MN_OVERFLOW_LEFT]=1 \{\ +. MN LEFT +. nf +. MN_OVERFLOW_LEFT +. MN +. \} +. if \\n[#MN_OVERFLOW_RIGHT]=1 \{\ +. MN RIGHT +. nf +. MN_OVERFLOW_RIGHT +. MN +. \} +. rm MN_OVERFLOW_LEFT +. rr #MN_OVERFLOW_LEFT +. rr #no-repeat-MN-left +. rm MN_OVERFLOW_RIGHT +. rr #MN_OVERFLOW_RIGHT +. rr #no-repeat-MN-right .END \# \# ==================================================================== @@ -7077,45 +8104,90 @@ y\\R'#DESCENDER \\n[.cdp]' \# FINAL respects PAGENUMBER. \# .MAC FOOTER END -. ev PAGE_BOTTOM -\# Removed this next bit; can't figure out why I needed it. -\#. if \\n[#START]=1 \{\ -\#. bp -\#. ev -\#. rr #START -\#. return -\#. \} +. ev PAGE_TRANSITION +. if \\n[MN-left]>0 \{\ +. if !\\n[#no-repeat-MN-left]=1 \{\ +. MNbottom-left +. nr #no-repeat-MN-left 1 +. \} +. if '\\n(.z'MN_OVERFLOW_LEFT' \{\ +. di +. nr #MN_OVERFLOW_LEFT 1 +. rr #OVERFLOW_LEFT +. \} +. \} +. if \\n[MN-right]>0 \{\ +. if (\\n[MN-right] > 0) \{\ +. if !\\n[#no-repeat-MN-right]=1 \{\ +. MNbottom-right +. \} +. \} +. if '\\n(.z'MN_OVERFLOW_RIGHT' \{\ +. di +. nr #MN_OVERFLOW_RIGHT 1 +. rr #OVERFLOW_RIGHT +. \} +. \} +. ch MN_OVERFLOW_TRAP +. nr #SAVED_LEAD \\n(.v . nr #L_MARGIN_DIFF \\n[#L_MARGIN]-\\n[#DOC_L_MARGIN] . if !\\n[#FN_DEFER] \{\ . nr #DIVER_DEPTH 0 -. if \\n[#FN_COUNT] \{\ -. sp |\\n[#PAGE_LENGTH]u-(\\n[#B_MARGIN]u+\\n[#FN_DEPTH]u) +. if \\n[#FN_DEPTH] \{\ +. if \\n[#DIVERTED]=3 \{ .nr #FN_DEPTH +\\n[#VFP_DIFF] \} +. vpt 0 +. sp |\\n[#PAGE_LENGTH]u-(\\n[#B_MARGIN]u+\\n[#FN_DEPTH]u-\\n[#DOC_LEAD]u) +. vpt 1 . po \\n[#DOC_L_MARGIN]u . if \\n[#COLUMNS] \{\ . po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u . nr #L_MARGIN \\n(.o +. nr #FROM_FOOTER 1 . \} . nf . FOOTNOTES . rm FOOTNOTES +. if dRUNON_FOOTNOTES \{ .rm RUNON_FOOTNOTES \} +. if \\n[#PRINT_STYLE]=1 \{ .vs \\n[#SAVED_LEAD]u \} +. if \\n[#PRINT_STYLE]=2 \{ .LS \\n[#SAVED_LEAD]u \} . if '\\n(.z'FN_OVERFLOW' \{\ . di . nr #FN_OVERFLOW_DEPTH \\n[#DIVER_DEPTH] . \} +. nr #FN_COUNT_AT_FOOTER \\n[#FN_COUNT] . nr #FN_COUNT 0 -. if \\n[#COL_NEXT] \{ .nr #COL_NUM \\n-[#COL_NUM] \} +. if \\n[#COL_NEXT] \{\ +. ie !\\n[#COL_NUM]=\\n[#NUM_COLS] \{ .nr #COL_NUM \\n-[#COL_NUM] \} +. el \{ .nr #COL_NUM \\n[#NUM_COLS] 1 \} +. \} . \} +. rr #DIVERTED . \} -. ie \\n[#COLUMNS] \{\ +. ie \\n[#COLUMNS]=1 \{\ . ie \\n[#COL_NUM]=\\n[#NUM_COLS] \{ .DO_FOOTER \} . el \{\ . ie \\n[#ENDNOTES] \{ .sp |\\n(ecu-\\n[#EN_LEAD]u \} . el \{ .sp |\\n(dcu \} . po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u . nr #L_MARGIN \\n(.o -. PROCESS_FN_LEFTOVER +. if \\n[#FN_DEPTH] \{ .PROCESS_FN_LEFTOVER \} +. LS \\n[#SAVED_LEAD]u +. if \\n[#PREV_FN_DEFERRED] \{\ +. nr #PREV_FN_DEFERRED 2 +. \} +. rr #RULED . if !\\n[#EPIGRAPH] \{ .rr #COL_NEXT \} . if !\\n[#QUOTE] \{ .rr #COL_NEXT \} +. if \\n[#RESET_FN_COUNTERS]=1 \{\ +. rr #RESET_FN_COUNTERS +. PROCESS_FN_IN_DIVER +. LS \\n[#SAVED_LEAD]u +. nr #FN_COUNT \\n[#FN_COUNT] 1 +. nr #FN_COUNT_FOR_COLS \\n[#FN_COUNT_FOR_COLS] 1 +. rm FN_IN_DIVER +. if dRUNON_FN_IN_DIVER \{ .rm RUNON_FN_IN_DIVER \} +. \} +. rr #DEFER_SPACE_ADDED . if \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \} . if \\n[#QUOTE] \{\ . ie \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \} @@ -7147,6 +8219,7 @@ y\\R'#DESCENDER \\n[.cdp]' . ev . \} . ns +. rr #DIVERTED . \} . el \{ .DO_FOOTER \} .END @@ -7161,13 +8234,19 @@ y\\R'#DESCENDER \\n[.cdp]' \# Resets CAPS and UNDERLINE if they were on. \# .MAC DO_FOOTER END +.\" Have to change position of FN_OVERFLOW_TRAP or it screws up the +.\" placement of page numbers (or footers). It's reset to its original +.\" position at the end of the macro. +. if r#SAVED_FOOTER_POS \{ .ch FOOTER \\n[#SAVED_FOOTER_POS]u \} +. rr #SAVED_FOOTER_POS . ie (\\n[#FOOTER_MARGIN]+\\n(.v)>\\n[#B_MARGIN] \{\ . nr #SKIP_FOOTER 1 . \} . el \{\ -. vs 12 +. vpt 0 . sp |\\n[#PAGE_LENGTH]u-\\n[#FOOTER_MARGIN]u-1v . mk y +. vpt 1 . \} . ev FOOTER . po \\n[#DOC_L_MARGIN]u @@ -7177,10 +8256,9 @@ y\\R'#DESCENDER \\n[.cdp]' . FT R . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$HDRFTR_SIZE_CHANGE] . if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 +. TYPEWRITER . \} +. LS \\n[#SAVED_LEAD]u . nr #HDRFTR_PT_SIZE \\n[#PT_SIZE] . if \\n[#CAPS_ON] \{\ . nr #CAPS_WAS_ON 1 @@ -7210,7 +8288,10 @@ y\\R'#DESCENDER \\n[.cdp]' . rr #UNDERLINE_WAS_ON . \} . ev +. rr #SAVED_LEAD . bp +.\" This ev pops the PAGE_TRANSITION environment still active at the +.\" end of HEADER . ev .END \# @@ -7339,73 +8420,14 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# ---Main heads--- \# -\# HEAD FAMILY -\# ----------- -\# *Argument: -\# +\# HEAD CAPS +\# --------- +\# *Arguments: +\# | \# *Function: -\# Creates or modifies string $HEAD_FAM. +\# Creates or modifies register #HEAD_CAPS. \# *Notes: -\# Default is same as running text. -\# -.MAC HEAD_FAMILY END -. ds $HEAD_FAM \\$1 -.END -\# -\# -\# HEAD FONT -\# --------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $HEAD_FT. -\# *Notes: -\# Default is bold. -\# -.MAC HEAD_FONT END -. ds $HEAD_FT \\$1 -.END -\# -\# -\# HEAD SIZE -\# --------- -\# *Argument: -\# <+|- number of points by which to in/decrease point size of -\# section titles (relative to running text)> -\# *Function: -\# Creates or modifies string $HEAD_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a - or + sign with no space afterwards. -\# Fractional point sizes are allowed. -\# Default +1 for printstyle TYPESET; +0 for TYPEWRITE. -\# -.MAC HEAD_SIZE END -. ds $HEAD_SIZE_CHANGE \\$1 -.END -\# -\# -\# HEAD QUAD -\# --------- -\# *Arguments: -\# L | LEFT | R | RIGHT | C | CENTER | CENTRE -\# *Function: -\# Creates or modifies string $HEAD_QUAD. -\# *Notes: -\# Default is CENTER. -\# -.MAC HEAD_QUAD END -. ds $HEAD_QUAD \\$1 -.END -\# -\# -\# HEAD CAPS -\# --------- -\# *Arguments: -\# | -\# *Function: -\# Creates or modifies register #HEAD_CAPS. -\# *Notes: -\# Default is on. +\# Default is on. \# .MAC HEAD_CAPS END . ie '\\$1'' \{ .nr #HEAD_CAPS 1 \} @@ -7413,23 +8435,6 @@ y\\R'#DESCENDER \\n[.cdp]' .END \# \# -\# HEAD COLOR -\# ---------- -\# *Arguments: -\# -\# *Function: -\# Defines string $HEAD_COLOR to argument. -\# *Notes: -\# User must define an XCOLOR or NEWCOLOR before using -\# HEAD_COLOR. -\# -.MAC HEAD_COLOR END -. if \\n[#PRINT_STYLE]=1 \{ .return \} -. nr #HEAD_COLOR 1 -. ds $HEAD_COLOR \\$1 -.END -\# -\# \# HEAD SPACE \# ---------- \# *Arguments: @@ -7476,7 +8481,7 @@ y\\R'#DESCENDER \\n[.cdp]' \# .MAC HEAD END . br -\# Collect head for TOC. +.\" Collect head for TOC. . nr #ARG_NUM 0 1 . nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ] . af #TOC_ENTRY_PN \\g[#PAGENUMBER] @@ -7485,8 +8490,8 @@ y\\R'#DESCENDER \\n[.cdp]' . as $TOC_HEAD_ITEM \\$[\\n+[#ARG_NUM]]\\| . \} . el \{\ -\# Note that in the .as lines, below, \ at the end has a literal -\# space after it. +.\" Note that in the .as lines, below, \ at the end has a literal +.\" space after it. . ie \\n[#NUMBER_HEAD] \{\ . ie \\n[#ARG_NUM]=0 \{\ . as $TOC_HEAD_ITEM \\n+[#HEAD_NUM].\0\\$[\\n+[#ARG_NUM]]\ @@ -7500,10 +8505,10 @@ y\\R'#DESCENDER \\n[.cdp]' . as $TOC_HEAD_ITEM \\$[\\n+[#ARG_NUM]]\ . \} . \} -. \} -\# Note the use of \!, which transparently embeds the macros used -\# in the TOC_ENTRIES diversion. The elements they control must be -\# processed literally when the diversion is output. +.\} +.\" Note the use of \!, which transparently embeds the macros used +.\" in the TOC_ENTRIES diversion. The elements they control must be +.\" processed literally when the diversion is output. . ev TOC_EV . da TOC_ENTRIES . if \\n[#PRINT_STYLE]=1 \{\ @@ -7523,7 +8528,7 @@ y\\R'#DESCENDER \\n[.cdp]' . el \{\ \!. PAD "\\h'\\n[#TOC_HEAD_INDENT]u'\\*[$TOC_HEAD_ITEM]\\*[$TOC_PN]" . \} -\!. EL +\!. EOL \!. ST 100 L \!. ST 101 R . if \\n[#PRINT_STYLE]=2 \{\ @@ -7539,8 +8544,8 @@ y\\R'#DESCENDER \\n[.cdp]' \!. TQ . di . ev -\# End collection of head for TOC -\# Process head +.\" End collection of head for TOC +.\" Process head . nr #HEAD 1 . ev HEAD . ll \\n[#L_LENGTH]u @@ -7552,9 +8557,7 @@ y\\R'#DESCENDER \\n[.cdp]' . CHECK_INDENT . QUAD \\*[$HEAD_QUAD] . if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 +. TYPEWRITER . vs \\n[#DOC_LEAD]u . UNDERLINE OFF . \} @@ -7566,13 +8569,13 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . if r#QUOTE \{ .rr #QUOTE \} . if r#EPIGRAPH \{ .rr #EPIGRAPH \} -. if \\n[#PRINT_STYLE]=1 \{ .ne 3 \} +. if \\n[#PRINT_STYLE]=1 \{ .ne \\n[#NUM_ARGS]+2 \} . if \\n[#PRINT_STYLE]=2 \{\ -. ie \\n[#HEAD_SPACE] \{ .ne 4 \} -. el \{ .ne 3 \} +. ie \\n[#HEAD_SPACE] \{ .ne \\n[#NUM_ARGS]+3 \} +. el \{ .ne \\n[#NUM_ARGS]+2 \} . \} . ie \\n[#START] \{\ -. if \\n[#DOC_HEADER]=0 \{ . \} +. if \\n[#DOC_HEADER]=0 \{ .RLD 1v \} . \} . el \{\ . if \\n[#PRINT_STYLE]=1 \{\ @@ -7609,14 +8612,14 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . \} . \} -\# Print head +.\" Print head . nr #ARG_NUM 0 1 . if \\n[#HEAD_CAPS] \{ .CAPS \} . if \\n[#PRINT_STYLE]=2 \{\ . if \\n[#HEAD_COLOR]=1 \{\ . TRAP OFF . COLOR \\*[$HEAD_COLOR] -. EL +. EOL . TRAP . \} . \} @@ -7641,7 +8644,7 @@ y\\R'#DESCENDER \\n[.cdp]' . el \{ .UNDERSCORE "\\$[\\n+[#ARG_NUM]]\} . br . \} -. \} +.\} . REMOVE_INDENT . CAPS OFF . ev @@ -7664,82 +8667,6 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# ---Subheads--- \# -\# SUBHEAD FAMILY -\# -------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $SH_FAM. -\# *Notes: -\# Default is same as running text. -\# -.MAC SUBHEAD_FAMILY END -. ds $SH_FAM \\$1 -.END -\# -\# -\# SUBHEAD FONT -\# -------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $SH_FT. -\# *Notes: -\# Default is bold. -\# -.MAC SUBHEAD_FONT END -. ds $SH_FT \\$1 -.END -\# -\# -\# SUBHEAD SIZE -\# ------------ -\# *Argument: -\# <+|- number of points by which to in/decrease point size of subheads -\# (relative to running text)> -\# *Function: -\# Creates or modifies string $SH_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a +|- sign. No space afterwards. -\# Fractional point sizes are allowed. -\# Default is +.5 for printstyle TYPESET; +0 for TYPEWRITE. -\# -.MAC SUBHEAD_SIZE END -. ds $SH_SIZE_CHANGE \\$1 -.END -\# -\# -\# SUBHEAD COLOR -\# ------------- -\# *Arguments: -\# -\# *Function: -\# Defines string $SH_COLOR to argument. -\# *Notes: -\# User must define an XCOLOR or NEWCOLOR before using -\# SUBHEAD_COLOR. -\# -.MAC SUBHEAD_COLOR END -. if \\n[#PRINT_STYLE]=1 \{ .return \} -. nr #SH_COLOR 1 -. ds $SH_COLOR \\$1 -.END -\# -\# -\# SUBHEAD QUAD -\# ------------ -\# *Argument: -\# L | LEFT | R | RIGHT | C | CENTER | CENTRE -\# *Function: -\# Creates or modifies string $SH_QUAD. -\# *Notes: -\# Default is LEFT for both TYPESET and TYPEWRITE. -\# -.MAC SUBHEAD_QUAD END -. ds $SH_QUAD \\$1 -.END -\# -\# \# SUBHEAD \# ------- \# *Arguments: @@ -7756,7 +8683,7 @@ y\\R'#DESCENDER \\n[.cdp]' \# .MAC SUBHEAD END . br -\# Collect subhead for TOC. +.\" Collect subhead for TOC. . nr #ARG_NUM 0 1 . nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ] . while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\ @@ -7764,8 +8691,8 @@ y\\R'#DESCENDER \\n[.cdp]' . as $TOC_SH_ITEM \\$[\\n+[#ARG_NUM]]\\| . \} . el \{\ -\# Note that in the .as lines, below, \ at the end has a literal -\# space after it. +.\" Note that in the .as lines, below, \ at the end has a literal +.\" space after it. . ie \\n[#NUMBER_SH] \{\ . ie \\n[#ARG_NUM]=0 \{\ . as $TOC_SH_ITEM \\n+[#SH_NUM].\0\\$[\\n+[#ARG_NUM]]\ @@ -7779,10 +8706,10 @@ y\\R'#DESCENDER \\n[.cdp]' . as $TOC_SH_ITEM \\$[\\n+[#ARG_NUM]]\ . \} . \} -. \} -\# Note the use of \!, which transparently embeds the macros used -\# in the TOC_ENTRIES diversion. The elements they control must be -\# processed literally when the diversion is output. +.\} +.\" Note the use of \!, which transparently embeds the macros used +.\" in the TOC_ENTRIES diversion. The elements they control must be +.\" processed literally when the diversion is output. . ev TOC_EV . da TOC_ENTRIES . if \\n[#PRINT_STYLE]=1 \{\ @@ -7802,7 +8729,7 @@ y\\R'#DESCENDER \\n[.cdp]' . el \{\ \!. PAD "\\h'\\n[#TOC_SH_INDENT]u'\\*[$TOC_SH_ITEM]\\*[$TOC_PN]" . \} -\!. EL +\!. EOL \!. ST 100 L \!. ST 101 R . if \\n[#PRINT_STYLE]=2 \{\ @@ -7818,8 +8745,8 @@ y\\R'#DESCENDER \\n[.cdp]' \!. TQ . di . ev -\# End collection of head for TOC -\# Process subhead +.\" End collection of head for TOC +.\" Process subhead . nr #ARG_NUM 0 1 . if r#QUOTE \{ .rr #QUOTE \} . if r#Q_AT_TOP \{ .rr #Q_AT_TOP \} @@ -7832,9 +8759,7 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . CHECK_INDENT . if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 +. TYPEWRITER . vs \\n[#DOC_LEAD]u . QUAD \\*[$SH_QUAD] . UNDERLINE OFF @@ -7848,9 +8773,9 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . if \\n[#PRINT_STYLE]=1 \{ .nr #SH_LEAD_ADJUST \\n[#LEAD]/5 \} . if \\n[#PRINT_STYLE]=2 \{ .nr #SH_LEAD_ADJUST \\n[#LEAD]/8 \} -. ie \\n[#START] \{ . \} +. ie \\n[#START] \{ .RLD 1v \} . el \{\ -. ie ( \\n[#TRAP_DISTANCE] < (\\n[#DOC_LEAD]u*2u) ) \{\ +. ie ( \\n[#TRAP_DISTANCE] < (\\n[#DOC_LEAD]*(\\n[#NUM_ARGS]+1)) ) \{\ . ie \\n[#COLUMNS] \{ .COL_NEXT \} . el \{ .bp \} . \} @@ -7872,7 +8797,7 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . \} . \} -\# Print subhead +.\" Print subhead . if \\n[#PRINT_STYLE]=1 \{\ . while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\ . ie \\n[#NUMBER_SH] \{\ @@ -7900,7 +8825,7 @@ y\\R'#DESCENDER \\n[.cdp]' . UNDERSCORE "\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]] . br . \} -. \} +.\} . \} . if \\n[#PRINT_STYLE]=1 \{\ . if \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \} @@ -7933,7 +8858,7 @@ y\\R'#DESCENDER \\n[.cdp]' . PRINT "\\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]] . br . \} -. \} +.\} . \} . el \{\ . ALD \\n[#DOC_LEAD]u @@ -7942,7 +8867,7 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#EPIGRAPH] \{ .RLD \\n[#DOC_LEAD]u \} . while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\ . PRINT "\\$[\\n+[#ARG_NUM]] -. \} +.\} . ALD \\n[#DOC_LEAD]u . \} . \} @@ -7961,68 +8886,6 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# ---Paragraph heads--- \# -\# PARAHEAD FAMILY -\# --------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $PH_FAM. -\# *Notes: -\# Default is same as running text. -\# -.MAC PARAHEAD_FAMILY END -. ds $PH_FAM \\$1 -.END -\# -\# -\# PARAHEAD FONT -\# ------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $PH_FT. -\# *Notes: -\# Default is bold italic for TYPESET; underlined for TYPEWRITE. -\# -.MAC PARAHEAD_FONT END -. ds $PH_FT \\$1 -.END -\# -\# -\# PARAHEAD SIZE -\# ------------- -\# *Argument: -\# <+|- number of points by which to in/decrease point size of subheads -\# (relative to running text)> -\# *Function: -\# Creates or modifies string $PH_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a +|- sign. No space afterwards. -\# Fractional point sizes are allowed. No unit of measure, please. -\# Default is +.5 for printstyle TYPESET; +0 for TYPEWRITE. -\# -.MAC PARAHEAD_SIZE END -. ds $PH_SIZE_CHANGE \\$1 -.END -\# -\# -\# PARAHEAD COLOR -\# -------------- -\# *Arguments: -\# -\# *Function: -\# Defines string $PH_COLOR to argument. -\# *Notes: -\# User must define an XCOLOR or NEWCOLOR before using -\# PARAHEAD_COLOR. -\# -.MAC PARAHEAD_COLOR END -. if \\n[#PRINT_STYLE]=1 \{ .return \} -. nr #PH_COLOR 1 -. ds $PH_COLOR \\$1 -.END -\# -\# \# PARAHEAD INDENT \# --------------- \# *Argument: @@ -8048,7 +8911,7 @@ y\\R'#DESCENDER \\n[.cdp]' \# PARAHEAD *must* come after PP. \# .MAC PARAHEAD END -\# Collect parahead for TOC. +.\" Collect parahead for TOC. . nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ] . ie \\n[#NUMBER_PH] \{\ . ds $TOC_PH_ITEM \\n+[#PH_NUM].\0\\$1\\| @@ -8076,7 +8939,7 @@ y\\R'#DESCENDER \\n[.cdp]' . el \{\ \!. PAD "\\h'\\n[#TOC_PH_INDENT]u'\\*[$TOC_PH_ITEM]\\*[$TOC_PN]" . \} -\!. EL +\!. EOL \!. ST 100 L \!. ST 101 R . if \\n[#PRINT_STYLE]=2 \{\ @@ -8092,8 +8955,8 @@ y\\R'#DESCENDER \\n[.cdp]' \!. TQ . di . ev -\# End collection of parahead for TOC -\# Process parahead +.\" End collection of parahead for TOC +.\" Process parahead . if \\n[#SLANT_ON] \{\ . nr #SLANT_WAS_ON 1 \E*[SLANTX] @@ -8105,9 +8968,7 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . el \{ .ti \\n[#PH_INDENT]u \} . if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 +. TYPEWRITER . UNDERLINE OFF . ie \\n[#NUMBER_PH] \{\ . if \\n[#NUMBER_HEAD] \{\ @@ -8174,14 +9035,13 @@ y\\R'#DESCENDER \\n[.cdp]' . PRINT "\\$1\h'.6m'\c" . \} . \} -. FAMILY \\*[$DOC_FAM] -. FT \\*[$PP_FT] -. PT_SIZE \\n[#DOC_PT_SIZE]u -. if \\n[#PH_COLOR]=1 \m[]\c -. if \\n[#SLANT_WAS_ON] \{\ -. rr #SLANT_WAS_ON 1 +. FAMILY \\*[$DOC_FAM] +. FT \\*[$PP_FT] +. PT_SIZE \\n[#DOC_PT_SIZE]u +. if \\n[#PH_COLOR]=1 \m[]\c +. if \\n[#SLANT_WAS_ON] \{\ +. rr #SLANT_WAS_ON \E*[SLANT]\c -. \} . \} . rr #NUMBERED . rm $TOC_PH_ITEM @@ -8215,27 +9075,11 @@ y\\R'#DESCENDER \\n[.cdp]' . while \\$2>\\n[#REPEAT] \{\ . as $LINEBREAK_CHAR "\\ \\$1 . nr #REPEAT \\n[#REPEAT]+1 -. \} +.\} . rr #REPEAT .END \# \# -\# LINEBREAK COLOR -\# --------------- -\# *Arguments: -\# -\# *Function: -\# Defines string $LINEBREAK_COLOR to argument. -\# *Notes: -\# User must define an XCOLOR or NEWCOLOR before using -\# LINEBREAK_COLOR. -\# -.MAC LINEBREAK_COLOR END -. if \\n[#PRINT_STYLE]=1 \{ .return \} -. ds $LINEBREAK_COLOR \\$1 -.END -\# -\# \# LINE BREAK \# ---------- \# *Arguments: @@ -8379,7 +9223,7 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#DATE_FIRST]=1 \{ .ALD \\n[#DOC_LEAD]u \} . rr #DATE_FIRST . rm LETTERHEAD\\n[#FIELD] -. \} +.\} . rr #FIELD . rr #NUM_FIELDS . rr #TOTAL_FIELDS @@ -8403,9 +9247,7 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . if \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \} . ie \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 +. TYPEWRITER . ie \\n[#ENDNOTE] \{ .vs \\n[#EN_LEAD]u \} . el \{ .vs \\n[#DOC_LEAD]u \} . QUAD \\*[$DOC_QUAD] @@ -8455,9 +9297,20 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#PP_SPACE] \{\ . if \\n[#PRINT_STYLE]=2 \{\ . ie \\n[#END_QUOTE] \{\ +. ALD \\n[#DOC_LEAD]u . rr #END_QUOTE +. nr #NO_SPACE 1 +. nr #BASELINE_MARK \\n(nl +. \} +. el \{\ +. if \\n[#NO_SPACE]=1 \{\ +. rr #NO_SPACE +. \} +. if !\\n(nl=\\n[#BASELINE_MARK] \{\ +. ALD \\n[#DOC_LEAD]u +. rr #BASELINE_MARK +. \} . \} -. el \{ .ALD \\n[#DOC_LEAD]u \} . \} . \} . ie \\n[#INDENT_ACTIVE] \{ .ti \\n[#INDENT]u+\\n[#PP_INDENT]u \} @@ -8519,70 +9372,7 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# +++QUOTES+++ \# -\# ---Line for line (poetic) quotes--- -\# -\# QUOTE FAMILY -\# ------------ -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $QUOTE_FAM. -\# *Notes: -\# Default is same as running text. -\# -.MAC QUOTE_FAMILY END -. ds $QUOTE_FAM \\$1 -.END -\# -\# -\# QUOTE FONT -\# ---------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $QUOTE_FT. -\# *Notes: -\# Default is italic for TYPESET. -\# -.MAC QUOTE_FONT END -. ds $QUOTE_FT \\$1 -.END -\# -\# -\# QUOTE SIZE -\# ---------- -\# *Argument: -\# <-|+ number of points by which to de/increase point size of -\# line for line quotes (relative to running text)> -\# *Function: -\# Creates or modifies string $QUOTE_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a - or + sign with no space afterwards. -\# Fractional point sizes are allowed. -\# Default is +0. -\# -.MAC QUOTE_SIZE END -. ds $QUOTE_SIZE_CHANGE \\$1 -.END -\# -\# -\# QUOTE COLOR -\# ----------- -\# *Arguments: -\# -\# *Function: -\# Sets register #QUOTE_COLOR to 1; defines string $QUOTE_COLOR to -\# argument. -\# *Notes: -\# User must define an XCOLOR or NEWCOLOR before using -\# QUOTE_COLOR. -\# -.MAC QUOTE_COLOR END -. if \\n[#PRINT_STYLE]=1 \{ .return \} -. nr #QUOTE_COLOR 1 -. ds $QUOTE_COLOR \\$1 -.END -\# +\# ---Line for line quotes, i.e. poetry or code snippets--- \# \# UNDERLINE QUOTES \# ---------------- @@ -8615,6 +9405,24 @@ y\\R'#DESCENDER \\n[.cdp]' .END \# \# +\# QUOTE_AUTOLEAD +\# -------------- +\# *Arguments: +\# +\# *Function: +\# Sets autolead for quotes and/or blockquotes. +\# +.MAC QUOTE_AUTOLEAD END +. if '\\$0'QUOTE_AUTOLEAD' \{ .nr #Q_AUTOLEAD \\$1 \} +. if '\\$0'BLOCKQUOTE_AUTOLEAD' \{ .nr #BQ_AUTOLEAD \\$1 \} +. if '\\$0'ENDNOTE_QUOTE_AUTOLEAD' \{ .nr #EN_Q_AUTOLEAD \\$1 \} +. if '\\$0'ENDNOTE_BLOCKQUOTE_AUTOLEAD' \{ .nr #EN_BQ_AUTOLEAD \\$1 \} +.END +\# +.ALIAS BLOCKQUOTE_AUTOLEAD QUOTE_AUTOLEAD +.ALIAS ENDNOTE_QUOTE_AUTOLEAD QUOTE_AUTOLEAD +.ALIAS ENDNOTE_BLOCKQUOTE_AUTOLEAD QUOTE_AUTOLEAD +\# \# ALWAYS FULLSPACE QUOTES \# ----------------------- \# *Arguments: @@ -8644,22 +9452,32 @@ y\\R'#DESCENDER \\n[.cdp]' \# .MAC QUOTE END . br -\# **Uncomment the next line to prevent orphaned quote lines. -\#. ne 1 +. if \\n[#LINENUMBERS]=1 \{\ +. nr #LINENUMBERS 2 +. nr #NEXT_LN \\n(ln +. nm +. \} . ie '\\$1'' \{\ . ev QUOTE +. if \\n[#LINENUMBERS]=2 \{\ +. if \\n[#SILENT_QUOTE_LN]=1 \{ .nm \\n[#NEXT_LN] 1000 -4 \} +. \} +. nr #IN_DIVER 1 . nr #QUOTE 1 . di P_QUOTE . ll \\n[#L_LENGTH]u-(\\n[#PP_INDENT]u*\\n[#Q_OFFSET_VALUE]u) +. if \\n[#LINENUMBERS]=2 \{\ +. if \\n[#QUOTE_LN]=1 \{\ +. nm \\n(ln "" \\*[$Q_LN_GUTTER] -3-\\*[$Q_LN_GUTTER] +. \} +. \} . ta \\n(.lu . if \\n[#COLUMNS] \{\ . ll \\n[#COL_L_LENGTH]u-(\\n[#PP_INDENT]u*\\n[#Q_OFFSET_VALUE]u) . ta \\n(.lu . \} . if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 +. TYPEWRITER . vs \\n[#DOC_LEAD]u . LEFT . \} @@ -8667,12 +9485,34 @@ y\\R'#DESCENDER \\n[.cdp]' . FAMILY \\*[$QUOTE_FAM] . FT \\*[$QUOTE_FT] . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$QUOTE_SIZE_CHANGE] -. LS \\n[#DOC_LEAD]u +. ie !r#Q_AUTOLEAD \{ .LS \\n[#Q_LEAD]u \} +. el \{\ +. AUTOLEAD \\n[#Q_AUTOLEAD] +. nr #Q_LEAD \\n(.v +. \} +. if \\n[#ENDNOTE] \{\ +. PT_SIZE \\n[#EN_PS]u\\*[$QUOTE_SIZE_CHANGE] +. ie !r#EN_Q_AUTOLEAD \{ .LS \\n[#EN_Q_LEAD]u \} +. el \{\ +. AUTOLEAD \\n[#EN_Q_AUTOLEAD] +. nr #EN_Q_LEAD \\n(.v +. \} +. \} +. nr #Q_LEAD_REAL \\n(.v . LEFT . if \\n[#QUOTE_COLOR]=1 \{\ . nf \m[\\*[$QUOTE_COLOR]] -. EL +. EOL +. \} +. \} +. if \\n[#LINENUMBERS]=2 \{\ +. ie \\n[#QUOTE_LN]=1 \{\ +. if '\\*[$Q_LN_GUTTER]'' .ds $Q_LN_GUTTER \\*[$LN_GUTTER] +. nm \\n(ln "" \\*[$Q_LN_GUTTER] -3-\\*[$Q_LN_GUTTER] +. \} +. el \{\ +. if !\\n[#SILENT_QUOTE_LN] \{ .NUMBER_LINES OFF \} . \} . \} . nr #Q_TOP \\n(nl @@ -8685,105 +9525,36 @@ y\\R'#DESCENDER \\n[.cdp]' . el \{ .DO_QUOTE \} .END \# -\# \# ---Blockquotes--- \# -\# BLOCKQUOTE FAMILY -\# ----------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $BQUOTE_FAM. -\# *Notes: -\# Default is same as running text. -\# -.MAC BLOCKQUOTE_FAMILY END -. ds $BQUOTE_FAM \\$1 -.END -\# -\# -\# BLOCKQUOTE FONT -\# --------------- -\# *Argument: -\# +\# BLOCKQUOTE +\# ---------- +\# *Arguments: +\# | \# *Function: -\# Creates or modifies string $BQUOTE_FT. +\# Indents quoted text in fill mode and shortens line length +\# equivalently, or turns BLOCKQUOTE off. \# *Notes: -\# Default is same as running text. -\# -.MAC BLOCKQUOTE_FONT END -. ds $BQUOTE_FT \\$1 -.END -\# +\# Owing to the need to bottom align TYPESET pages, quoted text gets +\# diverted so its depth can be measured (in DO_QUOTE) for determining +\# how much space to put before and after. \# -\# BLOCKQUOTE SIZE -\# --------------- -\# *Argument: -\# <-|+ number of points by which to de/increase point size of blockquotes -\# (relative to running text)> -\# *Function: -\# Creates or modifies string $BQUOTE_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a - or + sign with no space afterwards. -\# Fractional point sizes are allowed. -\# Default is -1 for printstyle TYPESET; +0 for TYPEWRITE. -\# -.MAC BLOCKQUOTE_SIZE END -. ds $BQUOTE_SIZE_CHANGE \\$1 -.END -\# -\# -\# BLOCKQUOTE COLOR -\# ---------------- -\# *Arguments: -\# -\# *Function: -\# Sets register #BQUOTE_COLOR to 1; defines string -\# $BQUOTE_COLOR to argument. -\# *Notes: -\# User must define an XCOLOR or NEWCOLOR before using -\# BLOCKQUOTE_COLOR. -\# -.MAC BLOCKQUOTE_COLOR END -. if \\n[#PRINT_STYLE]=1 \{ .return \} -. nr #BQUOTE_COLOR 1 -. ds $BQUOTE_COLOR \\$1 -.END -\# -\# -\# BLOCKQUOTE QUAD -\# --------------- -\# *Arguments: -\# -\# *Function: -\# Creates or modifies string $BQUOTE_QUAD. -\# *Notes: -\# Default is LEFT. -\# -.MAC BLOCKQUOTE_QUAD END -. ds $BQUOTE_QUAD \\$1 -.END -\# -\# -\# BLOCKQUOTE -\# ---------- -\# *Arguments: -\# | -\# *Function: -\# Indents quoted text in fill mode and shortens line length -\# accordingly, or turns BLOCKQUOTE off. -\# *Notes: -\# Owing to the need to bottom align TYPESET pages, quoted text gets -\# diverted so its depth can be measured (in DO_QUOTE) for determining -\# how much space to put before and after. -\# -\# .PP after blockquote is optional if there's only one para, -\# but REQUIRED if there's more than one. +\# .PP after blockquote is optional if there's only one para, +\# but REQUIRED if there's more than one. \# .MAC BLOCKQUOTE END . br +. if \\n[#LINENUMBERS]=1 \{\ +. nr #LINENUMBERS 2 +. nr #NEXT_LN \\n(ln +. nm +. \} . ie '\\$1'' \{\ . ev BLOCKQUOTE +. if \\n[#LINENUMBERS]=2 \{\ +. if \\n[#SILENT_BQUOTE_LN]=1 \{ .nm \\n[#NEXT_LN] 1000 -4 \} +. \} +. nr #IN_DIVER 1 . nr #QUOTE 2 . nr #PP_STYLE 2 . nr #Q_PP 0 @@ -8812,10 +9583,8 @@ y\\R'#DESCENDER \\n[.cdp]' . ta \\n(.lu . \} . if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 -. vs \\n[#DOC_LEAD]u +. TYPEWRITER +. vs \\n[#DOC_LEAD]u . QUAD LEFT . HY OFF . \} @@ -8823,17 +9592,38 @@ y\\R'#DESCENDER \\n[.cdp]' . FAMILY \\*[$BQUOTE_FAM] . FT \\*[$BQUOTE_FT] . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$BQUOTE_SIZE_CHANGE] -. LS \\n[#DOC_LEAD]u +. ie !\\n[#BQ_AUTOLEAD] \{ .LS \\n[#BQ_LEAD]u \} +. el \{\ +. AUTOLEAD \\n[#BQ_AUTOLEAD] +. nr #BQ_LEAD \\n(.v +. \} . if \\n[#ENDNOTE] \{\ . PT_SIZE \\n[#EN_PS]u\\*[$BQUOTE_SIZE_CHANGE] +. ie !r#EN_BQ_AUTOLEAD \{ .LS \\n[#EN_BQ_LEAD]u \} +. el \{\ +. AUTOLEAD \\n[#EN_BQ_AUTOLEAD] +. nr #EN_BQ_LEAD \\n(.v +. \} . \} +. nr #Q_LEAD_REAL \\n(.v . if \\n[#BQUOTE_COLOR]=1 \{\ . nf \m[\\*[$BQUOTE_COLOR]] -. EL +. EOL . \} . QUAD \\*[$BQUOTE_QUAD] -. HY +. nr #DIVERSIONS_HY_MARGIN (p;\\n[.ps]u*2.75)/1000 +. HY_SET 1 \\n[#DIVERSIONS_HY_MARGIN]u (\\n[#PT_SIZE]u/1000u/8u)p +. hy 14 +. \} +. if \\n[#LINENUMBERS]=2 \{\ +. ie \\n[#BQUOTE_LN]=1 \{\ +. if '\\*[$BQ_LN_GUTTER]'' .ds $BQ_LN_GUTTER \\*[$LN_GUTTER] +. nm \\n(ln "" \\*[$BQ_LN_GUTTER] -3-\\*[$BQ_LN_GUTTER] +. \} +. el \{\ +. if !\\n[#SILENT_BQUOTE_LN] \{ .NUMBER_LINES OFF \} +. \} . \} . nr #Q_TOP \\n(nl . if \\n[#INDENT_FIRST_PARAS] \{\ @@ -8867,15 +9657,39 @@ y\\R'#DESCENDER \\n[.cdp]' \# line. (This is to ensure the page remains bottom aligned). \# .MAC DO_QUOTE END +. br +. if \\n[#DIVER_LN_OFF] \{\ +\!. NUMBER_LINES OFF +. rr #DIVER_LN_OFF +. \} . di +. rr #IN_DIVER +. if \\n[#RESET_FN_COUNTERS]=2 \{\ +. if !\\n[#FN_COUNT]=1 \{\ +. if ((\\n[#PAGE_LENGTH]+\\n[#VARIABLE_FOOTER_POS])+\\n[#DIVER_DEPTH])>(\\n[#PAGE_LENGTH]+\\n[#VARIABLE_FOOTER_POS]) \{\ +. DIVER_FN_2_POST +. rr #RESET_FN_COUNTERS +. \} +. \} +. \} +. nr #SAVED_FN_NUMBER \\n[#FN_NUMBER] +. nr #DONE_ONCE 0 1 . REMOVE_INDENT . ev -\# **Change *1 to *2 in next line to prevent orphans after quotes +. nr #Q_DEPTH (\\n[#DIVER_DEPTH]-\\n[#Q_LEAD_REAL])+\\n[#LEAD] +. nr #Q_LEAD_DIFF \\n[#LEAD]-\\n[#Q_LEAD_REAL] +. SILENT +. br +. nf +. nr #CURRENT_V_POS \\n(nl+\\n[#Q_LEAD_DIFF]+(\\n[#DIVER_DEPTH]-\\n[#Q_DEPTH_REAL]) +. SHIM +. SILENT OFF +. nr #Q_SPACE_ADJ \\n[#SHIM]/2 +. nr #TRAP \\n(.t-1 . if \\n[#ENDNOTE] \{\ . nr #RESET_QUOTE_SPACING \\n[#FULLSPACE_QUOTES] . ALWAYS_FULLSPACE_QUOTES . \} -. nr #Q_DEPTH \\n[#DIVER_DEPTH]+(\\n[#LEAD]*1) . if \\n[#PRINT_STYLE]=1 \{\ . if \\n[#START]=1 \{ . \} . if \\n[#START]=0 \{\ @@ -8894,36 +9708,16 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . \} . el \{\ -. ie \\n[#Q_DEPTH]<\\n[#TRAP_DISTANCE] \{\ -. nr #Q_FITS 1 -. ie \\n[#HEAD]=1 \{ . \} +. ie \\n[#Q_DEPTH]<(\\n[#TRAP_DISTANCE]-1) \{\ +. ie (\\n[#TRAP_DISTANCE]-1)-\\n[#Q_DEPTH]<\\n[#DOC_LEAD] \{\ +. Q_NOFIT +. \} . el \{\ -. ie \\n[#START] \{ . \} -. el \{\ -. ie \\n[#FULLSPACE_QUOTES] \{\ -. ie \\n[#ENDNOTE] \{\ -. ALD \\n[#EN_LEAD]u -. \} -. el \{ .ALD \\n[#DOC_LEAD]u \} -. \} -. el \{\ -. ie \\n[#ENDNOTE] \{\ -. ALD \\n[#EN_LEAD]u/2u -. \} -. el \{ .ALD \\n[#DOC_LEAD]u/2u \} -. \} -. \} +. Q_FITS . \} . \} . el \{\ -. rr #Q_FITS -. ie r#HEAD \{\ -. if \\n[#HEAD]=1 \{ . \} -. \} -. el \{\ -. ie \\n[#ENDNOTE] \{ .ALD \\n[#EN_LEAD]u \} -. el \{ .ALD \\n[#DOC_LEAD]u \} -. \} +. Q_NOFIT . \} . \} . \} @@ -8935,6 +9729,13 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#ENDNOTE] \{\ . in +\\n[#EN_PP_INDENT]u*\\n[#Q_OFFSET_VALUE]u . \} +. ie \\n[#START]=1 \{\ +. ie !\\n[#Q_LEAD_DIFF]<0 \{ .ALD \\n[#Q_SPACE_ADJ]u \} +. el \{ .RLD 0-\\n[#Q_LEAD_DIFF]u \} +. \} +. el \{\ +. ALD \\n[#Q_SPACE_ADJ]u +. \} . if \\n[#QUOTE]=1 \{\ . nf . P_QUOTE @@ -8949,32 +9750,57 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . if \\n[#PRINT_STYLE]=2 \{\ . ie \\n[#START] \{\ -. ie \\n[#PP_SPACE] \{ . \} -. el \{ .ALD \\n[#DOC_LEAD]u \} +. ie \\n[#PP_SPACE] \{\ +. +. \} +. el \{\ +. ALD \\n[#DOC_LEAD]u +. SHIM +. \} . \} . el \{\ . ie \\n[#PP_SPACE] \{ . \} . el \{\ -. ie \\n[#HEAD]=1 \{ .ALD \\n[#DOC_LEAD]u \} +. ie \\n[#HEAD]=1 \{\ +. ALD \\n[#DOC_LEAD]u +. SHIM +. \} . el \{\ +. ie \\n[#FULLSPACE_QUOTES] \{\ +. ie \\n[#ENDNOTE] \{ .ALD \\n[#EN_LEAD]u \} +. el \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. el \{ .ALD (\\n[#DOC_LEAD]u/2u) \} . ie \\n[#Q_FITS] \{\ . ie \\n[#Q_TOP]=\\n[#PAGE_TOP] \{\ . nr #Q_AT_TOP 1 -. ALD \\n[#DOC_LEAD]u +. nr #DELAY_SHIM 1 . \} -. el \{\ -. ie \\n[#FULLSPACE_QUOTES] \{ .ALD \\n[#DOC_LEAD]u \} -. el \{ .ALD \\n[#DOC_LEAD]u/2u \} +. el \{ .SHIM \} +. \} +. el \{\ +. SHIM +.\" Make sure that Q_LEAD_DIFF is not added to the first line of +.\" normal text at the top of any page following output of a quote +.\" whose last line falls on B_MARGIN of the previous page. +. if \\n(nl=(\\n[#T_MARGIN]-\\n[#DOC_LEAD]+\\n[#Q_LEAD_DIFF]) \{\ +. PRINT \& +. br +. sp -1v-\\n[#Q_LEAD_DIFF]u . \} . \} -. el \{ .ALD \\n[#DOC_LEAD]u \} . \} . \} . \} . \} +. if \\n[#LINENUMBERS]=2 \{\ +. nr #LINENUMBERS 1 +. ie \\n[#RESTORE_LN_NUM]=1 \{ .nm \\n[#NEXT_LN] \} +. el \{ .nm +0 \} +. \} . if \\n[#ENDNOTE] \{ .nr #FULLSPACE_QUOTES \\n[#RESET_QUOTE_SPACING] \} -. if r#HEAD \{ .rr #HEAD \} -. if r#EPIGRAPH \{ .rr #EPIGRAPH \} +. if r#HEAD \{ .rr #HEAD \} +. if r#EPIGRAPH \{ .rr #EPIGRAPH \} . rr #Q_PP . rr #LINEBREAK . nr #PP_STYLE 1 @@ -9006,6 +9832,88 @@ y\\R'#DESCENDER \\n[.cdp]' . ENDNOTE_PARA_INDENT \\n[#RESET_EN_PP_INDENT]u . QUAD \\*[EN_QUAD] . \} +. if r#DELAY_SHIM \{\ +. SHIM +. rr #DELAY_SHIM +. \} +.END +\# +\# +\# Utility macros for DO_QUOTE +\# --------------------------- +\# +.MAC Q_FITS END +. nr #Q_FITS 1 +. ie \\n[#HEAD]=1 \{\ +. ALD \\n[#Q_LEAD_DIFF]u +. \} +. el \{\ +. ie \\n[#START] \{ . \} +. el \{\ +. ie \\n[#FULLSPACE_QUOTES] \{\ +. ie \\n[#ENDNOTE] \{ .ALD \\n[#EN_LEAD]u+\\n[#Q_LEAD_DIFF]u \} +. el \{ .ALD \\n[#DOC_LEAD]u+\\n[#Q_LEAD_DIFF]u \} +. \} +. el \{\ +.\" This seems to be the only way to get the baseline of quotes that start +.\" at the top of the page to fall on the first line of the "grid" (i.e on +.\" the first legal baseline of the page). +. ie \\n[#Q_TOP]=\\n[#PAGE_TOP] \{\ +. if \\n[#QUOTE]=1 \{\ +. rn P_QUOTE Q_TEMP +. di P_QUOTE +. vs \\n[#Q_LEAD]u +. PRINT \& +. sp -1v+\\n[#Q_LEAD_DIFF]u +. Q_TEMP +. di +. \} +. if \\n[#QUOTE]=2 \{\ +. rn B_QUOTE Q_TEMP +. di B_QUOTE +. vs \\n[#BQ_LEAD]u +. PRINT \& +. sp -1v+\\n[#Q_LEAD_DIFF]u +. Q_TEMP +. di +. \} +. rm Q_TEMP +. \} +. el \{\ +. ALD (\\n[#DOC_LEAD]u/2u)+\\n[#Q_LEAD_DIFF]u +. \} +. \} +. \} +. if \\n[#DIVER_FN]=2 \{ .rr #DIVER_FN \} +. \} +.END +\# +.MAC Q_NOFIT END +. rr #Q_FITS +. ie r#HEAD \{\ +. if \\n[#HEAD]=1 \{ . \} +. \} +. el \{\ +. ie \\n[#FULLSPACE_QUOTES] \{\ +. ie \\n[#ENDNOTE] \{ .ALD \\n[#EN_LEAD]u+\\n[#Q_LEAD_DIFF]u \} +. el \{ .ALD \\n[#DOC_LEAD]u+\\n[#Q_LEAD_DIFF]u \} +. \} +. el \{ .ALD (\\n[#DOC_LEAD]u/2u)+\\n[#Q_LEAD_DIFF]u \} +. nr #Q_PARTIAL_DEPTH 0 \\n[#Q_LEAD_REAL] +. while \\n+[#Q_PARTIAL_DEPTH]<(\\n[#TRAP_DISTANCE]-1) \{\ +. +.\} +. nr #Q_PARTIAL_DEPTH -\\n[#Q_LEAD_REAL] +. nr #Q_SPACE_ADJ (\\n[#TRAP_DISTANCE]-1)-\\n[#Q_PARTIAL_DEPTH]+\\n[#Q_LEAD_DIFF]u +.\" Hack to deal with the fact that even though the above routine +.\" makes the bottom line of the quote fall exactly on the bottom +.\" margin when traps are disabled, it refuses to do so when traps +.\" are on. The difference by which it's off is #Q_LEAD_DIFF +.\" (the +\\n[#Q_LEAD_DIFF] at the end of the line, above). Hack +.\" solution: temporarily lower the FOOTER trap position. +. nr #SAVED_FOOTER_POS \\n[#VARIABLE_FOOTER_POS] +. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u+.25v +. \} .END \# \# ==================================================================== @@ -9059,7 +9967,6 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#QUOTE]=1 \{\ . nf . P_QUOTE -. if !\\n[#START] \{ .rr #QUOTE \} . \} . if \\n[#QUOTE]=2 \{\ . nf @@ -9135,67 +10042,6 @@ y\\R'#DESCENDER \\n[.cdp]' .END \# \# -\# PAGENUMBER FAMILY -\# ----------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $PAGE_NUM_FAM. -\# *Notes: -\# Default is same as running text. -\# -.MAC PAGENUM_FAMILY END -. ds $PAGE_NUM_FAM \\$1 -.END -\# -\# -\# PAGE NUMBER FONT -\# ---------------- -\# *Arguments: -\# -\# *Function: -\# Creates or modifies string $PAGE_NUM_FT. -\# *Notes: -\# Default is same as running text. -\# -.MAC PAGENUM_FONT END -. ds $PAGE_NUM_FT \\$1 -.END -\# -\# -\# PAGE NUMBER SIZE -\# ---------------- -\# *Argument: -\# <+|- number of points by which to in/decrease point size of -\# page numbers (relative to running text)> -\# *Function: -\# Creates or modifies string $PAGE_NUM_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a +|- sign with no space afterward. -\# Fractional point sizes are allowed. -\# Default is +0. -\# -.MAC PAGENUM_SIZE END -. ds $PAGE_NUM_SIZE_CHANGE \\$1 -.END -\# -\# -\# PAGNUMBER COLOR -\# --------------- -\# *Arguments: -\# -\# *Function: -\# Defines string $PAGENUM_COLOR to argument. -\# *Notes: -\# User must define an XCOLOR or NEWCOLOR before using -\# PAGENUM_COLOR. -\# -.MAC PAGENUM_COLOR END -. if \\n[#PRINT_STYLE]=1 \{ .return \} -. ds $PAGENUM_COLOR \\$1 -.END -\# -\# \# PAGE NUMBER FORMAT \# ------------------ \# *Arguments: @@ -9270,6 +10116,7 @@ y\\R'#DESCENDER \\n[.cdp]' . nr #HYPHEN_ADJ \\n[#CAP_HEIGHT]/12 . ds $HYPHEN \v'-\En[#HYPHEN_ADJ]u'-\v'\En[#HYPHEN_ADJ]u' . PRINT \m[\\*[$PAGENUM_COLOR]]\\*[$HYPHEN]\|\\n[#PAGENUMBER]\|\\*[$HYPHEN] +.br .END \# \# @@ -9291,11 +10138,9 @@ y\\R'#DESCENDER \\n[.cdp]' . FT \\*[$PAGE_NUM_FT] . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$PAGE_NUM_SIZE_CHANGE] . if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 +. TYPEWRITER . \} -. if \\n[#PAGE_NUM_V_POS]=1 \{ .EL \} +. if \\n[#PAGE_NUM_V_POS]=1 \{ .vs 0 \} . if o \{\ . ie \\n[#PAGE_NUM_H_POS]=1 \{ .LEFT \} . el \{ .RIGHT \} @@ -9315,6 +10160,10 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#EN_FIRST_PN] \{ .PAGENUMBER \\n[#EN_FIRST_PN] \} . rr #EN_FIRST_PAGE . \} +. if \\n[#BIB_FIRST_PAGE] \{\ +. if \\n[#BIB_FIRST_PN] \{ .PAGENUMBER \\n[#BIB_FIRST_PN] \} +. rr #BIB_FIRST_PAGE +. \} . if \\n[#TOC_FIRST_PAGE] \{\ . PAGENUMBER 1 . rr #TOC_FIRST_PAGE @@ -9368,68 +10217,14 @@ E\\R'#CAP_HEIGHT \\n[.cht]' \# \# +++FOOTNOTES+++ \# -\# FOOTNOTE FAMILY -\# -------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $FN_FAM. -\# *Notes: -\# Default is same as running text. -\# -.MAC FOOTNOTE_FAMILY END -. ds $FN_FAM \\$1 -.END -\# -\# -\# FOOTNOTE FONT -\# -------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $FN_FT. -\# *Notes: -\# Default is roman. -\# -.MAC FOOTNOTE_FONT END -. ds $FN_FT \\$1 -.END -\# -\# -\# FOOTNOTE SIZE -\# ------------ -\# *Argument: -\# <+|- number of points by which to in/decrease point size of footnotes -\# (relative to running text)> -\# *Function: -\# Creates or modifies string $FN_SIZE_CHANGE. -\# *Notes: -\# Must be preceded by a +|- sign. No space afterwards. -\# Fractional point sizes are allowed. -\# Default is -2 for printstyle TYPESET; +0 for TYPEWRITE. -\# -.MAC FOOTNOTE_SIZE END -. ds $FN_SIZE_CHANGE \\$1 -.END -\# -\# -\# FOOTNOTE COLOR -\# -------------- -\# *Arguments: -\# -\# *Function: -\# Sets register #FOOTNOTE_COLOR to 1; defines string -\# $FOOTNOTE_COLOR to argument. -\# *Notes: -\# User must define an XCOLOR or NEWCOLOR before using -\# FOOTNOTE_COLOR. -\# -.MAC FOOTNOTE_COLOR END -. if \\n[#PRINT_STYLE]=1 \{ .return \} -. nr #FOOTNOTE_COLOR 1 -. ds $FOOTNOTE_COLOR \\$1 -.END -\# +.ig +Mom's footnote handling is baroque, to say the least. There are +redundancies in a number of the macros involved, as well as some +registers that probably don't get used anymore. The baggage is left +in in case some new footnote oddity/challenge gets thrown my way. + +The macros are heavily commented. +.. \# \# FOOTNOTE AUTOLEAD \# ----------------- @@ -9445,20 +10240,6 @@ E\\R'#CAP_HEIGHT \\n[.cht]' .END \# \# -\# FOOTNOTE QUAD -\# ------------- -\# *Arguments: -\# -\# *Function: -\# Creates or modifies string $FN_QUAD. -\# *Notes: -\# Default is same as running text. -\# -.MAC FOOTNOTE_QUAD END -. ds $FN_QUAD \\$1 -.END -\# -\# \# FOOTNOTE MARKERS \# ---------------- \# *Arguments: @@ -9477,23 +10258,129 @@ E\\R'#CAP_HEIGHT \\n[.cht]' \# FOOTNOTE MARKER STYLE \# --------------------- \# *Arguments: -\# STAR | NUMBER +\# STAR | NUMBER | LINE \# *Function: \# Sets register #FN_MARKER_STYLE, used in FOOTNOTE to determine \# the style of footnote markers. \# *Notes: -\# 1=STAR; 2=NUMBER. Default is STAR. +\# 1=STAR; 2=NUMBER; 3=LINE. LINE means "use output line numbers". +\# Default is STAR. \# .MAC FOOTNOTE_MARKER_STYLE END . if '\\$1'STAR' \{\ +. if \\n[#FN_MARKER_STYLE]=3 \{\ +. if !\\n[#NEWPAGE]=1 \{\ +. tm1 "[mom]: Your current FOOTNOTE_MARKER STYLE is LINE. +. tm1 " You cannot change footnote marker style without +. tm1 " first breaking to a new page with NEWPAGE. +. tm1 " Ignoring request FOOTNOTE_MARKER_STYLE STAR at line \\n(.c. +. return +. \} +. \} +. if \\n[#RUN_ON]=1 \{\ +. tm1 "[mom]: FOOTNOTE_MARKER_STYLE STAR at line \\n(.c is incompatible +. tm1 " with RUN_ON footnotes. Ignoring request. +. return +. \} . nr #FN_MARKER_STYLE 1 +. if \\n[#NEWPAGE]=1 \{ .rr #NEWPAGE \} +. FOOTNOTE_MARKERS . \} . if '\\$1'NUMBER' \{\ +. if \\n[#FN_MARKER_STYLE]=3 \{\ +. if !\\n[#NEWPAGE]=1 \{\ +. tm1 "[mom]: Your current FOOTNOTE_MARKER STYLE is NUMBER. +. tm1 " You cannot change footnote marker style without +. tm1 " first breaking to a new page with NEWPAGE. +. tm1 " Ignoring request FOOTNOTE_MARKER_STYLE NUMBER at line \\n(.c. +. return +. \} +. \} +. if \\n[#RUN_ON]=1 \{\ +. tm1 "[mom]: FOOTNOTE_MARKER_STYLE NUMBER at line \\n(.c is incompatible +. tm1 " with RUN_ON footnotes. Ignoring request. +. return +. \} . nr #FN_MARKER_STYLE 2 +. if \\n[#NEWPAGE]=1 \{ .rr #NEWPAGE \} +. FOOTNOTE_MARKERS +. \} +. if '\\$1'LINE' \{\ +. nr #FN_MARKER_STYLE 3 +. FOOTNOTE_MARKERS OFF +. if !\\n[#FN_LN_SEP] \{\ +. if !\\n[#FN_LN_BRACKETS] \{ .FOOTNOTE_LINENUMBER_BRACKETS SQUARE \} +. \} . \} .END \# \# +\# FOOTNOTE LINENUMBER MARK +\# ------------------------ +\# *Function: +\# This string, when called inline, stores the current output line +\# number in register #FN_MARK for use with FOOTNOTE. +\# +.ds FN-MARK \R'#FN_MARK \En(ln' +\# +\# +\# FOOTNOTE LINENUMBER SEPARATOR +\# ----------------------------- +\# *Argument: +\# +\# *Function: +\# Stores user-defined separator (for use then +\# FOOTNOTE_MARKER_STYLE is LINE) in string $FN_LN_SEP. The +\# separator is intended to be used when the user wishes a +\# separator, rather than the choice of brackets offered by +\# FOOTNOTE_LINENUMBER_BRACKETS. +\# +.MAC FOOTNOTE_LINENUMBER_SEPARATOR END +. rr #FN_LN_BRACKETS +. nr #FN_LN_SEP 1 +. ds $FN_LN_SEP "\\$1 +.END +\# +\# +\# FOOTNOTE LINENUMBER BRACKETS +\# ---------------------------- +\# *Argument: +\# PARENS | SQUARE | BRACES or ( | [ | { +\# *Function: +\# Sets register #FN_LN_BRACKETS to 1, and creates strings +\# $FN_OPEN_BRACKET and $FN_CLOSE_BRACKET according to the given +\# argument. +\# +.MAC FOOTNOTE_LINENUMBER_BRACKETS END +. rr #FN_LN_SEP +. nr #FN_LN_BRACKETS 1 +. if '\\$1'PARENS' \{\ +. ds $FN_OPEN_BRACKET ( +. ds $FN_CLOSE_BRACKET ) +. \} +. if '\\$1'(' \{\ +. ds $FN_OPEN_BRACKET ( +. ds $FN_CLOSE_BRACKET ) +. \} +. if '\\$1'SQUARE' \{\ +. ds $FN_OPEN_BRACKET [ +. ds $FN_CLOSE_BRACKET ] +. \} +. if '\\$1'[' \{\ +. ds $FN_OPEN_BRACKET [ +. ds $FN_CLOSE_BRACKET ] +. \} +. if '\\$1'BRACES' \{\ +. ds $FN_OPEN_BRACKET { +. ds $FN_CLOSE_BRACKET } +. \} +. if '\\$1'{' \{\ +. ds $FN_OPEN_BRACKET { +. ds $FN_CLOSE_BRACKET } +. \} +.END +\# +\# \# RESET FOOTNOTE NUMBER \# --------------------- \# *Arguments: @@ -9556,10 +10443,10 @@ E\\R'#CAP_HEIGHT \\n[.cht]' .MAC FOOTNOTE_RULE END . ie '\\$0'PRINT_FOOTNOTE_RULE' \{\ . if \\n[#FN_RULE]=0 \{ .RLD 1v \} -\!. PT_SIZE 12 \"Not sure why these have to be transparently embedded, but they do. +\!. PT_SIZE 12 . RLD 1v . LEFT -. PRINT \\v'-\\n[#FN_RULE_ADJ]u'\\l'\\n[#FN_RULE_LENGTH]u'\\v'+\\n[#FN_RULE_ADJ]u' +. PRINT \v'-\\n[#FN_RULE_ADJ]u'\l'\\n[#FN_RULE_LENGTH]u'\v'+\\n[#FN_RULE_ADJ]u' \!. PT_SIZE \\n[#DOC_PT_SIZE]u\\*$[FN_SIZE_CHANGE] . QUAD \\*[$FN_QUAD] . \} @@ -9570,77 +10457,281 @@ E\\R'#CAP_HEIGHT \\n[.cht]' .END \# \# -\# FOOTNOTE -\# -------- +\# FOOTNOTE SPACING +\# ---------------- \# *Arguments: -\# | INDENT L|LEFT|R|RIGHT|B|BOTH > | +\# | \# *Function: -\# Begins collecting and diverting footnote text if no argument -\# given. Otherwise, ends diversion FOOTNOTES, measures footnote -\# depth, and sets footnote trap. +\# Enables printing of post footnote spacing. \# *Notes: -\# The input line preceding a footnote call MUST terminate with \c -\# or the footnote marker will be spaced away from the word it -\# should be joined to. +\# Default is no space. \# -\# If FOOTNOTES is invoked with INDENT, the footnote will -\# be indented. An indent style and an indent value must be given. -\# Subsequent footnotes will NOT be indented; INDENT must be given -\# for each footnote the user wants indented. +.MAC FOOTNOTE_SPACING END +. ie \B'\\$1' \{ .nr #FN_SPACE (\\$1) \} +. el \{ .nr #FN_SPACE 0 \} +.END \# -.MAC FOOTNOTE END -. ie '\\$1'' \{\ -. if \\n[#FN_MARKERS] \{\ -. if \\n[#CONDENSE] \{ \*[CONDX]\c \} -. if \\n[#EXTEND] \{ \*[EXTX]\c \} +\# +\# RUN ON FOOTNOTES +\# ---------------- +\# *Arguments: +\# | +\# *Function: +\# Toggles run-on footnotes on or off. +\# +.MAC FOOTNOTES_RUN_ON END +. ie '\\$1'' \{\ +. if \\n[#FN_COUNT]>0 \{\ +. tm1 "[mom]: Switching to run-on footnotes at line \\n(.c will cause +. tm1 " you to loose footnotes already formatted for this page. +. tm1 " Ignoring request FOOTNOTES_RUN_ON. +. rr #RUN_ON +. return +. \} +. nr #RUN_ON 1 +. if \\n[#FN_MARKER_STYLE]=1 \{ .RUNON_WARNING \} +. if \\n[#FN_MARKER_STYLE]=2 \{ .RUNON_WARNING \} +. \} +. el \{\ +. if \\n[#FN_COUNT]>0 \{\ +. if \\n[#RUN_ON]=1 \{\ +. tm1 "[mom]: Switching off run-on footnotes at line \\n(.c will cause +. tm1 " you to loose footnotes already formatted for this page. +. tm1 " Ignoring request FOOTNOTES_RUN_ON \\$1. +. return +. \} +. \} +. rr #RUN_ON +. \} +.END +\# +\# +.MAC RUNON_WARNING END +. if \\n[#FN_MARKER_STYLE]=1 \{\ +. tm1 "[mom]: The footnote marker style active at line \\n(.c is STAR, +. tm1 " which is incompatible with run-on footnotes. Please change +. tm1 " the footnote marker style to LINE. Continuing to process, +. tm1 " but ignoring request FOOTNOTES_RUN_ON. +. rr #RUN_ON +. \} +. if \\n[#FN_MARKER_STYLE]=2 \{\ +. tm1 "[mom]: The footnote marker style active at line \\n(.c is NUMBER, +. tm1 " which is incompatible with run-on footnotes. Please change +. tm1 " the footnote marker style to LINE. Continuing to process, +. tm1 " but ignoring request FOOTNOTES_RUN_ON. +. rr #RUN_ON +. \} +.END +\# +\# FOOTNOTE +\# -------- +\# *Arguments: +\# | INDENT L|LEFT|R|RIGHT|B|BOTH | +\# *Function: +\# Begins collecting and diverting footnote text if no argument +\# given. Otherwise, ends diversion FOOTNOTES, measures footnote +\# depth, and sets footnote trap. +\# *Notes: +\# The input line preceding a footnote call MUST terminate with \c +\# or the footnote marker will be spaced away from the word it +\# should be joined to. +\# +\# If FOOTNOTE is invoked with INDENT, the footnote will +\# be indented. An indent style and an indent value must be given. +\# Subsequent footnotes will NOT be indented; INDENT must be given +\# for each footnote the user wants indented. +\# +.MAC FOOTNOTE END +. if !\\n(.u \{ .nr #ADD_BREAK 1 \} +. ie '\\$1'' \{\ +. if \\n[#FN_MARKER_STYLE]=3 \{\ +. if !\\n[#LINENUMBERS] \{\ +. tm1 "[mom]: Line numbering must be enabled with NUMBER_LINES when +. tm1 " FOOTNOTE_MARKER_STYLE is LINE. +. ab Aborting on FOOTNOTE at line \\n(.c. +. \} +. if \\n[#FN_MARK]=0 \{ .nr #FN_MARK \\n(ln \} +. nr #FN_MARK_2 \\n(ln +. if '\\n(.z'P_QUOTE' \{\ +. nr #FN_MARK -1 +. nr #FN_MARK_2 -1 +. \} +. if \\n[#IN_DIVER]=1 \{\ +. if '\\n(.z'P_QUOTE' \{\ +. if !\\n[#QUOTE_LN]=1 \{\ +. if !\\n[#SILENT_QUOTE_LN]=1 \{\ +. tm1 "[mom]: You have requested a line-numbered footnote inside a +. tm1 " QUOTE at line \\n(.c, but line-numbering has not been enabled +. tm1 " for QUOTES. Printing footnote with label "0". +. rr #FN_MARK +. rr #FN_MARK_2 +. \} +. \} +. \} +. if '\\n(.z'B_QUOTE' \{\ +. if !\\n[#BQUOTE_LN]=1 \{\ +. if !\\n[#SILENT_BQUOTE_LN]=1 \{\ +. tm1 "[mom]: You have requested a line-numbered footnote inside a +. tm1 " BLOCKQUOTE at line \\n(.c, but line-numbering has not been enabled +. tm1 " for BLOCKQUOTES. Printing footnote with label "0". +. rr #FN_MARK +. rr #FN_MARK_2 +. \} +. \} +. \} +. \} +. \} +.\" Begin processing footnotes that occur inside QUOTE, BLOCKQUOTE +.\" or EPIGRAPH. +. if \\n[#IN_DIVER]=1 \{\ +. nr #PAGE_POS \\n(nl+\\n(.d+\\n[#DOC_LEAD] +. nr #FOOTER_POS \\n[#PAGE_LENGTH]+(\\n[#VARIABLE_FOOTER_POS]-1) +. nr #SPACE_TO_FOOTER \\n[#FOOTER_POS]-\\n[#PAGE_POS] +.\" Are we on a "defer" line? If so, defer the text of the footnote. +. ie \\n[#SPACE_TO_FOOTER]=\\n[#DOC_LEAD]:\\n[#SPACE_TO_FOOTER]=0 \{\ +. nr #DIVER_FN 2 \" treat like a normal deferred footnote +. \} +. el \{\ +. nr #DIVER_FN 2 \" treat like a normal footnote +. \} +. if \\n[#PAGE_POS]>\\n[#FOOTER_POS] \{\ +. nr #DIVER_FN 1 \" move this footnote +. \} +.\" Test for situation where, because a final line of QUOTE, BLOCKQUOTE +.\" or EPIGRAPH isn't yet adjusted at this point, the last word on the +.\" line may *seem* to belong to the final line of the page, but will, +.\" in fact, become the first word of the subsequent page. In such +.\" circumstances, we want the the footnote to be treated as a "moved" +.\" diversion footnote. +. if \\n(.k>\\n(.l \{ .nr #DIVER_FN 1 \} +. if r#DIVER_FN \{\ +. if !\\n[#DIVER_FN]=2 \{ .\\n+[#DONE_ONCE] \} +.\" A footnote inside a diversion will become the 1st footnote on the +.\" following page/column. +. if \\n[#DIVER_FN]=1 \{ .DIVER_FN_1_PRE \} +.\" A footnote inside a diversion that should be treated like a +.\" normal footnote (including defers.) +. if \\n[#DIVER_FN]=2 \{ .DIVER_FN_2_PRE \} +. \} +. nr #SAVED_FN_COUNT \\n[#FN_COUNT]+1 +. nr #SAVED_FN_COUNT_FOR_COLS \\n[#FN_COUNT_FOR_COLS]+1 +. \} +.\" End processing footnotes that occur inside QUOTE, BLOCKQUOTE or +.\" EPIGRAPH. +.\" +.\" Test for situation where, because a final line of running text +.\" isn't yet adjusted at this point, the last word on the line may +.\" *seem* to belong to the final line of the page, but will, in +.\" fact, become the first word of the subsequent page. In such +.\" circumstances, we want the the footnote marker in running text to +.\" be the correct one for the 1st footnote on the page. +. if \\n(.k>\\n(.l \{\ +. if (\\n(nl+\\n[#DOC_LEAD])>(\\n[#PAGE_LENGTH]+\\n[#VARIABLE_FOOTER_POS]) \{\ +. ie \\n[#COLUMNS]=1 \{\ +. if \\n[#COL_NUM]=\\n[#NUM_COLS] \{\ +. if \\n[#FN_MARKER_STYLE]=1 \{\ +. nr #FN_COUNT_FOR_COLS 0 1 +. \} +. if \\n[#FN_MARKER_STYLE]=2 \{\ +. if \\n[#RESET_FN_NUMBER] \{\ +. nr #FN_NUMBER 0 1 +. nr #NOT_YET_ADJUSTED 1 +. \} +. \} +. \} +. \} +. el \{\ +. if \\n[#FN_MARKER_STYLE]=1 \{\ +. nr #FN_COUNT 0 1 +. \} +. if \\n[#FN_MARKER_STYLE]=2 \{\ +. if \\n[#RESET_FN_NUMBER] \{\ +. nr #FN_NUMBER 0 1 +. nr #NOT_YET_ADJUSTED 1 +. \} +. \} +. \} +. \} +. \} +. if \\n[#FN_MARKERS] \{\ +.\" Housekeeping +. if \\n[#CONDENSE] \{ \*[CONDX]\c \} +. if \\n[#EXTEND] \{ \*[EXTX]\c \} . if \\n[#PRINT_STYLE]=1 \{\ . if \\n[#UNDERLINE_ON] \{\ . nr #UNDERLINE_WAS_ON 1 . UNDERLINE OFF . \} . \} +.\" Add footnote markers to running text... . if !\\n[#NO_FN_MARKER] \{\ -. if \\n[#FN_MARKER_STYLE]=1 \{\ -. ie \\n[#FN_COUNT_FOR_COLS] \{\ -. if \\n[#FN_COUNT_FOR_COLS]=0 \{ .PRINT \*[BU3]* \} -. if \\n[#FN_COUNT_FOR_COLS]=1 \{ .PRINT \*[BU3]\(dg \} -. if \\n[#FN_COUNT_FOR_COLS]=2 \{ .PRINT \*[BU3]** \} -. if \\n[#FN_COUNT_FOR_COLS]=3 \{ .PRINT \*[BU3]\(dg\(dg \} -. if \\n[#FN_COUNT_FOR_COLS]=4 \{ .PRINT \*[BU3]*** \} -. if \\n[#FN_COUNT_FOR_COLS]=5 \{ .PRINT \*[BU3]\(dg\(dg\(dg \} -. if \\n[#FN_COUNT_FOR_COLS]=6 \{ .PRINT \*[BU3]**** \} -. if \\n[#FN_COUNT_FOR_COLS]=7 \{ .PRINT \*[BU3]\(dg\(dg\(dg\(dg \} -. if \\n[#FN_COUNT_FOR_COLS]=8 \{ .PRINT \*[BU3]***** \} -. if \\n[#FN_COUNT_FOR_COLS]=9 \{ .PRINT \*[BU3]\(dg\(dg\(dg\(dg\(dg \} +.\" ...but not if TERMINATE has not been called +. if !r#TERMINATE \{\ +.\" Marker style star/dagger/double-dagger +. if \\n[#FN_MARKER_STYLE]=1 \{\ +.\" Columnar docs either move col to col, or last col to next page. +.\" They require their own special FN_COUNT because regular FN_COUNT +.\" is used to figure out things like whether or not to put a rule +.\" above footnotes (in addition to keeping track of the footnote +.\" count in non-columnar docs). +. ie \\n[#COLUMNS]=1 \{\ +. if \\n[#FN_COUNT_FOR_COLS]=0 \{ .PRINT \*[BU2]*\c \} +. if \\n[#FN_COUNT_FOR_COLS]=1 \{ .PRINT \*[BU1]\(dg\c \} +. if \\n[#FN_COUNT_FOR_COLS]=2 \{ .PRINT \(dd\c \} +. if \\n[#FN_COUNT_FOR_COLS]=3 \{ .PRINT \*[BU2]**\c \} +. if \\n[#FN_COUNT_FOR_COLS]=4 \{ .PRINT \*[BU1]\(dg\(dg\c \} +. if \\n[#FN_COUNT_FOR_COLS]=5 \{ .PRINT \(dd\(dd\c \} +. if \\n[#FN_COUNT_FOR_COLS]=6 \{ .PRINT \*[BU2]***\c \} +. if \\n[#FN_COUNT_FOR_COLS]=7 \{ .PRINT \*[BU1]\(dg\(dg\(dg\c \} +. if \\n[#FN_COUNT_FOR_COLS]=8 \{ .PRINT \(dd\(dd\(dd\c \} +. if \\n[#FN_COUNT_FOR_COLS]=9 \{ .PRINT \*[BU2]****\c \} +. \} +. el \{\ +. if \\n[#FN_COUNT]=0 \{ .PRINT \*[BU2]*\c \} +. if \\n[#FN_COUNT]=1 \{ .PRINT \*[BU1]\(dg\c \} +. if \\n[#FN_COUNT]=2 \{ .PRINT \(dd\c \} +. if \\n[#FN_COUNT]=3 \{ .PRINT \*[BU2]**\c \} +. if \\n[#FN_COUNT]=4 \{ .PRINT \*[BU1]\(dg\(dg\c \} +. if \\n[#FN_COUNT]=5 \{ .PRINT \(dd\(dd\c \} +. if \\n[#FN_COUNT]=6 \{ .PRINT \*[BU2]***\c \} +. if \\n[#FN_COUNT]=7 \{ .PRINT \*[BU1]\(dg\(dg\(dg\c \} +. if \\n[#FN_COUNT]=8 \{ .PRINT \(dd\(dd\(dd\c \} +. if \\n[#FN_COUNT]=9 \{ .PRINT \*[BU2]****\c \} +. \} . \} -. el \{\ -. if \\n[#FN_COUNT]=0 \{ .PRINT \*[BU3]* \} -. if \\n[#FN_COUNT]=1 \{ .PRINT \*[BU3]\(dg \} -. if \\n[#FN_COUNT]=2 \{ .PRINT \*[BU3]** \} -. if \\n[#FN_COUNT]=3 \{ .PRINT \*[BU3]\(dg\(dg \} -. if \\n[#FN_COUNT]=4 \{ .PRINT \*[BU3]*** \} -. if \\n[#FN_COUNT]=5 \{ .PRINT \*[BU3]\(dg\(dg\(dg \} -. if \\n[#FN_COUNT]=6 \{ .PRINT \*[BU3]**** \} -. if \\n[#FN_COUNT]=7 \{ .PRINT \*[BU3]\(dg\(dg\(dg\(dg \} -. if \\n[#FN_COUNT]=8 \{ .PRINT \*[BU3]***** \} -. if \\n[#FN_COUNT]=9 \{ .PRINT \*[BU3]\(dg\(dg\(dg\(dg\(dg\(dg \} +.\" Marker style superscript numbers +. if \\n[#FN_MARKER_STYLE]=2 \{\ +. if \\n[#PRINT_STYLE]=1 \{ .PRINT "\s-2\v'-\\n[#DOC_LEAD]u/5u'\\n+[#FN_NUMBER]\v'+\\n[#DOC_LEAD]u/5u'\s+2\c" \} +. if \\n[#PRINT_STYLE]=2 \{ .PRINT "\*[SUP]\\n+[#FN_NUMBER]\*[SUPX]\c" \} . \} . \} -. if \\n[#FN_MARKER_STYLE]=2 \{\ -. if \\n[#PRINT_STYLE]=1 \{ .PRINT "\s-2\v'-\\n[#DOC_LEAD]u/5u'\\n+[#FN_NUMBER]\v'+\\n[#DOC_LEAD]u/5u'\s+2" \} -. if \\n[#PRINT_STYLE]=2 \{ .PRINT "\*[SUP]\\n+[#FN_NUMBER]\*[SUPX]" \} -. \} . \} . \} -. nr #SPACE_REMAINING \\n[#PAGE_LENGTH]-\\n[#B_MARGIN]-(\\n(nl+1v) +.\" More housekeeping +.\" +.\" #SPACE_REMAINING is the space left between where we are +.\" on the page and the bottom margin. It's used to determine whether +.\" or not the footnote will overflow, and how many lines of +.\" footnotes will fit on the page if some have to overflow. +. ie \\n[#DIVER_FN]=2 \{\ +. nr #SPACE_REMAINING (\\n[#PAGE_LENGTH]-\\n[#B_MARGIN])-(\\n[#PAGE_POS]) +. \} +. el \{\ +. nr #SPACE_REMAINING (\\n[#PAGE_LENGTH]-\\n[#B_MARGIN])-\\n(nl +. \} +. if \\n[#FROM_DIVERT_FN]=1 \{\ +. nr #SPACE_REMAINING \\n[#PAGE_LENGTH]-\\n[#B_MARGIN] +. rr #FROM_DIVERT_FN +. \} . nr #PP_STYLE_PREV \\n[#PP_STYLE] . nr #PP_STYLE 2 . if \\n[#INDENT_FIRST_PARAS] \{ .nr #INDENT_FIRSTS 1 \} . INDENT_FIRST_PARAS +.\" Prepare FOOTNOTE to receive footnote text. . ev FOOTNOTES . ll \\n[#DOC_L_LENGTH]u . ta \\n(.lu -. if \\n[#COLUMNS] \{\ +. if \\n[#COLUMNS]=1 \{\ . ll \\n[#COL_L_LENGTH]u . ta \\n(.lu . \} @@ -9658,72 +10749,193 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . AUTOLEAD \\n[#FN_AUTOLEAD] . QUAD \\*[$FN_QUAD] . if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 -. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u \} -. el \{ .vs \\n[#DOC_LEAD]u/2u \} +. TYPEWRITER +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#ORIGINAL_DOC_LEAD]u \} +. el \{ .vs \\n[#ORIGINAL_DOC_LEAD]u/2u \} . QUAD LEFT . HY OFF . \} . nr #FN_LEAD \\n[#LEAD] -. da FOOTNOTES -. if \\n[#FOOTNOTE_COLOR]=1 \{\ -. TRAP OFF -. nf -\m[\\*[$FOOTNOTE_COLOR]] -. EL -. fi -. TRAP +.\" Begin diversion FOOTNOTES or FN_IN_DIVER +. ie r#COUNTERS_RESET \{\ +. ie \\n[#DONE_ONCE]=1 \{\ +. ie \\n[#RUN_ON] \{\ +. di RUNON_FN_IN_DIVER +. nr #RUNON_FN_IN_DIVER 1 +. \} +. el \{ .di FN_IN_DIVER \} +. \} +. el \{\ +. ie \\n[#RUN_ON] \{\ +. da RUNON_FN_IN_DIVER +. nr #RUNON_FN_IN_DIVER 1 +. \} +. el \{ .da FN_IN_DIVER \} +. \} +. \\n+[#DONE_ONCE] +. \} +. el \{\ +. ie \\n[#RUN_ON] \{\ +. da RUNON_FOOTNOTES +. nr #RUNON_FOOTNOTES 1 . \} +. el \{ .da FOOTNOTES \} +. \} +. if \\n[#FOOTNOTE_COLOR]=1 \{\ +. TRAP OFF +. nf +\m[\\*[$FOOTNOTE_COLOR]] +. EOL +. fi +. TRAP +. \} . if \\n[#EPIGRAPH] \{ .nr #FN_FOR_EPI 1 \} +.\" When a deferred footnote is also the 1st footnote on the page, +.\" and when the page it's output on also has footnotes, some +.\" whitespace is needed between the deferred footnote and the +.\" first footnote belonging to the output page so that there's +.\" no confusion when two stars (or two number 1s) appear in +.\" footnotes... . if \\n[#FN_DEFER_SPACE] \{\ -. if \\n[#FN_MARKER_STYLE]=1 \{ .ALD 1v \} -. if \\n[#RESET_FN_NUMBER] \{ .ALD 1v \} +.\" ...but only add the extra space if TERMINATE has not been called +. if !r#TERMINATE \{\ +.\" ...and not if defer space has already been added +. if !\\n[#DEFER_SPACE_ADDED] \{\ +.\" ...and not if the footnote count the last time we checked for +.\" a defer situation inside a diversion is greater than 1. +. if !\\n[#SAVED_DIVER_FN_COUNT]>1 \{\ +. if \\n[#FN_MARKER_STYLE]=1 \{ .ALD 1v \} +. if \\n[#RESET_FN_NUMBER] \{ .ALD 1v \} +. nr #DEFER_SPACE_ADDED 1 +. \} +. \} +. \} . rr #FN_DEFER_SPACE +. rr #SAVED_DIVER_FN_COUNT +. \} +. if \\n[#DIVERTED]=3 \{\ +. if \\n[#FN_COUNT]>0 \{\ +\!. RLD 1v +. \} . \} +.\" Add footnote rule (or, if no rule, some whitespace). +.\" N.B.- this line increments #FN_COUNT each and every time FOOTNOTE +.\" is run. . if \\n+[#FN_COUNT]=1 \{\ -. if !\\n[#FN_DEPTH] \{\ -. if \\n[#PRINT_STYLE]=1 \{ .ALD \\n[#DOC_LEAD]u \} -. ie \\n[#FN_RULE] \{ .PRINT_FOOTNOTE_RULE \} -. el \{ .ALD 1v \} +.\" If a footnote is called in a diversion, and the footnote has to +.\" be moved, don't put in the rule now (it's taken care of when +.\" FN_IN_DIVER is output into FOOTNOTE in PROCESS_FN_IN_DIVER). +. if !\\n[#DONT_RULE_ME]=1 \{\ +. if !\\n[#FN_DEPTH] \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. if !\\n[#RUN_ON] \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. ie \\n[#FN_RULE]=1 \{\ +. if !\\n[#RUN_ON] \{ .PRINT_FOOTNOTE_RULE \} +. \} +. el \{ .ALD 1v \} +. nr #RULED 1 +. \} . \} . \} -. if \\n[#FN_MARKERS] \{\ +. rr #DONT_RULE_ME +.\" Add footnote markers to footnote text... +. ie \\n[#FN_MARKERS] \{\ +. if \\n[#FN_SPACE]>0 \{\ +. if \\n[#FN_COUNT]>0 \{\ +. ALD \\n[#FN_SPACE]u +. \} +. \} . if !\\n[#NO_FN_MARKER] \{\ -. if \\n[#FN_MARKER_STYLE]=1 \{\ -. ie \\n+[#FN_COUNT_FOR_COLS] \{\ -. if \\n[#FN_COUNT_FOR_COLS]=1 \{ .PRINT *\c \} -. if \\n[#FN_COUNT_FOR_COLS]=2 \{ .PRINT \(dg\c \} -. if \\n[#FN_COUNT_FOR_COLS]=3 \{ .PRINT **\c \} -. if \\n[#FN_COUNT_FOR_COLS]=4 \{ .PRINT \(dg\(dg\c \} -. if \\n[#FN_COUNT_FOR_COLS]=5 \{ .PRINT ***\c \} -. if \\n[#FN_COUNT_FOR_COLS]=6 \{ .PRINT \(dg\(dg\(dg\c \} -. if \\n[#FN_COUNT_FOR_COLS]=7 \{ .PRINT ****\c \} -. if \\n[#FN_COUNT_FOR_COLS]=8 \{ .PRINT \(dg\(dg\(dg\(dg\c \} -. if \\n[#FN_COUNT_FOR_COLS]=9 \{ .PRINT *****\c \} -. if \\n[#FN_COUNT_FOR_COLS]=10 \{ .PRINT \(dg\(dg\(dg\(dg\(dg\c \} +.\" ...but not if TERMINATE has been called. +. if !r#TERMINATE \{\ +. if \\n[#REF]=1 \{\ +\!. in +\\*[$REF_FN_INDENT] +\!. ti -\\*[$REF_FN_INDENT] +. \} +. if \\n[#FN_MARKER_STYLE]=1 \{\ +. ie \\n[#COLUMNS]=1 \{\ +. \\n+[#FN_COUNT_FOR_COLS] +. if \\n[#FN_COUNT_FOR_COLS]=1 \{ .PRINT *\c \} +. if \\n[#FN_COUNT_FOR_COLS]=2 \{ .PRINT \(dg\c \} +. if \\n[#FN_COUNT_FOR_COLS]=3 \{ .PRINT \(dd\c \} +. if \\n[#FN_COUNT_FOR_COLS]=4 \{ .PRINT **\c \} +. if \\n[#FN_COUNT_FOR_COLS]=5 \{ .PRINT \(dg\(dg\c \} +. if \\n[#FN_COUNT_FOR_COLS]=6 \{ .PRINT \(dd\(dd\c \} +. if \\n[#FN_COUNT_FOR_COLS]=7 \{ .PRINT ***\c \} +. if \\n[#FN_COUNT_FOR_COLS]=8 \{ .PRINT \(dg\(dg\(dg\c \} +. if \\n[#FN_COUNT_FOR_COLS]=9 \{ .PRINT \(dd\(dd\(dd\c \} +. if \\n[#FN_COUNT_FOR_COLS]=10 \{ .PRINT ****\c \} +. \} +. el \{\ +. if \\n[#FN_COUNT]=1 \{ .PRINT *\c \} +. if \\n[#FN_COUNT]=2 \{ .PRINT \(dg\c \} +. if \\n[#FN_COUNT]=3 \{ .PRINT \(dd\c \} +. if \\n[#FN_COUNT]=4 \{ .PRINT **\c \} +. if \\n[#FN_COUNT]=5 \{ .PRINT \(dg\(dg\c \} +. if \\n[#FN_COUNT]=6 \{ .PRINT \(dd\(dd\c \} +. if \\n[#FN_COUNT]=7 \{ .PRINT ***\c \} +. if \\n[#FN_COUNT]=8 \{ .PRINT \(dg\(dg\(dg\c \} +. if \\n[#FN_COUNT]=9 \{ .PRINT \(dd\(dd\(dd\c \} +. if \\n[#FN_COUNT]=10 \{ .PRINT ****\c \} +. \} +. \} +. if \\n[#FN_MARKER_STYLE]=2 \{\ +. if \\n[#COLUMNS]=1 \{\ +. \\n+[#FN_COUNT_FOR_COLS] +. \} +. if \\n[#NOT_YET_ADJUSTED]=1 \{\ +. nr #FN_NUMBER 1 1 +. rr #NOT_YET_ADJUSTED +. \} +. if \\n[#PRINT_STYLE]=1 \{ .PRINT "(\\n[#FN_NUMBER])\c" \} +. if \\n[#PRINT_STYLE]=2 \{ .PRINT "\*[SUP]\\n[#FN_NUMBER]\*[SUPX]\*[FU 2]\c" \} +. \} +. \} +. \} +. \} +. el \{\ +.\" Line-numbered footnotes handling +. if \\n[#FN_MARKER_STYLE]=3 \{\ +. if \\n[#FN_SPACE]>0 \{\ +. if !\\n[#RUN_ON]=1 \{\ +. if \\n[#FN_COUNT]>0 \{\ +. ALD \\n[#FN_SPACE]u +. \} +. \} +. \} +. if \\n[#REF]=1 \{\ +. if !\\n[#RUN_ON]=1 \{\ +\!. in +\\*[$REF_FN_INDENT] +\!. ti -\\*[$REF_FN_INDENT] +. \} +. \} +. ie \\n[#FN_LN_BRACKETS]=1 \{\ +. ds $FN_LINENUMBER \v'-.085m'\\*[$FN_OPEN_BRACKET]\v'.085m' +. ie \\n[#FN_MARK_2]=\\n[#FN_MARK] \{\ +. as $FN_LINENUMBER \\n[#FN_MARK]\v'-.085m'\\*[$FN_CLOSE_BRACKET]\v'.085m' \" +. \} +. el \{\ +. as $FN_LINENUMBER \\n[#FN_MARK]\v'-.1m'-\v'.1m'\\n[#FN_MARK_2]\v'-.085m'\\*[$FN_CLOSE_BRACKET]\v'.085m' \" +. \} +. \} +. el \{\ +. ie \\n[#FN_MARK_2]=\\n[#FN_MARK] \{\ +. ds $FN_LINENUMBER \\n[#FN_MARK]\\*[$FN_LN_SEP] . \} . el \{\ -. if \\n[#FN_COUNT]=1 \{ .PRINT *\c \} -. if \\n[#FN_COUNT]=2 \{ .PRINT \(dg\c \} -. if \\n[#FN_COUNT]=3 \{ .PRINT **\c \} -. if \\n[#FN_COUNT]=4 \{ .PRINT \(dg\(dg\c \} -. if \\n[#FN_COUNT]=5 \{ .PRINT ***\c \} -. if \\n[#FN_COUNT]=6 \{ .PRINT \(dg\(dg\(dg\c \} -. if \\n[#FN_COUNT]=7 \{ .PRINT ****\c \} -. if \\n[#FN_COUNT]=8 \{ .PRINT \(dg\(dg\(dg\(dg\c \} -. if \\n[#FN_COUNT]=9 \{ .PRINT *****\c \} -. if \\n[#FN_COUNT]=10 \{ .PRINT \(dg\(dg\(dg\(dg\(dg\c \} +. ds $FN_LINENUMBER \\n[#FN_MARK]\v'-.1m'-\v'.1m'\\n[#FN_MARK_2]\\*[$FN_LN_SEP] . \} . \} -. if \\n[#FN_MARKER_STYLE]=2 \{\ -. if \\n[#PRINT_STYLE]=1 \{ .PRINT "(\\n[#FN_NUMBER])\c" \} -. if \\n[#PRINT_STYLE]=2 \{ .PRINT "\*[SUP]\\n[#FN_NUMBER]\*[SUPX]\c" \} +. if !\\n[#NO_FN_MARKER] \{\ +. PRINT \\*[$FN_LINENUMBER]\c . \} +. rm $FN_LINENUMBER +. nr #FN_MARK 0 . \} . \} . \} +.\" If INDENT arg is passed to FOOTNOTE, calculate the indent... . el \{\ . ie '\\$1'INDENT' \{\ . ev FOOTNOTES @@ -9744,12 +10956,36 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . in \\n[#FN_BL_INDENT]u . \} . ev +.\" ...then re-run FOOTNOTE without an argument. . FOOTNOTE . \} . el \{\ . br +.\" Add "defer space" if the previously diverted footnote was the +.\" 1st footnote proper to its page (i.e. it looks like a deferred +.\" footnote but it's really an overflow). +. if \\n[#DIVERTED] \{\ +. if \\n[#PREV_FN_DEFERRED]=1 \{\ +. if \\n[#FN_MARKER_STYLE]=1 \{ .ALD \\n[#FN_LEAD]u \} +. if \\n[#RESET_FN_NUMBER] \{ .ALD \\n[#FN_LEAD]u \} +. nr #PREV_FN_DEFERRED 2 +. \} +. \} +. if \\n[#REF]=1 \{\ +\!. in +. \} +.\" Terminate FOOTNOTES or FN_IN_DIVER diversion . di -. in 0 \"Turn off indent possibly set by FOOTNOTE INDENT... +. HY_SET 1 \\n[#DIVERSIONS_HY_MARGIN]u (\\n[#PT_SIZE]u/1000u/8u)p +. hy 14 +.\" More housekeeping +.\" Turn off indent possibly set by FOOTNOTE INDENT +. in 0 +.\" Restore sentence spacing +. if \\n[#PRINT_STYLE]=2 \{\ +. if d$RESTORE_SS_VAR \{ .SS \\*[$RESTORE_SS_VAR] \} +. rm $RESTORE_SS_VAR +. \} . if \\n[#PRINT_STYLE]=1 \{\ . if \\n[#UNDERLINE_WAS_ON] \{\ . UNDERLINE @@ -9762,124 +10998,555 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . nr #PP_STYLE \\n[#PP_STYLE_PREV] . if !\\n[#INDENT_FIRSTS] \{ .INDENT_FIRST_PARAS OFF \} . rr #INDENT_FIRSTS -. nr #FN_DEPTH +\\n[#DIVER_DEPTH] -. if \\n[#FN_DEFER] \{\ -. nr #FN_DEFER_SPACE 1 -. rr #FN_DEFER +.\" Calculate footnote depth, but not if #COUNTERS_RESET (created in +.\" DIVER_FN_1_PRE) to instruct FOOTNOTES to skip this step for now +.\" (it's taken care of when FN_IN_DIVER is output into FOOTNOTES in +.\" PROCESS_FN_IN_DIVER). +. ie r#COUNTERS_RESET \{\ +. rr #COUNTERS_RESET . \} -. if \\n[#FN_DEPTH]>\\n[#SPACE_REMAINING] \{\ -. ie \\n[#SPACE_REMAINING]<(\\n[#LEAD]*2) \{ .nr #FN_DEFER 1 \} -. el \{\ -. nr #FN_LINES 0 1 -. while (\\n+[#FN_LINES]*\\n[#FN_LEAD])<\\n[#SPACE_REMAINING] \{\ -. nr #FN_DEPTH (\\n[#FN_LINES]*\\n[#FN_LEAD]) +. el \{\ +. nr #GET_DEPTH 1 +.\" If the footnote is the 1st on the page and it falls too close +.\" to the bottom margin, defer the footnote text to the next page... +. if (\\n[#SPACE_REMAINING]-1)<=(\\n[#DOC_LEAD]) \{\ +.\" ...but not if PROCESS_FN_LEFTOVER has set #PREV_FN_DEFERRED to 1 +. if !\\n[#PREV_FN_DEFERRED]=1 \{\ +. nr #FN_DEFER 1 +. nr #FN_DEPTH +\\n[#DIVER_DEPTH] +. rr #GET_DEPTH +.\" This is required so that the defer space clause can distinguish +.\" a real #FN_COUNT=1 from one generated if FOOTNOTE is run inside +.\" QUOTE, BLOCKQUOTE or EPIGRAPH +. if \\n[#DIVER_FN]=2 \{\ +. nr #SAVED_DIVER_FN_COUNT \\n[#FN_COUNT] +. rr #DIVER_FN +. \} +. \} +. \} +.\" Calculate the footnote depth. +. if \\n[#GET_DEPTH]=1 \{\ +.\" Save the previous footnote depth (for use when there will be +.\" some overflowed footnote text). +. nr #SAVED_FN_DEPTH_1 \\n[#FN_DEPTH] +.\" Add the depth of the current footnote to any already existent +.\" footnotes. +. nr #FN_DEPTH +\\n[#DIVER_DEPTH] +.\" Special handling for run-on footnotes +. if \\n[#RUN_ON]=1 \{\ +. if \\n[#RUNON_FOOTNOTES] \{\ +. unformat RUNON_FOOTNOTES +. \} +. if \\n[#RUNON_FN_IN_DIVER] \{\ +. unformat RUNON_FN_IN_DIVER +. \} +. ev FOOTNOTES +.\" Recreate FOOTNOTES with rule followed by text of unformatted +.\" run-on footnotes. +. di FOOTNOTES +. ie \\n[#FN_RULE]=0 \{ .RLD 1v \} +. el \{\ +. PRINT \v'-\\n[#FN_RULE_ADJ]u'\l'\\n[#FN_RULE_LENGTH]u'\v'+\\n[#FN_RULE_ADJ]u' +. \} +. br +. if \\n[#RUNON_FOOTNOTES] \{\ +. RUNON_FOOTNOTES +. rr #RUNON_FOOTNOTES +. \} +. if \\n[#RUNON_FN_IN_DIVER] \{\ +. RUNON_FN_IN_DIVER +. rr #RUNON_FN_IN_DIVER +. \} +. br +. di +. ev +. nr #FN_DEPTH \\n[#DIVER_DEPTH] +. nr #SAVED_VFP 0+\\n[#VARIABLE_FOOTER_POS] +. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]u +. \} +.\" Save the new depth +. nr #SAVED_FN_DEPTH_2 \\n[#FN_DEPTH] +.\" Signal that defer space should be added when PROCESS_FN_LEFTOVER +.\" processes deferred footnotes. +. if \\n[#FN_DEFER] \{\ +. if \\n[#FN_COUNT]=2 \{\ +. ie \\n[#COLUMNS] \{\ +. if !\\n[#FROM_FOOTER] \{\ +. if \\n[#FN_DEFER]=1 \{ .nr #FN_DEFER_SPACE 1 \} +. if \\n[#FN_COUNT_FOR_COLS]>=1 \{ .rr #FN_DEFER_SPACE \} +. if \\n[#FROM_HEADER] \{ .nr #FN_DEFER_SPACE 1 \} +. \} +. \} +. el \{\ +. nr #FN_DEFER_SPACE 1 +. \} +. \} +. rr #FN_DEFER +. \} +.\" If the depth of the whole footnote won't fit in the space +.\" between where we are on the page and the bottom margin, calculate +.\" how much of it will fit. +. if \\n[#FN_DEPTH]>\\n[#SPACE_REMAINING] \{\ +. nr #FN_LINES 0 1 +. while (\\n+[#FN_LINES]*\\n[#FN_LEAD])<\\n[#SPACE_REMAINING] \{\ +. nr #FN_DEPTH (\\n[#FN_LINES]*\\n[#FN_LEAD]) +.\} +. nr #VFP_DIFF \\n[#FN_DEPTH]-\\n[#SAVED_FN_DEPTH_1] +. nr #OVERFLOW 1 +.\" Very occasionally, #VFP_DIFF, on a 1st footnote that isn't to +.\" be deferred, comes up with a depth equal to exactly 1 line +.\" of footnotes, i.e. enough room to print the rule and nothing +.\" else. The following tests for such a condition, and rather than +.\" attempting to treat the footnote as an overflow, it tells mom to +.\" treat it as a special kind of deferred footnote (#FN_DEFER 2). +. if \\n[#SAVED_FN_DEPTH_1]=0 \{\ +. if \\n[#FN_DEPTH]=\\n[#FN_LEAD] \{\ +. nr #FN_DEFER 2 +. nr #FN_DEPTH \\n[#SAVED_FN_DEPTH_2] +. rr #OVERFLOW +. \} +. \} +. \} +.\" Calculate VFP based on whether the footnote overflows, or is to +.\" be treated normally. +. ie \\n[#OVERFLOW]=1 \{\ +. if \\n[#RUN_ON] \{\ +. rr #VARIABLE_FOOTER_POS +. nr #VARIABLE_FOOTER_POS \\n[#SAVED_VFP] +. \} +. ie \\n[#FN_COUNT]=1 \{\ +. ie \\n[#RULED]=1 \{\ +. ie \\n[#COLUMNS]=1 \{\ +. ie \\n[#COL_NUM]=\\n[#NUM_COLS] \{\ +. ie \\n[#FROM_FOOTER] \{\ +. ie \\n[#FN_COUNT_FOR_COLS]>1 \{\ +. nr #FN_DEPTH -\\n[#FN_DEPTH] +. if \\n[#DIVERTED]=1 \{ .nr #DIVERTED 3 \} +. if !\\n[#PREV_FN_DEFERRED]=1 \{\ +. nr #FN_DEPTH -\\n[#VFP_DIFF] +. \} +. \} +. el \{\ +. nr #VARIABLE_FOOTER_POS -\\n[#FN_DEPTH] +. if \\n[#DIVERTED]=1 \{ .nr #DIVERTED 3 \} +. \} +. \} +. el \{\ +. nr #VARIABLE_FOOTER_POS -(\\n[#FN_DEPTH]) +. \} +. \} +. el \{\ +. nr #VARIABLE_FOOTER_POS -(\\n[#FN_DEPTH]) +. \} +. \} +. el \{ .nr #VARIABLE_FOOTER_POS -(\\n[#FN_DEPTH]) \} +. \} +. el \{\ +. nr #VARIABLE_FOOTER_POS -\\n[#VFP_DIFF] +. if \\n[#DIVERTED]=1 \{ .nr #DIVERTED 3 \} +. if !\\n[#PREV_FN_DEFERRED]=1 \{\ +. ie \\n[#COLUMNS]=1 \{\ +. if !\\n[#FROM_FOOTER] \{\ +. +. \} +. \} +. el \{\ +. nr #FN_DEPTH -\\n[#VFP_DIFF] +. \} +. \} +. if \\n[#DIVERTED]=3 \{\ +. if !\\n[#PREV_FN_DEFERRED] \{\ +. if !\\n[#FROM_FOOTER] \{\ +. if \\n[#FN_COUNT]=1 \{\ +. if !\\n[#VFP_DIFF] \{\ +. if \\n[#FN_MARKER_STYLE]=1 \{\ +. da FOOTNOTES +\!. ALD \\n[#FN_LEAD]u +. di +. \} +. if \\n[#RESET_FN_NUMBER] \{\ +. da FOOTNOTES +\!. ALD \\n[#FN_LEAD]u +. di +. \} +. \} +. \} +. \} +. \} +. \} +. \} +. nr #VARIABLE_FOOTER_POS -\\n[#VFP_DIFF] +. nr #FN_DEPTH \\n[#SAVED_FN_DEPTH_1]+\\n[#VFP_DIFF] +. \} +. el \{\ +. nr #VARIABLE_FOOTER_POS -\\n[#VFP_DIFF] +. nr #FN_DEPTH \\n[#SAVED_FN_DEPTH_1]+\\n[#VFP_DIFF] +. \} +. rr #OVERFLOW +. rr #RULED +. \} +. el \{\ +. nr #VARIABLE_FOOTER_POS -\\n[#DIVER_DEPTH] +. if \\n[#PREV_FN_DEFERRED]=1 \{\ +. if \\n[#DIVERTED] \{\ +. if !\\n[#FN_DEPTH]=\\n[#SAVED_FN_DEPTH_1] \{\ +. nr #FN_DEPTH +\\n[#FN_LEAD] +. nr #VARIABLE_FOOTER_POS -\\n[#FN_LEAD] +. rr #PREV_FN_DEFERRED +. \} +. \} +. \} +. if \\n[#FN_COUNT]>1 \{\ +. nr #NO_BACK_UP 1 +. rr #DIVERTED +. rr #RULED +. \} . \} . \} . \} -. nr #VARIABLE_FOOTER_POS -\\n[#DIVER_DEPTH] -. if \\n[#FN_COUNT]=1 \{ .nr #VARIABLE_FOOTER_POS -1v \} -. \} -. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u -. if (\\n(nl+1v)>(\\n[#PAGE_LENGTH]+\\n[#VARIABLE_FOOTER_POS]) \{\ -. ch FOOTER \\n(nlu+1v -. \} -. if \\n[#FN_DEFER] \{\ -. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]u . ch FOOTER \\n[#VARIABLE_FOOTER_POS]u +.\" See VFP_CHECK for an explanation of the next lines. +.\" The trap has to be removed, prior to setting it, each time +.\" FOOTNOTE is run. +. if \\n[#PRINT_STYLE]=2 \{\ +. ch VFP_CHECK +. wh \\n[#VARIABLE_FOOTER_POS]u-\\n[#DOC_LEAD]u VFP_CHECK +. \} +.\" If we have a footnote whose text has to be deferred to the next +.\" page, reset the FOOTER trap to its original location. +. if \\n[#FN_DEFER] \{\ +. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]u +. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u +. \} . \} +. nr #NO_FN_MARKER 0 +. \} +. if \\n[#ADD_BREAK] \{\ +. br +. rr #ADD_BREAK . \} -. nr #NO_FN_MARKER 0 -.END -\# -\# -.MAC FN_OVERFLOW_TRAP END -. if \\n[#FN_COUNT] \{\ -. di FN_OVERFLOW -. \} .END \# +\# Utility macros to manage footnotes that occur inside diversions +\# --------------------------------------------------------------- \# -.MAC DIVERT_FN_LEFTOVER END -. nr #NO_FN_MARKER 1 -. nr #OVERFLOW 1 -. FOOTNOTE -. nf -. FN_OVERFLOW -. FOOTNOTE OFF -. rr #FN_OVERFLOW_DEPTH -.END +.ig +There are some redundancies here; they're left in in case unforeseen +footnote situations crop up in the future that might require +manipulation of them. +.. \# +\# 1. Pre-footnote processing for footnotes in diversions \# -.MAC PROCESS_FN_LEFTOVER END -. if !\\n[#FN_DEFER] \{\ -. nr #FN_COUNT 0 1 -. nr #FN_DEPTH 0 -. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN] -. \} -. if \\n[#FN_DEFER] \{\ -. nr #VARIABLE_FOOTER_POS -(\\n[#FN_DEPTH]+\\n[#DOC_LEAD]) -. \} -. nr #SPACE_REMAINING 0 -. ch FOOTER -\\n[#B_MARGIN]u -. if \\n[#FN_DEFER] \{\ -. nr #NO_FN_MARKER 1 -. da FOOTNOTES -. di -. FOOTNOTE -. nf -. FOOTNOTE OFF -. \} -. if !\\n[#FN_DEFER] \{\ -. if \\n[#FN_OVERFLOW_DEPTH] \{\ -. DIVERT_FN_LEFTOVER +\# a) A footnote inside a diversion will be moved entirely (marker +\# in running text and text of footnote) to the next page/column. +\# +.MAC DIVER_FN_1_PRE END +. nr #RESET_FN_COUNTERS 1 +. nr #COUNTERS_RESET 1 +. if \\n[#DONE_ONCE]=1 \{\ +. if \\n[#FN_DEFER] \{\ +. if \\n[#SAVED_DIVER_FN_COUNT]=1 \{\ +. ie \\n[#COLUMNS]=1 \{\ +. if \\n[#COL_NUM]=\\n[#NUM_COLS] \{ .nr #FN_DEFER_SPACE 1 \} +. \} +. el \{\ +. nr #FN_DEFER_SPACE 1 +. \} +. \} +. \} +. if \\n[#FN_MARKER_STYLE]=1 \{\ +. if \\n[#FN_COUNT]>0 \{ .nr #FN_COUNT 0 1 \} +. if \\n[#COLUMNS]=1 \{\ +. if \\n[#COL_NUM]=\\n[#NUM_COLS] \{\ +. nr #FN_COUNT_FOR_COLS 0 1 +. \} +. \} +. \} +. if \\n[#FN_MARKER_STYLE]=2 \{\ +. if \\n[#RESET_FN_NUMBER]=1 \{\ +. ie \\n[#COLUMNS]=1 \{\ +. if \\n[#COL_NUM]=\\n[#NUM_COLS] \{ .nr #FN_NUMBER 0 1 \} +. \} +. el \{\ +. nr #FN_NUMBER 0 1 +. \} +. \} . \} . \} -. nr #FN_COUNT 0 1 .END \# +\# b) Treat as a normal footnote, including defers. \# -\# ==================================================================== -\# -\# +++ENDNOTES+++ -\# -\# When endnotes are output, the spacing between the notes is always 1 -\# extra linespace. This can have bottom margin consequences. If this -\# doesn't bother you, don't worry about it. If it does bother you, and -\# you want to adjust the spacing between any two endnotes (as they're -\# output), make the spacing adjustments (.ALD/.RLD) at the *end* of -\# endnotes (i.e. just before .ENDNOTE OFF), not at the top. +.MAC DIVER_FN_2_PRE END +. nr #RESET_FN_COUNTERS 2 +.END \# -\# Endnotes must be output manually with .ENDNOTES. This allows user -\# the flexibility to output endnotes at the end of each collated -\# document, or to output them at the end of the entire document. +\# 2. Post-footnote processing for footnotes in diversions \# -\# ENDNOTE FAMILY -\# -------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $EN_FAM. -\# *Notes: -\# Default is same as running text in body of document. +\# Even when a footnote inside a diversion is treated as +\# "normal," some manipulation of registers is required. The +\# macro is called in DO_QUOTE (i.e. at the termination of +\# quotes and blockquotes) and in DO_EPIGRAPH. \# -.MAC ENDNOTE_FAMILY END -. ds $EN_FAM \\$1 +.MAC DIVER_FN_2_POST END +. if \\n[#DONE_ONCE]=1 \{\ +. if \\n[#FN_MARKER_STYLE]=1 \{\ +. if \\n[#FN_COUNT]=0 \{\ +. nr #DONT_RULE_ME 1 +. \} +. if \\n[#FN_COUNT]>0 \{\ +. nr #FN_COUNT 0 1 +. \} +. if \\n[#COLUMNS]=1 \{\ +. if \\n[#COL_NUM]=\\n[#NUM_COLS] \{ .nr #FN_COUNT_FOR_COLS 0 1 \} +. if !\\n[#COL_NUM]=\\n[#NUM_COLS] \{\ +. \} +. \} +. \} +. if \\n[#FN_MARKER_STYLE]=2 \{\ +. if \\n[#FN_COUNT]=0 \{\ +. nr #DONT_RULE_ME 1 +. \} +. if \\n[#FN_COUNT]>0 \{\ +. nr #FN_COUNT 0 1 +. \} +. if \\n[#RESET_FN_NUMBER]=1 \{\ +. ie \\n[#COLUMNS]=1 \{\ +. if \\n[#COL_NUM]=\\n[#NUM_COLS] \{ .nr #FN_NUMBER 0 1 \} +. \} +. el \{\ +. nr #FN_NUMBER 0 1 +. \} +. \} +. \} +. \} .END \# +\# The main macros that handle footnote processing. +\# ----------------------------------------------- \# -\# ENDNOTE FONT -\# ------------ -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $EN_FT. -\# *Notes: -\# Default is roman. +.ig +Sometimes, #VARIABLE_FOOTER_POS sets FOOTER at a location that gives +the impression another line of running text could fit on the page. +VFP_CHECK is always set to the line just above the one where FOOTER +will be sprung, and checks for this condition. If it exists, FOOTER +is set one line lower on the page, thus squeezing in an extra line +of running text. This is a judgment call on my part, but seems to +work well. If there are problems (e.g. footnotes really do look +jammed), the user should probably adjust FOOTNOTE_AUTOLEAD and/or +FOOTNOTE_RULE_ADJ. + +The macro has to be run in its own environment, otherwise the first +word of the last line before the footnotes gets chopped. +.. +\# +.MAC VFP_CHECK END +. ev VFP_CHECK +.\" The trap also has to be removed each time VFP_CHECK is run +. if \\n[#PRINT_STYLE]=2 \{\ +. ch VFP_CHECK +. SIZESPECS +. ie !\\n[#IN_DIVER] \{ .nr #PAGE_POS \\n(nl \} +. el \{ .nr #PAGE_POS \\n(nl+\\n(.d+(\\n[#DOC_LEAD]) \} +. nr #FOOTER_POS \\n[#PAGE_LENGTH]+(\\n[#VARIABLE_FOOTER_POS]) +. nr #SPACE_TO_FOOTER \\n[#FOOTER_POS]-\\n[#PAGE_POS] +. nr #FN_GAP \\n[#SPACE_TO_FOOTER]%\\n[#DOC_LEAD] +. if !\\n[#FN_GAP]<0 \{\ +. if \\n[#FN_GAP]<\\n[#DOC_LEAD] \{\ +. ie (\\n[#PAGE_POS]+(\\n[#FN_DEPTH]+\\n[#FN_GAP]))>(\\n[#VISUAL_B_MARGIN]) \{\ +. nr #VARIABLE_FOOTER_POS 0+\\n[#VARIABLE_FOOTER_POS] +. \} +. el \{\ +. ie \\n[#DOC_LEAD]-\\n[#FN_GAP]<\\n[#DESCENDER] \{\ +. nr #VARIABLE_FOOTER_POS +\\n[#DOC_LEAD] +. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u +. \} +. el \{\ +. nr #VARIABLE_FOOTER_POS 0+\\n[#VARIABLE_FOOTER_POS] +. \} +. \} +. \} +. \} +. \} +. ev +.END +\# +.ig +FN_OVERFLOW_TRAP starts off "underneath" FOOTER, but is revealed +as #VARIABLE_FOOTER_POSITION changes the position of FOOTER. +FN_OVERFLOW_TRAP simply starts diversion FN_OVERFLOW to "catch" +the overflow. The diversion is ended in FOOTER, immediately after +FOOTER outputs the diversion, FOOTNOTES, before PROCESS_FN_LEFTOVER +is run (either in HEADER, or in FOOTER if moving col to col). +.. +\# +.MAC FN_OVERFLOW_TRAP END +. if \\n[#FN_COUNT] \{\ +. di FN_OVERFLOW +. ie !\\n[#NO_BACK_UP]=1 \{\ +. if \\n[#PREV_FN_DEFERRED] \{\ +. ie \\n[#COLUMNS]=1 \{\ +. if \\n[#FROM_FOOTER] \{\ +. if \\n[#PREV_FN_DEFERRED] \{\ +. if !\\n[#COL_NUM]=\\n[#NUM_COLS] \{\ +. rr #PREV_FN_DEFERRED +. \} +. \} +. \} +. if !\\n[#FROM_FOOTER] \{\ +. if !\\n[#COL_NUM]=\\n[#NUM_COLS] \{\ +. if !\\n[#LAST_FN_COUNT_FOR_COLS]>1 \{\ +\!. RLD \\n[#FN_LEAD]u +. \} +. \} +. \} +. \} +. el \{\ +\!. RLD \\n[#FN_LEAD]u +. \} +. \} +. \} +. el \{\ +. rr #NO_BACK_UP +. rr #PREV_FN_DEFERRED +. \} +. \} +.\" When #FROM_DIVERT_FN is 1, it signals to FOOTNOTE, when run from +.\" within DIVERT_FN_LEFTOVER, to set #SPACE_REMAINING to the total +.\" area allowable for running text. +. nr #FROM_DIVERT_FN 1 +.END +\# +.ig +PROCESS_FN_LEFTOVER is called at the top of HEADER, and in +FOOTER if we're moving from one column to the next (i.e. after +outputting FOOTNOTES). It checks for whether we have a "deferred +footnote" situation, and resets counters and number registers +accordingly. Lastly, if we have some footnote overflow, it calls +DIVERT_FN_OVERFLOW. +.. +\# +.MAC PROCESS_FN_LEFTOVER END +. if \\n[#PREV_FN_DEFERRED]=2 \{\ +. if \\n[#FN_COUNT_AT_FOOTER]>1 \{ .rr #PREV_FN_DEFERRED \} +. \} +. if !\\n[#FN_DEFER] \{\ +. nr #FN_COUNT 0 1 +. nr #FN_DEPTH 0 +. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN] +. \} +. if r#FN_DEFER \{\ +. if \\n[#FN_DEFER]=1 \{\ +. nr #VARIABLE_FOOTER_POS -\\n[#FN_DEPTH] +. \} +. if \\n[#FN_DEFER]=2 \{\ +. nr #FN_DEPTH 0 +. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN] +. \} +. \} +. nr #SPACE_REMAINING 0 +. ch FOOTER -\\n[#B_MARGIN]u +. if \\n[#FN_DEFER] \{\ +. nr #NO_FN_MARKER 1 +. FOOTNOTE +. nf +. FOOTNOTE OFF +. ie \\n[#COLUMNS]=1 \{\ +. if \\n[#COL_NUM]=\\n[#NUM_COLS] \{\ +. if !\\n[#FROM_FOOTER] \{\ +. if \\n[#FN_COUNT_FOR_COLS]=1 \{ .nr #PREV_FN_DEFERRED 1 \} +. \} +. \} +. \} +. el \{ .nr #PREV_FN_DEFERRED 1 \} +. \} +. if !\\n[#FN_DEFER] \{\ +. if \\n[#FN_OVERFLOW_DEPTH] \{\ +. DIVERT_FN_LEFTOVER +. \} +. \} +. ie \\n[#COLUMNS]=1 \{\ +. if \\n[#COL_NUM]>1 \{\ +. if \\n[#COL_NUM]=\\n[#NUM_COLS] \{ .nr #FN_COUNT 0 1 \} +. \} +. \} +. el \{ .nr #FN_COUNT 0 1 \} +. if \\n[#DIVER_FN]=2 \{ .rr #DIVER_FN \} +. rr #FROM_DIVERT_FN +.END +\# +.ig +DIVERT_FN_LEFTOVER is called in PROCESS_FN_LEFTOVER (at +the top of HEADER, and in FOOTER if we're moving from one column +to the next). +.. +\# +.MAC DIVERT_FN_LEFTOVER END +. nr #NO_FN_MARKER 1 +. nr #DIVERTED 1 +. FOOTNOTE +. nf +. FN_OVERFLOW +. FOOTNOTE OFF +. if \\n[#PREV_FN_DEFERRED] \{\ +. nr #FN_DEPTH -\\n[#FN_LEAD] +. nr #VARIABLE_FOOTER_POS +\\n[#FN_LEAD] +. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u +. if \\n[#PREV_FN_DEFERRED]=2 \{\ +. nr #PREV_FN_DEFERRED 1 +. rr #DIVERTED +. \} +. \} +. rr #FN_OVERFLOW_DEPTH +.END +\# +.ig +This is a special macro to deal with footnotes that are set inside +diversions (QUOTE, BLOCKQUOTE and EPIGRAPH). It's called in HEADER +(and in FOOTER, if we're moving from column to column), and comes +after PROCESS_FOOTNOTE_LEFTOVER in those two macros. +.. \# -.MAC ENDNOTE_FONT END -. ds $EN_FT \\$1 +.MAC PROCESS_FN_IN_DIVER END +. nr #SPACE_REMAINING 0 +. ch FOOTER -\\n[#B_MARGIN]u +. nr #NO_FN_MARKER 1 +. if !\\n[#RESET_FN_COUNTERS]=2 \{\ +. rr #RESET_FN_COUNTERS +. \} +. FOOTNOTE +. if \\n[#FN_OVERFLOW_DEPTH] \{ .nf \} +. ie dRUNON_FN_IN_DIVER \{\ +. RUNON_FN_IN_DIVER +. rm RUNON_FN_IN_DIVER +. \} +. el \{\ +. nf +. FN_IN_DIVER +. \} +. FOOTNOTE OFF +. rr #DIVER_FN .END \# +\# ==================================================================== +\# +\# +++ENDNOTES+++ +\# +.ig +When endnotes are output, the spacing between the notes is always +1 extra linespace. This can have bottom margin consequences. If +this doesn't bother you, don't worry about it. If it does bother +you, and you want to adjust the spacing between any two endnotes (as +they're output), make the spacing adjustments (.ALD/.RLD) at the +*end* of endnotes (i.e. just before .ENDNOTE OFF), not at the top. + +Endnotes must be output manually with .ENDNOTES. This allows user +the flexibility to output endnotes at the end of each collated +document, or to output them at the end of the entire document. +.. +\# +\# Control macros \# \# ENDNOTE POINT SIZE \# ------------------ @@ -9929,6 +11596,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . nr #EN_LEAD (p;\\$1) . if '\\$2'ADJUST' \{\ . nr #ORIG_DOC_LEAD \\n[#DOC_LEAD] +. nr #RESTORE_ADJ_DOC_LEAD \\n[#ADJ_DOC_LEAD] . nr #ADJ_DOC_LEAD 1 . nr #ADJ_EN_LEAD 1 . nr #NO_TRAP_RESET 1 @@ -9936,26 +11604,12 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . nr #EN_LEAD \\n[#DOC_LEAD] . DOC_LEAD \\n[#ORIG_DOC_LEAD]u . rr #NO_TRAP_RESET -. rr #ADJ_DOC_LEAD +. nr #ADJ_DOC_LEAD \\n[#RESTORE_ADJ_DOC_LEAD] . rr #ORIG_DOC_LEAD . \} .END \# \# -\# ENDNOTE QUAD -\# ------------ -\# *Argument: -\# LEFT | L | CENTER | C | RIGHT | R | JUSTIFY | J -\# *Function: -\# Creates or modifies string $EN_QUAD. -\# *Notes: -\# Default is justified for TYPESET, left for TYPEWRITE. -\# -.MAC ENDNOTE_QUAD END -. ds $EN_QUAD \\$1 -.END -\# -\# \# ENDNOTES_HDRFTR_CENTER \# ---------------------- \# *Argument: @@ -9988,63 +11642,6 @@ E\\R'#CAP_HEIGHT \\n[.cht]' .END \# \# -\# ENDNOTE STRING FAMILY -\# --------------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $EN_STRING_FAM. -\# *Notes: -\# Default is same as running text in body of document. -\# -.MAC ENDNOTE_STRING_FAMILY END -. ds $EN_STRING_FAM \\$1 -.END -\# -\# -\# ENDNOTE STRING FONT -\# ------------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $EN_FT. -\# *Notes: -\# Default is BOLD for TYPEWRITE; roman for TYPESET -\# -.MAC ENDNOTE_STRING_FONT END -. ds $EN_STRING_FT \\$1 -.END -\# -\# -\# ENDNOTE STRING SIZE -\# ------------------- -\# *Argument: -\# <+|- number of points by which to in/decrease endnote string -\# (relative to base endnote size)> -\# *Function: -\# Creates or modifies string $EN_STRING_SIZE_CHANGE. -\# *Notes: -\# Default is +1 for TYPESET. -\# -.MAC ENDNOTE_STRING_SIZE END \"Default for TYPESET is +1 -. ds $EN_STRING_SIZE_CHANGE \\$1 -.END -\# -\# -\# ENDNOTE STRING QUAD -\# ------------------- -\# *Argument: -\# LEFT | L | CENTER | C | RIGHT | R -\# *Function: -\# Creates or modifies string $EN_STRING_QUAD. -\# *Notes: -\# Default is centered. -\# -.MAC ENDNOTE_STRING_QUAD END -. ds $EN_STRING_QUAD \\$1 -.END -\# -\# \# ENDNOTE STRING UNDERSCORE \# ------------------------- \# *Arguments: @@ -10099,133 +11696,128 @@ E\\R'#CAP_HEIGHT \\n[.cht]' .END \# \# -\# ENDNOTE TITLE FAMILY -\# -------------------- -\# *Argument: -\# -\# *Function: -\# Creates string $EN_TITLE_FAM. -\# *Notes: -\# Default is same as running text of document. -\# -.MAC ENDNOTE_TITLE_FAMILY END -. ds $EN_TITLE_FAM \\$1 -.END -\# -\# -\# ENDNOTE TITLE FONT -\# ------------------ -\# *Argument: -\# -\# *Function: -\# Creates string $EN_TITLE_FT. -\# *Notes: -\# Default is bold for TYPESET; roman for TYPEWRITE. -\# -.MAC ENDNOTE_TITLE_FONT END -. ds $EN_TITLE_FT \\$1 +.MAC ENDNOTE_TITLE_SPACE END +. nr #EN_TITLE_SPACE (\\$1) .END \# \# -\# ENDNOTE TITLE SIZE -\# ------------------ +\# ENDNOTE TITLE UNDERSCORE +\# ------------------------ \# *Argument: -\# <+|- number of points by which to in/decrease endnote title -\# (relative to base endnote size)> +\# toggle \# *Function: -\# Creates string $EN_TITLE_SIZE_CHANGE. +\# Creates or removes register #EN_TITLE_UNDERSCORE. \# *Notes: -\# Default is 0 (i.e. title same size as text of endnotes). +\# Default is to underscore the endnote titles. \# -.MAC ENDNOTE_TITLE_SIZE END -. ds $EN_TITLE_SIZE_CHANGE \\$1 +.MAC ENDNOTE_TITLE_UNDERSCORE END +. ie '\\$1'' \{ .nr #EN_TITLE_UNDERSCORE 1 \} +. el \{ .rr #EN_TITLE_UNDERSCORE \} .END \# \# -\# ENDNOTE TITLE QUAD -\# ------------------ -\# *Argument: -\# +\# ENDNOTE MARKER STYLE +\# -------------------- +\# *Arguments: +\# NUMBER | LINE \# *Function: -\# Creates string $EN_TITLE_QUAD. +\# Sets register #EN_MARKER_STYLE, used in ENDNOTE to determine +\# the style of endnote markers (labels). \# *Notes: -\# Default is left. +\# 1=NUMBER; 2=LINE. LINE means "use output line numbers". +\# Default is NUMBER. \# -.MAC ENDNOTE_TITLE_QUAD END -. ds $EN_TITLE_QUAD \\$1 +.MAC ENDNOTE_MARKER_STYLE END +. if '\\$1'NUMBER' \{\ +. nr #EN_MARKER_STYLE 1 +. \} +. if '\\$1'LINE' \{\ +. nr #EN_MARKER_STYLE 2 +. if !\\n[#EN_LN_SEP] \{\ +. if !\\n[#EN_LN_BRACKETS] \{ .ENDNOTE_LINENUMBER_BRACKETS SQUARE \} +. \} +. \} .END \# \# -\# ENDNOTE TITLE UNDERSCORE -\# ------------------------ -\# *Argument: -\# toggle +\# ENDNOTE LINENUMBER MARK +\# ----------------------- \# *Function: -\# Creates or removes register #EN_TITLE_UNDERSCORE. -\# *Notes: -\# Default is to underscore the endnote titles. +\# This string, when called inline, stores the current output line +\# number in register #EN_MARK for use with ENDNOTE. \# -.MAC ENDNOTE_TITLE_UNDERSCORE END -. ie '\\$1'' \{ .nr #EN_TITLE_UNDERSCORE 1 \} -. el \{ .rr #EN_TITLE_UNDERSCORE \} -.END +.ds EN-MARK \R'#EN_MARK \En(ln' \# \# -\# ENDNOTE NUMBER FAMILY -\# --------------------- +\# ENDNOTE LINENUMBER SEPARATOR +\# ---------------------------- \# *Argument: -\# +\# \# *Function: -\# Creates string $EN_NUMBER_FAM. -\# *Notes: -\# Default is same as running text of document. +\# Stores user-defined separator (for use then +\# ENDNOTE_MARKER_STYLE is LINE) in string $EN_LN_SEP. The +\# separator is intended to be used when the user wishes a +\# separator, rather than the choice of brackets offered by +\# ENDNOTE_LINENUMBER_BRACKETS. \# -\# Family, font, and size of endnote numbers applies only to the -\# numbers as they appear on the endnotes page(s). The superscript -\# numbers that appear in running text are unaffected. -\# -.MAC ENDNOTE_NUMBER_FAMILY END -. ds $EN_NUMBER_FAM \\$1 +.MAC ENDNOTE_LINENUMBER_SEPARATOR END +. rr #EN_LN_BRACKETS +. nr #EN_LN_SEP 1 +. ds $EN_LN_SEP "\\$1 .END \# \# -\# ENDNOTE NUMBER FONT -\# ------------------- +\# ENDNOTE LINENUMBER BRACKETS +\# --------------------------- \# *Argument: -\# +\# PARENS | SQUARE | BRACES or ( | [ | { \# *Function: -\# Creates string $EN_NUMBER_FT. -\# *Notes: -\# Default is bold for TYPESET; roman for TYPEWRITE. +\# Sets register #EN_LN_BRACKETS to 1, and creates strings +\# $EN_OPEN_BRACKET and $EN_CLOSE_BRACKET according to the given argument. \# -\# Family, font, and size of endnote numbers applies only to the -\# numbers as they appear on the endnotes page(s). The superscript -\# numbers that appear in running text are unaffected. -\# -.MAC ENDNOTE_NUMBER_FONT END \"Default for TYPESET is bold -. ds $EN_NUMBER_FT \\$1 +.MAC ENDNOTE_LINENUMBER_BRACKETS END +. rr #EN_LN_SEP +. nr #EN_LN_BRACKETS 1 +. if '\\$1'PARENS' \{\ +. ds $EN_OPEN_BRACKET ( +. ds $EN_CLOSE_BRACKET ) +. \} +. if '\\$1'(' \{\ +. ds $EN_OPEN_BRACKET ( +. ds $EN_CLOSE_BRACKET ) +. \} +. if '\\$1'SQUARE' \{\ +. ds $EN_OPEN_BRACKET [ +. ds $EN_CLOSE_BRACKET ] +. \} +. if '\\$1'[' \{\ +. ds $EN_OPEN_BRACKET [ +. ds $EN_CLOSE_BRACKET ] +. \} +. if '\\$1'BRACES' \{\ +. ds $EN_OPEN_BRACKET { +. ds $EN_CLOSE_BRACKET } +. \} +. if '\\$1'{' \{\ +. ds $EN_OPEN_BRACKET { +. ds $EN_CLOSE_BRACKET } +. \} .END \# \# -\# ENDNOTE NUMBER SIZE -\# ------------------- +\# ENDNOTE LINENUMBER GAP +\# ---------------------- \# *Argument: -\# <+|- number of points by which to in/decrease endnote numbers -\# (relative to base endnote size)> +\# \# *Function: -\# Creates string $EN_NUMBER_SIZE_CHANGE. -\# *Notes: -\# Default is 0. +\# Defines string $EN_LN_GAP, used during printing of line-number +\# labels in ENDNOTE. \# -\# Family, font, and size of endnote numbers applies only to the -\# numbers as they appear on the endnotes page(s). The superscript -\# numbers that appear in running text are unaffected. -\# -.MAC ENDNOTE_NUMBER_SIZE END -. ds $EN_NUMBER_SIZE_CHANGE \\$1 +.MAC ENDNOTE_LINENUMBER_GAP END +. ds $EN_LN_GAP \\$1 .END \# -\# +\# \# ENDNOTE NUMBERS ALIGN RIGHT \# --------------------------- \# *Argument: @@ -10436,25 +12028,42 @@ E\\R'#CAP_HEIGHT \\n[.cht]' \# Places superscript endnote number in text, then collects and \# processes endnote in diversion END_NOTES. \# *Notes: -\# \c must be appended to the word immediately preceding .ENDNOTE. +\# \c must be appended to the word immediately preceding .ENDNOTE +\# when ENDNOTE_MARKER_STYLE is NUMBER. \# .MAC ENDNOTE END +. if !\\n(.u \{ .nr #ADD_BREAK 1 \} . ie '\\$1'' \{\ . nr #ENDNOTE 1 -. if \\n[#CONDENSE] \{ \*[CONDX]\c \} -. if \\n[#EXTEND] \{ \*[EXTX]\c \} -. if \\n[#PRINT_STYLE]=1 \{\ -. if \\n[#UNDERLINE_ON] \{\ -. nr #UNDERLINE_WAS_ON 1 -. UNDERLINE OFF -. \} -. if \\n[#SLANT_ON] \{\ -. nr #SLANT_WAS_ON 1 +. if \\n[#EN_MARKER_STYLE]=1 \{\ +. if \\n[#CONDENSE] \{ \*[CONDX]\c \} +. if \\n[#EXTEND] \{ \*[EXTX]\c \} +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#UNDERLINE_ON] \{\ +. nr #UNDERLINE_WAS_ON 1 +. UNDERLINE OFF +. \} +. if \\n[#SLANT_ON] \{\ +. nr #SLANT_WAS_ON 1 \*[SLANTX]\c +. \} +. PRINT "\s-2\v'-\\n[#DOC_LEAD]u/5u'\\n+[#EN_NUMBER]\v'+\\n[#DOC_LEAD]u/5u'\s+2\c" +. \} +. if \\n[#PRINT_STYLE]=2 \{ .PRINT "\*[SUP]\\n+[#EN_NUMBER]\*[SUPX]\c" \} +. \} +. if \\n[#EN_MARKER_STYLE]=2 \{\ +. if !\\n[#LINENUMBERS] \{\ +. tm1 "[mom]: Line numbering must be enabled with NUMBER_LINES when +. tm1 " ENDNOTE_MARKER_STYLE is LINE. +. ab Aborting on ENDNOTE at line \\n(.c. +. \} +. if \\n[#EN_MARK]=0 \{ .nr #EN_MARK \\n(ln \} +. nr #EN_MARK_2 \\n(ln +. if '\\n(.z'P_QUOTE' \{\ +. nr #EN_MARK -1 +. nr #EN_MARK_2 -1 . \} -. PRINT "\s-2\v'-\\n[#DOC_LEAD]u/5u'\\n+[#EN_NUMBER]\v'+\\n[#DOC_LEAD]u/5u'\s+2" . \} -. if \\n[#PRINT_STYLE]=2 \{ .PRINT "\*[SUP]\\n+[#EN_NUMBER]\*[SUPX]" \} . nr #PP_STYLE_PREV \\n[#PP_STYLE] . nr #PP_STYLE 1 . if \\n[#INDENT_FIRST_PARAS] \{ .nr #INDENT_FIRSTS 1 \} @@ -10472,9 +12081,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . if \\n[#EN_NUMBER]=1 \{\ \!. ne 3 . if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 +. TYPEWRITER . \} . if \\n[#PRINT_STYLE]=2 \{\ . FAMILY \\*[$EN_TITLE_FAM] @@ -10498,74 +12105,121 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . \} . \} . \} -. ie \\n[#EN_NUMBERS_ALIGN_RIGHT] \{\ -. ie \\n[#EN_NUMBER]=1 \{\ -. if !'\\*[$EN_TITLE]'' \{ .sp \} -. \} -. el \{ .sp \} -\!. TRAP OFF -. if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 -. \} -. if \\n[#PRINT_STYLE]=2 \{\ +. ie \\n[#EN_NUMBER]=1 \{\ +. if !'\\*[$EN_TITLE]'' \{ .sp \} +. \} +. el \{ .sp \} +. if \\n[#PRINT_STYLE]=1 \{\ +. TYPEWRITER +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. if \\n[#EN_MARKER_STYLE]=1 \{\ . FAMILY \\*[$EN_NUMBER_FAM] . FT \\*[$EN_NUMBER_FT] . PT_SIZE \\n[#EN_PS]u\\*[$EN_NUMBER_SIZE_CHANGE] . \} -. nr #RESET_L_LENGTH \\n(.l -. nr #EN_NUMBER_L_LENGTH \w'\0'*\\n[#EN_NUMBER_PLACEHOLDERS]+\w'.' -. ll \\n[#EN_NUMBER_L_LENGTH]u -. RIGHT -\En[#EN_NUMBER]. -. if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 +. if \\n[#EN_MARKER_STYLE]=2 \{\ +. FAMILY \\*[$EN_LN_FAM] +. FT \\*[$EN_LN_FT] +. PT_SIZE \\n[#EN_PS]u\\*[$EN_LN_SIZE_CHANGE] . \} -. if \\n[#PRINT_STYLE]=2 \{\ -. FAMILY \\*[$EN_FAM] -. FT \\*[$EN_FT] -. PT_SIZE \\n[#EN_PS]u +. \} +. if \\n[#EN_MARKER_STYLE]=2 \{\ +. ENDNOTE_NUMBERS_ALIGN_LEFT +. ie \\n[#EN_LN_BRACKETS]=1 \{\ +. ds $EN_LINENUMBER \v'-.085m'\\*[$EN_OPEN_BRACKET]\v'.085m' +. ie \\n[#EN_MARK_2]=\\n[#EN_MARK] \{\ +. as $EN_LINENUMBER \\n[#EN_MARK]\v'-.085m'\\*[$EN_CLOSE_BRACKET]\v'.085m' \" +. \} +. el \{\ +. as $EN_LINENUMBER \\n[#EN_MARK]\v'-.1m'-\v'.1m'\\n[#EN_MARK_2]\v'-.085m'\\*[$EN_CLOSE_BRACKET]\v'.085m' \" +. \} +. \} +. el \{\ +. ie \\n[#EN_MARK_2]=\\n[#EN_MARK] \{\ +. ds $EN_LINENUMBER \\n[#EN_MARK]\\*[$EN_LN_SEP] +. \} +. el \{\ +. ds $EN_LINENUMBER \\n[#EN_MARK]\v'-.1m'-\v'.1m'\\n[#EN_MARK_2]\\*[$EN_LN_SEP] +. \} . \} -. EL -. ll \\n[#RESET_L_LENGTH]u -. in \\n[#EN_NUMBER_L_LENGTH]u+\w'.\0'u -. nr #EN_TEXT_INDENT \\n(.i -. QUAD \\*[$EN_QUAD] -\!. TRAP +. nr #EN_MARK 0 +. \} +\!. TRAP OFF +. nr #RESET_L_LENGTH \\n(.l +. ie \\n[#EN_NUMBERS_ALIGN_RIGHT] \{\ +. nr #EN_NUMBER_L_LENGTH \w'\0'*\\n[#EN_NUMBER_PLACEHOLDERS]+\w'.' +. RIGHT . \} . el \{\ -. ie \\n[#EN_NUMBER]=1 \{\ -. if !'\\*[$EN_TITLE]'' \{ .sp \} +. nr #EN_NUMBER_L_LENGTH \w'\En[#EN_NUMBER].\0' +. LEFT +. \} +. if \\n[#EN_MARKER_STYLE]=2 \{\ +. if !\\n[#EN_NUMBERS_ALIGN_RIGHT] \{\ +. nr #EN_NUMBER_L_LENGTH \w'\\*[$EN_LINENUMBER]'+\\*[$EN_LN_GAP] +. LEFT . \} -. el \{ .sp \} -. if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 -. \} -. if \\n[#PRINT_STYLE]=2 \{\ -. FAMILY \\*[$EN_NUMBER_FAM] -. FT \\*[$EN_NUMBER_FT] -. PT_SIZE \\n[#EN_PS]u\\*[$EN_NUMBER_SIZE_CHANGE] +. \} +. ll \\n[#EN_NUMBER_L_LENGTH]u +. if \\n[#EN_MARKER_STYLE]=1 \{\ +\En[#EN_NUMBER]. +. \} +. if \\n[#EN_MARKER_STYLE]=2 \{\ +\\*[$EN_LINENUMBER] +. rm $EN_LINENUMBER +. \} +. EOL +. ll \\n[#RESET_L_LENGTH]u +. nr #EN_FIGURE_SPACE \w'\0.' +. ie \\n[#EN_NUMBERS_ALIGN_RIGHT] \{\ +. in \\n[#EN_NUMBER_L_LENGTH]u+\\n[#EN_FIGURE_SPACE]u +. \} +. el \{\ +. ti \\n[#EN_NUMBER_L_LENGTH]u +. \} +. nr #EN_TEXT_INDENT \\n(.i +. QUAD \\*[$EN_QUAD] +\!. TRAP +. if \\n[#PRINT_STYLE]=1 \{\ +. TYPEWRITER +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$EN_FAM] +. FT \\*[$EN_FT] +. PT_SIZE \\n[#EN_PS]u +. \} +. if \\n[#REF]=1 \{\ +. ie !\\n[#EN_MARKER_STYLE]=2 \{\ +. if \\n[#EN_NUMBERS_ALIGN_LEFT] \{\ +. in \\*[$REF_EN_INDENT] +. ti -(\\*[$REF_EN_INDENT]-\\n[#EN_NUMBER_L_LENGTH]u) +. \} +. if \\n[#EN_NUMBERS_ALIGN_RIGHT] \{\ +. in \\*[$REF_EN_INDENT] +. ti -(\\*[$REF_EN_INDENT]-\\n[#EN_NUMBER_L_LENGTH]u-\\n[#EN_FIGURE_SPACE]u) +. \} . \} -. QUAD \\*[$EN_QUAD] -\En[#EN_NUMBER].\0\c -. if \\n[#PRINT_STYLE]=2 \{\ -. FAMILY \\*[$EN_FAM] -. FT \\*[$EN_FT] -. PT_SIZE \\n[#EN_PS]u +. el \{\ +. if \\n[#EN_NUMBERS_ALIGN_LEFT] \{\ +. in \\*[$REF_EN_INDENT] +. ti -(\\*[$REF_EN_INDENT]-\\n[#EN_NUMBER_L_LENGTH]u) +. \} . \} . \} . \} . el \{\ . br -. if \\n[#EN_NUMBERS_ALIGN_RIGHT] \{\ . in 0 +. if \\n[#EN_MARKER_STYLE]=2 \{\ +\!. in 0 . \} . di +.\" Restore sentence spacing +. if \\n[#PRINT_STYLE]=2 \{\ +. if d$RESTORE_SS_VAR \{ .SS \\*[$RESTORE_SS_VAR] \} +. rm $RESTORE_SS_VAR +. \} . ev . nr #PP_STYLE \\n[#PP_STYLE_PREV] . if !\\n[#INDENT_FIRSTS] \{ .INDENT_FIRST_PARAS OFF \} @@ -10582,6 +12236,10 @@ E\\R'#CAP_HEIGHT \\n[.cht]' \*[SLANT]\c . \} . \} +. if \\n[#ADD_BREAK] \{\ +. br +. rr #ADD_BREAK +. \} .END \# \# @@ -10596,10 +12254,13 @@ E\\R'#CAP_HEIGHT \\n[.cht]' \# .MAC ENDNOTES END . nr #ENDNOTES 1 -. nr #PAGINATION_STATE \\n[#PAGINATE] . nr #EN_FIRST_PAGE 1 . nr #HEADER_STATE \\n[#HEADERS_ON] . ds $RESTORE_PAGENUM_STYLE \\*[$PAGENUM_STYLE] +. if \\n[#LINENUMBERS]=1 \{\ +. NUMBER_LINES OFF +. nr #LINENUMBERS 2 +. \} . if \\n[#HEADERS_ON]=1 \{\ . if !\\n[#EN_ALLOWS_HEADERS_ALL] \{ .HEADERS OFF \} . \} @@ -10621,32 +12282,9 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . el \{ .nr #PAGINATE 0 \} . \} . if \\n[#FOOTERS_ON]=1 \{\ -. if !'\\*[$HDRFTR_CENTER_OLD]'' \{ .ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_OLD] \} +. if !'\\*[$HDRFTR_CENTER_OLD]'' .ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_OLD] . \} . NEWPAGE -. if \\n[#FINIS] \{\ -. if \\n[#FOOTERS_WERE_ON] \{\ -. FOOTERS -. rr #FOOTERS_WERE_ON -. \} -. if \\n[#PAGINATION_WAS_ON] \{\ \"This register only set in FINIS -. if \\n[#PAGINATION_STATE]=1 \{\ -. PAGINATE -. rr #PAGINATION_WAS_ON -. \} -. \} -. rr #FINIS -. \} -. if \\n[#FOOTERS_WERE_ON] \{\ -. FOOTERS -. rr #FOOTERS_WERE_ON -. \} -. if \\n[#PAGINATION_WAS_ON] \{\ -. if \\n[#PAGINATION_STATE]=1 \{\ -. PAGINATE -. rr #PAGINATION_WAS_ON -. \} -. \} . if \\n[#FOOTERS_ON]=1 \{\ . ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_NEW] . rm $HDRFTR_CENTER_OLD @@ -10670,16 +12308,14 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . if \\n[#HEADER_STATE]=1 \{\ . if \\n[#EN_ALLOWS_HEADERS] \{ .HEADERS \} . \} -\# Collect endnote title string for TOC +.\" Collect endnotes title string for TOC . nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ] . af #TOC_ENTRY_PN \\g[#PAGENUMBER] . ds $TOC_TITLE_ITEM \\*[$EN_STRING]\\| . ev TOC_EV . da TOC_ENTRIES . if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 +. TYPEWRITER . \} . if \\n[#PRINT_STYLE]=2 \{\ \!. FAMILY \\*[$TOC_TITLE_FAM] @@ -10693,7 +12329,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . el \{\ \!. PAD "\\h'\\n[#TOC_TITLE_INDENT]u'\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN]" . \} -\!. EL +\!. EOL \!. ST 100 L \!. ST 101 R . if \\n[#PRINT_STYLE]=2 \{\ @@ -10709,8 +12345,8 @@ E\\R'#CAP_HEIGHT \\n[.cht]' \!. TQ . di . ev -\# End collection of endnote title string for TOC -\# Process endnote +.\" End collection of endnotes title string for TOC +.\" Process endnotes . if \\n[#PRINT_STYLE]=1 \{ .vs \\n[#EN_LEAD]u \} . if \\n[#PRINT_STYLE]=2 \{\ . if \\n[#EN_NO_COLS] \{\ @@ -10724,7 +12360,8 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . el \{ .DOC_LEAD \\n[#EN_LEAD]u \} . \} . PRINT \& -. sp |\\n[#T_MARGIN]u +. ie r#EN_TITLE_SPACE \{ .sp |\\n[#EN_TITLE_SPACE]u \} +. el \{ .sp |\\n[#T_MARGIN]u \} . mk ec . if \\n[#SLANT_ON] \{\ \*[SLANTX]\c @@ -10732,9 +12369,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . ev ENDNOTES . if !'\\*[$EN_STRING]'' \{\ . if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 +. TYPEWRITER . vs \\n[#EN_LEAD]u . \} . if \\n[#PRINT_STYLE]=2 \{\ @@ -10757,7 +12392,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . if '\\*[$EN_STRING_QUAD]'CENTRE' \{ .CENTER \} . if '\\*[$EN_STRING_QUAD]'R' \{ .RIGHT \} . if '\\*[$EN_STRING_QUAD]'RIGHT' \{ .RIGHT \} -. EL +. EOL . if \\n[#EN_STRING_CAPS] \{ .CAPS \} . ie \\n[#EN_STRING_UNDERSCORE] \{\ . ie \\n[#EN_STRING_UNDERSCORE]=2 \{\ @@ -10772,7 +12407,20 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . \} . \} . CAPS OFF -. ALD \\n[#EN_LEAD]u +. if \\n[#PRINT_STYLE]=1 \{\ +. ie \\n[#SINGLE_SPACE]=1 \{\ +. ALD \\n[#EN_LEAD]u*2u +. \} +. el \{\ +. ie \\n[#EN_SINGLESPACE]=1 \{\ +. ALD \\n[#EN_LEAD]u*2 +. \} +. el \{\ +. +. \} +. \} +. \} +. if \\n[#PRINT_STYLE]=2 \{ .ALD \\n[#EN_LEAD]u \} . QUAD \\*[$EN_QUAD] . nf . END_NOTES @@ -10789,391 +12437,624 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . \} . if \\n[#COLUMNS_WERE_ON] \{ .nr #COLUMNS 1 \} . if \\n[#HEADER_STATE]=1 \{ .HEADERS \} +. if \\n[#LINENUMBERS]=2 \{\ +. NUMBER_LINES RESUME +. nr #LINENUMBERS 1 +. \} . rr #ENDNOTES .END \# \# ==================================================================== \# -\# +++TABLE OF CONTENTS+++ -\# -\# Strings to allocate space for leaders and entry page numbers -\# -.ds $TOC_PN \\*[ST100]\\F[\\*[$TOC_PN_FAM]]\\f[\\*[$TOC_PN_FT]]\\s[\\n[#TOC_PS]u]#\\*[ST100X]\\*[ST101]\\s[\\*[$TOC_PN_SIZE_CHANGE]]\\|\\h'\\w'0'u*\\n[#TOC_PN_PADDING]u'\*[ST101X] -.ds $TOC_PN_TYPEWRITE \\*[ST100]#\\*[ST100X]\\*[ST101]\\|\\h'\\w'0'u*\\n[#TOC_PN_PADDING]u'\\*[ST101X] -\# -\# TOC ENTRIES PAGE NUMBERS PADDING -\# -------------------------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies register #TOC_PN_PADDING. -\# *Notes: -\# "Placeholders" is the maximum number of digits in a page -\# number numeral. -\# -\# Default is 3. -\# -.MAC TOC_PADDING END -. nr #TOC_PN_PADDING \\$1 -.END -\# -\# -\# PAGINATE TOC -\# ------------ -\# *Argument: -\# | -\# *Function: -\# Creates or removes register #PAGINATE_TOC. -\# *Notes: -\# Default is to paginate toc. -\# -.MAC PAGINATE_TOC END -. ie '\\$1'' \{ .nr #PAGINATE_TOC 1 \} -. el \{ .nr #PAGINATE_TOC 0 \} -.END -\# -\# -\# TOC FAMILY -\# ---------- -\# *Argument: -\# -\# *Function: -\# Creates string $TOC_FAM. -\# *Notes: -\# Default is same as document family. -\# -.MAC TOC_FAMILY END -. ds $TOC_FAM \\$1 -.END -\# -\# -\# TOC POINT SIZE -\# -------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies register #TOC_PS. -\# *Notes: -\# This size control macro differs from other size control macros -\# in that it sets an absolute point size, not a relative one. -\# See notes for ENDNOTE_PT_SIZE for explanation. No unit of -\# measure required. -\# -\# No unit of measure required (points assumed). Default is 11.5 -\# for TYPESET. -\# -.MAC TOC_PT_SIZE END -. nr #TOC_PS (p;\\$1) -.END -\# -\# -\# TOC LEADING -\# ----------- -\# *Argument: -\# [ADJUST] -\# *Function: -\# Creates or modifies register #TOC_LEAD. If optional ADJUST -\# given, adjusts lead to fill page. If #OK_PROCESS_LEAD doesn't -\# exist, stores arguments for when it's okay to run the macro. -\# *Notes: -\# No unit of measure required (points assumed). -\# -\# Default is same as DOC_LEAD. -\# -.MAC TOC_LEAD END +\# +++BIBLIOGRAPHY+++ +\# +.ig +Mom treats bibliographies and endnotes very similarly. The chief +difference is that endnotes are collected and formatted inside a +diversion, while bibliographies are built "by hand." ENDNOTES sets +up the endnotes page and outputs the formatted diversion. +BIBLIOGRAPHY sets up the bibliography page, then awaits refer +commands. + +All of the bibliography control macros have their exact +counterparts in the endnotes control macros. It was tempting to do +fancy stuff with aliases to avoid the repetition, but for reasons +of my own sanity, and for the benefit of anyone wanting to play +around with the bibliography control macros, I decided to keep them +separate. + +Because the bibliography control macros all have endnotes +equivalents, refer to the appropriate, similar endnote macro for +Arguments, Function and Notes. +.. +\# Bibliography control macros +\# +.MAC BIBLIOGRAPHY_PT_SIZE END +. nr #BIB_PS (p;\\$1) +.END +\# +.MAC BIBLIOGRAPHY_LEAD END . if !\\n[#OK_PROCESS_LEAD] \{\ -. ds $TOC_LEAD \\$1 +. ds $BIB_LEAD \\$1 . if !'\\$2'' \{\ -. ds $ADJUST_TOC_LEAD \\$2 +. ds $ADJUST_BIB_LEAD \\$2 . \} . return . \} -. rr #ADJ_TOC_LEAD -. nr #TOC_LEAD (p;\\$1) +. rr #ADJ_BIB_LEAD +. nr #BIB_LEAD (p;\\$1) . if '\\$2'ADJUST' \{\ . nr #ORIG_DOC_LEAD \\n[#DOC_LEAD] +. nr #RESTORE_ADJ_DOC_LEAD \\n[#ADJ_DOC_LEAD] . nr #ADJ_DOC_LEAD 1 -. nr #ADJ_TOC_LEAD 1 +. nr #ADJ_BIB_LEAD 1 . nr #NO_TRAP_RESET 1 -. DOC_LEAD \\n[#TOC_LEAD]u ADJUST -. nr #TOC_LEAD \\n[#DOC_LEAD] +. DOC_LEAD \\n[#BIB_LEAD]u ADJUST +. nr #BIB_LEAD \\n[#DOC_LEAD] . DOC_LEAD \\n[#ORIG_DOC_LEAD]u . rr #NO_TRAP_RESET -. rr #ADJ_DOC_LEAD +. nr #ADJ_DOC_LEAD \\n[#RESTORE_ADJ_DOC_LEAD] . rr #ORIG_DOC_LEAD . \} .END \# -\# -\# TOC PAGES PAGE-NUMBERING STYLE -\# ------------------------------ -\# *Argument: -\# DIGIT | ROMAN | roman | ALPHA | alpha -\# *Function: -\# Creates or modifies string $TOC_PN_STYLE -\# *Notes: -\# Page numbering style for page numbers that appear in the -\# headers/footers of toc pages. See notes for PAGENUM_STYLE. -\# -\# Default is roman. -\# -.MAC TOC_PAGENUM_STYLE END -. ds $TOC_PN_STYLE \\$1 +.MAC BIBLIOGRAPHY_HDRFTR_CENTER END +. ie '\\$1'' \{ .nr #BIB_HDRFTR_CENTER 1 \} +. el \{ .rr #BIB_HDRFTR_CENTER \} .END \# -\# -\# TOC RECTO_VERSO SWITCH -\# ---------------------- -\# *Argument: -\# | -\# *Function: -\# Creates or removes register #TOC_RV_SWITCH -\# *Notes: -\# Allows switching of L/R margins if a doc is recto/verso and -\# the first toc page happens to fall the wrong way -\# -.MAC TOC_RV_SWITCH END -. ie '\\$1'' \{ .nr #TOC_RV_SWITCH 1 \} -. el \{ .rr #TOC_RV_SWITCH \} +.MAC BIBLIOGRAPHY_STRING END +. ds $BIB_STRING \\$1 .END \# -\# - for TOC "doc header" (i.e. "Contents") -\# -\# TOC HEADER FAMILY -\# ----------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $TOC_HEADER_FAM -\# *Notes: -\# Default is same as TOC_FAMILY. +.MAC BIBLIOGRAPHY_STRING_UNDERSCORE END +. ie '\\$1'' \{ .nr #BIB_STRING_UNDERSCORE 1 \} +. el \{\ +. ie '\\$1'2' \{ .nr #BIB_STRING_UNDERSCORE 2 \} +. el \{ .nr #BIB_STRING_UNDERSCORE 0 \} +. \} +.END \# -.MAC TOC_HEADER_FAMILY END -. ds $TOC_HEADER_FAM \\$1 +.MAC BIBLIOGRAPHY_STRING_CAPS END +. ie '\\$1'' \{ .nr #BIB_STRING_CAPS 1 \} +. el \{ .rr #BIB_STRING_CAPS \} .END \# +.MAC BIBLIOGRAPHY_NO_COLUMNS END +. ie '\\$1'' \{ .nr #BIB_NO_COLS 1 \} +. el \{ .rr #BIB_NO_COLS \} +.END \# -\# TOC HEADER FONT -\# --------------- -\# *Argument: -\# -\# *Function: -\# Creates or modified string $TOC_HEADER_FT -\# *Notes: -\# Default is bold for TYPESET. +.MAC BIBLIOGRAPHY_NO_FIRST_PAGENUM END +. ie '\\$1'' \{ .nr #BIB_NO_FIRST_PN 1 \} +. el \{ .rr #BIB_NO_FIRST_PN \} +.END \# -.MAC TOC_HEADER_FONT END -. ds $TOC_HEADER_FT \\$1 +.MAC BIBLIOGRAPHY_ALLOWS_HEADERS END +. ie '\\$1'' \{ .nr #BIB_ALLOWS_HEADERS 1 \} +. el \{\ +. ie '\\$1'ALL' \{\ +. nr #BIB_ALLOWS_HEADERS 1 +. nr #BIB_ALLOWS_HEADERS_ALL 1 +. \} +. el \{\ +. rr #BIB_ALLOWS_HEADERS +. rr #BIB_ALLOWS_HEADERS_ALL +. \} +. \} .END \# +.MAC BIBLIOGRAPHY_PAGENUM_STYLE END +. ds $BIB_PN_STYLE \\$1 +.END \# -\# TOC HEADER SIZE -\# -------------- -\# *Argument: -\# <+|- number of points by which to in/decrease toc header -\# (relative to overall toc point size)> -\# *Function: -\# Creates or modifies string $TOC_HEADER_SIZE_CHANGE. -\# *Notes: -\# Default is +4 +.MAC BIBLIOGRAPHY_FIRST_PAGENUMBER END +. nr #BIB_FIRST_PN \\$1 +.END \# -.MAC TOC_HEADER_SIZE END -. ds $TOC_HEADER_SIZE_CHANGE \\$1 +.MAC SINGLESPACE_BIBLIOGRAPHY END +. if \\n[#PRINT_STYLE]=1 \{\ +. ie \\n[#SINGLE_SPACE] \{\ +. nr #BIB_SINGLESPACE 1 +. rr #IGNORE +. if \\n[#OK_PROCESS_LEAD] \{\ +. BIBLIOGRAPHY_LEAD 12 ADJUST +. nr #IGNORE 1 +. \} +. \} +. el \{\ +. ie '\\$1'' \{\ +. nr #BIB_SINGLESPACE 1 +. rr #IGNORE +. if \\n[#OK_PROCESS_LEAD] \{\ +. BIBLIOGRAPHY_LEAD 12 ADJUST +. nr #IGNORE 1 +. \} +. \} +. el \{\ +. rr #BIB_SINGLESPACE +. rr #IGNORE +. if \\n[#OK_PROCESS_LEAD] \{\ +. BIBLIOGRAPHY_LEAD 24 ADJUST +. nr #IGNORE 1 +. \} +. \} +. \} +. \} .END \# \# -\# TOC HEADER QUAD -\# --------------- +\# Style for outputting collected bibliographic references +\# ------------------------------------------------------- \# *Argument: -\# L | LEFT | C | CENTER | CENTRE | R | RIGHT +\# LIST | PLAIN [ ] [ ] \# *Function: -\# Creates or modifies string $TOC_HEADER_QUAD. +\# Sets #BIB_LIST to 1 for numbered list style, 0 for plain output \# *Notes: -\# Default is LEFT. +\# Technically, user is supposed to enter PLAIN if s/he wants an +\# unumbered bibliography, but the el clause says "any arg but +\# LIST means unumbered." Effectively, any arg but LIST produces +\# a "plain" bibliographic list. \# -.MAC TOC_HEADER_QUAD END -. ds $TOC_HEADER_QUAD \\$1 -.END +\# The 2nd and 3rd args have the same options as the 2nd arg to LIST. \# +.MAC BIBLIOGRAPHY_TYPE END +. ie '\\$1'LIST' \{\ +. nr #BIB_LIST 1 +. ie '\\$2'' \{\ +. if '\\*[$BIB_LIST_SEPARATOR]'' .ds $BIB_LIST_SEPARATOR . +. \} +. el .ds $BIB_LIST_SEPARATOR \\$2 +. ie '\\$3'' .ds $BIB_LIST_PREFIX +. el .ds $BIB_LIST_PREFIX \\$3 +. \} +. el \{ .nr #BIB_LIST 0 \} +.END \# -\# TOC HEADER STRING -\# ----------------- +\# Spacing between items in bibliographies +\# --------------------------------------- \# *Argument: -\# +\# \# *Function: -\# Creates or modifies string $TOC_HEADER_STRING +\# Gets value for #BIB_SPACE in units. \# *Notes: -\# Default is "Contents". +\# Requires a unit of measure. \# -.MAC TOC_HEADER_STRING END -. ds $TOC_HEADER_STRING \\$1 +.MAC BIBLIOGRAPHY_SPACING END +. ds $BIB_SPACE \\$1 +. if \\n[#BIB_LEAD]=0 \{\ +. nr #DEFER_BIB_SPACING 1 +. return +. \} +. ds $EVAL_BIB_SPACE \\*[$BIB_SPACE] +. substring $EVAL_BIB_SPACE -1 +. ie '\\*[$EVAL_BIB_SPACE]'v' \{\ +. substring $BIB_SPACE 0 0 +. nr #BIB_SPACE \\n[#BIB_LEAD]*\\*[$BIB_SPACE] +. \} +. el \{\ +. nr #BIB_SPACE (\\$1) +. \} .END \# -\# - for TOC entries page number numerals -\# -\# TOC ENTRIES PAGE NUMBER FAMILY -\# ------------------------------ -\# *Argument: -\# +\# Set up bibliography page +\# ------------------------ \# *Function: -\# Creates or modifies string $TOC_PN_FAM. +\# Sets up a new page, with title, ready to accept the output +\# of refer's $LIST$ or .R1 bibliography .R2 \# *Notes: -\# Default is same as $TOC_FAM. -\# -.MAC TOC_PN_FAMILY END -. ds $TOC_PN_FAM \\$1 -.END +\# Bibliography pages are set up almost identically to endnotes pages. \# +.MAC BIBLIOGRAPHY END +. nr #BIBLIOGRAPHY 1 +. nr #BIB_FIRST_PAGE 1 +. nr #HEADER_STATE \\n[#HEADERS_ON] +. ds $RESTORE_PAGENUM_STYLE \\*[$PAGENUM_STYLE] +. if \\n[#LINENUMBERS]=1 \{\ +. NUMBER_LINES OFF +. nr #LINENUMBERS 2 +. \} +. if \\n[#HEADERS_ON]=1 \{\ +. if !\\n[#BIB_ALLOWS_HEADERS_ALL] \{ .HEADERS OFF \} +. \} +. if \\n[#HEADER_STATE]=1 \{\ +. ie \\n[#BIB_HDRFTR_CENTER]=1 \{ . \} +. el \{ .rm $HDRFTR_CENTER \} +. \} +. ie !\\n[#SUSPEND_PAGINATION] \{\ +. if \\n[#PAGINATE]=1 \{\ +. if \\n[#PAGE_NUM_V_POS]=1 \{\ +. PAGENUM_STYLE \\*[$BIB_PN_STYLE] +. if \\n[#BIB_FIRST_PN] \{ .PAGENUMBER \\n[#BIB_FIRST_PN]-1 \} +. if r#BIB_NO_FIRST_PN \{ .nr #PAGINATE 0 \} +. \} +. \} +. \} +. el \{\ +. ie \\n[#PAGE_NUM_V_POS]=2 \{ .nr #PAGINATE 1 \} +. el \{ .nr #PAGINATE 0 \} +. \} +. if \\n[#FOOTERS_ON]=1 \{\ +. if !'\\*[$HDRFTR_CENTER_OLD]'' .ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_OLD] +. \} +. NEWPAGE +. if \\n[#FOOTERS_ON]=1 \{\ +. ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_NEW] +. rm $HDRFTR_CENTER_OLD +. rm $HDRFTR_CENTER_NEW +. \} +. ie !\\n[#SUSPEND_PAGINATION] \{\ +. if \\n[#PAGE_NUM_V_POS]=1 \{\ +. if r#BIB_NO_FIRST_PN \{\ +. if \\n[#PAGINATION_STATE]=1 \{\ +. nr #PAGINATE 1 +. \} +. \} +. \} +. \} +. el \{\ +. if \\n[#PAGE_NUM_V_POS]=2 \{ .nr #PAGINATE 0 \} +. \} +. rr #PAGINATION_STATE +. PAGENUM_STYLE \\*[$BIB_PN_STYLE] +. if \\n[#BIB_FIRST_PN] \{ .PAGENUMBER \\n[#BIB_FIRST_PN] \} +. if \\n[#HEADER_STATE]=1 \{\ +. if \\n[#BIB_ALLOWS_HEADERS] \{ .HEADERS \} +. \} +.\" Collect bibliography title string for TOC +. nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ] +. af #TOC_ENTRY_PN \\g[#PAGENUMBER] +. ds $TOC_TITLE_ITEM \\*[$BIB_STRING]\\| +. ev TOC_EV +. da TOC_ENTRIES +. if \\n[#PRINT_STYLE]=1 \{\ +. TYPEWRITER +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +\!. FAMILY \\*[$TOC_TITLE_FAM] +\!. FT \\*[$TOC_TITLE_FT] +\!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_TITLE_SIZE_CHANGE] +. \} +\!. TRAP OFF +. ie \\n[#PRINT_STYLE]=1 \{\ +\!. PAD "\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN_TYPEWRITE]" +. \} +. el \{\ +\!. PAD "\\h'\\n[#TOC_TITLE_INDENT]u'\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN]" +. \} +\!. EOL +\!. ST 100 L +\!. ST 101 R +. if \\n[#PRINT_STYLE]=2 \{\ +\!. FAMILY \\*[$TOC_PN_FAM] +\!. FT \\*[$TOC_PN_FT] +\!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_PN_SIZE_CHANGE] +. \} +\!. TAB 100 +\!. PRINT \\*[LEADER] +\!. TN +\!. TRAP +\!. PRINT \\n[#TOC_ENTRY_PN] +\!. TQ +. di +. ev +.\" End collection of bibliography title string for TOC +.\" Process bibliography +. if \\n[#PRINT_STYLE]=1 \{ .vs \\n[#BIB_LEAD]u \} +. if \\n[#PRINT_STYLE]=2 \{\ +. if \\n[#BIB_NO_COLS] \{\ +. if \\n[#COLUMNS] \{ .nr #COLUMNS_WERE_ON 1 \} +. nr #COLUMNS 0 +. \} +. nr #RESTORE_DOC_LEAD \\n[#DOC_LEAD] +. ie \\n[#ADJ_BIB_LEAD] \{\ +. nr #DOC_LEAD \\n[#BIB_LEAD] +. \} +. el \{ .DOC_LEAD \\n[#BIB_LEAD]u \} +. \} +. PRINT \& +. ie r#BIB_TITLE_SPACE \{ .sp |\\n[#BIB_TITLE_SPACE]u \} +. el \{ .sp |\\n[#T_MARGIN]u \} +. mk ec +. if \\n[#SLANT_ON] \{\ +\*[SLANTX]\c +. \} +. if !'\\*[$BIB_STRING]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. TYPEWRITER +. vs \\n[#BIB_LEAD]u +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if \\n[#COLUMNS] \{\ +. ie \\n[#BIB_NO_COLS] \{ .LL \\n[#DOC_L_LENGTH]u \} +. el \{ .LL \\n[#COL_L_LENGTH]u \} +. ta \\n(.lu +. \} +. FAMILY \\*[$BIB_STRING_FAM] +. FT \\*[$BIB_STRING_FT] +. PT_SIZE \\n[#BIB_PS]u\\*[$BIB_STRING_SIZE_CHANGE] +. vs \\n[#BIB_LEAD]u +. \} +. if '\\*[$BIB_STRING_QUAD]'L' \{ .LEFT \} +. if '\\*[$BIB_STRING_QUAD]'LEFT' \{ .LEFT \} +. if '\\*[$EN_STRING_QUAD]'C' \{ .CENTER \} +. if '\\*[$BIB_STRING_QUAD]'CENTER' \{ .CENTER \} +. if '\\*[$BIB_STRING_QUAD]'CENTRE' \{ .CENTER \} +. if '\\*[$BIB_STRING_QUAD]'R' \{ .RIGHT \} +. if '\\*[$BIB_STRING_QUAD]'RIGHT' \{ .RIGHT \} +. EOL +. if \\n[#BIB_STRING_CAPS] \{ .CAPS \} +. ie \\n[#BIB_STRING_UNDERSCORE] \{\ +. ie \\n[#BIB_STRING_UNDERSCORE]=2 \{\ +. UNDERSCORE2 "\\*[$BIB_STRING] +. \} +. el \{\ +. UNDERSCORE "\\*[$BIB_STRING] +. \} +. \} +. el \{\ +. PRINT "\\*[$BIB_STRING] +. \} +. \} +. CAPS OFF +. FAMILY \\*[$BIB_FAMILY] +. FT \\*[$BIB_FT] +. PT_SIZE -\\*[$BIB_STRING_SIZE_CHANGE] +. if \\n[#PRINT_STYLE]=1 \{\ +. ie \\n[#SINGLE_SPACE]=1 \{\ +. ALD \\n[#BIB_LEAD]*3u +. \} +. el \{\ +. ie \\n[#BIB_SINGLESPACE]=1 \{\ +. ALD \\n[#BIB_LEAD]u*3u +. \} +. el \{\ +. ALD \\n[#BIB_LEAD]u +. \} +. \} +. \} +. if \\n[#PRINT_STYLE]=2 \{ .ALD \\n[#BIB_LEAD]u*2u \} +. QUAD \\*[$BIB_QUAD] +. if \\n[#PRINT_STYLE]=1 \{\ +. ie \\n[#SINGLE_SPACE]=1 \{\ +. vs \\n[#BIB_LEAD]u +. \} +. el \{\ +. ie \\n[#BIB_SINGLESPACE]=1 \{\ +. vs \\n[#BIB_LEAD]u +. \} +. el \{\ +. vs \\n[#BIB_LEAD]u +. \} +. \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. ie \\n[#ADJ_BIB_LEAD] \{\ +. nr #DOC_LEAD \\n[#RESTORE_DOC_LEAD] +. \} +. el \{ .DOC_LEAD \\n[#RESTORE_DOC_LEAD]u \} +. rr #RESTORE_DOC_LEAD +. \} +. if \\n[#COLUMNS_WERE_ON] \{ .nr #COLUMNS 1 \} +. if \\n[#HEADER_STATE]=1 \{ .HEADERS \} +. rr #BIBLIOGRAPHY +. if \\n[#LINENUMBERS]=2 \{\ +. NUMBER_LINES RESUME +. nr #LINENUMBERS 1 +. \} +.END \# -\# TOC ENTRIES PAGE NUMBER FONT -\# ---------------------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $TOC_PN_FT. -\# *Notes: -\# Default is roman. +\# ==================================================================== \# -.MAC TOC_PN_FONT END -. ds $TOC_PN_FT \\$1 -.END +\# +++TABLE OF CONTENTS+++ \# +\# Strings to allocate space for leaders and entry page numbers \# -\# TOC ENTRIES PAGE NUMBER SIZE -\# ---------------------------- +.ds $TOC_PN \\*[ST100]\\F[\\*[$TOC_PN_FAM]]\\f[\\*[$TOC_PN_FT]]\\s[\\n[#TOC_PS]u]#\\*[ST100X]\\*[ST101]\\s[\\*[$TOC_PN_SIZE_CHANGE]]\\|\\h'\\w'0'u*\\n[#TOC_PN_PADDING]u'\*[ST101X] +.ds $TOC_PN_TYPEWRITE \\*[ST100]#\\*[ST100X]\\*[ST101]\\|\\h'\\w'0'u*\\n[#TOC_PN_PADDING]u'\\*[ST101X] +\# +\# TOC ENTRIES PAGE NUMBERS PADDING +\# -------------------------------- \# *Argument: -\# <+|- number of points by which to in/decrease toc -\# entries page numbers (relative to overall toc point size)> +\# \# *Function: -\# Creates or modifies string $TOC_PN_SIZE_CHANGE. +\# Creates or modifies register #TOC_PN_PADDING. \# *Notes: -\# Default is +0. -\# -.MAC TOC_PN_SIZE END -. ds $TOC_PN_SIZE_CHANGE \\$1 -.END -\# -\# -\# Control macros for toc doc titles, heads, subheads and paraheads -\# ---------------------------------------------------------------- +\# "Placeholders" is the maximum number of digits in a page +\# number numeral. \# -\# All these control macros behave the same way, setting the family, -\# font, point size and indent from the left margin of the different -\# kinds of entries that can appear in the toc. The way they -\# operate is identical to all other _FAMILY, _FONT and _SIZE -\# control macros. _INDENT takes an absolute value. -\# TOC_APPENDS_AUTHORS is unique in this section. -\# -\# - for title entries +\# Default is 3. \# -.MAC TOC_TITLE_FAMILY END -. ds $TOC_TITLE_FAM \\$1 +.MAC TOC_PADDING END +. nr #TOC_PN_PADDING \\$1 .END \# \# -.MAC TOC_TITLE_FONT END -. ds $TOC_TITLE_FT \\$1 -.END -\# +\# PAGINATE TOC +\# ------------ +\# *Argument: +\# | +\# *Function: +\# Creates or removes register #PAGINATE_TOC. +\# *Notes: +\# Default is to paginate toc. \# -.MAC TOC_TITLE_SIZE END -. ds $TOC_TITLE_SIZE_CHANGE \\$1 +.MAC PAGINATE_TOC END +. ie '\\$1'' \{ .nr #PAGINATE_TOC 1 \} +. el \{ .nr #PAGINATE_TOC 0 \} .END \# \# -.MAC TOC_TITLE_INDENT END -. nr #TOC_TITLE_INDENT (\\$1) -.END +\# TOC POINT SIZE +\# -------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies register #TOC_PS. +\# *Notes: +\# This size control macro differs from other size control macros +\# in that it sets an absolute point size, not a relative one. +\# See notes for ENDNOTE_PT_SIZE for explanation. No unit of +\# measure required. \# +\# No unit of measure required (points assumed). Default is 11.5 +\# for TYPESET. \# -.MAC TOC_TITLE_ENTRY END -. nr #USER_SET_TITLE_ITEM 1 -. ds $USER_SET_TITLE_ITEM \\$1 +.MAC TOC_PT_SIZE END +. nr #TOC_PS (p;\\$1) .END \# \# -\# APPEND AUTHOR(S) TO TOC DOC TITLE ENTRIES -\# ----------------------------------------- +\# TOC LEADING +\# ----------- \# *Argument: -\# | +\# [ADJUST] \# *Function: -\# Creates register #TOC_AUTHORS (to tell TOC to append authors -\# to toc doc title entries). Optionally creates string -\# $TOC_AUTHORS. +\# Creates or modifies register #TOC_LEAD. If optional ADJUST +\# given, adjusts lead to fill page. If #OK_PROCESS_LEAD doesn't +\# exist, stores arguments for when it's okay to run the macro. \# *Notes: -\# Normally, TOC does not append the author(s) to a toc doc title -\# entry. This special macro instructs TOC to do so. +\# No unit of measure required (points assumed). \# -\# If user has multiple authors for each doc when collating, -\# TOC_APPENDS_AUTHOR "" must be inserted somewhere between -\# COLLATE and START in each doc. Otherwise, mom prints only the -\# first author given to AUTHOR. +\# Default is same as DOC_LEAD. \# -.MAC TOC_APPENDS_AUTHOR END -. nr #TOC_AUTHORS 1 -. if !'\\$1'' \{\ -. ds $TOC_AUTHORS \\$1 +.MAC TOC_LEAD END +. if !\\n[#OK_PROCESS_LEAD] \{\ +. ds $TOC_LEAD \\$1 +. if !'\\$2'' \{\ +. ds $ADJUST_TOC_LEAD \\$2 +. \} +. return +. \} +. rr #ADJ_TOC_LEAD +. nr #TOC_LEAD (p;\\$1) +. if '\\$2'ADJUST' \{\ +. nr #ORIG_DOC_LEAD \\n[#DOC_LEAD] +. nr #RESTORE_ADJ_DOC_LEAD \\n[#ADJ_DOC_LEAD] +. nr #ADJ_DOC_LEAD 1 +. nr #ADJ_TOC_LEAD 1 +. nr #NO_TRAP_RESET 1 +. DOC_LEAD \\n[#TOC_LEAD]u ADJUST +. nr #TOC_LEAD \\n[#DOC_LEAD] +. DOC_LEAD \\n[#ORIG_DOC_LEAD]u +. rr #NO_TRAP_RESET +. nr #ADJ_DOC_LEAD \\n[#RESTORE_ADJ_DOC_LEAD] +. rr #ORIG_DOC_LEAD . \} .END \# -\# - for head entries \# -.MAC TOC_HEAD_FAMILY END -. ds $TOC_HEAD_FAM \\$1 -.END +\# TOC PAGES PAGE-NUMBERING STYLE +\# ------------------------------ +\# *Argument: +\# DIGIT | ROMAN | roman | ALPHA | alpha +\# *Function: +\# Creates or modifies string $TOC_PN_STYLE +\# *Notes: +\# Page numbering style for page numbers that appear in the +\# headers/footers of toc pages. See notes for PAGENUM_STYLE. \# +\# Default is roman. \# -.MAC TOC_HEAD_FONT END -. ds $TOC_HEAD_FT \\$1 +.MAC TOC_PAGENUM_STYLE END +. ds $TOC_PN_STYLE \\$1 .END \# \# -.MAC TOC_HEAD_SIZE END -. ds $TOC_HEAD_SIZE_CHANGE \\$1 +\# TOC RECTO_VERSO SWITCH +\# ---------------------- +\# *Argument: +\# | +\# *Function: +\# Creates or removes register #TOC_RV_SWITCH +\# *Notes: +\# Allows switching of L/R margins if a doc is recto/verso and +\# the first toc page happens to fall the wrong way +\# +.MAC TOC_RV_SWITCH END +. ie '\\$1'' \{ .nr #TOC_RV_SWITCH 1 \} +. el \{ .rr #TOC_RV_SWITCH \} .END \# +\# - for TOC "doc header" (i.e. "Contents") \# -.MAC TOC_HEAD_INDENT END -. nr #TOC_HEAD_INDENT (\\$1) +\# TOC HEADER STRING +\# ----------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $TOC_HEADER_STRING +\# *Notes: +\# Default is "Contents". +\# +.MAC TOC_HEADER_STRING END +. ds $TOC_HEADER_STRING \\$1 .END \# -\# - for subhead entries +\# - for TOC entries page number numerals \# -.MAC TOC_SUBHEAD_FAMILY END -. ds $TOC_SH_FAM \\$1 -.END +\# Control macros for toc doc titles, heads, subheads and paraheads +\# ---------------------------------------------------------------- \# +\# All these control macros behave the same way, setting the family, +\# font, point size and indent from the left margin of the different +\# kinds of entries that can appear in the toc. The way they +\# operate is identical to all other _FAMILY, _FONT and _SIZE +\# control macros. _INDENT takes an absolute value. +\# TOC_APPENDS_AUTHORS is unique in this section. +\# +\# - for title entries \# -.MAC TOC_SUBHEAD_FONT END -. ds $TOC_SH_FT \\$1 +.MAC TOC_TITLE_INDENT END +. nr #TOC_TITLE_INDENT (\\$1) .END \# \# -.MAC TOC_SUBHEAD_SIZE END -. ds $TOC_SH_SIZE_CHANGE \\$1 +.MAC TOC_TITLE_ENTRY END +. nr #USER_SET_TITLE_ITEM 1 +. ds $USER_SET_TITLE_ITEM \\$1 .END \# \# -.MAC TOC_SUBHEAD_INDENT END -. nr #TOC_SH_INDENT (\\$1) -.END +\# APPEND AUTHOR(S) TO TOC DOC TITLE ENTRIES +\# ----------------------------------------- +\# *Argument: +\# | +\# *Function: +\# Creates register #TOC_AUTHORS (to tell TOC to append authors +\# to toc doc title entries). Optionally creates string +\# $TOC_AUTHORS. +\# *Notes: +\# Normally, TOC does not append the author(s) to a toc doc title +\# entry. This special macro instructs TOC to do so. \# -\# - for parahead entries +\# If user has multiple authors for each doc when collating, +\# TOC_APPENDS_AUTHOR "" must be inserted somewhere between +\# COLLATE and START in each doc. Otherwise, mom prints only the +\# first author given to AUTHOR. \# -.MAC TOC_PARAHEAD_FAMILY END -. ds $TOC_PH_FAM \\$1 +.MAC TOC_APPENDS_AUTHOR END +. nr #TOC_AUTHORS 1 +. if !'\\$1'' \{\ +. ds $TOC_AUTHORS \\$1 +. \} .END \# +\# - for head entries \# -.MAC TOC_PARAHEAD_FONT END -. ds $TOC_PH_FT \\$1 +.MAC TOC_HEAD_INDENT END +. nr #TOC_HEAD_INDENT (\\$1) .END \# +\# - for subhead entries \# -.MAC TOC_PARAHEAD_SIZE END -. ds $TOC_PH_SIZE_CHANGE \\$1 +.MAC TOC_SUBHEAD_INDENT END +. nr #TOC_SH_INDENT (\\$1) .END \# +\# - for parahead entries \# .MAC TOC_PARAHEAD_INDENT END . nr #TOC_PH_INDENT (\\$1) @@ -11181,6 +13062,10 @@ E\\R'#CAP_HEIGHT \\n[.cht]' \# \# .MAC TOC END +. if \\n[#LINENUMBERS]=1 \{\ +. NUMBER_LINES OFF +. nr #LINENUMBERS 2 +. \} . if !r#PAGINATE_TOC \{ .PAGINATE_TOC \} . nr #TOC_FIRST_PAGE 1 . if \\n[#FINIS] \{\ @@ -11189,7 +13074,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . \} . \} . if \\n[#FOOTERS_ON]=1 \{\ -. if !'\\*[$HDRFTR_CENTER_OLD]'' \{ .ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_OLD] \} +. if !'\\*[$HDRFTR_CENTER_OLD]'' .ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_OLD] . ie \\n[#PAGINATE_TOC]=1 \{ .PAGINATE \} . el \{ .PAGINATION OFF \} . \} @@ -11219,6 +13104,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . DOC_LEAD 24 ADJUST . nr #IGNORE 1 . \} +. if \\n[#LINENUMBERS]=2 \{ .nr #LINENUMBERS 3 \} . START . PP . nr #COLUMNS 0 @@ -11238,9 +13124,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . QUAD \\*[$TOC_HEADER_QUAD] . PAGENUM_STYLE \\*[$TOC_PN_STYLE] . if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 +. TYPEWRITER . \} . if \\n[#PRINT_STYLE]=2 \{\ . FAMILY \\*[$TOC_HEADER_FAM] @@ -11259,9 +13143,9 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . \} . LEFT . SP -\# In collated docs, this bit inserts the first doc's title -\# underneath the TOC header, before the TOC_ENTRIES diversion -\# gets output. +.\" In collated docs, this bit inserts the first doc's title +.\" underneath the TOC header, before the TOC_ENTRIES diversion +.\" gets output. . nf . if d$FIRST_DOC_TITLE \{\ . nr #RESTORE_TOC_PN_PADDING \\n[#TOC_PN_PADDING] @@ -11277,7 +13161,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . el \{\ . PAD "\\h'\\n[#TOC_TITLE_INDENT]u'\\*[$FIRST_DOC_TITLE]\\*[$TOC_PN]" . \} -. EL +. EOL . ST 100 L . ST 101 R . if \\n[#PRINT_STYLE]=2 \{\ @@ -11296,6 +13180,11 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . TOC_ENTRIES . br . rr #TOC +. if \\n[#LINENUMBERS]=3 \{\ +. NUMBER_LINES RESUME +. nr #LINENUMBERS 1 +. nn 1 +. \} .END \# \# ==================================================================== @@ -11323,6 +13212,9 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . while !\\n[#COL_NUM]=\\n[#NUM_COLS] \{\ . nr #COL_\\n+[#COL_NUM]_L_MARGIN \\n[#L_MARGIN]+\\n[#COL_TOTAL] . nr #COL_TOTAL \\n+[#COL_TOTAL] +.\} +. if \\n[#NUM_COLS]=1 \{\ +. if !\\n[#COLLATE]=1 \{ .MN_INIT \} . \} . rr #COL_TOTAL . rr #COL_NUM @@ -11360,7 +13252,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]' \# LIST \# ---- \# *Arguments: -\# [ BULLET | DASH | DIGIT | ALPHA | USER ] [ ] [ ] +\# [ BULLET | DASH | DIGIT | alpha | ALPHA | roman | ROMAN | USER ] [ | NONE ] [ ] [ ] \# *Function: \# Stores indent information in effect prior to invocation and \# initializes a list with the supplied enumerator (and separator). @@ -11372,9 +13264,33 @@ E\\R'#CAP_HEIGHT \\n[.cht]' \# desired. \# \# moves back one list level intuitively, or exits lists -\# completely if the level at which it's invoked is the first. +\# completely if the level in which it's invoked is the first. \# .MAC LIST END +. ds $1ST_LETTER \\$1 +. substring $1ST_LETTER 0 0 +. if '\\*[$1ST_LETTER]'r' .ds $1ST_LETTER R +. ie '\\*[$1ST_LETTER]'R' \{\ +. ds $LAST_CHAR \\$1 +. substring $LAST_CHAR -1 +. if !\B'\\*[$LAST_CHAR]' \{\ +. tm1 "[mom]: You must append a number to the \\$1 argument to LIST at line \\n(.c. +. tm1 " The number should be the total number of items in this list. +. tm1 " See the documentation. +. ab Aborting LIST +. \} +. ds $ROMAN_WIDTH \\$1 +. substring $ROMAN_WIDTH 1 +. while !\B'\\*[$ROMAN_WIDTH]' \{\ +. substring $ROMAN_WIDTH 1 +.\} +. length #ROMAN_LENGTH \\*[$ROMAN_WIDTH] +. ds $LIST_ARG_1 \\$1 +. substring $LIST_ARG_1 0 -(\\n[#ROMAN_LENGTH]+1) +. \} +. el \{\ +. ds $LIST_ARG_1 \\$1 +. \} . if !r#DEPTH \{\ . nr #STORED_HL_INDENT \\n[#HL_INDENT] . nr #STORED_T_INDENT \\n[#T_INDENT] @@ -11406,45 +13322,93 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . if \\n[#NUM_ARGS]=0 \{\ . nr #ARGS_TO_LIST 1 \" So default behaves as if LIST BULLET . ds $ENUMERATOR\\n+[#DEPTH] \(bu +. ds $ENUMERATOR_TYPE\\n[#DEPTH] other . ds $SEPARATOR . \} . if \\n[#NUM_ARGS]>0 \{\ . rr #ARGS_TO_LIST \" Clear this before processing arg 1. -. if '\\$1'DASH' \{\ +. if '\\*[$LIST_ARG_1]'DASH' \{\ . nr #ARGS_TO_LIST 1 . ds $ENUMERATOR\\n+[#DEPTH] \(en +. ds $ENUMERATOR_TYPE\\n[#DEPTH] other . ds $SEPARATOR\\n[#DEPTH] . \} -. if '\\$1'BULLET' \{\ +. if '\\*[$LIST_ARG_1]'BULLET' \{\ . nr #ARGS_TO_LIST 1 . ds $ENUMERATOR\\n+[#DEPTH] \(bu +. ds $ENUMERATOR_TYPE\\n[#DEPTH] other . ds $SEPARATOR\\n[#DEPTH] . \} -. if '\\$1'DIGIT' \{\ +. if '\\*[$LIST_ARG_1]'DIGIT' \{\ . nr #ARGS_TO_LIST 1 . nr #ENUMERATOR\\n+[#DEPTH] 0 1 . ds $ENUMERATOR_TYPE\\n[#DEPTH] register . ds $SEPARATOR\\n[#DEPTH] . -. if \\n[#NUM_ARGS]=2 \{\ -. ie '\\$2'NONE' \{ .ds $SEPARATOR\\n[#DEPTH]\} -. el \{ .ds $SEPARATOR\\n[#DEPTH] \\$2\} +. ds $PREFIX\\n[#DEPTH] +. if \\n[#NUM_ARGS]>=2 \{\ +. ie '\\$2'NONE' .ds $SEPARATOR\\n[#DEPTH] +. el .ds $SEPARATOR\\n[#DEPTH] \\$2 +. if \\n[#NUM_ARGS]=3 \{\ +. ds $PREFIX\\n[#DEPTH] \\$3 +. \} . \} . \} -. if '\\$1'ALPHA' \{\ +. if '\\*[$LIST_ARG_1]'alpha' \{\ . nr #ARGS_TO_LIST 1 . nr #ENUMERATOR\\n+[#DEPTH] 0 1 . af #ENUMERATOR\\n[#DEPTH] a . ds $ENUMERATOR_TYPE\\n[#DEPTH] register . ds $SEPARATOR\\n[#DEPTH] ) -. if \\n[#NUM_ARGS]=2 \{\ -. ie '\\$2'NONE' \{ .ds $SEPARATOR\\n[#DEPTH]\} -. el \{ .ds $SEPARATOR\\n[#DEPTH] \\$2\} +. ds $PREFIX\\n[#DEPTH] +. if \\n[#NUM_ARGS]>=2 \{\ +. ie '\\$2'NONE' .ds $SEPARATOR\\n[#DEPTH] +. el .ds $SEPARATOR\\n[#DEPTH] \\$2 +. if \\n[#NUM_ARGS]=3 \{\ +. ds $PREFIX\\n[#DEPTH] \\$3 +. \} +. \} +. \} +. if '\\*[$LIST_ARG_1]'ALPHA' \{\ +. nr #ARGS_TO_LIST 1 +. nr #ENUMERATOR\\n+[#DEPTH] 0 1 +. af #ENUMERATOR\\n[#DEPTH] A +. ds $ENUMERATOR_TYPE\\n[#DEPTH] register +. ds $SEPARATOR\\n[#DEPTH] ) +. ds $PREFIX\\n[#DEPTH] +. if \\n[#NUM_ARGS]>=2 \{\ +. ie '\\$2'NONE' .ds $SEPARATOR\\n[#DEPTH] +. el .ds $SEPARATOR\\n[#DEPTH] \\$2 +. if \\n[#NUM_ARGS]=3 \{\ +. ds $PREFIX\\n[#DEPTH] \\$3 +. \} +. \} +. \} +. if '\\*[$1ST_LETTER]'R' \{\ +. nr #ARGS_TO_LIST 1 +. nr #ENUMERATOR\\n+[#DEPTH] 0 1 +. if '\\*[$LIST_ARG_1]'roman' \{\ +. af #ENUMERATOR\\n[#DEPTH] i +. \} +. if '\\*[$LIST_ARG_1]'ROMAN' \{\ +. af #ENUMERATOR\\n[#DEPTH] I +. \} +. ds $ENUMERATOR_TYPE\\n[#DEPTH] roman +. ds $SEPARATOR\\n[#DEPTH] ) +. ds $PREFIX\\n[#DEPTH] +. if \\n[#NUM_ARGS]>=2 \{\ +. ie '\\$2'NONE' .ds $SEPARATOR\\n[#DEPTH] +. el .ds $SEPARATOR\\n[#DEPTH] \\$2 +. if \\n[#NUM_ARGS]=3 \{\ +. ds $PREFIX\\n[#DEPTH] \\$3 +. \} . \} . \} -. if '\\$1'USER' \{\ +. if '\\*[$LIST_ARG_1]'USER' \{\ . nr #ARGS_TO_LIST 1 . ds $ENUMERATOR\\n+[#DEPTH] \\$2 +. ds $ENUMERATOR_TYPE\\n[#DEPTH] other . ds $SEPARATOR\\n[#DEPTH] +. ds $PREFIX\\n[#DEPTH] . \} . if \\n[#NUM_ARGS]=1 \{\ . if !r#ARGS_TO_LIST \{\ @@ -11470,11 +13434,17 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . \} . \} . nr #TOTAL_LISTS \\n[#DEPTH] -. ie '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'register' \{\ -. nr #LIST_INDENT\\n[#DEPTH] \\w'm\\*[$SEPARATOR\\n[#DEPTH]]\\ ' +. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'register' \{\ +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]m\\*[$SEPARATOR\\n[#DEPTH]]\ ' +. if '\\*[$LIST_ARG_1]'ALPHA'\{\ +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]M\\*[$SEPARATOR\\n[#DEPTH]]\ ' +. \} . \} -. el \{\ -. nr #LIST_INDENT\\n[#DEPTH] \\w'\\*[$ENUMERATOR\\n[#DEPTH]]\\0' +. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'roman' \{\ +. GET_ROMAN_INDENT +. \} +. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'other' \{\ +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$ENUMERATOR\\n[#DEPTH]]\0' . \} . LL \\n[#CURRENT_L_LENGTH]u . ie \\n[#DEPTH]=1 \{\ @@ -11520,40 +13490,316 @@ E\\R'#CAP_HEIGHT \\n[.cht]' \# receive the text of an item. \# .MAC ITEM END -. KERN OFF +. if \\n[#LINENUMBERS]=1 \{\ +. NUMBER_LINES OFF +. nr #LINENUMBERS 2 +. \} +. if \\n[#KERN]=1 \{\ +. nr #KERN_WAS_ON 1 +. KERN OFF +. \} . IL . ll \\n[#CURRENT_L_LENGTH]u \" Set ll again because IL turns IB off. . TRAP OFF . HI \\n[#HL_INDENT\\n[#DEPTH]]u -. ie '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'register' \{\ -. ie '\\g[#ENUMERATOR\\n[#DEPTH]]'0' \{\ +. if '\\*[$SEPARATOR\\n[#DEPTH]]')' \{ .nr #SEP_TYPE 1 \} +. if '\\*[$SEPARATOR\\n[#DEPTH]]']' \{ .nr #SEP_TYPE 1 \} +. if '\\*[$SEPARATOR\\n[#DEPTH]]'}' \{ .nr #SEP_TYPE 1 \} +. ie \\n[#IN_BIB_LIST]=1 \{\ +. ie \\n[#ENUMERATOR\\n[#DEPTH]]<9 \{\ +. ie \\n[#SEP_TYPE]=1 \{\ +. PRINT \v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\\n+[#ENUMERATOR\\n[#DEPTH]]\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m' +. \} +. el \{\ +. PRINT \\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. \} +. \} +. el \{\ +. ie \\n[#SEP_TYPE]=1 \{\ +. PRINT \h'-\w'\0'u'\v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\\n+[#ENUMERATOR\\n[#DEPTH]]\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m' +. \} +. el \{\ +. PRINT \h'-\w'\0'u'\\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. \} +. \} +. \} +. el \{\ +. ie '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'register' \{\ +.\" DIGIT +. ie '\\g[#ENUMERATOR\\n[#DEPTH]]'0' \{\ +. ie \\n[#PAD_LIST_DIGITS\\n[#DEPTH]]=1 \{\ +. ie \\n[#ENUMERATOR\\n[#DEPTH]]<9 \{\ +. ie \\n[#SEP_TYPE]=1 \{\ +. PRINT \0\v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\\n+[#ENUMERATOR\\n[#DEPTH]]\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m' +. \} +. el \{\ +. PRINT \0\\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. \} +. \} +. el \{\ +. ie \\n[#SEP_TYPE]=1 \{\ +. PRINT \v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\\n+[#ENUMERATOR\\n[#DEPTH]]\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m' +. \} +. el \{\ +. PRINT \\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. \} +. \} +. \} +. el \{\ +. ie \\n[#SEP_TYPE]=1 \{\ +. PRINT \v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\\n+[#ENUMERATOR\\n[#DEPTH]]\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m' +. \} +. el \{\ +. PRINT \\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. \} +. \} +. \} +. el \{\ +.\" ALPHA +. ie '\\g[#ENUMERATOR\\n[#DEPTH]]'A' \{\ +. ie \\n[#SEP_TYPE]=1 \{\ +. PRINT \v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\\n+[#ENUMERATOR\\n[#DEPTH]]\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m' +. \} +. el \{\ +. PRINT \\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. \} +. \} +.\" alpha +. el \{\ +. PRINT \\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. \} +. \} +. \} +. \} +. el \{\ +. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'roman' \{\ . ie \\n[#PAD_LIST_DIGITS\\n[#DEPTH]]=1 \{\ -. ie \\n[#ENUMERATOR\\n[#DEPTH]]<9 \{\ -. PRINT \\0\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +.\" ROMAN I, padded +. ie '\\g[#ENUMERATOR\\n[#DEPTH]]'I' \{\ +. ie \\n[#SEP_TYPE]=1 \{\ +. PRINT "\h'\\n[#LIST_INDENT\\n[#DEPTH]]u'\h'-\w'\\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\n[#SEPARATOR\\n[#DEPTH]]\ 'u'\v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\\n[#ENUMERATOR\\n[#DEPTH]]\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m' +. \} +. el \{\ +. PRINT "\h'\\n[#LIST_INDENT\\n[#DEPTH]]u'\h'-\w'\\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\n[#SEPARATOR\\n[#DEPTH]]\ 'u'\\*[$PREFIX\\n[#DEPTH]]\\n[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. \} . \} +.\" roman i, padded . el \{\ -. PRINT \\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. PRINT "\h'\\n[#LIST_INDENT\\n[#DEPTH]]u'\h'-\w'\\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\n[#SEPARATOR\\n[#DEPTH]]\ 'u'\\*[$PREFIX\\n[#DEPTH]]\\n[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] . \} . \} +.\" No pad . el \{\ -. PRINT \\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +.\" ROMAN I, no pad +. ie '\\g[#ENUMERATOR\\n[#DEPTH]]'I' \{\ +. ie \\n[#SEP_TYPE]=1 \{\ +. PRINT \v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\\n+[#ENUMERATOR\\n[#DEPTH]]\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m' +. \} +. el \{\ +. PRINT \\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. \} +. \} +.\" roman i, no pad +. el \{\ +. PRINT \\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. \} . \} . \} -. el \{\ -. PRINT \\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'other' \{\ +. PRINT \\*[$ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] . \} . \} -. el \{\ -. PRINT \\*[$ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. rr #SEP_TYPE +. EOL +. if \\n[#REF]=1 \{\ +. IL +\\*[$REF_BIB_INDENT] +. ti \\n[#L_INDENT]u-\\*[$REF_BIB_INDENT] . \} -. EL . TRAP -. KERN +. if \\n[#KERN_WAS_ON]=1 \{\ +. KERN +. rr #KERN_WAS_ON +. \} +. if \\n[#LINENUMBERS]=2 \{\ +. NUMBER_LINES RESUME +. nr #LINENUMBERS 1 +. \} .END \# +\# A utility macro that determines the space to reserve for +\# roman numeral enumerated lists. Limit is 20 roman numerals +\# per list. If this isn't enough, the user can add to the +\# macro. +\# +.MAC GET_ROMAN_INDENT END +. if '\\*[$LIST_ARG_1]'roman' \{\ +. if '\\*[$ROMAN_WIDTH]'1' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 1 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]i\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'2' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 2 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]ii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'3' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 3 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]iii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'4' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 4 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]iii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'5' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 5 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]iii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'6' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 6 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]iii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'7' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 7 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]vii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'8' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 8 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]viii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'9' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 9 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]viii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'10' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 10 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]viii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'11' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 11 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]viii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'12' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 12 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]viii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'13' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 13 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]xiii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'14' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 14 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]xiii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'15' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 15 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]xiii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'16' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 16 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]xiii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'17' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 17 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]xvii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'18' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 18 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]xviii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'19' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 19 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]xviii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'20' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 20 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]xviii\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. \} +. if '\\*[$LIST_ARG_1]'ROMAN' \{\ +. if '\\*[$ROMAN_WIDTH]'1' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 1 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]I\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'2' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 2 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]II\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'3' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 3 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]III\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'4' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 4 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]IV\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'5' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 5 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]IV\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'6' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 6 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]IV\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'7' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 7 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]VII\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'8' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 8 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]VIII\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'9' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 9 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]VIII\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'10' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 10 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]VIII\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'11' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 11 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]VIII\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'12' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 12 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]VIII\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'13' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 13 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]XIII\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'14' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 14 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]XIV\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'15' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 15 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]XIV\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'16' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 16 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]XIV\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'17' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 17 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]XVII\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'18' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 18 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]XVIII\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'19' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 19 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]XVIII\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. if '\\*[$ROMAN_WIDTH]'20' \{\ +. ds $ROMAN_WIDTH\\n[#DEPTH] 20 +. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$PREFIX\\n[#DEPTH]]XVIII\\*[$SEPARATOR\\n[#DEPTH]]\0' +. \} +. \} +.END \# \# SHIFT LIST -\# --------- +\# ---------- \# *Arguments: \# \# *Function: @@ -11562,8 +13808,15 @@ E\\R'#CAP_HEIGHT \\n[.cht]' \# Requires a unit of measure. \# .MAC SHIFT_LIST END -. nr #LIST_INDENT\\n[#DEPTH] \\n[#L_INDENT]+(\\$1) -. nr #L_INDENT \\n[#LIST_INDENT\\n[#DEPTH]] +. ie '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'roman' \{\ +. nr #SHIFT_LIST\\n[#DEPTH] (\\$1) +. nr #LIST_INDENT\\n[#DEPTH] \\n(.i+\\n[#L_INDENT]+\\n[#SHIFT_LIST\\n[#DEPTH]] +. nr #L_INDENT \\n[#LIST_INDENT\\n[#DEPTH]] +. \} +. el \{\ +. nr #LIST_INDENT\\n[#DEPTH] \\n[#L_INDENT]+(\\$1) +. nr #L_INDENT \\n[#LIST_INDENT\\n[#DEPTH]] +. \} .END \# \# @@ -11582,6 +13835,12 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . nr #HL_INDENT\\n+[#DEPTH] +\\w'\\n[#ENUMERATOR\\n[#DEPTH]]' . if '\\$1'LEFT' \{ .nr #PAD_LIST_DIGITS\\n[#DEPTH] 1 \} . \} +. if '\\g[#ENUMERATOR\\n[#DEPTH]]'i' \{\ +. if '\\$1'LEFT' \{ .nr #PAD_LIST_DIGITS\\n[#DEPTH] 1 \} +. \} +. if '\\g[#ENUMERATOR\\n[#DEPTH]]'I' \{\ +. if '\\$1'LEFT' \{ .nr #PAD_LIST_DIGITS\\n[#DEPTH] 1 \} +. \} .END \# \# @@ -11593,7 +13852,8 @@ E\\R'#CAP_HEIGHT \\n[.cht]' \# Resets register enumerators to 1 or a. \# .MAC RESET_LIST END -. nr #ENUMERATOR\\n[#DEPTH] 0 1 +. ie '\\$1'' \{ .nr #ENUMERATOR\\n[#DEPTH] 0 1 \} +. el \{ .nr #ENUMERATOR\\n[#DEPTH] \\$1-1 1 \} .END \# \# @@ -11647,7 +13907,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . rr #SEPARATOR\\n[#REMOVE] . rm $ENUMERATOR_TYPE\\n[#REMOVE] . rr #PAD_LIST_DIGITS\\n[#REMOVE] -. \} +.\} . rr #REMOVE . rr #TOTAL_LISTS . rr #QUIT @@ -11674,8 +13934,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . nr #QUIT 1 . return . \} -. ie \\n[#NEXT_DEPTH_BACK]=1 \{ .nr #L_INDENT \\n[#LIST_INDENT1] \} -. el \{ .nr #L_INDENT -\\n[#LIST_INDENT\\n[#DEPTH]] \} +. nr #L_INDENT -\\n[#LIST_INDENT\\n[#DEPTH]] . nr #HL_INDENT \\n[#HL_INDENT\\n-[#DEPTH]] .END \# @@ -11709,7 +13968,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . \} . IQ CLEAR . TQ -\# Collect first doc's title for TOC +.\" Collect first doc's title for TOC . if \\n[#COLLATED_DOC]=0 \{\ . ie \\n[#USER_SET_TITLE_ITEM] \{\ . ds $FIRST_DOC_TITLE \\*[$USER_SET_TITLE_ITEM]\\| @@ -11745,9 +14004,10 @@ E\\R'#CAP_HEIGHT \\n[.cht]' . \} . nr #COLLATED_DOC 1 . \} -\# End title collection for TOC +.\" End title collection for TOC . LL \\n[#DOC_L_LENGTH]u . QUAD $DOC_QUAD +. nr #SAVED_DOC_LEAD \\n[#DOC_LEAD] . LS \\n[#DOC_LEAD]u \*[SLANTX] \*[CONDX] @@ -11763,357 +14023,1867 @@ E\\R'#CAP_HEIGHT \\n[.cht]' .END \# \# -\# OUTPUT BLANK PAGES -\# ------------------ -\# *Argument: -\# +\# NUMBER_LINES +\# ------------ +\# *Arguments: +\# [ [ ] ] +\# or +\# | RESUME +\# *Function: +\# Begin, suspend/turn off, or resume numbering of output lines. +\# +.MAC NUMBER_LINES END +. br +. if '\\n(.z'EPI_TEXT' \{ .return \} +. if '\\$1'' \{\ +. tm1 "[mom]: NUMBER_LINES at line \\n(.c has no argument. +. tm1 " Most likely, you have forgotten to give it a starting line number. +. ab Aborting on NUMBER_LINES. +. \} +. if !\\n[#LINENUMBERS]=2 \{ .nr #LINENUMBERS 1 \} +.\" Test whether the first arg is a digit. +. if \B'\\$1' \{\ +. nr #LN \\$1 +. ds $LN_NUM \\$1 +. if !'\\n(.z'' \{ .nr #RESTORE_LN_NUM 1 \} +. ie '\\$2'' \{\ +. if '\\*[$LN_INC]'' .ds $LN_INC 1 +. \} +. el .ds $LN_INC \\$2 +. ie '\\$3'' \{\ +. if '\\*[$LN_GUTTER]'' .ds $LN_GUTTER 2 +. \} +. el .ds $LN_GUTTER \\$3 +. \} +. ie !\\n[#LN] \{\ +.\" In other words, the first arg was not a digit. +. rr #LN +. ie '\\$1'RESUME' \{\ +. nm +0 +. \} +. el \{\ +. nm +. if !\\n[#LINENUMBERS]=2 \{ .rr #LINENUMBERS \} +. \} +. \} +. el \{\ +. nm \\*[$LN_NUM] \\*[$LN_INC] \\*[$LN_GUTTER] -3-\\*[$LN_GUTTER] +. if !'\\n(.z'' \{ .nr #DIVER_LN_OFF 1 \} +. \} +. rr #LN +.END +\# +\# +\# NUMBER QUOTE AND BLOCKQUOTE LINES AS PART OF RUNNING TEXT +\# --------------------------------------------------------- +\# *Argument: +\# | +\# *Function: +\# Sets #(B)QUOTE_LN to 1 if no argument, or a single numeric +\# argument, is given; otherwise, turns (BLOCK)QUOTE linenumbering +\# off. +\# *Notes: +\# #(B)QUOTE is checked for in QUOTE and BLOCKQUOTE. +\# The single numeric argument allows establishing a different gutter from +\# the one used for line numbers in running text. +\# +.MAC NUMBER_QUOTE_LINES END +. ie \\n[#NUM_ARGS]=0 \{ .nr #QUOTE_LN 1 \} +. el \{\ +. ie \B'\\$1' \{\ +. nr #QUOTE_LN 1 +. ds $Q_LN_GUTTER \\$1 +. \} +. el \{\ +. ie '\\$1'SILENT' \{ .nr #SILENT_QUOTE_LN 1 \} +. el \{\ +. rr #QUOTE_LN +. rr #SILENT_QUOTE_LN +. \} +. \} +. \} +.END +\# +\# +.MAC NUMBER_BLOCKQUOTE_LINES END +. ie \\n[#NUM_ARGS]=0 \{ .nr #BQUOTE_LN 1 \} +. el \{\ +. ie \B'\\$1' \{\ +. nr #BQUOTE_LN 1 +. ds $BQ_LN_GUTTER \\$1 +. \} +. el \{\ +. ie '\\$1'SILENT' \{ .nr #SILENT_BQUOTE_LN 1 \} +. el \{\ +. rr #BQUOTE_LN +. rr #SILENT_BQUOTE_LN +. \} +. \} +. \} +.END +\# +\# OUTPUT BLANK PAGES +\# ------------------ +\# *Argument: +\# +\# *Function: +\# Outputs blank pages. +\# *Notes: +\# If recto/verso, each page is recto/verso, even if there's +\# nothing on it. +\# +\# The argument to BLANKPAGE is non-optional. +\# +.MAC BLANKPAGE END +. nr #HOW_MANY \\$1 +. nr #PAGES 0 1 +. while \\n+[#PAGES]<=\\n[#HOW_MANY] \{\ +. if \\n[#HEADERS_ON]=1 \{\ +. nr #HEADERS_WERE_ON 1 +. HEADERS OFF +. \} +. if \\n[#PAGE_NUM_V_POS]=1 \{\ +. if \\n[#PAGINATE]=1 \{ .nr #PAGINATE_WAS_ON 1 \} +. PAGINATION OFF +. \} +. NEWPAGE +. PRINT \& +. if \\n[#FOOTERS_ON]=1 \{\ +. nr #FOOTERS_WERE_ON 1 +. FOOTERS OFF +. \} +. if \\n[#PAGE_NUM_V_POS]=2 \{\ +. if \\n[#PAGINATE]=1 \{ .nr #PAGINATE_WAS_ON 1 \} +. PAGINATION OFF +. \} +. if \\n[#HEADERS_WERE_ON] \{ .HEADERS \} +. if \\n[#PAGE_NUM_V_POS]=1 \{\ +. if \\n[#PAGINATE_WAS_ON] \{ .PAGINATE \} +. \} +.\} +. NEWPAGE +. if \\n[#FOOTERS_WERE_ON] \{ .FOOTERS \} +. if \\n[#PAGE_NUM_V_POS]=2 \{\ +. if \\n[#PAGINATE_WAS_ON] \{ .PAGINATE \} +. \} +. rr #HEADERS_WERE_ON +. rr #FOOTERS_WERE_ON +. rr #PAGINATE_WAS_ON +.END +\# +\# +\# SET TRAPS FOR HEADERS/FOOTERS/FOOTNOTES +\# --------------------------------------- +\# *Arguments: +\# +\# *Function: +\# Sets header/footer/footnotes/etc... traps. +\# +\# Calculates the number of lines that actually fit on a +\# page based on #B_MARGIN and resets page bottom trap to coincide +\# with the depth of that number of lines, or, if #ADJ_DOC_LEAD=1, +\# adjusts #DOC_LEAD so that the last line of text on a page falls +\# exactly on #B_MARGIN. +\# +.MAC TRAPS END +.\" Remove all header/footer traps +. if !\\n[#NO_TRAP_RESET] \{\ +. ch DO_T_MARGIN +. ch DO_B_MARGIN +. ch HEADER +. ch FOOTER +. ch FN_OVERFLOW_TRAP +.\" Plant header trap +. wh 0 HEADER +. \} +.\" Adjust lead so last line of text falls on B_MARGIN,... +. ie \\n[#ADJ_DOC_LEAD]=1 \{\ +. nr #LINES_PER_PAGE 0 1 +. nr #DOC_LEAD_ADJ 0 1 +. nr #DEPTH_TO_B_MARGIN \\n[#PAGE_LENGTH]-\\n[#ORIGINAL_B_MARGIN]-1v +.\" Get the number of unadjusted lines that fit on the page; always a +.\" bit short of the bottom margin +. while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]*\\n+[#LINES_PER_PAGE])<\\n[#DEPTH_TO_B_MARGIN] \{\ +. +.\} +. nr #LINES_PER_PAGE -1 +.\" Add machine units, 1 at a time, increasing the leading until the +.\" new leading fills the page properly +. while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]+\\n+[#DOC_LEAD_ADJ]*\\n[#LINES_PER_PAGE])<\\n[#DEPTH_TO_B_MARGIN] \{\ +. +.\} +. DOC_LEAD \\n[#DOC_LEAD]u+\\n[#DOC_LEAD_ADJ]u +.\" The "visual" bottom margin is what \n(nl would report on the +.\" last line before the FOOTER trap is sprung +. nr #VISUAL_B_MARGIN \\n[#T_MARGIN]+(\\n[#LINES_PER_PAGE]*\\n[#DOC_LEAD]) +.\" Get the difference between #B_MARGIN and #VISUAL_B_MARGIN +. nr #FOOTER_DIFF (\\n[#PAGE_LENGTH]-\\n[#B_MARGIN])-\\n[#VISUAL_B_MARGIN] +.\" Set #B_MARGIN to 1 machine unit lower on the page than #VISUAL_B_MARGIN +. nr #B_MARGIN \\n[#B_MARGIN]+(\\n[#FOOTER_DIFF]-1) +.\" Set the FN_OVERFLOW_TRAP position +. nr #FN_OVERFLOW_TRAP_POS \\n[#B_MARGIN]u-\\n[#FN_LEAD] +. if \\n[#PRINT_STYLE]=1 .nr #FN_OVERFLOW_TRAP_POS \\n[#ORIGINAL_B_MARGIN]u +. \} +.\" ...or calculate new B_MARGIN based on # of lines (at #DOC_LEAD) that fit +.\" on the page. +. el \{\ +. nr #LINES_PER_PAGE 0 1 +. nr #DEPTH_TO_B_MARGIN \\n[#PAGE_LENGTH]-\\n[#B_MARGIN]-1v +. while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]*\\n+[#LINES_PER_PAGE])<\\n[#DEPTH_TO_B_MARGIN] \{\ +. +.\} +. nr #VISUAL_B_MARGIN \\n[#T_MARGIN]+(\\n[#LINES_PER_PAGE]*\\n[#DOC_LEAD]-1v) +. nr #FOOTER_DIFF (\\n[#PAGE_LENGTH]-\\n[#B_MARGIN])-\\n[#VISUAL_B_MARGIN] +. nr #B_MARGIN \\n[#B_MARGIN]+(\\n[#FOOTER_DIFF]-1) +. nr #FN_OVERFLOW_TRAP_POS \\n[#B_MARGIN]u-\\n[#FN_LEAD] +. \} +.\" Set footer and footnote overflow traps +. if !\\n[#NO_TRAP_RESET] \{\ +. nr #FN_COUNT 0 1 +. nr #SPACE_REMAINING 0 +. nr #FN_DEPTH 0 +. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]u +. wh 20i FOOTER +. wh -(\\n[#FN_OVERFLOW_TRAP_POS]u) FN_OVERFLOW_TRAP +. ch FOOTER -\\n[#B_MARGIN]u +. \} +.END +\# +\# +\# CHECK INDENT +\# ------------ +\# *Arguments: +\# +\# *Function: +\# Adds left, right, or both indent values to document elements +\# like heads and subheads that are processed in environments. +\# +.MAC CHECK_INDENT END +. if \\n[#INDENT_LEFT_ACTIVE] \{\ +. in \\n[#L_INDENT]u +. if \\n[#QUOTE] \{\ +. in -\\n[#L_INDENT]u \"Because you added an indent in 2nd line of macro +. ll -\\n[#L_INDENT]u +. ta \\n(.lu +. \} +. if \\n[#EPIGRAPH] \{\ +. in -\\n[#L_INDENT]u +. ll -\\n[#L_INDENT]u +. ta \\n(.lu +. \} +. \} +. if \\n[#INDENT_RIGHT_ACTIVE] \{\ +. ll -\\n[#R_INDENT]u +. ta \\n(.lu +. \} +. if \\n[#INDENT_BOTH_ACTIVE] \{\ +. in \\n[#BL_INDENT]u +. ll -\\n[#BR_INDENT]u +. ta \\n(.lu +. if \\n[#QUOTE] \{\ +. in -\\n[#BL_INDENT]u +. ie \\n[#BR_INDENT]=\\n[#BL_INDENT] \{\ +. ll -\\n[#BR_INDENT]u +. ta \\n(.lu +. \} +. el \{\ +. ll -(\\n[#BR_INDENT]u/2u) +. ta \\n(.lu +. \} +. \} +. if \\n[#EPIGRAPH] \{\ +. in -\\n[#BL_INDENT]u +. ie \\n[#BR_INDENT]=\\n[#BL_INDENT] \{\ +. ll -\\n[#BR_INDENT]u +. ta \\n(.lu +. \} +. el \{\ +. ll -(\\n[#BR_INDENT]u/2u) +. ta \\n(.lu +. \} +. \} +. \} +.END +\# +\# +\# REMOVE INDENT +\# ------------- +\# *Arguments: +\# +\# *Function: +\# Removes left, right, or both indent values from document elements +\# like heads and subheads that are processed in environments. +\# +.MAC REMOVE_INDENT END +. in 0 +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +.END +\# +\# +\# This .em (for all DOC_TYPEs except 4 [LETTER]) ensures that +\# deferred footnotes that happen on the 2nd to last page get +\# output. +\# +.MAC TERMINATE END +. ie \\n[#FN_DEPTH] \{\ +. ie \\n[#FN_DEFER] \{\ +. br +. nr #TERMINATE 1 +. FOOTNOTE +. nf +. FOOTNOTE OFF +. \} +. el \{\ +. br +. ch FN_OVERFLOW_TRAP +. DO_B_MARGIN +. \} +. \} +. el \{\ +. br +. ch FN_OVERFLOW_TRAP +. DO_B_MARGIN +. \} +.END +\# +\# END MACRO FOR LETTERS +\# --------------------- +\# *Arguments: +\# none +\# *Function: +\# The .em macro executed at the end of letters. Turns footers +\# and pagination off, terminates and outputs diversion CLOSING +\# (indented with the author's name underneath). +\# +.MAC ALL_DONE END +. br +. FOOTERS OFF +. PAGINATION OFF +. if \\n[#DOC_TYPE]=4 \{\ +. br +. if !'\\n(.z'' \{ .di \} +. IQ CLEAR +. TQ +. TAB_SET 1 \\n[#DOC_L_LENGTH]u/2u \\n[#DOC_L_LENGTH]u/2u LEFT +. ALD \\n[#DOC_LEAD]u*2u +. TAB 1 +. if \\n[#CLOSING] \{\ +. nf +. CLOSING +. \} +. ALD \\n[#DOC_LEAD]u*3u +. PRINT \\*[$AUTHOR_1] +. \} +. DO_FOOTER +.END +\# +\# Set up a default papersize of US letter +\# +.PAPER LETTER +\# +\# ==================================================================== +\# +\# +++DOCUMENT PROCESSING ALIASES+++ +\# +\# Aliases to make life easier for users: synonyms, short forms +\# and alternate spellings. +\# +.ALIAS BREAK_BLOCKQUOTE BREAK_QUOTE +.ALIAS BREAK_CITATION BREAK_QUOTE +.ALIAS BREAK_CITE BREAK_QUOTE +.ALIAS BLOCKQUOTE_INDENT QUOTE_INDENT +.ALIAS CITATION BLOCKQUOTE +.ALIAS CITATION_FAMILY BLOCKQUOTE_FAMILY +.ALIAS CITATION_FONT BLOCKQUOTE_FONT +.ALIAS CITATION_SIZE BLOCKQUOTE_SIZE +.ALIAS CITATION_COLOR BLOCKQUOTE_COLOR +.ALIAS CITATION_QUAD BLOCKQUOTE_QUAD +.ALIAS CITE BLOCKQUOTE +.ALIAS CITE_FAMILY BLOCKQUOTE_FAMILY +.ALIAS CITE_FONT BLOCKQUOTE_FONT +.ALIAS CITE_SIZE BLOCKQUOTE_SIZE +.ALIAS CITE_COLOR BLOCKQUOTE_COLOR +.ALIAS CITE_QUAD BLOCKQUOTE_QUAD +.ALIAS DOC_R_MARGIN DOC_RIGHT_MARGIN +.ALIAS DOC_L_MARGIN DOC_LEFT_MARGIN +.ALIAS DOC_L_LENGTH DOC_LINE_LENGTH +.ALIAS DOC_RMARGIN DOC_RIGHT_MARGIN +.ALIAS DOC_LMARGIN DOC_LEFT_MARGIN +.ALIAS DOC_LLENGTH DOC_LINE_LENGTH +.ALIAS DOC_FAM DOC_FAMILY +.ALIAS DOC_LS DOC_LEAD +.ALIAS DOC_PS DOC_PT_SIZE +.ALIAS FILL QUAD +.ALIAS PAGENUM PAGENUMBER +.ALIAS PAGINATION PAGINATE +.ALIAS PP_FT PP_FONT +.ALIAS REF_INDENT INDENT_REFS +.ALIAS TOC_PS TOC_PT_SIZE +\# +\# HEADER and FOOTER macros +\# ------------------------ +\# Because the type-style of headers and footers are managed +\# identically, and the type-style macros (_) all +\# require the correct name of the calling macro, it's necessary +\# to create HEADER_ and FOOTER_ macros here. They're basically +\# "aliases" of HDRFTR_, but required because you can't alias an +\# alias. +\# +.MAC FOOTER_CENTER_COLOR END +. HDRFTR_CENTER_COLOR \\$1 +.END +\# +.MAC FOOTER_CENTER_COLOUR END +. HDRFTR_CENTER_COLOR \\$1 +.END +\# +.MAC FOOTER_CENTER_FAM END +. HDRFTR_CENTER_FAMILY \\$1 +.END +\# +.MAC FOOTER_CENTER_FAMILY END +. HDRFTR_CENTER_FAMILY \\$1 +.END +\# +.MAC FOOTER_CENTER_FONT END +. HDRFTR_CENTER_FONT \\$1 +.END +\# +.MAC FOOTER_CENTER_FT END +. HDRFTR_CENTER_FONT \\$1 +.END +\# +.MAC FOOTER_CENTER_PS END +. HDRFTR_CENTER_SIZE \\$1 +.END +\# +.MAC FOOTER_CENTER_SIZE END +. HDRFTR_CENTER_SIZE \\$1 +.END +\# +.MAC FOOTER_CENTRE_CAPS END +. HDRFTR_CENTER_CAPS \\$1 +.END +\# +.MAC FOOTER_CENTRE_COLOR END +. HDRFTR_CENTRE_COLOR \\$1 +.END +\# +.MAC FOOTER_CENTRE_COLOUR END +. HDRFTR_CENTRE_COLOR \\$1 +.END +\# +.MAC FOOTER_CENTRE_FAM END +. HDRFTR_CENTER_FAMILY \\$1 +.END +\# +.MAC FOOTER_CENTRE_FAMILY END +. HDRFTR_CENTER_FAMILY \\$1 +.END +\# +.MAC FOOTER_CENTRE_FONT END +. HDRFTR_CENTER_FONT \\$1 +.END +\# +.MAC FOOTER_CENTRE_FT END +. HDRFTR_CENTER_FONT \\$1 +.END +\# +.MAC FOOTER_CENTRE_PS END +. HDRFTR_CENTER_SIZE \\$1 +.END +\# +.MAC FOOTER_CENTRE_SIZE END +. HDRFTR_CENTER_SIZE \\$1 +.END +\# +.MAC FOOTER_COLOR END +. HDRFTR_COLOR \\$1 +.END +\# +.MAC FOOTER_COLOUR END +. HDRFTR_COLOR \\$1 +.END +\# +.MAC FOOTER_FAM END +. HDRFTR_FAMILY \\$1 +.END +\# +.MAC FOOTER_FAMILY END +. HDRFTR_FAMILY \\$1 +.END +\# +.MAC FOOTER_LEFT_COLOR END +. HDRFTR_LEFT_COLOR \\$1 +.END +\# +.MAC FOOTER_LEFT_COLOUR END +. HDRFTR_LEFT_COLOR \\$1 +.END +\# +.MAC FOOTER_LEFT_FAM END +. HDRFTR_LEFT_FAMILY \\$1 +.END +\# +.MAC FOOTER_LEFT_FAMILY END +. HDRFTR_LEFT_FAMILY \\$1 +.END +\# +.MAC FOOTER_LEFT_FONT END +. HDRFTR_LEFT_FONT \\$1 +.END +\# +.MAC FOOTER_LEFT_FT END +. HDRFTR_LEFT_FONT \\$1 +.END +\# +.MAC FOOTER_LEFT_PS END +. HDRFTR_LEFT_SIZE \\$1 +.END +\# +.MAC FOOTER_LEFT_SIZE END +. HDRFTR_LEFT_SIZE \\$1 +.END +\# +.MAC FOOTER_RIGHT_COLOR END +. HDRFTR_RIGHT_COLOR \\$1 +.END +\# +.MAC FOOTER_RIGHT_COLOUR END +. HDRFTR_RIGHT_COLOR \\$1 +.END +\# +.MAC FOOTER_RIGHT_FAM END +. HDRFTR_RIGHT_FAMILY \\$1 +.END +\# +.MAC FOOTER_RIGHT_FAMILY END +. HDRFTR_RIGHT_FAMILY \\$1 +.END +\# +.MAC FOOTER_RIGHT_FONT END +. HDRFTR_RIGHT_FONT \\$1 +.END +\# +.MAC FOOTER_RIGHT_FT END +. HDRFTR_RIGHT_FONT \\$1 +.END +\# +.MAC FOOTER_RIGHT_PS END +. HDRFTR_RIGHT_SIZE \\$1 +.END +\# +.MAC FOOTER_RIGHT_SIZE END +. HDRFTR_RIGHT_SIZE \\$1 +.END +\# +.MAC FOOTER_RULE_COLOR END +. HDRFTR_RULE_COLOR \\$1 +.END +\# +.MAC FOOTER_SIZE END +. HDRFTR_SIZE \\$1 +.END +\# +.MAC HEADER_CENTER_COLOR END +. HDRFTR_CENTER_COLOR \\$1 +.END +\# +.MAC HEADER_CENTER_COLOUR END +. HDRFTR_CENTER_COLOR \\$1 +.END +\# +.MAC HEADER_CENTER_FAM END +. HDRFTR_CENTER_FAMILY \\$1 +.END +\# +.MAC HEADER_CENTER_FAMILY END +. HDRFTR_CENTER_FAMILY \\$1 +.END +\# +.MAC HEADER_CENTER_FONT END +. HDRFTR_CENTER_FONT \\$1 +.END +\# +.MAC HEADER_CENTER_FT END +. HDRFTR_CENTER_FONT \\$1 +.END +\# +.MAC HEADER_CENTER_PS END +. HDRFTR_CENTER_SIZE \\$1 +.END +\# +.MAC HEADER_CENTER_SIZE END +. HDRFTR_CENTER_SIZE \\$1 +.END +\# +.MAC HEADER_CENTRE_COLOR END +. HDRFTR_CENTRE_COLOR \\$1 +.END +\# +.MAC HEADER_CENTRE_COLOUR END +. HDRFTR_CENTRE_COLOR \\$1 +.END +\# +.MAC HEADER_CENTRE_FAM END +. HDRFTR_CENTER_FAMILY \\$1 +.END +\# +.MAC HEADER_CENTRE_FAMILY END +. HDRFTR_CENTER_FAMILY \\$1 +.END +\# +.MAC HEADER_CENTRE_FONT END +. HDRFTR_CENTER_FONT \\$1 +.END +\# +.MAC HEADER_CENTRE_FT END +. HDRFTR_CENTER_FONT \\$1 +.END +\# +.MAC HEADER_CENTRE_PS END +. HDRFTR_CENTER_SIZE \\$1 +.END +\# +.MAC HEADER_CENTRE_SIZE END +. HDRFTR_CENTER_SIZE \\$1 +.END +\# +.MAC HEADER_COLOR END +. HDRFTR_COLOR \\$1 +.END +\# +.MAC HEADER_COLOUR END +. HDRFTR_COLOR \\$1 +.END +\# +.MAC HEADER_FAM END +. HDRFTR_FAMILY \\$1 +.END +\# +.MAC HEADER_FAMILY END +. HDRFTR_FAMILY \\$1 +.END +\# +.MAC HEADER_LEFT_COLOR END +. HDRFTR_LEFT_COLOR \\$1 +.END +\# +.MAC HEADER_LEFT_COLOUR END +. HDRFTR_LEFT_COLOR \\$1 +.END +\# +.MAC HEADER_LEFT_FAM END +. HDRFTR_LEFT_FAMILY \\$1 +.END +\# +.MAC HEADER_LEFT_FAMILY END +. HDRFTR_LEFT_FAMILY \\$1 +.END +\# +.MAC HEADER_LEFT_FONT END +. HDRFTR_LEFT_FONT \\$1 +.END +\# +.MAC HEADER_LEFT_FT END +. HDRFTR_LEFT_FONT \\$1 +.END +\# +.MAC HEADER_LEFT_PS END +. HDRFTR_LEFT_SIZE \\$1 +.END +\# +.MAC HEADER_LEFT_SIZE END +. HDRFTR_LEFT_SIZE \\$1 +.END +\# +.MAC HEADER_RIGHT_COLOR END +. HDRFTR_RIGHT_COLOR \\$1 +.END +\# +.MAC HEADER_RIGHT_COLOUR END +. HDRFTR_RIGHT_COLOR \\$1 +.END +\# +.MAC HEADER_RIGHT_FAM END +. HDRFTR_RIGHT_FAMILY \\$1 +.END +\# +.MAC HEADER_RIGHT_FAMILY END +. HDRFTR_RIGHT_FAMILY \\$1 +.END +\# +.MAC HEADER_RIGHT_FONT END +. HDRFTR_RIGHT_FONT \\$1 +.END +\# +.MAC HEADER_RIGHT_FT END +. HDRFTR_RIGHT_FONT \\$1 +.END +\# +.MAC HEADER_RIGHT_PS END +. HDRFTR_RIGHT_SIZE \\$1 +.END +\# +.MAC HEADER_RIGHT_SIZE END +. HDRFTR_RIGHT_SIZE \\$1 +.END +\# +.MAC HEADER_RULE_COLOR END +. HDRFTR_RULE_COLOR \\$1 +.END +\# +.MAC HEADER_SIZE END +. HDRFTR_SIZE \\$1 +.END +\# +\# HEADER and FOOTER aliases for HDRFTR macros. +\# +.ALIAS BIBLIOGRAPHY_FOOTER_CENTER BIBLIOGRAPHY_HDRFTR_CENTER +.ALIAS BIBLIOGRAPHY_FOOTER_CENTRE BIBLIOGRAPHY_HDRFTR_CENTRE +.ALIAS BIBLIOGRAPHY_HEADER_CENTER BIBLIOGRAPHY_HDRFTR_CENTER +.ALIAS BIBLIOGRAPHY_HEADER_CENTRE BIBLIOGRAPHY_HDRFTR_CENTRE +.ALIAS ENDNOTES_FOOTER_CENTER ENDNOTES_HDRFTR_CENTER +.ALIAS ENDNOTES_FOOTER_CENTRE ENDNOTES_HDRFTR_CENTRE +.ALIAS ENDNOTES_HEADER_CENTER ENDNOTES_HDRFTR_CENTER +.ALIAS ENDNOTES_HEADER_CENTRE ENDNOTES_HDRFTR_CENTRE +.ALIAS FOOTER_CENTER_CAPS HDRFTR_CENTER_CAPS +.ALIAS FOOTER_CENTER HDRFTR_CENTER +.ALIAS FOOTER_CENTER_PAD HDRFTR_CENTER_PAD +.ALIAS FOOTER_CENTRE HDRFTR_CENTER +.ALIAS FOOTER_CENTRE_PAD HDRFTR_CENTER_PAD +.ALIAS FOOTER_LEFT_CAPS HDRFTR_LEFT_CAPS +.ALIAS FOOTER_LEFT HDRFTR_LEFT +.ALIAS FOOTER_PLAIN HDRFTR_PLAIN +.ALIAS FOOTER_RECTO HDRFTR_RECTO +.ALIAS FOOTER_RIGHT_CAPS HDRFTR_RIGHT_CAPS +.ALIAS FOOTER_RIGHT HDRFTR_RIGHT +.ALIAS FOOTER_RULE_GAP HDRFTR_RULE_GAP +.ALIAS FOOTER_RULE HDRFTR_RULE +.ALIAS FOOTER_VERSO HDRFTR_VERSO +.ALIAS HEADER_CENTER_CAPS HDRFTR_CENTER_CAPS +.ALIAS HEADER_CENTER HDRFTR_CENTER +.ALIAS HEADER_CENTER_PAD HDRFTR_CENTER_PAD +.ALIAS HEADER_CENTRE_CAPS HDRFTR_CENTER_CAPS +.ALIAS HEADER_CENTRE HDRFTR_CENTER +.ALIAS HEADER_CENTRE_PAD HDRFTR_CENTER_PAD +.ALIAS HEADER_LEFT_CAPS HDRFTR_LEFT_CAPS +.ALIAS HEADER_LEFT HDRFTR_LEFT +.ALIAS HEADER_PLAIN HDRFTR_PLAIN +.ALIAS HEADER_RECTO HDRFTR_RECTO +.ALIAS HEADER_RIGHT_CAPS HDRFTR_RIGHT_CAPS +.ALIAS HEADER_RIGHT HDRFTR_RIGHT +.ALIAS HEADER_RULE_GAP HDRFTR_RULE_GAP +.ALIAS HEADER_RULE HDRFTR_RULE +.ALIAS HEADER_VERSO HDRFTR_VERSO +.ALIAS SWITCH_FOOTERS SWITCH_HDRFTR +.ALIAS SWITCH_HEADERS SWITCH_HDRFTR +\# +\# Type-style aliases +\# +.ALIAS AUTHOR_FAMILY _FAMILY +.ALIAS BIBLIOGRAPHY_FAMILY _FAMILY +.ALIAS BIBLIOGRAPHY_STRING_FAMILY _FAMILY +.ALIAS BLOCKQUOTE_FAMILY _FAMILY +.ALIAS CHAPTER_TITLE_FAMILY _FAMILY +.ALIAS COVER_AUTHOR_FAMILY _FAMILY +.ALIAS COVER_CHAPTER_TITLE_FAMILY _FAMILY +.ALIAS COVER_COPYRIGHT_FAMILY _FAMILY +.ALIAS COVER_DOCTYPE_FAMILY _FAMILY +.ALIAS COVER_FAMILY _FAMILY +.ALIAS COVER_SUBTITLE_FAMILY _FAMILY +.ALIAS COVER_TITLE_FAMILY _FAMILY +.ALIAS DOC_COVER_AUTHOR_FAMILY _FAMILY +.ALIAS DOC_COVER_CHAPTER_TITLE_FAMILY _FAMILY +.ALIAS DOC_COVER_COPYRIGHT_FAMILY _FAMILY +.ALIAS DOC_COVER_DOCTYPE_FAMILY _FAMILY +.ALIAS DOC_COVER_FAMILY _FAMILY +.ALIAS DOC_COVER_SUBTITLE_FAMILY _FAMILY +.ALIAS DOC_COVER_TITLE_FAMILY _FAMILY +.ALIAS DOCHEADER_FAMILY _FAMILY +.ALIAS DOCTYPE_FAMILY _FAMILY +.ALIAS ENDNOTE_FAMILY _FAMILY +.ALIAS ENDNOTE_NUMBER_FAMILY _FAMILY +.ALIAS ENDNOTE_LINENUMBER_FAMILY _FAMILY +.ALIAS ENDNOTE_STRING_FAMILY _FAMILY +.ALIAS ENDNOTE_TITLE_FAMILY _FAMILY +.ALIAS EPIGRAPH_FAMILY _FAMILY +.ALIAS FOOTNOTE_FAMILY _FAMILY +.ALIAS HDRFTR_CENTER_FAMILY _FAMILY +.ALIAS HDRFTR_FAMILY _FAMILY +.ALIAS HDRFTR_LEFT_FAMILY _FAMILY +.ALIAS HDRFTR_RIGHT_FAMILY _FAMILY +.ALIAS HEAD_FAMILY _FAMILY +.ALIAS PAGENUM_FAMILY _FAMILY +.ALIAS PARAHEAD_FAMILY _FAMILY +.ALIAS QUOTE_FAMILY _FAMILY +.ALIAS SUBHEAD_FAMILY _FAMILY +.ALIAS SUBTITLE_FAMILY _FAMILY +.ALIAS TITLE_FAMILY _FAMILY +.ALIAS TOC_FAM _FAMILY +.ALIAS TOC_FAMILY _FAMILY +.ALIAS TOC_HEADER_FAMILY _FAMILY +.ALIAS TOC_HEAD_FAMILY _FAMILY +.ALIAS TOC_PARAHEAD_FAMILY _FAMILY +.ALIAS TOC_PN_FAMILY _FAMILY +.ALIAS TOC_SUBHEAD_FAMILY _FAMILY +.ALIAS TOC_TITLE_FAMILY _FAMILY +\# +.ALIAS AUTHOR_FONT _FONT +.ALIAS BIBLIOGRAPHY_STRING_FONT _FONT +.ALIAS BIBLIOGRAPHY_FONT _FONT +.ALIAS BLOCKQUOTE_FONT _FONT +.ALIAS CHAPTER_TITLE_FONT _FONT +.ALIAS COVER_AUTHOR_FONT _FONT +.ALIAS COVER_CHAPTER_TITLE_FONT _FONT +.ALIAS COVER_COPYRIGHT_FONT _FONT +.ALIAS COVER_DOCTYPE_FONT _FONT +.ALIAS COVER_SUBTITLE_FONT _FONT +.ALIAS COVER_TITLE_FONT _FONT +.ALIAS DOC_COVER_AUTHOR_FONT _FONT +.ALIAS DOC_COVER_CHAPTER_TITLE_FONT _FONT +.ALIAS DOC_COVER_COPYRIGHT_FONT _FONT +.ALIAS DOC_COVER_DOCTYPE_FONT _FONT +.ALIAS DOC_COVER_SUBTITLE_FONT _FONT +.ALIAS DOC_COVER_TITLE_FONT _FONT +.ALIAS DOCTYPE_FONT _FONT +.ALIAS ENDNOTE_FONT _FONT +.ALIAS ENDNOTE_NUMBER_FONT _FONT +.ALIAS ENDNOTE_LINENUMBER_FONT _FONT +.ALIAS ENDNOTE_STRING_FONT _FONT +.ALIAS ENDNOTE_TITLE_FONT _FONT +.ALIAS EPIGRAPH_FONT _FONT +.ALIAS FOOTNOTE_FONT _FONT +.ALIAS HDRFTR_CENTER_FONT _FONT +.ALIAS HDRFTR_LEFT_FONT _FONT +.ALIAS HDRFTR_RIGHT_FONT _FONT +.ALIAS HEAD_FONT _FONT +.ALIAS PAGENUM_FONT _FONT +.ALIAS PARAHEAD_FONT _FONT +.ALIAS QUOTE_FONT _FONT +.ALIAS SUBHEAD_FONT _FONT +.ALIAS SUBTITLE_FONT _FONT +.ALIAS TITLE_FONT _FONT +.ALIAS TOC_HEADER_FONT _FONT +.ALIAS TOC_HEAD_FONT _FONT +.ALIAS TOC_PARAHEAD_FONT _FONT +.ALIAS TOC_PN_FONT _FONT +.ALIAS TOC_SUBHEAD_FONT _FONT +.ALIAS TOC_TITLE_FONT _FONT +\# +.ALIAS AUTHOR_SIZE _SIZE +.ALIAS BIBLIOGRAPHY_STRING_SIZE _SIZE +.ALIAS BLOCKQUOTE_SIZE _SIZE +.ALIAS CHAPTER_TITLE_SIZE _SIZE +.ALIAS COVER_AUTHOR_SIZE _SIZE +.ALIAS COVER_CHAPTER_TITLE_SIZE _SIZE +.ALIAS COVER_COPYRIGHT_SIZE _SIZE +.ALIAS COVER_DOCTYPE_SIZE _SIZE +.ALIAS COVER_SUBTITLE_SIZE _SIZE +.ALIAS COVER_TITLE_SIZE _SIZE +.ALIAS DOC_COVER_AUTHOR_SIZE _SIZE +.ALIAS DOC_COVER_CHAPTER_TITLE_SIZE _SIZE +.ALIAS DOC_COVER_COPYRIGHT_SIZE _SIZE +.ALIAS DOC_COVER_DOCTYPE_SIZE _SIZE +.ALIAS DOC_COVER_SUBTITLE_SIZE _SIZE +.ALIAS DOC_COVER_TITLE_SIZE _SIZE +.ALIAS DOCTYPE_SIZE _SIZE +.ALIAS ENDNOTE_NUMBER_SIZE _SIZE +.ALIAS ENDNOTE_LINENUMBER_SIZE _SIZE +.ALIAS ENDNOTE_STRING_SIZE _SIZE +.ALIAS ENDNOTE_TITLE_SIZE _SIZE +.ALIAS EPIGRAPH_SIZE _SIZE +.ALIAS FOOTNOTE_SIZE _SIZE +.ALIAS HDRFTR_CENTER_SIZE _SIZE +.ALIAS HDRFTR_LEFT_SIZE _SIZE +.ALIAS HDRFTR_RIGHT_SIZE _SIZE +.ALIAS HDRFTR_SIZE _SIZE +.ALIAS HEAD_SIZE _SIZE +.ALIAS PAGENUM_SIZE _SIZE +.ALIAS PARAHEAD_SIZE _SIZE +.ALIAS QUOTE_SIZE _SIZE +.ALIAS SUBHEAD_SIZE _SIZE +.ALIAS SUBTITLE_SIZE _SIZE +.ALIAS TITLE_SIZE _SIZE +.ALIAS TOC_HEADER_SIZE _SIZE +.ALIAS TOC_HEAD_SIZE _SIZE +.ALIAS TOC_PARAHEAD_SIZE _SIZE +.ALIAS TOC_PN_SIZE _SIZE +.ALIAS TOC_SUBHEAD_SIZE _SIZE +.ALIAS TOC_TITLE_SIZE _SIZE +\# +.ALIAS ATTRIBUTE_COLOR _COLOR +.ALIAS AUTHOR_COLOR _COLOR +.ALIAS BLOCKQUOTE_COLOR _COLOR +.ALIAS CHAPTER_TITLE_COLOR _COLOR +.ALIAS COVER_ATTRIBUTE_COLOR _COLOR +.ALIAS COVER_AUTHOR_COLOR _COLOR +.ALIAS COVER_CHAPTER_TITLE_COLOR _COLOR +.ALIAS COVER_COLOR _COLOR +.ALIAS COVER_COPYRIGHT_COLOR _COLOR +.ALIAS COVER_DOCTYPE_COLOR _COLOR +.ALIAS COVER_MISC_COLOR _COLOR +.ALIAS COVER_SUBTITLE_COLOR _COLOR +.ALIAS COVER_TITLE_COLOR _COLOR +.ALIAS DOC_COVER_ATTRIBUTE_COLOR _COLOR +.ALIAS DOC_COVER_AUTHOR_COLOR _COLOR +.ALIAS DOC_COVER_CHAPTER_TITLE_COLOR _COLOR +.ALIAS DOC_COVER_COLOR _COLOR +.ALIAS DOC_COVER_COPYRIGHT_COLOR _COLOR +.ALIAS DOC_COVER_DOCTYPE_COLOR _COLOR +.ALIAS DOC_COVER_MISC_COLOR _COLOR +.ALIAS DOC_COVER_SUBTITLE_COLOR _COLOR +.ALIAS DOC_COVER_TITLE_COLOR _COLOR +.ALIAS DOCHEADER_COLOR _COLOR +.ALIAS DOCTYPE_COLOR _COLOR +.ALIAS EPIGRAPH_COLOR _COLOR +.ALIAS FINIS_COLOR _COLOR +.ALIAS FOOTNOTE_COLOR _COLOR +.ALIAS HDRFTR_CENTER_COLOR _COLOR +.ALIAS HDRFTR_COLOR _COLOR +.ALIAS HDRFTR_LEFT_COLOR _COLOR +.ALIAS HDRFTR_RIGHT_COLOR _COLOR +.ALIAS HDRFTR_RULE_COLOR _COLOR +.ALIAS HEAD_COLOR _COLOR +.ALIAS LINEBREAK_COLOR _COLOR +.ALIAS PAGENUM_COLOR _COLOR +.ALIAS PARAHEAD_COLOR _COLOR +.ALIAS QUOTE_COLOR _COLOR +.ALIAS SUBHEAD_COLOR _COLOR +.ALIAS SUBTITLE_COLOR _COLOR +.ALIAS TITLE_COLOR _COLOR +\# +.ALIAS BIBLIOGRAPHY_QUAD _QUAD +.ALIAS BIBLIOGRAPHY_STRING_QUAD _QUAD +.ALIAS BLOCKQUOTE_QUAD _QUAD +.ALIAS COVER_COPYRIGHT_QUAD _QUAD +.ALIAS COVER_MISC_QUAD _QUAD +.ALIAS DOC_COVER_COPYRIGHT_QUAD _QUAD +.ALIAS DOC_COVER_MISC_QUAD _QUAD +.ALIAS DOC_QUAD _QUAD +.ALIAS ENDNOTE_QUAD _QUAD +.ALIAS ENDNOTE_STRING_QUAD _QUAD +.ALIAS ENDNOTE_TITLE_QUAD _QUAD +.ALIAS EPIGRAPH_QUAD _QUAD +.ALIAS FOOTNOTE_QUAD _QUAD +.ALIAS HEAD_QUAD _QUAD +.ALIAS SUBHEAD_QUAD _QUAD +.ALIAS TOC_HEADER_QUAD _QUAD +\# +\# Support aliases +\# +.ALIAS COL_BREAK COL_NEXT +.ALIAS DOC_COVER_ADVANCE COVER_ADVANCE +.ALIAS DOC_COVER COVER +.ALIAS DOC_COVERS COVERS +.ALIAS DOC_COVER_LEAD COVER_LEAD +.ALIAS DOC_COVERTITLE COVERTITLE +.ALIAS DO_DOC_COVER DO_COVER +.ALIAS PRINT_FOOTNOTE_RULE FOOTNOTE_RULE +\# +\# Miscellaneous aliases +.ALIAS SECTION LINEBREAK +.ALIAS SECTION_CHAR LINEBREAK_CHAR +\# +\# Miscellaneous macros to take care of backward compatibility +\# ----------------------------------------------------------- +\# +\# As of 1.1.9, EL and TN got changed to make TRAP...TRAP OFF +\# unnecessary for users. However, I used both macros extensively +\# throughout this file (in conjunction with TRAP...TRAP OFF). +\# EOL is the "old" EL, for the personal use of om.tmac +\# +.MAC EOL END +. br +. sp -1v +.END +\# +\# REFER SUPPORT +\# ------------- +\# +\# Footnote references +\# ------------------- \# *Function: -\# Outputs blank pages. -\# *Notes: -\# If recto/verso, each page is recto/verso, even if there's -\# nothing on it. +\# Instruct REF to put references in footnotes. \# -.MAC BLANKPAGE END -. nr #HOW_MANY \\$1 -. nr #PAGES 0 1 -. while \\n+[#PAGES]<=\\n[#HOW_MANY] \{\ -. if \\n[#HEADERS_ON]=1 \{\ -. nr #HEADERS_WERE_ON 1 -. HEADERS OFF -. \} -. if \\n[#PAGE_NUM_V_POS]=1 \{\ -. if \\n[#PAGINATE]=1 \{ .nr #PAGINATE_WAS_ON 1 \} -. PAGINATION OFF -. \} -. NEWPAGE -. PRINT \& -. if \\n[#FOOTERS_ON]=1 \{\ -. nr #FOOTERS_WERE_ON 1 -. FOOTERS OFF -. \} -. if \\n[#PAGE_NUM_V_POS]=2 \{\ -. if \\n[#PAGINATE]=1 \{ .nr #PAGINATE_WAS_ON 1 \} -. PAGINATION OFF -. \} -. if \\n[#HEADERS_WERE_ON] \{ .HEADERS \} -. if \\n[#PAGE_NUM_V_POS]=1 \{\ -. if \\n[#PAGINATE_WAS_ON] \{ .PAGINATE \} -. \} -. \} -. NEWPAGE -. if \\n[#FOOTERS_WERE_ON] \{ .FOOTERS \} -. if \\n[#PAGE_NUM_V_POS]=2 \{\ -. if \\n[#PAGINATE_WAS_ON] \{ .PAGINATE \} -. \} -. rr #HEADERS_WERE_ON -. rr #FOOTERS_WERE_ON -. rr #PAGINATE_WAS_ON +.MAC FOOTNOTE_REFS END +. if r#EN_REF \{ .rr #EN_REF \} +. nr #FN_REF 1 .END \# +\# Endnote references +\# ------------------ +\# *Function: +\# Instruct REF to collect references for endnotes output. \# -\# SET TRAPS FOR HEADERS/FOOTERS/FOOTNOTES -\# --------------------------------------- -\# *Arguments: -\# +.MAC ENDNOTE_REFS END +. if r#FN_REF \{ .rr #FN_REF \} +. nr #EN_REF 1 +.END +\# +\# Prepare mom for a reference +\# --------------------------- +\# *Argument: +\# | INDENT L|LEFT|R|RIGHT|B|BOTH \# *Function: -\# Sets header/footer/footnotes/etc... traps. -\# Calculates the number of lines that actually fit on a -\# page based on #B_MARGIN and resets page bottom trap to coincide -\# with the depth of that number of lines, or, if #ADJ_DOC_LEAD=1, -\# adjusts #DOC_LEAD so that the last line of text on a page falls -\# exactly on #B_MARGIN. +\# Calls FOOTNOTE or ENDNOTE, depending on whether #REF_FN or +\# #REF_EN is set to 1. +\# *Notes: +\# For convenience, REF is a toggle. \# -.MAC TRAPS END -\# *Remove all header/footer traps -. if !\\n[#NO_TRAP_RESET] \{\ -. ch DO_T_MARGIN -. ch DO_B_MARGIN -. ch HEADER -. ch FOOTER -\# *Plant header trap -. wh 0 HEADER -. \} -\# *Adjust lead so last line of text falls on B_MARGIN,... -. ie \\n[#ADJ_DOC_LEAD]=1 \{\ -. nr #LINES_PER_PAGE 0 1 -. nr #DOC_LEAD_ADJ 0 1 -. nr #DEPTH_TO_B_MARGIN \\n[#PAGE_LENGTH]-\\n[#B_MARGIN]-1v -. while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]*\\n+[#LINES_PER_PAGE])<\\n[#DEPTH_TO_B_MARGIN] \{\ -. -. \} -. nr #LINES_PER_PAGE -1 -. while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]+\\n+[#DOC_LEAD_ADJ]*\\n[#LINES_PER_PAGE])<\\n[#DEPTH_TO_B_MARGIN] \{\ -. +\# REF optionally takes the same arguments as FOOTNOTE, allowing +\# users to indent references that go in footnotes when footnote +\# indenting is required. FOOTNOTE_REFS must be on for this. +\# +.MAC REF END +. ie \\n[#FN_REF]+\\n[#EN_REF]=0 \{\ +. if !\\n[#REF_WARNING]=1 \{\ +. tm1 "[mom]: Before REF at line \\n(.c, neither FOOTNOTE_REFS nor ENDNOTE_REFS +. tm1 " has been selected. If "sort" and "accumulate" are in your refer +. tm1 " commands, references will be collected for later output with $LIST$. +. tm1 " Otherwise, they will disappear. +. nr #REF_WARNING 1 . \} -. DOC_LEAD \\n[#DOC_LEAD]u+\\n[#DOC_LEAD_ADJ]u . \} -\# *...or calculate new B_MARGIN based on # of lines (at #DOC_LEAD) that fit -\# *on the page. . el \{\ -. nr #LINES_PER_PAGE 0 1 -. nr #DEPTH_TO_B_MARGIN \\n[#PAGE_LENGTH]-\\n[#B_MARGIN]-1v -. while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]*\\n+[#LINES_PER_PAGE])<\\n[#DEPTH_TO_B_MARGIN] \{\ -. -. \} -. nr #B_MARGIN \\n[#PAGE_LENGTH]-(\\n[#T_MARGIN]+(\\n[#DOC_LEAD]*\\n[#LINES_PER_PAGE])) +. ie \\n[#REF]=1 \{\ +. if \\n[#FN_REF]=1 \{ .FOOTNOTE OFF \} +. if \\n[#EN_REF]=1 \{ .ENDNOTE OFF \} +. rr #REF +. \} +. el \{\ +. rr #REF_WARNING +. nr #REF 1 +. if \\n[#FN_REF]=1 \{ .FOOTNOTE \\$1 \\$2 \\$3 \} +. if \\n[#EN_REF]=1 \{ .ENDNOTE \} . \} -\# *Set footer and footnote overflow traps -. if !\\n[#NO_TRAP_RESET] \{\ -. nr #FN_COUNT 0 1 -. nr #SPACE_REMAINING 0 -. nr #FN_DEPTH 0 -. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]u -. wh 12i FOOTER -. wh -\\n[#B_MARGIN]u FN_OVERFLOW_TRAP -. ch FOOTER -\\n[#B_MARGIN]u . \} -. rr #ADJ_DOC_LEAD .END \# +\# Embedded references in text (with brackets) +\# ------------------------------------------- \# -\# CHECK INDENT -\# ------------ -\# *Arguments: -\# -\# *Function: -\# Adds left, right, or both indent values to document elements -\# like heads and subheads that are processed in environments. +.MAC REF_BRACKETS_START END +. ds $CURRENT_EV \\n[.ev] +. ev REFERENCE +. evc \\*[$CURRENT_EV] +. di REFERENCE +.END \# -.MAC CHECK_INDENT END -. if \\n[#INDENT_LEFT_ACTIVE] \{\ -. in \\n[#L_INDENT]u -. if \\n[#QUOTE] \{\ -. in -\\n[#L_INDENT]u \"Because you added an indent in 2nd line of macro -. ll -\\n[#L_INDENT]u -. ta \\n(.lu -. \} -. if \\n[#EPIGRAPH] \{\ -. in -\\n[#L_INDENT]u -. ll -\\n[#L_INDENT]u -. ta \\n(.lu -. \} -. \} -. if \\n[#INDENT_RIGHT_ACTIVE] \{\ -. ll -\\n[#R_INDENT]u -. ta \\n(.lu -. \} -. if \\n[#INDENT_BOTH_ACTIVE] \{\ -. in \\n[#BL_INDENT]u -. ll -\\n[#BR_INDENT]u -. ta \\n(.lu -. if \\n[#QUOTE] \{\ -. in -\\n[#BL_INDENT]u -. ie \\n[#BR_INDENT]=\\n[#BL_INDENT] \{\ -. ll -\\n[#BR_INDENT]u -. ta \\n(.lu -. \} -. el \{\ -. ll -(\\n[#BR_INDENT]u/2u) -. ta \\n(.lu -. \} -. \} -. if \\n[#EPIGRAPH] \{\ -. in -\\n[#BL_INDENT]u -. ie \\n[#BR_INDENT]=\\n[#BL_INDENT] \{\ -. ll -\\n[#BR_INDENT]u -. ta \\n(.lu -. \} -. el \{\ -. ll -(\\n[#BR_INDENT]u/2u) -. ta \\n(.lu -. \} -. \} -. \} +.MAC REF_BRACKETS_END END +. br +. di +. ev +. chop REFERENCE +. unformat REFERENCE +. if '\\$0'REF)' \{ .nop (\\*[REFERENCE]) \} +. if '\\$0'REF]' \{ .nop [\\*[REFERENCE]] \} +. if '\\$0'REF}' \{ .nop {\\*[REFERENCE]} \} .END \# +\# These three pairs of aliases allow users to embed references in +\# text and have them surrounded by (), [] or {}. \# -\# REMOVE INDENT -\# ------------- -\# *Arguments: -\# +.ALIAS REF( REF_BRACKETS_START +.ALIAS REF) REF_BRACKETS_END +\# +.ALIAS REF[ REF_BRACKETS_START +.ALIAS REF{ REF_BRACKETS_START +\# +.ALIAS REF} REF_BRACKETS_END +.ALIAS REF] REF_BRACKETS_END +\# +\# Second-line indent for refs +\# --------------------------- +\# *Argument: +\# FOOTNOTE | ENDNOTE | BIBLIO \# *Function: -\# Removes left, right, or both indent values from document elements -\# like heads and subheads that are processed in environments. +\# Sets strings $REF_FN_INDENT, $REF_EN_INDENT or $REF_BIB_INDENT. +\# *Notes: +\# Indent value requires a unit of measure. \# -.MAC REMOVE_INDENT END -. in 0 -. ll \\n[#L_LENGTH]u -. ta \\n(.lu +.MAC INDENT_REFS END +. if '\\$1'FOOTNOTE' .ds $REF_FN_INDENT \\$2 +. if '\\$1'ENDNOTE' .ds $REF_EN_INDENT \\$2 +. if '\\$1'BIBLIO' .ds $REF_BIB_INDENT \\$2 .END \# +\# Hyphenation of references +\# ------------------------- +\# *Argument: +\# | +\# *Function: +\# Sets register #REF_HYPHENATE \# -\# Set up a default papersize of US letter +.MAC HYPHENATE_REFS END +. ie '\\$1'' \{ .nr #REF_HYPHENATE 1 \} +. el \{\ +. if r#REF_HY \{ .rr #REF_HY \} +. \} +.END +\# +.ig +The remainder of the definitions in this section are modified +versions of the definitions found in the refer module of s.tmac. +.. +\# +\# This one is directly from s.tmac. +.de @error +.tm \\n(.F:\\n(.c: macro error: \\$* +.. +\# +.ig +The following strings define the order of entries for different +types of references. Each letter in the string refers to a database +field (A for author, T1/T2 for article and book titles, etc). +Mom is set up for MLA-style bibliographies. Other styles can be +implemented here by re-ordering the fields. +.. +\# Book - type 2 +.ds ref*spec!2 Q A T1 d t l r E S e V a C I D P O +\# Article within book - type 3 +.ds ref*spec!3 Q A T2 B d t l r E S e V a C I D P O +\# Journal article - type 1 +.ds ref*spec!1 Q A T2 J S N D P O +\# Tech report - type 4 +.ds ref*spec!4 Q A T1 R G C I D P O +\# Internet site - type 0 +.ds ref*spec!0 Q A T2 s E c d o a u O +\# +\# Refer's "1st" macro. Since it is possible to define database +\# fields using any single letter, we remove all possible string +\# definitions of the form [X and [x +\# +.de ]- +.rm [A [B [C [D [E [F [G [H [I [J [K [L [M \ + [N [O [P [Q [R [S [T [U [V [W [X [Y [Z \ +. [a [b [c [d [e [f [g [h [i [j [k [l [m \ + [n [o [p [q [r [s [t [u [v [w [x [y [z +.rm ref*string +.rr ref*type +.. +\# +\# Refer's "2nd" macro; builds up a reference with ref*build, and +\# prints it with ref*print. +\# +.de ][ +.nr ref*type \\$1 +.if \\n[ref*type]=3 \{\ +. if !'\\*([R'' \{\ +. nr ref*type 4 +. ds ref*spec!4 Q A T2 B R C I D P O +. \} +. if !'\\*([G'' \{\ +. nr ref*type 4 +. ds ref*spec!4 Q A T2 B G C I D P O +. \} +.\} +.if r [T \{\ +. als [T1 [T +. als [T2 [T +.\} +.ie d ref*spec!\\n[ref*type] .ref*build \\*[ref*spec!\\n[ref*type]] +.el \{\ +. @error unknown reference type `\\n[ref*type]' +. ref*build \\*[ref*spec!0] +.\} +.if !\\n[.hy]=0 \{\ +.nr #RESTORE_HY \\n[.hy] +.if !r#REF_HY .nh +.\} +.ref*print +.if !\\n[#RESTORE_HY]=0 .hy \\n[#RESTORE_HY] +.rr #RESTORE_HY +.rm ref*string +.rm [F [T1 [T2 +.. +\# +\# Refer's "3rd" macros, which set up and terminate the output +\# of collected references +\# +.de ]< +.als ref*print ref*end-print +.nr #REF 1 +.if \\n[#BIB_LIST]=1 \{\ +. nr #IN_BIB_LIST 1 +. LIST DIGIT \\*[$BIB_LIST_SEPARATOR] \\*[$BIB_LIST_PREFIX] +.\} +.. \# -.PAPER LETTER +.de ]> +.LIST OFF +.rr #REF +.rr #IN_BIB_LIST +.als ref*print ref*normal-print +.. \# -\# ==================================================================== +\# Output +\# ------ \# -\# +++DOCUMENT PROCESSING ALIASES+++ +\# Output normal, non-collected refs \# -\# Aliases to make life easier for users: synonyms, short forms -\# and alternate spellings. +.de ref*normal-print +.nr #CURRENT_HY \\n[.hy] +\\*[ref*string] +.. \# -\# Macros -\# ------ -.ALIAS BLOCKQUOTE_COLOUR BLOCKQUOTE_COLOR -.ALIAS BREAK_BLOCKQUOTE BREAK_QUOTE -.ALIAS BREAK_CITATION BREAK_QUOTE -.ALIAS BREAK_CITE BREAK_QUOTE -.ALIAS CITATION BLOCKQUOTE -.ALIAS CITATION_COLOUR CITATION_COLOR -.ALIAS CITATION_FAMILY BLOCKQUOTE_FAMILY -.ALIAS CITATION_FONT BLOCKQUOTE_FONT -.ALIAS CITATION_SIZE BLOCKQUOTE_SIZE -.ALIAS CITATION_COLOR BLOCKQUOTE_COLOR -.ALIAS CITATION_QUAD BLOCKQUOTE_QUAD -.ALIAS CITE BLOCKQUOTE -.ALIAS CITE_COLOUR CITE_COLOR -.ALIAS CITE_FAMILY BLOCKQUOTE_FAMILY -.ALIAS CITE_FONT BLOCKQUOTE_FONT -.ALIAS CITE_SIZE BLOCKQUOTE_SIZE -.ALIAS CITE_COLOR BLOCKQUOTE_COLOR -.ALIAS CITE_QUAD BLOCKQUOTE_QUAD -.ALIAS DOC_R_MARGIN DOC_RIGHT_MARGIN -.ALIAS DOC_L_MARGIN DOC_LEFT_MARGIN -.ALIAS DOC_L_LENGTH DOC_LINE_LENGTH -.ALIAS DOC_RMARGIN DOC_RIGHT_MARGIN -.ALIAS DOC_LMARGIN DOC_LEFT_MARGIN -.ALIAS DOC_LLENGTH DOC_LINE_LENGTH -.ALIAS DOC_FAM DOC_FAMILY -.ALIAS DOC_LS DOC_LEAD -.ALIAS DOC_PS DOC_PT_SIZE -.ALIAS DOCHEADER_COLOUR DOCHEADER_COLOUR -.ALIAS EPIGRAPH_COLOUR EPIGRAPH_COLOR -.ALIAS FILL QUAD -.ALIAS FINIS_COLOUR FINIS_COLOR -.ALIAS HEAD_COLOUR HEAD_COLOR -.ALIAS LINEBREAK_COLOUR LINEBREAK_COLOR -.ALIAS PAGENUM PAGENUMBER -.ALIAS PAGENUM_COLOUR PAGENUM_COLOR -.ALIAS PAGINATION PAGINATE -.ALIAS PARAHEAD_COLOUR PARAHEAD_COLOR -.ALIAS PP_FT PP_FONT -.ALIAS QUOTE_COLOUR QUOTE_COLOR -.ALIAS SUBHEAD_COLOUR SUBHEAD_COLOR -.ALIAS TOC_FAM TOC_FAM -.ALIAS TOC_PS TOC_PT_SIZE +\# Output collected refs \# -\# HEADER and FOOTER aliases for HDRFTR macros. +.de ref*end-print +.\" 10 is abritrary +.nn 10 +.ie \\n[#BIB_LIST]=0 \{\ +.in +\\*[$REF_BIB_INDENT] +.ti -\\*[$REF_BIB_INDENT] +.\} +.el .ITEM +\\*[ref*string] +.sp \\n[#BIB_SPACE]u +.ie \\n[#BIB_LIST]=0 .in +.el .IL -\\*[$REF_BIB_INDENT]u +.nn 0 +.. +\# +.als ref*print ref*normal-print +\# +\# Build up the ref*string +\# +.ig +Correct MLA "typewritten" style (printstyle TYPEWRITE) demands +two spaces after each period. The spaces are hardwired into the +string definitions (ref*add-), so we have to make sure that there +aren't two spaces when the printstyle is TYPESET. Since I find that +references look a bit crowded with 0 sentence space, I've bumped it +up to +4. User's sentence spacing is reset in FOOTNOTES and ENDNOTES. +.. +\# +.de ref*build +.if \\n[#PRINT_STYLE]=2 \{\ +. ds $RESTORE_SS_VAR \\*[$SS_VAR] +. SS +4 +.\} +.rm ref*string ref*post-punct +.nr ref*suppress-period 1 +.while \\n[.$] \{\ +. if d [\\$1 \{\ +. ie d ref*add-\\$1 .ref*add-\\$1 +. el .ref*add-dflt \\$1 +. \} +. shift +.\} +.\" now add a final period +.ie d ref*string \{\ +. if !\\n[ref*suppress-period] .as ref*string . +. if d ref*post-punct \{\ +. as ref*string "\\*[ref*post-punct] +. rm ref*post-punct +. \} +.\} +.el .ds ref*string +.. +\# +\# The following macros determine how entries are formatted WRT +\# punctuation, type style, additional strings, etc. +\# +.ig +o First argument is the database field letter. +o Second argument is the punctuation character to use to separate this + field from the previous field. +o Third argument is a string with which to prefix this field. +o Fourth argument is a string with which to postfix this field. +o Fifth argument is a string to add after the punctuation character + supplied by the next field. +.. +\# +\# %A Author(s) +.de ref*add-A +.ref*field A , +.if r [A .nr ref*suppress-period \\n([A +.. +\# %T Title (generic) +.de ref*add-T1 +.ref*field T . " \E*[IT]" "" \E*[PREV] +.if \\n([T .nr ref*suppress-period \\n([T +.. +\# %T Title of a chapter or article +.de ref*add-T2 +.ref*field T . " \(lq" "" "\(rq" +.if \\n([T .nr ref*suppress-period \\n([T +.. +\# %B Book title (when citing an article from a book) +.de ref*add-B +.ie \\n([T .ref*field B "" ".\E*[IT]" "" \E*[PREV] +.el .ref*field B . " \E*[IT]" "" \E*[PREV] +\# refer doesn't set reg [T to 1 for these book titles, so we do it here +.ds eval*[B \\*([B +.substring eval*[B -1 +.rr [T +.if '\\*[eval*[B]'!' .nr [T 1 +.if '\\*[eval*[B]'?' .nr [T 1 +.rm eval*[B +.. +\# %R Report number for technical reports +.de ref*add-R +.ref*field R . " " +.. +\# %J Journal name +.de ref*add-J +.ie \\n([T .ref*field J "" " \E*[IT]" "" \E*[PREV] +.el .ref*field J . " \E*[IT]" "" \E*[PREV] +.. +\# %E Editor(s) +.de ref*add-E +.ie !\\n[ref*type]=0 \{\ +. ie \\n([E>0 \{\ +. ie \\n([T .ref*field E "" " Eds. " +. el .ref*field E . " Eds. " +. \} +. el \{\ +. ie \\n([T .ref*field E "" " Ed. " +. el .ref*field E . " Ed. " +. \} +.\} +.el \{\ +. ie \\n([T .ref*field E "" " " +. el .ref*field E . " " +.\} +.rr [T +.. +\# %e Edition +.de ref*add-e +.ie \\n([T .ref*field e "" " " " edition" +.el .ref*field e . " " " edition" +.rr [T +.. +\# %V Volume (of a journal, or series of books) +.de ref*add-V +.if \\n[ref*type]=1 \{\ +. ref*field V +.\} +.if \\n[ref*type]=2 \{\ +. ie \\n([T .ref*field V "" " " +. el .ref*field V . " " +.\} +.if \\n[ref*type]=3 \{\ +. ie \\n([T .ref*field V "" " " +. el .ref*field V . " " +.\} +.rr [T +.. +\# %N Journal number +.de ref*add-N +.ref*field N +.. +\# %S Series (books or journals) +.de ref*add-S +.if \\n[ref*type]=1 \{\ +. ref*field S +.\} +.if \\n[ref*type]=2 \{\ +. ie \\n([T .ref*field S "" " " +. el .ref*field S . " " +.\} +.if \\n[ref*type]=3 \{\ +. ie \\n([T .ref*field S "" " " +. el .ref*field S . " " +.\} +.rr [T +\# refer doesn't set reg [T to 1 for series titles, so we do it here +.ds eval*[S \\*([S +.substring eval*[S -1 +.if '\\*[eval*[S]'!' .nr [T 1 +.if '\\*[eval*[S]'?' .nr [T 1 +.rm eval*[S +.. +\# %C City +.de ref*add-C +.ie \\n([T .ref*field C "" " " +.el .ref*field C . " " +.rr [T +.. +\# %I Publisher (I stands for Issuer) +.de ref*add-I +.ie !'\\*([C'' .ref*field I : +.el \{\ +. ie \\n([T .ref*field I "" " " +. el .ref*field I . " " +.\} +.rr [T +.. +\# %D Date of publication +.de ref*add-D +.if \\n[ref*type]=1 \{\ +. ie !'\\*([V''.ref*field D "" "(" ")" +. el .ref*field D +.\} +.if \\n[ref*type]=2 .ref*field D , +.if \\n[ref*type]=3 \{\ +. ie '\\*([C'' \{\ +. ie '\\*([I'' .ref*field D . " " +. el .ref*field D , +. \} +. el .ref*field D , +.\} +.if \\n[ref*type]=4 .ref*field D , +.. +\# %P Page number(s) +.de ref*add-P +.ie \\n[ref*type]=1 .ref*field P : +.el .ref*field P . " " +.. +\# %G Gov't. ordering number +.de ref*add-G +.ref*field G . " " +.. +\# %O Other (usually goes at end of ref) +.de ref*add-O +.ref*field O . " " +.ie r [O .nr ref*suppress-period \\n([O +.el .nr ref*suppress-period 1 +.. +\# +.de ref*add-dflt +.ref*field \\$1 , +.. +\# +\# Book reprints +\# ------------- +\# %d date of publication (the orignal date of publication) +.de ref*add-d +.ie \\n([T .ref*field d "" " " +.el .ref*field d . " " +.rr [T +.. +\# %a additions (such as a new intro to reprints) +.de ref*add-a +.ie \\n([T .ref*field a "" " " +.el .ref*field a . " " +.rr [T +.. +\# %t title, if different from original title (the T field, which s/b +\# the original title) +.de ref*add-t +.ie \\n([T .ref*field t "" " Rpt. as \E*[IT]" "" \E*[PREV] +.el .ref*field t . " Rpt. as \E*[IT]" "" \E*[PREV] +.rr [T +.. +\# +\# Translated works +\# ---------------- +\# %l Trans(l)ator +.de ref*add-l +.ie \\n([T .ref*field l "" " Trans. " +.el .ref*field l . " Trans. " +.rr [T +.. +\# %r Translato(r) and edito(r) +.de ref*add-r +.ie \\n([T .ref*field r "" " Trans. and Ed. " +.el .ref*field r . " Trans. and Ed. " +.rr [T +.. +\# +\# Internet +\# -------- +\# %s Site name +.de ref*add-s +.ie \\n([s .ref*field s "" ".\E*[IT]" "" \E*[PREV] +.el .ref*field s . " \E*[IT]" "" \E*[PREV] +.\" refer doesn't set reg [T to 1 for these book titles, so we do it here +.ds eval*[s \\*([s +.substring eval*[s -1 +.rr [T +.if '\\*[eval*[s]'!' .nr [T 1 +.if '\\*[eval*[s]'?' .nr [T 1 +.rm eval*[s +.. +\# %c content of site, if unclear (i.e. advertisement, cartoon, +\# interview, etc.) +.de ref*add-c +.ie \\n([T .ref*field c "" " " +.el .ref*field c . " " +.rr [T +.. +\# %o organization, group or sponsor of site +.de ref*add-o +.ie \\n([T .ref*field o "" " " +.el .ref*field o . " " +.rr [T +.. +\# %a access date, i.e. the date you read it +.de ref*add-a +.ie \\n([T .ref*field a "" " " +.el .ref*field a . " " +.rr [T +.. +\# %u URL +.de ref*add-u +.ref*field u "" " <" ">" +.rr [T +.. +\# +\# Build up reference string from ref*add- macros. +\# +.de ref*field +.if d ref*string \{\ +. ie d ref*post-punct \{\ +. as ref*string "\\$2\\*[ref*post-punct] \" +. rm ref*post-punct +. \} +. el .as ref*string "\\$2 \" +.\} +.as ref*string "\\$3\\*([\\$1\\$4 +.if \\n[.$]>4 .ds ref*post-punct "\\$5 +.nr ref*suppress-period 0 +.. \# -.ALIAS ENDNOTES_FOOTER_CENTER ENDNOTES_HDRFTR_CENTER -.ALIAS ENDNOTES_HEADER_CENTER ENDNOTES_HDRFTR_CENTER -.ALIAS ENDNOTES_FOOTER_CENTRE ENDNOTES_HDRFTR_CENTRE -.ALIAS ENDNOTES_HEADER_CENTRE ENDNOTES_HDRFTR_CENTRE -.ALIAS FOOTER_CENTER_CAPS HDRFTR_CENTER_CAPS -.ALIAS FOOTER_CENTER_COLOR HDRFTR_CENTER_COLOR -.ALIAS FOOTER_CENTER_COLOUR HDRFTR_CENTER_COLOUR -.ALIAS FOOTER_CENTER_FAM HDRFTR_CENTER_FAMILY -.ALIAS FOOTER_CENTER_FAMILY HDRFTR_CENTER_FAMILY -.ALIAS FOOTER_CENTER_FONT HDRFTR_CENTER_FONT -.ALIAS FOOTER_CENTER_FT HDRFTR_CENTER_FONT -.ALIAS FOOTER_CENTER HDRFTR_CENTER -.ALIAS FOOTER_CENTER_PAD HDRFTR_CENTER_PAD -.ALIAS FOOTER_CENTER_PS HDRFTR_CENTER_SIZE -.ALIAS FOOTER_CENTER_SIZE HDRFTR_CENTER_SIZE -.ALIAS FOOTER_CENTRE_CAPS HDRFTR_CENTER_CAPS -.ALIAS FOOTER_CENTRE_COLOR HDRFTR_CENTRE_COLOR -.ALIAS FOOTER_CENTRE_COLOUR HDRFTR_CENTRE_COLOUR -.ALIAS FOOTER_CENTRE_FAM HDRFTR_CENTER_FAMILY -.ALIAS FOOTER_CENTRE_FAMILY HDRFTR_CENTER_FAMILY -.ALIAS FOOTER_CENTRE_FONT HDRFTR_CENTER_FONT -.ALIAS FOOTER_CENTRE_FT HDRFTR_CENTER_FONT -.ALIAS FOOTER_CENTRE HDRFTR_CENTER -.ALIAS FOOTER_CENTRE_PAD HDRFTR_CENTER_PAD -.ALIAS FOOTER_CENTRE_PS HDRFTR_CENTER_SIZE -.ALIAS FOOTER_CENTRE_SIZE HDRFTR_CENTER_SIZE -.ALIAS FOOTER_COLOR HDRFTR_COLOR -.ALIAS FOOTER_COLOUR HDRFTR_COLOR -.ALIAS FOOTER_FAM HDRFTR_FAMILY -.ALIAS FOOTER_FAMILY HDRFTR_FAMILY -.ALIAS FOOTER_LEFT_CAPS HDRFTR_LEFT_CAPS -.ALIAS FOOTER_LEFT_COLOR HDRFTR_LEFT_COLOR -.ALIAS FOOTER_LEFT_COLOUR HDRFTR_LEFT_COLOUR -.ALIAS FOOTER_LEFT_FAM HDRFTR_LEFT_FAMILY -.ALIAS FOOTER_LEFT_FAMILY HDRFTR_LEFT_FAMILY -.ALIAS FOOTER_LEFT_FONT HDRFTR_LEFT_FONT -.ALIAS FOOTER_LEFT_FT HDRFTR_LEFT_FONT -.ALIAS FOOTER_LEFT HDRFTR_LEFT -.ALIAS FOOTER_LEFT_PS HDRFTR_LEFT_SIZE -.ALIAS FOOTER_LEFT_SIZE HDRFTR_LEFT_SIZE -.ALIAS FOOTER_PLAIN HDRFTR_PLAIN -.ALIAS FOOTER_RECTO HDRFTR_RECTO -.ALIAS FOOTER_RIGHT_CAPS HDRFTR_RIGHT_CAPS -.ALIAS FOOTER_RIGHT_COLOR HDRFTR_RIGHT_COLOR -.ALIAS FOOTER_RIGHT_COLOUR HDRFTR_RIGHT_COLOUR -.ALIAS FOOTER_RIGHT_FAM HDRFTR_RIGHT_FAMILY -.ALIAS FOOTER_RIGHT_FAMILY HDRFTR_RIGHT_FAMILY -.ALIAS FOOTER_RIGHT_FONT HDRFTR_RIGHT_FONT -.ALIAS FOOTER_RIGHT_FT HDRFTR_RIGHT_FONT -.ALIAS FOOTER_RIGHT HDRFTR_RIGHT -.ALIAS FOOTER_RIGHT_PS HDRFTR_RIGHT_SIZE -.ALIAS FOOTER_RIGHT_SIZE HDRFTR_RIGHT_SIZE -.ALIAS FOOTER_RULE_COLOR HDRFTR_RULE_COLOR -.ALIAS FOOTER_RULE_GAP HDRFTR_RULE_GAP -.ALIAS FOOTER_RULE HDRFTR_RULE -.ALIAS FOOTER_SIZE HDRFTR_SIZE -.ALIAS FOOTER_VERSO HDRFTR_VERSO -.ALIAS HEADER_CENTER_CAPS HDRFTR_CENTER_CAPS -.ALIAS HEADER_CENTER_COLOR HDRFTR_CENTER_COLOR -.ALIAS HEADER_CENTER_COLOUR HDRFTR_CENTER_COLOUR -.ALIAS HEADER_CENTER_FAM HDRFTR_CENTER_FAMILY -.ALIAS HEADER_CENTER_FAMILY HDRFTR_CENTER_FAMILY -.ALIAS HEADER_CENTER_FONT HDRFTR_CENTER_FONT -.ALIAS HEADER_CENTER_FT HDRFTR_CENTER_FONT -.ALIAS HEADER_CENTER HDRFTR_CENTER -.ALIAS HEADER_CENTER_PAD HDRFTR_CENTER_PAD -.ALIAS HEADER_CENTER_PS HDRFTR_CENTER_SIZE -.ALIAS HEADER_CENTER_SIZE HDRFTR_CENTER_SIZE -.ALIAS HEADER_CENTRE_CAPS HDRFTR_CENTER_CAPS -.ALIAS HEADER_CENTRE_COLOR HDRFTR_CENTRE_COLOR -.ALIAS HEADER_CENTRE_COLOUR HDRFTR_CENTRE_COLOUR -.ALIAS HEADER_CENTRE_FAM HDRFTR_CENTER_FAMILY -.ALIAS HEADER_CENTRE_FAMILY HDRFTR_CENTER_FAMILY -.ALIAS HEADER_CENTRE_FONT HDRFTR_CENTER_FONT -.ALIAS HEADER_CENTRE_FT HDRFTR_CENTER_FONT -.ALIAS HEADER_CENTRE HDRFTR_CENTER -.ALIAS HEADER_CENTRE_PAD HDRFTR_CENTER_PAD -.ALIAS HEADER_CENTRE_PS HDRFTR_CENTER_SIZE -.ALIAS HEADER_CENTRE_SIZE HDRFTR_CENTER_SIZE -.ALIAS HEADER_COLOR HDRFTR_COLOR -.ALIAS HEADER_COLOUR HDRFTR_COLOR -.ALIAS HEADER_FAM HDRFTR_FAMILY -.ALIAS HEADER_FAMILY HDRFTR_FAMILY -.ALIAS HEADER_LEFT_CAPS HDRFTR_LEFT_CAPS -.ALIAS HEADER_LEFT_COLOR HDRFTR_LEFT_COLOR -.ALIAS HEADER_LEFT_COLOUR HDRFTR_LEFT_COLOUR -.ALIAS HEADER_LEFT_FAM HDRFTR_LEFT_FAMILY -.ALIAS HEADER_LEFT_FAMILY HDRFTR_LEFT_FAMILY -.ALIAS HEADER_LEFT_FONT HDRFTR_LEFT_FONT -.ALIAS HEADER_LEFT_FT HDRFTR_LEFT_FONT -.ALIAS HEADER_LEFT HDRFTR_LEFT -.ALIAS HEADER_LEFT_PS HDRFTR_LEFT_SIZE -.ALIAS HEADER_LEFT_SIZE HDRFTR_LEFT_SIZE -.ALIAS HEADER_PLAIN HDRFTR_PLAIN -.ALIAS HEADER_RECTO HDRFTR_RECTO -.ALIAS HEADER_RIGHT_CAPS HDRFTR_RIGHT_CAPS -.ALIAS HEADER_RIGHT_COLOR HDRFTR_RIGHT_COLOR -.ALIAS HEADER_RIGHT_COLOUR HDRFTR_RIGHT_COLOUR -.ALIAS HEADER_RIGHT_FAM HDRFTR_RIGHT_FAMILY -.ALIAS HEADER_RIGHT_FAMILY HDRFTR_RIGHT_FAMILY -.ALIAS HEADER_RIGHT_FONT HDRFTR_RIGHT_FONT -.ALIAS HEADER_RIGHT_FT HDRFTR_RIGHT_FONT -.ALIAS HEADER_RIGHT HDRFTR_RIGHT -.ALIAS HEADER_RIGHT_PS HDRFTR_RIGHT_SIZE -.ALIAS HEADER_RIGHT_SIZE HDRFTR_RIGHT_SIZE -.ALIAS HEADER_RULE_COLOR HDRFTR_RULE_COLOR -.ALIAS HEADER_RULE_GAP HDRFTR_RULE_GAP -.ALIAS HEADER_RULE HDRFTR_RULE -.ALIAS HEADER_SIZE HDRFTR_SIZE -.ALIAS HEADER_VERSO HDRFTR_VERSO -.ALIAS SWITCH_FOOTERS SWITCH_HDRFTR -.ALIAS SWITCH_HEADERS SWITCH_HDRFTR +\# MARGIN NOTES +\# ------------ +\# This is a wrapper for MNinit. +\# +\# I could use a 'while' loop to assign args to strings, but too many +\# 'while' loops are slowing things down. +\# +.MAC MN_INIT END +. if !'\\$1'rerun' \{\ +. ds $MN-arg1 \\$1 +. ds $MN-arg2 \\$2 +. ds $MN-arg3 \\$3 +. ds $MN-arg4 \\$4 +. ds $MN-arg5 \\$5 +. ds $MN-arg6 \\$6 +. ds $MN-arg7 \\$7 +. ds $MN-arg8 \\$8 +. ds $MN-arg9 \\$9 +. \} +. ie \\n[#START_FOR_MNinit]=0 \{\ +. nr #MNinit_DEFERRED 1 +. nr #START_FOR_MNinit 1 +. return +. \} +. el \{\ +. MNinit \\*[$MN-arg1] \\*[$MN-arg2] \\*[$MN-arg3] \\*[$MN-arg4] \\*[$MN-arg5] \\*[$MN-arg6] \\*[$MN-arg7] \\*[$MN-arg8] \\*[$MN-arg9] +. \} +.END \# -\# Support aliases +.MAC MN_OVERFLOW_TRAP END +. if \\n[#OVERFLOW_LEFT]=1 \{\ +. nr #no-repeat-MN-left 1 +. di MN_OVERFLOW_LEFT +. \} +. if \\n[#OVERFLOW_RIGHT]=1 \{\ +. nr #no-repeat-MN-right 1 +. di MN_OVERFLOW_RIGHT +. \} +. rr #OVERFLOW_LEFT +. rr #OVERFLOW_RIGHT +.END \# -.ALIAS COL_BREAK COL_NEXT -.ALIAS PRINT_FOOTNOTE_RULE FOOTNOTE_RULE +.ig +The remainder of the margin notes macros and routines are adapted +from Werner Lemberg's MN.tmac. +.. +\# +\# MNinit +\# ------ +\# Usage: +\# MNinit [ragged|symmetric] \ +\# left-width right-width separation \ +\# font fontsize vertical-spacing \ +\# color hyphenation-flags +\# +\# Initialize margin notes. Empty arguments (denoted with "") set +\# default values. If the first argument is the string `ragged', +\# left and right margin notes are printed ragged-right. If it is +\# `symmetric', left margin notes are printed ragged-left and right +\# margin notes ragged-right. If omitted, margin notes are left +\# and right adjusted. +\# +\# +.de MNinit +. nr #MNinit 1 +. ds MN-left-ad b\" +. ds MN-right-ad b\" +. if '\\$1'RAGGED' \{\ +. ds MN-left-ad l\" +. ds MN-right-ad l\" +. shift +. \} +. if '\\$1'SYMMETRIC' \{\ +. ds MN-left-ad r\" +. ds MN-right-ad l\" +. shift +. \} +. ie \B'\\$3' \ +. nr MN-sep (n;\\$3) +. el \ +. nr MN-sep 1m +. if ((\\n[.o] - \\n[MN-sep]) < 1n) \ +. ab MN: Left margin too small (<1n) for requested margin notes separation. +. ie \B'\\$1' \{\ +. nr MN-left-width (n;\\$1) +. nr MN-left-start (\\n[.o] - \\n[MN-sep] - \\n[MN-left-width]) +. \} +. el \{\ +. nr MN-left-width (\\n[.o] - \\n[MN-sep]) +. nr MN-left-start 0 +. \} +. if (\\n[MN-left-start] < 0) \ +. ab MN: Left margin too small for requested margin notes settings. +. if (\\n[MN-left-width] < 1n) \ +. ab MN: Left margin notes width too small (<1n). +. +. ie \B'\\$2' \{\ +. nr MN-right-width (n;\\$2) +. nr MN-right-start (\\n[.o] + \\n[.l] + \\n[MN-sep]) +. if \\n[#COLUMNS]=1 \{\ +. if !\\n[#NUM_COLS]=1 \{\ +. nr MN-right-start (\\n[#COL_2_L_MARGIN] + \\n[#COL_L_LENGTH] + \\n[MN-sep]) +. \} +. \} +. \} +. el \{\ +. nr MN-right-width \\n[MN-left-width] +. nr MN-right-start (\\n[.o] + \\n[.l] + \\n[MN-sep]) +. if \\n[#COLUMNS]=1 \{\ +. if !\\n[#NUM_COLS]=1 \{\ +. nr MN-right-start (\\n[#COL_2_L_MARGIN] + \\n[#COL_L_LENGTH] + \\n[MN-sep]) +. \} +. \} +. \} +. ie \A'\\$4' \{\ +. ds MN-font \\$4\" +. if \\n[#PRINT_STYLE]=1 .ds MN-font CR +. \} +. el \{\ +. ds MN-font \\*[$PP_FT] +. if \\n[#PRINT_STYLE]=1 .ds MN-font CR +. \} +. ie \B'\\$5' \{\ +. ps \\$5 +. nr MN-size \\n[.ps] +. ps +. if \\n[#PRINT_STYLE]=1 \{\ +. ps 12 +. nr MN-size \\n[.ps] +. ps +. \} +. \} +. el \{\ +. nr MN-size \\n[#DOC_PT_SIZE] +. \} +. ie \B'\\$6' \{\ +' vs \\$6 +. nr MN-spacing \\n(.v +' vs +. if '\\$6'DOC' \{ .nr MN-spacing \\n[#DOC_LEAD] \} +. if \\n[#PRINT_STYLE]=1 \{\ +. nr MN-spacing \\n[#DOC_LEAD] +. \} +. \} +. el \{\ +. nr MN-spacing \\n[#DOC_LEAD] +. \} +. ie \A'\\$7' \ +. if !\\n[#PRINT_STYLE]=1 .ds MN-color \\$7\" +. el \ +. if !\\n[#PRINT_STYLE]=1 .ds MN-color +. ie \B'\\$8' \ +. nr MN-hy \\$8 +. el \ +. nr MN-hy \\n[.hy] +. ev MNbottom-left-env +. if \A'\\*[MN-font]' \ +. ft \\*[MN-font] +. if \\n[MN-size] \ +. ps \\n[MN-size]u +. if \\n[MN-spacing] \ +. vs \\n[MN-spacing]u +. ll \\n[MN-left-width]u +. ad \\*[MN-left-ad] +. hy \\n[MN-hy] +' in 0 +. nop \m[\\*[MN-color]]\c +. ev +. ev MNbottom-right-env +. if \A'\\*[MN-font]' \ +. ft \\*[MN-font] +. if \\n[MN-size] \ +. ps \\n[MN-size]u +. if \\n[MN-spacing] \ +. vs \\n[MN-spacing]u +. ll \\n[MN-right-width]u +. ad \\*[MN-right-ad] +. hy \\n[MN-hy] +' in 0 +. nop \m[\\*[MN-color]]\c +. ev +. nr MN-active 0 +.. +\# MN +\# -- +\# Usage: +\# +\# MN LEFT|RIGHT +\# margin note text +\# MN +\# +\# With a parameter, start a margin note, otherwise end a margin note. +\# If the parameter is the string `left', define a left margin note, +\# otherwise define a right margin note. +\# +.de MN +.ds MN-dir \\$1 +.if \\n[#COLUMNS]=1 \{\ +. if \\n[#NUM_COLS]>2 \{\ +. tm MN: More than two columns. Ignoring margin notes. +. return +. \} +. if !\\n[#NUM_COLS]=1 \{\ +. ie \\n[#COL_NUM]=1 .ds MN-dir LEFT +. el .ds MN-dir RIGHT +. \} +.\} +. if !\\n[#MNinit]=1 \{\ +. tm MN: You must set parameters with MN_INIT before using MN. +. ab Aborting +. \} +. ie !'\\$1'' \{\ +. if \\n[MN-active] \{\ +. tm MN: Can't handle nested margin notes. +. return +. \} +. nr MN-active 1 +. ev MN-env +. ie '\\*[MN-dir]'LEFT' \{\ +. nr MN-left +1 +. ds MN-curr l-\\n[MN-left]\" +. evc MNbottom-left-env +. \} +. el \{\ +. nr MN-right +1 +. ds MN-curr r-\\n[MN-right]\" +. evc MNbottom-right-env +. \} +. mk MN-mk-\\*[MN-curr] +. di MN-div-\\*[MN-curr] +. \} +. el \{\ +. if \\n[MN-active] \{\ +. br +. di +. nr MN-div-\\*[MN-curr]-depth \\n(dn +. ev +. \} +. nr MN-active 0 +. \} +.. +\# +\# MNtop +\# ----- +\# Resets these registers (called in HEADER) +.de MNtop +. nr MN-left 0 +. nr MN-right 0 +. nr MN-active 0 +.. +\# +\# MNbottom-left +\# ------------- +\# The "left" half of Werner's original MNbottom. +\# +.de MNbottom-left +. nr MN-curr 0 +. nr MN-last-pos 0 +. nr MN-lead-adj \\n[#DOC_LEAD]-\\n[MN-spacing] +. vpt 0 +. mk MN-curr-pos +. if \\n[MN-active] \{\ +. di +. tm MN: Margin note finished by new page. Ignored. +. \} +. po \\n[MN-left-start]u +. ev MNbottom-left-env +. nr #P \\n%+\\n[#PAGE_NUM_ADJ] +. while (\\n[MN-curr] < \\n[MN-left]) \{\ +. nr MN-curr +1 +. ie (\\n[MN-last-pos] < \\n[MN-mk-l-\\n[MN-curr]]) \ +. sp |\\n[MN-mk-l-\\n[MN-curr]]u+\\n[MN-lead-adj]u +. el \{\ +. nr MN-shifted 1 +. sp 1v +. SHIM +. if \\n[#SHIM]u>\\n[MN-spacing] .sp -(1v+\\n[MN-lead-adj]u) +. tm MN: Warning: Left margin note #\\n[MN-curr] on page \\n[#P] shifted down. +. \} +.\" If last margin note doesn't fit +. if ( (\\n(nl+\\n[MN-div-l-\\n[MN-curr]-depth]) > (\\n(.p+\\n[#VARIABLE_FOOTER_POS]) ) \{\ +. if \\n[MN-shifted]=1 \{\ +. sp -(1v+\\n[#SHIM]u) +. rm MN-div-l-\\n[MN-curr] +. tm1 "[mom]: No room to start left margin note #\\n[MN-curr] on page \\n[#P] on page \\n[#P]. +. tm1 " Ignoring margin note. +. rr MN-shifted +. \} +. nr #no-repeat-MN-left 1 +. nr #OVERFLOW_LEFT 1 +. wh \\n[.p]u+\\n[#VARIABLE_FOOTER_POS]u-1u MN_OVERFLOW_TRAP +. vpt 1 +. \} +. MN-div-l-\\n[MN-curr] +. br +. nr MN-last-pos \\n[nl] +.\} +. ev +. po +. if !\\n[#no-repeat-MN-left]=1 \{\ +. if \\n[MN-right]=0 .vpt 1 +. \} +.. +\# +\# MNbottom-right +\# -------------- +\# The "right" half of Werner's original MNbottom. +\# +.de MNbottom-right +. nr MN-curr 0 +. nr MN-last-pos 0 +. nr MN-lead-adj \\n[#DOC_LEAD]-\\n[MN-spacing] +. vpt 0 +. po \\n[MN-right-start]u +. ev MNbottom-right-env +. nr #P \\n%+\\n[#PAGE_NUM_ADJ] +. while (\\n[MN-curr] < \\n[MN-right]) \{\ +. nr MN-curr +1 +. ie (\\n[MN-last-pos] < \\n[MN-mk-r-\\n[MN-curr]]) \ +. sp |\\n[MN-mk-r-\\n[MN-curr]]u+\\n[MN-lead-adj]u +. el \{\ +. nr MN-shifted 1 +. sp 1v +. SHIM +. tm MN: Warning: Right margin note #\\n[MN-curr] on page \\n[#P] shifted down. +. \} +.\" If last margin note doesn't fit +. if ( (\\n(nl+\\n[MN-div-r-\\n[MN-curr]-depth]) > (\\n(.p+\\n[#VARIABLE_FOOTER_POS]) ) \{\ +. if \\n[MN-shifted]=1 \{\ +. sp -(1v+\\n[#SHIM]u) +. rm MN-div-r-\\n[MN-curr] +. tm1 "[mom]: No room to start right margin note #\\n[MN-curr] on page \\n[#P] on page \\n[#P]. +. tm1 " Ignoring margin note. +. rr MN-shifted +. \} +. nr #no-repeat-MN-right 1 +. nr #OVERFLOW_RIGHT 1 +. wh \\n[.p]u+\\n[#VARIABLE_FOOTER_POS]u-1u MN_OVERFLOW_TRAP +. vpt 1 +. \} +. MN-div-r-\\n[MN-curr] +. br +. nr MN-last-pos \\n[nl] +.\} +. ev +. po +' sp |\\n[MN-curr-pos]u +. if !\\n[#no-repeat-MN-right]=1 .vpt 1 +.. diff --git a/contrib/groff-1.19/contrib/pdfmark/cover.ms b/contrib/groff-1.19/contrib/pdfmark/cover.ms new file mode 100644 index 0000000000..1fe7e542c4 --- /dev/null +++ b/contrib/groff-1.19/contrib/pdfmark/cover.ms @@ -0,0 +1,57 @@ +.de CS +.if !rCO .nr CO 0 +.if !rTL .nr TL 0 +.\".nr PO*SAVED \\n[PO] +.nr LL*SAVED \\n[LL] +.nr HM*SAVED \\n[HM] +.nr HM 0 +.nr PO (2.1c+\\n[CO]u) +.nr LL 17.1c +\& +.nr PS*SAVED \\n[PS] +.nr VS*SAVED \\n[VS] +.nr PS 24 +.nr VS 30 +.CD +.fam T +.sp |(5.9c+\\n[TL]u) +.als AU au@first +.. +.de au@first +.sp 1.5v +.als AU au@next +.AU \\$@ +.. +.de au@next +.DE +.nr PS 18 +.nr VS 18 +.CD +.sp 0.5v +\\$* +.. +.de AI +\H'-4z'\\$*\H'0' +.. +.de CE +.DE +.sp |17.5c +.PSPIC gnu.eps +.nr PS 19 +.CD +.fam H +.tkf HR 10z 2p 20z 4p +\H'-4z'A GNU MANUAL\H'0' +.DE +.\".nr PO \\n[PO*SAVED] +.nr LL \\n[LL*SAVED] +.nr PS \\n[PS*SAVED] +.nr VS \\n[VS*SAVED] +.nr HM \\n[HM*SAVED] +.\".rr PO*SAVED +.rr LL*SAVED +.rr PS*SAVED +.rr VS*SAVED +.rr HM*SAVED +.fam +.. diff --git a/contrib/groff-1.19/contrib/pdfmark/pdfmark.ms b/contrib/groff-1.19/contrib/pdfmark/pdfmark.ms new file mode 100644 index 0000000000..0e9f0747fa --- /dev/null +++ b/contrib/groff-1.19/contrib/pdfmark/pdfmark.ms @@ -0,0 +1,2531 @@ +.\" vim: ft=groff +.CS +Portable Document Format +Publishing with GNU Troff +.AU Keith Marshall +.AI +.CE +.\" +.\" Specify the Internet address for the groff web site. +.\" Currently, there are two available addresses; a copy is maintained at ... +.\" +.ds GROFF-WEBSITE http://www.gnu.org/software/groff +.\" +.\" ... but the official home site is at ... +.\" +.ds GROFF-WEBSITE http://groff.ffii.org +.\" +.\" Set the PDF default document view attribute, to ensure that the document +.\" outline is visible, each time the document is opened in Acrobat Reader. +.\" +.pdfview /PageMode /UseOutlines +.\" +.\" Initialise the outline view to show only three heading levels, +.\" with additional subordinate level headings folded. +.\" +.nr PDFOUTLINE.FOLDLEVEL 3 +.\" +.\" Add document identification meta-data +.\" +.pdfinfo /Title Portable Document Format Publishing with GNU Troff +.pdfinfo /Author Keith Marshall +.pdfinfo /Subject Tips and Techniques for Exploiting PDF Features with GNU Troff +.pdfinfo /Keywords groff troff PDF pdfmark +.\" +.\" Set the default cross reference format to indicate section numbers, +.\" rather than page numbers, when we insert a reference pointer. +.\" +.ds PDFHREF.INFO section \\*[SN-NO-DOT] \\$* +.\" +.\" Define a macro, to print reference links WITHOUT the usual "see" prefix. +.\" +.de XR-NO-PREFIX +.rn PDFHREF.PREFIX xx +.ds PDFHREF.PREFIX +.XR \\$@ +.rn xx PDFHREF.PREFIX +.. +.\" +.\" Define a string, +.\" to insert a Registered Trade Mark symbol as a superscript. +.\" +.ds rg \*{\(rg\*} +.\" +.\" Establish the page layout. +.\" +.nr PO 2.5c +.nr LL 17.0c +.nr LT 17.0c +.nr HY 0 +.nr FF 3 +.nr DI 5n +.\" +.\" Generate headers in larger point sizes, for NH levels < 4, +.\" with point size increasing by 1.5p, for each lesser NH level. +.\" +.nr GROWPS 4 +.nr PSINCR 1.5p +.\" +.de EM +.\".I "\s'+0.3'\\$1\s0" "\\$2" "\\$3" +.I \\$@ +.. +.de CWB +\\$5\fC\\$3\fP\f(CB\\$1\fP\fC\\$2\fP\\$4 +.. +.de CWI +\\$5\fC\\$3\fP\f(CI\\$1\fP\fC\\$2\fP\\$4 +.. +.de CWBI +\\$5\fC\\$3\fP\f[CBI]\\$1\fP\fC\\$2\fP\\$4 +.. +.ds = \f(CB\\$1\f(CR\\$4\f[CBI]\\$2\f(CR\\$3 +.\" +.NH 1 +.\" When we use numbered section headings, we might like to automatically +.\" insert a table of contents entry, using the text of the heading itself. +.\" The "ms" macros don't provide any standard mechanism for doing this, +.\" but "spdf.tmac" adds the "XN" macro, which will do it for us. +.\" +.\" Here's a simple example of how we might use it. In this case, the word +.\" "Introduction" will appear both in the body of the document, as the text +.\" of the heading, and it will be added to the table of contents, which is +.\" subsequently "printed" using the "TC" macro; in both locations, it will +.\" be prefixed by the section number. +.\" +.\" As an additional side effect, any use of "XN" will cause the table of +.\" contents entry to be automatically reproduced, with the exception of its +.\" page number reference, as a PDF document outline entry. Thus, the use +.\" of "XN" to specify numbered section headings results in the automatic +.\" creation of a numbered PDF document outline. This automatic creation +.\" of the outline is completely transparent, and will occur regardless +.\" of whether the "TC" macro is subsequently invoked, or not. +.\" +.XN Introduction +.\" +.\" If using an old s.tmac, without the SN-NO-DOT extension, +.\" make sure we get SOMETHING in section number references. +.\" +.if !dSN-NO-DOT .als SN-NO-DOT SN +.LP +It might appear that it is a fairly simple matter to +produce documents in Adobe\*(rg\~\(lqPortable\~Document\~Format\(rq, +commonly known as PDF, using +.CW groff ) GNU\~Troff\~( +as the document formatter. +Indeed, +.CW groff 's +default output format is the native Adobe\*(rg\~PostScript\*(rg format, +which PDF producers such as Adobe\*(rg Acrobat\*(rg Distiller\*(rg, +or GhostScript, expect as their input format. +Thus, the PDF production process would seem to entail simply +formatting the document source with +.CW groff , +to produce a PostScript\*(rg version of the document, +which can subsequently be processed by Acrobat\*(rg Distiller\*(rg +or GhostScript, to generate the final PDF document. +.LP +For many PDF production requirements, +the production cycle described above may be sufficient. +However, this is a limited PDF production method, +in which the resultant PDF document represents no more than +an on screen image of the printed form of the document, if +.CW groff 's +PostScript\*(rg output were printed directly. +.LP +The Portable Document Format provides a number of features, +which significantly enhance the experience of reading a document on screen, +but which are of little or no value to a document which is merely printed. +It +.EM is +possible to exploit these PDF features, which are described in the Adobe\*(rg +.\" +.de pdfmark-manual +.\" This is an example of a resource reference specified by URI ... +.\" We may need to refer often to the Adobe pdfmark Reference Manual, +.\" so we create the internet link definition using a macro, to make +.\" it reusable. +.\" +.\" Note also, that we protect the description of the reference by +.\" preceding it with "--", to avoid "invalid character in name" type +.\" error messages from groff (caused by the use of "\~"). +.\" +.pdfhref W -D http://partners.adobe.com/asn/acrobat/docs/pdfmark.pdf \ + -P \(lq -A \(rq\\$1 -- pdfmark\~Reference\~Manual +.. +.pdfmark-manual , +with some refinement of the simple PDF production method, provided +appropriate \(lqfeature implementing\(rq instructions can be embedded into +.CW groff 's +PostScript\*(rg rendering of the document. +This, of course, implies that the original document source, which +.CW groff +will process to generate the PostScript\*(rg description of the document, +must include appropriate markup to exploit the desired PDF features. +It is this preparation of the +.CW groff +document source to exploit a number of these features, +which provides the principal focus of this document. +.LP +The markup techniques to be described have been utilised in the production of +the PDF version of this document itself. +This has been formatted using +.CW groff 's +.CW ms +macro package; +thus, usage examples may be found in the document source file, +.CW \n(.F , +to which comments have been added, +to help identify appropriate markup examples for implementing PDF features, +such as:\(en +.QS +.IP \(bu +Selecting a default document view, which defines how the document will appear +when opened in the reader application; for example, when this document is +opened in Acrobat\*(rg\~Reader, it should display the top of the cover sheet, +in the document view pane, while a document outline should appear to the left, +in the \(lqBookmarks\(rq pane. +.IP \(bu +Adding document identification \(lqmeta\(hydata\(rq, +which can be accessed, in Acrobat\*(rg\~Reader, +by inspecting the \(lqFile\^/\^Document\~Properties\^/\^Summary\(rq. +.IP \(bu +Creating a document outline, which will be displayed in the \(lqBookmarks\(rq +pane of Acrobat\*(rg\~Reader, such that readers may quickly navigate to any +section of the document, simply by clicking on the associated heading +in the outline view. +.IP \(bu +Embedding active links in the body of the document, such that readers may +quickly navigate to related material at another location within the same +document, or in another PDF document, or even to a related Internet resource, +specified by its URI. +.IP \(bu +Adding annotations, in the form of \(lqsticky notes\(rq, at strategic +points within the PDF document. +.QE +.LP +All of the techniques described have been tested on +.EM both +GNU/Linux, and on Microsoft\*(rg Windows\(tm2000 operating platforms, using +.CW groff +.CW 1.19.1 ,\c +.pdfhref L -D footnote1 -- \** +.FS +.pdfhref M footnote1 +Later versions should, and some earlier versions may, be equally suitable. +See +.pdfhref W \*[GROFF-WEBSITE] +for information and availability of the latest version. +.FE +in association with +.CW AFPL +.CW GhostScript +.CW 8.14 .\c +.pdfhref L -D footnote2 -- \** +.FS +.pdfhref M footnote2 +Again, other versions may be suitable. +See +.pdfhref W http://ghostscript.com +for information and availability. +.FE +Other tools employed, which should be readily available on +.EM any +.SM +UNIX\(tm +.LG +or GNU/Linux system, are +.CW sed , +.CW awk +and +.CW make , +together with an appropriate text editor, for creating and marking up the +.CW groff +input files. +These additional utilities are not provided, as standard, +on the Microsoft\*(rg Windows\(tm platform, +but several third party implementations are available. +Some worth considering include the MKS\*(rg\~Toolkit,\** +.FS +A commercial offering; see +.pdfhref W http://mkssoftware.com/products/tk/default.asp +for information. +.FE +Cygwin,\** +.FS +A +.EM free +but comprehensive +.SM +POSIX +.LG +emulation environment and +.SM +UNIX\(tm +.LG +toolkit for 32\(hybit Microsoft\*(rg Windows\(tm platforms; see +.pdfhref W http://cygwin.com +for information and download. +.FE +or MSYS.\** +.FS +Another free, but minimal suite of common +.SM +UNIX\(tm +.LG +tools for 32\(hybit Microsoft\*(rg Windows\(tm, available for download from +.pdfhref W -A ; http://www.mingw.org +it +.EM does +include those tools listed above, +and is the package which was actually used when performing the Windows\(tm2000 +platform tests referred to in the text. +.FE +This list is by no means exhaustive, and should in no way be construed as an +endorsement of any of these packages, nor to imply that other similar packages, +which may be available, are in any way inferior to them. +.bp +.NH 1 +.\" We may wish a section heading to represent a named destination, +.\" so that we can create a linked reference to it, from some other +.\" part of the PDF document, (or even from another PDF document). +.\" +.\" Here we use the "-N" option of the "XN" macro, to create a named +.\" PDF link destination, at the location of the heading. Notice that +.\" we also use the "--" marker to separate the heading text from the +.\" preceding option specification; it is not strictly necessary in +.\" this case, but it does help to set off the heading text from the +.\" option specification. +.\" +.XN -N pdf-features -- Exploiting PDF Document Features +.LP +To establish a consistent framework for adding PDF features, a +.CW groff +macro package, named +.CW pdfmark.tmac , +has been provided. +Thus, to incorporate PDF features in a document, +the appropriate macro calls, as described below, may be placed in the +.CW groff +document source, which should then be processed with a +.CW groff +command of the form +.QP +.fam C +groff -Tps [-m +.I name "] -m" +.B pdfmark +.I options \& [- +.I "file ..." \& "...] " +.LP +It may be noted that the +.CW pdfmark +macros have no dependencies on, and no known conflicts with, +any other +.CW groff +macro package; thus, users are free to use any other macro package, +of their choice, to format their documents, while also using the +.CW pdfmark +macros to add PDF features. +.NH 2 +.XN -N pdfmark-operator -- The \F[C]pdfmark\F[] Operator +.LP +All PDF features are implemented by embedding instances of the +.B \F[C]pdfmark\F[] +operator, as described in the Adobe\*(rg +.pdfmark-manual , +into +.CW groff 's +PostScript\*(rg output stream. +To facilitate the use of this operator, the +.CW pdfmark +macro package defines the primitive +.CW pdfmark +macro; it simply emits its argument list, +as arguments to a +.CW pdfmark +operator, in the PostScript\*(rg output stream. +.LP +.pdfhref M -N pdfmark-example +To illustrate the use of the +.CW pdfmark +macro, the following is a much simplified example of how a bookmark +may be added to a PDF document outline +.QP +.CW ".pdfmark \e" +.RS 4 +.nf +.fam C +/Count 2 \e +/Title (An Example of a Bookmark with Two Children) \e +/View [/FitH \en[PDFPAGE.Y]] \e +/OUT +.RE +.LP +In general, users should rarely need to use the +.CW pdfmark +macro directly. +In particular, the above example is too simple for general use; it +.EM will +create a bookmark, but it does +.EM not +address the issues of setting the proper value for the +.CW /Count +key, nor of computing the +.CW PDFPAGE.Y +value used in the +.CW /View +key. The +.CW pdfmark +macro package includes a more robust mechanism for creating bookmarks, +.\" +.\" Here is an example of how a local reference may be planted, +.\" using the automatic formatting feature of the "pdfhref" macro. +.\" +.\" This is a forward reference to the named destination "add-outline", +.\" which is defined below, using the "XN" wrapper macro, from the +.\" "spdf.tmac" macro package. The automatically formatted reference +.\" will be enclosed in parentheses, as specified by the use of +.\" "-P" and "-A" options. +.\" +.pdfhref L -P ( -A ), -D add-outline +.\" +which addresses these issues automatically. +Nevertheless, the +.CW pdfmark +macro may be useful to users wishing to implement more advanced PDF features, +than those currently supported directly by the +.CW pdfmark +macro package. +.NH 2 +.XN -N docview -- Selecting an Initial Document View +.LP +By default, +when a PDF document is opened, +the first page will be displayed, +at the default magnification set for the reader, +and outline and thumbnail views will be hidden. +When using a PDF reader, +such as Acrobat\*(rg\~Reader, +which supports the +.CW /DOCVIEW +class of the +.CW pdfmark +operator, +these default initial view settings may be overridden, +using the +.CW pdfview +macro. +For example +.QP +.CW ".pdfview /PageMode /UseOutlines" +.LP +will cause Acrobat\*(rg\~Reader to open the document outline view, +to the left of the normal page view, +while +.QP +.CW ".pdfview /PageMode /UseThumbs" +.LP +will open the thumbnail view instead. +.LP +Note that the two +.CW /PageMode +examples, above, are mutually exclusive \(em it is not possible to have +.EM both +outline and thumbnail views open simultaneously. +However, it +.EM is +permitted to add +.CW /Page +and +.CW /View +keys, to force the document to open at a page other than the first, +or to change the magnification at which the document is initially displayed; +see the +.pdfmark-manual +for more information. +.LP +It should be noted that the view controlling meta\(hydata, defined by the +.CW pdfview +macro, is not written immediately to the PostScript\*(rg output stream, +but is stored in an internal meta\(hydata \(lqcache\(rq, +(simply implemented as a +.CW groff +diversion). +This \(lqcached\(lq meta\(hydata must be written out later, by invoking the +.CW pdfsync +macro, +.\" +.\" Here is another example of how we may introduce a forward reference. +.\" This time we are using the shorter notation afforded by the "XR" macro +.\" provided by "spdf.tmac"; this example is equivalent to the native +.\" "pdfmark.tmac" form +.\" .pdfhref L -D pdfsync -P ( -A ). +.\" +.XR pdfsync ). ( +.\" +.NH 2 +.XN -N docinfo -- Adding Document Identification Meta-Data +.LP +In addition to the +.CW /DOCVIEW +class of meta\(hydata described above, +.XR docview ), ( +we may also wish to include document identification meta\(hydata, +which belongs to the PDF +.CW /DOCINFO +class. +.LP +To do this, we use the +.CW pdfinfo +macro. +As an example of how it is used, +the identification meta\(hydata attached to this document +was specified using a macro sequence similar to:\(en +.DS I +.CW +\&.pdfinfo /Title PDF Document Publishing with GNU Troff +\&.pdfinfo /Author Keith Marshall +\&.pdfinfo /Subject How to Exploit PDF Features with GNU Troff +\&.pdfinfo /Keywords groff troff PDF pdfmark +.DE +Notice that the +.CW pdfinfo +macro is repeated, once for each +.CW /DOCINFO +record to be placed in the document. +In each case, the first argument is the name of the applicable +.CW /DOCINFO +key, which +.EM must +be named with an initial solidus character; +all additional arguments are collected together, +to define the value to be associated with the specified key. +.LP +As is the case with the +.CW pdfview +macro, +.XR docview ), ( +the +.CW /DOCINFO +records specified with the +.CW pdfinfo +macro are not immediately written to the PostScript\*(rg output stream; +they are stored in the same meta\(hydata cache as +.CW /DOCVIEW +specifications, until this cache is explicitly flushed, +by invoking the +.CW pdfsync +macro, +.XR pdfsync ). ( +.NH 2 +.XN -N add-outline -- Creating a Document Outline +.LP +A PDF document outline comprises a table of references, +to \(lqbookmarked\(rq locations within the document. +When the document is viewed in an \(lqoutline\~aware\(rq PDF document reader, +such as Adobe\*(rg Acrobat\*(rg Reader, +this table of \(lqbookmarks\(rq may be displayed in a document outline pane, +or \(lqBookmarks\(rq pane, to the left of the main document view. +Individual references in the outline view may then be selected, +by clicking with the mouse, +to jump directly to the associated marked location in the document view. +.LP +The document outline may be considered as a collection of \(lqhypertext\(rq +references to \(lqbookmarked\(rq locations within the document. +The +.CW pdfmark +macro package provides a single generalised macro, +.CW pdfhref , +for creating and linking to \(lqhypertext\(rq reference marks. +This macro will be described more comprehensively in a later section, +.XR pdfhref ); ( +the description here is restricted to its use for defining document outline entries. +.NH 3 +.XN -N basic-outline -- A Basic Document Outline +.LP +In its most basic form, the document outline comprises a structured list of headings, +each associated with a marked location, or \(lqbookmark\(rq, in the document text, +and a specification for how that marked location should be displayed, +when this bookmark is selected. +.LP +To create a PDF bookmark, the +.CW pdfhref +macro is used, +at the point in the document where the bookmark is to be placed, +in the form +.QP +.fam C +.B ".pdfhref O" +.I level > < +.I "descriptive text ..." +.LP +in which the reference class +.CWB O \& \& \(rq \(lq +stipulates that this is an outline reference. +.LP +Alternatively, for those users who may prefer to think of a document outline +simply as a collection of bookmarks, the +.CW pdfbookmark +macro is also provided \(em indeed, +.CW pdfhref +invokes it, when processing the +.CWB O \& \& \(rq \(lq +reference class operator. +It may be invoked directly, in the form +.QP +.fam C +.B .pdfbookmark +.I level > < +.I "descriptive text ..." +.LP +Irrespective of which of the above macro forms is employed, the +.CWI level > < +argument is required. +It is a numeric argument, defining the nesting level of the \(lqbookmark\(rq +in the outline hierarchy, with one being the topmost level. +Its function may be considered analagous to the +.EM "heading level" +of the document's section headings, +for example, as specified with the +.CW NH +macro, if using the +.CW ms +macros to format the document. +.LP +All further arguments, following the +.CWI level > < +argument, are collected together, to specify the heading text which will appear +in the document's outline view. +Thus, the outline entry for this section of this document, +which has a level three heading, +might be specified as +.QP +.CW +\&.pdfhref O 3 \*(SN A Basic Document Outline +.LP +or, in the alternative form using the +.CW pdfbookmark +macro, as +.QP +.CW +\&.pdfbookmark 3 \*(SN A Basic Document Outline +.NH 3 +.XN Hierarchical Structure in a Document Outline +.LP +When a document outline is created, using the +.CW pdfhref +macro as described in +.\" +.\" Here is an example of how we can temporarily modify the format of +.\" a reference link, in this case to indicate only the section number +.\" of the link target, in the form "section #", (or, if we define +.\" "SECREF.BEGIN" before the call, its content followed by the +.\" section number). +.\" +.\" We first define a macro, which will get the reference data from +.\" pdfhref, as arguments, and will return the formatted output, as we +.\" require it, the string "PDFHREF.TEXT". +.\" +.de SECREF +.while \\n(.$ \{\ +. ie '\\$1'section' \{\ +. if !dSECREF.BEGIN .ds SECREF.BEGIN \\$1 +. ds PDFHREF.TEXT \\*[SECREF.BEGIN]\~\\$2 +. rm SECREF.BEGIN +. shift \\n(.$ +. \} +. el .shift +. \} +.. +.\" We now tell "pdfhref" to use our formatting macro, in place of +.\" its builtin default formatter, before we specify the reference. +.\" +.pdfhref F SECREF +.pdfhref L -A , -D basic-outline +.\" +.\" At this point, we would normally revert the "pdfhref" formatter +.\" to use its default, built in macro. However, in this particular +.\" case, we want to use our custom format one more time, before we +.\" revert it, so we will omit the reversion step this time. +.\" +and any entry is added at a nesting level greater than one, +then a hierarchical structure is automatically defined for the outline. +However, as was noted in the simplified +.pdfhref L -D pdfmark-example -- example +in +.pdfhref L -A , -D pdfmark-operator +.\" +.\" And now, we revert to default "pdfhref" formatting behaviour, +.\" by completing the call we delayed above. +.\" +.pdfhref F +.\" +the data required by the +.CW pdfmark +operator to create the outline entry may not be fully defined, +when the outline reference is defined in the +.CW groff +document source. +Specifically, when the outline entry is created, its +.CW /Count +key must be assigned a value equal to the number of its subordinate entries, +at the next inner level of the outline hierarchy; +typically however, +these subordinate entries will be defined +.EM later +in the document source, and the appropriate +.CW /Count +value will be unknown, when defining the parent entry. +.LP +To resolve this paradox, the +.CW pdfhref +macro creates the outline entry in two distinct phases \(em +a destination marker is placed in the PostScript\*(rg output stream immediately, +when the outline reference is defined, +but the actual outline entry is stored in an internal \(lqoutline cache\(rq, +until its subordinate hierarchy has been fully defined; +it can then be inserted in the output stream, with its +.CW /Count +value correctly assigned. +Effectively, to ensure integrity of the document outline structure, +this means that each top level outline entry, and +.EM all +of its subordinates, are retained in the cache, until the +.EM next +top level entry is defined. +.LP +One potential problem, which arises from the use of the \(lqoutline cache\(rq, +is that, at the end of any document formatting run, the last top level outline entry, +and any subordinates defined after it, will remain in the cache, and will +.EM not +be automatically written to the output stream. +To avoid this problem, the user should follow the guidelines given in +.\" +.\" Here is a more conventional example of how to temporarily change +.\" to the format used to display reference links. We will again use +.\" the "SECREF" format, which we defined above, but on this occasion +.\" we will immediately revert to the default format, after the link +.\" has been placed. +.\" +.pdfhref F SECREF +.pdfhref L -D pdfsync -A , +.pdfhref F +.\" +to synchronise the output state with the cache state, +.XR pdfsync ), ( +at the end of the +.CW groff +formatting run. +.NH 3 +.XN -N outline-view -- Associating a Document View with an Outline Reference +.LP +Each \(lqbookmark\(rq entry, in a PDF document outline, +is associated with a specific document view. +When the reader selects any outline entry, +the document view changes to display the document context +associated with that entry. +.LP +The document view specification, +to be associated with any document outline entry, +is established at the time when the outline entry is created. +However, rather than requiring that each individual use of the +.CW pdhref +macro, to create an outline entry, +should include its own view specification, +the actual specification assigned to each entry is derived from +a generalised specification defined in the string +.CW PDFBOOKMARK.VIEW , +together with the setting of the numeric register +.CW PDFHREF.VIEW.LEADING , +which determine the effective view specification as follows:\(en +.QS +.IP \*[= PDFBOOKMARK.VIEW] +Establishes the magnification at which the document will be viewed, +at the location of the \(lqbookmark\(rq; by default, it is defined by +.RS +.QP +.CW ".ds PDFBOOKMARK.VIEW /FitH \e\en[PDFPAGE.Y] u" +.RE +.IP +which displays the associated document view, +with the \(lqbookmark\(rq location positioned at the top of the display window, +and with the magnification set to fit the page width to the width of the window. +.IP \*[= PDFHREF.VIEW.LEADING] +Specifies additional spacing, +to be placed between the top of the display window +and the actual location of the \(lqbookmark\(rq on the displayed page view. +By default, it is set as +.RS +.QP +.CW ".nr PDFHREF.VIEW.LEADING 5.0p" +.RE +.IP +Note that +.CW PDFHREF.VIEW.LEADING +does not represent true \(lqleading\(rq, in the typographical sense, +since any preceding text, set in the specified display space, +will be visible at the top of the document viewing window, +when the reference is selected. +.IP +Also note that the specification of +.CW PDFHREF.VIEW.LEADING +is shared by +.EM all +reference views defined by the +.CW pdfhref +macro; whereas +.CW PDFBOOKMARK.VIEW +is applied exclusively to outline references, +there is no independent +.CW PDFBOOKMARK.VIEW.LEADING +specification. +.QE +.LP +If desired, the view specification may be changed, by redefining the string +.CW PDFBOOKMARK.VIEW , +and possibly also the numeric register +.CW PDFHREF.VIEW.LEADING . +Any alternative definition for +.CW PDFBOOKMARK.VIEW +.EM must +be specified in terms of valid view specification parameters, +as described in the Adobe\*(rg +.pdfmark-manual . +.LP +Note the use of the register +.CW PDFPAGE.Y , +in the default definition of +.CW PDFBOOKMARK.VIEW +above. +This register is computed by +.CW pdfhref , +when creating an outline entry; +it specifies the vertical position of the \(lqbookmark\(rq, +in basic +.CW groff +units, relative to the +.EM bottom +edge of the document page on which it is defined, +and is followed, in the +.CW PDFBOOKMARK.VIEW +definition, by the +.CW grops +.CW u \(rq \(lq +operator, to convert it to PostScript\*(rg units on output. +It may be used in any redefined specification for +.CW PDFBOOKMARK.VIEW , +(or in the analogous definition of +.CW PDFHREF.VIEW , +described in +.XR-NO-PREFIX pdfhref-view ), +but +.EM not +in any other context, +since its value is undefined outside the scope of the +.CW pdfhref +macro. +.LP +Since +.CW PDFPAGE.Y +is computed relative to the +.EM bottom +of the PDF output page, +it is important to ensure that the page length specified to +.CW troff +correctly matches the size of the logical PDF page. +This is most effectively ensured, +by providing +.EM identical +page size specifications to +.CW groff , +.CW grops +and to the PostScript\*(rg to PDF converter employed, +and avoiding any page length changes within the document source. +.LP +Also note that +.CW PDFPAGE.Y +is the only automatically computed \(lqbookmark\(rq location parameter; +if the user redefines +.CW PDFBOOKMARK.VIEW , +and the modified view specification requires any other positional parameters, +then the user +.EM must +ensure that these are computed +.EM before +invoking the +.CW pdfhref +macro. +.NH 3 +.XN -N outline-folding -- Folding the Outline to Conceal Less Significant Headings +.LP +When a document incorporates many subheadings, +at deeply nested levels, +it may be desirable to \(lqfold\(rq the outline +such that only the major heading levels are initially visible, +yet making the inferior subheadings accessible, +by allowing the reader to expand the view of any heading branch on demand. +.LP +The +.CW pdfmark +macros support this capability, +through the setting of the +.CW PDFOUTLINE.FOLDLEVEL +register. +This register should be set to the number of heading levels +which it is desired to show in expanded form, in the +.EM initial +document outline display; +all subheadings at deeper levels will still be added to the outline, +but will not become visible until the outline branch containing them is expanded. +'ne 5 +For example, the setting used in this document: +.QS +.LD +.fam C +\&.\e" Initialise the outline view to show only three heading levels, +\&.\e" with additional subordinate level headings folded. +\&.\e" +\&.nr PDFOUTLINE.FOLDLEVEL 3 +.DE +.QE +.LP +results in only the first three levels of headings being displayed +in the document outline, +.EM until +the reader chooses to expand the view, +and so reveal the lower level headings in any outline branch. +.LP +The initial default setting of +.CW PDFOUTLINE.FOLDLEVEL , +if the document author does not choose to change it, +is 10,000. +This is orders of magnitude greater than the maximum heading level +which is likely to be used in any document; +thus the default behaviour will be to show document outlines fully expanded, +to display all headings defined, +at all levels within each document. +.LP +The setting of +.CW PDFOUTLINE.FOLDLEVEL +may be changed at any time; +however, the effect of each such change may be difficult to predict, +since it is applied not only to outline entries which are defined +.EM after +the setting is changed, +but also to any entries which remain in the outline cache, +.EM at +this time. +Therefore, it is recommended that +.CW PDFOUTLINE.FOLDLEVEL +should be set +.EM once , +at the start of each document; +if it +.EM is +deemed necessary to change it at any other time, +the outline cache should be flushed, +.XR pdfsync ), ( +.EM immediately +before the change, +which should immediately preceed a level one heading. +.NH 3 +.XN -N multipart-outline -- Outlines for Multipart Documents +.LP +When a document outline is created, using the +.CW pdfhref +macro, each reference mark is automatically assigned a name, +composed of a fixed stem followed by a serially generated numeric qualifier. +This ensures that, for each single part document, every outline reference +has a uniquely named destination. +.LP +As the overall size of the PDF document increases, +it may become convenient to divide it into smaller, +individually formatted PostScript\*(rg components, +which are then assembled, in the appropriate order, +to create a composite PDF document. +While this strategy may simplify the overall process of creating and +editing larger documents, it does introduce a problem in creating +an overall document outline, +since each individual PostScript\*(rg component will be assigned +duplicated sequences of \(lqbookmark\(rq names, +with each name ultimately referring to multiple locations in the composite document. +To avoid such reference naming conflicts, the +.CW pdfhref +macro allows the user to specify a \(lqtag\(rq, +which is appended to the automatically generated \(lqbookmark\(rq name; +this may be used as a discriminating mark, to distinguish otherwise +similarly named destinations, in different sections of the composite document. +.LP +To create a \(lqtagged\(rq document outline, +the syntax for invocation of the +.CW pdfhref +macro is modified, by the inclusion of an optional \(lqtag\(rq specification, +.EM before +the nesting level argument, i.e. +.QP +.fam C +.B ".pdfhref O" +.B -T \& [ +.I tag >] < +.I level > < +.I "descriptive text ..." +.LP +The optional +.CWI tag > < +argument may be composed of any characters of the user's choice; +however, its initial character +.EM "must not" +be any decimal digit, and ideally it should be kept short +\(em one or two characters at most. +.LP +By employing a different tag in each section, +the user can ensure that \(lqbookmark\(rq names remain unique, +throughout all the sections of a composite document. +For example, when using the +.CW spdf.tmac +macro package, which adds +.CW pdfmark +capabilities to the standard +.CW ms +package, +.XR using-spdf ), ( +the table of contents is collected into a separate PostScript\*(rg section +from the main body of the document. +In the \(lqbody\(rq section, the document outline is \(lquntagged\(rq, +but in the \(lqTable\~of\~Contents\(rq section, a modified version of the +.CW TC +macro adds an outline entry for the start of the \(lqTable\~of\~Contents\(rq, +invoking the +.CW pdfhref +macro as +.QP +.CW ".pdfhref O -T T 1 \e\e*[TOC]" +.LP +to tag the associated outline destination name with the single character suffix, +.CW T \(rq. \(lq +Alternatively, as in the case of the basic outline, +.XR basic-outline ), ( +this may equally well be specified as +.QP +.CW ".pdfbookmark -T T 1 \e\e*[TOC]" +.NH 3 +.XN Delegation of the Outline Definition +.LP +Since the most common use of a document outline +is to provide a quick method of navigating through a document, +using active \(lqhypertext\(rq links to chapter and section headings, +it may be convenient to delegate the responsibility of creating the outline +to a higher level macro, which is itself used to +define and format the section headings. +This approach has been adopted in the +.CW spdf.tmac +package, to be described later, +.XR using-spdf ). ( +.LP +When such an approach is adopted, +the user will rarely, if ever, invoke the +.CW pdfhref +macro directly, to create a document outline. +For example, the structure and content of the outline for this document +has been exclusively defined, using a combination of the +.CW NH +macro, from the +.CW ms +package, to establish the structure, and the +.CW XN +macro from +.CW spdf.tmac , +to define the content. +In this case, +the responsibility for invoking the +.CW pdfhref +macro, to create the document outline, +is delegated to the +.CW XN +macro. +.NH 2 +.XN -N pdfhref -- Adding Reference Marks and Links +.LP +.pdfhref F SECREF +.ds SECREF.BEGIN Section +.pdfhref L -D add-outline +.pdfhref F +has shown how the +.CW pdfhref +macro may be used to create a PDF document outline. +While this is undoubtedly a powerful capability, +it is by no means the only trick in the repertoire of this versatile macro. +.LP +The macro name, +.CW pdfhref , +which is a contraction of \(lqPDF HyperText Reference\(rq, +indicates that the general purpose of this macro is to define +.EM any +type of dynamic reference mark, within a PDF document. +Its generalised usage syntax takes the form +.QP +.fam C +.B .pdfhref +.BI class > < +.I "-options ...\&" ] [ +[--] +.I "descriptive text ...\&" ] [ +.LP +where +.CW <\f(CIclass\fP> +represents a required single character argument, +which defines the specific reference operation to be performed, +and may be selected from:\(en +.QS +.IP \*[= O] +Add an entry to the document outline. +This operation has been described earlier, +.XR add-outline ). ( +.IP \*[= M] +Place a \(lqnamed destination\(rq reference mark at the current output position, +in the current PDF document, +.XR mark-dest ). ( +.IP \*[= D] +Specify the content of a PDF document reference dictionary entry; +typically, such entries are generated automatically, +by transformation of the intermediate output resulting from the use of +.CW pdfhref +.CWB M \& \& \(rq, \(lq +with the +.CWB -X \& \& \(rq \(lq +modifier, +.XR create-map ); ( +however, it is also possible to specify such entries manually, +.XR user-format ). ( +.IP \*[= L] +Insert an active link to a named destination, +.XR link-named ), ( +at the current output position in the current PDF document, +such that when the reader clicks on the link text, +the document view changes to show the location of the named destination. +.IP \*[= W] +Insert an active link to a \(lqweb\(rq resource, +.XR add-weblink ), ( +at the current output position in the current PDF document. +This is effectively the same as using the +.CWB L \& \& \(rq \(lq +operator to establish a link to a named destination in another PDF document, +.XR link-extern ), ( +except that in this case, the destination is specified by a +\(lquniform resource identifier\(rq, or +.CW URI ; +this may represent any Internet or local resource +which can be specified in this manner. +.IP \*[= F] +Specify a user defined macro, to be called by +.CW pdfhref , +when formatting the text in the active region of a link, +.XR set-format ). ( +.IP \*[= Z] +Define the absolute position on the physical PDF output page, +where the \(lqhot\(hyspot\(rq associated with an active link is to be placed. +Invoked in pairs, marking the starting and ending PDF page co\(hyordinates +for each link \(lqhot\(hyspot\(rq, this operator is rarely, if ever, +specified directly by the user; +rather, appropriate +.CW pdfhref +.CWB Z \& \& \(rq \(lq +specifications are inserted automatically into the document reference map +during the PDF document formatting process, +.XR create-map ). ( +.IP \*[= I] +Initialise support for +.CW pdfhref +features. +The current +.CW pdfhref +implementation provides only one such feature which requires initialisation +\(em a helper macro which must be attached to a user supplied page trap handler, +in order to support mapping of reference \(lqhot\(hyspots\(rq +which extend through a page transition; +.XR page-trap ). ( +.QE +.NH 3 +.XN Optional Features of the \F[C]pdfhref\F[] Macro +.LP +The behaviour of a number of the +.CW pdfhref +macro operations can be modified, +by including +.EM "option specifiers" \(rq \(lq +after the operation specifying argument, +but +.EM before +any other arguments normally associated with the operation. +In +.EM all +cases, an option is specified by an +.EM "option flag" \(rq, \(lq +comprising an initial hyphen, +followed by one or two option identifying characters. +Additionally, +.EM some +options require +.EM "exactly one" +option argument; +for these options, the argument +.EM must +be specified, and it +.EM must +be separated from the preceding option flag by one or more +.EM spaces , +(tabs +.EM "must not" +be used). +It may be noted that this paradigm for specifying options +is reminiscent of most +.SM +UNIX\(tm +.LG +shells; however, in the case of the +.CW pdfhref +macro, omission of the space separating an option flag from its argument is +.EM never +permitted. +.LP +A list of +.EM all +general purpose options supported by the +.CW pdfhref +macro is given below. +Note that not all options are supported for all +.CW pdfhref +operations; the operations affected by each option are noted in the list. +For +.EM most +operations, if an unsupported option is specified, +it will be silently ignored; however, this behaviour should +not be relied upon. +.LP +The general purpose options, supported by the +.CW pdfhref +macro, are:\(en +.QS +.IP \*[= -N\0 name > <] +Allows the +.CWI name > < +associated with a PDF reference destination +to be defined independently from the following text, +which describes the reference. +This option affects only the +.CWB M \& \& \(rq \(lq +operation of the +.CW pdfhref +macro, +.XR mark-dest ). ( +.IP \*[= -E] +Also used exclusively with the +.CWB M \& \& \(rq \(lq +operator, the +.CWB -E +option causes any specified +.CWI descriptive \& \& \~\c +.CWI text +arguments, +.XR mark-dest ), ( +to be copied, or +.EM echoed , +in the body text of the document, +at the point where the reference mark is defined; +(without the +.CWB -E +option, such +.CWI descriptive \& \& \~\c +.CWI text +will appear +.EM only +at points where links to the reference mark are placed, +and where the standard reference display format, +.XR set-format ), ( +is used). +.IP \*[= -D\0 dest > <] +Specifies the +.CW URI , +or the destination name associated with a PDF active link, +independently of the following text, +which describes the link and demarcates the link \(lqhot\(hyspot\(rq. +This option affects the behaviour of the +.CW pdfhref +macro's +.CWB L \& \& \(rq \(lq +and +.CWB W \& \& \(rq \(lq +operations. +.IP +When used with the +.CWB L \& \& \(rq \(lq +operator, the +.CWI dest > < +argument must specify a PDF \(lqnamed destination\(rq, +as defined using +.CW pdfhref +with the +.CWB M \& \& \(rq \(lq +operator. +.IP +When used with the +.CWB W \& \& \(rq \(lq +operator, +.CWI dest > < +must specify a link destination in the form of a +\(lquniform resource identifier\(rq, or +.CW URI , +.XR add-weblink ). ( +.IP \*[= -F\0 file > <] +When used with the +.CWB L \& \& \(rq \(lq +.CW pdfhref +operator, +.CWI file > < +specifies an external PDF file in which the named destination +for the link reference is defined. +This option +.EM must +be specified with the +.CWB L \& \& \(rq \(lq +operator, +to create a link to a destination in a different PDF document; +when the +.CWB L \& \& \(rq \(lq +operator is used +.EM without +this option, the link destination is assumed to be defined +within the same document. +.IP \*[= -P\0 \(dqprefix\(hytext\(dq > <] +Specifies +.CWI \(dqprefix\(hytext\(dq > < +to be attached to the +.EM start +of the text describing an active PDF document link, +with no intervening space, but without itself being included in the +active area of the link \(lqhot\(hyspot\(rq; +it is effective with the +.CWB L \& \& \(rq \(lq +and +.CWB W \& \& \(rq \(lq +.CW pdfhref +operators. +.IP +Typically, this option would be used to insert punctuation before +the link \(lqhot\(hyspot\(rq. +Thus, there is little reason for the inclusion of spaces in +.CWI \(dqprefix\(hytext\(dq > < ; +however, if such space is required, then the enclosing double quotes +.EM must +be specified, as indicated. +.IP \*[= -A\0 \(dqaffixed\(hytext\(dq > <] +Specifies +.CWI \(dqaffixed\(hytext\(dq > < +to be attached to the +.EM end +of the text describing an active PDF document link, +with no intervening space, but without itself being included in the +active area of the link \(lqhot\(hyspot\(rq; +it is effective with the +.CWB L \& \& \(rq \(lq +and +.CWB W \& \& \(rq \(lq +.CW pdfhref +operators. +.IP +Typically, this option would be used to insert punctuation after +the link \(lqhot\(hyspot\(rq. +Thus, there is little reason for the inclusion of spaces in +.CWI \(dqaffixed\(hytext\(dq > < ; +however, if such space is required, then the enclosing double quotes +.EM must +be specified, as indicated. +.IP \*[= -T\0 tag > <] +When specified with the +.CWB O \& \& \(rq \(lq +operator, +.CWI tag > < +is appended to the \(lqbookmark\(rq name assigned to the generated outline entry. +This option is +.EM required , +to distinguish between the series of \(lqbookmark\(rq names generated in +individual passes of the +.CW groff +formatter, when the final PDF document is to be assembled +from a number of separately formatted components; +.XR multipart-outline ). ( +.IP \*[= -X] +This +.CW pdfhref +option is used with either the +.CWB M \& \& \(rq \(lq +operator, or with the +.CWB L \& \& \(rq \(lq +operator. +.IP +When used with the +.CWB M \& \& \(rq \(lq +operator, +.XR mark-dest ), ( +it ensures that a cross reference record for the marked destination +will be included in the document reference map, +.XR export-map ). ( +.IP +When used with the +.CWB L \& \& \(rq \(lq +operator, +.XR link-named ), ( +it causes the reference to be displayed in the standard cross reference format, +.XR set-format ), ( +but substituting the +.CWI descriptive \& \& \~\c +.CWI text +specified in the +.CW pdfhref \& \(lq +.CW L \(rq +argument list, +for the description specified in the document reference map. +.IP \*[= --] +Marks the end of the option specifiers. +This may be used with all +.CW pdfhref +operations which accept options, to prevent +.CW pdfhref +from interpreting any following arguments as option specifiers, +even if they would otherwise be interpreted as such. +It is also useful when the argument list to +.CW pdfhref +contains special characters \(em any special character, +which is not legal in a +.CW groff +macro name, will cause a parsing error, if +.CW pdfhref +attempts to match it as a possible option flag; +using the +.CW -- \(rq \(lq +flag prevents this, so suppressing the +.CW groff +warning message, which would otherwise ensue. +.IP +Using this flag after +.EM all +sequences of macro options is recommended, +even when it is not strictly necessary, +if only for the entirely cosmetic benefit of visually separating +the main argument list from the sequence of preceding options. +.QE +.LP +In addition to the +.CW pdfhref +options listed above, a supplementary set of two character options are defined. +These supplementary options, listed below, are intended for use with the +.CWB L \& \& \(rq \(lq +operator, in conjunction with the +.CWB -F \& \& \~\c +.CWBI file > < +option, to specify alternate file names, +in formats compatible with the file naming conventions +of alternate operating systems; +they will be silently ignored, if used in any other context. +.LP +The supported alternate file name options, +which are ignored if the +.CWB -F \& \& \~\c +.CWBI file > < +option is not specified, are:\(en +.QS +.IP \*[= -DF\0 dos\(hyfile > <] +Specifies the name of the file in which a link destination is defined, +using the file naming semantics of the +.CW MS\(hyDOS \*(rg +operating system. +When the PDF document is read on a machine +where the operating system uses the +.CW MS\(hyDOS \*(rg +file system, then +.CWI dos\(hyfile > < +is used as the name of the file containing the reference destination, +overriding the +.CWI file > < +argument specified with the +.CWB -F +option. +.IP \*[= -MF\0 mac\(hyfile > <] +Specifies the name of the file in which a link destination is defined, +using the file naming semantics of the +.CW Apple \*(rg +.CW Macintosh \*(rg +operating system. +When the PDF document is read on a machine +where the operating system uses the +.CW Macintosh \*(rg +file system, then +.CWI mac\(hyfile > < +is used as the name of the file containing the reference destination, +overriding the +.CWI file > < +argument specified with the +.CWB -F +option. +.IP \*[= -UF\0 unix\(hyfile > <] +Specifies the name of the file in which a link destination is defined, +using the file naming semantics of the +.CW UNIX \(tm +operating system. +When the PDF document is read on a machine +where the operating system uses +.CW POSIX +file naming semantics, then +.CWI unix\(hyfile > < +is used as the name of the file containing the reference destination, +overriding the +.CWI file > < +argument specified with the +.CWB -F +option. +.IP \*[= -WF\0 win\(hyfile > <] +Specifies the name of the file in which a link destination is defined, +using the file naming semantics of the +.CW MS\(hyWindows \*(rg +32\(hybit operating system. +When the PDF document is read on a machine +where the operating system uses any of the +.CW MS\(hyWindows \*(rg +file systems, with long file name support, then +.CWI win\(hyfile > < +is used as the name of the file containing the reference destination, +overriding the +.CWI file > < +argument specified with the +.CWB -F +option. +.QE +.NH 3 +.XN -N mark-dest -- Marking a Reference Destination +.LP +The +.CW pdfhref +macro may be used to create active links to any Internet resource, +specified by its +.CW URI , +or to any \(lqnamed destination\(rq, +either within the same document, or in another PDF document. +Although the PDF specification allows link destinations to be defined +in terms of a page number, and an associated view specification, +this style of reference is not currently supported by the +.CW pdfhref +macro, because it is not possible to adequately bind the specification +for the destination with the intended reference context. +.LP +References to Internet resources are interpreted in accordance with the +.CW W3C +standard for defining a +.CW URI ; +hence the only prerequisite, for creating a link to any Internet resource, +is that the +.CW URI +be properly specified, when declaring the reference; +.XR add-weblink ). ( +In the case of references to \(lqnamed destinations\(rq in PDF documents, +however, it is necessary to provide a mechanism for creating such +\(lqnamed destinations\(rq. +This may be accomplished, by invoking the +.CW pdfhref +macro in the form +.QP +.fam C +.B ".pdfhref M" +.B -N \& [ +.I name >] < +.B -X ] [ +.B -E ] [ +.I "descriptive text ...\&" ] [ +.LP +This creates a \(lqnamed destination\(rq reference mark, with its name specified by +.CWI name > < , +or, if the +.CWB -N +option is not specified, by the first word of +.CWI descriptive \& \& \~\c +.CWI text \& \& ; +(note that this imposes the restriction that, +if the +.CWB -N +option is omitted, then +.EM "at least" +one word of +.CWI descriptive \& \& \~\c +.CWI text +.EM must +be specified). +Additionally, a reference view will be automatically defined, +and associated with the reference mark, +.XR pdfhref-view ), ( +.\" and, if any +.\" .CWI descriptive +.\" .CWI text +.\" is specified, or the +and, if the +.CWB -X +option is specified, and no document cross reference map has been imported, +.XR import-map ), ( +then a cross reference mapping record, +.XR export-map ), ( +will be written to the +.CW stdout +stream; +this may be captured, and subsequently used to generate a cross reference map +for the document, +.XR create-map ). ( +.LP +When a \(lqnamed destination\(rq reference mark is created, using the +.CW pdfhref +macro's +.CWB M \& \& \(rq \(lq +operator, there is normally no visible effect in the formatted document; any +.CWI descriptive \& \& \~\c +.CWI text +which is specified will simply be stored in the cross reference map, +for use when a link to the reference mark is created. +This default behaviour may be changed, by specifying the +.CWB -E +option, which causes any specified +.CWI descriptive \& \& \~\c +.CWI text +to be \(lqechoed\(rq in the document text, +at the point where the reference mark is placed, +in addition to its inclusion in the cross reference map. +.NH 4 +.XN -N export-map -- Mapping a Destination for Cross Referencing +.LP +Effective cross referencing of +.EM any +document formatted by +.CW groff +requires multiple pass formatting. +Details of how this multiple pass formatting may be accomplished, +when working with the +.CW pdfmark +macros, will be discussed later, +.XR do-xref ); ( +at this stage, the discussion will be restricted to the initial preparation, +which is required at the time when the cross reference destinations are defined. +.LP +The first stage, in the process of cross referencing a document, +is the generation of a cross reference map. +Again, the details of +.EM how +the cross reference map is generated will be discussed in +.pdfhref F SECREF L -D do-xref -A ; +.pdfhref F +however, it is important to recognise that +.EM what +content is included in the cross reference map is established +when the reference destination is defined \(em it is derived +from the reference data exported on the +.CW stderr +stream by the +.CW pdfhref +macro, when it is invoked with the +.CWB M \& \& \(rq \(lq +operator, and is controlled by whatever definition of the string +.CW PDFHREF.INFO +is in effect, when the +.CW pdfhref +macro is invoked. +.LP +The initial default setting of +.CW PDFHREF.INFO +is +.QP +.CW ".ds PDFHREF.INFO page \e\en% \e\e$*" +.LP +which ensures that the cross reference map will contain +at least a page number reference, supplemented by any +.CWI descriptive \& \& \~\c +.CWI text +which is specified for the reference mark, as defined by the +.CW pdfhref +macro, with its +.CWB M \& \& \(rq \(lq +operator; this may be redefined by the user, +to export additional cross reference information, +or to modify the default format for cross reference links, +.XR set-format ). ( +.NH 4 +.XN -N pdfhref-view -- Associating a Document View with a Reference Mark +.LP +In the same manner as each document outline reference, defined by the +.CW pdfhref +macro with the +.CWB O \& \& \(rq \(lq +operator, +.XR add-outline ), ( +has a specific document view associated with it, +each reference destination marked by +.CW pdfhref +with the +.CWB M \& \& \(rq \(lq +operator, requires an associated document view specification. +.LP +The mechanism whereby a document view is associated with a reference mark +is entirely analogous to that employed for outline references, +.XR outline-view ), ( +except that the +.CW PDFHREF.VIEW +string specification is used, in place of the +.CW PDFBOOKMARK.VIEW +specification. +Thus, the reference view is defined in terms of:\(en +.QS +.IP \*[= PDFHREF.VIEW] +A string, +establishing the position of the reference mark within the viewing window, +and the magnification at which the document will be viewed, +at the location of the marked reference destination; +by default, it is defined by +.RS +.QP +.CW ".ds PDFHREF.VIEW /FitH \e\en[PDFPAGE.Y] u" +.RE +.IP +which displays the reference destination at the top of the viewing window, +with the magnification set to fit the page width to the width of the window. +.IP \*[= PDFHREF.VIEW.LEADING] +A numeric register, +specifying additional spacing, to be placed between the top of the display +window and the actual position at which the location of the reference +destination appears within the window. +This register is shared with the view specification for outline references, +and thus has the same default initial setting, +.RS +.QP +.CW ".nr PDFHREF.VIEW.LEADING 5.0p" +.RE +.IP +as in the case of outline reference views. +.IP +Again, notice that +.CW PDFHREF.VIEW.LEADING +does not represent true typographic \(lqleading\(rq, +since any preceding text, set in the specified display space, +will be visible at the top of the viewing window, +when the reference is selected. +.QE +.LP +Just as the view associated with outline references may be changed, +by redefining +.CW PDFBOOKMARK.VIEW , +so the view associated with marked reference destinations may be changed, +by redefining +.CW PDFHREF.VIEW , +and, if desired, +.CW PDFHREF.VIEW.LEADING ; +such changes will become effective for all reference destinations marked +.EM after +these definitions are changed. +(Notice that, since the specification of +.CW PDFHREF.VIEW.LEADING +is shared by both outline reference views and marked reference views, +if it is changed, then the views for +.EM both +reference types are changed accordingly). +.LP +It may again be noted, that the +.CW PDFPAGE.Y +register is used in the definition of +.CW PDFHREF.VIEW , +just as it is in the definition of +.CW PDFBOOKMARK.VIEW ; +all comments in +.pdfhref F SECREF L -D outline-view +.pdfhref F +relating to its use, and indeed to page position computations in general, +apply equally to marked reference views and to outline reference views. +.NH 3 +.XN -N link-named -- Linking to a Marked Reference Destination +.LP +Any named destination, such as those marked by the +.CW pdfhref +macro, using it's +.CWB M \& \& \(rq \(lq +operator, may be referred to from any point in +.EM any +PDF document, using an +.EM "active link" ; +such active links are created by again using the +.CW pdfhref +macro, but in this case, with the +.CWB L \& \& \(rq \(lq +operator. +This operator provides support for two distinct cases, +depending on whether the reference destination is defined in +the same document as the link, +.XR link-intern ), ( +or is defined as a named destination in a different PDF document, +.XR link-extern ). ( +.NH 4 +.XN -N link-intern -- References within a Single PDF Document +.LP +The general syntactic form for invoking the +.CW pdfhref +macro, +when creating a link to a named destination within the same PDF document is +.QP +.fam C +.B .pdfhref +.B L +.B -D \& [ +.BI dest-name >] < +.B -P \& [ +.BI prefix-text >] < +.B -A \& [ +.BI affixed-text >] < +\e +.br +\0\0\0 +.B -X ] [ +.B -- ] [ +.I "descriptive text ...\&" ] [ +.LP +where +.CWI dest-name > < +specifies the name of the link destination, +as specified using the +.CW pdfhref +.CWB M \& \& \(rq \(lq +operation; (it may be defined either earlier in the document, +to create a backward reference, or later, to create a forward reference). +.\" +.\" Here's a example of how to add an iconic annotation. +.\" +.\".pdfnote -T "Internal Cross References" \ +.\" This description is rather terse, and could benefit from \ +.\" the inclusion of an example. +.LP +If any +.CWI descriptive \& \& \~\c +.CWI text +arguments are specified, then they will be inserted into the +.CW groff +output stream, to define the text appearing in the \(lqhot\(hyspot\(rq +region of the link; +this will be printed in the link colour specified by the string, +.CW PDFHREF.TEXT.COLOUR , +which is described in +.XR-NO-PREFIX set-colour . +If the +.CWB -X +option is also specified, then the +.CWI descriptive \& \& \~\c +.CWI text +will be augmented, by prefacing it with page and section number indicators, +in accordance with the reference formatting rules which are in effect, +.XR set-format ); ( +such indicators will be included within the active link region, +and will also be printed in the link colour. +.LP +Note that +.EM either +the +.CWB -D \& \& \~\c +.CWBI dest\(hyname > < +option, +.EM or +the +.CWI descriptive \& \& \~\c +.CWI text +arguments, +.EM "but not both" , +may be omitted. +If the +.CWB -D \& \& \~\c +.CWBI dest\(hyname > < +option is omitted, then the first word of +.CWI descriptive \& \& \~\c +.CWI text \& \& , +i.e.\~all text up to but not including the first space, +will be interpreted as the +.CWBI dest\(hyname > < +for the link; this text will also appear in the running text of the document, +within the active region of the link. +Alternatively, if the +.CWB -D \& \& \~\c +.CWBI dest\(hyname > < +option +.EM is +specified, and +.CWI descriptive \& \& \~\c +.CWI text +is not, +then the running text which defines the reference, +and its active region, +will be derived from the reference description which is specified +when the named destination is marked, +.XR mark-dest ), ( +and will be formatted according to the reference formatting rules +which are in effect, when the reference is placed, +.XR set-format ); ( +in this case, it is not necessary to specify the +.CWB -X +option to activate automatic formatting of the reference \(em it is implied, +by the omission of all +.CWI descriptive \& \& \~\c +.CWI text +arguments. +.LP +The +.CWB -P \& \& \~\c +.CWBI prefix\(hytext > < +and +.CWB -A \& \& \~\c +.CWBI affixed\(hytext > < +options may be used to specify additional text +which will be placed before and after the linked text respectively, +with no intervening space. +Such prefixed and affixed text will be printed in the normal text colour, +and will not be included within the active region of the link. +This feature is mostly useful for creating parenthetical references, +or for placing punctuation adjacent to, +but not included within, +the text which defines the active region of the link. +.LP +The operation of the +.CW pdfhref +macro, when used with its +.CWB L \& \& \(rq \(lq +operator to place a link to a named PDF destination, +may best be illustrated by an example. +However, since the appearance of the link will be influenced by +factors established when the named destination is marked, +.XR mark-dest ), ( +and also by the formatting rules in effect when the link is placed, +the presentation of a suitable exanple will be deferred, +until the formatting mechanism has been explained, +.XR set-format ). ( +.NH 4 +.XN -N link-extern -- References to Destinations in Other PDF Documents +.LP +The +.CW pdfhref +macro's +.CWB L \& \& \(rq \(lq +operator is not restricted to creating reference links +within a single PDF document. +When the link destination is defined in a different document, +then the syntactic form for invoking +.CW pdfhref +is modified, by the addition of options to specify the +name and location of the PDF file in which the destination is defined. +Thus, the extended +.CW pdfhref +syntactic form becomes +.QP +.fam C +.B .pdfhref +.B L +.B -F +.BI file > < +.B -D \& [ +.BI dest-name >] < +\e +.br +\0\0\0 +.B -DF \& [ +.BI dos-file >] < +.B -MF \& [ +.BI mac-file >] < +.B -UF \& [ +.BI unix-file >] < +\e +.br +\0\0\0 +.B -WF \& [ +.BI win-file >] < +.B -P \& [ +.BI prefix-text >] < +.B -A \& [ +.BI affixed-text >] < +\e +.br +\0\0\0 +.B -X ] [ +.B -- ] [ +.I "descriptive text ...\&" ] [ +.LP +where the +.CWB -F \& \& \~\c +.CWBI file > < +option serves +.EM two +purposes: it both indicates to the +.CW pdfhref +macro that the specified reference destination +is defined in an external PDF file, +and it also specifies the normal path name, +which is to be used to locate this file, +when a user selects the reference. +.LP +In addition to the +.CWB -F \& \& \~\c +.CWBI file > < +option, which +.EM must +be specified when referring to a destination in an external PDF file, +the +.CWB -DF \& \& \~\c +.CWBI dos\(hyfile > < , +.CWB -MF \& \& \~\c +.CWBI mac\(hyfile > < , +.CWB -UF \& \& \~\c +.CWBI unix\(hyfile > < +and +.CWB -WF \& \& \~\c +.CWBI win\(hyfile > < +options may be used to specify the location of the file +containing the reference destination, +in a variety of operating system dependent formats. +These options assign their arguments to the +.CW /DosFile , +.CW /MacFile , +.CW /UnixFile +and +.CW /WinFile +keys of the generated +.CW pdfmark +respectively; thus when any of these options are specified, +.EM "in addition to" +the +.CWB -F \& \& \~\c +.CWBI file > < +option, and the document is read on the appropriate operating systems, +then the path names specified by +.CWBI dos\(hyfile > < , +.CWBI mac\(hyfile > < , +.CWBI unix\(hyfile > < +and +.CWBI win\(hyfile > < +will be searched, +.EM instead +of the path name specified by +.CWBI file > < , +for each of the +.CW MS\(hyDOS \*(rg, +.CW Apple \*(rg +.CW Macintosh \*(rg, +.CW UNIX \(tm +and +.CW MS\(hyWindows \*(rg +operating systems, respectively; see the +.pdfmark-manual , +for further details. +.LP +Other than the use of these additional options, +which specify that the reference destination is in an external PDF file, +the behaviour of the +.CW pdfhref +.CWB L \& \& \(rq \(lq +operator, with the +.CWB -F \& \& \~\c +.CWBI file > < +option, remains identical to its behaviour +.EM without +this option, +.XR link-intern ), ( +with respect to the interpretation of other options, +the handling of the +.CWI descriptive \& \& \~\c +.CWI text +arguments, and the formatting of the displayed reference. +.LP +Once again, since the appearance of the reference is determined by +factors specified in the document reference map, +and also by the formatting rules in effect when the reference is placed, +the presentation of an example of the placing of +a reference to an external destination will be deferred, +until the formatting mechanism has been explained, +.XR set-format ). ( +.NH 3 +.XN -N add-weblink -- Linking to Internet Resources +.LP +In addition to supporting the creation of cross references +to named destinations in PDF documents, the +.CW pdfhref +macro also has the capability to create active links to Internet resources, +or indeed to +.EM any +resource which may be specified by a Uniform Resource Identifier, +(which is usually abbreviated to the acronym \(lqURI\(rq, +and sometimes also referred to as a Uniform Resource Locator, +or \(lqURL\(rq). +.LP +Since the mechanism for creating a link to a URI differs somewhat +from that for creating PDF references, the +.CW pdfhref +macro is invoked with the +.CWB W \& \& \(rq \(lq +(for \(lqweb\(hylink\(rq) operator, rather than the +.CWB L \& \& \(rq \(lq +operator; nevertheless, the invocation syntax is similar, having the form +.QP +.fam C +.B .pdfhref +.B W +.B -D \& [ +.BI URI >] < +.B -P \& [ +.BI prefix-text >] < +.B -A \& [ +.BI affixed-text >] < +\e +.br +\0\0\0 +.B -- ] [ +.I "descriptive text ...\&" +.LP +where the optional +.CWB -D +.CWBI URI > < +modifier specifies the address for the target Internet resource, +in any appropriate +.EM "Uniform Resource Identifier" +format, while the +.CWI descriptive +.CWI text +argument specifies the text which is to appear in the \(lqhot\(hyspot\(rq +region, and the +.CWB -P +.CWBI prefix\(hytext > < +and +.CWB -A +.CWBI affixed\(hytext > < +options have the same effect as in the case of local document links, +.XR link-intern ). ( +.LP +Notice that it is not mandatory to include the +.CWB -D +.CWBI URI > < +in the link specification; if it +.EM is +specified, then it is not necessary for the URI to appear, +in the running text of the document \(em the +.CWI descriptive +.CWI text +argument exactly defines the text +which will appear within the \(lqhot\(hyspot\(rq region, +and this need not include the URI. +However, if the +.CWB -D \& \& \~\c +.CWBI URI > < +specification is omitted, then the +.CWI descriptive +.CWI text +argument +.EM must +be an +.EM exact +representation of the URI, which +.EM will , +therefore, appear as the entire content of the \(lqhot\(hyspot\(rq. +For example, we could introduce a reference to +.pdfhref W -D \*[GROFF-WEBSITE] -A , the groff web site +in which the actual URI is concealed, by using mark up such as:\(en +.DS I +.CW +For example, we could introduce a reference to +\&.pdfhref W -D \*[GROFF-WEBSITE] -A , the groff web site +in which the actual URI is concealed, +.DE +Alternatively, +to refer the reader to the groff web site, +making it obvious that the appropriate URI is +.pdfhref W -A , \*[GROFF-WEBSITE] +the requisite mark up might be:\(en +.DS I +.CW +to refer the reader to the groff web site, +making it obvious that the appropriate URI is +\&.pdfhref W -A , \*[GROFF-WEBSITE] +the requisite mark up might be:\e(en +.DE +.NH 3 +.XN -N set-format -- Establishing a Format for References +.LP +There are two principal aspects to be addressed, +when defining the format to be used when displaying references. +Firstly, it is desirable to provide a visual cue, +to indicate that the text describing the reference is imbued +with special properties \(em it is dynamically linked to the reference +destination \(em and secondly, the textual content should +describe where the link leads, and ideally, +it should also describe the content of the reference destination. +.LP +The visual cue, +that a text region defines a dynamically linked reference, +is most commonly provided by printing the text within the active +region in a distinctive colour. +This technique will be employed automatically by the +.CW pdfhref +macro \(em +.XR set-colour +\(em unless the user specifically chooses to adopt, and implement, +some alternative strategy. +.NH 4 +.XN -N set-colour -- Using Colour to Demarcate Link Regions +.LP +Typically, when a PDF document contains +.EM active +references to other locations, either within the same document, +or even in other documents, or on the World Wide Web, +it is usually desirable to make the regions +where these active links are placed stand out from the surrounding text. +.NH 4 +.XN -N user-format -- Specifying Reference Text Explicitly +.NH 4 +.XN -N auto-format -- Using Automatically Formatted Reference Text +.NH 4 +.XN -N custom-format -- Customising Automatically Formatted Reference Text +.LP +It is incumbent on the user, +if employing automatic formatting of the displayed reference, +.XR set-format ), ( +to ensure that an appropriate reference definition +is created for the reference destination, +and is included in the reference map for the document +in which the reference will appear; +thus, it may be easiest to +.EM always +use manual formatting for external references. +.NH 3 +.XN Problematic Links +.LP +Irrespective of whether a +.CW pdfhref +reference is placed using the +.CWB L \& \& \(rq \(lq +operator, or the +.CWB W \& \& \(rq \(lq +operator, there may be occasions when the resulting link +does function as expected. +A number of scenarios, which are known to be troublesome, +are described below. +.NH 4 +.XN -N page-trap -- Links with a Page Transition in the Active Region +.LP +When a link is placed near the bottom of a page, +it is possible that its active region, or \(lqhot\(hyspot\(rq, +may extend on to the next page. +In this situation, a page trap macro is required +to intercept the page transition, and to restart the mapping of +the \(lqhot\(hyspot\(rq boundary on the new page. +.LP +The +.CW pdfmark +macro package includes a suitable page trap macro, to satisfy this requirement. +However, to avoid pre\(hyempting any other requirement the user may have for +a page transition trap, this is +.EM not +installed as an active page trap, +unless explicitly requested by the user. +.LP +To enable proper handling of page transitions, +which occur within the active regions of reference links, +the user should:\(en +.QS +.nr ITEM 0 1 +.IP \n+[ITEM]. +Define a page transition macro, to provide whatever features may be required, +when a page transition occurs \(em e.g.\& printing footnotes, +adding page footers and headers, etc. +This macro should end by setting the output position at the correct +vertical page offset, where the printing of running text is to restart, +following the page transition. +.IP \n+[ITEM]. +Plant a trap to invoke this macro, at the appropriate vertical position +marking the end of normal running text on each page. +.KS +.IP \n+[ITEM]. +Initialise the +.CW pdfhref +hook into this page transition trap, by invoking +.RS +.IP +.fam C +.B "pdfhref I -PT" +.BI macro-name > < +.LP +where +.CWBI macro-name > < +is the name of the user supplied page trap macro, +to ensure that +.CW pdfhref +will correctly restart mapping of active link regions, +at the start of each new page. +.KE +.RE +.QE +.LP +It may be observed that this initialisation of the +.CW pdfhref +page transition hook is, typically, required only once +.EM before +document formatting begins. +Users of document formatting macro packages may reasonably expect that +this initialisation should be performed by the macro package itself. +Thus, writers of such macro packages which include +.CW pdfmark +bindings, should provide appropriate initialisation, +so relieving the end user of this responsibility. +The following example, abstracted from the sample +.CW ms +binding package, +.CW spdf.tmac , +illustrates how this may be accomplished:\(en +.DS I +.CW +\&.\e" groff "ms" provides the "pg@bottom" macro, which has already +\&.\e" been installed as a page transition trap. To ensure proper +\&.\e" mapping of "pdfhref" links which overflow the bottom of any +\&.\e" page, we need to install the "pdfhref" page transition hook, +\&.\e" as an addendum to this macro. +\&. +\&.pdfhref I -PT pg@bottom +.DE +.NH 2 +.XN -N add-note -- Annotating a PDF Document using Pop-Up Notes +.NH 2 +.XN -N pdfsync -- Synchronising Output and \F[C]pdfmark\F[] Contexts +.LP +It has been noted previously, that the +.CW pdfview +macro, +.XR docview ), ( +the +.CW pdfinfo +macro, +.XR docinfo ), ( +and the +.CW pdfhref +macro, when used to create a document outline, +.XR add-outline ), ( +do not immediately write their +.CW pdfmark +output to the PostScript\*(rg data stream; +instead, they cache their output, in a +.CW groff +diversion, in the case of the +.CW pdfview +and +.CW pdfinfo +macros, or in an ordered collection of strings and numeric registers, +in the case of the document outline, +until a more appropriate time for copying it out. +In the case of +.CW pdfview +and +.CW pdfinfo +\(lqmeta\(hydata\(rq, +this \(lqmore appropriate time\(rq is explicitly chosen by the user; +in the case of document outline data, +.EM some +cached data may be implicitly written out as the document outline is compiled, +but there will +.EM always +be some remaining data, which must be explicitly flushed out, before the +.CW groff +formatting process is allowed to complete. +.LP +To allow the user to choose when cached +.CW pdfmark +data is to be flushed to the output stream, the +.CW pdfmark +macro package provides the +.CW pdfsync +macro, (to synchronise the cache and output states). +In its simplest form, it is invoked without arguments, i.e. +.QP +.fam C +.B .pdfsync +.LP +This form of invocation ensures that +.EM both +the \(lqmeta\(hydata cache\(rq, containing +.CW pdfview +and +.CW pdfinfo +data, +.EM and +the \(lqoutline cache\(rq, +containing any previously uncommitted document outline data, +are flushed; ideally, this should be included in a +.CW groff +\(lqend macro\(rq, to ensure that +.EM both +caches are flushed, before +.CW groff +terminates. +.LP +Occasionally, +it may be desirable to flush either the \(lqmeta\(hydata cache\(rq, +without affecting the \(lqoutline cache\(rq, or vice\(hyversa, +at a user specified time, prior to reaching the end of the document. +This may be accomplished, by invoking the +.CW pdfsync +macro with an argument, i.e. +.QP +.fam C +.B ".pdfsync M" +.LP +to flush only the \(lqmeta\(hydata cache\(rq, or +.QP +.fam C +.B ".pdfsync O" +.LP +to flush only the \(lqoutline cache\(rq. +.LP +The \(lqmeta\(hydata cache\(rq can normally be safely flushed +in this manner, at any time +.EM after +output of the first page has started; +(it may cause formatting problems, +most notably the appearance of unwanted white space, if flushed earlier, +or indeed, if flushed immediately after a page transition, +but before the output of the content on the new page has commenced). +Caution is required, however, when explicitly flushing the +\(lqoutline cache\(rq, since if the outline is to be +subsequently extended, then the first outline entry after flushing +.EM must +be specified at level 1. +Nevertheless, such explict flushing may occasionally be necessary; +for example, the +.CW TC +macro in the +.CW spdf.tmac +package, +.XR using-spdf ), ( +invokes +.CW ".pdfsync\ O" \(rq \(lq +to ensure that the outline for the \(lqbody\(rq section of the document +is terminated, +.EM before +it commences the formatting of the table of contents section. +.bp +.NH 1 +.XN -N pdf-layout -- PDF Document Layout +.LP +The +.CW pdfmark +macros described in the preceding section, +.XR pdf-features ), ( +provide no inherent document formatting capability of their own. +However, +they may be used in conjunction with any other +.CW groff +macro package of the user's choice, +to add such capability. +.LP +In preparing this document, the standard +.CW ms +macro package, supplied as a component of the GNU Troff distribution, +has been employed. +To facilitate the use of the +.CW pdfmark +macros with the +.CW ms +macros, +a binding macro package, +.CW spdf.tmac , +has been created. +The use of this binding macro package is described in the following section, +.XR using-spdf ); ( +it may also serve as an example to users of other standard +.CW groff +macro packages, +as to how the +.CW pdfmark +macros may be employed with their chosen primary macro package. +.NH 2 +.XN -N using-spdf -- Using \F[C]pdfmark\F[] Macros with the \F[C]ms\F[] Macro Package +.LP +The use of the binding macro package, +.CW spdf.tmac , +allows for the use of the +.CW pdfmark +macros in conjunction with the +.CW ms +macros, +simply by issuing a +.CW groff +command of the form +.QP +.fam C +groff -Tps +.B -mspdf +.I "-options ...\&" ] [ +file(s) ... +.LP +When using the +.CW spdf.tmac +package, the +.CW groff +input files may be marked up using any of the standard +.CW ms +macros to specify document formatting, +while PDF features may be added, +using any of the +.CW pdfmark +macros described previously, +.XR pdf-features ). ( +Additionally, +.CW spdf.tmac +defines a number of convenient extensions to the +.CW ms +macro set, to better accomodate the use of PDF features within the +.CW ms +formatting framework, +and to address a number of +.CW ms +document layout issues, +which require special handling when producing PDF documents. +These additional macros, +and the issues they are intended to address, +are described below. +.NH 3 +.XN \F[C]ms\F[] Section Headings in PDF Documents +.LP +Traditionally, +.CW ms +provides the +.CW NH +and +.CW SH +macros, to specify section headings. +However, +there is no standard mechanism for generating a +table of contents entry based on the text of the section heading; +neither is there any recognised standard method for establishing a +cross reference link to the section. +.LP +To address this +.CW ms +limitation, +.CW spdf.tmac +defines the +.CW XN +macro, +.XR xn-macro ), ( +to be used in conjunction with the +.CW NH +macro. +.NH 4 +.XN -N xn-macro -- The \F[C]XN\F[] Macro +.NH 1 +.XN The PDF Publishing Process +.NH 2 +.XN -N do-xref -- Resolving Cross References +.NH 3 +.XN -N create-map -- Creating a Document Reference Map +.NH 3 +.XN -N import-map -- Deploying a Document Reference Map +.TC diff --git a/contrib/groff-1.19/contrib/pdfmark/pdfmark.tmac b/contrib/groff-1.19/contrib/pdfmark/pdfmark.tmac new file mode 100644 index 0000000000..385185c42a --- /dev/null +++ b/contrib/groff-1.19/contrib/pdfmark/pdfmark.tmac @@ -0,0 +1,1562 @@ +.\" -*- nroff -*- +.ig + +pdfmark.tmac + +Copyright (C) 2004 + Free Software Foundation, Inc. + Written by Keith Marshall (keith.d.marshall@ntlworld.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, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. + +Author's Note +============= + +While I have written this macro package from scratch, much of my +inspiration has come from discussion on the groff mailing list +(mailto:groff@gnu.org). I am particularly indebted to: + + Kees Zeelenberg, for an earlier macro package he posted, + a study of which helped me to get started. + + Carlos J. G. Duarte and Werner Lemberg, whose discussion + on computation of the bounding boxes for link "hot-spots" + forms the basis of such computations in this package. +.. +.if !\n(.g .ab These pdfmark macros require groff. +.\" +.\" Check if we have already been loaded -- do not reload +.if d pdfmark .nx +.\" +.\" ====================================================================== +.\" Module PDFMARK: Insert Arbitrary PDFMARK Code in the PostScript Stream +.\" ====================================================================== +.\" +.\" PDFMARK output may be disabled, by zeroing the PDFOPMODE register, +.\" ( which mimics a more generic OPMODE, if it is defined ). +.\" +.if rOPMODE .aln PDFOPMODE OPMODE +.\" +.\" but if OPMODE wasn't defined, +.\" then make the default PDFMARK mode ENABLED. +.\" +.if !rPDFOPMODE .nr PDFOPMODE 1 +.\" +.\" The "pdfmark" macro is responsible for emitting the appropriate +.\" PostScript code. +.\" +.de pdfmark +.\" ---------------------------------------------------------------- +.\" Usage: +.\" .pdfmark text of pdfmark instruction +.\" Macro supplies the required opening "[" and closing "pdfmark" +.\" operator; DO NOT include them in the instruction text! +.\" ---------------------------------------------------------------- +.\" +.if \\n[PDFOPMODE] \X'ps:exec [\\$* pdfmark'\c +.. +.\" +.\" Some supporting macros defer actual pdfmark output until an +.\" appropriate time for it to be written; the "pdfsync" macro +.\" provides a mechanism for flushing such deferred output; +.\" it should be called from an end macro, and at any other time +.\" when it may be deemed necessary to flush pdfmark context. +.\" +.de pdfsync +.\" ---------------------------------------------------------------- +.\" Usage: +.\" .pdfsync buffer ... +.\" Arguments indicate which "buffer(s)" to flush: +.\" O -> bookmark (outline) cache +.\" M -> document metadata diversion +.\" If no argument, flush ALL buffers +.\" ---------------------------------------------------------------- +.\" +.ie \\n(.$ \{\ +. while \\n(.$ \{\ +. if '\\$1'O' .pdf:bm.sync 1 +. if '\\$1'M' \{\ +. if dpdf:metadata .pdf:metadata +. rm pdf:metadata +. \} +. shift +. \} +. \} +.el .pdfsync O M +.. +.\" +.\" some helper functions ... +.\" +.\" "pdf:warn" and "pdf:error" write diagnostic messages to stderr +.\" +.de pdf:warn +.\" ---------------------------------------------------------- +.\" Usage: +.\" .pdf:warn text of message +.\" ---------------------------------------------------------- +.\" +.tm \\n(.F:\\n(.c: macro warning: \\$* +.. +.de pdf:error +.\" ---------------------------------------------------------- +.\" Usage: +.\" .pdf:error text of message +.\" ---------------------------------------------------------- +.\" +.tm \\n(.F:\\n(.c: macro error: \\$* +.. +.\" "pdf:pop", assisted by "pdf*pop", allows us to retrieve register, +.\" or string values, from a string masquerading as a data queue, +.\" or as a stack. +.\" +.de pdf:pop +.\" ---------------------------------------------------------------- +.\" Usage: +.\" .pdf:pop +.\" $1 = nr for numeric register, ds for string +.\" $2 = name of register or string to be assigned +.\" $3 = name of string, from which data is to be retrieved +.\" ---------------------------------------------------------------- +.\" +.pdf*pop \\$* \\*[\\$3] +.. +.de pdf*pop +.ds pdf:stack \\$3 +.\\$1 \\$2 \\$4 +.shift 4 +.ie \\n(.$ .ds \\*[pdf:stack] \\$* +.el .rm \\*[pdf:stack] +.rm pdf:stack +.. +.\" +.\" +.\" =========================================================== +.\" Module PDFINFO: Insert MetaData Entries into a PDF Document +.\" =========================================================== +.\" +.\" N.B. +.\" Output from the macros in this module is deferred, until +.\" subsequent invocation of .pdfsync, or .pdfexit +.\" +.\" ."pdfinfo" provides a general purpose form of metadata entry ... +.\" it allows arbitrary text to be associated with any specified +.\" metadata field name. +.\" +.de pdfinfo +.\" ------------------------------------------------------------------- +.\" Usage: +.\" .pdfinfo /FieldName field content ... +.\" Examples: +.\" .pdfinfo /Title A PDF Document +.\" .pdfinfo /Author Keith Marshall +.\" ------------------------------------------------------------------- +.\" +.ds pdf:meta.field \\$1 +.shift +.da pdf:metadata +\!.pdfmark \\*[pdf:meta.field] (\\$*) /DOCINFO +.di +.rm pdf:meta.field +.. +.\" +.\" Macro "pdfview" defines a special form of metadata entry ... +.\" it uses the /DOCVIEW pdfmark, to specify the initial (default) view, +.\" when the document is opened. +.\" +.de pdfview +.\" ------------------------------------------------------------------- +.\" Usage: +.\" .pdfview view parameters ... +.\" Examples: +.\" .pdfview /PageMode /UseOutlines +.\" .pdfview /Page 2 /View [/FitH \n(.p u] +.\" ------------------------------------------------------------------- +.\" +.da pdf:metadata +\!.pdfmark \\$* /DOCVIEW +.di +.. +.\" +.\" +.\" ===================================================================== +.\" Module PDFNOTE: Insert "Sticky Note" Style Comments in a PDF Document +.\" ===================================================================== +.\" +.\" "PDFNOTE.WIDTH" and "PDFNOTE.HEIGHT" set the preferred size for +.\" display of the "sticky note" pane, when opened. Acrobat Reader +.\" seems not to honour these -- perhaps GhostScript doesn't encode +.\" them correctly! Anyway, let's set some suitable default values, +.\" in case the user has a set up which does work as advertised. +.\" +.nr PDFNOTE.WIDTH 3.5i +.nr PDFNOTE.HEIGHT 2.0i +.\" +.\" "pdf:bbox" defines the expression used to set the size and location +.\" of the bounding rectangle for display of notes and link "hot-spots". +.\" This is defined, such that a note is placed at troff's current text +.\" position on the current page, with its displayed image size defined +.\" by the "PDFNOTE.WIDTH" and "PDFNOTE.HEIGHT" registers, while the +.\" bounds for a link "hot-spot" are matched to the text region which +.\" defines the "hot-spot". +.\" +.ds pdf:bbox \\n[pdf:llx] u \\n[pdf:lly] u \\n[pdf:urx] u \\n[pdf:ury] u +.\" +.\" Getting line breaks into the text of a PDFNOTE is tricky -- we need +.\" to get a "\n" into the PostScript stream, but three levels of "\" are +.\" swallowed, when we invoke "pdfnote". The following definition of "PDFLB", +.\" (for LineBreak), is rather ugly, but does allow us to use +.\" +.\" .pdfnote Some text.\*[PDFLB]Some more text, on a new line. +.\" +.ds PDFLB \\\\\\\\\\\\\\\\n +.\" +.de pdfnote +.\" ---------------------------------------------------------------------- +.\" Usage: +.\" .pdfnote [-T "Text for Title"] Text of note ... +.\" ---------------------------------------------------------------------- +.\" +.if \\n[PDFOPMODE] \{\ +.\" +.\" First, compute the bounding rectangle, +.\" for this PDFNOTE instance +.\" +. mk pdf:ury +. nr pdf:llx \\n(.k+\\n(.o+\\n[.in] +. nr pdf:lly \\n[pdf:ury]-\\n[PDFNOTE.HEIGHT] +. nr pdf:urx \\n[pdf:llx]+\\n[PDFNOTE.WIDTH] +. ds pdf:note.instance /Rect [\\*[pdf:bbox]] +.\" +.\" Parse any specified (recognisable) PDFNOTE options +.\" +. while dpdf:note\\$1 \{\ +. pdf:note\\$1 \\$@ +. shift \\n[pdf:note.argc] +. \} +.\" +.\" Emit the note, and clean up +.\" +. pdfmark \\*[pdf:note.instance] /Contents (\\$*) /ANN +. rm pdf:note.instance +. rr pdf:note.argc +. \} +.. +.de pdf:note-T +.nr pdf:note.argc 2 +.as pdf:note.instance " /Title (\\$2) +.. +.\" +.\" +.\" ===================================================================== +.\" Module PDFBOOKMARK: Add an Outline Reference in the PDF Bookmark Pane +.\" ===================================================================== +.\" +.\" "PDFBOOKMARK.VIEW" controls how the document will be displayed, +.\" when the user selects a bookmark. This default setting will fit +.\" the page width to the viewing window, with the bookmarked entry +.\" located at the top of the viewable area. +.\" +.ds PDFBOOKMARK.VIEW /FitH \\n[PDFPAGE.Y] u +.\" +.\" "PDFOUTLINE.FOLDLEVEL" controls how the document outline will be +.\" displayed. It is a number, defining the maximum heading level +.\" which will be visible, without outline expansion by the user, in +.\" the initial view of the document outline. Assuming that no sane +.\" document will ever extend to 10,000 levels of nested headings, +.\" this initial default value causes outlines to be fully expanded. +.\" +.nr PDFOUTLINE.FOLDLEVEL 10000 +.\" +.\" The actual job of creating an outline reference +.\" is performed by the "pdfbookmark" macro. +.\" +.de pdfbookmark +.\" ------------------------------------------------------------------ +.\" Usage: +.\" .pdfbookmark [-T tag] level "Text of Outline Entry" +.\" +.\" $1 = nesting level for bookmark (1 is top level) +.\" $2 = text for bookmark, (in PDF viewer bookmarks list) +.\" $3 = suffix for PDF internal bookmark name (optional) +.\" ------------------------------------------------------------------ +.\" +.if \\n[PDFOPMODE] \{\ +.\" +.\" Make the bookmark name "untagged" by default, +.\" then parse any specified options, to set a "tag", if required +.\" +. ds pdf:href-T +. while dpdf:href.opt\\$1 \{\ +. pdf:href.opt\\$1 \\$@ +. shift \\n[pdf:href.argc] +. \} +. rr pdf:href.argc +.\" +.\" If we found "--" to mark the end of the options, discard it +.\" +. if '\\$1'--' .shift +.\" +.\" Synchronise the bookmark cache +.\" to the requested bookmark nesting level +.\" +. pdf:bm.sync \\$1 +. shift +.\" +.\" Increment the bookmark serialisation index +.\" in order to generate a uniquely serialised bookmark name, +.\" ( which we return in the string "PDFBOOKMARK.NAME" ), +.\" and insert this bookmark into the cache +.\" +. pdf:href.sety +. nr pdf:bm.nr +1 +. ds PDFBOOKMARK.NAME pdf:bm\\n[pdf:bm.nr]\\*[pdf:href-T] +. ds pdf:bm\\n[pdf:bm.nr] /Dest /\\*[PDFBOOKMARK.NAME] +. pdfmark \\*[pdf:bm\\n[pdf:bm.nr]] /View [\\*[PDFBOOKMARK.VIEW]] /DEST +. as pdf:bm\\n[pdf:bm.nr] " /Title (\\$*) +. pdf:href.options.clear +. rr PDFPAGE.Y +. \} +.. +.\" +.\" Macro "pdf:bm.sync" is called for each bookmark created, +.\" to establish a cache entry at the appropriate nesting level. +.\" It will flush ALL previous cache content, when called to +.\" add a new bookmark at level 1, or if simply called at +.\" level 1, without adding any bookmark. +.\" +.de pdf:bm.sync +.\" ------------------------------------------------------------------ +.\" Usage: +.\" .pdf:bm.sync level +.\" $1 = nesting level of current bookmark, or 1 to flush cache +.\" ------------------------------------------------------------------ +.\" +.\" First validate the bookmark nesting level +.\" adjusting it if required +.\" +.if \\$1>\\n[pdf:bm.nl] .nr pdf:bm.nl +1 +.ie \\$1>\\n[pdf:bm.nl] \{\ +. pdf:warn adjusted level \\$1 bookmark; should be <= \\n[pdf:bm.nl] +. \} +.el .nr pdf:bm.nl \\$1 +.if \\n[pdf:bm.nl]<1 \{\ +. pdf:warn bad arg (\\$1) in \\$0 \\$1; \\$0 1 forced +. nr pdf:bm.nl 1 +. \} +.\" +.\" If reverting from a higher to a lower nesting level, +.\" cyclicly adjust cache counts for each pending higher level +.\" +.if \\n[pdf:bm.lc]>=\\n[pdf:bm.nl] \{\ +. nr pdf:bm.lc +1 +. if !rpdf:bm.c\\n[pdf:bm.lc].c .nr pdf:bm.c\\n[pdf:bm.lc].c 0 +. while \\n[pdf:bm.lc]>\\n[pdf:bm.nl] \{\ +. as pdf:bm.c\\n[pdf:bm.lc] " \\n[pdf:bm.c\\n[pdf:bm.lc].c] +. rr pdf:bm.c\\n[pdf:bm.lc].c +. nr pdf:bm.lc -1 +. \} +. \} +.\" +.\" Update the cache level, +.\" flushing when we are at level 1 +.\" +.nr pdf:bm.lc \\n[pdf:bm.nl] +.ie \\n[pdf:bm.nl]=1 \{\ +. while \\n[pdf:bm.ic]<\\n[pdf:bm.nr] .pdf:bm.emit 0 +. rr pdf:bm.rc +. \} +.el .nr pdf:bm.c\\n[pdf:bm.nl].c +1 +.. +.\" Macro "pdf:bm.emit" is called, when the cache is at level 1. +.\" This flushes ALL pending bookmarks from the cache, i.e. the +.\" preceding level 1 bookmark, and any nested dependents, +.\" which it may have. +.\" +.de pdf:bm.emit +.\" ------------------------------------------------------------------ +.\" Usage: +.\" .pdf:bm.emit flag +.\" $1 = reference counting flag, used to control recursion +.\" ------------------------------------------------------------------ +.\" +.\" First check for nested dependents, +.\" and append the "dependent count" to the bookmark, as required. +.\" +.nr pdf:bm.ic +1 +.nr pdf:bm.lc +1 +.pdf:pop nr pdf:bm.rc pdf:bm.c\\n[pdf:bm.lc] +.if \\n[pdf:bm.rc] \{\ +. ds pdf:bm.fold +. if \\n[pdf:bm.lc]>\\n[PDFOUTLINE.FOLDLEVEL] .ds pdf:bm.fold - +. as pdf:bm\\n[pdf:bm.ic] " /Count \\*[pdf:bm.fold]\\n[pdf:bm.rc] +. rm pdf:bm.fold +. \} +.pdfmark \\*[pdf:bm\\n[pdf:bm.ic]] /OUT +.rm pdf:bm\\n[pdf:bm.ic] +.\" +.\" For ALL dependents, if any, +.\" recursively flush out any higher level dependents, +.\" which they themselves may have +.\" +.while \\n[pdf:bm.rc] \{\ +. nr pdf:bm.rc -1 +. pdf:bm.emit \\n[pdf:bm.rc] +. \} +.\" +.\" Finally, +.\" unwind the recursive call stack, until we return to the top level. +.\" +.nr pdf:bm.rc \\$1 +.nr pdf:bm.lc -1 +.. +.nr pdf:bm.nr 0 +.nr pdf:bm.nl 1 +.nr pdf:bm.lc 0 +.nr pdf:bm.ic 0 +.\" +.\" +.\" ============================================================= +.\" Module PDFHREF: Create Hypertext References in a PDF Document +.\" ============================================================= +.\" +.\" "PDFHREF.VIEW" controls how the document will be displayed, +.\" when the user follows a link to a named reference. +.\" +.ds PDFHREF.VIEW /FitH \\n[PDFPAGE.Y] u +.\" +.\" This default setting will fit the page width to the viewing +.\" window, with the bookmarked entry located close to the top +.\" of the viewable area. "PDFHREF.VIEW.LEADING" controls the +.\" actual distance below the top of the viewing window, where +.\" the reference will be positioned; 5 points is a reasonable +.\" default offset. +.\" +.nr PDFHREF.VIEW.LEADING 5.0p +.\" +.\" Yuk!!! +.\" PDF view co-ordinates are mapped from the bottom left corner, +.\" of the page, whereas page printing co-ordinates are mapped +.\" conventionally, from top left. +.\" +.\" Macro "pdf:href.sety" transforms the vertical position of the +.\" last printed baseline, from the printing co-ordinate domain to +.\" the PDF view domain. +.\" +.de pdf:href.sety +.\" ---------------------------------------------------------------- +.\" Usage: +.\" .pdf:href.sety +.\" ---------------------------------------------------------------- +.\" +.\" This computation yields the vertical view co-ordinate +.\" in groff's basic units; don't forget to append grops' "u" +.\" conversion operator, when writing the pdfmark! +.\" +.nr PDFPAGE.Y \\n(.p-\\n(nl+\\n[PDFHREF.VIEW.LEADING] +.. +.\" When we create a link "hot-spot" ... +.\" "PDFHREF.LEADING" sets the distance above the top of the glyph +.\" bounding boxes, in each line of link text, over which the link +.\" hot-spot will extend, while "PDFHREF.HEIGHT" sets the hot-spot +.\" height, PER LINE of text occupied by the reference. +.\" +.\" Since most fonts specify some leading space within the bounding +.\" boxes of their glyphs, a better appearance may be achieved when +.\" NEGATIVE leading is specified for link hot-spots; indeed, when +.\" the default 10pt Times font is used, -1.0 point seems to be a +.\" reasonable default value for "PDFHREF.LEADING" -- it may be +.\" changed, if desired. +.\" +.\" "PDFHREF.HEIGHT" is initially set as one vertical spacing unit; +.\" note that it is defined as a string, so it will adapt to changes +.\" in the vertical spacing. Changing it is NOT RECOMMENDED. +.\" +.nr PDFHREF.LEADING -1.0p +.ds PDFHREF.HEIGHT 1.0v +.\" +.\" PDF readers generally place a rectangular border around link +.\" "hot-spots". Within text, this looks rather ugly, so we set +.\" "PDFHREF.BORDER" to suppress it -- the three zeroes represent +.\" the border parameters in the "/Border [0 0 0]" PDFMARK string, +.\" and may be changed to any valid form, as defined in Adobe's +.\" PDFMARK Reference Manual. +.\" +.ds PDFHREF.BORDER 0 0 0 +.\" +.\" "PDFHREF.COLOUR" (note British spelling) defines the colour to +.\" be used for display of link "hot-spots". This will apply both +.\" to borders, if used, and, by default to text; however, actual +.\" text colour is set by "PDFHREF.TEXT.COLOUR", which may be reset +.\" independently of "PDFHREF.COLOUR", to achieve contrasting text +.\" and border colours. +.\" +.\" "PDFHREF.COLOUR" must be set to a sequence of three values, +.\" each in the range 0.0 .. 1.0, representing the red, green, and +.\" blue components of the colour specification in the RGB colour +.\" domain, which is shared by "groff" and the PDF readers. +.\" +.ds PDFHREF.COLOUR 0.35 0.00 0.60 +.defcolor pdf:href.colour rgb \*[PDFHREF.COLOUR] +.\" +.\" "PDFHREF.TEXT.COLOUR", on the other hand, is simply defined +.\" using any "groff" colour name -- this default maps it to the +.\" same colour value as "PDFHREF.COLOUR". +.\" +.ds PDFHREF.TEXT.COLOUR pdf:href.colour +.\" +.\" Accommodate users who prefer the American spelling, COLOR, to +.\" the British spelling, COLOUR. +.\" +.als PDFHREF.COLOR PDFHREF.COLOUR +.als PDFHREF.TEXT.COLOR PDFHREF.TEXT.COLOUR +.\" +.\" All PDF "Hypertext" reference capabilities are accessed +.\" through the "pdfhref" macro +.\" +.de pdfhref +.\" ----------------------------------------------------------------- +.\" Usage: +.\" .pdfhref ... +.\" ----------------------------------------------------------------- +.\" +.if \\n[PDFOPMODE] \{\ +.\" +.\" Loop over all subcommands specified in the argument list +.\" +. while \\n(.$ \{\ +. \" +. \" Initially, assume each subcommand will complete successfully +. \" +. nr pdf:href.ok 1 +. \" +. \" Initialise -E and -X flags in the OFF state +. \" +. nr pdf:href-E 0 +. nr pdf:href-X 0 +. \" +. \" Handle the case where subcommand is specified as "-class", +. \" setting up appropriate macro aliases for subcommand handlers. +. \" +. if dpdf*href\\$1 .als pdf*href pdf*href\\$1 +. if dpdf*href\\$1.link .als pdf*href.link pdf*href\\$1.link +. if dpdf*href\\$1.file .als pdf*href.file pdf*href\\$1.file +. \" +. \" Repeat macro alias setup +. \" for the case where the subcommand is specified as "class", +. \" (without a leading hyphen) +. \" +. if dpdf*href-\\$1 .als pdf*href pdf*href-\\$1 +. if dpdf*href-\\$1.link .als pdf*href.link pdf*href-\\$1.link +. if dpdf*href-\\$1.file .als pdf*href.file pdf*href-\\$1.file +. \" +. \" Process one subcommand ... +. \" +. ie dpdf*href \{\ +. \" +. \" Subcommand "class" is recognised ... +. \" discard the "class" code from the argument list, +. \" set the initial argument count to swallow all arguments, +. \" and invoke the selected subcommand handler. +. \" +. shift +. nr pdf:argc \\n(.$ +. pdf*href \\$@ +. \" +. \" When done, +. \" discard all arguments actually consumed by the handler, +. \" before proceeding to the next subcommand (if any). +. \" +. shift \\n[pdf:argc] +. \} +. el \{\ +. \" +. \" Subcommand "class" is not recognised ... +. \" issue a warning, and discard the entire argument list, +. \" so aborting this "pdfhref" invocation +. \" +. pdf:warn \\$0: undefined reference class '\\$1' ignored +. shift \\n(.$ +. \} +. \" +. \" Clean up temporary reference data, +. \" to ensure it doesn't propagate to any future reference +. \" +. rm pdf*href pdf:href.link pdf:href.files +. rr pdf:href-E pdf:href-X +. pdf:href.options.clear +. \} +. rr pdf:href.ok +. \} +.. +.\" +.\" Macros "pdf:href.flag" and "pdf:href.option" +.\" provide a generic mechanism for switching on flag type options, +.\" and for decoding options with arguments, respectively +.\" +.de pdf:href.flag +.\" ---------------------------------------------------------------------- +.\" ---------------------------------------------------------------------- +.nr pdf:href\\$1 1 +.nr pdf:href.argc 1 +.. +.de pdf:href.option +.\" ---------------------------------------------------------------------- +.\" ---------------------------------------------------------------------- +.ds pdf:href\\$1 \\$2 +.nr pdf:href.argc 2 +.. +.\" +.\" Valid PDFHREF options are simply declared +.\" by aliasing option handlers to "pdf:href.option", +.\" or to "pdf:href.flag", as appropriate +.\" +.als pdf:href.opt-A pdf:href.option \" affixed text +.als pdf:href.opt-D pdf:href.option \" destination name +.als pdf:href.opt-E pdf:href.flag \" echo link descriptor +.als pdf:href.opt-F pdf:href.option \" remote file specifier +.als pdf:href.opt-N pdf:href.option \" reference name +.als pdf:href.opt-P pdf:href.option \" prefixed text +.als pdf:href.opt-T pdf:href.option \" bookmark "tag" +.als pdf:href.opt-X pdf:href.flag \" cross reference +.\" +.\" For references to another document file +.\" we also need to support OS dependent file name specifiers +.\" +.als pdf:href.opt-DF pdf:href.option \" /DOSFile specifier +.als pdf:href.opt-MF pdf:href.option \" /MacFile specifier +.als pdf:href.opt-UF pdf:href.option \" /UnixFile specifier +.als pdf:href.opt-WF pdf:href.option \" /WinFile specifier +.\" +.\" Macro "pdf:href.options.clear" ensures that ALL option +.\" argument strings are deleted, after "pdfhref" has completed +.\" all processing which depends on them +.\" +.de pdf:href.options.clear +.\" ----------------------------------------------------------------- +.\" Usage: +.\" .pdf:href.options.clear [option ...] +.\" ----------------------------------------------------------------- +.\" +.\" When an option list is specified ... +.\" +.ie \\n(.$ \{\ +. \" +. \" then loop through the list, +. \" deleting each specified option argument string in turn +. \" +. while \\n(.$ \{\ +. if dpdf:href-\\$1 .rm pdf:href-\\$1 +. shift +. \} +. \} +.\" +.\" ... but when no list is specified, +.\" then recurse, to clear all known option argument strings +.\" +.el .pdf:href.options.clear A D F N P T DF MF UF WF +.. +.\" +.\" "PDFHREF.INFO" establishes the content of the cross reference +.\" data record, which is exported via the "stderr" stream, when a +.\" cross reference anchor is created using a "pdfhref" macro request +.\" of the form +.\" +.\" .pdfhref M -N name -X text ... +.\" +.\" .ds PDFHREF.INFO \\*[PDFHREF.NAME] reference data ... +.\" +.ds PDFHREF.INFO page \\n% \\$* +.\" +.\" Macro "pdf*href-M" is the handler invoked by "pdfhref", when +.\" called with the "M" reference class specifier, to create a +.\" named cross reference mark, and to emit a cross reference +.\" data record, as specified by "PDFHREF.INFO". +.\" +.de pdf*href-M +.\" ----------------------------------------------------------------- +.\" Usage: +.\" .pdfhref M [-X] [-N name | -D name] [-E] descriptive text ... +.\" ----------------------------------------------------------------- +.\" +.\" Initially, declare the -D and -N string options as empty, +.\" so we avoid warning messages when we try to use them, and find +.\" that they are undefined. +.\" +.ds pdf:href-D +.ds pdf:href-N +.\" +.\" Parse, interpret, and strip any specified options from the +.\" argument list. (Note that only options with a declared handler +.\" will be processed; there is no provision for detecting invalid +.\" options -- anything which is not recognised is assumed to start +.\" the "descriptive text" component of the argument list). +.\" +.while dpdf:href.opt\\$1 \{\ +. pdf:href.opt\\$1 \\$@ +. shift \\n[pdf:href.argc] +. \} +.\" +.\" If we found "--", to mark the end of the options, +.\" then we should discard it. +.\" +.if '\\$1'--' .shift +.\" +.\" All PDF reference markers MUST be named. The name may have been +.\" supplied using the "-N Name" option, (or the "-D Name" option); +.\" if not, deduce it from the first "word" in the "descriptive text", +.\" if any, and set the marker -- if we still can't identify the name +.\" for the destination, then this marker will not be created. +.\" +.pdf*href.set \\*[pdf:href-N] \\*[pdf:href-D] \\$1 +.\" +.\" If we specified a cross reference, with the "-X" option, and the +.\" reference mark has been sucessfully created, then we now need to +.\" write the cross reference info to the STDERR stream +.\" +.if \\n[pdf:href-X] .pdf*href.export \\*[PDFHREF.INFO] +.\" +.\" Irrespective of whether this marker is created, or not, +.\" the descriptive text will be copied to the groff output stream, +.\" provided the "-E" option was specified +.\" +.if \\n[pdf:href-E] \&\\$* +.. +.\" +.de pdf*href.set +.\" ---------------------------------------------------------------------- +.\" ---------------------------------------------------------------------- +.pdf*href.map.init +.ie \\n(.$ \{\ +. \" +. \" a marker name has been supplied ... +. \" if we are formatting for immediate output, +. \" emit PDFMARK code to establish the associated view +. \" +. ie '\\n(.z'' \{\ +. pdf:href.sety +. pdfmark /Dest /\\$1 /View [\\*[PDFHREF.VIEW]] /DEST +. ds PDFHREF.NAME \\$1 +. rr PDFPAGE.Y +. \} +. \" +. \" but, when formatting a diversion ... +. \" delay output of the PDFMARK code, until the diversion +. \" is eventually written out +. \" +. el \!.\\$0 \\$@ +. \" +. \" check if we also need to emit cross reference data +. \" (caller will do this if "pdf:href-X" is set, but it is +. \" not necessary, when "pdf:href.map" already exists) +. \" +. if dpdf:href.map .nr pdf:href-X 0 +. \} +.el \{\ +. \" marker is unnamed ... +. \" issue error message; do not emit reference data +. \" +. pdf:warn pdfhref destination marker must be named +. nr pdf:href-X 0 +. \} +.. +.de pdf*href.export +.\" +.\" Called ONLY by "pdf*href-M", +.\" this macro ensures that the emission of exported reference data +.\" is synchronised with the placement of the reference mark, +.\" especially when the mark is defined within a diversion. +.\" +.ie '\\n(.z'' .tm gropdf-info:href \\*[PDFHREF.NAME] \\$* +.el \!.\\$0 \\$@ +.. +.\" +.\" Macro "pdf*href-D" is invoked when "pdfhref" is called +.\" with the "D" reference class specifier; it provides a +.\" standardised mechanism for interpreting reference data +.\" exported by the "M" reference class, and may be used +.\" to directly define external reference data, without the +.\" use of "M" reference class designators in the source +.\" document. +.\" +.de pdf*href-D +.ds pdf:href-N +.\" +.\" Parse, interpret, and strip any specified options from the +.\" argument list. (Note that only options with a declared handler +.\" will be processed; there is no provision for detecting invalid +.\" options -- anything which is not recognised is assumed to start +.\" the "descriptive text" component of the argument list). +.\" +.while dpdf:href.opt\\$1 \{\ +. pdf:href.opt\\$1 \\$@ +. shift \\n[pdf:href.argc] +. \} +.\" +.\" If we found "--", to mark the end of the options, +.\" then we should discard it. +.\" +.if '\\$1'--' .shift +.\" +.ie '\\*[pdf:href-N]'' \{\ +. pdf:warn pdfhref defined reference requires a name +. \} +.el \{\ +. ds pdf:href(\\*[pdf:href-N]).info \\$* +. \} +.. +.\" +.\" Macro "pdf*href-F" is invoked when "pdfhref" is called +.\" with the "F" reference class specifier; it allows the user +.\" to provide an alternative interpreter macro, which will be +.\" called when a "PDFHREF.INFO" record is retrieved to define +.\" the text of a cross reference link "hot spot". +.\" +.de pdf*href-F +.\" ---------------------------------------------------------------- +.\" Usage: +.\" .pdfhref F [macro-name] +.\" ---------------------------------------------------------------- +.\" +.\" Set macro specified by "macro-name" as the format interpreter +.\" for parsing "PDFHREF.INFO" records; if "macro-name" is omitted, +.\" or is specified as the reserved name "default", then use the +.\" default format parser, "pdf*href.format", defined below. +.\" +.if '\\$1'default' .shift \\n(.$ +.ie \\n(.$ .als pdf*href.format \\$1 +.el .als pdf*href.format pdf*href.default +.nr pdf:argc 1 +.. +.\" The default reference formatting macro is defined below. +.\" It parses the "PDFHREF.INFO" record specific to each reference, +.\" recognising the keywords "file", "page" and "section", when they +.\" appear in initial key/value pairs, replacing the key/value pair +.\" with "PDFHREF.FILEREF", "PDFHREF.PAGEREF" or "PDFHREF.SECTREF" +.\" respectively; any additional data in the "PDFHREF.INFO" record +.\" is enclosed in typographic double quotes, and the parsed record +.\" is appended to "PDFHREF.PREFIX", to be returned as the formatted +.\" reference text. +.\" +.\" Default definitions for the reference strings "PDFHREF.PREFIX", +.\" "PDFHREF.FILEREF", "PDFHREF.PAGEREF" and "PDFHREF.SECTREF" are +.\" provided, in the English language. Users may substitute any +.\" desired alternative definitions, for example, when formatting +.\" documents in other languages. In each case, "\\$1" may be used +.\" in the substitution, to represent the "value" component of the +.\" respective key/value pair specified in the "PDFHREF.INFO" record. +.\" +.ds PDFHREF.PREFIX see +.ds PDFHREF.PAGEREF page \\$1, +.ds PDFHREF.SECTREF section \\$1, +.ds PDFHREF.FILEREF \\$1 +.\" +.de pdf*href.format +.\" ----------------------------------------------------------------- +.\" Usage: (to be called ONLY by "pdfhref") +.\" .pdf*href.format cross reference data ... +.\" ----------------------------------------------------------------- +.\" +.\" This macro is responsible for defining the strings "PDFHREF.TEXT" +.\" and "PDFHREF.DESC", which are used by the "pdfhref" macro, as the +.\" basis for generating the text content of a link "hot spot"; (any +.\" user specified alternate formatter MUST do likewise). +.\" +.\" Note that "PDFHREF.TEXT" defines the overall format for the "link +.\" text", while "PDFHREF.DESC" is the descriptive component thereof. +.\" +.\" This default implementation, subject to user customisation of the +.\" "internationalisation" strings defined above, formats "hot spots" +.\" of the style +.\" +.\" see page N, section S, "descriptive text ..." +.\" +.ds PDFHREF.TEXT \\*[PDFHREF.PREFIX] +.while d\\$0.\\$1 \{\ +. \\$0.\\$1 "\\$2" +. shift 2 +. \} +.\" +.\" Retrieve the descriptive text from the cross reference data, +.\" ONLY IF no overriding description has been set by the calling +.\" "pdfhref" macro invocation. +.\" +.if \\n(.$ .if !dPDFHREF.DESC .ds PDFHREF.DESC \\$* +.\" +.\" Augment "PDFHREF.TEXT" so the descriptive text will be included +.\" in the text of the formatted reference +.\" +.if dPDFHREF.DESC .as PDFHREF.TEXT " \(lq\\\\*[PDFHREF.DESC]\(rq +.\" +.\" Finally, suppress any leading spaces, +.\" which may have been included in the PDFHREF.TEXT definition. +.\" +.ds PDFHREF.TEXT \\*[PDFHREF.TEXT] +.. +.de pdf*href.format.file +.\" ---------------------------------------------------------------------- +.\" Include a file identifier in a formatted reference. +.\" This is invoked ONLY by "pdf*href.format", and ONLY IF the +.\" reference data includes an initial file identifier tuple. +.\" ---------------------------------------------------------------------- +.\" +.as PDFHREF.TEXT " \\*[PDFHREF.FILEREF] +.. +.de pdf*href.format.page +.\" ---------------------------------------------------------------------- +.\" Include a page number in a formatted reference. +.\" This is invoked ONLY by "pdf*href.format", and ONLY IF the +.\" reference data includes an initial page number tuple. +.\" ---------------------------------------------------------------------- +.\" +.as PDFHREF.TEXT " \\*[PDFHREF.PAGEREF] +.. +.de pdf*href.format.section +.\" ---------------------------------------------------------------------- +.\" Include a section number in a formatted reference. +.\" This is invoked ONLY by "pdf*href.format", and ONLY IF the +.\" reference data includes an initial section number tuple. +.\" ---------------------------------------------------------------------- +.\" +.as PDFHREF.TEXT " \\*[PDFHREF.SECTREF] +.. +.\" +.\" Make "pdf*href.format" the default cross reference formatter +.\" +.als pdf*href.default pdf*href.format +.\" +.\" +.\" Macro "pdf*href" provides a generic mechanism for placing link +.\" "hot-spots" in a PDF document. ALL "pdfhref" class macros which +.\" create "hot-spots" are aliased to this macro; each must also have +.\" an appropriately aliased definition for "pdf*href.template". +.\" +.de pdf*href +.\" ------------------------------------------------------------------ +.\" Usage: +.\" .pdf*href class [options ...] [link text ...] +.\" ------------------------------------------------------------------ +.\" +.\" First, we initialise an empty string, which will be affixed to +.\" the end of the "link text". (This is needed to cancel the effect +.\" of a "\c" escape, which is placed at the end of the "link text" +.\" to support the "-A" option -- any text supplied by the user, when +.\" the "-A" option is specified, will replace this empty string). +.\" +.ds pdf:href-A +.\" +.\" Now we interpret, and remove any specified options from the +.\" argument list. (Note that only options with a declared handler +.\" will be processed; there is no provision for detecting invalid +.\" options -- anything which is not recognised is assumed to start +.\" the "link text" component of the argument list). +.\" +.while dpdf:href.opt\\$1 \{\ +. pdf:href.opt\\$1 \\$@ +. shift \\n[pdf:href.argc] +. \} +.\" +.\" If we found "--", to mark the end of the options, then we should +.\" discard it. +.\" +.if '\\$1'--' .shift +.\" +.\" All PDF link classes REQUIRE a named destination. This may have +.\" been supplied using the "-D Name" option, but, if not, deduce it +.\" from the first "word" in the "link text", if any -- if we still +.\" can't identify the destination, then set "pdf:href.ok" to zero, +.\" so this link will not be created. +.\" +.if !dpdf:href-D .pdf:href.option -D \\$1 +.if '\\*[pdf:href-D]'' \{\ +. pdf:error pdfhref has no destination +. nr pdf:href.ok 0 +. \} +.\" +.\" Some PDF link classes support a "/File (FilePathName)" argument. +.\" +.if dpdf*href.file \{\ +. \" +. \" When this is supported, it may be specified by supplying +. \" the "-F FileName" option, which is captured in "pdf:href-F". +. \" +. if dpdf:href-F \{\ +. \" +. \" the /File key is present, so set up the link specification +. \" to establish the reference to the specified file +. \" +. als pdf*href.link pdf*href.file +. ds pdf:href.files /File (\\*[pdf:href-F]) +. \" +. \" in addition to the /File key, +. \" there may also be platform dependent alternate file names +. \" +. if dpdf:href-DF .as pdf:href.files " /DOSFile (\\*[pdf:href-DF]) +. if dpdf:href-MF .as pdf:href.files " /MacFile (\\*[pdf:href-MF]) +. if dpdf:href-UF .as pdf:href.files " /UnixFile (\\*[pdf:href-UF]) +. if dpdf:href-WF .as pdf:href.files " /WinFile (\\*[pdf:href-WF]) +. \} +. \" In some cases, the "/File" key is REQUIRED. +. \" We will know it is missing, if "pdf*href.link" is not defined. +. \" +. if !dpdf*href.link \{\ +. \" +. \" When a REQUIRED "/File" key specification is not supplied, +. \" then complain, and set "pdf:href.ok" to abort the creation +. \" of the current reference. +. \" +. pdf:error pdfhref: required -F specification omitted +. nr pdf:href.ok 0 +. \} +. \" Now, we have no further use for "pdf*href.file". +. \" +. rm pdf*href.file +. \} +.\" +.\" Now, initialise a string, defining the PDFMARK code sequence +.\" to create the reference, using the appropriate type indicators. +.\" +.ds pdf:href.link /Subtype /Link \\*[pdf*href.link] +.\" +.\" And now, we have no further use for "pdf*href.link". +.\" +.rm pdf*href.link +.\" +.\" If the user specified any "link prefix" text, (using the "-P text" +.\" option), then emit it BEFORE processing the "link text" itself. +.\" +.if dpdf:href-P \&\\*[pdf:href-P]\c +.ie \\n[pdf:href.ok] \{\ +. \" +. \" This link is VALID (so far as we can determine) ... +. \" Modify the "link text" argument specification, as required, +. \" to include any pre-formatted cross reference information +. \" +. ie \\n(.$ \{\ +. \" +. \" One or more "link text" argument(s) are present, +. \" so, set the link description from the argument(s) ... +. \" +. ds PDFHREF.DESC \\\\$* +. ie \\n[pdf:href-X] \{\ +. \" +. \" ... and, when the "-X" flag is set, +. \" also include formatted location information, +. \" derived from the cross reference record. +. \" +. pdf*href.format \\*[pdf:href(\\*[pdf:href-D]).info] +. \} +. el \{\ +. \" ... but, when the "-X" flag is NOT set, +. \" use only the argument(s) as the entire content +. \" of the "link text" +. \" +. rn PDFHREF.DESC PDFHREF.TEXT +. \} +. \} +. el \{\ +. \" No "link text" arguments are present, +. \" so, format the cross reference record to define +. \" the content of the "link text". +. \" +. pdf*href.format \\*[pdf:href(\\*[pdf:href-D]).info] +. \} +. \" Apply border and colour specifications to the PDFMARK string +. \" definition, as required. +. \" +. if dPDFHREF.BORDER .as pdf:href.link " /Border [\\*[PDFHREF.BORDER]] +. if dPDFHREF.COLOUR .as pdf:href.link " /Color [\\*[PDFHREF.COLOUR]] +. \" +. \" Emit the "link text", in its appropriate colour, marking the +. \" limits of its bounding box(es), as the before and after output +. \" text positions. +. \" +. pdf*href.mark.begin "\\*[pdf:href.link]" +. if dPDFHREF.COLOUR .defcolor pdf:href.colour rgb \\*[PDFHREF.COLOUR] +. nop \&\m[\\*[PDFHREF.TEXT.COLOUR]]\\*[PDFHREF.TEXT]\m[]\c +. pdf*href.mark.end +. \" +. \" Clean up the temporary registers and strings, used to +. \" compute the "hot-spot" bounds, and format the reference, +. \" +. rm PDFHREF.DESC PDFHREF.TEXT +. \} +.\" +.\" But when we identify an INVALID link ... +.\" We simply emit the "link text", with no colour change, no border, +.\" and no associated "hot-spot". +.\" +.el \&\\$*\c +.\" +.\" And then, if the user specified any affixed text, (using the +.\" "-A text" option), we tack it on at the end. +.\" +.nop \&\\*[pdf:href-A] +.. +.de pdf*href.map.init +.\" ---------------------------------------------------------------------- +.\" ---------------------------------------------------------------------- +.\" +.if dpdf:href.map-1 \{\ +. \" +. \" We have a reference map, but we haven't started to parse it yet. +. \" This must be the first map reference in pass 2, so we need to +. \" "kick-start" the parsing process, by loading the first indexed +. \" sub-map into the global map. +. \" +. rn pdf:href.map-1 pdf:href.map +. als pdf:href.map.internal pdf:href.map +. nr pdf:href.map.index 1 1 +. \} +.als pdf*href.map.init pdf*href.mark.idle +.. +.\" +.\" "pdf*href-Z" is used to add link co-ordinate entries to the +.\" "pdf:href.map". Primarily, it is used by the "pdfroff" formatter, +.\" to pass link co-ordinate data from one "groff" formatting pass to +.\" the next, and is not generally useful to the end user. +.\" +.de pdf*href-Z +.\" ---------------------------------------------------------------------- +.\" Usage: +.\" .pdfhref Z page-index x-displacement y-displacement +.\" Where: +.\" page-index is the reference mark's page number +.\" x-displacement is its offset from the left edge of the page +.\" y-displacement is its offset from the top edge of the page +.\" ( both displacement values are expressed in basic groff units, ) +.\" ( and measured perpendicular to their respective page edges. ) +.\" ---------------------------------------------------------------------- +.\" +.ie \\n(.$=3 .ds pdf:href.map-\\n+[pdf*href-Z.index] \\$* +.el .pdf:error pdfhref Z operator expects exactly three arguments +.. +.\" Initialise the auto-incrementing "pdf*href-Z.index" register, +.\" to ensure that sub-map numbering starts at 1. +.\" +.nr pdf*href-Z.index 0 1 +.\" +.de pdf*href.map.read +.\" ---------------------------------------------------------------------- +.\" Usage: (internal use only): +.\" .pdf*href.map.read co-ordinate name list ... +.\" ---------------------------------------------------------------------- +.\" +.\" Reads values from "pdf:href.map" to each named register, in turn +.\" Reading to "null" discards the corresponding value in "pdf:href.map" +.\" +.while \\n(.$ \{\ +. \" +. \" Loop over all registers named in the argument list, +. \" assigning values from "pdf:href.map" to each in turn. +. \" +. pdf:pop nr pdf:\\$1 pdf:href.map.internal +. if !dpdf:href.map.internal \{\ +. \" +. \" We ran out of map references in the current sub-map, +. \" so move on to the next indexed sub-map, if any. +. \" +. if dpdf:href.map-\\n+[pdf:href.map.index] \{\ +. rn pdf:href.map-\\n[pdf:href.map.index] pdf:href.map +. als pdf:href.map.internal pdf:href.map +. \} +. \} +. \" +. \" Proceed to the next named co-ordinate, (if any), specified +. \" in the argument list. +. \" +. shift +. \} +.\" +.\" Discard any assignments to a register named "null" +.\" +.rr pdf:null +.. +.de pdf*href.mark.begin +.\" ---------------------------------------------------------------------- +.\" ---------------------------------------------------------------------- +.pdf*href.map.init +.ie dpdf:href.map \{\ +. \" +. \" Once we have established a document reference map, +. \" then this, and all subsequent calls to "pdf*href.mark.begin", +. \" may be redirected to the reference mark resolver, and the +. \" "pdf*href.mark.end" macro has nothing further to do. +. \" +. pdf*href.mark.resolve \\$@ +. rn pdf*href.mark.resolve pdf*href.mark.begin +. als pdf*href.mark.end pdf*href.mark.idle +. \} +.el \{\ +. \" Since we don't yet have a document reference map, the +. \" reference mark resolver will not work, in this pass of the +. \" formatter; this, and all subsequent calls to "pdf*href.mark.begin", +. \" may be redirected to "pdf*href.mark.end", which is responsible +. \" for emitting the reference mark data to be incorporated into +. \" the reference map in a subsequent formatting pass. +. \" +. pdf*href.mark.end +. als pdf*href.mark.begin pdf*href.mark.end +. \} +.. +.de pdf*href.mark.resolve +.\" ---------------------------------------------------------------------- +.\" ---------------------------------------------------------------------- +.ie '\\n(.z'' \{\ +. ds pdf:href.link \\$1 +. nr pdf:urx \\n(.o+\\n(.l +. pdf*href.map.read spg llx ury epg urx.end lly.end +. ie \\n[pdf:spg]=\\n[pdf:epg] \{\ +. \" +. \" This link is entirely contained on a single page ... +. \" emit the text, which defines the content of the link region, +. \" then make it active. +. \" +. pdf*href.mark.emit 1 \\n[pdf:urx.end] +. if \\n[pdf:lly]<\\n[pdf:lly.end] \{\ +. \" +. \" This link spans multiple output lines; we must save its +. \" original end co-ordinates, then define a new intermediate +. \" end point, to create a PDFMARK "hot-spot" extending from +. \" the start of the link to the end if its first line. +. \" +. nr pdf:ury +1v +. nr pdf:llx \\n(.o+\\n[.in] +. nr pdf:lly \\n[pdf:lly.end]-\\*[PDFHREF.HEIGHT] +. if \\n[pdf:ury]<\\n[pdf:lly] \{\ +. nr pdf:lly +\\*[PDFHREF.HEIGHT]-1v +. pdf*href.mark.emit 2 +. nr pdf:ury \\n[pdf:lly.end]-\\*[PDFHREF.HEIGHT] +. \} +. pdf*href.mark.emit 0 \\n[pdf:urx.end] +. \} +. pdf*href.mark.flush +. \} +. el \{\ +. \" This link is split across a page break, so ... +. \" We must mark the "hot-spot" region on the current page, +. \" BEFORE we emit the link text, as we will have moved off +. \" this page, by the time the text has been output. +. \" +. \" First step: define the region from the start of the link, +. \" to the end of its first line. +. \" +. pdf*href.mark.emit 1 \\n[pdf:urx] +. \" +. \" All additional regions MUST align with the left margin. +. \" +. nr pdf:llx \\n(.o+\\n[.in] +. \" +. \" If the current page can accomodate more than the current line, +. \" then it will include a second active region for this link; this +. \" will extend from just below the current line to the end of page +. \" trap, if any, or the bottom of the page otherwise, and occupy +. \" the full width of the page, between the margins. +. \" +. nr pdf:ury +1v +. pdf*href.mark.emit 3 +. \" +. \" We now need a page transition trap, to map the active link +. \" region(s), which overflow on to the following page(s); (the +. \" handler for this trap MUST have been previously installed). +. \" +. ie dpdf*href.mark.hook \{\ +. \" +. \" The page transition trap handler has been installed, +. \" so we may activate both it, and also the appropriate +. \" termination handler, to deactivate it when done. +. \" +. als pdf*href.mark.hook pdf*href.mark.trap +. \" +. \" Now we set up "pdf:epg" to count the number of page breaks +. \" which this link will span, and emit the link text, leaving +. \" the page trap macro to map active regions on intervening +. \" pages, which are included in the link. +. \" +. nr pdf:epg -\\n[pdf:spg] 1 +. \} +. el \{\ +. \" There was no handler initialised for the page trap, +. \" so we are unable to map the active regions for this link; +. \" we may discard the remaining map data for this link, +. \" and issue a diagnostic. +. \" +. pdf:error pdfhref: link dissociated at page break (trap not initialised) +. if dPDFHREF.BROKEN.COLOR \{\ +. \" +. \" The user may opt to have such broken links highlighted. +. \" We use "PDFHREF.BROKEN.COLOUR" to specify this requirement, +. \" but the user may prefer the American spelling, so we will +. \" handle both as equivalent. +. \" +. als PDFHREF.BROKEN.COLOUR PDFHREF.BROKEN.COLOR +. \} +. if dPDFHREF.BROKEN.COLOUR \{\ +. if dPDFHREF.COLOUR .als PDFHREF.COLOUR PDFHREF.BROKEN.COLOUR +. \} +. \} +. \} +. \} +.el \!.\\$0 \\$@ +.. +.\" +.\" Macro "pdf*href.mark.emit" is called only by "pdf*href". It is +.\" responsible for emitting the PDFMARK code, to establish the +.\" "hot-spot" region associated with a document or resource link. +.\" +.de pdf*href.mark.emit +.\" ---------------------------------------------------------------------- +.\" Usage: +.\" .pdf*href.mark.emit [] +.\" == 0 --> normal operation -- link height = 1 line +.\" == 1 --> start of link -- add leading above text +.\" == 2 --> overtall link -- set intermediate baseline +.\" == 3 --> split link -- break at bottom of page +.\" ---------------------------------------------------------------------- +.\" +.if \\$1=1 \{\ +. \" +. \" Initialising a new link region ... +. \" Some different versions of "groff" disagree about the vertical +. \" displacement of "opminy", as emitted by "\O1|\h'-\w"|"u'\O2\c", +. \" relative to the current text baseline. Therefore, recompute +. \" the link displacement, independently of "opminy". +. \" +. mk pdf:ury.base +. while \\n[pdf:ury.base]<\\n[pdf:ury] .nr pdf:ury.base +1v +. nr pdf:ury.base -1m+\\n[PDFHREF.LEADING] +. \" +. \" adjust the end-point vertical displacement by the same offset, +. \" and then relocate the link starting point to its new displacement, +. \" as established by this base line relative computation. +. \" +. nr pdf:lly.end +\\n[pdf:ury.base]-\\n[pdf:ury]+\\*[PDFHREF.HEIGHT] +. rnn pdf:ury.base pdf:ury +. \} +.if \\$1<2 \{\ +. \" +. \" Link segment fits on a single line ... +. \" Set its height and end-point horizontal displacement accordingly. +. \" +. nr pdf:lly \\n[pdf:ury]+\\*[PDFHREF.HEIGHT] +. if \\n[pdf:lly]>=\\n[pdf:lly.end] .nr pdf:urx \\$2 +. \} +.ie \\$1=3 \{\ +. \" +. \" Link segment extends beyond the next page break ... +. \" Recompute truncated height, to just fit portion on current page, +. \" recursing to emit it, and leaving page trap mechanism to place +. \" continuation region(s) on following page(s). +. \" +. nr pdf:lly (\\n[.t]u-\\n[.V]u)/1v +. if \\n[pdf:lly]>0 \{\ +. nr pdf:lly \\n[pdf:ury]+\\n[pdf:lly]v-1v+\\*[PDFHREF.HEIGHT] +. pdf*href.mark.emit 2 +. \} +. \} +.el \{\ +. \" Link region size and placement has been fully specified ... +. \" Emit it. +. \" +. pdfmark \\*[pdf:href.link] /Rect [\\*[pdf:bbox]] /ANN +. \} +.. +.\" +.\" When "pdf*href" emits a link for which the "hot-spot" spans a +.\" page break, then we need to provide a "hook" in to the page break +.\" trap, so we can map the "hot-spot" regions which are to be placed +.\" on either side of the page break. +.\" +.\" Macro "pdf*href.mark.idle" is a dummy macro, which provide this +.\" "hook" for normal page breaks, where there is no link "hot-spot" +.\" crossing the break. +.\" +.de pdf*href.mark.idle +.\" ---------------------------------------------------------------------- +.\" Usage: +.\" Called only as an internal hook, by a page trap macro. +.\" Expects no arguments, and does nothing. +.\" ---------------------------------------------------------------------- +.. +.\" +.\" Macro "pdf*href.mark.trap" is the active "hook", which is substituted +.\" for "pdf*href,mark.idle" at those page breaks which are crossed by +.\" a link "hot-spot". +.\" +.de pdf*href.mark.trap +.\" ---------------------------------------------------------------------- +.\" Usage: +.\" Called only as an internal hook, by a page trap macro. +.\" Expects no arguments. Maps residual link "hot-spot" regions, +.\" which spill beyond any page break. Not to be invoked directly +.\" by the user, nor by any user supplied macro. +.\" ---------------------------------------------------------------------- +.\" +.mk pdf:ury +.nr pdf:ury +1v-1m-\\n[PDFHREF.LEADING] +.ie \\n-[pdf:epg] \{\ +. \" +. \" The link "hot-spot" extends across more than one page break, +. \" so, for each page which is completely contained within the +. \" extent of the link, simply mark the entire text area on the +. \" page as a "hot-spot". +. \" +. pdf*href.mark.emit 3 +. \} +.el \{\ +. \" The link "hot-spot" ends on the page which immediately follows +. \" the current page transition, so we may now finalise this link. +. \" +. nr pdf:lly \\n[pdf:ury]+\\*[PDFHREF.HEIGHT] +. if \\n[pdf:lly.end]>\\n[pdf:lly] \{\ +. \" +. \" The "hot-spot" extends beyond the first line of text, +. \" on its final page; compute and emit "hot-spot" region to cover +. \" the full with of the text area, including all but the last +. \" line of the link text. +. \" +. while \\n[pdf:lly.end]>\\n[pdf:lly] .nr pdf:lly +1v +. nr pdf:lly -1v +. pdf*href.mark.emit 2 +. \" +. \" Now, adjust the vertical "hot-spot" mapping reference, +. \" to identify the correct position for the the last line of +. \" text, over which the "hot-spot" extends. +. \" +. nr pdf:ury \\n[pdf:lly.end]-\\*[PDFHREF.HEIGHT] +. \} +. \" +. \" We now have exactly one final line of text, over which we must +. \" emit a "hot-spot" region; map it, terminate page trap processing +. \" for this "hot-spot", and clean up the "hot-spot" mapping context. +. \" +. pdf*href.mark.emit 0 \\n[pdf:urx.end] +. als pdf*href.mark.hook pdf*href.mark.idle +. pdf*href.mark.flush +. \} +.. +.de pdf*href.mark.flush +.\" ---------------------------------------------------------------------- +.\" ---------------------------------------------------------------------- +.rr pdf:spg pdf:epg +.rr pdf:llx pdf:lly pdf:urx pdf:ury +.if dPDFHREF.COLOR .als PDFHREF.COLOUR PDFHREF.COLOR +.rr pdf:urx.end pdf:lly.end +.. +.de pdf*href.mark.end +.\" ---------------------------------------------------------------------- +.\" ---------------------------------------------------------------------- +\O1|\h'-\w"|"u'\O2\c +.. +.\" Macro "pdf*href-I" is used for one time initialisation of special +.\" "pdfhref" features; (currently, only the above page trap hook is +.\" supported, but it is implemented with one level of indirection, to +.\" accommodate possible future expansion). +. +.de pdf*href-I +.\" ---------------------------------------------------------------------- +.\" Usage: +.\" .pdfhref I -
} element. +Sets a paragraph that is indented at both left and right margins. The +effect is identical to the @acronym{HTML} @code{
} element. The next paragraph or heading returns margins to normal. @endDefmac @Defmac {XP, , ms} -Sets a paragraph whose lines are indented, -except for the first line. +Sets a paragraph whose lines are indented, except for the first line. This is a Berkeley extension. @endDefmac @@ -3122,6 +3321,10 @@ free software. @end cartouche @endExample +The @code{PORPHANS} register (@pxref{ms Document Control Registers}) +operates in conjunction with each of these macros, to inhibit the +printing of orphan lines at the bottom of any page. + @c --------------------------------------------------------------------- @node Headings in ms, Highlighting in ms, Paragraphs in ms, ms Body Text @@ -3129,45 +3332,81 @@ free software. @cindex @code{ms} macros, headings Use headings to create a hierarchical structure for your document. -The @file{ms} macros print headings in @strong{bold}, -using the same font family and point size as the body text. +The @file{ms} macros print headings in @strong{bold}, using the same +font family and point size as the body text. The following describes the heading macros: @DefmacList {NH, @Var{curr-level}, ms} @DefmacListEnd {NH, @t{S} @Var{level0} @dots{}, ms} -Numbered heading. -The argument is either a numeric argument to indicate the -level of the heading, or the letter@tie{}@code{S} followed by numeric -arguments to set the heading level explicitly. +Numbered heading. The argument is either a numeric argument to +indicate the level of the heading, or the letter@tie{}@code{S} +followed by numeric arguments to set the heading level explicitly. If you specify heading levels out of sequence, such as invoking -@samp{.NH 3} after @samp{.NH 1}, @code{groff} -prints a warning on standard error. +@samp{.NH 3} after @samp{.NH 1}, @code{groff} prints a warning on +standard error. @endDefmac -@Defmac {SH, , ms} +@DefstrList {SN, ms} +@DefstrItem {SN-DOT, ms} +@DefstrListEnd {SN-NO-DOT, ms} +After invocation of @code{NH}, the assigned section number is made +available in the strings @code{SN-DOT} (exactly as it appears in the +printed section heading) and @code{SN-NO-DOT} (with the final period +omitted). The string @code{SN} is also defined, as an alias for +@code{SN-DOT}; if preferred, you may redefine it as an alias for +@code{SN-NO-DOT}, by including the initialization + +@Example +.ds SN-NO-DOT +.als SN SN-NO-DOT +@endExample + +@noindent +@strong{before} your first use of @code{NH}, or simply + +@Example +.als SN SN-NO-DOT +@endExample + +@noindent +@strong{after} your first use of @code{NH}. +@endDefstr + +@Defmac {SH, [@Var{match-level}], ms} Unnumbered subheading. + +The optional @var{match-level} argument is a GNU extension. It is a +number indicating the level of the heading, in a manner analogous to +the @var{curr-level} argument to @code{.NH}. Its purpose is to match +the point size, at which the heading is printed, to the size of a +numbered heading at the same level, when the @code{GROWPS} and +@code{PSINCR} heading size adjustment mechanism is in effect. +@xref{ms Document Control Registers}. @endDefmac +The @code{HORPHANS} register (@pxref{ms Document Control Registers}) +operates in conjunction with the @code{NH} and @code{SH} macros, to +inhibit the printing of orphaned section headings at the bottom of any +page. + @c --------------------------------------------------------------------- @node Highlighting in ms, Lists in ms, Headings in ms, ms Body Text @subsubsection Highlighting @cindex @code{ms} macros, highlighting -The @file{ms} macros provide a variety of methods to highlight -or emphasize text: +The @file{ms} macros provide a variety of methods to highlight or +emphasize text: @Defmac {B, [@Var{txt} [@Var{post} [@Var{pre}]]], ms} -Sets its first argument in @strong{bold type}. -If you specify a second argument, @code{groff} prints it in the -previous font after the bold text, with no intervening space -(this allows you to set punctuation after the highlighted text -without highlighting the punctuation). -Similarly, it prints the third argument (if any) in the previous -font @strong{before} the first argument. -For example, +Sets its first argument in @strong{bold type}. If you specify a +second argument, @code{groff} prints it in the previous font after the +bold text, with no intervening space (this allows you to set +punctuation after the highlighted text without highlighting the +punctuation). Similarly, it prints the third argument (if any) in the +previous font @strong{before} the first argument. For example, @Example .B foo ) ( @@ -3175,83 +3414,89 @@ For example, prints (@strong{foo}). -If you give this macro no arguments, @code{groff} -prints all text following in bold until -the next highlighting, paragraph, or heading macro. +If you give this macro no arguments, @code{groff} prints all text +following in bold until the next highlighting, paragraph, or heading +macro. @endDefmac @Defmac {R, [@Var{txt} [@Var{post} [@Var{pre}]]], ms} -Sets its first argument in roman (or regular) type. -It operates similarly to the @code{B}@tie{}macro otherwise. +Sets its first argument in roman (or regular) type. It operates +similarly to the @code{B}@tie{}macro otherwise. @endDefmac @Defmac {I, [@Var{txt} [@Var{post} [@Var{pre}]]], ms} -Sets its first argument in @emph{italic type}. -It operates similarly to the @code{B}@tie{}macro otherwise. +Sets its first argument in @emph{italic type}. It operates similarly +to the @code{B}@tie{}macro otherwise. @endDefmac @Defmac {CW, [@Var{txt} [@Var{post} [@Var{pre}]]], ms} -Sets its first argument in a @code{constant width face}. -It operates similarly to the @code{B}@tie{}macro otherwise. +Sets its first argument in a @code{constant width face}. It operates +similarly to the @code{B}@tie{}macro otherwise. @endDefmac @Defmac {BI, [@Var{txt} [@Var{post} [@Var{pre}]]], ms} -Sets its first argument in bold italic type. -It operates similarly to the @code{B}@tie{}macro otherwise. +Sets its first argument in bold italic type. It operates similarly to +the @code{B}@tie{}macro otherwise. @endDefmac @Defmac {BX, [@Var{txt}], ms} -Prints its argument and draws a box around it. -If you want to box a string that contains spaces, -use a digit-width space (@code{\0}). +Prints its argument and draws a box around it. If you want to box a +string that contains spaces, use a digit-width space (@code{\0}). @endDefmac @Defmac {UL, [@Var{txt} [@Var{post}]], ms} -Prints its first argument with an underline. -If you specify a second argument, @code{groff} -prints it in the previous font after -the underlined text, with no intervening space. +Prints its first argument with an underline. If you specify a second +argument, @code{groff} prints it in the previous font after the +underlined text, with no intervening space. @endDefmac @Defmac {LG, , ms} -Prints all text following in larger type -(two points larger than the current point size) until -the next font size, highlighting, paragraph, or heading macro. -You can specify this macro multiple times -to enlarge the point size as needed. +Prints all text following in larger type (two points larger than the +current point size) until the next font size, highlighting, paragraph, +or heading macro. You can specify this macro multiple times to +enlarge the point size as needed. @endDefmac @Defmac {SM, , ms} -Prints all text following in smaller type -(two points smaller than the current point size) until -the next type size, highlighting, paragraph, or heading macro. -You can specify this macro multiple times -to reduce the point size as needed. +Prints all text following in smaller type (two points smaller than the +current point size) until the next type size, highlighting, paragraph, +or heading macro. You can specify this macro multiple times to reduce +the point size as needed. @endDefmac @Defmac {NL, , ms} -Prints all text following in the normal point size -(that is, the value of the @code{PS} register). +Prints all text following in the normal point size (that is, the value +of the @code{PS} register). @endDefmac +@DefstrList {@Lbrace{}, ms} +@DefstrListEnd {@Rbrace{}, ms} +Text enclosed with @code{\*@{} and @code{\*@}} is printed as a +superscript. +@endDefstr + @c --------------------------------------------------------------------- -@node Lists in ms, Indents in ms, Highlighting in ms, ms Body Text +@node Lists in ms, Indentation values in ms, Highlighting in ms, ms Body Text @subsubsection Lists @cindex @code{ms} macros, lists -The @code{.IP} macro handles duties for all lists. +The @code{IP} macro handles duties for all lists. @Defmac {IP, [@Var{marker} [@Var{width}]], ms} -The @var{marker} is usually a bullet glyph (@code{\[bu]}) -for unordered lists, a number (or auto-incrementing number -register) for numbered lists, or a word or phrase for indented -(glossary-style) lists. - -The @var{width} specifies the indent for the body of each list item; -its default unit is @samp{n}. -Once specified, the indent remains the same for all -list items in the document until specified again. +The @var{marker} is usually a bullet glyph (@code{\[bu]}) for +unordered lists, a number (or auto-incrementing number register) for +numbered lists, or a word or phrase for indented (glossary-style) +lists. + +The @var{width} specifies the indentation for the body of each list +item; its default unit is @samp{n}. Once specified, the indentation +remains the same for all list items in the document until specified +again. + +The @code{PORPHANS} register (@pxref{ms Document Control Registers}) +operates in conjunction with the @code{IP} macro, to inhibit the +printing of orphaned list markers at the bottom of any page. @endDefmac The following is an example of a bulleted list. @@ -3280,8 +3525,6 @@ o guns o money @endExample -@sp 1 - The following is an example of a numbered list. @cindex example markup, numbered list [@code{ms}] @cindex numbered list, example markup [@code{ms}] @@ -3309,10 +3552,8 @@ A numbered list: 3. money @endExample -Note the use of the auto-incrementing number -register in this example. +Note the use of the auto-incrementing number register in this example. -@sp 1 The following is an example of a glossary-style list. @cindex example markup, glossary-style list [@code{ms}] @cindex glossary-style list, example markup [@code{ms}] @@ -3343,16 +3584,15 @@ money Gotta pay for those lawyers and guns! @endExample -In the last example, the @code{IP} macro places the definition -on the same line as the term if it has enough space; otherwise, -it breaks to the next line and starts the definition below the -term. -This may or may not be the effect you want, especially if some -of the definitions break and some do not. -The following examples show two possible ways to force a break. +In the last example, the @code{IP} macro places the definition on the +same line as the term if it has enough space; otherwise, it breaks to +the next line and starts the definition below the term. This may or +may not be the effect you want, especially if some of the definitions +break and some do not. The following examples show two possible ways +to force a break. -The first workaround uses the @code{br} -request to force a break after printing the term or label. +The first workaround uses the @code{br} request to force a break after +printing the term or label. @Example @cartouche @@ -3367,12 +3607,10 @@ Gotta pay for those lawyers and guns! @end cartouche @endExample -@sp 1 The second workaround uses the @code{\p} escape to force the break. -Note the space following the escape; this is important. -If you omit the space, @code{groff} prints the first word on -the same line as the term or label (if it fits) @strong{then} -breaks the line. +Note the space following the escape; this is important. If you omit +the space, @code{groff} prints the first word on the same line as the +term or label (if it fits) @strong{then} breaks the line. @Example @cartouche @@ -3386,9 +3624,8 @@ Gotta pay for those lawyers and guns! @end cartouche @endExample -@sp 1 To set nested lists, use the @code{RS} and @code{RE} macros. -@xref{Indents in ms}, for more information. +@xref{Indentation values in ms}, for more information. @cindex @code{ms} macros, nested lists @cindex nested lists [@code{ms}] @@ -3427,39 +3664,35 @@ o Guns @c --------------------------------------------------------------------- -@node Indents in ms, Tabstops in ms, Lists in ms, ms Body Text -@subsubsection Indents +@node Indentation values in ms, Tabstops in ms, Lists in ms, ms Body Text +@subsubsection Indentation values -In many situations, -you may need to indent a section of text -while still wrapping and filling. -@xref{Lists in ms}, -for an example of nested lists. +In many situations, you may need to indentation a section of text +while still wrapping and filling. @xref{Lists in ms}, for an example +of nested lists. @DefmacList {RS, , ms} @DefmacListEnd {RE, , ms} -These macros begin and end an indented section. -The @code{PI} register controls the amount of indent, -allowing the indented text to line up under hanging -and indented paragraphs. +These macros begin and end an indented section. The @code{PI} +register controls the amount of indentation, allowing the indented +text to line up under hanging and indented paragraphs. @endDefmac -@xref{ms Displays and Keeps}, -for macros to indent and turn off filling. +@xref{ms Displays and Keeps}, for macros to indentation and turn off +filling. @c --------------------------------------------------------------------- -@node Tabstops in ms, ms Displays and Keeps, Indents in ms, ms Body Text +@node Tabstops in ms, ms Displays and Keeps, Indentation values in ms, ms Body Text @subsubsection Tab Stops -Use the @code{ta} request to define tab stops as needed. -@xref{Tabs and Fields}. +Use the @code{ta} request to define tab stops as needed. @xref{Tabs +and Fields}. @Defmac{TA, , ms} Use this macro to reset the tab stops to the default for @file{ms} -(every 5n). -You can redefine the @code{TA} macro to create a different set -of default tab stops. +(every 5n). You can redefine the @code{TA} macro to create a +different set of default tab stops. @endDefmac @c --------------------------------------------------------------------- @@ -3471,112 +3704,107 @@ of default tab stops. @cindex keeps [@code{ms}] @cindex displays [@code{ms}] -Use displays to show text-based examples or figures -(such as code listings). +Use displays to show text-based examples or figures (such as code +listings). -Displays turn off filling, so lines of code are displayed -as-is without inserting @code{br} requests in between each line. -Displays can be @dfn{kept} on a single page, or allowed -to break across pages. +Displays turn off filling, so lines of code are displayed as-is +without inserting @code{br} requests in between each line. Displays +can be @dfn{kept} on a single page, or allowed to break across pages. @DefmacList {DS, @t{L}, ms} @DefmacItem {LD, , ms} @DefmacListEnd {DE, , ms} -Left-justified display. -The @samp{.DS L} call generates a page break, if necessary, -to keep the entire display on one page. -The @code{LD} macro allows the display to break across pages. -The @code{DE} macro ends the display. +Left-justified display. The @samp{.DS L} call generates a page break, +if necessary, to keep the entire display on one page. The @code{LD} +macro allows the display to break across pages. The @code{DE} macro +ends the display. @endDefmac @DefmacList {DS, @t{I}, ms} @DefmacItem {ID, , ms} @DefmacListEnd {DE, , ms} -Indents the display as defined by the @code{DI} register. -The @samp{.DS I} call generates a page break, if necessary, -to keep the entire display on one page. -The @code{ID} macro allows the display to break across pages. -The @code{DE} macro ends the display. +Indents the display as defined by the @code{DI} register. The +@samp{.DS I} call generates a page break, if necessary, to keep the +entire display on one page. The @code{ID} macro allows the display to +break across pages. The @code{DE} macro ends the display. @endDefmac @DefmacList {DS, @t{B}, ms} @DefmacItem {BD, , ms} @DefmacListEnd {DE, , ms} Sets a block-centered display: the entire display is left-justified, -but indented so that the longest line in the display is centered -on the page. -The @samp{.DS B} call generates a page break, if necessary, -to keep the entire display on one page. -The @code{BD} macro allows the display to break across pages. -The @code{DE} macro ends the display. +but indented so that the longest line in the display is centered on +the page. The @samp{.DS B} call generates a page break, if necessary, +to keep the entire display on one page. The @code{BD} macro allows +the display to break across pages. The @code{DE} macro ends the +display. @endDefmac @DefmacList {DS, @t{C}, ms} @DefmacItem {CD, , ms} @DefmacListEnd {DE, , ms} -Sets a centered display: each line in the display is centered. -The @samp{.DS C} call generates a page break, if necessary, -to keep the entire display on one page. -The @code{CD} macro allows the display to break across pages. -The @code{DE} macro ends the display. +Sets a centered display: each line in the display is centered. The +@samp{.DS C} call generates a page break, if necessary, to keep the +entire display on one page. The @code{CD} macro allows the display to +break across pages. The @code{DE} macro ends the display. @endDefmac @DefmacList {DS, @t{R}, ms} @DefmacItem {RD, , ms} @DefmacListEnd {DE, , ms} -Right-justifies each line in the display. -The @samp{.DS R} call generates a page break, if necessary, -to keep the entire display on one page. -The @code{RD} macro allows the display to break across pages. -The @code{DE} macro ends the display. +Right-justifies each line in the display. The @samp{.DS R} call +generates a page break, if necessary, to keep the entire display on +one page. The @code{RD} macro allows the display to break across +pages. The @code{DE} macro ends the display. @endDefmac @DefmacList {Ds, , ms} @DefmacListEnd {De, , ms} -These two macros are aliases for @code{DS} and @code{DE}, respectively. +These two macros were formerly provided as aliases for @code{DS} and +@code{DE}, respectively. They have been removed, and should no longer +be used. The original implementations of @code{DS} and @code{DE} are +retained, and should be used instead. X11 documents which actually +use @code{Ds} and @code{De} always load a specific macro file from the +X11 distribution (@file{macros.t}) which provides proper definitions +for the two macros. @endDefmac -@sp 1 On occasion, you may want to @dfn{keep} other text together on a page. -For example, you may want to keep two paragraphs together, or -a paragraph that refers to a table (or list, or other item) -immediately following. -The @file{ms} macros provide the @code{KS} and @code{KE} +For example, you may want to keep two paragraphs together, or a +paragraph that refers to a table (or list, or other item) immediately +following. The @file{ms} macros provide the @code{KS} and @code{KE} macros for this purpose. @DefmacList {KS, , ms} @DefmacListEnd {KE, , ms} -The @code{KS} macro begins a block of text to be kept on a -single page, and the @code{KE} macro ends the block. +The @code{KS} macro begins a block of text to be kept on a single +page, and the @code{KE} macro ends the block. @endDefmac @DefmacList {KF, , ms} @DefmacListEnd {KE, , ms} -Specifies a @dfn{floating keep}; -if the keep cannot fit on the current page, @code{groff} -holds the contents of the keep and allows text following -the keep (in the source file) to fill in the remainder of -the current page. -When the page breaks, whether by an explicit @code{bp} -request or by reaching the end of the page, @code{groff} -prints the floating keep at the top of the new page. -This is useful for printing large graphics or tables -that do not need to appear exactly where specified. +Specifies a @dfn{floating keep}; if the keep cannot fit on the current +page, @code{groff} holds the contents of the keep and allows text +following the keep (in the source file) to fill in the remainder of +the current page. When the page breaks, whether by an explicit +@code{bp} request or by reaching the end of the page, @code{groff} +prints the floating keep at the top of the new page. This is useful +for printing large graphics or tables that do not need to appear +exactly where specified. @endDefmac -You can also use the @code{ne} request to force a page break if -there is not enough vertical space remaining on the page. +You can also use the @code{ne} request to force a page break if there +is not enough vertical space remaining on the page. -@sp 1 -Use the following macros to draw a box around a section of -text (such as a display). +Use the following macros to draw a box around a section of text (such +as a display). @DefmacList {B1, , ms} @DefmacListEnd {B2, , ms} -Marks the beginning and ending of text that is to have a -box drawn around it. -The @code{B1} macro begins the box; the @code{B2} macro ends it. -Text in the box is automatically placed in a diversion (keep). +Marks the beginning and ending of text that is to have a box drawn +around it. The @code{B1} macro begins the box; the @code{B2} macro +ends it. Text in the box is automatically placed in a diversion +(keep). @endDefmac @c --------------------------------------------------------------------- @@ -3592,8 +3820,7 @@ Text in the box is automatically placed in a diversion (keep). @cindex equations [@code{ms}] @cindex references [@code{ms}] -The @file{ms} macros support the standard -@code{groff} preprocessors: +The @file{ms} macros support the standard @code{groff} preprocessors: @code{tbl}, @code{pic}, @code{eqn}, and @code{refer}. @pindex tbl @pindex pic @@ -3604,21 +3831,20 @@ in pairs of tags as follows. @DefmacList {TS, [@code{H}], ms} @DefmacListEnd {TE, , ms} -Denotes a table, to be processed by the @code{tbl} preprocessor. -The optional argument@tie{}@code{H} to @code{TS} instructs @code{groff} -to create a running header with the information -up to the @code{TH} macro. -@code{groff} prints the header at the beginning of the -table; if the table runs onto another page, @code{groff} -prints the header on the next page as well. +Denotes a table, to be processed by the @code{tbl} preprocessor. The +optional argument@tie{}@code{H} to @code{TS} instructs @code{groff} to +create a running header with the information up to the @code{TH} +macro. @code{groff} prints the header at the beginning of the table; +if the table runs onto another page, @code{groff} prints the header on +the next page as well. @endDefmac @DefmacList {PS, , ms} @DefmacListEnd {PE, , ms} Denotes a graphic, to be processed by the @code{pic} preprocessor. You can create a @code{pic} file by hand, using the @acronym{AT&T} -@code{pic} manual available on the Web as a reference, or by using -a graphics program such as @code{xfig}. +@code{pic} manual available on the Web as a reference, or by using a +graphics program such as @code{xfig}. @endDefmac @DefmacList {EQ, [@Var{align}], ms} @@ -3648,8 +3874,8 @@ database. @cindex example markup, multi-page table [@code{ms}] @cindex multi-page table, example markup [@code{ms}] -The following is an example of how to set up a -table that may print across two or more pages. +The following is an example of how to set up a table that may print +across two or more pages. @Example @cartouche @@ -3674,9 +3900,9 @@ l | l . @cindex @code{ms} macros, footnotes @cindex footnotes [@code{ms}] -The @file{ms} macro package has a flexible footnote system. -You can specify either numbered footnotes or symbolic footnotes -(that is, using a marker such as a dagger symbol). +The @file{ms} macro package has a flexible footnote system. You can +specify either numbered footnotes or symbolic footnotes (that is, +using a marker such as a dagger symbol). @Defstr {*, ms} Specifies the location of a numbered footnote marker in the text. @@ -3684,19 +3910,27 @@ Specifies the location of a numbered footnote marker in the text. @DefmacList {FS, , ms} @DefmacListEnd {FE, , ms} -Specifies the text of the footnote. -The default action is to create a numbered footnote; -you can create a symbolic footnote by specifying -a @dfn{mark} glyph -(such as @code{\[dg]} for the dagger glyph) -in the body text and as an argument to the @code{FS} macro, -followed by the text of the footnote -and the @code{FE} macro. +Specifies the text of the footnote. The default action is to create a +numbered footnote; you can create a symbolic footnote by specifying a +@dfn{mark} glyph (such as @code{\[dg]} for the dagger glyph) in the +body text and as an argument to the @code{FS} macro, followed by the +text of the footnote and the @code{FE} macro. @endDefmac -You can control how @code{groff} -prints footnote numbers by changing the value of the -@code{FF} register. @xref{ms Document Control Registers}. +You can control how @code{groff} prints footnote numbers by changing +the value of the @code{FF} register. @xref{ms Document Control +Registers}. + +@cindex footnotes, and keeps [@code{ms}] +@cindex keeps, and footnotes [@code{ms}] +@cindex footnotes, and displays [@code{ms}] +@cindex displays, and footnotes [@code{ms}] +Footnotes can be safely used within keeps and displays, but you should +avoid using numbered footnotes within floating keeps. You can set a +second @code{\**} marker between a @code{\**} and its corresponding +@code{.FS} entry; as long as each @code{FS} macro occurs @emph{after} +the corresponding @code{\**} and the occurrences of @code{.FS} are in +the same order as the corresponding occurrences of @code{\**}. @c --------------------------------------------------------------------- @@ -3705,14 +3939,12 @@ prints footnote numbers by changing the value of the @cindex @code{ms} macros, page layout @cindex page layout [@code{ms}] -The default output from the @file{ms} -macros provides a minimalist page layout: -it prints a single column, with the page number centered at the top -of each page. -It prints no footers. +The default output from the @file{ms} macros provides a minimalist +page layout: it prints a single column, with the page number centered +at the top of each page. It prints no footers. -You can change the layout by setting -the proper number registers and strings. +You can change the layout by setting the proper number registers and +strings. @menu * ms Headers and Footers:: @@ -3731,8 +3963,8 @@ the proper number registers and strings. @cindex headers [@code{ms}] @cindex footers [@code{ms}] -For documents that do not distinguish between odd and even pages, -set the following strings: +For documents that do not distinguish between odd and even pages, set +the following strings: @DefstrList {LH, ms} @DefstrItem {CH, ms} @@ -3746,17 +3978,17 @@ Sets the left, center, and right headers. Sets the left, center, and right footers. @endDefstr -@sp 1 -For documents that need different information printed in the -even and odd pages, use the following macros: +For documents that need different information printed in the even and +odd pages, use the following macros: @DefmacList {OH, @t{'}@Var{left}@t{'}@Var{center}@t{'}@Var{right}@t{'}, ms} @DefmacItem {EH, @t{'}@Var{left}@t{'}@Var{center}@t{'}@Var{right}@t{'}, ms} @DefmacItem {OF, @t{'}@Var{left}@t{'}@Var{center}@t{'}@Var{right}@t{'}, ms} @DefmacListEnd {EF, @t{'}@Var{left}@t{'}@Var{center}@t{'}@Var{right}@t{'}, ms} -The @code{OH} and @code{EH} macros define headers for the odd and even pages; -the @code{OF} and @code{EF} macros define footers for the odd and even pages. -This is more flexible than defining the individual strings. +The @code{OH} and @code{EH} macros define headers for the odd and even +pages; the @code{OF} and @code{EF} macros define footers for the odd +and even pages. This is more flexible than defining the individual +strings. You can replace the quote (@code{'}) marks with any character not appearing in the header or footer text. @@ -3768,8 +4000,8 @@ appearing in the header or footer text. @subsubsection Margins @cindex @code{ms} macros, margins -You control margins using a set of number registers. -@xref{ms Document Control Registers}, for details. +You control margins using a set of number registers. @xref{ms +Document Control Registers}, for details. @c --------------------------------------------------------------------- @@ -3779,11 +4011,10 @@ You control margins using a set of number registers. @cindex multiple columns [@code{ms}] The @file{ms} macros can set text in as many columns as will -reasonably fit on the page. -The following macros are available; -all of them force a page break if a multi-column mode is already set. +reasonably fit on the page. The following macros are available; all +of them force a page break if a multi-column mode is already set. However, if the current mode is single-column, starting a multi-column -mode does @strong{not} force a page break. +mode does @emph{not} force a page break. @Defmac {1C, , ms} Single-column mode. @@ -3794,12 +4025,10 @@ Two-column mode. @endDefmac @Defmac {MC, [@Var{width} [@Var{gutter}]], ms} -Multi-column mode. -If you specify no arguments, it is equivalent to the -@code{2C} macro. -Otherwise, @var{width} is the width of each column and -@var{gutter} is the space between columns. -The @code{MINGW} number register controls the default gutter width. +Multi-column mode. If you specify no arguments, it is equivalent to +the @code{2C} macro. Otherwise, @var{width} is the width of each +column and @var{gutter} is the space between columns. The +@code{MINGW} number register controls the default gutter width. @endDefmac @c --------------------------------------------------------------------- @@ -3809,22 +4038,19 @@ The @code{MINGW} number register controls the default gutter width. @cindex @code{ms} macros, creating table of contents @cindex table of contents, creating [@code{ms}] -The facilities in the @file{ms} macro package for creating -a table of contents are semi-automated at best. -Assuming that you want the table of contents to consist of -the document's headings, you need to repeat those headings -wrapped in @code{XS} and @code{XE} macros. +The facilities in the @file{ms} macro package for creating a table of +contents are semi-automated at best. Assuming that you want the table +of contents to consist of the document's headings, you need to repeat +those headings wrapped in @code{XS} and @code{XE} macros. @DefmacList {XS, [@Var{page}], ms} @DefmacItem {XA, [@Var{page}], ms} @DefmacListEnd {XE, , ms} -These macros define a table of contents -or an individual entry in the table of contents, -depending on their use. -The macros are very simple; they cannot indent a heading based on its level. -The easiest way to work around this is to add tabs -to the table of contents string. -The following is an example: +These macros define a table of contents or an individual entry in the +table of contents, depending on their use. The macros are very +simple; they cannot indent a heading based on its level. The easiest +way to work around this is to add tabs to the table of contents +string. The following is an example: @Example @cartouche @@ -3846,12 +4072,11 @@ Methodology @end cartouche @endExample -You can manually create a table of contents -by beginning with the @code{XS} macro for the first entry, -specifying the page number for that entry as the argument to @code{XS}. -Add subsequent entries using the @code{XA} macro, -specifying the page number for that entry as the argument to @code{XA}. -The following is an example: +You can manually create a table of contents by beginning with the +@code{XS} macro for the first entry, specifying the page number for +that entry as the argument to @code{XS}. Add subsequent entries using +the @code{XA} macro, specifying the page number for that entry as the +argument to @code{XA}. The following is an example: @Example @cartouche @@ -3868,34 +4093,32 @@ Details of Galactic Formation @endDefmac @Defmac {TC, [@code{no}], ms} -Prints the table of contents on a new page, -setting the page number to@tie{}@strong{i} (Roman numeral one). -You should usually place this macro at the end of the -file, since @code{groff} is a single-pass formatter and -can only print what has been collected up to the point -that the @code{TC} macro appears. - -The optional argument @code{no} suppresses printing -the title specified by the string register @code{TOC}. +Prints the table of contents on a new page, setting the page number +to@tie{}@strong{i} (Roman lowercase numeral one). You should usually +place this macro at the end of the file, since @code{groff} is a +single-pass formatter and can only print what has been collected up to +the point that the @code{TC} macro appears. + +The optional argument @code{no} suppresses printing the title +specified by the string register @code{TOC}. @endDefmac @Defmac{PX, [@code{no}], ms} -Prints the table of contents on a new page, -using the current page numbering sequence. -Use this macro to print a manually-generated table of contents -at the beginning of your document. +Prints the table of contents on a new page, using the current page +numbering sequence. Use this macro to print a manually-generated +table of contents at the beginning of your document. -The optional argument @code{no} suppresses printing -the title specified by the string register @code{TOC}. +The optional argument @code{no} suppresses printing the title +specified by the string register @code{TOC}. @endDefmac -The @cite{Groff and Friends HOWTO} -includes a @code{sed} script that automatically inserts -@code{XS} and @code{XE} macro entries after each heading in a document. +The @cite{Groff and Friends HOWTO} includes a @code{sed} script that +automatically inserts @code{XS} and @code{XE} macro entries after each +heading in a document. -Altering the @code{NH} macro to automatically build the table -of contents is perhaps initially more difficult, but would save -a great deal of time in the long run if you use @file{ms} regularly. +Altering the @code{NH} macro to automatically build the table of +contents is perhaps initially more difficult, but would save a great +deal of time in the long run if you use @file{ms} regularly. @c --------------------------------------------------------------------- @@ -3908,19 +4131,18 @@ a great deal of time in the long run if you use @file{ms} regularly. @cindex special characters [@code{ms}] @cindex strings [@code{ms}] -The @file{ms} macros provide the following predefined strings. -You can change the string definitions to help in creating -documents in languages other than English. +The @file{ms} macros provide the following predefined strings. You +can change the string definitions to help in creating documents in +languages other than English. @Defstr {REFERENCES, ms} -Contains the string printed at the beginning of the -references (bibliography) page. -The default is @samp{References}. +Contains the string printed at the beginning of the references +(bibliography) page. The default is @samp{References}. @endDefstr @Defstr {ABSTRACT, ms} -Contains the string printed at the beginning of the abstract. -The default is @samp{ABSTRACT}. +Contains the string printed at the beginning of the abstract. The +default is @samp{ABSTRACT}. @endDefstr @Defstr {TOC, ms} @@ -3939,37 +4161,40 @@ Contains the string printed at the beginning of the table of contents. @DefstrItem {MONTH10, ms} @DefstrItem {MONTH11, ms} @DefstrListEnd {MONTH12, ms} -Prints the full name of the month in dates. -The default is @samp{January}, @samp{February}, etc. +Prints the full name of the month in dates. The default is +@samp{January}, @samp{February}, etc. @endDefstr The following special characters are available@footnote{For an -explanation what special characters are see @ref{Special Characters}.}: +explanation what special characters are see @ref{Special +Characters}.}: @Defstr {-, ms} Prints an em dash. @endDefstr -@DefstrList {*Q, ms} -@DefstrListEnd {*U, ms} -Prints typographer's quotes in troff, -plain quotes in nroff. -@code{*Q} is the left quote and @code{*U} is the right quote. +@DefstrList {Q, ms} +@DefstrListEnd {U, ms} +Prints typographer's quotes in troff, and plain quotes in nroff. +@code{\*Q} is the left quote and @code{\*U} is the right quote. @endDefstr Improved accent marks are available in the @file{ms} macros. @Defmac {AM, , ms} -Specify this macro at the beginning of your document -to enable extended accent marks and special characters. -This is a Berkeley extension. +Specify this macro at the beginning of your document to enable +extended accent marks and special characters. This is a Berkeley +extension. -To use the accent marks, place them @strong{after} -the character being accented. +To use the accent marks, place them @strong{after} the character being +accented. + +Note that groff's native support for accents is superior to the +following definitions. @endDefmac -The following accent marks are available -after invoking the @code{AM} macro: +The following accent marks are available after invoking the @code{AM} +macro: @Defstr {\', ms} Acute accent. @@ -4017,8 +4242,8 @@ Underdot. Ring above. @endDefstr -The following are standalone characters -available after invoking the @code{AM} macro: +The following are standalone characters available after invoking the +@code{AM} macro: @Defstr {?, ms} Upside-down question mark. @@ -4029,7 +4254,7 @@ Upside-down exclamation point. @endDefstr @Defstr {8, ms} -German @ss{} ligature. +German ß ligature. @endDefstr @Defstr {3, ms} @@ -4057,23 +4282,78 @@ Hooked o. @endDefstr @Defstr {ae, ms} -Lowercase @ae{} ligature. +Lowercase æ ligature. @endDefstr @Defstr {Ae, ms} -Uppercase @AE{} ligature. +Uppercase Æ ligature. @endDefstr @c --------------------------------------------------------------------- -@node Differences from AT&T ms, , ms Page Layout, ms +@node Differences from AT&T ms, Naming Conventions, ms Page Layout, ms @subsection Differences from @acronym{AT&T} @file{ms} @cindex @code{ms} macros, differences from @acronym{AT&T} @cindex @acronym{AT&T} @code{troff}, @code{ms} macro package differences -This section lists the (minor) differences between the -@code{groff -ms} macros and @acronym{AT&T} -@code{troff -ms} macros. +This section lists the (minor) differences between the @code{groff +-ms} macros and @acronym{AT&T} @code{troff -ms} macros. + +@itemize @bullet +@item +The internals of @code{groff -ms} differ from the internals of +@acronym{AT&T} @code{troff -ms}. Documents that depend upon +implementation details of @acronym{AT&T} @code{troff -ms} may not +format properly with @code{groff -ms}. + +@item +The general error-handling policy of @code{groff -ms} is to detect and +report errors, rather than silently to ignore them. + +@item +@code{groff -ms} does not work in compatibility mode (this is, with +the @option{-C} option). + +@item +There is no special support for typewriter-like devices. + +@item +@code{groff -ms} does not provide cut marks. + +@item +Multiple line spacing is not supported. Use a larger vertical spacing +instead. + +@item +Some @acronym{UNIX} @code{ms} documentation says that the @code{CW} +and @code{GW} number registers can be used to control the column width +and gutter width, respectively. These number registers are not used in +@code{groff -ms}. + +@item +Macros that cause a reset (paragraphs, headings, etc.@:) may change +the indentation. Macros that change the indentation do not increment +or decrement the indentation, but rather set it absolutely. This can +cause problems for documents that define additional macros of their +own. The solution is to use not the @code{in} request but instead the +@code{RS} and @code{RE} macros. + +@item +To make @code{groff -ms} use the default page offset (which also +specifies the left margin), the @code{PO} register must stay undefined +until the first @file{-ms} macro is evaluated. This implies that +@code{PO} should not be used early in the document, unless it is +changed also: Remember that accessing an undefined register +automatically defines it. +@end itemize + +@Defmpreg {GS, ms} +This number register is set to@tie{}1 by the @code{groff -ms} macros, +but it is not used by the @code{AT&T} @code{troff -ms} macros. +Documents that need to determine whether they are being formatted with +@code{AT&T} @code{troff -ms} or @code{groff -ms} should use this +number register. +@endDefmpreg @menu * Missing ms Macros:: @@ -4085,9 +4365,8 @@ This section lists the (minor) differences between the @node Missing ms Macros, Additional ms Macros, Differences from AT&T ms, Differences from AT&T ms @subsubsection @code{troff} macros not appearing in @code{groff} -Macros missing from @code{groff -ms} -are cover page macros specific to Bell Labs. -The macros known to be missing are: +Macros missing from @code{groff -ms} are cover page macros specific to +Bell Labs and Berkeley. The macros known to be missing are: @table @code @item .TM @@ -4148,7 +4427,6 @@ You can write a script to capture and process an index generated in this manner. @endDefmac -@sp 1 The following additional number registers appear in @code{groff -ms}: @@ -4159,11 +4437,57 @@ place of the @code{GW} register that was documented but apparently not implemented in @acronym{AT&T} @code{troff}. @endDefmpreg -@sp 1 Several new string registers are available as well. You can change these to handle (for example) the local language. @xref{ms Strings and Special Characters}, for details. +@c --------------------------------------------------------------------- + +@node Naming Conventions, , Differences from AT&T ms, ms +@subsection Naming Conventions +@cindex @code{ms} macros, naming conventions +@cindex naming conventions, @code{ms} macros + +The following conventions are used for names of macros, strings and +number registers. External names available to documents that use the +@code{groff -ms} macros contain only uppercase letters and digits. + +Internally the macros are divided into modules; naming conventions are +as follows: + +@itemize @bullet +@item +Names used only within one module are of the form +@var{module}@code{*}@var{name}. + +@item +Names used outside the module in which they are defined are of the +form @var{module}@code{@@}@var{name}. + +@item +Names associated with a particular environment are of the form +@var{environment}@code{:}@var{name}; these are used only within the +@code{par} module. + +@item +@var{name} does not have a module prefix. + +@item +Constructed names used to implement arrays are of the form +@var{array}@code{!}@var{index}. +@end itemize + +Thus the groff ms macros reserve the following names: + +@itemize @bullet +@item +Names containing the characters @code{*}, @code{@@}, +and@tie{}@code{:}. + +@item +Names containing only uppercase letters and digits. +@end itemize + @c ===================================================================== @@ -5287,7 +5611,7 @@ e\' in Paris - @result{} A caf@'e in Paris + @result{} A café in Paris @endExample @noindent @@ -5687,8 +6011,8 @@ is ignored. @xref{Debugging}, for information about warnings. Numeric registers can be accessed via the @code{\n} escape. @DefescList {\\n, , i, } -@DefescItem {\\n, @lparen{}, id, } -@DefescListEnd {\\n, @lbrack{}, ident, @rbrack} +@DefescItem {\\n, @Lparen{}, id, } +@DefescListEnd {\\n, @Lbrack{}, ident, @Rbrack{}} @cindex nested assignments @cindex assignments, nested @cindex indirect assignments @@ -5741,14 +6065,14 @@ syntax form. @DefescList {\\n, +, i, } @DefescItem {\\n, -, i, } -@DefescItem {\\n, @lparen{}+, id, } -@DefescItem {\\n, @lparen{}-, id, } -@DefescItem {\\n, +@lparen{}, id, } -@DefescItem {\\n, -@lparen{}, id, } -@DefescItem {\\n, @lbrack{}+, ident, @rbrack{}} -@DefescItem {\\n, @lbrack{}-, ident, @rbrack{}} -@DefescItem {\\n, +@lbrack{}, ident, @rbrack{}} -@DefescListEnd {\\n, -@lbrack{}, ident, @rbrack{}} +@DefescItem {\\n, @Lparen{}+, id, } +@DefescItem {\\n, @Lparen{}-, id, } +@DefescItem {\\n, +@Lparen{}, id, } +@DefescItem {\\n, -@Lparen{}, id, } +@DefescItem {\\n, @Lbrack{}+, ident, @Rbrack{}} +@DefescItem {\\n, @Lbrack{}-, ident, @Rbrack{}} +@DefescItem {\\n, +@Lbrack{}, ident, @Rbrack{}} +@DefescListEnd {\\n, -@Lbrack{}, ident, @Rbrack{}} Before interpolating, increment or decrement @var{ident} (one-character name@tie{}@var{i}, two-character name @var{id}) by the auto-increment value as specified with the @code{nr} request (or the @@ -5873,8 +6197,8 @@ then apply the @code{af} request to this other register. @endDefreq @DefescList {\\g, , i, } -@DefescItem {\\g, @lparen{}, id, } -@DefescListEnd {\\g, @lbrack{}, ident, @rbrack{}} +@DefescItem {\\g, @Lparen{}, id, } +@DefescListEnd {\\g, @Lbrack{}, ident, @Rbrack{}} @cindex format of register (@code{\g}) @cindex register, format (@code{\g}) Return the current format of the specified register @var{ident} @@ -5900,7 +6224,7 @@ read-only. A complete listing of all built-in registers can be found in @item \n[.F] @cindex current input file name register (@code{.F}) @cindex input file name, current, register (@code{.F}) -@vindex \n[.F] +@vindex .F This string-valued register returns the current input file name. @item \n[.H] @@ -5974,7 +6298,7 @@ Current month (1-12). The current year. @item \n[yr] -@vindex \n[yr] +@vindex yr The current year minus@tie{}1900. Unfortunately, the documentation of @acronym{UNIX} Version@tie{}7's @code{troff} had a year@tie{}2000 bug: It incorrectly claimed that @code{yr} contains the last two digits of the @@ -6399,8 +6723,8 @@ right-justified is associated with the current environment @cindex manipulating hyphenation @cindex hyphenation, manipulating -As discussed in @ref{Hyphenation}, @code{gtroff} hyphenates words. -There are a number of ways to influence hyphenation. + +Here a description of requests which influence hyphenation. @DefreqList {hy, [@Var{mode}]} @DefregListEnd {.hy} @@ -6616,16 +6940,42 @@ Invoking @code{hpf} causes an error if there is no current hyphenation language. @endDefreq -@Defreq {hcode, c1 code1 c2 code2 @dots{}} +@Defreq {hcode, c1 code1 [c2 code2 @dots{}]} @cindex hyphenation code (@code{hcode}) @cindex code, hyphenation (@code{hcode}) Set the hyphenation code of character @var{c1} to @var{code1}, that of @var{c2} to @var{code2}, etc. A hyphenation code must be a single input character (not a special character) other than a digit or a -space. Initially each lower-case letter (@samp{a}-@samp{z}) has its -hyphenation code set to itself, and each upper-case letter -(@samp{A}-@samp{Z}) has a hyphenation code which is the lower-case -version of itself. +space. + +To make hyphenation work, hyphenation codes must be set up. At +start-up, groff only assigns hyphenation codes to the letters +@samp{a}-@samp{z} (mapped to themselves) and to the letters +@samp{A}-@samp{Z} (mapped to @samp{a}-@samp{z}); all other hyphenation +codes are set to zero. Normally, hyphenation patterns contain only +lowercase letters which should be applied regardless of case. With +other words, the words `FOO' and `Foo' should be hyphenated exactly the +same way as the word `foo' is hyphenated, and this is what @code{hcode} +is good for. Words which contain other letters won't be hyphenated +properly if the corresponding hyphenation patterns actually do contain +them. For example, the following @code{hcode} requests are necessary to +assign hyphenation codes to the letters @samp{ÄäÖöÜüß} (this is needed +for German): + +@Example +.hcode ä ä Ä ä +.hcode ö ö Ö ö +.hcode ü ü Ãœ ü +.hcode ß ß +@endExample + +Without those assignments, groff treats German words like +@w{`Kindergärten'} (the plural form of `kindergarten') as two +substrings @w{`kinderg'} and @w{`rten'} because the hyphenation code +of the umlaut@tie{}a is zero by default. There is a German +hyphenation pattern which covers @w{`kinder'}, so groff finds the +hyphenation `kin-der'. The other two hyphenation points +(`kin-der-gär-ten') are missed. This request is ignored if it has no parameter. @endDefreq @@ -7499,11 +7849,11 @@ if the @code{tr} request isn't handled properly. Consider the following translation: @Example -.tr @'e@'E +.tr éÉ @endExample @noindent -This maps input character @code{@'e} onto glyph @code{@'E}, which is +This maps input character @code{é} onto glyph @code{É}, which is identical to glyph @code{char201}. But this glyph intentionally doesn't exist! Instead, @code{\[char201]} is treated as an input character entity and is by default mapped onto @code{\['E]}, and @@ -7512,7 +7862,7 @@ character entity and is by default mapped onto @code{\['E]}, and The right way to write the above translation is @Example -.tr @'e\['E] +.tr é\['E] @endExample @noindent @@ -7729,8 +8079,9 @@ If a negative indentation value is specified (which is not allowed), @code{gtroff} emits a warning of type @samp{range} and sets the indentation to zero. -The effect of @code{in} is delayed until a partially collected line (if -it exists) is output. A temporary indent value is reset to zero also. +The effect of @code{in} is delayed until a partially collected line +(if it exists) is output. A temporary indentation value is reset to +zero also. The current indentation (as set by @code{in}) can be found in the read-only number register @samp{.i}. @@ -8212,8 +8563,9 @@ special symbols (Greek, mathematics). @DefreqList {ft, [@Var{font}]} @DefescItem {\\f, , f, } -@DefescItem {\\f, @lparen{}, fn, } -@DefescListEnd {\\f, @lbrack{}, font, @rbrack} +@DefescItem {\\f, @Lparen{}, fn, } +@DefescItem {\\f, @Lbrack{}, font, @Rbrack{}} +@DefregListEnd {.sty} @cindex changing fonts (@code{ft}, @code{\f}) @cindex fonts, changing (@code{ft}, @code{\f}) @cindex @code{sty} request, and changing fonts @@ -8262,6 +8614,11 @@ the fly: .mc \f[I]x\f[] @endExample +The current style name is available in the read-only number register +@samp{.sty} (this is a string-valued register); if the current font +isn't a style, the empty string is returned. It is associated with +the current environment. + @xref{Font Positions}, for an alternative syntax. @endDefreq @@ -8276,8 +8633,12 @@ the fly: @cindex @code{fspecial} request, and font translations @cindex @code{fp} request, and font translations @cindex @code{sty} request, and font translations +@cindex @code{if} request, and font translations +@cindex @code{ie} request, and font translations +@cindex @code{while} request, and font translations Translate font@tie{}@var{f} to font@tie{}@var{g}. Whenever a font -named@tie{}@var{f} is referred to in a @code{\f} escape sequence, or in the +named@tie{}@var{f} is referred to in a @code{\f} escape sequence, +in the @code{F} and @code{S} conditional operators, or in the @code{ft}, @code{ul}, @code{bd}, @code{cs}, @code{tkf}, @code{special}, @code{fspecial}, @code{fp}, or @code{sty} requests, font@tie{}@var{g} is used. If @var{g} is missing or equal to@tie{}@var{f} @@ -8301,10 +8662,10 @@ the current family. @cindex PostScript fonts @cindex fonts, PostScript -Currently, fonts for the devices @option{-Tps}, @option{-Tdvi}, and -@option{-Tlbp} are set up to this mechanism. -By default, @code{gtroff} uses the Times family with the four styles -@samp{R}, @samp{I}, @samp{B}, and @samp{BI}. +Currently, fonts for the devices @option{-Tps}, @option{-Tdvi}, +@option{-Tlj4}, @option{-Tlbp}, and the X11 fonts are set up to this +mechanism. By default, @code{gtroff} uses the Times family with the four +styles @samp{R}, @samp{I}, @samp{B}, and @samp{BI}. This way, it is possible to use the basic four fonts and to select a different font family on the command line (@pxref{Groff Options}). @@ -8312,8 +8673,8 @@ different font family on the command line (@pxref{Groff Options}). @DefreqList {fam, [@Var{family}]} @DefregItem {.fam} @DefescItem {\\F, , f, } -@DefescItem {\\F, @lparen{}, fm, } -@DefescItem {\\F, @lbrack{}, family, @rbrack} +@DefescItem {\\F, @Lparen{}, fm, } +@DefescItem {\\F, @Lbrack{}, family, @Rbrack{}} @DefregListEnd {.fn} @cindex changing font family (@code{fam}, @code{\F}) @cindex font family, changing (@code{fam}, @code{\F}) @@ -8503,8 +8864,8 @@ syntax forms to access font positions. @DefreqList {ft, nnn} @DefescItem {\\f, , n, } -@DefescItem {\\f, @lparen{}, nn, } -@DefescListEnd {\\f, @lbrack{}, nnn, @rbrack} +@DefescItem {\\f, @Lparen{}, nn, } +@DefescListEnd {\\f, @Lbrack{}, nnn, @Rbrack{}} @cindex changing font position (@code{\f}) @cindex font position, changing (@code{\f}) @cindex @code{sty} request, and font positions @@ -8722,9 +9083,9 @@ glyph names of the GGL can't be used in composite glyph names; for example, @code{^E_u0301} is invalid. @end itemize -@DefescList {\\, @lparen{}, nm, } -@DefescItem {\\, @lbrack{}, name, @rbrack} -@DefescListEnd {\\, @lbrack{}, component1 component2 @dots{}, @rbrack} +@DefescList {\\, @Lparen{}, nm, } +@DefescItem {\\, @Lbrack{}, name, @Rbrack{}} +@DefescListEnd {\\, @Lbrack{}, component1 component2 @dots{}, @Rbrack{}} Insert a symbol @var{name} (two-character name @var{nm}) or a composite glyph with component glyphs @var{component1}, @var{component2}, @enddots{} There is no special syntax for one-character names -- the @@ -9288,10 +9649,10 @@ ffl). @dfn{Pairwise kerning} is another subtle typesetting mechanism that modifies the distance between a glyph pair to improve readability. In most cases (but not always) the distance is decreased. -@ifnotinfo +@iftex For example, compare the combination of the letters `V' and `A'. With kerning, `VA' is printed. Without kerning it appears as `V@w{}A'. -@end ifnotinfo +@end iftex Typewriter-like fonts and fonts for terminals where all glyphs have the same width don't use kerning. @@ -9365,6 +9726,7 @@ roman glyph without any intervening space. This small amount of space is also called @dfn{italic correction}. @iftex +@c can't use @Example...@endExample here @example @group \f[I]f\f[R]) @@ -9391,6 +9753,7 @@ space could be called @dfn{left italic correction}, but this term isn't used widely. @iftex +@c can't use @Example...@endExample here @example @group q\f[I]f @@ -9434,7 +9797,8 @@ an input line. @item It prevents kerning between two glyphs. -@ifnotinfo +@iftex +@c can't use @Example...@endExample here @example @group VA @@ -9443,7 +9807,7 @@ V\&A @result{} @r{V@w{}A} @end group @end example -@end ifnotinfo +@end iftex @item It is needed to map an arbitrary character to nothing in the @code{tr} @@ -9817,8 +10181,8 @@ even this is a read-write string variable). @DefreqList {ds, name [@Var{string}]} @DefreqItem {ds1, name [@Var{string}]} @DefescItem {\\*, , n, } -@DefescItem {\\*, @lparen{}, nm, } -@DefescListEnd {\\*, @lbrack{}, name arg1 arg2 @dots{}, @rbrack{}} +@DefescItem {\\*, @Lparen{}, nm, } +@DefescListEnd {\\*, @Lbrack{}, name arg1 arg2 @dots{}, @Rbrack{}} @cindex string interpolation (@code{\*}) @cindex string expansion (@code{\*}) @cindex interpolation of strings (@code{\*}) @@ -10202,6 +10566,17 @@ conditional operator is a misnomer since it tests names of output glyphs.}; @var{g} is either an @acronym{ASCII} character or a special character (@code{\(@var{gg}} or @code{\[@var{ggg}]}); the condition is also true if @var{g} has been defined by the @code{char} request. + +@item F @var{font} +True if a font named @var{font} exists. @var{font} is handled as if it was +opened with the @code{ft} request (this is, font translation and styles are +applied), without actually mounting it. + +This test doesn't load the complete font but only its header to verify +its validity. + +@item S @var{style} +True if style @var{style} has been registered. Font translation is applied. @end table Note that these operators can't be combined with other operators like @@ -10488,7 +10863,7 @@ The value of xxx ix \\n[xxx]. .cp 1 . .aa - @result{} warning: number register ' not defined + @result{} warning: number register `[' not defined @result{} The value of xxx is 0xxx]. .bb @result{} The value of xxx ix 12345. @@ -10516,6 +10891,13 @@ is equivalent to: The @code{dei1} request is similar to @code{dei} but with compatibility mode switched off during execution of the defined macro. +If compatibility mode is on, @code{de} (and @code{dei}) behave similar to +@code{de1} (and @code{dei1}): A `compatibility save' token is inserted at +the beginning, and a `compatibility restore' token at the end, with +compatibility mode switched on during execution. @xref{Gtroff Internals}, +for more information on switching compatibility mode on and off in a +single document. + @pindex trace.tmac Using @file{trace.tmac}, you can trace calls to @code{de} and @code{de1}. @@ -10636,8 +11018,8 @@ Any individual argument can be retrieved with one of the following escapes: @DefescList {\\$, , n, } -@DefescItem {\\$, @lparen{}, nn, } -@DefescListEnd {\\$, @lbrack{}, nnn, @rbrack{}} +@DefescItem {\\$, @Lparen{}, nn, } +@DefescListEnd {\\$, @Lbrack{}, nnn, @Rbrack{}} @cindex copy-in mode, and macro arguments @cindex macro, arguments (@code{\$}) @cindex arguments, macro (@code{\$}) @@ -10936,8 +11318,8 @@ over that glyph. @endDefesc @DefescList {\\k, , p, } -@DefescItem {\\k, @lparen{}, ps, } -@DefescListEnd {\\k, @lbrack{}, position, @rbrack} +@DefescItem {\\k, @Lparen{}, ps, } +@DefescListEnd {\\k, @Lbrack{}, position, @Rbrack{}} @cindex saving horizontal input line position (@code{\k}) @cindex horizontal input line position, saving (@code{\k}) @cindex input line position, horizontal, saving (@code{\k}) @@ -12050,7 +12432,7 @@ The number of lines still to center, or to right-justify, or to underline (with or without underlined spaces); they are set to zero. @item -The status whether a temporary indent is active. +The status whether a temporary indentation is active. @item Input traps and its associated data. @@ -12224,18 +12606,27 @@ Note that @code{f} is the default scaling indicator for the @endExample @endDefreq -@DefescList {\\m, , c, } -@DefescItem {\\m, @lparen{}, co, } -@DefescItem {\\m, @lbrack{}, color, @rbrack} +@DefreqList {gcolor, [@Var{color}]} +@DefescItem {\\m, , c, } +@DefescItem {\\m, @Lparen{}, co, } +@DefescItem {\\m, @Lbrack{}, color, @Rbrack{}} @DefregListEnd {.m} -Set drawing color. The following example shows how to turn the next four -words red. +Set (glyph) drawing color. The following examples show how to turn the +next four words red. + +@Example +.gcolor red +these are in red +.gcolor +and these words are in black. +@endExample @Example \m[red]these are in red\m[] and these words are in black. @endExample -The escape @code{\m[]} returns to the previous color. +The escape @code{\m[]} returns to the previous color, as does a call to +@code{gcolor} without an argument. @cindex drawing color name register (@code{.m}) @cindex name, drawing color, register (@code{.m}) @@ -12256,11 +12647,12 @@ the fly: @endExample @endDefesc -@DefescList {\\M, , c, } -@DefescItem {\\M, @lparen{}, co, } -@DefescItem {\\M, @lbrack{}, color, @rbrack} +@DefreqList {fcolor, [@Var{color}]} +@DefescItem {\\M, , c, } +@DefescItem {\\M, @Lparen{}, co, } +@DefescItem {\\M, @Lbrack{}, color, @Rbrack{}} @DefregListEnd {.M} -Set background color for filled objects drawn with the +Set fill (background) color for filled objects drawn with the @code{\D'@dots{}'} commands. A red ellipse can be created with the following code: @@ -12269,13 +12661,17 @@ A red ellipse can be created with the following code: \M[red]\h'0.5i'\D'E 2i 1i'\M[] @endExample -The escape @code{\M[]} returns to the previous fill color. +The escape @code{\M[]} returns to the previous fill color, as does a call to +@code{fcolor} without an argument. @cindex background color name register (@code{.M}) @cindex name, background color, register (@code{.M}) @cindex color name, background, register (@code{.M}) -The name of the current background color is available in the read-only, -string-valued number register @samp{.M}. +@cindex fill color name register (@code{.M}) +@cindex name, fill color, register (@code{.M}) +@cindex color name, fill, register (@code{.M}) +The name of the current fill (background) color is available in the +read-only, string-valued number register @samp{.M}. The fill color is associated with the current environment (@pxref{Environments}). @@ -12610,8 +13006,8 @@ Here a simple macro to write an index entry. @endDefreq @DefescList {\\V, , e, } -@DefescItem {\\V, @lparen{}, ev, } -@DefescListEnd {\\V, @lbrack{}, env, @rbrack} +@DefescItem {\\V, @Lparen{}, ev, } +@DefescListEnd {\\V, @Lbrack{}, env, @Rbrack{}} Interpolate the contents of the specified environment variable @var{env} (one-character name@tie{}@var{e}, two-character name @var{ev}) as returned by the function @code{getenv}. @code{\V} is interpreted @@ -12660,8 +13056,8 @@ Additionally, the backslash is represented as @code{\\}. @endDefesc @DefescList {\\Y, , n, } -@DefescItem {\\Y, @lparen{}, nm, } -@DefescListEnd {\\Y, @lbrack{}, name, @rbrack} +@DefescItem {\\Y, @Lparen{}, nm, } +@DefescListEnd {\\Y, @Lbrack{}, name, @Rbrack{}} This is approximately equivalent to @samp{\X'\*[@var{name}]'} (one-character name@tie{}@var{n}, two-character name @var{nm}). However, the contents of the string or macro @var{name} are not @@ -12968,6 +13364,34 @@ in special fonts, we must call @code{rchar} to remove the definition of the fallback glyph. Anyway, the translation is still active; @samp{x} now maps to the real glyph @samp{foo}. +@cindex compatibility mode, and parameters +@cindex mode, compatibility, and parameters +@cindex arguments, and compatibility mode +@cindex parameters, and compatibility mode +@cindex macro arguments, and compatibility mode +@cindex request arguments, and compatibility mode +Macro and request arguments preserve the compatibility mode: + +@Example +.cp 1 \" switch to compatibility mode +.de xx +\\$1 +.. +.cp 0 \" switch compatibility mode off +.xx caf\['e] + @result{} café +@endExample + +@noindent +Since compatibility mode is on while @code{de} is called, the macro +@code{xx} activates compatibility mode while executing. Argument +@code{$1} can still be handled properly because it inherits the +compatibility mode status which was active at the point where @code{xx} +is called. + +After expansion of the parameters, the compatibility save and restore +tokens are removed. + @c ===================================================================== @@ -14445,7 +14869,7 @@ The argument@tie{}@var{n} must be an integer in the range @math{-32767} to 32767. @table @asis -@item @math{0 @LE @var{n} @LE 1000} +@item @math{0 @LE{} @var{n} @LE{} 1000} Set the color for filling solid drawing objects to a shade of gray, where 0 corresponds to solid white, 1000 (the default) to solid black, and values in between to intermediate shades of gray; this is diff --git a/contrib/groff-1.19/font/devdvi/generate/Makefile b/contrib/groff-1.19/font/devdvi/generate/Makefile index 8215007715..ffbc68c77c 100644 --- a/contrib/groff-1.19/font/devdvi/generate/Makefile +++ b/contrib/groff-1.19/font/devdvi/generate/Makefile @@ -15,7 +15,7 @@ # # 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. +# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. # This is set up so you can do: # make -f generate/Makefile diff --git a/contrib/groff-1.19/font/devhtml/DESC.proto b/contrib/groff-1.19/font/devhtml/DESC.proto index 9a2fbe57d2..db407f7bb8 100644 --- a/contrib/groff-1.19/font/devhtml/DESC.proto +++ b/contrib/groff-1.19/font/devhtml/DESC.proto @@ -5,7 +5,7 @@ unitwidth 10 sizes 1-1000 0 fonts 9 R I B BI CR CI CB CBI S tcommand -html +unscaled_charwidths postpro post-grohtml prepro pre-grohtml use_charnames_in_special diff --git a/contrib/groff-1.19/font/devhtml/R.proto b/contrib/groff-1.19/font/devhtml/R.proto index 12e7c9f053..5126980a38 100644 --- a/contrib/groff-1.19/font/devhtml/R.proto +++ b/contrib/groff-1.19/font/devhtml/R.proto @@ -339,6 +339,268 @@ ts 24 0 0x03C2 ς *f 24 0 0x03D5 ϕ +p 24 0 0x03D6 ϖ +e 24 0 0x03F5 ϵ +u0415_0300 24 0 0x0400 Ѐ +u0415_0308 24 0 0x0401 Ё +u0402 24 0 0x0402 Ђ +u0413_0301 24 0 0x0403 Ѓ +u0404 24 0 0x0404 Є +u0405 24 0 0x0405 Ѕ +u0406 24 0 0x0406 І +u0406_0308 24 0 0x0407 Ї +u0408 24 0 0x0408 Ј +u0409 24 0 0x0409 Љ +u040A 24 0 0x040A Њ +u040B 24 0 0x040B Ћ +u041A_0301 24 0 0x040C Ќ +u0418_0300 24 0 0x040D Ѝ +u0423_0306 24 0 0x040E Ў +u040F 24 0 0x040F Џ +u0410 24 0 0x0410 А +u0411 24 0 0x0411 Б +u0412 24 0 0x0412 В +u0413 24 0 0x0413 Г +u0414 24 0 0x0414 Д +u0415 24 0 0x0415 Е +u0416 24 0 0x0416 Ж +u0417 24 0 0x0417 З +u0418 24 0 0x0418 И +u0418_0306 24 0 0x0419 Й +u041A 24 0 0x041A К +u041B 24 0 0x041B Л +u041C 24 0 0x041C М +u041D 24 0 0x041D Н +u041E 24 0 0x041E О +u041F 24 0 0x041F П +u0420 24 0 0x0420 Р +u0421 24 0 0x0421 С +u0422 24 0 0x0422 Т +u0423 24 0 0x0423 У +u0424 24 0 0x0424 Ф +u0425 24 0 0x0425 Х +u0426 24 0 0x0426 Ц +u0427 24 0 0x0427 Ч +u0428 24 0 0x0428 Ш +u0429 24 0 0x0429 Щ +u042A 24 0 0x042A Ъ +u042B 24 0 0x042B Ы +u042C 24 0 0x042C Ь +u042D 24 0 0x042D Э +u042E 24 0 0x042E Ю +u042F 24 0 0x042F Я +u0430 24 0 0x0430 а +u0431 24 0 0x0431 б +u0432 24 0 0x0432 в +u0433 24 0 0x0433 г +u0434 24 0 0x0434 д +u0435 24 0 0x0435 е +u0436 24 0 0x0436 ж +u0437 24 0 0x0437 з +u0438 24 0 0x0438 и +u0438_0306 24 0 0x0439 й +u043A 24 0 0x043A к +u043B 24 0 0x043B л +u043C 24 0 0x043C м +u043D 24 0 0x043D н +u043E 24 0 0x043E о +u043F 24 0 0x043F п +u0440 24 0 0x0440 р +u0441 24 0 0x0441 с +u0442 24 0 0x0442 т +u0443 24 0 0x0443 у +u0444 24 0 0x0444 ф +u0445 24 0 0x0445 х +u0446 24 0 0x0446 ц +u0447 24 0 0x0447 ч +u0448 24 0 0x0448 ш +u0449 24 0 0x0449 щ +u044A 24 0 0x044A ъ +u044B 24 0 0x044B ы +u044C 24 0 0x044C ь +u044D 24 0 0x044D э +u044E 24 0 0x044E ю +u044F 24 0 0x044F я +u0435_0300 24 0 0x0450 ѐ +u0435_0308 24 0 0x0451 ё +u0452 24 0 0x0452 ђ +u0433_0301 24 0 0x0453 ѓ +u0454 24 0 0x0454 є +u0455 24 0 0x0455 ѕ +u0456 24 0 0x0456 і +u0456_0308 24 0 0x0457 ї +u0458 24 0 0x0458 ј +u0459 24 0 0x0459 љ +u045A 24 0 0x045A њ +u045B 24 0 0x045B ћ +u043A_0301 24 0 0x045C ќ +u0438_0300 24 0 0x045D ѝ +u0443_0306 24 0 0x045E ў +u045F 24 0 0x045F џ +u0460 24 0 0x0460 Ѡ +u0461 24 0 0x0461 ѡ +u0462 24 0 0x0462 Ѣ +u0463 24 0 0x0463 ѣ +u0464 24 0 0x0464 Ѥ +u0465 24 0 0x0465 ѥ +u0466 24 0 0x0466 Ѧ +u0467 24 0 0x0467 ѧ +u0468 24 0 0x0468 Ѩ +u0469 24 0 0x0469 ѩ +u046A 24 0 0x046A Ѫ +u046B 24 0 0x046B ѫ +u046C 24 0 0x046C Ѭ +u046D 24 0 0x046D ѭ +u046E 24 0 0x046E Ѯ +u046F 24 0 0x046F ѯ +u0470 24 0 0x0470 Ѱ +u0471 24 0 0x0471 ѱ +u0472 24 0 0x0472 Ѳ +u0473 24 0 0x0473 ѳ +u0474 24 0 0x0474 Ѵ +u0475 24 0 0x0475 ѵ +u0474_030F 24 0 0x0476 Ѷ +u0475_030F 24 0 0x0477 ѷ +u0478 24 0 0x0478 Ѹ +u0479 24 0 0x0479 ѹ +u047A 24 0 0x047A Ѻ +u047B 24 0 0x047B ѻ +u047C 24 0 0x047C Ѽ +u047D 24 0 0x047D ѽ +u047E 24 0 0x047E Ѿ +u047F 24 0 0x047F ѿ +u0480 24 0 0x0480 Ҁ +u0481 24 0 0x0481 ҁ +u0482 24 0 0x0482 ҂ +u0483 0 0 0x0483 ҃ +u0484 0 0 0x0484 ҄ +u0485 0 0 0x0485 ҅ +u0486 0 0 0x0486 ҆ +u0488 0 0 0x0488 ҈ +u0489 0 0 0x0489 ҉ +u048A 24 0 0x048A Ҋ +u048B 24 0 0x048B ҋ +u048C 24 0 0x048C Ҍ +u048D 24 0 0x048D ҍ +u048E 24 0 0x048E Ҏ +u048F 24 0 0x048F ҏ +u0490 24 0 0x0490 Ґ +u0491 24 0 0x0491 ґ +u0492 24 0 0x0492 Ғ +u0493 24 0 0x0493 ғ +u0494 24 0 0x0494 Ҕ +u0495 24 0 0x0495 ҕ +u0496 24 0 0x0496 Җ +u0497 24 0 0x0497 җ +u0498 24 0 0x0498 Ҙ +u0499 24 0 0x0499 ҙ +u049A 24 0 0x049A Қ +u049B 24 0 0x049B қ +u049C 24 0 0x049C Ҝ +u049D 24 0 0x049D ҝ +u049E 24 0 0x049E Ҟ +u049F 24 0 0x049F ҟ +u04A0 24 0 0x04A0 Ҡ +u04A1 24 0 0x04A1 ҡ +u04A2 24 0 0x04A2 Ң +u04A3 24 0 0x04A3 ң +u04A4 24 0 0x04A4 Ҥ +u04A5 24 0 0x04A5 ҥ +u04A6 24 0 0x04A6 Ҧ +u04A7 24 0 0x04A7 ҧ +u04A8 24 0 0x04A8 Ҩ +u04A9 24 0 0x04A9 ҩ +u04AA 24 0 0x04AA Ҫ +u04AB 24 0 0x04AB ҫ +u04AC 24 0 0x04AC Ҭ +u04AD 24 0 0x04AD ҭ +u04AE 24 0 0x04AE Ү +u04AF 24 0 0x04AF ү +u04B0 24 0 0x04B0 Ұ +u04B1 24 0 0x04B1 ұ +u04B2 24 0 0x04B2 Ҳ +u04B3 24 0 0x04B3 ҳ +u04B4 24 0 0x04B4 Ҵ +u04B5 24 0 0x04B5 ҵ +u04B6 24 0 0x04B6 Ҷ +u04B7 24 0 0x04B7 ҷ +u04B8 24 0 0x04B8 Ҹ +u04B9 24 0 0x04B9 ҹ +u04BA 24 0 0x04BA Һ +u04BB 24 0 0x04BB һ +u04BC 24 0 0x04BC Ҽ +u04BD 24 0 0x04BD ҽ +u04BE 24 0 0x04BE Ҿ +u04BF 24 0 0x04BF ҿ +u04C0 24 0 0x04C0 Ӏ +u0416_0306 24 0 0x04C1 Ӂ +u0436_0306 24 0 0x04C2 ӂ +u04C3 24 0 0x04C3 Ӄ +u04C4 24 0 0x04C4 ӄ +u04C5 24 0 0x04C5 Ӆ +u04C6 24 0 0x04C6 ӆ +u04C7 24 0 0x04C7 Ӈ +u04C8 24 0 0x04C8 ӈ +u04C9 24 0 0x04C9 Ӊ +u04CA 24 0 0x04CA ӊ +u04CB 24 0 0x04CB Ӌ +u04CC 24 0 0x04CC ӌ +u04CD 24 0 0x04CD Ӎ +u04CE 24 0 0x04CE ӎ +u0410_0306 24 0 0x04D0 Ӑ +u0430_0306 24 0 0x04D1 ӑ +u0410_0308 24 0 0x04D2 Ӓ +u0430_0308 24 0 0x04D3 ӓ +u04D4 24 0 0x04D4 Ӕ +u04D5 24 0 0x04D5 ӕ +u0415_0306 24 0 0x04D6 Ӗ +u0435_0306 24 0 0x04D7 ӗ +u04D8 24 0 0x04D8 Ә +u04D9 24 0 0x04D9 ә +u04D8_0308 24 0 0x04DA Ӛ +u04D9_0308 24 0 0x04DB ӛ +u0416_0308 24 0 0x04DC Ӝ +u0436_0308 24 0 0x04DD ӝ +u0417_0308 24 0 0x04DE Ӟ +u0437_0308 24 0 0x04DF ӟ +u04E0 24 0 0x04E0 Ӡ +u04E1 24 0 0x04E1 ӡ +u0418_0304 24 0 0x04E2 Ӣ +u0438_0304 24 0 0x04E3 ӣ +u0418_0308 24 0 0x04E4 Ӥ +u0438_0308 24 0 0x04E5 ӥ +u041E_0308 24 0 0x04E6 Ӧ +u043E_0308 24 0 0x04E7 ӧ +u04E8 24 0 0x04E8 Ө +u04E9 24 0 0x04E9 ө +u04E8_0308 24 0 0x04EA Ӫ +u04E9_0308 24 0 0x04EB ӫ +u042D_0308 24 0 0x04EC Ӭ +u044D_0308 24 0 0x04ED ӭ +u0423_0304 24 0 0x04EE Ӯ +u0443_0304 24 0 0x04EF ӯ +u0423_0308 24 0 0x04F0 Ӱ +u0443_0308 24 0 0x04F1 ӱ +u0423_030B 24 0 0x04F2 Ӳ +u0443_030B 24 0 0x04F3 ӳ +u0427_0308 24 0 0x04F4 Ӵ +u0447_0308 24 0 0x04F5 ӵ +u042B_0308 24 0 0x04F8 Ӹ +u044B_0308 24 0 0x04F9 ӹ +u0500 24 0 0x0500 Ԁ +u0501 24 0 0x0501 ԁ +u0502 24 0 0x0502 Ԃ +u0503 24 0 0x0503 ԃ +u0504 24 0 0x0504 Ԅ +u0505 24 0 0x0505 ԅ +u0506 24 0 0x0506 Ԇ +u0507 24 0 0x0507 ԇ +u0508 24 0 0x0508 Ԉ +u0509 24 0 0x0509 ԉ +u050A 24 0 0x050A Ԋ +u050B 24 0 0x050B ԋ +u050C 24 0 0x050C Ԍ +u050D 24 0 0x050D ԍ +u050E 24 0 0x050E Ԏ +u050F 24 0 0x050F ԏ en 24 0 0x2013 – em 24 0 0x2014 — ` 24 0 0x2018 ‘ diff --git a/contrib/groff-1.19/font/devlj4/generate/Makefile b/contrib/groff-1.19/font/devlj4/generate/Makefile index 73f1fbd863..88a8cba7dd 100644 --- a/contrib/groff-1.19/font/devlj4/generate/Makefile +++ b/contrib/groff-1.19/font/devlj4/generate/Makefile @@ -15,7 +15,7 @@ # # 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. +# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. # Directory containing Autofont TFM files. # The TFM files used are available for ftp as diff --git a/contrib/groff-1.19/font/devps/generate/Makefile b/contrib/groff-1.19/font/devps/generate/Makefile index dd0d65bfc6..739fd8e59b 100644 --- a/contrib/groff-1.19/font/devps/generate/Makefile +++ b/contrib/groff-1.19/font/devps/generate/Makefile @@ -15,7 +15,7 @@ # # 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. +# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. # This is set up so you can do # make -f generate/Makefile diff --git a/contrib/groff-1.19/font/devps/generate/afmname b/contrib/groff-1.19/font/devps/generate/afmname index 3e837df222..7d19349303 100644 --- a/contrib/groff-1.19/font/devps/generate/afmname +++ b/contrib/groff-1.19/font/devps/generate/afmname @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh # Fix the path name of an AFM file. if test -f "$1" then diff --git a/contrib/groff-1.19/font/devps/prologue.ps b/contrib/groff-1.19/font/devps/prologue.ps index a0cdb60c39..1ec2df775f 100644 --- a/contrib/groff-1.19/font/devps/prologue.ps +++ b/contrib/groff-1.19/font/devps/prologue.ps @@ -91,7 +91,7 @@ /EP { level0 restore showpage -} bind def +} def % centerx centery radius startangle endangle DA - @@ -243,7 +243,6 @@ } bind def /PEND { - clear countdictstack CNT sub { end } repeat level1 restore } bind def diff --git a/contrib/groff-1.19/font/devutf8/NOTES b/contrib/groff-1.19/font/devutf8/NOTES index 0e857e877a..8e724703dd 100644 --- a/contrib/groff-1.19/font/devutf8/NOTES +++ b/contrib/groff-1.19/font/devutf8/NOTES @@ -1,53 +1,53 @@ -Note that all `charXXX' entity names have been removed from the font files. +Note that all \[charXXX] entity names have been removed from the font files. They don't make sense for Unicode. -The following from the original troff manual (by Ossanna and Kernighan) is -unmapped: +The following entity from the original troff manual (by Ossanna and +Kernighan) is unmapped: - \(bs shaded solid ball (Bell System logo, AT&T logo) + bs shaded solid ball (Bell System logo, AT&T logo) Character 0x002D has not been given a name because its Unicode name -"HYPHEN-MINUS" is so ambiguous that it's unusable for serious typographic use. +HYPHEN-MINUS is so ambiguous that it is unusable for serious typographic +use. -\(wp has been mapped to 0x2118, because according to unicode.org's -NamesList-3.0.0.txt, U+2118 "SCRIPT CAPITAL P" is really a Weierstrass p, +\[wp] has been mapped to 0x2118, because according to Unicode 4.1's +NamesList.txt, U+2118 SCRIPT CAPITAL P is really a Weierstrass `p', neither SCRIPT not CAPITAL. -The following line could be added; "space" is known to "devps" but are not -documented and not known to "devdvi" (actually, there is no space glyph -within the TeX system). +The following line could be added; \[space] is known to devps but is not +documented and not known to devdvi (actually, there is no space glyph within +the TeX system). -space 24 0 0x0020 + space 24 0 0x0020 -"devps" maps \(a~ and ~ to asciitilde, which is equivalent to 0x02DC, but +devps maps \[a~] and `~' to `asciitilde', which is equivalent to 0x02DC, but this glyph is just too small. We map them to 0x007E instead. -"devps" maps \(a^ and ^ to circumflex, which is equivalent to 0x02C6, but +devps maps \[a^] and `^' to `circumflex', which is equivalent to 0x02C6, but this glyph is just too small. We map them to 0x005E instead. -"devps" maps *U to Upsilon1, which is equivalent to 0x03D2. We map it to +devps maps \[*U] to `Upsilon1', which is equivalent to 0x03D2. We map it to 0x03A5 instead. -"devps" maps *W to Omega, which is equivalent to either 0x2126 or 0x03A9. +devps maps \[*W] to `Omega', which is equivalent to either 0x2126 or 0x03A9. We map it to 0x03A9. -"devps" maps *D to Delta, which is equivalent to either 0x2206 or 0x0394. +devps maps \[*D] to `Delta', which is equivalent to either 0x2206 or 0x0394. We map it to 0x0394. -Using unnamed characters ------------------------- +Adding Unicode characters +------------------------- Assume you want to use a Unicode character not provided in the list, say U+20AC. You need to do two things: - Add a line - --- 24 0 0x20AC + u20AC 24 0 0x20AC (the second column is computed as 24 * wcwidth(0x20AC)) to the file R.proto, or, when groff is already installed, to the four fonts files in $(prefix)/share/groff//font/devutf8/. -- In your source file, use the notation \N'8364' where 8364 is the decimal - representation of 0x20AC. +- In your source file, use the notation \[u20AC] to access it. diff --git a/contrib/groff-1.19/font/devutf8/R.proto b/contrib/groff-1.19/font/devutf8/R.proto index 3a65b1b946..ac0828fe49 100644 --- a/contrib/groff-1.19/font/devutf8/R.proto +++ b/contrib/groff-1.19/font/devutf8/R.proto @@ -405,6 +405,268 @@ ts 24 0 0x03C2 *f 24 0 0x03D5 +p 24 0 0x03D6 +e 24 0 0x03F5 +u0415_0300 24 0 0x0400 +u0415_0308 24 0 0x0401 +u0402 24 0 0x0402 +u0413_0301 24 0 0x0403 +u0404 24 0 0x0404 +u0405 24 0 0x0405 +u0406 24 0 0x0406 +u0406_0308 24 0 0x0407 +u0408 24 0 0x0408 +u0409 24 0 0x0409 +u040A 24 0 0x040A +u040B 24 0 0x040B +u041A_0301 24 0 0x040C +u0418_0300 24 0 0x040D +u0423_0306 24 0 0x040E +u040F 24 0 0x040F +u0410 24 0 0x0410 +u0411 24 0 0x0411 +u0412 24 0 0x0412 +u0413 24 0 0x0413 +u0414 24 0 0x0414 +u0415 24 0 0x0415 +u0416 24 0 0x0416 +u0417 24 0 0x0417 +u0418 24 0 0x0418 +u0418_0306 24 0 0x0419 +u041A 24 0 0x041A +u041B 24 0 0x041B +u041C 24 0 0x041C +u041D 24 0 0x041D +u041E 24 0 0x041E +u041F 24 0 0x041F +u0420 24 0 0x0420 +u0421 24 0 0x0421 +u0422 24 0 0x0422 +u0423 24 0 0x0423 +u0424 24 0 0x0424 +u0425 24 0 0x0425 +u0426 24 0 0x0426 +u0427 24 0 0x0427 +u0428 24 0 0x0428 +u0429 24 0 0x0429 +u042A 24 0 0x042A +u042B 24 0 0x042B +u042C 24 0 0x042C +u042D 24 0 0x042D +u042E 24 0 0x042E +u042F 24 0 0x042F +u0430 24 0 0x0430 +u0431 24 0 0x0431 +u0432 24 0 0x0432 +u0433 24 0 0x0433 +u0434 24 0 0x0434 +u0435 24 0 0x0435 +u0436 24 0 0x0436 +u0437 24 0 0x0437 +u0438 24 0 0x0438 +u0438_0306 24 0 0x0439 +u043A 24 0 0x043A +u043B 24 0 0x043B +u043C 24 0 0x043C +u043D 24 0 0x043D +u043E 24 0 0x043E +u043F 24 0 0x043F +u0440 24 0 0x0440 +u0441 24 0 0x0441 +u0442 24 0 0x0442 +u0443 24 0 0x0443 +u0444 24 0 0x0444 +u0445 24 0 0x0445 +u0446 24 0 0x0446 +u0447 24 0 0x0447 +u0448 24 0 0x0448 +u0449 24 0 0x0449 +u044A 24 0 0x044A +u044B 24 0 0x044B +u044C 24 0 0x044C +u044D 24 0 0x044D +u044E 24 0 0x044E +u044F 24 0 0x044F +u0435_0300 24 0 0x0450 +u0435_0308 24 0 0x0451 +u0452 24 0 0x0452 +u0433_0301 24 0 0x0453 +u0454 24 0 0x0454 +u0455 24 0 0x0455 +u0456 24 0 0x0456 +u0456_0308 24 0 0x0457 +u0458 24 0 0x0458 +u0459 24 0 0x0459 +u045A 24 0 0x045A +u045B 24 0 0x045B +u043A_0301 24 0 0x045C +u0438_0300 24 0 0x045D +u0443_0306 24 0 0x045E +u045F 24 0 0x045F +u0460 24 0 0x0460 +u0461 24 0 0x0461 +u0462 24 0 0x0462 +u0463 24 0 0x0463 +u0464 24 0 0x0464 +u0465 24 0 0x0465 +u0466 24 0 0x0466 +u0467 24 0 0x0467 +u0468 24 0 0x0468 +u0469 24 0 0x0469 +u046A 24 0 0x046A +u046B 24 0 0x046B +u046C 24 0 0x046C +u046D 24 0 0x046D +u046E 24 0 0x046E +u046F 24 0 0x046F +u0470 24 0 0x0470 +u0471 24 0 0x0471 +u0472 24 0 0x0472 +u0473 24 0 0x0473 +u0474 24 0 0x0474 +u0475 24 0 0x0475 +u0474_030F 24 0 0x0476 +u0475_030F 24 0 0x0477 +u0478 24 0 0x0478 +u0479 24 0 0x0479 +u047A 24 0 0x047A +u047B 24 0 0x047B +u047C 24 0 0x047C +u047D 24 0 0x047D +u047E 24 0 0x047E +u047F 24 0 0x047F +u0480 24 0 0x0480 +u0481 24 0 0x0481 +u0482 24 0 0x0482 +u0483 0 0 0x0483 +u0484 0 0 0x0484 +u0485 0 0 0x0485 +u0486 0 0 0x0486 +u0488 0 0 0x0488 +u0489 0 0 0x0489 +u048A 24 0 0x048A +u048B 24 0 0x048B +u048C 24 0 0x048C +u048D 24 0 0x048D +u048E 24 0 0x048E +u048F 24 0 0x048F +u0490 24 0 0x0490 +u0491 24 0 0x0491 +u0492 24 0 0x0492 +u0493 24 0 0x0493 +u0494 24 0 0x0494 +u0495 24 0 0x0495 +u0496 24 0 0x0496 +u0497 24 0 0x0497 +u0498 24 0 0x0498 +u0499 24 0 0x0499 +u049A 24 0 0x049A +u049B 24 0 0x049B +u049C 24 0 0x049C +u049D 24 0 0x049D +u049E 24 0 0x049E +u049F 24 0 0x049F +u04A0 24 0 0x04A0 +u04A1 24 0 0x04A1 +u04A2 24 0 0x04A2 +u04A3 24 0 0x04A3 +u04A4 24 0 0x04A4 +u04A5 24 0 0x04A5 +u04A6 24 0 0x04A6 +u04A7 24 0 0x04A7 +u04A8 24 0 0x04A8 +u04A9 24 0 0x04A9 +u04AA 24 0 0x04AA +u04AB 24 0 0x04AB +u04AC 24 0 0x04AC +u04AD 24 0 0x04AD +u04AE 24 0 0x04AE +u04AF 24 0 0x04AF +u04B0 24 0 0x04B0 +u04B1 24 0 0x04B1 +u04B2 24 0 0x04B2 +u04B3 24 0 0x04B3 +u04B4 24 0 0x04B4 +u04B5 24 0 0x04B5 +u04B6 24 0 0x04B6 +u04B7 24 0 0x04B7 +u04B8 24 0 0x04B8 +u04B9 24 0 0x04B9 +u04BA 24 0 0x04BA +u04BB 24 0 0x04BB +u04BC 24 0 0x04BC +u04BD 24 0 0x04BD +u04BE 24 0 0x04BE +u04BF 24 0 0x04BF +u04C0 24 0 0x04C0 +u0416_0306 24 0 0x04C1 +u0436_0306 24 0 0x04C2 +u04C3 24 0 0x04C3 +u04C4 24 0 0x04C4 +u04C5 24 0 0x04C5 +u04C6 24 0 0x04C6 +u04C7 24 0 0x04C7 +u04C8 24 0 0x04C8 +u04C9 24 0 0x04C9 +u04CA 24 0 0x04CA +u04CB 24 0 0x04CB +u04CC 24 0 0x04CC +u04CD 24 0 0x04CD +u04CE 24 0 0x04CE +u0410_0306 24 0 0x04D0 +u0430_0306 24 0 0x04D1 +u0410_0308 24 0 0x04D2 +u0430_0308 24 0 0x04D3 +u04D4 24 0 0x04D4 +u04D5 24 0 0x04D5 +u0415_0306 24 0 0x04D6 +u0435_0306 24 0 0x04D7 +u04D8 24 0 0x04D8 +u04D9 24 0 0x04D9 +u04D8_0308 24 0 0x04DA +u04D9_0308 24 0 0x04DB +u0416_0308 24 0 0x04DC +u0436_0308 24 0 0x04DD +u0417_0308 24 0 0x04DE +u0437_0308 24 0 0x04DF +u04E0 24 0 0x04E0 +u04E1 24 0 0x04E1 +u0418_0304 24 0 0x04E2 +u0438_0304 24 0 0x04E3 +u0418_0308 24 0 0x04E4 +u0438_0308 24 0 0x04E5 +u041E_0308 24 0 0x04E6 +u043E_0308 24 0 0x04E7 +u04E8 24 0 0x04E8 +u04E9 24 0 0x04E9 +u04E8_0308 24 0 0x04EA +u04E9_0308 24 0 0x04EB +u042D_0308 24 0 0x04EC +u044D_0308 24 0 0x04ED +u0423_0304 24 0 0x04EE +u0443_0304 24 0 0x04EF +u0423_0308 24 0 0x04F0 +u0443_0308 24 0 0x04F1 +u0423_030B 24 0 0x04F2 +u0443_030B 24 0 0x04F3 +u0427_0308 24 0 0x04F4 +u0447_0308 24 0 0x04F5 +u042B_0308 24 0 0x04F8 +u044B_0308 24 0 0x04F9 +u0500 24 0 0x0500 +u0501 24 0 0x0501 +u0502 24 0 0x0502 +u0503 24 0 0x0503 +u0504 24 0 0x0504 +u0505 24 0 0x0505 +u0506 24 0 0x0506 +u0507 24 0 0x0507 +u0508 24 0 0x0508 +u0509 24 0 0x0509 +u050A 24 0 0x050A +u050B 24 0 0x050B +u050C 24 0 0x050C +u050D 24 0 0x050D +u050E 24 0 0x050E +u050F 24 0 0x050F - 24 0 0x2010 hy " en 24 0 0x2013 diff --git a/contrib/groff-1.19/man/ditroff.man b/contrib/groff-1.19/man/ditroff.man index 0867f3d037..ea3bb86c46 100644 --- a/contrib/groff-1.19/man/ditroff.man +++ b/contrib/groff-1.19/man/ditroff.man @@ -1,11 +1,11 @@ .ig ditroff.man -Last update: 4 Jan 2002 +Last update: 2 Jul 2004 This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2001, 2002 Free Software Foundation, Inc. +Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. written by Bernd Warken maintained by Werner Lemberg @@ -85,7 +85,9 @@ today. In order to distinguish it from Osanna's original mono-device version, it was called .I ditroff -.RI ( d\/ evice\~ i\/ ndependent\~ troff\/ ) +(\c +.IR d\/ evice\~ i\/ ndependent\~ troff\/\c +) on some systems, though this naming isn't mentioned in the classical documentation. . @@ -169,7 +171,7 @@ multi-devicing. .SH "AUTHORS" .\" -------------------------------------------------------------------- . -Copyright (C) 2001, 2002 Free Software Foundation, Inc. +Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. . .P This document is distributed under the terms of the FDL (GNU Free diff --git a/contrib/groff-1.19/man/groff.man b/contrib/groff-1.19/man/groff.man index 74f262295a..2e0bfc74fe 100644 --- a/contrib/groff-1.19/man/groff.man +++ b/contrib/groff-1.19/man/groff.man @@ -2,11 +2,12 @@ .ig groff.man -Last update: 04 May 2004 +Last update: 17 Feb 2005 This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. written by Bernd Warken maintained by Werner Lemberg @@ -1015,6 +1016,17 @@ True if there is a register named Formatter is .BR troff . . +.TPx +.BI F font +True if there exists a font named +.IR font . +. +.TPx +.BI S style +True if a style named +.I style +has been registered. +. .RE .PD . @@ -1553,6 +1565,13 @@ Define fallback character as string .IR anything . . +.REQ .fcolor +Set fill color to previous fill color. +. +.REQ .fcolor c +Set fill color to +.IR c . +. .REQ .fi Fill output lines. . @@ -1615,6 +1634,13 @@ Translate to .IR font2 . . +.REQ .gcolor +Set glyph color to previous glyph color. +. +.REQ .gcolor c +Set glyph color to +.IR c . +. .REQ .hc Remove additional hyphenation indicator character. . @@ -3068,7 +3094,7 @@ The skew of a character is how far to the right of the center of a character the center of an accent over that character should be placed. . .REG .d -Current vertical place in current diversion; equal to register +Current vertical place in current diversion; equal to .register nl . . .REG .ev @@ -3221,6 +3247,19 @@ The slant of the current font as set with The last requested pointsize in points as a decimal fraction (string-valued). . +.REG .ss +The value of the parameters set by the first argument of the +.request ss +request. +. +.REG .sss +The value of the parameters set by the second argument of the +.request ss +request. +. +.REG .sty +The current font style (string-valued). +. .REG .t Distance to the next trap. . @@ -3248,18 +3287,7 @@ the difference of what the vertical position would have been but for the trap, and what the vertical position actually is. . Useful in conjunction with the -.register .ne -register. -. -.REG .ss -The value of the parameters set by the first argument of the -.request ss -request. -. -.REG .sss -The value of the parameters set by the second argument of the -.request ss -request. +.register .ne . . .REG .u Equal to 1 in fill mode and 0 in nofill mode. @@ -3423,7 +3451,7 @@ The current year (year 2000 compliant). .REG yr Current year minus 1900. . -For Y2K compliance use register +For Y2K compliance use .register year instead. . @@ -3460,7 +3488,8 @@ be reproduced, and say which version of groff you are using. .SH AUTHORS .\" -------------------------------------------------------------------- . -Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. . .P This document is distributed under the terms of the FDL (GNU Free diff --git a/contrib/groff-1.19/man/groff_char.man b/contrib/groff-1.19/man/groff_char.man index 03fc085353..c38690039c 100644 --- a/contrib/groff-1.19/man/groff_char.man +++ b/contrib/groff-1.19/man/groff_char.man @@ -8,7 +8,7 @@ groff_char \- groff glyph names . . .\" -------------------------------------------------------------------- -.\" Legalize +.\" Legal terms .\" -------------------------------------------------------------------- . .ig @@ -17,9 +17,9 @@ groff_char(7) This file is part of groff (GNU roff). File position: /man/groff_char.man -Last update: 27 Dec 2003 +Last update: 05 Dec 2004 -Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 1989-2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. written by Werner Lemberg with additions by Bernd Warken @@ -1130,7 +1130,7 @@ square root sign. .2e OK a19 u2713 "check mark, tick" . .Pa -.I Legalize +.I Legal Symbols .P .2s co copyright u00A9 "+" .C2 rg registered u00AE "+" @@ -1357,7 +1357,8 @@ phi, and `\f(CW\e[+f]\fP' the curly variant. .SH "AUTHOR" .\" -------------------------------------------------------------------- . -Copyright \(co 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright \(co 1989-2000, 2001, 2002, 2003, +2004 Free Software Foundation, Inc. . .P This document is distributed under the terms of the FDL (GNU Free diff --git a/contrib/groff-1.19/man/groff_diff.man b/contrib/groff-1.19/man/groff_diff.man index 9254df1a3f..94873dd639 100644 --- a/contrib/groff-1.19/man/groff_diff.man +++ b/contrib/groff-1.19/man/groff_diff.man @@ -3,7 +3,7 @@ .ig groff_diff.man -Last update : 04 May 2004 +Last update : 26 Jul 2004 This file is part of groff, the GNU roff type-setting system. It is the source of the man-page groff_diff(7). @@ -1394,6 +1394,15 @@ is checked only if the particular glyph isn't found in the current font. This test happens before checking special fonts. . .TP +.BI .fcolor\ c +Set the fill color to +.IR c . +If +.I c +is missing, +switch to the previous fill color. +. +.TP .BI .fschar\ f\ c\ string Define fallback glyph .I c @@ -1440,7 +1449,11 @@ Whenever a font named .I f is referred to in an .B \[rs]f -escape sequence, or in the +escape sequence, in the +.B F +and +.B S +conditional operators, or in the .BR ft , .BR ul , .BR bd , @@ -1463,6 +1476,15 @@ then font will not be translated. . .TP +.BI .gcolor\ c +Set the glyph color to +.IR c . +If +.I c +is missing, +switch to the previous glyph color. +. +.TP .BI .hcode \ c1\ code1\ c2\ code2\|.\|.\|.\& Set the hyphenation code of character .I c1 @@ -2467,6 +2489,24 @@ there is a current diversion; this behaviour is so anomalous that it must be considered a bug. . .TP +.BI .de\ xx\ yy +.TQ +.BI .am\ xx\ yy +.TQ +.BI .ds\ xx\ yy +.TQ +.BI .as\ xx\ yy +In compatibility mode, these requests behaves similar to +.BR .de1 , +.BR .am1 , +.BR .ds1 , +and +.BR .as1 , +respectively: A `compatibility save' token is inserted at the +beginning, and a `compatibility restore' token at the end, with +compatibility mode switched on during execution. +. +.TP .BI .ev\ xx If .I xx @@ -2771,6 +2811,12 @@ arguments of the request. . .TP +.B \[rs]n[.sty] +The current font style. +. +This is a string-valued register. +. +.TP .B \[rs]n[.tabs] A string representation of the current tab settings suitable for use as an argument to the @@ -3073,6 +3119,26 @@ has been defined by the .B char request. . +.TP +.BI .if\ F f +True if font +.I f +exists. +. +.B f +is handled as if it was opened with the +.B ft +request (this is, font translation and styles are applied), without +actually mounting it. +. +.TP +.BI .if\ S s +True if style +.I s +has been registered. +. +Font translation is applied. +. .P The .B tr @@ -3089,16 +3155,11 @@ Example: .ne 6v+\n(.Vu .ft CB .nf -.Text .de foo -.Text . nop Hello, I'm `foo'. -.Text . nop I will now define `bar'. +.Text .if t \[rs]{\[rs] .Text . de bar .Text . nop Hello, I'm `bar'. .Text . . -.Text . nop Done. -.Text .. -.Text .foo -.Text .bar +.Text .\[rs]} .fi . . @@ -3461,7 +3522,7 @@ for groff. provides a .B compatibility mode that allows to process roff code written for classical -.troff +.B troff or for other implementations of roff in a consistent way. . .P diff --git a/contrib/groff-1.19/man/groff_font.man b/contrib/groff-1.19/man/groff_font.man index 759b544427..b806aac9ac 100644 --- a/contrib/groff-1.19/man/groff_font.man +++ b/contrib/groff-1.19/man/groff_font.man @@ -48,7 +48,8 @@ font format. The font files for device .I name are stored in a directory -.BI dev name. +.BI dev name\c +\&. . There are two types of file: a device description file called @@ -103,6 +104,17 @@ The horizontal resolution is machine units. . .TP +.BI image_generator\ string +Needed for +.B grohtml +only. +It specifies the program to generate PNG images from +PostScript input. +Under GNU/Linux this is usually +.I gs +but under other systems (notably cygwin) it might be set to another name. +. +.TP .BI paperlength\ n The physical vertical dimension of the output medium in machine units. . @@ -276,6 +288,13 @@ for fonts whose point size is scaled points. . .TP +.B unscaled_charwidths +Make the font handling module always return unscaled character widths. +Needed for the +.B grohtml +device. +. +.TP .B use_charnames_in_special This command indicates that troff should encode named characters inside special commands. @@ -522,9 +541,13 @@ field has the form (in one line; it is broken here for the sake of readability): . .IP -.IR width [\fB, height [\fB, depth [\fB, italic-correction +.I width\c +.RI [\fB, height\c +.RI [\fB, depth\c +.RI [\fB, italic-correction .br -.RI [\fB, left-italic-correction [\fB, subscript-correction ]]]]] +.RI [\fB, left-italic-correction\c +.RI [\fB, subscript-correction ]]]]] . .LP There must not be any spaces between these subfields. diff --git a/contrib/groff-1.19/man/groff_out.man b/contrib/groff-1.19/man/groff_out.man index 76e36badca..4469985f4d 100644 --- a/contrib/groff-1.19/man/groff_out.man +++ b/contrib/groff-1.19/man/groff_out.man @@ -3,11 +3,12 @@ .ig groff_out.5 -Last update: 15 Jul 2003 +Last update: 2 Jul 2005 This file is part of groff, the GNU roff type-setting system. -Copyright (C) 1989, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 1989, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. rewritten from scrach 2001 by Bernd Warken Permission is granted to copy, distribute and/or modify this document @@ -255,18 +256,29 @@ groff_out \- groff intermediate output format .SH DESCRIPTION .\" -------------------------------------------------------------------- . -This manual page describes the intermediate output format of the GNU +This manual page describes the +.I intermediate output +format of the GNU .BR roff (@MAN7EXT@) -text processing system. +text processing system +.BR groff (@MAN1EXT@). . This output is produced by a run of the GNU -.BR troff (@MAN1EXT@) -program before it is fed into a device postprocessor program. +.BR @g@troff (@MAN1EXT@) +program. +. +It contains already all device-specific information, but it is not yet +fed into a device postprocessor program. +. . .P -As the GNU roff processor +As the GNU +.I roff +processor .BR groff (@MAN1EXT@) -is a wrapper program around troff that automatically calls a +is a wrapper program around +.B @g@troff +that automatically calls a postprocessor, this output does not show up normally. . This is why it is called @@ -279,15 +291,19 @@ The .B groff program provides the option .B -Z -to inhibit postprocessing, such that the produced intermediate output +to inhibit postprocessing, such that the produced +.I intermediate output is sent to standard output just like calling -.B troff +.B @g@troff manually. . +. .P In this document, the term -.I troff output -describes what is output by the GNU troff program, while +.I @g@troff output +describes what is output by the GNU +.B @g@troff +program, while .I intermediate output refers to the language that is accepted by the parser that prepares this output for the postprocessors. @@ -295,14 +311,15 @@ this output for the postprocessors. This parser is smarter on whitespace and implements obsolete elements for compatibility, otherwise both formats are the same. . -The pre-groff roff versions are denoted as -.I classical -.IR troff . +Both formats can be viewed directly with +.BR \%gxditview (@MAN1EXT@). +. . .P -The main purpose of the intermediate output concept is to facilitate -the development of postprocessors by providing a common programming -interface for all devices. +The main purpose of the +.I intermediate output +concept is to facilitate the development of postprocessors by +providing a common programming interface for all devices. . It has a language of its own that is completely different from the .BR groff (@MAN7EXT@) @@ -311,18 +328,28 @@ language. While the .I groff language is a high-level programming language for text processing, the -intermediate output language is a kind of low-level assembler language -by specifying all positions on the page for writing and drawing. +.I intermediate output +language is a kind of low-level assembler language by specifying all +positions on the page for writing and drawing. +. . .P -The intermediate output produced by -.I groff +The +.RI pre- groff +.I roff +versions are denoted as +.I classical +.IR troff . +The +.I intermediate output +produced by +.B groff is fairly readable, while .I classical troff output was hard to understand because of strange habits that are still supported, but not used any longer by .I GNU -.IR troff . +.IR @g@troff . . . .\" -------------------------------------------------------------------- @@ -330,17 +357,23 @@ still supported, but not used any longer by .\" -------------------------------------------------------------------- . During the run of -.BR troff , -the roff input is cracked down to the information on what has to be -printed at what position on the intended device. +.BR @g@troff , +the +.I roff +input is cracked down to the information on what has to be printed at +what position on the intended device. . -So the language of the intermediate output format can be quite small. +So the language of the +.I intermediate output +format can be quite small. . Its only elements are commands with or without arguments. . -In this document, the term "command" always refers to the intermediate -output language, never to the roff language used for document -formatting. +In this document, the term "command" always refers to the +.I intermediate output +language, never to the +.I roff +language used for document formatting. . There are commands for positioning and text writing, for drawing, and for device controlling. @@ -354,11 +387,11 @@ for device controlling. had strange requirements on whitespace. . The -.I groff +.B groff output parser, however, is smart about whitespace by making it maximally optional. . -The whitespace characters, i.e.\& the +The whitespace characters, i.e., the .IR tab , .IR space , and @@ -368,14 +401,15 @@ characters, always have a syntactical meaning. They are never printable because spacing within the output is always done by positioning commands. . +. .P Any sequence of .I space or .I tab characters is treated as a single -.B syntactical -.BR space . +.I syntactical +.IR space . . It separates commands and arguments, but is only required when there would occur a clashing between the command code and the arguments @@ -385,7 +419,10 @@ Most often, this happens when variable length command names, arguments, argument lists, or command clusters meet. . Commands and arguments with a known, fixed length need not be -separated by syntactical space. +separated by +.I syntactical +.IR space . +. . .P A line break is a syntactical element, too. @@ -394,18 +431,22 @@ Every command argument can be followed by whitespace, a comment, or a newline character. . Thus a -.B syntactical line break -is defined to consist of optional syntactical space that is optionally -followed by a comment, and a newline character. +.I syntactical line break +is defined to consist of optional +.I syntactical space +that is optionally followed by a comment, and a newline character. +. . .P The normal commands, those for positioning and text, consist of a single letter taking a fixed number of arguments. . For historical reasons, the parser allows to stack such commands on -the same line, but fortunately, in groff intermediate output, every -command with at least one argument is followed by a line break, thus -providing excellent readability. +the same line, but fortunately, in +.I groff intermediate +.IR output , +every command with at least one argument is followed by a line break, +thus providing excellent readability. . .P The other commands \[em] those for drawing and device controlling \[em] @@ -424,10 +465,10 @@ Only one command, .RB ` x\ X ' has an argument that can stretch over several lines, all other commands must have all of their arguments on the same line as the -command, i.e.\& the arguments may not be splitted by a line break. +command, i.e., the arguments may not be splitted by a line break. . .P -Empty lines, i.e.\& lines containing only space and/or a comment, can +Empty lines, i.e., lines containing only space and/or a comment, can occur everywhere. . They are just ignored. @@ -442,7 +483,9 @@ values in a measurement unit, but the letter for the corresponding .I scale indicator is not written with the output command arguments; see .BR groff (@MAN7EXT@) -and the groff info file for more on this topic. +and the +.I groff info file +for more on this topic. . Most commands assume the scale indicator\~\c .unit u , @@ -460,6 +503,7 @@ They are defined by the parameters specified in the device's file; see .BR groff_font (@MAN5EXT@). . +. .P Note that single characters can have the eighth bit set, as can the names of fonts and special characters. @@ -468,6 +512,7 @@ The names of characters and fonts can be of arbitrary length. . A character that is to be printed will always be in the current font. . +. .P A string argument is always terminated by the next whitespace character (space, tab, or newline); an embedded @@ -483,8 +528,12 @@ argument or command. .\" -------------------------------------------------------------------- .SS "Document Parts" .\" -------------------------------------------------------------------- -A correct intermediate output document consists of two parts, the -prologue and the body. +A correct +.I intermediate output +document consists of two parts, the +.I prologue +and the +.IR body . . .P The task of the @@ -509,8 +558,10 @@ is guaranteed to consist of the following three lines (in that order): with the arguments set as outlined in the section .BR "Device Control Commands" . . -But the parser for the intermediate output format is able to swallow -additional whitespace and comments as well. +But the parser for the +.I intermediate output +format is able to swallow additional whitespace and comments as well. +. . .P The @@ -518,15 +569,20 @@ The is the main section for processing the document data. . Syntactically, it is a sequence of any commands different from the -ones used in the prologue. +ones used in the +.IR prologue . . Processing is terminated as soon as the first .B x\ stop -command is encountered; the last line of any groff intermediate output +command is encountered; the last line of any +.I groff intermediate output always contains such a command. . +. .P -Semantically, the body is page oriented. +Semantically, the +.I body +is page oriented. . A new page is started by a .BR p \~command. @@ -547,8 +603,9 @@ is done relative to the current location within this page. .SH "COMMAND REFERENCE" .\" -------------------------------------------------------------------- . -This section describes all intermediate output commands, the classical -commands as well as the +This section describes all +.I intermediate output +commands, the classical commands as well as the .I groff extensions. . @@ -566,8 +623,9 @@ Ignore any characters from the character up to the next newline character. . .P -This command is the only possibility for commenting in the intermediate -output. +This command is the only possibility for commenting in the +.I intermediate +.IR output . . Each comment can be preceded by arbitrary .I syntactical @@ -595,9 +653,10 @@ All of these commands are stackable, i.e., they can be preceded by other simple commands or followed by arbitrary other commands on the same line. . -A separating syntactical space is only necessary when two integer -arguments would clash or if the preceding argument ends with a string -argument. +A separating +.I syntactical space +is only necessary when two integer arguments would clash or if the +preceding argument ends with a string argument. . . .if (\n[@USE_ENV_STACK] == 1) \{\ @@ -622,11 +681,14 @@ stack as the actual device configuration data. Print a special groff character named .argument xxx . . -The trailing syntactical space or line break is necessary to allow -character names of arbitrary length. +The trailing +.I syntactical space +or +.I line break +is necessary to allow character names of arbitrary length. . -The character is printed at the current print position; -the character's size is read from the font file. +The character is printed at the current print position; the +character's size is read from the font file. . The print position is not changed. . @@ -661,7 +723,7 @@ Move .unit u horizontally to the right. . -.I [54] +.I [CSTR\~#54] allows negative values for .I n also, but @@ -681,12 +743,16 @@ The color components are specified as integer arguments between 0 and The number of color components and their meaning vary for the different color schemes. . -These commands are generated by the groff escape sequence +These commands are generated by the +.I groff +escape sequence .BR \*[@backslash]m . . No position changing. . -These commands are a groff extension. +These commands are a +.I groff +extension. . . .RS @@ -735,23 +801,31 @@ For example, .B N\~-193 represents an unbreakable space which has a width of 193u. . -This command is a groff extension. +This command is a +.I groff +extension. . . .command n b\ a Inform the device about a line break, but no positioning is done by this command. . -In classical troff, the integer arguments +In +.I classical +.IR troff , +the integer arguments .argument b and\~\c .argument a informed about the space before and after the current line to -make the intermediate output more human readable without performing -any action. +make the +.I intermediate output +more human readable without performing any action. . -In groff, they are just ignored, but they must be provided for -compatibility reasons. +In +.IR groff , +they are just ignored, but they must be provided for compatibility +reasons. . . .command p n @@ -778,9 +852,10 @@ scaled points (this is unit\~\c .unit z in GNU -.BR troff ). +.BR @g@troff ). . -Classical troff used the unit +.I Classical troff +used the unit .I points (\c .unit p ) @@ -790,7 +865,7 @@ instead; see section . .command t xxx \[la]white_space\[ra] .command+ t "xxx dummy_arg" \[la]white_space\[ra] -Print a word, i.e.\& a sequence of characters +Print a word, i.e., a sequence of characters .argument xxx terminated by a space character or a line break; an optional second integer argument is ignored (this allows the formatter to generate @@ -808,7 +883,9 @@ Special characters cannot be printed using this command (use the .B C command for named characters). . -This command is a groff extension; it is only used for devices whose +This command is a +.I groff +extension; it is only used for devices whose .I DESC file contains the .B tcommand @@ -828,7 +905,9 @@ character and\~\c (an integer in basic units\~\c .unit u ). -This command is a groff extension; it is only used for devices whose +This command is a +.I groff +extension; it is only used for devices whose .I DESC file contains the .B tcommand @@ -853,7 +932,7 @@ down .RI ( n is a non-negative integer). . -.I [54] +.I [CSTR\~#54] allows negative values for .I n also, but @@ -871,22 +950,28 @@ The spacing itself must be performed explicitly by a move command. .SS "Graphics Commands" .\" -------------------------------------------------------------------- . -Each graphics or drawing command in the intermediate output starts -with the letter\~\c +Each graphics or drawing command in the +.I intermediate output +starts with the letter\~\c .B D followed by one or two characters that specify a subcommand; this is followed by a fixed or variable number of integer arguments that are separated by a single space character. . A -.BR D \ command -may not be followed by another command on the same line -(apart from a comment), so each -.BR D \ command -is terminated by a syntactical line break. +.B D\c +\~command +may not be followed by another command on the same line (apart from a +comment), so each +.B D\c +\~command +is terminated by a +.I syntactical line +.IR break . +. . .P -.I troff +.B @g@troff output follows the classical spacing rules (no space between command and subcommand, all arguments are preceded by a single space character), but the parser allows optional space between the command @@ -894,6 +979,7 @@ letters and makes the space before the first argument optional. . As usual, each space can be any sequence of tab and space characters. . +. .P Some graphics commands can take a variable number of arguments. . @@ -912,6 +998,7 @@ stand for vertical distances where positive means down, negative up. . All these distances are offsets relative to the current location. . +. .P Unless indicated otherwise, each graphics command directly corresponds to a similar @@ -920,12 +1007,16 @@ to a similar escape sequence; see .BR groff (@MAN7EXT@). . +. .P -Unknown D\~commands are assumed to be device-specific. +Unknown +.B D\c +\~commands are assumed to be device-specific. . Its arguments are parsed as strings; the whole information is then sent to the postprocessor. . +. .P In the following command reference, the syntax element .I \[la]line_break\[ra] @@ -942,8 +1033,8 @@ then to offset .indexed_offset h 2 v 2 if given, etc.\& up to .indexed_offset h n v n . -This command takes a variable number of argument pairs; -the current position is moved to the terminal point of the drawn curve. +This command takes a variable number of argument pairs; the current +position is moved to the terminal point of the drawn curve. . . .Da-command @@ -967,7 +1058,9 @@ position to the rightmost point of the circle. An optional second integer argument is ignored (this allows to the formatter to generate an even number of arguments). . -This command is a groff extension. +This command is a +.I groff +extension. . . .D-command c d @@ -990,7 +1083,9 @@ and a vertical diameter of\~\c with the leftmost point at the current position; then move to the rightmost point of the ellipse. . -This command is a groff extension. +This command is a +.I groff +extension. . . .D-command e "h v" @@ -1016,7 +1111,9 @@ The color components are specified as integer arguments between 0 and The number of color components and their meaning vary for the different color schemes. . -These commands are generated by the groff escape sequences +These commands are generated by the +.I groff +escape sequences .B \*[@backslash]D'F\ .\|.\|.' and .B \*[@backslash]M @@ -1024,7 +1121,9 @@ and . No position changing. . -This command is a groff extension. +This command is a +.I groff +extension. . . .RS @@ -1091,10 +1190,13 @@ Df -1 sets all colors to blue. .RE . +. .P No position changing. . -This command is a groff extension. +This command is a +.I groff +extension. . .RE . @@ -1129,7 +1231,9 @@ As the polygon is closed, the end of drawing is the starting point, so the position doesn't change. \} . -This command is a groff extension. +This command is a +.I groff +extension. . . .D-multiarg P @@ -1145,7 +1249,9 @@ The position is changed in the same way as with .el \ No position changing. . -This command is a groff extension. +This command is a +.I groff +extension. . . .D-command t n @@ -1175,7 +1281,9 @@ Although this doesn't make sense it is kept for compatibility. .el \ No position changing. . -This command is a groff extension. +This command is a +.I groff +extension. . . .\" -------------------------------------------------------------------- @@ -1185,8 +1293,11 @@ This command is a groff extension. Each device control command starts with the letter .B x followed by a space character (optional or arbitrary space/\:tab in -groff) and a subcommand letter or word; each argument (if any) must be -preceded by a syntactical space. +.IR groff ) +and a subcommand letter or word; each argument (if any) must be +preceded by a +.I syntactical +.IR space . . All .B x @@ -1197,13 +1308,13 @@ line (except a comment). . .P The subcommand is basically a single letter, but to increase -readability, it can be written as a word, i.e.\& an arbitrary sequence +readability, it can be written as a word, i.e., an arbitrary sequence of characters terminated by the next tab, space, or newline character. . All characters of the subcommand word but the first are simply ignored. . For example, -.I troff +.B @g@troff outputs the initialization command .B x\ i as @@ -1233,12 +1344,15 @@ Use .argument name as the intended name for the current file in error reports. . -This is useful for remembering the original file name when groff uses -an internal piping mechanism. +This is useful for remembering the original file name when +.B groff +uses an internal piping mechanism. . The input file is not changed by this command. . -This command is a groff extension. +This command is a +.I groff +extension. . . .x-command f "n\ s" @@ -1259,8 +1373,8 @@ Set character height to\~\c (a positive integer in scaled points\~\c .unit z ). . -Classical troff used the unit -points (\c +.I Classical troff +used the unit points (\c .unit p ) instead; see section .BR COMPATIBILITY . @@ -1270,7 +1384,8 @@ instead; see section .xsub init Initialize device. . -This is the third command of the prologue. +This is the third command of the +.IR prologue . . . .x-command p @@ -1295,7 +1410,8 @@ are positive integers in basic units\~\c .unit u per inch. . -This is the second command of the prologue. +This is the second command of the +.IR prologue . . . .x-command S n @@ -1309,7 +1425,9 @@ degrees (an integer in basic units\~\c .x-command s .xsub stop Terminates the processing of the current file; issued as the last -command of any intermediate troff output. +command of any +.I intermediate @g@troff +.IR output . . . .x-command t @@ -1317,7 +1435,7 @@ command of any intermediate troff output. Generate trailer information, if any. . In -.IR groff , +.BR groff , this is actually just ignored. . . @@ -1331,7 +1449,8 @@ The possible device names coincide with those from the groff .B -T option. . -This is the first command of the prologue. +This is the first command of the +.IR prologue . . . .x-command u n @@ -1348,10 +1467,12 @@ is\~0, stop underlining of spaces. This is needed for the .B cu request in -.I nroff +.B @g@nroff mode and is ignored otherwise. . -This command is a groff extension. +This command is a +.I groff +extension. . . .x-command X anything @@ -1380,7 +1501,9 @@ This command is generated by the escape sequence .BR \*[@backslash]X . . -The line-continuing feature is a groff extension. +The line-continuing feature is a +.I groff +extension. . . .\" -------------------------------------------------------------------- @@ -1405,10 +1528,14 @@ Move right then print character\~\c .argument c . . +. .RS .P -In groff, arbitrary syntactical space around and within this command -is allowed to be added. +In +.IR groff , +arbitrary +.I syntactical space +around and within this command is allowed to be added. . Only when a preceding command on the same line ends with an argument of variable length a separating space is obligatory. @@ -1421,12 +1548,15 @@ spaces; this made such output almost unreadable. . .RE . +. .P For modern high-resolution devices, this command does not make sense because the width of the characters can become much larger than two decimal digits. . -In groff, this is only used for the devices +In +.BR groff , +this is only used for the devices .BR X75 , .BR X75-12 , .BR X100 , @@ -1448,7 +1578,8 @@ provide a better functionality. The .I roff postprocessors are programs that have the task to translate the -intermediate output into actions that are sent to a device. +.I intermediate output +into actions that are sent to a device. . A device can be some piece of hardware such as a printer, or a software file format suitable for graphical or text processing. @@ -1458,9 +1589,10 @@ The system provides powerful means that make the programming of such postprocessors an easy task. .P -There is a library function that parses the intermediate output and -sends the information obtained to the device via methods of a class -with a common interface for each device. +There is a library function that parses the +.I intermediate output +and sends the information obtained to the device via methods of a +class with a common interface for each device. . So a .I groff @@ -1474,22 +1606,27 @@ For details, see the reference in section .SH "EXAMPLES" .\" -------------------------------------------------------------------- . -This section presents the intermediate output generated from the same -input for three different devices. +This section presents the +.I intermediate output +generated from the same input for three different devices. . The input is the sentence .I hell world -fed into groff on the command line. +fed into +.B groff +on the command line. +. . .Topic High-resolution device .I ps . -.RS . +.RS .P .ShellCommand echo "hell world" | groff -Z -T ps . +. .P .nf .ft CB @@ -1515,6 +1652,7 @@ x stop .fi .RE . +. .P This output can be fed into the postprocessor .BR grops (@MAN1EXT@) @@ -1525,8 +1663,8 @@ to get its representation as a PostScript file. Low-resolution device .I latin1 . -.RS . +.RS .P This is similar to the high-resolution device except that the positioning is done at a minor scale. @@ -1536,41 +1674,43 @@ Some comments (lines starting with were added for clarification; they were not generated by the formatter. . +. .P .ShellCommand echo "hell world" | groff -Z -T latin1 . +. .P .nf -.I # prologue +.I "# prologue" .ft CB x T latin1 x res 240 24 40 x init -.I # begin a new page +.I "# begin a new page" .ft CB p1 -.I # font setup +.I "# font setup" .ft CB x font 1 R f1 s10 -.I # initial positioning on the page +.I "# initial positioning on the page" .ft CB V40 H0 -.I # write text `hell' +.I "# write text `hell'" .ft CB thell -.I # inform about a space, and do it by a horizontal jump +.I "# inform about a space, and do it by a horizontal jump" .ft CB wh24 -.I # write text `world' +.I "# write text `world'" .ft CB tworld -.I # announce line break, but do nothing because ... +.I "# announce line break, but do nothing because ..." .ft CB n40 0 -.I # ... the end of the document has been reached +.I "# ... the end of the document has been reached" .ft CB x trailer V2640 @@ -1579,6 +1719,7 @@ x stop .fi .RE . +. .P This output can be fed into the postprocessor .BR grotty (@MAN1EXT@) @@ -1588,16 +1729,20 @@ to get a formatted text document. .Topic Classical style output . -.RS . +.RS .P As a computer monitor has a very low resolution compared to modern -printers the intermediate output for the X\~devices can use the -jump-and-write command with its 2-digit displacements. +printers the +.I intermediate output +for the X\~devices can use the jump-and-write command with its 2-digit +displacements. +. . .P .ShellCommand echo "hell world" | groff -Z -T X100 . +. .P .nf .ft CB @@ -1610,7 +1755,7 @@ f5 s10 V16 H100 -.I # write text with old-style jump-and-write command +.I "# write text with old-style jump-and-write command" .ft CB ch07e07l03lw06w11o07r05l03dh7 n16 0 @@ -1621,13 +1766,15 @@ x stop .fi .RE . +. .P This output can be fed into the postprocessor -.BR xditview (1x) +.BR \%xditview (1x) or -.BR gxditview (@MAN1EXT@) +.BR \%gxditview (@MAN1EXT@) for displaying in\~X. . +. .P Due to the obsolete jump-and-write command, the text clusters in the classical output are almost unreadable. @@ -1637,41 +1784,55 @@ classical output are almost unreadable. .SH "COMPATIBILITY" .\" -------------------------------------------------------------------- . -The intermediate output language of the +The +.I intermediate output +language of the .I classical troff was first documented in -.IR [97] . +.IR [CSTR\~#97] . . The -.I groff -intermediate output format is compatible with this specification -except for the following features. +.I groff intermediate output +format is compatible with this specification except for the following +features. +. +. .Topic The classical quasi device independence is not yet implemented. . +. .Topic The old hardware was very different from what we use today. . -So the groff devices are also fundamentally different from the ones in -classical troff. +So the +.I groff +devices are also fundamentally different from the ones in +.I classical +.IR troff . . For example, the classical PostScript device was called .I post and had a resolution of 720 units per inch, -while groff's +while +.IR groff 's .I ps device has a resolution of 72000 units per inch. . Maybe, by implementing some rescaling mechanism similar to the classical quasi device independence, these could be integrated into -modern groff. +modern +.IR groff . +. . .Topic The B-spline command .B D~ -is correctly handled by the intermediate output parser, but the -drawing routines aren't implemented in some of the postprocessor -programs. +is correctly handled by the +.I intermediate output +parser, but the drawing routines aren't implemented in some of the +postprocessor programs. +. +. .Topic The argument of the commands .B s @@ -1679,20 +1840,28 @@ and .B x H has the implicit unit scaled point\~\c .unit z -in groff, while classical troff had point (\c +in +.IR groff , +while +.I classical troff +had point (\c .unit p ). . -This isn't an incompatibility, but a compatible extension, -for both units coincide for all devices without a +This isn't an incompatibility, but a compatible extension, for both +units coincide for all devices without a .I sizescale -parameter, including all classical and the groff text devices. +parameter, including all classical and the +.I groff +text devices. . -The few groff devices with a sizescale parameter either did -not exist, had a different name, or seem to have had a different -resolution. +The few +.I groff +devices with a sizescale parameter either did not exist, had a +different name, or seem to have had a different resolution. . So conflicts with classical devices are very unlikely. . +. .ie (\n[@STUPID_DRAWING_POSITIONING] == 1) \{\ .Topic The position changing after the commands @@ -1707,24 +1876,34 @@ kept for compatibility reasons. .Topic Temporarily, there existed some confusion on the positioning after the .B D -commands that are groff extensions. +commands that are +.I groff +extensions. . This has been clarified by establishing the classical rule for all groff drawing commands: . +. .RS .P -.I The position after a graphic object has been drawn is at its end; -.I for circles and ellipses, the "end" is at the right side. +.ft I +The position after a graphic object has been drawn is at its end; +for circles and ellipses, the "end" is at the right side. +.ft .RE . +. .P From this, the positionings specified for the drawing commands above follow quite naturally. .\} \" @STUPID_DRAWING_POSITIONING . .P -The differences between groff and classical troff are documented in +The differences between +.I groff +and +.I classical troff +are documented in .BR groff_diff (@MAN7EXT@). . . @@ -1739,7 +1918,9 @@ Device description file for device . .TP .IB \[la]groff_source_dir\[ra] /src/libs/libdriver/input.cpp -Defines the parser and postprocessor for the intermediate output. +Defines the parser and postprocessor for the +.I intermediate +.IR output . . It is located relative to the top directory of the .I groff @@ -1747,8 +1928,8 @@ source tree, e.g. .IR @GROFFSRCDIR@ . . This parser is the definitive specification of the -.I groff -intermediate output format. +.I groff intermediate output +format. . . .\" -------------------------------------------------------------------- @@ -1758,7 +1939,7 @@ intermediate output format. A reference like .BR groff (@MAN7EXT@) refers to a manual page; here -.I groff +.B groff in section\~\c .I @MAN7EXT@ of the man-page documentation system. @@ -1766,46 +1947,62 @@ of the man-page documentation system. To read the example, look up section\~@MAN7EXT@ in your desktop help system or call from the shell prompt . +. .RS .P .ShellCommand man @MAN7EXT@ groff .RE . +. .P For more details, see .BR man (1). . +. .TP .BR groff (@MAN1EXT@) option .B -Z and further readings on groff. . +. .TP .BR groff (@MAN7EXT@) for details of the .I groff language such as numerical units and escape sequences. . +. .TP .BR groff_font (@MAN5EXT@) for details on the device scaling parameters of the .B DESC file. . +. .TP -.BR troff (@MAN1EXT@) +.BR @g@troff (@MAN1EXT@) generates the device-independent intermediate output. . +. .TP .BR roff (@MAN7EXT@) for historical aspects and the general structure of roff systems. . +. .TP .BR groff_diff (@MAN7EXT@) The differences between the intermediate output in groff and classical troff. . +. +.TP +.BR gxditview (@MAN1EXT@) +Viewer for the +.I intermediate +.IR output . +. +. .P .BR \%grodvi (@MAN1EXT@), .BR \%grohtml (@MAN1EXT@), @@ -1818,6 +2015,7 @@ troff. the groff postprocessor programs. .RE . +. .P For a treatment of all aspects of the groff system within a single document, see the @@ -1832,6 +2030,7 @@ or from the shell prompt by .ShellCommand info groff .RE . +. .P The .I classical troff output language @@ -1839,6 +2038,7 @@ is described in two AT&T Bell Labs CSTR documents available on-line at .URL http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr.html \ "Bell Labs CSTR site" . . +. .TP .I [CSTR #97] .I A Typesetter-independent TROFF @@ -1848,6 +2048,7 @@ is the original and most concise documentation on the output language; see .URL http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:97.ps.gz CSTR\~#97 . . +. .TP .I [CSTR\~#54] The 1992 revision of the @@ -1858,8 +2059,7 @@ and .I Brian Kernighan isn't as concise as .I [CSTR\~#97] -regarding the output language; -see +regarding the output language; see .URL http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:54.ps.gz CSTR\~#54 . . . @@ -1867,7 +2067,9 @@ see .SH "AUTHORS" .\" -------------------------------------------------------------------- . -Copyright (C) 1989, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 1989, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +. +. .P This document is distributed under the terms of the FDL (GNU Free Documentation License) version 1.1 or later. @@ -1876,19 +2078,21 @@ You should have received a copy of the FDL with this package; it is also available on-line at the .URL http://\:www.gnu.org/\:copyleft/\:fdl.html "GNU copyleft site" . . +. .P This document is part of .IR groff , -the GNU roff distribution. +the GNU +.I roff +distribution. . It is based on a former version \- published under the GPL \- that described only parts of the .I groff extensions of the output language. . -It has been rewritten 2002 by -.MTO bwarken@mayn.de "Bernd Warken" -and is maintained by +It has been rewritten 2002 by \m[blue]Bernd Warken\m[] and is +maintained by .MTO wl@gnu.org "Werner Lemberg" . . .cp \n[groff_out_C] diff --git a/contrib/groff-1.19/man/groff_tmac.man b/contrib/groff-1.19/man/groff_tmac.man index 53ae3e73e4..030e739f14 100644 --- a/contrib/groff-1.19/man/groff_tmac.man +++ b/contrib/groff-1.19/man/groff_tmac.man @@ -14,11 +14,11 @@ groff_tmac.5 File position: /man/groff_tmac.man -Last update: 15 Jul 2003 +Last update: 27 Jul 2004 This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. written by Bernd Warken and Werner Lemberg @@ -342,6 +342,7 @@ This is the classical macro package for UNIX manual pages (man\~pages); it is quite handy and easy to use; see .BR groff_man (@MAN7EXT@). . +. .TP .B doc .TP+ @@ -453,6 +454,22 @@ orientation: . . .TP +.B pic +This file provides proper definitions for the macros +.B PS +and +.BR PE , +needed for the +.BR @g@pic (@MAN1EXT@) +preprocessor. +. +They will center each picture. +. +Use it only if your macro package doesn't provide proper definitions +for those two macros (actually, most of them already have). +. +. +.TP .B pspic A single macro is provided in this file, .BR PSPIC , @@ -512,6 +529,17 @@ option causes the graphic to be indented by\~\c (default scaling indicator is\~\c .BR m ). . +. +.TP +.B trace +Use this for tracing macro calls. +. +It is only useful for debugging. +. +See +.BR groff_trace (@MAN7EXT@) . +. +. .TP .B tty-char Overrides the definition of standard troff characters and some groff @@ -1183,7 +1211,7 @@ See the previous section for a detailed description. .SH AUTHOR .\" -------------------------------------------------------------------- . -Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. . .P This document is distributed under the terms of the FDL (GNU Free @@ -1213,10 +1241,12 @@ groff .BR info (1) file. . +. .TP .BR groff (@MAN1EXT@) an overview of the groff system. . +. .TP .BR groff_man (@MAN7EXT@), .TP+ @@ -1230,9 +1260,12 @@ an overview of the groff system. .TP+ .BR groff_ms (@MAN7EXT@), .TP+ +.BR groff_trace (@MAN7EXT@), +.TP+ .BR groff_www (@MAN7EXT@). the groff tmac macro packages. . +. .TP .BR groff (@MAN7EXT@) the groff language. diff --git a/contrib/groff-1.19/man/roff.man b/contrib/groff-1.19/man/roff.man index 79a76c7e92..50cde7b61e 100644 --- a/contrib/groff-1.19/man/roff.man +++ b/contrib/groff-1.19/man/roff.man @@ -1,7 +1,7 @@ .ig roff.man -Last update: 21 Jan 2004 +Last update: 1 Jun 2004 This file is part of groff, the GNU roff type-setting system. @@ -523,7 +523,7 @@ When you read a system manual page (man page) roff is working in the background. . Roff documents can be viewed with a native viewer called -.BR xditview (1x), +.BR \%xditview (1x), a standard program of the X window distribution, see .BR X (7x). . diff --git a/contrib/groff-1.19/src/devices/grodvi/dvi.cpp b/contrib/groff-1.19/src/devices/grodvi/dvi.cpp index fb3636ec80..201eb1c48e 100644 --- a/contrib/groff-1.19/src/devices/grodvi/dvi.cpp +++ b/contrib/groff-1.19/src/devices/grodvi/dvi.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "driver.h" #include "nonposix.h" diff --git a/contrib/groff-1.19/src/devices/grodvi/grodvi.man b/contrib/groff-1.19/src/devices/grodvi/grodvi.man index b5cc6d44de..7c74c324ba 100644 --- a/contrib/groff-1.19/src/devices/grodvi/grodvi.man +++ b/contrib/groff-1.19/src/devices/grodvi/grodvi.man @@ -1,5 +1,5 @@ .ig -Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 1989-2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -119,7 +119,7 @@ may not contain a newline. . .LP For inclusion of EPS image files, -.B grodvi +.B \-Tdvi loads .B pspic.tmac automatically, providing the diff --git a/contrib/groff-1.19/src/devices/grohtml/grohtml.man b/contrib/groff-1.19/src/devices/grohtml/grohtml.man index 054d9767f8..ec82beb707 100644 --- a/contrib/groff-1.19/src/devices/grohtml/grohtml.man +++ b/contrib/groff-1.19/src/devices/grohtml/grohtml.man @@ -1,5 +1,5 @@ .ig -Copyright (C) 1999-2000, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 1999-2000, 2001, 2002, 2003, 2004 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 @@ -16,17 +16,23 @@ versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. .. +. +. .\" 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" +. ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +. el .TP "\\$1" .. +. +. .TH GROHTML @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" . +. .SH NAME grohtml \- html driver for groff . +. .SH SYNOPSIS .nr a \n(.j .ad l @@ -34,22 +40,28 @@ grohtml \- html driver for groff .in +\w'\fBgrohtml 'u .ti \niu .B grohtml +. .de OP -.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" -.el .RB "[\ " "\\$1" "\ ]" +. ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" +. el .RB "[\ " "\\$1" "\ ]" .. -.OP \-vhlrn +. +.OP \-bhlnprv +.OP \-a \%aa-text-bits .OP \-D dir .OP \-F dir -.OP \-i resolution +.OP \-g \%aa-graphic-bits +.OP \-i \%resolution .OP \-I \%image-stem +.OP \-j \%filename .OP \-o \%image-vertical-offset -.OP \-a \%aa-text-bits -.OP \-a \%aa-graphic-bits +.OP \-s size +.OP \-S level .RI "[\ " files\|.\|.\|. "\ ]" .br .ad \na . +. .SH DESCRIPTION The .B grohtml @@ -84,13 +96,15 @@ using .BR groff 's .B \-P option. +. +. .SH OPTIONS .TP .BI \-a aa-text-bits Number of bits of antialiasing information to be used by .I text when generating png images. -The default is\~4 but legal values are 0, 1, 2, and\~4. +The default is\~4 but valid values are 0, 1, 2, and\~4. Note your version of .B gs needs to support the @@ -102,12 +116,33 @@ A value of\~0 stops .B grohtml from issuing antialiasing commands to .BR gs . +. +.TP +.B \-b +Initialize the background color to white. +. +.TP +.BI \-D dir +Inform +.B grohtml +to place all image files into directory +.IR dir . +. +.TP +.BI \-F dir +Prepend directory +.IB dir /dev name +to the search path for font and device description files; +.I name +is the name of the device, usually +.BR html . +. .TP .BI \-g aa-graphic-bits Number of bits of antialiasing information to be used by .I graphics when generating png images. -The default is\~4 but legal values are 0, 1, 2, and\~4. +The default is\~4 but valid values are 0, 1, 2, and\~4. Note your version of .B gs needs to support the @@ -119,65 +154,33 @@ A value of\~0 stops .B grohtml from issuing antialiasing commands to .BR gs . +. .TP -.B -b -Initialize the background color to white. -.TP -.B -h -Generates section and number headings by using +.B \-h +Generate section and number headings by using .BR .\|.\|. and increasing the font size, rather than using the .BI \c \&.\|.\|.\c .BI tags. -.TP -.B -l -Turns off the production of automatic section links at the top of the document. -.TP -.B -r -Turns off the automatic header and footer line (html rule). -.TP -.B -n -Generate simple heading anchors whenever a section/number heading is found. -Without the option the anchor value is the textual heading. -This can cause problems when a heading contains a `?' on some browsers -(netscape). -This flag is automatically turned on if a heading contains an image. -.TP -.B -p -Display page rendering progress to stderr. -.B grohtml -only displays a page number when an image is required. -.TP -.BI \-F dir -Prepend directory -.IB dir /dev name -to the search path for font and device description files; -.I name -is the name of the device, usually -.BR html . +. .TP .BI \-i resolution Select the resolution for all images. By default this is 100 pixels per inch. -Example: -i200 indicates 200 pixels per inch. +Example: +.B \-i200 +indicates 200 pixels per inch. +. .TP .BI \-I stem Determine the image stem name. If omitted grohtml uses -.BI grohtml- XXX +.BI \%grohtml- XXX .RI ( XXX is the process ID). -.TP -.BI \-o vertical-offset -Specify the vertical offset of images in points. -.TP -.BI \-D dir -Inform -.B grohtml -to place all image files into directory -.IR dir . +. .TP .BI \-j filename Inform @@ -185,13 +188,59 @@ Inform to split the html output into multiple files. The .I filename -is the stem and all level one section headings start a new -file, named +is the stem and specified section headings +(default is level one) start a new file, named .IR filename-n.html . +. +.TP +.B \-l +Turn off the production of automatic section links at the top of the +document. +. +.TP +.B \-n +Generate simple heading anchors whenever a section/number heading is found. +Without the option the anchor value is the textual heading. +This can cause problems when a heading contains a `?' on older versions of +some browsers (Netscape). +This flag is automatically turned on if a heading contains an image. +. +.TP +.BI \-o vertical-offset +Specify the vertical offset of images in points. +. +.TP +.B \-p +Display page rendering progress to stderr. +.B grohtml +only displays a page number when an image is required. +. +.TP +.B \-r +Turn off the automatic header and footer line (html rule). +. +.TP +.B \-s size +Set the base point size of the source file. +Thereafter when this point size is used in the source it will correspond +to the html base size. +Every increase of two points in the source will yield a +.B +tag, and conversely when a decrease of two points is seen a +.B +tag is emitted. +. +.TP +.BI \-S level +When splitting html output, +split at the heading level (or higher) defined by +.IR level . +. .TP .B \-v Print the version number. . +. .SH USAGE There are styles called .BR R , @@ -199,11 +248,15 @@ There are styles called .BR B , and .B BI -mounted at font positions 1 to 4. +mounted at font positions 1 to\~4. +. +. .SH DEPENDENCIES .B grohtml is dependent upon the png utilities -.RB ( \&\%pnmcut ,\ \%pnmcrop ,\ \%pnmtopng ) +.RB ( \%pnmcut , +.BR \%pnmcrop , +.BR \%pnmtopng ) and GhostScript .RB ( gs ). .B \%pnmtopng @@ -218,10 +271,14 @@ from the package. Images are generated whenever a table, picture, equation or line is encountered. +. +. .SH BUGS .B Grohtml has been completely redesigned and rewritten. -It is still alpha code. +It is still beta code. +. +. .SH "SEE ALSO" .BR afmtodit (@MAN1EXT@), .BR groff (@MAN1EXT@), diff --git a/contrib/groff-1.19/src/devices/grohtml/html-table.cpp b/contrib/groff-1.19/src/devices/grohtml/html-table.cpp index 3585cd317c..7e5b2dc5e4 100644 --- a/contrib/groff-1.19/src/devices/grohtml/html-table.cpp +++ b/contrib/groff-1.19/src/devices/grohtml/html-table.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. * * Gaius Mulley (gaius@glam.ac.uk) wrote html-table.cpp * @@ -24,7 +24,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "driver.h" #include "stringclass.h" @@ -32,6 +32,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "html-table.h" #include "ctype.h" #include "html.h" +#include "html-text.h" #if !defined(TRUE) # define TRUE (1==1) @@ -62,7 +63,7 @@ void tabs::delete_list (void) while (p != NULL) { q = p; p = p->next; - free(q); + delete q; } tab = NULL; } @@ -104,7 +105,7 @@ int tabs::compatible (const char *s) while ((*s != (char)0) && isspace(*s)) s++; // collect tab position - total += atoi(s); + total = atoi(s); // move over tab position while ((*s != (char)0) && !isspace(*s)) s++; @@ -149,10 +150,10 @@ void tabs::init (const char *s) while ((*s != (char)0) && !isspace(*s)) s++; if (last == NULL) { - tab = (tab_position *)malloc(sizeof(tab_position)); + tab = new tab_position; last = tab; } else { - last->next = (tab_position *)malloc(sizeof(tab_position)); + last->next = new tab_position; last = last->next; } last->alignment = align; @@ -161,6 +162,16 @@ void tabs::init (const char *s) } } +/* + * check_init - define tab stops using, s, providing none already exist. + */ + +void tabs::check_init (const char *s) +{ + if (tab == NULL) + init(s); +} + /* * find_tab - returns the tab number corresponding to the position, pos. */ @@ -228,7 +239,7 @@ void tabs::dump_tabs (void) */ html_table::html_table (simple_output *op, int linelen) - : columns(NULL), out(op), linelength(linelen), last_col(NULL), start_space(FALSE) + : out(op), columns(NULL), linelength(linelen), last_col(NULL), start_space(FALSE) { tab_stops = new tabs(); } @@ -242,7 +253,7 @@ html_table::~html_table () c = columns; while (columns != NULL) { columns = columns->next; - free(c); + delete c; c = columns; } } @@ -258,7 +269,7 @@ void html_table::remove_cols (cols *c) while (c != NULL) { p = c; c = c->next; - free(p); + delete p; } } @@ -322,15 +333,21 @@ void html_table::emit_table_header (int space) last_col = NULL; if (linelength > 0) { - int n = no_columns() + no_gaps(); - out->nl(); out->nl(); - if (space) - out->put_string("

"); - start_space = space; - out->put_string("").nl(); - out->put_string("").nl(); + + out->put_string("
put_string(">") + .nl(); + out->put_string("put_string(" style=\"margin-top: "); + out->put_string(STYLE_VERTICAL_SPACE); + out->put_string("\""); + } + out->put_string(">").nl(); } } @@ -347,6 +364,16 @@ int html_table::get_right (cols *c) return linelength; } +/* + * set_space - assigns start_space. Used to determine the + * vertical alignment when generating the next table row. + */ + +void html_table::set_space (int space) +{ + start_space = space; +} + /* * emit_col - moves onto column, n. */ @@ -461,18 +488,22 @@ void html_table::finish_row (void) void html_table::emit_new_row (void) { finish_row(); - out->put_string("").nl(); + + out->put_string("put_string(" style=\"margin-top: "); + out->put_string(STYLE_VERTICAL_SPACE); + out->put_string("\""); + } + out->put_string(">").nl(); + start_space = FALSE; last_col = NULL; } void html_table::emit_finish_table (void) { finish_row(); - // out->put_string("linelength = ").put_number(linelength).nl(); out->put_string("
"); - if (start_space) - out->put_string("

"); - out->nl(); } /* @@ -516,13 +547,23 @@ cols *html_table::get_column (int coln) int html_table::insert_column (int coln, int hstart, int hend, char align) { cols *c = columns; - cols *l = NULL; + cols *l = columns; cols *n = NULL; while (c != NULL && c->no < coln) { l = c; c = c->next; } + if (l != NULL && l->no>coln && hend > l->left) + return FALSE; // new column bumps into previous one + + l = NULL; + c = columns; + while (c != NULL && c->no < coln) { + l = c; + c = c->next; + } + if ((l != NULL) && (hstart < l->right)) return FALSE; // new column bumps into previous one @@ -530,7 +571,7 @@ int html_table::insert_column (int coln, int hstart, int hend, char align) (l->next->left < hend)) return FALSE; // new column bumps into next one - n = (cols *)malloc(sizeof(cols)); + n = new cols; if (l == NULL) { n->next = columns; columns = n; @@ -691,7 +732,6 @@ html_indent::html_indent (simple_output *op, int ind, int pageoffset, int linele in = ind; pg = pageoffset; ll = linelength; - is_used = FALSE; } html_indent::~html_indent (void) @@ -702,18 +742,33 @@ html_indent::~html_indent (void) void html_indent::begin (int space) { - if (! is_used) { - table->emit_table_header(space); - table->emit_col(1); - is_used = TRUE; + if (in + pg == 0) { + if (space) { + table->out->put_string(" style=\"margin-top: "); + table->out->put_string(STYLE_VERTICAL_SPACE); + table->out->put_string("\""); + } + } + else { + // + // we use exactly the same mechanism for calculating + // indentation as html_table::emit_col + // + table->out->put_string(" style=\"margin-left:") + .put_number(((in + pg) * 100 + ll/2) / ll - + (ll/2)/ll) + .put_string("%;"); + + if (space) { + table->out->put_string(" margin-top: "); + table->out->put_string(STYLE_VERTICAL_SPACE); + } + table->out->put_string("\""); } } void html_indent::end (void) { - if (is_used) - table->emit_finish_table(); - is_used = FALSE; } /* diff --git a/contrib/groff-1.19/src/devices/grohtml/html-table.h b/contrib/groff-1.19/src/devices/grohtml/html-table.h index c26eb6d711..dc6cebe2cd 100644 --- a/contrib/groff-1.19/src/devices/grohtml/html-table.h +++ b/contrib/groff-1.19/src/devices/grohtml/html-table.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. * * Gaius Mulley (gaius@glam.ac.uk) wrote html-table.h * @@ -24,7 +24,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "html.h" @@ -45,6 +45,7 @@ public: void clear (void); int compatible (const char *s); void init (const char *s); + void check_init (const char *s); int find_tab (int pos); int get_tab_pos (int n); char get_tab_align (int n); @@ -91,14 +92,15 @@ public: void add_indent (int indent); void finish_row (void); int get_effective_linelength (void); + void set_space (int space); tabs *tab_stops; /* tab stop positions */ + simple_output *out; private: cols *columns; /* column entries */ - simple_output *out; int linelength; cols *last_col; /* last column started */ - int start_space; /* encapsulate with

*/ + int start_space; /* have we seen a `.sp' tag? */ void remove_cols (cols *c); }; diff --git a/contrib/groff-1.19/src/devices/grohtml/html-text.cpp b/contrib/groff-1.19/src/devices/grohtml/html-text.cpp index 0a56a4ec63..b58d5e4a99 100644 --- a/contrib/groff-1.19/src/devices/grohtml/html-text.cpp +++ b/contrib/groff-1.19/src/devices/grohtml/html-text.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 + * Free Software Foundation, Inc. * * Gaius Mulley (gaius@glam.ac.uk) wrote html-text.cpp * @@ -24,7 +25,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "driver.h" #include "stringclass.h" @@ -40,6 +41,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "html-text.h" +#undef DEBUGGING // #define DEBUGGING html_text::html_text (simple_output *op) : @@ -145,18 +147,24 @@ void html_text::end_tag (tag_definition *t) case I_TAG: out->put_string(""); break; case B_TAG: out->put_string(""); break; - case P_TAG: out->put_string("

"); - if (t->indent != NULL) { + case P_TAG: if (t->indent == NULL) { + out->put_string("

"); + } else { delete t->indent; t->indent = NULL; + out->put_string("

"); } - out->nl(); out->enable_newlines(FALSE); + out->enable_newlines(FALSE); blank_para = TRUE; break; case SUB_TAG: out->put_string(""); break; case SUP_TAG: out->put_string(""); break; case TT_TAG: out->put_string(""); break; - case PRE_TAG: out->put_string(""); out->nl(); out->enable_newlines(TRUE); - blank_para = TRUE; break; + case PRE_TAG: out->put_string(""); out->enable_newlines(TRUE); + blank_para = TRUE; + if (t->indent != NULL) + delete t->indent; + t->indent = NULL; + break; case SMALL_TAG: out->put_string("
"); break; case BIG_TAG: out->put_string("
"); break; case COLOR_TAG: out->put_string("
"); break; @@ -168,19 +176,29 @@ void html_text::end_tag (tag_definition *t) /* * issue_tag - writes out an html tag with argument. + * space == 0 if no space is requested + * space == 1 if a space is requested + * space == 2 if tag should not have a space style */ -void html_text::issue_tag (const char *tagname, const char *arg) +void html_text::issue_tag (const char *tagname, const char *arg, + int space) { - if ((arg == 0) || (strlen(arg) == 0)) { + if ((arg == 0) || (strlen(arg) == 0)) out->put_string(tagname); - out->put_string(">"); - } else { + else { out->put_string(tagname); out->put_string(" "); out->put_string(arg); - out->put_string(">"); } + if (space == TRUE) { + out->put_string(" style=\"margin-top: "); + out->put_string(STYLE_VERTICAL_SPACE); + out->put_string("\""); + } + if (space == TRUE || space == FALSE) + out->put_string(" valign=\"top\""); + out->put_string(">"); } /* @@ -214,29 +232,31 @@ void html_text::start_tag (tag_definition *t) case I_TAG: issue_tag("arg1); break; case B_TAG: issue_tag("arg1); break; - case P_TAG: if (t->indent == NULL) { + case P_TAG: if (t->indent != NULL) { out->nl(); - issue_tag("\narg1); - } else { - out->nl(); +#if defined(DEBUGGING) out->simple_comment("INDENTATION"); - t->indent->begin(FALSE); - start_space = FALSE; - issue_tag("arg1); +#endif + out->put_string("\nindent->begin(start_space); + issue_tag("", (char *)t->arg1); + } else { + out->nl(); + issue_tag("\narg1, start_space); } out->enable_newlines(TRUE); break; case SUB_TAG: issue_tag("arg1); break; case SUP_TAG: issue_tag("arg1); break; case TT_TAG: issue_tag("arg1); break; - case PRE_TAG: if (t->indent != NULL) { - out->nl(); - out->simple_comment("INDENTATION"); - t->indent->begin(FALSE); - start_space = FALSE; - } - out->enable_newlines(TRUE); - out->nl(); issue_tag("arg1); + case PRE_TAG: out->enable_newlines(TRUE); + out->nl(); out->put_string("indent == NULL) + issue_tag("", (char *)t->arg1, start_space); + else { + t->indent->begin(start_space); + issue_tag("", (char *)t->arg1); + } out->enable_newlines(FALSE); break; case SMALL_TAG: issue_tag("arg1); break; case BIG_TAG: issue_tag("arg1); break; @@ -264,7 +284,7 @@ void html_text::flush_text (void) } p = stackptr; stackptr = stackptr->next; - free(p); + delete p; } lastptr = NULL; } @@ -285,6 +305,23 @@ int html_text::is_present (HTML_TAG t) return FALSE; } +/* + * uses_indent - returns TRUE if the current paragraph is using a + * html table to effect an indent. + */ + +int html_text::uses_indent (void) +{ + tag_definition *p = stackptr; + + while (p != NULL) { + if (p->indent != NULL) + return TRUE; + p = p->next; + } + return FALSE; +} + extern void stop(); /* @@ -337,7 +374,7 @@ void html_text::do_push (tag_definition *p) void html_text::push_para (HTML_TAG t, void *arg, html_indent *in) { - tag_definition *p=(tag_definition *)malloc(sizeof(tag_definition)); + tag_definition *p= new tag_definition; p->type = t; p->arg1 = arg; @@ -357,7 +394,7 @@ void html_text::push_para (HTML_TAG t) void html_text::push_para (color *c) { - tag_definition *p=(tag_definition *)malloc(sizeof(tag_definition)); + tag_definition *p = new tag_definition; p->type = COLOR_TAG; p->arg1 = NULL; @@ -407,9 +444,11 @@ void html_text::do_pre (void) done_tt(); if (is_present(P_TAG)) { html_indent *i = remove_indent(P_TAG); + int space = retrieve_para_space(); (void)done_para(); if (! is_present(PRE_TAG)) push_para(PRE_TAG, NULL, i); + start_space = space; } else if (! is_present(PRE_TAG)) push_para(PRE_TAG, NULL, NULL); dump_stack(); @@ -475,8 +514,8 @@ char *html_text::shutdown (HTML_TAG t) /* * push tag onto temp stack */ - p->next = temp; - temp = p; + p->next = temp; + temp = p; } /* @@ -495,7 +534,7 @@ char *html_text::shutdown (HTML_TAG t) lastptr = NULL; if (p->indent != NULL) delete p->indent; - free(p); + delete p; } /* @@ -508,7 +547,7 @@ char *html_text::shutdown (HTML_TAG t) push_para(temp->type, temp->arg1, temp->indent); p = temp; temp = temp->next; - free(p); + delete p; } } return arg; @@ -607,7 +646,7 @@ void html_text::check_emit_text (tag_definition *t) void html_text::do_emittext (const char *s, int length) { if ((! is_present(P_TAG)) && (! is_present(PRE_TAG))) - do_para(""); + do_para("", FALSE); if (is_present(BREAK_TAG)) { int text = remove_break(); @@ -615,13 +654,12 @@ void html_text::do_emittext (const char *s, int length) if (text) { if (is_present(PRE_TAG)) { out->nl(); - } else { + } else out->put_string("
").nl(); - } } - } else { + } else check_emit_text(stackptr); - } + out->put_string(s, length); space_emitted = FALSE; blank_para = FALSE; @@ -631,31 +669,32 @@ void html_text::do_emittext (const char *s, int length) * do_para - starts a new paragraph */ -void html_text::do_para (const char *arg, html_indent *in) +void html_text::do_para (const char *arg, html_indent *in, int space) { if (! is_present(P_TAG)) { if (is_present(PRE_TAG)) { html_indent *i = remove_indent(PRE_TAG); done_pre(); - if (i == in || in == NULL) + if ((arg == NULL || (strcmp(arg, "") == 0)) && + (i == in || in == NULL)) in = i; else delete i; } remove_sub_sup(); push_para(P_TAG, (void *)arg, in); - space_emitted = TRUE; + start_space = space; } } -void html_text::do_para (const char *arg) +void html_text::do_para (const char *arg, int space) { - do_para(arg, NULL); + do_para(arg, NULL, space); } void html_text::do_para (simple_output *op, const char *arg1, int indentation_value, int page_offset, - int line_length) + int line_length, int space) { html_indent *ind; @@ -663,7 +702,7 @@ void html_text::do_para (simple_output *op, const char *arg1, ind = NULL; else ind = new html_indent(op, indentation_value, page_offset, line_length); - do_para(arg1, ind); + do_para(arg1, ind, space); } /* @@ -672,8 +711,11 @@ void html_text::do_para (simple_output *op, const char *arg1, char *html_text::done_para (void) { + char *result; space_emitted = TRUE; - return shutdown(P_TAG); + result = shutdown(P_TAG); + start_space = FALSE; + return result; } /* @@ -696,6 +738,16 @@ html_indent *html_text::remove_indent (HTML_TAG tag) return NULL; } +/* + * remove_para_space - removes the leading space to a paragraph + * (effectively this trims off a leading `.sp' tag). + */ + +void html_text::remove_para_space (void) +{ + start_space = FALSE; +} + /* * do_space - issues an end of paragraph */ @@ -703,19 +755,14 @@ html_indent *html_text::remove_indent (HTML_TAG tag) void html_text::do_space (void) { if (is_in_pre()) { - if (blank_para) - start_space = TRUE; - else { - do_emittext("", 0); - out->nl(); - space_emitted = TRUE; - } + do_emittext("", 0); + out->force_nl(); + space_emitted = TRUE; } else { html_indent *i = remove_indent(P_TAG); - do_para(done_para(), i); + do_para(done_para(), i, TRUE); space_emitted = TRUE; - start_space = TRUE; } } @@ -725,13 +772,11 @@ void html_text::do_space (void) void html_text::do_break (void) { - if (! is_present(PRE_TAG)) { - if (emitted_text()) { - if (! is_present(BREAK_TAG)) { + if (! is_present(PRE_TAG)) + if (emitted_text()) + if (! is_present(BREAK_TAG)) push_para(BREAK_TAG); - } - } - } + space_emitted = TRUE; } @@ -757,7 +802,8 @@ int html_text::emitted_text (void) } /* - * ever_emitted_text - returns TRUE if we have ever emitted text in this paragraph. + * ever_emitted_text - returns TRUE if we have ever emitted text in this + * paragraph. */ int html_text::ever_emitted_text (void) @@ -766,7 +812,7 @@ int html_text::ever_emitted_text (void) } /* - * starts_with_space - returns TRUE if we have start this paragraph with a .sp + * starts_with_space - returns TRUE if we started this paragraph with a .sp */ int html_text::starts_with_space (void) @@ -774,20 +820,35 @@ int html_text::starts_with_space (void) return start_space; } +/* + * retrieve_para_space - returns TRUE, if the paragraph starts with + * a space and text has not yet been emitted. + * If TRUE is returned, then the, start_space, + * variable is set to FALSE. + */ + +int html_text::retrieve_para_space (void) +{ + if (start_space && blank_para) { + start_space = FALSE; + return TRUE; + } + else + return FALSE; +} + /* * emit_space - writes a space providing that text was written beforehand. */ void html_text::emit_space (void) { - if (space_emitted) { - if (is_present(PRE_TAG)) { - do_emittext(" ", 1); - } - } else { + if (is_present(PRE_TAG)) + do_emittext(" ", 1); + else out->space_or_newline(); - space_emitted = TRUE; - } + + space_emitted = TRUE; } /* @@ -818,7 +879,7 @@ void html_text::remove_def (tag_definition *t) if (l->next == NULL) lastptr = l; } - free(p); + delete p; } } @@ -838,7 +899,8 @@ void html_text::remove_tag (HTML_TAG tag) } /* - * remove_sub_sup - removes a sub or sup tag, should either exist on the stack. + * remove_sub_sup - removes a sub or sup tag, should either exist + * on the stack. */ void html_text::remove_sub_sup (void) @@ -883,7 +945,7 @@ int html_text::remove_break (void) if (l->next == NULL) lastptr = l; } - free(p); + delete p; } /* * now determine whether text was issued before
@@ -911,8 +973,9 @@ void html_text::remove_para_align (void) while (p != NULL) { if (p->type == P_TAG && p->arg1 != NULL) { html_indent *i = remove_indent(P_TAG); + int space = retrieve_para_space(); done_para(); - do_para("", i); + do_para("", i, space); return; } p = p->next; @@ -920,6 +983,25 @@ void html_text::remove_para_align (void) } } +/* + * get_alignment - returns the alignment for the paragraph. + * If no alignment was given then we return "". + */ + +char *html_text::get_alignment (void) +{ + if (is_present(P_TAG)) { + tag_definition *p=stackptr; + + while (p != NULL) { + if (p->type == P_TAG && p->arg1 != NULL) + return (char *)p->arg1; + p = p->next; + } + } + return (char *)""; +} + /* * do_small - potentially inserts a tag into the html stream. * However we check for a tag, if present then we terminate it. @@ -963,4 +1045,3 @@ void html_text::do_sub (void) { push_para(SUB_TAG); } - diff --git a/contrib/groff-1.19/src/devices/grohtml/html-text.h b/contrib/groff-1.19/src/devices/grohtml/html-text.h index aa4dd800a5..e0e3cc755c 100644 --- a/contrib/groff-1.19/src/devices/grohtml/html-text.h +++ b/contrib/groff-1.19/src/devices/grohtml/html-text.h @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 + * Free Software Foundation, Inc. * * Gaius Mulley (gaius@glam.ac.uk) wrote html-text.h * @@ -23,11 +24,13 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "html.h" #include "html-table.h" +#define STYLE_VERTICAL_SPACE "1em" + /* * html tags */ @@ -64,9 +67,10 @@ public: void do_pre (void); void do_small (void); void do_big (void); - void do_para (const char *arg); // used for no indentation + void do_para (const char *arg, int space); // used for no indentation void do_para (simple_output *op, const char *arg1, - int indentation, int pageoffset, int linelength); + int indentation, int pageoffset, int linelength, + int space); void do_sup (void); void do_sub (void); void do_space (void); @@ -87,11 +91,15 @@ public: int emitted_text (void); int ever_emitted_text (void); int starts_with_space (void); + int retrieve_para_space (void); void emit_space (void); int is_in_pre (void); + int uses_indent (void); void remove_tag (HTML_TAG tag); void remove_sub_sup (void); void remove_para_align (void); + void remove_para_space (void); + char *get_alignment (void); private: tag_definition *stackptr; /* the current paragraph state */ @@ -108,7 +116,7 @@ private: int is_present (HTML_TAG t); void end_tag (tag_definition *t); void start_tag (tag_definition *t); - void do_para (const char *arg, html_indent *in); + void do_para (const char *arg, html_indent *in, int space); void push_para (HTML_TAG t); void push_para (HTML_TAG t, void *arg, html_indent *in); void push_para (color *c); @@ -116,7 +124,7 @@ private: char *shutdown (HTML_TAG t); void check_emit_text (tag_definition *t); int remove_break (void); - void issue_tag (const char *tagname, const char *arg); + void issue_tag (const char *tagname, const char *arg, int space=2); void issue_color_begin (color *c); void remove_def (tag_definition *t); html_indent *remove_indent (HTML_TAG tag); diff --git a/contrib/groff-1.19/src/devices/grohtml/html.h b/contrib/groff-1.19/src/devices/grohtml/html.h index 18c53d7671..b14fb2c98e 100644 --- a/contrib/groff-1.19/src/devices/grohtml/html.h +++ b/contrib/groff-1.19/src/devices/grohtml/html.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #if !defined(HTML_H) # define HTML_H @@ -72,6 +72,7 @@ public: simple_output &enable_newlines(int); simple_output &check_newline(int n); simple_output &nl(void); + simple_output &force_nl(void); simple_output &space_or_newline (void); simple_output &begin_tag (void); FILE *get_file(); diff --git a/contrib/groff-1.19/src/devices/grohtml/output.cpp b/contrib/groff-1.19/src/devices/grohtml/output.cpp index 2705b9e441..f25312774a 100644 --- a/contrib/groff-1.19/src/devices/grohtml/output.cpp +++ b/contrib/groff-1.19/src/devices/grohtml/output.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. * * Gaius Mulley (gaius@glam.ac.uk) wrote output.cpp * but it owes a huge amount of ideas and raw code from @@ -25,7 +25,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "driver.h" #include "stringclass.h" @@ -67,7 +67,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ word::word (const char *w, int n) : next(0) { - s = (char *)malloc(n+1); + s = new char[n+1]; strncpy(s, w, n); s[n] = (char)0; } @@ -78,7 +78,7 @@ word::word (const char *w, int n) word::~word () { - free(s); + a_delete s; } /* @@ -252,6 +252,19 @@ simple_output &simple_output::space_or_newline (void) return *this; } +/* + * force_nl - forces a newline. + */ + +simple_output &simple_output::force_nl (void) +{ + space_or_newline(); + col += last_word.flush(fp); + FPUTC('\n', fp); + col = 0; + return *this ; +} + /* * nl - writes a newline providing that we * are not in the first column. @@ -261,10 +274,8 @@ simple_output &simple_output::nl (void) { space_or_newline(); col += last_word.flush(fp); - if (col != 0) { - FPUTC('\n', fp); - col = 0; - } + FPUTC('\n', fp); + col = 0; return *this ; } diff --git a/contrib/groff-1.19/src/devices/grohtml/post-html.cpp b/contrib/groff-1.19/src/devices/grohtml/post-html.cpp index 1da74c2a8e..1283e06139 100644 --- a/contrib/groff-1.19/src/devices/grohtml/post-html.cpp +++ b/contrib/groff-1.19/src/devices/grohtml/post-html.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 + * Free Software Foundation, Inc. * * Gaius Mulley (gaius@glam.ac.uk) wrote post-html.cpp * but it owes a huge amount of ideas and raw code from @@ -21,7 +22,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "driver.h" #include "stringclass.h" @@ -38,6 +39,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include +#include extern "C" const char *Version_string; @@ -50,8 +52,7 @@ extern "C" const char *Version_string; #define MAX_LINE_LENGTH 60 /* maximum characters we want in a line */ #define SIZE_INCREMENT 2 /* font size increment = +2 */ -#define BASE_POINT_SIZE 10 /* 10 points is the base size ie html size 3 */ -#define CENTER_TOLERANCE 2 /* how many pixels off center will we still */ +#define CENTER_TOLERANCE 2 /* how many pixels off center do we allow */ #define ANCHOR_TEMPLATE "heading" /* if simple anchor is set we use this */ #define UNICODE_DESC_START 0x80 /* all character entities above this are */ /* either encoded by their glyph names or if */ @@ -60,7 +61,7 @@ typedef enum {CENTERED, LEFT, RIGHT, INLINE} TAG_ALIGNMENT; typedef enum {col_tag, tab_tag, tab0_tag, none} colType; #undef DEBUG_TABLES - +// #define DEBUG_TABLES /* * prototypes @@ -83,6 +84,11 @@ static string job_name; /* if set then the output i static int multiple_files = FALSE; /* must we the output be divided into */ /* multiple html files, one for each */ /* heading? */ +static int base_point_size = 0; /* which troff font size maps onto html */ + /* size 3? */ +static int split_level = 2; /* what heading level to split at? */ +static string head_info; /* user supplied information to be placed */ + /* into */ /* @@ -114,7 +120,7 @@ static int max (int a, int b) static int is_intersection (int a1, int a2, int b1, int b2) { // easier to prove NOT outside limits - return( ! ((a1 > b2) || (a2 < b1)) ); + return ! ((a1 > b2) || (a2 < b1)); } /* @@ -123,7 +129,7 @@ static int is_intersection (int a1, int a2, int b1, int b2) static int is_digit (char ch) { - return( (ch >= '0') && (ch <= '9') ); + return (ch >= '0') && (ch <= '9'); } /* @@ -145,7 +151,7 @@ struct file { */ file::file (FILE *f) - : fp(f), next(0), new_output_file(FALSE), + : fp(f), next(NULL), new_output_file(FALSE), require_links(FALSE), output_file_name("") { } @@ -174,7 +180,7 @@ private: */ files::files () - : head(0), tail(0), ptr(0) + : head(NULL), tail(NULL), ptr(NULL) { } @@ -187,7 +193,7 @@ FILE *files::get_file (void) if (ptr) return ptr->fp; else - return 0; + return NULL; } /* @@ -205,7 +211,7 @@ void files::start_of_list (void) void files::move_next (void) { - if (ptr != 0) + if (ptr != NULL) ptr = ptr->next; } @@ -215,7 +221,7 @@ void files::move_next (void) void files::add_new_file (FILE *f) { - if (head == 0) { + if (head == NULL) { head = new file(f); tail = head; } else { @@ -313,7 +319,7 @@ struct style { }; style::style() - : f(0) + : f(NULL) { } @@ -349,14 +355,14 @@ struct char_block { }; char_block::char_block() -: buffer(NULL), used(0), next(0) +: buffer(NULL), used(0), next(NULL) { } char_block::char_block(int length) -: used(0), next(0) +: used(0), next(NULL) { - buffer = (char *)malloc(max(length, char_block::SIZE)); + buffer = new char[max(length, char_block::SIZE)]; if (buffer == NULL) fatal("out of memory error"); } @@ -364,7 +370,7 @@ char_block::char_block(int length) char_block::~char_block() { if (buffer != NULL) - free(buffer); + a_delete buffer; } class char_buffer { @@ -379,13 +385,13 @@ private: }; char_buffer::char_buffer() -: head(0), tail(0) +: head(NULL), tail(NULL) { } char_buffer::~char_buffer() { - while (head != 0) { + while (head != NULL) { char_block *temp = head; head = head->next; delete temp; @@ -400,7 +406,7 @@ char *char_buffer::add_string (const char *s, unsigned int length) if (s == NULL || length == 0) return NULL; - if (tail == 0) { + if (tail == NULL) { tail = new char_block(length+1); head = tail; } else { @@ -425,7 +431,7 @@ char *char_buffer::add_string (const char *s, unsigned int length) // and return start of new string - return( &tail->buffer[old_used] ); + return &tail->buffer[old_used]; } char *char_buffer::add_string (const string &s) @@ -466,7 +472,10 @@ public: int is_in (void); int is_po (void); int is_ti (void); + int is_ll (void); int is_ce (void); + int is_tl (void); + int is_eo_tl (void); int is_eol_ce (void); int is_col (void); int is_tab (void); @@ -476,6 +485,7 @@ public: int is_tab_te (void); int is_nf (void); int is_fi (void); + int is_eo_h (void); int get_arg (void); int get_tab_args (char *align); @@ -516,7 +526,7 @@ text_glob::text_glob (style *s, const char *str, int length, } text_glob::text_glob () - : text_string(0), text_length(0), minv(-1), minh(-1), maxv(-1), maxh(-1), + : text_string(NULL), text_length(0), minv(-1), minh(-1), maxv(-1), maxh(-1), is_tag(FALSE), is_special(FALSE), is_line(FALSE), thickness(0), tab(NULL) { } @@ -649,7 +659,7 @@ int text_glob::is_a_tag (void) int text_glob::is_eol (void) { - return( is_tag && (strcmp(text_string, "html-tag:eol") == 0) ); + return is_tag && (strcmp(text_string, "devtag:.eol") == 0); } /* @@ -658,26 +668,56 @@ int text_glob::is_eol (void) int text_glob::is_eol_ce (void) { - return( is_tag && (strcmp(text_string, "html-tag:eol.ce") == 0) ); + return is_tag && (strcmp(text_string, "devtag:eol.ce") == 0); } +/* + * is_tl - returns TRUE if glob contains the tag .tl + */ + +int text_glob::is_tl (void) +{ + return is_tag && (strcmp(text_string, "devtag:.tl") == 0); +} + +/* + * is_eo_tl - returns TRUE if glob contains the tag eo.tl + */ + +int text_glob::is_eo_tl (void) +{ + return is_tag && (strcmp(text_string, "devtag:.eo.tl") == 0); +} /* - * is_nf - returns TRUE if glob contains the tag .nf + * is_nf - returns TRUE if glob contains the tag .fi 0 */ int text_glob::is_nf (void) { - return( is_tag && (strcmp(text_string, "html-tag:.nf") == 0) ); + return is_tag && (strncmp(text_string, "devtag:.fi", + strlen("devtag:.fi")) == 0) && + (get_arg() == 0); } /* - * is_fi - returns TRUE if glob contains the tag .fi + * is_fi - returns TRUE if glob contains the tag .fi 1 */ int text_glob::is_fi (void) { - return( is_tag && (strcmp(text_string, "html-tag:.fi") == 0) ); + return( is_tag && (strncmp(text_string, "devtag:.fi", + strlen("devtag:.fi")) == 0) && + (get_arg() == 1) ); +} + +/* + * is_eo_h - returns TRUE if glob contains the tag .eo.h + */ + +int text_glob::is_eo_h (void) +{ + return is_tag && (strcmp(text_string, "devtag:.eo.h") == 0); } /* @@ -686,7 +726,8 @@ int text_glob::is_fi (void) int text_glob::is_ce (void) { - return( is_tag && (strcmp(text_string, "html-tag:.ce") == 0) ); + return is_tag && (strncmp(text_string, "devtag:.ce", + strlen("devtag:.ce")) == 0); } /* @@ -695,7 +736,8 @@ int text_glob::is_ce (void) int text_glob::is_in (void) { - return( is_tag && (strncmp(text_string, "html-tag:.in ", strlen("html-tag:.in ")) == 0) ); + return is_tag && (strncmp(text_string, "devtag:.in ", + strlen("devtag:.in ")) == 0); } /* @@ -704,7 +746,8 @@ int text_glob::is_in (void) int text_glob::is_po (void) { - return( is_tag && (strncmp(text_string, "html-tag:.po ", strlen("html-tag:.po ")) == 0) ); + return is_tag && (strncmp(text_string, "devtag:.po ", + strlen("devtag:.po ")) == 0); } /* @@ -713,7 +756,18 @@ int text_glob::is_po (void) int text_glob::is_ti (void) { - return( is_tag && (strncmp(text_string, "html-tag:.ti ", strlen("html-tag:.ti ")) == 0) ); + return is_tag && (strncmp(text_string, "devtag:.ti ", + strlen("devtag:.ti ")) == 0); +} + +/* + * is_ll - returns TRUE if glob contains the tag .ll + */ + +int text_glob::is_ll (void) +{ + return is_tag && (strncmp(text_string, "devtag:.ll ", + strlen("devtag:.ll ")) == 0); } /* @@ -722,7 +776,8 @@ int text_glob::is_ti (void) int text_glob::is_col (void) { - return( is_tag && (strncmp(text_string, "html-tag:.col", strlen("html-tag:.col")) == 0) ); + return is_tag && (strncmp(text_string, "devtag:.col", + strlen("devtag:.col")) == 0); } /* @@ -731,7 +786,7 @@ int text_glob::is_col (void) int text_glob::is_tab_ts (void) { - return( is_tag && (strcmp(text_string, "html-tag:.tab-ts") == 0) ); + return is_tag && (strcmp(text_string, "devtag:.tab-ts") == 0); } /* @@ -740,7 +795,7 @@ int text_glob::is_tab_ts (void) int text_glob::is_tab_te (void) { - return( is_tag && (strcmp(text_string, "html-tag:.tab-te") == 0) ); + return is_tag && (strcmp(text_string, "devtag:.tab-te") == 0); } /* @@ -749,7 +804,8 @@ int text_glob::is_tab_te (void) int text_glob::is_ta (void) { - return( is_tag && (strncmp(text_string, "html-tag:.ta ", strlen("html-tag:.ta ")) == 0) ); + return is_tag && (strncmp(text_string, "devtag:.ta ", + strlen("devtag:.ta ")) == 0); } /* @@ -758,7 +814,8 @@ int text_glob::is_ta (void) int text_glob::is_tab (void) { - return( is_tag && (strncmp(text_string, "html-tag:tab ", strlen("html-tag:tab ")) == 0) ); + return is_tag && (strncmp(text_string, "devtag:tab ", + strlen("devtag:tab ")) == 0); } /* @@ -767,7 +824,8 @@ int text_glob::is_tab (void) int text_glob::is_tab0 (void) { - return( is_tag && (strncmp(text_string, "html-tag:tab0", strlen("html-tag:tab0")) == 0) ); + return is_tag && (strncmp(text_string, "devtag:tab0", + strlen("devtag:tab0")) == 0); } /* @@ -789,14 +847,14 @@ int text_glob::is_auto_img (void) int text_glob::is_br (void) { - return( is_a_tag() && ((strcmp ("html-tag:.br", text_string) == 0) || - (strncmp("html-tag:.sp", text_string, 11) == 0) || - (strcmp ("html-tag:.ce", text_string) == 0)) ); + return is_a_tag() && ((strcmp ("devtag:.br", text_string) == 0) || + (strncmp("devtag:.sp", text_string, + strlen("devtag:.sp")) == 0)); } int text_glob::get_arg (void) { - if (strncmp("html-tag:", text_string, strlen("html-tag:")) == 0) { + if (strncmp("devtag:", text_string, strlen("devtag:")) == 0) { const char *p = text_string; while ((*p != (char)0) && (!isspace(*p))) @@ -816,7 +874,7 @@ int text_glob::get_arg (void) int text_glob::get_tab_args (char *align) { - if (strncmp("html-tag:", text_string, strlen("html-tag:")) == 0) { + if (strncmp("devtag:", text_string, strlen("devtag:")) == 0) { const char *p = text_string; // firstly the alignment C|R|L @@ -858,10 +916,11 @@ html_table *text_glob::get_table (void) } /* - * the class and methods used to construct ordered double linked lists. - * In a previous implementation we used templates via #include "ordered-list.h", - * but this does assume that all C++ compilers can handle this feature. Pragmatically - * it is safer to assume this is not the case. + * the class and methods used to construct ordered double linked + * lists. In a previous implementation we used templates via + * #include "ordered-list.h", but this does assume that all C++ + * compilers can handle this feature. Pragmatically it is safer to + * assume this is not the case. */ struct element_list { @@ -977,7 +1036,8 @@ int list::is_less (element_list *a, element_list *b) } /* - * add - adds a datum to the list in the order specified by the region position. + * add - adds a datum to the list in the order specified by the + * region position. */ void list::add (text_glob *in, int line_number, int min_vertical, int min_horizontal, int max_vertical, int max_horizontal) @@ -986,7 +1046,13 @@ void list::add (text_glob *in, int line_number, int min_vertical, int min_horizo element_list *t = new element_list(in, line_number, min_vertical, min_horizontal, max_vertical, max_horizontal); element_list *last; - if (head == 0) { +#if 0 + fprintf(stderr, "[%s %d,%d,%d,%d] ", + in->text_string, min_vertical, min_horizontal, max_vertical, max_horizontal); + fflush(stderr); +#endif + + if (head == NULL) { head = t; tail = t; ptr = t; @@ -995,9 +1061,8 @@ void list::add (text_glob *in, int line_number, int min_vertical, int min_horizo } else { last = tail; - while ((last != head) && (is_less(t, last))) { + while ((last != head) && (is_less(t, last))) last = last->left; - } if (is_less(t, last)) { t->right = last; @@ -1005,9 +1070,8 @@ void list::add (text_glob *in, int line_number, int min_vertical, int min_horizo t->left = last->left; last->left = t; // now check for a new head - if (last == head) { + if (last == head) head = t; - } } else { // add t beyond last t->right = last->right; @@ -1015,9 +1079,8 @@ void list::add (text_glob *in, int line_number, int min_vertical, int min_horizo last->right->left = t; last->right = t; // now check for a new tail - if (last == tail) { + if (last == tail) tail = t; - } } } } @@ -1032,22 +1095,20 @@ void list::sub_move_right (void) element_list *t=ptr->right; if (head == tail) { - head = 0; - if (tail != 0) { + head = NULL; + if (tail != NULL) delete tail; - } - tail = 0; - ptr = 0; + + tail = NULL; + ptr = NULL; } else { - if (head == ptr) { + if (head == ptr) head = head->right; - } - if (tail == ptr) { + if (tail == ptr) tail = tail->left; - } ptr->left->right = ptr->right; ptr->right->left = ptr->left; - ptr=t; + ptr = t; } } @@ -1075,7 +1136,7 @@ void list::start_from_tail (void) int list::is_empty (void) { - return( head == 0 ); + return head == NULL; } /* @@ -1084,7 +1145,7 @@ int list::is_empty (void) int list::is_equal_to_tail (void) { - return( ptr == tail ); + return ptr == tail; } /* @@ -1093,7 +1154,7 @@ int list::is_equal_to_tail (void) int list::is_equal_to_head (void) { - return( ptr == head ); + return ptr == head; } /* @@ -1120,7 +1181,7 @@ void list::move_right (void) text_glob* list::get_data (void) { - return( ptr->datum ); + return ptr->datum; } /* @@ -1131,11 +1192,10 @@ text_glob* list::get_data (void) text_glob* list::move_right_get_data (void) { ptr = ptr->right; - if (ptr == head) { - return( 0 ); - } else { - return( ptr->datum ); - } + if (ptr == head) + return NULL; + else + return ptr->datum; } /* @@ -1146,11 +1206,10 @@ text_glob* list::move_right_get_data (void) text_glob* list::move_left_get_data (void) { ptr = ptr->left; - if (ptr == tail) { - return( 0 ); - } else { - return( ptr->datum ); - } + if (ptr == tail) + return NULL; + else + return ptr->datum; } /* @@ -1162,7 +1221,7 @@ void list::insert (text_glob *in) if (is_empty()) fatal("list must not be empty if we are inserting data"); else { - if (ptr == 0) + if (ptr == NULL) ptr = head; element_list *t = new element_list(in, ptr->lineno, ptr->minv, ptr->minh, ptr->maxv, ptr->maxh); @@ -1205,7 +1264,8 @@ public: void add_and_encode (style *s, const string &str, int line_number, int min_vertical, int min_horizontal, - int max_vertical, int max_horizontal); + int max_vertical, int max_horizontal, + int is_tag); void add_line (style *s, int line_number, int x1, int y1, int x2, int y2, @@ -1267,7 +1327,8 @@ void page::add_tag (style *s, const string &str, if (str.length() > 0) { text_glob *g; - if (strncmp((str+'\0').contents(), "html-tag:.auto-image", 20) == 0) { + if (strncmp((str+'\0').contents(), "devtag:.auto-image", + strlen("devtag:.auto-image")) == 0) { g = new text_glob(); g->text_glob_auto_image(s, buffer.add_string(str), str.length(), min_vertical, min_horizontal, max_vertical, max_horizontal); @@ -1327,7 +1388,8 @@ static char *to_unicode (unsigned int ch) void page::add_and_encode (style *s, const string &str, int line_number, int min_vertical, int min_horizontal, - int max_vertical, int max_horizontal) + int max_vertical, int max_horizontal, + int is_tag) { string html_string; char *html_glyph; @@ -1366,9 +1428,18 @@ void page::add_and_encode (style *s, const string &str, } if (html_string.length() > 0) { text_glob *g=new text_glob(); - g->text_glob_special(s, buffer.add_string(html_string), html_string.length(), - min_vertical, min_horizontal, max_vertical, max_horizontal); - glyphs.add(g, line_number, min_vertical, min_horizontal, max_vertical, max_horizontal); + if (is_tag) + g->text_glob_tag(s, buffer.add_string(html_string), + html_string.length(), + min_vertical, min_horizontal, + max_vertical, max_horizontal); + else + g->text_glob_special(s, buffer.add_string(html_string), + html_string.length(), + min_vertical, min_horizontal, + max_vertical, max_horizontal); + glyphs.add(g, line_number, min_vertical, + min_horizontal, max_vertical, max_horizontal); } } @@ -1532,6 +1603,337 @@ void header_desc::write_headings (FILE *f, int force) } } +struct assert_pos { + assert_pos *next; + const char *val; + const char *id; +}; + +class assert_state { +public: + assert_state (); + ~assert_state (); + + void addx (const char *c, const char *i, const char *v, + const char *f, const char *l); + void addy (const char *c, const char *i, const char *v, + const char *f, const char *l); + void build(const char *c, const char *v, + const char *f, const char *l); + void check_br (int br); + void check_ce (int ce); + void check_fi (int fi); + void check_sp (int sp); + void reset (void); + +private: + int check_br_flag; + int check_ce_flag; + int check_fi_flag; + int check_sp_flag; + const char *val_br; + const char *val_ce; + const char *val_fi; + const char *val_sp; + const char *file_br; + const char *file_ce; + const char *file_fi; + const char *file_sp; + const char *line_br; + const char *line_ce; + const char *line_fi; + const char *line_sp; + + assert_pos *xhead; + assert_pos *yhead; + + void add (assert_pos **h, + const char *c, const char *i, const char *v, + const char *f, const char *l); + void compare(assert_pos *t, + const char *v, const char *f, const char *l); + void close (const char *c); + void set (const char *c, const char *v, + const char *f, const char *l); + void check_value (const char *s, int v, const char *name, + const char *f, const char *l, int *flag); + int check_value_error (int c, int v, const char *s, + const char *name, + const char *f, const char *l, int flag); +}; + +assert_state::assert_state () +{ + reset(); + val_br = NULL; + val_ce = NULL; + val_fi = NULL; + val_sp = NULL; + file_br = NULL; + file_ce = NULL; + file_fi = NULL; + file_sp = NULL; + line_br = NULL; + line_ce = NULL; + line_fi = NULL; + line_sp = NULL; + xhead = NULL; + yhead = NULL; +} + +assert_state::~assert_state () +{ + assert_pos *t; + + while (xhead != NULL) { + t = xhead; + xhead = xhead->next; + a_delete (char *)t->val; + a_delete (char *)t->id; + delete t; + } + while (yhead != NULL) { + t = yhead; + yhead = yhead->next; + a_delete (char *)t->val; + a_delete (char *)t->id; + delete t; + } +} + +void assert_state::reset (void) +{ + check_br_flag = 0; + check_ce_flag = 0; + check_fi_flag = 0; + check_sp_flag = 0; +} + +void assert_state::add (assert_pos **h, + const char *c, const char *i, const char *v, + const char *f, const char *l) +{ + assert_pos *t = *h; + + while (t != NULL) { + if (strcmp(t->id, i) == 0) + break; + t = t->next; + } + if (t != NULL && v != NULL && (v[0] != '=')) + compare(t, v, f, l); + else { + if (t == NULL) { + t = new assert_pos; + t->next = *h; + (*h) = t; + } + if (v == NULL || v[0] != '=') { + if (f == NULL) + f = "stdin"; + if (l == NULL) + l = ""; + if (v == NULL) + v = "no value at all"; + fprintf(stderr, "%s:%s:error in assert format of id=%s expecting value to be prefixed with an `=' got %s\n", + f, l, i, v); + } + t->id = i; + t->val = v; + a_delete (char *)c; + a_delete (char *)f; + a_delete (char *)l; + } +} + +void assert_state::addx (const char *c, const char *i, const char *v, + const char *f, const char *l) +{ + add(&xhead, c, i, v, f, l); +} + +void assert_state::addy (const char *c, const char *i, const char *v, + const char *f, const char *l) +{ + add(&yhead, c, i, v, f, l); +} + +void assert_state::compare(assert_pos *t, + const char *v, const char *f, const char *l) +{ + const char *s=t->val; + + while ((*v) == '=') + v++; + while ((*s) == '=') + s++; + + if (strcmp(v, s) != 0) { + if (f == NULL) + f = "stdin"; + if (l == NULL) + l = ""; + fprintf(stderr, "%s:%s: grohtml assertion failed at id%s expecting %s and was given %s\n", + f, l, t->id, s, v); + } +} + +void assert_state::close (const char *c) +{ + if (strcmp(c, "sp") == 0) + check_sp_flag = 0; + else if (strcmp(c, "br") == 0) + check_br_flag = 0; + else if (strcmp(c, "fi") == 0) + check_fi_flag = 0; + else if (strcmp(c, "nf") == 0) + check_fi_flag = 0; + else if (strcmp(c, "ce") == 0) + check_ce_flag = 0; + else + fprintf(stderr, "internal error: unrecognised tag in grohtml (%s)\n", c); +} + +const char *replace_negate_str (const char *before, char *after) +{ + if (before != NULL) + a_delete (char *)before; + + if (strlen(after) > 0) { + int d = atoi(after); + + if (d < 0 || d > 1) { + fprintf(stderr, "expecting nf/fi value to be 0 or 1 not %d\n", d); + d = 0; + } + if (d == 0) + after[0] = '1'; + else + after[0] = '0'; + after[1] = (char)0; + } + return after; +} + +const char *replace_str (const char *before, const char *after) +{ + if (before != NULL) + a_delete (char *)before; + return after; +} + +void assert_state::set (const char *c, const char *v, + const char *f, const char *l) +{ + if (l == NULL) + l = ""; + if (f == NULL) + f = "stdin"; + + // fprintf(stderr, "%s:%s:setting %s to %s\n", f, l, c, v); + if (strcmp(c, "sp") == 0) { + check_sp_flag = 1; + val_sp = replace_str(val_sp, strsave(v)); + file_sp = replace_str(file_sp, strsave(f)); + line_sp = replace_str(line_sp, strsave(l)); + } else if (strcmp(c, "br") == 0) { + check_br_flag = 1; + val_br = replace_str(val_br, strsave(v)); + file_br = replace_str(file_br, strsave(f)); + line_br = replace_str(line_br, strsave(l)); + } else if (strcmp(c, "fi") == 0) { + check_fi_flag = 1; + val_fi = replace_str(val_fi, strsave(v)); + file_fi = replace_str(file_fi, strsave(f)); + line_fi = replace_str(line_fi, strsave(l)); + } else if (strcmp(c, "nf") == 0) { + check_fi_flag = 1; + val_fi = replace_negate_str(val_fi, strsave(v)); + file_fi = replace_str(file_fi, strsave(f)); + line_fi = replace_str(line_fi, strsave(l)); + } else if (strcmp(c, "ce") == 0) { + check_ce_flag = 1; + val_ce = replace_str(val_ce, strsave(v)); + file_ce = replace_str(file_ce, strsave(f)); + line_ce = replace_str(line_ce, strsave(l)); + } +} + +/* + * build - builds the troff state assertion. + * see tmac/www.tmac for cmd examples. + */ + +void assert_state::build (const char *c, const char *v, + const char *f, const char *l) +{ + if (c[0] == '{') + set(&c[1], v, f, l); + if (c[0] == '}') + close(&c[1]); +} + +int assert_state::check_value_error (int c, int v, const char *s, + const char *name, + const char *f, const char *l, int flag) +{ + if (! c) { + if (f == NULL) + f = "stdin"; + if (l == NULL) + l = ""; + fprintf(stderr, "%s:%s:grohtml (troff state) assertion failed, expected %s to be %s but found it to contain %d\n", + f, l, name, s, v); + return 0; + } + return flag; +} + +void assert_state::check_value (const char *s, int v, const char *name, + const char *f, const char *l, int *flag) +{ + if (strncmp(s, "<=", 2) == 0) + *flag = check_value_error(v <= atoi(&s[2]), v, s, name, f, l, *flag); + else if (strncmp(s, ">=", 2) == 0) + *flag = check_value_error(v >= atoi(&s[2]), v, s, name, f, l, *flag); + else if (strncmp(s, "==", 2) == 0) + *flag = check_value_error(v == atoi(&s[2]), v, s, name, f, l, *flag); + else if (strncmp(s, "!=", 2) == 0) + *flag = check_value_error(v != atoi(&s[2]), v, s, name, f, l, *flag); + else if (strncmp(s, "<", 1) == 0) + *flag = check_value_error(v < atoi(&s[2]), v, s, name, f, l, *flag); + else if (strncmp(s, ">", 1) == 0) + *flag = check_value_error(v > atoi(&s[2]), v, s, name, f, l, *flag); + else if (strncmp(s, "=", 1) == 0) + *flag = check_value_error(v == atoi(&s[1]), v, s, name, f, l, *flag); + else + *flag = check_value_error(v == atoi(s), v, s, name, f, l, *flag); +} + +void assert_state::check_sp (int sp) +{ + if (check_sp_flag) + check_value(val_sp, sp, "sp", file_sp, line_sp, &check_sp_flag); +} + +void assert_state::check_fi (int fi) +{ + if (check_fi_flag) + check_value(val_fi, fi, "fi", file_fi, line_fi, &check_fi_flag); +} + +void assert_state::check_br (int br) +{ + if (check_br_flag) + check_value(val_br, br, "br", file_br, line_br, &check_br_flag); +} + +void assert_state::check_ce (int ce) +{ + if (check_ce_flag) + check_value(val_ce, ce, "ce", file_ce, line_ce, &check_ce_flag); +} + class html_printer : public printer { files file_list; simple_output html; @@ -1575,12 +1977,26 @@ class html_printer : public printer { int max_linelength; int linelength; int pageoffset; - int indentation; - int prev_indent; + int troff_indent; + int device_indent; + int temp_indent; int pointsize; int vertical_spacing; int line_number; color *background; + int seen_indent; + int next_indent; + int seen_pageoffset; + int next_pageoffset; + int seen_linelength; + int next_linelength; + int seen_center; + int next_center; + int seen_space; + int seen_break; + int current_column; + int row_space; + assert_state as; void flush_sbuf (); void set_style (const style &); @@ -1606,15 +2022,18 @@ class html_printer : public printer { void start_font (const char *name); void end_font (const char *name); int is_font_courier (font *f); + int is_line_start (int nf); int is_courier_until_eol (void); void start_size (int from, int to); void do_font (text_glob *g); void do_center (char *arg); + void do_check_center (void); void do_break (void); + void do_space (char *arg); void do_eol (void); void do_eol_ce (void); void do_title (void); - void do_fill (int on); + void do_fill (char *arg); void do_heading (char *arg); void write_header (void); void determine_header_level (int level); @@ -1632,6 +2051,7 @@ class html_printer : public printer { void do_links (void); void do_flush (void); void do_job_name (char *name); + void do_head (char *name); void insert_split_file (void); int is_in_middle (int left, int right); void do_sup_or_sub (text_glob *g); @@ -1667,6 +2087,14 @@ class html_printer : public printer { void write_navigation (const string &top, const string &prev, const string &next, const string ¤t); void emit_link (const string &to, const char *name); + int get_troff_indent (void); + void restore_troff_indent (void); + void handle_assertion (int minv, int minh, int maxv, int maxh, const char *s); + void handle_state_assertion (text_glob *g); + void do_end_para (text_glob *g); + int round_width (int x); + void handle_tag_within_title (text_glob *g); + void writeHeadMetaStyle (void); // ADD HERE public: @@ -1674,10 +2102,13 @@ public: ~html_printer (); void set_char (int i, font *f, const environment *env, int w, const char *name); void set_numbered_char(int num, const environment *env, int *widthp); + int set_char_and_width(const char *nm, const environment *env, + int *widthp, font **f); void draw (int code, int *p, int np, const environment *env); void begin_page (int); void end_page (int); void special (char *arg, const environment *env, char type); + void devtag (char *arg, const environment *env, char type); font *make_font (const char *); void end_of_line (); }; @@ -1743,6 +2174,24 @@ void html_printer::emit_line (text_glob *) html.put_string("
"); } +/* + * restore_troff_indent - is called when we have temporarily shutdown + * indentation (typically done when we have + * centered an image). + */ + +void html_printer::restore_troff_indent (void) +{ + troff_indent = next_indent; + if (troff_indent > 0) { + /* + * force device indentation + */ + device_indent = 0; + do_indent(get_troff_indent(), pageoffset, linelength); + } +} + /* * emit_raw - writes the raw html information directly to the device. */ @@ -1754,17 +2203,20 @@ void html_printer::emit_raw (text_glob *g) determine_space(g); current_paragraph->do_emittext(g->text_string, g->text_length); } else { + int space = current_paragraph->retrieve_para_space() || seen_space; + current_paragraph->done_para(); + shutdown_table(); switch (next_tag) { case CENTERED: - current_paragraph->do_para("align=center"); + current_paragraph->do_para("align=center", space); break; case LEFT: - current_paragraph->do_para(&html, "align=left", indentation, pageoffset, linelength); + current_paragraph->do_para(&html, "align=left", get_troff_indent(), pageoffset, linelength, space); break; case RIGHT: - current_paragraph->do_para(&html, "align=right", indentation, pageoffset, linelength); + current_paragraph->do_para(&html, "align=right", get_troff_indent(), pageoffset, linelength, space); break; default: fatal("unknown enumeration"); @@ -1773,39 +2225,37 @@ void html_printer::emit_raw (text_glob *g) current_paragraph->done_para(); next_tag = INLINE; supress_sub_sup = TRUE; - if (indentation > 0) { - /* - * restore indentation - */ - int newin = indentation; - indentation = 0; - do_indent(newin, pageoffset, linelength); - } + seen_space = FALSE; + restore_troff_indent(); } } +/* + * handle_tag_within_title - handle a limited number of tags within + * the context of a table. Those tags which + * set values rather than generate spaces + * and paragraphs. + */ + +void html_printer::handle_tag_within_title (text_glob *g) +{ + if (g->is_in() || g->is_ti() || g->is_po() || g->is_ce() || g->is_ll() + || g->is_fi() || g->is_nf()) + troff_tag(g); +} + /* * do_center - handle the .ce commands from troff. */ void html_printer::do_center (char *arg) { - int n = atoi(arg); - current_paragraph->do_break(); - - if (n > 0) { - current_paragraph->done_para(); - supress_sub_sup = TRUE; - current_paragraph->do_para("align=center"); - end_center += n; - } else { - end_center = 0; - current_paragraph->remove_para_align(); - } + next_center = atoi(arg); + seen_center = TRUE; } /* - * do_centered_image - set a flag such that the next html-tag is + * do_centered_image - set a flag such that the next devtag is * placed inside a centered paragraph. */ @@ -1815,7 +2265,7 @@ void html_printer::do_centered_image (void) } /* - * do_right_image - set a flag such that the next html-tag is + * do_right_image - set a flag such that the next devtag is * placed inside a right aligned paragraph. */ @@ -1825,7 +2275,7 @@ void html_printer::do_right_image (void) } /* - * do_left_image - set a flag such that the next html-tag is + * do_left_image - set a flag such that the next devtag is * placed inside a left aligned paragraph. */ @@ -1863,7 +2313,8 @@ static string &generate_img_src (const char *filename) filename++; } if (exists(filename)) - *s += string(""; + *s += string(""; return *s; } @@ -1912,7 +2363,6 @@ void html_printer::do_title (void) { text_glob *t; int removed_from_head; - int eol_ce = 0; if (page_number == 1) { int found_title_start = FALSE; @@ -1934,24 +2384,16 @@ void html_printer::do_title (void) page_contents->glyphs.sub_move_right(); /* move onto next word */ removed_from_head = ((!page_contents->glyphs.is_empty()) && (page_contents->glyphs.is_equal_to_head())); - } else if (t->is_eol_ce()) { - /* process the eol associated with .ce - */ - eol_ce++; - page_contents->glyphs.sub_move_right(); /* move onto next word */ - } else if (t->is_eol()) { + } else if (t->is_eo_tl()) { /* end of title found */ title.has_been_found = TRUE; - outstanding_eol(eol_ce); return; } else if (t->is_a_tag()) { - /* end of title found, but move back so that we read this tag and process it - */ - page_contents->glyphs.move_left(); /* move backwards to last word */ - title.has_been_found = TRUE; - outstanding_eol(eol_ce); - return; + handle_tag_within_title(t); + page_contents->glyphs.sub_move_right(); /* move onto next word */ + removed_from_head = ((!page_contents->glyphs.is_empty()) && + (page_contents->glyphs.is_equal_to_head())); } else if (found_title_start) { title.text += " " + string(t->text_string, t->text_length); page_contents->glyphs.sub_move_right(); /* move onto next word */ @@ -1965,15 +2407,17 @@ void html_printer::do_title (void) removed_from_head = ((!page_contents->glyphs.is_empty()) && (page_contents->glyphs.is_equal_to_head())); } - } while ((! page_contents->glyphs.is_equal_to_head()) || (removed_from_head)); + } while ((! page_contents->glyphs.is_equal_to_head()) || + (removed_from_head)); } - outstanding_eol(eol_ce); } } void html_printer::write_header (void) { if (! header.header_buffer.empty()) { + int space = current_paragraph->retrieve_para_space() || seen_space; + if (header.header_level > 7) { header.header_level = 7; } @@ -2001,7 +2445,7 @@ void html_printer::write_header (void) // lastly we generate a tag - html.nl().put_string("do_para(&html, "", indentation, pageoffset, linelength); + current_paragraph->do_para(&html, "", get_troff_indent(), pageoffset, linelength, space); } } @@ -2075,7 +2519,7 @@ void html_printer::determine_header_level (int level) } } header.header_level = level+1; - if (header.header_level == 2) { + if (header.header_level >= 2 && header.header_level <= split_level) { header.no_of_level_one_headings++; insert_split_file(); } @@ -2088,39 +2532,46 @@ void html_printer::determine_header_level (int level) void html_printer::do_heading (char *arg) { text_glob *g; - text_glob *l = 0; int level=atoi(arg); + int horiz; header.header_buffer.clear(); page_contents->glyphs.move_right(); if (! page_contents->glyphs.is_equal_to_head()) { g = page_contents->glyphs.get_data(); + horiz = g->minh; do { if (g->is_auto_img()) { string img=generate_img_src((char *)(g->text_string + 20)); if (! img.empty()) { simple_anchors = TRUE; // we cannot use full heading anchors with images - if (l != 0) + if (horiz < g->minh) header.header_buffer += " "; - l = g; header.header_buffer += img; } - } else if (! (g->is_a_line() || g->is_a_tag())) { + } + else if (g->is_in() || g->is_ti() || g->is_po() || g->is_ce() || g->is_ll()) + troff_tag(g); + else if (g->is_fi()) + fill_on = 1; + else if (g->is_nf()) + fill_on = 0; + else if (! (g->is_a_line() || g->is_a_tag())) { /* - * we ignore tag commands when constructing a heading + * we ignore the other tag commands when constructing a heading */ - if (l != 0) + if (horiz < g->minh) header.header_buffer += " "; - l = g; + horiz = g->maxh; header.header_buffer += string(g->text_string, g->text_length); } page_contents->glyphs.move_right(); g = page_contents->glyphs.get_data(); } while ((! page_contents->glyphs.is_equal_to_head()) && - (! g->is_br())); + (! g->is_eo_h())); } determine_header_level(level); @@ -2170,8 +2621,8 @@ void html_printer::do_linelength (char *arg) if (max_linelength == -1) max_linelength = atoi(arg); - if (fill_on) - do_indent(indentation, pageoffset, atoi(arg)); + next_linelength = atoi(arg); + seen_linelength = TRUE; } /* @@ -2180,8 +2631,20 @@ void html_printer::do_linelength (char *arg) void html_printer::do_pageoffset (char *arg) { - if (fill_on) - do_indent(indentation, atoi(arg), linelength); + next_pageoffset = atoi(arg); + seen_pageoffset = TRUE; +} + +/* + * get_troff_indent - returns the indent value. + */ + +int html_printer::get_troff_indent (void) +{ + if (end_tempindent > 0) + return temp_indent; + else + return troff_indent; } /* @@ -2190,8 +2653,8 @@ void html_printer::do_pageoffset (char *arg) void html_printer::do_indentation (char *arg) { - if (fill_on) - do_indent(atoi(arg), pageoffset, linelength); + next_indent = atoi(arg); + seen_indent = TRUE; } /* @@ -2201,9 +2664,12 @@ void html_printer::do_indentation (char *arg) void html_printer::do_tempindent (char *arg) { if (fill_on) { - end_tempindent = 1; - prev_indent = indentation; - do_indent(atoi(arg), pageoffset, linelength); + /* + * we set the end_tempindent to 2 as the first .br + * activates the .ti and the second terminates it. + */ + end_tempindent = 2; + temp_indent = atoi(arg); } } @@ -2229,17 +2695,19 @@ void html_printer::shutdown_table (void) void html_printer::do_indent (int in, int pageoff, int linelen) { - if ((indentation != -1) && - (pageoffset+indentation != in+pageoff)) { - + if ((device_indent != -1) && + (pageoffset+device_indent != in+pageoff)) { + + int space = current_paragraph->retrieve_para_space() || seen_space; current_paragraph->done_para(); - indentation = in; + device_indent = in; pageoffset = pageoff; if (linelen <= max_linelength) linelength = linelen; - current_paragraph->do_para(&html, "", indentation, pageoffset, max_linelength); + current_paragraph->do_para(&html, "", device_indent, + pageoffset, max_linelength, space); } } @@ -2258,24 +2726,56 @@ void html_printer::do_verticalspacing (char *arg) void html_printer::do_pointsize (char *arg) { - pointsize = atoi(arg); + /* + * firstly check to see whether this point size is really associated with a .tl tag + */ + + if (! page_contents->glyphs.is_empty()) { + text_glob *g = page_contents->glyphs.get_data(); + text_glob *t = page_contents->glyphs.get_data(); + + while (t->is_a_tag() && (! page_contents->glyphs.is_equal_to_head())) { + if (t->is_tl()) { + /* + * found title therefore ignore this .ps tag + */ + while (t != g) { + page_contents->glyphs.move_left(); + t = page_contents->glyphs.get_data(); + } + return; + } + page_contents->glyphs.move_right(); + t = page_contents->glyphs.get_data(); + } + /* + * move back to original position + */ + while (t != g) { + page_contents->glyphs.move_left(); + t = page_contents->glyphs.get_data(); + } + /* + * collect legal pointsize + */ + pointsize = atoi(arg); + } } /* * do_fill - records whether troff has requested that text be filled. */ -void html_printer::do_fill (int on) +void html_printer::do_fill (char *arg) { - current_paragraph->do_break(); - output_hpos = indentation+pageoffset; + int on = atoi(arg); + + output_hpos = get_troff_indent()+pageoffset; supress_sub_sup = TRUE; if (fill_on != on) { if (on) - current_paragraph->do_para(""); - else - current_paragraph->do_pre(); + current_paragraph->do_para("", seen_space); fill_on = on; } } @@ -2292,7 +2792,53 @@ void html_printer::do_eol (void) current_paragraph->do_break(); } } - output_hpos = indentation+pageoffset; + output_hpos = get_troff_indent()+pageoffset; +} + +/* + * do_check_center - checks to see whether we have seen a `.ce' tag + * during the previous line. + */ + +void html_printer::do_check_center(void) +{ + if (seen_center) { + seen_center = FALSE; + if (next_center > 0) { + if (end_center == 0) { + int space = current_paragraph->retrieve_para_space() || seen_space; + current_paragraph->done_para(); + supress_sub_sup = TRUE; + current_paragraph->do_para("align=center", space); + } else + if (strcmp("align=center", + current_paragraph->get_alignment()) != 0) { + /* + * different alignment, so shutdown paragraph and open + * a new one. + */ + int space = current_paragraph->retrieve_para_space() || seen_space; + current_paragraph->done_para(); + supress_sub_sup = TRUE; + current_paragraph->do_para("align=center", space); + } else + /* + * same alignment, if we have emitted text then issue a break. + */ + if (current_paragraph->emitted_text()) + current_paragraph->do_break(); + } else + /* + * next_center == 0 + */ + if (end_center > 0) { + seen_space = seen_space || current_paragraph->retrieve_para_space(); + current_paragraph->done_para(); + supress_sub_sup = TRUE; + current_paragraph->do_para("", seen_space); + } + end_center = next_center; + } } /* @@ -2329,7 +2875,7 @@ void html_printer::do_flush (void) void html_printer::do_links (void) { - current_paragraph->done_para(); + html.end_line(); // flush line auto_links = FALSE; /* from now on only emit under user request */ file_list.add_new_file(xtmpfile()); file_list.set_links_required(); @@ -2373,20 +2919,66 @@ void html_printer::do_job_name (char *name) } } +/* + * do_head - adds a string to head_info which is to be included into + * the section of the html document. + */ + +void html_printer::do_head (char *name) +{ + head_info += string(name); + head_info += '\n'; +} + /* * do_break - handles the ".br" request and also - * undoes an outstanding ".ti" command. + * undoes an outstanding ".ti" command + * and calls indent if the indentation + * related registers have changed. */ void html_printer::do_break (void) { + int seen_temp_indent = FALSE; + current_paragraph->do_break(); if (end_tempindent > 0) { end_tempindent--; - if (end_tempindent == 0) - do_indent(prev_indent, pageoffset, linelength); + if (end_tempindent > 0) + seen_temp_indent = TRUE; + } + if (seen_indent || seen_pageoffset || seen_linelength || seen_temp_indent) { + if (seen_indent && (! seen_temp_indent)) + troff_indent = next_indent; + if (! seen_pageoffset) + next_pageoffset = pageoffset; + if (! seen_linelength) + next_linelength = linelength; + do_indent(get_troff_indent(), next_pageoffset, next_linelength); + } + seen_indent = seen_temp_indent; + seen_linelength = FALSE; + seen_pageoffset = FALSE; + do_check_center(); + output_hpos = get_troff_indent()+pageoffset; + supress_sub_sup = TRUE; +} + +void html_printer::do_space (char *arg) +{ + int n = atoi(arg); + + seen_space = atoi(arg); + as.check_sp(seen_space); +#if 0 + if (n>0 && table) + table->set_space(TRUE); +#endif + + while (n>0) { + current_paragraph->do_space(); + n--; } - output_hpos = indentation+pageoffset; supress_sub_sup = TRUE; } @@ -2399,14 +2991,24 @@ void html_printer::do_tab_ts (text_glob *g) html_table *t = g->get_table(); if (t != NULL) { + current_column = 0; current_paragraph->done_pre(); current_paragraph->done_para(); + current_paragraph->remove_para_space(); +#if defined(DEBUG_TABLES) html.simple_comment("TABS"); +#endif t->set_linelength(max_linelength); t->add_indent(pageoffset); +#if 0 + t->emit_table_header(seen_space); +#else t->emit_table_header(FALSE); + row_space = current_paragraph->retrieve_para_space() || seen_space; + seen_space = FALSE; +#endif } table = t; @@ -2420,23 +3022,16 @@ void html_printer::do_tab_te (void) { if (table) { current_paragraph->done_para(); + current_paragraph->remove_para_space(); table->emit_finish_table(); } table = NULL; - - if (indentation > 0) { - /* - * restore indentation - */ - int newin = indentation; - indentation = 0; - do_indent(newin, pageoffset, linelength); - } + restore_troff_indent(); } /* - * do_tab - handle the "html-tag:tab" tag + * do_tab - handle the "devtag:tab" tag */ void html_printer::do_tab (char *s) @@ -2445,7 +3040,7 @@ void html_printer::do_tab (char *s) while (isspace(*s)) s++; s++; - int col = table->find_column(atoi(s) + pageoffset + indentation); + int col = table->find_column(atoi(s) + pageoffset + get_troff_indent()); if (col > 0) { current_paragraph->done_para(); table->emit_col(col); @@ -2454,13 +3049,13 @@ void html_printer::do_tab (char *s) } /* - * do_tab0 - handle the "html-tag:tab0" tag + * do_tab0 - handle the "devtag:tab0" tag */ void html_printer::do_tab0 (void) { if (table) { - int col = table->find_column(pageoffset+indentation); + int col = table->find_column(pageoffset+get_troff_indent()); if (col > 0) { current_paragraph->done_para(); table->emit_col(col); @@ -2475,33 +3070,40 @@ void html_printer::do_tab0 (void) void html_printer::do_col (char *s) { if (table) { + if (atoi(s) < current_column) + row_space = seen_space; + + current_column = atoi(s); current_paragraph->done_para(); - table->emit_col(atoi(s)); + table->emit_col(current_column); + current_paragraph->do_para("", row_space); } } /* - * troff_tag - processes the troff tag and manipulates the troff state machine. + * troff_tag - processes the troff tag and manipulates the troff + * state machine. */ void html_printer::troff_tag (text_glob *g) { /* - * firstly skip over html-tag: + * firstly skip over devtag: */ - char *t=(char *)g->text_string+9; + char *t=(char *)g->text_string+strlen("devtag:"); - if (g->is_eol()) { + if (strncmp(g->text_string, "html

:", strlen("html

:")) == 0) { + do_end_para(g); + } else if (g->is_eol()) { do_eol(); } else if (g->is_eol_ce()) { do_eol_ce(); } else if (strncmp(t, ".sp", 3) == 0) { - if (g->get_arg() > 0) - current_paragraph->do_space(); - else - current_paragraph->do_break(); - supress_sub_sup = TRUE; + char *a = (char *)t+3; + do_space(a); } else if (strncmp(t, ".br", 3) == 0) { + seen_break = 1; + as.check_br(1); do_break(); } else if (strcmp(t, ".centered-image") == 0) { do_centered_image(); @@ -2516,7 +3118,7 @@ void html_printer::troff_tag (text_glob *g) char *a = (char *)t+3; supress_sub_sup = TRUE; do_center(a); - } else if (strncmp(t, ".tl", 3) == 0) { + } else if (g->is_tl()) { supress_sub_sup = TRUE; title.with_h1 = TRUE; do_title(); @@ -2525,9 +3127,8 @@ void html_printer::troff_tag (text_glob *g) title.with_h1 = FALSE; do_title(); } else if (strncmp(t, ".fi", 3) == 0) { - do_fill(TRUE); - } else if (strncmp(t, ".nf", 3) == 0) { - do_fill(FALSE); + char *a = (char *)t+3; + do_fill(a); } else if ((strncmp(t, ".SH", 3) == 0) || (strncmp(t, ".NH", 3) == 0)) { char *a = (char *)t+3; do_heading(a); @@ -2554,6 +3155,9 @@ void html_printer::troff_tag (text_glob *g) } else if (strncmp(t, ".job-name", 9) == 0) { char *a = (char *)t+9; do_job_name(a); + } else if (strncmp(t, ".head", 5) == 0) { + char *a = (char *)t+5; + do_head(a); } else if (strcmp(t, ".no-auto-rule") == 0) { auto_rule = FALSE; } else if (strcmp(t, ".tab-ts") == 0) { @@ -2577,7 +3181,8 @@ void html_printer::troff_tag (text_glob *g) int html_printer::is_in_middle (int left, int right) { - return( abs(abs(left-pageoffset) - abs(pageoffset+linelength-right)) <= CENTER_TOLERANCE ); + return( abs(abs(left-pageoffset) - abs(pageoffset+linelength-right)) + <= CENTER_TOLERANCE ); } /* @@ -2592,17 +3197,31 @@ void html_printer::flush_globs (void) page_contents->glyphs.start_from_head(); do { g = page_contents->glyphs.get_data(); +#if 0 + fprintf(stderr, "[%s:%d:%d:%d:%d]", + g->text_string, g->minv, g->minh, g->maxv, g->maxh) ; + fflush(stderr); +#endif + + handle_state_assertion(g); if (strcmp(g->text_string, "XXXXXXX") == 0) stop(); - if (g->is_a_tag()) { + if (g->is_a_tag()) troff_tag(g); - } else if (g->is_a_line()) { + else if (g->is_a_line()) emit_line(g); - } else { + else { + as.check_sp(seen_space); + as.check_br(seen_break); + seen_break = 0; + seen_space = 0; emit_html(g); } + + as.check_fi(fill_on); + as.check_ce(end_center); /* * after processing the title (and removing it) the glyph list might be empty */ @@ -2621,11 +3240,16 @@ void html_printer::flush_globs (void) int html_printer::calc_nf (text_glob *g, int nf) { if (g != NULL) { - if (g->is_fi()) + if (g->is_fi()) { + as.check_fi(TRUE); return FALSE; - if (g->is_nf()) + } + if (g->is_nf()) { + as.check_fi(FALSE); return TRUE; + } } + as.check_fi(! nf); return nf; } @@ -2636,16 +3260,15 @@ int html_printer::calc_nf (text_glob *g, int nf) void html_printer::calc_po_in (text_glob *g, int nf) { if (g->is_in()) - indentation = g->get_arg(); + troff_indent = g->get_arg(); else if (g->is_po()) pageoffset = g->get_arg(); else if (g->is_ti()) { - prev_indent = indentation; - indentation = g->get_arg(); - end_tempindent = 1; - } else if (g->is_br() && ((end_tempindent > 0) || (nf && g->is_eol()))) { - end_tempindent = 0; - indentation = prev_indent; + temp_indent = g->get_arg(); + end_tempindent = 2; + } else if (g->is_br() || (nf && g->is_eol())) { + if (end_tempindent > 0) + end_tempindent--; } } @@ -2656,13 +3279,15 @@ void html_printer::calc_po_in (text_glob *g, int nf) int html_printer::next_horiz_pos (text_glob *g, int nf) { - int next = -1; + int next = -1; if ((g != NULL) && (g->is_br() || (nf && g->is_eol()))) if (! page_contents->glyphs.is_empty()) { page_contents->glyphs.move_right_get_data(); - if (g == NULL) + if (g == NULL) { page_contents->glyphs.start_from_head(); + as.reset(); + } else { next = g->minh; page_contents->glyphs.move_left(); @@ -2682,7 +3307,7 @@ text_glob *html_printer::insert_tab_ts (text_glob *where) page_contents->glyphs.move_to(where); page_contents->glyphs.move_left(); - page_contents->insert_tag(string("html-tag:.tab-ts")); // tab table start + page_contents->insert_tag(string("devtag:.tab-ts")); // tab table start page_contents->glyphs.move_right(); start_of_table = page_contents->glyphs.get_data(); page_contents->glyphs.move_to(old_pos); @@ -2702,7 +3327,7 @@ void html_printer::insert_tab_te (void) while (page_contents->glyphs.get_data()->is_a_tag()) page_contents->glyphs.move_left(); - page_contents->insert_tag(string("html-tag:.tab-te")); // tab table end + page_contents->insert_tag(string("devtag:.tab-te")); // tab table end while (g != page_contents->glyphs.get_data()) page_contents->glyphs.move_right(); page_contents->dump_page(); @@ -2718,7 +3343,7 @@ void html_printer::insert_tab_0 (text_glob *where) page_contents->glyphs.move_to(where); page_contents->glyphs.move_left(); - page_contents->insert_tag(string("html-tag:tab0")); // tab0 start of line + page_contents->insert_tag(string("devtag:tab0")); // tab0 start of line page_contents->glyphs.move_right(); page_contents->glyphs.move_to(old_pos); } @@ -2760,10 +3385,11 @@ void html_printer::remove_courier_tabs (void) if (! page_contents->glyphs.is_empty()) { page_contents->glyphs.start_from_head(); + as.reset(); line_start = TRUE; do { g = page_contents->glyphs.get_data(); - + handle_state_assertion(g); nf = calc_nf(g, nf); if (line_start) { @@ -2773,7 +3399,8 @@ void html_printer::remove_courier_tabs (void) } } - line_start = g->is_br() || g->is_nf() || g->is_fi() || (nf && g->is_eol()); + // line_start = g->is_br() || g->is_nf() || g->is_fi() || (nf && g->is_eol()); + line_start = g->is_br() || (nf && g->is_eol()); page_contents->glyphs.move_right(); } while (! page_contents->glyphs.is_equal_to_head()); } @@ -2789,10 +3416,11 @@ void html_printer::insert_tab0_foreach_tab (void) if (! page_contents->glyphs.is_empty()) { page_contents->glyphs.start_from_head(); + as.reset(); start_of_line = page_contents->glyphs.get_data(); do { g = page_contents->glyphs.get_data(); - + handle_state_assertion(g); nf = calc_nf(g, nf); if (g->is_tab()) @@ -2805,6 +3433,7 @@ void html_printer::insert_tab0_foreach_tab (void) do { page_contents->glyphs.move_right(); g = page_contents->glyphs.get_data(); + handle_state_assertion(g); nf = calc_nf(g, nf); if (page_contents->glyphs.is_equal_to_head()) { if (seen_tab && !seen_col) @@ -2872,7 +3501,8 @@ void html_printer::add_table_end (const char * } /* - * lookahead_for_tables - checks for .col tags and inserts table start/end tags + * lookahead_for_tables - checks for .col tags and inserts table + * start/end tags */ void html_printer::lookahead_for_tables (void) @@ -2900,7 +3530,28 @@ void html_printer::lookahead_for_tables (void) page_contents->dump_page(); if (! page_contents->glyphs.is_empty()) { page_contents->glyphs.start_from_head(); + as.reset(); g = page_contents->glyphs.get_data(); + if (g->is_br()) { + g = page_contents->glyphs.move_right_get_data(); + handle_state_assertion(g); + if (page_contents->glyphs.is_equal_to_head()) { + if (tbl != NULL) { + delete tbl; + tbl = NULL; + } + return; + } + + start_of_line = g; + seen_text = FALSE; + ncol = 0; + left = next_horiz_pos(g, nf); + if (found_col) + last = g; + found_col = FALSE; + } + do { #if defined(DEBUG_TABLES) fprintf(stderr, " [") ; @@ -2936,10 +3587,10 @@ void html_printer::lookahead_for_tables (void) colmin = g->get_tab_args(&align); align = 'L'; // for now as 'C' and 'R' are broken ncol = tbl->find_tab_column(colmin); - colmin += pageoffset + indentation; + colmin += pageoffset + get_troff_indent(); colmax = tbl->get_tab_pos(ncol+1); if (colmax > 0) - colmax += pageoffset + indentation; + colmax += pageoffset + get_troff_indent(); } else if (g->is_tab0()) { if (type_of_col == col_tag && start_of_table != NULL) { page_contents->glyphs.move_left(); @@ -2956,7 +3607,7 @@ void html_printer::lookahead_for_tables (void) type_of_col = tab0_tag; ncol = 1; colmin = 0; - colmax = tbl->get_tab_pos(2) + pageoffset + indentation; + colmax = tbl->get_tab_pos(2) + pageoffset + get_troff_indent(); } else if (! g->is_a_tag()) update_min_max(type_of_col, &colmin, &colmax, g); @@ -2971,10 +3622,15 @@ void html_printer::lookahead_for_tables (void) } else if (g->is_ce() && (start_of_table != NULL)) { add_table_end("*** CE ***"); start_of_table->remember_table(tbl); + tbl = new html_table(&html, -1); start_of_table = NULL; last = NULL; } else if (g->is_ta()) { tab_defs = g->text_string; + + if (type_of_col == col_tag) + tbl->tab_stops->check_init(tab_defs); + if (!tbl->tab_stops->compatible(tab_defs)) { if (start_of_table != NULL) { add_table_end("*** TABS ***"); @@ -3008,16 +3664,19 @@ void html_printer::lookahead_for_tables (void) * move onto next glob, check whether we are starting a new line */ g = page_contents->glyphs.move_right_get_data(); + handle_state_assertion(g); if (g == NULL) { if (found_col) { page_contents->glyphs.start_from_head(); + as.reset(); last = g; found_col = FALSE; } } else if (g->is_br() || (nf && g->is_eol())) { do { g = page_contents->glyphs.move_right_get_data(); + handle_state_assertion(g); nf = calc_nf(g, nf); } while ((g != NULL) && (g->is_br() || (nf && g->is_eol()))); start_of_line = g; @@ -3046,13 +3705,15 @@ void html_printer::lookahead_for_tables (void) page_contents->insert_tag(string("*** LAST ***")); } } - if (tbl != NULL) + if (tbl != NULL) { delete tbl; + tbl = NULL; + } // and reset the registers pageoffset = old_pageoffset; - indentation = 0; - prev_indent = 0; + troff_indent = 0; + temp_indent = 0; end_tempindent = 0; } @@ -3099,6 +3760,37 @@ void html_printer::determine_space (text_glob *g) } } +/* + * is_line_start - returns TRUE if we are at the start of a line. + */ + +int html_printer::is_line_start (int nf) +{ + int line_start = FALSE; + int result = TRUE; + text_glob *orig = page_contents->glyphs.get_data(); + text_glob *g; + + if (! page_contents->glyphs.is_equal_to_head()) { + do { + page_contents->glyphs.move_left(); + g = page_contents->glyphs.get_data(); + result = g->is_a_tag(); + if (g->is_fi()) + nf = FALSE; + else if (g->is_nf()) + nf = TRUE; + line_start = g->is_col() || g->is_br() || (nf && g->is_eol()); + } while ((!line_start) && (result)); + /* + * now restore our previous position. + */ + while (page_contents->glyphs.get_data() != orig) + page_contents->glyphs.move_right(); + } + return result; +} + /* * is_font_courier - returns TRUE if the font, f, is courier. */ @@ -3110,7 +3802,7 @@ int html_printer::is_font_courier (font *f) return( (fontname != 0) && (fontname[0] == 'C') ); } - return( FALSE ); + return FALSE; } /* @@ -3159,24 +3851,28 @@ void html_printer::start_font (const char *fontname) current_paragraph->do_bold(); current_paragraph->do_italic(); } else if (strcmp(fontname, "CR") == 0) { - if ((! fill_on) && (is_courier_until_eol())) { + if ((! fill_on) && (is_courier_until_eol()) && + is_line_start(! fill_on)) { current_paragraph->do_pre(); } current_paragraph->do_tt(); } else if (strcmp(fontname, "CI") == 0) { - if ((! fill_on) && (is_courier_until_eol())) { + if ((! fill_on) && (is_courier_until_eol()) && + is_line_start(! fill_on)) { current_paragraph->do_pre(); } current_paragraph->do_tt(); current_paragraph->do_italic(); } else if (strcmp(fontname, "CB") == 0) { - if ((! fill_on) && (is_courier_until_eol())) { + if ((! fill_on) && (is_courier_until_eol()) && + is_line_start(! fill_on)) { current_paragraph->do_pre(); } current_paragraph->do_tt(); current_paragraph->do_bold(); } else if (strcmp(fontname, "CBI") == 0) { - if ((! fill_on) && (is_courier_until_eol())) { + if ((! fill_on) && (is_courier_until_eol()) && + is_line_start(! fill_on)) { current_paragraph->do_pre(); } current_paragraph->do_tt(); @@ -3328,6 +4024,23 @@ void html_printer::do_sup_or_sub (text_glob *g) } } +/* + * do_end_para - writes out the html text after shutting down the + * current paragraph. + */ + +void html_printer::do_end_para (text_glob *g) +{ + do_font(g); + current_paragraph->done_para(); + current_paragraph->remove_para_space(); + html.put_string(g->text_string+9); + output_vpos = g->minv; + output_hpos = g->maxh; + output_vpos_max = g->maxv; + supress_sub_sup = FALSE; +} + /* * emit_html - write out the html text */ @@ -3352,6 +4065,7 @@ void html_printer::flush_sbuf() if (sbuf.length() > 0) { int r=font::res; // resolution of the device set_style(sbuf_style); + if (overstrike_detected && (! is_bold(sbuf_style.f))) { font *bold_font = make_bold(sbuf_style.f); if (bold_font != NULL) @@ -3462,11 +4176,24 @@ html_printer::html_printer() max_linelength(-1), linelength(0), pageoffset(0), - indentation(0), - prev_indent(0), - pointsize(0), + troff_indent(0), + device_indent(0), + temp_indent(0), + pointsize(base_point_size), line_number(0), - background(default_background) + background(default_background), + seen_indent(FALSE), + next_indent(0), + seen_pageoffset(FALSE), + next_pageoffset(0), + seen_linelength(FALSE), + next_linelength(0), + seen_center(FALSE), + next_center(0), + seen_space(0), + seen_break(0), + current_column(0), + row_space(FALSE) { file_list.add_new_file(xtmpfile()); html.set_file(file_list.get_file()); @@ -3618,11 +4345,13 @@ int html_printer::overstrike(int idx, const char *name, const environment *env, } /* - * set_char - adds a character into the sbuf if it is a continuation with the previous - * word otherwise flush the current sbuf and add character anew. + * set_char - adds a character into the sbuf if it is a continuation + * with the previous word otherwise flush the current sbuf + * and add character anew. */ -void html_printer::set_char(int i, font *f, const environment *env, int w, const char *name) +void html_printer::set_char(int i, font *f, const environment *env, + int w, const char *name) { style sty(f, env->size, env->height, env->slant, env->fontno, *env->col); if (sty.slant != 0) { @@ -3636,6 +4365,8 @@ void html_printer::set_char(int i, font *f, const environment *env, int w, const return; flush_sbuf(); + if (sbuf_style.f == NULL) + sbuf_style = sty; add_to_sbuf(i, name); sbuf_end_hpos = env->hpos + w; sbuf_start_hpos = env->hpos; @@ -3681,11 +4412,44 @@ void html_printer::set_numbered_char(int num, const environment *env, w = nbsp_width; else w = f->get_width(i, env->size); + w = round_width(w); if (widthp) *widthp = w; set_char(i, f, env, w, 0); } +int html_printer::set_char_and_width(const char *nm, const environment *env, + int *widthp, font **f) +{ + int i = font::name_to_index(nm); + int fn = env->fontno; + if (fn < 0 || fn >= nfonts) { + error("bad font position `%1'", fn); + return -1; + } + *f = font_table[fn]; + if (*f == 0) { + error("no font mounted at `%1'", fn); + return -1; + } + if (!(*f)->contains(i)) { + if (nm[0] != '\0' && nm[1] == '\0') + error("font `%1' does not contain ascii character `%2'", + (*f)->get_name(), + nm[0]); + else + error("font `%1' does not contain special character `%2'", + (*f)->get_name(), + nm); + return -1; + } + int w = (*f)->get_width(i, env->size); + w = round_width(w); + if (widthp) + *widthp = w; + return i; +} + /* * write_title - writes the title to this document */ @@ -3738,8 +4502,8 @@ void html_printer::begin_page(int n) output_vpos = -1; output_vpos_max = -1; current_paragraph = new html_text(&html); - do_indent(indentation, pageoffset, linelength); - current_paragraph->do_para(""); + do_indent(get_troff_indent(), pageoffset, linelength); + current_paragraph->do_para("", FALSE); } void html_printer::end_page(int) @@ -3797,32 +4561,34 @@ void html_printer::write_navigation (const string &top, const string &prev, if (multiple_files) { write_rule(); fputs("[ ", stdout); - if (prev != "" && prev != top) { + if ((strcmp(prev.contents(), "") != 0) && prev != top && prev != current) { emit_link(prev, "prev"); need_bar = TRUE; } - if (next != "" && next != top) { + if ((strcmp(next.contents(), "") != 0) && next != top && next != current) { if (need_bar) fputs(" | ", stdout); emit_link(next, "next"); need_bar = TRUE; } - if (top != "" && top != "" && top != current) { + if (top != "" && (strcmp(top.contents(), "") != 0) && top != current) { if (need_bar) fputs(" | ", stdout); emit_link(top, "top"); - fputs(" ]\n", stdout); } + fputs(" ]\n", stdout); write_rule(); } } /* - * do_file_components - scan the file list copying each temporary file in turn. - * This is used twofold: + * do_file_components - scan the file list copying each temporary + * file in turn. This is used twofold: * - * firstly to emit section heading links, between file fragments if required - * and secondly to generate jobname file fragments if required. + * firstly to emit section heading links, + * between file fragments if required and + * secondly to generate jobname file fragments + * if required. */ void html_printer::do_file_components (void) @@ -3859,6 +4625,7 @@ void html_printer::do_file_components (void) fflush(stdout); freopen(split_file.contents(), "w", stdout); fragment_no++; + writeHeadMetaStyle(); write_navigation(top, prev, next, current); } if (file_list.are_links_required()) @@ -3870,6 +4637,31 @@ void html_printer::do_file_components (void) write_rule(); } +/* + * writeHeadMetaStyle - emits the and \n", stdout); +} + html_printer::~html_printer() { #ifdef LONG_FOR_TIME_T @@ -3892,17 +4684,11 @@ html_printer::~html_printer() .put_string(ctime(&t), strlen(ctime(&t))-1) .end_comment(); - fputs("\n", stdout); + writeHeadMetaStyle(); - fputs("\n", stdout); - fputs("\n", stdout); - fputs("\n", stdout); - fputs("\n", stdout); - fputs("\n", stdout); write_title(TRUE); + head_info += '\0'; + fputs(head_info.contents(), stdout); fputs("\n", stdout); do_body(); @@ -3927,9 +4713,118 @@ html_printer::~html_printer() } /* - * special - handle all x X requests from troff. For post-html they allow users - * to pass raw html commands, turn auto linked headings off/on and - * also allow troff to emit tags to indicate when a: .br, .sp etc occurs. + * get_str - returns a dupicate of string, s. The duplicate + * string is terminated at the next ',' or ']'. + */ + +static char *get_str (const char *s, char **n) +{ + int i=0; + char *v; + + while ((s[i] != (char)0) && (s[i] != ',') && (s[i] != ']')) + i++; + if (i>0) { + v = new char[i+1]; + memcpy(v, s, i+1); + v[i] = (char)0; + if (s[i] == ',') + (*n) = (char *)&s[i+1]; + else + (*n) = (char *)&s[i]; + return v; + } + if (s[i] == ',') + (*n) = (char *)&s[1]; + else + (*n) = (char *)s; + return NULL; +} + +/* + * make_val - creates a string from if s is NULL. + */ + +char *make_val (char *s, int v, char *id, char *f, char *l) +{ + if (s == NULL) { + char buf[30]; + + sprintf(buf, "%d", v); + return strsave(buf); + } + else { + /* + * check that value, s, is the same as, v. + */ + char *t = s; + + while (*t == '=') + t++; + if (atoi(t) != v) { + if (f == NULL) + f = (char *)"stdin"; + if (l == NULL) + l = (char *)""; + fprintf(stderr, "%s:%s: grohtml assertion failed at id%s expecting %d and was given %s\n", + f, l, id, v, s); + } + return s; + } +} + +/* + * handle_assertion - handles the assertions created via .www:ASSERT + * in www.tmac. See www.tmac for examples. + * This method should be called as we are + * parsing the ditroff input. It checks the x, y + * position assertions. It does _not_ check the + * troff state assertions as these are unknown at this + * point. + */ + +void html_printer::handle_assertion (int minv, int minh, int maxv, int maxh, const char *s) +{ + char *n; + char *cmd = get_str(s, &n); + char *id = get_str(n, &n); + char *val = get_str(n, &n); + char *file= get_str(n, &n); + char *line= get_str(n, &n); + + if (strcmp(cmd, "assertion:[x") == 0) + as.addx(cmd, id, make_val(val, minh, id, file, line), file, line); + else if (strcmp(cmd, "assertion:[y") == 0) + as.addy(cmd, id, make_val(val, minv, id, file, line), file, line); + else + if (strncmp(cmd, "assertion:[", strlen("assertion:[")) == 0) + page_contents->add_tag(&sbuf_style, string(s), + line_number, minv, minh, maxv, maxh); +} + +/* + * build_state_assertion - builds the troff state assertions. + */ + +void html_printer::handle_state_assertion (text_glob *g) +{ + if (g != NULL && g->is_a_tag() && + (strncmp(g->text_string, "assertion:[", 11) == 0)) { + char *n = (char *)&g->text_string[11]; + char *cmd = get_str(n, &n); + char *val = get_str(n, &n); + (void)get_str(n, &n); // unused + char *file= get_str(n, &n); + char *line= get_str(n, &n); + + as.build(cmd, val, file, line); + } +} + +/* + * special - handle all x X requests from troff. For post-html they + * allow users to pass raw html commands, turn auto linked + * headings off/on etc. */ void html_printer::special(char *s, const environment *env, char type) @@ -3960,16 +4855,73 @@ void html_printer::special(char *s, const environment *env, char type) page_contents->add_and_encode(&sbuf_style, string(&s[5]), line_number, env->vpos-env->size*r/72, env->hpos, - env->vpos , env->hpos); + env->vpos , env->hpos, + FALSE); + + /* + * assume that the html command has no width, if it does then + * hopefully troff will have fudged this in a macro by + * requesting that the formatting move right by the appropriate + * amount. + */ + } else if (strncmp(s, "html

:", 9) == 0) { + int r=font::res; /* resolution of the device */ + font *f=sbuf_style.f; + + if (f == NULL) { + int found=FALSE; + + f = font::load_font("TR", &found); + } + + /* + * need to pass all of string through to html output during flush + */ + page_contents->add_and_encode(&sbuf_style, string(s), + line_number, + env->vpos-env->size*r/72, env->hpos, + env->vpos , env->hpos, + TRUE); /* - * assume that the html command has no width, if it does then hopefully troff - * will have fudged this in a macro by requesting that the formatting move right by - * the appropriate amount. + * assume that the html command has no width, if it does then + * hopefully troff will have fudged this in a macro by + * requesting that the formatting move right by the appropriate + * amount. */ } else if (strncmp(s, "index:", 6) == 0) { cutoff_heading = atoi(&s[6]); - } else if (strncmp(s, "html-tag:", 9) == 0) { + } else if (strncmp(s, "assertion:[", 11) == 0) { + int r=font::res; /* resolution of the device */ + + handle_assertion(env->vpos-env->size*r/72, env->hpos, + env->vpos, env->hpos, s); + } + } +} + +/* + * devtag - handles device troff tags sent from the `troff'. + * These include the troff state machine tags: + * .br, .sp, .in, .tl, .ll etc + * + * (see man 5 grohtml_tags). + */ + +void html_printer::devtag (char *s, const environment *env, char type) +{ + if (type != 'p') + return; + + if (s != 0) { + flush_sbuf(); + if (env->fontno >= 0) { + style sty(get_font_from_index(env->fontno), env->size, env->height, + env->slant, env->fontno, *env->col); + sbuf_style = sty; + } + + if (strncmp(s, "devtag:", strlen("devtag:")) == 0) { int r=font::res; /* resolution of the device */ page_contents->add_tag(&sbuf_style, string(s), @@ -3980,6 +4932,26 @@ void html_printer::special(char *s, const environment *env, char type) } } + +/* + * taken from number.cpp in src/roff/troff, [hunits::hunits(units x)] + */ + +int html_printer::round_width(int x) +{ + int r = font::hor; + int n; + + // don't depend on the rounding direction for division of negative integers + if (r == 1) + n = x; + else + n = (x < 0 + ? -((-x + r/2 - 1)/r) + : (x + r/2 - 1)/r); + return n * r; +} + int main(int argc, char **argv) { program_name = argv[0]; @@ -3991,27 +4963,40 @@ int main(int argc, char **argv) { "version", no_argument, 0, 'v' }, { NULL, 0, 0, 0 } }; - while ((c = getopt_long(argc, argv, "a:g:o:i:I:j:D:F:vbdhlrnp", long_options, NULL)) + while ((c = getopt_long(argc, argv, "a:bdD:F:g:hi:I:j:lno:prs:S:v", + long_options, NULL)) != EOF) switch(c) { - case 'v': - printf("GNU post-grohtml (groff) version %s\n", Version_string); - exit(0); - break; case 'a': /* text antialiasing bits - handled by pre-html */ break; - case 'g': - /* graphic antialiasing bits - handled by pre-html */ - break; case 'b': // set background color to white default_background = new color; default_background->set_gray(color::MAX_COLOR_VAL); break; + case 'd': + /* handled by pre-html */ + break; + case 'D': + /* handled by pre-html */ + break; case 'F': font::command_line_font_dir(optarg); break; + case 'g': + /* graphic antialiasing bits - handled by pre-html */ + break; + case 'h': + /* do not use the Hn headings of html, but manufacture our own */ + manufacture_headings = TRUE; + break; + case 'i': + /* handled by pre-html */ + break; + case 'I': + /* handled by pre-html */ + break; case 'j': multiple_files = TRUE; job_name = optarg; @@ -4019,15 +5004,8 @@ int main(int argc, char **argv) case 'l': auto_links = FALSE; break; - case 'r': - auto_rule = FALSE; - break; - case 'd': - /* handled by pre-html */ - break; - case 'h': - /* do not use the Hn headings of html, but manufacture our own */ - manufacture_headings = TRUE; + case 'n': + simple_anchors = TRUE; break; case 'o': /* handled by pre-html */ @@ -4035,17 +5013,18 @@ int main(int argc, char **argv) case 'p': /* handled by pre-html */ break; - case 'i': - /* handled by pre-html */ + case 'r': + auto_rule = FALSE; break; - case 'I': - /* handled by pre-html */ + case 's': + base_point_size = atoi(optarg); break; - case 'D': - /* handled by pre-html */ + case 'S': + split_level = atoi(optarg) + 1; break; - case 'n': - simple_anchors = TRUE; + case 'v': + printf("GNU post-grohtml (groff) version %s\n", Version_string); + exit(0); break; case CHAR_MAX + 1: // --help usage(stdout); diff --git a/contrib/groff-1.19/src/devices/grolbp/lbp.cpp b/contrib/groff-1.19/src/devices/grolbp/lbp.cpp index 0f480843b4..081ab998ff 100644 --- a/contrib/groff-1.19/src/devices/grolbp/lbp.cpp +++ b/contrib/groff-1.19/src/devices/grolbp/lbp.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1994, 2000, 2001, 2002, 2003, 2004 +/* Copyright (C) 1994, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by Francisco Andrés Verdú with many ideas taken from the other groff drivers. @@ -19,7 +19,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ /* TODO @@ -214,7 +214,7 @@ inline void lbp_printer::set_line_thickness(int size,const environment *env) /* fprintf(stderr, "thickness: %d == %d, size %d, %d \n", size, line_thickness, env->size,req_linethickness); */ return; -}; // lbp_printer::set_line_thickness +} // lbp_printer::set_line_thickness void lbp_printer::begin_page(int) { @@ -424,9 +424,9 @@ void lbp_printer::draw(int code, int *p, int np, const environment *env) if (np != 1 && np != 2) { error("0 or 1 argument required for thickness"); break; - }; + } set_line_thickness(p[0],env); - }; + } break; case 'l': // Line if (np != 2) { @@ -680,7 +680,7 @@ int main(int argc, char **argv) orientation = 1; else error("unknown orientation '%1'", optarg); - }; + } break; case 'c': { diff --git a/contrib/groff-1.19/src/devices/grolbp/lbp.h b/contrib/groff-1.19/src/devices/grolbp/lbp.h index 178ae584e6..b3171cf03f 100644 --- a/contrib/groff-1.19/src/devices/grolbp/lbp.h +++ b/contrib/groff-1.19/src/devices/grolbp/lbp.h @@ -1,5 +1,6 @@ // -*- C -*- -/* Copyright (C) 1994, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1994, 2000, 2001, 2003, 2004, 2005 + Free Software Foundation, Inc. Written by Francisco Andrés Verdú groff is free software; you can redistribute it and/or modify it under @@ -14,7 +15,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file contains a set of utility functions to use canon CAPSL printers * (lbp-4 and lbp-8 series printers) */ @@ -28,14 +29,15 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ static FILE *lbpoutput = NULL; static FILE *vdmoutput = NULL; + static inline void lbpinit(FILE *outfile) { lbpoutput = outfile; -}; +} -static inline void +static void lbpprintf(const char *format, ... ) { /* Taken from cjet */ va_list stuff; @@ -43,68 +45,78 @@ lbpprintf(const char *format, ... ) va_start(stuff, format); vfprintf(lbpoutput, format, stuff); va_end(stuff); -}; +} + static inline void lbpputs(const char *data) { fputs(data,lbpoutput); -}; +} + static inline void lbpputc(unsigned char c) { fputc(c,lbpoutput); -}; +} static inline void lbpsavestatus(int idx ) { fprintf(lbpoutput,"\033[%d%%y",idx); -}; +} + static inline void lbprestorestatus(int idx ) { fprintf(lbpoutput,"\033[%d%cz",idx ,'%'); -}; +} + static inline void lbpsavepos(int idx) { fprintf(lbpoutput,"\033[1;%d;0x",idx); -}; +} + static inline void lbprestorepos(int idx) { fprintf(lbpoutput,"\033[0;%d;0x",idx); -}; +} + static inline void lbprestoreposx(int idx) { fprintf(lbpoutput,"\033[0;%d;1x",idx); -}; +} + static inline void lbpmoverel(int despl, char direction) { fprintf(lbpoutput,"\033[%d%c",despl,direction); -}; +} + static inline void lbplinerel(int width,int despl,char direction ) { fprintf(lbpoutput,"\033[%d;0;9{\033[%d%c\033[9}",width,despl,direction); -}; +} + static inline void lbpmoveabs(int x, int y) { fprintf(lbpoutput,"\033[%d;%df",y,x); -}; +} + static inline void lbplineto(int x,int y, int width ) @@ -112,7 +124,8 @@ lbplineto(int x,int y, int width ) fprintf(lbpoutput,"\033[%d;0;9{",width); lbpmoveabs(x,y); fprintf(lbpoutput,"\033[9}\n"); -}; +} + static inline void lbpruleabs(int x, int y, int hsize, int vsize) @@ -121,9 +134,11 @@ lbpruleabs(int x, int y, int hsize, int vsize) fprintf(lbpoutput,"\033[0;9;000s"); lbpmoveabs(x+hsize,y+vsize); fprintf(lbpoutput,"\033[9r"); -}; +} + + +static void vdmprintf(const char *format, ... ); -static inline void vdmprintf(const char *format, ... ); static inline char * vdmnum(int num,char *result) @@ -147,7 +162,8 @@ vdmnum(int num,char *result) *p++ = b3; *p = 0x00; /* End of the resulting string */ return result; -}; +} + static inline void vdmorigin(int newx, int newy) @@ -155,7 +171,7 @@ vdmorigin(int newx, int newy) char nx[4],ny[4]; vdmprintf("}\"%s%s\x1e",vdmnum(newx,nx),vdmnum(newy,ny)); -}; /* vdmorigin */ +} static inline FILE * @@ -170,15 +186,17 @@ vdminit(FILE *vdmfile) vdmnum(-3,scale),vdmnum(1,size),vdmnum(1,lineend)); return vdmoutput; -}; +} + static inline void vdmend() { vdmprintf("}p\x1e"); -}; +} -static inline void + +static void vdmprintf(const char *format, ... ) { /* Taken from cjet */ va_list stuff; @@ -187,7 +205,8 @@ vdmprintf(const char *format, ... ) va_start(stuff, format); vfprintf(vdmoutput, format, stuff); va_end(stuff); -}; +} + static inline void vdmsetfillmode(int pattern,int perimeter, int inverted) @@ -200,7 +219,8 @@ vdmsetfillmode(int pattern,int perimeter, int inverted) vdmprintf("I%s%s%s%s%s\x1e",vdmnum(pattern,patt),\ vdmnum(perimeter,perim),vdmnum(0,rot), vdmnum(0,espejo),vdmnum(inverted,inv)); -}; +} + static inline void vdmcircle(int centerx, int centery, int radius) @@ -209,7 +229,8 @@ vdmcircle(int centerx, int centery, int radius) vdmprintf("5%s%s%s\x1e",vdmnum(centerx,x),vdmnum(centery,y),\ vdmnum(radius,rad)); -}; +} + static inline void vdmaarc(int centerx, int centery, int radius,int startangle,int angle,int style,int arcopen) @@ -220,7 +241,8 @@ vdmaarc(int centerx, int centery, int radius,int startangle,int angle,int style, vdmnum(centerx,x),vdmnum(centery,y),\ vdmnum(radius,rad),vdmnum(startangle,stx),vdmnum(angle,sty),\ vdmnum(style,styl)); -}; +} + static inline void vdmvarc(int centerx, int centery,int radius, int startx, int starty, int endx, int endy,\ @@ -232,7 +254,8 @@ vdmvarc(int centerx, int centery,int radius, int startx, int starty, int endx, i vdmnum(centerx,x),vdmnum(centery,y),\ vdmnum(radius,rad),vdmnum(startx,stx),vdmnum(starty,sty),\ vdmnum(endx,enx),vdmnum(endy,eny),vdmnum(style,styl)); -}; +} + static inline void vdmellipse(int centerx, int centery, int radiusx, int radiusy,int rotation) @@ -242,7 +265,8 @@ vdmellipse(int centerx, int centery, int radiusx, int radiusy,int rotation) vdmprintf("}7%s%s%s%s%s\x1e\n",vdmnum(centerx,x),vdmnum(centery,y),\ vdmnum(radiusx,radx),vdmnum(radiusy,rady),\ vdmnum(rotation,rotat)); -}; +} + static inline void vdmsetlinetype(int lintype) @@ -251,7 +275,8 @@ vdmsetlinetype(int lintype) vdmprintf("E1%s%s\x1e",vdmnum(lintype,ltyp),vdmnum(1,expfact)); -}; +} + static inline void vdmsetlinestyle(int lintype, int pattern,int unionstyle) @@ -265,7 +290,8 @@ vdmsetlinestyle(int lintype, int pattern,int unionstyle) vdmnum(pattern,patt),vdmnum(0,rot), vdmnum(0,espejo),vdmnum(0,in)); vdmprintf("}F%s",vdmnum(unionstyle,rot)); -}; +} + static inline void vdmlinewidth(int width) @@ -273,7 +299,8 @@ vdmlinewidth(int width) char wh[4]; vdmprintf("F1%s\x1e",vdmnum(width,wh)); -}; +} + static inline void vdmrectangle(int origx, int origy,int dstx, int dsty) @@ -282,7 +309,8 @@ vdmrectangle(int origx, int origy,int dstx, int dsty) vdmprintf("}:%s%s%s%s\x1e\n",vdmnum(origx,xcoord),vdmnum(dstx,sdstx),\ vdmnum(origy,ycoord),vdmnum(dsty,sdsty)); -}; /* polyline */ +} + static inline void vdmpolyline(int numpoints, int *points) @@ -296,10 +324,11 @@ vdmpolyline(int numpoints, int *points) for (i = 1; i < numpoints ; i++) { vdmprintf("%s%s",vdmnum(*p,xcoord),vdmnum(*(p+1),ycoord)); p += 2; - }; /* for */ + } /* for */ vdmprintf("\x1e\n"); -}; /* polyline */ +} + static inline void vdmpolygon(int numpoints, int *points) { @@ -312,10 +341,10 @@ vdmpolygon(int numpoints, int *points) for (i = 1; i < numpoints ; i++) { vdmprintf("%s%s",vdmnum(*p,xcoord),vdmnum(*(p+1),ycoord)); p += 2; - }; /* for */ + } /* for */ vdmprintf("\x1e\n"); -}; /* vdmpolygon */ +} /************************************************************************ @@ -325,7 +354,7 @@ static inline int vdminited() { return (vdmoutput != NULL); -}; /* vdminited */ +} static inline void @@ -340,7 +369,8 @@ vdmline(int startx, int starty, int sizex, int sizey) vdmpolyline(2,points); -}; +} + /*#define THRESHOLD .05 */ /* inch */ #define THRESHOLD 1 /* points (1/300 inch) */ @@ -354,7 +384,7 @@ splinerel(double px,double py,int flush) char xcoord[4],ycoord[4]; double npend ; - if (flush == -1) {lx = (int)px; ly = (int)py; return;}; + if (flush == -1) {lx = (int)px; ly = (int)py; return;} if (flush == 0) { dxnew = (int)px -lx; @@ -366,7 +396,7 @@ splinerel(double px,double py,int flush) despx = dxnew; if ((sg == sigpend) && (dy == 0)){ return; - }; + } dy = 0; } else { @@ -377,9 +407,9 @@ splinerel(double px,double py,int flush) else { sigpend = sg; pend = npend; - }; /* else (( npend == pend) && ... */ - }; /* else (if (dynew == 0)) */ - }; /* if (!flush ) */ + } /* else (( npend == pend) && ... */ + } /* else (if (dynew == 0)) */ + } /* if (!flush ) */ /* if we've changed direction we must draw the line */ /* fprintf(stderr," (%d) %.2f,%.2f\n",flush,(float)px,(float)py);*/ @@ -390,7 +420,7 @@ splinerel(double px,double py,int flush) if (flush) { dxnew = dy = despx = despy = 0; return; - }; /* if (flush) */ + } /* if (flush) */ dxnew -= despx; dynew -= despy; if ((dxnew != 0) || (dynew != 0)) vdmprintf("%s%s",vdmnum(dxnew,xcoord),\ @@ -401,7 +431,8 @@ splinerel(double px,double py,int flush) lx = (int)px; ly = (int)py; dxnew = dy = despx = despy = 0; -}; /* splinerel */ +} + /********************************************************************** * The following code to draw splines is adapted from the transfig package @@ -436,8 +467,9 @@ quadratic_spline(double a_1, double b_1, double a_2, double b_2, \ quadratic_spline(x_mid, y_mid, ((a_2+3.0*a_3)/4.0), ((b_2+3.0*b_3)/4.0), ((a_3+x_4)/2.0), ((b_3+y_4)/2.0), x_4, y_4); - }; -}; /* quadratic_spline */ + } +} + #define XCOORD(i) numbers[(2*i)] #define YCOORD(i) numbers[(2*i)+1] @@ -508,7 +540,7 @@ vdmspline(int numpoints, int o_x, int o_y, int *numbers) /* fprintf(tfp, "PA%.4f,%.4f;PU;\n", x_1, y_1);*/ -}; /* vdmspline */ +} #endif diff --git a/contrib/groff-1.19/src/devices/grolj4/lj4.cpp b/contrib/groff-1.19/src/devices/grolj4/lj4.cpp index a6287abd6a..12849542b2 100644 --- a/contrib/groff-1.19/src/devices/grolj4/lj4.cpp +++ b/contrib/groff-1.19/src/devices/grolj4/lj4.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ /* TODO diff --git a/contrib/groff-1.19/src/devices/grops/grops.man b/contrib/groff-1.19/src/devices/grops/grops.man index d430b07c47..0ff2579d73 100644 --- a/contrib/groff-1.19/src/devices/grops/grops.man +++ b/contrib/groff-1.19/src/devices/grops/grops.man @@ -1,5 +1,6 @@ .ig -Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -116,6 +117,15 @@ using the .B \-P option. . +.PP +Note that +.B grops +doesn't produce a valid document structure (conforming to the Document +Structuring Convention) if called with multiple file arguments. +. +To print such concatenated output it is necessary to deactivate DSC +handling in the printing program or previewer. +. . .SH OPTIONS .TP @@ -774,7 +784,7 @@ commands. .RS .LP For example, -.B gxditview +.B \%gxditview is not able to display a proper .B \[rs](em character because the standard X11 fonts do not provide it; @@ -792,7 +802,7 @@ request . .LP In this case, -.B gxditview +.B \%gxditview will be unable to display the .B \[rs](em character and will draw the line, @@ -803,10 +813,10 @@ will print the character and ignore the line (this code is already in file .B Xps.tmac -which will be loaded if a documented intended for +which will be loaded if a document intended for .B grops is previewed with -.BR gxditview ). +.BR \%gxditview ). .RE . .LP @@ -1149,6 +1159,10 @@ Temporary file. .BR groff_char (@MAN7EXT@), .BR groff_tmac (@MAN5EXT@) . +.PP +.URL "http://\:partners.adobe.com/\:public/\:developer/\:en/\:ps/\:5001.DSC_Spec.pdf" \ + "PostScript Language Document Structuring Conventions Specification" +. .cp \n[grops_C] . .\" Local Variables: diff --git a/contrib/groff-1.19/src/devices/grops/ps.cpp b/contrib/groff-1.19/src/devices/grops/ps.cpp index 41aece5085..b6a54032c9 100644 --- a/contrib/groff-1.19/src/devices/grops/ps.cpp +++ b/contrib/groff-1.19/src/devices/grops/ps.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ /* * PostScript documentation: diff --git a/contrib/groff-1.19/src/devices/grops/ps.h b/contrib/groff-1.19/src/devices/grops/ps.h index 04330b6e68..fabf47dbfc 100644 --- a/contrib/groff-1.19/src/devices/grops/ps.h +++ b/contrib/groff-1.19/src/devices/grops/ps.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ class ps_output { public: diff --git a/contrib/groff-1.19/src/devices/grops/psrm.cpp b/contrib/groff-1.19/src/devices/grops/psrm.cpp index faa140db7b..f1894f593c 100644 --- a/contrib/groff-1.19/src/devices/grops/psrm.cpp +++ b/contrib/groff-1.19/src/devices/grops/psrm.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "driver.h" #include "stringclass.h" diff --git a/contrib/groff-1.19/src/devices/grotty/tty.cpp b/contrib/groff-1.19/src/devices/grotty/tty.cpp index bdaa1de336..a959461f92 100644 --- a/contrib/groff-1.19/src/devices/grotty/tty.cpp +++ b/contrib/groff-1.19/src/devices/grotty/tty.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-2000, 2001, 2002, 2003, 2004 +/* Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "driver.h" #include "device.h" @@ -93,7 +93,7 @@ static unsigned char bold_underline_mode; #define SGR_REVERSE CSI "7m" #define SGR_NO_REVERSE CSI "27m" // many terminals can't handle `CSI 39 m' and `CSI 49 m' to reset -// the foreground and bachground color, respectively; thus we use +// the foreground and background color, respectively; we thus use // `CSI 0 m' exclusively #define SGR_DEFAULT CSI "0m" @@ -155,6 +155,7 @@ class glyph { static glyph *free_list; public: glyph *next; + int w; int hpos; unsigned int code; unsigned char mode; @@ -204,10 +205,10 @@ class tty_printer : public printer { int is_bold; int cu_flag; PTABLE(schar) tty_colors; - void make_underline(); - void make_bold(unsigned int); + void make_underline(int); + void make_bold(unsigned int, int); schar color_to_idx(color *col); - void add_char(unsigned int, int, int, color *, color *, unsigned char); + void add_char(unsigned int, int, int, int, color *, color *, unsigned char); char *make_rgb_string(unsigned int, unsigned int, unsigned int); int tty_color(unsigned int, unsigned int, unsigned int, schar *, schar = DEFAULT_COLOR_IDX); @@ -299,11 +300,18 @@ tty_printer::~tty_printer() a_delete lines; } -void tty_printer::make_underline() +void tty_printer::make_underline(int w) { if (old_drawing_scheme) { - putchar('_'); - putchar('\b'); + if (!w) + warning("can't underline zero-width character"); + else { + int n = w / font::hor; + for (int i = 0; i < n; i++) + putchar('_'); + for (int j = 0; j < n; j++) + putchar('\b'); + } } else { if (!is_underline) { @@ -318,11 +326,17 @@ void tty_printer::make_underline() } } -void tty_printer::make_bold(unsigned int c) +void tty_printer::make_bold(unsigned int c, int w) { if (old_drawing_scheme) { - put_char(c); - putchar('\b'); + if (!w) + warning("can't print zero-width character in bold"); + else { + int n = w / font::hor; + put_char(c); + for (int i = 0; i < n; i++) + putchar('\b'); + } } else { if (!is_bold) @@ -349,15 +363,15 @@ schar tty_printer::color_to_idx(color *col) void tty_printer::set_char(int i, font *f, const environment *env, int w, const char *) { - if (w != font::hor) - fatal("width of character not equal to horizontal resolution"); - add_char(f->get_code(i), + if (w % font::hor != 0) + fatal("width of character not a multiple of horizontal resolution"); + add_char(f->get_code(i), w, env->hpos, env->vpos, env->col, env->fill, ((tty_font *)f)->get_mode()); } -void tty_printer::add_char(unsigned int c, +void tty_printer::add_char(unsigned int c, int w, int h, int v, color *fore, color *back, unsigned char mode) @@ -398,6 +412,7 @@ void tty_printer::add_char(unsigned int c, cached_vpos = vpos; } glyph *g = new glyph; + g->w = w; g->hpos = hpos; g->code = c; g->fore_color_idx = color_to_idx(fore); @@ -421,7 +436,8 @@ void tty_printer::add_char(unsigned int c, void tty_printer::special(char *arg, const environment *env, char type) { if (type == 'u') { - add_char(*arg - '0', env->hpos, env->vpos, env->col, env->fill, CU_MODE); + add_char(*arg - '0', 0, env->hpos, env->vpos, env->col, env->fill, + CU_MODE); return; } if (type != 'p') @@ -460,12 +476,12 @@ void tty_printer::special(char *arg, const environment *env, char type) void tty_printer::change_color(const environment * const env) { - add_char(0, env->hpos, env->vpos, env->col, env->fill, COLOR_CHANGE); + add_char(0, 0, env->hpos, env->vpos, env->col, env->fill, COLOR_CHANGE); } void tty_printer::change_fill_color(const environment * const env) { - add_char(0, env->hpos, env->vpos, env->col, env->fill, COLOR_CHANGE); + add_char(0, 0, env->hpos, env->vpos, env->col, env->fill, COLOR_CHANGE); } void tty_printer::draw(int code, int *p, int np, const environment *env) @@ -485,20 +501,20 @@ void tty_printer::draw(int code, int *p, int np, const environment *env) len = -len; } if (len >= 0 && len <= font::vert) - add_char(vline_char, env->hpos, v, env->col, env->fill, + add_char(vline_char, font::hor, env->hpos, v, env->col, env->fill, VDRAW_MODE|START_LINE|END_LINE); else { - add_char(vline_char, env->hpos, v, env->col, env->fill, + add_char(vline_char, font::hor, env->hpos, v, env->col, env->fill, VDRAW_MODE|START_LINE); len -= font::vert; v += font::vert; while (len > 0) { - add_char(vline_char, env->hpos, v, env->col, env->fill, + add_char(vline_char, font::hor, env->hpos, v, env->col, env->fill, VDRAW_MODE|START_LINE|END_LINE); len -= font::vert; v += font::vert; } - add_char(vline_char, env->hpos, v, env->col, env->fill, + add_char(vline_char, font::hor, env->hpos, v, env->col, env->fill, VDRAW_MODE|END_LINE); } } @@ -511,20 +527,20 @@ void tty_printer::draw(int code, int *p, int np, const environment *env) len = -len; } if (len >= 0 && len <= font::hor) - add_char(hline_char, h, env->vpos, env->col, env->fill, + add_char(hline_char, font::hor, h, env->vpos, env->col, env->fill, HDRAW_MODE|START_LINE|END_LINE); else { - add_char(hline_char, h, env->vpos, env->col, env->fill, + add_char(hline_char, font::hor, h, env->vpos, env->col, env->fill, HDRAW_MODE|START_LINE); len -= font::hor; h += font::hor; while (len > 0) { - add_char(hline_char, h, env->vpos, env->col, env->fill, + add_char(hline_char, font::hor, h, env->vpos, env->col, env->fill, HDRAW_MODE|START_LINE|END_LINE); len -= font::hor; h += font::hor; } - add_char(hline_char, h, env->vpos, env->col, env->fill, + add_char(hline_char, font::hor, h, env->vpos, env->col, env->fill, HDRAW_MODE|END_LINE); } } @@ -676,7 +692,7 @@ void tty_printer::end_page(int page_length) if (next_tab_pos > p->hpos) break; if (cu_flag) - make_underline(); + make_underline(p->w); else if (!old_drawing_scheme && is_underline) { if (italic_flag) putstring(SGR_NO_ITALIC); @@ -692,7 +708,7 @@ void tty_printer::end_page(int page_length) } for (; hpos < p->hpos; hpos++) { if (cu_flag) - make_underline(); + make_underline(p->w); else if (!old_drawing_scheme && is_underline) { if (italic_flag) putstring(SGR_NO_ITALIC); @@ -720,7 +736,7 @@ void tty_printer::end_page(int page_length) continue; } if (p->mode & UNDERLINE_MODE) - make_underline(); + make_underline(p->w); else if (!old_drawing_scheme && is_underline) { if (italic_flag) putstring(SGR_NO_ITALIC); @@ -731,7 +747,7 @@ void tty_printer::end_page(int page_length) is_underline = 0; } if (p->mode & BOLD_MODE) - make_bold(p->code); + make_bold(p->code, p->w); else if (!old_drawing_scheme && is_bold) { putstring(SGR_NO_BOLD); is_bold = 0; @@ -747,7 +763,7 @@ void tty_printer::end_page(int page_length) } } put_char(p->code); - hpos++; + hpos += p->w / font::hor; } if (!old_drawing_scheme && (is_bold || is_underline diff --git a/contrib/groff-1.19/src/include/assert.h b/contrib/groff-1.19/src/include/assert.h index 18d9c2623e..76b3b203a9 100644 --- a/contrib/groff-1.19/src/include/assert.h +++ b/contrib/groff-1.19/src/include/assert.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef ASSERT_H #define ASSERT_H diff --git a/contrib/groff-1.19/src/include/cmap.h b/contrib/groff-1.19/src/include/cmap.h index 1537d4627d..d786829d2f 100644 --- a/contrib/groff-1.19/src/include/cmap.h +++ b/contrib/groff-1.19/src/include/cmap.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef UCHAR_MAX #define UCHAR_MAX 255 diff --git a/contrib/groff-1.19/src/include/color.h b/contrib/groff-1.19/src/include/color.h index 2a1c62f0f6..52f97c6458 100644 --- a/contrib/groff-1.19/src/include/color.h +++ b/contrib/groff-1.19/src/include/color.h @@ -21,7 +21,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include "symbol.h" diff --git a/contrib/groff-1.19/src/include/config.hin b/contrib/groff-1.19/src/include/config.hin index 20b305baf4..5f871aaa95 100644 --- a/contrib/groff-1.19/src/include/config.hin +++ b/contrib/groff-1.19/src/include/config.hin @@ -3,15 +3,15 @@ /* Define if your C++ doesn't understand `delete []'. */ #undef ARRAY_DELETE_NEEDS_SIZE +/* Define if you have a C++ . */ +#undef HAVE_CC_INTTYPES_H + /* Define if you have a C++ . */ #undef HAVE_CC_LIMITS_H /* Define if you have a C++ . */ #undef HAVE_CC_OSFCN_H -/* Define if you have a C++ . */ -#undef HAVE_CC_STDINT_H - /* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you don't. */ #undef HAVE_DECL_SYS_SIGLIST @@ -203,6 +203,9 @@ core image was produced for a process that was terminated by a signal. */ #undef WCOREFLAG +/* Define to 1 if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING + /* Define if -D_POSIX_SOURCE is necessary. */ #undef _POSIX_SOURCE diff --git a/contrib/groff-1.19/src/include/cset.h b/contrib/groff-1.19/src/include/cset.h index b3a1a97613..a241c00280 100644 --- a/contrib/groff-1.19/src/include/cset.h +++ b/contrib/groff-1.19/src/include/cset.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CC_LIMITS_H #include diff --git a/contrib/groff-1.19/src/include/device.h b/contrib/groff-1.19/src/include/device.h index 341af8d2a7..ecafc26c3c 100644 --- a/contrib/groff-1.19/src/include/device.h +++ b/contrib/groff-1.19/src/include/device.h @@ -16,6 +16,6 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ extern const char *device; diff --git a/contrib/groff-1.19/src/include/driver.h b/contrib/groff-1.19/src/include/driver.h index 8337e7c22e..f6804efffb 100644 --- a/contrib/groff-1.19/src/include/driver.h +++ b/contrib/groff-1.19/src/include/driver.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/include/errarg.h b/contrib/groff-1.19/src/include/errarg.h index 08af44ae21..1aa191a4e4 100644 --- a/contrib/groff-1.19/src/include/errarg.h +++ b/contrib/groff-1.19/src/include/errarg.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ class errarg { enum { EMPTY, STRING, CHAR, INTEGER, UNSIGNED_INTEGER, DOUBLE } type; diff --git a/contrib/groff-1.19/src/include/error.h b/contrib/groff-1.19/src/include/error.h index 6910e55057..b9d48d0a72 100644 --- a/contrib/groff-1.19/src/include/error.h +++ b/contrib/groff-1.19/src/include/error.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ extern void fatal_with_file_and_line(const char *filename, int lineno, const char *format, diff --git a/contrib/groff-1.19/src/include/font.h b/contrib/groff-1.19/src/include/font.h index 3d46138e7c..3ef4fed458 100644 --- a/contrib/groff-1.19/src/include/font.h +++ b/contrib/groff-1.19/src/include/font.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ typedef void (*FONT_COMMAND_HANDLER)(const char *, const char *, const char *, int); @@ -54,10 +54,11 @@ public: const char *get_special_device_encoding(int index); const char *get_name(); const char *get_internal_name(); + const char *get_image_generator(); static int scan_papersize(const char *, const char **, double *, double *); - static font *load_font(const char *, int *not_found = 0); + static font *load_font(const char *, int * = 0, int = 0); static void command_line_font_dir(const char *path); static FILE *open_file(const char *name, char **pathp); static int load_desc(); @@ -77,8 +78,10 @@ public: static int spare2; static int sizescale; static int tcommand; + static int unscaled_charwidths; static int pass_filenames; static int use_charnames_in_special; + static const char *image_generator; static const char **font_name_table; static const char **style_table; @@ -117,5 +120,5 @@ private: const char *file, int lineno); protected: font(const char *); - int load(int *not_found = 0); + int load(int * = 0, int = 0); }; diff --git a/contrib/groff-1.19/src/include/geometry.h b/contrib/groff-1.19/src/include/geometry.h index d425f157ec..1ce0df031f 100644 --- a/contrib/groff-1.19/src/include/geometry.h +++ b/contrib/groff-1.19/src/include/geometry.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ int adjust_arc_center(const int *, double *); void check_output_arc_limits(int x, int y, diff --git a/contrib/groff-1.19/src/include/html-strings.h b/contrib/groff-1.19/src/include/html-strings.h index fd757c3fd2..26daeb6cfd 100644 --- a/contrib/groff-1.19/src/include/html-strings.h +++ b/contrib/groff-1.19/src/include/html-strings.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ /* * defines the image tags issued by the pre-processors (tbl, pic, eqn) diff --git a/contrib/groff-1.19/src/include/htmlhint.h b/contrib/groff-1.19/src/include/htmlhint.h index f1f46f7282..e0b41dd715 100644 --- a/contrib/groff-1.19/src/include/htmlhint.h +++ b/contrib/groff-1.19/src/include/htmlhint.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef HTMLINDICATE_H #define HTMLINDICATE_H diff --git a/contrib/groff-1.19/src/include/index.h b/contrib/groff-1.19/src/include/index.h index 7e6081381c..c90610e67d 100644 --- a/contrib/groff-1.19/src/include/index.h +++ b/contrib/groff-1.19/src/include/index.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #define INDEX_MAGIC 0x23021964 #define INDEX_VERSION 1 diff --git a/contrib/groff-1.19/src/include/lib.h b/contrib/groff-1.19/src/include/lib.h index fd7d6fec06..bb59337fc9 100644 --- a/contrib/groff-1.19/src/include/lib.h +++ b/contrib/groff-1.19/src/include/lib.h @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1989-2000, 2001, 2002, 2003, 2005 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -16,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H #include @@ -31,19 +32,8 @@ extern "C" { const char *if_to_a(int, int); } -/* stdio.h on IRIX, OSF/1, emx, UWIN, and MinGW include getopt.h */ -/* unistd.h on CYGWIN includes getopt.h */ - -#if !(defined(__sgi) \ - || (defined(__osf__) && defined(__alpha)) \ - || defined(_UWIN) \ - || defined(__EMX__) \ - || defined(__CYGWIN__) \ - || defined(__MINGW32__)) -#include -#else +#define __GETOPT_PREFIX groff_ #include -#endif #ifdef HAVE_SETLOCALE #include @@ -53,6 +43,7 @@ extern "C" { char *strsave(const char *s); int is_prime(unsigned); +double groff_hypot(double, double); #include #include @@ -99,6 +90,7 @@ extern "C" { int pclose (FILE *); } #endif /* NEED_DECLARATION_PCLOSE */ size_t file_name_max(const char *fname); +size_t path_name_max(); int interpret_lf_args(const char *p); diff --git a/contrib/groff-1.19/src/include/macropath.h b/contrib/groff-1.19/src/include/macropath.h index b4a2bd0cad..3b38baa026 100644 --- a/contrib/groff-1.19/src/include/macropath.h +++ b/contrib/groff-1.19/src/include/macropath.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ extern search_path macro_path; extern search_path safer_macro_path; diff --git a/contrib/groff-1.19/src/include/nonposix.h b/contrib/groff-1.19/src/include/nonposix.h index 706729d045..9564a8b764 100644 --- a/contrib/groff-1.19/src/include/nonposix.h +++ b/contrib/groff-1.19/src/include/nonposix.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. Written by Eli Zaretskii (eliz@is.elta.co.il) This file is part of groff. @@ -15,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ /* This header file compartmentalize all idiosyncrasies of non-Posix systems, such as MS-DOS, MS-Windows, etc. It should be loaded after @@ -64,6 +65,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # define dup2(f1,f2) _dup2(f1,f2) # define close(f) _close(f) # define isatty(f) _isatty(f) +# define access(p,m) _access(p,m) # endif # define SET_BINARY(f) do {if (!isatty(f)) setmode(f,O_BINARY);} while(0) # define FOPEN_RB "rb" @@ -101,6 +103,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* The executable extension. */ # define EXE_EXT ".exe" +/* Possible executable extensions. */ +# define PATH_EXT ".com;.exe;.bat;.cmd" + /* The system null device. */ # define NULL_DEV "NUL" @@ -209,6 +214,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef EXE_EXT # define EXE_EXT "" #endif +#ifndef PATH_EXT +# define PATH_EXT "" +#endif #ifndef NULL_DEV # define NULL_DEV "/dev/null" #endif diff --git a/contrib/groff-1.19/src/include/paper.h b/contrib/groff-1.19/src/include/paper.h index 7a01fc2bf2..e88965d1de 100644 --- a/contrib/groff-1.19/src/include/paper.h +++ b/contrib/groff-1.19/src/include/paper.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ struct paper { char *name; diff --git a/contrib/groff-1.19/src/include/posix.h b/contrib/groff-1.19/src/include/posix.h index e2ab4e1d44..28b807c7c2 100644 --- a/contrib/groff-1.19/src/include/posix.h +++ b/contrib/groff-1.19/src/include/posix.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1992, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1992, 2000, 2001, 2002, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include @@ -58,6 +58,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define O_RDONLY 0 #endif +#ifndef F_OK +#define F_OK 0 +#endif + #ifndef HAVE_ISATTY #define isatty(n) (1) #endif diff --git a/contrib/groff-1.19/src/include/printer.h b/contrib/groff-1.19/src/include/printer.h index 95c0a8851c..fb39f48965 100644 --- a/contrib/groff-1.19/src/include/printer.h +++ b/contrib/groff-1.19/src/include/printer.h @@ -7,7 +7,7 @@ Written by James Clark (jjc@jclark.com) - Last update: 12 Apr 2002 + Last update: 15 Dec 2004 This file is part of groff. @@ -23,8 +23,8 @@ 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. + Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA + 02110-1301, USA. */ /* Description @@ -83,6 +83,9 @@ public: virtual void end_of_line(); virtual void special(char *arg, const environment *env, char type = 'p'); + virtual void devtag(char *arg, const environment *env, + char type = 'p'); + protected: font_pointer_list *font_list; font **font_table; diff --git a/contrib/groff-1.19/src/include/ptable.h b/contrib/groff-1.19/src/include/ptable.h index dd31c0e39f..b2881872a3 100644 --- a/contrib/groff-1.19/src/include/ptable.h +++ b/contrib/groff-1.19/src/include/ptable.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include diff --git a/contrib/groff-1.19/src/include/refid.h b/contrib/groff-1.19/src/include/refid.h index 605427e9af..84e5119f30 100644 --- a/contrib/groff-1.19/src/include/refid.h +++ b/contrib/groff-1.19/src/include/refid.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ class reference_id { int filename_id; diff --git a/contrib/groff-1.19/src/include/search.h b/contrib/groff-1.19/src/include/search.h index 9617aab857..3dde8944f0 100644 --- a/contrib/groff-1.19/src/include/search.h +++ b/contrib/groff-1.19/src/include/search.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ class search_item; class search_item_iterator; diff --git a/contrib/groff-1.19/src/include/searchpath.h b/contrib/groff-1.19/src/include/searchpath.h index 6568cd837d..dab161e61e 100644 --- a/contrib/groff-1.19/src/include/searchpath.h +++ b/contrib/groff-1.19/src/include/searchpath.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ class search_path { char *dirs; diff --git a/contrib/groff-1.19/src/include/stringclass.h b/contrib/groff-1.19/src/include/stringclass.h index c6295b00f6..fb3299ce90 100644 --- a/contrib/groff-1.19/src/include/stringclass.h +++ b/contrib/groff-1.19/src/include/stringclass.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include diff --git a/contrib/groff-1.19/src/include/symbol.h b/contrib/groff-1.19/src/include/symbol.h index af4a4c0985..c3cc8eea63 100644 --- a/contrib/groff-1.19/src/include/symbol.h +++ b/contrib/groff-1.19/src/include/symbol.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #define DONT_STORE 1 #define MUST_ALREADY_EXIST 2 diff --git a/contrib/groff-1.19/src/include/unicode.h b/contrib/groff-1.19/src/include/unicode.h index 661feb4d06..90dab113df 100644 --- a/contrib/groff-1.19/src/include/unicode.h +++ b/contrib/groff-1.19/src/include/unicode.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ const char *glyph_name_to_unicode(const char *); const char *unicode_to_glyph_name(const char *); diff --git a/contrib/groff-1.19/src/libs/libbib/common.cpp b/contrib/groff-1.19/src/libs/libbib/common.cpp index 4b2bcca23e..9d16e7a068 100644 --- a/contrib/groff-1.19/src/libs/libbib/common.cpp +++ b/contrib/groff-1.19/src/libs/libbib/common.cpp @@ -15,7 +15,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ unsigned hash(const char *s, int len) { diff --git a/contrib/groff-1.19/src/libs/libbib/index.cpp b/contrib/groff-1.19/src/libs/libbib/index.cpp index 016e4fd32a..6b9b9e350e 100644 --- a/contrib/groff-1.19/src/libs/libbib/index.cpp +++ b/contrib/groff-1.19/src/libs/libbib/index.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/libs/libbib/linear.cpp b/contrib/groff-1.19/src/libs/libbib/linear.cpp index 1dd902b84d..c1919ab7d6 100644 --- a/contrib/groff-1.19/src/libs/libbib/linear.cpp +++ b/contrib/groff-1.19/src/libs/libbib/linear.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/libs/libbib/map.c b/contrib/groff-1.19/src/libs/libbib/map.c index a03280d41e..f45625d94b 100644 --- a/contrib/groff-1.19/src/libs/libbib/map.c +++ b/contrib/groff-1.19/src/libs/libbib/map.c @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff --git a/contrib/groff-1.19/src/libs/libbib/search.cpp b/contrib/groff-1.19/src/libs/libbib/search.cpp index 2223fb643c..4ed0baa5bf 100644 --- a/contrib/groff-1.19/src/libs/libbib/search.cpp +++ b/contrib/groff-1.19/src/libs/libbib/search.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/libs/libdriver/input.cpp b/contrib/groff-1.19/src/libs/libdriver/input.cpp index 810163db41..bf8a74e106 100644 --- a/contrib/groff-1.19/src/libs/libdriver/input.cpp +++ b/contrib/groff-1.19/src/libs/libdriver/input.cpp @@ -2,13 +2,13 @@ // /src/libs/libdriver/input.cpp -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004 +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) Major rewrite 2001 by Bernd Warken (bwarken@mayn.de) - Last update: 04 Apr 2003 + Last update: 15 Jun 2005 This file is part of groff, the GNU roff text processing system. @@ -24,8 +24,8 @@ 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. + Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA + 02110-1301, USA. */ /* Description @@ -272,16 +272,15 @@ public: IntArray(void); IntArray(const size_t); ~IntArray(void); - const IntArg operator[](const size_t i) const + IntArg operator[](const size_t i) const { if (i >= num_stored) fatal("index out of range"); return (IntArg) data[i]; } void append(IntArg); - const IntArg * const - get_data(void) const { return (IntArg *)data; } - const size_t len(void) const { return num_stored; } + IntArg *get_data(void) const { return (IntArg *)data; } + size_t len(void) const { return num_stored; } }; // Characters read from the input queue. @@ -608,6 +607,7 @@ void delete_current_env(void) delete current_env->col; delete current_env->fill; delete current_env; + current_env = 0; } ////////////////////////////////////////////////////////////////////// @@ -1520,6 +1520,9 @@ parse_x_command(void) char *str_arg = get_extended_arg(); // includes line skip if (npages <= 0) error("`x X' command invalid before first `p' command"); + else if (str_arg && (strncmp(str_arg, "devtag:", + strlen("devtag:")) == 0)) + pr->devtag(str_arg, current_env); else pr->special(str_arg, current_env); a_delete str_arg; @@ -1823,6 +1826,7 @@ do_file(const char *filename) if (npages > 0) pr->end_page(current_env->vpos); delete pr; + pr = 0; fclose(current_file); // If `stopped' is not `true' here then there wasn't any `x stop'. if (!stopped) diff --git a/contrib/groff-1.19/src/libs/libdriver/printer.cpp b/contrib/groff-1.19/src/libs/libdriver/printer.cpp index 179daf1781..fd77d6b59e 100644 --- a/contrib/groff-1.19/src/libs/libdriver/printer.cpp +++ b/contrib/groff-1.19/src/libs/libdriver/printer.cpp @@ -2,11 +2,11 @@ // /src/libs/libdriver/printer.cpp -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003 +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) - Last update: 04 Apr 2003 + Last update: 02 Mar 2005 This file is part of groff. @@ -22,12 +22,61 @@ 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. + Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA + 02110-1301, USA. */ #include "driver.h" +/* If we are sending output to an onscreen pager (as is the normal case + when reading man pages), then we may get an error state on the output + stream, if the user does not read all the way to the end. + + We normally expect to catch this, and clean up the error context, when + the pager exits, because we should get, and handle, a SIGPIPE. + + However ... +*/ + +#if (defined(_MSC_VER) || defined(_WIN32)) \ + && !defined(__CYGWIN__) && !defined(_UWIN) + + /* Native MS-Windows doesn't know about SIGPIPE, so we cannot detect the + early exit from the pager, and therefore, cannot clean up the error + context; thus we use the following static function to identify this + particular error context, and so suppress unwanted diagnostics. + */ + + static int + check_for_output_error (FILE* stream) + { + /* First, clean up any prior error context on the output stream */ + if (ferror (stream)) + clearerr (stream); + /* Clear errno, in case clearerr() and fflush() don't */ + errno = 0; + /* Flush the output stream, so we can capture any error context, other + than the specific case we wish to suppress. + + Microsoft doesn't document it, but the error code for the specific + context we are trying to suppress seems to be EINVAL -- a strange + choice, since it is not normally associated with fflush(); of course, + it *should* be EPIPE, but this *definitely* is not used, and *is* so + documented. + */ + return ((fflush(stream) < 0) && (errno != EINVAL)); + } + +#else + + /* For other systems, we simply assume that *any* output error context + is to be reported. + */ +# define check_for_output_error(stream) ferror(stream) || fflush(stream) < 0 + +#endif + + font_pointer_list::font_pointer_list(font *f, font_pointer_list *fp) : p(f), next(fp) { @@ -47,7 +96,7 @@ printer::~printer() delete tem->p; delete tem; } - if (ferror(stdout) || fflush(stdout) < 0) + if (check_for_output_error(stdout)) fatal("output error"); } @@ -107,6 +156,10 @@ void printer::special(char *, const environment *, char) { } +void printer::devtag(char *, const environment *, char) +{ +} + void printer::draw(int, int *, int, const environment *) { } diff --git a/contrib/groff-1.19/src/libs/libgroff/assert.cpp b/contrib/groff-1.19/src/libs/libgroff/assert.cpp index 0112719623..bc08eab2e4 100644 --- a/contrib/groff-1.19/src/libs/libgroff/assert.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/assert.cpp @@ -15,7 +15,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include diff --git a/contrib/groff-1.19/src/libs/libgroff/change_lf.cpp b/contrib/groff-1.19/src/libs/libgroff/change_lf.cpp index 2e44af1d57..0313779271 100644 --- a/contrib/groff-1.19/src/libs/libgroff/change_lf.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/change_lf.cpp @@ -15,7 +15,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff --git a/contrib/groff-1.19/src/libs/libgroff/cmap.cpp b/contrib/groff-1.19/src/libs/libgroff/cmap.cpp index 4b75d06f1d..2691c013c7 100644 --- a/contrib/groff-1.19/src/libs/libgroff/cmap.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/cmap.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include "cmap.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/color.cpp b/contrib/groff-1.19/src/libs/libgroff/color.cpp index 2a01ae5e88..b82bdcdadf 100644 --- a/contrib/groff-1.19/src/libs/libgroff/color.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/color.cpp @@ -2,7 +2,7 @@ /* /src/libs/libgroff/color.cpp -Last update: 07 Jan 2004 +Last update: 26 May 2004 Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Written by Gaius Mulley @@ -21,8 +21,9 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "lib.h" #include "color.h" #include "cset.h" #ifdef HAVE_UNISTD_H diff --git a/contrib/groff-1.19/src/libs/libgroff/cset.cpp b/contrib/groff-1.19/src/libs/libgroff/cset.cpp index e4845c1101..8199e62438 100644 --- a/contrib/groff-1.19/src/libs/libgroff/cset.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/cset.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -16,9 +16,11 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include + +#include "lib.h" #include "cset.h" cset csalpha(CSET_BUILTIN); diff --git a/contrib/groff-1.19/src/libs/libgroff/device.cpp b/contrib/groff-1.19/src/libs/libgroff/device.cpp index 7efbfef25a..53baf9757d 100644 --- a/contrib/groff-1.19/src/libs/libgroff/device.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/device.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include "device.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/errarg.cpp b/contrib/groff-1.19/src/libs/libgroff/errarg.cpp index 2ddc0cc5dc..1d6ef3006e 100644 --- a/contrib/groff-1.19/src/libs/libgroff/errarg.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/errarg.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include "assert.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/error.cpp b/contrib/groff-1.19/src/libs/libgroff/error.cpp index f7d3ec0f74..8aea0c0d8f 100644 --- a/contrib/groff-1.19/src/libs/libgroff/error.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/error.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include diff --git a/contrib/groff-1.19/src/libs/libgroff/fatal.cpp b/contrib/groff-1.19/src/libs/libgroff/fatal.cpp index 42560dcaf5..bed8298b56 100644 --- a/contrib/groff-1.19/src/libs/libgroff/fatal.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/fatal.cpp @@ -15,7 +15,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff --git a/contrib/groff-1.19/src/libs/libgroff/font.cpp b/contrib/groff-1.19/src/libs/libgroff/font.cpp index 7883fdf60b..466c71d69b 100644 --- a/contrib/groff-1.19/src/libs/libgroff/font.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/font.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" @@ -71,6 +71,7 @@ struct text_file { int lineno; int size; int skip_comments; + int silent; char *buf; text_file(FILE *fp, char *p); ~text_file(); @@ -82,7 +83,7 @@ struct text_file { }; text_file::text_file(FILE *p, char *s) -: fp(p), path(s), lineno(0), size(0), skip_comments(1), buf(0) +: fp(p), path(s), lineno(0), size(0), skip_comments(1), silent(0), buf(0) { } @@ -141,7 +142,8 @@ void text_file::error(const char *format, const errarg &arg2, const errarg &arg3) { - error_with_file_and_line(path, lineno, format, arg1, arg2, arg3); + if (!silent) + error_with_file_and_line(path, lineno, format, arg1, arg2, arg3); } @@ -272,7 +274,7 @@ int font::get_width(int c, int point_size) int i = ch_index[c]; assert(i >= 0); - if (point_size == unitwidth) + if (point_size == unitwidth || font::unscaled_charwidths) return ch[i].width; if (!widths_cache) @@ -394,7 +396,12 @@ const char *font::get_internal_name() 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 ); + return ch[ch_index[c]].special_device_coding; +} + +const char *font::get_image_generator() +{ + return image_generator; } void font::alloc_ch_index(int idx) @@ -479,10 +486,10 @@ void font::copy_entry(int new_index, int old_index) ch_index[new_index] = ch_index[old_index]; } -font *font::load_font(const char *s, int *not_found) +font *font::load_font(const char *s, int *not_found, int head_only) { font *f = new font(s); - if (!f->load(not_found)) { + if (!f->load(not_found, head_only)) { delete f; return 0; } @@ -557,7 +564,7 @@ again: // 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) +int font::load(int *not_found, int head_only) { char *path; FILE *fp; @@ -570,6 +577,7 @@ int font::load(int *not_found) } text_file t(fp, path); t.skip_comments = 1; + t.silent = head_only; char *p; for (;;) { if (!t.next()) { @@ -638,6 +646,8 @@ int font::load(int *not_found) else break; } + if (head_only) + return 1; char *command = p; int had_charset = 0; t.skip_comments = 0; @@ -810,7 +820,7 @@ static struct { { "spare1", &font::biggestfont }, { "biggestfont", &font::biggestfont }, { "spare2", &font::spare2 }, - { "sizescale", &font::sizescale } + { "sizescale", &font::sizescale }, }; int font::load_desc() @@ -905,6 +915,8 @@ int font::load_desc() return 0; } } + else if (strcmp("unscaled_charwidths", p) == 0) + unscaled_charwidths = 1; else if (strcmp("pass_filenames", p) == 0) pass_filenames = 1; else if (strcmp("sizes", p) == 0) { @@ -981,6 +993,14 @@ int font::load_desc() tcommand = 1; else if (strcmp("use_charnames_in_special", p) == 0) use_charnames_in_special = 1; + else if (strcmp("image_generator", p) == 0) { + p = strtok(0, WS); + if (!p) { + t.error("image_generator command requires an argument"); + return 0; + } + image_generator = strsave(p); + } else if (strcmp("charset", p) == 0) break; else if (unknown_desc_command_handler) { diff --git a/contrib/groff-1.19/src/libs/libgroff/fontfile.cpp b/contrib/groff-1.19/src/libs/libgroff/fontfile.cpp index 0f245518be..18d0b86066 100644 --- a/contrib/groff-1.19/src/libs/libgroff/fontfile.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/fontfile.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" @@ -45,7 +45,9 @@ int font::spare2 = 0; int font::sizescale = 1; int font::tcommand = 0; int font::pass_filenames = 0; +int font::unscaled_charwidths = 0; int font::use_charnames_in_special = 0; +const char *font::image_generator = NULL; const char **font::font_name_table = 0; int *font::sizes = 0; const char *font::family = 0; diff --git a/contrib/groff-1.19/src/libs/libgroff/geometry.cpp b/contrib/groff-1.19/src/libs/libgroff/geometry.cpp index c61876ef46..7d96e5c210 100644 --- a/contrib/groff-1.19/src/libs/libgroff/geometry.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/geometry.cpp @@ -18,7 +18,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff --git a/contrib/groff-1.19/src/libs/libgroff/glyphuni.cpp b/contrib/groff-1.19/src/libs/libgroff/glyphuni.cpp index 979d6e22ce..4cd4917e60 100644 --- a/contrib/groff-1.19/src/libs/libgroff/glyphuni.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/glyphuni.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" #include "stringclass.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/htmlhint.cpp b/contrib/groff-1.19/src/libs/libgroff/htmlhint.cpp index 3015767d0d..6ade0777d2 100644 --- a/contrib/groff-1.19/src/libs/libgroff/htmlhint.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/htmlhint.cpp @@ -15,7 +15,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/hypot.cpp b/contrib/groff-1.19/src/libs/libgroff/hypot.cpp new file mode 100644 index 0000000000..6d2606d8f7 --- /dev/null +++ b/contrib/groff-1.19/src/libs/libgroff/hypot.cpp @@ -0,0 +1,40 @@ +/* Copyright (C) 2005 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + +#ifdef NEED_DECLARATION_HYPOT + double hypot(double, double); +#endif /* NEED_DECLARATION_HYPOT */ + +double groff_hypot(double x, double y) +{ + double result = hypot(x, y); + +#ifdef __INTERIX + /* hypot() on Interix is broken */ + if (isnan(result) && !isnan(x) && !isnan(y)) + return 0.0; +#endif + + return result; +} diff --git a/contrib/groff-1.19/src/libs/libgroff/iftoa.c b/contrib/groff-1.19/src/libs/libgroff/iftoa.c index 2d23282448..d1751c57ce 100644 --- a/contrib/groff-1.19/src/libs/libgroff/iftoa.c +++ b/contrib/groff-1.19/src/libs/libgroff/iftoa.c @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #define INT_DIGITS 19 /* enough for 64-bit integer */ diff --git a/contrib/groff-1.19/src/libs/libgroff/invalid.cpp b/contrib/groff-1.19/src/libs/libgroff/invalid.cpp index f36894a8b4..959aef9381 100644 --- a/contrib/groff-1.19/src/libs/libgroff/invalid.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/invalid.cpp @@ -15,7 +15,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/itoa.c b/contrib/groff-1.19/src/libs/libgroff/itoa.c index 0d035d0695..85fb68bba7 100644 --- a/contrib/groff-1.19/src/libs/libgroff/itoa.c +++ b/contrib/groff-1.19/src/libs/libgroff/itoa.c @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #define INT_DIGITS 19 /* enough for 64 bit integer */ #define UINT_DIGITS 20 diff --git a/contrib/groff-1.19/src/libs/libgroff/lf.cpp b/contrib/groff-1.19/src/libs/libgroff/lf.cpp index 34272c7d03..3254fcf157 100644 --- a/contrib/groff-1.19/src/libs/libgroff/lf.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/lf.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -16,10 +16,11 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ -#include #include + +#include "lib.h" #include "cset.h" #include "stringclass.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/macropath.cpp b/contrib/groff-1.19/src/libs/libgroff/macropath.cpp index 03c04cbafd..2c09fd7662 100644 --- a/contrib/groff-1.19/src/libs/libgroff/macropath.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/macropath.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" #include "searchpath.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/matherr.c b/contrib/groff-1.19/src/libs/libgroff/matherr.c index 757a540417..2a65e18529 100644 --- a/contrib/groff-1.19/src/libs/libgroff/matherr.c +++ b/contrib/groff-1.19/src/libs/libgroff/matherr.c @@ -15,7 +15,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H #include diff --git a/contrib/groff-1.19/src/libs/libgroff/maxfilename.cpp b/contrib/groff-1.19/src/libs/libgroff/maxfilename.cpp index 25f554991c..9215cd921b 100644 --- a/contrib/groff-1.19/src/libs/libgroff/maxfilename.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/maxfilename.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1992, 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1992, 2001, 2003, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ /* file_name_max(dir) does the same as pathconf(dir, _PC_NAME_MAX) */ @@ -37,10 +37,6 @@ size_t file_name_max(const char *fname) #else /* not _POSIX_VERSION */ -#ifdef HAVE_CC_LIMITS_H -#include -#endif /* HAVE_CC_LIMITS_H */ - #ifdef HAVE_DIRENT_H #include #else /* not HAVE_DIRENT_H */ diff --git a/contrib/groff-1.19/src/libs/libgroff/mksdir.cpp b/contrib/groff-1.19/src/libs/libgroff/mksdir.cpp index bf4d300b92..472bd9e291 100644 --- a/contrib/groff-1.19/src/libs/libgroff/mksdir.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/mksdir.cpp @@ -15,7 +15,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file is heavily based on the file mkstemp.c which is part of the diff --git a/contrib/groff-1.19/src/libs/libgroff/nametoindex.cpp b/contrib/groff-1.19/src/libs/libgroff/nametoindex.cpp index 5557f5dc83..e4dacff2ba 100644 --- a/contrib/groff-1.19/src/libs/libgroff/nametoindex.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/nametoindex.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/new.cpp b/contrib/groff-1.19/src/libs/libgroff/new.cpp index 93347b4f2d..84393fd8fb 100644 --- a/contrib/groff-1.19/src/libs/libgroff/new.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/new.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/paper.cpp b/contrib/groff-1.19/src/libs/libgroff/paper.cpp index 94b0a737a1..4f114f4c3c 100644 --- a/contrib/groff-1.19/src/libs/libgroff/paper.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/paper.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" #include "paper.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/ptable.cpp b/contrib/groff-1.19/src/libs/libgroff/ptable.cpp index 76735c2426..bde2c3cada 100644 --- a/contrib/groff-1.19/src/libs/libgroff/ptable.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/ptable.cpp @@ -15,7 +15,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "ptable.h" #include "errarg.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/quotearg.c b/contrib/groff-1.19/src/libs/libgroff/quotearg.c index 1aedf51ac1..0ab3dc6aa7 100644 --- a/contrib/groff-1.19/src/libs/libgroff/quotearg.c +++ b/contrib/groff-1.19/src/libs/libgroff/quotearg.c @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include diff --git a/contrib/groff-1.19/src/libs/libgroff/searchpath.cpp b/contrib/groff-1.19/src/libs/libgroff/searchpath.cpp index 122f8e560a..6b9b81cc25 100644 --- a/contrib/groff-1.19/src/libs/libgroff/searchpath.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/searchpath.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" @@ -28,6 +28,12 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "searchpath.h" #include "nonposix.h" +#ifdef _WIN32 +# include "relocate.h" +#else +# define relocate(path) strsave(path) +#endif + search_path::search_path(const char *envvar, const char *standard, int add_home, int add_current) { @@ -108,11 +114,16 @@ FILE *search_path::open_file(const char *name, char **pathp) if (!end) end = strchr(p, '\0'); int need_slash = end > p && strchr(DIR_SEPS, end[-1]) == 0; - char *path = new char[(end - p) + need_slash + namelen + 1]; - memcpy(path, p, end - p); + char *origpath = new char[(end - p) + need_slash + namelen + 1]; + memcpy(origpath, p, end - p); if (need_slash) - path[end - p] = '/'; - strcpy(path + (end - p) + need_slash, name); + origpath[end - p] = '/'; + strcpy(origpath + (end - p) + need_slash, name); +#if 0 + fprintf(stderr, "origpath `%s'\n", origpath); +#endif + char *path = relocate(origpath); + a_delete origpath; #if 0 fprintf(stderr, "trying `%s'\n", path); #endif @@ -160,11 +171,16 @@ FILE *search_path::open_file_cautious(const char *name, char **pathp, if (!end) end = strchr(p, '\0'); int need_slash = end > p && strchr(DIR_SEPS, end[-1]) == 0; - char *path = new char[(end - p) + need_slash + namelen + 1]; - memcpy(path, p, end - p); + char *origpath = new char[(end - p) + need_slash + namelen + 1]; + memcpy(origpath, p, end - p); if (need_slash) - path[end - p] = '/'; - strcpy(path + (end - p) + need_slash, name); + origpath[end - p] = '/'; + strcpy(origpath + (end - p) + need_slash, name); +#if 0 + fprintf(stderr, "origpath `%s'\n", origpath); +#endif + char *path = relocate(origpath); + a_delete origpath; #if 0 fprintf(stderr, "trying `%s'\n", path); #endif diff --git a/contrib/groff-1.19/src/libs/libgroff/spawnvp.c b/contrib/groff-1.19/src/libs/libgroff/spawnvp.c index f070b77f1b..1848124f3b 100644 --- a/contrib/groff-1.19/src/libs/libgroff/spawnvp.c +++ b/contrib/groff-1.19/src/libs/libgroff/spawnvp.c @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/string.cpp b/contrib/groff-1.19/src/libs/libgroff/string.cpp index 2ef547e478..9be873c8ef 100644 --- a/contrib/groff-1.19/src/libs/libgroff/string.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/string.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/strsave.cpp b/contrib/groff-1.19/src/libs/libgroff/strsave.cpp index dfd2b6f407..2db70737a1 100644 --- a/contrib/groff-1.19/src/libs/libgroff/strsave.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/strsave.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include diff --git a/contrib/groff-1.19/src/libs/libgroff/symbol.cpp b/contrib/groff-1.19/src/libs/libgroff/symbol.cpp index b7b3b9e990..38e30712e6 100644 --- a/contrib/groff-1.19/src/libs/libgroff/symbol.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/symbol.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/tmpfile.cpp b/contrib/groff-1.19/src/libs/libgroff/tmpfile.cpp index d24b137b7e..fbc48c81d1 100644 --- a/contrib/groff-1.19/src/libs/libgroff/tmpfile.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/tmpfile.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/tmpname.cpp b/contrib/groff-1.19/src/libs/libgroff/tmpname.cpp index f867fe06d7..8d80f4ba33 100644 --- a/contrib/groff-1.19/src/libs/libgroff/tmpname.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/tmpname.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. Written by Werner Lemberg (wl@gnu.org) This file is part of groff. @@ -15,7 +15,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file is heavily based on the function __gen_tempname() in the @@ -48,8 +48,8 @@ extern "C" { #endif #endif -#if HAVE_CC_STDINT_H -# include +#if HAVE_CC_INTTYPES_H +# include #endif /* Use the widest available unsigned type if uint64_t is not diff --git a/contrib/groff-1.19/src/libs/libgroff/unicode.cpp b/contrib/groff-1.19/src/libs/libgroff/unicode.cpp index 211746347d..32810dfa80 100644 --- a/contrib/groff-1.19/src/libs/libgroff/unicode.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/unicode.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" #include "cset.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/uniglyph.cpp b/contrib/groff-1.19/src/libs/libgroff/uniglyph.cpp index 69d89e1ffd..ab6f531e44 100644 --- a/contrib/groff-1.19/src/libs/libgroff/uniglyph.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/uniglyph.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" #include "stringclass.h" diff --git a/contrib/groff-1.19/src/libs/libgroff/uniuni.cpp b/contrib/groff-1.19/src/libs/libgroff/uniuni.cpp index dd5f760b0a..61bc8334cc 100644 --- a/contrib/groff-1.19/src/libs/libgroff/uniuni.cpp +++ b/contrib/groff-1.19/src/libs/libgroff/uniuni.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ // This code has been algorithmically derived from the file // UnicodeData-3.2.0.txt, available from unicode.org. diff --git a/contrib/groff-1.19/src/preproc/eqn/box.cpp b/contrib/groff-1.19/src/preproc/eqn/box.cpp index d407090a45..953218a68d 100644 --- a/contrib/groff-1.19/src/preproc/eqn/box.cpp +++ b/contrib/groff-1.19/src/preproc/eqn/box.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "eqn.h" #include "pbox.h" diff --git a/contrib/groff-1.19/src/preproc/eqn/box.h b/contrib/groff-1.19/src/preproc/eqn/box.h index 0b385f8bbe..9484207703 100644 --- a/contrib/groff-1.19/src/preproc/eqn/box.h +++ b/contrib/groff-1.19/src/preproc/eqn/box.h @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2004, 2005 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -16,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ class list_box; @@ -62,6 +63,11 @@ public: friend class list_box; }; +// declarations to avoid friend name injection problems +box *make_script_box(box *, box *, box *); +box *make_mark_box(box *); +box *make_lineup_box(box *); + class list_box : public box { int is_script; box_list list; diff --git a/contrib/groff-1.19/src/preproc/eqn/delim.cpp b/contrib/groff-1.19/src/preproc/eqn/delim.cpp index b724180228..9bb7c9b982 100644 --- a/contrib/groff-1.19/src/preproc/eqn/delim.cpp +++ b/contrib/groff-1.19/src/preproc/eqn/delim.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "eqn.h" #include "pbox.h" diff --git a/contrib/groff-1.19/src/preproc/eqn/eqn.h b/contrib/groff-1.19/src/preproc/eqn/eqn.h index ee25f034e8..fca3e9793a 100644 --- a/contrib/groff-1.19/src/preproc/eqn/eqn.h +++ b/contrib/groff-1.19/src/preproc/eqn/eqn.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/preproc/eqn/eqn.man b/contrib/groff-1.19/src/preproc/eqn/eqn.man index 6d0733c4ad..0f47771c23 100644 --- a/contrib/groff-1.19/src/preproc/eqn/eqn.man +++ b/contrib/groff-1.19/src/preproc/eqn/eqn.man @@ -1,5 +1,5 @@ .ig -Copyright (C) 1989-2000, 2001 Free Software Foundation, Inc. +Copyright (C) 1989-2000, 2001, 2004, 2005 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -16,20 +16,41 @@ versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. .. -.ie \n(.V<\n(.v .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X -.el .ds tx TeX +. +. +.ie \n(.V<\n(.v \ +. ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X +.el \ +. ds tx TeX +. +. .\" 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" +. ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +. el .TP "\\$1" +.. +. +. +.de TQ +. br +. ns +. TP \\$1 .. +. +. .\" The BSD man macros can't handle " in arguments to font change macros, .\" so use \(ts instead of ". .tr \(ts" +. +. .TH @G@EQN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +. +. .SH NAME @g@eqn \- format equations for troff +. +. .SH SYNOPSIS .nr a \n(.j .ad l @@ -38,8 +59,8 @@ the original English. .ti \niu .B @g@eqn .de OP -.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" -.el .RB "[\ " "\\$1" "\ ]" +. ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" +. el .RB "[\ " "\\$1" "\ ]" .. .OP \-rvCNR .OP \-d xy @@ -52,9 +73,12 @@ the original English. .RI "[\ " files\|.\|.\|. "\ ]" .br .ad \na -.PP +. +.LP 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 eqn , @@ -69,13 +93,16 @@ Normally, it should be invoked using the option of .BR groff . The syntax is quite compatible with Unix eqn. -The output of GNU eqn cannot be processed with Unix troff; +The output of GNU +.B eqn +cannot be processed with Unix troff; it must be processed with GNU troff. If no files are given on the command line, the standard input will be read. A filename of .B \- will cause the standard input to be read. +. .LP .B eqn searches for the file @@ -87,25 +114,33 @@ option first, then in .BR @LOCALMACRODIR@ , and finally in the standard macro directory .BR @MACRODIR@ . -If it exists, eqn will process it before the other input files. +If it exists, +.B eqn +will process it before the other input files. The .B \-R option prevents this. +. .LP -GNU eqn does not provide the functionality of neqn: +GNU +.B eqn +does not provide the functionality of neqn: it does not support low-resolution, typewriter-like devices (although it may work adequately for very simple input). +. +. .SH OPTIONS .TP .BI \-d xy Specify delimiters .I x -and +and\~\c .I y for the left and right end, respectively, of in-line equations. Any .B delim statements in the source file overrides this. +. .TP .B \-C Recognize @@ -119,32 +154,38 @@ Don't allow newlines within delimiters. This option allows .B eqn to recover better from missing closing delimiters. +. .TP .B \-v Print the version number. +. .TP .B \-r Only one size reduction. +. .TP .BI \-m n -The minimum point-size is +The minimum point-size is\~\c .IR n . -eqn will not reduce the size of subscripts or superscripts to -a smaller size than +.B eqn +will not reduce the size of subscripts or superscripts to +a smaller size than\~\c .IR n . +. .TP .BI \-T name The output is for device .IR name . The only effect of this is to define a macro .I name -with a value of +with a value of\~\c .BR 1 . Typically .B eqnrc will use this to provide definitions appropriate for the output device. The default output device is .BR @DEVICE@ . +. .TP .BI \-M dir Search @@ -152,82 +193,109 @@ Search for .B eqnrc before the default directories. +. .TP .B \-R Don't load .BR eqnrc . +. .TP .BI \-f F This is equivalent to a .BI gfont\ F command. +. .TP .BI \-s n This is equivalent to a .BI gsize\ n command. This option is deprecated. -eqn will normally set equations at whatever the current point size +.B eqn +will normally set equations at whatever the current point size is when the equation is encountered. +. .TP .BI \-p n This says that subscripts and superscripts should be -.I n +.I n\~\c points smaller than the surrounding text. This option is deprecated. -Normally eqn makes sets subscripts and superscripts at 70% +Normally +.B eqn +makes sets subscripts and superscripts at 70% of the size of the surrounding text. +. +. .SH USAGE -Only the differences between GNU eqn and Unix eqn are described here. +Only the differences between GNU +.B eqn +and Unix eqn are described here. +. .LP -Most of the new features of GNU eqn +Most of the new features of GNU +.B eqn are based on \*(tx. -There are some references to the differences between \*(tx and GNU eqn below; +There are some references to the differences between \*(tx and GNU +.B eqn +below; these may safely be ignored if you do not know \*(tx. +. .SS Automatic spacing -.LP .B eqn gives each component of an equation a type, and adjusts the spacing between components using that type. Possible types are: +. +.RS .TP \w'punctuation'u+2n ordinary -an ordinary character such as 1 or -.IR x ; +an ordinary character such as `1' or `\c +.IR x '; +. .TP operator a large operator such as -.ds Su \s+5\(*S\s0 +.ds Su `\s+5\(*S\s0' .if \n(.g .if !c\(*S .ds Su the summation operator \*(Su; +. .TP binary -a binary operator such as +; +a binary operator such as `\(pl'; +. .TP relation -a relation such as =; +a relation such as `='; +. .TP opening -a opening bracket such as (; +a opening bracket such as `('; +. .TP closing -a closing bracket such as ); +a closing bracket such as `)'; +. .TP punctuation -a punctuation character such as ,; +a punctuation character such as `,'; +. .TP inner a subformula contained within brackets; .TP suppress spacing that suppresses automatic spacing adjustment. +.RE +. .LP Components of an equation get a type in one of two ways. +. .TP .BI type\ t\ e -This yields an equation component that contains +This yields an equation component that contains\~\c .I e -but that has type +but that has type\~\c .IR t , where .I t @@ -235,14 +303,17 @@ is one of the types mentioned above. For example, .B times is defined as +. .RS .IP .B type "binary" \e(mu .RE +. .IP The name of the type doesn't have to be quoted, but quoting protects from macro expansion. +. .TP .BI chartype\ t\ text Unquoted groups of characters are split up into individual characters, @@ -250,20 +321,20 @@ and the type of each character is looked up; this changes the type that is stored for each character; it says that the characters in .I text -from now on have type +from now on have type\~\c .IR t . For example, +. .RS .IP .B chartype "punctuation" .,;: .RE +. .IP -would make the characters -.B .,;: -have type punctuation +would make the characters `.,;:' have type punctuation whenever they subsequently appeared in an equation. -The type +The type\~\c .I t can also be .B letter @@ -272,7 +343,10 @@ or in these cases .B chartype changes the font type of the characters. -See the Fonts subsection. +See the +.B Fonts +subsection. +. .SS New primitives .TP .IB e1\ smallover\ e2 @@ -297,22 +371,25 @@ primitive in display styles; corresponds to .B \eover in non-display styles. +. .TP .BI vcenter\ e This vertically centers .I e about the math axis. The math axis is the vertical position about which characters -such as + and - are centered; also it is the vertical position +such as `\(pl' and `\(mi' are centered; also it is the vertical position used for the bar of fractions. For example, .B sum is defined as +. .RS .IP .B { type "operator" vcenter size +5 \e(*S } .RE +. .TP .IB e1\ accent\ e2 This sets @@ -328,21 +405,24 @@ is taller or shorter than a lowercase letter. For example, .B hat is defined as +. .RS .IP .B accent { "^" } .RE +. .IP .BR dotdot , .BR dot , .BR tilde , -.B vec +.BR vec , and .B dyad are also defined using the .B accent primitive. +. .TP .IB e1\ uaccent\ e2 This sets @@ -359,13 +439,16 @@ has a descender. is pre-defined using .B uaccent as a tilde accent below the baseline. +. .TP .BI split\ \(ts text \(ts This has the same effect as simply +. .RS .IP .I text .RE +. .IP but .I text @@ -373,13 +456,16 @@ is not subject to macro expansion because it is quoted; .I text will be split up and the spacing between individual characters will be adjusted. +. .TP .BI nosplit\ text This has the same effect as +. .RS .IP .BI \(ts text \(ts .RE +. .IP but because .I text @@ -387,11 +473,12 @@ is not quoted it will be subject to macro expansion; .I text will not be split up and the spacing between individual characters will not be adjusted. +. .TP .IB e\ opprime This is a variant of .B prime -that acts as an operator on +that acts as an operator on\~\c .IR e . It produces a different result from .B prime @@ -399,14 +486,14 @@ in a case such as .BR A\ opprime\ sub\ 1 : with .B opprime -the +the\~\c .B 1 -will be tucked under the prime as a subscript to the +will be tucked under the prime as a subscript to the\~\c .B A (as is conventional in mathematical typesetting), whereas with .B prime -the +the\~\c .B 1 will be a subscript to the prime character. The precedence of @@ -419,31 +506,32 @@ which is higher than that of everything except .B accent and .BR uaccent . -In unquoted text a +In unquoted text a\~\c .B ' that is not the first character will be treated like .BR opprime . +. .TP .BI special\ text\ e -This constructs a new object from +This constructs a new object from\~\c .I e using a -.BR @g@troff (@MAN1EXT@) +.BR @g@troff (@MAN1EXT@) macro named .IR text . When the macro is called, the string .B 0s -will contain the output for +will contain the output for\~\c .IR e , and the number registers .BR 0w , .BR 0h , .BR 0d , -.BR 0skern +.BR 0skern , and .BR 0skew -will contain the width, height, depth, subscript kern, and skew of +will contain the width, height, depth, subscript kern, and skew of\~\c .IR e . (The .I "subscript kern" @@ -459,82 +547,178 @@ point, and increase the current horizontal position by the width of the object. The number registers must also be modified so that they correspond to the result. -.RS -.LP +. +.IP For example, suppose you wanted a construct that `cancels' an expression by drawing a diagonal line through it. +. +.RS .IP -.nf .ft B .if t .ne 6+\n(.Vu +.br \&.EQ +.br define cancel 'special Ca' +.br \&.EN +.br \&.de Ca -\&.ds 0s \eZ'\e\e*(0s'\ev'\e\en(0du'\eD'l \e\en(0wu -\e\en(0hu-\e\en(0du'\ev'\e\en(0hu' +.br +\&.\ \ ds 0s \e +.br +\eZ'\e\e*(0s'\e +.br +\ev'\e\en(0du'\e +.br +\eD'l \e\en(0wu -\e\en(0hu-\e\en(0du'\e +.br +\ev'\e\en(0hu' +.br \&.. .ft -.fi -.LP -Then you could cancel an expression +.RE +. +.IP +Then you could cancel an expression\~\c .I e with -.BI cancel\ {\ e\ } -.LP +.BI \%cancel\ {\ e\ } +. +.IP Here's a more complicated construct that draws a box round an expression: +. +.RS .IP -.nf .ft B .if t .ne 11+\n(.Vu \&.EQ +.br define box 'special Bx' +.br \&.EN +.br \&.de Bx -\&.ds 0s \eZ'\eh'1n'\e\e*(0s'\e -\eZ'\ev'\e\en(0du+1n'\eD'l \e\en(0wu+2n 0'\eD'l 0 -\e\en(0hu-\e\en(0du-2n'\e -\eD'l -\e\en(0wu-2n 0'\eD'l 0 \e\en(0hu+\e\en(0du+2n''\eh'\e\en(0wu+2n' -\&.nr 0w +2n -\&.nr 0d +1n -\&.nr 0h +1n +.br +\&.\ \ ds 0s \e +.br +\eZ'\eh'1n'\e\e*(0s'\e +.br +\eZ'\e +.br +\ev'\e\en(0du+1n'\e +.br +\eD'l \e\en(0wu+2n 0'\e +.br +\eD'l 0 -\e\en(0hu-\e\en(0du-2n'\e +.br +\eD'l -\e\en(0wu-2n 0'\e +.br +\eD'l 0 \e\en(0hu+\e\en(0du+2n'\e +.br +\&'\e +.br +\eh'\e\en(0wu+2n' +.br +\&.\ \ nr 0w +2n +.br +\&.\ \ nr 0d +1n +.br +\&.\ \ nr 0h +1n +.br \&.. .ft -.fi .RE +. +.TP +.BI space\ n +A positive value of the integer\~\c +.I n +(in hundredths of an em) sets the vertical spacing before the equation, +a negative value sets the spacing after the equation, replacing the +default values. +This primitive provides an interface to +.BR groff 's +.B \ex +escape (but with opposite sign). +. +.IP +This keyword has no effect if the equation is part of a +.B pic +picture. +. +.SS Extended primitives +.TP +.BI col\ n\ {\ .\|.\|.\ } +.TQ +.BI ccol\ n\ {\ .\|.\|.\ } +.TQ +.BI lcol\ n\ {\ .\|.\|.\ } +.TQ +.BI rcol\ n\ {\ .\|.\|.\ } +.TQ +.BI pile\ n\ {\ .\|.\|.\ } +.TQ +.BI cpile\ n\ {\ .\|.\|.\ } +.TQ +.BI lpile\ n\ {\ .\|.\|.\ } +.TQ +.BI rpile\ n\ {\ .\|.\|.\ } +The integer value\~\c +.I n +(in hundredths of an em) increases the vertical spacing between rows, +using +.BR groff 's +.B \ex +escape. +Negative values are possible but have no effect. +If there is more than a single value given in a matrix, the biggest one +is used. +. .SS Customization -The appearance of equations is controlled by -a large number of parameters. These can be set using +The appearance of equations is controlled by a large number of parameters. +These can be set using the .B set command. +. .TP .BI set\ p\ n -This sets parameter +This sets parameter\~\c .I p -to value -.I n ; -.I n +to value\~\c +.IR n ; +.I n\~\c is an integer. For example, +. .RS .IP .B set x_height 45 .RE +. .IP says that .B eqn -should assume an x height of 0.45 ems. +should assume an x\~height of 0.45\~ems. +. .RS .LP Possible parameters are as follows. Values are in units of hundredths of an em unless otherwise stated. These descriptions are intended to be expository rather than definitive. -.TP \w'\fBdefault_rule_thickness'u+2n +. +.ie t \ +. TP \w'\fBdefault_rule_thickness'u+2n +.el \ +. TP .B minimum_size .B eqn will not set anything at a smaller point-size than this. The value is in points. +. .TP .B fat_offset The @@ -542,12 +726,14 @@ The primitive emboldens an equation by overprinting two copies of the equation horizontally offset by this amount. +. .TP .B over_hang A fraction bar will be longer by twice this amount than the maximum of the widths of the numerator and denominator; in other words, it will overhang the numerator and denominator by at least this amount. +. .TP .B accent_width When @@ -563,6 +749,7 @@ or produces a line whose length is the width of the object to which it applies; in the case of a single character, this tends to produce a line that looks too long. +. .TP .B delimiter_factor Extensible delimiters produced with the @@ -572,6 +759,7 @@ and primitives will have a combined height and depth of at least this many thousandths of twice the maximum amount by which the sub-equation that the delimiters enclose extends away from the axis. +. .TP .B delimiter_shortfall Extensible delimiters produced with the @@ -583,34 +771,42 @@ not less than the difference of twice the maximum amount by which the sub-equation that the delimiters enclose extends away from the axis and this amount. +. .TP .B null_delimiter_space This much horizontal space is inserted on each side of a fraction. +. .TP .B script_space The width of subscripts and superscripts is increased by this amount. +. .TP .B thin_space This amount of space is automatically inserted after punctuation characters. +. .TP .B medium_space This amount of space is automatically inserted on either side of binary operators. +. .TP .B thick_space This amount of space is automatically inserted on either side of relations. +. .TP .B x_height -The height of lowercase letters without ascenders such as x. +The height of lowercase letters without ascenders such as `x'. +. .TP .B axis_height The height above the baseline of the center of characters -such as \(pl and \(mi. +such as `\(pl' and `\(mi'. It is important that this value is correct for the font you are using. +. .TP .B default_rule_thickness This should set to the thickness of the @@ -618,29 +814,35 @@ This should set to the thickness of the character, or the thickness of horizontal lines produced with the .B \eD escape sequence. +. .TP .B num1 The .B over command will shift up the numerator by at least this amount. +. .TP .B num2 The .B smallover command will shift up the numerator by at least this amount. +. .TP .B denom1 The .B over command will shift down the denominator by at least this amount. +. .TP .B denom2 The .B smallover command will shift down the denominator by at least this amount. +. .TP .B sup1 Normally superscripts will be shifted up by at least this amount. +. .TP .B sup2 Superscripts within superscripts or upper limits @@ -649,47 +851,58 @@ or numerators of fractions will be shifted up by at least this amount. This is usually less than sup1. +. .TP .B sup3 Superscripts within denominators or square roots or subscripts or lower limits will be shifted up by at least this amount. This is usually less than sup2. +. .TP .B sub1 Subscripts will normally be shifted down by at least this amount. +. .TP .B sub2 When there is both a subscript and a superscript, the subscript will be shifted down by at least this amount. +. .TP .B sup_drop The baseline of a superscript will be no more than this much amount below the top of the object on which the superscript is set. +. .TP .B sub_drop The baseline of a subscript will be at least this much below the bottom of the object on which the subscript is set. +. .TP .B big_op_spacing1 The baseline of an upper limit will be at least this much above the top of the object on which the limit is set. +. .TP .B big_op_spacing2 The baseline of a lower limit will be at least this much below the bottom of the object on which the limit is set. +. .TP .B big_op_spacing3 The bottom of an upper limit will be at least this much above the top of the object on which the limit is set. +. .TP .B big_op_spacing4 The top of a lower limit will be at least this much below the bottom of the object on which the limit is set. +. .TP .B big_op_spacing5 This much vertical space will be added above and below limits. +. .TP .B baseline_sep The baselines of the rows in a pile or matrix will normally be @@ -698,18 +911,22 @@ In most cases this should be equal to the sum of .B num1 and .BR denom1 . +. .TP .B shift_down The midpoint between the top baseline and the bottom baseline in a matrix or pile will be shifted down by this much from the axis. In most cases this should be equal to .BR axis_height . +. .TP .B column_sep This much space will be added between columns in a matrix. +. .TP .B matrix_side_sep This much space will be added at each side of a matrix. +. .TP .B draw_lines If this is non-zero, lines will be drawn using the @@ -719,20 +936,23 @@ escape sequence, rather than with the escape sequence and the .B \e(ru character. +. .TP .B body_height The amount by which the height of the equation exceeds this will be added as extra space before the line containing the equation (using -.BR \ex .) +.BR \ex ). The default value is 85. +. .TP .B body_depth The amount by which the depth of the equation exceeds this will be added as extra space after the line containing the equation (using -.BR \ex .) +.BR \ex ). The default value is 35. +. .TP .B nroff If this is non-zero, @@ -750,8 +970,8 @@ will behave like and .B ndefine will be ignored. -The default value is 0 -(This is typically changed to 1 by the +The default value is\~0 +(This is typically changed to\~1 by the .B eqnrc file for the .BR ascii , @@ -760,23 +980,25 @@ file for the and .B cp1047 devices.) +. .LP A more precise description of the role of many of these -parameters can be found in Appendix H of -.IR The\ \*(txbook . +parameters can be found in Appendix\~H of +.IR "The \*(txbook" . .RE +. .SS Macros Macros can take arguments. In a macro body, .BI $ n where .I n -is between 1 and 9, +is between 1 and\~9, will be replaced by the .IR n-th argument if the macro is called with arguments; if there are fewer than -.I n +.I n\~\c arguments, it will be replaced by nothing. A word containing a left parenthesis where the part of the word before the left parenthesis has been defined using the @@ -787,6 +1009,7 @@ characters following the left parenthesis up to a matching right parenthesis will be treated as comma-separated arguments; commas inside nested parentheses do not terminate an argument. +. .TP .BI sdefine\ name\ X\ anything\ X This is like the @@ -794,10 +1017,17 @@ This is like the command, but .I name will not be recognized if called with arguments. +. .TP .BI include\ \(ts file \(ts +.TQ +.BI copy\ \(ts file \(ts Include the contents of -.IR file . +.I file +.RB ( include +and +.B copy +are synonyms). Lines of .I file beginning with @@ -805,6 +1035,7 @@ beginning with or .B .EN will be ignored. +. .TP .BI ifdef\ name\ X\ anything\ X If @@ -821,6 +1052,29 @@ otherwise ignore .I X can be any character not appearing in .IR anything . +. +.TP +.BI undef\ name +Remove definition of +.IR name , +making it undefined. +. +.LP +Besides the macros mentioned above, the following definitions are available: +.BR Alpha , +.BR Beta , +\&.\|.\|., +.B Omega +(this is the same as +.BR ALPHA , +.BR BETA , +\&.\|.\|., +.BR OMEGA ), +.B ldots +(three dots on the base line), +and +.BR dollar . +. .SS Fonts .B eqn normally uses at least two fonts to set an equation: @@ -830,16 +1084,18 @@ The existing .B gfont command changes the font that is used as the italic font. -By default this is +By default this is\~\c .BR I . The font that is used as the roman font can be changed using the new .B grfont command. +. .TP .BI grfont\ f -Set the roman font to +Set the roman font to\~\c .IR f . +. .LP The .B italic @@ -867,6 +1123,7 @@ just by using and .B gbfont commands. +. .LP You can control which characters are treated as letters (and therefore set in italics) by using the @@ -878,16 +1135,23 @@ will cause a character to be set in italic type. A type of .B digit will cause a character to be set in roman type. +. +. .SH FILES .Tp \w'\fB@MACRODIR@/eqnrc'u+2n .B @MACRODIR@/eqnrc Initialization file. +. +. .SH BUGS Inline equations will be set at the point size that is current at the beginning of the input line. +. +. .SH "SEE ALSO" .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), +.BR @g@pic (@MAN1EXT@), .BR groff_font (@MAN5EXT@), .I The\ \*(txbook . diff --git a/contrib/groff-1.19/src/preproc/eqn/eqn.y b/contrib/groff-1.19/src/preproc/eqn/eqn.y index c145b09855..85157d6fce 100644 --- a/contrib/groff-1.19/src/preproc/eqn/eqn.y +++ b/contrib/groff-1.19/src/preproc/eqn/eqn.y @@ -15,7 +15,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ %{ #include #include diff --git a/contrib/groff-1.19/src/preproc/eqn/lex.cpp b/contrib/groff-1.19/src/preproc/eqn/lex.cpp index abc07c9cfd..6aa494dbf0 100644 --- a/contrib/groff-1.19/src/preproc/eqn/lex.cpp +++ b/contrib/groff-1.19/src/preproc/eqn/lex.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,13 +17,19 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "eqn.h" #include "eqn_tab.h" #include "stringclass.h" #include "ptable.h" + +// declarations to avoid friend name injection problems +int get_char(); +int peek_char(); +int get_location(char **, int *); + struct definition { char is_macro; char is_simple; diff --git a/contrib/groff-1.19/src/preproc/eqn/limit.cpp b/contrib/groff-1.19/src/preproc/eqn/limit.cpp index c8b55877d9..b9f35f97ef 100644 --- a/contrib/groff-1.19/src/preproc/eqn/limit.cpp +++ b/contrib/groff-1.19/src/preproc/eqn/limit.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "eqn.h" #include "pbox.h" diff --git a/contrib/groff-1.19/src/preproc/eqn/list.cpp b/contrib/groff-1.19/src/preproc/eqn/list.cpp index 1118fa1b16..003562afa5 100644 --- a/contrib/groff-1.19/src/preproc/eqn/list.cpp +++ b/contrib/groff-1.19/src/preproc/eqn/list.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "eqn.h" #include "pbox.h" diff --git a/contrib/groff-1.19/src/preproc/eqn/main.cpp b/contrib/groff-1.19/src/preproc/eqn/main.cpp index dabac5fd29..7971e2c2dc 100644 --- a/contrib/groff-1.19/src/preproc/eqn/main.cpp +++ b/contrib/groff-1.19/src/preproc/eqn/main.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "eqn.h" #include "stringclass.h" diff --git a/contrib/groff-1.19/src/preproc/eqn/mark.cpp b/contrib/groff-1.19/src/preproc/eqn/mark.cpp index 99d1b75f2f..9fa65790c6 100644 --- a/contrib/groff-1.19/src/preproc/eqn/mark.cpp +++ b/contrib/groff-1.19/src/preproc/eqn/mark.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "eqn.h" #include "pbox.h" diff --git a/contrib/groff-1.19/src/preproc/eqn/neqn.sh b/contrib/groff-1.19/src/preproc/eqn/neqn.sh index f2b5fdfce6..f22a2baa17 100644 --- a/contrib/groff-1.19/src/preproc/eqn/neqn.sh +++ b/contrib/groff-1.19/src/preproc/eqn/neqn.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#! /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. diff --git a/contrib/groff-1.19/src/preproc/eqn/other.cpp b/contrib/groff-1.19/src/preproc/eqn/other.cpp index c052f52397..9f360df679 100644 --- a/contrib/groff-1.19/src/preproc/eqn/other.cpp +++ b/contrib/groff-1.19/src/preproc/eqn/other.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "eqn.h" #include "pbox.h" diff --git a/contrib/groff-1.19/src/preproc/eqn/over.cpp b/contrib/groff-1.19/src/preproc/eqn/over.cpp index 279efc8b43..302c5b5d50 100644 --- a/contrib/groff-1.19/src/preproc/eqn/over.cpp +++ b/contrib/groff-1.19/src/preproc/eqn/over.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "eqn.h" #include "pbox.h" diff --git a/contrib/groff-1.19/src/preproc/eqn/pbox.h b/contrib/groff-1.19/src/preproc/eqn/pbox.h index d1f16ac486..f100f21656 100644 --- a/contrib/groff-1.19/src/preproc/eqn/pbox.h +++ b/contrib/groff-1.19/src/preproc/eqn/pbox.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ extern int fat_offset; diff --git a/contrib/groff-1.19/src/preproc/eqn/pile.cpp b/contrib/groff-1.19/src/preproc/eqn/pile.cpp index e641b7ffd4..10d1708809 100644 --- a/contrib/groff-1.19/src/preproc/eqn/pile.cpp +++ b/contrib/groff-1.19/src/preproc/eqn/pile.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ // piles and matrices #include "eqn.h" diff --git a/contrib/groff-1.19/src/preproc/eqn/script.cpp b/contrib/groff-1.19/src/preproc/eqn/script.cpp index 7d038309c2..a9de742871 100644 --- a/contrib/groff-1.19/src/preproc/eqn/script.cpp +++ b/contrib/groff-1.19/src/preproc/eqn/script.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "eqn.h" #include "pbox.h" diff --git a/contrib/groff-1.19/src/preproc/eqn/special.cpp b/contrib/groff-1.19/src/preproc/eqn/special.cpp index 310261ae4c..172686a505 100644 --- a/contrib/groff-1.19/src/preproc/eqn/special.cpp +++ b/contrib/groff-1.19/src/preproc/eqn/special.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "eqn.h" #include "pbox.h" diff --git a/contrib/groff-1.19/src/preproc/eqn/sqrt.cpp b/contrib/groff-1.19/src/preproc/eqn/sqrt.cpp index f998ff3320..8f3373ff9c 100644 --- a/contrib/groff-1.19/src/preproc/eqn/sqrt.cpp +++ b/contrib/groff-1.19/src/preproc/eqn/sqrt.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "eqn.h" #include "pbox.h" diff --git a/contrib/groff-1.19/src/preproc/eqn/text.cpp b/contrib/groff-1.19/src/preproc/eqn/text.cpp index 83e4a764c9..e39221276b 100644 --- a/contrib/groff-1.19/src/preproc/eqn/text.cpp +++ b/contrib/groff-1.19/src/preproc/eqn/text.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "eqn.h" #include "pbox.h" diff --git a/contrib/groff-1.19/src/preproc/grn/grn.man b/contrib/groff-1.19/src/preproc/grn/grn.man index b9bf60a334..575b4ee70c 100644 --- a/contrib/groff-1.19/src/preproc/grn/grn.man +++ b/contrib/groff-1.19/src/preproc/grn/grn.man @@ -1,6 +1,6 @@ '\" t .ig -Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -149,7 +149,7 @@ Recognize .B .GS and .B .GE -(resp. +(and .BR .GF ) even when followed by a character other than space or newline. .\".TP @@ -195,7 +195,7 @@ Set text size number 1 (2, 3, or 4) to .I N points. -The default is 12 (resp. 16, 24, and 36). +The default is 12 (16, 24, and 36, respectively). .TP .BI roman\ f .TQ @@ -209,7 +209,7 @@ Set the roman (italics, bold, or special) font to font .I f (either a name or number). -The default is R (resp. I, B, and S). +The default is R (I, B, and S, respectively). .TP .BI l\ f .TQ @@ -249,11 +249,11 @@ may be abbreviated down to `sc'. .BI thick\ N Set the thickness of .IR gremlin 's -narrow (resp. medium and thick) lines to +narrow (medium and thick, respectively) lines to .I N times 0.15pt (this value can be changed at compile time). -The default is 1.0 (resp. 3.0 and 5.0), which corresponds to 0.15pt -(resp. 0.45pt and 0.75pt). +The default is 1.0 (3.0 and 5.0, respectively), which corresponds to 0.15pt +(0.45pt and 0.75pt, respectively). A thickness value of zero selects the smallest available line thickness. Negative values cause the line thickness to be proportional to the current point size. @@ -262,7 +262,10 @@ point size. Scale text to match the picture. Gremlin text is usually printed in the point size specified with the commands -.BR 1 ,\ 2 ,\ 3 ,\ or\ 4 +.BR 1 , +.BR 2 , +.BR 3 , +.RB or\~ 4 , regardless of any scaling factors in the picture. Setting .B pointscale diff --git a/contrib/groff-1.19/src/preproc/grn/hdb.cpp b/contrib/groff-1.19/src/preproc/grn/hdb.cpp index a9641ee2e0..5f54040dd5 100644 --- a/contrib/groff-1.19/src/preproc/grn/hdb.cpp +++ b/contrib/groff-1.19/src/preproc/grn/hdb.cpp @@ -22,6 +22,7 @@ extern int linenum; /* current line number in input file */ extern char gremlinfile[]; /* name of file currently reading */ extern int SUNFILE; /* TRUE if SUN gremlin file */ +extern int compatibility_flag; /* TRUE if in compatibility mode */ extern void savebounds(double x, double y); /* imports from hpoint.cpp */ @@ -146,6 +147,10 @@ DBRead(register FILE *file) (void) sscanf(string, "%lf%lf", &x, &y); if ((x == -1.00 && y == -1.00) && (!SUNFILE)) lastpoint = TRUE; + else { + if (compatibility_flag) + savebounds(xorn(x, y), yorn(x, y)); + } } } while (!lastpoint); #endif /* UW_FASTSCAN */ diff --git a/contrib/groff-1.19/src/preproc/grn/hgraph.cpp b/contrib/groff-1.19/src/preproc/grn/hgraph.cpp index 88fc6becdd..01208951f2 100644 --- a/contrib/groff-1.19/src/preproc/grn/hgraph.cpp +++ b/contrib/groff-1.19/src/preproc/grn/hgraph.cpp @@ -8,19 +8,13 @@ #include "gprint.h" -#ifdef NEED_DECLARATION_HYPOT -extern "C" { - double hypot(double, double); -} -#endif /* NEED_DECLARATION_HYPOT */ - #define MAXVECT 40 #define MAXPOINTS 200 #define LINELENGTH 1 #define PointsPerInterval 64 #define pi 3.14159265358979324 #define twopi (2.0 * pi) -#define len(a, b) hypot((double)(b.x-a.x), (double)(b.y-a.y)) +#define len(a, b) groff_hypot((double)(b.x-a.x), (double)(b.y-a.y)) extern int dotshifter; /* for the length of dotted curves */ @@ -600,7 +594,7 @@ HGArc(register int cx, length = 0; - resolution = (1.0 + hypot(xs, ys) / res) * PointsPerInterval; + resolution = (1.0 + groff_hypot(xs, ys) / res) * PointsPerInterval; /* mask = (1 << (int) log10(resolution + 1.0)) - 1; */ (void) frexp(resolution, &m); /* A bit more elegant than log10 */ for (mask = 1; mask < m; mask = mask << 1); @@ -671,13 +665,13 @@ picurve(register int *x, for (; npts--; x++, y++) { /* traverse the line segments */ xp = x[0] - x[1]; yp = y[0] - y[1]; - nseg = (int) hypot((double) xp, (double) yp); + nseg = (int) groff_hypot((double) xp, (double) yp); xp = x[1] - x[2]; yp = y[1] - y[2]; /* `nseg' is the number of line */ /* segments that will be drawn for */ /* each curve segment. */ - nseg = (int) ((double) (nseg + (int) hypot((double) xp, (double) yp)) / + nseg = (int) ((double) (nseg + (int) groff_hypot((double) xp, (double) yp)) / res * PointsPerInterval); for (i = 1; i < nseg; i++) { @@ -795,7 +789,7 @@ Paramaterize(int x[], dy = y[j + 1] - y[j]; /* Here was overflowing, so I changed it. */ /* u[i] += sqrt ((double) (dx * dx + dy * dy)); */ - u[i] += hypot((double) dx, (double) dy); + u[i] += groff_hypot((double) dx, (double) dy); } } for (i = 1; i < n; ++i) diff --git a/contrib/groff-1.19/src/preproc/grn/main.cpp b/contrib/groff-1.19/src/preproc/grn/main.cpp index 2afa925d67..c939647f2c 100644 --- a/contrib/groff-1.19/src/preproc/grn/main.cpp +++ b/contrib/groff-1.19/src/preproc/grn/main.cpp @@ -214,7 +214,7 @@ int compatibility_flag = FALSE; /* TRUE if in compatibility mode */ void getres(); -char *doinput(FILE *fp); +int doinput(FILE *fp); void conv(register FILE *fp, int baseline); void savestate(); int has_polygon(register ELT *elist); @@ -317,7 +317,7 @@ main(int argc, } else fp = stdin; - while (doinput(fp) != NULL) { + while (doinput(fp)) { if (*c1 == '.' && *c2 == 'G' && *c3 == 'S') { if (compatibility_flag || *c4 == '\n' || *c4 == ' ' || *c4 == '\0') @@ -391,7 +391,7 @@ getres() /*----------------------------------------------------------------------------* - | Routine: char * doinput (file_pointer) + | Routine: int doinput (file_pointer) | | Results: A line of input is read into `inputline'. | @@ -401,16 +401,14 @@ getres() | updating `linenum'. *----------------------------------------------------------------------------*/ -char * +int doinput(FILE *fp) { - char *k; - - if ((k = fgets(inputline, MAXINLINE, fp)) == NULL) - return k; + if (fgets(inputline, MAXINLINE, fp) == NULL) + return 0; if (strchr(inputline, '\n')) /* ++ only if it's a complete line */ linenum++; - return (char *) !NULL; + return 1; } @@ -490,7 +488,7 @@ conv(register FILE *fp, strcpy(GScommand, inputline); /* save `.GS' line for later */ do { - done = (doinput(fp) == NULL); /* test for EOF */ + done = !doinput(fp); /* test for EOF */ flyback = (*c3 == 'F'); /* and .GE or .GF */ compat = (compatibility_flag || *c4 == '\n' || *c4 == ' ' || *c4 == '\0'); diff --git a/contrib/groff-1.19/src/preproc/html/pre-html.cpp b/contrib/groff-1.19/src/preproc/html/pre-html.cpp index 8abcb84c85..6f8a46aee0 100644 --- a/contrib/groff-1.19/src/preproc/html/pre-html.cpp +++ b/contrib/groff-1.19/src/preproc/html/pre-html.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #define PREHTMLC @@ -34,6 +34,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" #include "searchpath.h" #include "paper.h" +#include "device.h" #include "font.h" #include @@ -210,6 +211,7 @@ static char *htmlFileName = NULL; // output of pre-html output which static char *linebuf = NULL; // for scanning devps/DESC static int linebufsize = 0; +static const char *image_gen = NULL; // the `gs' program const char *const FONT_ENV_VAR = "GROFF_FONT_PATH"; static search_path font_path(FONT_ENV_VAR, FONTPATH, 0, 0); @@ -926,11 +928,12 @@ int imageList::createPage(int pageno) html_system(s, 1); s = make_message("echo showpage | " - "gs%s -q -dBATCH -dSAFER " + "%s%s -q -dBATCH -dSAFER " "-dDEVICEHEIGHTPOINTS=792 " "-dDEVICEWIDTHPOINTS=%d -dFIXEDMEDIA=true " "-sDEVICE=%s -r%d %s " "-sOutputFile=%s %s -\n", + image_gen, EXE_EXT, (getMaxX(pageno) * image_res) / postscriptRes, image_device, @@ -1542,13 +1545,10 @@ static int scanArguments(int argc, char **argv) { "version", no_argument, 0, 'v' }, { NULL, 0, 0, 0 } }; - while ((c = getopt_long(argc, argv, - "+a:g:o:i:I:j:D:F:vbdhlrnp", long_options, NULL)) + while ((c = getopt_long(argc, argv, "+a:bdD:F:g:hi:I:j:lno:prs:S:v", + long_options, NULL)) != EOF) switch(c) { - case 'v': - printf("GNU pre-grohtml (groff) version %s\n", Version_string); - exit(0); case 'a': textAlphaBits = min(max(MIN_ALPHA_BITS, atoi(optarg)), MAX_ALPHA_BITS); @@ -1557,6 +1557,20 @@ static int scanArguments(int argc, char **argv) exit(1); } break; + case 'b': + // handled by post-grohtml (set background color to white) + break; + case 'd': +#if defined(DEBUGGING) + debug = TRUE; +#endif + break; + case 'D': + image_dir = optarg; + break; + case 'F': + font_path.command_line_dir(optarg); + break; case 'g': graphicAlphaBits = min(max(MIN_ALPHA_BITS, atoi(optarg)), MAX_ALPHA_BITS); @@ -1565,38 +1579,42 @@ static int scanArguments(int argc, char **argv) exit(1); } break; - case 'b': - // handled by post-grohtml (set background color to white) - break; - case 'D': - image_dir = optarg; - break; - case 'I': - image_template = optarg; + case 'h': + // handled by post-grohtml break; case 'i': image_res = atoi(optarg); break; - case 'F': - font_path.command_line_dir(optarg); + case 'I': + image_template = optarg; break; case 'j': // handled by post-grohtml (set job name for multiple file output) break; + case 'l': + // handled by post-grohtml (no automatic section links) + break; + case 'n': + // handled by post-grohtml (generate simple heading anchors) + break; case 'o': vertical_offset = atoi(optarg); break; case 'p': show_progress = TRUE; break; - case 'd': -#if defined(DEBUGGING) - debug = TRUE; -#endif + case 'r': + // handled by post-grohtml (no header and footer lines) break; - case 'h': - // handled by post-grohtml + case 's': + // handled by post-grohtml (use font size n as the html base font size) + break; + case 'S': + // handled by post-grohtml (set file split level) break; + case 'v': + printf("GNU pre-grohtml (groff) version %s\n", Version_string); + exit(0); case CHAR_MAX + 1: // --help usage(stdout); exit(0); @@ -1701,6 +1719,12 @@ int main(int argc, char **argv) } exit(1); #endif /* CAPTURE_MODE */ + device = "html"; + if (!font::load_desc()) + fatal("cannot find devhtml/DESC exiting"); + image_gen = font::image_generator; + if (image_gen == NULL || (strcmp(image_gen, "") == 0)) + fatal("devhtml/DESC must set the image_generator field, exiting"); postscriptRes = get_resolution(); i = scanArguments(argc, argv); setupAntiAlias(); diff --git a/contrib/groff-1.19/src/preproc/html/pre-html.h b/contrib/groff-1.19/src/preproc/html/pre-html.h index f9a590c17b..3eedb21c72 100644 --- a/contrib/groff-1.19/src/preproc/html/pre-html.h +++ b/contrib/groff-1.19/src/preproc/html/pre-html.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ /* * defines functions implemented within pre-html.c diff --git a/contrib/groff-1.19/src/preproc/html/pushback.cpp b/contrib/groff-1.19/src/preproc/html/pushback.cpp index 28c4aaacf6..b715587835 100644 --- a/contrib/groff-1.19/src/preproc/html/pushback.cpp +++ b/contrib/groff-1.19/src/preproc/html/pushback.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. Written by Gaius Mulley (gaius@glam.ac.uk). This file is part of groff. @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" @@ -83,14 +83,12 @@ pushBackBuffer::pushBackBuffer (char *filename) pushBackBuffer::~pushBackBuffer () { - int old; - if (charStack != 0) { free(charStack); } close(0); /* restore stdin in file descriptor 0 */ - old = dup(stdIn); + dup(stdIn); close(stdIn); } @@ -162,10 +160,8 @@ static int isWhite (char ch) void pushBackBuffer::skipToNewline (void) { - char ch; - while ((putPB(getPB()) != '\n') && (! eofFound)) { - ch = getPB(); + getPB(); } } diff --git a/contrib/groff-1.19/src/preproc/html/pushback.h b/contrib/groff-1.19/src/preproc/html/pushback.h index cdc246533c..3fddad66f1 100644 --- a/contrib/groff-1.19/src/preproc/html/pushback.h +++ b/contrib/groff-1.19/src/preproc/html/pushback.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #define eof (char)-1 diff --git a/contrib/groff-1.19/src/preproc/pic/common.cpp b/contrib/groff-1.19/src/preproc/pic/common.cpp index b302ca794d..47a23cd920 100644 --- a/contrib/groff-1.19/src/preproc/pic/common.cpp +++ b/contrib/groff-1.19/src/preproc/pic/common.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "pic.h" #include "common.h" diff --git a/contrib/groff-1.19/src/preproc/pic/common.h b/contrib/groff-1.19/src/preproc/pic/common.h index 849637f1ab..50238344d8 100644 --- a/contrib/groff-1.19/src/preproc/pic/common.h +++ b/contrib/groff-1.19/src/preproc/pic/common.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ class common_output : public output { private: diff --git a/contrib/groff-1.19/src/preproc/pic/lex.cpp b/contrib/groff-1.19/src/preproc/pic/lex.cpp index b8aa9ebcfa..ceca368546 100644 --- a/contrib/groff-1.19/src/preproc/pic/lex.cpp +++ b/contrib/groff-1.19/src/preproc/pic/lex.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2002, 2003 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "pic.h" #include "ptable.h" @@ -1329,21 +1329,23 @@ void do_undef() class for_input : public input { char *var; char *body; + double from; double to; int by_is_multiplicative; double by; const char *p; int done_newline; public: - for_input(char *, double, int, double, char *); + for_input(char *, double, double, int, double, char *); ~for_input(); int get(); int peek(); }; -for_input::for_input(char *vr, double t, int bim, double b, char *bd) -: var(vr), body(bd), to(t), by_is_multiplicative(bim), by(b), p(body), - done_newline(0) +for_input::for_input(char *vr, double f, double t, + int bim, double b, char *bd) +: var(vr), body(bd), from(f), to(t), by_is_multiplicative(bim), by(b), + p(body), done_newline(0) { } @@ -1374,7 +1376,8 @@ int for_input::get() else val += by; define_variable(var, val); - if (val > to) { + if ((from <= to && val > to) + || (from >= to && val < to)) { p = 0; return EOF; } @@ -1399,7 +1402,8 @@ int for_input::peek() return EOF; } else { - if (val + by > to) + if ((from <= to && val + by > to) + || (from >= to && val + by < to)) return EOF; } if (*body == '\0') @@ -1411,8 +1415,12 @@ void do_for(char *var, double from, double to, int by_is_multiplicative, double by, char *body) { define_variable(var, from); - if (from <= to) - input_stack::push(new for_input(var, to, by_is_multiplicative, by, body)); + if ((by_is_multiplicative && by <= 0) + || (by > 0 && from > to) + || (by < 0 && from < to)) + return; + input_stack::push(new for_input(var, from, to, + by_is_multiplicative, by, body)); } diff --git a/contrib/groff-1.19/src/preproc/pic/main.cpp b/contrib/groff-1.19/src/preproc/pic/main.cpp index 8788fa6d5a..0e05f77cd2 100644 --- a/contrib/groff-1.19/src/preproc/pic/main.cpp +++ b/contrib/groff-1.19/src/preproc/pic/main.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "pic.h" diff --git a/contrib/groff-1.19/src/preproc/pic/object.cpp b/contrib/groff-1.19/src/preproc/pic/object.cpp index a14d022af7..aefbd45e39 100644 --- a/contrib/groff-1.19/src/preproc/pic/object.cpp +++ b/contrib/groff-1.19/src/preproc/pic/object.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004 +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "pic.h" #include "ptable.h" @@ -202,7 +202,7 @@ double operator*(const position &a, const position &b) double hypot(const position &a) { - return hypot(a.x, a.y); + return groff_hypot(a.x, a.y); } struct arrow_head_type { @@ -233,13 +233,14 @@ void draw_arrow(const position &pos, const distance &dir, v[2] = pos + base - n; // fill with outline color out->set_color(outline_color_for_fill, outline_color_for_fill); + // make stroke thin to avoid arrow sticking + slt.thickness = 0.1; out->polygon(v, 3, slt, 1); } else { - position v[2]; - v[0] = pos; - v[1] = pos + base + n; - out->line(pos + base - n, v, 2, slt); + // use two line segments to avoid arrow sticking + out->line(pos + base - n, &pos, 1, slt); + out->line(pos + base + n, &pos, 1, slt); } } @@ -1258,12 +1259,47 @@ void line_object::print() if (lt.type == line_type::invisible) return; out->set_color(0, graphic_object::get_outline_color()); - out->line(strt, v, n, lt); - if (arrow_at_start) - draw_arrow(strt, strt-v[0], aht, lt, graphic_object::get_outline_color()); - if (arrow_at_end) - draw_arrow(en, v[n-1] - (n > 1 ? v[n - 2] : strt), aht, lt, - graphic_object::get_outline_color()); + // shorten line length to avoid arrow sticking. + position sp = strt; + if (arrow_at_start) { + position base = v[0] - strt; + double hyp = hypot(base); + if (hyp == 0.0) { + error("cannot draw arrow on object with zero length"); + return; + } + if (aht.solid && out->supports_filled_polygons()) { + base *= aht.height / hyp; + draw_arrow(strt, strt - v[0], aht, lt, + graphic_object::get_outline_color()); + sp = strt + base; + } else { + base *= fabs(lt.thickness) / hyp / 72 / 4; + sp = strt + base; + draw_arrow(sp, sp - v[0], aht, lt, + graphic_object::get_outline_color()); + } + } + if (arrow_at_end) { + position base = v[n-1] - (n > 1 ? v[n-2] : strt); + double hyp = hypot(base); + if (hyp == 0.0) { + error("cannot draw arrow on object with zero length"); + return; + } + if (aht.solid && out->supports_filled_polygons()) { + base *= aht.height / hyp; + draw_arrow(en, v[n-1] - (n > 1 ? v[n-2] : strt), aht, lt, + graphic_object::get_outline_color()); + v[n-1] = en - base; + } else { + base *= fabs(lt.thickness) / hyp / 72 / 4; + v[n-1] = en - base; + draw_arrow(v[n-1], v[n-1] - (n > 1 ? v[n-2] : strt), aht, lt, + graphic_object::get_outline_color()); + } + } + out->line(sp, v, n, lt); out->reset_color(); } @@ -1328,12 +1364,47 @@ void spline_object::print() if (lt.type == line_type::invisible) return; out->set_color(0, graphic_object::get_outline_color()); - out->spline(strt, v, n, lt); - if (arrow_at_start) - draw_arrow(strt, strt-v[0], aht, lt, graphic_object::get_outline_color()); - if (arrow_at_end) - draw_arrow(en, v[n-1] - (n > 1 ? v[n - 2] : strt), aht, lt, - graphic_object::get_outline_color()); + // shorten line length for spline to avoid arrow sticking + position sp = strt; + if (arrow_at_start) { + position base = v[0] - strt; + double hyp = hypot(base); + if (hyp == 0.0) { + error("cannot draw arrow on object with zero length"); + return; + } + if (aht.solid && out->supports_filled_polygons()) { + base *= aht.height / hyp; + draw_arrow(strt, strt - v[0], aht, lt, + graphic_object::get_outline_color()); + sp = strt + base*0.1; // to reserve spline shape + } else { + base *= fabs(lt.thickness) / hyp / 72 / 4; + sp = strt + base; + draw_arrow(sp, sp - v[0], aht, lt, + graphic_object::get_outline_color()); + } + } + if (arrow_at_end) { + position base = v[n-1] - (n > 1 ? v[n-2] : strt); + double hyp = hypot(base); + if (hyp == 0.0) { + error("cannot draw arrow on object with zero length"); + return; + } + if (aht.solid && out->supports_filled_polygons()) { + base *= aht.height / hyp; + draw_arrow(en, v[n-1] - (n > 1 ? v[n-2] : strt), aht, lt, + graphic_object::get_outline_color()); + v[n-1] = en - base*0.1; // to reserve spline shape + } else { + base *= fabs(lt.thickness) / hyp / 72 / 4; + v[n-1] = en - base; + draw_arrow(v[n-1], v[n-1] - (n > 1 ? v[n-2] : strt), aht, lt, + graphic_object::get_outline_color()); + } + } + out->spline(sp, v, n, lt); out->reset_color(); } @@ -1542,22 +1613,70 @@ void arc_object::print() if (lt.type == line_type::invisible) return; out->set_color(0, graphic_object::get_outline_color()); - if (clockwise) - out->arc(en, cent, strt, lt); - else - out->arc(strt, cent, en, lt); + // handle arrow direction; make shorter line for arc + position sp, ep, b; + if (clockwise) { + sp = en; + ep = strt; + } else { + sp = strt; + ep = en; + } if (arrow_at_start) { - position c = cent - strt; - draw_arrow(strt, - (clockwise ? position(c.y, -c.x) : position(-c.y, c.x)), - aht, lt, graphic_object::get_outline_color()); + double theta = aht.height / rad; + if (clockwise) + theta = - theta; + b = strt - cent; + b = position(b.x*cos(theta) - b.y*sin(theta), + b.x*sin(theta) + b.y*cos(theta)) + cent; + if (clockwise) + ep = b; + else + sp = b; + if (aht.solid && out->supports_filled_polygons()) { + draw_arrow(strt, strt - b, aht, lt, + graphic_object::get_outline_color()); + } else { + position v = b; + theta = fabs(lt.thickness) / 72 / 4 / rad; + if (clockwise) + theta = - theta; + b = strt - cent; + b = position(b.x*cos(theta) - b.y*sin(theta), + b.x*sin(theta) + b.y*cos(theta)) + cent; + draw_arrow(b, b - v, aht, lt, + graphic_object::get_outline_color()); + out->line(b, &v, 1, lt); + } } if (arrow_at_end) { - position e = en - cent; - draw_arrow(en, - (clockwise ? position(e.y, -e.x) : position(-e.y, e.x)), - aht, lt, graphic_object::get_outline_color()); + double theta = aht.height / rad; + if (!clockwise) + theta = - theta; + b = en - cent; + b = position(b.x*cos(theta) - b.y*sin(theta), + b.x*sin(theta) + b.y*cos(theta)) + cent; + if (clockwise) + sp = b; + else + ep = b; + if (aht.solid && out->supports_filled_polygons()) { + draw_arrow(en, en - b, aht, lt, + graphic_object::get_outline_color()); + } else { + position v = b; + theta = fabs(lt.thickness) / 72 / 4 / rad; + if (!clockwise) + theta = - theta; + b = en - cent; + b = position(b.x*cos(theta) - b.y*sin(theta), + b.x*sin(theta) + b.y*cos(theta)) + cent; + draw_arrow(b, b - v, aht, lt, + graphic_object::get_outline_color()); + out->line(b, &v, 1, lt); + } } + out->arc(sp, cent, ep, lt); out->reset_color(); } @@ -1753,7 +1872,7 @@ object *object_spec::make_object(position *curpos, direction *dirp) obj->set_thickness(th); if (flags & IS_OUTLINED) obj->set_outline_color(outlined); - if (flags & (IS_DEFAULT_FILLED|IS_FILLED)) { + if (flags & (IS_DEFAULT_FILLED | IS_FILLED)) { if (flags & IS_SHADED) obj->set_fill_color(shaded); else { diff --git a/contrib/groff-1.19/src/preproc/pic/object.h b/contrib/groff-1.19/src/preproc/pic/object.h index b027b7dc12..9f7f4bc337 100644 --- a/contrib/groff-1.19/src/preproc/pic/object.h +++ b/contrib/groff-1.19/src/preproc/pic/object.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ struct place; diff --git a/contrib/groff-1.19/src/preproc/pic/output.h b/contrib/groff-1.19/src/preproc/pic/output.h index 873ec3cfae..aa03e776bb 100644 --- a/contrib/groff-1.19/src/preproc/pic/output.h +++ b/contrib/groff-1.19/src/preproc/pic/output.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ struct line_type { enum { invisible, solid, dotted, dashed } type; diff --git a/contrib/groff-1.19/src/preproc/pic/pic.cpp b/contrib/groff-1.19/src/preproc/pic/pic.cpp index 90b76d5e39..d6f959bbb4 100644 --- a/contrib/groff-1.19/src/preproc/pic/pic.cpp +++ b/contrib/groff-1.19/src/preproc/pic/pic.cpp @@ -205,18 +205,19 @@ short yylhs[] = { -1, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 26, 26, 25, 25, 19, 19, 6, 6, - 6, 6, 6, 6, 45, 45, 5, 5, 13, 13, - 13, 13, 13, 14, 14, 14, 22, 22, 21, 21, - 8, 8, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 11, 11, 12, 12, 12, 10, 10, 10, 10, - 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, + 18, 18, 26, 26, 25, 25, 19, 19, 19, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 45, + 45, 5, 5, 13, 13, 13, 13, 13, 14, 14, + 14, 22, 22, 21, 21, 8, 8, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 11, 11, 12, 12, + 12, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 1, 1, 1, 1, 1, 1, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, }; short yylen[] = { 2, 1, 1, 3, 1, 3, 0, 1, 1, 2, 3, @@ -232,30 +233,31 @@ short yylen[] = { 2, 3, 3, 3, 3, 3, 2, 2, 2, 3, 2, 3, 2, 3, 3, 3, 3, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 3, 2, 1, 5, 0, 3, 1, 1, 1, 3, - 3, 5, 5, 6, 1, 4, 3, 3, 1, 2, - 2, 3, 1, 1, 1, 3, 1, 3, 1, 2, - 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, - 1, 2, 3, 1, 1, 2, 1, 5, 4, 3, - 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, - 2, 1, 1, 2, 2, 2, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, - 2, 3, 3, 3, 3, 3, 3, 2, 3, 4, - 4, 6, 4, 4, 4, 6, 6, 4, 4, 3, - 4, 3, 3, 3, 3, 3, 3, 3, 3, 2, + 3, 2, 1, 5, 0, 3, 1, 1, 3, 1, + 3, 5, 3, 5, 5, 5, 7, 6, 8, 1, + 4, 3, 3, 1, 2, 2, 3, 1, 1, 1, + 3, 1, 3, 1, 2, 2, 2, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 2, 3, 1, 1, + 2, 1, 5, 4, 3, 3, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, + 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, + 3, 3, 2, 3, 4, 4, 6, 4, 4, 4, + 6, 6, 4, 4, 3, 4, 3, 3, 3, 3, + 3, 3, 3, 3, 2, }; short yydefred[] = { 0, 8, 0, 2, 0, 0, 0, 0, 133, 17, 13, 14, 15, 16, 74, 75, 76, 77, 78, 79, 80, 81, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 85, 68, 0, 4, 0, 0, 82, 71, 0, - 9, 0, 0, 0, 0, 0, 26, 0, 154, 215, - 216, 157, 159, 196, 197, 153, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 194, 195, - 0, 0, 202, 203, 208, 209, 210, 211, 212, 214, - 213, 0, 0, 0, 0, 0, 139, 137, 155, 0, + 9, 0, 0, 0, 0, 0, 26, 0, 159, 220, + 221, 162, 164, 201, 202, 158, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 199, 200, + 0, 0, 207, 208, 213, 214, 215, 216, 217, 219, + 218, 0, 0, 0, 0, 0, 140, 137, 160, 0, 0, 0, 0, 0, 0, 44, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 32, 3, 0, 121, 122, 123, 0, 0, @@ -264,1577 +266,1629 @@ short yydefred[] = { 0, 129, 130, 124, 125, 0, 0, 0, 0, 0, 132, 0, 126, 39, 0, 0, 11, 0, 37, 36, 10, 23, 0, 21, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 198, 200, 204, 206, 199, 201, - 205, 207, 0, 0, 0, 0, 0, 0, 0, 0, - 145, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, - 218, 219, 220, 221, 0, 150, 0, 0, 171, 163, - 164, 165, 166, 167, 168, 169, 0, 162, 160, 161, - 42, 0, 0, 60, 0, 0, 0, 46, 0, 0, - 0, 0, 84, 135, 0, 0, 0, 0, 5, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 103, 0, 177, - 0, 0, 0, 105, 0, 0, 0, 0, 0, 115, - 116, 114, 40, 0, 0, 0, 0, 0, 0, 65, - 0, 12, 0, 27, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 240, 0, 0, 229, 148, 0, 158, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 156, - 140, 141, 170, 0, 0, 56, 0, 0, 0, 0, - 0, 54, 0, 0, 53, 52, 0, 86, 69, 33, - 174, 182, 0, 0, 0, 172, 0, 0, 176, 0, - 0, 24, 0, 230, 231, 0, 233, 234, 235, 0, - 0, 238, 239, 241, 0, 0, 0, 0, 0, 47, - 0, 134, 0, 0, 181, 180, 0, 173, 0, 0, - 28, 0, 0, 0, 142, 146, 0, 0, 0, 0, - 73, 70, 179, 0, 25, 49, 232, 236, 237, 144, - 0, 0, 178, 0, 0, 29, 0, 0, 30, + 0, 0, 0, 0, 203, 205, 209, 211, 204, 206, + 210, 212, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 150, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 222, 223, 224, 225, 226, 0, 155, 0, 0, 176, + 168, 169, 170, 171, 172, 173, 174, 0, 167, 165, + 166, 42, 0, 0, 60, 0, 0, 0, 46, 0, + 0, 0, 0, 84, 135, 0, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 103, 0, + 182, 0, 0, 0, 105, 0, 0, 0, 0, 0, + 115, 116, 114, 40, 0, 0, 0, 0, 0, 0, + 65, 0, 12, 0, 27, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 245, 0, 0, 0, 0, 234, + 153, 139, 0, 0, 0, 163, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 161, 141, 143, 175, 0, + 0, 56, 0, 0, 0, 0, 0, 54, 0, 0, + 53, 52, 0, 86, 69, 33, 179, 187, 0, 0, + 0, 177, 0, 0, 181, 0, 0, 24, 0, 235, + 236, 0, 238, 239, 240, 0, 0, 243, 244, 246, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, + 0, 134, 0, 0, 186, 185, 0, 178, 0, 0, + 28, 0, 0, 0, 0, 0, 145, 142, 144, 151, + 0, 0, 0, 0, 73, 70, 184, 0, 25, 49, + 237, 241, 242, 0, 0, 148, 0, 0, 183, 0, + 147, 0, 0, 29, 149, 0, 0, 30, }; short yydgoto[] = { 2, - 112, 194, 114, 422, 97, 98, 34, 99, 100, 278, - 279, 280, 115, 102, 35, 3, 36, 37, 103, 238, - 104, 105, 170, 401, 357, 116, 107, 108, 256, 5, - 39, 48, 303, 399, 172, 373, 428, 258, 40, 350, - 122, 412, 393, 121, 217, + 112, 194, 114, 438, 97, 98, 34, 99, 100, 279, + 280, 281, 115, 102, 35, 3, 36, 37, 103, 239, + 104, 105, 170, 411, 363, 116, 107, 108, 257, 5, + 39, 48, 304, 409, 172, 379, 447, 259, 40, 356, + 122, 426, 403, 121, 218, }; -short yysindex[] = { -57, - 0, 0, 0, 5015, -24, -4, -8, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -2, -245, 0,12240, -182,12363, -175,12960, 45, -12240, 0, 0, -261, 0, -57,11821, 0, 0, -43, - 0, -57,12363, 42, -103, -214, 0, -125, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 126, 161, 166, - 176, 186, 187, 190, 194, 197, 198, 203, 0, 0, - -199, -147, 0, 0, 0, 0, 0, 0, 0, 0, - 0,12480,12363,12960,12960, 1256, 0, 0, 0, -22, - -223, 867, 21, 191, -1, 0,12240, 0, 183,12363, -12363, 361, -44, -187, -223, -179, 0, 798, -11,12240, - -57, -57, 0, 0,13430, 0, 0, 0,13323,13323, -13323,13323,12960,12960,12960,12960,13083,13083,13083,12720, -13200, 0, 0,13323,13323,13323, 0, 0, 0, 0, - 0, 0, 0, 0,12960,13323, -247, -247, -247, 0, - 1697, 0, 0, -6,11489, 0,12363, 0, 0, 0, - 0, -9, 0,12363,12363,12363,12363,12363,12363,12363, -12363,12363,11938,12363, 0, 0, 0, 0, 0, 0, - 0, 0, 1597, 214, 221, 36, 1, 172, 172, -34, - 0,12960,12960,12960,12960,12960,12960,12960,13083,12960, -12960,12960,12960,12960,12960,12960,13083, -18, 232, 0, - 0, 0, 0, 0, 24, 0,13200,13200, 0, 0, - 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, - 0,12960, 172, 0,12363,12363,12960, 0,12363,12363, - -247, -247, 0, 0, 195, 5015, 162, 27, 0, 1697, - 1697, 1697, 1697, 1697, 1697, 1697, 1697, 1256, 21, 21, - 21, 1783, 428, 428, 43,12123, -22, 0, 467, 0, - 21,12603, 680, 0, 1697, 1697, 1697, 1697, 1697, 0, - 0, 0, 0, -4, -8, 0, 0, 0, -223, 0, - 21, 0, 44, 0, 252, 264, 278, 267, 290, 291, - 289, 301, 294, 0, 310, 312, 0, 0,13083, 0, - 51, -5, -26, 99, 99, 714, 714, 1697, -19, 49, - 714, 337, 337, 172, 172, 172, 172, -38, 232, 0, - 0, 0, 0, 3111, -5, 0, 1733, 11, 714, 96, - -5, 0, 1733, 11, 0, 0, 17, 0, 0, 0, - 0, 0, 191, 927, 927, 0, 323, 113, 0, 1277, - 221, 0, 13, 0, 0,12363, 0, 0, 0,12363, -12363, 0, 0, 0, 6, 66,13083,13083,12960, 0, -12960, 0, 5015, 927, 0, 0, 927, 0, 13, 115, - 0, 332, 339, 340, 0, 0, -14, 21, 2174, 1697, - 0, 0, 0, 344, 0, 0, 0, 0, 0, 0, -12843, 46, 0,12960, 1697, 0, 1697, 125, 0, +short yysindex[] = { -58, + 0, 0, 0, 5077, -43, -21, -2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 19, -242, 0,12299, -173,12422, -155,13019, 85, +12299, 0, 0, -214, 0, -58,11880, 0, 0, -42, + 0, -58,12422, 76, -160, -195, 0, -118, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 108, 120, 127, + 133, 137, 154, 161, 162, 173, 174, 179, 0, 0, + -193, -119, 0, 0, 0, 0, 0, 0, 0, 0, + 0,12539,12422,13019,13019, -34, 0, 0, 0, -51, + 170, 585, 46, 495, 329, 0,12299, 0, 110,12422, +12422, 1768, -71, -227, 170, -197, 0, -22, -50,12299, + -58, -58, 0, 0,13489, 0, 0, 0,13382,13382, +13382,13382,13019,13019,13019,13019,13142,13142,13142,12779, +13259, 0, 0,13382,13382,13382, 0, 0, 0, 0, + 0, 0, 0, 0,13019,13382, -228, -228, -228, 0, + 1792, 0, 0, -30,11548, 0,12422, 0, 0, 0, + 0, -28, 0,12422,12422,12422,12422,12422,12422,12422, +12422,12422,11997,12422, 0, 0, 0, 0, 0, 0, + 0, 0, 1315, 194, 198, -11, 299, -10, 159, 159, + -47, 0,13019,13019,13019,13019,13019,13019,13019,13142, +13019,13019,13019,13019,13019,13019,13019,13142, -8, 211, + 0, 0, 0, 0, 0, 2, 0,13259,13259, 0, + 0, 0, 0, 0, 0, 0, 0, 177, 0, 0, + 0, 0,13019, 159, 0,12422,12422,13019, 0,12422, +12422, -228, -228, 0, 0, 180, 5077, 147, 25, 0, + 1792, 1792, 1792, 1792, 1792, 1792, 1792, 1792, -34, 46, + 46, 46, 1842, 318, 318, 29,12182, -51, 0, 525, + 0, 46,12662, 1336, 0, 1792, 1792, 1792, 1792, 1792, + 0, 0, 0, 0, -21, -2, 0, 0, 0, 170, + 0, 46, 0, 27, 0, 251, 264, 262, 292, 293, + 295, 301, 304, 308, 0, 312, 313,13142,13142, 0, + 0, 0,13142,13259,13259, 0, 57, 1194, 6, 1166, + 1166, 506, 506, 1792, -1, 343, 506, 388, 388, 159, + 159, 159, 159, -16, 211, 0, 0, 0, 0, 3170, + 1194, 0, 394, 14, 506, 103, 1194, 0, 394, 14, + 0, 0, 21, 0, 0, 0, 0, 0, 495, 986, + 986, 0, 324, 118, 0, 1756, 198, 0, 12, 0, + 0,12422, 0, 0, 0,12422,12422, 0, 0, 0, + 389, 7, 131, 351, 353, 79,13142,13142,13019, 0, +13019, 0, 5077, 986, 0, 0, 986, 0, 12, 135, + 0, 361, 363, 365,13142,13142, 0, 0, 0, 0, + 56, 46, 2233, 1792, 0, 0, 0, 367, 0, 0, + 0, 0, 0, 205, 296, 0,12902, 64, 0, 370, + 0,13019, 1792, 0, 0, 1792, 151, 0, }; -short yyrindex[] = { 41, - 0, 0, 0, 389, 167, 0, 0, 0, 0, 0, +short yyrindex[] = { 5, + 0, 0, 0, 424, 200, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, + 0, 0, 0, 31, 0, 34, 102, 0, 0, 139, + 0,11744, 0, 0, 0, 639, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, - 0, 0, 0, 117, 0, 8, 135, 0, 0, 236, - 0,11685, 0, 0, 0, 284, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0,10124, 0, 0, 0, 0, + 4478, 9516,10459, 0, 0, 0, 691, 0, 0, 0, + 0, 1713, 0, 2171, 0, 0, 0,11366, 0, 692, + 5532, 5532, 0, 0, 136, 0, 0, 0,10701,10765, +10277,10580, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,10829,10955,11019, 0, 0, 0, 0, + 0, 0, 0, 0, 0,11083, 0, 0, 0, 0, + 5277, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,10065, 0, 0, 0, 0, - 4419, 9457,10400, 0, 0, 0, 633, 0, 0, 0, - 0, 2068, 0, 2113, 0, 0, 0,11307, 0, 661, - 5476, 5476, 0, 0, 9, 0, 0, 0,10642,10706, -10218,10521, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,10770,10896,10960, 0, 0, 0, 0, - 0, 0, 0, 0, 0,11024, 0, 0, 0, 0, - 5218, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 385, 0, 421, 441, 0, 0, 356, 697, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 350, 0, 84, 0, 0, 297, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3045, 0, + 0, 0, 0,10627, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5394, 5735, 5852, 6193, 6310, 6651, 6768, 7109, 0, 7226, + 7567, 7684, 9818, -213, 169, 0, 0, 9399, 0, 9912, + 0, 8025, 0, 0, 0, 8142, 8483, 8600, 8941, 9058, + 0, 0, 0, 0,11436, 1656, 2507, 2965, 321, 362, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,10568, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 5335, - 5676, 5793, 6134, 6251, 6592, 6709, 7050, 0, 7167, 7508, - 7625, 9759, -238, 134, 0, 0, 9340, 0, 9853, 0, - 7966, 0, 0, 0, 8083, 8424, 8541, 8882, 8999, 0, - 0, 0, 0,11377, 1711, 2448, 2906, 211, 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 4020, 4361, 3445, + 3562, 2188, 2529, 4936,10001, 0, 2646, 1730, 2071, 814, + 1155, 1272, 1613, 0, 3903, 0, 0, 0, 0, 0, + 33, 0, 4451, 3118, 2987, 0, 326, 0, 3990, 4906, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3961, 4302, 3386, 3503, 2129, 2470, 4877, 9942, 0, - 2587, 1671, 2012, 755, 1096, 1213, 1554, 0, 3844, 0, - 0, 0, 0, 0, 4392, 0, 4850, 3059, 2928, 0, - 3931, 0, 5305, 5763, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 350, - 0, 0, 676, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 385, 0, 0, 701, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 694, 0, 0, 0, 0, 0, 676, 0, - 0, 0, 0, 0, 0, 0, 0, 4760, 54, 19, + 0, 0, 0, 452, 455, 0, 0, 0, 0, 0, + 0, 0, 720, 0, 0, 0, 0, 0, 701, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 0, 64, 0, 0, + 0, 4819, 92, 32, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 396, 0, 0, 0, 0, 460, + 0, 0, 96, 0, 0, 97, 0, 0, }; short yygindex[] = { 0, - -25, 368, -97, 0, -53, 247, 0, 0, 93, 0, - 0, -133, 31, -73, -122, 97, 0, 0, 1557, -60, - 0, 0, 0, 14, 0, 40, 366, -87, 10, 380, + -25, 401, -104, 0, -78, 280, 0, 0, 1852, 0, + 0, -238, 104, -81, -108, 43, 0, 0, 2253, -44, + 0, 0, 0, 38, 0, 50, 417, -36, 22, 414, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, + 0, 0, 0, 0, 269, }; -#define YYTABLESIZE 13804 +#define YYTABLESIZE 13863 short yytable[] = { 96, - 164, 1, 259, 118, 227, 96, 228, 6, 7, 4, - 215, 161, 8, 244, 46, 213, 211, 215, 212, 241, - 214, 157, 213, 211, 35, 212, 219, 214, 227, 157, - 228, 215, 241, 247, 41, 210, 213, 211, 195, 212, - 6, 214, 300, 38, 240, 124, 405, 420, 227, 44, - 228, 165, 43, 42, 247, 101, 210, 392, 45, 136, - 391, 101, 136, 227, 106, 228, 193, 216, 198, 199, - 106, 185, 186, 93, 216, 109, 162, 93, 227, 319, - 228, 96, 117, 35, 119, 243, 123, 284, 216, 237, - 47, 227, 387, 228, 96, 220, 221, 222, 223, 224, - 6, 7, 167, 260, 261, 262, 263, 264, 265, 266, - 267, 268, 268, 268, 268, 283, 31, 35, 285, 286, - 287, 171, 101, 189, 190, 30, 139, 139, 139, 288, - 289, 6, 6, 7, 64, 215, 173, 101, 362, 268, - 213, 211, 367, 212, 339, 214, 106, 346, 348, 35, - 101, 352, 354, 168, 169, 187, 188, 253, 247, 106, - 210, 249, 250, 6, 38, 174, 7, 101, 101, 101, - 101, 251, 252, 341, 342, 31, 322, 323, 324, 325, - 326, 327, 328, 329, 331, 332, 333, 334, 335, 336, - 337, 268, 216, 64, 226, 299, 290, 291, 292, 7, - 175, 283, 283, 219, 38, 176, 7, 191, 192, 31, - 66, 7, 364, 365, 163, 177, 344, 255, 257, 345, - 347, 349, 195, 351, 353, 178, 179, 64, 371, 180, - 395, 396, 277, 181, 49, 34, 182, 183, 49, 101, - 52, 31, 184, 242, 52, 53, 248, 101, 254, 53, - 193, 293, 304, 137, 317, 137, 370, 7, 229, 64, - 413, 318, 7, 414, 320, 216, 239, 388, 321, 66, - 411, 230, 231, 232, 233, 234, 235, 225, 236, 218, - 340, 237, 200, 22, 343, 201, 359, 358, 360, 7, - 355, 356, 374, 268, 34, 38, 228, 6, 6, 366, - 6, 6, 394, 66, 375, 372, 101, 377, 67, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 376, 202, 6, 204, 205, 206, 207, 34, 228, - 378, 379, 380, 228, 382, 66, 228, 228, 228, 228, - 228, 228, 22, 228, 381, 204, 205, 206, 207, 101, - 383, 138, 384, 138, 386, 228, 228, 390, 228, 249, - 34, 268, 268, 409, 361, 410, 397, 67, 277, 398, - 406, 369, 417, 215, 416, 6, 22, 400, 213, 418, - 419, 6, 6, 214, 423, 6, 429, 6, 1, 228, - 50, 426, 228, 159, 113, 425, 120, 215, 427, 61, - 62, 67, 213, 211, 6, 212, 6, 214, 22, 63, - 166, 298, 415, 6, 6, 125, 0, 101, 101, 0, - 247, 228, 210, 7, 7, 7, 7, 7, 0, 7, - 216, 0, 38, 67, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 0, 0, 7, - 229, 206, 207, 0, 216, 0, 361, 361, 0, 0, - 197, 0, 0, 230, 231, 232, 233, 234, 235, 0, - 236, 0, 0, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 0, 361, 0, 0, 361, + 1, 164, 216, 118, 6, 96, 245, 214, 212, 209, + 213, 161, 215, 195, 216, 41, 260, 46, 220, 214, + 212, 4, 213, 35, 215, 210, 228, 211, 229, 322, + 31, 8, 253, 6, 368, 216, 42, 248, 373, 211, + 214, 212, 216, 213, 93, 215, 162, 214, 212, 228, + 213, 229, 215, 38, 162, 44, 301, 124, 43, 217, + 241, 402, 285, 165, 401, 248, 193, 211, 199, 200, + 242, 217, 136, 253, 106, 136, 253, 185, 186, 45, + 106, 96, 35, 242, 109, 244, 162, 93, 228, 31, + 229, 253, 217, 47, 96, 6, 168, 169, 228, 217, + 229, 64, 117, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 269, 269, 269, 284, 35, 436, 286, 287, + 288, 250, 251, 31, 119, 253, 6, 6, 101, 289, + 290, 405, 406, 123, 101, 7, 167, 345, 34, 269, + 171, 352, 354, 173, 30, 358, 360, 174, 35, 347, + 348, 189, 190, 252, 253, 31, 106, 253, 6, 175, + 64, 187, 188, 256, 258, 427, 176, 254, 428, 106, + 243, 417, 177, 228, 38, 229, 178, 328, 329, 330, + 331, 332, 333, 334, 335, 337, 338, 339, 340, 341, + 342, 343, 269, 179, 64, 196, 220, 34, 195, 7, + 180, 181, 284, 284, 377, 49, 291, 292, 293, 255, + 101, 52, 182, 183, 38, 163, 53, 350, 184, 249, + 351, 353, 355, 101, 357, 359, 64, 294, 7, 370, + 371, 34, 7, 305, 320, 191, 192, 8, 321, 7, + 101, 101, 101, 101, 7, 394, 395, 228, 49, 229, + 219, 193, 217, 326, 52, 327, 226, 376, 346, 53, + 7, 6, 6, 34, 6, 6, 440, 201, 300, 349, + 202, 365, 364, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 372, 366, 6, 378, 398, + 7, 380, 335, 269, 425, 7, 253, 269, 284, 284, + 201, 361, 362, 202, 381, 382, 38, 221, 222, 223, + 224, 225, 416, 101, 203, 204, 205, 206, 207, 208, + 66, 101, 7, 253, 404, 55, 203, 204, 205, 206, + 207, 208, 383, 384, 253, 385, 441, 253, 228, 6, + 229, 324, 323, 325, 386, 6, 6, 387, 388, 6, + 30, 6, 389, 390, 203, 233, 205, 206, 207, 208, + 396, 67, 250, 137, 400, 137, 55, 407, 6, 55, + 6, 269, 269, 423, 408, 424, 410, 6, 6, 66, + 196, 253, 253, 420, 55, 228, 397, 229, 233, 269, + 269, 418, 233, 419, 430, 233, 233, 233, 233, 233, + 233, 431, 233, 432, 138, 433, 138, 439, 238, 444, + 445, 443, 448, 66, 233, 233, 446, 233, 55, 238, + 67, 101, 101, 1, 216, 50, 101, 113, 164, 214, + 216, 228, 415, 229, 215, 214, 212, 61, 213, 146, + 215, 62, 63, 166, 299, 66, 429, 120, 233, 125, + 55, 233, 38, 248, 67, 211, 7, 7, 7, 7, + 7, 319, 7, 140, 140, 140, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 0, 7, 7, 7, 7, 7, 7, 0, - 0, 7, 368, 7, 0, 0, 0, 0, 237, 0, - 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 0, 7, 0, 302, 0, 0, 0, 0, 7, - 7, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 315, 316, 0, 228, 228, 228, 228, 0, 0, 228, - 228, 228, 228, 228, 228, 228, 228, 228, 228, 0, - 0, 0, 0, 0, 0, 0, 0, 228, 228, 0, - 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, - 228, 228, 228, 228, 228, 228, 228, 228, 228, 0, - 0, 228, 228, 228, 228, 228, 228, 228, 228, 228, - 228, 228, 228, 228, 228, 0, 0, 0, 0, 0, + 233, 217, 7, 138, 138, 138, 67, 217, 221, 222, + 223, 224, 225, 198, 141, 141, 141, 143, 143, 143, + 101, 101, 148, 148, 148, 0, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 101, 101, + 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, + 7, 7, 216, 0, 7, 0, 7, 214, 212, 0, + 213, 0, 215, 0, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 0, 7, 0, 303, 0, 0, + 374, 0, 7, 7, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 316, 317, 238, 0, 0, 230, 55, + 231, 232, 233, 234, 235, 236, 240, 237, 0, 217, + 0, 231, 232, 233, 234, 235, 236, 0, 237, 0, + 0, 0, 233, 233, 233, 233, 55, 0, 233, 233, + 233, 233, 233, 233, 233, 233, 233, 233, 0, 0, + 226, 0, 0, 0, 0, 0, 233, 233, 22, 233, + 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, + 233, 233, 233, 233, 233, 233, 233, 233, 0, 0, + 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, + 233, 233, 233, 233, 55, 55, 0, 0, 0, 233, + 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, + 19, 18, 233, 233, 233, 233, 255, 22, 233, 233, + 48, 233, 0, 0, 233, 233, 233, 233, 233, 233, + 233, 233, 233, 233, 233, 233, 233, 233, 233, 72, + 0, 0, 233, 233, 233, 233, 233, 233, 233, 255, + 0, 22, 0, 255, 0, 0, 255, 255, 255, 255, + 255, 255, 246, 255, 205, 206, 207, 208, 0, 19, + 18, 0, 0, 0, 230, 255, 255, 0, 255, 48, + 0, 0, 0, 22, 0, 0, 0, 231, 232, 233, + 234, 235, 236, 0, 237, 0, 0, 0, 72, 0, + 0, 0, 412, 19, 18, 0, 413, 414, 0, 255, + 0, 0, 255, 48, 0, 54, 55, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 72, 229, 0, 19, 18, 0, 0, 0, + 0, 255, 0, 0, 0, 48, 0, 0, 0, 0, + 0, 0, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 0, 72, 0, 229, 0, 0, 0, + 229, 0, 0, 229, 229, 229, 229, 229, 229, 0, + 229, 79, 80, 81, 82, 0, 0, 0, 0, 0, + 0, 0, 229, 229, 0, 229, 0, 0, 0, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 0, 0, + 0, 0, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 0, 0, 0, 229, 0, 0, 229, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 79, 80, 81, 82, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 229, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 0, 0, + 0, 0, 0, 255, 255, 255, 255, 0, 0, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, + 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 276, 0, 255, 255, 255, 255, 0, 0, 255, + 255, 0, 255, 0, 0, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, + 229, 229, 229, 229, 0, 0, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 0, 0, 0, 0, + 0, 0, 0, 0, 229, 229, 0, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 0, 0, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 0, 0, 0, 0, 0, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, 0, 0, + 229, 229, 229, 229, 230, 0, 229, 229, 0, 229, + 0, 0, 229, 229, 229, 229, 229, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 0, 0, 0, + 229, 229, 229, 229, 229, 229, 229, 230, 0, 0, + 0, 230, 0, 0, 230, 230, 230, 230, 230, 230, + 0, 230, 216, 0, 0, 0, 0, 214, 212, 0, + 213, 0, 215, 230, 230, 0, 230, 0, 0, 0, + 0, 0, 0, 0, 0, 248, 0, 211, 0, 0, + 216, 0, 0, 0, 0, 214, 212, 0, 213, 0, + 215, 0, 0, 0, 0, 0, 0, 230, 0, 0, + 230, 0, 0, 248, 0, 211, 54, 55, 0, 217, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 231, 0, 0, 0, 0, 0, 0, 0, 230, + 0, 0, 0, 0, 0, 0, 0, 217, 0, 0, + 0, 0, 0, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 231, 0, 0, 0, 231, 0, + 0, 231, 231, 231, 231, 231, 231, 0, 231, 0, + 0, 0, 79, 80, 81, 82, 0, 0, 0, 0, + 231, 231, 0, 231, 0, 0, 0, 0, 0, 0, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 0, + 0, 216, 0, 0, 0, 0, 214, 212, 209, 213, + 0, 215, 0, 0, 231, 0, 0, 231, 0, 0, + 0, 0, 216, 0, 318, 0, 211, 214, 212, 209, + 213, 0, 215, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 248, 231, 211, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 217, 0, + 0, 230, 230, 230, 230, 0, 0, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 0, 0, 217, + 0, 0, 0, 0, 0, 230, 230, 0, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 0, 0, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 0, 0, 0, 0, 0, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 0, + 0, 230, 230, 230, 230, 0, 0, 230, 230, 0, + 230, 0, 0, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 207, 208, + 0, 230, 230, 230, 230, 230, 230, 230, 231, 231, + 231, 231, 0, 0, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 205, 206, 207, 208, 0, 0, + 0, 0, 231, 231, 0, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 0, 0, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 0, 0, 0, 0, 0, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 0, 0, 231, 231, + 231, 231, 232, 0, 231, 231, 201, 231, 0, 202, + 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 0, 0, 0, 231, 231, + 231, 231, 231, 231, 231, 232, 0, 0, 0, 232, + 0, 0, 232, 232, 232, 232, 232, 232, 0, 232, + 0, 0, 0, 246, 247, 205, 206, 207, 208, 0, + 0, 232, 232, 0, 232, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 203, 204, 205, 206, 207, 208, + 0, 0, 220, 0, 0, 0, 0, 220, 220, 220, + 220, 0, 220, 0, 0, 232, 0, 0, 232, 0, + 0, 0, 50, 0, 0, 220, 0, 220, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 227, + 0, 0, 0, 0, 0, 0, 0, 232, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, + 0, 0, 0, 50, 0, 0, 50, 0, 0, 0, + 0, 0, 227, 0, 0, 0, 0, 0, 0, 227, + 227, 50, 227, 227, 227, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 227, 227, + 0, 227, 216, 0, 0, 0, 0, 214, 212, 209, + 213, 0, 215, 0, 216, 50, 0, 0, 0, 214, + 212, 0, 213, 0, 215, 248, 0, 211, 0, 0, + 0, 0, 227, 0, 0, 227, 0, 248, 216, 211, + 0, 0, 0, 214, 212, 0, 213, 50, 215, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, + 0, 248, 0, 211, 227, 0, 0, 0, 0, 0, + 0, 217, 0, 0, 0, 0, 0, 0, 0, 232, + 232, 232, 232, 0, 0, 232, 232, 232, 232, 232, + 232, 232, 232, 232, 232, 217, 0, 0, 0, 0, + 0, 0, 0, 232, 232, 0, 232, 232, 232, 232, + 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, + 232, 232, 232, 232, 232, 0, 0, 232, 232, 232, + 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, + 232, 0, 0, 0, 0, 0, 232, 232, 232, 232, + 232, 232, 232, 232, 232, 232, 232, 0, 0, 232, + 232, 232, 232, 227, 0, 232, 232, 220, 232, 0, + 220, 232, 232, 232, 232, 232, 232, 232, 232, 232, + 232, 232, 232, 232, 232, 232, 50, 0, 0, 232, + 232, 232, 232, 232, 232, 232, 227, 227, 227, 227, + 0, 278, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 0, 50, 220, 220, 220, 220, 220, 220, + 227, 227, 0, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 0, 0, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 0, 0, + 0, 0, 0, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 0, 0, 227, 227, 227, 227, + 228, 0, 227, 227, 0, 227, 0, 0, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 0, 0, 0, 227, 227, 227, 227, + 227, 227, 227, 228, 246, 247, 205, 206, 207, 208, + 228, 228, 0, 228, 228, 228, 246, 247, 205, 206, + 207, 208, 0, 0, 367, 0, 0, 0, 278, 228, + 228, 375, 228, 0, 0, 0, 0, 0, 0, 0, + 203, 204, 205, 206, 207, 208, 0, 0, 0, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 0, 0, 0, 228, 0, 0, 228, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 79, 80, + 81, 82, 0, 0, 0, 0, 0, 248, 0, 0, + 0, 0, 0, 0, 0, 228, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 0, 0, 0, 0, 0, + 0, 51, 0, 0, 51, 0, 0, 0, 0, 0, + 248, 367, 367, 0, 0, 0, 0, 248, 248, 51, + 0, 248, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 248, 248, 0, 248, + 0, 0, 0, 0, 0, 367, 0, 0, 367, 0, + 0, 0, 0, 51, 0, 0, 0, 0, 0, 216, + 0, 0, 0, 0, 214, 212, 0, 213, 0, 215, + 248, 0, 0, 248, 0, 0, 0, 0, 0, 0, + 0, 0, 248, 0, 211, 51, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 248, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 217, 228, 228, 228, + 228, 0, 0, 228, 228, 228, 228, 228, 228, 228, + 228, 228, 228, 0, 197, 0, 0, 0, 0, 0, + 0, 228, 228, 0, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, - 228, 0, 19, 228, 228, 228, 228, 250, 0, 228, - 228, 0, 228, 0, 0, 228, 228, 228, 228, 228, + 228, 228, 228, 0, 0, 228, 228, 228, 228, 228, + 228, 228, 228, 228, 228, 228, 228, 228, 228, 270, + 271, 272, 282, 0, 228, 228, 228, 228, 228, 228, + 228, 228, 228, 228, 228, 0, 0, 228, 228, 228, + 228, 0, 0, 228, 228, 0, 228, 302, 0, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, - 18, 0, 0, 228, 228, 228, 228, 228, 228, 228, - 250, 0, 0, 0, 250, 48, 0, 250, 250, 250, - 250, 250, 250, 0, 250, 0, 0, 0, 0, 0, - 0, 19, 0, 72, 0, 0, 250, 250, 0, 250, - 230, 231, 232, 233, 234, 235, 0, 236, 0, 245, - 246, 204, 205, 206, 207, 0, 215, 0, 0, 18, - 0, 213, 211, 208, 212, 19, 214, 0, 0, 0, - 250, 0, 0, 250, 48, 0, 0, 54, 55, 247, - 0, 210, 0, 402, 0, 0, 0, 403, 404, 0, - 215, 0, 72, 18, 224, 213, 211, 19, 212, 0, - 214, 0, 250, 0, 0, 0, 0, 0, 48, 0, - 0, 0, 0, 216, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 18, 72, 224, 0, 0, - 0, 224, 0, 0, 224, 224, 224, 224, 224, 224, - 48, 224, 0, 79, 80, 81, 82, 216, 0, 0, - 0, 0, 0, 224, 224, 0, 224, 0, 72, 0, - 0, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 0, 0, 0, 0, 215, 0, 0, 0, 0, 213, - 211, 0, 212, 0, 214, 0, 0, 224, 0, 0, - 224, 0, 0, 0, 0, 0, 0, 247, 0, 210, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 216, 0, 0, 250, 250, 250, 250, 0, 0, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 0, 0, 225, 0, 0, 0, 0, 0, 250, 250, + 228, 228, 228, 228, 51, 0, 0, 228, 228, 228, + 228, 228, 228, 228, 248, 248, 248, 248, 0, 0, + 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, + 0, 51, 336, 0, 0, 0, 0, 0, 248, 248, + 344, 248, 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, + 0, 0, 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 15, 0, 0, 0, + 0, 248, 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 437, 0, 248, 248, 248, 248, 250, 197, + 248, 248, 0, 248, 0, 0, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, + 248, 0, 0, 0, 248, 248, 248, 248, 248, 248, + 248, 250, 0, 0, 0, 15, 0, 0, 250, 250, + 391, 392, 250, 0, 0, 393, 0, 0, 0, 0, + 0, 203, 204, 205, 206, 207, 208, 250, 250, 0, + 250, 0, 0, 0, 0, 0, 0, 0, 0, 15, + 0, 0, 201, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 250, 0, 0, 250, 0, 0, 0, 0, 0, + 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 249, 0, 0, 0, 421, + 422, 0, 0, 250, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 434, 435, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 249, 0, + 0, 0, 0, 0, 0, 249, 249, 0, 0, 249, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 249, 249, 0, 249, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 249, 0, + 0, 249, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 201, 0, 0, 0, 0, 0, 201, + 249, 0, 0, 0, 201, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 250, 250, 250, 250, 0, 0, 250, 250, 250, 250, 250, 250, 250, 250, 250, + 250, 0, 0, 0, 0, 0, 0, 0, 201, 250, + 250, 0, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, + 250, 0, 0, 250, 250, 250, 250, 250, 250, 250, + 250, 250, 250, 250, 250, 250, 250, 0, 0, 0, 0, 0, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 0, 0, 0, 0, - 0, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 275, 0, 250, 250, 250, 250, 0, 0, - 250, 250, 0, 250, 0, 0, 250, 250, 250, 250, + 250, 250, 250, 0, 0, 250, 250, 250, 250, 0, + 0, 250, 250, 0, 250, 0, 0, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 0, 0, 0, 250, 250, 250, 250, 250, 250, - 250, 224, 224, 224, 224, 0, 0, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 0, 202, 203, - 204, 205, 206, 207, 0, 224, 224, 0, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 8, 0, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 224, 0, 0, 0, 0, 0, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 0, - 0, 224, 224, 224, 224, 225, 0, 224, 224, 0, - 224, 0, 0, 224, 224, 224, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 0, 0, - 0, 224, 224, 224, 224, 224, 224, 224, 225, 0, - 0, 0, 225, 0, 0, 225, 225, 225, 225, 225, - 225, 0, 225, 0, 0, 0, 202, 203, 204, 205, - 206, 207, 0, 0, 225, 225, 0, 225, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 30, 0, 0, 0, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 0, 0, 0, 225, 0, - 0, 225, 0, 0, 0, 0, 0, 54, 55, 0, - 0, 0, 0, 79, 80, 81, 82, 0, 0, 0, - 0, 0, 226, 0, 0, 0, 0, 0, 0, 0, - 225, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 0, 0, 0, 0, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 226, 0, 0, 0, 226, - 0, 0, 226, 226, 226, 226, 226, 226, 0, 226, - 0, 0, 0, 79, 80, 81, 82, 0, 0, 0, - 0, 226, 226, 0, 226, 0, 0, 0, 0, 0, - 0, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 0, 0, 215, 0, 0, 0, 0, 213, 211, 208, - 212, 0, 214, 0, 0, 226, 0, 0, 226, 0, - 0, 0, 0, 215, 0, 209, 0, 210, 213, 211, - 208, 212, 0, 214, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 247, 226, 210, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 216, - 0, 0, 225, 225, 225, 225, 0, 0, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 0, 0, - 216, 0, 0, 0, 0, 0, 225, 225, 0, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 0, 0, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 0, 0, 0, 0, 0, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 0, 0, 225, 225, 225, 225, 0, 0, 225, 225, - 0, 225, 0, 0, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 0, - 0, 0, 225, 225, 225, 225, 225, 225, 225, 226, - 226, 226, 226, 0, 0, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 0, 0, 0, 0, 0, - 0, 0, 0, 226, 226, 0, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 0, 0, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 0, 0, 0, 0, 0, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 0, 0, 226, - 226, 226, 226, 227, 0, 226, 226, 200, 226, 0, - 201, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 0, 0, 0, 226, - 226, 226, 226, 226, 226, 226, 227, 0, 0, 0, - 227, 0, 0, 227, 227, 227, 227, 227, 227, 0, - 227, 0, 0, 0, 202, 203, 204, 205, 206, 207, - 0, 0, 227, 227, 0, 227, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 245, 246, 204, 205, 206, - 207, 0, 0, 215, 0, 0, 0, 0, 213, 211, - 208, 212, 0, 214, 0, 0, 227, 0, 196, 227, - 0, 0, 0, 0, 0, 0, 209, 0, 210, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 222, 0, 0, 0, 0, 0, 0, 0, 227, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 216, 0, 0, 269, 270, 271, 281, 0, 0, 0, - 0, 0, 0, 222, 0, 0, 0, 0, 0, 0, - 222, 222, 0, 222, 222, 222, 0, 0, 0, 0, - 0, 301, 0, 0, 0, 0, 0, 0, 0, 222, - 222, 0, 222, 215, 0, 0, 0, 0, 213, 211, - 0, 212, 0, 214, 0, 0, 0, 215, 0, 0, - 0, 0, 215, 215, 215, 215, 247, 215, 210, 0, - 0, 0, 0, 222, 0, 330, 222, 0, 0, 215, - 215, 0, 215, 338, 213, 211, 0, 212, 0, 214, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 216, 0, 247, 0, 210, 222, 0, 0, 0, 0, - 0, 0, 0, 0, 215, 0, 0, 0, 0, 0, - 227, 227, 227, 227, 0, 0, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 216, 0, 0, 0, - 0, 0, 196, 0, 227, 227, 0, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 0, 0, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 0, 0, 0, 385, 0, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, 0, 0, - 227, 227, 227, 227, 0, 0, 227, 227, 200, 227, - 0, 201, 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 0, 0, 0, - 227, 227, 227, 227, 227, 227, 227, 222, 222, 222, - 222, 0, 0, 222, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 407, 408, 245, 246, 204, 205, 206, - 207, 222, 222, 0, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 0, 0, 222, 222, 222, 222, 222, - 222, 222, 222, 222, 222, 222, 222, 222, 222, 0, - 0, 0, 0, 0, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 222, 222, 0, 0, 222, 222, 222, - 222, 223, 215, 222, 222, 215, 222, 0, 0, 222, - 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, - 222, 222, 222, 222, 0, 0, 0, 222, 222, 222, - 222, 222, 222, 222, 223, 202, 203, 204, 205, 206, - 207, 223, 223, 0, 223, 223, 223, 0, 0, 215, - 215, 215, 215, 215, 215, 0, 0, 50, 0, 0, - 223, 223, 0, 223, 0, 0, 0, 0, 0, 0, - 0, 245, 0, 204, 205, 206, 207, 0, 0, 0, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 0, 0, 0, 223, 0, 0, 223, 50, 0, - 0, 50, 51, 0, 0, 0, 0, 0, 0, 79, - 80, 81, 82, 0, 0, 0, 50, 0, 243, 0, - 0, 0, 0, 0, 0, 0, 223, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 0, 0, 0, 51, 0, 0, 51, 0, 0, 0, - 50, 243, 0, 0, 0, 0, 0, 0, 243, 243, - 0, 51, 243, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 243, 243, 0, - 243, 0, 50, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, - 215, 0, 0, 0, 0, 213, 211, 0, 212, 0, - 214, 243, 0, 0, 243, 0, 0, 0, 0, 0, - 0, 0, 0, 247, 0, 210, 0, 51, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 243, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 216, 223, 223, - 223, 223, 0, 0, 223, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 0, 0, 0, 0, 0, 0, - 0, 0, 223, 223, 0, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 0, 0, 223, 223, 223, 223, - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, - 0, 50, 0, 0, 0, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 223, 223, 0, 0, 223, 223, - 223, 223, 0, 0, 223, 223, 0, 223, 50, 0, - 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 223, 0, 51, 0, 223, 223, - 223, 223, 223, 223, 223, 243, 243, 243, 243, 0, - 0, 243, 243, 243, 243, 243, 243, 243, 243, 243, - 243, 0, 0, 51, 0, 0, 0, 0, 0, 243, - 243, 0, 243, 243, 243, 243, 243, 243, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, - 243, 0, 0, 243, 243, 243, 243, 243, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 15, 0, 0, - 0, 0, 243, 243, 243, 243, 243, 243, 243, 243, - 243, 243, 243, 421, 0, 243, 243, 243, 243, 245, - 0, 243, 243, 0, 243, 0, 0, 243, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, - 243, 243, 0, 0, 0, 243, 243, 243, 243, 243, - 243, 243, 245, 0, 0, 0, 15, 0, 0, 245, - 245, 0, 0, 245, 0, 0, 0, 0, 0, 0, - 0, 0, 202, 203, 204, 205, 206, 207, 245, 245, - 0, 245, 0, 0, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 196, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 245, 0, 0, 245, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 244, 0, 0, 0, - 0, 0, 0, 0, 245, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, - 0, 0, 0, 0, 0, 0, 244, 244, 0, 0, - 244, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 244, 244, 0, 244, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, - 0, 0, 244, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 196, 0, 0, 0, 0, 0, - 196, 244, 0, 0, 0, 196, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 245, 245, 245, 245, - 0, 0, 245, 245, 245, 245, 245, 245, 245, 245, - 245, 245, 0, 0, 0, 0, 0, 0, 0, 196, - 245, 245, 0, 245, 245, 245, 245, 245, 245, 245, - 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, - 245, 245, 0, 0, 245, 245, 245, 245, 245, 245, - 245, 245, 245, 245, 245, 245, 245, 245, 0, 0, - 0, 0, 0, 245, 245, 245, 245, 245, 245, 245, - 245, 245, 245, 245, 0, 0, 245, 245, 245, 245, - 0, 0, 245, 245, 0, 245, 0, 0, 245, 245, - 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, - 245, 245, 245, 0, 0, 0, 245, 245, 245, 245, - 245, 245, 245, 244, 244, 244, 244, 0, 0, 244, - 244, 244, 244, 244, 244, 244, 244, 244, 244, 0, - 0, 0, 0, 0, 0, 0, 0, 244, 244, 0, - 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, - 244, 244, 244, 244, 244, 244, 244, 244, 244, 0, - 0, 244, 244, 244, 244, 244, 244, 244, 244, 244, - 244, 244, 244, 244, 244, 16, 0, 0, 0, 0, - 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, - 244, 0, 0, 244, 244, 244, 244, 242, 0, 244, - 244, 0, 244, 0, 0, 244, 244, 244, 244, 244, - 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, - 0, 0, 0, 244, 244, 244, 244, 244, 244, 244, - 242, 0, 0, 0, 16, 0, 0, 242, 242, 0, - 0, 242, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 242, 242, 0, 242, - 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, - 0, 197, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 242, 0, 0, 242, 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 151, 0, 0, 0, 0, 0, - 0, 0, 242, 0, 0, 0, 0, 0, 59, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 151, 0, 0, - 0, 0, 0, 0, 151, 151, 0, 151, 151, 151, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, - 0, 0, 59, 151, 0, 0, 151, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 151, 0, 0, - 151, 0, 0, 0, 0, 0, 0, 215, 0, 0, - 0, 59, 213, 211, 0, 212, 0, 214, 0, 0, - 0, 0, 197, 0, 0, 0, 0, 0, 197, 151, - 247, 0, 210, 197, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 59, 242, 242, 242, 242, 0, 0, - 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, - 0, 0, 0, 0, 216, 0, 0, 197, 242, 242, - 0, 242, 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, - 0, 0, 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 0, 0, 0, 0, - 0, 242, 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 0, 0, 242, 242, 242, 242, 0, 0, - 242, 242, 0, 242, 0, 0, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, - 242, 0, 0, 0, 242, 242, 242, 242, 242, 242, - 242, 151, 151, 151, 151, 0, 0, 151, 0, 151, - 151, 151, 151, 151, 151, 151, 151, 0, 0, 0, - 0, 0, 59, 0, 0, 151, 151, 0, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 0, 0, 0, 59, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 0, - 0, 151, 151, 151, 151, 247, 0, 151, 151, 0, - 0, 0, 0, 0, 0, 0, 0, 389, 0, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 59, 0, - 0, 151, 151, 151, 151, 151, 151, 151, 247, 0, - 0, 0, 0, 0, 0, 247, 247, 0, 0, 247, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 247, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, - 203, 204, 205, 206, 207, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 247, 0, - 0, 247, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 246, 0, 0, 0, 0, 0, 0, 0, + 250, 250, 0, 0, 0, 250, 250, 250, 250, 250, + 250, 250, 249, 249, 249, 249, 0, 0, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, 0, 0, + 0, 0, 0, 0, 0, 0, 249, 249, 0, 249, + 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, 0, 0, + 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 16, 0, 0, 0, 0, 249, + 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, + 0, 0, 249, 249, 249, 249, 247, 0, 249, 249, + 0, 249, 0, 0, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, 249, 0, + 0, 0, 249, 249, 249, 249, 249, 249, 249, 247, + 0, 0, 0, 16, 0, 0, 247, 247, 0, 0, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 246, 0, 0, 0, 0, - 0, 0, 246, 246, 0, 0, 246, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 246, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 246, 0, 0, 246, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 246, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 247, 247, 247, 247, 0, 0, 247, 247, - 247, 247, 247, 247, 247, 247, 247, 247, 0, 0, - 0, 0, 0, 0, 0, 0, 247, 247, 0, 247, + 0, 0, 0, 0, 0, 247, 247, 0, 247, 0, + 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, + 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, + 0, 0, 247, 0, 0, 0, 0, 0, 0, 16, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 156, 0, 0, 0, 0, 0, 0, + 0, 247, 0, 0, 0, 0, 0, 59, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 156, 0, 0, 0, + 0, 0, 0, 156, 156, 0, 156, 156, 156, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, + 0, 59, 156, 0, 0, 156, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 156, 0, 0, 156, + 0, 0, 0, 0, 0, 0, 216, 0, 0, 0, + 59, 214, 212, 0, 213, 0, 215, 0, 0, 0, + 0, 202, 0, 0, 0, 0, 0, 202, 156, 248, + 0, 211, 202, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 59, 247, 247, 247, 247, 0, 0, 247, + 247, 247, 247, 247, 247, 247, 247, 247, 247, 0, + 0, 0, 0, 217, 0, 0, 202, 247, 247, 0, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, - 247, 247, 247, 247, 247, 247, 247, 247, 0, 0, + 247, 247, 247, 247, 247, 247, 247, 247, 247, 0, + 0, 247, 247, 247, 247, 247, 247, 247, 247, 247, + 247, 247, 247, 247, 247, 0, 0, 0, 0, 0, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, - 247, 247, 247, 247, 0, 0, 0, 0, 0, 247, + 247, 0, 0, 247, 247, 247, 247, 0, 0, 247, + 247, 0, 247, 0, 0, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, - 0, 0, 247, 247, 247, 247, 0, 0, 247, 247, - 0, 247, 0, 0, 247, 247, 247, 247, 0, 0, - 247, 247, 247, 247, 247, 247, 247, 247, 247, 0, - 0, 0, 247, 247, 247, 247, 247, 247, 247, 246, - 246, 246, 246, 0, 0, 246, 246, 246, 246, 246, - 246, 246, 246, 246, 246, 0, 0, 0, 0, 0, - 0, 0, 0, 246, 246, 0, 246, 246, 246, 246, - 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, - 246, 246, 246, 246, 246, 0, 0, 246, 246, 246, - 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, - 246, 0, 0, 0, 0, 0, 246, 246, 246, 246, - 246, 246, 246, 246, 246, 246, 246, 0, 0, 246, - 246, 246, 246, 152, 0, 246, 246, 0, 246, 0, - 0, 246, 246, 246, 246, 0, 0, 246, 246, 246, - 246, 246, 246, 246, 246, 246, 0, 0, 0, 246, - 246, 246, 246, 246, 246, 246, 152, 0, 0, 0, - 0, 0, 0, 152, 152, 0, 152, 152, 152, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 152, 0, 0, 152, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 55, 0, 0, 0, 0, 0, 152, 0, 0, 152, + 0, 0, 0, 247, 247, 247, 247, 247, 247, 247, + 156, 156, 156, 156, 0, 0, 156, 0, 156, 156, + 156, 156, 156, 156, 156, 156, 0, 0, 0, 0, + 0, 59, 0, 0, 156, 156, 0, 156, 156, 156, + 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 156, 0, 0, 0, 59, 156, + 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 156, 156, 156, 156, 0, 0, + 156, 156, 156, 156, 252, 0, 156, 156, 0, 0, + 0, 0, 0, 0, 0, 0, 399, 0, 156, 156, + 156, 156, 156, 156, 156, 156, 156, 59, 0, 0, + 156, 156, 156, 156, 156, 156, 156, 252, 0, 0, + 0, 0, 0, 0, 252, 252, 0, 0, 252, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 252, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 203, 204, + 205, 206, 207, 208, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 252, 0, 0, + 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 251, 0, 0, 0, 0, 0, 0, 0, 252, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 251, 0, 0, 0, 0, 0, + 0, 251, 251, 0, 0, 251, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 251, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 251, 0, 0, 251, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 251, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 252, 252, 252, 252, 0, 0, 252, 252, 252, + 252, 252, 252, 252, 252, 252, 252, 0, 0, 0, + 0, 0, 0, 0, 0, 252, 252, 0, 252, 252, + 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, + 252, 252, 252, 252, 252, 252, 252, 0, 0, 252, + 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, + 252, 252, 252, 0, 0, 0, 0, 0, 252, 252, + 252, 252, 252, 252, 252, 252, 252, 252, 252, 0, + 0, 252, 252, 252, 252, 0, 0, 252, 252, 0, + 252, 0, 0, 252, 252, 252, 252, 0, 0, 252, + 252, 252, 252, 252, 252, 252, 252, 252, 0, 0, + 0, 252, 252, 252, 252, 252, 252, 252, 251, 251, + 251, 251, 0, 0, 251, 251, 251, 251, 251, 251, + 251, 251, 251, 251, 0, 0, 0, 0, 0, 0, + 0, 0, 251, 251, 0, 251, 251, 251, 251, 251, + 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, + 251, 251, 251, 251, 0, 0, 251, 251, 251, 251, + 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, + 0, 0, 0, 0, 0, 251, 251, 251, 251, 251, + 251, 251, 251, 251, 251, 251, 0, 0, 251, 251, + 251, 251, 157, 0, 251, 251, 0, 251, 0, 0, + 251, 251, 251, 251, 0, 0, 251, 251, 251, 251, + 251, 251, 251, 251, 251, 0, 0, 0, 251, 251, + 251, 251, 251, 251, 251, 157, 0, 0, 0, 0, + 0, 0, 157, 157, 0, 157, 157, 157, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 157, 0, 0, 157, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, + 0, 0, 0, 0, 0, 157, 0, 0, 157, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, + 0, 0, 0, 0, 0, 0, 0, 157, 0, 0, + 58, 0, 0, 58, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, + 0, 0, 253, 0, 0, 0, 0, 0, 0, 253, + 253, 0, 0, 253, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 253, 0, + 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 253, 0, 58, 253, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 253, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, + 157, 157, 157, 0, 0, 157, 0, 157, 157, 157, + 157, 157, 157, 157, 157, 0, 0, 0, 0, 0, + 0, 0, 0, 157, 157, 0, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 0, 0, 0, 0, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 0, 0, 157, + 157, 157, 157, 0, 0, 157, 157, 0, 0, 0, + 0, 0, 0, 58, 0, 0, 0, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 0, 0, 0, 157, + 157, 157, 157, 157, 157, 157, 253, 253, 253, 253, + 58, 0, 253, 253, 253, 253, 253, 253, 253, 253, + 253, 253, 0, 0, 0, 0, 0, 0, 0, 0, + 253, 253, 0, 253, 253, 253, 253, 253, 253, 253, + 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, + 253, 253, 0, 0, 253, 253, 253, 253, 253, 253, + 253, 253, 253, 253, 253, 253, 253, 253, 0, 58, + 0, 0, 0, 253, 253, 253, 253, 253, 253, 253, + 253, 253, 253, 253, 0, 0, 253, 253, 253, 253, + 254, 0, 253, 253, 0, 253, 0, 0, 253, 253, + 0, 0, 0, 0, 253, 253, 253, 253, 253, 253, + 253, 253, 253, 0, 0, 0, 253, 253, 253, 253, + 253, 253, 253, 254, 0, 0, 0, 0, 0, 0, + 254, 254, 0, 0, 254, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 254, 0, 0, 254, 0, 0, 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 248, 0, 0, 0, 0, 0, 0, 0, 152, 0, - 0, 55, 0, 0, 55, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, - 0, 0, 0, 248, 0, 0, 0, 0, 0, 0, - 248, 248, 0, 0, 248, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, - 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 248, 0, 55, 248, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 248, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 152, 152, 152, 152, 0, 0, 152, 0, 152, 152, - 152, 152, 152, 152, 152, 152, 0, 0, 0, 0, - 0, 0, 0, 0, 152, 152, 0, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 0, 0, 0, 0, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 0, 0, 0, 0, 0, 0, 0, 138, 0, 0, + 0, 0, 0, 0, 0, 254, 0, 0, 0, 0, + 0, 254, 0, 0, 254, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, + 138, 0, 0, 0, 0, 0, 0, 138, 138, 0, + 138, 138, 138, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 138, 0, 0, 138, + 0, 0, 0, 254, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 138, 0, 0, 138, 0, 254, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 138, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 254, 254, 254, + 254, 0, 0, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 0, 0, 0, 0, 0, 0, 0, + 0, 254, 254, 0, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 0, 0, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 0, + 0, 0, 0, 0, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 0, 0, 254, 254, 254, + 254, 0, 0, 254, 254, 0, 254, 0, 0, 0, + 254, 0, 0, 0, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 0, 0, 0, 254, 254, 254, + 254, 254, 254, 254, 138, 138, 138, 138, 0, 0, + 138, 254, 138, 138, 138, 138, 138, 138, 138, 138, + 0, 0, 254, 0, 0, 254, 0, 0, 138, 138, + 0, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 0, + 0, 0, 0, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 0, 0, 0, 0, + 254, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 0, 0, 138, 138, 138, 138, 146, 0, + 138, 138, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 0, 0, 0, 138, 138, 138, 138, 138, 138, + 138, 146, 0, 0, 0, 0, 0, 0, 146, 146, + 0, 0, 146, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 146, 0, 0, + 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, + 0, 146, 0, 0, 146, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 152, 0, 0, 0, 0, + 0, 0, 0, 146, 0, 0, 57, 0, 0, 57, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 57, 0, 0, 0, 152, 0, + 0, 0, 0, 0, 0, 152, 152, 0, 0, 152, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 152, 0, 0, 0, 57, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 152, 0, + 57, 152, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 152, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 146, 146, 146, 146, 0, + 0, 146, 0, 146, 146, 146, 146, 146, 146, 146, + 146, 0, 0, 0, 0, 0, 0, 0, 0, 146, + 146, 0, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 0, 0, 0, 0, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 0, 0, 0, + 0, 0, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 0, 0, 146, 146, 146, 146, 0, + 0, 146, 146, 0, 0, 0, 0, 32, 0, 57, + 0, 0, 0, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 0, 0, 0, 146, 146, 146, 146, 146, + 146, 146, 152, 152, 152, 152, 57, 0, 152, 33, 152, 152, 152, 152, 152, 152, 152, 152, 0, 0, - 152, 152, 152, 152, 0, 0, 152, 152, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 152, 152, + 0, 0, 0, 0, 0, 0, 152, 152, 0, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 0, 0, 0, - 152, 152, 152, 152, 152, 152, 152, 248, 248, 248, - 248, 55, 0, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, - 0, 248, 248, 0, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 0, 0, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, 248, 55, - 55, 0, 0, 0, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 0, 0, 248, 248, 248, - 248, 249, 0, 248, 248, 0, 248, 0, 0, 248, - 248, 0, 0, 0, 0, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 0, 0, 0, 248, 248, 248, - 248, 248, 248, 248, 249, 0, 0, 0, 0, 0, - 0, 249, 249, 0, 0, 249, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 249, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 248, 0, 0, 249, 0, 0, 249, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 138, 0, - 0, 0, 0, 0, 0, 0, 249, 0, 0, 0, - 0, 0, 248, 0, 0, 248, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 248, 138, 0, 0, 0, 0, 0, 0, 138, 138, - 0, 138, 138, 138, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 138, 0, 0, - 138, 0, 0, 0, 248, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 0, 57, 0, 0, 0, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 0, 0, 152, 152, 152, 152, 91, 0, 152, 152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 138, 0, 0, 138, 0, 248, 0, 0, 0, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 0, + 0, 0, 152, 152, 152, 152, 152, 152, 152, 91, + 0, 0, 0, 0, 0, 0, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 6, 7, 91, 8, 9, 0, 0, + 0, 0, 0, 0, 0, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 0, 0, 22, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, + 0, 0, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 138, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 249, 249, - 249, 249, 0, 0, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 0, 0, 0, 0, 0, 0, - 0, 0, 249, 249, 0, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 0, 0, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, - 0, 0, 0, 0, 0, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 0, 0, 249, 249, - 249, 249, 0, 0, 249, 249, 0, 249, 0, 0, - 0, 249, 0, 0, 0, 248, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 0, 0, 0, 249, 249, - 249, 249, 249, 249, 249, 138, 138, 138, 138, 0, - 0, 138, 248, 138, 138, 138, 138, 138, 138, 138, - 138, 0, 0, 248, 0, 0, 248, 0, 0, 138, - 138, 0, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 0, 0, 0, 0, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 0, 0, 0, - 248, 248, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 0, 0, 138, 138, 138, 138, 143, - 0, 138, 138, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 0, 0, 0, 138, 138, 138, 138, 138, - 138, 138, 143, 0, 0, 0, 0, 0, 0, 143, - 143, 0, 0, 143, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 143, 0, - 0, 143, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, - 0, 0, 143, 0, 0, 143, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 147, 0, 0, 0, - 0, 0, 0, 0, 143, 0, 0, 0, 0, 0, - 249, 0, 0, 249, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 249, 147, - 0, 0, 0, 0, 0, 0, 147, 147, 0, 0, - 147, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 147, 0, 0, 0, 0, - 0, 0, 249, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, - 0, 0, 147, 0, 249, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 147, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 143, 143, 143, 143, - 0, 0, 143, 0, 143, 143, 143, 143, 143, 143, - 143, 143, 0, 0, 0, 0, 0, 0, 0, 0, - 143, 143, 0, 143, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - 143, 0, 0, 0, 0, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 143, 0, 0, - 0, 0, 0, 143, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 0, 0, 143, 143, 143, 143, - 0, 0, 143, 143, 0, 32, 0, 0, 0, 0, - 0, 0, 0, 249, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 0, 0, 0, 143, 143, 143, 143, - 143, 143, 143, 147, 147, 147, 147, 33, 0, 147, - 249, 147, 147, 147, 147, 147, 147, 147, 147, 0, - 0, 249, 0, 0, 249, 0, 0, 147, 147, 0, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147, 147, 0, 0, - 0, 0, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 0, 0, 0, 0, 249, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 0, 0, 147, 147, 147, 147, 91, 0, 147, - 147, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 0, 0, 0, 147, 147, 147, 147, 147, 147, 147, - 91, 0, 0, 0, 0, 0, 0, 91, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 7, 0, 8, 9, 91, 0, 0, 0, - 0, 0, 0, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 0, 0, 22, 0, 0, - 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, - 91, 0, 0, 91, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 93, 0, 0, 0, 0, 0, 0, + 0, 91, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 23, 0, 0, 0, 0, 0, 24, 25, 0, + 0, 26, 0, 27, 0, 0, 93, 0, 0, 0, + 0, 0, 0, 93, 0, 0, 0, 0, 0, 0, + 28, 0, 29, 0, 0, 0, 0, 0, 0, 30, + 31, 0, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 93, 0, 0, 0, 0, 0, - 0, 0, 91, 0, 0, 58, 0, 0, 58, 23, - 0, 0, 0, 0, 0, 24, 25, 0, 0, 26, - 0, 27, 0, 58, 0, 0, 0, 93, 0, 0, - 0, 0, 0, 0, 93, 0, 0, 0, 28, 0, - 29, 0, 0, 0, 0, 0, 0, 30, 31, 0, - 0, 0, 0, 93, 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 93, 0, 0, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 93, 0, 58, - 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, + 0, 0, 0, 0, 0, 0, 0, 0, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 91, 91, 91, 91, 0, 0, - 91, 0, 91, 91, 91, 91, 91, 91, 91, 91, - 0, 0, 0, 0, 0, 0, 0, 0, 91, 91, + 0, 0, 0, 91, 91, 91, 91, 0, 0, 91, + 0, 91, 91, 91, 91, 91, 91, 91, 91, 0, + 0, 0, 0, 0, 0, 0, 0, 91, 91, 0, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 0, 0, + 0, 0, 0, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 0, 0, 0, 0, 0, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 0, 0, 91, 91, 91, 91, 0, 0, 91, + 91, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 91, 91, 91, 91, 91, 91, 91, 91, 91, - 91, 91, 91, 91, 91, 91, 91, 91, 91, 0, - 0, 0, 0, 0, 91, 91, 91, 91, 91, 91, - 91, 91, 91, 91, 91, 91, 0, 0, 0, 0, - 0, 91, 91, 91, 91, 91, 91, 91, 91, 91, - 91, 91, 0, 0, 91, 91, 91, 91, 0, 0, - 91, 91, 0, 0, 0, 0, 6, 0, 58, 0, - 0, 0, 91, 91, 91, 91, 91, 91, 91, 91, - 91, 0, 0, 0, 91, 91, 91, 91, 91, 91, - 91, 93, 93, 93, 93, 58, 0, 93, 6, 93, - 93, 93, 93, 93, 93, 93, 93, 0, 0, 0, - 0, 0, 0, 0, 0, 93, 93, 0, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, + 0, 0, 0, 91, 91, 91, 91, 91, 91, 91, + 93, 93, 93, 93, 6, 0, 93, 0, 93, 93, 93, 93, 93, 93, 93, 93, 0, 0, 0, 0, - 0, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 0, 58, 0, 0, 0, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 0, - 0, 93, 93, 93, 93, 95, 0, 93, 93, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, + 0, 0, 0, 0, 93, 93, 0, 93, 93, 93, + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, 0, 0, 0, 0, 0, + 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, + 93, 93, 0, 0, 0, 0, 0, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 0, 0, - 0, 93, 93, 93, 93, 93, 93, 93, 95, 0, - 0, 0, 0, 0, 0, 95, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 6, 6, 95, 6, 6, 0, 0, 0, - 0, 0, 0, 0, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 0, 0, 6, 0, - 0, 0, 57, 0, 0, 0, 0, 0, 95, 0, - 0, 95, 0, 0, 0, 0, 0, 0, 0, 0, + 93, 93, 93, 93, 95, 0, 93, 93, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 93, 93, + 93, 93, 93, 93, 93, 93, 93, 0, 0, 0, + 93, 93, 93, 93, 93, 93, 93, 95, 0, 0, + 0, 0, 0, 0, 95, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, + 0, 6, 6, 95, 0, 0, 0, 0, 0, 0, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 95, 0, 0, + 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, - 95, 0, 0, 57, 0, 0, 57, 0, 0, 0, - 6, 0, 0, 0, 0, 0, 6, 6, 0, 0, - 6, 57, 6, 0, 0, 99, 0, 0, 0, 0, - 0, 0, 99, 0, 0, 0, 0, 0, 0, 6, - 0, 6, 0, 0, 0, 0, 0, 0, 6, 6, - 0, 99, 0, 0, 0, 57, 0, 0, 0, 0, + 0, 99, 0, 0, 0, 0, 0, 0, 0, 95, + 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 6, 6, 0, 0, 6, 0, 6, 0, + 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, + 0, 99, 0, 0, 0, 6, 0, 6, 0, 0, + 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, + 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 99, 0, 57, 99, 0, + 0, 0, 0, 0, 99, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, + 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 95, 95, 95, 95, 0, 0, 95, 0, - 95, 95, 95, 95, 95, 95, 95, 95, 0, 0, - 0, 0, 0, 0, 0, 0, 95, 95, 0, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 0, 95, 95, 95, 95, 0, 0, 95, 0, 95, 95, 95, 95, 95, 95, 95, 95, 0, 0, 0, - 0, 0, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 0, 0, 0, 0, 0, 95, + 0, 0, 0, 0, 0, 95, 95, 0, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 0, 0, 95, 95, 95, 95, 0, 0, 95, 95, - 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, + 95, 95, 95, 95, 95, 95, 0, 0, 0, 0, + 0, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 0, 0, 0, 0, 0, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 0, - 0, 0, 95, 95, 95, 95, 95, 95, 95, 99, - 99, 99, 99, 57, 0, 99, 0, 99, 99, 99, - 99, 99, 99, 99, 99, 0, 0, 0, 0, 0, - 0, 0, 0, 99, 99, 0, 99, 99, 99, 99, + 0, 95, 95, 95, 95, 0, 0, 95, 95, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 0, 0, + 0, 95, 95, 95, 95, 95, 95, 95, 99, 99, + 99, 99, 0, 0, 99, 0, 99, 99, 99, 99, + 99, 99, 99, 99, 0, 0, 0, 0, 0, 0, + 0, 0, 99, 99, 0, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 0, 0, 0, 0, 0, 99, + 99, 99, 99, 0, 0, 0, 0, 0, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 0, 57, 0, 0, 0, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 0, 0, 99, - 99, 99, 99, 97, 0, 99, 99, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 0, 0, 0, 99, - 99, 99, 99, 99, 99, 99, 97, 0, 0, 0, - 0, 0, 0, 97, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 0, 0, 99, 99, + 99, 99, 97, 0, 99, 99, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 0, 0, 0, 99, 99, + 99, 99, 99, 99, 99, 97, 0, 0, 0, 0, 0, 0, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 97, 0, 0, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 97, 0, 0, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 87, 0, 0, 0, 0, 0, 0, 0, 97, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, + 0, 0, 0, 0, 0, 0, 0, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, - 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, + 0, 0, 87, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 87, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 87, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 97, 97, 97, 97, 0, 0, 97, 0, 97, 97, - 97, 97, 97, 97, 97, 97, 0, 0, 0, 0, - 0, 0, 0, 0, 97, 97, 0, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, + 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, + 97, 97, 97, 0, 0, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 0, 0, + 0, 0, 0, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 0, 0, 0, 0, 0, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, - 97, 97, 97, 97, 0, 0, 97, 97, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, - 97, 97, 97, 97, 97, 97, 97, 87, 87, 87, - 87, 0, 0, 87, 0, 87, 87, 87, 87, 87, - 87, 87, 87, 0, 0, 0, 0, 0, 0, 0, - 0, 87, 87, 0, 87, 87, 87, 87, 87, 87, + 97, 97, 97, 97, 0, 0, 0, 0, 0, 97, + 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, + 97, 0, 0, 0, 0, 0, 97, 97, 97, 97, + 97, 97, 97, 97, 97, 97, 97, 0, 0, 97, + 97, 97, 97, 0, 0, 97, 97, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, + 97, 97, 97, 97, 97, 97, 0, 0, 0, 97, + 97, 97, 97, 97, 97, 97, 87, 87, 87, 87, + 0, 0, 87, 0, 87, 87, 87, 87, 87, 87, + 87, 87, 0, 0, 0, 0, 0, 0, 0, 0, + 87, 87, 0, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 0, 0, 0, 0, 0, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 0, + 87, 0, 0, 0, 0, 0, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 0, 0, + 0, 0, 0, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 0, 0, 87, 87, 87, 87, + 88, 0, 87, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 0, 0, 87, 87, 87, - 87, 88, 0, 87, 87, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 0, 0, 0, 87, 87, 87, - 87, 87, 87, 87, 88, 0, 0, 0, 0, 0, - 0, 88, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 87, 87, 87, 0, 0, 0, 87, 87, 87, 87, + 87, 87, 87, 88, 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 88, 0, 0, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, - 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, + 0, 0, 0, 88, 0, 0, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, + 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 89, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, + 89, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 89, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 89, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 88, 88, - 88, 88, 0, 0, 88, 0, 88, 88, 88, 88, - 88, 88, 88, 88, 0, 0, 0, 0, 0, 0, - 0, 0, 88, 88, 0, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 0, 0, 0, 0, 0, 88, 88, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 88, 88, 88, + 88, 0, 0, 88, 0, 88, 88, 88, 88, 88, + 88, 88, 88, 0, 0, 0, 0, 0, 0, 0, + 0, 88, 88, 0, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 0, 0, 0, 0, 0, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 0, + 0, 0, 0, 0, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 0, 0, 88, 88, 88, + 88, 0, 0, 88, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 0, 0, 88, 88, - 88, 88, 0, 0, 88, 88, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 0, 0, 0, 88, 88, - 88, 88, 88, 88, 88, 89, 89, 89, 89, 0, - 0, 89, 0, 89, 89, 89, 89, 89, 89, 89, - 89, 0, 0, 0, 0, 0, 0, 0, 0, 89, + 88, 88, 88, 88, 0, 0, 0, 88, 88, 88, + 88, 88, 88, 88, 89, 89, 89, 89, 0, 0, 89, 0, 89, 89, 89, 89, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, - 0, 0, 0, 0, 0, 89, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 89, 89, + 0, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 0, + 0, 0, 0, 0, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 0, 0, 0, 0, + 0, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 0, 0, 89, 89, 89, 89, 90, 0, + 89, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 89, 89, 89, 89, 89, 89, 89, - 89, 89, 89, 0, 0, 89, 89, 89, 89, 90, - 0, 89, 89, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 89, 89, 89, 89, 89, 89, 89, - 89, 89, 0, 0, 0, 89, 89, 89, 89, 89, - 89, 89, 90, 0, 0, 0, 0, 0, 0, 90, + 89, 0, 0, 0, 89, 89, 89, 89, 89, 89, + 89, 90, 0, 0, 0, 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 90, 0, + 0, 0, 0, 0, 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 90, 0, 0, 90, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, - 0, 0, 0, 0, 90, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, - 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, + 0, 90, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, + 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, + 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, - 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 90, 90, 90, 90, - 0, 0, 90, 0, 90, 90, 90, 90, 90, 90, - 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, - 90, 90, 0, 90, 90, 90, 90, 90, 90, 90, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 90, 90, 90, 90, 0, + 0, 90, 0, 90, 90, 90, 90, 90, 90, 90, + 90, 0, 0, 0, 0, 0, 0, 0, 0, 90, + 90, 0, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, - 90, 0, 0, 0, 0, 0, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, 0, 0, + 0, 0, 0, 0, 0, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 0, 0, 0, + 0, 0, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 0, 0, 90, 90, 90, 90, 0, + 0, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 0, 0, 90, 90, 90, 90, - 0, 0, 90, 90, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 0, 0, 0, 90, 90, 90, 90, - 90, 90, 90, 100, 100, 100, 100, 0, 0, 100, - 0, 100, 100, 100, 100, 100, 100, 100, 100, 0, - 0, 0, 0, 0, 0, 0, 0, 100, 100, 0, - 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 90, 90, 0, 0, 0, 90, 90, 90, 90, 90, + 90, 90, 100, 100, 100, 100, 0, 0, 100, 0, 100, 100, 100, 100, 100, 100, 100, 100, 0, 0, - 0, 0, 0, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 100, 100, 0, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, - 100, 0, 0, 100, 100, 100, 100, 101, 0, 100, - 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 100, 100, 100, 100, 100, 100, 100, 100, 100, - 0, 0, 0, 100, 100, 100, 100, 100, 100, 100, - 101, 0, 0, 0, 0, 0, 0, 101, 0, 0, + 100, 100, 100, 100, 100, 100, 100, 0, 0, 0, + 0, 0, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 0, 0, 0, 0, 0, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 0, 0, 100, 100, 100, 100, 101, 0, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 0, + 0, 0, 100, 100, 100, 100, 100, 100, 100, 101, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 101, 0, 0, 101, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 102, 0, 0, - 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, + 0, 0, 0, 102, 0, 0, 0, 0, 0, 0, + 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 102, 0, 0, - 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, + 0, 0, 0, 0, 0, 0, 102, 0, 0, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 101, 101, 101, 101, 0, 0, - 101, 0, 101, 101, 101, 101, 101, 101, 101, 101, - 0, 0, 0, 0, 0, 0, 0, 0, 101, 101, - 0, 101, 101, 101, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 101, 101, 101, 101, 101, 101, 0, - 0, 0, 0, 0, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 101, 101, 101, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 102, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 101, 101, 101, 101, 0, 0, 101, + 0, 101, 101, 101, 101, 101, 101, 101, 101, 0, + 0, 0, 0, 0, 0, 0, 0, 101, 101, 0, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 0, 0, + 0, 0, 0, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 0, 0, 0, 0, 0, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 0, 0, 101, 101, 101, 101, 0, 0, 101, + 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101, 101, 101, 101, 101, 101, 101, 101, 101, - 101, 101, 0, 0, 101, 101, 101, 101, 0, 0, - 101, 101, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 101, 101, 101, 101, 101, 101, 101, 101, - 101, 0, 0, 0, 101, 101, 101, 101, 101, 101, - 101, 102, 102, 102, 102, 0, 0, 102, 0, 102, - 102, 102, 102, 102, 102, 102, 102, 0, 0, 0, - 0, 0, 0, 0, 0, 102, 102, 0, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, + 0, 0, 0, 101, 101, 101, 101, 101, 101, 101, + 102, 102, 102, 102, 0, 0, 102, 0, 102, 102, 102, 102, 102, 102, 102, 102, 0, 0, 0, 0, - 0, 102, 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 0, 0, 0, 0, 0, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, 102, 0, - 0, 102, 102, 102, 102, 104, 0, 102, 102, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, + 0, 0, 0, 0, 102, 102, 0, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 0, 0, 0, 0, 0, + 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 0, 0, 0, 0, 0, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 0, 0, - 0, 102, 102, 102, 102, 102, 102, 102, 104, 0, - 0, 0, 0, 0, 0, 104, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 102, 102, 102, 102, 104, 0, 102, 102, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 0, 0, 0, + 102, 102, 102, 102, 102, 102, 102, 104, 0, 0, 0, 0, 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 104, 0, - 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 104, 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 109, 0, 0, 0, 0, - 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, + 0, 109, 0, 0, 0, 0, 0, 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 109, 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 104, 104, 104, 104, 0, 0, 104, 0, - 104, 104, 104, 104, 104, 104, 104, 104, 0, 0, - 0, 0, 0, 0, 0, 0, 104, 104, 0, 104, - 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, + 0, 0, 0, 0, 0, 0, 109, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 104, 104, 104, 104, 0, 0, 104, 0, 104, 104, 104, 104, 104, 104, 104, 104, 0, 0, 0, - 0, 0, 104, 104, 104, 104, 104, 104, 104, 104, - 104, 104, 104, 104, 0, 0, 0, 0, 0, 104, + 0, 0, 0, 0, 0, 104, 104, 0, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, - 0, 0, 104, 104, 104, 104, 0, 0, 104, 104, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 104, 104, 104, 104, 104, 104, 0, 0, 0, 0, + 0, 104, 104, 104, 104, 104, 104, 104, 104, 104, + 104, 104, 104, 0, 0, 0, 0, 0, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 0, - 0, 0, 104, 104, 104, 104, 104, 104, 104, 109, - 109, 109, 109, 0, 0, 109, 0, 109, 109, 109, - 109, 109, 109, 109, 109, 0, 0, 0, 0, 0, - 0, 0, 0, 109, 109, 0, 109, 109, 109, 109, + 0, 104, 104, 104, 104, 0, 0, 104, 104, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 104, + 104, 104, 104, 104, 104, 104, 104, 104, 0, 0, + 0, 104, 104, 104, 104, 104, 104, 104, 109, 109, + 109, 109, 0, 0, 109, 0, 109, 109, 109, 109, + 109, 109, 109, 109, 0, 0, 0, 0, 0, 0, + 0, 0, 109, 109, 0, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 0, 0, 0, 0, 0, 109, + 109, 109, 109, 0, 0, 0, 0, 0, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, - 109, 0, 0, 0, 0, 0, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 0, 0, 109, - 109, 109, 109, 111, 0, 109, 109, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 0, 0, 0, 109, - 109, 109, 109, 109, 109, 109, 111, 0, 0, 0, - 0, 0, 0, 111, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 0, 0, 109, 109, + 109, 109, 111, 0, 109, 109, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 0, 0, 0, 109, 109, + 109, 109, 109, 109, 109, 111, 0, 0, 0, 0, 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 111, 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 111, 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 118, 0, 0, 0, 0, 0, 0, 0, 111, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, + 0, 0, 0, 0, 0, 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 118, 0, 0, 0, 0, 0, 0, - 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, + 0, 0, 118, 0, 0, 0, 0, 0, 0, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 118, 0, 0, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 118, 0, 0, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 111, 111, 111, 111, 0, 0, 111, 0, 111, 111, - 111, 111, 111, 111, 111, 111, 0, 0, 0, 0, - 0, 0, 0, 0, 111, 111, 0, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, + 0, 0, 0, 0, 118, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, + 111, 111, 111, 0, 0, 111, 0, 111, 111, 111, 111, 111, 111, 111, 111, 0, 0, 0, 0, 0, + 0, 0, 0, 111, 111, 0, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 0, 0, 0, 0, 0, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 0, 0, - 111, 111, 111, 111, 0, 0, 111, 111, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 0, 0, 0, - 111, 111, 111, 111, 111, 111, 111, 118, 118, 118, - 118, 0, 0, 118, 0, 118, 118, 118, 118, 118, - 118, 118, 118, 0, 0, 0, 0, 0, 0, 0, - 0, 118, 118, 0, 118, 118, 118, 118, 118, 118, + 111, 111, 111, 111, 0, 0, 0, 0, 0, 111, + 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, + 111, 0, 0, 0, 0, 0, 111, 111, 111, 111, + 111, 111, 111, 111, 111, 111, 111, 0, 0, 111, + 111, 111, 111, 0, 0, 111, 111, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 111, 111, 111, + 111, 111, 111, 111, 111, 111, 0, 0, 0, 111, + 111, 111, 111, 111, 111, 111, 118, 118, 118, 118, + 0, 0, 118, 0, 118, 118, 118, 118, 118, 118, + 118, 118, 0, 0, 0, 0, 0, 0, 0, 0, + 118, 118, 0, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, - 118, 118, 0, 0, 0, 0, 0, 118, 118, 118, - 118, 118, 118, 118, 118, 118, 118, 118, 118, 0, + 118, 0, 0, 0, 0, 0, 118, 118, 118, 118, + 118, 118, 118, 118, 118, 118, 118, 118, 0, 0, + 0, 0, 0, 118, 118, 118, 118, 118, 118, 118, + 118, 118, 118, 118, 0, 0, 118, 118, 118, 118, + 131, 0, 118, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 118, 118, 118, 118, 118, - 118, 118, 118, 118, 118, 0, 0, 118, 118, 118, - 118, 131, 0, 118, 118, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 118, 118, 118, 118, 118, - 118, 118, 118, 118, 0, 0, 0, 118, 118, 118, - 118, 118, 118, 118, 131, 0, 0, 0, 0, 0, - 0, 131, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 118, 118, 118, 0, 0, 0, 118, 118, 118, 118, + 118, 118, 118, 131, 0, 0, 0, 0, 0, 0, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 131, 0, 0, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, - 0, 0, 0, 0, 0, 0, 131, 0, 0, 0, + 0, 0, 0, 131, 0, 0, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 113, 0, 0, + 0, 0, 0, 0, 0, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 113, 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 113, 0, 0, + 113, 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 113, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 113, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 131, 131, - 131, 131, 0, 0, 131, 0, 131, 131, 131, 131, - 131, 131, 131, 131, 0, 0, 0, 0, 0, 0, - 0, 0, 131, 131, 0, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 0, 0, 0, 0, 0, 131, 131, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 131, 131, 131, + 131, 0, 0, 131, 0, 131, 131, 131, 131, 131, + 131, 131, 131, 0, 0, 0, 0, 0, 0, 0, + 0, 131, 131, 0, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 0, 0, 0, 0, 0, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, 131, 0, + 0, 0, 0, 0, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 0, 0, 131, 131, 131, + 131, 0, 0, 131, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 0, 0, 131, 131, - 131, 131, 0, 0, 131, 131, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 0, 0, 0, 131, 131, - 131, 131, 131, 131, 131, 113, 113, 113, 113, 0, - 0, 113, 0, 113, 113, 113, 113, 113, 113, 113, - 113, 0, 0, 0, 0, 0, 0, 0, 0, 113, + 131, 131, 131, 131, 0, 0, 0, 131, 131, 131, + 131, 131, 131, 131, 113, 113, 113, 113, 0, 0, 113, 0, 113, 113, 113, 113, 113, 113, 113, 113, - 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, - 0, 0, 0, 0, 0, 113, 113, 113, 113, 113, - 113, 113, 113, 113, 113, 113, 113, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 113, 113, + 0, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 0, + 0, 0, 0, 0, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 0, 0, 0, 0, + 0, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 0, 0, 113, 113, 113, 113, 179, 0, + 113, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 113, 113, 113, 113, 113, 113, 113, - 113, 113, 113, 0, 0, 113, 113, 113, 113, 174, - 0, 113, 113, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 113, 113, 113, 113, 113, 113, 113, - 113, 113, 0, 0, 0, 113, 113, 113, 113, 113, - 113, 113, 174, 0, 0, 0, 0, 0, 0, 174, - 0, 0, 0, 174, 174, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 174, 0, + 113, 0, 0, 0, 113, 113, 113, 113, 113, 113, + 113, 179, 0, 0, 0, 0, 0, 0, 179, 0, + 0, 0, 179, 179, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 174, 0, 0, 0, 0, 0, 0, 0, + 0, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 149, 0, 0, 0, - 0, 0, 0, 0, 174, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 154, 0, 0, 0, 0, + 0, 0, 0, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 149, - 0, 0, 0, 0, 0, 0, 149, 149, 0, 149, - 149, 149, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 149, 0, 0, 149, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 154, 0, + 0, 0, 0, 0, 0, 154, 154, 0, 154, 154, + 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 154, 0, 0, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 149, - 0, 0, 149, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 154, 0, + 0, 154, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 179, 179, 179, 0, + 0, 0, 0, 179, 179, 179, 0, 179, 179, 179, + 179, 0, 0, 0, 0, 0, 0, 0, 0, 179, + 179, 0, 179, 179, 179, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, + 0, 0, 0, 0, 0, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 0, 0, 0, + 0, 0, 179, 179, 179, 179, 179, 179, 179, 179, + 179, 179, 179, 0, 0, 179, 179, 179, 179, 0, + 0, 179, 179, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 179, 179, 179, 179, 179, 179, 179, + 179, 179, 0, 0, 0, 179, 179, 179, 179, 179, + 179, 179, 154, 154, 154, 154, 0, 0, 154, 0, + 154, 154, 154, 154, 154, 154, 154, 154, 0, 0, + 0, 0, 0, 0, 0, 0, 154, 154, 0, 154, + 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, + 154, 154, 154, 154, 154, 154, 154, 159, 0, 0, + 0, 154, 154, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 154, 154, 154, 154, 154, 154, + 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, + 159, 0, 0, 0, 0, 0, 0, 159, 154, 154, + 159, 0, 159, 159, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 159, 0, 0, 0, + 0, 0, 154, 154, 154, 154, 154, 154, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 149, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 174, 174, 174, - 0, 0, 0, 0, 174, 174, 174, 0, 174, 174, - 174, 174, 0, 0, 0, 0, 0, 0, 0, 0, - 174, 174, 0, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 0, 0, 0, 0, 0, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 0, 0, - 0, 0, 0, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 0, 0, 174, 174, 174, 174, - 0, 0, 174, 174, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 0, 0, 0, 174, 174, 174, 174, - 174, 174, 174, 149, 149, 149, 149, 0, 0, 149, - 0, 149, 149, 149, 149, 149, 149, 149, 149, 0, - 0, 0, 0, 0, 0, 0, 0, 149, 149, 0, - 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 149, 149, 154, 0, - 0, 0, 149, 149, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 149, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, - 149, 154, 0, 0, 0, 0, 0, 0, 154, 149, - 149, 154, 0, 154, 154, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 154, 0, 0, - 0, 0, 0, 149, 149, 149, 149, 149, 149, 149, + 159, 180, 0, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 154, 175, 0, 154, 0, 0, 0, 0, 0, + 0, 0, 159, 0, 180, 0, 0, 0, 0, 0, + 0, 180, 180, 0, 0, 180, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 154, 0, 175, 0, 0, 0, 0, - 0, 0, 175, 175, 0, 0, 175, 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 175, 0, 0, 0, 0, 0, 0, 0, 0, + 247, 0, 0, 0, 180, 0, 0, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 242, 0, 0, 0, 175, 0, 0, 175, 0, + 0, 0, 0, 247, 0, 0, 180, 0, 0, 0, + 247, 247, 0, 0, 247, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, + 247, 0, 247, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 159, 159, 159, 159, 0, 0, + 159, 0, 159, 159, 159, 159, 159, 159, 159, 159, + 0, 0, 0, 247, 0, 0, 247, 0, 159, 159, + 0, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 0, + 0, 0, 0, 43, 159, 247, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 0, 0, 0, 0, 43, 0, 0, 0, + 159, 159, 0, 43, 0, 0, 0, 0, 180, 180, + 180, 180, 0, 0, 180, 0, 180, 180, 180, 180, + 180, 180, 43, 0, 159, 159, 159, 159, 159, 159, + 159, 0, 180, 180, 0, 180, 180, 180, 180, 180, + 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, + 180, 180, 180, 0, 0, 0, 43, 0, 180, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 180, 180, 180, 180, 180, + 180, 180, 180, 180, 180, 180, 0, 0, 43, 0, + 0, 0, 0, 0, 180, 180, 0, 247, 247, 247, + 247, 0, 0, 247, 0, 0, 0, 0, 247, 0, + 0, 247, 247, 0, 0, 0, 98, 0, 180, 180, + 180, 180, 180, 180, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 242, 0, 0, 175, 0, 0, - 0, 242, 242, 0, 0, 242, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, + 247, 247, 247, 247, 247, 247, 247, 247, 247, 0, + 0, 0, 0, 0, 247, 247, 247, 247, 247, 247, + 247, 247, 247, 247, 247, 98, 0, 247, 247, 247, + 247, 0, 0, 0, 0, 0, 0, 0, 0, 247, + 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, + 247, 247, 247, 247, 0, 0, 0, 0, 0, 98, + 0, 0, 0, 247, 0, 0, 0, 0, 0, 0, + 43, 43, 43, 43, 0, 0, 43, 0, 0, 0, + 0, 43, 0, 0, 43, 43, 0, 0, 0, 0, + 0, 98, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 0, 0, 0, 0, 0, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 45, 0, + 43, 43, 43, 43, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 0, 0, 0, + 0, 45, 0, 0, 0, 0, 43, 0, 45, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 98, 0, 0, 0, + 0, 98, 98, 98, 0, 98, 98, 98, 98, 0, + 0, 45, 0, 0, 45, 0, 0, 98, 98, 0, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 201, 96, + 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, + 98, 0, 0, 0, 0, 0, 255, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 96, 0, + 0, 0, 0, 98, 98, 98, 98, 98, 98, 98, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 255, 0, 0, 0, 255, 255, 255, + 255, 255, 96, 255, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 0, 255, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 92, 0, 0, 0, 96, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 45, 45, 45, 45, 255, + 0, 45, 0, 0, 0, 0, 45, 0, 0, 45, + 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 92, + 0, 0, 0, 0, 94, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 0, 0, 0, + 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 92, 0, 45, 45, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 242, 242, 0, 242, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 154, 154, 154, 154, 0, - 0, 154, 0, 154, 154, 154, 154, 154, 154, 154, - 154, 0, 0, 0, 242, 0, 0, 242, 0, 154, - 154, 0, 154, 154, 154, 154, 154, 154, 154, 154, - 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, - 0, 0, 0, 0, 43, 154, 242, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 154, 154, 154, - 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, - 154, 154, 154, 0, 0, 0, 0, 43, 0, 0, - 0, 154, 154, 0, 43, 0, 0, 0, 0, 175, - 175, 175, 175, 0, 0, 175, 0, 175, 175, 175, - 175, 175, 175, 43, 0, 154, 154, 154, 154, 154, - 154, 154, 0, 175, 175, 0, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 0, 0, 0, 43, 0, 175, - 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 0, 0, 43, - 0, 0, 0, 0, 0, 175, 175, 0, 242, 242, - 242, 242, 0, 0, 242, 0, 0, 0, 0, 242, - 0, 0, 242, 242, 0, 0, 0, 98, 0, 175, - 175, 175, 175, 175, 175, 175, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, - 0, 0, 0, 0, 0, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 98, 0, 242, 242, - 242, 242, 0, 0, 0, 0, 0, 0, 0, 0, - 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 0, 0, 0, 0, 0, - 98, 0, 0, 0, 242, 0, 0, 0, 0, 0, - 0, 43, 43, 43, 43, 0, 0, 43, 0, 0, - 0, 0, 43, 0, 0, 43, 43, 0, 0, 0, - 0, 0, 98, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 0, 0, 0, 0, 0, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 45, - 0, 43, 43, 43, 43, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 0, 0, - 0, 0, 45, 0, 0, 0, 0, 43, 0, 45, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 98, 0, 0, - 0, 0, 98, 98, 98, 0, 98, 98, 98, 98, - 0, 0, 45, 0, 0, 45, 0, 0, 98, 98, - 0, 98, 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, 98, 196, - 96, 0, 0, 0, 45, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 98, 98, 0, 0, 0, 0, 0, 250, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, - 0, 0, 0, 0, 98, 98, 98, 98, 98, 98, - 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 250, 0, 0, 0, 250, 250, - 250, 250, 250, 96, 250, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 250, 250, 0, 250, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 92, 0, 0, 0, 96, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 45, 45, 45, 45, - 250, 0, 45, 0, 0, 0, 0, 45, 0, 0, - 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 250, 0, 0, 0, 0, 0, 0, 0, - 92, 0, 0, 0, 0, 94, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 0, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 92, 0, 45, 45, 45, 45, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 0, 94, 0, 92, 0, 0, 108, - 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, - 96, 0, 0, 0, 0, 96, 96, 96, 0, 96, - 96, 96, 96, 0, 0, 0, 0, 0, 94, 0, - 0, 96, 96, 0, 96, 96, 96, 96, 96, 96, + 45, 45, 0, 94, 0, 92, 0, 0, 108, 0, + 0, 45, 0, 0, 0, 0, 0, 0, 0, 96, + 0, 0, 0, 0, 96, 96, 96, 0, 96, 96, + 96, 96, 0, 0, 0, 0, 0, 94, 0, 0, + 96, 96, 0, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 197, 0, 0, 0, 0, 0, 108, 0, - 94, 250, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 250, 0, - 0, 0, 108, 96, 96, 0, 0, 0, 0, 250, - 0, 0, 250, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 96, 96, 96, - 96, 96, 96, 96, 108, 110, 0, 0, 0, 0, - 0, 92, 0, 0, 0, 0, 92, 92, 92, 0, - 92, 92, 92, 92, 0, 0, 250, 250, 250, 250, - 250, 250, 92, 92, 0, 92, 92, 92, 92, 92, + 96, 202, 0, 0, 0, 0, 0, 108, 0, 94, + 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, + 0, 108, 96, 96, 0, 0, 0, 0, 255, 0, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 96, 96, 96, 96, + 96, 96, 96, 108, 110, 0, 0, 0, 0, 0, + 92, 0, 0, 0, 0, 92, 92, 92, 0, 92, + 92, 92, 92, 0, 0, 255, 255, 255, 255, 255, + 255, 92, 92, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 110, 0, 0, 0, 0, 117, - 0, 0, 0, 0, 0, 94, 0, 0, 0, 0, - 94, 94, 94, 0, 94, 94, 94, 94, 0, 0, - 0, 0, 0, 0, 92, 92, 94, 94, 110, 94, + 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 110, 0, 0, 0, 0, 117, 0, + 0, 0, 0, 0, 94, 0, 0, 0, 0, 94, + 94, 94, 0, 94, 94, 94, 94, 0, 0, 0, + 0, 0, 0, 92, 92, 94, 94, 110, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, - 94, 94, 94, 94, 94, 94, 94, 0, 92, 92, - 92, 92, 92, 92, 92, 0, 0, 0, 117, 0, - 110, 0, 0, 112, 0, 0, 0, 0, 0, 108, - 0, 0, 0, 0, 108, 108, 108, 0, 108, 108, - 108, 108, 0, 0, 0, 0, 0, 0, 94, 94, - 108, 108, 117, 108, 108, 108, 108, 108, 108, 108, + 94, 94, 94, 94, 94, 94, 0, 92, 92, 92, + 92, 92, 92, 92, 0, 0, 0, 117, 0, 110, + 0, 0, 112, 0, 0, 0, 0, 0, 108, 0, + 0, 0, 0, 108, 108, 108, 0, 108, 108, 108, + 108, 0, 0, 0, 0, 0, 0, 94, 94, 108, + 108, 117, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 0, 94, 94, 94, 94, 94, 94, 94, 0, - 0, 0, 112, 0, 117, 0, 0, 0, 0, 0, + 0, 94, 94, 94, 94, 94, 94, 94, 0, 0, + 0, 112, 0, 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 108, 108, 0, 0, 112, 0, 0, 0, + 0, 108, 108, 0, 0, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 108, 108, 108, 108, - 108, 108, 108, 0, 0, 0, 0, 0, 112, 0, - 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, - 110, 110, 110, 0, 110, 110, 110, 110, 0, 0, - 0, 0, 0, 0, 0, 0, 110, 110, 0, 110, + 0, 0, 0, 0, 0, 108, 108, 108, 108, 108, + 108, 108, 0, 0, 0, 0, 0, 112, 0, 0, + 0, 0, 0, 0, 110, 0, 0, 0, 0, 110, + 110, 110, 0, 110, 110, 110, 110, 0, 0, 0, + 0, 0, 0, 0, 0, 110, 110, 0, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 0, 0, 0, + 110, 110, 110, 110, 110, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, - 0, 0, 0, 0, 117, 117, 117, 0, 117, 117, - 117, 117, 0, 0, 0, 0, 0, 0, 110, 110, - 117, 117, 0, 117, 117, 117, 117, 117, 117, 117, + 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, + 0, 0, 0, 117, 117, 117, 0, 117, 117, 117, + 117, 0, 0, 0, 0, 0, 0, 110, 110, 117, + 117, 0, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 0, 110, 110, 110, 110, 110, 110, 110, 0, + 0, 110, 110, 110, 110, 110, 110, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 112, 0, 0, 0, 0, 112, 112, - 112, 0, 112, 112, 112, 112, 0, 0, 0, 0, - 0, 0, 117, 117, 112, 112, 83, 112, 112, 112, + 0, 0, 112, 0, 0, 0, 0, 112, 112, 112, + 0, 112, 112, 112, 112, 0, 0, 0, 0, 0, + 0, 117, 117, 112, 112, 83, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 0, 117, 117, 117, 117, - 117, 117, 117, 0, 0, 0, 0, 0, 0, 83, - 0, 0, 0, 0, 0, 0, 83, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 83, 112, 112, 0, 0, - 0, 0, 0, 0, 0, 0, 154, 0, 0, 0, + 112, 112, 112, 112, 0, 117, 117, 117, 117, 117, + 117, 117, 0, 0, 0, 0, 0, 0, 83, 0, + 0, 0, 0, 0, 0, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 112, 112, 112, 112, 112, 112, 112, 0, 0, 83, - 0, 0, 83, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, - 0, 154, 154, 0, 0, 0, 0, 0, 0, 0, - 0, 83, 0, 0, 0, 154, 0, 0, 0, 0, + 0, 0, 0, 0, 83, 112, 112, 0, 0, 0, + 0, 0, 0, 0, 0, 159, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, + 112, 112, 112, 112, 112, 112, 0, 0, 83, 0, + 0, 83, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 159, 0, + 159, 159, 0, 0, 0, 0, 0, 0, 0, 0, + 83, 0, 0, 0, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, + 0, 0, 0, 0, 0, 0, 0, 0, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 154, 0, 0, 0, 0, 0, 0, 0, 0, + 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 95, 0, 0, 0, 0, 0, 0, 92, 0, - 0, 0, 0, 94, 0, 0, 0, 0, 0, 0, + 95, 0, 0, 0, 0, 0, 0, 92, 0, 0, + 0, 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 83, 83, 83, 0, 0, 0, 83, - 0, 83, 83, 83, 83, 83, 83, 83, 83, 32, - 0, 0, 0, 0, 93, 0, 0, 83, 83, 0, + 0, 0, 83, 83, 83, 0, 0, 0, 83, 0, + 83, 83, 83, 83, 83, 83, 83, 83, 32, 0, + 0, 0, 0, 93, 0, 0, 83, 83, 0, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 0, 0, - 0, 33, 0, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 0, 0, 0, 0, 0, + 83, 83, 83, 83, 83, 83, 83, 0, 0, 0, + 33, 0, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 0, 0, 0, 0, 0, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 0, 0, 83, 83, 83, 83, 154, 154, 83, - 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 0, 0, 0, 83, 83, 83, 83, 83, 83, 0, - 0, 0, 0, 0, 154, 154, 154, 154, 154, 154, - 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, + 0, 0, 83, 83, 83, 83, 159, 159, 83, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 154, 154, 154, 154, 6, 0, 0, - 0, 0, 0, 0, 6, 0, 0, 0, 0, 6, - 0, 154, 154, 154, 154, 154, 154, 154, 154, 154, - 0, 0, 0, 0, 0, 294, 295, 51, 8, 9, - 0, 52, 0, 0, 0, 0, 53, 10, 11, 296, - 297, 14, 15, 16, 17, 18, 19, 20, 21, 0, - 0, 22, 0, 0, 0, 6, 0, 0, 0, 0, - 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 6, 0, 0, - 0, 0, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 23, 0, 79, 80, 81, 82, 24, - 25, 0, 0, 26, 0, 27, 0, 0, 0, 0, - 0, 0, 0, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 28, 95, 29, 0, 0, 0, 0, 0, - 110, 30, 31, 0, 0, 94, 0, 0, 0, 0, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 0, + 0, 0, 83, 83, 83, 83, 83, 83, 0, 0, + 0, 0, 0, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 159, 159, 159, 159, 6, 0, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 0, 6, 0, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 0, + 0, 0, 0, 0, 295, 296, 51, 8, 9, 0, + 52, 0, 0, 0, 0, 53, 10, 11, 297, 298, + 14, 15, 16, 17, 18, 19, 20, 21, 0, 0, + 22, 0, 0, 0, 6, 0, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 6, 0, 0, 0, + 0, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 23, 0, 79, 80, 81, 82, 24, 25, + 0, 0, 26, 0, 27, 0, 0, 0, 0, 0, + 0, 0, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 28, 95, 29, 0, 0, 0, 0, 0, 110, + 30, 31, 0, 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 6, 6, 6, 6, 0, 6, 0, 0, - 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 0, 0, 6, 0, 0, - 111, 0, 0, 0, 0, 0, 0, 110, 314, 0, - 0, 0, 94, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 6, 6, 6, 6, 0, 6, 0, 0, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 0, 0, 0, 0, 0, 6, 6, + 6, 6, 6, 6, 0, 0, 6, 0, 0, 111, + 0, 0, 0, 0, 0, 0, 110, 315, 0, 0, + 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 0, 6, 6, 6, 6, 6, 6, 0, 0, 6, - 0, 6, 0, 93, 0, 0, 0, 0, 0, 6, + 6, 6, 0, 0, 0, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, - 6, 0, 0, 0, 0, 0, 0, 6, 6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 49, 50, 51, - 8, 0, 0, 52, 0, 126, 127, 128, 53, 129, - 130, 131, 132, 0, 0, 0, 0, 0, 0, 0, - 0, 133, 134, 0, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 0, 0, 0, 0, 0, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 0, - 0, 0, 0, 0, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 111, 0, 79, 80, 81, - 82, 0, 92, 153, 154, 0, 0, 94, 275, 0, - 0, 0, 0, 0, 0, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 0, 0, 0, 155, 156, 157, - 158, 159, 160, 30, 49, 50, 51, 8, 0, 0, - 52, 0, 0, 0, 0, 53, 0, 0, 54, 55, - 0, 0, 0, 0, 0, 0, 0, 0, 93, 0, + 6, 6, 6, 6, 6, 6, 0, 0, 6, 0, + 6, 0, 93, 0, 0, 0, 0, 0, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 0, 6, + 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 49, 50, 51, 8, + 0, 0, 52, 0, 126, 127, 128, 53, 129, 130, + 131, 132, 0, 0, 0, 0, 0, 0, 0, 0, + 133, 134, 0, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 0, 0, 0, 0, 0, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 0, 0, + 0, 0, 0, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 111, 0, 79, 80, 81, 82, + 0, 92, 153, 154, 0, 0, 94, 276, 0, 0, + 0, 0, 0, 0, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 0, 0, 0, 155, 156, 157, 158, + 159, 160, 30, 49, 50, 51, 8, 0, 0, 52, + 0, 0, 0, 0, 53, 0, 0, 54, 55, 0, + 0, 0, 0, 0, 0, 0, 0, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 0, 0, 0, 0, - 0, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 95, 0, 79, 80, 81, 82, 0, 92, - 0, 0, 0, 0, 94, 0, 0, 0, 0, 0, - 0, 0, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 0, 0, 0, 0, 0, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 95, 0, 79, 80, 81, 82, 0, 92, 0, + 0, 0, 0, 94, 0, 0, 0, 0, 0, 0, + 0, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, - 50, 51, 8, 0, 0, 52, 0, 0, 0, 0, - 53, 0, 0, 54, 55, 111, 0, 0, 0, 0, - 0, 0, 110, 0, 0, 0, 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 0, 0, 0, 0, 0, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 0, 93, 79, - 80, 81, 82, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 30, 49, 50, 51, 8, - 0, 0, 52, 0, 0, 0, 0, 53, 0, 0, - 54, 55, 111, 0, 0, 0, 0, 0, 0, 92, - 0, 0, 0, 0, 94, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 49, 50, + 51, 8, 0, 0, 52, 0, 0, 0, 0, 53, + 0, 0, 54, 55, 111, 0, 0, 0, 0, 0, + 0, 110, 0, 0, 0, 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 0, 0, - 0, 0, 0, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 0, 93, 79, 80, 81, 82, + 0, 0, 0, 0, 0, 0, 0, 0, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 0, 0, 0, 0, 0, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 0, 93, 79, 80, + 81, 82, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 30, 49, 50, 51, 8, 0, + 0, 52, 0, 0, 0, 0, 53, 0, 0, 54, + 55, 111, 0, 0, 0, 0, 0, 0, 92, 0, + 0, 0, 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 30, 0, 0, 0, 0, 0, 0, 49, - 50, 51, 8, 0, 0, 52, 0, 0, 0, 0, - 53, 0, 0, 54, 55, 111, 0, 0, 0, 0, - 0, 0, 282, 0, 0, 0, 0, 94, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 0, 0, 0, 0, 0, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 0, 93, 79, - 80, 81, 82, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 30, 49, 50, 51, 8, - 0, 0, 52, 0, 0, 0, 0, 53, 0, 0, - 54, 55, 95, 0, 0, 0, 0, 0, 0, 276, - 0, 0, 0, 0, 94, 275, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 0, 0, - 0, 0, 0, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 0, 93, 79, 80, 81, 82, + 0, 0, 0, 0, 0, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 0, 0, 0, + 0, 0, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 0, 93, 79, 80, 81, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 30, 0, 0, 0, 0, 0, 0, 49, - 50, 51, 8, 0, 0, 52, 0, 0, 0, 0, - 53, 0, 0, 54, 55, 95, 0, 0, 0, 0, - 0, 0, 110, 0, 424, 0, 0, 94, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 0, 0, 0, 0, 0, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 0, 93, 79, - 80, 81, 82, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 30, 272, 50, 51, 0, - 0, 0, 273, 0, 0, 0, 0, 274, 0, 0, - 54, 55, 95, 0, 0, 0, 0, 0, 0, 110, - 0, 0, 0, 0, 94, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 0, 0, - 0, 0, 0, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 0, 93, 79, 80, 81, 82, + 0, 0, 0, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 30, 0, 0, 0, 0, 0, 0, 49, 50, + 51, 8, 0, 0, 52, 0, 0, 0, 0, 53, + 0, 0, 54, 55, 111, 0, 0, 0, 0, 0, + 0, 283, 0, 0, 0, 0, 94, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 0, 0, 0, 0, 0, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 0, 93, 79, 80, + 81, 82, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 30, 49, 50, 51, 8, 0, + 0, 52, 0, 0, 0, 0, 53, 0, 0, 54, + 55, 95, 0, 0, 0, 0, 0, 0, 277, 0, + 0, 0, 0, 94, 276, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, - 50, 51, 0, 0, 0, 52, 0, 0, 0, 0, - 53, 0, 0, 54, 55, 95, 0, 0, 0, 0, - 0, 0, 92, 0, 0, 0, 0, 94, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 0, 0, 0, 0, 0, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 0, 93, 79, - 80, 81, 82, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 49, 50, 51, 0, - 0, 0, 52, 0, 0, 0, 0, 53, 0, 0, - 54, 55, 95, 0, 0, 0, 0, 0, 0, 282, - 0, 0, 0, 0, 94, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 0, 0, - 0, 0, 0, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 0, 93, 79, 80, 81, 82, + 0, 0, 0, 0, 0, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 0, 0, 0, + 0, 0, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 0, 93, 79, 80, 81, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, - 50, 51, 0, 0, 0, 52, 0, 0, 0, 0, - 53, 0, 0, 54, 55, 95, 0, 0, 0, 0, - 0, 0, 110, 0, 0, 0, 0, 94, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 0, 0, 0, 0, 0, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 0, 93, 79, - 80, 81, 82, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 49, 50, 51, 0, - 0, 0, 52, 0, 0, 0, 0, 53, 0, 0, - 54, 55, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 0, 0, - 32, 0, 0, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 0, 0, 79, 80, 81, 82, + 0, 0, 0, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 30, 0, 0, 0, 0, 0, 0, 49, 50, + 51, 8, 0, 0, 52, 0, 0, 0, 0, 53, + 0, 0, 54, 55, 95, 0, 0, 0, 0, 0, + 0, 110, 0, 442, 0, 0, 94, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 0, 0, 0, 0, 0, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 0, 93, 79, 80, + 81, 82, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 30, 273, 50, 51, 0, 0, + 0, 274, 0, 0, 0, 0, 275, 0, 0, 54, + 55, 95, 0, 0, 0, 0, 0, 0, 110, 0, + 0, 0, 0, 94, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 0, 0, 0, + 0, 0, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 0, 93, 79, 80, 81, 82, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 49, 50, + 51, 0, 0, 0, 52, 0, 0, 0, 0, 53, + 0, 0, 54, 55, 95, 0, 0, 0, 0, 0, + 0, 92, 0, 0, 0, 0, 94, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 0, 0, 0, 0, 0, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 0, 93, 79, 80, + 81, 82, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 49, 50, 51, 0, 0, + 0, 52, 0, 0, 0, 0, 53, 0, 0, 54, + 55, 95, 0, 0, 0, 0, 0, 0, 283, 0, + 0, 0, 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 33, 0, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, - 50, 51, 0, 0, 0, 52, 0, 0, 0, 0, - 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 0, 0, 0, + 0, 0, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 0, 93, 79, 80, 81, 82, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 49, 50, + 51, 0, 0, 0, 52, 0, 0, 0, 0, 53, + 0, 0, 54, 55, 95, 0, 0, 0, 0, 0, + 0, 110, 0, 0, 0, 0, 94, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 0, 0, 0, 0, 0, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 0, 93, 79, 80, + 81, 82, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 49, 50, 51, 0, 0, + 0, 52, 0, 0, 0, 0, 53, 0, 0, 54, + 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 0, 0, 32, + 0, 0, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 0, 0, 79, 80, 81, 82, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 33, 0, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 49, 50, + 51, 0, 0, 0, 52, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 0, 0, 0, 0, 0, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 0, 0, 79, - 80, 81, 82, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 6, 7, 0, 8, - 9, 0, 0, 0, 0, 0, 0, 0, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 0, 0, 0, 0, 0, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 0, 0, 79, 80, + 81, 82, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 6, 7, 0, 8, 9, + 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 0, + 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, - 24, 25, 0, 0, 26, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 28, 0, 29, 0, 0, 0, 0, - 0, 0, 30, 31, + 0, 0, 0, 23, 0, 0, 0, 0, 0, 24, + 25, 0, 0, 26, 0, 27, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 28, 0, 29, 0, 0, 0, 0, 0, + 0, 30, 31, }; short yycheck[] = { 25, - 44, 59, 125, 29, 43, 31, 45, 0, 0, 0, - 37, 37, 260, 111, 260, 42, 43, 37, 45, 107, - 47, 260, 42, 43, 0, 45, 100, 47, 43, 268, - 45, 37, 120, 60, 59, 62, 42, 43, 92, 45, - 0, 47, 165, 4, 105, 36, 41, 62, 43, 58, - 45, 42, 61, 58, 60, 25, 62, 41, 61, 41, - 44, 31, 44, 43, 25, 45, 92, 94, 94, 95, - 31, 271, 272, 96, 94, 258, 37, 96, 43, 44, - 45, 107, 258, 59, 40, 111, 348, 141, 94, 91, - 336, 43, 44, 45, 120, 319, 320, 321, 322, 323, - 93, 93, 61, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 0, 93, 144, 145, - 146, 336, 92, 271, 272, 373, 43, 44, 45, 155, - 156, 91, 125, 125, 0, 37, 262, 107, 272, 165, - 42, 43, 276, 45, 218, 47, 107, 245, 246, 125, - 120, 249, 250, 257, 258, 355, 356, 118, 60, 120, - 62, 349, 350, 123, 125, 40, 0, 137, 138, 139, - 140, 351, 352, 227, 228, 59, 202, 203, 204, 205, + 59, 44, 37, 29, 0, 31, 111, 42, 43, 44, + 45, 37, 47, 92, 37, 59, 125, 260, 100, 42, + 43, 0, 45, 0, 47, 60, 43, 62, 45, 41, + 0, 260, 0, 0, 273, 37, 58, 60, 277, 62, + 42, 43, 37, 45, 96, 47, 260, 42, 43, 43, + 45, 45, 47, 4, 268, 58, 165, 36, 61, 94, + 105, 41, 141, 42, 44, 60, 92, 62, 94, 95, + 107, 94, 41, 41, 25, 44, 44, 271, 272, 61, + 31, 107, 59, 120, 258, 111, 37, 96, 43, 59, + 45, 59, 94, 336, 120, 91, 257, 258, 43, 94, + 45, 0, 258, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 93, 62, 144, 145, + 146, 349, 350, 93, 40, 93, 93, 123, 25, 155, + 156, 370, 371, 348, 31, 0, 61, 219, 0, 165, + 336, 246, 247, 262, 373, 250, 251, 40, 125, 228, + 229, 271, 272, 351, 352, 125, 107, 125, 125, 40, + 59, 355, 356, 121, 122, 404, 40, 118, 407, 120, + 61, 41, 40, 43, 125, 45, 40, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 94, 59, 102, 165, 157, 158, 159, 33, - 40, 227, 228, 277, 165, 40, 40, 355, 356, 93, - 0, 45, 273, 274, 258, 40, 242, 121, 122, 245, - 246, 247, 276, 249, 250, 40, 40, 93, 282, 40, - 364, 365, 140, 40, 257, 0, 40, 40, 257, 209, - 263, 125, 40, 61, 263, 268, 291, 217, 260, 268, - 276, 258, 262, 43, 41, 45, 282, 91, 260, 125, - 394, 41, 96, 397, 264, 94, 268, 306, 303, 59, - 393, 273, 274, 275, 276, 277, 278, 46, 280, 302, - 257, 91, 302, 0, 93, 305, 125, 93, 262, 123, - 251, 252, 41, 319, 59, 256, 0, 257, 258, 257, - 260, 261, 363, 93, 41, 262, 276, 41, 0, 269, - 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, - 280, 44, 349, 283, 351, 352, 353, 354, 93, 33, - 41, 41, 44, 37, 41, 125, 40, 41, 42, 43, - 44, 45, 59, 47, 44, 351, 352, 353, 354, 319, - 41, 43, 41, 45, 304, 59, 60, 262, 62, 349, - 125, 387, 388, 389, 272, 391, 44, 59, 276, 257, - 305, 279, 41, 37, 260, 335, 93, 365, 42, 41, - 41, 341, 342, 47, 41, 345, 262, 347, 0, 93, - 41, 346, 96, 260, 27, 421, 31, 37, 424, 346, - 346, 93, 42, 43, 364, 45, 366, 47, 125, 346, - 43, 165, 399, 373, 374, 36, -1, 387, 388, -1, - 60, 125, 62, 257, 258, 259, 260, 261, -1, 263, - 94, -1, 393, 125, 268, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 280, -1, -1, 283, - 260, 353, 354, -1, 94, -1, 364, 365, -1, -1, - 93, -1, -1, 273, 274, 275, 276, 277, 278, -1, - 280, -1, -1, 307, 308, 309, 310, 311, 312, 313, - 314, 315, 316, 317, 318, -1, 394, -1, -1, 397, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, - 334, 335, -1, 337, 338, 339, 340, 341, 342, -1, - -1, 345, 46, 347, -1, -1, -1, -1, 91, -1, - -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, - 364, -1, 366, -1, 167, -1, -1, -1, -1, 373, - 374, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, -1, 257, 258, 259, 260, -1, -1, 263, + 216, 217, 218, 40, 93, 92, 278, 59, 277, 0, + 40, 40, 228, 229, 283, 257, 157, 158, 159, 260, + 107, 263, 40, 40, 165, 258, 268, 243, 40, 291, + 246, 247, 248, 120, 250, 251, 125, 258, 93, 274, + 275, 93, 33, 262, 41, 355, 356, 260, 41, 40, + 137, 138, 139, 140, 45, 324, 325, 43, 257, 45, + 302, 277, 94, 264, 263, 303, 46, 283, 257, 268, + 125, 257, 258, 125, 260, 261, 62, 302, 165, 93, + 305, 125, 93, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 257, 262, 283, 262, 306, + 91, 41, 318, 319, 403, 96, 264, 323, 324, 325, + 302, 252, 253, 305, 41, 44, 257, 319, 320, 321, + 322, 323, 306, 210, 349, 350, 351, 352, 353, 354, + 0, 218, 123, 291, 369, 0, 349, 350, 351, 352, + 353, 354, 41, 41, 302, 41, 41, 305, 43, 335, + 45, 43, 44, 45, 44, 341, 342, 44, 41, 345, + 373, 347, 41, 41, 349, 0, 351, 352, 353, 354, + 304, 0, 349, 43, 262, 45, 41, 44, 364, 44, + 366, 397, 398, 399, 257, 401, 365, 373, 374, 59, + 277, 349, 350, 305, 59, 43, 44, 45, 33, 415, + 416, 41, 37, 41, 260, 40, 41, 42, 43, 44, + 45, 41, 47, 41, 43, 41, 45, 41, 91, 346, + 41, 437, 262, 93, 59, 60, 442, 62, 93, 91, + 59, 318, 319, 0, 37, 41, 323, 27, 260, 42, + 37, 43, 44, 45, 47, 42, 43, 346, 45, 44, + 47, 346, 346, 43, 165, 125, 409, 31, 93, 36, + 125, 96, 403, 60, 93, 62, 257, 258, 259, 260, + 261, 193, 263, 43, 44, 45, -1, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, + 125, 94, 283, 43, 44, 45, 125, 94, 319, 320, + 321, 322, 323, 93, 43, 44, 45, 43, 44, 45, + 397, 398, 43, 44, 45, -1, 307, 308, 309, 310, + 311, 312, 313, 314, 315, 316, 317, 318, 415, 416, + -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, -1, 337, 338, 339, 340, + 341, 342, 37, -1, 345, -1, 347, 42, 43, -1, + 45, -1, 47, -1, 355, 356, 357, 358, 359, 360, + 361, 362, 363, 364, -1, 366, -1, 167, -1, -1, + 46, -1, 373, 374, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 91, -1, -1, 260, 264, + 273, 274, 275, 276, 277, 278, 268, 280, -1, 94, + -1, 273, 274, 275, 276, 277, 278, -1, 280, -1, + -1, -1, 257, 258, 259, 260, 291, -1, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, + 46, -1, -1, -1, -1, -1, 281, 282, 0, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, -1, -1, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 349, 350, -1, -1, -1, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 0, 0, 337, 338, 339, 340, 0, 59, 343, 344, + 0, 346, -1, -1, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 0, + -1, -1, 367, 368, 369, 370, 371, 372, 373, 33, + -1, 93, -1, 37, -1, -1, 40, 41, 42, 43, + 44, 45, 349, 47, 351, 352, 353, 354, -1, 59, + 59, -1, -1, -1, 260, 59, 60, -1, 62, 59, + -1, -1, -1, 125, -1, -1, -1, 273, 274, 275, + 276, 277, 278, -1, 280, -1, -1, -1, 59, -1, + -1, -1, 382, 93, 93, -1, 386, 387, -1, 93, + -1, -1, 96, 93, -1, 271, 272, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 93, 0, -1, 125, 125, -1, -1, -1, + -1, 125, -1, -1, -1, 125, -1, -1, -1, -1, + -1, -1, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, -1, 125, -1, 33, -1, -1, -1, + 37, -1, -1, 40, 41, 42, 43, 44, 45, -1, + 47, 337, 338, 339, 340, -1, -1, -1, -1, -1, + -1, -1, 59, 60, -1, 62, -1, -1, -1, 355, + 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, + -1, -1, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, -1, -1, -1, 93, -1, -1, 96, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 337, 338, 339, 340, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 125, 355, + 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, + -1, -1, -1, 257, 258, 259, 260, -1, -1, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, @@ -1842,594 +1896,594 @@ short yycheck[] = { 25, -1, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, - 334, -1, 0, 337, 338, 339, 340, 0, -1, 343, + 334, 46, -1, 337, 338, 339, 340, -1, -1, 343, 344, -1, 346, -1, -1, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, - 0, -1, -1, 367, 368, 369, 370, 371, 372, 373, - 33, -1, -1, -1, 37, 0, -1, 40, 41, 42, - 43, 44, 45, -1, 47, -1, -1, -1, -1, -1, - -1, 59, -1, 0, -1, -1, 59, 60, -1, 62, - 273, 274, 275, 276, 277, 278, -1, 280, -1, 349, - 350, 351, 352, 353, 354, -1, 37, -1, -1, 59, - -1, 42, 43, 44, 45, 93, 47, -1, -1, -1, - 93, -1, -1, 96, 59, -1, -1, 271, 272, 60, - -1, 62, -1, 376, -1, -1, -1, 380, 381, -1, - 37, -1, 59, 93, 0, 42, 43, 125, 45, -1, - 47, -1, 125, -1, -1, -1, -1, -1, 93, -1, - -1, -1, -1, 94, 308, 309, 310, 311, 312, 313, - 314, 315, 316, 317, 318, 125, 93, 33, -1, -1, + -1, -1, -1, 367, 368, 369, 370, 371, 372, 373, + 257, 258, 259, 260, -1, -1, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, + -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, -1, -1, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, + 337, 338, 339, 340, 0, -1, 343, 344, -1, 346, + -1, -1, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, + 367, 368, 369, 370, 371, 372, 373, 33, -1, -1, -1, 37, -1, -1, 40, 41, 42, 43, 44, 45, - 125, 47, -1, 337, 338, 339, 340, 94, -1, -1, - -1, -1, -1, 59, 60, -1, 62, -1, 125, -1, - -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, - -1, -1, -1, -1, 37, -1, -1, -1, -1, 42, - 43, -1, 45, -1, 47, -1, -1, 93, -1, -1, - 96, -1, -1, -1, -1, -1, -1, 60, -1, 62, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 125, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 94, -1, -1, 257, 258, 259, 260, -1, -1, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, - -1, -1, 46, -1, -1, -1, -1, -1, 281, 282, - -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, - -1, -1, 305, 306, 307, 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, - -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 333, 334, 46, -1, 337, 338, 339, 340, -1, -1, - 343, 344, -1, 346, -1, -1, 349, 350, 351, 352, - 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, - 363, -1, -1, -1, 367, 368, 369, 370, 371, 372, - 373, 257, 258, 259, 260, -1, -1, 263, 264, 265, - 266, 267, 268, 269, 270, 271, 272, -1, 349, 350, - 351, 352, 353, 354, -1, 281, 282, -1, 284, 285, + -1, 47, 37, -1, -1, -1, -1, 42, 43, -1, + 45, -1, 47, 59, 60, -1, 62, -1, -1, -1, + -1, -1, -1, -1, -1, 60, -1, 62, -1, -1, + 37, -1, -1, -1, -1, 42, 43, -1, 45, -1, + 47, -1, -1, -1, -1, -1, -1, 93, -1, -1, + 96, -1, -1, 60, -1, 62, 271, 272, -1, 94, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 0, -1, -1, -1, -1, -1, -1, -1, 125, + -1, -1, -1, -1, -1, -1, -1, 94, -1, -1, + -1, -1, -1, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 33, -1, -1, -1, 37, -1, + -1, 40, 41, 42, 43, 44, 45, -1, 47, -1, + -1, -1, 337, 338, 339, 340, -1, -1, -1, -1, + 59, 60, -1, 62, -1, -1, -1, -1, -1, -1, + 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, + -1, 37, -1, -1, -1, -1, 42, 43, 44, 45, + -1, 47, -1, -1, 93, -1, -1, 96, -1, -1, + -1, -1, 37, -1, 60, -1, 62, 42, 43, 44, + 45, -1, 47, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 60, 125, 62, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 94, -1, + -1, 257, 258, 259, 260, -1, -1, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, -1, -1, 94, + -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 301, 302, 260, -1, 305, + 296, 297, 298, 299, 300, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, - -1, 337, 338, 339, 340, 0, -1, 343, 344, -1, + -1, 337, 338, 339, 340, -1, -1, 343, 344, -1, 346, -1, -1, 349, 350, 351, 352, 353, 354, 355, - 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, - -1, 367, 368, 369, 370, 371, 372, 373, 33, -1, - -1, -1, 37, -1, -1, 40, 41, 42, 43, 44, - 45, -1, 47, -1, -1, -1, 349, 350, 351, 352, - 353, 354, -1, -1, 59, 60, -1, 62, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 373, -1, -1, -1, 308, 309, 310, 311, 312, 313, - 314, 315, 316, 317, 318, -1, -1, -1, 93, -1, - -1, 96, -1, -1, -1, -1, -1, 271, 272, -1, - -1, -1, -1, 337, 338, 339, 340, -1, -1, -1, - -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, - 125, 355, 356, 357, 358, 359, 360, 361, 362, 363, - -1, -1, -1, -1, 308, 309, 310, 311, 312, 313, - 314, 315, 316, 317, 318, 33, -1, -1, -1, 37, + 356, 357, 358, 359, 360, 361, 362, 363, 353, 354, + -1, 367, 368, 369, 370, 371, 372, 373, 257, 258, + 259, 260, -1, -1, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 351, 352, 353, 354, -1, -1, + -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, -1, -1, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, -1, -1, 337, 338, + 339, 340, 0, -1, 343, 344, 302, 346, -1, 305, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, + 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, + 369, 370, 371, 372, 373, 33, -1, -1, -1, 37, -1, -1, 40, 41, 42, 43, 44, 45, -1, 47, - -1, -1, -1, 337, 338, 339, 340, -1, -1, -1, + -1, -1, -1, 349, 350, 351, 352, 353, 354, -1, -1, 59, 60, -1, 62, -1, -1, -1, -1, -1, - -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, + -1, -1, -1, -1, 349, 350, 351, 352, 353, 354, -1, -1, 37, -1, -1, -1, -1, 42, 43, 44, 45, -1, 47, -1, -1, 93, -1, -1, 96, -1, - -1, -1, -1, 37, -1, 60, -1, 62, 42, 43, - 44, 45, -1, 47, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 60, 125, 62, -1, + -1, -1, 0, -1, -1, 60, -1, 62, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, + -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 94, - -1, -1, 257, 258, 259, 260, -1, -1, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, - 94, -1, -1, -1, -1, -1, 281, 282, -1, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, -1, -1, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - -1, -1, 337, 338, 339, 340, -1, -1, 343, 344, - -1, 346, -1, -1, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, - -1, -1, 367, 368, 369, 370, 371, 372, 373, 257, + -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, + -1, -1, 33, -1, -1, -1, -1, -1, -1, 40, + 41, 59, 43, 44, 45, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 59, 60, + -1, 62, 37, -1, -1, -1, -1, 42, 43, 44, + 45, -1, 47, -1, 37, 93, -1, -1, -1, 42, + 43, -1, 45, -1, 47, 60, -1, 62, -1, -1, + -1, -1, 93, -1, -1, 96, -1, 60, 37, 62, + -1, -1, -1, 42, 43, -1, 45, 125, 47, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 94, + -1, 60, -1, 62, 125, -1, -1, -1, -1, -1, + -1, 94, -1, -1, -1, -1, -1, -1, -1, 257, 258, 259, 260, -1, -1, 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, -1, -1, -1, -1, -1, + 268, 269, 270, 271, 272, 94, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, 337, - 338, 339, 340, 0, -1, 343, 344, 302, 346, -1, + 338, 339, 340, 102, -1, 343, 344, 302, 346, -1, 305, 349, 350, 351, 352, 353, 354, 355, 356, 357, - 358, 359, 360, 361, 362, 363, -1, -1, -1, 367, - 368, 369, 370, 371, 372, 373, 33, -1, -1, -1, - 37, -1, -1, 40, 41, 42, 43, 44, 45, -1, - 47, -1, -1, -1, 349, 350, 351, 352, 353, 354, - -1, -1, 59, 60, -1, 62, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 349, 350, 351, 352, 353, - 354, -1, -1, 37, -1, -1, -1, -1, 42, 43, - 44, 45, -1, 47, -1, -1, 93, -1, 92, 96, - -1, -1, -1, -1, -1, -1, 60, -1, 62, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 0, -1, -1, -1, -1, -1, -1, -1, 125, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 94, -1, -1, 137, 138, 139, 140, -1, -1, -1, - -1, -1, -1, 33, -1, -1, -1, -1, -1, -1, - 40, 41, -1, 43, 44, 45, -1, -1, -1, -1, - -1, 165, -1, -1, -1, -1, -1, -1, -1, 59, - 60, -1, 62, 37, -1, -1, -1, -1, 42, 43, - -1, 45, -1, 47, -1, -1, -1, 37, -1, -1, - -1, -1, 42, 43, 44, 45, 60, 47, 62, -1, - -1, -1, -1, 93, -1, 209, 96, -1, -1, 37, - 60, -1, 62, 217, 42, 43, -1, 45, -1, 47, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 94, -1, 60, -1, 62, 125, -1, -1, -1, -1, - -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, - 257, 258, 259, 260, -1, -1, 263, 264, 265, 266, - 267, 268, 269, 270, 271, 272, 94, -1, -1, -1, - -1, -1, 276, -1, 281, 282, -1, 284, 285, 286, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 301, 302, -1, -1, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, -1, -1, -1, 319, -1, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, - 337, 338, 339, 340, -1, -1, 343, 344, 302, 346, - -1, 305, 349, 350, 351, 352, 353, 354, 355, 356, - 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, - 367, 368, 369, 370, 371, 372, 373, 257, 258, 259, + 358, 359, 360, 361, 362, 363, 264, -1, -1, 367, + 368, 369, 370, 371, 372, 373, 257, 258, 259, 260, + -1, 140, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, -1, 291, 349, 350, 351, 352, 353, 354, + 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, + 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, + -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, -1, -1, 337, 338, 339, 340, + 0, -1, 343, 344, -1, 346, -1, -1, 349, 350, + 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, + 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, + 371, 372, 373, 33, 349, 350, 351, 352, 353, 354, + 40, 41, -1, 43, 44, 45, 349, 350, 351, 352, + 353, 354, -1, -1, 273, -1, -1, -1, 277, 59, + 60, 280, 62, -1, -1, -1, -1, -1, -1, -1, + 349, 350, 351, 352, 353, 354, -1, -1, -1, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, + 0, -1, -1, -1, -1, -1, -1, -1, 337, 338, + 339, 340, -1, -1, -1, -1, -1, 0, -1, -1, + -1, -1, -1, -1, -1, 125, 355, 356, 357, 358, + 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, + -1, 41, -1, -1, 44, -1, -1, -1, -1, -1, + 33, 370, 371, -1, -1, -1, -1, 40, 41, 59, + -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 59, 60, -1, 62, + -1, -1, -1, -1, -1, 404, -1, -1, 407, -1, + -1, -1, -1, 93, -1, -1, -1, -1, -1, 37, + -1, -1, -1, -1, 42, 43, -1, 45, -1, 47, + 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, + -1, -1, 60, -1, 62, 125, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 94, 257, 258, 259, 260, -1, -1, 263, 264, 265, 266, 267, 268, 269, - 270, 271, 272, 387, 388, 349, 350, 351, 352, 353, - 354, 281, 282, -1, 284, 285, 286, 287, 288, 289, + 270, 271, 272, -1, 92, -1, -1, -1, -1, -1, + -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, -1, -1, 305, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, - -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 137, + 138, 139, 140, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, 337, 338, 339, - 340, 0, 302, 343, 344, 305, 346, -1, -1, 349, + 340, -1, -1, 343, 344, -1, 346, 165, -1, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 362, 363, -1, -1, -1, 367, 368, 369, - 370, 371, 372, 373, 33, 349, 350, 351, 352, 353, - 354, 40, 41, -1, 43, 44, 45, -1, -1, 349, - 350, 351, 352, 353, 354, -1, -1, 0, -1, -1, - 59, 60, -1, 62, -1, -1, -1, -1, -1, -1, - -1, 349, -1, 351, 352, 353, 354, -1, -1, -1, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, -1, -1, -1, 93, -1, -1, 96, 41, -1, - -1, 44, 0, -1, -1, -1, -1, -1, -1, 337, - 338, 339, 340, -1, -1, -1, 59, -1, 0, -1, - -1, -1, -1, -1, -1, -1, 125, 355, 356, 357, - 358, 359, 360, 361, 362, 363, -1, -1, -1, -1, - -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, - 93, 33, -1, -1, -1, -1, -1, -1, 40, 41, - -1, 59, 44, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 59, 60, -1, - 62, -1, 125, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, - 37, -1, -1, -1, -1, 42, 43, -1, 45, -1, - 47, 93, -1, -1, 96, -1, -1, -1, -1, -1, - -1, -1, -1, 60, -1, 62, -1, 125, -1, -1, + 360, 361, 362, 363, 264, -1, -1, 367, 368, 369, + 370, 371, 372, 373, 257, 258, 259, 260, -1, -1, + 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + -1, 291, 210, -1, -1, -1, -1, -1, 281, 282, + 218, 284, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + -1, -1, 305, 306, 307, 308, 309, 310, 311, 312, + 313, 314, 315, 316, 317, 318, 0, -1, -1, -1, + -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 290, -1, 337, 338, 339, 340, 0, 277, + 343, 344, -1, 346, -1, -1, 349, 350, 351, 352, + 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, + 363, -1, -1, -1, 367, 368, 369, 370, 371, 372, + 373, 33, -1, -1, -1, 59, -1, -1, 40, 41, + 318, 319, 44, -1, -1, 323, -1, -1, -1, -1, + -1, 349, 350, 351, 352, 353, 354, 59, 60, -1, + 62, -1, -1, -1, -1, -1, -1, -1, -1, 93, + -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 94, 257, 258, - 259, 260, -1, -1, 263, 264, 265, 266, 267, 268, - 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, - -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, 302, -1, -1, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, - -1, 264, -1, -1, -1, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 333, 334, -1, -1, 337, 338, - 339, 340, -1, -1, 343, 344, -1, 346, 291, -1, - 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, - 359, 360, 361, 362, 363, -1, 264, -1, 367, 368, - 369, 370, 371, 372, 373, 257, 258, 259, 260, -1, + -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, + -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 0, -1, -1, -1, 397, + 398, -1, -1, 125, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 415, 416, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, + -1, -1, -1, -1, -1, 40, 41, -1, -1, 44, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 59, 60, -1, 62, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, + -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 257, -1, -1, -1, -1, -1, 263, + 125, -1, -1, -1, 268, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 257, 258, 259, 260, -1, -1, 263, 264, 265, 266, 267, 268, 269, 270, 271, - 272, -1, -1, 291, -1, -1, -1, -1, -1, 281, + 272, -1, -1, -1, -1, -1, -1, -1, 302, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, 317, 318, 0, -1, -1, + 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 334, 290, -1, 337, 338, 339, 340, 0, + 332, 333, 334, -1, -1, 337, 338, 339, 340, -1, -1, 343, 344, -1, 346, -1, -1, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, 371, - 372, 373, 33, -1, -1, -1, 59, -1, -1, 40, - 41, -1, -1, 44, -1, -1, -1, -1, -1, -1, - -1, -1, 349, 350, 351, 352, 353, 354, 59, 60, - -1, 62, -1, -1, -1, -1, -1, -1, -1, -1, - 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, - -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, - -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, - -1, -1, -1, -1, -1, -1, 40, 41, -1, -1, + 372, 373, 257, 258, 259, 260, -1, -1, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, + -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, -1, -1, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 0, -1, -1, -1, -1, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + -1, -1, 337, 338, 339, 340, 0, -1, 343, 344, + -1, 346, -1, -1, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, + -1, -1, 367, 368, 369, 370, 371, 372, 373, 33, + -1, -1, -1, 59, -1, -1, 40, 41, -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, 60, -1, 62, -1, + -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, + 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 93, + -1, -1, 96, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, + -1, 125, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 93, - -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, + -1, -1, -1, 40, 41, -1, 43, 44, 45, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, + -1, 44, 59, -1, -1, 62, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 257, -1, -1, -1, -1, -1, - 263, 125, -1, -1, -1, 268, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 257, 258, 259, 260, - -1, -1, 263, 264, 265, 266, 267, 268, 269, 270, - 271, 272, -1, -1, -1, -1, -1, -1, -1, 302, - 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, - -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 333, 334, -1, -1, 337, 338, 339, 340, - -1, -1, 343, 344, -1, 346, -1, -1, 349, 350, - 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, - 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, - 371, 372, 373, 257, 258, 259, 260, -1, -1, 263, + -1, -1, -1, -1, -1, -1, 93, -1, -1, 96, + -1, -1, -1, -1, -1, -1, 37, -1, -1, -1, + 93, 42, 43, -1, 45, -1, 47, -1, -1, -1, + -1, 257, -1, -1, -1, -1, -1, 263, 125, 60, + -1, 62, 268, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 125, 257, 258, 259, 260, -1, -1, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, -1, - -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, + -1, -1, -1, 94, -1, -1, 302, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 315, 316, 317, 318, 0, -1, -1, -1, -1, + 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, - 334, -1, -1, 337, 338, 339, 340, 0, -1, 343, + 334, -1, -1, 337, 338, 339, 340, -1, -1, 343, 344, -1, 346, -1, -1, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, 371, 372, 373, - 33, -1, -1, -1, 59, -1, -1, 40, 41, -1, - -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 59, 60, -1, 62, - -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, - -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, + 257, 258, 259, 260, -1, -1, 263, -1, 265, 266, + 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, + -1, 264, -1, -1, 281, 282, -1, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, -1, -1, -1, 291, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, + 337, 338, 339, 340, 0, -1, 343, 344, -1, -1, + -1, -1, -1, -1, -1, -1, 287, -1, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 350, -1, -1, + 367, 368, 369, 370, 371, 372, 373, 33, -1, -1, + -1, -1, -1, -1, 40, 41, -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, - 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, - -1, -1, 125, -1, -1, -1, -1, -1, 0, -1, + -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 349, 350, + 351, 352, 353, 354, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, + 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, - -1, -1, -1, -1, 40, 41, -1, 43, 44, 45, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, - -1, -1, 44, 59, -1, -1, 62, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, + -1, 0, -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, - 96, -1, -1, -1, -1, -1, -1, 37, -1, -1, - -1, 93, 42, 43, -1, 45, -1, 47, -1, -1, - -1, -1, 257, -1, -1, -1, -1, -1, 263, 125, - 60, -1, 62, 268, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 125, 257, 258, 259, 260, -1, -1, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, - -1, -1, -1, -1, 94, -1, -1, 302, 281, 282, - -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, - -1, -1, 305, 306, 307, 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, - -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 333, 334, -1, -1, 337, 338, 339, 340, -1, -1, - 343, 344, -1, 346, -1, -1, 349, 350, 351, 352, - 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, - 363, -1, -1, -1, 367, 368, 369, 370, 371, 372, - 373, 257, 258, 259, 260, -1, -1, 263, -1, 265, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, + -1, 40, 41, -1, -1, 44, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 93, -1, -1, 96, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 257, 258, 259, 260, -1, -1, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, -1, - -1, -1, 264, -1, -1, 281, 282, -1, 284, 285, + -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 301, -1, -1, -1, 291, + 296, 297, 298, 299, 300, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, + 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, - -1, 337, 338, 339, 340, 0, -1, 343, 344, -1, - -1, -1, -1, -1, -1, -1, -1, 287, -1, 355, - 356, 357, 358, 359, 360, 361, 362, 363, 350, -1, - -1, 367, 368, 369, 370, 371, 372, 373, 33, -1, - -1, -1, -1, -1, -1, 40, 41, -1, -1, 44, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 349, - 350, 351, 352, 353, 354, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, - -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, - 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 337, 338, 339, 340, -1, -1, 343, 344, -1, + 346, -1, -1, 349, 350, 351, 352, -1, -1, 355, + 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, + -1, 367, 368, 369, 370, 371, 372, 373, 257, 258, + 259, 260, -1, -1, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, + -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, -1, -1, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, -1, -1, 337, 338, + 339, 340, 0, -1, 343, 344, -1, 346, -1, -1, + 349, 350, 351, 352, -1, -1, 355, 356, 357, 358, + 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, + 369, 370, 371, 372, 373, 33, -1, -1, -1, -1, + -1, -1, 40, 41, -1, 43, 44, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, - -1, -1, 40, 41, -1, -1, 44, -1, -1, -1, + -1, 59, -1, -1, 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, + -1, -1, -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, + -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, + 41, -1, -1, 44, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, + -1, -1, 33, -1, -1, -1, -1, -1, -1, 40, + 41, -1, -1, 44, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, + -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 93, -1, 125, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 257, 258, 259, 260, -1, -1, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, - -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, -1, -1, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - -1, -1, 337, 338, 339, 340, -1, -1, 343, 344, - -1, 346, -1, -1, 349, 350, 351, 352, -1, -1, - 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, - -1, -1, 367, 368, 369, 370, 371, 372, 373, 257, - 258, 259, 260, -1, -1, 263, 264, 265, 266, 267, + -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 257, + 258, 259, 260, -1, -1, 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, -1, -1, 305, 306, 307, + 298, 299, 300, 301, -1, -1, -1, -1, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, + 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, 337, - 338, 339, 340, 0, -1, 343, 344, -1, 346, -1, - -1, 349, 350, 351, 352, -1, -1, 355, 356, 357, + 338, 339, 340, -1, -1, 343, 344, -1, -1, -1, + -1, -1, -1, 264, -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, 367, - 368, 369, 370, 371, 372, 373, 33, -1, -1, -1, - -1, -1, -1, 40, 41, -1, 43, 44, 45, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 59, -1, -1, 62, -1, -1, -1, -1, + 368, 369, 370, 371, 372, 373, 257, 258, 259, 260, + 291, -1, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, + 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, + 311, 312, 313, 314, 315, 316, 317, 318, -1, 350, + -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, -1, -1, 337, 338, 339, 340, + 0, -1, 343, 344, -1, 346, -1, -1, 349, 350, + -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, + 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, + 371, 372, 373, 33, -1, -1, -1, -1, -1, -1, + 40, 41, -1, -1, 44, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 0, -1, -1, -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 0, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 0, -1, -1, -1, -1, -1, -1, -1, 125, -1, + -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, + -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, - -1, -1, -1, 33, -1, -1, -1, -1, -1, -1, - 40, 41, -1, -1, 44, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, + 33, -1, -1, -1, -1, -1, -1, 40, 41, -1, + 43, 44, 45, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 59, -1, -1, 62, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 93, -1, 125, 96, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 93, -1, -1, 96, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 257, 258, 259, 260, -1, -1, 263, -1, 265, 266, - 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, - -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 301, -1, -1, -1, -1, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, - 337, 338, 339, 340, -1, -1, 343, 344, -1, -1, - -1, -1, -1, -1, 264, -1, -1, -1, 355, 356, - 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, - 367, 368, 369, 370, 371, 372, 373, 257, 258, 259, - 260, 291, -1, 263, 264, 265, 266, 267, 268, 269, + -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 257, 258, 259, + 260, -1, -1, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, -1, -1, 305, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 317, 318, 349, - 350, -1, -1, -1, 324, 325, 326, 327, 328, 329, + 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, + -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, 337, 338, 339, - 340, 0, -1, 343, 344, -1, 346, -1, -1, 349, - 350, -1, -1, -1, -1, 355, 356, 357, 358, 359, + 340, -1, -1, 343, 344, -1, 346, -1, -1, -1, + 350, -1, -1, -1, 264, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, 369, - 370, 371, 372, 373, 33, -1, -1, -1, -1, -1, - -1, 40, 41, -1, -1, 44, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 370, 371, 372, 373, 257, 258, 259, 260, -1, -1, + 263, 291, 265, 266, 267, 268, 269, 270, 271, 272, + -1, -1, 302, -1, -1, 305, -1, -1, 281, 282, + -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, + -1, -1, -1, 306, 307, 308, 309, 310, 311, 312, + 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, + 350, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, -1, -1, 337, 338, 339, 340, 0, -1, + 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, + 363, -1, -1, -1, 367, 368, 369, 370, 371, 372, + 373, 33, -1, -1, -1, -1, -1, -1, 40, 41, + -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, + 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, + -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 0, -1, -1, 93, -1, -1, 96, -1, -1, + -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, + -1, -1, -1, 125, -1, -1, 41, -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, - -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, - -1, -1, 41, -1, -1, 44, -1, -1, -1, -1, + -1, -1, -1, -1, 59, -1, -1, -1, 33, -1, + -1, -1, -1, -1, -1, 40, 41, -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 59, 33, -1, -1, -1, -1, -1, -1, 40, 41, - -1, 43, 44, 45, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, - 62, -1, -1, -1, 93, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 59, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 93, -1, -1, 96, -1, 125, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, + 125, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 257, 258, - 259, 260, -1, -1, 263, 264, 265, 266, 267, 268, - 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, - -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, 302, -1, -1, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, - -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 333, 334, -1, -1, 337, 338, - 339, 340, -1, -1, 343, 344, -1, 346, -1, -1, - -1, 350, -1, -1, -1, 264, 355, 356, 357, 358, - 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, - 369, 370, 371, 372, 373, 257, 258, 259, 260, -1, - -1, 263, 291, 265, 266, 267, 268, 269, 270, 271, - 272, -1, -1, 302, -1, -1, 305, -1, -1, 281, + 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 257, 258, 259, 260, -1, + -1, 263, -1, 265, 266, 267, 268, 269, 270, 271, + 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, -1, -1, -1, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, - 349, 350, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 334, -1, -1, 337, 338, 339, 340, 0, - -1, 343, 344, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, + 332, 333, 334, -1, -1, 337, 338, 339, 340, -1, + -1, 343, 344, -1, -1, -1, -1, 91, -1, 264, -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, 371, - 372, 373, 33, -1, -1, -1, -1, -1, -1, 40, - 41, -1, -1, 44, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, - -1, 62, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, - -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, + 372, 373, 257, 258, 259, 260, 291, -1, 263, 123, + 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, + -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, -1, -1, -1, + -1, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, -1, 350, -1, -1, -1, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + -1, -1, 337, 338, 339, 340, 0, -1, 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, - -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, - 41, -1, -1, 44, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 59, 33, - -1, -1, -1, -1, -1, -1, 40, 41, -1, -1, - 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, - -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, + 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, + -1, -1, 367, 368, 369, 370, 371, 372, 373, 33, + -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 257, 258, 59, 260, 261, -1, -1, + -1, -1, -1, -1, -1, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, -1, -1, 283, -1, -1, -1, -1, -1, -1, -1, -1, -1, 93, - -1, -1, 96, -1, 125, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 257, 258, 259, 260, - -1, -1, 263, -1, 265, 266, 267, 268, 269, 270, - 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, - 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, -1, -1, -1, -1, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, - -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 333, 334, -1, -1, 337, 338, 339, 340, - -1, -1, 343, 344, -1, 91, -1, -1, -1, -1, - -1, -1, -1, 264, 355, 356, 357, 358, 359, 360, - 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, - 371, 372, 373, 257, 258, 259, 260, 123, -1, 263, - 291, 265, 266, 267, 268, 269, 270, 271, 272, -1, - -1, 302, -1, -1, 305, -1, -1, 281, 282, -1, + -1, 335, -1, -1, -1, -1, -1, 341, 342, -1, + -1, 345, -1, 347, -1, -1, 33, -1, -1, -1, + -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, + 364, -1, 366, -1, -1, -1, -1, -1, -1, 373, + 374, -1, 59, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 93, -1, -1, 96, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 125, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 257, 258, 259, 260, -1, -1, 263, + -1, 265, 266, 267, 268, 269, 270, 271, 272, -1, + -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, -1, - -1, -1, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 315, 316, 317, 318, -1, -1, -1, -1, 350, + -1, -1, -1, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, - 334, -1, -1, 337, 338, 339, 340, 0, -1, 343, - 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 334, -1, -1, 337, 338, 339, 340, -1, -1, 343, + 344, -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, 371, 372, 373, - 33, -1, -1, -1, -1, -1, -1, 40, -1, -1, + 257, 258, 259, 260, 123, -1, 263, -1, 265, 266, + 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, + -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, -1, -1, -1, -1, -1, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, + 337, 338, 339, 340, 0, -1, 343, 344, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, + 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, + 367, 368, 369, 370, 371, 372, 373, 33, -1, -1, + -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 257, 258, + -1, 260, 261, 59, -1, -1, -1, -1, -1, -1, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, + 279, 280, -1, -1, 283, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, + 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 257, 258, -1, 260, 261, 59, -1, -1, -1, - -1, -1, -1, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 280, -1, -1, 283, -1, -1, - -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, - 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, + -1, 0, -1, -1, -1, -1, -1, -1, -1, 125, + -1, -1, -1, -1, -1, -1, 335, -1, -1, -1, + -1, -1, 341, 342, -1, -1, 345, -1, 347, -1, + -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, + -1, 40, -1, -1, -1, 364, -1, 366, -1, -1, + -1, -1, -1, -1, 373, 374, -1, -1, -1, -1, + 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, - -1, -1, 125, -1, -1, 41, -1, -1, 44, 335, - -1, -1, -1, -1, -1, 341, 342, -1, -1, 345, - -1, 347, -1, 59, -1, -1, -1, 33, -1, -1, - -1, -1, -1, -1, 40, -1, -1, -1, 364, -1, - 366, -1, -1, -1, -1, -1, -1, 373, 374, -1, - -1, -1, -1, 59, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 93, -1, 125, - 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 125, + -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 257, 258, 259, 260, -1, -1, - 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, - -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, - -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, - -1, -1, -1, -1, 307, 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, - -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 333, 334, -1, -1, 337, 338, 339, 340, -1, -1, - 343, 344, -1, -1, -1, -1, 91, -1, 264, -1, - -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, - 363, -1, -1, -1, 367, 368, 369, 370, 371, 372, - 373, 257, 258, 259, 260, 291, -1, 263, 123, 265, + -1, 257, 258, 259, 260, -1, -1, 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, -1, -1, -1, -1, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 318, -1, 350, -1, -1, -1, 324, 325, + 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, - -1, 337, 338, 339, 340, 0, -1, 343, 344, -1, + -1, 337, 338, 339, 340, -1, -1, 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, - -1, 367, 368, 369, 370, 371, 372, 373, 33, -1, - -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, + -1, 367, 368, 369, 370, 371, 372, 373, 257, 258, + 259, 260, -1, -1, 263, -1, 265, 266, 267, 268, + 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, + -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, -1, -1, -1, -1, -1, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, -1, -1, 337, 338, + 339, 340, 0, -1, 343, 344, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, + 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, + 369, 370, 371, 372, 373, 33, -1, -1, -1, -1, + -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 257, 258, 59, 260, 261, -1, -1, -1, - -1, -1, -1, -1, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, -1, -1, 283, -1, - -1, -1, 0, -1, -1, -1, -1, -1, 93, -1, - -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, - 125, -1, -1, 41, -1, -1, 44, -1, -1, -1, - 335, -1, -1, -1, -1, -1, 341, 342, -1, -1, - 345, 59, 347, -1, -1, 33, -1, -1, -1, -1, - -1, -1, 40, -1, -1, -1, -1, -1, -1, 364, - -1, 366, -1, -1, -1, -1, -1, -1, 373, 374, - -1, 59, -1, -1, -1, 93, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, + -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 93, -1, 125, 96, -1, + -1, -1, 33, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 257, 258, 259, 260, -1, -1, 263, -1, - 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, - -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, -1, -1, -1, - -1, -1, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - -1, -1, 337, 338, 339, 340, -1, -1, 343, 344, - -1, -1, -1, -1, -1, -1, 264, -1, -1, -1, - 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, - -1, -1, 367, 368, 369, 370, 371, 372, 373, 257, - 258, 259, 260, 291, -1, 263, -1, 265, 266, 267, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 257, + 258, 259, 260, -1, -1, 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, -1, -1, -1, -1, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, -1, 350, -1, -1, -1, 324, 325, 326, 327, + 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, 337, - 338, 339, 340, 0, -1, 343, 344, -1, -1, -1, + 338, 339, 340, -1, -1, 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, 367, - 368, 369, 370, 371, 372, 373, 33, -1, -1, -1, - -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, + 368, 369, 370, 371, 372, 373, 257, 258, 259, 260, + -1, -1, 263, -1, 265, 266, 267, 268, 269, 270, + 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, + 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, -1, -1, -1, -1, -1, 307, 308, 309, 310, + 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, + -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, -1, -1, 337, 338, 339, 340, + 0, -1, 343, 344, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, + 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, + 371, 372, 373, 33, -1, -1, -1, -1, -1, -1, + 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 0, -1, -1, -1, -1, -1, -1, -1, 125, -1, + -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, + -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 33, -1, -1, -1, -1, -1, -1, - 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, + 33, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 257, 258, 259, 260, -1, -1, 263, -1, 265, 266, - 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, - -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 301, -1, -1, -1, -1, -1, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, - 337, 338, 339, 340, -1, -1, 343, 344, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, - 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, - 367, 368, 369, 370, 371, 372, 373, 257, 258, 259, + -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 257, 258, 259, 260, -1, -1, 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, @@ -2438,44 +2492,44 @@ short yycheck[] = { 25, 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, 337, 338, 339, - 340, 0, -1, 343, 344, -1, -1, -1, -1, -1, + 340, -1, -1, 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, 369, - 370, 371, 372, 373, 33, -1, -1, -1, -1, -1, - -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, + 370, 371, 372, 373, 257, 258, 259, 260, -1, -1, + 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, + -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, + -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, + -1, -1, -1, -1, 307, 308, 309, 310, 311, 312, + 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, + -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, -1, -1, 337, 338, 339, 340, 0, -1, + 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, + 363, -1, -1, -1, 367, 368, 369, 370, 371, 372, + 373, 33, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 93, -1, -1, 96, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, - -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 33, -1, -1, -1, -1, -1, -1, 40, -1, + -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, + -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, + -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, + -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 257, 258, - 259, 260, -1, -1, 263, -1, 265, 266, 267, 268, - 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, - -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, -1, -1, -1, -1, -1, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, - -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 333, 334, -1, -1, 337, 338, - 339, 340, -1, -1, 343, 344, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, - 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, - 369, 370, 371, 372, 373, 257, 258, 259, 260, -1, + 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 257, 258, 259, 260, -1, -1, 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, @@ -2483,45 +2537,45 @@ short yycheck[] = { 25, -1, -1, -1, -1, -1, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 334, -1, -1, 337, 338, 339, 340, 0, + 332, 333, 334, -1, -1, 337, 338, 339, 340, -1, -1, 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, 371, - 372, 373, 33, -1, -1, -1, -1, -1, -1, 40, + 372, 373, 257, 258, 259, 260, -1, -1, 263, -1, + 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, + -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, -1, -1, -1, + -1, -1, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + -1, -1, 337, 338, 339, 340, 0, -1, 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, + 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, + -1, -1, 367, 368, 369, 370, 371, 372, 373, 33, + -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 93, + -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, - -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, + -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, + -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, - -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, + -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 93, - -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 257, 258, 259, 260, - -1, -1, 263, -1, 265, 266, 267, 268, 269, 270, - 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, - 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, -1, -1, -1, -1, -1, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, - -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 333, 334, -1, -1, 337, 338, 339, 340, - -1, -1, 343, 344, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, - 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, - 371, 372, 373, 257, 258, 259, 260, -1, -1, 263, + -1, -1, -1, 257, 258, 259, 260, -1, -1, 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, @@ -2529,45 +2583,45 @@ short yycheck[] = { 25, -1, -1, -1, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, - 334, -1, -1, 337, 338, 339, 340, 0, -1, 343, + 334, -1, -1, 337, 338, 339, 340, -1, -1, 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, 371, 372, 373, - 33, -1, -1, -1, -1, -1, -1, 40, -1, -1, + 257, 258, 259, 260, -1, -1, 263, -1, 265, 266, + 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, + -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, -1, -1, -1, -1, -1, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, + 337, 338, 339, 340, 0, -1, 343, 344, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, + 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, + 367, 368, 369, 370, 371, 372, 373, 33, -1, -1, + -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, + -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, + 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, + -1, 0, -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, - -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, - -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, + -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, + 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, - 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 257, 258, 259, 260, -1, -1, - 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, - -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, - -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, - -1, -1, -1, -1, 307, 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, - -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 333, 334, -1, -1, 337, 338, 339, 340, -1, -1, - 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, - 363, -1, -1, -1, 367, 368, 369, 370, 371, 372, - 373, 257, 258, 259, 260, -1, -1, 263, -1, 265, + -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 257, 258, 259, 260, -1, -1, 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, @@ -2575,44 +2629,44 @@ short yycheck[] = { 25, -1, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, - -1, 337, 338, 339, 340, 0, -1, 343, 344, -1, + -1, 337, 338, 339, 340, -1, -1, 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, - -1, 367, 368, 369, 370, 371, 372, 373, 33, -1, - -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, + -1, 367, 368, 369, 370, 371, 372, 373, 257, 258, + 259, 260, -1, -1, 263, -1, 265, 266, 267, 268, + 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, + -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, -1, -1, -1, -1, -1, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, -1, -1, 337, 338, + 339, 340, 0, -1, 343, 344, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, + 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, + 369, 370, 371, 372, 373, 33, -1, -1, -1, -1, + -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, + -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, - -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, - 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, + -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, - -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 33, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, + -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 257, 258, 259, 260, -1, -1, 263, -1, - 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, - -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, -1, -1, -1, - -1, -1, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - -1, -1, 337, 338, 339, 340, -1, -1, 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, - -1, -1, 367, 368, 369, 370, 371, 372, 373, 257, + -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 257, 258, 259, 260, -1, -1, 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, @@ -2621,44 +2675,44 @@ short yycheck[] = { 25, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, 337, - 338, 339, 340, 0, -1, 343, 344, -1, -1, -1, + 338, 339, 340, -1, -1, 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, 367, - 368, 369, 370, 371, 372, 373, 33, -1, -1, -1, - -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, + 368, 369, 370, 371, 372, 373, 257, 258, 259, 260, + -1, -1, 263, -1, 265, 266, 267, 268, 269, 270, + 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, + 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, -1, -1, -1, -1, -1, 307, 308, 309, 310, + 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, + -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, -1, -1, 337, 338, 339, 340, + 0, -1, 343, 344, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, + 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, + 371, 372, 373, 33, -1, -1, -1, -1, -1, -1, + 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 0, -1, -1, -1, -1, -1, -1, -1, 125, -1, + -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, + -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 33, -1, -1, -1, -1, -1, -1, - 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, + 33, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 257, 258, 259, 260, -1, -1, 263, -1, 265, 266, - 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, - -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 301, -1, -1, -1, -1, -1, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, - 337, 338, 339, 340, -1, -1, 343, 344, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, - 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, - 367, 368, 369, 370, 371, 372, 373, 257, 258, 259, + -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 257, 258, 259, 260, -1, -1, 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, @@ -2667,499 +2721,465 @@ short yycheck[] = { 25, 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, 337, 338, 339, - 340, 0, -1, 343, 344, -1, -1, -1, -1, -1, + 340, -1, -1, 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, 369, - 370, 371, 372, 373, 33, -1, -1, -1, -1, -1, - -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 93, -1, -1, 96, -1, -1, + 370, 371, 372, 373, 257, 258, 259, 260, -1, -1, + 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, + -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, + -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, + -1, -1, -1, -1, 307, 308, 309, 310, 311, 312, + 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, + -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, -1, -1, 337, 338, 339, 340, 0, -1, + 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, + 363, -1, -1, -1, 367, 368, 369, 370, 371, 372, + 373, 33, -1, -1, -1, -1, -1, -1, 40, -1, + -1, -1, 44, 45, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, - -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 33, -1, -1, -1, -1, -1, -1, 40, -1, + -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, + -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, + -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, + -1, -1, -1, -1, -1, 40, 41, -1, 43, 44, + 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 59, -1, -1, 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, + -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 257, 258, - 259, 260, -1, -1, 263, -1, 265, 266, 267, 268, - 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, - -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, -1, -1, -1, -1, -1, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, - -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 333, 334, -1, -1, 337, 338, - 339, 340, -1, -1, 343, 344, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, - 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, - 369, 370, 371, 372, 373, 257, 258, 259, 260, -1, - -1, 263, -1, 265, 266, 267, 268, 269, 270, 271, + 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 258, 259, 260, -1, + -1, -1, -1, 265, 266, 267, -1, 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, -1, -1, -1, -1, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 334, -1, -1, 337, 338, 339, 340, 0, + 332, 333, 334, -1, -1, 337, 338, 339, 340, -1, -1, 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, 371, - 372, 373, 33, -1, -1, -1, -1, -1, -1, 40, - -1, -1, -1, 44, 45, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, - -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, - -1, -1, -1, -1, -1, -1, 40, 41, -1, 43, - 44, 45, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 59, -1, -1, 62, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 93, - -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 258, 259, 260, - -1, -1, -1, -1, 265, 266, 267, -1, 269, 270, - 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, - 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, -1, -1, -1, -1, -1, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, - -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 333, 334, -1, -1, 337, 338, 339, 340, - -1, -1, 343, 344, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, - 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, - 371, 372, 373, 257, 258, 259, 260, -1, -1, 263, - -1, 265, 266, 267, 268, 269, 270, 271, 272, -1, - -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, - 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, 0, -1, - -1, -1, 306, 307, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, - 334, 33, -1, -1, -1, -1, -1, -1, 40, 343, - 344, 43, -1, 45, 46, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, - -1, -1, -1, 367, 368, 369, 370, 371, 372, 373, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 372, 373, 257, 258, 259, 260, -1, -1, 263, -1, + 265, 266, 267, 268, 269, 270, 271, 272, -1, -1, + -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 0, -1, -1, + -1, 306, 307, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 33, -1, -1, -1, -1, -1, -1, 40, 343, 344, + 43, -1, 45, 46, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, + -1, -1, 367, 368, 369, 370, 371, 372, 373, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 93, 0, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 93, 0, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 125, -1, 33, -1, -1, -1, -1, - -1, -1, 40, 41, -1, -1, 44, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 125, -1, 33, -1, -1, -1, -1, -1, + -1, 40, 41, -1, -1, 44, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 0, -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 0, -1, -1, -1, 93, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 33, -1, -1, 125, -1, -1, - -1, 40, 41, -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 59, 60, -1, 62, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 257, 258, 259, 260, -1, - -1, 263, -1, 265, 266, 267, 268, 269, 270, 271, - 272, -1, -1, -1, 93, -1, -1, 96, -1, 281, - 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - -1, -1, -1, -1, 0, 307, 125, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 334, -1, -1, -1, -1, 33, -1, -1, - -1, 343, 344, -1, 40, -1, -1, -1, -1, 257, - 258, 259, 260, -1, -1, 263, -1, 265, 266, 267, - 268, 269, 270, 59, -1, 367, 368, 369, 370, 371, - 372, 373, -1, 281, 282, -1, 284, 285, 286, 287, - 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 301, -1, -1, -1, 93, -1, 307, - 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 333, 334, -1, -1, 125, - -1, -1, -1, -1, -1, 343, 344, -1, 257, 258, - 259, 260, -1, -1, 263, -1, -1, -1, -1, 268, - -1, -1, 271, 272, -1, -1, -1, 0, -1, 367, - 368, 369, 370, 371, 372, 373, -1, -1, -1, -1, + -1, -1, -1, 33, -1, -1, 125, -1, -1, -1, + 40, 41, -1, -1, 44, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, + 60, -1, 62, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 257, 258, 259, 260, -1, -1, + 263, -1, 265, 266, 267, 268, 269, 270, 271, 272, + -1, -1, -1, 93, -1, -1, 96, -1, 281, 282, + -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, + -1, -1, -1, 0, 307, 125, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, -1, -1, -1, -1, 33, -1, -1, -1, + 343, 344, -1, 40, -1, -1, -1, -1, 257, 258, + 259, 260, -1, -1, 263, -1, 265, 266, 267, 268, + 269, 270, 59, -1, 367, 368, 369, 370, 371, 372, + 373, -1, 281, 282, -1, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, -1, -1, -1, 93, -1, 307, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 333, 334, 59, -1, 337, 338, - 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, - 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, - 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, - 93, -1, -1, -1, 373, -1, -1, -1, -1, -1, - -1, 257, 258, 259, 260, -1, -1, 263, -1, -1, - -1, -1, 268, -1, -1, 271, 272, -1, -1, -1, - -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 333, 334, 0, - -1, 337, 338, 339, 340, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 355, - 356, 357, 358, 359, 360, 361, 362, 363, -1, -1, - -1, -1, 33, -1, -1, -1, -1, 373, -1, 40, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, + 329, 330, 331, 332, 333, 334, -1, -1, 125, -1, + -1, -1, -1, -1, 343, 344, -1, 257, 258, 259, + 260, -1, -1, 263, -1, -1, -1, -1, 268, -1, + -1, 271, 272, -1, -1, -1, 0, -1, 367, 368, + 369, 370, 371, 372, 373, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 260, -1, -1, - -1, -1, 265, 266, 267, -1, 269, 270, 271, 272, - -1, -1, 93, -1, -1, 96, -1, -1, 281, 282, - -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, - 0, -1, -1, -1, 125, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, + -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, 59, -1, 337, 338, 339, + 340, -1, -1, -1, -1, -1, -1, -1, -1, 349, + 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, + 360, 361, 362, 363, -1, -1, -1, -1, -1, 93, + -1, -1, -1, 373, -1, -1, -1, -1, -1, -1, + 257, 258, 259, 260, -1, -1, 263, -1, -1, -1, + -1, 268, -1, -1, 271, 272, -1, -1, -1, -1, + -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 334, 0, -1, + 337, 338, 339, 340, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, + 357, 358, 359, 360, 361, 362, 363, -1, -1, -1, + -1, 33, -1, -1, -1, -1, 373, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 343, 344, -1, -1, -1, -1, -1, 0, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, - -1, -1, -1, -1, 367, 368, 369, 370, 371, 372, - 373, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 37, -1, -1, -1, 41, 42, - 43, 44, 45, 93, 47, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 59, 60, -1, 62, + -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 0, -1, -1, -1, 125, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 257, 258, 259, 260, - 93, -1, 263, -1, -1, -1, -1, 268, -1, -1, - 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 260, -1, -1, -1, + -1, 265, 266, 267, -1, 269, 270, 271, 272, -1, + -1, 93, -1, -1, 96, -1, -1, 281, 282, -1, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 0, + -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, - 59, -1, -1, -1, -1, 0, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, - -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 333, 334, 93, -1, 337, 338, 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, - 361, 362, 363, -1, 59, -1, 125, -1, -1, 0, - -1, -1, 373, -1, -1, -1, -1, -1, -1, -1, - 260, -1, -1, -1, -1, 265, 266, 267, -1, 269, - 270, 271, 272, -1, -1, -1, -1, -1, 93, -1, - -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 301, 302, -1, -1, -1, -1, -1, 59, -1, - 125, 264, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 291, -1, - -1, -1, 93, 343, 344, -1, -1, -1, -1, 302, - -1, -1, 305, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 367, 368, 369, - 370, 371, 372, 373, 125, 0, -1, -1, -1, -1, - -1, 260, -1, -1, -1, -1, 265, 266, 267, -1, - 269, 270, 271, 272, -1, -1, 349, 350, 351, 352, - 353, 354, 281, 282, -1, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 59, -1, -1, -1, -1, 0, - -1, -1, -1, -1, -1, 260, -1, -1, -1, -1, - 265, 266, 267, -1, 269, 270, 271, 272, -1, -1, - -1, -1, -1, -1, 343, 344, 281, 282, 93, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, -1, 367, 368, - 369, 370, 371, 372, 373, -1, -1, -1, 59, -1, - 125, -1, -1, 0, -1, -1, -1, -1, -1, 260, - -1, -1, -1, -1, 265, 266, 267, -1, 269, 270, - 271, 272, -1, -1, -1, -1, -1, -1, 343, 344, - 281, 282, 93, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, -1, 367, 368, 369, 370, 371, 372, 373, -1, - -1, -1, 59, -1, 125, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 343, + 344, -1, -1, -1, -1, -1, 0, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, + -1, -1, -1, 367, 368, 369, 370, 371, 372, 373, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 37, -1, -1, -1, 41, 42, 43, + 44, 45, 93, 47, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 59, 60, -1, 62, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 343, 344, -1, -1, 93, -1, -1, -1, + 0, -1, -1, -1, 125, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 257, 258, 259, 260, 93, + -1, 263, -1, -1, -1, -1, 268, -1, -1, 271, + 272, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 367, 368, 369, 370, - 371, 372, 373, -1, -1, -1, -1, -1, 125, -1, - -1, -1, -1, -1, -1, 260, -1, -1, -1, -1, - 265, 266, 267, -1, 269, 270, 271, 272, -1, -1, - -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, -1, -1, -1, + -1, 125, -1, -1, -1, -1, -1, -1, -1, 59, + -1, -1, -1, -1, 0, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, + -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, + 332, 333, 334, 93, -1, 337, 338, 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 260, + -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, + 362, 363, -1, 59, -1, 125, -1, -1, 0, -1, + -1, 373, -1, -1, -1, -1, -1, -1, -1, 260, -1, -1, -1, -1, 265, 266, 267, -1, 269, 270, - 271, 272, -1, -1, -1, -1, -1, -1, 343, 344, + 271, 272, -1, -1, -1, -1, -1, 93, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, -1, 367, 368, 369, 370, 371, 372, 373, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 260, -1, -1, -1, -1, 265, 266, - 267, -1, 269, 270, 271, 272, -1, -1, -1, -1, - -1, -1, 343, 344, 281, 282, 0, 284, 285, 286, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 301, -1, 367, 368, 369, 370, - 371, 372, 373, -1, -1, -1, -1, -1, -1, 33, - -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 59, 343, 344, -1, -1, - -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 367, 368, 369, 370, 371, 372, 373, -1, -1, 93, - -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, - -1, 45, 46, -1, -1, -1, -1, -1, -1, -1, - -1, 125, -1, -1, -1, 59, -1, -1, -1, -1, + 301, 302, -1, -1, -1, -1, -1, 59, -1, 125, + 264, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 291, -1, -1, + -1, 93, 343, 344, -1, -1, -1, -1, 302, -1, + -1, 305, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 367, 368, 369, 370, + 371, 372, 373, 125, 0, -1, -1, -1, -1, -1, + 260, -1, -1, -1, -1, 265, 266, 267, -1, 269, + 270, 271, 272, -1, -1, 349, 350, 351, 352, 353, + 354, 281, 282, -1, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 59, -1, -1, -1, -1, 0, -1, + -1, -1, -1, -1, 260, -1, -1, -1, -1, 265, + 266, 267, -1, 269, 270, 271, 272, -1, -1, -1, + -1, -1, -1, 343, 344, 281, 282, 93, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, -1, 367, 368, 369, + 370, 371, 372, 373, -1, -1, -1, 59, -1, 125, + -1, -1, 0, -1, -1, -1, -1, -1, 260, -1, + -1, -1, -1, 265, 266, 267, -1, 269, 270, 271, + 272, -1, -1, -1, -1, -1, -1, 343, 344, 281, + 282, 93, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + -1, 367, 368, 369, 370, 371, 372, 373, -1, -1, + -1, 59, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 343, 344, -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 367, 368, 369, 370, 371, + 372, 373, -1, -1, -1, -1, -1, 125, -1, -1, + -1, -1, -1, -1, 260, -1, -1, -1, -1, 265, + 266, 267, -1, 269, 270, 271, 272, -1, -1, -1, + -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 260, -1, + -1, -1, -1, 265, 266, 267, -1, 269, 270, 271, + 272, -1, -1, -1, -1, -1, -1, 343, 344, 281, + 282, -1, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + -1, 367, 368, 369, 370, 371, 372, 373, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 33, -1, -1, -1, -1, -1, -1, 40, -1, - -1, -1, -1, 45, -1, -1, -1, -1, -1, -1, + -1, -1, 260, -1, -1, -1, -1, 265, 266, 267, + -1, 269, 270, 271, 272, -1, -1, -1, -1, -1, + -1, 343, 344, 281, 282, 0, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, -1, 367, 368, 369, 370, 371, + 372, 373, -1, -1, -1, -1, -1, -1, 33, -1, + -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 59, 343, 344, -1, -1, -1, + -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 367, + 368, 369, 370, 371, 372, 373, -1, -1, 93, -1, + -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 43, -1, + 45, 46, -1, -1, -1, -1, -1, -1, -1, -1, + 125, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 257, 258, 259, -1, -1, -1, 263, - -1, 265, 266, 267, 268, 269, 270, 271, 272, 91, - -1, -1, -1, -1, 96, -1, -1, 281, 282, -1, - 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, -1, -1, - -1, 123, -1, 307, 308, 309, 310, 311, 312, 313, - 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, - 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, - 334, -1, -1, 337, 338, 339, 340, 271, 272, 343, - 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, - -1, -1, -1, 367, 368, 369, 370, 371, 372, -1, - -1, -1, -1, -1, 308, 309, 310, 311, 312, 313, - 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 337, 338, 339, 340, 33, -1, -1, - -1, -1, -1, -1, 40, -1, -1, -1, -1, 45, - -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, - -1, -1, -1, -1, -1, 257, 258, 259, 260, 261, - -1, 263, -1, -1, -1, -1, 268, 269, 270, 271, - 272, 273, 274, 275, 276, 277, 278, 279, 280, -1, - -1, 283, -1, -1, -1, 91, -1, -1, -1, -1, - 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, 317, 318, 123, -1, -1, - -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 334, 335, -1, 337, 338, 339, 340, 341, - 342, -1, -1, 345, -1, 347, -1, -1, -1, -1, - -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, - 362, 363, 364, 33, 366, -1, -1, -1, -1, -1, - 40, 373, 374, -1, -1, 45, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 96, -1, -1, -1, + 33, -1, -1, -1, -1, -1, -1, 40, -1, -1, + -1, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 257, 258, 259, 260, 261, -1, 263, -1, -1, - -1, -1, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 280, -1, -1, 283, -1, -1, - 33, -1, -1, -1, -1, -1, -1, 40, 41, -1, - -1, -1, 45, -1, -1, -1, -1, -1, -1, -1, - -1, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, - -1, 337, 338, 339, 340, 341, 342, -1, -1, 345, - -1, 347, -1, 96, -1, -1, -1, -1, -1, 355, - 356, 357, 358, 359, 360, 361, 362, 363, 364, -1, - 366, -1, -1, -1, -1, -1, -1, 373, 374, -1, + -1, -1, 257, 258, 259, -1, -1, -1, 263, -1, + 265, 266, 267, 268, 269, 270, 271, 272, 91, -1, + -1, -1, -1, 96, -1, -1, 281, 282, -1, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, -1, -1, -1, + 123, -1, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + -1, -1, 337, 338, 339, 340, 271, 272, 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 257, 258, 259, - 260, -1, -1, 263, -1, 265, 266, 267, 268, 269, - 270, 271, 272, -1, -1, -1, -1, -1, -1, -1, - -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 301, -1, -1, -1, -1, -1, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, - -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 333, 334, 33, -1, 337, 338, 339, - 340, -1, 40, 343, 344, -1, -1, 45, 46, -1, - -1, -1, -1, -1, -1, 355, 356, 357, 358, 359, - 360, 361, 362, 363, -1, -1, -1, 367, 368, 369, - 370, 371, 372, 373, 257, 258, 259, 260, -1, -1, - 263, -1, -1, -1, -1, 268, -1, -1, 271, 272, - -1, -1, -1, -1, -1, -1, -1, -1, 96, -1, + 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, + -1, -1, 367, 368, 369, 370, 371, 372, -1, -1, + -1, -1, -1, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 337, 338, 339, 340, 33, -1, -1, -1, + -1, -1, -1, 40, -1, -1, -1, -1, 45, -1, + 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, + -1, -1, -1, -1, 257, 258, 259, 260, 261, -1, + 263, -1, -1, -1, -1, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, -1, -1, + 283, -1, -1, -1, 91, -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 307, 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, + 313, 314, 315, 316, 317, 318, 123, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 333, 334, 33, -1, 337, 338, 339, 340, -1, 40, - -1, -1, -1, -1, 45, -1, -1, -1, -1, -1, + 333, 334, 335, -1, 337, 338, 339, 340, 341, 342, + -1, -1, 345, -1, 347, -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, - 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 373, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 363, 364, 33, 366, -1, -1, -1, -1, -1, 40, + 373, 374, -1, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 257, - 258, 259, 260, -1, -1, 263, -1, -1, -1, -1, - 268, -1, -1, 271, 272, 33, -1, -1, -1, -1, - -1, -1, 40, -1, -1, -1, -1, 45, -1, -1, + -1, -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 333, 334, -1, 96, 337, - 338, 339, 340, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, - 358, 359, 360, 361, 362, 363, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 373, 257, 258, 259, 260, - -1, -1, 263, -1, -1, -1, -1, 268, -1, -1, - 271, 272, 33, -1, -1, -1, -1, -1, -1, 40, - -1, -1, -1, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 307, 308, 309, 310, + 257, 258, 259, 260, 261, -1, 263, -1, -1, -1, + -1, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, -1, -1, 283, -1, -1, 33, + -1, -1, -1, -1, -1, -1, 40, 41, -1, -1, + -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 334, 335, -1, + 337, 338, 339, 340, 341, 342, -1, -1, 345, -1, + 347, -1, 96, -1, -1, -1, -1, -1, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, -1, 366, + -1, -1, -1, -1, -1, -1, 373, 374, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 257, 258, 259, 260, + -1, -1, 263, -1, 265, 266, 267, 268, 269, 270, + 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, + 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, -1, -1, -1, -1, -1, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 333, 334, -1, 96, 337, 338, 339, 340, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 331, 332, 333, 334, 33, -1, 337, 338, 339, 340, + -1, 40, 343, 344, -1, -1, 45, 46, -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, - 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 373, -1, -1, -1, -1, -1, -1, 257, - 258, 259, 260, -1, -1, 263, -1, -1, -1, -1, - 268, -1, -1, 271, 272, 33, -1, -1, -1, -1, - -1, -1, 40, -1, -1, -1, -1, 45, -1, -1, + 361, 362, 363, -1, -1, -1, 367, 368, 369, 370, + 371, 372, 373, 257, 258, 259, 260, -1, -1, 263, + -1, -1, -1, -1, 268, -1, -1, 271, 272, -1, + -1, -1, -1, -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 333, 334, -1, 96, 337, - 338, 339, 340, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, - 358, 359, 360, 361, 362, 363, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 373, 257, 258, 259, 260, - -1, -1, 263, -1, -1, -1, -1, 268, -1, -1, - 271, 272, 33, -1, -1, -1, -1, -1, -1, 40, - -1, -1, -1, -1, 45, 46, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, - -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 333, 334, -1, 96, 337, 338, 339, 340, + -1, -1, -1, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, -1, -1, -1, -1, -1, + 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, + 334, 33, -1, 337, 338, 339, 340, -1, 40, -1, + -1, -1, -1, 45, -1, -1, -1, -1, -1, -1, + -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 373, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, - 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 373, -1, -1, -1, -1, -1, -1, 257, - 258, 259, 260, -1, -1, 263, -1, -1, -1, -1, - 268, -1, -1, 271, 272, 33, -1, -1, -1, -1, - -1, -1, 40, -1, 42, -1, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 333, 334, -1, 96, 337, - 338, 339, 340, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, - 358, 359, 360, 361, 362, 363, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 373, 257, 258, 259, -1, - -1, -1, 263, -1, -1, -1, -1, 268, -1, -1, - 271, 272, 33, -1, -1, -1, -1, -1, -1, 40, - -1, -1, -1, -1, 45, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, - -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 333, 334, -1, 96, 337, 338, 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, - 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 257, - 258, 259, -1, -1, -1, 263, -1, -1, -1, -1, - 268, -1, -1, 271, 272, 33, -1, -1, -1, -1, - -1, -1, 40, -1, -1, -1, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 333, 334, -1, 96, 337, - 338, 339, 340, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, - 358, 359, 360, 361, 362, 363, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 257, 258, 259, -1, - -1, -1, 263, -1, -1, -1, -1, 268, -1, -1, - 271, 272, 33, -1, -1, -1, -1, -1, -1, 40, - -1, -1, -1, -1, 45, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 257, 258, + 259, 260, -1, -1, 263, -1, -1, -1, -1, 268, + -1, -1, 271, 272, 33, -1, -1, -1, -1, -1, + -1, 40, -1, -1, -1, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, - -1, -1, -1, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 333, 334, -1, 96, 337, 338, 339, 340, + -1, -1, -1, -1, -1, -1, -1, -1, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, -1, 96, 337, 338, + 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, + 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 373, 257, 258, 259, 260, -1, + -1, 263, -1, -1, -1, -1, 268, -1, -1, 271, + 272, 33, -1, -1, -1, -1, -1, -1, 40, -1, + -1, -1, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, - 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 257, - 258, 259, -1, -1, -1, 263, -1, -1, -1, -1, - 268, -1, -1, 271, 272, 33, -1, -1, -1, -1, - -1, -1, 40, -1, -1, -1, -1, 45, -1, -1, + -1, -1, -1, -1, -1, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, + -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, + 332, 333, 334, -1, 96, 337, 338, 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 333, 334, -1, 96, 337, - 338, 339, 340, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, - 358, 359, 360, 361, 362, 363, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 257, 258, 259, -1, - -1, -1, 263, -1, -1, -1, -1, 268, -1, -1, - 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, + -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, + 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 373, -1, -1, -1, -1, -1, -1, 257, 258, + 259, 260, -1, -1, 263, -1, -1, -1, -1, 268, + -1, -1, 271, 272, 33, -1, -1, -1, -1, -1, + -1, 40, -1, -1, -1, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, 317, 318, -1, -1, - 91, -1, -1, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 333, 334, -1, -1, 337, 338, 339, 340, + -1, -1, -1, -1, -1, -1, -1, -1, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, -1, 96, 337, 338, + 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, + 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 373, 257, 258, 259, 260, -1, + -1, 263, -1, -1, -1, -1, 268, -1, -1, 271, + 272, 33, -1, -1, -1, -1, -1, -1, 40, -1, + -1, -1, -1, 45, 46, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 123, -1, 355, 356, 357, 358, 359, 360, - 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 257, - 258, 259, -1, -1, -1, 263, -1, -1, -1, -1, - 268, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, + -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, + 332, 333, 334, -1, 96, 337, 338, 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, + 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 373, -1, -1, -1, -1, -1, -1, 257, 258, + 259, 260, -1, -1, 263, -1, -1, -1, -1, 268, + -1, -1, 271, 272, 33, -1, -1, -1, -1, -1, + -1, 40, -1, 42, -1, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, -1, -1, -1, -1, -1, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 333, 334, -1, -1, 337, - 338, 339, 340, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, - 358, 359, 360, 361, 362, 363, 257, 258, -1, 260, - 261, -1, -1, -1, -1, -1, -1, -1, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, - -1, -1, 283, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, -1, 96, 337, 338, + 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, + 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 373, 257, 258, 259, -1, -1, + -1, 263, -1, -1, -1, -1, 268, -1, -1, 271, + 272, 33, -1, -1, -1, -1, -1, -1, 40, -1, + -1, -1, -1, 45, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, + -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, + 332, 333, 334, -1, 96, 337, 338, 339, 340, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, + 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 257, 258, + 259, -1, -1, -1, 263, -1, -1, -1, -1, 268, + -1, -1, 271, 272, 33, -1, -1, -1, -1, -1, + -1, 40, -1, -1, -1, -1, 45, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, -1, 96, 337, 338, + 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, + 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 257, 258, 259, -1, -1, + -1, 263, -1, -1, -1, -1, 268, -1, -1, 271, + 272, 33, -1, -1, -1, -1, -1, -1, 40, -1, + -1, -1, -1, 45, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, -1, -1, -1, + -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, + 332, 333, 334, -1, 96, 337, 338, 339, 340, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, + 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 257, 258, + 259, -1, -1, -1, 263, -1, -1, -1, -1, 268, + -1, -1, 271, 272, 33, -1, -1, -1, -1, -1, + -1, 40, -1, -1, -1, -1, 45, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, -1, 96, 337, 338, + 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, + 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 257, 258, 259, -1, -1, + -1, 263, -1, -1, -1, -1, 268, -1, -1, 271, + 272, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, -1, -1, 91, + -1, -1, 324, 325, 326, 327, 328, 329, 330, 331, + 332, 333, 334, -1, -1, 337, 338, 339, 340, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 123, -1, 355, 356, 357, 358, 359, 360, 361, + 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 257, 258, + 259, -1, -1, -1, 263, -1, -1, -1, -1, 268, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + -1, -1, -1, -1, -1, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, -1, -1, 337, 338, + 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, + 359, 360, 361, 362, 363, 257, 258, -1, 260, 261, + -1, -1, -1, -1, -1, -1, -1, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, -1, + -1, 283, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 335, -1, -1, -1, -1, -1, - 341, 342, -1, -1, 345, -1, 347, -1, -1, -1, + -1, -1, -1, 335, -1, -1, -1, -1, -1, 341, + 342, -1, -1, 345, -1, 347, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 364, -1, 366, -1, -1, -1, -1, - -1, -1, 373, 374, + -1, -1, 364, -1, 366, -1, -1, -1, -1, -1, + -1, 373, 374, }; #define YYFINAL 2 #ifndef YYDEBUG @@ -3331,12 +3351,17 @@ char *yyrule[] = { "sprintf_args : sprintf_args ',' expr", "position : position_not_place", "position : place", +"position : '(' place ')'", "position_not_place : expr_pair", "position_not_place : position '+' expr_pair", +"position_not_place : '(' position '+' expr_pair ')'", "position_not_place : position '-' expr_pair", +"position_not_place : '(' position '-' expr_pair ')'", "position_not_place : '(' position ',' position ')'", "position_not_place : expr between position AND position", +"position_not_place : '(' expr between position AND position ')'", "position_not_place : expr '<' position ',' position '>'", +"position_not_place : '(' expr '<' position ',' position '>' ')'", "between : BETWEEN", "between : OF THE WAY BETWEEN", "expr_pair : expr ',' expr", @@ -3467,7 +3492,7 @@ YYSTYPE yylval; short yyss[YYSTACKSIZE]; YYSTYPE yyvs[YYSTACKSIZE]; #define yystacksize YYSTACKSIZE -#line 1617 "pic.y" +#line 1643 "pic.y" /* bison defines const to be empty unless __STDC__ is defined, which it isn't under cfront */ @@ -3724,7 +3749,7 @@ char *do_sprintf(const char *form, const double *v, int nv) result += '\0'; return strsave(result.contents()); } -#line 3728 "y.tab.c" +#line 3753 "y.tab.c" #define YYABORT goto yyabort #define YYREJECT goto yyabort #define YYACCEPT goto yyaccept @@ -4921,93 +4946,129 @@ case 138: } break; case 139: -#line 1142 "pic.y" -{ yyval.pair = yyvsp[0].pair; } +#line 1139 "pic.y" +{ + position pos = yyvsp[-1].pl; + yyval.pair.x = pos.x; + yyval.pair.y = pos.y; + } break; case 140: -#line 1144 "pic.y" +#line 1148 "pic.y" +{ yyval.pair = yyvsp[0].pair; } +break; +case 141: +#line 1150 "pic.y" { yyval.pair.x = yyvsp[-2].pair.x + yyvsp[0].pair.x; yyval.pair.y = yyvsp[-2].pair.y + yyvsp[0].pair.y; } break; -case 141: -#line 1149 "pic.y" +case 142: +#line 1155 "pic.y" +{ + yyval.pair.x = yyvsp[-3].pair.x + yyvsp[-1].pair.x; + yyval.pair.y = yyvsp[-3].pair.y + yyvsp[-1].pair.y; + } +break; +case 143: +#line 1160 "pic.y" { yyval.pair.x = yyvsp[-2].pair.x - yyvsp[0].pair.x; yyval.pair.y = yyvsp[-2].pair.y - yyvsp[0].pair.y; } break; -case 142: -#line 1154 "pic.y" +case 144: +#line 1165 "pic.y" +{ + yyval.pair.x = yyvsp[-3].pair.x - yyvsp[-1].pair.x; + yyval.pair.y = yyvsp[-3].pair.y - yyvsp[-1].pair.y; + } +break; +case 145: +#line 1170 "pic.y" { yyval.pair.x = yyvsp[-3].pair.x; yyval.pair.y = yyvsp[-1].pair.y; } break; -case 143: -#line 1159 "pic.y" +case 146: +#line 1175 "pic.y" { yyval.pair.x = (1.0 - yyvsp[-4].x)*yyvsp[-2].pair.x + yyvsp[-4].x*yyvsp[0].pair.x; yyval.pair.y = (1.0 - yyvsp[-4].x)*yyvsp[-2].pair.y + yyvsp[-4].x*yyvsp[0].pair.y; } break; -case 144: -#line 1164 "pic.y" +case 147: +#line 1180 "pic.y" { yyval.pair.x = (1.0 - yyvsp[-5].x)*yyvsp[-3].pair.x + yyvsp[-5].x*yyvsp[-1].pair.x; yyval.pair.y = (1.0 - yyvsp[-5].x)*yyvsp[-3].pair.y + yyvsp[-5].x*yyvsp[-1].pair.y; } break; -case 147: -#line 1177 "pic.y" +case 148: +#line 1185 "pic.y" +{ + yyval.pair.x = (1.0 - yyvsp[-5].x)*yyvsp[-3].pair.x + yyvsp[-5].x*yyvsp[-1].pair.x; + yyval.pair.y = (1.0 - yyvsp[-5].x)*yyvsp[-3].pair.y + yyvsp[-5].x*yyvsp[-1].pair.y; + } +break; +case 149: +#line 1190 "pic.y" +{ + yyval.pair.x = (1.0 - yyvsp[-6].x)*yyvsp[-4].pair.x + yyvsp[-6].x*yyvsp[-2].pair.x; + yyval.pair.y = (1.0 - yyvsp[-6].x)*yyvsp[-4].pair.y + yyvsp[-6].x*yyvsp[-2].pair.y; + } +break; +case 152: +#line 1203 "pic.y" { yyval.pair.x = yyvsp[-2].x; yyval.pair.y = yyvsp[0].x; } break; -case 148: -#line 1182 "pic.y" +case 153: +#line 1208 "pic.y" { yyval.pair = yyvsp[-1].pair; } break; -case 149: -#line 1188 "pic.y" +case 154: +#line 1214 "pic.y" { yyval.pl = yyvsp[0].pl; } break; -case 150: -#line 1190 "pic.y" +case 155: +#line 1216 "pic.y" { path pth(yyvsp[0].crn); if (!pth.follow(yyvsp[-1].pl, & yyval.pl)) YYABORT; } break; -case 151: -#line 1196 "pic.y" +case 156: +#line 1222 "pic.y" { path pth(yyvsp[-1].crn); if (!pth.follow(yyvsp[0].pl, & yyval.pl)) YYABORT; } break; -case 152: -#line 1202 "pic.y" +case 157: +#line 1228 "pic.y" { path pth(yyvsp[-2].crn); if (!pth.follow(yyvsp[0].pl, & yyval.pl)) YYABORT; } break; -case 153: -#line 1208 "pic.y" +case 158: +#line 1234 "pic.y" { yyval.pl.x = current_position.x; yyval.pl.y = current_position.y; yyval.pl.obj = 0; } break; -case 154: -#line 1217 "pic.y" +case 159: +#line 1243 "pic.y" { place *p = lookup_label(yyvsp[0].str); if (!p) { @@ -5018,39 +5079,39 @@ case 154: a_delete yyvsp[0].str; } break; -case 155: -#line 1227 "pic.y" +case 160: +#line 1253 "pic.y" { yyval.pl.obj = yyvsp[0].obj; } break; -case 156: -#line 1229 "pic.y" +case 161: +#line 1255 "pic.y" { path pth(yyvsp[0].str); if (!pth.follow(yyvsp[-2].pl, & yyval.pl)) YYABORT; } break; -case 157: -#line 1238 "pic.y" +case 162: +#line 1264 "pic.y" { yyval.n = yyvsp[0].n; } break; -case 158: -#line 1240 "pic.y" +case 163: +#line 1266 "pic.y" { /* XXX Check for overflow (and non-integers?).*/ yyval.n = (int)yyvsp[-1].x; } break; -case 159: -#line 1248 "pic.y" +case 164: +#line 1274 "pic.y" { yyval.n = 1; } break; -case 160: -#line 1250 "pic.y" +case 165: +#line 1276 "pic.y" { yyval.n = yyvsp[-1].n; } break; -case 161: -#line 1255 "pic.y" +case 166: +#line 1281 "pic.y" { int count = 0; object *p; @@ -5066,8 +5127,8 @@ case 161: } } break; -case 162: -#line 1270 "pic.y" +case 167: +#line 1296 "pic.y" { int count = 0; object *p; @@ -5083,241 +5144,241 @@ case 162: } } break; -case 163: -#line 1288 "pic.y" +case 168: +#line 1314 "pic.y" { yyval.obtype = BOX_OBJECT; } break; -case 164: -#line 1290 "pic.y" +case 169: +#line 1316 "pic.y" { yyval.obtype = CIRCLE_OBJECT; } break; -case 165: -#line 1292 "pic.y" +case 170: +#line 1318 "pic.y" { yyval.obtype = ELLIPSE_OBJECT; } break; -case 166: -#line 1294 "pic.y" +case 171: +#line 1320 "pic.y" { yyval.obtype = ARC_OBJECT; } break; -case 167: -#line 1296 "pic.y" +case 172: +#line 1322 "pic.y" { yyval.obtype = LINE_OBJECT; } break; -case 168: -#line 1298 "pic.y" +case 173: +#line 1324 "pic.y" { yyval.obtype = ARROW_OBJECT; } break; -case 169: -#line 1300 "pic.y" +case 174: +#line 1326 "pic.y" { yyval.obtype = SPLINE_OBJECT; } break; -case 170: -#line 1302 "pic.y" +case 175: +#line 1328 "pic.y" { yyval.obtype = BLOCK_OBJECT; } break; -case 171: -#line 1304 "pic.y" +case 176: +#line 1330 "pic.y" { yyval.obtype = TEXT_OBJECT; } break; -case 172: -#line 1309 "pic.y" +case 177: +#line 1335 "pic.y" { yyval.pth = new path(yyvsp[0].str); } break; -case 173: -#line 1311 "pic.y" +case 178: +#line 1337 "pic.y" { yyval.pth = yyvsp[-2].pth; yyval.pth->append(yyvsp[0].str); } break; -case 174: -#line 1319 "pic.y" +case 179: +#line 1345 "pic.y" { yyval.pth = new path(yyvsp[0].crn); } break; -case 175: -#line 1323 "pic.y" +case 180: +#line 1349 "pic.y" { yyval.pth = yyvsp[0].pth; } break; -case 176: -#line 1325 "pic.y" +case 181: +#line 1351 "pic.y" { yyval.pth = yyvsp[-1].pth; yyval.pth->append(yyvsp[0].crn); } break; -case 177: -#line 1333 "pic.y" +case 182: +#line 1359 "pic.y" { yyval.pth = yyvsp[0].pth; } break; -case 178: -#line 1335 "pic.y" +case 183: +#line 1361 "pic.y" { yyval.pth = yyvsp[-3].pth; yyval.pth->set_ypath(yyvsp[-1].pth); } break; -case 179: -#line 1341 "pic.y" +case 184: +#line 1367 "pic.y" { lex_warning("`%1%2 last %3' in `with' argument ignored", yyvsp[-3].n, ordinal_postfix(yyvsp[-3].n), object_type_name(yyvsp[-1].obtype)); yyval.pth = yyvsp[0].pth; } break; -case 180: -#line 1347 "pic.y" +case 185: +#line 1373 "pic.y" { lex_warning("`last %1' in `with' argument ignored", object_type_name(yyvsp[-1].obtype)); yyval.pth = yyvsp[0].pth; } break; -case 181: -#line 1353 "pic.y" +case 186: +#line 1379 "pic.y" { lex_warning("`%1%2 %3' in `with' argument ignored", yyvsp[-2].n, ordinal_postfix(yyvsp[-2].n), object_type_name(yyvsp[-1].obtype)); yyval.pth = yyvsp[0].pth; } break; -case 182: -#line 1359 "pic.y" +case 187: +#line 1385 "pic.y" { lex_warning("initial `%1' in `with' argument ignored", yyvsp[-1].str); a_delete yyvsp[-1].str; yyval.pth = yyvsp[0].pth; } break; -case 183: -#line 1368 "pic.y" +case 188: +#line 1394 "pic.y" { yyval.crn = &object::north; } break; -case 184: -#line 1370 "pic.y" +case 189: +#line 1396 "pic.y" { yyval.crn = &object::east; } break; -case 185: -#line 1372 "pic.y" +case 190: +#line 1398 "pic.y" { yyval.crn = &object::west; } break; -case 186: -#line 1374 "pic.y" +case 191: +#line 1400 "pic.y" { yyval.crn = &object::south; } break; -case 187: -#line 1376 "pic.y" +case 192: +#line 1402 "pic.y" { yyval.crn = &object::north_east; } break; -case 188: -#line 1378 "pic.y" +case 193: +#line 1404 "pic.y" { yyval.crn = &object:: south_east; } break; -case 189: -#line 1380 "pic.y" +case 194: +#line 1406 "pic.y" { yyval.crn = &object::north_west; } break; -case 190: -#line 1382 "pic.y" +case 195: +#line 1408 "pic.y" { yyval.crn = &object::south_west; } break; -case 191: -#line 1384 "pic.y" +case 196: +#line 1410 "pic.y" { yyval.crn = &object::center; } break; -case 192: -#line 1386 "pic.y" +case 197: +#line 1412 "pic.y" { yyval.crn = &object::start; } break; -case 193: -#line 1388 "pic.y" +case 198: +#line 1414 "pic.y" { yyval.crn = &object::end; } break; -case 194: -#line 1390 "pic.y" +case 199: +#line 1416 "pic.y" { yyval.crn = &object::north; } break; -case 195: -#line 1392 "pic.y" +case 200: +#line 1418 "pic.y" { yyval.crn = &object::south; } break; -case 196: -#line 1394 "pic.y" +case 201: +#line 1420 "pic.y" { yyval.crn = &object::west; } break; -case 197: -#line 1396 "pic.y" +case 202: +#line 1422 "pic.y" { yyval.crn = &object::east; } break; -case 198: -#line 1398 "pic.y" +case 203: +#line 1424 "pic.y" { yyval.crn = &object::north_west; } break; -case 199: -#line 1400 "pic.y" +case 204: +#line 1426 "pic.y" { yyval.crn = &object::south_west; } break; -case 200: -#line 1402 "pic.y" +case 205: +#line 1428 "pic.y" { yyval.crn = &object::north_east; } break; -case 201: -#line 1404 "pic.y" +case 206: +#line 1430 "pic.y" { yyval.crn = &object::south_east; } break; -case 202: -#line 1406 "pic.y" +case 207: +#line 1432 "pic.y" { yyval.crn = &object::west; } break; -case 203: -#line 1408 "pic.y" +case 208: +#line 1434 "pic.y" { yyval.crn = &object::east; } break; -case 204: -#line 1410 "pic.y" +case 209: +#line 1436 "pic.y" { yyval.crn = &object::north_west; } break; -case 205: -#line 1412 "pic.y" +case 210: +#line 1438 "pic.y" { yyval.crn = &object::south_west; } break; -case 206: -#line 1414 "pic.y" +case 211: +#line 1440 "pic.y" { yyval.crn = &object::north_east; } break; -case 207: -#line 1416 "pic.y" +case 212: +#line 1442 "pic.y" { yyval.crn = &object::south_east; } break; -case 208: -#line 1418 "pic.y" +case 213: +#line 1444 "pic.y" { yyval.crn = &object::north; } break; -case 209: -#line 1420 "pic.y" +case 214: +#line 1446 "pic.y" { yyval.crn = &object::south; } break; -case 210: -#line 1422 "pic.y" +case 215: +#line 1448 "pic.y" { yyval.crn = &object::east; } break; -case 211: -#line 1424 "pic.y" +case 216: +#line 1450 "pic.y" { yyval.crn = &object::west; } break; -case 212: -#line 1426 "pic.y" +case 217: +#line 1452 "pic.y" { yyval.crn = &object::center; } break; -case 213: -#line 1428 "pic.y" +case 218: +#line 1454 "pic.y" { yyval.crn = &object::start; } break; -case 214: -#line 1430 "pic.y" +case 219: +#line 1456 "pic.y" { yyval.crn = &object::end; } break; -case 215: -#line 1435 "pic.y" +case 220: +#line 1461 "pic.y" { if (!lookup_variable(yyvsp[0].str, & yyval.x)) { lex_error("there is no variable `%1'", yyvsp[0].str); @@ -5326,12 +5387,12 @@ case 215: a_delete yyvsp[0].str; } break; -case 216: -#line 1443 "pic.y" +case 221: +#line 1469 "pic.y" { yyval.x = yyvsp[0].x; } break; -case 217: -#line 1445 "pic.y" +case 222: +#line 1471 "pic.y" { if (yyvsp[-1].pl.obj != 0) yyval.x = yyvsp[-1].pl.obj->origin().x; @@ -5339,8 +5400,8 @@ case 217: yyval.x = yyvsp[-1].pl.x; } break; -case 218: -#line 1452 "pic.y" +case 223: +#line 1478 "pic.y" { if (yyvsp[-1].pl.obj != 0) yyval.x = yyvsp[-1].pl.obj->origin().y; @@ -5348,8 +5409,8 @@ case 218: yyval.x = yyvsp[-1].pl.y; } break; -case 219: -#line 1459 "pic.y" +case 224: +#line 1485 "pic.y" { if (yyvsp[-1].pl.obj != 0) yyval.x = yyvsp[-1].pl.obj->height(); @@ -5357,8 +5418,8 @@ case 219: yyval.x = 0.0; } break; -case 220: -#line 1466 "pic.y" +case 225: +#line 1492 "pic.y" { if (yyvsp[-1].pl.obj != 0) yyval.x = yyvsp[-1].pl.obj->width(); @@ -5366,8 +5427,8 @@ case 220: yyval.x = 0.0; } break; -case 221: -#line 1473 "pic.y" +case 226: +#line 1499 "pic.y" { if (yyvsp[-1].pl.obj != 0) yyval.x = yyvsp[-1].pl.obj->radius(); @@ -5375,20 +5436,20 @@ case 221: yyval.x = 0.0; } break; -case 222: -#line 1480 "pic.y" +case 227: +#line 1506 "pic.y" { yyval.x = yyvsp[-2].x + yyvsp[0].x; } break; -case 223: -#line 1482 "pic.y" +case 228: +#line 1508 "pic.y" { yyval.x = yyvsp[-2].x - yyvsp[0].x; } break; -case 224: -#line 1484 "pic.y" +case 229: +#line 1510 "pic.y" { yyval.x = yyvsp[-2].x * yyvsp[0].x; } break; -case 225: -#line 1486 "pic.y" +case 230: +#line 1512 "pic.y" { if (yyvsp[0].x == 0.0) { lex_error("division by zero"); @@ -5397,8 +5458,8 @@ case 225: yyval.x = yyvsp[-2].x/yyvsp[0].x; } break; -case 226: -#line 1494 "pic.y" +case 231: +#line 1520 "pic.y" { if (yyvsp[0].x == 0.0) { lex_error("modulus by zero"); @@ -5407,8 +5468,8 @@ case 226: yyval.x = fmod(yyvsp[-2].x, yyvsp[0].x); } break; -case 227: -#line 1502 "pic.y" +case 232: +#line 1528 "pic.y" { errno = 0; yyval.x = pow(yyvsp[-2].x, yyvsp[0].x); @@ -5422,16 +5483,16 @@ case 227: } } break; -case 228: -#line 1515 "pic.y" +case 233: +#line 1541 "pic.y" { yyval.x = -yyvsp[0].x; } break; -case 229: -#line 1517 "pic.y" +case 234: +#line 1543 "pic.y" { yyval.x = yyvsp[-1].x; } break; -case 230: -#line 1519 "pic.y" +case 235: +#line 1545 "pic.y" { errno = 0; yyval.x = sin(yyvsp[-1].x); @@ -5441,8 +5502,8 @@ case 230: } } break; -case 231: -#line 1528 "pic.y" +case 236: +#line 1554 "pic.y" { errno = 0; yyval.x = cos(yyvsp[-1].x); @@ -5452,8 +5513,8 @@ case 231: } } break; -case 232: -#line 1537 "pic.y" +case 237: +#line 1563 "pic.y" { errno = 0; yyval.x = atan2(yyvsp[-3].x, yyvsp[-1].x); @@ -5467,8 +5528,8 @@ case 232: } } break; -case 233: -#line 1550 "pic.y" +case 238: +#line 1576 "pic.y" { errno = 0; yyval.x = log10(yyvsp[-1].x); @@ -5478,8 +5539,8 @@ case 233: } } break; -case 234: -#line 1559 "pic.y" +case 239: +#line 1585 "pic.y" { errno = 0; yyval.x = pow(10.0, yyvsp[-1].x); @@ -5489,8 +5550,8 @@ case 234: } } break; -case 235: -#line 1568 "pic.y" +case 240: +#line 1594 "pic.y" { errno = 0; yyval.x = sqrt(yyvsp[-1].x); @@ -5500,74 +5561,74 @@ case 235: } } break; -case 236: -#line 1577 "pic.y" +case 241: +#line 1603 "pic.y" { yyval.x = yyvsp[-3].x > yyvsp[-1].x ? yyvsp[-3].x : yyvsp[-1].x; } break; -case 237: -#line 1579 "pic.y" +case 242: +#line 1605 "pic.y" { yyval.x = yyvsp[-3].x < yyvsp[-1].x ? yyvsp[-3].x : yyvsp[-1].x; } break; -case 238: -#line 1581 "pic.y" +case 243: +#line 1607 "pic.y" { yyval.x = floor(yyvsp[-1].x); } break; -case 239: -#line 1583 "pic.y" +case 244: +#line 1609 "pic.y" { yyval.x = 1.0 + floor(((rand()&0x7fff)/double(0x7fff))*yyvsp[-1].x); } break; -case 240: -#line 1585 "pic.y" +case 245: +#line 1611 "pic.y" { /* return a random number in the range [0,1) */ /* portable, but not very random */ yyval.x = (rand() & 0x7fff) / double(0x8000); } break; -case 241: -#line 1591 "pic.y" +case 246: +#line 1617 "pic.y" { yyval.x = 0; srand((unsigned int)yyvsp[-1].x); } break; -case 242: -#line 1596 "pic.y" +case 247: +#line 1622 "pic.y" { yyval.x = (yyvsp[-2].x < yyvsp[0].x); } break; -case 243: -#line 1598 "pic.y" +case 248: +#line 1624 "pic.y" { yyval.x = (yyvsp[-2].x <= yyvsp[0].x); } break; -case 244: -#line 1600 "pic.y" +case 249: +#line 1626 "pic.y" { yyval.x = (yyvsp[-2].x > yyvsp[0].x); } break; -case 245: -#line 1602 "pic.y" +case 250: +#line 1628 "pic.y" { yyval.x = (yyvsp[-2].x >= yyvsp[0].x); } break; -case 246: -#line 1604 "pic.y" +case 251: +#line 1630 "pic.y" { yyval.x = (yyvsp[-2].x == yyvsp[0].x); } break; -case 247: -#line 1606 "pic.y" +case 252: +#line 1632 "pic.y" { yyval.x = (yyvsp[-2].x != yyvsp[0].x); } break; -case 248: -#line 1608 "pic.y" +case 253: +#line 1634 "pic.y" { yyval.x = (yyvsp[-2].x != 0.0 && yyvsp[0].x != 0.0); } break; -case 249: -#line 1610 "pic.y" +case 254: +#line 1636 "pic.y" { yyval.x = (yyvsp[-2].x != 0.0 || yyvsp[0].x != 0.0); } break; -case 250: -#line 1612 "pic.y" +case 255: +#line 1638 "pic.y" { yyval.x = (yyvsp[0].x == 0.0); } break; -#line 5571 "y.tab.c" +#line 5632 "y.tab.c" } yyssp -= yym; yystate = *yyssp; diff --git a/contrib/groff-1.19/src/preproc/pic/pic.h b/contrib/groff-1.19/src/preproc/pic/pic.h index 166e4e759a..e3b850a96e 100644 --- a/contrib/groff-1.19/src/preproc/pic/pic.h +++ b/contrib/groff-1.19/src/preproc/pic/pic.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" @@ -25,12 +25,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include -#ifdef NEED_DECLARATION_HYPOT -extern "C" { - double hypot(double, double); -} -#endif /* NEED_DECLARATION_HYPOT */ - #ifdef NEED_DECLARATION_RAND #undef rand extern "C" { diff --git a/contrib/groff-1.19/src/preproc/pic/pic.man b/contrib/groff-1.19/src/preproc/pic/pic.man index 45bc2d62e4..c54cfbef59 100644 --- a/contrib/groff-1.19/src/preproc/pic/pic.man +++ b/contrib/groff-1.19/src/preproc/pic/pic.man @@ -1,5 +1,5 @@ .ig -Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 1989-2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -322,6 +322,16 @@ then .I variable will instead be multiplied by .IR expr3 . +The value of +.I expr3 +can be negative for the additive case; +.I variable +is then tested whether it is greater than or equal to +.IR expr2 . +For the multiplicative case, +.I expr3 +must be greater than zero. +If the constraints aren't met, the loop isn't executed. .I X can be any character not occurring in .IR body . @@ -362,6 +372,25 @@ This has a similar effect to a line beginning with or .BR \e , but allows the values of variables to be passed through. +For example, +.RS +.IP +.ft B +.nf +\&.PS +x = 14 +command ".ds string x is " x "." +\&.PE +\e*[string] +.ft +.fi +.RE +.IP +prints +.RS +.IP +.B x is 14. +.RE . .TP \fBsh\fR \fIX\fR \fIcommand\fR \fIX\fR @@ -522,7 +551,10 @@ print x " " y .RE .IP prints -.BR 5\ 3 . +.RS +.IP +.B 5 3 +.RE . .LP Arguments of the form @@ -625,8 +657,10 @@ where .I dir is the current direction. For example -.IP +.LP +.RS .B line 2i +.RE .LP means draw a line 2\ inches long in the current direction. The `i' (or `I') character is ignored; to use another measurement unit, @@ -645,6 +679,7 @@ Initially these have values 8.5 and 11. Scientific notation is allowed for numbers. For example .RS +.LP .B x = 5e\-2 .RE @@ -653,21 +688,25 @@ x = 5e\-2 Text attributes can be compounded. For example, .RS +.LP .B "foo" above ljust .RE -is legal. +.LP +is valid. . .LP There is no limit to the depth to which blocks can be examined. For example, .RS +.LP .B [A: [B: [C: box ]]] with .A.B.C.sw at 1,2 .br .B circle at last [\^].A.B.C .RE +.LP is acceptable. . .LP @@ -805,7 +844,7 @@ Three additional modifiers are available to specify colored objects: sets the color of the outline, .B shaded the fill color, and -.BR colo [ u ] r [ ed ] +.B colo\fR[\fPu\fR]\fPr\fR[\fPed\fR] sets both. All three keywords expect a suffix specifying the color, for example .RS @@ -974,6 +1013,7 @@ has built-in graphics conversion devices that are called with the option .RE .LP Call +.LP .RS .B gs --help .RE @@ -1052,7 +1092,7 @@ W. Richard Stevens - Examples of picMacros . Input characters that are invalid for .B groff -(ie those with +(i.e., those with .SM ASCII code 0, or 013 octal, or between 015 and 037 octal, or between 0200 and 0237 octal) are rejected even in \*(tx mode. diff --git a/contrib/groff-1.19/src/preproc/pic/pic.y b/contrib/groff-1.19/src/preproc/pic/pic.y index 0bd85c40e8..83d0fe0222 100644 --- a/contrib/groff-1.19/src/preproc/pic/pic.y +++ b/contrib/groff-1.19/src/preproc/pic/pic.y @@ -1,4 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ %{ #include "pic.h" #include "ptable.h" @@ -1135,6 +1135,12 @@ position: $$.x = pos.x; $$.y = pos.y; } + | '(' place ')' + { + position pos = $2; + $$.x = pos.x; + $$.y = pos.y; + } ; position_not_place: @@ -1145,11 +1151,21 @@ position_not_place: $$.x = $1.x + $3.x; $$.y = $1.y + $3.y; } + | '(' position '+' expr_pair ')' + { + $$.x = $2.x + $4.x; + $$.y = $2.y + $4.y; + } | position '-' expr_pair { $$.x = $1.x - $3.x; $$.y = $1.y - $3.y; } + | '(' position '-' expr_pair ')' + { + $$.x = $2.x - $4.x; + $$.y = $2.y - $4.y; + } | '(' position ',' position ')' { $$.x = $2.x; @@ -1160,11 +1176,21 @@ position_not_place: $$.x = (1.0 - $1)*$3.x + $1*$5.x; $$.y = (1.0 - $1)*$3.y + $1*$5.y; } + | '(' expr between position AND position ')' + { + $$.x = (1.0 - $2)*$4.x + $2*$6.x; + $$.y = (1.0 - $2)*$4.y + $2*$6.y; + } | expr '<' position ',' position '>' { $$.x = (1.0 - $1)*$3.x + $1*$5.x; $$.y = (1.0 - $1)*$3.y + $1*$5.y; } + | '(' expr '<' position ',' position '>' ')' + { + $$.x = (1.0 - $2)*$4.x + $2*$6.x; + $$.y = (1.0 - $2)*$4.y + $2*$6.y; + } ; between: diff --git a/contrib/groff-1.19/src/preproc/pic/position.h b/contrib/groff-1.19/src/preproc/pic/position.h index ab7d5469c0..c62e3e7bd0 100644 --- a/contrib/groff-1.19/src/preproc/pic/position.h +++ b/contrib/groff-1.19/src/preproc/pic/position.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ struct place; struct position { diff --git a/contrib/groff-1.19/src/preproc/pic/tex.cpp b/contrib/groff-1.19/src/preproc/pic/tex.cpp index 961c0dcaca..f997b868d6 100644 --- a/contrib/groff-1.19/src/preproc/pic/tex.cpp +++ b/contrib/groff-1.19/src/preproc/pic/tex.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "pic.h" diff --git a/contrib/groff-1.19/src/preproc/pic/troff.cpp b/contrib/groff-1.19/src/preproc/pic/troff.cpp index 22bf897d0a..688ca47b9c 100644 --- a/contrib/groff-1.19/src/preproc/pic/troff.cpp +++ b/contrib/groff-1.19/src/preproc/pic/troff.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "pic.h" #include "common.h" @@ -488,7 +488,7 @@ void troff_output::set_fill(double f) if (last_filled) { free(last_filled); last_filled = 0; - printf("\\M[]\n"); + printf(".fcolor\n"); } } @@ -498,14 +498,14 @@ void troff_output::set_color(char *color_fill, char *color_outlined) if (last_filled || last_outlined) { reset_color(); } - // \m and \M emit a node in compatibility mode only, + // .gcolor and .fcolor emit a node in compatibility mode only, // but that won't work anyway if (color_fill) { - printf("\\M[%s]\n", color_fill); + printf(".fcolor %s\n", color_fill); last_filled = strsave(color_fill); } if (color_outlined) { - printf("\\m[%s]\n", color_outlined); + printf(".gcolor %s\n", color_outlined); last_outlined = strsave(color_outlined); } } @@ -515,12 +515,12 @@ void troff_output::reset_color() { if (driver_extension_flag) { if (last_filled) { - printf("\\M[]\n"); + printf(".fcolor\n"); a_delete last_filled; last_filled = 0; } if (last_outlined) { - printf("\\m[]\n"); + printf(".gcolor\n"); a_delete last_outlined; last_outlined = 0; } diff --git a/contrib/groff-1.19/src/preproc/refer/command.cpp b/contrib/groff-1.19/src/preproc/refer/command.cpp index 6f0e08bef7..441f9534e1 100644 --- a/contrib/groff-1.19/src/preproc/refer/command.cpp +++ b/contrib/groff-1.19/src/preproc/refer/command.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "refer.h" #include "refid.h" diff --git a/contrib/groff-1.19/src/preproc/refer/command.h b/contrib/groff-1.19/src/preproc/refer/command.h index c7085db692..f0472ac8b6 100644 --- a/contrib/groff-1.19/src/preproc/refer/command.h +++ b/contrib/groff-1.19/src/preproc/refer/command.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ void process_commands(const char *file); void process_commands(string &s, const char *file, int lineno); diff --git a/contrib/groff-1.19/src/preproc/refer/label.y b/contrib/groff-1.19/src/preproc/refer/label.y index eee05b8161..d76f95ef3c 100644 --- a/contrib/groff-1.19/src/preproc/refer/label.y +++ b/contrib/groff-1.19/src/preproc/refer/label.y @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ %{ diff --git a/contrib/groff-1.19/src/preproc/refer/ref.cpp b/contrib/groff-1.19/src/preproc/refer/ref.cpp index 857341a1bc..59c69d52b6 100644 --- a/contrib/groff-1.19/src/preproc/refer/ref.cpp +++ b/contrib/groff-1.19/src/preproc/refer/ref.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "refer.h" #include "refid.h" diff --git a/contrib/groff-1.19/src/preproc/refer/ref.h b/contrib/groff-1.19/src/preproc/refer/ref.h index 13a984a4c7..ffb81ac869 100644 --- a/contrib/groff-1.19/src/preproc/refer/ref.h +++ b/contrib/groff-1.19/src/preproc/refer/ref.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -16,7 +16,15 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ + +// declarations to avoid friend name injection problems +int compare_reference(const reference &, const reference &); +int same_reference(const reference &, const reference &); +int same_year(const reference &, const reference &); +int same_date(const reference &, const reference &); +int same_author_last_name(const reference &, const reference &, int); +int same_author_name(const reference &, const reference &, int); struct label_info; diff --git a/contrib/groff-1.19/src/preproc/refer/refer.cpp b/contrib/groff-1.19/src/preproc/refer/refer.cpp index 33df35ca44..66afa4b385 100644 --- a/contrib/groff-1.19/src/preproc/refer/refer.cpp +++ b/contrib/groff-1.19/src/preproc/refer/refer.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1989-1992, 2000, 2001, 2002, 2004 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -16,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "refer.h" #include "refid.h" @@ -938,6 +939,12 @@ int rcompare(const void *p1, const void *p2) void output_references() { assert(accumulate); + if (!hash_table_size) { + error("nothing to reference (probably `bibliography' before `sort')"); + accumulate = 0; + nreferences = 0; + return; + } if (nreferences > 0) { int j = 0; int i; diff --git a/contrib/groff-1.19/src/preproc/refer/refer.h b/contrib/groff-1.19/src/preproc/refer/refer.h index dff6bcca6a..ac871cfae7 100644 --- a/contrib/groff-1.19/src/preproc/refer/refer.h +++ b/contrib/groff-1.19/src/preproc/refer/refer.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/preproc/refer/refer.man b/contrib/groff-1.19/src/preproc/refer/refer.man index d39d85d859..0881657d40 100644 --- a/contrib/groff-1.19/src/preproc/refer/refer.man +++ b/contrib/groff-1.19/src/preproc/refer/refer.man @@ -1,5 +1,6 @@ .ig -Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -16,23 +17,37 @@ versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. .. +. +. .de TQ -.br -.ns -.TP \\$1 +. 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" +. ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +. el .TP "\\$1" +. +. .. .\" The BSD man macros can't handle " in arguments to font change macros, .\" so use \(ts instead of ". .tr \(ts" +. +. .TH @G@REFER @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +. +. +. .SH NAME @g@refer \- preprocess bibliographic references for groff +. +. +. .SH SYNOPSIS .nr a \n(.j .ad l @@ -40,10 +55,12 @@ the original English. .in +\w'\fB@g@refer 'u .ti \niu .B @g@refer +. .de OP -.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" -.el .RB "[\ " "\\$1" "\ ]" +. ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" +. el .RB "[\ " "\\$1" "\ ]" .. +. .OP \-benvCPRS .OP \-a n .OP \-c fields @@ -51,16 +68,20 @@ the original English. .OP \-i fields .OP \-k field .OP \-l m,n -.OP \-p filename +.OP \-p \%filename .OP \-s fields .OP \-t n .OP \-B field.macro -.RI [\ filename \|.\|.\|.\ ] +.RI [\ \%filename \|.\|.\|.\ ] .br .ad \na -.PP +. +.LP It is possible to have whitespace between a command line option and its parameter. +. +. +. .SH DESCRIPTION This file documents the GNU version of .BR refer , @@ -72,13 +93,14 @@ to the standard output, except that lines between .B .[ and -.B .] +.B .]\& are interpreted as citations, and lines between .B .R1 and .B .R2 are interpreted as commands about how citations are to be processed. +. .LP Each citation specifies a reference. The citation can specify a reference that is contained in @@ -87,6 +109,7 @@ that only that reference contains. Alternatively it can specify a reference by supplying a database record in the citation. A combination of these alternatives is also possible. +. .LP For each citation, .B refer @@ -111,14 +134,17 @@ or the references may be accumulated, and the commands output at some later point. If the references are accumulated, then multiple citations of the same reference will produce a single formatted reference. +. .LP The interpretation of lines between .B .R1 and .B .R2 -as commands is a new feature of GNU refer. +as commands is a new feature of GNU +.BR refer . Documents making use of this feature can still be processed by Unix refer just by adding the lines +. .RS .LP .nf @@ -129,6 +155,7 @@ Unix refer just by adding the lines .ft .fi .RE +. to the beginning of the document. This will cause .B troff @@ -139,6 +166,7 @@ and The effect of some commands can also be achieved by options. These options are supported mainly for compatibility with Unix refer. It is usually more convenient to use commands. +. .LP .B refer generates @@ -154,110 +182,145 @@ so that filenames and line numbers in the messages and lines that it produces will be accurate even if the input has been preprocessed by a command such as .BR @g@soelim (@MAN1EXT@). +. +. +. .SH OPTIONS +. .LP Most options are equivalent to commands (for a description of these commands see the .B Commands subsection): +. +.nr a \n(.j +.ad l .TP .B \-b -.B -no-label-in-text; no-label-in-reference +.B "no-label-in-text; no-label-in-reference" +. .TP .B \-e .B accumulate +. .TP .B \-n .B no-default-database +. .TP .B \-C .B compatible +. .TP .B \-P .B move-punctuation +. .TP .B \-S .B -label "(A.n|Q) ', ' (D.y|D)"; bracket-label " (" ) "; " +label\ "(A.n|Q)\ ',\ '\ (D.y|D)"; \%bracket-label\ "\ ("\ )\ ";\ " +. .TP .BI \-a n .B reverse .BI A n +. .TP .BI \-c fields .B capitalize .I fields +. .TP .BI \-f n .B label .BI % n +. .TP .BI \-i fields .B search-ignore .I fields +. .TP .B \-k .B label .B L\(ti%a +. .TP .BI \-k field .B label .IB field \(ti%a +. .TP .B \-l .B label .BI A.nD.y%a +. .TP .BI \-l m .B label .BI A.n+ m D.y%a +. .TP .BI \-l, n .B label .BI A.nD.y\- n %a +. .TP .BI \-l m , n .B label .BI A.n+ m D.y\- n %a +. .TP .BI \-p filename .B database .I filename +. .TP .BI \-s spec .B sort .I spec +. .TP .BI \-t n .B search-truncate .I n +.ad \na +. .LP These options are equivalent to the following commands with the addition that the filenames specified on the command line are processed as if they were arguments to the .B bibliography command instead of in the normal way: +. .TP .B \-B -.B -annotate X AP; no-label-in-reference +.B "annotate X AP; no-label-in-reference" +. .TP .BI \-B field . macro .B annotate .I field .IB macro ; .B no-label-in-reference +. .LP The following options have no equivalent commands: +. .TP .B \-v Print the version number. +. .TP .B \-R Don't recognize lines beginning with .BR .R1 / .R2 . +. +. +. .SH USAGE +. +. .SS Bibliographic databases The bibliographic database is a text file consisting of records separated by one or more blank lines. @@ -272,11 +335,12 @@ The name of the field should be followed by exactly one space, and then by the contents of the field. Empty fields are ignored. The conventional meaning of each field is as follows: +. .TP .B A The name of an author. If the name contains a title such as -.B Jr. +.B Jr.\& at the end, it should be separated from the last name by a comma. There can be multiple occurrences of the @@ -285,15 +349,18 @@ field. The order is significant. It is a good idea always to supply an .B A -field or a +field or a .B Q field. +. .TP .B B For an article that is part of a book, the title of the book. +. .TP .B C The place (city) of publication. +. .TP .B D The date of publication. @@ -308,6 +375,7 @@ if the date is unknown, a value such as or .B unknown can be used. +. .TP .B E For an article that is part of a book, the name of an editor of the book. @@ -319,33 +387,42 @@ fields and or .B ,\ (eds) should be appended to the last author. +. .TP .B G US Government ordering number. +. .TP .B I The publisher (issuer). +. .TP .B J For an article in a journal, the name of the journal. +. .TP .B K Keywords to be used for searching. +. .TP .B L Label. +. .TP .B N Journal issue number. +. .TP .B O Other information. This is usually printed at the end of the reference. +. .TP .B P Page number. A range of pages can be specified as .IB m \- n\fR. +. .TP .B Q The name of the author, if the author is not a person. @@ -355,23 +432,29 @@ fields. There can only be one .B Q field. +. .TP .B R Technical report number. +. .TP .B S Series name. +. .TP .B T Title. For an article in a book or journal, this should be the title of the article. +. .TP .B V Volume number of the journal or book. +. .TP .B X Annotation. +. .LP For all fields except .B A @@ -379,6 +462,7 @@ and .BR E , if there is more than one occurrence of a particular field in a record, only the last such field will be used. +. .LP If accent strings are used, they should follow the character to be accented. This means that the @@ -390,18 +474,21 @@ Accent strings should not be quoted: use one .B \e rather than two. +. +. .SS Citations The format of a citation is +. .RS .BI .[ opening-text .br -.I -flags keywords +.I "flags keywords" .br .I fields .br .BI .] closing-text .RE +. .LP The .IR opening-text , @@ -414,6 +501,7 @@ Only one of the and .I fields components need be specified. +. .LP The .I keywords @@ -421,6 +509,7 @@ component says to search the bibliographic databases for a reference that contains all the words in .IR keywords . It is an error if more than one reference if found. +. .LP The .I fields @@ -432,6 +521,7 @@ component is non-empty, then additional fields should be specified only on the first occasion that a particular reference is cited, and will apply to all citations of that reference. +. .LP The .I opening-text @@ -451,6 +541,7 @@ and .B ] flags. Note that leading and trailing spaces are significant for these components. +. .LP The .I flags @@ -460,6 +551,7 @@ of this particular citation. Unix refer will treat these flags as part of the keywords and so will ignore them since they are non-alphanumeric. The following flags are currently recognized: +. .TP .B # This says to use the label specified by the @@ -474,6 +566,7 @@ and consists of only the date and possibly a disambiguating letter; the .B # is supposed to be suggestive of a numeric type of label. +. .TP .B [ Precede @@ -481,6 +574,7 @@ Precede with the first string specified in the .B bracket-label command. +. .TP .B ] Follow @@ -488,6 +582,7 @@ Follow with the second string specified in the .B bracket-label command. +. .LP One advantages of using the .B [ @@ -503,6 +598,7 @@ you can change the style of bracket used in the document just by changing the command. Another advantage is that sorting and merging of citations will not necessarily be inhibited if the flags are used. +. .LP If a label is to be inserted into the text, it will be attached to the line preceding the @@ -511,6 +607,7 @@ line. If there is no such line, then an extra line will be inserted before the .B .[ line and a warning will be given. +. .LP There is no special notation for making a citation to multiple references. Just use a sequence of citations, one for each reference. @@ -546,6 +643,8 @@ is non-empty. (If you wish to prevent this just make the first citation's .I closing-text .BR \e& .) +. +. .SS Commands Commands are contained between lines starting with .B .R1 @@ -564,8 +663,9 @@ nor lines, nor anything between them is output. +. .LP -Commands are separated by newlines or +Commands are separated by newlines or .BR ; s. .B # introduces a comment that extends to the end of the line @@ -597,6 +697,7 @@ A line can be continued by ending it with .BR \e ; this works everywhere except after a .BR # . +. .LP .ds n \fR* Each command @@ -609,6 +710,7 @@ For example, the .B no-sort command specifies that references should not be sorted. The negative commands take no arguments. +. .LP In the following description each argument must be a single word; .I field @@ -623,6 +725,7 @@ are used for a non-negative numbers; is used for an arbitrary string; .I filename is used for the name of a file. +. .Tp \w'\fBabbreviate-label-ranges'u+2n .BI abbreviate\*n\ fields\ string1\ string2\ string3\ string4 Abbreviate the first names of @@ -647,6 +750,7 @@ No attempt is made to handle any ambiguities that might result from abbreviation. Names are abbreviated before sorting and before label construction. +. .TP .BI abbreviate-label-ranges\*n\ string Three or more adjacent labels that refer to consecutive references @@ -659,12 +763,14 @@ If .I string is omitted it defaults to .BR \- . +. .TP .B accumulate\*n Accumulate references instead of writing out each reference as it is encountered. Accumulated references will be written out whenever a reference of the form +. .RS .IP .B .[ @@ -672,6 +778,7 @@ of the form .B $LIST$ .br .B .] +. .LP is encountered, after all input files hve been processed, @@ -679,14 +786,17 @@ and whenever .B .R1 line is recognized. .RE +. .TP .BI annotate\*n\ field\ string .I field is an annotation; print it at the end of the reference as a paragraph preceded by the line +. .RS .IP .BI . string +. .LP If .I macro @@ -698,9 +808,10 @@ is also omitted it will default to .BR X . Only one field can be an annotation. .RE +. .TP -.BI articles\ string \fR\|.\|.\|. -.IR string \|.\|.\|. +.BI articles\ string \fR\|.\|.\|. +.IR string \|.\|.\|.\& are definite or indefinite articles, and should be ignored at the beginning of .B T fields when sorting. @@ -709,11 +820,16 @@ Initially, .B a and .B an -are recognized as articles. +are recognized as articles. +. .TP .BI bibliography\ filename \fR\|.\|.\|. Write out all the references contained in the bibliographic databases .IR filename \|.\|.\|. +This command should come last in a +.BR .R1 / .R2 +block. +. .TP .BI bracket-label\ string1\ string2\ string3 In the text, bracket each label @@ -728,16 +844,19 @@ immediately followed by will be turned into .IR string3 . The default behaviour is +. .RS .IP .B bracket-label \e*([. \e*(.] ", " .RE +. .TP .BI capitalize\ fields Convert .I fields to caps and small caps. +. .TP .B compatible\*n Recognize @@ -745,6 +864,7 @@ Recognize and .B .R2 even when followed by a character other than space or newline. +. .TP .BI database\ filename \fR\|.\|.\|. Search the bibliographic databases @@ -757,6 +877,7 @@ created by .BR @g@indxbib (@MAN1EXT@) exists, then it will be searched instead; each index can cover multiple databases. +. .TP .BI date-as-label\*n\ string .I string @@ -775,26 +896,30 @@ In most cases you should also use the .B no-label-in-reference command. For example, +. .RS .IP -.B -date-as-label D.+yD.y%a*D.-y +.B "date-as-label D.+yD.y%a*D.-y" +. .LP would attach a disambiguating letter to the year part of the .B D field in the reference. .RE +. .TP .B default-database\*n The default database should be searched. This is the default behaviour, so the negative version of this command is more useful. -refer determines whether the default database should be searched +.B refer +determines whether the default database should be searched on the first occasion that it needs to do a search. Thus a .B no-default-database command must be given before then, in order to be effective. +. .TP .BI discard\*n\ fields When the reference is read, @@ -807,11 +932,11 @@ Initially, .I fields are .BR XYZ . +. .TP .BI et-al\*n\ string\ m\ n Control use of -.B -et al +.B "et al" in the evaluation of .B @ expressions in label expressions. @@ -833,16 +958,19 @@ and is not less than .IR n . The default behaviour is +. .RS .IP .B et-al " et al" 2 3 .RE +. .TP .BI include\ filename Include .I filename and interpret the contents as commands. +. .TP .BI join-authors\ string1\ string2\ string3 This says how authors should be joined together. @@ -863,13 +991,16 @@ if is also omitted it will also default to .IR string1 . For example, +. .RS .IP .B join-authors " and " ", " ", and " +. .LP will restore the default method for joining authors. .RE +. .TP .B label-in-reference\*n When outputting the reference, @@ -878,6 +1009,7 @@ define the string to be the reference's label. This is the default behaviour; so the negative version of this command is more useful. +. .TP .B label-in-text\*n For each reference output a label in the text. @@ -886,10 +1018,12 @@ The label will be separated from the surrounding text as described in the command. This is the default behaviour; so the negative version of this command is more useful. +. .TP .BI label\ string .I string is a label expression describing how to label each reference. +. .TP .BI separate-label-second-parts\ string When merging two-part labels, separate the second part of the second @@ -898,11 +1032,13 @@ label from the first label with See the description of the .B <> label expression. +. .TP .B move-punctuation\*n In the text, move any punctuation at the end of line past the label. It is usually a good idea to give this command unless you are using superscripted numbers as labels. +. .TP .BI reverse\*n\ string Reverse the fields whose names @@ -911,6 +1047,7 @@ are in Each field name can be followed by a number which says how many such fields should be reversed. If no number is given for a field, all such fields will be reversed. +. .TP .BI search-ignore\*n\ fields While searching for keys in databases for which no index exists, @@ -919,6 +1056,7 @@ ignore the contents of Initially, fields .B XYZ are ignored. +. .TP .BI search-truncate\*n\ n Only require the first @@ -930,7 +1068,8 @@ words in the database are truncated to the maximum of and the length of the key. Initially .I n -is 6. +is\ 6. +. .TP .BI short-label\*n\ string .I string @@ -946,6 +1085,7 @@ The .B short-label command will typically be used to specify a label containing just a date and possibly a disambiguating letter. +. .TP .BI sort\*n\ string Sort references according to @@ -956,14 +1096,14 @@ should be a list of field names, each followed by a number, indicating how many fields with the name should be used for sorting. .B + can be used to indicate that all the fields with the name should be used. -Also -.B . +Also +.B .\& can be used to indicate the references should be sorted using the (tentative) label. (The -.B -Label expressions +.B "Label expressions" subsection describes the concept of a tentative label.) +. .TP .B sort-adjacent-labels\*n Sort labels that are adjacent in the text according to their @@ -975,13 +1115,15 @@ or if the label expression contains a .B <> expression. This will have no effect unless references are being accumulated. +. +. .SS Label expressions +. .LP -Label expressions can be evaluated both normally and tentatively. -The result of normal evaluation is used for output. +Label expressions can be evaluated both normally and tentatively. +The result of normal evaluation is used for output. The result of tentative evaluation, called the -.I -tentative label, +.IR "tentative label" , is used to gather the information that normal evaluation needs to disambiguate the label. Label expressions specified by the @@ -995,9 +1137,10 @@ of expression other than .BR * , and .B % -expressions. +expressions. The description below applies to normal evaluation, -except where otherwise specified. +except where otherwise specified. +. .TP .I field .TQ @@ -1005,15 +1148,17 @@ except where otherwise specified. The .IR n -th part of -.IR field . +.IR field . If .I n -is omitted, it defaults to 1. +is omitted, it defaults to\ 1. +. .TP .BI ' string ' The characters in .I string -literally. +literally. +. .TP .B @ All the authors joined as specified by the @@ -1056,6 +1201,7 @@ met before an initial subsequence can be used. tentatively evaluates to a canonical representation of the authors, such that authors that compare equally for sorting purpose will have the same representation. +. .TP .BI % n .TQ @@ -1068,10 +1214,11 @@ will have the same representation. .B %I The serial number of the reference formatted according to the character following the -.BR % . -The serial number of a reference is 1 plus the number of earlier references +.BR % . +The serial number of a reference is\ 1 plus the number of earlier references with same tentative label as this reference. These expressions tentatively evaluate to an empty string. +. .TP .IB expr * If there is another reference with the same tentative label as @@ -1079,6 +1226,7 @@ this reference, then .IR expr , otherwise an empty string. It tentatively evaluates to an empty string. +. .TP .IB expr + n .TQ @@ -1094,22 +1242,27 @@ Troff special characters (such as .BR \e('a ) count as a single letter. Accent strings are retained but do not count towards the total. +. .TP .IB expr .l .I expr -converted to lowercase. +converted to lowercase. +. .TP .IB expr .u .I expr -converted to uppercase. +converted to uppercase. +. .TP .IB expr .c .I expr -converted to caps and small caps. +converted to caps and small caps. +. .TP .IB expr .r .I expr reversed so that the last name is first. +. .TP .IB expr .a .I expr @@ -1121,10 +1274,12 @@ Thus .B .a is useful only when you want a field to be abbreviated in a label but not in a reference. +. .TP .IB expr .y The year part of -.IR expr . +.IR expr . +. .TP .IB expr .+y The part of @@ -1132,6 +1287,7 @@ The part of before the year, or the whole of .I expr if it does not contain a year. +. .TP .IB expr .\-y The part of @@ -1139,10 +1295,12 @@ The part of after the year, or an empty string if .I expr does not contain a year. +. .TP .IB expr .n The last name part of -.IR expr . +.IR expr . +. .TP .IB expr1 \(ti expr2 .I expr1 @@ -1151,13 +1309,15 @@ except that if the last character of is .B \- then it will be replaced by -.IR expr2 . +.IR expr2 . +. .TP .I expr1\ expr2 The concatenation of .I expr1 and -.IR expr2 . +.IR expr2 . +. .TP .IB expr1 | expr2 If @@ -1165,7 +1325,8 @@ If is non-empty then .I expr1 otherwise -.IR expr2 . +.IR expr2 . +. .TP .IB expr1 & expr2 If @@ -1174,6 +1335,7 @@ is non-empty then .I expr2 otherwise an empty string. +. .TP .IB expr1 ? expr2 : expr3 If @@ -1182,7 +1344,8 @@ is non-empty then .I expr2 otherwise -.IR expr3 . +.IR expr3 . +. .TP .BI < expr > The label is in two parts, which are separated by @@ -1198,11 +1361,13 @@ Note that it is permissible for the first part to be empty; this maybe desirable for expressions used in the .B short-label command. +. .TP .BI ( expr ) The same as .IR expr . Used for grouping. +. .LP The above expressions are listed in order of precedence (highest first); @@ -1210,6 +1375,8 @@ The above expressions are listed in order of precedence and .B | have the same precedence. +. +. .SS Macro interface Each reference starts with a call to the macro .BR ]- . @@ -1227,7 +1394,7 @@ corresponds to field .IR X . The number register .B [P -is set to 1 if the +is set to\ 1 if the .B P field contains a range of pages. The @@ -1235,7 +1402,7 @@ The .B [A and .B [O -number registers are set to 1 according as the +number registers are set to\ 1 according as the .BR T , .B A and @@ -1244,7 +1411,7 @@ fields end with one of the characters .BR .?! . The .B [E -number register will be set to 1 if the +number register will be set to\ 1 if the .B [E string contains more than one name. The reference is followed by a call to the @@ -1254,19 +1421,19 @@ The first argument to this macro gives a number representing the type of the reference. If a reference contains a .B J -field, it will be classified as type 1, +field, it will be classified as type\ 1, otherwise if it contains a .B B -field, it will type 3, +field, it will type\ 3, otherwise if it contains a .B G or .B R -field it will be type 4, +field it will be type\ 4, otherwise if contains a .B I -field it will be type 2, -otherwise it will be type 0. +field it will be type\ 2, +otherwise it will be type\ 0. The second argument is a symbolic name for the type: .BR other , .BR journal-article , @@ -1282,22 +1449,37 @@ command are preceded by a call to the macro and followed by a call to the .B ]> macro. +. +. +. .SH FILES +. .Tp \w'\fB@DEFAULT_INDEX@'u+2n .B @DEFAULT_INDEX@ Default database. +. .TP .IB file @INDEX_SUFFIX@ Index files. +. +. +. .SH ENVIRONMENT +. .Tp \w'\fBREFER'u+2n .B REFER If set, overrides the default database. +. +. +. .SH "SEE ALSO" .BR @g@indxbib (@MAN1EXT@), .BR @g@lookbib (@MAN1EXT@), .BR lkbib (@MAN1EXT@) .br +. +. +. .SH BUGS In label expressions, .B <> diff --git a/contrib/groff-1.19/src/preproc/refer/token.cpp b/contrib/groff-1.19/src/preproc/refer/token.cpp index e9fac5df3f..1eb30062f8 100644 --- a/contrib/groff-1.19/src/preproc/refer/token.cpp +++ b/contrib/groff-1.19/src/preproc/refer/token.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "refer.h" #include "token.h" diff --git a/contrib/groff-1.19/src/preproc/refer/token.h b/contrib/groff-1.19/src/preproc/refer/token.h index 6da430d6ab..7d3404942f 100644 --- a/contrib/groff-1.19/src/preproc/refer/token.h +++ b/contrib/groff-1.19/src/preproc/refer/token.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ enum token_type { TOKEN_OTHER, diff --git a/contrib/groff-1.19/src/preproc/soelim/soelim.cpp b/contrib/groff-1.19/src/preproc/soelim/soelim.cpp index 733fe3c6e3..235dfe6644 100644 --- a/contrib/groff-1.19/src/preproc/soelim/soelim.cpp +++ b/contrib/groff-1.19/src/preproc/soelim/soelim.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001, 2003, 2004 +/* Copyright (C) 1989-1992, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" @@ -159,12 +159,12 @@ int do_file(const char *filename) &file_name_in_path); int err = errno; string whole_filename(file_name_in_path ? file_name_in_path : filename); + whole_filename += '\0'; a_delete file_name_in_path; if (fp == 0) { error("can't open `%1': %2", whole_filename.contents(), strerror(err)); return 0; } - whole_filename += '\0'; current_filename = whole_filename.contents(); current_lineno = 1; set_location(); diff --git a/contrib/groff-1.19/src/preproc/soelim/soelim.man b/contrib/groff-1.19/src/preproc/soelim/soelim.man index f68e0b0bad..fb17e3644f 100644 --- a/contrib/groff-1.19/src/preproc/soelim/soelim.man +++ b/contrib/groff-1.19/src/preproc/soelim/soelim.man @@ -1,5 +1,6 @@ +'\" p .ig -Copyright (C) 1989-2000, 2001, 2003 Free Software Foundation, Inc. +Copyright (C) 1989-2000, 2001, 2003, 2004 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -16,6 +17,9 @@ versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. .. +. +.mso pic.tmac +. .TH @G@SOELIM @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" . .SH NAME @@ -99,6 +103,111 @@ the current file and line number. .B \-v Print the version number. . +.SH USAGE +The normal processing sequence of groff is this: +. +.PP +.ie t \{\ +.PS +box invisible width 0.5 height 0.4 "input" "file"; +move to last box .bottom; +down; +arrow 0.3; +box invisible width 0.8 height 0.2 "preprocessor"; +move to last box .right +right; +arrow 0.3; +A: box invisible width 0.35 height 0.2 "troff"; +move to last box .top; +up; +move 0.3; +box invisible width 0.6 height 0.4 "sourced" "file"; +line <- up 0.3 from A.top; +move to A.right; +right; +arrow 0.3; +box invisible width 0.85 height 0.2 "postprocessor"; +move to last box .bottom; +down; +arrow 0.3; +box invisible width 0.5 height 0.4 "output" "file" +.PE +.\} +.el \{\ +.nf + input sourced + file file + | | + v v + preprocessor -> troff -> postprocessor + | + v + output + file +.fi +.\} +.PP +. +That is, files sourced with +.B .so +are normally read +.I only +by +.B troff +(the actual formatter). +.B soelim +is +.I not +required for +.B troff +to source files. +. +.PP +If a file to be sourced should also be preprocessed, it must +already be read +.I before +the input file passes through the preprocessor. +This is handled by +.BR soelim : +. +.PP +.ie t \{\ +.PS +box invisible width 0.5 height 0.4 "input" "file"; +move to last box .bottom; +down; +arrow 0.3; +A: box invisible width 0.5 height 0.2 "soelim"; +line <- 0.3; +box invisible width 0.5 height 0.4 "sourced" "file"; +move to A.right; +right; +arrow 0.3; +box invisible width 0.8 height 0.2 "preprocessor"; +arrow 0.3; +box invisible width 0.35 height 0.2 "troff"; +arrow 0.3 +box invisible width 0.85 height 0.2 "postprocessor"; +move to last box .bottom; +down; +arrow 0.3; +box invisible width 0.5 height 0.4 "output" "file" +.PE +.\} +.el \{\ +.nf + input + file + | + v + soelim -> preprocessor -> troff -> postprocessor + ^ | + | v + sourced output + file file +.fi +.\} +. .SH "SEE ALSO" .BR groff (@MAN1EXT@) . diff --git a/contrib/groff-1.19/src/preproc/tbl/main.cpp b/contrib/groff-1.19/src/preproc/tbl/main.cpp index 2cda70669b..d79adb0bf8 100644 --- a/contrib/groff-1.19/src/preproc/tbl/main.cpp +++ b/contrib/groff-1.19/src/preproc/tbl/main.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "table.h" @@ -26,11 +26,14 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ extern "C" const char *Version_string; -static int compatible_flag = 0; +int compatible_flag = 0; class table_input { FILE *fp; - enum { START, MIDDLE, REREAD_T, REREAD_TE, REREAD_E, END, ERROR } state; + enum { START, MIDDLE, + REREAD_T, REREAD_TE, REREAD_E, + LEADER_1, LEADER_2, LEADER_3, LEADER_4, + END, ERROR } state; string unget_stack; public: table_input(FILE *); @@ -117,11 +120,15 @@ int table_input::get() } break; case MIDDLE: - // handle line continuation + // handle line continuation and uninterpreted leader character if ((c = getc(fp)) == '\\') { c = getc(fp); if (c == '\n') c = getc(fp); // perhaps state ought to be START now + else if (c == 'a' && compatible_flag) { + state = LEADER_1; + return '\\'; + } else { if (c != EOF) ungetc(c, fp); @@ -152,6 +159,18 @@ int table_input::get() case REREAD_E: state = MIDDLE; return 'E'; + case LEADER_1: + state = LEADER_2; + return '*'; + case LEADER_2: + state = LEADER_3; + return '('; + case LEADER_3: + state = LEADER_4; + return PREFIX_CHAR; + case LEADER_4: + state = MIDDLE; + return LEADER_CHAR; case END: case ERROR: return EOF; @@ -1334,13 +1353,19 @@ table *process_data(table_input &in, format *f, options *opt) } break; case GOT_RIGHT_BRACE: + if ((opt->flags & table::NOSPACES)) { + while (c == ' ') + c = in.get(); + if (c == EOF) + break; + } if (c == '\n' || c == tab_char) state = END; else { input_entry += 'T'; input_entry += '}'; input_entry += c; - state = c == '\n' ? START : MIDDLE; + state = MIDDLE; } break; case MIDDLE: @@ -1467,7 +1492,6 @@ table *process_data(table_input &in, format *f, options *opt) void process_table(table_input &in) { - int c; options *opt = 0; format *form = 0; table *tbl = 0; @@ -1479,7 +1503,7 @@ void process_table(table_input &in) } else { error("giving up on this table"); - while ((c = in.get()) != EOF) + while (in.get() != EOF) ; } delete opt; @@ -1543,10 +1567,8 @@ int main(int argc, char **argv) else { errno = 0; FILE *fp = fopen(argv[i], "r"); - if (fp == 0) { - current_lineno = -1; - error("can't open `%1': %2", argv[i], strerror(errno)); - } + if (fp == 0) + fatal("can't open `%1': %2", argv[i], strerror(errno)); else { current_lineno = 1; current_filename = argv[i]; diff --git a/contrib/groff-1.19/src/preproc/tbl/table.cpp b/contrib/groff-1.19/src/preproc/tbl/table.cpp index 906d34ffe6..8312386aaf 100644 --- a/contrib/groff-1.19/src/preproc/tbl/table.cpp +++ b/contrib/groff-1.19/src/preproc/tbl/table.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "table.h" @@ -30,7 +30,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ const int DEFAULT_COLUMN_SEPARATION = 3; #define DELIMITER_CHAR "\\[tbl]" -#define PREFIX "3" #define SEPARATION_FACTOR_REG PREFIX "sep" #define BOTTOM_REG PREFIX "bot" #define RESET_MACRO_NAME PREFIX "init" @@ -64,6 +63,8 @@ const int DEFAULT_COLUMN_SEPARATION = 3; // this must be one character #define COMPATIBLE_REG PREFIX "c" +#define LEADER_REG PREFIX LEADER + #define BLOCK_WIDTH_PREFIX PREFIX "tbw" #define BLOCK_DIVERSION_PREFIX PREFIX "tbd" #define BLOCK_HEIGHT_PREFIX PREFIX "tbh" @@ -1695,6 +1696,8 @@ void table::init_output() prints(".nr " LINESIZE_REG " \\n[.s]\n"); if (!(flags & CENTER)) prints(".nr " SAVED_CENTER_REG " \\n[.ce]\n"); + if (compatible_flag) + prints(".ds " LEADER_REG " \\a\n"); prints(".de " RESET_MACRO_NAME "\n" ".ft \\n[.f]\n" ".ps \\n[.s]\n" @@ -2604,8 +2607,14 @@ void table::do_row(int r) if (e) { if (e->end_row == r && e->start_row == i) { simple_entry *simple = e->to_simple_entry(); - if (simple) + if (simple) { + if (e->end_row != e->start_row) { + prints('\n'); + simple->position_vertically(); + prints("\\&"); + } simple->simple_print(0); + } } c = e->end_col; } diff --git a/contrib/groff-1.19/src/preproc/tbl/table.h b/contrib/groff-1.19/src/preproc/tbl/table.h index 8ce3c922d0..4b2497e215 100644 --- a/contrib/groff-1.19/src/preproc/tbl/table.h +++ b/contrib/groff-1.19/src/preproc/tbl/table.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" @@ -32,6 +32,14 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "errarg.h" #include "error.h" +// PREFIX and PREFIX_CHAR must be the same. +#define PREFIX "3" +#define PREFIX_CHAR '3' + +// LEADER and LEADER_CHAR must be the same. +#define LEADER "a" +#define LEADER_CHAR 'a' + struct inc_number { short inc; short val; @@ -153,3 +161,5 @@ public: }; void set_troff_location(const char *, int); + +extern int compatible_flag; diff --git a/contrib/groff-1.19/src/preproc/tbl/tbl.man b/contrib/groff-1.19/src/preproc/tbl/tbl.man index 611e14f27b..00dfe4f830 100644 --- a/contrib/groff-1.19/src/preproc/tbl/tbl.man +++ b/contrib/groff-1.19/src/preproc/tbl/tbl.man @@ -63,11 +63,13 @@ will cause the standard input to be read. .SH OPTIONS .TP .B \-C -Recognize +Enable compatibility mode to +recognize .B .TS and .B .TE even when followed by a character other than space or newline. +Leader characters (\[rs]a) are handled as interpreted. .TP .B \-v Print the version number. @@ -456,7 +458,8 @@ and use instead of .BR bp . .LP -Using \ea directly in a table to get leaders will not work. +Using \ea directly in a table to get leaders will not work (except in +compatibility mode). This is correct behaviour: \ea is an .B uninterpreted leader. diff --git a/contrib/groff-1.19/src/roff/groff/groff.cpp b/contrib/groff-1.19/src/roff/groff/groff.cpp index e1aae62ba4..5e18757352 100644 --- a/contrib/groff-1.19/src/roff/groff/groff.cpp +++ b/contrib/groff-1.19/src/roff/groff/groff.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ // A front end for groff. diff --git a/contrib/groff-1.19/src/roff/groff/groff.man b/contrib/groff-1.19/src/roff/groff/groff.man index e3bf09466b..9e6a4ace07 100644 --- a/contrib/groff-1.19/src/roff/groff/groff.man +++ b/contrib/groff-1.19/src/roff/groff/groff.man @@ -1,9 +1,9 @@ .ig groff.man -Last update: 13 Jan 2004 +Last update: 01 Jul 2005 -Copyright (C) 1989, 2002, 2003, 2004 Free Software Foundation, Inc. +Copyright (C) 1989, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Rewritten in 2002 by Bernd Warken Permission is granted to copy, distribute and/or modify this document @@ -461,7 +461,7 @@ or because groff does not prepend any dashes before passing it to the postprocessor. . -For example, to pass a title to the gxditview postprocessor, the shell +For example, to pass a title to the \%gxditview postprocessor, the shell command .IP .ShellCommand groff \*[@-]X \*[@-]P \*[@-]title \*[@-]P 'groff it' \f[I]foo\f[] @@ -520,12 +520,21 @@ Preprocess with .OptDef T "" dev Set output device to .IR dev . -Contrary to -.BR @g@troff , +For this device, +.B @g@troff +generates the +.I intermediate +.IR output ; +see +.BR \%groff_out (@MAN5EXT@). +. +Then .B groff calls a postprocessor to convert .BR @g@troff 's -intermediate output to its final format. +.I intermediate output +to its final format. +. Real devices in .B groff are @@ -576,7 +585,7 @@ Unicode character set in \%UTF-8 encoding. . .IP The following arguments select -.B gxditview +.B \%gxditview as the `postprocessor' (it is rather a viewing program): . .RS @@ -623,7 +632,7 @@ the commands will be both printed on the standard error and run. . .OptDef X Use -.B gxditview +.B \%gxditview instead of using the usual postprocessor to (pre)view a document. . The printing spooler behavior as outlined with options @@ -655,7 +664,7 @@ The default resolution for previewing output is 75\|dpi; this can be changed by passing the .ShortOpt resolution option to -.BR gxditview , +.BR \%gxditview , for example . .IP @@ -669,13 +678,19 @@ Only error messages will be printed. . . .OptDef Z -Do not postprocess the output of -.B @g@troff -that is normally -called automatically by -.BR groff . -This will print the intermediate output to standard output; see +Print the +.I groff intermediate output +to standard output; see .BR \%groff_out (@MAN5EXT@). +Normally +.BR groff +calls automatically a postprocessor. +. +With this option, the output of +.B @g@troff +for the device, the so-called +.I intermediate output +is issued without postprocessing. . . .\" -------------------------------------------------------------------- @@ -699,6 +714,10 @@ backtrace on error or warning. .OptDef c disable color output. . +Please consult the +.BR \%grotty (@MAN1EXT@) +man page for more details. +. .OptDef C enable compatibility mode. . @@ -776,6 +795,48 @@ the groff system. . . .\" -------------------------------------------------------------------- +.SS Paper Size +.\" -------------------------------------------------------------------- +. +The +.I virtual +paper size used by +.B troff +to format the input is controlled globally with the requests +.BR .po , +.BR .pl , +and +.BR .ll . +See +.BR groff_tmac (@MAN5EXT@) +for the `papersize' macro package which provides a convenient interface. +. +.P +The +.I physical +paper size, giving the actual dimensions of the paper sheets, is +controlled by output devices like +.BR grops +with the command line options +.B \-p +and +.BR \-l . +See +.BR groff_font (@MAN5EXT@) +and the man pages of the output devices for more details. +.B groff +uses the command line option +.B \-P +to pass options to output devices; for example, the following selects +A4 paper in landscape orientation for the PS device: +. +.RS +.P +groff -Tps -P-pa4 -P-l .\|.\|. +.RE +. +. +.\" -------------------------------------------------------------------- .SS Front-ends .\" -------------------------------------------------------------------- . @@ -939,7 +1000,9 @@ HTML-like macros for inclusion in arbitrary groff documents; see .P Details on the naming of macro files and their placement can be found in -.BR \%groff_tmac (@MAN5EXT@). +.BR \%groff_tmac (@MAN5EXT@); +this man page also documents some other, minor auxiliary macro packages +not mentioned here. . . .\" -------------------------------------------------------------------- @@ -1051,7 +1114,7 @@ encoding; see .TP .B X75 75dpi X Window System output suitable for the previewers -.BR xditview (1x) +.BR \%xditview (1x) and .BR \%gxditview (@MAN1EXT@). A variant for a 12\|pt document base font is @@ -1060,7 +1123,7 @@ A variant for a 12\|pt document base font is .TP .B X100 100dpi X Window System output suitable for the previewers -.BR xditview (1x) +.BR \%xditview (1x) and .BR \%gxditview (@MAN1EXT@). A variant for a 12\|pt document base font is @@ -1519,7 +1582,7 @@ This is the only grap version supported by groff. .SH AUTHORS .\" -------------------------------------------------------------------- . -Copyright \(co 1989, 2002, 2003, 2004 Free Software Foundation, Inc. +Copyright \(co 1989, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. . .P This document is distributed under the terms of the FDL (GNU Free @@ -1534,7 +1597,7 @@ This document is based on the original groff man page written by .MTO jjc@jclark.com "James Clark" . . It was rewritten, enhanced, and put under the FDL license by -.MTO bwarken@mayn.de "Bernd Warken" . +\m[blue]Bernd Warken\m[]. . It is maintained by .MTO wl@gnu.org "Werner Lemberg" . @@ -1614,7 +1677,9 @@ Roff formatter programs: .BR ditroff (@MAN7EXT@). . .TP -The intermediate output language: +The +.I intermediate output +language: .BR \%groff_out (@MAN7EXT@). . .TP diff --git a/contrib/groff-1.19/src/roff/groff/pipeline.c b/contrib/groff-1.19/src/roff/groff/pipeline.c index 9bb7bdd888..d067ae9301 100644 --- a/contrib/groff-1.19/src/roff/groff/pipeline.c +++ b/contrib/groff-1.19/src/roff/groff/pipeline.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H #include @@ -101,7 +101,6 @@ static const char *xstrsignal(int); #include #include -#include #include #include diff --git a/contrib/groff-1.19/src/roff/groff/pipeline.h b/contrib/groff-1.19/src/roff/groff/pipeline.h index 52bff85072..77bb11a053 100644 --- a/contrib/groff-1.19/src/roff/groff/pipeline.h +++ b/contrib/groff-1.19/src/roff/groff/pipeline.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef __cplusplus extern "C" { diff --git a/contrib/groff-1.19/src/roff/grog/grog.pl b/contrib/groff-1.19/src/roff/grog/grog.pl index 07fa7a440e..b802fd56f2 100644 --- a/contrib/groff-1.19/src/roff/grog/grog.pl +++ b/contrib/groff-1.19/src/roff/grog/grog.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#! /usr/bin/perl # grog -- guess options for groff command # Inspired by doctype script in Kernighan & Pike, Unix Programming # Environment, pp 306-8. diff --git a/contrib/groff-1.19/src/roff/grog/grog.sh b/contrib/groff-1.19/src/roff/grog/grog.sh index 3999d77d7f..1a937cb1b3 100644 --- a/contrib/groff-1.19/src/roff/grog/grog.sh +++ b/contrib/groff-1.19/src/roff/grog/grog.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh # grog -- guess options for groff command # Like doctype in Kernighan & Pike, Unix Programming Environment, pp 306-8. diff --git a/contrib/groff-1.19/src/roff/nroff/nroff.man b/contrib/groff-1.19/src/roff/nroff/nroff.man index 4e715f94af..0511b45b5c 100644 --- a/contrib/groff-1.19/src/roff/nroff/nroff.man +++ b/contrib/groff-1.19/src/roff/nroff/nroff.man @@ -1,5 +1,5 @@ .ig -Copyright (C) 1989-2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 1989-2001, 2002, 2003, 2005 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -16,9 +16,12 @@ versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. .. +. .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 @@ -30,8 +33,10 @@ the original English. .ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" .el .RB "[\ " "\\$1" "\ ]" .. +. .OP \-CchipStUv .OP \-d cs +.OP \-M dir .OP \-m name .OP \-n num .OP \-o list @@ -40,6 +45,7 @@ the original English. .RI "[\ " "file" "\ .\|.\|.\ ]" .br .ad \na +. .SH DESCRIPTION The .B @g@nroff @@ -89,6 +95,7 @@ The .BR \-d , .BR \-C , .BR \-i , +.BR \-M , .BR \-m , .BR \-n , .BR \-o , @@ -117,6 +124,7 @@ Options .BR groff . .B \-v shows the version number. +. .SH ENVIRONMENT .TP .SM @@ -130,6 +138,7 @@ This shell script is basically intended for use with so warnings are suppressed. 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@), diff --git a/contrib/groff-1.19/src/roff/nroff/nroff.sh b/contrib/groff-1.19/src/roff/nroff/nroff.sh index 4c5c00bd2f..3120215534 100644 --- a/contrib/groff-1.19/src/roff/nroff/nroff.sh +++ b/contrib/groff-1.19/src/roff/nroff/nroff.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh # Emulate nroff with groff. prog="$0" @@ -8,7 +8,7 @@ prog="$0" case "`exec 2>/dev/null ; locale charmap`" in UTF-8) T=-Tutf8 ;; - ISO-8859-1) + ISO-8859-1 | ISO-8859-15) T=-Tlatin1 ;; IBM-1047) T=-Tcp1047 ;; @@ -16,7 +16,8 @@ case "`exec 2>/dev/null ; locale charmap`" in case "${LC_ALL-${LC_CTYPE-${LANG}}}" in *.UTF-8) T=-Tutf8 ;; - iso_8859_1 | *.ISO-8859-1) + iso_8859_1 | *.ISO-8859-1 | *.ISO8859-1 | \ + iso_8859_15 | *.ISO-8859-15 | *.ISO8859-15) T=-Tlatin1 ;; *.IBM-1047) T=-Tcp1047 ;; @@ -47,10 +48,10 @@ for i -[eq] | -s*) # ignore these options ;; - -[dmrnoT]) + -[dMmrnoT]) echo "$prog: option $1 requires an argument" >&2 exit 1 ;; - -[iptSUC] | -[dmrno]*) + -[iptSUC] | -[dMmrno]*) opts="$opts $1" ;; -Tascii | -Tlatin1 | -Tutf8 | -Tcp1047) T=$1 ;; @@ -67,8 +68,8 @@ for i echo "GNU nroff (groff) version @VERSION@" exit 0 ;; --help) - echo "usage: nroff [-CchipStUv] [-dCS] [-mNAME] [-nNUM] [-oLIST] [-rCN]" - echo " [-Tname] [FILE...]" + echo "usage: nroff [-CchipStUv] [-dCS] [-MDIR] [-mNAME] [-nNUM] [-oLIST]" + echo " [-rCN] [-Tname] [FILE...]" exit 0 ;; --) shift diff --git a/contrib/groff-1.19/src/roff/troff/charinfo.h b/contrib/groff-1.19/src/roff/troff/charinfo.h index 4123fbadd5..42190fd814 100644 --- a/contrib/groff-1.19/src/roff/troff/charinfo.h +++ b/contrib/groff-1.19/src/roff/troff/charinfo.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ class macro; diff --git a/contrib/groff-1.19/src/roff/troff/column.cpp b/contrib/groff-1.19/src/roff/troff/column.cpp index 8d6a6ebe59..060b088d23 100644 --- a/contrib/groff-1.19/src/roff/troff/column.cpp +++ b/contrib/groff-1.19/src/roff/troff/column.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef COLUMN @@ -666,7 +666,7 @@ vjustify_node::vjustify_node(symbol t) node *vjustify_node::copy() { - return new vjustify_node(typ); + return new vjustify_node(typ, div_nest_level); } const char *vjustify_node::type() diff --git a/contrib/groff-1.19/src/roff/troff/dictionary.cpp b/contrib/groff-1.19/src/roff/troff/dictionary.cpp index e4cce22c11..37084b6678 100644 --- a/contrib/groff-1.19/src/roff/troff/dictionary.cpp +++ b/contrib/groff-1.19/src/roff/troff/dictionary.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "troff.h" diff --git a/contrib/groff-1.19/src/roff/troff/dictionary.h b/contrib/groff-1.19/src/roff/troff/dictionary.h index 4f319be495..2baab0ab93 100644 --- a/contrib/groff-1.19/src/roff/troff/dictionary.h +++ b/contrib/groff-1.19/src/roff/troff/dictionary.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ diff --git a/contrib/groff-1.19/src/roff/troff/div.cpp b/contrib/groff-1.19/src/roff/troff/div.cpp index 578df24b7a..4cacd8da98 100644 --- a/contrib/groff-1.19/src/roff/troff/div.cpp +++ b/contrib/groff-1.19/src/roff/troff/div.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ // diversions @@ -25,6 +25,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "troff.h" #include "dictionary.h" #include "hvunits.h" +#include "stringclass.h" +#include "mtsm.h" #include "env.h" #include "request.h" #include "node.h" @@ -51,7 +53,9 @@ static vunits needed_space; diversion::diversion(symbol s) : prev(0), nm(s), vertical_position(V0), high_water_mark(V0), - no_space_mode(0), marked_place(V0) + any_chars_added(0), no_space_mode(0), needs_push(0), saved_seen_break(0), + saved_seen_space(0), saved_seen_eol(0), saved_suppress_next_eol(0), + marked_place(V0) { } @@ -97,6 +101,10 @@ void do_divert(int append, int boxing) symbol nm = get_name(); if (nm.is_null()) { if (curdiv->prev) { + curenv->seen_break = curdiv->saved_seen_break; + curenv->seen_space = curdiv->saved_seen_space; + curenv->seen_eol = curdiv->saved_seen_eol; + curenv->suppress_next_eol = curdiv->saved_suppress_next_eol; if (boxing) { curenv->line = curdiv->saved_line; curenv->width_total = curdiv->saved_width_total; @@ -116,6 +124,13 @@ void do_divert(int append, int boxing) macro_diversion *md = new macro_diversion(nm, append); md->prev = curdiv; curdiv = md; + curdiv->saved_seen_break = curenv->seen_break; + curdiv->saved_seen_space = curenv->seen_space; + curdiv->saved_seen_eol = curenv->seen_eol; + curdiv->saved_suppress_next_eol = curenv->suppress_next_eol; + curenv->seen_break = 0; + curenv->seen_space = 0; + curenv->seen_eol = 0; if (boxing) { curdiv->saved_line = curenv->line; curdiv->saved_width_total = curenv->width_total; @@ -202,7 +217,7 @@ macro_diversion::macro_diversion(symbol s, int append) // We can now catch the situation described above by comparing // the length of the charlist in the macro_header with the length // stored in the macro. When we detect this, we copy the contents. - mac = new macro; + mac = new macro(1); if (append) { request_or_macro *rm = (request_or_macro *)request_dictionary.lookup(s); @@ -257,9 +272,8 @@ void macro_diversion::output(node *nd, int retain_size, nd->set_vertical_size(&v); node *temp = nd; nd = nd->next; - if (temp->interpret(mac)) { + if (temp->interpret(mac)) delete temp; - } else { #if 1 temp->freeze_space(); @@ -445,6 +459,9 @@ void top_level_diversion::space(vunits n, int forced) vunits next_trap_pos; trap *next_trap = find_next_trap(&next_trap_pos); vunits y = vertical_position + n; + if (curenv->get_vertical_spacing().to_units()) + curenv->seen_space += n.to_units() + / curenv->get_vertical_spacing().to_units(); if (vertical_position_traps_flag && next_trap != 0 && y >= next_trap_pos) { vertical_position = next_trap_pos; nl_reg_contents = vertical_position.to_units(); @@ -639,7 +656,7 @@ void page_offset() n = topdiv->prev_page_offset; topdiv->prev_page_offset = topdiv->page_offset; topdiv->page_offset = n; - curenv->add_html_tag(0, ".po", n.to_units()); + topdiv->modified_tag.incl(MTSM_PO); skip_line(); } @@ -732,11 +749,11 @@ void restore_spacing() skip_line(); } -/* It is necessary to generate a break before before reading the argument, -because otherwise arguments using | will be wrong. But if we just +/* It is necessary to generate a break before reading the argument, +because otherwise arguments using | will be wrong. But if we just generate a break as usual, then the line forced out may spring a trap and thus push a macro onto the input stack before we have had a chance -to read the argument to the sp request. We resolve this dilemma by +to read the argument to the sp request. We resolve this dilemma by setting, before generating the break, a flag which will postpone the actual pushing of the macro associated with the trap sprung by the outputting of the line forced out by the break till after we have read @@ -758,17 +775,15 @@ void space_request() else // The line might have had line spacing that was truncated. truncated_space += n; - curenv->add_html_tag(1, ".sp", n.to_units()); + tok.next(); } void blank_line() { curenv->do_break(); - if (!trap_sprung_flag && !curdiv->no_space_mode) { + if (!trap_sprung_flag && !curdiv->no_space_mode) curdiv->space(curenv->get_vertical_spacing()); - curenv->add_html_tag(1, ".sp", 1); - } else truncated_space += curenv->get_vertical_spacing(); } @@ -832,7 +847,6 @@ void flush_output() curenv->do_break(); if (the_output) the_output->flush(); - curenv->add_html_tag(1, ".fl"); tok.next(); } diff --git a/contrib/groff-1.19/src/roff/troff/div.h b/contrib/groff-1.19/src/roff/troff/div.h index af52460673..c9ff9b4030 100644 --- a/contrib/groff-1.19/src/roff/troff/div.h +++ b/contrib/groff-1.19/src/roff/troff/div.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2004 +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,7 +17,11 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ + +void do_divert(int append, int boxing); +void end_diversions(); +void page_offset(); class diversion { friend void do_divert(int append, int boxing); @@ -34,7 +38,14 @@ protected: vunits vertical_position; vunits high_water_mark; public: + int any_chars_added; int no_space_mode; + int needs_push; + int saved_seen_break; + int saved_seen_space; + int saved_seen_eol; + int saved_suppress_next_eol; + state_set modified_tag; vunits marked_place; diversion(symbol s = NULL_SYMBOL); virtual ~diversion(); @@ -54,6 +65,7 @@ public: virtual void set_diversion_trap(symbol, vunits) = 0; virtual void clear_diversion_trap() = 0; virtual void copy_file(const char *filename) = 0; + virtual int is_diversion() = 0; }; class macro; @@ -78,6 +90,7 @@ public: void set_diversion_trap(symbol, vunits); void clear_diversion_trap(); void copy_file(const char *filename); + int is_diversion() { return 1; } }; struct trap { @@ -134,6 +147,7 @@ public: void set_diversion_trap(symbol, vunits); void clear_diversion_trap(); void set_last_page() { last_page_count = page_count; } + int is_diversion() { return 0; } }; extern top_level_diversion *topdiv; diff --git a/contrib/groff-1.19/src/roff/troff/env.cpp b/contrib/groff-1.19/src/roff/troff/env.cpp index b02340657b..9de9a46aa5 100644 --- a/contrib/groff-1.19/src/roff/troff/env.cpp +++ b/contrib/groff-1.19/src/roff/troff/env.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,11 +17,13 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "troff.h" #include "dictionary.h" #include "hvunits.h" +#include "stringclass.h" +#include "mtsm.h" #include "env.h" #include "request.h" #include "node.h" @@ -51,6 +53,8 @@ environment *env_table[NENVIRONMENTS]; dictionary env_dictionary(10); environment *curenv; static int next_line_number = 0; +extern int suppress_push; +extern statem *get_diversion_state(); charinfo *field_delimiter_char; charinfo *padding_indicator_char; @@ -60,6 +64,7 @@ int translate_space_to_dummy = 0; class pending_output_line { node *nd; int no_fill; + int was_centered; vunits vs; vunits post_vs; hunits width; @@ -69,20 +74,21 @@ class pending_output_line { public: pending_output_line *next; - pending_output_line(node *, int, vunits, vunits, hunits, + pending_output_line(node *, int, vunits, vunits, hunits, int, pending_output_line * = 0); ~pending_output_line(); int output(); #ifdef WIDOW_CONTROL friend void environment::mark_last_line(); - friend void environment::output(node *, int, vunits, vunits, hunits); + friend void environment::output(node *, int, vunits, vunits, hunits, int); #endif /* WIDOW_CONTROL */ }; pending_output_line::pending_output_line(node *n, int nf, vunits v, vunits pv, - hunits w, pending_output_line *p) -: nd(n), no_fill(nf), vs(v), post_vs(pv), width(w), + hunits w, int ce, + pending_output_line *p) +: nd(n), no_fill(nf), was_centered(ce), vs(v), post_vs(pv), width(w), #ifdef WIDOW_CONTROL last_line(0), #endif /* WIDOW_CONTROL */ @@ -108,6 +114,7 @@ int pending_output_line::output() } } #endif + curenv->construct_format_state(nd, was_centered, !no_fill); curdiv->output(nd, no_fill, vs, post_vs, width); nd = 0; return 1; @@ -115,7 +122,7 @@ int pending_output_line::output() void environment::output(node *nd, int no_fill_flag, vunits vs, vunits post_vs, - hunits width) + hunits width, int was_centered) { #ifdef WIDOW_CONTROL while (pending_lines) { @@ -135,13 +142,14 @@ void environment::output(node *nd, int no_fill_flag, && (!widow_control || no_fill_flag) #endif /* WIDOW_CONTROL */ ) { + curenv->construct_format_state(nd, was_centered, !no_fill_flag); curdiv->output(nd, no_fill_flag, vs, post_vs, width); - emitted_node = 1; } else { pending_output_line **p; for (p = &pending_lines; *p; p = &(*p)->next) ; - *p = new pending_output_line(nd, no_fill_flag, vs, post_vs, width); + *p = new pending_output_line(nd, no_fill_flag, vs, post_vs, width, + was_centered); } } @@ -155,7 +163,7 @@ void environment::output_title(node *nd, int no_fill_flag, curdiv->output(nd, no_fill_flag, vs, post_vs, width); else pending_lines = new pending_output_line(nd, no_fill_flag, vs, post_vs, - width, pending_lines); + width, 0, pending_lines); } void environment::output_pending_lines() @@ -266,6 +274,7 @@ void leader_character() void environment::add_char(charinfo *ci) { int s; + node *gc_np = 0; if (interrupted) ; // don't allow fields in dummy environments @@ -281,18 +290,40 @@ void environment::add_char(charinfo *ci) if (tab_contents == 0) tab_contents = new line_start_node; if (ci != hyphen_indicator_char) - tab_contents = tab_contents->add_char(ci, this, &tab_width, &s); + tab_contents = tab_contents->add_char(ci, this, &tab_width, &s, &gc_np); else tab_contents = tab_contents->add_discretionary_hyphen(); } else { if (line == 0) start_line(); +#if 0 + fprintf(stderr, "current line is\n"); + line->debug_node_list(); +#endif if (ci != hyphen_indicator_char) - line = line->add_char(ci, this, &width_total, &space_total); + line = line->add_char(ci, this, &width_total, &space_total, &gc_np); else line = line->add_discretionary_hyphen(); } +#if 0 + fprintf(stderr, "now after we have added character the line is\n"); + line->debug_node_list(); +#endif + if ((!suppress_push) && gc_np) { + if (gc_np && (gc_np->state == 0)) { + gc_np->state = construct_state(0); + gc_np->push_state = get_diversion_state(); + } + else if (line && (line->state == 0)) { + line->state = construct_state(0); + line->push_state = get_diversion_state(); + } + } +#if 0 + fprintf(stderr, "now we have possibly added the state the line is\n"); + line->debug_node_list(); +#endif } node *environment::make_char_node(charinfo *ci) @@ -304,6 +335,12 @@ void environment::add_node(node *n) { if (n == 0) return; + if (!suppress_push) { + if (n->is_special && n->state == NULL) + n->state = construct_state(0); + n->push_state = get_diversion_state(); + } + if (current_tab || current_field) n->freeze_space(); if (interrupted) { @@ -327,10 +364,10 @@ void environment::add_node(node *n) space_total += n->nspaces(); n->next = line; line = n; + construct_new_line_state(line); } } - void environment::add_hyphen_indicator() { if (current_tab || interrupted || current_field @@ -614,7 +651,6 @@ environment::environment(symbol nm) width_total(0), space_total(0), input_line_start(0), - tabs(units_per_inch/2, TAB_LEFT), line_tabs(0), current_tab(TAB_NONE), leader_node(0), @@ -641,12 +677,15 @@ environment::environment(symbol nm) #ifdef WIDOW_CONTROL widow_control(0), #endif /* WIDOW_CONTROL */ - ignore_next_eol(0), - emitted_node(0), glyph_color(&default_color), prev_glyph_color(&default_color), fill_color(&default_color), prev_fill_color(&default_color), + seen_space(0), + seen_eol(0), + suppress_next_eol(0), + seen_break(0), + tabs(units_per_inch/2, TAB_LEFT), name(nm), control_char('.'), no_break_control_char('\''), @@ -704,7 +743,6 @@ environment::environment(const environment *e) width_total(0), space_total(0), input_line_start(0), - tabs(e->tabs), line_tabs(e->line_tabs), current_tab(TAB_NONE), leader_node(0), @@ -731,12 +769,15 @@ environment::environment(const environment *e) #ifdef WIDOW_CONTROL widow_control(e->widow_control), #endif /* WIDOW_CONTROL */ - ignore_next_eol(0), - emitted_node(0), glyph_color(e->glyph_color), prev_glyph_color(e->prev_glyph_color), fill_color(e->fill_color), prev_fill_color(e->prev_fill_color), + seen_space(e->seen_space), + seen_eol(e->seen_eol), + suppress_next_eol(e->suppress_next_eol), + seen_break(e->seen_break), + tabs(e->tabs), name(e->name), // so that eg `.if "\n[.ev]"0"' works control_char(e->control_char), no_break_control_char(e->no_break_control_char), @@ -818,8 +859,6 @@ void environment::copy(const environment *e) hyphenation_space = e->hyphenation_space; hyphenation_margin = e->hyphenation_margin; composite = 0; - ignore_next_eol = e->ignore_next_eol; - emitted_node = e->emitted_node; glyph_color= e->glyph_color; prev_glyph_color = e->prev_glyph_color; fill_color = e->fill_color; @@ -1091,7 +1130,13 @@ void environment_switch() error("environment stack underflow"); } else { + int seen_space = curenv->seen_space; + int seen_eol = curenv->seen_eol; + int suppress_next_eol = curenv->suppress_next_eol; curenv = env_stack->env; + curenv->seen_space = seen_space; + curenv->seen_eol = seen_eol; + curenv->suppress_next_eol = suppress_next_eol; env_list *tem = env_stack; env_stack = env_stack->next; delete tem; @@ -1128,6 +1173,26 @@ void environment_copy() skip_line(); } +void fill_color_change() +{ + symbol s = get_name(); + if (s.is_null()) + curenv->set_fill_color(curenv->get_prev_fill_color()); + else + do_fill_color(s); + skip_line(); +} + +void glyph_color_change() +{ + symbol s = get_name(); + if (s.is_null()) + curenv->set_glyph_color(curenv->get_prev_glyph_color()); + else + do_glyph_color(s); + skip_line(); +} + static symbol P_symbol("P"); void font_change() @@ -1166,7 +1231,6 @@ void point_size() if (n <= 0) n = 1; curenv->set_size(n); - curenv->add_html_tag(0, ".ps", n); } else curenv->set_size(0); @@ -1234,8 +1298,6 @@ void fill() if (break_flag) curenv->do_break(); curenv->fill = 1; - curenv->add_html_tag(1, ".fi"); - curenv->add_html_tag(0, ".br"); tok.next(); } @@ -1246,9 +1308,7 @@ void no_fill() if (break_flag) curenv->do_break(); curenv->fill = 0; - curenv->add_html_tag(1, ".nf"); - curenv->add_html_tag(0, ".br"); - curenv->add_html_tag(0, ".po", topdiv->get_page_offset().to_units()); + curenv->suppress_next_eol = 1; tok.next(); } @@ -1265,7 +1325,7 @@ void center() curenv->do_break(); curenv->right_justify_lines = 0; curenv->center_lines = n; - curenv->add_html_tag(1, ".ce", n); + curdiv->modified_tag.incl(MTSM_CE); tok.next(); } @@ -1282,7 +1342,7 @@ void right_justify() curenv->do_break(); curenv->center_lines = 0; curenv->right_justify_lines = n; - curenv->add_html_tag(1, ".rj", n); + curdiv->modified_tag.incl(MTSM_RJ); tok.next(); } @@ -1299,7 +1359,7 @@ void line_length() temp = curenv->prev_line_length; curenv->prev_line_length = curenv->line_length; curenv->line_length = temp; - curenv->add_html_tag(1, ".ll", temp.to_units()); + curdiv->modified_tag.incl(MTSM_LL); skip_line(); } @@ -1386,8 +1446,7 @@ void indent() curenv->have_temporary_indent = 0; curenv->prev_indent = curenv->indent; curenv->indent = temp; - if (break_flag) - curenv->add_html_tag(1, ".in", temp.to_units()); + curdiv->modified_tag.incl(MTSM_IN); tok.next(); } @@ -1408,7 +1467,7 @@ void temporary_indent() if (!err) { curenv->temporary_indent = temp; curenv->have_temporary_indent = 1; - curenv->add_html_tag(1, ".ti", temp.to_units()); + curdiv->modified_tag.incl(MTSM_TI); } tok.next(); } @@ -1625,6 +1684,7 @@ void environment::interrupt() void environment::newline() { + int was_centered = 0; if (underline_lines > 0) { if (--underline_lines == 0) { prev_fontno = fontno; @@ -1663,11 +1723,7 @@ void environment::newline() if (x > H0) saved_indent += x/2; to_be_output = line; - if (is_html) { - node *n = make_html_tag("eol.ce"); - n->next = to_be_output; - to_be_output = n; - } + was_centered = 1; to_be_output_width = width_total; line = 0; } @@ -1690,14 +1746,14 @@ void environment::newline() input_line_start = line == 0 ? H0 : width_total; if (to_be_output) { if (is_html && !fill) { - if (curdiv == topdiv) { - node *n = make_html_tag("eol"); - - n->next = to_be_output; - to_be_output = n; - } + curdiv->modified_tag.incl(MTSM_EOL); + if (suppress_next_eol) + suppress_next_eol = 0; + else + seen_eol = 1; } - output_line(to_be_output, to_be_output_width); + + output_line(to_be_output, to_be_output_width, was_centered); hyphen_line_count = 0; } if (input_trap_count > 0) { @@ -1707,7 +1763,7 @@ void environment::newline() } } -void environment::output_line(node *n, hunits width) +void environment::output_line(node *n, hunits width, int was_centered) { prev_text_length = width; if (margin_character_flags) { @@ -1766,7 +1822,8 @@ void environment::output_line(node *n, hunits width) width += w; ++next_line_number; } - output(nn, !fill, vertical_spacing, total_post_vertical_spacing(), width); + output(nn, !fill, vertical_spacing, total_post_vertical_spacing(), width, + was_centered); } void environment::start_line() @@ -2014,6 +2071,7 @@ static void distribute_space(node *n, int nspaces, hunits desired_space, void environment::possibly_break_line(int start_here, int forced) { + int was_centered = center_lines > 0; if (!fill || current_tab || current_field || dummy) return; while (line != 0 @@ -2043,6 +2101,7 @@ void environment::possibly_break_line(int start_here, int forced) break; case ADJUST_CENTER: saved_indent += (target_text_length - bp->width)/2; + was_centered = 1; break; case ADJUST_RIGHT: saved_indent += target_text_length - bp->width; @@ -2080,7 +2139,7 @@ void environment::possibly_break_line(int start_here, int forced) } // Do output_line() here so that line will be 0 iff the // the environment will be empty. - output_line(pre, output_width); + output_line(pre, output_width, was_centered); while (to_be_discarded != 0) { tem = to_be_discarded; to_be_discarded = to_be_discarded->next; @@ -2143,45 +2202,8 @@ void environment::final_break() do_break(); } -/* - * add_html_tag - emits a special html-tag: to help post-grohtml understand - * the key troff commands - */ - -void environment::add_html_tag(int force, const char *nm) -{ - if (!force && (curdiv != topdiv)) - return; - - if (is_html) { - /* - * need to emit tag for post-grohtml - * but we check to see whether we can emit specials - */ - if (curdiv == topdiv && topdiv->before_first_page) - topdiv->begin_page(); - macro *m = new macro; - m->append_str("html-tag:"); - for (const char *p = nm; *p; p++) - if (!invalid_input_char((unsigned char)*p)) - m->append(*p); - curdiv->output(new special_node(*m), 1, 0, 0, 0); - if (strcmp(nm, ".nf") == 0) - curenv->ignore_next_eol = 1; - } -} - -/* - * add_html_tag - emits a special html-tag: to help post-grohtml understand - * the key troff commands, it appends a string representation - * of i. - */ - -void environment::add_html_tag(int force, const char *nm, int i) +node *environment::make_tag(const char *nm, int i) { - if (!force && (curdiv != topdiv)) - return; - if (is_html) { /* * need to emit tag for post-grohtml @@ -2190,103 +2212,119 @@ void environment::add_html_tag(int force, const char *nm, int i) if (curdiv == topdiv && topdiv->before_first_page) topdiv->begin_page(); macro *m = new macro; - m->append_str("html-tag:"); + m->append_str("devtag:"); for (const char *p = nm; *p; p++) if (!invalid_input_char((unsigned char)*p)) m->append(*p); m->append(' '); m->append_int(i); - node *n = new special_node(*m); - curdiv->output(n, 1, 0, 0, 0); + return new special_node(*m); } + return 0; } -/* - * add_html_tag_tabs - emits the tab settings for post-grohtml - */ - -void environment::add_html_tag_tabs(int force) +void environment::dump_troff_state() { - if (!force && (curdiv != topdiv)) - return; +#define SPACES " " + fprintf(stderr, SPACES "register `in' = %d\n", curenv->indent.to_units()); + if (curenv->have_temporary_indent) + fprintf(stderr, SPACES "register `ti' = %d\n", + curenv->temporary_indent.to_units()); + fprintf(stderr, SPACES "centered lines `ce' = %d\n", curenv->center_lines); + fprintf(stderr, SPACES "register `ll' = %d\n", + curenv->line_length.to_units()); + fprintf(stderr, SPACES "fill `fi=1/nf=0' = %d\n", curenv->fill); + fprintf(stderr, SPACES "page offset `po' = %d\n", + topdiv->get_page_offset().to_units()); + fprintf(stderr, SPACES "seen_break = %d\n", curenv->seen_break); + fprintf(stderr, SPACES "seen_space = %d\n", curenv->seen_space); + fflush(stderr); +#undef SPACES +} +statem *environment::construct_state(int only_eol) +{ if (is_html) { - /* - * need to emit tag for post-grohtml - * but we check to see whether we can emit specials - */ - if (curdiv == topdiv && topdiv->before_first_page) - topdiv->begin_page(); - macro *m = new macro; - hunits d, l; - enum tab_type t; - m->append_str("html-tag:.ta "); - do { - t = curenv->tabs.distance_to_next_tab(l, &d); - l += d; - switch (t) { - case TAB_LEFT: - m->append_str(" L "); - m->append_int(l.to_units()); - break; - case TAB_CENTER: - m->append_str(" C "); - m->append_int(l.to_units()); - break; - case TAB_RIGHT: - m->append_str(" R "); - m->append_int(l.to_units()); - break; - case TAB_NONE: - break; - } - } while ((t != TAB_NONE) && (l < get_line_length())); - curdiv->output(new special_node(*m), 1, 0, 0, 0); + statem *s = new statem(); + if (!only_eol) { + s->add_tag(MTSM_IN, indent); + s->add_tag(MTSM_LL, line_length); + s->add_tag(MTSM_PO, topdiv->get_page_offset().to_units()); + s->add_tag(MTSM_RJ, right_justify_lines); + if (have_temporary_indent) + s->add_tag(MTSM_TI, temporary_indent); + s->add_tag_ta(); + if (seen_break) + s->add_tag(MTSM_BR); + if (seen_space != 0) + s->add_tag(MTSM_SP, seen_space); + seen_break = 0; + seen_space = 0; + } + if (seen_eol) { + s->add_tag(MTSM_EOL); + s->add_tag(MTSM_CE, center_lines); + } + seen_eol = 0; + return s; } + else + return NULL; } -node *environment::make_html_tag(const char *nm, int i) +void environment::construct_format_state(node *n, int was_centered, + int filling) { if (is_html) { - /* - * need to emit tag for post-grohtml - * but we check to see whether we can emit specials - */ - if (curdiv == topdiv && topdiv->before_first_page) - topdiv->begin_page(); - macro *m = new macro; - m->append_str("html-tag:"); - for (const char *p = nm; *p; p++) - if (!invalid_input_char((unsigned char)*p)) - m->append(*p); - m->append(' '); - m->append_int(i); - return new special_node(*m); + // find first glyph node which has a state. + while (n != 0 && n->state == 0) + n = n->next; + if (n == 0 || (n->state == 0)) + return; + if (seen_space != 0) + n->state->add_tag(MTSM_SP, seen_space); + if (seen_eol && topdiv == curdiv) + n->state->add_tag(MTSM_EOL); + seen_space = 0; + seen_eol = 0; + if (was_centered) + n->state->add_tag(MTSM_CE, center_lines+1); + else + n->state->add_tag_if_unknown(MTSM_CE, 0); + n->state->add_tag_if_unknown(MTSM_FI, filling); + n = n->next; + while (n != 0) { + if (n->state != 0) { + n->state->sub_tag_ce(); + n->state->add_tag_if_unknown(MTSM_FI, filling); + } + n = n->next; + } } - return 0; } -node *environment::make_html_tag(const char *nm) +void environment::construct_new_line_state(node *n) { if (is_html) { - /* - * need to emit tag for post-grohtml - * but we check to see whether we can emit specials - */ - if (curdiv == topdiv && topdiv->before_first_page) - topdiv->begin_page(); - macro *m = new macro; - m->append_str("html-tag:"); - for (const char *p = nm; *p; p++) - if (!invalid_input_char((unsigned char)*p)) - m->append(*p); - return new special_node(*m); + // find first glyph node which has a state. + while (n != 0 && n->state == 0) + n = n->next; + if (n == 0 || n->state == 0) + return; + if (seen_space != 0) + n->state->add_tag(MTSM_SP, seen_space); + if (seen_eol && topdiv == curdiv) + n->state->add_tag(MTSM_EOL); + seen_space = 0; + seen_eol = 0; } - return 0; } +extern int global_diverted_space; + void environment::do_break(int do_spread) { + int was_centered = 0; if (curdiv == topdiv && topdiv->before_first_page) { topdiv->begin_page(); return; @@ -2313,6 +2351,7 @@ void environment::do_break(int do_spread) switch (adjust_mode) { case ADJUST_CENTER: saved_indent += (target_text_length - width_total)/2; + was_centered = 1; break; case ADJUST_RIGHT: saved_indent += target_text_length - width_total; @@ -2321,7 +2360,7 @@ void environment::do_break(int do_spread) } node *tem = line; line = 0; - output_line(tem, width_total); + output_line(tem, width_total, was_centered); hyphen_line_count = 0; } prev_line_interrupted = 0; @@ -2329,6 +2368,10 @@ void environment::do_break(int do_spread) mark_last_line(); output_pending_lines(); #endif /* WIDOW_CONTROL */ + if (!global_diverted_space) { + curdiv->modified_tag.incl(MTSM_BR); + seen_break = 1; + } } int environment::is_empty() @@ -2340,10 +2383,8 @@ void do_break_request(int spread) { while (!tok.newline() && !tok.eof()) tok.next(); - if (break_flag) { + if (break_flag) curenv->do_break(spread); - curenv->add_html_tag(0, ".br"); - } tok.next(); } @@ -2750,7 +2791,7 @@ void set_tabs() } } curenv->tabs = tabs; - curenv->add_html_tag_tabs(1); + curdiv->modified_tag.incl(MTSM_TA); skip_line(); } @@ -2872,14 +2913,14 @@ void environment::handle_tab(int is_leader) case TAB_NONE: return; case TAB_LEFT: + add_node(make_tag("tab L", absolute.to_units())); add_node(make_tab_node(d)); - add_node(make_html_tag("tab L", absolute.to_units())); return; case TAB_RIGHT: - add_node(make_html_tag("tab R", absolute.to_units())); + add_node(make_tag("tab R", absolute.to_units())); break; case TAB_CENTER: - add_node(make_html_tag("tab C", absolute.to_units())); + add_node(make_tag("tab C", absolute.to_units())); break; default: assert(0); @@ -3109,6 +3150,12 @@ const char *environment::get_font_name_string() return f.contents(); } +const char *environment::get_style_name_string() +{ + symbol f = get_style_name(fontno); + return f.contents(); +} + const char *environment::get_name_string() { return name.contents(); @@ -3200,7 +3247,9 @@ void init_env_requests() init_request("fam", family_change); init_request("fc", field_characters); init_request("fi", fill); + init_request("fcolor", fill_color_change); init_request("ft", font_change); + init_request("gcolor", glyph_color_change); init_request("hc", hyphen_char); init_request("hlm", hyphen_line_max_request); init_request("hy", hyphenate_request); @@ -3271,6 +3320,7 @@ void init_env_requests() init_int_env_reg(".ss", get_space_size); init_int_env_reg(".sss", get_sentence_space_size); init_string_env_reg(".sr", get_requested_point_size_string); + init_string_env_reg(".sty", get_style_name_string); init_string_env_reg(".tabs", get_tabs); init_int_env_reg(".u", get_fill); init_vunits_env_reg(".v", get_vertical_spacing); diff --git a/contrib/groff-1.19/src/roff/troff/env.h b/contrib/groff-1.19/src/roff/troff/env.h index 27f54c9ca6..2ee7bdcf3e 100644 --- a/contrib/groff-1.19/src/roff/troff/env.h +++ b/contrib/groff-1.19/src/roff/troff/env.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2004 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,7 +17,9 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ + +class statem; struct size_range { int min; @@ -100,6 +102,47 @@ struct breakpoint; class font_family; class pending_output_line; +// declarations to avoid friend name injection problems +void title_length(); +void space_size(); +void fill(); +void no_fill(); +void adjust(); +void no_adjust(); +void center(); +void right_justify(); +void vertical_spacing(); +void post_vertical_spacing(); +void line_spacing(); +void line_length(); +void indent(); +void temporary_indent(); +void do_underline(int); +void do_input_trap(int); +void set_tabs(); +void margin_character(); +void no_number(); +void number_lines(); +void leader_character(); +void tab_character(); +void hyphenate_request(); +void no_hyphenate(); +void hyphen_line_max_request(); +void hyphenation_space_request(); +void hyphenation_margin_request(); +void line_width(); +#if 0 +void tabs_save(); +void tabs_restore(); +#endif +void line_tabs_request(); +void title(); +#ifdef WIDOW_CONTROL +void widow_control_request(); +#endif /* WIDOW_CONTROL */ + +void do_divert(int append, int boxing); + class environment { int dummy; // dummy environment used for \w hunits prev_line_length; @@ -147,7 +190,6 @@ class environment { hunits width_total; int space_total; hunits input_line_start; - tab_stops tabs; node *tab_contents; hunits tab_width; hunits tab_distance; @@ -183,8 +225,6 @@ class environment { #ifdef WIDOW_CONTROL int widow_control; #endif /* WIDOW_CONTROL */ - int ignore_next_eol; - int emitted_node; // have we emitted a node since the last html eol tag? color *glyph_color; color *prev_glyph_color; color *fill_color; @@ -193,9 +233,9 @@ class environment { tab_type distance_to_next_tab(hunits *); tab_type distance_to_next_tab(hunits *distance, hunits *leftpos); void start_line(); - void output_line(node *, hunits); + void output_line(node *, hunits, int); void output(node *nd, int retain_size, vunits vs, vunits post_vs, - hunits width); + hunits width, int was_centered); void output_title(node *nd, int retain_size, vunits vs, vunits post_vs, hunits width); #ifdef WIDOW_CONTROL @@ -209,6 +249,11 @@ class environment { node *make_tab_node(hunits d, node *next = 0); node *get_prev_char(); public: + int seen_space; + int seen_eol; + int suppress_next_eol; + int seen_break; + tab_stops tabs; const symbol name; unsigned char control_char; unsigned char no_break_control_char; @@ -217,14 +262,15 @@ public: environment(symbol); environment(const environment *); // for temporary environment ~environment(); + statem *construct_state(int only_eol); void copy(const environment *); int is_dummy() { return dummy; } int is_empty(); int is_composite() { return composite; } void set_composite() { composite = 1; } - vunits get_vertical_spacing(); // .v - vunits get_post_vertical_spacing(); // .pvs - int get_line_spacing(); // .L + vunits get_vertical_spacing(); // .v + vunits get_post_vertical_spacing(); // .pvs + int get_line_spacing(); // .L vunits total_post_vertical_spacing(); int get_point_size() { return size.to_scaled_points(); } font_size get_font_size() { return size; } @@ -233,23 +279,23 @@ public: int get_char_height() { return char_height; } int get_char_slant() { return char_slant; } hunits get_digit_width(); - int get_font() { return fontno; }; // .f + int get_font() { return fontno; }; // .f font_family *get_family() { return family; } - int get_bold(); // .b - int get_adjust_mode(); // .j - int get_fill(); // .u - hunits get_indent(); // .i + int get_bold(); // .b + int get_adjust_mode(); // .j + int get_fill(); // .u + hunits get_indent(); // .i hunits get_temporary_indent(); - hunits get_line_length(); // .l - hunits get_saved_line_length(); // .ll - hunits get_saved_indent(); // .in + hunits get_line_length(); // .l + hunits get_saved_line_length(); // .ll + hunits get_saved_indent(); // .in hunits get_title_length(); - hunits get_prev_char_width(); // .w + hunits get_prev_char_width(); // .w hunits get_prev_char_skew(); vunits get_prev_char_height(); vunits get_prev_char_depth(); - hunits get_text_length(); // .k - hunits get_prev_text_length(); // .n + hunits get_text_length(); // .k + hunits get_prev_text_length(); // .n hunits get_space_width() { return env_space_width(this); } int get_space_size() { return space_size; } // in ems/36 int get_sentence_space_size() { return sentence_space_size; } @@ -289,13 +335,9 @@ public: void possibly_break_line(int start_here = 0, int forced = 0); void do_break(int spread = 0); // .br void final_break(); - void add_html_tag(int, const char *); - void add_html_tag(int, const char *, int); - void add_html_tag_tabs(int); - node *make_html_tag(const char *name, int i); - node *make_html_tag(const char *); + node *make_tag(const char *name, int i); void newline(); - void handle_tab(int is_leader = 0); // do a tab or leader + void handle_tab(int is_leader = 0); // do a tab or leader void add_node(node *); void add_char(charinfo *); void add_hyphen_indicator(); @@ -307,10 +349,14 @@ public: const char *get_fill_color_string(); const char *get_font_family_string(); const char *get_font_name_string(); + const char *get_style_name_string(); const char *get_name_string(); const char *get_point_size_string(); const char *get_requested_point_size_string(); void output_pending_lines(); + void construct_format_state(node *n, int was_centered, int fill); + void construct_new_line_state(node *n); + void dump_troff_state(); friend void title_length(); friend void space_size(); diff --git a/contrib/groff-1.19/src/roff/troff/hvunits.h b/contrib/groff-1.19/src/roff/troff/hvunits.h index 8efb5ab359..99e6692eb2 100644 --- a/contrib/groff-1.19/src/roff/troff/hvunits.h +++ b/contrib/groff-1.19/src/roff/troff/hvunits.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ class vunits { diff --git a/contrib/groff-1.19/src/roff/troff/input.cpp b/contrib/groff-1.19/src/roff/troff/input.cpp index 6dbaad2038..15077e947f 100644 --- a/contrib/groff-1.19/src/roff/troff/input.cpp +++ b/contrib/groff-1.19/src/roff/troff/input.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,23 +17,26 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#define DEBUGGING #include "troff.h" #include "dictionary.h" #include "hvunits.h" +#include "stringclass.h" +#include "mtsm.h" #include "env.h" #include "request.h" #include "node.h" -#include "reg.h" #include "token.h" #include "div.h" +#include "reg.h" #include "charinfo.h" -#include "stringclass.h" -#include "font.h" #include "macropath.h" -#include "defs.h" #include "input.h" +#include "defs.h" +#include "font.h" #include "unicode.h" // Needed for getpid() and isatty() @@ -102,7 +105,7 @@ static int compatible_flag = 0; int ascii_output_flag = 0; int suppress_output_flag = 0; int is_html = 0; -int begin_level = 0; // number of nested .begin requests +int begin_level = 0; // number of nested \O escapes int have_input = 0; // whether \f, \F, \D'F...', \H, \m, \M, // \R, \s, or \S has been processed in @@ -117,6 +120,7 @@ double spread_limit = -3.0 - 1.0; // negative means deactivated double warn_scale; char warn_scaling_indicator; +int debug_state = 0; // turns on debugging of the html troff state search_path *mac_path = &safer_macro_path; @@ -154,6 +158,9 @@ class input_iterator; input_iterator *make_temp_iterator(const char *); const char *input_char_description(int); +void process_input_stack(); +void chop_macro(); // declare to avoid friend name injection + void set_escape_char() { @@ -193,9 +200,12 @@ void restore_escape_char() class input_iterator { public: input_iterator(); + input_iterator(int is_div); virtual ~input_iterator() {} int get(node **); friend class input_stack; + int is_diversion; + statem *diversion_state; protected: const unsigned char *ptr; const unsigned char *eptr; @@ -212,7 +222,6 @@ private: virtual int next_file(FILE *, const char *) { return 0; } virtual void shift(int) {} virtual int is_boundary() {return 0; } - virtual int internal_level() { return 0; } virtual int is_file() { return 0; } virtual int is_macro() { return 0; } virtual void save_compatible_flag(int) {} @@ -220,7 +229,12 @@ private: }; input_iterator::input_iterator() -: ptr(0), eptr(0) +: is_diversion(0), ptr(0), eptr(0) +{ +} + +input_iterator::input_iterator(int is_div) +: is_diversion(is_div), ptr(0), eptr(0) { } @@ -414,16 +428,21 @@ public: static int is_return_boundary(); static void remove_boundary(); static int get_level(); + static int get_div_level(); + static void increase_level(); + static void decrease_level(); static void clear(); static void pop_macro(); static void save_compatible_flag(int); static int get_compatible_flag(); - + static statem *get_diversion_state(); + static void check_end_diversion(input_iterator *t); static int limit; + static int div_level; + static statem *diversion_state; private: static input_iterator *top; static int level; - static int finish_get(node **); static int finish_peek(); }; @@ -431,10 +450,29 @@ private: input_iterator *input_stack::top = &nil_iterator; int input_stack::level = 0; int input_stack::limit = DEFAULT_INPUT_STACK_LIMIT; +int input_stack::div_level = 0; +statem *input_stack::diversion_state = NULL; +int suppress_push=0; + inline int input_stack::get_level() { - return level + top->internal_level(); + return level; +} + +inline void input_stack::increase_level() +{ + level++; +} + +inline void input_stack::decrease_level() +{ + level--; +} + +inline int input_stack::get_div_level() +{ + return div_level; } inline int input_stack::get(node **np) @@ -456,6 +494,13 @@ int input_stack::finish_get(node **np) if (top == &nil_iterator) break; input_iterator *tem = top; + check_end_diversion(tem); +#if defined(DEBUGGING) + if (debug_state) + if (tem->is_diversion) + fprintf(stderr, + "in diversion level = %d\n", input_stack::get_div_level()); +#endif top = top->next; level--; delete tem; @@ -471,6 +516,14 @@ inline int input_stack::peek() return (top->ptr < top->eptr) ? *top->ptr : finish_peek(); } +void input_stack::check_end_diversion(input_iterator *t) +{ + if (t->is_diversion) { + div_level--; + diversion_state = t->diversion_state; + } +} + int input_stack::finish_peek() { for (;;) { @@ -480,6 +533,7 @@ int input_stack::finish_peek() if (top == &nil_iterator) break; input_iterator *tem = top; + check_end_diversion(tem); top = top->next; level--; delete tem; @@ -509,6 +563,8 @@ void input_stack::remove_boundary() { assert(top->is_boundary()); input_iterator *temp = top->next; + check_end_diversion(top); + delete top; top = temp; level--; @@ -522,6 +578,38 @@ void input_stack::push(input_iterator *in) fatal("input stack limit exceeded (probable infinite loop)"); in->next = top; top = in; + if (top->is_diversion) { + div_level++; + in->diversion_state = diversion_state; + diversion_state = curenv->construct_state(0); +#if defined(DEBUGGING) + if (debug_state) { + curenv->dump_troff_state(); + fflush(stderr); + } +#endif + } +#if defined(DEBUGGING) + if (debug_state) + if (top->is_diversion) { + fprintf(stderr, + "in diversion level = %d\n", input_stack::get_div_level()); + fflush(stderr); + } +#endif +} + +statem *get_diversion_state() +{ + return input_stack::get_diversion_state(); +} + +statem *input_stack::get_diversion_state() +{ + if (diversion_state == NULL) + return NULL; + else + return new statem(diversion_state); } input_iterator *input_stack::get_arg(int i) @@ -600,6 +688,7 @@ void input_stack::end_file() for (input_iterator **pp = ⊤ *pp != &nil_iterator; pp = &(*pp)->next) if ((*pp)->is_file()) { input_iterator *tem = *pp; + check_end_diversion(tem); *pp = (*pp)->next; delete tem; level--; @@ -614,6 +703,7 @@ void input_stack::clear() if (top->is_boundary()) nboundaries++; input_iterator *tem = top; + check_end_diversion(tem); top = top->next; level--; delete tem; @@ -634,6 +724,7 @@ void input_stack::pop_macro() nboundaries++; is_macro = top->is_macro(); input_iterator *tem = top; + check_end_diversion(tem); top = top->next; level--; delete tem; @@ -834,6 +925,28 @@ static int get_copy(node **nd, int defining) { for (;;) { int c = input_stack::get(nd); + if (c == PUSH_GROFF_MODE) { + input_stack::save_compatible_flag(compatible_flag); + compatible_flag = 0; + continue; + } + if (c == PUSH_COMP_MODE) { + input_stack::save_compatible_flag(compatible_flag); + compatible_flag = 1; + continue; + } + if (c == POP_GROFFCOMP_MODE) { + compatible_flag = input_stack::get_compatible_flag(); + continue; + } + if (c == BEGIN_QUOTE) { + input_stack::increase_level(); + continue; + } + if (c == END_QUOTE) { + input_stack::decrease_level(); + continue; + } if (c == ESCAPE_NEWLINE) { if (defining) return c; @@ -996,6 +1109,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; int non_interpreted_char_node::same(node *nd) @@ -1013,6 +1127,11 @@ int non_interpreted_char_node::force_tprint() return 0; } +int non_interpreted_char_node::is_tag() +{ + return 0; +} + non_interpreted_char_node::non_interpreted_char_node(unsigned char n) : c(n) { assert(n != 0); @@ -1460,6 +1579,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; token_node::token_node(const token &t) : tk(t) @@ -1491,6 +1611,11 @@ int token_node::force_tprint() return 0; } +int token_node::is_tag() +{ + return 0; +} + token::token() : nd(0), type(TOKEN_EMPTY) { } @@ -1557,13 +1682,23 @@ void token::next() if (cc != escape_char || escape_char == 0) { handle_normal_char: switch(cc) { - case COMPATIBLE_SAVE: + case PUSH_GROFF_MODE: input_stack::save_compatible_flag(compatible_flag); compatible_flag = 0; continue; - case COMPATIBLE_RESTORE: + case PUSH_COMP_MODE: + input_stack::save_compatible_flag(compatible_flag); + compatible_flag = 1; + continue; + case POP_GROFFCOMP_MODE: compatible_flag = input_stack::get_compatible_flag(); continue; + case BEGIN_QUOTE: + input_stack::increase_level(); + continue; + case END_QUOTE: + input_stack::decrease_level(); + continue; case EOF: type = TOKEN_EOF; return; @@ -2534,12 +2669,16 @@ int node::reread(int *) return 0; } +int global_diverted_space = 0; + int diverted_space_node::reread(int *bolp) { + global_diverted_space = 1; if (curenv->get_fill()) trapping_blank_line(); else curdiv->space(n); + global_diverted_space = 0; *bolp = 1; return 1; } @@ -2596,10 +2735,33 @@ void process_input_stack() tok.next(); } while (tok.white_space()); symbol nm = get_name(); +#if defined(DEBUGGING) + if (debug_state) { + if (! nm.is_null()) { + if (strcmp(nm.contents(), "test") == 0) { + fprintf(stderr, "found it!\n"); + fflush(stderr); + } + fprintf(stderr, "interpreting [%s]", nm.contents()); + if (strcmp(nm.contents(), "di") == 0 && topdiv != curdiv) + fprintf(stderr, " currently in diversion: %s", + curdiv->get_diversion_name()); + fprintf(stderr, "\n"); + fflush(stderr); + } + } +#endif if (nm.is_null()) skip_line(); - else + else { interpolate_macro(nm); +#if defined(DEBUGGING) + if (debug_state) { + fprintf(stderr, "finished interpreting [%s] and environment state is\n", nm.contents()); + curenv->dump_troff_state(); + } +#endif + } suppress_next = 1; } else { @@ -2607,6 +2769,11 @@ void process_input_stack() ; else { for (;;) { +#if defined(DEBUGGING) + if (debug_state) { + fprintf(stderr, "found [%c]\n", ch); fflush(stderr); + } +#endif curenv->add_char(charset_table[ch]); tok.next(); if (tok.type != token::TOKEN_CHAR) @@ -2984,6 +3151,7 @@ macro::~macro() } macro::macro() +: is_a_diversion(0) { if (!input_stack::get_location(1, &filename, &lineno)) { filename = 0; @@ -2995,13 +3163,30 @@ macro::macro() } macro::macro(const macro &m) -: p(m.p), filename(m.filename), lineno(m.lineno), len(m.len), - empty_macro(m.empty_macro) +: filename(m.filename), lineno(m.lineno), len(m.len), + empty_macro(m.empty_macro), is_a_diversion(m.is_a_diversion), p(m.p) { if (p != 0) p->count++; } +macro::macro(int is_div) + : is_a_diversion(is_div) +{ + if (!input_stack::get_location(1, &filename, &lineno)) { + filename = 0; + lineno = 0; + } + len = 0; + empty_macro = 1; + p = 0; +} + +int macro::is_diversion() +{ + return is_a_diversion; +} + macro ¯o::operator=(const macro &m) { // don't assign object @@ -3014,6 +3199,7 @@ macro ¯o::operator=(const macro &m) lineno = m.lineno; len = m.len; empty_macro = m.empty_macro; + is_a_diversion = m.is_a_diversion; return *this; } @@ -3030,7 +3216,7 @@ void macro::append(unsigned char c) } p->cl.append(c); ++len; - if (c != COMPATIBLE_SAVE && c != COMPATIBLE_RESTORE) + if (c != PUSH_GROFF_MODE && c != PUSH_COMP_MODE && c != POP_GROFFCOMP_MODE) empty_macro = 0; } @@ -3164,11 +3350,12 @@ public: void backtrace(); void save_compatible_flag(int f) { saved_compatible_flag = f; } int get_compatible_flag() { return saved_compatible_flag; } + int is_diversion(); }; string_iterator::string_iterator(const macro &m, const char *p, symbol s) -: mac(m), how_invoked(p), - newline_flag(0), lineno(1), nm(s) +: input_iterator(m.is_a_diversion), mac(m), how_invoked(p), newline_flag(0), + lineno(1), nm(s) { count = mac.len; if (count != 0) { @@ -3194,6 +3381,11 @@ string_iterator::string_iterator() count = 0; } +int string_iterator::is_diversion() +{ + return mac.is_diversion(); +} + int string_iterator::fill(node **np) { if (newline_flag) @@ -3207,8 +3399,13 @@ int string_iterator::fill(node **np) p = bp->s; } if (*p == '\0') { - if (np) + if (np) { *np = nd->copy(); + if (is_diversion()) + (*np)->div_nest_level = input_stack::get_div_level(); + else + (*np)->div_nest_level = 0; + } nd = nd->next; eptr = ptr = p + 1; count--; @@ -3396,6 +3593,7 @@ public: void add_arg(const macro &m); void shift(int n); int is_macro() { return 1; } + int is_diversion(); }; input_iterator *macro_iterator::get_arg(int i) @@ -3519,12 +3717,13 @@ static void decode_args(macro_iterator *mi) macro arg; int quote_input_level = 0; int done_tab_warning = 0; - if (c == '\"') { + if (c == '"') { quote_input_level = input_stack::get_level(); c = get_copy(&n); } + arg.append(compatible_flag ? PUSH_COMP_MODE : PUSH_GROFF_MODE); while (c != EOF && c != '\n' && !(c == ' ' && quote_input_level == 0)) { - if (quote_input_level > 0 && c == '\"' + if (quote_input_level > 0 && c == '"' && (compatible_flag || input_stack::get_level() == quote_input_level)) { c = get_copy(&n); @@ -3548,6 +3747,7 @@ static void decode_args(macro_iterator *mi) c = get_copy(&n); } } + arg.append(POP_GROFFCOMP_MODE); mi->add_arg(arg); } } @@ -3569,14 +3769,14 @@ static void decode_string_args(macro_iterator *mi) macro arg; int quote_input_level = 0; int done_tab_warning = 0; - if (c == '\"') { + if (c == '"') { quote_input_level = input_stack::get_level(); c = get_copy(&n); } while (c != EOF && c != '\n' && !(c == ']' && quote_input_level == 0) && !(c == ' ' && quote_input_level == 0)) { - if (quote_input_level > 0 && c == '\"' + if (quote_input_level > 0 && c == '"' && input_stack::get_level() == quote_input_level) { c = get_copy(&n); if (c == '"') { @@ -3828,7 +4028,7 @@ void read_request() enum define_mode { DEFINE_NORMAL, DEFINE_APPEND, DEFINE_IGNORE }; enum calling_mode { CALLING_NORMAL, CALLING_INDIRECT }; -enum comp_mode { COMP_IGNORE, COMP_DISABLE }; +enum comp_mode { COMP_IGNORE, COMP_DISABLE, COMP_ENABLE }; void do_define_string(define_mode mode, comp_mode comp) { @@ -3861,7 +4061,9 @@ void do_define_string(define_mode mode, comp_mode comp) if (mode == DEFINE_APPEND && mm) mac = *mm; if (comp == COMP_DISABLE) - mac.append(COMPATIBLE_SAVE); + mac.append(PUSH_GROFF_MODE); + else if (comp == COMP_ENABLE) + mac.append(PUSH_COMP_MODE); while (c != '\n' && c != EOF) { if (c == 0) mac.append(n); @@ -3873,15 +4075,16 @@ void do_define_string(define_mode mode, comp_mode comp) mm = new macro; request_dictionary.define(nm, mm); } - if (comp == COMP_DISABLE) - mac.append(COMPATIBLE_RESTORE); + if (comp == COMP_DISABLE || comp == COMP_ENABLE) + mac.append(POP_GROFFCOMP_MODE); *mm = mac; tok.next(); } void define_string() { - do_define_string(DEFINE_NORMAL, COMP_IGNORE); + do_define_string(DEFINE_NORMAL, + compatible_flag ? COMP_ENABLE: COMP_IGNORE); } void define_nocomp_string() @@ -3891,7 +4094,8 @@ void define_nocomp_string() void append_string() { - do_define_string(DEFINE_APPEND, COMP_IGNORE); + do_define_string(DEFINE_APPEND, + compatible_flag ? COMP_ENABLE : COMP_IGNORE); } void append_nocomp_string() @@ -4003,26 +4207,6 @@ static void interpolate_string_with_args(symbol s) } } -/* This class is used for the implementation of \$@. It is used for -each of the closing double quotes. It artificially increases the -input level by 2, so that the closing double quote will appear to have -the same input level as the opening quote. */ - -class end_quote_iterator : public input_iterator { - unsigned char buf[1]; -public: - end_quote_iterator(); - ~end_quote_iterator() { } - int internal_level() { return 2; } -}; - -end_quote_iterator::end_quote_iterator() -{ - buf[0] = '"'; - ptr = buf; - eptr = buf + 1; -} - static void interpolate_arg(symbol nm) { const char *s = nm.contents(); @@ -4031,17 +4215,39 @@ static void interpolate_arg(symbol nm) else if (s[1] == 0 && csdigit(s[0])) input_stack::push(input_stack::get_arg(s[0] - '0')); else if (s[0] == '*' && s[1] == '\0') { - for (int i = input_stack::nargs(); i > 0; i--) { - input_stack::push(input_stack::get_arg(i)); - if (i != 1) - input_stack::push(make_temp_iterator(" ")); + int limit = input_stack::nargs(); + string args; + for (int i = 1; i <= limit; i++) { + input_iterator *p = input_stack::get_arg(i); + int c; + while ((c = p->get(0)) != EOF) + args += c; + if (i != limit) + args += ' '; + } + if (limit > 0) { + args += '\0'; + input_stack::push(make_temp_iterator(args.contents())); } } else if (s[0] == '@' && s[1] == '\0') { - for (int i = input_stack::nargs(); i > 0; i--) { - input_stack::push(new end_quote_iterator); - input_stack::push(input_stack::get_arg(i)); - input_stack::push(make_temp_iterator(i == 1 ? "\"" : " \"")); + int limit = input_stack::nargs(); + string args; + for (int i = 1; i <= limit; i++) { + args += '"'; + args += BEGIN_QUOTE; + input_iterator *p = input_stack::get_arg(i); + int c; + while ((c = p->get(0)) != EOF) + args += c; + args += END_QUOTE; + args += '"'; + if (i != limit) + args += ' '; + } + if (limit > 0) { + args += '\0'; + input_stack::push(make_temp_iterator(args.contents())); } } else { @@ -4148,7 +4354,9 @@ void do_define_macro(define_mode mode, calling_mode calling, comp_mode comp) } int bol = 1; if (comp == COMP_DISABLE) - mac.append(COMPATIBLE_SAVE); + mac.append(PUSH_GROFF_MODE); + else if (comp == COMP_ENABLE) + mac.append(PUSH_COMP_MODE); for (;;) { while (c == ESCAPE_NEWLINE) { if (mode == DEFINE_NORMAL || mode == DEFINE_APPEND) @@ -4184,8 +4392,8 @@ void do_define_macro(define_mode mode, calling_mode calling, comp_mode comp) mm = new macro; request_dictionary.define(nm, mm); } - if (comp == COMP_DISABLE) - mac.append(COMPATIBLE_RESTORE); + if (comp == COMP_DISABLE || comp == COMP_ENABLE) + mac.append(POP_GROFFCOMP_MODE); *mm = mac; } if (term != dot_symbol) { @@ -4235,7 +4443,8 @@ void do_define_macro(define_mode mode, calling_mode calling, comp_mode comp) void define_macro() { - do_define_macro(DEFINE_NORMAL, CALLING_NORMAL, COMP_IGNORE); + do_define_macro(DEFINE_NORMAL, CALLING_NORMAL, + compatible_flag ? COMP_ENABLE : COMP_IGNORE); } void define_nocomp_macro() @@ -4245,7 +4454,8 @@ void define_nocomp_macro() void define_indirect_macro() { - do_define_macro(DEFINE_NORMAL, CALLING_INDIRECT, COMP_IGNORE); + do_define_macro(DEFINE_NORMAL, CALLING_INDIRECT, + compatible_flag ? COMP_ENABLE : COMP_IGNORE); } void define_indirect_nocomp_macro() @@ -4255,7 +4465,8 @@ void define_indirect_nocomp_macro() void append_macro() { - do_define_macro(DEFINE_APPEND, CALLING_NORMAL, COMP_IGNORE); + do_define_macro(DEFINE_APPEND, CALLING_NORMAL, + compatible_flag ? COMP_ENABLE : COMP_IGNORE); } void append_nocomp_macro() @@ -4265,7 +4476,8 @@ void append_nocomp_macro() void append_indirect_macro() { - do_define_macro(DEFINE_APPEND, CALLING_INDIRECT, COMP_IGNORE); + do_define_macro(DEFINE_APPEND, CALLING_INDIRECT, + compatible_flag ? COMP_ENABLE : COMP_IGNORE); } void append_indirect_nocomp_macro() @@ -4330,11 +4542,12 @@ void chop_macro() // we have to check for additional save/restore pairs which could be // there due to empty am1 requests. for (;;) { - if (m->get(m->len - 1) != COMPATIBLE_RESTORE) + if (m->get(m->len - 1) != POP_GROFFCOMP_MODE) break; have_restore = 1; m->len -= 1; - if (m->get(m->len - 1) != COMPATIBLE_SAVE) + if (m->get(m->len - 1) != PUSH_GROFF_MODE + && m->get(m->len - 1) != PUSH_COMP_MODE) break; have_restore = 0; m->len -= 1; @@ -4345,7 +4558,7 @@ void chop_macro() error("cannot chop empty macro"); else { if (have_restore) - m->set(COMPATIBLE_RESTORE, m->len - 1); + m->set(POP_GROFFCOMP_MODE, m->len - 1); else m->len -= 1; } @@ -4370,7 +4583,9 @@ void substring_request() string_iterator iter1(*m); for (int l = 0; l < m->len; l++) { int c = iter1.get(0); - if (c == COMPATIBLE_SAVE || c == COMPATIBLE_RESTORE) + if (c == PUSH_GROFF_MODE + || c == PUSH_COMP_MODE + || c == POP_GROFFCOMP_MODE) continue; if (c == EOF) break; @@ -4412,7 +4627,9 @@ void substring_request() int i; for (i = 0; i < start; i++) { int c = iter.get(0); - while (c == COMPATIBLE_SAVE || c == COMPATIBLE_RESTORE) + while (c == PUSH_GROFF_MODE + || c == PUSH_COMP_MODE + || c == POP_GROFFCOMP_MODE) c = iter.get(0); if (c == EOF) break; @@ -4421,7 +4638,9 @@ void substring_request() for (; i <= end; i++) { node *nd = 0; // pacify compiler int c = iter.get(&nd); - while (c == COMPATIBLE_SAVE || c == COMPATIBLE_RESTORE) + while (c == PUSH_GROFF_MODE + || c == PUSH_COMP_MODE + || c == POP_GROFFCOMP_MODE) c = iter.get(0); if (c == EOF) break; @@ -4887,6 +5106,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; non_interpreted_node::non_interpreted_node(const macro &m) : mac(m) @@ -4913,6 +5133,11 @@ int non_interpreted_node::force_tprint() return 0; } +int non_interpreted_node::is_tag() +{ + return 0; +} + node *non_interpreted_node::copy() { return new non_interpreted_node(mac); @@ -5270,6 +5495,24 @@ int do_if_request() result = character_exists(ci, curenv); tok.next(); } + else if (c == 'F') { + tok.next(); + symbol nm = get_long_name(1); + if (nm.is_null()) { + skip_alternative(); + return 0; + } + result = check_font(curenv->get_family()->nm, nm); + } + else if (c == 'S') { + tok.next(); + symbol nm = get_long_name(1); + if (nm.is_null()) { + skip_alternative(); + return 0; + } + result = check_style(nm); + } else if (tok.space()) result = 0; else if (tok.delimiter()) { @@ -5279,6 +5522,7 @@ int do_if_request() environment env2(curenv); environment *oldenv = curenv; curenv = &env1; + suppress_push = 1; for (int i = 0; i < 2; i++) { for (;;) { tok.next(); @@ -5302,6 +5546,7 @@ int do_if_request() delete_node_list(n2); curenv = oldenv; have_input = 0; + suppress_push = 0; tok.next(); } else { @@ -5761,8 +6006,9 @@ const char *asciify(int c) case ESCAPE_COLON: buf[1] = ':'; break; - case COMPATIBLE_SAVE: - case COMPATIBLE_RESTORE: + case PUSH_GROFF_MODE: + case PUSH_COMP_MODE: + case POP_GROFFCOMP_MODE: buf[0] = '\0'; break; default: @@ -5813,6 +6059,52 @@ const char *input_char_description(int c) return buf; } +void tag() +{ + if (!tok.newline() && !tok.eof()) { + string s; + int c; + for (;;) { + c = get_copy(0); + if (c == '"') { + c = get_copy(0); + break; + } + if (c != ' ' && c != '\t') + break; + } + s = "x X "; + for (; c != '\n' && c != EOF; c = get_copy(0)) + s += (char)c; + s += '\n'; + curenv->add_node(new tag_node(s, 0)); + } + tok.next(); +} + +void taga() +{ + if (!tok.newline() && !tok.eof()) { + string s; + int c; + for (;;) { + c = get_copy(0); + if (c == '"') { + c = get_copy(0); + break; + } + if (c != ' ' && c != '\t') + break; + } + s = "x X "; + for (; c != '\n' && c != EOF; c = get_copy(0)) + s += (char)c; + s += '\n'; + curenv->add_node(new tag_node(s, 1)); + } + tok.next(); +} + // .tm, .tm1, and .tmc void do_terminal(int newline, int string_like) @@ -6981,8 +7273,12 @@ int main(int argc, char **argv) { "version", no_argument, 0, 'v' }, { 0, 0, 0, 0 } }; - while ((c = getopt_long(argc, argv, "abciI:vw:W:zCEf:m:n:o:r:d:F:M:T:tqs:RU", - long_options, 0)) +#if defined(DEBUGGING) +#define DEBUG_OPTION "D" +#endif + while ((c = getopt_long(argc, argv, + "abciI:vw:W:zCEf:m:n:o:r:d:F:M:T:tqs:RU" + DEBUG_OPTION, long_options, 0)) != EOF) switch(c) { case 'v': @@ -7075,6 +7371,11 @@ int main(int argc, char **argv) case 'U': safer_flag = 0; // unsafe behaviour break; +#if defined(DEBUGGING) + case 'D': + debug_state = 1; + break; +#endif case CHAR_MAX + 1: // --help usage(stdout, argv[0]); exit(0); @@ -7310,6 +7611,8 @@ void init_input_requests() init_request("spreadwarn", spreadwarn_request); init_request("substring", substring_request); init_request("sy", system_request); + init_request("tag", tag); + init_request("taga", taga); init_request("tm", terminal); init_request("tm1", terminal1); init_request("tmc", terminal_continue); diff --git a/contrib/groff-1.19/src/roff/troff/input.h b/contrib/groff-1.19/src/roff/troff/input.h index 8d06574e2d..ba6e2e13d1 100644 --- a/contrib/groff-1.19/src/roff/troff/input.h +++ b/contrib/groff-1.19/src/roff/troff/input.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ /* special character codes */ @@ -54,8 +54,11 @@ const int LAST_PAGE_EJECTOR = 0205; const int ESCAPE_RIGHT_PARENTHESIS = 0206; const int ESCAPE_TILDE = 0207; const int ESCAPE_COLON = 0210; -const int COMPATIBLE_SAVE = 0211; -const int COMPATIBLE_RESTORE = 0212; +const int PUSH_GROFF_MODE = 0211; +const int PUSH_COMP_MODE = 0212; +const int POP_GROFFCOMP_MODE = 0213; +const int BEGIN_QUOTE = 0214; +const int END_QUOTE = 0215; #else /* IS_EBCDIC_HOST */ @@ -90,7 +93,13 @@ const int LAST_PAGE_EJECTOR = 065; const int ESCAPE_RIGHT_PARENTHESIS = 066; const int ESCAPE_TILDE = 067; const int ESCAPE_COLON = 070; -const int COMPATIBLE_SAVE = 071; -const int COMPATIBLE_RESTORE = 072; +const int PUSH_GROFF_MODE = 071; +const int PUSH_COMP_MODE = 072; +const int POP_GROFFCOMP_MODE = 073; +const int BEGIN_QUOTE = 074; +const int END_QUOTE = 075; #endif /* IS_EBCDIC_HOST */ + +extern void do_glyph_color(symbol); +extern void do_fill_color(symbol); diff --git a/contrib/groff-1.19/src/roff/troff/mtsm.cpp b/contrib/groff-1.19/src/roff/troff/mtsm.cpp new file mode 100644 index 0000000000..630e973209 --- /dev/null +++ b/contrib/groff-1.19/src/roff/troff/mtsm.cpp @@ -0,0 +1,632 @@ +// -*- C++ -*- +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. + Written by Gaius Mulley (gaius@glam.ac.uk) + +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, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#define DEBUGGING + +extern int debug_state; + +#include "troff.h" +#include "hvunits.h" +#include "stringclass.h" +#include "mtsm.h" +#include "env.h" + +static int no_of_statems = 0; // debugging aid + +int_value::int_value() +: value(0), is_known(0) +{ +} + +int_value::~int_value() +{ +} + +void int_value::diff(FILE *fp, const char *s, int_value compare) +{ + if (differs(compare)) { + fputs("x X ", fp); + fputs(s, fp); + fputs(" ", fp); + fputs(i_to_a(compare.value), fp); + fputs("\n", fp); + value = compare.value; + is_known = 1; + if (debug_state) + fflush(fp); + } +} + +void int_value::set(int v) +{ + is_known = 1; + value = v; +} + +void int_value::unset() +{ + is_known = 0; +} + +void int_value::set_if_unknown(int v) +{ + if (!is_known) + set(v); +} + +int int_value::differs(int_value compare) +{ + return compare.is_known + && (!is_known || value != compare.value); +} + +bool_value::bool_value() +{ +} + +bool_value::~bool_value() +{ +} + +void bool_value::diff(FILE *fp, const char *s, bool_value compare) +{ + if (differs(compare)) { + fputs("x X ", fp); + fputs(s, fp); + fputs("\n", fp); + value = compare.value; + is_known = 1; + if (debug_state) + fflush(fp); + } +} + +units_value::units_value() +{ +} + +units_value::~units_value() +{ +} + +void units_value::diff(FILE *fp, const char *s, units_value compare) +{ + if (differs(compare)) { + fputs("x X ", fp); + fputs(s, fp); + fputs(" ", fp); + fputs(i_to_a(compare.value), fp); + fputs("\n", fp); + value = compare.value; + is_known = 1; + if (debug_state) + fflush(fp); + } +} + +void units_value::set(hunits v) +{ + is_known = 1; + value = v.to_units(); +} + +int units_value::differs(units_value compare) +{ + return compare.is_known + && (!is_known || value != compare.value); +} + +string_value::string_value() +: value(string("")), is_known(0) +{ +} + +string_value::~string_value() +{ +} + +void string_value::diff(FILE *fp, const char *s, string_value compare) +{ + if (differs(compare)) { + fputs("x X ", fp); + fputs(s, fp); + fputs(" ", fp); + fputs(compare.value.contents(), fp); + fputs("\n", fp); + value = compare.value; + is_known = 1; + } +} + +void string_value::set(string v) +{ + is_known = 1; + value = v; +} + +void string_value::unset() +{ + is_known = 0; +} + +int string_value::differs(string_value compare) +{ + return compare.is_known + && (!is_known || value != compare.value); +} + +statem::statem() +{ + issue_no = no_of_statems; + no_of_statems++; +} + +statem::statem(statem *copy) +{ + int i; + for (i = 0; i < LAST_BOOL; i++) + bool_values[i] = copy->bool_values[i]; + for (i = 0; i < LAST_INT; i++) + int_values[i] = copy->int_values[i]; + for (i = 0; i < LAST_UNITS; i++) + units_values[i] = copy->units_values[i]; + for (i = 0; i < LAST_STRING; i++) + string_values[i] = copy->string_values[i]; + issue_no = copy->issue_no; +} + +statem::~statem() +{ +} + +void statem::flush(FILE *fp, statem *compare) +{ + int_values[MTSM_FI].diff(fp, "devtag:.fi", + compare->int_values[MTSM_FI]); + int_values[MTSM_RJ].diff(fp, "devtag:.rj", + compare->int_values[MTSM_RJ]); + int_values[MTSM_SP].diff(fp, "devtag:.sp", + compare->int_values[MTSM_SP]); + units_values[MTSM_IN].diff(fp, "devtag:.in", + compare->units_values[MTSM_IN]); + units_values[MTSM_LL].diff(fp, "devtag:.ll", + compare->units_values[MTSM_LL]); + units_values[MTSM_PO].diff(fp, "devtag:.po", + compare->units_values[MTSM_PO]); + string_values[MTSM_TA].diff(fp, "devtag:.ta", + compare->string_values[MTSM_TA]); + units_values[MTSM_TI].diff(fp, "devtag:.ti", + compare->units_values[MTSM_TI]); + int_values[MTSM_CE].diff(fp, "devtag:.ce", + compare->int_values[MTSM_CE]); + bool_values[MTSM_EOL].diff(fp, "devtag:.eol", + compare->bool_values[MTSM_EOL]); + bool_values[MTSM_BR].diff(fp, "devtag:.br", + compare->bool_values[MTSM_BR]); + if (debug_state) { + fprintf(stderr, "compared state %d\n", compare->issue_no); + fflush(stderr); + } +} + +void statem::add_tag(int_value_state t, int v) +{ + int_values[t].set(v); +} + +void statem::add_tag(units_value_state t, hunits v) +{ + units_values[t].set(v); +} + +void statem::add_tag(bool_value_state t) +{ + bool_values[t].set(1); +} + +void statem::add_tag(string_value_state t, string v) +{ + string_values[t].set(v); +} + +void statem::add_tag_if_unknown(int_value_state t, int v) +{ + int_values[t].set_if_unknown(v); +} + +void statem::sub_tag_ce() +{ + int_values[MTSM_CE].unset(); +} + +/* + * add_tag_ta - add the tab settings to the minimum troff state machine + */ + +void statem::add_tag_ta() +{ + if (is_html) { + string s = string(""); + hunits d, l; + enum tab_type t; + do { + t = curenv->tabs.distance_to_next_tab(l, &d); + l += d; + switch (t) { + case TAB_LEFT: + s += " L "; + s += as_string(l.to_units()); + break; + case TAB_CENTER: + s += " C "; + s += as_string(l.to_units()); + break; + case TAB_RIGHT: + s += " R "; + s += as_string(l.to_units()); + break; + case TAB_NONE: + break; + } + } while (t != TAB_NONE && l < curenv->get_line_length()); + s += '\0'; + string_values[MTSM_TA].set(s); + } +} + +void statem::update(statem *older, statem *newer, int_value_state t) +{ + if (newer->int_values[t].differs(older->int_values[t]) + && !newer->int_values[t].is_known) + newer->int_values[t].set(older->int_values[t].value); +} + +void statem::update(statem *older, statem *newer, units_value_state t) +{ + if (newer->units_values[t].differs(older->units_values[t]) + && !newer->units_values[t].is_known) + newer->units_values[t].set(older->units_values[t].value); +} + +void statem::update(statem *older, statem *newer, bool_value_state t) +{ + if (newer->bool_values[t].differs(older->bool_values[t]) + && !newer->bool_values[t].is_known) + newer->bool_values[t].set(older->bool_values[t].value); +} + +void statem::update(statem *older, statem *newer, string_value_state t) +{ + if (newer->string_values[t].differs(older->string_values[t]) + && !newer->string_values[t].is_known) + newer->string_values[t].set(older->string_values[t].value); +} + +void statem::merge(statem *newer, statem *older) +{ + if (newer == 0 || older == 0) + return; + update(older, newer, MTSM_EOL); + update(older, newer, MTSM_BR); + update(older, newer, MTSM_FI); + update(older, newer, MTSM_LL); + update(older, newer, MTSM_PO); + update(older, newer, MTSM_RJ); + update(older, newer, MTSM_SP); + update(older, newer, MTSM_TA); + update(older, newer, MTSM_TI); + update(older, newer, MTSM_CE); +} + +stack::stack() +: next(0), state(0) +{ +} + +stack::stack(statem *s, stack *n) +: next(n), state(s) +{ +} + +stack::~stack() +{ + if (state) + delete state; + if (next) + delete next; +} + +mtsm::mtsm() +: sp(0) +{ + driver = new statem(); +} + +mtsm::~mtsm() +{ + delete driver; + if (sp) + delete sp; +} + +/* + * push_state - push the current troff state and use `n' as + * the new troff state. + */ + +void mtsm::push_state(statem *n) +{ + if (is_html) { +#if defined(DEBUGGING) + if (debug_state) + fprintf(stderr, "--> state %d pushed\n", n->issue_no) ; fflush(stderr); +#endif + sp = new stack(n, sp); + } +} + +void mtsm::pop_state() +{ + if (is_html) { +#if defined(DEBUGGING) + if (debug_state) + fprintf(stderr, "--> state popped\n") ; fflush(stderr); +#endif + if (sp == 0) + fatal("empty state machine stack"); + if (sp->state) + delete sp->state; + sp->state = 0; + stack *t = sp; + sp = sp->next; + t->next = 0; + delete t; + } +} + +/* + * inherit - scan the stack and collects inherited values. + */ + +void mtsm::inherit(statem *s, int reset_bool) +{ + if (sp && sp->state) { + if (s->units_values[MTSM_IN].is_known + && sp->state->units_values[MTSM_IN].is_known) + s->units_values[MTSM_IN].value += sp->state->units_values[MTSM_IN].value; + s->update(sp->state, s, MTSM_FI); + s->update(sp->state, s, MTSM_LL); + s->update(sp->state, s, MTSM_PO); + s->update(sp->state, s, MTSM_RJ); + s->update(sp->state, s, MTSM_TA); + s->update(sp->state, s, MTSM_TI); + s->update(sp->state, s, MTSM_CE); + if (sp->state->bool_values[MTSM_BR].is_known + && sp->state->bool_values[MTSM_BR].value) { + if (reset_bool) + sp->state->bool_values[MTSM_BR].set(0); + s->bool_values[MTSM_BR].set(1); + if (debug_state) + fprintf(stderr, "inherited br from pushed state %d\n", + sp->state->issue_no); + } + else if (s->bool_values[MTSM_BR].is_known + && s->bool_values[MTSM_BR].value) + if (! s->int_values[MTSM_CE].is_known) + s->bool_values[MTSM_BR].unset(); + if (sp->state->bool_values[MTSM_EOL].is_known + && sp->state->bool_values[MTSM_EOL].value) { + if (reset_bool) + sp->state->bool_values[MTSM_EOL].set(0); + s->bool_values[MTSM_EOL].set(1); + } + } +} + +void mtsm::flush(FILE *fp, statem *s, string tag_list) +{ + if (is_html && s) { + inherit(s, 1); + driver->flush(fp, s); + // Set rj, ce, ti to unknown if they were known and + // we have seen an eol or br. This ensures that these values + // are emitted during the next glyph (as they step from n..0 + // at each newline). + if ((driver->bool_values[MTSM_EOL].is_known + && driver->bool_values[MTSM_EOL].value) + || (driver->bool_values[MTSM_BR].is_known + && driver->bool_values[MTSM_BR].value)) { + if (driver->units_values[MTSM_TI].is_known) + driver->units_values[MTSM_TI].is_known = 0; + if (driver->int_values[MTSM_RJ].is_known + && driver->int_values[MTSM_RJ].value > 0) + driver->int_values[MTSM_RJ].is_known = 0; + if (driver->int_values[MTSM_CE].is_known + && driver->int_values[MTSM_CE].value > 0) + driver->int_values[MTSM_CE].is_known = 0; + } + // reset the boolean values + driver->bool_values[MTSM_BR].set(0); + driver->bool_values[MTSM_EOL].set(0); + // reset space value + driver->int_values[MTSM_SP].set(0); + // lastly write out any direct tag entries + if (tag_list != string("")) { + string t = tag_list + '\0'; + fputs(t.contents(), fp); + } + } +} + +/* + * display_state - dump out a synopsis of the state to stderr. + */ + +void statem::display_state() +{ + fprintf(stderr, " "); + fflush(stderr); +} + +int mtsm::has_changed(int_value_state t, statem *s) +{ + return driver->int_values[t].differs(s->int_values[t]); +} + +int mtsm::has_changed(units_value_state t, statem *s) +{ + return driver->units_values[t].differs(s->units_values[t]); +} + +int mtsm::has_changed(bool_value_state t, statem *s) +{ + return driver->bool_values[t].differs(s->bool_values[t]); +} + +int mtsm::has_changed(string_value_state t, statem *s) +{ + return driver->string_values[t].differs(s->string_values[t]); +} + +int mtsm::changed(statem *s) +{ + if (s == 0 || !is_html) + return 0; + s = new statem(s); + inherit(s, 0); + int result = has_changed(MTSM_EOL, s) + || has_changed(MTSM_BR, s) + || has_changed(MTSM_FI, s) + || has_changed(MTSM_IN, s) + || has_changed(MTSM_LL, s) + || has_changed(MTSM_PO, s) + || has_changed(MTSM_RJ, s) + || has_changed(MTSM_SP, s) + || has_changed(MTSM_TA, s) + || has_changed(MTSM_CE, s); + delete s; + return result; +} + +void mtsm::add_tag(FILE *fp, string s) +{ + fflush(fp); + s += '\0'; + fputs(s.contents(), fp); +} + +/* + * state_set class + */ + +state_set::state_set() +: boolset(0), intset(0), unitsset(0), stringset(0) +{ +} + +state_set::~state_set() +{ +} + +void state_set::incl(bool_value_state b) +{ + boolset |= 1 << (int)b; +} + +void state_set::incl(int_value_state i) +{ + intset |= 1 << (int)i; +} + +void state_set::incl(units_value_state u) +{ + unitsset |= 1 << (int)u; +} + +void state_set::incl(string_value_state s) +{ + stringset |= 1 << (int)s; +} + +void state_set::excl(bool_value_state b) +{ + boolset &= ~(1 << (int)b); +} + +void state_set::excl(int_value_state i) +{ + intset &= ~(1 << (int)i); +} + +void state_set::excl(units_value_state u) +{ + unitsset &= ~(1 << (int)u); +} + +void state_set::excl(string_value_state s) +{ + stringset &= ~(1 << (int)s); +} + +int state_set::is_in(bool_value_state b) +{ + return (boolset & (1 << (int)b)) != 0; +} + +int state_set::is_in(int_value_state i) +{ + return (intset & (1 << (int)i)) != 0; +} + +int state_set::is_in(units_value_state u) +{ + return (unitsset & (1 << (int)u) != 0); +} + +int state_set::is_in(string_value_state s) +{ + return (stringset & (1 << (int)s) != 0); +} + +void state_set::add(units_value_state, int n) +{ + unitsset += n; +} + +units state_set::val(units_value_state) +{ + return unitsset; +} diff --git a/contrib/groff-1.19/src/roff/troff/mtsm.h b/contrib/groff-1.19/src/roff/troff/mtsm.h new file mode 100644 index 0000000000..9ef909c39b --- /dev/null +++ b/contrib/groff-1.19/src/roff/troff/mtsm.h @@ -0,0 +1,164 @@ +// -*- C++ -*- +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. + * + * mtsm.h + * + * written by Gaius Mulley (gaius@glam.ac.uk) + * + * provides a minimal troff state machine which is necessary to + * emit meta tags for the post-grohtml device driver. + */ + +/* +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, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ + +struct int_value { + int value; + int is_known; + int_value(); + ~int_value(); + void diff(FILE *, const char *, int_value); + int differs(int_value); + void set(int); + void unset(); + void set_if_unknown(int); +}; + +struct bool_value : public int_value { + bool_value(); + ~bool_value(); + void diff(FILE *, const char *, bool_value); +}; + +struct units_value : public int_value { + units_value(); + ~units_value(); + void diff(FILE *, const char *, units_value); + int differs(units_value); + void set(hunits); +}; + +struct string_value { + string value; + int is_known; + string_value(); + ~string_value(); + void diff(FILE *, const char *, string_value); + int differs(string_value); + void set(string); + void unset(); +}; + +enum bool_value_state { + MTSM_EOL, + MTSM_BR, + LAST_BOOL +}; +enum int_value_state { + MTSM_FI, + MTSM_RJ, + MTSM_CE, + MTSM_SP, + LAST_INT +}; +enum units_value_state { + MTSM_IN, + MTSM_LL, + MTSM_PO, + MTSM_TI, + LAST_UNITS +}; +enum string_value_state { + MTSM_TA, + LAST_STRING +}; + +struct statem { + int issue_no; + bool_value bool_values[LAST_BOOL]; + int_value int_values[LAST_INT]; + units_value units_values[LAST_UNITS]; + string_value string_values[LAST_STRING]; + statem(); + statem(statem *); + ~statem(); + void flush(FILE *, statem *); + int changed(statem *); + void merge(statem *, statem *); + void add_tag(int_value_state, int); + void add_tag(bool_value_state); + void add_tag(units_value_state, hunits); + void add_tag(string_value_state, string); + void sub_tag_ce(); + void add_tag_if_unknown(int_value_state, int); + void add_tag_ta(); + void display_state(); + void update(statem *, statem *, int_value_state); + void update(statem *, statem *, bool_value_state); + void update(statem *, statem *, units_value_state); + void update(statem *, statem *, string_value_state); +}; + +struct stack { + stack *next; + statem *state; + stack(); + stack(statem *, stack *); + ~stack(); +}; + +class mtsm { + statem *driver; + stack *sp; + int has_changed(int_value_state, statem *); + int has_changed(bool_value_state, statem *); + int has_changed(units_value_state, statem *); + int has_changed(string_value_state, statem *); + void inherit(statem *, int); +public: + mtsm(); + ~mtsm(); + void push_state(statem *); + void pop_state(); + void flush(FILE *, statem *, string); + int changed(statem *); + void add_tag(FILE *, string); +}; + +class state_set { + int boolset; + int intset; + int unitsset; + int stringset; +public: + state_set(); + ~state_set(); + void incl(bool_value_state); + void incl(int_value_state); + void incl(units_value_state); + void incl(string_value_state); + void excl(bool_value_state); + void excl(int_value_state); + void excl(units_value_state); + void excl(string_value_state); + int is_in(bool_value_state); + int is_in(int_value_state); + int is_in(units_value_state); + int is_in(string_value_state); + void add(units_value_state, int); + units val(units_value_state); +}; diff --git a/contrib/groff-1.19/src/roff/troff/node.cpp b/contrib/groff-1.19/src/roff/troff/node.cpp index e3d4d86d90..0d874d3575 100644 --- a/contrib/groff-1.19/src/roff/troff/node.cpp +++ b/contrib/groff-1.19/src/roff/troff/node.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,7 +17,9 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ + +extern int debug_state; #include "troff.h" @@ -27,17 +29,18 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "dictionary.h" #include "hvunits.h" +#include "stringclass.h" +#include "mtsm.h" #include "env.h" #include "request.h" #include "node.h" #include "token.h" +#include "div.h" +#include "reg.h" #include "charinfo.h" #include "font.h" -#include "reg.h" #include "input.h" -#include "div.h" #include "geometry.h" -#include "stringclass.h" #include "nonposix.h" @@ -58,6 +61,12 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #endif /* not _POSIX_VERSION */ +// declarations to avoid friend name injections +class tfont; +class tfont_spec; +tfont *make_tfont(tfont_spec &); + + /* * how many boundaries of images have been written? Useful for * debugging grohtml @@ -111,8 +120,6 @@ struct conditional_bold { conditional_bold(int, hunits, conditional_bold * = 0); }; -class tfont; - class font_info { tfont *last_tfont; int number; @@ -133,7 +140,7 @@ class font_info { void flush(); public: special_font_list *sf; - font_info(symbol nm, int n, symbol enm, font *f); + font_info(symbol, int, symbol, font *); int contains(charinfo *); void set_bold(hunits); void unbold(); @@ -151,6 +158,7 @@ public: int is_special(); int is_style(); friend symbol get_font_name(int, environment *); + friend symbol get_style_name(int); }; class tfont_spec { @@ -169,7 +177,7 @@ protected: int height; int slant; public: - tfont_spec(symbol nm, int pos, font *, font_size, int, int); + tfont_spec(symbol, int, font *, font_size, int, int); tfont_spec(const tfont_spec &spec) { *this = spec; } tfont_spec plain(); int operator==(const tfont_spec &); @@ -399,6 +407,14 @@ symbol get_font_name(int fontno, environment *env) return f; } +symbol get_style_name(int fontno) +{ + if (font_table[fontno]->is_style()) + return font_table[fontno]->get_name(); + else + return EMPTY_SYMBOL; +} + hunits font_info::get_space_width(font_size fs, int space_sz) { if (is_constant_spaced == CONSTANT_SPACE_NONE) @@ -680,9 +696,8 @@ class real_output_file : public output_file { virtual void really_put_filename(const char *filename); virtual void really_on(); virtual void really_off(); -protected: - FILE *fp; public: + FILE *fp; real_output_file(); ~real_output_file(); void flush(); @@ -750,6 +765,8 @@ class troff_output_file : public real_output_file { int tbuf_len; int tbuf_kern; int begun_page; + int cur_div_level; + string tag_list; void do_motion(); void put(char c); void put(unsigned char c); @@ -786,6 +803,7 @@ public: void fill_color(color *c); int get_hpos() { return hpos; } int get_vpos() { return vpos; } + void add_to_tag_list(string s); friend void space_char_hmotion_node::tprint(troff_output_file *); friend void unbreakable_space_node::tprint(troff_output_file *); }; @@ -863,6 +881,29 @@ void troff_output_file::really_print_line(hunits x, vunits y, node *n, { moveto(x, y); while (n != 0) { + // Check whether we should push the current troff state and use + // the state at the start of the invocation of this diversion. + if (n->div_nest_level > cur_div_level && n->push_state) { + state.push_state(n->push_state); + cur_div_level = n->div_nest_level; + } + // Has the current diversion level decreased? Then we must pop the + // troff state. + while (n->div_nest_level < cur_div_level) { + state.pop_state(); + cur_div_level = n->div_nest_level; + } + // Now check whether the state has changed. + if ((is_on() || n->force_tprint()) + && (state.changed(n->state) || n->is_tag() || n->is_special)) { + flush_tbuf(); + do_motion(); + force_motion = 1; + flush(); + state.flush(fp, n->state, tag_list); + tag_list = string(""); + flush(); + } n->tprint(this); n = n->next; } @@ -1274,6 +1315,16 @@ void troff_output_file::glyph_color(color *col) put('\n'); } +void troff_output_file::add_to_tag_list(string s) +{ + if (tag_list == string("")) + tag_list = s; + else { + tag_list += string("\n"); + tag_list += s; + } +} + // determine_line_limits - works out the smallest box which will contain // the entity, code, built from the point array. void troff_output_file::determine_line_limits(char code, hvpair *point, @@ -1503,7 +1554,8 @@ void troff_output_file::trailer(vunits page_length) troff_output_file::troff_output_file() : current_slant(0), current_height(0), current_fill_color(0), - current_glyph_color(0), nfont_positions(10), tbuf_len(0), begun_page(0) + current_glyph_color(0), nfont_positions(10), tbuf_len(0), begun_page(0), + cur_div_level(0) { font_position = new symbol[nfont_positions]; put("x T "); @@ -1726,14 +1778,14 @@ class charinfo_node : public node { protected: charinfo *ci; public: - charinfo_node(charinfo *, node * = 0); + charinfo_node(charinfo *, statem *, int, node * = 0); int ends_sentence(); int overlaps_vertically(); int overlaps_horizontally(); }; -charinfo_node::charinfo_node(charinfo *c, node *x) -: node(x), ci(c) +charinfo_node::charinfo_node(charinfo *c, statem *s, int pop, node *x) +: node(x, s, pop), ci(c) { } @@ -1765,12 +1817,14 @@ protected: color *fcol; /* this is needed for grotty */ #ifdef STORE_WIDTH hunits wid; - glyph_node(charinfo *, tfont *, color *, color *, hunits, node * = 0); + glyph_node(charinfo *, tfont *, color *, color *, hunits, + statem *, int, node * = 0); #endif public: void *operator new(size_t); void operator delete(void *); - glyph_node(charinfo *, tfont *, color *, color *, node * = 0); + glyph_node(charinfo *, tfont *, color *, color *, + statem *, int, node * = 0); ~glyph_node() {} node *copy(); node *merge_glyph_node(glyph_node *); @@ -1797,6 +1851,8 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); + void debug_node(); }; glyph_node *glyph_node::free_list = 0; @@ -1806,13 +1862,13 @@ class ligature_node : public glyph_node { node *n2; #ifdef STORE_WIDTH ligature_node(charinfo *, tfont *, color *, color *, hunits, - node *, node *, node * = 0); + node *, node *, statem *, int, node * = 0); #endif public: void *operator new(size_t); void operator delete(void *); ligature_node(charinfo *, tfont *, color *, color *, - node *, node *, node * = 0); + node *, node *, statem *, int, node * = 0); ~ligature_node(); node *copy(); node *add_self(node *, hyphen_list **); @@ -1822,6 +1878,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; class kern_pair_node : public node { @@ -1829,7 +1886,7 @@ class kern_pair_node : public node { node *n1; node *n2; public: - kern_pair_node(hunits n, node *first, node *second, node *x = 0); + kern_pair_node(hunits, node *, node *, statem *, int, node * = 0); ~kern_pair_node(); node *copy(); node *merge_glyph_node(glyph_node *); @@ -1848,6 +1905,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); void vertical_extent(vunits *, vunits *); }; @@ -1856,7 +1914,7 @@ class dbreak_node : public node { node *pre; node *post; public: - dbreak_node(node *n, node *p, node *x = 0); + dbreak_node(node *, node *, statem *, int, node * = 0); ~dbreak_node(); node *copy(); node *merge_glyph_node(glyph_node *); @@ -1877,6 +1935,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; void *glyph_node::operator new(size_t n) @@ -1913,8 +1972,9 @@ void ligature_node::operator delete(void *p) delete[] (char *)p; } -glyph_node::glyph_node(charinfo *c, tfont *t, color *gc, color *fc, node *x) -: charinfo_node(c, x), tf(t), gcol(gc), fcol(fc) +glyph_node::glyph_node(charinfo *c, tfont *t, color *gc, color *fc, + statem *s, int pop, node *x) +: charinfo_node(c, s, pop, x), tf(t), gcol(gc), fcol(fc) { #ifdef STORE_WIDTH wid = tf->get_width(ci); @@ -1923,8 +1983,9 @@ glyph_node::glyph_node(charinfo *c, tfont *t, color *gc, color *fc, node *x) #ifdef STORE_WIDTH glyph_node::glyph_node(charinfo *c, tfont *t, - color *gc, color *fc, hunits w, node *x) -: charinfo_node(c, x), tf(t), gcol(gc), fcol(fc), wid(w) + color *gc, color *fc, hunits w, + statem *s, int pop, node *x) +: charinfo_node(c, s, pop, x), tf(t), gcol(gc), fcol(fc), wid(w) { } #endif @@ -1932,9 +1993,9 @@ glyph_node::glyph_node(charinfo *c, tfont *t, node *glyph_node::copy() { #ifdef STORE_WIDTH - return new glyph_node(ci, tf, gcol, fcol, wid); + return new glyph_node(ci, tf, gcol, fcol, wid, state, div_nest_level); #else - return new glyph_node(ci, tf, gcol, fcol); + return new glyph_node(ci, tf, gcol, fcol, state, div_nest_level); #endif } @@ -2018,13 +2079,15 @@ node *glyph_node::merge_glyph_node(glyph_node *gn) if ((lig = tf->get_lig(ci, gn->ci)) != 0) { node *next1 = next; next = 0; - return new ligature_node(lig, tf, gcol, fcol, this, gn, next1); + return new ligature_node(lig, tf, gcol, fcol, this, gn, state, + gn->div_nest_level, next1); } hunits kern; if (tf->get_kern(ci, gn->ci, &kern)) { node *next1 = next; next = 0; - return new kern_pair_node(kern, this, gn, next1); + return new kern_pair_node(kern, this, gn, state, + gn->div_nest_level, next1); } } return 0; @@ -2087,16 +2150,35 @@ void glyph_node::ascii_print(ascii_output_file *ascii) ascii->outs(ci->nm.contents()); } +void glyph_node::debug_node() +{ + unsigned char c = ci->get_ascii_code(); + fprintf(stderr, "{ %s [", type()); + if (c) + fprintf(stderr, "%c", c); + else + fprintf(stderr, ci->nm.contents()); + if (push_state) + fprintf(stderr, " "); + if (state) + state->display_state(); + fprintf(stderr, " nest level %d", div_nest_level); + fprintf(stderr, "]}\n"); + fflush(stderr); +} + ligature_node::ligature_node(charinfo *c, tfont *t, color *gc, color *fc, - node *gn1, node *gn2, node *x) -: glyph_node(c, t, gc, fc, x), n1(gn1), n2(gn2) + node *gn1, node *gn2, statem *s, + int pop, node *x) +: glyph_node(c, t, gc, fc, s, pop, x), n1(gn1), n2(gn2) { } #ifdef STORE_WIDTH ligature_node::ligature_node(charinfo *c, tfont *t, color *gc, color *fc, - hunits w, node *gn1, node *gn2, node *x) -: glyph_node(c, t, gc, fc, w, x), n1(gn1), n2(gn2) + hunits w, node *gn1, node *gn2, statem *s, + int pop, node *x) +: glyph_node(c, t, gc, fc, w, s, pop, x), n1(gn1), n2(gn2) { } #endif @@ -2110,9 +2192,11 @@ ligature_node::~ligature_node() node *ligature_node::copy() { #ifdef STORE_WIDTH - return new ligature_node(ci, tf, gcol, fcol, wid, n1->copy(), n2->copy()); + return new ligature_node(ci, tf, gcol, fcol, wid, n1->copy(), n2->copy(), + state, div_nest_level); #else - return new ligature_node(ci, tf, gcol, fcol, n1->copy(), n2->copy()); + return new ligature_node(ci, tf, gcol, fcol, n1->copy(), n2->copy(), + state, div_nest_level); #endif } @@ -2137,13 +2221,14 @@ node *ligature_node::add_self(node *n, hyphen_list **p) return n; } -kern_pair_node::kern_pair_node(hunits n, node *first, node *second, node *x) -: node(x), amount(n), n1(first), n2(second) +kern_pair_node::kern_pair_node(hunits n, node *first, node *second, + statem* s, int pop, node *x) +: node(x, s, pop), amount(n), n1(first), n2(second) { } -dbreak_node::dbreak_node(node *n, node *p, node *x) -: node(x), none(n), pre(p), post(0) +dbreak_node::dbreak_node(node *n, node *p, statem *s, int pop, node *x) +: node(x, s, pop), none(n), pre(p), post(0) { } @@ -2219,13 +2304,14 @@ node *kern_pair_node::add_discretionary_hyphen() node *next1 = next; next = 0; node *n = copy(); - glyph_node *gn = new glyph_node(soft_hyphen_char, tf, gcol, fcol); + glyph_node *gn = new glyph_node(soft_hyphen_char, tf, gcol, fcol, + state, div_nest_level); node *nn = n->merge_glyph_node(gn); if (nn == 0) { gn->next = n; nn = gn; } - return new dbreak_node(this, nn, next1); + return new dbreak_node(this, nn, state, div_nest_level, next1); } } return this; @@ -2248,7 +2334,8 @@ dbreak_node::~dbreak_node() node *kern_pair_node::copy() { - return new kern_pair_node(amount, n1->copy(), n2->copy()); + return new kern_pair_node(amount, n1->copy(), n2->copy(), state, + div_nest_level); } node *copy_node_list(node *n) @@ -2280,7 +2367,8 @@ void delete_node_list(node *n) node *dbreak_node::copy() { - dbreak_node *p = new dbreak_node(copy_node_list(none), copy_node_list(pre)); + dbreak_node *p = new dbreak_node(copy_node_list(none), copy_node_list(pre), + state, div_nest_level); p->post = copy_node_list(post); return p; } @@ -2298,11 +2386,12 @@ hyphen_list *kern_pair_node::get_hyphen_list(hyphen_list *tail, int *count) class hyphen_inhibitor_node : public node { public: - hyphen_inhibitor_node(node *nd = 0); + hyphen_inhibitor_node(node * = 0); node *copy(); int same(node *); const char *type(); int force_tprint(); + int is_tag(); hyphenation_type get_hyphenation_type(); }; @@ -2330,6 +2419,11 @@ int hyphen_inhibitor_node::force_tprint() return 0; } +int hyphen_inhibitor_node::is_tag() +{ + return 0; +} + hyphenation_type hyphen_inhibitor_node::get_hyphenation_type() { return HYPHEN_INHIBIT; @@ -2357,13 +2451,14 @@ node *node::add_discretionary_hyphen() node *next1 = next; next = 0; node *n = copy(); - glyph_node *gn = new glyph_node(soft_hyphen_char, tf, gcol, fcol); + glyph_node *gn = new glyph_node(soft_hyphen_char, tf, gcol, fcol, + state, div_nest_level); node *n1 = n->merge_glyph_node(gn); if (n1 == 0) { gn->next = n; n1 = gn; } - return new dbreak_node(this, n1, next1); + return new dbreak_node(this, n1, state, div_nest_level, next1); } return this; } @@ -2403,6 +2498,11 @@ int node::force_tprint() return 0; } +int node::is_tag() +{ + return 0; +} + hunits hmotion_node::width() { return n; @@ -2413,6 +2513,29 @@ units node::size() return points_to_units(10); } +void node::debug_node() +{ + fprintf(stderr, "{ %s ", type()); + if (push_state) + fprintf(stderr, " "); + if (state) + fprintf(stderr, " "); + fprintf(stderr, " nest level %d", div_nest_level); + fprintf(stderr, " }\n"); + fflush(stderr); +} + +void node::debug_node_list() +{ + node *n = next; + + debug_node(); + while (n != 0) { + n->debug_node(); + n = n->next; + } +} + hunits kern_pair_node::width() { return n1->width() + n2->width() + amount; @@ -2458,7 +2581,7 @@ class italic_corrected_node : public node { node *n; hunits x; public: - italic_corrected_node(node *, hunits, node * = 0); + italic_corrected_node(node *, hunits, statem *, int, node * = 0); ~italic_corrected_node(); node *copy(); void ascii_print(ascii_output_file *); @@ -2480,6 +2603,7 @@ public: node *add_self(node *, hyphen_list **); const char *type(); int force_tprint(); + int is_tag(); }; node *node::add_italic_correction(hunits *wd) @@ -2491,12 +2615,13 @@ node *node::add_italic_correction(hunits *wd) node *next1 = next; next = 0; *wd += ic; - return new italic_corrected_node(this, ic, next1); + return new italic_corrected_node(this, ic, state, div_nest_level, next1); } } -italic_corrected_node::italic_corrected_node(node *nn, hunits xx, node *p) -: node(p), n(nn), x(xx) +italic_corrected_node::italic_corrected_node(node *nn, hunits xx, statem *s, + int pop, node *p) +: node(p, s, pop), n(nn), x(xx) { assert(n != 0); } @@ -2508,7 +2633,7 @@ italic_corrected_node::~italic_corrected_node() node *italic_corrected_node::copy() { - return new italic_corrected_node(n->copy(), x); + return new italic_corrected_node(n->copy(), x, state, div_nest_level); } hunits italic_corrected_node::width() @@ -2599,6 +2724,7 @@ class break_char_node : public node { color *col; public: break_char_node(node *, int, color *, node * = 0); + break_char_node(node *, int, color *, statem *, int, node * = 0); ~break_char_node(); node *copy(); hunits width(); @@ -2620,6 +2746,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; break_char_node::break_char_node(node *n, int bc, color *c, node *x) @@ -2627,6 +2754,12 @@ break_char_node::break_char_node(node *n, int bc, color *c, node *x) { } +break_char_node::break_char_node(node *n, int bc, color *c, statem *s, + int pop, node *x) +: node(x, s, pop), ch(n), break_code(bc), col(c) +{ +} + break_char_node::~break_char_node() { delete ch; @@ -2634,7 +2767,8 @@ break_char_node::~break_char_node() node *break_char_node::copy() { - return new break_char_node(ch->copy(), break_code, col); + return new break_char_node(ch->copy(), break_code, col, state, + div_nest_level); } hunits break_char_node::width() @@ -2718,27 +2852,57 @@ tfont *break_char_node::get_tfont() node *extra_size_node::copy() { - return new extra_size_node(n); + return new extra_size_node(n, state, div_nest_level); +} + +extra_size_node::extra_size_node(vunits i, statem *s, int pop) +: node(0, s, pop), n(i) +{ +} + +extra_size_node::extra_size_node(vunits i) +: n(i) +{ } node *vertical_size_node::copy() { - return new vertical_size_node(n); + return new vertical_size_node(n, state, div_nest_level); +} + +vertical_size_node::vertical_size_node(vunits i, statem *s, int pop) +: node(0, s, pop), n(i) +{ +} + +vertical_size_node::vertical_size_node(vunits i) +: n(i) +{ } node *hmotion_node::copy() { - return new hmotion_node(n, was_tab, unformat, col); + return new hmotion_node(n, was_tab, unformat, col, state, div_nest_level); } node *space_char_hmotion_node::copy() { - return new space_char_hmotion_node(n, col); + return new space_char_hmotion_node(n, col, state, div_nest_level); +} + +vmotion_node::vmotion_node(vunits i, color *c) +: n(i), col(c) +{ +} + +vmotion_node::vmotion_node(vunits i, color *c, statem *s, int pop) +: node(0, s, pop), n(i), col(c) +{ } node *vmotion_node::copy() { - return new vmotion_node(n, col); + return new vmotion_node(n, col, state, div_nest_level); } node *dummy_node::copy() @@ -2757,9 +2921,19 @@ hline_node::~hline_node() delete n; } +hline_node::hline_node(hunits i, node *c, node *nxt) +: node(nxt), x(i), n(c) +{ +} + +hline_node::hline_node(hunits i, node *c, statem *s, int pop, node *nxt) +: node(nxt, s, pop), x(i), n(c) +{ +} + node *hline_node::copy() { - return new hline_node(x, n ? n->copy() : 0); + return new hline_node(x, n ? n->copy() : 0, state, div_nest_level); } hunits hline_node::width() @@ -2767,6 +2941,16 @@ hunits hline_node::width() return x < H0 ? H0 : x; } +vline_node::vline_node(vunits i, node *c, node *nxt) +: node(nxt), x(i), n(c) +{ +} + +vline_node::vline_node(vunits i, node *c, statem *s, int pop, node *nxt) +: node(nxt, s, pop), x(i), n(c) +{ +} + vline_node::~vline_node() { if (n) @@ -2775,7 +2959,7 @@ vline_node::~vline_node() node *vline_node::copy() { - return new vline_node(x, n ? n->copy() : 0); + return new vline_node(x, n ? n->copy() : 0, state, div_nest_level); } hunits vline_node::width() @@ -2783,7 +2967,13 @@ hunits vline_node::width() return n == 0 ? H0 : n->width(); } -zero_width_node::zero_width_node(node *nd) : n(nd) +zero_width_node::zero_width_node(node *nd, statem *s, int pop) +: node(0, s, pop), n(nd) +{ +} + +zero_width_node::zero_width_node(node *nd) +: n(nd) { } @@ -2794,7 +2984,7 @@ zero_width_node::~zero_width_node() node *zero_width_node::copy() { - return new zero_width_node(copy_node_list(n)); + return new zero_width_node(copy_node_list(n), state, div_nest_level); } int node_list_character_type(node *p) @@ -2833,7 +3023,13 @@ void zero_width_node::vertical_extent(vunits *min, vunits *max) node_list_vertical_extent(n, min, max); } -overstrike_node::overstrike_node() : list(0), max_width(H0) +overstrike_node::overstrike_node() +: list(0), max_width(H0) +{ +} + +overstrike_node::overstrike_node(statem *s, int pop) +: node(0, s, pop), list(0), max_width(H0) { } @@ -2844,7 +3040,7 @@ overstrike_node::~overstrike_node() node *overstrike_node::copy() { - overstrike_node *on = new overstrike_node; + overstrike_node *on = new overstrike_node(state, div_nest_level); for (node *tem = list; tem; tem = tem->next) on->overstrike(tem->copy()); return on; @@ -2869,7 +3065,13 @@ hunits overstrike_node::width() return max_width; } -bracket_node::bracket_node() : list(0), max_width(H0) +bracket_node::bracket_node() +: list(0), max_width(H0) +{ +} + +bracket_node::bracket_node(statem *s, int pop) +: node(0, s, pop), list(0), max_width(H0) { } @@ -2880,7 +3082,7 @@ bracket_node::~bracket_node() node *bracket_node::copy() { - bracket_node *on = new bracket_node; + bracket_node *on = new bracket_node(state, div_nest_level); node *last_node = 0; node *tem; if (list) @@ -2949,12 +3151,18 @@ inline void space_node::operator delete(void *p) #endif space_node::space_node(hunits nn, color *c, node *p) -: node(p), n(nn), set(0), was_escape_colon(0), col(c) +: node(p, 0, 0), n(nn), set(0), was_escape_colon(0), col(c) { } -space_node::space_node(hunits nn, int s, int flag, color *c, node *p) -: node(p), n(nn), set(s), was_escape_colon(flag), col(c) +space_node::space_node(hunits nn, color *c, statem *s, int pop, node *p) +: node(p, s, pop), n(nn), set(0), was_escape_colon(0), col(c) +{ +} + +space_node::space_node(hunits nn, int s, int flag, color *c, statem *st, + int pop, node *p) +: node(p, st, pop), n(nn), set(s), was_escape_colon(flag), col(c) { } @@ -2966,7 +3174,7 @@ space_node::~space_node() node *space_node::copy() { - return new space_node(n, set, was_escape_colon, col); + return new space_node(n, set, was_escape_colon, col, state, div_nest_level); } int space_node::force_tprint() @@ -2974,6 +3182,11 @@ int space_node::force_tprint() return 0; } +int space_node::is_tag() +{ + return 0; +} + int space_node::nspaces() { return set ? 0 : 1; @@ -3030,6 +3243,12 @@ void space_node::is_escape_colon() was_escape_colon = 1; } +diverted_space_node::diverted_space_node(vunits d, statem *s, int pop, + node *p) +: node(p, s, pop), n(d) +{ +} + diverted_space_node::diverted_space_node(vunits d, node *p) : node(p), n(d) { @@ -3037,7 +3256,13 @@ diverted_space_node::diverted_space_node(vunits d, node *p) node *diverted_space_node::copy() { - return new diverted_space_node(n); + return new diverted_space_node(n, state, div_nest_level); +} + +diverted_copy_file_node::diverted_copy_file_node(symbol s, statem *st, + int pop, node *p) +: node(p, st, pop), filename(s) +{ } diverted_copy_file_node::diverted_copy_file_node(symbol s, node *p) @@ -3047,7 +3272,7 @@ diverted_copy_file_node::diverted_copy_file_node(symbol s, node *p) node *diverted_copy_file_node::copy() { - return new diverted_copy_file_node(filename); + return new diverted_copy_file_node(filename, state, div_nest_level); } int node::ends_sentence() @@ -3338,8 +3563,15 @@ void hmotion_node::asciify(macro *m) } space_char_hmotion_node::space_char_hmotion_node(hunits i, color *c, + statem *s, int pop, node *nxt) -: hmotion_node(i, c, nxt) +: hmotion_node(i, c, s, pop, nxt) +{ +} + +space_char_hmotion_node::space_char_hmotion_node(hunits i, color *c, + node *nxt) +: hmotion_node(i, c, 0, 0, nxt) { } @@ -3597,12 +3829,16 @@ special_node::special_node(const macro &m, int n) tf = tf->get_plain(); gcol = curenv->get_glyph_color(); fcol = curenv->get_fill_color(); + is_special = 1; } special_node::special_node(const macro &m, tfont *t, - color *gc, color *fc, int n) -: mac(m), tf(t), gcol(gc), fcol(fc), no_init_string(n) + color *gc, color *fc, + statem *s, int pop, + int n) +: node(0, s, pop), mac(m), tf(t), gcol(gc), fcol(fc), no_init_string(n) { + is_special = 1; } int special_node::same(node *n) @@ -3629,9 +3865,15 @@ int special_node::force_tprint() return 0; } +int special_node::is_tag() +{ + return 0; +} + node *special_node::copy() { - return new special_node(mac, tf, gcol, fcol, no_init_string); + return new special_node(mac, tf, gcol, fcol, state, div_nest_level, + no_init_string); } void special_node::tprint_start(troff_output_file *out) @@ -3657,20 +3899,22 @@ tfont *special_node::get_tfont() /* suppress_node */ suppress_node::suppress_node(int on_or_off, int issue_limits) -: is_on(on_or_off), emit_limits(issue_limits), - filename(0), position(0), image_id(0) +: is_on(on_or_off), emit_limits(issue_limits), filename(0), position(0), + image_id(0) { } suppress_node::suppress_node(symbol f, char p, int id) : is_on(2), emit_limits(0), filename(f), position(p), image_id(id) { + is_special = 1; } suppress_node::suppress_node(int issue_limits, int on_or_off, - symbol f, char p, int id) -: is_on(on_or_off), emit_limits(issue_limits), - filename(f), position(p), image_id(id) + symbol f, char p, int id, + statem *s, int pop) +: node(0, s, pop), is_on(on_or_off), emit_limits(issue_limits), filename(f), + position(p), image_id(id) { } @@ -3690,7 +3934,67 @@ const char *suppress_node::type() node *suppress_node::copy() { - return new suppress_node(emit_limits, is_on, filename, position, image_id); + return new suppress_node(emit_limits, is_on, filename, position, image_id, + state, div_nest_level); +} + +/* tag_node */ + +tag_node::tag_node() +: delayed(0) +{ + is_special = 1; +} + +tag_node::tag_node(string s, int delay) +: tag_string(s), delayed(delay) +{ + is_special = !delay; +} + +tag_node::tag_node(string s, statem *st, int pop, int delay) +: node(0, st, pop), tag_string(s), delayed(delay) +{ + is_special = !delay; +} + +node *tag_node::copy() +{ + return new tag_node(tag_string, state, div_nest_level, delayed); +} + +void tag_node::tprint(troff_output_file *out) +{ + if (delayed) + out->add_to_tag_list(tag_string); + else + out->state.add_tag(out->fp, tag_string); +} + +int tag_node::same(node *nd) +{ + return tag_string == ((tag_node *)nd)->tag_string + && delayed == ((tag_node *)nd)->delayed; +} + +const char *tag_node::type() +{ + return "tag_node"; +} + +int tag_node::force_tprint() +{ + return !delayed; +} + +int tag_node::is_tag() +{ + return !delayed; +} + +int tag_node::ends_sentence() +{ + return 2; } int get_reg_int(const char *p) @@ -3782,15 +4086,15 @@ void suppress_node::tprint(troff_output_file *out) switch (last_position) { case 'c': out->start_special(); - put(out, "html-tag:.centered-image"); + put(out, "devtag:.centered-image"); break; case 'r': out->start_special(); - put(out, "html-tag:.right-image"); + put(out, "devtag:.right-image"); break; case 'l': out->start_special(); - put(out, "html-tag:.left-image"); + put(out, "devtag:.left-image"); break; case 'i': ; @@ -3799,7 +4103,7 @@ void suppress_node::tprint(troff_output_file *out) } out->end_special(); out->start_special(); - put(out, "html-tag:.auto-image "); + put(out, "devtag:.auto-image "); put(out, name); out->end_special(); } @@ -3843,6 +4147,11 @@ int suppress_node::force_tprint() return is_on; } +int suppress_node::is_tag() +{ + return is_on; +} + hunits suppress_node::width() { return H0; @@ -3854,7 +4163,7 @@ class composite_node : public charinfo_node { node *n; tfont *tf; public: - composite_node(node *, charinfo *, tfont *, node * = 0); + composite_node(node *, charinfo *, tfont *, statem *, int, node * = 0); ~composite_node(); node *copy(); hunits width(); @@ -3870,12 +4179,14 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); void vertical_extent(vunits *, vunits *); vunits vertical_width(); }; -composite_node::composite_node(node *p, charinfo *c, tfont *t, node *x) -: charinfo_node(c, x), n(p), tf(t) +composite_node::composite_node(node *p, charinfo *c, tfont *t, statem *s, + int pop, node *x) +: charinfo_node(c, s, pop, x), n(p), tf(t) { } @@ -3886,7 +4197,7 @@ composite_node::~composite_node() node *composite_node::copy() { - return new composite_node(copy_node_list(n), ci, tf); + return new composite_node(copy_node_list(n), ci, tf, state, div_nest_level); } hunits composite_node::width() @@ -4009,8 +4320,8 @@ word_space_node::word_space_node(hunits d, color *c, width_list *w, node *x) } word_space_node::word_space_node(hunits d, int s, color *c, width_list *w, - int flag, node *x) -: space_node(d, s, 0, c, x), orig_width(w), unformat(flag) + int flag, statem *st, int pop, node *x) +: space_node(d, s, 0, c, st, pop, x), orig_width(w), unformat(flag) { } @@ -4036,7 +4347,8 @@ node *word_space_node::copy() w_new_curr = w_new_curr->next; w_old_curr = w_old_curr->next; } - return new word_space_node(n, set, col, w_new, unformat); + return new word_space_node(n, set, col, w_new, unformat, state, + div_nest_level); } int word_space_node::set_unformat_flag() @@ -4069,14 +4381,15 @@ unbreakable_space_node::unbreakable_space_node(hunits d, color *c, node *x) } unbreakable_space_node::unbreakable_space_node(hunits d, int s, - color *c, node *x) -: word_space_node(d, s, c, 0, 0, x) + color *c, statem *st, int pop, + node *x) +: word_space_node(d, s, c, 0, 0, st, pop, x) { } node *unbreakable_space_node::copy() { - return new unbreakable_space_node(n, set, col); + return new unbreakable_space_node(n, set, col, state, div_nest_level); } int unbreakable_space_node::force_tprint() @@ -4084,6 +4397,11 @@ int unbreakable_space_node::force_tprint() return 0; } +int unbreakable_space_node::is_tag() +{ + return 0; +} + breakpoint *unbreakable_space_node::get_breakpoints(hunits, int, breakpoint *rest, int) { @@ -4118,6 +4436,15 @@ draw_node::draw_node(char c, hvpair *p, int np, font_size s, point[i] = p[i]; } +draw_node::draw_node(char c, hvpair *p, int np, font_size s, + color *gc, color *fc, statem *st, int pop) +: node(0, st, pop), npoints(np), sz(s), gcol(gc), fcol(fc), code(c) +{ + point = new hvpair[npoints]; + for (int i = 0; i < npoints; i++) + point[i] = p[i]; +} + int draw_node::same(node *n) { draw_node *nd = (draw_node *)n; @@ -4140,6 +4467,11 @@ int draw_node::force_tprint() return 0; } +int draw_node::is_tag() +{ + return 0; +} + draw_node::~draw_node() { if (point) @@ -4166,7 +4498,8 @@ vunits draw_node::vertical_width() node *draw_node::copy() { - return new draw_node(code, point, npoints, sz, gcol, fcol); + return new draw_node(code, point, npoints, sz, gcol, fcol, state, + div_nest_level); } void draw_node::tprint(troff_output_file *out) @@ -4501,7 +4834,7 @@ node *make_composite_node(charinfo *s, environment *env) fontno); if (env->is_composite()) tf = tf->get_plain(); - return new composite_node(n, s, tf); + return new composite_node(n, s, tf, 0, 0, 0); } node *make_glyph_node(charinfo *s, environment *env, int no_error_message = 0) @@ -4587,7 +4920,7 @@ node *make_glyph_node(charinfo *s, environment *env, int no_error_message = 0) tf = tf->get_plain(); color *gcol = env->get_glyph_color(); color *fcol = env->get_fill_color(); - return new glyph_node(s, tf, gcol, fcol); + return new glyph_node(s, tf, gcol, fcol, 0, 0); } node *make_node(charinfo *ci, environment *env) @@ -4633,7 +4966,7 @@ int character_exists(charinfo *ci, environment *env) } node *node::add_char(charinfo *ci, environment *env, - hunits *widthp, int *spacep) + hunits *widthp, int *spacep, node **glyph_comp_np) { node *res; switch (ci->get_special_translation()) { @@ -4663,9 +4996,14 @@ node *node::add_char(charinfo *ci, environment *env, if (res) { res->next = this; *widthp += res->width(); + if (glyph_comp_np) + *glyph_comp_np = res; } - else + else { + if (glyph_comp_np) + *glyph_comp_np = res; return this; + } } else { node *gn = make_glyph_node(ci, env); @@ -4683,6 +5021,8 @@ node *node::add_char(charinfo *ci, environment *env, *widthp += p->width() - old_width; res = p; } + if (glyph_comp_np) + *glyph_comp_np = res; } } int break_code = 0; @@ -4739,6 +5079,11 @@ int extra_size_node::force_tprint() return 0; } +int extra_size_node::is_tag() +{ + return 0; +} + int vertical_size_node::same(node *nd) { return n == ((vertical_size_node *)nd)->n; @@ -4759,6 +5104,11 @@ int vertical_size_node::force_tprint() return 0; } +int vertical_size_node::is_tag() +{ + return 0; +} + int hmotion_node::same(node *nd) { return n == ((hmotion_node *)nd)->n @@ -4781,6 +5131,11 @@ int hmotion_node::force_tprint() return 0; } +int hmotion_node::is_tag() +{ + return 0; +} + node *hmotion_node::add_self(node *nd, hyphen_list **p) { next = nd; @@ -4811,6 +5166,11 @@ int space_char_hmotion_node::force_tprint() return 0; } +int space_char_hmotion_node::is_tag() +{ + return 0; +} + node *space_char_hmotion_node::add_self(node *nd, hyphen_list **p) { next = nd; @@ -4842,6 +5202,11 @@ int vmotion_node::force_tprint() return 0; } +int vmotion_node::is_tag() +{ + return 0; +} + int hline_node::same(node *nd) { return x == ((hline_node *)nd)->x && same_node(n, ((hline_node *)nd)->n); @@ -4857,6 +5222,11 @@ int hline_node::force_tprint() return 0; } +int hline_node::is_tag() +{ + return 0; +} + int vline_node::same(node *nd) { return x == ((vline_node *)nd)->x && same_node(n, ((vline_node *)nd)->n); @@ -4872,6 +5242,11 @@ int vline_node::force_tprint() return 0; } +int vline_node::is_tag() +{ + return 0; +} + int dummy_node::same(node * /*nd*/) { return 1; @@ -4887,6 +5262,11 @@ int dummy_node::force_tprint() return 0; } +int dummy_node::is_tag() +{ + return 0; +} + int transparent_dummy_node::same(node * /*nd*/) { return 1; @@ -4902,6 +5282,11 @@ int transparent_dummy_node::force_tprint() return 0; } +int transparent_dummy_node::is_tag() +{ + return 0; +} + int transparent_dummy_node::ends_sentence() { return 2; @@ -4922,6 +5307,11 @@ int zero_width_node::force_tprint() return 0; } +int zero_width_node::is_tag() +{ + return 0; +} + int italic_corrected_node::same(node *nd) { return (x == ((italic_corrected_node *)nd)->x @@ -4938,11 +5328,22 @@ int italic_corrected_node::force_tprint() return 0; } +int italic_corrected_node::is_tag() +{ + return 0; +} + left_italic_corrected_node::left_italic_corrected_node(node *xx) : node(xx), n(0) { } +left_italic_corrected_node::left_italic_corrected_node(statem *s, int pop, + node *xx) +: node(xx, s, pop), n(0) +{ +} + left_italic_corrected_node::~left_italic_corrected_node() { delete n; @@ -4971,7 +5372,8 @@ node *left_italic_corrected_node::merge_glyph_node(glyph_node *gn) node *left_italic_corrected_node::copy() { - left_italic_corrected_node *nd = new left_italic_corrected_node; + left_italic_corrected_node *nd = + new left_italic_corrected_node(state, div_nest_level); if (n) { nd->n = n->copy(); nd->x = x; @@ -4997,6 +5399,11 @@ int left_italic_corrected_node::force_tprint() return 0; } +int left_italic_corrected_node::is_tag() +{ + return 0; +} + int left_italic_corrected_node::same(node *nd) { return (x == ((left_italic_corrected_node *)nd)->x @@ -5080,7 +5487,7 @@ hyphen_list *left_italic_corrected_node::get_hyphen_list(hyphen_list *tail, node *left_italic_corrected_node::add_self(node *nd, hyphen_list **p) { if (n) { - nd = new left_italic_corrected_node(nd); + nd = new left_italic_corrected_node(state, div_nest_level, nd); nd = n->add_self(nd, p); n = 0; delete this; @@ -5108,6 +5515,11 @@ int overstrike_node::force_tprint() return 0; } +int overstrike_node::is_tag() +{ + return 0; +} + node *overstrike_node::add_self(node *n, hyphen_list **p) { next = n; @@ -5137,6 +5549,11 @@ int bracket_node::force_tprint() return 0; } +int bracket_node::is_tag() +{ + return 0; +} + int composite_node::same(node *nd) { return ci == ((composite_node *)nd)->ci @@ -5153,6 +5570,11 @@ int composite_node::force_tprint() return 0; } +int composite_node::is_tag() +{ + return 0; +} + int glyph_node::same(node *nd) { return ci == ((glyph_node *)nd)->ci @@ -5171,6 +5593,11 @@ int glyph_node::force_tprint() return 0; } +int glyph_node::is_tag() +{ + return 0; +} + int ligature_node::same(node *nd) { return (same_node(n1, ((ligature_node *)nd)->n1) @@ -5188,6 +5615,11 @@ int ligature_node::force_tprint() return 0; } +int ligature_node::is_tag() +{ + return 0; +} + int kern_pair_node::same(node *nd) { return (amount == ((kern_pair_node *)nd)->amount @@ -5205,6 +5637,11 @@ int kern_pair_node::force_tprint() return 0; } +int kern_pair_node::is_tag() +{ + return 0; +} + int dbreak_node::same(node *nd) { return (same_node_list(none, ((dbreak_node *)nd)->none) @@ -5222,6 +5659,11 @@ int dbreak_node::force_tprint() return 0; } +int dbreak_node::is_tag() +{ + return 0; +} + int break_char_node::same(node *nd) { return break_code == ((break_char_node *)nd)->break_code @@ -5239,6 +5681,11 @@ int break_char_node::force_tprint() return 0; } +int break_char_node::is_tag() +{ + return 0; +} + int line_start_node::same(node * /*nd*/) { return 1; @@ -5254,6 +5701,11 @@ int line_start_node::force_tprint() return 0; } +int line_start_node::is_tag() +{ + return 0; +} + int space_node::same(node *nd) { return n == ((space_node *)nd)->n @@ -5283,6 +5735,11 @@ int word_space_node::force_tprint() return 0; } +int word_space_node::is_tag() +{ + return 0; +} + void unbreakable_space_node::tprint(troff_output_file *out) { out->fill_color(col); @@ -5338,6 +5795,11 @@ int diverted_space_node::force_tprint() return 0; } +int diverted_space_node::is_tag() +{ + return 0; +} + int diverted_copy_file_node::same(node *nd) { return filename == ((diverted_copy_file_node *)nd)->filename; @@ -5353,6 +5815,11 @@ int diverted_copy_file_node::force_tprint() return 0; } +int diverted_copy_file_node::is_tag() +{ + return 0; +} + // Grow the font_table so that its size is > n. static void grow_font_table(int n) @@ -5382,7 +5849,8 @@ static symbol get_font_translation(symbol nm) dictionary font_dictionary(50); -static int mount_font_no_translate(int n, symbol name, symbol external_name) +static int mount_font_no_translate(int n, symbol name, symbol external_name, + int check_only = 0) { assert(n >= 0); // We store the address of this char in font_dictionary to indicate @@ -5392,7 +5860,9 @@ static int mount_font_no_translate(int n, symbol name, symbol external_name) void *p = font_dictionary.lookup(external_name); if (p == 0) { int not_found; - fm = font::load_font(external_name.contents(), ¬_found); + fm = font::load_font(external_name.contents(), ¬_found, check_only); + if (check_only) + return fm != 0; if (!fm) { if (not_found) warning(WARN_FONT, "can't find font `%1'", external_name.contents()); @@ -5409,6 +5879,8 @@ static int mount_font_no_translate(int n, symbol name, symbol external_name) } else fm = (font*)p; + if (check_only) + return 1; if (n >= font_table_size) { if (n - font_table_size > 1000) { error("font position too much larger than first unused position"); @@ -5434,6 +5906,19 @@ int mount_font(int n, symbol name, symbol external_name) return mount_font_no_translate(n, name, external_name); } +int check_font(symbol fam, symbol name) +{ + if (check_style(name)) + name = concat(fam, name); + return mount_font_no_translate(0, name, name, 1); +} + +int check_style(symbol s) +{ + int i = symbol_fontno(s); + return i < 0 ? 0 : font_table[i]->is_style(); +} + void mount_style(int n, symbol name) { assert(n >= 0); diff --git a/contrib/groff-1.19/src/roff/troff/node.h b/contrib/groff-1.19/src/roff/troff/node.h index 8da5671b80..c7c8b4188c 100644 --- a/contrib/groff-1.19/src/roff/troff/node.h +++ b/contrib/groff-1.19/src/roff/troff/node.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ struct hyphen_list { unsigned char hyphen; @@ -50,14 +50,20 @@ class token_node; struct node { node *next; node *last; + statem *state; + statem *push_state; + int div_nest_level; + int is_special; node(); - node(node *n); - node *add_char(charinfo *c, environment *, hunits *widthp, int *spacep); + node(node *); + node(node *, statem *, int); + node *add_char(charinfo *, environment *, hunits *, int *, node ** = 0); virtual ~node(); virtual node *copy() = 0; virtual int set_unformat_flag(); virtual int force_tprint() = 0; + virtual int is_tag() = 0; virtual hunits width(); virtual hunits subscript_correction(); virtual hunits italic_correction(); @@ -67,7 +73,7 @@ struct node { virtual int merge_space(hunits, hunits, hunits); virtual vunits vertical_width(); virtual node *last_char_node(); - virtual void vertical_extent(vunits *min, vunits *max); + virtual void vertical_extent(vunits *, vunits *); virtual int character_type(); virtual void set_vertical_size(vertical_size *); virtual int ends_sentence(); @@ -81,9 +87,7 @@ struct node { virtual void spread_space(int *, hunits *); virtual void freeze_space(); virtual void is_escape_colon(); - virtual breakpoint *get_breakpoints(hunits width, int nspaces, - breakpoint *rest = 0, - int is_inner = 0); + virtual breakpoint *get_breakpoints(hunits, int, breakpoint * = 0, int = 0); virtual int nbreaks(); virtual void split(int, node **, node **); virtual hyphenation_type get_hyphenation_type(); @@ -105,18 +109,29 @@ struct node { virtual int same(node *) = 0; virtual const char *type() = 0; + virtual void debug_node(); + virtual void debug_node_list(); }; inline node::node() -: next(0), last(0) +: next(0), last(0), state(0), push_state(0), div_nest_level(0), is_special(0) { } inline node::node(node *n) -: next(n), last(0) +: next(n), last(0), state(0), push_state(0), div_nest_level(0), is_special(0) { } +inline node::node(node *n, statem *s, int divlevel) +: next(n), last(0), push_state(0), div_nest_level(divlevel), is_special(0) +{ + if (s) + state = new statem(s); + else + state = 0; +} + inline node::~node() { } @@ -140,6 +155,7 @@ public: node *copy() { return new line_start_node; } int same(node *); int force_tprint(); + int is_tag(); const char *type(); void asciify(macro *); }; @@ -156,8 +172,9 @@ protected: char set; char was_escape_colon; color *col; /* for grotty */ - space_node(hunits, int, int, color *, node * = 0); + space_node(hunits, int, int, color *, statem *, int, node * = 0); public: + space_node(hunits, color *, statem *, int, node * = 0); space_node(hunits, color *, node * = 0); #if 0 ~space_node(); @@ -172,8 +189,7 @@ public: void is_escape_colon(); void spread_space(int *, hunits *); void tprint(troff_output_file *); - breakpoint *get_breakpoints(hunits width, int nspaces, breakpoint *rest = 0, - int is_inner = 0); + breakpoint *get_breakpoints(hunits, int, breakpoint * = 0, int = 0); int nbreaks(); void split(int, node **, node **); void ascii_print(ascii_output_file *); @@ -181,6 +197,7 @@ public: void asciify(macro *); const char *type(); int force_tprint(); + int is_tag(); hyphenation_type get_hyphenation_type(); }; @@ -196,7 +213,8 @@ class word_space_node : public space_node { protected: width_list *orig_width; unsigned char unformat; - word_space_node(hunits, int, color *, width_list *, int, node * = 0); + word_space_node(hunits, int, color *, width_list *, int, statem *, int, + node * = 0); public: word_space_node(hunits, color *, width_list *, node * = 0); ~word_space_node(); @@ -209,10 +227,11 @@ public: const char *type(); int merge_space(hunits, hunits, hunits); int force_tprint(); + int is_tag(); }; class unbreakable_space_node : public word_space_node { - unbreakable_space_node(hunits, int, color *, node * = 0); + unbreakable_space_node(hunits, int, color *, statem *, int, node * = 0); public: unbreakable_space_node(hunits, color *, node * = 0); node *copy(); @@ -222,8 +241,8 @@ public: void asciify(macro *); const char *type(); int force_tprint(); - breakpoint *get_breakpoints(hunits width, int nspaces, breakpoint *rest = 0, - int is_inner = 0); + int is_tag(); + breakpoint *get_breakpoints(hunits, int, breakpoint * = 0, int = 0); int nbreaks(); void split(int, node **, node **); int merge_space(hunits, hunits, hunits); @@ -235,41 +254,48 @@ public: class diverted_space_node : public node { public: vunits n; - diverted_space_node(vunits d, node *p = 0); + diverted_space_node(vunits, node * = 0); + diverted_space_node(vunits, statem *, int, node * = 0); node *copy(); int reread(int *); int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; class diverted_copy_file_node : public node { symbol filename; public: vunits n; - diverted_copy_file_node(symbol s, node *p = 0); + diverted_copy_file_node(symbol, node * = 0); + diverted_copy_file_node(symbol, statem *, int, node * = 0); node *copy(); int reread(int *); int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; class extra_size_node : public node { vunits n; public: - extra_size_node(vunits i) : n(i) {} + extra_size_node(vunits); + extra_size_node(vunits, statem *, int); void set_vertical_size(vertical_size *); node *copy(); int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; class vertical_size_node : public node { vunits n; public: - vertical_size_node(vunits i) : n(i) {} + vertical_size_node(vunits, statem *, int); + vertical_size_node(vunits); void set_vertical_size(vertical_size *); void asciify(macro *); node *copy(); @@ -277,6 +303,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; class hmotion_node : public node { @@ -288,6 +315,12 @@ protected: public: hmotion_node(hunits i, color *c, node *nxt = 0) : node(nxt), n(i), was_tab(0), unformat(0), col(c) {} + hmotion_node(hunits i, color *c, statem *s, int divlevel, node *nxt = 0) + : node(nxt, s, divlevel), n(i), was_tab(0), unformat(0), col(c) {} + hmotion_node(hunits i, int flag1, int flag2, color *c, statem *s, + int divlevel, node *nxt = 0) + : node(nxt, s, divlevel), n(i), was_tab(flag1), unformat(flag2), + col(c) {} hmotion_node(hunits i, int flag1, int flag2, color *c, node *nxt = 0) : node(nxt), n(i), was_tab(flag1), unformat(flag2), col(c) {} node *copy(); @@ -300,6 +333,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); node *add_self(node *, hyphen_list **); hyphen_list *get_hyphen_list(hyphen_list *, int *); hyphenation_type get_hyphenation_type(); @@ -308,6 +342,7 @@ public: class space_char_hmotion_node : public hmotion_node { public: space_char_hmotion_node(hunits, color *, node * = 0); + space_char_hmotion_node(hunits, color *, statem *, int, node * = 0); node *copy(); void ascii_print(ascii_output_file *); void asciify(macro *); @@ -315,6 +350,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); node *add_self(node *, hyphen_list **); hyphen_list *get_hyphen_list(hyphen_list *, int *); hyphenation_type get_hyphenation_type(); @@ -324,20 +360,23 @@ class vmotion_node : public node { vunits n; color *col; /* for grotty */ public: - vmotion_node(vunits i, color *c) : n(i), col(c) {} + vmotion_node(vunits, color *); + vmotion_node(vunits, color *, statem *, int); void tprint(troff_output_file *); node *copy(); vunits vertical_width(); int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; class hline_node : public node { hunits x; node *n; public: - hline_node(hunits i, node *c, node *nxt = 0) : node(nxt), x(i), n(c) {} + hline_node(hunits, node *, node * = 0); + hline_node(hunits, node *, statem *, int, node * = 0); ~hline_node(); node *copy(); hunits width(); @@ -345,13 +384,15 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; class vline_node : public node { vunits x; node *n; public: - vline_node(vunits i, node *c, node *nxt = 0) : node(nxt), x(i), n(c) {} + vline_node(vunits, node *, node * = 0); + vline_node(vunits, node *, statem *, int, node * = 0); ~vline_node(); node *copy(); void tprint(troff_output_file *); @@ -361,9 +402,9 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; - class dummy_node : public node { public: dummy_node(node *nd = 0) : node(nd) {} @@ -371,6 +412,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); hyphenation_type get_hyphenation_type(); }; @@ -381,6 +423,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); int ends_sentence(); hyphenation_type get_hyphenation_type(); }; @@ -388,16 +431,18 @@ public: class zero_width_node : public node { node *n; public: - zero_width_node(node *gn); + zero_width_node(node *); + zero_width_node(node *, statem *, int); ~zero_width_node(); node *copy(); void tprint(troff_output_file *); int same(node *); const char *type(); int force_tprint(); + int is_tag(); void append(node *); int character_type(); - void vertical_extent(vunits *min, vunits *max); + void vertical_extent(vunits *, vunits *); }; class left_italic_corrected_node : public node { @@ -405,6 +450,7 @@ class left_italic_corrected_node : public node { hunits x; public: left_italic_corrected_node(node * = 0); + left_italic_corrected_node(statem *, int, node * = 0); ~left_italic_corrected_node(); void tprint(troff_output_file *); void ascii_print(ascii_output_file *); @@ -413,6 +459,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); hunits width(); node *last_char_node(); void vertical_extent(vunits *, vunits *); @@ -435,6 +482,7 @@ class overstrike_node : public node { hunits max_width; public: overstrike_node(); + overstrike_node(statem *, int); ~overstrike_node(); node *copy(); void tprint(troff_output_file *); @@ -443,6 +491,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); node *add_self(node *, hyphen_list **); hyphen_list *get_hyphen_list(hyphen_list *, int *); hyphenation_type get_hyphenation_type(); @@ -453,6 +502,7 @@ class bracket_node : public node { hunits max_width; public: bracket_node(); + bracket_node(statem *, int); ~bracket_node(); node *copy(); void tprint(troff_output_file *); @@ -461,6 +511,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; class special_node : public node { @@ -474,12 +525,14 @@ class special_node : public node { void tprint_end(troff_output_file *); public: special_node(const macro &, int = 0); - special_node(const macro &, tfont *, color *, color *, int = 0); + special_node(const macro &, tfont *, color *, color *, statem *, int, + int = 0); node *copy(); void tprint(troff_output_file *); int same(node *); const char *type(); int force_tprint(); + int is_tag(); int ends_sentence(); tfont *get_tfont(); }; @@ -492,16 +545,34 @@ class suppress_node : public node { int image_id; public: suppress_node(int, int); - suppress_node(symbol f, char p, int id); - suppress_node(int, int, symbol f, char p, int id); + suppress_node(symbol, char, int); + suppress_node(int, int, symbol, char, int, statem *, int); + suppress_node(int, int, symbol, char, int); node *copy(); void tprint(troff_output_file *); hunits width(); int same(node *); const char *type(); int force_tprint(); + int is_tag(); private: - void put(troff_output_file *out, const char *s); + void put(troff_output_file *, const char *); +}; + +class tag_node : public node { +public: + string tag_string; + int delayed; + tag_node(); + tag_node(string, int); + tag_node(string, statem *, int, int); + node *copy(); + void tprint(troff_output_file *); + int same(node *); + const char *type(); + int force_tprint(); + int is_tag(); + int ends_sentence(); }; struct hvpair { @@ -519,6 +590,7 @@ class draw_node : public node { hvpair *point; public: draw_node(char, hvpair *, int, font_size, color *, color *); + draw_node(char, hvpair *, int, font_size, color *, color *, statem *, int); ~draw_node(); hunits width(); vunits vertical_width(); @@ -527,18 +599,19 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; class charinfo; -node *make_node(charinfo *ci, environment *); +node *make_node(charinfo *, environment *); int character_exists(charinfo *, environment *); -int same_node_list(node *n1, node *n2); -node *reverse_node_list(node *n); +int same_node_list(node *, node *); +node *reverse_node_list(node *); void delete_node_list(node *); node *copy_node_list(node *); -int get_bold_fontno(int f); +int get_bold_fontno(int); inline hyphen_list::hyphen_list(unsigned char code, hyphen_list *p) : hyphen(0), breakable(0), hyphenation_code(code), next(p) @@ -546,9 +619,11 @@ inline hyphen_list::hyphen_list(unsigned char code, hyphen_list *p) } extern void read_desc(); -extern int mount_font(int n, symbol, symbol = NULL_SYMBOL); -extern void mount_style(int n, symbol); -extern int is_good_fontno(int n); +extern int mount_font(int, symbol, symbol = NULL_SYMBOL); +extern int check_font(symbol, symbol); +extern int check_style(symbol); +extern void mount_style(int, symbol); +extern int is_good_fontno(int); extern int symbol_fontno(symbol); extern int next_available_font_position(); extern void init_size_table(int *); @@ -559,7 +634,7 @@ class output_file { public: output_file(); virtual ~output_file(); - virtual void trailer(vunits page_length); + virtual void trailer(vunits); virtual void flush() = 0; virtual void transparent_char(unsigned char) = 0; virtual void print_line(hunits x, vunits y, node *n, @@ -567,12 +642,13 @@ public: virtual void begin_page(int pageno, vunits page_length) = 0; virtual void copy_file(hunits x, vunits y, const char *filename) = 0; virtual int is_printing() = 0; - virtual void put_filename(const char *filename); + virtual void put_filename(const char *); virtual void on(); virtual void off(); #ifdef COLUMN virtual void vjustify(vunits, symbol); #endif /* COLUMN */ + mtsm state; }; #ifndef POPEN_MISSING @@ -581,7 +657,7 @@ extern char *pipe_command; extern output_file *the_output; extern void init_output(); -int in_output_page_list(int n); +int in_output_page_list(int); class font_family { int *map; @@ -596,4 +672,5 @@ public: font_family *lookup_family(symbol); symbol get_font_name(int, environment *); +symbol get_style_name(int); extern search_path include_search_path; diff --git a/contrib/groff-1.19/src/roff/troff/number.cpp b/contrib/groff-1.19/src/roff/troff/number.cpp index 8a5c7e4474..0a4563e4b3 100644 --- a/contrib/groff-1.19/src/roff/troff/number.cpp +++ b/contrib/groff-1.19/src/roff/troff/number.cpp @@ -17,11 +17,13 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "troff.h" #include "hvunits.h" +#include "stringclass.h" +#include "mtsm.h" #include "env.h" #include "token.h" #include "div.h" diff --git a/contrib/groff-1.19/src/roff/troff/reg.cpp b/contrib/groff-1.19/src/roff/troff/reg.cpp index 9c4b5b7ceb..4501090a5f 100644 --- a/contrib/groff-1.19/src/roff/troff/reg.cpp +++ b/contrib/groff-1.19/src/roff/troff/reg.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "troff.h" #include "dictionary.h" diff --git a/contrib/groff-1.19/src/roff/troff/reg.h b/contrib/groff-1.19/src/roff/troff/reg.h index 950be4f8b6..bc2c3f2d44 100644 --- a/contrib/groff-1.19/src/roff/troff/reg.h +++ b/contrib/groff-1.19/src/roff/troff/reg.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ class reg : public object { diff --git a/contrib/groff-1.19/src/roff/troff/request.h b/contrib/groff-1.19/src/roff/troff/request.h index 4e2c4c8fdb..24d25890fc 100644 --- a/contrib/groff-1.19/src/roff/troff/request.h +++ b/contrib/groff-1.19/src/roff/troff/request.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ typedef void (*REQUEST_FUNCP)(); @@ -45,15 +45,17 @@ class macro_header; struct node; class macro : public request_or_macro { - macro_header *p; const char *filename; // where was it defined? int lineno; int len; int empty_macro; + int is_a_diversion; public: + macro_header *p; macro(); ~macro(); macro(const macro &); + macro(int); macro &operator=(const macro &); void append(unsigned char); void append(node *); @@ -67,6 +69,7 @@ public: macro *to_macro(); void print_size(); int empty(); + int is_diversion(); friend class string_iterator; friend void chop_macro(); friend void substring_request(); diff --git a/contrib/groff-1.19/src/roff/troff/token.h b/contrib/groff-1.19/src/roff/troff/token.h index 51557cfb8c..6493976073 100644 --- a/contrib/groff-1.19/src/roff/troff/token.h +++ b/contrib/groff-1.19/src/roff/troff/token.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ class charinfo; diff --git a/contrib/groff-1.19/src/roff/troff/troff.h b/contrib/groff-1.19/src/roff/troff/troff.h index f240055377..661b3ed059 100644 --- a/contrib/groff-1.19/src/roff/troff/troff.h +++ b/contrib/groff-1.19/src/roff/troff/troff.h @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/utils/addftinfo/addftinfo.cpp b/contrib/groff-1.19/src/utils/addftinfo/addftinfo.cpp index 931d836532..b2fd15dbf8 100644 --- a/contrib/groff-1.19/src/utils/addftinfo/addftinfo.cpp +++ b/contrib/groff-1.19/src/utils/addftinfo/addftinfo.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/utils/addftinfo/guess.cpp b/contrib/groff-1.19/src/utils/addftinfo/guess.cpp index dcfd4c92cb..7ae36dcdec 100644 --- a/contrib/groff-1.19/src/utils/addftinfo/guess.cpp +++ b/contrib/groff-1.19/src/utils/addftinfo/guess.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "guess.h" diff --git a/contrib/groff-1.19/src/utils/addftinfo/guess.h b/contrib/groff-1.19/src/utils/addftinfo/guess.h index 4471dda8d9..26f0883e8d 100644 --- a/contrib/groff-1.19/src/utils/addftinfo/guess.h +++ b/contrib/groff-1.19/src/utils/addftinfo/guess.h @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ struct font_params { int italic; diff --git a/contrib/groff-1.19/src/utils/afmtodit/afmtodit.man b/contrib/groff-1.19/src/utils/afmtodit/afmtodit.man index 0c79a6144b..978de344ea 100644 --- a/contrib/groff-1.19/src/utils/afmtodit/afmtodit.man +++ b/contrib/groff-1.19/src/utils/afmtodit/afmtodit.man @@ -1,5 +1,5 @@ .ig -Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 1989-2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -66,7 +66,7 @@ creates a font file for use with groff and . .B afmtodit is written in perl; -you must have perl version 3 or newer installed in order to run +you must have perl version 5.004 or newer installed in order to run .BR afmtodit . . .LP diff --git a/contrib/groff-1.19/src/utils/afmtodit/afmtodit.pl b/contrib/groff-1.19/src/utils/afmtodit/afmtodit.pl index 3d35049ccb..0ff85de2ae 100644 --- a/contrib/groff-1.19/src/utils/afmtodit/afmtodit.pl +++ b/contrib/groff-1.19/src/utils/afmtodit/afmtodit.pl @@ -1,6 +1,7 @@ -#! /usr/bin/perl +#! /usr/bin/perl -w # -*- Perl -*- -# Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # # This file is part of groff. @@ -17,6036 +18,6041 @@ # # 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. +# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. -%unicode_decomposed = ( - "u00C0", "u0041_0300", - "u00C1", "u0041_0301", - "u00C2", "u0041_0302", - "u00C3", "u0041_0303", - "u00C4", "u0041_0308", - "u00C5", "u0041_030A", - "u00C7", "u0043_0327", - "u00C8", "u0045_0300", - "u00C9", "u0045_0301", - "u00CA", "u0045_0302", - "u00CB", "u0045_0308", - "u00CC", "u0049_0300", - "u00CD", "u0049_0301", - "u00CE", "u0049_0302", - "u00CF", "u0049_0308", - "u00D1", "u004E_0303", - "u00D2", "u004F_0300", - "u00D3", "u004F_0301", - "u00D4", "u004F_0302", - "u00D5", "u004F_0303", - "u00D6", "u004F_0308", - "u00D9", "u0055_0300", - "u00DA", "u0055_0301", - "u00DB", "u0055_0302", - "u00DC", "u0055_0308", - "u00DD", "u0059_0301", - "u00E0", "u0061_0300", - "u00E1", "u0061_0301", - "u00E2", "u0061_0302", - "u00E3", "u0061_0303", - "u00E4", "u0061_0308", - "u00E5", "u0061_030A", - "u00E7", "u0063_0327", - "u00E8", "u0065_0300", - "u00E9", "u0065_0301", - "u00EA", "u0065_0302", - "u00EB", "u0065_0308", - "u00EC", "u0069_0300", - "u00ED", "u0069_0301", - "u00EE", "u0069_0302", - "u00EF", "u0069_0308", - "u00F1", "u006E_0303", - "u00F2", "u006F_0300", - "u00F3", "u006F_0301", - "u00F4", "u006F_0302", - "u00F5", "u006F_0303", - "u00F6", "u006F_0308", - "u00F9", "u0075_0300", - "u00FA", "u0075_0301", - "u00FB", "u0075_0302", - "u00FC", "u0075_0308", - "u00FD", "u0079_0301", - "u00FF", "u0079_0308", - "u0100", "u0041_0304", - "u0101", "u0061_0304", - "u0102", "u0041_0306", - "u0103", "u0061_0306", - "u0104", "u0041_0328", - "u0105", "u0061_0328", - "u0106", "u0043_0301", - "u0107", "u0063_0301", - "u0108", "u0043_0302", - "u0109", "u0063_0302", - "u010A", "u0043_0307", - "u010B", "u0063_0307", - "u010C", "u0043_030C", - "u010D", "u0063_030C", - "u010E", "u0044_030C", - "u010F", "u0064_030C", - "u0112", "u0045_0304", - "u0113", "u0065_0304", - "u0114", "u0045_0306", - "u0115", "u0065_0306", - "u0116", "u0045_0307", - "u0117", "u0065_0307", - "u0118", "u0045_0328", - "u0119", "u0065_0328", - "u011A", "u0045_030C", - "u011B", "u0065_030C", - "u011C", "u0047_0302", - "u011D", "u0067_0302", - "u011E", "u0047_0306", - "u011F", "u0067_0306", - "u0120", "u0047_0307", - "u0121", "u0067_0307", - "u0122", "u0047_0327", - "u0123", "u0067_0327", - "u0124", "u0048_0302", - "u0125", "u0068_0302", - "u0128", "u0049_0303", - "u0129", "u0069_0303", - "u012A", "u0049_0304", - "u012B", "u0069_0304", - "u012C", "u0049_0306", - "u012D", "u0069_0306", - "u012E", "u0049_0328", - "u012F", "u0069_0328", - "u0130", "u0049_0307", - "u0134", "u004A_0302", - "u0135", "u006A_0302", - "u0136", "u004B_0327", - "u0137", "u006B_0327", - "u0139", "u004C_0301", - "u013A", "u006C_0301", - "u013B", "u004C_0327", - "u013C", "u006C_0327", - "u013D", "u004C_030C", - "u013E", "u006C_030C", - "u0143", "u004E_0301", - "u0144", "u006E_0301", - "u0145", "u004E_0327", - "u0146", "u006E_0327", - "u0147", "u004E_030C", - "u0148", "u006E_030C", - "u014C", "u004F_0304", - "u014D", "u006F_0304", - "u014E", "u004F_0306", - "u014F", "u006F_0306", - "u0150", "u004F_030B", - "u0151", "u006F_030B", - "u0154", "u0052_0301", - "u0155", "u0072_0301", - "u0156", "u0052_0327", - "u0157", "u0072_0327", - "u0158", "u0052_030C", - "u0159", "u0072_030C", - "u015A", "u0053_0301", - "u015B", "u0073_0301", - "u015C", "u0053_0302", - "u015D", "u0073_0302", - "u015E", "u0053_0327", - "u015F", "u0073_0327", - "u0160", "u0053_030C", - "u0161", "u0073_030C", - "u0162", "u0054_0327", - "u0163", "u0074_0327", - "u0164", "u0054_030C", - "u0165", "u0074_030C", - "u0168", "u0055_0303", - "u0169", "u0075_0303", - "u016A", "u0055_0304", - "u016B", "u0075_0304", - "u016C", "u0055_0306", - "u016D", "u0075_0306", - "u016E", "u0055_030A", - "u016F", "u0075_030A", - "u0170", "u0055_030B", - "u0171", "u0075_030B", - "u0172", "u0055_0328", - "u0173", "u0075_0328", - "u0174", "u0057_0302", - "u0175", "u0077_0302", - "u0176", "u0059_0302", - "u0177", "u0079_0302", - "u0178", "u0059_0308", - "u0179", "u005A_0301", - "u017A", "u007A_0301", - "u017B", "u005A_0307", - "u017C", "u007A_0307", - "u017D", "u005A_030C", - "u017E", "u007A_030C", - "u01A0", "u004F_031B", - "u01A1", "u006F_031B", - "u01AF", "u0055_031B", - "u01B0", "u0075_031B", - "u01CD", "u0041_030C", - "u01CE", "u0061_030C", - "u01CF", "u0049_030C", - "u01D0", "u0069_030C", - "u01D1", "u004F_030C", - "u01D2", "u006F_030C", - "u01D3", "u0055_030C", - "u01D4", "u0075_030C", - "u01D5", "u0055_0308_0304", - "u01D6", "u0075_0308_0304", - "u01D7", "u0055_0308_0301", - "u01D8", "u0075_0308_0301", - "u01D9", "u0055_0308_030C", - "u01DA", "u0075_0308_030C", - "u01DB", "u0055_0308_0300", - "u01DC", "u0075_0308_0300", - "u01DE", "u0041_0308_0304", - "u01DF", "u0061_0308_0304", - "u01E0", "u0041_0307_0304", - "u01E1", "u0061_0307_0304", - "u01E2", "u00C6_0304", - "u01E3", "u00E6_0304", - "u01E6", "u0047_030C", - "u01E7", "u0067_030C", - "u01E8", "u004B_030C", - "u01E9", "u006B_030C", - "u01EA", "u004F_0328", - "u01EB", "u006F_0328", - "u01EC", "u004F_0328_0304", - "u01ED", "u006F_0328_0304", - "u01EE", "u01B7_030C", - "u01EF", "u0292_030C", - "u01F0", "u006A_030C", - "u01F4", "u0047_0301", - "u01F5", "u0067_0301", - "u01F8", "u004E_0300", - "u01F9", "u006E_0300", - "u01FA", "u0041_030A_0301", - "u01FB", "u0061_030A_0301", - "u01FC", "u00C6_0301", - "u01FD", "u00E6_0301", - "u01FE", "u00D8_0301", - "u01FF", "u00F8_0301", - "u0200", "u0041_030F", - "u0201", "u0061_030F", - "u0202", "u0041_0311", - "u0203", "u0061_0311", - "u0204", "u0045_030F", - "u0205", "u0065_030F", - "u0206", "u0045_0311", - "u0207", "u0065_0311", - "u0208", "u0049_030F", - "u0209", "u0069_030F", - "u020A", "u0049_0311", - "u020B", "u0069_0311", - "u020C", "u004F_030F", - "u020D", "u006F_030F", - "u020E", "u004F_0311", - "u020F", "u006F_0311", - "u0210", "u0052_030F", - "u0211", "u0072_030F", - "u0212", "u0052_0311", - "u0213", "u0072_0311", - "u0214", "u0055_030F", - "u0215", "u0075_030F", - "u0216", "u0055_0311", - "u0217", "u0075_0311", - "u0218", "u0053_0326", - "u0219", "u0073_0326", - "u021A", "u0054_0326", - "u021B", "u0074_0326", - "u021E", "u0048_030C", - "u021F", "u0068_030C", - "u0226", "u0041_0307", - "u0227", "u0061_0307", - "u0228", "u0045_0327", - "u0229", "u0065_0327", - "u022A", "u004F_0308_0304", - "u022B", "u006F_0308_0304", - "u022C", "u004F_0303_0304", - "u022D", "u006F_0303_0304", - "u022E", "u004F_0307", - "u022F", "u006F_0307", - "u0230", "u004F_0307_0304", - "u0231", "u006F_0307_0304", - "u0232", "u0059_0304", - "u0233", "u0079_0304", - "u0340", "u0300", - "u0341", "u0301", - "u0343", "u0313", - "u0344", "u0308_0301", - "u0374", "u02B9", - "u037E", "u003B", - "u0385", "u00A8_0301", - "u0386", "u0391_0301", - "u0387", "u00B7", - "u0388", "u0395_0301", - "u0389", "u0397_0301", - "u038A", "u0399_0301", - "u038C", "u039F_0301", - "u038E", "u03A5_0301", - "u038F", "u03A9_0301", - "u0390", "u03B9_0308_0301", - "u03AA", "u0399_0308", - "u03AB", "u03A5_0308", - "u03AC", "u03B1_0301", - "u03AD", "u03B5_0301", - "u03AE", "u03B7_0301", - "u03AF", "u03B9_0301", - "u03B0", "u03C5_0308_0301", - "u03CA", "u03B9_0308", - "u03CB", "u03C5_0308", - "u03CC", "u03BF_0301", - "u03CD", "u03C5_0301", - "u03CE", "u03C9_0301", - "u03D3", "u03D2_0301", - "u03D4", "u03D2_0308", - "u0400", "u0415_0300", - "u0401", "u0415_0308", - "u0403", "u0413_0301", - "u0407", "u0406_0308", - "u040C", "u041A_0301", - "u040D", "u0418_0300", - "u040E", "u0423_0306", - "u0419", "u0418_0306", - "u0439", "u0438_0306", - "u0450", "u0435_0300", - "u0451", "u0435_0308", - "u0453", "u0433_0301", - "u0457", "u0456_0308", - "u045C", "u043A_0301", - "u045D", "u0438_0300", - "u045E", "u0443_0306", - "u0476", "u0474_030F", - "u0477", "u0475_030F", - "u04C1", "u0416_0306", - "u04C2", "u0436_0306", - "u04D0", "u0410_0306", - "u04D1", "u0430_0306", - "u04D2", "u0410_0308", - "u04D3", "u0430_0308", - "u04D6", "u0415_0306", - "u04D7", "u0435_0306", - "u04DA", "u04D8_0308", - "u04DB", "u04D9_0308", - "u04DC", "u0416_0308", - "u04DD", "u0436_0308", - "u04DE", "u0417_0308", - "u04DF", "u0437_0308", - "u04E2", "u0418_0304", - "u04E3", "u0438_0304", - "u04E4", "u0418_0308", - "u04E5", "u0438_0308", - "u04E6", "u041E_0308", - "u04E7", "u043E_0308", - "u04EA", "u04E8_0308", - "u04EB", "u04E9_0308", - "u04EC", "u042D_0308", - "u04ED", "u044D_0308", - "u04EE", "u0423_0304", - "u04EF", "u0443_0304", - "u04F0", "u0423_0308", - "u04F1", "u0443_0308", - "u04F2", "u0423_030B", - "u04F3", "u0443_030B", - "u04F4", "u0427_0308", - "u04F5", "u0447_0308", - "u04F8", "u042B_0308", - "u04F9", "u044B_0308", - "u0622", "u0627_0653", - "u0623", "u0627_0654", - "u0624", "u0648_0654", - "u0625", "u0627_0655", - "u0626", "u064A_0654", - "u06C0", "u06D5_0654", - "u06C2", "u06C1_0654", - "u06D3", "u06D2_0654", - "u0929", "u0928_093C", - "u0931", "u0930_093C", - "u0934", "u0933_093C", - "u0958", "u0915_093C", - "u0959", "u0916_093C", - "u095A", "u0917_093C", - "u095B", "u091C_093C", - "u095C", "u0921_093C", - "u095D", "u0922_093C", - "u095E", "u092B_093C", - "u095F", "u092F_093C", - "u09CB", "u09C7_09BE", - "u09CC", "u09C7_09D7", - "u09DC", "u09A1_09BC", - "u09DD", "u09A2_09BC", - "u09DF", "u09AF_09BC", - "u0A33", "u0A32_0A3C", - "u0A36", "u0A38_0A3C", - "u0A59", "u0A16_0A3C", - "u0A5A", "u0A17_0A3C", - "u0A5B", "u0A1C_0A3C", - "u0A5E", "u0A2B_0A3C", - "u0B48", "u0B47_0B56", - "u0B4B", "u0B47_0B3E", - "u0B4C", "u0B47_0B57", - "u0B5C", "u0B21_0B3C", - "u0B5D", "u0B22_0B3C", - "u0B94", "u0B92_0BD7", - "u0BCA", "u0BC6_0BBE", - "u0BCB", "u0BC7_0BBE", - "u0BCC", "u0BC6_0BD7", - "u0C48", "u0C46_0C56", - "u0CC0", "u0CBF_0CD5", - "u0CC7", "u0CC6_0CD5", - "u0CC8", "u0CC6_0CD6", - "u0CCA", "u0CC6_0CC2", - "u0CCB", "u0CC6_0CC2_0CD5", - "u0D4A", "u0D46_0D3E", - "u0D4B", "u0D47_0D3E", - "u0D4C", "u0D46_0D57", - "u0DDA", "u0DD9_0DCA", - "u0DDC", "u0DD9_0DCF", - "u0DDD", "u0DD9_0DCF_0DCA", - "u0DDE", "u0DD9_0DDF", - "u0F43", "u0F42_0FB7", - "u0F4D", "u0F4C_0FB7", - "u0F52", "u0F51_0FB7", - "u0F57", "u0F56_0FB7", - "u0F5C", "u0F5B_0FB7", - "u0F69", "u0F40_0FB5", - "u0F73", "u0F71_0F72", - "u0F75", "u0F71_0F74", - "u0F76", "u0FB2_0F80", - "u0F78", "u0FB3_0F80", - "u0F81", "u0F71_0F80", - "u0F93", "u0F92_0FB7", - "u0F9D", "u0F9C_0FB7", - "u0FA2", "u0FA1_0FB7", - "u0FA7", "u0FA6_0FB7", - "u0FAC", "u0FAB_0FB7", - "u0FB9", "u0F90_0FB5", - "u1026", "u1025_102E", - "u1E00", "u0041_0325", - "u1E01", "u0061_0325", - "u1E02", "u0042_0307", - "u1E03", "u0062_0307", - "u1E04", "u0042_0323", - "u1E05", "u0062_0323", - "u1E06", "u0042_0331", - "u1E07", "u0062_0331", - "u1E08", "u0043_0327_0301", - "u1E09", "u0063_0327_0301", - "u1E0A", "u0044_0307", - "u1E0B", "u0064_0307", - "u1E0C", "u0044_0323", - "u1E0D", "u0064_0323", - "u1E0E", "u0044_0331", - "u1E0F", "u0064_0331", - "u1E10", "u0044_0327", - "u1E11", "u0064_0327", - "u1E12", "u0044_032D", - "u1E13", "u0064_032D", - "u1E14", "u0045_0304_0300", - "u1E15", "u0065_0304_0300", - "u1E16", "u0045_0304_0301", - "u1E17", "u0065_0304_0301", - "u1E18", "u0045_032D", - "u1E19", "u0065_032D", - "u1E1A", "u0045_0330", - "u1E1B", "u0065_0330", - "u1E1C", "u0045_0327_0306", - "u1E1D", "u0065_0327_0306", - "u1E1E", "u0046_0307", - "u1E1F", "u0066_0307", - "u1E20", "u0047_0304", - "u1E21", "u0067_0304", - "u1E22", "u0048_0307", - "u1E23", "u0068_0307", - "u1E24", "u0048_0323", - "u1E25", "u0068_0323", - "u1E26", "u0048_0308", - "u1E27", "u0068_0308", - "u1E28", "u0048_0327", - "u1E29", "u0068_0327", - "u1E2A", "u0048_032E", - "u1E2B", "u0068_032E", - "u1E2C", "u0049_0330", - "u1E2D", "u0069_0330", - "u1E2E", "u0049_0308_0301", - "u1E2F", "u0069_0308_0301", - "u1E30", "u004B_0301", - "u1E31", "u006B_0301", - "u1E32", "u004B_0323", - "u1E33", "u006B_0323", - "u1E34", "u004B_0331", - "u1E35", "u006B_0331", - "u1E36", "u004C_0323", - "u1E37", "u006C_0323", - "u1E38", "u004C_0323_0304", - "u1E39", "u006C_0323_0304", - "u1E3A", "u004C_0331", - "u1E3B", "u006C_0331", - "u1E3C", "u004C_032D", - "u1E3D", "u006C_032D", - "u1E3E", "u004D_0301", - "u1E3F", "u006D_0301", - "u1E40", "u004D_0307", - "u1E41", "u006D_0307", - "u1E42", "u004D_0323", - "u1E43", "u006D_0323", - "u1E44", "u004E_0307", - "u1E45", "u006E_0307", - "u1E46", "u004E_0323", - "u1E47", "u006E_0323", - "u1E48", "u004E_0331", - "u1E49", "u006E_0331", - "u1E4A", "u004E_032D", - "u1E4B", "u006E_032D", - "u1E4C", "u004F_0303_0301", - "u1E4D", "u006F_0303_0301", - "u1E4E", "u004F_0303_0308", - "u1E4F", "u006F_0303_0308", - "u1E50", "u004F_0304_0300", - "u1E51", "u006F_0304_0300", - "u1E52", "u004F_0304_0301", - "u1E53", "u006F_0304_0301", - "u1E54", "u0050_0301", - "u1E55", "u0070_0301", - "u1E56", "u0050_0307", - "u1E57", "u0070_0307", - "u1E58", "u0052_0307", - "u1E59", "u0072_0307", - "u1E5A", "u0052_0323", - "u1E5B", "u0072_0323", - "u1E5C", "u0052_0323_0304", - "u1E5D", "u0072_0323_0304", - "u1E5E", "u0052_0331", - "u1E5F", "u0072_0331", - "u1E60", "u0053_0307", - "u1E61", "u0073_0307", - "u1E62", "u0053_0323", - "u1E63", "u0073_0323", - "u1E64", "u0053_0301_0307", - "u1E65", "u0073_0301_0307", - "u1E66", "u0053_030C_0307", - "u1E67", "u0073_030C_0307", - "u1E68", "u0053_0323_0307", - "u1E69", "u0073_0323_0307", - "u1E6A", "u0054_0307", - "u1E6B", "u0074_0307", - "u1E6C", "u0054_0323", - "u1E6D", "u0074_0323", - "u1E6E", "u0054_0331", - "u1E6F", "u0074_0331", - "u1E70", "u0054_032D", - "u1E71", "u0074_032D", - "u1E72", "u0055_0324", - "u1E73", "u0075_0324", - "u1E74", "u0055_0330", - "u1E75", "u0075_0330", - "u1E76", "u0055_032D", - "u1E77", "u0075_032D", - "u1E78", "u0055_0303_0301", - "u1E79", "u0075_0303_0301", - "u1E7A", "u0055_0304_0308", - "u1E7B", "u0075_0304_0308", - "u1E7C", "u0056_0303", - "u1E7D", "u0076_0303", - "u1E7E", "u0056_0323", - "u1E7F", "u0076_0323", - "u1E80", "u0057_0300", - "u1E81", "u0077_0300", - "u1E82", "u0057_0301", - "u1E83", "u0077_0301", - "u1E84", "u0057_0308", - "u1E85", "u0077_0308", - "u1E86", "u0057_0307", - "u1E87", "u0077_0307", - "u1E88", "u0057_0323", - "u1E89", "u0077_0323", - "u1E8A", "u0058_0307", - "u1E8B", "u0078_0307", - "u1E8C", "u0058_0308", - "u1E8D", "u0078_0308", - "u1E8E", "u0059_0307", - "u1E8F", "u0079_0307", - "u1E90", "u005A_0302", - "u1E91", "u007A_0302", - "u1E92", "u005A_0323", - "u1E93", "u007A_0323", - "u1E94", "u005A_0331", - "u1E95", "u007A_0331", - "u1E96", "u0068_0331", - "u1E97", "u0074_0308", - "u1E98", "u0077_030A", - "u1E99", "u0079_030A", - "u1E9B", "u017F_0307", - "u1EA0", "u0041_0323", - "u1EA1", "u0061_0323", - "u1EA2", "u0041_0309", - "u1EA3", "u0061_0309", - "u1EA4", "u0041_0302_0301", - "u1EA5", "u0061_0302_0301", - "u1EA6", "u0041_0302_0300", - "u1EA7", "u0061_0302_0300", - "u1EA8", "u0041_0302_0309", - "u1EA9", "u0061_0302_0309", - "u1EAA", "u0041_0302_0303", - "u1EAB", "u0061_0302_0303", - "u1EAC", "u0041_0323_0302", - "u1EAD", "u0061_0323_0302", - "u1EAE", "u0041_0306_0301", - "u1EAF", "u0061_0306_0301", - "u1EB0", "u0041_0306_0300", - "u1EB1", "u0061_0306_0300", - "u1EB2", "u0041_0306_0309", - "u1EB3", "u0061_0306_0309", - "u1EB4", "u0041_0306_0303", - "u1EB5", "u0061_0306_0303", - "u1EB6", "u0041_0323_0306", - "u1EB7", "u0061_0323_0306", - "u1EB8", "u0045_0323", - "u1EB9", "u0065_0323", - "u1EBA", "u0045_0309", - "u1EBB", "u0065_0309", - "u1EBC", "u0045_0303", - "u1EBD", "u0065_0303", - "u1EBE", "u0045_0302_0301", - "u1EBF", "u0065_0302_0301", - "u1EC0", "u0045_0302_0300", - "u1EC1", "u0065_0302_0300", - "u1EC2", "u0045_0302_0309", - "u1EC3", "u0065_0302_0309", - "u1EC4", "u0045_0302_0303", - "u1EC5", "u0065_0302_0303", - "u1EC6", "u0045_0323_0302", - "u1EC7", "u0065_0323_0302", - "u1EC8", "u0049_0309", - "u1EC9", "u0069_0309", - "u1ECA", "u0049_0323", - "u1ECB", "u0069_0323", - "u1ECC", "u004F_0323", - "u1ECD", "u006F_0323", - "u1ECE", "u004F_0309", - "u1ECF", "u006F_0309", - "u1ED0", "u004F_0302_0301", - "u1ED1", "u006F_0302_0301", - "u1ED2", "u004F_0302_0300", - "u1ED3", "u006F_0302_0300", - "u1ED4", "u004F_0302_0309", - "u1ED5", "u006F_0302_0309", - "u1ED6", "u004F_0302_0303", - "u1ED7", "u006F_0302_0303", - "u1ED8", "u004F_0323_0302", - "u1ED9", "u006F_0323_0302", - "u1EDA", "u004F_031B_0301", - "u1EDB", "u006F_031B_0301", - "u1EDC", "u004F_031B_0300", - "u1EDD", "u006F_031B_0300", - "u1EDE", "u004F_031B_0309", - "u1EDF", "u006F_031B_0309", - "u1EE0", "u004F_031B_0303", - "u1EE1", "u006F_031B_0303", - "u1EE2", "u004F_031B_0323", - "u1EE3", "u006F_031B_0323", - "u1EE4", "u0055_0323", - "u1EE5", "u0075_0323", - "u1EE6", "u0055_0309", - "u1EE7", "u0075_0309", - "u1EE8", "u0055_031B_0301", - "u1EE9", "u0075_031B_0301", - "u1EEA", "u0055_031B_0300", - "u1EEB", "u0075_031B_0300", - "u1EEC", "u0055_031B_0309", - "u1EED", "u0075_031B_0309", - "u1EEE", "u0055_031B_0303", - "u1EEF", "u0075_031B_0303", - "u1EF0", "u0055_031B_0323", - "u1EF1", "u0075_031B_0323", - "u1EF2", "u0059_0300", - "u1EF3", "u0079_0300", - "u1EF4", "u0059_0323", - "u1EF5", "u0079_0323", - "u1EF6", "u0059_0309", - "u1EF7", "u0079_0309", - "u1EF8", "u0059_0303", - "u1EF9", "u0079_0303", - "u1F00", "u03B1_0313", - "u1F01", "u03B1_0314", - "u1F02", "u03B1_0313_0300", - "u1F03", "u03B1_0314_0300", - "u1F04", "u03B1_0313_0301", - "u1F05", "u03B1_0314_0301", - "u1F06", "u03B1_0313_0342", - "u1F07", "u03B1_0314_0342", - "u1F08", "u0391_0313", - "u1F09", "u0391_0314", - "u1F0A", "u0391_0313_0300", - "u1F0B", "u0391_0314_0300", - "u1F0C", "u0391_0313_0301", - "u1F0D", "u0391_0314_0301", - "u1F0E", "u0391_0313_0342", - "u1F0F", "u0391_0314_0342", - "u1F10", "u03B5_0313", - "u1F11", "u03B5_0314", - "u1F12", "u03B5_0313_0300", - "u1F13", "u03B5_0314_0300", - "u1F14", "u03B5_0313_0301", - "u1F15", "u03B5_0314_0301", - "u1F18", "u0395_0313", - "u1F19", "u0395_0314", - "u1F1A", "u0395_0313_0300", - "u1F1B", "u0395_0314_0300", - "u1F1C", "u0395_0313_0301", - "u1F1D", "u0395_0314_0301", - "u1F20", "u03B7_0313", - "u1F21", "u03B7_0314", - "u1F22", "u03B7_0313_0300", - "u1F23", "u03B7_0314_0300", - "u1F24", "u03B7_0313_0301", - "u1F25", "u03B7_0314_0301", - "u1F26", "u03B7_0313_0342", - "u1F27", "u03B7_0314_0342", - "u1F28", "u0397_0313", - "u1F29", "u0397_0314", - "u1F2A", "u0397_0313_0300", - "u1F2B", "u0397_0314_0300", - "u1F2C", "u0397_0313_0301", - "u1F2D", "u0397_0314_0301", - "u1F2E", "u0397_0313_0342", - "u1F2F", "u0397_0314_0342", - "u1F30", "u03B9_0313", - "u1F31", "u03B9_0314", - "u1F32", "u03B9_0313_0300", - "u1F33", "u03B9_0314_0300", - "u1F34", "u03B9_0313_0301", - "u1F35", "u03B9_0314_0301", - "u1F36", "u03B9_0313_0342", - "u1F37", "u03B9_0314_0342", - "u1F38", "u0399_0313", - "u1F39", "u0399_0314", - "u1F3A", "u0399_0313_0300", - "u1F3B", "u0399_0314_0300", - "u1F3C", "u0399_0313_0301", - "u1F3D", "u0399_0314_0301", - "u1F3E", "u0399_0313_0342", - "u1F3F", "u0399_0314_0342", - "u1F40", "u03BF_0313", - "u1F41", "u03BF_0314", - "u1F42", "u03BF_0313_0300", - "u1F43", "u03BF_0314_0300", - "u1F44", "u03BF_0313_0301", - "u1F45", "u03BF_0314_0301", - "u1F48", "u039F_0313", - "u1F49", "u039F_0314", - "u1F4A", "u039F_0313_0300", - "u1F4B", "u039F_0314_0300", - "u1F4C", "u039F_0313_0301", - "u1F4D", "u039F_0314_0301", - "u1F50", "u03C5_0313", - "u1F51", "u03C5_0314", - "u1F52", "u03C5_0313_0300", - "u1F53", "u03C5_0314_0300", - "u1F54", "u03C5_0313_0301", - "u1F55", "u03C5_0314_0301", - "u1F56", "u03C5_0313_0342", - "u1F57", "u03C5_0314_0342", - "u1F59", "u03A5_0314", - "u1F5B", "u03A5_0314_0300", - "u1F5D", "u03A5_0314_0301", - "u1F5F", "u03A5_0314_0342", - "u1F60", "u03C9_0313", - "u1F61", "u03C9_0314", - "u1F62", "u03C9_0313_0300", - "u1F63", "u03C9_0314_0300", - "u1F64", "u03C9_0313_0301", - "u1F65", "u03C9_0314_0301", - "u1F66", "u03C9_0313_0342", - "u1F67", "u03C9_0314_0342", - "u1F68", "u03A9_0313", - "u1F69", "u03A9_0314", - "u1F6A", "u03A9_0313_0300", - "u1F6B", "u03A9_0314_0300", - "u1F6C", "u03A9_0313_0301", - "u1F6D", "u03A9_0314_0301", - "u1F6E", "u03A9_0313_0342", - "u1F6F", "u03A9_0314_0342", - "u1F70", "u03B1_0300", - "u1F71", "u03B1_0301", - "u1F72", "u03B5_0300", - "u1F73", "u03B5_0301", - "u1F74", "u03B7_0300", - "u1F75", "u03B7_0301", - "u1F76", "u03B9_0300", - "u1F77", "u03B9_0301", - "u1F78", "u03BF_0300", - "u1F79", "u03BF_0301", - "u1F7A", "u03C5_0300", - "u1F7B", "u03C5_0301", - "u1F7C", "u03C9_0300", - "u1F7D", "u03C9_0301", - "u1F80", "u03B1_0313_0345", - "u1F81", "u03B1_0314_0345", - "u1F82", "u03B1_0313_0300_0345", - "u1F83", "u03B1_0314_0300_0345", - "u1F84", "u03B1_0313_0301_0345", - "u1F85", "u03B1_0314_0301_0345", - "u1F86", "u03B1_0313_0342_0345", - "u1F87", "u03B1_0314_0342_0345", - "u1F88", "u0391_0313_0345", - "u1F89", "u0391_0314_0345", - "u1F8A", "u0391_0313_0300_0345", - "u1F8B", "u0391_0314_0300_0345", - "u1F8C", "u0391_0313_0301_0345", - "u1F8D", "u0391_0314_0301_0345", - "u1F8E", "u0391_0313_0342_0345", - "u1F8F", "u0391_0314_0342_0345", - "u1F90", "u03B7_0313_0345", - "u1F91", "u03B7_0314_0345", - "u1F92", "u03B7_0313_0300_0345", - "u1F93", "u03B7_0314_0300_0345", - "u1F94", "u03B7_0313_0301_0345", - "u1F95", "u03B7_0314_0301_0345", - "u1F96", "u03B7_0313_0342_0345", - "u1F97", "u03B7_0314_0342_0345", - "u1F98", "u0397_0313_0345", - "u1F99", "u0397_0314_0345", - "u1F9A", "u0397_0313_0300_0345", - "u1F9B", "u0397_0314_0300_0345", - "u1F9C", "u0397_0313_0301_0345", - "u1F9D", "u0397_0314_0301_0345", - "u1F9E", "u0397_0313_0342_0345", - "u1F9F", "u0397_0314_0342_0345", - "u1FA0", "u03C9_0313_0345", - "u1FA1", "u03C9_0314_0345", - "u1FA2", "u03C9_0313_0300_0345", - "u1FA3", "u03C9_0314_0300_0345", - "u1FA4", "u03C9_0313_0301_0345", - "u1FA5", "u03C9_0314_0301_0345", - "u1FA6", "u03C9_0313_0342_0345", - "u1FA7", "u03C9_0314_0342_0345", - "u1FA8", "u03A9_0313_0345", - "u1FA9", "u03A9_0314_0345", - "u1FAA", "u03A9_0313_0300_0345", - "u1FAB", "u03A9_0314_0300_0345", - "u1FAC", "u03A9_0313_0301_0345", - "u1FAD", "u03A9_0314_0301_0345", - "u1FAE", "u03A9_0313_0342_0345", - "u1FAF", "u03A9_0314_0342_0345", - "u1FB0", "u03B1_0306", - "u1FB1", "u03B1_0304", - "u1FB2", "u03B1_0300_0345", - "u1FB3", "u03B1_0345", - "u1FB4", "u03B1_0301_0345", - "u1FB6", "u03B1_0342", - "u1FB7", "u03B1_0342_0345", - "u1FB8", "u0391_0306", - "u1FB9", "u0391_0304", - "u1FBA", "u0391_0300", - "u1FBB", "u0391_0301", - "u1FBC", "u0391_0345", - "u1FBE", "u03B9", - "u1FC1", "u00A8_0342", - "u1FC2", "u03B7_0300_0345", - "u1FC3", "u03B7_0345", - "u1FC4", "u03B7_0301_0345", - "u1FC6", "u03B7_0342", - "u1FC7", "u03B7_0342_0345", - "u1FC8", "u0395_0300", - "u1FC9", "u0395_0301", - "u1FCA", "u0397_0300", - "u1FCB", "u0397_0301", - "u1FCC", "u0397_0345", - "u1FCD", "u1FBF_0300", - "u1FCE", "u1FBF_0301", - "u1FCF", "u1FBF_0342", - "u1FD0", "u03B9_0306", - "u1FD1", "u03B9_0304", - "u1FD2", "u03B9_0308_0300", - "u1FD3", "u03B9_0308_0301", - "u1FD6", "u03B9_0342", - "u1FD7", "u03B9_0308_0342", - "u1FD8", "u0399_0306", - "u1FD9", "u0399_0304", - "u1FDA", "u0399_0300", - "u1FDB", "u0399_0301", - "u1FDD", "u1FFE_0300", - "u1FDE", "u1FFE_0301", - "u1FDF", "u1FFE_0342", - "u1FE0", "u03C5_0306", - "u1FE1", "u03C5_0304", - "u1FE2", "u03C5_0308_0300", - "u1FE3", "u03C5_0308_0301", - "u1FE4", "u03C1_0313", - "u1FE5", "u03C1_0314", - "u1FE6", "u03C5_0342", - "u1FE7", "u03C5_0308_0342", - "u1FE8", "u03A5_0306", - "u1FE9", "u03A5_0304", - "u1FEA", "u03A5_0300", - "u1FEB", "u03A5_0301", - "u1FEC", "u03A1_0314", - "u1FED", "u00A8_0300", - "u1FEE", "u00A8_0301", - "u1FEF", "u0060", - "u1FF2", "u03C9_0300_0345", - "u1FF3", "u03C9_0345", - "u1FF4", "u03C9_0301_0345", - "u1FF6", "u03C9_0342", - "u1FF7", "u03C9_0342_0345", - "u1FF8", "u039F_0300", - "u1FF9", "u039F_0301", - "u1FFA", "u03A9_0300", - "u1FFB", "u03A9_0301", - "u1FFC", "u03A9_0345", - "u1FFD", "u00B4", - "u2000", "u2002", - "u2001", "u2003", - "u2126", "u03A9", - "u212A", "u004B", - "u212B", "u0041_030A", - "u219A", "u2190_0338", - "u219B", "u2192_0338", - "u21AE", "u2194_0338", - "u21CD", "u21D0_0338", - "u21CE", "u21D4_0338", - "u21CF", "u21D2_0338", - "u2204", "u2203_0338", - "u2209", "u2208_0338", - "u220C", "u220B_0338", - "u2224", "u2223_0338", - "u2226", "u2225_0338", - "u2241", "u223C_0338", - "u2244", "u2243_0338", - "u2247", "u2245_0338", - "u2249", "u2248_0338", - "u2260", "u003D_0338", - "u2262", "u2261_0338", - "u226D", "u224D_0338", - "u226E", "u003C_0338", - "u226F", "u003E_0338", - "u2270", "u2264_0338", - "u2271", "u2265_0338", - "u2274", "u2272_0338", - "u2275", "u2273_0338", - "u2278", "u2276_0338", - "u2279", "u2277_0338", - "u2280", "u227A_0338", - "u2281", "u227B_0338", - "u2284", "u2282_0338", - "u2285", "u2283_0338", - "u2288", "u2286_0338", - "u2289", "u2287_0338", - "u22AC", "u22A2_0338", - "u22AD", "u22A8_0338", - "u22AE", "u22A9_0338", - "u22AF", "u22AB_0338", - "u22E0", "u227C_0338", - "u22E1", "u227D_0338", - "u22E2", "u2291_0338", - "u22E3", "u2292_0338", - "u22EA", "u22B2_0338", - "u22EB", "u22B3_0338", - "u22EC", "u22B4_0338", - "u22ED", "u22B5_0338", - "u2329", "u3008", - "u232A", "u3009", - "u2ADC", "u2ADD_0338", - "u304C", "u304B_3099", - "u304E", "u304D_3099", - "u3050", "u304F_3099", - "u3052", "u3051_3099", - "u3054", "u3053_3099", - "u3056", "u3055_3099", - "u3058", "u3057_3099", - "u305A", "u3059_3099", - "u305C", "u305B_3099", - "u305E", "u305D_3099", - "u3060", "u305F_3099", - "u3062", "u3061_3099", - "u3065", "u3064_3099", - "u3067", "u3066_3099", - "u3069", "u3068_3099", - "u3070", "u306F_3099", - "u3071", "u306F_309A", - "u3073", "u3072_3099", - "u3074", "u3072_309A", - "u3076", "u3075_3099", - "u3077", "u3075_309A", - "u3079", "u3078_3099", - "u307A", "u3078_309A", - "u307C", "u307B_3099", - "u307D", "u307B_309A", - "u3094", "u3046_3099", - "u309E", "u309D_3099", - "u30AC", "u30AB_3099", - "u30AE", "u30AD_3099", - "u30B0", "u30AF_3099", - "u30B2", "u30B1_3099", - "u30B4", "u30B3_3099", - "u30B6", "u30B5_3099", - "u30B8", "u30B7_3099", - "u30BA", "u30B9_3099", - "u30BC", "u30BB_3099", - "u30BE", "u30BD_3099", - "u30C0", "u30BF_3099", - "u30C2", "u30C1_3099", - "u30C5", "u30C4_3099", - "u30C7", "u30C6_3099", - "u30C9", "u30C8_3099", - "u30D0", "u30CF_3099", - "u30D1", "u30CF_309A", - "u30D3", "u30D2_3099", - "u30D4", "u30D2_309A", - "u30D6", "u30D5_3099", - "u30D7", "u30D5_309A", - "u30D9", "u30D8_3099", - "u30DA", "u30D8_309A", - "u30DC", "u30DB_3099", - "u30DD", "u30DB_309A", - "u30F4", "u30A6_3099", - "u30F7", "u30EF_3099", - "u30F8", "u30F0_3099", - "u30F9", "u30F1_3099", - "u30FA", "u30F2_3099", - "u30FE", "u30FD_3099", - "uF900", "u8C48", - "uF901", "u66F4", - "uF902", "u8ECA", - "uF903", "u8CC8", - "uF904", "u6ED1", - "uF905", "u4E32", - "uF906", "u53E5", - "uF907", "u9F9C", - "uF908", "u9F9C", - "uF909", "u5951", - "uF90A", "u91D1", - "uF90B", "u5587", - "uF90C", "u5948", - "uF90D", "u61F6", - "uF90E", "u7669", - "uF90F", "u7F85", - "uF910", "u863F", - "uF911", "u87BA", - "uF912", "u88F8", - "uF913", "u908F", - "uF914", "u6A02", - "uF915", "u6D1B", - "uF916", "u70D9", - "uF917", "u73DE", - "uF918", "u843D", - "uF919", "u916A", - "uF91A", "u99F1", - "uF91B", "u4E82", - "uF91C", "u5375", - "uF91D", "u6B04", - "uF91E", "u721B", - "uF91F", "u862D", - "uF920", "u9E1E", - "uF921", "u5D50", - "uF922", "u6FEB", - "uF923", "u85CD", - "uF924", "u8964", - "uF925", "u62C9", - "uF926", "u81D8", - "uF927", "u881F", - "uF928", "u5ECA", - "uF929", "u6717", - "uF92A", "u6D6A", - "uF92B", "u72FC", - "uF92C", "u90CE", - "uF92D", "u4F86", - "uF92E", "u51B7", - "uF92F", "u52DE", - "uF930", "u64C4", - "uF931", "u6AD3", - "uF932", "u7210", - "uF933", "u76E7", - "uF934", "u8001", - "uF935", "u8606", - "uF936", "u865C", - "uF937", "u8DEF", - "uF938", "u9732", - "uF939", "u9B6F", - "uF93A", "u9DFA", - "uF93B", "u788C", - "uF93C", "u797F", - "uF93D", "u7DA0", - "uF93E", "u83C9", - "uF93F", "u9304", - "uF940", "u9E7F", - "uF941", "u8AD6", - "uF942", "u58DF", - "uF943", "u5F04", - "uF944", "u7C60", - "uF945", "u807E", - "uF946", "u7262", - "uF947", "u78CA", - "uF948", "u8CC2", - "uF949", "u96F7", - "uF94A", "u58D8", - "uF94B", "u5C62", - "uF94C", "u6A13", - "uF94D", "u6DDA", - "uF94E", "u6F0F", - "uF94F", "u7D2F", - "uF950", "u7E37", - "uF951", "u964B", - "uF952", "u52D2", - "uF953", "u808B", - "uF954", "u51DC", - "uF955", "u51CC", - "uF956", "u7A1C", - "uF957", "u7DBE", - "uF958", "u83F1", - "uF959", "u9675", - "uF95A", "u8B80", - "uF95B", "u62CF", - "uF95C", "u6A02", - "uF95D", "u8AFE", - "uF95E", "u4E39", - "uF95F", "u5BE7", - "uF960", "u6012", - "uF961", "u7387", - "uF962", "u7570", - "uF963", "u5317", - "uF964", "u78FB", - "uF965", "u4FBF", - "uF966", "u5FA9", - "uF967", "u4E0D", - "uF968", "u6CCC", - "uF969", "u6578", - "uF96A", "u7D22", - "uF96B", "u53C3", - "uF96C", "u585E", - "uF96D", "u7701", - "uF96E", "u8449", - "uF96F", "u8AAA", - "uF970", "u6BBA", - "uF971", "u8FB0", - "uF972", "u6C88", - "uF973", "u62FE", - "uF974", "u82E5", - "uF975", "u63A0", - "uF976", "u7565", - "uF977", "u4EAE", - "uF978", "u5169", - "uF979", "u51C9", - "uF97A", "u6881", - "uF97B", "u7CE7", - "uF97C", "u826F", - "uF97D", "u8AD2", - "uF97E", "u91CF", - "uF97F", "u52F5", - "uF980", "u5442", - "uF981", "u5973", - "uF982", "u5EEC", - "uF983", "u65C5", - "uF984", "u6FFE", - "uF985", "u792A", - "uF986", "u95AD", - "uF987", "u9A6A", - "uF988", "u9E97", - "uF989", "u9ECE", - "uF98A", "u529B", - "uF98B", "u66C6", - "uF98C", "u6B77", - "uF98D", "u8F62", - "uF98E", "u5E74", - "uF98F", "u6190", - "uF990", "u6200", - "uF991", "u649A", - "uF992", "u6F23", - "uF993", "u7149", - "uF994", "u7489", - "uF995", "u79CA", - "uF996", "u7DF4", - "uF997", "u806F", - "uF998", "u8F26", - "uF999", "u84EE", - "uF99A", "u9023", - "uF99B", "u934A", - "uF99C", "u5217", - "uF99D", "u52A3", - "uF99E", "u54BD", - "uF99F", "u70C8", - "uF9A0", "u88C2", - "uF9A1", "u8AAA", - "uF9A2", "u5EC9", - "uF9A3", "u5FF5", - "uF9A4", "u637B", - "uF9A5", "u6BAE", - "uF9A6", "u7C3E", - "uF9A7", "u7375", - "uF9A8", "u4EE4", - "uF9A9", "u56F9", - "uF9AA", "u5BE7", - "uF9AB", "u5DBA", - "uF9AC", "u601C", - "uF9AD", "u73B2", - "uF9AE", "u7469", - "uF9AF", "u7F9A", - "uF9B0", "u8046", - "uF9B1", "u9234", - "uF9B2", "u96F6", - "uF9B3", "u9748", - "uF9B4", "u9818", - "uF9B5", "u4F8B", - "uF9B6", "u79AE", - "uF9B7", "u91B4", - "uF9B8", "u96B8", - "uF9B9", "u60E1", - "uF9BA", "u4E86", - "uF9BB", "u50DA", - "uF9BC", "u5BEE", - "uF9BD", "u5C3F", - "uF9BE", "u6599", - "uF9BF", "u6A02", - "uF9C0", "u71CE", - "uF9C1", "u7642", - "uF9C2", "u84FC", - "uF9C3", "u907C", - "uF9C4", "u9F8D", - "uF9C5", "u6688", - "uF9C6", "u962E", - "uF9C7", "u5289", - "uF9C8", "u677B", - "uF9C9", "u67F3", - "uF9CA", "u6D41", - "uF9CB", "u6E9C", - "uF9CC", "u7409", - "uF9CD", "u7559", - "uF9CE", "u786B", - "uF9CF", "u7D10", - "uF9D0", "u985E", - "uF9D1", "u516D", - "uF9D2", "u622E", - "uF9D3", "u9678", - "uF9D4", "u502B", - "uF9D5", "u5D19", - "uF9D6", "u6DEA", - "uF9D7", "u8F2A", - "uF9D8", "u5F8B", - "uF9D9", "u6144", - "uF9DA", "u6817", - "uF9DB", "u7387", - "uF9DC", "u9686", - "uF9DD", "u5229", - "uF9DE", "u540F", - "uF9DF", "u5C65", - "uF9E0", "u6613", - "uF9E1", "u674E", - "uF9E2", "u68A8", - "uF9E3", "u6CE5", - "uF9E4", "u7406", - "uF9E5", "u75E2", - "uF9E6", "u7F79", - "uF9E7", "u88CF", - "uF9E8", "u88E1", - "uF9E9", "u91CC", - "uF9EA", "u96E2", - "uF9EB", "u533F", - "uF9EC", "u6EBA", - "uF9ED", "u541D", - "uF9EE", "u71D0", - "uF9EF", "u7498", - "uF9F0", "u85FA", - "uF9F1", "u96A3", - "uF9F2", "u9C57", - "uF9F3", "u9E9F", - "uF9F4", "u6797", - "uF9F5", "u6DCB", - "uF9F6", "u81E8", - "uF9F7", "u7ACB", - "uF9F8", "u7B20", - "uF9F9", "u7C92", - "uF9FA", "u72C0", - "uF9FB", "u7099", - "uF9FC", "u8B58", - "uF9FD", "u4EC0", - "uF9FE", "u8336", - "uF9FF", "u523A", - "uFA00", "u5207", - "uFA01", "u5EA6", - "uFA02", "u62D3", - "uFA03", "u7CD6", - "uFA04", "u5B85", - "uFA05", "u6D1E", - "uFA06", "u66B4", - "uFA07", "u8F3B", - "uFA08", "u884C", - "uFA09", "u964D", - "uFA0A", "u898B", - "uFA0B", "u5ED3", - "uFA0C", "u5140", - "uFA0D", "u55C0", - "uFA10", "u585A", - "uFA12", "u6674", - "uFA15", "u51DE", - "uFA16", "u732A", - "uFA17", "u76CA", - "uFA18", "u793C", - "uFA19", "u795E", - "uFA1A", "u7965", - "uFA1B", "u798F", - "uFA1C", "u9756", - "uFA1D", "u7CBE", - "uFA1E", "u7FBD", - "uFA20", "u8612", - "uFA22", "u8AF8", - "uFA25", "u9038", - "uFA26", "u90FD", - "uFA2A", "u98EF", - "uFA2B", "u98FC", - "uFA2C", "u9928", - "uFA2D", "u9DB4", - "uFA30", "u4FAE", - "uFA31", "u50E7", - "uFA32", "u514D", - "uFA33", "u52C9", - "uFA34", "u52E4", - "uFA35", "u5351", - "uFA36", "u559D", - "uFA37", "u5606", - "uFA38", "u5668", - "uFA39", "u5840", - "uFA3A", "u58A8", - "uFA3B", "u5C64", - "uFA3C", "u5C6E", - "uFA3D", "u6094", - "uFA3E", "u6168", - "uFA3F", "u618E", - "uFA40", "u61F2", - "uFA41", "u654F", - "uFA42", "u65E2", - "uFA43", "u6691", - "uFA44", "u6885", - "uFA45", "u6D77", - "uFA46", "u6E1A", - "uFA47", "u6F22", - "uFA48", "u716E", - "uFA49", "u722B", - "uFA4A", "u7422", - "uFA4B", "u7891", - "uFA4C", "u793E", - "uFA4D", "u7949", - "uFA4E", "u7948", - "uFA4F", "u7950", - "uFA50", "u7956", - "uFA51", "u795D", - "uFA52", "u798D", - "uFA53", "u798E", - "uFA54", "u7A40", - "uFA55", "u7A81", - "uFA56", "u7BC0", - "uFA57", "u7DF4", - "uFA58", "u7E09", - "uFA59", "u7E41", - "uFA5A", "u7F72", - "uFA5B", "u8005", - "uFA5C", "u81ED", - "uFA5D", "u8279", - "uFA5E", "u8279", - "uFA5F", "u8457", - "uFA60", "u8910", - "uFA61", "u8996", - "uFA62", "u8B01", - "uFA63", "u8B39", - "uFA64", "u8CD3", - "uFA65", "u8D08", - "uFA66", "u8FB6", - "uFA67", "u9038", - "uFA68", "u96E3", - "uFA69", "u97FF", - "uFA6A", "u983B", - "uFB1D", "u05D9_05B4", - "uFB1F", "u05F2_05B7", - "uFB2A", "u05E9_05C1", - "uFB2B", "u05E9_05C2", - "uFB2C", "u05E9_05BC_05C1", - "uFB2D", "u05E9_05BC_05C2", - "uFB2E", "u05D0_05B7", - "uFB2F", "u05D0_05B8", - "uFB30", "u05D0_05BC", - "uFB31", "u05D1_05BC", - "uFB32", "u05D2_05BC", - "uFB33", "u05D3_05BC", - "uFB34", "u05D4_05BC", - "uFB35", "u05D5_05BC", - "uFB36", "u05D6_05BC", - "uFB38", "u05D8_05BC", - "uFB39", "u05D9_05BC", - "uFB3A", "u05DA_05BC", - "uFB3B", "u05DB_05BC", - "uFB3C", "u05DC_05BC", - "uFB3E", "u05DE_05BC", - "uFB40", "u05E0_05BC", - "uFB41", "u05E1_05BC", - "uFB43", "u05E3_05BC", - "uFB44", "u05E4_05BC", - "uFB46", "u05E6_05BC", - "uFB47", "u05E7_05BC", - "uFB48", "u05E8_05BC", - "uFB49", "u05E9_05BC", - "uFB4A", "u05EA_05BC", - "uFB4B", "u05D5_05B9", - "uFB4C", "u05D1_05BF", - "uFB4D", "u05DB_05BF", - "uFB4E", "u05E4_05BF", - "u1D15E", "u1D157_1D165", - "u1D15F", "u1D158_1D165", - "u1D160", "u1D158_1D165_1D16E", - "u1D161", "u1D158_1D165_1D16F", - "u1D162", "u1D158_1D165_1D170", - "u1D163", "u1D158_1D165_1D171", - "u1D164", "u1D158_1D165_1D172", - "u1D1BB", "u1D1B9_1D165", - "u1D1BC", "u1D1BA_1D165", - "u1D1BD", "u1D1B9_1D165_1D16E", - "u1D1BE", "u1D1BA_1D165_1D16E", - "u1D1BF", "u1D1B9_1D165_1D16F", - "u1D1C0", "u1D1BA_1D165_1D16F", - "u2F800", "u4E3D", - "u2F801", "u4E38", - "u2F802", "u4E41", - "u2F803", "u20122", - "u2F804", "u4F60", - "u2F805", "u4FAE", - "u2F806", "u4FBB", - "u2F807", "u5002", - "u2F808", "u507A", - "u2F809", "u5099", - "u2F80A", "u50E7", - "u2F80B", "u50CF", - "u2F80C", "u349E", - "u2F80D", "u2063A", - "u2F80E", "u514D", - "u2F80F", "u5154", - "u2F810", "u5164", - "u2F811", "u5177", - "u2F812", "u2051C", - "u2F813", "u34B9", - "u2F814", "u5167", - "u2F815", "u518D", - "u2F816", "u2054B", - "u2F817", "u5197", - "u2F818", "u51A4", - "u2F819", "u4ECC", - "u2F81A", "u51AC", - "u2F81B", "u51B5", - "u2F81C", "u291DF", - "u2F81D", "u51F5", - "u2F81E", "u5203", - "u2F81F", "u34DF", - "u2F820", "u523B", - "u2F821", "u5246", - "u2F822", "u5272", - "u2F823", "u5277", - "u2F824", "u3515", - "u2F825", "u52C7", - "u2F826", "u52C9", - "u2F827", "u52E4", - "u2F828", "u52FA", - "u2F829", "u5305", - "u2F82A", "u5306", - "u2F82B", "u5317", - "u2F82C", "u5349", - "u2F82D", "u5351", - "u2F82E", "u535A", - "u2F82F", "u5373", - "u2F830", "u537D", - "u2F831", "u537F", - "u2F832", "u537F", - "u2F833", "u537F", - "u2F834", "u20A2C", - "u2F835", "u7070", - "u2F836", "u53CA", - "u2F837", "u53DF", - "u2F838", "u20B63", - "u2F839", "u53EB", - "u2F83A", "u53F1", - "u2F83B", "u5406", - "u2F83C", "u549E", - "u2F83D", "u5438", - "u2F83E", "u5448", - "u2F83F", "u5468", - "u2F840", "u54A2", - "u2F841", "u54F6", - "u2F842", "u5510", - "u2F843", "u5553", - "u2F844", "u5563", - "u2F845", "u5584", - "u2F846", "u5584", - "u2F847", "u5599", - "u2F848", "u55AB", - "u2F849", "u55B3", - "u2F84A", "u55C2", - "u2F84B", "u5716", - "u2F84C", "u5606", - "u2F84D", "u5717", - "u2F84E", "u5651", - "u2F84F", "u5674", - "u2F850", "u5207", - "u2F851", "u58EE", - "u2F852", "u57CE", - "u2F853", "u57F4", - "u2F854", "u580D", - "u2F855", "u578B", - "u2F856", "u5832", - "u2F857", "u5831", - "u2F858", "u58AC", - "u2F859", "u214E4", - "u2F85A", "u58F2", - "u2F85B", "u58F7", - "u2F85C", "u5906", - "u2F85D", "u591A", - "u2F85E", "u5922", - "u2F85F", "u5962", - "u2F860", "u216A8", - "u2F861", "u216EA", - "u2F862", "u59EC", - "u2F863", "u5A1B", - "u2F864", "u5A27", - "u2F865", "u59D8", - "u2F866", "u5A66", - "u2F867", "u36EE", - "u2F868", "u2136A", - "u2F869", "u5B08", - "u2F86A", "u5B3E", - "u2F86B", "u5B3E", - "u2F86C", "u219C8", - "u2F86D", "u5BC3", - "u2F86E", "u5BD8", - "u2F86F", "u5BE7", - "u2F870", "u5BF3", - "u2F871", "u21B18", - "u2F872", "u5BFF", - "u2F873", "u5C06", - "u2F874", "u5F33", - "u2F875", "u5C22", - "u2F876", "u3781", - "u2F877", "u5C60", - "u2F878", "u5C6E", - "u2F879", "u5CC0", - "u2F87A", "u5C8D", - "u2F87B", "u21DE4", - "u2F87C", "u5D43", - "u2F87D", "u21DE6", - "u2F87E", "u5D6E", - "u2F87F", "u5D6B", - "u2F880", "u5D7C", - "u2F881", "u5DE1", - "u2F882", "u5DE2", - "u2F883", "u382F", - "u2F884", "u5DFD", - "u2F885", "u5E28", - "u2F886", "u5E3D", - "u2F887", "u5E69", - "u2F888", "u3862", - "u2F889", "u22183", - "u2F88A", "u387C", - "u2F88B", "u5EB0", - "u2F88C", "u5EB3", - "u2F88D", "u5EB6", - "u2F88E", "u5ECA", - "u2F88F", "u2A392", - "u2F890", "u5EFE", - "u2F891", "u22331", - "u2F892", "u22331", - "u2F893", "u8201", - "u2F894", "u5F22", - "u2F895", "u5F22", - "u2F896", "u38C7", - "u2F897", "u232B8", - "u2F898", "u261DA", - "u2F899", "u5F62", - "u2F89A", "u5F6B", - "u2F89B", "u38E3", - "u2F89C", "u5F9A", - "u2F89D", "u5FCD", - "u2F89E", "u5FD7", - "u2F89F", "u5FF9", - "u2F8A0", "u6081", - "u2F8A1", "u393A", - "u2F8A2", "u391C", - "u2F8A3", "u6094", - "u2F8A4", "u226D4", - "u2F8A5", "u60C7", - "u2F8A6", "u6148", - "u2F8A7", "u614C", - "u2F8A8", "u614E", - "u2F8A9", "u614C", - "u2F8AA", "u617A", - "u2F8AB", "u618E", - "u2F8AC", "u61B2", - "u2F8AD", "u61A4", - "u2F8AE", "u61AF", - "u2F8AF", "u61DE", - "u2F8B0", "u61F2", - "u2F8B1", "u61F6", - "u2F8B2", "u6210", - "u2F8B3", "u621B", - "u2F8B4", "u625D", - "u2F8B5", "u62B1", - "u2F8B6", "u62D4", - "u2F8B7", "u6350", - "u2F8B8", "u22B0C", - "u2F8B9", "u633D", - "u2F8BA", "u62FC", - "u2F8BB", "u6368", - "u2F8BC", "u6383", - "u2F8BD", "u63E4", - "u2F8BE", "u22BF1", - "u2F8BF", "u6422", - "u2F8C0", "u63C5", - "u2F8C1", "u63A9", - "u2F8C2", "u3A2E", - "u2F8C3", "u6469", - "u2F8C4", "u647E", - "u2F8C5", "u649D", - "u2F8C6", "u6477", - "u2F8C7", "u3A6C", - "u2F8C8", "u654F", - "u2F8C9", "u656C", - "u2F8CA", "u2300A", - "u2F8CB", "u65E3", - "u2F8CC", "u66F8", - "u2F8CD", "u6649", - "u2F8CE", "u3B19", - "u2F8CF", "u6691", - "u2F8D0", "u3B08", - "u2F8D1", "u3AE4", - "u2F8D2", "u5192", - "u2F8D3", "u5195", - "u2F8D4", "u6700", - "u2F8D5", "u669C", - "u2F8D6", "u80AD", - "u2F8D7", "u43D9", - "u2F8D8", "u6717", - "u2F8D9", "u671B", - "u2F8DA", "u6721", - "u2F8DB", "u675E", - "u2F8DC", "u6753", - "u2F8DD", "u233C3", - "u2F8DE", "u3B49", - "u2F8DF", "u67FA", - "u2F8E0", "u6785", - "u2F8E1", "u6852", - "u2F8E2", "u6885", - "u2F8E3", "u2346D", - "u2F8E4", "u688E", - "u2F8E5", "u681F", - "u2F8E6", "u6914", - "u2F8E7", "u3B9D", - "u2F8E8", "u6942", - "u2F8E9", "u69A3", - "u2F8EA", "u69EA", - "u2F8EB", "u6AA8", - "u2F8EC", "u236A3", - "u2F8ED", "u6ADB", - "u2F8EE", "u3C18", - "u2F8EF", "u6B21", - "u2F8F0", "u238A7", - "u2F8F1", "u6B54", - "u2F8F2", "u3C4E", - "u2F8F3", "u6B72", - "u2F8F4", "u6B9F", - "u2F8F5", "u6BBA", - "u2F8F6", "u6BBB", - "u2F8F7", "u23A8D", - "u2F8F8", "u21D0B", - "u2F8F9", "u23AFA", - "u2F8FA", "u6C4E", - "u2F8FB", "u23CBC", - "u2F8FC", "u6CBF", - "u2F8FD", "u6CCD", - "u2F8FE", "u6C67", - "u2F8FF", "u6D16", - "u2F900", "u6D3E", - "u2F901", "u6D77", - "u2F902", "u6D41", - "u2F903", "u6D69", - "u2F904", "u6D78", - "u2F905", "u6D85", - "u2F906", "u23D1E", - "u2F907", "u6D34", - "u2F908", "u6E2F", - "u2F909", "u6E6E", - "u2F90A", "u3D33", - "u2F90B", "u6ECB", - "u2F90C", "u6EC7", - "u2F90D", "u23ED1", - "u2F90E", "u6DF9", - "u2F90F", "u6F6E", - "u2F910", "u23F5E", - "u2F911", "u23F8E", - "u2F912", "u6FC6", - "u2F913", "u7039", - "u2F914", "u701E", - "u2F915", "u701B", - "u2F916", "u3D96", - "u2F917", "u704A", - "u2F918", "u707D", - "u2F919", "u7077", - "u2F91A", "u70AD", - "u2F91B", "u20525", - "u2F91C", "u7145", - "u2F91D", "u24263", - "u2F91E", "u719C", - "u2F91F", "u43AB", - "u2F920", "u7228", - "u2F921", "u7235", - "u2F922", "u7250", - "u2F923", "u24608", - "u2F924", "u7280", - "u2F925", "u7295", - "u2F926", "u24735", - "u2F927", "u24814", - "u2F928", "u737A", - "u2F929", "u738B", - "u2F92A", "u3EAC", - "u2F92B", "u73A5", - "u2F92C", "u3EB8", - "u2F92D", "u3EB8", - "u2F92E", "u7447", - "u2F92F", "u745C", - "u2F930", "u7471", - "u2F931", "u7485", - "u2F932", "u74CA", - "u2F933", "u3F1B", - "u2F934", "u7524", - "u2F935", "u24C36", - "u2F936", "u753E", - "u2F937", "u24C92", - "u2F938", "u7570", - "u2F939", "u2219F", - "u2F93A", "u7610", - "u2F93B", "u24FA1", - "u2F93C", "u24FB8", - "u2F93D", "u25044", - "u2F93E", "u3FFC", - "u2F93F", "u4008", - "u2F940", "u76F4", - "u2F941", "u250F3", - "u2F942", "u250F2", - "u2F943", "u25119", - "u2F944", "u25133", - "u2F945", "u771E", - "u2F946", "u771F", - "u2F947", "u771F", - "u2F948", "u774A", - "u2F949", "u4039", - "u2F94A", "u778B", - "u2F94B", "u4046", - "u2F94C", "u4096", - "u2F94D", "u2541D", - "u2F94E", "u784E", - "u2F94F", "u788C", - "u2F950", "u78CC", - "u2F951", "u40E3", - "u2F952", "u25626", - "u2F953", "u7956", - "u2F954", "u2569A", - "u2F955", "u256C5", - "u2F956", "u798F", - "u2F957", "u79EB", - "u2F958", "u412F", - "u2F959", "u7A40", - "u2F95A", "u7A4A", - "u2F95B", "u7A4F", - "u2F95C", "u2597C", - "u2F95D", "u25AA7", - "u2F95E", "u25AA7", - "u2F95F", "u7AAE", - "u2F960", "u4202", - "u2F961", "u25BAB", - "u2F962", "u7BC6", - "u2F963", "u7BC9", - "u2F964", "u4227", - "u2F965", "u25C80", - "u2F966", "u7CD2", - "u2F967", "u42A0", - "u2F968", "u7CE8", - "u2F969", "u7CE3", - "u2F96A", "u7D00", - "u2F96B", "u25F86", - "u2F96C", "u7D63", - "u2F96D", "u4301", - "u2F96E", "u7DC7", - "u2F96F", "u7E02", - "u2F970", "u7E45", - "u2F971", "u4334", - "u2F972", "u26228", - "u2F973", "u26247", - "u2F974", "u4359", - "u2F975", "u262D9", - "u2F976", "u7F7A", - "u2F977", "u2633E", - "u2F978", "u7F95", - "u2F979", "u7FFA", - "u2F97A", "u8005", - "u2F97B", "u264DA", - "u2F97C", "u26523", - "u2F97D", "u8060", - "u2F97E", "u265A8", - "u2F97F", "u8070", - "u2F980", "u2335F", - "u2F981", "u43D5", - "u2F982", "u80B2", - "u2F983", "u8103", - "u2F984", "u440B", - "u2F985", "u813E", - "u2F986", "u5AB5", - "u2F987", "u267A7", - "u2F988", "u267B5", - "u2F989", "u23393", - "u2F98A", "u2339C", - "u2F98B", "u8201", - "u2F98C", "u8204", - "u2F98D", "u8F9E", - "u2F98E", "u446B", - "u2F98F", "u8291", - "u2F990", "u828B", - "u2F991", "u829D", - "u2F992", "u52B3", - "u2F993", "u82B1", - "u2F994", "u82B3", - "u2F995", "u82BD", - "u2F996", "u82E6", - "u2F997", "u26B3C", - "u2F998", "u82E5", - "u2F999", "u831D", - "u2F99A", "u8363", - "u2F99B", "u83AD", - "u2F99C", "u8323", - "u2F99D", "u83BD", - "u2F99E", "u83E7", - "u2F99F", "u8457", - "u2F9A0", "u8353", - "u2F9A1", "u83CA", - "u2F9A2", "u83CC", - "u2F9A3", "u83DC", - "u2F9A4", "u26C36", - "u2F9A5", "u26D6B", - "u2F9A6", "u26CD5", - "u2F9A7", "u452B", - "u2F9A8", "u84F1", - "u2F9A9", "u84F3", - "u2F9AA", "u8516", - "u2F9AB", "u273CA", - "u2F9AC", "u8564", - "u2F9AD", "u26F2C", - "u2F9AE", "u455D", - "u2F9AF", "u4561", - "u2F9B0", "u26FB1", - "u2F9B1", "u270D2", - "u2F9B2", "u456B", - "u2F9B3", "u8650", - "u2F9B4", "u865C", - "u2F9B5", "u8667", - "u2F9B6", "u8669", - "u2F9B7", "u86A9", - "u2F9B8", "u8688", - "u2F9B9", "u870E", - "u2F9BA", "u86E2", - "u2F9BB", "u8779", - "u2F9BC", "u8728", - "u2F9BD", "u876B", - "u2F9BE", "u8786", - "u2F9BF", "u4D57", - "u2F9C0", "u87E1", - "u2F9C1", "u8801", - "u2F9C2", "u45F9", - "u2F9C3", "u8860", - "u2F9C4", "u8863", - "u2F9C5", "u27667", - "u2F9C6", "u88D7", - "u2F9C7", "u88DE", - "u2F9C8", "u4635", - "u2F9C9", "u88FA", - "u2F9CA", "u34BB", - "u2F9CB", "u278AE", - "u2F9CC", "u27966", - "u2F9CD", "u46BE", - "u2F9CE", "u46C7", - "u2F9CF", "u8AA0", - "u2F9D0", "u8AED", - "u2F9D1", "u8B8A", - "u2F9D2", "u8C55", - "u2F9D3", "u27CA8", - "u2F9D4", "u8CAB", - "u2F9D5", "u8CC1", - "u2F9D6", "u8D1B", - "u2F9D7", "u8D77", - "u2F9D8", "u27F2F", - "u2F9D9", "u20804", - "u2F9DA", "u8DCB", - "u2F9DB", "u8DBC", - "u2F9DC", "u8DF0", - "u2F9DD", "u208DE", - "u2F9DE", "u8ED4", - "u2F9DF", "u8F38", - "u2F9E0", "u285D2", - "u2F9E1", "u285ED", - "u2F9E2", "u9094", - "u2F9E3", "u90F1", - "u2F9E4", "u9111", - "u2F9E5", "u2872E", - "u2F9E6", "u911B", - "u2F9E7", "u9238", - "u2F9E8", "u92D7", - "u2F9E9", "u92D8", - "u2F9EA", "u927C", - "u2F9EB", "u93F9", - "u2F9EC", "u9415", - "u2F9ED", "u28BFA", - "u2F9EE", "u958B", - "u2F9EF", "u4995", - "u2F9F0", "u95B7", - "u2F9F1", "u28D77", - "u2F9F2", "u49E6", - "u2F9F3", "u96C3", - "u2F9F4", "u5DB2", - "u2F9F5", "u9723", - "u2F9F6", "u29145", - "u2F9F7", "u2921A", - "u2F9F8", "u4A6E", - "u2F9F9", "u4A76", - "u2F9FA", "u97E0", - "u2F9FB", "u2940A", - "u2F9FC", "u4AB2", - "u2F9FD", "u29496", - "u2F9FE", "u980B", - "u2F9FF", "u980B", - "u2FA00", "u9829", - "u2FA01", "u295B6", - "u2FA02", "u98E2", - "u2FA03", "u4B33", - "u2FA04", "u9929", - "u2FA05", "u99A7", - "u2FA06", "u99C2", - "u2FA07", "u99FE", - "u2FA08", "u4BCE", - "u2FA09", "u29B30", - "u2FA0A", "u9B12", - "u2FA0B", "u9C40", - "u2FA0C", "u9CFD", - "u2FA0D", "u4CCE", - "u2FA0E", "u4CED", - "u2FA0F", "u9D67", - "u2FA10", "u2A0CE", - "u2FA11", "u4CF8", - "u2FA12", "u2A105", - "u2FA13", "u2A20E", - "u2FA14", "u2A291", - "u2FA15", "u9EBB", - "u2FA16", "u4D56", - "u2FA17", "u9EF9", - "u2FA18", "u9EFE", - "u2FA19", "u9F05", - "u2FA1A", "u9F0F", - "u2FA1B", "u9F16", - "u2FA1C", "u9F3B", - "u2FA1D", "u2A600", +use strict; + +my %unicode_decomposed = ( + "00C0", "0041_0300", + "00C1", "0041_0301", + "00C2", "0041_0302", + "00C3", "0041_0303", + "00C4", "0041_0308", + "00C5", "0041_030A", + "00C7", "0043_0327", + "00C8", "0045_0300", + "00C9", "0045_0301", + "00CA", "0045_0302", + "00CB", "0045_0308", + "00CC", "0049_0300", + "00CD", "0049_0301", + "00CE", "0049_0302", + "00CF", "0049_0308", + "00D1", "004E_0303", + "00D2", "004F_0300", + "00D3", "004F_0301", + "00D4", "004F_0302", + "00D5", "004F_0303", + "00D6", "004F_0308", + "00D9", "0055_0300", + "00DA", "0055_0301", + "00DB", "0055_0302", + "00DC", "0055_0308", + "00DD", "0059_0301", + "00E0", "0061_0300", + "00E1", "0061_0301", + "00E2", "0061_0302", + "00E3", "0061_0303", + "00E4", "0061_0308", + "00E5", "0061_030A", + "00E7", "0063_0327", + "00E8", "0065_0300", + "00E9", "0065_0301", + "00EA", "0065_0302", + "00EB", "0065_0308", + "00EC", "0069_0300", + "00ED", "0069_0301", + "00EE", "0069_0302", + "00EF", "0069_0308", + "00F1", "006E_0303", + "00F2", "006F_0300", + "00F3", "006F_0301", + "00F4", "006F_0302", + "00F5", "006F_0303", + "00F6", "006F_0308", + "00F9", "0075_0300", + "00FA", "0075_0301", + "00FB", "0075_0302", + "00FC", "0075_0308", + "00FD", "0079_0301", + "00FF", "0079_0308", + "0100", "0041_0304", + "0101", "0061_0304", + "0102", "0041_0306", + "0103", "0061_0306", + "0104", "0041_0328", + "0105", "0061_0328", + "0106", "0043_0301", + "0107", "0063_0301", + "0108", "0043_0302", + "0109", "0063_0302", + "010A", "0043_0307", + "010B", "0063_0307", + "010C", "0043_030C", + "010D", "0063_030C", + "010E", "0044_030C", + "010F", "0064_030C", + "0112", "0045_0304", + "0113", "0065_0304", + "0114", "0045_0306", + "0115", "0065_0306", + "0116", "0045_0307", + "0117", "0065_0307", + "0118", "0045_0328", + "0119", "0065_0328", + "011A", "0045_030C", + "011B", "0065_030C", + "011C", "0047_0302", + "011D", "0067_0302", + "011E", "0047_0306", + "011F", "0067_0306", + "0120", "0047_0307", + "0121", "0067_0307", + "0122", "0047_0327", + "0123", "0067_0327", + "0124", "0048_0302", + "0125", "0068_0302", + "0128", "0049_0303", + "0129", "0069_0303", + "012A", "0049_0304", + "012B", "0069_0304", + "012C", "0049_0306", + "012D", "0069_0306", + "012E", "0049_0328", + "012F", "0069_0328", + "0130", "0049_0307", + "0134", "004A_0302", + "0135", "006A_0302", + "0136", "004B_0327", + "0137", "006B_0327", + "0139", "004C_0301", + "013A", "006C_0301", + "013B", "004C_0327", + "013C", "006C_0327", + "013D", "004C_030C", + "013E", "006C_030C", + "0143", "004E_0301", + "0144", "006E_0301", + "0145", "004E_0327", + "0146", "006E_0327", + "0147", "004E_030C", + "0148", "006E_030C", + "014C", "004F_0304", + "014D", "006F_0304", + "014E", "004F_0306", + "014F", "006F_0306", + "0150", "004F_030B", + "0151", "006F_030B", + "0154", "0052_0301", + "0155", "0072_0301", + "0156", "0052_0327", + "0157", "0072_0327", + "0158", "0052_030C", + "0159", "0072_030C", + "015A", "0053_0301", + "015B", "0073_0301", + "015C", "0053_0302", + "015D", "0073_0302", + "015E", "0053_0327", + "015F", "0073_0327", + "0160", "0053_030C", + "0161", "0073_030C", + "0162", "0054_0327", + "0163", "0074_0327", + "0164", "0054_030C", + "0165", "0074_030C", + "0168", "0055_0303", + "0169", "0075_0303", + "016A", "0055_0304", + "016B", "0075_0304", + "016C", "0055_0306", + "016D", "0075_0306", + "016E", "0055_030A", + "016F", "0075_030A", + "0170", "0055_030B", + "0171", "0075_030B", + "0172", "0055_0328", + "0173", "0075_0328", + "0174", "0057_0302", + "0175", "0077_0302", + "0176", "0059_0302", + "0177", "0079_0302", + "0178", "0059_0308", + "0179", "005A_0301", + "017A", "007A_0301", + "017B", "005A_0307", + "017C", "007A_0307", + "017D", "005A_030C", + "017E", "007A_030C", + "01A0", "004F_031B", + "01A1", "006F_031B", + "01AF", "0055_031B", + "01B0", "0075_031B", + "01CD", "0041_030C", + "01CE", "0061_030C", + "01CF", "0049_030C", + "01D0", "0069_030C", + "01D1", "004F_030C", + "01D2", "006F_030C", + "01D3", "0055_030C", + "01D4", "0075_030C", + "01D5", "0055_0308_0304", + "01D6", "0075_0308_0304", + "01D7", "0055_0308_0301", + "01D8", "0075_0308_0301", + "01D9", "0055_0308_030C", + "01DA", "0075_0308_030C", + "01DB", "0055_0308_0300", + "01DC", "0075_0308_0300", + "01DE", "0041_0308_0304", + "01DF", "0061_0308_0304", + "01E0", "0041_0307_0304", + "01E1", "0061_0307_0304", + "01E2", "00C6_0304", + "01E3", "00E6_0304", + "01E6", "0047_030C", + "01E7", "0067_030C", + "01E8", "004B_030C", + "01E9", "006B_030C", + "01EA", "004F_0328", + "01EB", "006F_0328", + "01EC", "004F_0328_0304", + "01ED", "006F_0328_0304", + "01EE", "01B7_030C", + "01EF", "0292_030C", + "01F0", "006A_030C", + "01F4", "0047_0301", + "01F5", "0067_0301", + "01F8", "004E_0300", + "01F9", "006E_0300", + "01FA", "0041_030A_0301", + "01FB", "0061_030A_0301", + "01FC", "00C6_0301", + "01FD", "00E6_0301", + "01FE", "00D8_0301", + "01FF", "00F8_0301", + "0200", "0041_030F", + "0201", "0061_030F", + "0202", "0041_0311", + "0203", "0061_0311", + "0204", "0045_030F", + "0205", "0065_030F", + "0206", "0045_0311", + "0207", "0065_0311", + "0208", "0049_030F", + "0209", "0069_030F", + "020A", "0049_0311", + "020B", "0069_0311", + "020C", "004F_030F", + "020D", "006F_030F", + "020E", "004F_0311", + "020F", "006F_0311", + "0210", "0052_030F", + "0211", "0072_030F", + "0212", "0052_0311", + "0213", "0072_0311", + "0214", "0055_030F", + "0215", "0075_030F", + "0216", "0055_0311", + "0217", "0075_0311", + "0218", "0053_0326", + "0219", "0073_0326", + "021A", "0054_0326", + "021B", "0074_0326", + "021E", "0048_030C", + "021F", "0068_030C", + "0226", "0041_0307", + "0227", "0061_0307", + "0228", "0045_0327", + "0229", "0065_0327", + "022A", "004F_0308_0304", + "022B", "006F_0308_0304", + "022C", "004F_0303_0304", + "022D", "006F_0303_0304", + "022E", "004F_0307", + "022F", "006F_0307", + "0230", "004F_0307_0304", + "0231", "006F_0307_0304", + "0232", "0059_0304", + "0233", "0079_0304", + "0340", "0300", + "0341", "0301", + "0343", "0313", + "0344", "0308_0301", + "0374", "02B9", + "037E", "003B", + "0385", "00A8_0301", + "0386", "0391_0301", + "0387", "00B7", + "0388", "0395_0301", + "0389", "0397_0301", + "038A", "0399_0301", + "038C", "039F_0301", + "038E", "03A5_0301", + "038F", "03A9_0301", + "0390", "03B9_0308_0301", + "03AA", "0399_0308", + "03AB", "03A5_0308", + "03AC", "03B1_0301", + "03AD", "03B5_0301", + "03AE", "03B7_0301", + "03AF", "03B9_0301", + "03B0", "03C5_0308_0301", + "03CA", "03B9_0308", + "03CB", "03C5_0308", + "03CC", "03BF_0301", + "03CD", "03C5_0301", + "03CE", "03C9_0301", + "03D3", "03D2_0301", + "03D4", "03D2_0308", + "0400", "0415_0300", + "0401", "0415_0308", + "0403", "0413_0301", + "0407", "0406_0308", + "040C", "041A_0301", + "040D", "0418_0300", + "040E", "0423_0306", + "0419", "0418_0306", + "0439", "0438_0306", + "0450", "0435_0300", + "0451", "0435_0308", + "0453", "0433_0301", + "0457", "0456_0308", + "045C", "043A_0301", + "045D", "0438_0300", + "045E", "0443_0306", + "0476", "0474_030F", + "0477", "0475_030F", + "04C1", "0416_0306", + "04C2", "0436_0306", + "04D0", "0410_0306", + "04D1", "0430_0306", + "04D2", "0410_0308", + "04D3", "0430_0308", + "04D6", "0415_0306", + "04D7", "0435_0306", + "04DA", "04D8_0308", + "04DB", "04D9_0308", + "04DC", "0416_0308", + "04DD", "0436_0308", + "04DE", "0417_0308", + "04DF", "0437_0308", + "04E2", "0418_0304", + "04E3", "0438_0304", + "04E4", "0418_0308", + "04E5", "0438_0308", + "04E6", "041E_0308", + "04E7", "043E_0308", + "04EA", "04E8_0308", + "04EB", "04E9_0308", + "04EC", "042D_0308", + "04ED", "044D_0308", + "04EE", "0423_0304", + "04EF", "0443_0304", + "04F0", "0423_0308", + "04F1", "0443_0308", + "04F2", "0423_030B", + "04F3", "0443_030B", + "04F4", "0427_0308", + "04F5", "0447_0308", + "04F8", "042B_0308", + "04F9", "044B_0308", + "0622", "0627_0653", + "0623", "0627_0654", + "0624", "0648_0654", + "0625", "0627_0655", + "0626", "064A_0654", + "06C0", "06D5_0654", + "06C2", "06C1_0654", + "06D3", "06D2_0654", + "0929", "0928_093C", + "0931", "0930_093C", + "0934", "0933_093C", + "0958", "0915_093C", + "0959", "0916_093C", + "095A", "0917_093C", + "095B", "091C_093C", + "095C", "0921_093C", + "095D", "0922_093C", + "095E", "092B_093C", + "095F", "092F_093C", + "09CB", "09C7_09BE", + "09CC", "09C7_09D7", + "09DC", "09A1_09BC", + "09DD", "09A2_09BC", + "09DF", "09AF_09BC", + "0A33", "0A32_0A3C", + "0A36", "0A38_0A3C", + "0A59", "0A16_0A3C", + "0A5A", "0A17_0A3C", + "0A5B", "0A1C_0A3C", + "0A5E", "0A2B_0A3C", + "0B48", "0B47_0B56", + "0B4B", "0B47_0B3E", + "0B4C", "0B47_0B57", + "0B5C", "0B21_0B3C", + "0B5D", "0B22_0B3C", + "0B94", "0B92_0BD7", + "0BCA", "0BC6_0BBE", + "0BCB", "0BC7_0BBE", + "0BCC", "0BC6_0BD7", + "0C48", "0C46_0C56", + "0CC0", "0CBF_0CD5", + "0CC7", "0CC6_0CD5", + "0CC8", "0CC6_0CD6", + "0CCA", "0CC6_0CC2", + "0CCB", "0CC6_0CC2_0CD5", + "0D4A", "0D46_0D3E", + "0D4B", "0D47_0D3E", + "0D4C", "0D46_0D57", + "0DDA", "0DD9_0DCA", + "0DDC", "0DD9_0DCF", + "0DDD", "0DD9_0DCF_0DCA", + "0DDE", "0DD9_0DDF", + "0F43", "0F42_0FB7", + "0F4D", "0F4C_0FB7", + "0F52", "0F51_0FB7", + "0F57", "0F56_0FB7", + "0F5C", "0F5B_0FB7", + "0F69", "0F40_0FB5", + "0F73", "0F71_0F72", + "0F75", "0F71_0F74", + "0F76", "0FB2_0F80", + "0F78", "0FB3_0F80", + "0F81", "0F71_0F80", + "0F93", "0F92_0FB7", + "0F9D", "0F9C_0FB7", + "0FA2", "0FA1_0FB7", + "0FA7", "0FA6_0FB7", + "0FAC", "0FAB_0FB7", + "0FB9", "0F90_0FB5", + "1026", "1025_102E", + "1E00", "0041_0325", + "1E01", "0061_0325", + "1E02", "0042_0307", + "1E03", "0062_0307", + "1E04", "0042_0323", + "1E05", "0062_0323", + "1E06", "0042_0331", + "1E07", "0062_0331", + "1E08", "0043_0327_0301", + "1E09", "0063_0327_0301", + "1E0A", "0044_0307", + "1E0B", "0064_0307", + "1E0C", "0044_0323", + "1E0D", "0064_0323", + "1E0E", "0044_0331", + "1E0F", "0064_0331", + "1E10", "0044_0327", + "1E11", "0064_0327", + "1E12", "0044_032D", + "1E13", "0064_032D", + "1E14", "0045_0304_0300", + "1E15", "0065_0304_0300", + "1E16", "0045_0304_0301", + "1E17", "0065_0304_0301", + "1E18", "0045_032D", + "1E19", "0065_032D", + "1E1A", "0045_0330", + "1E1B", "0065_0330", + "1E1C", "0045_0327_0306", + "1E1D", "0065_0327_0306", + "1E1E", "0046_0307", + "1E1F", "0066_0307", + "1E20", "0047_0304", + "1E21", "0067_0304", + "1E22", "0048_0307", + "1E23", "0068_0307", + "1E24", "0048_0323", + "1E25", "0068_0323", + "1E26", "0048_0308", + "1E27", "0068_0308", + "1E28", "0048_0327", + "1E29", "0068_0327", + "1E2A", "0048_032E", + "1E2B", "0068_032E", + "1E2C", "0049_0330", + "1E2D", "0069_0330", + "1E2E", "0049_0308_0301", + "1E2F", "0069_0308_0301", + "1E30", "004B_0301", + "1E31", "006B_0301", + "1E32", "004B_0323", + "1E33", "006B_0323", + "1E34", "004B_0331", + "1E35", "006B_0331", + "1E36", "004C_0323", + "1E37", "006C_0323", + "1E38", "004C_0323_0304", + "1E39", "006C_0323_0304", + "1E3A", "004C_0331", + "1E3B", "006C_0331", + "1E3C", "004C_032D", + "1E3D", "006C_032D", + "1E3E", "004D_0301", + "1E3F", "006D_0301", + "1E40", "004D_0307", + "1E41", "006D_0307", + "1E42", "004D_0323", + "1E43", "006D_0323", + "1E44", "004E_0307", + "1E45", "006E_0307", + "1E46", "004E_0323", + "1E47", "006E_0323", + "1E48", "004E_0331", + "1E49", "006E_0331", + "1E4A", "004E_032D", + "1E4B", "006E_032D", + "1E4C", "004F_0303_0301", + "1E4D", "006F_0303_0301", + "1E4E", "004F_0303_0308", + "1E4F", "006F_0303_0308", + "1E50", "004F_0304_0300", + "1E51", "006F_0304_0300", + "1E52", "004F_0304_0301", + "1E53", "006F_0304_0301", + "1E54", "0050_0301", + "1E55", "0070_0301", + "1E56", "0050_0307", + "1E57", "0070_0307", + "1E58", "0052_0307", + "1E59", "0072_0307", + "1E5A", "0052_0323", + "1E5B", "0072_0323", + "1E5C", "0052_0323_0304", + "1E5D", "0072_0323_0304", + "1E5E", "0052_0331", + "1E5F", "0072_0331", + "1E60", "0053_0307", + "1E61", "0073_0307", + "1E62", "0053_0323", + "1E63", "0073_0323", + "1E64", "0053_0301_0307", + "1E65", "0073_0301_0307", + "1E66", "0053_030C_0307", + "1E67", "0073_030C_0307", + "1E68", "0053_0323_0307", + "1E69", "0073_0323_0307", + "1E6A", "0054_0307", + "1E6B", "0074_0307", + "1E6C", "0054_0323", + "1E6D", "0074_0323", + "1E6E", "0054_0331", + "1E6F", "0074_0331", + "1E70", "0054_032D", + "1E71", "0074_032D", + "1E72", "0055_0324", + "1E73", "0075_0324", + "1E74", "0055_0330", + "1E75", "0075_0330", + "1E76", "0055_032D", + "1E77", "0075_032D", + "1E78", "0055_0303_0301", + "1E79", "0075_0303_0301", + "1E7A", "0055_0304_0308", + "1E7B", "0075_0304_0308", + "1E7C", "0056_0303", + "1E7D", "0076_0303", + "1E7E", "0056_0323", + "1E7F", "0076_0323", + "1E80", "0057_0300", + "1E81", "0077_0300", + "1E82", "0057_0301", + "1E83", "0077_0301", + "1E84", "0057_0308", + "1E85", "0077_0308", + "1E86", "0057_0307", + "1E87", "0077_0307", + "1E88", "0057_0323", + "1E89", "0077_0323", + "1E8A", "0058_0307", + "1E8B", "0078_0307", + "1E8C", "0058_0308", + "1E8D", "0078_0308", + "1E8E", "0059_0307", + "1E8F", "0079_0307", + "1E90", "005A_0302", + "1E91", "007A_0302", + "1E92", "005A_0323", + "1E93", "007A_0323", + "1E94", "005A_0331", + "1E95", "007A_0331", + "1E96", "0068_0331", + "1E97", "0074_0308", + "1E98", "0077_030A", + "1E99", "0079_030A", + "1E9B", "017F_0307", + "1EA0", "0041_0323", + "1EA1", "0061_0323", + "1EA2", "0041_0309", + "1EA3", "0061_0309", + "1EA4", "0041_0302_0301", + "1EA5", "0061_0302_0301", + "1EA6", "0041_0302_0300", + "1EA7", "0061_0302_0300", + "1EA8", "0041_0302_0309", + "1EA9", "0061_0302_0309", + "1EAA", "0041_0302_0303", + "1EAB", "0061_0302_0303", + "1EAC", "0041_0323_0302", + "1EAD", "0061_0323_0302", + "1EAE", "0041_0306_0301", + "1EAF", "0061_0306_0301", + "1EB0", "0041_0306_0300", + "1EB1", "0061_0306_0300", + "1EB2", "0041_0306_0309", + "1EB3", "0061_0306_0309", + "1EB4", "0041_0306_0303", + "1EB5", "0061_0306_0303", + "1EB6", "0041_0323_0306", + "1EB7", "0061_0323_0306", + "1EB8", "0045_0323", + "1EB9", "0065_0323", + "1EBA", "0045_0309", + "1EBB", "0065_0309", + "1EBC", "0045_0303", + "1EBD", "0065_0303", + "1EBE", "0045_0302_0301", + "1EBF", "0065_0302_0301", + "1EC0", "0045_0302_0300", + "1EC1", "0065_0302_0300", + "1EC2", "0045_0302_0309", + "1EC3", "0065_0302_0309", + "1EC4", "0045_0302_0303", + "1EC5", "0065_0302_0303", + "1EC6", "0045_0323_0302", + "1EC7", "0065_0323_0302", + "1EC8", "0049_0309", + "1EC9", "0069_0309", + "1ECA", "0049_0323", + "1ECB", "0069_0323", + "1ECC", "004F_0323", + "1ECD", "006F_0323", + "1ECE", "004F_0309", + "1ECF", "006F_0309", + "1ED0", "004F_0302_0301", + "1ED1", "006F_0302_0301", + "1ED2", "004F_0302_0300", + "1ED3", "006F_0302_0300", + "1ED4", "004F_0302_0309", + "1ED5", "006F_0302_0309", + "1ED6", "004F_0302_0303", + "1ED7", "006F_0302_0303", + "1ED8", "004F_0323_0302", + "1ED9", "006F_0323_0302", + "1EDA", "004F_031B_0301", + "1EDB", "006F_031B_0301", + "1EDC", "004F_031B_0300", + "1EDD", "006F_031B_0300", + "1EDE", "004F_031B_0309", + "1EDF", "006F_031B_0309", + "1EE0", "004F_031B_0303", + "1EE1", "006F_031B_0303", + "1EE2", "004F_031B_0323", + "1EE3", "006F_031B_0323", + "1EE4", "0055_0323", + "1EE5", "0075_0323", + "1EE6", "0055_0309", + "1EE7", "0075_0309", + "1EE8", "0055_031B_0301", + "1EE9", "0075_031B_0301", + "1EEA", "0055_031B_0300", + "1EEB", "0075_031B_0300", + "1EEC", "0055_031B_0309", + "1EED", "0075_031B_0309", + "1EEE", "0055_031B_0303", + "1EEF", "0075_031B_0303", + "1EF0", "0055_031B_0323", + "1EF1", "0075_031B_0323", + "1EF2", "0059_0300", + "1EF3", "0079_0300", + "1EF4", "0059_0323", + "1EF5", "0079_0323", + "1EF6", "0059_0309", + "1EF7", "0079_0309", + "1EF8", "0059_0303", + "1EF9", "0079_0303", + "1F00", "03B1_0313", + "1F01", "03B1_0314", + "1F02", "03B1_0313_0300", + "1F03", "03B1_0314_0300", + "1F04", "03B1_0313_0301", + "1F05", "03B1_0314_0301", + "1F06", "03B1_0313_0342", + "1F07", "03B1_0314_0342", + "1F08", "0391_0313", + "1F09", "0391_0314", + "1F0A", "0391_0313_0300", + "1F0B", "0391_0314_0300", + "1F0C", "0391_0313_0301", + "1F0D", "0391_0314_0301", + "1F0E", "0391_0313_0342", + "1F0F", "0391_0314_0342", + "1F10", "03B5_0313", + "1F11", "03B5_0314", + "1F12", "03B5_0313_0300", + "1F13", "03B5_0314_0300", + "1F14", "03B5_0313_0301", + "1F15", "03B5_0314_0301", + "1F18", "0395_0313", + "1F19", "0395_0314", + "1F1A", "0395_0313_0300", + "1F1B", "0395_0314_0300", + "1F1C", "0395_0313_0301", + "1F1D", "0395_0314_0301", + "1F20", "03B7_0313", + "1F21", "03B7_0314", + "1F22", "03B7_0313_0300", + "1F23", "03B7_0314_0300", + "1F24", "03B7_0313_0301", + "1F25", "03B7_0314_0301", + "1F26", "03B7_0313_0342", + "1F27", "03B7_0314_0342", + "1F28", "0397_0313", + "1F29", "0397_0314", + "1F2A", "0397_0313_0300", + "1F2B", "0397_0314_0300", + "1F2C", "0397_0313_0301", + "1F2D", "0397_0314_0301", + "1F2E", "0397_0313_0342", + "1F2F", "0397_0314_0342", + "1F30", "03B9_0313", + "1F31", "03B9_0314", + "1F32", "03B9_0313_0300", + "1F33", "03B9_0314_0300", + "1F34", "03B9_0313_0301", + "1F35", "03B9_0314_0301", + "1F36", "03B9_0313_0342", + "1F37", "03B9_0314_0342", + "1F38", "0399_0313", + "1F39", "0399_0314", + "1F3A", "0399_0313_0300", + "1F3B", "0399_0314_0300", + "1F3C", "0399_0313_0301", + "1F3D", "0399_0314_0301", + "1F3E", "0399_0313_0342", + "1F3F", "0399_0314_0342", + "1F40", "03BF_0313", + "1F41", "03BF_0314", + "1F42", "03BF_0313_0300", + "1F43", "03BF_0314_0300", + "1F44", "03BF_0313_0301", + "1F45", "03BF_0314_0301", + "1F48", "039F_0313", + "1F49", "039F_0314", + "1F4A", "039F_0313_0300", + "1F4B", "039F_0314_0300", + "1F4C", "039F_0313_0301", + "1F4D", "039F_0314_0301", + "1F50", "03C5_0313", + "1F51", "03C5_0314", + "1F52", "03C5_0313_0300", + "1F53", "03C5_0314_0300", + "1F54", "03C5_0313_0301", + "1F55", "03C5_0314_0301", + "1F56", "03C5_0313_0342", + "1F57", "03C5_0314_0342", + "1F59", "03A5_0314", + "1F5B", "03A5_0314_0300", + "1F5D", "03A5_0314_0301", + "1F5F", "03A5_0314_0342", + "1F60", "03C9_0313", + "1F61", "03C9_0314", + "1F62", "03C9_0313_0300", + "1F63", "03C9_0314_0300", + "1F64", "03C9_0313_0301", + "1F65", "03C9_0314_0301", + "1F66", "03C9_0313_0342", + "1F67", "03C9_0314_0342", + "1F68", "03A9_0313", + "1F69", "03A9_0314", + "1F6A", "03A9_0313_0300", + "1F6B", "03A9_0314_0300", + "1F6C", "03A9_0313_0301", + "1F6D", "03A9_0314_0301", + "1F6E", "03A9_0313_0342", + "1F6F", "03A9_0314_0342", + "1F70", "03B1_0300", + "1F71", "03B1_0301", + "1F72", "03B5_0300", + "1F73", "03B5_0301", + "1F74", "03B7_0300", + "1F75", "03B7_0301", + "1F76", "03B9_0300", + "1F77", "03B9_0301", + "1F78", "03BF_0300", + "1F79", "03BF_0301", + "1F7A", "03C5_0300", + "1F7B", "03C5_0301", + "1F7C", "03C9_0300", + "1F7D", "03C9_0301", + "1F80", "03B1_0313_0345", + "1F81", "03B1_0314_0345", + "1F82", "03B1_0313_0300_0345", + "1F83", "03B1_0314_0300_0345", + "1F84", "03B1_0313_0301_0345", + "1F85", "03B1_0314_0301_0345", + "1F86", "03B1_0313_0342_0345", + "1F87", "03B1_0314_0342_0345", + "1F88", "0391_0313_0345", + "1F89", "0391_0314_0345", + "1F8A", "0391_0313_0300_0345", + "1F8B", "0391_0314_0300_0345", + "1F8C", "0391_0313_0301_0345", + "1F8D", "0391_0314_0301_0345", + "1F8E", "0391_0313_0342_0345", + "1F8F", "0391_0314_0342_0345", + "1F90", "03B7_0313_0345", + "1F91", "03B7_0314_0345", + "1F92", "03B7_0313_0300_0345", + "1F93", "03B7_0314_0300_0345", + "1F94", "03B7_0313_0301_0345", + "1F95", "03B7_0314_0301_0345", + "1F96", "03B7_0313_0342_0345", + "1F97", "03B7_0314_0342_0345", + "1F98", "0397_0313_0345", + "1F99", "0397_0314_0345", + "1F9A", "0397_0313_0300_0345", + "1F9B", "0397_0314_0300_0345", + "1F9C", "0397_0313_0301_0345", + "1F9D", "0397_0314_0301_0345", + "1F9E", "0397_0313_0342_0345", + "1F9F", "0397_0314_0342_0345", + "1FA0", "03C9_0313_0345", + "1FA1", "03C9_0314_0345", + "1FA2", "03C9_0313_0300_0345", + "1FA3", "03C9_0314_0300_0345", + "1FA4", "03C9_0313_0301_0345", + "1FA5", "03C9_0314_0301_0345", + "1FA6", "03C9_0313_0342_0345", + "1FA7", "03C9_0314_0342_0345", + "1FA8", "03A9_0313_0345", + "1FA9", "03A9_0314_0345", + "1FAA", "03A9_0313_0300_0345", + "1FAB", "03A9_0314_0300_0345", + "1FAC", "03A9_0313_0301_0345", + "1FAD", "03A9_0314_0301_0345", + "1FAE", "03A9_0313_0342_0345", + "1FAF", "03A9_0314_0342_0345", + "1FB0", "03B1_0306", + "1FB1", "03B1_0304", + "1FB2", "03B1_0300_0345", + "1FB3", "03B1_0345", + "1FB4", "03B1_0301_0345", + "1FB6", "03B1_0342", + "1FB7", "03B1_0342_0345", + "1FB8", "0391_0306", + "1FB9", "0391_0304", + "1FBA", "0391_0300", + "1FBB", "0391_0301", + "1FBC", "0391_0345", + "1FBE", "03B9", + "1FC1", "00A8_0342", + "1FC2", "03B7_0300_0345", + "1FC3", "03B7_0345", + "1FC4", "03B7_0301_0345", + "1FC6", "03B7_0342", + "1FC7", "03B7_0342_0345", + "1FC8", "0395_0300", + "1FC9", "0395_0301", + "1FCA", "0397_0300", + "1FCB", "0397_0301", + "1FCC", "0397_0345", + "1FCD", "1FBF_0300", + "1FCE", "1FBF_0301", + "1FCF", "1FBF_0342", + "1FD0", "03B9_0306", + "1FD1", "03B9_0304", + "1FD2", "03B9_0308_0300", + "1FD3", "03B9_0308_0301", + "1FD6", "03B9_0342", + "1FD7", "03B9_0308_0342", + "1FD8", "0399_0306", + "1FD9", "0399_0304", + "1FDA", "0399_0300", + "1FDB", "0399_0301", + "1FDD", "1FFE_0300", + "1FDE", "1FFE_0301", + "1FDF", "1FFE_0342", + "1FE0", "03C5_0306", + "1FE1", "03C5_0304", + "1FE2", "03C5_0308_0300", + "1FE3", "03C5_0308_0301", + "1FE4", "03C1_0313", + "1FE5", "03C1_0314", + "1FE6", "03C5_0342", + "1FE7", "03C5_0308_0342", + "1FE8", "03A5_0306", + "1FE9", "03A5_0304", + "1FEA", "03A5_0300", + "1FEB", "03A5_0301", + "1FEC", "03A1_0314", + "1FED", "00A8_0300", + "1FEE", "00A8_0301", + "1FEF", "0060", + "1FF2", "03C9_0300_0345", + "1FF3", "03C9_0345", + "1FF4", "03C9_0301_0345", + "1FF6", "03C9_0342", + "1FF7", "03C9_0342_0345", + "1FF8", "039F_0300", + "1FF9", "039F_0301", + "1FFA", "03A9_0300", + "1FFB", "03A9_0301", + "1FFC", "03A9_0345", + "1FFD", "00B4", + "2000", "2002", + "2001", "2003", + "2126", "03A9", + "212A", "004B", + "212B", "0041_030A", + "219A", "2190_0338", + "219B", "2192_0338", + "21AE", "2194_0338", + "21CD", "21D0_0338", + "21CE", "21D4_0338", + "21CF", "21D2_0338", + "2204", "2203_0338", + "2209", "2208_0338", + "220C", "220B_0338", + "2224", "2223_0338", + "2226", "2225_0338", + "2241", "223C_0338", + "2244", "2243_0338", + "2247", "2245_0338", + "2249", "2248_0338", + "2260", "003D_0338", + "2262", "2261_0338", + "226D", "224D_0338", + "226E", "003C_0338", + "226F", "003E_0338", + "2270", "2264_0338", + "2271", "2265_0338", + "2274", "2272_0338", + "2275", "2273_0338", + "2278", "2276_0338", + "2279", "2277_0338", + "2280", "227A_0338", + "2281", "227B_0338", + "2284", "2282_0338", + "2285", "2283_0338", + "2288", "2286_0338", + "2289", "2287_0338", + "22AC", "22A2_0338", + "22AD", "22A8_0338", + "22AE", "22A9_0338", + "22AF", "22AB_0338", + "22E0", "227C_0338", + "22E1", "227D_0338", + "22E2", "2291_0338", + "22E3", "2292_0338", + "22EA", "22B2_0338", + "22EB", "22B3_0338", + "22EC", "22B4_0338", + "22ED", "22B5_0338", + "2329", "3008", + "232A", "3009", + "2ADC", "2ADD_0338", + "304C", "304B_3099", + "304E", "304D_3099", + "3050", "304F_3099", + "3052", "3051_3099", + "3054", "3053_3099", + "3056", "3055_3099", + "3058", "3057_3099", + "305A", "3059_3099", + "305C", "305B_3099", + "305E", "305D_3099", + "3060", "305F_3099", + "3062", "3061_3099", + "3065", "3064_3099", + "3067", "3066_3099", + "3069", "3068_3099", + "3070", "306F_3099", + "3071", "306F_309A", + "3073", "3072_3099", + "3074", "3072_309A", + "3076", "3075_3099", + "3077", "3075_309A", + "3079", "3078_3099", + "307A", "3078_309A", + "307C", "307B_3099", + "307D", "307B_309A", + "3094", "3046_3099", + "309E", "309D_3099", + "30AC", "30AB_3099", + "30AE", "30AD_3099", + "30B0", "30AF_3099", + "30B2", "30B1_3099", + "30B4", "30B3_3099", + "30B6", "30B5_3099", + "30B8", "30B7_3099", + "30BA", "30B9_3099", + "30BC", "30BB_3099", + "30BE", "30BD_3099", + "30C0", "30BF_3099", + "30C2", "30C1_3099", + "30C5", "30C4_3099", + "30C7", "30C6_3099", + "30C9", "30C8_3099", + "30D0", "30CF_3099", + "30D1", "30CF_309A", + "30D3", "30D2_3099", + "30D4", "30D2_309A", + "30D6", "30D5_3099", + "30D7", "30D5_309A", + "30D9", "30D8_3099", + "30DA", "30D8_309A", + "30DC", "30DB_3099", + "30DD", "30DB_309A", + "30F4", "30A6_3099", + "30F7", "30EF_3099", + "30F8", "30F0_3099", + "30F9", "30F1_3099", + "30FA", "30F2_3099", + "30FE", "30FD_3099", + "F900", "8C48", + "F901", "66F4", + "F902", "8ECA", + "F903", "8CC8", + "F904", "6ED1", + "F905", "4E32", + "F906", "53E5", + "F907", "9F9C", + "F908", "9F9C", + "F909", "5951", + "F90A", "91D1", + "F90B", "5587", + "F90C", "5948", + "F90D", "61F6", + "F90E", "7669", + "F90F", "7F85", + "F910", "863F", + "F911", "87BA", + "F912", "88F8", + "F913", "908F", + "F914", "6A02", + "F915", "6D1B", + "F916", "70D9", + "F917", "73DE", + "F918", "843D", + "F919", "916A", + "F91A", "99F1", + "F91B", "4E82", + "F91C", "5375", + "F91D", "6B04", + "F91E", "721B", + "F91F", "862D", + "F920", "9E1E", + "F921", "5D50", + "F922", "6FEB", + "F923", "85CD", + "F924", "8964", + "F925", "62C9", + "F926", "81D8", + "F927", "881F", + "F928", "5ECA", + "F929", "6717", + "F92A", "6D6A", + "F92B", "72FC", + "F92C", "90CE", + "F92D", "4F86", + "F92E", "51B7", + "F92F", "52DE", + "F930", "64C4", + "F931", "6AD3", + "F932", "7210", + "F933", "76E7", + "F934", "8001", + "F935", "8606", + "F936", "865C", + "F937", "8DEF", + "F938", "9732", + "F939", "9B6F", + "F93A", "9DFA", + "F93B", "788C", + "F93C", "797F", + "F93D", "7DA0", + "F93E", "83C9", + "F93F", "9304", + "F940", "9E7F", + "F941", "8AD6", + "F942", "58DF", + "F943", "5F04", + "F944", "7C60", + "F945", "807E", + "F946", "7262", + "F947", "78CA", + "F948", "8CC2", + "F949", "96F7", + "F94A", "58D8", + "F94B", "5C62", + "F94C", "6A13", + "F94D", "6DDA", + "F94E", "6F0F", + "F94F", "7D2F", + "F950", "7E37", + "F951", "964B", + "F952", "52D2", + "F953", "808B", + "F954", "51DC", + "F955", "51CC", + "F956", "7A1C", + "F957", "7DBE", + "F958", "83F1", + "F959", "9675", + "F95A", "8B80", + "F95B", "62CF", + "F95C", "6A02", + "F95D", "8AFE", + "F95E", "4E39", + "F95F", "5BE7", + "F960", "6012", + "F961", "7387", + "F962", "7570", + "F963", "5317", + "F964", "78FB", + "F965", "4FBF", + "F966", "5FA9", + "F967", "4E0D", + "F968", "6CCC", + "F969", "6578", + "F96A", "7D22", + "F96B", "53C3", + "F96C", "585E", + "F96D", "7701", + "F96E", "8449", + "F96F", "8AAA", + "F970", "6BBA", + "F971", "8FB0", + "F972", "6C88", + "F973", "62FE", + "F974", "82E5", + "F975", "63A0", + "F976", "7565", + "F977", "4EAE", + "F978", "5169", + "F979", "51C9", + "F97A", "6881", + "F97B", "7CE7", + "F97C", "826F", + "F97D", "8AD2", + "F97E", "91CF", + "F97F", "52F5", + "F980", "5442", + "F981", "5973", + "F982", "5EEC", + "F983", "65C5", + "F984", "6FFE", + "F985", "792A", + "F986", "95AD", + "F987", "9A6A", + "F988", "9E97", + "F989", "9ECE", + "F98A", "529B", + "F98B", "66C6", + "F98C", "6B77", + "F98D", "8F62", + "F98E", "5E74", + "F98F", "6190", + "F990", "6200", + "F991", "649A", + "F992", "6F23", + "F993", "7149", + "F994", "7489", + "F995", "79CA", + "F996", "7DF4", + "F997", "806F", + "F998", "8F26", + "F999", "84EE", + "F99A", "9023", + "F99B", "934A", + "F99C", "5217", + "F99D", "52A3", + "F99E", "54BD", + "F99F", "70C8", + "F9A0", "88C2", + "F9A1", "8AAA", + "F9A2", "5EC9", + "F9A3", "5FF5", + "F9A4", "637B", + "F9A5", "6BAE", + "F9A6", "7C3E", + "F9A7", "7375", + "F9A8", "4EE4", + "F9A9", "56F9", + "F9AA", "5BE7", + "F9AB", "5DBA", + "F9AC", "601C", + "F9AD", "73B2", + "F9AE", "7469", + "F9AF", "7F9A", + "F9B0", "8046", + "F9B1", "9234", + "F9B2", "96F6", + "F9B3", "9748", + "F9B4", "9818", + "F9B5", "4F8B", + "F9B6", "79AE", + "F9B7", "91B4", + "F9B8", "96B8", + "F9B9", "60E1", + "F9BA", "4E86", + "F9BB", "50DA", + "F9BC", "5BEE", + "F9BD", "5C3F", + "F9BE", "6599", + "F9BF", "6A02", + "F9C0", "71CE", + "F9C1", "7642", + "F9C2", "84FC", + "F9C3", "907C", + "F9C4", "9F8D", + "F9C5", "6688", + "F9C6", "962E", + "F9C7", "5289", + "F9C8", "677B", + "F9C9", "67F3", + "F9CA", "6D41", + "F9CB", "6E9C", + "F9CC", "7409", + "F9CD", "7559", + "F9CE", "786B", + "F9CF", "7D10", + "F9D0", "985E", + "F9D1", "516D", + "F9D2", "622E", + "F9D3", "9678", + "F9D4", "502B", + "F9D5", "5D19", + "F9D6", "6DEA", + "F9D7", "8F2A", + "F9D8", "5F8B", + "F9D9", "6144", + "F9DA", "6817", + "F9DB", "7387", + "F9DC", "9686", + "F9DD", "5229", + "F9DE", "540F", + "F9DF", "5C65", + "F9E0", "6613", + "F9E1", "674E", + "F9E2", "68A8", + "F9E3", "6CE5", + "F9E4", "7406", + "F9E5", "75E2", + "F9E6", "7F79", + "F9E7", "88CF", + "F9E8", "88E1", + "F9E9", "91CC", + "F9EA", "96E2", + "F9EB", "533F", + "F9EC", "6EBA", + "F9ED", "541D", + "F9EE", "71D0", + "F9EF", "7498", + "F9F0", "85FA", + "F9F1", "96A3", + "F9F2", "9C57", + "F9F3", "9E9F", + "F9F4", "6797", + "F9F5", "6DCB", + "F9F6", "81E8", + "F9F7", "7ACB", + "F9F8", "7B20", + "F9F9", "7C92", + "F9FA", "72C0", + "F9FB", "7099", + "F9FC", "8B58", + "F9FD", "4EC0", + "F9FE", "8336", + "F9FF", "523A", + "FA00", "5207", + "FA01", "5EA6", + "FA02", "62D3", + "FA03", "7CD6", + "FA04", "5B85", + "FA05", "6D1E", + "FA06", "66B4", + "FA07", "8F3B", + "FA08", "884C", + "FA09", "964D", + "FA0A", "898B", + "FA0B", "5ED3", + "FA0C", "5140", + "FA0D", "55C0", + "FA10", "585A", + "FA12", "6674", + "FA15", "51DE", + "FA16", "732A", + "FA17", "76CA", + "FA18", "793C", + "FA19", "795E", + "FA1A", "7965", + "FA1B", "798F", + "FA1C", "9756", + "FA1D", "7CBE", + "FA1E", "7FBD", + "FA20", "8612", + "FA22", "8AF8", + "FA25", "9038", + "FA26", "90FD", + "FA2A", "98EF", + "FA2B", "98FC", + "FA2C", "9928", + "FA2D", "9DB4", + "FA30", "4FAE", + "FA31", "50E7", + "FA32", "514D", + "FA33", "52C9", + "FA34", "52E4", + "FA35", "5351", + "FA36", "559D", + "FA37", "5606", + "FA38", "5668", + "FA39", "5840", + "FA3A", "58A8", + "FA3B", "5C64", + "FA3C", "5C6E", + "FA3D", "6094", + "FA3E", "6168", + "FA3F", "618E", + "FA40", "61F2", + "FA41", "654F", + "FA42", "65E2", + "FA43", "6691", + "FA44", "6885", + "FA45", "6D77", + "FA46", "6E1A", + "FA47", "6F22", + "FA48", "716E", + "FA49", "722B", + "FA4A", "7422", + "FA4B", "7891", + "FA4C", "793E", + "FA4D", "7949", + "FA4E", "7948", + "FA4F", "7950", + "FA50", "7956", + "FA51", "795D", + "FA52", "798D", + "FA53", "798E", + "FA54", "7A40", + "FA55", "7A81", + "FA56", "7BC0", + "FA57", "7DF4", + "FA58", "7E09", + "FA59", "7E41", + "FA5A", "7F72", + "FA5B", "8005", + "FA5C", "81ED", + "FA5D", "8279", + "FA5E", "8279", + "FA5F", "8457", + "FA60", "8910", + "FA61", "8996", + "FA62", "8B01", + "FA63", "8B39", + "FA64", "8CD3", + "FA65", "8D08", + "FA66", "8FB6", + "FA67", "9038", + "FA68", "96E3", + "FA69", "97FF", + "FA6A", "983B", + "FB1D", "05D9_05B4", + "FB1F", "05F2_05B7", + "FB2A", "05E9_05C1", + "FB2B", "05E9_05C2", + "FB2C", "05E9_05BC_05C1", + "FB2D", "05E9_05BC_05C2", + "FB2E", "05D0_05B7", + "FB2F", "05D0_05B8", + "FB30", "05D0_05BC", + "FB31", "05D1_05BC", + "FB32", "05D2_05BC", + "FB33", "05D3_05BC", + "FB34", "05D4_05BC", + "FB35", "05D5_05BC", + "FB36", "05D6_05BC", + "FB38", "05D8_05BC", + "FB39", "05D9_05BC", + "FB3A", "05DA_05BC", + "FB3B", "05DB_05BC", + "FB3C", "05DC_05BC", + "FB3E", "05DE_05BC", + "FB40", "05E0_05BC", + "FB41", "05E1_05BC", + "FB43", "05E3_05BC", + "FB44", "05E4_05BC", + "FB46", "05E6_05BC", + "FB47", "05E7_05BC", + "FB48", "05E8_05BC", + "FB49", "05E9_05BC", + "FB4A", "05EA_05BC", + "FB4B", "05D5_05B9", + "FB4C", "05D1_05BF", + "FB4D", "05DB_05BF", + "FB4E", "05E4_05BF", + "1D15E", "1D157_1D165", + "1D15F", "1D158_1D165", + "1D160", "1D158_1D165_1D16E", + "1D161", "1D158_1D165_1D16F", + "1D162", "1D158_1D165_1D170", + "1D163", "1D158_1D165_1D171", + "1D164", "1D158_1D165_1D172", + "1D1BB", "1D1B9_1D165", + "1D1BC", "1D1BA_1D165", + "1D1BD", "1D1B9_1D165_1D16E", + "1D1BE", "1D1BA_1D165_1D16E", + "1D1BF", "1D1B9_1D165_1D16F", + "1D1C0", "1D1BA_1D165_1D16F", + "2F800", "4E3D", + "2F801", "4E38", + "2F802", "4E41", + "2F803", "20122", + "2F804", "4F60", + "2F805", "4FAE", + "2F806", "4FBB", + "2F807", "5002", + "2F808", "507A", + "2F809", "5099", + "2F80A", "50E7", + "2F80B", "50CF", + "2F80C", "349E", + "2F80D", "2063A", + "2F80E", "514D", + "2F80F", "5154", + "2F810", "5164", + "2F811", "5177", + "2F812", "2051C", + "2F813", "34B9", + "2F814", "5167", + "2F815", "518D", + "2F816", "2054B", + "2F817", "5197", + "2F818", "51A4", + "2F819", "4ECC", + "2F81A", "51AC", + "2F81B", "51B5", + "2F81C", "291DF", + "2F81D", "51F5", + "2F81E", "5203", + "2F81F", "34DF", + "2F820", "523B", + "2F821", "5246", + "2F822", "5272", + "2F823", "5277", + "2F824", "3515", + "2F825", "52C7", + "2F826", "52C9", + "2F827", "52E4", + "2F828", "52FA", + "2F829", "5305", + "2F82A", "5306", + "2F82B", "5317", + "2F82C", "5349", + "2F82D", "5351", + "2F82E", "535A", + "2F82F", "5373", + "2F830", "537D", + "2F831", "537F", + "2F832", "537F", + "2F833", "537F", + "2F834", "20A2C", + "2F835", "7070", + "2F836", "53CA", + "2F837", "53DF", + "2F838", "20B63", + "2F839", "53EB", + "2F83A", "53F1", + "2F83B", "5406", + "2F83C", "549E", + "2F83D", "5438", + "2F83E", "5448", + "2F83F", "5468", + "2F840", "54A2", + "2F841", "54F6", + "2F842", "5510", + "2F843", "5553", + "2F844", "5563", + "2F845", "5584", + "2F846", "5584", + "2F847", "5599", + "2F848", "55AB", + "2F849", "55B3", + "2F84A", "55C2", + "2F84B", "5716", + "2F84C", "5606", + "2F84D", "5717", + "2F84E", "5651", + "2F84F", "5674", + "2F850", "5207", + "2F851", "58EE", + "2F852", "57CE", + "2F853", "57F4", + "2F854", "580D", + "2F855", "578B", + "2F856", "5832", + "2F857", "5831", + "2F858", "58AC", + "2F859", "214E4", + "2F85A", "58F2", + "2F85B", "58F7", + "2F85C", "5906", + "2F85D", "591A", + "2F85E", "5922", + "2F85F", "5962", + "2F860", "216A8", + "2F861", "216EA", + "2F862", "59EC", + "2F863", "5A1B", + "2F864", "5A27", + "2F865", "59D8", + "2F866", "5A66", + "2F867", "36EE", + "2F868", "2136A", + "2F869", "5B08", + "2F86A", "5B3E", + "2F86B", "5B3E", + "2F86C", "219C8", + "2F86D", "5BC3", + "2F86E", "5BD8", + "2F86F", "5BE7", + "2F870", "5BF3", + "2F871", "21B18", + "2F872", "5BFF", + "2F873", "5C06", + "2F874", "5F33", + "2F875", "5C22", + "2F876", "3781", + "2F877", "5C60", + "2F878", "5C6E", + "2F879", "5CC0", + "2F87A", "5C8D", + "2F87B", "21DE4", + "2F87C", "5D43", + "2F87D", "21DE6", + "2F87E", "5D6E", + "2F87F", "5D6B", + "2F880", "5D7C", + "2F881", "5DE1", + "2F882", "5DE2", + "2F883", "382F", + "2F884", "5DFD", + "2F885", "5E28", + "2F886", "5E3D", + "2F887", "5E69", + "2F888", "3862", + "2F889", "22183", + "2F88A", "387C", + "2F88B", "5EB0", + "2F88C", "5EB3", + "2F88D", "5EB6", + "2F88E", "5ECA", + "2F88F", "2A392", + "2F890", "5EFE", + "2F891", "22331", + "2F892", "22331", + "2F893", "8201", + "2F894", "5F22", + "2F895", "5F22", + "2F896", "38C7", + "2F897", "232B8", + "2F898", "261DA", + "2F899", "5F62", + "2F89A", "5F6B", + "2F89B", "38E3", + "2F89C", "5F9A", + "2F89D", "5FCD", + "2F89E", "5FD7", + "2F89F", "5FF9", + "2F8A0", "6081", + "2F8A1", "393A", + "2F8A2", "391C", + "2F8A3", "6094", + "2F8A4", "226D4", + "2F8A5", "60C7", + "2F8A6", "6148", + "2F8A7", "614C", + "2F8A8", "614E", + "2F8A9", "614C", + "2F8AA", "617A", + "2F8AB", "618E", + "2F8AC", "61B2", + "2F8AD", "61A4", + "2F8AE", "61AF", + "2F8AF", "61DE", + "2F8B0", "61F2", + "2F8B1", "61F6", + "2F8B2", "6210", + "2F8B3", "621B", + "2F8B4", "625D", + "2F8B5", "62B1", + "2F8B6", "62D4", + "2F8B7", "6350", + "2F8B8", "22B0C", + "2F8B9", "633D", + "2F8BA", "62FC", + "2F8BB", "6368", + "2F8BC", "6383", + "2F8BD", "63E4", + "2F8BE", "22BF1", + "2F8BF", "6422", + "2F8C0", "63C5", + "2F8C1", "63A9", + "2F8C2", "3A2E", + "2F8C3", "6469", + "2F8C4", "647E", + "2F8C5", "649D", + "2F8C6", "6477", + "2F8C7", "3A6C", + "2F8C8", "654F", + "2F8C9", "656C", + "2F8CA", "2300A", + "2F8CB", "65E3", + "2F8CC", "66F8", + "2F8CD", "6649", + "2F8CE", "3B19", + "2F8CF", "6691", + "2F8D0", "3B08", + "2F8D1", "3AE4", + "2F8D2", "5192", + "2F8D3", "5195", + "2F8D4", "6700", + "2F8D5", "669C", + "2F8D6", "80AD", + "2F8D7", "43D9", + "2F8D8", "6717", + "2F8D9", "671B", + "2F8DA", "6721", + "2F8DB", "675E", + "2F8DC", "6753", + "2F8DD", "233C3", + "2F8DE", "3B49", + "2F8DF", "67FA", + "2F8E0", "6785", + "2F8E1", "6852", + "2F8E2", "6885", + "2F8E3", "2346D", + "2F8E4", "688E", + "2F8E5", "681F", + "2F8E6", "6914", + "2F8E7", "3B9D", + "2F8E8", "6942", + "2F8E9", "69A3", + "2F8EA", "69EA", + "2F8EB", "6AA8", + "2F8EC", "236A3", + "2F8ED", "6ADB", + "2F8EE", "3C18", + "2F8EF", "6B21", + "2F8F0", "238A7", + "2F8F1", "6B54", + "2F8F2", "3C4E", + "2F8F3", "6B72", + "2F8F4", "6B9F", + "2F8F5", "6BBA", + "2F8F6", "6BBB", + "2F8F7", "23A8D", + "2F8F8", "21D0B", + "2F8F9", "23AFA", + "2F8FA", "6C4E", + "2F8FB", "23CBC", + "2F8FC", "6CBF", + "2F8FD", "6CCD", + "2F8FE", "6C67", + "2F8FF", "6D16", + "2F900", "6D3E", + "2F901", "6D77", + "2F902", "6D41", + "2F903", "6D69", + "2F904", "6D78", + "2F905", "6D85", + "2F906", "23D1E", + "2F907", "6D34", + "2F908", "6E2F", + "2F909", "6E6E", + "2F90A", "3D33", + "2F90B", "6ECB", + "2F90C", "6EC7", + "2F90D", "23ED1", + "2F90E", "6DF9", + "2F90F", "6F6E", + "2F910", "23F5E", + "2F911", "23F8E", + "2F912", "6FC6", + "2F913", "7039", + "2F914", "701E", + "2F915", "701B", + "2F916", "3D96", + "2F917", "704A", + "2F918", "707D", + "2F919", "7077", + "2F91A", "70AD", + "2F91B", "20525", + "2F91C", "7145", + "2F91D", "24263", + "2F91E", "719C", + "2F91F", "43AB", + "2F920", "7228", + "2F921", "7235", + "2F922", "7250", + "2F923", "24608", + "2F924", "7280", + "2F925", "7295", + "2F926", "24735", + "2F927", "24814", + "2F928", "737A", + "2F929", "738B", + "2F92A", "3EAC", + "2F92B", "73A5", + "2F92C", "3EB8", + "2F92D", "3EB8", + "2F92E", "7447", + "2F92F", "745C", + "2F930", "7471", + "2F931", "7485", + "2F932", "74CA", + "2F933", "3F1B", + "2F934", "7524", + "2F935", "24C36", + "2F936", "753E", + "2F937", "24C92", + "2F938", "7570", + "2F939", "2219F", + "2F93A", "7610", + "2F93B", "24FA1", + "2F93C", "24FB8", + "2F93D", "25044", + "2F93E", "3FFC", + "2F93F", "4008", + "2F940", "76F4", + "2F941", "250F3", + "2F942", "250F2", + "2F943", "25119", + "2F944", "25133", + "2F945", "771E", + "2F946", "771F", + "2F947", "771F", + "2F948", "774A", + "2F949", "4039", + "2F94A", "778B", + "2F94B", "4046", + "2F94C", "4096", + "2F94D", "2541D", + "2F94E", "784E", + "2F94F", "788C", + "2F950", "78CC", + "2F951", "40E3", + "2F952", "25626", + "2F953", "7956", + "2F954", "2569A", + "2F955", "256C5", + "2F956", "798F", + "2F957", "79EB", + "2F958", "412F", + "2F959", "7A40", + "2F95A", "7A4A", + "2F95B", "7A4F", + "2F95C", "2597C", + "2F95D", "25AA7", + "2F95E", "25AA7", + "2F95F", "7AAE", + "2F960", "4202", + "2F961", "25BAB", + "2F962", "7BC6", + "2F963", "7BC9", + "2F964", "4227", + "2F965", "25C80", + "2F966", "7CD2", + "2F967", "42A0", + "2F968", "7CE8", + "2F969", "7CE3", + "2F96A", "7D00", + "2F96B", "25F86", + "2F96C", "7D63", + "2F96D", "4301", + "2F96E", "7DC7", + "2F96F", "7E02", + "2F970", "7E45", + "2F971", "4334", + "2F972", "26228", + "2F973", "26247", + "2F974", "4359", + "2F975", "262D9", + "2F976", "7F7A", + "2F977", "2633E", + "2F978", "7F95", + "2F979", "7FFA", + "2F97A", "8005", + "2F97B", "264DA", + "2F97C", "26523", + "2F97D", "8060", + "2F97E", "265A8", + "2F97F", "8070", + "2F980", "2335F", + "2F981", "43D5", + "2F982", "80B2", + "2F983", "8103", + "2F984", "440B", + "2F985", "813E", + "2F986", "5AB5", + "2F987", "267A7", + "2F988", "267B5", + "2F989", "23393", + "2F98A", "2339C", + "2F98B", "8201", + "2F98C", "8204", + "2F98D", "8F9E", + "2F98E", "446B", + "2F98F", "8291", + "2F990", "828B", + "2F991", "829D", + "2F992", "52B3", + "2F993", "82B1", + "2F994", "82B3", + "2F995", "82BD", + "2F996", "82E6", + "2F997", "26B3C", + "2F998", "82E5", + "2F999", "831D", + "2F99A", "8363", + "2F99B", "83AD", + "2F99C", "8323", + "2F99D", "83BD", + "2F99E", "83E7", + "2F99F", "8457", + "2F9A0", "8353", + "2F9A1", "83CA", + "2F9A2", "83CC", + "2F9A3", "83DC", + "2F9A4", "26C36", + "2F9A5", "26D6B", + "2F9A6", "26CD5", + "2F9A7", "452B", + "2F9A8", "84F1", + "2F9A9", "84F3", + "2F9AA", "8516", + "2F9AB", "273CA", + "2F9AC", "8564", + "2F9AD", "26F2C", + "2F9AE", "455D", + "2F9AF", "4561", + "2F9B0", "26FB1", + "2F9B1", "270D2", + "2F9B2", "456B", + "2F9B3", "8650", + "2F9B4", "865C", + "2F9B5", "8667", + "2F9B6", "8669", + "2F9B7", "86A9", + "2F9B8", "8688", + "2F9B9", "870E", + "2F9BA", "86E2", + "2F9BB", "8779", + "2F9BC", "8728", + "2F9BD", "876B", + "2F9BE", "8786", + "2F9BF", "4D57", + "2F9C0", "87E1", + "2F9C1", "8801", + "2F9C2", "45F9", + "2F9C3", "8860", + "2F9C4", "8863", + "2F9C5", "27667", + "2F9C6", "88D7", + "2F9C7", "88DE", + "2F9C8", "4635", + "2F9C9", "88FA", + "2F9CA", "34BB", + "2F9CB", "278AE", + "2F9CC", "27966", + "2F9CD", "46BE", + "2F9CE", "46C7", + "2F9CF", "8AA0", + "2F9D0", "8AED", + "2F9D1", "8B8A", + "2F9D2", "8C55", + "2F9D3", "27CA8", + "2F9D4", "8CAB", + "2F9D5", "8CC1", + "2F9D6", "8D1B", + "2F9D7", "8D77", + "2F9D8", "27F2F", + "2F9D9", "20804", + "2F9DA", "8DCB", + "2F9DB", "8DBC", + "2F9DC", "8DF0", + "2F9DD", "208DE", + "2F9DE", "8ED4", + "2F9DF", "8F38", + "2F9E0", "285D2", + "2F9E1", "285ED", + "2F9E2", "9094", + "2F9E3", "90F1", + "2F9E4", "9111", + "2F9E5", "2872E", + "2F9E6", "911B", + "2F9E7", "9238", + "2F9E8", "92D7", + "2F9E9", "92D8", + "2F9EA", "927C", + "2F9EB", "93F9", + "2F9EC", "9415", + "2F9ED", "28BFA", + "2F9EE", "958B", + "2F9EF", "4995", + "2F9F0", "95B7", + "2F9F1", "28D77", + "2F9F2", "49E6", + "2F9F3", "96C3", + "2F9F4", "5DB2", + "2F9F5", "9723", + "2F9F6", "29145", + "2F9F7", "2921A", + "2F9F8", "4A6E", + "2F9F9", "4A76", + "2F9FA", "97E0", + "2F9FB", "2940A", + "2F9FC", "4AB2", + "2F9FD", "29496", + "2F9FE", "980B", + "2F9FF", "980B", + "2FA00", "9829", + "2FA01", "295B6", + "2FA02", "98E2", + "2FA03", "4B33", + "2FA04", "9929", + "2FA05", "99A7", + "2FA06", "99C2", + "2FA07", "99FE", + "2FA08", "4BCE", + "2FA09", "29B30", + "2FA0A", "9B12", + "2FA0B", "9C40", + "2FA0C", "9CFD", + "2FA0D", "4CCE", + "2FA0E", "4CED", + "2FA0F", "9D67", + "2FA10", "2A0CE", + "2FA11", "4CF8", + "2FA12", "2A105", + "2FA13", "2A20E", + "2FA14", "2A291", + "2FA15", "9EBB", + "2FA16", "4D56", + "2FA17", "9EF9", + "2FA18", "9EFE", + "2FA19", "9F05", + "2FA1A", "9F0F", + "2FA1B", "9F16", + "2FA1C", "9F3B", + "2FA1D", "2A600", ); -%AGL_to_unicode = ( - "A", "u0041", - "AE", "u00C6", - "AEacute", "u01FC", - "AEmacron", "u01E2", - "Aacute", "u00C1", - "Abreve", "u0102", - "Abreveacute", "u1EAE", - "Abrevecyrillic", "u04D0", - "Abrevedotbelow", "u1EB6", - "Abrevegrave", "u1EB0", - "Abrevehookabove", "u1EB2", - "Abrevetilde", "u1EB4", - "Acaron", "u01CD", - "Acircle", "u24B6", - "Acircumflex", "u00C2", - "Acircumflexacute", "u1EA4", - "Acircumflexdotbelow", "u1EAC", - "Acircumflexgrave", "u1EA6", - "Acircumflexhookabove", "u1EA8", - "Acircumflextilde", "u1EAA", - "Acyrillic", "u0410", - "Adblgrave", "u0200", - "Adieresis", "u00C4", - "Adieresiscyrillic", "u04D2", - "Adieresismacron", "u01DE", - "Adotbelow", "u1EA0", - "Adotmacron", "u01E0", - "Agrave", "u00C0", - "Ahookabove", "u1EA2", - "Aiecyrillic", "u04D4", - "Ainvertedbreve", "u0202", - "Alpha", "u0391", - "Alphatonos", "u0386", - "Amacron", "u0100", - "Amonospace", "uFF21", - "Aogonek", "u0104", - "Aring", "u00C5", - "Aringacute", "u01FA", - "Aringbelow", "u1E00", - "Atilde", "u00C3", - "Aybarmenian", "u0531", - "B", "u0042", - "Bcircle", "u24B7", - "Bdotaccent", "u1E02", - "Bdotbelow", "u1E04", - "Becyrillic", "u0411", - "Benarmenian", "u0532", - "Beta", "u0392", - "Bhook", "u0181", - "Blinebelow", "u1E06", - "Bmonospace", "uFF22", - "Btopbar", "u0182", - "C", "u0043", - "Caarmenian", "u053E", - "Cacute", "u0106", - "Ccaron", "u010C", - "Ccedilla", "u00C7", - "Ccedillaacute", "u1E08", - "Ccircle", "u24B8", - "Ccircumflex", "u0108", - "Cdot", "u010A", - "Cdotaccent", "u010A", - "Chaarmenian", "u0549", - "Cheabkhasiancyrillic", "u04BC", - "Checyrillic", "u0427", - "Chedescenderabkhasiancyrillic", "u04BE", - "Chedescendercyrillic", "u04B6", - "Chedieresiscyrillic", "u04F4", - "Cheharmenian", "u0543", - "Chekhakassiancyrillic", "u04CB", - "Cheverticalstrokecyrillic", "u04B8", - "Chi", "u03A7", - "Chook", "u0187", - "Cmonospace", "uFF23", - "Coarmenian", "u0551", - "D", "u0044", - "DZ", "u01F1", - "DZcaron", "u01C4", - "Daarmenian", "u0534", - "Dafrican", "u0189", - "Dcaron", "u010E", - "Dcedilla", "u1E10", - "Dcircle", "u24B9", - "Dcircumflexbelow", "u1E12", - "Dcroat", "u0110", - "Ddotaccent", "u1E0A", - "Ddotbelow", "u1E0C", - "Decyrillic", "u0414", - "Deicoptic", "u03EE", - "Delta", "u2206", - "Deltagreek", "u0394", - "Dhook", "u018A", - "Digammagreek", "u03DC", - "Djecyrillic", "u0402", - "Dlinebelow", "u1E0E", - "Dmonospace", "uFF24", - "Dslash", "u0110", - "Dtopbar", "u018B", - "Dz", "u01F2", - "Dzcaron", "u01C5", - "Dzeabkhasiancyrillic", "u04E0", - "Dzecyrillic", "u0405", - "Dzhecyrillic", "u040F", - "E", "u0045", - "Eacute", "u00C9", - "Ebreve", "u0114", - "Ecaron", "u011A", - "Ecedillabreve", "u1E1C", - "Echarmenian", "u0535", - "Ecircle", "u24BA", - "Ecircumflex", "u00CA", - "Ecircumflexacute", "u1EBE", - "Ecircumflexbelow", "u1E18", - "Ecircumflexdotbelow", "u1EC6", - "Ecircumflexgrave", "u1EC0", - "Ecircumflexhookabove", "u1EC2", - "Ecircumflextilde", "u1EC4", - "Ecyrillic", "u0404", - "Edblgrave", "u0204", - "Edieresis", "u00CB", - "Edot", "u0116", - "Edotaccent", "u0116", - "Edotbelow", "u1EB8", - "Efcyrillic", "u0424", - "Egrave", "u00C8", - "Eharmenian", "u0537", - "Ehookabove", "u1EBA", - "Eightroman", "u2167", - "Einvertedbreve", "u0206", - "Eiotifiedcyrillic", "u0464", - "Elcyrillic", "u041B", - "Elevenroman", "u216A", - "Emacron", "u0112", - "Emacronacute", "u1E16", - "Emacrongrave", "u1E14", - "Emcyrillic", "u041C", - "Emonospace", "uFF25", - "Encyrillic", "u041D", - "Endescendercyrillic", "u04A2", - "Eng", "u014A", - "Enghecyrillic", "u04A4", - "Enhookcyrillic", "u04C7", - "Eogonek", "u0118", - "Eopen", "u0190", - "Epsilon", "u0395", - "Epsilontonos", "u0388", - "Ercyrillic", "u0420", - "Ereversed", "u018E", - "Ereversedcyrillic", "u042D", - "Escyrillic", "u0421", - "Esdescendercyrillic", "u04AA", - "Esh", "u01A9", - "Eta", "u0397", - "Etarmenian", "u0538", - "Etatonos", "u0389", - "Eth", "u00D0", - "Etilde", "u1EBC", - "Etildebelow", "u1E1A", - "Euro", "u20AC", - "Ezh", "u01B7", - "Ezhcaron", "u01EE", - "Ezhreversed", "u01B8", - "F", "u0046", - "Fcircle", "u24BB", - "Fdotaccent", "u1E1E", - "Feharmenian", "u0556", - "Feicoptic", "u03E4", - "Fhook", "u0191", - "Fitacyrillic", "u0472", - "Fiveroman", "u2164", - "Fmonospace", "uFF26", - "Fourroman", "u2163", - "G", "u0047", - "GBsquare", "u3387", - "Gacute", "u01F4", - "Gamma", "u0393", - "Gammaafrican", "u0194", - "Gangiacoptic", "u03EA", - "Gbreve", "u011E", - "Gcaron", "u01E6", - "Gcedilla", "u0122", - "Gcircle", "u24BC", - "Gcircumflex", "u011C", - "Gcommaaccent", "u0122", - "Gdot", "u0120", - "Gdotaccent", "u0120", - "Gecyrillic", "u0413", - "Ghadarmenian", "u0542", - "Ghemiddlehookcyrillic", "u0494", - "Ghestrokecyrillic", "u0492", - "Gheupturncyrillic", "u0490", - "Ghook", "u0193", - "Gimarmenian", "u0533", - "Gjecyrillic", "u0403", - "Gmacron", "u1E20", - "Gmonospace", "uFF27", - "Gsmallhook", "u029B", - "Gstroke", "u01E4", - "H", "u0048", - "H18533", "u25CF", - "H18543", "u25AA", - "H18551", "u25AB", - "H22073", "u25A1", - "HPsquare", "u33CB", - "Haabkhasiancyrillic", "u04A8", - "Hadescendercyrillic", "u04B2", - "Hardsigncyrillic", "u042A", - "Hbar", "u0126", - "Hbrevebelow", "u1E2A", - "Hcedilla", "u1E28", - "Hcircle", "u24BD", - "Hcircumflex", "u0124", - "Hdieresis", "u1E26", - "Hdotaccent", "u1E22", - "Hdotbelow", "u1E24", - "Hmonospace", "uFF28", - "Hoarmenian", "u0540", - "Horicoptic", "u03E8", - "Hzsquare", "u3390", - "I", "u0049", - "IAcyrillic", "u042F", - "IJ", "u0132", - "IUcyrillic", "u042E", - "Iacute", "u00CD", - "Ibreve", "u012C", - "Icaron", "u01CF", - "Icircle", "u24BE", - "Icircumflex", "u00CE", - "Icyrillic", "u0406", - "Idblgrave", "u0208", - "Idieresis", "u00CF", - "Idieresisacute", "u1E2E", - "Idieresiscyrillic", "u04E4", - "Idot", "u0130", - "Idotaccent", "u0130", - "Idotbelow", "u1ECA", - "Iebrevecyrillic", "u04D6", - "Iecyrillic", "u0415", - "Ifraktur", "u2111", - "Igrave", "u00CC", - "Ihookabove", "u1EC8", - "Iicyrillic", "u0418", - "Iinvertedbreve", "u020A", - "Iishortcyrillic", "u0419", - "Imacron", "u012A", - "Imacroncyrillic", "u04E2", - "Imonospace", "uFF29", - "Iniarmenian", "u053B", - "Iocyrillic", "u0401", - "Iogonek", "u012E", - "Iota", "u0399", - "Iotaafrican", "u0196", - "Iotadieresis", "u03AA", - "Iotatonos", "u038A", - "Istroke", "u0197", - "Itilde", "u0128", - "Itildebelow", "u1E2C", - "Izhitsacyrillic", "u0474", - "Izhitsadblgravecyrillic", "u0476", - "J", "u004A", - "Jaarmenian", "u0541", - "Jcircle", "u24BF", - "Jcircumflex", "u0134", - "Jecyrillic", "u0408", - "Jheharmenian", "u054B", - "Jmonospace", "uFF2A", - "K", "u004B", - "KBsquare", "u3385", - "KKsquare", "u33CD", - "Kabashkircyrillic", "u04A0", - "Kacute", "u1E30", - "Kacyrillic", "u041A", - "Kadescendercyrillic", "u049A", - "Kahookcyrillic", "u04C3", - "Kappa", "u039A", - "Kastrokecyrillic", "u049E", - "Kaverticalstrokecyrillic", "u049C", - "Kcaron", "u01E8", - "Kcedilla", "u0136", - "Kcircle", "u24C0", - "Kcommaaccent", "u0136", - "Kdotbelow", "u1E32", - "Keharmenian", "u0554", - "Kenarmenian", "u053F", - "Khacyrillic", "u0425", - "Kheicoptic", "u03E6", - "Khook", "u0198", - "Kjecyrillic", "u040C", - "Klinebelow", "u1E34", - "Kmonospace", "uFF2B", - "Koppacyrillic", "u0480", - "Koppagreek", "u03DE", - "Ksicyrillic", "u046E", - "L", "u004C", - "LJ", "u01C7", - "Lacute", "u0139", - "Lambda", "u039B", - "Lcaron", "u013D", - "Lcedilla", "u013B", - "Lcircle", "u24C1", - "Lcircumflexbelow", "u1E3C", - "Lcommaaccent", "u013B", - "Ldot", "u013F", - "Ldotaccent", "u013F", - "Ldotbelow", "u1E36", - "Ldotbelowmacron", "u1E38", - "Liwnarmenian", "u053C", - "Lj", "u01C8", - "Ljecyrillic", "u0409", - "Llinebelow", "u1E3A", - "Lmonospace", "uFF2C", - "Lslash", "u0141", - "M", "u004D", - "MBsquare", "u3386", - "Macute", "u1E3E", - "Mcircle", "u24C2", - "Mdotaccent", "u1E40", - "Mdotbelow", "u1E42", - "Menarmenian", "u0544", - "Mmonospace", "uFF2D", - "Mturned", "u019C", - "Mu", "u039C", - "N", "u004E", - "NJ", "u01CA", - "Nacute", "u0143", - "Ncaron", "u0147", - "Ncedilla", "u0145", - "Ncircle", "u24C3", - "Ncircumflexbelow", "u1E4A", - "Ncommaaccent", "u0145", - "Ndotaccent", "u1E44", - "Ndotbelow", "u1E46", - "Nhookleft", "u019D", - "Nineroman", "u2168", - "Nj", "u01CB", - "Njecyrillic", "u040A", - "Nlinebelow", "u1E48", - "Nmonospace", "uFF2E", - "Nowarmenian", "u0546", - "Ntilde", "u00D1", - "Nu", "u039D", - "O", "u004F", - "OE", "u0152", - "Oacute", "u00D3", - "Obarredcyrillic", "u04E8", - "Obarreddieresiscyrillic", "u04EA", - "Obreve", "u014E", - "Ocaron", "u01D1", - "Ocenteredtilde", "u019F", - "Ocircle", "u24C4", - "Ocircumflex", "u00D4", - "Ocircumflexacute", "u1ED0", - "Ocircumflexdotbelow", "u1ED8", - "Ocircumflexgrave", "u1ED2", - "Ocircumflexhookabove", "u1ED4", - "Ocircumflextilde", "u1ED6", - "Ocyrillic", "u041E", - "Odblacute", "u0150", - "Odblgrave", "u020C", - "Odieresis", "u00D6", - "Odieresiscyrillic", "u04E6", - "Odotbelow", "u1ECC", - "Ograve", "u00D2", - "Oharmenian", "u0555", - "Ohm", "u2126", - "Ohookabove", "u1ECE", - "Ohorn", "u01A0", - "Ohornacute", "u1EDA", - "Ohorndotbelow", "u1EE2", - "Ohorngrave", "u1EDC", - "Ohornhookabove", "u1EDE", - "Ohorntilde", "u1EE0", - "Ohungarumlaut", "u0150", - "Oi", "u01A2", - "Oinvertedbreve", "u020E", - "Omacron", "u014C", - "Omacronacute", "u1E52", - "Omacrongrave", "u1E50", - "Omega", "u2126", - "Omegacyrillic", "u0460", - "Omegagreek", "u03A9", - "Omegaroundcyrillic", "u047A", - "Omegatitlocyrillic", "u047C", - "Omegatonos", "u038F", - "Omicron", "u039F", - "Omicrontonos", "u038C", - "Omonospace", "uFF2F", - "Oneroman", "u2160", - "Oogonek", "u01EA", - "Oogonekmacron", "u01EC", - "Oopen", "u0186", - "Oslash", "u00D8", - "Oslashacute", "u01FE", - "Ostrokeacute", "u01FE", - "Otcyrillic", "u047E", - "Otilde", "u00D5", - "Otildeacute", "u1E4C", - "Otildedieresis", "u1E4E", - "P", "u0050", - "Pacute", "u1E54", - "Pcircle", "u24C5", - "Pdotaccent", "u1E56", - "Pecyrillic", "u041F", - "Peharmenian", "u054A", - "Pemiddlehookcyrillic", "u04A6", - "Phi", "u03A6", - "Phook", "u01A4", - "Pi", "u03A0", - "Piwrarmenian", "u0553", - "Pmonospace", "uFF30", - "Psi", "u03A8", - "Psicyrillic", "u0470", - "Q", "u0051", - "Qcircle", "u24C6", - "Qmonospace", "uFF31", - "R", "u0052", - "Raarmenian", "u054C", - "Racute", "u0154", - "Rcaron", "u0158", - "Rcedilla", "u0156", - "Rcircle", "u24C7", - "Rcommaaccent", "u0156", - "Rdblgrave", "u0210", - "Rdotaccent", "u1E58", - "Rdotbelow", "u1E5A", - "Rdotbelowmacron", "u1E5C", - "Reharmenian", "u0550", - "Rfraktur", "u211C", - "Rho", "u03A1", - "Rinvertedbreve", "u0212", - "Rlinebelow", "u1E5E", - "Rmonospace", "uFF32", - "Rsmallinverted", "u0281", - "Rsmallinvertedsuperior", "u02B6", - "S", "u0053", - "SF010000", "u250C", - "SF020000", "u2514", - "SF030000", "u2510", - "SF040000", "u2518", - "SF050000", "u253C", - "SF060000", "u252C", - "SF070000", "u2534", - "SF080000", "u251C", - "SF090000", "u2524", - "SF100000", "u2500", - "SF110000", "u2502", - "SF190000", "u2561", - "SF200000", "u2562", - "SF210000", "u2556", - "SF220000", "u2555", - "SF230000", "u2563", - "SF240000", "u2551", - "SF250000", "u2557", - "SF260000", "u255D", - "SF270000", "u255C", - "SF280000", "u255B", - "SF360000", "u255E", - "SF370000", "u255F", - "SF380000", "u255A", - "SF390000", "u2554", - "SF400000", "u2569", - "SF410000", "u2566", - "SF420000", "u2560", - "SF430000", "u2550", - "SF440000", "u256C", - "SF450000", "u2567", - "SF460000", "u2568", - "SF470000", "u2564", - "SF480000", "u2565", - "SF490000", "u2559", - "SF500000", "u2558", - "SF510000", "u2552", - "SF520000", "u2553", - "SF530000", "u256B", - "SF540000", "u256A", - "Sacute", "u015A", - "Sacutedotaccent", "u1E64", - "Sampigreek", "u03E0", - "Scaron", "u0160", - "Scarondotaccent", "u1E66", - "Scedilla", "u015E", - "Schwa", "u018F", - "Schwacyrillic", "u04D8", - "Schwadieresiscyrillic", "u04DA", - "Scircle", "u24C8", - "Scircumflex", "u015C", - "Scommaaccent", "u0218", - "Sdotaccent", "u1E60", - "Sdotbelow", "u1E62", - "Sdotbelowdotaccent", "u1E68", - "Seharmenian", "u054D", - "Sevenroman", "u2166", - "Shaarmenian", "u0547", - "Shacyrillic", "u0428", - "Shchacyrillic", "u0429", - "Sheicoptic", "u03E2", - "Shhacyrillic", "u04BA", - "Shimacoptic", "u03EC", - "Sigma", "u03A3", - "Sixroman", "u2165", - "Smonospace", "uFF33", - "Softsigncyrillic", "u042C", - "Stigmagreek", "u03DA", - "T", "u0054", - "Tau", "u03A4", - "Tbar", "u0166", - "Tcaron", "u0164", - "Tcedilla", "u0162", - "Tcircle", "u24C9", - "Tcircumflexbelow", "u1E70", - "Tcommaaccent", "u0162", - "Tdotaccent", "u1E6A", - "Tdotbelow", "u1E6C", - "Tecyrillic", "u0422", - "Tedescendercyrillic", "u04AC", - "Tenroman", "u2169", - "Tetsecyrillic", "u04B4", - "Theta", "u0398", - "Thook", "u01AC", - "Thorn", "u00DE", - "Threeroman", "u2162", - "Tiwnarmenian", "u054F", - "Tlinebelow", "u1E6E", - "Tmonospace", "uFF34", - "Toarmenian", "u0539", - "Tonefive", "u01BC", - "Tonesix", "u0184", - "Tonetwo", "u01A7", - "Tretroflexhook", "u01AE", - "Tsecyrillic", "u0426", - "Tshecyrillic", "u040B", - "Twelveroman", "u216B", - "Tworoman", "u2161", - "U", "u0055", - "Uacute", "u00DA", - "Ubreve", "u016C", - "Ucaron", "u01D3", - "Ucircle", "u24CA", - "Ucircumflex", "u00DB", - "Ucircumflexbelow", "u1E76", - "Ucyrillic", "u0423", - "Udblacute", "u0170", - "Udblgrave", "u0214", - "Udieresis", "u00DC", - "Udieresisacute", "u01D7", - "Udieresisbelow", "u1E72", - "Udieresiscaron", "u01D9", - "Udieresiscyrillic", "u04F0", - "Udieresisgrave", "u01DB", - "Udieresismacron", "u01D5", - "Udotbelow", "u1EE4", - "Ugrave", "u00D9", - "Uhookabove", "u1EE6", - "Uhorn", "u01AF", - "Uhornacute", "u1EE8", - "Uhorndotbelow", "u1EF0", - "Uhorngrave", "u1EEA", - "Uhornhookabove", "u1EEC", - "Uhorntilde", "u1EEE", - "Uhungarumlaut", "u0170", - "Uhungarumlautcyrillic", "u04F2", - "Uinvertedbreve", "u0216", - "Ukcyrillic", "u0478", - "Umacron", "u016A", - "Umacroncyrillic", "u04EE", - "Umacrondieresis", "u1E7A", - "Umonospace", "uFF35", - "Uogonek", "u0172", - "Upsilon", "u03A5", - "Upsilon1", "u03D2", - "Upsilonacutehooksymbolgreek", "u03D3", - "Upsilonafrican", "u01B1", - "Upsilondieresis", "u03AB", - "Upsilondieresishooksymbolgreek", "u03D4", - "Upsilonhooksymbol", "u03D2", - "Upsilontonos", "u038E", - "Uring", "u016E", - "Ushortcyrillic", "u040E", - "Ustraightcyrillic", "u04AE", - "Ustraightstrokecyrillic", "u04B0", - "Utilde", "u0168", - "Utildeacute", "u1E78", - "Utildebelow", "u1E74", - "V", "u0056", - "Vcircle", "u24CB", - "Vdotbelow", "u1E7E", - "Vecyrillic", "u0412", - "Vewarmenian", "u054E", - "Vhook", "u01B2", - "Vmonospace", "uFF36", - "Voarmenian", "u0548", - "Vtilde", "u1E7C", - "W", "u0057", - "Wacute", "u1E82", - "Wcircle", "u24CC", - "Wcircumflex", "u0174", - "Wdieresis", "u1E84", - "Wdotaccent", "u1E86", - "Wdotbelow", "u1E88", - "Wgrave", "u1E80", - "Wmonospace", "uFF37", - "X", "u0058", - "Xcircle", "u24CD", - "Xdieresis", "u1E8C", - "Xdotaccent", "u1E8A", - "Xeharmenian", "u053D", - "Xi", "u039E", - "Xmonospace", "uFF38", - "Y", "u0059", - "Yacute", "u00DD", - "Yatcyrillic", "u0462", - "Ycircle", "u24CE", - "Ycircumflex", "u0176", - "Ydieresis", "u0178", - "Ydotaccent", "u1E8E", - "Ydotbelow", "u1EF4", - "Yericyrillic", "u042B", - "Yerudieresiscyrillic", "u04F8", - "Ygrave", "u1EF2", - "Yhook", "u01B3", - "Yhookabove", "u1EF6", - "Yiarmenian", "u0545", - "Yicyrillic", "u0407", - "Yiwnarmenian", "u0552", - "Ymonospace", "uFF39", - "Ytilde", "u1EF8", - "Yusbigcyrillic", "u046A", - "Yusbigiotifiedcyrillic", "u046C", - "Yuslittlecyrillic", "u0466", - "Yuslittleiotifiedcyrillic", "u0468", - "Z", "u005A", - "Zaarmenian", "u0536", - "Zacute", "u0179", - "Zcaron", "u017D", - "Zcircle", "u24CF", - "Zcircumflex", "u1E90", - "Zdot", "u017B", - "Zdotaccent", "u017B", - "Zdotbelow", "u1E92", - "Zecyrillic", "u0417", - "Zedescendercyrillic", "u0498", - "Zedieresiscyrillic", "u04DE", - "Zeta", "u0396", - "Zhearmenian", "u053A", - "Zhebrevecyrillic", "u04C1", - "Zhecyrillic", "u0416", - "Zhedescendercyrillic", "u0496", - "Zhedieresiscyrillic", "u04DC", - "Zlinebelow", "u1E94", - "Zmonospace", "uFF3A", - "Zstroke", "u01B5", - "a", "u0061", - "aabengali", "u0986", - "aacute", "u00E1", - "aadeva", "u0906", - "aagujarati", "u0A86", - "aagurmukhi", "u0A06", - "aamatragurmukhi", "u0A3E", - "aarusquare", "u3303", - "aavowelsignbengali", "u09BE", - "aavowelsigndeva", "u093E", - "aavowelsigngujarati", "u0ABE", - "abbreviationmarkarmenian", "u055F", - "abbreviationsigndeva", "u0970", - "abengali", "u0985", - "abopomofo", "u311A", - "abreve", "u0103", - "abreveacute", "u1EAF", - "abrevecyrillic", "u04D1", - "abrevedotbelow", "u1EB7", - "abrevegrave", "u1EB1", - "abrevehookabove", "u1EB3", - "abrevetilde", "u1EB5", - "acaron", "u01CE", - "acircle", "u24D0", - "acircumflex", "u00E2", - "acircumflexacute", "u1EA5", - "acircumflexdotbelow", "u1EAD", - "acircumflexgrave", "u1EA7", - "acircumflexhookabove", "u1EA9", - "acircumflextilde", "u1EAB", - "acute", "u00B4", - "acutebelowcmb", "u0317", - "acutecmb", "u0301", - "acutecomb", "u0301", - "acutedeva", "u0954", - "acutelowmod", "u02CF", - "acutetonecmb", "u0341", - "acyrillic", "u0430", - "adblgrave", "u0201", - "addakgurmukhi", "u0A71", - "adeva", "u0905", - "adieresis", "u00E4", - "adieresiscyrillic", "u04D3", - "adieresismacron", "u01DF", - "adotbelow", "u1EA1", - "adotmacron", "u01E1", - "ae", "u00E6", - "aeacute", "u01FD", - "aekorean", "u3150", - "aemacron", "u01E3", - "afii00208", "u2015", - "afii08941", "u20A4", - "afii10017", "u0410", - "afii10018", "u0411", - "afii10019", "u0412", - "afii10020", "u0413", - "afii10021", "u0414", - "afii10022", "u0415", - "afii10023", "u0401", - "afii10024", "u0416", - "afii10025", "u0417", - "afii10026", "u0418", - "afii10027", "u0419", - "afii10028", "u041A", - "afii10029", "u041B", - "afii10030", "u041C", - "afii10031", "u041D", - "afii10032", "u041E", - "afii10033", "u041F", - "afii10034", "u0420", - "afii10035", "u0421", - "afii10036", "u0422", - "afii10037", "u0423", - "afii10038", "u0424", - "afii10039", "u0425", - "afii10040", "u0426", - "afii10041", "u0427", - "afii10042", "u0428", - "afii10043", "u0429", - "afii10044", "u042A", - "afii10045", "u042B", - "afii10046", "u042C", - "afii10047", "u042D", - "afii10048", "u042E", - "afii10049", "u042F", - "afii10050", "u0490", - "afii10051", "u0402", - "afii10052", "u0403", - "afii10053", "u0404", - "afii10054", "u0405", - "afii10055", "u0406", - "afii10056", "u0407", - "afii10057", "u0408", - "afii10058", "u0409", - "afii10059", "u040A", - "afii10060", "u040B", - "afii10061", "u040C", - "afii10062", "u040E", - "afii10065", "u0430", - "afii10066", "u0431", - "afii10067", "u0432", - "afii10068", "u0433", - "afii10069", "u0434", - "afii10070", "u0435", - "afii10071", "u0451", - "afii10072", "u0436", - "afii10073", "u0437", - "afii10074", "u0438", - "afii10075", "u0439", - "afii10076", "u043A", - "afii10077", "u043B", - "afii10078", "u043C", - "afii10079", "u043D", - "afii10080", "u043E", - "afii10081", "u043F", - "afii10082", "u0440", - "afii10083", "u0441", - "afii10084", "u0442", - "afii10085", "u0443", - "afii10086", "u0444", - "afii10087", "u0445", - "afii10088", "u0446", - "afii10089", "u0447", - "afii10090", "u0448", - "afii10091", "u0449", - "afii10092", "u044A", - "afii10093", "u044B", - "afii10094", "u044C", - "afii10095", "u044D", - "afii10096", "u044E", - "afii10097", "u044F", - "afii10098", "u0491", - "afii10099", "u0452", - "afii10100", "u0453", - "afii10101", "u0454", - "afii10102", "u0455", - "afii10103", "u0456", - "afii10104", "u0457", - "afii10105", "u0458", - "afii10106", "u0459", - "afii10107", "u045A", - "afii10108", "u045B", - "afii10109", "u045C", - "afii10110", "u045E", - "afii10145", "u040F", - "afii10146", "u0462", - "afii10147", "u0472", - "afii10148", "u0474", - "afii10193", "u045F", - "afii10194", "u0463", - "afii10195", "u0473", - "afii10196", "u0475", - "afii10846", "u04D9", - "afii299", "u200E", - "afii300", "u200F", - "afii301", "u200D", - "afii57381", "u066A", - "afii57388", "u060C", - "afii57392", "u0660", - "afii57393", "u0661", - "afii57394", "u0662", - "afii57395", "u0663", - "afii57396", "u0664", - "afii57397", "u0665", - "afii57398", "u0666", - "afii57399", "u0667", - "afii57400", "u0668", - "afii57401", "u0669", - "afii57403", "u061B", - "afii57407", "u061F", - "afii57409", "u0621", - "afii57410", "u0622", - "afii57411", "u0623", - "afii57412", "u0624", - "afii57413", "u0625", - "afii57414", "u0626", - "afii57415", "u0627", - "afii57416", "u0628", - "afii57417", "u0629", - "afii57418", "u062A", - "afii57419", "u062B", - "afii57420", "u062C", - "afii57421", "u062D", - "afii57422", "u062E", - "afii57423", "u062F", - "afii57424", "u0630", - "afii57425", "u0631", - "afii57426", "u0632", - "afii57427", "u0633", - "afii57428", "u0634", - "afii57429", "u0635", - "afii57430", "u0636", - "afii57431", "u0637", - "afii57432", "u0638", - "afii57433", "u0639", - "afii57434", "u063A", - "afii57440", "u0640", - "afii57441", "u0641", - "afii57442", "u0642", - "afii57443", "u0643", - "afii57444", "u0644", - "afii57445", "u0645", - "afii57446", "u0646", - "afii57448", "u0648", - "afii57449", "u0649", - "afii57450", "u064A", - "afii57451", "u064B", - "afii57452", "u064C", - "afii57453", "u064D", - "afii57454", "u064E", - "afii57455", "u064F", - "afii57456", "u0650", - "afii57457", "u0651", - "afii57458", "u0652", - "afii57470", "u0647", - "afii57505", "u06A4", - "afii57506", "u067E", - "afii57507", "u0686", - "afii57508", "u0698", - "afii57509", "u06AF", - "afii57511", "u0679", - "afii57512", "u0688", - "afii57513", "u0691", - "afii57514", "u06BA", - "afii57519", "u06D2", - "afii57534", "u06D5", - "afii57636", "u20AA", - "afii57645", "u05BE", - "afii57658", "u05C3", - "afii57664", "u05D0", - "afii57665", "u05D1", - "afii57666", "u05D2", - "afii57667", "u05D3", - "afii57668", "u05D4", - "afii57669", "u05D5", - "afii57670", "u05D6", - "afii57671", "u05D7", - "afii57672", "u05D8", - "afii57673", "u05D9", - "afii57674", "u05DA", - "afii57675", "u05DB", - "afii57676", "u05DC", - "afii57677", "u05DD", - "afii57678", "u05DE", - "afii57679", "u05DF", - "afii57680", "u05E0", - "afii57681", "u05E1", - "afii57682", "u05E2", - "afii57683", "u05E3", - "afii57684", "u05E4", - "afii57685", "u05E5", - "afii57686", "u05E6", - "afii57687", "u05E7", - "afii57688", "u05E8", - "afii57689", "u05E9", - "afii57690", "u05EA", - "afii57694", "uFB2A", - "afii57695", "uFB2B", - "afii57700", "uFB4B", - "afii57705", "uFB1F", - "afii57716", "u05F0", - "afii57717", "u05F1", - "afii57718", "u05F2", - "afii57723", "uFB35", - "afii57793", "u05B4", - "afii57794", "u05B5", - "afii57795", "u05B6", - "afii57796", "u05BB", - "afii57797", "u05B8", - "afii57798", "u05B7", - "afii57799", "u05B0", - "afii57800", "u05B2", - "afii57801", "u05B1", - "afii57802", "u05B3", - "afii57803", "u05C2", - "afii57804", "u05C1", - "afii57806", "u05B9", - "afii57807", "u05BC", - "afii57839", "u05BD", - "afii57841", "u05BF", - "afii57842", "u05C0", - "afii57929", "u02BC", - "afii61248", "u2105", - "afii61289", "u2113", - "afii61352", "u2116", - "afii61573", "u202C", - "afii61574", "u202D", - "afii61575", "u202E", - "afii61664", "u200C", - "afii63167", "u066D", - "afii64937", "u02BD", - "agrave", "u00E0", - "agujarati", "u0A85", - "agurmukhi", "u0A05", - "ahiragana", "u3042", - "ahookabove", "u1EA3", - "aibengali", "u0990", - "aibopomofo", "u311E", - "aideva", "u0910", - "aiecyrillic", "u04D5", - "aigujarati", "u0A90", - "aigurmukhi", "u0A10", - "aimatragurmukhi", "u0A48", - "ainarabic", "u0639", - "ainfinalarabic", "uFECA", - "aininitialarabic", "uFECB", - "ainmedialarabic", "uFECC", - "ainvertedbreve", "u0203", - "aivowelsignbengali", "u09C8", - "aivowelsigndeva", "u0948", - "aivowelsigngujarati", "u0AC8", - "akatakana", "u30A2", - "akatakanahalfwidth", "uFF71", - "akorean", "u314F", - "alef", "u05D0", - "alefarabic", "u0627", - "alefdageshhebrew", "uFB30", - "aleffinalarabic", "uFE8E", - "alefhamzaabovearabic", "u0623", - "alefhamzaabovefinalarabic", "uFE84", - "alefhamzabelowarabic", "u0625", - "alefhamzabelowfinalarabic", "uFE88", - "alefhebrew", "u05D0", - "aleflamedhebrew", "uFB4F", - "alefmaddaabovearabic", "u0622", - "alefmaddaabovefinalarabic", "uFE82", - "alefmaksuraarabic", "u0649", - "alefmaksurafinalarabic", "uFEF0", - "alefmaksurainitialarabic", "uFEF3", - "alefmaksuramedialarabic", "uFEF4", - "alefpatahhebrew", "uFB2E", - "alefqamatshebrew", "uFB2F", - "aleph", "u2135", - "allequal", "u224C", - "alpha", "u03B1", - "alphatonos", "u03AC", - "amacron", "u0101", - "amonospace", "uFF41", - "ampersand", "u0026", - "ampersandmonospace", "uFF06", - "amsquare", "u33C2", - "anbopomofo", "u3122", - "angbopomofo", "u3124", - "angkhankhuthai", "u0E5A", - "angle", "u2220", - "anglebracketleft", "u3008", - "anglebracketleftvertical", "uFE3F", - "anglebracketright", "u3009", - "anglebracketrightvertical", "uFE40", - "angleleft", "u2329", - "angleright", "u232A", - "angstrom", "u212B", - "anoteleia", "u0387", - "anudattadeva", "u0952", - "anusvarabengali", "u0982", - "anusvaradeva", "u0902", - "anusvaragujarati", "u0A82", - "aogonek", "u0105", - "apaatosquare", "u3300", - "aparen", "u249C", - "apostrophearmenian", "u055A", - "apostrophemod", "u02BC", - "approaches", "u2250", - "approxequal", "u2248", - "approxequalorimage", "u2252", - "approximatelyequal", "u2245", - "araeaekorean", "u318E", - "araeakorean", "u318D", - "arc", "u2312", - "arighthalfring", "u1E9A", - "aring", "u00E5", - "aringacute", "u01FB", - "aringbelow", "u1E01", - "arrowboth", "u2194", - "arrowdashdown", "u21E3", - "arrowdashleft", "u21E0", - "arrowdashright", "u21E2", - "arrowdashup", "u21E1", - "arrowdblboth", "u21D4", - "arrowdbldown", "u21D3", - "arrowdblleft", "u21D0", - "arrowdblright", "u21D2", - "arrowdblup", "u21D1", - "arrowdown", "u2193", - "arrowdownleft", "u2199", - "arrowdownright", "u2198", - "arrowdownwhite", "u21E9", - "arrowheaddownmod", "u02C5", - "arrowheadleftmod", "u02C2", - "arrowheadrightmod", "u02C3", - "arrowheadupmod", "u02C4", - "arrowleft", "u2190", - "arrowleftdbl", "u21D0", - "arrowleftdblstroke", "u21CD", - "arrowleftoverright", "u21C6", - "arrowleftwhite", "u21E6", - "arrowright", "u2192", - "arrowrightdblstroke", "u21CF", - "arrowrightheavy", "u279E", - "arrowrightoverleft", "u21C4", - "arrowrightwhite", "u21E8", - "arrowtableft", "u21E4", - "arrowtabright", "u21E5", - "arrowup", "u2191", - "arrowupdn", "u2195", - "arrowupdnbse", "u21A8", - "arrowupdownbase", "u21A8", - "arrowupleft", "u2196", - "arrowupleftofdown", "u21C5", - "arrowupright", "u2197", - "arrowupwhite", "u21E7", - "asciicircum", "u005E", - "asciicircummonospace", "uFF3E", - "asciitilde", "u007E", - "asciitildemonospace", "uFF5E", - "ascript", "u0251", - "ascriptturned", "u0252", - "asmallhiragana", "u3041", - "asmallkatakana", "u30A1", - "asmallkatakanahalfwidth", "uFF67", - "asterisk", "u002A", - "asteriskaltonearabic", "u066D", - "asteriskarabic", "u066D", - "asteriskmath", "u2217", - "asteriskmonospace", "uFF0A", - "asterisksmall", "uFE61", - "asterism", "u2042", - "asymptoticallyequal", "u2243", - "at", "u0040", - "atilde", "u00E3", - "atmonospace", "uFF20", - "atsmall", "uFE6B", - "aturned", "u0250", - "aubengali", "u0994", - "aubopomofo", "u3120", - "audeva", "u0914", - "augujarati", "u0A94", - "augurmukhi", "u0A14", - "aulengthmarkbengali", "u09D7", - "aumatragurmukhi", "u0A4C", - "auvowelsignbengali", "u09CC", - "auvowelsigndeva", "u094C", - "auvowelsigngujarati", "u0ACC", - "avagrahadeva", "u093D", - "aybarmenian", "u0561", - "ayin", "u05E2", - "ayinaltonehebrew", "uFB20", - "ayinhebrew", "u05E2", - "b", "u0062", - "babengali", "u09AC", - "backslash", "u005C", - "backslashmonospace", "uFF3C", - "badeva", "u092C", - "bagujarati", "u0AAC", - "bagurmukhi", "u0A2C", - "bahiragana", "u3070", - "bahtthai", "u0E3F", - "bakatakana", "u30D0", - "bar", "u007C", - "barmonospace", "uFF5C", - "bbopomofo", "u3105", - "bcircle", "u24D1", - "bdotaccent", "u1E03", - "bdotbelow", "u1E05", - "beamedsixteenthnotes", "u266C", - "because", "u2235", - "becyrillic", "u0431", - "beharabic", "u0628", - "behfinalarabic", "uFE90", - "behinitialarabic", "uFE91", - "behiragana", "u3079", - "behmedialarabic", "uFE92", - "behmeeminitialarabic", "uFC9F", - "behmeemisolatedarabic", "uFC08", - "behnoonfinalarabic", "uFC6D", - "bekatakana", "u30D9", - "benarmenian", "u0562", - "bet", "u05D1", - "beta", "u03B2", - "betasymbolgreek", "u03D0", - "betdagesh", "uFB31", - "betdageshhebrew", "uFB31", - "bethebrew", "u05D1", - "betrafehebrew", "uFB4C", - "bhabengali", "u09AD", - "bhadeva", "u092D", - "bhagujarati", "u0AAD", - "bhagurmukhi", "u0A2D", - "bhook", "u0253", - "bihiragana", "u3073", - "bikatakana", "u30D3", - "bilabialclick", "u0298", - "bindigurmukhi", "u0A02", - "birusquare", "u3331", - "blackcircle", "u25CF", - "blackdiamond", "u25C6", - "blackdownpointingtriangle", "u25BC", - "blackleftpointingpointer", "u25C4", - "blackleftpointingtriangle", "u25C0", - "blacklenticularbracketleft", "u3010", - "blacklenticularbracketleftvertical", "uFE3B", - "blacklenticularbracketright", "u3011", - "blacklenticularbracketrightvertical", "uFE3C", - "blacklowerlefttriangle", "u25E3", - "blacklowerrighttriangle", "u25E2", - "blackrectangle", "u25AC", - "blackrightpointingpointer", "u25BA", - "blackrightpointingtriangle", "u25B6", - "blacksmallsquare", "u25AA", - "blacksmilingface", "u263B", - "blacksquare", "u25A0", - "blackstar", "u2605", - "blackupperlefttriangle", "u25E4", - "blackupperrighttriangle", "u25E5", - "blackuppointingsmalltriangle", "u25B4", - "blackuppointingtriangle", "u25B2", - "blank", "u2423", - "blinebelow", "u1E07", - "block", "u2588", - "bmonospace", "uFF42", - "bobaimaithai", "u0E1A", - "bohiragana", "u307C", - "bokatakana", "u30DC", - "bparen", "u249D", - "bqsquare", "u33C3", - "braceleft", "u007B", - "braceleftmonospace", "uFF5B", - "braceleftsmall", "uFE5B", - "braceleftvertical", "uFE37", - "braceright", "u007D", - "bracerightmonospace", "uFF5D", - "bracerightsmall", "uFE5C", - "bracerightvertical", "uFE38", - "bracketleft", "u005B", - "bracketleftmonospace", "uFF3B", - "bracketright", "u005D", - "bracketrightmonospace", "uFF3D", - "breve", "u02D8", - "brevebelowcmb", "u032E", - "brevecmb", "u0306", - "breveinvertedbelowcmb", "u032F", - "breveinvertedcmb", "u0311", - "breveinverteddoublecmb", "u0361", - "bridgebelowcmb", "u032A", - "bridgeinvertedbelowcmb", "u033A", - "brokenbar", "u00A6", - "bstroke", "u0180", - "btopbar", "u0183", - "buhiragana", "u3076", - "bukatakana", "u30D6", - "bullet", "u2022", - "bulletinverse", "u25D8", - "bulletoperator", "u2219", - "bullseye", "u25CE", - "c", "u0063", - "caarmenian", "u056E", - "cabengali", "u099A", - "cacute", "u0107", - "cadeva", "u091A", - "cagujarati", "u0A9A", - "cagurmukhi", "u0A1A", - "calsquare", "u3388", - "candrabindubengali", "u0981", - "candrabinducmb", "u0310", - "candrabindudeva", "u0901", - "candrabindugujarati", "u0A81", - "capslock", "u21EA", - "careof", "u2105", - "caron", "u02C7", - "caronbelowcmb", "u032C", - "caroncmb", "u030C", - "carriagereturn", "u21B5", - "cbopomofo", "u3118", - "ccaron", "u010D", - "ccedilla", "u00E7", - "ccedillaacute", "u1E09", - "ccircle", "u24D2", - "ccircumflex", "u0109", - "ccurl", "u0255", - "cdot", "u010B", - "cdotaccent", "u010B", - "cdsquare", "u33C5", - "cedilla", "u00B8", - "cedillacmb", "u0327", - "cent", "u00A2", - "centigrade", "u2103", - "centmonospace", "uFFE0", - "chaarmenian", "u0579", - "chabengali", "u099B", - "chadeva", "u091B", - "chagujarati", "u0A9B", - "chagurmukhi", "u0A1B", - "chbopomofo", "u3114", - "cheabkhasiancyrillic", "u04BD", - "checkmark", "u2713", - "checyrillic", "u0447", - "chedescenderabkhasiancyrillic", "u04BF", - "chedescendercyrillic", "u04B7", - "chedieresiscyrillic", "u04F5", - "cheharmenian", "u0573", - "chekhakassiancyrillic", "u04CC", - "cheverticalstrokecyrillic", "u04B9", - "chi", "u03C7", - "chieuchacirclekorean", "u3277", - "chieuchaparenkorean", "u3217", - "chieuchcirclekorean", "u3269", - "chieuchkorean", "u314A", - "chieuchparenkorean", "u3209", - "chochangthai", "u0E0A", - "chochanthai", "u0E08", - "chochingthai", "u0E09", - "chochoethai", "u0E0C", - "chook", "u0188", - "cieucacirclekorean", "u3276", - "cieucaparenkorean", "u3216", - "cieuccirclekorean", "u3268", - "cieuckorean", "u3148", - "cieucparenkorean", "u3208", - "cieucuparenkorean", "u321C", - "circle", "u25CB", - "circlemultiply", "u2297", - "circleot", "u2299", - "circleplus", "u2295", - "circlepostalmark", "u3036", - "circlewithlefthalfblack", "u25D0", - "circlewithrighthalfblack", "u25D1", - "circumflex", "u02C6", - "circumflexbelowcmb", "u032D", - "circumflexcmb", "u0302", - "clear", "u2327", - "clickalveolar", "u01C2", - "clickdental", "u01C0", - "clicklateral", "u01C1", - "clickretroflex", "u01C3", - "club", "u2663", - "clubsuitblack", "u2663", - "clubsuitwhite", "u2667", - "cmcubedsquare", "u33A4", - "cmonospace", "uFF43", - "cmsquaredsquare", "u33A0", - "coarmenian", "u0581", - "colon", "u003A", - "colonmonetary", "u20A1", - "colonmonospace", "uFF1A", - "colonsign", "u20A1", - "colonsmall", "uFE55", - "colontriangularhalfmod", "u02D1", - "colontriangularmod", "u02D0", - "comma", "u002C", - "commaabovecmb", "u0313", - "commaaboverightcmb", "u0315", - "commaarabic", "u060C", - "commaarmenian", "u055D", - "commamonospace", "uFF0C", - "commareversedabovecmb", "u0314", - "commareversedmod", "u02BD", - "commasmall", "uFE50", - "commaturnedabovecmb", "u0312", - "commaturnedmod", "u02BB", - "compass", "u263C", - "congruent", "u2245", - "contourintegral", "u222E", - "control", "u2303", - "controlACK", "u0006", - "controlBEL", "u0007", - "controlBS", "u0008", - "controlCAN", "u0018", - "controlCR", "u000D", - "controlDC1", "u0011", - "controlDC2", "u0012", - "controlDC3", "u0013", - "controlDC4", "u0014", - "controlDEL", "u007F", - "controlDLE", "u0010", - "controlEM", "u0019", - "controlENQ", "u0005", - "controlEOT", "u0004", - "controlESC", "u001B", - "controlETB", "u0017", - "controlETX", "u0003", - "controlFF", "u000C", - "controlFS", "u001C", - "controlGS", "u001D", - "controlHT", "u0009", - "controlLF", "u000A", - "controlNAK", "u0015", - "controlRS", "u001E", - "controlSI", "u000F", - "controlSO", "u000E", - "controlSOT", "u0002", - "controlSTX", "u0001", - "controlSUB", "u001A", - "controlSYN", "u0016", - "controlUS", "u001F", - "controlVT", "u000B", - "copyright", "u00A9", - "cornerbracketleft", "u300C", - "cornerbracketlefthalfwidth", "uFF62", - "cornerbracketleftvertical", "uFE41", - "cornerbracketright", "u300D", - "cornerbracketrighthalfwidth", "uFF63", - "cornerbracketrightvertical", "uFE42", - "corporationsquare", "u337F", - "cosquare", "u33C7", - "coverkgsquare", "u33C6", - "cparen", "u249E", - "cruzeiro", "u20A2", - "cstretched", "u0297", - "curlyand", "u22CF", - "curlyor", "u22CE", - "currency", "u00A4", - "d", "u0064", - "daarmenian", "u0564", - "dabengali", "u09A6", - "dadarabic", "u0636", - "dadeva", "u0926", - "dadfinalarabic", "uFEBE", - "dadinitialarabic", "uFEBF", - "dadmedialarabic", "uFEC0", - "dagesh", "u05BC", - "dageshhebrew", "u05BC", - "dagger", "u2020", - "daggerdbl", "u2021", - "dagujarati", "u0AA6", - "dagurmukhi", "u0A26", - "dahiragana", "u3060", - "dakatakana", "u30C0", - "dalarabic", "u062F", - "dalet", "u05D3", - "daletdagesh", "uFB33", - "daletdageshhebrew", "uFB33", - "dalethatafpatah", "u05D3_05B2", - "dalethatafpatahhebrew", "u05D3_05B2", - "dalethatafsegol", "u05D3_05B1", - "dalethatafsegolhebrew", "u05D3_05B1", - "dalethebrew", "u05D3", - "dalethiriq", "u05D3_05B4", - "dalethiriqhebrew", "u05D3_05B4", - "daletholam", "u05D3_05B9", - "daletholamhebrew", "u05D3_05B9", - "daletpatah", "u05D3_05B7", - "daletpatahhebrew", "u05D3_05B7", - "daletqamats", "u05D3_05B8", - "daletqamatshebrew", "u05D3_05B8", - "daletqubuts", "u05D3_05BB", - "daletqubutshebrew", "u05D3_05BB", - "daletsegol", "u05D3_05B6", - "daletsegolhebrew", "u05D3_05B6", - "daletsheva", "u05D3_05B0", - "daletshevahebrew", "u05D3_05B0", - "dalettsere", "u05D3_05B5", - "dalettserehebrew", "u05D3_05B5", - "dalfinalarabic", "uFEAA", - "dammaarabic", "u064F", - "dammalowarabic", "u064F", - "dammatanaltonearabic", "u064C", - "dammatanarabic", "u064C", - "danda", "u0964", - "dargahebrew", "u05A7", - "dargalefthebrew", "u05A7", - "dasiapneumatacyrilliccmb", "u0485", - "dblanglebracketleft", "u300A", - "dblanglebracketleftvertical", "uFE3D", - "dblanglebracketright", "u300B", - "dblanglebracketrightvertical", "uFE3E", - "dblarchinvertedbelowcmb", "u032B", - "dblarrowleft", "u21D4", - "dblarrowright", "u21D2", - "dbldanda", "u0965", - "dblgravecmb", "u030F", - "dblintegral", "u222C", - "dbllowline", "u2017", - "dbllowlinecmb", "u0333", - "dbloverlinecmb", "u033F", - "dblprimemod", "u02BA", - "dblverticalbar", "u2016", - "dblverticallineabovecmb", "u030E", - "dbopomofo", "u3109", - "dbsquare", "u33C8", - "dcaron", "u010F", - "dcedilla", "u1E11", - "dcircle", "u24D3", - "dcircumflexbelow", "u1E13", - "dcroat", "u0111", - "ddabengali", "u09A1", - "ddadeva", "u0921", - "ddagujarati", "u0AA1", - "ddagurmukhi", "u0A21", - "ddalarabic", "u0688", - "ddalfinalarabic", "uFB89", - "dddhadeva", "u095C", - "ddhabengali", "u09A2", - "ddhadeva", "u0922", - "ddhagujarati", "u0AA2", - "ddhagurmukhi", "u0A22", - "ddotaccent", "u1E0B", - "ddotbelow", "u1E0D", - "decimalseparatorarabic", "u066B", - "decimalseparatorpersian", "u066B", - "decyrillic", "u0434", - "degree", "u00B0", - "dehihebrew", "u05AD", - "dehiragana", "u3067", - "deicoptic", "u03EF", - "dekatakana", "u30C7", - "deleteleft", "u232B", - "deleteright", "u2326", - "delta", "u03B4", - "deltaturned", "u018D", - "denominatorminusonenumeratorbengali", "u09F8", - "dezh", "u02A4", - "dhabengali", "u09A7", - "dhadeva", "u0927", - "dhagujarati", "u0AA7", - "dhagurmukhi", "u0A27", - "dhook", "u0257", - "dialytikatonos", "u0385", - "dialytikatonoscmb", "u0344", - "diamond", "u2666", - "diamondsuitwhite", "u2662", - "dieresis", "u00A8", - "dieresisbelowcmb", "u0324", - "dieresiscmb", "u0308", - "dieresistonos", "u0385", - "dihiragana", "u3062", - "dikatakana", "u30C2", - "dittomark", "u3003", - "divide", "u00F7", - "divides", "u2223", - "divisionslash", "u2215", - "djecyrillic", "u0452", - "dkshade", "u2593", - "dlinebelow", "u1E0F", - "dlsquare", "u3397", - "dmacron", "u0111", - "dmonospace", "uFF44", - "dnblock", "u2584", - "dochadathai", "u0E0E", - "dodekthai", "u0E14", - "dohiragana", "u3069", - "dokatakana", "u30C9", - "dollar", "u0024", - "dollarmonospace", "uFF04", - "dollarsmall", "uFE69", - "dong", "u20AB", - "dorusquare", "u3326", - "dotaccent", "u02D9", - "dotaccentcmb", "u0307", - "dotbelowcmb", "u0323", - "dotbelowcomb", "u0323", - "dotkatakana", "u30FB", - "dotlessi", "u0131", - "dotlessjstrokehook", "u0284", - "dotmath", "u22C5", - "dottedcircle", "u25CC", - "doubleyodpatah", "uFB1F", - "doubleyodpatahhebrew", "uFB1F", - "downtackbelowcmb", "u031E", - "downtackmod", "u02D5", - "dparen", "u249F", - "dtail", "u0256", - "dtopbar", "u018C", - "duhiragana", "u3065", - "dukatakana", "u30C5", - "dz", "u01F3", - "dzaltone", "u02A3", - "dzcaron", "u01C6", - "dzcurl", "u02A5", - "dzeabkhasiancyrillic", "u04E1", - "dzecyrillic", "u0455", - "dzhecyrillic", "u045F", - "e", "u0065", - "eacute", "u00E9", - "earth", "u2641", - "ebengali", "u098F", - "ebopomofo", "u311C", - "ebreve", "u0115", - "ecandradeva", "u090D", - "ecandragujarati", "u0A8D", - "ecandravowelsigndeva", "u0945", - "ecandravowelsigngujarati", "u0AC5", - "ecaron", "u011B", - "ecedillabreve", "u1E1D", - "echarmenian", "u0565", - "echyiwnarmenian", "u0587", - "ecircle", "u24D4", - "ecircumflex", "u00EA", - "ecircumflexacute", "u1EBF", - "ecircumflexbelow", "u1E19", - "ecircumflexdotbelow", "u1EC7", - "ecircumflexgrave", "u1EC1", - "ecircumflexhookabove", "u1EC3", - "ecircumflextilde", "u1EC5", - "ecyrillic", "u0454", - "edblgrave", "u0205", - "edeva", "u090F", - "edieresis", "u00EB", - "edot", "u0117", - "edotaccent", "u0117", - "edotbelow", "u1EB9", - "eegurmukhi", "u0A0F", - "eematragurmukhi", "u0A47", - "efcyrillic", "u0444", - "egrave", "u00E8", - "egujarati", "u0A8F", - "eharmenian", "u0567", - "ehbopomofo", "u311D", - "ehiragana", "u3048", - "ehookabove", "u1EBB", - "eibopomofo", "u311F", - "eight", "u0038", - "eightarabic", "u0668", - "eightbengali", "u09EE", - "eightcircle", "u2467", - "eightcircleinversesansserif", "u2791", - "eightdeva", "u096E", - "eighteencircle", "u2471", - "eighteenparen", "u2485", - "eighteenperiod", "u2499", - "eightgujarati", "u0AEE", - "eightgurmukhi", "u0A6E", - "eighthackarabic", "u0668", - "eighthangzhou", "u3028", - "eighthnotebeamed", "u266B", - "eightideographicparen", "u3227", - "eightinferior", "u2088", - "eightmonospace", "uFF18", - "eightparen", "u247B", - "eightperiod", "u248F", - "eightpersian", "u06F8", - "eightroman", "u2177", - "eightsuperior", "u2078", - "eightthai", "u0E58", - "einvertedbreve", "u0207", - "eiotifiedcyrillic", "u0465", - "ekatakana", "u30A8", - "ekatakanahalfwidth", "uFF74", - "ekonkargurmukhi", "u0A74", - "ekorean", "u3154", - "elcyrillic", "u043B", - "element", "u2208", - "elevencircle", "u246A", - "elevenparen", "u247E", - "elevenperiod", "u2492", - "elevenroman", "u217A", - "ellipsis", "u2026", - "ellipsisvertical", "u22EE", - "emacron", "u0113", - "emacronacute", "u1E17", - "emacrongrave", "u1E15", - "emcyrillic", "u043C", - "emdash", "u2014", - "emdashvertical", "uFE31", - "emonospace", "uFF45", - "emphasismarkarmenian", "u055B", - "emptyset", "u2205", - "enbopomofo", "u3123", - "encyrillic", "u043D", - "endash", "u2013", - "endashvertical", "uFE32", - "endescendercyrillic", "u04A3", - "eng", "u014B", - "engbopomofo", "u3125", - "enghecyrillic", "u04A5", - "enhookcyrillic", "u04C8", - "enspace", "u2002", - "eogonek", "u0119", - "eokorean", "u3153", - "eopen", "u025B", - "eopenclosed", "u029A", - "eopenreversed", "u025C", - "eopenreversedclosed", "u025E", - "eopenreversedhook", "u025D", - "eparen", "u24A0", - "epsilon", "u03B5", - "epsilontonos", "u03AD", - "equal", "u003D", - "equalmonospace", "uFF1D", - "equalsmall", "uFE66", - "equalsuperior", "u207C", - "equivalence", "u2261", - "erbopomofo", "u3126", - "ercyrillic", "u0440", - "ereversed", "u0258", - "ereversedcyrillic", "u044D", - "escyrillic", "u0441", - "esdescendercyrillic", "u04AB", - "esh", "u0283", - "eshcurl", "u0286", - "eshortdeva", "u090E", - "eshortvowelsigndeva", "u0946", - "eshreversedloop", "u01AA", - "eshsquatreversed", "u0285", - "esmallhiragana", "u3047", - "esmallkatakana", "u30A7", - "esmallkatakanahalfwidth", "uFF6A", - "estimated", "u212E", - "eta", "u03B7", - "etarmenian", "u0568", - "etatonos", "u03AE", - "eth", "u00F0", - "etilde", "u1EBD", - "etildebelow", "u1E1B", - "etnahtafoukhhebrew", "u0591", - "etnahtafoukhlefthebrew", "u0591", - "etnahtahebrew", "u0591", - "etnahtalefthebrew", "u0591", - "eturned", "u01DD", - "eukorean", "u3161", - "euro", "u20AC", - "evowelsignbengali", "u09C7", - "evowelsigndeva", "u0947", - "evowelsigngujarati", "u0AC7", - "exclam", "u0021", - "exclamarmenian", "u055C", - "exclamdbl", "u203C", - "exclamdown", "u00A1", - "exclammonospace", "uFF01", - "existential", "u2203", - "ezh", "u0292", - "ezhcaron", "u01EF", - "ezhcurl", "u0293", - "ezhreversed", "u01B9", - "ezhtail", "u01BA", - "f", "u0066", - "fadeva", "u095E", - "fagurmukhi", "u0A5E", - "fahrenheit", "u2109", - "fathaarabic", "u064E", - "fathalowarabic", "u064E", - "fathatanarabic", "u064B", - "fbopomofo", "u3108", - "fcircle", "u24D5", - "fdotaccent", "u1E1F", - "feharabic", "u0641", - "feharmenian", "u0586", - "fehfinalarabic", "uFED2", - "fehinitialarabic", "uFED3", - "fehmedialarabic", "uFED4", - "feicoptic", "u03E5", - "female", "u2640", - "ff", "uFB00", - "ffi", "uFB03", - "ffl", "uFB04", - "fi", "uFB01", - "fifteencircle", "u246E", - "fifteenparen", "u2482", - "fifteenperiod", "u2496", - "figuredash", "u2012", - "filledbox", "u25A0", - "filledrect", "u25AC", - "finalkaf", "u05DA", - "finalkafdagesh", "uFB3A", - "finalkafdageshhebrew", "uFB3A", - "finalkafhebrew", "u05DA", - "finalkafqamats", "u05DA_05B8", - "finalkafqamatshebrew", "u05DA_05B8", - "finalkafsheva", "u05DA_05B0", - "finalkafshevahebrew", "u05DA_05B0", - "finalmem", "u05DD", - "finalmemhebrew", "u05DD", - "finalnun", "u05DF", - "finalnunhebrew", "u05DF", - "finalpe", "u05E3", - "finalpehebrew", "u05E3", - "finaltsadi", "u05E5", - "finaltsadihebrew", "u05E5", - "firsttonechinese", "u02C9", - "fisheye", "u25C9", - "fitacyrillic", "u0473", - "five", "u0035", - "fivearabic", "u0665", - "fivebengali", "u09EB", - "fivecircle", "u2464", - "fivecircleinversesansserif", "u278E", - "fivedeva", "u096B", - "fiveeighths", "u215D", - "fivegujarati", "u0AEB", - "fivegurmukhi", "u0A6B", - "fivehackarabic", "u0665", - "fivehangzhou", "u3025", - "fiveideographicparen", "u3224", - "fiveinferior", "u2085", - "fivemonospace", "uFF15", - "fiveparen", "u2478", - "fiveperiod", "u248C", - "fivepersian", "u06F5", - "fiveroman", "u2174", - "fivesuperior", "u2075", - "fivethai", "u0E55", - "fl", "uFB02", - "florin", "u0192", - "fmonospace", "uFF46", - "fmsquare", "u3399", - "fofanthai", "u0E1F", - "fofathai", "u0E1D", - "fongmanthai", "u0E4F", - "forall", "u2200", - "four", "u0034", - "fourarabic", "u0664", - "fourbengali", "u09EA", - "fourcircle", "u2463", - "fourcircleinversesansserif", "u278D", - "fourdeva", "u096A", - "fourgujarati", "u0AEA", - "fourgurmukhi", "u0A6A", - "fourhackarabic", "u0664", - "fourhangzhou", "u3024", - "fourideographicparen", "u3223", - "fourinferior", "u2084", - "fourmonospace", "uFF14", - "fournumeratorbengali", "u09F7", - "fourparen", "u2477", - "fourperiod", "u248B", - "fourpersian", "u06F4", - "fourroman", "u2173", - "foursuperior", "u2074", - "fourteencircle", "u246D", - "fourteenparen", "u2481", - "fourteenperiod", "u2495", - "fourthai", "u0E54", - "fourthtonechinese", "u02CB", - "fparen", "u24A1", - "fraction", "u2044", - "franc", "u20A3", - "g", "u0067", - "gabengali", "u0997", - "gacute", "u01F5", - "gadeva", "u0917", - "gafarabic", "u06AF", - "gaffinalarabic", "uFB93", - "gafinitialarabic", "uFB94", - "gafmedialarabic", "uFB95", - "gagujarati", "u0A97", - "gagurmukhi", "u0A17", - "gahiragana", "u304C", - "gakatakana", "u30AC", - "gamma", "u03B3", - "gammalatinsmall", "u0263", - "gammasuperior", "u02E0", - "gangiacoptic", "u03EB", - "gbopomofo", "u310D", - "gbreve", "u011F", - "gcaron", "u01E7", - "gcedilla", "u0123", - "gcircle", "u24D6", - "gcircumflex", "u011D", - "gcommaaccent", "u0123", - "gdot", "u0121", - "gdotaccent", "u0121", - "gecyrillic", "u0433", - "gehiragana", "u3052", - "gekatakana", "u30B2", - "geometricallyequal", "u2251", - "gereshaccenthebrew", "u059C", - "gereshhebrew", "u05F3", - "gereshmuqdamhebrew", "u059D", - "germandbls", "u00DF", - "gershayimaccenthebrew", "u059E", - "gershayimhebrew", "u05F4", - "getamark", "u3013", - "ghabengali", "u0998", - "ghadarmenian", "u0572", - "ghadeva", "u0918", - "ghagujarati", "u0A98", - "ghagurmukhi", "u0A18", - "ghainarabic", "u063A", - "ghainfinalarabic", "uFECE", - "ghaininitialarabic", "uFECF", - "ghainmedialarabic", "uFED0", - "ghemiddlehookcyrillic", "u0495", - "ghestrokecyrillic", "u0493", - "gheupturncyrillic", "u0491", - "ghhadeva", "u095A", - "ghhagurmukhi", "u0A5A", - "ghook", "u0260", - "ghzsquare", "u3393", - "gihiragana", "u304E", - "gikatakana", "u30AE", - "gimarmenian", "u0563", - "gimel", "u05D2", - "gimeldagesh", "uFB32", - "gimeldageshhebrew", "uFB32", - "gimelhebrew", "u05D2", - "gjecyrillic", "u0453", - "glottalinvertedstroke", "u01BE", - "glottalstop", "u0294", - "glottalstopinverted", "u0296", - "glottalstopmod", "u02C0", - "glottalstopreversed", "u0295", - "glottalstopreversedmod", "u02C1", - "glottalstopreversedsuperior", "u02E4", - "glottalstopstroke", "u02A1", - "glottalstopstrokereversed", "u02A2", - "gmacron", "u1E21", - "gmonospace", "uFF47", - "gohiragana", "u3054", - "gokatakana", "u30B4", - "gparen", "u24A2", - "gpasquare", "u33AC", - "gradient", "u2207", - "grave", "u0060", - "gravebelowcmb", "u0316", - "gravecmb", "u0300", - "gravecomb", "u0300", - "gravedeva", "u0953", - "gravelowmod", "u02CE", - "gravemonospace", "uFF40", - "gravetonecmb", "u0340", - "greater", "u003E", - "greaterequal", "u2265", - "greaterequalorless", "u22DB", - "greatermonospace", "uFF1E", - "greaterorequivalent", "u2273", - "greaterorless", "u2277", - "greateroverequal", "u2267", - "greatersmall", "uFE65", - "gscript", "u0261", - "gstroke", "u01E5", - "guhiragana", "u3050", - "guillemotleft", "u00AB", - "guillemotright", "u00BB", - "guilsinglleft", "u2039", - "guilsinglright", "u203A", - "gukatakana", "u30B0", - "guramusquare", "u3318", - "gysquare", "u33C9", - "h", "u0068", - "haabkhasiancyrillic", "u04A9", - "haaltonearabic", "u06C1", - "habengali", "u09B9", - "hadescendercyrillic", "u04B3", - "hadeva", "u0939", - "hagujarati", "u0AB9", - "hagurmukhi", "u0A39", - "haharabic", "u062D", - "hahfinalarabic", "uFEA2", - "hahinitialarabic", "uFEA3", - "hahiragana", "u306F", - "hahmedialarabic", "uFEA4", - "haitusquare", "u332A", - "hakatakana", "u30CF", - "hakatakanahalfwidth", "uFF8A", - "halantgurmukhi", "u0A4D", - "hamzaarabic", "u0621", - "hamzadammaarabic", "u0621_064F", - "hamzadammatanarabic", "u0621_064C", - "hamzafathaarabic", "u0621_064E", - "hamzafathatanarabic", "u0621_064B", - "hamzalowarabic", "u0621", - "hamzalowkasraarabic", "u0621_0650", - "hamzalowkasratanarabic", "u0621_064D", - "hamzasukunarabic", "u0621_0652", - "hangulfiller", "u3164", - "hardsigncyrillic", "u044A", - "harpoonleftbarbup", "u21BC", - "harpoonrightbarbup", "u21C0", - "hasquare", "u33CA", - "hatafpatah", "u05B2", - "hatafpatah16", "u05B2", - "hatafpatah23", "u05B2", - "hatafpatah2f", "u05B2", - "hatafpatahhebrew", "u05B2", - "hatafpatahnarrowhebrew", "u05B2", - "hatafpatahquarterhebrew", "u05B2", - "hatafpatahwidehebrew", "u05B2", - "hatafqamats", "u05B3", - "hatafqamats1b", "u05B3", - "hatafqamats28", "u05B3", - "hatafqamats34", "u05B3", - "hatafqamatshebrew", "u05B3", - "hatafqamatsnarrowhebrew", "u05B3", - "hatafqamatsquarterhebrew", "u05B3", - "hatafqamatswidehebrew", "u05B3", - "hatafsegol", "u05B1", - "hatafsegol17", "u05B1", - "hatafsegol24", "u05B1", - "hatafsegol30", "u05B1", - "hatafsegolhebrew", "u05B1", - "hatafsegolnarrowhebrew", "u05B1", - "hatafsegolquarterhebrew", "u05B1", - "hatafsegolwidehebrew", "u05B1", - "hbar", "u0127", - "hbopomofo", "u310F", - "hbrevebelow", "u1E2B", - "hcedilla", "u1E29", - "hcircle", "u24D7", - "hcircumflex", "u0125", - "hdieresis", "u1E27", - "hdotaccent", "u1E23", - "hdotbelow", "u1E25", - "he", "u05D4", - "heart", "u2665", - "heartsuitblack", "u2665", - "heartsuitwhite", "u2661", - "hedagesh", "uFB34", - "hedageshhebrew", "uFB34", - "hehaltonearabic", "u06C1", - "heharabic", "u0647", - "hehebrew", "u05D4", - "hehfinalaltonearabic", "uFBA7", - "hehfinalalttwoarabic", "uFEEA", - "hehfinalarabic", "uFEEA", - "hehhamzaabovefinalarabic", "uFBA5", - "hehhamzaaboveisolatedarabic", "uFBA4", - "hehinitialaltonearabic", "uFBA8", - "hehinitialarabic", "uFEEB", - "hehiragana", "u3078", - "hehmedialaltonearabic", "uFBA9", - "hehmedialarabic", "uFEEC", - "heiseierasquare", "u337B", - "hekatakana", "u30D8", - "hekatakanahalfwidth", "uFF8D", - "hekutaarusquare", "u3336", - "henghook", "u0267", - "herutusquare", "u3339", - "het", "u05D7", - "hethebrew", "u05D7", - "hhook", "u0266", - "hhooksuperior", "u02B1", - "hieuhacirclekorean", "u327B", - "hieuhaparenkorean", "u321B", - "hieuhcirclekorean", "u326D", - "hieuhkorean", "u314E", - "hieuhparenkorean", "u320D", - "hihiragana", "u3072", - "hikatakana", "u30D2", - "hikatakanahalfwidth", "uFF8B", - "hiriq", "u05B4", - "hiriq14", "u05B4", - "hiriq21", "u05B4", - "hiriq2d", "u05B4", - "hiriqhebrew", "u05B4", - "hiriqnarrowhebrew", "u05B4", - "hiriqquarterhebrew", "u05B4", - "hiriqwidehebrew", "u05B4", - "hlinebelow", "u1E96", - "hmonospace", "uFF48", - "hoarmenian", "u0570", - "hohipthai", "u0E2B", - "hohiragana", "u307B", - "hokatakana", "u30DB", - "hokatakanahalfwidth", "uFF8E", - "holam", "u05B9", - "holam19", "u05B9", - "holam26", "u05B9", - "holam32", "u05B9", - "holamhebrew", "u05B9", - "holamnarrowhebrew", "u05B9", - "holamquarterhebrew", "u05B9", - "holamwidehebrew", "u05B9", - "honokhukthai", "u0E2E", - "hookabovecomb", "u0309", - "hookcmb", "u0309", - "hookpalatalizedbelowcmb", "u0321", - "hookretroflexbelowcmb", "u0322", - "hoonsquare", "u3342", - "horicoptic", "u03E9", - "horizontalbar", "u2015", - "horncmb", "u031B", - "hotsprings", "u2668", - "house", "u2302", - "hparen", "u24A3", - "hsuperior", "u02B0", - "hturned", "u0265", - "huhiragana", "u3075", - "huiitosquare", "u3333", - "hukatakana", "u30D5", - "hukatakanahalfwidth", "uFF8C", - "hungarumlaut", "u02DD", - "hungarumlautcmb", "u030B", - "hv", "u0195", - "hyphen", "u002D", - "hyphenmonospace", "uFF0D", - "hyphensmall", "uFE63", - "hyphentwo", "u2010", - "i", "u0069", - "iacute", "u00ED", - "iacyrillic", "u044F", - "ibengali", "u0987", - "ibopomofo", "u3127", - "ibreve", "u012D", - "icaron", "u01D0", - "icircle", "u24D8", - "icircumflex", "u00EE", - "icyrillic", "u0456", - "idblgrave", "u0209", - "ideographearthcircle", "u328F", - "ideographfirecircle", "u328B", - "ideographicallianceparen", "u323F", - "ideographiccallparen", "u323A", - "ideographiccentrecircle", "u32A5", - "ideographicclose", "u3006", - "ideographiccomma", "u3001", - "ideographiccommaleft", "uFF64", - "ideographiccongratulationparen", "u3237", - "ideographiccorrectcircle", "u32A3", - "ideographicearthparen", "u322F", - "ideographicenterpriseparen", "u323D", - "ideographicexcellentcircle", "u329D", - "ideographicfestivalparen", "u3240", - "ideographicfinancialcircle", "u3296", - "ideographicfinancialparen", "u3236", - "ideographicfireparen", "u322B", - "ideographichaveparen", "u3232", - "ideographichighcircle", "u32A4", - "ideographiciterationmark", "u3005", - "ideographiclaborcircle", "u3298", - "ideographiclaborparen", "u3238", - "ideographicleftcircle", "u32A7", - "ideographiclowcircle", "u32A6", - "ideographicmedicinecircle", "u32A9", - "ideographicmetalparen", "u322E", - "ideographicmoonparen", "u322A", - "ideographicnameparen", "u3234", - "ideographicperiod", "u3002", - "ideographicprintcircle", "u329E", - "ideographicreachparen", "u3243", - "ideographicrepresentparen", "u3239", - "ideographicresourceparen", "u323E", - "ideographicrightcircle", "u32A8", - "ideographicsecretcircle", "u3299", - "ideographicselfparen", "u3242", - "ideographicsocietyparen", "u3233", - "ideographicspace", "u3000", - "ideographicspecialparen", "u3235", - "ideographicstockparen", "u3231", - "ideographicstudyparen", "u323B", - "ideographicsunparen", "u3230", - "ideographicsuperviseparen", "u323C", - "ideographicwaterparen", "u322C", - "ideographicwoodparen", "u322D", - "ideographiczero", "u3007", - "ideographmetalcircle", "u328E", - "ideographmooncircle", "u328A", - "ideographnamecircle", "u3294", - "ideographsuncircle", "u3290", - "ideographwatercircle", "u328C", - "ideographwoodcircle", "u328D", - "ideva", "u0907", - "idieresis", "u00EF", - "idieresisacute", "u1E2F", - "idieresiscyrillic", "u04E5", - "idotbelow", "u1ECB", - "iebrevecyrillic", "u04D7", - "iecyrillic", "u0435", - "ieungacirclekorean", "u3275", - "ieungaparenkorean", "u3215", - "ieungcirclekorean", "u3267", - "ieungkorean", "u3147", - "ieungparenkorean", "u3207", - "igrave", "u00EC", - "igujarati", "u0A87", - "igurmukhi", "u0A07", - "ihiragana", "u3044", - "ihookabove", "u1EC9", - "iibengali", "u0988", - "iicyrillic", "u0438", - "iideva", "u0908", - "iigujarati", "u0A88", - "iigurmukhi", "u0A08", - "iimatragurmukhi", "u0A40", - "iinvertedbreve", "u020B", - "iishortcyrillic", "u0439", - "iivowelsignbengali", "u09C0", - "iivowelsigndeva", "u0940", - "iivowelsigngujarati", "u0AC0", - "ij", "u0133", - "ikatakana", "u30A4", - "ikatakanahalfwidth", "uFF72", - "ikorean", "u3163", - "ilde", "u02DC", - "iluyhebrew", "u05AC", - "imacron", "u012B", - "imacroncyrillic", "u04E3", - "imageorapproximatelyequal", "u2253", - "imatragurmukhi", "u0A3F", - "imonospace", "uFF49", - "increment", "u2206", - "infinity", "u221E", - "iniarmenian", "u056B", - "integral", "u222B", - "integralbottom", "u2321", - "integralbt", "u2321", - "integraltop", "u2320", - "integraltp", "u2320", - "intersection", "u2229", - "intisquare", "u3305", - "invbullet", "u25D8", - "invcircle", "u25D9", - "invsmileface", "u263B", - "iocyrillic", "u0451", - "iogonek", "u012F", - "iota", "u03B9", - "iotadieresis", "u03CA", - "iotadieresistonos", "u0390", - "iotalatin", "u0269", - "iotatonos", "u03AF", - "iparen", "u24A4", - "irigurmukhi", "u0A72", - "ismallhiragana", "u3043", - "ismallkatakana", "u30A3", - "ismallkatakanahalfwidth", "uFF68", - "issharbengali", "u09FA", - "istroke", "u0268", - "iterationhiragana", "u309D", - "iterationkatakana", "u30FD", - "itilde", "u0129", - "itildebelow", "u1E2D", - "iubopomofo", "u3129", - "iucyrillic", "u044E", - "ivowelsignbengali", "u09BF", - "ivowelsigndeva", "u093F", - "ivowelsigngujarati", "u0ABF", - "izhitsacyrillic", "u0475", - "izhitsadblgravecyrillic", "u0477", - "j", "u006A", - "jaarmenian", "u0571", - "jabengali", "u099C", - "jadeva", "u091C", - "jagujarati", "u0A9C", - "jagurmukhi", "u0A1C", - "jbopomofo", "u3110", - "jcaron", "u01F0", - "jcircle", "u24D9", - "jcircumflex", "u0135", - "jcrossedtail", "u029D", - "jdotlessstroke", "u025F", - "jecyrillic", "u0458", - "jeemarabic", "u062C", - "jeemfinalarabic", "uFE9E", - "jeeminitialarabic", "uFE9F", - "jeemmedialarabic", "uFEA0", - "jeharabic", "u0698", - "jehfinalarabic", "uFB8B", - "jhabengali", "u099D", - "jhadeva", "u091D", - "jhagujarati", "u0A9D", - "jhagurmukhi", "u0A1D", - "jheharmenian", "u057B", - "jis", "u3004", - "jmonospace", "uFF4A", - "jparen", "u24A5", - "jsuperior", "u02B2", - "k", "u006B", - "kabashkircyrillic", "u04A1", - "kabengali", "u0995", - "kacute", "u1E31", - "kacyrillic", "u043A", - "kadescendercyrillic", "u049B", - "kadeva", "u0915", - "kaf", "u05DB", - "kafarabic", "u0643", - "kafdagesh", "uFB3B", - "kafdageshhebrew", "uFB3B", - "kaffinalarabic", "uFEDA", - "kafhebrew", "u05DB", - "kafinitialarabic", "uFEDB", - "kafmedialarabic", "uFEDC", - "kafrafehebrew", "uFB4D", - "kagujarati", "u0A95", - "kagurmukhi", "u0A15", - "kahiragana", "u304B", - "kahookcyrillic", "u04C4", - "kakatakana", "u30AB", - "kakatakanahalfwidth", "uFF76", - "kappa", "u03BA", - "kappasymbolgreek", "u03F0", - "kapyeounmieumkorean", "u3171", - "kapyeounphieuphkorean", "u3184", - "kapyeounpieupkorean", "u3178", - "kapyeounssangpieupkorean", "u3179", - "karoriisquare", "u330D", - "kashidaautoarabic", "u0640", - "kashidaautonosidebearingarabic", "u0640", - "kasmallkatakana", "u30F5", - "kasquare", "u3384", - "kasraarabic", "u0650", - "kasratanarabic", "u064D", - "kastrokecyrillic", "u049F", - "katahiraprolongmarkhalfwidth", "uFF70", - "kaverticalstrokecyrillic", "u049D", - "kbopomofo", "u310E", - "kcalsquare", "u3389", - "kcaron", "u01E9", - "kcedilla", "u0137", - "kcircle", "u24DA", - "kcommaaccent", "u0137", - "kdotbelow", "u1E33", - "keharmenian", "u0584", - "kehiragana", "u3051", - "kekatakana", "u30B1", - "kekatakanahalfwidth", "uFF79", - "kenarmenian", "u056F", - "kesmallkatakana", "u30F6", - "kgreenlandic", "u0138", - "khabengali", "u0996", - "khacyrillic", "u0445", - "khadeva", "u0916", - "khagujarati", "u0A96", - "khagurmukhi", "u0A16", - "khaharabic", "u062E", - "khahfinalarabic", "uFEA6", - "khahinitialarabic", "uFEA7", - "khahmedialarabic", "uFEA8", - "kheicoptic", "u03E7", - "khhadeva", "u0959", - "khhagurmukhi", "u0A59", - "khieukhacirclekorean", "u3278", - "khieukhaparenkorean", "u3218", - "khieukhcirclekorean", "u326A", - "khieukhkorean", "u314B", - "khieukhparenkorean", "u320A", - "khokhaithai", "u0E02", - "khokhonthai", "u0E05", - "khokhuatthai", "u0E03", - "khokhwaithai", "u0E04", - "khomutthai", "u0E5B", - "khook", "u0199", - "khorakhangthai", "u0E06", - "khzsquare", "u3391", - "kihiragana", "u304D", - "kikatakana", "u30AD", - "kikatakanahalfwidth", "uFF77", - "kiroguramusquare", "u3315", - "kiromeetorusquare", "u3316", - "kirosquare", "u3314", - "kiyeokacirclekorean", "u326E", - "kiyeokaparenkorean", "u320E", - "kiyeokcirclekorean", "u3260", - "kiyeokkorean", "u3131", - "kiyeokparenkorean", "u3200", - "kiyeoksioskorean", "u3133", - "kjecyrillic", "u045C", - "klinebelow", "u1E35", - "klsquare", "u3398", - "kmcubedsquare", "u33A6", - "kmonospace", "uFF4B", - "kmsquaredsquare", "u33A2", - "kohiragana", "u3053", - "kohmsquare", "u33C0", - "kokaithai", "u0E01", - "kokatakana", "u30B3", - "kokatakanahalfwidth", "uFF7A", - "kooposquare", "u331E", - "koppacyrillic", "u0481", - "koreanstandardsymbol", "u327F", - "koroniscmb", "u0343", - "kparen", "u24A6", - "kpasquare", "u33AA", - "ksicyrillic", "u046F", - "ktsquare", "u33CF", - "kturned", "u029E", - "kuhiragana", "u304F", - "kukatakana", "u30AF", - "kukatakanahalfwidth", "uFF78", - "kvsquare", "u33B8", - "kwsquare", "u33BE", - "l", "u006C", - "labengali", "u09B2", - "lacute", "u013A", - "ladeva", "u0932", - "lagujarati", "u0AB2", - "lagurmukhi", "u0A32", - "lakkhangyaothai", "u0E45", - "lamaleffinalarabic", "uFEFC", - "lamalefhamzaabovefinalarabic", "uFEF8", - "lamalefhamzaaboveisolatedarabic", "uFEF7", - "lamalefhamzabelowfinalarabic", "uFEFA", - "lamalefhamzabelowisolatedarabic", "uFEF9", - "lamalefisolatedarabic", "uFEFB", - "lamalefmaddaabovefinalarabic", "uFEF6", - "lamalefmaddaaboveisolatedarabic", "uFEF5", - "lamarabic", "u0644", - "lambda", "u03BB", - "lambdastroke", "u019B", - "lamed", "u05DC", - "lameddagesh", "uFB3C", - "lameddageshhebrew", "uFB3C", - "lamedhebrew", "u05DC", - "lamedholam", "u05DC_05B9", - "lamedholamdagesh", "u05DC_05B9_05BC", - "lamedholamdageshhebrew", "u05DC_05B9_05BC", - "lamedholamhebrew", "u05DC_05B9", - "lamfinalarabic", "uFEDE", - "lamhahinitialarabic", "uFCCA", - "laminitialarabic", "uFEDF", - "lamjeeminitialarabic", "uFCC9", - "lamkhahinitialarabic", "uFCCB", - "lamlamhehisolatedarabic", "uFDF2", - "lammedialarabic", "uFEE0", - "lammeemhahinitialarabic", "uFD88", - "lammeeminitialarabic", "uFCCC", - "lammeemjeeminitialarabic", "uFEDF_FEE4_FEA0", - "lammeemkhahinitialarabic", "uFEDF_FEE4_FEA8", - "largecircle", "u25EF", - "lbar", "u019A", - "lbelt", "u026C", - "lbopomofo", "u310C", - "lcaron", "u013E", - "lcedilla", "u013C", - "lcircle", "u24DB", - "lcircumflexbelow", "u1E3D", - "lcommaaccent", "u013C", - "ldot", "u0140", - "ldotaccent", "u0140", - "ldotbelow", "u1E37", - "ldotbelowmacron", "u1E39", - "leftangleabovecmb", "u031A", - "lefttackbelowcmb", "u0318", - "less", "u003C", - "lessequal", "u2264", - "lessequalorgreater", "u22DA", - "lessmonospace", "uFF1C", - "lessorequivalent", "u2272", - "lessorgreater", "u2276", - "lessoverequal", "u2266", - "lesssmall", "uFE64", - "lezh", "u026E", - "lfblock", "u258C", - "lhookretroflex", "u026D", - "lira", "u20A4", - "liwnarmenian", "u056C", - "lj", "u01C9", - "ljecyrillic", "u0459", - "lladeva", "u0933", - "llagujarati", "u0AB3", - "llinebelow", "u1E3B", - "llladeva", "u0934", - "llvocalicbengali", "u09E1", - "llvocalicdeva", "u0961", - "llvocalicvowelsignbengali", "u09E3", - "llvocalicvowelsigndeva", "u0963", - "lmiddletilde", "u026B", - "lmonospace", "uFF4C", - "lmsquare", "u33D0", - "lochulathai", "u0E2C", - "logicaland", "u2227", - "logicalnot", "u00AC", - "logicalnotreversed", "u2310", - "logicalor", "u2228", - "lolingthai", "u0E25", - "longs", "u017F", - "lowlinecenterline", "uFE4E", - "lowlinecmb", "u0332", - "lowlinedashed", "uFE4D", - "lozenge", "u25CA", - "lparen", "u24A7", - "lslash", "u0142", - "lsquare", "u2113", - "ltshade", "u2591", - "luthai", "u0E26", - "lvocalicbengali", "u098C", - "lvocalicdeva", "u090C", - "lvocalicvowelsignbengali", "u09E2", - "lvocalicvowelsigndeva", "u0962", - "lxsquare", "u33D3", - "m", "u006D", - "mabengali", "u09AE", - "macron", "u00AF", - "macronbelowcmb", "u0331", - "macroncmb", "u0304", - "macronlowmod", "u02CD", - "macronmonospace", "uFFE3", - "macute", "u1E3F", - "madeva", "u092E", - "magujarati", "u0AAE", - "magurmukhi", "u0A2E", - "mahapakhhebrew", "u05A4", - "mahapakhlefthebrew", "u05A4", - "mahiragana", "u307E", - "maichattawathai", "u0E4B", - "maiekthai", "u0E48", - "maihanakatthai", "u0E31", - "maitaikhuthai", "u0E47", - "maithothai", "u0E49", - "maitrithai", "u0E4A", - "maiyamokthai", "u0E46", - "makatakana", "u30DE", - "makatakanahalfwidth", "uFF8F", - "male", "u2642", - "mansyonsquare", "u3347", - "maqafhebrew", "u05BE", - "mars", "u2642", - "masoracirclehebrew", "u05AF", - "masquare", "u3383", - "mbopomofo", "u3107", - "mbsquare", "u33D4", - "mcircle", "u24DC", - "mcubedsquare", "u33A5", - "mdotaccent", "u1E41", - "mdotbelow", "u1E43", - "meemarabic", "u0645", - "meemfinalarabic", "uFEE2", - "meeminitialarabic", "uFEE3", - "meemmedialarabic", "uFEE4", - "meemmeeminitialarabic", "uFCD1", - "meemmeemisolatedarabic", "uFC48", - "meetorusquare", "u334D", - "mehiragana", "u3081", - "meizierasquare", "u337E", - "mekatakana", "u30E1", - "mekatakanahalfwidth", "uFF92", - "mem", "u05DE", - "memdagesh", "uFB3E", - "memdageshhebrew", "uFB3E", - "memhebrew", "u05DE", - "menarmenian", "u0574", - "merkhahebrew", "u05A5", - "merkhakefulahebrew", "u05A6", - "merkhakefulalefthebrew", "u05A6", - "merkhalefthebrew", "u05A5", - "mhook", "u0271", - "mhzsquare", "u3392", - "middledotkatakanahalfwidth", "uFF65", - "middot", "u00B7", - "mieumacirclekorean", "u3272", - "mieumaparenkorean", "u3212", - "mieumcirclekorean", "u3264", - "mieumkorean", "u3141", - "mieumpansioskorean", "u3170", - "mieumparenkorean", "u3204", - "mieumpieupkorean", "u316E", - "mieumsioskorean", "u316F", - "mihiragana", "u307F", - "mikatakana", "u30DF", - "mikatakanahalfwidth", "uFF90", - "minus", "u2212", - "minusbelowcmb", "u0320", - "minuscircle", "u2296", - "minusmod", "u02D7", - "minusplus", "u2213", - "minute", "u2032", - "miribaarusquare", "u334A", - "mirisquare", "u3349", - "mlonglegturned", "u0270", - "mlsquare", "u3396", - "mmcubedsquare", "u33A3", - "mmonospace", "uFF4D", - "mmsquaredsquare", "u339F", - "mohiragana", "u3082", - "mohmsquare", "u33C1", - "mokatakana", "u30E2", - "mokatakanahalfwidth", "uFF93", - "molsquare", "u33D6", - "momathai", "u0E21", - "moverssquare", "u33A7", - "moverssquaredsquare", "u33A8", - "mparen", "u24A8", - "mpasquare", "u33AB", - "mssquare", "u33B3", - "mturned", "u026F", - "mu", "u00B5", - "mu1", "u00B5", - "muasquare", "u3382", - "muchgreater", "u226B", - "muchless", "u226A", - "mufsquare", "u338C", - "mugreek", "u03BC", - "mugsquare", "u338D", - "muhiragana", "u3080", - "mukatakana", "u30E0", - "mukatakanahalfwidth", "uFF91", - "mulsquare", "u3395", - "multiply", "u00D7", - "mumsquare", "u339B", - "munahhebrew", "u05A3", - "munahlefthebrew", "u05A3", - "musicalnote", "u266A", - "musicalnotedbl", "u266B", - "musicflatsign", "u266D", - "musicsharpsign", "u266F", - "mussquare", "u33B2", - "muvsquare", "u33B6", - "muwsquare", "u33BC", - "mvmegasquare", "u33B9", - "mvsquare", "u33B7", - "mwmegasquare", "u33BF", - "mwsquare", "u33BD", - "n", "u006E", - "nabengali", "u09A8", - "nabla", "u2207", - "nacute", "u0144", - "nadeva", "u0928", - "nagujarati", "u0AA8", - "nagurmukhi", "u0A28", - "nahiragana", "u306A", - "nakatakana", "u30CA", - "nakatakanahalfwidth", "uFF85", - "napostrophe", "u0149", - "nasquare", "u3381", - "nbopomofo", "u310B", - "nbspace", "u00A0", - "ncaron", "u0148", - "ncedilla", "u0146", - "ncircle", "u24DD", - "ncircumflexbelow", "u1E4B", - "ncommaaccent", "u0146", - "ndotaccent", "u1E45", - "ndotbelow", "u1E47", - "nehiragana", "u306D", - "nekatakana", "u30CD", - "nekatakanahalfwidth", "uFF88", - "newsheqelsign", "u20AA", - "nfsquare", "u338B", - "ngabengali", "u0999", - "ngadeva", "u0919", - "ngagujarati", "u0A99", - "ngagurmukhi", "u0A19", - "ngonguthai", "u0E07", - "nhiragana", "u3093", - "nhookleft", "u0272", - "nhookretroflex", "u0273", - "nieunacirclekorean", "u326F", - "nieunaparenkorean", "u320F", - "nieuncieuckorean", "u3135", - "nieuncirclekorean", "u3261", - "nieunhieuhkorean", "u3136", - "nieunkorean", "u3134", - "nieunpansioskorean", "u3168", - "nieunparenkorean", "u3201", - "nieunsioskorean", "u3167", - "nieuntikeutkorean", "u3166", - "nihiragana", "u306B", - "nikatakana", "u30CB", - "nikatakanahalfwidth", "uFF86", - "nikhahitthai", "u0E4D", - "nine", "u0039", - "ninearabic", "u0669", - "ninebengali", "u09EF", - "ninecircle", "u2468", - "ninecircleinversesansserif", "u2792", - "ninedeva", "u096F", - "ninegujarati", "u0AEF", - "ninegurmukhi", "u0A6F", - "ninehackarabic", "u0669", - "ninehangzhou", "u3029", - "nineideographicparen", "u3228", - "nineinferior", "u2089", - "ninemonospace", "uFF19", - "nineparen", "u247C", - "nineperiod", "u2490", - "ninepersian", "u06F9", - "nineroman", "u2178", - "ninesuperior", "u2079", - "nineteencircle", "u2472", - "nineteenparen", "u2486", - "nineteenperiod", "u249A", - "ninethai", "u0E59", - "nj", "u01CC", - "njecyrillic", "u045A", - "nkatakana", "u30F3", - "nkatakanahalfwidth", "uFF9D", - "nlegrightlong", "u019E", - "nlinebelow", "u1E49", - "nmonospace", "uFF4E", - "nmsquare", "u339A", - "nnabengali", "u09A3", - "nnadeva", "u0923", - "nnagujarati", "u0AA3", - "nnagurmukhi", "u0A23", - "nnnadeva", "u0929", - "nohiragana", "u306E", - "nokatakana", "u30CE", - "nokatakanahalfwidth", "uFF89", - "nonbreakingspace", "u00A0", - "nonenthai", "u0E13", - "nonuthai", "u0E19", - "noonarabic", "u0646", - "noonfinalarabic", "uFEE6", - "noonghunnaarabic", "u06BA", - "noonghunnafinalarabic", "uFB9F", - "noonhehinitialarabic", "uFEE7_FEEC", - "nooninitialarabic", "uFEE7", - "noonjeeminitialarabic", "uFCD2", - "noonjeemisolatedarabic", "uFC4B", - "noonmedialarabic", "uFEE8", - "noonmeeminitialarabic", "uFCD5", - "noonmeemisolatedarabic", "uFC4E", - "noonnoonfinalarabic", "uFC8D", - "notcontains", "u220C", - "notelement", "u2209", - "notelementof", "u2209", - "notequal", "u2260", - "notgreater", "u226F", - "notgreaternorequal", "u2271", - "notgreaternorless", "u2279", - "notidentical", "u2262", - "notless", "u226E", - "notlessnorequal", "u2270", - "notparallel", "u2226", - "notprecedes", "u2280", - "notsubset", "u2284", - "notsucceeds", "u2281", - "notsuperset", "u2285", - "nowarmenian", "u0576", - "nparen", "u24A9", - "nssquare", "u33B1", - "nsuperior", "u207F", - "ntilde", "u00F1", - "nu", "u03BD", - "nuhiragana", "u306C", - "nukatakana", "u30CC", - "nukatakanahalfwidth", "uFF87", - "nuktabengali", "u09BC", - "nuktadeva", "u093C", - "nuktagujarati", "u0ABC", - "nuktagurmukhi", "u0A3C", - "numbersign", "u0023", - "numbersignmonospace", "uFF03", - "numbersignsmall", "uFE5F", - "numeralsigngreek", "u0374", - "numeralsignlowergreek", "u0375", - "numero", "u2116", - "nun", "u05E0", - "nundagesh", "uFB40", - "nundageshhebrew", "uFB40", - "nunhebrew", "u05E0", - "nvsquare", "u33B5", - "nwsquare", "u33BB", - "nyabengali", "u099E", - "nyadeva", "u091E", - "nyagujarati", "u0A9E", - "nyagurmukhi", "u0A1E", - "o", "u006F", - "oacute", "u00F3", - "oangthai", "u0E2D", - "obarred", "u0275", - "obarredcyrillic", "u04E9", - "obarreddieresiscyrillic", "u04EB", - "obengali", "u0993", - "obopomofo", "u311B", - "obreve", "u014F", - "ocandradeva", "u0911", - "ocandragujarati", "u0A91", - "ocandravowelsigndeva", "u0949", - "ocandravowelsigngujarati", "u0AC9", - "ocaron", "u01D2", - "ocircle", "u24DE", - "ocircumflex", "u00F4", - "ocircumflexacute", "u1ED1", - "ocircumflexdotbelow", "u1ED9", - "ocircumflexgrave", "u1ED3", - "ocircumflexhookabove", "u1ED5", - "ocircumflextilde", "u1ED7", - "ocyrillic", "u043E", - "odblacute", "u0151", - "odblgrave", "u020D", - "odeva", "u0913", - "odieresis", "u00F6", - "odieresiscyrillic", "u04E7", - "odotbelow", "u1ECD", - "oe", "u0153", - "oekorean", "u315A", - "ogonek", "u02DB", - "ogonekcmb", "u0328", - "ograve", "u00F2", - "ogujarati", "u0A93", - "oharmenian", "u0585", - "ohiragana", "u304A", - "ohookabove", "u1ECF", - "ohorn", "u01A1", - "ohornacute", "u1EDB", - "ohorndotbelow", "u1EE3", - "ohorngrave", "u1EDD", - "ohornhookabove", "u1EDF", - "ohorntilde", "u1EE1", - "ohungarumlaut", "u0151", - "oi", "u01A3", - "oinvertedbreve", "u020F", - "okatakana", "u30AA", - "okatakanahalfwidth", "uFF75", - "okorean", "u3157", - "olehebrew", "u05AB", - "omacron", "u014D", - "omacronacute", "u1E53", - "omacrongrave", "u1E51", - "omdeva", "u0950", - "omega", "u03C9", - "omega1", "u03D6", - "omegacyrillic", "u0461", - "omegalatinclosed", "u0277", - "omegaroundcyrillic", "u047B", - "omegatitlocyrillic", "u047D", - "omegatonos", "u03CE", - "omgujarati", "u0AD0", - "omicron", "u03BF", - "omicrontonos", "u03CC", - "omonospace", "uFF4F", - "one", "u0031", - "onearabic", "u0661", - "onebengali", "u09E7", - "onecircle", "u2460", - "onecircleinversesansserif", "u278A", - "onedeva", "u0967", - "onedotenleader", "u2024", - "oneeighth", "u215B", - "onegujarati", "u0AE7", - "onegurmukhi", "u0A67", - "onehackarabic", "u0661", - "onehalf", "u00BD", - "onehangzhou", "u3021", - "oneideographicparen", "u3220", - "oneinferior", "u2081", - "onemonospace", "uFF11", - "onenumeratorbengali", "u09F4", - "oneparen", "u2474", - "oneperiod", "u2488", - "onepersian", "u06F1", - "onequarter", "u00BC", - "oneroman", "u2170", - "onesuperior", "u00B9", - "onethai", "u0E51", - "onethird", "u2153", - "oogonek", "u01EB", - "oogonekmacron", "u01ED", - "oogurmukhi", "u0A13", - "oomatragurmukhi", "u0A4B", - "oopen", "u0254", - "oparen", "u24AA", - "openbullet", "u25E6", - "option", "u2325", - "ordfeminine", "u00AA", - "ordmasculine", "u00BA", - "orthogonal", "u221F", - "oshortdeva", "u0912", - "oshortvowelsigndeva", "u094A", - "oslash", "u00F8", - "oslashacute", "u01FF", - "osmallhiragana", "u3049", - "osmallkatakana", "u30A9", - "osmallkatakanahalfwidth", "uFF6B", - "ostrokeacute", "u01FF", - "otcyrillic", "u047F", - "otilde", "u00F5", - "otildeacute", "u1E4D", - "otildedieresis", "u1E4F", - "oubopomofo", "u3121", - "overline", "u203E", - "overlinecenterline", "uFE4A", - "overlinecmb", "u0305", - "overlinedashed", "uFE49", - "overlinedblwavy", "uFE4C", - "overlinewavy", "uFE4B", - "overscore", "u00AF", - "ovowelsignbengali", "u09CB", - "ovowelsigndeva", "u094B", - "ovowelsigngujarati", "u0ACB", - "p", "u0070", - "paampssquare", "u3380", - "paasentosquare", "u332B", - "pabengali", "u09AA", - "pacute", "u1E55", - "padeva", "u092A", - "pagedown", "u21DF", - "pageup", "u21DE", - "pagujarati", "u0AAA", - "pagurmukhi", "u0A2A", - "pahiragana", "u3071", - "paiyannoithai", "u0E2F", - "pakatakana", "u30D1", - "palatalizationcyrilliccmb", "u0484", - "palochkacyrillic", "u04C0", - "pansioskorean", "u317F", - "paragraph", "u00B6", - "parallel", "u2225", - "parenleft", "u0028", - "parenleftaltonearabic", "uFD3E", - "parenleftinferior", "u208D", - "parenleftmonospace", "uFF08", - "parenleftsmall", "uFE59", - "parenleftsuperior", "u207D", - "parenleftvertical", "uFE35", - "parenright", "u0029", - "parenrightaltonearabic", "uFD3F", - "parenrightinferior", "u208E", - "parenrightmonospace", "uFF09", - "parenrightsmall", "uFE5A", - "parenrightsuperior", "u207E", - "parenrightvertical", "uFE36", - "partialdiff", "u2202", - "paseqhebrew", "u05C0", - "pashtahebrew", "u0599", - "pasquare", "u33A9", - "patah", "u05B7", - "patah11", "u05B7", - "patah1d", "u05B7", - "patah2a", "u05B7", - "patahhebrew", "u05B7", - "patahnarrowhebrew", "u05B7", - "patahquarterhebrew", "u05B7", - "patahwidehebrew", "u05B7", - "pazerhebrew", "u05A1", - "pbopomofo", "u3106", - "pcircle", "u24DF", - "pdotaccent", "u1E57", - "pe", "u05E4", - "pecyrillic", "u043F", - "pedagesh", "uFB44", - "pedageshhebrew", "uFB44", - "peezisquare", "u333B", - "pefinaldageshhebrew", "uFB43", - "peharabic", "u067E", - "peharmenian", "u057A", - "pehebrew", "u05E4", - "pehfinalarabic", "uFB57", - "pehinitialarabic", "uFB58", - "pehiragana", "u307A", - "pehmedialarabic", "uFB59", - "pekatakana", "u30DA", - "pemiddlehookcyrillic", "u04A7", - "perafehebrew", "uFB4E", - "percent", "u0025", - "percentarabic", "u066A", - "percentmonospace", "uFF05", - "percentsmall", "uFE6A", - "period", "u002E", - "periodarmenian", "u0589", - "periodcentered", "u00B7", - "periodhalfwidth", "uFF61", - "periodmonospace", "uFF0E", - "periodsmall", "uFE52", - "perispomenigreekcmb", "u0342", - "perpendicular", "u22A5", - "perthousand", "u2030", - "peseta", "u20A7", - "pfsquare", "u338A", - "phabengali", "u09AB", - "phadeva", "u092B", - "phagujarati", "u0AAB", - "phagurmukhi", "u0A2B", - "phi", "u03C6", - "phi1", "u03D5", - "phieuphacirclekorean", "u327A", - "phieuphaparenkorean", "u321A", - "phieuphcirclekorean", "u326C", - "phieuphkorean", "u314D", - "phieuphparenkorean", "u320C", - "philatin", "u0278", - "phinthuthai", "u0E3A", - "phisymbolgreek", "u03D5", - "phook", "u01A5", - "phophanthai", "u0E1E", - "phophungthai", "u0E1C", - "phosamphaothai", "u0E20", - "pi", "u03C0", - "pieupacirclekorean", "u3273", - "pieupaparenkorean", "u3213", - "pieupcieuckorean", "u3176", - "pieupcirclekorean", "u3265", - "pieupkiyeokkorean", "u3172", - "pieupkorean", "u3142", - "pieupparenkorean", "u3205", - "pieupsioskiyeokkorean", "u3174", - "pieupsioskorean", "u3144", - "pieupsiostikeutkorean", "u3175", - "pieupthieuthkorean", "u3177", - "pieuptikeutkorean", "u3173", - "pihiragana", "u3074", - "pikatakana", "u30D4", - "pisymbolgreek", "u03D6", - "piwrarmenian", "u0583", - "plus", "u002B", - "plusbelowcmb", "u031F", - "pluscircle", "u2295", - "plusminus", "u00B1", - "plusmod", "u02D6", - "plusmonospace", "uFF0B", - "plussmall", "uFE62", - "plussuperior", "u207A", - "pmonospace", "uFF50", - "pmsquare", "u33D8", - "pohiragana", "u307D", - "pointingindexdownwhite", "u261F", - "pointingindexleftwhite", "u261C", - "pointingindexrightwhite", "u261E", - "pointingindexupwhite", "u261D", - "pokatakana", "u30DD", - "poplathai", "u0E1B", - "postalmark", "u3012", - "postalmarkface", "u3020", - "pparen", "u24AB", - "precedes", "u227A", - "prescription", "u211E", - "primemod", "u02B9", - "primereversed", "u2035", - "product", "u220F", - "projective", "u2305", - "prolongedkana", "u30FC", - "propellor", "u2318", - "propersubset", "u2282", - "propersuperset", "u2283", - "proportion", "u2237", - "proportional", "u221D", - "psi", "u03C8", - "psicyrillic", "u0471", - "psilipneumatacyrilliccmb", "u0486", - "pssquare", "u33B0", - "puhiragana", "u3077", - "pukatakana", "u30D7", - "pvsquare", "u33B4", - "pwsquare", "u33BA", - "q", "u0071", - "qadeva", "u0958", - "qadmahebrew", "u05A8", - "qafarabic", "u0642", - "qaffinalarabic", "uFED6", - "qafinitialarabic", "uFED7", - "qafmedialarabic", "uFED8", - "qamats", "u05B8", - "qamats10", "u05B8", - "qamats1a", "u05B8", - "qamats1c", "u05B8", - "qamats27", "u05B8", - "qamats29", "u05B8", - "qamats33", "u05B8", - "qamatsde", "u05B8", - "qamatshebrew", "u05B8", - "qamatsnarrowhebrew", "u05B8", - "qamatsqatanhebrew", "u05B8", - "qamatsqatannarrowhebrew", "u05B8", - "qamatsqatanquarterhebrew", "u05B8", - "qamatsqatanwidehebrew", "u05B8", - "qamatsquarterhebrew", "u05B8", - "qamatswidehebrew", "u05B8", - "qarneyparahebrew", "u059F", - "qbopomofo", "u3111", - "qcircle", "u24E0", - "qhook", "u02A0", - "qmonospace", "uFF51", - "qof", "u05E7", - "qofdagesh", "uFB47", - "qofdageshhebrew", "uFB47", - "qofhatafpatah", "u05E7_05B2", - "qofhatafpatahhebrew", "u05E7_05B2", - "qofhatafsegol", "u05E7_05B1", - "qofhatafsegolhebrew", "u05E7_05B1", - "qofhebrew", "u05E7", - "qofhiriq", "u05E7_05B4", - "qofhiriqhebrew", "u05E7_05B4", - "qofholam", "u05E7_05B9", - "qofholamhebrew", "u05E7_05B9", - "qofpatah", "u05E7_05B7", - "qofpatahhebrew", "u05E7_05B7", - "qofqamats", "u05E7_05B8", - "qofqamatshebrew", "u05E7_05B8", - "qofqubuts", "u05E7_05BB", - "qofqubutshebrew", "u05E7_05BB", - "qofsegol", "u05E7_05B6", - "qofsegolhebrew", "u05E7_05B6", - "qofsheva", "u05E7_05B0", - "qofshevahebrew", "u05E7_05B0", - "qoftsere", "u05E7_05B5", - "qoftserehebrew", "u05E7_05B5", - "qparen", "u24AC", - "quarternote", "u2669", - "qubuts", "u05BB", - "qubuts18", "u05BB", - "qubuts25", "u05BB", - "qubuts31", "u05BB", - "qubutshebrew", "u05BB", - "qubutsnarrowhebrew", "u05BB", - "qubutsquarterhebrew", "u05BB", - "qubutswidehebrew", "u05BB", - "question", "u003F", - "questionarabic", "u061F", - "questionarmenian", "u055E", - "questiondown", "u00BF", - "questiongreek", "u037E", - "questionmonospace", "uFF1F", - "quotedbl", "u0022", - "quotedblbase", "u201E", - "quotedblleft", "u201C", - "quotedblmonospace", "uFF02", - "quotedblprime", "u301E", - "quotedblprimereversed", "u301D", - "quotedblright", "u201D", - "quoteleft", "u2018", - "quoteleftreversed", "u201B", - "quotereversed", "u201B", - "quoteright", "u2019", - "quoterightn", "u0149", - "quotesinglbase", "u201A", - "quotesingle", "u0027", - "quotesinglemonospace", "uFF07", - "r", "u0072", - "raarmenian", "u057C", - "rabengali", "u09B0", - "racute", "u0155", - "radeva", "u0930", - "radical", "u221A", - "radoverssquare", "u33AE", - "radoverssquaredsquare", "u33AF", - "radsquare", "u33AD", - "rafe", "u05BF", - "rafehebrew", "u05BF", - "ragujarati", "u0AB0", - "ragurmukhi", "u0A30", - "rahiragana", "u3089", - "rakatakana", "u30E9", - "rakatakanahalfwidth", "uFF97", - "ralowerdiagonalbengali", "u09F1", - "ramiddlediagonalbengali", "u09F0", - "ramshorn", "u0264", - "ratio", "u2236", - "rbopomofo", "u3116", - "rcaron", "u0159", - "rcedilla", "u0157", - "rcircle", "u24E1", - "rcommaaccent", "u0157", - "rdblgrave", "u0211", - "rdotaccent", "u1E59", - "rdotbelow", "u1E5B", - "rdotbelowmacron", "u1E5D", - "referencemark", "u203B", - "reflexsubset", "u2286", - "reflexsuperset", "u2287", - "registered", "u00AE", - "reharabic", "u0631", - "reharmenian", "u0580", - "rehfinalarabic", "uFEAE", - "rehiragana", "u308C", - "rehyehaleflamarabic", "u0631_FEF3_FE8E_0644", - "rekatakana", "u30EC", - "rekatakanahalfwidth", "uFF9A", - "resh", "u05E8", - "reshdageshhebrew", "uFB48", - "reshhatafpatah", "u05E8_05B2", - "reshhatafpatahhebrew", "u05E8_05B2", - "reshhatafsegol", "u05E8_05B1", - "reshhatafsegolhebrew", "u05E8_05B1", - "reshhebrew", "u05E8", - "reshhiriq", "u05E8_05B4", - "reshhiriqhebrew", "u05E8_05B4", - "reshholam", "u05E8_05B9", - "reshholamhebrew", "u05E8_05B9", - "reshpatah", "u05E8_05B7", - "reshpatahhebrew", "u05E8_05B7", - "reshqamats", "u05E8_05B8", - "reshqamatshebrew", "u05E8_05B8", - "reshqubuts", "u05E8_05BB", - "reshqubutshebrew", "u05E8_05BB", - "reshsegol", "u05E8_05B6", - "reshsegolhebrew", "u05E8_05B6", - "reshsheva", "u05E8_05B0", - "reshshevahebrew", "u05E8_05B0", - "reshtsere", "u05E8_05B5", - "reshtserehebrew", "u05E8_05B5", - "reversedtilde", "u223D", - "reviahebrew", "u0597", - "reviamugrashhebrew", "u0597", - "revlogicalnot", "u2310", - "rfishhook", "u027E", - "rfishhookreversed", "u027F", - "rhabengali", "u09DD", - "rhadeva", "u095D", - "rho", "u03C1", - "rhook", "u027D", - "rhookturned", "u027B", - "rhookturnedsuperior", "u02B5", - "rhosymbolgreek", "u03F1", - "rhotichookmod", "u02DE", - "rieulacirclekorean", "u3271", - "rieulaparenkorean", "u3211", - "rieulcirclekorean", "u3263", - "rieulhieuhkorean", "u3140", - "rieulkiyeokkorean", "u313A", - "rieulkiyeoksioskorean", "u3169", - "rieulkorean", "u3139", - "rieulmieumkorean", "u313B", - "rieulpansioskorean", "u316C", - "rieulparenkorean", "u3203", - "rieulphieuphkorean", "u313F", - "rieulpieupkorean", "u313C", - "rieulpieupsioskorean", "u316B", - "rieulsioskorean", "u313D", - "rieulthieuthkorean", "u313E", - "rieultikeutkorean", "u316A", - "rieulyeorinhieuhkorean", "u316D", - "rightangle", "u221F", - "righttackbelowcmb", "u0319", - "righttriangle", "u22BF", - "rihiragana", "u308A", - "rikatakana", "u30EA", - "rikatakanahalfwidth", "uFF98", - "ring", "u02DA", - "ringbelowcmb", "u0325", - "ringcmb", "u030A", - "ringhalfleft", "u02BF", - "ringhalfleftarmenian", "u0559", - "ringhalfleftbelowcmb", "u031C", - "ringhalfleftcentered", "u02D3", - "ringhalfright", "u02BE", - "ringhalfrightbelowcmb", "u0339", - "ringhalfrightcentered", "u02D2", - "rinvertedbreve", "u0213", - "rittorusquare", "u3351", - "rlinebelow", "u1E5F", - "rlongleg", "u027C", - "rlonglegturned", "u027A", - "rmonospace", "uFF52", - "rohiragana", "u308D", - "rokatakana", "u30ED", - "rokatakanahalfwidth", "uFF9B", - "roruathai", "u0E23", - "rparen", "u24AD", - "rrabengali", "u09DC", - "rradeva", "u0931", - "rragurmukhi", "u0A5C", - "rreharabic", "u0691", - "rrehfinalarabic", "uFB8D", - "rrvocalicbengali", "u09E0", - "rrvocalicdeva", "u0960", - "rrvocalicgujarati", "u0AE0", - "rrvocalicvowelsignbengali", "u09C4", - "rrvocalicvowelsigndeva", "u0944", - "rrvocalicvowelsigngujarati", "u0AC4", - "rtblock", "u2590", - "rturned", "u0279", - "rturnedsuperior", "u02B4", - "ruhiragana", "u308B", - "rukatakana", "u30EB", - "rukatakanahalfwidth", "uFF99", - "rupeemarkbengali", "u09F2", - "rupeesignbengali", "u09F3", - "ruthai", "u0E24", - "rvocalicbengali", "u098B", - "rvocalicdeva", "u090B", - "rvocalicgujarati", "u0A8B", - "rvocalicvowelsignbengali", "u09C3", - "rvocalicvowelsigndeva", "u0943", - "rvocalicvowelsigngujarati", "u0AC3", - "s", "u0073", - "sabengali", "u09B8", - "sacute", "u015B", - "sacutedotaccent", "u1E65", - "sadarabic", "u0635", - "sadeva", "u0938", - "sadfinalarabic", "uFEBA", - "sadinitialarabic", "uFEBB", - "sadmedialarabic", "uFEBC", - "sagujarati", "u0AB8", - "sagurmukhi", "u0A38", - "sahiragana", "u3055", - "sakatakana", "u30B5", - "sakatakanahalfwidth", "uFF7B", - "sallallahoualayhewasallamarabic", "uFDFA", - "samekh", "u05E1", - "samekhdagesh", "uFB41", - "samekhdageshhebrew", "uFB41", - "samekhhebrew", "u05E1", - "saraaathai", "u0E32", - "saraaethai", "u0E41", - "saraaimaimalaithai", "u0E44", - "saraaimaimuanthai", "u0E43", - "saraamthai", "u0E33", - "saraathai", "u0E30", - "saraethai", "u0E40", - "saraiithai", "u0E35", - "saraithai", "u0E34", - "saraothai", "u0E42", - "saraueethai", "u0E37", - "sarauethai", "u0E36", - "sarauthai", "u0E38", - "sarauuthai", "u0E39", - "sbopomofo", "u3119", - "scaron", "u0161", - "scarondotaccent", "u1E67", - "scedilla", "u015F", - "schwa", "u0259", - "schwacyrillic", "u04D9", - "schwadieresiscyrillic", "u04DB", - "schwahook", "u025A", - "scircle", "u24E2", - "scircumflex", "u015D", - "scommaaccent", "u0219", - "sdotaccent", "u1E61", - "sdotbelow", "u1E63", - "sdotbelowdotaccent", "u1E69", - "seagullbelowcmb", "u033C", - "second", "u2033", - "secondtonechinese", "u02CA", - "section", "u00A7", - "seenarabic", "u0633", - "seenfinalarabic", "uFEB2", - "seeninitialarabic", "uFEB3", - "seenmedialarabic", "uFEB4", - "segol", "u05B6", - "segol13", "u05B6", - "segol1f", "u05B6", - "segol2c", "u05B6", - "segolhebrew", "u05B6", - "segolnarrowhebrew", "u05B6", - "segolquarterhebrew", "u05B6", - "segoltahebrew", "u0592", - "segolwidehebrew", "u05B6", - "seharmenian", "u057D", - "sehiragana", "u305B", - "sekatakana", "u30BB", - "sekatakanahalfwidth", "uFF7E", - "semicolon", "u003B", - "semicolonarabic", "u061B", - "semicolonmonospace", "uFF1B", - "semicolonsmall", "uFE54", - "semivoicedmarkkana", "u309C", - "semivoicedmarkkanahalfwidth", "uFF9F", - "sentisquare", "u3322", - "sentosquare", "u3323", - "seven", "u0037", - "sevenarabic", "u0667", - "sevenbengali", "u09ED", - "sevencircle", "u2466", - "sevencircleinversesansserif", "u2790", - "sevendeva", "u096D", - "seveneighths", "u215E", - "sevengujarati", "u0AED", - "sevengurmukhi", "u0A6D", - "sevenhackarabic", "u0667", - "sevenhangzhou", "u3027", - "sevenideographicparen", "u3226", - "seveninferior", "u2087", - "sevenmonospace", "uFF17", - "sevenparen", "u247A", - "sevenperiod", "u248E", - "sevenpersian", "u06F7", - "sevenroman", "u2176", - "sevensuperior", "u2077", - "seventeencircle", "u2470", - "seventeenparen", "u2484", - "seventeenperiod", "u2498", - "seventhai", "u0E57", - "sfthyphen", "u00AD", - "shaarmenian", "u0577", - "shabengali", "u09B6", - "shacyrillic", "u0448", - "shaddaarabic", "u0651", - "shaddadammaarabic", "uFC61", - "shaddadammatanarabic", "uFC5E", - "shaddafathaarabic", "uFC60", - "shaddafathatanarabic", "u0651_064B", - "shaddakasraarabic", "uFC62", - "shaddakasratanarabic", "uFC5F", - "shade", "u2592", - "shadedark", "u2593", - "shadelight", "u2591", - "shademedium", "u2592", - "shadeva", "u0936", - "shagujarati", "u0AB6", - "shagurmukhi", "u0A36", - "shalshelethebrew", "u0593", - "shbopomofo", "u3115", - "shchacyrillic", "u0449", - "sheenarabic", "u0634", - "sheenfinalarabic", "uFEB6", - "sheeninitialarabic", "uFEB7", - "sheenmedialarabic", "uFEB8", - "sheicoptic", "u03E3", - "sheqel", "u20AA", - "sheqelhebrew", "u20AA", - "sheva", "u05B0", - "sheva115", "u05B0", - "sheva15", "u05B0", - "sheva22", "u05B0", - "sheva2e", "u05B0", - "shevahebrew", "u05B0", - "shevanarrowhebrew", "u05B0", - "shevaquarterhebrew", "u05B0", - "shevawidehebrew", "u05B0", - "shhacyrillic", "u04BB", - "shimacoptic", "u03ED", - "shin", "u05E9", - "shindagesh", "uFB49", - "shindageshhebrew", "uFB49", - "shindageshshindot", "uFB2C", - "shindageshshindothebrew", "uFB2C", - "shindageshsindot", "uFB2D", - "shindageshsindothebrew", "uFB2D", - "shindothebrew", "u05C1", - "shinhebrew", "u05E9", - "shinshindot", "uFB2A", - "shinshindothebrew", "uFB2A", - "shinsindot", "uFB2B", - "shinsindothebrew", "uFB2B", - "shook", "u0282", - "sigma", "u03C3", - "sigma1", "u03C2", - "sigmafinal", "u03C2", - "sigmalunatesymbolgreek", "u03F2", - "sihiragana", "u3057", - "sikatakana", "u30B7", - "sikatakanahalfwidth", "uFF7C", - "siluqhebrew", "u05BD", - "siluqlefthebrew", "u05BD", - "similar", "u223C", - "sindothebrew", "u05C2", - "siosacirclekorean", "u3274", - "siosaparenkorean", "u3214", - "sioscieuckorean", "u317E", - "sioscirclekorean", "u3266", - "sioskiyeokkorean", "u317A", - "sioskorean", "u3145", - "siosnieunkorean", "u317B", - "siosparenkorean", "u3206", - "siospieupkorean", "u317D", - "siostikeutkorean", "u317C", - "six", "u0036", - "sixarabic", "u0666", - "sixbengali", "u09EC", - "sixcircle", "u2465", - "sixcircleinversesansserif", "u278F", - "sixdeva", "u096C", - "sixgujarati", "u0AEC", - "sixgurmukhi", "u0A6C", - "sixhackarabic", "u0666", - "sixhangzhou", "u3026", - "sixideographicparen", "u3225", - "sixinferior", "u2086", - "sixmonospace", "uFF16", - "sixparen", "u2479", - "sixperiod", "u248D", - "sixpersian", "u06F6", - "sixroman", "u2175", - "sixsuperior", "u2076", - "sixteencircle", "u246F", - "sixteencurrencydenominatorbengali", "u09F9", - "sixteenparen", "u2483", - "sixteenperiod", "u2497", - "sixthai", "u0E56", - "slash", "u002F", - "slashmonospace", "uFF0F", - "slong", "u017F", - "slongdotaccent", "u1E9B", - "smileface", "u263A", - "smonospace", "uFF53", - "sofpasuqhebrew", "u05C3", - "softhyphen", "u00AD", - "softsigncyrillic", "u044C", - "sohiragana", "u305D", - "sokatakana", "u30BD", - "sokatakanahalfwidth", "uFF7F", - "soliduslongoverlaycmb", "u0338", - "solidusshortoverlaycmb", "u0337", - "sorusithai", "u0E29", - "sosalathai", "u0E28", - "sosothai", "u0E0B", - "sosuathai", "u0E2A", - "space", "u0020", - "spacehackarabic", "u0020", - "spade", "u2660", - "spadesuitblack", "u2660", - "spadesuitwhite", "u2664", - "sparen", "u24AE", - "squarebelowcmb", "u033B", - "squarecc", "u33C4", - "squarecm", "u339D", - "squarediagonalcrosshatchfill", "u25A9", - "squarehorizontalfill", "u25A4", - "squarekg", "u338F", - "squarekm", "u339E", - "squarekmcapital", "u33CE", - "squareln", "u33D1", - "squarelog", "u33D2", - "squaremg", "u338E", - "squaremil", "u33D5", - "squaremm", "u339C", - "squaremsquared", "u33A1", - "squareorthogonalcrosshatchfill", "u25A6", - "squareupperlefttolowerrightfill", "u25A7", - "squareupperrighttolowerleftfill", "u25A8", - "squareverticalfill", "u25A5", - "squarewhitewithsmallblack", "u25A3", - "srsquare", "u33DB", - "ssabengali", "u09B7", - "ssadeva", "u0937", - "ssagujarati", "u0AB7", - "ssangcieuckorean", "u3149", - "ssanghieuhkorean", "u3185", - "ssangieungkorean", "u3180", - "ssangkiyeokkorean", "u3132", - "ssangnieunkorean", "u3165", - "ssangpieupkorean", "u3143", - "ssangsioskorean", "u3146", - "ssangtikeutkorean", "u3138", - "sterling", "u00A3", - "sterlingmonospace", "uFFE1", - "strokelongoverlaycmb", "u0336", - "strokeshortoverlaycmb", "u0335", - "subset", "u2282", - "subsetnotequal", "u228A", - "subsetorequal", "u2286", - "succeeds", "u227B", - "suchthat", "u220B", - "suhiragana", "u3059", - "sukatakana", "u30B9", - "sukatakanahalfwidth", "uFF7D", - "sukunarabic", "u0652", - "summation", "u2211", - "sun", "u263C", - "superset", "u2283", - "supersetnotequal", "u228B", - "supersetorequal", "u2287", - "svsquare", "u33DC", - "syouwaerasquare", "u337C", - "t", "u0074", - "tabengali", "u09A4", - "tackdown", "u22A4", - "tackleft", "u22A3", - "tadeva", "u0924", - "tagujarati", "u0AA4", - "tagurmukhi", "u0A24", - "taharabic", "u0637", - "tahfinalarabic", "uFEC2", - "tahinitialarabic", "uFEC3", - "tahiragana", "u305F", - "tahmedialarabic", "uFEC4", - "taisyouerasquare", "u337D", - "takatakana", "u30BF", - "takatakanahalfwidth", "uFF80", - "tatweelarabic", "u0640", - "tau", "u03C4", - "tav", "u05EA", - "tavdages", "uFB4A", - "tavdagesh", "uFB4A", - "tavdageshhebrew", "uFB4A", - "tavhebrew", "u05EA", - "tbar", "u0167", - "tbopomofo", "u310A", - "tcaron", "u0165", - "tccurl", "u02A8", - "tcedilla", "u0163", - "tcheharabic", "u0686", - "tchehfinalarabic", "uFB7B", - "tchehinitialarabic", "uFB7C", - "tchehmedialarabic", "uFB7D", - "tchehmeeminitialarabic", "uFB7C_FEE4", - "tcircle", "u24E3", - "tcircumflexbelow", "u1E71", - "tcommaaccent", "u0163", - "tdieresis", "u1E97", - "tdotaccent", "u1E6B", - "tdotbelow", "u1E6D", - "tecyrillic", "u0442", - "tedescendercyrillic", "u04AD", - "teharabic", "u062A", - "tehfinalarabic", "uFE96", - "tehhahinitialarabic", "uFCA2", - "tehhahisolatedarabic", "uFC0C", - "tehinitialarabic", "uFE97", - "tehiragana", "u3066", - "tehjeeminitialarabic", "uFCA1", - "tehjeemisolatedarabic", "uFC0B", - "tehmarbutaarabic", "u0629", - "tehmarbutafinalarabic", "uFE94", - "tehmedialarabic", "uFE98", - "tehmeeminitialarabic", "uFCA4", - "tehmeemisolatedarabic", "uFC0E", - "tehnoonfinalarabic", "uFC73", - "tekatakana", "u30C6", - "tekatakanahalfwidth", "uFF83", - "telephone", "u2121", - "telephoneblack", "u260E", - "telishagedolahebrew", "u05A0", - "telishaqetanahebrew", "u05A9", - "tencircle", "u2469", - "tenideographicparen", "u3229", - "tenparen", "u247D", - "tenperiod", "u2491", - "tenroman", "u2179", - "tesh", "u02A7", - "tet", "u05D8", - "tetdagesh", "uFB38", - "tetdageshhebrew", "uFB38", - "tethebrew", "u05D8", - "tetsecyrillic", "u04B5", - "tevirhebrew", "u059B", - "tevirlefthebrew", "u059B", - "thabengali", "u09A5", - "thadeva", "u0925", - "thagujarati", "u0AA5", - "thagurmukhi", "u0A25", - "thalarabic", "u0630", - "thalfinalarabic", "uFEAC", - "thanthakhatthai", "u0E4C", - "theharabic", "u062B", - "thehfinalarabic", "uFE9A", - "thehinitialarabic", "uFE9B", - "thehmedialarabic", "uFE9C", - "thereexists", "u2203", - "therefore", "u2234", - "theta", "u03B8", - "theta1", "u03D1", - "thetasymbolgreek", "u03D1", - "thieuthacirclekorean", "u3279", - "thieuthaparenkorean", "u3219", - "thieuthcirclekorean", "u326B", - "thieuthkorean", "u314C", - "thieuthparenkorean", "u320B", - "thirteencircle", "u246C", - "thirteenparen", "u2480", - "thirteenperiod", "u2494", - "thonangmonthothai", "u0E11", - "thook", "u01AD", - "thophuthaothai", "u0E12", - "thorn", "u00FE", - "thothahanthai", "u0E17", - "thothanthai", "u0E10", - "thothongthai", "u0E18", - "thothungthai", "u0E16", - "thousandcyrillic", "u0482", - "thousandsseparatorarabic", "u066C", - "thousandsseparatorpersian", "u066C", - "three", "u0033", - "threearabic", "u0663", - "threebengali", "u09E9", - "threecircle", "u2462", - "threecircleinversesansserif", "u278C", - "threedeva", "u0969", - "threeeighths", "u215C", - "threegujarati", "u0AE9", - "threegurmukhi", "u0A69", - "threehackarabic", "u0663", - "threehangzhou", "u3023", - "threeideographicparen", "u3222", - "threeinferior", "u2083", - "threemonospace", "uFF13", - "threenumeratorbengali", "u09F6", - "threeparen", "u2476", - "threeperiod", "u248A", - "threepersian", "u06F3", - "threequarters", "u00BE", - "threeroman", "u2172", - "threesuperior", "u00B3", - "threethai", "u0E53", - "thzsquare", "u3394", - "tihiragana", "u3061", - "tikatakana", "u30C1", - "tikatakanahalfwidth", "uFF81", - "tikeutacirclekorean", "u3270", - "tikeutaparenkorean", "u3210", - "tikeutcirclekorean", "u3262", - "tikeutkorean", "u3137", - "tikeutparenkorean", "u3202", - "tilde", "u02DC", - "tildebelowcmb", "u0330", - "tildecmb", "u0303", - "tildecomb", "u0303", - "tildedoublecmb", "u0360", - "tildeoperator", "u223C", - "tildeoverlaycmb", "u0334", - "tildeverticalcmb", "u033E", - "timescircle", "u2297", - "tipehahebrew", "u0596", - "tipehalefthebrew", "u0596", - "tippigurmukhi", "u0A70", - "titlocyrilliccmb", "u0483", - "tiwnarmenian", "u057F", - "tlinebelow", "u1E6F", - "tmonospace", "uFF54", - "toarmenian", "u0569", - "tohiragana", "u3068", - "tokatakana", "u30C8", - "tokatakanahalfwidth", "uFF84", - "tonebarextrahighmod", "u02E5", - "tonebarextralowmod", "u02E9", - "tonebarhighmod", "u02E6", - "tonebarlowmod", "u02E8", - "tonebarmidmod", "u02E7", - "tonefive", "u01BD", - "tonesix", "u0185", - "tonetwo", "u01A8", - "tonos", "u0384", - "tonsquare", "u3327", - "topatakthai", "u0E0F", - "tortoiseshellbracketleft", "u3014", - "tortoiseshellbracketleftsmall", "uFE5D", - "tortoiseshellbracketleftvertical", "uFE39", - "tortoiseshellbracketright", "u3015", - "tortoiseshellbracketrightsmall", "uFE5E", - "tortoiseshellbracketrightvertical", "uFE3A", - "totaothai", "u0E15", - "tpalatalhook", "u01AB", - "tparen", "u24AF", - "trademark", "u2122", - "tretroflexhook", "u0288", - "triagdn", "u25BC", - "triaglf", "u25C4", - "triagrt", "u25BA", - "triagup", "u25B2", - "ts", "u02A6", - "tsadi", "u05E6", - "tsadidagesh", "uFB46", - "tsadidageshhebrew", "uFB46", - "tsadihebrew", "u05E6", - "tsecyrillic", "u0446", - "tsere", "u05B5", - "tsere12", "u05B5", - "tsere1e", "u05B5", - "tsere2b", "u05B5", - "tserehebrew", "u05B5", - "tserenarrowhebrew", "u05B5", - "tserequarterhebrew", "u05B5", - "tserewidehebrew", "u05B5", - "tshecyrillic", "u045B", - "ttabengali", "u099F", - "ttadeva", "u091F", - "ttagujarati", "u0A9F", - "ttagurmukhi", "u0A1F", - "tteharabic", "u0679", - "ttehfinalarabic", "uFB67", - "ttehinitialarabic", "uFB68", - "ttehmedialarabic", "uFB69", - "tthabengali", "u09A0", - "tthadeva", "u0920", - "tthagujarati", "u0AA0", - "tthagurmukhi", "u0A20", - "tturned", "u0287", - "tuhiragana", "u3064", - "tukatakana", "u30C4", - "tukatakanahalfwidth", "uFF82", - "tusmallhiragana", "u3063", - "tusmallkatakana", "u30C3", - "tusmallkatakanahalfwidth", "uFF6F", - "twelvecircle", "u246B", - "twelveparen", "u247F", - "twelveperiod", "u2493", - "twelveroman", "u217B", - "twentycircle", "u2473", - "twentyhangzhou", "u5344", - "twentyparen", "u2487", - "twentyperiod", "u249B", - "two", "u0032", - "twoarabic", "u0662", - "twobengali", "u09E8", - "twocircle", "u2461", - "twocircleinversesansserif", "u278B", - "twodeva", "u0968", - "twodotenleader", "u2025", - "twodotleader", "u2025", - "twodotleadervertical", "uFE30", - "twogujarati", "u0AE8", - "twogurmukhi", "u0A68", - "twohackarabic", "u0662", - "twohangzhou", "u3022", - "twoideographicparen", "u3221", - "twoinferior", "u2082", - "twomonospace", "uFF12", - "twonumeratorbengali", "u09F5", - "twoparen", "u2475", - "twoperiod", "u2489", - "twopersian", "u06F2", - "tworoman", "u2171", - "twostroke", "u01BB", - "twosuperior", "u00B2", - "twothai", "u0E52", - "twothirds", "u2154", - "u", "u0075", - "uacute", "u00FA", - "ubar", "u0289", - "ubengali", "u0989", - "ubopomofo", "u3128", - "ubreve", "u016D", - "ucaron", "u01D4", - "ucircle", "u24E4", - "ucircumflex", "u00FB", - "ucircumflexbelow", "u1E77", - "ucyrillic", "u0443", - "udattadeva", "u0951", - "udblacute", "u0171", - "udblgrave", "u0215", - "udeva", "u0909", - "udieresis", "u00FC", - "udieresisacute", "u01D8", - "udieresisbelow", "u1E73", - "udieresiscaron", "u01DA", - "udieresiscyrillic", "u04F1", - "udieresisgrave", "u01DC", - "udieresismacron", "u01D6", - "udotbelow", "u1EE5", - "ugrave", "u00F9", - "ugujarati", "u0A89", - "ugurmukhi", "u0A09", - "uhiragana", "u3046", - "uhookabove", "u1EE7", - "uhorn", "u01B0", - "uhornacute", "u1EE9", - "uhorndotbelow", "u1EF1", - "uhorngrave", "u1EEB", - "uhornhookabove", "u1EED", - "uhorntilde", "u1EEF", - "uhungarumlaut", "u0171", - "uhungarumlautcyrillic", "u04F3", - "uinvertedbreve", "u0217", - "ukatakana", "u30A6", - "ukatakanahalfwidth", "uFF73", - "ukcyrillic", "u0479", - "ukorean", "u315C", - "umacron", "u016B", - "umacroncyrillic", "u04EF", - "umacrondieresis", "u1E7B", - "umatragurmukhi", "u0A41", - "umonospace", "uFF55", - "underscore", "u005F", - "underscoredbl", "u2017", - "underscoremonospace", "uFF3F", - "underscorevertical", "uFE33", - "underscorewavy", "uFE4F", - "union", "u222A", - "universal", "u2200", - "uogonek", "u0173", - "uparen", "u24B0", - "upblock", "u2580", - "upperdothebrew", "u05C4", - "upsilon", "u03C5", - "upsilondieresis", "u03CB", - "upsilondieresistonos", "u03B0", - "upsilonlatin", "u028A", - "upsilontonos", "u03CD", - "uptackbelowcmb", "u031D", - "uptackmod", "u02D4", - "uragurmukhi", "u0A73", - "uring", "u016F", - "ushortcyrillic", "u045E", - "usmallhiragana", "u3045", - "usmallkatakana", "u30A5", - "usmallkatakanahalfwidth", "uFF69", - "ustraightcyrillic", "u04AF", - "ustraightstrokecyrillic", "u04B1", - "utilde", "u0169", - "utildeacute", "u1E79", - "utildebelow", "u1E75", - "uubengali", "u098A", - "uudeva", "u090A", - "uugujarati", "u0A8A", - "uugurmukhi", "u0A0A", - "uumatragurmukhi", "u0A42", - "uuvowelsignbengali", "u09C2", - "uuvowelsigndeva", "u0942", - "uuvowelsigngujarati", "u0AC2", - "uvowelsignbengali", "u09C1", - "uvowelsigndeva", "u0941", - "uvowelsigngujarati", "u0AC1", - "v", "u0076", - "vadeva", "u0935", - "vagujarati", "u0AB5", - "vagurmukhi", "u0A35", - "vakatakana", "u30F7", - "vav", "u05D5", - "vavdagesh", "uFB35", - "vavdagesh65", "uFB35", - "vavdageshhebrew", "uFB35", - "vavhebrew", "u05D5", - "vavholam", "uFB4B", - "vavholamhebrew", "uFB4B", - "vavvavhebrew", "u05F0", - "vavyodhebrew", "u05F1", - "vcircle", "u24E5", - "vdotbelow", "u1E7F", - "vecyrillic", "u0432", - "veharabic", "u06A4", - "vehfinalarabic", "uFB6B", - "vehinitialarabic", "uFB6C", - "vehmedialarabic", "uFB6D", - "vekatakana", "u30F9", - "venus", "u2640", - "verticalbar", "u007C", - "verticallineabovecmb", "u030D", - "verticallinebelowcmb", "u0329", - "verticallinelowmod", "u02CC", - "verticallinemod", "u02C8", - "vewarmenian", "u057E", - "vhook", "u028B", - "vikatakana", "u30F8", - "viramabengali", "u09CD", - "viramadeva", "u094D", - "viramagujarati", "u0ACD", - "visargabengali", "u0983", - "visargadeva", "u0903", - "visargagujarati", "u0A83", - "vmonospace", "uFF56", - "voarmenian", "u0578", - "voicediterationhiragana", "u309E", - "voicediterationkatakana", "u30FE", - "voicedmarkkana", "u309B", - "voicedmarkkanahalfwidth", "uFF9E", - "vokatakana", "u30FA", - "vparen", "u24B1", - "vtilde", "u1E7D", - "vturned", "u028C", - "vuhiragana", "u3094", - "vukatakana", "u30F4", - "w", "u0077", - "wacute", "u1E83", - "waekorean", "u3159", - "wahiragana", "u308F", - "wakatakana", "u30EF", - "wakatakanahalfwidth", "uFF9C", - "wakorean", "u3158", - "wasmallhiragana", "u308E", - "wasmallkatakana", "u30EE", - "wattosquare", "u3357", - "wavedash", "u301C", - "wavyunderscorevertical", "uFE34", - "wawarabic", "u0648", - "wawfinalarabic", "uFEEE", - "wawhamzaabovearabic", "u0624", - "wawhamzaabovefinalarabic", "uFE86", - "wbsquare", "u33DD", - "wcircle", "u24E6", - "wcircumflex", "u0175", - "wdieresis", "u1E85", - "wdotaccent", "u1E87", - "wdotbelow", "u1E89", - "wehiragana", "u3091", - "weierstrass", "u2118", - "wekatakana", "u30F1", - "wekorean", "u315E", - "weokorean", "u315D", - "wgrave", "u1E81", - "whitebullet", "u25E6", - "whitecircle", "u25CB", - "whitecircleinverse", "u25D9", - "whitecornerbracketleft", "u300E", - "whitecornerbracketleftvertical", "uFE43", - "whitecornerbracketright", "u300F", - "whitecornerbracketrightvertical", "uFE44", - "whitediamond", "u25C7", - "whitediamondcontainingblacksmalldiamond", "u25C8", - "whitedownpointingsmalltriangle", "u25BF", - "whitedownpointingtriangle", "u25BD", - "whiteleftpointingsmalltriangle", "u25C3", - "whiteleftpointingtriangle", "u25C1", - "whitelenticularbracketleft", "u3016", - "whitelenticularbracketright", "u3017", - "whiterightpointingsmalltriangle", "u25B9", - "whiterightpointingtriangle", "u25B7", - "whitesmallsquare", "u25AB", - "whitesmilingface", "u263A", - "whitesquare", "u25A1", - "whitestar", "u2606", - "whitetelephone", "u260F", - "whitetortoiseshellbracketleft", "u3018", - "whitetortoiseshellbracketright", "u3019", - "whiteuppointingsmalltriangle", "u25B5", - "whiteuppointingtriangle", "u25B3", - "wihiragana", "u3090", - "wikatakana", "u30F0", - "wikorean", "u315F", - "wmonospace", "uFF57", - "wohiragana", "u3092", - "wokatakana", "u30F2", - "wokatakanahalfwidth", "uFF66", - "won", "u20A9", - "wonmonospace", "uFFE6", - "wowaenthai", "u0E27", - "wparen", "u24B2", - "wring", "u1E98", - "wsuperior", "u02B7", - "wturned", "u028D", - "wynn", "u01BF", - "x", "u0078", - "xabovecmb", "u033D", - "xbopomofo", "u3112", - "xcircle", "u24E7", - "xdieresis", "u1E8D", - "xdotaccent", "u1E8B", - "xeharmenian", "u056D", - "xi", "u03BE", - "xmonospace", "uFF58", - "xparen", "u24B3", - "xsuperior", "u02E3", - "y", "u0079", - "yaadosquare", "u334E", - "yabengali", "u09AF", - "yacute", "u00FD", - "yadeva", "u092F", - "yaekorean", "u3152", - "yagujarati", "u0AAF", - "yagurmukhi", "u0A2F", - "yahiragana", "u3084", - "yakatakana", "u30E4", - "yakatakanahalfwidth", "uFF94", - "yakorean", "u3151", - "yamakkanthai", "u0E4E", - "yasmallhiragana", "u3083", - "yasmallkatakana", "u30E3", - "yasmallkatakanahalfwidth", "uFF6C", - "yatcyrillic", "u0463", - "ycircle", "u24E8", - "ycircumflex", "u0177", - "ydieresis", "u00FF", - "ydotaccent", "u1E8F", - "ydotbelow", "u1EF5", - "yeharabic", "u064A", - "yehbarreearabic", "u06D2", - "yehbarreefinalarabic", "uFBAF", - "yehfinalarabic", "uFEF2", - "yehhamzaabovearabic", "u0626", - "yehhamzaabovefinalarabic", "uFE8A", - "yehhamzaaboveinitialarabic", "uFE8B", - "yehhamzaabovemedialarabic", "uFE8C", - "yehinitialarabic", "uFEF3", - "yehmedialarabic", "uFEF4", - "yehmeeminitialarabic", "uFCDD", - "yehmeemisolatedarabic", "uFC58", - "yehnoonfinalarabic", "uFC94", - "yehthreedotsbelowarabic", "u06D1", - "yekorean", "u3156", - "yen", "u00A5", - "yenmonospace", "uFFE5", - "yeokorean", "u3155", - "yeorinhieuhkorean", "u3186", - "yerahbenyomohebrew", "u05AA", - "yerahbenyomolefthebrew", "u05AA", - "yericyrillic", "u044B", - "yerudieresiscyrillic", "u04F9", - "yesieungkorean", "u3181", - "yesieungpansioskorean", "u3183", - "yesieungsioskorean", "u3182", - "yetivhebrew", "u059A", - "ygrave", "u1EF3", - "yhook", "u01B4", - "yhookabove", "u1EF7", - "yiarmenian", "u0575", - "yicyrillic", "u0457", - "yikorean", "u3162", - "yinyang", "u262F", - "yiwnarmenian", "u0582", - "ymonospace", "uFF59", - "yod", "u05D9", - "yoddagesh", "uFB39", - "yoddageshhebrew", "uFB39", - "yodhebrew", "u05D9", - "yodyodhebrew", "u05F2", - "yodyodpatahhebrew", "uFB1F", - "yohiragana", "u3088", - "yoikorean", "u3189", - "yokatakana", "u30E8", - "yokatakanahalfwidth", "uFF96", - "yokorean", "u315B", - "yosmallhiragana", "u3087", - "yosmallkatakana", "u30E7", - "yosmallkatakanahalfwidth", "uFF6E", - "yotgreek", "u03F3", - "yoyaekorean", "u3188", - "yoyakorean", "u3187", - "yoyakthai", "u0E22", - "yoyingthai", "u0E0D", - "yparen", "u24B4", - "ypogegrammeni", "u037A", - "ypogegrammenigreekcmb", "u0345", - "yr", "u01A6", - "yring", "u1E99", - "ysuperior", "u02B8", - "ytilde", "u1EF9", - "yturned", "u028E", - "yuhiragana", "u3086", - "yuikorean", "u318C", - "yukatakana", "u30E6", - "yukatakanahalfwidth", "uFF95", - "yukorean", "u3160", - "yusbigcyrillic", "u046B", - "yusbigiotifiedcyrillic", "u046D", - "yuslittlecyrillic", "u0467", - "yuslittleiotifiedcyrillic", "u0469", - "yusmallhiragana", "u3085", - "yusmallkatakana", "u30E5", - "yusmallkatakanahalfwidth", "uFF6D", - "yuyekorean", "u318B", - "yuyeokorean", "u318A", - "yyabengali", "u09DF", - "yyadeva", "u095F", - "z", "u007A", - "zaarmenian", "u0566", - "zacute", "u017A", - "zadeva", "u095B", - "zagurmukhi", "u0A5B", - "zaharabic", "u0638", - "zahfinalarabic", "uFEC6", - "zahinitialarabic", "uFEC7", - "zahiragana", "u3056", - "zahmedialarabic", "uFEC8", - "zainarabic", "u0632", - "zainfinalarabic", "uFEB0", - "zakatakana", "u30B6", - "zaqefgadolhebrew", "u0595", - "zaqefqatanhebrew", "u0594", - "zarqahebrew", "u0598", - "zayin", "u05D6", - "zayindagesh", "uFB36", - "zayindageshhebrew", "uFB36", - "zayinhebrew", "u05D6", - "zbopomofo", "u3117", - "zcaron", "u017E", - "zcircle", "u24E9", - "zcircumflex", "u1E91", - "zcurl", "u0291", - "zdot", "u017C", - "zdotaccent", "u017C", - "zdotbelow", "u1E93", - "zecyrillic", "u0437", - "zedescendercyrillic", "u0499", - "zedieresiscyrillic", "u04DF", - "zehiragana", "u305C", - "zekatakana", "u30BC", - "zero", "u0030", - "zeroarabic", "u0660", - "zerobengali", "u09E6", - "zerodeva", "u0966", - "zerogujarati", "u0AE6", - "zerogurmukhi", "u0A66", - "zerohackarabic", "u0660", - "zeroinferior", "u2080", - "zeromonospace", "uFF10", - "zeropersian", "u06F0", - "zerosuperior", "u2070", - "zerothai", "u0E50", - "zerowidthjoiner", "uFEFF", - "zerowidthnonjoiner", "u200C", - "zerowidthspace", "u200B", - "zeta", "u03B6", - "zhbopomofo", "u3113", - "zhearmenian", "u056A", - "zhebrevecyrillic", "u04C2", - "zhecyrillic", "u0436", - "zhedescendercyrillic", "u0497", - "zhedieresiscyrillic", "u04DD", - "zihiragana", "u3058", - "zikatakana", "u30B8", - "zinorhebrew", "u05AE", - "zlinebelow", "u1E95", - "zmonospace", "uFF5A", - "zohiragana", "u305E", - "zokatakana", "u30BE", - "zparen", "u24B5", - "zretroflexhook", "u0290", - "zstroke", "u01B6", - "zuhiragana", "u305A", - "zukatakana", "u30BA", +my %AGL_to_unicode = ( + "A", "0041", + "AE", "00C6", + "AEacute", "01FC", + "AEmacron", "01E2", + "Aacute", "00C1", + "Abreve", "0102", + "Abreveacute", "1EAE", + "Abrevecyrillic", "04D0", + "Abrevedotbelow", "1EB6", + "Abrevegrave", "1EB0", + "Abrevehookabove", "1EB2", + "Abrevetilde", "1EB4", + "Acaron", "01CD", + "Acircle", "24B6", + "Acircumflex", "00C2", + "Acircumflexacute", "1EA4", + "Acircumflexdotbelow", "1EAC", + "Acircumflexgrave", "1EA6", + "Acircumflexhookabove", "1EA8", + "Acircumflextilde", "1EAA", + "Acyrillic", "0410", + "Adblgrave", "0200", + "Adieresis", "00C4", + "Adieresiscyrillic", "04D2", + "Adieresismacron", "01DE", + "Adotbelow", "1EA0", + "Adotmacron", "01E0", + "Agrave", "00C0", + "Ahookabove", "1EA2", + "Aiecyrillic", "04D4", + "Ainvertedbreve", "0202", + "Alpha", "0391", + "Alphatonos", "0386", + "Amacron", "0100", + "Amonospace", "FF21", + "Aogonek", "0104", + "Aring", "00C5", + "Aringacute", "01FA", + "Aringbelow", "1E00", + "Atilde", "00C3", + "Aybarmenian", "0531", + "B", "0042", + "Bcircle", "24B7", + "Bdotaccent", "1E02", + "Bdotbelow", "1E04", + "Becyrillic", "0411", + "Benarmenian", "0532", + "Beta", "0392", + "Bhook", "0181", + "Blinebelow", "1E06", + "Bmonospace", "FF22", + "Btopbar", "0182", + "C", "0043", + "Caarmenian", "053E", + "Cacute", "0106", + "Ccaron", "010C", + "Ccedilla", "00C7", + "Ccedillaacute", "1E08", + "Ccircle", "24B8", + "Ccircumflex", "0108", + "Cdot", "010A", + "Cdotaccent", "010A", + "Chaarmenian", "0549", + "Cheabkhasiancyrillic", "04BC", + "Checyrillic", "0427", + "Chedescenderabkhasiancyrillic", "04BE", + "Chedescendercyrillic", "04B6", + "Chedieresiscyrillic", "04F4", + "Cheharmenian", "0543", + "Chekhakassiancyrillic", "04CB", + "Cheverticalstrokecyrillic", "04B8", + "Chi", "03A7", + "Chook", "0187", + "Cmonospace", "FF23", + "Coarmenian", "0551", + "D", "0044", + "DZ", "01F1", + "DZcaron", "01C4", + "Daarmenian", "0534", + "Dafrican", "0189", + "Dcaron", "010E", + "Dcedilla", "1E10", + "Dcircle", "24B9", + "Dcircumflexbelow", "1E12", + "Dcroat", "0110", + "Ddotaccent", "1E0A", + "Ddotbelow", "1E0C", + "Decyrillic", "0414", + "Deicoptic", "03EE", + "Delta", "2206", + "Deltagreek", "0394", + "Dhook", "018A", + "Digammagreek", "03DC", + "Djecyrillic", "0402", + "Dlinebelow", "1E0E", + "Dmonospace", "FF24", + "Dslash", "0110", + "Dtopbar", "018B", + "Dz", "01F2", + "Dzcaron", "01C5", + "Dzeabkhasiancyrillic", "04E0", + "Dzecyrillic", "0405", + "Dzhecyrillic", "040F", + "E", "0045", + "Eacute", "00C9", + "Ebreve", "0114", + "Ecaron", "011A", + "Ecedillabreve", "1E1C", + "Echarmenian", "0535", + "Ecircle", "24BA", + "Ecircumflex", "00CA", + "Ecircumflexacute", "1EBE", + "Ecircumflexbelow", "1E18", + "Ecircumflexdotbelow", "1EC6", + "Ecircumflexgrave", "1EC0", + "Ecircumflexhookabove", "1EC2", + "Ecircumflextilde", "1EC4", + "Ecyrillic", "0404", + "Edblgrave", "0204", + "Edieresis", "00CB", + "Edot", "0116", + "Edotaccent", "0116", + "Edotbelow", "1EB8", + "Efcyrillic", "0424", + "Egrave", "00C8", + "Eharmenian", "0537", + "Ehookabove", "1EBA", + "Eightroman", "2167", + "Einvertedbreve", "0206", + "Eiotifiedcyrillic", "0464", + "Elcyrillic", "041B", + "Elevenroman", "216A", + "Emacron", "0112", + "Emacronacute", "1E16", + "Emacrongrave", "1E14", + "Emcyrillic", "041C", + "Emonospace", "FF25", + "Encyrillic", "041D", + "Endescendercyrillic", "04A2", + "Eng", "014A", + "Enghecyrillic", "04A4", + "Enhookcyrillic", "04C7", + "Eogonek", "0118", + "Eopen", "0190", + "Epsilon", "0395", + "Epsilontonos", "0388", + "Ercyrillic", "0420", + "Ereversed", "018E", + "Ereversedcyrillic", "042D", + "Escyrillic", "0421", + "Esdescendercyrillic", "04AA", + "Esh", "01A9", + "Eta", "0397", + "Etarmenian", "0538", + "Etatonos", "0389", + "Eth", "00D0", + "Etilde", "1EBC", + "Etildebelow", "1E1A", + "Euro", "20AC", + "Ezh", "01B7", + "Ezhcaron", "01EE", + "Ezhreversed", "01B8", + "F", "0046", + "Fcircle", "24BB", + "Fdotaccent", "1E1E", + "Feharmenian", "0556", + "Feicoptic", "03E4", + "Fhook", "0191", + "Fitacyrillic", "0472", + "Fiveroman", "2164", + "Fmonospace", "FF26", + "Fourroman", "2163", + "G", "0047", + "GBsquare", "3387", + "Gacute", "01F4", + "Gamma", "0393", + "Gammaafrican", "0194", + "Gangiacoptic", "03EA", + "Gbreve", "011E", + "Gcaron", "01E6", + "Gcedilla", "0122", + "Gcircle", "24BC", + "Gcircumflex", "011C", + "Gcommaaccent", "0122", + "Gdot", "0120", + "Gdotaccent", "0120", + "Gecyrillic", "0413", + "Ghadarmenian", "0542", + "Ghemiddlehookcyrillic", "0494", + "Ghestrokecyrillic", "0492", + "Gheupturncyrillic", "0490", + "Ghook", "0193", + "Gimarmenian", "0533", + "Gjecyrillic", "0403", + "Gmacron", "1E20", + "Gmonospace", "FF27", + "Gsmallhook", "029B", + "Gstroke", "01E4", + "H", "0048", + "H18533", "25CF", + "H18543", "25AA", + "H18551", "25AB", + "H22073", "25A1", + "HPsquare", "33CB", + "Haabkhasiancyrillic", "04A8", + "Hadescendercyrillic", "04B2", + "Hardsigncyrillic", "042A", + "Hbar", "0126", + "Hbrevebelow", "1E2A", + "Hcedilla", "1E28", + "Hcircle", "24BD", + "Hcircumflex", "0124", + "Hdieresis", "1E26", + "Hdotaccent", "1E22", + "Hdotbelow", "1E24", + "Hmonospace", "FF28", + "Hoarmenian", "0540", + "Horicoptic", "03E8", + "Hzsquare", "3390", + "I", "0049", + "IAcyrillic", "042F", + "IJ", "0132", + "IUcyrillic", "042E", + "Iacute", "00CD", + "Ibreve", "012C", + "Icaron", "01CF", + "Icircle", "24BE", + "Icircumflex", "00CE", + "Icyrillic", "0406", + "Idblgrave", "0208", + "Idieresis", "00CF", + "Idieresisacute", "1E2E", + "Idieresiscyrillic", "04E4", + "Idot", "0130", + "Idotaccent", "0130", + "Idotbelow", "1ECA", + "Iebrevecyrillic", "04D6", + "Iecyrillic", "0415", + "Ifraktur", "2111", + "Igrave", "00CC", + "Ihookabove", "1EC8", + "Iicyrillic", "0418", + "Iinvertedbreve", "020A", + "Iishortcyrillic", "0419", + "Imacron", "012A", + "Imacroncyrillic", "04E2", + "Imonospace", "FF29", + "Iniarmenian", "053B", + "Iocyrillic", "0401", + "Iogonek", "012E", + "Iota", "0399", + "Iotaafrican", "0196", + "Iotadieresis", "03AA", + "Iotatonos", "038A", + "Istroke", "0197", + "Itilde", "0128", + "Itildebelow", "1E2C", + "Izhitsacyrillic", "0474", + "Izhitsadblgravecyrillic", "0476", + "J", "004A", + "Jaarmenian", "0541", + "Jcircle", "24BF", + "Jcircumflex", "0134", + "Jecyrillic", "0408", + "Jheharmenian", "054B", + "Jmonospace", "FF2A", + "K", "004B", + "KBsquare", "3385", + "KKsquare", "33CD", + "Kabashkircyrillic", "04A0", + "Kacute", "1E30", + "Kacyrillic", "041A", + "Kadescendercyrillic", "049A", + "Kahookcyrillic", "04C3", + "Kappa", "039A", + "Kastrokecyrillic", "049E", + "Kaverticalstrokecyrillic", "049C", + "Kcaron", "01E8", + "Kcedilla", "0136", + "Kcircle", "24C0", + "Kcommaaccent", "0136", + "Kdotbelow", "1E32", + "Keharmenian", "0554", + "Kenarmenian", "053F", + "Khacyrillic", "0425", + "Kheicoptic", "03E6", + "Khook", "0198", + "Kjecyrillic", "040C", + "Klinebelow", "1E34", + "Kmonospace", "FF2B", + "Koppacyrillic", "0480", + "Koppagreek", "03DE", + "Ksicyrillic", "046E", + "L", "004C", + "LJ", "01C7", + "Lacute", "0139", + "Lambda", "039B", + "Lcaron", "013D", + "Lcedilla", "013B", + "Lcircle", "24C1", + "Lcircumflexbelow", "1E3C", + "Lcommaaccent", "013B", + "Ldot", "013F", + "Ldotaccent", "013F", + "Ldotbelow", "1E36", + "Ldotbelowmacron", "1E38", + "Liwnarmenian", "053C", + "Lj", "01C8", + "Ljecyrillic", "0409", + "Llinebelow", "1E3A", + "Lmonospace", "FF2C", + "Lslash", "0141", + "M", "004D", + "MBsquare", "3386", + "Macute", "1E3E", + "Mcircle", "24C2", + "Mdotaccent", "1E40", + "Mdotbelow", "1E42", + "Menarmenian", "0544", + "Mmonospace", "FF2D", + "Mturned", "019C", + "Mu", "039C", + "N", "004E", + "NJ", "01CA", + "Nacute", "0143", + "Ncaron", "0147", + "Ncedilla", "0145", + "Ncircle", "24C3", + "Ncircumflexbelow", "1E4A", + "Ncommaaccent", "0145", + "Ndotaccent", "1E44", + "Ndotbelow", "1E46", + "Nhookleft", "019D", + "Nineroman", "2168", + "Nj", "01CB", + "Njecyrillic", "040A", + "Nlinebelow", "1E48", + "Nmonospace", "FF2E", + "Nowarmenian", "0546", + "Ntilde", "00D1", + "Nu", "039D", + "O", "004F", + "OE", "0152", + "Oacute", "00D3", + "Obarredcyrillic", "04E8", + "Obarreddieresiscyrillic", "04EA", + "Obreve", "014E", + "Ocaron", "01D1", + "Ocenteredtilde", "019F", + "Ocircle", "24C4", + "Ocircumflex", "00D4", + "Ocircumflexacute", "1ED0", + "Ocircumflexdotbelow", "1ED8", + "Ocircumflexgrave", "1ED2", + "Ocircumflexhookabove", "1ED4", + "Ocircumflextilde", "1ED6", + "Ocyrillic", "041E", + "Odblacute", "0150", + "Odblgrave", "020C", + "Odieresis", "00D6", + "Odieresiscyrillic", "04E6", + "Odotbelow", "1ECC", + "Ograve", "00D2", + "Oharmenian", "0555", + "Ohm", "2126", + "Ohookabove", "1ECE", + "Ohorn", "01A0", + "Ohornacute", "1EDA", + "Ohorndotbelow", "1EE2", + "Ohorngrave", "1EDC", + "Ohornhookabove", "1EDE", + "Ohorntilde", "1EE0", + "Ohungarumlaut", "0150", + "Oi", "01A2", + "Oinvertedbreve", "020E", + "Omacron", "014C", + "Omacronacute", "1E52", + "Omacrongrave", "1E50", + "Omega", "2126", + "Omegacyrillic", "0460", + "Omegagreek", "03A9", + "Omegaroundcyrillic", "047A", + "Omegatitlocyrillic", "047C", + "Omegatonos", "038F", + "Omicron", "039F", + "Omicrontonos", "038C", + "Omonospace", "FF2F", + "Oneroman", "2160", + "Oogonek", "01EA", + "Oogonekmacron", "01EC", + "Oopen", "0186", + "Oslash", "00D8", + "Oslashacute", "01FE", + "Ostrokeacute", "01FE", + "Otcyrillic", "047E", + "Otilde", "00D5", + "Otildeacute", "1E4C", + "Otildedieresis", "1E4E", + "P", "0050", + "Pacute", "1E54", + "Pcircle", "24C5", + "Pdotaccent", "1E56", + "Pecyrillic", "041F", + "Peharmenian", "054A", + "Pemiddlehookcyrillic", "04A6", + "Phi", "03A6", + "Phook", "01A4", + "Pi", "03A0", + "Piwrarmenian", "0553", + "Pmonospace", "FF30", + "Psi", "03A8", + "Psicyrillic", "0470", + "Q", "0051", + "Qcircle", "24C6", + "Qmonospace", "FF31", + "R", "0052", + "Raarmenian", "054C", + "Racute", "0154", + "Rcaron", "0158", + "Rcedilla", "0156", + "Rcircle", "24C7", + "Rcommaaccent", "0156", + "Rdblgrave", "0210", + "Rdotaccent", "1E58", + "Rdotbelow", "1E5A", + "Rdotbelowmacron", "1E5C", + "Reharmenian", "0550", + "Rfraktur", "211C", + "Rho", "03A1", + "Rinvertedbreve", "0212", + "Rlinebelow", "1E5E", + "Rmonospace", "FF32", + "Rsmallinverted", "0281", + "Rsmallinvertedsuperior", "02B6", + "S", "0053", + "SF010000", "250C", + "SF020000", "2514", + "SF030000", "2510", + "SF040000", "2518", + "SF050000", "253C", + "SF060000", "252C", + "SF070000", "2534", + "SF080000", "251C", + "SF090000", "2524", + "SF100000", "2500", + "SF110000", "2502", + "SF190000", "2561", + "SF200000", "2562", + "SF210000", "2556", + "SF220000", "2555", + "SF230000", "2563", + "SF240000", "2551", + "SF250000", "2557", + "SF260000", "255D", + "SF270000", "255C", + "SF280000", "255B", + "SF360000", "255E", + "SF370000", "255F", + "SF380000", "255A", + "SF390000", "2554", + "SF400000", "2569", + "SF410000", "2566", + "SF420000", "2560", + "SF430000", "2550", + "SF440000", "256C", + "SF450000", "2567", + "SF460000", "2568", + "SF470000", "2564", + "SF480000", "2565", + "SF490000", "2559", + "SF500000", "2558", + "SF510000", "2552", + "SF520000", "2553", + "SF530000", "256B", + "SF540000", "256A", + "Sacute", "015A", + "Sacutedotaccent", "1E64", + "Sampigreek", "03E0", + "Scaron", "0160", + "Scarondotaccent", "1E66", + "Scedilla", "015E", + "Schwa", "018F", + "Schwacyrillic", "04D8", + "Schwadieresiscyrillic", "04DA", + "Scircle", "24C8", + "Scircumflex", "015C", + "Scommaaccent", "0218", + "Sdotaccent", "1E60", + "Sdotbelow", "1E62", + "Sdotbelowdotaccent", "1E68", + "Seharmenian", "054D", + "Sevenroman", "2166", + "Shaarmenian", "0547", + "Shacyrillic", "0428", + "Shchacyrillic", "0429", + "Sheicoptic", "03E2", + "Shhacyrillic", "04BA", + "Shimacoptic", "03EC", + "Sigma", "03A3", + "Sixroman", "2165", + "Smonospace", "FF33", + "Softsigncyrillic", "042C", + "Stigmagreek", "03DA", + "T", "0054", + "Tau", "03A4", + "Tbar", "0166", + "Tcaron", "0164", + "Tcedilla", "0162", + "Tcircle", "24C9", + "Tcircumflexbelow", "1E70", + "Tcommaaccent", "0162", + "Tdotaccent", "1E6A", + "Tdotbelow", "1E6C", + "Tecyrillic", "0422", + "Tedescendercyrillic", "04AC", + "Tenroman", "2169", + "Tetsecyrillic", "04B4", + "Theta", "0398", + "Thook", "01AC", + "Thorn", "00DE", + "Threeroman", "2162", + "Tiwnarmenian", "054F", + "Tlinebelow", "1E6E", + "Tmonospace", "FF34", + "Toarmenian", "0539", + "Tonefive", "01BC", + "Tonesix", "0184", + "Tonetwo", "01A7", + "Tretroflexhook", "01AE", + "Tsecyrillic", "0426", + "Tshecyrillic", "040B", + "Twelveroman", "216B", + "Tworoman", "2161", + "U", "0055", + "Uacute", "00DA", + "Ubreve", "016C", + "Ucaron", "01D3", + "Ucircle", "24CA", + "Ucircumflex", "00DB", + "Ucircumflexbelow", "1E76", + "Ucyrillic", "0423", + "Udblacute", "0170", + "Udblgrave", "0214", + "Udieresis", "00DC", + "Udieresisacute", "01D7", + "Udieresisbelow", "1E72", + "Udieresiscaron", "01D9", + "Udieresiscyrillic", "04F0", + "Udieresisgrave", "01DB", + "Udieresismacron", "01D5", + "Udotbelow", "1EE4", + "Ugrave", "00D9", + "Uhookabove", "1EE6", + "Uhorn", "01AF", + "Uhornacute", "1EE8", + "Uhorndotbelow", "1EF0", + "Uhorngrave", "1EEA", + "Uhornhookabove", "1EEC", + "Uhorntilde", "1EEE", + "Uhungarumlaut", "0170", + "Uhungarumlautcyrillic", "04F2", + "Uinvertedbreve", "0216", + "Ukcyrillic", "0478", + "Umacron", "016A", + "Umacroncyrillic", "04EE", + "Umacrondieresis", "1E7A", + "Umonospace", "FF35", + "Uogonek", "0172", + "Upsilon", "03A5", + "Upsilon1", "03D2", + "Upsilonacutehooksymbolgreek", "03D3", + "Upsilonafrican", "01B1", + "Upsilondieresis", "03AB", + "Upsilondieresishooksymbolgreek", "03D4", + "Upsilonhooksymbol", "03D2", + "Upsilontonos", "038E", + "Uring", "016E", + "Ushortcyrillic", "040E", + "Ustraightcyrillic", "04AE", + "Ustraightstrokecyrillic", "04B0", + "Utilde", "0168", + "Utildeacute", "1E78", + "Utildebelow", "1E74", + "V", "0056", + "Vcircle", "24CB", + "Vdotbelow", "1E7E", + "Vecyrillic", "0412", + "Vewarmenian", "054E", + "Vhook", "01B2", + "Vmonospace", "FF36", + "Voarmenian", "0548", + "Vtilde", "1E7C", + "W", "0057", + "Wacute", "1E82", + "Wcircle", "24CC", + "Wcircumflex", "0174", + "Wdieresis", "1E84", + "Wdotaccent", "1E86", + "Wdotbelow", "1E88", + "Wgrave", "1E80", + "Wmonospace", "FF37", + "X", "0058", + "Xcircle", "24CD", + "Xdieresis", "1E8C", + "Xdotaccent", "1E8A", + "Xeharmenian", "053D", + "Xi", "039E", + "Xmonospace", "FF38", + "Y", "0059", + "Yacute", "00DD", + "Yatcyrillic", "0462", + "Ycircle", "24CE", + "Ycircumflex", "0176", + "Ydieresis", "0178", + "Ydotaccent", "1E8E", + "Ydotbelow", "1EF4", + "Yericyrillic", "042B", + "Yerudieresiscyrillic", "04F8", + "Ygrave", "1EF2", + "Yhook", "01B3", + "Yhookabove", "1EF6", + "Yiarmenian", "0545", + "Yicyrillic", "0407", + "Yiwnarmenian", "0552", + "Ymonospace", "FF39", + "Ytilde", "1EF8", + "Yusbigcyrillic", "046A", + "Yusbigiotifiedcyrillic", "046C", + "Yuslittlecyrillic", "0466", + "Yuslittleiotifiedcyrillic", "0468", + "Z", "005A", + "Zaarmenian", "0536", + "Zacute", "0179", + "Zcaron", "017D", + "Zcircle", "24CF", + "Zcircumflex", "1E90", + "Zdot", "017B", + "Zdotaccent", "017B", + "Zdotbelow", "1E92", + "Zecyrillic", "0417", + "Zedescendercyrillic", "0498", + "Zedieresiscyrillic", "04DE", + "Zeta", "0396", + "Zhearmenian", "053A", + "Zhebrevecyrillic", "04C1", + "Zhecyrillic", "0416", + "Zhedescendercyrillic", "0496", + "Zhedieresiscyrillic", "04DC", + "Zlinebelow", "1E94", + "Zmonospace", "FF3A", + "Zstroke", "01B5", + "a", "0061", + "aabengali", "0986", + "aacute", "00E1", + "aadeva", "0906", + "aagujarati", "0A86", + "aagurmukhi", "0A06", + "aamatragurmukhi", "0A3E", + "aarusquare", "3303", + "aavowelsignbengali", "09BE", + "aavowelsigndeva", "093E", + "aavowelsigngujarati", "0ABE", + "abbreviationmarkarmenian", "055F", + "abbreviationsigndeva", "0970", + "abengali", "0985", + "abopomofo", "311A", + "abreve", "0103", + "abreveacute", "1EAF", + "abrevecyrillic", "04D1", + "abrevedotbelow", "1EB7", + "abrevegrave", "1EB1", + "abrevehookabove", "1EB3", + "abrevetilde", "1EB5", + "acaron", "01CE", + "acircle", "24D0", + "acircumflex", "00E2", + "acircumflexacute", "1EA5", + "acircumflexdotbelow", "1EAD", + "acircumflexgrave", "1EA7", + "acircumflexhookabove", "1EA9", + "acircumflextilde", "1EAB", + "acute", "00B4", + "acutebelowcmb", "0317", + "acutecmb", "0301", + "acutecomb", "0301", + "acutedeva", "0954", + "acutelowmod", "02CF", + "acutetonecmb", "0341", + "acyrillic", "0430", + "adblgrave", "0201", + "addakgurmukhi", "0A71", + "adeva", "0905", + "adieresis", "00E4", + "adieresiscyrillic", "04D3", + "adieresismacron", "01DF", + "adotbelow", "1EA1", + "adotmacron", "01E1", + "ae", "00E6", + "aeacute", "01FD", + "aekorean", "3150", + "aemacron", "01E3", + "afii00208", "2015", + "afii08941", "20A4", + "afii10017", "0410", + "afii10018", "0411", + "afii10019", "0412", + "afii10020", "0413", + "afii10021", "0414", + "afii10022", "0415", + "afii10023", "0401", + "afii10024", "0416", + "afii10025", "0417", + "afii10026", "0418", + "afii10027", "0419", + "afii10028", "041A", + "afii10029", "041B", + "afii10030", "041C", + "afii10031", "041D", + "afii10032", "041E", + "afii10033", "041F", + "afii10034", "0420", + "afii10035", "0421", + "afii10036", "0422", + "afii10037", "0423", + "afii10038", "0424", + "afii10039", "0425", + "afii10040", "0426", + "afii10041", "0427", + "afii10042", "0428", + "afii10043", "0429", + "afii10044", "042A", + "afii10045", "042B", + "afii10046", "042C", + "afii10047", "042D", + "afii10048", "042E", + "afii10049", "042F", + "afii10050", "0490", + "afii10051", "0402", + "afii10052", "0403", + "afii10053", "0404", + "afii10054", "0405", + "afii10055", "0406", + "afii10056", "0407", + "afii10057", "0408", + "afii10058", "0409", + "afii10059", "040A", + "afii10060", "040B", + "afii10061", "040C", + "afii10062", "040E", + "afii10065", "0430", + "afii10066", "0431", + "afii10067", "0432", + "afii10068", "0433", + "afii10069", "0434", + "afii10070", "0435", + "afii10071", "0451", + "afii10072", "0436", + "afii10073", "0437", + "afii10074", "0438", + "afii10075", "0439", + "afii10076", "043A", + "afii10077", "043B", + "afii10078", "043C", + "afii10079", "043D", + "afii10080", "043E", + "afii10081", "043F", + "afii10082", "0440", + "afii10083", "0441", + "afii10084", "0442", + "afii10085", "0443", + "afii10086", "0444", + "afii10087", "0445", + "afii10088", "0446", + "afii10089", "0447", + "afii10090", "0448", + "afii10091", "0449", + "afii10092", "044A", + "afii10093", "044B", + "afii10094", "044C", + "afii10095", "044D", + "afii10096", "044E", + "afii10097", "044F", + "afii10098", "0491", + "afii10099", "0452", + "afii10100", "0453", + "afii10101", "0454", + "afii10102", "0455", + "afii10103", "0456", + "afii10104", "0457", + "afii10105", "0458", + "afii10106", "0459", + "afii10107", "045A", + "afii10108", "045B", + "afii10109", "045C", + "afii10110", "045E", + "afii10145", "040F", + "afii10146", "0462", + "afii10147", "0472", + "afii10148", "0474", + "afii10193", "045F", + "afii10194", "0463", + "afii10195", "0473", + "afii10196", "0475", + "afii10846", "04D9", + "afii299", "200E", + "afii300", "200F", + "afii301", "200D", + "afii57381", "066A", + "afii57388", "060C", + "afii57392", "0660", + "afii57393", "0661", + "afii57394", "0662", + "afii57395", "0663", + "afii57396", "0664", + "afii57397", "0665", + "afii57398", "0666", + "afii57399", "0667", + "afii57400", "0668", + "afii57401", "0669", + "afii57403", "061B", + "afii57407", "061F", + "afii57409", "0621", + "afii57410", "0622", + "afii57411", "0623", + "afii57412", "0624", + "afii57413", "0625", + "afii57414", "0626", + "afii57415", "0627", + "afii57416", "0628", + "afii57417", "0629", + "afii57418", "062A", + "afii57419", "062B", + "afii57420", "062C", + "afii57421", "062D", + "afii57422", "062E", + "afii57423", "062F", + "afii57424", "0630", + "afii57425", "0631", + "afii57426", "0632", + "afii57427", "0633", + "afii57428", "0634", + "afii57429", "0635", + "afii57430", "0636", + "afii57431", "0637", + "afii57432", "0638", + "afii57433", "0639", + "afii57434", "063A", + "afii57440", "0640", + "afii57441", "0641", + "afii57442", "0642", + "afii57443", "0643", + "afii57444", "0644", + "afii57445", "0645", + "afii57446", "0646", + "afii57448", "0648", + "afii57449", "0649", + "afii57450", "064A", + "afii57451", "064B", + "afii57452", "064C", + "afii57453", "064D", + "afii57454", "064E", + "afii57455", "064F", + "afii57456", "0650", + "afii57457", "0651", + "afii57458", "0652", + "afii57470", "0647", + "afii57505", "06A4", + "afii57506", "067E", + "afii57507", "0686", + "afii57508", "0698", + "afii57509", "06AF", + "afii57511", "0679", + "afii57512", "0688", + "afii57513", "0691", + "afii57514", "06BA", + "afii57519", "06D2", + "afii57534", "06D5", + "afii57636", "20AA", + "afii57645", "05BE", + "afii57658", "05C3", + "afii57664", "05D0", + "afii57665", "05D1", + "afii57666", "05D2", + "afii57667", "05D3", + "afii57668", "05D4", + "afii57669", "05D5", + "afii57670", "05D6", + "afii57671", "05D7", + "afii57672", "05D8", + "afii57673", "05D9", + "afii57674", "05DA", + "afii57675", "05DB", + "afii57676", "05DC", + "afii57677", "05DD", + "afii57678", "05DE", + "afii57679", "05DF", + "afii57680", "05E0", + "afii57681", "05E1", + "afii57682", "05E2", + "afii57683", "05E3", + "afii57684", "05E4", + "afii57685", "05E5", + "afii57686", "05E6", + "afii57687", "05E7", + "afii57688", "05E8", + "afii57689", "05E9", + "afii57690", "05EA", + "afii57694", "FB2A", + "afii57695", "FB2B", + "afii57700", "FB4B", + "afii57705", "FB1F", + "afii57716", "05F0", + "afii57717", "05F1", + "afii57718", "05F2", + "afii57723", "FB35", + "afii57793", "05B4", + "afii57794", "05B5", + "afii57795", "05B6", + "afii57796", "05BB", + "afii57797", "05B8", + "afii57798", "05B7", + "afii57799", "05B0", + "afii57800", "05B2", + "afii57801", "05B1", + "afii57802", "05B3", + "afii57803", "05C2", + "afii57804", "05C1", + "afii57806", "05B9", + "afii57807", "05BC", + "afii57839", "05BD", + "afii57841", "05BF", + "afii57842", "05C0", + "afii57929", "02BC", + "afii61248", "2105", + "afii61289", "2113", + "afii61352", "2116", + "afii61573", "202C", + "afii61574", "202D", + "afii61575", "202E", + "afii61664", "200C", + "afii63167", "066D", + "afii64937", "02BD", + "agrave", "00E0", + "agujarati", "0A85", + "agurmukhi", "0A05", + "ahiragana", "3042", + "ahookabove", "1EA3", + "aibengali", "0990", + "aibopomofo", "311E", + "aideva", "0910", + "aiecyrillic", "04D5", + "aigujarati", "0A90", + "aigurmukhi", "0A10", + "aimatragurmukhi", "0A48", + "ainarabic", "0639", + "ainfinalarabic", "FECA", + "aininitialarabic", "FECB", + "ainmedialarabic", "FECC", + "ainvertedbreve", "0203", + "aivowelsignbengali", "09C8", + "aivowelsigndeva", "0948", + "aivowelsigngujarati", "0AC8", + "akatakana", "30A2", + "akatakanahalfwidth", "FF71", + "akorean", "314F", + "alef", "05D0", + "alefarabic", "0627", + "alefdageshhebrew", "FB30", + "aleffinalarabic", "FE8E", + "alefhamzaabovearabic", "0623", + "alefhamzaabovefinalarabic", "FE84", + "alefhamzabelowarabic", "0625", + "alefhamzabelowfinalarabic", "FE88", + "alefhebrew", "05D0", + "aleflamedhebrew", "FB4F", + "alefmaddaabovearabic", "0622", + "alefmaddaabovefinalarabic", "FE82", + "alefmaksuraarabic", "0649", + "alefmaksurafinalarabic", "FEF0", + "alefmaksurainitialarabic", "FEF3", + "alefmaksuramedialarabic", "FEF4", + "alefpatahhebrew", "FB2E", + "alefqamatshebrew", "FB2F", + "aleph", "2135", + "allequal", "224C", + "alpha", "03B1", + "alphatonos", "03AC", + "amacron", "0101", + "amonospace", "FF41", + "ampersand", "0026", + "ampersandmonospace", "FF06", + "amsquare", "33C2", + "anbopomofo", "3122", + "angbopomofo", "3124", + "angkhankhuthai", "0E5A", + "angle", "2220", + "anglebracketleft", "3008", + "anglebracketleftvertical", "FE3F", + "anglebracketright", "3009", + "anglebracketrightvertical", "FE40", + "angleleft", "2329", + "angleright", "232A", + "angstrom", "212B", + "anoteleia", "0387", + "anudattadeva", "0952", + "anusvarabengali", "0982", + "anusvaradeva", "0902", + "anusvaragujarati", "0A82", + "aogonek", "0105", + "apaatosquare", "3300", + "aparen", "249C", + "apostrophearmenian", "055A", + "apostrophemod", "02BC", + "approaches", "2250", + "approxequal", "2248", + "approxequalorimage", "2252", + "approximatelyequal", "2245", + "araeaekorean", "318E", + "araeakorean", "318D", + "arc", "2312", + "arighthalfring", "1E9A", + "aring", "00E5", + "aringacute", "01FB", + "aringbelow", "1E01", + "arrowboth", "2194", + "arrowdashdown", "21E3", + "arrowdashleft", "21E0", + "arrowdashright", "21E2", + "arrowdashup", "21E1", + "arrowdblboth", "21D4", + "arrowdbldown", "21D3", + "arrowdblleft", "21D0", + "arrowdblright", "21D2", + "arrowdblup", "21D1", + "arrowdown", "2193", + "arrowdownleft", "2199", + "arrowdownright", "2198", + "arrowdownwhite", "21E9", + "arrowheaddownmod", "02C5", + "arrowheadleftmod", "02C2", + "arrowheadrightmod", "02C3", + "arrowheadupmod", "02C4", + "arrowleft", "2190", + "arrowleftdbl", "21D0", + "arrowleftdblstroke", "21CD", + "arrowleftoverright", "21C6", + "arrowleftwhite", "21E6", + "arrowright", "2192", + "arrowrightdblstroke", "21CF", + "arrowrightheavy", "279E", + "arrowrightoverleft", "21C4", + "arrowrightwhite", "21E8", + "arrowtableft", "21E4", + "arrowtabright", "21E5", + "arrowup", "2191", + "arrowupdn", "2195", + "arrowupdnbse", "21A8", + "arrowupdownbase", "21A8", + "arrowupleft", "2196", + "arrowupleftofdown", "21C5", + "arrowupright", "2197", + "arrowupwhite", "21E7", + "asciicircum", "005E", + "asciicircummonospace", "FF3E", + "asciitilde", "007E", + "asciitildemonospace", "FF5E", + "ascript", "0251", + "ascriptturned", "0252", + "asmallhiragana", "3041", + "asmallkatakana", "30A1", + "asmallkatakanahalfwidth", "FF67", + "asterisk", "002A", + "asteriskaltonearabic", "066D", + "asteriskarabic", "066D", + "asteriskmath", "2217", + "asteriskmonospace", "FF0A", + "asterisksmall", "FE61", + "asterism", "2042", + "asymptoticallyequal", "2243", + "at", "0040", + "atilde", "00E3", + "atmonospace", "FF20", + "atsmall", "FE6B", + "aturned", "0250", + "aubengali", "0994", + "aubopomofo", "3120", + "audeva", "0914", + "augujarati", "0A94", + "augurmukhi", "0A14", + "aulengthmarkbengali", "09D7", + "aumatragurmukhi", "0A4C", + "auvowelsignbengali", "09CC", + "auvowelsigndeva", "094C", + "auvowelsigngujarati", "0ACC", + "avagrahadeva", "093D", + "aybarmenian", "0561", + "ayin", "05E2", + "ayinaltonehebrew", "FB20", + "ayinhebrew", "05E2", + "b", "0062", + "babengali", "09AC", + "backslash", "005C", + "backslashmonospace", "FF3C", + "badeva", "092C", + "bagujarati", "0AAC", + "bagurmukhi", "0A2C", + "bahiragana", "3070", + "bahtthai", "0E3F", + "bakatakana", "30D0", + "bar", "007C", + "barmonospace", "FF5C", + "bbopomofo", "3105", + "bcircle", "24D1", + "bdotaccent", "1E03", + "bdotbelow", "1E05", + "beamedsixteenthnotes", "266C", + "because", "2235", + "becyrillic", "0431", + "beharabic", "0628", + "behfinalarabic", "FE90", + "behinitialarabic", "FE91", + "behiragana", "3079", + "behmedialarabic", "FE92", + "behmeeminitialarabic", "FC9F", + "behmeemisolatedarabic", "FC08", + "behnoonfinalarabic", "FC6D", + "bekatakana", "30D9", + "benarmenian", "0562", + "bet", "05D1", + "beta", "03B2", + "betasymbolgreek", "03D0", + "betdagesh", "FB31", + "betdageshhebrew", "FB31", + "bethebrew", "05D1", + "betrafehebrew", "FB4C", + "bhabengali", "09AD", + "bhadeva", "092D", + "bhagujarati", "0AAD", + "bhagurmukhi", "0A2D", + "bhook", "0253", + "bihiragana", "3073", + "bikatakana", "30D3", + "bilabialclick", "0298", + "bindigurmukhi", "0A02", + "birusquare", "3331", + "blackcircle", "25CF", + "blackdiamond", "25C6", + "blackdownpointingtriangle", "25BC", + "blackleftpointingpointer", "25C4", + "blackleftpointingtriangle", "25C0", + "blacklenticularbracketleft", "3010", + "blacklenticularbracketleftvertical", "FE3B", + "blacklenticularbracketright", "3011", + "blacklenticularbracketrightvertical", "FE3C", + "blacklowerlefttriangle", "25E3", + "blacklowerrighttriangle", "25E2", + "blackrectangle", "25AC", + "blackrightpointingpointer", "25BA", + "blackrightpointingtriangle", "25B6", + "blacksmallsquare", "25AA", + "blacksmilingface", "263B", + "blacksquare", "25A0", + "blackstar", "2605", + "blackupperlefttriangle", "25E4", + "blackupperrighttriangle", "25E5", + "blackuppointingsmalltriangle", "25B4", + "blackuppointingtriangle", "25B2", + "blank", "2423", + "blinebelow", "1E07", + "block", "2588", + "bmonospace", "FF42", + "bobaimaithai", "0E1A", + "bohiragana", "307C", + "bokatakana", "30DC", + "bparen", "249D", + "bqsquare", "33C3", + "braceleft", "007B", + "braceleftmonospace", "FF5B", + "braceleftsmall", "FE5B", + "braceleftvertical", "FE37", + "braceright", "007D", + "bracerightmonospace", "FF5D", + "bracerightsmall", "FE5C", + "bracerightvertical", "FE38", + "bracketleft", "005B", + "bracketleftmonospace", "FF3B", + "bracketright", "005D", + "bracketrightmonospace", "FF3D", + "breve", "02D8", + "brevebelowcmb", "032E", + "brevecmb", "0306", + "breveinvertedbelowcmb", "032F", + "breveinvertedcmb", "0311", + "breveinverteddoublecmb", "0361", + "bridgebelowcmb", "032A", + "bridgeinvertedbelowcmb", "033A", + "brokenbar", "00A6", + "bstroke", "0180", + "btopbar", "0183", + "buhiragana", "3076", + "bukatakana", "30D6", + "bullet", "2022", + "bulletinverse", "25D8", + "bulletoperator", "2219", + "bullseye", "25CE", + "c", "0063", + "caarmenian", "056E", + "cabengali", "099A", + "cacute", "0107", + "cadeva", "091A", + "cagujarati", "0A9A", + "cagurmukhi", "0A1A", + "calsquare", "3388", + "candrabindubengali", "0981", + "candrabinducmb", "0310", + "candrabindudeva", "0901", + "candrabindugujarati", "0A81", + "capslock", "21EA", + "careof", "2105", + "caron", "02C7", + "caronbelowcmb", "032C", + "caroncmb", "030C", + "carriagereturn", "21B5", + "cbopomofo", "3118", + "ccaron", "010D", + "ccedilla", "00E7", + "ccedillaacute", "1E09", + "ccircle", "24D2", + "ccircumflex", "0109", + "ccurl", "0255", + "cdot", "010B", + "cdotaccent", "010B", + "cdsquare", "33C5", + "cedilla", "00B8", + "cedillacmb", "0327", + "cent", "00A2", + "centigrade", "2103", + "centmonospace", "FFE0", + "chaarmenian", "0579", + "chabengali", "099B", + "chadeva", "091B", + "chagujarati", "0A9B", + "chagurmukhi", "0A1B", + "chbopomofo", "3114", + "cheabkhasiancyrillic", "04BD", + "checkmark", "2713", + "checyrillic", "0447", + "chedescenderabkhasiancyrillic", "04BF", + "chedescendercyrillic", "04B7", + "chedieresiscyrillic", "04F5", + "cheharmenian", "0573", + "chekhakassiancyrillic", "04CC", + "cheverticalstrokecyrillic", "04B9", + "chi", "03C7", + "chieuchacirclekorean", "3277", + "chieuchaparenkorean", "3217", + "chieuchcirclekorean", "3269", + "chieuchkorean", "314A", + "chieuchparenkorean", "3209", + "chochangthai", "0E0A", + "chochanthai", "0E08", + "chochingthai", "0E09", + "chochoethai", "0E0C", + "chook", "0188", + "cieucacirclekorean", "3276", + "cieucaparenkorean", "3216", + "cieuccirclekorean", "3268", + "cieuckorean", "3148", + "cieucparenkorean", "3208", + "cieucuparenkorean", "321C", + "circle", "25CB", + "circlemultiply", "2297", + "circleot", "2299", + "circleplus", "2295", + "circlepostalmark", "3036", + "circlewithlefthalfblack", "25D0", + "circlewithrighthalfblack", "25D1", + "circumflex", "02C6", + "circumflexbelowcmb", "032D", + "circumflexcmb", "0302", + "clear", "2327", + "clickalveolar", "01C2", + "clickdental", "01C0", + "clicklateral", "01C1", + "clickretroflex", "01C3", + "club", "2663", + "clubsuitblack", "2663", + "clubsuitwhite", "2667", + "cmcubedsquare", "33A4", + "cmonospace", "FF43", + "cmsquaredsquare", "33A0", + "coarmenian", "0581", + "colon", "003A", + "colonmonetary", "20A1", + "colonmonospace", "FF1A", + "colonsign", "20A1", + "colonsmall", "FE55", + "colontriangularhalfmod", "02D1", + "colontriangularmod", "02D0", + "comma", "002C", + "commaabovecmb", "0313", + "commaaboverightcmb", "0315", + "commaarabic", "060C", + "commaarmenian", "055D", + "commamonospace", "FF0C", + "commareversedabovecmb", "0314", + "commareversedmod", "02BD", + "commasmall", "FE50", + "commaturnedabovecmb", "0312", + "commaturnedmod", "02BB", + "compass", "263C", + "congruent", "2245", + "contourintegral", "222E", + "control", "2303", + "controlACK", "0006", + "controlBEL", "0007", + "controlBS", "0008", + "controlCAN", "0018", + "controlCR", "000D", + "controlDC1", "0011", + "controlDC2", "0012", + "controlDC3", "0013", + "controlDC4", "0014", + "controlDEL", "007F", + "controlDLE", "0010", + "controlEM", "0019", + "controlENQ", "0005", + "controlEOT", "0004", + "controlESC", "001B", + "controlETB", "0017", + "controlETX", "0003", + "controlFF", "000C", + "controlFS", "001C", + "controlGS", "001D", + "controlHT", "0009", + "controlLF", "000A", + "controlNAK", "0015", + "controlRS", "001E", + "controlSI", "000F", + "controlSO", "000E", + "controlSOT", "0002", + "controlSTX", "0001", + "controlSUB", "001A", + "controlSYN", "0016", + "controlUS", "001F", + "controlVT", "000B", + "copyright", "00A9", + "cornerbracketleft", "300C", + "cornerbracketlefthalfwidth", "FF62", + "cornerbracketleftvertical", "FE41", + "cornerbracketright", "300D", + "cornerbracketrighthalfwidth", "FF63", + "cornerbracketrightvertical", "FE42", + "corporationsquare", "337F", + "cosquare", "33C7", + "coverkgsquare", "33C6", + "cparen", "249E", + "cruzeiro", "20A2", + "cstretched", "0297", + "curlyand", "22CF", + "curlyor", "22CE", + "currency", "00A4", + "d", "0064", + "daarmenian", "0564", + "dabengali", "09A6", + "dadarabic", "0636", + "dadeva", "0926", + "dadfinalarabic", "FEBE", + "dadinitialarabic", "FEBF", + "dadmedialarabic", "FEC0", + "dagesh", "05BC", + "dageshhebrew", "05BC", + "dagger", "2020", + "daggerdbl", "2021", + "dagujarati", "0AA6", + "dagurmukhi", "0A26", + "dahiragana", "3060", + "dakatakana", "30C0", + "dalarabic", "062F", + "dalet", "05D3", + "daletdagesh", "FB33", + "daletdageshhebrew", "FB33", + "dalethatafpatah", "05D3_05B2", + "dalethatafpatahhebrew", "05D3_05B2", + "dalethatafsegol", "05D3_05B1", + "dalethatafsegolhebrew", "05D3_05B1", + "dalethebrew", "05D3", + "dalethiriq", "05D3_05B4", + "dalethiriqhebrew", "05D3_05B4", + "daletholam", "05D3_05B9", + "daletholamhebrew", "05D3_05B9", + "daletpatah", "05D3_05B7", + "daletpatahhebrew", "05D3_05B7", + "daletqamats", "05D3_05B8", + "daletqamatshebrew", "05D3_05B8", + "daletqubuts", "05D3_05BB", + "daletqubutshebrew", "05D3_05BB", + "daletsegol", "05D3_05B6", + "daletsegolhebrew", "05D3_05B6", + "daletsheva", "05D3_05B0", + "daletshevahebrew", "05D3_05B0", + "dalettsere", "05D3_05B5", + "dalettserehebrew", "05D3_05B5", + "dalfinalarabic", "FEAA", + "dammaarabic", "064F", + "dammalowarabic", "064F", + "dammatanaltonearabic", "064C", + "dammatanarabic", "064C", + "danda", "0964", + "dargahebrew", "05A7", + "dargalefthebrew", "05A7", + "dasiapneumatacyrilliccmb", "0485", + "dblanglebracketleft", "300A", + "dblanglebracketleftvertical", "FE3D", + "dblanglebracketright", "300B", + "dblanglebracketrightvertical", "FE3E", + "dblarchinvertedbelowcmb", "032B", + "dblarrowleft", "21D4", + "dblarrowright", "21D2", + "dbldanda", "0965", + "dblgravecmb", "030F", + "dblintegral", "222C", + "dbllowline", "2017", + "dbllowlinecmb", "0333", + "dbloverlinecmb", "033F", + "dblprimemod", "02BA", + "dblverticalbar", "2016", + "dblverticallineabovecmb", "030E", + "dbopomofo", "3109", + "dbsquare", "33C8", + "dcaron", "010F", + "dcedilla", "1E11", + "dcircle", "24D3", + "dcircumflexbelow", "1E13", + "dcroat", "0111", + "ddabengali", "09A1", + "ddadeva", "0921", + "ddagujarati", "0AA1", + "ddagurmukhi", "0A21", + "ddalarabic", "0688", + "ddalfinalarabic", "FB89", + "dddhadeva", "095C", + "ddhabengali", "09A2", + "ddhadeva", "0922", + "ddhagujarati", "0AA2", + "ddhagurmukhi", "0A22", + "ddotaccent", "1E0B", + "ddotbelow", "1E0D", + "decimalseparatorarabic", "066B", + "decimalseparatorpersian", "066B", + "decyrillic", "0434", + "degree", "00B0", + "dehihebrew", "05AD", + "dehiragana", "3067", + "deicoptic", "03EF", + "dekatakana", "30C7", + "deleteleft", "232B", + "deleteright", "2326", + "delta", "03B4", + "deltaturned", "018D", + "denominatorminusonenumeratorbengali", "09F8", + "dezh", "02A4", + "dhabengali", "09A7", + "dhadeva", "0927", + "dhagujarati", "0AA7", + "dhagurmukhi", "0A27", + "dhook", "0257", + "dialytikatonos", "0385", + "dialytikatonoscmb", "0344", + "diamond", "2666", + "diamondsuitwhite", "2662", + "dieresis", "00A8", + "dieresisbelowcmb", "0324", + "dieresiscmb", "0308", + "dieresistonos", "0385", + "dihiragana", "3062", + "dikatakana", "30C2", + "dittomark", "3003", + "divide", "00F7", + "divides", "2223", + "divisionslash", "2215", + "djecyrillic", "0452", + "dkshade", "2593", + "dlinebelow", "1E0F", + "dlsquare", "3397", + "dmacron", "0111", + "dmonospace", "FF44", + "dnblock", "2584", + "dochadathai", "0E0E", + "dodekthai", "0E14", + "dohiragana", "3069", + "dokatakana", "30C9", + "dollar", "0024", + "dollarmonospace", "FF04", + "dollarsmall", "FE69", + "dong", "20AB", + "dorusquare", "3326", + "dotaccent", "02D9", + "dotaccentcmb", "0307", + "dotbelowcmb", "0323", + "dotbelowcomb", "0323", + "dotkatakana", "30FB", + "dotlessi", "0131", + "dotlessjstrokehook", "0284", + "dotmath", "22C5", + "dottedcircle", "25CC", + "doubleyodpatah", "FB1F", + "doubleyodpatahhebrew", "FB1F", + "downtackbelowcmb", "031E", + "downtackmod", "02D5", + "dparen", "249F", + "dtail", "0256", + "dtopbar", "018C", + "duhiragana", "3065", + "dukatakana", "30C5", + "dz", "01F3", + "dzaltone", "02A3", + "dzcaron", "01C6", + "dzcurl", "02A5", + "dzeabkhasiancyrillic", "04E1", + "dzecyrillic", "0455", + "dzhecyrillic", "045F", + "e", "0065", + "eacute", "00E9", + "earth", "2641", + "ebengali", "098F", + "ebopomofo", "311C", + "ebreve", "0115", + "ecandradeva", "090D", + "ecandragujarati", "0A8D", + "ecandravowelsigndeva", "0945", + "ecandravowelsigngujarati", "0AC5", + "ecaron", "011B", + "ecedillabreve", "1E1D", + "echarmenian", "0565", + "echyiwnarmenian", "0587", + "ecircle", "24D4", + "ecircumflex", "00EA", + "ecircumflexacute", "1EBF", + "ecircumflexbelow", "1E19", + "ecircumflexdotbelow", "1EC7", + "ecircumflexgrave", "1EC1", + "ecircumflexhookabove", "1EC3", + "ecircumflextilde", "1EC5", + "ecyrillic", "0454", + "edblgrave", "0205", + "edeva", "090F", + "edieresis", "00EB", + "edot", "0117", + "edotaccent", "0117", + "edotbelow", "1EB9", + "eegurmukhi", "0A0F", + "eematragurmukhi", "0A47", + "efcyrillic", "0444", + "egrave", "00E8", + "egujarati", "0A8F", + "eharmenian", "0567", + "ehbopomofo", "311D", + "ehiragana", "3048", + "ehookabove", "1EBB", + "eibopomofo", "311F", + "eight", "0038", + "eightarabic", "0668", + "eightbengali", "09EE", + "eightcircle", "2467", + "eightcircleinversesansserif", "2791", + "eightdeva", "096E", + "eighteencircle", "2471", + "eighteenparen", "2485", + "eighteenperiod", "2499", + "eightgujarati", "0AEE", + "eightgurmukhi", "0A6E", + "eighthackarabic", "0668", + "eighthangzhou", "3028", + "eighthnotebeamed", "266B", + "eightideographicparen", "3227", + "eightinferior", "2088", + "eightmonospace", "FF18", + "eightparen", "247B", + "eightperiod", "248F", + "eightpersian", "06F8", + "eightroman", "2177", + "eightsuperior", "2078", + "eightthai", "0E58", + "einvertedbreve", "0207", + "eiotifiedcyrillic", "0465", + "ekatakana", "30A8", + "ekatakanahalfwidth", "FF74", + "ekonkargurmukhi", "0A74", + "ekorean", "3154", + "elcyrillic", "043B", + "element", "2208", + "elevencircle", "246A", + "elevenparen", "247E", + "elevenperiod", "2492", + "elevenroman", "217A", + "ellipsis", "2026", + "ellipsisvertical", "22EE", + "emacron", "0113", + "emacronacute", "1E17", + "emacrongrave", "1E15", + "emcyrillic", "043C", + "emdash", "2014", + "emdashvertical", "FE31", + "emonospace", "FF45", + "emphasismarkarmenian", "055B", + "emptyset", "2205", + "enbopomofo", "3123", + "encyrillic", "043D", + "endash", "2013", + "endashvertical", "FE32", + "endescendercyrillic", "04A3", + "eng", "014B", + "engbopomofo", "3125", + "enghecyrillic", "04A5", + "enhookcyrillic", "04C8", + "enspace", "2002", + "eogonek", "0119", + "eokorean", "3153", + "eopen", "025B", + "eopenclosed", "029A", + "eopenreversed", "025C", + "eopenreversedclosed", "025E", + "eopenreversedhook", "025D", + "eparen", "24A0", + "epsilon", "03B5", + "epsilontonos", "03AD", + "equal", "003D", + "equalmonospace", "FF1D", + "equalsmall", "FE66", + "equalsuperior", "207C", + "equivalence", "2261", + "erbopomofo", "3126", + "ercyrillic", "0440", + "ereversed", "0258", + "ereversedcyrillic", "044D", + "escyrillic", "0441", + "esdescendercyrillic", "04AB", + "esh", "0283", + "eshcurl", "0286", + "eshortdeva", "090E", + "eshortvowelsigndeva", "0946", + "eshreversedloop", "01AA", + "eshsquatreversed", "0285", + "esmallhiragana", "3047", + "esmallkatakana", "30A7", + "esmallkatakanahalfwidth", "FF6A", + "estimated", "212E", + "eta", "03B7", + "etarmenian", "0568", + "etatonos", "03AE", + "eth", "00F0", + "etilde", "1EBD", + "etildebelow", "1E1B", + "etnahtafoukhhebrew", "0591", + "etnahtafoukhlefthebrew", "0591", + "etnahtahebrew", "0591", + "etnahtalefthebrew", "0591", + "eturned", "01DD", + "eukorean", "3161", + "euro", "20AC", + "evowelsignbengali", "09C7", + "evowelsigndeva", "0947", + "evowelsigngujarati", "0AC7", + "exclam", "0021", + "exclamarmenian", "055C", + "exclamdbl", "203C", + "exclamdown", "00A1", + "exclammonospace", "FF01", + "existential", "2203", + "ezh", "0292", + "ezhcaron", "01EF", + "ezhcurl", "0293", + "ezhreversed", "01B9", + "ezhtail", "01BA", + "f", "0066", + "fadeva", "095E", + "fagurmukhi", "0A5E", + "fahrenheit", "2109", + "fathaarabic", "064E", + "fathalowarabic", "064E", + "fathatanarabic", "064B", + "fbopomofo", "3108", + "fcircle", "24D5", + "fdotaccent", "1E1F", + "feharabic", "0641", + "feharmenian", "0586", + "fehfinalarabic", "FED2", + "fehinitialarabic", "FED3", + "fehmedialarabic", "FED4", + "feicoptic", "03E5", + "female", "2640", + "ff", "FB00", + "ffi", "FB03", + "ffl", "FB04", + "fi", "FB01", + "fifteencircle", "246E", + "fifteenparen", "2482", + "fifteenperiod", "2496", + "figuredash", "2012", + "filledbox", "25A0", + "filledrect", "25AC", + "finalkaf", "05DA", + "finalkafdagesh", "FB3A", + "finalkafdageshhebrew", "FB3A", + "finalkafhebrew", "05DA", + "finalkafqamats", "05DA_05B8", + "finalkafqamatshebrew", "05DA_05B8", + "finalkafsheva", "05DA_05B0", + "finalkafshevahebrew", "05DA_05B0", + "finalmem", "05DD", + "finalmemhebrew", "05DD", + "finalnun", "05DF", + "finalnunhebrew", "05DF", + "finalpe", "05E3", + "finalpehebrew", "05E3", + "finaltsadi", "05E5", + "finaltsadihebrew", "05E5", + "firsttonechinese", "02C9", + "fisheye", "25C9", + "fitacyrillic", "0473", + "five", "0035", + "fivearabic", "0665", + "fivebengali", "09EB", + "fivecircle", "2464", + "fivecircleinversesansserif", "278E", + "fivedeva", "096B", + "fiveeighths", "215D", + "fivegujarati", "0AEB", + "fivegurmukhi", "0A6B", + "fivehackarabic", "0665", + "fivehangzhou", "3025", + "fiveideographicparen", "3224", + "fiveinferior", "2085", + "fivemonospace", "FF15", + "fiveparen", "2478", + "fiveperiod", "248C", + "fivepersian", "06F5", + "fiveroman", "2174", + "fivesuperior", "2075", + "fivethai", "0E55", + "fl", "FB02", + "florin", "0192", + "fmonospace", "FF46", + "fmsquare", "3399", + "fofanthai", "0E1F", + "fofathai", "0E1D", + "fongmanthai", "0E4F", + "forall", "2200", + "four", "0034", + "fourarabic", "0664", + "fourbengali", "09EA", + "fourcircle", "2463", + "fourcircleinversesansserif", "278D", + "fourdeva", "096A", + "fourgujarati", "0AEA", + "fourgurmukhi", "0A6A", + "fourhackarabic", "0664", + "fourhangzhou", "3024", + "fourideographicparen", "3223", + "fourinferior", "2084", + "fourmonospace", "FF14", + "fournumeratorbengali", "09F7", + "fourparen", "2477", + "fourperiod", "248B", + "fourpersian", "06F4", + "fourroman", "2173", + "foursuperior", "2074", + "fourteencircle", "246D", + "fourteenparen", "2481", + "fourteenperiod", "2495", + "fourthai", "0E54", + "fourthtonechinese", "02CB", + "fparen", "24A1", + "fraction", "2044", + "franc", "20A3", + "g", "0067", + "gabengali", "0997", + "gacute", "01F5", + "gadeva", "0917", + "gafarabic", "06AF", + "gaffinalarabic", "FB93", + "gafinitialarabic", "FB94", + "gafmedialarabic", "FB95", + "gagujarati", "0A97", + "gagurmukhi", "0A17", + "gahiragana", "304C", + "gakatakana", "30AC", + "gamma", "03B3", + "gammalatinsmall", "0263", + "gammasuperior", "02E0", + "gangiacoptic", "03EB", + "gbopomofo", "310D", + "gbreve", "011F", + "gcaron", "01E7", + "gcedilla", "0123", + "gcircle", "24D6", + "gcircumflex", "011D", + "gcommaaccent", "0123", + "gdot", "0121", + "gdotaccent", "0121", + "gecyrillic", "0433", + "gehiragana", "3052", + "gekatakana", "30B2", + "geometricallyequal", "2251", + "gereshaccenthebrew", "059C", + "gereshhebrew", "05F3", + "gereshmuqdamhebrew", "059D", + "germandbls", "00DF", + "gershayimaccenthebrew", "059E", + "gershayimhebrew", "05F4", + "getamark", "3013", + "ghabengali", "0998", + "ghadarmenian", "0572", + "ghadeva", "0918", + "ghagujarati", "0A98", + "ghagurmukhi", "0A18", + "ghainarabic", "063A", + "ghainfinalarabic", "FECE", + "ghaininitialarabic", "FECF", + "ghainmedialarabic", "FED0", + "ghemiddlehookcyrillic", "0495", + "ghestrokecyrillic", "0493", + "gheupturncyrillic", "0491", + "ghhadeva", "095A", + "ghhagurmukhi", "0A5A", + "ghook", "0260", + "ghzsquare", "3393", + "gihiragana", "304E", + "gikatakana", "30AE", + "gimarmenian", "0563", + "gimel", "05D2", + "gimeldagesh", "FB32", + "gimeldageshhebrew", "FB32", + "gimelhebrew", "05D2", + "gjecyrillic", "0453", + "glottalinvertedstroke", "01BE", + "glottalstop", "0294", + "glottalstopinverted", "0296", + "glottalstopmod", "02C0", + "glottalstopreversed", "0295", + "glottalstopreversedmod", "02C1", + "glottalstopreversedsuperior", "02E4", + "glottalstopstroke", "02A1", + "glottalstopstrokereversed", "02A2", + "gmacron", "1E21", + "gmonospace", "FF47", + "gohiragana", "3054", + "gokatakana", "30B4", + "gparen", "24A2", + "gpasquare", "33AC", + "gradient", "2207", + "grave", "0060", + "gravebelowcmb", "0316", + "gravecmb", "0300", + "gravecomb", "0300", + "gravedeva", "0953", + "gravelowmod", "02CE", + "gravemonospace", "FF40", + "gravetonecmb", "0340", + "greater", "003E", + "greaterequal", "2265", + "greaterequalorless", "22DB", + "greatermonospace", "FF1E", + "greaterorequivalent", "2273", + "greaterorless", "2277", + "greateroverequal", "2267", + "greatersmall", "FE65", + "gscript", "0261", + "gstroke", "01E5", + "guhiragana", "3050", + "guillemotleft", "00AB", + "guillemotright", "00BB", + "guilsinglleft", "2039", + "guilsinglright", "203A", + "gukatakana", "30B0", + "guramusquare", "3318", + "gysquare", "33C9", + "h", "0068", + "haabkhasiancyrillic", "04A9", + "haaltonearabic", "06C1", + "habengali", "09B9", + "hadescendercyrillic", "04B3", + "hadeva", "0939", + "hagujarati", "0AB9", + "hagurmukhi", "0A39", + "haharabic", "062D", + "hahfinalarabic", "FEA2", + "hahinitialarabic", "FEA3", + "hahiragana", "306F", + "hahmedialarabic", "FEA4", + "haitusquare", "332A", + "hakatakana", "30CF", + "hakatakanahalfwidth", "FF8A", + "halantgurmukhi", "0A4D", + "hamzaarabic", "0621", + "hamzadammaarabic", "0621_064F", + "hamzadammatanarabic", "0621_064C", + "hamzafathaarabic", "0621_064E", + "hamzafathatanarabic", "0621_064B", + "hamzalowarabic", "0621", + "hamzalowkasraarabic", "0621_0650", + "hamzalowkasratanarabic", "0621_064D", + "hamzasukunarabic", "0621_0652", + "hangulfiller", "3164", + "hardsigncyrillic", "044A", + "harpoonleftbarbup", "21BC", + "harpoonrightbarbup", "21C0", + "hasquare", "33CA", + "hatafpatah", "05B2", + "hatafpatah16", "05B2", + "hatafpatah23", "05B2", + "hatafpatah2f", "05B2", + "hatafpatahhebrew", "05B2", + "hatafpatahnarrowhebrew", "05B2", + "hatafpatahquarterhebrew", "05B2", + "hatafpatahwidehebrew", "05B2", + "hatafqamats", "05B3", + "hatafqamats1b", "05B3", + "hatafqamats28", "05B3", + "hatafqamats34", "05B3", + "hatafqamatshebrew", "05B3", + "hatafqamatsnarrowhebrew", "05B3", + "hatafqamatsquarterhebrew", "05B3", + "hatafqamatswidehebrew", "05B3", + "hatafsegol", "05B1", + "hatafsegol17", "05B1", + "hatafsegol24", "05B1", + "hatafsegol30", "05B1", + "hatafsegolhebrew", "05B1", + "hatafsegolnarrowhebrew", "05B1", + "hatafsegolquarterhebrew", "05B1", + "hatafsegolwidehebrew", "05B1", + "hbar", "0127", + "hbopomofo", "310F", + "hbrevebelow", "1E2B", + "hcedilla", "1E29", + "hcircle", "24D7", + "hcircumflex", "0125", + "hdieresis", "1E27", + "hdotaccent", "1E23", + "hdotbelow", "1E25", + "he", "05D4", + "heart", "2665", + "heartsuitblack", "2665", + "heartsuitwhite", "2661", + "hedagesh", "FB34", + "hedageshhebrew", "FB34", + "hehaltonearabic", "06C1", + "heharabic", "0647", + "hehebrew", "05D4", + "hehfinalaltonearabic", "FBA7", + "hehfinalalttwoarabic", "FEEA", + "hehfinalarabic", "FEEA", + "hehhamzaabovefinalarabic", "FBA5", + "hehhamzaaboveisolatedarabic", "FBA4", + "hehinitialaltonearabic", "FBA8", + "hehinitialarabic", "FEEB", + "hehiragana", "3078", + "hehmedialaltonearabic", "FBA9", + "hehmedialarabic", "FEEC", + "heiseierasquare", "337B", + "hekatakana", "30D8", + "hekatakanahalfwidth", "FF8D", + "hekutaarusquare", "3336", + "henghook", "0267", + "herutusquare", "3339", + "het", "05D7", + "hethebrew", "05D7", + "hhook", "0266", + "hhooksuperior", "02B1", + "hieuhacirclekorean", "327B", + "hieuhaparenkorean", "321B", + "hieuhcirclekorean", "326D", + "hieuhkorean", "314E", + "hieuhparenkorean", "320D", + "hihiragana", "3072", + "hikatakana", "30D2", + "hikatakanahalfwidth", "FF8B", + "hiriq", "05B4", + "hiriq14", "05B4", + "hiriq21", "05B4", + "hiriq2d", "05B4", + "hiriqhebrew", "05B4", + "hiriqnarrowhebrew", "05B4", + "hiriqquarterhebrew", "05B4", + "hiriqwidehebrew", "05B4", + "hlinebelow", "1E96", + "hmonospace", "FF48", + "hoarmenian", "0570", + "hohipthai", "0E2B", + "hohiragana", "307B", + "hokatakana", "30DB", + "hokatakanahalfwidth", "FF8E", + "holam", "05B9", + "holam19", "05B9", + "holam26", "05B9", + "holam32", "05B9", + "holamhebrew", "05B9", + "holamnarrowhebrew", "05B9", + "holamquarterhebrew", "05B9", + "holamwidehebrew", "05B9", + "honokhukthai", "0E2E", + "hookabovecomb", "0309", + "hookcmb", "0309", + "hookpalatalizedbelowcmb", "0321", + "hookretroflexbelowcmb", "0322", + "hoonsquare", "3342", + "horicoptic", "03E9", + "horizontalbar", "2015", + "horncmb", "031B", + "hotsprings", "2668", + "house", "2302", + "hparen", "24A3", + "hsuperior", "02B0", + "hturned", "0265", + "huhiragana", "3075", + "huiitosquare", "3333", + "hukatakana", "30D5", + "hukatakanahalfwidth", "FF8C", + "hungarumlaut", "02DD", + "hungarumlautcmb", "030B", + "hv", "0195", + "hyphen", "002D", + "hyphenmonospace", "FF0D", + "hyphensmall", "FE63", + "hyphentwo", "2010", + "i", "0069", + "iacute", "00ED", + "iacyrillic", "044F", + "ibengali", "0987", + "ibopomofo", "3127", + "ibreve", "012D", + "icaron", "01D0", + "icircle", "24D8", + "icircumflex", "00EE", + "icyrillic", "0456", + "idblgrave", "0209", + "ideographearthcircle", "328F", + "ideographfirecircle", "328B", + "ideographicallianceparen", "323F", + "ideographiccallparen", "323A", + "ideographiccentrecircle", "32A5", + "ideographicclose", "3006", + "ideographiccomma", "3001", + "ideographiccommaleft", "FF64", + "ideographiccongratulationparen", "3237", + "ideographiccorrectcircle", "32A3", + "ideographicearthparen", "322F", + "ideographicenterpriseparen", "323D", + "ideographicexcellentcircle", "329D", + "ideographicfestivalparen", "3240", + "ideographicfinancialcircle", "3296", + "ideographicfinancialparen", "3236", + "ideographicfireparen", "322B", + "ideographichaveparen", "3232", + "ideographichighcircle", "32A4", + "ideographiciterationmark", "3005", + "ideographiclaborcircle", "3298", + "ideographiclaborparen", "3238", + "ideographicleftcircle", "32A7", + "ideographiclowcircle", "32A6", + "ideographicmedicinecircle", "32A9", + "ideographicmetalparen", "322E", + "ideographicmoonparen", "322A", + "ideographicnameparen", "3234", + "ideographicperiod", "3002", + "ideographicprintcircle", "329E", + "ideographicreachparen", "3243", + "ideographicrepresentparen", "3239", + "ideographicresourceparen", "323E", + "ideographicrightcircle", "32A8", + "ideographicsecretcircle", "3299", + "ideographicselfparen", "3242", + "ideographicsocietyparen", "3233", + "ideographicspace", "3000", + "ideographicspecialparen", "3235", + "ideographicstockparen", "3231", + "ideographicstudyparen", "323B", + "ideographicsunparen", "3230", + "ideographicsuperviseparen", "323C", + "ideographicwaterparen", "322C", + "ideographicwoodparen", "322D", + "ideographiczero", "3007", + "ideographmetalcircle", "328E", + "ideographmooncircle", "328A", + "ideographnamecircle", "3294", + "ideographsuncircle", "3290", + "ideographwatercircle", "328C", + "ideographwoodcircle", "328D", + "ideva", "0907", + "idieresis", "00EF", + "idieresisacute", "1E2F", + "idieresiscyrillic", "04E5", + "idotbelow", "1ECB", + "iebrevecyrillic", "04D7", + "iecyrillic", "0435", + "ieungacirclekorean", "3275", + "ieungaparenkorean", "3215", + "ieungcirclekorean", "3267", + "ieungkorean", "3147", + "ieungparenkorean", "3207", + "igrave", "00EC", + "igujarati", "0A87", + "igurmukhi", "0A07", + "ihiragana", "3044", + "ihookabove", "1EC9", + "iibengali", "0988", + "iicyrillic", "0438", + "iideva", "0908", + "iigujarati", "0A88", + "iigurmukhi", "0A08", + "iimatragurmukhi", "0A40", + "iinvertedbreve", "020B", + "iishortcyrillic", "0439", + "iivowelsignbengali", "09C0", + "iivowelsigndeva", "0940", + "iivowelsigngujarati", "0AC0", + "ij", "0133", + "ikatakana", "30A4", + "ikatakanahalfwidth", "FF72", + "ikorean", "3163", + "ilde", "02DC", + "iluyhebrew", "05AC", + "imacron", "012B", + "imacroncyrillic", "04E3", + "imageorapproximatelyequal", "2253", + "imatragurmukhi", "0A3F", + "imonospace", "FF49", + "increment", "2206", + "infinity", "221E", + "iniarmenian", "056B", + "integral", "222B", + "integralbottom", "2321", + "integralbt", "2321", + "integraltop", "2320", + "integraltp", "2320", + "intersection", "2229", + "intisquare", "3305", + "invbullet", "25D8", + "invcircle", "25D9", + "invsmileface", "263B", + "iocyrillic", "0451", + "iogonek", "012F", + "iota", "03B9", + "iotadieresis", "03CA", + "iotadieresistonos", "0390", + "iotalatin", "0269", + "iotatonos", "03AF", + "iparen", "24A4", + "irigurmukhi", "0A72", + "ismallhiragana", "3043", + "ismallkatakana", "30A3", + "ismallkatakanahalfwidth", "FF68", + "issharbengali", "09FA", + "istroke", "0268", + "iterationhiragana", "309D", + "iterationkatakana", "30FD", + "itilde", "0129", + "itildebelow", "1E2D", + "iubopomofo", "3129", + "iucyrillic", "044E", + "ivowelsignbengali", "09BF", + "ivowelsigndeva", "093F", + "ivowelsigngujarati", "0ABF", + "izhitsacyrillic", "0475", + "izhitsadblgravecyrillic", "0477", + "j", "006A", + "jaarmenian", "0571", + "jabengali", "099C", + "jadeva", "091C", + "jagujarati", "0A9C", + "jagurmukhi", "0A1C", + "jbopomofo", "3110", + "jcaron", "01F0", + "jcircle", "24D9", + "jcircumflex", "0135", + "jcrossedtail", "029D", + "jdotlessstroke", "025F", + "jecyrillic", "0458", + "jeemarabic", "062C", + "jeemfinalarabic", "FE9E", + "jeeminitialarabic", "FE9F", + "jeemmedialarabic", "FEA0", + "jeharabic", "0698", + "jehfinalarabic", "FB8B", + "jhabengali", "099D", + "jhadeva", "091D", + "jhagujarati", "0A9D", + "jhagurmukhi", "0A1D", + "jheharmenian", "057B", + "jis", "3004", + "jmonospace", "FF4A", + "jparen", "24A5", + "jsuperior", "02B2", + "k", "006B", + "kabashkircyrillic", "04A1", + "kabengali", "0995", + "kacute", "1E31", + "kacyrillic", "043A", + "kadescendercyrillic", "049B", + "kadeva", "0915", + "kaf", "05DB", + "kafarabic", "0643", + "kafdagesh", "FB3B", + "kafdageshhebrew", "FB3B", + "kaffinalarabic", "FEDA", + "kafhebrew", "05DB", + "kafinitialarabic", "FEDB", + "kafmedialarabic", "FEDC", + "kafrafehebrew", "FB4D", + "kagujarati", "0A95", + "kagurmukhi", "0A15", + "kahiragana", "304B", + "kahookcyrillic", "04C4", + "kakatakana", "30AB", + "kakatakanahalfwidth", "FF76", + "kappa", "03BA", + "kappasymbolgreek", "03F0", + "kapyeounmieumkorean", "3171", + "kapyeounphieuphkorean", "3184", + "kapyeounpieupkorean", "3178", + "kapyeounssangpieupkorean", "3179", + "karoriisquare", "330D", + "kashidaautoarabic", "0640", + "kashidaautonosidebearingarabic", "0640", + "kasmallkatakana", "30F5", + "kasquare", "3384", + "kasraarabic", "0650", + "kasratanarabic", "064D", + "kastrokecyrillic", "049F", + "katahiraprolongmarkhalfwidth", "FF70", + "kaverticalstrokecyrillic", "049D", + "kbopomofo", "310E", + "kcalsquare", "3389", + "kcaron", "01E9", + "kcedilla", "0137", + "kcircle", "24DA", + "kcommaaccent", "0137", + "kdotbelow", "1E33", + "keharmenian", "0584", + "kehiragana", "3051", + "kekatakana", "30B1", + "kekatakanahalfwidth", "FF79", + "kenarmenian", "056F", + "kesmallkatakana", "30F6", + "kgreenlandic", "0138", + "khabengali", "0996", + "khacyrillic", "0445", + "khadeva", "0916", + "khagujarati", "0A96", + "khagurmukhi", "0A16", + "khaharabic", "062E", + "khahfinalarabic", "FEA6", + "khahinitialarabic", "FEA7", + "khahmedialarabic", "FEA8", + "kheicoptic", "03E7", + "khhadeva", "0959", + "khhagurmukhi", "0A59", + "khieukhacirclekorean", "3278", + "khieukhaparenkorean", "3218", + "khieukhcirclekorean", "326A", + "khieukhkorean", "314B", + "khieukhparenkorean", "320A", + "khokhaithai", "0E02", + "khokhonthai", "0E05", + "khokhuatthai", "0E03", + "khokhwaithai", "0E04", + "khomutthai", "0E5B", + "khook", "0199", + "khorakhangthai", "0E06", + "khzsquare", "3391", + "kihiragana", "304D", + "kikatakana", "30AD", + "kikatakanahalfwidth", "FF77", + "kiroguramusquare", "3315", + "kiromeetorusquare", "3316", + "kirosquare", "3314", + "kiyeokacirclekorean", "326E", + "kiyeokaparenkorean", "320E", + "kiyeokcirclekorean", "3260", + "kiyeokkorean", "3131", + "kiyeokparenkorean", "3200", + "kiyeoksioskorean", "3133", + "kjecyrillic", "045C", + "klinebelow", "1E35", + "klsquare", "3398", + "kmcubedsquare", "33A6", + "kmonospace", "FF4B", + "kmsquaredsquare", "33A2", + "kohiragana", "3053", + "kohmsquare", "33C0", + "kokaithai", "0E01", + "kokatakana", "30B3", + "kokatakanahalfwidth", "FF7A", + "kooposquare", "331E", + "koppacyrillic", "0481", + "koreanstandardsymbol", "327F", + "koroniscmb", "0343", + "kparen", "24A6", + "kpasquare", "33AA", + "ksicyrillic", "046F", + "ktsquare", "33CF", + "kturned", "029E", + "kuhiragana", "304F", + "kukatakana", "30AF", + "kukatakanahalfwidth", "FF78", + "kvsquare", "33B8", + "kwsquare", "33BE", + "l", "006C", + "labengali", "09B2", + "lacute", "013A", + "ladeva", "0932", + "lagujarati", "0AB2", + "lagurmukhi", "0A32", + "lakkhangyaothai", "0E45", + "lamaleffinalarabic", "FEFC", + "lamalefhamzaabovefinalarabic", "FEF8", + "lamalefhamzaaboveisolatedarabic", "FEF7", + "lamalefhamzabelowfinalarabic", "FEFA", + "lamalefhamzabelowisolatedarabic", "FEF9", + "lamalefisolatedarabic", "FEFB", + "lamalefmaddaabovefinalarabic", "FEF6", + "lamalefmaddaaboveisolatedarabic", "FEF5", + "lamarabic", "0644", + "lambda", "03BB", + "lambdastroke", "019B", + "lamed", "05DC", + "lameddagesh", "FB3C", + "lameddageshhebrew", "FB3C", + "lamedhebrew", "05DC", + "lamedholam", "05DC_05B9", + "lamedholamdagesh", "05DC_05B9_05BC", + "lamedholamdageshhebrew", "05DC_05B9_05BC", + "lamedholamhebrew", "05DC_05B9", + "lamfinalarabic", "FEDE", + "lamhahinitialarabic", "FCCA", + "laminitialarabic", "FEDF", + "lamjeeminitialarabic", "FCC9", + "lamkhahinitialarabic", "FCCB", + "lamlamhehisolatedarabic", "FDF2", + "lammedialarabic", "FEE0", + "lammeemhahinitialarabic", "FD88", + "lammeeminitialarabic", "FCCC", + "lammeemjeeminitialarabic", "FEDF_FEE4_FEA0", + "lammeemkhahinitialarabic", "FEDF_FEE4_FEA8", + "largecircle", "25EF", + "lbar", "019A", + "lbelt", "026C", + "lbopomofo", "310C", + "lcaron", "013E", + "lcedilla", "013C", + "lcircle", "24DB", + "lcircumflexbelow", "1E3D", + "lcommaaccent", "013C", + "ldot", "0140", + "ldotaccent", "0140", + "ldotbelow", "1E37", + "ldotbelowmacron", "1E39", + "leftangleabovecmb", "031A", + "lefttackbelowcmb", "0318", + "less", "003C", + "lessequal", "2264", + "lessequalorgreater", "22DA", + "lessmonospace", "FF1C", + "lessorequivalent", "2272", + "lessorgreater", "2276", + "lessoverequal", "2266", + "lesssmall", "FE64", + "lezh", "026E", + "lfblock", "258C", + "lhookretroflex", "026D", + "lira", "20A4", + "liwnarmenian", "056C", + "lj", "01C9", + "ljecyrillic", "0459", + "lladeva", "0933", + "llagujarati", "0AB3", + "llinebelow", "1E3B", + "llladeva", "0934", + "llvocalicbengali", "09E1", + "llvocalicdeva", "0961", + "llvocalicvowelsignbengali", "09E3", + "llvocalicvowelsigndeva", "0963", + "lmiddletilde", "026B", + "lmonospace", "FF4C", + "lmsquare", "33D0", + "lochulathai", "0E2C", + "logicaland", "2227", + "logicalnot", "00AC", + "logicalnotreversed", "2310", + "logicalor", "2228", + "lolingthai", "0E25", + "longs", "017F", + "lowlinecenterline", "FE4E", + "lowlinecmb", "0332", + "lowlinedashed", "FE4D", + "lozenge", "25CA", + "lparen", "24A7", + "lslash", "0142", + "lsquare", "2113", + "ltshade", "2591", + "luthai", "0E26", + "lvocalicbengali", "098C", + "lvocalicdeva", "090C", + "lvocalicvowelsignbengali", "09E2", + "lvocalicvowelsigndeva", "0962", + "lxsquare", "33D3", + "m", "006D", + "mabengali", "09AE", + "macron", "00AF", + "macronbelowcmb", "0331", + "macroncmb", "0304", + "macronlowmod", "02CD", + "macronmonospace", "FFE3", + "macute", "1E3F", + "madeva", "092E", + "magujarati", "0AAE", + "magurmukhi", "0A2E", + "mahapakhhebrew", "05A4", + "mahapakhlefthebrew", "05A4", + "mahiragana", "307E", + "maichattawathai", "0E4B", + "maiekthai", "0E48", + "maihanakatthai", "0E31", + "maitaikhuthai", "0E47", + "maithothai", "0E49", + "maitrithai", "0E4A", + "maiyamokthai", "0E46", + "makatakana", "30DE", + "makatakanahalfwidth", "FF8F", + "male", "2642", + "mansyonsquare", "3347", + "maqafhebrew", "05BE", + "mars", "2642", + "masoracirclehebrew", "05AF", + "masquare", "3383", + "mbopomofo", "3107", + "mbsquare", "33D4", + "mcircle", "24DC", + "mcubedsquare", "33A5", + "mdotaccent", "1E41", + "mdotbelow", "1E43", + "meemarabic", "0645", + "meemfinalarabic", "FEE2", + "meeminitialarabic", "FEE3", + "meemmedialarabic", "FEE4", + "meemmeeminitialarabic", "FCD1", + "meemmeemisolatedarabic", "FC48", + "meetorusquare", "334D", + "mehiragana", "3081", + "meizierasquare", "337E", + "mekatakana", "30E1", + "mekatakanahalfwidth", "FF92", + "mem", "05DE", + "memdagesh", "FB3E", + "memdageshhebrew", "FB3E", + "memhebrew", "05DE", + "menarmenian", "0574", + "merkhahebrew", "05A5", + "merkhakefulahebrew", "05A6", + "merkhakefulalefthebrew", "05A6", + "merkhalefthebrew", "05A5", + "mhook", "0271", + "mhzsquare", "3392", + "middledotkatakanahalfwidth", "FF65", + "middot", "00B7", + "mieumacirclekorean", "3272", + "mieumaparenkorean", "3212", + "mieumcirclekorean", "3264", + "mieumkorean", "3141", + "mieumpansioskorean", "3170", + "mieumparenkorean", "3204", + "mieumpieupkorean", "316E", + "mieumsioskorean", "316F", + "mihiragana", "307F", + "mikatakana", "30DF", + "mikatakanahalfwidth", "FF90", + "minus", "2212", + "minusbelowcmb", "0320", + "minuscircle", "2296", + "minusmod", "02D7", + "minusplus", "2213", + "minute", "2032", + "miribaarusquare", "334A", + "mirisquare", "3349", + "mlonglegturned", "0270", + "mlsquare", "3396", + "mmcubedsquare", "33A3", + "mmonospace", "FF4D", + "mmsquaredsquare", "339F", + "mohiragana", "3082", + "mohmsquare", "33C1", + "mokatakana", "30E2", + "mokatakanahalfwidth", "FF93", + "molsquare", "33D6", + "momathai", "0E21", + "moverssquare", "33A7", + "moverssquaredsquare", "33A8", + "mparen", "24A8", + "mpasquare", "33AB", + "mssquare", "33B3", + "mturned", "026F", + "mu", "00B5", + "mu1", "00B5", + "muasquare", "3382", + "muchgreater", "226B", + "muchless", "226A", + "mufsquare", "338C", + "mugreek", "03BC", + "mugsquare", "338D", + "muhiragana", "3080", + "mukatakana", "30E0", + "mukatakanahalfwidth", "FF91", + "mulsquare", "3395", + "multiply", "00D7", + "mumsquare", "339B", + "munahhebrew", "05A3", + "munahlefthebrew", "05A3", + "musicalnote", "266A", + "musicalnotedbl", "266B", + "musicflatsign", "266D", + "musicsharpsign", "266F", + "mussquare", "33B2", + "muvsquare", "33B6", + "muwsquare", "33BC", + "mvmegasquare", "33B9", + "mvsquare", "33B7", + "mwmegasquare", "33BF", + "mwsquare", "33BD", + "n", "006E", + "nabengali", "09A8", + "nabla", "2207", + "nacute", "0144", + "nadeva", "0928", + "nagujarati", "0AA8", + "nagurmukhi", "0A28", + "nahiragana", "306A", + "nakatakana", "30CA", + "nakatakanahalfwidth", "FF85", + "napostrophe", "0149", + "nasquare", "3381", + "nbopomofo", "310B", + "nbspace", "00A0", + "ncaron", "0148", + "ncedilla", "0146", + "ncircle", "24DD", + "ncircumflexbelow", "1E4B", + "ncommaaccent", "0146", + "ndotaccent", "1E45", + "ndotbelow", "1E47", + "nehiragana", "306D", + "nekatakana", "30CD", + "nekatakanahalfwidth", "FF88", + "newsheqelsign", "20AA", + "nfsquare", "338B", + "ngabengali", "0999", + "ngadeva", "0919", + "ngagujarati", "0A99", + "ngagurmukhi", "0A19", + "ngonguthai", "0E07", + "nhiragana", "3093", + "nhookleft", "0272", + "nhookretroflex", "0273", + "nieunacirclekorean", "326F", + "nieunaparenkorean", "320F", + "nieuncieuckorean", "3135", + "nieuncirclekorean", "3261", + "nieunhieuhkorean", "3136", + "nieunkorean", "3134", + "nieunpansioskorean", "3168", + "nieunparenkorean", "3201", + "nieunsioskorean", "3167", + "nieuntikeutkorean", "3166", + "nihiragana", "306B", + "nikatakana", "30CB", + "nikatakanahalfwidth", "FF86", + "nikhahitthai", "0E4D", + "nine", "0039", + "ninearabic", "0669", + "ninebengali", "09EF", + "ninecircle", "2468", + "ninecircleinversesansserif", "2792", + "ninedeva", "096F", + "ninegujarati", "0AEF", + "ninegurmukhi", "0A6F", + "ninehackarabic", "0669", + "ninehangzhou", "3029", + "nineideographicparen", "3228", + "nineinferior", "2089", + "ninemonospace", "FF19", + "nineparen", "247C", + "nineperiod", "2490", + "ninepersian", "06F9", + "nineroman", "2178", + "ninesuperior", "2079", + "nineteencircle", "2472", + "nineteenparen", "2486", + "nineteenperiod", "249A", + "ninethai", "0E59", + "nj", "01CC", + "njecyrillic", "045A", + "nkatakana", "30F3", + "nkatakanahalfwidth", "FF9D", + "nlegrightlong", "019E", + "nlinebelow", "1E49", + "nmonospace", "FF4E", + "nmsquare", "339A", + "nnabengali", "09A3", + "nnadeva", "0923", + "nnagujarati", "0AA3", + "nnagurmukhi", "0A23", + "nnnadeva", "0929", + "nohiragana", "306E", + "nokatakana", "30CE", + "nokatakanahalfwidth", "FF89", + "nonbreakingspace", "00A0", + "nonenthai", "0E13", + "nonuthai", "0E19", + "noonarabic", "0646", + "noonfinalarabic", "FEE6", + "noonghunnaarabic", "06BA", + "noonghunnafinalarabic", "FB9F", + "noonhehinitialarabic", "FEE7_FEEC", + "nooninitialarabic", "FEE7", + "noonjeeminitialarabic", "FCD2", + "noonjeemisolatedarabic", "FC4B", + "noonmedialarabic", "FEE8", + "noonmeeminitialarabic", "FCD5", + "noonmeemisolatedarabic", "FC4E", + "noonnoonfinalarabic", "FC8D", + "notcontains", "220C", + "notelement", "2209", + "notelementof", "2209", + "notequal", "2260", + "notgreater", "226F", + "notgreaternorequal", "2271", + "notgreaternorless", "2279", + "notidentical", "2262", + "notless", "226E", + "notlessnorequal", "2270", + "notparallel", "2226", + "notprecedes", "2280", + "notsubset", "2284", + "notsucceeds", "2281", + "notsuperset", "2285", + "nowarmenian", "0576", + "nparen", "24A9", + "nssquare", "33B1", + "nsuperior", "207F", + "ntilde", "00F1", + "nu", "03BD", + "nuhiragana", "306C", + "nukatakana", "30CC", + "nukatakanahalfwidth", "FF87", + "nuktabengali", "09BC", + "nuktadeva", "093C", + "nuktagujarati", "0ABC", + "nuktagurmukhi", "0A3C", + "numbersign", "0023", + "numbersignmonospace", "FF03", + "numbersignsmall", "FE5F", + "numeralsigngreek", "0374", + "numeralsignlowergreek", "0375", + "numero", "2116", + "nun", "05E0", + "nundagesh", "FB40", + "nundageshhebrew", "FB40", + "nunhebrew", "05E0", + "nvsquare", "33B5", + "nwsquare", "33BB", + "nyabengali", "099E", + "nyadeva", "091E", + "nyagujarati", "0A9E", + "nyagurmukhi", "0A1E", + "o", "006F", + "oacute", "00F3", + "oangthai", "0E2D", + "obarred", "0275", + "obarredcyrillic", "04E9", + "obarreddieresiscyrillic", "04EB", + "obengali", "0993", + "obopomofo", "311B", + "obreve", "014F", + "ocandradeva", "0911", + "ocandragujarati", "0A91", + "ocandravowelsigndeva", "0949", + "ocandravowelsigngujarati", "0AC9", + "ocaron", "01D2", + "ocircle", "24DE", + "ocircumflex", "00F4", + "ocircumflexacute", "1ED1", + "ocircumflexdotbelow", "1ED9", + "ocircumflexgrave", "1ED3", + "ocircumflexhookabove", "1ED5", + "ocircumflextilde", "1ED7", + "ocyrillic", "043E", + "odblacute", "0151", + "odblgrave", "020D", + "odeva", "0913", + "odieresis", "00F6", + "odieresiscyrillic", "04E7", + "odotbelow", "1ECD", + "oe", "0153", + "oekorean", "315A", + "ogonek", "02DB", + "ogonekcmb", "0328", + "ograve", "00F2", + "ogujarati", "0A93", + "oharmenian", "0585", + "ohiragana", "304A", + "ohookabove", "1ECF", + "ohorn", "01A1", + "ohornacute", "1EDB", + "ohorndotbelow", "1EE3", + "ohorngrave", "1EDD", + "ohornhookabove", "1EDF", + "ohorntilde", "1EE1", + "ohungarumlaut", "0151", + "oi", "01A3", + "oinvertedbreve", "020F", + "okatakana", "30AA", + "okatakanahalfwidth", "FF75", + "okorean", "3157", + "olehebrew", "05AB", + "omacron", "014D", + "omacronacute", "1E53", + "omacrongrave", "1E51", + "omdeva", "0950", + "omega", "03C9", + "omega1", "03D6", + "omegacyrillic", "0461", + "omegalatinclosed", "0277", + "omegaroundcyrillic", "047B", + "omegatitlocyrillic", "047D", + "omegatonos", "03CE", + "omgujarati", "0AD0", + "omicron", "03BF", + "omicrontonos", "03CC", + "omonospace", "FF4F", + "one", "0031", + "onearabic", "0661", + "onebengali", "09E7", + "onecircle", "2460", + "onecircleinversesansserif", "278A", + "onedeva", "0967", + "onedotenleader", "2024", + "oneeighth", "215B", + "onegujarati", "0AE7", + "onegurmukhi", "0A67", + "onehackarabic", "0661", + "onehalf", "00BD", + "onehangzhou", "3021", + "oneideographicparen", "3220", + "oneinferior", "2081", + "onemonospace", "FF11", + "onenumeratorbengali", "09F4", + "oneparen", "2474", + "oneperiod", "2488", + "onepersian", "06F1", + "onequarter", "00BC", + "oneroman", "2170", + "onesuperior", "00B9", + "onethai", "0E51", + "onethird", "2153", + "oogonek", "01EB", + "oogonekmacron", "01ED", + "oogurmukhi", "0A13", + "oomatragurmukhi", "0A4B", + "oopen", "0254", + "oparen", "24AA", + "openbullet", "25E6", + "option", "2325", + "ordfeminine", "00AA", + "ordmasculine", "00BA", + "orthogonal", "221F", + "oshortdeva", "0912", + "oshortvowelsigndeva", "094A", + "oslash", "00F8", + "oslashacute", "01FF", + "osmallhiragana", "3049", + "osmallkatakana", "30A9", + "osmallkatakanahalfwidth", "FF6B", + "ostrokeacute", "01FF", + "otcyrillic", "047F", + "otilde", "00F5", + "otildeacute", "1E4D", + "otildedieresis", "1E4F", + "oubopomofo", "3121", + "overline", "203E", + "overlinecenterline", "FE4A", + "overlinecmb", "0305", + "overlinedashed", "FE49", + "overlinedblwavy", "FE4C", + "overlinewavy", "FE4B", + "overscore", "00AF", + "ovowelsignbengali", "09CB", + "ovowelsigndeva", "094B", + "ovowelsigngujarati", "0ACB", + "p", "0070", + "paampssquare", "3380", + "paasentosquare", "332B", + "pabengali", "09AA", + "pacute", "1E55", + "padeva", "092A", + "pagedown", "21DF", + "pageup", "21DE", + "pagujarati", "0AAA", + "pagurmukhi", "0A2A", + "pahiragana", "3071", + "paiyannoithai", "0E2F", + "pakatakana", "30D1", + "palatalizationcyrilliccmb", "0484", + "palochkacyrillic", "04C0", + "pansioskorean", "317F", + "paragraph", "00B6", + "parallel", "2225", + "parenleft", "0028", + "parenleftaltonearabic", "FD3E", + "parenleftinferior", "208D", + "parenleftmonospace", "FF08", + "parenleftsmall", "FE59", + "parenleftsuperior", "207D", + "parenleftvertical", "FE35", + "parenright", "0029", + "parenrightaltonearabic", "FD3F", + "parenrightinferior", "208E", + "parenrightmonospace", "FF09", + "parenrightsmall", "FE5A", + "parenrightsuperior", "207E", + "parenrightvertical", "FE36", + "partialdiff", "2202", + "paseqhebrew", "05C0", + "pashtahebrew", "0599", + "pasquare", "33A9", + "patah", "05B7", + "patah11", "05B7", + "patah1d", "05B7", + "patah2a", "05B7", + "patahhebrew", "05B7", + "patahnarrowhebrew", "05B7", + "patahquarterhebrew", "05B7", + "patahwidehebrew", "05B7", + "pazerhebrew", "05A1", + "pbopomofo", "3106", + "pcircle", "24DF", + "pdotaccent", "1E57", + "pe", "05E4", + "pecyrillic", "043F", + "pedagesh", "FB44", + "pedageshhebrew", "FB44", + "peezisquare", "333B", + "pefinaldageshhebrew", "FB43", + "peharabic", "067E", + "peharmenian", "057A", + "pehebrew", "05E4", + "pehfinalarabic", "FB57", + "pehinitialarabic", "FB58", + "pehiragana", "307A", + "pehmedialarabic", "FB59", + "pekatakana", "30DA", + "pemiddlehookcyrillic", "04A7", + "perafehebrew", "FB4E", + "percent", "0025", + "percentarabic", "066A", + "percentmonospace", "FF05", + "percentsmall", "FE6A", + "period", "002E", + "periodarmenian", "0589", + "periodcentered", "00B7", + "periodhalfwidth", "FF61", + "periodmonospace", "FF0E", + "periodsmall", "FE52", + "perispomenigreekcmb", "0342", + "perpendicular", "22A5", + "perthousand", "2030", + "peseta", "20A7", + "pfsquare", "338A", + "phabengali", "09AB", + "phadeva", "092B", + "phagujarati", "0AAB", + "phagurmukhi", "0A2B", + "phi", "03C6", + "phi1", "03D5", + "phieuphacirclekorean", "327A", + "phieuphaparenkorean", "321A", + "phieuphcirclekorean", "326C", + "phieuphkorean", "314D", + "phieuphparenkorean", "320C", + "philatin", "0278", + "phinthuthai", "0E3A", + "phisymbolgreek", "03D5", + "phook", "01A5", + "phophanthai", "0E1E", + "phophungthai", "0E1C", + "phosamphaothai", "0E20", + "pi", "03C0", + "pieupacirclekorean", "3273", + "pieupaparenkorean", "3213", + "pieupcieuckorean", "3176", + "pieupcirclekorean", "3265", + "pieupkiyeokkorean", "3172", + "pieupkorean", "3142", + "pieupparenkorean", "3205", + "pieupsioskiyeokkorean", "3174", + "pieupsioskorean", "3144", + "pieupsiostikeutkorean", "3175", + "pieupthieuthkorean", "3177", + "pieuptikeutkorean", "3173", + "pihiragana", "3074", + "pikatakana", "30D4", + "pisymbolgreek", "03D6", + "piwrarmenian", "0583", + "plus", "002B", + "plusbelowcmb", "031F", + "pluscircle", "2295", + "plusminus", "00B1", + "plusmod", "02D6", + "plusmonospace", "FF0B", + "plussmall", "FE62", + "plussuperior", "207A", + "pmonospace", "FF50", + "pmsquare", "33D8", + "pohiragana", "307D", + "pointingindexdownwhite", "261F", + "pointingindexleftwhite", "261C", + "pointingindexrightwhite", "261E", + "pointingindexupwhite", "261D", + "pokatakana", "30DD", + "poplathai", "0E1B", + "postalmark", "3012", + "postalmarkface", "3020", + "pparen", "24AB", + "precedes", "227A", + "prescription", "211E", + "primemod", "02B9", + "primereversed", "2035", + "product", "220F", + "projective", "2305", + "prolongedkana", "30FC", + "propellor", "2318", + "propersubset", "2282", + "propersuperset", "2283", + "proportion", "2237", + "proportional", "221D", + "psi", "03C8", + "psicyrillic", "0471", + "psilipneumatacyrilliccmb", "0486", + "pssquare", "33B0", + "puhiragana", "3077", + "pukatakana", "30D7", + "pvsquare", "33B4", + "pwsquare", "33BA", + "q", "0071", + "qadeva", "0958", + "qadmahebrew", "05A8", + "qafarabic", "0642", + "qaffinalarabic", "FED6", + "qafinitialarabic", "FED7", + "qafmedialarabic", "FED8", + "qamats", "05B8", + "qamats10", "05B8", + "qamats1a", "05B8", + "qamats1c", "05B8", + "qamats27", "05B8", + "qamats29", "05B8", + "qamats33", "05B8", + "qamatsde", "05B8", + "qamatshebrew", "05B8", + "qamatsnarrowhebrew", "05B8", + "qamatsqatanhebrew", "05B8", + "qamatsqatannarrowhebrew", "05B8", + "qamatsqatanquarterhebrew", "05B8", + "qamatsqatanwidehebrew", "05B8", + "qamatsquarterhebrew", "05B8", + "qamatswidehebrew", "05B8", + "qarneyparahebrew", "059F", + "qbopomofo", "3111", + "qcircle", "24E0", + "qhook", "02A0", + "qmonospace", "FF51", + "qof", "05E7", + "qofdagesh", "FB47", + "qofdageshhebrew", "FB47", + "qofhatafpatah", "05E7_05B2", + "qofhatafpatahhebrew", "05E7_05B2", + "qofhatafsegol", "05E7_05B1", + "qofhatafsegolhebrew", "05E7_05B1", + "qofhebrew", "05E7", + "qofhiriq", "05E7_05B4", + "qofhiriqhebrew", "05E7_05B4", + "qofholam", "05E7_05B9", + "qofholamhebrew", "05E7_05B9", + "qofpatah", "05E7_05B7", + "qofpatahhebrew", "05E7_05B7", + "qofqamats", "05E7_05B8", + "qofqamatshebrew", "05E7_05B8", + "qofqubuts", "05E7_05BB", + "qofqubutshebrew", "05E7_05BB", + "qofsegol", "05E7_05B6", + "qofsegolhebrew", "05E7_05B6", + "qofsheva", "05E7_05B0", + "qofshevahebrew", "05E7_05B0", + "qoftsere", "05E7_05B5", + "qoftserehebrew", "05E7_05B5", + "qparen", "24AC", + "quarternote", "2669", + "qubuts", "05BB", + "qubuts18", "05BB", + "qubuts25", "05BB", + "qubuts31", "05BB", + "qubutshebrew", "05BB", + "qubutsnarrowhebrew", "05BB", + "qubutsquarterhebrew", "05BB", + "qubutswidehebrew", "05BB", + "question", "003F", + "questionarabic", "061F", + "questionarmenian", "055E", + "questiondown", "00BF", + "questiongreek", "037E", + "questionmonospace", "FF1F", + "quotedbl", "0022", + "quotedblbase", "201E", + "quotedblleft", "201C", + "quotedblmonospace", "FF02", + "quotedblprime", "301E", + "quotedblprimereversed", "301D", + "quotedblright", "201D", + "quoteleft", "2018", + "quoteleftreversed", "201B", + "quotereversed", "201B", + "quoteright", "2019", + "quoterightn", "0149", + "quotesinglbase", "201A", + "quotesingle", "0027", + "quotesinglemonospace", "FF07", + "r", "0072", + "raarmenian", "057C", + "rabengali", "09B0", + "racute", "0155", + "radeva", "0930", + "radical", "221A", + "radoverssquare", "33AE", + "radoverssquaredsquare", "33AF", + "radsquare", "33AD", + "rafe", "05BF", + "rafehebrew", "05BF", + "ragujarati", "0AB0", + "ragurmukhi", "0A30", + "rahiragana", "3089", + "rakatakana", "30E9", + "rakatakanahalfwidth", "FF97", + "ralowerdiagonalbengali", "09F1", + "ramiddlediagonalbengali", "09F0", + "ramshorn", "0264", + "ratio", "2236", + "rbopomofo", "3116", + "rcaron", "0159", + "rcedilla", "0157", + "rcircle", "24E1", + "rcommaaccent", "0157", + "rdblgrave", "0211", + "rdotaccent", "1E59", + "rdotbelow", "1E5B", + "rdotbelowmacron", "1E5D", + "referencemark", "203B", + "reflexsubset", "2286", + "reflexsuperset", "2287", + "registered", "00AE", + "reharabic", "0631", + "reharmenian", "0580", + "rehfinalarabic", "FEAE", + "rehiragana", "308C", + "rehyehaleflamarabic", "0631_FEF3_FE8E_0644", + "rekatakana", "30EC", + "rekatakanahalfwidth", "FF9A", + "resh", "05E8", + "reshdageshhebrew", "FB48", + "reshhatafpatah", "05E8_05B2", + "reshhatafpatahhebrew", "05E8_05B2", + "reshhatafsegol", "05E8_05B1", + "reshhatafsegolhebrew", "05E8_05B1", + "reshhebrew", "05E8", + "reshhiriq", "05E8_05B4", + "reshhiriqhebrew", "05E8_05B4", + "reshholam", "05E8_05B9", + "reshholamhebrew", "05E8_05B9", + "reshpatah", "05E8_05B7", + "reshpatahhebrew", "05E8_05B7", + "reshqamats", "05E8_05B8", + "reshqamatshebrew", "05E8_05B8", + "reshqubuts", "05E8_05BB", + "reshqubutshebrew", "05E8_05BB", + "reshsegol", "05E8_05B6", + "reshsegolhebrew", "05E8_05B6", + "reshsheva", "05E8_05B0", + "reshshevahebrew", "05E8_05B0", + "reshtsere", "05E8_05B5", + "reshtserehebrew", "05E8_05B5", + "reversedtilde", "223D", + "reviahebrew", "0597", + "reviamugrashhebrew", "0597", + "revlogicalnot", "2310", + "rfishhook", "027E", + "rfishhookreversed", "027F", + "rhabengali", "09DD", + "rhadeva", "095D", + "rho", "03C1", + "rhook", "027D", + "rhookturned", "027B", + "rhookturnedsuperior", "02B5", + "rhosymbolgreek", "03F1", + "rhotichookmod", "02DE", + "rieulacirclekorean", "3271", + "rieulaparenkorean", "3211", + "rieulcirclekorean", "3263", + "rieulhieuhkorean", "3140", + "rieulkiyeokkorean", "313A", + "rieulkiyeoksioskorean", "3169", + "rieulkorean", "3139", + "rieulmieumkorean", "313B", + "rieulpansioskorean", "316C", + "rieulparenkorean", "3203", + "rieulphieuphkorean", "313F", + "rieulpieupkorean", "313C", + "rieulpieupsioskorean", "316B", + "rieulsioskorean", "313D", + "rieulthieuthkorean", "313E", + "rieultikeutkorean", "316A", + "rieulyeorinhieuhkorean", "316D", + "rightangle", "221F", + "righttackbelowcmb", "0319", + "righttriangle", "22BF", + "rihiragana", "308A", + "rikatakana", "30EA", + "rikatakanahalfwidth", "FF98", + "ring", "02DA", + "ringbelowcmb", "0325", + "ringcmb", "030A", + "ringhalfleft", "02BF", + "ringhalfleftarmenian", "0559", + "ringhalfleftbelowcmb", "031C", + "ringhalfleftcentered", "02D3", + "ringhalfright", "02BE", + "ringhalfrightbelowcmb", "0339", + "ringhalfrightcentered", "02D2", + "rinvertedbreve", "0213", + "rittorusquare", "3351", + "rlinebelow", "1E5F", + "rlongleg", "027C", + "rlonglegturned", "027A", + "rmonospace", "FF52", + "rohiragana", "308D", + "rokatakana", "30ED", + "rokatakanahalfwidth", "FF9B", + "roruathai", "0E23", + "rparen", "24AD", + "rrabengali", "09DC", + "rradeva", "0931", + "rragurmukhi", "0A5C", + "rreharabic", "0691", + "rrehfinalarabic", "FB8D", + "rrvocalicbengali", "09E0", + "rrvocalicdeva", "0960", + "rrvocalicgujarati", "0AE0", + "rrvocalicvowelsignbengali", "09C4", + "rrvocalicvowelsigndeva", "0944", + "rrvocalicvowelsigngujarati", "0AC4", + "rtblock", "2590", + "rturned", "0279", + "rturnedsuperior", "02B4", + "ruhiragana", "308B", + "rukatakana", "30EB", + "rukatakanahalfwidth", "FF99", + "rupeemarkbengali", "09F2", + "rupeesignbengali", "09F3", + "ruthai", "0E24", + "rvocalicbengali", "098B", + "rvocalicdeva", "090B", + "rvocalicgujarati", "0A8B", + "rvocalicvowelsignbengali", "09C3", + "rvocalicvowelsigndeva", "0943", + "rvocalicvowelsigngujarati", "0AC3", + "s", "0073", + "sabengali", "09B8", + "sacute", "015B", + "sacutedotaccent", "1E65", + "sadarabic", "0635", + "sadeva", "0938", + "sadfinalarabic", "FEBA", + "sadinitialarabic", "FEBB", + "sadmedialarabic", "FEBC", + "sagujarati", "0AB8", + "sagurmukhi", "0A38", + "sahiragana", "3055", + "sakatakana", "30B5", + "sakatakanahalfwidth", "FF7B", + "sallallahoualayhewasallamarabic", "FDFA", + "samekh", "05E1", + "samekhdagesh", "FB41", + "samekhdageshhebrew", "FB41", + "samekhhebrew", "05E1", + "saraaathai", "0E32", + "saraaethai", "0E41", + "saraaimaimalaithai", "0E44", + "saraaimaimuanthai", "0E43", + "saraamthai", "0E33", + "saraathai", "0E30", + "saraethai", "0E40", + "saraiithai", "0E35", + "saraithai", "0E34", + "saraothai", "0E42", + "saraueethai", "0E37", + "sarauethai", "0E36", + "sarauthai", "0E38", + "sarauuthai", "0E39", + "sbopomofo", "3119", + "scaron", "0161", + "scarondotaccent", "1E67", + "scedilla", "015F", + "schwa", "0259", + "schwacyrillic", "04D9", + "schwadieresiscyrillic", "04DB", + "schwahook", "025A", + "scircle", "24E2", + "scircumflex", "015D", + "scommaaccent", "0219", + "sdotaccent", "1E61", + "sdotbelow", "1E63", + "sdotbelowdotaccent", "1E69", + "seagullbelowcmb", "033C", + "second", "2033", + "secondtonechinese", "02CA", + "section", "00A7", + "seenarabic", "0633", + "seenfinalarabic", "FEB2", + "seeninitialarabic", "FEB3", + "seenmedialarabic", "FEB4", + "segol", "05B6", + "segol13", "05B6", + "segol1f", "05B6", + "segol2c", "05B6", + "segolhebrew", "05B6", + "segolnarrowhebrew", "05B6", + "segolquarterhebrew", "05B6", + "segoltahebrew", "0592", + "segolwidehebrew", "05B6", + "seharmenian", "057D", + "sehiragana", "305B", + "sekatakana", "30BB", + "sekatakanahalfwidth", "FF7E", + "semicolon", "003B", + "semicolonarabic", "061B", + "semicolonmonospace", "FF1B", + "semicolonsmall", "FE54", + "semivoicedmarkkana", "309C", + "semivoicedmarkkanahalfwidth", "FF9F", + "sentisquare", "3322", + "sentosquare", "3323", + "seven", "0037", + "sevenarabic", "0667", + "sevenbengali", "09ED", + "sevencircle", "2466", + "sevencircleinversesansserif", "2790", + "sevendeva", "096D", + "seveneighths", "215E", + "sevengujarati", "0AED", + "sevengurmukhi", "0A6D", + "sevenhackarabic", "0667", + "sevenhangzhou", "3027", + "sevenideographicparen", "3226", + "seveninferior", "2087", + "sevenmonospace", "FF17", + "sevenparen", "247A", + "sevenperiod", "248E", + "sevenpersian", "06F7", + "sevenroman", "2176", + "sevensuperior", "2077", + "seventeencircle", "2470", + "seventeenparen", "2484", + "seventeenperiod", "2498", + "seventhai", "0E57", + "sfthyphen", "00AD", + "shaarmenian", "0577", + "shabengali", "09B6", + "shacyrillic", "0448", + "shaddaarabic", "0651", + "shaddadammaarabic", "FC61", + "shaddadammatanarabic", "FC5E", + "shaddafathaarabic", "FC60", + "shaddafathatanarabic", "0651_064B", + "shaddakasraarabic", "FC62", + "shaddakasratanarabic", "FC5F", + "shade", "2592", + "shadedark", "2593", + "shadelight", "2591", + "shademedium", "2592", + "shadeva", "0936", + "shagujarati", "0AB6", + "shagurmukhi", "0A36", + "shalshelethebrew", "0593", + "shbopomofo", "3115", + "shchacyrillic", "0449", + "sheenarabic", "0634", + "sheenfinalarabic", "FEB6", + "sheeninitialarabic", "FEB7", + "sheenmedialarabic", "FEB8", + "sheicoptic", "03E3", + "sheqel", "20AA", + "sheqelhebrew", "20AA", + "sheva", "05B0", + "sheva115", "05B0", + "sheva15", "05B0", + "sheva22", "05B0", + "sheva2e", "05B0", + "shevahebrew", "05B0", + "shevanarrowhebrew", "05B0", + "shevaquarterhebrew", "05B0", + "shevawidehebrew", "05B0", + "shhacyrillic", "04BB", + "shimacoptic", "03ED", + "shin", "05E9", + "shindagesh", "FB49", + "shindageshhebrew", "FB49", + "shindageshshindot", "FB2C", + "shindageshshindothebrew", "FB2C", + "shindageshsindot", "FB2D", + "shindageshsindothebrew", "FB2D", + "shindothebrew", "05C1", + "shinhebrew", "05E9", + "shinshindot", "FB2A", + "shinshindothebrew", "FB2A", + "shinsindot", "FB2B", + "shinsindothebrew", "FB2B", + "shook", "0282", + "sigma", "03C3", + "sigma1", "03C2", + "sigmafinal", "03C2", + "sigmalunatesymbolgreek", "03F2", + "sihiragana", "3057", + "sikatakana", "30B7", + "sikatakanahalfwidth", "FF7C", + "siluqhebrew", "05BD", + "siluqlefthebrew", "05BD", + "similar", "223C", + "sindothebrew", "05C2", + "siosacirclekorean", "3274", + "siosaparenkorean", "3214", + "sioscieuckorean", "317E", + "sioscirclekorean", "3266", + "sioskiyeokkorean", "317A", + "sioskorean", "3145", + "siosnieunkorean", "317B", + "siosparenkorean", "3206", + "siospieupkorean", "317D", + "siostikeutkorean", "317C", + "six", "0036", + "sixarabic", "0666", + "sixbengali", "09EC", + "sixcircle", "2465", + "sixcircleinversesansserif", "278F", + "sixdeva", "096C", + "sixgujarati", "0AEC", + "sixgurmukhi", "0A6C", + "sixhackarabic", "0666", + "sixhangzhou", "3026", + "sixideographicparen", "3225", + "sixinferior", "2086", + "sixmonospace", "FF16", + "sixparen", "2479", + "sixperiod", "248D", + "sixpersian", "06F6", + "sixroman", "2175", + "sixsuperior", "2076", + "sixteencircle", "246F", + "sixteencurrencydenominatorbengali", "09F9", + "sixteenparen", "2483", + "sixteenperiod", "2497", + "sixthai", "0E56", + "slash", "002F", + "slashmonospace", "FF0F", + "slong", "017F", + "slongdotaccent", "1E9B", + "smileface", "263A", + "smonospace", "FF53", + "sofpasuqhebrew", "05C3", + "softhyphen", "00AD", + "softsigncyrillic", "044C", + "sohiragana", "305D", + "sokatakana", "30BD", + "sokatakanahalfwidth", "FF7F", + "soliduslongoverlaycmb", "0338", + "solidusshortoverlaycmb", "0337", + "sorusithai", "0E29", + "sosalathai", "0E28", + "sosothai", "0E0B", + "sosuathai", "0E2A", + "space", "0020", + "spacehackarabic", "0020", + "spade", "2660", + "spadesuitblack", "2660", + "spadesuitwhite", "2664", + "sparen", "24AE", + "squarebelowcmb", "033B", + "squarecc", "33C4", + "squarecm", "339D", + "squarediagonalcrosshatchfill", "25A9", + "squarehorizontalfill", "25A4", + "squarekg", "338F", + "squarekm", "339E", + "squarekmcapital", "33CE", + "squareln", "33D1", + "squarelog", "33D2", + "squaremg", "338E", + "squaremil", "33D5", + "squaremm", "339C", + "squaremsquared", "33A1", + "squareorthogonalcrosshatchfill", "25A6", + "squareupperlefttolowerrightfill", "25A7", + "squareupperrighttolowerleftfill", "25A8", + "squareverticalfill", "25A5", + "squarewhitewithsmallblack", "25A3", + "srsquare", "33DB", + "ssabengali", "09B7", + "ssadeva", "0937", + "ssagujarati", "0AB7", + "ssangcieuckorean", "3149", + "ssanghieuhkorean", "3185", + "ssangieungkorean", "3180", + "ssangkiyeokkorean", "3132", + "ssangnieunkorean", "3165", + "ssangpieupkorean", "3143", + "ssangsioskorean", "3146", + "ssangtikeutkorean", "3138", + "sterling", "00A3", + "sterlingmonospace", "FFE1", + "strokelongoverlaycmb", "0336", + "strokeshortoverlaycmb", "0335", + "subset", "2282", + "subsetnotequal", "228A", + "subsetorequal", "2286", + "succeeds", "227B", + "suchthat", "220B", + "suhiragana", "3059", + "sukatakana", "30B9", + "sukatakanahalfwidth", "FF7D", + "sukunarabic", "0652", + "summation", "2211", + "sun", "263C", + "superset", "2283", + "supersetnotequal", "228B", + "supersetorequal", "2287", + "svsquare", "33DC", + "syouwaerasquare", "337C", + "t", "0074", + "tabengali", "09A4", + "tackdown", "22A4", + "tackleft", "22A3", + "tadeva", "0924", + "tagujarati", "0AA4", + "tagurmukhi", "0A24", + "taharabic", "0637", + "tahfinalarabic", "FEC2", + "tahinitialarabic", "FEC3", + "tahiragana", "305F", + "tahmedialarabic", "FEC4", + "taisyouerasquare", "337D", + "takatakana", "30BF", + "takatakanahalfwidth", "FF80", + "tatweelarabic", "0640", + "tau", "03C4", + "tav", "05EA", + "tavdages", "FB4A", + "tavdagesh", "FB4A", + "tavdageshhebrew", "FB4A", + "tavhebrew", "05EA", + "tbar", "0167", + "tbopomofo", "310A", + "tcaron", "0165", + "tccurl", "02A8", + "tcedilla", "0163", + "tcheharabic", "0686", + "tchehfinalarabic", "FB7B", + "tchehinitialarabic", "FB7C", + "tchehmedialarabic", "FB7D", + "tchehmeeminitialarabic", "FB7C_FEE4", + "tcircle", "24E3", + "tcircumflexbelow", "1E71", + "tcommaaccent", "0163", + "tdieresis", "1E97", + "tdotaccent", "1E6B", + "tdotbelow", "1E6D", + "tecyrillic", "0442", + "tedescendercyrillic", "04AD", + "teharabic", "062A", + "tehfinalarabic", "FE96", + "tehhahinitialarabic", "FCA2", + "tehhahisolatedarabic", "FC0C", + "tehinitialarabic", "FE97", + "tehiragana", "3066", + "tehjeeminitialarabic", "FCA1", + "tehjeemisolatedarabic", "FC0B", + "tehmarbutaarabic", "0629", + "tehmarbutafinalarabic", "FE94", + "tehmedialarabic", "FE98", + "tehmeeminitialarabic", "FCA4", + "tehmeemisolatedarabic", "FC0E", + "tehnoonfinalarabic", "FC73", + "tekatakana", "30C6", + "tekatakanahalfwidth", "FF83", + "telephone", "2121", + "telephoneblack", "260E", + "telishagedolahebrew", "05A0", + "telishaqetanahebrew", "05A9", + "tencircle", "2469", + "tenideographicparen", "3229", + "tenparen", "247D", + "tenperiod", "2491", + "tenroman", "2179", + "tesh", "02A7", + "tet", "05D8", + "tetdagesh", "FB38", + "tetdageshhebrew", "FB38", + "tethebrew", "05D8", + "tetsecyrillic", "04B5", + "tevirhebrew", "059B", + "tevirlefthebrew", "059B", + "thabengali", "09A5", + "thadeva", "0925", + "thagujarati", "0AA5", + "thagurmukhi", "0A25", + "thalarabic", "0630", + "thalfinalarabic", "FEAC", + "thanthakhatthai", "0E4C", + "theharabic", "062B", + "thehfinalarabic", "FE9A", + "thehinitialarabic", "FE9B", + "thehmedialarabic", "FE9C", + "thereexists", "2203", + "therefore", "2234", + "theta", "03B8", + "theta1", "03D1", + "thetasymbolgreek", "03D1", + "thieuthacirclekorean", "3279", + "thieuthaparenkorean", "3219", + "thieuthcirclekorean", "326B", + "thieuthkorean", "314C", + "thieuthparenkorean", "320B", + "thirteencircle", "246C", + "thirteenparen", "2480", + "thirteenperiod", "2494", + "thonangmonthothai", "0E11", + "thook", "01AD", + "thophuthaothai", "0E12", + "thorn", "00FE", + "thothahanthai", "0E17", + "thothanthai", "0E10", + "thothongthai", "0E18", + "thothungthai", "0E16", + "thousandcyrillic", "0482", + "thousandsseparatorarabic", "066C", + "thousandsseparatorpersian", "066C", + "three", "0033", + "threearabic", "0663", + "threebengali", "09E9", + "threecircle", "2462", + "threecircleinversesansserif", "278C", + "threedeva", "0969", + "threeeighths", "215C", + "threegujarati", "0AE9", + "threegurmukhi", "0A69", + "threehackarabic", "0663", + "threehangzhou", "3023", + "threeideographicparen", "3222", + "threeinferior", "2083", + "threemonospace", "FF13", + "threenumeratorbengali", "09F6", + "threeparen", "2476", + "threeperiod", "248A", + "threepersian", "06F3", + "threequarters", "00BE", + "threeroman", "2172", + "threesuperior", "00B3", + "threethai", "0E53", + "thzsquare", "3394", + "tihiragana", "3061", + "tikatakana", "30C1", + "tikatakanahalfwidth", "FF81", + "tikeutacirclekorean", "3270", + "tikeutaparenkorean", "3210", + "tikeutcirclekorean", "3262", + "tikeutkorean", "3137", + "tikeutparenkorean", "3202", + "tilde", "02DC", + "tildebelowcmb", "0330", + "tildecmb", "0303", + "tildecomb", "0303", + "tildedoublecmb", "0360", + "tildeoperator", "223C", + "tildeoverlaycmb", "0334", + "tildeverticalcmb", "033E", + "timescircle", "2297", + "tipehahebrew", "0596", + "tipehalefthebrew", "0596", + "tippigurmukhi", "0A70", + "titlocyrilliccmb", "0483", + "tiwnarmenian", "057F", + "tlinebelow", "1E6F", + "tmonospace", "FF54", + "toarmenian", "0569", + "tohiragana", "3068", + "tokatakana", "30C8", + "tokatakanahalfwidth", "FF84", + "tonebarextrahighmod", "02E5", + "tonebarextralowmod", "02E9", + "tonebarhighmod", "02E6", + "tonebarlowmod", "02E8", + "tonebarmidmod", "02E7", + "tonefive", "01BD", + "tonesix", "0185", + "tonetwo", "01A8", + "tonos", "0384", + "tonsquare", "3327", + "topatakthai", "0E0F", + "tortoiseshellbracketleft", "3014", + "tortoiseshellbracketleftsmall", "FE5D", + "tortoiseshellbracketleftvertical", "FE39", + "tortoiseshellbracketright", "3015", + "tortoiseshellbracketrightsmall", "FE5E", + "tortoiseshellbracketrightvertical", "FE3A", + "totaothai", "0E15", + "tpalatalhook", "01AB", + "tparen", "24AF", + "trademark", "2122", + "tretroflexhook", "0288", + "triagdn", "25BC", + "triaglf", "25C4", + "triagrt", "25BA", + "triagup", "25B2", + "ts", "02A6", + "tsadi", "05E6", + "tsadidagesh", "FB46", + "tsadidageshhebrew", "FB46", + "tsadihebrew", "05E6", + "tsecyrillic", "0446", + "tsere", "05B5", + "tsere12", "05B5", + "tsere1e", "05B5", + "tsere2b", "05B5", + "tserehebrew", "05B5", + "tserenarrowhebrew", "05B5", + "tserequarterhebrew", "05B5", + "tserewidehebrew", "05B5", + "tshecyrillic", "045B", + "ttabengali", "099F", + "ttadeva", "091F", + "ttagujarati", "0A9F", + "ttagurmukhi", "0A1F", + "tteharabic", "0679", + "ttehfinalarabic", "FB67", + "ttehinitialarabic", "FB68", + "ttehmedialarabic", "FB69", + "tthabengali", "09A0", + "tthadeva", "0920", + "tthagujarati", "0AA0", + "tthagurmukhi", "0A20", + "tturned", "0287", + "tuhiragana", "3064", + "tukatakana", "30C4", + "tukatakanahalfwidth", "FF82", + "tusmallhiragana", "3063", + "tusmallkatakana", "30C3", + "tusmallkatakanahalfwidth", "FF6F", + "twelvecircle", "246B", + "twelveparen", "247F", + "twelveperiod", "2493", + "twelveroman", "217B", + "twentycircle", "2473", + "twentyhangzhou", "5344", + "twentyparen", "2487", + "twentyperiod", "249B", + "two", "0032", + "twoarabic", "0662", + "twobengali", "09E8", + "twocircle", "2461", + "twocircleinversesansserif", "278B", + "twodeva", "0968", + "twodotenleader", "2025", + "twodotleader", "2025", + "twodotleadervertical", "FE30", + "twogujarati", "0AE8", + "twogurmukhi", "0A68", + "twohackarabic", "0662", + "twohangzhou", "3022", + "twoideographicparen", "3221", + "twoinferior", "2082", + "twomonospace", "FF12", + "twonumeratorbengali", "09F5", + "twoparen", "2475", + "twoperiod", "2489", + "twopersian", "06F2", + "tworoman", "2171", + "twostroke", "01BB", + "twosuperior", "00B2", + "twothai", "0E52", + "twothirds", "2154", + "u", "0075", + "uacute", "00FA", + "ubar", "0289", + "ubengali", "0989", + "ubopomofo", "3128", + "ubreve", "016D", + "ucaron", "01D4", + "ucircle", "24E4", + "ucircumflex", "00FB", + "ucircumflexbelow", "1E77", + "ucyrillic", "0443", + "udattadeva", "0951", + "udblacute", "0171", + "udblgrave", "0215", + "udeva", "0909", + "udieresis", "00FC", + "udieresisacute", "01D8", + "udieresisbelow", "1E73", + "udieresiscaron", "01DA", + "udieresiscyrillic", "04F1", + "udieresisgrave", "01DC", + "udieresismacron", "01D6", + "udotbelow", "1EE5", + "ugrave", "00F9", + "ugujarati", "0A89", + "ugurmukhi", "0A09", + "uhiragana", "3046", + "uhookabove", "1EE7", + "uhorn", "01B0", + "uhornacute", "1EE9", + "uhorndotbelow", "1EF1", + "uhorngrave", "1EEB", + "uhornhookabove", "1EED", + "uhorntilde", "1EEF", + "uhungarumlaut", "0171", + "uhungarumlautcyrillic", "04F3", + "uinvertedbreve", "0217", + "ukatakana", "30A6", + "ukatakanahalfwidth", "FF73", + "ukcyrillic", "0479", + "ukorean", "315C", + "umacron", "016B", + "umacroncyrillic", "04EF", + "umacrondieresis", "1E7B", + "umatragurmukhi", "0A41", + "umonospace", "FF55", + "underscore", "005F", + "underscoredbl", "2017", + "underscoremonospace", "FF3F", + "underscorevertical", "FE33", + "underscorewavy", "FE4F", + "union", "222A", + "universal", "2200", + "uogonek", "0173", + "uparen", "24B0", + "upblock", "2580", + "upperdothebrew", "05C4", + "upsilon", "03C5", + "upsilondieresis", "03CB", + "upsilondieresistonos", "03B0", + "upsilonlatin", "028A", + "upsilontonos", "03CD", + "uptackbelowcmb", "031D", + "uptackmod", "02D4", + "uragurmukhi", "0A73", + "uring", "016F", + "ushortcyrillic", "045E", + "usmallhiragana", "3045", + "usmallkatakana", "30A5", + "usmallkatakanahalfwidth", "FF69", + "ustraightcyrillic", "04AF", + "ustraightstrokecyrillic", "04B1", + "utilde", "0169", + "utildeacute", "1E79", + "utildebelow", "1E75", + "uubengali", "098A", + "uudeva", "090A", + "uugujarati", "0A8A", + "uugurmukhi", "0A0A", + "uumatragurmukhi", "0A42", + "uuvowelsignbengali", "09C2", + "uuvowelsigndeva", "0942", + "uuvowelsigngujarati", "0AC2", + "uvowelsignbengali", "09C1", + "uvowelsigndeva", "0941", + "uvowelsigngujarati", "0AC1", + "v", "0076", + "vadeva", "0935", + "vagujarati", "0AB5", + "vagurmukhi", "0A35", + "vakatakana", "30F7", + "vav", "05D5", + "vavdagesh", "FB35", + "vavdagesh65", "FB35", + "vavdageshhebrew", "FB35", + "vavhebrew", "05D5", + "vavholam", "FB4B", + "vavholamhebrew", "FB4B", + "vavvavhebrew", "05F0", + "vavyodhebrew", "05F1", + "vcircle", "24E5", + "vdotbelow", "1E7F", + "vecyrillic", "0432", + "veharabic", "06A4", + "vehfinalarabic", "FB6B", + "vehinitialarabic", "FB6C", + "vehmedialarabic", "FB6D", + "vekatakana", "30F9", + "venus", "2640", + "verticalbar", "007C", + "verticallineabovecmb", "030D", + "verticallinebelowcmb", "0329", + "verticallinelowmod", "02CC", + "verticallinemod", "02C8", + "vewarmenian", "057E", + "vhook", "028B", + "vikatakana", "30F8", + "viramabengali", "09CD", + "viramadeva", "094D", + "viramagujarati", "0ACD", + "visargabengali", "0983", + "visargadeva", "0903", + "visargagujarati", "0A83", + "vmonospace", "FF56", + "voarmenian", "0578", + "voicediterationhiragana", "309E", + "voicediterationkatakana", "30FE", + "voicedmarkkana", "309B", + "voicedmarkkanahalfwidth", "FF9E", + "vokatakana", "30FA", + "vparen", "24B1", + "vtilde", "1E7D", + "vturned", "028C", + "vuhiragana", "3094", + "vukatakana", "30F4", + "w", "0077", + "wacute", "1E83", + "waekorean", "3159", + "wahiragana", "308F", + "wakatakana", "30EF", + "wakatakanahalfwidth", "FF9C", + "wakorean", "3158", + "wasmallhiragana", "308E", + "wasmallkatakana", "30EE", + "wattosquare", "3357", + "wavedash", "301C", + "wavyunderscorevertical", "FE34", + "wawarabic", "0648", + "wawfinalarabic", "FEEE", + "wawhamzaabovearabic", "0624", + "wawhamzaabovefinalarabic", "FE86", + "wbsquare", "33DD", + "wcircle", "24E6", + "wcircumflex", "0175", + "wdieresis", "1E85", + "wdotaccent", "1E87", + "wdotbelow", "1E89", + "wehiragana", "3091", + "weierstrass", "2118", + "wekatakana", "30F1", + "wekorean", "315E", + "weokorean", "315D", + "wgrave", "1E81", + "whitebullet", "25E6", + "whitecircle", "25CB", + "whitecircleinverse", "25D9", + "whitecornerbracketleft", "300E", + "whitecornerbracketleftvertical", "FE43", + "whitecornerbracketright", "300F", + "whitecornerbracketrightvertical", "FE44", + "whitediamond", "25C7", + "whitediamondcontainingblacksmalldiamond", "25C8", + "whitedownpointingsmalltriangle", "25BF", + "whitedownpointingtriangle", "25BD", + "whiteleftpointingsmalltriangle", "25C3", + "whiteleftpointingtriangle", "25C1", + "whitelenticularbracketleft", "3016", + "whitelenticularbracketright", "3017", + "whiterightpointingsmalltriangle", "25B9", + "whiterightpointingtriangle", "25B7", + "whitesmallsquare", "25AB", + "whitesmilingface", "263A", + "whitesquare", "25A1", + "whitestar", "2606", + "whitetelephone", "260F", + "whitetortoiseshellbracketleft", "3018", + "whitetortoiseshellbracketright", "3019", + "whiteuppointingsmalltriangle", "25B5", + "whiteuppointingtriangle", "25B3", + "wihiragana", "3090", + "wikatakana", "30F0", + "wikorean", "315F", + "wmonospace", "FF57", + "wohiragana", "3092", + "wokatakana", "30F2", + "wokatakanahalfwidth", "FF66", + "won", "20A9", + "wonmonospace", "FFE6", + "wowaenthai", "0E27", + "wparen", "24B2", + "wring", "1E98", + "wsuperior", "02B7", + "wturned", "028D", + "wynn", "01BF", + "x", "0078", + "xabovecmb", "033D", + "xbopomofo", "3112", + "xcircle", "24E7", + "xdieresis", "1E8D", + "xdotaccent", "1E8B", + "xeharmenian", "056D", + "xi", "03BE", + "xmonospace", "FF58", + "xparen", "24B3", + "xsuperior", "02E3", + "y", "0079", + "yaadosquare", "334E", + "yabengali", "09AF", + "yacute", "00FD", + "yadeva", "092F", + "yaekorean", "3152", + "yagujarati", "0AAF", + "yagurmukhi", "0A2F", + "yahiragana", "3084", + "yakatakana", "30E4", + "yakatakanahalfwidth", "FF94", + "yakorean", "3151", + "yamakkanthai", "0E4E", + "yasmallhiragana", "3083", + "yasmallkatakana", "30E3", + "yasmallkatakanahalfwidth", "FF6C", + "yatcyrillic", "0463", + "ycircle", "24E8", + "ycircumflex", "0177", + "ydieresis", "00FF", + "ydotaccent", "1E8F", + "ydotbelow", "1EF5", + "yeharabic", "064A", + "yehbarreearabic", "06D2", + "yehbarreefinalarabic", "FBAF", + "yehfinalarabic", "FEF2", + "yehhamzaabovearabic", "0626", + "yehhamzaabovefinalarabic", "FE8A", + "yehhamzaaboveinitialarabic", "FE8B", + "yehhamzaabovemedialarabic", "FE8C", + "yehinitialarabic", "FEF3", + "yehmedialarabic", "FEF4", + "yehmeeminitialarabic", "FCDD", + "yehmeemisolatedarabic", "FC58", + "yehnoonfinalarabic", "FC94", + "yehthreedotsbelowarabic", "06D1", + "yekorean", "3156", + "yen", "00A5", + "yenmonospace", "FFE5", + "yeokorean", "3155", + "yeorinhieuhkorean", "3186", + "yerahbenyomohebrew", "05AA", + "yerahbenyomolefthebrew", "05AA", + "yericyrillic", "044B", + "yerudieresiscyrillic", "04F9", + "yesieungkorean", "3181", + "yesieungpansioskorean", "3183", + "yesieungsioskorean", "3182", + "yetivhebrew", "059A", + "ygrave", "1EF3", + "yhook", "01B4", + "yhookabove", "1EF7", + "yiarmenian", "0575", + "yicyrillic", "0457", + "yikorean", "3162", + "yinyang", "262F", + "yiwnarmenian", "0582", + "ymonospace", "FF59", + "yod", "05D9", + "yoddagesh", "FB39", + "yoddageshhebrew", "FB39", + "yodhebrew", "05D9", + "yodyodhebrew", "05F2", + "yodyodpatahhebrew", "FB1F", + "yohiragana", "3088", + "yoikorean", "3189", + "yokatakana", "30E8", + "yokatakanahalfwidth", "FF96", + "yokorean", "315B", + "yosmallhiragana", "3087", + "yosmallkatakana", "30E7", + "yosmallkatakanahalfwidth", "FF6E", + "yotgreek", "03F3", + "yoyaekorean", "3188", + "yoyakorean", "3187", + "yoyakthai", "0E22", + "yoyingthai", "0E0D", + "yparen", "24B4", + "ypogegrammeni", "037A", + "ypogegrammenigreekcmb", "0345", + "yr", "01A6", + "yring", "1E99", + "ysuperior", "02B8", + "ytilde", "1EF9", + "yturned", "028E", + "yuhiragana", "3086", + "yuikorean", "318C", + "yukatakana", "30E6", + "yukatakanahalfwidth", "FF95", + "yukorean", "3160", + "yusbigcyrillic", "046B", + "yusbigiotifiedcyrillic", "046D", + "yuslittlecyrillic", "0467", + "yuslittleiotifiedcyrillic", "0469", + "yusmallhiragana", "3085", + "yusmallkatakana", "30E5", + "yusmallkatakanahalfwidth", "FF6D", + "yuyekorean", "318B", + "yuyeokorean", "318A", + "yyabengali", "09DF", + "yyadeva", "095F", + "z", "007A", + "zaarmenian", "0566", + "zacute", "017A", + "zadeva", "095B", + "zagurmukhi", "0A5B", + "zaharabic", "0638", + "zahfinalarabic", "FEC6", + "zahinitialarabic", "FEC7", + "zahiragana", "3056", + "zahmedialarabic", "FEC8", + "zainarabic", "0632", + "zainfinalarabic", "FEB0", + "zakatakana", "30B6", + "zaqefgadolhebrew", "0595", + "zaqefqatanhebrew", "0594", + "zarqahebrew", "0598", + "zayin", "05D6", + "zayindagesh", "FB36", + "zayindageshhebrew", "FB36", + "zayinhebrew", "05D6", + "zbopomofo", "3117", + "zcaron", "017E", + "zcircle", "24E9", + "zcircumflex", "1E91", + "zcurl", "0291", + "zdot", "017C", + "zdotaccent", "017C", + "zdotbelow", "1E93", + "zecyrillic", "0437", + "zedescendercyrillic", "0499", + "zedieresiscyrillic", "04DF", + "zehiragana", "305C", + "zekatakana", "30BC", + "zero", "0030", + "zeroarabic", "0660", + "zerobengali", "09E6", + "zerodeva", "0966", + "zerogujarati", "0AE6", + "zerogurmukhi", "0A66", + "zerohackarabic", "0660", + "zeroinferior", "2080", + "zeromonospace", "FF10", + "zeropersian", "06F0", + "zerosuperior", "2070", + "zerothai", "0E50", + "zerowidthjoiner", "FEFF", + "zerowidthnonjoiner", "200C", + "zerowidthspace", "200B", + "zeta", "03B6", + "zhbopomofo", "3113", + "zhearmenian", "056A", + "zhebrevecyrillic", "04C2", + "zhecyrillic", "0436", + "zhedescendercyrillic", "0497", + "zhedieresiscyrillic", "04DD", + "zihiragana", "3058", + "zikatakana", "30B8", + "zinorhebrew", "05AE", + "zlinebelow", "1E95", + "zmonospace", "FF5A", + "zohiragana", "305E", + "zokatakana", "30BE", + "zparen", "24B5", + "zretroflexhook", "0290", + "zstroke", "01B6", + "zuhiragana", "305A", + "zukatakana", "30BA", ); -$prog = $0; + +my $prog = $0; $prog =~ s@.*/@@; -$groff_sys_fontdir = "@FONTDIR@"; +my $groff_sys_fontdir = "@FONTDIR@"; + +use Getopt::Std; +getopts('a:d:e:i:mnsvx'); -do 'getopts.pl'; -do Getopts('a:d:e:i:mnsvx'); +our ($opt_a, $opt_d, $opt_e, $opt_i, $opt_m, $opt_n, $opt_s, $opt_v, $opt_x); if ($opt_v) { print "GNU afmtodit (groff) version @VERSION@\n"; @@ -6058,20 +6064,32 @@ if ($#ARGV != 2) { " [-i n] afmfile mapfile font\n"; } -$afm = $ARGV[0]; -$map = $ARGV[1]; -$font = $ARGV[2]; -$desc = $opt_d || "DESC"; -$sys_map = $groff_sys_fontdir . "/devps/generate/" . $map; -$sys_desc = $groff_sys_fontdir . "/devps/" . $desc; +my $afm = $ARGV[0]; +my $map = $ARGV[1]; +my $font = $ARGV[2]; +my $desc = $opt_d || "DESC"; +my $sys_map = $groff_sys_fontdir . "/devps/generate/" . $map; +my $sys_desc = $groff_sys_fontdir . "/devps/" . $desc; # read the afm file +my $psname; +my $italic_angle = 0; +my (@kern1, @kern2, @kernx); +my (%italic_correction, %left_italic_correction); +my %subscript_correction; +# my %ligs +my %ligatures; +my (@encoding, %in_encoding); +my (%width, %height, %depth); +my (%left_side_bearing, %right_side_bearing); + open(AFM, $afm) || die "$prog: can't open \`$ARGV[0]': $!\n"; while () { chop; - @field = split(' '); + my @field = split(' '); + next if $#field < 0; if ($field[0] eq "FontName") { $psname = $field[1]; } @@ -6080,9 +6098,9 @@ while () { } elsif ($field[0] eq "KPX") { if ($#field == 3) { - push(kern1, $field[1]); - push(kern2, $field[2]); - push(kernx, $field[3]); + push(@kern1, $field[1]); + push(@kern2, $field[2]); + push(@kernx, $field[3]); } } elsif ($field[0] eq "italicCorrection") { @@ -6097,18 +6115,19 @@ while () { elsif ($field[0] eq "StartCharMetrics") { while () { @field = split(' '); + next if $#field < 0; last if ($field[0] eq "EndCharMetrics"); if ($field[0] eq "C") { - $c = -1; - $wx = 0; - $n = ""; + my $w; + my $wx = 0; + my $n = ""; # %ligs = (); - $lly = 0; - $ury = 0; - $llx = 0; - $urx = 0; - $c = $field[1]; - $i = 2; + my $lly = 0; + my $ury = 0; + my $llx = 0; + my $urx = 0; + my $c = $field[1]; + my $i = 2; while ($i <= $#field) { if ($field[$i] eq "WX") { $w = $field[$i + 1]; @@ -6145,7 +6164,7 @@ while () { $depth{$n} = -$lly; $left_side_bearing{$n} = -$llx; $right_side_bearing{$n} = $urx - $w; -# while (($lig, $glyph2) = each %ligs) { +# while ((my $lig, my $glyph2) = each %ligs) { # $ligatures{$lig} = $n . " " . $glyph2; # } } @@ -6156,6 +6175,7 @@ close(AFM); # read the DESC file +my ($sizescale, $resolution, $unitwidth); $sizescale = 1; open(DESC, $desc) || open(DESC, $sys_desc) || @@ -6163,24 +6183,32 @@ open(DESC, $desc) || open(DESC, $sys_desc) || while () { next if /^#/; chop; - @field = split(' '); + my @field = split(' '); + next if $#field < 0; last if $field[0] eq "charset"; - if ($field[0] eq "res") { $resolution = $field[1]; } - if ($field[0] eq "unitwidth") { $unitwidth = $field[1]; } - if ($field[0] eq "sizescale") { $sizescale = $field[1]; } + if ($field[0] eq "res") { + $resolution = $field[1]; + } + elsif ($field[0] eq "unitwidth") { + $unitwidth = $field[1]; + } + elsif ($field[0] eq "sizescale") { + $sizescale = $field[1]; + } } close(DESC); if ($opt_e) { # read the encoding file - $sys_opt_e = $groff_sys_fontdir . "/devps/" . $opt_e; + my $sys_opt_e = $groff_sys_fontdir . "/devps/" . $opt_e; open(ENCODING, $opt_e) || open(ENCODING, $sys_opt_e) || die "$prog: can't open \`$opt_e' or \`$sys_opt_e': $!\n"; while () { next if /^#/; chop; - @field = split(' '); + my @field = split(' '); + next if $#field < 0; if ($#field == 1) { if ($field[1] >= 0 && defined $width{$field[0]}) { $encoding[$field[1]] = $field[0]; @@ -6193,29 +6221,41 @@ if ($opt_e) { # read the map file +my (%nmap, %map); + open(MAP, $map) || open(MAP, $sys_map) || die "$prog: can't open \`$map' or \`$sys_map': $!\n"; while () { next if /^#/; chop; - @field = split(' '); + my @field = split(' '); + next if $#field < 0; if ($#field == 1) { - if (defined $mapped{$field[1]}) { - warn "Both $mapped{$field[1]} and $field[0] map to $field[1]"; - } - elsif ($field[1] eq "space") { - # the PostScript character "space" is automatically mapped - # to the groff character "space"; this is for grops - warn "you are not allowed to map to the groff character `space'"; + if ($field[1] eq "space") { + # The PostScript character "space" is automatically mapped + # to the groff character "space"; this is for grops. + warn "you are not allowed to map to " . + "the groff character \`space'"; } elsif ($field[0] eq "space") { - warn "you are not allowed to map the PostScript character `space'"; + warn "you are not allowed to map " . + "the PostScript character \`space'"; } else { $nmap{$field[0]} += 0; - $map{$field[0],$nmap{$field[0]}} = $field[1]; + $map{$field[0], $nmap{$field[0]}} = $field[1]; $nmap{$field[0]} += 1; - $mapped{$field[1]} = $field[0]; + + # There is more then one way to make a PS glyph name; + # let us try unicode names with `uni' and `u' prefixes. + my $utmp = $AGL_to_unicode{$field[0]}; + if (defined $utmp && $utmp =~ /^[0-9A-F]{4}$/) { + foreach my $unicodepsname ("uni" . $utmp, "u" . $utmp) { + $nmap{$unicodepsname} += 0; + $map{$unicodepsname, $nmap{$unicodepsname}} = $field[1]; + $nmap{$unicodepsname} += 1; + } + } } } } @@ -6223,34 +6263,142 @@ close(MAP); $italic_angle = $opt_a if $opt_a; -# add unencoded characters and unmapped characters of the form `uniXXXX' if (!$opt_x) { - $i = ($#encoding > 256) ? ($#encoding + 1) : 256; - while ($ch = each %width) { + my %mapped; + my $i = ($#encoding > 256) ? ($#encoding + 1) : 256; + while (my $ch = each %width) { + # add unencoded characters if (!$in_encoding{$ch}) { $encoding[$i] = $ch; $i++; } - if (!$nmap{$ch}) { - $u1 = $AGL_to_unicode{$ch}; - if (!$u1 && ($ch =~ /^uni([0-9A-F]{4})$/)) { - $u1 = "u" . $1; + if ($nmap{$ch}) { + for (my $j = 0; $j < $nmap{$ch}; $j++) { + if (defined $mapped{$map{$ch, $j}}) { + warn "both $mapped{$map{$ch, $j}} and $ch " . + "map to $map{$ch, $j}"; + } + else { + $mapped{$map{$ch, $j}} = $ch; + } + } + } + else { + my $u = ""; # the resulting groff glyph name + my $ucomp = ""; # Unicode string before decomposition + my $utmp = ""; # temporary value + my $component = ""; + my $nv = 0; + + # Step 1: + # Drop all characters from the glyph name starting with the + # first occurrence of a period (U+002E FULL STOP), if any. + # ?? We avoid mapping of glyphs with periods, since they are + # likely to be variant glyphs, leading to a `many ps glyphs -- + # one groff glyph' conflict. + # + # If multiple glyphs in the font represent the same character + # in the Unicode standard, as do `A' and `A.swash', for example, + # they can be differentiated by using the same base name with + # different suffixes. This suffix (the part of glyph name that + # follows the first period) does not participate in the + # computation of a character sequence. It can be used by font + # designers to indicate some characteristics of the glyph. The + # suffix may contain periods or any other permitted characters. + # Small cap A, for example, could be named `uni0041.sc' or `A.sc'. + + next if $ch =~ /\./; + + # Step 2: + # Split the remaining string into a sequence of components, + # using the underscore character (U+005F LOW LINE) as the + # delimiter. + + while ($ch =~ /([^_]+)/g) { + $component = $1; + + # Step 3: + # Map each component to a character string according to the + # procedure below: + # + # * If the component is in the Adobe Glyph List, then map + # it to the corresponding character in that list. + + $utmp = $AGL_to_unicode{$component}; + if ($utmp) { + $utmp = "U+" . $utmp; + } + + # * Otherwise, if the component is of the form `uni' + # (U+0075 U+006E U+0069) followed by a sequence of + # uppercase hexadecimal digits (0 .. 9, A .. F, i.e., + # U+0030 .. U+0039, U+0041 .. U+0046), the length of + # that sequence is a multiple of four, and each group of + # four digits represents a number in the set {0x0000 .. + # 0xD7FF, 0xE000 .. 0xFFFF}, then interpret each such + # number as a Unicode scalar value and map the component + # to the string made of those scalar values. + + elsif ($component =~ /^uni([0-9A-F]{4})+$/) { + while ($component =~ /([0-9A-F]{4})/g) { + $nv = hex("0x" . $1); + if ($nv <= 0xD7FF || $nv >= 0xE000) { + $utmp .= "U+" . $1; + } + else { + $utmp = ""; + last; + } + } + } + + # * Otherwise, if the component is of the form `u' (U+0075) + # followed by a sequence of four to six uppercase + # hexadecimal digits {0 .. 9, A .. F} (U+0030 .. U+0039, + # U+0041 .. U+0046), and those digits represent a number + # in {0x0000 .. 0xD7FF, 0xE000 .. 0x10FFFF}, then + # interpret this number as a Unicode scalar value and map + # the component to the string made of this scalar value. + + elsif ($component =~ /^u([0-9A-F]{4,6})$/) { + $nv = hex("0x" . $1); + if ($nv <= 0xD7FF || ($nv >= 0xE000 && $nv <= 0x10FFFF)) { + $utmp .= "U+" . $1; + } + } + + # Finally, concatenate those strings; the result is the + # character string to which the glyph name is mapped. + + $ucomp .= $utmp if $utmp; + } + + # Unicode decomposition + while ($ucomp =~ /([0-9A-F]{4,6})/g) { + $component = $1; + $utmp = $unicode_decomposed{$component}; + $u .= "_" . ($utmp ? $utmp : $component); } - if ($u1) { - $u2 = $unicode_decomposed{$u1}; - $u = $u2 ? $u2 : $u1; + $u =~ s/^_/u/; + if ($u) { + if (defined $mapped{$u}) { + warn "both $mapped{$u} and $ch map to $u"; + } + else { + $mapped{$u} = $ch; + } $nmap{$ch} += 1; - $map{$ch,"0"} = $u; + $map{$ch, "0"} = $u; } } } } -# check explicitly for groff's standard ligatures -- many afm files don't -# have proper `L' entries +# Check explicitly for groff's standard ligatures -- many afm files don't +# have proper `L' entries. -%default_ligatures = ( +my %default_ligatures = ( "fi", "f i", "fl", "f l", "ff", "f f", @@ -6258,7 +6406,7 @@ if (!$opt_x) { "ffl", "ff l", ); -while (($lig, $components) = each %default_ligatures) { +while (my ($lig, $components) = each %default_ligatures) { if (defined $width{$lig} && !defined $ligatures{$lig}) { $ligatures{$lig} = $components; } @@ -6273,17 +6421,17 @@ print("name $font\n"); print("internalname $psname\n") if $psname; print("special\n") if $opt_s; printf("slant %g\n", $italic_angle) if $italic_angle != 0; -printf("spacewidth %d\n", do conv($width{"space"})) if defined $width{"space"}; +printf("spacewidth %d\n", conv($width{"space"})) if defined $width{"space"}; if ($opt_e) { - $e = $opt_e; + my $e = $opt_e; $e =~ s@.*/@@; print("encoding $e\n"); } if (!$opt_n && %ligatures) { print("ligatures"); - while ($lig = each %ligatures) { + while (my $lig = each %ligatures) { print(" $lig"); } print(" 0\n"); @@ -6292,17 +6440,17 @@ if (!$opt_n && %ligatures) { if ($#kern1 >= 0) { print("kernpairs\n"); - for ($i = 0; $i <= $#kern1; $i++) { - $c1 = $kern1[$i]; - $c2 = $kern2[$i]; + for (my $i = 0; $i <= $#kern1; $i++) { + my $c1 = $kern1[$i]; + my $c2 = $kern2[$i]; if ($nmap{$c1} != 0 && $nmap{$c2} != 0) { - for ($j = 0; $j < $nmap{$c1}; $j++) { - for ($k = 0; $k < $nmap{$c2}; $k++) { + for (my $j = 0; $j < $nmap{$c1}; $j++) { + for (my $k = 0; $k < $nmap{$c2}; $k++) { if ($kernx[$i] != 0) { printf("%s %s %d\n", - $map{$c1,$j}, - $map{$c2,$k}, - do conv($kernx[$i])); + $map{$c1, $j}, + $map{$c2, $k}, + conv($kernx[$i])); } } } @@ -6310,17 +6458,22 @@ if ($#kern1 >= 0) { } } +my ($asc_boundary, $desc_boundary, $xheight, $slant); + # characters not shorter than asc_boundary are considered to have ascenders -$asc_boundary = $height{"t"} - 1; +$asc_boundary = 0; +$asc_boundary = $height{"t"} if defined $height{"t"}; +$asc_boundary -= 1; # likewise for descenders -$desc_boundary = $depth{"g"}; -$desc_boundary = $depth{"j"} if $depth{"j"} < $desc_boundary; -$desc_boundary = $depth{"p"} if $depth{"p"} < $desc_boundary; -$desc_boundary = $depth{"q"} if $depth{"q"} < $desc_boundary; -$desc_boundary = $depth{"y"} if $depth{"y"} < $desc_boundary; +$desc_boundary = 0; +$desc_boundary = $depth{"g"} if defined $depth{"g"}; +$desc_boundary = $depth{"j"} if defined $depth{"g"} && $depth{"j"} < $desc_boundary; +$desc_boundary = $depth{"p"} if defined $depth{"p"} && $depth{"p"} < $desc_boundary; +$desc_boundary = $depth{"q"} if defined $depth{"q"} && $depth{"q"} < $desc_boundary; +$desc_boundary = $depth{"y"} if defined $depth{"y"} && $depth{"y"} < $desc_boundary; $desc_boundary -= 1; if (defined $height{"x"}) { @@ -6338,21 +6491,21 @@ $slant = sin($italic_angle)/cos($italic_angle); $slant = 0 if $slant < 0; print("charset\n"); -for ($i = 0; $i <= $#encoding; $i++) { - $ch = $encoding[$i]; - if ($ch ne "" && $ch ne "space") { - $map{$ch,"0"} = "---" if $nmap{$ch} == 0; - $type = 0; - $h = $height{$ch}; +for (my $i = 0; $i <= $#encoding; $i++) { + my $ch = $encoding[$i]; + if (defined $ch && $ch ne "" && $ch ne "space") { + $map{$ch, "0"} = "---" if !defined $nmap{$ch} || $nmap{$ch} == 0; + my $type = 0; + my $h = $height{$ch}; $h = 0 if $h < 0; - $d = $depth{$ch}; + my $d = $depth{$ch}; $d = 0 if $d < 0; $type = 1 if $d >= $desc_boundary; $type += 2 if $h >= $asc_boundary; - printf("%s\t%d", $map{$ch,"0"}, do conv($width{$ch})); - $italic_correction = 0; - $left_math_fit = 0; - $subscript_correction = 0; + printf("%s\t%d", $map{$ch, "0"}, conv($width{$ch})); + my $italic_correction = 0; + my $left_math_fit = 0; + my $subscript_correction = 0; if (defined $opt_i) { $italic_correction = $right_side_bearing{$ch} + $opt_i; $italic_correction = 0 if $italic_correction < 0; @@ -6374,35 +6527,37 @@ for ($i = 0; $i <= $#encoding; $i++) { $subscript_correction = $subscript_correction{$ch}; } if ($subscript_correction != 0) { - printf(",%d,%d", do conv($h), do conv($d)); - printf(",%d,%d,%d", do conv($italic_correction), - do conv($left_math_fit), - do conv($subscript_correction)); + printf(",%d,%d", conv($h), conv($d)); + printf(",%d,%d,%d", conv($italic_correction), + conv($left_math_fit), + conv($subscript_correction)); } elsif ($left_math_fit != 0) { - printf(",%d,%d", do conv($h), do conv($d)); - printf(",%d,%d", do conv($italic_correction), - do conv($left_math_fit)); + printf(",%d,%d", conv($h), conv($d)); + printf(",%d,%d", conv($italic_correction), + conv($left_math_fit)); } elsif ($italic_correction != 0) { - printf(",%d,%d", do conv($h), do conv($d)); - printf(",%d", do conv($italic_correction)); + printf(",%d,%d", conv($h), conv($d)); + printf(",%d", conv($italic_correction)); } elsif ($d != 0) { - printf(",%d,%d", do conv($h), do conv($d)); + printf(",%d,%d", conv($h), conv($d)); } else { # always put the height in to stop groff guessing - printf(",%d", do conv($h)); + printf(",%d", conv($h)); } printf("\t%d", $type); printf("\t%d\t%s\n", $i, $ch); - for ($j = 1; $j < $nmap{$ch}; $j++) { - printf("%s\t\"\n", $map{$ch,$j}); + if (defined $nmap{$ch}) { + for (my $j = 1; $j < $nmap{$ch}; $j++) { + printf("%s\t\"\n", $map{$ch, $j}); + } } } - if ($ch eq "space" && defined $width{"space"}) { - printf("space\t%d\t0\t%d\tspace\n", do conv($width{"space"}), $i); + if (defined $ch && $ch eq "space" && defined $width{"space"}) { + printf("space\t%d\t0\t%d\tspace\n", conv($width{"space"}), $i); } } diff --git a/contrib/groff-1.19/src/utils/hpftodit/hpftodit.cpp b/contrib/groff-1.19/src/utils/hpftodit/hpftodit.cpp index 3315cf789a..5910fb2f39 100644 --- a/contrib/groff-1.19/src/utils/hpftodit/hpftodit.cpp +++ b/contrib/groff-1.19/src/utils/hpftodit/hpftodit.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ /* TODO @@ -145,6 +145,7 @@ public: byte get_byte(); uint16 get_uint16(); uint32 get_uint32(); + uint32 get_uint32(char *orig); void seek(uint32 n); private: unsigned char *buf_; @@ -157,6 +158,7 @@ struct entry { uint16 type; uint32 count; uint32 value; + char orig_value[4]; entry() : present(0) { } }; @@ -463,6 +465,22 @@ File::get_uint32() return n; } +uint32 +File::get_uint32(char *orig) +{ + if (end_ - ptr_ < 4) + fatal("unexpected end of file"); + unsigned char v = *ptr_++; + uint32 n = v; + orig[0] = v; + for (int i = 1; i < 4; i++) { + v = *ptr_++; + orig[i] = v; + n += v << i*8; + } + return n; +} + static void read_tags(File &f) { @@ -481,7 +499,7 @@ read_tags(File &f) p->present = 1; p->type = f.get_uint16(); p->count = f.get_uint32(); - p->value = f.get_uint32(); + p->value = f.get_uint32(p->orig_value); } } @@ -547,8 +565,9 @@ output_font_name(File &f) while (--n) *p++ = f.get_byte(); } - else // value contains the string - sprintf(font_name, "%.*s", count, (char*)(tag_info(font_name_tag).value)); + else // orig_value contains the string + sprintf(font_name, "%.*s", + count, tag_info(font_name_tag).orig_value); // remove any trailing space p = font_name + count - 1; @@ -717,13 +736,17 @@ read_and_output_pcltypeface(File &f) { printf("pcltypeface "); require_tag(typeface_tag); - f.seek(tag_info(typeface_tag).value); - for (uint32 i = 0; i < tag_info(typeface_tag).count; i++) { - unsigned char c = f.get_byte(); - if (c == '\0') - break; - putchar(c); + if (tag_info(typeface_tag).count > 4) { + f.seek(tag_info(typeface_tag).value); + for (uint32 i = 0; i < tag_info(typeface_tag).count; i++) { + unsigned char c = f.get_byte(); + if (c == '\0') + break; + putchar(c); + } } + else + printf("%.4s", tag_info(typeface_tag).orig_value); printf("\n"); } @@ -1168,7 +1191,7 @@ dump_ascii(File &f, tag_type t) printf("%c", f.get_byte()); } else - printf("%.4s", (char*)(tag_info(t).value)); + printf("%.4s", tag_info(t).orig_value); putchar('"'); } diff --git a/contrib/groff-1.19/src/utils/hpftodit/hpuni.cpp b/contrib/groff-1.19/src/utils/hpftodit/hpuni.cpp index 470d147ff8..23a1eb0528 100644 --- a/contrib/groff-1.19/src/utils/hpftodit/hpuni.cpp +++ b/contrib/groff-1.19/src/utils/hpftodit/hpuni.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" #include "stringclass.h" diff --git a/contrib/groff-1.19/src/utils/indxbib/indxbib.cpp b/contrib/groff-1.19/src/utils/indxbib/indxbib.cpp index d8a53b6d26..00e99447be 100644 --- a/contrib/groff-1.19/src/utils/indxbib/indxbib.cpp +++ b/contrib/groff-1.19/src/utils/indxbib/indxbib.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/utils/indxbib/signal.c b/contrib/groff-1.19/src/utils/indxbib/signal.c index f5a1209233..20dfd905d0 100644 --- a/contrib/groff-1.19/src/utils/indxbib/signal.c +++ b/contrib/groff-1.19/src/utils/indxbib/signal.c @@ -15,7 +15,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ /* Unfortunately vendors seem to have problems writing a that is correct for C++, so we implement all signal handling in C. */ diff --git a/contrib/groff-1.19/src/utils/lkbib/lkbib.cpp b/contrib/groff-1.19/src/utils/lkbib/lkbib.cpp index 42156eaae1..b44f245af7 100644 --- a/contrib/groff-1.19/src/utils/lkbib/lkbib.cpp +++ b/contrib/groff-1.19/src/utils/lkbib/lkbib.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/utils/lkbib/lkbib.man b/contrib/groff-1.19/src/utils/lkbib/lkbib.man index 81067d13d9..29831ee8d4 100644 --- a/contrib/groff-1.19/src/utils/lkbib/lkbib.man +++ b/contrib/groff-1.19/src/utils/lkbib/lkbib.man @@ -1,5 +1,5 @@ .ig -Copyright (C) 1989-2000, 2001 Free Software Foundation, Inc. +Copyright (C) 1989-2000, 2001, 2004 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -16,17 +16,23 @@ versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. .. -.ds g \" empty -.ds G \" empty +. +. .\" 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" +. ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +. el .TP "\\$1" .. +. +. .TH LKBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +. +. .SH NAME lkbib \- search bibliographic databases +. +. .SH SYNOPSIS .B lkbib [ @@ -42,13 +48,16 @@ lkbib \- search bibliographic databases .BI \-t n ] .IR key \|.\|.\|. +. .PP It is possible to have whitespace between a command line option and its parameter. +. +. .SH DESCRIPTION .B lkbib searches bibliographic databases for references that contain the keys -.IR key \|.\|.\|. +.IR key \|.\|.\|.\& and prints any references found on the standard output. .B lkbib will search any databases given by @@ -68,10 +77,13 @@ created by .BR @g@indxbib (@MAN1EXT@) exists, then it will be searched instead; each index can cover multiple databases. +. +. .SH OPTIONS .TP .B \-v Print the version number. +. .TP .BI \-p filename Search @@ -79,11 +91,13 @@ Search Multiple .B \-p options can be used. +. .TP .BI \-i string When searching files for which no index exists, ignore the contents of fields whose names are in .IR string . +. .TP .BI \-t n Only require the first @@ -91,19 +105,27 @@ Only require the first characters of keys to be given. Initially .I n -is 6. +is\~6. +. +. .SH ENVIRONMENT .TP \w'\fBREFER'u+2n .SB REFER Default database. +. +. .SH FILES .Tp \w'\fB@DEFAULT_INDEX@'u+2n .B @DEFAULT_INDEX@ Default database to be used if the .SB REFER environment variable is not set. +. +.TP .IB filename @INDEX_SUFFIX@ Index files. +. +. .SH "SEE ALSO" .BR @g@refer (@MAN1EXT@), .BR @g@lookbib (@MAN1EXT@), diff --git a/contrib/groff-1.19/src/utils/lookbib/lookbib.cpp b/contrib/groff-1.19/src/utils/lookbib/lookbib.cpp index 32a6344b5b..a573c5f6fa 100644 --- a/contrib/groff-1.19/src/utils/lookbib/lookbib.cpp +++ b/contrib/groff-1.19/src/utils/lookbib/lookbib.cpp @@ -17,7 +17,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "lib.h" diff --git a/contrib/groff-1.19/src/utils/lookbib/lookbib.man b/contrib/groff-1.19/src/utils/lookbib/lookbib.man index 3d8ba4406c..baade0fd53 100644 --- a/contrib/groff-1.19/src/utils/lookbib/lookbib.man +++ b/contrib/groff-1.19/src/utils/lookbib/lookbib.man @@ -1,5 +1,5 @@ .ig -Copyright (C) 1989-2000, 2001 Free Software Foundation, Inc. +Copyright (C) 1989-2000, 2001, 2004 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -16,9 +16,15 @@ versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. .. +. +. .TH @G@LOOKBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +. +. .SH NAME @g@lookbib \- search bibliographic databases +. +. .SH SYNOPSIS .B @g@lookbib [ @@ -31,14 +37,19 @@ the original English. .BI \-t n ] .IR filename \|.\|.\|. +. .PP It is possible to have whitespace between a command line option and its parameter. +. +. .SH DESCRIPTION -@g@lookbib prints a prompt on the standard error (unless the standard input is not a terminal), +.B @g@lookbib +prints a prompt on the standard error (unless the standard input is not +a terminal), reads from the standard input a line containing a set of keywords, searches the bibliographic databases -.IR filename \|.\|.\|. +.IR filename \|.\|.\|.\& for references containing those keywords, prints any references found on the standard output, and repeats this process until the end of input. @@ -51,15 +62,19 @@ created by .BR @g@indxbib (@MAN1EXT@) exists, then it will be searched instead; each index can cover multiple databases. +. +. .SH OPTIONS .TP .B \-v Print the version number. +. .TP .BI \-i string When searching files for which no index exists, ignore the contents of fields whose names are in .IR string . +. .TP .BI \-t n Only require the first @@ -67,11 +82,15 @@ Only require the first characters of keys to be given. Initially .I n -is 6. +is\~6. +. +. .SH FILES .TP \w'\fIfilename\fB@INDEX_SUFFIX@'u+2n .IB filename @INDEX_SUFFIX@ Index files. +. +. .SH "SEE ALSO" .BR @g@refer (@MAN1EXT@), .BR lkbib (@MAN1EXT@), diff --git a/contrib/groff-1.19/src/utils/pfbtops/pfbtops.c b/contrib/groff-1.19/src/utils/pfbtops/pfbtops.c index a614a7d73a..8b394d5d1f 100644 --- a/contrib/groff-1.19/src/utils/pfbtops/pfbtops.c +++ b/contrib/groff-1.19/src/utils/pfbtops/pfbtops.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1992, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -15,7 +15,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ /* This translates ps fonts in .pfb format to ASCII ps files. */ @@ -25,9 +25,11 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include -#include #include +#define __GETOPT_PREFIX groff_ +#include + #include "nonposix.h" /* Binary bytes per output line. */ diff --git a/contrib/groff-1.19/src/utils/pfbtops/pfbtops.man b/contrib/groff-1.19/src/utils/pfbtops/pfbtops.man index 627e5c5e37..c97a297633 100644 --- a/contrib/groff-1.19/src/utils/pfbtops/pfbtops.man +++ b/contrib/groff-1.19/src/utils/pfbtops/pfbtops.man @@ -1,5 +1,5 @@ .ig -Copyright (C) 1989-1995, 2001, 2003 Free Software Foundation, Inc. +Copyright (C) 1989-1995, 2001, 2003, 2004 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -16,14 +16,25 @@ versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. .. +. +. .TH PFBTOPS @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +. +. .SH NAME pfbtops \- translate a PostScript font in .pfb format to ASCII +. +. .SH SYNOPSIS .B pfbtops [ +.B \-v +] +[ .I pfb_file ] +. +. .SH DESCRIPTION .B pfbtops translates a PostScript font in @@ -37,10 +48,18 @@ The ASCII format PostScript font will be written on the standard output. PostScript fonts for MS-DOS are normally supplied in .B .pfb format. +. .LP The resulting ASCII format PostScript font can be used with groff. It must first be listed in .BR @FONTDIR@/devps/download . +. +.SH OPTIONS +.TP +.B \-v +Print the version number. +. +. .SH "SEE ALSO" .BR grops (@MAN1EXT@) . diff --git a/contrib/groff-1.19/src/utils/tfmtodit/tfmtodit.cpp b/contrib/groff-1.19/src/utils/tfmtodit/tfmtodit.cpp index 1c094b5ada..ccf995a323 100644 --- a/contrib/groff-1.19/src/utils/tfmtodit/tfmtodit.cpp +++ b/contrib/groff-1.19/src/utils/tfmtodit/tfmtodit.cpp @@ -16,7 +16,7 @@ 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. */ +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ /* I have tried to incorporate the changes needed for TeX 3.0 tfm files, but I haven't tested them. */ diff --git a/contrib/groff-1.19/tmac/an-old.tmac b/contrib/groff-1.19/tmac/an-old.tmac index 6b75be2005..b51f2e2f4f 100644 --- a/contrib/groff-1.19/tmac/an-old.tmac +++ b/contrib/groff-1.19/tmac/an-old.tmac @@ -1,6 +1,6 @@ .\" an-old.tmac .\" -.\" Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003 +.\" Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005 .\" Free Software Foundation, Inc. .\" Written by James Clark (jjc@jclark.com) .\" @@ -18,7 +18,7 @@ .\" .\" 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. +.\" Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. .\" .\" -rcR=1 => Create a single, very long page instead of multiple pages. .\" Useful for online display. Default in nroff mode. @@ -38,6 +38,8 @@ . .do if d RI .nx . +.do mso devtag.tmac +. .nr _C \n(.C .cp 0 . @@ -58,10 +60,29 @@ . el .nr cR 0 .\} . +.nr need_eo_h 0 +. +.\" set up the line length... +.\" giving precedence to any prior assignment to the \n[LL] register. .if !r LL \{\ -. ie n .nr LL 78n -. el .nr LL 6.5i +. +. \" but if that isn't predefined... +. \" then try to respect any prior `.ll' request. +. nr LL \n[.l] +. +. \" For troff, this is sufficient to give us a default line length of +. \" 6.5i, but for nroff, we prefer a default of 78n to nroff's default +. \" 65n. This has the unfortunate side effect that we will override a +. \" user's `.ll 65n' request, with our preferred 78n default; we can't +. \" possibly know that the 65n came from a `.ll' request, and MUST +. \" assume that it was set by nroff, as its built-in default! If the +. \" user wants to force this setting, then he MUST use the `-rLL=65n' +. \" option, or an equivalent `.nr LL 65n' request. +. if n \ +. if (\n[LL] = 65n) \ +. nr LL 78n .\} +. .if !r LT \ . nr LT \n[LL] . @@ -85,7 +106,7 @@ .if \n[cR] \{\ . de1 ne . ie \\n[.$] \ -. nr an-ne \\$* +. nr an-ne (v;\\$*) . el \ . nr an-ne 1v . if (\\n[an-ne] >= \\n[.t]) \ @@ -107,8 +128,9 @@ .\" .TH title section extra1 extra2 extra3 .de1 TH . if \\n[an-html] \{\ -. HTML-TAG-NS ".tl" +. DEVTAG-TL \\$1 +. DEVTAG-EO-TL . \} . . de an-init \" We have to do it like this to get multiple man pages right. @@ -310,7 +332,8 @@ . fi . in \\n[an-margin]u . ti 0 -. HTML-TAG-NS ".NH \\n[an-level]" +. nr need_eo_h 1 +. DEVTAG-NH \\n[an-level] . it 1 an-trap . nr an-no-space-flag 1 . nr an-break-flag 1 @@ -373,6 +396,8 @@ .. . .de1 an-trap +. if \\n[need_eo_h]>0 .DEVTAG-EO-H +. nr need_eo_h 0 . ft R . ps \\n[PS]u . vs \\n[VS]u @@ -407,9 +432,9 @@ . ti -\\n[an-prevailing-indent]u . chop an-div . ne (1v + 1u) -. HTML-TAG-NS ".col 1" +. DEVTAG-COL 1 \\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c -. HTML-TAG-NS ".col 2" +. DEVTAG-COL-NEXT 2 . \} .. . @@ -456,14 +481,15 @@ . .de1 RI . if \\n[.$] \{\ -. ds an-result \&\\$1 +. ds an-result \&\f[R]\\$1 . shift . while (\\n[.$] >= 2) \{\ . as an-result \,\f[I]\\$1\f[R]\/\\$2\\*[an-empty] . shift 2 . \} -. if \\n[.$] .as an-result \,\f[I]\\$1\f[R] +. if \\n[.$] .as an-result \,\f[I]\\$1 \\*[an-result] +. ft R . \} .. . @@ -477,6 +503,7 @@ . \} . if \\n[.$] .as an-result \/\\$1 \\*[an-result] +. ft R . \} .. . diff --git a/contrib/groff-1.19/tmac/devtag.tmac b/contrib/groff-1.19/tmac/devtag.tmac new file mode 100644 index 0000000000..9a26d44a37 --- /dev/null +++ b/contrib/groff-1.19/tmac/devtag.tmac @@ -0,0 +1,131 @@ +.ig +devtag.tmac - macro package for adding tags to roff documents. + +File position: /tmac/devtag.tmac +Installed position: groff's main macro directory. + +------------------------------------------------------------------------ + Legalize +------------------------------------------------------------------------ + +This file is part of groff, the GNU roff type-setting system. + +Copyright (C) 2004 Free Software Foundation, Inc. +written by Gaius Mulley . + +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, 51 Franklin St - Fifth Floor, Boston, MA +02110-1301, USA. + + +------------------------------------------------------------------------ + Description +------------------------------------------------------------------------ + +A simple set of macros to provide markup devices (currently only grohtml) +with tags that define the meaning of the formatted text and also +basic formatting instructions. It generalizes the tag concept used within +grohtml and in the future it is hoped that more markup based devices +can capitalize on this work. It also clearly defines those tags which are +honoured by grohtml. Note that not all tags are included here. Some +of the grohtml specific tags (header specific and jobname, etc.) are +called directly from within www.tmac. The tags defined here are +reasonably generic and could be applied to other devices. +.. +. +.do if d DEVTAG-NH .nx +. +.nr _C \n(.C +.cp 0 +. +.\" -------------------------------------------------------------------- +.\" DEVTAG +.\" +.\" Emit a tag +.\" +.de DEVTAG +. tag devtag:\\$* +.. +.\" -------------------------------------------------------------------- +.\" DEVTAG-NEXT +.\" +.\" When the troff state changes, emit tag +.\" +.de DEVTAG-NEXT +. taga devtag:\\$* +.. +. +.\" -------------------------------------------------------------------- +.\" SH +.\" NH +.\" tell device we are starting a numbered heading +.\" Takes a single parameter . 1 +.\" is the outer most level. +. +.de DEVTAG-NH +. DEVTAG ".NH \\$1" +.. +.als DEVTAG-SH DEVTAG-NH +. +.\" -------------------------------------------------------------------- +.\" COL +.\" indicate that the following text is aligned for the column +.\" n: [1..MAX(n)] +. +.de DEVTAG-COL +. DEVTAG ".col \\$1" +.. +. +.\" -------------------------------------------------------------------- +.\" EO-H +.\" indicate that a header has finished. +. +.de DEVTAG-EO-H +. DEVTAG ".eo.h" +.. +.\" -------------------------------------------------------------------- +.\" EO-TL +.\" indicate that a title has finished. +. +.de DEVTAG-EO-TL +. DEVTAG ".eo.tl" +.. +.\" -------------------------------------------------------------------- +.\" TL +.\" indicate that the following text forms a title. +. +.de DEVTAG-TL +. DEVTAG ".tl" +.. +. +.\" -------------------------------------------------------------------- +.\" COL-NEXT +.\" emit a column tag just before the next glyph. +. +.de DEVTAG-COL-NEXT +. DEVTAG-NEXT ".col \\$1" +.. +. +. +.cp \n[_C] +. +. +.\" -------------------------------------------------------------------- +.\" Emacs settings +.\" -------------------------------------------------------------------- +. +.\" Local Variables: +.\" mode: nroff +.\" End: +.\" EOF diff --git a/contrib/groff-1.19/tmac/doc-common b/contrib/groff-1.19/tmac/doc-common index 88157ad147..5b240bb12d 100644 --- a/contrib/groff-1.19/tmac/doc-common +++ b/contrib/groff-1.19/tmac/doc-common @@ -9,10 +9,8 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. +.\" 3. [Deleted. See +.\" ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change] .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. @@ -434,6 +432,8 @@ .ds doc-operating-system-NetBSD-1.6.1 1.6.1 .ds doc-operating-system-NetBSD-1.6.2 1.6.2 .ds doc-operating-system-NetBSD-2.0 2.0 +.ds doc-operating-system-NetBSD-2.0.1 2.0.1 +.ds doc-operating-system-NetBSD-2.0.2 2.0.2 .ds doc-operating-system-NetBSD-2.1 2.1 . .ds doc-operating-system-FreeBSD-1.0 1.0 @@ -551,10 +551,6 @@ .ds doc-date-12 December . .de Dd -. \" XXX: why do we need gX? -. if "\*[doc-date-string]"" \ -. nr gX 1 -. . ie \n[.$] \{\ . ie (\n[.$] == 3) \ . ds doc-date-string \$1\~\$2 \$3 diff --git a/contrib/groff-1.19/tmac/doc-ditroff b/contrib/groff-1.19/tmac/doc-ditroff index 14be96b8df..84fe882543 100644 --- a/contrib/groff-1.19/tmac/doc-ditroff +++ b/contrib/groff-1.19/tmac/doc-ditroff @@ -9,10 +9,8 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. +.\" 3. [Deleted. See +.\" ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change] .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. @@ -180,8 +178,6 @@ .ds Ba \f[R]|\f[] .ds Am & . -.nr gX 0 -. . .\" NS doc-header-string global string .\" NS the final string used for the manual page header @@ -203,12 +199,8 @@ . wh 0 doc-header . wh -1.25i doc-footer . -. if \n[gX] \ -. ds doc-command-name -. . br . -. nr gX 0 . e@ doc-end-macro .. . diff --git a/contrib/groff-1.19/tmac/doc-nroff b/contrib/groff-1.19/tmac/doc-nroff index e8ce14dc53..eabb305f5b 100644 --- a/contrib/groff-1.19/tmac/doc-nroff +++ b/contrib/groff-1.19/tmac/doc-nroff @@ -9,10 +9,8 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. +.\" 3. [Deleted. See +.\" ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change] .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. diff --git a/contrib/groff-1.19/tmac/doc-old.tmac b/contrib/groff-1.19/tmac/doc-old.tmac index 5e5db5928c..b91fabf47d 100644 --- a/contrib/groff-1.19/tmac/doc-old.tmac +++ b/contrib/groff-1.19/tmac/doc-old.tmac @@ -10,10 +10,8 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. +.\" 3. [Deleted. See +.\" ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change] .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. diff --git a/contrib/groff-1.19/tmac/doc-syms b/contrib/groff-1.19/tmac/doc-syms index 521977f3ec..4182a087fe 100644 --- a/contrib/groff-1.19/tmac/doc-syms +++ b/contrib/groff-1.19/tmac/doc-syms @@ -9,10 +9,8 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. +.\" 3. [Deleted. See +.\" ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change] .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. @@ -567,6 +565,8 @@ .as doc-str-St--p1003.1g-2000 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq]) .ds doc-str-St--p1003.1-2001 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1-2001 .as doc-str-St--p1003.1-2001 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq]) +.ds doc-str-St--p1003.1-2004 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1-2004 +.as doc-str-St--p1003.1-2004 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq]) . .\" POSIX Part 2: Shell and Utilities .ds doc-str-St--p1003.2 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.2 @@ -695,6 +695,7 @@ .ds doc-str-Lb-libmagic Magic Number Recognition Library (libmagic, \-lmagic) .ds doc-str-Lb-libmenu Curses Menu Library (libmenu, \-lmenu) .ds doc-str-Lb-libossaudio OSS Audio Emulation Library (libossaudio, \-lossaudio) +.ds doc-str-Lb-libpam Pluggable Authentication Module Library (libpam, \-lpam) .ds doc-str-Lb-libpcap Packet Capture Library (libpcap, \-lpcap) .ds doc-str-Lb-libpci PCI Bus Access Library (libpci, \-lpci) .ds doc-str-Lb-libpmc Performance Counters Library (libpmc, \-lpmc) diff --git a/contrib/groff-1.19/tmac/doc.tmac b/contrib/groff-1.19/tmac/doc.tmac index b578307501..083b13a055 100644 --- a/contrib/groff-1.19/tmac/doc.tmac +++ b/contrib/groff-1.19/tmac/doc.tmac @@ -9,10 +9,8 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. +.\" 3. [Deleted. See +.\" ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change] .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. @@ -2179,10 +2177,21 @@ . doc-parse-args \$@ . \} . el \{\ -. ie \n[doc-space-mode] \ +. ie \n[doc-space-mode] \{\ +. ds doc-saved-space "\*[doc-space] +. ds doc-space . nr doc-space-mode 0 -. el \ +. \} +. el \{\ +. ds doc-space "\*[doc-saved-space] . nr doc-space-mode 1 +. +. \" finish line only if it is interrupted and `doc-have-space' +. \" isn't set +. if \n[doc-reg-Sm] \ +. if \n[.int] \ +. nop \) +. \} . \}\} . . if !\n[doc-arg-limit] \ @@ -2207,10 +2216,15 @@ . el \{\ . \" no argument for Sm . nr doc-arg-ptr -1 -. ie \n[doc-space-mode] \ +. ie \n[doc-space-mode] \{\ +. ds doc-saved-space "\*[doc-space] +. ds doc-space . nr doc-space-mode 0 -. el \ +. \} +. el \{\ +. ds doc-space "\*[doc-saved-space] . nr doc-space-mode 1 +. \} . \}\} . . ie \n[doc-space-mode] \{\ @@ -2237,18 +2251,13 @@ . \} . . \" do we have parameters to print? -. ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\ -. \" ignore `.Sm on' and `.Sm off' without additional parameters -. ie (\n[doc-arg-ptr] > 1) \ -. doc-print-and-reset -. el \ -. doc-reset-args -. \} -. el \{\ +. ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\ . \" skip `Sm' argument . nr doc-arg-ptr +1 . doc-print-recursive . \} +. el \ +. doc-reset-args .. . . @@ -2501,7 +2510,9 @@ . nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c . . nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0 +. nr doc-curr-font \n[.f] . nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0 +. nr doc-curr-size \n[.ps] . nr doc-fontmode-depth -1 . \} . el \ @@ -5144,6 +5155,10 @@ . ie \n[.$] \ . tm Usage: .Re (does not take arguments) (#\n[.c]) . el \{\ +. if !\n[doc-is-reference] \{\ +. tm mdoc warning: Extraneous .Re (#\n[.c]) +. return +. \} . doc-print-reference . doc-reset-reference . nr doc-is-reference 0 @@ -5222,7 +5237,7 @@ .\" NS doc-reference-count . .de doc-finish-reference -. nr doc-reference-count -1 +. nr doc-reference-count -\$1 . ie \n[doc-reference-count] \ . nop \), . el \ @@ -5252,81 +5267,81 @@ . chop doc-reference-title-name-for-book . ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\ . nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c -. doc-finish-reference +. doc-finish-reference \n[doc-reference-title-count] . \} . el \{\ . nop \*[doc-reference-title-name]\c -. doc-finish-reference +. doc-finish-reference \n[doc-reference-title-count] . \}\} . . if \n[doc-book-count] \{\ . unformat doc-book-name . chop doc-book-name . nop \*[doc-book-name]\c -. doc-finish-reference +. doc-finish-reference \n[doc-book-count] . \} . . if \n[doc-publisher-count] \{\ . unformat doc-publisher-name . chop doc-publisher-name . nop \*[doc-publisher-name]\c -. doc-finish-reference +. doc-finish-reference \n[doc-publisher-count] . \} . . if \n[doc-journal-count] \{\ . unformat doc-journal-name . chop doc-journal-name . nop \*[doc-journal-name]\c -. doc-finish-reference +. doc-finish-reference \n[doc-journal-count] . \} . . if \n[doc-report-count] \{\ . unformat doc-report-name . chop doc-report-name . nop \*[doc-report-name]\c -. doc-finish-reference +. doc-finish-reference \n[doc-report-count] . \} . . if \n[doc-issue-count] \{\ . unformat doc-issue-name . chop doc-issue-name . nop \*[doc-issue-name]\c -. doc-finish-reference +. doc-finish-reference \n[doc-issue-count] . \} . . if \n[doc-volume-count] \{\ . unformat doc-volume-name . chop doc-volume-name . nop \*[doc-volume-name]\c -. doc-finish-reference +. doc-finish-reference \n[doc-volume-count] . \} . . if \n[doc-page-number-count] \{\ . unformat doc-page-number-string . chop doc-page-number-string . nop \*[doc-page-number-string]\c -. doc-finish-reference +. doc-finish-reference \n[doc-page-number-count] . \} . . if \n[doc-corporate-count] \{\ . unformat doc-corporate-name . chop doc-corporate-name . nop \*[doc-corporate-name]\c -. doc-finish-reference +. doc-finish-reference \n[doc-corporate-count] . \} . . if \n[doc-date-count] \{\ . unformat doc-date . chop doc-date . nop \*[doc-date]\c -. doc-finish-reference +. doc-finish-reference \n[doc-date-count] . \} . . if \n[doc-optional-count] \{\ . unformat doc-optional-string . chop doc-optional-string . nop \*[doc-optional-string]\c -. doc-finish-reference +. doc-finish-reference \n[doc-optional-count] . \} . . if \n[doc-reference-count] \ @@ -6156,7 +6171,7 @@ . \}\}\} . el \{\ . tm1 "Usage: .An {-nosplit | -split} -. tm1 .An author_name ... (#\n[.c]) +. tm1 " .An author_name ... (#\n[.c]) . \}\} . . if \n[doc-in-authors-section] \{\ diff --git a/contrib/groff-1.19/tmac/groff_man.man b/contrib/groff-1.19/tmac/groff_man.man index 5886e4f884..985014ebed 100644 --- a/contrib/groff-1.19/tmac/groff_man.man +++ b/contrib/groff-1.19/tmac/groff_man.man @@ -1,9 +1,10 @@ .ig -Copyright (C) 1999-2000, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 1999-2000, 2001, 2002, 2003, 2004, 2005 +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 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 @@ -63,9 +64,12 @@ groff_man \- groff `man' macros to support generation of man pages . The .B man -macros used to generate man pages with +macros used to generate +.I \%man\~pages +with .I groff were written by James Clark. +. This document provides a brief summary of the use of each macro in that package. . @@ -76,13 +80,14 @@ package. . The .B man -macros understand the following command line options (which define various -registers). +macros understand the following command line options (which define +various registers). . .TP .B \-rcR=1 -This option (the default if in nroff mode) will create a single, very long -page instead of multiple pages. +This option (the default if in nroff mode) will create a single, very +long page instead of multiple pages. +. Say .B \-rcR=0 to disable it. @@ -95,12 +100,14 @@ pages continuously, rather than starting each at\ 1. .TP .B \-rD1 Double-sided printing. +. Footers for even and odd pages are formatted differently. . .TP .BI \-rFT= dist -Set distance of the footer relative to the bottom of the page if negative -or relative to the top if positive. +Set distance of the footer relative to the bottom of the page if +negative or relative to the top if positive. +. The default is -0.5i. . .TP @@ -130,13 +137,47 @@ consistent indentation. .TP .BI \-rLL= line-length Set line length. -If this option is not given, the line length defaults to 78n in nroff mode -and 6.5i in troff mode. +. +If this option is not given, +the line length is set to respect any value set by a prior `.ll' request, +(which +.I must +be in effect when the `.TH' macro is invoked), +if this differs from the built\-in default for the formatter; +otherwise it defaults to 78n in +.I nroff +mode and 6.5i in +.I troff +mode. +. +.IP +Note that the use of a `.ll' request to initialize the line length +is supported for backward compatibility with some versions of the +.B man +program; +direct initialization of the `LL' register should +.I always +be preferred to the use of such a request. +In particular, note that a `.ll\ 65n' request will +.I not +preserve the normal +.I nroff +default line length, +(the +.B man +default initialization to 78n will prevail), +whereas, +the `-rLL=65n' option, or an equivalent `.nr\ LL\ 65n' +request preceding the use of the `TH' macro, +.I will +set a line length of 65n. . .TP .BI \-rLT= title-length Set title length. -If this option is not given, the title length defaults to the line length. +. +If this option is not given, the title length defaults to the line +length. . .TP .BI \-rP nnn @@ -167,8 +208,9 @@ number pages as .IR nnn b, .IR nnn c, etc. -For example, the option `\-rX2' will produce the following page numbers: -1, 2, 2a, 2b, 2c, etc. +. +For example, the option `\-rX2' will produce the following page +numbers: 1, 2, 2a, 2b, 2c, etc. . . .\" ----------------------------------------------------------------- @@ -176,23 +218,29 @@ For example, the option `\-rX2' will produce the following page numbers: .SH USAGE . This section describes the available macros for manual pages. -For further customization, put additional macros and requests into the file +. +For further customization, put additional macros and requests into the +file .B man.local which will be loaded immediately after the .B man package. . .TP -.BI .TH " title section " [ extra1 "] [" extra2 "] [" extra3 ] -Set the title of the man page to +.BI .TH " title section \fB[\fPextra1\fB]\fP \fB[\fPextra2\fB]\fP \fB[\fPextra3\fB]" +Set the title of the +.I \man\~page +to .I title and the section to .IR section , which must take on a value between 1 and\ 8. +. The value .I section may also have a string appended, e.g. `.pm', to indicate a specific -subsection of the man pages. +subsection of the +.IR \%man\~pages . Both .I title and @@ -214,50 +262,58 @@ is centered in the header line. For HTML output, headers and footers are completely supressed. . .IP -Additionally, this macro starts a new page; the new line number is\ 1 again -(except if the `-rC1' option is given on the command line) -- this feature -is intended only for formatting multiple man pages; a single man page should -contain exactly one +Additionally, this macro starts a new page; the new line number is\ 1 +again (except if the `-rC1' option is given on the command line) -- +this feature is intended only for formatting multiple +.IR \%man\~pages ; +a single +.I \%man\~page +should contain exactly one .B TH macro at the beginning of the file. . .TP .BI ".SH [" "text for a heading" ] Set up an unnumbered section heading sticking out to the left. +. Prints out all the text following .B SH -up to the end of the line (or the text in the next input line if there is -no argument to +up to the end of the line (or the text in the next input line if there +is no argument to .BR SH ) in bold face (or the font specified by the string .BR HF ), one size larger than the base document size. -Additionally, the left margin and the indentation for the following text -is reset to the default values. +. +Additionally, the left margin and the indentation for the following +text is reset to the default values. . .TP .BI ".SS [" "text for a heading" ] Set up a secondary, unnumbered section heading. +. Prints out all the text following .B SS -up to the end of the line (or the text in the next input line if there is -no argument to +up to the end of the line (or the text in the next input line if there +is no argument to .BR SS ) in bold face (or the font specified by the string .BR HF ), at the same size as the base document size. -Additionally, the left margin and the indentation for the following text -is reset to the default values. +. +Additionally, the left margin and the indentation for the following +text is reset to the default values. . .TP .BI ".TP [" nnn ] Set up an indented paragraph with label. +. The indentation is set to .I nnn -if that argument is supplied (the default unit is `n' if omitted), otherwise -it is set to the previous indentation value specified with +if that argument is supplied (the default unit is `n' if omitted), +otherwise it is set to the previous indentation value specified with .BR TP , .BR IP , or @@ -265,18 +321,22 @@ or (or to the default value if none of them have been used yet). . .IP -The first input line of text following this macro is interpreted as a string -to be printed flush-left, as it is appropriate for a label. -It is not interpreted as part of a paragraph, so there is no attempt to fill -the first line with text from the following input lines. +The first input line of text following this macro is interpreted as a +string to be printed flush-left, as it is appropriate for a label. +. +It is not interpreted as part of a paragraph, so there is no attempt +to fill the first line with text from the following input lines. +. Nevertheless, if the label is not as wide as the indentation the paragraph starts at the same line (but indented), continuing on the following lines. +. If the label is wider than the indentation the descriptive part of the paragraph begins on the line following the label, entirely indented. -Note that neither font shape nor font size of the label is set to a default -value; on the other hand, the rest of the text will have default font -settings. +. +Note that neither font shape nor font size of the label is set to a +default value; on the other hand, the rest of the text will have +default font settings. . .IP The @@ -290,11 +350,15 @@ macro is the macro used for the explanations you are just reading. .TQ .B .P These macros are mutual aliases. +. Any of them causes a line break at the current position, followed by a vertical space downwards by the amount specified by the .B PD macro. -The font size and shape are reset to the default value (10pt resp. Roman). +. +The font size and shape are reset to the default value (10pt +resp. Roman). +. Finally, the current left margin and the indentation are restored. . .TP @@ -302,25 +366,29 @@ Finally, the current left margin and the indentation are restored. Set up an indented paragraph, using .I designator as a tag to mark its beginning. +. The indentation is set to .I nnn -if that argument is supplied (the default unit is `n' if omitted), otherwise -it is set to the previous indentation value specified with +if that argument is supplied (the default unit is `n' if omitted), +otherwise it is set to the previous indentation value specified with .BR TP , .BR IP , or .B HP (or to the default value if none of them have been used yet). -Font size and face of the paragraph (but not the designator) are reset to -its default values. +. +Font size and face of the paragraph (but not the designator) are reset +to its default values. . .IP -To start an indented paragraph with a particular indentation but without a -designator, use `""' (two doublequotes) as the second argument. +To start an indented paragraph with a particular indentation but +without a designator, use `""' (two doublequotes) as the second +argument. . .IP -For example, the following paragraphs were all set up with bullets as the -designator, using `.IP\ \\(bu\ 4'. +For example, the following paragraphs were all set up with bullets as +the designator, using `.IP\ \\(bu\ 4'. +. The whole block has been enclosed with `.RS' and `.RE' to set the left margin temporarily to the current indentation value. . @@ -333,50 +401,61 @@ package to format lists. .IP \(bu 4 .B HP is another. +. This macro produces a paragraph with a left hanging indentation. .IP \(bu 4 .B TP is another. -This macro produces an unindented label followed by an indented paragraph. +. +This macro produces an unindented label followed by an indented +paragraph. .RE . .TP .BI ".HP [" nnn ] Set up a paragraph with hanging left indentation. +. The indentation is set to .I nnn -if that argument is supplied (the default unit is `n' if omitted), otherwise -it is set to the previous indentation value specified with +if that argument is supplied (the default unit is `n' if omitted), +otherwise it is set to the previous indentation value specified with .BR TP , .BR IP , or .B HP (or to the default value if none of them have been used yet). +. Font size and face are reset to its default values. -The following paragraph illustrates the effect of this macro with hanging -indentation set to\ 4 (enclosed by `.RS' and `.RE' to set the left margin temporarily to -the current indentation): +. +The following paragraph illustrates the effect of this macro with +hanging indentation set to\ 4 (enclosed by +.B .RS +and +.B .RE +to set the left margin temporarily to the current indentation): . .RS .HP 4 This is a paragraph following an invocation of the .B HP macro. -As you can see, it produces a paragraph where all lines but the first are -indented. +. +As you can see, it produces a paragraph where all lines but the first +are indented. .RE . .TP .BI ".RS [" nnn ] This macro moves the left margin to the right by the value .I nnn -if specified (default unit is `n'); otherwise it is set to the previous -indentation value specified with +if specified (default unit is `n'); otherwise it is set to the +previous indentation value specified with .BR TP , .BR IP , or .B HP (or to the default value if none of them have been used yet). +. The indentation value is then set to the default. . .IP @@ -389,7 +468,9 @@ macro can be nested. This macro moves the left margin back to level .IR nnn , restoring the previous left margin. +. If no argument is given, it moves one level back. +. The first level (i.e., no call to .B RS yet) has number\ 1, and each call to @@ -397,8 +478,8 @@ yet) has number\ 1, and each call to increases the level by\ 1. . .PP -To summarize, the following macros cause a line break with the insertion of -vertical space (which amount can be changed with the +To summarize, the following macros cause a line break with the +insertion of vertical space (which amount can be changed with the .B PD macro): .BR SH , @@ -435,8 +516,11 @@ appear in boldface font, one point size smaller than the default font. . .TP .BI ".BI " text -Causes text on the same line to appear alternately in bold face and italic. +Causes text on the same line to appear alternately in bold face and +italic. +. The text must be on the same line as the macro call. +. Thus .RS .IP @@ -449,26 +533,35 @@ appears in italics. .TP .BI ".IB " text Causes text to appear alternately in italic and bold face. +. The text must be on the same line as the macro call. . .TP .BI ".RI " text -Causes text on the same line to appear alternately in roman and italic. +Causes text on the same line to appear alternately in roman and +italic. +. The text must be on the same line as the macro call. . .TP .BI ".IR " text -Causes text on the same line to appear alternately in italic and roman. +Causes text on the same line to appear alternately in italic and +roman. +. The text must be on the same line as the macro call. . .TP .BI ".BR " text -Causes text on the same line to appear alternately in bold face and roman. +Causes text on the same line to appear alternately in bold face and +roman. +. The text must be on the same line as the macro call. . .TP .BI ".RB " text -Causes text on the same line to appear alternately in roman and bold face. +Causes text on the same line to appear alternately in roman and bold +face. +. The text must be on the same line as the macro call. . .TP @@ -476,6 +569,7 @@ The text must be on the same line as the macro call. Causes .I text to appear in bold face. +. If no text is present on the line where the macro is called the text of the next input line appears in bold face. . @@ -484,6 +578,7 @@ of the next input line appears in bold face. Causes .I text to appear in italic. +. If no text is present on the line where the macro is called the text of the next input line appears in italic. . @@ -492,13 +587,15 @@ of the next input line appears in italic. . .SH "MISCELLANEOUS" . -The default indentation is 7.2n in troff mode and 7n in nroff mode except for +The default indentation is 7.2n in troff mode and 7n in nroff mode +except for .B grohtml which ignores indentation. . .TP .B .DT Set tabs every 0.5 inches. +. Since this macro is always called during a .B TH request, it makes sense to call it only if the tab positions have been @@ -507,9 +604,11 @@ changed. .TP .BI ".PD [" nnn ] Adjust the empty space before a new paragraph or section. +. The optional argument gives the amount of space (default unit is `v'); without parameter, the value is reset to its default value (1\ line in nroff mode, 0.4v\ otherwise). +. This affects the macros .BR SH , .BR SS , @@ -525,24 +624,34 @@ and . .TP .BI ".AT [" system " [" release ]] -Alter the footer for use with AT&T manpages. +Alter the footer for use with \f[CR]AT&T\f[] +.IR \%man\~pages . This command exists only for compatibility; don't use it. -See the groff info manual for more. +. +See the +.I groff +info manual for more. . .TP .BI ".UC [" version ] -Alter the footer for use with BSD manpages. +Alter the footer for use with \f[CR]BSD\f[] +.IR \%man\~pages . This command exists only for compatibility; don't use it. -See the groff info manual for more. +. +See the +.I groff +info manual for more. . .TP .B ".PT" Print the header string. +. Redefine this macro to get control of the header. . .TP .B ".BT" Print the footer string. +. Redefine this macro to get control of the footer. . .PP @@ -564,11 +673,13 @@ The `trademark' sign. .TQ .B \e*(rq Left and right quote. +. This is equal to `\e(lq' and `\e(rq', respectively. . .TP .B \e*(HF The typeface used to print headings and subheadings. +. The default is `B'. . .PP @@ -576,8 +687,9 @@ If a preprocessor like .B @g@tbl or .B @g@eqn -is needed, it has become usage to make the first line of the man page look -like this: +is needed, it has become usage to make the first line of the +.I \%man\~page +look like this: .PP .RS .BI .\e"\ word @@ -636,22 +748,27 @@ requests, one can, in principle, supplement the functionality of the macros with individual .I groff requests where necessary. -See the groff info pages for a complete reference of all requests. +. +See the +.I groff +info pages for a complete reference of all requests. . .PP .BR @g@tbl (@MAN1EXT@), .BR @g@eqn (@MAN1EXT@), .BR @g@refer (@MAN1EXT@), -.BR man (1) +.BR man (1), +.BR man (7), . . .\" ----------------------------------------------------------------- . .SH AUTHOR . -This manual page was originally written for the Debian GNU/Linux system by -Susan G. Kleinmann , corrected and updated by Werner Lemberg -, and is now part of the GNU troff distribution. +This manual page was originally written for the Debian GNU/Linux +system by Susan G. Kleinmann , corrected and updated +by Werner Lemberg , and is now part of the GNU troff +distribution. . .\" Local Variables: .\" mode: nroff diff --git a/contrib/groff-1.19/tmac/groff_mdoc.man b/contrib/groff-1.19/tmac/groff_mdoc.man index 29b843a75b..004d784fc9 100644 --- a/contrib/groff-1.19/tmac/groff_mdoc.man +++ b/contrib/groff-1.19/tmac/groff_mdoc.man @@ -19,10 +19,8 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. +.\" 3. [Deleted. See +.\" ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change] .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. @@ -46,7 +44,7 @@ .\" for an already extremely slow package. .\" . -.Dd May 10, 2004 +.Dd August 28, 2005 .Os .Dt GROFF_MDOC 7 . @@ -865,7 +863,7 @@ the release ID. .It NetBSD 0.8, 0.8a, 0.9, 0.9a, 1.0, 1.0a, 1.1, 1.2, 1.2a, 1.2b, 1.2c, 1.2d, 1.2e, 1.3, 1.3a, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.6, 1.6.1, -1.6.2, 2.0, 2.1 +1.6.2, 2.0, 2.0.1, 2.0.2, 2.1 .It FreeBSD 1.0, 1.1, 1.1.5, 1.1.5.1, 2.0, 2.0.5, 2.1, 2.1.5, 2.1.6, 2.1.7, 2.2, 2.2.1, 2.2.2, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 4.0, 4.1, @@ -917,7 +915,10 @@ unbreakable space: .Pp .Dl .Dd January 25, 2001 .Pp -Otherwise, the current date is used, ignoring the parameters. +The month's name shall not be abbreviated. +.Pp +With any other number of arguments, the current date is used, ignoring +the parameters. .Pp This macro is neither callable nor parsed. .El @@ -1677,8 +1678,6 @@ and their results are: .Lb libcurses .It Li libedit .Lb libedit -.It Li libedit -.Lb libedit .It Li libevent .Lb libevent .It Li libform @@ -1701,6 +1700,8 @@ and their results are: .Lb libmenu .It Li libossaudio .Lb libossaudio +.It Li libpam +.Lb libpam .It Li libpcap .Lb libpcap .It Li libpci @@ -1851,7 +1852,7 @@ parenthesis. .It Li ".Op word1 word2" .Op word1 word2 .It Li ".Li .Op Oo Ao option Ac Oc ..." -.Li .Op Oo Ao options Ac Oc ... +.Li .Op Oo Ao option Ac Oc ... .El .Pp Here a typical example of the @@ -1964,6 +1965,8 @@ Part 1: System API .St -p1003.1i-95 .It Li -p1003.1-2001 .St -p1003.1-2001 +.It Li -p1003.1-2004 +.St -p1003.1-2004 .El .Pp . @@ -2898,10 +2901,13 @@ outlined historically in this section. . .It Li ".Sh AUTHORS" Credits should be placed here. -The +Use the .Ql .An -macro should be used to specify the name(s) of the person(s). -. +macro for names and the +.Ql .Aq +macro for e-mail addresses within optional contact information. +Explicitly indicate whether the person authored the initial manual page +or the software or whatever the person is being credited for. .It Li ".Sh BUGS" Blatant problems with the topic go here. .El diff --git a/contrib/groff-1.19/tmac/groff_ms.man b/contrib/groff-1.19/tmac/groff_ms.man index 8d62e8de85..258670fb42 100644 --- a/contrib/groff-1.19/tmac/groff_ms.man +++ b/contrib/groff-1.19/tmac/groff_ms.man @@ -1,6 +1,7 @@ '\" t .ig -Copyright (C) 1989-1995, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -22,9 +23,17 @@ the original English. .cp 0 . .TH GROFF_MS @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +. +. +. .SH NAME +. groff_ms \- groff ms macros +. +. +. .SH SYNOPSIS +. .B groff .B \-ms [ @@ -42,8 +51,11 @@ groff_ms \- groff ms macros [ .IR files .\|.\|.\& ] -.\" ----- +. +. +. .SH DESCRIPTION +. This manual page describes the GNU version of the .I ms macros, @@ -64,8 +76,11 @@ The .I ms macros are suitable for reports, letters, books, and technical documentation. -.\" ----- +. +. +. .SH USAGE +. The .I ms macro package expects files to have @@ -74,6 +89,7 @@ The simplest documents can begin with a paragraph macro and consist of text separated by paragraph macros or even blank lines. Longer documents have a structure as follows: +. .TP .B "Document type" If you use the @@ -88,6 +104,7 @@ Other document formats found in AT&T are specific to AT&T or Berkeley, and are not supported in .IR "groff ms" . +. .TP .B "Format and layout" By setting number registers, @@ -96,6 +113,7 @@ margins, spacing, headers and footers, and footnotes. See .I "Document control registers" below for more details. +. .TP .B "Cover page" A cover page consists of a title, @@ -104,18 +122,22 @@ an abstract, and the date. See .I "Cover page macros" below for more details. +. .TP .B "Body" Following the cover page is your document. It consists of paragraphs, headings, and lists. +. .TP .B "Table of contents" Longer documents usually include a table of contents, which you can add by placing the .B TC macro at the end of your document. -.\" ----- +. +. .SS "Document control registers" +. The following table lists the document control number registers. For the sake of consistency, @@ -123,8 +145,9 @@ set registers related to margins at the beginning of your document, or just after the .B RP macro. +. .LP -.ne 9 +.ne 12 .B Margin settings .RS .na @@ -153,8 +176,9 @@ T} next page 1i _ .TE .RE +. .LP -.ne 7 +.ne 12 .B Text settings .RS .TS @@ -168,11 +192,22 @@ T} next para. 10p VS T{ Line spacing (leading) T} next para. 12p +PSINCR T{ +Point size increment +for section headings of +increasing importance +T} next heading 1p +GROWPS T{ +Heading level +beyond which PSINCR +is ignored +T} next heading 0 _ .TE .RE +. .LP -.ne 7 +.ne 11 .B Paragraph settings .RS .TS @@ -189,9 +224,18 @@ T} next para. 0.3v QI T{ Quoted paragraph indent T} next para. 5n +PORPHANS T{ +Number of initial lines +to be kept together +T} next para. 1 +HORPHANS T{ +Number of initial lines +to be kept with heading +T} next heading 1 _ .TE .RE +. .LP .ne 7 .B Footnote settings @@ -210,6 +254,7 @@ FPD Para. spacing next footnote \[rs]n[PD]/2 _ .TE .RE +. .LP .ne 6 .B Other settings @@ -226,12 +271,15 @@ _ .TE .ad .RE -.\" ----- +. +. .SS "Cover page macros" +. Use the following macros to create a cover page for your document in the order shown. +. .TP -.B \&.RP [no] +.B .RP [no] Specifies the report format for your document. The report format creates a separate cover page. With no @@ -240,6 +288,7 @@ macro, .I groff prints a subset of the cover page on page\~1 of your document. +. .IP If you use the optional .B no @@ -249,45 +298,52 @@ prints a title page but does not repeat any of the title page information (title, author, abstract, etc.\&) on page\~1 of the document. +. .TP -.B \&.P1 +.B .P1 (P-one) Prints the header on page\~1. The default is to suppress the header. +. .TP -.BI "\&.DA [" xxx ] +.BI ".DA [" xxx ] (optional) Print the current date, or the arguments to the macro if any, on the title page (if specified) and in the footers. This is the default for .IR nroff . +. .TP -.BI "\&.ND [" xxx ] +.BI ".ND [" xxx ] (optional) Print the current date, or the arguments to the macro if any, on the title page (if specified) but not in the footers. This is the default for .IR troff . +. .TP -.B \&.TL +.B .TL Specifies the document title. .I Groff collects text following the .B TL macro into the title, until reaching the author name or abstract. +. .TP -.B \&.AU +.B .AU Specifies the author's name. You can specify multiple authors by using an .B AU macro for each author. +. .TP -.B \&.AI +.B .AI Specifies the author's institution. You can specify multiple institutions. +. .TP -.B \&.AB [no] +.B .AB [no] Begins the abstract. The default is to print the word .BR ABSTRACT , @@ -295,17 +351,21 @@ centered and in italics, above the text of the abstract. The option .B no suppresses this heading. +. .TP -.B \&.AE +.B .AE End the abstract. -.\" ----- +. +. .SS Paragraphs +. Use the .B PP macro to create indented paragraphs, and the .B LP macro to create paragraphs with no initial indent. +. .PP The .B QP @@ -315,6 +375,7 @@ The effect is identical to the HTML element. The next paragraph or heading returns margins to normal. +. .PP The .B XP @@ -324,18 +385,68 @@ the left margin, and subsequent lines are indented (the opposite of .BR PP ). +. +.PP +For each of the above paragraph types, +and also for any list entry introduced by the +.B IP +macro +(described later), +the document control register +.BR PORPHANS , +sets the +.I minimum +number of lines which must be printed, +after the start of the paragraph, +and before any page break occurs. +If there is insufficient space remaining on the current page +to accommodate this number of lines, +then a page break is forced +.I before +the first line of the paragraph is printed. +. +.PP +Similarly, +when a section heading +(see subsection +.I Headings +below) +preceeds any of these paragraph types, +the +.B HORPHANS +document control register specifies the +.I minimum +number of lines of the paragraph +which must be kept on the same page as the heading. +If insufficient space remains on the current page +to accommodate the heading and this number of lines of paragraph text, +then a page break is forced +.I before +the heading is printed. +. +. .SS Headings +. Use headings to create a hierarchical structure for your document. -The +By default, +the .I ms macros print headings in .B bold using the same font family and point size as the body text. +For output devices which support scalable fonts, +this behaviour may be modified, +by defining the document control registers, +.B GROWPS +and +.BR PSINCR . +. .PP The following heading macros are available: +. .TP -.BI \&.NH \0xx +.BI .NH\ xx Numbered heading. The argument .I xx @@ -351,17 +462,166 @@ after .BR ".NH\ 1" , .I groff prints a warning on standard error. +. +.IP +If the +.B GROWPS +register is set to a value +greater than the level of the heading, +then the point size of the heading will be increased by +.B PSINCR +units over the text size specified by the +.B PS +register, +for each level by which the heading level is less than +the value of +.BR GROWPS . +For example, +the sequence: +. +.RS +.ne 12 +.nf +.IP +\&.nr PS 10 +\&.nr GROWPS 3 +\&.nr PSINCR 1.5p +\&. +\&.NH 1 +Top Level Heading +\&. +\&.NH 2 +Second Level Heading +\&. +\&.NH 3 +Third Level Heading +.fi +.RE +. +.IP +will cause +.RI \*(lq 1.\ Top\ Level\ Heading \*(rq +to be printed in 13pt +.B bold +text, followed by +.RI \*(lq 1.1.\ Second\ Level\ Heading \*(rq +in 11.5pt +.B bold +text, while +.RI \*(lq 1.1.1.\ Third\ Level\ Heading \*(rq, +and all more deeply nested heading levels, +will remain in the 10pt +.B bold +text which is specified by the +.B PS +register. +. +.IP +Note that the value stored in +.B PSINCR +is interpreted in +.I groff +basic units; +the +.I p +scaling factor should be employed, +when assigning a value specified in points. +. +.IP +After invoking +.BR .NH , +the assigned heading number is available in the strings +.B SN-DOT +(exactly as it appears in the formatted heading), +and +.B SN-NO-DOT +(with its final period omitted). +The string +.B SN +is also defined, +as an alias for +.BR SN-DOT ; +if preferred, +the user may redefine it as an alias for +.BR SN-NO-DOT , +'ne 10 +by including the initialisation: +. +.RS +.nf +.IP +\&.ds SN-NO-DOT +\&.als SN SN-NO-DOT +.fi +.RE +. +.IP +.I before +the first use of +.BR .NH , +or simply: +. +.RS +.nf +.IP +\&.als SN SN-NO-DOT +.fi +.RE +. +.IP +.I after +the first use of +.BR .NH . +. .TP -.B \&.SH +.BI .SH\ [ xx ] Unnumbered subheading. -.\" ----- +The use of the optional +.I xx +argument is a GNU extension, +which adjusts the point size of the unnumbered subheading +to match that of a numbered heading, +introduced using +.BI .NH\ xx +with the same value of +.IR xx . +For example, +given the same settings for +.BR PS , +.B GROWPS +and +.BR PSINCR , +as used in the preceeding +.B .NH +example, +the sequence: +. +.RS +.ne +.nf +.IP +\&.SH 2 +An Unnumbered Subheading +.fi +.RE +. +.IP +will print +.RI \*(lq "An Unnumbered Subheading" \*(rq +in 11.5pt +.B bold +text. +. +. .SS Highlighting +. The .I ms macros provide a variety of methods to highlight or emphasize text: +. .TP -.BI "\&.B [" txt " [" post " [" pre ]]] +.B ".B [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]" Sets its first argument in .BR "bold type" . If you specify a second argument, @@ -377,86 +637,102 @@ in the previous font the first argument. For example, .RS +. .IP \&.B foo ) ( .RE +. .IP prints .RB ( foo ). +. .IP If you give this macro no arguments, .I groff prints all text following in bold until the next highlighting, paragraph, or heading macro. +. .TP -.BI "\&.R [" txt " [" post " [" pre ]]] +.B ".R [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]" Sets its first argument in roman (or regular) type. It operates similarly to the .B B macro otherwise. +. .TP -.BI "\&.I [" txt " [" post " [" pre ]]] +.B ".I [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]" Sets its first argument in .IR "italic type" . It operates similarly to the .B B macro otherwise. +. .TP -.BI "\&.CW [" txt " [" post " [" pre ]]] +.B ".CW [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]" Sets its first argument in a constant width face. It operates similarly to the .B B macro otherwise. +. .TP -.BI "\&.BI [" txt " [" post " [" pre ]]] +.B ".BI [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]" Sets its first argument in bold italic type. It operates similarly to the .B B macro otherwise. +. .TP -.BI "\&.BX [" txt ] +.BI ".BX [" txt ] Prints its argument and draws a box around it. If you want to box a string that contains spaces, use a digit-width space (\[rs]0). +. .TP -.BI "\&.UL [" txt " [" post ]] +.BI ".UL [" txt " [" post ]] Prints its first argument with an underline. If you specify a second argument, .I groff prints it in the previous font after the underlined text, with no intervening space. +. .TP -.B \&.LG +.B .LG Prints all text following in larger type (2\~points larger than the current point size) until the next font size, highlighting, paragraph, or heading macro. You can specify this macro multiple times to enlarge the point size as needed. +. .TP -.B \&.SM +.B .SM Prints all text following in smaller type (2\~points smaller than the current point size) until the next type size, highlighting, paragraph, or heading macro. You can specify this macro multiple times to reduce the point size as needed. +. .TP -.B \&.NL +.B .NL Prints all text following in the normal point size (that is, the value of the .B PS register). +. .TP .BI \[rs]*{ text \[rs]*} Print the enclosed .I text as a superscript. -.\" ----- +. +. .SS Indents +. You may need to indent sections of text. A typical use for indents is to create nested lists and sublists. +. .PP Use the .B RS @@ -466,20 +742,25 @@ macros to start and end a section of indented text, respectively. The .B PI register controls the amount of indent. +. .PP You can nest indented sections as deeply as needed by using multiple, nested pairs of .B RS and .BR RE . -.\" ----- +. +. .SS Lists +. The .B IP macro handles duties for all lists. Its syntax is as follows: +. .TP .BI ".IP [" marker " [" width ]] +. .IP The .I marker @@ -488,6 +769,7 @@ is usually a bullet character for unordered lists, a number (or auto-incrementing number register) for numbered lists, or a word or phrase for indented (glossary-style) lists. +. .IP The .I width @@ -497,7 +779,10 @@ list items in the document until specified again. .\" ----- .br .ne 15 +. +. .SS "Tab stops" +. Use the .B ta request to set tab stops as needed. @@ -507,8 +792,10 @@ macro to reset tabs to the default (every 5n). You can redefine the .B TA macro to create a different set of default tab stops. -.\" ----- +. +. .SS "Displays and keeps" +. Use displays to show text-based examples or figures (such as code listings). Displays turn off filling, so lines of code can be @@ -542,6 +829,7 @@ _ .TE .RE .ad +. .LP Use the .B DE @@ -550,11 +838,17 @@ The macros .B Ds and .B De -are aliases for +were formerly provided as aliases for .B DS and .BR DE , -respectively. +respectively, but they have been removed, and should no longer be used. +X11 documents which actually use +.B Ds +and +.B De +always load a specific macro file from the X11 distribution (macros.t) +which provides proper definitions for the two macros. .PP To .I keep @@ -572,6 +866,7 @@ macro begins a block of text to be kept on a single page, and the .B KE macro ends the block. +. .PP You can specify a .I "floating keep" @@ -593,8 +888,23 @@ request or by reaching the end of the page, prints the floating keep at the top of the new page. This is useful for printing large graphics or tables that do not need to appear exactly where specified. -.\" ----- +. +.PP +The macros +.B B1 +and +.B B2 +can be used to enclose a text within a box; +.B .B1 +begins the box, and +.B .B2 +ends it. +Text in the box is automatically placed in a diversion +(keep). +. +. .SS "Tables, figures, equations, and references" +. The .I -ms macros support the standard @@ -607,8 +917,9 @@ and .IR refer . Mark text meant for preprocessors by enclosing it in pairs of tags as follows: +. .TP -.BR "\&.TS [H]" " and " \&.TE +.BR ".TS [H]" " and " .TE Denotes a table, to be processed by the .I tbl preprocessor. @@ -625,8 +936,9 @@ prints the header at the beginning of the table; if the table runs onto another page, .I groff prints the header on the next page as well. +. .TP -.BR \&.PS " and " \&.PE +.BR .PS " and " .PE Denotes a graphic, to be processed by the .I pic preprocessor. @@ -638,8 +950,9 @@ AT&T manual available on the Web as a reference, or by using a graphics program such as .IR xfig . +. .TP -.BR "\&.EQ [\fI\,align\/\fP]" " and " \&.EN +.BR ".EQ [\fI\,align\/\fP]" " and " .EN Denotes an equation, to be processed by the .I eqn preprocessor. @@ -652,8 +965,9 @@ or\~\c .B I to center (the default), left-justify, or indent the equation. +. .TP -.BR \&.[ " and " \&.] +.BR .[ " and " .] Denotes a reference, to be processed by the .I refer preprocessor. @@ -662,8 +976,10 @@ The GNU manual page provides a comprehensive reference to the preprocessor and the format of the bibliographic database. -.\" ----- +. +. .SS Footnotes +. The .I ms macros provide a flexible footnote system. @@ -675,6 +991,7 @@ enclosed by and .B FE macros. +. .PP You can specify symbolic footnotes by placing the mark character (such as @@ -686,6 +1003,7 @@ enclosed by and .B FE macros. +. .PP You can control how .I groff @@ -694,19 +1012,24 @@ prints footnote numbers by changing the value of the register as follows: .RS .ne 7 +. .TP 0 Prints the footnote number as a superscript; indents the footnote (default). +. .TP 1 Prints the number followed by a period (like\~1.\&) and indents the footnote. +. .TP 2 Like\~1, without an indent. +. .TP 3 Like\~1, but prints the footnote number as a hanging paragraph. +. .LP .RE You can use footnotes safely within keeps and displays, @@ -727,9 +1050,12 @@ and the occurrences of .B .FS are in the same order as the corresponding occurrences of .BR \[rs]** . -.\" ----- +. +. .SS "Headers and footers" +. There are two ways to define headers and footers: +. .IP \(bu 3n Use the strings .BR LH , @@ -744,6 +1070,7 @@ and to set the left, center, and right footers. This works best for documents that do not distinguish between odd and even pages. +. .IP \(bu Use the .B OH @@ -757,14 +1084,18 @@ macros to define footers for the odd and even pages. This is more flexible than defining the individual strings. The syntax for these macros is as follows: .RS +. .IP -.BI "\&.OH '" left ' center ' right ' +.B ".OH '\fIleft\fP'\fIcenter\fP'\fIright\fP'" .RE +. .IP You can replace the quote (') marks with any character not appearing in the header or footer text. -.\" ----- +. +. .SS Margins +. You control margins using a set of number registers. The following table lists the register names and defaults: .RS @@ -794,13 +1125,16 @@ _ .TE .RE .ad +. .PP Note that there is no right margin setting. The combination of page offset and line length provide the information necessary to derive the right margin. -.\" ----- +. +. .SS "Multiple columns" +. The .I ms macros can set text in as many columns as will reasonably @@ -811,14 +1145,17 @@ However, if the current mode is single-column, starting a multi-column mode does .I not force a page break. +. .TP -.B \&.1C +.B .1C Single-column mode. +. .TP -.B \&.2C +.B .2C Two-column mode. +. .TP -.BI "\&.MC [" width " [" gutter ]] +.BI ".MC [" width " [" gutter ]] Multi-column mode. If you specify no arguments, it is equivalent to the .B 2C @@ -831,8 +1168,10 @@ is the space between columns. The .B MINGW number register is the default gutter width. -.\" ----- +. +. .SS "Creating a table of contents" +. Wrap text that you want to appear in the table of contents in .B XS @@ -845,6 +1184,7 @@ macro to print the table of contents at the end of the document, resetting the page number to\~\c .B i (Roman numeral\~1). +. .PP You can manually create a table of contents by specifying a page number as the first argument to @@ -854,6 +1194,7 @@ Add subsequent entries using the macro. For example: .RS +. .PP .ne 8 .nf @@ -867,11 +1208,13 @@ Details of Galactic Formation \&.XE .fi .RE +. .LP Use the .B PX macro to print a manually-generated table of contents without resetting the page number. +. .PP If you give the argument .B no @@ -884,8 +1227,35 @@ suppresses printing the title specified by the .B \[rs]*[TOC] string. -.\" ----- +. +. +.SS "Fractional point sizes" +. +Traditionally, the +.I ms +macros only support integer values for the document's font size and +vertical spacing. +To overcome this restriction, values larger than or equal to 1000 are taken +as fractional values, multiplied by 1000. +For example, `.nr\~PS\~10250' sets the font size to 10.25 points. +. +.LP +The following four registers accept fractional point sizes: +.BR PS , +.BR VS , +.BR FPS , +and +.BR FVS . +. +.LP +Due to backwards compatibility, the value of +.B VS +must be smaller than 40000 (this is 40.0 points). +. +. +. .SH "DIFFERENCES FROM troff ms" +. The .I "groff ms" macros are a complete re-implementation, @@ -895,6 +1265,7 @@ Since they take advantage of the extended features in they cannot be used with AT&T .IR troff . Other differences include: +. .IP \(bu 3n The internals of .I "groff ms" @@ -904,13 +1275,16 @@ Documents that depend upon implementation details of Unix .I ms may not format properly with .IR "groff ms" . +. .IP \(bu The error-handling policy of .I "groff ms" is to detect and report errors, rather than silently to ignore them. +. .IP \(bu Bell Labs localisms are not implemented. +. .IP \(bu Berkeley localisms, in particular the .B TM @@ -918,19 +1292,24 @@ and .B CT macros, are not implemented. +. .IP \(bu .I "Groff ms" -does not work in compatibility mode (e.g.\& with the +does not work in compatibility mode (e.g., with the .B \-C option). +. .IP \(bu There is no support for typewriter-like devices. +. .IP \(bu .I "Groff ms" does not provide cut marks. +. .IP \(bu Multiple line spacing is not supported (use a larger vertical spacing instead). +. .IP \(bu Some Unix .I ms @@ -939,11 +1318,13 @@ documentation says that the and .B GW number registers can be used to control the column width and -gutter width respectively. -These number registers are not used in groff ms. +gutter width, respectively. +These number registers are not used in +.IR "groff ms" . +. .IP \(bu Macros that cause a reset -(paragraphs, headings, etc.) +(paragraphs, headings, etc.\&) may change the indent. Macros that change the indent do not increment or decrement the indent, but rather set it absolutely. @@ -956,6 +1337,7 @@ request but instead the and .B RE macros. +. .IP \(bu The number register .B GS @@ -971,9 +1353,26 @@ they are being formatted with Unix or .I "groff ms" should use this number register. +. +.IP \(bu +To make +.I "groff ms" +use the default page offset (which also specifies the left margin), +the +.B PO +number register must stay undefined until the first +.B ms +macro is evaluated. +This implies that +.B PO +should not be used early in the document, unless it is changed also: +Remember that accessing an undefined register automatically defines it. .br -.ne 22 +.ne 23 +. +. .SS Strings +. You can redefine the following strings to adapt the .I "groff ms" macros to languages other than English: @@ -1000,17 +1399,33 @@ MONTH11 November MONTH12 December _ .TE +. .PP The .B \[rs]*- string produces an em dash \[em] like this. -.\" ----- +. +.PP +Use +.B \[rs]*Q +and +.B \[rs]*U +to get a left and right typographer's quote, +respectively, in +.I troff +(and plain quotes in +.IR nroff ). + +. +. .SS Text Settings +. The .B FAM string sets the default font family. If this string is undefined at initialization, it is set to Times. +. .LP The point size, vertical spacing, and inter-paragraph spacing for footnotes are controlled by the number registers @@ -1022,10 +1437,11 @@ at initialization these are set to .BR \[rs]n(PS-2 , .BR \[rs]n[FPS]+2 , and -.B \[rs]n(PD/2 +.BR \[rs]n(PD/2 , respectively. If any of these registers are defined before initialization, the initialization macro does not change them. +. .LP The hyphenation flags (as set by the .B hy @@ -1033,6 +1449,7 @@ request) are set from the .B HY register; the default is\~14. +. .PP Improved accent marks (as originally defined in Berkeley's @@ -1047,52 +1464,73 @@ directly after the character. For example, .B n\[rs]*~ produces an n with a tilde over it. -.\" ----- +. +. +. .SH "NAMING CONVENTIONS" +. +. .LP The following conventions are used for names of macros, strings and number registers. External names available to documents that use the .I "groff ms" macros contain only uppercase letters and digits. +. .LP Internally the macros are divided into modules; naming conventions are as follows: +. .IP \(bu 3n Names used only within one module are of the form .IB \%module * name\fR. +. .IP \(bu Names used outside the module in which they are defined are of the form .IB \%module @ name\fR. +. .IP \(bu Names associated with a particular environment are of the form -.IB \%environment : name; +.IB \%environment : name\fR; these are used only within the .B par module. +. .IP \(bu .I name does not have a module prefix. +. .IP \(bu Constructed names used to implement arrays are of the form .IB \%array ! index\fR. +. .PP Thus the groff ms macros reserve the following names: +. .IP \(bu 3n Names containing the characters .BR * , .BR @ , and\~\c .BR : . +. .IP \(bu Names containing only uppercase letters and digits. +. +. +. .SH FILES +. .B @MACRODIR@/ms.tmac (a wrapper file for .BR s.tmac ) .br .B @MACRODIR@/s.tmac +. +. +. .SH "SEE ALSO" +. .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), .BR @g@tbl (@MAN1EXT@), @@ -1101,7 +1539,11 @@ Names containing only uppercase letters and digits. .BR @g@refer (@MAN1EXT@), .I Groff: The GNU Implementation of troff by Trent Fisher and Werner Lemberg. +. +. +. .SH AUTHOR +. Original manual page by James Clark .IR "et al" ; rewritten by Larry Kollar diff --git a/contrib/groff-1.19/tmac/groff_www.man b/contrib/groff-1.19/tmac/groff_www.man index 7ab19a9755..e4b3f524b1 100644 --- a/contrib/groff-1.19/tmac/groff_www.man +++ b/contrib/groff-1.19/tmac/groff_www.man @@ -1,5 +1,6 @@ .TH GROFF_WWW @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -.\" Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +.\" Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 +.\" Free Software Foundation, Inc. .\" Written by Gaius Mulley (gaius@glam.ac.uk) .\" .\" This file is part of groff. @@ -16,7 +17,7 @@ .\" .\" 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. +.\" Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. .\" .\" user level guide to using the -mwww macroset .\" @@ -35,6 +36,8 @@ .SH NAME groff_www \- groff macros for authoring web pages .HR +. +. .SH SYNOPSIS .B "groff \-mwww" [ options ] @@ -81,12 +84,19 @@ Here is a summary of the functions found in this macro set. \&.HR produce a horizontal rule \&.NHR suppress automatic generation of rules. \&.HTL only generate HTML title +\&.HEAD add data to block \&.ULS unorder list begin \&.ULE unorder list end +\&.OLS ordered list begin +\&.OLE ordered list end +\&.DLS definition list begin +\&.DLE definition list end \&.LI insert a list item \&.DC generate a drop capital \&.HTML pass an html raw request to the device driver +\&.CDS code example begin +\&.CDE code example end .fi .PP Output of the @@ -100,15 +110,16 @@ preprocessors is acceptable as input. . .SH REQUESTS .TP -.B JOBNAME -Split output into multiple files. +.B .JOBNAME filename +Split output into multiple HTML files. +A file is split whenever a .SH or .NH\ 1 is encountered. Its argument is the file stem name for future output files. This option is equivalent to .BR \%grohtml 's .B \-j option. .TP -.B HX +.B .HX n Specify the cut off depth when generating links from section headings. For example, a parameter of\~2 would cause .B \%grohtml @@ -136,22 +147,30 @@ to .BR groff . . .TP -.B BCL +.B .BCL foreground background active not-visited visited This macro takes five parameters: foreground, background, active hypertext link, hypertext link not yet visited, and visited hypertext link colour. . .TP -.B BGIMG +.B .BGIMG imagefile the only parameter to this macro is the background image file. . .TP -.B URL +.B .URL url [description] [after] generates .TAG URL -a URL using either two or three arguments. +a URL using either one, two or three arguments. The first parameter is the actual URL, the second is the name of the link, and the third is optional stuff to be printed immediately afterwards. -Hyphenation is disabled while printing the actual URL; explicit breakpoints +If +.B description +and +.B after +are absent then the +.B url +becomes the anchor text. +Hyphenation is disabled while printing the actual URL; +explicit breakpoints should be inserted with the .B \[rs]: escape. @@ -179,11 +198,14 @@ by: .RE . .TP -.B MTO +.B .MTO address [description] [after] Generate an email html reference. The first argument is mandatory as the email address. -The optional second argument is the text you see in your browser, and -an optional third argument is stuff printed immediately afterwards. +The optional second argument is the text you see in your browser +If an empty argument is given, +.B address +is used instead. +An optional third argument is stuff printed immediately afterwards. Hyphenation is disabled while printing the actual email address. For example, .MTO joe@user.org "Joe User" @@ -203,7 +225,7 @@ run with .BR \-Thtml ). . .TP -.B FTP +.B .FTP url [description] [after] indicates that data can be obtained via ftp. The first argument is the url and the second is the browser text. A third argument, similar to the macros above, is intended for stuff printed @@ -219,7 +241,7 @@ The macro example above was specified by: .RE . .TP -.B TAG +.B .TAG name Generates an html name tag from its argument. This can then be referenced using the .URL #URL URL @@ -244,13 +266,14 @@ a URL using either two or three arguments. .RE . .TP -.B IMG +.B .IMG [-R|-L|-C] filename [width] [height] Include a picture into the document. The first argument is the horizontal location: right, left, or center .RB ( \-R , .BR \-L , or .BR \-C ). +Alignment is centered by default (-C). The second argument is the filename. The optional third and fourth arguments are the width and height. If the width is absent it defaults to 1\~inch. @@ -261,7 +284,7 @@ If you are including a png image then it is advisable to use the macro. . .TP -.B PIMG +.B .PIMG [-R|-L|-C] filename [width [height]] Include an image in PNG format. This macro takes exactly the same parameters as the .B IMG @@ -282,22 +305,58 @@ it is necessary to use the option of groff. . .TP -.B MPIMG +.B .MPIMG [-R|-L] [-G gap] filename [width [height]] Place a PNG image on the margin and wrap text around it. -The first parameter is the alignment: left or right +The first parameters are optional. +The alignment: left or right .RB ( \-L or -.BR \-R ). -The second argument is the filename. -The optional third and fourth arguments are the width and height. +.BR \-R ) +specifies the margin where the picture is placed at. +The default alignment is left +.RB ( -L ). +Optionally, +.BI \-G \~gap +can be used to arrange a gap between the picture +and the text that wraps around it. +The default gap width is zero. +.br +The first non-optional argument is the filename. +The optional following arguments are the width and height. If the width is absent it defaults to 1\~inch. If the height is absent it defaults to the width. +Example: +.RS +.IP +.nf +.ft B +\&.MPIMG -L -G 2c foo.png 3c 1.5c +.ft P +.fi +.RE +.IP +The height and width may also be given as percentages. The PostScript +device calculates the width from the +.B .l +register and the height from the +.B .p +register. For example: +.RS +.IP +.nf +.ft B +\&.MPIMG -L -G 2c foo.png 15% +.ft P +.fi +.RE . .TP -.B HnS +.B .HnS n Begin heading. -The heading level is specified by the first parameter. -Use this macro of your headings contain URLs. +The numeric heading level +.I n +is specified by the first parameter. +Use this macro if your headings contain URL, FTP or MTO macros. Example: .RS .IP @@ -317,13 +376,21 @@ GNU Troff .ft P .fi .RE +.IP +In this case you might wish to +disable automatic links to headings. +This can be done via +.B \-P\-l +from the command line. +.\" or by using a call to `.HX 0'. + . .TP -.B HnE +.B .HnE End heading. . .TP -.B LK +.B .LK .TAG LK Force \%grohtml to place the automatically generated links at this position. If this manual page has been processed with @@ -332,37 +399,48 @@ those links can be seen right here. . .LK . -. -.SH SECTION HEADING LINKS -By default -.B \%grohtml -generates links to all section headings and places these at the top of the -html document. (See -.URL #LK LINKS -for details of how to switch this off or alter the position). -. .TP -.B HR -Generate a full-width horizontal rule. +.B .HR +Generate a full-width horizontal rule for +.BR \-Thtml . +No effect for all other devices. . .TP -.B NHR +.B .NHR Suppress generation of the top and bottom rules which \%grohtml emits by default. . .TP -.B HTL +.B .HTL Generate an HTML title only. This differs from the .B TL macro of the .B ms -macro package which generates both an HTML title and an H1 heading. +macro package which generates both an HTML title and an

heading. Use it to provide an HTML title as search engine fodder but a graphic title in the document. +The macro terminates when a space or break is seen (.sp, .br). . .TP -.B HTML +.B .HEAD +Add arbitrary HTML data to the block. +Ignored if not processed with +.BR \-Thtml . +Example: +.RS +.IP +.nf +.B ".HEAD" "\[dq]\[dq]" +.fi +.ft P +.RE +. +.TP +.B .HTML All text after this macro is treated as raw html. If the document is processed without .B \-Thtml @@ -385,12 +463,30 @@ macro is defined as .RE . .TP -.B DC +.B .DC l text [color] Produce a drop capital. The first parameter is the letter to be dropped and enlarged, the second -parameter is the ajoining text whose height the first letter should not -exceed. +parameter +.B text +is the ajoining text whose height the first letter should not exceed. The optional third parameter is the color of the dropped letter. +It defaults to black. +. +.TP +.B ".CDS" +Start displaying a code section in constant width font. +. +.TP +.B ".CDE" +End code display +. +.SH SECTION HEADING LINKS +By default +.B \%grohtml +generates links to all section headings and places these at the top of the +html document. (See +.URL #LK LINKS +for details of how to switch this off or alter the position). . . .SH LIMITATIONS OF GROHTML diff --git a/contrib/groff-1.19/tmac/html.tmac b/contrib/groff-1.19/tmac/html.tmac index 7843a3cfe5..9289f82ecc 100644 --- a/contrib/groff-1.19/tmac/html.tmac +++ b/contrib/groff-1.19/tmac/html.tmac @@ -42,6 +42,7 @@ .if !c\[arrowvertbt] .tr \[arrowvertbt] .if !c\[arrowvertex] .tr \[arrowvertex] .if !c\[barex] .tr \[barex] +.if !c\[sqrtex] .tr \[sqrtex] . .\" now for the color definitions .\" diff --git a/contrib/groff-1.19/tmac/papersize.tmac b/contrib/groff-1.19/tmac/papersize.tmac index fdfb580145..57403491ce 100644 --- a/contrib/groff-1.19/tmac/papersize.tmac +++ b/contrib/groff-1.19/tmac/papersize.tmac @@ -7,9 +7,9 @@ .\" groff ... -dpaper= ... .\" .\" Possible values for `format' are the same as the predefined `papersize' -.\" values (only lowercase; see the groff_font man page) except a7-d7. -.\" An appended `l' (ell) character denotes landscape orientation. -.\" Examples: `a4', `c3l', `letterl'. +.\" values (see the groff_font man page) except a7-d7. An appended `l' +.\" (ell) character denotes landscape orientation. Examples: `a4', `c3l', +.\" `letterl'. .\" .\" Most output drivers need additional command line switches `-p' and .\" `-l' to override the default paper length and orientation as set in @@ -104,6 +104,18 @@ . ds paper-dl-length 22c . ds paper-dl-width 11c . +. \" We assume that letters a-z and A-Z aren't mapped during start-up. +. tr AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz +. di lowercase +. nop \*[paper] +. br +. di +. asciify lowercase +. chop lowercase +. tr AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ +. ds paper \*[lowercase] +. rm lowercase +. . ds paper-p \*[paper] . ds paper-l \*[paper] . length paper-n \*[paper] diff --git a/contrib/groff-1.19/tmac/s.tmac b/contrib/groff-1.19/tmac/s.tmac index b0aff21f58..7927c233d5 100644 --- a/contrib/groff-1.19/tmac/s.tmac +++ b/contrib/groff-1.19/tmac/s.tmac @@ -21,7 +21,7 @@ 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. +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. .. .if !\n(.g .ab These ms macros require groff. .if \n(.C \ @@ -31,7 +31,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .if (\n[.warn] == 65543) .warn .\" See if already loaded. .if r GS .nx +.mso devtag.tmac .nr GS 1 +.nr need_eo_h 0 +.nr need_eo_tl 0 .de @error .tm \\n(.F:\\n(.c: macro error: \\$* .. @@ -169,14 +172,14 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .rn @AB AB .rn @AU AU .rn @AI AI -.if !'\*(.T'html' .di cov*tl-div +.di cov*tl-div .par@reset .ft B .ps +2 .vs +3p .ll (u;\\n[LL]*5/6) .nr cov*n-au 0 -.HTML-TAG ".tl" +.DEVTAG-TL .. .de @AU .par@reset @@ -188,10 +191,13 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .di cov*au-div!\\n[cov*n-au] .nf .ft I -.ps \\n[PS] +.ie (\\n[PS] >= 1000) \ +. ps (\\n[PS]z / 1000u) +.el \ +. ps \\n[PS] .. .de @AI -.if !'\*(.T'html' .par@reset +.par@reset .if !'\\n(.z'' \{\ . br . di @@ -201,7 +207,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. . di cov*ai-div!\\n[cov*n-au] . nf . ft R -. ps \\n[PS] +. ie (\\n[PS] >= 1000) \ +. ps (\\n[PS]z / 1000u) +. el \ +. ps \\n[PS] .\} .. .de LP @@ -254,10 +263,18 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. . di .\} .cov*ab-init -.if !'\*(.T'html' .di cov*ab-div +.ie '\*(.T'html' \{\ +. cov*tl-au-print +. als cov*tl-au-print @nop +.\} +.el .di cov*ab-div .par@ab-indent .par@reset .if !'\\$1'no' \{\ +. if '\*(.T'html' \{\ +. nf +. sp +. \} . ft I . ce 1 \\*[ABSTRACT] @@ -318,7 +335,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .sp 3 .if d cov*ab-div \{\ . if !'\*(.T'html' . nf -. cov*ab-div +. cov*ab-div .\} .sp 3 .par@reset @@ -364,11 +381,15 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .rs .sp 3 .ce 9999 -.if d cov*tl-div .cov*tl-div +.if d cov*tl-div \{\ +. cov*tl-div +. DEVTAG-EO-TL +.\} .nr cov*i 1 .nr cov*sp 1v .while \\n[cov*i]<=\\n[cov*n-au] \{\ -. sp \\n[cov*sp]u +. ie '\*(.T'html' .br +. el .sp \\n[cov*sp]u . cov*au-div!\\n[cov*i] . ie d cov*ai-div!\\n[cov*i] \{\ . sp .5v @@ -480,7 +501,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. . nr pg*gutw \\n[LL]-(\\n[pg@ncols]*\\n[pg@colw])/(\\n[pg@ncols]-1) . el .nr pg*gutw 0 .\} -.HTML-TAG ".mc \\n[pg@ncols] \\n[pg@colw] \\n[pg*gutw]" +.DEVTAG ".mc \\n[pg@ncols] \\n[pg@colw] \\n[pg*gutw]" .mk pg*col-top .ns .nr pg*col-num 0 @@ -499,7 +520,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .nr PN \\n% .nr pg*col-num 0 .nr pg@fn-bottom-margin 0 -.nr pg*saved-po \\n[PO] .po \\n[PO]u .ev h .par@reset @@ -536,12 +556,12 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .. .de pg*end-col 'sp |\\n[pg*col-top]u -.po (u;\\n[pg*saved-po]+(\\n[pg@colw]+\\n[pg*gutw]*\\n[pg*col-num])) +.po (u;\\n[PO]+(\\n[pg@colw]+\\n[pg*gutw]*\\n[pg*col-num])) .\"po +(u;\\n[pg@colw]+\\n[pg*gutw]) .pg*start-col .. .de pg*end-page -.po \\n[pg*saved-po]u +.po \\n[PO]u .\" Make sure we don't exit if there are still floats or footnotes left-over. .ie \\n[kp@head]<\\n[kp@tail]:\\n[fn@have-overflow] \{\ . \" Switching environments ensures that we don't get an unnecessary @@ -873,7 +893,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .ds*end!\\n[\\n[.ev]:ds-type] .nr \\n[.ev]:ds-type 0 .. -.als De DE .de ds@auto-end .if \\n[\\n[.ev]:ds-type] \{\ . @error automatically terminating display @@ -951,7 +970,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. . nr \\n[.ev]:ds-type 3 .\} .. -.als Ds DS .de ds@need .if '\\n(.z'' \{\ . while \\n[.t]<=(\\$1)&(\\n[nl]>\\n[pg@header-bottom]) \{\ @@ -999,10 +1017,23 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .\" don't set LT so that it can be defaulted from LL .ie rLT .lt \\n[LT]u .el .lt \\n[LL]u -.ps \\n[PS] +.ie (\\n[PS] >= 1000) \ +. ps (\\n[PS]z / 1000u) +.el \ +. ps \\n[PS] .\" don't set VS so that it can be defaulted from PS -.ie rVS .par*vs \\n[VS] -.el .par*vs \\n[PS]+2 +.ie rVS \{\ +. ie (\\n[VS] >= 1000) \ +. par*vs "(\\n[VS]p / 1000u)" +. el \ +. par*vs \\n[VS] +.\} +.el \{\ +. ie (\\n[PS] >= 1000) \ +. par*vs "((\\n[PS]p / 1000u) + 2p)" +. el \ +. par*vs "(\\n[PS] + 2)" +.\} .if dFAM .fam \\*[FAM] .if !rHY .nr HY 14 .hy \\n[HY] @@ -1034,16 +1065,37 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .de par@init .if !rLT .nr LT \\n[LL] .if !rFL .nr FL \\n[LL]*5/6 -.if !rVS .nr VS \\n[PS]+2 +.if !rVS \{\ +. ie (\\n[PS] >= 1000) \ +. nr VS (\\n[PS] + 2000) +. el \ +. nr VS (\\n[PS] + 2) +.\} .if !rDI .nr DI .5i -.if !rFPS .nr FPS \\n[PS]-2 -.if !rFVS .nr FVS \\n[FPS]+2 +.if !rFPS \{\ +. ie (\\n[PS] >= 1000) \ +. nr FPS (\\n[PS] - 2000) +. el \ +. nr FPS (\\n[PS] - 2) +.\} +.if !rFVS \{\ +. ie (\\n[FPS] >= 1000) \ +. nr FVS (\\n[FPS] + 2000) +. el \ +. nr FVS (\\n[FPS] + 2) +.\} .\" don't change environment 0 .ev h -.ps \\n[PS] +.ie (\\n[PS] >= 1000) \ +. ps (\\n[PS]z / 1000u) +.el \ +. ps \\n[PS] .if !rQI .nr QI 5n .if !rPI .nr PI 5n -.par*vs \\n[VS] +.ie (\\n[VS] >= 1000) \ +. par*vs "(\\n[VS]p / 1000u)" +.el \ +. par*vs \\n[VS] .if !rPD .nr PD .3v>?\n(.V .if !rDD .nr DD .5v>?\n(.V .if !rFI .nr FI 2n @@ -1086,6 +1138,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .\" par@reset .de par@reset .br +.if \\n[need_eo_tl]>0 .DEVTAG-EO-TL +.nr need_eo_tl 0 +.if \\n[need_eo_h]>0 .DEVTAG-EO-H +.nr need_eo_h 0 .ce 0 .rj 0 .ul 0 @@ -1101,8 +1157,14 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .in (u;\\n[\\n[.ev]:li]+\\n[\\n[.ev]:pli]) .ft 1 .fam \\*[FAM] -.ps \\n[\\n[.ev]:PS] -.par*vs \\n[\\n[.ev]:VS] +.ie (\\n[\\n[.ev]:PS] >= 1000) \ +. ps (\\n[\\n[.ev]:PS]z / 1000u) +.el \ +. ps \\n[\\n[.ev]:PS] +.ie (\\n[\\n[.ev]:VS] >= 1000) \ +. par*vs "(\\n[\\n[.ev]:VS]p / 1000u)" +.el \ +. par*vs \\n[\\n[.ev]:VS] .ls 1 .TA .hy \\n[HY] @@ -1116,13 +1178,18 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .de TA .ta T 5n .. +.\" \n[PORPHANS] sets number of initial lines of any paragraph, +.\" which must be kept together, without any included page break. +.\" Initialise to reproduce original behaviour; user may adjust it. +.if !rPORPHANS .nr PORPHANS 1 +. .de par*start .ds@auto-end .nr \\n[.ev]:pli \\$1 .nr \\n[.ev]:pri \\$2 .par@reset .sp \\n[\\n[.ev]:PD]u -.ne 1v+\\n(.Vu +.ne \\n[PORPHANS]v+\\n(.Vu .. .de par@finish .nr \\n[.ev]:pli 0 @@ -1159,33 +1226,15 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. . di . chop par*label . ti -\\n[\\n[.ev]:ai]u -. ie \\n[dl]+1n<=\\n[\\n[.ev]:ai] \\*[par*label]\h'|\\n[\\n[.ev]:ai]u'\c -. el \{\ -\\*[par*label] -. br -. \} -. rm par*label -.\} -.. -.de @IP-html -.if \\n[.$]>1 .nr \\n[.ev]:ai (n;\\$2) -.par*start \\n[\\n[.ev]:ai] 0 -.if !'\\$1'' \{\ -. \" Divert the label so as to freeze any spaces. -. di par*label -. par*push-tag-env -\&\\$1 -. par*pop-tag-env -. di -. chop par*label -. ti -\\n[\\n[.ev]:ai]u . ie \\n[dl]+1n<=\\n[\\n[.ev]:ai] \{\ -. HTML-TAG-NS ".col 1" -\\$1\h'|\\n[\\n[.ev]:ai]u'\c -. HTML-TAG-NS ".col 2" +. DEVTAG-COL 1 +\\*[par*label]\h'|\\n[\\n[.ev]:ai]u'\c +. DEVTAG-COL 2 . \} . el \{\ -\\$1 +. DEVTAG-COL 1 +\\*[par*label] +. DEVTAG-COL-NEXT 2 . br . \} . rm par*label @@ -1323,16 +1372,40 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .\} .el \!.par*box-draw \\$1 \\$2 .. +.\" \n[HORPHANS] sets how many lines of the following paragraph must be +.\" kept together, with a preceding section header. Initialise it, +.\" to reproduce original behaviour; user may change it. +.if !rHORPHANS .nr HORPHANS 1 +. +.\" \n[GROWPS] and \n[PSINCR] cause auto-increment of header point size. +.\" Initialise them, so they have no effect, unless explicitly set by the user. +.if !rGROWPS .nr GROWPS 0 +.if !rPSINCR .nr PSINCR 1p +. .de SH-NO-TAG .par@finish -.\" Keep together the heading and the first two lines of the next paragraph. -.ne 3v+\\n[\\n[.ev]:PD]u+\\n(.Vu +.\" Keep the heading and the first few lines of the next paragraph together. +.\" (\n[HORPHANS] defines "first few" -- default = 1; user may redefine it). +.nr sh*minvs \\n[HORPHANS]v +.if \\n[sh*psincr]<0 .nr sh*psincr 0 +.ie \\n(VS<1000 .par*vs \\n(VSp+\\n[sh*psincr]u +.el .par*vs \\n(VSp/1000u+\\n[sh*psincr]u +.ne 2v+\\n[sh*minvs]u+\\n[\\n[.ev]:PD]u+\\n(.Vu +.\" Adjust point size for heading text, as specified by \n[GROWPS] and \n[PSINCR]. +.ie \\n(PS<1000 .ps \\n(PS+\\n[sh*psincr]u +.el .ps \\n(PSz/1000u+\\n[sh*psincr]u .sp 1 .ft B .. .de @SH +.\" Standard ms implementation does not expect an argument, +.\" but allow ".SH n" to make heading point size match ".NH n", +.\" for same "n", when \n[GROWPS] and \n[PSINCR] are set. +. nr sh*psincr 0 +. if 0\\$1>0 .nr sh*psincr (\\n[GROWPS]-0\\$1)*\\n[PSINCR] . SH-NO-TAG -. HTML-TAG ".SH 1" +. DEVTAG-SH 1 +. if '\*(.T'html' .nr need_eo_h 1 .. .\" TL, AU, and AI are aliased to these in cov*ab-init. .de par@TL @@ -1342,7 +1415,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .ps +2 .vs +3p .ce 9999 -.HTML-TAG ".tl" +.DEVTAG-TL +.nr need_eo_tl 1 .. .de par@AU .par@finish @@ -1357,7 +1431,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .. .\" In paragraph macros. .de NL -.ps \\n[\\n[.ev]:PS] +.ie (\\n[\\n[.ev]:PS] >= 1000) \ +. ps (\\n[\\n[.ev]:PS]z / 1000u) +.el \ +. ps \\n[\\n[.ev]:PS] .. .de SM .ps -2 @@ -1489,15 +1566,19 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. . \} . nr H\\n[nh*hl] +1 .\} -.ds SN -.nr nh*i 0 +.ds SN-NO-DOT \\n(H1 +.nr nh*i 1 .while \\n[nh*i]<\\n[nh*hl] \{\ . nr nh*i +1 -. as SN \\n[H\\n[nh*i]]. +. as SN-NO-DOT .\\n[H\\n[nh*i]] .\} +.ds SN-DOT \\*[SN-NO-DOT]. +.if !dSN .als SN SN-DOT +.nr sh*psincr (\\n[GROWPS]-\\n[nh*hl])*\\n[PSINCR] .SH-NO-TAG -.HTML-TAG ".NH \\$1" -\\*[SN] +.DEVTAG-NH "\\$1" +. if '\*(.T'html' .nr need_eo_h 1 +\\*[SN-DOT] .. .\" **************************** .\" ******** module toc ******** @@ -1545,7 +1626,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .1C .if !'\\$1'no' \{\ . ce 1 -. ps \\n[PS]+2 +. ie (\\n[PS] >= 1000) \ +. ps ((\\n[PS]z / 1000u) + 2z) +. el \ +. ps \\n[PS]+2 . ft B \\*[TOC] . ft @@ -1592,7 +1676,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. . HTML-IMAGE-INLINE .\} .if \\n[eqn*type]=2 .HTML-IMAGE -.if !'\*(.T'html' .nf +.nf .. .de @div-end!eqn*div .@EN @@ -1606,7 +1690,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. . nr eqn*have-num 0 . if !'\\*[eqn*num]'' .nr eqn*have-num 1 . ie \\n[dl]:\\n[eqn*have-num] \{\ -. if !'\*(.T'html' .sp \\n[DD]u +. sp \\n[DD]u . par@reset . ds eqn*tabs \\n[.tabs] . nf @@ -1633,7 +1717,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. . ta (u;\\n[.l]-\\n[.i])R \t\\*[eqn*num] . \} -. if !'\*(.T'html' .sp \\n[DD]u +.\". if !'\*(.T'html' .sp \\n[DD]u +. sp \\n[DD]u . ta \\*[eqn*tabs] . \} . el \{ @@ -1665,7 +1750,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .. .de @TS .sp \\n[DD]u -.\" .if !'\*(.T'html' .sp \\n[DD]u .if '\\$1'H' .di tbl*header-div .HTML-IMAGE .. @@ -1868,6 +1952,12 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .ref*field A , .if r [A .nr ref*suppress-period \\n([A .. +.de ref*add-V +.ref*field V "" \fB \fR +.. +.de ref*add-N +.ref*field N \z( "" ")" +.. .de ref*add-dflt .ref*field \\$1 , .. @@ -1983,8 +2073,4 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. . \} .. .par@load-init -.if '\*(.T'html' \{\ -. rm @IP -. als @IP @IP-html -.\} .\" Make sure that no blank lines creep in at the end of this file. diff --git a/contrib/groff-1.19/tmac/trace.tmac b/contrib/groff-1.19/tmac/trace.tmac index 0c354eee9d..286c605b87 100644 --- a/contrib/groff-1.19/tmac/trace.tmac +++ b/contrib/groff-1.19/tmac/trace.tmac @@ -59,10 +59,10 @@ .!!de am . do ecs . ec -. do !!am \$1 +. do !!de \$1 . ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** am trace enter: \\$0 \\$@ . el .do tm1 "\\*[!!sp]*** am trace enter \$1: \\$0 \\$@ -. as !!sp " \" +. do as !!sp " \" . do nop \\*[!!\$1]\\ . do substring !!sp 1 . ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** trace exit: \\$0 \\$@ @@ -79,10 +79,10 @@ .!!de am1 . do ecs . ec -. do !!am \$1 +. do !!de \$1 . ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** am1 trace enter: \\$0 \\$@ . el .do tm1 "\\*[!!sp]*** am1 trace enter \$1: \\$0 \\$@ -. as !!sp " \" +. do as !!sp " \" . do nop \\*[!!\$1]\\ . do substring !!sp 1 . ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** trace exit: \\$0 \\$@ diff --git a/contrib/groff-1.19/tmac/troffrc-end b/contrib/groff-1.19/tmac/troffrc-end index ef4f008237..53f1bef50c 100644 --- a/contrib/groff-1.19/tmac/troffrc-end +++ b/contrib/groff-1.19/tmac/troffrc-end @@ -13,8 +13,7 @@ .do if !d HTML-IMAGE-RIGHT .do ds HTML-IMAGE-RIGHT .do if !d HTML-IMAGE-LEFT .do ds HTML-IMAGE-LEFT .do if !d HTML-IMAGE-END .do ds HTML-IMAGE-END -.do if !d HTML-TAG .do ds HTML-TAG -.do if !d HTML-TAG-NS .do ds HTML-TAG-NS +.do if !d DEVTAG .do ds DEVTAG .do if !d HTML-DO-IMAGE .do ds HTML-DO-IMAGE . .\" Don't let blank lines creep in here. diff --git a/contrib/groff-1.19/tmac/tty.tmac b/contrib/groff-1.19/tmac/tty.tmac index 4b337fd3b4..8d69253b17 100644 --- a/contrib/groff-1.19/tmac/tty.tmac +++ b/contrib/groff-1.19/tmac/tty.tmac @@ -65,6 +65,9 @@ .fchar \[.i] i .fchar \[bq] , . +.if '\*[.T]'utf8' \ +. mso unicode.tmac +. .\" color definitions .defcolor black rgb #000000 .defcolor red rgb #ff0000 diff --git a/contrib/groff-1.19/tmac/unicode.tmac b/contrib/groff-1.19/tmac/unicode.tmac new file mode 100644 index 0000000000..6c015b2aa2 --- /dev/null +++ b/contrib/groff-1.19/tmac/unicode.tmac @@ -0,0 +1,3 @@ +.\" unicode.tmac +.\" +.\" EOF diff --git a/contrib/groff-1.19/tmac/www.tmac b/contrib/groff-1.19/tmac/www.tmac index a27ef7c29a..5dcbd1eea7 100644 --- a/contrib/groff-1.19/tmac/www.tmac +++ b/contrib/groff-1.19/tmac/www.tmac @@ -10,7 +10,7 @@ Installed position: groff's main macro directory. This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. written by Gaius Mulley , with additions by Werner Lemberg and Bernd Warken . @@ -26,8 +26,8 @@ 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. +Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA +02110-1301, USA. ------------------------------------------------------------------------ @@ -42,9 +42,14 @@ www functionality. It should work with any macro set. .\" Setup .\" -------------------------------------------------------------------- . +.do if d www:lenstr .nx +. +.do mso devtag.tmac +. .nr _C \n(.C .cp 0 . +. .nr www-html 0 .if '\*[.T]'html' .nr www-html 1 . @@ -104,6 +109,18 @@ www functionality. It should work with any macro set. .\" -------------------------------------------------------------------- . .\" -------------------------------------------------------------------- +.\" www:paraspace +.\" +.\" Space before paragraph. Use \n[PD] if it exists. +.\" +.nr www:pd 0.5v +.de www:paraspace +. ie r PD .sp \\n[PD]u +. el .sp \\n[www:pd]u +.. +. +.\" +.\" -------------------------------------------------------------------- .\" www:error (...) .\" .\" Print error message @@ -244,23 +261,36 @@ www functionality. It should work with any macro set. .\" -------------------------------------------------------------------- . .\" -------------------------------------------------------------------- -.\" HTML (
[]) +.\" HTML .\" .\" the main auxiliary macro for the HTML interface .\" .de HTML . if \\n[www-html] \{\ -. \" the following line makes the vertical mode leave, so to say +. \" was implemented via .nop \&\X^html:\\$*^ but +. \" is now implemented using HTML-NS to utilize code factoring. +. \" +. \" the `\&' makes the vertical mode leave, so to say +. \" +. nop \&\c +. HTML-NS \\$* . nop \& -. nop \X^html:\\$*^ . \} .. .\" .\" an auxiliary macro for HTML (without following space) .\" .de HTML-NS -. if \\n[www-html] \ -. nop \X^html:\\$*^\c +. nop \X^html:\\$*^\c +.. +.\" +.\" emit a HTML tag after shutting down a (possibly open) paragraph +.\" +.de HTML

+. if \\n[www-html] \{\ +. \" the `\&' makes the vertical mode leave, so to say +. nop \&\X^html

:\\$*^ +. \} .. .\" -------------------------------------------------------------------- .\" HX n @@ -292,20 +322,50 @@ www functionality. It should work with any macro set. .\" if description is absent then the url becomes the anchor text .\" .de URL -. ds \\$0:adr \\$1\" -. www:url_breaks \\$0:adr +. ie !'\\$1'' \{\ +. ds \\$0:adr \\$1\" +. www:url_breaks \\$0:adr +. \} . ie \\n[www-html] \{\ +. ie '\\$3'' \ +. ds \\$0:after \& +. el \ +. ds \\$0:after \&\\$3 . ie '\\$2'' \ -. HTML
\\$1\\$3 +. HTML-NS \\$1 . el \ -. HTML \\$2\\$3 +. HTML-NS \\$2 +. nop \\*[\\$0:after] +. rm \\$0:after . \} . el \{\ . if !r ps4html .ad l -. ie '\\$2'' \ -. nop \%\[la]\m[blue]\f[C]\\*[\\$0:adr]\f[]\m[]\[ra]\\$3 -. el \ -. nop \m[blue]\\$2\m[] \%\[la]\f[C]\\*[\\$0:adr]\f[]\[ra]\\$3 +. ie '\\$2'' \{\ +. ie '\\$1'' \{\ +. ie !'\\$3'' \ +. nop \\$3 +. \} +. el \{\ +. ie \\n[.color] \ +. nop \%\[la]\m[blue]\f[C]\\*[\\$0:adr]\f[]\m[]\[ra]\\$3 +. el \ +. nop \%\[la]\f[CB]\\*[\\$0:adr]\f[]\[ra]\\$3 +. \} +. \} +. el \{\ +. ie '\\$1'' \{\ +. ie \\n[.color] \ +. nop \m[blue]\\$2\m[]\\$3 +. el \ +. nop \f[B]\\$2\f[]\\$3 +. \} +. el \{\ +. ie \\n[.color] \ +. nop \m[blue]\\$2\m[] \%\[la]\f[C]\\*[\\$0:adr]\f[]\[ra]\\$3 +. el \ +. nop \f[B]\\$2\f[] \%\[la]\f[C]\\*[\\$0:adr]\f[]\[ra]\\$3 +. \} +. \} . if !r ps4html .ad . \} . rm \\$0:adr @@ -340,10 +400,32 @@ www functionality. It should work with any macro set. . URL mailto:\\$1 "\\$2" "\\$3" . \} . el \{\ -. ie '\\$2'' \ -. nop \%\m[blue]\f[C]\\$1\f[]\m[]\\$3 -. el \ -. nop \m[blue]\\$2\m[] \%\[la]\f[C]\\$1\f[]\[ra]\\$3 +. ie '\\$2'' \{\ +. ie '\\$1'' \{\ +. ie !'\\$3'' \ +. nop \\$3 +. \} +. el \{\ +. ie \\n[.color] \ +. nop \%\m[blue]\f[C]\\$1\f[]\m[]\\$3 +. el \ +. nop \%\f[CB]\\$1\f[]\\$3 +. \} +. \} +. el \{\ +. ie '\\$1'' \{\ +. ie \\n[.color] \ +. nop \m[blue]\\$2\m[]\\$3 +. el \ +. nop \f[B]\\$2\f[]\\$3 +. \} +. el \{\ +. ie \\n[.color] \ +. nop \m[blue]\\$2\m[] \%\[la]\f[C]\\$1\f[]\[ra]\\$3 +. el +. nop \f[B]\\$2\f[] \%\[la]\f[C]\\$1\f[]\[ra]\\$3 +. \} +. \} . \} .. .\" -------------------------------------------------------------------- @@ -366,12 +448,12 @@ www functionality. It should work with any macro set. .de IMG . ie \\n[www-html] \{\ . ie '\\$2'-R' \ -. HTML-TAG ".right-image" +. DEVTAG ".right-image" . el \{\ . ie '\\$2'-L' \ -. HTML-TAG ".left-image" +. DEVTAG ".left-image" . el \ -. HTML-TAG ".centered-image" +. DEVTAG ".centered-image" . \} . nr www-width 100 . if !'\\$3'' \ @@ -379,33 +461,13 @@ www functionality. It should work with any macro set. . nr www-height \\n[www-width] . if !'\\$4'' \ . nr www-height \\$4 -. HTML +. HTML Image \\$1 . \} . el \ . nop \[la]\f[C]\\$1\f[]\[ra] .. .\" -------------------------------------------------------------------- -.\" HTML-TAG -.\" -.\" Emit a tag for grohtml. This is an internal macro. -.\" -.de HTML-TAG -. if \\n[www-html] \{\ -. \" the following line makes the vertical mode leave, so to say -. nop \& -. nop \X^html-tag:\\$*^ -. \} -.. -.\" -------------------------------------------------------------------- -.\" HTML-TAG-NS -.\" -.\" Emit a tag for grohtml (without a space). This is an internal macro. -.\" -.de HTML-TAG-NS -. if \\n[www-html] \ -. nop \X^html-tag:\\$*^\c -.. -.\" -------------------------------------------------------------------- .\" PIMG [-R|-L|-C] filename [width] [height] .\" .\" Include a png image. It will work for -Tps and -Thtml. @@ -419,12 +481,12 @@ www functionality. It should work with any macro set. .de PIMG . ie \\n[www-html] \{\ . ie '\\$1'-R' \ -. HTML-TAG ".right-image" +. DEVTAG ".right-image" . el \{\ . ie '\\$1'-L' \ -. HTML-TAG ".left-image" +. DEVTAG ".left-image" . el \ -. HTML-TAG ".centered-image" +. DEVTAG ".centered-image" . \} . nr www-width 0 . nr www-height 0 @@ -434,15 +496,16 @@ www functionality. It should work with any macro set. . nr www-height (\\$4 * 100 / 240) . ie (\\n[www-width] == 0) \{\ . ie (\\n[www-height] == 0) \ -. HTML +. HTML Image \\$2 . el \ -. HTML +. HTML Image \\$2 . \} . el \{\ . ie (\\n[www-height] == 0) \ -. HTML +. HTML Image \\$2 . el \ -. HTML +. HTML Image \\$2 . \} . \} . el \{\ @@ -507,6 +570,32 @@ www functionality. It should work with any macro set. . wh \\n[www-left-ll-trap]u . nr www-left-ll-trap 0 .. +. +.\" www-handle-percent arg N1 N2 S1 +.\" arg - input string (number or number%) +.\" output parameters: +.\" N1 - name of number register 1=absolute 0=percentage +.\" N2 - number register name for absolute value +.\" S1 - string register name for percentage value +. +.de www-handle-percent +. ds www-percent \\$1\" +. substring www-percent -1 -1 +. +. ie '\\*[www-percent]'%' \{\ +. ds www-abs \\$1\" +. substring www-abs 0 -2 +. nr \\$2 0 +. nr \\$3 \\*[www-abs] +. ds \\$4 \\$1\" +. \} +. el \{\ +. nr \\$2 1 +. nr \\$3 \\$1 +. ds \\$4 none\" +. \} +.. +. .\" -------------------------------------------------------------------- .\" MPIMG [-R|-L] [-G gap] filename [width [height]] .\" @@ -514,6 +603,10 @@ www functionality. It should work with any macro set. .\" -Tps and -Thtml. The default value for WIDTH is 1i; default value .\" for HEIGHT is WIDTH; the default alignment is left (-L). .\" -G is used to insert a gap between the text and the image. +.\" The height and width can also be given as a percentage. +.\" The PostScript device converts the percentage width into an +.\" absolute value by using \\n[.l], and the height by using \\n[.p]. +.\" .\" .\" Note: This macro can only be used with the `-U' option of groff, .\" activating unsafe mode, if not used with -Thtml; the PNG image @@ -544,24 +637,74 @@ www functionality. It should work with any macro set. . \} . break . \} +. . nr www-width 1i -. if !'\\$2'' \ -. nr www-width \\$2 -. nr www-height \\n[www-width] -. if !'\\$3'' \ -. nr www-height \\$3 -. nr www-width (\\n[www-width] * 100 / 240) -. nr www-height (\\n[www-height] * 100 / 240) +. nr www-height 1i +. ds www-size-specs "width=\\n[www-width] height=\\n[www-height]\" +. ie !'\\$2'' \{\ +. nr www-is-absolute 0 +. nr www-absolute 0 +. ds www-percentage none\" +. www-handle-percent \\$2 www-is-absolute www-absolute www-percentage +. ie !\\n[www-is-absolute] \{\ +. \" percentage of linelength requested +. nr www-width (\\n[www-absolute] * \\n[.l] / 100) +. if \\n[www-html] \ +. nr www-width (\\n[www-width] * 100 / 240) +. ds www-size-specs "width=\\*[www-percentage]\" +. \} +. el \{\ +. nr www-width \\n[www-absolute] +. if \\n[www-html] \ +. nr www-width (\\n[www-width] * 100 / 240) +. ds www-size-specs "width=\\n[www-width]\" +. \} +. +. nr www-height \\n[www-width] +. ie !'\\$3'' \{\ +. nr www-is-absolute 0 +. nr www-absolute 0 +. ds www-percentage none\" +. www-handle-percent \\$3 www-is-absolute www-absolute www-percentage +. ie !\\n[www-is-absolute] \{\ +. \" percentage of pagelength requested +. nr www-height (\\n[www-absolute] * \\n[.p] / 100) +. if \\n[www-html] \ +. nr www-height (\\n[www-height] * 100 / 240) +. ds www-size-specs "\\*[www-size-specs] height=\\*[www-percentage]\" +. \} +. el \{\ +. nr www-height \\n[www-absolute] +. if \\n[www-html] \ +. nr www-height (\\n[www-height] * 100 / 240) +. ds www-size-specs "\\*[www-size-specs] height=\\*[www-height]\" +. \} +. \} +. \} +. el \{\ +. \" height not specified; use width value +. ie !\\n[www-is-absolute] \{\ +. \" percentage value +. ds www-size-specs "\\*[www-size-specs] height=\\*[www-percentage]\" +. nr www-height \\n[www-width] +. \} +. el \{\ +. ds www-size-specs "\\*[www-size-specs] height=\\*[www-width]\" +. nr www-height \\n[www-width] +. \} +. \} . . ie \\n[www-html] \{\ . ie !\\n[www-image-just] \ -. HTML +. HTML Image \\$1 . el \ -. HTML +. HTML Image \\$1 . \} . el \{\ +. tm www-width is \\n[www-width] +. tm www-height is \\n[www-height] . if !r ps4html \{\ . www-make-unique-name . sy pngtopnm \\$1 | pnmcrop -white | @PNMTOPS_NOSETPAGE@ -noturn > \\*[www-unique-name].eps @@ -572,7 +715,7 @@ www functionality. It should work with any macro set. . wh \\n[www-left-ll-trap]u . if (\\n[www-left-po-trap] > 0) \ . wh \\n[www-left-po-trap]u -. PSPIC -R \\*[www-unique-name].eps \\$2 \\$3 +. PSPIC -R \\*[www-unique-name].eps \\n[www-width]u \\n[www-height]u . sp -\\n[ps-desht]u . nr www-right-indent \\n[ps-deswid]u . \" we want to have some space between text and image, @@ -591,7 +734,7 @@ www functionality. It should work with any macro set. . \" we must now disable a possible right image trap . if (\\n[www-right-ll-trap] > 0) \ . wh \\n[www-right-ll-trap]u -. PSPIC -L \\*[www-unique-name].eps \\$2 \\$3 +. PSPIC -L \\*[www-unique-name].eps \\n[www-width]u \\n[www-height]u . sp -\\n[ps-desht]u . nr www-left-indent \\n[ps-deswid]u . \" increase offset by gap @@ -628,13 +771,13 @@ www functionality. It should work with any macro set. . nr www-heading-no 1 . el \ . nr www-heading-no \\$1 -. HTML-TAG ".NH \\n[www-heading-no]" +. DEVTAG-NH \\n[www-heading-no] .. . .de HnE . if (\\n[www-heading-no] == -1) \ . www-error "HnE found without a corresponding HnS" -. br +. DEVTAG-EO-H .. .\" -------------------------------------------------------------------- .\" LK @@ -643,20 +786,15 @@ www functionality. It should work with any macro set. .\" section/numbered headings at this position. .\" .de LK -. HTML-TAG ".links" +. DEVTAG ".links" .. .\" -------------------------------------------------------------------- .\" HR .\" -.\" Produce a horizontal line +.\" Produce a horizontal line. .\" .de HR -. ie \\n[www-html] \{\ -. ti 0 -. HTML-NS
-. \} -. el \ -. sp +. HTML

"
" .. .\" -------------------------------------------------------------------- .\" NHR @@ -665,19 +803,21 @@ www functionality. It should work with any macro set. .\" emits by default. .\" .de NHR -. HTML-TAG ".no-auto-rule" +. DEVTAG ".no-auto-rule" .. .\" .\" www-end-nowhere - end of input trap called to finish diversion. .\" .de www-end-nowhere -. di +. if !\\n[www-html] \ +. di +. DEVTAG-EO-TL .. .\" -------------------------------------------------------------------- .\" HTL .\" .\" Generate an HTML title only. This differs from the -ms .TL macro -.\" which generates both an HTML title and a H1 heading. +.\" which generates both an HTML title and an H1 heading. .\" .\" This is useful when an author wishes to use a HTML title as search .\" engine fodder but a graphic title in the document. @@ -685,51 +825,108 @@ www functionality. It should work with any macro set. .\" The macro terminates when a space or break is seen (.sp, .br). .\" .de HTL -. HTML-TAG ".html-tl" -. if !\\n[www-html] \{\ +. DEVTAG ".html-tl" +. if !\\n[www-html] \ . di www-nowhere -. it 2 www-end-nowhere -. \} +. it 2 www-end-nowhere .. . .\" -------------------------------------------------------------------- -.\" auxiliary definitions for ULS / ULE +.\" auxiliary definitions for lists +.\" +.ds www-ul-level1 \[bu]\ \ \" +.ds www-ul-level2 \[sq]\ \ \" +.ds www-ul-level3 \[ci]\ \ \" +.nr www-ul-level 0 +. +.ds www-ol-level1 decimal\" +.ds www-ol-level2 lower-alpha\" +.ds www-ol-level3 lower-roman\" +.ds www-ol-tmp 00\ \ \" +.nr www-ol-ctr1 0 1 +.nr www-ol-ctr2 0 1 +.nr www-ol-ctr3 0 1 +.af www-ol-ctr2 a +.af www-ol-ctr3 i +.nr www-ol-level 0 +. +.nr www-dl-level 0 +.nr www-dl-shift 5n +. +.\" +.\" allow nested lists .\" -.ds www-level1 \[bu]\ \ \" -.ds www-level2 \[sq]\ \ \" -.ds www-level3 \[ci]\ \ \" -.nr www-level 0 .nr www-depth 0 +.nr www-li-indent \n[.i] +.ds www-level0 nop\" +.ds www-level1 +.ds www-level2 +.ds www-level3 +.ds www-level4 +.ds www-level5 +.ds www-level6 +.ds www-level7 +.ds www-level8 +.ds www-level9 +. +.\" which macro to use for LI +.de www-push-li +. nr www-depth +1 +. ds www-level\\n[www-depth] \\$1\" +. als LI \\$1 +.. +. +.de www-pop-li +. nr www-depth -1 +. als LI \\*[www-level\\n[www-depth]] +.. . .\" .\" Auxiliary macro for ULS. .\" -.de www-push-level -. nr www-level +1 -. if (\\n[www-level] > 3) \ -. www-error "too many levels of indentation (\\n[www-level])" +.de www-push-ul-level +. nr www-ul-level +1 +. if (\\n[www-ul-level] > 3) \ +. www-error "ULS: too many levels of indentation (\\n[www-ul-level])" .. .\" .\" Auxiliary macro for ULE. .\" -.de www-pop-level -. if !\\n[www-level] \ -. www-error "trying to terminate a list which does not exist" -. nr www-level -1 +.de www-pop-ul-level +. if !\\n[www-ul-level] \ +. www-error "ULE: trying to terminate a list which does not exist" +. nr www-ul-level -1 +.. +. +.\" +.\" Auxiliary macro for OLS. +.\" +.de www-push-ol-level +. nr www-ol-level +1 +. if (\\n[www-ol-level] > 3) \ +. www-error "OLS: too many levels of indentation (\\n[www-ol-level])" .. +.\" +.\" Auxiliary macro for OLE. +.\" +.de www-pop-ol-level +. if !\\n[www-ol-level] \ +. www-error "OLE: trying to terminate a list which does not exist" +. nr www-ol-level -1 +.. +. .\" -------------------------------------------------------------------- .\" ULS .\" .\" Start an unordered list. .\" .de ULS -. www-push-level +. www-push-li www-li-ul +. www-push-ul-level . ie \\n[www-html] \ -. HTML "
    " +. HTML

    "
      " . el \{\ -. if (\\n[www-level] == 1) \ -. nr www-depth \\n[.i] -. nr www-depth +\w'\\*[www-level\\n[www-level]]'u +. nr www-li-indent +\w'\\*[www-ul-level\\n[www-ul-level]]'u . \} .. .\" -------------------------------------------------------------------- @@ -741,23 +938,116 @@ www functionality. It should work with any macro set. . ie \\n[www-html] \ . HTML "
    " . el \{\ -. nr www-depth -\w'\\*[www-level\\n[www-level]]'u -. in \\n[www-depth]u +. nr www-li-indent -\w'\\*[www-ul-level\\n[www-ul-level]]'u +. in \\n[www-li-indent]u +. \} +. www-pop-ul-level +. www-pop-li +.. +.\" -------------------------------------------------------------------- +.\" OLS +.\" +.\" Start an ordered list. +.\" +.de OLS +. www-push-li www-li-ol +. www-push-ol-level +. ie \\n[www-html] \ +. HTML

    "
      " +. el \ +. nr www-li-indent +\w'\\*[www-ol-tmp]'u +.. +.\" -------------------------------------------------------------------- +.\" OLE +.\" +.\" End an ordered list. +.\" +.de OLE +. ie \\n[www-html] \ +. HTML "
    " +. el \{\ +. nr www-li-indent -\w'\\*[www-ol-tmp]'u +. in \\n[www-li-indent]u +. nr www-ol-ctr\\n[www-ol-level] 0 1 +. \} +. www-pop-ol-level +. www-pop-li +.. +.\" -------------------------------------------------------------------- +.\" +.\" DLS +.\" Start a definition list. +.\" +.de DLS +. www-push-li www-li-dl +. nr www-dl-level +1 +. ie \\n[www-html] \ +. HTML

    "
    " +. el \{\ +. nr www-li-indent +\\n[www-dl-shift]u +. in \\n[www-li-indent]u . \} -. www-pop-level +.. +.\" -------------------------------------------------------------------- +.\" +.\" DLE +.\" End a definition list. +.\" +.de DLE +. ie \\n[www-html] \ +. HTML "
    " +. el \{\ +. nr www-li-indent -\\n[www-dl-shift]u +. in \\n[www-li-indent]u +. \} +. nr www-dl-level -1 +. www-pop-li .. .\" -------------------------------------------------------------------- .\" LI .\" .\" Insert a list item. .\" -.de LI +.\" ******** +.\" www-li-ul - bulleted list item +.\" +.de www-li-ul . ie \\n[www-html] \ -. HTML "
  • " +. HTML-NS "
  • " . el \{\ -. in \\n[www-depth]u -. ti -\w'\\*[www-level\\n[www-level]]'u -. nop \\*[www-level\\n[www-level]]\c +. www:paraspace +. in \\n[www-li-indent]u +. ti -\w'\\*[www-ul-level\\n[www-ul-level]]'u +. nop \\*[www-ul-level\\n[www-ul-level]]\c +. \} +.. +.\" ******** +.\" www-li-ol - numbered list item +.\" +.de www-li-ol +. ie \\n[www-html] \ +. HTML-NS "
  • " +. el \{\ +. www:paraspace +. in \\n[www-li-indent]u +. ti -\w'\\n[www-ol-ctr\\n[www-ol-level]]\ \ 'u +. nop \\n+[www-ol-ctr\\n[www-ol-level]]\ \ \c +. \} +.. +.\" ******** +.\" www-li-dl - definition list item +.\" +.de www-li-dl +. ie \\n[www-html] \{\ +. HTML "
    \\$1
    " +. HTML-NS "
    " +. \} +. el \{\ +. www:paraspace +. in \\n[www-li-indent]u +. ti -\\n[www-dl-shift]u +. nop \&\\$1 +. br . \} .. .\" -------------------------------------------------------------------- @@ -776,7 +1066,8 @@ www functionality. It should work with any macro set. . ds www-dropcolor \\$3 . ie '\*(.T'html' \{\ . www-make-unique-name -. MPIMG -L \\*[www-unique-name].png "(\\n[.v] * 2u)" +. nr www-drop-width (100u * \\n[.v]u * 3u / \\n[.l]u) +. MPIMG -L \\*[www-unique-name].png "\\n[www-drop-width]%" . \} . el \{\ . ie r ps4html \{\ @@ -787,9 +1078,9 @@ www functionality. It should work with any macro set. . \" glyphs overlap. . bp . ev www-DC -. vs 80p +. vs 320p . nop \O[5i\\*[www-unique-name].png]\O[1] -. nop \m[\\*[www-dropcolor]]\s[40]\O[3]\\$1\O[4] +. nop \m[\\*[www-dropcolor]]\s[160]\O[3]\\$1\O[4] . nop \O[2]\O[0] . br . ev @@ -887,7 +1178,16 @@ www functionality. It should work with any macro set. .\" The argument to JOBNAME is the file stem for future output files. .\" .de JOBNAME -. HTML-TAG .job-name \\$1 +. DEVTAG .job-name \\$1 +.. +.\" -------------------------------------------------------------------- +.\" HEAD +.\" +.\" Adds information to the section of the html +.\" document +.\" -------------------------------------------------------------------- +.de HEAD +. DEVTAG .head "\\$*" .. .\" -------------------------------------------------------------------- .\" Final Setup -- 2.41.0