diff --git a/contrib/groff/COPYING b/contrib/groff/COPYING index e8a612e5c3b9..b2fe7b6af353 100644 --- a/contrib/groff/COPYING +++ b/contrib/groff/COPYING @@ -1,8 +1,8 @@ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 - Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 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. @@ -279,7 +279,7 @@ POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS - Appendix: How to Apply These Terms to Your New Programs + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Copyright (C) 19yy + Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -305,14 +305,15 @@ 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., 675 Mass Ave, Cambridge, MA 02139, 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. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/contrib/groff/ChangeLog b/contrib/groff/ChangeLog index ff9729393763..2155a818a6bf 100644 --- a/contrib/groff/ChangeLog +++ b/contrib/groff/ChangeLog @@ -1,5 +1,3532 @@ +2005-09-04 Werner LEMBERG + + * tmac/groff_ms.man, doc/groff.texinfo: Synchronize. + + * doc/webpage.ms: Updated. + + * install-sh, mkinstalldirs: New versions; taken from texinfo CVS. + +2005-09-04 Jörgen Grahn + + * tmac/groff_ms.man: Document `PO' better. + +2005-09-03 Werner LEMBERG + + * NEWS: Document grotty changes. + +2005-09-01 Keith Marshall + + Backward compatibility support for `man' program. + + * tmac/an-old.tmac (LL): Initialize it to respect prior LL register + assignment, prior `.ll' request and then package defaults, in this + specified order of decreasing priority. + + * tmac/groff_man.man, doc/groff.texinfo: Document altered `LL' + register initialization priorities. + +2005-08-29 Gary W. Swearingen + + * tmac/groff_mdoc.man: Go into more details how the `AUTHORS' + section should look like. + +2005-08-29 Werner LEMBERG + + * tmac/groff_mdoc.man: The month's name in a call to .Dd shouldn't + be abbreviated. + +2005-08-27 Bernd Warken + + * tmac/groff_man.man: Add man(7) too SEE ALSO and more minor + fixes. + +2005-08-11 Bernd Warken + + * tmac/www.tmac (URL, MTO): Handle empty \\$1 better. + +2005-08-09 Bernd Warken + + * tmac/www.tmac (URL, MTO): Use bold series if color support is + deactivated. + +2005-08-02 Bernd Warken + + * doc/Makefile.sub (uninstall_sub): Use --remove, not --delete + as argument to $(INSTALL_INFO). The latter isn't portable. + Remove $(HTMLEXAMPLEFILES) too. + + * Makefile.in (uninstall_dirs): Remove $(datadir)/doc/groff and + $(datadir)/doc too. + Suppress warning messages and return always true. + + * tmac/Makefile.sub (uninstall_sub): Remove www.tmac too. + +2005-07-02 Bernd Warken + + * src/devices/xditview/gxditview.man: Change many `.I' to `.B'. + * man/groff_out.man: More markup and minor improvements. + * src/roff/groff/groff.man: Minor improvements. + +2005-06-28 Werner LEMBERG + + * ChangeLog: Split off older entries into... + * ChangeLog.115 ChangeLog.116, ChangeLog.117, ChangeLog.118: New + files. + +2005-06-26 Bernd Warken + + * src/devices/xditview/gxditview.man: More minor fixes. + +2005-06-24 Werner LEMBERG + + * src/preproc/pic/troff.cpp (troff_output::set_fill, + troff_output::set_color, troff_output::reset_color): Use .bcolor and + .fcolor instead of \m and \M, respectively. + +2005-06-23 Bernd Warken + + * src/devices/xditview/gxditview.man: More minor fixes. + * README: Formatting issues. + Mention some problems with Debian. + +2005-06-23 Bernd Warken + + * src/devices/xditview/gxditview.man: Revised and improved. + +2005-06-22 Werner LEMBERG + + Another round in fixing getopt problems. Hopefully the last one! + This time we use the getopt stuff from gnulib and define a prefix + unconditionally so that there are no collisions with any other + getopt implementations. This is a slight waste of space in case + we already use a GNU getopt implementation, but on + the other hand it really simplifies life. + + * src/include/getopt.h: Use gnulib version. + + * src/include/getopt_int.h: Use gnulib version. + + * src/include/groff-getopt.h: Removed. Obsolete now. + + * src/include/lib.h: Regarding getopt, don't handle any platform + specially; just include getopt.h. + (__GETOPT_PREFIX): Define (before getopt.h). + + * src/include/Makefile.sub (HDRS): Updated. + + * src/libs/libgroff/getopt1.c, src/libs/libgroff/getopt.c: Use + gnulib version. + + * src/libs/libgroff/Makefile.sub (EXTRA_CFLAGS): Set + __GETOPT_PREFIX. + + * src/utils/pfbtops/pfbtops.c, src/utils/xtotroff/xtotroff.c + (__GETOPT_PREFIX): Define (before getopt.h). + +2005-06-21 Werner LEMBERG + + * src/include/lib.h: Provide a fix for Mac OS X to not include + groff-getopt.h. + +2005-06-20 Denis M. Wilson + + * font/devps/prologue.ps (EP): Dont' use `bind'. Reason: Using + `bind' to define a procedure which contains `showpage' means that an + invocation of `showpage' may execute wrongly (the exact effect + depending on the interpreter). Not usually a problem except under + transformations, such as combining pages. + (PEND): Don't call `clear'. Reason: Using `clear' in the definition + of /PEND means that stack underflow will occur if the stack is + deliberately non-empty before document inclusion. If included + files are found to be generally badly behaved, we could replace the + `clear' with `mark' in /PBEGIN and `cleartomark' in /PEND (I've + never found this necessary). + +2005-06-20 Jörgen Grahn + + * src/preproc/soelim/soelim.cpp (do_file): Append trailing zero + earlier to get correct error message. + +2005-06-16 Bernd Warken + * src/roff/nroff/nroff.sh: Add support for iso-8859-15. + +2005-06-15 Werner LEMBERG + + Another try to update getopt files. This time we add a dummy + gettext.h file to satisfy the dependency. + + * src/include/getopt.h, src/libs/libgroff/getopt.c, + src/libs/libgroff/getopt1.c: Updated from GNU libc CVS. + + * src/include/getopt_int.h: New file (from GNU libc CVS). + + * src/include/gettext.h: Dummy file which just defines a gettext() + macro. + + * src/include/groff-getopt.h: Updated. + + * src/include/Makefile.sub (HDRS): Add getopt_int.h and gettext.h. + + + * src/libs/libdriver/input.cpp (IntArray): Remove superfluous + `const' keywords in return value. + + * src/preproc/html/pushback.cpp (pushBackBuffer::~pushBackBuffer): + Remove redundant variable `old'. + (pushBackBuffer::skipToNewline): Remove redundant variable `ch'. + + * src/preproc/tbl/main.cpp (process_table): Remove redundant + variable `c'. + + + Fix more friend name injection problems since modern C++ compilers + fail otherwise. We simply provide (global) declarations for all + functions declared as friends. This is not really necessary but + doesn't harm. + + * src/preproc/eqn/lex.cpp: Provide declarations for get_char, + peek_char, and get_location. + + * src/preproc/refer/ref.h: Provide declarations for + compare_reference, same_reference, same_year, same_date, + same_author_last_name, and same_author_name. + + * src/roff/troff/div.h: Provide declarations for do_divert and + page_offset. + + * src/roff/troff/env.h: Provide declarations for title_length, + space_size, fill, no_fill, adjust, no_adjust, center, right_justify, + vertical_spacing, post_vertical_spacing, line_spacing, line_length, + indent, temporary_indent, do_underline, do_input_trap, set_tabs, + margin_character, no_number, number_lines, leader_character, + tab_character, hyphenate_request, no_hyphenate, + hyphen_line_max_request, hyphenation_space_request, + hyphenation_margin_request, line_width, tabs_save, tabs_restore, + line_tabs_request, widow_control_request, and do_divert. + + * src/roff/troff/input.cpp: Provide declaration for chop_macro. + + * src/roff/troff/node.cpp: Provide declarations for class + tfont_spec. + Provide declaration for make_tfont. + +2005-05-29 Werner LEMBERG + + * doc/fdl.texi: Updated to version 1.2. Reported by Bernd Warken. + +2005-05-28 Werner LEMBERG + + * contrib/pdfmark/Makefile.sub (.ms.pdf): Use `--stylesheet', not + `--style'. + + * src/devices/grolbp/lbp.cpp, src/devices/grolbp/lbp.h: Remove + redundant semicolons. + + * src/preproc/eqn/Makefile.sub, src/preproc/html/Makefile.sub, + src/preproc/soelim/Makefile.sub, src/preproc/tbl/Makefile.sub: + Define `MLIB'. Some compilers need this for linking with libgroff. + +2005-05-27 Werner LEMBERG + + * MANIFEST, README, doc/webpage.ms: Updated. + +2005-05-26 Werner LEMBERG + + * All affected files: Update postal address of FSF. + +2005-05-25 Keith Marshall + Bernd Warken + + * README: More fixes. + + * README.CVS: Removed. Its contents is now part of the README file. + +2005-05-21 Werner LEMBERG + + * README: Updated. Based on a patch from Bernd Warken. + +2005-05-16 Keith Marshall + + Miscellaneous script portability enhancements. + + * aclocal.m4: (GROFF_CSH_HACK): Add space in shebang prototype for + generated conftest.sh script, conforming to portability + recommendation in autoconf docs. + * configure: Likewise, for code generated by GROFF_CSH_HACK. + * contrib/eqn2graph/eqn2graph.sh: Add space in shebang, conforming + to portability recommendation in autoconf docs. + * contrib/gdiffmk/gdiffmk.sh: Likewise. + * contrib/gdiffmk/tests/runtests.in: Likewise. + * contrib/grap2graph/grap2graph.sh: Likewise. + * contrib/groffer/groffer.sh: Likewise. + * contrib/mm/mmroff.pl: Likewise. + * contrib/mom/momdoc/appendices.html: Likewise. + * contrib/pic2graph/pic2graph.sh: Likewise. + * font/devps/generate/afmname: Likewise. + * src/devices/xditview/ad2c: Likewise. + * src/preproc/eqn/neqn.sh: Likewise. + * src/roff/grog/grog.pl: Likewise. + * src/roff/grog/grog.sh: Likewise. + * src/roff/nroff/nroff.sh: Likewise. + * PROBLEMS: Likewise, in embedded script examples. + +2005-05-16 Keith Marshall + + Improve portability of `pdfroff' shell script. + + * arch/misc/shdeps.sh: Add space in shebang, conforming to + portability guidelines in `autoconf' docs. + (PATH_SEARCH_SETUP): New substitution; emits PATH_SEPARATOR + initialization code. Used by contrib/pdfmark/pdfroff.sh's + `searchpath' function. + +2005-05-14 Werner LEMBERG + + * contrib/pic2graph/pic2graph.sh, contrib/graph2graph.sh, + contrib/eqn2graph.sh: Add option `-trim' to `convert' which is + needed for newer ImageMagick versions. + +2005-05-07 Werner LEMBERG + + * src/preproc/refer/refer.man: Many small typographic fixes. + +2005-05-06 Jeff Conrad + + * src/devices/grohtml/post-html.cpp (assert_state::~assert_state): + Use `char *' cast for a_delete. + +2005-05-03 Werner LEMBERG + + * src/libs/libgroff/maxpathname.cpp: Include stdlib.h. + src/libs/libgroff/relocate.cpp: Use path_name_max everywhere. + +2005-05-03 Jeff Conrad + + * src/devices/grohtml/post-html.cpp: Use casts to `char *' if using + `a_delete' for `const char *'. + +2005-05-03 Werner LEMBERG + + * src/devices/grohtml/post-html.cpp, + src/devices/grohtml/html-table.cpp, + src/devices/grohtml/html-text.cpp, src/devices/grohtml/output.cpp: + Replace malloc/free with new/delete/a_delete. + + * src/devices/grolbp/lbp.h: Remove superfluous semicolons which + are prohibited with ANSI C++. + (lbpprintf, vdmprintf): Remove useless `inline' keyword (since the + function has a variable number of arguments). + + * src/preproc/grn/main.cpp (doinput): Change return type to `int'. + Simplify function and update all callers. + +2005-05-02 Werner LEMBERG + + Undo getopt changes from 2005-04-30. We don't want a dependency + on gettext. + + * src/include/getopt_int.h: Removed. + + * src/include/getopt.h, src/include/groff-getopt.h, + src/include/Makefile.sub, src/libs/libgroff/getopt.c, + src/libs/libgroff/getopt1.c: Revert to previous version. + + + * src/include/nonposix.h (access) [_MSC_VER]: New macro. + + * src/include/posix.h (F_OK): Define conditionally. + + * src/devices/grotty/tty.cpp (tty_printer::make_underline): Use + different variable name in second `for' loop to avoid MSVC compiler + problem. + +2005-04-30 Werner LEMBERG + + AC_TYPE_SIGNAL from current autoconf can fail if CC=g++. + + * aclocal.m4 (GROFF_TYPE_SIGNAL): New function. + * configure.ac: Use GROFF_TYPE_SIGNAL, not AC_TYPE_SIGNAL. + * configure, src/include/config.hin: Regenerated. + + * PROBLEMS: Updated. + + + Update getopt files. + + * src/include/getopt.h, src/libs/libgroff/getopt.c, + src/libs/libgroff/getopt1.c: Updated from GNU libc CVS. + + * src/include/getopt_int.h: New file (from GNU libc CVS). + + * src/include/groff-getopt.h: Updated. + + * src/include/Makefile.sub (HDRS): Add getopt_int.h. + + + * font/devutf8/NOTES: Updated. + +2005-04-28 Werner LEMBERG + + Bug fix for Win32 relocatable code. Based on a patch from Keith + Marshall. + + * src/libs/libgroff/maxpathname.cpp (PATH_MAX): Test for `_MAX_PATH' + also. + + * src/libs/libgroff/relocate.c (DEBUG): Define it conditionally. + (searchpath) [_WIN32]: Use `_fullpath', not `realpath'. + +2005-04-28 Keith Marshall + + Correct `gnu.eps' handling for build from distribution tarball, with + separate source and build directories. + + * doc/Makefile.sub: (examples.stamp): New target; forces copy of + grnexmpl.g, groff.css and gnu.eps from source to build directory; + generate gnu.eps from gnu.xpm if required; touch examples.stamp. + (prepare_examples): Make it depend on examples.stamp. + (CLEANADD): Add examples.stamp. + +2005-04-27 Werner LEMBERG + + Implement the rule + + position: '(' position ')' + + in pic. + + * src/preproc/pic/pic.y (position, position_not_place): Handle + additional parentheses. + + * doc/pic.ms: Updated. + +2005-04-23 Larry Jones + + * src/utils/xtotroff/xtotroff.c (MapFont): Fix variable declaration. + +2005-04-18 Werner LEMBERG + + * src/roff/groff/pipeline.c: Don't include ctype.h. + +2005-04-13 Werner LEMBERG + + * src/roff/nroff/nroff.man: Document option `-M'. + +2005-04-13 Bruce Lilly + + * src/roff/nroff/nroff.sh: Make the script accept option `-M'. + +2005-04-01 Kees Zeelenberg + Werner LEMBERG + + Add binary relocation support for Windows platforms. + + * src/include/Makefile.sub (defs.h): Add `INSTALLPATH'. + + * src/include/relocate.h, src/libs/libgroff/relocate.cpp: New files. + + * src/libs/libgroff/searchpath.cpp: Handle `relocate'. + (search_path::search_path, search_path::open_file_cautious): Use + `relocate'. + + * src/libs/libgroff/Makefile.sub (OBJS, CCSRCS), + src/include/Makefile.sub (HDRS): Updated. + +2005-04-01 Werner LEMBERG + + * src/devices/grohtml/post-html.cpp: Don't use strdup/free but + strsave/a_delete. + + * src/libs/libgroff/font.cpp: Replace strdup with strsave. + + * src/libs/libgroff/maxfilename.cpp: Don't include limits.h since + lib.h already does it. + + * src/libs/libgroff/maxpathname.cpp: New file, defining + path_name_max. + + * src/include/lib.h: Add prototype for path_name_max. + + * src/libs/libgroff/Makefile.sub (OBJS, CCSRCS): Updated. + + * src/include/nonposix.h (PATH_EXT): New macro. + +2005-03-28 Werner LEMBERG + + Add support for double- and zero-width characters in grotty. + + * src/devices/grotty/tty.cpp (glyph): Add width. + (tty_printer::make_underline, tty_printer::make_bold, + tty_printer::add_character): Add parameter to pass character width. + Update all callers. + (tty_printer::end_page): Increase hpos by actual character width. + + * font/devutf8/R.proto: Specify zero width for non-spacing + characters. + + * tmac/unicode.tmac: Remove definitions for non-spacing entities. + + * Makefile.comm (extraclean): Remove more junk files. + +2005-03-25 Werner LEMBERG + + * configure.ac: Undo change from 2005-03-24. + * configure: Regenerated. + +2005-03-24 Werner LEMBERG + + * Makefile.in (NOMAKEDIRS): Add contrib/gdiffmk/tests. + (dist): Search Makefile while descending into $(EXTRADIRS). + + * doc/Makefile.in (.PHONY): Add. + (clean): Don't remove *.png and *.eps. + Don't handle *.gif. + (realclean): Remove *.png and *.eps. + (extraclean): Depend on distclean. + + * configure.ac: Add copyright. + Handle contrib/pdfmark/Makefile. + + * configure: Regenerated. + +2005-03-18 Larry Kollar + + Add numbered and definition lists to www.tmac. + + * tmac/www.tmac (www-ul-level1, www-ul-level2, www-ul-level3, + www-ol-level1, www-ol-level2, www-ol-level3, www-ol-tmp): New + auxiliary string registers. + (www-ul-level, www-ol-level, www-dl-level, www-ol-ctr1, www-ol-ctr2, + www-ol-ctr3, www-dl-shift): New auxiliary number registers. + (www-level): Removed. + (www-level1, www-level2, www-level3): Initialize to empty. + (www-level0, www-level4, www-level5, www-level6, www-level7, + www-level8, www-level9): New string registers. + (www-push-li, www-pop-li): New macros. + (www-push-level, www-pop-level): Renamed to... + (www-push-ul-level, www-pop-ul-level): This. + Updated. + (www-push-ol-level, www-pop-ol-level): New macros. + (ULS, ULE): Updated. + (OLS, OLE, DLS, DLE): New user macros. + (LI): Removed. It is aliased to one of... + (www-li-ul, www-li-ol, www-li-dl): New macros. + + * tmac/groff_www.man: Document new macros. + + * NEWS: Updated. + +2005-03-18 Werner LEMBERG + + * tmac/doc-common (doc-operating-system-NetBSD-2.0.1, + doc-operating-system-NetBSD-2.0.2): New strings. + + * tmac/groff_mdoc.man: Updated. + +2005-03-17 Werner LEMBERG + + * doc/Makefile.sub (CLEANADD): Add `groff.html'. + +2005-03-17 Werner LEMBERG + + * src/libs/libgroff/hypot.c: Renamed to... + * src/libs/libgroff/hypot.cpp: This. Updated to C++. + + * src/libs/libgroff/Makefile.sub (CCSRCS, CSRCS): Updated. + + * src/include/lib.h: Updated. + +2005-03-16 Werner LEMBERG + + Add workaround for broken hypot() on Interix. + + * src/libs/libgroff/hypot.c: New wrapper file for `hypot'. + + * src/libs/libgroff/Makefile.sub (OBJS): Add `hypot.o'. + (CSRCS): Add `hypot.c'. + + * src/include/lib.h: Declare `groff_hypot'. + + * src/preproc/grn/hgraph.cpp: Don't declare `hypot'. + Use `groff_hypot'. + + * src/preproc/pic/pic.h: Don't declare `hypot'. + + * src/preproc/pic/object.cpp (hypot): Use `groff_hypot'. + +2005-03-15 Gaius Mulley + + * src/devices/grohtml/post-html.cpp + (html_printer::lookahead_for_tables): End .ce properly to avoid a + segfault. + +2005-03-15 Werner LEMBERG + + makeinfo 4.8 doesn't produce good HTML output from groff.texinfo. + + * doc/fixinfo.sh: New script to postprocess makeinfo's HTML output. + + * doc/Makefile.in (.texinfo.html): Call fixinfo.sh. + +2005-03-14 Werner LEMBERG + + Add Cyrillic support to devutf8 and devhtml. + + * font/devutf8/R.proto, font/devhtml/R.proto: Add Cyrillic blocks. + + * tmac/unicode.tmac: New file. + + * tmac/tty.tmac: Include unicode.tmac if device is utf8. + + * tmac/Makefile.sub (NORMALFILES): Add unicode.tmac. + + * NEWS: Updated. + +2005-03-02 Keith Marshall + + * src/libs/libdriver/printer.cpp (check_for_output_error): New + function. It has been introduced to catch peculiar error contexts + on MS-Windows platforms. + +2005-02-28 Werner LEMBERG + + * src/roff/troff/input.cpp (string_iterator::fill): Protect against + null pointer. + + * tmac/papersize.tmac: Convert `paper' string contents to lowercase. + + * configure: Regenerated. + + * NEWS: Updated. + +2005-02-28 Keith Marshall + + Integrate `pdfmark' into normal groff build system; + install macro `pdfmark' packages, build and install `pdfroff', + and PDF format documentation. + + * Makefile.comm: Add PDFDOCDIR. + + * Makefile.in: (MDEFINES) ALT_AWK_PROGS, ALT_GHOSTSCRIPT_PROGS, + pdfdocdir, make_pdfdoc, make_install_pdfdoc: New variables. + (unstall_dirs): Add pdfdocdir. + + * aclocal.m4: (GROFF_GHOSTSCRIPT_PREFS): New function; support + `--with-alt-gs' option, set ALT_GHOSTSCRIPT_PROGS. + (GROFF_GHOSTSCRIPT_PATH): Support `--with-gs' option, force use of + GROFF_GHOSTSCRIPT_PREFS, set GHOSTSCRIPT. + (GROFF_HTML_PROGRAMS): Force use of GROFF_GHOSTSCRIPT_PATH; tidy up. + (GROFF_AWK_PREFS): New function; support `--with-alt-awk' option, + set ALT_AWK_PROGS. + (GROFF_AWK_PATH): New function; support `--with-awk' option, force + use of GROFF_AWK_PREFS. + (GROFF_PDFDOC_PROGRAMS): New function; force use of GROFF_AWK_PATH + and GROFF_GHOSTSCRIPT_PATH, set make_pdfdoc and make_install_pdfdoc. + + * configure.ac: Add AC_PREREQ(2.59), GROFF_PDFDOC_PROGRAMS. + Remove GROFF_GHOSTSCRIPT_PATH, (forced by GROFF_PDFDOC_PROGRAMS, and + also by modified GROFF_HTML_PROGRAMS). + +2005-02-27 Gaius Mulley + + * src/devices/grohtml/html-text.cpp (html_text::do_pre): Preserve + paragraph spacing. + (html_text::done_para): Unset `start_space'. + (html_text::remove_para_align): Call `retrieve_para_space' for the + spacing. + + * src/devices/grohtml/post-html.cpp (html_printer::emit_raw): Unset + `seen_space'. + (html_printer::do_check_center): Emit vertical space if necessary. + + * src/roff/troff/env.cpp (environment_switch): Preserve + `seen_space', `seen_eol', and `suppress_next_eol' while switching + environments. + + * src/roff/troff/node.cpp (suppress_node::suppress_node): Set + `is_special'. + +2005-02-20 Werner LEMBERG + + * src/preproc/eqn/eqn.man, NEWS: Document various extensions of + eqn. + +2005-02-17 Werner LEMBERG + + * doc/pic.ms, man/groff.man: Fix typos. + + * doc/groff.texinfo: Fix typos. + (\LEmacro): Get proper mathematical spacing. + +2005-02-16 Werner LEMBERG + + * aclocal.m4 (GROFF_APPRESDIR_CHECK): Improve warning message. + * configure: Regenerated with autoconf 2.59b. + +2005-02-16 Gaius Mulley + + * src/devices/grohtml/post-html.cpp (html_printer::is_line_start, + html_printer::start_font): Fix handling of preformatted text. + +2005-02-15 Gaius Mulley + + These patches modify the indentation implementation to use `

'. Many thanks to Peter and Larry for + suggesting this solution. Grohtml only uses tables for `.IP' and + related tags when the first operand has a short width. + + Similarly, they modify all vertical space code. By default, grohtml + sets up a style sheet which uses no vertical space between `table', + `pre', and `p' tags. It forces spaces when it needs them using + `style="margin-top: 1em"'. + + * src/devices/grohtml/html-table.cpp: Include `html-text.h'. + (html_table::emit_table_header, html_table::emit_new_row): + Rewritten. + (html_table::set_space): New function. + (html_indent::html_indent): Don't set `is_used'. + (html_indent::begin): Rewritten. + (html_indent::end): Remove code in function. + + * src/devices/grohtml/html-table.h: Updated. + (html_table): Make `out' public. + + * src/devices/grohtml/html-text.cpp (html_text::html_text): + Initialize `start_space' with FALSE. + (html_text::end_tag) : Updated. + (html_text::issue_tag): Add argument to handle space style. + (html_text::start_tag) : Updated. + (html_text::flush_text): Don't set `start_space'. + (html_text::push_para): Don't set `p->really_issued'. + (html_text::do_emittext): Updated. + (html_text::do_para): Add paremeter to handle space. + Update all callers. + (html_text::retrieve_para_space): New function. + + * src/devices/grohtml/html-text.h (STYLE_VERTICAL_SPACE): New macro. + (tag_definition): Remove `really_issued'. + (html_text): Updated. + + * src/devices/grohtml/post-html.cpp (html_printer): Add variables + `current_column' and `row_space'. + Update constructor. + (html_printer::emit_raw, html_printer::write_header, + html_printer::do_indent, html_printer::do_check_center, + html_printer::do_tab_ts): Handle vertical space. + (html_printer:do_tab_te, html_printer::do_end_para): Call + `remove_para_space'. + (html_printer::do_col): Rewritten. + (html_printer::flush_globs): Remove debugging code. + (html_printer::is_line_start): New function. + (html_printer::start_font): Use `is_line_start'. + (html_printer::writeHeadMetaStyle): New function. + (html_printer::do_file_components, html_printer::~html_printer): + Call `writeHeadMetaStyle'. + + * tmac/www.tmac (www-handle-percent): New macro. + (MPIMG): Handle percent values for width and height parameters. + (DC): Updated. + + * tmac/groff_www.man: Updated. + +2005-02-14 Werner LEMBERG + + * src/utils/afmtodit/afmtodit.pl: Remove an incorrect `my' from + $psname and $italic_angle. + Immediately restart file input loops if `split' returns an empty + array. + +2005-02-13 Michail Vidiassov + Werner LEMBERG + + Update afmtodit to better support Unicode (Michail). + Update afmtodit to use Perl 5 syntax (Werner). + + * src/utils/afmtodit/afmtodit.pl: Don't use `getopts.pl' but + `Getopts::Std'. + Decorate variables with `my' where necessary. + Use `defined' where necessary to avoid warnings. + Don't use `do' for subroutine calls. + Other minor syntax updates. + Check for both `uXXXX[X[X]]' and `uniXXXX'. + Handle glyph variants properly. + (%unicode_decomposed, %AGL_to_unicode): Don't use `u' prefix in + strings. + + * src/utils/afmtodit/afmtodit.man: Updated. + +2005-02-13 Werner LEMBERG + + Make groff.texinfo work with texinfo 4.8. + + * doc/groff.texinfo (@Var): Use @r and @slanted. + (@defdummy, @Def*): Use @c to avoid empty lines. + (\angles): Replaced with... + (\Langlemacro, \Ranglemacro): New TeX macros. + (@Langlemacro, @Ranglemacro): New variables defined with @set. + (@angles): Use @Langlemacro and @Ranglemacro. + (\LE): Replaced with... + (\LEmacro): New TeX macro. + (@LEmacro): New variable defined with @set. + (@LE): Use @LEmacro. + (@Lparenmacro, @Rparenmacro, @Lbrackmacro, @Rbrackmacro): New + variables defined with @set. + (@lparen, @rparen, @lbrack, @rbrack): Replaced with... + (@Lparen, @Rparen, @Lbrack, @Rbrack): New macros. + Update all callers. + + Other minor updates. + + * doc/texinfo.tex: Update to texinfo version 4.8. + + * README.CVS: Updated. + +2005-02-09 Alejandro López-Valencia (tiny change) + + * doc/groff.texinfo (ms Document Control Registers): Document `HY' + and `FAM' registers. + +2005-02-05 Werner LEMBERG + + * tmac/groff_mdoc.man, tmac/doc-common, tmac/doc-ditroff, + tmac/doc-nroff, tmac/doc-old.tmac, tmac/doc-syms, tmac/doc.tmac: + Update BSD license. + +2005-02-01 Werner LEMBERG + + * src/roff/groff/groff.man: Add information about paper size. + +2005-01-25 Werner LEMBERG + + * src/roff/nroff/nroff.sh: Handle `*.ISO8859-1' in locale. From + NetBSD bin/29114. + +2005-01-22 Ruslan Ermilov + + * tmac/doc.tmac (Sm): Improved. It didn't work properly in many + cases. + (Re): Emit a warning if called without `.Rs'. + (doc-finish-reference): Use parameter for decreasing + `doc-reference-count'. + (doc-print-reference): Pass specific count parameters to + `doc-finish-reference'. + +2005-01-21 Werner LEMBERG + + * src/libs/libdriver/input.cpp (delete_current_env, do_file): + Reset pointers to zero after deallocation. This fixes a crash + if a driver is called with multiple input files. Reported by + Ken Chilton . + + * src/devices/grops/grops.man: Add more info on DSC. + +2005-01-17 Ruslan Ermilov + + * tmac/doc-common (Dd), tmac/doc-ditroff (gX, doc-setup-header): + Remove dead code. + +2005-01-17 Werner LEMBERG + + * src/roff/troff/div.cpp (top_level_diversion::space): Protect + against division by zero. + +2005-01-13 Ruslan Ermilov + + * tmac/doc.tmac (Ef): Restore doc-curr-font and doc-curr-size. + +2004-12-19 Werner LEMBERG + + * install-sh: New version; taken from texinfo CVS. + +2004-12-17 Werner LEMBERG + + * tmac/devtag.tmac: Protect against loading twice. + Protect agains compatibility mode. + * tmac/www.tmac: Protect against loading twice. + Load `devtag.tmac' before switching off compatibility mode. + * tmac/an-old.tmac, tmac/s.tmac: Load `devtag.tmac'. + +2004-12-16 Mike Bianchi + + * configure.ac: Produce `contrib/gdiffmk/tests/runtests'. + * configure: Updated. + +2004-12-15 Thomas Klausner + + * tmac/doc-syms, tmac/groff_mdoc.man: Add `libpam' library. + +2004-12-15 Werner LEMBERG + + Make `test-groff' work again -- previously, wrong paths have been + used. Additionally, it can now be called from anywhere. + + * test-groff.in: Don't test for groff binary. This is no longer + necessary since the proper paths are determined by `configure'. + (EXEEXT): Removed. No longer used. + (srcdir, builddir): Use values provided by the configure script. + (XENVIRONMENT): Updated. + + * INSTALL: Updated. + +2004-12-14 Gaius Mulley + + Make .tag and .taga work for all devices (but only grohtml actually + handles them). + + * src/devices/grohtml/post-html.cpp: s/html-tag/devtag/. + (text_glob::is_br, page::add_tag, html_printer::troff_tag, + html_printer::handle_assertion): Don't use hard-coded string + lengths. + (html_printer::lookahead_for_table): Reset `tbl' properly if + necessary. + (html_printer::devtag): New function, handling `devtag'. + (html_printer::special): Don't handle `html-tag'. + + * src/include/printer.h, src/libs/libdriver/printer.cpp + (printer::devtag): New virtual function. + + * src/libs/libdriver/input.cpp (parse_x_command) <'X'>: Handle + `devtag'. + + * src/roff/troff/env.cpp, src/roff/troff/mtsm.cpp, + src/roff/troff/node.cpp: s/html-tag/devtag/. + + * src/roff/troff/input.cpp (tag, taga): Always call + curenv->add_node. + + * tmac/an-old.tmac, tmac/s.tmac, tmac/troffrc-end: Use DEVTAG* + macros instead of HTML-TAG*. + + * tmac/devtag.tmac: New file, defining the DEVTAG-* macros. + + * tmac/www.tmac: Load devtag.tmac. + Replace HTML-TAG* macros with DEVTAG* macros. + (HTML, HTML-NS): Changed definitions. + (URL): Use HTML-NS. + (HTML-TAG, HTML-TAG-NS, HTML-TAG-NEXT): Removed. + + * tmac/Makefile.sub (NORMALFILES): Add devtag.tmac. + +2004-12-10 Werner LEMBERG + + Import Mike's `gdiffmk' package. + + * contrib/gdiffmk/*: New files. + * Makefile.in (OTHERDIRS): Add contrib/gdiffmk. + * NEWS: Updated. + +2004-12-08 Werner LEMBERG + + Import Keith's `pdfmark' package. Integration is very preliminary. + + * contrib/pdfmark/*: New files. + * Makefile.in (OTHERDIRS): Add contrib/pdfmark. + * NEWS: Updated. + +2004-12-07 Gaius Mulley + + Fix a bug with title handling in HTML. + + * src/devices/grohtml/post-html.cpp (text_glob::is_nf, + text_glob::is_fi, text_glob::is_ce): Use strlen to compute string + length. + (html_printer::handle_tag_within_title): New function. + (html_printer::do_title): Use it. + + * tmac/s.tmac (TL): Don't set `need_eo_tl'. + (cov*tl-au-print): Emit `.eo.tl' tag. + +2004-12-05 Alejandro López-Valencia + + * man/groff_char.man: Minor imrovements. + +2004-12-04 Werner LEMBERG + + * src/preproc/eqn/eqn.man: Revised. + +2004-11-25 Werner LEMBERG + + * src/utils/xtotroff/xtotroff.c: Reformat to be similar to other + groff source files. + Include config.h. + Include limits.h. + Remove X_NOT_STDC_ENV conditional. + (Version_string, program_name): New global variables. + (groff_flag): Removed. + (MapFont): Updated. + (usage): Take a stream as argument. + Use `program_name'. + Update all callers. + (main): Add `long_options' array for `--help' and `--version'. + Make `-g' a dummy option. + Handle `-v' and unknown options. + Remove unused `position' variable. + + * src/utils/xtotroff/Makefile.sub (MAN1): Define. + (XLIBS): Add LIBGROFF. + + * src/utils/xtotroff/xtotroff.man, src/utils/xtotroff/Makefile.in: + New files. + + * src/devices/xditview/Dvi.c (default_font_map): Split into three + parts to avoid compiler warning. + (resources): Don't initialize with `default_font_map'. + (ClassInitialize): Initialize first element of `resources'. + + * src/devices/xditview/Makefile.sub (devdir, xtotroff, DPIS, fonts): + Removed. + + * src/utils/lkbib/lkbib.man, src/utils/lookbib/lookbib.man, + src/utils/pfbtops/pfbtops.man: Revised, updated. + + * configure.ac: Generate src/utils/xtotroff/Makefile. + * configure: Regenerated. + +2004-11-24 Werner LEMBERG + + First fixes to get produce HTML. + + * src/devices/grohtml/post-html.cpp (generate_img_src): Add `alt' + attribute. + + * tmac/www.tmac (IMG, PIMG, MPIMG): Add `alt' attribute. + (HR, LI): Use `HTML

', not `HTML'. + + * doc/webpage.ms: Minor updates. + +2004-11-23 Larry Kollar + + Add option -S grohtml to determine the file split level. + + * src/devices/grohtml/post-html.cpp (split_level): New global + variable. + (html_header::determine_header_level): Use split_level. + (main): Handle `-S' command line option. + Sort options. + + * src/preproc/html/pre-html.cpp (scanArguments): Updated. + + * src/devices/grohtml/grohtml.man: Document it. + Sort options. + + * NEWS: Document it. + +2004-11-23 Y T + + * tmac/s.tmac (ref*add-V, ref*add-N): New macros for handling + the volume and number refer entries. + +2004-11-22 Werner LEMBERG + + * src/devices/grohtml/html-table.cpp + (html_table::emit_table_header): Don't emit `cols' attribute which + doesn't exist in HTML 4.0 and is thus invalid. + + * NEWS: More minor fixes and updates. + +2004-11-18 Werner LEMBERG + + * tmac/www.tmac (HTML-NS, HTML-TAG-NS, HTML-TAG-NEXT): Simplified. + (HTML

): Minor clean-up. + + * tmac/groff_www.man: Updated. + + * src/devices/grohtml/grohtml.man: Revised and updated. + + * NEWS: Updated. + +2004-11-18 Gaius Mulley + + * src/devices/grohtml/post-html.cpp (html_printer::do_heading): + Fix space insertion. + (html_printer::do_links): Fix rules generation around automatic + heading links. + + * tmac/www.tmac (LK): Use HTML-TAG-NS. + (HR): Simplify. + No longer emit empty line for non-HTML devices. + +2004-11-17 Werner LEMBERG + + * doc/Makefile.in (prepare_examples, webpage.html): Handle + `groff.css'. + + * doc/Makefile.sub (EXAMPLEFILES, CLEANNOTSRCDIRADD, + prepare_examples, webpage.html): Handle `groff.css'. + +2004-11-15 Werner LEMBERG + + * NEWS, README, doc/webpage.ms: Updated. + + * tmac/www.tmac (HTML, HTML-TAG): Minor clean-ups. + +2004-10-30 Gaius Mulley + + * src/include/printer.h (printer): Remove virtual function + `round_width'. + Update all source files. + + * src/devices/grohtml/post-html.cpp (html_printer): New member + function `round_width'. + +2004-10-20 Tadziu Hoffmann + + * src/preproc/tbl/table.cpp (table::do_row): Fix handling of the `d' + column key letter suffix. + +2004-10-14 Werner LEMBERG + + * Makefile.in (check): Depend on `site.exp' and `docheck'. + (docheck): Run dejagnu's `runtest' if it exists. + (site.exp): Create dejagnu configuration file. + + * Makefile.sub (DISTCLEANFILES): Add files related to dejagnu. + +2004-10-13 Werner LEMBERG + + * src/devices/grohtml/html-text.cpp (html_text_get_alignment), + src/devices/grohtml/post-html.cpp (make_val, + html_printer::handle_state_assertion): Fix compiler warnings. + + * src/roff/troff/div.cpp: Include `stringclass.h' and `mtsm.h'. + (diversion::diversion): Fix order of initializers. + + * src/roff/troff/div.h: Don't include `mtsm.h'. + + * src/roff/troff/env.cpp: Include `stringclass.h' and `mtsm.h'. + (environment::environment): Fix order of initializers. + (environment::make_tag, environment::construct_format_state): Fix + compiler warnings. + + * src/roff/troff/input.cpp: Include `stringclass.h' and `mtsm.h'. + (input_iterator::input_iterator, macro::macro): Fix order of + initializers. + + * src/roff/troff/mtsm.cpp: Include only necessary header files. + (state_set::add, state_set::val): Fix compiler warnings. + + * src/roff/troff/mtsm.h: Don't include `stringclass.h'. + (bool_value_state, int_value_state, units_value_state, + string_value_state): Remove comma after last element which causes + an error with g++ 3.3.3. + + * src/roff/troff/node.cpp: Include `stringclass.h'. + (hline_node::hline_node, vline_node::vline_node, + space_char_hmotion_node, left_italic_corrected_node): Fix compiler + warnings. + (zero_width_node::zero_width_node): Fix order of initializers. + + * src/roff/troff/node.h: Don't include `mtsm.h'. + (hmotion_node): Fix compiler warnings. + + * src/roff/troff/number.cpp: Include `stringclass.h' and `mtsm.h'. + +2004-10-12 Gaius Mulley + + * doc/groff.css: New file. + + * doc/webpage.ms: Use `groff.css'. + Other small fixes. + + * tmac/an-old.tmac (need_eo_h): New number register. + (TH): Emit `.eo.tl' tag after title. + (SH): Set `need_eo_h'. + (an-trap): Handle `need_eo_h'. + (an-do-tag): s/HTML-TAG-NS/HTML-TAG-NEXT/. + + * tmac/s.tmac (need_eo_h, need_eo_tl): New number registers. + (TL): Always start diversion. + Updated. + (@AI): Always call `par@reset'. + (@AB): Update code for -Thtml. + (cov*tl-au-print): Handle -Thtml. + (par@reset): Handle `need_eo_tl', `need_eo_h'. + (@IP): Simplified. + (@IT-html): Removed. + (@SH): Set `need_eo_h' for -Thtml. + (par@TL): s/HTML-TAG/HTMl-TAG-NS/. + Set `need_eo_tl'. + (@NH): s/HTML-TAG/HTMl-TAG-NS/. + Set `need_eo_h' for -Thtml. + (@EQ, @EN): Don't handle -Thtml specially. + (par@load-init): Don't handle -Thtml specially. + + * tmac/www.tmac (www:paraspace): New macro. + (HTML-NS, HTML-TAG-NS): Use new `tag' request. + (HTML

, HTML-TAG-NEXT): New macros. + (HnE): Emit tag `.eo.h' instead of break. + (HR): s/HTML-NS/HTML/. + (www-end-nowhere): End diversion only if `www-html' not set. + Emit `.eo.tl' tag. + (ULS, ULE): s|HTML|HTML

|. + (LI): Call `www:paraspace'. + (HEAD): New macro. + +2004-10-11 Gaius Mulley + + * src/roff/troff/request.h (macro): Make `p' public. + New variable `is_a_diversion'. + New member function `is_diversion'. + + + * src/devices/grohtml/html.h (simple_output): New member function + `force_nl'. + + * src/devices/grohtml/html-table.cpp (tabs::compatible): Fix + computation of `total'. + (tabs::check_init): New function. + (html_table::emit_table_header): Emit style data. + (html_table::insert_column): Improved. + + * src/devices/grohtml/html-table.h: Updated. + + * src/devices/grohtml/html-text.cpp (html_text::html_text): + Initialize `start_space' with TRUE. + (html_text::end_tag, html_start_tag): Fix `P_TAG' and `PRE_TAG' + cases. + (html_text::flush_text): Set `start_space' flag. + (html_text::uses_indent, html_text::remove_para_space, + html_text::get_alignment): New functions. + (html_text::push_para): Updated. + (html_text::do_para): Check for empty argument. + Don't set `space_emitted'. + (html_text::do_space, html_text::emit_space): Updated. + + * src/devices/grohtml/html-text.h (tag_definition): New variable + `really_issued'. + (html_text): New member function `uses_indent', `remove_para_space', + `get_alignment'. + + * src/devices/grohtml/output.cpp (simple_output::force_nl): New + function. + (simple_output:nl): Always emit `\n'. + + * src/devices/grohtml/post-html.cpp: Include `string.h'. + (BASE_POINT_SIZE): Removed. + (base_point_size, head_info): New global variables. + (text_glob): New member functions `is_ll', `is_tl', `is_eo_tl', + `is_eo_h'. + (text_glob::is_nf, text_glob::is_fi): Handle `.fi 0' and `.fi 1' + tags, respectively. + (page::add_and_encode): Pass additional parameter for tag flag. + (assert_pos): New structure. + (assert_state): New class. + (html_printer): Remove `indentation', `prev_indent'. + Add variables `troff_indent', `device_indent', `temp_indent'. + Add variables `seen_indent', `next_indent', `seen_pageoffset', + `next_pageoffset', `seen_linelenght', `next_linelength', + `seen_center', `next_center', `seen_space', `seen_break', `as'. + Add member functions `do_check_center', `do_space', `do_head', + `get_troff_indent', `restore_troff_indent', `handle_assertion', + `handle_state_assertion', `do_end_para', `set_char_and_width'. + Change argument to `do_fill' to `char *'. + Update constructor. + (html_printer::emit_raw): Call `shutdown_table'. + Use new functions. + (html_printer::do_center): Simplified. + (html_printer::do_title): Improved. + (html_printer::write_header): Emit one more newline. + Use new functions. + (html_printer::do_heading, html_printer::do_indent, + html_printer::do_eol, html_printer::do_tab_ts, + html_printer::do_tab, html_printer::do_tab0, + html_printer::calc_po_in, html_printer::next_horiz_pos, + html_printer::remove_courier_tabs, + html_printer::insert_tab0_foreach_tab, html_printer::begin_page): + Updated. + (html_printer::do_linelength, html_printer::do_pageoffset, + html_printer::do_indentation, html_printer::do_tempindent, + html_printer::do_tab_te): Simplified. + (html_printer::do_pointsize): Check whether point size is really + associated a `.tl' tag. + (html_printer::do_break): Rewritten. + (html_printer::troff_tag): Improved. + (html_printer::flush_globs): Updated. + (html_printer::lookahead_for_tables): Handle `is_br'. + Use new functions. + (html_printer::set_char): Check `sbuf_style.f'. + (html_printer::write_navigation): Use string comparison. + (html_printer::~html_printer): Emit `head_info'. + (html_printer::special): Rewritten. + (get_str, make_val): New functions. + (main): New option `s' to set the base point size. + + * src/preproc/html/pre-html.cpp (scanArguments): Handle option `s'. + +2004-10-10 Gaius Mulley + + * src/roff/troff/node.cpp: New extern `debug_state'. + Include `stringclass.h' and `mtsm.h'. + Implement new classes and class members from `node.h'. + (real_output_file): Make `fp' public. + (troff_output_file): New variables `cur_div_level' and `tag_list'. + Update constructors. + (troff_output_file::really_print_line): Check whether we should push + the current troff state and use the state at the start of the + invocation of this diversion. + (troff_output_file::add_to_tag_list): New member function. + (node::add_char): Handle `glyph_comp_np'. + + * src/roff/troff/node.h: Include `mtsm.h'. + (node): New variables `state', `push_state', `div_nest_level', + `is_special'. Update constructors, all descendants. + Pass additional argument to `add_char' member function. + New virtual member functions `is_tag', `debug_node', + `debug_node_list'. Update all descendants. + (tag_node): New class for handling tags. + (output_file): Add variable `state'. + +2004-10-09 Gaius Mulley + + * src/roff/troff/mtsm.cpp, src/roff/troff/mtsm.h: New files, + providing a minimal troff state machine to emit meta tags for the + post-grohtml device driver. + + * src/roff/troff/Makefile.sub (OBJS, CCSRCS, HDRS): Handle new + files. + +2004-10-09 Werner LEMBERG + + * tmac/trace.tmac: Fix handling of `am' and `am1' calls. + +2004-10-06 Gaius Mulley + + * src/roff/troff/column.cpp (vjustify_node::copy): Updated. + + * src/roff/troff/div.h: Include `mtsm.h'. + (diversion): New variables `any_chars_added', `needs_push', + `saved_seen_break', `saved_seen_space', `saved_seen_eol', + `saved_suppress_next_eol', `modified_tag'. + New virtual member function `is_diversion'. Update all descendants. + + * src/roff/troff/div.cpp (diversion::diversion, + macro_diversion::macro_diversion): Updated. + (do_divert): Handle `seen_break', `seen_space', `seen_eol', + `suppress_next_eol'. + (top_level_diversion::space): Handle `curenv->seen_space'. + (page_offset): Update tag handling. + (space_request, blank_line, flush_output): Don't call `add_html_tag'. + + * src/roff/troff/env.h (environment): Make `tabs' public. + Remove `ignore_next_eol', `emitted_node'. + Update `output_line', `output'. + New variables `seen_space', `seen_eol', `suppress_next_eol', + `seen_break'. + New member functions `construct_state', `make_tag', + `construct_format_state, `construct_new_line_state, + `dump_troff_state'. + Remove `add_html_tag', `make_html_tag'. + + * src/roff/troff/env.cpp: New externs `suppress_push', + `get_diversion_state', `global_diverted_space'. + (pending_output_line): New variable `was_centered'. + Update constructor and all callers. + (pending_output_line::output): Call `curenv->construct_format_state'. + (environment::environment, environment::copy): Updated. + (environment::output): Handle `was_centered'. + (environment::add_char): Handle construct and diversion state. + (environment::add_node): Handle construct state. + (environment::newline): Handle `was_centered'. + (environment::output_line): Updated. + (environment::possibly_break_line): Updated. + Update tag handling. + (environment::add_html_tag): Replaced with... + (environment::make_tag): New function. + (environment::add_html_tag_tabs, environment::make_html_tag): Removed. + (environment::dump_troff_state): New debugging function. + (environment::construct_state, environment::construct_format_state, + environment::construct_new_line_state): New functions. + (environment::do_break): Updated. + Handle `global_diverted_space'. + (environment::handle_tag): Update tag handling. + (point_size, fill, do_break_request): Don't call `add_html_tag'. + (no_fill): Don't call `add_html_tag'. + Set `suppress_next_eol'. + (center, right_justify, line_length, indent, temporary_indent, + set_tabs): + Update tag handling. + + * src/roff/troff/input.cpp: Don't include `stringclass.h'. + (input_iterator): New variables `is_diversion', `diversion_state'. + Update constructors. + (input_stack): New member functions `get_div_level', + `get_diversion_state', `check_end_diversion'. + New variables `div_level', `diversion_state'. Initialize them. + (suppress_push, global_diverted_space): New global variables. + (input_stack::finish_get, input_stack::finish_peek, + input_stack::remove_boundary, input_stack::end_file, + input_stack::clear, input_stack::pop_macro): Call + `check_end_diversion'. + (input_stack::push): Handle `div_level' and `diversion_state'. + (get_diversion_state): New function. + (diverted_space_node::reread): Handle `global_diverted_space'. + (macro::macro): Update constructors. + (macro::is_diversion): New function. + (macro::operator=): Set `is_a_diversion'. + (string_iterator): New member function `is_diversion'. + (string_iterator::string_iterator): Update constructors. + (string_iterator::fill): Set `div_nest_level'. + (macro_iterator): New member function `is_diversion'. + (do_if_request): Handle `suppress_push'. + (tag, taga): New functions. + (init_input_requests): Add `tag' and `taga' requests. + +2004-10-05 Gaius Mulley + + * src/include/font.h (font): New member function + `get_image_generator'. + New variables `unscaled_charwidths' and `image_generator'. + + * src/libs/libgroff/font.cpp (font::get_width): Always return the + character's unscaled width if `font::unscaled_charwidths' is set. + (font::get_image_generator): New function. + (font::load_desc): Check the `unscaled_charwidths' and + `image_generator' keywords. + + * src/libs/libgroff/fontfile.cpp: Initialize + `font::unscaled_charwidths' and `font::image_generator'. + + * font/devhtml/DESC.proto: s/html/unscaled_charwidths/. + + * font/devhtml/Makefile.sub (DESC): Set `image_generator' keyword. + + * man/groff_font.man: Document `unscaled_charwidths' and + `image_generator'. + + * src/preproc/html/pre-html.cpp: Include `device.h'. + (image_gen): New global variable. + (imageList::createPage): Use `image_gen'. + (main): Use `image_generator' keyword. + +2004-10-04 Gaius Mulley + + * tmac/html.tmac: Handle \[sqrtex]. + +2004-10-04 Gaius Mulley + + * src/include/printer.h (printer): New virtual method `round_width'. + + * src/devices/grodvi/dvi.cpp, src/devices/grolbp/lbp.cpp, + src/devices/grolj4/lj4.cpp, src/devices/grops/ps.cpp, + src/devices/grotty/tty.cpp (printer::round_width): New function + member. + + * src/devices/grohtml/post-html.cpp (printer::round_width): New + function member. + (html_printer::set_numbered_char): Use it. + +2004-10-03 Gaius Mulley + + * aclocal.m4 (GROFF_GHOSTSCRIPT_PATH): New macro. + + * configure.ac: Call GROFF_GHOSTSCRIPT_PATH. + + * configure: Regenerated. + + * Makefile.in (GHOSTSCRIPT): New variable. + (MDEFINES): Add GHOSTSCRIPT. + +2004-10-03 Werner LEMBERG + + * INSTALL.gen: Updated (taken from texinfo CVS). + +2004-09-28 Werner LEMBERG + + * NEWS: Updated. + +2004-09-28 Heinz-Jürgen Oertel + + * tmac/groff_www.man: Revised and updated. + +2004-09-26 Werner LEMBERG + + Fix \$@ and \$* to handle any number of arguments. + + * src/roff/troff/input.h (BEGIN_QUOTE, END_QUOTE): New special + characters. + + * src/roff/troff/input.cpp (input_iterator::internal_level): + Removed. + (input_stack): New member functions `increase_level' and + `decrease_level'. + (input_stack::get_level): Don't use `internal_level'. + (get_copy, token::next): Handle BEGIN_QUOTE and END_QUOTE. + (end_quote_iterator): Completely removed. + (interpolate_arg): Build string for \$@ and \$* which is then + pushed onto the input stack. + +2004-09-23 Keith Marshall + + * tmac/groff_ms.man, doc/groff.texinfo: Document changes from + 2004-09-19. + +2004-09-23 Werner LEMBERG + + * tmac/an-old.tmac (ne): Using default scaling operator. + +2004-09-19 Keith Marshall + + This change implements the following features: + + PORPHANS + New numeric register: Defines number of lines following LP, PP, + QP, IP or XP, which must be kept together, before any automatic + page break. If insufficient space remains on the current page, a + page break is forced before the new paragraph begins. + + HORPHANS + New numeric register: Sets number of lines of following paragraph + which must be kept with a heading, defined by NH or SH, before any + automatic page break. If insufficient space remains on the + current page, a page break is forced before the heading. + + GROWPS + (Thanks to Joerg van den Hoff, for this idea). + + New numeric register: Sets the first level of heading (set with + NH), which will keep the same point size as body text; e.g. if + GROWPS is set to 3, .NH 3, .NH 4, ... will produce headings at the + point size specified by \n[PS], but .NH 2 and .NH 1 will have + progressively larger point sizes, determined by \n[PSINCR] (see + below). + + PSINCR + New numeric register: Sets the point size increment for each level + of heading, (set with NH), below the threshold level set by + GROWPS; e.g. if \n[PS] = 10, \n[GROWPS] = 3 and \n[PSINCR] = 2.0p, + then .NH 1 will produce 14pt headings, .NH 2 will produce 12pt, + and all other levels will remain at 10pt, (because \n[PS] = 10). + + SH + Existing macro now accepts a numeric argument, to make heading + size match that of NH with same argument value, when the + GROWPS/PSINCR feature is enabled. + + SN-DOT + New string, set by NH macro, replaces the existing (undocumented) + use of SN, to represent the assigned section number. + + SN-NO-DOT + New string, set by NH macro, represents the assigned section + number, but omits the terminal period (periods at intermediate + levels are retained). + + SN + String set by NH macro, originally undocumented, now implemented + as an alias for SN-DOT (which reproduces original behaviour). + + * tmac/s.tmac (PORPHANS): New register. + (par*start): Use it. + (HORPHANS, GROWPS, PSINCR): New registers. + (SH-NO-TAG, @SH): Use them. + (@NH): Improved. + +2004-09-19 Keith Marshall + + * NEWS, doc/groff.texinfo, tmac/groff_ms.man: Document the deletion + of `Ds' and `De' macros. + +2004-09-10 Werner LEMBERG + + In tbl, handle \a as an interpreted leader character if in + compatibility mode. + + * src/preproc/tbl/table.h (PREFIX, PREFIX_CHAR, LEADER, + LEADER_CHAR): New macros. + (compatible_flag): New declaration. + + * src/preproc/tbl/main.cpp (table_input): Add LEADER_1, LEADER_2, + LEADER_3, and LEADER_4 to `state'. + (table_input::get): Handle `\a'. + + * src/preproc/tbl/table.cpp (PREFIX): Removed. + (LEADER_REG): New macro. + (table::init_output): Define LEADER_REG string register if in + compatibility mode. + + * src/preproc/tbl/tbl.man: Document it. + +2004-08-18 Werner LEMBERG + + * tmac/doc.tmac (An): Fix error message. + +2004-08-06 Werner LEMBERG + + * src/preproc/tbl/main.cpp (main): Call `fatal' not `error' if a + file can't be opened. UNIX tbl has the same behaviour. + +2004-08-05 Y T + + * src/preproc/grn/hdb.cpp (compatibility_flag): Add declaration. + (DBRead): If in compatibility mode, take into account the text + when computing figure boundaries. + +2004-08-05 Werner LEMBERG + + * src/preproc/soelim/soelim.man: Improved. Based on suggestions + from Tadziu Hoffmann. + +2004-08-03 Werner LEMBERG + + * doc/meref.me: Document `_M' register. + +2004-08-03 Martin Husemann + + Make hpftodit work correctly on big-endian systems. + + * src/utils/hpftodit/hpftodit.cpp (File): New method + `get_uint32(char *)'. + (entry): New member `orig_value'. + (read_tags): Use new method. + (output_font_name, read_and_output_pcltypeface, dump_ascii): + Updated. + +2004-08-01 Werner LEMBERG + + * tmac/s.tmac: Undo change 2003-06-29. The proper macro definitions + are already in X11's `macros.t' file. + +2004-08-01 Jeff Conrad + + * src/utils/hpftodit/hfptodit.cpp (output_font_name, dump_ascii): + Fix casting bug. + (read_and_output_pcltypeface): Handle strings with length <= 4. + +2004-07-27 Egil Kvaleberg + + * tmac/s.tmac (pg@top): Don't save `PO' register. + (pg*end-col, pg*end-page): Directly use `PO' register. + +2004-07-27 Werner LEMBERG + + * man/groff_tmac.man: Mention `trace' and `pic' macro packages. + + * src/preproc/refer/refer.cpp (output_references): Check for + empty hash table. + * src/preproc/refer/refer.man: Improve documentation of + `bibliography' command. + +2004-07-26 Werner LEMBERG + + Add requests `fcolor' and `gcolor'. + + * src/roff/troff/env.cpp (fill_color_change, glyph_color_change): + New functions. + (init_env_requests): Add `fcolor' and `gcolor'. + + * src/roff/troff/input.h: Export do_glyph_color and do_fill_color. + + * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo: + Document new requests. + +2004-07-24 Werner LEMBERG + + Add support for fractional point sizes in ms macros. A value for + PS, VS, FPS, and FVS greater than or equal to 1000 is always divided + by 1000. For example, `.nr PS 10250' sets the font size to 10.25p. + + * tmac/s.tmac (@AU, @AI, par@load-init, par@init, par@reset, NL, + PX): Handle fractional point sizes for PS, VS, FPS, and FVS. + + * tmac/groff_ms.man, docs/groff.texinfo, NEWS: Document it. + +2004-07-19 Werner LEMBERG + + * src/preproc/pic/lex.cpp (for_input): Add member `from'. + Update constructor. + (do_for, for_input::get, for_input::peek): Handle negative `by'. + * src/preproc/pic/pic.man, doc/pic.ms, NEWS: Document it. + +2004-07-08 Thomas Klausner + + * tmac/doc-syms (doc-str-St--p1003.1-2004): New string. + * tmac/groff_mdoc.man: Updated. + +2004-07-05 Werner LEMBERG + + * doc/groff.texinfo: Further improve documentation of `hcode'. + +2004-07-04 Sang Dae Yu + + Improve appearance of arrows in pic. + + * src/preproc/pic/object.cpp (draw_arrow): Make outline of filled + arrow head thin. + Use two line segments for drawing non-filled arrow head. + (line_object::print, spline_object::print): Shorten line length to + avoid arrow sticking. + (arc_object::print): Take arrow direction into account. + +2004-07-03 Heinz-Jürgen Oertel + + * tmac/groff_www.man: Update documentation of .MPIMG. + +2004-07-03 Werner LEMBERG + + * tmac/an-old.tmac (RI): Always start with font `R'. + (RI, IR): Properly end with font `R'. + +2004-07-02 Paul Eggert + + * man/ditroff.man, man/groff_font.man, man/groff_out.man, + src/devices/grohtml/grohtml.man, src/preproc/grn/grn.man, + src/preproc/pic/pic.man, tmac/groff_man.man, tmac/groff_ms.man: + Don't pass more than six arguments to .R, .I, .B, etc., for + compatibility with traditional troff macros. + +2004-07-02 Werner LEMBERG + + * src/roff/troff/input.h: s/COMPATIBLE_SAVE/PUSH_GROFF_MODE/. + s/COMPATIBLE_RESTORE/POP_GROFFCOMP_MODE/. + Update all users. + (PUSH_COMP_MODE): New internal character constant. + Update all users. + + * src/roff/troff/input.cpp (get_copy): Handle PUSH_GROFF_MODE, + PUSH_COMP_MODE, and POP_GROFFCOMP_MODE. + (token::next, macro::append): Handle PUSH_COMP_MODE. + (decode_args): Add PUSH_GROFF_MODE or PUSH_COMP_MODE before and + POP_GROFFCOMP after each of the decoded arguments to make them + independent from the compatibility mode status. + (comp_mode): Add `COMP_ENABLE'. + (do_define_string, do_define_macro): Handle COMP_ENABLE. + (define_string, append_string, define_macro, define_indirect_macro, + append_macro, append_indirect_macro): Handle `compatible_flag'. + (chop_macro, substring_request, asciify): Handle PUSH_COMP_MODE. + + * man/groff_diff.man, doc/groff.texinfo: Updated. + +2004-07-01 Werner LEMBERG + + * doc/groff.texinfo: Improve documentation of `hcode'. + Use @documentencoding and convert document to latin-1; to do that + make latin characters active and assign proper macros (within a + @tex...@end tex environment). + * doc/Makefile.in (.texinfo.html, groff): Use --enable-encoding. + * doc/Makefile.sub (groff): Ditto. + +2004-06-29 Werner LEMBERG + + Implement two new conditional operators `F ' and `S ' + which check whether is a valid font or style, respectively. + + * src/libs/libgroff/font.cpp (text_file): Add `silent' member. + (text_file::text_file): Updated. + (text_file::error): Don't emit message if `silent' is set. + (font::load_font): Add optional third argument (which is directly + passed to `load'. + (font::load): Add optional second argument to check the header of + a font only, without emitting warning or error messages. + * src/include/font.h (font): Updated. + + * src/roff/troff/input.cpp (do_if_request): Implement `S' and `F' + conditionals. + * src/roff/troff/node.cpp (mount_font_no_translate): Add optional + fourth argument to check a font without mounting. + (check_font, check_style): New functions. + * src/roff/troff/node.h: Updated. + + * man/groff_diff.man, man/groff.man, NEWS, doc/groff.texinfo: + Updated. + +2004-06-27 Werner LEMBERG + + Implement new string-valued register `.sty' to return the current + style name. + + * env.cpp (environment::get_style_name_string): New function. + (init_env_requests): Add `.sty' register. + * env.h (environment): Updated. + * node.cpp (font_info): Make `get_style_name' a friend. + (get_style_name): New function. + * node.h: Updated. + + * man/groff_diff.man, man/groff.man, NEWS, doc/groff.texinfo: + Updated. + +2004-06-15 Werner LEMBERG + + * src/preproc/tbl/main.cpp (process_data) : Handle + `nospaces' option. + +2004-06-10 Colin Percival + + * doc/meintro.me, doc/meref.me: Don't use \*[td], \n[dy], \*[mo], + and \n[mo] to avoid dependency on current date. + +2004-06-08 Werner LEMBERG + + * Makefile.sub (install_data): New target. + +2004-06-04 Werner LEMBERG + + * src/libs/libxutil/Makefile.sub (EXTRA_CFLAGS): Define. + +2004-06-03 Werner LEMBERG + + * src/devices/xditview/Makefile.sub (EXTRA_LDFLAGS): Fix typo and + order of libraries. + (install_data): Add $(srcdir). + + * src/utils/xtotroff/Makefile.sub (EXTRA_LDFLAGS): Fix order of + libraries. + +2004-06-02 Werner LEMBERG + + * aclocal.m4 (GROFF_X11): s/have_no_x/groff_no_x/. + Add X11 stuff to CFLAGS, LDFLAGS, and LIBS temporarily. + Add test for Xmu library. + (GROFF_APPRESDIR_OPTION, GROFF_APPRESDIR_CHECK, + GROFF_APPRESDIR_DEFAULT): New macros. + + * configure.ac: Call GROFF_APPRESDIR_OPTION, GROFF_APPRESDIR_CHECK, + and GROFF_APPRESDIR_DEFAULT. + + * configure: Regenerated. + + * Makefile.in (appresdir): New variable. + (MDEFINES): Add appresdir. + + * src/devices/xditview/Makefile.sub (EXTRA_LDFLAGS): Add -Xmu and + -Xt. + (install_data, uninstall_sub): New targets to handle GXditview.ad. + + * src/utils/indxbib/Makefiles.ub (install_data): Depend on + `$(srcdir)/eign', not `eign'. + + * MANIFEST, INSTALL, NEWS, PROBLEMS: Updated. + + * man/groff_out.man, man/roff.man, src/devices/grops/grops.man, + src/devices/xditview/gxditview.man, src/roff/groff/groff.man: + Protect (g)xditview with `\%' to avoid hyphenation. + Other minor formatting. + +2004-06-01 Werner LEMBERG + + Integrate gxditview into groff's standard directory hierarchy. + + * src/xditview/*: Moved to ... + * src/devices/xditview/*: Here. + Moved DviChar.h and XFontName.h to src/include. + Moved DviChar.c and XFontName.c to new directory src/libs/libxutil. + Split off `xmalloc' into new file src/libs/libxutil/xmalloc.c. + Moved xtotroff.c to new directory src/utils/xtotroff. + Provide proper Makefile.sub files (reusing the stuff from + Imakefile.in). + DESC renamed to DESC.in. + Removed GXDitview-ad.h, INSTALL, Imakefile.in. + Converted everything from K&R to ANSI C. + Decorated with const where appropriate. + Cast string constants with `String' and `char *' where appropriate. + Made it compile with C++ (used as a C compiler). + Removed other minor compiler warnings. + + * src/devices/xditview/device.c: Include config.h, string.h, and + defs.h. + Don't declare `exit', `strtok', `strchr', and `getenv'. + (FONTPATH): Remove. + + * src/devices/xditview/font.c: Don't declare `XParseFontName' and + `XFormatFontName'. + + * src/devices/xditview/xditview.c: Include config.h. + Include stdio.h earlier. + Protect declaration of `popen' and `pclose' with + NEED_DECLARATION_POPEN and NEED_DECLARATION_PCLOSE. + Replace `caddr_t' with `XtPointer'. + (MakePromptFunc): New typedef. + (DoPrint): Use RETSIGTYPE. + (promptfunction): Change type to MakePromptFunc. + (MakePrompt): Use MakePromptFunc for third argument. + (xmalloc): Removed. + + * src/devices/xditview/ad2c: Add casts to `String'. + + * src/include/XFontName.h (XFontNameString): Don't use array + notation. + Add prototypes for `XParseFontName', `XFormatFontName', + `XCompareFontName', and `XCopyFontName'. + + * src/include/Makefile.sub (HDRS): Add `DviChar.h' and + `XFontName.h'. + + * src/utils/xtotroff/xtotroff.c: Include getopt.h. + Don't declare `XParseFontName' and `XFormatFontName'. + (xmalloc): Removed. + (main): Remove `optind' and `optarg'. + + * Makefile.in (XDEVDIRS, XPROGDIRS, XLIBDIRS): New variables + (to select programs which need X). + Make XDEVIDIRS depend on `FORCE'. + (X_CFLAGS, X_LIBS, X_EXTRA_LIBS, X_PRE_LIBS): New variables (for + X support). + (MDEFINES): Updated. + (LIBDIRS): Use XLIBDIRS. + (CPROGDIRS): Use XPROGDIRS. + (DEVDIRS): Remove font directories for gxditview. + (ALLDIRS, DISTDIRS): Add XDEVDIRS. + (EXTRADIRS): Remove src/xditview. + + * Makefile.sub (DISCLEANFILES): Updated. + + * Makefile.comm (LIBXUTIL): New variable. + (.cpp.o, .cpp.obj): Handle EXTRA_CCFLAGS. + (.c.o, .c.obj, .y.o): Handle EXTRA_CFLAGS. + + * Makefile.cpg, Makefile.ccpg ($PROG): Handle EXTRA_LDFLAGS. + + * aclocal.m4 (GROFF_X11): New function. + + * configure.ac: Call GROFF_X11. + Don't create src/xditview/Imakefile. + Don't emit notice how to build gxditview. + + * configure: Regenerated. + + * test-groff.in (GROFF_BIN_PATH, XENVIRONMENT): Updated. + +2004-05-28 Akihiro Sagawa + + * Makefile.in (CPPFLAGS): Define. + (MDEFINES): Add CPPFLAGS. + +2004-05-27 Werner LEMBERG + + * arch/misc/Makefile.sub (shdeps.sed): Use $(srcdir). + +2004-05-26 Niklas Edmundsson + + Fix problems with `friend name injections'. + + * src/preproc/eqn/box.h (make_mark_box, make_lineup_box, + make_script_box), src/roff/troff/div.h (end_diversions), + src/roff/troff/env.h (title), input.cpp (process_input_stack): Undo + change 2004-04-08. + +2004-05-25 Bernd Warken + + * src/preproc/pic/pic.man, doc/pic.ms: Add example for `command'. + +2004-05-25 Werner LEMBERG + + * src/libs/libgroff/cset.cpp, src/libs/libgroff/lf.cpp, + src/libs/libgroff/color.cpp: Include lib.h. + +2004-05-25 Paul Eggert + + * PROBLEMS: Update documentation for problems with Sun C++ 5.0 + through Forte 6u1, and for how to get GNU make on Solaris. + +2004-05-24 Werner LEMBERG + + * PROBLEMS: Document problems with gcc 3.4.0 on Sun. Reported + by Paul Eggert. + +2004-05-15 Keith Marshall + + * arch/misc/Makefile.sub (shdeps.sed): Don't use `$<' in explicit + rule. + +2004-05-14 Werner LEMBERG + + * REVISION: Set to 2. + + * aclocal.m4 (GROFF_STDINT_H): Removed. + (GROFF_INTTYPES_H): Define HAVE_CC_INTTYPES_H. + + * configure.ac: Updated. + * configure, src/include/config.hin: Regenerated. + + * src/libs/libgroff/tmpname.cpp: Don't include stdint.h but + inttypes.h conditionally. + +2004-05-13 Werner LEMBERG + +Version 1.19.1 released +======================= + +2004-05-10 Stephen Gildea + + * src/preproc/refer/label.y (same_author_last_name, + same_author_name): Handle empty sort keys. + +2004-05-10 Werner LEMBERG + + * NEWS, README, TODO, PROJECTS, PROBLEMS, MANIFEST, doc/webpage.ms, + tmac/TODO: Updated. + + * tmac/doc-syms (doc-str-Lb-libposix, doc-str-Lb-libpthread, + doc-str-Lb-librt): Reset font. + (Lb): Rename `doc-str-Lb' to `doc-str-Lb1'. + Provide `doc-str-Lb' to reset font. + * tmac/groff_mdoc.man: Updated. + +2004-05-08 Jan Schaumann + + * src/preproc/html/pre-html.cpp (make_message): Make it work for + snprintf versions which don't conform to ANSI C 99 (this is, + counting the string's trailing null byte in the return value). + +2004-05-07 Keith Marshall + + * src/roff/troff/node.cpp (suppress_node::tprint): Don't expect + that all implementations of sprintf handle null pointers correctly. + +2004-05-04 Werner LEMBERG + + * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo: + Document `.U' register. + + * src/roff/troff/env.cpp (environment::mark_last_line) + [WIDOW_CONTROL]: Fix scope of `p' for new C++ compilers. + +2004-05-04 Larry Kollar + + New read-only register `.U'; it returns 1 in safer mode and 0 + otherwise. + + * src/roff/troff/input.cpp (init_input_requests): Implement `.U' + register. + +2004-05-03 Werner LEMBERG + + * install-sh, mkinstalldirs: New versions; taken from texinfo CVS. + +2004-04-17 Werner LEMBERG + + * src/include/font.h (font): Use `int' for ch_index. + * src/libs/libgroff/font.cpp (font::alloc_ch_index, + font::compact): Updated. + + * src/roff/groff/pipeline.c (run_pipeline) [_WIN32]: Fix compiler + warnings. + + * src/roff/troff/div.cpp (begin_page), src/roff/troff/env.cpp + (hyphen_word): Fix compiler warnings. + * src/roff/troff/input.cpp (get_char_for_escape_name): Return + `char'. + Update all callers. + (get_delim_number, get_line_arg): Change second argument type to + `unsigned char'. + (macro_header::copy, token::next, do_define_string, + do_define_character, substring_request, asciify_macro, + unformat_macro, read_size, non_interpreted_node::interpret, + while_request, main: Fix compiler warnings. + (read_color_draw_node): Initialize `col'. + + * src/preproc/tbl/table.cpp (horizontal_span, table_entry): Make + `start_col' and `end_col' of type `int'. + (vertical_rule): Make `col' of type `int'. + + * src/preproc/grn/hdb.cpp (DBRead): Protect call to getc with check + for EOF. + + * src/preproc/refer/label.y (uppercase_array, lowercase_array): + New arrays. + (format_serial): Use them to remove dependency on ASCII. + + * src/devices/grops/ps.cpp (ps_printer::define_encoding): Fix + compiler warning. + * src/devices/grops/psrm.cpp (resource_manager::supply_resource): + Ditto. + + * src/devices/grotty/tty.cpp (tty_font::load_tty_font): Fix + compiler warnings. + (glyph): Change type of `hpos' to `int'. + + * src/devices/lbp/lbp.cpp (strsep): Removed. Unused. + * src/devices/lbp/lbp.h (splinerel): Fix compiler warnings. + + * src/utils/tfmtodit.cpp (gf::load): Fix compiler warnings. + + * src/utils/pfbtops/pfbtops.c (get_text): Fix compiler warning. + +2004-04-16 Werner LEMBERG + + * src/devices/grolbp/lbp.h, src/preproc/grn/gprint.h, + src/preproc/grn/hgraph.cpp, src/preproc/grn/hpoint.cpp, + src/preproc/html/pushback.cpp, src/preproc/html/pushback.h: Use + `double' instead of `float' everywhere. + * src/preproc/grn/main.cpp: Use `double' instead of `float' + everywhere. + (main): Add return value. + * src/preproc/grn/hdb.cpp: Use `double' instead of `float' + everywhere. + Update all user functions. + + * src/include/search.h, src/include/ptable.h, src/include/printer.h, + src/preproc/eqn/box.h, src/preproc/pic/object.h, + src/preproc/refer/refer.h, src/preproc/tbl/table.h, + src/preproc/tbl/table.cpp, src/roff/troff/env.h, + src/roff/troff/div.h, src/roff/troff/token.h, src/roff/troff/node.h, + src/roff/troff/input.cpp, src/roff/troff/request.h, + src/roff/troff/node.cpp: Don't mix `struct' and `class' in forward + declarations. + + * src/utils/indxbib/signal.c: Include stdlib.h. + +2004-04-14 Keith Marshall + + * tmac/s.tmac (@init, RP): Allow initialization of the PO register + before the first page. + +2004-04-14 Thomas Klausner + + * tmac/doc-common (doc-volume-as-*): Use lowercase names. + (doc-operating-system-*): Updated. + * tmac/doc-syms (doc-str-St-*): Various small fixes. + (doc-str-Lb-*): Add more library names. + +2004-04-10 Art Haas + + * src/utils/hpftodit/hpuni.cpp (hp_msl_to_unicode_list): Don't + use anonymous type. + +2004-04-09 Art Haas + + * src/utils/tfmtodit.cpp (lig_chars): Don't use anonymous type. + +2004-04-09 Keith Marshall + + * arch/misc/shdeps.sh: Generate better comment for sed script. + +2004-04-08 Art Haas + + * src/libs/libgroff/glyphuni.cpp (glyph_to_unicode_list), + src/libs/libgroff/uniglyph.cpp (unicode_to_glyph_list), + src/libs/libgroff/uniuni.cpp (unicode_decompose_list), + src/preproc/eqn/box.cpp (param_table), src/preproc/grn/hgraph.cpp + (polyfill), src/preproc/grn/main.cpp (polyfill), + src/preproc/refer/command.cpp (command_table), + src/utils/tfmtodit.cpp (lig_table): Don't use anonymous types (which + gcc 3.5 doesn't like). + +2004-04-08 Werner LEMBERG + + Removing many compiler warnings. groff should now compile with + a C++ compiler used for C files also. [Simple variable renamings + to avoid shadowing aren't logged in detail.] + + * src/devices/grodvi/dvi.cpp: Some local variable renamings. + (draw_dvi_printer::draw) ['c']: Enclose in block. + + * src/devices/grohtml/post-html.cpp: Some local variable renamings. + (page::add_line): Fix typos. + * src/devices/grohtml/html-text.cpp: Some local variable renamings. + + * src/devices/grolbp/lbp.cpp: Don't define _GNU_SOURCE. + Some local variable renamings. + * src/devices/grolbp/lbp.h: Some local variable renamings. + + * src/devices/grolj4/lj4.cpp, src/devices/grotty/tty.cpp: Some local + variable renamings. + + * src/libs/libbib/index.cpp (index_search_item_iterator::get_tag): + Remove redundant local variable declaration. + * src/libs/libbib/map.c (mapread, unmap): Don't use K&R style. + Don't use `caddr_t' but `void *'. + Enclose functions with `extern "C"' for C++. + + * src/libs/libdriver/input.cpp (remember_filename, + remember_source_filename): Use cast for string constant. + + * src/libs/libgroff/font.cpp, src/libs/libgroff/fontfile.cpp, + src/libs/libgroff/nametoindex.cpp, src/libs/libgroff/paper.cpp, + src/libs/libgroff/geometry.cpp: Some local variable renamings. + * src/libs/libgroff/iftoa.c, src/libs/libgroff/itoa.c: Don't use K&R + style. + Enclose functions with `extern "C"' for C++. + * src/libs/libgroff/quotearg.c (TRUE,FALSE): Define as macros. + (needs_quoting): Return `int'. + (quote_arg): Add proper casts to malloc and realloc. + * src/libs/libgroff/spawnvp.c: Compile code only for MS-DOS and + various MS Windows environments. + (spawnvp_wrapper): Add proper cast to malloc. + + * src/preproc/eqn/box.h: Remove redundant declarations of + `make_script_box', `make_mark_box' and `make_lineup_box'. + * src/preproc/eqn/eqn.y: Remove redundant declaration of `strsave'. + * src/preproc/eqn/script.cpp, src/preproc/eqn/pile.cpp: Some local + variable renamings. + + * src/preproc/grn/hpoint.cpp: Some local variable renamings. + * src/preproc/grn/hgraph.cpp: Some local variable renamings. + (dx, dy): Renamed functions to... + (deltax, deltay): This. + * src/preproc/grn/main.cpp: Some local variable renamings. + (deffont): Add `const'. + (initpic, conv): Use cast for string constant. + + * src/preproc/html/pre-html.cpp: Some local variable renamings. + (makeFileName, alterDeviceTo, addZ): Use cast for string constant. + (char_buffer::run_output_filter): Second argument is unused. + * src/preproc/html/pushback.cpp: Some local variable renamings. + + * src/preproc/pic/pic.y: Remove redundant declaration of `do_copy'. + * src/preproc/pic/object.cpp: Some local variable renamings. + + * src/preproc/refer/label.y (lookup_label): Remove redundant + declaration of local variable. + + * src/preproc/soelim.cpp: Remove redundant declaration of + `interpret_lf_args'. + + * src/preproc/tbl/main.cpp: Some local variable renamings. + + * src/roff/groff/groff.cpp (main): Use cast for string constant. + * src/roff/groff/pipeline.c: Enclose declarations of `error', + `c_fatal', and `i_to_a' with `extern "C"' for C++. + Don't use C++-style comments. + + * src/roff/troff/env.h: Remove redundant declaration of `title'. + * src/roff/troff/node.h, src/roff/troff/env.cpp, + src/roff/troff/div.cpp, src/roff/troff/node.cpp: Some local variable + renamings. + * src/roff/troff/div.h: Remove redundant declaration of + `end_diversions'. + * src/roff/troff/troff.h: Remove redundant declaration of + `cleanup_and_exit' + * src/roff/troff/input.cpp: Remove redundant declaration of + `handle_first_page_transition' and `process_input_stack'. + + * src/utils/hpftodit.cpp: Some local variable renamings. + + * src/utils/indxbib/signal.c: Enclose functions with `extern "C"' + for C++. + Don't define RETSIGTYPE. + * src/utils/indxbib/indxbib.cpp: Some local variable renamings. + + * src/utils/pfbtops/pfbtops.cpp: Don't use K&R style. + (error): Use `const' in argument. + (main): Remove redundant declaration of `optind'. + Move declaration of `Version_string' to top-level. + + * PROBLEMS: Document difficulties compiling signal.c if a C++ + compiler is used for C. + +2004-04-07 Werner LEMBERG + + * Makefile.sub (DISTCLEANFILES): Add `test-groff'. + +2004-04-06 Keith Marshall + + Make scripts like nroff.sh and neqn.sh portable across various + (Unix-like) shell implementations from Cygwin, MSYS, etc., which use + non-POSIX path separators. The idea is to extend those scripts to + decide at run-time (of the script) which path separator to use. + + * arch/misc/Makefile.sub: New file. + * arch/misc/shdeps.sh: New file, generating OS dependency fixups. + This script handles @GROFF_BIN_PATH_SETUP@, replacing it with + a proper definition of the variable `GROFF_RUNTIME'. + + * Makefile.in (SH_DEPS_SED_SCRIPT): New variable. + (MDEFINES): Add SH_DEPS_SED_SCRIPT. + (PROGDEPDIRS): New variable. + `FORCE' it. + (PROGDIRS): Add PROGDEPDIRS. + + * src/preproc/eqn/Makefile.sub (neqn): Call SH_DEPS_SED_SCRIPT. + Don't substitute @SEP@ and @BINDIR@. + * src/preproc/eqn/neqn.sh: Use @GROFF_BIN_PATH_SETUP@. + (PATH): Use GROFF_RUNTIME. + + * src/roff/nroff/Makefile.sub (nroff): Call SH_DEPS_SED_SCRIPT. + Don't substitute @SEP@ and @BINDIR@. + * src/roff/nroff/nroff.sh: Use @GROFF_BIN_PATH_SETUP@. + (PATH): Use GROFF_RUNTIME. + +2004-04-05 Keith Marshall + + * src/roff/nroff/nroff.sh: Implement work-around for sh.exe from + Cygwin which doesn't handle stderr correctly. + +2004-03-08 Werner LEMBERG + + * Makefile.comm (install_dev, uninstall_dev): Protect `for' loops + against empty argument. Problem reported by . + +2004-03-05 Keith Marshall + + * Makefile.in (SEP): Replaced with... + (RT_SEP, SH_SEP): Separators for the target platform's native path + separator and the build environment, respectively. + (fontpath, tmacpath): Use RT_SEP. + (MDEFINES): Updated. + + * contrib/mom/Makefile.sub (GROFF_BIN_PATH): Use SH_SEP. + * doc/Makefile.sub (GROFF_BIN_PATH): Use SH_SEP. + * src/preproc/eqn/Makefile.sub (neqn): Use SH_SEP. + * src/roff/nroff/Makefile.sub (nroff): Use SH_SEP. + +2004-03-05 Werner LEMBERG + + * fonts/devlj4/Makefile.sub (LJ4RES): Set to 1200. This helps to + reduce alignment problems with newer printers which use built-in + TrueType fonts (instead of the older Intellifonts). The ideal + solution is to provide a second set of groff metric files, but this + is extremely time-consuming to produce, given that HP's metric + files are very rudimentary. + +2004-03-01 Werner LEMBERG + + * src/devices/grolj4/lj4.cpp (main): Fix argument of getopt_long. + s/operand/argument/ in error message. + +2004-03-01 Keith Marshall + + * src/roff/groff/groff.cpp (main): Don't allow option -o if -Thtml + is in use. + +2004-03-01 Antti Kantee + + * tmac/s.tmac (XE): Fix error message. + +2004-02-27 Jeff Conrad + + * src/include/nonposix.h (write, dup, dup2, close) [_MSC_VER]: + New macros. + + * src/roff/groff/pipeline.c: Declare strcasecmp. + (run_pipeline) [_WIN32]: Use function name variants which don't + start with `_'. + Fix stream handling. + +2004-02-27 Keith Marshall + + * src/include/nonposix.h: Fix declaration of `system_shell_name'. + Declare `spawnvp_wrapper' and macro definitions of spawnvp only + for platforms which use the native Win32 runtime libraries. + (FLUSH_INPUT_PIPE) [_UWIN]: Provide non-empty version. + + * src/libs/libgroff/quotearg.c (QUOTE_ARG_MALLOC_ERROR, + QUOTE_ARG_REALLOC_ERROR): Fix string. + + * src/preproc/html/pre-html.cpp: Remove declaration of + `spawnvp_wrapper'. + Don't use __MINGW32__. + s/DEBUG_FILE/DEBUG_FILE_DIR/. + (DEBUG_TEXT, DEBUG_NAME, DEBUG_FILE) [DEBUGGING]: New macros. + (OUTPUT_STREAM, PS_OUTPUT_STREAM, REGION_OUTPUT_STREAM): New macros. + (char_buffer::run_output_filter) [MAY_FORK_CHILD_PROCESS]: Fix + calls to `set_redirection' and `WAIT'. + [MAY_SPAWN_ASYNCHRONOUS_CHILD]: Remove unused variable `i' and `j'. + Fix calls to `set_redirection' and `save_and_redirect'. + (char_buffer::do_html, char_buffer::do_image) [DEBUGGING]: Fix calls + to `set_redirection' and `save_and_redirect'. + (usage): Fix message. + (makeTempFiles, main): Use `DEBUG_FILE'. + +2004-02-21 Werner LEMBERG + + * src/roff/troff/troff.h (WARN_TOTAL): Fix value. + +2004-02-21 Keith Marshall + + * src/libs/libgroff/quotearg.c: New file, providing proper argument + quoting for MSVC's spawn* and exec* functions. + * src/libs/libgroff/spawnvp.c: New file, providing a wrapper around + spawnvp with proper quoting for MSVC. + + * src/libs/libgroff/assert.cpp (program_name), + src/libs/libgroff/new.cpp (program_name): Declare as `extern "C"'. + * src/libs/libgroff/Makefile.sub (OBJS, CSRCS): Updated. + + * src/roff/troff/input.cpp (program_name): Declare as `extern "C"'. + + * src/include/error.h (program_name): Declare as `extern "C"'. + * src/include/nonposix.h [__MSDOS__ ...]: Handle spawnvp. + +2004-02-21 Jeff Conrad + + * src/preproc/html/pre-html.cpp [__CYGWIN__ ...]: Declare + spawnvp_wrapper. + [MAY_SPAWN_ASYNCHRONOUS_CHILD]: Declare i and j. + +2004-02-20 Jeff Conrad + + * src/roff/groff/pipeline.c (cmd) [__MSDOS__ || ...]: New global + variable. + (sbasename) [__MSDOS__ || ...]: New function. + (system_shell_name) [__MSDOS__ || ...]: Use a different, more + generic algorithm. + (system_shell_dash_c, is_system_shell) [__MSDOS__ || ...]: Updated. + (run_pipeline) [_WIN32]: Use _XXX variants for some macros instead + of XXX. + Use STDOUT_FILENO instead of hardcoded file handle. + (signal_catcher) [__MSDOS__]: Moved to non-_WIN32 section. + +2004-02-19 Werner LEMBERG + + * src/roff/troff/div.cpp: Include nonposix.h after troff.h to + avoid warnings w.r.t. redefinition of P_tmpdir for some compilers. + +2004-02-18 Werner LEMBERG + + * font/devlj4/Makefile.sub (DEVFILES): Updated to contain all + new font and mapping files. + +2004-02-18 Jeff Conrad + Keith Marshall + + * src/include/nonposix.h (FLUSH_INPUT_PIPE): New macro to empty + an input pipe. This is needed for the MSVC compiler to make troff's + `-o' option work. + + * src/roff/troff/div.cpp: Include nonposix.h. + (cleanup_and_exit): Call FLUSH_INPUT_PIPE. + +2004-02-17 Werner LEMBERG + + * font/devlj4/generate/special.awk: New script. + * font/devlj4/generate/Makefile (S): Use special.awk. + * font/devlj4/*: Regenerated, including the following new files: + Arial (AR, AB, AI, ABI), Times New Roman (TNRR, TNRB, TNRI, TNRBI), + MS Symbol (SYMBOL), Wingdings (WINGDINGS). + * NEWS: Document new lj4 fonts and revised hpftodit. + +2004-02-17 Paco Andrés Verdú + + * src/devices/grolbp/lbp.h (vmdvarc): Fix formatting string. + +2004-01-25 Werner LEMBERG + + * src/libs/libgroff/progname.cpp: Replaced with... + * src/libs/libgroff/progname.c: New file. + * src/libs/libgroff/Makefile.sub: Updated accordingly. + +2004-01-17 Werner LEMBERG + + * font/devlj4/generate/Makefile (SYMBOL): Use 9nb28703.tfm. + +2004-01-16 Jeff Conrad + + * font/devlj4/generate/wingdings.map, + font/devlj4/generate/symbol.map: Include unnamed glyphs. + Use groff glyph names where possible. + * src/devices/grolj4/lj4_font.man: Minor updates. + +2004-01-13 Werner LEMBERG + + * tmac/www.tmac (DC): Handle TTY devices. + + * doc/webpage.ms: Document viewCVS from ffii.org. + * NEWS, README: Updated. + + * src/roff/groff/groff.man: Mention lj4_font man page. + + * font/devlj4/generate/Makefile (SYMBOLMAP, WINGDINGSMAP): New + variables. + (FONTS): Add SYMBOL and WINGDINGS. + (SYMBOL, WINGDINGS): New targets. + +2004-01-13 Jeff Conrad + + * src/devices/grolj4/lj4_font.man: New man page. + * src/devices/grolj4/Makefile.sub (MAN5): New variable. + * src/devices/grolj4.man: Mention lj4_font man page. + + * src/utils/hpftodit/hpftodit.cpp (read_map): Handle line comments. + * src/utils/hpftodit/hpftodit.man: Document it. + (CW): New macro. + Remove details about fonts (which are now in lj4_font.man). + + * font/devlj4/generate/symbol.map, + font/devlj4/generate/wingdings.map: New files. + +2004-01-12 Werner LEMBERG + + * README: Mention ffii's viewcvs access. + +2004-01-09 Werner LEMBERG + + * font/devlj4/generate/special.map: Map MSL 228 to U+221F. + +2004-01-09 Jeff Conrad + + Revert most of the change from 2004-01-03 to better control used + symbol sets. + + * src/utils/hpftodit/hpftodit.cpp (symbol_set): New structure. + (text_symbol_sets, special_symbol_sets): New arrays. + (symbol_set_table): New global variable. + (read_symbol_sets): Use search order given in the text_symbol_sets + and special_symbol_sets arrays. If command line flag -a is not + given, search both arrays. + (output_charset): Require x_height_tag only for command line flag -i. + +2004-01-06 Werner LEMBERG + + Implement string-valued registers \n[.m] and \n[.M] to return the + name of the current drawing and background color, respectively. + + * src/roff/troff/symbol.h: Moved to... + * src/include/symbol.h: Here. + Small fixes to make it work outside of the `troff' directory. + * src/roff/troff/symbol.cpp: Moved to... + * src/libs/libgroff/symbol.cpp: Here. + Small fixes to make it work outside of the `troff' directory. + + * src/include/Makefile.sub (HDRS), src/libs/libgroff/Makefile.sub + (OBJS, CCSRCS), src/roff/troff/Makefile.sub (OBJS, CCSRCS, HDRS): + Updated. + + * src/include/color.h: Include symbol.h. + (color): Add new field `nm'. + * src/libs/libgroff/color.cpp (color::color): Updated. + + * src/roff/troff/dictionary.cpp, src/roff/troff/div.cpp, + src/roff/troff/node.cpp, src/roff/troff/number.cpp, + src/roff/troff/reg.cpp: Don't include symbol.h. + + * src/roff/troff/env.cpp: Don't include symbol.h. + (environment::get_glyph_color_string, + environment_get_fill_color_string): New member functions. + (init_env_requests): Handle `.m' and `.M' registers. + * src/roff/troff/input.cpp: Don't include symbol.h. + (default_symbol): Moved to symbol.cpp/symbol.h. + (do_glyph_color, do_fill_color, define_color): Pass symbol name + to color constructor. + * src/roff/troff/env.h: Updated. + + * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo: + Document new registers. + +2004-01-05 Werner LEMBERG + + * src/roff/troff/node.cpp (space_node::get_breakpoints, + space_node::nbreaks): Protect against zero `next' field. + +2004-01-03 Jeff Conrad + + In hpftodit, use the symbol sets offered in the TFM. + + * src/utils/hpftodit/hpftodit.cpp (NO_GLYPH): New constant. + (symbol_set, text_symbol_sets, special_symbol_sets, + symbol_set_table): Removed. + (get_printcode): Removed. + (read_symbol_sets): Initialize `symbol_set' field with + `NO_SYMBOL_SET'. + Simplify code to just use the `kind' value. + (output_charset): Improve output formatting. + (dump_symbols): Simplified. + +2004-01-02 Werner LEMBERG + + * font/devlj4/generate/text.map: Add more MSL numbers. + +2004-01-02 Jeff Conrad + + * src/utils/hpftodit/hpftodit.cpp (is_decomposed): New macro. + (text_symbol_sets): Add more symbol sets. + (debug_flag): New static variable (moved from `main'). + (get_printcode, show_symset): New functions. + (main): Remove `debug_flag'. + (output_charset): Use `show_symset'. + (dump_symbols): Use `show_symset'. + Print symsets for all glyphs. + (read_map): Actually call `unicode_to_ucode_make' but this time + correctly. + +2004-01-01 Werner LEMBERG + + * font/devlj4/generate/text.map, font/devlj4/generate/special.map: + Fix placement of comments. + +2004-01-01 Jeff Conrad + + * src/utils/hpftodit/hpftodit.cpp (main): Read map file also if + option `-d' is given. + (output_charset): Improve warning messages to give more information. + (dump_symbols): Make information more precise. + (usage): Updated. + (read_map): Don't call unicode_to_ucode_name; the glyph names must + appear as-is and shouldn't be decomposed. + +2003-12-31 Werner LEMBERG + + * src/utils/hpftodit/hpftodit.cpp (dump_tags): Handle posture_tag. + * font/devlj4/generate/Makefile (IFLAG): Updated to new units. + (FONTS): Add TrueType font families Arial and Times New Roman. + (TNRR, TNRB, TNRI, TNRBI, AR, AB, AI, ABI): New targets. + * font/devlj4/generate/text.map: Fix Unicode values of `fi' and + `fl'. + +2003-12-31 Jeff Conrad + + * test-groff.in (SEP): Quote value. + * src/roff/troff/node.cpp (suppress_node::tprint): Change type of + `tem' to `char*' to avoid deallocation of a pointer to a constant + object which some compilers don't like. + +2003-12-31 Werner LEMBERG + + * font/devlj4/generate (text.map, special.map): Rewritten to work + with the new hpftodit version. + +2003-12-30 Jeff Conrad + + * src/utils/hpftodit/hpftodit.cpp (output_charset): Emit HP symbol + set and 8bit character code for all glyphs also. + +2003-12-30 Werner LEMBERG + + * src/libs/libgroff/strcasecmp.c: Updated from gnulib. + +2003-12-29 Werner LEMBERG + + More fixes for MSVC compiler. + + * doc/Makefile.sub, contrib/mom/Makefile.sub (GROFF_BIN_PATH): Use + $(SEP). + + * src/include/nonposix.h (STDIN_FILENO, STDOUT_FILENO, + STDERR_FILENO) [_MSC_VER]: Define conditionally. + (getpid) [_MSC_VER]: Remove. + Include direct.h and process.h conditionally. + + * src/roff/troff/node.cpp (suppress_node::tprint): Don't use + parentheses for a_delete. + + * src/utils/lookbib/lookbib.cpp: Include nonposix.h. + + * test-groff: Replaced with... + * test-groff.in: This new template to handle path separator + properly. + + * configure.ac: Check for direct.h and process.h. + Generate test-groff script. + * configure, src/include/config.hin: Regenerated. + +2003-12-28 Werner LEMBERG + + Add integral extension glyph. + Add new option `-x' to afmtodit to suppress use of built-in AGL. + + * font/devhtml/R.proto, font/devutf8/R.proto: Add `u23AE'. + + * font/devps/generate/textmap: Provide entry for `integralex' to + override (old) PUA value of the AGL. + * font/devps/generate/Makefile (SS): Add afmtodit option `-x'. + * font/devps/*: Regenerated. + + * src/utils/afmtodit/afmtodit.pl: Add option `-x'. + * src/utils/afmtodit/afmtodit.man, NEWS: Updated. + +2003-12-27 Werner LEMBERG + + Add forgotten `coproduct' symbol (already available for DVI). + + * font/devhtml/R.proto, font/devps/generate/textmap, + font/devps/symbolmap, font/devutf8/R.proto, man/groff_char.man, + src/libs/libgroff/uniglyph.cc, src/libs/libgroff/glyphuni.cpp: Add + U+2210 (\[coproduct]). + +2003-12-26 Jeff Conrad + + hpftodit has been extended to handle TrueType metric files and + more glyphs. See hpftodit.man for more details. + + * src/utils/hpftodit/hpftodit.cpp: Include stdio.h, string.h, + ctype.h, and unicode.h. + s/msl/charcode/ everywhere since we now handle Unicode values also. + (equal, NO, YES, MSL, SYMSET, UNICODE, UNICODE): New macros. + Use it where appropriate. + (MULTIPLIER): Replaced with... + (multiplier): New global static variable. + (scale): Updated. + (tag_type): Add more TFM tags. + (tag_name): New array. + (ENUM_TYPE, FLOAT_TYPE): Removed. + (BYTE_TYPE): New value assigned. + (ASCII_TYPE, RATIONAL_TYPE): New enumeration values. + (text_symbol_sets, special_symbol_sets): Extended to cover more + sets. + (check_type): Add return value. + (check_units): Add parameters to get ppi and upem values. + Handle TrueType TFM data. + (output_font_name): New function. + (output_charset): Add parameter to handle TFM type. + Handle TrueType TFMs also. + (em_fract): New macro. + (dump_tags): Be much more verbose and handle more tags. + (dump_ascii, dump_symbol_sets, dump_symbols): New functions. + (hp_msl_to_ucode_name, unicode_to_ucode_name, is_uname): New + functions. + (read_map): Add parameter to handle TFM type. + Handle both MSL and Unicode mappings. + (main): Add two new command line options `-a' and `-q'. + Updated to make use of new functions. + (usage): Updated. + + * src/utils/hpftodit/hpuni.cpp: New file. + + * src/utils/hpftodit/Makefile.sub, src/utils/hpftodit/hpftodit.man: + Updated. + +2003-12-25 Werner LEMBERG + + * src/include/nonposix.h (read) [_MSC_VER]: Define. + +2003-12-24 Werner LEMBERG + + * src/utils/afmtodit/afmtodit.man: Some reformulations as suggested + by Michail Vidiassov . + +2003-12-20 Werner LEMBERG + + * font/devhtml/R.proto: Add u00{47,67}_0306, u00{53,73}_0327, + and u0049_0307. + Add missing latin-2 glyphs. + * font/devutf8/R.proto: Add missing latin-2 glyphs. + + * tmac/troffrc: Load `composite.tmac' earlier. + + * tmac/dvi.tmac, tmac/ps.tmac, tmac/lbp.tmac: Add u00{47,67}_0306, + u00{53,73}_0327, and u0049_0307. + * tmac/X.tmac: Add u00{47,67}_0306. + * tmac/tty-char.tmac: Use composite glyph names for readability. + + * NEWS: Updated. + + * src/include/unicode.h: Remove `extern' keywords. + +2003-12-20 Nilgün Belma Bugüner + + * tmac/latin5.tmac: New file. + +2003-12-19 Werner LEMBERG + + Add some glyphs needed for Turkish. + + * font/devutf8/R.proto: Add u00{47,67}_0306, u00{53,73}_0327, + and u0049_0307. + + * tmac/composite.tmac: Add `,' as a synonym for `ac' accent. + * tmac/tty-char.tmac: Add representations for u00{47,67}_0306, + u00{53,73}_0327, and u0049_0307. + +2003-12-18 Werner LEMBERG + + * src/devices/grops/ps.cc (ps_output::put_float): Revert change + from 2001-10-04. + Remove trailing zeros. + +2003-12-17 Werner LEMBERG + + Make \? transparent to end-of-sentence recognition. + + * src/roff/troff/input.cc (non_interpreted_node): Add + `ends_sentence' member function. + +2003-12-16 Werner LEMBERG + + * doc/groff.texinfo: Document `dt' request correctly. + Other minor typographical improvements. + +2003-12-10 Michail Vidiassov + + * src/utils/afmtodit/Makefile.sub (afmtodit): Fix typo. + +2003-12-10 Richard Stallman + + * LICENSE: Better wording. + +2003-12-09 Werner LEMBERG + + * aclocal.m4 (GROFF_BROKEN_SPOOLER_FLAGS): Set default value to 0. + * configure, NEWS: Updated. + +2003-12-08 Werner LEMBERG + + * FDL: Updated to version 1.2 (from www.gnu.org/copyleft). + +2003-12-07 Bernd Warken + + * LICENSE: Updated. + +2003-12-07 Werner LEMBERG + + * INSTALL: Improved. + +2003-12-05 Keith Marshall + + Use path separator character of target platform for compiled-in + default paths. + + * aclocal.m4 (GROFF_TARGET_PATH_SEPARATOR): New macro. + * configure.ac: Use GROFF_TARGET_PATH_SEPARATOR. + * configure: Regenerated. + * Makefile.in (SEP): Use GROFF_PATH_SEPARATOR. + +2003-12-05 Werner LEMBERG + + * src/include/nonposix.h (PATH_SEP_CHAR): New definition. + Replace `PATH_SEP[0]' with `PATH_SEP_CHAR' everywhere. + +2003-12-04 Bernd Warken + + * LICENSE: New file. + +2003-12-03 Werner LEMBERG + + * src/utils/afmtodit/afmtodit.pl: Comment out code which handles + ligatures present in AFM files since groff currently only + understands some standard ligatures and nothing else. + +2003-12-03 Jeff Conrad + + * src/roff/groff/groff.cpp (main): Don't run the spooler if + option -v is given. + + * src/roff/groff/pipeline.c (run_pipeline) [_WIN32]: Fix error + messages. + Close stdout copy. + Don't use Unix wait flags. + +2003-12-02 Werner LEMBERG + + * src/roff/troff/glyphuni.cpp, src/roff/troff/unicode.cpp, + src/roff/troff/unicode.h, src/roff/troff/uniglyph.cpp, + src/roff/troff/uniuni.cpp: Moved to... + * src/libs/libgroff/glyphuni.cpp, src/libs/libgroff/unicode.cpp, + src/libs/libgroff/unicode.h, src/libs/libgroff/uniglyph.cpp, + src/libs/libgroff/uniuni.cpp: Here. + + * src/include/Makefile.sub.old (HDRS), + src/libs/libgroff/Makefile.sub (OBJS, CCSRCS), + src/roff/troff/Makefile.sub (HDRS, PBJS, CCSRCS): Updated. + +2003-12-01 Keith Marshall + + * src/preproc/htlp/pre-html.cpp (__tmpfile): Renamed to + `DEBUG_FILE'. + Updated all users. + +2003-12-01 Werner LEMBERG + + * groff.texinfo: Document special behaviour of `.vs 0'. + Improve documentation of `cflags' request. + * NEWS: Updated. + +2003-11-29 Werner LEMBERG + + * font/devlj4/generate/Makefile (CORONET): Use correct TFM. + * font/devlj4/CORONET: Regenerated. + +2003-11-24 Werner LEMBERG + + * src/roff/troff/env.cpp (hyphen_trie::read_patterns_file): Fix loop + if processing hyphenation patterns in traditional mode. + Improve error messages. + +2003-11-20 Werner LEMBERG + + * src/roff/troff/node.cpp (troff_output_file::put_char_width, + troff_output_file::put_char): Fix type of local variable `c'. + +2003-11-19 Werner LEMBERG + + * src/roff/groff/pipeline.c (P): Removed. Updated all function + declarations. + (i_to_a): Removed. libgroff already provides this function. + (run_pipeline) [_WIN32]: Don't use itoa but i_to_a. + +2003-11-18 Keith Marshall + + * src/roff/groff/pipeline.c (xstrsignal): Fix usage of + HAVE_DECL_SYS_LIST. + +2003-11-17 Werner LEMBERG + + * COPYING: Use correct version. + +2003-11-11 Werner LEMBERG + + LynxOS 4.0.0 doesn't declare vfprintf. + + * configure.ac: Check for vfprintf. + * configure: Regenerated. + * src/include/lib.h: Handle `NEED_DECLARATION_VFPRINTF'. + * src/include/config.hin: Regenerated. + +2003-11-10 Werner LEMBERG + + LynxOS 4.0.0 has snprintf (without declaration) but no vsnprintf. + + * configure.ac: Check for vsnprintf. + * configure: Regenerated. + * src/include/lib.h: Handle `NEED_DECLARATION_VSNPRINTF' and + `HAVE_VSNPRINTF'. + * src/include/config.hin: Regenerated. + +2003-11-09 Werner LEMBERG + + * aclocal.m4: Updated syntax to autoconf 2.59. + (GROFF_HTML_PROGRAMS): Use AC_FOREACH. + Don't check for gsos2. + (GROFF_SRCDIR, GROFF_BUILDDIR): Removed. autoconf 2.59 provides + working abs_top_srcdir and abs_top_builddir. + + * configure.ac: Updated syntax to autoconf 2.59. + Don't call GROFF_SRCDIR and GROFF_BUILDDIR. + Replace call to AC_DECL_SYS_SIGLIST with call to AC_CHECK_DECLS. + * configure: Regenerated. + + * Makefile.in, doc/Makefile.in: s/@top_srcdir@/@abs_top_srcdir@/, + s/@groff_top_builddir@/@abs_top_builddir@/. + + * src/roff/groff/pipeline.c (xstrsignal): + s/SYS_SIGLIST_DECLARED/HAVE_DECL_SYS_SIGLIST/. + +2003-11-07 Werner LEMBERG + + * src/devices/grodvi/dvi.cpp (draw_dvi_printer::draw) ['a']: Always + make start angle smaller than end angle to circumvent a bug in tpic + handling of some versions of dvipdfm (and dvipdfmx). + +2003-10-30 Werner LEMBERG + + * src/devices/grops/grops.man: Improve section on creating EPS. + +2003-10-29 Werner LEMBERG + + * contrib/pic2graph/pic2graph.sh: Fix typo (-P-letter -> + -P-pletter). + +2003-10-28 Werner LEMBERG + + * doc/groff.texinfo: Fix documentation of `.if'. + +2003-10-27 Michail Vidiassov + + * src/utils/afmtodit/afmtodit.pl: Handle unmapped characters of + the form `uniXXXX' also. + +2003-10-27 Werner LEMBERG + + * contrib/eqn2graph/eqn2graph.sh, contrib/grap2graph/grap2graph.sh, + contrib/pic2graph/pic2graph.sh: Implement secure management of + temporary files. + Pass `-P-pletter' to groff to avoid data outside of the converted + area -- some versions of `convert' (for example 5.3.8) don't check + the bounding box of the image but always use a fixed image size + (letter paper format). + * contrib/eqn2graph/eqn2graph.man, contrib/grap2graph/grap2graph.man, + contrib/pic2graph/pic2graph.man: Updated. + + * src/roff/groff/groff.man: Document $TMP and $TEMP. + +2003-10-26 Werner LEMBERG + + * src/preproc/pic/troff.cpp (troff_output::simple_circle, + troff_output::simple_ellipse, troff_output::simple_arc, + troff_output::simple_line, troff_output::simple_spline, + troff_output::simple_polygon): Insert a space before arguments. + (troff_output::set_fill): Emit `\&' before `\D'Fg...' since the + latter doesn't produce a node, so the following `.sp -1' would do + the wrong thing. + Don't emit `.sp -1' after \M. This also doesn't produce a token + (and we don't have to care about compatibility mode). + (troff_output::set_color, troff_output::reset_color): Don't emit + `.sp -1' after \M and \m. + + * src/roff/troff/input.cpp (old_have_input): New global variable. + (input_stack::get): Handle `old_have_input'. + (process_input_stack) : Call + `trapping_blank_line' depending on `old_have_input', not + `have_input'. + +2003-10-20 Keith Marshall + + * src/libs/libgroff/tmpfile.cpp [__MSDOS__, _Win32] + (WIN32_TMPDIR_ENVVAR, MSDOS_TMPDIR_ENVVAR): New macros, providing + default directory names for temporary files. + [__MSDOS__, _Win32] (temp_init::temp_init): Use them. + + * src/roff/groff/pipeline.c [__MSDOS__]: Include stdlib.h. + [__MSDOS__] (run_pipeline): Honour environment variables. + Don't use `tmpnam' but `tempnam' to work around messy + implementation. + + * README.MinGW: New file. + +2003-10-16 Werner LEMBERG + + * src/preproc/html/pre-html.cpp (write_upto_newline): Don't use + `(*t)->next' without testing validity of `*t'. + (usage): Make it more readable. + +2003-10-16 Keith Marshall + + Make html device run under both MS-DOS and Win32. + + * src/preproc/html/pre-html.cpp (MAY_FORK_CHILD_PROCESS, + MAY_SPAWN_ASYNCHRONOUS_CHILD): New macros to control whether + spawn or fork+exec has to be used, and whether parent must sleep + until the child process terminates. Used in + `char_buffer::run_output_filter'. + (copyofstdoutfd): Removed. + (char_buffer): Replace `write_file_html' and `write_file_troff' + member functions with `emit_troff_output' and `run_output_filter'. + (DEVICE_FORMAT, HTML_OUTPUT_FILTER, IMAGE_OUTPUT_FILTER): New + macros. + (replaceFd): Replaced with... + (set_redirection): New auxiliary function. + (waitForChild): Replaced with... + (save_and_redirect): New auxiliary function for. + + (char_buffer::do_html, char_buffer::do_image): Simplified, using new + functions. + +2003-10-14 Keith Marshall + + * aclocal.m4 (GROFF_SYS_NERR): Check stdlib.h also. + (GROFF_LIBC): New function. + * configure.ac: Call GROFF_LIBC. + Check for `kill'. + * configure: Regenerated. + + * src/include/lib.h: Handle __MINGW32__. + * src/include/nonposix.h [_MSC_VER]: Handle __MINGW32__. + Add macro for `pipe'. + Define P_tmpdir. + + * src/roff/groff/pipeline.c (run_pipeline): Handle `no_pipe' + correctly. + + * src/utils/indxbib/signal.c (handle_fatal_signal) [!HAVE_KILL]: + Implement. + +2003-10-13 Werner LEMBERG + + Finally fix change 2003-08-26, based on ideas from Chuck Silvers + . + + * contrib/mom/Makefile.sub: Use a stamp file in the `examples' + directory. + +2003-10-12 Werner LEMBERG + + * src/roff/groff/groff.cpp (help), src/devices/grops/ps.cpp (usage), + src/roff/troff/input.cc (usage): Updated. + + * NEWS, doc/groff.texinfo: Updated. + +2003-10-12 Peter Miller + + * src/libs/libgroff/searchpath.cpp + (search_path::open_file_cautious): New function which also handles + `-' as stdin and stdout depending on the access mode. + * src/include/searchpath.h (search_path): Updated. + + * src/devices/grops/ps.cpp (main): Handle new `-I' switch. + * src/devices/grops/ps.h: Include `searchpath.h'. + * src/devices/grops/psrm.cpp (resource_manager::supply_resource): + Open resource file with `include_search_path.open_file_cautious'. + * src/devices/grops/grops.man: Document new `-I' switch. + + * src/devices/grodvi/dvi.cpp (main), src/devices/grolbp/lbp.cpp + (main), src/devices/grolj4/lj4.cpp (main), + src/devices/grotty/tty.cpp (main): Ignore new `-I' switch. + + * src/preproc/soelim/soelim.cpp (include_list_length, include_list): + Replaced with... + (include_search_path): New global variable. + (include_path_append): Removed. + (main): Use `include_search_path.command_line_dir' to handle `-I'. + (do_file): Simplify, using new + `include_search_path.open_file_cautious'. + + * src/roff/groff/groff.cpp (print_commands): Accept file handle as + parameter. + (main): Pass arguments to `-I' to both troff and devices. + Improve handling of `-V'. + * src/roff/groff/groff.man: Document changes to -I and -V. + + * src/roff/troff/input.cpp (include_search_path): New global + variable. + (next_file, source, ps_bbox_request, transparent_file, + process_input_file): Use new + `include_search_path.open_file_cautious'. + (main) Handle `-I' switch. + * src/roff/troff/node.cpp (troff_output_file::really_copy_file): + Use new `include_search_path.open_file_cautious'. + * src/roff/troff/node.h: New extern symbol `include_search_path'. + * src/roff/troff/troff.man: Document new `-I' switch. + +2003-09-15 Ruslan Ermilov + + Support multiple calls of .Lb in LIBRARY section. + + * tmac/doc-common (doc-in-library-section): New register. + (doc-section-library): New string. + (Sh): Set `doc-in-library-section'. + (Rd): Updated. + * tmac/doc-syms (Lb): Insert breaks before and after arguments + if in LIBRARY section. + * tmac/doc.tmac (doc-save-global-vars): Updated. + * NEWS, tmac/groff_mdoc.man: Updated. + +2003-09-14 Ruslan Ermilov + + * tmac/doc-common (doc-default-operating-system): New variable. + (Os): Use it. + +2003-09-08 Werner LEMBERG + + * tmac/doc.tmac (doc-reset-reference): Handle data for `%I' also. + +2003-08-31 Werner LEMBERG + + * contrib/mom/Makefile.sub: Fix last change to make it really work. + * Makefile.comm: Use `test ... ||' in favor of `if test ...; then'. + (install_dev, uninstall_dev): Check whether $(DEVSCRIPTS) and + $(DEVFILES) are not empty. + * Makefile.in: Use `test ... ||' in favor of `if test ...; then'. + +2003-08-26 Chuck Silvers + + * contrib/mom/Makefile.sub (prepare_make_examples): Make it work + with parallel runs of `make'. + +2003-08-23 Stephen Gildea + + * src/preproc/ref/ref.cpp (reference::compute_sort_key): Always + insert SORT_SEP. With certain combinations of sort specifications, + refer sorted entries in the wrong order. In particular, entries + with a missing field should be be sorted before all entries that + have that field, before refer looks to the next field. + +2003-08-23 Werner LEMBERG + + * src/utils/pfbtops/Makefile.sub (LINK.c): Define it so that the + g++ linker is used. Reported by Mark J. Reed + . + +2003-08-16 Heinz-Jürgen Oertel + + Add key character `x' to tbl which makes tbl call a user-defined + macro on a table cell. + + * src/preproc/tbl/table.h (entry_modifier): Add `macro'. + * src/preproc/tbl/table.cpp (block_entry::do_divert): Call + `set_modifier' after printing the compatibility request. + (set_modifier): Print call to `m->macro' if not empty. + * src/preproc/tbl/main.cpp (entry_format::debug_print): Handle + `macro'. + (process_format): Implement cases `x' and `X'. + * src/preproc/tbl/tbl.man, NEWS: Updated. + +2003-08-15 Werner LEMBERG + + * doc/groff.texinfo: Minor fixes. + +2003-08-09 Werner LEMBERG + + * tmac/an-old.tmac [cR]: Fix redefinition of `bp'. + +2003-08-07 Werner LEMBERG + + * doc/Makefile.sub: Not all shells expand wildcards in the `for' + argument list to nothing if there is no file to match. Use `ls' as + a protection, similar to autoconf. + + * Makefile.comm (install_dev, uninstall_dev): Protect `for' against + empty argument lists. + + * doc/groff.texinfo: Improve documentation how vertical spacing + and line breaks interact. + Other minor fixes. + + * tmac/www.tmac: Initialize `www-htmlimage-gap'. + +2003-08-03 Werner LEMBERG + + * NEWS, src/devices/grops/grops.man: -b16 is necessary to produce + EPS (using eps2eps or similar programs to compute the bounding box). + +2003-07-24 Werner LEMBERG + + * doc/groff.texinfo: Use the new @/ command to avoid overlong lines. + * doc/texinfo.tex: Updated from texinfo 4.6. + * README.CVS: From now on we need texinfo 4.6. + +2003-07-23 Werner LEMBERG + + Add requests `dei1' and `ami1' for completeness. + + * src/roff/troff/input.cc (calling_mode): Remove + CALLING_DISABLE_COMP. + (comp_mode): New enumeration. + (do_define_string, define_string, define_nocomp_string, + append_string, append_nocomp_string): Updated. + (do_define_macro): Add third parameter. + (define_macro, define_nocomp_macro, define_indirect_macro, + append_macro, append_nocomp_macro, append_indirect_macro): Updated. + (define_indirect_nocomp_macro, append_indirect_nocomp_macro): New + functions. + (ignore): Updated. + (init_input_requests): Add `dei1' and `ami1'. + + * tmac/trace.tmac: Handle de1 and am1. + (de): Improve tracing message. + (am): Add missing `do'. + (return): Use de1. + + * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo: + Document new requests. + +2003-07-22 Heinz-Jürgen Oertel + + Add option -G to .MPIMG to insert a gap between text and the image. + + * tmac/www.tmac (www-finish-left-po, www-finish-right-ll, + www-finish-left-ll): Updated. + (www-image-just, www-image-gap, www-htmlimage-gap): New variables. + (MPIMG): Make option -L and -R optional. + Implement option -G. + +2003-07-22 Gaius Mulley + + * src/devices/grohtml/post-html.cpp + (html_printer::do_file_components): Don't use `stdout' as lvalue + since it can be a macro. + +2003-07-22 Werner LEMBERG + + * src/libs/libgroff/strerror.c: Include errno.h to be in sync with + the corresponding test in aclocal.m4. + +2003-07-21 Werner LEMBERG + + * src/preproc/html/pre-html.cpp (TRANSPARENT): Don't use colour + names but RGB values directly. Otherwise pnmtopng depends on + an external file `rgb.txt' which maps colour names to values. + +2003-07-20 Werner LEMBERG + + * aclocal.m4 (GROFF_SYS_ERRLIST): Include stdlib.h for MinGW. + * configure, src/include/config.hin: Regenerated. + + * src/libs/libgroff/strerror.c: Include stdlib.h for MinGW. + +2003-07-19 Werner LEMBERG + + * PROBLEMS: Add solution for UTF-8 problem with hyphens. + +2003-07-18 Werner LEMBERG + + * *.man: Switch to non-compatibility mode temporarily if GNU + syntax extensions are used in the particular man page. + + * PROBLEMS: Add solutions for SGR problems. + +2003-07-17 Werner LEMBERG + + Don't ignore grotty's command line options if \X'tty: sgr ...' is + used to change the drawing scheme. + + * src/devives/grotty/tty.cpp (bold_flag_option, + underline_flag_option, italic_flag_option, reverse_flag_option, + bold_underline_mode_option): New global variables. + (update_options): New function. + (tty_printer::special): Call update_options. + (main): Don't set xxx_flag but xxx_flag_option, then call + update_options. + +2003-07-14 Werner LEMBERG + + Make grotty emit proper Unicode box drawing characters for -Tutf8. + + * src/devices/grotty/tty.cpp (START_LINE, END_LINE): New enum + values. + (hline_char, vline_char): New global variables. + (tty_printer::tty_printer): Initialize them. + (tty_printer::draw): Emit START_LINE and END_LINE flags for both + horizontal and vertical lines. + (crossings): New global array. + (tty_printer::end_page): Use it to determine the proper crossing + character for -Tutf8. + +2003-07-12 Werner LEMBERG + + * doc/Makefilesub (HTMLDOCFILESALL): New macro. + (HTMLDOCFILES): Revert to `pic.html'. + (CLEANADD, install_html, uninstall_sub): Use HTMLDOCFILESALL. + +2003-07-11 Werner LEMBERG + + * doc/pic.ms: Improve documentation of absolute coordinates. + Document absolute positioning of pictures. + + * NEWS: Add new pic capability. + +2003-07-09 Hartmut Henkel + + * src/libs/libgroff/geometry.cpp (check_output_arc_limits): + Rewritten. + +2003-07-07 Werner LEMBERG + + Implement support for dashed and dotted ellipses in pic. Based on + a patch from Hartmut Henkel . + + * src/preproc/pic/common.cpp (common_output::ellipse_arc, + common_output::dashed_ellipse, common_output::dotted_ellipse): New + functions. Ellipse arcs are approximated with circle arcs. + * src/preproc/pic/common.h (common_output): Updated. + * src/preproc/pic/tex.cpp (tex_output::ellipse): Use new ellipse + functions. + * src/preproc/pic/troff.cpp (simple_output::ellipse): Ditto. + + * src/preproc/pic/TODO, src/preproc/pic/pic.man: Updated. + +2003-07-06 Werner LEMBERG + + Make grotty work on platforms which have unsigned char as the + default for char. Based on a patch by Thomas Klausner + . + + * src/devices/grotty/tty.cpp (schar): New typedef. + Updated calls to declare_ptable and implement_ptable. + (glyph): Use schar for back_color_idx and fore_color_idx. + (tty_printer): Use schar for curr_fore_idx and curr_back_idx. + (tty_printer::tty_color, tty_printer::tty_printer, + tty_printer::color_to_idx, tty_printer::put_color): Updated. + +2003-07-06 Ruslan Ermilov + + * src/roff/nroff/nroff.sh: Add option -d for completeness. + * src/roff/nroff/nroff.man: Updated. + +2003-07-05 Werner LEMBERG + + * NEWS, tmac/groff_www.man: Updated. + * doc/Makefile.sub: Updated. + +2003-07-05 Gaius Mulley + + Implement support for multiple HTML output files. + + * src/preproc/html/pre-html.cpp (scanArguments): Dummy handling for + -j command line option. + + * src/devices/grohtml/post-html.cpp (job_name, multiple_files): New + global variables. + (file): New fields `new_output_file', `require_links', + `output_file_name'. + (file::file): Updated. + (files::set_file_name, files::set_links_required, + files::are_links_required, files::is_new_output_file, + files::file_name, files::next_file_name): New functions. + (header_desc): New fields `no_of_level_one_headings', + `header_filename'. + (header_desc::header_desc): Updated. + (header_desc::write_headings): Handle multiple files. + (html_printer::write_header): Save file name in which header occurs. + (html_printer::determine_header_level): Possibly split files on + level one headings. + (html_printer::do_links, html_printer::troff_tag): Updated. + (html_printer::insert_split_file, html_printer::do_job_name, + html_printer::emit_link, html_printer::write_navigation, + html_printer::do_file_components): New functions. + (html_printer::~html_printer): Handle multiple files. + (main): Handle command line option `-j'. + + * src/devices/grohtml/grohtml.man: Updated. + + * doc/Makefile.sub (pic.html), doc/Makefile.in (pic.html): New rule + which splits file. + + * tmac/www.tmac (JOBNAME): New macro. + * tmac/s.tmac (SH-NO-TAG): New macro. + (@SH): Call SH-NO-TAG. + (@NH): Updated. + +2003-07-05 Ruslan Ermilov + + * tmac/groff_mdoc.man: Improve documentation of punctuation + characters. + +2003-07-04 Ruslan Ermilov + + * tmac/doc.tmac (Bd): Change to doc-Li-font later. + +2003-07-03 Werner LEMBERG + + * tmac/an-old.tmac [cR]: Redefine `bp' to avoid empty lines. + +2003-07-01 Ruslan Ermilov + + * tmac/doc.tmac (doc-do-func, doc-do-func-args): Don't print a comma + after `/*' and `*/'. + Fix spacing. + (Fn, Fo): Reduce indentation in synopsis. + + * tmac/doc-common (doc-check-depth): New macro. + (doc-end-macro, Sh, Ss): Use it. + (Cd): Fix behaviour in synopsis. + (In): Make it parsed and callable. + If not in the synopsis, represent the C header file enclosed in + angle brackets. + (doc-str-Rv-std-suffix, doc-str-Rv-stds-suffix, doc-str-Rv-std0): + Use minus, not hyphen. + + * tmc/groff_mdoc.man: Updated. + +2003-07-01 Werner LEMBERG + + Integrated grap2graph, contributed by Eric S. Raymond. + + * contrib/grap2graph/{Makefile.sub, grap2graph.sh, grap2graph.man}: + New files. + * Makefile.in, NEWS, MANIFEST, contrib/eqn2graph.man, + contrib/pic2graph.man, src/roff/groff/groff.man: Updated. + +2003-07-01 Colin Watson + + * src/xditview/*.c: Add prototypes, fix return types, add includes. + Based on work by Fumitoshi UKAI . + +2003-06-31 Ruslan Ermilov + + * tmac/tty-char.tmac: Provide `lb', `rb', `lk', `rk', `lt', `rt'. + +2003-06-31 Werner LEMBERG + + * doc/Makefile.sub (CLEANADD): Remove all files created by + running `make groff.{pdf,dvi}'. + + * Makefile.sub (DISTCLEANFILES): Remove all non-source files from + src/xditview also. + +2003-06-30 Werner LEMBERG + + * Makefile.in (SHELL): Define as @SHELL@. + (mkinstalldirs): Use $(SHELL). + (MDEFINES): Add $(SHELL). + * Makefile.comm (SHELL): Removed. + +2003-06-29 Werner LEMBERG + + * tmac/s.tmac (De, Ds): New aliases for .DE and .DS, respectively. + The X11 documentation files use them. + * tmac/groff_ms.man, doc/groff.texinfo: Document them. + +2003-06-15 Robert Goulding + + * tmac/e.tmac (@C): Handle .ad also. + +2003-06-12 Werner LEMBERG + + * src/preproc/tbl/tbl.man: Document formatting of text blocks. + + * src/roff/troff/input.cc (token::next) : + Assign `n' even here. It is possible to construct a node + immediately following an escape character: + + .di xx + \?\\\?a + .br + .di + .xx + +2003-06-10 Werner LEMBERG + + * README.WIN32: Removed. + * MANIFEST: Updated. + +2003-06-07 Werner LEMBERG + + * src/roff/nroff/nroff.sh: Don't emit SGR for option -u. + +2003-06-05 Werner LEMBERG + + * src/preproc/pic/pic.y : Implement workaround for bug + in Compaq C++ V6.5-033 for Compaq Tru64 UNIX V5.1A (Rev. 1885). + +2003-06-03 Werner LEMBERG + + * src/preproc/grn/hdb.cpp (DBRead): Don't close file handle; this + is done by the calling function. + +2003-05-22 Ruslan Ermilov + + * tmac/X.tmac: Fix definition of `em'. + +2003-05-22 Werner LEMBERG + + * src/roff/troff/input.cc (return_macro_request): Fix detection of + argument. + +2003-05-18 Werner LEMBERG + + * tmac/doc.tmac (doc-tag-list): Force horizontal mode after tag + to make items work which consist only of a tag. + +2003-05-17 Werner LEMBERG + + * tmac/doc.tmac (doc-tag-list): Don't use \Z to assure that spaces + aren't stretched in a tag (this can fail with unformatted boxes). + Instead, insert a break and go back one line. + +2003-05-16 Werner LEMBERG + + * src/roff/troff/input.cc (return_macro_request): If called with + argument pop macro twice. We need this to trace `return'. + + * tmac/trace.tmac: Handle `return'. + Fix typos. + + * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo: + Document. + +2003-05-15 Larry Kollar + + * tmac/groff_ms.man, doc/groff.texinfo: Improve documentation of + registers `FPS', `FVS', and `FPD'. + +2003-05-15 Werner LEMBERG + + * src/utils/pfbtops/pfbtops.c (get_text): Handle loop counter + correctly. + +2003-05-03 Ruslan Ermilov + + * tmac/groff_mdoc.man: Slight improvements. + +2003-05-03 Werner LEMBERG + + * tmac/doc-common (doc-header): Emit vertical space of 1v instead of + `doc-header-space' after header line if register `cR' is set. + +2003-05-02 Werner LEMBERG + + * TODO: Updated. + +2003-05-01 Ruslan Ermilov + + * tmac/doc-common (Nd): Use \[em]. + +2003-05-01 Werner LEMBERG + + * tmac/doc-ditroff, tmac/doc-nroff (doc-header-space, + doc-footer-space): Initialize to 0.5i. + (doc-setup-page-layout): Don't set doc-header-space and + doc-footer-space. + +2003-04-30 Werner LEMBERG + + * REVISION: Set to 1. + + * doc/pic.ms: Document possible problems with `figname'. + 2003-04-29 Werner LEMBERG +Version 1.19 released +===================== + * VERSION: Set to 1.19. * REVISION: Set to 0. * doc/groff.texinfo, doc/webpage.ms, NEWS: Updated. @@ -1720,13506 +5247,6 @@ * REVISION: Increased to 2. -Version 1.18.1 released -======================= - -2002-10-08 Werner LEMBERG - - * doc/webpage.ms, NEWS: Updated. - -2002-10-07 Werner LEMBERG - - * tmac/doc-common (Ss): Add final `.ns' (similar to `.Sh') to - suppress additional whitespace after the header. - - * tmac/doc-ditroff, tmac/doc-nroff (Am): New string to be in sync - with NetBSD. - - * src/preproc/grn/grn.man, tmac/groff_mdoc.man, NEWS: Updated. - -2002-10-07 Ruslan Ermilov - - * tmac/doc-common(doc-volume-operating-system-ateol): New flag. - (Dt): Use it to improve language localization (especially Russian - and French). - -2002-10-07 Daniel Senderowicz - - * src/preproc/grn/gprint.h (BSPLINE, BEZIER): New macros. - * src/preproc/grn/hdb.cc (DBGetType): Parse spline and bezier - drawing commands. - * src/preproc/grn/hgraph.cc (drawwig): Add parameter to control - curve type. - Call `picurve' for BSPLINE. - (HGPrintElt): Handle BSPLINE. - * src/preproc/grn/README: Document it. - -2002-10-03 Werner LEMBERG - - * src/roff/troff/node.cc (break_char_node::col): New variable. - Updated constructor. - (space_node::tprint, word_space_node::tprint): Call `fill_color' - unconditionally. - (space_node::space_node): Remove assertion. - (break_char_node::add_self): Pass color argument to space node. - * src/roff/troff/input.cc (token::add_to_node_list, token::process): - Ditto. - * src/roff/troff/env.cc (environment::do_break, - environment::add_padding): Ditto. - -2002-10-02 Werner LEMBERG - - Redesigning color support in troff. Colors are no longer - represented as separate nodes but are now part of glyph nodes and - friends. This fixes the current formatting misbehaviour due to the - changes introduced on 2002-09-20. Some extra code is necessary for - proper grotty support: Without adding color variables to - space-related nodes, the background color would be changed too late. - - * src/roff/troff/node.h, src/roff/troff/node.cc: - s/current_pagecolor/current_fill_color/. - s/current_glyphcolor/current_glyph_color/. - (glyph_color_node, fill_color_node): Removed. - (node::get_glyph_color, node::get_fill_color): New virtual member - functions. - (space_node::col): New variable. - Updated constructors of space_node and derived classes accordingly. - (hmotion_node::col): New variable. - Updated constructors of hmotion_node and space_char_hmotion_node - accordingly. - (vmotion_node::col): New variable. - Updated constructor accordingly. - (draw_node::gcol, draw_node::fcol): New variables. - Updated constructor accordingly. - (special_node::gcol, special_node::fcol): New variables. - Updated constructors accordingly. - (troff_output_file::put_char, troff_output_file::put_charwidth, - troff_output_file::draw): Set glyph and fill color. - (troff_output_file::start_special): Set glyph and fill color. - Always set current font. - (troff_output_file::fill_color, troff_output_file::glyph_color): - Don't call `do_motion'. - (glyph_node::gcol, glyph_node::fcol): New variables. - Updated constructors of glyph_node and ligature_node accordingly. - (glyph_node::get_glyph_color, glyph_node::get_fill_color): New - member functions. - (glyph_node::merge_glyph_node, - kern_pair_node::add_discretionary_hyphen, - node::add_discretionary_hyphen): Updated. - (break_char_node::merge_self): Updated. - (word_space_node::tprint, space_node::tprint, hmotion_node::tprint, - vmotion_node::tprint): Handle color. - (make_glyph_node, make_node, node::add_char): Updated. - - * src/roff/troff/env.cc (environment::space_newline, - environment::space, environment::output_line, environment::do_break, - environment::make_tab_node, environment::add_padding, title): - Updated. - (environment_switch, environment_copy): Don't add color nodes. - - * src/roff/troff/input.cc (do_glyph_color, do_fill_color): Return - nothing. - (token::next): Updated. - \m and \M now are as transparent as \s. - (process_input_stack, token::add_to_node_list, token::process, - read_draw_node): Updated. - (charinfo_to_node_list): Don't add color nodes. - - * doc/groff.texinfo: Updated. - -2002-09-27 Ruslan Ermilov - - * tmac/doc-common (ds-operating-system-FreeBSD-4.*): New version - strings. - -2002-09-27 Colin Watson - - * src/roff/troff/node.cc (bracket_node::copy): Check `list' != 0. - -2002-09-23 Werner LEMBERG - - * src/devices/grolbp/lbp.cc: Replace `300' with `font::res' where - appropriate. - (DEFAULT_LINEWIDTH_FACTOR): New macro. - (linewidth_factor): New global variable. - (lbp_printer::set_line_thickness): Fix case for size < 0, using - linewidth_factor. - (long_options): Add -w/--linewidth option. - (usage): Updated. - (main): Handle -w option to set linewidth_factor. - (lbp_printer::lbp_printer): Initialize req_linethickness, not - line_thickness. - - * src/devices/grolbp/grolbp.man, NEWS, doc/webpage.ms: Updated. - -2002-09-22 Paco Andrés Verdú - - Fixed a bug in the line thickness setting code. - - * src/devices/grolbp/lbp.cc (lbp_printer::req_linethickness): New - variable. - (lbp_printer::set_line_thickness): Pass environment as second - parameter. - Implement it actually. - (lpb_printer::set_char, lbp_printer::draw): Use `req_linethickness' - and `set_line_thickness, depending on the current font size. - -2002-09-21 Werner LEMBERG - - Some Debian patches. - - * src/roff/groff/pipeline.h (MAX_COMMANDS): Increase to 12. - * src/roff/troff/node.cc (bracket_node::copy): Initialize - `list->last'. - -2002-09-20 Werner LEMBERG - - * configure: Regenerated with autoconf 2.54. - -2002-09-20 Werner LEMBERG - - * src/roff/troff/env.h (environment): Rename cur_glyph_color to - glyph_color. - Rename cur_fill_color to fill_color. - * src/roff/troff/env.cc: Updated. - -2002-09-20 Werner LEMBERG - - * src/roff/troff/env.cc (title): Copy color status after processing - title. - * src/roff/troff/input.cc (charinfo_to_node_list): Emit glyph and - fill color nodes to reset colors properly. - - * tmac/www.tmac (DC): Fix color handling. - - * src/preproc/pic/pic.man, doc/pic.ms: Document some color issues. - * doc/groff.texinfo: Fixing documentation of `tl' request. - * doc/webpage.ms: Updated. - -2002-09-19 Werner LEMBERG - - * src/roff/troff/env.cc (environent_switch, environment_copy): - Emit glyph and fill color nodes to initialize colors properly. - -2002-09-17 Colin Watson - - * src/roff/troff/env.cc (environment::set_glyph_color, - environment::set_fill_color): Fix typo which prevented \m[] work - correctly. - -2002-09-17 Werner LEMBERG - - Add left and right italic correction to non-slanted PS fonts. This - is an experimental feature to improve image rendering of grohtml. - - * font/devps/generate/Makefile (RFLAG): New variable, set to `-i 0'. - ({T,H,C,P,N,BM,A,HN}{R,B}, ZD, S, ZDR): Use it. - * font/devps/*: All non-slanted fonts regenerated. - * NEWS: Updated. - -2002-09-16 Werner LEMBERG - - Add a site-specific font directory. - - * Makefile.in (localfontdir, legacyfontdir): New variables. - (fontpath): Use them. - (MDEFINES, uninstall_dirs): Updated. - * Makefile.comm (.man.n): Add `LOCALFONTDIR' and `LEGACYFONTDIR'. - Remove `FONTPATH' and `MACROPATH'. - - * src/roff/troff/troff.man, NEWS: Updated. - * doc/groff.texinfo (Font Directories): New section. - Other minor fixes. - - * src/devices/grodvi/grodvi.man, src/devices/grohtml/grohtml.man, - src/devices/grolbp/grolbp.man, src/devices/grolj4/grolj4.man, - src/preproc/grn/grn.man: Minor fixes. - - * src/devices/grohtml/post-html.cc (html_printer::do_tab_ts): - Remove unused variable. - -2002-09-11 Werner LEMBERG - - * doc/groff.texinfo, man/groff_font.man: Clarify argument of \N. - * man/groff_out.man: Fix documentation of 'N'. - -2002-09-09 Gaius Mulley - - * doc/Makefile.in (webpage.html): Depend on gnu.eps also. - * src/roff/troff/env.cc (indent): Emit html tag only if break_flag is - set. - * src/devices/grohtml/post-html.cc (text_glob::is_br_ni): Removed. - (text_glob::is_br, html_printer::lookahead_for_tables): Updated. - (html_printer::do_tab_ts): Call `emit_table_header' with `FALSE'. - * src/devices/grohtml/html-text.cc (html_text::start_tag) : Call `begin' with `FALSE'. - -2002-09-09 Ralph Corderoy - - * src/libs/libgroff/string.cc (string::extract): Fix position of - terminating null byte. - -2002-09-08 Werner LEMBERG - - Add global option `nospaces' to tbl so that leading and trailing - spaces in data items are ignored. - - * src/libs/libgroff/string.cc (string::remove_spaces): New member - function to remove leading and trailing spaces. - * src/include/stringclass.h: Updated. - - * src/preproc/tbl/table.h (table): Add flag `NOSPACES'. - - * src/preproc/tbl/main.cc (process_options): Handle `nospaces' - option. - Fix typo in error messages. - (process_data): Implement `nospaces' option. - * src/preproc/tbl/tbl.man, NEWS, doc/webpage.ms: Updated. - -2002-09-07 Werner LEMBERG - - * src/include/config.hin: Add `HAVE_ISATTY'. - * src/libs/libgroff/tmpfile.cc (xtmpfile_list): Drop `const' for - `fname' member. - * src/libs/libgroff/tmpname.cc: Include `time.h'. - * src/libs/libdriver/input.cc (Char): Add `operator==' and - `operator!=' for `char'. - * doc/groff.texinfo: Replace @ifnottex block for top node with - @ifhtml block. - -2002-09-06 Werner LEMBERG - - * doc/Makefile.in (.texinfo.html): Add -I switch. - * doc/groff.texinfo: Add @ifnottex block for top node to make - translation to HTML work. - -2002-09-05 Gaius Mulley - - * src/preproc/html/pre-html.cc (LETTER_LENGTH): Removed. - (get_papersize, determine_vertical_offset): Removed. - (char_buffer::do_image): Always specify letter size. - (main): Updated. - (imageList::createPage): Use -dDEVICEHEIGHTPOINTS instead of - -sPAPERSIZE. - -2002-09-05 Werner LEMBERG - - * doc/groff.texinfo, tmac/groff_man.man: Improve documentation of - default indentation. - -2002-09-04 Gaius Mulley - - * src/preproc/html/pre-html.cc (imageList::createPage): Use - -sPAPERSIZE for gs. - (generateImages): Clean up push-back buffer. - -2002-09-04 Ralph Corderoy - - * doc/groff.texinfo: Minor fixes. - -2002-08-21 Gaius Mulley - - * src/preproc/html/pre-html.cc (DEFAULT_LINE_LENGTH): New macro. - (MAX_WIDTH, A4_LENGTH, A4_OFFSET, LETTER_OFFSET): Removed. - (gsPaper): Removed. - (determine_vertical_offset): Use LETTER_LENGTH. - (createPage): Moved to ... - (imageList::createPage): This. - Call gs with -dDEVICEWIDTHPOINTS to avoid cropping. - (imageList::getMaxX): New function. - (createImage): Moved to ... - (imageList::createImage): This. - (imageList::createImages): New function. - (generateImages): Read `maxx' directly. - Updated. - (scanArguments): Don't specify `gsPaper' for `-o'. - (makeTempFiles): Call `xtmpfile' with the last argument set to - `TRUE'. - -2002-08-24 Werner LEMBERG - - * src/include/nonposix.h (mkdir, WAIT, creat) [_MSC_VER]: Define. - (WAIT, _WAIT_CHILD) [!_MSC_VER]: Define. - * src/preproc/html/pre-html.cc (waitForChild): Use WAIT. - * src/preproc/html/pushback.cc: Include nonposix.h. - * src/roff/groff/pipeline.c: Define strcasecmp and strncasecmp - conditionally. - -2002-08-23 Werner LEMBERG - - Use $(OBJEXT) for the object file extension. - - * Makefile.comm (.SUFFIXES): Add .obj. - (.cc.obj, .c.obj): New implicit rules. - * Makefile.in (OBJEXT): New variable, initialized from autoconf. - (MDEFINES): Add EXEEXT and OBJEXT. - * */Makefile.sub: s/.o/.$(OBJEXT)/. - -2002-08-22 Werner LEMBERG - - * INSTALL: Mention texinfo 4.2 as a prerequisite. - -2002-08-21 Gaius Mulley - - * src/devices/grohtml/post-html.cc (colType): Make enum global to - the file. - (html_printer::update_min_max, html_printer::add_table_end): New - methods. - (html_printer::lookahead_for_tables): Use them. - Reset page offset correctly. - (html_printer::~html_printer): Add creation of creator comment up. - -2002-08-20 Werner LEMBERG - - * tmac/an-old.tmac (T&): New dummy macro to avoid warning. - * man/groff_tmac.man: Fix typos. - * man/groff_font.man: Minor reordering. - * contrib/eqn2graph/eqn2graph.man (Tp): New macro. - * contrib/groffer/groffer.man: Fix typos. - -2002-08-18 Gaius Mulley - - Avoid endless loops while scanning for tables. - - * src/devices/grohtml/post-html.cc (list::insert): Set - ptr->right->left. - (html_printer::next_horiz_pos): Add `text_glob' argument; update - all callers. - Return immediately if that argument is NULL. - (html_printer::calc_nf): Don't test if `g' is NULL. - (html_printer::lookahead_for_tables): Use - `glyphs.move_right_get_data'. - Don't test if `g' is NULL. - -2002-08-18 Gaius Mulley - - A better fix, replacing fix 2002-08-15, for increasing SIZE. - - * src/devices/grohtml/post-html.cc (char_block): Make `buffer' - a pointer. - (char_block::char_block): Allocate `buffer'. - (char_buffer::add_string): Use it. - -2002-08-15 Werner LEMBERG - - * src/devices/grops/grops.man, src/devices/grolj4/grolj4.man, - src/devices/grodvi/grodvi.man: Document default line thickness. - -2002-08-15 Gaius Mulley - - * src/devices/grohtml/post-html.cc (char_block): Increase SIZE to - 8192. - -2002-08-14 Werner LEMBERG - - * doc/webpage.ms: Updated. - -2002-08-09 Werner LEMBERG - - * src/roff/troff/node.cc (node::add_char): Call `freeze_space' for - unbreakable space. - -2002-08-08 Aaron Campbell - - * src/preproc/pic/object.cc (object_spec::make_move): Fix typo - (&& -> &). - -2002-08-08 Werner LEMBERG - - * src/roff/troff/input.cc (read_rgb, read_cmy, read_cmyk): Call - tok.next(). - (read_gray): Ditto. - Don't push back a space but a newline onto the stack. - -2002-08-07 Gaius Mulley - - Add fonts `CI', `CB', and `CBI' to grohtml which have been omitted - inadvertently. - - * src/devices/grohtml/post-html.cc (html_printer::end_font, - html_printer::start_font): Handle them. - * src/devices/grohtml/html-text.cc (html_text::do_italic): Don't - reset bold and tt. - (html_text::do_bold): Don't reset italic and tt. - (html_text::do_tt, html_text::do_pre): Don't reset bold and italic. - * font/devhtml/DESC.proto: Add those fonts. - * font/devhtml/Makefile.sub (PROTOFONTS): Updated. - -2002-08-07 Werner LEMBERG - - * MORE.STUFF: Added gpresent. - - * tmac/trace.tmac: Show nesting level by a corresponding amount of - whitespace before printing the logging message. - -2002-07-31 Colin Watson - - * src/devices/grohtml/html-table.cc (html_table::finish_row): - Initialize `n' to zero. This fixes a segfault on ARM. - -2002-07-30 Werner LEMBERG - - * doc/grnexmpl.me: Remove calls to .st and .sc which are undefined. - -2002-07-29 Werner LEMBERG - - * src/preproc/pic/pic.y (print_arg, relative_path): Add missing - final semicolon. - -2002-07-28 Colin Watson - - * src/devices/grohtml/post-html (html_printer::troff_tag): Handle - `.ps'. - (html_printer::html_printer): Initialize `pointsize'. - -2002-07-26 Werner LEMBERG - - * doc/Makefile.sub (PROCESSEDEXAMPLEFILES): Remove gnu.eps and - gnu.png. - (CLEANNOTSRCDIRADD): Add gnu.eps and gnu.png. - (gnu.eps): Add -rle switch to pnmtops. - (distfiles): Add gnu.eps and gnu.png. - -2002-07-25 Petter Reinholdtsen - - * src/libs/libdriver/input.cc (Char): Add const to `operator=='. - Add `operator!='. - -2002-07-24 Werner LEMBERG - - * doc/Makefile.in, doc/Makefile.sub (groff_bin_path): Don't use - ' \+' but ' *' for sed. - (GROFF): Set GROFF_COMMAND_PREFIX to empty value. - -2002-07-23 Werner LEMBERG - - * doc/groff.texinfo: Document `papersize' keyword. - * NEWS, man/groff_font.man: Updated. - -2002-07-23 Colin Watson - - Extend papersize keyword to accept more than a single entry. The - first valid will be used. - - * src/libs/libgroff/font.cc (font::load_desc): Implement it. - (font::scan_papersize): Really skip final newline. - * src/preproc/html/pre-html.cc (get_papersize): Ditto. - -2002-07-23 Werner LEMBERG - - * configure.ac: Test for isatty. - * configure: Regenerated. - * src/include/posix.h: Check HAVE_ISATTY. - * src/roff/troff/input.cc [ISATTY_MISSING]: Removed. - * src/utils/lookbib/lookbib.cc: Include posix.h. - Don't declare isatty. - -2002-07-21 Werner LEMBERG - - * NEWS: Add `output' request. - - * REVISION: Increased to 1. - -Version 1.18.0 released -======================= - -2002-07-19 Gaius Mulley - - Allow internal glyph indices > 0xFF in grohtml for input characters. - - * src/devices/grohtml/post-html.cc (to_unicode): Use `unsigned int' - as parameter. - (html_printer::add_to_sbuf): Use `unsigned int' as first parameter. - Updated all callers. - (html_printer::sbuf_continuation, html_printer::overstrike): Ditto. - (html_printer): Updated. - -2002-07-19 Werner LEMBERG - - * font/devhtml/R.proto: Updated to HTML 4, adding many glyphs. - * font/devutf8/R.proto: Adding some missing glyphs. - * font/devutf8/NOTES: Updated. - - * tmac/dvi.tmac: Add more composite glyphs. - * tmac/html.tmac: Updated. - - * man/groff_char.man: Add `sum' and `product' entities. - - * NEWS: Updated. - -2002-07-18 Gaius Mulley - - Improved table, tab, and indenting support. - - * src/roff/troff/input.cc (file_iterator::suppress_newline_flag, - string_iterator::suppress_newline_flag): Removed. Updated all - function which have used it. - - * src/roff/troff/env.cc: Include `input.h'. - (environment::add_node): Accept 0 as parameter. - (environment::add_html_tag): Add `force' parameter. - Updated all callers. - (environment::add_html_tag_tabs): Ditto. - For the moment, support left-aligned tabs only. - (environment::make_html_tag): New function. - (fill, no_fill): Set .br html tag additionally. - (environment::newline): Emit `eol.ce' or `eol' tag for html. - (environment::add_html_tag_eol): Removed. - (tab_stops::distance_to_next_tab): Add variant for handling - nextpos'. - (environment::distance_to_next_tab): Ditto. - Updated all callers. - (environment::handle_tab): Handle tabs for html. - - * src/roff/troff/env.h: Updated. - - * src/roff/troff/div.cc: Updated all callers of - `environment::add_html_tag'. - - * src/devices/grohtml/html-table.cc, - src/devices/grohtml/html-table.h: New files. - - * src/devices/grohtml/html-text.cc (html_text): New members - `blank_para' and `start_space'. - (html_text::issue_tag): Don't emit TABLE_TAG. - Handle indentation for PRE_TAG and P_TAG. - (html_text::end_tag): Updated. - (html_text::table_is_void, html_text::issue_table_begin, - html_text::issue_table_end): Removed. - (html_text::do_push): Simplified. - [DEBUGGING]: Small fix. - (html_text::push_para): Add new parameter for indentation; updated - all callers. - Handle PRE_TAG. - (html_text::do_indent, html_text::do_table, html_text::done_table, - html_text::is_in_table): Removed. - (html_text::do_pre): Handle P_TAG also. - (html_text::shutdown): Handle p->indent. - (html_text::check_emit_text): Simplified. - (html_text::do_emittext): Reset `blank_para'. - (html_text::do_para): Add new parameter for indentation; updated - all callers. - (html_text::remove_indent): New function. - (html_text::do_space): Handle verbatim text properly. - (html_text::ever_emitted_text, html_text::starts_with_space, - html_text::remove_para_align): New functions. - (html_text::dump_stack_element, html_text::dump_stack): Updated. - - * src/devices/grohtml/html_text.h (HTML_TAG): Remove TABLE_TAG. - Updated. - - * src/devices/grohtml/post-html.cc: Include html-table.h. - (INDENTATION): Removed. - (text_glob): Added many `is_' functions. - Added table description `tab'. - Added `get_arg',`get_tab_args', `remember_table', and `get_table' - member functions. - (list): Add `insert' and `move_to' member functions. - (page): Add `insert_tag' member function. - (page::dump_page) [DEBUG_TABLES]: Improved. - (html_printer): Add `table' and `max_linelength' elements. - Add many `do_', `insert_', `next_horiz_pos', - `lookahead_for_tables', `shutdown_table', `calc_nf', `calc_po_in', - `remove_tabs', `remove_courier_tabs'. - (html_printer::emit_raw): Handle indentation. - (html_printer::do_center, html_printer::write_header): Updated. - (html_printer::is_courier_until_eol): Check for tag. - (html_printer::do_linelength): Handle max_linelength. - (html_printer::do_page_offset, html_printer::do_indentation): Handle - fill_on. - (html_printer::do_tempindent): Updated. - (html_printer::do_indentedparagraph): Removed. - (html_printer::do_indent): Simplified. - (html_printer::do_eol): Use `ever_emitted_text'. - (html_printer::do_flush, html_printer::do_links): Don't call - done_table. - (html_printer::do_break): Handle end_tempindent. - (html_printer::troff_tag): Get argument. - Don't handle `.ip'. - Handle `.tab-ts', `.tab-te', `.col', `tab', and `tab0' tags. - (html_printer::flush_page): Call `lookahead_for_tables'. - Don't call `done_table'. - (html_printer::add_to_sbuf): Always call do_indent. - - * src/devices/grohtml/Makefile.sub: Updated. - - * tmac/an-old.tmac (TP): Don't handle html device specially. - (an-do-tag-html): New function which will be used instead of - `an-do-tag' if html device is used. - - * tmac/html.tmac: Call .po to pass default page offset to grohtml. - - * tmac/s.tmac (@IP): Don't handle html device specially. - (@IP-html): New function which will be used instead of `@IP' if - html device is used. - - * tmac/www.tmac (HTML-NS, HTML-TAG-NS): New auxiliary macros -- this - is a hack which will eventually vanish again. - (PIMG): Handle `-C' option correctly if not html. - (HR): Use HTML-NS. - -2002-07-17 Werner LEMBERG - - * src/utils/afmtodit/afmtodit.pl: Don't use `-P-' for invoking perl. - -2002-07-14 Eric S. Raymond - - * contrib/pic2graph/pic2graph.*: Use convert(1). - * contrib/eqn2graph/eqn2graph.*: Minor fixes. - -2002-07-14 Bernd Warken - - * tmac/groff_trace.man: New file. - * tmac/Makefile.sub: Updated. - * NEWS: Updated. - -2002-07-13 Werner LEMBERG - - * src/roff/groff/groff.man: Add some cross references. - -2002-07-12 Werner LEMBERG - - * src/roff/troff/input.cc (substring_request): Add warnings for - string indices out of range. - -2002-07-11 Werner LEMBERG - - * font/devdvi/generate/ec.map: Fix typo (`(l' -> `/l'). - * font/devdvi/*EC: Regenerated. - -2002-07-10 Bernd Warken - - * man/groff_char.man: Updated and extended. - -2002-07-10 Werner LEMBERG - - * src/roff/troff/input.cc (length_macro): Renamed to... - (length_request): This. - Move call of `tok.next()' to the very end, otherwise the register - value hasn't been updated yet. - (init_input_requests): Updated. - -2002-07-09 Werner LEMBERG - - * src/roff/troff/input.cc (substring_macro): Renamed to... - (substring_request): This. - (init_input_requests): Updated. - * src/roff/troff/request.h: Updated. - -2002-07-08 Robert D. Goulding - - * src/roff/grog/grog.sh: Fix typo. - -2002-07-08 Werner LEMBERG - - * win32-diffs: Updated. - - Handle `papersize' keyword properly in DESC. - - * src/libs/libgroff/font.cc (font::scan_papersize): Fix argument - type. - Updated all callers. - * src/libs/libgroff/paper.cc: Add four more paper formats used by - grolj4. - * src/include/paper.h: Updated. - - * src/devices/grolbp/lbp.cc: Remove unnecessary semicolons. - Other minor C syntax fixes. - (papersize, paperlength, paperwidth): Renamed to `user_*'. - (lbp_printer): Add `papersize', `paperlength', and `paperwidth' - members. - (lbp_printer::lbp_printer): Pass three arguments. - Set paper dimensions properly. - (make_printer, main): Updated. - (handle_unknown_desc_command): Fix error messages. - (main): Handle papersize keyword in DESC properly. - - * src/devices/grolj4/lj4.cc (paper_size): Renamed to - `user_paper_size'. - (lbp_printer::lbp_printer): Pass an argument. - Set paper_size properly. - (handle_unknown_desc_command): Removed. - (make_printer, main): Updated. - * src/devices/grolj4/grolj4.man: Minor documentation fix. - - * man/groff_font.man, NEWS: Updated. - -2002-07-07 Werner LEMBERG - - Integrated eqn2graph, contributed by Eric S. Raymond. - - * contrib/eqn2graph/{Makefile.sub, eqn2graph.sh, eqn2graph.man}: New - files. - * Makefile.in, NEWS: Updated. - -2002-06-04 Werner LEMBERG - - Changing the substring request to make it fit better with other - string manipulation functions in other programming languages: - Index 0 is now the first character in the string, and index -1 - indicates the last character. Since this request didn't work - properly anyway in the last release, it doesn't harm too much to - change the syntax. - - * src/roff/troff/input.cc (substring_macro): Use loops to get - the real string length (ignoring COMPATIBLE_SAVE and - COMPATIBLE_RESTORE) and offsets. - Implement change described above. - - * man/groff_char.man, tmac/doc-common (doc-header), tmac/doc.tmac - (doc-do-Bd-args, doc-do-Bl-args: Changed accordingly. - - * NEWS, doc/groff.texinfo, man/groff_diff.man: Updated. - -2002-06-03 Werner LEMBERG - - Make .chop work with .de1 and friends. COMPATIBLE_SAVE and - COMPATIBLE_RESTORE are completely ignored. - - * src/roff/troff/input.cc (char_list::set, char_list::get): New - functions. - (macro): `length' field renamed to `len'. - Added new field `empty_macro' (1 if macro is empty), to be used - instead of checking `len'. - Updated all callers. - (macro::empty): Updated. - (macro::length, macro::set, macro::get): New functions. - (macro::append): Ignore COMPATIBLE_SAVE and COMPATIBLE_RESTORE. - Set `empty_macro'. - (chop_macro): Check and remove trailing COMPATIBLE_SAVE/ - COMPATIBLE_RESTORE pairs. - (asciify): Ignore COMPATIBLE_SAVE and COMPATIBLE_RESTORE. - * src/roff/troff/request.h: Updated. - - * doc/groff.texinfo: Document .chop's behaviour better. - -2002-06-02 Werner LEMBERG - - * doc/pic.ms: Fix documentation for the addition of positions. - - * tmac/doc.tmac, tmac/an-old.tmac: Need groff version 1.18. - -2002-06-29 Werner LEMBERG - - Implementation of string arguments of the form \*[foo arg1 arg2 ...] - - * src/roff/troff/input.cc (have_string_arg): New global variable. - (read_mode): New enumeration. - (read_escape_name): Use it. Update all calls. - (read_long_escape_name): Use it. Update all calls. - Set have_string_arg if appropriate. - (get_char_for_escape_name): Add parameter for handling space - character. - (interpolate_string_with_args, decode_string_args): New functions. - (get_copy, token::next): Call it if necessary. - (interpolate_string): Fix error message. - - * NEWS, doc/groff.texinfo, man/groff.man, man/groff_diff.man: - Document it. - -2002-06-24 Bernd Warken - - * man/groff_tmac.man: Updated and extended. - -2002-06-24 Werner LEMBERG - - * doc/pic.ms, src/preproc/pic/pic.man: Fix description of `:='. - -2002-06-23 Werner LEMBERG - - * doc/pic.ms: Improve documentation of composite block objects. - -2002-06-22 Werner LEMBERG - - * src/roff/troff/input.cc (init_registers): Add three registers - `seconds', `minutes', and `hours' to hold the current time. - - * NEWS, doc/groff.texinfo, man/groff.man, man/groff_diff.man: - Updated. - -2002-06-20 Werner LEMBERG - - Make \X accept both `\ ' and `\~', converting them to single space - characters. - - * src/roff/troff/token.h (token): Add TOKEN_UNSTRETCHABLE_SPACE. - (token::unstretchable_space): New inline function. - * src/roff/troff/input.cc (token::next, token::delimiter, - token::description, token::add_to_node_list, token::process): Handle - TOKEN_UNSTRETCHABLE_NODE. - (encode_char): Handle tok.stretchable_space and - tok.unstretchable_space. - - * NEWS, doc/groff.texinfo: Document it.. - -2002-06-19 Werner LEMBERG - - * src/devices/grops/ps.cc (ps_printer::special): Fix error message. - - * src/devices/grotty/tty.cc (tty_printer::special): Add `sgr' - keyword to enable/disable SGR output. - (tty_printer::change_fill_color): New function. - * NEWS, src/devices/grotty/grotty.man: Document `sgr' special. - - * src/roff/troff/input.cc (output_request): Add missing `tok.next()' - call. - -2002-06-18 Werner LEMBERG - - Add a `color' request and a `.color' register to control usage of - colours. - - * src/roff/troff/input.cc (disable_color_flag): Replaced with... - (color_flag): This (which is the inverse). - (activate_color): New function. - (main, init_input_requests): Updated. - * src/roff/troff/troff.h, src/roff/troff/node.cc - (troff_output_file::fill_color, troff_output_file::glyph_color): - Updated. - - * NEWS, doc/groff.texinfo, man/groff_diff.man, man/groff.man: - Document the changes. - -2002-06-17 Colin Watson - - Circumvent bug in autoconf 2.53 regarding top_builddir. - - * aclocal.m4 (GROFF_BUILDDIR): s/top_builddir/groff_top_builddir/. - * Makefile.in, doc/Makefile.in: - s/@top_builddir@/@groff_top_builddir@/. - * configure: Regenerated (with autoconf 2.53). - -2002-06-17 Werner LEMBERG - - * src/libs/libgroff/font.cc (font::load_desc): Fix computation of - `paperwidth' and `paperlength' for the `papersize' keyword. - -2002-06-16 P. Alejandro Lopez-Valencia - - * src/devices/grops/grops.man: Add info about Type 42 fonts. - -2002-06-15 Gaius Mulley - - * src/devices/grohtml/post-html.cc (html_printer::emit_raw, - html_printer::do_linelength, html_printer::do_pageoffset, - html_printer::do_indentation, html_printer::do_tempindent, - html_printer::do_break, html_printer::begin_page): Clear indented - text. - * tmac/html.tmac: Disable hyphenation. - -2002-06-15 Werner LEMBERG - - Don't produce HTML files if utility programs are missing. - - * Makefile.in (make_html, make_install_html): New variables. - (MDEFINES): Updated. - - * aclocal.m4 (GROFF_HTML_PROGRAMS): New function to test for HTML - utility programs. - * configure.ac: Use it. - * configure: Regenerated. - - * doc/Makefile.sub (PROCESSEDEXAMPLEFILES): Move webpage.html to... - (HTMLEXAMPLESFILES): This new variable. - (EXAMPLESIMAGEFILES): Renamed to... - (HTMLEXAMPLEIMAGEFILES): This. - (CLEANADD): Add HTMLEXAMPLEFILES. - (all): Use `make_html'. - (html): New target. - (install_data): Use `make_install_html'. - Move html stuff to... - (install_html): This new target. - (uninstall_sub): Updated. - -2002-06-14 Bernd Warken - - * src/roff/grog/Makefile.sub (grog): Renamed to... - (grog.old): This. - (grog): New rule to always install grog.sh as grog. - -2002-06-08 Bernd Warken - - * src/roff/grog/grog.pl: Fix typo. - -2002-06-07 Werner LEMBERG - - * doc/groff.texinfo: Add more info on .tr arguments. - -2002-06-05 Werner LEMBERG - - * NEWS, src/roff/grog/grog.man, doc/groff.texinfo: Updated. - - * aclocal.m4 (GROFF_MKSTEMP): Include unistd.h. - * configure: Regenerated. - -2002-06-05 Ralph Corderoy - - * src/roff/troff/symbol.cc (table_sizes): Add more values. - - * src/roff/grog/grog.pl, src/roff/grog/grog.sh: Recognize mom. - -2002-06-04 Werner LEMBERG - - * aclocal.m4 (GROFF_PAGE): Don't use `prefix' directly since it - is not initialized at the time we need it in case `--prefix' hasn't - been set. Check for `ac_default_prefix' also. - Test for `papersize' keyword also and generalize allowed whitespace. - * configure: Regenerated. - - * font/devps/Makefile.sub (DESC): Use `papersize' instead of - `paperlength'. - - * src/libs/libgroff/Makefile.sub (version, revision): Replaced - with... - (src_version, src_revision): New variables to avoid overwriting - from parent make process. - (version.cc): Updated. - - * src/preproc/html/pre-html.cc: Include paper.h and font.h. - (linebuf, linebufsize): New global variables. - (sys_fatal): Use `fatal' to abort properly. - (get_line): New function. - (get_resolution): Use it. - Improve error messages. - (get_papersize): Check `papersize' also. - Use `get_line'. - Improve error messages. - -2002-06-03 Werner LEMBERG - - * Makefile.comm (CLEANNOTSRCDIRADD): New target for files which - should be removed only if builddir is not srcdir. - (mostlyclean): Handle `CLEANNOTSRCDIRADD'. - (clean): Depend on `mostlyclean'. - (distclean): Depend on `clean'. - (realclean, extraclean): Depend on `distclean'. - (.y.cc, .y.o): Simplified. The output files are no longer written - to srcdir but to builddir. - * Makefile.in (MDEFINES): Add `version' and `revision'. - (uninstall_dirs): Fix order of directories. - * doc/Makefile.sub (version, revision): Removed. - (CLEANADD): Removed grnexmpl.g, groff, groff-*. - Added `HTMLDOCFILES'. - (CLEANNOTSRCDIRADD): New target for grnexmpl.h, groff, groff-*. - * src/preproc/eqn/Makefile.sub, src/preproc/pic/Makefile.sub, - src/preproc/refer/Makefile.sub (YTABC, YTABH): Don't use `srcdir' - as prefix. - - * doc/texinfo.tex (\authortt): New macro. - (\shortcontt): Define. - (\titlepage): Set \tt to \authortt while defining \authorfont. - (\appendixbox): New macro. - (\chapmacro, \appendixentry): Use \appendixbox to get even - indentation for letters. - (\summarycontents): Set \tt. - (\internalpagesize): Add two arguments for real paper width and - height as needed by pdfTeX. - (\letterpaper, \smallbook, \afourpaper, \afivepaper, \afourlatex): - Updated. - (\tempdima, \tempdimb): New temporary dimensions. - (\pagesizesyyy): Updated. - -2002-06-02 Werner LEMBERG - - Adding a new keyword `papersize' to the DESC file format (similar - but not completely identical to grolbp's extension). grops now has - a -p command line option to override `papersize'. Finally, grolbp - has been adapted to the new syntax. - - * src/libs/libgroff/paper.cc, src/include/paper.h: New files. It - defines and initializes the `papersizes[]' array with NUM_PAPERSIZES - elements. - * src/libs/libgroff/Makefile.sub (OBJS): Add `paper.o'. - (CCSRCS): Add `paper.cc'. - - * src/include/font.h (font): Add `papersize' element. - * src/libs/libgroff/font.cc (font::unit_scale): New helper function. - (font::scan_papersize): New function. - (font::load_desc): Use it for handling `papersize' keyword. - * src/libs/libgroff/fontfile.cc: Initialize `font::papersize'. - - * src/devices/grops/ps.cc: Include paper.h. - (user_paper_length): New global variable. - (ps_printer): Use paper length as initializer. - (make_printer): Updated. - (main): Handle new `-p' option. - * src/devices/grops/grops.man: Updated. - - * src/devices/grolbp/lbp.cc: Include paper.h. - s/papersizes/lbp_papersizes/. - (set_papersize): Use new `papersizes' array. - (handle_unknown_desc_command): Don't handle `papersize'. - (main): Use `font::scan_papersize' for handling `-p' option. - * src/devices/grolbp/grolbp.man: Updated. - - * man/groff_font.man: Document `papersize'. - * NEWS: Updated. - -2002-05-30 Werner LEMBERG - - * src/devices/grops/TODO: Updated. - * src/devices/grops/grops.man: More info on paper formats. - * man/groff_font.man: Document `paperheight' and `paperwidth'. - -2002-05-29 Werner LEMBERG - - * doc/Makefile.sub (CLEANADD): Add grnexmpl.g, groff, and groff-* - to list only if srcdir != currdir. - (distfiles): New target. - - * Makefile.in (EXTRADIRS): Add font/devlj4/generate. - (NOMAKEDIRS): New variable. - (DISTDIRS): Use it. - -2002-05-26 Werner LEMBERG - - Add .output request, similar to \! at top-level. - - * src/roff/troff/input.cc (transparent): Remove unused declaration. - (output_request): New function. - (init_input_requests): Add it. - Sorted. - * NEWS, doc/groff.texinfo, man/groff_diff.man, man/groff.man: - Document it. - - * Makefile.in (MDEFINES): Add INSTALL_INFO. - (prepare_examples): Fix typo. - * doc/groff.texinfo (@direntry): Fix it. - -2002-05-25 Werner LEMBERG - - Including the doc subdir into groff's Makefile system. - - * aclocal.m4 (GROFF_INSTALL_INFO): New function. - * configure.ac: Use it. - Generate `doc/Makefile'. - * configure: Regenerated. - - * Makefile.in (infodir, INSTALL_INFO): New variables. - (MDEFINES, uninstall_dirs): Updated. - (OTHERDIRS): Add `doc'. - * Makefile.comm (CLEANDIRADD): New variable. - (mostlyclean): Use it. - - * doc/Makefile.sub, doc/Makefile.in: New files. - * doc/Makefile: Removed. - - * NEWS, INSTALL: Updated. - -2002-05-24 Werner LEMBERG - - * doc/homepage.ms: Renamed to ... - * doc/webpage.ms: This. - Use `.NHR'. - -2002-05-23 Werner LEMBERG - - Integrating the `mom' macro package, contributed by Peter Schaffter - . - - * contrib/mom/*: New subdirectory tree. - * Makefile.in (docdir, exampledir, htmldocdir): New variables to - be used for documentation files. - (MDEFINES, uninstall_dirs): Use them. - (OTHERDIRS): Add contrib/mom. - * Makefile.comm (.man.n): Add @DOCDIR@, @EXAMPLEDIR@, and - @HTMLDOCDIR@. - * MANIFEST, NEWS: Updated. - -2002-05-22 Gaius Mulley - - Change syntax of \O: \O[0] suppresses output, \O[1] enables output - if at outer level; at start-up we are at outer level. - - * src/roff/troff/input.cc (do_suppress): Implement it. - Simplify \O[3]. - - Add option -p to show progress information. - pre-grohtml will now render only one page at a time, reducing the - size of needed disk resources enormously. - - * src/preproc/html/pre-html.cc (imagePageStem): Replaced with... - (imagePageName): New global variable. - (psPageName, show_progress, currentPageNo): New global variables. - (html_system): Close saved stderr and stdout handles. - (write_end_image): Accept a parameter to control \O escape. - (write_start_image): Adapted to new \O meaning. - (char_buffer::write_upto_newline): Updated. - (createAllPages): Replaced with... - (createPage): This new function to create a single page for images. - It uses `psselect' from the psutils package. - (removeAllPages): Removed. - (createImage): Updated. - Handle progress display. - (char_buffer::do_html, char_buffer::do_image) [DEBUGGING]: Removed. - (scanArguments): Add option -p. - (makeTempFiles): Updated to create temp files for psPageName and - imagePageName. - (removeTempFiles): Removed. - (main): Updated. - - * src/devices/grohtml/post-html.cc (header_desc::write_headings, - html_printer::write_header): Append `\0' to `buffer'. - (html_printer::do_eol): Depend on `current_paragraph->emitted_text'. - (main): Handle -p. - * src/devices/grohtml/html-text.cc (html_text::dump_stack_element): - Handle `text_emitted'. - (html_text::table_is_void): Slightly rewritten. - (stop): New external symbol. - (html_text::do_push) [DEBUGGING]: Use it and simplify. - (html_text::shutdown): Call `dump_stack'. - (html_text::do_space): Rewritten. - * src/devices/grohtml/grohtml.man: Document -p and the need of - `psselect'. - - * tmac/www.tmac (DC, HTML-DO-IMAGE, HTML-IMAGE-END): Updated to - new \O syntax. - Call \O[0] if `ps4html' is active. - * tmac/s.tmac (@EQ, @EN): Handle html better. - (@TS, TE): Ditto. - * tmac/html.tmac: Don't use black for background colour. - - * src/roff/troff/node.cc: Include `div.h'. - (troff_output_file::really_print_line): Don't use `is_on'. - (troff_output_file::word_marker, troff_output_file::flush_tbuf - troff_output_file::check_charinfo, - troff_output_file::put_char_width, troff_output_file::put_char, - troff_output_file::determine_line_limits, troff_output_file::draw, - real_output_file::begin_page, glyph_color_node::tprintf, - fill_color_node::tprint, hline_node::tprint, vline_node::tprint): - Use `is_on'. - (troff_output_file::really_on): Call `do_motion'. - (suppress_node::tprint): Use `get_page_number' instead of `%' - register. - Call `reset_output_registers' conditionally on `is_on'. - - * doc/groff.texinfo: Document new syntax of \O. - * NEWS, man/groff_diff.man: Updated. - -2002-05-22 Werner LEMBERG - - * MORE.STUFF: Add info about David Frey's deroff implementation. - Mention troff.org. - -2002-05-16 Werner LEMBERG - - Pic's `with' attribute now accepts positions. - - * src/preproc/pic/pic.y: Make `.', BOX, CIRCLE, ELLIPSE, ARC, LINE, - ARROW, SPLINE, and `[' left-associative tokens to fix shift/reduce - conflicts. - (object_spec): Add rule for `WITH' and `position'. - (relative_path): Give `corner' the precedence of `CHOP'. - * src/preproc/pic/object.h (path): New members `pos' and - `is_position'. - * src/preproc/pic/object.cc: Updated initializers of `path'. - (path::follow): Handle `is_position'. - - * doc/pic.ms: Completely updated grammar description. - Many typographical improvements. - -2002-05-15 Werner LEMBERG - - * src/roff/troff/env.cc(hyphen_trie::hpf_getc): Accept ^^x (char - code of x in range 0-127) also. - * doc/groff.texinfo, man/groff_diff.man: Updated. - - Added keywords `north', `south', `east', and `west' for corners - in pic. - - * src/preproc/pic/lex.cc (lookup_keyword): Add NORTH, SOUTH, EAST, - and WEST. - (yylex): Handle them. - * src/preproc/pic/pic.y: Add tokens NORTH, SOUTH, EAST, and WEST. - (corner): Handle them. - -2002-05-14 Werner LEMBERG - - * src/devices/grops/grops.man: Clarify handling of `download' file. - -2002-05-11 Werner LEMBERG - - Adding `warnscale' and `spreadwarn' requests, based on a patch from - Jeffrey Friedl . - - * src/roff/troff/input.cc (spread_limit, warn_scale, - warn_scaling_indicator): New global variables. - (warnscale_request, spreadwarn_requests): New functions. - (main): Initialize `warn_scale' and `warn_scaling_indicator'. - (init_input_requests): Updated. - (error_type): Add `OUTPUT_WARNING'. - (do_error): Handle it. - (output_warning): New warning function which shows output location. - * src/roff/troff/env.h (spread_limit): New external variable. - * src/roff/troff/env.cc (environment::choose_breakpoint): Use - `output_warning'. - (distribute_space): Emit warning if added space is larger than - `spread_limit'. - (environment::possibly_break_line): Emit warning if a line can't - be adjusted on both sides. - - * doc/groff.texinfo, man/groff_diff.man, man/groff.man: Document it. - -2002-05-08 Werner LEMBERG - - * src/roff/troff/node.cc (special_node::special_node): Use - env_definite_font(curenv) instead of curenv->get_font(). Otherwise - \X''\% crashes, for example. - - * doc/groff.texinfo: Document \! and \? used at top-level. - -2002-05-06 Werner LEMBERG - - * src/preproc/pic/pic.man: Fix some keyword syntax. - Other minor typographical fixes. - - * src/roff/groff/groff.man: Fix typos. - -2002-05-04 Werner LEMBERG - - * src/roff/groff/groff.man ([ShortOpt]): Renamed to... - (ShortOpt[]): This to avoid problems with refer. - - * doc/pic.ms: Fix typo. - Fix pic grammar description. - - * tmac/an-old.tmac (ne): Use de1, not de. - -2002-05-03 Werner LEMBERG - - * doc/groff.texinfo: Finished separation of glyphs and characters. - Don't use the string `Appendix' for appendix headers (both in - the text and the table of contents). - * man/groff_tmac.man, src/roff/troff/troff.man: Fix order of tmac - directories. - - Use registers LL and LT (similar to -ms) for controlling the - length of title and line, respectively, in the -man and -mdoc - macro packages. - - * tmac/doc-ditroff (doc-setup-page-layout), tmac/doc-nroff - (doc-setup-page-layout): Use \n[LL] and \n[LT]. - * tmac/an-old.tmac: Set \n[LL] and \n[LT] if not defined. - (TH): Use \n[LL]. - (an-header, an-p-footer): Use \n[LT]. - * NEWS, tmac/groff_man.man, tmac/groff_mdoc.man, - doc/groff.texinfo: Document it. - -2002-05-02 Werner LEMBERG - - * doc/fdl.texi: New file. - * doc/groff.texinfo: Include it. - Define and use @copying. - Starting with separating glyph, symbol, and character. - -2002-04-27 Werner LEMBERG - - * Makefile.in (EXEEXT): Set it. - * src/*/Makefile.sub (PROG): Add $(EXEEXT) for all non-script - programs. - - * src/include/nonposix.h: Define GS_NAME. - * src/preproc/html/pre-html.cc (createAllPages): Use GS_NAME. - - Some preliminary changes for EMX support under OS/2. - - * src/preproc/pic/main.cc (main), src/roff/groff/pipeline.c: Add - __EMX__ similar to __MSDOS__. - * src/utils/indxbib/indxbib.cc (main) [__EMX__]: Use `unlink'. - -2002-04-25 Werner LEMBERG - - * doc/groff.texinfo: Integrated groff_out.man. - Some macro fixes. - -2002-04-23 Werner LEMBERG - - * man/groff_out.man: Minor fixes. - -2002-04-23 Werner LEMBERG - - * doc/groff.texinfo: Moving @cindex entries after @Def* to get - correct page references. - Fixed many index entries. - -2002-04-23 Bernd Warken - - * man/roff.man: Enlarged. - -2002-04-22 Werner LEMBERG - - * doc/groff.texinfo: More examples, other fixes. - -2002-04-20 Werner LEMBERG - - * src/roff/troff/input.cc (pipe_output): Multiple calls to `pi' - will now form a chain, e.g. - - .pi foo - .pi bar - - is now the same as - - .pi foo | bar - - This is for compatibility with plan 9's troff. - - * tmac/tty.tmac: Set default tab values to 0.8i to be compatible - with UNIX troff. - * NEWS: Updated. - - * doc/groff.texinfo: Add documentation of remaining requests and - registers. - -2002-04-19 Werner LEMBERG - - * doc/groff.texinfo: Add documentation of remaining escapes. - - * font/devdvi/generate/tc.map: Remove entry for `sr'. - * font/devdvi/*TC: Regenerated. - -2002-04-18 Werner LEMBERG - - * src/roff/troff/input.cc (token::next): Make \H behave consistently - if not in compatibility mode, i.e., increment relative to the - previous height. - * doc/groff.texinfo: Updated accordingly. - -2002-04-17 Werner LEMBERG - - * doc/groff.texinfo: Document \\, \e, \E, \., and \c. - -2002-04-16 Bernd Warken - - * src/roff/groff/groff.man: Improve documentation of -P option. - Other minor fixes. - -2002-04-15 Werner LEMBERG - - Add new escape \F to switch font family. - - * src/roff/troff/input.cc (token::next): Handle \F. - * src/roff/troff/env.cc (environment::set_family): Handle - `interrupted' flag. - * NEWS, doc/groff.texinfo, man/groff_diff.man, man/groff.man: - Document it. - -2002-04-14 Werner LEMBERG - - * tmac/doc.tmac (doc-tag-list): Use \Z to avoid stretching of - spaces in tags. - -2002-04-13 Werner LEMBERG - - Implement \f[] as an alternative to \fP. Change \mP and \MP to - \m[] and \M[], respectively. - - * src/roff/troff/symbol.cc (EMPTY_SYMBOL): New global variable. - (symbol::symbol): Handle NULL string and empty string differently. - * src/roff/troff/symbol.h (symbol::is_empty): New inline function. - * src/roff/troff/input.cc (read_escape_name, read_long_escape_name): - Add optional parameter. - Updated calling functions. - (get_copy, do_glyph_color, do_fill_color, token::next): Use - `symbol::is_empty'. - * src/roff/troff/env.cc (environment::set_font): Ditto. - - * src/preproc/pic/troff.cc (troff_output::set_fill, - troff_output::reset_color: Updated. - - * tmac/www.tmac: Updated. - - * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo, - doc/homepage.ms, src/devices/grotty/grotty.man, tmac/groff_www.man: - Updated. - - * tmac/Xps.tmac: Remove some redundant code. - - * tmac/doc-common, tmac/doc-ditroff, tmac/doc-nroff, tmac/doc.tmac, - tmac/dvi.tmac, contrib/groffer/groffer.man, man/roff.man, - man/groff_out.man, man/groff.man, man/groff_diff.man, - src/roff/groff/groff.man: Replace \f[P] with \f[]. - -2002-04-13 Bernd Warken - - * src/include/printer.h, src/libs/libdriver/printer.cc - (printer::change_fill_color): New member function. - * src/libs/libdriver/input.cc (parse_D_command): Use it. - -2002-04-12 Werner LEMBERG - - * doc/groff.texinfo: Completed pass on gtroff reference. - -2002-04-11 Werner LEMBERG - - * doc/groff.texinfo: More fixes. - -2002-04-11 Bernd Warken - - * src/include/color.h: Decorate with `const'. - Use `size_t'. - Include `stddef.h'. - * src/libs/libgroff.color.cc: Decorate with `const'. - Use `size_t'. - (color::color): Initialize members. - * src/libs/libdriver/input.cc (parse_D_command): Handle `f' - command according to the documentation. - - * man/groff_out.man: Updated. - Minor fixes. - -2002-04-11 Gaius Mulley - - * src/preproc/html/pre-html.cc (write_start_image): Remove - redundant output. - * tmac/www.tmac (DC, HTML-DO-IMAGE): Ditto. - - * src/devices/grohtml/post-html.cc (page::add_and_encode): Using - \C'hy' caused an assertion failure. - - * src/roff/troff/env.cc (environment::environment): Initialize - `emitted_node'. - (environment::copy): Handle `ignore_next_eol' and `emitted_node'. - -2002-04-10 Werner LEMBERG - - * man/groff_diff.man, man/groff.man, NEWS, doc/groff.texinfo: - Document pvs request and .pvs register. - -2002-04-09 Werner LEMBERG - - * doc/groff.texinfo: Improve and fix documentation of diversions - and environments. - -2002-04-08 Werner LEMBERG - - * doc/groff.texinfo: Fix documentation of drawing functions. - Other minor fixes. - -2002-04-07 Werner LEMBERG - - * doc/groff.texinfo: Better documentation of double quotes as - arguments. - Other minor fixes. - -2002-04-06 Werner LEMBERG - - * man/groff_font.man: Document names of special characters better. - * doc/groff.texinfo: Minor improvements. - - * tmac/lbp.tmac: Load latin1.tmac. - * tmac/X.tmac, tmac/Xps.tmac: Load latin1.tmac or cp1047.tmac. - - * font/devX*/*: Regenerated (all chars > 0x80 removed). - -2002-04-05 Werner LEMBERG - - * tmac/tty.tmac: Don't use shc request. - * tmac/latin1.tmac, tmac/cp1047.tmac: Translate soft hyphen to `\%'. - * NEWS: Updated. - - * man/groff_diff.man: Minor fixes. - - * font/devlbp/*: Remove all `charXXX' entities. - - * src/libs/libgroff/font.cc (font::~font): Deallocate - `special_device_coding'. - (font::load): Use `new' for allocating `special_device_coding'. - * src/libs/libgroff/nametoindex.cc (character_indexer::lookup_char): - Removed unused member. - -2002-04-05 Werner LEMBERG - - * src/drivers/grops/psrm.cc (skip_possible_newline): New function. - (resource_manager::do_begin_binary, - resource_manager::do_begin_data): Use it. - - * doc/texinfo.tex: Updated to version 4.2. - - * src/roff/troff/token.h: Add TOKEN_ZERO_WIDTH_BREAK for `\:'. - (token::zero_width_break): New inline function. - * src/roff/troff/input.cc (token::next): Use it. - (token::description): Updated. - (encode_char): Ignore `\%', `\&', `\)', and `\:'. - (token::add_to_node_list, token::process): Use it. - * NEWS, doc/groff.texinfo: Updated. - - * src/preproc/eqn/over.cc (over_box::output): Fix typo. - * tmac/tty.tmac: Add missing backslash. - -2002-04-04 Tadziu Hoffmann - - * src/preproc/eqn/box.cc (set_script_size, box::top_level): Use - `.ps' register instead of `.s' to handle fractional point sizes. - * src/preproc/eqn/limit.cc (limit_box::compute_metrics, - limit_box::output): Ditto. - * src/preproc/eqn/other.cc (size_box::compute_metrics, - size_box::output): Ditto. - * src/preproc/eqn/over.cc (over_box::compute_metrics, - over_box::output): Ditto. - * src/preproc/eqn/script.cc (script_box::compute_metrics, - script_box::output): Ditto. - * src/preproc/eqn/sqrt.cc (sqrt_box::compute_metrics, - sqrt_box::output): Ditto. - -2002-04-03 Michael Selway - - * src/drivers/grops/psrm.cc (resource_manager::do_begin_binary): - Fix typo. - -2002-04-03 Werner LEMBERG - - * doc/homepage.ms: Reduce title size. - * doc/groff.texinfo: Fix documentation of .t register. - Fix handling of colon. - Fix `\' vs. `\\'. - - * src/roff/troff/input.cc (exit_troff): Emit LAST_PAGE_EJECTOR - only if page length is positive to avoid a loop. - - * tmac/an-old.tmac (ne): Increase page length to avoid problems with - tbl. - -2002-04-02 P. Alejandro Lopez-Valencia - - * src/include/nonposix.h, src/roff/groff/pipeline.c: - s/__CYGWIN32__/__CYGWIN__/. - -2002-03-28 Gaius Mulley - - * doc/gnu.xpm: New image contributed by Emily Mulley. - * doc/Makefile (gnu.eps, gnu.png): Use pnmdepth. - (homepage.html): Be dependent on gnu.eps. - * doc/homepage.ms: Updated to new image. - - * src/devices/grohtml/post-html.cc (html_printer): New member - `sbuf_prev_hpos'. - (html_printer::flush_sbuf, html_printer::set_char): Set it. - (html_printer::sbuf_continuation): Use it. - -2002-03-28 Werner LEMBERG - - * src/libs/libgroff/getopt.c: Updated to latest version. - - * tmac/README: More on hyphen.tex license. - -2002-03-26 Larry Kollar - - * doc/groff.texinfo: Add documentation of most missing requests. - -2002-03-25 Werner LEMBERG - - Add three glyphs `t+-', `tmu', and `tdi' which are textual variants - of `+-', `mu', and `di', respectively. - - * font/devascii/R.proto, font/devutf8/R.proto, - font/devlatin1/R.proto, font/devhtml/R.proto, - font/devcp1047/R.proto, font/devlpb/*: Add them. - * font/devps/generate/textmap: Ditto. - * font/devps/*: Regenerated. - * font/devlj4/generate/text.map: Add them. - * font/devlj4/*: Regenerated. - * font/devdvi/generate/tc.map: Use them. - * font/devdvi/generate/texsy.map: Add them. - * font/devdvi/*: Regenerated. - * font/devX*/*: Regenerated. - - * tmac/latin1.tmac, tmac/cp1047.tmac, tmac/tty.tmac, - tmac/tty-char.tmac: Updated. - - * NEWS, man/groff_char.man: Updated. - -2002-03-24 Werner LEMBERG - - * tmac/dvi.tmac, tmac/X.tmac, tmac/ps.tmac, tmac/html.tmac, - tmac/lj4.tmac, tmac/tty.tmac: Replace most `.char' with `.fchar'. - * tmac/ec.tmac: Remove `.rchar' calls (no longer necessary since - we use `.fchar' in dvi.tmac. - * tmac/dvi.tmac: Improve definition of \[Fo] and \[Fc]. - * tmac/Xps.tmac: Simplify some char definitions. - Add definition for \[f/]. - * man/groff_char.man: Updated for new X.tmac. - - * tmac/README: New file. - -2002-03-23 Phil Lobbes - - * Makefile.comm (.y.o): New rule for make on Solaris 2.5.1 -- the - internal .y.o rule took precendence over the .y.cc rule, compiling - the yacc files with gcc instead of g++. - -2002-03-23 Werner LEMBERG - - * tmac/dvi.tmac: Add replacement font for `CB'. - - * tmac/doc.tmac: s/request/macro/ in messages. - (doc-generic-macro): Improve error message. - * tmac/groff_mdoc.man: Minor improvements. - -2002-03-22 Werner LEMBERG - - * doc/groff.texinfo: Document possible conflict between `tr' and - `char' requests. - -2002-03-21 Werner LEMBERG - - Improve handling of hyphenation patterns. It is now possible to - use most of TeX's pattern files unmodified. To make the process - more flexible, a new request `hpfcode' has been added which - provides a character code mapping for the `hpf' request. See - comment before hpf_getc() for more details. - - * src/roff/troff/env.cc (insert_hyphenation, hpf_getc): New - functions. - (read_patterns_file): Additional parameter for exception dictionary. - Extended to recognize \pattern, \hyphenation, and \endinput. - (do_hyphenation_patterns_file): Updated. - * src/roff/troff/env.h (hpf_code_table): New extern. - - * src/roff/troff/input.cc (hpf_code_table): New array. - (init_hpf_code_table, hyphenation_patterns_file_code): New - functions. - (hyphenation_code): Handle translation from `trin' correctly. - (main, init_input_requests): Updated. - (charinfo::set_translation): Handle hyphenation code also. - - * src/roff/troff/charinfo.h (charinfo::get_translation_input): New - inline function. - - * src/roff/troff/env.cc (WORD_MAX): Reduced to 256 since `unsigned - char' is used for offsets in hyphenation exceptions. - - * tmac/hyphen.us: Replace with contents of unmodified `hyphen.tex'. - - * NEWS, man/groff_diff.man, man/groff.man: Document it. - -2002-03-20 Larry Kollar - - * doc/groff.texinfo: Add documentation for `hpfa' and `trin' - requests. - -2002-03-18 Werner LEMBERG - - * tmac/html.tmac: Fix serious typo. - -2002-03-17 Larry Kollar - - * doc/groff.texinfo: Add documentation for `writec' request. - -2002-03-17 Werner LEMBERG - - Added request `hpfa' to append hyphenation patterns. - - * src/roff/troff/env.cc (hyphen_trie::read_patterns_file): Add - parameter `append'. - (hyphenation_patterns_file): Renamed to... - (do_hyphenation_patterns_file): This. - (hyphenation_patterns_file, hyphenation_patterns_file_append): New - functions. - (init_hyphen_requests): Updated. - * NEWS, man/groff.man, man/groff_diff.man: Document it. - -2002-03-16 Werner LEMBERG - - Added request `writec' in analogy to `tmc'. - - * src/roff/troff/input.cc (write_request): Renamed to... - (do_write_request): This. - Added one parameter. - (write_request, write_request_continue): New functions. - (init_input_requests): Updated. - * NEWS, man/groff.man, man/groff_diff.man: Document it. - - * font/devdvi/DESC.in (sizes): Allow all sizes in the range - 5-10000pt. - * NEWS: Document it. - -2002-03-15 Werner LEMBERG - - * man/groff.man: Add writem request. - - Add request `trin' (translate input) to make `.asciify' work - correctly. This is necessary since `charXXX' entity names are no - longer hardcoded in font definition files. - - * src/roff/troff/charinfo.h (charinfo): Add `asciify_code' and - `translate_input' members. - (charinfo::set_asciify_code, charinfo::get_asciify_code, - charinfo::set_translation_input): New methods. - (charinfo::set_translation): Add third argument. - * src/roff/troff/input.cc (charinfo:set_translation): Set - `asciify_code'. - (do_translate): Add second argument. - (translate_input): New function. - (init_input_requests): Updated. - * src/roff/troff/node.cc (glyph_node::asciify, - composite_node::asciify): Use `get_asciify_code'. - - * tmac/cp1047.tmac, tmac/latin1.tmac: Use `trin'. - - * NEWS, man/groff.man, man/groff_diff.man: Updated. - -2002-03-14 Larry Kollar - - * doc/groff.texinfo: Improve documentation of .RS and .RE. - -2002-03-14 Werner LEMBERG - - Add a new request `sizes' similar to the `sizes' command in DESC - files. - - * src/roff/troff/env.cc (override_sizes): New function. - (init_env_requests): Use it. - * src/roff/troff/token.h: Export `read_string'. - * NEWS, man/groff_diff.man, man/groff.man: Document it. - -2002-03-12 Werner LEMBERG - - * doc/groff.texinfo: More fixes for texinfo 4.1 and higher. - -2002-03-10 Werner LEMBERG - - * tmac/pspic.tmac: Add support for -Tdvi. - * tmac/dvi.tmac: Include pspic.tmac. - * src/devices/grodvi/grodvi.man: Document it. - * NEWS: Updated. - - * font/devlj4/generate/Makefile: Fix URL of metric files. - -2002-03-09 Werner LEMBERG - - * PROBLEMS: The static constructor bug has been fixed in z/OS V1R3. - -2002-03-09 Larry Kollar - - * tmac/groff_ms.man: Add documentation for RS and RE macros. - -2002-03-08 Werner LEMBERG - - * doc/groff.texinfo: Fixes for texinfo 4.1. - -2002-03-07 Werner LEMBERG - - * src/include/lib.h: Include getopt.h if groff-getopt.h can't be - included. - Handle CYGWIN properly. - -2002-03-07 Paco Andrés Verdú - - * font/devlbp/Makefile.sub (DEVFILES): Add some missing fonts. - * tmac/lbp.tmac: Add some font translations. - -2002-03-02 Werner LEMBERG - - * font/devcp1047/R.proto, font/devlatin1/R.proto, - font/devhtml/R.proto: Remove `charXXX' entries. - * tmac/tty.tmac, tmac/html.tmac: Load latin1.tmac or cp1047.tmac - where appropriate. - - * font/devlj4/generate/text.map: Remove `charXXX' entries. - * font/devlj4/*: Regenerated all font definition files. - * tmac/lj4.tmac: Load latin1.tmac. - - * src/utils/hpftodit/hpftodit.cc (do_file): Partially undo change - from 2000-06-17: LJ4 metric files are *not* text files. - - * tmac/troffrc, tmac/dvi.tmac, tmac/ps.tmac: Don't use .T string - register to test for EBCDIC. - -2002-03-01 Werner LEMBERG - - * src/utils/afmtodit/afmtodit.pl: Skip comment lines in encoding - files (as grops already does). - * src/utils/afmtodit/afmtodit.man: Document comment lines in map - files. - * src/devices/grops/grops.man: Document comment lines in encoding - files. - - * tmac/cp1047.tmac: New file. - * tmac/dvi.tmac, tmac/tty-char.tmac: Use it. - * tmac/ps.tmac: Load latin1.tmac or cp1047.tmac. - * tmac/Makefile.sub (NORMALFILES): Updated. - - * tmac/ec.tmac: Don't load latin1.tmac again. - - * font/devps/generate/lgreekmap, font/devps/generate/symbolchars, - font/devps/generate/dingbats.map, - font/devps/generate/dingbats.rmap, font/devps/text.enc, - font/devps/generate/Makefile (symbolmap): Add header comment. - * font/devps/generate/textmap: Ditto. - Remove `charXXX' entries. - * font/devps/symbolmap: Regenerated. - * font/devps/*: Regenerated all font definition files. - -2002-02-28 Werner LEMBERG - - Add color support to grodvi (for drawing colors are currently - translated to gray values). - - * src/devices/grodvi/dvi.cc (FILL_MAX): Removed. - (dvi_printer): Add `cur_color' member. - (dvi_printer::set_color): New function. - (draw_dvi_printer): Remove `fill'. - (draw_dvi_printer::fill_next): Pass environment as parameter. - Update code for new color support translated to gray. - (dvi_printer::set_char): Updated. - (dvi_printer::begin_page, dvi_printer::end_page): Handle color - changes crossing the page border. - (dvi_printer::draw): Updated. - Remove cases `f' and `F'. - * tmac/dvi.tmac: Add color definitions. - * NEWS, src/devices/grodvi/grodvi.man: Updated. - - * tmac/an-old.tmac (R): Make this a macro to emit a warning if - used incorrectly. - - * aclocal.m4 (GROFF_NEED_DECLARATION): Use test similar to recent - versions of autoconf. - * configure: Updated. - - * doc/homepage.ms: Use `.blm'. - * tmac/www.tmac (www-depth): New auxiliary variable. - (www-pop-level): Don't issue HTML tag. - (ULS, ULE, LI): Use absolute indentation. - - * src/devices/grops/ps.cc (ps_printer::begin_page, - ps_printer::end_page): Switch forth and back to default color while - starting a new page. - -2002-02-27 Werner LEMBERG - - Add EC and TC fonts to devdvi. - - * src/utils/tfmtodit/tfmtodit.man: Document patching of exbase.mf. - * font/devdvi/generate/cork.map: Renamed to... - * font/devdvi/generate/ec.map: This. - Remove entry for `aq'. - * font/devdvi/generate/tc.map: New file. - * font/devdvi/generate/Makefile (*EC, *TC): New creation rules for - EC and TC fonts. - (FONTS): Updated. - * font/devdvi/*EC, font/devdvi/*TC: New font definition files. - * font/devdvi/Makefile.sub (DEVFILES): Updated. - * tmac/ec.tmac: New file. - * tmac/Makefile.sub (NORMALFILES): Updated. - * NEWS, src/devices/grodvi/grodvi.man: Updated. - * man/groff_char.man: Check `ECFONTS' register. - - * font/devdvi/{TR,TI,TB,TBI,HR}: Fix `name' field. - -2002-02-26 Werner LEMBERG - - * font/devdvi/generate/*.map: Remove all `charXXX' entries. - * font/devdvi/generate/cork.map: Add 'y and 'Y. - * font/devdvi/*: Updated. - * tmac/dvi.tmac: Formatting. - - Add font `HBI' for the dvi output. - Add support for font families `T' and `H'. - - * font/devdvi/HBI: New file. - * font/devdvi/B: Renamed to ... - * font/devdvi/TB: This. - * font/devdvi/BI: Renamed to ... - * font/devdvi/TBI: This. - * font/devdvi/I: Renamed to ... - * font/devdvi/TI: This. - * font/devdvi/R: Renamed to ... - * font/devdvi/TR: This. - * font/devdvi/H: Renamed to ... - * font/devdvi/HR: This. - * font/devdvi/Makefile.sub (DEVFILES): Updated. - * font/devdvi/generate/Makefile (HBI): New rule. - (FONTS): Updated. - (R, I, B, BI, H): Renamed to ... - (TR, TI, TB, TBI, HR): This, respectively. - (srcdir): Fixed. - * NEWS, src/devices/grodvi/grodvi.man: Updated. - * font/devdvi/DESC.in: Don't mount R, I, B, BI, and CWI. - Add `styles' and `family' keywords. - * tmac/dvi.tmac: Alias `H' to `HR'. - Add some fspecial requests for italic fonts. - Add TR and TI as special. - Add support for `_' with font CWI. - - * src/roff/troff/number.cc (parse_expr): Add missing `break' for - operator `:'. Until now, the expression `0:1' would return 2 - instead of 1. - -2002-02-25 Werner LEMBERG - - * man/groff_char.man: Added some missing PS glyph names (from the - Adobe Glyph List). - * font/devps/generate/textmap, font/devps/symbolmap: Add - `arrowupdn'. - - * doc/groff.texinfo: Minor additions and fixes. - * man/groff_diff.man: Remove documentation of fp request. This - is already covered in the original troff manual. - Updated to be consistent with other doc files. - * NEWS: Updated. - -2002-02-24 Werner LEMBERG - - * aclocal.m4 (GROFF_EBCDIC): Don't include `font/devutf8' in - TTYDEVDIRS. - Define new variable OTHERDEVDIRS (containing `font/devlj4 - font/devlbp' if not EBCDIC). - * Makefile.in (TTYDEVDIRS): Always include `font/devutf8'. - (OTHERDEVDIRS): New variable. - (MDEFINES, DEVDIRS, ALLDIRS, DISTDIRS): Updated. - * configure: Regenerated. - - * NEWS, src/devices/grotty/grotty.man: Updated. - -2002-02-23 Werner LEMBERG - - * src/roff/troff/input.cc (do_overstrike, do_bracket, - get_line_arg): Honour input level. - - Add new symbol `mc' corresponding to U+00B5 MICRO SIGN. - - * font/*/*: Implement it in all font files. - * font/devps/generate/textmap, font/devps/generate/symbolchars, - * font/devps/symbolmap: Updated. - * font/devlj4/generate/text.map: Updated. - * font/devdvi/generate/CompileFonts (sizes): Add LaTeX sizes. - * font/devdvi/generate/texmi.map: Updated. - - * font/devutf8/R.proto: Remove all `charXXX' entries. - * font/devutf8/NOTES: Updated. - - * font/devX*/*: Regenerated with xtotroff, using fonts from XFree86 - version 4.1.0. - - * tmac/latin1.tmac, tmac/psold.tmac, tmac/tty-char.tmac: Updated. - - * NEWS, man/groff_char.man: Updated. - -2002-02-21 Phil Lobbes - - * src/include/lib.h [HAVE_SNPRINTF]: Include stdarg.h. - -2002-02-20 Ralph Corderoy - - * src/roff/grog/grog.pl: Fix computation of $refer. - -2002-02-19 Werner LEMBERG - - * src/include/lib.h [!HAVE_SNPRINTF]: Add declarations for - `snprintf' and `vsnprintf'. - - * src/include/htmlindicate.h: Renamed to... - * src/include/htmlhint.h: This. - * src/include/Makefile.sub: Updated. - * src/preproc/eqn/main.cc: Updated. - -2002-02-18 Werner LEMBERG - - * man/roff.man, man/groff_out.man, man/groff.man, - man/groff_diff.man, man/ditroff.man, src/roff/groff/groff.man, - src/roff/troff/troff.man: Updated to latest changes in www.tmac. - - * win32-diffs: Updated. - -2002-02-17 Werner LEMBERG - - * doc/Makefile (clean): Add *.eps. - (MEMACROS): Removed. - (TFLAG): New variable. - (TROFF): Use it. - Add -ww. - (GROFF): Use TFLAG, FFLAG, -U, -p, -e, -t, and -ww. - (.me.dit): Fixed. - (.ms.html, .ms.ascii, .ms.ps, homepage.html): Simplify. - - * tmac/www.tmac: Use dummy diversion while resetting and disabling - `.tl'. - * tmac/e.tmac: Inserted some more `\"' to remove warnings if used - unstripped. - * src/roff/troff/troff.man: Fix order of parameter description. - - * NEWS: Updated. - -2002-02-16 Gaius Mulley - - Simplify image handling for grohtml. - Fix

bug. - - * src/devices/grohtml/html-text.cc (DEBUGGING): Don't undefine but - comment out. - (html_text::dump_stack): Don't emit newline while debugging. - (html_text::do_push) [DEBUGGING]: Print more info. - (html_text::check_emit_text): Fix handling of

. - * src/devices/grohtml/html.h: Updated. - * src/devices/grohtml/output.cc (FPUTC, FPUTS, PUTC): New macros, - replacing `fputc', `fputs', `putc'. If DEBUGGING is defined, they - send its data to stderr also. - Update all callers. - (simple_output::space_or_newline) [DEBUGGING]: Removed. - * src/devices/grohtml/post-html.cc (html_printer::do_links, - html_printer::html_printer): Remove `DEBUGGING' conditionals. - - * src/include/html-strings.h (HTML_IMAGE_{CENTERED,LEFT,RIGHT,END}): - Removed. - * src/libs/libgroff/htmlhint.cc (is_in_graphic_start, - is_inline_image): Removed. - (html_begin_suppress, html_end_suppress): Don't take a parameter. - (graphic_start, graphic_end): Removed. - * src/include/htmlindicate.h: Updated. - * src/preproc/html/pre-html.cc (DEBUG_HTML): Removed. - (macroset_template): New global variable. - (makeFileName): Use `macroset_template'. - (write_end_image): Don't take a parameter. - Don't emit newline. - (write_start_image: Don't emit newline. - (char_buffer::write_upto_newline): Updated. - (char_buffer::skip_to_newline): Renamed to ... - (char_buffer::skip_until_newline): This. - Fix code. - (char_buffer::write_file_troff, char_buffer::write_file_html): - Simplified. - (createAllPages, createImage) [DEBUGGING]: Handle `debug' flag. - (removeAllPages): Remove `DEBUGGING' conditionals. - (addRegDef, dump_args): New functions. - (char_buffer::do_html, char_buffer::do_image): Handle - `www-image-template' command line variable. - Add more debugging code. - (addps4html): Removed. - (removeTempFiles) [DEBUGGING]: Handle `debug' flag. - - * src/preproc/eqn/main.cc: Include `ctype.h'. - (suppress_html): Removed. - (do_file): Updated. - (inline_equation): Use `html_begin_suppress' and - `html_end_suppress'. - * src/preproc/pic/troff.cc: Don't include `htmlindicate.h'. - (troff_output::start_picture, troff_output::finish_picture): - Updated. - * src/preproc/tbl/main.cc: Don't include `htmlindicate.h'. - (process_input_file): Updated. - - * src/roff/troff/div.cc (page_number): Set page number only if the - `ps4html' register isn't defined. - * src/roff/troff/input.cc (image_no): New external variable. - (do_suppress): Use it. - * src/roff/troff/node.h (suppress_node::image_id): New member. - * src/roff/troff/node.cc (image_no): Remove `static' keyword. - (suppress_node::suppress_node): Initialize `image_id' member. - (suppress_node::same): Handle `image_id' also. - (suppress_node::copy): Updated. - (last_image_id): New global variable. - (suppress_node::tprint): Use it. - - * tmac/an-old.tmac (TS, TE, EQ, EN): Use HTML-IMAGE and - HTML-IMAGE-END. - * tmac/pspic.mac (PSPIC): Fix html support. - * tmac/s.tmac (@EQ, @EN, @TS, TE, PS, PE): Ditto. - * tmac/www.tmac (www-image-template): Set up. - (HTMLINDEX): Renamed to... - (HX): This. - (BODYCOLOR): Renamed to... - (BCL): This. - (BACKGROUND): Renamed to... - (BGIMG): This. - (URL): Change order of parameters for consistency. - (MAILTO): Renamed to... - (MTO): This. - (IMAGE, PNG-IMAGE, MARGIN-PNG-IMAGE): Renamed to... - (IMG, PIMG, MPIMG): This. - (HTML-H-BEGIN, HTML-H-END): Renamed to... - (HnS, HnE): This. - (LINKS): Renamed to... - (LK): This. - (LINE): Renamed to... - (HR): This. - (NO-AUTO-RULE): Renamed to... - (NHR): This. - (HTML-TL): Renamed to... - (HTL): This. - (UL-BEGIN, UL-END): Renamed to... - (ULS, ULE): This. - (DROPCAP): Renamed to... - (DC): This. - (TS, TE, EQ, EN): Provide default definitions. - (www-make-unique-name): Updated. - (HTML-IMAGE-INLINE): Fix typo. - * tmac/groff_www.man: Updated. - - * doc/Makefile (homepage.html): Add option -r to grohtml. - Use shortened image name. - * doc/groff.texinfo: Updated info on grohtml strings and macros. - * doc/homepage.ms: Updated and extended. - -2002-02-14 Werner LEMBERG - - Don't use `CSI 39 m' and `CSI 49 m' but `CSI 0 m'. - - * src/devices/grotty/tty.cc (SGR_DEFAULT_COLOR, - SGR_BACK_DEFAULT_COLOR): Replaced with ... - (tty_printer::put_color): Use it. - (ttr_printer::end_page): Simplify. - -2002-02-13 Werner LEMBERG - - * tmac/groff_tmac.man: Moved to... - * man/groff_tmac.man: This place. - * tmac/Makefile.sub, man/Makefile.sub: Updated. - -2002-02-12 Werner LEMBERG - - * src/libs/libgroff/Makefile.sub (snprintf.o): Don't use - $(COMPILE.c) to not include groff's assert.h. - - * src/drivers/grotty/tty.cc (main): Add GROFF_NO_SGR environment - variable. - * NEWS, src/drivers/grotty/grotty.man: Document it. - -2002-02-11 Werner LEMBERG - - * src/libs/snprintf/snprintf.c: Updated to latest version - (2002-02-11). - - * src/roff/grog/grog.pl (process): Fix handling of `.['. We now - test whether there is `.]' also. - Don't check for spaces after `.['. - * src/roff/grog/grog.sh: Do the same. - -2002-02-10 Werner LEMBERG - - Illegal -> Invalid. - - * src/libs/libgroff/illegal.cc: Renamed to ... - * src/libs/libgroff/invalid.cc: This. - (illegal_char_table): Renamed to ... - (invalid_char_table): This. - * src/libs/libgroff/Makefile.sub: Updated. - * win32-diffs: Updated. - - * doc/groff.texinfo, src/devices/grops/psrm.cc (ps_get_line), - src/libs/libdriver/input.cc (fatal_command, parse_color_command, - parse_x_command), src/libs/libgroff/font.cc (text_file::next, - font::load), src/preproc/eqn/main.cc (read_line, main), - src/preproc/eqn/lex.cc (file_input::read_line), - src/preproc/pic/lex.cc (file_input::read_line, - simple_file_input::get, simple_file_input::peek), - src/preproc/pic/main.cc (top_input::get, top_input::peek), - src/preproc/pic/pic.man, src/preproc/refer/main.cc - (input_stack::push_file), src/preproc/refer/refer.cc (do_file, - do_bib), src/preproc/tbl/main.cc (table_input::get), - src/preproc/grn/grn.man, src/preproc/grn/main.cc (interpret), - src/roff/troff/input.cc (file_iterator::fill, file_iterator::peek, - do_zero_width, read_request, encode_char, ps_get_line, - transparent_file, get_char_for_escape_name, transparent_translate, - asciify, input_char_description, read_string, set_string), - src/roff/troff/env.cc (environment::add_html_tag), - src/roff/troff/troff.man, tmac/e.tmac (`@(', `(f'): Do it. - - * src/include/lib.h: Updated. - - * src/preproc/eqn/eqn.cc: Removed. - - * NEWS: Updated. - - * src/preproc/grn/hdb.cc (DBRead): Fix fscanf() fields. - -2002-02-09 Werner LEMBERG - - * doc/gnu.xpm: New image. - * doc/Makefile (DOCS): Add homepage.ps. - Add rules for converting xpm->png and xpm->eps. - Use `gnu.{xpm,eps}' as image names. - * doc/homepage.ms: Updated. - -2002-02-09 Gaius Mulley - - * tmac/www.tmac (www-error): New macro, replacing calls to `@error'. - (IMAGE): Change image position parameters to `-L', `-R', and `-C'. - Remove calls to `B1' and `B2' - (PNG-IMAGE): New macro for inclusion of images in PNG format. - (www-left-ll-trap, www-left-po-trap, www-right-ll-trap): New - auxiliary variables for MARGIN-PNG-IMAGE. - (www-finish-left-po, www-finish-right-ll, www-finish-left-ll): New - auxiliary macros for MARGIN-PNG-IMAGE. - (MARGIN-PNG-IMAGE): New macro to put an image in PNG format into - the margin. - (www-heading-no): New auxiliary variable for HTML-H-{BEGIN,END}. - (HTML-H-BEGIN, HTML-H-END): New macros to begin and end a heading. - (DROPCAP): New macro to produce dropcap characters. - (www-do-image): Renamed back to... - (HTML-DO-IMAGE): This. - Updated all callers. - - * doc/Makefile (gnubw.eps): Updated. - * doc/homepage.ms: Updated. - -2002-02-08 Werner LEMBERG - - * doc/pic.ms: Fixed typos (\(*tx -> \*(tx). - Added `linethick' to table in section `Style Variables'. - -2002-02-08 Gaius Mulley - - * src/libs/libdriver/input.cc (get_extended_arg): Fix conditional. - -2002-02-07 Werner LEMBERG - - Adding options -C (compatibility mode) and -c (grotty's old output - scheme) to nroff. - - * src/roff/nroff/nroff.sh: Implement it. - Remove `-Wall'. - * NEWS, src/roff/nroff/nroff.man: Updated. - - * PROBLEMS: Document bison 1.32 bug. - - Some fixes to make groff compile on z/OS 1.2 UNIX (was OS/390). - - * src/roff/troff/node.cc (make_tfont): Define it earlier. - * src/roff/troff/div.h: Add prototype for `end_diversions'. - * src/roff/troff/input.cc: Add prototype for `process_input_stack'. - * src/roff/troff/env.h: Add prototype for `title'. - - Adding EBCDIC support to grotty. - - * src/devices/grotty/tty.cc (CSI): New macro. - (SGR_*, tty_printer::put_color): Use it. - -2002-02-06 Werner LEMBERG - - Implementing color support in grotty. The new switch -c activates - the old drawing scheme, disabling color at the same time. The new - switch `-i' selects italic instead of underlining (SGR only). - - * src/devices/grotty/tty.cc (putstring): New define instead of - `fputs'. Updated all callers. - (old_drawing_scheme): New global variable. - (COLOR_CHANGE): New enum value. - (SGR_*): New defines containing color handling escape sequences. - (TTY_MAX_COLORS, DEFAULT_COLOR_IDX): New defines. - (glyph): New members `back_color_idx' and `fore_color_idx'. - (glyph::order): Add COLOR_CHANGE. - (tty_printer): New members `cur_fore_idx', `curr_back_idx', - `is_underline', `is_bold', `cu_flag', `tty_colors'. - New methods `make_underline', `make_bold', `color_to_idx', - `change_color', `put_color'. - (cu_flag): Moved into `tty_printer' class. - (tty_printer::tty_printer): Initialize colors. - (tty_printer::add_char, tty_printer::set_char, tty_printer::special, - tty_printer::draw, tty_printer::end_page): Handle colors also. - (main): Add options `-c' and `-i'. - (usage): Updated. - * NEWS, src/devices/grotty/grotty.man: Updated. - - * src/include/errarg.h (errarg): Add support for `unsigned int'. - * src/libs/libgroff/errarg.c: Implement it. - - * src/include/printer.h (printer): Add `change_color' method - (currently used by grotty only). - * src/libs/libdriver/printer.cc: Implement it. - * src/libs/libdriver/input.cc (parse_D_command, do_file): Add - call to `pr->change_color'. - - * src/roff/troff/node.cc (troff_output_file::fill_color, - troff_output_file::glyph_color): Call `do_motion'. - - * tmac/tty.tmac: Add color definitions. - - * src/roff/groff/groff.man: Minor fixes. - -2002-02-05 Bernd Warken - - * src/libs/libdriver/input.cc: Introduce `EnvInt' typedef and use - it. This is a preparation for future changes. - -2002-02-05 Werner LEMBERG - - * src/roff/troff/input.cc (process_input_stack): Fix the case - where leading spaces are followed by \f or \s; previously, an - incorrect space width has been used. - - * doc/roff.man (quoted_char): Fix argument. - (comment): Define string. - -2002-02-04 Larry Kollar - - * doc/groff.texinfo: More fixes. - -2002-02-04 Werner LEMBERG - - * src/preproc/eqn/box.cc (output_string): Don't use \\*[...]. - * src/preproc/eqn/main.cc (do_file, inline_equation): Call - `restore_compatibility' before `output_string' -- the LINE_STRING - register now already contains proper switches from and to - compatibility mode. - - * man/groff_char.man: Add Euro symbol. - * man/groff_diff.man: Improve documentation of `.am1' and `.as1'. - * tmac/tty.tmac: Add `EUR' as replacement for `eu' and `Eu'. - * doc/groff.texinfo (Defstr*): Print strings with full syntax. - Other minor fixes. - - * doc/Makefile (.SUFFIXES, .texinfo.pdf, clean): Add support for - texinfo->pdf. - (.texinfo.html): Add support for texinfo->html. - -2002-02-03 Werner LEMBERG - - Added three new requests `ds1', `as1', and `ami'. The former two - are equivalent to `ds' and `as' with the difference that - compatibility mode is saved on entry, switched off during string - expansion, and restored on exit. The latter is the pendant to `dei' - for `am'. - - (do_define_string): Use `define_mode' and `calling mode'. - Insert COMPATIBLE_SAVE and COMPATIBLE_RESTORE at the beginning and - end of string, respectively. - (define_string, append_string): Use `calling_mode'. - (define_nocomp_string, append_nocomp_string, - define_string_indirect): New functions. - (init_input_requests): Updated. - * NEWS, man/groff_diff.man, man/groff.man: Document it. - - * src/preproc/eqn/box.cc (box::top_level, box::extra_space): Use - `as1' for assigning LINE_STRING (this is `10' usually). Sun's - mm macro package accesses this string register directly. - * src/preproc/eqn/main.cc (inline_equation): Use `as1'. - - * tmac/trace.tmac: Trace calls to `am' also. Make it work in - compatibility mode. - -2002-02-02 Larry Kollar - - * doc/groff.texinfo, tmac/groff_ms.man: More fixes. - -2002-01-31 Werner LEMBERG - - * tmac/an-old.tmac (I): Use \, and \/ to improve spacing. - -2002-01-31 Bernd Warken - - * src/devices/grolbp/lbp.cc (main): Delete `pr'. - * man/groff_out.man: Revised and updated. - -2002-01-30 Bernd Warken - - * src/libs/libdriver/input.cc [USE_ENV_STACK]: New macro to comment - out the unused `{' and `}' commands. Undefined by default. - (IntArray): Make `data' private. - (IntArray::operator[], IntArray::get_data, IntArray::len): Use these - new methods instead. - (skip_line_D, skip_to_end_of_line): New functions. - (get_D_fixed_args): Use `skip_line_D'. - Changed to handle dummy odd arguments by ... - (get_D_fixed_args_odd_dummy): This new function. - (get_D_variable_args): Split some code into ... - (get_possibly_integer_args): This new function. - (send_draw): Use more `const'. - (delete_current_env): New function. - (position_to_end_of_args): Use `size_t'. - Updated. - (send_draw): Updated. - (parse_D_command): Handle `c', `C', and `t' better. - Updated. - (do_file): Updated. - -2002-01-29 Werner LEMBERG - - * NEWS: Revised. - * doc/groff.texinfo: Introduce @Def...List, @Def...Item, and - @Def...ListEnd which replaces @Def...x. This is necessary to get - proper HTML output -- see the comment in the file for more - information. - Updated all calls. - -2002-01-29 Gaius Mulley - - Fixes to make color changes of 2002-01-21 work with grohtml. - - * src/devices/grohtml/post-html.cc (style): Updated. - (html_printer): Remove unused methods. - (html_printer::do_font, html_printer::draw, html_printer::set_char, - html_printer::special): Updated. - * src/devices/grohtml/html-text.cc (debugStack, turnDebug, - html_text::dump_stack_element, html_text::dump_stack) [DEBUGGING]: - Added some debugging code. - (html_text::start_tag): Updated. - (html_text::do_push): New method. - (html_text::push_para): Call it. - Add method for handling color. - (html_text::do_color): Updated. - (html_text::shutdown): Handle color. - * src/devices/grohtml/html-text.h (tag_definition): New member - `col'. - Updated. - -2002-01-28 Werner LEMBERG - - * tmac/ps.tmac, tmac/html.tmac: Fix compatibility mode issues. - -2002-01-27 Gaius Mulley - - Add two switches -a and -g to control the antialiasing bits for - text and graphics, respectively. - - * src/devices/grohtml/post-html.cc (main): Dummy code for `-a' and - `-g'. - * src/devices/grohtml/grohtml.man: Document them. - * src/preproc/html/pre-html.cc (MIN_ALPHA_BITS, MAX_ALPHA_BITS): - New macros. - (textAlphaBits, graphicAlphaBits, antiAlias): New global variables. - (setupAntiAlias): New function. - (createAllPages): Updated. - (scanArguments): Handle `-a' and `-g'. - (main): Call `setupAntiAlias'. - * NEWS: Updated. - -2002-01-27 Werner LEMBERG - - * doc/groff.texinfo (Def*): Call index function after deffn. - - * tmac/html.tmac: Call `nroff' request. - -2002-01-26 Larry Kollar - - * tmac/groff_ms.man: Add some omissions. - -2002-01-25 Larry Kollar - - * tmac/groff_ms.man: Typographical improvements. - -2002-01-25 Werner LEMBERG - - * doc/groff.texinfo: Updated version and copyright. - * src/devices/grops/grops.man: Updated. - - * tmac/groff_tmac.man: Fix `ig' macro. - - * tmac/an-old.tmac (ne): Redefine `ne' request to be a no-op in - nroff mode. - Use `.ne' unconditionally everywhere. - (TS): Only insert some vertical space. Doing a page break is no - longer necessary due to the redefinition of the `ne' request. - - * src/libs/libdriver/input.cc (parse_D_command): Don't emit a - warning for unknown subcommands but parse and pass them to the - device driver. - -2002-01-24 Werner LEMBERG - - * tmac/groff_www.man, NEWS: Fix typos. - -2002-01-21 Werner LEMBERG - - Complete revision of color support: - - Adapt programs to the new libdriver/input.cc. - - Color spaces are no longer converted to RGB but transferred as-is - in the troff intermediate output format. - - Handle default color gracefully. troff now supports a `default' - color (which can't be changed). - - grops will now use the proper color space functions if available. - - Update pic. - - Note that currently grohtml doesn't handle colors properly. This - has to be fixed. - - * src/libs/libgroff/itoa.c (UINT_DIGITS): New macro. - (ui_to_a): New function. - * src/include/lib.h: Updated. - - * src/include/color.h (color_scheme): Replace `NONE' with `DEFAULT'. - (color): Simplified; removed all `double' members and methods. - A new array `components' now holds the color parameters. - (color::is_default, color::get_components): New methods. - (color::operator==, color:operator!=): New. - (Red, Green, Blue, Cyan, Magenta, Yellow, Black, Gray): New macros - to make access to the `components' array more comprehensible. - * src/libs/libgroff/color.cc: Implement new color support. - (atoh): Small fixes. - (color::read_encoding): Simplified for new troff intermediate color - output format. - (default_color): New global variable. - - * src/roff/troff/input.cc (default_symbol): New global variable. - (lookup_color): Use it. - (default_black): Removed. - (do_glyph_color, do_fill_color): Simplified. - (define_color): Handle default color. - Improve warnings. - (do_if_request): Handle default color. - * src/roff/troff/env.cc (environment::environment): Initialize - colors with `default_color'. - * src/roff/troff/node.cc (troff_output_file::put): Add method - for `unsigned int'. - (troff_output_file::hex): Removed. - (troff_output_file::fill_color, troff_output_file::glyph_color): - Updated to include/color.h and libdriver/input.cc. - - * src/preproc/pic/object.cc (draw_arrow): New parameter to set - fill color properly (identically to the outline color). \D'f...' - doesn't work any more. - All function calls to it updated. - - * src/devices/grohtml/post-html.cc (html_printer::do_body, main): - Updated. - * src/devices/grohtml/html-text.cc (html_text::issue_color_begin): - Updated. - - * src/devices/grops/ps.cc (ps_output::put_color): New method. - (ps_printer::sbuf_color): Make a real member instead of pointer. - (ps_printer::fill_color, ps_printer::output_color): Removed. - (ps_printer::ps_printer): Updated. - (ps_printer::set_char): Ditto. - (ps_printer::set_color): Use various color schemes. - Use `put_color' method. - (ps_printer::flush_sbuf): Don't set color. - (ps_printer::fill_path): Take `environment' as parameter. - Simplify color handling. - (ps_printer::set_line_thickness): Renamed to ... - (ps_printer::set_line_thickness_and_color): This (and updated). - (ps_printer::set_color): Change second parameter from `complete' - to `fill' which better describes what it does. - (ps_printer::draw): Call `flush_sbuf' to output graphic commands - and text in the right order. - Updated. - Remove branches for `f' and `F'; this is handled by - libdriver/input.cc. - * src/devices/grops/ps.h: Updated. - * font/devps/prologue (FL): Redefined. - ({F,C}r,k,g: New color functions (with and without filling). - - * doc/pic.ms, src/preproc/pic/pic.man: Small fixes. - * man/groff_diff.man, man/groff.man, man/groff_out.man, - doc/groff.texinfo, NEWS: Updated. - -2002-01-20 Bernd Warken - - * src/libs/libdriver/input.cc: Completely rewritten. See comments - in this file for what has been changed. - -2002-01-19 Werner LEMBERG - - * test-groff: Fix GROFF_FONT_PATH. - * tmac/andoc.tmac: Add dummy macros for equation support -- eqnrc - is read before .TH or .Dd is parsed. - -2002-01-18 Gaius Mulley - - * src/libs/libgroff/geometry.cc (check_output_arc_limits): Fix - quadrant boundaries. - -2002-01-18 Werner LEMBERG - - * devices/grops/ps.cc: Aargh! Fix the fix of the incorrectly - applied last patch. - -2002-01-17 Ruslan Ermilov - - * tmac/doc.common: Initialize %I register for the %I macro to - avoid (harmless) warning. - * tmac/doc.tmac (Bd): There is no reason to enforce -compact - when in the SYNOPSIS section. - -2002-01-17 Bruno Haible - - * src/preproc/pic/lex.cc (get_token): Fix typo. - -2002-01-17 Werner LEMBERG - - * devices/grops/ps.cc: Fix incorrectly applied last patch. - -2002-01-17 Larry Kollar - - * tmac/groff_ms.man: Completely rewritten. - -2002-01-16 Werner LEMBERG - - * tmac/an-old.tmac (TS): Force break, inserting some vertical space. - -2002-01-15 Gaius Mulley - - * devices/grops/ps.cc (ps_printer::fill_path): Fix handling of - fill colors. - (ps_printer::draw): Ditto. - -2002-01-14 Ruslan Ermilov - - * tmac/groff_mdoc.man: Minor fixes. - -2002-01-13 Werner LEMBERG - - * man/groff_out.man: Some fixes. - -2002-01-13 Gaius Mulley - - * doc/pic.ms: Fix typos. - -2002-01-12 Werner LEMBERG - - * doc/groff.texinfo, doc/groff.man: More on a printable backslash. - -2002-01-10 Werner LEMBERG - - * font/devutf8/R.proto, font/devhtml/R.prot: Add `Eu' and `eu' - symbols. - * NEWS: Updated. - -2002-01-09 Bernd Warken - - * man/groff_out.man: Revised. - * man/roff.man: Minor fixes. - * src/roff/troff/troff.man: Some reordering. - -2002-01-09 Werner LEMBERG - - * tmac/an-old.tmac: Add dummy macros for equation support. - -2002-01-07 Werner LEMBERG - - doc/groff.texinfo: Fix documentation of glyph searching algorithm. - - * tmac/an-old.tmac: Revert change 2001-12-23. This breaks too many - man pages. - * tmac/groff_man.man: Small improvements. - -2002-01-07 Bernd Warken - - * man/groff_diff.man: Revised. - -2002-01-06 Werner LEMBERG - - * tmac/www.tmac: Remove extraneous backslash. - -2002-01-06 Bernd Warken - - * man/ditroff.man, src/roff/groff/groff.man, man/groff.man: Revised. - -2002-01-05 Werner LEMBERG - - Integrated groffer, contributed by Bernd Warken. - - * contrib/groffer/*: New. - * Makefile.in, NEWS: Updated. - -2002-01-04 Werner LEMBERG - - * doc/groff.texinfo: Added macros `@Defmpreg' and `@Defmpregx' for - registers defined in macro packages. - Revising the ms part. - -2002-01-04 Larry Kollar - - * doc/groff.texinfo: Add documentation for ms macros. - -2002-01-02 Werner LEMBERG - - First step in adding PS support for the Euro symbol. `eu' is the - official Euro logo, `Eu' is a font-specific glyph variant. - - * font/devps/text.enc: Add `Euro' at position 9. - * font/devps/generate/textmap: Add `Euro' as symbol `Eu'. - * font/devps/symbolmap: Regenerated. - - * NEWS: Updated. - -2002-01-02 Bernd Warken - - * man/roff.man: Revised. - -2002-01-01 Bernd Warken - - * src/roff/groff/groff.man: Completely rewritten. - -2001-12-31 Werner LEMBERG - - * doc/Makefile: Updated. - -2001-12-30 Werner LEMBERG - - * tmac/www.tmac: Make all names of internal macros/registers/strings - lowercase, and prepend `www-'. - Other minor changes. - * src/roff/troff/troff.man: Add preprocessor string at BOF. - -2001-12-30 Gaius Mulley - - Implement option `-b' in grohtml to set the HTML background colour. - - * src/devices/grohtml/post-html.cc (default_background): New global - variable. - (html_printer::html_printer): Initialize `background' to - `default_background'. - (main): Implement option `-b'. - (usage): Updated. - * src/preproc/html/pre-html.cc (scanArguments): Add dummy handling - of `-b' option. - * src/devices/grohtml/grohtml.man: Updated. - * doc/Makefile (.ms.html): Use `-b'. - * tmac/html.tmac: Don't set background color. - - Add new grohtml tag `.html-tl'. - - * src/devices/grohtml/post-html.cc (title_desc): Add `with_h1' - member variable. - (title_desc::title_desc): Updated. - (html_printer::troff_tag): Handle `.html-tl'. - (html_printer::write_title): Use `with_h1'. - * tmac/www.tmac (www-end-nowhere): New auxiliary macro. - (HTML-TL): New macro. - - Add support for unordered lists in HTML. - - * tmac/www.tmac (www-level): New auxiliary register. - (www-level1, www-level2, www-level3): New auxiliary strings. - (www-push-level, www-pop-level): New auxiliary macros - (UL-BEGIN, UL-END, LI): User macros for unordered lists. - - Miscellaneous. - - * src/preproc/html/pre-html.cc (DEFAULT_IMAGE_RES): Increase to 100. - (DEFAULT_VERTICAL_OFFSET): Removed. - (IMAGE_BOARDER_PIXELS): Set to 0. - (A4_LENGTH, A4_OFFSET, LETTER_LENGTH, LETTER_OFFSET): New macros. - (vertical_offset): Initialize with 0. - (gsPaper): New global variable. - (get_resolution): Scan for and return unsigned int. - (get_papersize): New function to get paper length from devps/DESC. - (determine_vertical_offset): New function. - (createAllPages): Produce gray-level images and use proper page - length. - (createImage): Use `-quiet' option of pnmcrop. - (addZ): Fix passing of `-Z'. - (scanArguments): Fix handling of `-o'. - (main): Call `determine_vertical_offset'. - * src/devices/grohtml/post-html.cc (html_printer::draw): Comment out - code for `l'. - - * src/libs/libgroff/tmpfile.cc (add_tmp_file): Fix buffer length. - * src/roff/troff/node.cc (troff_output_file::check_charinfo): Handle - glyph descenders properly. - - * doc/homepage.ms: Include `gnubw.eps'. - * doc/Makefile (gnubw.eps): New rule. - (homepage.html): Depend on `gnubw.eps'. - -2001-12-25 Werner LEMBERG - - * src/roff/troff/input.cc (default_black): Fix return value. - -2001-12-24 Ruslan Ermilov - - * tmac/doc-common (Dt): Change output of architecture strings. - Do some syntax cleanup. - * tmac/groff_mdoc.man: Updated. - -2001-12-23 Werner LEMBERG - - Adding an `itc' request (input line trap accepting \c). - - * src/roff/troff/env.h (environment): New member - `continued_input_trap'. - Make `do_input_trap' a friend function instead of `input_trap'. - * src/roff/troff/env.cc (environment::environment, - environment::copy): Updated. - (environment::newline): Implement it. - (do_input_trap): New function. - (input_trap): Call `do_input_trap'. - (input_trap_continued): New function. - (init_env_requests): Updated. - * src/roff/troff/TODO: Updated. - - * tmac/an-old.tmac (SH, SS, B, I, SM, SB, TP): Use `.itc' instead of - `.it'. - - * src/preproc/grn/hdb.cc (DBRead): Really chop after 127 characters. - -2001-12-22 Ruslan Ermilov - - * tmac/doc-common, tmac/doc-syms: Small updates. - -2001-12-22 Colin Watson - - * tmac/an-old.tmac (an-p-footer): Set title length in environment 1. - -2001-12-22 Bernd Warken - - * MANIFEST: New file. - -2001-12-22 Werner LEMBERG - - * src/preproc/grn/grn.man: Updated. - -2001-12-22 Solar Designer - - * src/preproc/grn/hdb.cc (MAXSTRING_S): New macro. - (DBRead): Use it. - -2001-12-19 Werner LEMBERG - - Implement a fallback character request `.fchar'. - - * src/roff/troff/charinfo.h (charinfo): New flag `fallback'. - (is_fallback): New inline function. - * src/roff/troff/input.cc (do_define_character): New function. - (define_character): Call `do_define_character'. - (define_fallback_character): New function. - (init_input_requests): Add `fchar'. - (charinfo::charinfo): Updated. - (charinfo::set_macro): New argument to set `fallback' flag. - * src/roff/troff/node.cc (make_glyph_node, make_node, - node::add_char): Check `fallback' flag. - * NEWS, man/groff_diff.man, man/groff_man: Updated. - -2001-12-16 Werner LEMBERG - - * groff.texinfo: Document exact search algorithm for glyphs. - -2001-12-15 Werner LEMBERG - - * Makefile.cpg, Makefile.ccpg, Makefile.man: Add dummy file to - the left side of $(MANPAGES) rule to make it always non-empty. - -2001-12-14 Werner LEMBERG - - * src/roff/troff/input.cc (default_black): Define default color - `black' if not yet defined. - -2001-12-13 Werner LEMBERG - - Implement new string-valued register `.fn' to return the current - real (internal) font name. - - * env.cc (environment::get_font_name_string): New function. - (init_env_requests): Add `.fn' register. - * env.h (environment): Updated. - * node.cc (font_info): Make `get_font_name' a friend. - (get_font_name): New function. - * node.h: Updated. - - * man/groff_diff.man, man/groff.man, NEWS: Updated. - -2001-12-12 Ralph Corderoy - - * src/preproc/eqn/main.cc (inline_equation): Fix typos. - -2001-12-12 Werner LEMBERG - - * tmac/groff_man.man, doc/groff.texinfo: There is no .R macro. - -2001-12-10 Gaius Mulley - - * man/groff_diff.man: Adding documentation for \O. - -2001-12-10 Werner LEMBERG - - * src/preproc/html/pre-html.cc (TROFF_COMMAND): Removed. - (scanArguments): Use PROG_PREFIX for the name of the troff binary. - -2001-12-09 Werner LEMBERG - - * man/roff.man: Revised. - * src/roff/groff/groff.man: Replace man page references with a - pointer to roff.man. - -2001-12-09 Bernd Warken - - * man/roff.man: Completely rewritten. - -2001-12-06 Ralph Corderoy - - * src/preproc/eqn/main.cc (inline_equation): Improve error message. - -2001-12-05 Werner LEMBERG - - * src/roff/troff/input.cc (get_delim_file_name): Removed since no - longer used. - * src/devices/grohtml/post-html.cc (html_printer::html_printer): Fix - order of initializers. - * NEWS: Updated. - -2001-12-05 Gaius Mulley - - * doc/groff.texinfo: Fix documentation of \O. - - * src/devices/grohtml/html-text.cc (html_text::do_indent, - html_text::do_table, html_text::do_emittext, html_text::do_para): - Use `const' for first argument. - (html_text::do_table): Use cast. - * src/devices/grohtml/html-text.h: Updated. - * src/devices/grohtml/output.cc (simple_output::put_string): Add - method for `const string &s'. - * src/devices/grohtml/html.h: Updated. - * src/devices/grohtml/post-html.cc (MAX_STRING_LENGTH): Removed. - (ANCHOR_TEMPLATE): Modified. - (manufacture_headings): New global variable to handle `-h' option. - (is_subsection): Removed. - (char_buffer::add_string): Add `const' to first argument. - Protect against invalid string argument. - Add method for `const string &s'. - (text_glob): Completely redesigned. - (page): Use `const' for strings and remove string length variable. - (page::add_html): Removed. - (page::add_end_encode): New member function. - (to_unicode): Moved upwards. - (title_desc, header_desc): Updated. - (header_desc::write_headings): Updated to new ANCHOR_TEMPLATE - definition. - (html_printer::is_bold, html_printer::make_bold): New member - functions. - (html_printer::end_of_line): Updated. - (generate_img_src, html_printer::do_auto_image, - html_printer::do_title, html_printer::write_header, - html_printer::determine_header_level, html_printer::do_heading, - html_printer::do_linelength, html_printer::do_pageoffset, - html_printer::do_indentation, html_printer::do_tempindent, - html_printer::do_indentedparagraph, html_printer::do_break, - html_printer::flush_sbuf, get_html_translation, - html_printer::begin_page, html_printer::special): Rewritten to get - rid of static string length limit. - (html_printer::troff_tag): Added `.no-auto-rule'. - (html_printer::flush_globs): Small fix. - (html_printer::determine_space): Don't compute `space_width'. - (html_printer::translate_to_html): Renamed to ... - (html_printer::emit_html): This (with updates). - (html_printer::write_header): Implement `-h' option. - (html_printer::draw): Remove commented-out code. Handle `F' - command. - (html_printer::add_char_to_sbuf): Removed. - (html_printer::add_to_sbuf): Rewritten. - (html_printer::sbuf_continuation): Fixed. - (html_printer::seen_backwards_escape, reverse, - html_printer::remove_last_char_from_sbuf): Removed. - (char_translate_to_html, str_translate_to_html): Removed. - (html_printer::overstrike): New function member. - (html_printer::set_char): Use it. - (html_printer::do_body): New function member. - (html_printer::~html_printer): Use it. - (main): Handle `-h' option. - (usage): Updated. - * src/devices/grohtml/grohtml.man: Document -h switch. - - * src/preproc/html/pre-html.cc: Include searchpath.h - Replace `POSTSCRIPTRES' macro with `postscriptRes' variable. - (get_resolution): New function. - (checkImageDir): Use `0777' permissions in mkdir() - (write_start_image): Rewritten to use `\O[5...]'. - (createImage, generateImages): Updated. - (main): Handle `F' and `h' options. - Use `get_resolution'. - - * src/roff/troff/input.cc (begin, end, image): Removed. - (do_suppress): Take parameter. - Handle modified syntax of `\O'. - (token::next): Updated. - (init_markup_requests): Removed. - (main): Updated. - - * src/roff/troff/div.h: Add declaration for begin_page(). - - * tmac/color-html.tmac: Removed. Contents moved to... - * tmac/html.tmac: Here. Set background color. - * tmac/color.tmac: Removed. Contents moved to... - * tmac/ps.tmac: Here. - * tmac/www.tmac: Remove the title command when generating images - for html. - (NO_AUTO_RULE): New macro. - (HTML_DO_IMAGE): Use revised `\O' escapes. - * tmac/Makefile.sub, tmac/groff_www.man, tmac/troffrc: Updated. - -2001-12-02 Werner LEMBERG - - * tmac/groff_mdoc.man: Fix typo. - -2001-12-01 Colin Watson - - * man/roff.man: Fix typo. - -2001-11-29 Werner LEMBERG - - * src/libs/libbib/map.c, src/utils/pfbtops/pfbtops.c: Include - stdlib.h. - - * src/roff/troff/input.cc (read_draw_node): Emit error message if - more than one argument to \D'f ...'. - - * tmac/Makefile.sub (NORMALFILES): Add lbp.tmac. - -2001-11-28 Werner LEMBERG - - * tmac/an-old.tmac, tmac/doc.tmac: Assure that the macro package is - loaded only once. - - * tmac/groff_man.man: Minor cosmetic fix. - -2001-11-27 Werner LEMBERG - - * src/roff/groff/groff.man, tmac/groff_tmac.man, - tmac/groff_www.man: s/mwww/www/. - -2001-11-26 Werner LEMBERG - - * aclocal.m4 (GROFF_MKSTEMP): Implement test using C++ linkage. - * configure: Regenerated. - * win32-diffs: Updated. - - * tmac/groff_mwww.tmac: Renamed to ... - * tmac/groff_www.tmac: This. - * tmac/mwww.tmac: Removed. - * NEWS, tmac/Makefile.sub: Updated. - -2001-11-21 Werner LEMBERG - - * doc/groff.texinfo: Improve documentation of the `\v' escape. - Fix explanation of `\D' and `rt'. - -2001-11-20 Werner LEMBERG - - * tmac/an-old.tmac (an-header): Set header length equal to page - width. - * doc/groff.texinfo: Improve documentation of `ne' request. Other - minor fixes. - * NEWS: Small fix. - -2001-11-19 Werner LEMBERG - - * NEWS, man/Makefile.sub: Updated. - -2001-11-19 Bernd Warken - - * man/ditroff.man: New file. - -2001-11-17 Werner LEMBERG - - * man/groff_differences.man: Renamed to ... - * man/groff_diff.man: This. Updated. - * man/Makefile.sub, src/roff/troff/troff.man, NEWS: Updated. - - * src/preproc/html/pushbackbuffer.cc: Renamed to ... - * src/preproc/html/pushback.cc: This. Updated. - * src/preproc/html/pushbackbuffer.h: Renamed to ... - * src/preproc/html/pushback.h: This. - * src/preproc/html/Makefile.sub, src/preproc/html/pre-html.cc: - Updated. - - * src/libs/libgroff/htmlindicate.cc: Renamed to ... - * src/libs/libgroff/htmlhint.cc: This. - * src/libs/libgroff/Makefile.sub: Updated. - - * tmac/an-old.tmac (an-end): Fix page length. - -2001-11-16 Werner LEMBERG - - * NEWS, man/groff_differences.man, doc/groff.texinfo: Updated. - * man/Makefile.sub: Include groff_differences.man. - * VERSION: Set to 1.18. - * REVISION: Set to 0. - -2001-11-16 Bernd Warken - - * src/roff/troff/input.cc (do_define_macro): Allow whitespace before - the second dot (or ending macro name) to end a macro. - * doc/groff.texinfo: Doc fix. - -2001-11-16 Ruslan Ermilov - - * tmac/doc-common (doc-header): Handle very long document titles - better. - -2001-11-16 Werner LEMBERG - - * tmac/doc.tmac (doc-do-Bl-args): Fix .substring requests. - -2001-11-15 Werner LEMBERG - - * src/roff/troff/troff.man: Revised and split into troff.man and... - * man/groff_differences.man: New file. - * NEWS: Updated. - -2001-11-13 Werner LEMBERG - - * tmac/an-old.tmac (TS, TE): New macros for table support. - -2001-11-12 Werner LEMBERG - - * src/include/lib.h: Provide a fix for emx to not include - groff-getopt.h. - -2001-10-27 Werner LEMBERG - - * src/roff/troff/input.cc (substring_macro): Fix computation of - boundary values. - -2001-10-20 Werner LEMBERG - - Undo change from 2001-08-28. - - * src/roff/troff/input.cc (have_input): New global variable. - (token::next): Set `have_input' for \f, \H, \R, \s, and \S if not - in compatibility mode. - (process_input_stack): Use it. - -2001-10-19 Ruslan Ermilov - - * tmac/doc.tmac (doc-flag-recursion): Protect arguments against - being handled as end-of-sentence characters, - -2001-10-10 Gaius Mulley - - * src/roff/troff/input.cc (file_iterator): New members - `suppress_newline_flag' and `seen_escape'. - (file_iterator::next_file): Updated. - (file_iterator::fill): Use it. - (string_iterator): New member `suppress_newline_flag'. - (string_iterator::fill): Set it. - (get_color_element): Use MAX_COLOR_VAL. - * src/roff/troff/env.cc (environment): Remove `need_eol'. - (no_fill): Don't set `env->ignore_next_eol'. - (environment::newline): Handle `eol' tag properly. - Emit `eol.ce'. - (environment::add_html_tag): Set `env->ignore_next_eol'. - Don't handle `.ce'. - * src/roff/troff/env.h (environment): Updated. - - * src/devices/grohtml/post-html.cc (text_glob::is_eol_ce): New - member function. - (html_printer::outstanding_eol): New member function. - (html_printer::do_title): Use new functions. - (html_printer::troff_tag): Test `id_eol_ce'. - -2001-10-10 Werner LEMBERG - - * tmac/color.tmac, tmac/color-html.tmac: Use `.do' to make those - files work with -C also. - -2001-10-05 Werner LEMBERG - - * doc/pic.ms: Minor fix. - * src/preproc/html/pre-html.cc (scanArguments): Don't handle `-?' - as a valid command line switch. - * src/devices/grohtml/post-html.cc (main): Ditto. - (usage): Updated. - * src/devices/grohtml/grohtml.man: Updated. - * src/roff/groff/groff.cc (main): Pass `-v' to predriver also. - -2001-10-04 Werner LEMBERG - - Implementing color support in troff, pic, grops, and grohtml. These - changes are based on a major patch provided by Gaius Mulley - . - - New request: `defcolor', supporting rgb, cmy, cmyk, and gray - definitions with both hex values and fractions. - - New escapes: \m and \M for drawing and background color, - respectively. This corresponds to the troff output commands `m' - and `DF'. - - groff and troff accept command line switch `-c' to disable color - output (which is automatically disabled in compatibility mode). - - New scaling indicator `f' for fractions (1f = 65536u). - - New conditional operator `m' to test for defined colors with `if' - and `ie'. - - New keywords `color' (or `colour', `colored', `coloured'), `outline' - (or `outlined'), and `shaded' added to pic. - - * src/include/color.h: New file. - * src/include/driver.h: Include it. - * src/include/printer.h: Include color.h. - (environment): New members `col' and `fill'. - (printer): Remove `adjust_arc_center' member function. - * src/include/Makefile.sub: Updated. - - * src/libs/libdriver/input.cc (do_file): Initialize `env.col' and - `env.fill'. - Handle `m' and `DF' troff commands. - * src/libs/libgroff/color.cc: New file. - * src/libs/libgroff/Makefile.sub: Updated. - - * src/preproc/html/pre-html.cc (IMAGE_BORDER_PIXELS): Set to 2. - (stop): Removed. - (createImage): Fix computation of `y2'. - Use `pnmcrop' also. - (buffer::write_file_html): Remove calls to `stop'. - - * src/preproc/pic/common.h (common_output): New abstract function - members `set_color', `reset_color', `get_last_filled', and - `get_outline_color'. - * src/preproc/pic/object.h: Add `IS_SHADED' and `IS_OUTLINED'. - (object_spec): Add members `shaded' and `outlined'. - * src/preproc/pic/output.h (output): `command' is now abstract. - New function members `set_color', `reset_color', `get_last_filled', - and `get_outline_color'. - * src/preproc/pic/lex.cc (lookup_keyword): Recognize `colo[u]r[ed]', - `outline[d]', and `shaded'. - * src/preproc/pic/object.cc (output::command): Removed. - (output::set_location): Moved to output.h. - (graphic_object): Add protected members `outline_color' and - `color_fill'. - Add member functions `set_outline_color', `get_outline_color', and - `set_fill_color'. - (closed_object): Add member function `set_fill_color'. - Add member `color_fill'. - (graphic_object::print_text): Use `out->set_color' and - `out->reset_color'. - (box_object::print, ellipse_object::print, circle_object::print, - line_object::print, spline_object::print, arc_object::print): Ditto. - (object_spec::make_object): Implement `IS_OUTLINED' and `IS_SHADED'. - * src/preproc/pic/pic.y: Add tokens `COLORED', `OUTLINED', and - `SHADED', making them `%left'. - Add rules `object_spec [SHADED|COLORED|OUTLINED] text'. - * src/preproc/pic/tex.cc (tex_output): New dummy function members - `set_color', `reset_color', `get_last_filled', and - `get_outline_color'. - * src/preproc/pic/troff.cc (simple_output): New abstract function - members `set_color', `reset_color', and `get_last_filled'. - (simple_output::polygon, simple_output::circle, - simple_output::ellipse): Use `get_last_filled'. - (troff_output): New members `last_filled' and `last_outlined'. - New function members `set_color', `reset_color', `get_last_filled', - and `get_outline_color'. - (troff_output::finish_picture): Use `reset_color'. - (troff_output::set_fill): Test `last_filled'. - * src/preproc/pic/pic.man: Updated. - - * src/roff/groff/groff.cc (main): Implement `-c' option. - (synopsis, help): Updated. - src/roff/groff/groff.man: Updated. - - * src/roff/troff/troff.h: Include color.h. - (warning_type): Add WARN_COLOR. - * src/roff/troff/env.h (environment): New members - `{cur,prev}_{glyph,fill}_color'. - New member functions `get_{prev_,}{glyph,fill}_color'. - * src/roff/troff/env.cc: Initialize and implement them. - * src/roff/troff/input.cc: New global variable `disable_color_flag'. - Replace `NULL' with `0' everywhere for consistency. - (lookup_color, default_black, do_glyph_color, do_fill_color, - get_color_element, read_rgb, read_cmy, read_cmyk, read_gray, - define_color): New functions. - (token::next): Implement \M and \m escapes. - (do_if_request): Implement `m' operator. - (usage): Updated. - (main): Implement `-c' option. - (init_markup_requests): Add `defcolor' request. - (warning_table): Add `color' warning. - * src/roff/troff/node.h (glyph_color_node, fill_color_node): New - classes. - * src/roff/troff/node.cc (troff_output_file): New members - `current_{page,glyph}color'. New member functions `put_hex', - `glyph_color', and `fill_color'. - (glyph_color_node::*, fill_color_node::*): Implement it. - * src/roff/troff/number.cc (SCALE_INDICATOR_CHARS): Add `f'. - (parse_term): Add support for `f'. - * src/roff/troff/troff.man: Updated. - - * src/devices/grodvi/dvi.cc (draw_dvi_printer::draw): Add dummy - entry for `F'. - * src/devices/grolbp/lbp.cc (lbp_printer::draw): Ditto. - * src/devices/grolj4/lj4.cc (lj4_printer::draw): Ditto. - - * src/devices/grohtml/html-text.h (HTML_TAG): Add COLOR_TAG. - (tag_definition): Use `void *' for arg1. - (html_text): New member functions `do_color' and `done_color'. - Use `void *' for second parameter of `push_para' member function. - New `push_para' member function with a single parameter. - Use `char *' for parameter of `issue_table_begin' member funtion. - New `issue_color_begin' member function. - * src/devices/grohtml/html-text.cc (html_text::end_tag): Handle - COLOR_TAG. - (html_text::issue_color_begin): New function. - (html_text::issue_table_begin): Use `char *' for parameter. - (html_text::start_tag, html_text::shutdown, - html_text::check_emit_text): Updated. - (html_text::push_para): Use `void *' for second parameter. - Add same function with only one parameter. - (html_text::do_*): Updated. - (html_text::do_color, html_text::done_color): New functions. - * src/devices/grohtml/post-html.cc (style): New member `col'. - Mew member `style' with 6 parameters. - (style::style, style::operator==): Updated. - (html_printer::do_font): Use it. - (html_printer::draw): Add dummy entry for `F'. - (html_printer::set_char): Updated. - * src/devices/grohtml/grohtml.man: Updated. - - * src/devices/grops/ps.cc (ps_output::put_float): Use `%g' to have - trailing zeroes removed. - (ps_printer): New members `sbuf_color', `fill_color', and - `output_color'. - Removed member `fill'. - New member function `set_color'. - (ps_printer::ps_printer, ps_printer::set_char): Updated. - (ps_printer::flush_sbuf, ps_printer::set_line_thickness, - ps_printer::fill_path, ps_printer::draw): Use `set_color'. - - * tmac/color-html.tmac, tmac/color.tmac: New files. - * tmac/troffrc: Include them. - * tmac/www.tmac (URL, FTP, MAILTO): Use blue color. - * tmac/Makefile.sub: Updated. - - * NEWS, doc/groff.texinfo, doc/pic.ms, man/groff_out.man, - man/groff.man: Updated. - * font/devps/prologue.ps: Define FC and CO functions. - -2001-10-04 Gaius Mulley - - Fix incorrect cropping of images and incorrect handling of special - characters. Fix handling of file names in \O. - - * src/include/geometry.h: New file. - * src/libs/libgroff/geometry.cc: New file. - * src/libs/libdriver/printer.cc (printer::adjust_arc_center): Moved - to `geometry.cc'. - * src/roff/troff/input.cc (get_delim_file_name): Fixed problem with - initial spaces. - (do_suppress): Updated. - * src/roff/troff/node.cc: Include geometry.h. - (troff_output_file::flush_tbuf): Fixed parameters to - `check_output_limits'. - (troff_output_file::check_charinfo): Ditto. - (troff_output_file::determine_line_limits): Add support for `Da' - and `Dl' commands. - - * src/devices/grohtml/post-html.cc (str_translate_to_html): - Add new parameter `is_special' to decode special characters from - escape sequences. - (html_printer::do_title, html_printer::do_heading, - html_printer::do_indentedparagraph, - html_printer::translate_to_html, html_printer::special): Updated. - -2001-10-03 Werner LEMBERG - - * Makefile.sub (DISTCLEANFILES): Add stamp-h. - Fix entry for config.h. - * test-groff (GROFF_BIN_PATH): Add $builddir/roff/groff. - * tmac/troffrc: Translate nonbreakable space character to `\~'. - * src/preproc/eqn/eqn.man: Document -d command line option. - -2001-09-27 Werner LEMBERG - - * man/groff.man: Use - - .ev xxx - .na - .nh - - .ev - - instead of the old code (`.ad .hy' after the table) to suppress - incorrect hyphenation for grohtml output. - -2001-09-22 Werner LEMBERG - - * man/groff_font.man, man/groff_out.man: Minor fixes. - -2001-09-20 Werner LEMBERG - - * PROBLEMS: Updated, reordered. Improved EPS section (thanks to - Arnold Robbins ). - -2001-09-09 Werner LEMBERG - - * configure: Regenerated with autoconf 2.52. - - * doc/groff.texinfo: Complete revision of indices. - -2001-09-07 Werner LEMBERG - - * doc/Makefile (clean): Updated to delete all indices. - -2001-09-05 Werner LEMBERG - - * src/roff/troff/troff.man: Remove superfluous line. - - * tmac/s.tmac: Enable all warnings only if no -W or -w option is - given on the command line (or rather, if only the default warnings - are set). - -2001-09-03 Werner LEMBERG - - * man/groff.man, src/preproc/eqn/eqn.man, tmac/groff_mdoc.man: Don't - use .ne for TTY devices. - -2001-08-31 Werner LEMBERG - - * src/roff/troff/token.h, src/roff/troff/input.cc: - s/TOKEN_TRANSPARENT_ESCAPE/TOKEN_OPAQUE_ESCAPE/. - -2001-08-28 Werner LEMBERG - - * src/roff/troff/token.h (token_type): Add TOKEN_TRANSPARENT_ESCAPE. - * src/roff/troff/input.cc (token::next): Return - TOKEN_TRANSPARENT_ESCAPE for \f, \H, \R, \s, and \S if not in - compatibility mode. - (token::description): Updated. - (process_input_stack): Reset `bol' for TOKEN_TRANSPARENT_ESCAPE. - (token::add_to_node_list, token::process): Ignore - TOKEN_TRANSPARENT_ESCAPE. - -2001-08-27 Werner LEMBERG - - * tmac/an-old.tmac: Fix `S' string. - -2001-08-26 Werner LEMBERG - - * src/roff/troff/troff.man: Don't use .ne for TTY devices. - -2001-08-25 Werner LEMBERG - - * doc/pic.ms: Replace `\\' with `\e' (and fixing some single - backslashes). - Many other minor fixes. - - * configure.ac: Add message at end to inform how to compile - xditview. - * configure: Regenerated. - -2001-08-24 Werner LEMBERG - - * src/include/getopt.h, src/libs/libgroff/{getopt.c, getopt1.c}: - Updated to latest version of libc. - -2001-08-23 Werner LEMBERG - - * configure.ac: Don't create subdirectories before AC_CONFIG_FILES. - Autoconf 2.50 and newer can handle this. - * configure: Regenerated. - -2001-08-21 Werner LEMBERG - - * doc/pic.ms: Fix typo. - * src/preproc/tbl/tbl.man: Document case of global options. - -2001-08-21 Gaius Mulley - - * src/devices/grohtml/post-html.cc (html_printer::end_font): Fix - handling of `CR' font. - -2001-08-20 Werner LEMBERG - - Use a config.h file. - - * src/include/lib.h: Include config.h. - * All C files: Ditto (if necessary). - * All C++ source and header files: Include lib.h first (if - necessary). - - * src/include/config.hin: New file (autogenerated by autoheader). - * stamp-h.in: New file. - * configure.ac: Updated. - * aclocal.m4: Add third parameters to AC_DEFINE macros. - (GROFF_ARRAY_DELETE): Simplified. - * Makefile.sub (DISTCLEANFILES): Updated. - Added targets for remaking config.status, config.hin, config.h, - stamp-h.in, and stamp-h. - * configure: Regenerated. - -2001-08-19 Werner LEMBERG - - * NEWS: Updated. - -2001-08-18 Sebastian Krahmer - - * src/preproc/pic/pic.y (format_number): Use do_sprintf(). - (do_sprintf): Use snprintf(). - -2001-08-18 Werner LEMBERG - - * src/libs/snprintf/*: Added an snprintf module written by Mark - Martinec. - * src/libs/libgroff/Makefile.sub: Updated. - * configure.ac: Add test for snprintf(). - * Makefile.in: Updated. - * configure: Regenerated. - - * src/preproc/html/pre-html.cc (make_message): Reactivate code which - uses snprintf(). - -2001-08-14 Ruslan Ermilov - - * tmac/doc.tmac (Ex): New implementation. - * tmac/doc-common, tmac/groff_tmac.man: Updated. - -2001-08-13 Ruslan Ermilov - - * tmac/doc.tmac (Rv): Implement support for 0 or more than 1 - argument. - * tmac/groff_tmac.man: Updated. - -2001-08-13 Werner LEMBERG - - * src/preproc/tbl/tbl.man: Minor documentation update. - -2001-08-13 John David Anglin - - * src/libs/libgroff/tmpname.cc: Add prototype for gettimeofday(). - * configure.ac: Add declaration test for gettimeofday(). - * Makefile.in: Document NEED_DECLARATION_GETTIMEOFDAY defines. - * aclocal.m4: Include sys/time.h for gettimeofday declaration test. - * configure: Regenerated. - -2001-08-11 Werner LEMBERG - - * aclocal.m4 (GROFF_MKSTEMP): Define HAVE_MKSTEMP. - * configure.ac: Add declaration test for strcasecmp(). - * Makefile.in: Updated. - * configure: Regenerated. - * src/include/lib.h [!HAVE_MKSTEMP]: Add prototype for mkstemp() -- - this is necessary because groff's mkstemp.cc is C++. - Add declaration conditionally for strcasecmp(). - -2001-08-10 Werner LEMBERG - - Integrated pic2graph, contributed by Eric S. Raymond. - - * contrib/pic2graph/{Makefile.sub, pic2graph.sh, pic2graph.man}: New - files. - * Makefile.in, NEWS: Updated. - - * src/preproc/tbl/tbl.man: Revised. - -2001-08-09 Eric S. Raymond - - * src/preproc/tbl/tbl.man: Extended to cover all tbl features. - -2001-08-09 Werner LEMBERG - - * src/preproc/tbl/main.cc (process_data): Fix recognition of .lf - requests. - -2001-08-08 Paul Eggert - - * Makefile.sub (configure): Depend on configure.ac, not - configure.in. - * INSTALL.gen: Upgrade to autoconf 2.52's INSTALL. - -2001-08-07 Werner LEMBERG - - * src/utils/afmtodit/afmtodit.man, src/roff/groff/groff.man: Minor - fixes. - -2001-08-06 Werner LEMBERG - - * src/roff/troff/troff.man: Improve documentation of -E option. - -2001-07-28 Ralph Corderoy - - * src/preproc/html/pushbackbuffer.cc (pushBackBuffer::readNumber): - Simplified. - -2001-07-27 Werner LEMBERG - - * src/preproc/refer/refer.cc: Undo last change. - * src/devices/grohtml/post-html.cc: Ditto. - -2001-07-26 Werner LEMBERG - - * src/preproc/refer/refer.cc: Include `lib.h'. - * src/devices/grohtml/post-html.cc: Ditto. - -2001-07-25 Gaius Mulley - - * aclocal.m4 (GROFF_PAGE): Add `AC_DEFINE(PAGEA4)'. - * src/preproc/html/pre-html.cc: Use it for DEFAULT_VERTICAL_OFFSET. - * Makefile.in: Comment updated. - * configure: Regenerated. - -2001-07-25 Werner LEMBERG - - * src/preproc/pic/pic.cc: Removed. - * src/preproc/pic/pic_tab.h: Removed. - * src/preproc/refer/label.cc: Removed. - - * doc/Makefile (.ms.html): Don't use a file name extension in - argument to grohtml's -I option. - * Makefile.in (dist): Remove CVS directories. - Call `distfiles' target. - - * src/devices/grohtml/grohtml.man: Add information about valid - versions of pnmtopng. - * src/preproc/html/pre-html.cc (TRANSPARENT): Use `white' as colour - name instead of number. - -2001-07-24 Werner LEMBERG - - * doc/groff.texinfo: Minor fixes. - -2001-07-21 Gaius Mulley - - * doc/Makefile (.ms.html): Put image files into a subdirectory. - (clean): Updated. - -2001-07-20 Werner LEMBERG - - * src/libs/libgroff/tmpname.cc: New file, defining get_tempname(). - * src/libs/libgroff/mkstemp.cc: New file. - * src/libs/libgroff/mksdir.cc: New file. - * src/libs/libgroff/tmpfile.cc [HAVE_MKSTEMP_PROTO]: Removed. - (xtmpfile) [!HAVE_MKSTEMP]: Removed. - * src/libs/libgroff/Makefile.sub: Updated. - * src/include/lib.h: Add mksdir() prototype. - * src/include/posix.h: Define S_IXUSR if not yet defined. - - * src/preproc/html/pre-html.cc (MAX_RETRIES): Removed. - (createAllPages): Use mksdir() instead of current code. - * src/utils/indxbib/indxbib.cc [HAVE_MKSTEMP_PROTO]: Removed. - (main): [!HAVE_MKSTEMP]: Removed. - - * aclocal.m4 (GROFF_MKSTEMP): Updated to use new mkstemp.cc file. - (GROFF_INTTYPES_H, GROFF_UNSIGNED_LONG_LONG, GROFF_UINTMAX_T): New - macros. - * configure.ac: Add tests for stdint.h, sys/time.h, and - gettimeofday(). - Call new GROFF_xxx macros. - * configure: Regenerated. - * Makefile.in: Comments updated. - -2001-07-20 Gaius Mulley - - * src/preproc/html/pre-html.cc (scanArguments): Use getopt_long() - instead of current code. - * src/devices/grohtml/post-html.cc (main): Handle `-d' option. - * src/roff/groff/groff.cc (possible_command::insert_args): New - function. - (main): Use it for predriver handling instead of insert_arg(). - -2001-07-19 Werner LEMBERG - - * doc/Makefile: Added GROFF_BIN_PATH to make it work with uninstalled - groff also. - - * src/include/posix.h: Define S_IWUSR if not yet defined. - -2001-07-18 Werner LEMBERG - - * NEWS: Updated. - -2001-07-18 Ruslan Ermilov - - * tmac/groff_mdoc.man: Document new -width and -column syntax. - Some other minor fixes. - * tmac/an-old.tmac: Add `AT' and `UC' macros. - -2001-07-17 Gaius Mulley - - Replace call to `troff' with `groff -Z' to make it aware of - GROFF_BIN_PATH. - - * src/preproc/html/pre-html.cc (TROFF_COMMAND): New macro. - (troff_command, command_prefix): Removed. - (alterDeviceTo): Use groff. - (addZ): New function. - (char_buffer::do_html): Use it. - (scanArguments): Use TROFF_COMMAND. - (findPrefix): Removed. - (main): Updated. - * src/roff/groff/groff.cc (main): Handle zflag for preprocessors. - -2001-07-17 Eric S. Raymond - - * doc/pic.ms: Documentation fixes. - -2001-07-17 Werner LEMBERG - - Replace atexit() with global destructor. - - * src/libs/libgroff/tmpfile.cc (xtmpfile_list): Add constructor. - (xtmpfile_list_init): New global structure to deallocate - xtmpfile_list on exit. Its destructor inherits most code from - remove_tmp_files(). - (remove_tmp_files): Deleted. - (add_tmp_file): Simplified. - -2001-07-16 Werner LEMBERG - - Replace strdup() with strsave(). - - * src/devices/grolbp/lbp.cc [!HAVE_STRDUP]: Removed. - (set_papersize): Use strsave() and a_delete. - (main): Use strsave(). - * src/preproc/html/pre-html.cc (make_message, createAllPages, - removeAllPages): Use strsave() and a_delete. - - * configure.ac: Remove test for strdup. - * Makefile.in: Comment updated. - * configure: Regenerated. - -2001-07-15 Werner LEMBERG - - * win32-diffs: Updated. - -2001-07-14 Werner LEMBERG - - * src/preproc/html/pre-html.cc (makeTempFiles): Activate new code, - removing the old one. - * src/utils/indxbib/indxbib.cc (main): Remove compiler warning. - -2001-07-14 Ralph Corderoy - - * src/libs/libgroff/tmpfile.cc (xtmpfile): Fix guard for `namep'. - -2001-07-12 Ruslan Ermilov - - Merge -xwidth into -width. Add -xwidth functionality to -column - also. - - * tmac/doc.tmac (Bl): Add dummy doc-typeXXX and doc-spaceXXX to - avoid warning. - (doc-do-Bl-args): Merge -xwidth code with -width. Test whether - string immediately following a leading dot starts with a valid mdoc - argument. - Add similar code to the -column branch. - (doc-Bl-usage): Updated. - * groff_mdoc.man: s/-xwidth/-width/. - -2001-07-12 Gaius Mulley - - * src/devices/grohtml/post-html.cc (text_glob::is_br): Stop titles - running into centered or non-formatted text. - -2001-07-11 Werner LEMBERG - - Introduce short and long prefixes to have the selection at run-time - whether there is a 8+3 limit for names of temporary files. - - * src/libs/libgroff/tmpfile.cc (TMPFILE_PREFIX): Replaced with... - (TMPFILE_PREFIX_SHORT, TMPFILE_PREFIX_LONG): This. - (tmpfile_prefix, tmpfile_prefix_len, use_short_prefix): New - variables. - (temp_init): New global structure to initialize above three - variables. - (xtmptemplate): Use two parameters for long and short prefix. - Simplify code use above three variables. - (xtmpfile): Use long and short prefixes as parameters. - * src/include/lib.h: Updated. - - * src/preproc/html/pre-html.cc ({PAGE,PS,REGION}_TEMPLATE): Replace - with ... - ({PAGE,PS,REGION}_TEMPLATE_{SHORT,LONG}): This. - (createAllPages, makeTempFiles): Updated. - -2001-07-09 Werner LEMBERG - - * REVISION: Increased to 3. - -Version 1.17.2 released -======================= - -2001-07-07 Werner LEMBERG - - * src/utils/indxbib/indxbib.cc (main): Change type of `name_max' - to size_t. - -2001-07-06 Ruslan Ermilov - - * tmac/doc.tmac (Rv): Make `Rv' really not parseable. - Fix synopsis. - * tmac/groff_mdoc.man: Fix synopsis. - -2001-07-05 Ruslan Ermilov - - * tmac/doc.tmac (doc-inset-list, doc-hang-list, doc-ohang-list): - Restore `doc-Pa-font'. - -2001-07-04 Werner LEMBERG - - * src/utils/indxbib/dirnamemax.c: Moved to ... - * src/libs/libgroff/maxfilename.cc: Here. - s/dir_name_max/file_name_max/. - Add copyright. - * src/include/lib.h: Add file_name_max. - * src/utils/indxbib/indxbib.cc: Updated. - * src/utils/indxbib/Makefile.sub, src/libs/libgroff/Makefile.sub: - Updated. - - * src/libs/libgroff/tmpfile.cc (TMPFILE_PREFIX) [__MSDOS__]: Define - as empty. - (xtmpfile) [_MSC_VER]: Removed -- MSVC has mktemp(). - - * src/preproc/html/pre-html.cc (PAGE_TEMPLATE, PS_TEMPLATE, - REGION_TEMPLATE): New macros. - (createAllPages, makeTempFiles): Use them. - Include `nonposix.h'. - (html_system): New function. - (createAllPages, createImage): Use it. - Use EXE_EXT. - - * tmac/www.tmac: Fix typos. - -2001-07-03 Werner LEMBERG - - * tmac/www.tmac: Disable hyphenation in normal text only if output - device is html. - (URL, FTP, MAILTO): Disable hyphenation of actual URL with `\%'. - * tmac/groff_mwww.man, NEWS: Updated. - -2001-07-03 Gaius Mulley - - * tmac/www.tmac (.IMAGE): Add fourth parameter to specify vertical - image location. - -2001-07-02 Ruslan Ermilov - - * tmac/doc-common, tmac/doc.tmac (doc-display-ft-stack, - doc-display-ps-stack): Implement font and font size stack for - displays. - -2001-07-02 Werner LEMBERG - - * REVISION: Increased to 2. - * src/roff/troff/input.cc (read_size): Fix special case `\s[0]'. - - * src/groff/grog/grog.pl (process): Handle `Oo' and `Oc' not at the - beginning of a line. - * src/groff/grog/grog.sh: Ditto. - -2001-06-29 Peter Marquardt - - * src/preproc/eqn/neqn.sh: Put `export' keyword in a new line to - make it portable. - -2001-06-27 Werner LEMBERG - - Fix problems with preprocessor string for `man' program. - - * *.man: Don't use `s' in preprocessor string -- it doesn't exist. - Updated/added copyright. - Moved Emacs's local variable to identify nroff mode to the end of - the file; add local variable if missing. - -2001-06-26 Andras Salamon - - * aclocal.m4: Replace AC_LANG_SAVE + AC_LANG_CPLUSPLUS with - AC_LANG_PUSH(C++) and AC_LANG_RESTORE with AC_LANG_POP(C++). - * configure: Regenerated. - -2001-06-25 Andras Salamon - - * aclocal.m4 (GROFF_PAGE): Fix page detection code. - * configure: Regenerated. - -2001-06-24 Werner LEMBERG - - * doc/homepage.ms: Don't include arkup.tmac (which no longer exists) - but www.tmac. - * doc/pic.ms: Fix typos. - -Version 1.17.1 released -======================= - -2001-06-21 Golubev I. N. - - * aclocal.m4 (GROFF_NEED_DECLARATION): Fix inclusion of strings.h. - * configure: Updated. - -2001-06-20 Gaius Mulley - - * src/roff/preproc/html/pre-html.cc (make_message): Fix incorrect - image names. - * src/roff/troff/dic.cc (blank_line): Add html tag. - -2001-06-19 Gaius Mulley - - * src/roff/troff/input.cc (do_suppress): Fix typo. - -2001-06-18 Gaius Mulley - - Added two new options (-D and -I) to specify image names and a - subdirectory to place the images in. - - Change syntax from \\Ox to \\O[x]. - - * src/devices/grohtml/post-html.cc (main): Add options. - (usage): Updated. - * src/preproc/html/pre-html.cc: Include `stdarg.h'. - Use `NULL' instead of `0' for null string pointers. - (MAX_RETRIES): New macro. - (lengthOfintToStr, intToStr, make_message): New functions. - (makeFileName): Make function static. - Implement -D and -I options. - (checkImageDir): New function. - (write_end_image, write_start_image): Use new syntax of \O. - (createAllPages, removeAllPages): Implement -D and -I options. Use - make_message(). - (createImage): Use make_message(). - (addps4html): Add guard for malloc(). - (usage, scanArguments): Updated. - (makeTempFiles): Use mkstemp(). - (removeTempFiles): Use unlink(). - (findPrefix): Add guard for malloc(). - (main): Updated. - * src/roff/troff/input.cc (get_delim_file_name): New function to - parse \O. - (do_suppress): Updated to parse new syntax. - * src/devices/grohtml/grohtml.man: Updated. - * tmac/www.tmac: Updated to new syntax. - - * NEWS: Updated. - -2001-06-15 Werner LEMBERG - - * src/roff/grog/Makefile.sub: Remove NAMEPREFIX. - - * src/devices/grohtml/grohtml.man: Minor improvements. - -2001-06-14 Werner LEMBERG - - * src/preproc/html/Makefile.sub: Remove NAMEPREFIX. - -2001-06-11 Werner LEMBERG - - * man/roff.man, mann/groff.man: Use '\" instead of .\" in the first - line to specify preprocessor options -- mandb 2.3.1 only recognizes - the former. - * src/preproc/grn/grn.man: Add proper '\" string. - -2001-06-11 OKAZAKI Tetsurou - - * test-groff: Don't use PATH but GROFF_BIN_PATH. - -2001-06-08 Werner LEMBERG - - Updated to autoconf 2.50. - - * configure.in: Renamed to... - * configure.ac: This. - * aclocal.m4 (AC_OUTPUT_MAKE_DEFS): Removed. - (GROFF_OS390): Updated. - * configure: Regenerated. - -2001-05-18 Werner LEMBERG - - * src/roff/troff/env.c, src/roff/troff/env.h, - src/roff/troff/input.cc, src/roff/troff/troff.man: Undo `ss' change - from 2000-12-21. - -2001-05-17 Jeffrey Friedl - - * src/roff/troff/input.cc (read_size): Fix special case `\s0'. - -2001-05-16 Werner LEMBERG - - * src/roff/troff/input.cc (read_size): Emit warning if value becomes - less than or equal zero; set it to 1 then. - * src/roff/troff/node.h (node::node): Initialize `last'. - -2001-05-08 Werner LEMBERG - - * tmac/an-old.tmac: Make predefined strings work in compatibility - mode. - Add troff version guard. - * tmac/doc.tmac: Simplify version guard. - -2001-05-07 Werner LEMBERG - - The .ns and .rs requests are now honoured not only in the top-level - but in all diversions (similar to UNIX troff). - - This change is based on a patch from Tadziu Hoffmann - . - - * src/roff/troff/div.h (diversion): Add `no_space_mode' member. - (top_level_diversion): Remove `no_space_mode' member. - * src/roff/troff/div.cc (diversion::diversion, - top_level_diversion::top_level_diversion): Updated. - (macro_diversion::output): Reset `no_space_mode'. - (no_space, restore_spacing): Use `curdiv' unconditionally. - (space_request, blank_line): Check `curdiv->no_space_mode'. - (no_space_mode_reg::get_value, no_space_mode_reg::get_string): Use - `curdiv' unconditionally. - * NEWS, src/roff/troff/troff.man, man/groff.man, doc/groff.texinfo: - Updated. - -2001-05-06 Werner LEMBERG - - Added two new requests `de1' and `am1' which are similar to `de' and - `am' with the difference that compatibility mode is saved on entry, - switched off during macro execution, and restored on exit. - - * src/roff/troff/input.h: Added two new special characters - (COMPATIBLE_SAVE, COMPATIBLE_RESTORE). - * src/roff/troff/input.cc (input_iterator): Added two member - functions `save_compatible_flag' and `get_compatible_flag'. - (input_stack): Ditto. - (string_iterator): Ditto. Also add private member - `saved_compatible_flag'. - (token::next): Use COMPATIBLE_SAVE and COMPATIBLE_RESTORE. - (calling_mode): New enumeration. - (do_define_macro): Use it. Insert COMPATIBLE_SAVE and - COMPATIBLE_RESTORE at the beginning and end of macro, respectively. - (define_macro, define_indirect_macro, append_macro, ignore): Use - `calling_mode'. - (define_nocomp_macro, append_nocomp_macro): New functions. - (init_input_requests): Updated. - (do_request): Rename local variable `saved_compatible_flag' to - `old_compatible_flag'. - * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. - - * tmac/an-old.tmac: Use `de1' instead of `de' request for all - public and trap-invoked macros. As a consequence, the man macros - work in compatibility mode also. - -2001-05-06 Solar Designer - - * Makefile.in: Use $(mandir). - -2001-05-06 Alexios Zavras - - * src/utils/afmtodit/afmtodit.pl: Fix serious typo. - -2001-05-05 Werner LEMBERG - - Added `.ns' number register: Returns 1 in no-space mode (if in - top-level diversion), 0 otherwise. - - * src/roff/troff/div.cc (no_space_mode_reg): New class. - (init_div_requests): Updated. - * NEWS, src/roff/troff/troff.man, man/groff.man, doc/groff.texinfo: - Document it. - -2001-05-04 Werner LEMBERG - - * src/roff/nroff/nroff.man: Improved documentation (especially - locales). - -2001-05-02 Werner LEMBERG - - Added `brp' request: This is \p as a request. - - * src/roff/troff/env.cc (environment::do_break): Add parameter - `spread'. - (do_break_request): New function (was `break_request'). - (break_request): Calls `do_break_request'. - (break_spread_request): New; calls `do_break_request'. - (init_env_requests): Updated. - * src/roff/troff/env.h: Updated. - * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. - - * REVISION: Increased to 1. - * win32-diffs: Updated. - -2001-05-01 Werner LEMBERG - - * tmac/an-old.tmac: Fix minor compatibility mode issue. - * tmac/troffrc-end: Make it really work in compatibility mode. - -2001-04-27 Werner LEMBERG - - * src/utils/lkbib/lkbib.cc: Switch inclusion order of stdio.h and - stdlib.h. - -2001-04-22 Werner LEMBERG - - * src/libs/libgroff/getopt.c, src/include/getopt.h: Updating to - latest versions from glibc CVS archive. - - * MORE.STUFF: Updated, using a patch from Kees Zeelenberg - . - -2001-04-21 Werner LEMBERG - - * configure.in: Move check for mkstemp() to... - * aclocal.m4 (GROFF_MKSTEMP): This new function. - * configure: Regenerated. - - * src/include/groff-getopt.h: Don't use variable names in - declarations. - - * src/devices/grohtml/html-chars.h: Removed. It isn't used. - * src/devices/grohtml/Makefile.sub, - src/devices/grohtml/post-html.cc: Updated. - -2001-04-21 Albert Chin-A-Young - - * configure.in: Add special check for mkstemp(). - * src/libs/libgroff/tmpfile.cc: Use it. - * src/utils/indxbib/indxbib.cc: Ditto. - * src/utils/pfbtops/pfbtops.c (main): Don't use C++ comment style. - * src/devices/grolbp/lbp.h (lbpprintf, lbpputs, vdmprintf): Use - `const'. - -2001-04-20 Bruce Lilly - - `Version_string' as C++ object was not visible to linker from C - object files. - Add `const' to `Version_string'. - - * src/utils/pfbtops/pfbtops.c (main), src/roff/groff/groff.cc - (main), src/roff/troff/input.cc (main), src/preproc/tbl/main.cc - (main), src/preproc/pic/main.cc (main), src/preproc/eqn/main.cc - (main), src/preproc/grn/main.cc (main), src/preproc/html/pre-html.cc - (scanArguments), src/preproc/refer/refer.cc (main), - src/preproc/soelim/soelim.cc (main), src/devices/grotty/tty.cc - (main), src/devices/grodvi/dvi.cc (main), src/devices/grolj4/lj4.cc - (main), src/devices/grohtml/post-html.cc (main), - src/devices/grolbp/lbp.cc (main), src/utils/tfmtodit/tfmtodit.cc - (main), src/utils/hpftodit/hpftodit.cc (main), - src/utils/lookbib/lookbib.cc (main), src/utils/indxbib/indxbib.cc - (main), src/utils/lkbib/lkbib.cc (main), - src/utils/addftinfo/addftinfo.cc (main): Implement it. - - * src/roff/groff/pipeline.c: Add _UWIN. - * src/include/nonposix.h: Ditto. - -2001-04-20 Werner LEMBERG - - * src/include/lib.h: Use HAVE_STRERROR. - * src/roff/groff/pipeline.c: Ditto. - * src/preproc/html/pre-html.cc: Remove declaration of `strerror'. - * src/libs/libgroff/Makefile.sub (version.cc): Add `extern "C"'. - * src/utils/pfbtops/pfbtops.c: Add copyright notice. - * win32-diffs: Updated. - * src/utils/hpftodit/hpftodit.cc (read_map): Fix compiler warning. - -2001-04-19 Werner LEMBERG - - * src/preproc/html/pre-html.cc (scanArguments): Use `troff_command' - instead of hardwired `"troff"'. - (char_buffer::read_file): Remove unused variables. - (char_buffer::write_file_troff): Ditto. - (char_buffer::write_file_html): Ditto. - (generateImages): Ditto. - (abs): Removed. - * src/utils/addftinfo/addftinfo.cc (main): Fix compilation problem. - - * src/include/lib.h: Don't include `groff-getopt.h' for UWIN. - - * src/libs/libgroff/font.cc (font::load_desc): Fix compiler warning. - * src/libs/libbib/index.cc (index_search_item_iterator::get_tag, - index_search_item::search1): Ditto. - * src/roff/troff/node.h (width_list): Reorder members. - * src/roff/troff/input.cc (do_define_macro): Fix compiler warning. - (lookup_warning): Ditto. - (prepend_string): Commented out. - * src/roff/troff/dictionary.cc (is_good_size): Fix compiler warning. - * src/roff/troff/reg.cc (number_value_to_ascii): Ditto. - * src/preproc/tbl/main.cc (process_format): Ditto. - * src/preproc/pic/pic.y (define_variable, reset, reset_all): Fix - compiler warnings. - * src/preproc/pic/pic.cc: Updated. - * src/preproc/eqn/lex.cc (init_table): Fix compiler warnings. - * src/preproc/eqn/over.cc (over_box::compute_metrics): Ditto. - * src/preproc/refer/command.cc (execute_command): Ditto. - * src/preproc/refer/ref.cc (sortify_title, find_month): Ditto. - * src/preproc/refer/token.cc (lookup_token): Ditto. - * src/preproc/soelim/soelim.cc: Ditto. - * src/preproc/html/pushbackbuffer.cc (ERROR): Ditto. - (isHexDigit): Commented out. - (pushBackBuffer::isString): Remove unused variable. - * src/devices/grops/ps.cc (ps_printer::special): Fix compiler - warning. - * src/devices/grops/psrm.cc (resource_manager::lookup_font, - resource_manager::read_resource_arg, read_one_of, parse_extensions): - Ditto. - * src/devices/grodvi/dvi.cc (dvi_printer::draw): Ditto. - * src/devices/grolj4/lj4.cc (lj4_font::handle_unknown_font_command, - lookup_paper_size): Ditto. - * src/devices/grohtml/post-html.cc (is_subsection): Commented out. - (text_glob, element_list): Reorder members. - * src/devices/grohtml/html-text.cc (html_text::do_pre): Remove - compiler warning. - * src/devices/grohtml/html-text.h (html_text::emit_space): Change - return value to `void'. - * src/devices/grohtml/output.cc (word_list::word_list): Fix order - of initializers. - * src/devices/grohtml/html.h (simple_output::check_newline, - simple_output::space_or_newline, simple_output::enable_newlines): - Add return value. - * src/devices/grolbp/lbp.cc (wp54charset, set_papersize): Remove - compiler warnings. - * src/utils/tfmtodit/tfmtodit.cc (tfm::load, gf::load, main): Ditto. - * src/utils/hpftodit/hpftodit.cc (File::seek, read_symbol_sets, - output_ligatures, output_charset, read_map): Ditto. - * src/utils/lookbib/lookbib.cc (main): Ditto. - * src/utils/indxbib/indxbib.cc (main, fwrite_or_die): Ditto. - (do_file): Fix typo (`=' -> `=='). - * src/utils/lkbib/lkbib.cc (main): Remove compiler warning. - * src/utils/addftinfo/addftinfo.cc (main): Ditto. - -2001-04-18 Ruslan Ermilov - - * src/roff/nroff/nroff.sh: Adding -p (pic) and -t (tbl) options. - Fix usage of GROFF_BIN_PATH. - * src/roff/nroff/nroff.man: Updated. - -2001-04-18 Werner LEMBERG - - * NEWS: Fixing typos. - Updated. - -Version 1.17 released -===================== - -2001-04-17 Werner LEMBERG - - * tmac/Makefile.sub (install-data): mdoc.local-s is in current - directory, not in $(srcdir). - -2001-04-16 Werner LEMBERG - - * doc/groff.texinfo: More info on conditionals. - -2001-04-15 Werner LEMBERG - - * doc/groff.texinfo: Added some info about groff internals. - - * src/roff/troff/node.cc (make_glyph_node): Emit warning message - about missing special character only if the name is non-null. - -2001-04-14 Werner LEMBERG - - Removing the grohtml-old device driver which is now obsolete. - - * src/devices/grohtml-old/*: Removed. - * font/devhtml-old/*: Removed. - * src/libs/libgroff/htmlindicate.cc (graphic_start, graphic_end): - Remove comments. - * Makefile.in (CCPROGDIRS, DEVDIRS): Updated. - * test-groff (PATH): Updated. - * tmac/Makefile.sub (NORMALFILES): Updated. - * tmac/an-old.tmac: Remove special code for html-old device. - Replace `html-or-html-old' register with `an-html'. - * tmac/eqnrc: Updated. - * tmac/html-old.tmac: Removed. - * tmac/troffrc, tmac/troffrc-end: Updated. - * tmac/www.tmac: Remove special code for html-old device. - Replace `html-or-html-old' register with `www-html'. - - * src/libs/libgroff/tmpfile.cc (remove_tmp_files), - src/libs/libgroff/htmlindicate.cc (graphic_end), - include/htmlindicate.h, src/preproc/grn/*.cc, - src/roff/groff/env.{cc,h}: Remove `void' parameter if used as a - single argument for consistency with rest of source code. - - * aclocal.m4, tmac/an-old.tmac: Fix copyright. - -2001-04-13 Ruslan Ermilov - - * src/roff/troff/troff.man: Fixing typos. - -2001-04-13 Werner LEMBERG - - * doc/pic.ms: Fixing many font switches. - * doc/groff.texinfo: Fixes, additions. - * MORE.STUFF: Updated. - -2001-04-12 Gaius Mulley - - * src/devices/grohtml/grohtml.man: Updated manual page regarding - simple anchor. - * src/preproc/html/pre-html.cc (createImage): Fixed right hand - cropping of images. - (removeTempFiles): New function to tidy up temporary files. - * src/preproc/html/pre-html.cc (main): Calls `removeTempFiles()'. - Many fixes to do with the new inline suppress node and image regions - are much tighter. - * src/devices/grohtml/post-html.cc: New method `is_auto_img'. - (generate_img_src): New function. - (html_printer::do_auto_image): Utilizes it. - (do_heading, do_title): Include inline images within their contents. - (html_printer::begin_page): Tidied up comments that are issued to - the html output file. - (html_printer::do_fill): Fixed so that `.nf' works with fonts other - than courier. - (text_glob::is_br): New method used by do_heading. - * tmac/s.tmac: If -Thtml then emit $1 in .IP rather than its - equivalent diversion. - * src/include/html-strings.h: Altered image tags to reflect the - inline image node. - * src/include/htmlindicate.h (html_end_suppress): Added `is_inline' - parameter. - * src/preproc/eqn/main.cc: Will suppress generation of image tags if - it is already inside a pic image. Only emit tags if the argument - `-Tps:html' is present. - * src/preproc/tbl/main.cc: Changes to reflect additional - `html_end_suppress' parameter. - * src/roff/troff/env.cc: Only emit eol tag if a node has been - emitted since the last eol tag was written. - * src/roff/troff/env.h: New boolean `emitted_node'. - * src/roff/troff/input.cc (do_suppress): Handles extra suppress - nodes \O3, \O4, \O5. No longer use `output_low_mark_miny'. - * src/roff/troff/node.cc (check_charinfo): New method. - (troff_output_file::determine_line_limits): Alterations to limit - checking. - * tmac/www.tmac: Changes to reflect new suppress nodes. - -2001-04-12 Bruno Haible - - * src/devices/grohtml/post-html.cc (html_printer::add_to_sbuf): - Escape the html_glyph in the buffer. - (str_translate_to_html): Output the unescaped escaped_char. - * src/devices/grohtml/html-text.cc (issue_table_begin): Set - `frame=void', not `frame=none'. Add `border=0'. - -2001-04-12 Werner LEMBERG - - * PROBLEMS: Add some words on how to avoid wrapper macros. - -2001-04-11 Blake McBride - - * src/include/nonposix.h (fileno) [_MSC_VER]: Removed. - -2001-04-11 Werner LEMBERG - - * font/devlbp/Makefile.sub (CLEANADD): Set it. - * tmac/Makefile.sub (CLEANADD): Add tmac.local-s. - * Makefile.in (dist): Don't remove src/xditview/Imakefile, but ... - * Makefile.sub (DISTCLEANFILES): Here. - - * libs/libgroff/new.cc: Include `nonposix.h'. - * win32-diffs: Updated. - -2001-04-10 Ruslan Ermilov - - Added skeleton macro for defunct macros. - - Updated documentation. - - When inside displays, an empty input line warning should be - suppressed. If another macro call is put inside a display, - all subsequent empty lines found in that display caused a - warning to be emitted. - - * tmac/doc.tmac (doc-defunct-macro): New macro. - (Db, Ds, Ex, Or, Sf): Reimplemented using this macro. - (doc-restore-global-vars): Fixed typo. - (doc-empty-line): Check the `doc-display-depth' register to - determine whether we are inside display or not. - - * tmac/doc-common: Removed `Or' and `Sf' registers. - Moved obsolete `Ds' macro to doc.tmac. - - * tmac/groff_mdoc.man: Bump document date. - Document `.Vt' under ``Variable Types''. - Removed documentation for obsolete `.Or' macro. - -2001-04-10 Werner LEMBERG - - * NEWS: Updated. - * doc/groff.texinfo: Many fixes, additions, clarifications, etc. - -2001-04-10 Bruno Haible - - * src/devices/grodvi/dvi.cc (main): Accept --help and --version. - (usage): Add stream argument. Don't exit. - * src/devices/grohtml/post-html.cc (main): Accept --help and --version. - Write --version output to stdout, not stderr. - (usage): Add stream argument. Don't exit. - * src/devices/grohtml-old/html.cc (main): Accept --help and --version. - (usage): Add stream argument. Don't exit. - * src/devices/grolbp/lbp.cc (long_options): Use symbolic getopt.h - constants. - (usage): Add stream argument. Don't exit. - (main): Write --help output to stdout, not stderr. - * src/devices/grolj4/lj4.cc (main): Accept --help and --version. - (usage): Add stream argument. Don't exit. - * src/devices/grops/ps.cc (main): Accept --help and --version. - (usage): Add stream argument. Don't exit. - * src/devices/grotty/tty.cc (main): Accept --help and --version. - (usage): Add stream argument. Don't exit. - * src/preproc/eqn/main.cc (usage): Add stream argument. Don't exit. - (main): Accept --help and --version. - * src/preproc/grn/main.cc (usage): Add stream argument. Don't exit. - (main): Accept --help and --version. - * src/preproc/html/pre-html.cc (usage): Add stream argument. - (scanArguments): Accept --help and --version. - * src/preproc/pic/main.cc (usage): Add stream argument. Don't exit. - (main): Accept --help and --version. - * src/preproc/refer/refer.cc (main): Accept --help and --version. - (usage): Add stream argument. Don't exit. - * src/preproc/soelim/soelim.cc (usage): Add stream argument. Don't - exit. - (main): Accept --help and --version. - * src/preproc/tbl/main.cc (usage): Add stream argument. Don't exit. - (main): Accept --help and --version. - * src/roff/groff/groff.cc (main): Accept --help and --version. - (synopsis): Add stream argument. - (help): Write --help output to stdout, not stderr. - (usage): Add stream argument. Don't exit. - * src/roff/grog/grog.pl: Accept --help and --version. - (help): New sub. - * src/roff/grog/grog.sh: Accept --help and --version. - * src/roff/nroff/nroff.sh: Accept --help and --version. - * src/roff/troff/input.cc (USAGE_EXIT_CODE): Remove macro. - (usage): Add stream argument. Don't exit. - (main): Accept --help and --version. - * src/utils/addftinfo/addftinfo.cc (main): Accept --help and --version. - (usage): New function with stream argument, doesn't exit. - * src/utils/hpftodit/hpftodit.cc (main): Accept --help and --version. - (usage): New function with stream argument, doesn't exit. - * src/utils/indxbib/indxbib.cc (main): Accept --help and --version. - (usage): Add stream argument. Don't exit. - * src/utils/lkbib/lkbib.cc (usage): Add stream argument. Don't exit. - (main): Accept --help and --version. - * src/utils/lookbib/lookbib.cc (usage): Add stream argument. Don't - exit. - (main): Accept --help and --version. - * src/utils/pfbtops/pfbtops.c (usage): Add stream argument. Don't exit. - (main): Accept --help and --version. - * src/utils/tfmtodit/tfmtodit.cc (main): Accept --help and --version. - (usage): Add stream argument. Don't exit. - -2001-04-10 Ruslan Ermilov - - Fix indentation in SYNOPSIS. - - Updated to include changes of latest BSD mdoc version (basically, - the only change is that `.Fn' and `.Fc' put a final semicolon after - a function declaration in the SYNOPSIS section). - - * tmac/doc.tmac (doc-in-synopsis-count): Replaced with ... - (doc-in-synopsis-section): New variable. Updated all related - functions. - (doc-indent-synopsis-active): New register. - (Nd, Fn, Fo): Use it. - (Cd): It requires manipulation of \n[doc-indent-synopsis] so that - `.Cd' with long argument line produces indented wrapped lines. - Also, the misplaced `.nop \*[doc-Nm-font]\c'' caused extra - undesirable line break to be output. - (doc-do-func-decl, Nm, Vt, Fn, Fo): Remove extraneous calls to - `.rs'. - (Fn, Fc): Add final `;' to output. - (doc-save-global-vars, doc-restore-global-vars): Updated. - * tmac/doc-common: Remove `Ex' register. - Updated. - * tmac/doc-ditroff, tmac/doc-nroff, tmac/doc-syms: Updated - copyright. - -2001-04-06 Ruslan Ermilov - - * tmac/doc.tmac (Cd): Simplify code. - * tmac/groff_mdoc.man: Document some behaviour of `Cd' request. - -2001-04-06 Werner LEMBERG - - Implement continuous underlining for nroff mode. To do that, a new - request in the ditroff language has been added: `x u N' (N is 0 - or 1). - - \X and \Y are now transparent to end-of-sentence recognition. - - * src/include/printer.h (printer): Add `type' parameter to `special' - method. - * src/libs/libdriver/printer.cc (printer::special): Updated. - * src/libs/libdriver/input.cc (do_file): Handle `x u N'. - - * src/devices/dvi/dvi.cc (dvi_printer::special): Handle only - specials of type `p'. - * src/devices/grohtml/post-html.cc (html_printer::special): Ditto. - * src/devices/grohtml-old/html.cc (html_printer::special): Ditto. - * src/devices/grops/ps.cc (ps_printer::special): Ditto. - * src/devices/grotty/tty.cc: Add new enum CU_MODE. - (glyph::order): New method. - (tty_printer::add_char): Use it. - (tty_printer::special): New method. - (tty_printer::end_page): Implement it. - - * src/roff/troff/node.h (special_node): Add `no_init_string' member. - * src/roff/troff/node.cc (special_node::special_node): Add parameter - to set `no_init_string'. - (special_node::tprint_start): Use it. - (special_node::same, special_node::copy): Updated. - (special_node::ends_sentence): New method. - (troff_output_file::start_special): Add parameter to include - inititialization of special conditionally. - - * src/roff/troff/env.h (environment): New member `underline_spaces'. - * src/roff/troff/env.cc (do_underline_special): New function. - (environment::set_font): Use it. - (do_underline): Use it. This was `underline()'. - (underline): Call `do_underline()'. - (continuous_underline): New function which calls `do_underline()'. - (environment::newline): Use `do_underline_special()'. - (init_env_requests): Updated. - - * NEWS, man/troff_out.man: Updated. - -2001-04-06 Bruno Haible - - * font/devutf8/R.proto: Fix code of 'shc'. - -2001-04-06 Ruslan Ermilov - - Many fixes. Diag lists can now be nested also; additionally, - `-compact' and `-offset' are supported. - - * tmac/doc.tmac (doc-have-indent): Replaced with ... - (doc-list-have-indent-stackXXX): A new register stack. - (doc-have-diag-list): Removed. - (Bl): Use `doc-list-have-indent-stackXXX'. - (El): Updated. - (doc-diag-list): Use `doc-compact-list-stackXXX'. - (doc-tag-list): Use `doc-list-have-indent-stackXXX'. - (doc-set-vertical-and-indent): Ditto. - (doc-next-list-depth): Removed. - (doc-increment-list-stack): Updated. - (doc-decrement-list-stack): Use `doc-list-depth' instead of - `doc-next-list-depth'. - (doc-end-list, doc-end-column-list): Don't use - `doc-increment-list-stack'. - (doc-set-column-tab): Don't use `doc-list-offset-stackXXX'. - (doc-save-global-vars, doc-restore-global-vars): Updated. - * tmac/doc-common: Updated. - * tmac/groff_mdoc.man: Updated. - * NEWS: Fix typo. - -2001-04-02 Werner LEMBERG - - * src/devices/grotty/grotty.man: Fix grammatical error. - -2001-03-30 Ruslan Ermilov - - Remove .Ld from mdoc package; replace it with special handling of - `...'. - - * tmac/doc-common: Remove `Ld' register. - Uncomment `doc-volume-ds-*' strings. - Remove `doc-operating-system-default'. - (Os): Updated. - * tmac/doc-syms (Ld): Removed. - * tmac/doc.tmac (doc-parse-args, doc-parse-arg-vector): Handle - `...' specially. - * NEWS: Updated. - - * tmac/groff_mdoc.man: Many fixes and updates. - -2001-03-29 Werner LEMBERG - - * tmac/troffrc-end: Protect data with `.do'. Reported by T. Kurt - Bond . - * tmac/www.tmac: Save compatibility mode. - -2001-03-28 Ruslan Ermilov - - * tmac/groff_mdoc.man: Many fixes. - -2001-03-28 Werner LEMBERG - - * src/preproc/soelim/soelim.man: Document that `.so' - isn't recognized. - -2001-03-27 Werner LEMBERG - - * tmac/an-old.tmac (TP, an-do-tag): Reduce line length while in - diversion. This fixes overlong tags. - -2001-03-26 Werner LEMBERG - - * doc/groff.texinfo: Fixed and improved documentation of fonts. - * tmac/doc-syms: Fix error messages. - * tmac/an-old.tmac: Remove incorrect double backslashes. - -2001-03-24 Ruslan Ermilov - - * tmac/Makefile.sub: Strip mdoc.local also - * tmac/strip.sed: Fixed. - -2001-03-24 Werner LEMBERG - - * tmac/doc-nroff, tmac/doc-ditroff: Implement -rSxx switch for - selecting the font size. - * tmac/groff_mdoc.man, NEWS: Document it. - -2001-03-23 Werner LEMBERG - - * src/roff/troff/div.cc (save_vertical_space): Add default argument - to `sv' request. - * src/roff/troff/env.cc (family_change): Make `.fam' accept no - argument to restore previous font family. - * src/roff/troff/troff.man, man/groff.man, NEWS: Updated. - - * doc/groff.texinfo: More fixes and additions (mainly for font - manipulating commands). - - * tmac/groff_mdoc.reference.man: Small updates and renamed to ... - * tmac/groff_mdoc.man: This. The quick reference has been removed. - * tmac/Makefile.sub, NEWS: Updated. - -2001-03-23 Werner LEMBERG - - Replaced mdoc implementation. The new version is `state of the - art', using almost all new features of groff 1.17 -- it won't run - with older versions. - - * tmac/doc.tmac: Completely rewritten. - * tmac/doc-common: Ditto. - * tmac/doc-nroff: Ditto. - * tmac/doc-ditroff: Ditto. - * tmac/doc-syms: Ditto. - * tmac/mdoc.local: New file. - * tmac/groff_mdoc.samples.man: Replaced with ... - * tmac/groff_mdoc.reference.man: New file, covering mdoc completely. - * tmac/strip.sed: Updated. - * tmac/Makefile.sub: Updated. - * INSTALL: Updated. - - * tmac/groff_man.man: Add `man.local' to the FILES section. - -2001-03-22 Werner LEMBERG - - * doc/groff.texinfo: Added many @noindent. - Replaced @end_Example -> @endExample. - Added info whether registers are r/o. - Many other additions and fixes. - -2001-03-21 Werner LEMBERG - - * doc/groff.texinfo: Added macro @Var (and some hacks due to bugs - in makeinfo of texinfo 4.0) to be used in @Def* macros. - Improved @Def* macros: Now the exact syntax of request, register, - and escapes is shown. - Added macros for parentheses and brackets to be used in @Def*. - Many fixes and improvements of the documentation. - -2001-03-20 Werner LEMBERG - - * doc/groff.texinfo: Added new index: `st' (for strings). - Added macros @Defstr(x). - Added macro @Example (adding @group). - Other minor improvements. - -2001-03-19 Werner LEMBERG - - * doc/groff.texinfo: Added two new indices: `es' (for escapes) and - `rq' for requests. `fn' is no longer used. - Added macros @Defreq(x), @Defreg(x), and @Defesc(x). - Removed @Deffn(x). - - * tmac/an-old.tmac (an-p-footer): If `cR' is set, replace page - number with name of man page. - -2001-03-19 Larry Kollar - - * doc/groff.texinfo: Complete revision. Added many @Deffn to gain - consistency. - -2001-03-19 Werner LEMBERG - - * man/groff_font.man: Document `prepro', `postpro', and `print'. - * src/roff/groff/groff.man: Improve documentation of `-l' and `-L'. - * src/devices/grohtml/grohtml.man: Fixing typos. - -2001-03-19 Gaius Mulley - - * tmac/s.tmac (@IP): Pass `.ip' html tag. - * tmac/groff_mwww.man: Remove .LINE macro - * tmac/www.tmac (LINE): Add `.ti'. - - * src/devices/grohtml/post-html.cc (html_printer): New member - `indent'. - (html_printer::emit_raw): Use it. - (html_printer::do_linelength): Ditto. - (html_printer::do_pageoffset): Ditto. - (html_printer::do_indentation): Ditto. - (html_printer::do_tempindent): Ditto. - (html_printer::do_break): Ditto. - (html_printer::begin_page): Ditto. - (html_printer::do_indentedparagraph): New function. - (html_printer::troff_tag): Handle `.ip'. - * src/devices/grohtml/html-text.cc (html_text::issue_table_begin): - Add `
' handling. - (html_text::do_table): Add parameter. - (html_text::do_indent): Updated. - * src/devices/groohtml/html-text.h: Updated. - -2001-03-16 Gaius Mulley - - Introduced simple html tables to implement indentation. - - * src/devices/grohtml/html.h (word, word_list): New structures. - (simple_output): Use it. - * src/devices/grohtml/post-html.cc: Add `INDENTATION'. - (html_printer): Improve indentation handling. - (html_printer::emit_raw): Set `in_table' element. Handle - indentation if set. - (html_printer::write_header): Move conditional downwards. - Don't allow whitespace in tags. - (html_printer::do_linelength): Handle line length and indentation - conditionally. - (html_printer::do_pageoffset): Handle indentation conditionally. - (html_printer::do_indentation): Ditto. - (html_printer::do_tempindent): New function member. - (html_printer::do_fill): Take care of indentation. - (html_printer::do_flush): Finish table. - (html_printer::do_links): Ditto. - (html_printer::do_break): New function for handling `.br' and `.ti'. - (html_printer::troff_tag): Use it. - Handle `.ti'. - (html_printer::flush_globs): Fix. - (html_printer::flush_page): Finish table. - (html_printer::html_printer): Fix error message. Set up - `linelength'. - (html_printer::add_to_sbuf): Remove special handling of character - code 255. - (to_unicode): Remove `stop()'. - (html_printer::write_title): Cleanup. - (html_printer::begin_page): Use `put_string()'. Handle indentation. - (html_printer::~html_printer): Flush text and end the line. - Use `put_string()'. - * src/devices/grohtml/html_text.h: Add more *_TAG enum values. - * src/devices/grohtml/html_text.cc (html_text::end_tag): Fix - emission of tags. - (html_text::start_tag): Disable newlines. - (html_text::table_is_void): New function. - (html_text::issue_table_begin): Ditto. - (html_text::issue_table_end): Ditto. - (html_text::push_para): Better table handling. - (html_text::do_indent): New function. - (html_text::do_table): Ditto. - (html_text::done_table): Ditto. - (html_text::do_tt): Handle PRE_TAG. - (html_text::is_in_table): New function. - (html_text::check_emit_text): Handle tables. - (html_text::do_emittext): Use `nl()'. - (html_text::do_para): Handle table. - (html_text::remove_def): New function. - * src/devices/grohtml/output.cc (word, word_list): Implement - methods. - (simple_output::end_line): Flush last word. - (simple_output::simple_comment): Ditto. - (simple_output::begin_comment): Recoded. - (simple_output::end_comment): Ditto. - (simple_output::comment_arg): Removed. - (simple_output::check_newline): Improve test and flush last word. - (simple_output::space_or_newline): Improved. - (simple_output::write_newline): Replaced with... - (simple_output::nl): This. - (simple_output::put_raw_char): Flush last word. - (simple_output::check_space): Removed. - (simple_output::put_translated_string): Ditto. - (simple_output::put_string): Simplified. - (simple_output::put_number): Updated. - (simple_output::put_float): Ditto. - (simple_output::put_symbol): Removed. - (simple_output::enable_newlines): Add `check_newline()'. - (simple_output::flush_last_word): New function. - - * src/roff/troff/enc.cc (no_fill): Remove call to add_html_tag(). - * src/roff/troff/div.cc (page_offset): Add call to add_html_tag(). - - * tmac/s.tmac (@PP, @IP): Add html conditional code. - * tmac/an-old.tmac (TP): Ditto. - -2001-03-09 Ruslan Ermilov - - * mdate.sh: Make it POSIX compliant. - -2001-03-09 Werner LEMBERG - - Added the `return' request to end a macro immediately. It simply - pops iterators from the input stack until a macro iterator is found. - - * src/roff/troff/input.cc (input_iterator::is_macro, - macro_iterator::is_macro): New member. - (input_return_boundary): New class to signal an immediate return - to while_request(). - (input_stack::add_return_boundary, input_stack::is_return_boundary): - New functions. - (input_stack::clear): Use it. - (input_stack::pop_macro): New function. - (while_request): Use `is_return_boundary()'. - (return_macro_request): New function. - (init_input_requests): Use it. - - * src/roff/troff/TODO: Updated. - * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. - -2001-03-08 Werner LEMBERG - - * src/roff/troff/input.cc (input_iterator::is_boundary): Minor - cleanup. - -2001-03-07 Werner LEMBERG - - Make `\B' more rigid. - - * src/roff/troff/number.cc (parse_expr, parse_term): Add `rigid' - parameter. - (get_number_rigidly): New function. - * src/roff/troff/input.cc (do_expr_test): Use it. - * src/roff/troff/token.h: Updated. - - * src/roff/troff/request.h: Fix typo (init_html_request -> - init_markup_request). - -2001-03-04 Gaius Mulley - - Fixed grohtml handling of any named glyph for glyph indexes < 0x80. - Cosmetic changes to `.html-begin', `.html-end', `.html-image' which - are now `.begin', `.end', `.image'. - - * src/devices/grohtml/post-html.cc: Adding UNICODE_DESC_START. - (html_printer::add_to_sbuf): Changing type of `code' parameter. - Use add_char_to_sbuf(). - (to_unicode): New function. - (char_translate_to_html): Changing type of `ch' parameter. - Use `to_unicode()'. - (html_printer::~html_printer): Comment out doctype string. - * src/preproc/html/pre-html.cc (write_end_image): Use `.end' - instead of `.html-end'. - (write_start_image): Use `.begin' and `.image' instead of - `.html-begin' and `.html-image'. - * src/roff/troff/input.cc: Rename `html_level' to `begin_level'. - (html_begin): Renamed to ... - (begin): This. - (html_end): Renamed to ... - (end): This. - (html_image): Renamed to ... - (image): This. - (init_html_requests): Renamed to ... - (init_markup_requests): This. - * tmac/www.tmac: Updated. - -2001-02-28 Bram - - * src/libs/libgroff/font.cc (font_widths_cache): Fixing syntax of - constructor. - -2001-02-26 David Leonard - - * doc/meref.me: Fixing some typos. - -2001-02-16 Werner LEMBERG - - * src/roff/troff/node.cc (space_node::get_hyphenation_type): New - method. Return `HYPHEN_MIDDLE' if it was `\:'. - * src/roff/troff/node.h: Updated. - -2001-02-17 Ruslan Ermilov - - * tmac/groff_tmac.man: Fix typo. - -2001-02-16 Werner LEMBERG - - Fixing a bug which prevented proper end-of-sentence recognition - between an `unformatted' box and the following text. As a - consequence, vertical line distances are no longer preserved in - boxes after a call to `.unformat' -- because boxes aren't - line-oriented (contrary to diversions), this doesn't make sense - anyway. - - * src/roff/troff/node.cc (*node::set_unformat_flag): Add return - value. - (vertical_size_node::set_unformat_flag): New method. - * src/roff/troff/node.hh: Updated. - * src/roff/troff/input.cc (word_space_node::reread, - hmotion_node::reread): Reset `unformat' flag after usage. - (unformat_macro): Append only if `set_unformat_flag()' returns - non-zero. - * src/roff/troff/troff.man: Updated. - -2001-02-15 Werner LEMBERG - - * src/roff/troff/troff.man, NEWS, man/groff.man: Improved - documentation of `asciify' and `unformat' requests. - -2001-02-13 Werner LEMBERG - - Redesigned the `unformat' request. It is no longer connected with - `asciify' but rather uses new `reread()' methods if the `unformat' - flag is set. Additionally, the handling of space characters after - unformatting has been fixed so that they retain their width. - - * src/roff/troff/node.h (width_list): New structure to store - original widths of spaces. - (node): Added `unformat' member. - Replaced `num_spaces' variable with `orig_width' list. - * src/roff/troff/node.cc (*node::asciify, - asciify_reverse_node_list): Removed `unformat_only' flag and related - code. - (word_space_node::asciify, word_space_node::word_space_node): Use - `orig_width'. - (word_space_node::~word_space_node): New destructor. - (word_space_node::copy): Updated to handle `orig_width'. - (hmotion_node::copy, unbreakable_space_node::copy): Updated. - (*node::merge_space): Update `orig_width' list if necessary. - (*node::set_unformat_flag): New methods to set the `unformat' flag. - * src/roff/troff/enc.cc (environment::space_newline): Use - `width_list'. - (environment::space): Added method to handle space width and - sentence space width as parameters. Use `width_list'. - (environment::make_tab_node): Updated. - * src/roff/troff/env.h: Updated. - * src/roff/troff/input.cc (word_space_node::reread, - unbreakable_space_node::reread, hmotion_node::reread): New methods - to handle nodes specially if `unformat' flag is set. - (do_asciify_macro): Renamed back to ... - (asciify_macro): This. - (unformat_macro): New implementation to simply set the `unformat' - flag. - - * MORE.STUFF: Added more info about deroff. - -2001-02-08 Werner LEMBERG - - * src/roff/troff/node.h (unbreakable_space_node, hmotion_node, - space_char_hmotion_node, overstrike_node): Add `get_hyphen_list()' - and `add_self()' methods to avoid hyphenation. For example, the - hyphen list for `foo\0\0bar' was `foobar', causing insertion of a - soft hyphen after `foo'. Now the hyphen list is correctly - `foobar'. - -2001-02-05 Yoshiteru Kageyama - - * tmac/groff_tmac.man: Fix `BIR' macro. - -2001-02-04 Werner LEMBERG - - A new escape sequence `\:', inserting a zero-width break point. - - * src/roff/troff/input.h: Adding `ESCAPE_COLON'. - * src/roff/troff/input.cc (get_copy, token::next, asciify): - Implement it. - * src/roff/troff/node.h (node): Add `is_escape_colon()' virtual - method. - (space_node): Add `was_escape_colon' member. Add `is_escape_colon()' - and `asciify()' methods. - * src/roff/troff/node.cc (space_node::space_node): Updated. - (space_node::asciify): Handle `was_escape_colon'. - * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. - - Handle `\~' similar to other comparable requests. - - * src/roff/troff/input.cc (process_input_stack): Remove now obsolete - label. - (token::next): Move creation of an unbreakable_space_node to... - (token::add_to_node_list): Here. - - Fix a bug which sometimes prevented hyphenation of words connected - with `\~' or `\ ' (and other escape sequences handled as - TOKEN_NODE). This also fixes a hyphenation problem with boxes - (after a call to the `unformat' request). - - * src/roff/troff/env.h (environment::possibly_break_line, - environment::hyphenate_line): Introducing `start_here' parameter. - * src/roff/troff/env.cc (environment::space_newline, - environment::space): Use it. - (environment::possibly_break_line, environment::hyphenate_line): - Implement it. - * src/roff/troff/input.cc (process_input_stack): Use it. - * src/roff/troff/node.h (unbreakable_space_node, hmotion_node, - space_char_hmotion_node, overstrike_node): Add - `get_hyphenation_type()' method. - * src/roff/troff/node.cc (break_char_node::asciify): Don't asciify - if `unformat_only' is active. - -2001-01-30 Werner LEMBERG - - Implemented new read-only number register `.linetabs' which - returns 1 if in line-tabs mode, 0 otherwise. - - * src/roff/troff/env.h (environment): Add get_line_tabs() member. - * src/roff/troff/env.cc (get_line_tabs): New function. - (init_env_requests): Use it. - * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. - - * VERSION, REVISION: Changing to 1.17.0. - -2001-01-28 Werner LEMBERG - - Fixed a bug which prevented hyphenation of words which are finished - with `\)'. - - * src/roff/troff/token.h (token): Add enum type - `TOKEN_TRANSPARENT_DUMMY' and method `transparent_dummy()'. - * src/roff/troff/input.cc (token::next, token::description, - get_line_arg, token::add_to_node_list, token::process): Use it. - -2001-01-27 Werner LEMBERG - - * src/roff/troff/div.h (diversion): Add `saved_prev_line_interrupted'. - * src/roff/troff/div.cc (do_divert): Use it. - - * src/roff/troff/input.cc (asciify): Add ESCAPE_RIGHT_PARENTHESIS. - -2001-01-25 Werner LEMBERG - - Adding the `linetabs' request. If set, tab distances are not - computed relative to the input line but relative to the output line. - - * src/roff/troff/env.h (environment): New member `line_tabs'. - * src/roff/troff/env.cc (line_tabs_request): Implement request. - (environment::environment, environment::copy): Updated. - (environment::distance_to_next_tab): Use `line_tabs'. - (init_env_requests): Register request. - * src/roff/troff/troff.man, man/groff.man, NEWS: Document it. Other - fixes. - -2001-01-24 Werner LEMBERG - - Introducing a new read-only register `.int' which is set to a - positive value if the last output line is interrupted (i.e., if it - contains `\c'). - - * src/roff/troff/env.cc (init_env_requests): Add it. - * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. - -2001-01-23 Gaius Mulley - - * tmac/mwww.tmac: Call `www.tmac', not `arkup.tmac'. - * src/preproc/html/pre-html.cc (findPrefix): New function which - generates the troff executable name via the system prefix. - * src/preproc/eqn/main.cc: Modified warning message. - -2001-01-23 Werner LEMBERG - - troff's `box' and `boxa' requests didn't preserve temporary - indentation. - - * src/roff/troff/div.h (diversion): Add `saved_saved_indent' and - `saved_target_text_length' members. - * src/roff/troff/div.cc (do_divert): Use them. - - Tabs (but not yet leaders and fields) are now handled correctly by - `asciify' request. - - * node.h (hmotion_node): Add field `was_tab'. - * env.cc (environment::make_tab_node): Set it. - * node.cc (hmotion_node::copy, hmotion_node::asciify): Use it. - - Added new request `unformat' which will, contrary to `asciify', - preserve font information after unformatting (i.e., only nodes - dealing with horizontal space are converted back to input - characters). - - * input.cc (asciify_macro): Renamed to ... - (do_asciify_macro): this, having a new parameter `unformat_only'. - (asciify_macro, unformat_macro): New; using do_asciify_macro. - (init_input_requests): Added `unformat'. - * node.cc (*_node::asciify), asciify_reverse_node_list: Added - parameter to control asciification process. - * node.h (*_node::asciify): Ditto. - * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. - -2001-01-20 Werner LEMBERG - - * doc/groff.texinfo: Minor improvement of `.in' documentation. - -2001-01-18 Werner LEMBERG - - * tmac/ps.tmac: Remove call of psold.tmac. - * tmac/psold.tmac: Comment updated. - * tmac/psnew.tmac: Removed since no longer needed. - * tmac/Makefile.sub, NEWS, src/devices/grops/grops.man: Updated. - - * font/devutf8/R.proto: Adding `shc' glyph. - * font/devutf8/NOTES: Updated. - - * test-groff: Updated. - -2001-01-15 Gaius Mulley - - First cut of the new html device driver. Changes to pre-html and - the new grohtml are too numerous to be documented here. - - Stuff related to `html' has been renamed to `html-old' and `html2' - stuff has been renamed to `html' (including directories). The new - html device driver is therefore invoked as `-Thtml'. - - Added new `\O' escape to suppress output (needed by html driver). - - Added functions and code to pass info about input-level commands - (`.in', `.fl', etc.) to html driver. - - Three new functions (.html-begin, .html-end, and .html-image) for - better html handling: `html-begin' will execute the remaining line - if at the outermost nesting level, increasing an internal counter. - `html-end' does the same but decreases the internal counter. - `html_image' puts its arguments into a special node (suppress_node) - to define an image region. - - The `output' request has been removed. - - * tmac/html-tags.tmac: Removed. - * tmac/arkup.tmac: Updated and renamed to ... - * tmac/www.tmac: New file. - * tmac/markup.tmac Updated and renamed to ... - * tmac/mwww.tmac: New file. - * tmac/Makefile.sub: Updated. - * tmac/an-old.tmac: Updated. - * tmac/eqnrc: Updated. - * tmac/groff_man.man - * tmac/groff_markup.man: Updated and renamed to ... - * tmac/groff_mwww.man: New file. - * tmac/groff_tmac.man: Updated. - * tmac/html-old.tmac: Updated and Renamed from html.tmac. - * tmac/html.tmac: Updated and renamed from html2.tmac. - * tmac/pspic.tmac: Updated html support. - * tmac/s.tmac: Added html output support. - * tmac/troffrc, tmac/troffrc-end: Updated. - - * Makefile.in, doc/Makefile: Updated. - * doc/groff.texinfo: Added info about new `\O' escape. - * doc/homepage.ms: Use `MAILTO' macro. - - * font/devhtml/DESC.proto: Add `C' font. - * font/devhtml/Makefile.sub: Updated. - * font/devhtml/R.proto: Minor fixes. - * font/devhtml-old/Makefile.sub: Updated. - - * src/devices/grohtml-old/Makefile.sub: Updated. - - * src/libs/libdriver/printer.cc (printer::get_font_from_index): New - method. - * src/libs/libgroff/htmlindicate.cc (html_begin_suppress, - graphic_start): Add `inline' parameter. Update. - (html_end_suppress, graphic_end): Update. - - * src/include/html-strings.h: New file. - * src/include/htmlindicate.h: Comments updated. - * src/include/printer.h: Updated. - - * src/preproc/eqn/main.cc (do_file, main): Updated. - * src/preproc/pic/troff.cc (troff_output::start_picture, - troff_output::finish_picture): Updated. - * src/preproc/tbl/main.cc (process_input_file): Updated. - - * src/roff/groff/groff.cc (main): Updated. - Pass device arguments to predrivers also. - Use `ps' device for `eqn' preprocessor if `-Thtml' is given. - * src/roff/troff/env.h (environment): Updated. - New elements `need_eol' and `ignore_next_eol' (for html output). - * src/roff/troff/env.cc (environment::environment): Add initializers - for `need_eol' and `ignore_next_eol'. - (environment::add_html_tag_eol, environment::add_html_tag_tabs): New - functions. - (point_size, fill, no_fill, center, right_justify, line_length, - indent, temporary_indent, break_request, handle_tab): Use - `add_html_tag()'. - (set_tabs): Use `add_html_tag_tabs()'. - (environment::add_html_tag): Updated. - (environment::do_break): Updated. - * src/roff/troff/div.cc (space_request, flush_output): Use - `environment::add_html_tag()'. - * src/roff/troff/input.cc: Updated. - New variable `html_level' to indicate nested `html-begin' requests. - (file_iterator::fill): Use `environment::add_html_tag_eol()'. - (non_interpreted_char_node, token_node, non_interpreted_node): Add - `force_tprint()' method. - (token::next): Handle `\O'. - (do_suppress): Implement it. - (html_begin, html_end, html_image): New functions. - (init_output_requests): Renamed to ... - (init_html_requests): this. - (main): Use it. - (macro::append_str, macro::append_unsigned, macro::append_int): New - methods. - New variable `output_low_mark_miny' to limit minimal value of y. - (reset_output_registers): Use it. - (output_request): Removed. - (get_output_registers): New function. - * src/roff/troff/node.h (node): Make `force_tprint()' virtual. - (*_node): Added `force_tprint()' if necessary. - (special_node): New elements `tf' and `get_tfont()'. - (suppress_node): New class. - * src/roff/troff/node.cc: - New global variables `image_no' and `suppress_start_page'. - (real_output_file): New method `is_on()'. - (troff_output_file): New method `start_special(tfont)'. - (troff_output_file::really_print_line): Use `tprint' conditionally. - (real_output_file::print_line): Updated. - (real_output_file::on): Updated. - (*_node): Added `force_tprint()'. - (special_node::special_node): Initializer updated. - (special_node::same, special_node::copy, special_node::tprint_start): - Updated. - (get_reg_int, get_reg_str): New functions. - (suppress_node::*): New methods. - New global variables last_position, last_image_filename; - (min): New inline function. - * src/roff/troff/reg.h, src/roff/troff/request.h, - src/roff/troff/troff.h: Updated. - -2001-01-13 Werner LEMBERG - - * NEWS, src/roff/troff/troff.man, doc/groff.texinfo: Fix - documentation of `asciify' request. - -2001-01-12 Werner LEMBERG - - * src/roff/troff/input.cc: Move definition of special characters - like `ESCAPE_TILDE' to ... - * src/roff/troff/input.h: New file. - * src/roff/troff/Makefile.sub (HDRS): Add it. - - Extending the .asciify request to `unformat' space characters also. - - * src/roff/troff/node.h (word_space_node): Add `num_spaces' element - to count input space characters. - Update constructors to take care of it. - * src/roff/troff/node.cc (space_char_hmotion_node::asciify): Use - `ESCAPE_SPACE' instead of normal space. - (word_space_node::asciify): New method. - (unbreakable_space_node::asciify): New method. - (word_space_node::merge_space): New method. - * src/roff/troff/env.cc (environment::space_newline, - environment::space): Add code to initialize `num_spaces' (using the - constructor of `word_space_node'). - * NEWS, src/roff/troff/troff.man, man/groff.man, doc/groff.texinfo: - Document it. - -2001-01-09 Werner LEMBERG - - * man/groff_char.man: Use table header traps only conditionally. - -2001-01-09 Bjarni Ingi Gíslason - - * man/groff_char.man: Add `ý' and `Ý' to the `acute' group. - -2001-01-08 Werner LEMBERG - - Introducing the `box' and `boxa' requests which are similar to - `di' resp. `da' but omitting a partially filled line (which is - restored after ending the diversion). - - * src/roff/troff/div.h (diversion): Add elements to save partially - filled line. - * src/roff/troff/div.cc (do_divert): Add parameter `boxing' to save - partially filled line. - (divert, divert_append): Updated. - (box, box_append): New functions. - (init_div_requests): Use them. - * src/roff/troff/env.h (environment): do_divert() is now a friend. - * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. - - * doc/groff.texinfo: Fix documentation of `lf' request. - -2000-12-25 Werner LEMBERG - - * src/roff/troff/troff.man, NEWS: Document `writem' request. - -2000-12-21 Werner LEMBERG - - Ignore `ss' request if in compatibility mode. - - * src/roff/troff/input.cc: Make `compatible_flag' non-static. - * src/roff/troff/env.h: Added extern `compatible_flag' declaration. - * src/roff/troff/env.cc (space_size): Use it. - - * doc/groff.texinfo, src/roff/troff/troff.man: Fix documentation of - `ss' request in nroff mode. - - * tmac/an-old.tmac: Fixed some serious bugs introduced with latest - changes. - -2000-12-15 Ruslan Ermilov - - * tmac/troffrc, tmac/troffrc-end: Convert tmac.* to *.tmac. - -2000-12-13 Werner LEMBERG - - * src/preproc/eqn/Makefile.sub (MAN1): Added neqn.man. - * src/preproc/eqn/neqn.man: Small fixes and additions. - -2000-12-13 Ruslan Ermilov - - * src/utils/addftinfo/addftinfo.man, src/devices/grops/grops.man: - Fixing typo. - - * src/preproc/eqn/neqn.man: New file. - - * src/preproc/tbl/table.cc (table::print): Fix `indent cannot be - negative' warning. - - * tmac/e.tmac: Add `T&' macro. - Fix `indent cannot be negative' warning. - * tmac/s.tmac: Fix `indent cannot be negative' warning. - -2000-12-07 Werner LEMBERG - - * src/include/lib.h: Replaced __ALPHA with __alpha symbol. - -2000-12-06 Werner LEMBERG - - * PROBLEMS: Added info about adding -lPW on HP-UX to satisfy the - `alloca' symbol . - - * MORE.STUFF: Added info about deroff for djgpp. - - * tmac/an-old.tmac, tmac/groff_man.man, doc/groff.texinfo, NEWS: Fix - documentation of -rcR switch. - -2000-12-03 Werner LEMBERG - - * tmac/an-old.tmac: Implementing the -rcR switch (similar to mdoc); - if -rcR=1 (which is now the default in nroff mode), a single, very - long page is created instead of multiple pages: All `ne' and `wh' - requests are put into conditionals; a new macro `an-end' is added to - be called with `em'. - - Some other minor cleanups. - - * NEWS, tmac/groff_man.man, doc/groff.texinfo: Updated. - -2000-12-02 Werner LEMBERG - - Fixing a bug which prevented hyphenation in words followed - immediately by a TOKEN_NODE (e.g. `\ ', `\~', etc.). - - * src/roff/troff/input.cc (process_input_stack ): - Adding possibly_break_line(). - * src/roff/troff/env.h (environment): Make possibly_break_line() - public. - - Make `\~' usable in .tr request. - - * src/roff/troff/token.h (token_type): Add TOKEN_STRETCHABLE_SPACE. - (token): Add stretchable_space(). - * src/roff/troff/input.cc (token::next, token::delimiter, - token::description, process_input_stack, do_translate, - add_to_node_list, token::process): Use it. - * src/roff/troff/node.h (node): Add fourth parameter to add_char() - for adjusting the space. - * src/roff/troff/node.cc (node::add_char): Implement it. Add code - for stretchable space. - * src/roff/troff/input.cc (token::add_to_node_list): Use it. - (make_node): Add code for stretchable space. - * src/roff/troff/env.cc (environment::add_char): Use it. - * src/roff/troff/input.cc: Add ESCAPE_TILDE special character. - (get_copy, token::next, transparent_translate, asciify): Use it. - - * NEWS, src/roff/troff/troff.man, src/roff/troff/TODO, - doc/groff.texinfo: Updated. - * man/groff.man: Small reorderings. - -2000-11-23 Werner LEMBERG - - * NEWS: Fixes. - * src/preproc/eqn/main.cc (main): Use `config_macro_path' for -M - option. - * src/roff/troff/input.cc (main): Add `config_macro_path' and - `safer_macro_path' to -M option. - * src/roff/troff/troff.man: Fixes. - -2000-11-22 Werner LEMBERG - - Use safer path (except for config files) if -U isn't specified. Add - a special macro path (without home and current directory) for config - files. Add home directory to unsafe path for consistency. Don't - include the home directory in the font path. - - * src/libs/libgroff/macropath.cc: Add `config_macro_path', change - `macro_path'. - * src/include/macropath.h: Add `config_macrp_path'. - * src/libs/libgroff/fontfile.cc: Fix font path. - * src/roff/troff/input.cc (process_startup_file): Use - `config_macro_path'. - (main): Select unsafe path if -U is given. - - * src/preproc/eqn/main.cc (main): Fixing search path for - configuration file. - * src/preproc/eqn/eqn.man: Updated. - - * src/roff/troff/troff.man, man/roff.man, tmac/groff_tmac.man: - Updated. - - * src/preproc/grn/grn.man, src/devices/grodvi/grodvi.man, - src/devices/grohtml/grohtml.man, src/devices/grolbp/grplbp.man, - src/devices/grolj4/grolj4.man, src/devices/grops/grops.man, - src/devices/grotty/grotty.man: Updated. - - * Makefile.in: Fix comments. - -2000-11-17 Werner LEMBERG - - * tmac/safer.tmac: Empty file added (again) for compatibility - reasons. - * tmac/Makefile.sub: Updated. - -2000-11-16 Werner LEMBERG - - * src/devices/grodvi/dvi.cc (main), - src/devices/grohtml2/post-html.cc (main), - src/devices/grolbp/lbp.cc (main), src/devices/grolj4/lj4.cc - (main), src/devices/grops/ps.cc (main), src/devices/grotty/tty.cc - (main), src/preproc/eqn/main.cc (main), src/preproc/grn/main.cc - (main), src/preproc/html2/pre-html.cc (main), - src/preproc/pic/main.cc (main), src/preproc/refer/refer.cc (main), - src/preproc/soelim/soelim.cc (main), src/preproc/tbl/main.cc - (main), src/roff/groff/groff.cc (main), src/roff/troff/input.cc - (main), src/utils/hpftodit/hpftodit.cc (main), - src/utils/indxbib/indxbib.cc (main), src/utils/lkbib/lkbib.cc - (main), src/utils/lookbib/lookbib.cc (main), - src/utils/pfbtops/pfbtops.c (main), src/utils/tfmtodit/tfmtodit.cc - (main): Use stdout for -v. - * src/roff/groff/groff.cc (run_commands), - src/roff/groff/pipeline.c (run_pipeline): New parameter `no_pipe' - to make direct printing to stdout possible. - * src/roff/groff/pipeline.h: Updated. - - * src/utils/afmtodit/afmtodit.pl: Add -v switch. - * src/utils/afmtodit/Makefile.sub (afmtodit): Use @VERSION@. - * src/utils/afmtodit/afmtodit.man: Updated. - - * src/utils/addftinfo/addftinfo.cc (main): Add -v switch. - (version): New function. - (usage): Updated. - * src/utils/addftinfo/addftinfo.man: Updated. - - * src/devices/*/*, src/preproc/*/*, src/roff/*/*, src/utils/*/*: - Fixing copyright dates. - - * src/preproc/eqn/neqn.sh: Adding GROFF_BIN_PATH to path instead of - replacing it. - - * src/devices/grolbp/lbp.cc (main): Use Version_string instead of - version_string. - - * src/roff/nroff/Makefile.sub (nroff): Fix use of @VERSION@. - -2000-11-15 Werner LEMBERG - - In all programs, make -v return immediately with exit status 0 to - be compliant with the GNU standard. - - * src/devices/grodvi/dvi.cc (main), - src/devices/grohtml2/post-html.cc (main), - src/devices/grolbp/lbp.cc (main), src/devices/grolj4/lj4.cc - (main), src/devices/grops/ps.cc (main), src/devices/grotty/tty.cc - (main) src/preproc/eqn/main.cc (main), src/preproc/grn/main.cc - (main), src/preproc/html2/pre-html.cc (main), - src/preproc/pic/main.cc (main), src/preproc/refer/refer.cc (main), - src/preproc/soelim/soelim.cc (main), src/preproc/tbl/main.cc - (main), src/roff/groff/groff.cc (main), src/roff/troff/input.cc - (main): Implement it. - * NEWS: Updated. - - * src/roff/groff/groff.cc (main): Add copyright notice. Add refer - and postprocessors to the -v option. - - * src/roff/grog/grog.pl: Implement -v. - * src/roff/grog/Makefile.sub (grog): Use @VERSION@. - * src/roff/grog/grog.man, doc/groff.texinfo: Updated. - - * src/roff/nroff/nroff.sh: Implement -v. - * src/roff/nroff/Makefile.sub (nroff): Use @VERSION@. - * src/roff/nroff/nroff.man: Updated. - - * src/preproc/eqn/main.cc (main): Fix comment typo. - - * MORE.STUFF: Added info about djgpp port of grap. - -2000-11-14 Werner LEMBERG - - * src/roff/grog/grog.{pl,sh}: Implemented -C switch for compatibility - mode (or rather, implemented non-compatibility mode). - * NEWS, src/roff/grog/grog.man, doc/groff.texinfo: Updated. - - * src/roff/groff/groff.cc (main): Add BIN_PATH to PATH instead of - replacing it -- we don't find gxditview otherwise. - * NEWS, src/roff/groff/groff.man, doc/groff.texinfo: Updated. - - * src/preproc/pic/depend: Removed. Unnecessary. - - Implemented dummy keyword `solid' in pic for compatibility with - AT&T pic. - - * lex.cc (lookup_keyword): Added `solid'. - * pic.y: Added SOLID with dummy rule. - * pic.cc, pic_tab.h: Regenerated. - * doc/pic.ms: Updated. - -2000-11-13 Werner LEMBERG - - For security reasons, don't use the current directory but the home - directory while searching and scanning troffrc and troffrc-end. - Similarly, replace the current directory with the home directory - in the font path. - - * Makefile.in (fontpath, tmacpath): Remove current directory. - - * src/libs/libgroff/searchpath.cc (search_path::search_path): Add - two parameters `add_home' and `add_current'. - (search_path::~search_path, search_path::command_line_dir, - search_path::open_file): Remove tests for `dirs' being zero. - * src/include/searchpath.h: Adjust. - * src/libs/libgroff/macropath.cc, src/include/macropath.h: Add - `safer_macro_path'. - * src/libs/libgroff/fontfile.cc: Adjust `font_path'. - - * src/roff/troff/troff.h: Add `searchpath.h' and `mac_path'. - * src/roff/troff/input.cc: Use `mac_path', initialized with - `macro_path'. - (process_startup_file): Set `mac_path' to `safer_macro_path'. - * src/roff/troff/env.cc: Use `mac_path'. - - * src/preproc/eqn/main.cc (main): Use `safer_macro_path'. - - * NEWS, man/roff.man, src/roff/troff/troff.man, - src/roff/groff/groff.man, tmac/groff_tmac.man, arch/djgpp/README: - Updated. - -2000-11-12 Werner LEMBERG - - * src/include/lib.h: Don't include groff-getopt.h for OSF/1. - - * aclocal.m4 (GROFF_SYS_ERRLIST): Do test in C, not in C++. - * configure.in: Fix typo in comment. - * configure: Regenerated. - - * src/libs/libgroff/*, src/include/*, src/roff/troff/*: Fixing - copyright dates. - -2000-11-08 Werner LEMBERG - - Add system tmac directory (/usr/local/lib/groff/site-tmac). - - * Makefile.in: Add $(libdir), $(libprogramdir), and $(systemtmacdir). - (uninstall_dirs): Add $(libdir), $(libprogramdir), and - $(systemtmacdir). - Use @libdir@. - * Makefile.comm (.man.n): Add @SYSTEMMACRODIR@. - * tmac/Makefile.sub (install_data): Create - $(systemtmacdir) and $(localtmacdir). - (uninstall_sub): Use $(systemtmacdir) for wrapper macros. - * man/roff.man, src/roff/troff/troff.man, src/roff/groff/groff.man, - NEWS, doc/groff.texinfo: Updated and minor fixes. - - * Makefile.comm, Makefile.in: Added tmac_{s,an}_prefix stuff again. - * tmac/Makefile.sub: Added `wrap' stuff again, but installing into - $(systemtmacdir) since the wrapper files are platform-dependent. - -2000-11-01 Werner LEMBERG - - * doc/groff.texinfo: Fix typo. - -2000-10-26 Werner LEMBERG - - Convert macros `tmac.XXX' to `XXX.tmac'. Special cases: - tmac.doc.old -> doc-old.tmac - tmac.an.old -> an-old.tmac - - * tmac/tmac.*: Moved to ... - * tmac/*.tmac: this. - * tmac/man.local: Fix comment. - * tmac/groff_man.man, tmac/groff_markup.man, tmac/groff_mdoc.man, - tmac/groff_me.man, tmac/groff_ms.man, tmac/groff_tmac.man: Updated. - Added some `FILES' sections. More use of @...@ directives. Other - minor updates. - * arch/djgpp/README, font/devutf8/NOTES: Updated. - * doc/homepage.ms, doc/groff.texinfo: Updated. - * man/groff.man, man/roff.man: Updated. - * src/devices/grodvi/grodvi.man, src/devices/grolbp/grolbp.man, - src/devices/grolj4/grolj4.man, src/devices/grops/grops.man, - src/devices/grotty/grotty.man: Updated. - * src/preproc/pic/pic.man: Updated. - * src/roff/grog/grog.pl, src/roff/grog/grog.sh: Use -mdoc-old - instead of -mdoc.old. - * src/roff/grog/grog.man: Document -mdoc and -mdoc-old. - * src/roff/nroff/nroff.man: Updated. - * NEWS: Updated. - - * tmac/fixmacros.sed, tmac/strip.sed: Add explanatory comment. - - * tmac/mm.diff: Removed -- it has no use now since the mm package - is part of groff. - - * tmac/*: Removed trailing spaces. - - * arch/djgpp/t-groff.bat: Fix GROFF_TMAC_PATH (hyphen.us is now in - the tmac subdirectory also). - - * Makefile.comm, Makefile.in: Remove tmac_{s,an}_prefix stuff. - * tmac/Makefile.sub: Adapted to new macro names; removed `wrap' - stuff since it is no longer needed. - - * README, PROBLEMS: Updated. - -2000-10-25 Werner LEMBERG - - Invert current behaviour: Search first FOOBAR.tmac, then - tmac.FOOBAR. - - * src/roff/troff/input.cc: Introduce MACRO_POSTFIX. - (open_mac_file, macro_source): Implement it. - * src/roff/troff/troff.man, tmac/groff_tmac.man, man/roff.man, - doc/groff.texinfo, NEWS: Document it. - - * src/roff/nroff/nroff.man, src/roff/groff/groff.man, man/groff.man: - Small documentation improvements. - - * test-groff: Fix GROFF_TMAC_PATH (hyphen.us is now in the tmac - subdirectory also). - - * font/devps/Makefile.sub: Fix rules for dingbats.*map. - -2000-10-24 Werner LEMBERG - - Add local tmac directory (groff/site-tmac). - - * Makefile.in: Add $(localtmacdir). - (uninstall_dirs): Add $(localtmacdir). - * Makefile.comm (.man.n): Add @LOCALMACRODIR@. - * tmac/Makefile.sub (install_data, uninstall_sub): Handle man.local - in $(localtmacdir). Create $(localtmacdir). - * man/roff.man, src/roff/troff/troff.man, NEWS, doc/groff.texinfo: - Updated and minor fixes. - - Rename font/devps/generate/dingbats[r]map to dingbats.[r]map. - - * font/devps/generate/Makefile.sub, arch/djgpp/README: Adjust. - -2000-10-23 Werner LEMBERG - - Move hyphen.us to tmac directory. - - * src/roff/troff/hyphen.us: Removed. - * src/tmac/hyphen.us: Added. - * src/roff/troff/Makefile.sub, tmac/Makefile.sub: Updated. - - Change installation structure for data files from .../groff/... to - .../groff//... to be conform with other GNU - programs. - - * Makefile.in, Makefile.comm, src/utils/indxbib/Makefile.sub, - doc/Makefile: Implement it. - * aclocal.m4 (GROFF_PAGE): Add test for new directory structure. - * configure: Updated. - * arch/djgpp/README, font/devutf8/NOTES: Use it. - * NEWS: Document it. - * man/roff.man, tmac/groff_tmac.man: Use @FONTPATH@, @FONTDIR@, and - @MACRODIR@ instead of hard-coded directories. - -2000-10-22 Werner LEMBERG - - Implement $GROFF_BIN_PATH environment variable (which defaults to - $bindir) used for child programs of groff and similar wrappers. - - * gendefs.sh: Improve documentation. - * Makefile.comm (,man.n), src/include/Makefile.sub (defs.h), - src/preproc/eqn/Makefile.sub (neqn), - src/roff/nroff/Makefile.sub (nroff): Add $(bindir). - * src/preproc/eqn/neqn.sh, src/roff/nroff/nroff.sh: Implement - $GROFF_BIN_PATH. - * src/roff/groff/groff.cc (main): Implement $GROFF_BIN_PATH and - $GROFF_PATH__ (the latter for communication with troff). - * src/roff/troff/input.cc (main): Use $GROFF_PATH__ for $PATH if - set. - * NEWS, src/roff/nroff/nroff.man, src/roff/groff/groff.man, - doc/groff.texinfo: Document it. - - * doc/groff.texinfo: Improve documentation of troff's -a option. - -2000-10-17 Gaius Mulley - - * src/roff/troff/node.cc: Fixed calculation of opminx and fixed - non-intrusive eol marker. - (troff_output_file::determine_line_limits): New function. - (troff_output_file::draw): Use it. - * src/roff/troff/env.cc (environment::add_html_tag): Use output() + - output_pending_lines() instead of output_line(). - * src/preproc/eqn/main.cc (do_file): Fix graphic_end(). - * src/preproc/html2/pre-html.cc (char_buffer::write_file_troff, - createImage): Small fixes. - -2000-10-14 Werner LEMBERG - - Replace tmac.safer with a real secure solution. - - * src/roff/troff/input.cc (open_request, opena_request, pipe_source, - system_request, pipe_output): Disable requests if in safer mode. - * src/roff/groff/groff.cc (main): Remove reference to tmac.safer. - * tmac/tmac.safer, tmac/groff_msafer.man: Removed. - * tmac/Makefile.sub, NEWS, man/roff.man, tmac/groff_tmac.man, - doc/groff.texinfo, src/roff/groff/groff.man, - src/roff/troff/troff.man, arch/djgpp/README: Updated. - - * src/devices/grops/ps.cc (main), src/devices/grops/psrm.cc - (resource_manager::output_prolog): Replace setenv() with putenv(). - -2000-10-09 Werner LEMBERG - - * src/libs/libbib/map.c, src/libs/libgroff/getcwd.c, - src/libs/libgroff/strtol.c, src/preproc/html2/image.cc, - src/preproc/html2/pre-html.cc, src/preproc/html2/pushbackbuffer.cc, - src/roff/groff/pipeline.c: Removing `#ifndef errno' to avoid - compilation errors with some compilers. It seems that this code - is no longer necessary -- if yes, it is easy to add some #ifdef's - for that particular old-fashioned compiler. - - * MORE.STUFF: Added info about Meta-tbl. - - * doc/groff.texinfo: Added more info about `.if "..."..."'. - -2000-10-07 Werner LEMBERG - - Adding a new escape sequence \B'...': If the string between - the delimiters is a valid numeric expression, return the character - `1', and `0' otherwise. This is an analogon to \A. - - * src/roff/troff/input.cc (do_expr_test): Implement it. - (token::next): Use it. - * src/roff/troff/troff.man, NEWS, man/groff.man: Document it. - - * tmac/tmac.trace: Made independent from escape character. - -2000-10-06 Werner LEMBERG - - Adding a new request .dei: define indirect. The first and second - parameter of .dei are taken from string registers instead directly; - this very special request is needed to make tmac.trace independent - from the escape character (which might even be disabled). - - * src/roff/troff/input.cc (do_define_macro): Implement it. - (define_macro_indirect): New function. - (init_input_requests): Use it. - - Adding two requests .ecs and .ecr: Save and restore the escape - character. These two requests are needed to make tmac.trace - independent from the escape character (which might even be - disabled). - - * src/roff/troff/input.cc (save_escape_char, restore_escape_char): - Implement it. - (init_input_requests): Use it. - - * src/roff/troff/troff.man, NEWS, man/groff.man: Updated. - -2000-09-22 Ricardo Soares Guimarães - - Adding a new option -P and new environment variable GROPS_PROLOGUE - to grops, selecting a different prologue file (minor modifications - by WL). - - * src/devices/grops/psrm.cc (resource_manager::output_prolog), - src/devices/grops/ps.cc (main): Implement it. - * src/devices/grops/grops.man, NEWS: Document it. - -2000-09-22 Werner LEMBERG - - * INSTALL: Add info about selecting paper format. - -2000-09-21 Werner LEMBERG - - * src/roff/troff/input.cc (main): Fixing compiler warning. - * src/include/{driver.h, lib.h}: Move inclusion of string.h and - strings.h from the former to the latter. - * src/devices/grolbp/lpb.cc, src/include/lib.h: Move strncasecmp() - stuff from the former to the latter. - -2000-09-11 Werner LEMBERG - - Implementing two new requests .tm1 and .tmc: The former is similar - to .tm but can output leading spaces; its syntax is similar to - defining a string, i.e., a `"' can be used to mark the beginning of - the string to be written to stderr: `.tm1 " test'. The latter is - similar to .tm1 but doesn't write out a final newline character. - - * src/roff/troff/input.cc (terminal1, terminal_continue, - do_terminal): New functions. - (init_input_requests): Use them. - * src/roff/troff/troff.man, NEWS, man/groff.man: Updated. - -2000-09-09 Werner LEMBERG - - * tmac/groff_mdoc.samples.man: Small fixes. - -2000-09-08 Werner LEMBERG - - * tmac/groff_mdoc.man: Fixing typo. - -2000-09-02 Werner LEMBERG - - Implementing a .nop request which does nothing. - - * src/roff/troff/input.cc (nop_request): New function. - (init_input_requests): Use it. - * src/roff/troff/troff.man, NEWS, man/groff.man: Updated. - -2000-09-01 Werner LEMBERG - - * doc/groff.texinfo: Added some comments. - -2000-08-30 Werner LEMBERG - - * src/roff/troff/TODO: Updated. - -2000-08-25 Werner LEMBERG - - * doc/groff.texinfo: Fix comment how to compile the DVI file. - -2000-08-25 Eli Zaretskii - - * font/devps/generate/Makefile (SHELL): Define explicitly to - "/bin/sh", for non-Unix platforms. - (extraclean): Use a more portable "" quoting instead of a - backslash (which doesn't work on DOS/Windows). - - * font/devlj4/generate/Makefile (extraclean): Ditto. - - * font/devdvi/generate/Makefile (extraclean): Ditto. - -2000-08-25 Werner LEMBERG - - * NEWS, doc/groff.texinfo, tmac/groff_tmac.man, man/roff.man, - src/roff/troff/troff.man: Document Eli's latest changes. - -2000-08-25 Eli Zaretskii - - * src/roff/troff/input.cc (open_mac_file, macro_source): Support - macro file names of the form NAME.tmac as well as tmac.NAME. - -2000-08-25 Werner LEMBERG - - * src/include/posix.h: Remove definition of FILENAME_MAX. - - * src/preproc/html2/pre-html.h, pre-html.cc: Add return type to - `sys_fatal' and `stop' function(). - - * test-groff: Updated. - -2000-08-24 Gaius Mulley - - Added the new troff command .output to suppress output (while - still obeying motion) and also the opminx, opminy, opmaxx, opmaxy - registers (for passing the output dimensions to the output device). - - * src/roff/troff/div.cc (top_level_diversion::output): Use `width' - parameter. - * src/roff/troff/node.h, src/roff/troff/node.cc - (troff_output_file::really_print_line, - ascii_output_file::really_print_line, - supress_output_file::really_print_line): Use `width' parameter. - (troff_output_file::really_on, troff_output_file::really_off, - output_file::on, output_file::off, real_output_file::on, - real_output_file::off, real_output_file::really_on, - real_output_file::really_off): New functions. - (real_output_file:public output_file): New variable `output_on'. - (real_output_file::begin_page, real_output_file::copy_file, - real_output_file::transparent_char, real_output_file::print_line): - Use it. - (real_output_file::print_line): Use check_output_limits. - * src/roff/troff/reg.h, src/roff/troff/request.h, - src/roff/troff/input.cc (assign_registers): New function to remove - two `goto's. - (do_ps_file): Use it. - (check_output_limits, reset_output_registers, output_request, - init_output_requests): New functions. - (init_input_requests): Updated. - - Added new grohtml2 device and html2 preprocessor (coding - not yet finished) which will eventually replace grohtml. - - * Makefile.in, tmac/Makefile.sub, tmac/eqnrc, tmac/troffrc-end: - Updated. - * src/include/htmlindicate.h, src/include/htmlindicate - (html_begin_suppress, html_end_suppress): New functions. - * src/preproc/tbl/main.cc: Use it. - * src/roff/groff/groff.cc: Add support for html2 device (which will - automatically invoke the html2 preprocessor). - * src/roff/troff/input.cc (is_html2): New variable. - * src/roff/troff/troff.h, src/roff/troff/env.h, - src/roff/troff/env.cc (environment::add_html_tag): New function - (uses `is_html2'). - (environment::do_break): Use it. - * font/devhtml2/*: New files. - * src/devices/grohtml2: New device. - * src/preproc/html2: New preprocessor. - * tmac/tmac.html-tags, tmac/tmac.html2: New files. - -2000-08-23 Werner LEMBERG - - * src/devices/grolbp/lbp.cc: Same workaround for sinix as for AIX. - -2000-08-22 Werner LEMBERG - - * src/include/lib.h: Provide a fix for IRIX to not include - groff-getopt.h. - -2000-08-18 Werner LEMBERG - - * configure.in: Don't provide an empty value for SH_SCRIPT_SED_CMD - since some non-GNU sed programs can't handle null regexps. - * configure, src/preproc/eqn/Makefile.sub, - src/roff/grog/Makefile.sub, src/roff/nroff/Makefile.sub: Updated. - - * src/devices/grolbp/lbp.cc: Add an AIX workaround for an autoconf - bug (string.h and strings.h are both needed according to latest - POSIX standard). - - * MORE.STUFF: Added info about unroff and troffcvt. - -2000-08-08 Werner LEMBERG - - * tmac/tmac.a4: Will now work with ms macros also; -ma4 should be - used before -ms. - - * tmac/tmac.man.old: Remove unused number register. - - * tmac.doc: Minor documentation fix. - -2000-08-07 Paul Eggert - - * src/roff/groff/pipeline.c (is_system_shell): - Fix typo: "monocased_shell" no longer exists. - -2000-08-07 Paul Eggert - - Remove FILENAME_MAX limits. - - * src/roff/groff/pipeline.c (is_system_shell): Do not assume - that the argument length is less than FILENAME_MAX. - * src/libs/libgroff/tmpfile.cc (add_tmp_file): Likewise. - Use struct hack to allocate and free file name. - (struct xtmpfile_list): fname is now part of the structure, - not a pointer to another string. - -2000-08-07 Tom Schmidt - - * src/include/posix.h: Add a default value for FILENAME_MAX. - -2000-08-06 Paul Eggert - - Add support for new BSD-style man pages (with ".Dd" instead of - ".TH"), so that "groff -man" understands both styles, even - when running "groff -man" on a host whose system man page - macros don't support ".Dd". - - * tmac/Makefile.sub (NORMALFILES): Add tmac.an.old. - (stamp-wrap): Source tmac.andoc first when wrapping man macros, - in case the system man macros don't define Dd or TH. - - * tmac/tmac.an.old: Renamed from tmac/tmac.an. - * tmac/tmac.an: New one-line file. - * tmac/tmac.andoc (TH): Adjust to the tmac.an.old file renaming. - -2000-08-06 Werner LEMBERG - - * src/roff/troff/troff.man: Fixing typos. - -Version 1.16.1 released -======================= - -2000-07-31 Werner LEMBERG - - Preparing release 1.16.1. - - * REVISION: Revision number set to 1. - * MORE.STUFF: Added info about port to DOS. - * NEWS, win32-diffs: Updated. - - * src/include/nonposix.h: Remove first line -- this file is used - in C also. - - * Makefile.in (dist): Delete Imakefile earlier to avoid a soft - link to it. - -2000-07-30 Werner LEMBERG - - * doc/texinfo.tex: Update to latest version. - -2000-06-28 Paul Eggert - - * Makefile.in (ENVSETUP): Don't assume POSIX make semantics for - commands that fail. Don't assume that "export a=b" is valid shell - syntax. This is needed for Solaris 2.5.1. - - * src/libs/libgroff/tmpfile.cc, src/utils/indxbib/indxbib.cc: Fix - comment about missing Solaris headers. - - * PROBLEMS: Add section about problems with Sun Make and VPATH. - -2000-06-25 Werner LEMBERG - - * src/devics/grodvi/dvi.cc: Replace _setmode() (for MSC) with - SET_BINARY(). - - * src/include/posix.h: Use HAVE_UNISTD instead of _MSC_VER. - - * win32-diffs: Updated. - * README.WIN32: Added CRs to make all Windows editors happy. - - * src/roff/troff/node.cc: Added WIFSIGNALED() macro (copied from - src/roff/groff/pipeline.c). - -2000-06-23 Eli Zaretskii - - * src/roff/grog/Makefile.sub (grog): Prepend `-e' to - $(SH_SCRIPT_SED_CMD), for the case where its value is empty. - -2000-06-17 Eli Zaretskii - - * src/utils/tfmtodit/tfmtodit.cc: #include nonposix.h. - (tfm::load, gf::load): Open tfm and gf files in binary mode: these - are binary files. - (main): Support non-Posix systems with several different styles of - slash characters in file names. - - * src/utils/pfbtops/pfbtops.c: #include nonposix.h. - (main) [SET_BINARY]: Switch stdin into binary mode. - - * src/utils/indxbib/indxbib.cc: #include nonposix.h. - (main): Support file names with several possible slash-type - characters, as given by DIR_SEPS[] in nonposix.h. - (main) [__MSDOS__]: If renaming the temporary index file fails - because it has more than one dot in its trunk, replace the dot - with an underscore and try again. - (do_file): Use FOPEN_RB instead of "r". Skip every CR before a - Newline. - [__MSDOS__ || _MSC_VER]: Stop at the first ^Z character. - - * src/utils/hpftodit/hpftodit.cc: #include nonposix.h. - (File::File): Open the input file in binary mode. Strip CR - characters from each CR-LF pair. - (xbasename): Support file names with several possible slash-type - characters, as given by DIR_SEPS[] in nonposix.h. - - * src/include/Makefile.sub (HDRS): Add nonposix.h. - - * src/roff/troff/node.cc [HAVE_UNISTD_H]: Include . - (WIFEXITED, WEXITSTATUS, WTERMSIG, WIFSTOPPED, WSTOPSIG) - [!_POSIX_VERSION]: Define for traditional Unix systems. - (real_output_file::real_output_file): Remove the MSVC-specific - call to popen, use instead POPEN_WT, appropriately defined on - nonposix.h. #include nonposix.h. - (real_output_file::~real_output_file): Remove the MSVC-specific - call to pclose, a suitable macro is now defined on nonposix.h. - Use the portable macros WIFEXITED, WIFSIGNALED, WTERMSIG, WSTOPSIG - and WEXITSTATUS instead of assuming traditional Unix - interpretation of the status returned by pclose. - - * src/roff/troff/input.cc (pipe_source): Remove the MSVC-specific - call to popen, use POPEN_RT instead (appropriately defined on - nonposix.h). #include nonposix.h. - (ps_bbox_request): Open the PostScript file in binary mode. - Close the file after processing it. - (getpid) [_MSC_VER]: Remove; a suitable macro is now defined on - nonposix.h. - - * src/roff/groff/pipeline.c (run_pipeline) [__MSDOS__ || _WIN32]: - A version of run_pipeline that doesn't use `fork'. - (signal_catcher) [__MSDOS__ || _WIN32]: New function. - (system_shell_name, system_shell_dash_c) - (is_system_shell) [__MSDOS__ || _WIN32]: New functions, to hide - the ugliness of testing DOS/Windows file names for equality, and - support both stock shells and ports of Unix shells. - - * src/roff/groff/groff.cc: #include nonposix.h. - (BSHELL): Definition moved to nonposix.h. - (main): Use PATH_SEP[0] instead of literal ':'. Use BSHELL_DASH_C - instead of a literal "-c". - (xbasename): Support file names with several possible slash-type - characters, as given by DIR_SEPS[] in nonposix.h. - (possible_command::print): Use BSHELL_DASH_C and IS_BSHELL instead - of literal strings. - - * src/preproc/soelim/soelim.cc: #include nonposix.h. - (do_file): Use IS_ABSOLUTE instead of testing for a literal '/'. - - * src/preproc/pic/Makefile.sub (YTABH): Change pic.tab.h to - pic_tab.h. - - * src/preproc/pic/lex.cc: Change pic.tab.h to pic_tab.h. - - * src/preproc/eqn/Makefile.sub (YTABH): Rename eqn.tab.h to - eqn_tab.h. - - * src/preproc/eqn/lex.cc: #include eqn_tab.h, not eqn.tab.h. - - * src/libs/libgroff/tmpfile.cc (DEFAULT_TMPDIR) [P_tmpdir]: If - P_tmpdir is defined, use it instead of the literal "/tmp". - (remove_tmp_files, add_tmp_file): New functions. - (xtmpfile): Record temporary files and register an atexit function - to delete them explicitly, instead of relying on the OS to do - that, which doesn't work on non-Unix systems. - - * src/libs/libgroff/searchpath.cc: #include nonposix.h. - (search_path::search_path): Use PATH_SEP instead of a literal - colon. - (search_path::command_line_dir): Ditto. - (search_path::open_file): Use IS_ABSOLUTE, PATH_SEP and DIR_SEPS, - to support non-Posix systems. - - * src/libs/libbib/search.cc: #include nonposix.h. - (search_list::add_file): Open the file in binary mode. - - * src/libs/libbib/linear.cc: #include nonposix.h. - (file_buffer::load): Remove \r characters preceding \n from the - loaded buffer. - - * src/libs/libbib/index.cc: #include nonposix.h. - (make_index_search_item): Open index_filename in O_BINARY mode. - (index_search_item_iterator::get_tag): Ditto. Remove \r - characters before \n characters. - (index_search_item::check_files): Open files in binary mode. - (index_search_item::munge_filename): Support DOS-style file names - with backslashes and drive letters, use IS_ABSOLUTE. - - * src/devices/grops/ps.cc: #include nonposix.h. - (main) [SET_BINARY]: Switch stdout to binary mode. - - * src/devices/grolj4/lj4.cc: #include nonposix.h. - (main) [SET_BINARY]: Switch stdout to binary mode. - - * src/devices/grolbp/lbp.cc: #include nonposix.h - (fill_pattern) [SET_BINARY]: Switch stdout to binary mode. - - * src/devices/grodvi/dvi.cc: #include nonposix.h. - [_MSC_VER]: Remove inclusion of Windows-specific headers (done by - nonposix.h). - (main) [SET_BINARY]: Switch stdout to binary mode. - [_MSC_VER]: Remove an explicit call to _setmode. - - * src/include/nonposix.h: New file. - - * Makefile.in (ENVSETUP): New variable, to set up case-sensitive - operation when building with DJGPP. - ($(TARGETS), dot, $(LIBDIRS), $(CPROGDIRS), $(CCPROGDIRS)) - ($(DEVDIRS), $(TTYDEVDIRS), $(INCDIRS), $(OTHERDIRS)): Use - ENVSETUP. - - * Makefile.comm: mv y.tab.[ch] to y_tab.[ch], to make it work on - MS-DOS. - (.man.n): Replace `;' with `|', since FONTPATH, MACROPATH, - etc. can include a semi-colon on DOS/Windows. - (depend.temp): Use depend1.temp instead of depend.temp1, to - prevent files from overerwiting each other on 8+3 filesystems. - - * gendef.sh (t): Change definition to work with DOS/Windows. - - doc/groff.texinfo: Apart of some typo corrections, I also changed - some index entris, to make them more non-ambiguous, and also put - @ignore around some parts that are not yet written, to allow the - Info output be readable. - -2000-06-10 Gael Queri - - Replaced specific checks for function declarations with a generic - routine taken from GNU bfd. - - * aclocal.m4 (GROFF_NEED_DECLARATION): New function. - GROFF_PUTENV, GROFF_POPEN, GROFF_PCLOSE, GROFF_HYPOT: Removed. - * configure.in: Use it. - * src/devices/grolbp/lbp.cc, src/include/lib.h, - src/preproc/grn/hgraph.cc, src/preproc/pic/pic.h, - src/roff/groff/groff.cc: Use it. - * Makefile.in, configure: Updated. - -2000-06-07 Paco Andrés Verdú - - * src/devides/grolbp/lbp.h: Removed unused variables. - -2000-05-31 Keith Thompson - - * src/devices/grolbp/lbp.cc (set_papersizes): Add declaration of - strncasecmp(). - -2000-05-31 Werner LEMBERG - - * aclocal.m4 (GROFF_SRAND): New function to test the return value - of srand() -- at least SunOS 4.1.3 uses `int' instead of `void'. - * configure.in: Use it. - * src/preproc/pic/pic.y, src/preproc/pic/pic.cc: Use it. - * configure, Makefile.in: Updated. - - * configure.in: Add test for strncasecmp(). - * src/include/lib.h: Use it. - -2000-05-29 Andrej Borsenkow - - * src/preproc/grn/Makefile.sub: Add MLIB. - -2000-05-29 Nix - - * Makefile.in: Use @datadir@ and @mandir@ appropriately. - -2000-05-29 Werner LEMBERG - - * src/roff/grog/Makefile.sub, src/roff/grog/grog.sh: Add `@g@'. - - * PROBLEMS: Small update. - - * src/devices/grolbp/lbp.cc: Various small fixes. - -2000-05-28 Keith Thompson - - * src/roff/nroff/nroff.sh: Fix main loop syntax. - - * src/utils/indxbib/indxbib.cc: Add declaration of mkstemp(). - -2000-05-25 Werner LEMBERG - - * man/roff.man: Removed unused macro. - -2000-05-24 Werner LEMBERG - - * Makefile.in (dist): Remove src/xditview/Imakefile explicitly. - This is needed e.g. if you do - `make distclean; ./configure; make dist'. - -Version 1.16 released -===================== - -2000-05-23 Werner LEMBERG - - Adding font CWI (constant width italic) to devdvi. - - * font/devdvi/CWI: New file. - * font/devdvi/generate/Makefile: Add generating rule. - * font/devdvi/DESC.in, font/devdvi/Makefile.sub, win32-diffs, - tmac/tmac.dvi: Use it. - * NEWS: Announce it. - - * font/devlj4/*: Regenerated (only adding kernings for `cq' glyph). - * font/devlj4/generate/Makefile: Cosmetic changes only. - - * man/groff.man: Removed most of the redundant description of - special characters (which is in groff_char.man). Added font - translation CB->CR for devdvi. Other minor fixes. - - * tmac/tmac.dvi: Improved appearance of \(co (copyright) and \(rg - (registered) symbols. - -2000-05-22 Werner LEMBERG - - * doc/Makefile: Added rule for creating info files. - - * font/devdvi/*: Added kernings for `cq' glyph. Updated to latest - AMS font metrics. - * font/devdvi/generate/Makefile: Fixed dependencies. - - * font/devps/*: Regenerated. Heavy changes for Bookman and - NewCentury Schoolbook! - * font/devps/generate/afmname: Will now run with GNU awk. - * font/devps/generate/textmap: Added forgotten `cq' glyph name. - * font/devps/generate/Makefile: Cosmetic changes only. - -2000-05-21 Werner LEMBERG - - * tmac/tmac.an: Added a new command line option `-rSxx' (`xx' can be - 10, 11, or 12) to support output with 11pt and 12pt base font sizes. - `.SS' now produces a heading with a smaller size than `.SH'. - Completely formatted. - * doc/groff.texinfo, tmac/groff_man.man, NEWS: Document it. - - * man/groff.man: Improved table appearance. Use of `eo' request - to reduce number of doubled backslashes in macro definitions. - Replacing `\e' with `\(rs'. Other minor fixes. - - * src/preproc/tbl/main.cc: Insert HTML table end tag before `lf' - to have correct line number. - - * INSTALL: Small improvement. - -2000-05-20 Bernd Warken - - * man/roff.man, tmac/groff_tmac.man: Updates (with corrections by - WL). - -2000-05-19 Bernd Warken - - * man/groff.man: Complete update (with a lot of corrections by WL). - -2000-05-18 Werner LEMBERG - - Adding `cq' (PS name `quoteright') glyph name as an alias for "'". - - * font/*/*: Implement it. - * man/groff_char.man, NEWS: Document it. - - * src/include/unix.h: Removed. It isn't used. - - * doc/groff.texinfo: Slight improvements. - -2000-05-17 Werner LEMBERG - - * README, win32-diffs: Small fixes and improvements. - -2000-05-16 Werner LEMBERG - - * FDL: New file (the Free Documentation License version 1.1). - - * doc/groff.texinfo: Added many start-up values for gtroff. - Some structural improvements of the source code. - -2000-05-15 Werner LEMBERG - - * src/roff/troff/input.cc: Added small comment about troffrc-end. - * src/roff/troff/troff.man: Added info about troffrc-end. - -2000-05-14 Werner LEMBERG - - * Makefile.in (EXTRADIRS): Fix typos. - (dist): Handle deletion of old .tar.gz file correctly. - (DISTDIRS): Include all tty output devices. - - * doc/groff.texinfo: Adding more cross references; countless other - fixes. - -2000-05-13 Werner LEMBERG - - * MORE.STUFF: Added Robert Marks's utilities. - -2000-05-12 Werner LEMBERG - - Added win32 port contributed by Blake McBride - . - - * README.WIN32, win32-diffs: New files. - * NEWS: Updated. - - * src/preproc/grn/hgraph.cc (HGSetBrush): Replace `%lf' with `%f'. - (tmove, tmove2): Added parentheses to avoid compiler warnings. - (change): Removed unused variables. - - * src/preproc/grn/main.cc (main, conv): Removed unused variables. - (savebounds): Changed return value from `int' to `void'. - * src/preproc/grn/hdb.cc: Ditto. - - * src/devices/grolbp/lbp.cc (lbp_printer::draw): Removed superfluous - final backslash in comment to avoid compiler warning. - - * src/utils/pfbtops/pfbtops.c: Added `getopt.h'. - - * doc/groff.texinfo: More fixes. - -2000-05-11 OKAZAKI Tetsurou - - * tmac/tmac.doc: Documentation fix. - -2000-05-11 Werner LEMBERG - - * doc/groff.texinfo: Reading the source code shows up a lot of - omissions and incorrect data... More conversion to @Deffn macros. - -2000-05-10 Werner LEMBERG - - * src/roff/troff/reg.cc (number_value_to_ascii): Remove ASCII - dependency. - - * src/roff/troff/request.h: Removing unused `no_break_flag'. - -2000-05-09 Werner LEMBERG - - * man/groff.man, man/roff.man, tmac/groff_tmac.man: Minor - improvements. - - * doc/groff.texinfo: Extended history section. More conversion to - @Deffn macros. More .tr documentation. - -2000-05-07 Werner LEMBERG - - * doc/groff.texinfo: Completed tab section. Added info about - fields. - -2000-05-06 Mike MacIsaac - - * PROBLEMS: Describe configure script fix for OS/390 Unix. - -2000-05-05 Werner LEMBERG - - * font/devdvi/DESC.in: Change size 11pt to 10.95pt (as used in - LaTeX 2e). - * NEWS: Document it. - - * man/troff.man: Minor optical improvements. - -2000-05-03 Werner LEMBERG - - Adding `dq' (PS name `quotedbl') glyph name as an alias for `"'. - - * font/*/*: Implement it. - * man/groff_char.man, NEWS: Document it. - -2000-05-02 Werner LEMBERG - - * tmac/groff_tmac.man, man/groff.man, man/roff.man: Fixing @MANxEXT@ - expansion. - * NEWS: Document the three new man pages. - - * aclocal.m4 (GROFF_CXX_CHECK): Removing obsolete AC_C_CROSS call. - * configure: Updated. - - * font/devcp1047/R.proto: Fixing fatal bug (a missing `"' character). - -2000-05-01 Werner LEMBERG - - Added grap support to grog. - - * src/roff/grog/grog.sh, src/roff/grog/grog.pl: Implement it. - * src/roff/grog/grog.man: Document it. - - * doc/groff.texinfo, NEWS: Add info about grap support. - - Add new man pages comptributed by Bernd Warken - (with slight fixes by me). - - * tmac/groff_tmac.man: New file documenting tmac mechanism. - * tmac/Makefile.sub: Add groff_tmac.man. - * man/roff.man: New file giving overview of roff system. - * man/troff.man: A short reference of troff. - * man/Makefile.sub: Add roff.man and troff.man. - -2000-04-30 Werner LEMBERG - - Added grap support to groff. - - * src/roff/groff/groff.cc: Implement it. - * src/roff/groff/groff.man: Document it. - - * src/devices/grotty/grotty.man: Add cp1047 device. - * src/preproc/eqn/eqn.man, src/preproc/eqn/neqn.sh, tmac/eqnrc: - Ditto. - * src/roff/groff/groff.man: Ditto. - * src/roff/nroff/nroff.sh, src/roff/nroff/nroff.man: Ditto. - * doc/groff.texinfo: Ditto. - - * tmac/troffrc: Fix mapping of latin-1 char 160 (non-breakable space) - for cp1047. - -2000-04-29 Werner LEMBERG - - * man/groff_char.man: Add `pc' glyph. - * tmac/tmac.latin1: Replacing `md' glyph with `pc'. - * tmac/tmac.tty: Add `pc' glyph. - * tmac/tmac.tty-char: Use/add `pc' glyph. Don't call tmac.latin1 if - we use cp1047 output device. - - * Makefile.in, aclocal.m4: Don't build utf8 on EBCDIC hosts since - there are still hardcoded latin1->unicode values in utf8's font - definition files. - * configure: Updated. - * NEWS: Minor clarification. Updated. - - * PROBLEMS: Formatted. Added info about C++ fix pack for OS/390 - Unix. - -2000-04-28 Werner LEMBERG - - Adding EBCDIC code page 1047. - - * font/devcp1047/R.proto, font/devcp1047/Makefile.sub, - font/devcp1047/DESC.proto: New files. - - * aclocal.m4 (GROFF_EBCDIC): Introduce TTYDEVDIRS which can be - either ascii/latin1 or cp1047. - * Makefile.in: Use it. - * configure: Updated. - - Replacing and/or adding `md' (mathdot) glyph with `pc' - (periodcentered) in all text fonts. - - * font/*/*: Change it. - -2000-04-27 Werner LEMBERG - - * aclocal.m4 (GROFF_OS390): Fixing compiler flags. - - * configure.in: Add check for strings.h. - * src/include/driver.h: Use HAVE_STRINGS_H. - * src/devices/grolbp/lpb.cc: Remove string.h. - - * src/include/groff-getopt.h: New file. It will be used instead of - getopt.h (to be included in lib.h) to avoid endless problems with - picky C++ compilers. - * src/include/lib.h: Use groff-getopt.h. - * src/include/Makefile.sub: Updated. - - * configure: Updated. - * Makefile.in: Updated. - - * NEWS: Mention EBCDIC support. - -2000-04-26 Werner LEMBERG - - * TODO: Some additions. - -2000-04-25 Werner LEMBERG - - * src/roff/troff/troff.man, doc/groff.texinfo: Fixing documentation - of mso request. - -2000-04-23 Werner LEMBERG - - * src/roff/troff/troff.man: Minor fixes. - -2000-04-22 Werner LEMBERG - - * src/roff/troff/troff.man, doc/groff.texinfo, NEWS: Document the - `.T' string register and the incompatible definition of the `.T' - number register (compared to Unix troff). - - * man/groff_char.man: Add some missing characters. - * font/devutf8/NOTES: Update. - -2000-04-21 Werner LEMBERG - - * src/include/htmlindicate.h, src/include/lib.h, - src/include/posix.h: Fix copyright. - - * src/include/Makefile.sub: Update. - -2000-04-20 Werner LEMBERG - - * src/roff/troff/input.cc (input_char_description): Removing - superfluous space char. - - * tmac/tmac.X: Fix typo \(bq -> \(Bq. - - * doc/groff.texinfo: Document EBCDIC. - -2000-04-19 Werner LEMBERG - - Introducing `shc' as the glyph name for the soft hyphen character. - - * tmac/tmac.tty, tmac/tmac.latin1, tmac/tmac.html, - font/devlatin1/R.proto: Use it. - - * NEWS: Updated. - -2000-04-18 Werner LEMBERG - - * src/devices/grops/ps.cc (ps_printer::flush_sbuf): Removing - dependency on ASCII order. - -2000-04-16 Sandor BARANY - - * src/libs/libgroff/illegal.c: Added EBCDIC table. - * src/roff/troff/input.cc: Added adaptation to EBCDIC. - - * src/preproc/refer/refer.cc, src/roff/troff/env.cc: Minor changes - to increase portability. - -2000-04-15 Werner LEMBERG - - * aclocal.m4: Added GROFF_EBCDIC and GROFF_OS390 tests. - Redefined AC_OUTPUT_MAKE_DEFS to replace ASCII character `012' with - the generic `\n' if under OS/390 Unix. - - * configure.in: Call GROFF_EBCDIC and GROFF_OS390. - - * configure: Regenerated. - -2000-04-14 Werner LEMBERG - - * doc/groff.texinfo: More conversions to @Deffn. - -2000-04-12 Werner LEMBERG - - * tmac/tmac.psfig: Fix incorrect use of `&' operator by replacing it - with `:'. - - * src/roff/nroff/nroff.man: Add note about tmac.tty-char. - -2000-04-10 Werner LEMBERG - - * doc/groff.texinfo: More conversions to @Deffn. - -2000-04-08 Werner LEMBERG - - * src/libs/libgroff/{getopt.c,getopt1.c}, src/include/getopt.h: - Updated to latest version (glibc 2.1.3). - -2000-04-07 Werner LEMBERG - - * doc/Makefile (clean): Include more index files. - Add rule texinfo->dvi. - -2000-04-05 Werner LEMBERG - - * doc/groff.texinfo: Added new index `op' for operators. More - info on end of sentence characters. More use of @Deffn. - -2000-03-30 Werner LEMBERG - - * */*.man: Adding a note that a whitespace can be inserted between - a command line option and its parameter -- we are using GNU getopt. - - * src/roff/groff/groff.man: Add example of `-m mandoc'. - -2000-03-28 Werner LEMBERG - - Correct anachronism of calling the man macro file with `-man' - instead of `-m man' etc. - - * tmac/tmac.man, tmac/tmac.mandoc, tmac/tmac.markup, tmac/tmac.mdoc, - tmac/tmac.me, tmac/tmac.ms: New files tmac.m which simply - load tmac.. - - * tmac/Makefile.sub: Updated. Take care of $(tmac_an_prefix) etc. - - * NEWS: Updated. - - * doc/groff.texinfo: Updated. - - * tmac/groff_man.man: Copyright added. - -2000-03-27 Werner LEMBERG - - * doc/groff.texinfo: Introducing macros `Deffn' and `Defmac' to - typeset the request resp. escape name with a tt font -- due to a - bug in texinfo.tex it is necessary to use the `-e' switch with - texi2dvi. - - Improving info about usage of groff units. - - Other minor fixes. - -2000-03-20 Werner LEMBERG - - * doc/groff.texinfo: Added section about man macro package - (I've basically taken groff_man.man). Introducing new indices `ma' - for macros/strings and `gl' for glyph names. Other minor fixes. - - * tmac/groff_man.man: Fixed some typos. - -2000-03-19 Werner LEMBERG - - * doc/groff.texinfo: Removed all occurrences of `you', `we', etc. - Other minor fixes. - - * doc/texinfo.tex: New file. - -2000-03-18 Werner LEMBERG - - * doc/groff.texinfo: Improved section on number registers. Other - minor updates. - -2000-03-16 Werner LEMBERG - - * src/roff/groff/groff.man: Added info about grolbp. Make nicer - synopsis. - - * src/devices/grolbp/grolbp.man, src/roff/nroff/nroff.man, - src/devices/grolj4/grlj4.man, src/devices/grops/grops.man, - src/preproc/eqn/eqn.man, src/utils/afmtodit/afmtodit.man, - src/utils/tfmtodit/tfmtodit.man: Make nicer synopsis. - - * src/preproc/grn/grn.man: Better synopsis; added copyright. - - * src/roff/grog/grog.man: Updated copyright date. - -2000-03-14 Francisco Andrés Verdú - - * configure.in: Added test for strdup. - - * src/devices/grolbp/lbp.cc: Added a strdup() version in case none - is available. - - Replaced dynamic allocation of arrays `[...]' with `new' operator. - - Other minor fixes. - -2000-03-12 OKAZAKI Tetsurou - - * Makefile.comm: Add $(INCLUDES) to $(ALL_CFLAGS). - -2000-03-11 Werner LEMBERG - - * src/preproc/grn/hdb.cc (DBGetType): Added return value to make - compilers silent. - * src/preproc/grn/hgraph.cc: Add #ifdef for hypot(). - * src/include/lib.h: Remove some spaces. - -2000-03-10 Werner LEMBERG - - * src/libs/libgroff/tmpfile.cc (xtmptemplate, xtmpfile): Removing - initializers from arguments (some compilers don't like this). - -2000-03-09 Gaius Mulley - - * src/libs/libgroff/htmlindicate.cc: Added library file which is now - used by pic and eqn to tell grohtml where the graphic regions start - and end. - * src/libs/libgroff/Makefile.sub: Use it. - * src/preproc/eqn/main.cc, src/preproc/pic/troff.cc: Altered to use - graphic_start() and graphic_end() from htmlindicate.cc. - -2000-03-09 Werner LEMBERG - - * tmac/tmac.safer: Will now work correctly in compatibility mode. - * tmac/groff_man.man: More fixes. - -2000-03-08 Werner LEMBERG - - * doc/Makefile: Added texput.log to the `clean' target. - * doc/groff.texinfo: Added info about delimiters for escapes. - -2000-03-08 Bernd Warken - - * src/preproc/pic/pic.man: Add info on conversion of pic images to - other graphic formats. - -2000-03-07 OKAZAKI Tetsurou - - * Makefile.in, Makefile.sub, src/preproc/eqn/Makefile.sub, - src/roff/groff/Makefile.sub, src/roff/nroff/Makefile.sub, - src/utils/afmtodit/Makefile.sub: Use $(INSTALL_SCRIPT) for script - files. - -2000-03-07 Werner LEMBERG - - * doc/groff.texinfo: Spelling fixes. - -2000-03-06 Werner LEMBERG - - * tmac/groff_man.man: Completely revised to cover everything in - tmac.an. - - * doc/groff.texinfo, src/roff/troff/troff.man: Document evc request. - Other minor fixings. - * src/roff/troff/env.cc (environment_copy): Improve error message and - fix itoa->i_to_a. - * src/roff/troff/TODO: Updated. - - * doc/Makefile: Bug fixes -- this is still provisional, though... - - * tmac/eqnrc: Small fixes. - -2000-03-05 Abramo Bagnara - - Adding a request `evc' to copy environments. - - * src/roff/troff/env.cc (environment::copy, environment_copy): - Implement it. - * src/roff/troff/env.h: Add prototype. - -2000-03-05 Francisco Andrés Verdú - - Adding strsep() -- Solaris 8 doesn't have it. - - * configure.in: Test it. - * src/devices/grolbp/lbp.cc: Add code. - -2000-03-05 Werner LEMBERG - - * src/roff/troff/div.cc (macro_diversion::output, - top_level_diversion::output): Fixing an incompatibility with - original troff: \x'0' updates the .a register also. Thanks to - for pointing this out. - * doc/groff.texinfo: Document it. - - * Makefile.in: Create Makefile.dep if necessary before calling the - submake process to avoid warning about nonexistent file. - - * NEWS, PROJECTS: Updated. - -2000-03-04 Werner LEMBERG - - * tmac/troffrc: Add tmac.lbp. - -2000-03-03 Francisco Andrés Verdú - - * tmac/tmac.lbp: New file. - * src/devices/grolbp/grolbp.man: Add documentation of `lbpname' - command. - -2000-03-03 Werner LEMBERG - - * Makefile.in: Fixing $(subdir). - - * README, NEWS: Small fixes. - - * test-groff: Adding path to grolbp. - - * configure.in: The (new) file src/xditview/Imakefile.in will be - also configured -- it is now possible to build gxditview in a - directory different from $srcdir. - -2000-03-02 Blake McBride - - * src/libs/libgroff/searchpath.cc (open_file): Adapting to WinNT. - - * MORE.STUFF: Added website of bell labs and info about plot2dev. - -2000-03-01 Colin Phipps - - * src/utils/indxbib/indxbib.cc (main): Use mkstemp() for temporary - files. - -2000-02-29 Werner LEMBERG - - Adding GNU getopt to the groff distribution. - - * src/include/getopt.h, src/libs/libgroff/{getopt.c,getopt1.c}: - New files. - * src/include/Makefile.sub, src/libs/libgroff/Makefile.sub: Update. - * aclocal.a4: Remove GROFF_GETOPT function. - * configure.in, Makefile.in, PROBLEMS: Update. - * src/include/lib.h: Replace getopt tests with getopt.h. - * src/devices/grolbp/lpb.cc: Remove inclusion of getopt.h. - - * doc/groff.texinfo: Further checking/updating. Adding more index - entries. - - * man/groff_out.man: Fix nroff mode activation (for emacs). - * man/groff_font.man: Add missing ligature. - -2000-02-28 Werner LEMBERG - - * doc/groff.texinfo: Further checking/updating. Adding more index - entries. - - * src/devices/grolbp/grolbp.man: Added a comment line at the - beginning of the file (similar to shell scripts) which indicates - that `tbl' should be used as a preprocessor. - -2000-02-27 Blake McBride - - Adapting groff to MS Visual C++ 6.0 compiler (tested with - Windows NT 4.0). Uses _MSC_VER define where necessary. - - * src/devices/grodvi/dvi.cc: Making stdout a binary stream. - * src/devices/grolj4/lj4.cc: Making getopt variables `extern "C"'. - * src/devices/grohtml/html.cc, src/devices/grops/ps.cc, - src/include/lib.h, src/libs/libgroff/errarg.cc, - src/libs/libgroff/itoa.c, src/libs/libgroff/nametoindex.cc, - src/preproc/refer/label.y, src/preproc/refer/label.cc, - src/roff/groff/pipeline.c, src/roff/troff/column.cc, - src/roff/troff/div.cc, src/roff/troff/env.cc, - src/roff/troff/input.cc, src/roff/troff/node.cc, - src/roff/troff/reg.cc: Renaming itoa() to i_to_a() and iftoa() to - if_to_a() to avoid name clashes. - * src/include/posix.h: Don't use unistd.h. - * src/libs/libgroff/tmpfile.cc: Use `#ifndef...#else...#endif' - clause for integrating non-Unix xtmpfile() code. - * src/roff/troff/input.cc: Adding `public' keyword to macro_header - structure; use "rt" for popen() in pipe_source(); add getpid() - dummy function. - * src/roff/troff/node.cc: Use special versions of popen() in - real_output_file() and pclose() in ~real_output_file(). - -2000-02-27 Werner LEMBERG - - Adding a new driver, grolbp, for Canon CAPSL printers (LBP-4 and - LBP-8 series laser printers). This code has been contributed by - Francisco Andrés Verdú . - - * src/devices/grolbp/*: The grolbp output device. - * font/devlpb/*: The font description files. - * Makefile.in: Add grolpb and devlbp subdirectories. - - * src/devices/grodvi/grodvi.man, src/devices/grolj4/grolj4.man, - src/devices/grotty/grotty.man,src/roff/troff/troff.man: Minor - typographic fixes. - - * doc/groff.texinfo: Further checking/updating. Adding more index - entries. - - * NEWS: Updated. - - * src/devices/grolbp/Makefile.sub: Adding $(srcdir). - - * man/groff_font.man: Adding info about obsolete DESC keywords. - * src/devices/grolj4/grolj4.man: Documenting additional DESC - keywords. - -2000-02-26 Werner LEMBERG - - * src/preproc/grn/grn.man: Added info about the gremlin file format - (contributed by Daniel Senderowicz ). - -2000-02-25 Werner LEMBERG - - * src/preproc/grn/main.cc: Allow values of `narrow' parameter and - friends to be non-integer. - - * src/preproc/grn/grn.man: Document it. - - * doc/groff.texinfo: Further checking/updating. Adding more index - entries. - -2000-02-24 Werner LEMBERG - - * src/preproc/grn/main.cc: Introduce BASE_THICKNESS, defining - line thicknesses to be integer multiples of this value. - - * src/preproc/grn/grn.man: Commenting out the -s option -- the - corresponding code doesn't work (yet). - - * doc/groff.texinfo: Further checking/updating. Adding more index - entries. - -2000-02-23 Werner LEMBERG - - * src/preproc/grn/{main.cc, hgraph.cc}: Using point units to - specify line thickness instead of base units. The new default - values are now 0.15,pt 0.45pt, and 0.75pt for thin, middle, and - thick lines respectively. - - Removed unused variable `prevval'. - - * src/preproc/grn/grn.man: Updated. - -2000-02-22 Werner LEMBERG - - * src/preproc/grn/main.cc: Slight formatting. - - * src/roff/groff/groff.man: Formatting fix. - * src/preproc/grn/grn.man: Ditto. - - * src/roff/grog/grog.pl: Fixing two embarassing bugs. - - * doc/groff.texinfo: Further checking/updating. - -2000-02-21 Werner LEMBERG - - * README, INSTALL, PROJECT, PROBLEMS, BUGREPORT: Updated. - - * test-groff: Added grn subdir to path. - - * doc/groff.texinfo: Some restructing and other small improvements. - - * src/roff/groff/groff.cc (help): Fixed info string. - -2000-02-20 Werner LEMBERG - - * doc/meref.me: Fix description of .GS request. - - * src/roff/troff/troff.man: Fixing typo. - - Adding the `grn' preprocessor for gremlin graphic files. - - * src/preproc/grn/*: This is the Berkeley distribution written by - David Slattengren and Barry Roitblat, adapted to groff by Daniel - Senderowicz and Werner Lemberg. - - * doc/grnexampl.{me,g}: A sample for grn. - - * Makefile.in: Added subdirectory entry for grn. - - * src/roff/groff/groff.cc: Added support for grn. It can be now - called with the switch `-g'. - - * src/roff/groff/groff.man: Updated. - - * src/roff/grog/grog.{man,pl,sh}: Updated. - - * NEWS: Updated. - -2000-02-11 Gaius Mulley - - * src/include/lib.h: Added xtmptemplate and made xtmpfile - parametrically polymorphic. - - * src/libs/libgroff/tmpfile.cc: Implemented xtmptemplate - and the alterations to xtmpfile. - xtmpfile can be requested to return the filename created - and asked not to unlink the temp file. The default behaviour - if parameters are absent is exactly the same as before. - -2000-02-11 Abramo Bagnara - - A new request `length' is available which returns the length of a - string in a number register: - - * src/roff/troff/input.cc (length_macro): Implement it. - * src/roff/troff/input.cc (init_input_requests): Register it. - -2000-02-11 Werner LEMBERG - - * doc/groff.texinfo, src/roff/troff/troff.man: Add documentation - of the `substring' request. - - * src/roff/troff/troff.man, doc/groff.texinfo: Document `length' - request. - - * src/roff/troff/TODO, NEWS: Updated. - -2000-02-09 Werner LEMBERG - - * src/roff/groff/groff.man: Added an example. - -2000-02-06 Werner LEMBERG - - I've considerably modified the directory structure of the - distribution to get a more vertical layout. For example, the number - of top level directories has been reduced from 42 to 6. - - As a consequence, many changes, especially to the makefiles, were - necessary: - - * The makefile variables `top_builddir' and `top_srcdir' have been - introduced. Virtually all relative paths have been replaced with - absolute ones using these two variables. - - * Dependencies (in the files `Makefile.dep') are no longer part of - the distribution. Instead, they are created during a `make install' - in the build directory. - - * aclocal.m4 (GROFF_SRCDIR, GROFF_BUILDDIR): Two new functions to - make `top_srcdir' and `top_builddir' absolute. - - Some other changes: - - * Man pages now depend on the files `VERSION' and `REVISION'. - - * The added shell script `mkinstalldirs' will replace `mkdir' in - almost all cases. - - * VERSION: Version number increased to 1.16. - -2000-02-04 Werner LEMBERG - - * grops/psrm.cc (read_one_of): Fixed pointer incrementation. - - * Makefile.in: Removed $(tmac_m) since it is no longer needed - (after an update of the mm stuff). - - * troff/Makefile.sub (majorminor.cc): Fix dependencies. - -2000-02-03 Werner LEMBERG - - The .psbb request will now also accept Mac PS images (i.e. using LF - as the EOL character). - - * troff/input.cc (ps_get_line): New function, taken from psrm.cc - (with slight modifications). - * troff/input.cc (do_ps_file): Use it. - - * test-groff: Add grohtml and grolj4 output devices to PATH. - -2000-01-30 Werner LEMBERG - - * NEWS, MORE.STUFF: Updated. - -2000-01-30 Cary D. Renzema - - Add the `srand' command to pic. - - * pic/lex.cc, pic/pic.y: Implement it. - * pic/pic.man: Document it. - * pic/pic.cc, pic/pic.tab.h: Regenerated (with yacc). - -2000-01-30 Werner LEMBERG - - Add a new request `.psbb'. This does exactly what the external - program psbb did. It scans a PostScript image file for a - %%BoundingBox comment and extracts the bounding box values (in - PostScript units) which are then stored in the four new (read-only) - number registers `llx', `lly', `urx', and `ury'. - - This will allow the usage of the .PSPIC macro without worrying - about unsafe behaviour of groff, i.e., it will work without the - `-U' switch of groff. - - * troff/input.cc: Implement it. - * tmac/tmac.pspic: Use it. - * troff/troff.man, grops/grops.man, NEWS: Document it. - * psbb/*, Makefile.in: Remove it since it is no longer needed. - - This is bloody C code simply adapted from psbb.c! Any improvements - welcome. - -2000-01-29 Werner LEMBERG - - * man/groff_font.man: Minor clarifications. - - * NEWS: Updated. - -2000-01-28 Werner LEMBERG - - * afmtodit/afmtodit.pl: Use new `--' comment delimiter. - -2000-01-28 Gaius Mulley - - * man/groff_font.man: Brought up to date regarding tcommand - extensions. - * libgroff/font.cc: Handle everything after `--' as a comment - in the font files. - * devps/*: Added comment delimiter inside devps font files. - -2000-01-28 Werner LEMBERG - - * tmac/tmac.arkup, tmac/groff_markup.man: Replace \fC...\fR with - \fC...\fP (which now works as expected). - - * troff/troff.man: Fix typo. - -2000-01-27 Gaius Mulley - - Completed the pass_filenames implementation in troff. - - * libdriver/input.cc: Will read the new `F' tcommand. - * troff/node.cc, troff/node.h: Will issue the new `F' tcommand. - * troff/input.cc: Use it. - -2000-01-26 Werner LEMBERG - - * troff/env.cc (set_font): Fix the behaviour of \fP. The previous - font will now be updated even if an invalid font is selected. - -2000-01-24 Werner LEMBERG - - * doc/homepage.ms: Updated for new tmac.arkup. - - * tmac/tmac.html: Disable line breaks after hyphen-like characters. - - * tmac/tmac.arkup: Cleanup. - - Added `\&' to .HTML macro to `leave vertical mode', so to say. - - Removed obsolete .LINK macro completely. - - The macros .URL, .FTP, and .MAILTO now accept a third argument which - will be immediately appended to the second argument (to be used with - punctuation, for example). - - Disabled .CDFTP macro temporarily for security reasons. - - * tmac/groff_markup.man: Complete revision for latest changes in - tmac.arkup -- note that it does not yet format correctly with - grohtml :-( - -2000-01-23 Bruno Haible - - * nroff/nroff.sh: Accept -Tutf8 option and pass it through. - * devutf8/R.proto: Add mappings for wp, lh, rh. - * devutf8/NOTES: Updated. - -2000-01-23 Werner LEMBERG - - * doc/groff.texinfo: Updated version/copyright info. - -2000-01-21 Gaius Mulley - - Added support for two new directives in device descriptions: - `pass_filenames' (to pass the input file name to the output device) - and `use_charnames_in_special' (to support e.g. accented characters - in the `X' request). - - * include/font.h, troff/charinfo.h: Declare it. - - * libgroff/font.cc, libgroff/fontfile.cc: Set it. - - * devhtml/DESC: Use it. - - * troff/input.cc: New function encoded_char. - - * troff/token.h: Add test for `specialness'. - -2000-01-21 Werner LEMBERG - - * tmac/Makefile.sub: tmac.a4 and tmac.trace have been removed by - mistake from the list of files to be installed. - -2000-01-18 Werner LEMBERG - - * README: Added info how to apply patches. - -2000-01-15 Jan Echternach - - * troff/node.cc (ligature_note::operator delete): Fix g++ warning. - -2000-01-15 Gaius Mulley - - * troff/input.cc: Add support for troffrc-end. - - * tbl/main.cc: Altered to issue table-start and table-end special - characters if using the html device. - - * devhtml/*: Modified font files to incorporate html encoding of - characters. - - * tmac/groff_markup.man: New file documenting tmac.arkup. - - * tmac/troffrc-end: New file. This is invoked after all user - specified macros. Currently used by the html device to include - tmac.html. Thus no need for users to specify -mhtml anymore. - - * tmac/Makefile.sub (NORMALFILES): Add troffrc-end. - (MAN7): Add groff_markup.man. - - * tmac/tmac.an, tmac/tmac.html: Small html updates. - - * tmac/troffrc: tmac.arkup will now be called for the html device. - - * libgroff/font.cc, libgroff/font.h: Altered to include reading of - extra device specific information about fonts. - - * doc/homepage.ms: New file. It is an example how an HTML home page - could look like with grohtml. - - * doc/Makefile: Add homepage.ms. Remove rule for pic.html. - -2000-01-12 Bruno Haible - - * devutf8/R.proto: Add mappings for ti, Fn, st, an. Change mappings - of Im, Re. - - * devutf8/NOTES: Updated. - -2000-01-08 Bruno Haible - - * eqn/box.cc, eqn/lex.cc, eqn/other.cc, eqn/over.cc, eqn/special.cc, - eqn/text.cc, grodvi/dvi.cc, grops/ps.cc, grops/psrm.cc, - libbib/index.cc, libbib/linear.cc, libbib/search.cc, - libdriver/printer.cc, libgroff/font.cc, libgroff/string.cc, - pic/lex.cc, pic/object.cc, refer/label.y, refer/ref.cc, tbl/main.cc, - tbl/table.cc, tfmtodit/tfmtodit.cc, troff/dictionary.cc, - troff/div.cc, troff/env.cc, troff/input.cc, troff/node.cc, - troff/node.h, troff/reg.cc: Avoid most "g++ -Wall -Wno-sign-compare" - warnings. - - * troff/node.cc (bracket_node::copy): Initialize last to NULL. - -2000-01-12 Fabrizio Polacco - - grolj4: Paper size will be searched case-insensitively. - - * include/lib.h: Add check for strcasecmp(). - * grolj4/li4.cc (lookup_paper_size): Use strcasecmp(). - * configure.in: Check for strcasecmp(). - -2000-01-11 Werner LEMBERG - - * troff/Makefile.sub (majorminor.cc): Fix incorrect path to - `REVISION'. - -2000-01-10 Werner LEMBERG - - * Makefile.comm, Makefile.in, doc/Makefile: More fixes for the - revision scheme. - - Add a new read-only register, `.Y', which contains the groff - revision. - - * troff/input.cc (init_input_requests): Define it. - * troff/Makefile.sub (majorminor.cc): Define `revision' string. - * doc/groff.texinfo, troff/troff.man: Document it. - - * libgroff/Makefile.sub (version.cc): Add definition of - `Version_string[]', consisting of `..' - * eqn/main.cc, grodvi/dvi.cc, grolj4/lj4.cc, grops/ps.cc, - grotty/tty.cc, hpftodit/hpftodit.cc, indxbib/indxbib.cc, pic/main.cc, - refer/refer.cc, soelim/soelim.cc, tbl/main.cc, tfmtodit/tfmtodit.cc, - troff/input.cc, pfbtops/pfbtops.c: Use it. - -2000-01-10 Fabrizio Polacco - - Add a revision scheme to the groff package. - - * REVISION: New file. - * libgroff/Makefile.sub (version.cc): Use it to define - `revision_string[]'. - * grops/psrm.cc: Use revision_string (converted to an unsigned - integer) in constructor of resource_manager. - -2000-01-10 Bruno Haible - - * devutf8/Makefile.sub, devutf8/DESC.proto, devutf8/R.proto: New - files. - * Makefile.in (DEVDIRS): Add devutf8. - * grotty/tty.cc: Include device.h. - (glyph): Change type of `code' to `unsigned int'. - (tty_printer): New field is_utf8. Constructor takes device argument. - (tty_printer::tty_printer): If device if `utf8', set is_utf8. - (tty_printer::add_char): Change type of first arg to `unsigned int'. - (tty_printer::put_char): New function. - (tty_printer::end_page): Use put_char() instead of ::putchar(). - (make_printer): Pass device to tty_printer constructor. - * nroff.sh: Determine default device by calling 'locale'. As a - fallback, look at all of $LC_ALL, $LC_CTYPE, $LANG, $LESSCHARSET. - Recognize UTF-8 locales. - * tmac/eqnrc: Recognize utf8 like latin1. - * tmac/troffrc: Device utf8 needs tmac.tty. - -2000-01-07 Werner LEMBERG - - * tmac/Makefile.sub: tmac.a4 and tmac.trace will now be installed. - -2000-01-07 Paul Eggert - - Add a new predefined writeable number register, `year', - which contains the current year. - - * doc/groff.texinfo, PROBLEMS, troff/troff.man: Document it. - * tmac/tmac.s: Use it. - * troff/input.cc (init_registers): Initialize it. - -2000-01-06 Werner LEMBERG - - * PROBLEMS: Fixed typo. - -2000-01-04 Paul Eggert - - * PROBLEMS: Add Y2k advice for the yr number register. - -2000-01-03 Paul Eggert - - * doc/groff.texinfo: Fix Y2k bug in documentation of \n(yr. - -2000-01-02 Werner LEMBERG - - * tmac/tmac.arkup: Slight modification of macros to provide better - appearance for non-HTML formats. - -2000-01-01 Charles Levert - - * soelim/soelim.cc (include_path_append): realloc(NULL, n) - does not automatically translate to malloc(n) on all OSes - (e.g., SunOS) so do it explicitly. Also, check the returned - value. - -2000-01-01 Werner LEMBERG - - * tmac/tmac.arkup: Added .LINE macro. Some formatting. - - * Makefile.in: Added $(tmac_m) again since the Makefile in `mm' - expects this variable - -2000-01-01 Gaius Mulley - - * doc/Makefile: Added instructions to create HTML and text - versions of some files. - -1999-12-31 Werner LEMBERG - - * Updated INSTALL.gen. - - * tmac/tmac.arkup: Added fixes so that .FTP and .MAILTO works - better resp. correctly with non-HTML devices. - -Version 1.15 released -===================== - -1999-12-28 Werner LEMBERG - - * NEWS, VERSION: Changed to 1.15 - -1999-12-27 Paul Eggert - - * nroff/nroff.man: -S is safer, not safe. - - * groff/groff.cc (main): Use `safer', not `safe', in variable - names. This does not change the behavior. - - * troff/input.cc (main): Likewise. - - * nroff/nroff.sh: Likewise. - - * troff/input.cc (prepend_string): New function. - (main): Prepend -msafer, so that we check macro libraries for - safety. - - * PROBLEMS: Report problem with Sun C++ 5.0 and 5.1. - -Version 1.14 released -===================== - -1999-12-26 Werner LEMBERG - - * NEWS, VERSION: Changed to 1.14. - -1999-12-24 Werner LEMBERG - - * refer/refer.cc: Fixing the last fix. - -Version 1.13 released -===================== - -1999-12-23 Werner LEMBERG - - * tmac/tmac.an: A typo (`.if' instead of `.ie') made the page - number disappear. - - * NEWS: Updated. - - * tmac/tmac.safer: Forgot to remove `so' from the `rm' request. - - * VERSION: Changed to 1.13 -- to be compliant with the Adobe 3.0 - document conventions, the version number must be a real. - -Version 1.12.1 released -======================= - -1999-12-22 Werner LEMBERG - - * VERSION: Changed to 1.12.1. - -1999-12-22 Alan Rooks - - * refer/refer.cc (do_file): Slight modification to satisfy the - `Standard system CC - C++ Compilation System 3.1 03/03/99' on SCO - UnixWare 7.1. - -1999-12-20 Werner LEMBERG - - * changed prep.ai.mit.edu -> ftp.gnu.org; updated copyright - notices. - - * tmac/tmac.safer, tmac/groff_msafer.man: Remove `so' (again) from - list of unsafe requests. - - * pic/pic.man: Fixed a typo. - - * man/groff_out.man: Fixed a typo. - -1999-12-18 Werner LEMBERG - - * Makefile.in: Doc fixes. - -1999-12-17 Fabrizio Polacco - - * groff/groff.cc: Missing `U' option added to getopt(). - - * troff/troff.man: Missing `U' option added to synopsis. - -Version 1.12 released -===================== - -1999-12-14 Werner LEMBERG - - * troff/input.cc (usage), groff/groff.cc (synopsis): Added -U flag - to the synopsis. - - * nroff/nroff.sh, nroff/nroff.man: Replaced `secure', `unsecure' - with the more appropriate terms `safer' and `unsafe'. - - * libgroff/strerror.c, aclocal.m4, configure.in: Added checks for - sys_nerr and sys_errlist[]. - - * pic/pic.h, aclocal.m4, configure.in: Added check for hypot(). - - * pic/pic.y, pic/pic.cc: Added check for fmod(). - -1999-12-13 Werner LEMBERG - - * VERSION: Changed to 1.12. - - Here some patches from various sources; most of them taken from - the Debian distribution. - - * tmac/groff_mdoc.man, tmac/groff_mdoc.samples.man, - tmac/Makefile.sub: New files copied directly from the NetBSD - distribution. Probably, some additional adaptation later on is - necessary... - - * tmac/tmac.safer, tmac/groff_msafer.man: Added `so' to the list - of unsafe requests. - - * groff/groff.cc, groff/groff.man, nroff/nroff.sh, - nroff/nroff.man, pic/main.cc, pic/pic.man, troff/input.cc, - troff/troff.man: Added option `-U' for unsafe mode. Safe mode - (`-S') is now the default. - - * README, NEWS: Updated. - -1999-12-09 Werner LEMBERG - - * doc/groff.texinfo: Regenerated nodes and menus with emacs. - - * doc/Makefile (clean): Added cleaning commands for groff.texinfo. - -1999-12-06 Werner LEMBERG - - * configure.in: Removed AC_PREFIX_PROGRAM since it causes more - grief than relief today. Additionally, it is against the GNU - coding standards. - - * configure: Recreated. - -1999-12-05 Werner LEMBERG - - * configure.in: Added GROFF_LIBM. - - * configure: Recreated. - - * aclocal.m4 (GROFF_LIBM): New function which tests whether -lm is - necessary. - - * Makefile.in: Added definition of $(LIBM). - - * Makefile.comm (LIBM): Removed. - - * pfbtops/Makefile.sub: On AIX, -lm is needed also. - -1999-12-03 Gaius Mulley - - * doc/Makefile: Added rule for generation pic.html. - - (clean): Files produced by grohtml will be removed also. - - * doc/pic.ms: Small fix. - - * tmac/tmac.html: Fixed suppression of headers. - -1999-11-16 Gaius Mulley - - * tmac/tmac.html: Fixing horizontal arrows. - - Turning off hyphenation. - - * tmac/tmac.an: Improved support for grohtml; better indentation, - no footers/headers. - -1999-10-31 Gaius Mulley - - * tmac/tmac.arkup: Added CDFTP macro - - * tmac/tmac.html: All headers are turned off for ms, me, and mm - macros. - - * tmac/troffrc: Some additions for HTML stuff. - -1999-10-06 Gaius Mulley - - * tmac/tmac.html: Small changes. - -1999-09-26 Werner LEMBERG - - * doc/groff.texinfo: Minor fixes. - -1999-09-26 Gaius Mulley - - * devhtml/TR: Changed spacewidth to 3. - - * tmac/Makefile.sub (NORMALFILES): Added tmac.arkup. - - * tmac/tmac.html: Moved markup macros to tmap.arkup. - - * tmac/tmac.arkup: New file. - - * grohtml/ChangeLog: New file. - -1999-09-16 Werner LEMBERG - - * doc/groff.texinfo (Common Features): Added Copying chapter. - Changed format to @smallbook. - -1999-09-15 Werner LEMBERG - - * NEWS: Added info about groff.texinfo. - - * doc/groff.texinfo: Will now compile (using texi2dvi) without - warning messages. - -1999-09-14 Werner LEMBERG - - * groff/groff.man: More updates. - -1999-09-13 Werner LEMBERG - - * doc/groff.texinfo: New file. This manual is still very - rudimentary. It has been originally contributed by Trent - A. Fisher with first corrections and - additions by me. - - * INSTALL: Added information about the `doc' subdir - - * troff/troff.man: Minor fixes. - - * groff/groff.man: Added missing `-L arg' to SYNOPSIS section; - reordered options. - - * troff/input.cc (usage): Added missing `-ffam' to usage message. - - * Makefile.in (dist): groff-$(version).tar.gz must be removed - also, otherwise it is included itself in another call of `make - dist'. - - * groff/groff.cc (synopsis): Removed superfluous space. - - * PROJECTS, PROBLEMS, NEWS: Updated. - - * VERSION: Updated to 1.12beta. - - * BUG-REPORT: Some cosmetic fixes. Corrected email address. - - * README: Updated: Included documentation about CVS repository, - mailing lists, and daily snapshots. - - * tmac/Makefile.sub: Fixed $(tmap_wrap) finally. - -1999-09-12 Bjarni Ingi Gislason - - * tmac/tmac.an: If the tag didn't fit into the space that the - macro `TP' specifies, the rest of the tag went into the space for - the next line. - -1999-09-12 Jeffrey Copeland - - * grolj4/lj4.cc: Added duplex printing (option `-d'). - - * grolj4/grolj4.man: Document duplex printing. - -1999-09-12 Werner LEMBERG - - * doc/Makefile (pic.ps): Fixed rule which caused problems with - non-GNUish sed programs. - - * tmac/doc-syms: Removed extra space from -iso8802-3 macro - definition. - - * configure.in (LIBS): Added `-lc' - - * Makefile.comm (.man.n): Added substitution for @TMAC_AN_PREFIX@. - - * pic/tex.cc (solid_arc): Casting M_PI to double. - - * libgroff/putenv.c (putenv): Changed function header to ANSI C. - - * groff/groff.man, tmac/Makefile.sub (MAN7), tmac/groff_msafer.man - (new file), tmac/msafer.man (deleted), tmac/groff_me.man (new - file), tmac/me.man (deleted): {me,msafer} -> groff_{me,msafer}. - - * groff/groff_man.man: New file. This manual page was originally - written for the Debian GNU/Linux system by Susan G. Kleinmann - . - - * eqn/list.cc (list_box::compute_metrics, - list_box::compute_sublist_width): Removed variable declaration to - avoid shadowing warnings. - - * grops/psrm.cc (resource_manager::process_file): Ditto. - - * tfmtodit/tfmtodit.cc (main): Ditto. - - * libgroff/font.cc (font::load_desc): Renamed auxiliary variable - to avoid shadowing warnings. - - * tbl/table.cc (block_entry::do_divert, table::do_row): Renamed - shadowing loop variable. - - * groff/groff.man, troff/troff.man: Added doc about grohtml. - -1999-09-12 Gaius Mulley - - New grohtml frontend to convert groff input to html. - - * Makefile.in (CCPROGDIRS, DEVDIRS): Added html device. - - * tmac/Makefile.sub (NORMALFILES): Added tmac.html. - - * tmac/eqnrc: Added html device. - - * tmac/tmac.html: New file. - - * eqn/main.cc (do_file, inline_equation), pic/troff.cc - (troff_output::start_picture, troff_output::finish_picture), - tbl/main.cc (process_input_file): - Surrounded output with `graphics_start' and `graphics_end' so that - the html driver can identify non-text portions. - - * grodvi/dvi.cc (dvi_printer::set_char), grolj4/lj4.cc - (lj4_printer::set_char), grops/ps.cc (ps_printer::set_char), - grotty/tty.ps (tty_printer::set_char): Additional parameter - `name'. - - * include/printer.h: Class printer: New function - set_char_and_width; new variables (is_char_named, is_named_set, - named_command, named_char_s, named_char_n) to hold information - about named characters -- needed by the html driver. - - * libdriver/printer.cc (printer::set_ascii_char, - printer::set_special_char): Use set_char_and_width. - - * devhtml/*: New device files for html driver. - - * grohtml/*: New driver grohtml. - -1999-09-11 Wilfredo Sanchez - - * tmac/doc-common, tmac/tmac.an: Removed the word `UNIX' in - default strings. - -1999-09-11 Luke Mewburn - - * libgroff/string.cc (search): Small fix to test against NULL - pointer. - -1999-09-11 Jeff Conrad - - * troff/node.cc (copy): The characters in a bracket escape (e.g., - \b'abc') were stacked in reverse order when processed in a - diversion. - - * troff/node.h: Added `*last' to struct `node' to make the above - fix work. - - * troff/input.cc (read_draw_node), libdriver/input.cc (do_file): - The default scale for the 'f' and 't' graphics functions were 'm' - rather than 'u' (i.e., no scaling). - -1999-09-11 Peter Miller - - * groff/groff.cc (main), groff.man, soelim/soelim.cc (main, - do_file), soelim/soelim.man: Added `-I file' option to soelim, - defining include paths. - - * soelim/soelim.cc (include_path_append): New function. - -1999-09-11 Larry Jones - - * tbl/main.cc (process_options): Unix (at least Documenter's - Workbench) tbl allows arbitrary non-alpha characters between - options. - -1999-09-11 Paul Eggert - - Y2k fixes. Don't assume that the current year precedes 2000. - - * doc/meref.me: Add \n(y2, \n(y4. - - * tmac/doc-common (Yr): New number register. - (Dd): Don't assume current year precedes 2000. - - * tmac/tmac.e (td): Likewise. - (y2, y4): New number registers. - - * pic/pic.man: Update reference for pic paper to May, 1991 - version. - -1999-09-11 Werner LEMBERG - - * tmac/Makefile.sub (install_data, stamp-wrap, uninstall_sub): - Removed quotation marks which prevented correct expansion of - $(tmac_wrap). - - * devlj4/Makefile.sub (LJ4RES): Fixed value (600 instead of 300). - -1999-09-10 Werner LEMBERG - - * Makefile.sub (DISTCLEANFILES): Added `config.log' and - `config.cache'. - - * Removed configure.old. - -1999-08-31 Werner LEMBERG - - * VERSION: Updated to 1.11.1 - -1999-05-27 Werner LEMBERG - - * doc/Makefile: changed `.PS' postfix to `.ps' for consistency. - - * tmac/Makefile.sub (install_data, stamp-wrap, uninstall_sub): - added quotations around $(tmac_wrap) to avoid syntax error if - variable is empty. - - * configure: Newly generated using autoconf 2.13. - - * Makefile.in (LDFLAGS): Set variable to @LDFLAGS@. - -Fri Aug 15 08:51:47 1997 Eric S. Raymond - - * README, PROJECTS, NEWS, INSTALL, VERSION, - doc/Makefile. doc/pic.ms, groff/groff.man: - Prepare for 1.11 release. No code changes. - Documentation for pic added (doc/pic.ms). - -Sun Nov 26 11:45:13 1995 James Clark - - * Version 1.10 released. - -Fri Nov 24 09:56:16 1995 James Clark - - * afmtodit/afmtodit.pl: Avoid comment on first line. - -Mon Nov 20 11:13:49 1995 James Clark - - * aclocal.m4 (GROFF_INSTALL_SH): New macro. - * configure.in: Call it. - - * Makefile.sub (configure): Depends on aclocal.m4 not acgroff.m4. - (distfiles): Doesn't depend on config.log or config.cache. - -Sun Oct 1 08:45:36 1995 James Clark - - * grog/grog.sh: Use print "" rather than print in END rule. - -Wed Aug 23 13:30:52 1995 James Clark - - * tbl/main.cc (process_data): Don't give error for excess data - entries that are comments. - -Fri Jul 28 11:00:27 1995 James Clark - - * tbl/main.cc (process_data): Fix case where new for-scope rules - silently change meaning of code. - -Tue Jul 4 23:39:51 1995 James Clark - - * troff/env.cc (hyphenate): Loop over all consecutive sequences - of non-zero hyphenation codes. - -Sat Jul 1 00:42:15 1995 James Clark - - * aclocal.m4 (GROFF_POSIX): Use conflicting declaration technique. - -Thu Jun 29 13:58:36 1995 James Clark - - * tmac/tmac.e (ip): Divert the tag so as to freeze the spaces. - -Tue Jun 27 12:30:16 1995 James Clark - - * tmac/tmac.andoc: Make it work in compatibility mode. - - * refer/token.h (token_info::is_range_sep): New function. - * refer/token.cc (init_special_chars): Make \(en a RANGE_SEP. - * refer/ref.cc (reference::output): More sophisticated check for - multiple pages. - - * devps/prologue.ps (MANUAL): New procedure. - * grops/ps.cc (main): New -m option. - (usage): Include -m. - (ps_printer::~ps_printer): Implement -m. - - * aclocal.m4 (GROFF_G): New macro. - * configure.in: Call it. - * Makefile.in (g): Provided by configure. - - * hpftodit/hpftodit.cc (basename): Rename to xbasename. - - * tmac/tmac.tty: Disable warning about bad fonts. Remove font - translations. - - * Makefile.in (tmacpath): Don't include /usr/lib/tmac. - (tmac_m, tmac_s): Deleted. - (sys_tmac_prefix, tmac_wrap, tmac_prefix, tmac_an_prefix, - tmac_s_prefix): New variables. - (MDEFINES): Change accordingly. - * Makefile.comm (.man.n): Use new TMAC_* variables. - * configure.in (GROFF_TMAC): Call. - * aclocal.m4 (GROFF_TMAC): Define. - * tmac/Makefile.sub (stamp_wrap): New target. - (install_data, uninstall_sub): Handle macro wrapping. - -Mon Jun 26 14:54:39 1995 James Clark - - * tbl/main.cc (main): Ignore -T option. - -Thu Jun 22 09:08:06 1995 James Clark - - * devlj4/generate/special.map: Add definition of \(nb. - - * tmac/tmac.dvi: Add definition of \(nb. - - * troff/dictionary.c (dictionary::dictionary): association::v gets - initialized by association::association. - - * tmac/Makefile.sub: Avoid using temporary files when installing. - - * troff/env.cc (environment::set_font): Make bad font number a - warning. - - * Makefile.in (fontpath): Remove $(prefix)/lib/font from fontpath. - - * Makefile.in (datadir): Use share rather than lib. - - * groff/groff.cc (basename): Rename to xbasename. - -Wed Jun 21 16:59:46 1995 James Clark - - * Makefile (CCLIBS): Don't use. - * Makefile.ccpg: Likewise. - - * acgroff.m4: Rename to... - * aclocal.m4: Modify extensively for autoconf 2. - * configure.in: Likewise. - * Makefile.in: Likewise. - - * groff/pipeline.c (const): Declare as empty if __STDC__ not - defined. - (xstrsignal): Check for definition of NSIG. Conditionalize - on SYS_SIGLIST_DECLARED. Make return type const. - -Sat Jun 10 12:28:16 1995 James Clark - - * troff/input.cc (interpolate_macro): Rephrase missing space - warning. - -Thu May 11 01:07:16 1995 Jason Merrill - - * addftinfo/addftinfo.cc, eqn/delim.cc, eqn/lex.cc, eqn/list.cc, - grodvi/dvi.cc, groff/groff.cc, grops/ps.cc, grops/psrm.cc, - grotty/tty.cc, include/ptable.h indxbib/indxbib.cc, - libbib/index.cc, libbib/linear.cc, libbib/search.cc, - libdriver/input.cc, libdriver/printer.cc, libgroff/font.cc, - libgroff/lf.cc, libgroff/nametoindex.cc, libgroff/ptable.cc, - libgroff/string.cc, lkbib/lkbib.cc, lookbib/lookbib.cc, - pic/lex.cc, pic/object.cc, pic/pic.y refer/label.y refer/ref.cc, - refer/refer.cc, refer/token.cc, tbl/main.cc, tbl/table.cc, - tfmtodit/tfmtodit.cc, troff/dictionary.cc, troff/div.cc, - troff/env.cc, troff/input.cc, troff/node.cc, troff/symbol.cc: - Fix 'for' scoping. - -Wed Apr 19 21:15:11 1995 James Clark - - * troff/input.cc (spring_trap): Push a macro_iterator rather than a - string_iterator. - (spring_trap, postpone_traps, unpostpone_traps): Move to later in - file. - (macro_iterator::macro_iterator): Add additional argument. - -Mon Apr 10 12:06:02 1995 James Clark - - * troff/div.cc (vertical_size::vertical_size): In place of integer - specifying line spacing use cunits specifying post vertical - space. - (macro_diversion::output, top_level_diversion::output): Likewise. - * troff/div.h: Change declarations accordingly. - * troff/env.cc (pending_output_line): Replace ls field by post_vs - field. - (pending_output_line::pending_output_line, - pending_output_line::output, environment::output, - environment::output_line, environment::output_title, - environment::hyphenate_line): In place of - integer specifying line spacing use cunits specifying post vertical - space. - (environment::environment): Add post_vertical_spacing and - prev_post_vertical_spacing arguments. - (environment::get_post_vertical_spacing): New function. - (environment::total_post_vertical_spacing): New function. - (environment::post_vertical_spacing): New function. - (init_env_requests): Initialize pvs request and .pvs register. - * troff/env.h: Change declarations. - -Tue Mar 28 09:52:07 1995 James Clark - - * tmac/tmac.pspic: Immediately remove the temporary file. - -Sat Mar 25 10:43:11 1995 James Clark - - * tmac/tmac.pspic (PSPIC): Scale graphic uniformly even when - height is specified. - -Thu Jan 26 16:20:13 1995 James Clark - - * tbl/table.c (struct vertical rule, class table_entry): Use int - not short for start_row and end_row. - -Fri Jan 13 13:53:05 1995 James Clark - - * troff/input.cc (trapping_blank_line, blank_line_macro): New - functions. - (diverted_space_node::reread, process_input_stack): Call - trapping_blank_line() rather than blank_line(). - (init_input_requests): Bind "blm" to blank_line_macro(). - - * tmac/tmac.s (XA): Use .br and par@reset rather than XA. - -Tue Jan 10 11:40:35 1995 James Clark - - * troff/env.cc (environment::possibly_break_line): Require that - width total excluding width of final space node be greater than - the target text length. - -Tue Jan 3 09:13:37 1995 James Clark - - * troff/node.cc (kern_pair_node::vertical_extent): New function. - -Sun Dec 4 13:19:07 1994 James Clark - - * troff/node.cc (charinfo_node): New class. - (glyph_node, composite_node): Derive from charinfo_node. Change - member functions accordingly. - -Wed Nov 30 10:29:29 1994 James Clark - - * nroff/nroff.sh: Use -Tlatin1 not -TLatin1. - -Mon Aug 8 10:17:59 1994 James Clark (jjc@jclark.com) - - * tmac/tmac.tty-char: Add definitions for \(ab and \[arrowvertex]. - - * devps/generate/textmap (notsubset): Add. - - * tmac/tmac.a4: New file. - -Sun Jul 24 20:08:42 1994 James Clark (jjc@jclark.com) - - * pic/main.cc (had_parse_error): New variable. - (do_picture, do_whole_file): Set had_parse_error if yyparse() - returns non-zero. - (main): Return 1 if had_parse_error is true. - -Tue Jul 19 13:40:31 1994 James Clark (jjc@jclark.com) - - * grolj4/lj4.cc (main): Avoid use of strtoul. - -Mon Jul 18 15:03:02 1994 James Clark (jjc@jclark.com) - - * nroff/nroff.sh: Default device is -Tlatin1 if $LC_CTYPE is - iso_8859_1 or $LESSCHARSET is latin1. - -Sun Jul 10 13:38:35 1994 James Clark (jjc@jclark.com) - - * hpftodit: New directory. - * Makefile.in (CCPROGDIRS): Add hpftodit. - * devlj4/generate: New directory. - -Thu Jul 7 23:49:48 1994 James Clark (jjc@jclark.com) - - * configure.in: Don't use AC_VFORK. - * groff/pipeline.c (run_pipeline): Use fork() always. - -Wed Jul 6 11:13:17 1994 James Clark (jjc@jclark.com) - - * grops/ps.cc (main): Use %1 not %s in error message for -w. - - * Makefile.in (CCPROGDIRS): Add grolj4. - (DEVDIRS): Add devlj4. - * grolj4, devlj4: New directories. - * tmac/troffrc: Handle lj4. - * tmac/tmac.lj4: New file. - -Fri Jun 17 18:02:53 1994 James Clark (jjc@jclark.com) - - * tmac/tmac.e (@n): Set indent to 0 before calling |h. - -Wed Jun 1 07:33:47 1994 James Clark (jjc@jclark.com) - - * troff/input.cc (do_if_request): At end of second string, switch - environments before getting next token. - -Fri May 20 07:39:18 1994 James Clark (jjc@jclark.com) - - * devps/psstrip.sed: Split rule that strips whitespace on either - side of delimiters. - -Wed May 18 08:13:47 1994 James Clark (jjc@jclark.com) - - * troff/node.h (font_family::make_definition): Add return value to - declaration. * troff/symbol.h (symbol::operator==, - symbol::operator!=): Likewise. - -Tue May 17 20:46:06 1994 James Clark (jjc@jclark.com) - - * groff/groff.cc (main, help, synopsis): Handle -S. - (possible_command::insert_arg): New function. - - * tmac/tmac.safer: New file. - * tmac/msafer.man: New file. - * tmac/Makefile.sub (FILES): Add tmac.safer and msafer.man. - -Thu Mar 10 01:58:30 1994 Paul Eggert (eggert@twinsun.com) - - * pic/pic.h, pic/main.cc (safer_flag): New variable. - * pic/pic.y (placeless_element): Avoid unsafe operations if - `safer_flag' is set. - * pic/main.cc (main): Add -S option, which sets `safer_flag'. - -Tue May 10 13:02:31 1994 James Clark (jjc@jclark.com) - - * eqn/lex.cc (get_token): Put call to add_context() in block to - work around Sun C++ 4.0 bug. - - * include/stringclass.h (operator +): Use ?: instead of `if' to - work around Sun C++ 4.0 bug. - -Thu May 5 11:18:03 1994 James Clark (jjc@jclark.com) - - * tbl/main.cc (process_format): Accept - as a synonym for the _ - key letter. - - * libbib/index.cc (minus_one): Don't declare as const. - -Fri Apr 29 09:32:48 1994 James Clark (jjc@jclark.com) - - * troff/input.cc (get_char_for_escape_name): Push back a newline. - -Wed Apr 27 21:14:18 1994 James Clark (jjc@jclark.com) - - * troff/input.cc (write_macro_request): New function. - (init_input_requests): Bind write_macro_request to writem. - -Sun Apr 17 11:15:38 1994 James Clark (jjc@jclark.com) - - * tmac/tmac.s (@EN): Turn filling back on even if there was no - equation. - - * eqn/lex.cc (do_space): Supply missing argument to lex_error. - - * tmac/tmac.s (@TS): Renamed from TS. - (TS): Call LP then TS again. - (cov*ab-init): Alias @TS to TS. - - * tmac/tmac.s: Allow QP or RS to initialize. - - * tmac/tmac.s (par@load-init): New macro. Call at end of file. - Move initializations of PS and LL here. - (par@init): Don't initialize HY. Avoid changing environment 0. - (par*env-init): Don't all par@reset. - -Thu Apr 14 19:15:45 1994 James Clark (jjc@jclark.com) - - * include/posix.h: Include only if not using . - -Sun Apr 10 09:54:44 1994 James Clark (jjc@jclark.com) - - * Makefile.in (MDEFINES): Add LDFLAGS. - (LDFLAGS): Add definition line. - -Thu Apr 7 22:22:22 1994 James Clark (jjc@jclark.com) - - * troff/input.cc (get_optional_char): Split off error check into... - (check_missing_character): New function. - * troff/token.h: Declare it. - * troff/env.cc (margin_character): Don't call get_optional_char. - Only call tok.next() after making the node. - - * include/lib.h (getopt): Make 2nd argument char *const *. - -Fri Mar 11 07:28:03 1994 James Clark (jjc@jclark.com) - - * nroff/conftest.sh: Deleted. - -Fri Mar 4 10:51:36 1994 James Clark (jjc@jclark.com) - - * pic/make-dos-dist: Deleted. - -Wed Mar 2 20:59:16 1994 James Clark (jjc@jclark.com) - - * devps/psstrip.sed: Strip comments before stripping trailing - white space. - -Sat Feb 19 13:07:16 1994 James Clark (jjc@jclark.com) - - * Version 1.09 released. - -Wed Feb 16 16:53:49 1994 James Clark (jjc@jclark.com) - - * tmac/doc-ditroff (hK): Don't reset page number if \nC is > 0. - -Mon Feb 14 08:26:40 1994 James Clark (jjc@jclark.com) - - * libgroff/font.cc (font::load_desc): Fix typo in error message. - -Sun Feb 13 09:37:38 1994 James Clark (jjc@jclark.com) - - * libgroff/new.cc (operator new): Rewrite so as to avoid warning - about returning without a value. - - * troff/charinfo.h (charinfo::get_special_translation): Cast - TRANSLATE_NONE to int. - - * refer/token.cc (lookup_token, store_token): Remove bogus loop - test. Fix test so that it works with n unsigned. - - * pic/pic.y (defaults_table): Fully bracket initializer. - * pic/lex.cc (lookup_keyword): Likewise. - * eqn/lex.cc (token_table, def_table): Likewise. - * eqn/box.cc (param_table): Likewise. - * troff/input.cc (warning_table): Likewise. - * libgroff/font.cc (table): Likewise. - * grops/ps.cc (ps_printer::special): Likewise. - * grops/psrm.cc (resource_manager::process_file): Likewise. - * tfmtodit/tfmtodit.cc (lig_chars, lig_table): Likewise. - * refer/command.cc (command_table): Likewise. - * addftinfo/addftinfo.cc (param_table): Likewise. - - * troff/symbol.cc (symbol::symbol): Prevent compiler warnings - about temp's being unused. - (unused): New function. - - * groff/pipeline.cc: Declare c_fatal. - - * libbib/linear.cc (bmpattern::search): Cast patterrn[--j] to - uchar. - - * libbib/index.cc (index_search_item::load): Prevent compiler - warnings about fd_closer's being unused. - (unused): New function. - -Sat Feb 12 10:31:59 1994 James Clark (jjc@jclark.com) - - * troff/input.cc (copy_mode_error): Make `prefix' static. - Fix typo. - - * include/posix.h: Include is HAVE_CC_OSFCN_H is - defined. - * acgroff.m4, configure.in, Makefile: Rename HAVE_CC_UNISTD_H to - HAVE_CC_OSFCN_H and modify accordingly. - - * troff/input.cc (init_charset_table): radicalex overlaps - horizontally. - - * groff/acgroff.m4 (GROFF_ISC_SYSV3): New macro (from - udodo!hans@relay.NL.net). - * groff/configure.in: Call it. - - * groff/acgroff.m4 (GROFF_PCLOSE): New macro. - * groff/configure.in: Call it. - * include/lib.h: Conditionalize declaration of pclose. - - * troff/div.cc (last_page_number): New global variable. - (top_level_diversion::begin_page): Exit if we just printed the - last page. - * troff/div.h (last_page_number): Declare it. - * troff/input.cc (parse_output_page_list): Set last_page_number. - - * eqn/sqrt.cc: Rename \(rn to \[radicalex]. - * devps/S, devps/textmap, tmac/tmac.ps, tmac/tmac.dvi, - tmac/tmac.X: Likewise. - * tmac/tmac.ps, tmac/tmac.X, tmac.dvi: Add definitions of \(rn. - * tmac.dvi: Make \(ru and \(ul extend beyond their width by .04m. - -Fri Feb 11 11:45:40 1994 James Clark (jjc@jclark.com) - - * tmac/doc-ditroff (hK): Remove groff specific code which - prevented page-breaks between separate manual entries. If this is - the first page, don't set the page number to 1. - - * acgroff.m4 (GROFF_POSIX): New macro. - * configure.in: Use it. - - * troff/node.cc (class real_output_file, - real_output_file::real_output_file, - real_output_file::~real_output_file): Conditionalize use of - popen/pclose on POPEN_MISSING. - * troff/node.h: Conditionalize pipe_command on POPEN_MISSING. - * troff/input.cc (pipe_command): Give an error if POPEN_MISSING. - (pipe_source): Similarily. - - * acgroff.m4 (GROFF_PROG_CCC): Update message about libg++. - - * acgroff.m4 (GROFF_GETOPT, GROFF_PUTENV, GROFF_POPEN): Detect - presence of declarations by trying to compile example with - conflicting declarations. (gcc only gives a warning for missing - declarations.) - -Wed Feb 9 09:12:23 1994 James Clark (jjc@jclark.com) - - * tmac/tmac.pspic (PSPIC): Allow options to specify alignment - (from Ulrich Lauther). - -Tue Feb 8 03:56:40 1994 James Clark (jjc@jclark.com) - - * libbib/linear.cc (file_buffer::load): Use S_ISREG macro. - -Thu Feb 3 09:34:35 1994 James Clark (jjc@jclark.com) - - * indxbib/indxbib.cc (write_hash_table): Add code for case where - pointers and ints have different sizes. - -Sun Jan 9 16:17:51 1994 James Clark (jjc@jclark.com) - - * tmac/tmac.s (par*env-init): Call par@reset. - -Fri Jan 7 10:24:27 1994 James Clark (jjc@jclark.com) - - * tmac/tmac.s (@IP): Switch to a new environment when diverting - tag. - (par*push-tag-env, par*pop-tag-env): New macros. - -Wed Jan 5 21:18:34 1994 James Clark (jjc@jclark.com) - - * grops/ps.cc (ps_printer::ps_printer): Use MAX_LINE_LENGTH for - initializing `out'. Reduce MAX_LINE_LENGTH from 79 to 72. - - * grops/ps.cc (ps_printer::~ps_printer): Output %%CreationDate - comment. Include . - -Wed Dec 15 14:14:00 1993 James Clark (jjc@jclark.com) - - * grops/ps.cc (is_small_h, is_small_v): Deleted. - (ps_printer::flush_sbuf): Use absolute motion only at beginning of - lines. - -Tue Dec 14 10:06:34 1993 James Clark (jjc@jclark.com) - - * troff/input.cc (read_request): Only print a prompt if reading - from the terminal. Also clearerr on EOF if reading from the - terminal. Declare isatty. - -Mon Nov 29 08:38:15 1993 James Clark (jjc@jclark.com) - - * refer/label.y: Rename map_t to map_func and extractor_t to - extractor_func. - -Sat Oct 30 06:38:12 1993 James Clark (jjc@jclark.com) - - * include/assert.h: Don't use volatile. - * libgroff/assert.cc: Likewise. - -Fri Oct 29 15:00:23 1993 James Clark (jjc@jclark.com) - - * troff/input.cc (abort_request): Look at character in tok before - calling get_copy(). - -Thu Oct 28 14:09:48 1993 James Clark (jjc@jclark.com) - - * troff/troff.h (NO_RETURN): Deleted. - * troff/div.cc (cleanup_and_exit): Don't declare aas NO_RETURN. - * troff/input.cc (exit_troff): Likewise - - * Makefile.in: Remove `Making ...' messages since GNU make now - gives these. - - * configure.in: Use AC_HAVE_HEADERS(unistd.h) instead of AC_UNISTD_H. - -Wed Oct 27 11:12:51 1993 James Clark (jjc@jclark.com) - - * tmac/tmac.s (@init): Initialize PO to \n(.o here, rather than - to constant 1 inch. - -Sat Oct 23 10:03:52 1993 James Clark (jjc@jclark.com) - - * tmac/tmac.e (hl): Use \n[.in] rather than \n(.i. - -Thu Oct 14 12:09:45 1993 James Clark (jjc@jclark.com) - - * eqn/delim.cc (delim_box::compute_metrics): Don't increase - MARK_REG if there was no left delimiter. - -Sat Oct 2 19:54:47 1993 James Clark (jjc@jclark.com) - - * pic/troff.cc (troff_output::text): Set line thickness to - relative before outputting text. - - * tmac/tmac.e (@k): Don't zero ?T. - ((z): Likewise. - -Sat Sep 25 11:08:43 1993 James Clark (jjc@jclark.com) - - * tmac/tmac.e ($p): Handle possibility that $3 is empty. - -Wed Aug 18 08:51:41 1993 James Clark (jjc@jclark.com) - - * troff/input.cc (decode_args): Warn about unquoted tabs (from - Paul Eggert). - -Tue Aug 10 08:38:32 1993 James Clark (jjc@jclark.com) - - * troff/input.cc (ignoring): New variable. - (ignore): Set ignoring during call to do_define_macro. - (do_define_macro): Clear ignoring before interpolating terminating - macro. - (copy_mode_error): New function. - (get_char_for_escape_name, read_long_escape_name, - interpolate_arg): Use copy_mode_error. - (warning_table): Add WARN_IG. - * troff/troff.h (WARN_IG): Declare. - (WARN_TOTAL): Change accordingly. - - * groff/pipeline.c (strsignal): Rename to xstrsignal. - * groff/groff.cc (strsignal): Delete declaration. - -Fri Jul 16 01:43:12 1993 James Clark (jjc@jclark.com) - - * troff/div.cc (page_offset): Use 'm' as default scaling. - -Sat Jul 3 09:11:38 1993 James Clark (jjc@jclark.com) - - * nroff/nroff.sh: Ignore -u. - -Wed Jun 9 12:17:27 1993 James Clark (jjc@jclark.com) - - * Makefile.in (MDEFINES): Pass down MAKEOVERRIDES. - -Fri Jun 4 17:35:47 1993 James Clark (jjc@jclark.com) - - * tmac/tmac.s (par*box-draw): Set adjustment mode to l while - drawing box. - (B2): With -Tascii, leave additional vertical space before - and after. Ensure that the left and right indent is restored to - what it was even if the point size changes. Don't call - par@finish. Change the indent, line length and title length - directly. With -Tascii, make the width of the box 1n less. - (B1): Remember 1n at the current point size. Don't call - par@reset. Change the indent, line length and title length - directly. Ensure that the temporary indent is preserved. - (par*box-mark-top): Turn off no spacing mode. - -Thu Jun 3 17:47:14 1993 James Clark (jjc@jclark.com) - - * Makefile.in (dist): Use .gz suffix. - -Thu May 27 20:04:59 1993 James Clark (jjc@jclark.com) - - * troff/input.cc (main): Add return 0. - * pic/main.cc (main): Use return instead of exit. - * tbl/main.cc (main): Likewise. - * eqn/main.cc (main): Likewise. - * grops/ps.cc (main): Likewise. - * grotty/tty.cc (main): Likewise. - * groff/groff.cc (main): Likewise. - * grodvi/dvi.cc (main): Likewise. - * refer/refer.cc (main): Likewise. - * indxbib/indxbib.cc (main): Likewise. - * lkbib/lkbib.cc (main): Likewise. - * soelim/soelim.cc (main): Likewise. - * addftinfo/addftinfo.cc (main): Likewise. - * acgroff.m4 (GROFF_PROG_CCC, GROFF_CC_COMPILE_CHECK, - GROFF_COOKIE_BUG, GROFF_CC_ANSI_BUG): Likewise. - - * troff/token.h (process_input_stack): Don't declare as static. - * troff/input.cc: Likewise. - - * troff/node.c (invalidate_fontno): Make it a static member of - class font_family. Change callers. - * troff/node.c: Change declaration. - - * tbl/main.cc (struct input_entry_format): Add explicit public - specifier. - * tbl/table.cc (struct text_stuff, struct single_hline_stuff, - struct double_hline_stuff): Likewise. - * tbl/table.h (struct entry_format): Likewise. - * pic/object.h (struct saved_state): Likewise. - - * include/stringclass.h: Add forward declarations of friend - functions that are later declared as inline. Don't include inline - specifier in friend declaration. - - * libgroff/lib.h: Declare popen and pclose. - * acgroff.m4 (GROFF_POPEN): New macro. - * configure.in: Call it. - - * include/lib.h (PI): New constant. Undef first if necessary. - * tfmtodit/tfmtodit.cc (main): Use PI rather than M_PI. - * grops/ps.cc (degrees, radians): Likewise. - * libgroff/font.cc (font::get_skew): Likewise. - - * grops/ps.cc (is_ascii): New function. - (ps_output::put_string): Use is_ascii. Use csprint rather than - isprint. - (ps_printer::define_encoding): Use csspace. - * libgroff/strtol.c (ISASCII): New macro. - (strtol): Cast arguments to is*() and tolower() to unsigned char. - Use ISASCII rather than isascii. - * libgroff/cmap.cc: Use isascii() only if defines it. - * libgroff/cset.cc: Likewise. - * libdriver/input.cc: Include cset.h. - (do_file, get_integer, possibly_get_integer): Use csdigit() rather - than isdigit(). - - * refer/refer.cc (main): Use %ld rather than %d for longs. - - * libbib/index.cc (index_search_item_iterator::get_tag): Use - S_ISREG macro. - - * addftinfo/addftinfo.cc (param_t): Add explicit `int'. - -Mon May 24 08:51:37 1993 James Clark (jjc@jclark.com) - - * troff/input.cc (hyphenation_code): Skip white space between - char/code pairs. - -Sun May 16 08:15:52 1993 James Clark (jjc at jclark.com) - - * tbl/table.h (table::entry_list_tailp): New member. - (table::table): Initialize it. - (table::add_entry): Use entry_list_tailp to avoid O(n^2) - behaviour. - -Sat May 15 17:26:00 1993 James Clark (jjc at jclark.com) - - * grotty/tty.cc (tty_printer::add_char): Don't discard characters - with negative horizontal positions. Remove casts of glyph::hpos to - int. - (USHRT_MAX): Delete definition. - (SHRT_MAX, SHRT_MIN): New definitions. - (glyph::hpos): Change type to short. - (tty_printer::end_page): Output multiple backspaces if necessary. - Remove casts of glyph::hpos to int. - -Fri May 7 12:14:37 1993 James Clark (jjc at jclark.com) - - * tmac/tmac.s (@RT): New definition. - -Thu May 6 21:36:54 1993 James Clark (jjc at jclark.com) - - * refer/refer.cc (do_file): Make sure current_filename is set when - filename is "-". - - * pic/common.cc (common_output::dot_line): Handle zero length - lines. - -Sun May 2 19:54:16 1993 James Clark (jjc at jclark.com) - - * tmac/tmac.s (par@reset): Get value for .hy for \n[HY]. - (par@init): Initialize \n[HY]. - -Mon Apr 26 11:43:16 1993 James Clark (jjc at jclark.com) - - * troff/dictionary.cc (dictionary::remove): Continue when - r < j < i. - -Sun Apr 25 11:03:00 1993 James Clark (jjc at jclark.com) - - * Makefile.com (.y.cc): Avoid ending up with two versions of - $(YTABH). - -Thu Apr 22 21:03:45 1993 James Clark (jjc at jclark.com) - - * tmac/tmac.dvi (\(,c): Define only if it does not exist. - (\(,C): Likewise. Also fix typo. - -Wed Apr 21 08:47:32 1993 James Clark (jjc at jclark.com) - - * lib.h: Delete extraneous semi-colon. - - * Add pso request: `so' from a pipe. - * troff/input.c (file_iterator::file_iterator): Add 3rd argument. - (file_iterator::close): New function. - (file_iterator::~file_iterator, file_iterator::next_file): Use - file_iterator::close. - (file_iterator::backtrace): Say `process' rather than `file' when - the stream is popened. - (pipe_source): New function. - (init_input_requests): Bind ".pso" to pipe_source. - -Tue Apr 20 00:02:26 1993 James Clark (jjc at jclark.com) - - * afmtodit/afmtodit.pl: Avoid single quotes in comments. - - * pfbtops/pfbtops.c: Output 64 characters per line. Output hex - digits in lower case. - -Mon Apr 19 09:55:57 1993 James Clark (jjc at jclark) - - * Version 1.08 released. - - * Makefile.in (dist): Insert || true after ln -s commands that - might fail. - - * mm: Update to mm 1.16. - - * acgroff.m4 (GROFF_CSH_HACK): New macro. - * configure.in: Call GROFF_CSH_HACK. Substitute for - SH_SCRIPT_SED_CMD. - * Makefile.in (SH_SCRIPT_SED_CMD): New variable. Include in - MDEFINES. - * nroff/Makefile.sub (nroff): New target. - (install_data): Install nroff. - * eqn/Makefile.sub (neqn): Sed with SH_SCRIPT_SED_CMD. - * grog/Makefile.sub (grog): Sed grog.sh with SH_SCRIPT_SED_CMD. - -Sat Apr 17 08:24:28 1993 James Clark (jjc at jclark) - - * eqn/Makefile.sub (neqn): Add chmod +x. - - * grog/Makefile.sub (grog): Remove spurious semi-colon. - -Fri Apr 16 22:41:57 1993 James Clark (jjc at jclark) - - * troff/input.cc (string_iterator::string_iterator()): Initialize - lineno and count. - -Tue Apr 13 10:22:28 1993 James Clark (jjc at jclark) - - * troff/div.cc (macro_diversion::space, - top_level_diversion::space): Don't set high_water_mark. - (macro_diversion::output, top_level_diversion::output): Don't - include post line space in high water mark. - -Wed Apr 7 12:48:18 1993 James Clark (jjc at jclark) - - * eqn/eqn.y: Don't define YYDEBUG. - * pic/pic.y: Likewise. - -Mon Apr 5 10:15:15 1993 James Clark (jjc at jclark) - - * tmac/tmac.e ([3): Add space after comma following editors. - Change double spaces to single spaces. - ([4): Change double spaces to single spaces. - - * grops/ps.h (USE_PS_ADOBE_2_0): New flag for broken_flags. - * grops/ps.cc (ps_printer::~ps_printer): If the USE_PS_ADOBE_2_0 - bit is set in broken_flags, use 2.0 rather than 3.0 as the version - after %!PS-Adobe- (for Newsprint). - - * troff/div.cc (top_level_diversion::begin_page): When - before_first_page is 1, set page_number to 1. - -Sun Apr 4 14:28:53 1993 James Clark (jjc at jclark) - - * eqn/box.cc (box::top_level): Protect equation with \&. - -Sat Apr 3 23:27:25 1993 James Clark (jjc at jclark) - - * groff/groff.cc (possible_command::set_name): Delete old name. - - * groff/groff.cc (possible_command::~possible_command): Use - a_delete. - - * troff/node.cc (troff_output_file::begun_page): New member. - (troff_output_file::troff_output_file): Initialize it. - (troff_output_file::really_begin_page): Only output V command if a - page has been begun. - - * pic/pic.y (placeless_element): Delete argument to PRINT after - use. - -Fri Apr 2 11:31:02 1993 James Clark (jjc at jclark) - - * Make wrapman work. - * troff/div.h (class top_level_diversion): Replace - first_page_begun by before_first_page (with opposite sense). - * Change first_page_begun to before_first_page inverting sense. - * troff/div.cc (class nl_reg): New class. - (init_div_requests): Use class nl_reg for \n(nl. - (top_level_diversion::begin_page): Don't call - output_file::begin_page if before_first_page is 2; - reset before_first_page afterwards. If have_next_page_number is - false, then always increment page_number. - * tmac/tmac.an: Set traps within TH rather than at the top-level. - Restore compatibility mode after loading, and then disable - compatibility mode in TH. - -Thu Apr 1 11:09:34 1993 James Clark (jjc at jclark) - - * grotty/tty.cc (tty_printer::end_page): Don't discard characters - past last line. - * troff/node.h (output_file::trailer): Declare. - * troff/div.cc (cleanup_and_exit): Call output_file::trailer(). - * troff/node.cc (output_file::trailer): New function. - (troff_output_file::~troff_output_file): Move most code into... - (troff_output_file::trailer): New function. - (class troff_output_file): Delete page_length member. Declare - trailer(). - (troff_output_file::really_begin_page): Use current page length - for final V command. - - * tbl/main.cc (struct options): New decimal_point_char member. - (options::options): Initialize this. - (process_options): Implement decimalpoint option. - (process_data): Pass decimal_point_char option to table::table. - * tbl/table.h (class table): New decimal_point_char member. - (table::table): Add additional argument. - * tbl/table.cc (find_dot): Rename to find_decimal_point. Add - second argument specifying decimal point character. Use this - instead of '.'. - (table::table): Initialize decimal_point_char. - (table::add_entry): Change call to find_dot. - - * troff/input.cc (get_copy, token::next): Implement \V. - (interpolate_environment_variable): New function. - -Tue Mar 30 14:41:39 1993 James Clark (jjc at jclark) - - * pic/lex.cc (lookup_keyword): Rename MIN to K_MIN, MAX to K_MAX. - * pic/pic.y: Likewise. - - * grotty/tty.cc (tty_printer::add_char, tty_printer::end_page): - Add casts to int. - * refer/ref.cc (reference::insert_field, reference::delete_field): - Likewise. - * troff/number.cc (parse_term): Likewise. - - * acgroff.m4 (GROFF_PROG_YACC): New macro. - * configure.in: Use GROFF_PROG_YACC. - - * acgroff.m4 (GROFF_PROG_CCC): Don't add -O automatically for gcc - and g++. - * Makefile.in (OPTIMIZE): New define. - (DEBUG): Empty by default. - (CCFLAGS, CFLAGS): Include $(OPTIMIZE). - - * acgroff.m4 (GROFF_SYS_SIGLIST): Don't quote program. - (GROFF_ARRAY_DELETE): Likewise. - (GROFF_CC_COMPILE_CHECK): Quote use of $2 and $3. - - * troff/env.cc (trie::~trie): Make virtual to shut up g++. - - * devps/psstrip.sed: Use different delimiter on last line (so that - it works with BSD 4.4 sed.) - -Mon Mar 29 17:07:14 1993 James Clark (jjc at jclark) - - * devps/psstrip.sed: Delete comments. - - * acgroff.m4 (AC_GETOPT): Don't test whether declares - optind, opterr, optarg. - * lib.h: When UNISTD_H_DECLARES_GETOPT is defined, declare optind, - opterr, optarg. - -Sun Mar 28 17:44:25 1993 James Clark (jjc at jclark) - - * Makefile.in (check): Dummy target. - -Wed Mar 3 04:53:38 1993 James Clark (jjc at jclark) - - * Version 1.07 released. - - * Integrate mm 1.11. - - * tbl/table.cc (alphabetic_block_entry::print): start_row was used - where start_col was meant. - -Thu Feb 25 07:55:36 1993 James Clark (jjc at jclark) - - * grog/grog.sh, grog/grog.pl: Recognize PH and SA as -mm macros. - -Wed Feb 24 10:15:34 1993 James Clark (jjc at jclark) - - * troff/input.cc (token::next): Make \z\o'...' and similar things - work. - - * env.h (MARGIN_CHARACTER_ON, MARGIN_CHARACTER_NEXT): New - constants. - (environment): Add margin_character_flags member. - * env.cc (environment::environment(symbol), - environment::environment(const environment *): Initialize - margin_character_flags. - (margin_character): Rewrite. - (environment::output_line): Add a margin character if - margin_character_flags is non-zero. Turn off the - MARGIN_CHARACTER_NEXT bit. If that makes margin_character_flags - zero, use margin_character_node without copying and then set - margin_character_node to 0. - - * devps/DESC.in: Change minimum size to 1000. - -Tue Feb 23 14:57:49 1993 James Clark (jjc at jclark) - - * troff/symbol.h (symbol::hash): Change return type to unsigned - long. - * troff/dictionary.cc (dictionary::lookup, dictionary::remove): - Add casts to int. - - * test-groff: Use -r rather than -x. - - * grops/psfig.diff: Include in distribution again. - -Mon Feb 22 09:10:44 1993 James Clark (jjc at jclark) - - * Makefile.in (dist): Use gzip. - -Sun Feb 21 11:12:53 1993 James Clark (jjc at jclark) - - * acgroff.m4 (GROFF_GETOPT): Check for declaration of getopt() in - unistd.h as well as in stdlib.h. - * include/lib.h: Include is STDLIB_H_DECLARES_GETOPT is - defined; otherwise include and if - UNISTD_H_DECLARES_GETOPT is defined. - - * configure.in: use builtin(include, ... rather than include(... - * configure: Regenerate with autoconf 1.3. - - * libdriver/print.cc (printer::adjust_arc_center): Use new - algorithm suggested by Andy Fyfe. - - * libdriver/printer.cc (printer::adjust_arc_center): New function. - * include/printer.h: Declare this. - * grops/ps.cc (ps_printer::draw): Use it. - * grodvi/dvi.cc (dvi_printer::draw): Use it. - -Fri Feb 19 23:13:51 1993 James Clark (jjc at jclark) - - * Makefile.comm (.man.n): Replace macrodir by tmacdir. - -Thu Feb 11 16:46:59 1993 James Clark (jjc at jclark) - - * eqn/main.cc (main): Handle "eqn -". - -Mon Jan 4 20:29:56 1993 James Clark (jjc at jclark) - - * tmac/tmac.e (++): Install fix from comp.bugs.4sd. - - * mm: Integrate version 1.08. - - * pic/troff.cc (troff_output::finish_picture): Set - EQN_NO_EXTRA_SPACE reg to 0 rather than removing it. - * eqn/box.cc (box::extra_space): Set EQN_NO_EXTRA_SPACE_REG to 0 - if it's not defined. Check whether the register is non-zero rather - than whether it's not defined. - * tmac.e ({, <): Make argument to \x zero if \n(0x is non-zero. - - * indxbib/indxbib.cc: Move all signal handling into... - * indxbib/signal.c: New file. - * configure.in: Call AC_RETSIGTYPE. - - * acgroff.m4 (GROFF_STRUCT_EXCEPTION): New macro. - * configure.in: Call GROFF_STRUCT_EXCEPTION. - * libgroff/matherr.c: Protect with ifdef HAVE_STRUCT_EXCEPTION. - - * troff/input.cc (token::token, token::operator=): Work round SGI - C++ bug. - * pic/object.cc (position::position): Likewise. - -Mon Dec 28 21:50:21 1992 James Clark (jjc at jclark) - - * pic/pic.h: Move declaration of hypot(). - -Wed Dec 16 12:28:29 1992 James Clark (jjc at jclark) - - * pic/pic.h: Declare hypot(). - - * pic/pic.h: Define M_PI if necessary. - -Thu Dec 10 12:03:29 1992 James Clark (jjc at jclark) - - * tmac/tmac.e (re): Add alternative version that doesn't use groff - `.ta T' feature. - - * devps/prologue.ps (RE): Handle the possibility that the old font - doesn't have a FontName entry. - -Wed Dec 2 10:25:29 1992 James Clark (jjc at jclark) - - * tmac/tmac.e (fam): Redefine to set family in environment 2. - (@C): Use @fam not fam. - -Thu Nov 26 16:01:25 1992 James Clark (jjc at jclark) - - * lookbib/lookbib.cc (main): Change type of start to const char *. - * lkbib/lkbib.cc (main): Likewise. - - * eqn/lex.cc (definition::definition): Don't use member - initializer syntax for members of anonymous unions. - - * troff/input.cc (input_stack::backtrace): Change type of to const - char *. - -Wed Nov 25 13:43:09 1992 James Clark (jjc at jclark) - - * include/stringclass.h (class string): Declare inline friend - functions as inline in class declaration. - * troff/hvunits.h (class hunits, class vunits): Likewise. - * include/refid.h (class reference_id): Likewise - * troff/troff.h (points_to_units(units), scale(units, double)): - Delete declarations. - * libdriver/input.cc (get_char): Delete declaration. - * include/lib.h: Change 2nd argument of getopt from const char ** - to char **. - * troff/symbol.cc (symbol::symbol): Cast `new char *[n]' to `const - char **' before assigning to a `const char **'. - * tbl/table.cc: Delete extra declarations of prints(). - -Tue Nov 24 14:33:13 1992 James Clark (jjc at jclark) - - * libgroff/font.cc (font::load_desc): Cast `new char *[n]' to `const - char **' before assigning to a `const char **'. - - * libgroff/errarg.cc (errarg::errarg): Don't use member - initializer syntax for members of anonymous unions. - -Sat Nov 21 05:02:23 1992 James Clark (jjc at jclark) - - * mm: Integrate version 1.07. - -Tue Nov 17 16:44:27 1992 James Clark (jjc at jclark) - - * troff/input.c (translate2): Rename to - (translate_no_transparent). - (init_input_requests): Rename tr2 to trnt. - -Mon Nov 16 09:49:32 1992 James Clark (jjc at jclark) - - * troff/charinfo.h (class charinfo): Add transparent_translate field. - (charinfo::set_translation, charinfo::set_special_translation): - Add second argument that specifies value for - transparent_translate. - (charinfo::get_translation, charinfo::get_special_translation): - Add optional second argument that specifies whether translation is - being used for transparent throughput. - * troff/input.cc (charinfo::set_translation, - charinfo::set_special_translation): Handle second argument. - (charinfo::charinfo): Initialize transparent_translate. - (translate): Split main part off into - (do_translate): New function. Pass argument saying whether - translation applies to transparent throughput. - (translate2): New request. - (init_input_requests): Bind translate2 to `tr2'. - -Wed Nov 11 11:43:20 1992 James Clark (jjc at jclark) - - * tbl/table.h (class table): Add `nokeep' flag. - * tbl/main.cc (process_options): Handle `nokeep' option. - * tbl/table.cc (table::init_output, table::do_row, table::do_top, - table::do_bottom): Don't output keep/release macro definitions or - calls when `nokeep' option has been specified. - -Sat Nov 7 01:28:33 1992 James Clark (jjc at jclark) - - * tmac/tmac.Xps (Xps-char): Use " as delimiter for \Z. - -Wed Nov 4 16:29:04 1992 James Clark (jjc at jclark) - - * tbl/table.cc (table_entry::divert, block_entry::do_divert, - block_entry::divert, alphabetic_block_entry::divert): Add extra - argument giving column separation. - (table::compute_widths): Pass column separation to - table_entry::divert(). - (block_entry::do_divert): If an entry spans multiple columns and a - minimumum width has been specified for each column, then set the - line length to the sum of the widths (plus possibly the column - separations). - - * troff/input.cc (set_escape_char): Don't set the escape_char - until after calling has_arg(). - -Tue Nov 3 11:23:27 1992 James Clark (jjc at jclark) - - * tbl/table.cc (table::do_top): Add missing \s0 for double box - case. - - * tbl/table.cc (table::print_double_hline): Avoid extra new line - in case where r > nrows - 1. - - * tbl/table.cc (BODY_HEIGHT): Deleted. - (LINE_SEP): New definition. - (table::print_single_hline, table::print_double_hline, - table::compute_vrule_top_adjust, table::compute_vrule_bot_adjust, - table::do_row, table::do_top): Use LINE_SEP space before a line - instead of \n[.v]-BODY_HEIGHT-BODY_DEPTH. - - * tbl/table.cc (text_entry::print_contents): New function. - (text_string_name, right_text_string_name): Deleted. - (TEXT_STRING, RIGHT_TEXT_STRING): Deleted. - (simple_text_entry::do_width, numeric_text_entry::do_width, - alphabetic_text_entry::do_width): Don't store the contents of the - entry in a string. - (left_text_entry::simple_print, right_text_entry::simple_print, - center_text_entry::simple_print, - alphabetic_text_entry::simple_print, - numeric_text_entry::simple_print): Print the entry directly - instead of using the stored string. - -Fri Oct 30 10:39:32 1992 James Clark (jjc at jclark) - - * devps/Makefile: Strip PostScript files. - * devps/prologue: Rename to... - * devps/prologue.ps. - * devps/psstrip.sed: New file. - * devps/download: Use .pfa rather than .ps for installed versions - of fonts. - -Thu Oct 29 09:14:43 1992 James Clark (jjc at jclark) - - * troff/env.cc (input_trap): Give a warning if the argument is out - of range. - - * troff/env.cc (adjust): Treat negative argument as missing. Round - argument > 5 down to 5. - - * troff/env.cc (center, right_justify): Make negative argument zero. - - * troff/div.cc (page_offset, vertical_position_traps): Treat - invalid argument as missing. - * troff/env.cc (line_spacing, line_length, title_length, indent, - underline, hyphen_line_max_request, control_char, - no_break_control_char, widow_control_request, adjust, input_trap, - point_size): Likewise. - * troff/node.cc (ligature, kern_request, bold_font, track_kern, - constant_space): Likewise. - * troff/input.cc (compatible, shift, warn_request, - set_escape_char): Likewise. - - * tbl/main.cc (format::format): Avoid doing `new int[0]'. - * tbl/table.cc (table::table): Likewise. - - * Makefile.dev (install_dev): depends on $(DEVFILES). - -Wed Oct 28 08:30:57 1992 James Clark (jjc at jclark) - - * devX75, devX75-12, devX100, devX100-12: New directories. - * Makefile.in: Add these to DEVDIRS. - - * troff/Makefile.sub, eqn/Makefile.sub, indxbib/Makefile.sub, - afmtodit/Makefile.sub, tmac/Makefile.sub, nroff/Makefile.sub, - grog/Makefile.sub, mm/Makefile.sub (uninstall_sub): New target. - * Makefile.in (uninstall, uninstall_sub, uninstall_dirs): New - targets. - * Makefile.ccpg, Makefile.cpg, Makefile.dev, Makefile.man - (uninstall): New target. - * Makefile.comm (uninstall, uninstall_sub, uninstall_man, - uninstall_prog, uninstall_dev): New targets. - - * troff/div.cc (return_request): Treat an invalid argument as - missing. - -Mon Oct 26 11:33:47 1992 James Clark (jjc at jclark) - - * tmac/tmac.e ((f): Set up the environment even when there's a - current diversion. Transperently throughput a call to @N. - (@N): New macro. - -Thu Oct 22 05:05:59 1992 James Clark (jjc at jclark) - - * tbl/table.cc (table::compute_vrule_top_adjust): Round adjustment - up to vertical resolution. - - * tbl/table.cc (table::do_row): Change row number after printing - stuff list. - - * pic/lex.cc (get_token_after_dot): Make .left and .right work. - -Wed Oct 21 14:46:45 1992 James Clark (jjc at jclark) - - * Rename CHANGES to NEWS. - -Tue Oct 20 23:25:21 1992 James Clark (jjc at jclark) - - * libgroff/new.cc (operator new): Avoid calling malloc(0). - -Mon Oct 19 09:10:13 1992 James Clark (jjc at jclark) - - * man.ultrix: Removed. - -Sun Oct 18 06:35:15 1992 James Clark (jjc at jclark) - - * Makefile.comm (extraclean): Delete files whose names begin with - `='. - - * pic/troff.cc (troff_output::text): Fix typo in implementation of - aligned text. - -Sat Oct 10 09:32:29 1992 James Clark (jjc at jclark) - - * troff/env.cc (hyphenate_request, vertical_spacing, no_number): - * troff/div.cc (page_length, need_space, space_request): Treat - invalid optional argument as missing. - * troff/env.cc (number_lines): If the first argument is present - but not a number, turn on line numbering, don't change the next - line number and parse the remaining arguments. - - * tmac/tmac.e (@q): Do the `ne' before changing to environment 2. - -Thu Oct 8 10:24:40 1992 James Clark (jjc at jclark) - - * eqn/box.h: Change declaration accordingly. - * eqn/box.cc (set_gsize): Change return type to int. Return 0 if - the specified size was bad but don't give an error. Check for - overflow. - * eqn/main.cc (main): Change caller. Leave validation to set_gsize. - * eqn/lex (do_size): Likewise. - -Wed Oct 7 09:48:59 1992 James Clark (jjc at jclark) - - * acgroff.m4 (GROFF_PROG_CCC): Use fopen when checking for C++ - compatible headers. - -Sun Oct 4 18:24:02 1992 James Clark (jjc at jclark) - - * tbl/table.cc (table::init_output): Improve error message when - table won't fit on one page. - -Fri Oct 2 10:41:40 1992 James Clark (jjc at jclark) - - * pic/troff.cc (troff_output::start_picture): Generate line - containing a horizontal motion equal to the width of the picture. - - * groff/groff.cc (main): Allow PROG_PREFIX to be set at runtime - using GROFF_COMMAND_PREFIX environment variable. - -Fri Sep 25 11:40:40 1992 James Clark (jjc at jclark) - - * mdate.sh: Use $NF rather than $(NF). - -Tue Sep 22 09:47:24 1992 James Clark (jjc at jclark) - - * pic/main.cc (main): Use %1 not %c in argument to warning. - - * eqn/main.cc (main): Output code to check that geqn was given the - correct -T option. - -Mon Sep 21 10:59:16 1992 James Clark (jjc at jclark) - - * Makefile.in (dist): Instead of doing `make -f ../Makefile', do - `ln -s ../Makefile .; make; rm -f Makefile'. - - * troff/hyphen: Rename to... - * troff/hyphen.us: - * troff/input.cc (main): Delete -H option. Don't call - read_hyphen_file(). - * troff/env.cc: Include searchpath.h and macropath.h. - (exception_dictionary): Deleted. - (ht): Deleted. - (read_hyphen_file): Deleted. - (hyphenation_language): New struct. - (class trie, class hyphen_trie): Move declarations up. - (trie_node::~trie_node): Deleted. - (trie::delete_trie_node): New function. - (trie::do_delete): New pure virtual function. - (hyphen_trie::do_delete): New function. - (trie::~trie): New function. - (hyphen_trie::~hyphen_trie): New function. - (trie::clear): No need to chcek that tp is not 0. - (current_language, language_dictionary): New variables. - (hyphen_word): Give an error if no current language. Use - exceptions dictionary in current language. - (hyphen_trie::read_patterns_file): Find file using macro_path. - Allow comments (starting with %) in patterns file. Don't make it - a fatal error if the file can't be found. - (hyphenate): Return if no current language. Get the exceptions - dictionary and the hyphenation patterns from the current language. - (set_hyphenation_language): New variable. - (hyphenation_patterns_file): New function. - (hyphenation_language_reg): New class. - (hyphenation_language_reg::get_string): New function. - (init_hyphen_requests): Bind "hla" to set_hyphenation_language and - "hpf" to hyphenation_patterns_file. Initialize `.hla' number - register. - * groff/groff.cc (main, help, synopsis): Delete -H option. - * include/Makefile.sub: Don't define HYPHENFILE. - * Makefile.in: Delete hyphenfile variable and remove from MDEFINES. - * Makefile.comm (.man.n): Don't substitute for HYPHENFILE. - * tmac/troffrc: Set hyphenation language to `us'. Load `hyphen.us' - hyphenation patterns. - -Sun Sep 20 09:33:02 1992 James Clark (jjc at jclark) - - * eqn/neqn.sh: New file. - * eqn/Makefile.sub: Handle neqn.sh. - - * eqn/eqn.h: Declare `nroff' variable. - * eqn/box.cc (param_table): Add `nroff' param. - (nroff): Define it. - * eqn/lex.cc (yylex): Handle TDEFINE and NDEFINE using `nroff' - variable. - * tmac/eqnrc: Set `nroff' to 1 for -Tascii or -Tlatin1. - - * troff/troff.h (WARN_FONT): New warning. - (WARN_TOTAL): Change accordingly. - * troff/input.cc (DEFAULT_WARNING_MASK): Include WARN_FONT. - (warning_table): Add WARN_FONT. - * troff/node.cc (mount_font_no_translate): Pass argument to - font::load_font. If this is non-zero, give a warning. - Don't give an error message when accessing a font that has already - been found to be invalid. - * include/font.h (font::load, font::load_font): Add additional - optional argument which suppresses error message if the font is - not found. - * libgroff/font.cc (font::load_font): Handle additional argument. - (font::load): Add additional argument. If this is non-null, set it - to 1 and don't give error message. - - * include/printer.h (printer::end_page): Add argument giving - length of page. - * libdriver/input.cc (do_file): Pass this. - * grops/ps.cc (ps_printer::end_page): Add argument. - * grodvi/dvi.cc (dvi_printer::end_page, - draw_dvi_printer::end_page): Add argument. - * grotty/tty.cc (class tty_printer): Remove lines_per_page and - columns_per_page members. New member nlines. - (DEFAULT_LINES_PER_PAGE): Deleted. - (tty_printer::tty_printer): Don't compute lines_per_page from - font::paperlength. Don't compute columns_per_page from - font::paperwidth. - (tty_printer::add_char): Don't check horizontal position against - columns_per_page. Grow glyphs vector if neccessary. - (tty_printer::end_page): Add argument giving page_length in units. - Discard lines past end of page. - -Wed Sep 16 06:29:52 1992 James Clark (jjc at jclark) - - * tmac/tmac.tty-char: Fix definition of \(/l. - - * tmac/tmac.X: Define \(en. - -Tue Sep 15 10:37:13 1992 James Clark (jjc at jclark) - - * acgroff.m4 (GROFF_PRINT): If a system has lpr and lp but not - lpq, then use lp rather than lpr. - - * tmac/tmac.s (par@reset): Don't call `ad'. - (par*env-init): Call `ad'. - -Sun Sep 13 18:48:20 1992 James Clark (jjc at jclark) - - * mdate.sh: Use $(NF) instead of $6 to extract year from output of - date. - - * troff/symbol.cc: #undef BLOCK_SIZE if it's defined. - * indxbib/indxbib.cc: Likewise. - -Sun Sep 6 09:44:46 1992 James Clark (jjc at jclark) - - * libgroff/putenv.c: New file. - * libgroff/Makefile.sub: Add putenv.c to CSRCS. - * Makefile.in: Say that putenv.o can be one of LIBOBJS. - * configure.in: Test for putenv with AC_REPLACE_FUNCS. Test for - stdlib.h with AC_HAVE_HEADERS. - -Sat Sep 5 18:11:52 1992 James Clark (jjc at jclark) - - * indxbib/dirnamemax.c: Include only if - does not exist. - -Fri Sep 4 09:43:26 1992 James Clark (jjc at jclark) - - * eqn/box.cc (gsize): Make it an int. - (set_gsize): Parse argument handling increment or decrement. - (box::top_level): Convert gsize to a string. - - * troff/input.cc (exit_troff): Make buf unsigned char []. - Call to make_temp_iterator casts buf to char*. - - * Makefile.in ($(TARGETS), dot): Pass $(MDEFINES) to recursive makes. - - * Makefile.ccpg (depend.temp): Depends on $(YTABC). - * Makefile.cpg (depend.temp): Likewise. - - * Makefile.dep: Remove Makefile.dep from $(REALCLEANFILES). - - * Makefile.comm: Add y.output to MOSTLYCLEANFILES. - -Thu Sep 3 08:01:55 1992 James Clark (jjc at jclark) - - * tmac/tmac.s (B, I, BI, CW): Rewrite avoiding aliases. - -Tue Sep 1 18:24:53 1992 James Clark (jjc at jclark) - - * Version 1.06 released. - - * Integrate mm 1.04. - -Fri Aug 28 11:28:19 1992 James Clark (jjc at jclark) - - * Makefile.comm, Makefile.ccpg, Makefile.cpg: Fix TAGS target. - -Thu Aug 27 11:03:33 1992 James Clark (jjc at jclark) - - * afmtodit/afmtodit.pl: Add -n option that disables generation of - ligatures command. - * devps/generate/Makefile (CR, CB, CI, CBI): Pass -n flag to - afmtodit. Regenerate. - - * tmac/tmac.e ()z): Adjust _b if necessary so as to avoid moving - @f back past the current position. - - * tmac/tmac.e: Change calls to @R so that comments are not part of - arguments. - -Tue Aug 25 10:42:07 1992 James Clark (jjc at jclark) - - * configure.in: Check for mkstemp with AC_HAVE_FUNCS. - - * acgroff.m4 (GROFF_PROG_CCC): Don't check for . Instead - check that we can link a call to a function declared in . - (GROFF_UNISTD_H): New macro. - * configure.in: Call it. - * Makefile.in: Document it. - * include/posix.h: New file. - * troff/troff.h: Don't include - * troff/input.cc: Include posix.h. - * libgroff/new.cc, libgroff/tmpfile.cc: Include posix.h rather than - osfcn.h. - * indxbib/indxbib.cc, libbib/{search.cc,linear.cc,index.cc}: - Include posix.h rather , , , - . - * indxbib/indxbib.cc (S_IRUSR, S_IRGRP, S_IROTH): Delete definitions. - * libbib/index.cc (S_ISREG, O_RDONLY): Delete definitions. - * libbib/search.cc (O_RDONLY): Delete definition. - * refer/refer.cc, include/driver.h, pic/pic.h, groff/groff.cc: - Don't include . - - * acgroff.m4 (GROFF_TIME_T): New macro. - * configure.in: Call it. - * Makefile.in: Document it. - - * acgroff.m4 (GROFF_TRADITIONAL_CPP): New macro. - * configure.in: Call it. - * Makefile.in: Document -DTRADITIONAL_CPP. - * include/ptable.h: Don't include generic.h. - (name2): Define it. - - * tmac/tmac.s (][): Make [T1 and [T2 aliases for [T. - Afterwards remove [T1 and [T2. - (ref*spec!0, ref*spec!2): Use T1 rather than T. - (ref*spec!1, ref*spec!4, ref*spec!4): Use T2 rather than T. - (ref*add-T2): Renamed from ref*add-T. - (ref*add-T1): New macro. - -Mon Aug 24 11:11:11 1992 James Clark (jjc at jclark) - - * acgroff.m4 (AC_PROG_CCC): Use GROFF_EXIT rather than exit 1. - - * libbib/index.cc: Include . - (O_RDONLY): Define if necessary. - (make_index_search_item, index_search_item_iterator::get_tag, - index_search_item::check_files): Use O_RDONLY. - * libbib/seach.cc: Include , , . - (O_RDONLY): Define if necessary. - (search_list::add_file): Use O_RDONLY. - * indxbib/indxbib.cc: Include , , - . - (S_IRUSR, S_IRGRP, S_IROTH): Define if necessary. - (main): Use these. - - * libbib/index.cc (S_ISREG): Define it if necessary. - (index_search_item::load): Use S_ISREG. - - * include/driver.h: Include . - -Sun Aug 23 11:32:18 1992 James Clark (jjc at jclark) - - * eqn/box.cc (body_height): Increase default value to 85. - (body_depth): Increase default value to 35. - -Fri Aug 21 05:34:42 1992 James Clark (jjc at jclark) - - * eqn/pbox.h (SAVE_FONT_STRING): Define it. - * eqn/box.cc (box::top_level): Hide use of \R in a string that is - protected from expansion with \E. - - * acgroff.m4 (GROFF_PAGE): Use `case' to test domain. - - * Makefile (Makefile): New target. - - * Makefile.sub (configure, distfiles): New targets. - - * acgroff.m4 (GROFF_BROKEN_SPOOLER_FLAGS): Avoid using ${var:-val} - construct. - -Thu Aug 20 12:27:26 1992 James Clark (jjc at jclark) - - * eqn/box.cc (param_table): Add body_height and body_depth. - - * eqn/lex.cc (def_table): Make circumflex in hat_def roman. - -Tue Aug 18 16:24:25 1992 James Clark (jjc at jclark) - - * psbb/Makefile.sub: Don't link with libgroff.a. - - * acgroff.m4 (GROFF_PUTENV): New macro. - * configure.in: Call GROFF_PUTENV. - * Makefile.in: Document STDLIB_H_DECLARES_PUTENV. - * groff/groff.cc: Don't declare putenv if STDLIB_H_DECLARES_PUTENV - is defined. - - * troff/env.cc (distribute_space): Rename force_forward argument - to force_reverse. Reverse the list if force_reverse is true. - -Mon Aug 17 17:49:05 1992 James Clark (jjc at jclark) - - * tmac/tmac.an: Don't define a string `T'. Just define Tm. - - * eqn/pile.cc (matrix_box::compute_metrics): Don't allow computed - height or depth to be negative. Guard against SUP_RAISE quantity - being negative. - -Sat Aug 15 08:18:54 1992 James Clark (jjc at jclark) - - * devps/generate/textmap: Add `an' (arrowhorizex). - * tmac/tmac.ps: \(an overlaps horizontally. - * tmac/tmac.dvi, tmac/tmac.tty: Add `an'. - - * devps/symbolchars: Add arrowverttp, arrowvertbt. - * devps/textmap: Add arrowvertex. - * eqn/delim.cc (delim_table): Add uparrow, downarrow and - updownarrow delimiters. - * tmac/tmac.ps, tmac/tmac.X: Add definition of \(va. - - * tbl/table.cc (simple_entry::position_vertically, - block_entry::position_vertically): For a centered entry, perform - the motion in two stages. - - * refer/refer.cc (split_punct): Don't call lookup_token if there - is no token. - -Fri Aug 14 11:14:58 1992 James Clark (jjc at jclark) - - * troff/input.cc (token::next): Delete token_node after copying - token. - - * grodvi/grodvi.cc (dvi_printer::dvi_printer): Initialize - cur_point_size. - - * libdriver/printer.cc (printer::load_font): Delete old_font_table. - - * grops/ps.cc (ps_printer::define_encoding): Delete elements of vec. - -Tue Aug 11 13:50:38 1992 James Clark (jjc at jclark) - - * grops/ps.cc (usage): -b option takes an argument. - - * devps/prologue (PLG): New procedure. - * grops/ps.cc (main, usage): New -g option. - (ps_printer::~ps_printer): If guess_flag is set, guess the paper - length using PLG. - -Mon Aug 10 11:17:53 1992 James Clark (jjc at jclark) - - * include/cset.h: Include if we have it. - - * libgroff/illegal.cc: New file. - * include/lib.h (illegal_input_char): Use table. - * troff/input.cc (ESCAPE_RIGHT_PARENTHESIS): Renumber to 0206. - * pic/lex.cc (ARG1): Renumber to 14. - * eqn/lex.cc (ARG1): Likewise. - - * troff/Makefile.sub (majorminor.cc): Handle 3 part versions - (eg 1.05.90) correctly. - -Sun Aug 9 13:35:43 1992 James Clark (jjc at jclark) - - * tmac/tmac.e (sr): Deleted. Set $r and $R directly. - Rename $r and $R registers to $v and $V. - ($r, $R): Initialize to 0. - (@v, @V): New macros. - (sz): Call @v. - (@M): Call @V. - - * troff/input.cc (main, usage): Add -R option that says not to - load troffrc. - * eqn/main.cc (main, usage): Rename -n to -R. - -Sat Aug 8 00:16:00 1992 James Clark (jjc at jclark) - - * devps/DESC.in: Leave font positions 5-9 blank. - * devdvi/DESC.in: Likewise. - - * grog/grog.pl: Handle `.PS 0. - - * macros/tmac.e (@R, @S): New macros. - Declare @, po, $0, $i, $p, df, so, fu, bt, *, ?a, ?b, ?C, ?e, ?H, - ?I, ?n, ?o, ?R, ?s, ?T, ?W, ?w registers with @R. - Declare $H, $[0-9], .. macros with @S. - Declare |0, |1, |2, |3 strings with @S. - - * macros/tmac.e (@S): Rename to @U. - - * macros/tmac.e (@z): Define @b and bp as empty instead of - deleting them, - - * macros/tmac.e (@m): Deleted. - (@h): Don't call @m. - (@z): Don't set @m trap. - - * macros/tmac.e ($h, $f): Define |z as empty string. - - * macros/tmac.e (@D): Rework to avoid unbalanced .el requests. - (@q): Likewise. - - * macros/tmac.e (@h): Set ?H, ?C , ?s registers to 0 rather than - removing them. - ()f): Likewise for * register. - - * macros/tmac.e (sr): Don't ever scale the arguments. If the third - argument is missing, don't change $R. Call sr with three - arguments when initializing. - -Thu Jul 16 12:17:12 1992 James Clark (jjc at jclark) - - * macros/tmac.e (sr): New macro. - Initialize $r and $R using sr. - - * macros/tmac.e (,): Delete \*(#[. - - * troff/env.c (set_tabs): Read the tab type even if the position - is bad. Allow the position of the first tab stop to be negative. - -Wed Jul 15 13:14:37 1992 James Clark (jjc at jclark) - - * refer/dirnamemax.c: Use pathconf() if defines - _POSIX_VERSION. - * refer/Makefile: Compile dirnamemax.c using -DHAVE_UNISTD_H - rather than -DPATHCONF_MISSING. - * Makefile: Get rid of PATHCONF_MISSING. - - * refer/map.c: New file. - * refer/index.c: Interface to mmap through map.c. Rename map_size - to map_len. - * refer/Makefile: Handle map.c. - * Makefile: Include -DHAVE_MMAP in OLDCFLAGS rather than CFLAGS. - -Tue Jul 14 14:15:20 1992 James Clark (jjc at jclark) - - * Makefile: RANLIB should be `true' if there is no ranlib. - * lib/Makefile (libgroff.a): Simplify. - * driver/Makefile (libdriver.a): Simplify. - - * Makefile: Change -DWAIT_COREDUMP_0200 to -DWCOREFLAG=0200. - * groff.c (WCOREDUMP): Use WCOREFLAG. Define only if not already - defined. - -Sat Jul 11 09:19:17 1992 James Clark (jjc at jclark) - - * troff/env.c (compare_ranges): Declare as extern "C". - - * troff/input.c (init_registers): Use `struct tm' instead of `tm'. - - * macros/tmac.s, macros/tmac.e: Change .nx /dev/null to .nx. - -Wed Jul 8 11:52:27 1992 James Clark (jjc at jclark) - - * pic/troff.c (troff_output::text): Merge in grops_output::text, - but conditionalize use of \X based on \*(.T. - (grops_output::*): Deleted. - * pic/output.h: Delete declaration of make_grops_output. - * pic/main.c (main): Ignore -p and -x. driver_extension_flag is 1 - by default. -n sets it to 0. - (usage): Corresponding changes. - * groff.c (main): Don't pass -x or -p to pic. - * groff.sh: Likewise. - - * ps/ps.c (ps_printer::do_exec, ps_printer::do_file): Force ndefs - to be non-zero. - - * ps/devps/afmtodit: Change calculation of asc_boundary and - desc_boundary. Make these bounds inclusive. - * ps/devps: Regenerate font files. - -Tue Jul 7 13:14:15 1992 James Clark (jjc at jclark) - - * macros/tmac.latin1: New file. - * macros/tmac.tty-char: Use tmac.latin1. - (tmac.tty-tr): Deleted. - * macros/Makefile: Install tmac.latin1. - * macros/tmac.dvi: Use tmac.latin1. - * macros/troffrc: Translate \[char160] onto no-break space here. - * macros/{tmac.dvi,tmac.ps,tmac.tty,tmac.X75}: Don't do it here. - -Mon Jul 6 11:06:52 1992 James Clark (jjc at jclark) - - * macros/tmac.Xps: Use `do' request. - - * macros/tmac.ps: Use `do' request. - - * macros/tmac.e (@C): Use `do' request. - - * macros/tmac.X, macros/tmac.Xps: Moved from xditview. - * macros/Makefile: Install tmac.X*. - - * tty/tmac.tty, tty/tmac.tty-char: Move to macros. - * tty/Makefile: Don't install tmac.tty*. - * macros/Makefile: Install tmac.tty*. - - * dvi/tmac.dvi: Move to macros. - * dvi/Makefile: Don't install tmac.dvi. - * macros/Makefile: Install tmac.dvi. - - * ps/tmac.ps*: Move to macros. - * ps/Makefile: Don't install tmac.ps*. - * macros/Makefile: Install tmac.ps*. - - * eqn/box.c: Provide draw_lines parameter corresponding to -D - option. - * macros/eqnrc: Set draw_lines parameter based on device. - * groff.c: Don't pass -D flag to eqn. - * groff.sh: Likewise. - * eqn/main.c: Warn about use of -D. - - * troff/input.c (process_startup_file): New function. - (main): Call process_startup_file(). - * macros/troffrc: New file. - * macros/Makefile: Install troffrc. - * groff.c (main): Don't pass extra -m option to troff. For a - pseudo device pass the name of the pseudo device to troff using - -d. - * groff.sh: Likewise. - * groff.c (possible_command::prepend_arg): Deleted. - - * troff/input.c (do_request): New function. - (init_input_requests): Bind "do" to do_request. - - * eqn/main.c (main): Instead of loading eqnchar from device directory, - load eqnrc from macro directory. - * macros/eqnrc: New file. - * macros/Makefile: Install eqnrc. - * ps/devps/eqnchar: Deleted. - * ps/devps/Makefile: Don't install eqnchar. - * dvi/devdvi/eqnchar: Deleted. - * dvi/devdvi/Makefile: Don't install eqnchar. - * groff.c (main): Pass -M to eqn. Don't pass -F to eqn. New - variable optM. - - * lib/device.[ch]: New files. - * lib/font.h (font::set_device_name, font::get_device_name): - Deleted. - * lib/fontfile.c: Use device.h. - * lib/Makefile: Handle device.[ch]. Make paths.h define DEVICE. - * troff/input.c: Delete definition of `device'. - (main): Don't initialize device. - * troff/troff.h: Include device.h rather than declaring device. - * troff/Makefile: No need to handle DEVICE. - * driver/input.c: Include device.h. Don't use - font::{set,get}_device_name. - * groff.c, Makefile: Rename device.h to config.h. - * groff.c: Use library device variable. - * eqn/main.c: Use library device variable. - * eqn/Makefile: No need to handle DEVICE. - - * lib/searchpath.[ch]: New files. - * lib/Makefile: Handle searchpath.[ch]. - * troff/input.c (open_file, init_dirs): Deleted. - (macro_dirs): Deleted. - (open_mac_file, macro_source): Use class search_path. - (add_string, struct string_list): Move definition. - (main): Change -M option to use macro_path. Delete call to - init_dirs(). - * lib/fontfile.c (font::command_line_font_dir, font::open_file): - Rewrite to use class search_path. - * lib/font.h, lib/fontfile.c (font::cl_font_dirs): Deleted. - * lib/Makefile: fontfile.c depends on searchpath.h. - * lib/Makefile: Rename fontpath.h to paths.h. Make paths.h define - MACROPATH. - * lib/macropath.[ch]: New files. - * troff/Makefile: No need to handle MACROPATH. - - * troff/input.c: Delete DUMP code. - * lib/fontfile.c, lib/font.h: Delete - font::forget_command_line_font_dirs. - - * troff/input.c (push_token): New function. - (handle_first_page_transition): Use push_token(). - (process_input_stack): Change handling of a space at the beginning - of the line. - -Sun Jul 5 17:11:09 1992 James Clark (jjc at jclark) - - * troff/input.c (font_dirs): Delete unused variable. - - * eqn/lex.c (do_set): Correct error messages. - -Sat Jul 4 10:20:55 1992 James Clark (jjc at jclark) - - * troff/input.c (do_define_string): Allow the string name to be - followed immediately by a tab. - (define_character): Likewise. - -Thu Jul 2 10:59:15 1992 James Clark (jjc at jclark) - - * ps/ps.c (ps_printer::draw): When drawing an arc, don't allow k to - be negative. - - * troff/input.c (input_iterator::is_file): New virtual function. - (file_iterator::is_file): New function. - (input_stack::end_file): New function. - (input_stack::next_file): Handle the situation where there is no - file on the input stack correctly. Avoid making two passes over - the input stack. - (next_file): Make the filename optional; in this case call - input_stack::end_file(). - -Wed Jul 1 10:17:25 1992 James Clark (jjc at jclark) - - * dvi/tmac.dvi: Change the definitions of \(ul and _ so that they - produce a real _ charater when the current font is CW and _ - otherwise. - - * lib/errarg.c (errarg::errarg(const char *)): Invert conditional - expression to work around gcc 2.2 bug. - -Wed Jun 24 08:12:24 1992 James Clark (jjc at jclark) - - * eqn/main.c (main): Don't give an error if we can't find eqnchar. - - * troff/env.c (environment::add_padding): New function. - (environment::add_char): Use add_padding(). - (environment::space): Likewise. - (environment::wrap_up_field): Add some padding if there is none - and there's no current tab. - * troff/env.h: Declare environment::add_padding. - -Mon Jun 22 08:37:45 1992 James Clark (jjc@jclark) - - * pic/pic.y: undef fmod and rand before declaring them. - -Sun Jun 14 11:40:18 1992 James Clark (jjc@jclark) - - * troff/input.c (main): If the DESC file specifies a font name of - 0, then leave the corresponding font position empty. - - * nroff.sh: New file. - * Makefile (install.nobin): Install nroff.sh. - - * tty/devlatin1/R.proto: Add ao as synonym for de. - * tty/tmac.tty-char: Define ao as o. - - * tty/dev{ascii,latin1}/R.proto: Add aq. - * tty/tmac.tty-char: Delete definition of aq. - -Mon Jun 8 11:43:20 1992 James Clark (jjc@jclark) - - * troff/input.c (init_charset_table): Don't translate 0240. - * ps/tmac.ps: Translate char160 to space. - * dvi/tmac.dvi: Likewise. - * tty/tmac.tty: Likewise. - -Sun Jun 7 10:52:35 1992 James Clark (jjc@jclark) - - * dvi/tmac.dvi: Add support for all Latin-1 characters. - - * macros/tmac.s: Delete definitions of \(rg, \(ah, \(ad, \(a-, - \(ao, \(ac, \(ho, \(-D, \(Sd, \(TP, \(Tp, \(ss, \(AE, \(ae, \(OE, - \(oe, \(r?, \(r!. - - * tty/tmac.tty-char: Add \(ah. - - * dvi/tmac.dvi: Add definitions of Tp, TP, Sd, -D, ho. - No need to define \(FM and \(!/. Conditionalize all character - definitions. - - * ps/devps/lgreekmap: Add +h, +f, +p. - - * ps/tmac.psnew: New file. - * ps/Makefile: Install tmac.psnew. - - * troff/input.c (charinfo_to_node_list): Don't ever interpret - character definitions in compatible mode. - - * troff/input.c (remove_character): New function. - (init_input_requests): Bind remove_character to "rchar". - - * ps/tmac.psold: New file. - * ps/Makefile: Install tmac.psold. - * ps/tmac.ps: Load tmac.psold. Move definitions of ISO Latin-1 - characters into tmac.psold. Make these definitions unconditional. - - * tty/tmac.tty-char: Define \n(_C only if it is not already defined. - - * ps/tmac.ps: Don't define \('c and \('C. - - * ps/devps/textmap: Move Greek characters to... - * ps/devps/symbolchars: - -Sat Jun 6 16:41:17 1992 James Clark (jjc@jclark) - - * ps/devps/text.enc: Add quotesingle. - * ps/devps/textmap: Add +h, +f, +p, Fn, Bq, bq, aq, lz. - * tty/tmac.tty-char: Likewise. - * dvi/devdvi/texmi.map: Add +h, +f, +p. - * dvi/devdvi/texi.map: Add Fn. - * dvi/devdvi/msam.map: Add lz. - * dvi/tmac.dvi: Handle Bq, bq, aq. - - * pic/lex.c (get_token): Recognize 'th. - * pic/map.y: Allow `expr'th in contexts where ORDINAL was allowed. - -Fri Jun 5 11:20:46 1992 James Clark (jjc@jclark) - - * ps/devps/textmap: Move di, mu, +- to... - * ps/devps/symbolchars: - - * macros/tmac.s (@XS): Don't call par@reset or fi. - (XA): Call LP. Turn off adjustment. Reduce line length. - - * macros/tmac.s: Initially alias XS to LP. - (XS): Rename to @XS. - (cov*ab-init): Alias XS to @XS. - -Thu Jun 4 09:12:05 1992 James Clark (jjc@jclark) - - * troff/token.h: Delete TOKEN_CHAR_HEIGHT, TOKEN_CHAR_SLANT, - TOKEN_FONT_NAME, TOKEN_FONT_POSITION, TOKEN_SIZE tokens. - (token::is_size, token::changes_env): Deleted. - * troff/number.c (parse_term): No need to process \s explicitly. - Call tok.next() only after scale indicator has been processed. - * troff/input.c (do_overstrike, do_bracket): No need to process \s, - \f etc explicitly. - (token::next): Handle \s, \f, \S, \H immediately rather than - returning them as tokens. - (token::operator==, token::description, token::add_to_node_list, - token::process): Remove handling of deleted tokens. - - * troff/env.c (environment::add_char): When adding padding - indicator character, call start_line() if necessary. - -Wed Jun 3 09:55:50 1992 James Clark (jjc@jclark) - - * ps/devps/afmtodit: Don't output 0 kerns. - - * ps/devps/afmtodit: Remove directory from name of encoding in - font description file. - - * ps/devps/afmtodit: Improve error messages. - - * ps/devps/afmtodit: Allow DESC file to be specified with -d. - - * ps/devps/Makefile: Incorporate FontMakefile. Rework. - * ps/devps/FontMakefile: Deleted. - * ps/devps/afmname: New file. - - * ps/devps/symbol.sed: New file. - * ps/devps/symbol.diff: Deleted. - * ps/devps/FontMakefile: Generate symbol.afm using symbol.sed. - Generate zapfdr.afm from zapfd.afm. - - * tty/tmac.tty (tty-char): Prefix definition with ". - - * macros/tmac.an (TP): Don't start a diversion if one has already - been started. - - * tty/tmac.tty-char: Add Latin-1 characters. - - * tty/tmac.tty-char: Incorporate suggestions from Paul Eggert. - -Tue Jun 2 00:54:34 1992 James Clark (jjc@jclark) - - * tbl/table.c (table::allocate): Delete old_vline, old_entry. - Move declaration of struct horizontal_span. - - * tbl/table.c (table::table): Initialize span_list. - (table::~table): Delete span_list. - - * lib/ptable.h (PTABLE(T)::~PTABLE(T)): Delete v. - - * ps/devps/Makefile: Avoid dependency on GNU make. - - * ps/tmac.ps: Check that character does not already exist before - defining it. - - * tty/tmac.tty: Add definitions of \(ff, \(!=, \(==, \(~=, \(sq, - \(OE, \(oe, \(AE, \(ae, \(lh, \(rh. Delete definitions of \(en, - \(ru, \(ul, \(br, \(bv, \(sl which are in the font description - files. - - * tty/tmac.tty-char: New file. - * tty/Makefile: Install tmac.tty-char. - * tty/tmac.tty: Move definitions of \(ua, \(da, \(uA, \(dA into - tmac.tty-char. - - * tty/tmac.tty: Fix definition of \(34. - - * tty/dev{ascii,latin1}/R.proto: Add ha and ti. Map - bracket-drawing characters onto |. Add *o. - - * troff/env.c (environment::wrap_up_tab): Increment field_spaces - only if current_field. - - * troff/dictionary.c (dictionary::lookup): Free old_table after - rehashing. - -Mon Jun 1 10:15:22 1992 James Clark (jjc@jclark) - - * tty/dev{ascii,latin1}/R.proto: Add uppercase Greek characters - whose glyphs are identical to glyphs of some Roman character. - - * tty/devlatin1/R.proto (bu): Deleted. - * tty/devascii/R.proto (bu): Deleted. - * tty/tmac.tty: Add definition of \(bu. - - * eqn/main.c (do_file): Pass FILE as argument. - (main): Automatically load eqnchar. New options -F and -n. - Pass do_file an opened FILE. - * groff.c: Don't pass eqnchar to eqn. Pass -F options onto eqn. - No need to include font.h. - * groff.sh: Likewise. Don't need to use - for standard input. - Prefix files with -- if first file starts with -. - - * macros/tmac.e: Conditionalize use of \$* on \n(.g. - - * troff/env.c (environment::possibly_break_line): Don't set line - to 0 across call to output_line(). Don't call output_line() until - after discarding nodes after break. - -Sun May 31 10:45:29 1992 James Clark (jjc@jclark) - - * request.h (macro::empty): Declare it. - * input.c (macro::empty): New method. - (interpolate_macro): Don't give a WARN_SPACE if the two-character - macro is empty. - -Sat May 30 10:27:15 1992 James Clark (jjc@jclark) - - * troff/env.c (environment::start_field): Decrement space_total - when a space is frozen. - -Fri May 22 14:34:38 1992 James Clark (jjc@jclark) - - * macros/tmac.an (R): Delete macro. - - * troff/input.c (get_copy, token::next): Support \# (like \" but - newline is ignored). - - * troff/input.c (token::next): Fix error message in 'Y' case. - -Thu May 21 09:26:24 1992 James Clark (jjc@jclark) - - * eqn/delim.c (define_extensible_string): Recognize any prefix of - a delimiter name. - -Fri May 15 10:20:41 1992 James Clark (jjc at jclark) - - * c++test.c: Include . - - * lib/strtol.c, lib/getcwd.c, ps/psbb.c: Declare errno in case - doesn't. - -Fri May 8 09:37:19 1992 James Clark (jjc at jclark) - - * tbl/table.c (table::divide_span): Don't count column separation - if expand was specified. - - * tbl/main.c (process_format): Don't ignore width specs in - continued format. Give warning for changing equal widths or - column separation in continued format. - (process_data): Set column separation, minimum width, equal - columns at end of table. - -Thu May 7 08:50:40 1992 James Clark (jjc at jclark) - - * troff/node.c (kern_pair_node::add_discretionary_hyphen, - node::add_discretionary_hyphen): Use soft_hyphen_char. - (set_soft_hyphen_char): New function. - (init_node_requests): Bind to shc. Initialize soft_hyphen_char. - - * Makefile (c++tested): Give more helpful message if test fails. - -Tue May 5 10:58:39 1992 James Clark (jjc at jclark) - - * troff/input.c (init_charset_table): Translate 0240 to - an unbreakable space. - - * troff/token.h (token::hyphen_indicator): New function. - * troff/charinfo.h (TRANSLATE_HYPHEN_INDICATOR): New special - translation. - * troff/input.c (translate): Allow translation to \%. - * troff/node.c (node::add_char): Handle - TRANSLATE_HYPHEN_INDICATOR. - (make_node): Don't allow TRANSLATE_HYPHEN_INDICATOR here. - - * troff/input.c (init_charset_table): Don't set BREAK_AFTER flag - for \(hy. - - * tty/devlatin1/R.proto: \(hy and - should print as 055. - -Tue Apr 21 09:24:42 1992 James Clark (jjc at jclark) - - * groff.c (run_commands): If the last command gets a SIGPIPE send - a SIGPIPE to all children than haven't yet terminated. When - command terminates, set pid field to -1. - -Fri Apr 17 11:20:48 1992 James Clark (jjc at jclark) - - * groff.c (main): Pass an appropriate -filename option to gxditview. - -Thu Apr 16 15:11:40 1992 James Clark (jjc at jclark) - - * Makefile.bd (install): Remove existing program before copying. - - * Makefile, */Makefile, Makefile.bd, groff.sh, groff.c: Allow - programs which have Unix counterparts to be installed with - user-specified prefix. - - * troff/input.c (exit_troff): Don't check if exit_started. - (exit_request): Don't call exit_troff if exit_started. - - * Makefile.bd (install.mm): Rename to install.dwbmm. - -Tue Apr 14 10:05:10 1992 James Clark (jjc at jclark) - - * driver/input.c (do_file): Add missing break for '#' case. - -Mon Apr 13 10:11:02 1992 James Clark (jjc at jclark) - - * troff/input.c (input_stack::clear): Clear past any boundaries and - then add the boundaries back. - - * troff/input.c (exit_troff): Return immediately if already - exiting. - - * macros/tmac.s (pg@end-text): New macro. Use pg@end-text for the - end macro. - (pg*end-page): If the text has ended and there are no more - footnotes or keeps, exit. - - * macros/doc-ditroff (Lq, Rq): Define as \(lq and \(rq. - - * troff/input.c (init_charset_table): Make \(rq transparent by - default. - - * macros/tmac.an: Define lq and rq strings. - - * macros/tmac.s (Q, U): Define as \(lq and \(rq. - -Sun Apr 12 12:54:37 1992 James Clark (jjc at jclark) - - * troff/env.c (environment::final_break): New function. - (environment::newline): Set prev_line_interrupted to 2 if - exit_started. - * troff/env.h: Declare environment::final_break. - * troff/input.c (exit_troff): Call environment::final_break() - instead of environment::do_break(). - - * macros/Makefile: Install man.local if $(MACRODIR)/man.local - doesn't already exist. - * macros/man.local: New file. - * macros/tmac.an: Load man.local. - * macros/man.ultrix: New file. - -Sat Apr 11 17:32:04 1992 James Clark (jjc at jclark) - - * troff/input.c (exit_groff): Rename to... - (exit_troff): New function. - - * troff/div.c (exit_started, done_end_macro, - seen_last_page_ejector): New global variables. - (began_page_in_end_macro): New static variable. - (exit_flag): Deleted. - (top_level_diversion::top_level_diversion): Initialize - last_page_count. - (top_level_diversion): More elaborate test for whether - cleanup_and_exit() should be called. - Set began_page_in_end_macro if the end macro isn't yet finished. - * troff/div.h (top_level_diversion::last_page_count): New data - member. - (top_level_diversion::set_last_page): New function. - (exit_started, done_end_macro, seen_last_page_ejector): Declare. - * troff/env.c (do_break): Zero prev_line_interrupted. - * troff/input.c (exit_flag): Delete declaration. - (LAST_PAGE_EJECTOR): New magic cookie. - (token::next): Handle LAST_PAGE_EJECTOR. - (exit_groff): Set exit_started and done_end_macro instead of - exit_flag. Call top_level_diversion::set_last_page. Push a - LAST_PAGE_EJECTOR instead of calling push_page_ejector(). Do - another ejection after setting seen_last_page_ejector. - -Thu Apr 9 04:37:11 1992 James Clark (jjc at jclark) - - * etc/grog.sh, etc/grog.sh: Recognize -me sh macro. - - * macros/tmac.e (TH): Make sure there's room for the initial - header. - - * macros/tmac.s (par@init): Make PD and DD at least \n(.V. - Set FVS in points rather than units. - -Mon Apr 6 11:21:32 1992 James Clark (jjc at jclark) - - * troff/div.c (top_level_diversion::add_trap): Don't consider the - position of empty slots. - -Fri Apr 3 10:46:45 1992 James Clark (jjc at jclark) - - * ps/devps/S: Fix height and depth of parenrightex. - * ps/devps/symbol.diff: Regenerate. - -Sat Mar 28 21:17:52 1992 James Clark (jjc at jclark) - - * tmac.e (u): Do underlining as in -mgs. - -Fri Mar 27 09:23:44 1992 James Clark (jjc at jclark) - - * tty/tty.c (tty_printer::end_page): If overstriking is - suppressed, still turn overstruck horizontal and vertical lines - into +. - - * lib/new.c: Back out Feb 24 change; no longer needed with gcc - 2.1. - - * refer/label.y (format_expr::evaluate): Avoid use of %0*d. - -Wed Mar 18 09:29:10 1992 James Clark (jjc at jclark) - - * Version 1.05 released. - -Tue Mar 17 16:50:45 1992 James Clark (jjc at jclark) - - * tty/tty.c: Instead of keeping an array of glyphs and then - sorting it, keep a ordered linked list of glyphs for each line. - - * driver/driver.h: Include stddef.h. - - * tty/tty.c (compare_glyph): - * refer/refer.c (rcompare): - * troff/env.c (compare_ranges): Arguments of qsort comparison - function should be const void *. - - * troff/number.c (parse_term): - * dvi/dvi.c (draw_dvi_printer::draw): Avoid initialization in - switch statement. - - * refer/label.y (consider_authors): Don't access variables - constructed under a condition outside that condition: put braces - round for statement containing declaration; redeclare use of same - variable later. - - * pic/pic.y (text_expr): Delete production that allows - parenthesised text_expr. - (expr): Allow a conditional_expr to appear in parentheses. - (conditional_expr): Rename to any_expr. - - * mm: Install new version 1.01 from jh. - - * lib/font.c (font::get_width): Cache scaled widths. - (font::font): Initialize widths_cache. - (font::~font): Destroy widths_cache. - * lib/font.h: Add font::widths_cache. Declare font_widths_cache. - -Mon Mar 16 10:16:10 1992 James Clark (jjc at jclark) - - * c++test.c, c++test.ref: New files. - * Makefile: Check that the C++ compiler works. - - * ps/tmac.pspic (PSPIC): Do a break. - - * ps/tmac.ps: Move definition of PSPIC into... - * ps/tmac.pspic: New file. - (PSPIC): Draw box around picture, but make it invisible to grops. - * ps/tmac.ps: Load tmac.pspic. - * ps/Makefile: Install tmac.pspic. - -Sun Mar 15 14:18:08 1992 James Clark (jjc at jclark) - - * lib/font.c (scale_round): If n is negative, - subtract .5 before truncating floating point result. - - * lib/fontfile.c: Include . - -Tue Mar 10 14:17:03 1992 James Clark (jjc at jclark) - - * driver/input.c (get_char): Inline. Don't update current_lineno. - Change callers to up date current_lineno if necessary. - Use get_char() instead of getc(current_file). - -Sun Mar 8 18:05:28 1992 James Clark (jjc at jclark) - - * ps/tmac.ps: Fix up spacing of \(mo and \(nm. - -Fri Mar 6 19:38:58 1992 James Clark (jjc at jclark) - - * tty/tty.c (tmac.tty): Define \(rg as (R). - -Tue Mar 3 10:11:25 1992 James Clark (jjc at jclark) - - * lib/lib.h: New define a_delete. - * Use a_delete instead of delete when deleting an array of objects - without destructors. - - * lib/lib.h: Rename adelete to ad_delete. - * Change uses of adelete. - -Mon Mar 2 12:41:05 1992 James Clark (jjc at jclark) - - * eqn/eqn.y: Include lib.h. - - * troff/node.c (grow_font_table): Delete old_font_table. - - * mm: Install new version from jh. - -Fri Feb 28 10:42:23 1992 James Clark (jjc at jclark) - - * tbl/table.h (format_type): Make global instead of local to class - entry_format. Prefix enumerators with FORMAT_. - * tbl/table.c, tbl/main.c: Corresponding changes. - * refer/token.h (token_type): Make global. Prefix enumerators - with TOKEN_. - * refer/token.[ch]: Corresponding changes. - * Makefile: Get rid of -DNO_NESTED_TYPES configuration option. - - * troff/div.c (node::set_vertical_size): Don't name argument. - -Thu Feb 27 10:29:19 1992 James Clark (jjc at jclark) - - * Makefile: New configuration option ARRAY_DELETE_NEEDS_SIZE. - * lib/lib.h: Define adelete accordingly. - * pic/object.c (graphic_object::graphic_object): - * tbl/main.c (format::~format): - * tbl/table.c (table::~table): - * refer/ref.c (reference::~reference, reference::merge, - reference::insert_field, reference::delete_field): Use adelete. - - * Makefile: Change NESTED_TYPES to NO_NESTED_TYPES. - * refer/token.h: - * tbl/table.h: Corresponding changes. - - * common.c (common_output::dashed_arc, common_output::dotted_arc): - Ensure total_angle is positive. - -Wed Feb 26 08:49:26 1992 James Clark (jjc at jclark) - - * refer/ref.c (reference::merge, reference::insert_field, - reference::delete_field): Avoid delete[0]. - - * refer/token.c (init_special_chars): Move calls to cmupper - outside calls to init_two_char_letter to work around bug in gcc - 2.0. - -Mon Feb 24 14:20:00 1992 James Clark (jjc at jclark) - - * lib/new.c (operator new): Use __builtin_new for g++. - - * pic/object.c (graphic_object::~graphic_object): Don't use - delete [] on 0. - - * pic/object.c (output::compute_scale): Initialize max_width and - max_height. - -Sat Feb 15 09:55:20 1992 James Clark (jjc at jclark) - - * troff/input.c (write_request): Call fflush. - - * troff/node.h (class composite_node): Move declaration to node.c - * troff/input.c (charinfo_to_node): Rename to ... - (charinfo_to_node_list): Return node list rather than composite - node. - * troff/node.c (make_composite_node): New function. - (make_node, add_char): Call make_composite_node instead of - charinfo_to_node. - (class composite_node): Add a tfont * member. Delete font_size - member. - (composite_node::composite_node, composite_node::copy, - composite_node::size): Corresponding changes. - (composite_node::tprint): Provide constant spacing, emboldening - and track kerning as specified in tfont. - (composite_node::width): Change width calculation accordingly. - * troff/env.h (environment::composite): New member. - (environment::is_composite, environment::set_composite): New - functions. - * troff/env.c (environment::environment): Initialize composite. - * troff/input.c (charinfo_to_node): Call - environment::set_composite. - * troff/node.c (make_composite_node, make_glyph_node): Use the - plain version of the tfont if the environment is composite. - - * troff/node.c (font_info::get_space_width): Additional argument - giving space_size. Handle constant space correctly. Scale by - space_size unless constant spaced. - (env_sentence_space_width): New function. - * troff/node.h: Declare it. - * troff/env.h (environment::get_space_size, - environment::get_sentence_space_size, - environment::get_narrow_space_width, - environment::get_half_narrow_space_width): Make inline. - (environment::get_space_width): Make inline. Just call - env_space_width. - * troff/env.c: Delete definitions for funtions made inline. - (environment::space_newline, environment::space): Use - env_sentence_space_width(). Don't scale by space_size. - * troff/node.h: Move declarations of env*space_width() functions - into env.h. - -Sat Feb 8 09:30:22 1992 James Clark (jjc at jclark) - - * macros/tmac.s (PS): Don't try to set negative indent. - -Thu Feb 6 09:00:35 1992 James Clark (jjc at jclark) - - * pic/pic.y: Fix min function. - -Tue Jan 28 07:52:29 1992 James Clark (jjc at jclark) - - * man/mdate.sh: Clear LANGUAGE. - -Sun Jan 19 13:02:41 1992 James Clark (jjc at jclark) - - * pic/pic.y, pic/lex.c: Rename COMMAND token to COMMAND_LINE. - * pic/lex.c: New COMMAND keyword. - * pic/pic.y (print_args, print_arg): New rules. - (placeless_element): Use print_args for PRINT. - New COMMAND element. - -Tue Jan 7 13:14:31 1992 James Clark (jjc at jclark) - - * troff/input.c (terminal): Handle missing argument correctly. - - * pic/pic.y (text_expr): New rule. - - * pic/pic.y: Implement := operator. - -Sun Jan 5 10:23:02 1992 James Clark (jjc at jclark) - - * etc/grog.pl, etc/grog.sh: Distinguish old and new versions of - mdoc. - -Sat Jan 4 14:42:26 1992 James Clark (jjc at jclark) - - * ps/devps/dingbatsrmap: Include this in the distribution. - - * macros/tmac.doc: Replace with new version from 2nd Networking - Release. Fix loading of doc-* files. - * macros/{doc-common,doc-ditroff,doc-nroff,doc-syms}: New files. - * macros/tmac.doc.old: New file. Apply fixes that had been - applied to old tmac.doc. - * macros/tmac.andoc: Check that we're running under groff. - * macros/Makefile: Rework. - -Fri Jan 3 13:27:51 1992 James Clark (jjc at jclark) - - * tbl/table.h (format_type): - * refer/token.h (token_type): If NESTED_TYPES is defined, use - typedef to make these types visible at file scope. - * Makefile: Add NESTED_TYPES configuration option. - - * troff/div.c (mark): At the top level use the value of - nl_reg_contents rather than the current vertical position. - -Thu Jan 2 10:34:51 1992 James Clark (jjc at jclark) - - * tty/tty.c: Implement \D for horizontal or vertical lines. - (tty_printer::set_char): Use vec_used+2 as serial number. - Don't allow size of vector to exceed USHRT_MAX-2. - Split off part into... - (tty_printer::add_char): New function. - (tty_printer::draw): New function. - (compare_glyph): Handle equal serial numbers. - (tty_printer::end_page): Handle overstruck characters from \D. - (main, usage): Implement -d option. - -Mon Dec 23 10:37:51 1991 James Clark (jjc at jclark) - - * tbl/main.c (process_format): - * eqn/text.c (split_text): - * troff/input.c (token::next): Use inner block for declarations - with initializers in switch statement. - -Mon Dec 16 20:52:03 1991 James Clark (jjc at jclark) - - * pic/common.c (common_output::dash_line): Cope with zero-length - lines. - -Sun Nov 17 12:04:08 1991 James Clark (jjc at jclark) - - * Version 1.04 released. - -Wed Nov 13 05:27:21 1991 James Clark (jjc at jclark) - - * macros/tmac.an (TH): Define a macro an-init to define variables - based on command line arguments. - (an-header): Call it. - -Sun Nov 3 12:07:34 1991 James Clark (jjc at jclark) - - * Makefile (install.mm): Rename to install.dwbmm. - - * Makefile: Integrate mm. - * mm: New directory. - -Wed Oct 30 10:11:34 1991 James Clark (jjc at jclark) - - * refer/dirnamemax.c: If PATHCONF_MISSING is defined, include - . - - * pic/troff.c (troff_output::simple_spline, - troff_output::simple_polygon): Rename variable `v' to `d' to avoid - shadowing parameter. - - * lib/tmpfile.c (xtmpfile): Declare dir as const char *. - - * lib/ptable.h: Add explicit casts when converting from unsigned - long to unsigned. - - * dvi/devdvi/{SA,SB,msam.map,msbm.map}: New files. - * dvi/devdvi/Makefile: Install SA, SB. - - * refer/indxbib.c: Add declaration of mktemp. - - * refer/lookbib.c: Add declaration of isatty. - -Fri Oct 25 09:00:17 1991 James Clark (jjc at jclark) - - * pic/lex.c (interpolate_macro_with_args): While collecting - arguments, keep track of whether we're in a string. - -Wed Oct 23 08:42:48 1991 James Clark (jjc at jclark) - - * ps/tmac.ps (PSPIC): Do the .sp after the \X, and move the \X - down with \v, so as to avoid problems with top of page trap - setting no space mode. - -Tue Oct 22 17:38:49 1991 James Clark (jjc at jclark) - - * eqn/lex.c (get_delimited_text): Allow tab before macro body. - -Tue Oct 15 17:24:53 1991 James Clark (jjc at jclark) - - * ps/psrm.c (ps_get_line): Fix bug when lines longer than 255. - Improve error message. - -Fri Oct 11 11:09:38 1991 James Clark (jjc at jclark) - - * ps/psrm.c (print_ps_string): Don't pass negative numbers to - printf("%03o"); - -Wed Oct 9 17:50:14 1991 James Clark (jjc at jclark) - - * groff.c (possible_command::execp): Always use _exit() after a - failed exec. - - * Makefile: Add HAVE_UNION_WAIT, HAVE_PID_T, WAIT_COREDUMP_0200, - NO_SYS_WAIT_H configuration options. - * groff.c: Use these options. Use POSIX-style macros to extract - fields from the status returned by wait(). - -Fri Oct 4 12:12:27 1991 James Clark (jjc at jclark) - - * tbl/table.c (table::compute_separation_factor): Allow the - separation factor to drop to 0. - -Tue Oct 1 18:12:38 1991 James Clark (jjc at jclark) - - * refer/search.c: Include . - -Sun Sep 29 08:40:57 1991 James Clark (jjc at jclark) - - * pic/pic.y (YYDEBUG): Don't define for Borland C++. - - * lib/lib.h: #ifdef out declarations of itoa and iftoa for Borland - C++. - - * pic/lex.c (input_stack::bol): Move definition out of class body. - - * pic/main.c: On MSDOS munge argv[0]. - - * lib/ptable.h: Define name2 as _Paste2 for Borland C++. - - * lib/ptable.c (hash_string): Use unsigned long rather than - unsigned. - (next_ptable_size): Use unsigned rather than int. Give an error - message if we've hit the largest table size. - * lib/ptable.c: Corresponding changes. Also use unsigneds for the - table size. - - * pic/object.h (object_spec): Make flags unsigned long. Declare - flags as const unisgned long rather than as enums. - - * pic/output.c: Deleted. - - * pic/troff.c (troff_output::simple_ellipse): Remove spurious %. - - * tbl/table.c (simple_entry::note_double_vrule_on_{left,right}): - Add additional argument. - (line_entry::note_double_vrule_on_{left,right}): Set value of - douvle_vrule_on_{right,left} flag according to argument. - (simple_line_entry::simple_print, - simple_line_entry::double_line_print): If adjacent to double vrule - on a corner extend rather than shorten the rule by half the double - vrule sep. - - * troff/number.c (parse_term): In checking for overflow, handle the - case where the current horizontal position is negative. - -Thu Sep 12 08:26:09 1991 James Clark (jjc at jclark) - - * pic/object.c (draw_arrow): Check for object having zero length. - -Wed Sep 11 10:32:38 1991 James Clark (jjc at jclark) - - * eqn/main.c (do_file): Split off inline equation handling into... - (inline_equation): New function. Search for starting delimiter - using... - (delim_search): New function. Don't recognize a delimiter that - occurs in the name of an escape sequence, number register, string - etc. - -Tue Sep 10 04:01:11 1991 James Clark (jjc at jclark) - - * eqn/delim.c (delim_box::compute_metrics): Don't call - define_extensible_string if left is 0. - (delim_box::output): Don't print the left delimiter if left is 0. - (delim_box::debug_print): Check for left == 0 before calling printf. - -Fri Aug 23 13:02:30 1991 James Clark (jjc at jclark) - - * troff/Makefile (majorminor.c): Include only digits in - minor_version. - -Thu Aug 22 09:35:37 1991 James Clark (jjc at jclark) - - * refer/dirnamemax.c: new file. - * refer/genlimits.c: Deleted. - * refer/indxbib.c (main): Use dir_name_max() instead of NAME_MAX. - Don't check path length. - * refer/Makefile: Add dir_name_max.o; delete genlimits. - * Makefile: Add PATHCONF_MISSING option. - - * refer/indxbib.c (get_cwd): New function. - (main): Use get_cwd(). - * lib/getcwd.c: New file. - * Makefile: Delete -DHAVE_GETWD. Include GETCWD variable. Pass - GETCWD in SUBFLAGS. - * lib/Makefile: Compile getcwd.o. - - * ps/tmac.psatk (psatk-defs): Define showpage after pushing - userdict. - - * refer/indxbib.c (main): Check success of mktemp. - - * lib/tmpfile.c: New file. - * lib/Makefile: Add tmpfile.c. - * lib/lib.h: Declare xtmpfile(); include . - * ps/ps.h: Delete declaration of mktemp(). - * ps/ps.c (ps_printer::ps_printer): Use xtmpfile(). - * refer/refer.c (divert_to_temporary_file): Use xtmpfile(). - * driver/driver.h: No need now to include errno.h. - - * everywhere: Set errno to 0 before calling fopen(). - - * eqn/eqn.h, etc/soelim.c, driver/driver.h, etc/addftinfo.c, - dvi/tfmtodit.c, groff.c, refer/index.c, refer/linear.c, - refer/lookbib.c, refer/refer.h, ps/psbb.c: Include . - -Mon Aug 19 10:52:18 1991 James Clark (jjc at jclark) - - * troff/env.h (translate_space_to_dummy): Declare it. - * troff/env.c (environment::space_newline, environment::space): - If translate_space_to_dummy is set then make the width of spaces 0. - * troff/input.c (translate): If the second character of a - translation is a space, translate to unbreakable space. If the - first character is a space, set or clear translate_space_to_dummy - according to whether the second character is \&. Weird! - -Tue Jul 30 10:03:56 1991 James Clark (jjc at jclark) - - * groff.c (run_commands): Don't use non-zero exit code because a - command gets SIGPIPE. - - * groff.c, groff.sh: Use -mXps with -TXps. - - * ps/ps.c (ps_printer::special): Move call to flush_sbuf() into... - (ps_printer::do_exec, ps_printer::do_file, ps_printer::do_def, - ps_printer::do_mdef, ps_printer::do_import): Call flush_sbuf(). - (ps_printer::special): New specials invis and endinvis. - (ps_printer::do_invis, ps_printer::do_endinvis): New functions. - (ps_printer::set_char, ps_printer::draw): Return if invis_count>0. - (ps_printer::end_page): Check that invis_count == 0. - (ps_printer::invis_count): New member. - (ps_printer::ps_printer): Initialize invis_count to 0. - - * troff/env.c (environment::hyphenate_line): Hyphenation - indicator at beginning of word inhibits splitting after -, \(em - etc. - - * pic/pic.y (element): Allow another element to follow } without - any intervening separator. - -Mon Jul 22 12:27:37 1991 James Clark (jjc at jclark) - - * pic/lex.c (get_delimited): Allow tabs before delimiter. - -Wed Jul 17 10:59:08 1991 James Clark (jjc at jclark) - - * groff.c: Get rid of HAVE_UNION_WAIT stuff. Instead suppress - declaration of wait() in header files. - * Makefile: Get rid of -DHAVE_UNION_WAIT. - - * tbl/table.c (alphabetic_text_entry::add_tab): New function. - - * lib/lib.h: Declare return type of strerror as char *. - - * man/Makefile: Add g flag to sed substitutions. - * Makefile (shgroff, bindist): Likewise. - -Sun Jul 14 11:57:02 1991 James Clark (jjc at jclark) - - * ps/ps.c (ps_printer::do_import): Move push of userdict into... - * ps/devps/prologue (PBEGIN): Define showpage after pushing - userdict. - -Sat Jul 13 20:53:04 1991 James Clark (jjc at jclark) - - * ps/devps/prologue (PBEGIN): Zap any definition of showpage in - userdict. - -Fri Jul 12 07:10:09 1991 James Clark (jjc at jclark) - - * man/mdate.sh: Handle the fact that BSD ls -l does not print the - group. - -Sun Jul 7 08:00:23 1991 James Clark (jjc at jclark) - - * troff/input.c (define_number_reg): If currently undefined, - don't define it if the argument is an invalid expression. - - * Makefile: Ignore return value of `if' commands without `else' - parts. - - * Makefile: Split up CPPDEFINES into a series of separate - configuration options. - - * troff/input.c (init_registers): Use time_t instead of long - unless LONG_FOR_TIME_T is defined. Use returned result rather - than passing pointer. - * Makefile: Document LONG_FOR_TIME_T as a CPPDEFINE. - - * lib/Makefile (fontpath.h): Use gendef. - -Thu Jul 4 09:48:05 1991 James Clark (jjc at jclark) - - * troff/input.c (input_iterator::shift): Delete argument name. - * troff/node.c (suppress_output_file::really_begin_page, - suppress_output_file::really_transparent_char, node::ascii_print, - node::tprint): Delete names of unused arguments. - -Wed Jul 3 17:34:57 1991 James Clark (jjc at jclark) - - * refer/label.y (string): Pass $4 to command_error. - -Tue Jul 2 15:06:01 1991 James Clark (jjc at jclark) - - * Version 1.03 released. - -Sat Jun 29 08:14:01 1991 James Clark (jjc at jclark) - - * Makefile: Pass definition of SHELL in SUBFLAGS. - - * gendef: New file. - * Makefile, eqn/Makefile, refer/Makefile, troff/Makefile, - ps/Makefile: Use gendef to construct header files that are - constructed from the Makefile. - - * macros/Makefile: make all should build stripped version of tmac.e. - - * refer/Makefile (clean): Remove y.output. - -Fri Jun 28 09:44:36 1991 James Clark (jjc at jclark) - - * ps/pfbtops.c (main): Add -v option which prints out a version - number. - * ps/Makefile (pfbtops): Link with libgroff.a. - -Fri Jun 21 07:43:23 1991 James Clark (jjc at jclark) - - * refer/search.h (linear_searcher::get_nkeys): Delete declaration. - * refer/linear.c (linear_searcher::get_nkeys): Delete definition. - - * refer/lkbib.c (main): Always terminate reference with blank - line. - * refer/lookbib.c (main): Likewise. - - * refer/linear.c (file_buffer::load): Check that the file is not a - binary file. - - * refer/Makefile (genlimits): Possibly add -DHAVE_SYS_DIR_H. - (genlimits.c): Include if HAVE_SYS_DIR_H is defined. - Delete second inclusion of . - -Tue Jun 18 01:32:26 1991 James Clark (jjc at jclark) - - * troff/token.h (token::special): Deleted. - - * tbl/main.c (process_format): Rework so that opt->tab_char is - recognized only when appropriate. - - * ps/Makefile (clean): Remove pfbtops. - -Sun Jun 16 09:37:19 1991 James Clark (jjc at jclark) - - * lib/font.c (text_file::next): Don't return if we have got a - blank line. - -Fri Jun 14 09:52:26 1991 James Clark (jjc at jclark) - - * refer/refer.c (store_reference): Get hash code from old_table[i] - when rehashing the table. - -Thu Jun 13 01:26:43 1991 James Clark (jjc at jclark) - - * eqn/box.c (box::top_level): Save size and prev size using \R and - restore it afterwards. Set the size to the size at the beginning - of the line. - * eqn/pbox.h: Declare SAVED_INLINE_PREV_SIZE_REG, - SAVED_INLINE_SIZE_REG, and SAVED_SIZE_REG. - - * refer/Makefile (limits.h): Use ./genlimits. - -Wed Jun 12 16:05:34 1991 James Clark (jjc at jclark) - - * refer/index.c: Delete declarations of stat() and fstat(). - -Tue Jun 11 14:52:49 1991 James Clark (jjc at jclark) - - * tty/tmac.tty: Add character definitions for \(>= and \(<=. - -Mon Jun 10 22:49:48 1991 James Clark (jjc at jclark) - - * etc/grog.sh, etc/grog.pl: Change regex for .PS. - -Fri Jun 7 09:13:06 1991 James Clark (jjc at jclark) - - * troff/input.c (token::get_char): Handle \e. - - * refer/linear.c: Delete declarations of fstat() and stat(). - -Wed Jun 5 09:11:59 1991 James Clark (jjc at jclark) - - * troff/node.c, troff/env.c, troff/input.c, Makefile: Remove - OP_DELETE_BROKEN stuff, since we now have a fix for g++. - -Mon Jun 3 13:41:32 1991 James Clark (jjc at jclark) - - * troff/input.c (do_define_macro): Improve error handling for end - of file while defining macro. - -Sun Jun 2 10:20:24 1991 James Clark (jjc at jclark) - - * eqn/box.h: Fix declaration of set_gsize. - * eqn/box.c (set_gsize): Make argument const char *. - (gsize): Declare as char *. - * eqn/main.c (main): Don't convert gsize to int. - * eqn/lex.c (do_gsize): Pass char * to set_gsize. - - * Version 1.02 released. - -Sat Jun 1 12:19:46 1991 James Clark (jjc at jclark) - - * macros/tmac.andoc: New file. - * macros/Makefile: Install tmac.andoc. - - * troff/node.c, troff/env.c, troff/input.c: Conditionalize use of - operator new and delete on OP_DELETE_BROKEN not being defined. - * Makefile: Mention OP_DELETE_BROKEN. - -Mon May 27 13:49:07 1991 James Clark (jjc at jclark) - - * Makefile (bindist): Pass SUBFLAGS. - -Sun May 26 14:13:22 1991 James Clark (jjc at jclark) - - * Makefile, groff.c: Pass definitions to groff.c via device.h. - - * tty/tty.c (tty_font::load_tty_font): Avoid shadowing - parameter. - - * ps/Makefile, ps.c: Pass BROKEN_SPOOLER_FLAGS via broken.h. - - * ps/ps.h, ps/psrm.c: Make comment_table and - header_comment_table local to resource_manager::process_file. - - * groff.sh: With -TXps pass -printCommand option to gxditview. - - * groff.c (possible_command::print): Implement using - append_arg_to_string. - - * xditview: Merge in new implementation with own ChangeLog. - -Sat May 25 18:33:20 1991 James Clark (jjc at jclark) - - * groff.c (main): Implement PRINT_OPTION. - (append_arg_to_string): New command. - (device_table): Set PRINT_OPTION flag for Xps. - -Fri May 24 09:48:58 1991 James Clark (jjc at jclark) - - * troff/groff.h: Rename to troff.h. - - * pic/lex.c (lookup_keyword, docmp): New functions. - (get_token): Use new lookup_keyword. - Don't include key.h. - * pic/key.[ch], pic/pic.gperf: Deleted. - * pic/Makefile: Remove gperf stuff. - - * pic/Makefile, pic/output.h: Move definition of TEX_SUPPORT - into output.h. - * pic/tex.c: Move include of pic.h before test of TEX_SUPPORT. - - * troff/Makefile, troff/node.c: Move definition of - STORE_WIDTH into node.c. - - * etc/grog.pl, etc/grog.sh: Support -mdoc. - -Thu May 23 12:30:49 1991 James Clark (jjc at jclark) - - * dvi/devdvi/texr.map, dvi.devdvi/texi.map, - dvi/devdvi/texb.map: Add lq and rq. - dvi/devdvi: Regenerate fonts. - * ps/devps/textmap: Add lq and rq. - * ps/devps: Regenerate fonts. - * tty/devascii/R.proto, tty/devlatin1/R.proto: Add lq and rq. - * macros/tmac.e: Define \*(lq and \*(rq to be \(lq and \(rq. - - * pic/object.c (position_rectangle): When checking radius - cope with possiblity that width or height is negative. - (box_object::box_object): Have separate xrad and yrad with - signs matching signs of dim components. - (box_object::{north,south}_{east,west}): Use xrad and yrad. - (box_object::print): With rounded boxes use absolute values - for dim and rad arguments. - - * lib/Makefile, lib/fontfile.o: Pass definition of FONTPATH - in fontpath.h. - - * eqn/Makefile, eqn/main.c: Pass definition of DEVICE in device.h. - - * various files: Add explicit destructors to keep Saber CC +d - happy. - -Wed May 22 11:37:11 1991 James Clark (jjc at jclark) - - * eqn/box.c (box::top_level): Restore fonts correctly after - font changes in line containing inline equation. Also - restore previous font as well as current font. - * eqn/pbox.h: Define necessary string and register names. - - * troff/input.c (token::next): Case 'R' calls do_register. - (do_register): New function. - -Tue May 21 11:28:23 1991 James Clark (jjc at jclark) - - * groff.c, groff.sh: Support Xps device. Allow each device - to have a pseudo_name and a real_name. - - * groff.c (run_commands): Don't print `Broken pipe' messages. - - * ps/pfbtops.c: New file. - * ps/Makefile: Add pfbtops. - - * troff/number.c (parse_term): Improved error message. - -Mon May 20 11:22:14 1991 James Clark (jjc at jclark) - - * groff.c, groff.sh, etc/grog.sh, etc/grog.pl: Support grefer. - - * Makefile: Integrate refer. - * refer: New directory. - * man/grefer.man, man/glookbib.man, man/gindxbib.man, - man/lkbib.man: New files. - * man/Makefile: Support refer man pages. - - * lib/lib.h: Declare is_prime. - * lib/prime.c: New file. - - * troff/input.c (macro_source): New function. - (init_input_requests): Bind "mso" to macro_source. - - * troff/env.c (environment::possibly_break_line): Maintain - pointer to pointer to node to be split in ndp so as to avoid - using address of freed node. - - * troff/env.c (environment::hyphenate_line): Maintain pointer to - pointer to first node to be hyphenated in startp so as to - avoid using address of freed node. - - * troff/env.c (class trie, class hyphen_trie): Make the - elements of the trie be of type char not unsigned char. - Declare arguments to be const char* instead of unsigned char *. - - * troff/env.c (hyphenate): Initialize hbuf[0]. - - * troff/input.c (set_string): Declare p to be char * and cast - *p to unsigned char when necessary. - - * troff/input.c (do_define_macro): Declare s to be const - char*. Cast element to unisgned char when necessary, Declare - d to be an int. Handle EOF better. - - * troff/Makefile, troff/input.c: Different scheme for passing - definitions of MACROPATH, HYPHENFILE and DEVICE. - -Tue May 14 13:41:36 1991 James Clark (jjc at jclark) - - * tty/devascii/R.proto: Delete entry for em. - * tty/devlatin1/R.proto: Likewise. - -Sat May 11 11:13:28 1991 James Clark (jjc at jclark) - - * troff/input.c (translate): Stop when we get a space. Treat eof - like newline. - - * macros/tmac.an (IP): Only pass quoted argument to TP when \n(.$>1. - -Wed Apr 24 19:24:33 1991 James Clark (jjc at jclark) - - * tbl/main.c (process_format): A font name following a `f' - modifier that starts with a digit can be only one character long. - Also deal with EOF on the second character of the font name. - -Wed Apr 17 11:23:43 1991 James Clark (jjc at jclark) - - * troff/input.c (token::next): Turn \~ into an - unbreakable_space_node. - * troff/node.c (unbreakable_space_node): New class. - * troff/node.h: Declare it. - -Tue Apr 16 10:47:12 1991 James Clark (jjc at jclark) - - * dvi/dvi.c (dvi_printer::set_char): Make code an int. Check that - it's >= 0, before outputting it as a single byte. - -Mon Apr 15 11:20:23 1991 James Clark (jjc at jclark) - - * lib/font.c: Make font_char_metric::code an int. - (font::get_code): Change return type to int. - (font::load): Allow code to be arbitrary integer. - * lib/font.h (font::get_code): Change return type to int. - (font::number_to_index): Change argument type to int. - * troff/input.c (token::next): In case 'N', allow any value. - Store value in token::val. - (token::operator==): For TOKEN_NUMBERED_CHAR test equality of val. - (token::get_char, token::add_to_node_list, token::process): Get - number from val. - (charinfo::set_number): Change argument to int. - (charinfo::get_number): Require that NUMBERED flag be set. - (get_charinfo_by_number): Store numbered characters not between 0 - and 255 in a dictionary. - * troff/charinfo.h (get_charinfo_by_number): Change argument type - to int. - (charinfo::number): Change type to int. - (charinfo::set_number): Change type of set_number to int. - * troff/node.c (troff_output_file::put_char_width, - troff_output_file::put_char): Test whether character is numbered - using charinfo::numbered(). - * driver/printer.c (printer::set_numbered_char): Allow arbitrary - values of num. - * lib/nametoindex.c: New implementation to cope with arbitrary - number characters. - - * troff/input.c (token::operator==): Test val for - TOKEN_CHAR_HEIGHT, TOKEN_CHAR_SLANT, TOKEN_FONT_POSITION, and - TOKEN_SIZE. - - * man/Makefile: Add definiton of BROKEN_SPOOLER_FLAGS. - (.man.n): sed out @BROKEN_SPOOLER_FLAGS@. - -Sun Apr 14 12:57:00 1991 James Clark (jjc at jclark) - - * ps/devps/zapfdr.ps: Don't copy UniqueID. Avoid use of newdict - variable. - - * all Makefiles: rm targets of cp and >. - - * xditview/xtotroff.c (MapFont): Unlink troff_name before opening - it. - - * eqn/lex.c (def_table): Add dollar. - -Sat Apr 13 13:02:44 1991 James Clark (jjc at jclark) - - * troff/input.c (do_width): Push back newline before closing delim - like do_bracket. - -Fri Apr 12 15:16:03 1991 James Clark (jjc at jclark) - - * groff.c (possible_command::prepend_arg): New function. - (main): Prepend device -m option. - * groff.sh: Put device -m options before command-line options. - -Tue Apr 9 10:24:43 1991 James Clark (jjc at jclark) - - * macros/tmac.an (IP): Quote argument to TP. - - * ps/ps.c (main): New option -b, which sets... - (broken_flags): New variable. - (ps_printer::~ps_printer): Incorporate the setup section in the - prolog if (broken_flags & NO_SETUP_SECTION). - (ps_printer::begin_page): Generate {Begin,End}PageSetup comments. - (ps_printer::merge_download_fonts, ps_printer::merge_import_fonts, - ps_printer::merge_ps_fonts, ps_printer::print_font_comment, - ps_printer::print_needed_font_comment, - ps_printer::print_supplied_font_comment, - ps_printer::print_include_font_comments, - ps_printer::lookup_doc_font, ps_printer::download_fonts, - ps_printer::read_download_file, read_document_fonts, add_font, - skip_line, parse_fonts_arg, document_font::document_font, - document_font::~document_font, document_font::download, - ps_output::include_file): Deleted. - (ps_printer::~ps_printer): Generate %%EOF. Generate %!PS-Adobe-3.0 - rather than %!PS-Adobe-2.0. Make calls to - resource_manager::need_font for each font that we used. Replace - calls to merge_ps_fonts, merge_download_fonts, print_font_comment, - print_supplied_font_comment, print_needed_font_comment by call to - resource_manager::print_header_comments. Output %%Orientation - comment. Output %%Requirements: numcopies comment if ncopies > 1. - Don't output the prolog directly. Instead call - resource_manager::output_prolog. Only define #copies when ncopies - > 1. Delete calls to print_include_font_comments and - download_fonts. Add call to resource_manager::document_setup. - (ps_printer::do_file): Call resource_manager::import_file instead - of including it ourselves. - (ps_printer::do_import): Likewise. Also don't call - merge_import_fonts. Push userdict on the dictionary stack before - and pop it afterwards. - Move declaration of ps_output into ps.h. - * ps/psrm.c: New file implementing resource_manager class. - * ps/ps.h: New file declaring ps_output and resource_manager - classes. - * ps/devps/zapfdr.ps: - * ps/devps/symbolsl.ps: - * ps/devps/prologue: Use 3.0 conventions. - * ps/Makefile: Pass definition of BROKEN_SPOOLER_FLAGS in DEFINES. - Add default definition of BROKEN_SPOOLER_FLAGS. - * Makefile: New variable BROKEN_SPOOLER_FLAGS. Add - BROKEN_SPOOLER_FLAGS to SUBFLAGS. - -Mon Apr 8 09:26:54 1991 James Clark (jjc at jclark) - - * etc/grog.pl: New file. - * Makefile (GROG): New variable. - Add GROG to SUBFLAGS. - * etc/Makefile (GROG): New variable. - (install.nobin): Install $(GROG) rather than grog.sh. - -Thu Apr 4 11:36:45 1991 James Clark (jjc at jclark) - - * eqn/special.c (special_box::compute_metrics): Make the input and - output strings the same. Get the new height and depth from the - predefined height and depth registers. Also make subscript kern - and skew available. - (special_box::compute_subscript_kern, special_box::compute_skew): - New functions. - - * eqn/box.c (pointer_box::compute_skew, - simple_box::compute_metrics, box::top_level) - * eqn/text.c (prime_box::compute_metrics, - prime_box::comput_subscript_kern) - * eqn/limit.c (limit_box::compute_metrics): - * eqn/delim.c (build_extensible, delim_box::compute_metrics): - * eqn/sqrt.c (sqrt_box::compute_metrics): Protect possibly - negative numbers in `nr' requests with a leading 0. - -Wed Apr 3 15:58:23 1991 James Clark (jjc at jclark) - - * eqn/special.c: New file. - * eqn/eqn.y: Declare token SPECIAL. Make it right associative. - Add new rule for simple. - * eqn/lex.c (token_table): Add SPECIAL. - * eqn/box.h: Declare make_special_box. - * eqn/Makefile: Add special.[co]. - -Sat Mar 30 10:57:53 1991 James Clark (jjc at jclark) - - * ps/devps/prologue: Possibly set packing to true while defining. - Create grops dictionary here. Initialize local variables before - defining procedures. - (PICTURE): Rename to PBEGIN. Also do save, noop showpage, count - the dictionary stack. Set strokeadjust and overprint to false if - the relevant operators are defined. - (PEND): New procedure. - * ps/ps.c (ps_printer::~ps_printer): In the prolog just include - prologue. Do everything else in the setup section. - (ps_printer::do_import): Just call PBEGIN and PEND around the - picture. Also push userdict before, and pop it afterwards. - -Wed Mar 27 07:59:50 1991 James Clark (jjc at jclark) - - * troff/node.c (bracket_node::tprint): Brackets were being printed - 1m too low. - - * macros/tmac.an (SH, SS): Set fill mode. - -Tue Mar 26 07:46:31 1991 James Clark (jjc at jclark) - - * troff/div.c (top_level_diversion::begin_page): Set - high_water_mark to 0. - -Fri Mar 22 09:19:46 1991 James Clark (jjc at jclark) - - * man/mdate.sh: New file. - * man/mdate.c: Deleted. - * man/Makefile: Use mdate.sh instead of mdate. - (mdate): Deleted. - - * eqn/lex.c (do_gsize): Supply missing argument to error message. - -Tue Mar 19 11:06:50 1991 James Clark (jjc at jclark) - - * man/mdate.c: New file. - * man/*.man: Replace modification date by @MDATE@. - * man/Makefile (.man.n): Replace @MDATE@ by `mdate $<`. - (mdate): New target. - - * lib/font.c (text_file::next): Deal with arbitrarily long lines. - Remove illegal input characters. - -Mon Mar 18 08:32:25 1991 James Clark (jjc at jclark) - - * macros/tmac.s (pg*start-col): Do .ns *after* running the hooks. - -Sat Mar 16 03:52:25 1991 James Clark (jjc at jclark) - - * troff/div.c (begin_page): Change behaviour when - !first_page_begun and !break_flag. - - * troff/input.c (do_name_test): Return 0 if argument is empty. - - * troff/input.c (read_long_escape_name): Require closing ] to be - at same input level as opening [. - - * troff/input.c (read_increment_and_escape_name): New function. - (get_copy, process_input_stack): Use this for \n. - -Fri Mar 15 00:31:48 1991 James Clark (jjc at jclark) - - * troff/div.c (top_level_diversion::begin_page): Ignore the - current value of page_number if !first_page_begun. - - * groff.c (main): Fix declaration of buf. - - * troff/input.c (do_name_test): New function. - (token::next): Implement \A. - (token::next): Implement \e by turning it into a TOKEN_ESCAPE. - (token::description, token::add_to_node_list, token::process): - Handle TOKEN_ESCAPE. - * troff/token.h: New token TOKEN_ESCAPE. - -Thu Mar 14 10:22:26 1991 James Clark (jjc at jclark) - - * pic/main.c (do_picture): Allow space before and after filename - following `<'. Check that the filename is not empty. - -Wed Mar 13 12:49:40 1991 James Clark (jjc at jclark) - - * Version 1.01 released. - - * dvi/devdvi/CompileFonts: Add cm*ss10 fonts. - - * dvi/tmac.dvi: ftr HR to H. - - * macros/tmac.e: Round up computation of $r. - - * xditview/tmac.X: Don't give up completely in compatibility mode. - Use \n(.s instead of \n[.s]. - - * dvi/tmac.dvi: Don't give up completely in compatibility mode. - Use \(ci instead of \[ci]. Use \n(.s instead of \n[.s]. - Add u to factors inside \s[...]. Rename frac to dvi-frac. - Translate \(FM onto \[prime] and \(!/ onto \[slashnot]; use these - short names in the char definitions. - - * ps/tmac.ps: Don't give up completely in compatibility mode. - Fix the fraction definitions to use \n(.s and \(f/. Add an extra - quote in front of \n(.s. Add u to factors inside \s[...]. - -Mon Mar 11 12:01:20 1991 James Clark (jjc at jclark) - - * tty/tmac.tty: Call the nroff request. - - * macros/tmac.e ((x, )x): Better definitions that work properly - in a diversion. - (@0, @1): Helper macros for (x. - - * macros/tmac.e ($s, hl): Use \l rather than \D. - - * tty/tmac.tty: Make it work better in compatibility mode. - (pchar): Rename to tty-char. - - * macros/tmac.e (@E): New macro. - (r, i, b, rb, bi): Use @E. - - * macros/tmac.e (@F): Don't use (;...) syntax. - - * macros/tmac.e: Remove mention of \*(||/revisions. Mention that - it was modified for groff. - - * macros/tmac.e: Make sure \n(ps and \n(es are >= \n(.V. - - * macros/tmac.e (<., .>): Removed. - ([., .]): If \n(.V>=1v, use [] instead of superscripting. - - * macros/tmac.e: Remove check that groff is being used. - - * macros/tmac.e (@C): Change families only if using groff; turn - compatibility mode off while changing familes. Save compatibility - mode before changing families and restore it afterwards. - - * macros/tmac.e (@h): Remove test for offset + line length. - - * macros/tmac.e (sorry): Rename to @S. Use \$1 instead of \$0 - (lo, th, ac): Define to call @S instead of using als. - - * macros/tmac.e: Make $r and $R now contain \n(.v*100/\n(.sp, ie - the ratio of the vertical spacing to the point size in units - expressed as a percentage. Use these instead of $10r and $10R, - Delete $10r and $10R. - - * lib/font.c (font::load): In default computation of space_width, - divide by sizescale. Use scale_round. - - * macros/tmac.an (TP): Don't call `nf'. - (an-do-tag): Don't call `fi'. - -Sun Mar 10 09:52:35 1991 James Clark (jjc at jclark) - - * troff/input.c (process_input_stack): Handle the case where - spaces at the beginning of an input line are followed by a - newline. - -Thu Mar 7 20:18:07 1991 James Clark (jjc at jclark) - - * groff.c (device_table): Add PIC_X_OPTION for dvi device. - * groff.sh: Use pic -x with the dvi device. - - * dvi/devdvi/FontMakefile (H): Don't use -s. - - * dvi/devdvi/HI, dvi/devdvi/HB: New files. - * dvi/devdvi/Makefile: Add HI and HB to FONTS. - * dvi/devdvi/FontMakefile: Add rules for HI and HB. Include these - in FONTS. - -Mon Mar 4 13:20:14 1991 James Clark (jjc at jclark) - - * ps/psfig.diff: New file. - * ps/tmac.psfig: New file. - -Sat Mar 2 00:15:09 1991 James Clark (jjc at jclark) - - * macros/tmac.s (]=, ref*do-tl, ref*bib-print): Deleted. - (]-): Don't call ref*do-tl. - - * macros/tmac.s (ref*end-print): Use XP if [F not defined. - - * macros/tmac.s (ref*normal-print): Call FS rather than fn@do-FS. - (fn@do-FS): Rename to fn*do-FS. - - * troff/input.c (transparent_translate): New function. - (process_input_stack): Apply transparent_translate before calling - diversion::transparent_output(unsigned char). - -Wed Feb 27 00:13:25 1991 James Clark (jjc at jclark) - - * troff/input.c (do_define_macro): Define the macro before calling - skip_line. - - * xditview/Makefile: Add DEVICES variable. Change install target - to use this. - -Tue Feb 26 10:46:22 1991 James Clark (jjc at jclark) - - * groff.c (run_commands): Handle the possibility that there are - child processes other than those forked by us. - -Sun Feb 24 21:32:30 1991 James Clark (jjc at jclark) - - * lib/string.c (string::append): New function. - * lib/stringclass.h: Declare it. - -Thu Feb 21 11:49:26 1991 James Clark (jjc at jclark) - - * eqn/main.c (main): New option -N which sets - no_newline_in_delim_flag. - (do_file): If no_newline_in_delim_flag is set don't allow newlines - in delimiters. - * groff.c (main): Pass -N on to eqn. - (help, synopsis): Mention -N. - * groff.sh: Implement -N. - -Wed Feb 20 15:16:10 1991 James Clark (jjc at jclark) - - * macros/tmac.s (]=, ref*bib-print, ref*do-tl): New macros. - (]-): Call ref*do-tl if ref*need-tl is non-zero. - (XP): Allow as initializer. - -Tue Feb 19 14:09:06 1991 James Clark (jjc at jclark) - - * troff/env.c (environment::wrap_up_field): If field_spaces are - non-zero and we have a current_tab, subtract padding from - tab_distance. If this makes tab_distance <= 0, use the next tab - stop instead. If there isn't any next tab or it's a left tab, - wrap up the current tab. - (environment::start_field): Initialize tab_precedes_field. - (environment::wrap_up_tab): If there's a current field, update - pre_field_width, field_distance and tab_precedes_field. - * troff/env.h (environment::tab_precedes_field): New member. - -Fri Feb 15 01:24:00 1991 James Clark (jjc at jclark) - - * ps/ps.c (ps_printer::do_file): New function. - (ps_printer::special): Bind to `file' special. - (ps_printer::do_exec): Set ndefined_styles to 0. - -Sat Feb 9 03:03:04 1991 James Clark (jjc at jclark) - - * eqn/text.c (split_text): Grok \* and similar escapes sequences. - Avoid stripping first character from the start of unrecognized - escapes. Use lex_error instead of error to report errors. - * eqn/lex.c (get_token): Rework handling of escapes. - (lex_error): Move declaration into... - * eqn/eqn.h. - - * xditview/xditview.c (main): Make -page option work. - - * Makefile: Correct comment about -DBROKEN_SPOOLER and pageview. - -Wed Feb 6 12:28:43 1991 James Clark (jjc at jclark) - - * macros/tmac.s (B2): Correct size of box. - -Tue Feb 5 00:37:35 1991 James Clark (jjc at jclark) - - * macros/tmac.s (B2): Postpone drawing the box until in the - top-level diversion. - - * tty/tmac.tty: Add font translations for C, CR, CW. - - * groff.c (synopsis, help): Document -i. - * groff.sh: Implement -i. - - * macros/tmac.s (@NH): Put a `.' after multi-part numbers. - Simplify the construction of SN. - - * troff/number.c (parse_term): Give `|' a higher precedence. - * tbl/table.c (numeric_text_entry::simple_print): Parenthesise - accordingly. - - * macros/tmac.s (B2): Use par@finish instead of par@reset. - -Mon Feb 4 12:36:09 1991 James Clark (jjc at jclark) - - * lib/string.c (string::move): New function. - * lib/stringclass.h: Declare it. - -Sat Feb 2 16:02:16 1991 James Clark (jjc at jclark) - - * troff/env.c (distribute_space): Add optional argument - `force_forward'. - (environment::wrap_up_field): Call distribute_space with - `force_forward' argument of 1. - -Fri Feb 1 19:36:33 1991 James Clark (jjc at jclark) - - * lib/string.c, lib/stringclass.h (string::operator+=(char)): - Inline it. Move reallocation into... - (string::grow1): New function. - * pic/Makefile, tbl/Makefile, eqn/Makefile, ps/Makefile: Redo - dependencies to include library header files. - * lib/Makefile: Make string.c and lf.c depend on stringclass.h. - -Thu Jan 31 15:02:27 1991 James Clark (jjc at jclark) - - * macros/tmac.s (@NH): Use the same number registers than -ms does - for the heading level counters. Use the same string that -ms does - for the number for this heading. - -Wed Jan 30 14:25:40 1991 James Clark (jjc at jclark) - - * lib/new.c (operator new): Cast result of malloc to char *. - - * troff/input.c (spring_trap, lookup_request): Add assert that nm - is not null. - -Tue Jan 29 18:08:05 1991 James Clark (jjc at jclark) - - * groff.c (main): Support -i. - -Sun Jan 27 13:23:17 1991 James Clark (jjc at jclark) - - * pic/pic.h: Include . - - * ps/ps.c: Add declaration of mktemp. - - * Makefile: Add -DHAVE_UNION_WAIT option for CPPDEFINES. - * groff.c: If HAVE_UNION_WAIT is defined, declare wait()'s - argument as union wait *. - (run_commands): If HAVE_UNION_WAIT is defined cast wait()'s - argument to union wait *. - -Sat Jan 26 12:04:52 1991 James Clark (jjc at jclark) - - * tty/tmac.tty: Add definition of \(co. - - * pic/object.c (make_arc): Only increase radius when radius - strictly less than d. - (arc_object::update_bounding_box): May need to add 4.0 to end_quad - more than once. - - * troff/env.c (environment::environment(symbol), - environment::environment(const environment *)): Initialize - input_trap_count. - -Sat Jan 19 08:18:35 1991 James Clark (jjc at jclark) - - * tbl/main.c (main): Add exit(0). - - * ps/ps.c (ps_printer::~ps_printer): Use fseek instead of rewind. - - * pic/main.c (main): - * eqn/main.c (main): - * tbl/main.c (main): - * etc/soelim.c (main): - * driver/printer.c (printer::~printer): - * troff/node.c (real_output_file::~real_output_file, - real_output_file::flush): Check for errors on stdout. - - * most files: Add 1991 to copyright notice. - - * macros/tmac.s: Don't test \n(.x and \n(.y. - - * troff/input.c (token::next): Rename `escape_char' label to - `handle_escape_char' and `normal_char' label to - `handle_normal_char'. - -Thu Jan 17 15:46:35 1991 James Clark (jjc at jclark) - - * groff.c (main, synopsis, help): Support -a option. - * groff.sh: Likewise. Also eliminate Zflag variable by adding -z - to trflags while parsing options. - -Tue Jan 15 13:07:27 1991 James Clark (jjc at jclark) - - * troff/number.c (parse_term): With `m', `M' and `n' scale - indicators, convert scale factor to hunits before scaling. - -Mon Jan 14 12:39:12 1991 James Clark (jjc at jclark) - - * lib/font.c (scale_round): Better test for overflow when n is - negative. - -Thu Jan 10 11:10:56 1991 James Clark (jjc at jclark) - - * tbl/main.c (process_format): Add second argument of type - options*. Change callers. Allow opt->tab_char as well as '\t' - between format items. - -Mon Jan 7 12:30:18 1991 James Clark (jjc at jclark) - - * macros/tmac.an (PD): With no arguments, make sure register PD is - at least \n[.V]. - (TH): Call PD with no argument, instead of setting register PD - directly. - -Sun Jan 6 11:18:39 1991 James Clark (jjc at jclark) - - * Version 1.00 released. - -Sat Jan 5 08:44:30 1991 James Clark (jjc at jclark) - - * ps/tmac.ps, xditview/tmac.X: Add font translation of C to CR. - - * dvi/devdvi/DESC: Mount CW instead of CR. - - * dvi/tmac.dvi: Add definition of \(tm. - - * dvi/devdvi/texsy.map: Add lh, and rh. - * dvi/devdvi/texex.map: Add lt, rt, lb, rb, lk, rk. - * dvi/devdvi/texmi.map: Add *o. Regenerate fonts. - - * dvi/devdvi/FontMakefile: Generate H from cmss10. - * dvi/devdvi/Makefile: Install H. - * dvi/devdvi/H: New file. - -Fri Jan 4 15:04:57 1991 James Clark (jjc at jclark) - - * troff/env.c (vertical_spacing): Don't allow vertical spacing to - be 0. - -Thu Jan 3 13:41:19 1991 James Clark (jjc at jclark) - - * macros/tmac.s (@EN): Add \n(.V to the argument to ds@need. - - * macros/tmac.pic (PS): Avoid attempting to set negative indent. - - * macros/tmac.s (@EN): Handle the case where the equation is empty - but the label is not. - -Wed Jan 2 10:31:44 1991 James Clark (jjc at jclark) - - * troff/groff.h: New warning category WARN_SPACE. - * troff/input.c: Add WARN_SPACE to DEFAULT_WARNING_MASK. Add - WARN_SPACE to warning_table. - (interpolate_macro): Give a warning of type WARN_SPACE if the name - is longer than two characters and is not defined, but the first - two characters do make a defined name. - - * PROBLEMS: New file. - - * CHANGES: New file. - * README-0.6, README-1.00: Deleted. - - * groff.c, groff.sh: Add X75-12 and X100-12 devices. - * xditview/devX75/Makefile: Make devX75-12. - * xditview/devX100/Makefile: Make devX100-12. - - * xditview/devX100/eqnchar, xditview/devX75/eqnchar, - dvi/devdvi/eqnchar, ps/devps/eqnchar: Remove use of \R. - -Tue Jan 1 19:24:01 1991 James Clark (jjc at jclark) - - * README-0.7: Rename to README-1.00. - - * macros/tmac.pic: New file. - * macros/Makefile (install.nobin): Install tmac.pic. - -Mon Dec 31 10:40:53 1990 James Clark (jjc at jclark) - - * troff/env.c (hyphen_word): Correct the test for whether the - token is a hyphen. Reset npos to 0. - - * macros/tmac.s (par@sup-start, par@sup-end): New implementations. - -Sun Dec 30 15:53:13 1990 James Clark (jjc at jclark) - - * macros/tmac.s (ds*common-end): Call par*reset. - (PE): Likewise. - (par@reset-indent): Deleted. - - * macros/tmac.s (@IP): Divert the label. - -Sat Dec 29 14:33:32 1990 James Clark (jjc at jclark) - - * xditview/draw.c (setGC): Use a line width of .1m rather than - .04m by default; round rather than truncate value. - - * tbl/table.c (class empty_entry): New class. - (empty_entry::empty_entry, empty_entry::line_type): New functions. - (table::add_entry): Represent empty entries by objects of type - empty_entry. - (table_entry::line_type): Return -1. - (table::determine_row_type): Ignore entries with line_type 0. - Treat type -1 as non-lines. - -Fri Dec 28 15:04:41 1990 James Clark (jjc at jclark) - - * ps/devps/textmap, xditview/libXdvi/DviChar.c, tty/devlatin1/R.proto, - macros/tmac.s: Rename \(-d to \(Sd. - -Thu Dec 27 12:35:47 1990 James Clark (jjc at jclark) - - * ps/devps/textmap: Add `sd', `/_' and `3d' characters. - * xditview/libXdvi/DviChar.c: Likewise. - * dvi/devdvi/texsy.map: Add `<<', `>>'. - -Wed Dec 26 13:33:23 1990 James Clark (jjc at jclark) - - * troff/div.c (top_level_diversion::begin_page): Call - init_output() if the_output is 0. - -Sat Dec 22 12:35:29 1990 James Clark (jjc at jclark) - - * troff/input.c: Replace ESCAPE_E by ESCAPE_e and ESCAPE_C by - ESCAPE_c. - (get_copy): Turn \E into ESCAPE_E. - (token::process, asciify): Handle ESCAPE_E. - - * macros/tmac.s (ds*common-end, par@reset): Add `.rj 0'. - (RD): New macro. - (DS): Implement `.DS R'. - -Fri Dec 21 11:41:53 1990 James Clark (jjc at jclark) - - * macros/tmac.s (FS): New macro. - - * macros/tmac.s (fn@do-FS): Use @LP instead of LP. - - * macros/tmac.s (cov*tl-init): Remove after first execution - instead of aliasing to @nop. Call top of page macro explicitly - instead of setting trap; call @init first. Set pg@top as top of - page macro. - (cov*auto-init): Deleted. Set cov*tl-init instead of - cov*auto-init as top of page trap. - (TL, LP): Do a break instead of calling cov*tl-init. - (cov*print): With RP format but no TL, alias FS and FE to @FS and - @FE; in this case also give a warning and always start another - page. No need to set pg@top here. - (cov*tl-init): Rename to cov*first-page-init. - - * macros/tmac.s (RP): Do `.pn 0'. - (cov*tl-init): With RP format don't do `.pn 0'. - - * macros/tmac.s (pg@cs-top): Set no space mode. - - * macros/tmac.s (par@TL, par@AU, par@AI): New macros. - (cov*ab-init): Alias TL, AU and AI to these. - -Thu Dec 20 10:10:50 1990 James Clark (jjc at jclark) - - * macros/tmac.s (@EQ): Move the space before the equation into @EN - (@EN): Do nothing unless \n[dl] is > 0. - -Tue Dec 18 12:20:47 1990 James Clark (jjc at jclark) - - * pic/object.c (ellipse_object::radius): New function. - - * VERSION: Change version to 0.7. - - * tbl/table.c (block_entry::do_divert): Declare return type as - void. - (block_entry::divert, alphabetic_block_entry::divert): Return 1. - -Mon Dec 17 12:30:34 1990 James Clark (jjc at jclark) - - * troff/column.c: New file. - * troff/Makefile: Corresponding changes. - - * troff/hvunits.c (scale(vunits, vunits, vunits)): New function. - Friend of vunits. - - * troff/div.c (top_level_diversion::space): If the space causes - the first-page transition and springs a trap, truncate the space - to 0. - -Fri Dec 14 12:30:02 1990 James Clark (jjc at jclark) - - * ps/ps.c (ps_printer::do_import): Add a `clear' after including - the document. - - * pic/troff.c (troff_output::line_thickness, - troff_output::set_fill): Do a horizontal motion to compensate for - the width of the \D escape sequence. - -Thu Dec 13 10:17:14 1990 James Clark (jjc at jclark) - - * xditview/tmac.X: Reinstate definition of \(rn, but only for X100 - (not X75). - - * eqn/sqrt.c (sqrt_box::compute_metrics): Supply missing argument - to printf. - - * tbl/table.c (simple_entry::simply_print): Don't declare as pure. - Supply empty definition. - (text_entry::simple_print, simple_text_entry::simple_print): - Delete declarations. - (table::add_entry): Represent empty entries by objects of type - `simple_entry'. - -Wed Dec 12 08:50:48 1990 James Clark (jjc at jclark) - - * troff/Makefile: Remove -DHYPHEN_CONTROL from DEFINES. - - * tbl/table.c (left_text_entry::add_tab): New function. - - * macros/tmac.s: Make @RT an alias for par@reset. Make RT - initialize like LP. - -Mon Dec 10 11:19:55 1990 James Clark (jjc at jclark) - - * troff/env.c (environment::start_field): Give an error message if - there is no next tab. - -Sun Dec 9 11:46:40 1990 James Clark (jjc at jclark) - - * troff/env.c (hyphenate): Skip initial elements with zero - hyphenation code. - - * macros/tmac.s (par@init): Keep VS in points rather than units. - -Sat Dec 8 23:00:27 1990 James Clark (jjc at jclark) - - * pic/main.c (main): Implement `-c' option. - * pic/output.h: Declare make_tpic_output(). - * pic/tex.c (tex_output::set_pen_size): Make it virtual and - protected. - (tpic_output): New class. - (tpic_output::tpic_output, tpic_output::set_pen_size, - tpic_output::command, make_tpic_output): New functions. - -Fri Dec 7 11:57:41 1990 James Clark (jjc at jclark) - - * tbl/main.c (main): Call `.ab' if \n(.g is false. Define TS/TE - if they're not already defined. - * tbl/table.c (init_output): Don't test \n(.g. - - * troff/input.c (do_if_request): Delete `g' condition. Recognize - `d', `r' and `c' conditions even in compatibility mode. - -Tue Dec 4 09:13:47 1990 James Clark (jjc at jclark) - - * ps/tmac.ps (ps-bb): Protect against negative numbers in bounding - box. - -Mon Dec 3 07:18:26 1990 James Clark (jjc at jclark) - - * troff/env.h (environment::prev_line_interrupted): New member. - (environment::get_prev_line_interrupted): New function. - * troff/env.c (environment::newline): Set prev_line_interrupted. - (environment::environment(const environment *), - environment::environment(symbol)): Initialize - prev_line_interrupted. - * troff/input.c (process_input_stack): Don't give special - treatment to space and newline at the beginning of the line if the - previous line was interrupted. - -Sat Dec 1 15:48:37 1990 James Clark (jjc at jclark) - - * eqn/eqn.y: Disallow PRIME by itself. - * eqn/lex.c (token_table): Bind `opprime' instead of `prime' to - PRIME. - (def_table): Remove definition of '. Define prime to be `. - - * eqn/eqn.y: Split off part of rule `script' into a new rule - `nonsup'. - -Fri Nov 30 10:23:44 1990 James Clark (jjc at jclark) - - * macros/tmac.s ({, }): New string aliases. - -Thu Nov 29 11:34:40 1990 James Clark (jjc at jclark) - - * README-0.7: New file. - -Wed Nov 28 10:09:57 1990 James Clark (jjc at jclark) - - * macros/tmac.s: New file. - * man/groff_ms.man: New file. - * Makefile: Add definition of TMAC_S. Pass TMAC_S in SUBFLAGS. - * Makefile.bd: Similarily. - * man/Makefile: Add groff_ms.n to MAN7PAGES. Replace @TMAC_S@. Add - definition of TMAC_S. - * macros/Makefile: Add definition of TMAC_S. Install tmac.s. - * macros/TODO: New file. - -Sat Nov 24 20:04:54 1990 James Clark (jjc at jclark) - - * troff/env.c (right_justify): New function. - (init_env_requests): Bind this to request "rj". - (center_lines): Set right_justify_lines to 0. If we get a bad - integer, center 1 line. - (environment::environment(symbol), environment::environment(const - environment *)): Initialize right_justify_lines. - (environment::get_right_justify_lines): New function. - (init_env_requests): Bind this to number_register ".rj". - - * troff/env.c (environment::choose_breakpoint): Implement - hyphenation_margin and hyphenation_space. - (environment::get_hyphenation_space, - environment::get_hyphenation_margin): New functions. - (init_env_requests): Bind these to .hys and .hym. - (hyphenation_space_request, hyphenation_margin_request): New - functions - (init_env_requests): Bind these to hys and hym. - (environment::environment(symbol), environment::environment(const - environment *)): Initialize hyphenation_margin and - hyphenation_space. - * troff/env.h: Corresponding changes to class environment. - -Fri Nov 23 09:08:16 1990 James Clark (jjc at jclark) - - * troff/div.c (blank_line): Always do a break. - - * eqn/box.c (do_text): Turn off escapes while appending text to - string. - -Thu Nov 22 10:58:59 1990 James Clark (jjc at jclark) - - * troff/input.c (while_break_request, while_continue_request): New - functions. - (init_input_requests): Bind these to "break" and "continue". - (while_depth, while_break_flag): New variables. - (while_request): Update while_depth. Break out of loop if - while_break_flag is set. - -Wed Nov 21 10:54:40 1990 James Clark (jjc at jclark) - - * tbl/table.c (init_span_reg): Initialize span_width_reg to \n(.H - rather than 0. - -Mon Nov 19 00:45:03 1990 James Clark (jjc at jclark) - - * Makefile: Include -DBROKEN_SPOOLER by default. Expand comment. - - * stringify: New file. - * Makefile (groff.o): Use stringify. - - * xditview/tmac.X: Remove definition of \(rn. - * xditview/libXdvi/DviChar.c: Remove radicalex from - Adobe_symbol_map. - -Sat Nov 17 10:44:58 1990 James Clark (jjc at jclark) - - * tbl/table.c (table::add_entry): Allow alphabetic text blocks. - (alphabetic_block_entry::alphabetic_block_entry, - alphabetic_block_entry::divert, alphabetic_block_entry::print): - New functions. - (block_entry::divert): Split off body into ... - (block_entry::do_divert): If the block is alphabetic, subtract 2n - from the line length; also update the span width to dl+2n, and the - alphabetic span width to dl. - - * driver/input.c (do_file): While reading argument to D command, - when expanding buffer, multiply szp by sizeof(int) rather than 2 - in the argument to memcpy. - - * tbl/table.c (compute_span_width): Add 2n rather than 1n to the - width of alphabetic columns. - -Fri Nov 16 06:34:27 1990 James Clark (jjc at jclark) - - * troff/node.c (lookup_family): Supply second argument to lookup. - - * troff/dictionary.c (dictionary::lookup): After an unsuccesful - search, return immediately if v is 0. - - * pic/troff.c: Define EQN_NO_EXTRA_SPACE_REG. - (troff_output::start_picture): Set this reg. - (troff_output::end_picture): Remove this reg - * eqn/box.c (box::extra_space): Don't produce `\x's if - EQN_NO_EXTRA_SPACE_REG is defined. - - * eqn/eqn.y: Allow just a PRIME to be a `simple'. - * eqn/text.c (split_text): Map ' to \(fm when it's the first - character. - -Thu Nov 15 10:35:06 1990 James Clark (jjc at jclark) - - * macros/tmac.e: Use font 3 instead of B in $c. Remove `bd' - requests. - - * troff/div.c (top_level_diversion::top_level_diversion): - Initialize page_number to 0. - -Wed Nov 14 21:41:58 1990 James Clark (jjc at jclark) - - * groff/troff (environment::environment(const environment *)): - Initialize name to e->name, rather than "anonymous". - -Sat Nov 10 01:59:37 1990 James Clark (jjc at jclark) - - * xditview/libXdvi/Dvi.c (ShowDvi): If eof is encountered, reset - requested_page. Split middle part into ... - (FindPage): New function. - (SetValues): If we don't yet know the last page, and the requested - page is greater than the current page, call FindPage. - Update the font_map_string before doing this. - - * xditview/tmac.X: Add definitions of \(sq, \(ga, \(dg and \(dd. - Translate \(lh and \(rh into left and right double arrows. - - * troff/node.c (class hyphen_inhibitor_node): New class. - (hyphen_inhibitor_node::hyphen_inhibitor_node, - hyphen_inhibitor_node::copy, hyphen_inhibitor_node::same, - hyphen_inhibitor_node::type, - hyphen_inhibitor_node::get_hyphenation_type): New functions. - (node::add_discretionary_hyphen): Use hyphen_inhibitor_node rather - than dbreak_node(0, 0) to represent a `\%' at the beginning of a - word. - -Fri Nov 9 16:05:38 1990 James Clark (jjc at jclark) - - * troff/node.h (dummy_node::get_hyphenation_type, - transparent_dummy_node::get_hyphenation_type): Declare them. - * troff/node.c: (dummy_node::get_hyphenation_type, - transparent_dummy_node::get_hyphenation_type): New functions. - -Wed Nov 7 10:09:06 1990 James Clark (jjc at jclark) - - * xditview/libXdvi/draw.c: If M_PI not defined after including - math.h, then define it. - - * xditview/Makefile: Add definition of AR. Pass it to the submake - in libXdvi. - * xditview/libXdvi/Makefile: Add definitions of AR and RANLIB. - -Tue Nov 6 10:14:27 1990 James Clark (jjc at jclark) - - * troff/dictionary.h (object_dictionary::alias): Declare return - value as int. - * troff/dictionary.c (object_dictionary::alias): Return non-zero - if the old name was defined. - * troff/input.c (alias_macro): Give a warning if the old name was - not defined. - * troff/reg.c (alias_reg): Likewise. - -Mon Nov 5 00:31:39 1990 James Clark (jjc at jclark) - - * troff/input.c (token::next): Delete implementation of \R. - - * macros/Makefile: Strip comments from tmac.e while installing it. - - * troff/input.c: New variable `nroff_mode'. - (troff_request, nroff_request): New functions. - (init_input_requests): Bind `troff' and `nroff' to troff_request - and nroff_request. - (do_if_request): Compute results of t and n conditions from - nroff_mode. - - * text/text.c (split_text): Fix typo in >=. - - * eqn/lex.c: Add definition of `==' to def_table. - -Fri Nov 2 02:49:09 1990 James Clark (jjc at jclark) - - * pic/tex.c (tex_output::start_picture): Change the definitions of - \graph and \graphtemp so that they work properly with Plain TeX. - - * pic/tex.c (tex_output::solid_arc): Ensure that the second angle - argument to `ar' is not less than the first. - - * pic/pic.y: Allow a comma between elements of the variable list - in the argument to `reset'. - - * pic/object.c (arc_object::arc_object): Fix computation of - radius. - - * eqn/main.c (main): Add exit(0). - -Thu Nov 1 02:03:50 1990 James Clark (jjc at jclark) - - * troff/div.c (begin_page): Test no_space_mode after doing the - break, but still push the page ejector cookie before doing the - break. Also set the next page number after doing the break. - - * xditview/xditview.c (NewFile): Don't set the title and icon name - if this is the first file and its name is `-'. - * groff/groff.c: Define a new device flag XT_OPTION. Set it for - the X75 and X100 devices. - (main): If a device has the XT_OPTION flag set and there's exactly - one file argument, pass the driver -xrm and -title options to set - the icon name and window title to the name of the file. - - * troff/env.c (environment_switch): If there was an argument but - it wasn't a valid number or name, then pop an environment but - don't give an error message on underflow. - - * troff/number.c (start_number): Correct spelling in error message. - - * troff/input.c (token::delimiter): Don't print an error message - if err is false. - - * xditview/libXdvi/parse.c (ParseInput): In case 'D', only call - ParseDrawFunction if dw->display_enable is true. - -Wed Oct 31 05:49:50 1990 James Clark (jjc at jclark) - - * pic/pic.y: Parse text positioning like normal attributes, so as - to allow `"text" at 0,0 ljust'. Don't allow `center' as a - positioning attribute. - -Mon Oct 29 22:50:38 1990 James Clark (jjc at jclark) - - * tbl/main.c (process_data): When in state START while reading a - text block, don't change to state MIDDLE if c is a newline. - -Sun Oct 28 21:59:56 1990 James Clark (jjc at jclark) - - * dvi/dvi.c (dvi_printer::begin_page): Rename `i' variable to `j' - so as to avoid shadowing parameter. - -Wed Oct 24 18:35:39 1990 James Clark (jjc at jclark) - - * tbl/table.c (trim_space): Deleted. - (table::add_entry): Don't call trim_space. - -Mon Oct 22 03:48:39 1990 James Clark (jjc at jclark) - - * VERSION: Change version to 0.6. - - * troff/number.c (parse_expr): Make == work. - -Sat Oct 20 11:28:17 1990 James Clark (jjc at jclark) - - * man/grog.man: New file. - * man/Makefile: Add grog.n to MAN1PAGES. - * etc/grog.sh: New file. - * etc/Makefile: Install grog.sh as grog. - -Fri Oct 19 11:17:15 1990 James Clark (jjc at jclark) - - * troff/input.c (token::next): Implement \E. - -Thu Oct 18 11:56:24 1990 James Clark (jjc at jclark) - - * xditview/tmac.X: Change font translations to match tmac.ps. - - * troff/input.c (non_empty_name_warning): Don't give a warning if - `\{' terminates the name. - -Tue Oct 16 10:04:23 1990 James Clark (jjc at jclark) - - * ps/devps/symbol.diff: New file. - * ps/devps/FontMakefile: Mention symbol.diff. - -Sun Oct 14 11:46:46 1990 James Clark (jjc at jclark) - - * troff/node.c (font_position): Use get_long_name to read the - external_name. - - * troff/env.c (environment_switch): If we get a number that's < 0 - or >= NENVIRONMENTS, treat it like a name. - Change NENVIRONMENTS to 10. - - * troff/groff.h: Remove definition of FONTS_MAX. - * troff/node.h (class font_family): Make map a pointer instead of - an array. Add a map_size member. Make it a class. Make nm const - and public. Make invalidate_fontno a friend. - * troff/node.c: Define font_table_size. Make font_info a pointer - rather than an array. - (class troff_output_file): Allocate font_position dynamically. Add - nfont_positions member. - (troff_output_file::set_font): Grow font_position if necessary. - (troff_output_file::~troff_output_file): Delete font_position. - (troff_output_file::troff_output_file): Allocate font_position. - (grow_font_table): New function. - (troff_output_file::really_begin_page, - troff_output_file:really_copy_page): Use nfont_positions rather - than FONTS_MAX. - (mount_font_no_translate, mount_style): Call grow_font_table if - necessary. - (font_family::font_family): Allocate map. - (font_family::make_definite): Grow map if necessary. Use - font_table_size instead of FONTS_MAX. - (font_family::~font_family): New function. - (invalidate_fontno): Use font_family::map_size. - (get_fontno, env_space_width, env_half_narrow_space_width, - env_narrow_space_width, symbol_fotno, is_good_fontno, - get_bold_fontno, make_glyph_node): Use font_table_size rather than - FONTS_MAX. - (next_available_font_position): Never return 0. - -Fri Oct 12 10:17:52 1990 James Clark (jjc at jclark) - - * ps/tmac.ps: Add font translations for compatibility with dpost. - -Thu Oct 11 12:09:03 1990 James Clark (jjc at jclark) - - * eqn/pile.c: Rename default_baseline_sep to baseline_sep. - Move BASELINE_SEP_FORMAT and COLUMN_WIDTH_FORMAT into pbox.h. - Move definitions baseline_sep, shift_down, column_sep, - matrix_side_sep into... - * eqn/box.c: Add them to param_table. - * eqn/pbox.h: Add declarations to pbox.h. - - * troff/input.c (set_string): Cast value to unsigned char *. - - * troff/token.h (process_input_stack): Declare it static before - declaring it a friend. - -Wed Oct 10 09:59:13 1990 James Clark (jjc at jclark) - - * dvi/devdvi/texex.map: Fix positions of extensible brace middle - and bottom. - * dvi/devdvi/EX: Regenerate. - - * troff/input.c (init_charset_table): Make ", ', ), ], *, \(dg - transparent. - -Tue Oct 9 08:34:02 1990 James Clark (jjc at jclark) - - * eqn/lex.c: In defaults_table, make definition of `dot' call - `dot_def'. Don't explicitly make it roman. Similarily for other - accents. - - * pic/lex.c (for_input::for_input): Add by_is_multiplicative - argument. - (for_input::get, for_input::peek): Use this. - (do_for): Add by_is_multiplicative argument. - * pic/pic.y: Change optional_by clause to allow '*' after `by'. - Change semantic value of optional_by to be a double plus a flag - saying whethet the by clause is multiplicative. - - * eqn/lex.c (get_delimited_text): Remember location of start of - definition. Improve error handling when EOF is encountered. - - * lib/font.h: Rename handle_x_command to - handle_unknown_font_command. - * lib/font.c (font::load): Call handle_unknown_font_command for - any unknown command in the font description file. Don't call - handle_x_command. Include the name of the command in the argv. - Improve message for unknown command after kernpairs or charset - command. - * ps/ps.c (ps_font::handle_x_command): Rename to - handle_unknown_font_command. Remove message about `x download' - command. Give error message for wrong number of arguments. - * ps/devps/afmtodit: Generate `encoding' instead of `x encoding'. - * dvi/dvi.c (dvi_font::handle_x_command): Rename to - handle_unknown_font_command. Give an error message for wrong - number of arguments. Rename design_size to designsize. - * dvi/tfmtodit.c (main): Generate `checksum' instead of `x - checksum', `designsize' instead of `design_size'. - -Mon Oct 8 00:38:55 1990 James Clark (jjc at jclark) - - * eqn/*.[chy]: Change underaccent to uaccent. - - * eqn/eqn.y: Add rule for underaccent. Declare UNDERACCENT token; - give it the same precedence as ACCENT. - * eqn/other.c (make_underaccent_box): New function. - * eqn/box.h: Declare it. - * eqn/lex.c: Add UNDERACCENT to token_table. Add utilde to - def_table. - -Sun Oct 7 11:25:16 1990 James Clark (jjc at jclark) - - * pic/pic.y (reset_all): New function. Called in rule for RESET. - (parse_init): Call reset_all. - (define_variable): When defining scale reset only those - pre-defined variables that are scaled. - (defaults_table): Add `scale' as non-scaled value. - - * pic/pic.y: Redo parsing of text adjustments: parse adjustments - together with the text; allow any number of positioning words; - allow center as a positioning word. - - * pic/object.c (output::compute_scale): Get picture maximum height - and width from variables called maxpswid and maxpsht. - * pic/pic.y: Add maxpswid and maxpsht to defaults_table. - -Sat Oct 6 10:16:56 1990 James Clark (jjc at jclark) - - * pic/object.c (object_spec::make_text): Multiply textht by number - of text items. - - * pic/pic.y: Allow `sprintf("string", expr,...)' wherever text can - occur. - (do_sprintf): New function. - (pic.gperf): Add sprintf token. - (text, sprintf): New rules. - - * pic/pic.y: `rand()' with no arguments returns a random number - in the range [0,1). - - * pic/pic.y: Allow a bare expression to be an attribute: change - precedences to support this. Change optional_ordinal rule to - optional_ordinal_last to avoid reduce/reduce conflict. - * pic/object.c (object_spec::object_spec): Initialize direction. - - * pic/pic.y: Implement ^ operator meaning exponentiation. - - * troff/node.h: Add default argument to mount_font. - * troff/node.c (font_position): Read an optional third argument - giving the external_name. - (mount_font): Add optional argument giving the external_name. - (mount_font_not_translate): Have additional argument giving - external name. Use this name to load the font. Pass both names - to font_info::font_info. - (font_info::font_info): Have additional argument giving - external_name. - (class tfont): New member external_name. - (font_info::get_tfont): Use external name to construct tfont_spec. - -Fri Oct 5 04:03:13 1990 James Clark (jjc at jclark) - - * eqn/lex.c (init_table): Add argument giving device. Define - name of device to be "1". - (do_ifdef): Counts as true if the argument has been defined with - `define'. - * eqn/main.c (main): Call init_table with device argument. Make - device local to main. - * eqn/eqn.h: Change declaration of init_table. Remove declaration - of device. - - * pic/lex.c (get_delimited): Allow text to be delimited by - matching {}s. Don't recognize ending delimiter within a string. - - * troff/input.c (get_delim_name): New function. - (token::next): Implement \C. - - * lib/font.c (font::load): Grok ---. Add an alias for each - character based on its code. - (font::get_code_width): Deleted. - * lib/font.h (class font): Declare font::number_to_index(). - Remove declaration of font::get_code_width. - * lib/nametoindex.c (font::name_to_index): Add 512 rather than 256 - to indices of named characters. - (font::number_to_index): New function. - * troff/input.c (font::number_to_index): New function. - (get_charinfo_by_number, charinfo::get_number, - charinfo::set_number): New functions. - (token::next): Turn \N into a TOKEN_NUMBERED_CHAR. - (token::process, token::description, token::get_char, - token::add_to_node_list, token::operator==): Handle - TOKEN_NUMBERED_CHAR. - * troff/charinfo.h: Declare get_charinfo_by_number, - charinfo::get_number, charinfo::set_number. Add NUMBERED flag to - charinfo class. - (charinfo::numbered): New function. - * troff/token.h: Add TOKEN_NUMBERED_CHAR. - * troff/env.h (class environment): Remove declaration of ... - * troff/env.c (environment::make_numbered_char_node): Deleted. - * troff/node.c (make_numbered_node): Deleted. - (class numbered_glyph_node): Remove. - (troff_output_file::put_char_width, troff_output_file::put_char): - Handle numbered chars. - (troff_output_file::numbered_char): Removed. - (tfont::get_code_width): Removed. - (make_glyph_node): Don't search special fonts for numbered - characters. - * troff/node.h: Remove declaration of make_numbered_node. - * driver/input.c (do_file): Handle N command. - * driver/printer.h: Add declaration of ... - * driver/printer.c (printer::set_numbered_char): New function. - * dvi/tfmtodit.c (main): Generate unnamed entries. - * ps/devps/afmtodit: Likewise. - * xditview/xtotroff.c (MapFont): Likewise. - * xditview/libXdvi/parse.c (ParseInput): Grok N command. - - * tbl/main.c (process_format): If multiple widths are specified - for a column but all the widths are the same, don't give an error - message. - - * tbl/table.c (table::do_row): If the current row is all lines and - the stuff doesn't contains a line, mark the top of the row after - printing stuff before the row. If the current row is not all - lines and the stuff doesn't contain a line, don't unnecessarily - mark the top of the row before printing the stuff. - -Mon Oct 1 11:42:00 1990 James Clark (jjc at jclark) - - * troff/groff.h: Remove MAX_PATH. - * troff/input.c (open_file): Dynamically allocate space for the - path. - (open_mac_file, process_macro_file): Corresponding changes. - -Sun Sep 23 18:56:26 1990 James Clark (jjc at jclark) - - * troff/node.h (class output_file): Make copy_file pure. Add - vspace method ifdef COLUMN. Add is_printing method. - * troff/node.c: Add class printing_reg. Add class - real_output_file. Derive other output_file classes from - real_output_file; in these classes rename begin_page to - really_begin_page, print_line to really_print_line, copy_file to - really_copy_file, transparent_char to really_transparent_char. - Move output_file::flush to real_output_file. Add printing member - to class output_file. - * troff/div.h: Remove printing member from top_level_diversion. - Add vspace member function to class diversion ifdef COLUMN. Add - some declarations ifdef COLUMN. - * troff/div.c (top_level_diversion::copy_file, - top_level_diversion::transparent_output, - top_level_diversion::output): Don't test printing member before - output. - * troff/input.c: Handle initial variable_space_request ifdef - COLUMN. - * troff/Makefile: Add column.c but comment it out. Add -DCOLUMN - but comment it out. - -Sat Sep 22 11:32:22 1990 James Clark (jjc at jclark) - - * troff/div.c (diversion::need): Make any space forced. If we - sprung a trap, set truncated_space to minus the distance to the - trap and set needed_space to the amount that was needed. - (top_level_diversion::space): A forced space turns no_space_mode - off. - (class constant_vunits_reg): New class. - (init_div_requests): Implement number registers .trunc and .ne - using constant_vunits_reg. - (class truncated_space_reg): Deleted. - - * troff/div.h: Don't have a no_space_mode member in diversion. - Instead have it in top_level_diversion. - * troff/div.c (diversion::diversion): Don't initialize - no_space_mode. - (top_level_diversion::top_level_diversion): Initialize - no_space_mode. - (no_space, restore_spacing): Do nothing if curdiv != topdiv. - (macro_diversion::output): Don't clear no_space_mode. - - * troff/input.c (diverted_space_node::reread): Don't call - environment::do_break. In fill mode, act like a blank line. - (diverted_copy_file_node::reread): Don't call - environment::do_break. - - * troff/div.c (blank_line): New function. - * troff/div.h: Declare it. - * troff/input.c (process_input_stack): Call it. - - * troff/div.c (truncated_space_reg::get_string): New function. - (init_div_requests): Bind to .trunc. - (space_request, top_level_diversion::space, - top_level_diversion::output, macro_diversion::space, - macro_diversion::output): Update truncated_space. - (macro_diversion::output): Redo calculations when trap sprung. - (macro_diversion::output, macro_diversion::space): No need for - trap_flag. - - * troff/div.c (top_level_diversion::output): Set nl_reg_contents - after truncating post line spacing. - -Fri Sep 21 11:27:25 1990 James Clark (jjc at jclark) - - * ps/devps/prologue (MF, SF): Make them work even if setfont is - defined as a procedure rather than as an operator. - -Thu Sep 20 12:55:05 1990 James Clark (jjc at jclark) - - * troff/div.c (macro_diversion::space): Ignore no_space_mode. - -Wed Sep 19 10:54:37 1990 James Clark (jjc at jclark) - - * troff/div.c (top_level_diversion::output): Merge - output_file::print_line and output_file::end_of_line member - functions. - * troff/div.h (class output_file): - * troff/node.c (troff_output_file::print_line, - troff_output_file::end_of_line, output_file::end_of_line, - ascii_output_file::print_line, suppress_output_file::print_line): - Corresponding changes. - -Tue Sep 18 11:31:47 1990 James Clark (jjc at jclark) - - * troff/input.c (token::next): Don't give a warning for `\.'. - - * troff/env.c (environment::get_center_lines): New function. - (init_env_requests): Bind number register .ce to it. - * troff/env.h: Declare it. - * tbl/table.c (table::init_output): Define reset macro to restore - .ce. If center option not given, store .ce in SAVED_CENTER_REG. - Then do .ce 0. - (table::print): If center option not given, then imply center - option if SAVED_CENTER_REG > 0. - -Mon Sep 17 09:19:19 1990 James Clark (jjc at jclark) - - * ps/devps/Makefile: Remove T from FONTS. Remove TSymbol.ps and - Troff.ps from DOWNLOAD. - - * troff/Makefile: Change comment in DEFINES to avoid confusing - System V make. - - * ps/ps.c (ps_printer::do_exec): Allow newlines within PostScript - code. Don't try to catch errors with stopped. - (check_line_lengths): New function. - * ps/devps/prologue (EXEC): Deleted. - (EBEGIN, EEND): New procedures. - -Sun Sep 16 14:51:15 1990 James Clark (jjc at jclark) - - * troff/input.c: Include request.h before node.h. - * troff/node.c: Likewise. - * troff/env.c: Likewise. - * troff/div.c: Likewise. - * troff/node.h (class special_node): Store argument as a macro - rather than a char *. - * troff/node.c (special_node::special_node, special_node::copy): - Grok this. - (special_node::~special_node): Deleted. - (special_node::tprint): Deleted. - (special_node::tprint_start, special_node::tprint_end, - special_node::tprint_char): New functions. - (troff_output_file::special): Deleted. - (troff_output_file::start_special, troff_output_file::end_special, - troff_output_file::special_char): New functions. - * troff/input.c (special_node::tprint): New function. - (do_special): Use macro not char *. - (do_transparent_macro): Deleted. - (token::next): Don't call do_transparent_macro. - - * troff/input.c (token::next): Add 'Y' case. - (do_transparent_macro): New function. - * troff/node.c (troff_output_file::special): Handle newlines with - argument using new continuation convention. - * driver/input.c (get_string): Cope with continuation convention. - (do_file): Don't call skip_line after calling get_string(1). - * ps/ps.c (ps_printer::special, ps_printer::do_import, - ps_printer::do_def, ps_printer::do_exec): Cope with newlines in - arg. - * xditview/libXdvi/parse.c (ParseInput): Ignore lines starting - with +. - -Sat Sep 15 19:00:10 1990 James Clark (jjc at jclark) - - * troff/input.c (asciify): By default, illegal input characters - should return empty string. - - * troff/input.c (copy_file): Handle first page transition like title. - (token::next, process_input_stack): Grok COPY_FILE_REQUEST. - - * troff/input.c (token::next): Improve error message for EOF after - escape character. - (input_char_description): New function. - (get_char_for_escape_name): Use input_char_description. - (token::next): Warn about unrecognized escape sequences. - (warning_table): Add WARN_ESCAPE. - * troff/groff.h: Declare WARN_ESCAPE. Change WARN_TOTAL - accordingly. - - * troff/token.h: Remove declaration of process_input_stack. - - * troff/input.c: Remove declaration of init_hyphen_requests. - * troff/request.h: Correct spelling in declaration of same. - - * troff/input.c (token::next): Check whether escape_char is 0. - -Fri Sep 14 12:09:25 1990 James Clark (jjc at jclark) - - * groff.c (main, usage, help): Implement -P and -L options. - * groff.sh: Likewise. - - * troff/input.c (token::next): Use some gotos to avoid code - duplication. - - * troff/input.c (get_long_name, get_name, read_long_ecsape_name): - Avoid calling symbol::symbol if name empty. - -Thu Sep 13 06:21:45 1990 James Clark (jjc at jclark) - - * troff/input.c (init_input_requests): Make \n(.x return the major - version number and \n(.y return the minor version number. - * troff/Makefile: Construct file majorminor.c defining - major_version and minor_version automatically from ../VERSION. - - * troff/node.c (class glyph_node): Make operator new and operator - delete public. - (class ligature_node): Similarily. - - * troff/input.c (operator==(const macro &, const macro &)): New - function. - (non_interpreted_node::same): Use this. - (string_iterator::string_iterator): Make macro& argument const. - - * troff/input.c (input_iterator::get): New function. Don't make - asciify_macro or class non_interpreted_node friends of class - input_iterator. - (non_interpreted_node::interpret): Use input_iterator::get. - (asciify_macro): Likewise. - - * troff/input.c (~token_node, ~string_iterator, ~arg_list, - ~non_interpreted_node): Deleted. - * troff/node.c: (~suppress_output_file, ~ascii_output_file): - Deleted. - - * troff/symbol.h: Make all symbol member functions const. - - * lib/strtol.c: New file. - * lib/Makefile: Add strtol.c. - * Makefile: Define STRTOL as strtol.o to include strtol in - libgroff.a. - -Wed Sep 12 10:00:49 1990 James Clark (jjc at jclark) - - * pic/troff.c (troff_output::simple_circle): Divide by scale. - -Tue Sep 11 14:17:16 1990 James Clark (jjc at jclark) - - * troff/input.c (do_special): Use input_level. - - * troff/token.h (TOKEN_BACKSPACE): New token. - (token::backspace): New function. - * troff/input.c (token::description, token::next, token::process): - Grok TOKEN_BACKSPACE. - (do_special): Turn TOKEN_BACKSPACE back into \b. - - * troff/token.h (token::leader): New function. - * troff/input.c (do_special): Turn TOKEN_LEADER back into \001. - - * troff/input.c (do_special): Turn TOKEN_TAB back into \t. - - * troff/input.c (do_special): Use token::description in error - message. - -Mon Sep 10 11:06:27 1990 James Clark (jjc at jclark) - - * troff/input.c (decode_args): Combine quoted and - quote_input_level variables. Make it a for (;;) loop. - - * troff/input.c (get_char_for_escape_name): Check for \001 and \b. - - * troff/input.c (read_long_escape_name): The test for whether to - expand buffer was off by 1. - (read_string): Similarily. - -Fri Sep 7 11:45:50 1990 James Clark (jjc at jclark) - - * troff/input.c: Use `const int' rather than `static const int'. - - * troff/div.h (diversion::copy_file): Declare as pure virtual. - (macro_diversion::copy_file): New function. - * troff/node.h: New class diverted_copy_file_node. - * troff/node.c: Implement it. - * troff/input.c (copy_file): Use diversion::copy_file. Handle - first page transition by pushing a diverted_copy_file_node. - * troff/input.c (token::next, process_input_stack): Don't handle - COPY_FILE_REQUEST. - -Thu Sep 6 13:29:10 1990 James Clark (jjc at jclark) - - * ps/ps.c (flush_sbuf): Remember to add sbuf_kern when checking - whether space widths need adjusting. - - * troff/charinfo.h: Generalize translated_to_space to - special_translation so as to allow translation to \&. - * troff/input.c (translate): Allow translation to \&. - (charinfo::*): Corresponding changes. - * troff/node.c (make_node, node::add_char): Corresponding changes. - * troff/node.h (dummy_node::dummy_node): Allow optional first - argument. - - * lib/lib.h: Make codes 0200 to 0237 illegal input characters. - * troff/token.h: Remove TOKEN_TITLE. Remove token::title. Add - TOKEN_REQUEST. - * troff/input.c (token::next): Turn a TITLE_REQUEST into a - TOKEN_REQUEST with an argument of TITLE_REQUEST. - (token::process): Grok that. - * troff/input.c (copy_file): Handle first page transition like - title by pushing a COPY_FILE_REQUEST cookie. - (token::next, process_input_stack): Grok that. - * troff/node.h (output_file::copy_file): Add x and y arguments. - Make it non-pure. - * troff/div.c (top_level_diversion::copy_file): Supply them. - * troff/node.c (troff_output_file::copy_file): Add x and y - arguments; moveto specified position. Invalidate font_position - array after copying file. - (output_file::copy_file): New function. - (suppressed_output_file::copy_file, ascii_output::copy_file): - Removed. - * troff/input.c (transparent_file): New function. - (init_input_requests): Bind to "trf". - (token::next): Handle TRANSPARENT_FILE_REQUEST cookie. - (process_input_stack): Likewise. - - * troff/Makefile: Add ../lib/lib.h to GROFF_H. - - * troff/node.c (init_node_requests): New number registers .kern - pointing to global_kern_mode, and .lg pointing to - global_ligature_mode. - - * troff/node.c (ligature): Don't change it if we get a bad - integer. - - * troff/input.c (do_define_string): Don't strip tabs. - - * troff/input.c (asciify_macro): Make the string_iterator auto. - - * troff/node.c (init_font_requests): Rename to... - (init_node_requests): - * troff/node.h: Change declaration. - * troff/input.c (main): Change call. - - * troff/input.c (node::reread, diverted_space_node::reread): New - methods. - (process_input_stack): Call reread rather than - get_diverted_space_node. - * troff/node.c (node::get_diverted_space_node, - diverted_space_node::get_diverted_space_node): Removed. - * troff/node.h: Declare reread methods instead of - get_diverted_space_node methods. Make `n' member private. - * troff/input.c: (token::diverted_space): Removed. - * troff/token.h: Removed declaration. - - -Tue Sep 4 00:48:04 1990 James Clark (jjc at jclark) - - * eqn/script.c (script_box::compute_metrics): Don't let - SUP_RAISE_FORMAT become negative. - - * tbl/table.c (table::do_row): Entries that don't end in the - this row shouldn't make the row non-blank. - - * tbl/table.c (table::make_columns_equal): Only set the width of - columns which are marked as equal. - - * tbl/main.c (process_data): Before issuing excess data error, - if last character was a newline unget it; then get it again after - the error. Also include the contents of the entry in the message. - - * groff.c: New file. - * Makefile: Build groff from groff.c. Make it possible to use - either groff.sh or groff.c as groff. - * Makefile.bd: Similarily. - -Mon Sep 3 09:39:49 1990 James Clark (jjc at jclark) - - * groff.sh: Don't delay expansion of $@ in assignment to files. - Remove occurrences of \". - -Sun Sep 2 09:56:59 1990 James Clark (jjc at jclark) - - * all Makefiles: Simplify and rearrange. - - * Makefile: Handle fmod like malloc. - * lib/Makefile: Similarily. - * lib/fmod.c: Remove #ifdef NEED_FMOD. - - * Makefile: Rename OPTIMISE to OPTIMIZE. - - * groff.sh: Remove assignment to PATH. - * Makefile: Remove SHPATH variable. - * Makefile.bd: Similarily. - - * groff.sh: Add -V option to print the pipeline instead of - executing it. - -Fri Aug 31 00:56:46 1990 James Clark (jjc at jclark) - - * lib/font.c: Split off file searching into ... - * lib/fontfile.c: New file. - - * lib/strerror.c (strerror): Use `Error %d' for unknown errors. - -Thu Aug 30 13:13:55 1990 James Clark (jjc at jclark) - - * tbl/table.c (table::do_hspan): Delete assertion that e != 0. - Also change misleading comment. - (table::do_vspan): Change similarily misleading comment. - * tbl/main.c (process_data): A format row with an explicit `s' - uses up a data line, even if all the other columns are `_' or `='. - - * troff/input.c (token::description): Fix description of - TOKEN_DUMMY and TOKEN_EMPTY. - -Wed Aug 29 04:12:08 1990 James Clark (jjc at jclark) - - * groff.sh: Fix description of -Z in help message. - -Tue Aug 28 07:28:33 1990 James Clark (jjc at jclark) - - * pic/object.c (object_spec::make_object): Allow negative and zero - line thicknesses. - * pic/pic.y: Give linethick default value of -1.0. - * pic/troff.c (troff_output::troff_output): Initialize - last_line_thickness to BAD_THICKNESS. - (troff_output::finish_picture): Set thickness to BAD_THICKNESS. - (troff_output::line_thickness): Canonicalize negative thicknesses - to RELATIVE_THICKNESS. - * pic/tex.c (tex_output::set_pen_size): Silently map negative line - thicknesses to DEFAULT_PEN_SIZE. Canonicalize negative pen sizes - to -1.0. - (tex_output::start_picture): Set pen_size to -2.0. - - * ps/ps.c (ps_printer::set_line_thickness): If line_thickness is - 0, then use 0 linewidth. - (ps_printer::ps_printer): Initialize line_thickness to -1. - - * pic/troff.c (troff_output::simple_ellipse): Divide by scale. - - * ps/devps/symbolchars: Remove `or'. - * ps/tmac.ps: Implement \(or with .char. - - * ps/devps/symbolchars: Move most characters into textmap. - * ps/devps/textmap: Add names for troff bracket characters. Remove - ul, ru, br, bv. - - * ps/devps/TSymbol.ps: Removed. - * ps/devps/FontMakefile: Make S from Symbol not TSymbol. - * ps/tmac.ps: Do with .char what TSymbol did. - * ps/devps/download: Remove TSymbol. - - * ps/devps/T: Removed. - * ps/devps/Troff.ps: Removed. - * ps/devps/Troff.afm: Removed. - * ps/tmac.ps: Implement \(ru, \(ul, and \(br with .char. - * ps/devps/download: Remove Troff. - * ps/devps/FontMakefile: Remove T target. - * ps/devps/DESC-A4: Remove T from font list. - * ps/devps/DESC-letter: Likewise. - - * troff/input.c (macro_to_node): Rename to ... - (charinfo_to_node): Don't pass mac argument. Temporarily remove the - character's definition while processing it. - * troff/node.c (node::add_char, make_node): Change calls to - macro_to_node accordingly. - - * troff/input.c (token::next): Translate \_ to \(ul. - - * tty/devascii/R.proto: Add `|'. - * tty/devlatin1/R.proto: Likewise. - -Mon Aug 27 11:25:41 1990 James Clark (jjc at jclark) - - * man: Put the version number in all the man pages. - -Sun Aug 26 11:40:05 1990 James Clark (jjc at jclark) - - * Makefile.bd: New file. - * README.bd: New file. - - * VERSION: New file. - * lib/version.c: Removed. - * lib/Makefile: Create version.c from ../VERSION. Remove version.c - in clean target. - - * troff/input.c (main): Get hyphen_file from GROFF_HYPHEN - environment variable. - - * all Makefiles: Split install target into install.bin for - binaries, and install.nobin for everything else. - * Makefile: Add bindist target. - - * man/afmtodit.man: New file. - * man/Makefile: Add afmtodit.n to MAN1PAGES. - * ps/devps/Makefile: Add textmap to DEVICEFILES. Install afmtodit - in BINDIR. - * ps/Makefile: Pass BINDIR to make install in devps. - - * ps/ps.c (ps_printer::set_char): Do nothing if the character is - the space character. - - * ps/devps/FontMakefile: Rename symbol.afm to tsymbol.afm. - -Sat Aug 25 15:39:03 1990 James Clark (jjc at jclark) - - * ps/ps.c: Redo font downloading. - * ps/devps/download: New file. - * ps/devps/Makefile: Add download to DEVICEFILES. - * ps/devps/afmtodit: Remove -d option. - * ps/devps/FontMakefile: Don't use -d option with afmtodit. - * ps/devps/symbosl.ps: Add %%DocumentFonts comment. - * ps/devps/zapfdr.ps: Likewise. - * ps/devps/TSymbol.ps: Likewise. - -Fri Aug 24 20:10:30 1990 James Clark (jjc at jclark) - - * groff.sh: Initialize dev to ${GROFF_TYPESETTER:-@DEVICE@}. - -Thu Aug 23 10:03:47 1990 James Clark (jjc at yquem) - - * ps/ps.c (ps_output::include_file): If BROKEN_SPOOLER is defined, - then strip the first line if it starts with %. - * Makefile: Add a comment about this. - - * man/tfmtodit.man: New file. - * man/Makefile: Add tfmtodit.n to MAN1PAGES. - * dvi/Makefile: Install tfmtodit in BINDIR. - - * dvi/tfmtodit.c (usage): Mention -v option. - -Wed Aug 22 09:56:36 1990 James Clark (jjc at yquem) - - * troff/node.c (troff_output_file::end_of_line): Call do_motion. - * troff/node.c (troff_output_file::transparent_char): Don't call - flush_tbuf. - - * eqn: Add check_tabs method to most box classes. - * eqn/box.c (box::top_level): Call check_tabs. - - * eqn/script.c (script_box::output): Use \Z. - * eqn/limit.c (limit_box::output): Use \Z. - - * eqn/box.c (box::top_level): Use itoa. - -Tue Aug 21 09:29:28 1990 James Clark (jjc at yquem) - - * dvi/tmac.dvi: Add font translations for CR, C, TT. - * dvi/devdvi/Makefile: Don't make links to CW. - - * ps/tmac.ps: Add font translations for C, CW, CO, CX, CD, H, HO, - HX, HD. - * xditview/tmac.X: Likewise. - - * troff/node.c: Add font translation feature. - (get_font_translation): New function. - (symbol_fontno): Translate the font name. - (mount_font_no_translate): Rename to mount_font to this. - (mount_font): New function. - (font_family::make_definite): Call mount_font_no_translate instead - of mount_font. - (mount_style): Translate the font name. - (font_translate): New function. - (init_font_requests): Bind "ftr" to font_translate. - - * ps/devps/prologue (SN): New procedure that rounds a position to - the nearest (pixel + (.25,.25)). - (DL): Use SN to round endpoints. - - * lib/version.c: Changed version to 0.5. - -Sat Aug 18 04:43:21 1990 James Clark (jjc at yquem) - - * Makefile: Move definition of PAGE to the very beginning, so that - people are less likely to miss it. - -Fri Aug 17 02:15:11 1990 James Clark (jjc at yquem) - - * man/Makefile: Don't need to sed out @UPCASE_PROG_PREFIX@. - - * troff/env.c (environment::choose_breakpoint): Make `can't find - breakpoint' error a warning of type WARN_BREAK. Change message to - `can't break line'. - * troff/groff.h: Declare WARN_BREAK with code 4; change WARN_INPUT to - code 040000. - * troff/input.c: Add WARN_BREAK to warning_table. Include - WARN_BREAK in DEFAULT_WARNING_MASK. - - * tty/tmac.tty: Add definition of \(+-. - - * groff.sh: Remove `--' option to set command. - - * dvi/devdvi/texsy.map: Remove duplicate md entry. - - * ps/devps/eqnchar: Better definition of cdot using md. - * dvi/devdvi/eqnchar: Likewise. - * xditview/devX100/eqnchar: Likewise. - * xditview/devX75/eqnchar: Likewise. - * eqn/lex.c: Add definition of cdot. - -Thu Aug 16 09:33:57 1990 James Clark (jjc at yquem) - - * troff/input.c (get_optional_char): New function. - * troff/input.c (set_page_character): Use get_optional_char(), - rather than has_arg() and tok.get_char(1). - * troff/env.c (tab_character, leader_character, hyphen_char, - field_characters): Likewise. - (margin_character): Likewise. Also always delete the - margin_character_node. - - * troff/input.c (token::get_char): Use token::description. - - * troff/input.c (has_arg): Don't skip over tab and \}. - * troff/number.c (start_number): Give a warning if the number - starts with \} (WARN_RIGHT_BRACE) or tab (WARN_TAB). - -Wed Aug 15 10:04:37 1990 James Clark (jjc at yquem) - - * troff/input.c (empty_name_warning, non_empty_name_warning): New - functions. - (get_name, get_long_name): Use these. Rename `warn' argument to - `required'. - - * troff/node.c (get_fontno): Test that the symbol is not null. - - * troff/input.c (token::description): New function. - * troff/number.c (parse_term): Use token::description in `numeric - expression expected' message. - * troff/groff.h: Add WARN_MISSING. - * troff/number.c (start_number): New function. - * troff/number.c (get_vunits, get_hunits, get_number, get_integer, - get_incr_number): Use start_number(). - * troff/input.c (DEFAULT_WARNING_MASK): Enable WARN_NUMBER by - default. - * troff/input.c (get_name, get_long_name): Use WARN_MISSING. - * troff/reg.c (alter_format): Use WARN_MISSING. Also use - token::descripion. - * troff/input.c (token::get_char): Use WARN_MISSING. - * troff/input.c (token::delimiter): Use token::description. - * troff/env.c (environment_switch): Back out Aug 3 change. - * troff/input.c (has_arg): Skip over \}s and tabs but give a - warning. - * troff/token.h (token::tab): New function. - * troff/node.c (get_fontno): Use tok.skip() rather than has_arg(). - * troff/reg.c (alter_format): Likewise. - * troff/node.c (bold_font): Use has_arg() rather than tok.skip(). - -Tue Aug 14 10:11:21 1990 James Clark (jjc at yquem) - - * troff (most files): Redo warnings. Divide warnings into various - categories; warning() has an additional first argument indicating - the category it falls into. - * troff/input.c (main): -w now takes an argument. New option -W. - (enable_warning, disable_warning): New functions. - - * ps/devps/afmtodit: Add -a option to lie about the italic angle. - * ps/devps/FontMakefile: Pretend TI has an angle of 7. - -Mon Aug 13 10:11:16 1990 James Clark (jjc at yquem) - - * ps/devps/eqnchar: Better definitions of dotdot, vec, dyad, inf. - * xditview/devX100/eqnchar: Likewise. Remove definition of dot. - * xditview/devX75/eqnchar: Likewise. - * dvi/devdvi/eqnchar: Better definitions of vec, dyad, dotdot. - - * eqn/other.c: When bar or over applies to a single character - don't produce an overline_box or an underline_box. Instead produce - an accent_box or an underaccent_box, with the accent a line - whose width is accent_width. New classes underaccent_box, - overline_char_box and underline_char_box. - * eqn/box.h: Move overline_box, underline_box, accent_box class - declarations into eqn/other.c. Add declarations of - make_underline_box, make_overline_box, make_accent_box. - * eqn/eqn.y: Call make_overline_box, make_underline_box - make_accent_box instead of constructors. - * eqn/pbox.h, eqn/box.c: Add accent_width parameter. - - * eqn/other.c: Add accent_box::~accent_box. - * eqn/box.h: Declare it. - - * groff.sh: With -Tps, use eqn -D. - - * eqn/other.c (overline_box::output): Use \Z. If draw_flag use \D - rather than \l. - (underline_box::output): Similarily. - (accent_box::output): Use \Z. - - * xditview/tmac.X: Add definitions of ~ and ^ (so that they are a - bit smaller.) - -Sun Aug 12 09:41:15 1990 James Clark (jjc at yquem) - - * troff/div.c (top_level_diversion::transparent_output(unsigned - char)): Use asciify. - * troff/input.c (asciify): Don't make it static. - * troff/token.h (asciify): Declare it. - - * troff/input.c (get_name, get_long_name, token::get_char, - token::delimiter): Add an extra default argument which says - whether a warning should be printed. - * troff: Pass a non-zero argument to one of these rather than - printing a warning directly. - -Sat Aug 11 09:02:21 1990 James Clark (jjc at yquem) - - * troff: Consistently use symbol::is_null. - - * troff/dictionary.h: Move some inline functions into - dictionary.c. - - * troff/request.h: Move inline functions into input.c. - (request_or_macro::invoke): Make it pure. - - * troff/input.c, troff/reg.h: New class `constant_int_reg'. - * troff/input.c (init_input_requests): Use class constant_int_reg. - (class compatible_reg): Deleted. - * troff/div.c (init_div_requests): Use class constant_int_reg. - (class last_post_line_extra_space_reg): Deleted. - - * troff/env.c (tab_character): Don't change the tab character if - we get an invalid argument. - (hyphen_char): Similarily. - - * troff/reg.c (alter_format): Check that nm is not null. - - * Makefile, groff.sh: Make it possible to customize the commands - used for printing PostScript and dvi files. Also make it possible - to customize the path used by groff.sh. - - * eqn/eqn.y: Make `left' right associative. - -Fri Aug 10 18:20:39 1990 James Clark (jjc at yquem) - - * pic/pic.h: Added definition of M_SQRT2 for those systems that - don't have it. - - * pic/pic.h: Removed definition of INT_MAX. - - * troff/node.c (italic_corrected_node::vertical_extent): Omit - `return'. - - * troff/input.c (token::next): Handle \R like \n. - -Tue Aug 7 09:46:33 1990 James Clark (jjc at yquem) - - * ps/tmac.pc (PSPIC): Simplify. - - * troff/env.c (tab_stops::to_string): - * pic/pic.y (object_type_name): - * pic/troff.c (simple_output::line): - * pic/tex.c (tex_output::spline): - * pic/object.c (object_spec::make_object): - * tbl/main.c (process_data): Add cases to switch statements to - avoid cfront warnings. (Some of these are spurious, since the - switch already has a default case.) - - * ps/tmac.ps (PSPIC): Reformatted. Prefix all local names with - `ps-'. Don't test systat; instead check number of arguments to - ps-bb. - -Mon Aug 6 00:13:07 1990 James Clark (jjc at yquem) - - * macros/tmac.e: Do not decrease the page offset by 0.5i. - - * ps/ps.c (ps_printer::ps_printer): Use mktemp instead of tempnam. - Unlink the file as soon as we have opened it, so that we don't - have to bother with signal handlers. - (handler): Deleted. - (fatal_error_exit): Deleted. - (main): Don't call signal. - - * dvi/tfmtodit.c: Add -k option so that kerns with the skewchar - can be ignored. - * dvi/devdvi/Makefile: Use the -k option with S and MI. - - * pic/pic.y: If there is a label, or an nth construction before - the first `.' in the argument to `with', ignore it and generate a - warning. - * pic/lex.c (lex_warning): New function. - - * tbl/table.c (table::init_output): In section keep and release - macro, use 0 indent when diverting and the correct indent when - rereading. - - * troff/input.c (interpolate_number_format): Do not interpolate - anything if the number register is not defined. - - * tbl/main.c (process_data): Don't add entry when col >= ncolumns. - -Sat Aug 4 08:12:05 1990 James Clark (jjc at yquem) - - * ps/devps/prologue (PICTURE): Set components of graphics state to - their default values. - - * ps/devps/text.enc: Add trademark - * ps/devps/textmap: Add names for club, spade, heart, diamond, - carriagereturn, suchthat. Use Upsilon1 rather than Upsilon. - * ps/devps/symbolchars: Add names for summation and product. - - * dvi/devdvi/texsy.map: Add names for club, spade, heart, diamond, - suchthat. Add pp. Add upper-case letters. - - * xditview/libXdvi/DviChar.c: Add names for club, spade, heart, - diamond, carriagereturn, suchthat. Use Upsilon1 rather than - Upsilon. - - * dvi/devdvi/texsy.map: Rename lA (left angle bracket) to la, and - rA (right angle bracket) to ra. Introduce names for double-headed - arrows and double-barred arrows: <>, va, lA, rA, hA, uA, dA, vA. - * ps/devps/textmap: Likewise for ps device. - * xditview/libXdvi/DviChar.c: Likewise for X100 and X75 devices. - * tty/devascii/R.proto: Rename lA to la and rA to ra. - * tty/devascii/R.proto: Likewise. - * tty/tmac.tty: Provide definitions for \(<>, \(lA, \(rA, \(hA, - \(uA, \(dA. - * eqn/delim.c: In delim_table, rename \(lA to \(la and \(rA to \(ra. - - * xditview/tmac.X: Add definitions for \(fi \(fl \(ff \(Fi \(Fl. - - * eqn/lex.c: Added definitions of `approx', `grad' and `del' to - def_table. - -Fri Aug 3 09:59:27 1990 James Clark (jjc at yquem) - - * troff/div.c (when_request): Use symbol::is_null rather than - has_arg to determine whether we have an argument. - (change_trap): Remove the trap if we get an invalid number. Give - an error if we don't get at least the macro name. - (diversion_trap): Remove trap if we get an invalid name or number. - - * troff/env.c (environment_switch): Pop if we get an invalid - symbol or numeric expression. - - * troff/input.c (do_define_macro): If EOF is encoutered while - defining the macro, do tok.next() before returning. - - * troff/token.h (has_arg): Move definition from here, to ... - * troff/input.c (has_arg): ... here - - * troff/env.c (space_size): Do nothing if we get an invalid argument. - * troff/input.c (shift): Likewise. - - * pic/lex.c (get_token_after_dot): Accept `.center' as a synonym - for `.c'. - - * pic/troff.c (troff_output::start_picture): Comment out calls to - `..'. - - * eqn/main.c (do_file): Subtract 1 from current_lineno if - interpret_lf_args succeeds. - - * eqn/main.c (do_file): Don't recognize delimiter if preceded by - \\. This avoids problems with \$N. - - * groff.sh: Pass -C to preprocessors. - - * lib/lf.c (interpret_lf_args): Be more flexible. - - * tbl/main.c (main): Add -C option. - (table_input::get): Do not recognize TE if followed by character - other than a space or newline unless -C option given. - (process_input_file): Likewise for lf, TS. - (process_data): Likewise for lf in text blocks. - - * eqn/main.c (main): Add -C option. - (do_file): Don't recognize EQ, EN or lf if followed by character - other than space or newline unless -C option given. - * eqn/lex.c (file_input::read_line): Similarily. - * eqn/eqn.h: Declare compatible_flag. - - * etc/soelim.c (main): Add -C option. - (interpret_lf_args): Use version in libgroff. - (do_file): - - * pic/main.c (main): Add -C option, which sets compatible_flag. - (top_input::get), (top_input::peek): If -C option not given, - do not recognize .PS/.PE/.PF/.lf if followed by a character - other than space or newline. - * pic/lex.c (file_input::read_line): Similarily. - * pic/pic.h: Add declaration of compatible_flag. - -Thu Aug 2 11:11:27 1990 James Clark (jjc at yquem) - - * ps/tmac.ps (PSPIC): Avoid use of `echo -n'. - - * troff/node.c, troff/node.h: Add `asciify' methods to classes - derived from node. New class space_char_hmotion_node. - * troff/input.c (asciify_macro): New function. - * troff/input.c (init_input_requests): New request `asciify' bound - to asciify_macro. - * macros/mm.diff: New file. - * Makefile: In install.mm target use `patch' to apply - macros/mm.diff. - - * troff/input.c (macro::print_size): Just print the size in bytes. - - * troff/div.c (return_request): Correct the argument - interpretation. - -Wed Aug 1 12:38:36 1990 James Clark (jjc at yquem) - - * troff/node.h (class composite_node): Add sz member. - * troff/node.c (composite_node::size): Return sz. - * troff/input.c (macro_to_node): Use the initial size in the - environment as the size of the composite_node. - - * troff/node.c (node::zero_width_tprint): Provide a reasonable - default. - -Tue Jul 31 10:07:10 1990 James Clark (jjc at yquem) - - * troff/div.c (change_trap): If we get a bad number expression, - do nothing. - -Mon Jul 30 10:30:49 1990 James Clark (jjc at yquem) - - * lib/matherr.c (matherr): Define this only if math.h defines - TLOSS. - -Sun Jul 29 10:34:27 1990 James Clark (jjc at yquem) - - * troff/div.c (macro_diversion::distance_to_next_trap): If there - no diversion trap return vunits(INT_MAX - vresolution). - -Sat Jul 28 14:28:14 1990 James Clark (jjc at yquem) - - * troff/input.c (do_zero_width): New implementation that doesn't - use a temporary environment. Use instead: - (token::add_to_node_list): New function. - * troff/env.c (environment::get_prev_char_height), - (environment::get_prev_char_height), - (environment::get_prev_char_skew): New functions. - (environment::get_prev_char): New function. - (environment::get_prev_char_width): Change to use get_prev_char. - (init_env_request): Implement new registers .cht, .cdp, .csk. - * eqn/sqrt.c (sqrt_box::output): Don't rely upon the argument to - \Z being processed in a separate environment. - -Fri Jul 27 10:21:25 1990 James Clark (jjc at yquem) - - * tbl/table.c: Removed TABLE_BOTTOM_REG. - - * tbl/table.c (table::init_output): In the section release macro, - give a warning message if the section won't fit on one page. - - * tbl/table.c (table::do_top): Emit table keep only if table is - boxed. - (table::do_bottom): Likewise for table release. - (table::table), (table::add_vertical_rule): Remove reference to - keep member. - * tbl/table.h: Remove keep member. - - * tbl/table.c: New register SUPPRESS_BOTTOM_REG. In - SECTION_RELEASE_MACRO, if there's not enough space before the next - trap to output the diversion, call T# ourselves, set - SUPPRESS_BOTTOM_REG to 1, spring the trap, then set - SUPPRESS_BOTTOM_REG back to 0. In T#, do nothing if - SUPPRESS_BOTTOM_REG is non-zero. In T#, always mark the current - vertical position and return to it before turning traps on again. - -Thu Jul 26 02:54:32 1990 James Clark (jjc at yquem) - - * troff/node.c, troff/node.h: In classes derived from node, - replace prev_char_width method by last_char_node method. - * troff/env.c (environment::get_prev_char_width): Use - node::last_char_node rather than node::get_prev_char_width. - - * Makefile: Added comment about -fno-inline on 68030-based - Apollos. - - * troff/reg.c (number_format_to_ascii), eqn/delim.c (DELIM_TABLE_SIZE), - tty/tty.c (tty_font::load_tty_font), dvi/tfmtodit.c (main): Cast - expressions using sizeof to int. - * dvi/dvi.c (dvi_font::handle_x_command): Avoid long->int warnings. - - * macros/tmac.e (TS): Don't move @f back past the current - position. - -Wed Jul 25 09:11:08 1990 James Clark (jjc at yquem) - - * ps/ps.c (main): Buffer stderr. - * dvi/dvi.c (main): Likewise. - * tty/tty.c (main): Likewise. - - * ps/ps.c (ps_printer::do_import): Improve error handling. - - * troff/input.c (abort_request): Use asciify. - - * driver/printer.h (printer::draw), driver/printer.c (printer::draw), - ps/ps.c (ps_printer::draw), dvi/dvi.c (dvi_printer::draw): Make - type of first argument int rather than char. This works around a - bug on the 68030 based Apollo using g++ 1.37.1. - - * tbl/table.h (class table): Add `keep' member. - * tbl/table.c (table::table): Initialize `keep'. - (table::add_vertical_rule): Set `keep' to 1. - (table::do_top): Only emit table keep macro is `keep' is non-zero. - (table::do_bottom): Likewise for table release macro. - (table::do_row): Emit section keep macro even if the row is 0. - -Tue Jul 24 08:35:07 1990 James Clark (jjc at yquem) - - * macros/tmac.e (@C): Preserve the font family across the change - in environments. - -Mon Jul 23 10:15:23 1990 James Clark (jjc at yquem) - - * lib/font.c: Initialize font::hor and font::vert to 1. - (font::load_desc): Check the values of font::hor and font::vert. - - * lib/lib.h: Added definition of INT_DIGITS. Fix it so that it can - be included in a C compilation. - (iftoa): Use INT_DIGITS. Include lib.h. - (itoa): Likewise. - (as_string): Likewise. - * tbl/table.c: Removed definition of INT_DIGITS. - * eqn/box.c (box::top_level): Use INT_DIGITS + 1 instead of 12. - * troff/input.c (input_input_requests): Likewise. - * ps/ps.c (make_encoding_name): Likewise. - (ps_printer::set_style): Likewise. - (ps_output::put_number): Use 1 + INT_DIGITS + 1 instead of 12. - - * tty/devascii/R.proto: Map fm onto '. - * tty/devlatin1/R.proto: Likewise. - -Sat Jul 21 12:45:07 1990 James Clark (jjc at yquem) - - * tbl/table.c: Use ' instead of DELIMITER_CHAR in places where the - argument to \w is at a different input level. - - * tbl/table.c (table::init_output): Define a new macro - REPEATED_VPT_MACRO, like vpt but if in a diversion also - transparently outputs itself. - (table::define_bottom_macro): Use REPEATED_VPT_MACRO instead of - vpt. - (table::do_row): Likewise. - - * tbl/table.c (vertical_rule::print): Prefix the .sp -1 line with - TRANSPARENT_STRING_NAME. - - * tbl/table.c (table::init_output): In the table release macro - print an error message and don't produce any output if after - issuing the need request the table still will not fit. Also - remove the diversion after bringing it back. - - * tbl/table.c (table::init_output): Define a new macro - REPEATED_MARK_MACRO, like mk but if in a diversion also - transparently outputs itself. - (table::do_row): Mark row_top_reg using REPEATED_MARK_MACRO. This - is necessary because .TH might not call .T#. - (table::do_top): Likewise TOP_REG. - (table::define_bottom_macro): If TOP_REG is no longer valid, use - #T - DOUBLE_LINE_SEP rather than #T. This is necessary because the - table header might contain just the two top rules. - -Fri Jul 20 10:51:42 1990 James Clark (jjc at yquem) - - * troff/div.c: Implement new request `ptr' to print all traps. - - * troff/env.c (init_env_requests): Implement `.tabs' reg with - init_string_env_reg. - * troff/env.c (class tab_reg): Deleted. - -Thu Jul 19 12:07:16 1990 James Clark (jjc at yquem) - - * troff/div.c: New number register .pn returns the number of the - next page as set by the pn request. - - * macros/tmac.an: Redid headers and footers. Number each manual - entry starting from 1 unless \nC is > 0, like Sun. Added an - optional 5th argument to .TH which specifies the manual name and - appears in the center of the header. Understand the X, P and D - registers like Sun. - -Wed Jul 18 10:23:31 1990 James Clark (jjc at yquem) - - * troff/env.c (init_env_requests): New number register `.lt' to - return the title length. - - * troff/node.h (class transparent_dummy_node): New class. - * troff/node.c (class transparent_dummy_node): Provide member - functions. - * troff/env.c (interrupt): Add a transparent_dummy_node, rather - than a dummy_node. - - * troff/input.c (token::next): New escape sequence \). - * troff/input.c (get_copy): Recognize \) in copy mode. - - * troff/input.c (input_stack::clear): New function. - * troff/input.c (exit_request): Use input_stack::clear. - - * troff/token.h: Removed TOKEN_NO_PRINT_CHAR. - * troff/input.c (token::process): Removed case TOKEN_NO_PRINT_CHAR. - - * troff/env.c: Move set_page_character to input.c. Move - page_character to input.c also. - * troff/env.c (title): Split off the reading of the parts of the - title into read_title_parts. - * troff/input.c (read_title_parts): New function. Check the - input_level when testing whether a token matches the delimiter. - - * troff/input.c (exit_request): New function. - * troff/input.c (init_input_requests): Bind ex request to - exit_request rather than exit_groff. - - * troff/input.c (exit_groff): Call tok.next() before - process_input_stack(). - -Mon Jul 16 09:47:23 1990 James Clark (jjc at yquem) - - * troff/env.c: ifdef widow control support on WIDOW_CONTROL. - * troff/env.h: ditto. - * troff/input.c: ditto. - - * troff/env.c (environment::is_empty): Test pending_lines. - - * troff/env.c (environment::have_pending_lines): Removed. - - * troff/input.c: Add request to flush pending lines from the - environment. - - * troff/env.c, troff/env.h: Add automatic widow control feature. - - * troff/input.c (exit_groff): Do process_input_stack() after - do_break() but before setting exit_flag to 2. - - * troff/input.c: Remove FLUSH_PENDING_LINES and - TOKEN_FLUSH_PENDING_LINES. Instead, flush pending lines from - environment after END_TRAP token seen, but only if there aren't - any more traps still unfinished. - * troff/token.h: Remove TOKEN_FLUSH_PENDING_LINES. - -Sun Jul 15 10:50:08 1990 James Clark (jjc at yquem) - - * troff/env.c: Rename the `retain_size' member of class - pending_output_line to `no_fill'. - - * troff/env.c (title): When the line is output, make the - retain_size argument !fill. - - * troff/node.h: Add `hyphenated' member to struct breakpoint. - * troff/node.c (space_node::get_breakpoints), - (dbreak_node::get_breakpoints): Fill this in. - * troff/env.c: Allow specification of maximum number of - consecutive hyphenated lines. - - * troff/env.c (environment::is_empty): Add test for !current_tab. - -Sat Jul 14 11:23:01 1990 James Clark (jjc at yquem) - - * troff/env.c (environment::hyphenate_line): Don't completely give - up if the word is not to be hyphenated; continue so that breaks - can be made at break_char_node's. - - * lib/lib.h: Only define INT_MAX if it's not already defined; - undef INT_MIN if it's already defined. - - * Makefile: Make it easy to define CFRONT_ANSI_BUG. - - * lib/lib.h: If CFRONT_ANSI_BUG is defined, cast INT_MIN to long. - This works around a bug in AT&T C++ 2.0 used with an ANSI C - compiler. - - * macros/tmac.an (an-header): Set no-space mode. - - * macros/tmac.an (TH): Start a new page if necessary. - - * Started using ChangeLog at version 0.4. - Local Variables: version-control: never coding: latin-1 diff --git a/contrib/groff/ChangeLog.115 b/contrib/groff/ChangeLog.115 new file mode 100644 index 000000000000..1d994f3526c7 --- /dev/null +++ b/contrib/groff/ChangeLog.115 @@ -0,0 +1,6147 @@ + +Version 1.15 released +===================== + +1999-12-28 Werner LEMBERG + + * NEWS, VERSION: Changed to 1.15 + +1999-12-27 Paul Eggert + + * nroff/nroff.man: -S is safer, not safe. + + * groff/groff.cc (main): Use `safer', not `safe', in variable + names. This does not change the behavior. + + * troff/input.cc (main): Likewise. + + * nroff/nroff.sh: Likewise. + + * troff/input.cc (prepend_string): New function. + (main): Prepend -msafer, so that we check macro libraries for + safety. + + * PROBLEMS: Report problem with Sun C++ 5.0 and 5.1. + +Version 1.14 released +===================== + +1999-12-26 Werner LEMBERG + + * NEWS, VERSION: Changed to 1.14. + +1999-12-24 Werner LEMBERG + + * refer/refer.cc: Fixing the last fix. + +Version 1.13 released +===================== + +1999-12-23 Werner LEMBERG + + * tmac/tmac.an: A typo (`.if' instead of `.ie') made the page + number disappear. + + * NEWS: Updated. + + * tmac/tmac.safer: Forgot to remove `so' from the `rm' request. + + * VERSION: Changed to 1.13 -- to be compliant with the Adobe 3.0 + document conventions, the version number must be a real. + +Version 1.12.1 released +======================= + +1999-12-22 Werner LEMBERG + + * VERSION: Changed to 1.12.1. + +1999-12-22 Alan Rooks + + * refer/refer.cc (do_file): Slight modification to satisfy the + `Standard system CC - C++ Compilation System 3.1 03/03/99' on SCO + UnixWare 7.1. + +1999-12-20 Werner LEMBERG + + * changed prep.ai.mit.edu -> ftp.gnu.org; updated copyright + notices. + + * tmac/tmac.safer, tmac/groff_msafer.man: Remove `so' (again) from + list of unsafe requests. + + * pic/pic.man: Fixed a typo. + + * man/groff_out.man: Fixed a typo. + +1999-12-18 Werner LEMBERG + + * Makefile.in: Doc fixes. + +1999-12-17 Fabrizio Polacco + + * groff/groff.cc: Missing `U' option added to getopt(). + + * troff/troff.man: Missing `U' option added to synopsis. + +Version 1.12 released +===================== + +1999-12-14 Werner LEMBERG + + * troff/input.cc (usage), groff/groff.cc (synopsis): Added -U flag + to the synopsis. + + * nroff/nroff.sh, nroff/nroff.man: Replaced `secure', `unsecure' + with the more appropriate terms `safer' and `unsafe'. + + * libgroff/strerror.c, aclocal.m4, configure.in: Added checks for + sys_nerr and sys_errlist[]. + + * pic/pic.h, aclocal.m4, configure.in: Added check for hypot(). + + * pic/pic.y, pic/pic.cc: Added check for fmod(). + +1999-12-13 Werner LEMBERG + + * VERSION: Changed to 1.12. + + Here some patches from various sources; most of them taken from + the Debian distribution. + + * tmac/groff_mdoc.man, tmac/groff_mdoc.samples.man, + tmac/Makefile.sub: New files copied directly from the NetBSD + distribution. Probably, some additional adaptation later on is + necessary... + + * tmac/tmac.safer, tmac/groff_msafer.man: Added `so' to the list + of unsafe requests. + + * groff/groff.cc, groff/groff.man, nroff/nroff.sh, + nroff/nroff.man, pic/main.cc, pic/pic.man, troff/input.cc, + troff/troff.man: Added option `-U' for unsafe mode. Safe mode + (`-S') is now the default. + + * README, NEWS: Updated. + +1999-12-09 Werner LEMBERG + + * doc/groff.texinfo: Regenerated nodes and menus with emacs. + + * doc/Makefile (clean): Added cleaning commands for groff.texinfo. + +1999-12-06 Werner LEMBERG + + * configure.in: Removed AC_PREFIX_PROGRAM since it causes more + grief than relief today. Additionally, it is against the GNU + coding standards. + + * configure: Recreated. + +1999-12-05 Werner LEMBERG + + * configure.in: Added GROFF_LIBM. + + * configure: Recreated. + + * aclocal.m4 (GROFF_LIBM): New function which tests whether -lm is + necessary. + + * Makefile.in: Added definition of $(LIBM). + + * Makefile.comm (LIBM): Removed. + + * pfbtops/Makefile.sub: On AIX, -lm is needed also. + +1999-12-03 Gaius Mulley + + * doc/Makefile: Added rule for generation pic.html. + + (clean): Files produced by grohtml will be removed also. + + * doc/pic.ms: Small fix. + + * tmac/tmac.html: Fixed suppression of headers. + +1999-11-16 Gaius Mulley + + * tmac/tmac.html: Fixing horizontal arrows. + + Turning off hyphenation. + + * tmac/tmac.an: Improved support for grohtml; better indentation, + no footers/headers. + +1999-10-31 Gaius Mulley + + * tmac/tmac.arkup: Added CDFTP macro + + * tmac/tmac.html: All headers are turned off for ms, me, and mm + macros. + + * tmac/troffrc: Some additions for HTML stuff. + +1999-10-06 Gaius Mulley + + * tmac/tmac.html: Small changes. + +1999-09-26 Werner LEMBERG + + * doc/groff.texinfo: Minor fixes. + +1999-09-26 Gaius Mulley + + * devhtml/TR: Changed spacewidth to 3. + + * tmac/Makefile.sub (NORMALFILES): Added tmac.arkup. + + * tmac/tmac.html: Moved markup macros to tmap.arkup. + + * tmac/tmac.arkup: New file. + + * grohtml/ChangeLog: New file. + +1999-09-16 Werner LEMBERG + + * doc/groff.texinfo (Common Features): Added Copying chapter. + Changed format to @smallbook. + +1999-09-15 Werner LEMBERG + + * NEWS: Added info about groff.texinfo. + + * doc/groff.texinfo: Will now compile (using texi2dvi) without + warning messages. + +1999-09-14 Werner LEMBERG + + * groff/groff.man: More updates. + +1999-09-13 Werner LEMBERG + + * doc/groff.texinfo: New file. This manual is still very + rudimentary. It has been originally contributed by Trent + A. Fisher with first corrections and + additions by me. + + * INSTALL: Added information about the `doc' subdir + + * troff/troff.man: Minor fixes. + + * groff/groff.man: Added missing `-L arg' to SYNOPSIS section; + reordered options. + + * troff/input.cc (usage): Added missing `-ffam' to usage message. + + * Makefile.in (dist): groff-$(version).tar.gz must be removed + also, otherwise it is included itself in another call of `make + dist'. + + * groff/groff.cc (synopsis): Removed superfluous space. + + * PROJECTS, PROBLEMS, NEWS: Updated. + + * VERSION: Updated to 1.12beta. + + * BUG-REPORT: Some cosmetic fixes. Corrected email address. + + * README: Updated: Included documentation about CVS repository, + mailing lists, and daily snapshots. + + * tmac/Makefile.sub: Fixed $(tmap_wrap) finally. + +1999-09-12 Bjarni Ingi Gislason + + * tmac/tmac.an: If the tag didn't fit into the space that the + macro `TP' specifies, the rest of the tag went into the space for + the next line. + +1999-09-12 Jeffrey Copeland + + * grolj4/lj4.cc: Added duplex printing (option `-d'). + + * grolj4/grolj4.man: Document duplex printing. + +1999-09-12 Werner LEMBERG + + * doc/Makefile (pic.ps): Fixed rule which caused problems with + non-GNUish sed programs. + + * tmac/doc-syms: Removed extra space from -iso8802-3 macro + definition. + + * configure.in (LIBS): Added `-lc' + + * Makefile.comm (.man.n): Added substitution for @TMAC_AN_PREFIX@. + + * pic/tex.cc (solid_arc): Casting M_PI to double. + + * libgroff/putenv.c (putenv): Changed function header to ANSI C. + + * groff/groff.man, tmac/Makefile.sub (MAN7), tmac/groff_msafer.man + (new file), tmac/msafer.man (deleted), tmac/groff_me.man (new + file), tmac/me.man (deleted): {me,msafer} -> groff_{me,msafer}. + + * groff/groff_man.man: New file. This manual page was originally + written for the Debian GNU/Linux system by Susan G. Kleinmann + . + + * eqn/list.cc (list_box::compute_metrics, + list_box::compute_sublist_width): Removed variable declaration to + avoid shadowing warnings. + + * grops/psrm.cc (resource_manager::process_file): Ditto. + + * tfmtodit/tfmtodit.cc (main): Ditto. + + * libgroff/font.cc (font::load_desc): Renamed auxiliary variable + to avoid shadowing warnings. + + * tbl/table.cc (block_entry::do_divert, table::do_row): Renamed + shadowing loop variable. + + * groff/groff.man, troff/troff.man: Added doc about grohtml. + +1999-09-12 Gaius Mulley + + New grohtml frontend to convert groff input to html. + + * Makefile.in (CCPROGDIRS, DEVDIRS): Added html device. + + * tmac/Makefile.sub (NORMALFILES): Added tmac.html. + + * tmac/eqnrc: Added html device. + + * tmac/tmac.html: New file. + + * eqn/main.cc (do_file, inline_equation), pic/troff.cc + (troff_output::start_picture, troff_output::finish_picture), + tbl/main.cc (process_input_file): + Surrounded output with `graphics_start' and `graphics_end' so that + the html driver can identify non-text portions. + + * grodvi/dvi.cc (dvi_printer::set_char), grolj4/lj4.cc + (lj4_printer::set_char), grops/ps.cc (ps_printer::set_char), + grotty/tty.ps (tty_printer::set_char): Additional parameter + `name'. + + * include/printer.h: Class printer: New function + set_char_and_width; new variables (is_char_named, is_named_set, + named_command, named_char_s, named_char_n) to hold information + about named characters -- needed by the html driver. + + * libdriver/printer.cc (printer::set_ascii_char, + printer::set_special_char): Use set_char_and_width. + + * devhtml/*: New device files for html driver. + + * grohtml/*: New driver grohtml. + +1999-09-11 Wilfredo Sanchez + + * tmac/doc-common, tmac/tmac.an: Removed the word `UNIX' in + default strings. + +1999-09-11 Luke Mewburn + + * libgroff/string.cc (search): Small fix to test against NULL + pointer. + +1999-09-11 Jeff Conrad + + * troff/node.cc (copy): The characters in a bracket escape (e.g., + \b'abc') were stacked in reverse order when processed in a + diversion. + + * troff/node.h: Added `*last' to struct `node' to make the above + fix work. + + * troff/input.cc (read_draw_node), libdriver/input.cc (do_file): + The default scale for the 'f' and 't' graphics functions were 'm' + rather than 'u' (i.e., no scaling). + +1999-09-11 Peter Miller + + * groff/groff.cc (main), groff.man, soelim/soelim.cc (main, + do_file), soelim/soelim.man: Added `-I file' option to soelim, + defining include paths. + + * soelim/soelim.cc (include_path_append): New function. + +1999-09-11 Larry Jones + + * tbl/main.cc (process_options): Unix (at least Documenter's + Workbench) tbl allows arbitrary non-alpha characters between + options. + +1999-09-11 Paul Eggert + + Y2k fixes. Don't assume that the current year precedes 2000. + + * doc/meref.me: Add \n(y2, \n(y4. + + * tmac/doc-common (Yr): New number register. + (Dd): Don't assume current year precedes 2000. + + * tmac/tmac.e (td): Likewise. + (y2, y4): New number registers. + + * pic/pic.man: Update reference for pic paper to May, 1991 + version. + +1999-09-11 Werner LEMBERG + + * tmac/Makefile.sub (install_data, stamp-wrap, uninstall_sub): + Removed quotation marks which prevented correct expansion of + $(tmac_wrap). + + * devlj4/Makefile.sub (LJ4RES): Fixed value (600 instead of 300). + +1999-09-10 Werner LEMBERG + + * Makefile.sub (DISTCLEANFILES): Added `config.log' and + `config.cache'. + + * Removed configure.old. + +1999-08-31 Werner LEMBERG + + * VERSION: Updated to 1.11.1 + +1999-05-27 Werner LEMBERG + + * doc/Makefile: changed `.PS' postfix to `.ps' for consistency. + + * tmac/Makefile.sub (install_data, stamp-wrap, uninstall_sub): + added quotations around $(tmac_wrap) to avoid syntax error if + variable is empty. + + * configure: Newly generated using autoconf 2.13. + + * Makefile.in (LDFLAGS): Set variable to @LDFLAGS@. + +Fri Aug 15 08:51:47 1997 Eric S. Raymond + + * README, PROJECTS, NEWS, INSTALL, VERSION, + doc/Makefile. doc/pic.ms, groff/groff.man: + Prepare for 1.11 release. No code changes. + Documentation for pic added (doc/pic.ms). + +Sun Nov 26 11:45:13 1995 James Clark + + * Version 1.10 released. + +Fri Nov 24 09:56:16 1995 James Clark + + * afmtodit/afmtodit.pl: Avoid comment on first line. + +Mon Nov 20 11:13:49 1995 James Clark + + * aclocal.m4 (GROFF_INSTALL_SH): New macro. + * configure.in: Call it. + + * Makefile.sub (configure): Depends on aclocal.m4 not acgroff.m4. + (distfiles): Doesn't depend on config.log or config.cache. + +Sun Oct 1 08:45:36 1995 James Clark + + * grog/grog.sh: Use print "" rather than print in END rule. + +Wed Aug 23 13:30:52 1995 James Clark + + * tbl/main.cc (process_data): Don't give error for excess data + entries that are comments. + +Fri Jul 28 11:00:27 1995 James Clark + + * tbl/main.cc (process_data): Fix case where new for-scope rules + silently change meaning of code. + +Tue Jul 4 23:39:51 1995 James Clark + + * troff/env.cc (hyphenate): Loop over all consecutive sequences + of non-zero hyphenation codes. + +Sat Jul 1 00:42:15 1995 James Clark + + * aclocal.m4 (GROFF_POSIX): Use conflicting declaration technique. + +Thu Jun 29 13:58:36 1995 James Clark + + * tmac/tmac.e (ip): Divert the tag so as to freeze the spaces. + +Tue Jun 27 12:30:16 1995 James Clark + + * tmac/tmac.andoc: Make it work in compatibility mode. + + * refer/token.h (token_info::is_range_sep): New function. + * refer/token.cc (init_special_chars): Make \(en a RANGE_SEP. + * refer/ref.cc (reference::output): More sophisticated check for + multiple pages. + + * devps/prologue.ps (MANUAL): New procedure. + * grops/ps.cc (main): New -m option. + (usage): Include -m. + (ps_printer::~ps_printer): Implement -m. + + * aclocal.m4 (GROFF_G): New macro. + * configure.in: Call it. + * Makefile.in (g): Provided by configure. + + * hpftodit/hpftodit.cc (basename): Rename to xbasename. + + * tmac/tmac.tty: Disable warning about bad fonts. Remove font + translations. + + * Makefile.in (tmacpath): Don't include /usr/lib/tmac. + (tmac_m, tmac_s): Deleted. + (sys_tmac_prefix, tmac_wrap, tmac_prefix, tmac_an_prefix, + tmac_s_prefix): New variables. + (MDEFINES): Change accordingly. + * Makefile.comm (.man.n): Use new TMAC_* variables. + * configure.in (GROFF_TMAC): Call. + * aclocal.m4 (GROFF_TMAC): Define. + * tmac/Makefile.sub (stamp_wrap): New target. + (install_data, uninstall_sub): Handle macro wrapping. + +Mon Jun 26 14:54:39 1995 James Clark + + * tbl/main.cc (main): Ignore -T option. + +Thu Jun 22 09:08:06 1995 James Clark + + * devlj4/generate/special.map: Add definition of \(nb. + + * tmac/tmac.dvi: Add definition of \(nb. + + * troff/dictionary.c (dictionary::dictionary): association::v gets + initialized by association::association. + + * tmac/Makefile.sub: Avoid using temporary files when installing. + + * troff/env.cc (environment::set_font): Make bad font number a + warning. + + * Makefile.in (fontpath): Remove $(prefix)/lib/font from fontpath. + + * Makefile.in (datadir): Use share rather than lib. + + * groff/groff.cc (basename): Rename to xbasename. + +Wed Jun 21 16:59:46 1995 James Clark + + * Makefile (CCLIBS): Don't use. + * Makefile.ccpg: Likewise. + + * acgroff.m4: Rename to... + * aclocal.m4: Modify extensively for autoconf 2. + * configure.in: Likewise. + * Makefile.in: Likewise. + + * groff/pipeline.c (const): Declare as empty if __STDC__ not + defined. + (xstrsignal): Check for definition of NSIG. Conditionalize + on SYS_SIGLIST_DECLARED. Make return type const. + +Sat Jun 10 12:28:16 1995 James Clark + + * troff/input.cc (interpolate_macro): Rephrase missing space + warning. + +Thu May 11 01:07:16 1995 Jason Merrill + + * addftinfo/addftinfo.cc, eqn/delim.cc, eqn/lex.cc, eqn/list.cc, + grodvi/dvi.cc, groff/groff.cc, grops/ps.cc, grops/psrm.cc, + grotty/tty.cc, include/ptable.h indxbib/indxbib.cc, + libbib/index.cc, libbib/linear.cc, libbib/search.cc, + libdriver/input.cc, libdriver/printer.cc, libgroff/font.cc, + libgroff/lf.cc, libgroff/nametoindex.cc, libgroff/ptable.cc, + libgroff/string.cc, lkbib/lkbib.cc, lookbib/lookbib.cc, + pic/lex.cc, pic/object.cc, pic/pic.y refer/label.y refer/ref.cc, + refer/refer.cc, refer/token.cc, tbl/main.cc, tbl/table.cc, + tfmtodit/tfmtodit.cc, troff/dictionary.cc, troff/div.cc, + troff/env.cc, troff/input.cc, troff/node.cc, troff/symbol.cc: + Fix 'for' scoping. + +Wed Apr 19 21:15:11 1995 James Clark + + * troff/input.cc (spring_trap): Push a macro_iterator rather than a + string_iterator. + (spring_trap, postpone_traps, unpostpone_traps): Move to later in + file. + (macro_iterator::macro_iterator): Add additional argument. + +Mon Apr 10 12:06:02 1995 James Clark + + * troff/div.cc (vertical_size::vertical_size): In place of integer + specifying line spacing use cunits specifying post vertical + space. + (macro_diversion::output, top_level_diversion::output): Likewise. + * troff/div.h: Change declarations accordingly. + * troff/env.cc (pending_output_line): Replace ls field by post_vs + field. + (pending_output_line::pending_output_line, + pending_output_line::output, environment::output, + environment::output_line, environment::output_title, + environment::hyphenate_line): In place of + integer specifying line spacing use cunits specifying post vertical + space. + (environment::environment): Add post_vertical_spacing and + prev_post_vertical_spacing arguments. + (environment::get_post_vertical_spacing): New function. + (environment::total_post_vertical_spacing): New function. + (environment::post_vertical_spacing): New function. + (init_env_requests): Initialize pvs request and .pvs register. + * troff/env.h: Change declarations. + +Tue Mar 28 09:52:07 1995 James Clark + + * tmac/tmac.pspic: Immediately remove the temporary file. + +Sat Mar 25 10:43:11 1995 James Clark + + * tmac/tmac.pspic (PSPIC): Scale graphic uniformly even when + height is specified. + +Thu Jan 26 16:20:13 1995 James Clark + + * tbl/table.c (struct vertical rule, class table_entry): Use int + not short for start_row and end_row. + +Fri Jan 13 13:53:05 1995 James Clark + + * troff/input.cc (trapping_blank_line, blank_line_macro): New + functions. + (diverted_space_node::reread, process_input_stack): Call + trapping_blank_line() rather than blank_line(). + (init_input_requests): Bind "blm" to blank_line_macro(). + + * tmac/tmac.s (XA): Use .br and par@reset rather than XA. + +Tue Jan 10 11:40:35 1995 James Clark + + * troff/env.cc (environment::possibly_break_line): Require that + width total excluding width of final space node be greater than + the target text length. + +Tue Jan 3 09:13:37 1995 James Clark + + * troff/node.cc (kern_pair_node::vertical_extent): New function. + +Sun Dec 4 13:19:07 1994 James Clark + + * troff/node.cc (charinfo_node): New class. + (glyph_node, composite_node): Derive from charinfo_node. Change + member functions accordingly. + +Wed Nov 30 10:29:29 1994 James Clark + + * nroff/nroff.sh: Use -Tlatin1 not -TLatin1. + +Mon Aug 8 10:17:59 1994 James Clark (jjc@jclark.com) + + * tmac/tmac.tty-char: Add definitions for \(ab and \[arrowvertex]. + + * devps/generate/textmap (notsubset): Add. + + * tmac/tmac.a4: New file. + +Sun Jul 24 20:08:42 1994 James Clark (jjc@jclark.com) + + * pic/main.cc (had_parse_error): New variable. + (do_picture, do_whole_file): Set had_parse_error if yyparse() + returns non-zero. + (main): Return 1 if had_parse_error is true. + +Tue Jul 19 13:40:31 1994 James Clark (jjc@jclark.com) + + * grolj4/lj4.cc (main): Avoid use of strtoul. + +Mon Jul 18 15:03:02 1994 James Clark (jjc@jclark.com) + + * nroff/nroff.sh: Default device is -Tlatin1 if $LC_CTYPE is + iso_8859_1 or $LESSCHARSET is latin1. + +Sun Jul 10 13:38:35 1994 James Clark (jjc@jclark.com) + + * hpftodit: New directory. + * Makefile.in (CCPROGDIRS): Add hpftodit. + * devlj4/generate: New directory. + +Thu Jul 7 23:49:48 1994 James Clark (jjc@jclark.com) + + * configure.in: Don't use AC_VFORK. + * groff/pipeline.c (run_pipeline): Use fork() always. + +Wed Jul 6 11:13:17 1994 James Clark (jjc@jclark.com) + + * grops/ps.cc (main): Use %1 not %s in error message for -w. + + * Makefile.in (CCPROGDIRS): Add grolj4. + (DEVDIRS): Add devlj4. + * grolj4, devlj4: New directories. + * tmac/troffrc: Handle lj4. + * tmac/tmac.lj4: New file. + +Fri Jun 17 18:02:53 1994 James Clark (jjc@jclark.com) + + * tmac/tmac.e (@n): Set indent to 0 before calling |h. + +Wed Jun 1 07:33:47 1994 James Clark (jjc@jclark.com) + + * troff/input.cc (do_if_request): At end of second string, switch + environments before getting next token. + +Fri May 20 07:39:18 1994 James Clark (jjc@jclark.com) + + * devps/psstrip.sed: Split rule that strips whitespace on either + side of delimiters. + +Wed May 18 08:13:47 1994 James Clark (jjc@jclark.com) + + * troff/node.h (font_family::make_definition): Add return value to + declaration. * troff/symbol.h (symbol::operator==, + symbol::operator!=): Likewise. + +Tue May 17 20:46:06 1994 James Clark (jjc@jclark.com) + + * groff/groff.cc (main, help, synopsis): Handle -S. + (possible_command::insert_arg): New function. + + * tmac/tmac.safer: New file. + * tmac/msafer.man: New file. + * tmac/Makefile.sub (FILES): Add tmac.safer and msafer.man. + +Thu Mar 10 01:58:30 1994 Paul Eggert (eggert@twinsun.com) + + * pic/pic.h, pic/main.cc (safer_flag): New variable. + * pic/pic.y (placeless_element): Avoid unsafe operations if + `safer_flag' is set. + * pic/main.cc (main): Add -S option, which sets `safer_flag'. + +Tue May 10 13:02:31 1994 James Clark (jjc@jclark.com) + + * eqn/lex.cc (get_token): Put call to add_context() in block to + work around Sun C++ 4.0 bug. + + * include/stringclass.h (operator +): Use ?: instead of `if' to + work around Sun C++ 4.0 bug. + +Thu May 5 11:18:03 1994 James Clark (jjc@jclark.com) + + * tbl/main.cc (process_format): Accept - as a synonym for the _ + key letter. + + * libbib/index.cc (minus_one): Don't declare as const. + +Fri Apr 29 09:32:48 1994 James Clark (jjc@jclark.com) + + * troff/input.cc (get_char_for_escape_name): Push back a newline. + +Wed Apr 27 21:14:18 1994 James Clark (jjc@jclark.com) + + * troff/input.cc (write_macro_request): New function. + (init_input_requests): Bind write_macro_request to writem. + +Sun Apr 17 11:15:38 1994 James Clark (jjc@jclark.com) + + * tmac/tmac.s (@EN): Turn filling back on even if there was no + equation. + + * eqn/lex.cc (do_space): Supply missing argument to lex_error. + + * tmac/tmac.s (@TS): Renamed from TS. + (TS): Call LP then TS again. + (cov*ab-init): Alias @TS to TS. + + * tmac/tmac.s: Allow QP or RS to initialize. + + * tmac/tmac.s (par@load-init): New macro. Call at end of file. + Move initializations of PS and LL here. + (par@init): Don't initialize HY. Avoid changing environment 0. + (par*env-init): Don't all par@reset. + +Thu Apr 14 19:15:45 1994 James Clark (jjc@jclark.com) + + * include/posix.h: Include only if not using . + +Sun Apr 10 09:54:44 1994 James Clark (jjc@jclark.com) + + * Makefile.in (MDEFINES): Add LDFLAGS. + (LDFLAGS): Add definition line. + +Thu Apr 7 22:22:22 1994 James Clark (jjc@jclark.com) + + * troff/input.cc (get_optional_char): Split off error check into... + (check_missing_character): New function. + * troff/token.h: Declare it. + * troff/env.cc (margin_character): Don't call get_optional_char. + Only call tok.next() after making the node. + + * include/lib.h (getopt): Make 2nd argument char *const *. + +Fri Mar 11 07:28:03 1994 James Clark (jjc@jclark.com) + + * nroff/conftest.sh: Deleted. + +Fri Mar 4 10:51:36 1994 James Clark (jjc@jclark.com) + + * pic/make-dos-dist: Deleted. + +Wed Mar 2 20:59:16 1994 James Clark (jjc@jclark.com) + + * devps/psstrip.sed: Strip comments before stripping trailing + white space. + +Sat Feb 19 13:07:16 1994 James Clark (jjc@jclark.com) + + * Version 1.09 released. + +Wed Feb 16 16:53:49 1994 James Clark (jjc@jclark.com) + + * tmac/doc-ditroff (hK): Don't reset page number if \nC is > 0. + +Mon Feb 14 08:26:40 1994 James Clark (jjc@jclark.com) + + * libgroff/font.cc (font::load_desc): Fix typo in error message. + +Sun Feb 13 09:37:38 1994 James Clark (jjc@jclark.com) + + * libgroff/new.cc (operator new): Rewrite so as to avoid warning + about returning without a value. + + * troff/charinfo.h (charinfo::get_special_translation): Cast + TRANSLATE_NONE to int. + + * refer/token.cc (lookup_token, store_token): Remove bogus loop + test. Fix test so that it works with n unsigned. + + * pic/pic.y (defaults_table): Fully bracket initializer. + * pic/lex.cc (lookup_keyword): Likewise. + * eqn/lex.cc (token_table, def_table): Likewise. + * eqn/box.cc (param_table): Likewise. + * troff/input.cc (warning_table): Likewise. + * libgroff/font.cc (table): Likewise. + * grops/ps.cc (ps_printer::special): Likewise. + * grops/psrm.cc (resource_manager::process_file): Likewise. + * tfmtodit/tfmtodit.cc (lig_chars, lig_table): Likewise. + * refer/command.cc (command_table): Likewise. + * addftinfo/addftinfo.cc (param_table): Likewise. + + * troff/symbol.cc (symbol::symbol): Prevent compiler warnings + about temp's being unused. + (unused): New function. + + * groff/pipeline.cc: Declare c_fatal. + + * libbib/linear.cc (bmpattern::search): Cast patterrn[--j] to + uchar. + + * libbib/index.cc (index_search_item::load): Prevent compiler + warnings about fd_closer's being unused. + (unused): New function. + +Sat Feb 12 10:31:59 1994 James Clark (jjc@jclark.com) + + * troff/input.cc (copy_mode_error): Make `prefix' static. + Fix typo. + + * include/posix.h: Include is HAVE_CC_OSFCN_H is + defined. + * acgroff.m4, configure.in, Makefile: Rename HAVE_CC_UNISTD_H to + HAVE_CC_OSFCN_H and modify accordingly. + + * troff/input.cc (init_charset_table): radicalex overlaps + horizontally. + + * groff/acgroff.m4 (GROFF_ISC_SYSV3): New macro (from + udodo!hans@relay.NL.net). + * groff/configure.in: Call it. + + * groff/acgroff.m4 (GROFF_PCLOSE): New macro. + * groff/configure.in: Call it. + * include/lib.h: Conditionalize declaration of pclose. + + * troff/div.cc (last_page_number): New global variable. + (top_level_diversion::begin_page): Exit if we just printed the + last page. + * troff/div.h (last_page_number): Declare it. + * troff/input.cc (parse_output_page_list): Set last_page_number. + + * eqn/sqrt.cc: Rename \(rn to \[radicalex]. + * devps/S, devps/textmap, tmac/tmac.ps, tmac/tmac.dvi, + tmac/tmac.X: Likewise. + * tmac/tmac.ps, tmac/tmac.X, tmac.dvi: Add definitions of \(rn. + * tmac.dvi: Make \(ru and \(ul extend beyond their width by .04m. + +Fri Feb 11 11:45:40 1994 James Clark (jjc@jclark.com) + + * tmac/doc-ditroff (hK): Remove groff specific code which + prevented page-breaks between separate manual entries. If this is + the first page, don't set the page number to 1. + + * acgroff.m4 (GROFF_POSIX): New macro. + * configure.in: Use it. + + * troff/node.cc (class real_output_file, + real_output_file::real_output_file, + real_output_file::~real_output_file): Conditionalize use of + popen/pclose on POPEN_MISSING. + * troff/node.h: Conditionalize pipe_command on POPEN_MISSING. + * troff/input.cc (pipe_command): Give an error if POPEN_MISSING. + (pipe_source): Similarily. + + * acgroff.m4 (GROFF_PROG_CCC): Update message about libg++. + + * acgroff.m4 (GROFF_GETOPT, GROFF_PUTENV, GROFF_POPEN): Detect + presence of declarations by trying to compile example with + conflicting declarations. (gcc only gives a warning for missing + declarations.) + +Wed Feb 9 09:12:23 1994 James Clark (jjc@jclark.com) + + * tmac/tmac.pspic (PSPIC): Allow options to specify alignment + (from Ulrich Lauther). + +Tue Feb 8 03:56:40 1994 James Clark (jjc@jclark.com) + + * libbib/linear.cc (file_buffer::load): Use S_ISREG macro. + +Thu Feb 3 09:34:35 1994 James Clark (jjc@jclark.com) + + * indxbib/indxbib.cc (write_hash_table): Add code for case where + pointers and ints have different sizes. + +Sun Jan 9 16:17:51 1994 James Clark (jjc@jclark.com) + + * tmac/tmac.s (par*env-init): Call par@reset. + +Fri Jan 7 10:24:27 1994 James Clark (jjc@jclark.com) + + * tmac/tmac.s (@IP): Switch to a new environment when diverting + tag. + (par*push-tag-env, par*pop-tag-env): New macros. + +Wed Jan 5 21:18:34 1994 James Clark (jjc@jclark.com) + + * grops/ps.cc (ps_printer::ps_printer): Use MAX_LINE_LENGTH for + initializing `out'. Reduce MAX_LINE_LENGTH from 79 to 72. + + * grops/ps.cc (ps_printer::~ps_printer): Output %%CreationDate + comment. Include . + +Wed Dec 15 14:14:00 1993 James Clark (jjc@jclark.com) + + * grops/ps.cc (is_small_h, is_small_v): Deleted. + (ps_printer::flush_sbuf): Use absolute motion only at beginning of + lines. + +Tue Dec 14 10:06:34 1993 James Clark (jjc@jclark.com) + + * troff/input.cc (read_request): Only print a prompt if reading + from the terminal. Also clearerr on EOF if reading from the + terminal. Declare isatty. + +Mon Nov 29 08:38:15 1993 James Clark (jjc@jclark.com) + + * refer/label.y: Rename map_t to map_func and extractor_t to + extractor_func. + +Sat Oct 30 06:38:12 1993 James Clark (jjc@jclark.com) + + * include/assert.h: Don't use volatile. + * libgroff/assert.cc: Likewise. + +Fri Oct 29 15:00:23 1993 James Clark (jjc@jclark.com) + + * troff/input.cc (abort_request): Look at character in tok before + calling get_copy(). + +Thu Oct 28 14:09:48 1993 James Clark (jjc@jclark.com) + + * troff/troff.h (NO_RETURN): Deleted. + * troff/div.cc (cleanup_and_exit): Don't declare aas NO_RETURN. + * troff/input.cc (exit_troff): Likewise + + * Makefile.in: Remove `Making ...' messages since GNU make now + gives these. + + * configure.in: Use AC_HAVE_HEADERS(unistd.h) instead of AC_UNISTD_H. + +Wed Oct 27 11:12:51 1993 James Clark (jjc@jclark.com) + + * tmac/tmac.s (@init): Initialize PO to \n(.o here, rather than + to constant 1 inch. + +Sat Oct 23 10:03:52 1993 James Clark (jjc@jclark.com) + + * tmac/tmac.e (hl): Use \n[.in] rather than \n(.i. + +Thu Oct 14 12:09:45 1993 James Clark (jjc@jclark.com) + + * eqn/delim.cc (delim_box::compute_metrics): Don't increase + MARK_REG if there was no left delimiter. + +Sat Oct 2 19:54:47 1993 James Clark (jjc@jclark.com) + + * pic/troff.cc (troff_output::text): Set line thickness to + relative before outputting text. + + * tmac/tmac.e (@k): Don't zero ?T. + ((z): Likewise. + +Sat Sep 25 11:08:43 1993 James Clark (jjc@jclark.com) + + * tmac/tmac.e ($p): Handle possibility that $3 is empty. + +Wed Aug 18 08:51:41 1993 James Clark (jjc@jclark.com) + + * troff/input.cc (decode_args): Warn about unquoted tabs (from + Paul Eggert). + +Tue Aug 10 08:38:32 1993 James Clark (jjc@jclark.com) + + * troff/input.cc (ignoring): New variable. + (ignore): Set ignoring during call to do_define_macro. + (do_define_macro): Clear ignoring before interpolating terminating + macro. + (copy_mode_error): New function. + (get_char_for_escape_name, read_long_escape_name, + interpolate_arg): Use copy_mode_error. + (warning_table): Add WARN_IG. + * troff/troff.h (WARN_IG): Declare. + (WARN_TOTAL): Change accordingly. + + * groff/pipeline.c (strsignal): Rename to xstrsignal. + * groff/groff.cc (strsignal): Delete declaration. + +Fri Jul 16 01:43:12 1993 James Clark (jjc@jclark.com) + + * troff/div.cc (page_offset): Use 'm' as default scaling. + +Sat Jul 3 09:11:38 1993 James Clark (jjc@jclark.com) + + * nroff/nroff.sh: Ignore -u. + +Wed Jun 9 12:17:27 1993 James Clark (jjc@jclark.com) + + * Makefile.in (MDEFINES): Pass down MAKEOVERRIDES. + +Fri Jun 4 17:35:47 1993 James Clark (jjc@jclark.com) + + * tmac/tmac.s (par*box-draw): Set adjustment mode to l while + drawing box. + (B2): With -Tascii, leave additional vertical space before + and after. Ensure that the left and right indent is restored to + what it was even if the point size changes. Don't call + par@finish. Change the indent, line length and title length + directly. With -Tascii, make the width of the box 1n less. + (B1): Remember 1n at the current point size. Don't call + par@reset. Change the indent, line length and title length + directly. Ensure that the temporary indent is preserved. + (par*box-mark-top): Turn off no spacing mode. + +Thu Jun 3 17:47:14 1993 James Clark (jjc@jclark.com) + + * Makefile.in (dist): Use .gz suffix. + +Thu May 27 20:04:59 1993 James Clark (jjc@jclark.com) + + * troff/input.cc (main): Add return 0. + * pic/main.cc (main): Use return instead of exit. + * tbl/main.cc (main): Likewise. + * eqn/main.cc (main): Likewise. + * grops/ps.cc (main): Likewise. + * grotty/tty.cc (main): Likewise. + * groff/groff.cc (main): Likewise. + * grodvi/dvi.cc (main): Likewise. + * refer/refer.cc (main): Likewise. + * indxbib/indxbib.cc (main): Likewise. + * lkbib/lkbib.cc (main): Likewise. + * soelim/soelim.cc (main): Likewise. + * addftinfo/addftinfo.cc (main): Likewise. + * acgroff.m4 (GROFF_PROG_CCC, GROFF_CC_COMPILE_CHECK, + GROFF_COOKIE_BUG, GROFF_CC_ANSI_BUG): Likewise. + + * troff/token.h (process_input_stack): Don't declare as static. + * troff/input.cc: Likewise. + + * troff/node.c (invalidate_fontno): Make it a static member of + class font_family. Change callers. + * troff/node.c: Change declaration. + + * tbl/main.cc (struct input_entry_format): Add explicit public + specifier. + * tbl/table.cc (struct text_stuff, struct single_hline_stuff, + struct double_hline_stuff): Likewise. + * tbl/table.h (struct entry_format): Likewise. + * pic/object.h (struct saved_state): Likewise. + + * include/stringclass.h: Add forward declarations of friend + functions that are later declared as inline. Don't include inline + specifier in friend declaration. + + * libgroff/lib.h: Declare popen and pclose. + * acgroff.m4 (GROFF_POPEN): New macro. + * configure.in: Call it. + + * include/lib.h (PI): New constant. Undef first if necessary. + * tfmtodit/tfmtodit.cc (main): Use PI rather than M_PI. + * grops/ps.cc (degrees, radians): Likewise. + * libgroff/font.cc (font::get_skew): Likewise. + + * grops/ps.cc (is_ascii): New function. + (ps_output::put_string): Use is_ascii. Use csprint rather than + isprint. + (ps_printer::define_encoding): Use csspace. + * libgroff/strtol.c (ISASCII): New macro. + (strtol): Cast arguments to is*() and tolower() to unsigned char. + Use ISASCII rather than isascii. + * libgroff/cmap.cc: Use isascii() only if defines it. + * libgroff/cset.cc: Likewise. + * libdriver/input.cc: Include cset.h. + (do_file, get_integer, possibly_get_integer): Use csdigit() rather + than isdigit(). + + * refer/refer.cc (main): Use %ld rather than %d for longs. + + * libbib/index.cc (index_search_item_iterator::get_tag): Use + S_ISREG macro. + + * addftinfo/addftinfo.cc (param_t): Add explicit `int'. + +Mon May 24 08:51:37 1993 James Clark (jjc@jclark.com) + + * troff/input.cc (hyphenation_code): Skip white space between + char/code pairs. + +Sun May 16 08:15:52 1993 James Clark (jjc at jclark.com) + + * tbl/table.h (table::entry_list_tailp): New member. + (table::table): Initialize it. + (table::add_entry): Use entry_list_tailp to avoid O(n^2) + behaviour. + +Sat May 15 17:26:00 1993 James Clark (jjc at jclark.com) + + * grotty/tty.cc (tty_printer::add_char): Don't discard characters + with negative horizontal positions. Remove casts of glyph::hpos to + int. + (USHRT_MAX): Delete definition. + (SHRT_MAX, SHRT_MIN): New definitions. + (glyph::hpos): Change type to short. + (tty_printer::end_page): Output multiple backspaces if necessary. + Remove casts of glyph::hpos to int. + +Fri May 7 12:14:37 1993 James Clark (jjc at jclark.com) + + * tmac/tmac.s (@RT): New definition. + +Thu May 6 21:36:54 1993 James Clark (jjc at jclark.com) + + * refer/refer.cc (do_file): Make sure current_filename is set when + filename is "-". + + * pic/common.cc (common_output::dot_line): Handle zero length + lines. + +Sun May 2 19:54:16 1993 James Clark (jjc at jclark.com) + + * tmac/tmac.s (par@reset): Get value for .hy for \n[HY]. + (par@init): Initialize \n[HY]. + +Mon Apr 26 11:43:16 1993 James Clark (jjc at jclark.com) + + * troff/dictionary.cc (dictionary::remove): Continue when + r < j < i. + +Sun Apr 25 11:03:00 1993 James Clark (jjc at jclark.com) + + * Makefile.com (.y.cc): Avoid ending up with two versions of + $(YTABH). + +Thu Apr 22 21:03:45 1993 James Clark (jjc at jclark.com) + + * tmac/tmac.dvi (\(,c): Define only if it does not exist. + (\(,C): Likewise. Also fix typo. + +Wed Apr 21 08:47:32 1993 James Clark (jjc at jclark.com) + + * lib.h: Delete extraneous semi-colon. + + * Add pso request: `so' from a pipe. + * troff/input.c (file_iterator::file_iterator): Add 3rd argument. + (file_iterator::close): New function. + (file_iterator::~file_iterator, file_iterator::next_file): Use + file_iterator::close. + (file_iterator::backtrace): Say `process' rather than `file' when + the stream is popened. + (pipe_source): New function. + (init_input_requests): Bind ".pso" to pipe_source. + +Tue Apr 20 00:02:26 1993 James Clark (jjc at jclark.com) + + * afmtodit/afmtodit.pl: Avoid single quotes in comments. + + * pfbtops/pfbtops.c: Output 64 characters per line. Output hex + digits in lower case. + +Mon Apr 19 09:55:57 1993 James Clark (jjc at jclark) + + * Version 1.08 released. + + * Makefile.in (dist): Insert || true after ln -s commands that + might fail. + + * mm: Update to mm 1.16. + + * acgroff.m4 (GROFF_CSH_HACK): New macro. + * configure.in: Call GROFF_CSH_HACK. Substitute for + SH_SCRIPT_SED_CMD. + * Makefile.in (SH_SCRIPT_SED_CMD): New variable. Include in + MDEFINES. + * nroff/Makefile.sub (nroff): New target. + (install_data): Install nroff. + * eqn/Makefile.sub (neqn): Sed with SH_SCRIPT_SED_CMD. + * grog/Makefile.sub (grog): Sed grog.sh with SH_SCRIPT_SED_CMD. + +Sat Apr 17 08:24:28 1993 James Clark (jjc at jclark) + + * eqn/Makefile.sub (neqn): Add chmod +x. + + * grog/Makefile.sub (grog): Remove spurious semi-colon. + +Fri Apr 16 22:41:57 1993 James Clark (jjc at jclark) + + * troff/input.cc (string_iterator::string_iterator()): Initialize + lineno and count. + +Tue Apr 13 10:22:28 1993 James Clark (jjc at jclark) + + * troff/div.cc (macro_diversion::space, + top_level_diversion::space): Don't set high_water_mark. + (macro_diversion::output, top_level_diversion::output): Don't + include post line space in high water mark. + +Wed Apr 7 12:48:18 1993 James Clark (jjc at jclark) + + * eqn/eqn.y: Don't define YYDEBUG. + * pic/pic.y: Likewise. + +Mon Apr 5 10:15:15 1993 James Clark (jjc at jclark) + + * tmac/tmac.e ([3): Add space after comma following editors. + Change double spaces to single spaces. + ([4): Change double spaces to single spaces. + + * grops/ps.h (USE_PS_ADOBE_2_0): New flag for broken_flags. + * grops/ps.cc (ps_printer::~ps_printer): If the USE_PS_ADOBE_2_0 + bit is set in broken_flags, use 2.0 rather than 3.0 as the version + after %!PS-Adobe- (for Newsprint). + + * troff/div.cc (top_level_diversion::begin_page): When + before_first_page is 1, set page_number to 1. + +Sun Apr 4 14:28:53 1993 James Clark (jjc at jclark) + + * eqn/box.cc (box::top_level): Protect equation with \&. + +Sat Apr 3 23:27:25 1993 James Clark (jjc at jclark) + + * groff/groff.cc (possible_command::set_name): Delete old name. + + * groff/groff.cc (possible_command::~possible_command): Use + a_delete. + + * troff/node.cc (troff_output_file::begun_page): New member. + (troff_output_file::troff_output_file): Initialize it. + (troff_output_file::really_begin_page): Only output V command if a + page has been begun. + + * pic/pic.y (placeless_element): Delete argument to PRINT after + use. + +Fri Apr 2 11:31:02 1993 James Clark (jjc at jclark) + + * Make wrapman work. + * troff/div.h (class top_level_diversion): Replace + first_page_begun by before_first_page (with opposite sense). + * Change first_page_begun to before_first_page inverting sense. + * troff/div.cc (class nl_reg): New class. + (init_div_requests): Use class nl_reg for \n(nl. + (top_level_diversion::begin_page): Don't call + output_file::begin_page if before_first_page is 2; + reset before_first_page afterwards. If have_next_page_number is + false, then always increment page_number. + * tmac/tmac.an: Set traps within TH rather than at the top-level. + Restore compatibility mode after loading, and then disable + compatibility mode in TH. + +Thu Apr 1 11:09:34 1993 James Clark (jjc at jclark) + + * grotty/tty.cc (tty_printer::end_page): Don't discard characters + past last line. + * troff/node.h (output_file::trailer): Declare. + * troff/div.cc (cleanup_and_exit): Call output_file::trailer(). + * troff/node.cc (output_file::trailer): New function. + (troff_output_file::~troff_output_file): Move most code into... + (troff_output_file::trailer): New function. + (class troff_output_file): Delete page_length member. Declare + trailer(). + (troff_output_file::really_begin_page): Use current page length + for final V command. + + * tbl/main.cc (struct options): New decimal_point_char member. + (options::options): Initialize this. + (process_options): Implement decimalpoint option. + (process_data): Pass decimal_point_char option to table::table. + * tbl/table.h (class table): New decimal_point_char member. + (table::table): Add additional argument. + * tbl/table.cc (find_dot): Rename to find_decimal_point. Add + second argument specifying decimal point character. Use this + instead of '.'. + (table::table): Initialize decimal_point_char. + (table::add_entry): Change call to find_dot. + + * troff/input.cc (get_copy, token::next): Implement \V. + (interpolate_environment_variable): New function. + +Tue Mar 30 14:41:39 1993 James Clark (jjc at jclark) + + * pic/lex.cc (lookup_keyword): Rename MIN to K_MIN, MAX to K_MAX. + * pic/pic.y: Likewise. + + * grotty/tty.cc (tty_printer::add_char, tty_printer::end_page): + Add casts to int. + * refer/ref.cc (reference::insert_field, reference::delete_field): + Likewise. + * troff/number.cc (parse_term): Likewise. + + * acgroff.m4 (GROFF_PROG_YACC): New macro. + * configure.in: Use GROFF_PROG_YACC. + + * acgroff.m4 (GROFF_PROG_CCC): Don't add -O automatically for gcc + and g++. + * Makefile.in (OPTIMIZE): New define. + (DEBUG): Empty by default. + (CCFLAGS, CFLAGS): Include $(OPTIMIZE). + + * acgroff.m4 (GROFF_SYS_SIGLIST): Don't quote program. + (GROFF_ARRAY_DELETE): Likewise. + (GROFF_CC_COMPILE_CHECK): Quote use of $2 and $3. + + * troff/env.cc (trie::~trie): Make virtual to shut up g++. + + * devps/psstrip.sed: Use different delimiter on last line (so that + it works with BSD 4.4 sed.) + +Mon Mar 29 17:07:14 1993 James Clark (jjc at jclark) + + * devps/psstrip.sed: Delete comments. + + * acgroff.m4 (AC_GETOPT): Don't test whether declares + optind, opterr, optarg. + * lib.h: When UNISTD_H_DECLARES_GETOPT is defined, declare optind, + opterr, optarg. + +Sun Mar 28 17:44:25 1993 James Clark (jjc at jclark) + + * Makefile.in (check): Dummy target. + +Wed Mar 3 04:53:38 1993 James Clark (jjc at jclark) + + * Version 1.07 released. + + * Integrate mm 1.11. + + * tbl/table.cc (alphabetic_block_entry::print): start_row was used + where start_col was meant. + +Thu Feb 25 07:55:36 1993 James Clark (jjc at jclark) + + * grog/grog.sh, grog/grog.pl: Recognize PH and SA as -mm macros. + +Wed Feb 24 10:15:34 1993 James Clark (jjc at jclark) + + * troff/input.cc (token::next): Make \z\o'...' and similar things + work. + + * env.h (MARGIN_CHARACTER_ON, MARGIN_CHARACTER_NEXT): New + constants. + (environment): Add margin_character_flags member. + * env.cc (environment::environment(symbol), + environment::environment(const environment *): Initialize + margin_character_flags. + (margin_character): Rewrite. + (environment::output_line): Add a margin character if + margin_character_flags is non-zero. Turn off the + MARGIN_CHARACTER_NEXT bit. If that makes margin_character_flags + zero, use margin_character_node without copying and then set + margin_character_node to 0. + + * devps/DESC.in: Change minimum size to 1000. + +Tue Feb 23 14:57:49 1993 James Clark (jjc at jclark) + + * troff/symbol.h (symbol::hash): Change return type to unsigned + long. + * troff/dictionary.cc (dictionary::lookup, dictionary::remove): + Add casts to int. + + * test-groff: Use -r rather than -x. + + * grops/psfig.diff: Include in distribution again. + +Mon Feb 22 09:10:44 1993 James Clark (jjc at jclark) + + * Makefile.in (dist): Use gzip. + +Sun Feb 21 11:12:53 1993 James Clark (jjc at jclark) + + * acgroff.m4 (GROFF_GETOPT): Check for declaration of getopt() in + unistd.h as well as in stdlib.h. + * include/lib.h: Include is STDLIB_H_DECLARES_GETOPT is + defined; otherwise include and if + UNISTD_H_DECLARES_GETOPT is defined. + + * configure.in: use builtin(include, ... rather than include(... + * configure: Regenerate with autoconf 1.3. + + * libdriver/print.cc (printer::adjust_arc_center): Use new + algorithm suggested by Andy Fyfe. + + * libdriver/printer.cc (printer::adjust_arc_center): New function. + * include/printer.h: Declare this. + * grops/ps.cc (ps_printer::draw): Use it. + * grodvi/dvi.cc (dvi_printer::draw): Use it. + +Fri Feb 19 23:13:51 1993 James Clark (jjc at jclark) + + * Makefile.comm (.man.n): Replace macrodir by tmacdir. + +Thu Feb 11 16:46:59 1993 James Clark (jjc at jclark) + + * eqn/main.cc (main): Handle "eqn -". + +Mon Jan 4 20:29:56 1993 James Clark (jjc at jclark) + + * tmac/tmac.e (++): Install fix from comp.bugs.4sd. + + * mm: Integrate version 1.08. + + * pic/troff.cc (troff_output::finish_picture): Set + EQN_NO_EXTRA_SPACE reg to 0 rather than removing it. + * eqn/box.cc (box::extra_space): Set EQN_NO_EXTRA_SPACE_REG to 0 + if it's not defined. Check whether the register is non-zero rather + than whether it's not defined. + * tmac.e ({, <): Make argument to \x zero if \n(0x is non-zero. + + * indxbib/indxbib.cc: Move all signal handling into... + * indxbib/signal.c: New file. + * configure.in: Call AC_RETSIGTYPE. + + * acgroff.m4 (GROFF_STRUCT_EXCEPTION): New macro. + * configure.in: Call GROFF_STRUCT_EXCEPTION. + * libgroff/matherr.c: Protect with ifdef HAVE_STRUCT_EXCEPTION. + + * troff/input.cc (token::token, token::operator=): Work round SGI + C++ bug. + * pic/object.cc (position::position): Likewise. + +Mon Dec 28 21:50:21 1992 James Clark (jjc at jclark) + + * pic/pic.h: Move declaration of hypot(). + +Wed Dec 16 12:28:29 1992 James Clark (jjc at jclark) + + * pic/pic.h: Declare hypot(). + + * pic/pic.h: Define M_PI if necessary. + +Thu Dec 10 12:03:29 1992 James Clark (jjc at jclark) + + * tmac/tmac.e (re): Add alternative version that doesn't use groff + `.ta T' feature. + + * devps/prologue.ps (RE): Handle the possibility that the old font + doesn't have a FontName entry. + +Wed Dec 2 10:25:29 1992 James Clark (jjc at jclark) + + * tmac/tmac.e (fam): Redefine to set family in environment 2. + (@C): Use @fam not fam. + +Thu Nov 26 16:01:25 1992 James Clark (jjc at jclark) + + * lookbib/lookbib.cc (main): Change type of start to const char *. + * lkbib/lkbib.cc (main): Likewise. + + * eqn/lex.cc (definition::definition): Don't use member + initializer syntax for members of anonymous unions. + + * troff/input.cc (input_stack::backtrace): Change type of to const + char *. + +Wed Nov 25 13:43:09 1992 James Clark (jjc at jclark) + + * include/stringclass.h (class string): Declare inline friend + functions as inline in class declaration. + * troff/hvunits.h (class hunits, class vunits): Likewise. + * include/refid.h (class reference_id): Likewise + * troff/troff.h (points_to_units(units), scale(units, double)): + Delete declarations. + * libdriver/input.cc (get_char): Delete declaration. + * include/lib.h: Change 2nd argument of getopt from const char ** + to char **. + * troff/symbol.cc (symbol::symbol): Cast `new char *[n]' to `const + char **' before assigning to a `const char **'. + * tbl/table.cc: Delete extra declarations of prints(). + +Tue Nov 24 14:33:13 1992 James Clark (jjc at jclark) + + * libgroff/font.cc (font::load_desc): Cast `new char *[n]' to `const + char **' before assigning to a `const char **'. + + * libgroff/errarg.cc (errarg::errarg): Don't use member + initializer syntax for members of anonymous unions. + +Sat Nov 21 05:02:23 1992 James Clark (jjc at jclark) + + * mm: Integrate version 1.07. + +Tue Nov 17 16:44:27 1992 James Clark (jjc at jclark) + + * troff/input.c (translate2): Rename to + (translate_no_transparent). + (init_input_requests): Rename tr2 to trnt. + +Mon Nov 16 09:49:32 1992 James Clark (jjc at jclark) + + * troff/charinfo.h (class charinfo): Add transparent_translate field. + (charinfo::set_translation, charinfo::set_special_translation): + Add second argument that specifies value for + transparent_translate. + (charinfo::get_translation, charinfo::get_special_translation): + Add optional second argument that specifies whether translation is + being used for transparent throughput. + * troff/input.cc (charinfo::set_translation, + charinfo::set_special_translation): Handle second argument. + (charinfo::charinfo): Initialize transparent_translate. + (translate): Split main part off into + (do_translate): New function. Pass argument saying whether + translation applies to transparent throughput. + (translate2): New request. + (init_input_requests): Bind translate2 to `tr2'. + +Wed Nov 11 11:43:20 1992 James Clark (jjc at jclark) + + * tbl/table.h (class table): Add `nokeep' flag. + * tbl/main.cc (process_options): Handle `nokeep' option. + * tbl/table.cc (table::init_output, table::do_row, table::do_top, + table::do_bottom): Don't output keep/release macro definitions or + calls when `nokeep' option has been specified. + +Sat Nov 7 01:28:33 1992 James Clark (jjc at jclark) + + * tmac/tmac.Xps (Xps-char): Use " as delimiter for \Z. + +Wed Nov 4 16:29:04 1992 James Clark (jjc at jclark) + + * tbl/table.cc (table_entry::divert, block_entry::do_divert, + block_entry::divert, alphabetic_block_entry::divert): Add extra + argument giving column separation. + (table::compute_widths): Pass column separation to + table_entry::divert(). + (block_entry::do_divert): If an entry spans multiple columns and a + minimumum width has been specified for each column, then set the + line length to the sum of the widths (plus possibly the column + separations). + + * troff/input.cc (set_escape_char): Don't set the escape_char + until after calling has_arg(). + +Tue Nov 3 11:23:27 1992 James Clark (jjc at jclark) + + * tbl/table.cc (table::do_top): Add missing \s0 for double box + case. + + * tbl/table.cc (table::print_double_hline): Avoid extra new line + in case where r > nrows - 1. + + * tbl/table.cc (BODY_HEIGHT): Deleted. + (LINE_SEP): New definition. + (table::print_single_hline, table::print_double_hline, + table::compute_vrule_top_adjust, table::compute_vrule_bot_adjust, + table::do_row, table::do_top): Use LINE_SEP space before a line + instead of \n[.v]-BODY_HEIGHT-BODY_DEPTH. + + * tbl/table.cc (text_entry::print_contents): New function. + (text_string_name, right_text_string_name): Deleted. + (TEXT_STRING, RIGHT_TEXT_STRING): Deleted. + (simple_text_entry::do_width, numeric_text_entry::do_width, + alphabetic_text_entry::do_width): Don't store the contents of the + entry in a string. + (left_text_entry::simple_print, right_text_entry::simple_print, + center_text_entry::simple_print, + alphabetic_text_entry::simple_print, + numeric_text_entry::simple_print): Print the entry directly + instead of using the stored string. + +Fri Oct 30 10:39:32 1992 James Clark (jjc at jclark) + + * devps/Makefile: Strip PostScript files. + * devps/prologue: Rename to... + * devps/prologue.ps. + * devps/psstrip.sed: New file. + * devps/download: Use .pfa rather than .ps for installed versions + of fonts. + +Thu Oct 29 09:14:43 1992 James Clark (jjc at jclark) + + * troff/env.cc (input_trap): Give a warning if the argument is out + of range. + + * troff/env.cc (adjust): Treat negative argument as missing. Round + argument > 5 down to 5. + + * troff/env.cc (center, right_justify): Make negative argument zero. + + * troff/div.cc (page_offset, vertical_position_traps): Treat + invalid argument as missing. + * troff/env.cc (line_spacing, line_length, title_length, indent, + underline, hyphen_line_max_request, control_char, + no_break_control_char, widow_control_request, adjust, input_trap, + point_size): Likewise. + * troff/node.cc (ligature, kern_request, bold_font, track_kern, + constant_space): Likewise. + * troff/input.cc (compatible, shift, warn_request, + set_escape_char): Likewise. + + * tbl/main.cc (format::format): Avoid doing `new int[0]'. + * tbl/table.cc (table::table): Likewise. + + * Makefile.dev (install_dev): depends on $(DEVFILES). + +Wed Oct 28 08:30:57 1992 James Clark (jjc at jclark) + + * devX75, devX75-12, devX100, devX100-12: New directories. + * Makefile.in: Add these to DEVDIRS. + + * troff/Makefile.sub, eqn/Makefile.sub, indxbib/Makefile.sub, + afmtodit/Makefile.sub, tmac/Makefile.sub, nroff/Makefile.sub, + grog/Makefile.sub, mm/Makefile.sub (uninstall_sub): New target. + * Makefile.in (uninstall, uninstall_sub, uninstall_dirs): New + targets. + * Makefile.ccpg, Makefile.cpg, Makefile.dev, Makefile.man + (uninstall): New target. + * Makefile.comm (uninstall, uninstall_sub, uninstall_man, + uninstall_prog, uninstall_dev): New targets. + + * troff/div.cc (return_request): Treat an invalid argument as + missing. + +Mon Oct 26 11:33:47 1992 James Clark (jjc at jclark) + + * tmac/tmac.e ((f): Set up the environment even when there's a + current diversion. Transperently throughput a call to @N. + (@N): New macro. + +Thu Oct 22 05:05:59 1992 James Clark (jjc at jclark) + + * tbl/table.cc (table::compute_vrule_top_adjust): Round adjustment + up to vertical resolution. + + * tbl/table.cc (table::do_row): Change row number after printing + stuff list. + + * pic/lex.cc (get_token_after_dot): Make .left and .right work. + +Wed Oct 21 14:46:45 1992 James Clark (jjc at jclark) + + * Rename CHANGES to NEWS. + +Tue Oct 20 23:25:21 1992 James Clark (jjc at jclark) + + * libgroff/new.cc (operator new): Avoid calling malloc(0). + +Mon Oct 19 09:10:13 1992 James Clark (jjc at jclark) + + * man.ultrix: Removed. + +Sun Oct 18 06:35:15 1992 James Clark (jjc at jclark) + + * Makefile.comm (extraclean): Delete files whose names begin with + `='. + + * pic/troff.cc (troff_output::text): Fix typo in implementation of + aligned text. + +Sat Oct 10 09:32:29 1992 James Clark (jjc at jclark) + + * troff/env.cc (hyphenate_request, vertical_spacing, no_number): + * troff/div.cc (page_length, need_space, space_request): Treat + invalid optional argument as missing. + * troff/env.cc (number_lines): If the first argument is present + but not a number, turn on line numbering, don't change the next + line number and parse the remaining arguments. + + * tmac/tmac.e (@q): Do the `ne' before changing to environment 2. + +Thu Oct 8 10:24:40 1992 James Clark (jjc at jclark) + + * eqn/box.h: Change declaration accordingly. + * eqn/box.cc (set_gsize): Change return type to int. Return 0 if + the specified size was bad but don't give an error. Check for + overflow. + * eqn/main.cc (main): Change caller. Leave validation to set_gsize. + * eqn/lex (do_size): Likewise. + +Wed Oct 7 09:48:59 1992 James Clark (jjc at jclark) + + * acgroff.m4 (GROFF_PROG_CCC): Use fopen when checking for C++ + compatible headers. + +Sun Oct 4 18:24:02 1992 James Clark (jjc at jclark) + + * tbl/table.cc (table::init_output): Improve error message when + table won't fit on one page. + +Fri Oct 2 10:41:40 1992 James Clark (jjc at jclark) + + * pic/troff.cc (troff_output::start_picture): Generate line + containing a horizontal motion equal to the width of the picture. + + * groff/groff.cc (main): Allow PROG_PREFIX to be set at runtime + using GROFF_COMMAND_PREFIX environment variable. + +Fri Sep 25 11:40:40 1992 James Clark (jjc at jclark) + + * mdate.sh: Use $NF rather than $(NF). + +Tue Sep 22 09:47:24 1992 James Clark (jjc at jclark) + + * pic/main.cc (main): Use %1 not %c in argument to warning. + + * eqn/main.cc (main): Output code to check that geqn was given the + correct -T option. + +Mon Sep 21 10:59:16 1992 James Clark (jjc at jclark) + + * Makefile.in (dist): Instead of doing `make -f ../Makefile', do + `ln -s ../Makefile .; make; rm -f Makefile'. + + * troff/hyphen: Rename to... + * troff/hyphen.us: + * troff/input.cc (main): Delete -H option. Don't call + read_hyphen_file(). + * troff/env.cc: Include searchpath.h and macropath.h. + (exception_dictionary): Deleted. + (ht): Deleted. + (read_hyphen_file): Deleted. + (hyphenation_language): New struct. + (class trie, class hyphen_trie): Move declarations up. + (trie_node::~trie_node): Deleted. + (trie::delete_trie_node): New function. + (trie::do_delete): New pure virtual function. + (hyphen_trie::do_delete): New function. + (trie::~trie): New function. + (hyphen_trie::~hyphen_trie): New function. + (trie::clear): No need to chcek that tp is not 0. + (current_language, language_dictionary): New variables. + (hyphen_word): Give an error if no current language. Use + exceptions dictionary in current language. + (hyphen_trie::read_patterns_file): Find file using macro_path. + Allow comments (starting with %) in patterns file. Don't make it + a fatal error if the file can't be found. + (hyphenate): Return if no current language. Get the exceptions + dictionary and the hyphenation patterns from the current language. + (set_hyphenation_language): New variable. + (hyphenation_patterns_file): New function. + (hyphenation_language_reg): New class. + (hyphenation_language_reg::get_string): New function. + (init_hyphen_requests): Bind "hla" to set_hyphenation_language and + "hpf" to hyphenation_patterns_file. Initialize `.hla' number + register. + * groff/groff.cc (main, help, synopsis): Delete -H option. + * include/Makefile.sub: Don't define HYPHENFILE. + * Makefile.in: Delete hyphenfile variable and remove from MDEFINES. + * Makefile.comm (.man.n): Don't substitute for HYPHENFILE. + * tmac/troffrc: Set hyphenation language to `us'. Load `hyphen.us' + hyphenation patterns. + +Sun Sep 20 09:33:02 1992 James Clark (jjc at jclark) + + * eqn/neqn.sh: New file. + * eqn/Makefile.sub: Handle neqn.sh. + + * eqn/eqn.h: Declare `nroff' variable. + * eqn/box.cc (param_table): Add `nroff' param. + (nroff): Define it. + * eqn/lex.cc (yylex): Handle TDEFINE and NDEFINE using `nroff' + variable. + * tmac/eqnrc: Set `nroff' to 1 for -Tascii or -Tlatin1. + + * troff/troff.h (WARN_FONT): New warning. + (WARN_TOTAL): Change accordingly. + * troff/input.cc (DEFAULT_WARNING_MASK): Include WARN_FONT. + (warning_table): Add WARN_FONT. + * troff/node.cc (mount_font_no_translate): Pass argument to + font::load_font. If this is non-zero, give a warning. + Don't give an error message when accessing a font that has already + been found to be invalid. + * include/font.h (font::load, font::load_font): Add additional + optional argument which suppresses error message if the font is + not found. + * libgroff/font.cc (font::load_font): Handle additional argument. + (font::load): Add additional argument. If this is non-null, set it + to 1 and don't give error message. + + * include/printer.h (printer::end_page): Add argument giving + length of page. + * libdriver/input.cc (do_file): Pass this. + * grops/ps.cc (ps_printer::end_page): Add argument. + * grodvi/dvi.cc (dvi_printer::end_page, + draw_dvi_printer::end_page): Add argument. + * grotty/tty.cc (class tty_printer): Remove lines_per_page and + columns_per_page members. New member nlines. + (DEFAULT_LINES_PER_PAGE): Deleted. + (tty_printer::tty_printer): Don't compute lines_per_page from + font::paperlength. Don't compute columns_per_page from + font::paperwidth. + (tty_printer::add_char): Don't check horizontal position against + columns_per_page. Grow glyphs vector if neccessary. + (tty_printer::end_page): Add argument giving page_length in units. + Discard lines past end of page. + +Wed Sep 16 06:29:52 1992 James Clark (jjc at jclark) + + * tmac/tmac.tty-char: Fix definition of \(/l. + + * tmac/tmac.X: Define \(en. + +Tue Sep 15 10:37:13 1992 James Clark (jjc at jclark) + + * acgroff.m4 (GROFF_PRINT): If a system has lpr and lp but not + lpq, then use lp rather than lpr. + + * tmac/tmac.s (par@reset): Don't call `ad'. + (par*env-init): Call `ad'. + +Sun Sep 13 18:48:20 1992 James Clark (jjc at jclark) + + * mdate.sh: Use $(NF) instead of $6 to extract year from output of + date. + + * troff/symbol.cc: #undef BLOCK_SIZE if it's defined. + * indxbib/indxbib.cc: Likewise. + +Sun Sep 6 09:44:46 1992 James Clark (jjc at jclark) + + * libgroff/putenv.c: New file. + * libgroff/Makefile.sub: Add putenv.c to CSRCS. + * Makefile.in: Say that putenv.o can be one of LIBOBJS. + * configure.in: Test for putenv with AC_REPLACE_FUNCS. Test for + stdlib.h with AC_HAVE_HEADERS. + +Sat Sep 5 18:11:52 1992 James Clark (jjc at jclark) + + * indxbib/dirnamemax.c: Include only if + does not exist. + +Fri Sep 4 09:43:26 1992 James Clark (jjc at jclark) + + * eqn/box.cc (gsize): Make it an int. + (set_gsize): Parse argument handling increment or decrement. + (box::top_level): Convert gsize to a string. + + * troff/input.cc (exit_troff): Make buf unsigned char []. + Call to make_temp_iterator casts buf to char*. + + * Makefile.in ($(TARGETS), dot): Pass $(MDEFINES) to recursive makes. + + * Makefile.ccpg (depend.temp): Depends on $(YTABC). + * Makefile.cpg (depend.temp): Likewise. + + * Makefile.dep: Remove Makefile.dep from $(REALCLEANFILES). + + * Makefile.comm: Add y.output to MOSTLYCLEANFILES. + +Thu Sep 3 08:01:55 1992 James Clark (jjc at jclark) + + * tmac/tmac.s (B, I, BI, CW): Rewrite avoiding aliases. + +Tue Sep 1 18:24:53 1992 James Clark (jjc at jclark) + + * Version 1.06 released. + + * Integrate mm 1.04. + +Fri Aug 28 11:28:19 1992 James Clark (jjc at jclark) + + * Makefile.comm, Makefile.ccpg, Makefile.cpg: Fix TAGS target. + +Thu Aug 27 11:03:33 1992 James Clark (jjc at jclark) + + * afmtodit/afmtodit.pl: Add -n option that disables generation of + ligatures command. + * devps/generate/Makefile (CR, CB, CI, CBI): Pass -n flag to + afmtodit. Regenerate. + + * tmac/tmac.e ()z): Adjust _b if necessary so as to avoid moving + @f back past the current position. + + * tmac/tmac.e: Change calls to @R so that comments are not part of + arguments. + +Tue Aug 25 10:42:07 1992 James Clark (jjc at jclark) + + * configure.in: Check for mkstemp with AC_HAVE_FUNCS. + + * acgroff.m4 (GROFF_PROG_CCC): Don't check for . Instead + check that we can link a call to a function declared in . + (GROFF_UNISTD_H): New macro. + * configure.in: Call it. + * Makefile.in: Document it. + * include/posix.h: New file. + * troff/troff.h: Don't include + * troff/input.cc: Include posix.h. + * libgroff/new.cc, libgroff/tmpfile.cc: Include posix.h rather than + osfcn.h. + * indxbib/indxbib.cc, libbib/{search.cc,linear.cc,index.cc}: + Include posix.h rather , , , + . + * indxbib/indxbib.cc (S_IRUSR, S_IRGRP, S_IROTH): Delete definitions. + * libbib/index.cc (S_ISREG, O_RDONLY): Delete definitions. + * libbib/search.cc (O_RDONLY): Delete definition. + * refer/refer.cc, include/driver.h, pic/pic.h, groff/groff.cc: + Don't include . + + * acgroff.m4 (GROFF_TIME_T): New macro. + * configure.in: Call it. + * Makefile.in: Document it. + + * acgroff.m4 (GROFF_TRADITIONAL_CPP): New macro. + * configure.in: Call it. + * Makefile.in: Document -DTRADITIONAL_CPP. + * include/ptable.h: Don't include generic.h. + (name2): Define it. + + * tmac/tmac.s (][): Make [T1 and [T2 aliases for [T. + Afterwards remove [T1 and [T2. + (ref*spec!0, ref*spec!2): Use T1 rather than T. + (ref*spec!1, ref*spec!4, ref*spec!4): Use T2 rather than T. + (ref*add-T2): Renamed from ref*add-T. + (ref*add-T1): New macro. + +Mon Aug 24 11:11:11 1992 James Clark (jjc at jclark) + + * acgroff.m4 (AC_PROG_CCC): Use GROFF_EXIT rather than exit 1. + + * libbib/index.cc: Include . + (O_RDONLY): Define if necessary. + (make_index_search_item, index_search_item_iterator::get_tag, + index_search_item::check_files): Use O_RDONLY. + * libbib/seach.cc: Include , , . + (O_RDONLY): Define if necessary. + (search_list::add_file): Use O_RDONLY. + * indxbib/indxbib.cc: Include , , + . + (S_IRUSR, S_IRGRP, S_IROTH): Define if necessary. + (main): Use these. + + * libbib/index.cc (S_ISREG): Define it if necessary. + (index_search_item::load): Use S_ISREG. + + * include/driver.h: Include . + +Sun Aug 23 11:32:18 1992 James Clark (jjc at jclark) + + * eqn/box.cc (body_height): Increase default value to 85. + (body_depth): Increase default value to 35. + +Fri Aug 21 05:34:42 1992 James Clark (jjc at jclark) + + * eqn/pbox.h (SAVE_FONT_STRING): Define it. + * eqn/box.cc (box::top_level): Hide use of \R in a string that is + protected from expansion with \E. + + * acgroff.m4 (GROFF_PAGE): Use `case' to test domain. + + * Makefile (Makefile): New target. + + * Makefile.sub (configure, distfiles): New targets. + + * acgroff.m4 (GROFF_BROKEN_SPOOLER_FLAGS): Avoid using ${var:-val} + construct. + +Thu Aug 20 12:27:26 1992 James Clark (jjc at jclark) + + * eqn/box.cc (param_table): Add body_height and body_depth. + + * eqn/lex.cc (def_table): Make circumflex in hat_def roman. + +Tue Aug 18 16:24:25 1992 James Clark (jjc at jclark) + + * psbb/Makefile.sub: Don't link with libgroff.a. + + * acgroff.m4 (GROFF_PUTENV): New macro. + * configure.in: Call GROFF_PUTENV. + * Makefile.in: Document STDLIB_H_DECLARES_PUTENV. + * groff/groff.cc: Don't declare putenv if STDLIB_H_DECLARES_PUTENV + is defined. + + * troff/env.cc (distribute_space): Rename force_forward argument + to force_reverse. Reverse the list if force_reverse is true. + +Mon Aug 17 17:49:05 1992 James Clark (jjc at jclark) + + * tmac/tmac.an: Don't define a string `T'. Just define Tm. + + * eqn/pile.cc (matrix_box::compute_metrics): Don't allow computed + height or depth to be negative. Guard against SUP_RAISE quantity + being negative. + +Sat Aug 15 08:18:54 1992 James Clark (jjc at jclark) + + * devps/generate/textmap: Add `an' (arrowhorizex). + * tmac/tmac.ps: \(an overlaps horizontally. + * tmac/tmac.dvi, tmac/tmac.tty: Add `an'. + + * devps/symbolchars: Add arrowverttp, arrowvertbt. + * devps/textmap: Add arrowvertex. + * eqn/delim.cc (delim_table): Add uparrow, downarrow and + updownarrow delimiters. + * tmac/tmac.ps, tmac/tmac.X: Add definition of \(va. + + * tbl/table.cc (simple_entry::position_vertically, + block_entry::position_vertically): For a centered entry, perform + the motion in two stages. + + * refer/refer.cc (split_punct): Don't call lookup_token if there + is no token. + +Fri Aug 14 11:14:58 1992 James Clark (jjc at jclark) + + * troff/input.cc (token::next): Delete token_node after copying + token. + + * grodvi/grodvi.cc (dvi_printer::dvi_printer): Initialize + cur_point_size. + + * libdriver/printer.cc (printer::load_font): Delete old_font_table. + + * grops/ps.cc (ps_printer::define_encoding): Delete elements of vec. + +Tue Aug 11 13:50:38 1992 James Clark (jjc at jclark) + + * grops/ps.cc (usage): -b option takes an argument. + + * devps/prologue (PLG): New procedure. + * grops/ps.cc (main, usage): New -g option. + (ps_printer::~ps_printer): If guess_flag is set, guess the paper + length using PLG. + +Mon Aug 10 11:17:53 1992 James Clark (jjc at jclark) + + * include/cset.h: Include if we have it. + + * libgroff/illegal.cc: New file. + * include/lib.h (illegal_input_char): Use table. + * troff/input.cc (ESCAPE_RIGHT_PARENTHESIS): Renumber to 0206. + * pic/lex.cc (ARG1): Renumber to 14. + * eqn/lex.cc (ARG1): Likewise. + + * troff/Makefile.sub (majorminor.cc): Handle 3 part versions + (eg 1.05.90) correctly. + +Sun Aug 9 13:35:43 1992 James Clark (jjc at jclark) + + * tmac/tmac.e (sr): Deleted. Set $r and $R directly. + Rename $r and $R registers to $v and $V. + ($r, $R): Initialize to 0. + (@v, @V): New macros. + (sz): Call @v. + (@M): Call @V. + + * troff/input.cc (main, usage): Add -R option that says not to + load troffrc. + * eqn/main.cc (main, usage): Rename -n to -R. + +Sat Aug 8 00:16:00 1992 James Clark (jjc at jclark) + + * devps/DESC.in: Leave font positions 5-9 blank. + * devdvi/DESC.in: Likewise. + + * grog/grog.pl: Handle `.PS 0. + + * macros/tmac.e (@R, @S): New macros. + Declare @, po, $0, $i, $p, df, so, fu, bt, *, ?a, ?b, ?C, ?e, ?H, + ?I, ?n, ?o, ?R, ?s, ?T, ?W, ?w registers with @R. + Declare $H, $[0-9], .. macros with @S. + Declare |0, |1, |2, |3 strings with @S. + + * macros/tmac.e (@S): Rename to @U. + + * macros/tmac.e (@z): Define @b and bp as empty instead of + deleting them, + + * macros/tmac.e (@m): Deleted. + (@h): Don't call @m. + (@z): Don't set @m trap. + + * macros/tmac.e ($h, $f): Define |z as empty string. + + * macros/tmac.e (@D): Rework to avoid unbalanced .el requests. + (@q): Likewise. + + * macros/tmac.e (@h): Set ?H, ?C , ?s registers to 0 rather than + removing them. + ()f): Likewise for * register. + + * macros/tmac.e (sr): Don't ever scale the arguments. If the third + argument is missing, don't change $R. Call sr with three + arguments when initializing. + +Thu Jul 16 12:17:12 1992 James Clark (jjc at jclark) + + * macros/tmac.e (sr): New macro. + Initialize $r and $R using sr. + + * macros/tmac.e (,): Delete \*(#[. + + * troff/env.c (set_tabs): Read the tab type even if the position + is bad. Allow the position of the first tab stop to be negative. + +Wed Jul 15 13:14:37 1992 James Clark (jjc at jclark) + + * refer/dirnamemax.c: Use pathconf() if defines + _POSIX_VERSION. + * refer/Makefile: Compile dirnamemax.c using -DHAVE_UNISTD_H + rather than -DPATHCONF_MISSING. + * Makefile: Get rid of PATHCONF_MISSING. + + * refer/map.c: New file. + * refer/index.c: Interface to mmap through map.c. Rename map_size + to map_len. + * refer/Makefile: Handle map.c. + * Makefile: Include -DHAVE_MMAP in OLDCFLAGS rather than CFLAGS. + +Tue Jul 14 14:15:20 1992 James Clark (jjc at jclark) + + * Makefile: RANLIB should be `true' if there is no ranlib. + * lib/Makefile (libgroff.a): Simplify. + * driver/Makefile (libdriver.a): Simplify. + + * Makefile: Change -DWAIT_COREDUMP_0200 to -DWCOREFLAG=0200. + * groff.c (WCOREDUMP): Use WCOREFLAG. Define only if not already + defined. + +Sat Jul 11 09:19:17 1992 James Clark (jjc at jclark) + + * troff/env.c (compare_ranges): Declare as extern "C". + + * troff/input.c (init_registers): Use `struct tm' instead of `tm'. + + * macros/tmac.s, macros/tmac.e: Change .nx /dev/null to .nx. + +Wed Jul 8 11:52:27 1992 James Clark (jjc at jclark) + + * pic/troff.c (troff_output::text): Merge in grops_output::text, + but conditionalize use of \X based on \*(.T. + (grops_output::*): Deleted. + * pic/output.h: Delete declaration of make_grops_output. + * pic/main.c (main): Ignore -p and -x. driver_extension_flag is 1 + by default. -n sets it to 0. + (usage): Corresponding changes. + * groff.c (main): Don't pass -x or -p to pic. + * groff.sh: Likewise. + + * ps/ps.c (ps_printer::do_exec, ps_printer::do_file): Force ndefs + to be non-zero. + + * ps/devps/afmtodit: Change calculation of asc_boundary and + desc_boundary. Make these bounds inclusive. + * ps/devps: Regenerate font files. + +Tue Jul 7 13:14:15 1992 James Clark (jjc at jclark) + + * macros/tmac.latin1: New file. + * macros/tmac.tty-char: Use tmac.latin1. + (tmac.tty-tr): Deleted. + * macros/Makefile: Install tmac.latin1. + * macros/tmac.dvi: Use tmac.latin1. + * macros/troffrc: Translate \[char160] onto no-break space here. + * macros/{tmac.dvi,tmac.ps,tmac.tty,tmac.X75}: Don't do it here. + +Mon Jul 6 11:06:52 1992 James Clark (jjc at jclark) + + * macros/tmac.Xps: Use `do' request. + + * macros/tmac.ps: Use `do' request. + + * macros/tmac.e (@C): Use `do' request. + + * macros/tmac.X, macros/tmac.Xps: Moved from xditview. + * macros/Makefile: Install tmac.X*. + + * tty/tmac.tty, tty/tmac.tty-char: Move to macros. + * tty/Makefile: Don't install tmac.tty*. + * macros/Makefile: Install tmac.tty*. + + * dvi/tmac.dvi: Move to macros. + * dvi/Makefile: Don't install tmac.dvi. + * macros/Makefile: Install tmac.dvi. + + * ps/tmac.ps*: Move to macros. + * ps/Makefile: Don't install tmac.ps*. + * macros/Makefile: Install tmac.ps*. + + * eqn/box.c: Provide draw_lines parameter corresponding to -D + option. + * macros/eqnrc: Set draw_lines parameter based on device. + * groff.c: Don't pass -D flag to eqn. + * groff.sh: Likewise. + * eqn/main.c: Warn about use of -D. + + * troff/input.c (process_startup_file): New function. + (main): Call process_startup_file(). + * macros/troffrc: New file. + * macros/Makefile: Install troffrc. + * groff.c (main): Don't pass extra -m option to troff. For a + pseudo device pass the name of the pseudo device to troff using + -d. + * groff.sh: Likewise. + * groff.c (possible_command::prepend_arg): Deleted. + + * troff/input.c (do_request): New function. + (init_input_requests): Bind "do" to do_request. + + * eqn/main.c (main): Instead of loading eqnchar from device directory, + load eqnrc from macro directory. + * macros/eqnrc: New file. + * macros/Makefile: Install eqnrc. + * ps/devps/eqnchar: Deleted. + * ps/devps/Makefile: Don't install eqnchar. + * dvi/devdvi/eqnchar: Deleted. + * dvi/devdvi/Makefile: Don't install eqnchar. + * groff.c (main): Pass -M to eqn. Don't pass -F to eqn. New + variable optM. + + * lib/device.[ch]: New files. + * lib/font.h (font::set_device_name, font::get_device_name): + Deleted. + * lib/fontfile.c: Use device.h. + * lib/Makefile: Handle device.[ch]. Make paths.h define DEVICE. + * troff/input.c: Delete definition of `device'. + (main): Don't initialize device. + * troff/troff.h: Include device.h rather than declaring device. + * troff/Makefile: No need to handle DEVICE. + * driver/input.c: Include device.h. Don't use + font::{set,get}_device_name. + * groff.c, Makefile: Rename device.h to config.h. + * groff.c: Use library device variable. + * eqn/main.c: Use library device variable. + * eqn/Makefile: No need to handle DEVICE. + + * lib/searchpath.[ch]: New files. + * lib/Makefile: Handle searchpath.[ch]. + * troff/input.c (open_file, init_dirs): Deleted. + (macro_dirs): Deleted. + (open_mac_file, macro_source): Use class search_path. + (add_string, struct string_list): Move definition. + (main): Change -M option to use macro_path. Delete call to + init_dirs(). + * lib/fontfile.c (font::command_line_font_dir, font::open_file): + Rewrite to use class search_path. + * lib/font.h, lib/fontfile.c (font::cl_font_dirs): Deleted. + * lib/Makefile: fontfile.c depends on searchpath.h. + * lib/Makefile: Rename fontpath.h to paths.h. Make paths.h define + MACROPATH. + * lib/macropath.[ch]: New files. + * troff/Makefile: No need to handle MACROPATH. + + * troff/input.c: Delete DUMP code. + * lib/fontfile.c, lib/font.h: Delete + font::forget_command_line_font_dirs. + + * troff/input.c (push_token): New function. + (handle_first_page_transition): Use push_token(). + (process_input_stack): Change handling of a space at the beginning + of the line. + +Sun Jul 5 17:11:09 1992 James Clark (jjc at jclark) + + * troff/input.c (font_dirs): Delete unused variable. + + * eqn/lex.c (do_set): Correct error messages. + +Sat Jul 4 10:20:55 1992 James Clark (jjc at jclark) + + * troff/input.c (do_define_string): Allow the string name to be + followed immediately by a tab. + (define_character): Likewise. + +Thu Jul 2 10:59:15 1992 James Clark (jjc at jclark) + + * ps/ps.c (ps_printer::draw): When drawing an arc, don't allow k to + be negative. + + * troff/input.c (input_iterator::is_file): New virtual function. + (file_iterator::is_file): New function. + (input_stack::end_file): New function. + (input_stack::next_file): Handle the situation where there is no + file on the input stack correctly. Avoid making two passes over + the input stack. + (next_file): Make the filename optional; in this case call + input_stack::end_file(). + +Wed Jul 1 10:17:25 1992 James Clark (jjc at jclark) + + * dvi/tmac.dvi: Change the definitions of \(ul and _ so that they + produce a real _ charater when the current font is CW and _ + otherwise. + + * lib/errarg.c (errarg::errarg(const char *)): Invert conditional + expression to work around gcc 2.2 bug. + +Wed Jun 24 08:12:24 1992 James Clark (jjc at jclark) + + * eqn/main.c (main): Don't give an error if we can't find eqnchar. + + * troff/env.c (environment::add_padding): New function. + (environment::add_char): Use add_padding(). + (environment::space): Likewise. + (environment::wrap_up_field): Add some padding if there is none + and there's no current tab. + * troff/env.h: Declare environment::add_padding. + +Mon Jun 22 08:37:45 1992 James Clark (jjc@jclark) + + * pic/pic.y: undef fmod and rand before declaring them. + +Sun Jun 14 11:40:18 1992 James Clark (jjc@jclark) + + * troff/input.c (main): If the DESC file specifies a font name of + 0, then leave the corresponding font position empty. + + * nroff.sh: New file. + * Makefile (install.nobin): Install nroff.sh. + + * tty/devlatin1/R.proto: Add ao as synonym for de. + * tty/tmac.tty-char: Define ao as o. + + * tty/dev{ascii,latin1}/R.proto: Add aq. + * tty/tmac.tty-char: Delete definition of aq. + +Mon Jun 8 11:43:20 1992 James Clark (jjc@jclark) + + * troff/input.c (init_charset_table): Don't translate 0240. + * ps/tmac.ps: Translate char160 to space. + * dvi/tmac.dvi: Likewise. + * tty/tmac.tty: Likewise. + +Sun Jun 7 10:52:35 1992 James Clark (jjc@jclark) + + * dvi/tmac.dvi: Add support for all Latin-1 characters. + + * macros/tmac.s: Delete definitions of \(rg, \(ah, \(ad, \(a-, + \(ao, \(ac, \(ho, \(-D, \(Sd, \(TP, \(Tp, \(ss, \(AE, \(ae, \(OE, + \(oe, \(r?, \(r!. + + * tty/tmac.tty-char: Add \(ah. + + * dvi/tmac.dvi: Add definitions of Tp, TP, Sd, -D, ho. + No need to define \(FM and \(!/. Conditionalize all character + definitions. + + * ps/devps/lgreekmap: Add +h, +f, +p. + + * ps/tmac.psnew: New file. + * ps/Makefile: Install tmac.psnew. + + * troff/input.c (charinfo_to_node_list): Don't ever interpret + character definitions in compatible mode. + + * troff/input.c (remove_character): New function. + (init_input_requests): Bind remove_character to "rchar". + + * ps/tmac.psold: New file. + * ps/Makefile: Install tmac.psold. + * ps/tmac.ps: Load tmac.psold. Move definitions of ISO Latin-1 + characters into tmac.psold. Make these definitions unconditional. + + * tty/tmac.tty-char: Define \n(_C only if it is not already defined. + + * ps/tmac.ps: Don't define \('c and \('C. + + * ps/devps/textmap: Move Greek characters to... + * ps/devps/symbolchars: + +Sat Jun 6 16:41:17 1992 James Clark (jjc@jclark) + + * ps/devps/text.enc: Add quotesingle. + * ps/devps/textmap: Add +h, +f, +p, Fn, Bq, bq, aq, lz. + * tty/tmac.tty-char: Likewise. + * dvi/devdvi/texmi.map: Add +h, +f, +p. + * dvi/devdvi/texi.map: Add Fn. + * dvi/devdvi/msam.map: Add lz. + * dvi/tmac.dvi: Handle Bq, bq, aq. + + * pic/lex.c (get_token): Recognize 'th. + * pic/map.y: Allow `expr'th in contexts where ORDINAL was allowed. + +Fri Jun 5 11:20:46 1992 James Clark (jjc@jclark) + + * ps/devps/textmap: Move di, mu, +- to... + * ps/devps/symbolchars: + + * macros/tmac.s (@XS): Don't call par@reset or fi. + (XA): Call LP. Turn off adjustment. Reduce line length. + + * macros/tmac.s: Initially alias XS to LP. + (XS): Rename to @XS. + (cov*ab-init): Alias XS to @XS. + +Thu Jun 4 09:12:05 1992 James Clark (jjc@jclark) + + * troff/token.h: Delete TOKEN_CHAR_HEIGHT, TOKEN_CHAR_SLANT, + TOKEN_FONT_NAME, TOKEN_FONT_POSITION, TOKEN_SIZE tokens. + (token::is_size, token::changes_env): Deleted. + * troff/number.c (parse_term): No need to process \s explicitly. + Call tok.next() only after scale indicator has been processed. + * troff/input.c (do_overstrike, do_bracket): No need to process \s, + \f etc explicitly. + (token::next): Handle \s, \f, \S, \H immediately rather than + returning them as tokens. + (token::operator==, token::description, token::add_to_node_list, + token::process): Remove handling of deleted tokens. + + * troff/env.c (environment::add_char): When adding padding + indicator character, call start_line() if necessary. + +Wed Jun 3 09:55:50 1992 James Clark (jjc@jclark) + + * ps/devps/afmtodit: Don't output 0 kerns. + + * ps/devps/afmtodit: Remove directory from name of encoding in + font description file. + + * ps/devps/afmtodit: Improve error messages. + + * ps/devps/afmtodit: Allow DESC file to be specified with -d. + + * ps/devps/Makefile: Incorporate FontMakefile. Rework. + * ps/devps/FontMakefile: Deleted. + * ps/devps/afmname: New file. + + * ps/devps/symbol.sed: New file. + * ps/devps/symbol.diff: Deleted. + * ps/devps/FontMakefile: Generate symbol.afm using symbol.sed. + Generate zapfdr.afm from zapfd.afm. + + * tty/tmac.tty (tty-char): Prefix definition with ". + + * macros/tmac.an (TP): Don't start a diversion if one has already + been started. + + * tty/tmac.tty-char: Add Latin-1 characters. + + * tty/tmac.tty-char: Incorporate suggestions from Paul Eggert. + +Tue Jun 2 00:54:34 1992 James Clark (jjc@jclark) + + * tbl/table.c (table::allocate): Delete old_vline, old_entry. + Move declaration of struct horizontal_span. + + * tbl/table.c (table::table): Initialize span_list. + (table::~table): Delete span_list. + + * lib/ptable.h (PTABLE(T)::~PTABLE(T)): Delete v. + + * ps/devps/Makefile: Avoid dependency on GNU make. + + * ps/tmac.ps: Check that character does not already exist before + defining it. + + * tty/tmac.tty: Add definitions of \(ff, \(!=, \(==, \(~=, \(sq, + \(OE, \(oe, \(AE, \(ae, \(lh, \(rh. Delete definitions of \(en, + \(ru, \(ul, \(br, \(bv, \(sl which are in the font description + files. + + * tty/tmac.tty-char: New file. + * tty/Makefile: Install tmac.tty-char. + * tty/tmac.tty: Move definitions of \(ua, \(da, \(uA, \(dA into + tmac.tty-char. + + * tty/tmac.tty: Fix definition of \(34. + + * tty/dev{ascii,latin1}/R.proto: Add ha and ti. Map + bracket-drawing characters onto |. Add *o. + + * troff/env.c (environment::wrap_up_tab): Increment field_spaces + only if current_field. + + * troff/dictionary.c (dictionary::lookup): Free old_table after + rehashing. + +Mon Jun 1 10:15:22 1992 James Clark (jjc@jclark) + + * tty/dev{ascii,latin1}/R.proto: Add uppercase Greek characters + whose glyphs are identical to glyphs of some Roman character. + + * tty/devlatin1/R.proto (bu): Deleted. + * tty/devascii/R.proto (bu): Deleted. + * tty/tmac.tty: Add definition of \(bu. + + * eqn/main.c (do_file): Pass FILE as argument. + (main): Automatically load eqnchar. New options -F and -n. + Pass do_file an opened FILE. + * groff.c: Don't pass eqnchar to eqn. Pass -F options onto eqn. + No need to include font.h. + * groff.sh: Likewise. Don't need to use - for standard input. + Prefix files with -- if first file starts with -. + + * macros/tmac.e: Conditionalize use of \$* on \n(.g. + + * troff/env.c (environment::possibly_break_line): Don't set line + to 0 across call to output_line(). Don't call output_line() until + after discarding nodes after break. + +Sun May 31 10:45:29 1992 James Clark (jjc@jclark) + + * request.h (macro::empty): Declare it. + * input.c (macro::empty): New method. + (interpolate_macro): Don't give a WARN_SPACE if the two-character + macro is empty. + +Sat May 30 10:27:15 1992 James Clark (jjc@jclark) + + * troff/env.c (environment::start_field): Decrement space_total + when a space is frozen. + +Fri May 22 14:34:38 1992 James Clark (jjc@jclark) + + * macros/tmac.an (R): Delete macro. + + * troff/input.c (get_copy, token::next): Support \# (like \" but + newline is ignored). + + * troff/input.c (token::next): Fix error message in 'Y' case. + +Thu May 21 09:26:24 1992 James Clark (jjc@jclark) + + * eqn/delim.c (define_extensible_string): Recognize any prefix of + a delimiter name. + +Fri May 15 10:20:41 1992 James Clark (jjc at jclark) + + * c++test.c: Include . + + * lib/strtol.c, lib/getcwd.c, ps/psbb.c: Declare errno in case + doesn't. + +Fri May 8 09:37:19 1992 James Clark (jjc at jclark) + + * tbl/table.c (table::divide_span): Don't count column separation + if expand was specified. + + * tbl/main.c (process_format): Don't ignore width specs in + continued format. Give warning for changing equal widths or + column separation in continued format. + (process_data): Set column separation, minimum width, equal + columns at end of table. + +Thu May 7 08:50:40 1992 James Clark (jjc at jclark) + + * troff/node.c (kern_pair_node::add_discretionary_hyphen, + node::add_discretionary_hyphen): Use soft_hyphen_char. + (set_soft_hyphen_char): New function. + (init_node_requests): Bind to shc. Initialize soft_hyphen_char. + + * Makefile (c++tested): Give more helpful message if test fails. + +Tue May 5 10:58:39 1992 James Clark (jjc at jclark) + + * troff/input.c (init_charset_table): Translate 0240 to + an unbreakable space. + + * troff/token.h (token::hyphen_indicator): New function. + * troff/charinfo.h (TRANSLATE_HYPHEN_INDICATOR): New special + translation. + * troff/input.c (translate): Allow translation to \%. + * troff/node.c (node::add_char): Handle + TRANSLATE_HYPHEN_INDICATOR. + (make_node): Don't allow TRANSLATE_HYPHEN_INDICATOR here. + + * troff/input.c (init_charset_table): Don't set BREAK_AFTER flag + for \(hy. + + * tty/devlatin1/R.proto: \(hy and - should print as 055. + +Tue Apr 21 09:24:42 1992 James Clark (jjc at jclark) + + * groff.c (run_commands): If the last command gets a SIGPIPE send + a SIGPIPE to all children than haven't yet terminated. When + command terminates, set pid field to -1. + +Fri Apr 17 11:20:48 1992 James Clark (jjc at jclark) + + * groff.c (main): Pass an appropriate -filename option to gxditview. + +Thu Apr 16 15:11:40 1992 James Clark (jjc at jclark) + + * Makefile.bd (install): Remove existing program before copying. + + * Makefile, */Makefile, Makefile.bd, groff.sh, groff.c: Allow + programs which have Unix counterparts to be installed with + user-specified prefix. + + * troff/input.c (exit_troff): Don't check if exit_started. + (exit_request): Don't call exit_troff if exit_started. + + * Makefile.bd (install.mm): Rename to install.dwbmm. + +Tue Apr 14 10:05:10 1992 James Clark (jjc at jclark) + + * driver/input.c (do_file): Add missing break for '#' case. + +Mon Apr 13 10:11:02 1992 James Clark (jjc at jclark) + + * troff/input.c (input_stack::clear): Clear past any boundaries and + then add the boundaries back. + + * troff/input.c (exit_troff): Return immediately if already + exiting. + + * macros/tmac.s (pg@end-text): New macro. Use pg@end-text for the + end macro. + (pg*end-page): If the text has ended and there are no more + footnotes or keeps, exit. + + * macros/doc-ditroff (Lq, Rq): Define as \(lq and \(rq. + + * troff/input.c (init_charset_table): Make \(rq transparent by + default. + + * macros/tmac.an: Define lq and rq strings. + + * macros/tmac.s (Q, U): Define as \(lq and \(rq. + +Sun Apr 12 12:54:37 1992 James Clark (jjc at jclark) + + * troff/env.c (environment::final_break): New function. + (environment::newline): Set prev_line_interrupted to 2 if + exit_started. + * troff/env.h: Declare environment::final_break. + * troff/input.c (exit_troff): Call environment::final_break() + instead of environment::do_break(). + + * macros/Makefile: Install man.local if $(MACRODIR)/man.local + doesn't already exist. + * macros/man.local: New file. + * macros/tmac.an: Load man.local. + * macros/man.ultrix: New file. + +Sat Apr 11 17:32:04 1992 James Clark (jjc at jclark) + + * troff/input.c (exit_groff): Rename to... + (exit_troff): New function. + + * troff/div.c (exit_started, done_end_macro, + seen_last_page_ejector): New global variables. + (began_page_in_end_macro): New static variable. + (exit_flag): Deleted. + (top_level_diversion::top_level_diversion): Initialize + last_page_count. + (top_level_diversion): More elaborate test for whether + cleanup_and_exit() should be called. + Set began_page_in_end_macro if the end macro isn't yet finished. + * troff/div.h (top_level_diversion::last_page_count): New data + member. + (top_level_diversion::set_last_page): New function. + (exit_started, done_end_macro, seen_last_page_ejector): Declare. + * troff/env.c (do_break): Zero prev_line_interrupted. + * troff/input.c (exit_flag): Delete declaration. + (LAST_PAGE_EJECTOR): New magic cookie. + (token::next): Handle LAST_PAGE_EJECTOR. + (exit_groff): Set exit_started and done_end_macro instead of + exit_flag. Call top_level_diversion::set_last_page. Push a + LAST_PAGE_EJECTOR instead of calling push_page_ejector(). Do + another ejection after setting seen_last_page_ejector. + +Thu Apr 9 04:37:11 1992 James Clark (jjc at jclark) + + * etc/grog.sh, etc/grog.sh: Recognize -me sh macro. + + * macros/tmac.e (TH): Make sure there's room for the initial + header. + + * macros/tmac.s (par@init): Make PD and DD at least \n(.V. + Set FVS in points rather than units. + +Mon Apr 6 11:21:32 1992 James Clark (jjc at jclark) + + * troff/div.c (top_level_diversion::add_trap): Don't consider the + position of empty slots. + +Fri Apr 3 10:46:45 1992 James Clark (jjc at jclark) + + * ps/devps/S: Fix height and depth of parenrightex. + * ps/devps/symbol.diff: Regenerate. + +Sat Mar 28 21:17:52 1992 James Clark (jjc at jclark) + + * tmac.e (u): Do underlining as in -mgs. + +Fri Mar 27 09:23:44 1992 James Clark (jjc at jclark) + + * tty/tty.c (tty_printer::end_page): If overstriking is + suppressed, still turn overstruck horizontal and vertical lines + into +. + + * lib/new.c: Back out Feb 24 change; no longer needed with gcc + 2.1. + + * refer/label.y (format_expr::evaluate): Avoid use of %0*d. + +Wed Mar 18 09:29:10 1992 James Clark (jjc at jclark) + + * Version 1.05 released. + +Tue Mar 17 16:50:45 1992 James Clark (jjc at jclark) + + * tty/tty.c: Instead of keeping an array of glyphs and then + sorting it, keep a ordered linked list of glyphs for each line. + + * driver/driver.h: Include stddef.h. + + * tty/tty.c (compare_glyph): + * refer/refer.c (rcompare): + * troff/env.c (compare_ranges): Arguments of qsort comparison + function should be const void *. + + * troff/number.c (parse_term): + * dvi/dvi.c (draw_dvi_printer::draw): Avoid initialization in + switch statement. + + * refer/label.y (consider_authors): Don't access variables + constructed under a condition outside that condition: put braces + round for statement containing declaration; redeclare use of same + variable later. + + * pic/pic.y (text_expr): Delete production that allows + parenthesised text_expr. + (expr): Allow a conditional_expr to appear in parentheses. + (conditional_expr): Rename to any_expr. + + * mm: Install new version 1.01 from jh. + + * lib/font.c (font::get_width): Cache scaled widths. + (font::font): Initialize widths_cache. + (font::~font): Destroy widths_cache. + * lib/font.h: Add font::widths_cache. Declare font_widths_cache. + +Mon Mar 16 10:16:10 1992 James Clark (jjc at jclark) + + * c++test.c, c++test.ref: New files. + * Makefile: Check that the C++ compiler works. + + * ps/tmac.pspic (PSPIC): Do a break. + + * ps/tmac.ps: Move definition of PSPIC into... + * ps/tmac.pspic: New file. + (PSPIC): Draw box around picture, but make it invisible to grops. + * ps/tmac.ps: Load tmac.pspic. + * ps/Makefile: Install tmac.pspic. + +Sun Mar 15 14:18:08 1992 James Clark (jjc at jclark) + + * lib/font.c (scale_round): If n is negative, + subtract .5 before truncating floating point result. + + * lib/fontfile.c: Include . + +Tue Mar 10 14:17:03 1992 James Clark (jjc at jclark) + + * driver/input.c (get_char): Inline. Don't update current_lineno. + Change callers to up date current_lineno if necessary. + Use get_char() instead of getc(current_file). + +Sun Mar 8 18:05:28 1992 James Clark (jjc at jclark) + + * ps/tmac.ps: Fix up spacing of \(mo and \(nm. + +Fri Mar 6 19:38:58 1992 James Clark (jjc at jclark) + + * tty/tty.c (tmac.tty): Define \(rg as (R). + +Tue Mar 3 10:11:25 1992 James Clark (jjc at jclark) + + * lib/lib.h: New define a_delete. + * Use a_delete instead of delete when deleting an array of objects + without destructors. + + * lib/lib.h: Rename adelete to ad_delete. + * Change uses of adelete. + +Mon Mar 2 12:41:05 1992 James Clark (jjc at jclark) + + * eqn/eqn.y: Include lib.h. + + * troff/node.c (grow_font_table): Delete old_font_table. + + * mm: Install new version from jh. + +Fri Feb 28 10:42:23 1992 James Clark (jjc at jclark) + + * tbl/table.h (format_type): Make global instead of local to class + entry_format. Prefix enumerators with FORMAT_. + * tbl/table.c, tbl/main.c: Corresponding changes. + * refer/token.h (token_type): Make global. Prefix enumerators + with TOKEN_. + * refer/token.[ch]: Corresponding changes. + * Makefile: Get rid of -DNO_NESTED_TYPES configuration option. + + * troff/div.c (node::set_vertical_size): Don't name argument. + +Thu Feb 27 10:29:19 1992 James Clark (jjc at jclark) + + * Makefile: New configuration option ARRAY_DELETE_NEEDS_SIZE. + * lib/lib.h: Define adelete accordingly. + * pic/object.c (graphic_object::graphic_object): + * tbl/main.c (format::~format): + * tbl/table.c (table::~table): + * refer/ref.c (reference::~reference, reference::merge, + reference::insert_field, reference::delete_field): Use adelete. + + * Makefile: Change NESTED_TYPES to NO_NESTED_TYPES. + * refer/token.h: + * tbl/table.h: Corresponding changes. + + * common.c (common_output::dashed_arc, common_output::dotted_arc): + Ensure total_angle is positive. + +Wed Feb 26 08:49:26 1992 James Clark (jjc at jclark) + + * refer/ref.c (reference::merge, reference::insert_field, + reference::delete_field): Avoid delete[0]. + + * refer/token.c (init_special_chars): Move calls to cmupper + outside calls to init_two_char_letter to work around bug in gcc + 2.0. + +Mon Feb 24 14:20:00 1992 James Clark (jjc at jclark) + + * lib/new.c (operator new): Use __builtin_new for g++. + + * pic/object.c (graphic_object::~graphic_object): Don't use + delete [] on 0. + + * pic/object.c (output::compute_scale): Initialize max_width and + max_height. + +Sat Feb 15 09:55:20 1992 James Clark (jjc at jclark) + + * troff/input.c (write_request): Call fflush. + + * troff/node.h (class composite_node): Move declaration to node.c + * troff/input.c (charinfo_to_node): Rename to ... + (charinfo_to_node_list): Return node list rather than composite + node. + * troff/node.c (make_composite_node): New function. + (make_node, add_char): Call make_composite_node instead of + charinfo_to_node. + (class composite_node): Add a tfont * member. Delete font_size + member. + (composite_node::composite_node, composite_node::copy, + composite_node::size): Corresponding changes. + (composite_node::tprint): Provide constant spacing, emboldening + and track kerning as specified in tfont. + (composite_node::width): Change width calculation accordingly. + * troff/env.h (environment::composite): New member. + (environment::is_composite, environment::set_composite): New + functions. + * troff/env.c (environment::environment): Initialize composite. + * troff/input.c (charinfo_to_node): Call + environment::set_composite. + * troff/node.c (make_composite_node, make_glyph_node): Use the + plain version of the tfont if the environment is composite. + + * troff/node.c (font_info::get_space_width): Additional argument + giving space_size. Handle constant space correctly. Scale by + space_size unless constant spaced. + (env_sentence_space_width): New function. + * troff/node.h: Declare it. + * troff/env.h (environment::get_space_size, + environment::get_sentence_space_size, + environment::get_narrow_space_width, + environment::get_half_narrow_space_width): Make inline. + (environment::get_space_width): Make inline. Just call + env_space_width. + * troff/env.c: Delete definitions for funtions made inline. + (environment::space_newline, environment::space): Use + env_sentence_space_width(). Don't scale by space_size. + * troff/node.h: Move declarations of env*space_width() functions + into env.h. + +Sat Feb 8 09:30:22 1992 James Clark (jjc at jclark) + + * macros/tmac.s (PS): Don't try to set negative indent. + +Thu Feb 6 09:00:35 1992 James Clark (jjc at jclark) + + * pic/pic.y: Fix min function. + +Tue Jan 28 07:52:29 1992 James Clark (jjc at jclark) + + * man/mdate.sh: Clear LANGUAGE. + +Sun Jan 19 13:02:41 1992 James Clark (jjc at jclark) + + * pic/pic.y, pic/lex.c: Rename COMMAND token to COMMAND_LINE. + * pic/lex.c: New COMMAND keyword. + * pic/pic.y (print_args, print_arg): New rules. + (placeless_element): Use print_args for PRINT. + New COMMAND element. + +Tue Jan 7 13:14:31 1992 James Clark (jjc at jclark) + + * troff/input.c (terminal): Handle missing argument correctly. + + * pic/pic.y (text_expr): New rule. + + * pic/pic.y: Implement := operator. + +Sun Jan 5 10:23:02 1992 James Clark (jjc at jclark) + + * etc/grog.pl, etc/grog.sh: Distinguish old and new versions of + mdoc. + +Sat Jan 4 14:42:26 1992 James Clark (jjc at jclark) + + * ps/devps/dingbatsrmap: Include this in the distribution. + + * macros/tmac.doc: Replace with new version from 2nd Networking + Release. Fix loading of doc-* files. + * macros/{doc-common,doc-ditroff,doc-nroff,doc-syms}: New files. + * macros/tmac.doc.old: New file. Apply fixes that had been + applied to old tmac.doc. + * macros/tmac.andoc: Check that we're running under groff. + * macros/Makefile: Rework. + +Fri Jan 3 13:27:51 1992 James Clark (jjc at jclark) + + * tbl/table.h (format_type): + * refer/token.h (token_type): If NESTED_TYPES is defined, use + typedef to make these types visible at file scope. + * Makefile: Add NESTED_TYPES configuration option. + + * troff/div.c (mark): At the top level use the value of + nl_reg_contents rather than the current vertical position. + +Thu Jan 2 10:34:51 1992 James Clark (jjc at jclark) + + * tty/tty.c: Implement \D for horizontal or vertical lines. + (tty_printer::set_char): Use vec_used+2 as serial number. + Don't allow size of vector to exceed USHRT_MAX-2. + Split off part into... + (tty_printer::add_char): New function. + (tty_printer::draw): New function. + (compare_glyph): Handle equal serial numbers. + (tty_printer::end_page): Handle overstruck characters from \D. + (main, usage): Implement -d option. + +Mon Dec 23 10:37:51 1991 James Clark (jjc at jclark) + + * tbl/main.c (process_format): + * eqn/text.c (split_text): + * troff/input.c (token::next): Use inner block for declarations + with initializers in switch statement. + +Mon Dec 16 20:52:03 1991 James Clark (jjc at jclark) + + * pic/common.c (common_output::dash_line): Cope with zero-length + lines. + +Sun Nov 17 12:04:08 1991 James Clark (jjc at jclark) + + * Version 1.04 released. + +Wed Nov 13 05:27:21 1991 James Clark (jjc at jclark) + + * macros/tmac.an (TH): Define a macro an-init to define variables + based on command line arguments. + (an-header): Call it. + +Sun Nov 3 12:07:34 1991 James Clark (jjc at jclark) + + * Makefile (install.mm): Rename to install.dwbmm. + + * Makefile: Integrate mm. + * mm: New directory. + +Wed Oct 30 10:11:34 1991 James Clark (jjc at jclark) + + * refer/dirnamemax.c: If PATHCONF_MISSING is defined, include + . + + * pic/troff.c (troff_output::simple_spline, + troff_output::simple_polygon): Rename variable `v' to `d' to avoid + shadowing parameter. + + * lib/tmpfile.c (xtmpfile): Declare dir as const char *. + + * lib/ptable.h: Add explicit casts when converting from unsigned + long to unsigned. + + * dvi/devdvi/{SA,SB,msam.map,msbm.map}: New files. + * dvi/devdvi/Makefile: Install SA, SB. + + * refer/indxbib.c: Add declaration of mktemp. + + * refer/lookbib.c: Add declaration of isatty. + +Fri Oct 25 09:00:17 1991 James Clark (jjc at jclark) + + * pic/lex.c (interpolate_macro_with_args): While collecting + arguments, keep track of whether we're in a string. + +Wed Oct 23 08:42:48 1991 James Clark (jjc at jclark) + + * ps/tmac.ps (PSPIC): Do the .sp after the \X, and move the \X + down with \v, so as to avoid problems with top of page trap + setting no space mode. + +Tue Oct 22 17:38:49 1991 James Clark (jjc at jclark) + + * eqn/lex.c (get_delimited_text): Allow tab before macro body. + +Tue Oct 15 17:24:53 1991 James Clark (jjc at jclark) + + * ps/psrm.c (ps_get_line): Fix bug when lines longer than 255. + Improve error message. + +Fri Oct 11 11:09:38 1991 James Clark (jjc at jclark) + + * ps/psrm.c (print_ps_string): Don't pass negative numbers to + printf("%03o"); + +Wed Oct 9 17:50:14 1991 James Clark (jjc at jclark) + + * groff.c (possible_command::execp): Always use _exit() after a + failed exec. + + * Makefile: Add HAVE_UNION_WAIT, HAVE_PID_T, WAIT_COREDUMP_0200, + NO_SYS_WAIT_H configuration options. + * groff.c: Use these options. Use POSIX-style macros to extract + fields from the status returned by wait(). + +Fri Oct 4 12:12:27 1991 James Clark (jjc at jclark) + + * tbl/table.c (table::compute_separation_factor): Allow the + separation factor to drop to 0. + +Tue Oct 1 18:12:38 1991 James Clark (jjc at jclark) + + * refer/search.c: Include . + +Sun Sep 29 08:40:57 1991 James Clark (jjc at jclark) + + * pic/pic.y (YYDEBUG): Don't define for Borland C++. + + * lib/lib.h: #ifdef out declarations of itoa and iftoa for Borland + C++. + + * pic/lex.c (input_stack::bol): Move definition out of class body. + + * pic/main.c: On MSDOS munge argv[0]. + + * lib/ptable.h: Define name2 as _Paste2 for Borland C++. + + * lib/ptable.c (hash_string): Use unsigned long rather than + unsigned. + (next_ptable_size): Use unsigned rather than int. Give an error + message if we've hit the largest table size. + * lib/ptable.c: Corresponding changes. Also use unsigneds for the + table size. + + * pic/object.h (object_spec): Make flags unsigned long. Declare + flags as const unisgned long rather than as enums. + + * pic/output.c: Deleted. + + * pic/troff.c (troff_output::simple_ellipse): Remove spurious %. + + * tbl/table.c (simple_entry::note_double_vrule_on_{left,right}): + Add additional argument. + (line_entry::note_double_vrule_on_{left,right}): Set value of + douvle_vrule_on_{right,left} flag according to argument. + (simple_line_entry::simple_print, + simple_line_entry::double_line_print): If adjacent to double vrule + on a corner extend rather than shorten the rule by half the double + vrule sep. + + * troff/number.c (parse_term): In checking for overflow, handle the + case where the current horizontal position is negative. + +Thu Sep 12 08:26:09 1991 James Clark (jjc at jclark) + + * pic/object.c (draw_arrow): Check for object having zero length. + +Wed Sep 11 10:32:38 1991 James Clark (jjc at jclark) + + * eqn/main.c (do_file): Split off inline equation handling into... + (inline_equation): New function. Search for starting delimiter + using... + (delim_search): New function. Don't recognize a delimiter that + occurs in the name of an escape sequence, number register, string + etc. + +Tue Sep 10 04:01:11 1991 James Clark (jjc at jclark) + + * eqn/delim.c (delim_box::compute_metrics): Don't call + define_extensible_string if left is 0. + (delim_box::output): Don't print the left delimiter if left is 0. + (delim_box::debug_print): Check for left == 0 before calling printf. + +Fri Aug 23 13:02:30 1991 James Clark (jjc at jclark) + + * troff/Makefile (majorminor.c): Include only digits in + minor_version. + +Thu Aug 22 09:35:37 1991 James Clark (jjc at jclark) + + * refer/dirnamemax.c: new file. + * refer/genlimits.c: Deleted. + * refer/indxbib.c (main): Use dir_name_max() instead of NAME_MAX. + Don't check path length. + * refer/Makefile: Add dir_name_max.o; delete genlimits. + * Makefile: Add PATHCONF_MISSING option. + + * refer/indxbib.c (get_cwd): New function. + (main): Use get_cwd(). + * lib/getcwd.c: New file. + * Makefile: Delete -DHAVE_GETWD. Include GETCWD variable. Pass + GETCWD in SUBFLAGS. + * lib/Makefile: Compile getcwd.o. + + * ps/tmac.psatk (psatk-defs): Define showpage after pushing + userdict. + + * refer/indxbib.c (main): Check success of mktemp. + + * lib/tmpfile.c: New file. + * lib/Makefile: Add tmpfile.c. + * lib/lib.h: Declare xtmpfile(); include . + * ps/ps.h: Delete declaration of mktemp(). + * ps/ps.c (ps_printer::ps_printer): Use xtmpfile(). + * refer/refer.c (divert_to_temporary_file): Use xtmpfile(). + * driver/driver.h: No need now to include errno.h. + + * everywhere: Set errno to 0 before calling fopen(). + + * eqn/eqn.h, etc/soelim.c, driver/driver.h, etc/addftinfo.c, + dvi/tfmtodit.c, groff.c, refer/index.c, refer/linear.c, + refer/lookbib.c, refer/refer.h, ps/psbb.c: Include . + +Mon Aug 19 10:52:18 1991 James Clark (jjc at jclark) + + * troff/env.h (translate_space_to_dummy): Declare it. + * troff/env.c (environment::space_newline, environment::space): + If translate_space_to_dummy is set then make the width of spaces 0. + * troff/input.c (translate): If the second character of a + translation is a space, translate to unbreakable space. If the + first character is a space, set or clear translate_space_to_dummy + according to whether the second character is \&. Weird! + +Tue Jul 30 10:03:56 1991 James Clark (jjc at jclark) + + * groff.c (run_commands): Don't use non-zero exit code because a + command gets SIGPIPE. + + * groff.c, groff.sh: Use -mXps with -TXps. + + * ps/ps.c (ps_printer::special): Move call to flush_sbuf() into... + (ps_printer::do_exec, ps_printer::do_file, ps_printer::do_def, + ps_printer::do_mdef, ps_printer::do_import): Call flush_sbuf(). + (ps_printer::special): New specials invis and endinvis. + (ps_printer::do_invis, ps_printer::do_endinvis): New functions. + (ps_printer::set_char, ps_printer::draw): Return if invis_count>0. + (ps_printer::end_page): Check that invis_count == 0. + (ps_printer::invis_count): New member. + (ps_printer::ps_printer): Initialize invis_count to 0. + + * troff/env.c (environment::hyphenate_line): Hyphenation + indicator at beginning of word inhibits splitting after -, \(em + etc. + + * pic/pic.y (element): Allow another element to follow } without + any intervening separator. + +Mon Jul 22 12:27:37 1991 James Clark (jjc at jclark) + + * pic/lex.c (get_delimited): Allow tabs before delimiter. + +Wed Jul 17 10:59:08 1991 James Clark (jjc at jclark) + + * groff.c: Get rid of HAVE_UNION_WAIT stuff. Instead suppress + declaration of wait() in header files. + * Makefile: Get rid of -DHAVE_UNION_WAIT. + + * tbl/table.c (alphabetic_text_entry::add_tab): New function. + + * lib/lib.h: Declare return type of strerror as char *. + + * man/Makefile: Add g flag to sed substitutions. + * Makefile (shgroff, bindist): Likewise. + +Sun Jul 14 11:57:02 1991 James Clark (jjc at jclark) + + * ps/ps.c (ps_printer::do_import): Move push of userdict into... + * ps/devps/prologue (PBEGIN): Define showpage after pushing + userdict. + +Sat Jul 13 20:53:04 1991 James Clark (jjc at jclark) + + * ps/devps/prologue (PBEGIN): Zap any definition of showpage in + userdict. + +Fri Jul 12 07:10:09 1991 James Clark (jjc at jclark) + + * man/mdate.sh: Handle the fact that BSD ls -l does not print the + group. + +Sun Jul 7 08:00:23 1991 James Clark (jjc at jclark) + + * troff/input.c (define_number_reg): If currently undefined, + don't define it if the argument is an invalid expression. + + * Makefile: Ignore return value of `if' commands without `else' + parts. + + * Makefile: Split up CPPDEFINES into a series of separate + configuration options. + + * troff/input.c (init_registers): Use time_t instead of long + unless LONG_FOR_TIME_T is defined. Use returned result rather + than passing pointer. + * Makefile: Document LONG_FOR_TIME_T as a CPPDEFINE. + + * lib/Makefile (fontpath.h): Use gendef. + +Thu Jul 4 09:48:05 1991 James Clark (jjc at jclark) + + * troff/input.c (input_iterator::shift): Delete argument name. + * troff/node.c (suppress_output_file::really_begin_page, + suppress_output_file::really_transparent_char, node::ascii_print, + node::tprint): Delete names of unused arguments. + +Wed Jul 3 17:34:57 1991 James Clark (jjc at jclark) + + * refer/label.y (string): Pass $4 to command_error. + +Tue Jul 2 15:06:01 1991 James Clark (jjc at jclark) + + * Version 1.03 released. + +Sat Jun 29 08:14:01 1991 James Clark (jjc at jclark) + + * Makefile: Pass definition of SHELL in SUBFLAGS. + + * gendef: New file. + * Makefile, eqn/Makefile, refer/Makefile, troff/Makefile, + ps/Makefile: Use gendef to construct header files that are + constructed from the Makefile. + + * macros/Makefile: make all should build stripped version of tmac.e. + + * refer/Makefile (clean): Remove y.output. + +Fri Jun 28 09:44:36 1991 James Clark (jjc at jclark) + + * ps/pfbtops.c (main): Add -v option which prints out a version + number. + * ps/Makefile (pfbtops): Link with libgroff.a. + +Fri Jun 21 07:43:23 1991 James Clark (jjc at jclark) + + * refer/search.h (linear_searcher::get_nkeys): Delete declaration. + * refer/linear.c (linear_searcher::get_nkeys): Delete definition. + + * refer/lkbib.c (main): Always terminate reference with blank + line. + * refer/lookbib.c (main): Likewise. + + * refer/linear.c (file_buffer::load): Check that the file is not a + binary file. + + * refer/Makefile (genlimits): Possibly add -DHAVE_SYS_DIR_H. + (genlimits.c): Include if HAVE_SYS_DIR_H is defined. + Delete second inclusion of . + +Tue Jun 18 01:32:26 1991 James Clark (jjc at jclark) + + * troff/token.h (token::special): Deleted. + + * tbl/main.c (process_format): Rework so that opt->tab_char is + recognized only when appropriate. + + * ps/Makefile (clean): Remove pfbtops. + +Sun Jun 16 09:37:19 1991 James Clark (jjc at jclark) + + * lib/font.c (text_file::next): Don't return if we have got a + blank line. + +Fri Jun 14 09:52:26 1991 James Clark (jjc at jclark) + + * refer/refer.c (store_reference): Get hash code from old_table[i] + when rehashing the table. + +Thu Jun 13 01:26:43 1991 James Clark (jjc at jclark) + + * eqn/box.c (box::top_level): Save size and prev size using \R and + restore it afterwards. Set the size to the size at the beginning + of the line. + * eqn/pbox.h: Declare SAVED_INLINE_PREV_SIZE_REG, + SAVED_INLINE_SIZE_REG, and SAVED_SIZE_REG. + + * refer/Makefile (limits.h): Use ./genlimits. + +Wed Jun 12 16:05:34 1991 James Clark (jjc at jclark) + + * refer/index.c: Delete declarations of stat() and fstat(). + +Tue Jun 11 14:52:49 1991 James Clark (jjc at jclark) + + * tty/tmac.tty: Add character definitions for \(>= and \(<=. + +Mon Jun 10 22:49:48 1991 James Clark (jjc at jclark) + + * etc/grog.sh, etc/grog.pl: Change regex for .PS. + +Fri Jun 7 09:13:06 1991 James Clark (jjc at jclark) + + * troff/input.c (token::get_char): Handle \e. + + * refer/linear.c: Delete declarations of fstat() and stat(). + +Wed Jun 5 09:11:59 1991 James Clark (jjc at jclark) + + * troff/node.c, troff/env.c, troff/input.c, Makefile: Remove + OP_DELETE_BROKEN stuff, since we now have a fix for g++. + +Mon Jun 3 13:41:32 1991 James Clark (jjc at jclark) + + * troff/input.c (do_define_macro): Improve error handling for end + of file while defining macro. + +Sun Jun 2 10:20:24 1991 James Clark (jjc at jclark) + + * eqn/box.h: Fix declaration of set_gsize. + * eqn/box.c (set_gsize): Make argument const char *. + (gsize): Declare as char *. + * eqn/main.c (main): Don't convert gsize to int. + * eqn/lex.c (do_gsize): Pass char * to set_gsize. + + * Version 1.02 released. + +Sat Jun 1 12:19:46 1991 James Clark (jjc at jclark) + + * macros/tmac.andoc: New file. + * macros/Makefile: Install tmac.andoc. + + * troff/node.c, troff/env.c, troff/input.c: Conditionalize use of + operator new and delete on OP_DELETE_BROKEN not being defined. + * Makefile: Mention OP_DELETE_BROKEN. + +Mon May 27 13:49:07 1991 James Clark (jjc at jclark) + + * Makefile (bindist): Pass SUBFLAGS. + +Sun May 26 14:13:22 1991 James Clark (jjc at jclark) + + * Makefile, groff.c: Pass definitions to groff.c via device.h. + + * tty/tty.c (tty_font::load_tty_font): Avoid shadowing + parameter. + + * ps/Makefile, ps.c: Pass BROKEN_SPOOLER_FLAGS via broken.h. + + * ps/ps.h, ps/psrm.c: Make comment_table and + header_comment_table local to resource_manager::process_file. + + * groff.sh: With -TXps pass -printCommand option to gxditview. + + * groff.c (possible_command::print): Implement using + append_arg_to_string. + + * xditview: Merge in new implementation with own ChangeLog. + +Sat May 25 18:33:20 1991 James Clark (jjc at jclark) + + * groff.c (main): Implement PRINT_OPTION. + (append_arg_to_string): New command. + (device_table): Set PRINT_OPTION flag for Xps. + +Fri May 24 09:48:58 1991 James Clark (jjc at jclark) + + * troff/groff.h: Rename to troff.h. + + * pic/lex.c (lookup_keyword, docmp): New functions. + (get_token): Use new lookup_keyword. + Don't include key.h. + * pic/key.[ch], pic/pic.gperf: Deleted. + * pic/Makefile: Remove gperf stuff. + + * pic/Makefile, pic/output.h: Move definition of TEX_SUPPORT + into output.h. + * pic/tex.c: Move include of pic.h before test of TEX_SUPPORT. + + * troff/Makefile, troff/node.c: Move definition of + STORE_WIDTH into node.c. + + * etc/grog.pl, etc/grog.sh: Support -mdoc. + +Thu May 23 12:30:49 1991 James Clark (jjc at jclark) + + * dvi/devdvi/texr.map, dvi.devdvi/texi.map, + dvi/devdvi/texb.map: Add lq and rq. + dvi/devdvi: Regenerate fonts. + * ps/devps/textmap: Add lq and rq. + * ps/devps: Regenerate fonts. + * tty/devascii/R.proto, tty/devlatin1/R.proto: Add lq and rq. + * macros/tmac.e: Define \*(lq and \*(rq to be \(lq and \(rq. + + * pic/object.c (position_rectangle): When checking radius + cope with possiblity that width or height is negative. + (box_object::box_object): Have separate xrad and yrad with + signs matching signs of dim components. + (box_object::{north,south}_{east,west}): Use xrad and yrad. + (box_object::print): With rounded boxes use absolute values + for dim and rad arguments. + + * lib/Makefile, lib/fontfile.o: Pass definition of FONTPATH + in fontpath.h. + + * eqn/Makefile, eqn/main.c: Pass definition of DEVICE in device.h. + + * various files: Add explicit destructors to keep Saber CC +d + happy. + +Wed May 22 11:37:11 1991 James Clark (jjc at jclark) + + * eqn/box.c (box::top_level): Restore fonts correctly after + font changes in line containing inline equation. Also + restore previous font as well as current font. + * eqn/pbox.h: Define necessary string and register names. + + * troff/input.c (token::next): Case 'R' calls do_register. + (do_register): New function. + +Tue May 21 11:28:23 1991 James Clark (jjc at jclark) + + * groff.c, groff.sh: Support Xps device. Allow each device + to have a pseudo_name and a real_name. + + * groff.c (run_commands): Don't print `Broken pipe' messages. + + * ps/pfbtops.c: New file. + * ps/Makefile: Add pfbtops. + + * troff/number.c (parse_term): Improved error message. + +Mon May 20 11:22:14 1991 James Clark (jjc at jclark) + + * groff.c, groff.sh, etc/grog.sh, etc/grog.pl: Support grefer. + + * Makefile: Integrate refer. + * refer: New directory. + * man/grefer.man, man/glookbib.man, man/gindxbib.man, + man/lkbib.man: New files. + * man/Makefile: Support refer man pages. + + * lib/lib.h: Declare is_prime. + * lib/prime.c: New file. + + * troff/input.c (macro_source): New function. + (init_input_requests): Bind "mso" to macro_source. + + * troff/env.c (environment::possibly_break_line): Maintain + pointer to pointer to node to be split in ndp so as to avoid + using address of freed node. + + * troff/env.c (environment::hyphenate_line): Maintain pointer to + pointer to first node to be hyphenated in startp so as to + avoid using address of freed node. + + * troff/env.c (class trie, class hyphen_trie): Make the + elements of the trie be of type char not unsigned char. + Declare arguments to be const char* instead of unsigned char *. + + * troff/env.c (hyphenate): Initialize hbuf[0]. + + * troff/input.c (set_string): Declare p to be char * and cast + *p to unsigned char when necessary. + + * troff/input.c (do_define_macro): Declare s to be const + char*. Cast element to unisgned char when necessary, Declare + d to be an int. Handle EOF better. + + * troff/Makefile, troff/input.c: Different scheme for passing + definitions of MACROPATH, HYPHENFILE and DEVICE. + +Tue May 14 13:41:36 1991 James Clark (jjc at jclark) + + * tty/devascii/R.proto: Delete entry for em. + * tty/devlatin1/R.proto: Likewise. + +Sat May 11 11:13:28 1991 James Clark (jjc at jclark) + + * troff/input.c (translate): Stop when we get a space. Treat eof + like newline. + + * macros/tmac.an (IP): Only pass quoted argument to TP when \n(.$>1. + +Wed Apr 24 19:24:33 1991 James Clark (jjc at jclark) + + * tbl/main.c (process_format): A font name following a `f' + modifier that starts with a digit can be only one character long. + Also deal with EOF on the second character of the font name. + +Wed Apr 17 11:23:43 1991 James Clark (jjc at jclark) + + * troff/input.c (token::next): Turn \~ into an + unbreakable_space_node. + * troff/node.c (unbreakable_space_node): New class. + * troff/node.h: Declare it. + +Tue Apr 16 10:47:12 1991 James Clark (jjc at jclark) + + * dvi/dvi.c (dvi_printer::set_char): Make code an int. Check that + it's >= 0, before outputting it as a single byte. + +Mon Apr 15 11:20:23 1991 James Clark (jjc at jclark) + + * lib/font.c: Make font_char_metric::code an int. + (font::get_code): Change return type to int. + (font::load): Allow code to be arbitrary integer. + * lib/font.h (font::get_code): Change return type to int. + (font::number_to_index): Change argument type to int. + * troff/input.c (token::next): In case 'N', allow any value. + Store value in token::val. + (token::operator==): For TOKEN_NUMBERED_CHAR test equality of val. + (token::get_char, token::add_to_node_list, token::process): Get + number from val. + (charinfo::set_number): Change argument to int. + (charinfo::get_number): Require that NUMBERED flag be set. + (get_charinfo_by_number): Store numbered characters not between 0 + and 255 in a dictionary. + * troff/charinfo.h (get_charinfo_by_number): Change argument type + to int. + (charinfo::number): Change type to int. + (charinfo::set_number): Change type of set_number to int. + * troff/node.c (troff_output_file::put_char_width, + troff_output_file::put_char): Test whether character is numbered + using charinfo::numbered(). + * driver/printer.c (printer::set_numbered_char): Allow arbitrary + values of num. + * lib/nametoindex.c: New implementation to cope with arbitrary + number characters. + + * troff/input.c (token::operator==): Test val for + TOKEN_CHAR_HEIGHT, TOKEN_CHAR_SLANT, TOKEN_FONT_POSITION, and + TOKEN_SIZE. + + * man/Makefile: Add definiton of BROKEN_SPOOLER_FLAGS. + (.man.n): sed out @BROKEN_SPOOLER_FLAGS@. + +Sun Apr 14 12:57:00 1991 James Clark (jjc at jclark) + + * ps/devps/zapfdr.ps: Don't copy UniqueID. Avoid use of newdict + variable. + + * all Makefiles: rm targets of cp and >. + + * xditview/xtotroff.c (MapFont): Unlink troff_name before opening + it. + + * eqn/lex.c (def_table): Add dollar. + +Sat Apr 13 13:02:44 1991 James Clark (jjc at jclark) + + * troff/input.c (do_width): Push back newline before closing delim + like do_bracket. + +Fri Apr 12 15:16:03 1991 James Clark (jjc at jclark) + + * groff.c (possible_command::prepend_arg): New function. + (main): Prepend device -m option. + * groff.sh: Put device -m options before command-line options. + +Tue Apr 9 10:24:43 1991 James Clark (jjc at jclark) + + * macros/tmac.an (IP): Quote argument to TP. + + * ps/ps.c (main): New option -b, which sets... + (broken_flags): New variable. + (ps_printer::~ps_printer): Incorporate the setup section in the + prolog if (broken_flags & NO_SETUP_SECTION). + (ps_printer::begin_page): Generate {Begin,End}PageSetup comments. + (ps_printer::merge_download_fonts, ps_printer::merge_import_fonts, + ps_printer::merge_ps_fonts, ps_printer::print_font_comment, + ps_printer::print_needed_font_comment, + ps_printer::print_supplied_font_comment, + ps_printer::print_include_font_comments, + ps_printer::lookup_doc_font, ps_printer::download_fonts, + ps_printer::read_download_file, read_document_fonts, add_font, + skip_line, parse_fonts_arg, document_font::document_font, + document_font::~document_font, document_font::download, + ps_output::include_file): Deleted. + (ps_printer::~ps_printer): Generate %%EOF. Generate %!PS-Adobe-3.0 + rather than %!PS-Adobe-2.0. Make calls to + resource_manager::need_font for each font that we used. Replace + calls to merge_ps_fonts, merge_download_fonts, print_font_comment, + print_supplied_font_comment, print_needed_font_comment by call to + resource_manager::print_header_comments. Output %%Orientation + comment. Output %%Requirements: numcopies comment if ncopies > 1. + Don't output the prolog directly. Instead call + resource_manager::output_prolog. Only define #copies when ncopies + > 1. Delete calls to print_include_font_comments and + download_fonts. Add call to resource_manager::document_setup. + (ps_printer::do_file): Call resource_manager::import_file instead + of including it ourselves. + (ps_printer::do_import): Likewise. Also don't call + merge_import_fonts. Push userdict on the dictionary stack before + and pop it afterwards. + Move declaration of ps_output into ps.h. + * ps/psrm.c: New file implementing resource_manager class. + * ps/ps.h: New file declaring ps_output and resource_manager + classes. + * ps/devps/zapfdr.ps: + * ps/devps/symbolsl.ps: + * ps/devps/prologue: Use 3.0 conventions. + * ps/Makefile: Pass definition of BROKEN_SPOOLER_FLAGS in DEFINES. + Add default definition of BROKEN_SPOOLER_FLAGS. + * Makefile: New variable BROKEN_SPOOLER_FLAGS. Add + BROKEN_SPOOLER_FLAGS to SUBFLAGS. + +Mon Apr 8 09:26:54 1991 James Clark (jjc at jclark) + + * etc/grog.pl: New file. + * Makefile (GROG): New variable. + Add GROG to SUBFLAGS. + * etc/Makefile (GROG): New variable. + (install.nobin): Install $(GROG) rather than grog.sh. + +Thu Apr 4 11:36:45 1991 James Clark (jjc at jclark) + + * eqn/special.c (special_box::compute_metrics): Make the input and + output strings the same. Get the new height and depth from the + predefined height and depth registers. Also make subscript kern + and skew available. + (special_box::compute_subscript_kern, special_box::compute_skew): + New functions. + + * eqn/box.c (pointer_box::compute_skew, + simple_box::compute_metrics, box::top_level) + * eqn/text.c (prime_box::compute_metrics, + prime_box::comput_subscript_kern) + * eqn/limit.c (limit_box::compute_metrics): + * eqn/delim.c (build_extensible, delim_box::compute_metrics): + * eqn/sqrt.c (sqrt_box::compute_metrics): Protect possibly + negative numbers in `nr' requests with a leading 0. + +Wed Apr 3 15:58:23 1991 James Clark (jjc at jclark) + + * eqn/special.c: New file. + * eqn/eqn.y: Declare token SPECIAL. Make it right associative. + Add new rule for simple. + * eqn/lex.c (token_table): Add SPECIAL. + * eqn/box.h: Declare make_special_box. + * eqn/Makefile: Add special.[co]. + +Sat Mar 30 10:57:53 1991 James Clark (jjc at jclark) + + * ps/devps/prologue: Possibly set packing to true while defining. + Create grops dictionary here. Initialize local variables before + defining procedures. + (PICTURE): Rename to PBEGIN. Also do save, noop showpage, count + the dictionary stack. Set strokeadjust and overprint to false if + the relevant operators are defined. + (PEND): New procedure. + * ps/ps.c (ps_printer::~ps_printer): In the prolog just include + prologue. Do everything else in the setup section. + (ps_printer::do_import): Just call PBEGIN and PEND around the + picture. Also push userdict before, and pop it afterwards. + +Wed Mar 27 07:59:50 1991 James Clark (jjc at jclark) + + * troff/node.c (bracket_node::tprint): Brackets were being printed + 1m too low. + + * macros/tmac.an (SH, SS): Set fill mode. + +Tue Mar 26 07:46:31 1991 James Clark (jjc at jclark) + + * troff/div.c (top_level_diversion::begin_page): Set + high_water_mark to 0. + +Fri Mar 22 09:19:46 1991 James Clark (jjc at jclark) + + * man/mdate.sh: New file. + * man/mdate.c: Deleted. + * man/Makefile: Use mdate.sh instead of mdate. + (mdate): Deleted. + + * eqn/lex.c (do_gsize): Supply missing argument to error message. + +Tue Mar 19 11:06:50 1991 James Clark (jjc at jclark) + + * man/mdate.c: New file. + * man/*.man: Replace modification date by @MDATE@. + * man/Makefile (.man.n): Replace @MDATE@ by `mdate $<`. + (mdate): New target. + + * lib/font.c (text_file::next): Deal with arbitrarily long lines. + Remove illegal input characters. + +Mon Mar 18 08:32:25 1991 James Clark (jjc at jclark) + + * macros/tmac.s (pg*start-col): Do .ns *after* running the hooks. + +Sat Mar 16 03:52:25 1991 James Clark (jjc at jclark) + + * troff/div.c (begin_page): Change behaviour when + !first_page_begun and !break_flag. + + * troff/input.c (do_name_test): Return 0 if argument is empty. + + * troff/input.c (read_long_escape_name): Require closing ] to be + at same input level as opening [. + + * troff/input.c (read_increment_and_escape_name): New function. + (get_copy, process_input_stack): Use this for \n. + +Fri Mar 15 00:31:48 1991 James Clark (jjc at jclark) + + * troff/div.c (top_level_diversion::begin_page): Ignore the + current value of page_number if !first_page_begun. + + * groff.c (main): Fix declaration of buf. + + * troff/input.c (do_name_test): New function. + (token::next): Implement \A. + (token::next): Implement \e by turning it into a TOKEN_ESCAPE. + (token::description, token::add_to_node_list, token::process): + Handle TOKEN_ESCAPE. + * troff/token.h: New token TOKEN_ESCAPE. + +Thu Mar 14 10:22:26 1991 James Clark (jjc at jclark) + + * pic/main.c (do_picture): Allow space before and after filename + following `<'. Check that the filename is not empty. + +Wed Mar 13 12:49:40 1991 James Clark (jjc at jclark) + + * Version 1.01 released. + + * dvi/devdvi/CompileFonts: Add cm*ss10 fonts. + + * dvi/tmac.dvi: ftr HR to H. + + * macros/tmac.e: Round up computation of $r. + + * xditview/tmac.X: Don't give up completely in compatibility mode. + Use \n(.s instead of \n[.s]. + + * dvi/tmac.dvi: Don't give up completely in compatibility mode. + Use \(ci instead of \[ci]. Use \n(.s instead of \n[.s]. + Add u to factors inside \s[...]. Rename frac to dvi-frac. + Translate \(FM onto \[prime] and \(!/ onto \[slashnot]; use these + short names in the char definitions. + + * ps/tmac.ps: Don't give up completely in compatibility mode. + Fix the fraction definitions to use \n(.s and \(f/. Add an extra + quote in front of \n(.s. Add u to factors inside \s[...]. + +Mon Mar 11 12:01:20 1991 James Clark (jjc at jclark) + + * tty/tmac.tty: Call the nroff request. + + * macros/tmac.e ((x, )x): Better definitions that work properly + in a diversion. + (@0, @1): Helper macros for (x. + + * macros/tmac.e ($s, hl): Use \l rather than \D. + + * tty/tmac.tty: Make it work better in compatibility mode. + (pchar): Rename to tty-char. + + * macros/tmac.e (@E): New macro. + (r, i, b, rb, bi): Use @E. + + * macros/tmac.e (@F): Don't use (;...) syntax. + + * macros/tmac.e: Remove mention of \*(||/revisions. Mention that + it was modified for groff. + + * macros/tmac.e: Make sure \n(ps and \n(es are >= \n(.V. + + * macros/tmac.e (<., .>): Removed. + ([., .]): If \n(.V>=1v, use [] instead of superscripting. + + * macros/tmac.e: Remove check that groff is being used. + + * macros/tmac.e (@C): Change families only if using groff; turn + compatibility mode off while changing familes. Save compatibility + mode before changing families and restore it afterwards. + + * macros/tmac.e (@h): Remove test for offset + line length. + + * macros/tmac.e (sorry): Rename to @S. Use \$1 instead of \$0 + (lo, th, ac): Define to call @S instead of using als. + + * macros/tmac.e: Make $r and $R now contain \n(.v*100/\n(.sp, ie + the ratio of the vertical spacing to the point size in units + expressed as a percentage. Use these instead of $10r and $10R, + Delete $10r and $10R. + + * lib/font.c (font::load): In default computation of space_width, + divide by sizescale. Use scale_round. + + * macros/tmac.an (TP): Don't call `nf'. + (an-do-tag): Don't call `fi'. + +Sun Mar 10 09:52:35 1991 James Clark (jjc at jclark) + + * troff/input.c (process_input_stack): Handle the case where + spaces at the beginning of an input line are followed by a + newline. + +Thu Mar 7 20:18:07 1991 James Clark (jjc at jclark) + + * groff.c (device_table): Add PIC_X_OPTION for dvi device. + * groff.sh: Use pic -x with the dvi device. + + * dvi/devdvi/FontMakefile (H): Don't use -s. + + * dvi/devdvi/HI, dvi/devdvi/HB: New files. + * dvi/devdvi/Makefile: Add HI and HB to FONTS. + * dvi/devdvi/FontMakefile: Add rules for HI and HB. Include these + in FONTS. + +Mon Mar 4 13:20:14 1991 James Clark (jjc at jclark) + + * ps/psfig.diff: New file. + * ps/tmac.psfig: New file. + +Sat Mar 2 00:15:09 1991 James Clark (jjc at jclark) + + * macros/tmac.s (]=, ref*do-tl, ref*bib-print): Deleted. + (]-): Don't call ref*do-tl. + + * macros/tmac.s (ref*end-print): Use XP if [F not defined. + + * macros/tmac.s (ref*normal-print): Call FS rather than fn@do-FS. + (fn@do-FS): Rename to fn*do-FS. + + * troff/input.c (transparent_translate): New function. + (process_input_stack): Apply transparent_translate before calling + diversion::transparent_output(unsigned char). + +Wed Feb 27 00:13:25 1991 James Clark (jjc at jclark) + + * troff/input.c (do_define_macro): Define the macro before calling + skip_line. + + * xditview/Makefile: Add DEVICES variable. Change install target + to use this. + +Tue Feb 26 10:46:22 1991 James Clark (jjc at jclark) + + * groff.c (run_commands): Handle the possibility that there are + child processes other than those forked by us. + +Sun Feb 24 21:32:30 1991 James Clark (jjc at jclark) + + * lib/string.c (string::append): New function. + * lib/stringclass.h: Declare it. + +Thu Feb 21 11:49:26 1991 James Clark (jjc at jclark) + + * eqn/main.c (main): New option -N which sets + no_newline_in_delim_flag. + (do_file): If no_newline_in_delim_flag is set don't allow newlines + in delimiters. + * groff.c (main): Pass -N on to eqn. + (help, synopsis): Mention -N. + * groff.sh: Implement -N. + +Wed Feb 20 15:16:10 1991 James Clark (jjc at jclark) + + * macros/tmac.s (]=, ref*bib-print, ref*do-tl): New macros. + (]-): Call ref*do-tl if ref*need-tl is non-zero. + (XP): Allow as initializer. + +Tue Feb 19 14:09:06 1991 James Clark (jjc at jclark) + + * troff/env.c (environment::wrap_up_field): If field_spaces are + non-zero and we have a current_tab, subtract padding from + tab_distance. If this makes tab_distance <= 0, use the next tab + stop instead. If there isn't any next tab or it's a left tab, + wrap up the current tab. + (environment::start_field): Initialize tab_precedes_field. + (environment::wrap_up_tab): If there's a current field, update + pre_field_width, field_distance and tab_precedes_field. + * troff/env.h (environment::tab_precedes_field): New member. + +Fri Feb 15 01:24:00 1991 James Clark (jjc at jclark) + + * ps/ps.c (ps_printer::do_file): New function. + (ps_printer::special): Bind to `file' special. + (ps_printer::do_exec): Set ndefined_styles to 0. + +Sat Feb 9 03:03:04 1991 James Clark (jjc at jclark) + + * eqn/text.c (split_text): Grok \* and similar escapes sequences. + Avoid stripping first character from the start of unrecognized + escapes. Use lex_error instead of error to report errors. + * eqn/lex.c (get_token): Rework handling of escapes. + (lex_error): Move declaration into... + * eqn/eqn.h. + + * xditview/xditview.c (main): Make -page option work. + + * Makefile: Correct comment about -DBROKEN_SPOOLER and pageview. + +Wed Feb 6 12:28:43 1991 James Clark (jjc at jclark) + + * macros/tmac.s (B2): Correct size of box. + +Tue Feb 5 00:37:35 1991 James Clark (jjc at jclark) + + * macros/tmac.s (B2): Postpone drawing the box until in the + top-level diversion. + + * tty/tmac.tty: Add font translations for C, CR, CW. + + * groff.c (synopsis, help): Document -i. + * groff.sh: Implement -i. + + * macros/tmac.s (@NH): Put a `.' after multi-part numbers. + Simplify the construction of SN. + + * troff/number.c (parse_term): Give `|' a higher precedence. + * tbl/table.c (numeric_text_entry::simple_print): Parenthesise + accordingly. + + * macros/tmac.s (B2): Use par@finish instead of par@reset. + +Mon Feb 4 12:36:09 1991 James Clark (jjc at jclark) + + * lib/string.c (string::move): New function. + * lib/stringclass.h: Declare it. + +Sat Feb 2 16:02:16 1991 James Clark (jjc at jclark) + + * troff/env.c (distribute_space): Add optional argument + `force_forward'. + (environment::wrap_up_field): Call distribute_space with + `force_forward' argument of 1. + +Fri Feb 1 19:36:33 1991 James Clark (jjc at jclark) + + * lib/string.c, lib/stringclass.h (string::operator+=(char)): + Inline it. Move reallocation into... + (string::grow1): New function. + * pic/Makefile, tbl/Makefile, eqn/Makefile, ps/Makefile: Redo + dependencies to include library header files. + * lib/Makefile: Make string.c and lf.c depend on stringclass.h. + +Thu Jan 31 15:02:27 1991 James Clark (jjc at jclark) + + * macros/tmac.s (@NH): Use the same number registers than -ms does + for the heading level counters. Use the same string that -ms does + for the number for this heading. + +Wed Jan 30 14:25:40 1991 James Clark (jjc at jclark) + + * lib/new.c (operator new): Cast result of malloc to char *. + + * troff/input.c (spring_trap, lookup_request): Add assert that nm + is not null. + +Tue Jan 29 18:08:05 1991 James Clark (jjc at jclark) + + * groff.c (main): Support -i. + +Sun Jan 27 13:23:17 1991 James Clark (jjc at jclark) + + * pic/pic.h: Include . + + * ps/ps.c: Add declaration of mktemp. + + * Makefile: Add -DHAVE_UNION_WAIT option for CPPDEFINES. + * groff.c: If HAVE_UNION_WAIT is defined, declare wait()'s + argument as union wait *. + (run_commands): If HAVE_UNION_WAIT is defined cast wait()'s + argument to union wait *. + +Sat Jan 26 12:04:52 1991 James Clark (jjc at jclark) + + * tty/tmac.tty: Add definition of \(co. + + * pic/object.c (make_arc): Only increase radius when radius + strictly less than d. + (arc_object::update_bounding_box): May need to add 4.0 to end_quad + more than once. + + * troff/env.c (environment::environment(symbol), + environment::environment(const environment *)): Initialize + input_trap_count. + +Sat Jan 19 08:18:35 1991 James Clark (jjc at jclark) + + * tbl/main.c (main): Add exit(0). + + * ps/ps.c (ps_printer::~ps_printer): Use fseek instead of rewind. + + * pic/main.c (main): + * eqn/main.c (main): + * tbl/main.c (main): + * etc/soelim.c (main): + * driver/printer.c (printer::~printer): + * troff/node.c (real_output_file::~real_output_file, + real_output_file::flush): Check for errors on stdout. + + * most files: Add 1991 to copyright notice. + + * macros/tmac.s: Don't test \n(.x and \n(.y. + + * troff/input.c (token::next): Rename `escape_char' label to + `handle_escape_char' and `normal_char' label to + `handle_normal_char'. + +Thu Jan 17 15:46:35 1991 James Clark (jjc at jclark) + + * groff.c (main, synopsis, help): Support -a option. + * groff.sh: Likewise. Also eliminate Zflag variable by adding -z + to trflags while parsing options. + +Tue Jan 15 13:07:27 1991 James Clark (jjc at jclark) + + * troff/number.c (parse_term): With `m', `M' and `n' scale + indicators, convert scale factor to hunits before scaling. + +Mon Jan 14 12:39:12 1991 James Clark (jjc at jclark) + + * lib/font.c (scale_round): Better test for overflow when n is + negative. + +Thu Jan 10 11:10:56 1991 James Clark (jjc at jclark) + + * tbl/main.c (process_format): Add second argument of type + options*. Change callers. Allow opt->tab_char as well as '\t' + between format items. + +Mon Jan 7 12:30:18 1991 James Clark (jjc at jclark) + + * macros/tmac.an (PD): With no arguments, make sure register PD is + at least \n[.V]. + (TH): Call PD with no argument, instead of setting register PD + directly. + +Sun Jan 6 11:18:39 1991 James Clark (jjc at jclark) + + * Version 1.00 released. + +Sat Jan 5 08:44:30 1991 James Clark (jjc at jclark) + + * ps/tmac.ps, xditview/tmac.X: Add font translation of C to CR. + + * dvi/devdvi/DESC: Mount CW instead of CR. + + * dvi/tmac.dvi: Add definition of \(tm. + + * dvi/devdvi/texsy.map: Add lh, and rh. + * dvi/devdvi/texex.map: Add lt, rt, lb, rb, lk, rk. + * dvi/devdvi/texmi.map: Add *o. Regenerate fonts. + + * dvi/devdvi/FontMakefile: Generate H from cmss10. + * dvi/devdvi/Makefile: Install H. + * dvi/devdvi/H: New file. + +Fri Jan 4 15:04:57 1991 James Clark (jjc at jclark) + + * troff/env.c (vertical_spacing): Don't allow vertical spacing to + be 0. + +Thu Jan 3 13:41:19 1991 James Clark (jjc at jclark) + + * macros/tmac.s (@EN): Add \n(.V to the argument to ds@need. + + * macros/tmac.pic (PS): Avoid attempting to set negative indent. + + * macros/tmac.s (@EN): Handle the case where the equation is empty + but the label is not. + +Wed Jan 2 10:31:44 1991 James Clark (jjc at jclark) + + * troff/groff.h: New warning category WARN_SPACE. + * troff/input.c: Add WARN_SPACE to DEFAULT_WARNING_MASK. Add + WARN_SPACE to warning_table. + (interpolate_macro): Give a warning of type WARN_SPACE if the name + is longer than two characters and is not defined, but the first + two characters do make a defined name. + + * PROBLEMS: New file. + + * CHANGES: New file. + * README-0.6, README-1.00: Deleted. + + * groff.c, groff.sh: Add X75-12 and X100-12 devices. + * xditview/devX75/Makefile: Make devX75-12. + * xditview/devX100/Makefile: Make devX100-12. + + * xditview/devX100/eqnchar, xditview/devX75/eqnchar, + dvi/devdvi/eqnchar, ps/devps/eqnchar: Remove use of \R. + +Tue Jan 1 19:24:01 1991 James Clark (jjc at jclark) + + * README-0.7: Rename to README-1.00. + + * macros/tmac.pic: New file. + * macros/Makefile (install.nobin): Install tmac.pic. + +Mon Dec 31 10:40:53 1990 James Clark (jjc at jclark) + + * troff/env.c (hyphen_word): Correct the test for whether the + token is a hyphen. Reset npos to 0. + + * macros/tmac.s (par@sup-start, par@sup-end): New implementations. + +Sun Dec 30 15:53:13 1990 James Clark (jjc at jclark) + + * macros/tmac.s (ds*common-end): Call par*reset. + (PE): Likewise. + (par@reset-indent): Deleted. + + * macros/tmac.s (@IP): Divert the label. + +Sat Dec 29 14:33:32 1990 James Clark (jjc at jclark) + + * xditview/draw.c (setGC): Use a line width of .1m rather than + .04m by default; round rather than truncate value. + + * tbl/table.c (class empty_entry): New class. + (empty_entry::empty_entry, empty_entry::line_type): New functions. + (table::add_entry): Represent empty entries by objects of type + empty_entry. + (table_entry::line_type): Return -1. + (table::determine_row_type): Ignore entries with line_type 0. + Treat type -1 as non-lines. + +Fri Dec 28 15:04:41 1990 James Clark (jjc at jclark) + + * ps/devps/textmap, xditview/libXdvi/DviChar.c, tty/devlatin1/R.proto, + macros/tmac.s: Rename \(-d to \(Sd. + +Thu Dec 27 12:35:47 1990 James Clark (jjc at jclark) + + * ps/devps/textmap: Add `sd', `/_' and `3d' characters. + * xditview/libXdvi/DviChar.c: Likewise. + * dvi/devdvi/texsy.map: Add `<<', `>>'. + +Wed Dec 26 13:33:23 1990 James Clark (jjc at jclark) + + * troff/div.c (top_level_diversion::begin_page): Call + init_output() if the_output is 0. + +Sat Dec 22 12:35:29 1990 James Clark (jjc at jclark) + + * troff/input.c: Replace ESCAPE_E by ESCAPE_e and ESCAPE_C by + ESCAPE_c. + (get_copy): Turn \E into ESCAPE_E. + (token::process, asciify): Handle ESCAPE_E. + + * macros/tmac.s (ds*common-end, par@reset): Add `.rj 0'. + (RD): New macro. + (DS): Implement `.DS R'. + +Fri Dec 21 11:41:53 1990 James Clark (jjc at jclark) + + * macros/tmac.s (FS): New macro. + + * macros/tmac.s (fn@do-FS): Use @LP instead of LP. + + * macros/tmac.s (cov*tl-init): Remove after first execution + instead of aliasing to @nop. Call top of page macro explicitly + instead of setting trap; call @init first. Set pg@top as top of + page macro. + (cov*auto-init): Deleted. Set cov*tl-init instead of + cov*auto-init as top of page trap. + (TL, LP): Do a break instead of calling cov*tl-init. + (cov*print): With RP format but no TL, alias FS and FE to @FS and + @FE; in this case also give a warning and always start another + page. No need to set pg@top here. + (cov*tl-init): Rename to cov*first-page-init. + + * macros/tmac.s (RP): Do `.pn 0'. + (cov*tl-init): With RP format don't do `.pn 0'. + + * macros/tmac.s (pg@cs-top): Set no space mode. + + * macros/tmac.s (par@TL, par@AU, par@AI): New macros. + (cov*ab-init): Alias TL, AU and AI to these. + +Thu Dec 20 10:10:50 1990 James Clark (jjc at jclark) + + * macros/tmac.s (@EQ): Move the space before the equation into @EN + (@EN): Do nothing unless \n[dl] is > 0. + +Tue Dec 18 12:20:47 1990 James Clark (jjc at jclark) + + * pic/object.c (ellipse_object::radius): New function. + + * VERSION: Change version to 0.7. + + * tbl/table.c (block_entry::do_divert): Declare return type as + void. + (block_entry::divert, alphabetic_block_entry::divert): Return 1. + +Mon Dec 17 12:30:34 1990 James Clark (jjc at jclark) + + * troff/column.c: New file. + * troff/Makefile: Corresponding changes. + + * troff/hvunits.c (scale(vunits, vunits, vunits)): New function. + Friend of vunits. + + * troff/div.c (top_level_diversion::space): If the space causes + the first-page transition and springs a trap, truncate the space + to 0. + +Fri Dec 14 12:30:02 1990 James Clark (jjc at jclark) + + * ps/ps.c (ps_printer::do_import): Add a `clear' after including + the document. + + * pic/troff.c (troff_output::line_thickness, + troff_output::set_fill): Do a horizontal motion to compensate for + the width of the \D escape sequence. + +Thu Dec 13 10:17:14 1990 James Clark (jjc at jclark) + + * xditview/tmac.X: Reinstate definition of \(rn, but only for X100 + (not X75). + + * eqn/sqrt.c (sqrt_box::compute_metrics): Supply missing argument + to printf. + + * tbl/table.c (simple_entry::simply_print): Don't declare as pure. + Supply empty definition. + (text_entry::simple_print, simple_text_entry::simple_print): + Delete declarations. + (table::add_entry): Represent empty entries by objects of type + `simple_entry'. + +Wed Dec 12 08:50:48 1990 James Clark (jjc at jclark) + + * troff/Makefile: Remove -DHYPHEN_CONTROL from DEFINES. + + * tbl/table.c (left_text_entry::add_tab): New function. + + * macros/tmac.s: Make @RT an alias for par@reset. Make RT + initialize like LP. + +Mon Dec 10 11:19:55 1990 James Clark (jjc at jclark) + + * troff/env.c (environment::start_field): Give an error message if + there is no next tab. + +Sun Dec 9 11:46:40 1990 James Clark (jjc at jclark) + + * troff/env.c (hyphenate): Skip initial elements with zero + hyphenation code. + + * macros/tmac.s (par@init): Keep VS in points rather than units. + +Sat Dec 8 23:00:27 1990 James Clark (jjc at jclark) + + * pic/main.c (main): Implement `-c' option. + * pic/output.h: Declare make_tpic_output(). + * pic/tex.c (tex_output::set_pen_size): Make it virtual and + protected. + (tpic_output): New class. + (tpic_output::tpic_output, tpic_output::set_pen_size, + tpic_output::command, make_tpic_output): New functions. + +Fri Dec 7 11:57:41 1990 James Clark (jjc at jclark) + + * tbl/main.c (main): Call `.ab' if \n(.g is false. Define TS/TE + if they're not already defined. + * tbl/table.c (init_output): Don't test \n(.g. + + * troff/input.c (do_if_request): Delete `g' condition. Recognize + `d', `r' and `c' conditions even in compatibility mode. + +Tue Dec 4 09:13:47 1990 James Clark (jjc at jclark) + + * ps/tmac.ps (ps-bb): Protect against negative numbers in bounding + box. + +Mon Dec 3 07:18:26 1990 James Clark (jjc at jclark) + + * troff/env.h (environment::prev_line_interrupted): New member. + (environment::get_prev_line_interrupted): New function. + * troff/env.c (environment::newline): Set prev_line_interrupted. + (environment::environment(const environment *), + environment::environment(symbol)): Initialize + prev_line_interrupted. + * troff/input.c (process_input_stack): Don't give special + treatment to space and newline at the beginning of the line if the + previous line was interrupted. + +Sat Dec 1 15:48:37 1990 James Clark (jjc at jclark) + + * eqn/eqn.y: Disallow PRIME by itself. + * eqn/lex.c (token_table): Bind `opprime' instead of `prime' to + PRIME. + (def_table): Remove definition of '. Define prime to be `. + + * eqn/eqn.y: Split off part of rule `script' into a new rule + `nonsup'. + +Fri Nov 30 10:23:44 1990 James Clark (jjc at jclark) + + * macros/tmac.s ({, }): New string aliases. + +Thu Nov 29 11:34:40 1990 James Clark (jjc at jclark) + + * README-0.7: New file. + +Wed Nov 28 10:09:57 1990 James Clark (jjc at jclark) + + * macros/tmac.s: New file. + * man/groff_ms.man: New file. + * Makefile: Add definition of TMAC_S. Pass TMAC_S in SUBFLAGS. + * Makefile.bd: Similarily. + * man/Makefile: Add groff_ms.n to MAN7PAGES. Replace @TMAC_S@. Add + definition of TMAC_S. + * macros/Makefile: Add definition of TMAC_S. Install tmac.s. + * macros/TODO: New file. + +Sat Nov 24 20:04:54 1990 James Clark (jjc at jclark) + + * troff/env.c (right_justify): New function. + (init_env_requests): Bind this to request "rj". + (center_lines): Set right_justify_lines to 0. If we get a bad + integer, center 1 line. + (environment::environment(symbol), environment::environment(const + environment *)): Initialize right_justify_lines. + (environment::get_right_justify_lines): New function. + (init_env_requests): Bind this to number_register ".rj". + + * troff/env.c (environment::choose_breakpoint): Implement + hyphenation_margin and hyphenation_space. + (environment::get_hyphenation_space, + environment::get_hyphenation_margin): New functions. + (init_env_requests): Bind these to .hys and .hym. + (hyphenation_space_request, hyphenation_margin_request): New + functions + (init_env_requests): Bind these to hys and hym. + (environment::environment(symbol), environment::environment(const + environment *)): Initialize hyphenation_margin and + hyphenation_space. + * troff/env.h: Corresponding changes to class environment. + +Fri Nov 23 09:08:16 1990 James Clark (jjc at jclark) + + * troff/div.c (blank_line): Always do a break. + + * eqn/box.c (do_text): Turn off escapes while appending text to + string. + +Thu Nov 22 10:58:59 1990 James Clark (jjc at jclark) + + * troff/input.c (while_break_request, while_continue_request): New + functions. + (init_input_requests): Bind these to "break" and "continue". + (while_depth, while_break_flag): New variables. + (while_request): Update while_depth. Break out of loop if + while_break_flag is set. + +Wed Nov 21 10:54:40 1990 James Clark (jjc at jclark) + + * tbl/table.c (init_span_reg): Initialize span_width_reg to \n(.H + rather than 0. + +Mon Nov 19 00:45:03 1990 James Clark (jjc at jclark) + + * Makefile: Include -DBROKEN_SPOOLER by default. Expand comment. + + * stringify: New file. + * Makefile (groff.o): Use stringify. + + * xditview/tmac.X: Remove definition of \(rn. + * xditview/libXdvi/DviChar.c: Remove radicalex from + Adobe_symbol_map. + +Sat Nov 17 10:44:58 1990 James Clark (jjc at jclark) + + * tbl/table.c (table::add_entry): Allow alphabetic text blocks. + (alphabetic_block_entry::alphabetic_block_entry, + alphabetic_block_entry::divert, alphabetic_block_entry::print): + New functions. + (block_entry::divert): Split off body into ... + (block_entry::do_divert): If the block is alphabetic, subtract 2n + from the line length; also update the span width to dl+2n, and the + alphabetic span width to dl. + + * driver/input.c (do_file): While reading argument to D command, + when expanding buffer, multiply szp by sizeof(int) rather than 2 + in the argument to memcpy. + + * tbl/table.c (compute_span_width): Add 2n rather than 1n to the + width of alphabetic columns. + +Fri Nov 16 06:34:27 1990 James Clark (jjc at jclark) + + * troff/node.c (lookup_family): Supply second argument to lookup. + + * troff/dictionary.c (dictionary::lookup): After an unsuccesful + search, return immediately if v is 0. + + * pic/troff.c: Define EQN_NO_EXTRA_SPACE_REG. + (troff_output::start_picture): Set this reg. + (troff_output::end_picture): Remove this reg + * eqn/box.c (box::extra_space): Don't produce `\x's if + EQN_NO_EXTRA_SPACE_REG is defined. + + * eqn/eqn.y: Allow just a PRIME to be a `simple'. + * eqn/text.c (split_text): Map ' to \(fm when it's the first + character. + +Thu Nov 15 10:35:06 1990 James Clark (jjc at jclark) + + * macros/tmac.e: Use font 3 instead of B in $c. Remove `bd' + requests. + + * troff/div.c (top_level_diversion::top_level_diversion): + Initialize page_number to 0. + +Wed Nov 14 21:41:58 1990 James Clark (jjc at jclark) + + * groff/troff (environment::environment(const environment *)): + Initialize name to e->name, rather than "anonymous". + +Sat Nov 10 01:59:37 1990 James Clark (jjc at jclark) + + * xditview/libXdvi/Dvi.c (ShowDvi): If eof is encountered, reset + requested_page. Split middle part into ... + (FindPage): New function. + (SetValues): If we don't yet know the last page, and the requested + page is greater than the current page, call FindPage. + Update the font_map_string before doing this. + + * xditview/tmac.X: Add definitions of \(sq, \(ga, \(dg and \(dd. + Translate \(lh and \(rh into left and right double arrows. + + * troff/node.c (class hyphen_inhibitor_node): New class. + (hyphen_inhibitor_node::hyphen_inhibitor_node, + hyphen_inhibitor_node::copy, hyphen_inhibitor_node::same, + hyphen_inhibitor_node::type, + hyphen_inhibitor_node::get_hyphenation_type): New functions. + (node::add_discretionary_hyphen): Use hyphen_inhibitor_node rather + than dbreak_node(0, 0) to represent a `\%' at the beginning of a + word. + +Fri Nov 9 16:05:38 1990 James Clark (jjc at jclark) + + * troff/node.h (dummy_node::get_hyphenation_type, + transparent_dummy_node::get_hyphenation_type): Declare them. + * troff/node.c: (dummy_node::get_hyphenation_type, + transparent_dummy_node::get_hyphenation_type): New functions. + +Wed Nov 7 10:09:06 1990 James Clark (jjc at jclark) + + * xditview/libXdvi/draw.c: If M_PI not defined after including + math.h, then define it. + + * xditview/Makefile: Add definition of AR. Pass it to the submake + in libXdvi. + * xditview/libXdvi/Makefile: Add definitions of AR and RANLIB. + +Tue Nov 6 10:14:27 1990 James Clark (jjc at jclark) + + * troff/dictionary.h (object_dictionary::alias): Declare return + value as int. + * troff/dictionary.c (object_dictionary::alias): Return non-zero + if the old name was defined. + * troff/input.c (alias_macro): Give a warning if the old name was + not defined. + * troff/reg.c (alias_reg): Likewise. + +Mon Nov 5 00:31:39 1990 James Clark (jjc at jclark) + + * troff/input.c (token::next): Delete implementation of \R. + + * macros/Makefile: Strip comments from tmac.e while installing it. + + * troff/input.c: New variable `nroff_mode'. + (troff_request, nroff_request): New functions. + (init_input_requests): Bind `troff' and `nroff' to troff_request + and nroff_request. + (do_if_request): Compute results of t and n conditions from + nroff_mode. + + * text/text.c (split_text): Fix typo in >=. + + * eqn/lex.c: Add definition of `==' to def_table. + +Fri Nov 2 02:49:09 1990 James Clark (jjc at jclark) + + * pic/tex.c (tex_output::start_picture): Change the definitions of + \graph and \graphtemp so that they work properly with Plain TeX. + + * pic/tex.c (tex_output::solid_arc): Ensure that the second angle + argument to `ar' is not less than the first. + + * pic/pic.y: Allow a comma between elements of the variable list + in the argument to `reset'. + + * pic/object.c (arc_object::arc_object): Fix computation of + radius. + + * eqn/main.c (main): Add exit(0). + +Thu Nov 1 02:03:50 1990 James Clark (jjc at jclark) + + * troff/div.c (begin_page): Test no_space_mode after doing the + break, but still push the page ejector cookie before doing the + break. Also set the next page number after doing the break. + + * xditview/xditview.c (NewFile): Don't set the title and icon name + if this is the first file and its name is `-'. + * groff/groff.c: Define a new device flag XT_OPTION. Set it for + the X75 and X100 devices. + (main): If a device has the XT_OPTION flag set and there's exactly + one file argument, pass the driver -xrm and -title options to set + the icon name and window title to the name of the file. + + * troff/env.c (environment_switch): If there was an argument but + it wasn't a valid number or name, then pop an environment but + don't give an error message on underflow. + + * troff/number.c (start_number): Correct spelling in error message. + + * troff/input.c (token::delimiter): Don't print an error message + if err is false. + + * xditview/libXdvi/parse.c (ParseInput): In case 'D', only call + ParseDrawFunction if dw->display_enable is true. + +Wed Oct 31 05:49:50 1990 James Clark (jjc at jclark) + + * pic/pic.y: Parse text positioning like normal attributes, so as + to allow `"text" at 0,0 ljust'. Don't allow `center' as a + positioning attribute. + +Mon Oct 29 22:50:38 1990 James Clark (jjc at jclark) + + * tbl/main.c (process_data): When in state START while reading a + text block, don't change to state MIDDLE if c is a newline. + +Sun Oct 28 21:59:56 1990 James Clark (jjc at jclark) + + * dvi/dvi.c (dvi_printer::begin_page): Rename `i' variable to `j' + so as to avoid shadowing parameter. + +Wed Oct 24 18:35:39 1990 James Clark (jjc at jclark) + + * tbl/table.c (trim_space): Deleted. + (table::add_entry): Don't call trim_space. + +Mon Oct 22 03:48:39 1990 James Clark (jjc at jclark) + + * VERSION: Change version to 0.6. + + * troff/number.c (parse_expr): Make == work. + +Sat Oct 20 11:28:17 1990 James Clark (jjc at jclark) + + * man/grog.man: New file. + * man/Makefile: Add grog.n to MAN1PAGES. + * etc/grog.sh: New file. + * etc/Makefile: Install grog.sh as grog. + +Fri Oct 19 11:17:15 1990 James Clark (jjc at jclark) + + * troff/input.c (token::next): Implement \E. + +Thu Oct 18 11:56:24 1990 James Clark (jjc at jclark) + + * xditview/tmac.X: Change font translations to match tmac.ps. + + * troff/input.c (non_empty_name_warning): Don't give a warning if + `\{' terminates the name. + +Tue Oct 16 10:04:23 1990 James Clark (jjc at jclark) + + * ps/devps/symbol.diff: New file. + * ps/devps/FontMakefile: Mention symbol.diff. + +Sun Oct 14 11:46:46 1990 James Clark (jjc at jclark) + + * troff/node.c (font_position): Use get_long_name to read the + external_name. + + * troff/env.c (environment_switch): If we get a number that's < 0 + or >= NENVIRONMENTS, treat it like a name. + Change NENVIRONMENTS to 10. + + * troff/groff.h: Remove definition of FONTS_MAX. + * troff/node.h (class font_family): Make map a pointer instead of + an array. Add a map_size member. Make it a class. Make nm const + and public. Make invalidate_fontno a friend. + * troff/node.c: Define font_table_size. Make font_info a pointer + rather than an array. + (class troff_output_file): Allocate font_position dynamically. Add + nfont_positions member. + (troff_output_file::set_font): Grow font_position if necessary. + (troff_output_file::~troff_output_file): Delete font_position. + (troff_output_file::troff_output_file): Allocate font_position. + (grow_font_table): New function. + (troff_output_file::really_begin_page, + troff_output_file:really_copy_page): Use nfont_positions rather + than FONTS_MAX. + (mount_font_no_translate, mount_style): Call grow_font_table if + necessary. + (font_family::font_family): Allocate map. + (font_family::make_definite): Grow map if necessary. Use + font_table_size instead of FONTS_MAX. + (font_family::~font_family): New function. + (invalidate_fontno): Use font_family::map_size. + (get_fontno, env_space_width, env_half_narrow_space_width, + env_narrow_space_width, symbol_fotno, is_good_fontno, + get_bold_fontno, make_glyph_node): Use font_table_size rather than + FONTS_MAX. + (next_available_font_position): Never return 0. + +Fri Oct 12 10:17:52 1990 James Clark (jjc at jclark) + + * ps/tmac.ps: Add font translations for compatibility with dpost. + +Thu Oct 11 12:09:03 1990 James Clark (jjc at jclark) + + * eqn/pile.c: Rename default_baseline_sep to baseline_sep. + Move BASELINE_SEP_FORMAT and COLUMN_WIDTH_FORMAT into pbox.h. + Move definitions baseline_sep, shift_down, column_sep, + matrix_side_sep into... + * eqn/box.c: Add them to param_table. + * eqn/pbox.h: Add declarations to pbox.h. + + * troff/input.c (set_string): Cast value to unsigned char *. + + * troff/token.h (process_input_stack): Declare it static before + declaring it a friend. + +Wed Oct 10 09:59:13 1990 James Clark (jjc at jclark) + + * dvi/devdvi/texex.map: Fix positions of extensible brace middle + and bottom. + * dvi/devdvi/EX: Regenerate. + + * troff/input.c (init_charset_table): Make ", ', ), ], *, \(dg + transparent. + +Tue Oct 9 08:34:02 1990 James Clark (jjc at jclark) + + * eqn/lex.c: In defaults_table, make definition of `dot' call + `dot_def'. Don't explicitly make it roman. Similarily for other + accents. + + * pic/lex.c (for_input::for_input): Add by_is_multiplicative + argument. + (for_input::get, for_input::peek): Use this. + (do_for): Add by_is_multiplicative argument. + * pic/pic.y: Change optional_by clause to allow '*' after `by'. + Change semantic value of optional_by to be a double plus a flag + saying whethet the by clause is multiplicative. + + * eqn/lex.c (get_delimited_text): Remember location of start of + definition. Improve error handling when EOF is encountered. + + * lib/font.h: Rename handle_x_command to + handle_unknown_font_command. + * lib/font.c (font::load): Call handle_unknown_font_command for + any unknown command in the font description file. Don't call + handle_x_command. Include the name of the command in the argv. + Improve message for unknown command after kernpairs or charset + command. + * ps/ps.c (ps_font::handle_x_command): Rename to + handle_unknown_font_command. Remove message about `x download' + command. Give error message for wrong number of arguments. + * ps/devps/afmtodit: Generate `encoding' instead of `x encoding'. + * dvi/dvi.c (dvi_font::handle_x_command): Rename to + handle_unknown_font_command. Give an error message for wrong + number of arguments. Rename design_size to designsize. + * dvi/tfmtodit.c (main): Generate `checksum' instead of `x + checksum', `designsize' instead of `design_size'. + +Mon Oct 8 00:38:55 1990 James Clark (jjc at jclark) + + * eqn/*.[chy]: Change underaccent to uaccent. + + * eqn/eqn.y: Add rule for underaccent. Declare UNDERACCENT token; + give it the same precedence as ACCENT. + * eqn/other.c (make_underaccent_box): New function. + * eqn/box.h: Declare it. + * eqn/lex.c: Add UNDERACCENT to token_table. Add utilde to + def_table. + +Sun Oct 7 11:25:16 1990 James Clark (jjc at jclark) + + * pic/pic.y (reset_all): New function. Called in rule for RESET. + (parse_init): Call reset_all. + (define_variable): When defining scale reset only those + pre-defined variables that are scaled. + (defaults_table): Add `scale' as non-scaled value. + + * pic/pic.y: Redo parsing of text adjustments: parse adjustments + together with the text; allow any number of positioning words; + allow center as a positioning word. + + * pic/object.c (output::compute_scale): Get picture maximum height + and width from variables called maxpswid and maxpsht. + * pic/pic.y: Add maxpswid and maxpsht to defaults_table. + +Sat Oct 6 10:16:56 1990 James Clark (jjc at jclark) + + * pic/object.c (object_spec::make_text): Multiply textht by number + of text items. + + * pic/pic.y: Allow `sprintf("string", expr,...)' wherever text can + occur. + (do_sprintf): New function. + (pic.gperf): Add sprintf token. + (text, sprintf): New rules. + + * pic/pic.y: `rand()' with no arguments returns a random number + in the range [0,1). + + * pic/pic.y: Allow a bare expression to be an attribute: change + precedences to support this. Change optional_ordinal rule to + optional_ordinal_last to avoid reduce/reduce conflict. + * pic/object.c (object_spec::object_spec): Initialize direction. + + * pic/pic.y: Implement ^ operator meaning exponentiation. + + * troff/node.h: Add default argument to mount_font. + * troff/node.c (font_position): Read an optional third argument + giving the external_name. + (mount_font): Add optional argument giving the external_name. + (mount_font_not_translate): Have additional argument giving + external name. Use this name to load the font. Pass both names + to font_info::font_info. + (font_info::font_info): Have additional argument giving + external_name. + (class tfont): New member external_name. + (font_info::get_tfont): Use external name to construct tfont_spec. + +Fri Oct 5 04:03:13 1990 James Clark (jjc at jclark) + + * eqn/lex.c (init_table): Add argument giving device. Define + name of device to be "1". + (do_ifdef): Counts as true if the argument has been defined with + `define'. + * eqn/main.c (main): Call init_table with device argument. Make + device local to main. + * eqn/eqn.h: Change declaration of init_table. Remove declaration + of device. + + * pic/lex.c (get_delimited): Allow text to be delimited by + matching {}s. Don't recognize ending delimiter within a string. + + * troff/input.c (get_delim_name): New function. + (token::next): Implement \C. + + * lib/font.c (font::load): Grok ---. Add an alias for each + character based on its code. + (font::get_code_width): Deleted. + * lib/font.h (class font): Declare font::number_to_index(). + Remove declaration of font::get_code_width. + * lib/nametoindex.c (font::name_to_index): Add 512 rather than 256 + to indices of named characters. + (font::number_to_index): New function. + * troff/input.c (font::number_to_index): New function. + (get_charinfo_by_number, charinfo::get_number, + charinfo::set_number): New functions. + (token::next): Turn \N into a TOKEN_NUMBERED_CHAR. + (token::process, token::description, token::get_char, + token::add_to_node_list, token::operator==): Handle + TOKEN_NUMBERED_CHAR. + * troff/charinfo.h: Declare get_charinfo_by_number, + charinfo::get_number, charinfo::set_number. Add NUMBERED flag to + charinfo class. + (charinfo::numbered): New function. + * troff/token.h: Add TOKEN_NUMBERED_CHAR. + * troff/env.h (class environment): Remove declaration of ... + * troff/env.c (environment::make_numbered_char_node): Deleted. + * troff/node.c (make_numbered_node): Deleted. + (class numbered_glyph_node): Remove. + (troff_output_file::put_char_width, troff_output_file::put_char): + Handle numbered chars. + (troff_output_file::numbered_char): Removed. + (tfont::get_code_width): Removed. + (make_glyph_node): Don't search special fonts for numbered + characters. + * troff/node.h: Remove declaration of make_numbered_node. + * driver/input.c (do_file): Handle N command. + * driver/printer.h: Add declaration of ... + * driver/printer.c (printer::set_numbered_char): New function. + * dvi/tfmtodit.c (main): Generate unnamed entries. + * ps/devps/afmtodit: Likewise. + * xditview/xtotroff.c (MapFont): Likewise. + * xditview/libXdvi/parse.c (ParseInput): Grok N command. + + * tbl/main.c (process_format): If multiple widths are specified + for a column but all the widths are the same, don't give an error + message. + + * tbl/table.c (table::do_row): If the current row is all lines and + the stuff doesn't contains a line, mark the top of the row after + printing stuff before the row. If the current row is not all + lines and the stuff doesn't contain a line, don't unnecessarily + mark the top of the row before printing the stuff. + +Mon Oct 1 11:42:00 1990 James Clark (jjc at jclark) + + * troff/groff.h: Remove MAX_PATH. + * troff/input.c (open_file): Dynamically allocate space for the + path. + (open_mac_file, process_macro_file): Corresponding changes. + +Sun Sep 23 18:56:26 1990 James Clark (jjc at jclark) + + * troff/node.h (class output_file): Make copy_file pure. Add + vspace method ifdef COLUMN. Add is_printing method. + * troff/node.c: Add class printing_reg. Add class + real_output_file. Derive other output_file classes from + real_output_file; in these classes rename begin_page to + really_begin_page, print_line to really_print_line, copy_file to + really_copy_file, transparent_char to really_transparent_char. + Move output_file::flush to real_output_file. Add printing member + to class output_file. + * troff/div.h: Remove printing member from top_level_diversion. + Add vspace member function to class diversion ifdef COLUMN. Add + some declarations ifdef COLUMN. + * troff/div.c (top_level_diversion::copy_file, + top_level_diversion::transparent_output, + top_level_diversion::output): Don't test printing member before + output. + * troff/input.c: Handle initial variable_space_request ifdef + COLUMN. + * troff/Makefile: Add column.c but comment it out. Add -DCOLUMN + but comment it out. + +Sat Sep 22 11:32:22 1990 James Clark (jjc at jclark) + + * troff/div.c (diversion::need): Make any space forced. If we + sprung a trap, set truncated_space to minus the distance to the + trap and set needed_space to the amount that was needed. + (top_level_diversion::space): A forced space turns no_space_mode + off. + (class constant_vunits_reg): New class. + (init_div_requests): Implement number registers .trunc and .ne + using constant_vunits_reg. + (class truncated_space_reg): Deleted. + + * troff/div.h: Don't have a no_space_mode member in diversion. + Instead have it in top_level_diversion. + * troff/div.c (diversion::diversion): Don't initialize + no_space_mode. + (top_level_diversion::top_level_diversion): Initialize + no_space_mode. + (no_space, restore_spacing): Do nothing if curdiv != topdiv. + (macro_diversion::output): Don't clear no_space_mode. + + * troff/input.c (diverted_space_node::reread): Don't call + environment::do_break. In fill mode, act like a blank line. + (diverted_copy_file_node::reread): Don't call + environment::do_break. + + * troff/div.c (blank_line): New function. + * troff/div.h: Declare it. + * troff/input.c (process_input_stack): Call it. + + * troff/div.c (truncated_space_reg::get_string): New function. + (init_div_requests): Bind to .trunc. + (space_request, top_level_diversion::space, + top_level_diversion::output, macro_diversion::space, + macro_diversion::output): Update truncated_space. + (macro_diversion::output): Redo calculations when trap sprung. + (macro_diversion::output, macro_diversion::space): No need for + trap_flag. + + * troff/div.c (top_level_diversion::output): Set nl_reg_contents + after truncating post line spacing. + +Fri Sep 21 11:27:25 1990 James Clark (jjc at jclark) + + * ps/devps/prologue (MF, SF): Make them work even if setfont is + defined as a procedure rather than as an operator. + +Thu Sep 20 12:55:05 1990 James Clark (jjc at jclark) + + * troff/div.c (macro_diversion::space): Ignore no_space_mode. + +Wed Sep 19 10:54:37 1990 James Clark (jjc at jclark) + + * troff/div.c (top_level_diversion::output): Merge + output_file::print_line and output_file::end_of_line member + functions. + * troff/div.h (class output_file): + * troff/node.c (troff_output_file::print_line, + troff_output_file::end_of_line, output_file::end_of_line, + ascii_output_file::print_line, suppress_output_file::print_line): + Corresponding changes. + +Tue Sep 18 11:31:47 1990 James Clark (jjc at jclark) + + * troff/input.c (token::next): Don't give a warning for `\.'. + + * troff/env.c (environment::get_center_lines): New function. + (init_env_requests): Bind number register .ce to it. + * troff/env.h: Declare it. + * tbl/table.c (table::init_output): Define reset macro to restore + .ce. If center option not given, store .ce in SAVED_CENTER_REG. + Then do .ce 0. + (table::print): If center option not given, then imply center + option if SAVED_CENTER_REG > 0. + +Mon Sep 17 09:19:19 1990 James Clark (jjc at jclark) + + * ps/devps/Makefile: Remove T from FONTS. Remove TSymbol.ps and + Troff.ps from DOWNLOAD. + + * troff/Makefile: Change comment in DEFINES to avoid confusing + System V make. + + * ps/ps.c (ps_printer::do_exec): Allow newlines within PostScript + code. Don't try to catch errors with stopped. + (check_line_lengths): New function. + * ps/devps/prologue (EXEC): Deleted. + (EBEGIN, EEND): New procedures. + +Sun Sep 16 14:51:15 1990 James Clark (jjc at jclark) + + * troff/input.c: Include request.h before node.h. + * troff/node.c: Likewise. + * troff/env.c: Likewise. + * troff/div.c: Likewise. + * troff/node.h (class special_node): Store argument as a macro + rather than a char *. + * troff/node.c (special_node::special_node, special_node::copy): + Grok this. + (special_node::~special_node): Deleted. + (special_node::tprint): Deleted. + (special_node::tprint_start, special_node::tprint_end, + special_node::tprint_char): New functions. + (troff_output_file::special): Deleted. + (troff_output_file::start_special, troff_output_file::end_special, + troff_output_file::special_char): New functions. + * troff/input.c (special_node::tprint): New function. + (do_special): Use macro not char *. + (do_transparent_macro): Deleted. + (token::next): Don't call do_transparent_macro. + + * troff/input.c (token::next): Add 'Y' case. + (do_transparent_macro): New function. + * troff/node.c (troff_output_file::special): Handle newlines with + argument using new continuation convention. + * driver/input.c (get_string): Cope with continuation convention. + (do_file): Don't call skip_line after calling get_string(1). + * ps/ps.c (ps_printer::special, ps_printer::do_import, + ps_printer::do_def, ps_printer::do_exec): Cope with newlines in + arg. + * xditview/libXdvi/parse.c (ParseInput): Ignore lines starting + with +. + +Sat Sep 15 19:00:10 1990 James Clark (jjc at jclark) + + * troff/input.c (asciify): By default, illegal input characters + should return empty string. + + * troff/input.c (copy_file): Handle first page transition like title. + (token::next, process_input_stack): Grok COPY_FILE_REQUEST. + + * troff/input.c (token::next): Improve error message for EOF after + escape character. + (input_char_description): New function. + (get_char_for_escape_name): Use input_char_description. + (token::next): Warn about unrecognized escape sequences. + (warning_table): Add WARN_ESCAPE. + * troff/groff.h: Declare WARN_ESCAPE. Change WARN_TOTAL + accordingly. + + * troff/token.h: Remove declaration of process_input_stack. + + * troff/input.c: Remove declaration of init_hyphen_requests. + * troff/request.h: Correct spelling in declaration of same. + + * troff/input.c (token::next): Check whether escape_char is 0. + +Fri Sep 14 12:09:25 1990 James Clark (jjc at jclark) + + * groff.c (main, usage, help): Implement -P and -L options. + * groff.sh: Likewise. + + * troff/input.c (token::next): Use some gotos to avoid code + duplication. + + * troff/input.c (get_long_name, get_name, read_long_ecsape_name): + Avoid calling symbol::symbol if name empty. + +Thu Sep 13 06:21:45 1990 James Clark (jjc at jclark) + + * troff/input.c (init_input_requests): Make \n(.x return the major + version number and \n(.y return the minor version number. + * troff/Makefile: Construct file majorminor.c defining + major_version and minor_version automatically from ../VERSION. + + * troff/node.c (class glyph_node): Make operator new and operator + delete public. + (class ligature_node): Similarily. + + * troff/input.c (operator==(const macro &, const macro &)): New + function. + (non_interpreted_node::same): Use this. + (string_iterator::string_iterator): Make macro& argument const. + + * troff/input.c (input_iterator::get): New function. Don't make + asciify_macro or class non_interpreted_node friends of class + input_iterator. + (non_interpreted_node::interpret): Use input_iterator::get. + (asciify_macro): Likewise. + + * troff/input.c (~token_node, ~string_iterator, ~arg_list, + ~non_interpreted_node): Deleted. + * troff/node.c: (~suppress_output_file, ~ascii_output_file): + Deleted. + + * troff/symbol.h: Make all symbol member functions const. + + * lib/strtol.c: New file. + * lib/Makefile: Add strtol.c. + * Makefile: Define STRTOL as strtol.o to include strtol in + libgroff.a. + +Wed Sep 12 10:00:49 1990 James Clark (jjc at jclark) + + * pic/troff.c (troff_output::simple_circle): Divide by scale. + +Tue Sep 11 14:17:16 1990 James Clark (jjc at jclark) + + * troff/input.c (do_special): Use input_level. + + * troff/token.h (TOKEN_BACKSPACE): New token. + (token::backspace): New function. + * troff/input.c (token::description, token::next, token::process): + Grok TOKEN_BACKSPACE. + (do_special): Turn TOKEN_BACKSPACE back into \b. + + * troff/token.h (token::leader): New function. + * troff/input.c (do_special): Turn TOKEN_LEADER back into \001. + + * troff/input.c (do_special): Turn TOKEN_TAB back into \t. + + * troff/input.c (do_special): Use token::description in error + message. + +Mon Sep 10 11:06:27 1990 James Clark (jjc at jclark) + + * troff/input.c (decode_args): Combine quoted and + quote_input_level variables. Make it a for (;;) loop. + + * troff/input.c (get_char_for_escape_name): Check for \001 and \b. + + * troff/input.c (read_long_escape_name): The test for whether to + expand buffer was off by 1. + (read_string): Similarily. + +Fri Sep 7 11:45:50 1990 James Clark (jjc at jclark) + + * troff/input.c: Use `const int' rather than `static const int'. + + * troff/div.h (diversion::copy_file): Declare as pure virtual. + (macro_diversion::copy_file): New function. + * troff/node.h: New class diverted_copy_file_node. + * troff/node.c: Implement it. + * troff/input.c (copy_file): Use diversion::copy_file. Handle + first page transition by pushing a diverted_copy_file_node. + * troff/input.c (token::next, process_input_stack): Don't handle + COPY_FILE_REQUEST. + +Thu Sep 6 13:29:10 1990 James Clark (jjc at jclark) + + * ps/ps.c (flush_sbuf): Remember to add sbuf_kern when checking + whether space widths need adjusting. + + * troff/charinfo.h: Generalize translated_to_space to + special_translation so as to allow translation to \&. + * troff/input.c (translate): Allow translation to \&. + (charinfo::*): Corresponding changes. + * troff/node.c (make_node, node::add_char): Corresponding changes. + * troff/node.h (dummy_node::dummy_node): Allow optional first + argument. + + * lib/lib.h: Make codes 0200 to 0237 illegal input characters. + * troff/token.h: Remove TOKEN_TITLE. Remove token::title. Add + TOKEN_REQUEST. + * troff/input.c (token::next): Turn a TITLE_REQUEST into a + TOKEN_REQUEST with an argument of TITLE_REQUEST. + (token::process): Grok that. + * troff/input.c (copy_file): Handle first page transition like + title by pushing a COPY_FILE_REQUEST cookie. + (token::next, process_input_stack): Grok that. + * troff/node.h (output_file::copy_file): Add x and y arguments. + Make it non-pure. + * troff/div.c (top_level_diversion::copy_file): Supply them. + * troff/node.c (troff_output_file::copy_file): Add x and y + arguments; moveto specified position. Invalidate font_position + array after copying file. + (output_file::copy_file): New function. + (suppressed_output_file::copy_file, ascii_output::copy_file): + Removed. + * troff/input.c (transparent_file): New function. + (init_input_requests): Bind to "trf". + (token::next): Handle TRANSPARENT_FILE_REQUEST cookie. + (process_input_stack): Likewise. + + * troff/Makefile: Add ../lib/lib.h to GROFF_H. + + * troff/node.c (init_node_requests): New number registers .kern + pointing to global_kern_mode, and .lg pointing to + global_ligature_mode. + + * troff/node.c (ligature): Don't change it if we get a bad + integer. + + * troff/input.c (do_define_string): Don't strip tabs. + + * troff/input.c (asciify_macro): Make the string_iterator auto. + + * troff/node.c (init_font_requests): Rename to... + (init_node_requests): + * troff/node.h: Change declaration. + * troff/input.c (main): Change call. + + * troff/input.c (node::reread, diverted_space_node::reread): New + methods. + (process_input_stack): Call reread rather than + get_diverted_space_node. + * troff/node.c (node::get_diverted_space_node, + diverted_space_node::get_diverted_space_node): Removed. + * troff/node.h: Declare reread methods instead of + get_diverted_space_node methods. Make `n' member private. + * troff/input.c: (token::diverted_space): Removed. + * troff/token.h: Removed declaration. + + +Tue Sep 4 00:48:04 1990 James Clark (jjc at jclark) + + * eqn/script.c (script_box::compute_metrics): Don't let + SUP_RAISE_FORMAT become negative. + + * tbl/table.c (table::do_row): Entries that don't end in the + this row shouldn't make the row non-blank. + + * tbl/table.c (table::make_columns_equal): Only set the width of + columns which are marked as equal. + + * tbl/main.c (process_data): Before issuing excess data error, + if last character was a newline unget it; then get it again after + the error. Also include the contents of the entry in the message. + + * groff.c: New file. + * Makefile: Build groff from groff.c. Make it possible to use + either groff.sh or groff.c as groff. + * Makefile.bd: Similarily. + +Mon Sep 3 09:39:49 1990 James Clark (jjc at jclark) + + * groff.sh: Don't delay expansion of $@ in assignment to files. + Remove occurrences of \". + +Sun Sep 2 09:56:59 1990 James Clark (jjc at jclark) + + * all Makefiles: Simplify and rearrange. + + * Makefile: Handle fmod like malloc. + * lib/Makefile: Similarily. + * lib/fmod.c: Remove #ifdef NEED_FMOD. + + * Makefile: Rename OPTIMISE to OPTIMIZE. + + * groff.sh: Remove assignment to PATH. + * Makefile: Remove SHPATH variable. + * Makefile.bd: Similarily. + + * groff.sh: Add -V option to print the pipeline instead of + executing it. + +Fri Aug 31 00:56:46 1990 James Clark (jjc at jclark) + + * lib/font.c: Split off file searching into ... + * lib/fontfile.c: New file. + + * lib/strerror.c (strerror): Use `Error %d' for unknown errors. + +Thu Aug 30 13:13:55 1990 James Clark (jjc at jclark) + + * tbl/table.c (table::do_hspan): Delete assertion that e != 0. + Also change misleading comment. + (table::do_vspan): Change similarily misleading comment. + * tbl/main.c (process_data): A format row with an explicit `s' + uses up a data line, even if all the other columns are `_' or `='. + + * troff/input.c (token::description): Fix description of + TOKEN_DUMMY and TOKEN_EMPTY. + +Wed Aug 29 04:12:08 1990 James Clark (jjc at jclark) + + * groff.sh: Fix description of -Z in help message. + +Tue Aug 28 07:28:33 1990 James Clark (jjc at jclark) + + * pic/object.c (object_spec::make_object): Allow negative and zero + line thicknesses. + * pic/pic.y: Give linethick default value of -1.0. + * pic/troff.c (troff_output::troff_output): Initialize + last_line_thickness to BAD_THICKNESS. + (troff_output::finish_picture): Set thickness to BAD_THICKNESS. + (troff_output::line_thickness): Canonicalize negative thicknesses + to RELATIVE_THICKNESS. + * pic/tex.c (tex_output::set_pen_size): Silently map negative line + thicknesses to DEFAULT_PEN_SIZE. Canonicalize negative pen sizes + to -1.0. + (tex_output::start_picture): Set pen_size to -2.0. + + * ps/ps.c (ps_printer::set_line_thickness): If line_thickness is + 0, then use 0 linewidth. + (ps_printer::ps_printer): Initialize line_thickness to -1. + + * pic/troff.c (troff_output::simple_ellipse): Divide by scale. + + * ps/devps/symbolchars: Remove `or'. + * ps/tmac.ps: Implement \(or with .char. + + * ps/devps/symbolchars: Move most characters into textmap. + * ps/devps/textmap: Add names for troff bracket characters. Remove + ul, ru, br, bv. + + * ps/devps/TSymbol.ps: Removed. + * ps/devps/FontMakefile: Make S from Symbol not TSymbol. + * ps/tmac.ps: Do with .char what TSymbol did. + * ps/devps/download: Remove TSymbol. + + * ps/devps/T: Removed. + * ps/devps/Troff.ps: Removed. + * ps/devps/Troff.afm: Removed. + * ps/tmac.ps: Implement \(ru, \(ul, and \(br with .char. + * ps/devps/download: Remove Troff. + * ps/devps/FontMakefile: Remove T target. + * ps/devps/DESC-A4: Remove T from font list. + * ps/devps/DESC-letter: Likewise. + + * troff/input.c (macro_to_node): Rename to ... + (charinfo_to_node): Don't pass mac argument. Temporarily remove the + character's definition while processing it. + * troff/node.c (node::add_char, make_node): Change calls to + macro_to_node accordingly. + + * troff/input.c (token::next): Translate \_ to \(ul. + + * tty/devascii/R.proto: Add `|'. + * tty/devlatin1/R.proto: Likewise. + +Mon Aug 27 11:25:41 1990 James Clark (jjc at jclark) + + * man: Put the version number in all the man pages. + +Sun Aug 26 11:40:05 1990 James Clark (jjc at jclark) + + * Makefile.bd: New file. + * README.bd: New file. + + * VERSION: New file. + * lib/version.c: Removed. + * lib/Makefile: Create version.c from ../VERSION. Remove version.c + in clean target. + + * troff/input.c (main): Get hyphen_file from GROFF_HYPHEN + environment variable. + + * all Makefiles: Split install target into install.bin for + binaries, and install.nobin for everything else. + * Makefile: Add bindist target. + + * man/afmtodit.man: New file. + * man/Makefile: Add afmtodit.n to MAN1PAGES. + * ps/devps/Makefile: Add textmap to DEVICEFILES. Install afmtodit + in BINDIR. + * ps/Makefile: Pass BINDIR to make install in devps. + + * ps/ps.c (ps_printer::set_char): Do nothing if the character is + the space character. + + * ps/devps/FontMakefile: Rename symbol.afm to tsymbol.afm. + +Sat Aug 25 15:39:03 1990 James Clark (jjc at jclark) + + * ps/ps.c: Redo font downloading. + * ps/devps/download: New file. + * ps/devps/Makefile: Add download to DEVICEFILES. + * ps/devps/afmtodit: Remove -d option. + * ps/devps/FontMakefile: Don't use -d option with afmtodit. + * ps/devps/symbosl.ps: Add %%DocumentFonts comment. + * ps/devps/zapfdr.ps: Likewise. + * ps/devps/TSymbol.ps: Likewise. + +Fri Aug 24 20:10:30 1990 James Clark (jjc at jclark) + + * groff.sh: Initialize dev to ${GROFF_TYPESETTER:-@DEVICE@}. + +Thu Aug 23 10:03:47 1990 James Clark (jjc at yquem) + + * ps/ps.c (ps_output::include_file): If BROKEN_SPOOLER is defined, + then strip the first line if it starts with %. + * Makefile: Add a comment about this. + + * man/tfmtodit.man: New file. + * man/Makefile: Add tfmtodit.n to MAN1PAGES. + * dvi/Makefile: Install tfmtodit in BINDIR. + + * dvi/tfmtodit.c (usage): Mention -v option. + +Wed Aug 22 09:56:36 1990 James Clark (jjc at yquem) + + * troff/node.c (troff_output_file::end_of_line): Call do_motion. + * troff/node.c (troff_output_file::transparent_char): Don't call + flush_tbuf. + + * eqn: Add check_tabs method to most box classes. + * eqn/box.c (box::top_level): Call check_tabs. + + * eqn/script.c (script_box::output): Use \Z. + * eqn/limit.c (limit_box::output): Use \Z. + + * eqn/box.c (box::top_level): Use itoa. + +Tue Aug 21 09:29:28 1990 James Clark (jjc at yquem) + + * dvi/tmac.dvi: Add font translations for CR, C, TT. + * dvi/devdvi/Makefile: Don't make links to CW. + + * ps/tmac.ps: Add font translations for C, CW, CO, CX, CD, H, HO, + HX, HD. + * xditview/tmac.X: Likewise. + + * troff/node.c: Add font translation feature. + (get_font_translation): New function. + (symbol_fontno): Translate the font name. + (mount_font_no_translate): Rename to mount_font to this. + (mount_font): New function. + (font_family::make_definite): Call mount_font_no_translate instead + of mount_font. + (mount_style): Translate the font name. + (font_translate): New function. + (init_font_requests): Bind "ftr" to font_translate. + + * ps/devps/prologue (SN): New procedure that rounds a position to + the nearest (pixel + (.25,.25)). + (DL): Use SN to round endpoints. + + * lib/version.c: Changed version to 0.5. + +Sat Aug 18 04:43:21 1990 James Clark (jjc at yquem) + + * Makefile: Move definition of PAGE to the very beginning, so that + people are less likely to miss it. + +Fri Aug 17 02:15:11 1990 James Clark (jjc at yquem) + + * man/Makefile: Don't need to sed out @UPCASE_PROG_PREFIX@. + + * troff/env.c (environment::choose_breakpoint): Make `can't find + breakpoint' error a warning of type WARN_BREAK. Change message to + `can't break line'. + * troff/groff.h: Declare WARN_BREAK with code 4; change WARN_INPUT to + code 040000. + * troff/input.c: Add WARN_BREAK to warning_table. Include + WARN_BREAK in DEFAULT_WARNING_MASK. + + * tty/tmac.tty: Add definition of \(+-. + + * groff.sh: Remove `--' option to set command. + + * dvi/devdvi/texsy.map: Remove duplicate md entry. + + * ps/devps/eqnchar: Better definition of cdot using md. + * dvi/devdvi/eqnchar: Likewise. + * xditview/devX100/eqnchar: Likewise. + * xditview/devX75/eqnchar: Likewise. + * eqn/lex.c: Add definition of cdot. + +Thu Aug 16 09:33:57 1990 James Clark (jjc at yquem) + + * troff/input.c (get_optional_char): New function. + * troff/input.c (set_page_character): Use get_optional_char(), + rather than has_arg() and tok.get_char(1). + * troff/env.c (tab_character, leader_character, hyphen_char, + field_characters): Likewise. + (margin_character): Likewise. Also always delete the + margin_character_node. + + * troff/input.c (token::get_char): Use token::description. + + * troff/input.c (has_arg): Don't skip over tab and \}. + * troff/number.c (start_number): Give a warning if the number + starts with \} (WARN_RIGHT_BRACE) or tab (WARN_TAB). + +Wed Aug 15 10:04:37 1990 James Clark (jjc at yquem) + + * troff/input.c (empty_name_warning, non_empty_name_warning): New + functions. + (get_name, get_long_name): Use these. Rename `warn' argument to + `required'. + + * troff/node.c (get_fontno): Test that the symbol is not null. + + * troff/input.c (token::description): New function. + * troff/number.c (parse_term): Use token::description in `numeric + expression expected' message. + * troff/groff.h: Add WARN_MISSING. + * troff/number.c (start_number): New function. + * troff/number.c (get_vunits, get_hunits, get_number, get_integer, + get_incr_number): Use start_number(). + * troff/input.c (DEFAULT_WARNING_MASK): Enable WARN_NUMBER by + default. + * troff/input.c (get_name, get_long_name): Use WARN_MISSING. + * troff/reg.c (alter_format): Use WARN_MISSING. Also use + token::descripion. + * troff/input.c (token::get_char): Use WARN_MISSING. + * troff/input.c (token::delimiter): Use token::description. + * troff/env.c (environment_switch): Back out Aug 3 change. + * troff/input.c (has_arg): Skip over \}s and tabs but give a + warning. + * troff/token.h (token::tab): New function. + * troff/node.c (get_fontno): Use tok.skip() rather than has_arg(). + * troff/reg.c (alter_format): Likewise. + * troff/node.c (bold_font): Use has_arg() rather than tok.skip(). + +Tue Aug 14 10:11:21 1990 James Clark (jjc at yquem) + + * troff (most files): Redo warnings. Divide warnings into various + categories; warning() has an additional first argument indicating + the category it falls into. + * troff/input.c (main): -w now takes an argument. New option -W. + (enable_warning, disable_warning): New functions. + + * ps/devps/afmtodit: Add -a option to lie about the italic angle. + * ps/devps/FontMakefile: Pretend TI has an angle of 7. + +Mon Aug 13 10:11:16 1990 James Clark (jjc at yquem) + + * ps/devps/eqnchar: Better definitions of dotdot, vec, dyad, inf. + * xditview/devX100/eqnchar: Likewise. Remove definition of dot. + * xditview/devX75/eqnchar: Likewise. + * dvi/devdvi/eqnchar: Better definitions of vec, dyad, dotdot. + + * eqn/other.c: When bar or over applies to a single character + don't produce an overline_box or an underline_box. Instead produce + an accent_box or an underaccent_box, with the accent a line + whose width is accent_width. New classes underaccent_box, + overline_char_box and underline_char_box. + * eqn/box.h: Move overline_box, underline_box, accent_box class + declarations into eqn/other.c. Add declarations of + make_underline_box, make_overline_box, make_accent_box. + * eqn/eqn.y: Call make_overline_box, make_underline_box + make_accent_box instead of constructors. + * eqn/pbox.h, eqn/box.c: Add accent_width parameter. + + * eqn/other.c: Add accent_box::~accent_box. + * eqn/box.h: Declare it. + + * groff.sh: With -Tps, use eqn -D. + + * eqn/other.c (overline_box::output): Use \Z. If draw_flag use \D + rather than \l. + (underline_box::output): Similarily. + (accent_box::output): Use \Z. + + * xditview/tmac.X: Add definitions of ~ and ^ (so that they are a + bit smaller.) + +Sun Aug 12 09:41:15 1990 James Clark (jjc at yquem) + + * troff/div.c (top_level_diversion::transparent_output(unsigned + char)): Use asciify. + * troff/input.c (asciify): Don't make it static. + * troff/token.h (asciify): Declare it. + + * troff/input.c (get_name, get_long_name, token::get_char, + token::delimiter): Add an extra default argument which says + whether a warning should be printed. + * troff: Pass a non-zero argument to one of these rather than + printing a warning directly. + +Sat Aug 11 09:02:21 1990 James Clark (jjc at yquem) + + * troff: Consistently use symbol::is_null. + + * troff/dictionary.h: Move some inline functions into + dictionary.c. + + * troff/request.h: Move inline functions into input.c. + (request_or_macro::invoke): Make it pure. + + * troff/input.c, troff/reg.h: New class `constant_int_reg'. + * troff/input.c (init_input_requests): Use class constant_int_reg. + (class compatible_reg): Deleted. + * troff/div.c (init_div_requests): Use class constant_int_reg. + (class last_post_line_extra_space_reg): Deleted. + + * troff/env.c (tab_character): Don't change the tab character if + we get an invalid argument. + (hyphen_char): Similarily. + + * troff/reg.c (alter_format): Check that nm is not null. + + * Makefile, groff.sh: Make it possible to customize the commands + used for printing PostScript and dvi files. Also make it possible + to customize the path used by groff.sh. + + * eqn/eqn.y: Make `left' right associative. + +Fri Aug 10 18:20:39 1990 James Clark (jjc at yquem) + + * pic/pic.h: Added definition of M_SQRT2 for those systems that + don't have it. + + * pic/pic.h: Removed definition of INT_MAX. + + * troff/node.c (italic_corrected_node::vertical_extent): Omit + `return'. + + * troff/input.c (token::next): Handle \R like \n. + +Tue Aug 7 09:46:33 1990 James Clark (jjc at yquem) + + * ps/tmac.pc (PSPIC): Simplify. + + * troff/env.c (tab_stops::to_string): + * pic/pic.y (object_type_name): + * pic/troff.c (simple_output::line): + * pic/tex.c (tex_output::spline): + * pic/object.c (object_spec::make_object): + * tbl/main.c (process_data): Add cases to switch statements to + avoid cfront warnings. (Some of these are spurious, since the + switch already has a default case.) + + * ps/tmac.ps (PSPIC): Reformatted. Prefix all local names with + `ps-'. Don't test systat; instead check number of arguments to + ps-bb. + +Mon Aug 6 00:13:07 1990 James Clark (jjc at yquem) + + * macros/tmac.e: Do not decrease the page offset by 0.5i. + + * ps/ps.c (ps_printer::ps_printer): Use mktemp instead of tempnam. + Unlink the file as soon as we have opened it, so that we don't + have to bother with signal handlers. + (handler): Deleted. + (fatal_error_exit): Deleted. + (main): Don't call signal. + + * dvi/tfmtodit.c: Add -k option so that kerns with the skewchar + can be ignored. + * dvi/devdvi/Makefile: Use the -k option with S and MI. + + * pic/pic.y: If there is a label, or an nth construction before + the first `.' in the argument to `with', ignore it and generate a + warning. + * pic/lex.c (lex_warning): New function. + + * tbl/table.c (table::init_output): In section keep and release + macro, use 0 indent when diverting and the correct indent when + rereading. + + * troff/input.c (interpolate_number_format): Do not interpolate + anything if the number register is not defined. + + * tbl/main.c (process_data): Don't add entry when col >= ncolumns. + +Sat Aug 4 08:12:05 1990 James Clark (jjc at yquem) + + * ps/devps/prologue (PICTURE): Set components of graphics state to + their default values. + + * ps/devps/text.enc: Add trademark + * ps/devps/textmap: Add names for club, spade, heart, diamond, + carriagereturn, suchthat. Use Upsilon1 rather than Upsilon. + * ps/devps/symbolchars: Add names for summation and product. + + * dvi/devdvi/texsy.map: Add names for club, spade, heart, diamond, + suchthat. Add pp. Add upper-case letters. + + * xditview/libXdvi/DviChar.c: Add names for club, spade, heart, + diamond, carriagereturn, suchthat. Use Upsilon1 rather than + Upsilon. + + * dvi/devdvi/texsy.map: Rename lA (left angle bracket) to la, and + rA (right angle bracket) to ra. Introduce names for double-headed + arrows and double-barred arrows: <>, va, lA, rA, hA, uA, dA, vA. + * ps/devps/textmap: Likewise for ps device. + * xditview/libXdvi/DviChar.c: Likewise for X100 and X75 devices. + * tty/devascii/R.proto: Rename lA to la and rA to ra. + * tty/devascii/R.proto: Likewise. + * tty/tmac.tty: Provide definitions for \(<>, \(lA, \(rA, \(hA, + \(uA, \(dA. + * eqn/delim.c: In delim_table, rename \(lA to \(la and \(rA to \(ra. + + * xditview/tmac.X: Add definitions for \(fi \(fl \(ff \(Fi \(Fl. + + * eqn/lex.c: Added definitions of `approx', `grad' and `del' to + def_table. + +Fri Aug 3 09:59:27 1990 James Clark (jjc at yquem) + + * troff/div.c (when_request): Use symbol::is_null rather than + has_arg to determine whether we have an argument. + (change_trap): Remove the trap if we get an invalid number. Give + an error if we don't get at least the macro name. + (diversion_trap): Remove trap if we get an invalid name or number. + + * troff/env.c (environment_switch): Pop if we get an invalid + symbol or numeric expression. + + * troff/input.c (do_define_macro): If EOF is encoutered while + defining the macro, do tok.next() before returning. + + * troff/token.h (has_arg): Move definition from here, to ... + * troff/input.c (has_arg): ... here + + * troff/env.c (space_size): Do nothing if we get an invalid argument. + * troff/input.c (shift): Likewise. + + * pic/lex.c (get_token_after_dot): Accept `.center' as a synonym + for `.c'. + + * pic/troff.c (troff_output::start_picture): Comment out calls to + `..'. + + * eqn/main.c (do_file): Subtract 1 from current_lineno if + interpret_lf_args succeeds. + + * eqn/main.c (do_file): Don't recognize delimiter if preceded by + \\. This avoids problems with \$N. + + * groff.sh: Pass -C to preprocessors. + + * lib/lf.c (interpret_lf_args): Be more flexible. + + * tbl/main.c (main): Add -C option. + (table_input::get): Do not recognize TE if followed by character + other than a space or newline unless -C option given. + (process_input_file): Likewise for lf, TS. + (process_data): Likewise for lf in text blocks. + + * eqn/main.c (main): Add -C option. + (do_file): Don't recognize EQ, EN or lf if followed by character + other than space or newline unless -C option given. + * eqn/lex.c (file_input::read_line): Similarily. + * eqn/eqn.h: Declare compatible_flag. + + * etc/soelim.c (main): Add -C option. + (interpret_lf_args): Use version in libgroff. + (do_file): + + * pic/main.c (main): Add -C option, which sets compatible_flag. + (top_input::get), (top_input::peek): If -C option not given, + do not recognize .PS/.PE/.PF/.lf if followed by a character + other than space or newline. + * pic/lex.c (file_input::read_line): Similarily. + * pic/pic.h: Add declaration of compatible_flag. + +Thu Aug 2 11:11:27 1990 James Clark (jjc at yquem) + + * ps/tmac.ps (PSPIC): Avoid use of `echo -n'. + + * troff/node.c, troff/node.h: Add `asciify' methods to classes + derived from node. New class space_char_hmotion_node. + * troff/input.c (asciify_macro): New function. + * troff/input.c (init_input_requests): New request `asciify' bound + to asciify_macro. + * macros/mm.diff: New file. + * Makefile: In install.mm target use `patch' to apply + macros/mm.diff. + + * troff/input.c (macro::print_size): Just print the size in bytes. + + * troff/div.c (return_request): Correct the argument + interpretation. + +Wed Aug 1 12:38:36 1990 James Clark (jjc at yquem) + + * troff/node.h (class composite_node): Add sz member. + * troff/node.c (composite_node::size): Return sz. + * troff/input.c (macro_to_node): Use the initial size in the + environment as the size of the composite_node. + + * troff/node.c (node::zero_width_tprint): Provide a reasonable + default. + +Tue Jul 31 10:07:10 1990 James Clark (jjc at yquem) + + * troff/div.c (change_trap): If we get a bad number expression, + do nothing. + +Mon Jul 30 10:30:49 1990 James Clark (jjc at yquem) + + * lib/matherr.c (matherr): Define this only if math.h defines + TLOSS. + +Sun Jul 29 10:34:27 1990 James Clark (jjc at yquem) + + * troff/div.c (macro_diversion::distance_to_next_trap): If there + no diversion trap return vunits(INT_MAX - vresolution). + +Sat Jul 28 14:28:14 1990 James Clark (jjc at yquem) + + * troff/input.c (do_zero_width): New implementation that doesn't + use a temporary environment. Use instead: + (token::add_to_node_list): New function. + * troff/env.c (environment::get_prev_char_height), + (environment::get_prev_char_height), + (environment::get_prev_char_skew): New functions. + (environment::get_prev_char): New function. + (environment::get_prev_char_width): Change to use get_prev_char. + (init_env_request): Implement new registers .cht, .cdp, .csk. + * eqn/sqrt.c (sqrt_box::output): Don't rely upon the argument to + \Z being processed in a separate environment. + +Fri Jul 27 10:21:25 1990 James Clark (jjc at yquem) + + * tbl/table.c: Removed TABLE_BOTTOM_REG. + + * tbl/table.c (table::init_output): In the section release macro, + give a warning message if the section won't fit on one page. + + * tbl/table.c (table::do_top): Emit table keep only if table is + boxed. + (table::do_bottom): Likewise for table release. + (table::table), (table::add_vertical_rule): Remove reference to + keep member. + * tbl/table.h: Remove keep member. + + * tbl/table.c: New register SUPPRESS_BOTTOM_REG. In + SECTION_RELEASE_MACRO, if there's not enough space before the next + trap to output the diversion, call T# ourselves, set + SUPPRESS_BOTTOM_REG to 1, spring the trap, then set + SUPPRESS_BOTTOM_REG back to 0. In T#, do nothing if + SUPPRESS_BOTTOM_REG is non-zero. In T#, always mark the current + vertical position and return to it before turning traps on again. + +Thu Jul 26 02:54:32 1990 James Clark (jjc at yquem) + + * troff/node.c, troff/node.h: In classes derived from node, + replace prev_char_width method by last_char_node method. + * troff/env.c (environment::get_prev_char_width): Use + node::last_char_node rather than node::get_prev_char_width. + + * Makefile: Added comment about -fno-inline on 68030-based + Apollos. + + * troff/reg.c (number_format_to_ascii), eqn/delim.c (DELIM_TABLE_SIZE), + tty/tty.c (tty_font::load_tty_font), dvi/tfmtodit.c (main): Cast + expressions using sizeof to int. + * dvi/dvi.c (dvi_font::handle_x_command): Avoid long->int warnings. + + * macros/tmac.e (TS): Don't move @f back past the current + position. + +Wed Jul 25 09:11:08 1990 James Clark (jjc at yquem) + + * ps/ps.c (main): Buffer stderr. + * dvi/dvi.c (main): Likewise. + * tty/tty.c (main): Likewise. + + * ps/ps.c (ps_printer::do_import): Improve error handling. + + * troff/input.c (abort_request): Use asciify. + + * driver/printer.h (printer::draw), driver/printer.c (printer::draw), + ps/ps.c (ps_printer::draw), dvi/dvi.c (dvi_printer::draw): Make + type of first argument int rather than char. This works around a + bug on the 68030 based Apollo using g++ 1.37.1. + + * tbl/table.h (class table): Add `keep' member. + * tbl/table.c (table::table): Initialize `keep'. + (table::add_vertical_rule): Set `keep' to 1. + (table::do_top): Only emit table keep macro is `keep' is non-zero. + (table::do_bottom): Likewise for table release macro. + (table::do_row): Emit section keep macro even if the row is 0. + +Tue Jul 24 08:35:07 1990 James Clark (jjc at yquem) + + * macros/tmac.e (@C): Preserve the font family across the change + in environments. + +Mon Jul 23 10:15:23 1990 James Clark (jjc at yquem) + + * lib/font.c: Initialize font::hor and font::vert to 1. + (font::load_desc): Check the values of font::hor and font::vert. + + * lib/lib.h: Added definition of INT_DIGITS. Fix it so that it can + be included in a C compilation. + (iftoa): Use INT_DIGITS. Include lib.h. + (itoa): Likewise. + (as_string): Likewise. + * tbl/table.c: Removed definition of INT_DIGITS. + * eqn/box.c (box::top_level): Use INT_DIGITS + 1 instead of 12. + * troff/input.c (input_input_requests): Likewise. + * ps/ps.c (make_encoding_name): Likewise. + (ps_printer::set_style): Likewise. + (ps_output::put_number): Use 1 + INT_DIGITS + 1 instead of 12. + + * tty/devascii/R.proto: Map fm onto '. + * tty/devlatin1/R.proto: Likewise. + +Sat Jul 21 12:45:07 1990 James Clark (jjc at yquem) + + * tbl/table.c: Use ' instead of DELIMITER_CHAR in places where the + argument to \w is at a different input level. + + * tbl/table.c (table::init_output): Define a new macro + REPEATED_VPT_MACRO, like vpt but if in a diversion also + transparently outputs itself. + (table::define_bottom_macro): Use REPEATED_VPT_MACRO instead of + vpt. + (table::do_row): Likewise. + + * tbl/table.c (vertical_rule::print): Prefix the .sp -1 line with + TRANSPARENT_STRING_NAME. + + * tbl/table.c (table::init_output): In the table release macro + print an error message and don't produce any output if after + issuing the need request the table still will not fit. Also + remove the diversion after bringing it back. + + * tbl/table.c (table::init_output): Define a new macro + REPEATED_MARK_MACRO, like mk but if in a diversion also + transparently outputs itself. + (table::do_row): Mark row_top_reg using REPEATED_MARK_MACRO. This + is necessary because .TH might not call .T#. + (table::do_top): Likewise TOP_REG. + (table::define_bottom_macro): If TOP_REG is no longer valid, use + #T - DOUBLE_LINE_SEP rather than #T. This is necessary because the + table header might contain just the two top rules. + +Fri Jul 20 10:51:42 1990 James Clark (jjc at yquem) + + * troff/div.c: Implement new request `ptr' to print all traps. + + * troff/env.c (init_env_requests): Implement `.tabs' reg with + init_string_env_reg. + * troff/env.c (class tab_reg): Deleted. + +Thu Jul 19 12:07:16 1990 James Clark (jjc at yquem) + + * troff/div.c: New number register .pn returns the number of the + next page as set by the pn request. + + * macros/tmac.an: Redid headers and footers. Number each manual + entry starting from 1 unless \nC is > 0, like Sun. Added an + optional 5th argument to .TH which specifies the manual name and + appears in the center of the header. Understand the X, P and D + registers like Sun. + +Wed Jul 18 10:23:31 1990 James Clark (jjc at yquem) + + * troff/env.c (init_env_requests): New number register `.lt' to + return the title length. + + * troff/node.h (class transparent_dummy_node): New class. + * troff/node.c (class transparent_dummy_node): Provide member + functions. + * troff/env.c (interrupt): Add a transparent_dummy_node, rather + than a dummy_node. + + * troff/input.c (token::next): New escape sequence \). + * troff/input.c (get_copy): Recognize \) in copy mode. + + * troff/input.c (input_stack::clear): New function. + * troff/input.c (exit_request): Use input_stack::clear. + + * troff/token.h: Removed TOKEN_NO_PRINT_CHAR. + * troff/input.c (token::process): Removed case TOKEN_NO_PRINT_CHAR. + + * troff/env.c: Move set_page_character to input.c. Move + page_character to input.c also. + * troff/env.c (title): Split off the reading of the parts of the + title into read_title_parts. + * troff/input.c (read_title_parts): New function. Check the + input_level when testing whether a token matches the delimiter. + + * troff/input.c (exit_request): New function. + * troff/input.c (init_input_requests): Bind ex request to + exit_request rather than exit_groff. + + * troff/input.c (exit_groff): Call tok.next() before + process_input_stack(). + +Mon Jul 16 09:47:23 1990 James Clark (jjc at yquem) + + * troff/env.c: ifdef widow control support on WIDOW_CONTROL. + * troff/env.h: ditto. + * troff/input.c: ditto. + + * troff/env.c (environment::is_empty): Test pending_lines. + + * troff/env.c (environment::have_pending_lines): Removed. + + * troff/input.c: Add request to flush pending lines from the + environment. + + * troff/env.c, troff/env.h: Add automatic widow control feature. + + * troff/input.c (exit_groff): Do process_input_stack() after + do_break() but before setting exit_flag to 2. + + * troff/input.c: Remove FLUSH_PENDING_LINES and + TOKEN_FLUSH_PENDING_LINES. Instead, flush pending lines from + environment after END_TRAP token seen, but only if there aren't + any more traps still unfinished. + * troff/token.h: Remove TOKEN_FLUSH_PENDING_LINES. + +Sun Jul 15 10:50:08 1990 James Clark (jjc at yquem) + + * troff/env.c: Rename the `retain_size' member of class + pending_output_line to `no_fill'. + + * troff/env.c (title): When the line is output, make the + retain_size argument !fill. + + * troff/node.h: Add `hyphenated' member to struct breakpoint. + * troff/node.c (space_node::get_breakpoints), + (dbreak_node::get_breakpoints): Fill this in. + * troff/env.c: Allow specification of maximum number of + consecutive hyphenated lines. + + * troff/env.c (environment::is_empty): Add test for !current_tab. + +Sat Jul 14 11:23:01 1990 James Clark (jjc at yquem) + + * troff/env.c (environment::hyphenate_line): Don't completely give + up if the word is not to be hyphenated; continue so that breaks + can be made at break_char_node's. + + * lib/lib.h: Only define INT_MAX if it's not already defined; + undef INT_MIN if it's already defined. + + * Makefile: Make it easy to define CFRONT_ANSI_BUG. + + * lib/lib.h: If CFRONT_ANSI_BUG is defined, cast INT_MIN to long. + This works around a bug in AT&T C++ 2.0 used with an ANSI C + compiler. + + * macros/tmac.an (an-header): Set no-space mode. + + * macros/tmac.an (TH): Start a new page if necessary. + + * Started using ChangeLog at version 0.4. + +Local Variables: +version-control: never +coding: latin-1 +End: diff --git a/contrib/groff/ChangeLog.116 b/contrib/groff/ChangeLog.116 new file mode 100644 index 000000000000..ddbf22c2072d --- /dev/null +++ b/contrib/groff/ChangeLog.116 @@ -0,0 +1,1388 @@ + +Version 1.16.1 released +======================= + +2000-07-31 Werner LEMBERG + + Preparing release 1.16.1. + + * REVISION: Revision number set to 1. + * MORE.STUFF: Added info about port to DOS. + * NEWS, win32-diffs: Updated. + + * src/include/nonposix.h: Remove first line -- this file is used + in C also. + + * Makefile.in (dist): Delete Imakefile earlier to avoid a soft + link to it. + +2000-07-30 Werner LEMBERG + + * doc/texinfo.tex: Update to latest version. + +2000-06-28 Paul Eggert + + * Makefile.in (ENVSETUP): Don't assume POSIX make semantics for + commands that fail. Don't assume that "export a=b" is valid shell + syntax. This is needed for Solaris 2.5.1. + + * src/libs/libgroff/tmpfile.cc, src/utils/indxbib/indxbib.cc: Fix + comment about missing Solaris headers. + + * PROBLEMS: Add section about problems with Sun Make and VPATH. + +2000-06-25 Werner LEMBERG + + * src/devics/grodvi/dvi.cc: Replace _setmode() (for MSC) with + SET_BINARY(). + + * src/include/posix.h: Use HAVE_UNISTD instead of _MSC_VER. + + * win32-diffs: Updated. + * README.WIN32: Added CRs to make all Windows editors happy. + + * src/roff/troff/node.cc: Added WIFSIGNALED() macro (copied from + src/roff/groff/pipeline.c). + +2000-06-23 Eli Zaretskii + + * src/roff/grog/Makefile.sub (grog): Prepend `-e' to + $(SH_SCRIPT_SED_CMD), for the case where its value is empty. + +2000-06-17 Eli Zaretskii + + * src/utils/tfmtodit/tfmtodit.cc: #include nonposix.h. + (tfm::load, gf::load): Open tfm and gf files in binary mode: these + are binary files. + (main): Support non-Posix systems with several different styles of + slash characters in file names. + + * src/utils/pfbtops/pfbtops.c: #include nonposix.h. + (main) [SET_BINARY]: Switch stdin into binary mode. + + * src/utils/indxbib/indxbib.cc: #include nonposix.h. + (main): Support file names with several possible slash-type + characters, as given by DIR_SEPS[] in nonposix.h. + (main) [__MSDOS__]: If renaming the temporary index file fails + because it has more than one dot in its trunk, replace the dot + with an underscore and try again. + (do_file): Use FOPEN_RB instead of "r". Skip every CR before a + Newline. + [__MSDOS__ || _MSC_VER]: Stop at the first ^Z character. + + * src/utils/hpftodit/hpftodit.cc: #include nonposix.h. + (File::File): Open the input file in binary mode. Strip CR + characters from each CR-LF pair. + (xbasename): Support file names with several possible slash-type + characters, as given by DIR_SEPS[] in nonposix.h. + + * src/include/Makefile.sub (HDRS): Add nonposix.h. + + * src/roff/troff/node.cc [HAVE_UNISTD_H]: Include . + (WIFEXITED, WEXITSTATUS, WTERMSIG, WIFSTOPPED, WSTOPSIG) + [!_POSIX_VERSION]: Define for traditional Unix systems. + (real_output_file::real_output_file): Remove the MSVC-specific + call to popen, use instead POPEN_WT, appropriately defined on + nonposix.h. #include nonposix.h. + (real_output_file::~real_output_file): Remove the MSVC-specific + call to pclose, a suitable macro is now defined on nonposix.h. + Use the portable macros WIFEXITED, WIFSIGNALED, WTERMSIG, WSTOPSIG + and WEXITSTATUS instead of assuming traditional Unix + interpretation of the status returned by pclose. + + * src/roff/troff/input.cc (pipe_source): Remove the MSVC-specific + call to popen, use POPEN_RT instead (appropriately defined on + nonposix.h). #include nonposix.h. + (ps_bbox_request): Open the PostScript file in binary mode. + Close the file after processing it. + (getpid) [_MSC_VER]: Remove; a suitable macro is now defined on + nonposix.h. + + * src/roff/groff/pipeline.c (run_pipeline) [__MSDOS__ || _WIN32]: + A version of run_pipeline that doesn't use `fork'. + (signal_catcher) [__MSDOS__ || _WIN32]: New function. + (system_shell_name, system_shell_dash_c) + (is_system_shell) [__MSDOS__ || _WIN32]: New functions, to hide + the ugliness of testing DOS/Windows file names for equality, and + support both stock shells and ports of Unix shells. + + * src/roff/groff/groff.cc: #include nonposix.h. + (BSHELL): Definition moved to nonposix.h. + (main): Use PATH_SEP[0] instead of literal ':'. Use BSHELL_DASH_C + instead of a literal "-c". + (xbasename): Support file names with several possible slash-type + characters, as given by DIR_SEPS[] in nonposix.h. + (possible_command::print): Use BSHELL_DASH_C and IS_BSHELL instead + of literal strings. + + * src/preproc/soelim/soelim.cc: #include nonposix.h. + (do_file): Use IS_ABSOLUTE instead of testing for a literal '/'. + + * src/preproc/pic/Makefile.sub (YTABH): Change pic.tab.h to + pic_tab.h. + + * src/preproc/pic/lex.cc: Change pic.tab.h to pic_tab.h. + + * src/preproc/eqn/Makefile.sub (YTABH): Rename eqn.tab.h to + eqn_tab.h. + + * src/preproc/eqn/lex.cc: #include eqn_tab.h, not eqn.tab.h. + + * src/libs/libgroff/tmpfile.cc (DEFAULT_TMPDIR) [P_tmpdir]: If + P_tmpdir is defined, use it instead of the literal "/tmp". + (remove_tmp_files, add_tmp_file): New functions. + (xtmpfile): Record temporary files and register an atexit function + to delete them explicitly, instead of relying on the OS to do + that, which doesn't work on non-Unix systems. + + * src/libs/libgroff/searchpath.cc: #include nonposix.h. + (search_path::search_path): Use PATH_SEP instead of a literal + colon. + (search_path::command_line_dir): Ditto. + (search_path::open_file): Use IS_ABSOLUTE, PATH_SEP and DIR_SEPS, + to support non-Posix systems. + + * src/libs/libbib/search.cc: #include nonposix.h. + (search_list::add_file): Open the file in binary mode. + + * src/libs/libbib/linear.cc: #include nonposix.h. + (file_buffer::load): Remove \r characters preceding \n from the + loaded buffer. + + * src/libs/libbib/index.cc: #include nonposix.h. + (make_index_search_item): Open index_filename in O_BINARY mode. + (index_search_item_iterator::get_tag): Ditto. Remove \r + characters before \n characters. + (index_search_item::check_files): Open files in binary mode. + (index_search_item::munge_filename): Support DOS-style file names + with backslashes and drive letters, use IS_ABSOLUTE. + + * src/devices/grops/ps.cc: #include nonposix.h. + (main) [SET_BINARY]: Switch stdout to binary mode. + + * src/devices/grolj4/lj4.cc: #include nonposix.h. + (main) [SET_BINARY]: Switch stdout to binary mode. + + * src/devices/grolbp/lbp.cc: #include nonposix.h + (fill_pattern) [SET_BINARY]: Switch stdout to binary mode. + + * src/devices/grodvi/dvi.cc: #include nonposix.h. + [_MSC_VER]: Remove inclusion of Windows-specific headers (done by + nonposix.h). + (main) [SET_BINARY]: Switch stdout to binary mode. + [_MSC_VER]: Remove an explicit call to _setmode. + + * src/include/nonposix.h: New file. + + * Makefile.in (ENVSETUP): New variable, to set up case-sensitive + operation when building with DJGPP. + ($(TARGETS), dot, $(LIBDIRS), $(CPROGDIRS), $(CCPROGDIRS)) + ($(DEVDIRS), $(TTYDEVDIRS), $(INCDIRS), $(OTHERDIRS)): Use + ENVSETUP. + + * Makefile.comm: mv y.tab.[ch] to y_tab.[ch], to make it work on + MS-DOS. + (.man.n): Replace `;' with `|', since FONTPATH, MACROPATH, + etc. can include a semi-colon on DOS/Windows. + (depend.temp): Use depend1.temp instead of depend.temp1, to + prevent files from overerwiting each other on 8+3 filesystems. + + * gendef.sh (t): Change definition to work with DOS/Windows. + + doc/groff.texinfo: Apart of some typo corrections, I also changed + some index entris, to make them more non-ambiguous, and also put + @ignore around some parts that are not yet written, to allow the + Info output be readable. + +2000-06-10 Gael Queri + + Replaced specific checks for function declarations with a generic + routine taken from GNU bfd. + + * aclocal.m4 (GROFF_NEED_DECLARATION): New function. + GROFF_PUTENV, GROFF_POPEN, GROFF_PCLOSE, GROFF_HYPOT: Removed. + * configure.in: Use it. + * src/devices/grolbp/lbp.cc, src/include/lib.h, + src/preproc/grn/hgraph.cc, src/preproc/pic/pic.h, + src/roff/groff/groff.cc: Use it. + * Makefile.in, configure: Updated. + +2000-06-07 Paco Andrés Verdú + + * src/devides/grolbp/lbp.h: Removed unused variables. + +2000-05-31 Keith Thompson + + * src/devices/grolbp/lbp.cc (set_papersizes): Add declaration of + strncasecmp(). + +2000-05-31 Werner LEMBERG + + * aclocal.m4 (GROFF_SRAND): New function to test the return value + of srand() -- at least SunOS 4.1.3 uses `int' instead of `void'. + * configure.in: Use it. + * src/preproc/pic/pic.y, src/preproc/pic/pic.cc: Use it. + * configure, Makefile.in: Updated. + + * configure.in: Add test for strncasecmp(). + * src/include/lib.h: Use it. + +2000-05-29 Andrej Borsenkow + + * src/preproc/grn/Makefile.sub: Add MLIB. + +2000-05-29 Nix + + * Makefile.in: Use @datadir@ and @mandir@ appropriately. + +2000-05-29 Werner LEMBERG + + * src/roff/grog/Makefile.sub, src/roff/grog/grog.sh: Add `@g@'. + + * PROBLEMS: Small update. + + * src/devices/grolbp/lbp.cc: Various small fixes. + +2000-05-28 Keith Thompson + + * src/roff/nroff/nroff.sh: Fix main loop syntax. + + * src/utils/indxbib/indxbib.cc: Add declaration of mkstemp(). + +2000-05-25 Werner LEMBERG + + * man/roff.man: Removed unused macro. + +2000-05-24 Werner LEMBERG + + * Makefile.in (dist): Remove src/xditview/Imakefile explicitly. + This is needed e.g. if you do + `make distclean; ./configure; make dist'. + +Version 1.16 released +===================== + +2000-05-23 Werner LEMBERG + + Adding font CWI (constant width italic) to devdvi. + + * font/devdvi/CWI: New file. + * font/devdvi/generate/Makefile: Add generating rule. + * font/devdvi/DESC.in, font/devdvi/Makefile.sub, win32-diffs, + tmac/tmac.dvi: Use it. + * NEWS: Announce it. + + * font/devlj4/*: Regenerated (only adding kernings for `cq' glyph). + * font/devlj4/generate/Makefile: Cosmetic changes only. + + * man/groff.man: Removed most of the redundant description of + special characters (which is in groff_char.man). Added font + translation CB->CR for devdvi. Other minor fixes. + + * tmac/tmac.dvi: Improved appearance of \(co (copyright) and \(rg + (registered) symbols. + +2000-05-22 Werner LEMBERG + + * doc/Makefile: Added rule for creating info files. + + * font/devdvi/*: Added kernings for `cq' glyph. Updated to latest + AMS font metrics. + * font/devdvi/generate/Makefile: Fixed dependencies. + + * font/devps/*: Regenerated. Heavy changes for Bookman and + NewCentury Schoolbook! + * font/devps/generate/afmname: Will now run with GNU awk. + * font/devps/generate/textmap: Added forgotten `cq' glyph name. + * font/devps/generate/Makefile: Cosmetic changes only. + +2000-05-21 Werner LEMBERG + + * tmac/tmac.an: Added a new command line option `-rSxx' (`xx' can be + 10, 11, or 12) to support output with 11pt and 12pt base font sizes. + `.SS' now produces a heading with a smaller size than `.SH'. + Completely formatted. + * doc/groff.texinfo, tmac/groff_man.man, NEWS: Document it. + + * man/groff.man: Improved table appearance. Use of `eo' request + to reduce number of doubled backslashes in macro definitions. + Replacing `\e' with `\(rs'. Other minor fixes. + + * src/preproc/tbl/main.cc: Insert HTML table end tag before `lf' + to have correct line number. + + * INSTALL: Small improvement. + +2000-05-20 Bernd Warken + + * man/roff.man, tmac/groff_tmac.man: Updates (with corrections by + WL). + +2000-05-19 Bernd Warken + + * man/groff.man: Complete update (with a lot of corrections by WL). + +2000-05-18 Werner LEMBERG + + Adding `cq' (PS name `quoteright') glyph name as an alias for "'". + + * font/*/*: Implement it. + * man/groff_char.man, NEWS: Document it. + + * src/include/unix.h: Removed. It isn't used. + + * doc/groff.texinfo: Slight improvements. + +2000-05-17 Werner LEMBERG + + * README, win32-diffs: Small fixes and improvements. + +2000-05-16 Werner LEMBERG + + * FDL: New file (the Free Documentation License version 1.1). + + * doc/groff.texinfo: Added many start-up values for gtroff. + Some structural improvements of the source code. + +2000-05-15 Werner LEMBERG + + * src/roff/troff/input.cc: Added small comment about troffrc-end. + * src/roff/troff/troff.man: Added info about troffrc-end. + +2000-05-14 Werner LEMBERG + + * Makefile.in (EXTRADIRS): Fix typos. + (dist): Handle deletion of old .tar.gz file correctly. + (DISTDIRS): Include all tty output devices. + + * doc/groff.texinfo: Adding more cross references; countless other + fixes. + +2000-05-13 Werner LEMBERG + + * MORE.STUFF: Added Robert Marks's utilities. + +2000-05-12 Werner LEMBERG + + Added win32 port contributed by Blake McBride + . + + * README.WIN32, win32-diffs: New files. + * NEWS: Updated. + + * src/preproc/grn/hgraph.cc (HGSetBrush): Replace `%lf' with `%f'. + (tmove, tmove2): Added parentheses to avoid compiler warnings. + (change): Removed unused variables. + + * src/preproc/grn/main.cc (main, conv): Removed unused variables. + (savebounds): Changed return value from `int' to `void'. + * src/preproc/grn/hdb.cc: Ditto. + + * src/devices/grolbp/lbp.cc (lbp_printer::draw): Removed superfluous + final backslash in comment to avoid compiler warning. + + * src/utils/pfbtops/pfbtops.c: Added `getopt.h'. + + * doc/groff.texinfo: More fixes. + +2000-05-11 OKAZAKI Tetsurou + + * tmac/tmac.doc: Documentation fix. + +2000-05-11 Werner LEMBERG + + * doc/groff.texinfo: Reading the source code shows up a lot of + omissions and incorrect data... More conversion to @Deffn macros. + +2000-05-10 Werner LEMBERG + + * src/roff/troff/reg.cc (number_value_to_ascii): Remove ASCII + dependency. + + * src/roff/troff/request.h: Removing unused `no_break_flag'. + +2000-05-09 Werner LEMBERG + + * man/groff.man, man/roff.man, tmac/groff_tmac.man: Minor + improvements. + + * doc/groff.texinfo: Extended history section. More conversion to + @Deffn macros. More .tr documentation. + +2000-05-07 Werner LEMBERG + + * doc/groff.texinfo: Completed tab section. Added info about + fields. + +2000-05-06 Mike MacIsaac + + * PROBLEMS: Describe configure script fix for OS/390 Unix. + +2000-05-05 Werner LEMBERG + + * font/devdvi/DESC.in: Change size 11pt to 10.95pt (as used in + LaTeX 2e). + * NEWS: Document it. + + * man/troff.man: Minor optical improvements. + +2000-05-03 Werner LEMBERG + + Adding `dq' (PS name `quotedbl') glyph name as an alias for `"'. + + * font/*/*: Implement it. + * man/groff_char.man, NEWS: Document it. + +2000-05-02 Werner LEMBERG + + * tmac/groff_tmac.man, man/groff.man, man/roff.man: Fixing @MANxEXT@ + expansion. + * NEWS: Document the three new man pages. + + * aclocal.m4 (GROFF_CXX_CHECK): Removing obsolete AC_C_CROSS call. + * configure: Updated. + + * font/devcp1047/R.proto: Fixing fatal bug (a missing `"' character). + +2000-05-01 Werner LEMBERG + + Added grap support to grog. + + * src/roff/grog/grog.sh, src/roff/grog/grog.pl: Implement it. + * src/roff/grog/grog.man: Document it. + + * doc/groff.texinfo, NEWS: Add info about grap support. + + Add new man pages comptributed by Bernd Warken + (with slight fixes by me). + + * tmac/groff_tmac.man: New file documenting tmac mechanism. + * tmac/Makefile.sub: Add groff_tmac.man. + * man/roff.man: New file giving overview of roff system. + * man/troff.man: A short reference of troff. + * man/Makefile.sub: Add roff.man and troff.man. + +2000-04-30 Werner LEMBERG + + Added grap support to groff. + + * src/roff/groff/groff.cc: Implement it. + * src/roff/groff/groff.man: Document it. + + * src/devices/grotty/grotty.man: Add cp1047 device. + * src/preproc/eqn/eqn.man, src/preproc/eqn/neqn.sh, tmac/eqnrc: + Ditto. + * src/roff/groff/groff.man: Ditto. + * src/roff/nroff/nroff.sh, src/roff/nroff/nroff.man: Ditto. + * doc/groff.texinfo: Ditto. + + * tmac/troffrc: Fix mapping of latin-1 char 160 (non-breakable space) + for cp1047. + +2000-04-29 Werner LEMBERG + + * man/groff_char.man: Add `pc' glyph. + * tmac/tmac.latin1: Replacing `md' glyph with `pc'. + * tmac/tmac.tty: Add `pc' glyph. + * tmac/tmac.tty-char: Use/add `pc' glyph. Don't call tmac.latin1 if + we use cp1047 output device. + + * Makefile.in, aclocal.m4: Don't build utf8 on EBCDIC hosts since + there are still hardcoded latin1->unicode values in utf8's font + definition files. + * configure: Updated. + * NEWS: Minor clarification. Updated. + + * PROBLEMS: Formatted. Added info about C++ fix pack for OS/390 + Unix. + +2000-04-28 Werner LEMBERG + + Adding EBCDIC code page 1047. + + * font/devcp1047/R.proto, font/devcp1047/Makefile.sub, + font/devcp1047/DESC.proto: New files. + + * aclocal.m4 (GROFF_EBCDIC): Introduce TTYDEVDIRS which can be + either ascii/latin1 or cp1047. + * Makefile.in: Use it. + * configure: Updated. + + Replacing and/or adding `md' (mathdot) glyph with `pc' + (periodcentered) in all text fonts. + + * font/*/*: Change it. + +2000-04-27 Werner LEMBERG + + * aclocal.m4 (GROFF_OS390): Fixing compiler flags. + + * configure.in: Add check for strings.h. + * src/include/driver.h: Use HAVE_STRINGS_H. + * src/devices/grolbp/lpb.cc: Remove string.h. + + * src/include/groff-getopt.h: New file. It will be used instead of + getopt.h (to be included in lib.h) to avoid endless problems with + picky C++ compilers. + * src/include/lib.h: Use groff-getopt.h. + * src/include/Makefile.sub: Updated. + + * configure: Updated. + * Makefile.in: Updated. + + * NEWS: Mention EBCDIC support. + +2000-04-26 Werner LEMBERG + + * TODO: Some additions. + +2000-04-25 Werner LEMBERG + + * src/roff/troff/troff.man, doc/groff.texinfo: Fixing documentation + of mso request. + +2000-04-23 Werner LEMBERG + + * src/roff/troff/troff.man: Minor fixes. + +2000-04-22 Werner LEMBERG + + * src/roff/troff/troff.man, doc/groff.texinfo, NEWS: Document the + `.T' string register and the incompatible definition of the `.T' + number register (compared to Unix troff). + + * man/groff_char.man: Add some missing characters. + * font/devutf8/NOTES: Update. + +2000-04-21 Werner LEMBERG + + * src/include/htmlindicate.h, src/include/lib.h, + src/include/posix.h: Fix copyright. + + * src/include/Makefile.sub: Update. + +2000-04-20 Werner LEMBERG + + * src/roff/troff/input.cc (input_char_description): Removing + superfluous space char. + + * tmac/tmac.X: Fix typo \(bq -> \(Bq. + + * doc/groff.texinfo: Document EBCDIC. + +2000-04-19 Werner LEMBERG + + Introducing `shc' as the glyph name for the soft hyphen character. + + * tmac/tmac.tty, tmac/tmac.latin1, tmac/tmac.html, + font/devlatin1/R.proto: Use it. + + * NEWS: Updated. + +2000-04-18 Werner LEMBERG + + * src/devices/grops/ps.cc (ps_printer::flush_sbuf): Removing + dependency on ASCII order. + +2000-04-16 Sandor BARANY + + * src/libs/libgroff/illegal.c: Added EBCDIC table. + * src/roff/troff/input.cc: Added adaptation to EBCDIC. + + * src/preproc/refer/refer.cc, src/roff/troff/env.cc: Minor changes + to increase portability. + +2000-04-15 Werner LEMBERG + + * aclocal.m4: Added GROFF_EBCDIC and GROFF_OS390 tests. + Redefined AC_OUTPUT_MAKE_DEFS to replace ASCII character `012' with + the generic `\n' if under OS/390 Unix. + + * configure.in: Call GROFF_EBCDIC and GROFF_OS390. + + * configure: Regenerated. + +2000-04-14 Werner LEMBERG + + * doc/groff.texinfo: More conversions to @Deffn. + +2000-04-12 Werner LEMBERG + + * tmac/tmac.psfig: Fix incorrect use of `&' operator by replacing it + with `:'. + + * src/roff/nroff/nroff.man: Add note about tmac.tty-char. + +2000-04-10 Werner LEMBERG + + * doc/groff.texinfo: More conversions to @Deffn. + +2000-04-08 Werner LEMBERG + + * src/libs/libgroff/{getopt.c,getopt1.c}, src/include/getopt.h: + Updated to latest version (glibc 2.1.3). + +2000-04-07 Werner LEMBERG + + * doc/Makefile (clean): Include more index files. + Add rule texinfo->dvi. + +2000-04-05 Werner LEMBERG + + * doc/groff.texinfo: Added new index `op' for operators. More + info on end of sentence characters. More use of @Deffn. + +2000-03-30 Werner LEMBERG + + * */*.man: Adding a note that a whitespace can be inserted between + a command line option and its parameter -- we are using GNU getopt. + + * src/roff/groff/groff.man: Add example of `-m mandoc'. + +2000-03-28 Werner LEMBERG + + Correct anachronism of calling the man macro file with `-man' + instead of `-m man' etc. + + * tmac/tmac.man, tmac/tmac.mandoc, tmac/tmac.markup, tmac/tmac.mdoc, + tmac/tmac.me, tmac/tmac.ms: New files tmac.m which simply + load tmac.. + + * tmac/Makefile.sub: Updated. Take care of $(tmac_an_prefix) etc. + + * NEWS: Updated. + + * doc/groff.texinfo: Updated. + + * tmac/groff_man.man: Copyright added. + +2000-03-27 Werner LEMBERG + + * doc/groff.texinfo: Introducing macros `Deffn' and `Defmac' to + typeset the request resp. escape name with a tt font -- due to a + bug in texinfo.tex it is necessary to use the `-e' switch with + texi2dvi. + + Improving info about usage of groff units. + + Other minor fixes. + +2000-03-20 Werner LEMBERG + + * doc/groff.texinfo: Added section about man macro package + (I've basically taken groff_man.man). Introducing new indices `ma' + for macros/strings and `gl' for glyph names. Other minor fixes. + + * tmac/groff_man.man: Fixed some typos. + +2000-03-19 Werner LEMBERG + + * doc/groff.texinfo: Removed all occurrences of `you', `we', etc. + Other minor fixes. + + * doc/texinfo.tex: New file. + +2000-03-18 Werner LEMBERG + + * doc/groff.texinfo: Improved section on number registers. Other + minor updates. + +2000-03-16 Werner LEMBERG + + * src/roff/groff/groff.man: Added info about grolbp. Make nicer + synopsis. + + * src/devices/grolbp/grolbp.man, src/roff/nroff/nroff.man, + src/devices/grolj4/grlj4.man, src/devices/grops/grops.man, + src/preproc/eqn/eqn.man, src/utils/afmtodit/afmtodit.man, + src/utils/tfmtodit/tfmtodit.man: Make nicer synopsis. + + * src/preproc/grn/grn.man: Better synopsis; added copyright. + + * src/roff/grog/grog.man: Updated copyright date. + +2000-03-14 Francisco Andrés Verdú + + * configure.in: Added test for strdup. + + * src/devices/grolbp/lbp.cc: Added a strdup() version in case none + is available. + + Replaced dynamic allocation of arrays `[...]' with `new' operator. + + Other minor fixes. + +2000-03-12 OKAZAKI Tetsurou + + * Makefile.comm: Add $(INCLUDES) to $(ALL_CFLAGS). + +2000-03-11 Werner LEMBERG + + * src/preproc/grn/hdb.cc (DBGetType): Added return value to make + compilers silent. + * src/preproc/grn/hgraph.cc: Add #ifdef for hypot(). + * src/include/lib.h: Remove some spaces. + +2000-03-10 Werner LEMBERG + + * src/libs/libgroff/tmpfile.cc (xtmptemplate, xtmpfile): Removing + initializers from arguments (some compilers don't like this). + +2000-03-09 Gaius Mulley + + * src/libs/libgroff/htmlindicate.cc: Added library file which is now + used by pic and eqn to tell grohtml where the graphic regions start + and end. + * src/libs/libgroff/Makefile.sub: Use it. + * src/preproc/eqn/main.cc, src/preproc/pic/troff.cc: Altered to use + graphic_start() and graphic_end() from htmlindicate.cc. + +2000-03-09 Werner LEMBERG + + * tmac/tmac.safer: Will now work correctly in compatibility mode. + * tmac/groff_man.man: More fixes. + +2000-03-08 Werner LEMBERG + + * doc/Makefile: Added texput.log to the `clean' target. + * doc/groff.texinfo: Added info about delimiters for escapes. + +2000-03-08 Bernd Warken + + * src/preproc/pic/pic.man: Add info on conversion of pic images to + other graphic formats. + +2000-03-07 OKAZAKI Tetsurou + + * Makefile.in, Makefile.sub, src/preproc/eqn/Makefile.sub, + src/roff/groff/Makefile.sub, src/roff/nroff/Makefile.sub, + src/utils/afmtodit/Makefile.sub: Use $(INSTALL_SCRIPT) for script + files. + +2000-03-07 Werner LEMBERG + + * doc/groff.texinfo: Spelling fixes. + +2000-03-06 Werner LEMBERG + + * tmac/groff_man.man: Completely revised to cover everything in + tmac.an. + + * doc/groff.texinfo, src/roff/troff/troff.man: Document evc request. + Other minor fixings. + * src/roff/troff/env.cc (environment_copy): Improve error message and + fix itoa->i_to_a. + * src/roff/troff/TODO: Updated. + + * doc/Makefile: Bug fixes -- this is still provisional, though... + + * tmac/eqnrc: Small fixes. + +2000-03-05 Abramo Bagnara + + Adding a request `evc' to copy environments. + + * src/roff/troff/env.cc (environment::copy, environment_copy): + Implement it. + * src/roff/troff/env.h: Add prototype. + +2000-03-05 Francisco Andrés Verdú + + Adding strsep() -- Solaris 8 doesn't have it. + + * configure.in: Test it. + * src/devices/grolbp/lbp.cc: Add code. + +2000-03-05 Werner LEMBERG + + * src/roff/troff/div.cc (macro_diversion::output, + top_level_diversion::output): Fixing an incompatibility with + original troff: \x'0' updates the .a register also. Thanks to + for pointing this out. + * doc/groff.texinfo: Document it. + + * Makefile.in: Create Makefile.dep if necessary before calling the + submake process to avoid warning about nonexistent file. + + * NEWS, PROJECTS: Updated. + +2000-03-04 Werner LEMBERG + + * tmac/troffrc: Add tmac.lbp. + +2000-03-03 Francisco Andrés Verdú + + * tmac/tmac.lbp: New file. + * src/devices/grolbp/grolbp.man: Add documentation of `lbpname' + command. + +2000-03-03 Werner LEMBERG + + * Makefile.in: Fixing $(subdir). + + * README, NEWS: Small fixes. + + * test-groff: Adding path to grolbp. + + * configure.in: The (new) file src/xditview/Imakefile.in will be + also configured -- it is now possible to build gxditview in a + directory different from $srcdir. + +2000-03-02 Blake McBride + + * src/libs/libgroff/searchpath.cc (open_file): Adapting to WinNT. + + * MORE.STUFF: Added website of bell labs and info about plot2dev. + +2000-03-01 Colin Phipps + + * src/utils/indxbib/indxbib.cc (main): Use mkstemp() for temporary + files. + +2000-02-29 Werner LEMBERG + + Adding GNU getopt to the groff distribution. + + * src/include/getopt.h, src/libs/libgroff/{getopt.c,getopt1.c}: + New files. + * src/include/Makefile.sub, src/libs/libgroff/Makefile.sub: Update. + * aclocal.a4: Remove GROFF_GETOPT function. + * configure.in, Makefile.in, PROBLEMS: Update. + * src/include/lib.h: Replace getopt tests with getopt.h. + * src/devices/grolbp/lpb.cc: Remove inclusion of getopt.h. + + * doc/groff.texinfo: Further checking/updating. Adding more index + entries. + + * man/groff_out.man: Fix nroff mode activation (for emacs). + * man/groff_font.man: Add missing ligature. + +2000-02-28 Werner LEMBERG + + * doc/groff.texinfo: Further checking/updating. Adding more index + entries. + + * src/devices/grolbp/grolbp.man: Added a comment line at the + beginning of the file (similar to shell scripts) which indicates + that `tbl' should be used as a preprocessor. + +2000-02-27 Blake McBride + + Adapting groff to MS Visual C++ 6.0 compiler (tested with + Windows NT 4.0). Uses _MSC_VER define where necessary. + + * src/devices/grodvi/dvi.cc: Making stdout a binary stream. + * src/devices/grolj4/lj4.cc: Making getopt variables `extern "C"'. + * src/devices/grohtml/html.cc, src/devices/grops/ps.cc, + src/include/lib.h, src/libs/libgroff/errarg.cc, + src/libs/libgroff/itoa.c, src/libs/libgroff/nametoindex.cc, + src/preproc/refer/label.y, src/preproc/refer/label.cc, + src/roff/groff/pipeline.c, src/roff/troff/column.cc, + src/roff/troff/div.cc, src/roff/troff/env.cc, + src/roff/troff/input.cc, src/roff/troff/node.cc, + src/roff/troff/reg.cc: Renaming itoa() to i_to_a() and iftoa() to + if_to_a() to avoid name clashes. + * src/include/posix.h: Don't use unistd.h. + * src/libs/libgroff/tmpfile.cc: Use `#ifndef...#else...#endif' + clause for integrating non-Unix xtmpfile() code. + * src/roff/troff/input.cc: Adding `public' keyword to macro_header + structure; use "rt" for popen() in pipe_source(); add getpid() + dummy function. + * src/roff/troff/node.cc: Use special versions of popen() in + real_output_file() and pclose() in ~real_output_file(). + +2000-02-27 Werner LEMBERG + + Adding a new driver, grolbp, for Canon CAPSL printers (LBP-4 and + LBP-8 series laser printers). This code has been contributed by + Francisco Andrés Verdú . + + * src/devices/grolbp/*: The grolbp output device. + * font/devlpb/*: The font description files. + * Makefile.in: Add grolpb and devlbp subdirectories. + + * src/devices/grodvi/grodvi.man, src/devices/grolj4/grolj4.man, + src/devices/grotty/grotty.man,src/roff/troff/troff.man: Minor + typographic fixes. + + * doc/groff.texinfo: Further checking/updating. Adding more index + entries. + + * NEWS: Updated. + + * src/devices/grolbp/Makefile.sub: Adding $(srcdir). + + * man/groff_font.man: Adding info about obsolete DESC keywords. + * src/devices/grolj4/grolj4.man: Documenting additional DESC + keywords. + +2000-02-26 Werner LEMBERG + + * src/preproc/grn/grn.man: Added info about the gremlin file format + (contributed by Daniel Senderowicz ). + +2000-02-25 Werner LEMBERG + + * src/preproc/grn/main.cc: Allow values of `narrow' parameter and + friends to be non-integer. + + * src/preproc/grn/grn.man: Document it. + + * doc/groff.texinfo: Further checking/updating. Adding more index + entries. + +2000-02-24 Werner LEMBERG + + * src/preproc/grn/main.cc: Introduce BASE_THICKNESS, defining + line thicknesses to be integer multiples of this value. + + * src/preproc/grn/grn.man: Commenting out the -s option -- the + corresponding code doesn't work (yet). + + * doc/groff.texinfo: Further checking/updating. Adding more index + entries. + +2000-02-23 Werner LEMBERG + + * src/preproc/grn/{main.cc, hgraph.cc}: Using point units to + specify line thickness instead of base units. The new default + values are now 0.15,pt 0.45pt, and 0.75pt for thin, middle, and + thick lines respectively. + + Removed unused variable `prevval'. + + * src/preproc/grn/grn.man: Updated. + +2000-02-22 Werner LEMBERG + + * src/preproc/grn/main.cc: Slight formatting. + + * src/roff/groff/groff.man: Formatting fix. + * src/preproc/grn/grn.man: Ditto. + + * src/roff/grog/grog.pl: Fixing two embarassing bugs. + + * doc/groff.texinfo: Further checking/updating. + +2000-02-21 Werner LEMBERG + + * README, INSTALL, PROJECT, PROBLEMS, BUGREPORT: Updated. + + * test-groff: Added grn subdir to path. + + * doc/groff.texinfo: Some restructing and other small improvements. + + * src/roff/groff/groff.cc (help): Fixed info string. + +2000-02-20 Werner LEMBERG + + * doc/meref.me: Fix description of .GS request. + + * src/roff/troff/troff.man: Fixing typo. + + Adding the `grn' preprocessor for gremlin graphic files. + + * src/preproc/grn/*: This is the Berkeley distribution written by + David Slattengren and Barry Roitblat, adapted to groff by Daniel + Senderowicz and Werner Lemberg. + + * doc/grnexampl.{me,g}: A sample for grn. + + * Makefile.in: Added subdirectory entry for grn. + + * src/roff/groff/groff.cc: Added support for grn. It can be now + called with the switch `-g'. + + * src/roff/groff/groff.man: Updated. + + * src/roff/grog/grog.{man,pl,sh}: Updated. + + * NEWS: Updated. + +2000-02-11 Gaius Mulley + + * src/include/lib.h: Added xtmptemplate and made xtmpfile + parametrically polymorphic. + + * src/libs/libgroff/tmpfile.cc: Implemented xtmptemplate + and the alterations to xtmpfile. + xtmpfile can be requested to return the filename created + and asked not to unlink the temp file. The default behaviour + if parameters are absent is exactly the same as before. + +2000-02-11 Abramo Bagnara + + A new request `length' is available which returns the length of a + string in a number register: + + * src/roff/troff/input.cc (length_macro): Implement it. + * src/roff/troff/input.cc (init_input_requests): Register it. + +2000-02-11 Werner LEMBERG + + * doc/groff.texinfo, src/roff/troff/troff.man: Add documentation + of the `substring' request. + + * src/roff/troff/troff.man, doc/groff.texinfo: Document `length' + request. + + * src/roff/troff/TODO, NEWS: Updated. + +2000-02-09 Werner LEMBERG + + * src/roff/groff/groff.man: Added an example. + +2000-02-06 Werner LEMBERG + + I've considerably modified the directory structure of the + distribution to get a more vertical layout. For example, the number + of top level directories has been reduced from 42 to 6. + + As a consequence, many changes, especially to the makefiles, were + necessary: + + * The makefile variables `top_builddir' and `top_srcdir' have been + introduced. Virtually all relative paths have been replaced with + absolute ones using these two variables. + + * Dependencies (in the files `Makefile.dep') are no longer part of + the distribution. Instead, they are created during a `make install' + in the build directory. + + * aclocal.m4 (GROFF_SRCDIR, GROFF_BUILDDIR): Two new functions to + make `top_srcdir' and `top_builddir' absolute. + + Some other changes: + + * Man pages now depend on the files `VERSION' and `REVISION'. + + * The added shell script `mkinstalldirs' will replace `mkdir' in + almost all cases. + + * VERSION: Version number increased to 1.16. + +2000-02-04 Werner LEMBERG + + * grops/psrm.cc (read_one_of): Fixed pointer incrementation. + + * Makefile.in: Removed $(tmac_m) since it is no longer needed + (after an update of the mm stuff). + + * troff/Makefile.sub (majorminor.cc): Fix dependencies. + +2000-02-03 Werner LEMBERG + + The .psbb request will now also accept Mac PS images (i.e. using LF + as the EOL character). + + * troff/input.cc (ps_get_line): New function, taken from psrm.cc + (with slight modifications). + * troff/input.cc (do_ps_file): Use it. + + * test-groff: Add grohtml and grolj4 output devices to PATH. + +2000-01-30 Werner LEMBERG + + * NEWS, MORE.STUFF: Updated. + +2000-01-30 Cary D. Renzema + + Add the `srand' command to pic. + + * pic/lex.cc, pic/pic.y: Implement it. + * pic/pic.man: Document it. + * pic/pic.cc, pic/pic.tab.h: Regenerated (with yacc). + +2000-01-30 Werner LEMBERG + + Add a new request `.psbb'. This does exactly what the external + program psbb did. It scans a PostScript image file for a + %%BoundingBox comment and extracts the bounding box values (in + PostScript units) which are then stored in the four new (read-only) + number registers `llx', `lly', `urx', and `ury'. + + This will allow the usage of the .PSPIC macro without worrying + about unsafe behaviour of groff, i.e., it will work without the + `-U' switch of groff. + + * troff/input.cc: Implement it. + * tmac/tmac.pspic: Use it. + * troff/troff.man, grops/grops.man, NEWS: Document it. + * psbb/*, Makefile.in: Remove it since it is no longer needed. + + This is bloody C code simply adapted from psbb.c! Any improvements + welcome. + +2000-01-29 Werner LEMBERG + + * man/groff_font.man: Minor clarifications. + + * NEWS: Updated. + +2000-01-28 Werner LEMBERG + + * afmtodit/afmtodit.pl: Use new `--' comment delimiter. + +2000-01-28 Gaius Mulley + + * man/groff_font.man: Brought up to date regarding tcommand + extensions. + * libgroff/font.cc: Handle everything after `--' as a comment + in the font files. + * devps/*: Added comment delimiter inside devps font files. + +2000-01-28 Werner LEMBERG + + * tmac/tmac.arkup, tmac/groff_markup.man: Replace \fC...\fR with + \fC...\fP (which now works as expected). + + * troff/troff.man: Fix typo. + +2000-01-27 Gaius Mulley + + Completed the pass_filenames implementation in troff. + + * libdriver/input.cc: Will read the new `F' tcommand. + * troff/node.cc, troff/node.h: Will issue the new `F' tcommand. + * troff/input.cc: Use it. + +2000-01-26 Werner LEMBERG + + * troff/env.cc (set_font): Fix the behaviour of \fP. The previous + font will now be updated even if an invalid font is selected. + +2000-01-24 Werner LEMBERG + + * doc/homepage.ms: Updated for new tmac.arkup. + + * tmac/tmac.html: Disable line breaks after hyphen-like characters. + + * tmac/tmac.arkup: Cleanup. + + Added `\&' to .HTML macro to `leave vertical mode', so to say. + + Removed obsolete .LINK macro completely. + + The macros .URL, .FTP, and .MAILTO now accept a third argument which + will be immediately appended to the second argument (to be used with + punctuation, for example). + + Disabled .CDFTP macro temporarily for security reasons. + + * tmac/groff_markup.man: Complete revision for latest changes in + tmac.arkup -- note that it does not yet format correctly with + grohtml :-( + +2000-01-23 Bruno Haible + + * nroff/nroff.sh: Accept -Tutf8 option and pass it through. + * devutf8/R.proto: Add mappings for wp, lh, rh. + * devutf8/NOTES: Updated. + +2000-01-23 Werner LEMBERG + + * doc/groff.texinfo: Updated version/copyright info. + +2000-01-21 Gaius Mulley + + Added support for two new directives in device descriptions: + `pass_filenames' (to pass the input file name to the output device) + and `use_charnames_in_special' (to support e.g. accented characters + in the `X' request). + + * include/font.h, troff/charinfo.h: Declare it. + + * libgroff/font.cc, libgroff/fontfile.cc: Set it. + + * devhtml/DESC: Use it. + + * troff/input.cc: New function encoded_char. + + * troff/token.h: Add test for `specialness'. + +2000-01-21 Werner LEMBERG + + * tmac/Makefile.sub: tmac.a4 and tmac.trace have been removed by + mistake from the list of files to be installed. + +2000-01-18 Werner LEMBERG + + * README: Added info how to apply patches. + +2000-01-15 Jan Echternach + + * troff/node.cc (ligature_note::operator delete): Fix g++ warning. + +2000-01-15 Gaius Mulley + + * troff/input.cc: Add support for troffrc-end. + + * tbl/main.cc: Altered to issue table-start and table-end special + characters if using the html device. + + * devhtml/*: Modified font files to incorporate html encoding of + characters. + + * tmac/groff_markup.man: New file documenting tmac.arkup. + + * tmac/troffrc-end: New file. This is invoked after all user + specified macros. Currently used by the html device to include + tmac.html. Thus no need for users to specify -mhtml anymore. + + * tmac/Makefile.sub (NORMALFILES): Add troffrc-end. + (MAN7): Add groff_markup.man. + + * tmac/tmac.an, tmac/tmac.html: Small html updates. + + * tmac/troffrc: tmac.arkup will now be called for the html device. + + * libgroff/font.cc, libgroff/font.h: Altered to include reading of + extra device specific information about fonts. + + * doc/homepage.ms: New file. It is an example how an HTML home page + could look like with grohtml. + + * doc/Makefile: Add homepage.ms. Remove rule for pic.html. + +2000-01-12 Bruno Haible + + * devutf8/R.proto: Add mappings for ti, Fn, st, an. Change mappings + of Im, Re. + + * devutf8/NOTES: Updated. + +2000-01-08 Bruno Haible + + * eqn/box.cc, eqn/lex.cc, eqn/other.cc, eqn/over.cc, eqn/special.cc, + eqn/text.cc, grodvi/dvi.cc, grops/ps.cc, grops/psrm.cc, + libbib/index.cc, libbib/linear.cc, libbib/search.cc, + libdriver/printer.cc, libgroff/font.cc, libgroff/string.cc, + pic/lex.cc, pic/object.cc, refer/label.y, refer/ref.cc, tbl/main.cc, + tbl/table.cc, tfmtodit/tfmtodit.cc, troff/dictionary.cc, + troff/div.cc, troff/env.cc, troff/input.cc, troff/node.cc, + troff/node.h, troff/reg.cc: Avoid most "g++ -Wall -Wno-sign-compare" + warnings. + + * troff/node.cc (bracket_node::copy): Initialize last to NULL. + +2000-01-12 Fabrizio Polacco + + grolj4: Paper size will be searched case-insensitively. + + * include/lib.h: Add check for strcasecmp(). + * grolj4/li4.cc (lookup_paper_size): Use strcasecmp(). + * configure.in: Check for strcasecmp(). + +2000-01-11 Werner LEMBERG + + * troff/Makefile.sub (majorminor.cc): Fix incorrect path to + `REVISION'. + +2000-01-10 Werner LEMBERG + + * Makefile.comm, Makefile.in, doc/Makefile: More fixes for the + revision scheme. + + Add a new read-only register, `.Y', which contains the groff + revision. + + * troff/input.cc (init_input_requests): Define it. + * troff/Makefile.sub (majorminor.cc): Define `revision' string. + * doc/groff.texinfo, troff/troff.man: Document it. + + * libgroff/Makefile.sub (version.cc): Add definition of + `Version_string[]', consisting of `..' + * eqn/main.cc, grodvi/dvi.cc, grolj4/lj4.cc, grops/ps.cc, + grotty/tty.cc, hpftodit/hpftodit.cc, indxbib/indxbib.cc, pic/main.cc, + refer/refer.cc, soelim/soelim.cc, tbl/main.cc, tfmtodit/tfmtodit.cc, + troff/input.cc, pfbtops/pfbtops.c: Use it. + +2000-01-10 Fabrizio Polacco + + Add a revision scheme to the groff package. + + * REVISION: New file. + * libgroff/Makefile.sub (version.cc): Use it to define + `revision_string[]'. + * grops/psrm.cc: Use revision_string (converted to an unsigned + integer) in constructor of resource_manager. + +2000-01-10 Bruno Haible + + * devutf8/Makefile.sub, devutf8/DESC.proto, devutf8/R.proto: New + files. + * Makefile.in (DEVDIRS): Add devutf8. + * grotty/tty.cc: Include device.h. + (glyph): Change type of `code' to `unsigned int'. + (tty_printer): New field is_utf8. Constructor takes device argument. + (tty_printer::tty_printer): If device if `utf8', set is_utf8. + (tty_printer::add_char): Change type of first arg to `unsigned int'. + (tty_printer::put_char): New function. + (tty_printer::end_page): Use put_char() instead of ::putchar(). + (make_printer): Pass device to tty_printer constructor. + * nroff.sh: Determine default device by calling 'locale'. As a + fallback, look at all of $LC_ALL, $LC_CTYPE, $LANG, $LESSCHARSET. + Recognize UTF-8 locales. + * tmac/eqnrc: Recognize utf8 like latin1. + * tmac/troffrc: Device utf8 needs tmac.tty. + +2000-01-07 Werner LEMBERG + + * tmac/Makefile.sub: tmac.a4 and tmac.trace will now be installed. + +2000-01-07 Paul Eggert + + Add a new predefined writeable number register, `year', + which contains the current year. + + * doc/groff.texinfo, PROBLEMS, troff/troff.man: Document it. + * tmac/tmac.s: Use it. + * troff/input.cc (init_registers): Initialize it. + +2000-01-06 Werner LEMBERG + + * PROBLEMS: Fixed typo. + +2000-01-04 Paul Eggert + + * PROBLEMS: Add Y2k advice for the yr number register. + +2000-01-03 Paul Eggert + + * doc/groff.texinfo: Fix Y2k bug in documentation of \n(yr. + +2000-01-02 Werner LEMBERG + + * tmac/tmac.arkup: Slight modification of macros to provide better + appearance for non-HTML formats. + +2000-01-01 Charles Levert + + * soelim/soelim.cc (include_path_append): realloc(NULL, n) + does not automatically translate to malloc(n) on all OSes + (e.g., SunOS) so do it explicitly. Also, check the returned + value. + +2000-01-01 Werner LEMBERG + + * tmac/tmac.arkup: Added .LINE macro. Some formatting. + + * Makefile.in: Added $(tmac_m) again since the Makefile in `mm' + expects this variable + +2000-01-01 Gaius Mulley + + * doc/Makefile: Added instructions to create HTML and text + versions of some files. + +1999-12-31 Werner LEMBERG + + * Updated INSTALL.gen. + + * tmac/tmac.arkup: Added fixes so that .FTP and .MAILTO works + better resp. correctly with non-HTML devices. + +Local Variables: +version-control: never +coding: latin-1 +End: diff --git a/contrib/groff/ChangeLog.117 b/contrib/groff/ChangeLog.117 new file mode 100644 index 000000000000..609eaa7595fe --- /dev/null +++ b/contrib/groff/ChangeLog.117 @@ -0,0 +1,2190 @@ + +Version 1.17.2 released +======================= + +2001-07-07 Werner LEMBERG + + * src/utils/indxbib/indxbib.cc (main): Change type of `name_max' + to size_t. + +2001-07-06 Ruslan Ermilov + + * tmac/doc.tmac (Rv): Make `Rv' really not parseable. + Fix synopsis. + * tmac/groff_mdoc.man: Fix synopsis. + +2001-07-05 Ruslan Ermilov + + * tmac/doc.tmac (doc-inset-list, doc-hang-list, doc-ohang-list): + Restore `doc-Pa-font'. + +2001-07-04 Werner LEMBERG + + * src/utils/indxbib/dirnamemax.c: Moved to ... + * src/libs/libgroff/maxfilename.cc: Here. + s/dir_name_max/file_name_max/. + Add copyright. + * src/include/lib.h: Add file_name_max. + * src/utils/indxbib/indxbib.cc: Updated. + * src/utils/indxbib/Makefile.sub, src/libs/libgroff/Makefile.sub: + Updated. + + * src/libs/libgroff/tmpfile.cc (TMPFILE_PREFIX) [__MSDOS__]: Define + as empty. + (xtmpfile) [_MSC_VER]: Removed -- MSVC has mktemp(). + + * src/preproc/html/pre-html.cc (PAGE_TEMPLATE, PS_TEMPLATE, + REGION_TEMPLATE): New macros. + (createAllPages, makeTempFiles): Use them. + Include `nonposix.h'. + (html_system): New function. + (createAllPages, createImage): Use it. + Use EXE_EXT. + + * tmac/www.tmac: Fix typos. + +2001-07-03 Werner LEMBERG + + * tmac/www.tmac: Disable hyphenation in normal text only if output + device is html. + (URL, FTP, MAILTO): Disable hyphenation of actual URL with `\%'. + * tmac/groff_mwww.man, NEWS: Updated. + +2001-07-03 Gaius Mulley + + * tmac/www.tmac (.IMAGE): Add fourth parameter to specify vertical + image location. + +2001-07-02 Ruslan Ermilov + + * tmac/doc-common, tmac/doc.tmac (doc-display-ft-stack, + doc-display-ps-stack): Implement font and font size stack for + displays. + +2001-07-02 Werner LEMBERG + + * REVISION: Increased to 2. + * src/roff/troff/input.cc (read_size): Fix special case `\s[0]'. + + * src/groff/grog/grog.pl (process): Handle `Oo' and `Oc' not at the + beginning of a line. + * src/groff/grog/grog.sh: Ditto. + +2001-06-29 Peter Marquardt + + * src/preproc/eqn/neqn.sh: Put `export' keyword in a new line to + make it portable. + +2001-06-27 Werner LEMBERG + + Fix problems with preprocessor string for `man' program. + + * *.man: Don't use `s' in preprocessor string -- it doesn't exist. + Updated/added copyright. + Moved Emacs's local variable to identify nroff mode to the end of + the file; add local variable if missing. + +2001-06-26 Andras Salamon + + * aclocal.m4: Replace AC_LANG_SAVE + AC_LANG_CPLUSPLUS with + AC_LANG_PUSH(C++) and AC_LANG_RESTORE with AC_LANG_POP(C++). + * configure: Regenerated. + +2001-06-25 Andras Salamon + + * aclocal.m4 (GROFF_PAGE): Fix page detection code. + * configure: Regenerated. + +2001-06-24 Werner LEMBERG + + * doc/homepage.ms: Don't include arkup.tmac (which no longer exists) + but www.tmac. + * doc/pic.ms: Fix typos. + +Version 1.17.1 released +======================= + +2001-06-21 Golubev I. N. + + * aclocal.m4 (GROFF_NEED_DECLARATION): Fix inclusion of strings.h. + * configure: Updated. + +2001-06-20 Gaius Mulley + + * src/roff/preproc/html/pre-html.cc (make_message): Fix incorrect + image names. + * src/roff/troff/dic.cc (blank_line): Add html tag. + +2001-06-19 Gaius Mulley + + * src/roff/troff/input.cc (do_suppress): Fix typo. + +2001-06-18 Gaius Mulley + + Added two new options (-D and -I) to specify image names and a + subdirectory to place the images in. + + Change syntax from \\Ox to \\O[x]. + + * src/devices/grohtml/post-html.cc (main): Add options. + (usage): Updated. + * src/preproc/html/pre-html.cc: Include `stdarg.h'. + Use `NULL' instead of `0' for null string pointers. + (MAX_RETRIES): New macro. + (lengthOfintToStr, intToStr, make_message): New functions. + (makeFileName): Make function static. + Implement -D and -I options. + (checkImageDir): New function. + (write_end_image, write_start_image): Use new syntax of \O. + (createAllPages, removeAllPages): Implement -D and -I options. Use + make_message(). + (createImage): Use make_message(). + (addps4html): Add guard for malloc(). + (usage, scanArguments): Updated. + (makeTempFiles): Use mkstemp(). + (removeTempFiles): Use unlink(). + (findPrefix): Add guard for malloc(). + (main): Updated. + * src/roff/troff/input.cc (get_delim_file_name): New function to + parse \O. + (do_suppress): Updated to parse new syntax. + * src/devices/grohtml/grohtml.man: Updated. + * tmac/www.tmac: Updated to new syntax. + + * NEWS: Updated. + +2001-06-15 Werner LEMBERG + + * src/roff/grog/Makefile.sub: Remove NAMEPREFIX. + + * src/devices/grohtml/grohtml.man: Minor improvements. + +2001-06-14 Werner LEMBERG + + * src/preproc/html/Makefile.sub: Remove NAMEPREFIX. + +2001-06-11 Werner LEMBERG + + * man/roff.man, mann/groff.man: Use '\" instead of .\" in the first + line to specify preprocessor options -- mandb 2.3.1 only recognizes + the former. + * src/preproc/grn/grn.man: Add proper '\" string. + +2001-06-11 OKAZAKI Tetsurou + + * test-groff: Don't use PATH but GROFF_BIN_PATH. + +2001-06-08 Werner LEMBERG + + Updated to autoconf 2.50. + + * configure.in: Renamed to... + * configure.ac: This. + * aclocal.m4 (AC_OUTPUT_MAKE_DEFS): Removed. + (GROFF_OS390): Updated. + * configure: Regenerated. + +2001-05-18 Werner LEMBERG + + * src/roff/troff/env.c, src/roff/troff/env.h, + src/roff/troff/input.cc, src/roff/troff/troff.man: Undo `ss' change + from 2000-12-21. + +2001-05-17 Jeffrey Friedl + + * src/roff/troff/input.cc (read_size): Fix special case `\s0'. + +2001-05-16 Werner LEMBERG + + * src/roff/troff/input.cc (read_size): Emit warning if value becomes + less than or equal zero; set it to 1 then. + * src/roff/troff/node.h (node::node): Initialize `last'. + +2001-05-08 Werner LEMBERG + + * tmac/an-old.tmac: Make predefined strings work in compatibility + mode. + Add troff version guard. + * tmac/doc.tmac: Simplify version guard. + +2001-05-07 Werner LEMBERG + + The .ns and .rs requests are now honoured not only in the top-level + but in all diversions (similar to UNIX troff). + + This change is based on a patch from Tadziu Hoffmann + . + + * src/roff/troff/div.h (diversion): Add `no_space_mode' member. + (top_level_diversion): Remove `no_space_mode' member. + * src/roff/troff/div.cc (diversion::diversion, + top_level_diversion::top_level_diversion): Updated. + (macro_diversion::output): Reset `no_space_mode'. + (no_space, restore_spacing): Use `curdiv' unconditionally. + (space_request, blank_line): Check `curdiv->no_space_mode'. + (no_space_mode_reg::get_value, no_space_mode_reg::get_string): Use + `curdiv' unconditionally. + * NEWS, src/roff/troff/troff.man, man/groff.man, doc/groff.texinfo: + Updated. + +2001-05-06 Werner LEMBERG + + Added two new requests `de1' and `am1' which are similar to `de' and + `am' with the difference that compatibility mode is saved on entry, + switched off during macro execution, and restored on exit. + + * src/roff/troff/input.h: Added two new special characters + (COMPATIBLE_SAVE, COMPATIBLE_RESTORE). + * src/roff/troff/input.cc (input_iterator): Added two member + functions `save_compatible_flag' and `get_compatible_flag'. + (input_stack): Ditto. + (string_iterator): Ditto. Also add private member + `saved_compatible_flag'. + (token::next): Use COMPATIBLE_SAVE and COMPATIBLE_RESTORE. + (calling_mode): New enumeration. + (do_define_macro): Use it. Insert COMPATIBLE_SAVE and + COMPATIBLE_RESTORE at the beginning and end of macro, respectively. + (define_macro, define_indirect_macro, append_macro, ignore): Use + `calling_mode'. + (define_nocomp_macro, append_nocomp_macro): New functions. + (init_input_requests): Updated. + (do_request): Rename local variable `saved_compatible_flag' to + `old_compatible_flag'. + * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. + + * tmac/an-old.tmac: Use `de1' instead of `de' request for all + public and trap-invoked macros. As a consequence, the man macros + work in compatibility mode also. + +2001-05-06 Solar Designer + + * Makefile.in: Use $(mandir). + +2001-05-06 Alexios Zavras + + * src/utils/afmtodit/afmtodit.pl: Fix serious typo. + +2001-05-05 Werner LEMBERG + + Added `.ns' number register: Returns 1 in no-space mode (if in + top-level diversion), 0 otherwise. + + * src/roff/troff/div.cc (no_space_mode_reg): New class. + (init_div_requests): Updated. + * NEWS, src/roff/troff/troff.man, man/groff.man, doc/groff.texinfo: + Document it. + +2001-05-04 Werner LEMBERG + + * src/roff/nroff/nroff.man: Improved documentation (especially + locales). + +2001-05-02 Werner LEMBERG + + Added `brp' request: This is \p as a request. + + * src/roff/troff/env.cc (environment::do_break): Add parameter + `spread'. + (do_break_request): New function (was `break_request'). + (break_request): Calls `do_break_request'. + (break_spread_request): New; calls `do_break_request'. + (init_env_requests): Updated. + * src/roff/troff/env.h: Updated. + * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. + + * REVISION: Increased to 1. + * win32-diffs: Updated. + +2001-05-01 Werner LEMBERG + + * tmac/an-old.tmac: Fix minor compatibility mode issue. + * tmac/troffrc-end: Make it really work in compatibility mode. + +2001-04-27 Werner LEMBERG + + * src/utils/lkbib/lkbib.cc: Switch inclusion order of stdio.h and + stdlib.h. + +2001-04-22 Werner LEMBERG + + * src/libs/libgroff/getopt.c, src/include/getopt.h: Updating to + latest versions from glibc CVS archive. + + * MORE.STUFF: Updated, using a patch from Kees Zeelenberg + . + +2001-04-21 Werner LEMBERG + + * configure.in: Move check for mkstemp() to... + * aclocal.m4 (GROFF_MKSTEMP): This new function. + * configure: Regenerated. + + * src/include/groff-getopt.h: Don't use variable names in + declarations. + + * src/devices/grohtml/html-chars.h: Removed. It isn't used. + * src/devices/grohtml/Makefile.sub, + src/devices/grohtml/post-html.cc: Updated. + +2001-04-21 Albert Chin-A-Young + + * configure.in: Add special check for mkstemp(). + * src/libs/libgroff/tmpfile.cc: Use it. + * src/utils/indxbib/indxbib.cc: Ditto. + * src/utils/pfbtops/pfbtops.c (main): Don't use C++ comment style. + * src/devices/grolbp/lbp.h (lbpprintf, lbpputs, vdmprintf): Use + `const'. + +2001-04-20 Bruce Lilly + + `Version_string' as C++ object was not visible to linker from C + object files. + Add `const' to `Version_string'. + + * src/utils/pfbtops/pfbtops.c (main), src/roff/groff/groff.cc + (main), src/roff/troff/input.cc (main), src/preproc/tbl/main.cc + (main), src/preproc/pic/main.cc (main), src/preproc/eqn/main.cc + (main), src/preproc/grn/main.cc (main), src/preproc/html/pre-html.cc + (scanArguments), src/preproc/refer/refer.cc (main), + src/preproc/soelim/soelim.cc (main), src/devices/grotty/tty.cc + (main), src/devices/grodvi/dvi.cc (main), src/devices/grolj4/lj4.cc + (main), src/devices/grohtml/post-html.cc (main), + src/devices/grolbp/lbp.cc (main), src/utils/tfmtodit/tfmtodit.cc + (main), src/utils/hpftodit/hpftodit.cc (main), + src/utils/lookbib/lookbib.cc (main), src/utils/indxbib/indxbib.cc + (main), src/utils/lkbib/lkbib.cc (main), + src/utils/addftinfo/addftinfo.cc (main): Implement it. + + * src/roff/groff/pipeline.c: Add _UWIN. + * src/include/nonposix.h: Ditto. + +2001-04-20 Werner LEMBERG + + * src/include/lib.h: Use HAVE_STRERROR. + * src/roff/groff/pipeline.c: Ditto. + * src/preproc/html/pre-html.cc: Remove declaration of `strerror'. + * src/libs/libgroff/Makefile.sub (version.cc): Add `extern "C"'. + * src/utils/pfbtops/pfbtops.c: Add copyright notice. + * win32-diffs: Updated. + * src/utils/hpftodit/hpftodit.cc (read_map): Fix compiler warning. + +2001-04-19 Werner LEMBERG + + * src/preproc/html/pre-html.cc (scanArguments): Use `troff_command' + instead of hardwired `"troff"'. + (char_buffer::read_file): Remove unused variables. + (char_buffer::write_file_troff): Ditto. + (char_buffer::write_file_html): Ditto. + (generateImages): Ditto. + (abs): Removed. + * src/utils/addftinfo/addftinfo.cc (main): Fix compilation problem. + + * src/include/lib.h: Don't include `groff-getopt.h' for UWIN. + + * src/libs/libgroff/font.cc (font::load_desc): Fix compiler warning. + * src/libs/libbib/index.cc (index_search_item_iterator::get_tag, + index_search_item::search1): Ditto. + * src/roff/troff/node.h (width_list): Reorder members. + * src/roff/troff/input.cc (do_define_macro): Fix compiler warning. + (lookup_warning): Ditto. + (prepend_string): Commented out. + * src/roff/troff/dictionary.cc (is_good_size): Fix compiler warning. + * src/roff/troff/reg.cc (number_value_to_ascii): Ditto. + * src/preproc/tbl/main.cc (process_format): Ditto. + * src/preproc/pic/pic.y (define_variable, reset, reset_all): Fix + compiler warnings. + * src/preproc/pic/pic.cc: Updated. + * src/preproc/eqn/lex.cc (init_table): Fix compiler warnings. + * src/preproc/eqn/over.cc (over_box::compute_metrics): Ditto. + * src/preproc/refer/command.cc (execute_command): Ditto. + * src/preproc/refer/ref.cc (sortify_title, find_month): Ditto. + * src/preproc/refer/token.cc (lookup_token): Ditto. + * src/preproc/soelim/soelim.cc: Ditto. + * src/preproc/html/pushbackbuffer.cc (ERROR): Ditto. + (isHexDigit): Commented out. + (pushBackBuffer::isString): Remove unused variable. + * src/devices/grops/ps.cc (ps_printer::special): Fix compiler + warning. + * src/devices/grops/psrm.cc (resource_manager::lookup_font, + resource_manager::read_resource_arg, read_one_of, parse_extensions): + Ditto. + * src/devices/grodvi/dvi.cc (dvi_printer::draw): Ditto. + * src/devices/grolj4/lj4.cc (lj4_font::handle_unknown_font_command, + lookup_paper_size): Ditto. + * src/devices/grohtml/post-html.cc (is_subsection): Commented out. + (text_glob, element_list): Reorder members. + * src/devices/grohtml/html-text.cc (html_text::do_pre): Remove + compiler warning. + * src/devices/grohtml/html-text.h (html_text::emit_space): Change + return value to `void'. + * src/devices/grohtml/output.cc (word_list::word_list): Fix order + of initializers. + * src/devices/grohtml/html.h (simple_output::check_newline, + simple_output::space_or_newline, simple_output::enable_newlines): + Add return value. + * src/devices/grolbp/lbp.cc (wp54charset, set_papersize): Remove + compiler warnings. + * src/utils/tfmtodit/tfmtodit.cc (tfm::load, gf::load, main): Ditto. + * src/utils/hpftodit/hpftodit.cc (File::seek, read_symbol_sets, + output_ligatures, output_charset, read_map): Ditto. + * src/utils/lookbib/lookbib.cc (main): Ditto. + * src/utils/indxbib/indxbib.cc (main, fwrite_or_die): Ditto. + (do_file): Fix typo (`=' -> `=='). + * src/utils/lkbib/lkbib.cc (main): Remove compiler warning. + * src/utils/addftinfo/addftinfo.cc (main): Ditto. + +2001-04-18 Ruslan Ermilov + + * src/roff/nroff/nroff.sh: Adding -p (pic) and -t (tbl) options. + Fix usage of GROFF_BIN_PATH. + * src/roff/nroff/nroff.man: Updated. + +2001-04-18 Werner LEMBERG + + * NEWS: Fixing typos. + Updated. + +Version 1.17 released +===================== + +2001-04-17 Werner LEMBERG + + * tmac/Makefile.sub (install-data): mdoc.local-s is in current + directory, not in $(srcdir). + +2001-04-16 Werner LEMBERG + + * doc/groff.texinfo: More info on conditionals. + +2001-04-15 Werner LEMBERG + + * doc/groff.texinfo: Added some info about groff internals. + + * src/roff/troff/node.cc (make_glyph_node): Emit warning message + about missing special character only if the name is non-null. + +2001-04-14 Werner LEMBERG + + Removing the grohtml-old device driver which is now obsolete. + + * src/devices/grohtml-old/*: Removed. + * font/devhtml-old/*: Removed. + * src/libs/libgroff/htmlindicate.cc (graphic_start, graphic_end): + Remove comments. + * Makefile.in (CCPROGDIRS, DEVDIRS): Updated. + * test-groff (PATH): Updated. + * tmac/Makefile.sub (NORMALFILES): Updated. + * tmac/an-old.tmac: Remove special code for html-old device. + Replace `html-or-html-old' register with `an-html'. + * tmac/eqnrc: Updated. + * tmac/html-old.tmac: Removed. + * tmac/troffrc, tmac/troffrc-end: Updated. + * tmac/www.tmac: Remove special code for html-old device. + Replace `html-or-html-old' register with `www-html'. + + * src/libs/libgroff/tmpfile.cc (remove_tmp_files), + src/libs/libgroff/htmlindicate.cc (graphic_end), + include/htmlindicate.h, src/preproc/grn/*.cc, + src/roff/groff/env.{cc,h}: Remove `void' parameter if used as a + single argument for consistency with rest of source code. + + * aclocal.m4, tmac/an-old.tmac: Fix copyright. + +2001-04-13 Ruslan Ermilov + + * src/roff/troff/troff.man: Fixing typos. + +2001-04-13 Werner LEMBERG + + * doc/pic.ms: Fixing many font switches. + * doc/groff.texinfo: Fixes, additions. + * MORE.STUFF: Updated. + +2001-04-12 Gaius Mulley + + * src/devices/grohtml/grohtml.man: Updated manual page regarding + simple anchor. + * src/preproc/html/pre-html.cc (createImage): Fixed right hand + cropping of images. + (removeTempFiles): New function to tidy up temporary files. + * src/preproc/html/pre-html.cc (main): Calls `removeTempFiles()'. + Many fixes to do with the new inline suppress node and image regions + are much tighter. + * src/devices/grohtml/post-html.cc: New method `is_auto_img'. + (generate_img_src): New function. + (html_printer::do_auto_image): Utilizes it. + (do_heading, do_title): Include inline images within their contents. + (html_printer::begin_page): Tidied up comments that are issued to + the html output file. + (html_printer::do_fill): Fixed so that `.nf' works with fonts other + than courier. + (text_glob::is_br): New method used by do_heading. + * tmac/s.tmac: If -Thtml then emit $1 in .IP rather than its + equivalent diversion. + * src/include/html-strings.h: Altered image tags to reflect the + inline image node. + * src/include/htmlindicate.h (html_end_suppress): Added `is_inline' + parameter. + * src/preproc/eqn/main.cc: Will suppress generation of image tags if + it is already inside a pic image. Only emit tags if the argument + `-Tps:html' is present. + * src/preproc/tbl/main.cc: Changes to reflect additional + `html_end_suppress' parameter. + * src/roff/troff/env.cc: Only emit eol tag if a node has been + emitted since the last eol tag was written. + * src/roff/troff/env.h: New boolean `emitted_node'. + * src/roff/troff/input.cc (do_suppress): Handles extra suppress + nodes \O3, \O4, \O5. No longer use `output_low_mark_miny'. + * src/roff/troff/node.cc (check_charinfo): New method. + (troff_output_file::determine_line_limits): Alterations to limit + checking. + * tmac/www.tmac: Changes to reflect new suppress nodes. + +2001-04-12 Bruno Haible + + * src/devices/grohtml/post-html.cc (html_printer::add_to_sbuf): + Escape the html_glyph in the buffer. + (str_translate_to_html): Output the unescaped escaped_char. + * src/devices/grohtml/html-text.cc (issue_table_begin): Set + `frame=void', not `frame=none'. Add `border=0'. + +2001-04-12 Werner LEMBERG + + * PROBLEMS: Add some words on how to avoid wrapper macros. + +2001-04-11 Blake McBride + + * src/include/nonposix.h (fileno) [_MSC_VER]: Removed. + +2001-04-11 Werner LEMBERG + + * font/devlbp/Makefile.sub (CLEANADD): Set it. + * tmac/Makefile.sub (CLEANADD): Add tmac.local-s. + * Makefile.in (dist): Don't remove src/xditview/Imakefile, but ... + * Makefile.sub (DISTCLEANFILES): Here. + + * libs/libgroff/new.cc: Include `nonposix.h'. + * win32-diffs: Updated. + +2001-04-10 Ruslan Ermilov + + Added skeleton macro for defunct macros. + + Updated documentation. + + When inside displays, an empty input line warning should be + suppressed. If another macro call is put inside a display, + all subsequent empty lines found in that display caused a + warning to be emitted. + + * tmac/doc.tmac (doc-defunct-macro): New macro. + (Db, Ds, Ex, Or, Sf): Reimplemented using this macro. + (doc-restore-global-vars): Fixed typo. + (doc-empty-line): Check the `doc-display-depth' register to + determine whether we are inside display or not. + + * tmac/doc-common: Removed `Or' and `Sf' registers. + Moved obsolete `Ds' macro to doc.tmac. + + * tmac/groff_mdoc.man: Bump document date. + Document `.Vt' under ``Variable Types''. + Removed documentation for obsolete `.Or' macro. + +2001-04-10 Werner LEMBERG + + * NEWS: Updated. + * doc/groff.texinfo: Many fixes, additions, clarifications, etc. + +2001-04-10 Bruno Haible + + * src/devices/grodvi/dvi.cc (main): Accept --help and --version. + (usage): Add stream argument. Don't exit. + * src/devices/grohtml/post-html.cc (main): Accept --help and --version. + Write --version output to stdout, not stderr. + (usage): Add stream argument. Don't exit. + * src/devices/grohtml-old/html.cc (main): Accept --help and --version. + (usage): Add stream argument. Don't exit. + * src/devices/grolbp/lbp.cc (long_options): Use symbolic getopt.h + constants. + (usage): Add stream argument. Don't exit. + (main): Write --help output to stdout, not stderr. + * src/devices/grolj4/lj4.cc (main): Accept --help and --version. + (usage): Add stream argument. Don't exit. + * src/devices/grops/ps.cc (main): Accept --help and --version. + (usage): Add stream argument. Don't exit. + * src/devices/grotty/tty.cc (main): Accept --help and --version. + (usage): Add stream argument. Don't exit. + * src/preproc/eqn/main.cc (usage): Add stream argument. Don't exit. + (main): Accept --help and --version. + * src/preproc/grn/main.cc (usage): Add stream argument. Don't exit. + (main): Accept --help and --version. + * src/preproc/html/pre-html.cc (usage): Add stream argument. + (scanArguments): Accept --help and --version. + * src/preproc/pic/main.cc (usage): Add stream argument. Don't exit. + (main): Accept --help and --version. + * src/preproc/refer/refer.cc (main): Accept --help and --version. + (usage): Add stream argument. Don't exit. + * src/preproc/soelim/soelim.cc (usage): Add stream argument. Don't + exit. + (main): Accept --help and --version. + * src/preproc/tbl/main.cc (usage): Add stream argument. Don't exit. + (main): Accept --help and --version. + * src/roff/groff/groff.cc (main): Accept --help and --version. + (synopsis): Add stream argument. + (help): Write --help output to stdout, not stderr. + (usage): Add stream argument. Don't exit. + * src/roff/grog/grog.pl: Accept --help and --version. + (help): New sub. + * src/roff/grog/grog.sh: Accept --help and --version. + * src/roff/nroff/nroff.sh: Accept --help and --version. + * src/roff/troff/input.cc (USAGE_EXIT_CODE): Remove macro. + (usage): Add stream argument. Don't exit. + (main): Accept --help and --version. + * src/utils/addftinfo/addftinfo.cc (main): Accept --help and --version. + (usage): New function with stream argument, doesn't exit. + * src/utils/hpftodit/hpftodit.cc (main): Accept --help and --version. + (usage): New function with stream argument, doesn't exit. + * src/utils/indxbib/indxbib.cc (main): Accept --help and --version. + (usage): Add stream argument. Don't exit. + * src/utils/lkbib/lkbib.cc (usage): Add stream argument. Don't exit. + (main): Accept --help and --version. + * src/utils/lookbib/lookbib.cc (usage): Add stream argument. Don't + exit. + (main): Accept --help and --version. + * src/utils/pfbtops/pfbtops.c (usage): Add stream argument. Don't exit. + (main): Accept --help and --version. + * src/utils/tfmtodit/tfmtodit.cc (main): Accept --help and --version. + (usage): Add stream argument. Don't exit. + +2001-04-10 Ruslan Ermilov + + Fix indentation in SYNOPSIS. + + Updated to include changes of latest BSD mdoc version (basically, + the only change is that `.Fn' and `.Fc' put a final semicolon after + a function declaration in the SYNOPSIS section). + + * tmac/doc.tmac (doc-in-synopsis-count): Replaced with ... + (doc-in-synopsis-section): New variable. Updated all related + functions. + (doc-indent-synopsis-active): New register. + (Nd, Fn, Fo): Use it. + (Cd): It requires manipulation of \n[doc-indent-synopsis] so that + `.Cd' with long argument line produces indented wrapped lines. + Also, the misplaced `.nop \*[doc-Nm-font]\c'' caused extra + undesirable line break to be output. + (doc-do-func-decl, Nm, Vt, Fn, Fo): Remove extraneous calls to + `.rs'. + (Fn, Fc): Add final `;' to output. + (doc-save-global-vars, doc-restore-global-vars): Updated. + * tmac/doc-common: Remove `Ex' register. + Updated. + * tmac/doc-ditroff, tmac/doc-nroff, tmac/doc-syms: Updated + copyright. + +2001-04-06 Ruslan Ermilov + + * tmac/doc.tmac (Cd): Simplify code. + * tmac/groff_mdoc.man: Document some behaviour of `Cd' request. + +2001-04-06 Werner LEMBERG + + Implement continuous underlining for nroff mode. To do that, a new + request in the ditroff language has been added: `x u N' (N is 0 + or 1). + + \X and \Y are now transparent to end-of-sentence recognition. + + * src/include/printer.h (printer): Add `type' parameter to `special' + method. + * src/libs/libdriver/printer.cc (printer::special): Updated. + * src/libs/libdriver/input.cc (do_file): Handle `x u N'. + + * src/devices/dvi/dvi.cc (dvi_printer::special): Handle only + specials of type `p'. + * src/devices/grohtml/post-html.cc (html_printer::special): Ditto. + * src/devices/grohtml-old/html.cc (html_printer::special): Ditto. + * src/devices/grops/ps.cc (ps_printer::special): Ditto. + * src/devices/grotty/tty.cc: Add new enum CU_MODE. + (glyph::order): New method. + (tty_printer::add_char): Use it. + (tty_printer::special): New method. + (tty_printer::end_page): Implement it. + + * src/roff/troff/node.h (special_node): Add `no_init_string' member. + * src/roff/troff/node.cc (special_node::special_node): Add parameter + to set `no_init_string'. + (special_node::tprint_start): Use it. + (special_node::same, special_node::copy): Updated. + (special_node::ends_sentence): New method. + (troff_output_file::start_special): Add parameter to include + inititialization of special conditionally. + + * src/roff/troff/env.h (environment): New member `underline_spaces'. + * src/roff/troff/env.cc (do_underline_special): New function. + (environment::set_font): Use it. + (do_underline): Use it. This was `underline()'. + (underline): Call `do_underline()'. + (continuous_underline): New function which calls `do_underline()'. + (environment::newline): Use `do_underline_special()'. + (init_env_requests): Updated. + + * NEWS, man/troff_out.man: Updated. + +2001-04-06 Bruno Haible + + * font/devutf8/R.proto: Fix code of 'shc'. + +2001-04-06 Ruslan Ermilov + + Many fixes. Diag lists can now be nested also; additionally, + `-compact' and `-offset' are supported. + + * tmac/doc.tmac (doc-have-indent): Replaced with ... + (doc-list-have-indent-stackXXX): A new register stack. + (doc-have-diag-list): Removed. + (Bl): Use `doc-list-have-indent-stackXXX'. + (El): Updated. + (doc-diag-list): Use `doc-compact-list-stackXXX'. + (doc-tag-list): Use `doc-list-have-indent-stackXXX'. + (doc-set-vertical-and-indent): Ditto. + (doc-next-list-depth): Removed. + (doc-increment-list-stack): Updated. + (doc-decrement-list-stack): Use `doc-list-depth' instead of + `doc-next-list-depth'. + (doc-end-list, doc-end-column-list): Don't use + `doc-increment-list-stack'. + (doc-set-column-tab): Don't use `doc-list-offset-stackXXX'. + (doc-save-global-vars, doc-restore-global-vars): Updated. + * tmac/doc-common: Updated. + * tmac/groff_mdoc.man: Updated. + * NEWS: Fix typo. + +2001-04-02 Werner LEMBERG + + * src/devices/grotty/grotty.man: Fix grammatical error. + +2001-03-30 Ruslan Ermilov + + Remove .Ld from mdoc package; replace it with special handling of + `...'. + + * tmac/doc-common: Remove `Ld' register. + Uncomment `doc-volume-ds-*' strings. + Remove `doc-operating-system-default'. + (Os): Updated. + * tmac/doc-syms (Ld): Removed. + * tmac/doc.tmac (doc-parse-args, doc-parse-arg-vector): Handle + `...' specially. + * NEWS: Updated. + + * tmac/groff_mdoc.man: Many fixes and updates. + +2001-03-29 Werner LEMBERG + + * tmac/troffrc-end: Protect data with `.do'. Reported by T. Kurt + Bond . + * tmac/www.tmac: Save compatibility mode. + +2001-03-28 Ruslan Ermilov + + * tmac/groff_mdoc.man: Many fixes. + +2001-03-28 Werner LEMBERG + + * src/preproc/soelim/soelim.man: Document that `.so' + isn't recognized. + +2001-03-27 Werner LEMBERG + + * tmac/an-old.tmac (TP, an-do-tag): Reduce line length while in + diversion. This fixes overlong tags. + +2001-03-26 Werner LEMBERG + + * doc/groff.texinfo: Fixed and improved documentation of fonts. + * tmac/doc-syms: Fix error messages. + * tmac/an-old.tmac: Remove incorrect double backslashes. + +2001-03-24 Ruslan Ermilov + + * tmac/Makefile.sub: Strip mdoc.local also + * tmac/strip.sed: Fixed. + +2001-03-24 Werner LEMBERG + + * tmac/doc-nroff, tmac/doc-ditroff: Implement -rSxx switch for + selecting the font size. + * tmac/groff_mdoc.man, NEWS: Document it. + +2001-03-23 Werner LEMBERG + + * src/roff/troff/div.cc (save_vertical_space): Add default argument + to `sv' request. + * src/roff/troff/env.cc (family_change): Make `.fam' accept no + argument to restore previous font family. + * src/roff/troff/troff.man, man/groff.man, NEWS: Updated. + + * doc/groff.texinfo: More fixes and additions (mainly for font + manipulating commands). + + * tmac/groff_mdoc.reference.man: Small updates and renamed to ... + * tmac/groff_mdoc.man: This. The quick reference has been removed. + * tmac/Makefile.sub, NEWS: Updated. + +2001-03-23 Werner LEMBERG + + Replaced mdoc implementation. The new version is `state of the + art', using almost all new features of groff 1.17 -- it won't run + with older versions. + + * tmac/doc.tmac: Completely rewritten. + * tmac/doc-common: Ditto. + * tmac/doc-nroff: Ditto. + * tmac/doc-ditroff: Ditto. + * tmac/doc-syms: Ditto. + * tmac/mdoc.local: New file. + * tmac/groff_mdoc.samples.man: Replaced with ... + * tmac/groff_mdoc.reference.man: New file, covering mdoc completely. + * tmac/strip.sed: Updated. + * tmac/Makefile.sub: Updated. + * INSTALL: Updated. + + * tmac/groff_man.man: Add `man.local' to the FILES section. + +2001-03-22 Werner LEMBERG + + * doc/groff.texinfo: Added many @noindent. + Replaced @end_Example -> @endExample. + Added info whether registers are r/o. + Many other additions and fixes. + +2001-03-21 Werner LEMBERG + + * doc/groff.texinfo: Added macro @Var (and some hacks due to bugs + in makeinfo of texinfo 4.0) to be used in @Def* macros. + Improved @Def* macros: Now the exact syntax of request, register, + and escapes is shown. + Added macros for parentheses and brackets to be used in @Def*. + Many fixes and improvements of the documentation. + +2001-03-20 Werner LEMBERG + + * doc/groff.texinfo: Added new index: `st' (for strings). + Added macros @Defstr(x). + Added macro @Example (adding @group). + Other minor improvements. + +2001-03-19 Werner LEMBERG + + * doc/groff.texinfo: Added two new indices: `es' (for escapes) and + `rq' for requests. `fn' is no longer used. + Added macros @Defreq(x), @Defreg(x), and @Defesc(x). + Removed @Deffn(x). + + * tmac/an-old.tmac (an-p-footer): If `cR' is set, replace page + number with name of man page. + +2001-03-19 Larry Kollar + + * doc/groff.texinfo: Complete revision. Added many @Deffn to gain + consistency. + +2001-03-19 Werner LEMBERG + + * man/groff_font.man: Document `prepro', `postpro', and `print'. + * src/roff/groff/groff.man: Improve documentation of `-l' and `-L'. + * src/devices/grohtml/grohtml.man: Fixing typos. + +2001-03-19 Gaius Mulley + + * tmac/s.tmac (@IP): Pass `.ip' html tag. + * tmac/groff_mwww.man: Remove .LINE macro + * tmac/www.tmac (LINE): Add `.ti'. + + * src/devices/grohtml/post-html.cc (html_printer): New member + `indent'. + (html_printer::emit_raw): Use it. + (html_printer::do_linelength): Ditto. + (html_printer::do_pageoffset): Ditto. + (html_printer::do_indentation): Ditto. + (html_printer::do_tempindent): Ditto. + (html_printer::do_break): Ditto. + (html_printer::begin_page): Ditto. + (html_printer::do_indentedparagraph): New function. + (html_printer::troff_tag): Handle `.ip'. + * src/devices/grohtml/html-text.cc (html_text::issue_table_begin): + Add `' handling. + (html_text::do_table): Add parameter. + (html_text::do_indent): Updated. + * src/devices/groohtml/html-text.h: Updated. + +2001-03-16 Gaius Mulley + + Introduced simple html tables to implement indentation. + + * src/devices/grohtml/html.h (word, word_list): New structures. + (simple_output): Use it. + * src/devices/grohtml/post-html.cc: Add `INDENTATION'. + (html_printer): Improve indentation handling. + (html_printer::emit_raw): Set `in_table' element. Handle + indentation if set. + (html_printer::write_header): Move conditional downwards. + Don't allow whitespace in tags. + (html_printer::do_linelength): Handle line length and indentation + conditionally. + (html_printer::do_pageoffset): Handle indentation conditionally. + (html_printer::do_indentation): Ditto. + (html_printer::do_tempindent): New function member. + (html_printer::do_fill): Take care of indentation. + (html_printer::do_flush): Finish table. + (html_printer::do_links): Ditto. + (html_printer::do_break): New function for handling `.br' and `.ti'. + (html_printer::troff_tag): Use it. + Handle `.ti'. + (html_printer::flush_globs): Fix. + (html_printer::flush_page): Finish table. + (html_printer::html_printer): Fix error message. Set up + `linelength'. + (html_printer::add_to_sbuf): Remove special handling of character + code 255. + (to_unicode): Remove `stop()'. + (html_printer::write_title): Cleanup. + (html_printer::begin_page): Use `put_string()'. Handle indentation. + (html_printer::~html_printer): Flush text and end the line. + Use `put_string()'. + * src/devices/grohtml/html_text.h: Add more *_TAG enum values. + * src/devices/grohtml/html_text.cc (html_text::end_tag): Fix + emission of tags. + (html_text::start_tag): Disable newlines. + (html_text::table_is_void): New function. + (html_text::issue_table_begin): Ditto. + (html_text::issue_table_end): Ditto. + (html_text::push_para): Better table handling. + (html_text::do_indent): New function. + (html_text::do_table): Ditto. + (html_text::done_table): Ditto. + (html_text::do_tt): Handle PRE_TAG. + (html_text::is_in_table): New function. + (html_text::check_emit_text): Handle tables. + (html_text::do_emittext): Use `nl()'. + (html_text::do_para): Handle table. + (html_text::remove_def): New function. + * src/devices/grohtml/output.cc (word, word_list): Implement + methods. + (simple_output::end_line): Flush last word. + (simple_output::simple_comment): Ditto. + (simple_output::begin_comment): Recoded. + (simple_output::end_comment): Ditto. + (simple_output::comment_arg): Removed. + (simple_output::check_newline): Improve test and flush last word. + (simple_output::space_or_newline): Improved. + (simple_output::write_newline): Replaced with... + (simple_output::nl): This. + (simple_output::put_raw_char): Flush last word. + (simple_output::check_space): Removed. + (simple_output::put_translated_string): Ditto. + (simple_output::put_string): Simplified. + (simple_output::put_number): Updated. + (simple_output::put_float): Ditto. + (simple_output::put_symbol): Removed. + (simple_output::enable_newlines): Add `check_newline()'. + (simple_output::flush_last_word): New function. + + * src/roff/troff/enc.cc (no_fill): Remove call to add_html_tag(). + * src/roff/troff/div.cc (page_offset): Add call to add_html_tag(). + + * tmac/s.tmac (@PP, @IP): Add html conditional code. + * tmac/an-old.tmac (TP): Ditto. + +2001-03-09 Ruslan Ermilov + + * mdate.sh: Make it POSIX compliant. + +2001-03-09 Werner LEMBERG + + Added the `return' request to end a macro immediately. It simply + pops iterators from the input stack until a macro iterator is found. + + * src/roff/troff/input.cc (input_iterator::is_macro, + macro_iterator::is_macro): New member. + (input_return_boundary): New class to signal an immediate return + to while_request(). + (input_stack::add_return_boundary, input_stack::is_return_boundary): + New functions. + (input_stack::clear): Use it. + (input_stack::pop_macro): New function. + (while_request): Use `is_return_boundary()'. + (return_macro_request): New function. + (init_input_requests): Use it. + + * src/roff/troff/TODO: Updated. + * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. + +2001-03-08 Werner LEMBERG + + * src/roff/troff/input.cc (input_iterator::is_boundary): Minor + cleanup. + +2001-03-07 Werner LEMBERG + + Make `\B' more rigid. + + * src/roff/troff/number.cc (parse_expr, parse_term): Add `rigid' + parameter. + (get_number_rigidly): New function. + * src/roff/troff/input.cc (do_expr_test): Use it. + * src/roff/troff/token.h: Updated. + + * src/roff/troff/request.h: Fix typo (init_html_request -> + init_markup_request). + +2001-03-04 Gaius Mulley + + Fixed grohtml handling of any named glyph for glyph indexes < 0x80. + Cosmetic changes to `.html-begin', `.html-end', `.html-image' which + are now `.begin', `.end', `.image'. + + * src/devices/grohtml/post-html.cc: Adding UNICODE_DESC_START. + (html_printer::add_to_sbuf): Changing type of `code' parameter. + Use add_char_to_sbuf(). + (to_unicode): New function. + (char_translate_to_html): Changing type of `ch' parameter. + Use `to_unicode()'. + (html_printer::~html_printer): Comment out doctype string. + * src/preproc/html/pre-html.cc (write_end_image): Use `.end' + instead of `.html-end'. + (write_start_image): Use `.begin' and `.image' instead of + `.html-begin' and `.html-image'. + * src/roff/troff/input.cc: Rename `html_level' to `begin_level'. + (html_begin): Renamed to ... + (begin): This. + (html_end): Renamed to ... + (end): This. + (html_image): Renamed to ... + (image): This. + (init_html_requests): Renamed to ... + (init_markup_requests): This. + * tmac/www.tmac: Updated. + +2001-02-28 Bram + + * src/libs/libgroff/font.cc (font_widths_cache): Fixing syntax of + constructor. + +2001-02-26 David Leonard + + * doc/meref.me: Fixing some typos. + +2001-02-16 Werner LEMBERG + + * src/roff/troff/node.cc (space_node::get_hyphenation_type): New + method. Return `HYPHEN_MIDDLE' if it was `\:'. + * src/roff/troff/node.h: Updated. + +2001-02-17 Ruslan Ermilov + + * tmac/groff_tmac.man: Fix typo. + +2001-02-16 Werner LEMBERG + + Fixing a bug which prevented proper end-of-sentence recognition + between an `unformatted' box and the following text. As a + consequence, vertical line distances are no longer preserved in + boxes after a call to `.unformat' -- because boxes aren't + line-oriented (contrary to diversions), this doesn't make sense + anyway. + + * src/roff/troff/node.cc (*node::set_unformat_flag): Add return + value. + (vertical_size_node::set_unformat_flag): New method. + * src/roff/troff/node.hh: Updated. + * src/roff/troff/input.cc (word_space_node::reread, + hmotion_node::reread): Reset `unformat' flag after usage. + (unformat_macro): Append only if `set_unformat_flag()' returns + non-zero. + * src/roff/troff/troff.man: Updated. + +2001-02-15 Werner LEMBERG + + * src/roff/troff/troff.man, NEWS, man/groff.man: Improved + documentation of `asciify' and `unformat' requests. + +2001-02-13 Werner LEMBERG + + Redesigned the `unformat' request. It is no longer connected with + `asciify' but rather uses new `reread()' methods if the `unformat' + flag is set. Additionally, the handling of space characters after + unformatting has been fixed so that they retain their width. + + * src/roff/troff/node.h (width_list): New structure to store + original widths of spaces. + (node): Added `unformat' member. + Replaced `num_spaces' variable with `orig_width' list. + * src/roff/troff/node.cc (*node::asciify, + asciify_reverse_node_list): Removed `unformat_only' flag and related + code. + (word_space_node::asciify, word_space_node::word_space_node): Use + `orig_width'. + (word_space_node::~word_space_node): New destructor. + (word_space_node::copy): Updated to handle `orig_width'. + (hmotion_node::copy, unbreakable_space_node::copy): Updated. + (*node::merge_space): Update `orig_width' list if necessary. + (*node::set_unformat_flag): New methods to set the `unformat' flag. + * src/roff/troff/enc.cc (environment::space_newline): Use + `width_list'. + (environment::space): Added method to handle space width and + sentence space width as parameters. Use `width_list'. + (environment::make_tab_node): Updated. + * src/roff/troff/env.h: Updated. + * src/roff/troff/input.cc (word_space_node::reread, + unbreakable_space_node::reread, hmotion_node::reread): New methods + to handle nodes specially if `unformat' flag is set. + (do_asciify_macro): Renamed back to ... + (asciify_macro): This. + (unformat_macro): New implementation to simply set the `unformat' + flag. + + * MORE.STUFF: Added more info about deroff. + +2001-02-08 Werner LEMBERG + + * src/roff/troff/node.h (unbreakable_space_node, hmotion_node, + space_char_hmotion_node, overstrike_node): Add `get_hyphen_list()' + and `add_self()' methods to avoid hyphenation. For example, the + hyphen list for `foo\0\0bar' was `foobar', causing insertion of a + soft hyphen after `foo'. Now the hyphen list is correctly + `foobar'. + +2001-02-05 Yoshiteru Kageyama + + * tmac/groff_tmac.man: Fix `BIR' macro. + +2001-02-04 Werner LEMBERG + + A new escape sequence `\:', inserting a zero-width break point. + + * src/roff/troff/input.h: Adding `ESCAPE_COLON'. + * src/roff/troff/input.cc (get_copy, token::next, asciify): + Implement it. + * src/roff/troff/node.h (node): Add `is_escape_colon()' virtual + method. + (space_node): Add `was_escape_colon' member. Add `is_escape_colon()' + and `asciify()' methods. + * src/roff/troff/node.cc (space_node::space_node): Updated. + (space_node::asciify): Handle `was_escape_colon'. + * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. + + Handle `\~' similar to other comparable requests. + + * src/roff/troff/input.cc (process_input_stack): Remove now obsolete + label. + (token::next): Move creation of an unbreakable_space_node to... + (token::add_to_node_list): Here. + + Fix a bug which sometimes prevented hyphenation of words connected + with `\~' or `\ ' (and other escape sequences handled as + TOKEN_NODE). This also fixes a hyphenation problem with boxes + (after a call to the `unformat' request). + + * src/roff/troff/env.h (environment::possibly_break_line, + environment::hyphenate_line): Introducing `start_here' parameter. + * src/roff/troff/env.cc (environment::space_newline, + environment::space): Use it. + (environment::possibly_break_line, environment::hyphenate_line): + Implement it. + * src/roff/troff/input.cc (process_input_stack): Use it. + * src/roff/troff/node.h (unbreakable_space_node, hmotion_node, + space_char_hmotion_node, overstrike_node): Add + `get_hyphenation_type()' method. + * src/roff/troff/node.cc (break_char_node::asciify): Don't asciify + if `unformat_only' is active. + +2001-01-30 Werner LEMBERG + + Implemented new read-only number register `.linetabs' which + returns 1 if in line-tabs mode, 0 otherwise. + + * src/roff/troff/env.h (environment): Add get_line_tabs() member. + * src/roff/troff/env.cc (get_line_tabs): New function. + (init_env_requests): Use it. + * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. + + * VERSION, REVISION: Changing to 1.17.0. + +2001-01-28 Werner LEMBERG + + Fixed a bug which prevented hyphenation of words which are finished + with `\)'. + + * src/roff/troff/token.h (token): Add enum type + `TOKEN_TRANSPARENT_DUMMY' and method `transparent_dummy()'. + * src/roff/troff/input.cc (token::next, token::description, + get_line_arg, token::add_to_node_list, token::process): Use it. + +2001-01-27 Werner LEMBERG + + * src/roff/troff/div.h (diversion): Add `saved_prev_line_interrupted'. + * src/roff/troff/div.cc (do_divert): Use it. + + * src/roff/troff/input.cc (asciify): Add ESCAPE_RIGHT_PARENTHESIS. + +2001-01-25 Werner LEMBERG + + Adding the `linetabs' request. If set, tab distances are not + computed relative to the input line but relative to the output line. + + * src/roff/troff/env.h (environment): New member `line_tabs'. + * src/roff/troff/env.cc (line_tabs_request): Implement request. + (environment::environment, environment::copy): Updated. + (environment::distance_to_next_tab): Use `line_tabs'. + (init_env_requests): Register request. + * src/roff/troff/troff.man, man/groff.man, NEWS: Document it. Other + fixes. + +2001-01-24 Werner LEMBERG + + Introducing a new read-only register `.int' which is set to a + positive value if the last output line is interrupted (i.e., if it + contains `\c'). + + * src/roff/troff/env.cc (init_env_requests): Add it. + * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. + +2001-01-23 Gaius Mulley + + * tmac/mwww.tmac: Call `www.tmac', not `arkup.tmac'. + * src/preproc/html/pre-html.cc (findPrefix): New function which + generates the troff executable name via the system prefix. + * src/preproc/eqn/main.cc: Modified warning message. + +2001-01-23 Werner LEMBERG + + troff's `box' and `boxa' requests didn't preserve temporary + indentation. + + * src/roff/troff/div.h (diversion): Add `saved_saved_indent' and + `saved_target_text_length' members. + * src/roff/troff/div.cc (do_divert): Use them. + + Tabs (but not yet leaders and fields) are now handled correctly by + `asciify' request. + + * node.h (hmotion_node): Add field `was_tab'. + * env.cc (environment::make_tab_node): Set it. + * node.cc (hmotion_node::copy, hmotion_node::asciify): Use it. + + Added new request `unformat' which will, contrary to `asciify', + preserve font information after unformatting (i.e., only nodes + dealing with horizontal space are converted back to input + characters). + + * input.cc (asciify_macro): Renamed to ... + (do_asciify_macro): this, having a new parameter `unformat_only'. + (asciify_macro, unformat_macro): New; using do_asciify_macro. + (init_input_requests): Added `unformat'. + * node.cc (*_node::asciify), asciify_reverse_node_list: Added + parameter to control asciification process. + * node.h (*_node::asciify): Ditto. + * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. + +2001-01-20 Werner LEMBERG + + * doc/groff.texinfo: Minor improvement of `.in' documentation. + +2001-01-18 Werner LEMBERG + + * tmac/ps.tmac: Remove call of psold.tmac. + * tmac/psold.tmac: Comment updated. + * tmac/psnew.tmac: Removed since no longer needed. + * tmac/Makefile.sub, NEWS, src/devices/grops/grops.man: Updated. + + * font/devutf8/R.proto: Adding `shc' glyph. + * font/devutf8/NOTES: Updated. + + * test-groff: Updated. + +2001-01-15 Gaius Mulley + + First cut of the new html device driver. Changes to pre-html and + the new grohtml are too numerous to be documented here. + + Stuff related to `html' has been renamed to `html-old' and `html2' + stuff has been renamed to `html' (including directories). The new + html device driver is therefore invoked as `-Thtml'. + + Added new `\O' escape to suppress output (needed by html driver). + + Added functions and code to pass info about input-level commands + (`.in', `.fl', etc.) to html driver. + + Three new functions (.html-begin, .html-end, and .html-image) for + better html handling: `html-begin' will execute the remaining line + if at the outermost nesting level, increasing an internal counter. + `html-end' does the same but decreases the internal counter. + `html_image' puts its arguments into a special node (suppress_node) + to define an image region. + + The `output' request has been removed. + + * tmac/html-tags.tmac: Removed. + * tmac/arkup.tmac: Updated and renamed to ... + * tmac/www.tmac: New file. + * tmac/markup.tmac Updated and renamed to ... + * tmac/mwww.tmac: New file. + * tmac/Makefile.sub: Updated. + * tmac/an-old.tmac: Updated. + * tmac/eqnrc: Updated. + * tmac/groff_man.man + * tmac/groff_markup.man: Updated and renamed to ... + * tmac/groff_mwww.man: New file. + * tmac/groff_tmac.man: Updated. + * tmac/html-old.tmac: Updated and Renamed from html.tmac. + * tmac/html.tmac: Updated and renamed from html2.tmac. + * tmac/pspic.tmac: Updated html support. + * tmac/s.tmac: Added html output support. + * tmac/troffrc, tmac/troffrc-end: Updated. + + * Makefile.in, doc/Makefile: Updated. + * doc/groff.texinfo: Added info about new `\O' escape. + * doc/homepage.ms: Use `MAILTO' macro. + + * font/devhtml/DESC.proto: Add `C' font. + * font/devhtml/Makefile.sub: Updated. + * font/devhtml/R.proto: Minor fixes. + * font/devhtml-old/Makefile.sub: Updated. + + * src/devices/grohtml-old/Makefile.sub: Updated. + + * src/libs/libdriver/printer.cc (printer::get_font_from_index): New + method. + * src/libs/libgroff/htmlindicate.cc (html_begin_suppress, + graphic_start): Add `inline' parameter. Update. + (html_end_suppress, graphic_end): Update. + + * src/include/html-strings.h: New file. + * src/include/htmlindicate.h: Comments updated. + * src/include/printer.h: Updated. + + * src/preproc/eqn/main.cc (do_file, main): Updated. + * src/preproc/pic/troff.cc (troff_output::start_picture, + troff_output::finish_picture): Updated. + * src/preproc/tbl/main.cc (process_input_file): Updated. + + * src/roff/groff/groff.cc (main): Updated. + Pass device arguments to predrivers also. + Use `ps' device for `eqn' preprocessor if `-Thtml' is given. + * src/roff/troff/env.h (environment): Updated. + New elements `need_eol' and `ignore_next_eol' (for html output). + * src/roff/troff/env.cc (environment::environment): Add initializers + for `need_eol' and `ignore_next_eol'. + (environment::add_html_tag_eol, environment::add_html_tag_tabs): New + functions. + (point_size, fill, no_fill, center, right_justify, line_length, + indent, temporary_indent, break_request, handle_tab): Use + `add_html_tag()'. + (set_tabs): Use `add_html_tag_tabs()'. + (environment::add_html_tag): Updated. + (environment::do_break): Updated. + * src/roff/troff/div.cc (space_request, flush_output): Use + `environment::add_html_tag()'. + * src/roff/troff/input.cc: Updated. + New variable `html_level' to indicate nested `html-begin' requests. + (file_iterator::fill): Use `environment::add_html_tag_eol()'. + (non_interpreted_char_node, token_node, non_interpreted_node): Add + `force_tprint()' method. + (token::next): Handle `\O'. + (do_suppress): Implement it. + (html_begin, html_end, html_image): New functions. + (init_output_requests): Renamed to ... + (init_html_requests): this. + (main): Use it. + (macro::append_str, macro::append_unsigned, macro::append_int): New + methods. + New variable `output_low_mark_miny' to limit minimal value of y. + (reset_output_registers): Use it. + (output_request): Removed. + (get_output_registers): New function. + * src/roff/troff/node.h (node): Make `force_tprint()' virtual. + (*_node): Added `force_tprint()' if necessary. + (special_node): New elements `tf' and `get_tfont()'. + (suppress_node): New class. + * src/roff/troff/node.cc: + New global variables `image_no' and `suppress_start_page'. + (real_output_file): New method `is_on()'. + (troff_output_file): New method `start_special(tfont)'. + (troff_output_file::really_print_line): Use `tprint' conditionally. + (real_output_file::print_line): Updated. + (real_output_file::on): Updated. + (*_node): Added `force_tprint()'. + (special_node::special_node): Initializer updated. + (special_node::same, special_node::copy, special_node::tprint_start): + Updated. + (get_reg_int, get_reg_str): New functions. + (suppress_node::*): New methods. + New global variables last_position, last_image_filename; + (min): New inline function. + * src/roff/troff/reg.h, src/roff/troff/request.h, + src/roff/troff/troff.h: Updated. + +2001-01-13 Werner LEMBERG + + * NEWS, src/roff/troff/troff.man, doc/groff.texinfo: Fix + documentation of `asciify' request. + +2001-01-12 Werner LEMBERG + + * src/roff/troff/input.cc: Move definition of special characters + like `ESCAPE_TILDE' to ... + * src/roff/troff/input.h: New file. + * src/roff/troff/Makefile.sub (HDRS): Add it. + + Extending the .asciify request to `unformat' space characters also. + + * src/roff/troff/node.h (word_space_node): Add `num_spaces' element + to count input space characters. + Update constructors to take care of it. + * src/roff/troff/node.cc (space_char_hmotion_node::asciify): Use + `ESCAPE_SPACE' instead of normal space. + (word_space_node::asciify): New method. + (unbreakable_space_node::asciify): New method. + (word_space_node::merge_space): New method. + * src/roff/troff/env.cc (environment::space_newline, + environment::space): Add code to initialize `num_spaces' (using the + constructor of `word_space_node'). + * NEWS, src/roff/troff/troff.man, man/groff.man, doc/groff.texinfo: + Document it. + +2001-01-09 Werner LEMBERG + + * man/groff_char.man: Use table header traps only conditionally. + +2001-01-09 Bjarni Ingi Gíslason + + * man/groff_char.man: Add `ý' and `Ý' to the `acute' group. + +2001-01-08 Werner LEMBERG + + Introducing the `box' and `boxa' requests which are similar to + `di' resp. `da' but omitting a partially filled line (which is + restored after ending the diversion). + + * src/roff/troff/div.h (diversion): Add elements to save partially + filled line. + * src/roff/troff/div.cc (do_divert): Add parameter `boxing' to save + partially filled line. + (divert, divert_append): Updated. + (box, box_append): New functions. + (init_div_requests): Use them. + * src/roff/troff/env.h (environment): do_divert() is now a friend. + * NEWS, src/roff/troff/troff.man, man/groff.man: Document it. + + * doc/groff.texinfo: Fix documentation of `lf' request. + +2000-12-25 Werner LEMBERG + + * src/roff/troff/troff.man, NEWS: Document `writem' request. + +2000-12-21 Werner LEMBERG + + Ignore `ss' request if in compatibility mode. + + * src/roff/troff/input.cc: Make `compatible_flag' non-static. + * src/roff/troff/env.h: Added extern `compatible_flag' declaration. + * src/roff/troff/env.cc (space_size): Use it. + + * doc/groff.texinfo, src/roff/troff/troff.man: Fix documentation of + `ss' request in nroff mode. + + * tmac/an-old.tmac: Fixed some serious bugs introduced with latest + changes. + +2000-12-15 Ruslan Ermilov + + * tmac/troffrc, tmac/troffrc-end: Convert tmac.* to *.tmac. + +2000-12-13 Werner LEMBERG + + * src/preproc/eqn/Makefile.sub (MAN1): Added neqn.man. + * src/preproc/eqn/neqn.man: Small fixes and additions. + +2000-12-13 Ruslan Ermilov + + * src/utils/addftinfo/addftinfo.man, src/devices/grops/grops.man: + Fixing typo. + + * src/preproc/eqn/neqn.man: New file. + + * src/preproc/tbl/table.cc (table::print): Fix `indent cannot be + negative' warning. + + * tmac/e.tmac: Add `T&' macro. + Fix `indent cannot be negative' warning. + * tmac/s.tmac: Fix `indent cannot be negative' warning. + +2000-12-07 Werner LEMBERG + + * src/include/lib.h: Replaced __ALPHA with __alpha symbol. + +2000-12-06 Werner LEMBERG + + * PROBLEMS: Added info about adding -lPW on HP-UX to satisfy the + `alloca' symbol . + + * MORE.STUFF: Added info about deroff for djgpp. + + * tmac/an-old.tmac, tmac/groff_man.man, doc/groff.texinfo, NEWS: Fix + documentation of -rcR switch. + +2000-12-03 Werner LEMBERG + + * tmac/an-old.tmac: Implementing the -rcR switch (similar to mdoc); + if -rcR=1 (which is now the default in nroff mode), a single, very + long page is created instead of multiple pages: All `ne' and `wh' + requests are put into conditionals; a new macro `an-end' is added to + be called with `em'. + + Some other minor cleanups. + + * NEWS, tmac/groff_man.man, doc/groff.texinfo: Updated. + +2000-12-02 Werner LEMBERG + + Fixing a bug which prevented hyphenation in words followed + immediately by a TOKEN_NODE (e.g. `\ ', `\~', etc.). + + * src/roff/troff/input.cc (process_input_stack ): + Adding possibly_break_line(). + * src/roff/troff/env.h (environment): Make possibly_break_line() + public. + + Make `\~' usable in .tr request. + + * src/roff/troff/token.h (token_type): Add TOKEN_STRETCHABLE_SPACE. + (token): Add stretchable_space(). + * src/roff/troff/input.cc (token::next, token::delimiter, + token::description, process_input_stack, do_translate, + add_to_node_list, token::process): Use it. + * src/roff/troff/node.h (node): Add fourth parameter to add_char() + for adjusting the space. + * src/roff/troff/node.cc (node::add_char): Implement it. Add code + for stretchable space. + * src/roff/troff/input.cc (token::add_to_node_list): Use it. + (make_node): Add code for stretchable space. + * src/roff/troff/env.cc (environment::add_char): Use it. + * src/roff/troff/input.cc: Add ESCAPE_TILDE special character. + (get_copy, token::next, transparent_translate, asciify): Use it. + + * NEWS, src/roff/troff/troff.man, src/roff/troff/TODO, + doc/groff.texinfo: Updated. + * man/groff.man: Small reorderings. + +2000-11-23 Werner LEMBERG + + * NEWS: Fixes. + * src/preproc/eqn/main.cc (main): Use `config_macro_path' for -M + option. + * src/roff/troff/input.cc (main): Add `config_macro_path' and + `safer_macro_path' to -M option. + * src/roff/troff/troff.man: Fixes. + +2000-11-22 Werner LEMBERG + + Use safer path (except for config files) if -U isn't specified. Add + a special macro path (without home and current directory) for config + files. Add home directory to unsafe path for consistency. Don't + include the home directory in the font path. + + * src/libs/libgroff/macropath.cc: Add `config_macro_path', change + `macro_path'. + * src/include/macropath.h: Add `config_macrp_path'. + * src/libs/libgroff/fontfile.cc: Fix font path. + * src/roff/troff/input.cc (process_startup_file): Use + `config_macro_path'. + (main): Select unsafe path if -U is given. + + * src/preproc/eqn/main.cc (main): Fixing search path for + configuration file. + * src/preproc/eqn/eqn.man: Updated. + + * src/roff/troff/troff.man, man/roff.man, tmac/groff_tmac.man: + Updated. + + * src/preproc/grn/grn.man, src/devices/grodvi/grodvi.man, + src/devices/grohtml/grohtml.man, src/devices/grolbp/grplbp.man, + src/devices/grolj4/grolj4.man, src/devices/grops/grops.man, + src/devices/grotty/grotty.man: Updated. + + * Makefile.in: Fix comments. + +2000-11-17 Werner LEMBERG + + * tmac/safer.tmac: Empty file added (again) for compatibility + reasons. + * tmac/Makefile.sub: Updated. + +2000-11-16 Werner LEMBERG + + * src/devices/grodvi/dvi.cc (main), + src/devices/grohtml2/post-html.cc (main), + src/devices/grolbp/lbp.cc (main), src/devices/grolj4/lj4.cc + (main), src/devices/grops/ps.cc (main), src/devices/grotty/tty.cc + (main), src/preproc/eqn/main.cc (main), src/preproc/grn/main.cc + (main), src/preproc/html2/pre-html.cc (main), + src/preproc/pic/main.cc (main), src/preproc/refer/refer.cc (main), + src/preproc/soelim/soelim.cc (main), src/preproc/tbl/main.cc + (main), src/roff/groff/groff.cc (main), src/roff/troff/input.cc + (main), src/utils/hpftodit/hpftodit.cc (main), + src/utils/indxbib/indxbib.cc (main), src/utils/lkbib/lkbib.cc + (main), src/utils/lookbib/lookbib.cc (main), + src/utils/pfbtops/pfbtops.c (main), src/utils/tfmtodit/tfmtodit.cc + (main): Use stdout for -v. + * src/roff/groff/groff.cc (run_commands), + src/roff/groff/pipeline.c (run_pipeline): New parameter `no_pipe' + to make direct printing to stdout possible. + * src/roff/groff/pipeline.h: Updated. + + * src/utils/afmtodit/afmtodit.pl: Add -v switch. + * src/utils/afmtodit/Makefile.sub (afmtodit): Use @VERSION@. + * src/utils/afmtodit/afmtodit.man: Updated. + + * src/utils/addftinfo/addftinfo.cc (main): Add -v switch. + (version): New function. + (usage): Updated. + * src/utils/addftinfo/addftinfo.man: Updated. + + * src/devices/*/*, src/preproc/*/*, src/roff/*/*, src/utils/*/*: + Fixing copyright dates. + + * src/preproc/eqn/neqn.sh: Adding GROFF_BIN_PATH to path instead of + replacing it. + + * src/devices/grolbp/lbp.cc (main): Use Version_string instead of + version_string. + + * src/roff/nroff/Makefile.sub (nroff): Fix use of @VERSION@. + +2000-11-15 Werner LEMBERG + + In all programs, make -v return immediately with exit status 0 to + be compliant with the GNU standard. + + * src/devices/grodvi/dvi.cc (main), + src/devices/grohtml2/post-html.cc (main), + src/devices/grolbp/lbp.cc (main), src/devices/grolj4/lj4.cc + (main), src/devices/grops/ps.cc (main), src/devices/grotty/tty.cc + (main) src/preproc/eqn/main.cc (main), src/preproc/grn/main.cc + (main), src/preproc/html2/pre-html.cc (main), + src/preproc/pic/main.cc (main), src/preproc/refer/refer.cc (main), + src/preproc/soelim/soelim.cc (main), src/preproc/tbl/main.cc + (main), src/roff/groff/groff.cc (main), src/roff/troff/input.cc + (main): Implement it. + * NEWS: Updated. + + * src/roff/groff/groff.cc (main): Add copyright notice. Add refer + and postprocessors to the -v option. + + * src/roff/grog/grog.pl: Implement -v. + * src/roff/grog/Makefile.sub (grog): Use @VERSION@. + * src/roff/grog/grog.man, doc/groff.texinfo: Updated. + + * src/roff/nroff/nroff.sh: Implement -v. + * src/roff/nroff/Makefile.sub (nroff): Use @VERSION@. + * src/roff/nroff/nroff.man: Updated. + + * src/preproc/eqn/main.cc (main): Fix comment typo. + + * MORE.STUFF: Added info about djgpp port of grap. + +2000-11-14 Werner LEMBERG + + * src/roff/grog/grog.{pl,sh}: Implemented -C switch for compatibility + mode (or rather, implemented non-compatibility mode). + * NEWS, src/roff/grog/grog.man, doc/groff.texinfo: Updated. + + * src/roff/groff/groff.cc (main): Add BIN_PATH to PATH instead of + replacing it -- we don't find gxditview otherwise. + * NEWS, src/roff/groff/groff.man, doc/groff.texinfo: Updated. + + * src/preproc/pic/depend: Removed. Unnecessary. + + Implemented dummy keyword `solid' in pic for compatibility with + AT&T pic. + + * lex.cc (lookup_keyword): Added `solid'. + * pic.y: Added SOLID with dummy rule. + * pic.cc, pic_tab.h: Regenerated. + * doc/pic.ms: Updated. + +2000-11-13 Werner LEMBERG + + For security reasons, don't use the current directory but the home + directory while searching and scanning troffrc and troffrc-end. + Similarly, replace the current directory with the home directory + in the font path. + + * Makefile.in (fontpath, tmacpath): Remove current directory. + + * src/libs/libgroff/searchpath.cc (search_path::search_path): Add + two parameters `add_home' and `add_current'. + (search_path::~search_path, search_path::command_line_dir, + search_path::open_file): Remove tests for `dirs' being zero. + * src/include/searchpath.h: Adjust. + * src/libs/libgroff/macropath.cc, src/include/macropath.h: Add + `safer_macro_path'. + * src/libs/libgroff/fontfile.cc: Adjust `font_path'. + + * src/roff/troff/troff.h: Add `searchpath.h' and `mac_path'. + * src/roff/troff/input.cc: Use `mac_path', initialized with + `macro_path'. + (process_startup_file): Set `mac_path' to `safer_macro_path'. + * src/roff/troff/env.cc: Use `mac_path'. + + * src/preproc/eqn/main.cc (main): Use `safer_macro_path'. + + * NEWS, man/roff.man, src/roff/troff/troff.man, + src/roff/groff/groff.man, tmac/groff_tmac.man, arch/djgpp/README: + Updated. + +2000-11-12 Werner LEMBERG + + * src/include/lib.h: Don't include groff-getopt.h for OSF/1. + + * aclocal.m4 (GROFF_SYS_ERRLIST): Do test in C, not in C++. + * configure.in: Fix typo in comment. + * configure: Regenerated. + + * src/libs/libgroff/*, src/include/*, src/roff/troff/*: Fixing + copyright dates. + +2000-11-08 Werner LEMBERG + + Add system tmac directory (/usr/local/lib/groff/site-tmac). + + * Makefile.in: Add $(libdir), $(libprogramdir), and $(systemtmacdir). + (uninstall_dirs): Add $(libdir), $(libprogramdir), and + $(systemtmacdir). + Use @libdir@. + * Makefile.comm (.man.n): Add @SYSTEMMACRODIR@. + * tmac/Makefile.sub (install_data): Create + $(systemtmacdir) and $(localtmacdir). + (uninstall_sub): Use $(systemtmacdir) for wrapper macros. + * man/roff.man, src/roff/troff/troff.man, src/roff/groff/groff.man, + NEWS, doc/groff.texinfo: Updated and minor fixes. + + * Makefile.comm, Makefile.in: Added tmac_{s,an}_prefix stuff again. + * tmac/Makefile.sub: Added `wrap' stuff again, but installing into + $(systemtmacdir) since the wrapper files are platform-dependent. + +2000-11-01 Werner LEMBERG + + * doc/groff.texinfo: Fix typo. + +2000-10-26 Werner LEMBERG + + Convert macros `tmac.XXX' to `XXX.tmac'. Special cases: + tmac.doc.old -> doc-old.tmac + tmac.an.old -> an-old.tmac + + * tmac/tmac.*: Moved to ... + * tmac/*.tmac: this. + * tmac/man.local: Fix comment. + * tmac/groff_man.man, tmac/groff_markup.man, tmac/groff_mdoc.man, + tmac/groff_me.man, tmac/groff_ms.man, tmac/groff_tmac.man: Updated. + Added some `FILES' sections. More use of @...@ directives. Other + minor updates. + * arch/djgpp/README, font/devutf8/NOTES: Updated. + * doc/homepage.ms, doc/groff.texinfo: Updated. + * man/groff.man, man/roff.man: Updated. + * src/devices/grodvi/grodvi.man, src/devices/grolbp/grolbp.man, + src/devices/grolj4/grolj4.man, src/devices/grops/grops.man, + src/devices/grotty/grotty.man: Updated. + * src/preproc/pic/pic.man: Updated. + * src/roff/grog/grog.pl, src/roff/grog/grog.sh: Use -mdoc-old + instead of -mdoc.old. + * src/roff/grog/grog.man: Document -mdoc and -mdoc-old. + * src/roff/nroff/nroff.man: Updated. + * NEWS: Updated. + + * tmac/fixmacros.sed, tmac/strip.sed: Add explanatory comment. + + * tmac/mm.diff: Removed -- it has no use now since the mm package + is part of groff. + + * tmac/*: Removed trailing spaces. + + * arch/djgpp/t-groff.bat: Fix GROFF_TMAC_PATH (hyphen.us is now in + the tmac subdirectory also). + + * Makefile.comm, Makefile.in: Remove tmac_{s,an}_prefix stuff. + * tmac/Makefile.sub: Adapted to new macro names; removed `wrap' + stuff since it is no longer needed. + + * README, PROBLEMS: Updated. + +2000-10-25 Werner LEMBERG + + Invert current behaviour: Search first FOOBAR.tmac, then + tmac.FOOBAR. + + * src/roff/troff/input.cc: Introduce MACRO_POSTFIX. + (open_mac_file, macro_source): Implement it. + * src/roff/troff/troff.man, tmac/groff_tmac.man, man/roff.man, + doc/groff.texinfo, NEWS: Document it. + + * src/roff/nroff/nroff.man, src/roff/groff/groff.man, man/groff.man: + Small documentation improvements. + + * test-groff: Fix GROFF_TMAC_PATH (hyphen.us is now in the tmac + subdirectory also). + + * font/devps/Makefile.sub: Fix rules for dingbats.*map. + +2000-10-24 Werner LEMBERG + + Add local tmac directory (groff/site-tmac). + + * Makefile.in: Add $(localtmacdir). + (uninstall_dirs): Add $(localtmacdir). + * Makefile.comm (.man.n): Add @LOCALMACRODIR@. + * tmac/Makefile.sub (install_data, uninstall_sub): Handle man.local + in $(localtmacdir). Create $(localtmacdir). + * man/roff.man, src/roff/troff/troff.man, NEWS, doc/groff.texinfo: + Updated and minor fixes. + + Rename font/devps/generate/dingbats[r]map to dingbats.[r]map. + + * font/devps/generate/Makefile.sub, arch/djgpp/README: Adjust. + +2000-10-23 Werner LEMBERG + + Move hyphen.us to tmac directory. + + * src/roff/troff/hyphen.us: Removed. + * src/tmac/hyphen.us: Added. + * src/roff/troff/Makefile.sub, tmac/Makefile.sub: Updated. + + Change installation structure for data files from .../groff/... to + .../groff//... to be conform with other GNU + programs. + + * Makefile.in, Makefile.comm, src/utils/indxbib/Makefile.sub, + doc/Makefile: Implement it. + * aclocal.m4 (GROFF_PAGE): Add test for new directory structure. + * configure: Updated. + * arch/djgpp/README, font/devutf8/NOTES: Use it. + * NEWS: Document it. + * man/roff.man, tmac/groff_tmac.man: Use @FONTPATH@, @FONTDIR@, and + @MACRODIR@ instead of hard-coded directories. + +2000-10-22 Werner LEMBERG + + Implement $GROFF_BIN_PATH environment variable (which defaults to + $bindir) used for child programs of groff and similar wrappers. + + * gendefs.sh: Improve documentation. + * Makefile.comm (,man.n), src/include/Makefile.sub (defs.h), + src/preproc/eqn/Makefile.sub (neqn), + src/roff/nroff/Makefile.sub (nroff): Add $(bindir). + * src/preproc/eqn/neqn.sh, src/roff/nroff/nroff.sh: Implement + $GROFF_BIN_PATH. + * src/roff/groff/groff.cc (main): Implement $GROFF_BIN_PATH and + $GROFF_PATH__ (the latter for communication with troff). + * src/roff/troff/input.cc (main): Use $GROFF_PATH__ for $PATH if + set. + * NEWS, src/roff/nroff/nroff.man, src/roff/groff/groff.man, + doc/groff.texinfo: Document it. + + * doc/groff.texinfo: Improve documentation of troff's -a option. + +2000-10-17 Gaius Mulley + + * src/roff/troff/node.cc: Fixed calculation of opminx and fixed + non-intrusive eol marker. + (troff_output_file::determine_line_limits): New function. + (troff_output_file::draw): Use it. + * src/roff/troff/env.cc (environment::add_html_tag): Use output() + + output_pending_lines() instead of output_line(). + * src/preproc/eqn/main.cc (do_file): Fix graphic_end(). + * src/preproc/html2/pre-html.cc (char_buffer::write_file_troff, + createImage): Small fixes. + +2000-10-14 Werner LEMBERG + + Replace tmac.safer with a real secure solution. + + * src/roff/troff/input.cc (open_request, opena_request, pipe_source, + system_request, pipe_output): Disable requests if in safer mode. + * src/roff/groff/groff.cc (main): Remove reference to tmac.safer. + * tmac/tmac.safer, tmac/groff_msafer.man: Removed. + * tmac/Makefile.sub, NEWS, man/roff.man, tmac/groff_tmac.man, + doc/groff.texinfo, src/roff/groff/groff.man, + src/roff/troff/troff.man, arch/djgpp/README: Updated. + + * src/devices/grops/ps.cc (main), src/devices/grops/psrm.cc + (resource_manager::output_prolog): Replace setenv() with putenv(). + +2000-10-09 Werner LEMBERG + + * src/libs/libbib/map.c, src/libs/libgroff/getcwd.c, + src/libs/libgroff/strtol.c, src/preproc/html2/image.cc, + src/preproc/html2/pre-html.cc, src/preproc/html2/pushbackbuffer.cc, + src/roff/groff/pipeline.c: Removing `#ifndef errno' to avoid + compilation errors with some compilers. It seems that this code + is no longer necessary -- if yes, it is easy to add some #ifdef's + for that particular old-fashioned compiler. + + * MORE.STUFF: Added info about Meta-tbl. + + * doc/groff.texinfo: Added more info about `.if "..."..."'. + +2000-10-07 Werner LEMBERG + + Adding a new escape sequence \B'...': If the string between + the delimiters is a valid numeric expression, return the character + `1', and `0' otherwise. This is an analogon to \A. + + * src/roff/troff/input.cc (do_expr_test): Implement it. + (token::next): Use it. + * src/roff/troff/troff.man, NEWS, man/groff.man: Document it. + + * tmac/tmac.trace: Made independent from escape character. + +2000-10-06 Werner LEMBERG + + Adding a new request .dei: define indirect. The first and second + parameter of .dei are taken from string registers instead directly; + this very special request is needed to make tmac.trace independent + from the escape character (which might even be disabled). + + * src/roff/troff/input.cc (do_define_macro): Implement it. + (define_macro_indirect): New function. + (init_input_requests): Use it. + + Adding two requests .ecs and .ecr: Save and restore the escape + character. These two requests are needed to make tmac.trace + independent from the escape character (which might even be + disabled). + + * src/roff/troff/input.cc (save_escape_char, restore_escape_char): + Implement it. + (init_input_requests): Use it. + + * src/roff/troff/troff.man, NEWS, man/groff.man: Updated. + +2000-09-22 Ricardo Soares Guimarães + + Adding a new option -P and new environment variable GROPS_PROLOGUE + to grops, selecting a different prologue file (minor modifications + by WL). + + * src/devices/grops/psrm.cc (resource_manager::output_prolog), + src/devices/grops/ps.cc (main): Implement it. + * src/devices/grops/grops.man, NEWS: Document it. + +2000-09-22 Werner LEMBERG + + * INSTALL: Add info about selecting paper format. + +2000-09-21 Werner LEMBERG + + * src/roff/troff/input.cc (main): Fixing compiler warning. + * src/include/{driver.h, lib.h}: Move inclusion of string.h and + strings.h from the former to the latter. + * src/devices/grolbp/lpb.cc, src/include/lib.h: Move strncasecmp() + stuff from the former to the latter. + +2000-09-11 Werner LEMBERG + + Implementing two new requests .tm1 and .tmc: The former is similar + to .tm but can output leading spaces; its syntax is similar to + defining a string, i.e., a `"' can be used to mark the beginning of + the string to be written to stderr: `.tm1 " test'. The latter is + similar to .tm1 but doesn't write out a final newline character. + + * src/roff/troff/input.cc (terminal1, terminal_continue, + do_terminal): New functions. + (init_input_requests): Use them. + * src/roff/troff/troff.man, NEWS, man/groff.man: Updated. + +2000-09-09 Werner LEMBERG + + * tmac/groff_mdoc.samples.man: Small fixes. + +2000-09-08 Werner LEMBERG + + * tmac/groff_mdoc.man: Fixing typo. + +2000-09-02 Werner LEMBERG + + Implementing a .nop request which does nothing. + + * src/roff/troff/input.cc (nop_request): New function. + (init_input_requests): Use it. + * src/roff/troff/troff.man, NEWS, man/groff.man: Updated. + +2000-09-01 Werner LEMBERG + + * doc/groff.texinfo: Added some comments. + +2000-08-30 Werner LEMBERG + + * src/roff/troff/TODO: Updated. + +2000-08-25 Werner LEMBERG + + * doc/groff.texinfo: Fix comment how to compile the DVI file. + +2000-08-25 Eli Zaretskii + + * font/devps/generate/Makefile (SHELL): Define explicitly to + "/bin/sh", for non-Unix platforms. + (extraclean): Use a more portable "" quoting instead of a + backslash (which doesn't work on DOS/Windows). + + * font/devlj4/generate/Makefile (extraclean): Ditto. + + * font/devdvi/generate/Makefile (extraclean): Ditto. + +2000-08-25 Werner LEMBERG + + * NEWS, doc/groff.texinfo, tmac/groff_tmac.man, man/roff.man, + src/roff/troff/troff.man: Document Eli's latest changes. + +2000-08-25 Eli Zaretskii + + * src/roff/troff/input.cc (open_mac_file, macro_source): Support + macro file names of the form NAME.tmac as well as tmac.NAME. + +2000-08-25 Werner LEMBERG + + * src/include/posix.h: Remove definition of FILENAME_MAX. + + * src/preproc/html2/pre-html.h, pre-html.cc: Add return type to + `sys_fatal' and `stop' function(). + + * test-groff: Updated. + +2000-08-24 Gaius Mulley + + Added the new troff command .output to suppress output (while + still obeying motion) and also the opminx, opminy, opmaxx, opmaxy + registers (for passing the output dimensions to the output device). + + * src/roff/troff/div.cc (top_level_diversion::output): Use `width' + parameter. + * src/roff/troff/node.h, src/roff/troff/node.cc + (troff_output_file::really_print_line, + ascii_output_file::really_print_line, + supress_output_file::really_print_line): Use `width' parameter. + (troff_output_file::really_on, troff_output_file::really_off, + output_file::on, output_file::off, real_output_file::on, + real_output_file::off, real_output_file::really_on, + real_output_file::really_off): New functions. + (real_output_file:public output_file): New variable `output_on'. + (real_output_file::begin_page, real_output_file::copy_file, + real_output_file::transparent_char, real_output_file::print_line): + Use it. + (real_output_file::print_line): Use check_output_limits. + * src/roff/troff/reg.h, src/roff/troff/request.h, + src/roff/troff/input.cc (assign_registers): New function to remove + two `goto's. + (do_ps_file): Use it. + (check_output_limits, reset_output_registers, output_request, + init_output_requests): New functions. + (init_input_requests): Updated. + + Added new grohtml2 device and html2 preprocessor (coding + not yet finished) which will eventually replace grohtml. + + * Makefile.in, tmac/Makefile.sub, tmac/eqnrc, tmac/troffrc-end: + Updated. + * src/include/htmlindicate.h, src/include/htmlindicate + (html_begin_suppress, html_end_suppress): New functions. + * src/preproc/tbl/main.cc: Use it. + * src/roff/groff/groff.cc: Add support for html2 device (which will + automatically invoke the html2 preprocessor). + * src/roff/troff/input.cc (is_html2): New variable. + * src/roff/troff/troff.h, src/roff/troff/env.h, + src/roff/troff/env.cc (environment::add_html_tag): New function + (uses `is_html2'). + (environment::do_break): Use it. + * font/devhtml2/*: New files. + * src/devices/grohtml2: New device. + * src/preproc/html2: New preprocessor. + * tmac/tmac.html-tags, tmac/tmac.html2: New files. + +2000-08-23 Werner LEMBERG + + * src/devices/grolbp/lbp.cc: Same workaround for sinix as for AIX. + +2000-08-22 Werner LEMBERG + + * src/include/lib.h: Provide a fix for IRIX to not include + groff-getopt.h. + +2000-08-18 Werner LEMBERG + + * configure.in: Don't provide an empty value for SH_SCRIPT_SED_CMD + since some non-GNU sed programs can't handle null regexps. + * configure, src/preproc/eqn/Makefile.sub, + src/roff/grog/Makefile.sub, src/roff/nroff/Makefile.sub: Updated. + + * src/devices/grolbp/lbp.cc: Add an AIX workaround for an autoconf + bug (string.h and strings.h are both needed according to latest + POSIX standard). + + * MORE.STUFF: Added info about unroff and troffcvt. + +2000-08-08 Werner LEMBERG + + * tmac/tmac.a4: Will now work with ms macros also; -ma4 should be + used before -ms. + + * tmac/tmac.man.old: Remove unused number register. + + * tmac.doc: Minor documentation fix. + +2000-08-07 Paul Eggert + + * src/roff/groff/pipeline.c (is_system_shell): + Fix typo: "monocased_shell" no longer exists. + +2000-08-07 Paul Eggert + + Remove FILENAME_MAX limits. + + * src/roff/groff/pipeline.c (is_system_shell): Do not assume + that the argument length is less than FILENAME_MAX. + * src/libs/libgroff/tmpfile.cc (add_tmp_file): Likewise. + Use struct hack to allocate and free file name. + (struct xtmpfile_list): fname is now part of the structure, + not a pointer to another string. + +2000-08-07 Tom Schmidt + + * src/include/posix.h: Add a default value for FILENAME_MAX. + +2000-08-06 Paul Eggert + + Add support for new BSD-style man pages (with ".Dd" instead of + ".TH"), so that "groff -man" understands both styles, even + when running "groff -man" on a host whose system man page + macros don't support ".Dd". + + * tmac/Makefile.sub (NORMALFILES): Add tmac.an.old. + (stamp-wrap): Source tmac.andoc first when wrapping man macros, + in case the system man macros don't define Dd or TH. + + * tmac/tmac.an.old: Renamed from tmac/tmac.an. + * tmac/tmac.an: New one-line file. + * tmac/tmac.andoc (TH): Adjust to the tmac.an.old file renaming. + +2000-08-06 Werner LEMBERG + + * src/roff/troff/troff.man: Fixing typos. + +Local Variables: +version-control: never +coding: latin-1 +End: diff --git a/contrib/groff/ChangeLog.118 b/contrib/groff/ChangeLog.118 new file mode 100644 index 000000000000..172a57f08320 --- /dev/null +++ b/contrib/groff/ChangeLog.118 @@ -0,0 +1,3794 @@ + +Version 1.18.1 released +======================= + +2002-10-08 Werner LEMBERG + + * doc/webpage.ms, NEWS: Updated. + +2002-10-07 Werner LEMBERG + + * tmac/doc-common (Ss): Add final `.ns' (similar to `.Sh') to + suppress additional whitespace after the header. + + * tmac/doc-ditroff, tmac/doc-nroff (Am): New string to be in sync + with NetBSD. + + * src/preproc/grn/grn.man, tmac/groff_mdoc.man, NEWS: Updated. + +2002-10-07 Ruslan Ermilov + + * tmac/doc-common(doc-volume-operating-system-ateol): New flag. + (Dt): Use it to improve language localization (especially Russian + and French). + +2002-10-07 Daniel Senderowicz + + * src/preproc/grn/gprint.h (BSPLINE, BEZIER): New macros. + * src/preproc/grn/hdb.cc (DBGetType): Parse spline and bezier + drawing commands. + * src/preproc/grn/hgraph.cc (drawwig): Add parameter to control + curve type. + Call `picurve' for BSPLINE. + (HGPrintElt): Handle BSPLINE. + * src/preproc/grn/README: Document it. + +2002-10-03 Werner LEMBERG + + * src/roff/troff/node.cc (break_char_node::col): New variable. + Updated constructor. + (space_node::tprint, word_space_node::tprint): Call `fill_color' + unconditionally. + (space_node::space_node): Remove assertion. + (break_char_node::add_self): Pass color argument to space node. + * src/roff/troff/input.cc (token::add_to_node_list, token::process): + Ditto. + * src/roff/troff/env.cc (environment::do_break, + environment::add_padding): Ditto. + +2002-10-02 Werner LEMBERG + + Redesigning color support in troff. Colors are no longer + represented as separate nodes but are now part of glyph nodes and + friends. This fixes the current formatting misbehaviour due to the + changes introduced on 2002-09-20. Some extra code is necessary for + proper grotty support: Without adding color variables to + space-related nodes, the background color would be changed too late. + + * src/roff/troff/node.h, src/roff/troff/node.cc: + s/current_pagecolor/current_fill_color/. + s/current_glyphcolor/current_glyph_color/. + (glyph_color_node, fill_color_node): Removed. + (node::get_glyph_color, node::get_fill_color): New virtual member + functions. + (space_node::col): New variable. + Updated constructors of space_node and derived classes accordingly. + (hmotion_node::col): New variable. + Updated constructors of hmotion_node and space_char_hmotion_node + accordingly. + (vmotion_node::col): New variable. + Updated constructor accordingly. + (draw_node::gcol, draw_node::fcol): New variables. + Updated constructor accordingly. + (special_node::gcol, special_node::fcol): New variables. + Updated constructors accordingly. + (troff_output_file::put_char, troff_output_file::put_charwidth, + troff_output_file::draw): Set glyph and fill color. + (troff_output_file::start_special): Set glyph and fill color. + Always set current font. + (troff_output_file::fill_color, troff_output_file::glyph_color): + Don't call `do_motion'. + (glyph_node::gcol, glyph_node::fcol): New variables. + Updated constructors of glyph_node and ligature_node accordingly. + (glyph_node::get_glyph_color, glyph_node::get_fill_color): New + member functions. + (glyph_node::merge_glyph_node, + kern_pair_node::add_discretionary_hyphen, + node::add_discretionary_hyphen): Updated. + (break_char_node::merge_self): Updated. + (word_space_node::tprint, space_node::tprint, hmotion_node::tprint, + vmotion_node::tprint): Handle color. + (make_glyph_node, make_node, node::add_char): Updated. + + * src/roff/troff/env.cc (environment::space_newline, + environment::space, environment::output_line, environment::do_break, + environment::make_tab_node, environment::add_padding, title): + Updated. + (environment_switch, environment_copy): Don't add color nodes. + + * src/roff/troff/input.cc (do_glyph_color, do_fill_color): Return + nothing. + (token::next): Updated. + \m and \M now are as transparent as \s. + (process_input_stack, token::add_to_node_list, token::process, + read_draw_node): Updated. + (charinfo_to_node_list): Don't add color nodes. + + * doc/groff.texinfo: Updated. + +2002-09-27 Ruslan Ermilov + + * tmac/doc-common (ds-operating-system-FreeBSD-4.*): New version + strings. + +2002-09-27 Colin Watson + + * src/roff/troff/node.cc (bracket_node::copy): Check `list' != 0. + +2002-09-23 Werner LEMBERG + + * src/devices/grolbp/lbp.cc: Replace `300' with `font::res' where + appropriate. + (DEFAULT_LINEWIDTH_FACTOR): New macro. + (linewidth_factor): New global variable. + (lbp_printer::set_line_thickness): Fix case for size < 0, using + linewidth_factor. + (long_options): Add -w/--linewidth option. + (usage): Updated. + (main): Handle -w option to set linewidth_factor. + (lbp_printer::lbp_printer): Initialize req_linethickness, not + line_thickness. + + * src/devices/grolbp/grolbp.man, NEWS, doc/webpage.ms: Updated. + +2002-09-22 Paco Andrés Verdú + + Fixed a bug in the line thickness setting code. + + * src/devices/grolbp/lbp.cc (lbp_printer::req_linethickness): New + variable. + (lbp_printer::set_line_thickness): Pass environment as second + parameter. + Implement it actually. + (lpb_printer::set_char, lbp_printer::draw): Use `req_linethickness' + and `set_line_thickness, depending on the current font size. + +2002-09-21 Werner LEMBERG + + Some Debian patches. + + * src/roff/groff/pipeline.h (MAX_COMMANDS): Increase to 12. + * src/roff/troff/node.cc (bracket_node::copy): Initialize + `list->last'. + +2002-09-20 Werner LEMBERG + + * configure: Regenerated with autoconf 2.54. + +2002-09-20 Werner LEMBERG + + * src/roff/troff/env.h (environment): Rename cur_glyph_color to + glyph_color. + Rename cur_fill_color to fill_color. + * src/roff/troff/env.cc: Updated. + +2002-09-20 Werner LEMBERG + + * src/roff/troff/env.cc (title): Copy color status after processing + title. + * src/roff/troff/input.cc (charinfo_to_node_list): Emit glyph and + fill color nodes to reset colors properly. + + * tmac/www.tmac (DC): Fix color handling. + + * src/preproc/pic/pic.man, doc/pic.ms: Document some color issues. + * doc/groff.texinfo: Fixing documentation of `tl' request. + * doc/webpage.ms: Updated. + +2002-09-19 Werner LEMBERG + + * src/roff/troff/env.cc (environent_switch, environment_copy): + Emit glyph and fill color nodes to initialize colors properly. + +2002-09-17 Colin Watson + + * src/roff/troff/env.cc (environment::set_glyph_color, + environment::set_fill_color): Fix typo which prevented \m[] work + correctly. + +2002-09-17 Werner LEMBERG + + Add left and right italic correction to non-slanted PS fonts. This + is an experimental feature to improve image rendering of grohtml. + + * font/devps/generate/Makefile (RFLAG): New variable, set to `-i 0'. + ({T,H,C,P,N,BM,A,HN}{R,B}, ZD, S, ZDR): Use it. + * font/devps/*: All non-slanted fonts regenerated. + * NEWS: Updated. + +2002-09-16 Werner LEMBERG + + Add a site-specific font directory. + + * Makefile.in (localfontdir, legacyfontdir): New variables. + (fontpath): Use them. + (MDEFINES, uninstall_dirs): Updated. + * Makefile.comm (.man.n): Add `LOCALFONTDIR' and `LEGACYFONTDIR'. + Remove `FONTPATH' and `MACROPATH'. + + * src/roff/troff/troff.man, NEWS: Updated. + * doc/groff.texinfo (Font Directories): New section. + Other minor fixes. + + * src/devices/grodvi/grodvi.man, src/devices/grohtml/grohtml.man, + src/devices/grolbp/grolbp.man, src/devices/grolj4/grolj4.man, + src/preproc/grn/grn.man: Minor fixes. + + * src/devices/grohtml/post-html.cc (html_printer::do_tab_ts): + Remove unused variable. + +2002-09-11 Werner LEMBERG + + * doc/groff.texinfo, man/groff_font.man: Clarify argument of \N. + * man/groff_out.man: Fix documentation of 'N'. + +2002-09-09 Gaius Mulley + + * doc/Makefile.in (webpage.html): Depend on gnu.eps also. + * src/roff/troff/env.cc (indent): Emit html tag only if break_flag is + set. + * src/devices/grohtml/post-html.cc (text_glob::is_br_ni): Removed. + (text_glob::is_br, html_printer::lookahead_for_tables): Updated. + (html_printer::do_tab_ts): Call `emit_table_header' with `FALSE'. + * src/devices/grohtml/html-text.cc (html_text::start_tag) : Call `begin' with `FALSE'. + +2002-09-09 Ralph Corderoy + + * src/libs/libgroff/string.cc (string::extract): Fix position of + terminating null byte. + +2002-09-08 Werner LEMBERG + + Add global option `nospaces' to tbl so that leading and trailing + spaces in data items are ignored. + + * src/libs/libgroff/string.cc (string::remove_spaces): New member + function to remove leading and trailing spaces. + * src/include/stringclass.h: Updated. + + * src/preproc/tbl/table.h (table): Add flag `NOSPACES'. + + * src/preproc/tbl/main.cc (process_options): Handle `nospaces' + option. + Fix typo in error messages. + (process_data): Implement `nospaces' option. + * src/preproc/tbl/tbl.man, NEWS, doc/webpage.ms: Updated. + +2002-09-07 Werner LEMBERG + + * src/include/config.hin: Add `HAVE_ISATTY'. + * src/libs/libgroff/tmpfile.cc (xtmpfile_list): Drop `const' for + `fname' member. + * src/libs/libgroff/tmpname.cc: Include `time.h'. + * src/libs/libdriver/input.cc (Char): Add `operator==' and + `operator!=' for `char'. + * doc/groff.texinfo: Replace @ifnottex block for top node with + @ifhtml block. + +2002-09-06 Werner LEMBERG + + * doc/Makefile.in (.texinfo.html): Add -I switch. + * doc/groff.texinfo: Add @ifnottex block for top node to make + translation to HTML work. + +2002-09-05 Gaius Mulley + + * src/preproc/html/pre-html.cc (LETTER_LENGTH): Removed. + (get_papersize, determine_vertical_offset): Removed. + (char_buffer::do_image): Always specify letter size. + (main): Updated. + (imageList::createPage): Use -dDEVICEHEIGHTPOINTS instead of + -sPAPERSIZE. + +2002-09-05 Werner LEMBERG + + * doc/groff.texinfo, tmac/groff_man.man: Improve documentation of + default indentation. + +2002-09-04 Gaius Mulley + + * src/preproc/html/pre-html.cc (imageList::createPage): Use + -sPAPERSIZE for gs. + (generateImages): Clean up push-back buffer. + +2002-09-04 Ralph Corderoy + + * doc/groff.texinfo: Minor fixes. + +2002-08-21 Gaius Mulley + + * src/preproc/html/pre-html.cc (DEFAULT_LINE_LENGTH): New macro. + (MAX_WIDTH, A4_LENGTH, A4_OFFSET, LETTER_OFFSET): Removed. + (gsPaper): Removed. + (determine_vertical_offset): Use LETTER_LENGTH. + (createPage): Moved to ... + (imageList::createPage): This. + Call gs with -dDEVICEWIDTHPOINTS to avoid cropping. + (imageList::getMaxX): New function. + (createImage): Moved to ... + (imageList::createImage): This. + (imageList::createImages): New function. + (generateImages): Read `maxx' directly. + Updated. + (scanArguments): Don't specify `gsPaper' for `-o'. + (makeTempFiles): Call `xtmpfile' with the last argument set to + `TRUE'. + +2002-08-24 Werner LEMBERG + + * src/include/nonposix.h (mkdir, WAIT, creat) [_MSC_VER]: Define. + (WAIT, _WAIT_CHILD) [!_MSC_VER]: Define. + * src/preproc/html/pre-html.cc (waitForChild): Use WAIT. + * src/preproc/html/pushback.cc: Include nonposix.h. + * src/roff/groff/pipeline.c: Define strcasecmp and strncasecmp + conditionally. + +2002-08-23 Werner LEMBERG + + Use $(OBJEXT) for the object file extension. + + * Makefile.comm (.SUFFIXES): Add .obj. + (.cc.obj, .c.obj): New implicit rules. + * Makefile.in (OBJEXT): New variable, initialized from autoconf. + (MDEFINES): Add EXEEXT and OBJEXT. + * */Makefile.sub: s/.o/.$(OBJEXT)/. + +2002-08-22 Werner LEMBERG + + * INSTALL: Mention texinfo 4.2 as a prerequisite. + +2002-08-21 Gaius Mulley + + * src/devices/grohtml/post-html.cc (colType): Make enum global to + the file. + (html_printer::update_min_max, html_printer::add_table_end): New + methods. + (html_printer::lookahead_for_tables): Use them. + Reset page offset correctly. + (html_printer::~html_printer): Add creation of creator comment up. + +2002-08-20 Werner LEMBERG + + * tmac/an-old.tmac (T&): New dummy macro to avoid warning. + * man/groff_tmac.man: Fix typos. + * man/groff_font.man: Minor reordering. + * contrib/eqn2graph/eqn2graph.man (Tp): New macro. + +2002-08-18 Gaius Mulley + + Avoid endless loops while scanning for tables. + + * src/devices/grohtml/post-html.cc (list::insert): Set + ptr->right->left. + (html_printer::next_horiz_pos): Add `text_glob' argument; update + all callers. + Return immediately if that argument is NULL. + (html_printer::calc_nf): Don't test if `g' is NULL. + (html_printer::lookahead_for_tables): Use + `glyphs.move_right_get_data'. + Don't test if `g' is NULL. + +2002-08-18 Gaius Mulley + + A better fix, replacing fix 2002-08-15, for increasing SIZE. + + * src/devices/grohtml/post-html.cc (char_block): Make `buffer' + a pointer. + (char_block::char_block): Allocate `buffer'. + (char_buffer::add_string): Use it. + +2002-08-15 Werner LEMBERG + + * src/devices/grops/grops.man, src/devices/grolj4/grolj4.man, + src/devices/grodvi/grodvi.man: Document default line thickness. + +2002-08-15 Gaius Mulley + + * src/devices/grohtml/post-html.cc (char_block): Increase SIZE to + 8192. + +2002-08-14 Werner LEMBERG + + * doc/webpage.ms: Updated. + +2002-08-09 Werner LEMBERG + + * src/roff/troff/node.cc (node::add_char): Call `freeze_space' for + unbreakable space. + +2002-08-08 Aaron Campbell + + * src/preproc/pic/object.cc (object_spec::make_move): Fix typo + (&& -> &). + +2002-08-08 Werner LEMBERG + + * src/roff/troff/input.cc (read_rgb, read_cmy, read_cmyk): Call + tok.next(). + (read_gray): Ditto. + Don't push back a space but a newline onto the stack. + +2002-08-07 Gaius Mulley + + Add fonts `CI', `CB', and `CBI' to grohtml which have been omitted + inadvertently. + + * src/devices/grohtml/post-html.cc (html_printer::end_font, + html_printer::start_font): Handle them. + * src/devices/grohtml/html-text.cc (html_text::do_italic): Don't + reset bold and tt. + (html_text::do_bold): Don't reset italic and tt. + (html_text::do_tt, html_text::do_pre): Don't reset bold and italic. + * font/devhtml/DESC.proto: Add those fonts. + * font/devhtml/Makefile.sub (PROTOFONTS): Updated. + +2002-08-07 Werner LEMBERG + + * MORE.STUFF: Added gpresent. + + * tmac/trace.tmac: Show nesting level by a corresponding amount of + whitespace before printing the logging message. + +2002-07-31 Colin Watson + + * src/devices/grohtml/html-table.cc (html_table::finish_row): + Initialize `n' to zero. This fixes a segfault on ARM. + +2002-07-30 Werner LEMBERG + + * doc/grnexmpl.me: Remove calls to .st and .sc which are undefined. + +2002-07-29 Werner LEMBERG + + * src/preproc/pic/pic.y (print_arg, relative_path): Add missing + final semicolon. + +2002-07-28 Colin Watson + + * src/devices/grohtml/post-html (html_printer::troff_tag): Handle + `.ps'. + (html_printer::html_printer): Initialize `pointsize'. + +2002-07-26 Werner LEMBERG + + * doc/Makefile.sub (PROCESSEDEXAMPLEFILES): Remove gnu.eps and + gnu.png. + (CLEANNOTSRCDIRADD): Add gnu.eps and gnu.png. + (gnu.eps): Add -rle switch to pnmtops. + (distfiles): Add gnu.eps and gnu.png. + +2002-07-25 Petter Reinholdtsen + + * src/libs/libdriver/input.cc (Char): Add const to `operator=='. + Add `operator!='. + +2002-07-24 Werner LEMBERG + + * doc/Makefile.in, doc/Makefile.sub (groff_bin_path): Don't use + ' \+' but ' *' for sed. + (GROFF): Set GROFF_COMMAND_PREFIX to empty value. + +2002-07-23 Werner LEMBERG + + * doc/groff.texinfo: Document `papersize' keyword. + * NEWS, man/groff_font.man: Updated. + +2002-07-23 Colin Watson + + Extend papersize keyword to accept more than a single entry. The + first valid will be used. + + * src/libs/libgroff/font.cc (font::load_desc): Implement it. + (font::scan_papersize): Really skip final newline. + * src/preproc/html/pre-html.cc (get_papersize): Ditto. + +2002-07-23 Werner LEMBERG + + * configure.ac: Test for isatty. + * configure: Regenerated. + * src/include/posix.h: Check HAVE_ISATTY. + * src/roff/troff/input.cc [ISATTY_MISSING]: Removed. + * src/utils/lookbib/lookbib.cc: Include posix.h. + Don't declare isatty. + +2002-07-21 Werner LEMBERG + + * NEWS: Add `output' request. + + * REVISION: Increased to 1. + +Version 1.18.0 released +======================= + +2002-07-19 Gaius Mulley + + Allow internal glyph indices > 0xFF in grohtml for input characters. + + * src/devices/grohtml/post-html.cc (to_unicode): Use `unsigned int' + as parameter. + (html_printer::add_to_sbuf): Use `unsigned int' as first parameter. + Updated all callers. + (html_printer::sbuf_continuation, html_printer::overstrike): Ditto. + (html_printer): Updated. + +2002-07-19 Werner LEMBERG + + * font/devhtml/R.proto: Updated to HTML 4, adding many glyphs. + * font/devutf8/R.proto: Adding some missing glyphs. + * font/devutf8/NOTES: Updated. + + * tmac/dvi.tmac: Add more composite glyphs. + * tmac/html.tmac: Updated. + + * man/groff_char.man: Add `sum' and `product' entities. + + * NEWS: Updated. + +2002-07-18 Gaius Mulley + + Improved table, tab, and indenting support. + + * src/roff/troff/input.cc (file_iterator::suppress_newline_flag, + string_iterator::suppress_newline_flag): Removed. Updated all + function which have used it. + + * src/roff/troff/env.cc: Include `input.h'. + (environment::add_node): Accept 0 as parameter. + (environment::add_html_tag): Add `force' parameter. + Updated all callers. + (environment::add_html_tag_tabs): Ditto. + For the moment, support left-aligned tabs only. + (environment::make_html_tag): New function. + (fill, no_fill): Set .br html tag additionally. + (environment::newline): Emit `eol.ce' or `eol' tag for html. + (environment::add_html_tag_eol): Removed. + (tab_stops::distance_to_next_tab): Add variant for handling + nextpos'. + (environment::distance_to_next_tab): Ditto. + Updated all callers. + (environment::handle_tab): Handle tabs for html. + + * src/roff/troff/env.h: Updated. + + * src/roff/troff/div.cc: Updated all callers of + `environment::add_html_tag'. + + * src/devices/grohtml/html-table.cc, + src/devices/grohtml/html-table.h: New files. + + * src/devices/grohtml/html-text.cc (html_text): New members + `blank_para' and `start_space'. + (html_text::issue_tag): Don't emit TABLE_TAG. + Handle indentation for PRE_TAG and P_TAG. + (html_text::end_tag): Updated. + (html_text::table_is_void, html_text::issue_table_begin, + html_text::issue_table_end): Removed. + (html_text::do_push): Simplified. + [DEBUGGING]: Small fix. + (html_text::push_para): Add new parameter for indentation; updated + all callers. + Handle PRE_TAG. + (html_text::do_indent, html_text::do_table, html_text::done_table, + html_text::is_in_table): Removed. + (html_text::do_pre): Handle P_TAG also. + (html_text::shutdown): Handle p->indent. + (html_text::check_emit_text): Simplified. + (html_text::do_emittext): Reset `blank_para'. + (html_text::do_para): Add new parameter for indentation; updated + all callers. + (html_text::remove_indent): New function. + (html_text::do_space): Handle verbatim text properly. + (html_text::ever_emitted_text, html_text::starts_with_space, + html_text::remove_para_align): New functions. + (html_text::dump_stack_element, html_text::dump_stack): Updated. + + * src/devices/grohtml/html_text.h (HTML_TAG): Remove TABLE_TAG. + Updated. + + * src/devices/grohtml/post-html.cc: Include html-table.h. + (INDENTATION): Removed. + (text_glob): Added many `is_' functions. + Added table description `tab'. + Added `get_arg',`get_tab_args', `remember_table', and `get_table' + member functions. + (list): Add `insert' and `move_to' member functions. + (page): Add `insert_tag' member function. + (page::dump_page) [DEBUG_TABLES]: Improved. + (html_printer): Add `table' and `max_linelength' elements. + Add many `do_', `insert_', `next_horiz_pos', + `lookahead_for_tables', `shutdown_table', `calc_nf', `calc_po_in', + `remove_tabs', `remove_courier_tabs'. + (html_printer::emit_raw): Handle indentation. + (html_printer::do_center, html_printer::write_header): Updated. + (html_printer::is_courier_until_eol): Check for tag. + (html_printer::do_linelength): Handle max_linelength. + (html_printer::do_page_offset, html_printer::do_indentation): Handle + fill_on. + (html_printer::do_tempindent): Updated. + (html_printer::do_indentedparagraph): Removed. + (html_printer::do_indent): Simplified. + (html_printer::do_eol): Use `ever_emitted_text'. + (html_printer::do_flush, html_printer::do_links): Don't call + done_table. + (html_printer::do_break): Handle end_tempindent. + (html_printer::troff_tag): Get argument. + Don't handle `.ip'. + Handle `.tab-ts', `.tab-te', `.col', `tab', and `tab0' tags. + (html_printer::flush_page): Call `lookahead_for_tables'. + Don't call `done_table'. + (html_printer::add_to_sbuf): Always call do_indent. + + * src/devices/grohtml/Makefile.sub: Updated. + + * tmac/an-old.tmac (TP): Don't handle html device specially. + (an-do-tag-html): New function which will be used instead of + `an-do-tag' if html device is used. + + * tmac/html.tmac: Call .po to pass default page offset to grohtml. + + * tmac/s.tmac (@IP): Don't handle html device specially. + (@IP-html): New function which will be used instead of `@IP' if + html device is used. + + * tmac/www.tmac (HTML-NS, HTML-TAG-NS): New auxiliary macros -- this + is a hack which will eventually vanish again. + (PIMG): Handle `-C' option correctly if not html. + (HR): Use HTML-NS. + +2002-07-17 Werner LEMBERG + + * src/utils/afmtodit/afmtodit.pl: Don't use `-P-' for invoking perl. + +2002-07-14 Eric S. Raymond + + * contrib/pic2graph/pic2graph.*: Use convert(1). + * contrib/eqn2graph/eqn2graph.*: Minor fixes. + +2002-07-14 Bernd Warken + + * tmac/groff_trace.man: New file. + * tmac/Makefile.sub: Updated. + * NEWS: Updated. + +2002-07-13 Werner LEMBERG + + * src/roff/groff/groff.man: Add some cross references. + +2002-07-12 Werner LEMBERG + + * src/roff/troff/input.cc (substring_request): Add warnings for + string indices out of range. + +2002-07-11 Werner LEMBERG + + * font/devdvi/generate/ec.map: Fix typo (`(l' -> `/l'). + * font/devdvi/*EC: Regenerated. + +2002-07-10 Bernd Warken + + * man/groff_char.man: Updated and extended. + +2002-07-10 Werner LEMBERG + + * src/roff/troff/input.cc (length_macro): Renamed to... + (length_request): This. + Move call of `tok.next()' to the very end, otherwise the register + value hasn't been updated yet. + (init_input_requests): Updated. + +2002-07-09 Werner LEMBERG + + * src/roff/troff/input.cc (substring_macro): Renamed to... + (substring_request): This. + (init_input_requests): Updated. + * src/roff/troff/request.h: Updated. + +2002-07-08 Robert D. Goulding + + * src/roff/grog/grog.sh: Fix typo. + +2002-07-08 Werner LEMBERG + + * win32-diffs: Updated. + + Handle `papersize' keyword properly in DESC. + + * src/libs/libgroff/font.cc (font::scan_papersize): Fix argument + type. + Updated all callers. + * src/libs/libgroff/paper.cc: Add four more paper formats used by + grolj4. + * src/include/paper.h: Updated. + + * src/devices/grolbp/lbp.cc: Remove unnecessary semicolons. + Other minor C syntax fixes. + (papersize, paperlength, paperwidth): Renamed to `user_*'. + (lbp_printer): Add `papersize', `paperlength', and `paperwidth' + members. + (lbp_printer::lbp_printer): Pass three arguments. + Set paper dimensions properly. + (make_printer, main): Updated. + (handle_unknown_desc_command): Fix error messages. + (main): Handle papersize keyword in DESC properly. + + * src/devices/grolj4/lj4.cc (paper_size): Renamed to + `user_paper_size'. + (lbp_printer::lbp_printer): Pass an argument. + Set paper_size properly. + (handle_unknown_desc_command): Removed. + (make_printer, main): Updated. + * src/devices/grolj4/grolj4.man: Minor documentation fix. + + * man/groff_font.man, NEWS: Updated. + +2002-07-07 Werner LEMBERG + + Integrated eqn2graph, contributed by Eric S. Raymond. + + * contrib/eqn2graph/{Makefile.sub, eqn2graph.sh, eqn2graph.man}: New + files. + * Makefile.in, NEWS: Updated. + +2002-06-04 Werner LEMBERG + + Changing the substring request to make it fit better with other + string manipulation functions in other programming languages: + Index 0 is now the first character in the string, and index -1 + indicates the last character. Since this request didn't work + properly anyway in the last release, it doesn't harm too much to + change the syntax. + + * src/roff/troff/input.cc (substring_macro): Use loops to get + the real string length (ignoring COMPATIBLE_SAVE and + COMPATIBLE_RESTORE) and offsets. + Implement change described above. + + * man/groff_char.man, tmac/doc-common (doc-header), tmac/doc.tmac + (doc-do-Bd-args, doc-do-Bl-args): Changed accordingly. + + * NEWS, doc/groff.texinfo, man/groff_diff.man: Updated. + +2002-06-03 Werner LEMBERG + + Make .chop work with .de1 and friends. COMPATIBLE_SAVE and + COMPATIBLE_RESTORE are completely ignored. + + * src/roff/troff/input.cc (char_list::set, char_list::get): New + functions. + (macro): `length' field renamed to `len'. + Added new field `empty_macro' (1 if macro is empty), to be used + instead of checking `len'. + Updated all callers. + (macro::empty): Updated. + (macro::length, macro::set, macro::get): New functions. + (macro::append): Ignore COMPATIBLE_SAVE and COMPATIBLE_RESTORE. + Set `empty_macro'. + (chop_macro): Check and remove trailing COMPATIBLE_SAVE/ + COMPATIBLE_RESTORE pairs. + (asciify): Ignore COMPATIBLE_SAVE and COMPATIBLE_RESTORE. + * src/roff/troff/request.h: Updated. + + * doc/groff.texinfo: Document .chop's behaviour better. + +2002-06-02 Werner LEMBERG + + * doc/pic.ms: Fix documentation for the addition of positions. + + * tmac/doc.tmac, tmac/an-old.tmac: Need groff version 1.18. + +2002-06-29 Werner LEMBERG + + Implementation of string arguments of the form \*[foo arg1 arg2 ...] + + * src/roff/troff/input.cc (have_string_arg): New global variable. + (read_mode): New enumeration. + (read_escape_name): Use it. Update all calls. + (read_long_escape_name): Use it. Update all calls. + Set have_string_arg if appropriate. + (get_char_for_escape_name): Add parameter for handling space + character. + (interpolate_string_with_args, decode_string_args): New functions. + (get_copy, token::next): Call it if necessary. + (interpolate_string): Fix error message. + + * NEWS, doc/groff.texinfo, man/groff.man, man/groff_diff.man: + Document it. + +2002-06-24 Bernd Warken + + * man/groff_tmac.man: Updated and extended. + +2002-06-24 Werner LEMBERG + + * doc/pic.ms, src/preproc/pic/pic.man: Fix description of `:='. + +2002-06-23 Werner LEMBERG + + * doc/pic.ms: Improve documentation of composite block objects. + +2002-06-22 Werner LEMBERG + + * src/roff/troff/input.cc (init_registers): Add three registers + `seconds', `minutes', and `hours' to hold the current time. + + * NEWS, doc/groff.texinfo, man/groff.man, man/groff_diff.man: + Updated. + +2002-06-20 Werner LEMBERG + + Make \X accept both `\ ' and `\~', converting them to single space + characters. + + * src/roff/troff/token.h (token): Add TOKEN_UNSTRETCHABLE_SPACE. + (token::unstretchable_space): New inline function. + * src/roff/troff/input.cc (token::next, token::delimiter, + token::description, token::add_to_node_list, token::process): Handle + TOKEN_UNSTRETCHABLE_NODE. + (encode_char): Handle tok.stretchable_space and + tok.unstretchable_space. + + * NEWS, doc/groff.texinfo: Document it.. + +2002-06-19 Werner LEMBERG + + * src/devices/grops/ps.cc (ps_printer::special): Fix error message. + + * src/devices/grotty/tty.cc (tty_printer::special): Add `sgr' + keyword to enable/disable SGR output. + (tty_printer::change_fill_color): New function. + * NEWS, src/devices/grotty/grotty.man: Document `sgr' special. + + * src/roff/troff/input.cc (output_request): Add missing `tok.next()' + call. + +2002-06-18 Werner LEMBERG + + Add a `color' request and a `.color' register to control usage of + colours. + + * src/roff/troff/input.cc (disable_color_flag): Replaced with... + (color_flag): This (which is the inverse). + (activate_color): New function. + (main, init_input_requests): Updated. + * src/roff/troff/troff.h, src/roff/troff/node.cc + (troff_output_file::fill_color, troff_output_file::glyph_color): + Updated. + + * NEWS, doc/groff.texinfo, man/groff_diff.man, man/groff.man: + Document the changes. + +2002-06-17 Colin Watson + + Circumvent bug in autoconf 2.53 regarding top_builddir. + + * aclocal.m4 (GROFF_BUILDDIR): s/top_builddir/groff_top_builddir/. + * Makefile.in, doc/Makefile.in: + s/@top_builddir@/@groff_top_builddir@/. + * configure: Regenerated (with autoconf 2.53). + +2002-06-17 Werner LEMBERG + + * src/libs/libgroff/font.cc (font::load_desc): Fix computation of + `paperwidth' and `paperlength' for the `papersize' keyword. + +2002-06-16 P. Alejandro Lopez-Valencia + + * src/devices/grops/grops.man: Add info about Type 42 fonts. + +2002-06-15 Gaius Mulley + + * src/devices/grohtml/post-html.cc (html_printer::emit_raw, + html_printer::do_linelength, html_printer::do_pageoffset, + html_printer::do_indentation, html_printer::do_tempindent, + html_printer::do_break, html_printer::begin_page): Clear indented + text. + * tmac/html.tmac: Disable hyphenation. + +2002-06-15 Werner LEMBERG + + Don't produce HTML files if utility programs are missing. + + * Makefile.in (make_html, make_install_html): New variables. + (MDEFINES): Updated. + + * aclocal.m4 (GROFF_HTML_PROGRAMS): New function to test for HTML + utility programs. + * configure.ac: Use it. + * configure: Regenerated. + + * doc/Makefile.sub (PROCESSEDEXAMPLEFILES): Move webpage.html to... + (HTMLEXAMPLESFILES): This new variable. + (EXAMPLESIMAGEFILES): Renamed to... + (HTMLEXAMPLEIMAGEFILES): This. + (CLEANADD): Add HTMLEXAMPLEFILES. + (all): Use `make_html'. + (html): New target. + (install_data): Use `make_install_html'. + Move html stuff to... + (install_html): This new target. + (uninstall_sub): Updated. + +2002-06-14 Bernd Warken + + * src/roff/grog/Makefile.sub (grog): Renamed to... + (grog.old): This. + (grog): New rule to always install grog.sh as grog. + +2002-06-08 Bernd Warken + + * src/roff/grog/grog.pl: Fix typo. + +2002-06-07 Werner LEMBERG + + * doc/groff.texinfo: Add more info on .tr arguments. + +2002-06-05 Werner LEMBERG + + * NEWS, src/roff/grog/grog.man, doc/groff.texinfo: Updated. + + * aclocal.m4 (GROFF_MKSTEMP): Include unistd.h. + * configure: Regenerated. + +2002-06-05 Ralph Corderoy + + * src/roff/troff/symbol.cc (table_sizes): Add more values. + + * src/roff/grog/grog.pl, src/roff/grog/grog.sh: Recognize mom. + +2002-06-04 Werner LEMBERG + + * aclocal.m4 (GROFF_PAGE): Don't use `prefix' directly since it + is not initialized at the time we need it in case `--prefix' hasn't + been set. Check for `ac_default_prefix' also. + Test for `papersize' keyword also and generalize allowed whitespace. + * configure: Regenerated. + + * font/devps/Makefile.sub (DESC): Use `papersize' instead of + `paperlength'. + + * src/libs/libgroff/Makefile.sub (version, revision): Replaced + with... + (src_version, src_revision): New variables to avoid overwriting + from parent make process. + (version.cc): Updated. + + * src/preproc/html/pre-html.cc: Include paper.h and font.h. + (linebuf, linebufsize): New global variables. + (sys_fatal): Use `fatal' to abort properly. + (get_line): New function. + (get_resolution): Use it. + Improve error messages. + (get_papersize): Check `papersize' also. + Use `get_line'. + Improve error messages. + +2002-06-03 Werner LEMBERG + + * Makefile.comm (CLEANNOTSRCDIRADD): New target for files which + should be removed only if builddir is not srcdir. + (mostlyclean): Handle `CLEANNOTSRCDIRADD'. + (clean): Depend on `mostlyclean'. + (distclean): Depend on `clean'. + (realclean, extraclean): Depend on `distclean'. + (.y.cc, .y.o): Simplified. The output files are no longer written + to srcdir but to builddir. + * Makefile.in (MDEFINES): Add `version' and `revision'. + (uninstall_dirs): Fix order of directories. + * doc/Makefile.sub (version, revision): Removed. + (CLEANADD): Removed grnexmpl.g, groff, groff-*. + Added `HTMLDOCFILES'. + (CLEANNOTSRCDIRADD): New target for grnexmpl.h, groff, groff-*. + * src/preproc/eqn/Makefile.sub, src/preproc/pic/Makefile.sub, + src/preproc/refer/Makefile.sub (YTABC, YTABH): Don't use `srcdir' + as prefix. + + * doc/texinfo.tex (\authortt): New macro. + (\shortcontt): Define. + (\titlepage): Set \tt to \authortt while defining \authorfont. + (\appendixbox): New macro. + (\chapmacro, \appendixentry): Use \appendixbox to get even + indentation for letters. + (\summarycontents): Set \tt. + (\internalpagesize): Add two arguments for real paper width and + height as needed by pdfTeX. + (\letterpaper, \smallbook, \afourpaper, \afivepaper, \afourlatex): + Updated. + (\tempdima, \tempdimb): New temporary dimensions. + (\pagesizesyyy): Updated. + +2002-06-02 Werner LEMBERG + + Adding a new keyword `papersize' to the DESC file format (similar + but not completely identical to grolbp's extension). grops now has + a -p command line option to override `papersize'. Finally, grolbp + has been adapted to the new syntax. + + * src/libs/libgroff/paper.cc, src/include/paper.h: New files. It + defines and initializes the `papersizes[]' array with NUM_PAPERSIZES + elements. + * src/libs/libgroff/Makefile.sub (OBJS): Add `paper.o'. + (CCSRCS): Add `paper.cc'. + + * src/include/font.h (font): Add `papersize' element. + * src/libs/libgroff/font.cc (font::unit_scale): New helper function. + (font::scan_papersize): New function. + (font::load_desc): Use it for handling `papersize' keyword. + * src/libs/libgroff/fontfile.cc: Initialize `font::papersize'. + + * src/devices/grops/ps.cc: Include paper.h. + (user_paper_length): New global variable. + (ps_printer): Use paper length as initializer. + (make_printer): Updated. + (main): Handle new `-p' option. + * src/devices/grops/grops.man: Updated. + + * src/devices/grolbp/lbp.cc: Include paper.h. + s/papersizes/lbp_papersizes/. + (set_papersize): Use new `papersizes' array. + (handle_unknown_desc_command): Don't handle `papersize'. + (main): Use `font::scan_papersize' for handling `-p' option. + * src/devices/grolbp/grolbp.man: Updated. + + * man/groff_font.man: Document `papersize'. + * NEWS: Updated. + +2002-05-30 Werner LEMBERG + + * src/devices/grops/TODO: Updated. + * src/devices/grops/grops.man: More info on paper formats. + * man/groff_font.man: Document `paperheight' and `paperwidth'. + +2002-05-29 Werner LEMBERG + + * doc/Makefile.sub (CLEANADD): Add grnexmpl.g, groff, and groff-* + to list only if srcdir != currdir. + (distfiles): New target. + + * Makefile.in (EXTRADIRS): Add font/devlj4/generate. + (NOMAKEDIRS): New variable. + (DISTDIRS): Use it. + +2002-05-26 Werner LEMBERG + + Add .output request, similar to \! at top-level. + + * src/roff/troff/input.cc (transparent): Remove unused declaration. + (output_request): New function. + (init_input_requests): Add it. + Sorted. + * NEWS, doc/groff.texinfo, man/groff_diff.man, man/groff.man: + Document it. + + * Makefile.in (MDEFINES): Add INSTALL_INFO. + (prepare_examples): Fix typo. + * doc/groff.texinfo (@direntry): Fix it. + +2002-05-25 Werner LEMBERG + + Including the doc subdir into groff's Makefile system. + + * aclocal.m4 (GROFF_INSTALL_INFO): New function. + * configure.ac: Use it. + Generate `doc/Makefile'. + * configure: Regenerated. + + * Makefile.in (infodir, INSTALL_INFO): New variables. + (MDEFINES, uninstall_dirs): Updated. + (OTHERDIRS): Add `doc'. + * Makefile.comm (CLEANDIRADD): New variable. + (mostlyclean): Use it. + + * doc/Makefile.sub, doc/Makefile.in: New files. + * doc/Makefile: Removed. + + * NEWS, INSTALL: Updated. + +2002-05-24 Werner LEMBERG + + * doc/homepage.ms: Renamed to ... + * doc/webpage.ms: This. + Use `.NHR'. + +2002-05-23 Werner LEMBERG + + Integrating the `mom' macro package, contributed by Peter Schaffter + . + + * contrib/mom/*: New subdirectory tree. + * Makefile.in (docdir, exampledir, htmldocdir): New variables to + be used for documentation files. + (MDEFINES, uninstall_dirs): Use them. + (OTHERDIRS): Add contrib/mom. + * Makefile.comm (.man.n): Add @DOCDIR@, @EXAMPLEDIR@, and + @HTMLDOCDIR@. + * MANIFEST, NEWS: Updated. + +2002-05-22 Gaius Mulley + + Change syntax of \O: \O[0] suppresses output, \O[1] enables output + if at outer level; at start-up we are at outer level. + + * src/roff/troff/input.cc (do_suppress): Implement it. + Simplify \O[3]. + + Add option -p to show progress information. + pre-grohtml will now render only one page at a time, reducing the + size of needed disk resources enormously. + + * src/preproc/html/pre-html.cc (imagePageStem): Replaced with... + (imagePageName): New global variable. + (psPageName, show_progress, currentPageNo): New global variables. + (html_system): Close saved stderr and stdout handles. + (write_end_image): Accept a parameter to control \O escape. + (write_start_image): Adapted to new \O meaning. + (char_buffer::write_upto_newline): Updated. + (createAllPages): Replaced with... + (createPage): This new function to create a single page for images. + It uses `psselect' from the psutils package. + (removeAllPages): Removed. + (createImage): Updated. + Handle progress display. + (char_buffer::do_html, char_buffer::do_image) [DEBUGGING]: Removed. + (scanArguments): Add option -p. + (makeTempFiles): Updated to create temp files for psPageName and + imagePageName. + (removeTempFiles): Removed. + (main): Updated. + + * src/devices/grohtml/post-html.cc (header_desc::write_headings, + html_printer::write_header): Append `\0' to `buffer'. + (html_printer::do_eol): Depend on `current_paragraph->emitted_text'. + (main): Handle -p. + * src/devices/grohtml/html-text.cc (html_text::dump_stack_element): + Handle `text_emitted'. + (html_text::table_is_void): Slightly rewritten. + (stop): New external symbol. + (html_text::do_push) [DEBUGGING]: Use it and simplify. + (html_text::shutdown): Call `dump_stack'. + (html_text::do_space): Rewritten. + * src/devices/grohtml/grohtml.man: Document -p and the need of + `psselect'. + + * tmac/www.tmac (DC, HTML-DO-IMAGE, HTML-IMAGE-END): Updated to + new \O syntax. + Call \O[0] if `ps4html' is active. + * tmac/s.tmac (@EQ, @EN): Handle html better. + (@TS, TE): Ditto. + * tmac/html.tmac: Don't use black for background colour. + + * src/roff/troff/node.cc: Include `div.h'. + (troff_output_file::really_print_line): Don't use `is_on'. + (troff_output_file::word_marker, troff_output_file::flush_tbuf + troff_output_file::check_charinfo, + troff_output_file::put_char_width, troff_output_file::put_char, + troff_output_file::determine_line_limits, troff_output_file::draw, + real_output_file::begin_page, glyph_color_node::tprintf, + fill_color_node::tprint, hline_node::tprint, vline_node::tprint): + Use `is_on'. + (troff_output_file::really_on): Call `do_motion'. + (suppress_node::tprint): Use `get_page_number' instead of `%' + register. + Call `reset_output_registers' conditionally on `is_on'. + + * doc/groff.texinfo: Document new syntax of \O. + * NEWS, man/groff_diff.man: Updated. + +2002-05-22 Werner LEMBERG + + * MORE.STUFF: Add info about David Frey's deroff implementation. + Mention troff.org. + +2002-05-16 Werner LEMBERG + + Pic's `with' attribute now accepts positions. + + * src/preproc/pic/pic.y: Make `.', BOX, CIRCLE, ELLIPSE, ARC, LINE, + ARROW, SPLINE, and `[' left-associative tokens to fix shift/reduce + conflicts. + (object_spec): Add rule for `WITH' and `position'. + (relative_path): Give `corner' the precedence of `CHOP'. + * src/preproc/pic/object.h (path): New members `pos' and + `is_position'. + * src/preproc/pic/object.cc: Updated initializers of `path'. + (path::follow): Handle `is_position'. + + * doc/pic.ms: Completely updated grammar description. + Many typographical improvements. + +2002-05-15 Werner LEMBERG + + * src/roff/troff/env.cc(hyphen_trie::hpf_getc): Accept ^^x (char + code of x in range 0-127) also. + * doc/groff.texinfo, man/groff_diff.man: Updated. + + Added keywords `north', `south', `east', and `west' for corners + in pic. + + * src/preproc/pic/lex.cc (lookup_keyword): Add NORTH, SOUTH, EAST, + and WEST. + (yylex): Handle them. + * src/preproc/pic/pic.y: Add tokens NORTH, SOUTH, EAST, and WEST. + (corner): Handle them. + +2002-05-14 Werner LEMBERG + + * src/devices/grops/grops.man: Clarify handling of `download' file. + +2002-05-11 Werner LEMBERG + + Adding `warnscale' and `spreadwarn' requests, based on a patch from + Jeffrey Friedl . + + * src/roff/troff/input.cc (spread_limit, warn_scale, + warn_scaling_indicator): New global variables. + (warnscale_request, spreadwarn_requests): New functions. + (main): Initialize `warn_scale' and `warn_scaling_indicator'. + (init_input_requests): Updated. + (error_type): Add `OUTPUT_WARNING'. + (do_error): Handle it. + (output_warning): New warning function which shows output location. + * src/roff/troff/env.h (spread_limit): New external variable. + * src/roff/troff/env.cc (environment::choose_breakpoint): Use + `output_warning'. + (distribute_space): Emit warning if added space is larger than + `spread_limit'. + (environment::possibly_break_line): Emit warning if a line can't + be adjusted on both sides. + + * doc/groff.texinfo, man/groff_diff.man, man/groff.man: Document it. + +2002-05-08 Werner LEMBERG + + * src/roff/troff/node.cc (special_node::special_node): Use + env_definite_font(curenv) instead of curenv->get_font(). Otherwise + \X''\% crashes, for example. + + * doc/groff.texinfo: Document \! and \? used at top-level. + +2002-05-06 Werner LEMBERG + + * src/preproc/pic/pic.man: Fix some keyword syntax. + Other minor typographical fixes. + + * src/roff/groff/groff.man: Fix typos. + +2002-05-04 Werner LEMBERG + + * src/roff/groff/groff.man ([ShortOpt]): Renamed to... + (ShortOpt[]): This to avoid problems with refer. + + * doc/pic.ms: Fix typo. + Fix pic grammar description. + + * tmac/an-old.tmac (ne): Use de1, not de. + +2002-05-03 Werner LEMBERG + + * doc/groff.texinfo: Finished separation of glyphs and characters. + Don't use the string `Appendix' for appendix headers (both in + the text and the table of contents). + * man/groff_tmac.man, src/roff/troff/troff.man: Fix order of tmac + directories. + + Use registers LL and LT (similar to -ms) for controlling the + length of title and line, respectively, in the -man and -mdoc + macro packages. + + * tmac/doc-ditroff (doc-setup-page-layout), tmac/doc-nroff + (doc-setup-page-layout): Use \n[LL] and \n[LT]. + * tmac/an-old.tmac: Set \n[LL] and \n[LT] if not defined. + (TH): Use \n[LL]. + (an-header, an-p-footer): Use \n[LT]. + * NEWS, tmac/groff_man.man, tmac/groff_mdoc.man, + doc/groff.texinfo: Document it. + +2002-05-02 Werner LEMBERG + + * doc/fdl.texi: New file. + * doc/groff.texinfo: Include it. + Define and use @copying. + Starting with separating glyph, symbol, and character. + +2002-04-27 Werner LEMBERG + + * Makefile.in (EXEEXT): Set it. + * src/*/Makefile.sub (PROG): Add $(EXEEXT) for all non-script + programs. + + * src/include/nonposix.h: Define GS_NAME. + * src/preproc/html/pre-html.cc (createAllPages): Use GS_NAME. + + Some preliminary changes for EMX support under OS/2. + + * src/preproc/pic/main.cc (main), src/roff/groff/pipeline.c: Add + __EMX__ similar to __MSDOS__. + * src/utils/indxbib/indxbib.cc (main) [__EMX__]: Use `unlink'. + +2002-04-25 Werner LEMBERG + + * doc/groff.texinfo: Integrated groff_out.man. + Some macro fixes. + +2002-04-23 Werner LEMBERG + + * man/groff_out.man: Minor fixes. + +2002-04-23 Werner LEMBERG + + * doc/groff.texinfo: Moving @cindex entries after @Def* to get + correct page references. + Fixed many index entries. + +2002-04-23 Bernd Warken + + * man/roff.man: Enlarged. + +2002-04-22 Werner LEMBERG + + * doc/groff.texinfo: More examples, other fixes. + +2002-04-20 Werner LEMBERG + + * src/roff/troff/input.cc (pipe_output): Multiple calls to `pi' + will now form a chain, e.g. + + .pi foo + .pi bar + + is now the same as + + .pi foo | bar + + This is for compatibility with plan 9's troff. + + * tmac/tty.tmac: Set default tab values to 0.8i to be compatible + with UNIX troff. + * NEWS: Updated. + + * doc/groff.texinfo: Add documentation of remaining requests and + registers. + +2002-04-19 Werner LEMBERG + + * doc/groff.texinfo: Add documentation of remaining escapes. + + * font/devdvi/generate/tc.map: Remove entry for `sr'. + * font/devdvi/*TC: Regenerated. + +2002-04-18 Werner LEMBERG + + * src/roff/troff/input.cc (token::next): Make \H behave consistently + if not in compatibility mode, i.e., increment relative to the + previous height. + * doc/groff.texinfo: Updated accordingly. + +2002-04-17 Werner LEMBERG + + * doc/groff.texinfo: Document \\, \e, \E, \., and \c. + +2002-04-16 Bernd Warken + + * src/roff/groff/groff.man: Improve documentation of -P option. + Other minor fixes. + +2002-04-15 Werner LEMBERG + + Add new escape \F to switch font family. + + * src/roff/troff/input.cc (token::next): Handle \F. + * src/roff/troff/env.cc (environment::set_family): Handle + `interrupted' flag. + * NEWS, doc/groff.texinfo, man/groff_diff.man, man/groff.man: + Document it. + +2002-04-14 Werner LEMBERG + + * tmac/doc.tmac (doc-tag-list): Use \Z to avoid stretching of + spaces in tags. + +2002-04-13 Werner LEMBERG + + Implement \f[] as an alternative to \fP. Change \mP and \MP to + \m[] and \M[], respectively. + + * src/roff/troff/symbol.cc (EMPTY_SYMBOL): New global variable. + (symbol::symbol): Handle NULL string and empty string differently. + * src/roff/troff/symbol.h (symbol::is_empty): New inline function. + * src/roff/troff/input.cc (read_escape_name, read_long_escape_name): + Add optional parameter. + Updated calling functions. + (get_copy, do_glyph_color, do_fill_color, token::next): Use + `symbol::is_empty'. + * src/roff/troff/env.cc (environment::set_font): Ditto. + + * src/preproc/pic/troff.cc (troff_output::set_fill, + troff_output::reset_color: Updated. + + * tmac/www.tmac: Updated. + + * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo, + doc/homepage.ms, src/devices/grotty/grotty.man, tmac/groff_www.man: + Updated. + + * tmac/Xps.tmac: Remove some redundant code. + + * tmac/doc-common, tmac/doc-ditroff, tmac/doc-nroff, tmac/doc.tmac, + tmac/dvi.tmac, man/roff.man, man/groff_out.man, man/groff.man, + man/groff_diff.man, src/roff/groff/groff.man: Replace \f[P] with + \f[]. + +2002-04-13 Bernd Warken + + * src/include/printer.h, src/libs/libdriver/printer.cc + (printer::change_fill_color): New member function. + * src/libs/libdriver/input.cc (parse_D_command): Use it. + +2002-04-12 Werner LEMBERG + + * doc/groff.texinfo: Completed pass on gtroff reference. + +2002-04-11 Werner LEMBERG + + * doc/groff.texinfo: More fixes. + +2002-04-11 Bernd Warken + + * src/include/color.h: Decorate with `const'. + Use `size_t'. + Include `stddef.h'. + * src/libs/libgroff.color.cc: Decorate with `const'. + Use `size_t'. + (color::color): Initialize members. + * src/libs/libdriver/input.cc (parse_D_command): Handle `f' + command according to the documentation. + + * man/groff_out.man: Updated. + Minor fixes. + +2002-04-11 Gaius Mulley + + * src/preproc/html/pre-html.cc (write_start_image): Remove + redundant output. + * tmac/www.tmac (DC, HTML-DO-IMAGE): Ditto. + + * src/devices/grohtml/post-html.cc (page::add_and_encode): Using + \C'hy' caused an assertion failure. + + * src/roff/troff/env.cc (environment::environment): Initialize + `emitted_node'. + (environment::copy): Handle `ignore_next_eol' and `emitted_node'. + +2002-04-10 Werner LEMBERG + + * man/groff_diff.man, man/groff.man, NEWS, doc/groff.texinfo: + Document pvs request and .pvs register. + +2002-04-09 Werner LEMBERG + + * doc/groff.texinfo: Improve and fix documentation of diversions + and environments. + +2002-04-08 Werner LEMBERG + + * doc/groff.texinfo: Fix documentation of drawing functions. + Other minor fixes. + +2002-04-07 Werner LEMBERG + + * doc/groff.texinfo: Better documentation of double quotes as + arguments. + Other minor fixes. + +2002-04-06 Werner LEMBERG + + * man/groff_font.man: Document names of special characters better. + * doc/groff.texinfo: Minor improvements. + + * tmac/lbp.tmac: Load latin1.tmac. + * tmac/X.tmac, tmac/Xps.tmac: Load latin1.tmac or cp1047.tmac. + + * font/devX*/*: Regenerated (all chars > 0x80 removed). + +2002-04-05 Werner LEMBERG + + * tmac/tty.tmac: Don't use shc request. + * tmac/latin1.tmac, tmac/cp1047.tmac: Translate soft hyphen to `\%'. + * NEWS: Updated. + + * man/groff_diff.man: Minor fixes. + + * font/devlbp/*: Remove all `charXXX' entities. + + * src/libs/libgroff/font.cc (font::~font): Deallocate + `special_device_coding'. + (font::load): Use `new' for allocating `special_device_coding'. + * src/libs/libgroff/nametoindex.cc (character_indexer::lookup_char): + Removed unused member. + +2002-04-05 Werner LEMBERG + + * src/drivers/grops/psrm.cc (skip_possible_newline): New function. + (resource_manager::do_begin_binary, + resource_manager::do_begin_data): Use it. + + * doc/texinfo.tex: Updated to version 4.2. + + * src/roff/troff/token.h: Add TOKEN_ZERO_WIDTH_BREAK for `\:'. + (token::zero_width_break): New inline function. + * src/roff/troff/input.cc (token::next): Use it. + (token::description): Updated. + (encode_char): Ignore `\%', `\&', `\)', and `\:'. + (token::add_to_node_list, token::process): Use it. + * NEWS, doc/groff.texinfo: Updated. + + * src/preproc/eqn/over.cc (over_box::output): Fix typo. + * tmac/tty.tmac: Add missing backslash. + +2002-04-04 Tadziu Hoffmann + + * src/preproc/eqn/box.cc (set_script_size, box::top_level): Use + `.ps' register instead of `.s' to handle fractional point sizes. + * src/preproc/eqn/limit.cc (limit_box::compute_metrics, + limit_box::output): Ditto. + * src/preproc/eqn/other.cc (size_box::compute_metrics, + size_box::output): Ditto. + * src/preproc/eqn/over.cc (over_box::compute_metrics, + over_box::output): Ditto. + * src/preproc/eqn/script.cc (script_box::compute_metrics, + script_box::output): Ditto. + * src/preproc/eqn/sqrt.cc (sqrt_box::compute_metrics, + sqrt_box::output): Ditto. + +2002-04-03 Michael Selway + + * src/drivers/grops/psrm.cc (resource_manager::do_begin_binary): + Fix typo. + +2002-04-03 Werner LEMBERG + + * doc/homepage.ms: Reduce title size. + * doc/groff.texinfo: Fix documentation of .t register. + Fix handling of colon. + Fix `\' vs. `\\'. + + * src/roff/troff/input.cc (exit_troff): Emit LAST_PAGE_EJECTOR + only if page length is positive to avoid a loop. + + * tmac/an-old.tmac (ne): Increase page length to avoid problems with + tbl. + +2002-04-02 P. Alejandro Lopez-Valencia + + * src/include/nonposix.h, src/roff/groff/pipeline.c: + s/__CYGWIN32__/__CYGWIN__/. + +2002-03-28 Gaius Mulley + + * doc/gnu.xpm: New image contributed by Emily Mulley. + * doc/Makefile (gnu.eps, gnu.png): Use pnmdepth. + (homepage.html): Be dependent on gnu.eps. + * doc/homepage.ms: Updated to new image. + + * src/devices/grohtml/post-html.cc (html_printer): New member + `sbuf_prev_hpos'. + (html_printer::flush_sbuf, html_printer::set_char): Set it. + (html_printer::sbuf_continuation): Use it. + +2002-03-28 Werner LEMBERG + + * src/libs/libgroff/getopt.c: Updated to latest version. + + * tmac/README: More on hyphen.tex license. + +2002-03-26 Larry Kollar + + * doc/groff.texinfo: Add documentation of most missing requests. + +2002-03-25 Werner LEMBERG + + Add three glyphs `t+-', `tmu', and `tdi' which are textual variants + of `+-', `mu', and `di', respectively. + + * font/devascii/R.proto, font/devutf8/R.proto, + font/devlatin1/R.proto, font/devhtml/R.proto, + font/devcp1047/R.proto, font/devlpb/*: Add them. + * font/devps/generate/textmap: Ditto. + * font/devps/*: Regenerated. + * font/devlj4/generate/text.map: Add them. + * font/devlj4/*: Regenerated. + * font/devdvi/generate/tc.map: Use them. + * font/devdvi/generate/texsy.map: Add them. + * font/devdvi/*: Regenerated. + * font/devX*/*: Regenerated. + + * tmac/latin1.tmac, tmac/cp1047.tmac, tmac/tty.tmac, + tmac/tty-char.tmac: Updated. + + * NEWS, man/groff_char.man: Updated. + +2002-03-24 Werner LEMBERG + + * tmac/dvi.tmac, tmac/X.tmac, tmac/ps.tmac, tmac/html.tmac, + tmac/lj4.tmac, tmac/tty.tmac: Replace most `.char' with `.fchar'. + * tmac/ec.tmac: Remove `.rchar' calls (no longer necessary since + we use `.fchar' in dvi.tmac. + * tmac/dvi.tmac: Improve definition of \[Fo] and \[Fc]. + * tmac/Xps.tmac: Simplify some char definitions. + Add definition for \[f/]. + * man/groff_char.man: Updated for new X.tmac. + + * tmac/README: New file. + +2002-03-23 Phil Lobbes + + * Makefile.comm (.y.o): New rule for make on Solaris 2.5.1 -- the + internal .y.o rule took precendence over the .y.cc rule, compiling + the yacc files with gcc instead of g++. + +2002-03-23 Werner LEMBERG + + * tmac/dvi.tmac: Add replacement font for `CB'. + + * tmac/doc.tmac: s/request/macro/ in messages. + (doc-generic-macro): Improve error message. + * tmac/groff_mdoc.man: Minor improvements. + +2002-03-22 Werner LEMBERG + + * doc/groff.texinfo: Document possible conflict between `tr' and + `char' requests. + +2002-03-21 Werner LEMBERG + + Improve handling of hyphenation patterns. It is now possible to + use most of TeX's pattern files unmodified. To make the process + more flexible, a new request `hpfcode' has been added which + provides a character code mapping for the `hpf' request. See + comment before hpf_getc() for more details. + + * src/roff/troff/env.cc (insert_hyphenation, hpf_getc): New + functions. + (read_patterns_file): Additional parameter for exception dictionary. + Extended to recognize \pattern, \hyphenation, and \endinput. + (do_hyphenation_patterns_file): Updated. + * src/roff/troff/env.h (hpf_code_table): New extern. + + * src/roff/troff/input.cc (hpf_code_table): New array. + (init_hpf_code_table, hyphenation_patterns_file_code): New + functions. + (hyphenation_code): Handle translation from `trin' correctly. + (main, init_input_requests): Updated. + (charinfo::set_translation): Handle hyphenation code also. + + * src/roff/troff/charinfo.h (charinfo::get_translation_input): New + inline function. + + * src/roff/troff/env.cc (WORD_MAX): Reduced to 256 since `unsigned + char' is used for offsets in hyphenation exceptions. + + * tmac/hyphen.us: Replace with contents of unmodified `hyphen.tex'. + + * NEWS, man/groff_diff.man, man/groff.man: Document it. + +2002-03-20 Larry Kollar + + * doc/groff.texinfo: Add documentation for `hpfa' and `trin' + requests. + +2002-03-18 Werner LEMBERG + + * tmac/html.tmac: Fix serious typo. + +2002-03-17 Larry Kollar + + * doc/groff.texinfo: Add documentation for `writec' request. + +2002-03-17 Werner LEMBERG + + Added request `hpfa' to append hyphenation patterns. + + * src/roff/troff/env.cc (hyphen_trie::read_patterns_file): Add + parameter `append'. + (hyphenation_patterns_file): Renamed to... + (do_hyphenation_patterns_file): This. + (hyphenation_patterns_file, hyphenation_patterns_file_append): New + functions. + (init_hyphen_requests): Updated. + * NEWS, man/groff.man, man/groff_diff.man: Document it. + +2002-03-16 Werner LEMBERG + + Added request `writec' in analogy to `tmc'. + + * src/roff/troff/input.cc (write_request): Renamed to... + (do_write_request): This. + Added one parameter. + (write_request, write_request_continue): New functions. + (init_input_requests): Updated. + * NEWS, man/groff.man, man/groff_diff.man: Document it. + + * font/devdvi/DESC.in (sizes): Allow all sizes in the range + 5-10000pt. + * NEWS: Document it. + +2002-03-15 Werner LEMBERG + + * man/groff.man: Add writem request. + + Add request `trin' (translate input) to make `.asciify' work + correctly. This is necessary since `charXXX' entity names are no + longer hardcoded in font definition files. + + * src/roff/troff/charinfo.h (charinfo): Add `asciify_code' and + `translate_input' members. + (charinfo::set_asciify_code, charinfo::get_asciify_code, + charinfo::set_translation_input): New methods. + (charinfo::set_translation): Add third argument. + * src/roff/troff/input.cc (charinfo:set_translation): Set + `asciify_code'. + (do_translate): Add second argument. + (translate_input): New function. + (init_input_requests): Updated. + * src/roff/troff/node.cc (glyph_node::asciify, + composite_node::asciify): Use `get_asciify_code'. + + * tmac/cp1047.tmac, tmac/latin1.tmac: Use `trin'. + + * NEWS, man/groff.man, man/groff_diff.man: Updated. + +2002-03-14 Larry Kollar + + * doc/groff.texinfo: Improve documentation of .RS and .RE. + +2002-03-14 Werner LEMBERG + + Add a new request `sizes' similar to the `sizes' command in DESC + files. + + * src/roff/troff/env.cc (override_sizes): New function. + (init_env_requests): Use it. + * src/roff/troff/token.h: Export `read_string'. + * NEWS, man/groff_diff.man, man/groff.man: Document it. + +2002-03-12 Werner LEMBERG + + * doc/groff.texinfo: More fixes for texinfo 4.1 and higher. + +2002-03-10 Werner LEMBERG + + * tmac/pspic.tmac: Add support for -Tdvi. + * tmac/dvi.tmac: Include pspic.tmac. + * src/devices/grodvi/grodvi.man: Document it. + * NEWS: Updated. + + * font/devlj4/generate/Makefile: Fix URL of metric files. + +2002-03-09 Werner LEMBERG + + * PROBLEMS: The static constructor bug has been fixed in z/OS V1R3. + +2002-03-09 Larry Kollar + + * tmac/groff_ms.man: Add documentation for RS and RE macros. + +2002-03-08 Werner LEMBERG + + * doc/groff.texinfo: Fixes for texinfo 4.1. + +2002-03-07 Werner LEMBERG + + * src/include/lib.h: Include getopt.h if groff-getopt.h can't be + included. + Handle CYGWIN properly. + +2002-03-07 Paco Andrés Verdú + + * font/devlbp/Makefile.sub (DEVFILES): Add some missing fonts. + * tmac/lbp.tmac: Add some font translations. + +2002-03-02 Werner LEMBERG + + * font/devcp1047/R.proto, font/devlatin1/R.proto, + font/devhtml/R.proto: Remove `charXXX' entries. + * tmac/tty.tmac, tmac/html.tmac: Load latin1.tmac or cp1047.tmac + where appropriate. + + * font/devlj4/generate/text.map: Remove `charXXX' entries. + * font/devlj4/*: Regenerated all font definition files. + * tmac/lj4.tmac: Load latin1.tmac. + + * src/utils/hpftodit/hpftodit.cc (do_file): Partially undo change + from 2000-06-17: LJ4 metric files are *not* text files. + + * tmac/troffrc, tmac/dvi.tmac, tmac/ps.tmac: Don't use .T string + register to test for EBCDIC. + +2002-03-01 Werner LEMBERG + + * src/utils/afmtodit/afmtodit.pl: Skip comment lines in encoding + files (as grops already does). + * src/utils/afmtodit/afmtodit.man: Document comment lines in map + files. + * src/devices/grops/grops.man: Document comment lines in encoding + files. + + * tmac/cp1047.tmac: New file. + * tmac/dvi.tmac, tmac/tty-char.tmac: Use it. + * tmac/ps.tmac: Load latin1.tmac or cp1047.tmac. + * tmac/Makefile.sub (NORMALFILES): Updated. + + * tmac/ec.tmac: Don't load latin1.tmac again. + + * font/devps/generate/lgreekmap, font/devps/generate/symbolchars, + font/devps/generate/dingbats.map, + font/devps/generate/dingbats.rmap, font/devps/text.enc, + font/devps/generate/Makefile (symbolmap): Add header comment. + * font/devps/generate/textmap: Ditto. + Remove `charXXX' entries. + * font/devps/symbolmap: Regenerated. + * font/devps/*: Regenerated all font definition files. + +2002-02-28 Werner LEMBERG + + Add color support to grodvi (for drawing colors are currently + translated to gray values). + + * src/devices/grodvi/dvi.cc (FILL_MAX): Removed. + (dvi_printer): Add `cur_color' member. + (dvi_printer::set_color): New function. + (draw_dvi_printer): Remove `fill'. + (draw_dvi_printer::fill_next): Pass environment as parameter. + Update code for new color support translated to gray. + (dvi_printer::set_char): Updated. + (dvi_printer::begin_page, dvi_printer::end_page): Handle color + changes crossing the page border. + (dvi_printer::draw): Updated. + Remove cases `f' and `F'. + * tmac/dvi.tmac: Add color definitions. + * NEWS, src/devices/grodvi/grodvi.man: Updated. + + * tmac/an-old.tmac (R): Make this a macro to emit a warning if + used incorrectly. + + * aclocal.m4 (GROFF_NEED_DECLARATION): Use test similar to recent + versions of autoconf. + * configure: Updated. + + * doc/homepage.ms: Use `.blm'. + * tmac/www.tmac (www-depth): New auxiliary variable. + (www-pop-level): Don't issue HTML tag. + (ULS, ULE, LI): Use absolute indentation. + + * src/devices/grops/ps.cc (ps_printer::begin_page, + ps_printer::end_page): Switch forth and back to default color while + starting a new page. + +2002-02-27 Werner LEMBERG + + Add EC and TC fonts to devdvi. + + * src/utils/tfmtodit/tfmtodit.man: Document patching of exbase.mf. + * font/devdvi/generate/cork.map: Renamed to... + * font/devdvi/generate/ec.map: This. + Remove entry for `aq'. + * font/devdvi/generate/tc.map: New file. + * font/devdvi/generate/Makefile (*EC, *TC): New creation rules for + EC and TC fonts. + (FONTS): Updated. + * font/devdvi/*EC, font/devdvi/*TC: New font definition files. + * font/devdvi/Makefile.sub (DEVFILES): Updated. + * tmac/ec.tmac: New file. + * tmac/Makefile.sub (NORMALFILES): Updated. + * NEWS, src/devices/grodvi/grodvi.man: Updated. + * man/groff_char.man: Check `ECFONTS' register. + + * font/devdvi/{TR,TI,TB,TBI,HR}: Fix `name' field. + +2002-02-26 Werner LEMBERG + + * font/devdvi/generate/*.map: Remove all `charXXX' entries. + * font/devdvi/generate/cork.map: Add 'y and 'Y. + * font/devdvi/*: Updated. + * tmac/dvi.tmac: Formatting. + + Add font `HBI' for the dvi output. + Add support for font families `T' and `H'. + + * font/devdvi/HBI: New file. + * font/devdvi/B: Renamed to ... + * font/devdvi/TB: This. + * font/devdvi/BI: Renamed to ... + * font/devdvi/TBI: This. + * font/devdvi/I: Renamed to ... + * font/devdvi/TI: This. + * font/devdvi/R: Renamed to ... + * font/devdvi/TR: This. + * font/devdvi/H: Renamed to ... + * font/devdvi/HR: This. + * font/devdvi/Makefile.sub (DEVFILES): Updated. + * font/devdvi/generate/Makefile (HBI): New rule. + (FONTS): Updated. + (R, I, B, BI, H): Renamed to ... + (TR, TI, TB, TBI, HR): This, respectively. + (srcdir): Fixed. + * NEWS, src/devices/grodvi/grodvi.man: Updated. + * font/devdvi/DESC.in: Don't mount R, I, B, BI, and CWI. + Add `styles' and `family' keywords. + * tmac/dvi.tmac: Alias `H' to `HR'. + Add some fspecial requests for italic fonts. + Add TR and TI as special. + Add support for `_' with font CWI. + + * src/roff/troff/number.cc (parse_expr): Add missing `break' for + operator `:'. Until now, the expression `0:1' would return 2 + instead of 1. + +2002-02-25 Werner LEMBERG + + * man/groff_char.man: Added some missing PS glyph names (from the + Adobe Glyph List). + * font/devps/generate/textmap, font/devps/symbolmap: Add + `arrowupdn'. + + * doc/groff.texinfo: Minor additions and fixes. + * man/groff_diff.man: Remove documentation of fp request. This + is already covered in the original troff manual. + Updated to be consistent with other doc files. + * NEWS: Updated. + +2002-02-24 Werner LEMBERG + + * aclocal.m4 (GROFF_EBCDIC): Don't include `font/devutf8' in + TTYDEVDIRS. + Define new variable OTHERDEVDIRS (containing `font/devlj4 + font/devlbp' if not EBCDIC). + * Makefile.in (TTYDEVDIRS): Always include `font/devutf8'. + (OTHERDEVDIRS): New variable. + (MDEFINES, DEVDIRS, ALLDIRS, DISTDIRS): Updated. + * configure: Regenerated. + + * NEWS, src/devices/grotty/grotty.man: Updated. + +2002-02-23 Werner LEMBERG + + * src/roff/troff/input.cc (do_overstrike, do_bracket, + get_line_arg): Honour input level. + + Add new symbol `mc' corresponding to U+00B5 MICRO SIGN. + + * font/*/*: Implement it in all font files. + * font/devps/generate/textmap, font/devps/generate/symbolchars, + * font/devps/symbolmap: Updated. + * font/devlj4/generate/text.map: Updated. + * font/devdvi/generate/CompileFonts (sizes): Add LaTeX sizes. + * font/devdvi/generate/texmi.map: Updated. + + * font/devutf8/R.proto: Remove all `charXXX' entries. + * font/devutf8/NOTES: Updated. + + * font/devX*/*: Regenerated with xtotroff, using fonts from XFree86 + version 4.1.0. + + * tmac/latin1.tmac, tmac/psold.tmac, tmac/tty-char.tmac: Updated. + + * NEWS, man/groff_char.man: Updated. + +2002-02-21 Phil Lobbes + + * src/include/lib.h [HAVE_SNPRINTF]: Include stdarg.h. + +2002-02-20 Ralph Corderoy + + * src/roff/grog/grog.pl: Fix computation of $refer. + +2002-02-19 Werner LEMBERG + + * src/include/lib.h [!HAVE_SNPRINTF]: Add declarations for + `snprintf' and `vsnprintf'. + + * src/include/htmlindicate.h: Renamed to... + * src/include/htmlhint.h: This. + * src/include/Makefile.sub: Updated. + * src/preproc/eqn/main.cc: Updated. + +2002-02-18 Werner LEMBERG + + * man/roff.man, man/groff_out.man, man/groff.man, + man/groff_diff.man, man/ditroff.man, src/roff/groff/groff.man, + src/roff/troff/troff.man: Updated to latest changes in www.tmac. + + * win32-diffs: Updated. + +2002-02-17 Werner LEMBERG + + * doc/Makefile (clean): Add *.eps. + (MEMACROS): Removed. + (TFLAG): New variable. + (TROFF): Use it. + Add -ww. + (GROFF): Use TFLAG, FFLAG, -U, -p, -e, -t, and -ww. + (.me.dit): Fixed. + (.ms.html, .ms.ascii, .ms.ps, homepage.html): Simplify. + + * tmac/www.tmac: Use dummy diversion while resetting and disabling + `.tl'. + * tmac/e.tmac: Inserted some more `\"' to remove warnings if used + unstripped. + * src/roff/troff/troff.man: Fix order of parameter description. + + * NEWS: Updated. + +2002-02-16 Gaius Mulley + + Simplify image handling for grohtml. + Fix

bug. + + * src/devices/grohtml/html-text.cc (DEBUGGING): Don't undefine but + comment out. + (html_text::dump_stack): Don't emit newline while debugging. + (html_text::do_push) [DEBUGGING]: Print more info. + (html_text::check_emit_text): Fix handling of

. + * src/devices/grohtml/html.h: Updated. + * src/devices/grohtml/output.cc (FPUTC, FPUTS, PUTC): New macros, + replacing `fputc', `fputs', `putc'. If DEBUGGING is defined, they + send its data to stderr also. + Update all callers. + (simple_output::space_or_newline) [DEBUGGING]: Removed. + * src/devices/grohtml/post-html.cc (html_printer::do_links, + html_printer::html_printer): Remove `DEBUGGING' conditionals. + + * src/include/html-strings.h (HTML_IMAGE_{CENTERED,LEFT,RIGHT,END}): + Removed. + * src/libs/libgroff/htmlhint.cc (is_in_graphic_start, + is_inline_image): Removed. + (html_begin_suppress, html_end_suppress): Don't take a parameter. + (graphic_start, graphic_end): Removed. + * src/include/htmlindicate.h: Updated. + * src/preproc/html/pre-html.cc (DEBUG_HTML): Removed. + (macroset_template): New global variable. + (makeFileName): Use `macroset_template'. + (write_end_image): Don't take a parameter. + Don't emit newline. + (write_start_image: Don't emit newline. + (char_buffer::write_upto_newline): Updated. + (char_buffer::skip_to_newline): Renamed to ... + (char_buffer::skip_until_newline): This. + Fix code. + (char_buffer::write_file_troff, char_buffer::write_file_html): + Simplified. + (createAllPages, createImage) [DEBUGGING]: Handle `debug' flag. + (removeAllPages): Remove `DEBUGGING' conditionals. + (addRegDef, dump_args): New functions. + (char_buffer::do_html, char_buffer::do_image): Handle + `www-image-template' command line variable. + Add more debugging code. + (addps4html): Removed. + (removeTempFiles) [DEBUGGING]: Handle `debug' flag. + + * src/preproc/eqn/main.cc: Include `ctype.h'. + (suppress_html): Removed. + (do_file): Updated. + (inline_equation): Use `html_begin_suppress' and + `html_end_suppress'. + * src/preproc/pic/troff.cc: Don't include `htmlindicate.h'. + (troff_output::start_picture, troff_output::finish_picture): + Updated. + * src/preproc/tbl/main.cc: Don't include `htmlindicate.h'. + (process_input_file): Updated. + + * src/roff/troff/div.cc (page_number): Set page number only if the + `ps4html' register isn't defined. + * src/roff/troff/input.cc (image_no): New external variable. + (do_suppress): Use it. + * src/roff/troff/node.h (suppress_node::image_id): New member. + * src/roff/troff/node.cc (image_no): Remove `static' keyword. + (suppress_node::suppress_node): Initialize `image_id' member. + (suppress_node::same): Handle `image_id' also. + (suppress_node::copy): Updated. + (last_image_id): New global variable. + (suppress_node::tprint): Use it. + + * tmac/an-old.tmac (TS, TE, EQ, EN): Use HTML-IMAGE and + HTML-IMAGE-END. + * tmac/pspic.mac (PSPIC): Fix html support. + * tmac/s.tmac (@EQ, @EN, @TS, TE, PS, PE): Ditto. + * tmac/www.tmac (www-image-template): Set up. + (HTMLINDEX): Renamed to... + (HX): This. + (BODYCOLOR): Renamed to... + (BCL): This. + (BACKGROUND): Renamed to... + (BGIMG): This. + (URL): Change order of parameters for consistency. + (MAILTO): Renamed to... + (MTO): This. + (IMAGE, PNG-IMAGE, MARGIN-PNG-IMAGE): Renamed to... + (IMG, PIMG, MPIMG): This. + (HTML-H-BEGIN, HTML-H-END): Renamed to... + (HnS, HnE): This. + (LINKS): Renamed to... + (LK): This. + (LINE): Renamed to... + (HR): This. + (NO-AUTO-RULE): Renamed to... + (NHR): This. + (HTML-TL): Renamed to... + (HTL): This. + (UL-BEGIN, UL-END): Renamed to... + (ULS, ULE): This. + (DROPCAP): Renamed to... + (DC): This. + (TS, TE, EQ, EN): Provide default definitions. + (www-make-unique-name): Updated. + (HTML-IMAGE-INLINE): Fix typo. + * tmac/groff_www.man: Updated. + + * doc/Makefile (homepage.html): Add option -r to grohtml. + Use shortened image name. + * doc/groff.texinfo: Updated info on grohtml strings and macros. + * doc/homepage.ms: Updated and extended. + +2002-02-14 Werner LEMBERG + + Don't use `CSI 39 m' and `CSI 49 m' but `CSI 0 m'. + + * src/devices/grotty/tty.cc (SGR_DEFAULT_COLOR, + SGR_BACK_DEFAULT_COLOR): Replaced with ... + (tty_printer::put_color): Use it. + (ttr_printer::end_page): Simplify. + +2002-02-13 Werner LEMBERG + + * tmac/groff_tmac.man: Moved to... + * man/groff_tmac.man: This place. + * tmac/Makefile.sub, man/Makefile.sub: Updated. + +2002-02-12 Werner LEMBERG + + * src/libs/libgroff/Makefile.sub (snprintf.o): Don't use + $(COMPILE.c) to not include groff's assert.h. + + * src/drivers/grotty/tty.cc (main): Add GROFF_NO_SGR environment + variable. + * NEWS, src/drivers/grotty/grotty.man: Document it. + +2002-02-11 Werner LEMBERG + + * src/libs/snprintf/snprintf.c: Updated to latest version + (2002-02-11). + + * src/roff/grog/grog.pl (process): Fix handling of `.['. We now + test whether there is `.]' also. + Don't check for spaces after `.['. + * src/roff/grog/grog.sh: Do the same. + +2002-02-10 Werner LEMBERG + + Illegal -> Invalid. + + * src/libs/libgroff/illegal.cc: Renamed to ... + * src/libs/libgroff/invalid.cc: This. + (illegal_char_table): Renamed to ... + (invalid_char_table): This. + * src/libs/libgroff/Makefile.sub: Updated. + * win32-diffs: Updated. + + * doc/groff.texinfo, src/devices/grops/psrm.cc (ps_get_line), + src/libs/libdriver/input.cc (fatal_command, parse_color_command, + parse_x_command), src/libs/libgroff/font.cc (text_file::next, + font::load), src/preproc/eqn/main.cc (read_line, main), + src/preproc/eqn/lex.cc (file_input::read_line), + src/preproc/pic/lex.cc (file_input::read_line, + simple_file_input::get, simple_file_input::peek), + src/preproc/pic/main.cc (top_input::get, top_input::peek), + src/preproc/pic/pic.man, src/preproc/refer/main.cc + (input_stack::push_file), src/preproc/refer/refer.cc (do_file, + do_bib), src/preproc/tbl/main.cc (table_input::get), + src/preproc/grn/grn.man, src/preproc/grn/main.cc (interpret), + src/roff/troff/input.cc (file_iterator::fill, file_iterator::peek, + do_zero_width, read_request, encode_char, ps_get_line, + transparent_file, get_char_for_escape_name, transparent_translate, + asciify, input_char_description, read_string, set_string), + src/roff/troff/env.cc (environment::add_html_tag), + src/roff/troff/troff.man, tmac/e.tmac (`@(', `(f'): Do it. + + * src/include/lib.h: Updated. + + * src/preproc/eqn/eqn.cc: Removed. + + * NEWS: Updated. + + * src/preproc/grn/hdb.cc (DBRead): Fix fscanf() fields. + +2002-02-09 Werner LEMBERG + + * doc/gnu.xpm: New image. + * doc/Makefile (DOCS): Add homepage.ps. + Add rules for converting xpm->png and xpm->eps. + Use `gnu.{xpm,eps}' as image names. + * doc/homepage.ms: Updated. + +2002-02-09 Gaius Mulley + + * tmac/www.tmac (www-error): New macro, replacing calls to `@error'. + (IMAGE): Change image position parameters to `-L', `-R', and `-C'. + Remove calls to `B1' and `B2' + (PNG-IMAGE): New macro for inclusion of images in PNG format. + (www-left-ll-trap, www-left-po-trap, www-right-ll-trap): New + auxiliary variables for MARGIN-PNG-IMAGE. + (www-finish-left-po, www-finish-right-ll, www-finish-left-ll): New + auxiliary macros for MARGIN-PNG-IMAGE. + (MARGIN-PNG-IMAGE): New macro to put an image in PNG format into + the margin. + (www-heading-no): New auxiliary variable for HTML-H-{BEGIN,END}. + (HTML-H-BEGIN, HTML-H-END): New macros to begin and end a heading. + (DROPCAP): New macro to produce dropcap characters. + (www-do-image): Renamed back to... + (HTML-DO-IMAGE): This. + Updated all callers. + + * doc/Makefile (gnubw.eps): Updated. + * doc/homepage.ms: Updated. + +2002-02-08 Werner LEMBERG + + * doc/pic.ms: Fixed typos (\(*tx -> \*(tx). + Added `linethick' to table in section `Style Variables'. + +2002-02-08 Gaius Mulley + + * src/libs/libdriver/input.cc (get_extended_arg): Fix conditional. + +2002-02-07 Werner LEMBERG + + Adding options -C (compatibility mode) and -c (grotty's old output + scheme) to nroff. + + * src/roff/nroff/nroff.sh: Implement it. + Remove `-Wall'. + * NEWS, src/roff/nroff/nroff.man: Updated. + + * PROBLEMS: Document bison 1.32 bug. + + Some fixes to make groff compile on z/OS 1.2 UNIX (was OS/390). + + * src/roff/troff/node.cc (make_tfont): Define it earlier. + * src/roff/troff/div.h: Add prototype for `end_diversions'. + * src/roff/troff/input.cc: Add prototype for `process_input_stack'. + * src/roff/troff/env.h: Add prototype for `title'. + + Adding EBCDIC support to grotty. + + * src/devices/grotty/tty.cc (CSI): New macro. + (SGR_*, tty_printer::put_color): Use it. + +2002-02-06 Werner LEMBERG + + Implementing color support in grotty. The new switch -c activates + the old drawing scheme, disabling color at the same time. The new + switch `-i' selects italic instead of underlining (SGR only). + + * src/devices/grotty/tty.cc (putstring): New define instead of + `fputs'. Updated all callers. + (old_drawing_scheme): New global variable. + (COLOR_CHANGE): New enum value. + (SGR_*): New defines containing color handling escape sequences. + (TTY_MAX_COLORS, DEFAULT_COLOR_IDX): New defines. + (glyph): New members `back_color_idx' and `fore_color_idx'. + (glyph::order): Add COLOR_CHANGE. + (tty_printer): New members `cur_fore_idx', `curr_back_idx', + `is_underline', `is_bold', `cu_flag', `tty_colors'. + New methods `make_underline', `make_bold', `color_to_idx', + `change_color', `put_color'. + (cu_flag): Moved into `tty_printer' class. + (tty_printer::tty_printer): Initialize colors. + (tty_printer::add_char, tty_printer::set_char, tty_printer::special, + tty_printer::draw, tty_printer::end_page): Handle colors also. + (main): Add options `-c' and `-i'. + (usage): Updated. + * NEWS, src/devices/grotty/grotty.man: Updated. + + * src/include/errarg.h (errarg): Add support for `unsigned int'. + * src/libs/libgroff/errarg.c: Implement it. + + * src/include/printer.h (printer): Add `change_color' method + (currently used by grotty only). + * src/libs/libdriver/printer.cc: Implement it. + * src/libs/libdriver/input.cc (parse_D_command, do_file): Add + call to `pr->change_color'. + + * src/roff/troff/node.cc (troff_output_file::fill_color, + troff_output_file::glyph_color): Call `do_motion'. + + * tmac/tty.tmac: Add color definitions. + + * src/roff/groff/groff.man: Minor fixes. + +2002-02-05 Bernd Warken + + * src/libs/libdriver/input.cc: Introduce `EnvInt' typedef and use + it. This is a preparation for future changes. + +2002-02-05 Werner LEMBERG + + * src/roff/troff/input.cc (process_input_stack): Fix the case + where leading spaces are followed by \f or \s; previously, an + incorrect space width has been used. + + * doc/roff.man (quoted_char): Fix argument. + (comment): Define string. + +2002-02-04 Larry Kollar + + * doc/groff.texinfo: More fixes. + +2002-02-04 Werner LEMBERG + + * src/preproc/eqn/box.cc (output_string): Don't use \\*[...]. + * src/preproc/eqn/main.cc (do_file, inline_equation): Call + `restore_compatibility' before `output_string' -- the LINE_STRING + register now already contains proper switches from and to + compatibility mode. + + * man/groff_char.man: Add Euro symbol. + * man/groff_diff.man: Improve documentation of `.am1' and `.as1'. + * tmac/tty.tmac: Add `EUR' as replacement for `eu' and `Eu'. + * doc/groff.texinfo (Defstr*): Print strings with full syntax. + Other minor fixes. + + * doc/Makefile (.SUFFIXES, .texinfo.pdf, clean): Add support for + texinfo->pdf. + (.texinfo.html): Add support for texinfo->html. + +2002-02-03 Werner LEMBERG + + Added three new requests `ds1', `as1', and `ami'. The former two + are equivalent to `ds' and `as' with the difference that + compatibility mode is saved on entry, switched off during string + expansion, and restored on exit. The latter is the pendant to `dei' + for `am'. + + (do_define_string): Use `define_mode' and `calling mode'. + Insert COMPATIBLE_SAVE and COMPATIBLE_RESTORE at the beginning and + end of string, respectively. + (define_string, append_string): Use `calling_mode'. + (define_nocomp_string, append_nocomp_string, + define_string_indirect): New functions. + (init_input_requests): Updated. + * NEWS, man/groff_diff.man, man/groff.man: Document it. + + * src/preproc/eqn/box.cc (box::top_level, box::extra_space): Use + `as1' for assigning LINE_STRING (this is `10' usually). Sun's + mm macro package accesses this string register directly. + * src/preproc/eqn/main.cc (inline_equation): Use `as1'. + + * tmac/trace.tmac: Trace calls to `am' also. Make it work in + compatibility mode. + +2002-02-02 Larry Kollar + + * doc/groff.texinfo, tmac/groff_ms.man: More fixes. + +2002-01-31 Werner LEMBERG + + * tmac/an-old.tmac (I): Use \, and \/ to improve spacing. + +2002-01-31 Bernd Warken + + * src/devices/grolbp/lbp.cc (main): Delete `pr'. + * man/groff_out.man: Revised and updated. + +2002-01-30 Bernd Warken + + * src/libs/libdriver/input.cc [USE_ENV_STACK]: New macro to comment + out the unused `{' and `}' commands. Undefined by default. + (IntArray): Make `data' private. + (IntArray::operator[], IntArray::get_data, IntArray::len): Use these + new methods instead. + (skip_line_D, skip_to_end_of_line): New functions. + (get_D_fixed_args): Use `skip_line_D'. + Changed to handle dummy odd arguments by ... + (get_D_fixed_args_odd_dummy): This new function. + (get_D_variable_args): Split some code into ... + (get_possibly_integer_args): This new function. + (send_draw): Use more `const'. + (delete_current_env): New function. + (position_to_end_of_args): Use `size_t'. + Updated. + (send_draw): Updated. + (parse_D_command): Handle `c', `C', and `t' better. + Updated. + (do_file): Updated. + +2002-01-29 Werner LEMBERG + + * NEWS: Revised. + * doc/groff.texinfo: Introduce @Def...List, @Def...Item, and + @Def...ListEnd which replaces @Def...x. This is necessary to get + proper HTML output -- see the comment in the file for more + information. + Updated all calls. + +2002-01-29 Gaius Mulley + + Fixes to make color changes of 2002-01-21 work with grohtml. + + * src/devices/grohtml/post-html.cc (style): Updated. + (html_printer): Remove unused methods. + (html_printer::do_font, html_printer::draw, html_printer::set_char, + html_printer::special): Updated. + * src/devices/grohtml/html-text.cc (debugStack, turnDebug, + html_text::dump_stack_element, html_text::dump_stack) [DEBUGGING]: + Added some debugging code. + (html_text::start_tag): Updated. + (html_text::do_push): New method. + (html_text::push_para): Call it. + Add method for handling color. + (html_text::do_color): Updated. + (html_text::shutdown): Handle color. + * src/devices/grohtml/html-text.h (tag_definition): New member + `col'. + Updated. + +2002-01-28 Werner LEMBERG + + * tmac/ps.tmac, tmac/html.tmac: Fix compatibility mode issues. + +2002-01-27 Gaius Mulley + + Add two switches -a and -g to control the antialiasing bits for + text and graphics, respectively. + + * src/devices/grohtml/post-html.cc (main): Dummy code for `-a' and + `-g'. + * src/devices/grohtml/grohtml.man: Document them. + * src/preproc/html/pre-html.cc (MIN_ALPHA_BITS, MAX_ALPHA_BITS): + New macros. + (textAlphaBits, graphicAlphaBits, antiAlias): New global variables. + (setupAntiAlias): New function. + (createAllPages): Updated. + (scanArguments): Handle `-a' and `-g'. + (main): Call `setupAntiAlias'. + * NEWS: Updated. + +2002-01-27 Werner LEMBERG + + * doc/groff.texinfo (Def*): Call index function after deffn. + + * tmac/html.tmac: Call `nroff' request. + +2002-01-26 Larry Kollar + + * tmac/groff_ms.man: Add some omissions. + +2002-01-25 Larry Kollar + + * tmac/groff_ms.man: Typographical improvements. + +2002-01-25 Werner LEMBERG + + * doc/groff.texinfo: Updated version and copyright. + * src/devices/grops/grops.man: Updated. + + * tmac/groff_tmac.man: Fix `ig' macro. + + * tmac/an-old.tmac (ne): Redefine `ne' request to be a no-op in + nroff mode. + Use `.ne' unconditionally everywhere. + (TS): Only insert some vertical space. Doing a page break is no + longer necessary due to the redefinition of the `ne' request. + + * src/libs/libdriver/input.cc (parse_D_command): Don't emit a + warning for unknown subcommands but parse and pass them to the + device driver. + +2002-01-24 Werner LEMBERG + + * tmac/groff_www.man, NEWS: Fix typos. + +2002-01-21 Werner LEMBERG + + Complete revision of color support: + + Adapt programs to the new libdriver/input.cc. + + Color spaces are no longer converted to RGB but transferred as-is + in the troff intermediate output format. + + Handle default color gracefully. troff now supports a `default' + color (which can't be changed). + + grops will now use the proper color space functions if available. + + Update pic. + + Note that currently grohtml doesn't handle colors properly. This + has to be fixed. + + * src/libs/libgroff/itoa.c (UINT_DIGITS): New macro. + (ui_to_a): New function. + * src/include/lib.h: Updated. + + * src/include/color.h (color_scheme): Replace `NONE' with `DEFAULT'. + (color): Simplified; removed all `double' members and methods. + A new array `components' now holds the color parameters. + (color::is_default, color::get_components): New methods. + (color::operator==, color:operator!=): New. + (Red, Green, Blue, Cyan, Magenta, Yellow, Black, Gray): New macros + to make access to the `components' array more comprehensible. + * src/libs/libgroff/color.cc: Implement new color support. + (atoh): Small fixes. + (color::read_encoding): Simplified for new troff intermediate color + output format. + (default_color): New global variable. + + * src/roff/troff/input.cc (default_symbol): New global variable. + (lookup_color): Use it. + (default_black): Removed. + (do_glyph_color, do_fill_color): Simplified. + (define_color): Handle default color. + Improve warnings. + (do_if_request): Handle default color. + * src/roff/troff/env.cc (environment::environment): Initialize + colors with `default_color'. + * src/roff/troff/node.cc (troff_output_file::put): Add method + for `unsigned int'. + (troff_output_file::hex): Removed. + (troff_output_file::fill_color, troff_output_file::glyph_color): + Updated to include/color.h and libdriver/input.cc. + + * src/preproc/pic/object.cc (draw_arrow): New parameter to set + fill color properly (identically to the outline color). \D'f...' + doesn't work any more. + All function calls to it updated. + + * src/devices/grohtml/post-html.cc (html_printer::do_body, main): + Updated. + * src/devices/grohtml/html-text.cc (html_text::issue_color_begin): + Updated. + + * src/devices/grops/ps.cc (ps_output::put_color): New method. + (ps_printer::sbuf_color): Make a real member instead of pointer. + (ps_printer::fill_color, ps_printer::output_color): Removed. + (ps_printer::ps_printer): Updated. + (ps_printer::set_char): Ditto. + (ps_printer::set_color): Use various color schemes. + Use `put_color' method. + (ps_printer::flush_sbuf): Don't set color. + (ps_printer::fill_path): Take `environment' as parameter. + Simplify color handling. + (ps_printer::set_line_thickness): Renamed to ... + (ps_printer::set_line_thickness_and_color): This (and updated). + (ps_printer::set_color): Change second parameter from `complete' + to `fill' which better describes what it does. + (ps_printer::draw): Call `flush_sbuf' to output graphic commands + and text in the right order. + Updated. + Remove branches for `f' and `F'; this is handled by + libdriver/input.cc. + * src/devices/grops/ps.h: Updated. + * font/devps/prologue (FL): Redefined. + ({F,C}r,k,g: New color functions (with and without filling). + + * doc/pic.ms, src/preproc/pic/pic.man: Small fixes. + * man/groff_diff.man, man/groff.man, man/groff_out.man, + doc/groff.texinfo, NEWS: Updated. + +2002-01-20 Bernd Warken + + * src/libs/libdriver/input.cc: Completely rewritten. See comments + in this file for what has been changed. + +2002-01-19 Werner LEMBERG + + * test-groff: Fix GROFF_FONT_PATH. + * tmac/andoc.tmac: Add dummy macros for equation support -- eqnrc + is read before .TH or .Dd is parsed. + +2002-01-18 Gaius Mulley + + * src/libs/libgroff/geometry.cc (check_output_arc_limits): Fix + quadrant boundaries. + +2002-01-18 Werner LEMBERG + + * devices/grops/ps.cc: Aargh! Fix the fix of the incorrectly + applied last patch. + +2002-01-17 Ruslan Ermilov + + * tmac/doc.common: Initialize %I register for the %I macro to + avoid (harmless) warning. + * tmac/doc.tmac (Bd): There is no reason to enforce -compact + when in the SYNOPSIS section. + +2002-01-17 Bruno Haible + + * src/preproc/pic/lex.cc (get_token): Fix typo. + +2002-01-17 Werner LEMBERG + + * devices/grops/ps.cc: Fix incorrectly applied last patch. + +2002-01-17 Larry Kollar + + * tmac/groff_ms.man: Completely rewritten. + +2002-01-16 Werner LEMBERG + + * tmac/an-old.tmac (TS): Force break, inserting some vertical space. + +2002-01-15 Gaius Mulley + + * devices/grops/ps.cc (ps_printer::fill_path): Fix handling of + fill colors. + (ps_printer::draw): Ditto. + +2002-01-14 Ruslan Ermilov + + * tmac/groff_mdoc.man: Minor fixes. + +2002-01-13 Werner LEMBERG + + * man/groff_out.man: Some fixes. + +2002-01-13 Gaius Mulley + + * doc/pic.ms: Fix typos. + +2002-01-12 Werner LEMBERG + + * doc/groff.texinfo, doc/groff.man: More on a printable backslash. + +2002-01-10 Werner LEMBERG + + * font/devutf8/R.proto, font/devhtml/R.prot: Add `Eu' and `eu' + symbols. + * NEWS: Updated. + +2002-01-09 Bernd Warken + + * man/groff_out.man: Revised. + * man/roff.man: Minor fixes. + * src/roff/troff/troff.man: Some reordering. + +2002-01-09 Werner LEMBERG + + * tmac/an-old.tmac: Add dummy macros for equation support. + +2002-01-07 Werner LEMBERG + + doc/groff.texinfo: Fix documentation of glyph searching algorithm. + + * tmac/an-old.tmac: Revert change 2001-12-23. This breaks too many + man pages. + * tmac/groff_man.man: Small improvements. + +2002-01-07 Bernd Warken + + * man/groff_diff.man: Revised. + +2002-01-06 Werner LEMBERG + + * tmac/www.tmac: Remove extraneous backslash. + +2002-01-06 Bernd Warken + + * man/ditroff.man, src/roff/groff/groff.man, man/groff.man: Revised. + +2002-01-05 Werner LEMBERG + + Integrated groffer, contributed by Bernd Warken. + + * contrib/groffer/*: New. + * Makefile.in, NEWS: Updated. + +2002-01-04 Werner LEMBERG + + * doc/groff.texinfo: Added macros `@Defmpreg' and `@Defmpregx' for + registers defined in macro packages. + Revising the ms part. + +2002-01-04 Larry Kollar + + * doc/groff.texinfo: Add documentation for ms macros. + +2002-01-02 Werner LEMBERG + + First step in adding PS support for the Euro symbol. `eu' is the + official Euro logo, `Eu' is a font-specific glyph variant. + + * font/devps/text.enc: Add `Euro' at position 9. + * font/devps/generate/textmap: Add `Euro' as symbol `Eu'. + * font/devps/symbolmap: Regenerated. + + * NEWS: Updated. + +2002-01-02 Bernd Warken + + * man/roff.man: Revised. + +2002-01-01 Bernd Warken + + * src/roff/groff/groff.man: Completely rewritten. + +2001-12-31 Werner LEMBERG + + * doc/Makefile: Updated. + +2001-12-30 Werner LEMBERG + + * tmac/www.tmac: Make all names of internal macros/registers/strings + lowercase, and prepend `www-'. + Other minor changes. + * src/roff/troff/troff.man: Add preprocessor string at BOF. + +2001-12-30 Gaius Mulley + + Implement option `-b' in grohtml to set the HTML background colour. + + * src/devices/grohtml/post-html.cc (default_background): New global + variable. + (html_printer::html_printer): Initialize `background' to + `default_background'. + (main): Implement option `-b'. + (usage): Updated. + * src/preproc/html/pre-html.cc (scanArguments): Add dummy handling + of `-b' option. + * src/devices/grohtml/grohtml.man: Updated. + * doc/Makefile (.ms.html): Use `-b'. + * tmac/html.tmac: Don't set background color. + + Add new grohtml tag `.html-tl'. + + * src/devices/grohtml/post-html.cc (title_desc): Add `with_h1' + member variable. + (title_desc::title_desc): Updated. + (html_printer::troff_tag): Handle `.html-tl'. + (html_printer::write_title): Use `with_h1'. + * tmac/www.tmac (www-end-nowhere): New auxiliary macro. + (HTML-TL): New macro. + + Add support for unordered lists in HTML. + + * tmac/www.tmac (www-level): New auxiliary register. + (www-level1, www-level2, www-level3): New auxiliary strings. + (www-push-level, www-pop-level): New auxiliary macros + (UL-BEGIN, UL-END, LI): User macros for unordered lists. + + Miscellaneous. + + * src/preproc/html/pre-html.cc (DEFAULT_IMAGE_RES): Increase to 100. + (DEFAULT_VERTICAL_OFFSET): Removed. + (IMAGE_BOARDER_PIXELS): Set to 0. + (A4_LENGTH, A4_OFFSET, LETTER_LENGTH, LETTER_OFFSET): New macros. + (vertical_offset): Initialize with 0. + (gsPaper): New global variable. + (get_resolution): Scan for and return unsigned int. + (get_papersize): New function to get paper length from devps/DESC. + (determine_vertical_offset): New function. + (createAllPages): Produce gray-level images and use proper page + length. + (createImage): Use `-quiet' option of pnmcrop. + (addZ): Fix passing of `-Z'. + (scanArguments): Fix handling of `-o'. + (main): Call `determine_vertical_offset'. + * src/devices/grohtml/post-html.cc (html_printer::draw): Comment out + code for `l'. + + * src/libs/libgroff/tmpfile.cc (add_tmp_file): Fix buffer length. + * src/roff/troff/node.cc (troff_output_file::check_charinfo): Handle + glyph descenders properly. + + * doc/homepage.ms: Include `gnubw.eps'. + * doc/Makefile (gnubw.eps): New rule. + (homepage.html): Depend on `gnubw.eps'. + +2001-12-25 Werner LEMBERG + + * src/roff/troff/input.cc (default_black): Fix return value. + +2001-12-24 Ruslan Ermilov + + * tmac/doc-common (Dt): Change output of architecture strings. + Do some syntax cleanup. + * tmac/groff_mdoc.man: Updated. + +2001-12-23 Werner LEMBERG + + Adding an `itc' request (input line trap accepting \c). + + * src/roff/troff/env.h (environment): New member + `continued_input_trap'. + Make `do_input_trap' a friend function instead of `input_trap'. + * src/roff/troff/env.cc (environment::environment, + environment::copy): Updated. + (environment::newline): Implement it. + (do_input_trap): New function. + (input_trap): Call `do_input_trap'. + (input_trap_continued): New function. + (init_env_requests): Updated. + * src/roff/troff/TODO: Updated. + + * tmac/an-old.tmac (SH, SS, B, I, SM, SB, TP): Use `.itc' instead of + `.it'. + + * src/preproc/grn/hdb.cc (DBRead): Really chop after 127 characters. + +2001-12-22 Ruslan Ermilov + + * tmac/doc-common, tmac/doc-syms: Small updates. + +2001-12-22 Colin Watson + + * tmac/an-old.tmac (an-p-footer): Set title length in environment 1. + +2001-12-22 Bernd Warken + + * MANIFEST: New file. + +2001-12-22 Werner LEMBERG + + * src/preproc/grn/grn.man: Updated. + +2001-12-22 Solar Designer + + * src/preproc/grn/hdb.cc (MAXSTRING_S): New macro. + (DBRead): Use it. + +2001-12-19 Werner LEMBERG + + Implement a fallback character request `.fchar'. + + * src/roff/troff/charinfo.h (charinfo): New flag `fallback'. + (is_fallback): New inline function. + * src/roff/troff/input.cc (do_define_character): New function. + (define_character): Call `do_define_character'. + (define_fallback_character): New function. + (init_input_requests): Add `fchar'. + (charinfo::charinfo): Updated. + (charinfo::set_macro): New argument to set `fallback' flag. + * src/roff/troff/node.cc (make_glyph_node, make_node, + node::add_char): Check `fallback' flag. + * NEWS, man/groff_diff.man, man/groff_man: Updated. + +2001-12-16 Werner LEMBERG + + * groff.texinfo: Document exact search algorithm for glyphs. + +2001-12-15 Werner LEMBERG + + * Makefile.cpg, Makefile.ccpg, Makefile.man: Add dummy file to + the left side of $(MANPAGES) rule to make it always non-empty. + +2001-12-14 Werner LEMBERG + + * src/roff/troff/input.cc (default_black): Define default color + `black' if not yet defined. + +2001-12-13 Werner LEMBERG + + Implement new string-valued register `.fn' to return the current + real (internal) font name. + + * env.cc (environment::get_font_name_string): New function. + (init_env_requests): Add `.fn' register. + * env.h (environment): Updated. + * node.cc (font_info): Make `get_font_name' a friend. + (get_font_name): New function. + * node.h: Updated. + + * man/groff_diff.man, man/groff.man, NEWS: Updated. + +2001-12-12 Ralph Corderoy + + * src/preproc/eqn/main.cc (inline_equation): Fix typos. + +2001-12-12 Werner LEMBERG + + * tmac/groff_man.man, doc/groff.texinfo: There is no .R macro. + +2001-12-10 Gaius Mulley + + * man/groff_diff.man: Adding documentation for \O. + +2001-12-10 Werner LEMBERG + + * src/preproc/html/pre-html.cc (TROFF_COMMAND): Removed. + (scanArguments): Use PROG_PREFIX for the name of the troff binary. + +2001-12-09 Werner LEMBERG + + * man/roff.man: Revised. + * src/roff/groff/groff.man: Replace man page references with a + pointer to roff.man. + +2001-12-09 Bernd Warken + + * man/roff.man: Completely rewritten. + +2001-12-06 Ralph Corderoy + + * src/preproc/eqn/main.cc (inline_equation): Improve error message. + +2001-12-05 Werner LEMBERG + + * src/roff/troff/input.cc (get_delim_file_name): Removed since no + longer used. + * src/devices/grohtml/post-html.cc (html_printer::html_printer): Fix + order of initializers. + * NEWS: Updated. + +2001-12-05 Gaius Mulley + + * doc/groff.texinfo: Fix documentation of \O. + + * src/devices/grohtml/html-text.cc (html_text::do_indent, + html_text::do_table, html_text::do_emittext, html_text::do_para): + Use `const' for first argument. + (html_text::do_table): Use cast. + * src/devices/grohtml/html-text.h: Updated. + * src/devices/grohtml/output.cc (simple_output::put_string): Add + method for `const string &s'. + * src/devices/grohtml/html.h: Updated. + * src/devices/grohtml/post-html.cc (MAX_STRING_LENGTH): Removed. + (ANCHOR_TEMPLATE): Modified. + (manufacture_headings): New global variable to handle `-h' option. + (is_subsection): Removed. + (char_buffer::add_string): Add `const' to first argument. + Protect against invalid string argument. + Add method for `const string &s'. + (text_glob): Completely redesigned. + (page): Use `const' for strings and remove string length variable. + (page::add_html): Removed. + (page::add_end_encode): New member function. + (to_unicode): Moved upwards. + (title_desc, header_desc): Updated. + (header_desc::write_headings): Updated to new ANCHOR_TEMPLATE + definition. + (html_printer::is_bold, html_printer::make_bold): New member + functions. + (html_printer::end_of_line): Updated. + (generate_img_src, html_printer::do_auto_image, + html_printer::do_title, html_printer::write_header, + html_printer::determine_header_level, html_printer::do_heading, + html_printer::do_linelength, html_printer::do_pageoffset, + html_printer::do_indentation, html_printer::do_tempindent, + html_printer::do_indentedparagraph, html_printer::do_break, + html_printer::flush_sbuf, get_html_translation, + html_printer::begin_page, html_printer::special): Rewritten to get + rid of static string length limit. + (html_printer::troff_tag): Added `.no-auto-rule'. + (html_printer::flush_globs): Small fix. + (html_printer::determine_space): Don't compute `space_width'. + (html_printer::translate_to_html): Renamed to ... + (html_printer::emit_html): This (with updates). + (html_printer::write_header): Implement `-h' option. + (html_printer::draw): Remove commented-out code. Handle `F' + command. + (html_printer::add_char_to_sbuf): Removed. + (html_printer::add_to_sbuf): Rewritten. + (html_printer::sbuf_continuation): Fixed. + (html_printer::seen_backwards_escape, reverse, + html_printer::remove_last_char_from_sbuf): Removed. + (char_translate_to_html, str_translate_to_html): Removed. + (html_printer::overstrike): New function member. + (html_printer::set_char): Use it. + (html_printer::do_body): New function member. + (html_printer::~html_printer): Use it. + (main): Handle `-h' option. + (usage): Updated. + * src/devices/grohtml/grohtml.man: Document -h switch. + + * src/preproc/html/pre-html.cc: Include searchpath.h + Replace `POSTSCRIPTRES' macro with `postscriptRes' variable. + (get_resolution): New function. + (checkImageDir): Use `0777' permissions in mkdir() + (write_start_image): Rewritten to use `\O[5...]'. + (createImage, generateImages): Updated. + (main): Handle `F' and `h' options. + Use `get_resolution'. + + * src/roff/troff/input.cc (begin, end, image): Removed. + (do_suppress): Take parameter. + Handle modified syntax of `\O'. + (token::next): Updated. + (init_markup_requests): Removed. + (main): Updated. + + * src/roff/troff/div.h: Add declaration for begin_page(). + + * tmac/color-html.tmac: Removed. Contents moved to... + * tmac/html.tmac: Here. Set background color. + * tmac/color.tmac: Removed. Contents moved to... + * tmac/ps.tmac: Here. + * tmac/www.tmac: Remove the title command when generating images + for html. + (NO_AUTO_RULE): New macro. + (HTML_DO_IMAGE): Use revised `\O' escapes. + * tmac/Makefile.sub, tmac/groff_www.man, tmac/troffrc: Updated. + +2001-12-02 Werner LEMBERG + + * tmac/groff_mdoc.man: Fix typo. + +2001-12-01 Colin Watson + + * man/roff.man: Fix typo. + +2001-11-29 Werner LEMBERG + + * src/libs/libbib/map.c, src/utils/pfbtops/pfbtops.c: Include + stdlib.h. + + * src/roff/troff/input.cc (read_draw_node): Emit error message if + more than one argument to \D'f ...'. + + * tmac/Makefile.sub (NORMALFILES): Add lbp.tmac. + +2001-11-28 Werner LEMBERG + + * tmac/an-old.tmac, tmac/doc.tmac: Assure that the macro package is + loaded only once. + + * tmac/groff_man.man: Minor cosmetic fix. + +2001-11-27 Werner LEMBERG + + * src/roff/groff/groff.man, tmac/groff_tmac.man, + tmac/groff_www.man: s/mwww/www/. + +2001-11-26 Werner LEMBERG + + * aclocal.m4 (GROFF_MKSTEMP): Implement test using C++ linkage. + * configure: Regenerated. + * win32-diffs: Updated. + + * tmac/groff_mwww.tmac: Renamed to ... + * tmac/groff_www.tmac: This. + * tmac/mwww.tmac: Removed. + * NEWS, tmac/Makefile.sub: Updated. + +2001-11-21 Werner LEMBERG + + * doc/groff.texinfo: Improve documentation of the `\v' escape. + Fix explanation of `\D' and `rt'. + +2001-11-20 Werner LEMBERG + + * tmac/an-old.tmac (an-header): Set header length equal to page + width. + * doc/groff.texinfo: Improve documentation of `ne' request. Other + minor fixes. + * NEWS: Small fix. + +2001-11-19 Werner LEMBERG + + * NEWS, man/Makefile.sub: Updated. + +2001-11-19 Bernd Warken + + * man/ditroff.man: New file. + +2001-11-17 Werner LEMBERG + + * man/groff_differences.man: Renamed to ... + * man/groff_diff.man: This. Updated. + * man/Makefile.sub, src/roff/troff/troff.man, NEWS: Updated. + + * src/preproc/html/pushbackbuffer.cc: Renamed to ... + * src/preproc/html/pushback.cc: This. Updated. + * src/preproc/html/pushbackbuffer.h: Renamed to ... + * src/preproc/html/pushback.h: This. + * src/preproc/html/Makefile.sub, src/preproc/html/pre-html.cc: + Updated. + + * src/libs/libgroff/htmlindicate.cc: Renamed to ... + * src/libs/libgroff/htmlhint.cc: This. + * src/libs/libgroff/Makefile.sub: Updated. + + * tmac/an-old.tmac (an-end): Fix page length. + +2001-11-16 Werner LEMBERG + + * NEWS, man/groff_differences.man, doc/groff.texinfo: Updated. + * man/Makefile.sub: Include groff_differences.man. + * VERSION: Set to 1.18. + * REVISION: Set to 0. + +2001-11-16 Bernd Warken + + * src/roff/troff/input.cc (do_define_macro): Allow whitespace before + the second dot (or ending macro name) to end a macro. + * doc/groff.texinfo: Doc fix. + +2001-11-16 Ruslan Ermilov + + * tmac/doc-common (doc-header): Handle very long document titles + better. + +2001-11-16 Werner LEMBERG + + * tmac/doc.tmac (doc-do-Bl-args): Fix .substring requests. + +2001-11-15 Werner LEMBERG + + * src/roff/troff/troff.man: Revised and split into troff.man and... + * man/groff_differences.man: New file. + * NEWS: Updated. + +2001-11-13 Werner LEMBERG + + * tmac/an-old.tmac (TS, TE): New macros for table support. + +2001-11-12 Werner LEMBERG + + * src/include/lib.h: Provide a fix for emx to not include + groff-getopt.h. + +2001-10-27 Werner LEMBERG + + * src/roff/troff/input.cc (substring_macro): Fix computation of + boundary values. + +2001-10-20 Werner LEMBERG + + Undo change from 2001-08-28. + + * src/roff/troff/input.cc (have_input): New global variable. + (token::next): Set `have_input' for \f, \H, \R, \s, and \S if not + in compatibility mode. + (process_input_stack): Use it. + +2001-10-19 Ruslan Ermilov + + * tmac/doc.tmac (doc-flag-recursion): Protect arguments against + being handled as end-of-sentence characters, + +2001-10-10 Gaius Mulley + + * src/roff/troff/input.cc (file_iterator): New members + `suppress_newline_flag' and `seen_escape'. + (file_iterator::next_file): Updated. + (file_iterator::fill): Use it. + (string_iterator): New member `suppress_newline_flag'. + (string_iterator::fill): Set it. + (get_color_element): Use MAX_COLOR_VAL. + * src/roff/troff/env.cc (environment): Remove `need_eol'. + (no_fill): Don't set `env->ignore_next_eol'. + (environment::newline): Handle `eol' tag properly. + Emit `eol.ce'. + (environment::add_html_tag): Set `env->ignore_next_eol'. + Don't handle `.ce'. + * src/roff/troff/env.h (environment): Updated. + + * src/devices/grohtml/post-html.cc (text_glob::is_eol_ce): New + member function. + (html_printer::outstanding_eol): New member function. + (html_printer::do_title): Use new functions. + (html_printer::troff_tag): Test `id_eol_ce'. + +2001-10-10 Werner LEMBERG + + * tmac/color.tmac, tmac/color-html.tmac: Use `.do' to make those + files work with -C also. + +2001-10-05 Werner LEMBERG + + * doc/pic.ms: Minor fix. + * src/preproc/html/pre-html.cc (scanArguments): Don't handle `-?' + as a valid command line switch. + * src/devices/grohtml/post-html.cc (main): Ditto. + (usage): Updated. + * src/devices/grohtml/grohtml.man: Updated. + * src/roff/groff/groff.cc (main): Pass `-v' to predriver also. + +2001-10-04 Werner LEMBERG + + Implementing color support in troff, pic, grops, and grohtml. These + changes are based on a major patch provided by Gaius Mulley + . + + New request: `defcolor', supporting rgb, cmy, cmyk, and gray + definitions with both hex values and fractions. + + New escapes: \m and \M for drawing and background color, + respectively. This corresponds to the troff output commands `m' + and `DF'. + + groff and troff accept command line switch `-c' to disable color + output (which is automatically disabled in compatibility mode). + + New scaling indicator `f' for fractions (1f = 65536u). + + New conditional operator `m' to test for defined colors with `if' + and `ie'. + + New keywords `color' (or `colour', `colored', `coloured'), `outline' + (or `outlined'), and `shaded' added to pic. + + * src/include/color.h: New file. + * src/include/driver.h: Include it. + * src/include/printer.h: Include color.h. + (environment): New members `col' and `fill'. + (printer): Remove `adjust_arc_center' member function. + * src/include/Makefile.sub: Updated. + + * src/libs/libdriver/input.cc (do_file): Initialize `env.col' and + `env.fill'. + Handle `m' and `DF' troff commands. + * src/libs/libgroff/color.cc: New file. + * src/libs/libgroff/Makefile.sub: Updated. + + * src/preproc/html/pre-html.cc (IMAGE_BORDER_PIXELS): Set to 2. + (stop): Removed. + (createImage): Fix computation of `y2'. + Use `pnmcrop' also. + (buffer::write_file_html): Remove calls to `stop'. + + * src/preproc/pic/common.h (common_output): New abstract function + members `set_color', `reset_color', `get_last_filled', and + `get_outline_color'. + * src/preproc/pic/object.h: Add `IS_SHADED' and `IS_OUTLINED'. + (object_spec): Add members `shaded' and `outlined'. + * src/preproc/pic/output.h (output): `command' is now abstract. + New function members `set_color', `reset_color', `get_last_filled', + and `get_outline_color'. + * src/preproc/pic/lex.cc (lookup_keyword): Recognize `colo[u]r[ed]', + `outline[d]', and `shaded'. + * src/preproc/pic/object.cc (output::command): Removed. + (output::set_location): Moved to output.h. + (graphic_object): Add protected members `outline_color' and + `color_fill'. + Add member functions `set_outline_color', `get_outline_color', and + `set_fill_color'. + (closed_object): Add member function `set_fill_color'. + Add member `color_fill'. + (graphic_object::print_text): Use `out->set_color' and + `out->reset_color'. + (box_object::print, ellipse_object::print, circle_object::print, + line_object::print, spline_object::print, arc_object::print): Ditto. + (object_spec::make_object): Implement `IS_OUTLINED' and `IS_SHADED'. + * src/preproc/pic/pic.y: Add tokens `COLORED', `OUTLINED', and + `SHADED', making them `%left'. + Add rules `object_spec [SHADED|COLORED|OUTLINED] text'. + * src/preproc/pic/tex.cc (tex_output): New dummy function members + `set_color', `reset_color', `get_last_filled', and + `get_outline_color'. + * src/preproc/pic/troff.cc (simple_output): New abstract function + members `set_color', `reset_color', and `get_last_filled'. + (simple_output::polygon, simple_output::circle, + simple_output::ellipse): Use `get_last_filled'. + (troff_output): New members `last_filled' and `last_outlined'. + New function members `set_color', `reset_color', `get_last_filled', + and `get_outline_color'. + (troff_output::finish_picture): Use `reset_color'. + (troff_output::set_fill): Test `last_filled'. + * src/preproc/pic/pic.man: Updated. + + * src/roff/groff/groff.cc (main): Implement `-c' option. + (synopsis, help): Updated. + src/roff/groff/groff.man: Updated. + + * src/roff/troff/troff.h: Include color.h. + (warning_type): Add WARN_COLOR. + * src/roff/troff/env.h (environment): New members + `{cur,prev}_{glyph,fill}_color'. + New member functions `get_{prev_,}{glyph,fill}_color'. + * src/roff/troff/env.cc: Initialize and implement them. + * src/roff/troff/input.cc: New global variable `disable_color_flag'. + Replace `NULL' with `0' everywhere for consistency. + (lookup_color, default_black, do_glyph_color, do_fill_color, + get_color_element, read_rgb, read_cmy, read_cmyk, read_gray, + define_color): New functions. + (token::next): Implement \M and \m escapes. + (do_if_request): Implement `m' operator. + (usage): Updated. + (main): Implement `-c' option. + (init_markup_requests): Add `defcolor' request. + (warning_table): Add `color' warning. + * src/roff/troff/node.h (glyph_color_node, fill_color_node): New + classes. + * src/roff/troff/node.cc (troff_output_file): New members + `current_{page,glyph}color'. New member functions `put_hex', + `glyph_color', and `fill_color'. + (glyph_color_node::*, fill_color_node::*): Implement it. + * src/roff/troff/number.cc (SCALE_INDICATOR_CHARS): Add `f'. + (parse_term): Add support for `f'. + * src/roff/troff/troff.man: Updated. + + * src/devices/grodvi/dvi.cc (draw_dvi_printer::draw): Add dummy + entry for `F'. + * src/devices/grolbp/lbp.cc (lbp_printer::draw): Ditto. + * src/devices/grolj4/lj4.cc (lj4_printer::draw): Ditto. + + * src/devices/grohtml/html-text.h (HTML_TAG): Add COLOR_TAG. + (tag_definition): Use `void *' for arg1. + (html_text): New member functions `do_color' and `done_color'. + Use `void *' for second parameter of `push_para' member function. + New `push_para' member function with a single parameter. + Use `char *' for parameter of `issue_table_begin' member funtion. + New `issue_color_begin' member function. + * src/devices/grohtml/html-text.cc (html_text::end_tag): Handle + COLOR_TAG. + (html_text::issue_color_begin): New function. + (html_text::issue_table_begin): Use `char *' for parameter. + (html_text::start_tag, html_text::shutdown, + html_text::check_emit_text): Updated. + (html_text::push_para): Use `void *' for second parameter. + Add same function with only one parameter. + (html_text::do_*): Updated. + (html_text::do_color, html_text::done_color): New functions. + * src/devices/grohtml/post-html.cc (style): New member `col'. + Mew member `style' with 6 parameters. + (style::style, style::operator==): Updated. + (html_printer::do_font): Use it. + (html_printer::draw): Add dummy entry for `F'. + (html_printer::set_char): Updated. + * src/devices/grohtml/grohtml.man: Updated. + + * src/devices/grops/ps.cc (ps_output::put_float): Use `%g' to have + trailing zeroes removed. + (ps_printer): New members `sbuf_color', `fill_color', and + `output_color'. + Removed member `fill'. + New member function `set_color'. + (ps_printer::ps_printer, ps_printer::set_char): Updated. + (ps_printer::flush_sbuf, ps_printer::set_line_thickness, + ps_printer::fill_path, ps_printer::draw): Use `set_color'. + + * tmac/color-html.tmac, tmac/color.tmac: New files. + * tmac/troffrc: Include them. + * tmac/www.tmac (URL, FTP, MAILTO): Use blue color. + * tmac/Makefile.sub: Updated. + + * NEWS, doc/groff.texinfo, doc/pic.ms, man/groff_out.man, + man/groff.man: Updated. + * font/devps/prologue.ps: Define FC and CO functions. + +2001-10-04 Gaius Mulley + + Fix incorrect cropping of images and incorrect handling of special + characters. Fix handling of file names in \O. + + * src/include/geometry.h: New file. + * src/libs/libgroff/geometry.cc: New file. + * src/libs/libdriver/printer.cc (printer::adjust_arc_center): Moved + to `geometry.cc'. + * src/roff/troff/input.cc (get_delim_file_name): Fixed problem with + initial spaces. + (do_suppress): Updated. + * src/roff/troff/node.cc: Include geometry.h. + (troff_output_file::flush_tbuf): Fixed parameters to + `check_output_limits'. + (troff_output_file::check_charinfo): Ditto. + (troff_output_file::determine_line_limits): Add support for `Da' + and `Dl' commands. + + * src/devices/grohtml/post-html.cc (str_translate_to_html): + Add new parameter `is_special' to decode special characters from + escape sequences. + (html_printer::do_title, html_printer::do_heading, + html_printer::do_indentedparagraph, + html_printer::translate_to_html, html_printer::special): Updated. + +2001-10-03 Werner LEMBERG + + * Makefile.sub (DISTCLEANFILES): Add stamp-h. + Fix entry for config.h. + * test-groff (GROFF_BIN_PATH): Add $builddir/roff/groff. + * tmac/troffrc: Translate nonbreakable space character to `\~'. + * src/preproc/eqn/eqn.man: Document -d command line option. + +2001-09-27 Werner LEMBERG + + * man/groff.man: Use + + .ev xxx + .na + .nh + + .ev + + instead of the old code (`.ad .hy' after the table) to suppress + incorrect hyphenation for grohtml output. + +2001-09-22 Werner LEMBERG + + * man/groff_font.man, man/groff_out.man: Minor fixes. + +2001-09-20 Werner LEMBERG + + * PROBLEMS: Updated, reordered. Improved EPS section (thanks to + Arnold Robbins ). + +2001-09-09 Werner LEMBERG + + * configure: Regenerated with autoconf 2.52. + + * doc/groff.texinfo: Complete revision of indices. + +2001-09-07 Werner LEMBERG + + * doc/Makefile (clean): Updated to delete all indices. + +2001-09-05 Werner LEMBERG + + * src/roff/troff/troff.man: Remove superfluous line. + + * tmac/s.tmac: Enable all warnings only if no -W or -w option is + given on the command line (or rather, if only the default warnings + are set). + +2001-09-03 Werner LEMBERG + + * man/groff.man, src/preproc/eqn/eqn.man, tmac/groff_mdoc.man: Don't + use .ne for TTY devices. + +2001-08-31 Werner LEMBERG + + * src/roff/troff/token.h, src/roff/troff/input.cc: + s/TOKEN_TRANSPARENT_ESCAPE/TOKEN_OPAQUE_ESCAPE/. + +2001-08-28 Werner LEMBERG + + * src/roff/troff/token.h (token_type): Add TOKEN_TRANSPARENT_ESCAPE. + * src/roff/troff/input.cc (token::next): Return + TOKEN_TRANSPARENT_ESCAPE for \f, \H, \R, \s, and \S if not in + compatibility mode. + (token::description): Updated. + (process_input_stack): Reset `bol' for TOKEN_TRANSPARENT_ESCAPE. + (token::add_to_node_list, token::process): Ignore + TOKEN_TRANSPARENT_ESCAPE. + +2001-08-27 Werner LEMBERG + + * tmac/an-old.tmac: Fix `S' string. + +2001-08-26 Werner LEMBERG + + * src/roff/troff/troff.man: Don't use .ne for TTY devices. + +2001-08-25 Werner LEMBERG + + * doc/pic.ms: Replace `\\' with `\e' (and fixing some single + backslashes). + Many other minor fixes. + + * configure.ac: Add message at end to inform how to compile + xditview. + * configure: Regenerated. + +2001-08-24 Werner LEMBERG + + * src/include/getopt.h, src/libs/libgroff/{getopt.c, getopt1.c}: + Updated to latest version of libc. + +2001-08-23 Werner LEMBERG + + * configure.ac: Don't create subdirectories before AC_CONFIG_FILES. + Autoconf 2.50 and newer can handle this. + * configure: Regenerated. + +2001-08-21 Werner LEMBERG + + * doc/pic.ms: Fix typo. + * src/preproc/tbl/tbl.man: Document case of global options. + +2001-08-21 Gaius Mulley + + * src/devices/grohtml/post-html.cc (html_printer::end_font): Fix + handling of `CR' font. + +2001-08-20 Werner LEMBERG + + Use a config.h file. + + * src/include/lib.h: Include config.h. + * All C files: Ditto (if necessary). + * All C++ source and header files: Include lib.h first (if + necessary). + + * src/include/config.hin: New file (autogenerated by autoheader). + * stamp-h.in: New file. + * configure.ac: Updated. + * aclocal.m4: Add third parameters to AC_DEFINE macros. + (GROFF_ARRAY_DELETE): Simplified. + * Makefile.sub (DISTCLEANFILES): Updated. + Added targets for remaking config.status, config.hin, config.h, + stamp-h.in, and stamp-h. + * configure: Regenerated. + +2001-08-19 Werner LEMBERG + + * NEWS: Updated. + +2001-08-18 Sebastian Krahmer + + * src/preproc/pic/pic.y (format_number): Use do_sprintf(). + (do_sprintf): Use snprintf(). + +2001-08-18 Werner LEMBERG + + * src/libs/snprintf/*: Added an snprintf module written by Mark + Martinec. + * src/libs/libgroff/Makefile.sub: Updated. + * configure.ac: Add test for snprintf(). + * Makefile.in: Updated. + * configure: Regenerated. + + * src/preproc/html/pre-html.cc (make_message): Reactivate code which + uses snprintf(). + +2001-08-14 Ruslan Ermilov + + * tmac/doc.tmac (Ex): New implementation. + * tmac/doc-common, tmac/groff_tmac.man: Updated. + +2001-08-13 Ruslan Ermilov + + * tmac/doc.tmac (Rv): Implement support for 0 or more than 1 + argument. + * tmac/groff_tmac.man: Updated. + +2001-08-13 Werner LEMBERG + + * src/preproc/tbl/tbl.man: Minor documentation update. + +2001-08-13 John David Anglin + + * src/libs/libgroff/tmpname.cc: Add prototype for gettimeofday(). + * configure.ac: Add declaration test for gettimeofday(). + * Makefile.in: Document NEED_DECLARATION_GETTIMEOFDAY defines. + * aclocal.m4: Include sys/time.h for gettimeofday declaration test. + * configure: Regenerated. + +2001-08-11 Werner LEMBERG + + * aclocal.m4 (GROFF_MKSTEMP): Define HAVE_MKSTEMP. + * configure.ac: Add declaration test for strcasecmp(). + * Makefile.in: Updated. + * configure: Regenerated. + * src/include/lib.h [!HAVE_MKSTEMP]: Add prototype for mkstemp() -- + this is necessary because groff's mkstemp.cc is C++. + Add declaration conditionally for strcasecmp(). + +2001-08-10 Werner LEMBERG + + Integrated pic2graph, contributed by Eric S. Raymond. + + * contrib/pic2graph/{Makefile.sub, pic2graph.sh, pic2graph.man}: New + files. + * Makefile.in, NEWS: Updated. + + * src/preproc/tbl/tbl.man: Revised. + +2001-08-09 Eric S. Raymond + + * src/preproc/tbl/tbl.man: Extended to cover all tbl features. + +2001-08-09 Werner LEMBERG + + * src/preproc/tbl/main.cc (process_data): Fix recognition of .lf + requests. + +2001-08-08 Paul Eggert + + * Makefile.sub (configure): Depend on configure.ac, not + configure.in. + * INSTALL.gen: Upgrade to autoconf 2.52's INSTALL. + +2001-08-07 Werner LEMBERG + + * src/utils/afmtodit/afmtodit.man, src/roff/groff/groff.man: Minor + fixes. + +2001-08-06 Werner LEMBERG + + * src/roff/troff/troff.man: Improve documentation of -E option. + +2001-07-28 Ralph Corderoy + + * src/preproc/html/pushbackbuffer.cc (pushBackBuffer::readNumber): + Simplified. + +2001-07-27 Werner LEMBERG + + * src/preproc/refer/refer.cc: Undo last change. + * src/devices/grohtml/post-html.cc: Ditto. + +2001-07-26 Werner LEMBERG + + * src/preproc/refer/refer.cc: Include `lib.h'. + * src/devices/grohtml/post-html.cc: Ditto. + +2001-07-25 Gaius Mulley + + * aclocal.m4 (GROFF_PAGE): Add `AC_DEFINE(PAGEA4)'. + * src/preproc/html/pre-html.cc: Use it for DEFAULT_VERTICAL_OFFSET. + * Makefile.in: Comment updated. + * configure: Regenerated. + +2001-07-25 Werner LEMBERG + + * src/preproc/pic/pic.cc: Removed. + * src/preproc/pic/pic_tab.h: Removed. + * src/preproc/refer/label.cc: Removed. + + * doc/Makefile (.ms.html): Don't use a file name extension in + argument to grohtml's -I option. + * Makefile.in (dist): Remove CVS directories. + Call `distfiles' target. + + * src/devices/grohtml/grohtml.man: Add information about valid + versions of pnmtopng. + * src/preproc/html/pre-html.cc (TRANSPARENT): Use `white' as colour + name instead of number. + +2001-07-24 Werner LEMBERG + + * doc/groff.texinfo: Minor fixes. + +2001-07-21 Gaius Mulley + + * doc/Makefile (.ms.html): Put image files into a subdirectory. + (clean): Updated. + +2001-07-20 Werner LEMBERG + + * src/libs/libgroff/tmpname.cc: New file, defining get_tempname(). + * src/libs/libgroff/mkstemp.cc: New file. + * src/libs/libgroff/mksdir.cc: New file. + * src/libs/libgroff/tmpfile.cc [HAVE_MKSTEMP_PROTO]: Removed. + (xtmpfile) [!HAVE_MKSTEMP]: Removed. + * src/libs/libgroff/Makefile.sub: Updated. + * src/include/lib.h: Add mksdir() prototype. + * src/include/posix.h: Define S_IXUSR if not yet defined. + + * src/preproc/html/pre-html.cc (MAX_RETRIES): Removed. + (createAllPages): Use mksdir() instead of current code. + * src/utils/indxbib/indxbib.cc [HAVE_MKSTEMP_PROTO]: Removed. + (main): [!HAVE_MKSTEMP]: Removed. + + * aclocal.m4 (GROFF_MKSTEMP): Updated to use new mkstemp.cc file. + (GROFF_INTTYPES_H, GROFF_UNSIGNED_LONG_LONG, GROFF_UINTMAX_T): New + macros. + * configure.ac: Add tests for stdint.h, sys/time.h, and + gettimeofday(). + Call new GROFF_xxx macros. + * configure: Regenerated. + * Makefile.in: Comments updated. + +2001-07-20 Gaius Mulley + + * src/preproc/html/pre-html.cc (scanArguments): Use getopt_long() + instead of current code. + * src/devices/grohtml/post-html.cc (main): Handle `-d' option. + * src/roff/groff/groff.cc (possible_command::insert_args): New + function. + (main): Use it for predriver handling instead of insert_arg(). + +2001-07-19 Werner LEMBERG + + * doc/Makefile: Added GROFF_BIN_PATH to make it work with uninstalled + groff also. + + * src/include/posix.h: Define S_IWUSR if not yet defined. + +2001-07-18 Werner LEMBERG + + * NEWS: Updated. + +2001-07-18 Ruslan Ermilov + + * tmac/groff_mdoc.man: Document new -width and -column syntax. + Some other minor fixes. + * tmac/an-old.tmac: Add `AT' and `UC' macros. + +2001-07-17 Gaius Mulley + + Replace call to `troff' with `groff -Z' to make it aware of + GROFF_BIN_PATH. + + * src/preproc/html/pre-html.cc (TROFF_COMMAND): New macro. + (troff_command, command_prefix): Removed. + (alterDeviceTo): Use groff. + (addZ): New function. + (char_buffer::do_html): Use it. + (scanArguments): Use TROFF_COMMAND. + (findPrefix): Removed. + (main): Updated. + * src/roff/groff/groff.cc (main): Handle zflag for preprocessors. + +2001-07-17 Eric S. Raymond + + * doc/pic.ms: Documentation fixes. + +2001-07-17 Werner LEMBERG + + Replace atexit() with global destructor. + + * src/libs/libgroff/tmpfile.cc (xtmpfile_list): Add constructor. + (xtmpfile_list_init): New global structure to deallocate + xtmpfile_list on exit. Its destructor inherits most code from + remove_tmp_files(). + (remove_tmp_files): Deleted. + (add_tmp_file): Simplified. + +2001-07-16 Werner LEMBERG + + Replace strdup() with strsave(). + + * src/devices/grolbp/lbp.cc [!HAVE_STRDUP]: Removed. + (set_papersize): Use strsave() and a_delete. + (main): Use strsave(). + * src/preproc/html/pre-html.cc (make_message, createAllPages, + removeAllPages): Use strsave() and a_delete. + + * configure.ac: Remove test for strdup. + * Makefile.in: Comment updated. + * configure: Regenerated. + +2001-07-15 Werner LEMBERG + + * win32-diffs: Updated. + +2001-07-14 Werner LEMBERG + + * src/preproc/html/pre-html.cc (makeTempFiles): Activate new code, + removing the old one. + * src/utils/indxbib/indxbib.cc (main): Remove compiler warning. + +2001-07-14 Ralph Corderoy + + * src/libs/libgroff/tmpfile.cc (xtmpfile): Fix guard for `namep'. + +2001-07-12 Ruslan Ermilov + + Merge -xwidth into -width. Add -xwidth functionality to -column + also. + + * tmac/doc.tmac (Bl): Add dummy doc-typeXXX and doc-spaceXXX to + avoid warning. + (doc-do-Bl-args): Merge -xwidth code with -width. Test whether + string immediately following a leading dot starts with a valid mdoc + argument. + Add similar code to the -column branch. + (doc-Bl-usage): Updated. + * groff_mdoc.man: s/-xwidth/-width/. + +2001-07-12 Gaius Mulley + + * src/devices/grohtml/post-html.cc (text_glob::is_br): Stop titles + running into centered or non-formatted text. + +2001-07-11 Werner LEMBERG + + Introduce short and long prefixes to have the selection at run-time + whether there is a 8+3 limit for names of temporary files. + + * src/libs/libgroff/tmpfile.cc (TMPFILE_PREFIX): Replaced with... + (TMPFILE_PREFIX_SHORT, TMPFILE_PREFIX_LONG): This. + (tmpfile_prefix, tmpfile_prefix_len, use_short_prefix): New + variables. + (temp_init): New global structure to initialize above three + variables. + (xtmptemplate): Use two parameters for long and short prefix. + Simplify code use above three variables. + (xtmpfile): Use long and short prefixes as parameters. + * src/include/lib.h: Updated. + + * src/preproc/html/pre-html.cc ({PAGE,PS,REGION}_TEMPLATE): Replace + with ... + ({PAGE,PS,REGION}_TEMPLATE_{SHORT,LONG}): This. + (createAllPages, makeTempFiles): Updated. + +2001-07-09 Werner LEMBERG + + * REVISION: Increased to 3. + +Local Variables: +version-control: never +coding: latin-1 +End: diff --git a/contrib/groff/FDL b/contrib/groff/FDL index 79aa3726f8df..4a0fe1c8deeb 100644 --- a/contrib/groff/FDL +++ b/contrib/groff/FDL @@ -1,8 +1,9 @@ GNU Free Documentation License - Version 1.1, March 2000 + Version 1.2, November 2002 - Copyright (C) 2000 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. + 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. @@ -10,12 +11,12 @@ 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other -written document "free" in the sense of freedom: to assure everyone -the effective freedom to copy and redistribute it, with or without -modifying it, either commercially or noncommercially. Secondarily, -this License preserves for the author and publisher a way to get -credit for their work, while not being considered responsible for -modifications made by others. +functional and useful document "free" in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It @@ -33,11 +34,15 @@ principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work that contains a -notice placed by the copyright holder saying it can be distributed -under the terms of this License. The "Document", below, refers to any -such manual or work. Any member of the public is a licensee, and is -addressed as "you". +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The "Document", below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as "you". You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with @@ -47,7 +52,7 @@ A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly -within that overall subject. (For example, if the Document is in part a +within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, @@ -56,33 +61,40 @@ them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice -that says that the Document is released under this License. +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that -the Document is released under this License. +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the -general public, whose contents can be viewed and edited directly and +general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file -format whose markup has been designed to thwart or discourage -subsequent modification by readers is not Transparent. A copy that is -not "Transparent" is called "Opaque". +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple -HTML designed for human modification. Opaque formats include -PostScript, PDF, proprietary formats that can be read and edited only -by proprietary word processors, SGML or XML for which the DTD and/or +HTML, PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the -machine-generated HTML produced by some word processors for output -purposes only. +machine-generated HTML, PostScript or PDF produced by some word +processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material @@ -91,6 +103,21 @@ formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. +A section "Entitled XYZ" means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as "Acknowledgements", +"Dedications", "Endorsements", or "History".) To "Preserve the Title" +of such a section when you modify the Document means that it remains a +section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + 2. VERBATIM COPYING @@ -110,9 +137,10 @@ you may publicly display copies. 3. COPYING IN QUANTITY -If you publish printed copies of the Document numbering more than 100, -and the Document's license notice requires Cover Texts, you must enclose -the copies in covers that carry, clearly and legibly, all these Cover +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present @@ -130,16 +158,15 @@ pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy -a publicly-accessible computer-network location containing a complete -Transparent copy of the Document, free of added material, which the -general network-using public has access to download anonymously at no -charge using public-standard network protocols. If you use the latter -option, you must take reasonably prudent steps, when you begin -distribution of Opaque copies in quantity, to ensure that this -Transparent copy will remain thus accessible at the stated location -until at least one year after the last time you distribute an Opaque -copy (directly or through your agents or retailers) of that edition to -the public. +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give @@ -163,7 +190,8 @@ A. Use in the Title Page (and on the covers, if any) a title distinct B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the - Document (all of its principal authors, if it has less than five). + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. @@ -175,10 +203,10 @@ F. Include, immediately after the copyright notices, a license notice G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. -I. Preserve the section entitled "History", and its title, and add to - it an item stating at least the title, year, new authors, and +I. Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If - there is no section entitled "History" in the Document, create one + there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. @@ -189,17 +217,18 @@ J. Preserve the network location, if any, given in the Document for You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. -K. In any section entitled "Acknowledgements" or "Dedications", - preserve the section's title, and preserve in the section all the - substance and tone of each of the contributor acknowledgements +K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. -M. Delete any section entitled "Endorsements". Such a section +M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. -N. Do not retitle any existing section as "Endorsements" +N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. +O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material @@ -208,7 +237,7 @@ of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -You may add a section entitled "Endorsements", provided it contains +You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a @@ -236,7 +265,7 @@ License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its -license notice. +license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single @@ -247,11 +276,11 @@ author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -In the combination, you must combine any sections entitled "History" -in the various original documents, forming one section entitled -"History"; likewise combine any sections entitled "Acknowledgements", -and any sections entitled "Dedications". You must delete all sections -entitled "Endorsements." +In the combination, you must combine any sections Entitled "History" +in the various original documents, forming one section Entitled +"History"; likewise combine any sections Entitled "Acknowledgements", +and any sections Entitled "Dedications". You must delete all sections +Entitled "Endorsements". 6. COLLECTIONS OF DOCUMENTS @@ -268,23 +297,24 @@ License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. - 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or -distribution medium, does not as a whole count as a Modified Version -of the Document, provided no compilation copyright is claimed for the -compilation. Such a compilation is called an "aggregate", and this -License does not apply to the other self-contained works thus compiled -with the Document, on account of their being thus compiled, if they -are not themselves derivative works of the Document. +distribution medium, is called an "aggregate" if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these -copies of the Document, then if the Document is less than one quarter -of the entire aggregate, the Document's Cover Texts may be placed on -covers that surround only the Document within the aggregate. -Otherwise they must appear on covers around the whole aggregate. +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. 8. TRANSLATION @@ -295,10 +325,17 @@ Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a -translation of this License provided that you also include the -original English version of this License. In case of a disagreement -between the translation and the original English version of this -License, the original English version will prevail. +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", +"Dedications", or "History", the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. 9. TERMINATION @@ -317,8 +354,8 @@ parties remain in full compliance. The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. See -http:///www.gnu.org/copyleft/. +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this @@ -336,23 +373,25 @@ To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: - Copyright (c) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 - or any later version published by the Free Software Foundation; - with the Invariant Sections being LIST THEIR TITLES, with the - Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. - A copy of the license is included in the section entitled "GNU - Free Documentation License". + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". -If you have no Invariant Sections, write "with no Invariant Sections" -instead of saying which ones are invariant. If you have no -Front-Cover Texts, write "no Front-Cover Texts" instead of -"Front-Cover Texts being LIST"; likewise for Back-Cover Texts. +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. - - diff --git a/contrib/groff/INSTALL b/contrib/groff/INSTALL index c009b6de70ca..d540e5f0eb48 100644 --- a/contrib/groff/INSTALL +++ b/contrib/groff/INSTALL @@ -5,6 +5,9 @@ This file contains information that supplements those instructions. (For instructions how to build groff with DJGPP tools for MS-DOS and MS-Windows, see the file arch/djgpp/README.) +(For instructions how to build groff with the MinGW tools for +MS-Windows, see the file README.MinGW.) + groff is written in C++, so you will need a C++ compiler. The C++ source files use a suffix of `.cpp', so your C++ compiler must be able to handle this. If you don't already have a C++ compiler, I suggest @@ -25,26 +28,23 @@ an incorrect guess, say PAGE=xxx ./configure where `xxx' should be either `A4' or `letter'. Note that this will only -affect the paper selection for grops. For compatibility with ditroff, -the default page length in gtroff is always 11 inches. The page length -can be changed with the `pl' request. +affect the paper selection of some device drivers like grops (which can +be still overridden on the command line). For compatibility with +ditroff, the default page length in gtroff is always 11 inches. The +page length can be changed with the `pl' request. When you have built groff, you can use the test-groff script to try groff out on one of the man pages. (Use the .n files not the .man files.) The test-groff script sets up environment variables to allow -groff to run without being installed. The current directory must be -the build directory when the script is run. For example, you could do +groff to run without being installed. For example, you could do ./test-groff -man -Tascii src/roff/groff/groff.n | less -If you want to compile and install gxditview (an X11 previewer), -follow the instructions in the INSTALL file in the src/xditview -subdirectory. - To get a DVI, PDF, or HTML version of the groff texinfo manual, say `make groff.dvi', `make groff.pdf', or `make groff.html', respectively, in the -`doc' subdirectory (after compiling the groff package). Note that you -need texinfo version 4.3 or newer as a prerequisite. +`doc' subdirectory (after configuring the groff package). Note that you +need texinfo version 4.6 as a prerequisite. Neither older versions nor +texinfo 4.7 (due to a bug) will work. If you have problems, read the PROBLEMS file. If this doesn't help send a bug report using the form in the file BUG-REPORT. diff --git a/contrib/groff/INSTALL.gen b/contrib/groff/INSTALL.gen index 666ffd9f8aed..095b1eb40635 100644 --- a/contrib/groff/INSTALL.gen +++ b/contrib/groff/INSTALL.gen @@ -1,7 +1,16 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free +Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + Basic Installation ================== - These are generic installation instructions. +These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -61,21 +70,22 @@ The simplest way to compile this package is: Compilers and Options ===================== - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. - You can give `configure' initial values for variables by setting -them in the environment. You can do that on the command line like this: + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix - *Note Environment Variables::, for more details. + *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== - You can compile the package for more than one kind of computer at the +You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the @@ -84,27 +94,27 @@ the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. Installation Names ================== - By default, `make install' will install the package's files in +By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. +option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. +give `configure' the option `--exec-prefix=PREFIX', the package will +use PREFIX as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular +options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. @@ -115,7 +125,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= - Some packages pay attention to `--enable-FEATURE' options to +Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The @@ -130,10 +140,11 @@ you can use the `configure' options `--x-includes=DIR' and Specifying the System Type ========================== - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it cannot guess the host type, give it the +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: @@ -141,42 +152,37 @@ type, such as `sun4', or a canonical name which has the form: where SYSTEM can have one of these forms: - OS - KERNEL-OS + OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't -need to know the host type. +need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the host -platform (i.e., that on which the generated programs will eventually be -run) with `--host=TYPE'. In this case, you should also specify the -build platform with `--build=TYPE', because, in this case, it may not -be possible to guess the build platform (it sometimes involves -compiling and running simple test programs, and this can't be done if -the compiler is a cross compiler). +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. Sharing Defaults ================ - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. -Environment Variables -===================== +Defining Variables +================== - Variables not defined in a site shell script can be set in the -environment passed to configure. However, some packages may run +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: @@ -189,8 +195,7 @@ overridden in the site shell script). `configure' Invocation ====================== - `configure' recognizes the following options to control how it -operates. +`configure' recognizes the following options to control how it operates. `--help' `-h' diff --git a/contrib/groff/LICENSE b/contrib/groff/LICENSE new file mode 100644 index 000000000000..0f67f4235178 --- /dev/null +++ b/contrib/groff/LICENSE @@ -0,0 +1,21 @@ +LICENSE + +The groff program is a free software project. It is licensed under +the GNU General Public License (GNU GPL), version 2 or later. + +The file COPYING in the top directory of the groff source package +contains a copy of the GPL that was downloaded from the GNU web site +http://www.gnu.org/copyleft/gpl.txt at 1 dec 2003. + +All files of the groff source package are licensed under this version +of the GPL (or licenses which are compatible with the GPL). +You are free to choose version 2 or any subsequent version of the GPL. + +The GPL names an address where you can get the actual version by +normal post. Further information is found in the internet at +http://www.gnu.org/copyleft. + +The groff program is a GNU package, and the copyright of all files of +the groff source package which are under the GPL has been assigned to +the Free Sofware Foundation (FSF). Information on GNU and FSF is +found at http://www.fsf.org/. diff --git a/contrib/groff/MANIFEST b/contrib/groff/MANIFEST index c0ce12e74cb8..f8d32d0e593f 100644 --- a/contrib/groff/MANIFEST +++ b/contrib/groff/MANIFEST @@ -1,10 +1,10 @@ MANIFEST -Last update: 13 Apr 2003 +Last update: 26 May 2005 This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2001, 2003 Free Software Foundation, Inc. +Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc. written by Bernd Warken maintained by Werner Lemberg @@ -31,13 +31,14 @@ the groff source distribution. FDL The Free Documentation License (FDL). INSTALL Information on compiling and installing groff. INSTALL.gen Generic information on configuration and compiling. + LICENSE Licensing information. MANIFEST The file you are reading. MORE.STUFF Useful stuff in other packages. NEWS Recent user-visible changes in groff. PROBLEMS Tips to handle known critical situations. PROJECTS Long-term additions to groff. README Availability and contact information for groff. - README.WIN32 Documentation of the Win32 port of groff. + README.MinGW Build information for MinGW. TODO Things planned for future groff versions. All other files in the top directory are related to the configuration, @@ -48,13 +49,20 @@ the groff source distribution. ./arch Data that is special for different architectures. djgpp Data special for the 32-bit DOS compiler djgpp. + misc Data needed for various platforms. ./contrib Part of groff, but maintained by other people. eqn2graph Convert equations created with EQN into different graphical formats. + gdiffmk An improved implementation of the diffmk command to mark + differences between groff/nroff/troff files. + grap2graph Convert grap diagraps into different graphical formats. groffer A wrapper to conveniently view roff files. mm The groff mm macro package. mom The groff mom macro package. + pdfmark A package to add PDF marks to groff documents, together + with a shell script (pdfroff) for easy creation of PDF + documents. pic2graph Convert PIC diagrams into different graphical formats. ./doc Manuals and tutorials to groff aspects. @@ -85,6 +93,7 @@ the groff source distribution. grolj4 HP Laserjet 4, PCL 5, and compatible printers. grops PostScript output. grotty Text output. + xditview A groff (pre)viewer for the X Window system. ./src/include The *.h C/C++ include files. @@ -92,6 +101,7 @@ the groff source distribution. libbib Library of bibliographic functions. libdriver Parser for intermediate output and postprocessor code. libgroff Library for general support functions used everywhere. + libxutil Utility functions for xditview and xtotroff. snprintf An implementation of snprintf() and friends. ./src/preproc Preprocessors. @@ -118,8 +128,7 @@ the groff source distribution. lookbib Interactively search bibliographic databases. pfbtops Translate a PostScript font in PFB format to PFA. tfmtodit Create font description files for TeX DVI device. - -./src/xditview A groff (pre)viewer for the X Window System. + xtotroff Create font description files for xditview. ./tmac Macro files. diff --git a/contrib/groff/MORE.STUFF b/contrib/groff/MORE.STUFF index 46107a985978..b1c18f744b5d 100644 --- a/contrib/groff/MORE.STUFF +++ b/contrib/groff/MORE.STUFF @@ -1,8 +1,8 @@ More stuff for groff ==================== -win32 ------ +Windows 32 +---------- Here two ports using the gcc compiler and other GNU tools: @@ -32,7 +32,7 @@ from ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/gro*b.zip and its mirrors; for installation details please read `arch/djgpp/README'. -This port also runs on win32 systems, except Win2K. +This port also runs on Windows 32 systems, except Windows 2000. grap ---- @@ -43,14 +43,15 @@ can be found at http://www.lunabase.org/~faber/Vault/software/grap/ -A djgpp port which runs on dos and most win32 systems (Win95, Win98, -WinNT) done by Kees Zeelenberg is available from +A djgpp port which runs on dos and most Windows 32 systems (Windows 95, +Windows 98, Windows NT) done by Kees Zeelenberg +is available from ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2apps/ It is intended to be used with the djgpp port of groff. -A win32 port is included in the groff package available from +A Windows 32 port is included in the groff package available from http://gnuwin32.sourceforge.net/ @@ -110,14 +111,14 @@ cpp-style #line lines. http://www.moria.de/deroff/ -Version 1.6 compiled with DJGPP (for MS-DOS and all Win32 systems, i.e. -Win95, Win98, WinNT) is available from +Version 1.6 compiled with DJGPP (for MS-DOS and all Windows 32 systems, +i.e. Windows 95, Windows 98, Windows NT) is available from ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2apps/ and its mirrors. -A win32 port of version 1.8 is available from +A Windows 32 port of version 1.8 is available from http://gnuwin32.sourceforge.net/ diff --git a/contrib/groff/Makefile b/contrib/groff/Makefile index 024f48699bda..2a44c85f69aa 100644 --- a/contrib/groff/Makefile +++ b/contrib/groff/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. SHELL=/bin/sh diff --git a/contrib/groff/Makefile.ccpg b/contrib/groff/Makefile.ccpg index ec46a94e4758..3110df248f5f 100644 --- a/contrib/groff/Makefile.ccpg +++ b/contrib/groff/Makefile.ccpg @@ -9,7 +9,7 @@ MAKEFILEPARTS=\ all: $(PROG) $(MANPAGES) $(PROG): $(OBJS) $(XLIBS) - $(LINK.cpp) -o $@ $(OBJS) $(XLIBS) $(LIBS) $(MLIB) + $(LINK.cpp) -o $@ $(OBJS) $(XLIBS) $(EXTRA_LDFLAGS) $(LIBS) $(MLIB) install_bin: install_prog install_prog: $(PROG) diff --git a/contrib/groff/Makefile.comm b/contrib/groff/Makefile.comm index fd27b8eca373..fc34a5689496 100644 --- a/contrib/groff/Makefile.comm +++ b/contrib/groff/Makefile.comm @@ -1,4 +1,4 @@ -# Copyright (C) 1989-2000, 2002 Free Software Foundation, Inc. +# Copyright (C) 1989-2000, 2002, 2003, 2004 Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # # This file is part of groff. @@ -15,11 +15,10 @@ # # 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. # # Makefile.comm # -SHELL=/bin/sh INCLUDES=-I. -I$(srcdir) \ -I$(top_builddir)/src/include -I$(top_srcdir)/src/include ALL_CCFLAGS=$(INCLUDES) $(CCDEFINES) $(CCFLAGS) $(CPPFLAGS) @@ -31,6 +30,7 @@ LINK.c=$(CC) $(CFLAGS) $(LDFLAGS) LIBGROFF=$(top_builddir)/src/libs/libgroff/libgroff.$(LIBEXT) LIBBIB=$(top_builddir)/src/libs/libbib/libbib.$(LIBEXT) LIBDRIVER=$(top_builddir)/src/libs/libdriver/libdriver.$(LIBEXT) +LIBXUTIL=$(top_builddir)/src/libs/libxutil/libxutil.$(LIBEXT) MLIB= XLIBS= YTABH= @@ -93,22 +93,22 @@ realclean: distclean -rm -f $(REALCLEANFILES) extraclean: distclean - -rm -f \#* *~ =* core junk grot old temp tmp tem + -rm -f \#* *~ =* core junk grot old temp tmp tem *.new *.old *.orig .SUFFIXES: .SUFFIXES: .o .obj .cpp .c .y .man .n .cpp.o: - $(COMPILE.cpp) $< + $(COMPILE.cpp) $(EXTRA_CCFLAGS) $< .c.o: - $(COMPILE.c) $< + $(COMPILE.c) $(EXTRA_CFLAGS) $< .cpp.obj: - $(COMPILE.cpp) $< + $(COMPILE.cpp) $(EXTRA_CCFLAGS) $< .c.obj: - $(COMPILE.c) $< + $(COMPILE.c) $(EXTRA_CFLAGS) $< .y.cpp: if test -n "$(YTABH)"; then \ @@ -119,7 +119,7 @@ extraclean: distclean -test -f y.tab.h && mv y.tab.h y_tab.h -test -f y.tab.c && mv y.tab.c y_tab.c mv y_tab.c $(YTABC) - if test -n "$(YTABH)"; then mv y_tab.h $(YTABH); fi + test -z "$(YTABH)" || mv y_tab.h $(YTABH) # The next rule is needed for make of Solaris 2.5.1 to override its # built-in .y.o rule (which takes precedence over the .y.cpp rule above). @@ -132,8 +132,8 @@ extraclean: distclean -test -f y.tab.h && mv y.tab.h y_tab.h -test -f y.tab.c && mv y.tab.c y_tab.c mv y_tab.c $(YTABC) - if test -n "$(YTABH)"; then mv y_tab.h $(YTABH); fi - $(COMPILE.cpp) $(YTABC) + test -z "$(YTABH)" || mv y_tab.h $(YTABH) + $(COMPILE.cpp) $(EXTRA_CCFLAGS) $(YTABC) .man.n: @echo Making $@ from $< @@ -148,6 +148,7 @@ extraclean: distclean -e "s|@DOCDIR@|$(docdir)|g" \ -e "s|@EXAMPLEDIR@|$(exampledir)|g" \ -e "s|@HTMLDOCDIR@|$(htmldocdir)|g" \ + -e "s|@PDFDOCDIR@|$(pdfdocdir)|g" \ -e "s|@DEVICE@|$(DEVICE)|g" \ -e "s|@DEFAULT_INDEX@|$(indexdir)/$(indexname)|g" \ -e "s|@DEFAULT_INDEX_NAME@|$(indexname)|g" \ @@ -235,32 +236,35 @@ install_dev: -test -d $(fontdir) || $(mkinstalldirs) $(fontdir) -test -d $(fontsubdir) || $(mkinstalldirs) $(fontsubdir) -if test -d $(srcdir)/generate; then \ - test -d $(fontsubdir)/generate || \ - $(mkinstalldirs) $(fontsubdir)/generate; \ + test -d $(fontsubdir)/generate \ + || $(mkinstalldirs) $(fontsubdir)/generate; \ fi - -for f in $(DEVFILES); do \ - rm -f $(fontsubdir)/$$f; \ - if test -f $$f; then \ - $(INSTALL_DATA) $$f $(fontsubdir)/$$f; \ - else \ - $(INSTALL_DATA) $(srcdir)/$$f $(fontsubdir)/$$f; \ - fi; \ - done - -for f in $(DEVSCRIPTS); do \ - rm -f $(fontsubdir)/$$f; \ - if test -f $$f; then \ - $(INSTALL_SCRIPT) $$f $(fontsubdir)/$$f; \ - else \ - $(INSTALL_SCRIPT) $(srcdir)/$$f $(fontsubdir)/$$f; \ - fi; \ - done + -test -z "$(DEVFILES)" \ + || for f in ""$(DEVFILES); do \ + rm -f $(fontsubdir)/$$f; \ + if test -f $$f; then \ + $(INSTALL_DATA) $$f $(fontsubdir)/$$f; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$f $(fontsubdir)/$$f; \ + fi; \ + done + -test -z "$(DEVSCRIPTS)" \ + || for f in ""$(DEVSCRIPTS); do \ + rm -f $(fontsubdir)/$$f; \ + if test -f $$f; then \ + $(INSTALL_SCRIPT) $$f $(fontsubdir)/$$f; \ + else \ + $(INSTALL_SCRIPT) $(srcdir)/$$f $(fontsubdir)/$$f; \ + fi; \ + done .PHONY: uninstall_dev uninstall_dev: - -for f in $(DEVFILES) $(DEVSCRIPTS); do rm -f $(fontsubdir)/$$f; done - -if test -d $(fontsubdir)/generate; then \ - rmdir $(fontsubdir)/generate; \ - fi + -test -z "$(DEVFILES)$(DEVSCRIPTS)" \ + || for f in ""$(DEVFILES) $(DEVSCRIPTS); do \ + rm -f $(fontsubdir)/$$f; \ + done + -test -d $(fontsubdir)/generate && rmdir $(fontsubdir)/generate -rmdir $(fontsubdir) .PHONY: depend_src @@ -278,10 +282,9 @@ depend.temp: FORCE || $(CCC) $(ALL_CCFLAGS) -MM $(CCSRCS) $$ytabc >>depend.temp test -z "$(CSRCS)" \ || $(CC) $(ALL_CFLAGS) -MM $(CSRCS) >>depend.temp - if test -n "$(YTABH)"; then \ - sed -e 's|$(YTABH)|$(YTABC)|g' depend.temp >depend1.temp; \ - mv depend1.temp depend.temp; \ - fi + test -z "$(YTABH)" \ + || (sed -e 's|$(YTABH)|$(YTABC)|g' depend.temp >depend1.temp; \ + mv depend1.temp depend.temp) .PHONY: TAGS_src TAGS_src: diff --git a/contrib/groff/Makefile.cpg b/contrib/groff/Makefile.cpg index b7af68c34b41..1a6974ad5a83 100644 --- a/contrib/groff/Makefile.cpg +++ b/contrib/groff/Makefile.cpg @@ -9,7 +9,7 @@ MAKEFILEPARTS=\ all: $(PROG) $(MANPAGES) $(PROG): $(OBJS) $(XLIBS) - $(LINK.c) -o $@ $(OBJS) $(XLIBS) $(LIBS) $(MLIB) + $(LINK.c) -o $@ $(OBJS) $(XLIBS) $(EXTRA_LDFLAGS) $(LIBS) $(MLIB) install_bin: install_prog install_prog: $(PROG) diff --git a/contrib/groff/Makefile.in b/contrib/groff/Makefile.in index 765eee56513e..26d55dee11bd 100644 --- a/contrib/groff/Makefile.in +++ b/contrib/groff/Makefile.in @@ -1,4 +1,5 @@ -# 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. @@ -15,13 +16,23 @@ # # 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. + +SHELL=@SHELL@ srcdir=@srcdir@ -top_srcdir=@top_srcdir@ +top_srcdir=@abs_top_srcdir@ VPATH=@srcdir@ -top_builddir=@groff_top_builddir@ -SEP=@PATH_SEPARATOR@ +top_builddir=@abs_top_builddir@ + +# `RT_SEP' is the operating system's native PATH SEPARATOR CHAR, which +# is to be used in runtime PATHs compiled into groff executables. +RT_SEP=@GROFF_PATH_SEPARATOR@ + +# `SH_SEP' is a alternative PATH SEPARATOR CHAR, to be used in shell +# scripts and makefile rules; it may be the same as `RT_SEP', but, +# particularly in some Microsoft environments, it may differ. +SH_SEP=@PATH_SEPARATOR@ version=`cat $(top_srcdir)/VERSION` # No additional number if revision is zero. @@ -32,6 +43,18 @@ revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION` # world). PAGE=@PAGE@ +# The name of the ghostscript program. Normally, gs, on GNU/Linux +# but it might be different on MS-DOS/MS-WIN32 systems. +GHOSTSCRIPT=@GHOSTSCRIPT@ + +# `ALT_GHOSTSCRIPT_PROGS' specifies a list alternative names, +# which can be tried if `GHOSTSCRIPT' cannot be found at run time. +ALT_GHOSTSCRIPT_PROGS=@ALT_GHOSTSCRIPT_PROGS@ + +# Similarly, `ALT_AWK_PROGS' specifies a list of alternative names, +# which can be tried at run time, to identify the awk program. +ALT_AWK_PROGS=@ALT_AWK_PROGS@ + # Normally the Postscript driver, grops, produces output that conforms # to version 3.0 of the Adobe Document Structuring Conventions. # Unfortunately some spoolers and previewers can't handle such output. @@ -58,6 +81,15 @@ BROKEN_SPOOLER_FLAGS=@BROKEN_SPOOLER_FLAGS@ # `DEVICE' is the default device. DEVICE=ps +# `XDEVDIRS' is either `font/devX{75,100}{,-12}' or empty. +XDEVDIRS=@XDEVDIRS@ + +# `XPROGDIRS' is either `src/devices/xditview src/utils/xtotroff' or empty. +XPROGDIRS=@XPROGDIRS@ + +# `XLIBDIRS' is either `src/libs/libxutil' or empty. +XLIBDIRS=@XLIBDIRS@ + # `TTYDEVDIRS' is either `font/devascii font/devlatin1' (for # ASCII) or `font/devcp1047' (for EBCDIC) plus font/devutf8. TTYDEVDIRS=@TTYDEVDIRS@ font/devutf8 @@ -111,6 +143,9 @@ exampledir=$(docdir)/examples # `htmldocdir' says where to install documentation in HTML format. htmldocdir=$(docdir)/html +# `pdfdocdir' says where to install documentation in PDF format. +pdfdocdir=$(docdir)/pdf + # `fontdir' says where to install dev*/*. fontdir=$(datasubdir)/font @@ -121,7 +156,7 @@ localfontdir=$(dataprogramdir)/site-font legacyfontdir=/usr/lib/font # `fontpath' says where to look for dev*/*. -fontpath=$(localfontdir)$(SEP)$(fontdir)$(SEP)$(legacyfontdir) +fontpath=$(localfontdir)$(RT_SEP)$(fontdir)$(RT_SEP)$(legacyfontdir) # `tmacdir' says where to install macros. tmacdir=$(datasubdir)/tmac @@ -132,12 +167,16 @@ systemtmacdir=$(libprogramdir)/site-tmac # `localtmacdir' says where local files will be installed. localtmacdir=$(dataprogramdir)/site-tmac +# `appresdir' says where to install the application resource file for +# gxditview. +appresdir=@appresdir@ + # `tmacpath' says where to look for macro files. # The current directory will be prepended in unsafe mode only; the home # directory will be always added. # `troffrc' and `troffrc-end' (and `eqnrc') are searched neither in the # current nor in the home directory. -tmacpath=$(systemtmacdir)$(SEP)$(localtmacdir)$(SEP)$(tmacdir) +tmacpath=$(systemtmacdir)$(RT_SEP)$(localtmacdir)$(RT_SEP)$(tmacdir) # `sys_tmac_prefix' is prefix (if any) for system macro packages. sys_tmac_prefix=@sys_tmac_prefix@ @@ -206,6 +245,11 @@ man7dir=$(manroot)/man$(man7ext) make_html=@make_html@ make_install_html=@make_install_html@ +# The configure script also checks whether all necessary utility programs +# for pdfroff are available -- only then we can build PDF documentation. +make_pdfdoc=@make_pdfdoc@ +make_install_pdfdoc=@make_install_pdfdoc@ + # DEFINES should include the following: # -DHAVE_MMAP if you have mmap() and # -DARRAY_DELETE_NEEDS_SIZE if your C++ doesn't understand `delete []' @@ -220,7 +264,7 @@ make_install_html=@make_install_html@ # -DHAVE_CC_LIMITS_H if you have a C++ # -DHAVE_MATH_H if you have # -DHAVE_CC_OSFCN_H if you have a C++ -# -DHAVE_CC_STDINT_H if you have a C++ +# -DHAVE_CC_INTTYPES_H if you have a C++ # -DHAVE_STDLIB_H if you have # -DHAVE_STRING_H if you have # -DHAVE_STRINGS_H if you have @@ -232,6 +276,7 @@ make_install_html=@make_install_html@ # -DHAVE_GETCWD if you have getcwd() # -DHAVE_GETTIMEOFDAY if you have gettimeofday() # -DHAVE_ISATTY if you have isatty() +# -DHAVE_KILL if you have kill() # -DHAVE_MKSTEMP if you have mkstemp() # -DHAVE_MMAP if you have mmap() # -DHAVE_PUTENV if you have putenv() @@ -243,6 +288,7 @@ make_install_html=@make_install_html@ # -DHAVE_STRERROR if you have strerror() # -DHAVE_STRSEP if you have strsep() # -DHAVE_STRTOL if you have strtol() +# -DHAVE_VSNPRINTF if you have vsnprintf() # # -DNEED_DECLARATION_GETTIMEOFTODAY # if your C++ doesn't declare @@ -250,15 +296,21 @@ make_install_html=@make_install_html@ # -DNEED_DECLARATION_HYPOT if your C++ doesn't declare hypot() # -DNEED_DECLARATION_PCLOSE if your C++ doesn't declare pclose() # -DNEED_DECLARATION_POPEN if your C++ doesn't declare popen() -# -DNEED_DECLARATION_PUTENV if your C++ doesn't declare putenv() +# -DNEED_DECLARATION_PUTENV if your C++ doesn't declare +# putenv() # -DNEED_DECLARATION_RAND if your C++ doesn't declare rand() -# -DNEED_DECLARATION_SNPRINTF if your C++ doesn't declare snprintf() +# -DNEED_DECLARATION_SNPRINTF if your C++ doesn't declare +# snprintf() # -DNEED_DECLARATION_SRAND if your C++ doesn't declare srand() # -DNEED_DECLARATION_STRCASECMP if your C++ doesn't declare # strcasecmp() # -DNEED_DECLARATION_STRNCASECMP # if your C++ doesn't declare # strncasecmp() +# -DNEED_DECLARATION_VFPRINTF if your C++ doesn't declare +# vfprintf() +# -DNEED_DECLARATION_VSNPRINTF if your C++ doesn't declare +# vsnprintf() # # -DRET_TYPE_SRAND_IS_VOID if srand() returns void not int # -DHAVE_SYS_NERR if you have sysnerr in or @@ -270,7 +322,9 @@ make_install_html=@make_install_html@ # -DHAVE_STRUCT_EXCEPTION if defines struct exception # -DRETSIGTYPE=int if signal handlers return int not void # -DIS_EBCDIC_HOST if the host's encoding is EBCDIC -# -DPAGEA4 if the the printer's page size is A4 +# -DPAGE=A4 if the the printer's page size is A4 +# -DGHOSTSCRIPT=gs the name (and directory if required) of the +# ghostscript program DEFINES=@DEFS@ # Include @@ -279,6 +333,7 @@ DEFINES=@DEFS@ # strerror,strncasecmp,strtol}.$(OBJEXT) # # in LIBOBJS if your C library is missing the corresponding function. +# vsnprintf is defined in the snprintf.$(OBJEXT) module. LIBOBJS=@LIBOBJS@ # `CCC' is the compiler for C++ (.cpp) files. @@ -291,7 +346,14 @@ CDEFINES=$(DEFINES) CCFLAGS=@CXXFLAGS@ CFLAGS=@CFLAGS@ +CPPFLAGS=@CPPFLAGS@ LDFLAGS=@LDFLAGS@ + +X_CFLAGS=@X_CFLAGS@ +X_LIBS=@X_LIBS@ +X_EXTRA_LIBS=@X_EXTRA_LIBS@ +X_PRE_LIBS=@X_PRE_LIBS@ + YACC=@YACC@ YACCFLAGS=-v @@ -317,9 +379,11 @@ ETAGSCCFLAG=-C PERLPATH=@PERLPATH@ # Sed command with which to edit sh scripts. SH_SCRIPT_SED_CMD=@SH_SCRIPT_SED_CMD@ +# Sed script to deal with OS dependencies in sh scripts. +SH_DEPS_SED_SCRIPT=$(top_builddir)/arch/misc/shdeps.sed # The program to create directory hierarchies. -mkinstalldirs=$(top_srcdir)/mkinstalldirs +mkinstalldirs= $(SHELL) $(top_srcdir)/mkinstalldirs PURIFY=purify PURIFYCCFLAGS= @@ -330,6 +394,8 @@ PURIFYCCFLAGS= # copy of $(MDEFINES) when making individual directories; this could # cause the argument list to become too long on some systems. MDEFINES= \ + "ALT_AWK_PROGS=$(ALT_AWK_PROGS)" \ + "ALT_GHOSTSCRIPT_PROGS=$(ALT_GHOSTSCRIPT_PROGS)" \ "AR=$(AR)" \ "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \ "CC=$(CC)" \ @@ -338,6 +404,7 @@ MDEFINES= \ "CCFLAGS=$(CCFLAGS)" \ "CDEFINES=$(CDEFINES)" \ "CFLAGS=$(CFLAGS)" \ + "CPPFLAGS=$(CPPFLAGS)" \ "DEVICE=$(DEVICE)" \ "DVIPRINT=$(DVIPRINT)" \ "ETAGS=$(ETAGS)" \ @@ -357,16 +424,28 @@ MDEFINES= \ "OBJEXT=$(OBJEXT)" \ "OTHERDEVDIRS=$(OTHERDEVDIRS)" \ "PAGE=$(PAGE)" \ + "GHOSTSCRIPT=$(GHOSTSCRIPT)" \ "PERLPATH=$(PERLPATH)" \ "PSPRINT=$(PSPRINT)" \ "PURIFY=$(PURIFY)" \ "PURIFYCCFLAGS=$(PURIFYCCFLAGS)" \ "RANLIB=$(RANLIB)" \ - "SEP=$(SEP)" \ + "RT_SEP=$(RT_SEP)" \ + "SH_SEP=$(SH_SEP)" \ + "SHELL=$(SHELL)" \ "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \ + "SH_DEPS_SED_SCRIPT=$(SH_DEPS_SED_SCRIPT)" \ "TTYDEVDIRS=$(TTYDEVDIRS)" \ + "XDEVDIRS=$(XDEVDIRS)" \ + "XLIBDIRS=$(XLIBDIRS)" \ + "XPROGDIRS=$(XPROGDIRS)" \ + "X_CFLAGS=$(X_CFLAGS)" \ + "X_LIBS=$(X_LIBS)" \ + "X_EXTRA_LIBS=$(X_EXTRA_LIBS)" \ + "X_PRE_LIBS=$(X_PRE_LIBS)" \ "YACC=$(YACC)" \ "YACCFLAGS=$(YACCFLAGS)" \ + "appresdir=$(appresdir)" \ "bindir=$(bindir)" \ "common_words_file=$(common_words_file)" \ "datadir=$(datadir)" \ @@ -379,6 +458,7 @@ MDEFINES= \ "fontpath=$(fontpath)" \ "g=$(g)" \ "htmldocdir=$(htmldocdir)" \ + "pdfdocdir=$(pdfdocdir)" \ "indexdir=$(indexdir)" \ "indexext=$(indexext)" \ "indexname=$(indexname)" \ @@ -390,6 +470,8 @@ MDEFINES= \ "localtmacdir=$(localtmacdir)" \ "make_html=$(make_html)" \ "make_install_html=$(make_install_html)" \ + "make_pdfdoc=$(make_pdfdoc)" \ + "make_install_pdfdoc=$(make_install_pdfdoc)" \ "man1dir=$(man1dir)" \ "man1ext=$(man1ext)" \ "man5dir=$(man5dir)" \ @@ -413,12 +495,12 @@ MDEFINES= \ "top_srcdir=$(top_srcdir)" \ "version=$(version)" -SHELL=/bin/sh INCDIRS=src/include LIBDIRS=\ src/libs/libgroff \ src/libs/libdriver \ - src/libs/libbib + src/libs/libbib \ + $(XLIBDIRS) CCPROGDIRS=\ src/roff/groff \ src/roff/troff \ @@ -441,40 +523,42 @@ CCPROGDIRS=\ src/utils/indxbib \ src/utils/lkbib \ src/utils/addftinfo -CPROGDIRS=src/utils/pfbtops -PROGDIRS=$(CCPROGDIRS) $(CPROGDIRS) +CPROGDIRS=\ + src/utils/pfbtops \ + $(XPROGDIRS) +PROGDEPDIRS=arch/misc +PROGDIRS=$(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS) DEVDIRS=\ font/devps \ font/devdvi \ - font/devX75 \ - font/devX75-12 \ - font/devX100 \ - font/devX100-12 \ font/devhtml ALLTTYDEVDIRS=\ font/devascii \ font/devlatin1 \ font/devutf8 \ font/devcp1047 +# `doc' must be processed before `contrib/pdfmark'. OTHERDIRS=\ man \ tmac \ src/utils/afmtodit \ src/roff/grog \ src/roff/nroff \ + doc \ contrib/mm \ contrib/pic2graph \ contrib/eqn2graph \ + contrib/grap2graph \ contrib/groffer \ contrib/mom \ - doc + contrib/pdfmark \ + contrib/gdiffmk ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \ - $(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS) + $(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS) EXTRADIRS=\ font/devps/generate \ font/devdvi/generate \ font/devlj4/generate \ - src/xditview \ doc NOMAKEDIRS=\ arch/djgpp \ @@ -482,9 +566,10 @@ NOMAKEDIRS=\ contrib/mm/mm \ contrib/mom/examples \ contrib/mom/momdoc \ + contrib/gdiffmk/tests \ src/libs/snprintf DISTDIRS=\ - $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDEVDIRS) \ + $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) \ $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS) TARGETS=all install install_bin install_data clean distclean mostlyclean \ realclean extraclean distfiles TAGS depend uninstall_sub @@ -493,8 +578,8 @@ TARGETS=all install install_bin install_data clean distclean mostlyclean \ # where Make needs to be case-sensitive to find files like BI and VERSION. ENVSETUP=\ if test -f $(srcdir)/makefile.ccpg* && \ - test -f $(srcdir)/Makefile.ccpg*; \ - then FNCASE=y; export FNCASE; \ + test -f $(srcdir)/Makefile.ccpg*; then \ + FNCASE=y; export FNCASE; \ else :; \ fi @@ -515,9 +600,10 @@ dot: FORCE $(LIBDIRS): FORCE @$(ENVSETUP); \ - if test $(srcdir) = .; \ - then srcdir=.; \ - else srcdir=`cd $(srcdir); pwd`/$@; \ + if test $(srcdir) = .; then \ + srcdir=.; \ + else \ + srcdir=`cd $(srcdir); pwd`/$@; \ fi; \ test -d $@ || $(mkinstalldirs) $@; \ cd $@; \ @@ -530,9 +616,10 @@ $(LIBDIRS): FORCE $(CPROGDIRS): FORCE @$(ENVSETUP); \ - if test $(srcdir) = .; \ - then srcdir=.; \ - else srcdir=`cd $(srcdir); pwd`/$@; \ + if test $(srcdir) = .; then \ + srcdir=.; \ + else \ + srcdir=`cd $(srcdir); pwd`/$@; \ fi; \ test -d $@ || $(mkinstalldirs) $@; \ cd $@; \ @@ -545,9 +632,10 @@ $(CPROGDIRS): FORCE $(CCPROGDIRS): FORCE @$(ENVSETUP); \ - if test $(srcdir) = .; \ - then srcdir=.; \ - else srcdir=`cd $(srcdir); pwd`/$@; \ + if test $(srcdir) = .; then \ + srcdir=.; \ + else \ + srcdir=`cd $(srcdir); pwd`/$@; \ fi; \ test -d $@ || $(mkinstalldirs) $@; \ cd $@; \ @@ -558,11 +646,12 @@ $(CCPROGDIRS): FORCE -f $(top_srcdir)/Makefile.ccpg \ -f Makefile.dep $(do) -$(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE +$(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE @$(ENVSETUP); \ - if test $(srcdir) = .; \ - then srcdir=.; \ - else srcdir=`cd $(srcdir); pwd`/$@; \ + if test $(srcdir) = .; then \ + srcdir=.; \ + else \ + srcdir=`cd $(srcdir); pwd`/$@; \ fi; \ test -d $@ || $(mkinstalldirs) $@; \ cd $@; \ @@ -571,11 +660,12 @@ $(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE -f $$srcdir/Makefile.sub \ -f $(top_srcdir)/Makefile.dev $(do) -$(INCDIRS) $(OTHERDIRS): FORCE +$(INCDIRS) $(PROGDEPDIRS) $(OTHERDIRS): FORCE @$(ENVSETUP); \ - if test $(srcdir) = .; \ - then srcdir=.; \ - else srcdir=`cd $(srcdir); pwd`/$@; \ + if test $(srcdir) = .; then \ + srcdir=.; \ + else \ + srcdir=`cd $(srcdir); pwd`/$@; \ fi; \ test -d $@ || $(mkinstalldirs) $@; \ cd $@; \ @@ -605,7 +695,12 @@ dist: $(MAKE) srcdir=. VPATH=. distfiles; \ $(MAKE) srcdir=. VPATH=. extraclean; \ for d in $(EXTRADIRS); do \ - (cd $$d; $(MAKE) extraclean); \ + (cd $$d; \ + if test -f Makefile; then \ + $(MAKE) extraclean; \ + else \ + $(MAKE) -f $(top_builddir)/$$d/Makefile extraclean; \ + fi); \ done; \ rm -f Makefile; \ $(LN_S) $$srcdir/Makefile.init Makefile @@ -644,13 +739,37 @@ uninstall_dirs: -rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \ $(tmacdir) $(systemtmacdir) $(localtmacdir) \ $(fontdir) $(localfontdir) $(bindir) \ - $(datasubdir) $(dataprogramdir) $(datadir) $(infodir) \ - $(exampledir) $(htmldocdir) $(docdir) \ - $(libprogramdir) $(libdir) + $(datasubdir) $(dataprogramdir) $(infodir) \ + $(exampledir) $(htmldocdir) $(pdfdocdir) $(docdir) \ + $(libprogramdir) $(libdir) \ + $(datadir)/doc/groff $(datadir)/doc $(datadir) 2>/dev/null || : +.PHONY: check docheck +check: site.exp docheck -.PHONY: check -check: +docheck: + if $(SHELL) -c "runtest --version" > /dev/null 2>&1; then \ + runtest; \ + else \ + echo "WARNING: could not find \`runtest'" 1>&2; \ + fi + +# This snippet has been taken from the automake package. + +site.exp: + @echo "Making a new site.exp file..." + @echo "## these variables are automatically generated by make ##" >site.tmp + @echo "# Do not edit here. If you wish to override these values" >>site.tmp + @echo "# edit the last section" >>site.tmp + @echo "set tool groff" >>site.tmp + @echo "set srcdir $(srcdir)/testsuite" >>site.tmp + @echo "set objdir `pwd`" >> site.tmp + @echo "## All variables above are generated by configure. Do not edit! ##" >> site.tmp + @test ! -f site.exp \ + || sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp + @-rm -f site.bak + @test ! -f site.exp || mv site.exp site.bak + @mv site.tmp site.exp FORCE: diff --git a/contrib/groff/Makefile.init b/contrib/groff/Makefile.init index 024f48699bda..2a44c85f69aa 100644 --- a/contrib/groff/Makefile.init +++ b/contrib/groff/Makefile.init @@ -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. SHELL=/bin/sh diff --git a/contrib/groff/Makefile.sub b/contrib/groff/Makefile.sub index 689fd63af177..2652363020e1 100644 --- a/contrib/groff/Makefile.sub +++ b/contrib/groff/Makefile.sub @@ -4,9 +4,12 @@ DISTCLEANFILES=\ config.cache \ stamp-h \ Makefile \ - src/xditview/Imakefile \ - $(srcdir)/src/xditview/gxditview._man \ - src/include/config.h + test-groff \ + src/include/config.h \ + site.exp \ + site.bak \ + groff.sum \ + groff.log CLEANADD=Makefile.cfg conftest* distfiles: configure @@ -26,3 +29,7 @@ $(srcdir)/stamp-h.in: configure.ac aclocal.m4 config.h: stamp-h stamp-h: config.hin config.status $(SHELL) config.status + +# Always create the site-font directory as a guide to the user. +install_data: + -test -d $(localfontdir) || $(mkinstalldirs) $(localfontdir) diff --git a/contrib/groff/NEWS b/contrib/groff/NEWS index d99f3a3a44c4..0272def4b2e9 100644 --- a/contrib/groff/NEWS +++ b/contrib/groff/NEWS @@ -1,6 +1,309 @@ This file describes recent user-visible changes in groff. Bug fixes are not described. There are more details in the man and info pages. +VERSION 1.19.2 +============== + +Troff +----- + +o Analogously to the .ft and \f pair, two new requests `gcolor' and + `fcolor' (which pair with \m and \M, respectively) have been added to + set the glyph and background colours. + +o A new read-only, string-valued register `.sty' returns the name of the + current style. + +o Two new conditional operators `F ' and `S ' have been added. + `F' is true if a font exists. `S' is true if a style has + been registered. + +o Cyrillic characters have been added to the `utf8' and `html' output + devices. + +Pic +--- + +o 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 +--- + +o The following keywords aren't new but haven't been documented previously: + + undef NAME (to undefine a macro) + copy "FILE" (a synonym for `include') + space n (to modify the vertical spacing before and after + an equation) + +o The following macros aren't new but haven't been documented previously: + + Alpha, ..., Omega (the same as `ALPHA', ..., `OMEGA') + ldots (three dots on the base line) + dollar (a dollar glyph) + +o The following keywords have been extended. Again, this isn't new but + hasn't been documented previously: + + col n { ... } + lcol n { ... } + rcol n { ... } + ccol n { ... } + pile n { ... } + lpile n { ... } + rpile n { ... } + cpile n { ... } (set vertical spacing between rows to N) + +Grohtml +------- + +o This device driver has been raised to beta stage; its set of tags should + be stable now. + +o New command line option `-s' to set the base point size. + +o New command line option `-S' to set the split level while generating + multiple files. + +Grotty +------ + +o Experimental support for zero-width and double-width characters. + +Gxditview +--------- + +o On platforms which have the X Window System this program is now built and + installed automatically. + +Xtotroff +-------- + +o This program to create font definition files for xditview isn't new but + hasn't been installed previously. + +Groffer +------- + +o A security problem (reported as CAN-2004-0969) has been fixed. + +Gdiffmk +------- + +o A new script contributed by Mike Bianchi. It compares two groff, nroff, + or troff documents and creates an output with added margin characters + (using `.mc') to indicate the differences. + +Pdfroff +------- + +o A new wrapper script contributed by Keith Marshall to easily create PDF + documents with groff. + +Macro packages +-------------- + +o ms.tmac + + . Support for fractional point sizes: A value for the `PS', `VS', `FPS', + and `VPS' register larger than or equal to 1000 is always divided by + 1000. For example, `.nr PS 10250' sets the document's font size to + 10.25 points. + + . The `Ds' and `De' macros provided in ms since groff version 1.19 have + been removed; the equivalent `DS' and `DE' macros should be used + instead. X11 documents which actually use `Ds' and `De' always load a + specific macro file from the X11 distribution (`macros.t') which + provides proper definitions for the two macros. + + . The following registers have been added for improving layout control: + + PORPHANS + Defines number of lines following `LP', `PP', `QP', `IP' or `XP' which + must be kept together, before any automatic page break. + + HORPHANS + Sets number of lines of following paragraph which must be kept with a + heading, defined by `NH' or `SH', before any automatic page break. + + GROWPS + Sets the first level of heading (set with `NH') which will keep the + same point size as body text. + + PSINCR + Sets the point size increment for each level of heading (set with + `NH'), below the threshold level set by `GROWPS'; e.g., if + \n[PS] = 10, \n[GROWPS] = 3 and \n[PSINCR] = 2.0p, then `.NH 1' will + produce 14pt headings, `.NH 2' will produce 12pt, and all other levels + will remain at 10pt (because \n[PS] = 10). + + . The `SH' macro now accepts a numeric argument, to make heading size + match that of `NH' with same argument value when the `GROWPS'/`PSINCR' + feature is enabled. + + Please refer to the documentation of the ms package for other, minor + improvements. + +o me.tmac + + The section type set with the `++' request is available in the `_M' + register. This isn't new but hasn't been documented before. + +o www.tmac + + The `HR' macro no longer causes an empty line for non-HTML devices. + + A new macro `HEAD' has been added to directly add data to the + ... block. + + New macros `OLS' and `OLE' to start and end an ordered list. + + New macros `DLS' and `DLE' to start and end a definition list. + +Pdfmark +------- + +o A new macro package contributed by Keith Marshall which implements PDF + marks. This is in alpha stage currently. + +Miscellaneous +------------- + +o Two new keywords to the DESC file have been added which are needed for + grohtml: `image_generator' and `unscaled_charwidths'. The former gives + the name of the program which creates PNG images, and the latter makes + troff always use unscaled character widths. + + +VERSION 1.19.1 +============== + +Groff +----- + +o The argument of the command line option `-I' is now also passed to troff + and grops, specifying a directory to search for files on the command line, + files named in `so' and `psbb' requests, and files named in \X'ps: file' + and \X'ps: import' escapes. + +o If option `-V' is used more than once, the commands will be both printed + on standard error and run. + +Troff +----- + +o Two new read-only, string-valued registers `.m' and `.M' return the + name of the current drawing and background color, respectively. + +o New read-only register `.U' which is set to 1 if in safer mode and set + to 0 if in unsafe mode. + +o An input encoding file for latin-5 (a.k.a. ISO 8859-9) has been added. + Example use: + + groff -Tdvi -mlatin5 my_file > my_file.dvi + + Note that some output devices don't support all glyphs of this encoding. + +o If the `return' request is called with an argument, it exits twice, + namely the current macro and the macro one level higher. This is + used to define a wrapper macro for `return' in trace.tmac. + +o For completeness, two new requests have been added: `dei1' and `ami1'. + They are equivalent to `dei' and `ami', respectively, but the macros + are executed with compatibility mode off (similar to `de1' and `am1'). + +o New command line option `-I' to specify a directory for files (both + those on the command line and those named in `psbb' requests). This is + also handled by the groff wrapper program. + +o Since version 1.19 you can say `.vs 0'. Older versions emit a warning + and convert this to `.vs \n[.V]'. + + This hasn't been documented properly. Note that `.vs 0' isn't saved in a + diversion since it doesn't result in vertical motion. + +Pic +___ + +o Dashed and dotted ellipses have been implemented. + +Tbl +--- + +o New key character `x' to make tbl call a user-defined macro on a table + cell. Patch by Heinz-Jürgen Oertel . + +Grap2graph +---------- + +o A new script contributed by Eric S. Raymond . It + converts a grap diagram into a cropped image. Since it uses gs and the + PNM library, virtually all graphics formats are available for output. + [Note that the grap program itself isn't part of the groff package; + see the file MORE.STUFF how to obtain grap.] + +Grohtml +------- + +o New option `-j' to emit output splitted into multiple files. + +Grops +----- + +o New command line option `-I' to specify a directory to search for files + on the command line and files named in \X'ps: import' and \X'ps: file' + escapes. This is also handled by the groff wrapper program. + +o The default value for the `broken' keyword in the DESC file is now 0. + +Grolj4 +------ + +o A new man page `lj4_font(5)' documents how fonts are accessed with + grolj4. + +o The built-in fonts for LJ4 and newer PCL 5 devices have been completely + revised, mainly to access as much glyphs as possible. The provided + metric files should be compatible with recent PCL 5 printers also. + Additionally, font description files have been added for the Arial and + Times New Roman family, the MS symbol, and Wingdings fonts. + +Afmtodit +-------- + +o New option `-x' to prevent use of built-in Adobe Glyph List. + +Hpftodit +-------- + +o Completely revised to handle HP TrueType metric files also. See the + hpftodit manual page for more details. + +Groffer +------- + +o This version is a rewrite of groffer in many parts, but it is kept in + the old single script style. + + New options: --text, --mode text, --tty-viewer, --X, --mode X, + --X-viewer, --html, --mode html, --html-view, --apropos-data, + --apropos-devel, --apropos-progs. + + New documentation file: README_SH. + + Enhancement of the configuration files and the `apropos' handling. + +Macro Packages +-------------- + +o www.tmac: New macro `JOBNAME' to split output into multiple files. + +o In mdoc, multiple calls to `.Lb' are now supported in the LIBRARY + section. + + VERSION 1.19 ============ @@ -17,9 +320,9 @@ o Input encoding files for latin-9 (a.k.a. latin-0 and ISO 8859-15) and and latin-2 only for -Tdvi and -Tutf8. o Composite glyphs are now supported. To do this, a subset of the Adobe - Glyph List (AGL) Algorithm as described in + Glyph List (AGL) Algorithm as described in - http://partners.adobe.com/asn/developer/typeforum/unicodegn.html + http://partners.adobe.com/asn/tech/type/unicodegn.jsp is used to construct glyph names based on Unicode character codes. The existing groff glyph names are frozen; no glyph names which can't be @@ -110,7 +413,10 @@ o The paper size is now emitted via the %%DocumentMedia and PageSize mechanisms so that it is no longer required to tell `gv' or `ps2pdf' about the paper size. The `broken' flag value 16 omits this feature (the used PostScript command `setpagedevice' is a LanguageLevel 2 - extension). Patch by Egil Kvaleberg . + extension) -- if you intend to further process grops output to get an + encapsulated PS (EPS) file you must also use this option. + + Patch by Egil Kvaleberg . o Non-slanted PostScript metrics have been changed again; they no longer contain negative left italic correction values. This assures correct @@ -316,7 +622,7 @@ o Color support has been added to troff and pic (and to the device drivers grops, grodvi, grotty, and grohtml -- other preprocessors and drivers will follow). A new function `defcolor' defines colors; the escape sequence `\m' sets the drawing color, the escape sequence `\M' specifies the - background color for closed objects created with \D'...' commands. + background color for closed objects created with \D'...' commands. `\m[]' and `\M[]' switch back to the previous color. `\m' and `\M' correspond to the new troff output command sets starting with `m' and `DF'. The device-specific default color is called `default' and can't be diff --git a/contrib/groff/PROBLEMS b/contrib/groff/PROBLEMS index f679c3a370a6..ba43b3ce317f 100644 --- a/contrib/groff/PROBLEMS +++ b/contrib/groff/PROBLEMS @@ -11,6 +11,103 @@ Generic Problems +* Displaying a man page on a terminal with/without my favourite pager + only gives garbage. + +groff by default now uses SGR escape sequences (`ANSI color') to +control the display attributes (bold, underlined, colour) on TTYs. +Some terminals (e.g. `kterm') don't understand SGR, and some pagers +(e.g. older versions of `less' or `less' without the -R option) don't +understand SGR either. There are three solutions to fix this, in order +of preference; please read the grotty man page for more details. + +The fourth and probably best option is to update your terminal program +and pager to versions which can handle SGR. + + 1. Set the GROFF_NO_SGR environment variable. + + 2. Pass option -c to grotty. + + 3. Append the following fragment to the `troffrc' file: + + +--- start --- +.if n \{\ +. nr _C \n(.C +. cp 0 +. +. \" The following code sets a top-of-page trap to disable grotty's TTY +. \" mode. Since neither \X nor .output can be used before the first +. \" page has started, we must use a trap. To make it work with troff's +. \" -o option, we wait until the first printed page. +. +. de sgr@dummy +. . +. +. rn wh wh@old +. +. \" The stand-alone version. If no other trap is set, we can safely +. \" insert the truncated vertical space caused by the trap (if any). +. \" Otherwise we assume that the document's main macro package takes +. \" care of that. As soon as the trap has been executed, it is removed. +. de1 no@sgr +. if \\n[.P] \{\ +. if (\\n[.t] == \\n[.p]) \{\ +. rn wh@old wh +. rm no@sgr +. wh 0 +. sp \\n[.trunc] +. nop \X'tty: sgr 0' +. sp -1 +. \}\} +. . +. +. wh@old 0 no@sgr +. +. \" The piggyback version to be appended to macros planted with the +. \" modified `wh' request. +. de1 no@sgr1 +. if \\n[.P] \{\ +. rn wh@old wh +. ds no@sgr1 +. nop \X'tty: sgr 0' +. sp -1 +. \} +. . +. +. \" We redefine the `wh' request so that `no@sgr1' is appended to +. \" the trap macro. +. de1 wh +. am1 \\$2 sgr@dummy +. no@sgr1 +. sgr@dummy +. wh@old \\$1 \\$2 +. . +. +. cp \n[_C] +.\} +--- end --- + +---------------------------------------------------------------------- + +* The UTF-8 output of grotty has strange characters for the minus, the + hyphen, and the right quote. Why? + +The used Unicode characters (U+2212 for the minus sign and U+2010 for +the hyphen) are the correct ones, but many programs can't search them +properly. The same is true for the right quote (U+201D). To map those +characters back to the ASCII characters, insert the following code +snippet into the `troffrc' configuration file: + +.if '\*[.T]'utf8' \{\ +. char \- \N'45' +. char - \N'45' +. char ' \N'39' +.\} + + +---------------------------------------------------------------------- + * My document says that the current year is 19100, not 2000. In groff, as in traditional troff, the yr number register yields the @@ -295,7 +392,7 @@ Printing and Display Problems A PostScript document must meet three requirements in order to be included with the PSPIC macro: it must comply with the Adobe Document Structuring Conventions; it must contain a BoundingBox line; it must -be ``well-behaved''. The BoundingBox line should be of the form: +be `well-behaved'. The BoundingBox line should be of the form: %%BoundingBox: llx lly urx ury @@ -315,7 +412,7 @@ format. (This is available from the Adobe file server; send a message with a body of `help' to ps-file-server@adobe.com.) If an EPS file to be included via \X'ps: import' does not start with -%!PS-Adobe-...', gtroff will still include the file, but grops will +`%!PS-Adobe-...', gtroff will still include the file, but grops will not add any fonts to the generated output file that are listed in the EPS file, even though the files are listed in the `download' file and are available in the devps directory. @@ -352,9 +449,13 @@ Make sure that the paper size is `letter'. See groff_tmac(5). Error: Widget viewport has zero width and/or height This error means you haven't correctly installed the application -defaults file, GXditview.ad; ``make install'' does this for you -automatically, so either you didn't do ``make install'', or you don't -have imake configured correctly. +defaults file, GXditview.ad; `make install' does this for you +automatically, so either you didn't do `make install', or you haven't +passed a good `--appresdir=' argument to groff's configure script. + +See the X(7) man page for information how and where application resource +files have to be located. Look for the XAPPLRESDIR and XUSERFILESEARCHPATH +environment variables. ---------------------------------------------------------------------- @@ -362,7 +463,7 @@ have imake configured correctly. the same as when I print the document with -Tps: the line and page breaks come in different places. -Use groff -X -Tps. +Use `groff -X -Tps'. ---------------------------------------------------------------------- @@ -532,13 +633,13 @@ as empty): Create a script called 'eqn': - > #!/bin/sh + > #! /bin/sh > if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi > geqn $* and a script called 'neqn': - > #!/bin/sh + > #! /bin/sh > if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi > geqn -Tascii $* @@ -558,7 +659,7 @@ To get PostScript output from 'man -t', you also need to create a --- /usr/local/bin/psroff Sat Feb 13 17:45:46 1993 *************** *** 1,8 **** - #!/bin/sh + #! /bin/sh ! # Emulate nroff with groff. prog="$0" @@ -567,7 +668,7 @@ To get PostScript output from 'man -t', you also need to create a for i --- 1,8 ---- - #!/bin/sh + #! /bin/sh ! # Emulate psroff with groff. prog="$0" @@ -697,12 +798,15 @@ argument is a const char *. Fix the declaration of open() in This occurs because GNU make and Unix make handle VPATH differently, and the groff build relies on GNU make's VPATH handling. -Use GNU make to work around the problem. In Solaris 8, GNU make is -on the Software Companion CD and is installed as /opt/sfw/bin/gmake. +Use GNU make to work around this. +In Solaris 8 and 9, GNU make is on the Software Companion CD in +package SFWgmake and is installed as /opt/sfw/bin/gmake. Prebuilt +versions of GNU make for Solaris are also available from +sunfreeware.com. ---------------------------------------------------------------------- -* On Ultrix, the make stops with the message +* On Ultrix, the make program stops with the message *** Error code 1 @@ -773,11 +877,27 @@ directory and include that directory with a -I option. ---------------------------------------------------------------------- -* I get errors when I try to compile groff with Sun C++ version 5.0 - or 5.1. +* I get errors when I try to compile groff with Forte Development 6 + or 6u1, or Sun C++ version 5.0 through 5.2. -This is a known problem; see Sun bug #4301919. As of this writing, no -patch is available. Use GCC 2.95.2 or later instead. +This is a known problem; see Sun bug #4301919. See Sun patches +109482, 109490, 109508, and 109509 for fixes. + +---------------------------------------------------------------------- + +* I get warnings from the Sun linker while using gcc 3.4.0: + + ld: warning: relocation error: R_SPARC_UA32: + file groff/src/libs/libgroff/libgroff.a(getopt.o): symbol optarg: + external symbolic relocation against non-allocatable + section .debug_info; cannot be processed at runtime: + relocation ignored + +This seems to be a known problem (Sun bugs #4910101 and #4910810, +filed in September 2003; gcc bug #15599, filed May 2004) without a +public fix as of this writing. A work-around is to use option +`-gstabs+' instead of `-g' (and a high probability that the output is +only debuggable with gdb but not with Sun's debuggers). ---------------------------------------------------------------------- @@ -790,6 +910,7 @@ Makefile. If that doesn't solve the problem, define INT_MIN as ---------------------------------------------------------------------- -* When compiling on MacOS X, groff compiles but does not run well. +* When compiling on MacOS X, groff compiles but does not run well, + especially `eqn', causing many `can't break line' messages. Use ./configure CXX=g++2 then make as usual. diff --git a/contrib/groff/PROJECTS b/contrib/groff/PROJECTS index 87aa844fd827..99b215f5ec45 100644 --- a/contrib/groff/PROJECTS +++ b/contrib/groff/PROJECTS @@ -9,8 +9,6 @@ Here are some things that would be useful additions to groff: a page-makeup postprocessor and associated macro package (like pm and -mpm) - a complete, self-contained manual -- first results can be found in - doc/groff.texinfo. - If you want to work on one of these, you should probably post to -gnu.groff.bug to see if anyone else has gotten there first. +gnu.groff.bug (or send email to bug-groff@gnu.org) to see if anyone else +has gotten there first. diff --git a/contrib/groff/README b/contrib/groff/README index fffada78b187..5f80eaf589af 100644 --- a/contrib/groff/README +++ b/contrib/groff/README @@ -1,83 +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'. -For the moment, the documentation assumes that you are already familiar -with the Unix versions of troff, -ms, and the preprocessors. +The most recent released version of `groff' is always available by +anonymous ftp from `ftp.gnu.org' in the directory `gnu/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 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 -A CVS repository is now available, containing the current development -version of groff. You can access it with the commands + cd ~/cvswork + CVS_RSH=ssh; export CVS_RSH + cvs -d:ext:anoncvs@savannah.gnu.org/cvsroot/groff -z5 co groff - export CVSROOT=:pserver:anoncvs@anoncvs.ffii.org:/var/cvs - cvs login - cvs -z9 co groff +(Note that you need an `ssh' client for security reasons.) -(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 +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 - cvs -z9 update -dP + cd ~/cvswork/groff + CVS_RSH=ssh cvs -z5 update -dP -Please read the info pages of cvs for further details. +Please read the `CVS' info pages for further details. -Alternatively, you can download snapshots (which are updated twice a -day) from +Finally, it is possible to access the `CVS' with a web browser by +pointing it to - ftp://ftp.ffii.org/pub/groff/devel/groff-current.tar.gz + http://savannah.gnu.org/cvs/?group=groff -or a diff file relative to the latest official groff release as +Alternatively, you can download snapshots (which are updated twice a day). +The complete `groff' source as a single file is available at - ftp://ftp.ffii.org/pub/groff/devel/groff--current.diff.gz + http://groff.ffii.org/groff/devel/groff-current.tar.gz -Assuming that groff-.tar.gz and -groff--current.diff.gz are in the same directory, do the +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 -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@gnu.org for general discussion of groff - groff-commit@ffii.org a read-only list showing logs of - commitments to the CVS repository + 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). +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 -GNU groff was written by James Clark . It is now + http://lists.gnu.org/mailman/listinfo/bug-groff + http://lists.gnu.org/mailman/listinfo/groff + http://lists.gnu.org/mailman/listinfo/groff-commit + +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 maintained by Ted Harding and Werner Lemberg . diff --git a/contrib/groff/README.MinGW b/contrib/groff/README.MinGW new file mode 100644 index 000000000000..342aac229af9 --- /dev/null +++ b/contrib/groff/README.MinGW @@ -0,0 +1,277 @@ + README.MinGW + ============ + + Contributed by Keith Marshall (keith.d.marshall@ntlworld.com) + + + INTRODUCTION + ------------ + + This file provides recommendations for building a Win32 implementation of + GNU Groff, using the MinGW port of GCC for Microsoft (TM) Windows-32 + platforms. It is intended to supplement the standard installation + instructions (see file INSTALL); it does not replace them. + + You require both the MinGW implementation of GCC and its supporting MSYS + toolkit, which provides a Win-32 implementation of the GNU bash shell, and a + few other essential utilities; these may be obtained from + + http://sourceforge.net/projects/mingw + + by following the appropriate download links, where they are available as + self-extracting executable installation packages. If installing both from + scratch, it is recommended that MinGW is installed first, as the MSYS + installer can then automatically set up the proper environment for running + MinGW. + + Additionally, if you wish to compile groff with support for its HTML output + capability, some additional tools are required as decribed in the section + PREREQUISITES FOR HTML OUTPUT later in this file. + + + BUILDING GROFF WITH MINGW + ------------------------- + + Assuming that you have obtained the appropriate groff distribution, and that + you are already running an MSYS shell, then the configuration, compilation, + and installation of groff, using MinGW, is performed in much the same way as + it is described in the INSTALL file, which is provided with the groff + distribution. The installation steps are summarised below: + + 1. Change working directory to any suitable location where you may unpack + the groff distribution; you must be authorized for write access. + Approximately 30MB of free disk space are needed. + + 2. Unpack the groff distribution: + + tar xzf /groff-.tar.gz + + This creates a new sub-directory, groff-, containing an image of + the groff source tree. You should now change directory, to make this + ./groff- your working directory. + + 3. If you are intending to build groff with support for HTML output, then + you must now ensure that the prerequisites described in the later section + PREREQUISITES FOR HTML OUTPUT are satisfied, before proceeding to build + groff; in particular, please ensure that all required support programs + are installed in the current PATH. + + 4. You are now ready to configure, build, and install groff. This is + accomplished using the conventional procedure, as described in the file + INSTALL, i.e. + + ./configure --prefix= ... + make + make install + + Please observe the syntax for the configure command, indicated above; the + default value for --prefix is not suitable for use with MinGW, so the + --prefix= option must be specified, where + is the chosen MS-Windows directory in which the + groff application files are to be installed (see the later section + entitled CHOOSING AN INSTALLATION PATH). Any other desired configuration + options may also be specified, as described in the standard groff + installation instructions. + + 5. After completing the above, groff should be successfully installed; the + build directory is no longer required; it may be simply deleted in its + entirety. Alternatively, you may choose to keep it, but to remove all + files which can be reproduced later, by repeating the configure, make and + make install steps; this is readily accomplished by the command + + make distclean + + + This completes the installation of groff; please read the final sections of + this file, GROFF RUNTIME ENVIRONMENT and CAVEATS AND BUGS, for advice on + setting up the runtime environment, and avoiding known runtime problems, + before running groff. + + + CHOOSING AN INSTALLATION PATH + ----------------------------- + + It may be noted that the above instructions indicate that the ./configure + command must be invoked with an argument specifying a preference for + --prefix=, whereas the standard groff installation + instructions indicate that this may be omitted, in which case it defaults to + --prefix=/usr/local. + + In the case of building with MinGW, the default behaviour of configure is + not appropriate for the following reasons. + + o The MSYS environment creates a virtual UNIX-like file system, with its + root mapped to the actual MS-Windows directory where MSYS itself is + installed; /usr is also mapped to this MSYS installation directory. + + o All of the MSYS tools, and the MinGW implementation of GCC, refer to files + via this virtual file system representation; thus, if the + --prefix= is not specified when groff is configured, + `make install' causes groff to be installed in /local. + + o groff needs to know its own installation path, so that it can locate its + own installed components. This information is compiled in, using the + exact form specified with the --prefix= option to + configure. + + o Knowledge of the MSYS virtual file system is not imparted to groff; it + expects the compiled-in path to its components to be a fully qualified + MS-Windows path name (although UNIX-style slashes are permitted, and + preferred to the MS-Windows style backslashes, to demarcate the directory + hierarchy). Thus, when configuring groff, if + --prefix= is not correctly specified, then the + installed groff application looks for its components in /usr/local, and + most likely doesn't find them, because they are actually installed in + /local. + + It is actually convenient, but by no means a requirement, to have groff + installed in the /usr/local directory of the MSYS virtual file system; this + makes it easy to invoke groff from the MSYS shell, since the virtual + /usr/local/bin is normally added automatically to the PATH (the default + PATH, as set in MSYS's /etc/profile), when MSYS is started. + + In order to install groff into MSYS's /usr/local directory, it is necessary + to specify the fully qualified absolute MS-Windows path to this directory, + when configuring groff, i.e. + + ./configure --prefix=/local ... + + For example, on a system where MSYS is installed in the MS-Windows directory + D:\MSYS\1.0, the MSYS virtual path /usr/local resolves to the absolute + MS-Windows native path D:\MSYS\1.0\local (the /usr component of the MSYS + virtual path does not appear in the resolved absolute native path name since + MSYS maps this directly to the root of the MSYS virtual file system). Thus, + the --prefix option should be specified to configure as + + ./configure --prefix=D:/MSYS/1.0/local ... + + Note that the backslash characters, which appear in the native MS-Windows + form of the path name, are replaced by UNIX-style slashes in the argument to + configure; this is the preferred syntax. + + Also note that the MS-Windows device designator (D: in this instance) is + prepended to the specified path, in the normal MS-Windows format, and that, + since upper and lower case distinctions are ignored in MS-Windows path + names, any combination of upper and lower case is acceptable. + + + PREREQUISITES FOR HTML OUTPUT + ----------------------------- + + If you intend to use groff for production of HTML output, then there are a + few dependencies which must be satisfied. Ideally, these should be resolved + before attempting to configure and build groff, since the configuration + script does check them. + + In order to produce HTML output, you first require a working implementation + of Ghostscript; either the AFPL Ghostscript or the GNU Ghostscript + implementation for MS-Windows should be suitable, depending on your + licensing preference. It is highly recommended to use version 8.11 or + higher due to bugs in older versions. These may be obtained, in the form of + self-installing binary packages, by following the download links for the + chosen licensing option, from http://sourceforge.net/projects/ghostscript. + + Please note that these packages install the Ghostscript interpreter required + by groff in the ./bin subdirectory of the Ghostscript installation + directory, with the name gswin32c.exe. However, groff expects this + interpreter to be located in the system PATH, with the name gs.exe. Thus, + to ensure that groff can correctly locate the Ghostscript interpreter, it is + recommended that the file gswin32c.exe should be copied from the Ghostscript + installation directory to the MSYS /usr/local/bin directory, where it should + be renamed to gs.exe. + + In addition to a working Ghostscript interpreter, you also require several + image manipulation utilities, all of which may be scavenged from various + packages available from http://sourceforge.net/projects/gnuwin32, and which + should be installed in the MSYS /usr/local/bin directory, or any other + suitable directory which is specified in the PATH. These additional + prerequisites are + + 1. from the netpbm--bin.zip package: + + netpbm.dll + pnmcrop.exe + pnmcut.exe + pnmtopng.exe + pnmtops.exe + + 2. from the libpng--bin.zip package: + + libpng.dll + + 3. from the zlib--bin.zip package: + + zlib-1.dll, which must be renamed to zlib.dll + + 4. from the psutils--bin.zip package: + + psselect.exe + + Note that it is not necessary to install the above four packages in their + entirety; of course, you may do so if you wish. + + + GROFF RUNTIME ENVIRONMENT + ------------------------- + + The runtime environment, provided to groff by MSYS, is essentially the same + as would be provided under a UNIX or GNU/Linux operating system; thus, any + environment variables which may be used to customize the groff runtime + environment have similar effects under MSYS, as they would in UNIX or + GNU/Linux, with the exception that any variable specifying a path should + adopt the same syntax as a native MS-Windows PATH specification. + + There is, however, one known problem which is associated with the + implementation of the MS-Windows file system, and the manner in which the + Microsoft runtime library (which is used by the MinGW implementation of GCC) + generates names for temporary files. This known problem arises when groff + is invoked with a current working directory which refers to a network share, + for which the user does not have write access in the root directory, and + there is no environment variable set to define a writeable location for + creating temporary files. When these conditions arise, groff fails with a + `permission denied' error, as soon as it tries to create any temporary file. + + To specify the location for creating temporary files, the standard UNIX or + GNU/Linux implementation of groff provides the GROFF_TMPDIR or TMPDIR + environment variables, whereas MS-Windows applications generally use TMP or + TEMP; furthermore, the MS-Windows implementations of Ghostscript apparently + support the use of only TEMP or TMPDIR. + + To avoid problems with creation of temporary files, it is recommended that + you ensure that both TMP and TEMP are defined, with identical values, to + point to a suitable location for creating temporary files; many MS-Windows + boxes have them set already, and groff has been adapted to honour them, when + built in accordance with the preceding instructions, using MinGW. + + + CAVEATS AND BUGS + ---------------- + + There are two known issues, observed when running groff in the MinGW/MSYS + environment, which would not affect groff in its native UNIX environment: + + o Running groff with the working directory set to a subdirectory of a + network share, where the user does not have write permission in the root + directory of the share, causes groff to fail with a `permission denied' + exception, if the TMP environment variable is not appropriately defined; + it may also be necessary to define the TEMP environment variable, to avoid + a similar failure mode, when using the -Thtml output mode of groff. This + problem is more fully discussed in the preceding section, GROFF RUNTIME + ENVIRONMENT. + + o When running groff (or nroff) to process standard input, where the + standard input stream is obtained directly from the RXVT console provided + with MSYS, groff cannot detect the end-of-file condition for the standard + input stream, and hangs. This appears to be caused by a fault in the MSYS + implementation of RXVT; it may be worked around by either starting MSYS + without RXVT (see the comments in the MSYS.BAT startup script); in this + case standard input is terminated by typing followed by , + on a new input line. Alternatively, if you prefer to use MSYS with RXVT, + you can enter the interactive groff command in the form + + cat | groff ... + + in which case terminates the standard input stream, in just the + same way it does on a UNIX system; the cat executable provided with MSYS + does seem to trap the end-of-file condition, and properly signals groff + that the input stream has terminated. diff --git a/contrib/groff/REVISION b/contrib/groff/REVISION index 573541ac9702..0cfbf08886fc 100644 --- a/contrib/groff/REVISION +++ b/contrib/groff/REVISION @@ -1 +1 @@ -0 +2 diff --git a/contrib/groff/TODO b/contrib/groff/TODO index c540d3ce68ca..4e4c6f7db11e 100644 --- a/contrib/groff/TODO +++ b/contrib/groff/TODO @@ -1,11 +1,5 @@ Unicode input: - Implementing \U'xxxx' to access Unicode characters directly. - - Making groff 16bit input-clean. - -Separating input and output encodings (similar to LaTeX). - -Better selection of paper sizes with -Tps. + Making groff 21bit input-clean. Make -Tlj4 work with -X. diff --git a/contrib/groff/aclocal.m4 b/contrib/groff/aclocal.m4 index 4b1b68ecdc41..7e22633eefc3 100644 --- a/contrib/groff/aclocal.m4 +++ b/contrib/groff/aclocal.m4 @@ -1,309 +1,494 @@ -dnl Autoconf macros for groff. -dnl Copyright (C) 1989-1995, 2001, 2002 Free Software Foundation, Inc. -dnl -dnl This file is part of groff. -dnl -dnl groff is free software; you can redistribute it and/or modify it under -dnl the terms of the GNU General Public License as published by the Free -dnl Software Foundation; either version 2, or (at your option) any later -dnl version. -dnl -dnl groff is distributed in the hope that it will be useful, but WITHOUT ANY -dnl WARRANTY; without even the implied warranty of MERCHANTABILITY or -dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -dnl for more details. -dnl -dnl You should have received a copy of the GNU General Public License along -dnl with groff; see the file COPYING. If not, write to the Free Software -dnl Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -dnl -dnl -AC_DEFUN(GROFF_PRINT, -[if test -z "$PSPRINT"; then - AC_CHECK_PROGS(LPR,lpr) - AC_CHECK_PROGS(LP,lp) - if test -n "$LPR" && test -n "$LP"; then - # HP-UX provides an lpr command that emulates lpr using lp, - # but it doesn't have lpq; in this case we want to use lp - # rather than lpr. - AC_CHECK_PROGS(LPQ,lpq) - test -n "$LPQ" || LPR= - fi - if test -n "$LPR"; then - PSPRINT="$LPR" - elif test -n "$LP"; then - PSPRINT="$LP" - fi -fi -AC_SUBST(PSPRINT) -AC_MSG_CHECKING([for command to use for printing PostScript files]) -AC_MSG_RESULT($PSPRINT) -# Figure out DVIPRINT from PSPRINT. -AC_MSG_CHECKING([for command to use for printing dvi files]) -if test -n "$PSPRINT" && test -z "$DVIPRINT"; then - if test "X$PSPRINT" = "Xlpr"; then - DVIPRINT="lpr -d" - else - DVIPRINT="$PSPRINT" - fi -fi -AC_SUBST(DVIPRINT) -AC_MSG_RESULT($DVIPRINT)])dnl -dnl -dnl -dnl Bison generated parsers have problems with C++ compilers other than g++. -dnl So byacc is preferred over bison. -dnl -AC_DEFUN(GROFF_PROG_YACC, -[AC_CHECK_PROGS(YACC, byacc 'bison -y', yacc)])dnl -dnl -dnl -dnl The following programs are needed for grohtml. -dnl -AC_DEFUN(GROFF_HTML_PROGRAMS, -[make_html=html -make_install_html=install_html -missing= -AC_CHECK_PROG(pnmcut, pnmcut, found, missing) -if test $pnmcut = missing; then - missing="$missing pnmcut" -fi -AC_CHECK_PROG(pnmcrop, pnmcrop, found, missing) -if test $pnmcrop = missing; then - missing="$missing pnmcrop" -fi -AC_CHECK_PROG(pnmtopng, pnmtopng, found, missing) -if test $pnmtopng = missing; then - missing="$missing pnmtopng" -fi -AC_CHECK_PROG(gs, gs gsos2, found, missing) -if test $gs = missing; then - missing="$missing gs" -fi -AC_CHECK_PROG(psselect, psselect, found, missing) -if test $psselect = missing; then - missing="$missing psselect" -fi -AC_CHECK_PROG(pnmtops, pnmtops, found, missing) -if test $pnmtops = missing; then - missing="$missing pnmtops" -fi -if test -n "$missing"; then - cnt=0 - for i in $missing - do - cnt=`expr $cnt + 1` - eval "prog$cnt=$i" - done - plural="s" - case $cnt in - 1) - plural="" - progs="\`$prog1'" ;; - 2) - progs="\`$prog1' and \`$prog2'" ;; - 3) - progs="\`$prog1', \`$prog2', and \`$prog3'" ;; - 4) - progs="\`$prog1', \`$prog2', \`$prog3', and \`$prog4'" ;; - 5) - progs="\`$prog1', \`$prog2', \`$prog3', \`$prog4', and \`$prog5'" ;; - 6) - progs="\`$prog1', \`$prog2', \`$prog3', \`$prog4', \`$prog5', and \`$prog6'" ;; - esac - make_html= - make_install_html= - AC_MSG_WARN([ +# Autoconf macros for groff. +# Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# 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. + +AC_DEFUN([GROFF_PRINT], + [if test -z "$PSPRINT"; then + AC_CHECK_PROGS([LPR], [lpr]) + AC_CHECK_PROGS([LP], [lp]) + if test -n "$LPR" && test -n "$LP"; then + # HP-UX provides an lpr command that emulates lpr using lp, + # but it doesn't have lpq; in this case we want to use lp + # rather than lpr. + AC_CHECK_PROGS([LPQ], [lpq]) + test -n "$LPQ" || LPR= + fi + if test -n "$LPR"; then + PSPRINT="$LPR" + elif test -n "$LP"; then + PSPRINT="$LP" + fi + fi + AC_SUBST([PSPRINT]) + AC_MSG_CHECKING([for command to use for printing PostScript files]) + AC_MSG_RESULT([$PSPRINT]) + + # Figure out DVIPRINT from PSPRINT. + AC_MSG_CHECKING([for command to use for printing dvi files]) + if test -n "$PSPRINT" && test -z "$DVIPRINT"; then + if test "x$PSPRINT" = "xlpr"; then + DVIPRINT="lpr -d" + else + DVIPRINT="$PSPRINT" + fi + fi + AC_SUBST([DVIPRINT]) + AC_MSG_RESULT([$DVIPRINT])]) + +# Bison generated parsers have problems with C++ compilers other than g++. +# So byacc is preferred over bison. + +AC_DEFUN([GROFF_PROG_YACC], + [AC_CHECK_PROGS([YACC], [byacc 'bison -y'], [yacc])]) + +# The following programs are needed for grohtml. + +AC_DEFUN([GROFF_HTML_PROGRAMS], + [AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH]) + make_html=html + make_install_html=install_html + + missing= + AC_FOREACH([groff_prog], + [pnmcut pnmcrop pnmtopng psselect pnmtops], + [AC_CHECK_PROG(groff_prog, groff_prog, [found], [missing]) + if test $[]groff_prog = missing; then + missing="$missing \`groff_prog'" + fi;]) + + test "$GHOSTSCRIPT" = "missing" && missing="$missing \`gs'" + + if test -n "$missing"; then + plural=`set $missing; test $[#] -gt 1 && echo s` + missing=`set $missing + missing="" + while test $[#] -gt 0 + do + case $[#] in + 1) missing="$missing$[1]" ;; + 2) missing="$missing$[1] and " ;; + *) missing="$missing$[1], " ;; + esac + shift + done + echo $missing` + + make_html= + make_install_html= + + AC_MSG_WARN([missing program$plural: The program$plural - $progs - can't be found in the path, thus the HTML backend of groff (grohtml) - won't work properly. Consequently, no documentation in HTML format - is built and installed. -]) -fi -AC_SUBST(make_html) -AC_SUBST(make_install_html)])dnl -dnl -dnl check to see whether pnmtops can handle the -nosetpage option -dnl -AC_DEFUN(GROFF_PNMTOPS_NOSETPAGE, -[AC_MSG_CHECKING([whether pnmtops can handle the -nosetpage option]) -if echo P2 2 2 255 0 1 2 0 | pnmtops -nosetpage > /dev/null 2>&1 ; then - AC_MSG_RESULT(yes) - pnmtops_nosetpage="pnmtops -nosetpage" -else - AC_MSG_RESULT(no) - pnmtops_nosetpage="pnmtops" -fi -AC_SUBST(pnmtops_nosetpage) -])dnl -dnl -dnl -dnl GROFF_CSH_HACK(if hack present, if not present) -dnl -AC_DEFUN(GROFF_CSH_HACK, -[AC_MSG_CHECKING([for csh hash hack]) + $missing + cannot be found in the PATH. + Consequently, groff's HTML backend (grohtml) will not work properly; + therefore, it will neither be possible to prepare, nor to install, + documentation in HTML format. + ]) + fi + + AC_SUBST([make_html]) + AC_SUBST([make_install_html])]) + +# To produce PDF docs, we need both awk and ghostscript. + +AC_DEFUN([GROFF_PDFDOC_PROGRAMS], + [AC_REQUIRE([GROFF_AWK_PATH]) + AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH]) + + make_pdfdoc=pdfdoc + make_install_pdfdoc=install_pdfdoc + + missing="" + test "$AWK" = missing && missing="\`awk'" + test "$GHOSTSCRIPT" = missing && missing="$missing \`gs'" + if test -n "$missing"; then + plural=`set $missing; test $[#] -eq 2 && echo s` + test x$plural = xs \ + && missing=`set $missing; echo "$[1] and $[2]"` \ + || missing=`echo $missing` + + make_pdfdoc= + make_install_pdfdoc= + + AC_MSG_WARN([missing program$plural: + + The program$plural $missing cannot be found in the PATH. + Consequently, groff's PDF formatter (pdfroff) will not work properly; + therefore, it will neither be possible to prepare, nor to install, + documentation in PDF format. + ]) + fi + + AC_SUBST([make_pdfdoc]) + AC_SUBST([make_install_pdfdoc])]) + +# Check whether pnmtops can handle the -nosetpage option. + +AC_DEFUN([GROFF_PNMTOPS_NOSETPAGE], + [AC_MSG_CHECKING([whether pnmtops can handle the -nosetpage option]) + if echo P2 2 2 255 0 1 2 0 | pnmtops -nosetpage > /dev/null 2>&1 ; then + AC_MSG_RESULT([yes]) + pnmtops_nosetpage="pnmtops -nosetpage" + else + AC_MSG_RESULT([no]) + pnmtops_nosetpage="pnmtops" + fi + AC_SUBST([pnmtops_nosetpage])]) + +# Check location of `gs'; allow `--with-gs=PROG' option to override. + +AC_DEFUN([GROFF_GHOSTSCRIPT_PATH], + [AC_REQUIRE([GROFF_GHOSTSCRIPT_PREFS]) + AC_ARG_WITH([gs], + [AS_HELP_STRING([--with-gs=PROG], + [actual [/path/]name of ghostscript executable])], + [GHOSTSCRIPT=$withval], + [AC_CHECK_TOOLS(GHOSTSCRIPT, [$ALT_GHOSTSCRIPT_PROGS], [missing])]) + test "$GHOSTSCRIPT" = "no" && GHOSTSCRIPT=missing]) + +# Preferences for choice of `gs' program... +# (allow --with-alt-gs="LIST" to override). + +AC_DEFUN([GROFF_GHOSTSCRIPT_PREFS], + [AC_ARG_WITH([alt-gs], + [AS_HELP_STRING([--with-alt-gs=LIST], + [alternative names for ghostscript executable])], + [ALT_GHOSTSCRIPT_PROGS="$withval"], + [ALT_GHOSTSCRIPT_PROGS="gs gswin32c gsos2"]) + AC_SUBST([ALT_GHOSTSCRIPT_PROGS])]) + +# Check location of `awk'; allow `--with-awk=PROG' option to override. + +AC_DEFUN([GROFF_AWK_PATH], + [AC_REQUIRE([GROFF_AWK_PREFS]) + AC_ARG_WITH([awk], + [AS_HELP_STRING([--with-awk=PROG], + [actual [/path/]name of awk executable])], + [AWK=$withval], + [AC_CHECK_TOOLS(AWK, [$ALT_AWK_PROGS], [missing])]) + test "$AWK" = "no" && AWK=missing]) + +# Preferences for choice of `awk' program; allow --with-alt-awk="LIST" +# to override. + +AC_DEFUN([GROFF_AWK_PREFS], + [AC_ARG_WITH([alt-awk], + [AS_HELP_STRING([--with-alt-awk=LIST], + [alternative names for awk executable])], + [ALT_AWK_PROGS="$withval"], + [ALT_AWK_PROGS="gawk mawk nawk awk"]) + AC_SUBST([ALT_AWK_PROGS])]) + +# GROFF_CSH_HACK(if hack present, if not present) + +AC_DEFUN([GROFF_CSH_HACK], + [AC_MSG_CHECKING([for csh hash hack]) + cat <conftest.sh -#!/bin/sh +#! /bin/sh true || exit 0 export PATH || exit 0 exit 1 EOF -chmod +x conftest.sh -if echo ./conftest.sh | (csh >/dev/null 2>&1) >/dev/null 2>&1; then - AC_MSG_RESULT(yes); $1 -else - AC_MSG_RESULT(no); $2 -fi -rm -f conftest.sh])dnl -dnl -dnl -dnl From udodo!hans@relay.NL.net (Hans Zuidam) -dnl -AC_DEFUN(GROFF_ISC_SYSV3, -[AC_MSG_CHECKING([for ISC 3.x or 4.x]) -changequote(,)dnl -if grep '[34]\.' /usr/options/cb.name >/dev/null 2>&1 -changequote([,])dnl -then - AC_MSG_RESULT(yes) - AC_DEFINE(_SYSV3, 1, - [Define if you have ISC 3.x or 4.x.]) -else - AC_MSG_RESULT(no) -fi])dnl -dnl -dnl -AC_DEFUN(GROFF_POSIX, -[AC_MSG_CHECKING([whether -D_POSIX_SOURCE is necessary]) -AC_LANG_PUSH(C++) -AC_TRY_COMPILE([#include -extern "C" { void fileno(int); }],, -AC_MSG_RESULT(yes);AC_DEFINE(_POSIX_SOURCE, 1, - [Define if -D_POSIX_SOURCE is necessary.]), -AC_MSG_RESULT(no)) -AC_LANG_POP(C++)])dnl -dnl -dnl -dnl srand() of SunOS 4.1.3 has return type int instead of void -dnl -AC_DEFUN(GROFF_SRAND, -[AC_LANG_PUSH(C++) -AC_MSG_CHECKING([for return type of srand]) -AC_TRY_COMPILE([#include -extern "C" { void srand(unsigned int); }],, -AC_MSG_RESULT(void);AC_DEFINE(RET_TYPE_SRAND_IS_VOID, 1, - [Define if srand() returns void not int.]), -AC_MSG_RESULT(int)) -AC_LANG_POP(C++)])dnl -dnl -dnl -AC_DEFUN(GROFF_SYS_NERR, -[AC_LANG_PUSH(C++) -AC_MSG_CHECKING([for sys_nerr in or ]) -AC_TRY_COMPILE([#include -#include ], -[int k; k = sys_nerr;], -AC_MSG_RESULT(yes);AC_DEFINE(HAVE_SYS_NERR, 1, - [Define if you have sysnerr in or - .]), -AC_MSG_RESULT(no)) -AC_LANG_POP(C++)])dnl -dnl -dnl -AC_DEFUN(GROFF_SYS_ERRLIST, -[AC_MSG_CHECKING([for sys_errlist[] in or ]) -AC_TRY_COMPILE([#include -#include ], -[int k; k = (int)sys_errlist[0];], -AC_MSG_RESULT(yes);AC_DEFINE(HAVE_SYS_ERRLIST, 1, - [Define if you have sys_errlist in - or in .]), -AC_MSG_RESULT(no))])dnl -dnl -dnl -AC_DEFUN(GROFF_OSFCN_H, -[AC_LANG_PUSH(C++) -AC_MSG_CHECKING([C++ ]) -AC_TRY_COMPILE([#include ], -[read(0, 0, 0); open(0, 0);], -AC_MSG_RESULT(yes);AC_DEFINE(HAVE_CC_OSFCN_H, 1, - [Define if you have a C++ .]), -AC_MSG_RESULT(no)) -AC_LANG_POP(C++)])dnl -dnl -dnl -AC_DEFUN(GROFF_LIMITS_H, -[AC_LANG_PUSH(C++) -AC_MSG_CHECKING([C++ ]) -AC_TRY_COMPILE([#include ], -[int x = INT_MIN; int y = INT_MAX; int z = UCHAR_MAX;], -AC_MSG_RESULT(yes);AC_DEFINE(HAVE_CC_LIMITS_H, 1, - [Define if you have a C++ .]), -AC_MSG_RESULT(no)) -AC_LANG_POP(C++)])dnl -dnl -dnl -AC_DEFUN(GROFF_STDINT_H, -[AC_LANG_PUSH(C++) -AC_MSG_CHECKING([C++ ]) -AC_TRY_COMPILE([#include ], -[uint32_t x; int32_t y;], -AC_MSG_RESULT(yes);AC_DEFINE(HAVE_CC_STDINT_H, 1, - [Define if you have a C++ .]), -AC_MSG_RESULT(no)) -AC_LANG_POP(C++)])dnl -dnl -dnl -AC_DEFUN(GROFF_TIME_T, -[AC_LANG_PUSH(C++) -AC_MSG_CHECKING([for declaration of time_t]) -AC_TRY_COMPILE([#include ], -[time_t t = time(0); struct tm *p = localtime(&t);], -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no);AC_DEFINE(LONG_FOR_TIME_T, 1, - [Define if localtime() takes a long * not a - time_t *.])) -AC_LANG_POP(C++)])dnl -dnl -dnl -AC_DEFUN(GROFF_STRUCT_EXCEPTION, -[AC_MSG_CHECKING([struct exception]) -AC_TRY_COMPILE([#include ], -[struct exception e;], -AC_MSG_RESULT(yes);AC_DEFINE(HAVE_STRUCT_EXCEPTION, 1, - [Define if defines struct exception.]), -AC_MSG_RESULT(no))])dnl -dnl -dnl -AC_DEFUN(GROFF_ARRAY_DELETE, -[AC_LANG_PUSH(C++) -AC_MSG_CHECKING([whether ANSI array delete syntax supported]) -AC_TRY_COMPILE(, [char *p = new char[5]; delete [] p;], -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no);AC_DEFINE(ARRAY_DELETE_NEEDS_SIZE, 1, - [Define if your C++ doesn't understand - `delete []'.])) -AC_LANG_POP(C++)])dnl -dnl -dnl -dnl -AC_DEFUN(GROFF_TRADITIONAL_CPP, -[AC_LANG_PUSH(C++) -AC_MSG_CHECKING([traditional preprocessor]) -AC_TRY_COMPILE([#define name2(a,b) a/**/b],[int name2(foo,bar);], -AC_MSG_RESULT(yes);AC_DEFINE(TRADITIONAL_CPP, 1, - [Define if your C++ compiler uses a - traditional (Reiser) preprocessor.]), -AC_MSG_RESULT(no)) -AC_LANG_POP(C++)])dnl -dnl -dnl -AC_DEFUN(GROFF_WCOREFLAG, -[AC_MSG_CHECKING([w_coredump]) -AC_TRY_RUN([#include + + chmod +x conftest.sh + if echo ./conftest.sh | (csh >/dev/null 2>&1) >/dev/null 2>&1; then + AC_MSG_RESULT([yes]) + $1 + else + AC_MSG_RESULT([no]) + $2 + fi + rm -f conftest.sh]) + +# From udodo!hans@relay.NL.net (Hans Zuidam) + +AC_DEFUN([GROFF_ISC_SYSV3], + [AC_MSG_CHECKING([for ISC 3.x or 4.x]) + if grep ['[34]\.'] /usr/options/cb.name >/dev/null 2>&1 + then + AC_MSG_RESULT([yes]) + AC_DEFINE([_SYSV3], [1], [Define if you have ISC 3.x or 4.x.]) + else + AC_MSG_RESULT([no]) + fi]) + +AC_DEFUN([GROFF_POSIX], + [AC_MSG_CHECKING([whether -D_POSIX_SOURCE is necessary]) + AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + +#include +extern "C" { void fileno(int); } + + ]]) + ], + [AC_MSG_RESULT([yes]) + AC_DEFINE([_POSIX_SOURCE], [1], + [Define if -D_POSIX_SOURCE is necessary.])], + [AC_MSG_RESULT([no])]) + AC_LANG_POP([C++])]) + +# srand() of SunOS 4.1.3 has return type int instead of void + +AC_DEFUN([GROFF_SRAND], + [AC_LANG_PUSH([C++]) + AC_MSG_CHECKING([for return type of srand]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + +#include +extern "C" { void srand(unsigned int); } + + ]]) + ], + [AC_MSG_RESULT([void]) + AC_DEFINE([RET_TYPE_SRAND_IS_VOID], [1], + [Define if srand() returns void not int.])], + [AC_MSG_RESULT([int])]) + AC_LANG_POP([C++])]) + +# In April 2005, autoconf's AC_TYPE_SIGNAL is still broken. + +AC_DEFUN([GROFF_TYPE_SIGNAL], + [AC_MSG_CHECKING([for return type of signal handlers]) + for groff_declaration in \ + 'extern "C" void (*signal (int, void (*)(int)))(int);' \ + 'extern "C" void (*signal (int, void (*)(int)) throw ())(int);' \ + 'void (*signal ()) ();' + do + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + +#include +#include +#ifdef signal +# undef signal +#endif +$groff_declaration + + ]], + [[ + +int i; + + ]]) + ], + [break], + [continue]) + done + + if test -n "$groff_declaration"; then + AC_MSG_RESULT([void]) + AC_DEFINE([RETSIGTYPE], [void], + [Define as the return type of signal handlers + (`int' or `void').]) + else + AC_MSG_RESULT([int]) + AC_DEFINE([RETSIGTYPE], [int], + [Define as the return type of signal handlers + (`int' or `void').]) + fi]) + +AC_DEFUN([GROFF_SYS_NERR], + [AC_LANG_PUSH([C++]) + AC_MSG_CHECKING([for sys_nerr in , , or ]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + +#include +#include +#include + + ]], + [[ + +int k; +k = sys_nerr; + + ]]) + ], + [AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_SYS_NERR], [1], + [Define if you have sys_nerr in , , or .])], + [AC_MSG_RESULT([no])]) + AC_LANG_POP([C++])]) + +AC_DEFUN([GROFF_SYS_ERRLIST], + [AC_MSG_CHECKING([for sys_errlist[] in , , or ]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + +#include +#include +#include + + ]], + [[ + +int k; +k = (int)sys_errlist[0]; + + ]]) + ], + [AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_SYS_ERRLIST], [1], + [Define if you have sys_errlist in , , or .])], + [AC_MSG_RESULT([no])])]) + +AC_DEFUN([GROFF_OSFCN_H], + [AC_LANG_PUSH([C++]) + AC_MSG_CHECKING([C++ ]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + +#include + + ]], + [[ + +read(0, 0, 0); +open(0, 0); + + ]]) + ], + [AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_CC_OSFCN_H], [1], + [Define if you have a C++ .])], + [AC_MSG_RESULT([no])]) + AC_LANG_POP([C++])]) + +AC_DEFUN([GROFF_LIMITS_H], + [AC_LANG_PUSH([C++]) + AC_MSG_CHECKING([C++ ]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + +#include + + ]], + [[ + +int x = INT_MIN; +int y = INT_MAX; +int z = UCHAR_MAX; + + ]]) + ], + [AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_CC_LIMITS_H], [1], + [Define if you have a C++ .])], + [AC_MSG_RESULT([no])]) + AC_LANG_POP([C++])]) + +AC_DEFUN([GROFF_TIME_T], + [AC_LANG_PUSH([C++]) + AC_MSG_CHECKING([for declaration of time_t]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + +#include + + ]], + [[ + +time_t t = time(0); +struct tm *p = localtime(&t); + + ]]) + ], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_DEFINE([LONG_FOR_TIME_T], [1], + [Define if localtime() takes a long * not a time_t *.])]) + AC_LANG_POP([C++])]) + +AC_DEFUN([GROFF_STRUCT_EXCEPTION], + [AC_MSG_CHECKING([struct exception]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + +#include + + ]], + [[ + +struct exception e; + + ]]) + ], + [AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_STRUCT_EXCEPTION], [1], + [Define if defines struct exception.])], + [AC_MSG_RESULT([no])])]) + +AC_DEFUN([GROFF_ARRAY_DELETE], + [AC_LANG_PUSH([C++]) + AC_MSG_CHECKING([whether ANSI array delete syntax is supported]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM(, [[ + +char *p = new char[5]; +delete [] p; + + ]]) + ], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_DEFINE([ARRAY_DELETE_NEEDS_SIZE], [1], + [Define if your C++ doesn't understand `delete []'.])]) + AC_LANG_POP([C++])]) + +AC_DEFUN([GROFF_TRADITIONAL_CPP], + [AC_LANG_PUSH([C++]) + AC_MSG_CHECKING([traditional preprocessor]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + +#define name2(a, b) a/**/b + + ]], + [[ + +int name2(foo, bar); + + ]]) + ], + [AC_MSG_RESULT([yes]) + AC_DEFINE([TRADITIONAL_CPP], [1], + [Define if your C++ compiler uses a traditional (Reiser) preprocessor.])], + [AC_MSG_RESULT([no])]) + AC_LANG_POP([C++])]) + +AC_DEFUN([GROFF_WCOREFLAG], + [AC_MSG_CHECKING([w_coredump]) + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[ + +#include #include + + ]], + [[ + main() { #ifdef WCOREFLAG @@ -313,274 +498,307 @@ main() ((union wait *)&i)->w_coredump = 1; exit(i != 0200); #endif -}], -AC_MSG_RESULT(yes);AC_DEFINE(WCOREFLAG, 0200, - [Define if the 0200 bit of the status returned - by wait() indicates whether a core image was - produced for a process that was terminated by - a signal.]), -AC_MSG_RESULT(no), -AC_MSG_RESULT(no))])dnl -dnl -dnl -AC_DEFUN(GROFF_BROKEN_SPOOLER_FLAGS, -[AC_MSG_CHECKING([default value for grops -b option]) -test -n "${BROKEN_SPOOLER_FLAGS}" || BROKEN_SPOOLER_FLAGS=7 -AC_MSG_RESULT($BROKEN_SPOOLER_FLAGS) -AC_SUBST(BROKEN_SPOOLER_FLAGS)])dnl -dnl -dnl -AC_DEFUN(GROFF_PAGE, -[AC_MSG_CHECKING([default paper size]) -groff_prefix=$prefix -test "x$prefix" = xNONE && groff_prefix=$ac_default_prefix -if test -z "$PAGE"; then - descfile= - if test -r $groff_prefix/share/groff/font/devps/DESC; then - descfile=$groff_prefix/share/groff/font/devps/DESC - elif test -r $groff_prefix/lib/groff/font/devps/DESC; then - descfile=$groff_prefix/lib/groff/font/devps/DESC - else - for f in $groff_prefix/share/groff/*/font/devps/DESC; do - if test -r $f; then - descfile=$f - break - fi - done - fi - if test -n "$descfile"; then -changequote(,)dnl - if grep '^paperlength[ ]\+841890' $descfile - >/dev/null 2>&1; then - PAGE=A4 - elif grep '^papersize[ ]\+[aA]4' $descfile \ - >/dev/null 2>&1; then - PAGE=A4 - fi -changequote([,])dnl - fi -fi -if test -z "$PAGE"; then - dom=`awk '([$]1 == "dom" || [$]1 == "search") { print [$]2; exit}' \ - /etc/resolv.conf 2>/dev/null` - if test -z "$dom"; then - dom=`(domainname) 2>/dev/null | tr -d '+'` - if test -z "$dom" \ - || test "$dom" = '(none)'; then - dom=`(hostname) 2>/dev/null | grep '\.'` - fi - fi -changequote(,)dnl - # If the top-level domain is two letters and it's not `us' or `ca' - # then they probably use A4 paper. - case "$dom" in - *.[Uu][Ss]|*.[Cc][Aa]) ;; - *.[A-Za-z][A-Za-z]) PAGE=A4 ;; - esac -changequote([,])dnl -fi -test -n "$PAGE" || PAGE=letter -if test "x$PAGE" = "xA4"; then - AC_DEFINE(PAGEA4, 1, - [Define if the printer's page size is A4.]) -fi -AC_MSG_RESULT($PAGE) -AC_SUBST(PAGE)])dnl -dnl -dnl -AC_DEFUN(GROFF_CXX_CHECK, -[AC_REQUIRE([AC_PROG_CXX]) -AC_LANG_PUSH(C++) -if test "$cross_compiling" = no; then - AC_MSG_CHECKING([that C++ compiler can compile simple program]) -fi -AC_TRY_RUN([int main() { return 0; }], -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no);AC_MSG_ERROR([a working C++ compiler is required]), -:) -if test "$cross_compiling" = no; then - AC_MSG_CHECKING([that C++ static constructors and destructors are called]) -fi -AC_TRY_RUN([ +} + + ]]) + ], + [AC_MSG_RESULT([yes]) + AC_DEFINE(WCOREFLAG, 0200, + [Define if the 0200 bit of the status returned by wait() indicates + whether a core image was produced for a process that was terminated + by a signal.])], + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([no])])]) + +AC_DEFUN([GROFF_BROKEN_SPOOLER_FLAGS], + [AC_MSG_CHECKING([default value for grops -b option]) + test -n "${BROKEN_SPOOLER_FLAGS}" || BROKEN_SPOOLER_FLAGS=0 + AC_MSG_RESULT([$BROKEN_SPOOLER_FLAGS]) + AC_SUBST([BROKEN_SPOOLER_FLAGS])]) + +AC_DEFUN([GROFF_PAGE], + [AC_MSG_CHECKING([default paper size]) + groff_prefix=$prefix + test "x$prefix" = "xNONE" && groff_prefix=$ac_default_prefix + if test -z "$PAGE"; then + descfile= + if test -r $groff_prefix/share/groff/font/devps/DESC; then + descfile=$groff_prefix/share/groff/font/devps/DESC + elif test -r $groff_prefix/lib/groff/font/devps/DESC; then + descfile=$groff_prefix/lib/groff/font/devps/DESC + else + for f in $groff_prefix/share/groff/*/font/devps/DESC; do + if test -r $f; then + descfile=$f + break + fi + done + fi + + if test -n "$descfile"; then + if grep ['^paperlength[ ]\+841890'] $descfile >/dev/null 2>&1; then + PAGE=A4 + elif grep ['^papersize[ ]\+[aA]4'] $descfile >/dev/null 2>&1; then + PAGE=A4 + fi + fi + fi + + if test -z "$PAGE"; then + dom=`awk '([$]1 == "dom" || [$]1 == "search") { print [$]2; exit}' \ + /etc/resolv.conf 2>/dev/null` + if test -z "$dom"; then + dom=`(domainname) 2>/dev/null | tr -d '+'` + if test -z "$dom" \ + || test "$dom" = '(none)'; then + dom=`(hostname) 2>/dev/null | grep '\.'` + fi + fi + # If the top-level domain is two letters and it's not `us' or `ca' + # then they probably use A4 paper. + case "$dom" in + [*.[Uu][Ss]|*.[Cc][Aa])] + ;; + [*.[A-Za-z][A-Za-z])] + PAGE=A4 ;; + esac + fi + + test -n "$PAGE" || PAGE=letter + if test "x$PAGE" = "xA4"; then + AC_DEFINE([PAGEA4], [1], + [Define if the printer's page size is A4.]) + fi + AC_MSG_RESULT([$PAGE]) + AC_SUBST([PAGE])]) + +AC_DEFUN([GROFF_CXX_CHECK], + [AC_REQUIRE([AC_PROG_CXX]) + AC_LANG_PUSH([C++]) + if test "$cross_compiling" = no; then + AC_MSG_CHECKING([that C++ compiler can compile simple program]) + fi + AC_RUN_IFELSE([ + AC_LANG_SOURCE([[ + +int main() { + return 0; +} + + ]]) + ], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([a working C++ compiler is required])], + [:]) + + if test "$cross_compiling" = no; then + AC_MSG_CHECKING([that C++ static constructors and destructors are called]) + fi + AC_RUN_IFELSE([ + AC_LANG_SOURCE([[ + extern "C" { void _exit(int); } + int i; struct A { char dummy; A() { i = 1; } ~A() { if (i == 1) _exit(0); } }; + A a; -int main() { return 1; } -], -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no);AC_MSG_ERROR([a working C++ compiler is required]), -:) -AC_MSG_CHECKING([that header files support C++]) -AC_TRY_LINK([#include ], -[fopen(0, 0);], -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no);AC_MSG_ERROR([header files do not support C++ (if you are using a version of gcc/g++ earlier than 2.5, you should install libg++)])) -AC_LANG_POP(C++)])dnl -dnl -dnl -AC_DEFUN(GROFF_TMAC, -[AC_MSG_CHECKING([for prefix of system macro packages]) -sys_tmac_prefix= -sys_tmac_file_prefix= -for d in /usr/share/lib/tmac /usr/lib/tmac; do - for t in "" tmac.; do - for m in an s m; do - f=$d/$t$m - if test -z "$sys_tmac_prefix" \ - && test -f $f \ - && grep '^\.if' $f >/dev/null 2>&1; then - sys_tmac_prefix=$d/$t - sys_tmac_file_prefix=$t - fi - done - done -done -AC_MSG_RESULT($sys_tmac_prefix) -AC_SUBST(sys_tmac_prefix) -tmac_wrap= -AC_MSG_CHECKING([which system macro packages should be made available]) -if test "x$sys_tmac_file_prefix" = "xtmac."; then - for f in $sys_tmac_prefix*; do - suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"` - case "$suff" in - e) ;; - *) - grep "Copyright.*Free Software Foundation" $f >/dev/null \ - || tmac_wrap="$tmac_wrap $suff" ;; - esac - done -elif test -n "$sys_tmac_prefix"; then - files=`echo $sys_tmac_prefix*` - grep "\\.so" $files >conftest.sol - for f in $files; do - case "$f" in - ${sys_tmac_prefix}e) ;; - *.me) ;; - */ms.*) ;; - *) - b=`basename $f` - if grep "\\.so.*/$b\$" conftest.sol >/dev/null \ - || grep -l "Copyright.*Free Software Foundation" $f >/dev/null; then - : - else - suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"` - case "$suff" in - tmac.*) ;; - *) tmac_wrap="$tmac_wrap $suff" ;; - esac - fi - esac - done - rm -f conftest.sol -fi -AC_MSG_RESULT([$tmac_wrap]) -AC_SUBST(tmac_wrap)])dnl -dnl -dnl -AC_DEFUN(GROFF_G, -[AC_MSG_CHECKING([for existing troff installation]) -if test "x`(echo .tm '|n(.g' | tr '|' '\\\\' | troff -z -i 2>&1) 2>/dev/null`" = x0; then - AC_MSG_RESULT(yes) - g=g -else - AC_MSG_RESULT(no) - g= -fi -AC_SUBST(g)])dnl -dnl -dnl -dnl We need the path to install-sh to be absolute. -dnl -AC_DEFUN(GROFF_INSTALL_SH, -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -ac_dir=`cd $ac_aux_dir; pwd` -ac_install_sh="$ac_dir/install-sh -c"])dnl -dnl -dnl -dnl Test whether install-info is available. -dnl -AC_DEFUN(GROFF_INSTALL_INFO, -[AC_CHECK_PROGS(INSTALL_INFO, install-info, :)])dnl -dnl -dnl -dnl At least one UNIX system, Apple Macintosh Rhapsody 5.5, -dnl does not have -lm. -dnl -AC_DEFUN(GROFF_LIBM, -[AC_CHECK_LIB(m,sin,LIBM=-lm) -AC_SUBST(LIBM)])dnl -dnl -dnl -dnl We need top_srcdir to be absolute. -dnl -AC_DEFUN(GROFF_SRCDIR, -[ac_srcdir_defaulted=no -srcdir=`cd $srcdir; pwd`])dnl -dnl -dnl -dnl This simplifies Makefile rules. -dnl -AC_DEFUN(GROFF_BUILDDIR, -[groff_top_builddir=`pwd` -AC_SUBST(groff_top_builddir)])dnl -dnl -dnl -dnl Check for EBCDIC - stolen from the OS390 Unix LYNX port -dnl -AC_DEFUN(GROFF_EBCDIC, -[AC_MSG_CHECKING([whether character set is EBCDIC]) -AC_TRY_COMPILE(, -[/* Treat any failure as ASCII for compatibility with existing art. - Use compile-time rather than run-time tests for cross-compiler - tolerance. */ + +int main() +{ + return 1; +} + + ]]) + ], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([a working C++ compiler is required])], + [:]) + + AC_MSG_CHECKING([that header files support C++]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ + +#include + + ]], + [[ + +fopen(0, 0); + + ]]) + ], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([header files do not support C++ + (if you are using a version of gcc/g++ earlier than 2.5, + you should install libg++)])]) + AC_LANG_POP([C++])]) + +AC_DEFUN([GROFF_TMAC], + [AC_MSG_CHECKING([for prefix of system macro packages]) + sys_tmac_prefix= + sys_tmac_file_prefix= + for d in /usr/share/lib/tmac /usr/lib/tmac; do + for t in "" tmac.; do + for m in an s m; do + f=$d/$t$m + if test -z "$sys_tmac_prefix" \ + && test -f $f \ + && grep '^\.if' $f >/dev/null 2>&1; then + sys_tmac_prefix=$d/$t + sys_tmac_file_prefix=$t + fi + done + done + done + AC_MSG_RESULT([$sys_tmac_prefix]) + AC_SUBST([sys_tmac_prefix]) + + AC_MSG_CHECKING([which system macro packages should be made available]) + tmac_wrap= + if test "x$sys_tmac_file_prefix" = "xtmac."; then + for f in $sys_tmac_prefix*; do + suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"` + case "$suff" in + e) + ;; + *) + grep "Copyright.*Free Software Foundation" $f >/dev/null \ + || tmac_wrap="$tmac_wrap $suff" ;; + esac + done + elif test -n "$sys_tmac_prefix"; then + files=`echo $sys_tmac_prefix*` + grep "\\.so" $files >conftest.sol + for f in $files; do + case "$f" in + ${sys_tmac_prefix}e) + ;; + *.me) + ;; + */ms.*) + ;; + *) + b=`basename $f` + if grep "\\.so.*/$b\$" conftest.sol >/dev/null \ + || grep -l "Copyright.*Free Software Foundation" $f >/dev/null; then + : + else + suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"` + case "$suff" in + tmac.*) + ;; + *) + tmac_wrap="$tmac_wrap $suff" ;; + esac + fi + esac + done + rm -f conftest.sol + fi + AC_MSG_RESULT([$tmac_wrap]) + AC_SUBST([tmac_wrap])]) + +AC_DEFUN([GROFF_G], + [AC_MSG_CHECKING([for existing troff installation]) + if test "x`(echo .tm '|n(.g' | tr '|' '\\\\' | troff -z -i 2>&1) 2>/dev/null`" = x0; then + AC_MSG_RESULT([yes]) + g=g + else + AC_MSG_RESULT([no]) + g= + fi + AC_SUBST([g])]) + +# We need the path to install-sh to be absolute. + +AC_DEFUN([GROFF_INSTALL_SH], + [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) + ac_dir=`cd $ac_aux_dir; pwd` + ac_install_sh="$ac_dir/install-sh -c"]) + +# Test whether install-info is available. + +AC_DEFUN([GROFF_INSTALL_INFO], + [AC_CHECK_PROGS([INSTALL_INFO], [install-info], [:])]) + +# At least one UNIX system, Apple Macintosh Rhapsody 5.5, +# does not have -lm ... + +AC_DEFUN([GROFF_LIBM], + [AC_CHECK_LIB([m], [sin], [LIBM=-lm]) + AC_SUBST([LIBM])]) + +# ... while the MinGW implementation of GCC for Microsoft Win32 +# does not seem to have -lc. + +AC_DEFUN([GROFF_LIBC], + [AC_CHECK_LIB([c], [main], [LIBC=-lc]) + AC_SUBST([LIBC])]) + +# Check for EBCDIC -- stolen from the OS390 Unix LYNX port + +AC_DEFUN([GROFF_EBCDIC], + [AC_MSG_CHECKING([whether character set is EBCDIC]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + +/* Treat any failure as ASCII for compatibility with existing art. + Use compile-time rather than run-time tests for cross-compiler + tolerance. */ #if '0' != 240 make an error "Character set is not EBCDIC" -#endif], -groff_cv_ebcdic="yes" - TTYDEVDIRS="font/devcp1047" - AC_MSG_RESULT(yes) - AC_DEFINE(IS_EBCDIC_HOST, 1, - [Define if the host's encoding is EBCDIC.]), -groff_cv_ebcdic="no" - TTYDEVDIRS="font/devascii font/devlatin1" - OTHERDEVDIRS="font/devlj4 font/devlbp" - AC_MSG_RESULT(no)) -AC_SUBST(TTYDEVDIRS) -AC_SUBST(OTHERDEVDIRS)])dnl -dnl -dnl -dnl Check for OS/390 Unix. We test for EBCDIC also -- the Linux port (with -dnl gcc) to OS/390 uses ASCII internally. -dnl -AC_DEFUN(GROFF_OS390, -[if test "$groff_cv_ebcdic" = "yes"; then - AC_MSG_CHECKING([for OS/390 Unix]) - case `uname` in - OS/390) - CFLAGS="$CFLAGS -D_ALL_SOURCE" - AC_MSG_RESULT(yes) ;; - *) - AC_MSG_RESULT(no) ;; - esac -fi])dnl -dnl -dnl -dnl Check whether we need a declaration for a function. -dnl -dnl Stolen from GNU bfd. -dnl -AC_DEFUN(GROFF_NEED_DECLARATION, -[AC_MSG_CHECKING([whether $1 must be declared]) -AC_LANG_PUSH(C++) -AC_CACHE_VAL(groff_cv_decl_needed_$1, -[AC_TRY_COMPILE([ +#endif + + ]]) + ], + [groff_cv_ebcdic="yes" + TTYDEVDIRS="font/devcp1047" + AC_MSG_RESULT([yes]) + AC_DEFINE(IS_EBCDIC_HOST, 1, + [Define if the host's encoding is EBCDIC.])], + [groff_cv_ebcdic="no" + TTYDEVDIRS="font/devascii font/devlatin1" + OTHERDEVDIRS="font/devlj4 font/devlbp" + AC_MSG_RESULT([no])]) + AC_SUBST([TTYDEVDIRS]) + AC_SUBST([OTHERDEVDIRS])]) + +# Check for OS/390 Unix. We test for EBCDIC also -- the Linux port (with +# gcc) to OS/390 uses ASCII internally. + +AC_DEFUN([GROFF_OS390], + [if test "$groff_cv_ebcdic" = "yes"; then + AC_MSG_CHECKING([for OS/390 Unix]) + case `uname` in + OS/390) + CFLAGS="$CFLAGS -D_ALL_SOURCE" + AC_MSG_RESULT([yes]) ;; + *) + AC_MSG_RESULT([no]) ;; + esac + fi]) + +# Check whether we need a declaration for a function. +# +# Stolen from GNU bfd. + +AC_DEFUN([GROFF_NEED_DECLARATION], + [AC_MSG_CHECKING([whether $1 must be declared]) + AC_LANG_PUSH([C++]) + AC_CACHE_VAL([groff_cv_decl_needed_$1], + [AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + #include #ifdef HAVE_STRING_H #include @@ -599,77 +817,336 @@ AC_CACHE_VAL(groff_cv_decl_needed_$1, #endif #ifdef HAVE_MATH_H #include -#endif], -[#ifndef $1 +#endif + + ]], + [[ + +#ifndef $1 char *p = (char *) $1; -#endif], -groff_cv_decl_needed_$1=no, -groff_cv_decl_needed_$1=yes)]) -AC_MSG_RESULT($groff_cv_decl_needed_$1) -if test $groff_cv_decl_needed_$1 = yes; then - AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1, - [Define if your C++ doesn't declare ]$1[().]) -fi -AC_LANG_POP(C++)])dnl -dnl -dnl -dnl If mkstemp() isn't available, use our own mkstemp.cpp file. -dnl -AC_DEFUN(GROFF_MKSTEMP, -[AC_MSG_CHECKING([for mkstemp]) -AC_LANG_PUSH(C++) -AC_LIBSOURCE(mkstemp.cpp) -AC_TRY_LINK([#include +#endif + + ]]) + ], + [groff_cv_decl_needed_$1=no], + [groff_cv_decl_needed_$1=yes])]) + AC_MSG_RESULT([$groff_cv_decl_needed_$1]) + if test $groff_cv_decl_needed_$1 = yes; then + AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), [1], + [Define if your C++ doesn't declare ]$1[().]) + fi + AC_LANG_POP([C++])]) + +# If mkstemp() isn't available, use our own mkstemp.cpp file. + +AC_DEFUN([GROFF_MKSTEMP], + [AC_MSG_CHECKING([for mkstemp]) + AC_LANG_PUSH([C++]) + AC_LIBSOURCE([mkstemp.cpp]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ + +#include #include -int (*f) (char *);], -[f = mkstemp;], -AC_MSG_RESULT(yes);AC_DEFINE(HAVE_MKSTEMP, 1, - [Define if you have mkstemp().]), -AC_MSG_RESULT(no);_AC_LIBOBJ(mkstemp)) -AC_LANG_POP(C++)])dnl -dnl -dnl -dnl Test whether exists, doesn't clash with , -dnl and declares uintmax_t. Taken from the fileutils package. -dnl -AC_DEFUN(GROFF_INTTYPES_H, -[AC_LANG_PUSH(C++) -AC_MSG_CHECKING([for inttypes.h]) -AC_TRY_COMPILE([#include -#include ], -[uintmax_t i = (uintmax_t)-1;], -groff_cv_header_inttypes_h=yes, -groff_cv_header_inttypes_h=no) -AC_MSG_RESULT($groff_cv_header_inttypes_h) -AC_LANG_POP(C++)])dnl -dnl -dnl -dnl Test for working `unsigned long long'. Taken from the fileutils package. -dnl -AC_DEFUN(GROFF_UNSIGNED_LONG_LONG, -[AC_LANG_PUSH(C++) -AC_MSG_CHECKING([for unsigned long long]) -AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], -[unsigned long long ullmax = (unsigned long long)-1; -return ull << i | ull >> i | ullmax / ull | ullmax % ull;], -groff_cv_type_unsigned_long_long=yes, -groff_cv_type_unsigned_long_long=no) -AC_MSG_RESULT($groff_cv_type_unsigned_long_long) -AC_LANG_POP(C++)])dnl -dnl -dnl -dnl Define uintmax_t to `unsigned long' or `unsigned long long' -dnl if does not exist. Taken from the fileutils package. -dnl -AC_DEFUN(GROFF_UINTMAX_T, -[AC_REQUIRE([GROFF_INTTYPES_H]) -if test $groff_cv_header_inttypes_h = no; then - AC_REQUIRE([GROFF_UNSIGNED_LONG_LONG]) - test $groff_cv_type_unsigned_long_long = yes \ +int (*f) (char *); + + ]], + [[ + +f = mkstemp; + + ]]) + ], + [AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_MKSTEMP], [1], [Define if you have mkstemp().])], + [AC_MSG_RESULT([no]) + _AC_LIBOBJ([mkstemp])]) + AC_LANG_POP([C++])]) + +# Test whether exists, doesn't clash with , +# and declares uintmax_t. Taken from the fileutils package. + +AC_DEFUN([GROFF_INTTYPES_H], + [AC_LANG_PUSH([C++]) + AC_MSG_CHECKING([C++ ]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + +#include +#include + + ]], + [[ + +uintmax_t i = (uintmax_t)-1; + + ]]) + ], + [groff_cv_header_inttypes_h=yes + AC_DEFINE([HAVE_CC_INTTYPES_H], [1], + [Define if you have a C++ .])], + [groff_cv_header_inttypes_h=no]) + AC_MSG_RESULT([$groff_cv_header_inttypes_h]) + AC_LANG_POP([C++])]) + +# Test for working `unsigned long long'. Taken from the fileutils package. + +AC_DEFUN([GROFF_UNSIGNED_LONG_LONG], + [AC_LANG_PUSH([C++]) + AC_MSG_CHECKING([for unsigned long long]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ + +unsigned long long ull = 1; +int i = 63; +unsigned long long ullmax = (unsigned long long)-1; + + ]], + [[ + +return ull << i | ull >> i | ullmax / ull | ullmax % ull; + + ]]) + ], + [groff_cv_type_unsigned_long_long=yes], + [groff_cv_type_unsigned_long_long=no]) + AC_MSG_RESULT([$groff_cv_type_unsigned_long_long]) + AC_LANG_POP([C++])]) + +# Define uintmax_t to `unsigned long' or `unsigned long long' +# if does not exist. Taken from the fileutils package. + +AC_DEFUN([GROFF_UINTMAX_T], + [AC_REQUIRE([GROFF_INTTYPES_H]) + if test $groff_cv_header_inttypes_h = no; then + AC_REQUIRE([GROFF_UNSIGNED_LONG_LONG]) + test $groff_cv_type_unsigned_long_long = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' - AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, - [Define uintmax_t to `unsigned long' or - `unsigned long long' if does not - exist.]) -fi])dnl + AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type], + [Define uintmax_t to `unsigned long' or `unsigned long long' if + does not exist.]) + fi]) + +# Identify PATH_SEPARATOR character to use in GROFF_FONT_PATH and +# GROFF_TMAC_PATH which is appropriate for the target system (POSIX=':', +# MS-DOS/Win32=';'). +# +# The logic to resolve this test is already encapsulated in +# `${srcdir}/src/include/nonposix.h'. + +AC_DEFUN([GROFF_TARGET_PATH_SEPARATOR], + [AC_MSG_CHECKING([separator character to use in groff search paths]) + cp ${srcdir}/src/include/nonposix.h conftest.h + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + +#include +#include "conftest.h" + + ]], + [[ + +#if PATH_SEP_CHAR == ';' +make an error "Path separator is ';'" +#endif + + ]]) + ], + [GROFF_PATH_SEPARATOR=":"], + [GROFF_PATH_SEPARATOR=";"]) + AC_MSG_RESULT([$GROFF_PATH_SEPARATOR]) + AC_SUBST(GROFF_PATH_SEPARATOR)]) + +# Check for X11. + +AC_DEFUN([GROFF_X11], + [AC_REQUIRE([AC_PATH_XTRA]) + groff_no_x=$no_x + if test -z "$groff_no_x"; then + OLDCFLAGS=$CFLAGS + OLDLDFLAGS=$LDFLAGS + OLDLIBS=$LIBS + CFLAGS="$CFLAGS $X_CFLAGS" + LDFLAGS="$LDFLAGS $X_LIBS" + LIBS="$LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" + + LIBS="$LIBS -lXaw" + AC_MSG_CHECKING([for Xaw library and header files]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ + +#include +#include + + ]], + []) + ], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + groff_no_x="yes"]) + + LIBS="$LIBS -lXmu" + AC_MSG_CHECKING([for Xmu library and header files]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ + +#include +#include + + ]], + []) + ], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + groff_no_x="yes"]) + + CFLAGS=$OLDCFLAGS + LDFLAGS=$OLDLDFLAGS + LIBS=$OLDLIBS + fi + + if test "x$groff_no_x" = "xyes"; then + AC_MSG_NOTICE([gxditview and xtotroff won't be built]) + else + XDEVDIRS="font/devX75 font/devX75-12 font/devX100 font/devX100-12" + XPROGDIRS="src/devices/xditview src/utils/xtotroff" + XLIBDIRS="src/libs/libxutil" + fi + + AC_SUBST([XDEVDIRS]) + AC_SUBST([XPROGDIRS]) + AC_SUBST([XLIBDIRS])]) + +# Set up the `--with-appresdir' command line option. + +AC_DEFUN([GROFF_APPRESDIR_OPTION], + [AC_ARG_WITH([appresdir], + dnl Don't quote AS_HELP_STRING! + AS_HELP_STRING([--with-appresdir=DIR], + [X11 application resource files]))]) + +# Get a default value for the application resource directory. +# +# We ignore the `XAPPLRES' and `XUSERFILESEARCHPATH' environment variables. +# +# The goal is to find the `root' of X11. Under most systems this is +# `/usr/X11/lib'. Application default files are then in +# `/usr/X11/lib/X11/app-defaults'. +# +# Based on autoconf's AC_PATH_X macro. + +AC_DEFUN([GROFF_APPRESDIR_DEFAULT], + [if test -z "$groff_no_x"; then + # Create an Imakefile, run `xmkmf', then `make'. + rm -f -r conftest.dir + if mkdir conftest.dir; then + cd conftest.dir + # Make sure to not put `make' in the Imakefile rules, + # since we grep it out. + cat >Imakefile <<'EOF' + +xlibdirs: + @echo 'groff_x_usrlibdir="${USRLIBDIR}"; groff_x_libdir="${LIBDIR}"' +EOF + + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", + # which would confuse us. + eval `${MAKE-make} xlibdirs 2>/dev/null | grep -v make` + + # Open Windows `xmkmf' reportedly sets LIBDIR instead of USRLIBDIR. + for groff_extension in a so sl; do + if test ! -f $groff_x_usrlibdir/libX11.$groff_extension && + test -f $groff_x_libdir/libX11.$groff_extension; then + groff_x_usrlibdir=$groff_x_libdir + break + fi + done + fi + + cd .. + rm -f -r conftest.dir + fi + + # In case the test with `xmkmf' wasn't successful, try a suite of + # standard directories. Check `X11' before `X11Rn' because it is often + # a symlink to the current release. + groff_x_libdirs=' + /usr/X11/lib + /usr/X11R6/lib + /usr/X11R5/lib + /usr/X11R4/lib + + /usr/lib/X11 + /usr/lib/X11R6 + /usr/lib/X11R5 + /usr/lib/X11R4 + + /usr/local/X11/lib + /usr/local/X11R6/lib + /usr/local/X11R5/lib + /usr/local/X11R4/lib + + /usr/local/lib/X11 + /usr/local/lib/X11R6 + /usr/local/lib/X11R5 + /usr/local/lib/X11R4 + + /usr/X386/lib + /usr/x386/lib + /usr/XFree86/lib/X11 + + /usr/lib + /usr/local/lib + /usr/unsupported/lib + /usr/athena/lib + /usr/local/x11r5/lib + /usr/lpp/Xamples/lib + + /usr/openwin/lib + /usr/openwin/share/lib' + + if test -z "$groff_x_usrlibdir"; then + # We only test whether libX11 exists. + for groff_dir in $groff_x_libdirs; do + for groff_extension in a so sl; do + if test ! -r $groff_dir/libX11.$groff_extension; then + groff_x_usrlibdir=$groff_dir + break 2 + fi + done + done + fi + + if test "x$with_appresdir" = "x"; then + appresdir=$groff_x_usrlibdir/X11/app-defaults + else + appresdir=$with_appresdir + fi + fi + AC_SUBST([appresdir])]) + + +# Emit warning if --with-appresdir hasn't been used. + +AC_DEFUN([GROFF_APPRESDIR_CHECK], + [if test -z "$groff_no_x"; then + if test "x$with_appresdir" = "x"; then + AC_MSG_NOTICE([ + + The application resource file for gxditview will be installed as + + $appresdir/GXditview + + (an existing file will be saved as `GXditview.old'). + To install it into a different directory, say, `/etc/gxditview', + add `--with-appresdir=/etc/gxditview' to the configure script + command line options and rerun it. The environment variable + `APPLRESDIR' must then be set to `/etc/' (note the trailing slash), + omitting the `gxditview' part which is automatically appended by + the X11 searching routines for resource files. More details can be + found in the X(7) manual page. + ]) + fi + fi]) diff --git a/contrib/groff/configure b/contrib/groff/configure index b6ad057eb89f..107aadcae070 100755 --- a/contrib/groff/configure +++ b/contrib/groff/configure @@ -1,9 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.54. +# Generated by GNU Autoconf 2.59b. # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -17,31 +17,85 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + setopt NO_GLOB_SUBST +elif test -n "${BASH_VERSION+set}${KSH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi # Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi +# Find who we are. Look in the path if we contain no path at all +# relative or not. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; }; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME do - if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done @@ -72,101 +126,282 @@ echo X/"$0" | s/.*/./; q'` -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conftest.sh - echo "exit 0" >>conftest.sh - chmod +x conftest.sh - if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conftest.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(func_return () { + (exit \$1) +} +func_success () { + func_return 0 +} +func_failure () { + func_return 1 +} +func_ret_success () { + return 0 +} +func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if func_success; then + : +else + exitcode=1 + echo func_failure succeeded. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if func_failure; then + exitcode=1 + echo func_success failed. +fi + +if func_ret_success; then + : +else + exitcode=1 + echo func_ret_success failed. +fi + +if func_ret_failure; then + exitcode=1 + echo func_ret_failure succeeded. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + as_lineno_3=\`(expr \$as_lineno_1 + 1) 2>/dev/null\` + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\$as_lineno_3\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done + esac +done + + + for as_shell in $as_candidate_shells $SHELL; do + if { $as_shell 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +elif test -n "${BASH_VERSION+set}${KSH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { $as_shell 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +elif test -n "${BASH_VERSION+set}${KSH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +(func_return () { + (exit $1) +} +func_success () { + func_return 0 +} +func_failure () { + func_return 1 +} +func_ret_success () { + return 0 +} +func_ret_failure () { + return 1 +} + +exitcode=0 +if func_success; then + : +else + exitcode=1 + echo func_failure succeeded. +fi + +if func_failure; then + exitcode=1 + echo func_success failed. +fi + +if func_ret_success; then + : +else + exitcode=1 + echo func_ret_success failed. +fi + +if func_ret_failure; then + exitcode=1 + echo func_ret_failure succeeded. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x$as_lineno_3" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "func_return () { + (exit \$1) +} +func_success () { + func_return 0 +} +func_failure () { + func_return 1 +} +func_ret_success () { + return 0 +} +func_ret_failure () { + return 1 +} + +exitcode=0 +if func_success; then + : +else + exitcode=1 + echo func_failure succeeded. +fi + +if func_failure; then + exitcode=1 + echo func_success failed. +fi + +if func_ret_success; then + : +else + exitcode=1 + echo func_ret_success failed. +fi + +if func_ret_failure; then + exitcode=1 + echo func_ret_failure succeeded. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s,[$]LINENO.*,&-, + t lineno + b + : lineno N - s,$,-, : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + s,[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\),\2\1\2, t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s,-\n.*,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 @@ -215,16 +450,17 @@ rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else + test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS @@ -296,16 +532,15 @@ ac_includes_default="\ #endif #if HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif +#endif +#if HAVE_STDINT_H +# include #endif #if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS groff_top_builddir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX TTYDEVDIRS OTHERDEVDIRS LPR LP LPQ PSPRINT DVIPRINT PERLPATH YACC RANLIB ac_ct_RANLIB INSTALL_INFO INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SH_SCRIPT_SED_CMD CPP EGREP LIBM LIBOBJS BROKEN_SPOOLER_FLAGS PAGE g sys_tmac_prefix tmac_wrap pnmcut pnmcrop pnmtopng gs psselect pnmtops make_html make_install_html pnmtops_nosetpage LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX TTYDEVDIRS OTHERDEVDIRS CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XDEVDIRS XPROGDIRS XLIBDIRS appresdir LPR LP LPQ PSPRINT DVIPRINT PERLPATH YACC RANLIB ac_ct_RANLIB INSTALL_INFO INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SH_SCRIPT_SED_CMD GREP EGREP LIBC LIBM LIBOBJS BROKEN_SPOOLER_FLAGS PAGE g sys_tmac_prefix tmac_wrap GROFF_PATH_SEPARATOR ALT_GHOSTSCRIPT_PROGS GHOSTSCRIPT ac_ct_GHOSTSCRIPT pnmcut pnmcrop pnmtopng psselect pnmtops make_html make_install_html ALT_AWK_PROGS AWK ac_ct_AWK make_pdfdoc make_install_pdfdoc pnmtops_nosetpage LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -347,6 +582,7 @@ infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. @@ -360,7 +596,9 @@ do # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -651,7 +889,7 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. +# Be sure to have absolute directory names. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` @@ -662,9 +900,9 @@ do esac done -# Be sure to have absolute paths. +# Be sure to have absolute directory names. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir + localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in @@ -704,10 +942,10 @@ if test -z "$srcdir"; then # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -807,9 +1045,9 @@ _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -834,6 +1072,10 @@ Fine tuning of the installation directories: _ACEOF cat <<\_ACEOF + +X features: + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR _ACEOF fi @@ -841,6 +1083,16 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-x use the X Window System + --with-appresdir=DIR X11 application resource files + --with-alt-gs=LIST alternative names for ghostscript executable + --with-gs=PROG actual [/path/]name of ghostscript executable + --with-alt-awk=LIST alternative names for awk executable + --with-awk=PROG actual [/path/]name of awk executable + Some influential environment variables: CC C compiler command CFLAGS C compiler flags @@ -881,19 +1133,52 @@ case $srcdir in else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; - *) # Relative path. + *) # Relative name. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + +# Do not use `cd foo && pwd` to compute absolute names, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. @@ -904,13 +1189,13 @@ ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then + test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi - cd $ac_popdir + cd "$ac_popdir" done fi @@ -918,8 +1203,8 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -Free Software Foundation, Inc. +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, +2003, 2004 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -931,7 +1216,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.54. Invocation command line was +generated by GNU Autoconf 2.59b. Invocation command line was $ $0 $@ @@ -983,24 +1268,54 @@ _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= +ac_configure_args0= +ac_configure_args1= ac_sep= -for ac_arg +ac_must_keep_next=false +for ac_pass in 1 2 do - case $ac_arg in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n ) continue ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1024,12 +1339,12 @@ _ASBOX case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } @@ -1058,7 +1373,7 @@ _ASBOX for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1077,8 +1392,8 @@ _ASBOX echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core core.* *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do @@ -1087,9 +1402,11 @@ done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h +rm -f -r conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +# NextStep 3.3 (patch 3) loses unless the first echo outputs at least 14 bytes. +ac_space=' ' +echo "$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space" >confdefs.h # Predefined preprocessor variables. @@ -1157,7 +1474,7 @@ fi # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" @@ -1174,13 +1491,13 @@ echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. @@ -1227,14 +1544,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_config_headers="$ac_config_headers src/include/config.h:src/include/config.hin" -ac_srcdir_defaulted=no -srcdir=`cd $srcdir; pwd` -groff_top_builddir=`pwd` +# checks for programs ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -1314,7 +1631,19 @@ else echo "${ECHO_T}no" >&6 fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + if test "$build" != "$host"; then + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} + fi + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi @@ -1394,7 +1723,19 @@ else echo "${ECHO_T}no" >&6 fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + if test "$build" != "$host"; then + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} + fi + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi @@ -1538,14 +1879,28 @@ fi test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + if test "$build" != "$host"; then + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} + fi + CC=$ac_ct_CC + fi fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;} +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. @@ -1569,8 +1924,11 @@ ac_compiler=`set X $ac_compile; echo $2` (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -1581,46 +1939,69 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe" +ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output" >&5 -echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. + # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.*; do +for ac_file in $ac_files +do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; - a.out ) # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool --akim. - export ac_cv_exeext - break;; - * ) break;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; esac done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + { { echo "$as_me:$LINENO: error: C compiler cannot create executables -check \`config.log' for details." >&5 +See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables -check \`config.log' for details." >&2;} +See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi @@ -1647,9 +2028,11 @@ if test "$cross_compiling" != yes; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'." >&5 +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'." >&2;} +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi @@ -1657,7 +2040,7 @@ fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 -rm -f a.out a.exe conftest$ac_cv_exeext +rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. @@ -1682,14 +2065,16 @@ for ac_file in conftest.exe conftest conftest.*; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - break;; + export ac_cv_exeext + break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;} + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi @@ -1706,8 +2091,11 @@ if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -1732,9 +2120,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;} +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi @@ -1750,8 +2141,11 @@ if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -1766,11 +2160,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -1779,10 +2183,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_compiler_gnu=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi @@ -1791,15 +2196,21 @@ echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -1811,11 +2222,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -1824,10 +2245,102 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no +sed 's/^/| /' conftest.$ac_ext >&5 + +CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 @@ -1854,8 +2367,11 @@ else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #include #include @@ -1878,6 +2394,16 @@ static char *f (char * (*g) (char **, int), char **p, ...) va_end (v); return s; } + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -1895,20 +2421,30 @@ _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 +# Ultrix, OSF/1, Tru64 -std # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in "" -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -1918,9 +2454,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext +rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC @@ -1948,19 +2485,28 @@ cat >conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ - ''\ - '#include ' \ + '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ @@ -1968,10 +2514,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_declaration +#include int main () { @@ -1982,11 +2531,21 @@ exit (42); _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -1995,13 +2554,17 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 : else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + continue fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_declaration int main () @@ -2013,11 +2576,21 @@ exit (42); _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2026,9 +2599,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then @@ -2039,9 +2613,10 @@ fi else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2135,9 +2710,20 @@ fi test -n "$ac_ct_CXX" && break done -test -n "$ac_ct_CXX" || ac_ct_CXX="g++" - CXX=$ac_ct_CXX + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + if test "$build" != "$host"; then + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} + fi + CXX=$ac_ct_CXX + fi fi @@ -2167,8 +2753,11 @@ if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -2183,11 +2772,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2196,10 +2795,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_compiler_gnu=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi @@ -2208,15 +2808,21 @@ echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () @@ -2228,11 +2834,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2241,10 +2857,102 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_prog_cxx_g=no +sed 's/^/| /' conftest.$ac_ext >&5 + +CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 @@ -2264,8 +2972,7 @@ else fi fi for ac_declaration in \ - ''\ - '#include ' \ + '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ @@ -2273,10 +2980,13 @@ for ac_declaration in \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_declaration +#include int main () { @@ -2287,11 +2997,21 @@ exit (42); _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2300,13 +3020,17 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 : else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + continue fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_declaration int main () @@ -2318,11 +3042,21 @@ exit (42); _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2331,9 +3065,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then @@ -2350,23 +3085,34 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=cc + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "$cross_compiling" = no; then - echo "$as_me:$LINENO: checking that C++ compiler can compile simple program" >&5 + if test "$cross_compiling" = no; then + echo "$as_me:$LINENO: checking that C++ compiler can compile simple program" >&5 echo $ECHO_N "checking that C++ compiler can compile simple program... $ECHO_C" >&6 -fi -if test "$cross_compiling" = yes; then + fi + if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -int main() { return 0; } + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int main() { + return 0; +} + + + _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -2384,37 +3130,53 @@ echo "${ECHO_T}yes" >&6 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6;{ { echo "$as_me:$LINENO: error: a working C++ compiler is required" >&5 +echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: a working C++ compiler is required" >&5 echo "$as_me: error: a working C++ compiler is required" >&2;} { (exit 1); exit 1; }; } fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -if test "$cross_compiling" = no; then - echo "$as_me:$LINENO: checking that C++ static constructors and destructors are called" >&5 + + if test "$cross_compiling" = no; then + echo "$as_me:$LINENO: checking that C++ static constructors and destructors are called" >&5 echo $ECHO_N "checking that C++ static constructors and destructors are called... $ECHO_C" >&6 -fi -if test "$cross_compiling" = yes; then + fi + if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + extern "C" { void _exit(int); } + int i; struct A { char dummy; A() { i = 1; } ~A() { if (i == 1) _exit(0); } }; + A a; -int main() { return 1; } + +int main() +{ + return 1; +} + + _ACEOF rm -f conftest$ac_exeext @@ -2433,36 +3195,62 @@ echo "${ECHO_T}yes" >&6 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6;{ { echo "$as_me:$LINENO: error: a working C++ compiler is required" >&5 +echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: a working C++ compiler is required" >&5 echo "$as_me: error: a working C++ compiler is required" >&2;} { (exit 1); exit 1; }; } fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: checking that header files support C++" >&5 + + echo "$as_me:$LINENO: checking that header files support C++" >&5 echo $ECHO_N "checking that header files support C++... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + + int main () { + + fopen(0, 0); + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2472,14 +3260,21 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6;{ { echo "$as_me:$LINENO: error: header files do not support C++ (if you are using a version of gcc/g++ earlier than 2.5, you should install libg++)" >&5 -echo "$as_me: error: header files do not support C++ (if you are using a version of gcc/g++ earlier than 2.5, you should install libg++)" >&2;} +echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: header files do not support C++ + (if you are using a version of gcc/g++ earlier than 2.5, + you should install libg++)" >&5 +echo "$as_me: error: header files do not support C++ + (if you are using a version of gcc/g++ earlier than 2.5, + you should install libg++)" >&2;} { (exit 1); exit 1; }; } fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -ac_ext=c +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -2488,38 +3283,57 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking whether character set is EBCDIC" >&5 echo $ECHO_N "checking whether character set is EBCDIC... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +/* Treat any failure as ASCII for compatibility with existing art. + Use compile-time rather than run-time tests for cross-compiler + tolerance. */ +#if '0' != 240 +make an error "Character set is not EBCDIC" +#endif + int main () { -/* Treat any failure as ASCII for compatibility with existing art. - Use compile-time rather than run-time tests for cross-compiler - tolerance. */ -#if '0' != 240 -make an error "Character set is not EBCDIC" -#endif + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then groff_cv_ebcdic="yes" - TTYDEVDIRS="font/devcp1047" - echo "$as_me:$LINENO: result: yes" >&5 + TTYDEVDIRS="font/devcp1047" + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF @@ -2528,31 +3342,1897 @@ _ACEOF else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + groff_cv_ebcdic="no" - TTYDEVDIRS="font/devascii font/devlatin1" - OTHERDEVDIRS="font/devlj4 font/devlbp" - echo "$as_me:$LINENO: result: no" >&5 + TTYDEVDIRS="font/devascii font/devlatin1" + OTHERDEVDIRS="font/devlj4 font/devlbp" + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test "$groff_cv_ebcdic" = "yes"; then - echo "$as_me:$LINENO: checking for OS/390 Unix" >&5 + echo "$as_me:$LINENO: checking for OS/390 Unix" >&5 echo $ECHO_N "checking for OS/390 Unix... $ECHO_C" >&6 - case `uname` in - OS/390) - CFLAGS="$CFLAGS -D_ALL_SOURCE" - echo "$as_me:$LINENO: result: yes" >&5 + case `uname` in + OS/390) + CFLAGS="$CFLAGS -D_ALL_SOURCE" + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 ;; - *) - echo "$as_me:$LINENO: result: no" >&5 + *) + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; - esac + esac + fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for X" >&5 +echo $ECHO_N "checking for X... $ECHO_C" >&6 + + +# Check whether --with-x or --without-x was given. +if test "${with_x+set}" = set; then + withval="$with_x" + +fi; +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then + # Both variables are already set. + have_x=yes + else + if test "${ac_cv_have_x+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # One or both of the vars are not set, and there is no cached value. +ac_x_includes=no ac_x_libraries=no +rm -f -r conftest.dir +if mkdir conftest.dir; then + cd conftest.dir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat >Imakefile <<'_ACEOF' +acfindx: + @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' +_ACEOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && + test -f $ac_im_libdir/libX11.$ac_extension; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case $ac_im_incroot in + /usr/include) ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; + esac + case $ac_im_usrlibdir in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; + esac + fi + cd .. + rm -f -r conftest.dir +fi + +# Standard set of common directories for X headers. +# Check X11 before X11Rn because it is often a symlink to the current release. +ac_x_header_dirs=' +/usr/X11/include +/usr/X11R6/include +/usr/X11R5/include +/usr/X11R4/include + +/usr/include/X11 +/usr/include/X11R6 +/usr/include/X11R5 +/usr/include/X11R4 + +/usr/local/X11/include +/usr/local/X11R6/include +/usr/local/X11R5/include +/usr/local/X11R4/include + +/usr/local/include/X11 +/usr/local/include/X11R6 +/usr/local/include/X11R5 +/usr/local/include/X11R4 + +/usr/X386/include +/usr/x386/include +/usr/XFree86/include/X11 + +/usr/include +/usr/local/include +/usr/unsupported/include +/usr/athena/include +/usr/local/x11r5/include +/usr/lpp/Xamples/include + +/usr/openwin/include +/usr/openwin/share/include' + +if test "$ac_x_includes" = no; then + # Guess where to find include files, by looking for Intrinsic.h. + # First, try using that file with no special directory specified. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # We can compile using X headers with no special include directory. +ac_x_includes= +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + for ac_dir in $ac_x_header_dirs; do + if test -r "$ac_dir/X11/Intrinsic.h"; then + ac_x_includes=$ac_dir + break + fi +done +fi +rm -f conftest.err conftest.$ac_ext +fi # $ac_x_includes = no + +if test "$ac_x_libraries" = no; then + # Check for the libraries. + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS=$LIBS + LIBS="-lXt $LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +XtMalloc (0) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + LIBS=$ac_save_LIBS +# We can link X programs with no special library path. +ac_x_libraries= +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +LIBS=$ac_save_LIBS +for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` +do + # Don't even attempt the hair of trying to link an X program! + for ac_extension in a so sl; do + if test -r $ac_dir/libXt.$ac_extension; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi # $ac_x_libraries = no + +if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then + # Didn't find X anywhere. Cache the known absence of X. + ac_cv_have_x="have_x=no" +else + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" +fi +fi + + fi + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + echo "$as_me:$LINENO: result: $have_x" >&5 +echo "${ECHO_T}$have_x" >&6 + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$x_includes ac_x_libraries=$x_libraries" + echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 +echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 +fi + +if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + +cat >>confdefs.h <<\_ACEOF +#define X_DISPLAY_MISSING 1 +_ACEOF + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + case `(uname -sr) 2>/dev/null` in + "SunOS 5"*) + echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 +echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_R_nospace=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_R_nospace=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test $ac_R_nospace = yes; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + X_LIBS="$X_LIBS -R$x_libraries" + else + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_R_space=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_R_space=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test $ac_R_space = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + X_LIBS="$X_LIBS -R $x_libraries" + else + echo "$as_me:$LINENO: result: neither works" >&5 +echo "${ECHO_T}neither works" >&6 + fi + fi + LIBS=$ac_xsave_LIBS + esac + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn Johnson says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And Karl Berry says + # the Alpha needs dnet_stub (dnet does not exist). + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XOpenDisplay (); +int +main () +{ +XOpenDisplay (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dnet_ntoa (); +int +main () +{ +dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dnet_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dnet_dnet_ntoa=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 +if test $ac_cv_lib_dnet_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 +if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet_stub $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dnet_ntoa (); +int +main () +{ +dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dnet_stub_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dnet_stub_dnet_ntoa=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 +if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +fi + + fi +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_xsave_LIBS" + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to T.E. Dickey. + # The functions gethostbyname, getservbyname, and inet_addr are + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. + echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 +if test "${ac_cv_func_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyname innocuous_gethostbyname + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyname (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef gethostbyname + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +choke me +#else +char (*f) () = gethostbyname; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != gethostbyname; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_gethostbyname=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 + + if test $ac_cv_func_gethostbyname = no; then + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_nsl_gethostbyname=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +if test $ac_cv_lib_nsl_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +fi + + if test $ac_cv_lib_nsl_gethostbyname = no; then + echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 +echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 +if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_bsd_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_bsd_gethostbyname=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 +if test $ac_cv_lib_bsd_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" +fi + + fi + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says Simon Leinen: it contains gethostby* + # variants that don't use the name server (or something). -lsocket + # must be given before -lnsl if both are needed. We assume that + # if connect needs -lnsl, so does gethostbyname. + echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 +if test "${ac_cv_func_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define connect to an innocuous variant, in case declares connect. + For example, HP-UX 11i declares gettimeofday. */ +#define connect innocuous_connect + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char connect (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef connect + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_connect) || defined (__stub___connect) +choke me +#else +char (*f) () = connect; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != connect; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_connect=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 + + if test $ac_cv_func_connect = no; then + echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +int +main () +{ +connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_socket_connect=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 +if test $ac_cv_lib_socket_connect = yes; then + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" +fi + + fi + + # Guillermo Gomez says -lposix is necessary on A/UX. + echo "$as_me:$LINENO: checking for remove" >&5 +echo $ECHO_N "checking for remove... $ECHO_C" >&6 +if test "${ac_cv_func_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define remove to an innocuous variant, in case declares remove. + For example, HP-UX 11i declares gettimeofday. */ +#define remove innocuous_remove + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char remove (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef remove + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char remove (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_remove) || defined (__stub___remove) +choke me +#else +char (*f) () = remove; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != remove; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_remove=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_remove=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 +echo "${ECHO_T}$ac_cv_func_remove" >&6 + + if test $ac_cv_func_remove = no; then + echo "$as_me:$LINENO: checking for remove in -lposix" >&5 +echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 +if test "${ac_cv_lib_posix_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lposix $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char remove (); +int +main () +{ +remove (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_posix_remove=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_posix_remove=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 +if test $ac_cv_lib_posix_remove = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + echo "$as_me:$LINENO: checking for shmat" >&5 +echo $ECHO_N "checking for shmat... $ECHO_C" >&6 +if test "${ac_cv_func_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shmat to an innocuous variant, in case declares shmat. + For example, HP-UX 11i declares gettimeofday. */ +#define shmat innocuous_shmat + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shmat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shmat + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shmat (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shmat) || defined (__stub___shmat) +choke me +#else +char (*f) () = shmat; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != shmat; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shmat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_shmat=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 +echo "${ECHO_T}$ac_cv_func_shmat" >&6 + + if test $ac_cv_func_shmat = no; then + echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 +echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 +if test "${ac_cv_lib_ipc_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lipc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shmat (); +int +main () +{ +shmat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ipc_shmat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_ipc_shmat=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 +echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 +if test $ac_cv_lib_ipc_shmat = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" +fi + + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS=$LDFLAGS + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # John Interrante, Karl Berry + echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 +echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 +if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lICE $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char IceConnectionNumber (); +int +main () +{ +IceConnectionNumber (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ICE_IceConnectionNumber=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_ICE_IceConnectionNumber=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 +if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +fi + + LDFLAGS=$ac_save_LDFLAGS + +fi + + + groff_no_x=$no_x + if test -z "$groff_no_x"; then + OLDCFLAGS=$CFLAGS + OLDLDFLAGS=$LDFLAGS + OLDLIBS=$LIBS + CFLAGS="$CFLAGS $X_CFLAGS" + LDFLAGS="$LDFLAGS $X_LIBS" + LIBS="$LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" + + LIBS="$LIBS -lXaw" + echo "$as_me:$LINENO: checking for Xaw library and header files" >&5 +echo $ECHO_N "checking for Xaw library and header files... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include +#include + + +int +main () +{ + + ; + return 0; +} + +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + groff_no_x="yes" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + LIBS="$LIBS -lXmu" + echo "$as_me:$LINENO: checking for Xmu library and header files" >&5 +echo $ECHO_N "checking for Xmu library and header files... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include +#include + + +int +main () +{ + + ; + return 0; +} + +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + groff_no_x="yes" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + CFLAGS=$OLDCFLAGS + LDFLAGS=$OLDLDFLAGS + LIBS=$OLDLIBS + fi + + if test "x$groff_no_x" = "xyes"; then + { echo "$as_me:$LINENO: gxditview and xtotroff won't be built" >&5 +echo "$as_me: gxditview and xtotroff won't be built" >&6;} + else + XDEVDIRS="font/devX75 font/devX75-12 font/devX100 font/devX100-12" + XPROGDIRS="src/devices/xditview src/utils/xtotroff" + XLIBDIRS="src/libs/libxutil" + fi + + + + + +# Check whether --with-appresdir or --without-appresdir was given. +if test "${with_appresdir+set}" = set; then + withval="$with_appresdir" + +fi; +if test -z "$groff_no_x"; then + # Create an Imakefile, run `xmkmf', then `make'. + rm -f -r conftest.dir + if mkdir conftest.dir; then + cd conftest.dir + # Make sure to not put `make' in the Imakefile rules, + # since we grep it out. + cat >Imakefile <<'EOF' + +xlibdirs: + @echo 'groff_x_usrlibdir="${USRLIBDIR}"; groff_x_libdir="${LIBDIR}"' +EOF + + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", + # which would confuse us. + eval `${MAKE-make} xlibdirs 2>/dev/null | grep -v make` + + # Open Windows `xmkmf' reportedly sets LIBDIR instead of USRLIBDIR. + for groff_extension in a so sl; do + if test ! -f $groff_x_usrlibdir/libX11.$groff_extension && + test -f $groff_x_libdir/libX11.$groff_extension; then + groff_x_usrlibdir=$groff_x_libdir + break + fi + done + fi + + cd .. + rm -f -r conftest.dir + fi + + # In case the test with `xmkmf' wasn't successful, try a suite of + # standard directories. Check `X11' before `X11Rn' because it is often + # a symlink to the current release. + groff_x_libdirs=' + /usr/X11/lib + /usr/X11R6/lib + /usr/X11R5/lib + /usr/X11R4/lib + + /usr/lib/X11 + /usr/lib/X11R6 + /usr/lib/X11R5 + /usr/lib/X11R4 + + /usr/local/X11/lib + /usr/local/X11R6/lib + /usr/local/X11R5/lib + /usr/local/X11R4/lib + + /usr/local/lib/X11 + /usr/local/lib/X11R6 + /usr/local/lib/X11R5 + /usr/local/lib/X11R4 + + /usr/X386/lib + /usr/x386/lib + /usr/XFree86/lib/X11 + + /usr/lib + /usr/local/lib + /usr/unsupported/lib + /usr/athena/lib + /usr/local/x11r5/lib + /usr/lpp/Xamples/lib + + /usr/openwin/lib + /usr/openwin/share/lib' + + if test -z "$groff_x_usrlibdir"; then + # We only test whether libX11 exists. + for groff_dir in $groff_x_libdirs; do + for groff_extension in a so sl; do + if test ! -r $groff_dir/libX11.$groff_extension; then + groff_x_usrlibdir=$groff_dir + break 2 + fi + done + done + fi + + if test "x$with_appresdir" = "x"; then + appresdir=$groff_x_usrlibdir/X11/app-defaults + else + appresdir=$with_appresdir + fi + fi + if test -z "$PSPRINT"; then - for ac_prog in lpr + for ac_prog in lpr do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -2592,7 +5272,7 @@ fi test -n "$LPR" && break done - for ac_prog in lp + for ac_prog in lp do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -2632,11 +5312,11 @@ fi test -n "$LP" && break done - if test -n "$LPR" && test -n "$LP"; then - # HP-UX provides an lpr command that emulates lpr using lp, - # but it doesn't have lpq; in this case we want to use lp - # rather than lpr. - for ac_prog in lpq + if test -n "$LPR" && test -n "$LP"; then + # HP-UX provides an lpr command that emulates lpr using lp, + # but it doesn't have lpq; in this case we want to use lp + # rather than lpr. + for ac_prog in lpq do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -2676,31 +5356,32 @@ fi test -n "$LPQ" && break done - test -n "$LPQ" || LPR= - fi - if test -n "$LPR"; then - PSPRINT="$LPR" - elif test -n "$LP"; then - PSPRINT="$LP" - fi -fi + test -n "$LPQ" || LPR= + fi + if test -n "$LPR"; then + PSPRINT="$LPR" + elif test -n "$LP"; then + PSPRINT="$LP" + fi + fi -echo "$as_me:$LINENO: checking for command to use for printing PostScript files" >&5 + echo "$as_me:$LINENO: checking for command to use for printing PostScript files" >&5 echo $ECHO_N "checking for command to use for printing PostScript files... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $PSPRINT" >&5 + echo "$as_me:$LINENO: result: $PSPRINT" >&5 echo "${ECHO_T}$PSPRINT" >&6 -# Figure out DVIPRINT from PSPRINT. -echo "$as_me:$LINENO: checking for command to use for printing dvi files" >&5 -echo $ECHO_N "checking for command to use for printing dvi files... $ECHO_C" >&6 -if test -n "$PSPRINT" && test -z "$DVIPRINT"; then - if test "X$PSPRINT" = "Xlpr"; then - DVIPRINT="lpr -d" - else - DVIPRINT="$PSPRINT" - fi -fi -echo "$as_me:$LINENO: result: $DVIPRINT" >&5 + # Figure out DVIPRINT from PSPRINT. + echo "$as_me:$LINENO: checking for command to use for printing dvi files" >&5 +echo $ECHO_N "checking for command to use for printing dvi files... $ECHO_C" >&6 + if test -n "$PSPRINT" && test -z "$DVIPRINT"; then + if test "x$PSPRINT" = "xlpr"; then + DVIPRINT="lpr -d" + else + DVIPRINT="$PSPRINT" + fi + fi + + echo "$as_me:$LINENO: result: $DVIPRINT" >&5 echo "${ECHO_T}$DVIPRINT" >&6 # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 @@ -2846,7 +5527,6 @@ do done done - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB @@ -2858,7 +5538,19 @@ else echo "${ECHO_T}no" >&6 fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + if test "$build" != "$host"; then + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} + fi + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -2888,8 +5580,9 @@ ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. -ac_dir=`cd $ac_aux_dir; pwd` -ac_install_sh="$ac_dir/install-sh -c" + + ac_dir=`cd $ac_aux_dir; pwd` + ac_install_sh="$ac_dir/install-sh -c" for ac_prog in install-info do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -2942,6 +5635,7 @@ test -n "$INSTALL_INFO" || INSTALL_INFO=":" # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 @@ -2958,6 +5652,7 @@ do case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -2965,20 +5660,20 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi done done ;; @@ -2990,10 +5685,10 @@ fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is - # removed, or if the path is relative. + # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi @@ -3019,238 +5714,233 @@ else echo "${ECHO_T}no, using $LN_S" >&6 fi + +# use a dummy substitution if no csh hack is necessary to avoid errors +# with non-GNU sed programs echo "$as_me:$LINENO: checking for csh hash hack" >&5 echo $ECHO_N "checking for csh hash hack... $ECHO_C" >&6 + cat <conftest.sh -#!/bin/sh +#! /bin/sh true || exit 0 export PATH || exit 0 exit 1 EOF -chmod +x conftest.sh -if echo ./conftest.sh | (csh >/dev/null 2>&1) >/dev/null 2>&1; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; SH_SCRIPT_SED_CMD='1s/.*/:/' -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; SH_SCRIPT_SED_CMD='1s/a/a/' -fi -rm -f conftest.sh -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then + chmod +x conftest.sh + if echo ./conftest.sh | (csh >/dev/null 2>&1) >/dev/null 2>&1; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SH_SCRIPT_SED_CMD='1s/.*/:/' + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + SH_SCRIPT_SED_CMD='1s/a/a/' + fi + rm -f conftest.sh + + +# checks for headers +echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6 +if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext + # Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -f -r $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi +# Create a (secure) tmp directory for tmp files. +: ${TMPDIR=/tmp} +{ + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/GREPXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=$TMPDIR/GREP$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } +} +ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/xpg4/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + test -f "$ac_path_GREP" || continue + $ac_path_GREP_found || if $as_executable_p "$ac_path_GREP"; then + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +if "$ac_path_GREP" --version 2>&1 < /dev/null | grep 'GNU' >/dev/null; then + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=: else - ac_cpp_err=yes + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"$tmp/conftest.in" + while : + do + cat "$tmp/conftest.in" "$tmp/conftest.in" >"$tmp/conftest.tmp" + mv "$tmp/conftest.tmp" "$tmp/conftest.in" + cp "$tmp/conftest.in" "$tmp/conftest.nl" + echo 'GREP' >> "$tmp/conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "$tmp/conftest.nl" >"$tmp/conftest.out" 2>/dev/null || break + diff "$tmp/conftest.out" "$tmp/conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - # Passes both tests. -ac_preproc_ok=: -break + fi -rm -f conftest.err conftest.$ac_ext + + $ac_path_GREP_found && break 3 + done +done done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - done - ac_cv_prog_CPP=$CPP +rm -rf "$tmp" fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH:/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH:/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +fi + + +fi +echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6 + GREP="$ac_cv_path_GREP" echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -f -r $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. +: ${TMPDIR=/tmp} +{ + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/EGREPXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=$TMPDIR/EGREP$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } +} +ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/xpg4/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + test -f "$ac_path_EGREP" || continue + $ac_path_EGREP_found || if $as_executable_p "$ac_path_EGREP"; then + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +if "$ac_path_EGREP" --version 2>&1 < /dev/null | grep 'GNU' >/dev/null; then + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=: +else + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"$tmp/conftest.in" + while : + do + cat "$tmp/conftest.in" "$tmp/conftest.in" >"$tmp/conftest.tmp" + mv "$tmp/conftest.tmp" "$tmp/conftest.in" + cp "$tmp/conftest.in" "$tmp/conftest.nl" + echo 'EGREP' >> "$tmp/conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "$tmp/conftest.nl" >"$tmp/conftest.out" 2>/dev/null || break + diff "$tmp/conftest.out" "$tmp/conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep + +fi + + $ac_path_EGREP_found && break 3 + done +done + +done + +rm -rf "$tmp" + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH:/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH:/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +fi + + + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6 + EGREP="$ac_cv_path_EGREP" echo "$as_me:$LINENO: checking for ANSI C header files" >&5 @@ -3259,44 +5949,63 @@ if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #include #include #include +int +main () +{ + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_header_stdc=no +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include _ACEOF @@ -3313,8 +6022,11 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include _ACEOF @@ -3334,16 +6046,21 @@ if test $ac_cv_header_stdc = yes; then : else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else -# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif @@ -3354,8 +6071,8 @@ main () int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - exit(2); + || toupper (i) != TOUPPER (i)) + exit (2); exit (0); } _ACEOF @@ -3374,11 +6091,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi @@ -3403,7 +6121,7 @@ fi for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h + inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 @@ -3412,19 +6130,32 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3433,10 +6164,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_Header=no" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -3459,8 +6191,10 @@ done + + for ac_header in stdlib.h unistd.h dirent.h limits.h sys/dir.h \ - string.h strings.h math.h sys/time.h + string.h strings.h math.h sys/time.h direct.h process.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -3476,18 +6210,31 @@ else echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3496,10 +6243,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -3507,8 +6255,11 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -3521,6 +6272,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -3531,7 +6283,8 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -3539,26 +6292,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -3575,32 +6345,40 @@ done echo "$as_me:$LINENO: checking for ISC 3.x or 4.x" >&5 echo $ECHO_N "checking for ISC 3.x or 4.x... $ECHO_C" >&6 -if grep '[34]\.' /usr/options/cb.name >/dev/null 2>&1 -then - echo "$as_me:$LINENO: result: yes" >&5 + if grep '[34]\.' /usr/options/cb.name >/dev/null 2>&1 + then + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define _SYSV3 1 _ACEOF -else - echo "$as_me:$LINENO: result: no" >&5 + else + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 -fi + fi echo "$as_me:$LINENO: checking whether -D_POSIX_SOURCE is necessary" >&5 echo $ECHO_N "checking whether -D_POSIX_SOURCE is necessary... $ECHO_C" >&6 -ac_ext=cc + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include extern "C" { void fileno(int); } + + int main () { @@ -3608,51 +6386,74 @@ main () ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define _POSIX_SOURCE 1 _ACEOF else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_ext=c +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +# checks for header stuff ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:$LINENO: checking for return type of srand" >&5 + echo "$as_me:$LINENO: checking for return type of srand" >&5 echo $ECHO_N "checking for return type of srand... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include extern "C" { void srand(unsigned int); } + + int main () { @@ -3660,33 +6461,46 @@ main () ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: void" >&5 -echo "${ECHO_T}void" >&6; +echo "${ECHO_T}void" >&6 + cat >>confdefs.h <<\_ACEOF #define RET_TYPE_SRAND_IS_VOID 1 _ACEOF else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + echo "$as_me:$LINENO: result: int" >&5 echo "${ECHO_T}int" >&6 fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_ext=c +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -3694,18 +6508,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking whether gettimeofday must be declared" >&5 echo $ECHO_N "checking whether gettimeofday must be declared... $ECHO_C" >&6 -ac_ext=cc + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "${groff_cv_decl_needed_gettimeofday+set}" = set; then + if test "${groff_cv_decl_needed_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include #ifdef HAVE_STRING_H @@ -3726,23 +6545,40 @@ else #ifdef HAVE_MATH_H #include #endif + + int main () { + + #ifndef gettimeofday char *p = (char *) gettimeofday; #endif + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3751,22 +6587,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 groff_cv_decl_needed_gettimeofday=no else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + groff_cv_decl_needed_gettimeofday=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $groff_cv_decl_needed_gettimeofday" >&5 + echo "$as_me:$LINENO: result: $groff_cv_decl_needed_gettimeofday" >&5 echo "${ECHO_T}$groff_cv_decl_needed_gettimeofday" >&6 -if test $groff_cv_decl_needed_gettimeofday = yes; then + if test $groff_cv_decl_needed_gettimeofday = yes; then cat >>confdefs.h <<\_ACEOF #define NEED_DECLARATION_GETTIMEOFDAY 1 _ACEOF -fi -ac_ext=c + fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -3774,18 +6611,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking whether hypot must be declared" >&5 echo $ECHO_N "checking whether hypot must be declared... $ECHO_C" >&6 -ac_ext=cc + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "${groff_cv_decl_needed_hypot+set}" = set; then + if test "${groff_cv_decl_needed_hypot+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include #ifdef HAVE_STRING_H @@ -3806,23 +6648,40 @@ else #ifdef HAVE_MATH_H #include #endif + + int main () { + + #ifndef hypot char *p = (char *) hypot; #endif + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3831,22 +6690,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 groff_cv_decl_needed_hypot=no else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + groff_cv_decl_needed_hypot=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $groff_cv_decl_needed_hypot" >&5 + echo "$as_me:$LINENO: result: $groff_cv_decl_needed_hypot" >&5 echo "${ECHO_T}$groff_cv_decl_needed_hypot" >&6 -if test $groff_cv_decl_needed_hypot = yes; then + if test $groff_cv_decl_needed_hypot = yes; then cat >>confdefs.h <<\_ACEOF #define NEED_DECLARATION_HYPOT 1 _ACEOF -fi -ac_ext=c + fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -3854,18 +6714,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking whether popen must be declared" >&5 echo $ECHO_N "checking whether popen must be declared... $ECHO_C" >&6 -ac_ext=cc + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "${groff_cv_decl_needed_popen+set}" = set; then + if test "${groff_cv_decl_needed_popen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include #ifdef HAVE_STRING_H @@ -3886,23 +6751,40 @@ else #ifdef HAVE_MATH_H #include #endif + + int main () { + + #ifndef popen char *p = (char *) popen; #endif + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3911,22 +6793,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 groff_cv_decl_needed_popen=no else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + groff_cv_decl_needed_popen=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $groff_cv_decl_needed_popen" >&5 + echo "$as_me:$LINENO: result: $groff_cv_decl_needed_popen" >&5 echo "${ECHO_T}$groff_cv_decl_needed_popen" >&6 -if test $groff_cv_decl_needed_popen = yes; then + if test $groff_cv_decl_needed_popen = yes; then cat >>confdefs.h <<\_ACEOF #define NEED_DECLARATION_POPEN 1 _ACEOF -fi -ac_ext=c + fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -3934,18 +6817,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking whether pclose must be declared" >&5 echo $ECHO_N "checking whether pclose must be declared... $ECHO_C" >&6 -ac_ext=cc + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "${groff_cv_decl_needed_pclose+set}" = set; then + if test "${groff_cv_decl_needed_pclose+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include #ifdef HAVE_STRING_H @@ -3966,23 +6854,40 @@ else #ifdef HAVE_MATH_H #include #endif + + int main () { + + #ifndef pclose char *p = (char *) pclose; #endif + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3991,22 +6896,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 groff_cv_decl_needed_pclose=no else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + groff_cv_decl_needed_pclose=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $groff_cv_decl_needed_pclose" >&5 + echo "$as_me:$LINENO: result: $groff_cv_decl_needed_pclose" >&5 echo "${ECHO_T}$groff_cv_decl_needed_pclose" >&6 -if test $groff_cv_decl_needed_pclose = yes; then + if test $groff_cv_decl_needed_pclose = yes; then cat >>confdefs.h <<\_ACEOF #define NEED_DECLARATION_PCLOSE 1 _ACEOF -fi -ac_ext=c + fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -4014,18 +6920,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking whether putenv must be declared" >&5 echo $ECHO_N "checking whether putenv must be declared... $ECHO_C" >&6 -ac_ext=cc + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "${groff_cv_decl_needed_putenv+set}" = set; then + if test "${groff_cv_decl_needed_putenv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include #ifdef HAVE_STRING_H @@ -4046,23 +6957,40 @@ else #ifdef HAVE_MATH_H #include #endif + + int main () { + + #ifndef putenv char *p = (char *) putenv; #endif + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4071,22 +6999,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 groff_cv_decl_needed_putenv=no else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + groff_cv_decl_needed_putenv=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $groff_cv_decl_needed_putenv" >&5 + echo "$as_me:$LINENO: result: $groff_cv_decl_needed_putenv" >&5 echo "${ECHO_T}$groff_cv_decl_needed_putenv" >&6 -if test $groff_cv_decl_needed_putenv = yes; then + if test $groff_cv_decl_needed_putenv = yes; then cat >>confdefs.h <<\_ACEOF #define NEED_DECLARATION_PUTENV 1 _ACEOF -fi -ac_ext=c + fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -4094,18 +7023,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking whether rand must be declared" >&5 echo $ECHO_N "checking whether rand must be declared... $ECHO_C" >&6 -ac_ext=cc + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "${groff_cv_decl_needed_rand+set}" = set; then + if test "${groff_cv_decl_needed_rand+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include #ifdef HAVE_STRING_H @@ -4126,23 +7060,40 @@ else #ifdef HAVE_MATH_H #include #endif + + int main () { + + #ifndef rand char *p = (char *) rand; #endif + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4151,22 +7102,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 groff_cv_decl_needed_rand=no else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + groff_cv_decl_needed_rand=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $groff_cv_decl_needed_rand" >&5 + echo "$as_me:$LINENO: result: $groff_cv_decl_needed_rand" >&5 echo "${ECHO_T}$groff_cv_decl_needed_rand" >&6 -if test $groff_cv_decl_needed_rand = yes; then + if test $groff_cv_decl_needed_rand = yes; then cat >>confdefs.h <<\_ACEOF #define NEED_DECLARATION_RAND 1 _ACEOF -fi -ac_ext=c + fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -4174,18 +7126,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking whether snprintf must be declared" >&5 echo $ECHO_N "checking whether snprintf must be declared... $ECHO_C" >&6 -ac_ext=cc + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "${groff_cv_decl_needed_snprintf+set}" = set; then + if test "${groff_cv_decl_needed_snprintf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include #ifdef HAVE_STRING_H @@ -4206,23 +7163,40 @@ else #ifdef HAVE_MATH_H #include #endif + + int main () { + + #ifndef snprintf char *p = (char *) snprintf; #endif + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4231,22 +7205,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 groff_cv_decl_needed_snprintf=no else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + groff_cv_decl_needed_snprintf=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $groff_cv_decl_needed_snprintf" >&5 + echo "$as_me:$LINENO: result: $groff_cv_decl_needed_snprintf" >&5 echo "${ECHO_T}$groff_cv_decl_needed_snprintf" >&6 -if test $groff_cv_decl_needed_snprintf = yes; then + if test $groff_cv_decl_needed_snprintf = yes; then cat >>confdefs.h <<\_ACEOF #define NEED_DECLARATION_SNPRINTF 1 _ACEOF -fi -ac_ext=c + fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -4254,18 +7229,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking whether srand must be declared" >&5 echo $ECHO_N "checking whether srand must be declared... $ECHO_C" >&6 -ac_ext=cc + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "${groff_cv_decl_needed_srand+set}" = set; then + if test "${groff_cv_decl_needed_srand+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include #ifdef HAVE_STRING_H @@ -4286,23 +7266,40 @@ else #ifdef HAVE_MATH_H #include #endif + + int main () { + + #ifndef srand char *p = (char *) srand; #endif + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4311,22 +7308,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 groff_cv_decl_needed_srand=no else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + groff_cv_decl_needed_srand=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $groff_cv_decl_needed_srand" >&5 + echo "$as_me:$LINENO: result: $groff_cv_decl_needed_srand" >&5 echo "${ECHO_T}$groff_cv_decl_needed_srand" >&6 -if test $groff_cv_decl_needed_srand = yes; then + if test $groff_cv_decl_needed_srand = yes; then cat >>confdefs.h <<\_ACEOF #define NEED_DECLARATION_SRAND 1 _ACEOF -fi -ac_ext=c + fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -4334,18 +7332,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking whether strcasecmp must be declared" >&5 echo $ECHO_N "checking whether strcasecmp must be declared... $ECHO_C" >&6 -ac_ext=cc + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "${groff_cv_decl_needed_strcasecmp+set}" = set; then + if test "${groff_cv_decl_needed_strcasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include #ifdef HAVE_STRING_H @@ -4366,23 +7369,40 @@ else #ifdef HAVE_MATH_H #include #endif + + int main () { + + #ifndef strcasecmp char *p = (char *) strcasecmp; #endif + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4391,22 +7411,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 groff_cv_decl_needed_strcasecmp=no else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + groff_cv_decl_needed_strcasecmp=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $groff_cv_decl_needed_strcasecmp" >&5 + echo "$as_me:$LINENO: result: $groff_cv_decl_needed_strcasecmp" >&5 echo "${ECHO_T}$groff_cv_decl_needed_strcasecmp" >&6 -if test $groff_cv_decl_needed_strcasecmp = yes; then + if test $groff_cv_decl_needed_strcasecmp = yes; then cat >>confdefs.h <<\_ACEOF #define NEED_DECLARATION_STRCASECMP 1 _ACEOF -fi -ac_ext=c + fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -4414,18 +7435,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking whether strncasecmp must be declared" >&5 echo $ECHO_N "checking whether strncasecmp must be declared... $ECHO_C" >&6 -ac_ext=cc + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "${groff_cv_decl_needed_strncasecmp+set}" = set; then + if test "${groff_cv_decl_needed_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include #ifdef HAVE_STRING_H @@ -4446,23 +7472,40 @@ else #ifdef HAVE_MATH_H #include #endif + + int main () { + + #ifndef strncasecmp char *p = (char *) strncasecmp; #endif + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4471,22 +7514,229 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 groff_cv_decl_needed_strncasecmp=no else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + groff_cv_decl_needed_strncasecmp=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $groff_cv_decl_needed_strncasecmp" >&5 + echo "$as_me:$LINENO: result: $groff_cv_decl_needed_strncasecmp" >&5 echo "${ECHO_T}$groff_cv_decl_needed_strncasecmp" >&6 -if test $groff_cv_decl_needed_strncasecmp = yes; then + if test $groff_cv_decl_needed_strncasecmp = yes; then cat >>confdefs.h <<\_ACEOF #define NEED_DECLARATION_STRNCASECMP 1 _ACEOF + fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +echo "$as_me:$LINENO: checking whether vfprintf must be declared" >&5 +echo $ECHO_N "checking whether vfprintf must be declared... $ECHO_C" >&6 + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + if test "${groff_cv_decl_needed_vfprintf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_MATH_H +#include +#endif + + +int +main () +{ + + +#ifndef vfprintf + char *p = (char *) vfprintf; +#endif + + + ; + return 0; +} + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + groff_cv_decl_needed_vfprintf=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +groff_cv_decl_needed_vfprintf=yes fi -ac_ext=c +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + echo "$as_me:$LINENO: result: $groff_cv_decl_needed_vfprintf" >&5 +echo "${ECHO_T}$groff_cv_decl_needed_vfprintf" >&6 + if test $groff_cv_decl_needed_vfprintf = yes; then + +cat >>confdefs.h <<\_ACEOF +#define NEED_DECLARATION_VFPRINTF 1 +_ACEOF + + fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +echo "$as_me:$LINENO: checking whether vsnprintf must be declared" >&5 +echo $ECHO_N "checking whether vsnprintf must be declared... $ECHO_C" >&6 + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + if test "${groff_cv_decl_needed_vsnprintf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_MATH_H +#include +#endif + + +int +main () +{ + + +#ifndef vsnprintf + char *p = (char *) vsnprintf; +#endif + + + ; + return 0; +} + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + groff_cv_decl_needed_vsnprintf=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +groff_cv_decl_needed_vsnprintf=yes +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + echo "$as_me:$LINENO: result: $groff_cv_decl_needed_vsnprintf" >&5 +echo "${ECHO_T}$groff_cv_decl_needed_vsnprintf" >&6 + if test $groff_cv_decl_needed_vsnprintf = yes; then + +cat >>confdefs.h <<\_ACEOF +#define NEED_DECLARATION_VSNPRINTF 1 +_ACEOF + + fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -4498,138 +7748,218 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:$LINENO: checking for sys_nerr in or " >&5 -echo $ECHO_N "checking for sys_nerr in or ... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + echo "$as_me:$LINENO: checking for sys_nerr in , , or " >&5 +echo $ECHO_N "checking for sys_nerr in , , or ... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include #include +#include + + int main () { -int k; k = sys_nerr; + + +int k; +k = sys_nerr; + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_NERR 1 _ACEOF else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_ext=c +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for sys_errlist in or " >&5 -echo $ECHO_N "checking for sys_errlist in or ... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +echo "$as_me:$LINENO: checking for sys_errlist in , , or " >&5 +echo $ECHO_N "checking for sys_errlist in , , or ... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include #include +#include + + int main () { -int k; k = (int)sys_errlist[0]; + + +int k; +k = (int)sys_errlist[0]; + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_ERRLIST 1 _ACEOF else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:$LINENO: checking C++ " >&5 + echo "$as_me:$LINENO: checking C++ " >&5 echo $ECHO_N "checking C++ ... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + + int main () { -read(0, 0, 0); open(0, 0); + + +read(0, 0, 0); +open(0, 0); + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_CC_OSFCN_H 1 _ACEOF else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_ext=c +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -4641,46 +7971,73 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:$LINENO: checking C++ " >&5 + echo "$as_me:$LINENO: checking C++ " >&5 echo $ECHO_N "checking C++ ... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + + int main () { -int x = INT_MIN; int y = INT_MAX; int z = UCHAR_MAX; + + +int x = INT_MIN; +int y = INT_MAX; +int z = UCHAR_MAX; + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_CC_LIMITS_H 1 _ACEOF else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_ext=c +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -4692,127 +8049,131 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:$LINENO: checking C++ " >&5 -echo $ECHO_N "checking C++ ... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include + echo "$as_me:$LINENO: checking C++ " >&5 +echo $ECHO_N "checking C++ ... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include +#include + + int main () { -uint32_t x; int32_t y; + + +uintmax_t i = (uintmax_t)-1; + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; -cat >>confdefs.h <<\_ACEOF -#define HAVE_CC_STDINT_H 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -echo "$as_me:$LINENO: checking for inttypes.h" >&5 -echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -#include -int -main () -{ -uintmax_t i = (uintmax_t)-1; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then groff_cv_header_inttypes_h=yes + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CC_INTTYPES_H 1 +_ACEOF + else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + groff_cv_header_inttypes_h=no fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $groff_cv_header_inttypes_h" >&5 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: result: $groff_cv_header_inttypes_h" >&5 echo "${ECHO_T}$groff_cv_header_inttypes_h" >&6 -ac_ext=c + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +# checks for typedefs ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:$LINENO: checking for unsigned long long" >&5 + echo "$as_me:$LINENO: checking for unsigned long long" >&5 echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -unsigned long long ull = 1; int i = 63; + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +unsigned long long ull = 1; +int i = 63; +unsigned long long ullmax = (unsigned long long)-1; + + int main () { -unsigned long long ullmax = (unsigned long long)-1; + + return ull << i | ull >> i | ullmax / ull | ullmax % ull; + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4821,22 +8182,24 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 groff_cv_type_unsigned_long_long=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + groff_cv_type_unsigned_long_long=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -echo "$as_me:$LINENO: result: $groff_cv_type_unsigned_long_long" >&5 +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + echo "$as_me:$LINENO: result: $groff_cv_type_unsigned_long_long" >&5 echo "${ECHO_T}$groff_cv_type_unsigned_long_long" >&6 -ac_ext=c + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test $groff_cv_header_inttypes_h = no; then + if test $groff_cv_header_inttypes_h = no; then - test $groff_cv_type_unsigned_long_long = yes \ + test $groff_cv_type_unsigned_long_long = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' @@ -4844,34 +8207,58 @@ cat >>confdefs.h <<_ACEOF #define uintmax_t $ac_type _ACEOF -fi + fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:$LINENO: checking for declaration of time_t" >&5 + echo "$as_me:$LINENO: checking for declaration of time_t" >&5 echo $ECHO_N "checking for declaration of time_t... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + + int main () { -time_t t = time(0); struct tm *p = localtime(&t); + + +time_t t = time(0); +struct tm *p = localtime(&t); + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4881,115 +8268,238 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; +echo "${ECHO_T}no" >&6 + cat >>confdefs.h <<\_ACEOF #define LONG_FOR_TIME_T 1 _ACEOF fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_ext=c +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 -if test "${ac_cv_type_signal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +echo "$as_me:$LINENO: checking for return type of signal handlers" >&5 +echo $ECHO_N "checking for return type of signal handlers... $ECHO_C" >&6 + for groff_declaration in \ + 'extern "C" void (*signal (int, void (*)(int)))(int);' \ + 'extern "C" void (*signal (int, void (*)(int)) throw ())(int);' \ + 'void (*signal ()) ();' + do + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include #include #ifdef signal # undef signal #endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif +$groff_declaration + int main () { + + int i; + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_signal=void + break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_type_signal=int -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -echo "${ECHO_T}$ac_cv_type_signal" >&6 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done + + if test -n "$groff_declaration"; then + echo "$as_me:$LINENO: result: void" >&5 +echo "${ECHO_T}void" >&6 + +cat >>confdefs.h <<\_ACEOF +#define RETSIGTYPE void _ACEOF + else + echo "$as_me:$LINENO: result: int" >&5 +echo "${ECHO_T}int" >&6 +cat >>confdefs.h <<\_ACEOF +#define RETSIGTYPE int +_ACEOF + + fi echo "$as_me:$LINENO: checking struct exception" >&5 echo $ECHO_N "checking struct exception... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + + int main () { + + struct exception e; + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_STRUCT_EXCEPTION 1 _ACEOF else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +# checks for libraries +echo "$as_me:$LINENO: checking for main in -lc" >&5 +echo $ECHO_N "checking for main in -lc... $ECHO_C" >&6 +if test "${ac_cv_lib_c_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_c_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_c_main=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_c_main" >&5 +echo "${ECHO_T}$ac_cv_lib_c_main" >&6 +if test $ac_cv_lib_c_main = yes; then + LIBC=-lc +fi + + echo "$as_me:$LINENO: checking for sin in -lm" >&5 echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_sin+set}" = set; then @@ -4998,8 +8508,11 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -5018,11 +8531,21 @@ sin (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5031,10 +8554,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_m_sin=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_m_sin=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5 @@ -5045,6 +8570,8 @@ fi +# checks for functions + for ac_header in stdlib.h unistd.h do @@ -5062,18 +8589,31 @@ else echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5082,10 +8622,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -5093,8 +8634,11 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -5107,6 +8651,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -5117,7 +8662,8 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -5125,26 +8671,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -5169,43 +8732,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5214,10 +8807,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -5238,8 +8833,11 @@ else ac_cv_func_mmap_fixed_mapped=no else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc @@ -5342,9 +8940,9 @@ main () data2 = (char *) malloc (2 * pagesize); if (!data2) exit (1); - data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) + MAP_PRIVATE | MAP_FIXED, fd, 0L)) exit (1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) @@ -5382,11 +8980,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) ac_cv_func_mmap_fixed_mapped=no fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 @@ -5401,7 +9000,7 @@ fi rm -f conftest.mmap saved_libs="$LIBS" -LIBS="$LIBS -lc $LIBM" +LIBS="$LIBS $LIBC $LIBM" @@ -5411,7 +9010,7 @@ LIBS="$LIBS -lc $LIBM" for ac_func in fmod getcwd putenv snprintf strcasecmp \ - strerror strncasecmp strtol + strerror strncasecmp strtol do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -5420,43 +9019,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5465,10 +9094,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -5478,18 +9109,21 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then _ACEOF else - LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + case $LIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; +esac + fi done -LIBS="$saved_libs" +# vsnprintf is in the same source file as snprintf - - - - -for ac_func in gettimeofday isatty rename setlocale strsep +for ac_func in vsnprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -5498,43 +9132,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5543,10 +9207,129 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + case $LIBOBJS in + "snprintf.$ac_objext" | \ + *" snprintf.$ac_objext" | \ + "snprintf.$ac_objext "* | \ + *" snprintf.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;; +esac + +fi +done + +LIBS="$saved_libs" + + + + + + +for ac_func in gettimeofday isatty kill rename setlocale strsep +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -5560,138 +9343,213 @@ done echo "$as_me:$LINENO: checking for mkstemp" >&5 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6 -ac_ext=cc + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include #include int (*f) (char *); + + int main () { + + f = mkstemp; + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_MKSTEMP 1 _ACEOF else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6;LIBOBJS="$LIBOBJS mkstemp.$ac_objext" +echo "${ECHO_T}no" >&6 + case $LIBOBJS in + "mkstemp.$ac_objext" | \ + *" mkstemp.$ac_objext" | \ + "mkstemp.$ac_objext "* | \ + *" mkstemp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; +esac + fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -ac_ext=c +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for sys_siglist declaration in signal.h or unistd.h" >&5 -echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6 -if test "${ac_cv_decl_sys_siglist+set}" = set; then +echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5 +echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_sys_siglist+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include -#include -/* NetBSD declares sys_siglist in unistd.h. */ -#if HAVE_UNISTD_H -# include -#endif - +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default int main () { -char *msg = *(sys_siglist + 1); +#ifndef sys_siglist + char *p = (char *) sys_siglist; +#endif + ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_decl_sys_siglist=yes + ac_cv_have_decl_sys_siglist=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_decl_sys_siglist=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_decl_sys_siglist" >&5 -echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6 -if test $ac_cv_decl_sys_siglist = yes; then +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<\_ACEOF -#define SYS_SIGLIST_DECLARED 1 +ac_cv_have_decl_sys_siglist=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5 +echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6 +if test $ac_cv_have_decl_sys_siglist = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYS_SIGLIST 1 _ACEOF + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYS_SIGLIST 0 +_ACEOF + + fi + + +# checks for compiler characteristics ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:$LINENO: checking whether ANSI array delete syntax supported" >&5 -echo $ECHO_N "checking whether ANSI array delete syntax supported... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + echo "$as_me:$LINENO: checking whether ANSI array delete syntax is supported" >&5 +echo $ECHO_N "checking whether ANSI array delete syntax is supported... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () { -char *p = new char[5]; delete [] p; + + +char *p = new char[5]; +delete [] p; + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5701,16 +9559,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; +echo "${ECHO_T}no" >&6 + cat >>confdefs.h <<\_ACEOF #define ARRAY_DELETE_NEEDS_SIZE 1 _ACEOF fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_ext=c +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -5722,62 +9582,102 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:$LINENO: checking traditional preprocessor" >&5 + echo "$as_me:$LINENO: checking traditional preprocessor" >&5 echo $ECHO_N "checking traditional preprocessor... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#define name2(a,b) a/**/b + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#define name2(a, b) a/**/b + + int main () { -int name2(foo,bar); + + +int name2(foo, bar); + + ; return 0; } + _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define TRADITIONAL_CPP 1 _ACEOF else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_ext=c +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +# checks for operating system services echo "$as_me:$LINENO: checking w_coredump" >&5 echo $ECHO_N "checking w_coredump... $ECHO_C" >&6 -if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include #include + + +int +main () +{ + + main() { #ifdef WCOREFLAG @@ -5788,6 +9688,12 @@ main() exit(i != 0200); #endif } + + + ; + return 0; +} + _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -5801,7 +9707,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define WCOREFLAG 0200 _ACEOF @@ -5809,151 +9716,346 @@ _ACEOF else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + +# other random stuff echo "$as_me:$LINENO: checking default value for grops -b option" >&5 echo $ECHO_N "checking default value for grops -b option... $ECHO_C" >&6 -test -n "${BROKEN_SPOOLER_FLAGS}" || BROKEN_SPOOLER_FLAGS=7 -echo "$as_me:$LINENO: result: $BROKEN_SPOOLER_FLAGS" >&5 + test -n "${BROKEN_SPOOLER_FLAGS}" || BROKEN_SPOOLER_FLAGS=0 + echo "$as_me:$LINENO: result: $BROKEN_SPOOLER_FLAGS" >&5 echo "${ECHO_T}$BROKEN_SPOOLER_FLAGS" >&6 echo "$as_me:$LINENO: checking default paper size" >&5 echo $ECHO_N "checking default paper size... $ECHO_C" >&6 -groff_prefix=$prefix -test "x$prefix" = xNONE && groff_prefix=$ac_default_prefix -if test -z "$PAGE"; then - descfile= - if test -r $groff_prefix/share/groff/font/devps/DESC; then - descfile=$groff_prefix/share/groff/font/devps/DESC - elif test -r $groff_prefix/lib/groff/font/devps/DESC; then - descfile=$groff_prefix/lib/groff/font/devps/DESC - else - for f in $groff_prefix/share/groff/*/font/devps/DESC; do - if test -r $f; then - descfile=$f - break - fi - done - fi - if test -n "$descfile"; then - if grep '^paperlength[ ]\+841890' $descfile - >/dev/null 2>&1; then - PAGE=A4 - elif grep '^papersize[ ]\+[aA]4' $descfile \ - >/dev/null 2>&1; then - PAGE=A4 - fi - fi -fi -if test -z "$PAGE"; then - dom=`awk '($1 == "dom" || $1 == "search") { print $2; exit}' \ - /etc/resolv.conf 2>/dev/null` - if test -z "$dom"; then - dom=`(domainname) 2>/dev/null | tr -d '+'` - if test -z "$dom" \ - || test "$dom" = '(none)'; then - dom=`(hostname) 2>/dev/null | grep '\.'` - fi - fi - # If the top-level domain is two letters and it's not `us' or `ca' - # then they probably use A4 paper. - case "$dom" in - *.[Uu][Ss]|*.[Cc][Aa]) ;; - *.[A-Za-z][A-Za-z]) PAGE=A4 ;; - esac -fi -test -n "$PAGE" || PAGE=letter -if test "x$PAGE" = "xA4"; then + groff_prefix=$prefix + test "x$prefix" = "xNONE" && groff_prefix=$ac_default_prefix + if test -z "$PAGE"; then + descfile= + if test -r $groff_prefix/share/groff/font/devps/DESC; then + descfile=$groff_prefix/share/groff/font/devps/DESC + elif test -r $groff_prefix/lib/groff/font/devps/DESC; then + descfile=$groff_prefix/lib/groff/font/devps/DESC + else + for f in $groff_prefix/share/groff/*/font/devps/DESC; do + if test -r $f; then + descfile=$f + break + fi + done + fi + + if test -n "$descfile"; then + if grep '^paperlength[ ]\+841890' $descfile >/dev/null 2>&1; then + PAGE=A4 + elif grep '^papersize[ ]\+[aA]4' $descfile >/dev/null 2>&1; then + PAGE=A4 + fi + fi + fi + + if test -z "$PAGE"; then + dom=`awk '($1 == "dom" || $1 == "search") { print $2; exit}' \ + /etc/resolv.conf 2>/dev/null` + if test -z "$dom"; then + dom=`(domainname) 2>/dev/null | tr -d '+'` + if test -z "$dom" \ + || test "$dom" = '(none)'; then + dom=`(hostname) 2>/dev/null | grep '\.'` + fi + fi + # If the top-level domain is two letters and it's not `us' or `ca' + # then they probably use A4 paper. + case "$dom" in + *.[Uu][Ss]|*.[Cc][Aa]) + ;; + *.[A-Za-z][A-Za-z]) + PAGE=A4 ;; + esac + fi + + test -n "$PAGE" || PAGE=letter + if test "x$PAGE" = "xA4"; then cat >>confdefs.h <<\_ACEOF #define PAGEA4 1 _ACEOF -fi -echo "$as_me:$LINENO: result: $PAGE" >&5 + fi + echo "$as_me:$LINENO: result: $PAGE" >&5 echo "${ECHO_T}$PAGE" >&6 echo "$as_me:$LINENO: checking for existing troff installation" >&5 echo $ECHO_N "checking for existing troff installation... $ECHO_C" >&6 -if test "x`(echo .tm '|n(.g' | tr '|' '\\\\' | troff -z -i 2>&1) 2>/dev/null`" = x0; then - echo "$as_me:$LINENO: result: yes" >&5 + if test "x`(echo .tm '|n(.g' | tr '|' '\\\\' | troff -z -i 2>&1) 2>/dev/null`" = x0; then + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - g=g -else - echo "$as_me:$LINENO: result: no" >&5 + g=g + else + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - g= -fi + g= + fi echo "$as_me:$LINENO: checking for prefix of system macro packages" >&5 echo $ECHO_N "checking for prefix of system macro packages... $ECHO_C" >&6 -sys_tmac_prefix= -sys_tmac_file_prefix= -for d in /usr/share/lib/tmac /usr/lib/tmac; do - for t in "" tmac.; do - for m in an s m; do - f=$d/$t$m - if test -z "$sys_tmac_prefix" \ - && test -f $f \ - && grep '^\.if' $f >/dev/null 2>&1; then - sys_tmac_prefix=$d/$t - sys_tmac_file_prefix=$t - fi - done - done -done -echo "$as_me:$LINENO: result: $sys_tmac_prefix" >&5 + sys_tmac_prefix= + sys_tmac_file_prefix= + for d in /usr/share/lib/tmac /usr/lib/tmac; do + for t in "" tmac.; do + for m in an s m; do + f=$d/$t$m + if test -z "$sys_tmac_prefix" \ + && test -f $f \ + && grep '^\.if' $f >/dev/null 2>&1; then + sys_tmac_prefix=$d/$t + sys_tmac_file_prefix=$t + fi + done + done + done + echo "$as_me:$LINENO: result: $sys_tmac_prefix" >&5 echo "${ECHO_T}$sys_tmac_prefix" >&6 -tmac_wrap= -echo "$as_me:$LINENO: checking which system macro packages should be made available" >&5 + + echo "$as_me:$LINENO: checking which system macro packages should be made available" >&5 echo $ECHO_N "checking which system macro packages should be made available... $ECHO_C" >&6 -if test "x$sys_tmac_file_prefix" = "xtmac."; then - for f in $sys_tmac_prefix*; do - suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"` - case "$suff" in - e) ;; - *) - grep "Copyright.*Free Software Foundation" $f >/dev/null \ - || tmac_wrap="$tmac_wrap $suff" ;; - esac - done -elif test -n "$sys_tmac_prefix"; then - files=`echo $sys_tmac_prefix*` - grep "\\.so" $files >conftest.sol - for f in $files; do - case "$f" in - ${sys_tmac_prefix}e) ;; - *.me) ;; - */ms.*) ;; - *) - b=`basename $f` - if grep "\\.so.*/$b\$" conftest.sol >/dev/null \ - || grep -l "Copyright.*Free Software Foundation" $f >/dev/null; then - : - else - suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"` - case "$suff" in - tmac.*) ;; - *) tmac_wrap="$tmac_wrap $suff" ;; - esac - fi - esac - done - rm -f conftest.sol -fi -echo "$as_me:$LINENO: result: $tmac_wrap" >&5 + tmac_wrap= + if test "x$sys_tmac_file_prefix" = "xtmac."; then + for f in $sys_tmac_prefix*; do + suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"` + case "$suff" in + e) + ;; + *) + grep "Copyright.*Free Software Foundation" $f >/dev/null \ + || tmac_wrap="$tmac_wrap $suff" ;; + esac + done + elif test -n "$sys_tmac_prefix"; then + files=`echo $sys_tmac_prefix*` + grep "\\.so" $files >conftest.sol + for f in $files; do + case "$f" in + ${sys_tmac_prefix}e) + ;; + *.me) + ;; + */ms.*) + ;; + *) + b=`basename $f` + if grep "\\.so.*/$b\$" conftest.sol >/dev/null \ + || grep -l "Copyright.*Free Software Foundation" $f >/dev/null; then + : + else + suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"` + case "$suff" in + tmac.*) + ;; + *) + tmac_wrap="$tmac_wrap $suff" ;; + esac + fi + esac + done + rm -f conftest.sol + fi + echo "$as_me:$LINENO: result: $tmac_wrap" >&5 echo "${ECHO_T}$tmac_wrap" >&6 -make_html=html -make_install_html=install_html -missing= -# Extract the first word of "pnmcut", so it can be a program name with args. +echo "$as_me:$LINENO: checking separator character to use in groff search paths" >&5 +echo $ECHO_N "checking separator character to use in groff search paths... $ECHO_C" >&6 + cp ${srcdir}/src/include/nonposix.h conftest.h + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include +#include "conftest.h" + + +int +main () +{ + + +#if PATH_SEP_CHAR == ';' +make an error "Path separator is ';'" +#endif + + + ; + return 0; +} + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + GROFF_PATH_SEPARATOR=":" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +GROFF_PATH_SEPARATOR=";" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: result: $GROFF_PATH_SEPARATOR" >&5 +echo "${ECHO_T}$GROFF_PATH_SEPARATOR" >&6 + + +# Check whether --with-alt-gs or --without-alt-gs was given. +if test "${with_alt_gs+set}" = set; then + withval="$with_alt_gs" + ALT_GHOSTSCRIPT_PROGS="$withval" +else + ALT_GHOSTSCRIPT_PROGS="gs gswin32c gsos2" +fi; + + + +# Check whether --with-gs or --without-gs was given. +if test "${with_gs+set}" = set; then + withval="$with_gs" + GHOSTSCRIPT=$withval +else + if test -n "$ac_tool_prefix"; then + for ac_prog in $ALT_GHOSTSCRIPT_PROGS + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_GHOSTSCRIPT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$GHOSTSCRIPT"; then + ac_cv_prog_GHOSTSCRIPT="$GHOSTSCRIPT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GHOSTSCRIPT="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +GHOSTSCRIPT=$ac_cv_prog_GHOSTSCRIPT +if test -n "$GHOSTSCRIPT"; then + echo "$as_me:$LINENO: result: $GHOSTSCRIPT" >&5 +echo "${ECHO_T}$GHOSTSCRIPT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$GHOSTSCRIPT" && break + done +fi +if test -z "$GHOSTSCRIPT"; then + ac_ct_GHOSTSCRIPT=$GHOSTSCRIPT + for ac_prog in $ALT_GHOSTSCRIPT_PROGS +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_GHOSTSCRIPT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_GHOSTSCRIPT"; then + ac_cv_prog_ac_ct_GHOSTSCRIPT="$ac_ct_GHOSTSCRIPT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_GHOSTSCRIPT="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_GHOSTSCRIPT=$ac_cv_prog_ac_ct_GHOSTSCRIPT +if test -n "$ac_ct_GHOSTSCRIPT"; then + echo "$as_me:$LINENO: result: $ac_ct_GHOSTSCRIPT" >&5 +echo "${ECHO_T}$ac_ct_GHOSTSCRIPT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_GHOSTSCRIPT" && break +done + + if test "x$ac_ct_GHOSTSCRIPT" = x; then + GHOSTSCRIPT="missing" + else + if test "$build" != "$host"; then + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} + fi + GHOSTSCRIPT=$ac_ct_GHOSTSCRIPT + fi +fi + +fi; + test "$GHOSTSCRIPT" = "no" && GHOSTSCRIPT=missing + + make_html=html + make_install_html=install_html + + missing= + # Extract the first word of "pnmcut", so it can be a program name with args. set dummy pnmcut; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 @@ -5989,10 +10091,9 @@ else echo "${ECHO_T}no" >&6 fi -if test $pnmcut = missing; then - missing="$missing pnmcut" -fi -# Extract the first word of "pnmcrop", so it can be a program name with args. + if test $pnmcut = missing; then + missing="$missing \`pnmcut'" + fi;# Extract the first word of "pnmcrop", so it can be a program name with args. set dummy pnmcrop; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 @@ -6028,10 +10129,9 @@ else echo "${ECHO_T}no" >&6 fi -if test $pnmcrop = missing; then - missing="$missing pnmcrop" -fi -# Extract the first word of "pnmtopng", so it can be a program name with args. + if test $pnmcrop = missing; then + missing="$missing \`pnmcrop'" + fi;# Extract the first word of "pnmtopng", so it can be a program name with args. set dummy pnmtopng; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 @@ -6067,49 +10167,9 @@ else echo "${ECHO_T}no" >&6 fi -if test $pnmtopng = missing; then - missing="$missing pnmtopng" -fi -# Extract the first word of "gs gsos2", so it can be a program name with args. -set dummy gs gsos2; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_gs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$gs"; then - ac_cv_prog_gs="$gs" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_gs="found" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_gs" && ac_cv_prog_gs="missing" -fi -fi -gs=$ac_cv_prog_gs -if test -n "$gs"; then - echo "$as_me:$LINENO: result: $gs" >&5 -echo "${ECHO_T}$gs" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -if test $gs = missing; then - missing="$missing gs" -fi -# Extract the first word of "psselect", so it can be a program name with args. + if test $pnmtopng = missing; then + missing="$missing \`pnmtopng'" + fi;# Extract the first word of "psselect", so it can be a program name with args. set dummy psselect; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 @@ -6145,10 +10205,9 @@ else echo "${ECHO_T}no" >&6 fi -if test $psselect = missing; then - missing="$missing psselect" -fi -# Extract the first word of "pnmtops", so it can be a program name with args. + if test $psselect = missing; then + missing="$missing \`psselect'" + fi;# Extract the first word of "pnmtops", so it can be a program name with args. set dummy pnmtops; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 @@ -6184,69 +10243,224 @@ else echo "${ECHO_T}no" >&6 fi -if test $pnmtops = missing; then - missing="$missing pnmtops" -fi -if test -n "$missing"; then - cnt=0 - for i in $missing - do - cnt=`expr $cnt + 1` - eval "prog$cnt=$i" - done - plural="s" - case $cnt in - 1) - plural="" - progs="\`$prog1'" ;; - 2) - progs="\`$prog1' and \`$prog2'" ;; - 3) - progs="\`$prog1', \`$prog2', and \`$prog3'" ;; - 4) - progs="\`$prog1', \`$prog2', \`$prog3', and \`$prog4'" ;; - 5) - progs="\`$prog1', \`$prog2', \`$prog3', \`$prog4', and \`$prog5'" ;; - 6) - progs="\`$prog1', \`$prog2', \`$prog3', \`$prog4', \`$prog5', and \`$prog6'" ;; - esac - make_html= - make_install_html= - { echo "$as_me:$LINENO: WARNING: + if test $pnmtops = missing; then + missing="$missing \`pnmtops'" + fi; + + test "$GHOSTSCRIPT" = "missing" && missing="$missing \`gs'" + + if test -n "$missing"; then + plural=`set $missing; test $# -gt 1 && echo s` + missing=`set $missing + missing="" + while test $# -gt 0 + do + case $# in + 1) missing="$missing$1" ;; + 2) missing="$missing$1 and " ;; + *) missing="$missing$1, " ;; + esac + shift + done + echo $missing` + + make_html= + make_install_html= + + { echo "$as_me:$LINENO: WARNING: missing program$plural: The program$plural - $progs - can't be found in the path, thus the HTML backend of groff (grohtml) - won't work properly. Consequently, no documentation in HTML format - is built and installed. -" >&5 -echo "$as_me: WARNING: + $missing + cannot be found in the PATH. + Consequently, groff's HTML backend (grohtml) will not work properly; + therefore, it will neither be possible to prepare, nor to install, + documentation in HTML format. + " >&5 +echo "$as_me: WARNING: missing program$plural: The program$plural - $progs - can't be found in the path, thus the HTML backend of groff (grohtml) - won't work properly. Consequently, no documentation in HTML format - is built and installed. -" >&2;} + $missing + cannot be found in the PATH. + Consequently, groff's HTML backend (grohtml) will not work properly; + therefore, it will neither be possible to prepare, nor to install, + documentation in HTML format. + " >&2;} + fi + + + + +# Check whether --with-alt-awk or --without-alt-awk was given. +if test "${with_alt_awk+set}" = set; then + withval="$with_alt_awk" + ALT_AWK_PROGS="$withval" +else + ALT_AWK_PROGS="gawk mawk nawk awk" +fi; + + + +# Check whether --with-awk or --without-awk was given. +if test "${with_awk+set}" = set; then + withval="$with_awk" + AWK=$withval +else + if test -n "$ac_tool_prefix"; then + for ac_prog in $ALT_AWK_PROGS + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$AWK" && break + done +fi +if test -z "$AWK"; then + ac_ct_AWK=$AWK + for ac_prog in $ALT_AWK_PROGS +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AWK"; then + ac_cv_prog_ac_ct_AWK="$ac_ct_AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_AWK=$ac_cv_prog_ac_ct_AWK +if test -n "$ac_ct_AWK"; then + echo "$as_me:$LINENO: result: $ac_ct_AWK" >&5 +echo "${ECHO_T}$ac_ct_AWK" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_AWK" && break +done + + if test "x$ac_ct_AWK" = x; then + AWK="missing" + else + if test "$build" != "$host"; then + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} + fi + AWK=$ac_ct_AWK + fi +fi + +fi; + test "$AWK" = "no" && AWK=missing + + + + make_pdfdoc=pdfdoc + make_install_pdfdoc=install_pdfdoc + + missing="" + test "$AWK" = missing && missing="\`awk'" + test "$GHOSTSCRIPT" = missing && missing="$missing \`gs'" + if test -n "$missing"; then + plural=`set $missing; test $# -eq 2 && echo s` + test x$plural = xs \ + && missing=`set $missing; echo "$1 and $2"` \ + || missing=`echo $missing` + + make_pdfdoc= + make_install_pdfdoc= + + { echo "$as_me:$LINENO: WARNING: missing program$plural: + + The program$plural $missing cannot be found in the PATH. + Consequently, groff's PDF formatter (pdfroff) will not work properly; + therefore, it will neither be possible to prepare, nor to install, + documentation in PDF format. + " >&5 +echo "$as_me: WARNING: missing program$plural: + + The program$plural $missing cannot be found in the PATH. + Consequently, groff's PDF formatter (pdfroff) will not work properly; + therefore, it will neither be possible to prepare, nor to install, + documentation in PDF format. + " >&2;} + fi + echo "$as_me:$LINENO: checking whether pnmtops can handle the -nosetpage option" >&5 echo $ECHO_N "checking whether pnmtops can handle the -nosetpage option... $ECHO_C" >&6 -if echo P2 2 2 255 0 1 2 0 | pnmtops -nosetpage > /dev/null 2>&1 ; then - echo "$as_me:$LINENO: result: yes" >&5 + if echo P2 2 2 255 0 1 2 0 | pnmtops -nosetpage > /dev/null 2>&1 ; then + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - pnmtops_nosetpage="pnmtops -nosetpage" -else - echo "$as_me:$LINENO: result: no" >&5 + pnmtops_nosetpage="pnmtops -nosetpage" + else + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - pnmtops_nosetpage="pnmtops" -fi + pnmtops_nosetpage="pnmtops" + fi ac_config_files="$ac_config_files stamp-h" - ac_config_files="$ac_config_files Makefile doc/Makefile src/xditview/Imakefile" + ac_config_files="$ac_config_files Makefile doc/Makefile src/utils/xtotroff/Makefile" + + ac_config_files="$ac_config_files contrib/gdiffmk/tests/runtests" + + ac_config_files="$ac_config_files test-groff" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -6276,13 +10490,13 @@ _ACEOF # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | @@ -6293,7 +10507,7 @@ _ACEOF t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache -if cmp -s $cache_file confcache; then :; else +if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file @@ -6312,13 +10526,13 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ + ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; +s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; -s/^[^=]*=[ ]*$//; +s/^[^=]*=[ ]*$//; }' fi @@ -6328,8 +10542,8 @@ ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' @@ -6353,6 +10567,8 @@ cat >$CONFIG_STATUS <<_ACEOF # configure, is in config.log if it exists. debug=false +ac_cs_recheck=false +ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF @@ -6368,31 +10584,86 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + setopt NO_GLOB_SUBST +elif test -n "${BASH_VERSION+set}${KSH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi # Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi +# Find who we are. Look in the path if we contain no path at all +# relative or not. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute file name" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute file name" >&2;} + { (exit 1); exit 1; }; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME do - if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done @@ -6423,102 +10694,38 @@ echo X/"$0" | s/.*/./; q'` -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conftest.sh - echo "exit 0" >>conftest.sh - chmod +x conftest.sh - if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conftest.sh -fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x$as_lineno_3" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s,[$]LINENO.*,&-, + t lineno + b + : lineno N - s,$,-, : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + s,[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\),\2\1\2, t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s,-\n.*,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 @@ -6568,16 +10775,17 @@ rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else + test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS @@ -6604,7 +10812,7 @@ _ASBOX cat >&5 <<_CSEOF This file was extended by $as_me, which was -generated by GNU Autoconf 2.54. Invocation command line was +generated by GNU Autoconf 2.59b. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -6644,12 +10852,13 @@ Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + instantiate the configuration file FILE --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + instantiate the configuration header FILE Configuration files: $config_files @@ -6663,11 +10872,10 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.54, +configured by $0, generated by GNU Autoconf 2.59b, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. +Copyright (C) 2004 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir @@ -6700,12 +10908,9 @@ do case $ac_option in # Handling of the options. _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" - exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; -_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) @@ -6727,6 +10932,9 @@ Try \`$0 --help' for more information." >&2;} $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 @@ -6741,6 +10949,20 @@ Try \`$0 --help' for more information." >&2;} shift done +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + _ACEOF @@ -6755,7 +10977,9 @@ do "stamp-h" ) CONFIG_FILES="$CONFIG_FILES stamp-h" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "src/xditview/Imakefile" ) CONFIG_FILES="$CONFIG_FILES src/xditview/Imakefile" ;; + "src/utils/xtotroff/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/utils/xtotroff/Makefile" ;; + "contrib/gdiffmk/tests/runtests" ) CONFIG_FILES="$CONFIG_FILES contrib/gdiffmk/tests/runtests" ;; + "test-groff" ) CONFIG_FILES="$CONFIG_FILES test-groff" ;; "src/include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/config.h:src/include/config.hin" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} @@ -6772,25 +10996,28 @@ if $ac_need_defaults; then test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap 'exit_status=$?; rm -f -r $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. -: ${TMPDIR=/tmp} + { - tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=$TMPDIR/cs$$-$RANDOM + tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { - echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } @@ -6838,7 +11065,6 @@ s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t -s,@groff_top_builddir@,$groff_top_builddir,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t @@ -6851,6 +11077,15 @@ s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@TTYDEVDIRS@,$TTYDEVDIRS,;t t s,@OTHERDEVDIRS@,$OTHERDEVDIRS,;t t +s,@CPP@,$CPP,;t t +s,@X_CFLAGS@,$X_CFLAGS,;t t +s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t +s,@X_LIBS@,$X_LIBS,;t t +s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t +s,@XDEVDIRS@,$XDEVDIRS,;t t +s,@XPROGDIRS@,$XPROGDIRS,;t t +s,@XLIBDIRS@,$XLIBDIRS,;t t +s,@appresdir@,$appresdir,;t t s,@LPR@,$LPR,;t t s,@LP@,$LP,;t t s,@LPQ@,$LPQ,;t t @@ -6866,8 +11101,9 @@ s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@LN_S@,$LN_S,;t t s,@SH_SCRIPT_SED_CMD@,$SH_SCRIPT_SED_CMD,;t t -s,@CPP@,$CPP,;t t +s,@GREP@,$GREP,;t t s,@EGREP@,$EGREP,;t t +s,@LIBC@,$LIBC,;t t s,@LIBM@,$LIBM,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@BROKEN_SPOOLER_FLAGS@,$BROKEN_SPOOLER_FLAGS,;t t @@ -6875,14 +11111,22 @@ s,@PAGE@,$PAGE,;t t s,@g@,$g,;t t s,@sys_tmac_prefix@,$sys_tmac_prefix,;t t s,@tmac_wrap@,$tmac_wrap,;t t +s,@GROFF_PATH_SEPARATOR@,$GROFF_PATH_SEPARATOR,;t t +s,@ALT_GHOSTSCRIPT_PROGS@,$ALT_GHOSTSCRIPT_PROGS,;t t +s,@GHOSTSCRIPT@,$GHOSTSCRIPT,;t t +s,@ac_ct_GHOSTSCRIPT@,$ac_ct_GHOSTSCRIPT,;t t s,@pnmcut@,$pnmcut,;t t s,@pnmcrop@,$pnmcrop,;t t s,@pnmtopng@,$pnmtopng,;t t -s,@gs@,$gs,;t t s,@psselect@,$psselect,;t t s,@pnmtops@,$pnmtops,;t t s,@make_html@,$make_html,;t t s,@make_install_html@,$make_install_html,;t t +s,@ALT_AWK_PROGS@,$ALT_AWK_PROGS,;t t +s,@AWK@,$AWK,;t t +s,@ac_ct_AWK@,$ac_ct_AWK,;t t +s,@make_pdfdoc@,$make_pdfdoc,;t t +s,@make_install_pdfdoc@,$make_install_pdfdoc,;t t s,@pnmtops_nosetpage@,$pnmtops_nosetpage,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF @@ -6914,9 +11158,9 @@ _ACEOF (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end @@ -6934,21 +11178,21 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -6956,7 +11200,7 @@ echo X"$ac_file" | /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then - mkdir -p "$ac_dir" + test -d "$ac_dir" || mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= @@ -6964,10 +11208,10 @@ echo X"$ac_file" | as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -6998,19 +11242,52 @@ case $srcdir in else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; - *) # Relative path. + *) # Relative name. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + +# Do not use `cd foo && pwd` to compute absolute names, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac case $INSTALL in @@ -7032,7 +11309,7 @@ echo "$as_me: creating $ac_file" >&6;} configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." + sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. @@ -7041,24 +11318,24 @@ echo "$as_me: creating $ac_file" >&6;} case $f in -) echo $tmp/stdin ;; [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + echo "$f";; *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - fi;; + fi;; esac done` || { (exit 1); exit 1; } _ACEOF @@ -7091,6 +11368,8 @@ s,@INSTALL@,$ac_INSTALL,;t t # Run the commands associated with the file. case $ac_file in stamp-h ) echo timestamp > stamp-h ;; + contrib/gdiffmk/tests/runtests ) chmod +x contrib/gdiffmk/tests/runtests ;; + test-groff ) chmod +x test-groff ;; esac done _ACEOF @@ -7104,12 +11383,12 @@ cat >>$CONFIG_STATUS <<\_ACEOF # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' @@ -7118,11 +11397,11 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac @@ -7136,28 +11415,29 @@ echo "$as_me: creating $ac_file" >&6;} case $f in -) echo $tmp/stdin ;; [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + # Quote $f, to prevent DOS file names from being IFS'd. + echo "$f";; *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - fi;; + fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF @@ -7180,9 +11460,9 @@ s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times @@ -7196,13 +11476,13 @@ rm -f confdef2sed.sed # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail @@ -7211,7 +11491,7 @@ do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS @@ -7238,7 +11518,7 @@ do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS @@ -7266,16 +11546,16 @@ cat >>$CONFIG_STATUS <<\_ACEOF cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then - if cmp -s $ac_file $tmp/config.h 2>/dev/null; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -7283,7 +11563,7 @@ echo X"$ac_file" | /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then - mkdir -p "$ac_dir" + test -d "$ac_dir" || mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= @@ -7291,10 +11571,10 @@ echo X"$ac_file" | as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -7335,31 +11615,49 @@ ac_clean_files=$ac_clean_files_save # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null - $SHELL $CONFIG_STATUS || ac_cs_success=false + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi -{ echo "$as_me:$LINENO: - Configuration completed. +if test -z "$groff_no_x"; then + if test "x$with_appresdir" = "x"; then + { echo "$as_me:$LINENO: - You can now say \`make' to compile the groff package and \`make install' - to install it afterwards. + The application resource file for gxditview will be installed as - If you want to compile xditview, change the directory to \`src/xditview' - and follow the instructions given in the file \`INSTALL'. -" >&5 + $appresdir/GXditview + + (an existing file will be saved as \`GXditview.old'). + To install it into a different directory, say, \`/etc/gxditview', + add \`--with-appresdir=/etc/gxditview' to the configure script + command line options and rerun it. The environment variable + \`APPLRESDIR' must then be set to \`/etc/' (note the trailing slash), + omitting the \`gxditview' part which is automatically appended by + the X11 searching routines for resource files. More details can be + found in the X(7) manual page. + " >&5 echo "$as_me: - Configuration completed. + The application resource file for gxditview will be installed as - You can now say \`make' to compile the groff package and \`make install' - to install it afterwards. + $appresdir/GXditview - If you want to compile xditview, change the directory to \`src/xditview' - and follow the instructions given in the file \`INSTALL'. -" >&6;} + (an existing file will be saved as \`GXditview.old'). + To install it into a different directory, say, \`/etc/gxditview', + add \`--with-appresdir=/etc/gxditview' to the configure script + command line options and rerun it. The environment variable + \`APPLRESDIR' must then be set to \`/etc/' (note the trailing slash), + omitting the \`gxditview' part which is automatically appended by + the X11 searching routines for resource files. More details can be + found in the X(7) manual page. + " >&6;} + fi + fi diff --git a/contrib/groff/configure.ac b/contrib/groff/configure.ac index c5079633ae75..2fe8967f2386 100644 --- a/contrib/groff/configure.ac +++ b/contrib/groff/configure.ac @@ -1,90 +1,126 @@ -dnl Process this file with autoconf to produce a configure script. +# Autoconf configuration file for groff. +# Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# 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. +# +# Process this file with autoconf to produce a configure script. + AC_INIT -AC_CONFIG_HEADERS(src/include/config.h:src/include/config.hin) +AC_PREREQ(2.59) + +AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin]) AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp]) -dnl checks for programs -GROFF_SRCDIR -GROFF_BUILDDIR + +# checks for programs AC_PROG_CC AC_PROG_CXX GROFF_CXX_CHECK GROFF_EBCDIC GROFF_OS390 +GROFF_X11 +GROFF_APPRESDIR_OPTION +GROFF_APPRESDIR_DEFAULT GROFF_PRINT -AC_PATH_PROG(PERLPATH, perl, /usr/bin/perl) +AC_PATH_PROG([PERLPATH], [perl], [/usr/bin/perl]) GROFF_PROG_YACC AC_PROG_RANLIB GROFF_INSTALL_SH GROFF_INSTALL_INFO AC_PROG_INSTALL AC_PROG_LN_S -dnl use a dummy substitution if no csh hack is necessary to avoid errors -dnl with non-GNU sed programs -GROFF_CSH_HACK(SH_SCRIPT_SED_CMD='1s/.*/:/', SH_SCRIPT_SED_CMD='1s/a/a/') -AC_SUBST(SH_SCRIPT_SED_CMD) -dnl checks for headers -AC_CHECK_HEADERS(stdlib.h unistd.h dirent.h limits.h sys/dir.h \ - string.h strings.h math.h sys/time.h) + +# use a dummy substitution if no csh hack is necessary to avoid errors +# with non-GNU sed programs +GROFF_CSH_HACK([SH_SCRIPT_SED_CMD='1s/.*/:/'], [SH_SCRIPT_SED_CMD='1s/a/a/']) +AC_SUBST([SH_SCRIPT_SED_CMD]) + +# checks for headers +AC_CHECK_HEADERS([stdlib.h unistd.h dirent.h limits.h sys/dir.h \ + string.h strings.h math.h sys/time.h direct.h process.h]) GROFF_ISC_SYSV3 GROFF_POSIX + +# checks for header stuff GROFF_SRAND -GROFF_NEED_DECLARATION(gettimeofday) -GROFF_NEED_DECLARATION(hypot) -GROFF_NEED_DECLARATION(popen) -GROFF_NEED_DECLARATION(pclose) -GROFF_NEED_DECLARATION(putenv) -GROFF_NEED_DECLARATION(rand) -GROFF_NEED_DECLARATION(snprintf) -GROFF_NEED_DECLARATION(srand) -GROFF_NEED_DECLARATION(strcasecmp) -GROFF_NEED_DECLARATION(strncasecmp) +GROFF_NEED_DECLARATION([gettimeofday]) +GROFF_NEED_DECLARATION([hypot]) +GROFF_NEED_DECLARATION([popen]) +GROFF_NEED_DECLARATION([pclose]) +GROFF_NEED_DECLARATION([putenv]) +GROFF_NEED_DECLARATION([rand]) +GROFF_NEED_DECLARATION([snprintf]) +GROFF_NEED_DECLARATION([srand]) +GROFF_NEED_DECLARATION([strcasecmp]) +GROFF_NEED_DECLARATION([strncasecmp]) +GROFF_NEED_DECLARATION([vfprintf]) +GROFF_NEED_DECLARATION([vsnprintf]) GROFF_SYS_NERR GROFF_SYS_ERRLIST GROFF_OSFCN_H GROFF_LIMITS_H -GROFF_STDINT_H GROFF_INTTYPES_H -dnl checks for typedefs + +# checks for typedefs GROFF_UNSIGNED_LONG_LONG GROFF_UINTMAX_T GROFF_TIME_T -AC_TYPE_SIGNAL +GROFF_TYPE_SIGNAL GROFF_STRUCT_EXCEPTION -dnl checks for libraries + +# checks for libraries +GROFF_LIBC GROFF_LIBM -dnl checks for functions + +# checks for functions AC_FUNC_MMAP saved_libs="$LIBS" -LIBS="$LIBS -lc $LIBM" -AC_REPLACE_FUNCS(fmod getcwd putenv snprintf strcasecmp \ - strerror strncasecmp strtol) +LIBS="$LIBS $LIBC $LIBM" +AC_REPLACE_FUNCS([fmod getcwd putenv snprintf strcasecmp \ + strerror strncasecmp strtol]) +# vsnprintf is in the same source file as snprintf +AC_CHECK_FUNCS([vsnprintf], [], [AC_LIBOBJ([snprintf])]) LIBS="$saved_libs" -AC_CHECK_FUNCS(gettimeofday isatty rename setlocale strsep) +AC_CHECK_FUNCS([gettimeofday isatty kill rename setlocale strsep]) GROFF_MKSTEMP -AC_DECL_SYS_SIGLIST -dnl checks for compiler characteristics +AC_CHECK_DECLS([sys_siglist]) + +# checks for compiler characteristics GROFF_ARRAY_DELETE GROFF_TRADITIONAL_CPP -dnl checks for operating system services + +# checks for operating system services GROFF_WCOREFLAG -dnl other random stuff + +# other random stuff GROFF_BROKEN_SPOOLER_FLAGS GROFF_PAGE GROFF_G GROFF_TMAC +GROFF_TARGET_PATH_SEPARATOR GROFF_HTML_PROGRAMS +GROFF_PDFDOC_PROGRAMS GROFF_PNMTOPS_NOSETPAGE -AC_CONFIG_FILES(stamp-h, [echo timestamp > stamp-h]) -AC_CONFIG_FILES([Makefile doc/Makefile src/xditview/Imakefile]) + +AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) +AC_CONFIG_FILES([Makefile doc/Makefile src/utils/xtotroff/Makefile]) +AC_CONFIG_FILES([contrib/gdiffmk/tests/runtests], + [chmod +x contrib/gdiffmk/tests/runtests]) +AC_CONFIG_FILES([test-groff], [chmod +x test-groff]) AC_OUTPUT -dnl -AC_MSG_NOTICE([ - Configuration completed. - - You can now say `make' to compile the groff package and `make install' - to install it afterwards. - - If you want to compile xditview, change the directory to `src/xditview' - and follow the instructions given in the file `INSTALL'. -]) +GROFF_APPRESDIR_CHECK diff --git a/contrib/groff/contrib/eqn2graph/eqn2graph.man b/contrib/groff/contrib/eqn2graph/eqn2graph.man index aa71405c3144..3f34cc5e2a22 100644 --- a/contrib/groff/contrib/eqn2graph/eqn2graph.man +++ b/contrib/groff/contrib/eqn2graph/eqn2graph.man @@ -1,4 +1,4 @@ -.\" $Id: eqn2graph.man,v 1.2 2002/08/21 17:29:17 wlemb Exp $ +.\" $Id: eqn2graph.man,v 1.4 2003/10/28 07:46:23 wlemb Exp $ .\" This documentation is released to the public domain. . . @@ -31,7 +31,7 @@ Reads an EQN equation (one line) as input; produces an image file (by default in Portable Network Graphics format) suitable for the Web as output. .P -Your input EQN code should \fInot\fR have the .EQ/.EN preamble that +Your input EQN code should \fInot\fR have the \&.EQ/.EN preamble that that normally precedes it within .BR groff (@MAN1EXT@) macros; nor do you need to have dollar-sign or other delimiters @@ -82,7 +82,25 @@ The initialization file. . . +.SH ENVIRONMENT +.TP +.B GROFF_TMPDIR +The directory in which temporary files will be created. +If this is not set +.B eqn2graph +searches the environment variables +.BR \%TMPDIR , +.BR TMP , +and +.B TEMP +(in that order). +Otherwise, temporary files will be created in +.BR /tmp . +. +. .SH "SEE ALSO" +.BR pic2graph (@MAN1EXT@), +.BR grap2graph (@MAN1EXT@), .BR @g@eqn (@MAN1EXT@), .BR groff (@MAN1EXT@), .BR gs (1), diff --git a/contrib/groff/contrib/eqn2graph/eqn2graph.sh b/contrib/groff/contrib/eqn2graph/eqn2graph.sh index e314dc912633..98713a854ad5 100644 --- a/contrib/groff/contrib/eqn2graph/eqn2graph.sh +++ b/contrib/groff/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.2 2002/07/17 04:55:46 wlemb Exp $ +# $Id: eqn2graph.sh,v 1.5 2005/05/18 07:03:06 wl Exp $ # groff_opts="" convert_opts="" @@ -58,17 +58,34 @@ do shift done +# create temporary directory +tmp= +for d in "$GROFF_TMPDIR" "$TMPDIR" "$TMP" "$TEMP" /tmp; do + test -z "$d" && continue + + tmp=`(umask 077 && mktemp -d -q "$d/eqn2graph-XXXXXX") 2> /dev/null` \ + && test -n "$tmp" && test -d "$tmp" \ + && break + + tmp=$d/eqn2graph$$-$RANDOM + (umask 077 && mkdir $tmp) 2> /dev/null && break +done; +if test -z "$tmp"; then + echo "$0: cannot create temporary directory" >&2 + { (exit 1); exit 1; } +fi + +trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15 + # Here goes: # 1. Add .EQ/.EN. # 2. Process through eqn(1) to emit troff markup. # 3. Process through groff(1) to emit Postscript. # 4. Use convert(1) to crop the Postscript and turn it into a bitmap. -tmp=/usr/tmp/eqn2graph-$$ -trap "rm ${tmp}.*" 0 2 15 read equation -(echo ".EQ"; echo 'delim $$'; echo ".EN"; echo '$'"${equation}"'$') | \ - groff -e $groff_opts -Tps >${tmp}.ps \ - && convert -crop 0x0 $convert_opts ${tmp}.ps ${tmp}.${format} \ - && cat ${tmp}.${format} +(echo ".EQ"; echo 'delim $$'; echo ".EN"; echo '$'"$equation"'$') | \ + groff -e $groff_opts -Tps -P-pletter > $tmp/eqn2graph.ps \ + && convert -trim -crop 0x0 $convert_opts $tmp/eqn2graph.ps $tmp/eqn2graph.$format \ + && cat $tmp/eqn2graph.$format # End diff --git a/contrib/groff/contrib/gdiffmk/ChangeLog b/contrib/groff/contrib/gdiffmk/ChangeLog new file mode 100644 index 000000000000..f8e3f9632edb --- /dev/null +++ b/contrib/groff/contrib/gdiffmk/ChangeLog @@ -0,0 +1,63 @@ +2005-01-16 Mike Bianchi + + * gdiffmk.sh (Usage): Fix typos. + : Allow `-M ' also. + + * gdiffmk.man: Updated. + +2005-01-13 Mike Bianchi + + * gdiffmk.sh: Add the -D, -M, and -B options, which provide actions + akin to nrchbar. + Thanks to Larry Kollar (http://home.alltel.net/kollar/groff/). + + * gdiffmk.man: Updated. + + * tests/runtests.in: Added tests for gdiffmk's -D, -M, and -B + options. + + * tests/baseline8, tests/baseline9, tests/baseline10: New files. + +2004-12-16 Mike Bianchi + + * tests/runtests.in: Fix typo (s/$(srcdir)/${srcdir}/). + +2004-12-15 Werner LEMBERG + + The configure script now generates tests/runtests. + + * tests/tests.sh: Renamed to... + * tests/runtests.in: This. + Add proper $srcdir prefixes to make it run from build directory. + * README, Makefile.sub (CLEANADD), tests/test_baseline7: Updated. + +2004-12-14 Werner LEMBERG + + * gdiffmk.sh: Make sed pattern work with alternate result of GNU + diff's -D option, using `!' instead of `not' in #endif comments. + (Exit): Use prefix for each emitted message line. + +2004-12-14 Mike Bianchi + + * tests/*: New files for testing gdiffmk. + + * README, gdiffmk.man, gdiffmk.sh: Updated. + Minor fixes. + +2004-12-13 Mike Bianchi + + Add `-x' command line option to select a diff program. + + * gdiffmk.sh: Add code to handle `-x'. + Move test for working `diff' down. + Fix sed pattern -- `.mc *' needs to be followed by `.mc .'. + (Usage): Updated. + * gdiffmk.man: Updated. + +2004-12-12 Mike Bianchi + + * README: New file. + +2004-12-11 Mike Bianchi + + First import of gdiffmk files. diff --git a/contrib/groff/contrib/gdiffmk/Makefile.sub b/contrib/groff/contrib/gdiffmk/Makefile.sub new file mode 100644 index 000000000000..5e0cd147a434 --- /dev/null +++ b/contrib/groff/contrib/gdiffmk/Makefile.sub @@ -0,0 +1,47 @@ +# Makefile.sub for `gdiffmk' (integration into the groff source tree) + +# File position: /contrib/gdiffmk/Makefile.sub + +# Last update: 12 December 2004 + +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Mike Bianchi > + +# This file is part of the gdiffmk utility, 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. + +######################################################################## + +MAN1=gdiffmk.n +CLEANADD=gdiffmk tests/runtests + +all: gdiffmk + +gdiffmk: gdiffmk.sh + rm -f $@; \ + sed -e "s|@BINDIR@|$(bindir)|g" \ + -e "s|@VERSION@|$(version)$(revision)|g" \ + -e $(SH_SCRIPT_SED_CMD) $(srcdir)/gdiffmk.sh >$@; \ + chmod +x $@ + +install_data: gdiffmk + -test -d $(bindir) || $(mkinstalldirs) $(bindir) + -rm -f $(bindir)/gdiffmk + $(INSTALL_SCRIPT) gdiffmk $(bindir)/gdiffmk + +uninstall_sub: + -rm -f $(bindir)/gdiffmk diff --git a/contrib/groff/contrib/gdiffmk/README b/contrib/groff/contrib/gdiffmk/README new file mode 100644 index 000000000000..9428717ede8c --- /dev/null +++ b/contrib/groff/contrib/gdiffmk/README @@ -0,0 +1,46 @@ +gdiffmk is approximately a recreation of the original Bell Labs/AT&T diffmk +command for troff/nroff documents, with enhancements. + +It should not be confused with `diffmk' commands that operate on XML. + +The inspiration for this code was a Perl 2 version written in 1989 by Randal +L. Schwartz. See + landfield.com/software/comp.sources.misc/archive-name/volume06/diffmk.p.gz + +The command also attempts to reproduce some of the functionality of the old +`nrchbar' command. See + open-systems.ufl.edu/mirrors/ftp.isc.org/usenet/comp.sources.unix/volume10/nrchbar.Z + +Thanks to Werner Lemberg for help in making the package more portable and +fit into the GNU groff source structure. + +Gnu diff(1) with the -Dname option does all of the work and sed(1) +translates the output into something groff/troff/nroff can handle. + +Note the BUGS on the man page. + +The `tests' directory contains simple tests. `runtests run' runs them and +compares the output against baseline files. Calling `runtests' without +argument gives the usage. + +---------------------------------------------------------------------------- + +Copyright (C) 2004, 2005 Free Software Foundation, Inc. +Written by Mike Bianchi > + +This file is part of the gdiffmk utility, 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. diff --git a/contrib/groff/contrib/gdiffmk/gdiffmk.man b/contrib/groff/contrib/gdiffmk/gdiffmk.man new file mode 100644 index 000000000000..9c89182404f6 --- /dev/null +++ b/contrib/groff/contrib/gdiffmk/gdiffmk.man @@ -0,0 +1,281 @@ +.ig \"-*- nroff -*- +Copyright (C) 2004, 2005 Free Software Foundation, Inc. + +This file is part of the gdiffmk utility, which is part of groff. +Written by Mike Bianchi > + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +. +.do mso www.tmac +. +.TH GDIFFMK @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +. +. +.SH NAME +gdiffmk \- mark differences between groff/nroff/troff files +. +. +.SH SYNOPSIS +.nr a \n(.j +.ad l +.nr i \n(.i +.in +\w'\fBgdiffmk 'u +.ti \niu +.B gdiffmk +.de OP +. ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" +. el .RB "[\ " "\\$1" "\ ]" +.. +.OP \-a \%addmark +.OP \-c \%changemark +.OP \-d \%deletemark +[\ \c +.B \-D +.OP \-B +.OP \-M "mark1 mark2" +] +.OP \-x \%diffcmd +.OP \-\- +.OP \-\-help +.OP \%\-\-version +.I \%file1 +.I \%file2 +[\ \c +.IR \%output \ \c +] +.br +.ad \na +. +. +.SH DESCRIPTION +.B gdiffmk +compares two +.BR groff (1), +.BR nroff (1), +or +.BR troff (1) +documents, +.I file1 +and +.IR file2 , +and creates an output which is +.I file2 +with added `margin character' (.mc) commands that indicate the differences. +. +.LP +If the +.I output +filename is present, +the output is written there. +If it is +.B \- +or absent the output is written to the standard output. +. +.LP +If the +.I file1 +or +.I file2 +argument is +.B \- +the standard input is read for that input. +Clearly both cannot be +.BR \- . +. +.LP +Note that the output is not necessarily compatible with all macro packages +and all preprocessors. +See the +.B BUGS +section below. +. +. +.SH OPTIONS +.TP +.BI \-a addmark +Use the +.I addmark +for source lines not in +.I file1 +but present in +.IR file2 . +Default: +.BR + . +. +.TP +.B \-B +By default, the deleted texts marked by the +.B \-D +option end +with an added troff break command, +.BR .br , +to ensure that the deletions are marked properly. +This is the only way to guarantee that deletions and small +changes get flagged. +This option directs the program not to insert these breaks; it makes no +sense to use it without +.BR \-D . +. +.TP +.BI \-c changemark +Use the +.I changemark +for changed source lines. +Default: +.BR | . +. +.TP +.BI \-d deletemark +Use the +.I deletemark +for deleted source lines. +Default: +.BR * . +. +.TP +.B \-D +Show the deleted portions from changed and deleted text. +Default delimiting marks: +.BR "[[" " .\&.\&.\&. " "]]" . +. +.TP +.BI \-M "mark1 mark2" +Change the delimiting marks for the +.B \-D +option. +It makes no sense to use this option without +.BR \-D . +. +.TP +.BI \-x diffcmd +Use the +.I diffcmd +command to perform the comparison of +.I file1 +and +.IR file2 . +In particular, +.I diffcmd +should accept the GNU +.B diff +.BI \-D name +option. +Default: +.BR diff (1). +. +.TP +.B \-\- +All the following arguments are treated as file names, +even if they begin with +.BR \- . +. +.TP +.B \-\-help +Print a usage message on standard error output and exit. +. +.TP +.B \-\-version +Print version information on the standard output and exit. +. +. +.SH BUGS +The output is not necessarily compatible with all macro packages +and all preprocessors. +A workaround that is often successful against preprocessor problems +is to run +.B gdiffmk +on the output of all the preprocessors instead of the input source. +. +.LP +.B gdiffmk +relies on the +.BI \-D name +option of GNU +.BR diff (1) +to make a merged `#ifdef' output format. +It hasn't been tested whether other versions of +.BR diff (1) +do support this option. +See also the +.BI \-x diffcmd +option. +. +.LP +Report bugs to bug-groff@gnu.org. +Include a complete, self-contained example that will allow the bug to +be reproduced, and say which version of +.B gdiffmk +you are using. +. +. +.SH AUTHORS +This document was written and is maintained by +.MTO MBianchi@Foveal.com "Mike Bianchi" . +. +.LP +This document is distributed under the terms of the FDL (GNU Free +Documentation License) version 1.1 or later. +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" . +. +.LP +.B gdiffmk +is part of the +.I groff +GNU free software project. +All parts of the +.I groff package +are protected by GNU copyleft licenses. +The software files are distributed under the terms of the GNU General +Public License (GPL), while the documentation files mostly use the GNU +Free Documentation License (FDL). +. +. +.SH COPYRIGHT +Copyright \(co 2004, 2005 Free Software Foundation, Inc. +. +.LP +.B gdiffmk +is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. +. +.LP +.B gdiffmk +is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. +See the GNU General Public License for more details. +. +.LP +You should have received a copy of the GNU General Public License along +with groff; see the file COPYING. +If not, write to the Free Software +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. +. +. +.SH "SEE ALSO" +.BR groff (@MAN1EXT@), +.BR nroff (@MAN1EXT@), +.BR gtroff (@MAN1EXT@), +.BR diff (@MAN1EXT@) +. +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/contrib/groff/contrib/gdiffmk/gdiffmk.sh b/contrib/groff/contrib/gdiffmk/gdiffmk.sh new file mode 100644 index 000000000000..e55eb6962019 --- /dev/null +++ b/contrib/groff/contrib/gdiffmk/gdiffmk.sh @@ -0,0 +1,346 @@ +#! /bin/sh +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Written by Mike Bianchi > + +# This file is part of the gdiffmk utility, 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. +# This file is part of GNU gdiffmk. + + +cmd=$( basename $0 ) + +function Usage { + if test "$#" -gt 0 + then + echo >&2 "${cmd}: $@" + fi + echo >&2 "\ + +Usage: ${cmd} [ OPTIONS ] FILE1 FILE2 [ OUTPUT ] +Place difference marks into the new version of a groff/nroff/troff document. +FILE1 and FILE2 are compared, using \`diff', and FILE2 is output with +groff \`.mc' requests added to indicate how it is different from FILE1. + + FILE1 Previous version of the groff file. \`-' means standard input. + FILE2 Current version of the groff file. \`-' means standard input. + Either FILE1 or FILE2 can be standard input, but not both. + OUTPUT Copy of FILE2 with \`.mc' commands added. + \`-' means standard output (the default). + +OPTIONS: + -a ADDMARK Mark for added groff source lines. Default: \`+'. + -c CHANGEMARK Mark for changed groff source lines. Default: \`|'. + -d DELETEMARK Mark for deleted groff source lines. Default: \`*'. + + -D Show the deleted portions from changed and deleted text. + Default delimiting marks: \`[[' .... \`]]'. + -B By default, the deleted texts marked by the \`-D' option end + with an added troff \`.br' command. This option prevents + the added \`.br'. + -M MARK1 MARK2 Change the delimiting marks for the \`-D' option. + + -x DIFFCMD Use a different diff(1) command; + one that accepts the \`-Dname' option, such as GNU diff. + --version Print version information on the standard output and exit. + --help Print this message on the standard error. +" + exit 255 +} + + +function Exit { + exitcode=$1 + shift + for arg + do + echo >&2 "${cmd}: $1" + shift + done + exit ${exitcode} +} + +# Usage: FileRead exit_code filename +# +# Check for existence and readability of given file name. +# If not found or not readable, print message and exit with EXIT_CODE. +function FileRead { + case "$2" in + -) + return + ;; + esac + + if test ! -e "$2" + then + Exit $1 "File \`$2' not found." + fi + if test ! -r "$2" + then + Exit $1 "File \`$2' not readable." + fi +} + + +# Usage: FileCreate exit_code filename +# +# Create the given filename if it doesn't exist. +# If unable to create or write, print message and exit with EXIT_CODE. +function FileCreate { + case "$2" in + -) + return + ;; + esac + + if ! touch "$2" 2>/dev/null + then + if test ! -e "$2" + then + Exit $1 "File \`$2' not created; " \ + "Cannot write directory \`$( dirname "$2" )'." + fi + Exit $1 "File \`$2' not writeable." + fi +} + +function WouldClobber { + case "$2" in + -) + return + ;; + esac + + if test "$1" -ef "$3" + then + Exit 3 \ + "The $2 and OUTPUT arguments both point to the same file," \ + "\`$1', and it would be overwritten." + fi +} + +ADDMARK='+' +CHANGEMARK='|' +DELETEMARK='*' +MARK1='[[' +MARK2=']]' + +function RequiresArgument { + # Process flags that take either concatenated or + # separated values. + case "$1" in + -??*) + expr "$1" : '-.\(.*\)' + return 1 + ;; + esac + + if test "$#" -lt 2 + then + Exit 255 "Option \`$1' requires a value." + fi + + echo "$2" + return 0 +} + +badoption= +DIFFCMD=diff +D_option= +br=.br +for OPTION +do + case "${OPTION}" in + -a*) + ADDMARK=$( RequiresArgument "${OPTION}" $2 ) && + shift + ;; + -c*) + CHANGEMARK=$( RequiresArgument "${OPTION}" $2 ) && + shift + ;; + -d*) + DELETEMARK=$( RequiresArgument "${OPTION}" $2 ) && + shift + ;; + -D ) + D_option=D_option + ;; + -M* ) + MARK1=$( RequiresArgument "${OPTION}" $2 ) && + shift + if [ $# -lt 2 ] + then + Usage "Option \`-M' is missing the MARK2 value." + fi + MARK2=$2 + shift + ;; + -B ) + br=. + ;; + -x* ) + DIFFCMD=$( RequiresArgument "${OPTION}" $2 ) && + shift + ;; + --version) + echo "GNU ${cmd} (groff) version @VERSION@" + exit 0 + ;; + --help) + Usage + ;; + --) + # What follows -- are file arguments + shift + break + ;; + -) + break + ;; + -*) + badoption="${cmd}: invalid option \`$1'" + ;; + *) + break + ;; + esac + shift +done + +${DIFFCMD} -Dx /dev/null /dev/null >/dev/null 2>&1 || + Usage "The \`${DIFFCMD}' program does not accept" \ + "the required \`-Dname' option. +Use GNU diff instead. See the \`-x DIFFCMD' option." + +if test -n "${badoption}" +then + Usage "${badoption}" +fi + +if test "$#" -lt 2 -o "$#" -gt 3 +then + Usage "Incorrect number of arguments." +fi + +if test "1$1" = 1- -a "2$2" = 2- +then + Usage "Both FILE1 and FILE2 are \`-'." +fi + +FILE1=$1 +FILE2=$2 + +FileRead 1 "${FILE1}" +FileRead 2 "${FILE2}" + +if test "$#" = 3 +then + case "$3" in + -) + # output goes to standard output + ;; + *) + # output goes to a file + WouldClobber "${FILE1}" FILE1 "$3" + WouldClobber "${FILE2}" FILE2 "$3" + + FileCreate 3 "$3" + exec >$3 + ;; + esac +fi + +# To make a very unlikely label even more unlikely ... +label=__diffmk_$$__ + +sed_script=' + /^#ifdef '"${label}"'/,/^#endif \/\* '"${label}"'/ { + /^#ifdef '"${label}"'/ s/.*/.mc '"${ADDMARK}"'/ + /^#endif \/\* '"${label}"'/ s/.*/.mc/ + p + d + } + /^#ifndef '"${label}"'/,/^#endif \/\* [!not ]*'"${label}"'/ { + /^#else \/\* '"${label}"'/,/^#endif \/\* '"${label}"'/ { + /^#else \/\* '"${label}"'/ s/.*/.mc '"${CHANGEMARK}"'/ + /^#endif \/\* '"${label}"'/ s/.*/.mc/ + p + d + } + /^#endif \/\* \(not\|!\) '"${label}"'/ { + s/.*/.mc '"${DELETEMARK}"'/p + a\ +.mc + } + d + } + p + ' + +if [ ${D_option} ] +then + sed_script=' + /^#ifdef '"${label}"'/,/^#endif \/\* '"${label}"'/ { + /^#ifdef '"${label}"'/ s/.*/.mc '"${ADDMARK}"'/ + /^#endif \/\* '"${label}"'/ s/.*/.mc/ + p + d + } + /^#ifndef '"${label}"'/,/^#endif \/\* [!not ]*'"${label}"'/ { + /^#ifndef '"${label}"'/ { + i\ +'"${MARK1}"' + d + } + /^#else \/\* '"${label}"'/ ! { + /^#endif \/\* [!not ]*'"${label}"'/ ! { + p + d + } + } + /^#else \/\* '"${label}"'/,/^#endif \/\* '"${label}"'/ { + /^#else \/\* '"${label}"'/ { + i\ +'"${MARK2}"'\ +'"${br}"' + s/.*/.mc '"${CHANGEMARK}"'/ + a\ +.mc '"${CHANGEMARK}"' + d + } + /^#endif \/\* '"${label}"'/ s/.*/.mc/ + p + d + } + /^#endif \/\* \(not\|!\) '"${label}"'/ { + i\ +'"${MARK2}"'\ +'"${br}"' + s/.*/.mc '"${DELETEMARK}"'/p + a\ +.mc + } + d + } + p + ' +fi + +diff -D"${label}" -- ${FILE1} ${FILE2} | + sed -n "${sed_script}" + +# EOF diff --git a/contrib/groff/contrib/gdiffmk/tests/file1 b/contrib/groff/contrib/gdiffmk/tests/file1 new file mode 100644 index 000000000000..ba6a4be2eda5 --- /dev/null +++ b/contrib/groff/contrib/gdiffmk/tests/file1 @@ -0,0 +1,11 @@ +.ll 25 +.pl 20 +.nf +file1 and file2 #1 +file1 only +file1 and file2 #2 +file1 and file2 #3 +file1 only +file1 only +file1 and file2 #4 +file1 and file2 #5 diff --git a/contrib/groff/contrib/gdiffmk/tests/file2 b/contrib/groff/contrib/gdiffmk/tests/file2 new file mode 100644 index 000000000000..54e95eef295b --- /dev/null +++ b/contrib/groff/contrib/gdiffmk/tests/file2 @@ -0,0 +1,11 @@ +.ll 25 +.pl 20 +.nf +file1 and file2 #1 +file2 only +file2 only +file1 and file2 #2 +file2 only +file1 and file2 #3 +file1 and file2 #4 +file1 and file2 #5 diff --git a/contrib/groff/contrib/gdiffmk/tests/runtests.in b/contrib/groff/contrib/gdiffmk/tests/runtests.in new file mode 100644 index 000000000000..82952652e2d0 --- /dev/null +++ b/contrib/groff/contrib/gdiffmk/tests/runtests.in @@ -0,0 +1,98 @@ +#! /bin/sh +# A very simple function test for gdiffmk.sh. + +srcdir=@srcdir@ + +command=../gdiffmk + +# Test the number of arguments and the first argument. +case $#-$1 in +1-clean ) + rm -fv test_result* tmp_file* + exit 0 + ;; +1-run ) + ;; +* ) + echo >&2 "$0 [ clean | run ] +Run a few simple tests on \`${command}'."' + +clean Remove the test_result? and tmp_file? files. +run Run the tests. +' + exit 255 + ;; +esac + +function TestResult { + if cmp -s $1 $2 + then + echo $2 PASSED + else + echo '' + echo $2 TEST FAILED + diff $1 $2 + echo '' + fi +} + +tmpfile=/tmp/$$ +trap 'rm -f ${tmpfile}' 0 1 2 3 15 + +# Run tests. + +# 3 file arguments +ResultFile=test_result1 +${command} ${srcdir}/file1 ${srcdir}/file2 ${ResultFile} 2>${tmpfile} +cat ${tmpfile} >>${ResultFile} +TestResult ${srcdir}/test_baseline ${ResultFile} + +# OUTPUT to stdout by default +ResultFile=test_result2 +${command} ${srcdir}/file1 ${srcdir}/file2 >${ResultFile} 2>&1 +TestResult ${srcdir}/test_baseline ${ResultFile} + +# OUTPUT to stdout via - argument +ResultFile=test_result3 +${command} ${srcdir}/file1 ${srcdir}/file2 - >${ResultFile} 2>&1 +TestResult ${srcdir}/test_baseline ${ResultFile} + +# FILE1 from standard input via - argument +ResultFile=test_result4 +${command} - ${srcdir}/file2 <${srcdir}/file1 >${ResultFile} 2>&1 +TestResult ${srcdir}/test_baseline ${ResultFile} + +# FILE2 from standard input via - argument +ResultFile=test_result5 +${command} ${srcdir}/file1 - <${srcdir}/file2 >${ResultFile} 2>&1 +TestResult ${srcdir}/test_baseline ${ResultFile} + +# Different values for addmark, changemark, deletemark +ResultFile=test_result6 +${command} -aA -cC -dD ${srcdir}/file1 ${srcdir}/file2 >${ResultFile} 2>&1 +TestResult ${srcdir}/test_baseline6 ${ResultFile} + +# Test for accidental file overwrite. +ResultFile=test_result7 +cp ${srcdir}/file2 tmp_file7 +${command} -aA -dD -cC ${srcdir}/file1 tmp_file7 tmp_file7 \ + >${ResultFile} 2>&1 +TestResult ${srcdir}/test_baseline7 ${ResultFile} + +# Test -D option +ResultFile=test_result8 +${command} -D ${srcdir}/file1 ${srcdir}/file2 >${ResultFile} 2>&1 +TestResult ${srcdir}/test_baseline8 ${ResultFile} + +# Test -D and -M options +ResultFile=test_result9 +${command} -D -M '<<<<' '>>>>' \ + ${srcdir}/file1 ${srcdir}/file2 >${ResultFile} 2>&1 +TestResult ${srcdir}/test_baseline9 ${ResultFile} + +# Test -D and -B options +ResultFile=test_result10 +${command} -D -B ${srcdir}/file1 ${srcdir}/file2 >${ResultFile} 2>&1 +TestResult ${srcdir}/test_baseline10 ${ResultFile} + +# EOF diff --git a/contrib/groff/contrib/gdiffmk/tests/test_baseline b/contrib/groff/contrib/gdiffmk/tests/test_baseline new file mode 100644 index 000000000000..6b329926ae87 --- /dev/null +++ b/contrib/groff/contrib/gdiffmk/tests/test_baseline @@ -0,0 +1,17 @@ +.ll 25 +.pl 20 +.nf +file1 and file2 #1 +.mc | +file2 only +file2 only +.mc +file1 and file2 #2 +.mc + +file2 only +.mc +file1 and file2 #3 +.mc * +.mc +file1 and file2 #4 +file1 and file2 #5 diff --git a/contrib/groff/contrib/gdiffmk/tests/test_baseline10 b/contrib/groff/contrib/gdiffmk/tests/test_baseline10 new file mode 100644 index 000000000000..b523f4520005 --- /dev/null +++ b/contrib/groff/contrib/gdiffmk/tests/test_baseline10 @@ -0,0 +1,26 @@ +.ll 25 +.pl 20 +.nf +file1 and file2 #1 +[[ +file1 only +]] +. +.mc | +file2 only +file2 only +.mc +file1 and file2 #2 +.mc + +file2 only +.mc +file1 and file2 #3 +[[ +file1 only +file1 only +]] +. +.mc * +.mc +file1 and file2 #4 +file1 and file2 #5 diff --git a/contrib/groff/contrib/gdiffmk/tests/test_baseline6 b/contrib/groff/contrib/gdiffmk/tests/test_baseline6 new file mode 100644 index 000000000000..3156961b4a21 --- /dev/null +++ b/contrib/groff/contrib/gdiffmk/tests/test_baseline6 @@ -0,0 +1,17 @@ +.ll 25 +.pl 20 +.nf +file1 and file2 #1 +.mc C +file2 only +file2 only +.mc +file1 and file2 #2 +.mc A +file2 only +.mc +file1 and file2 #3 +.mc D +.mc +file1 and file2 #4 +file1 and file2 #5 diff --git a/contrib/groff/contrib/gdiffmk/tests/test_baseline7 b/contrib/groff/contrib/gdiffmk/tests/test_baseline7 new file mode 100644 index 000000000000..b65e8320c34d --- /dev/null +++ b/contrib/groff/contrib/gdiffmk/tests/test_baseline7 @@ -0,0 +1,2 @@ +gdiffmk: The FILE2 and OUTPUT arguments both point to the same file, +gdiffmk: `tmp_file7', and it would be overwritten. diff --git a/contrib/groff/contrib/gdiffmk/tests/test_baseline8 b/contrib/groff/contrib/gdiffmk/tests/test_baseline8 new file mode 100644 index 000000000000..9846dd583cb0 --- /dev/null +++ b/contrib/groff/contrib/gdiffmk/tests/test_baseline8 @@ -0,0 +1,26 @@ +.ll 25 +.pl 20 +.nf +file1 and file2 #1 +[[ +file1 only +]] +.br +.mc | +file2 only +file2 only +.mc +file1 and file2 #2 +.mc + +file2 only +.mc +file1 and file2 #3 +[[ +file1 only +file1 only +]] +.br +.mc * +.mc +file1 and file2 #4 +file1 and file2 #5 diff --git a/contrib/groff/contrib/gdiffmk/tests/test_baseline9 b/contrib/groff/contrib/gdiffmk/tests/test_baseline9 new file mode 100644 index 000000000000..50fe57d6d2b1 --- /dev/null +++ b/contrib/groff/contrib/gdiffmk/tests/test_baseline9 @@ -0,0 +1,26 @@ +.ll 25 +.pl 20 +.nf +file1 and file2 #1 +<<<< +file1 only +>>>> +.br +.mc | +file2 only +file2 only +.mc +file1 and file2 #2 +.mc + +file2 only +.mc +file1 and file2 #3 +<<<< +file1 only +file1 only +>>>> +.br +.mc * +.mc +file1 and file2 #4 +file1 and file2 #5 diff --git a/contrib/groff/contrib/grap2graph/Makefile.sub b/contrib/groff/contrib/grap2graph/Makefile.sub new file mode 100644 index 000000000000..5527618e1581 --- /dev/null +++ b/contrib/groff/contrib/grap2graph/Makefile.sub @@ -0,0 +1,19 @@ +MAN1=grap2graph.n +CLEANADD=grap2graph + +all: grap2graph + +grap2graph: grap2graph.sh + rm -f $@; \ + sed -e "s|@g@|$(g)|g" \ + -e "s|@VERSION@|$(version)$(revision)|" \ + -e $(SH_SCRIPT_SED_CMD) $(srcdir)/grap2graph.sh >$@; \ + chmod +x $@ + +install_data: grap2graph + -test -d $(bindir) || $(mkinstalldirs) $(bindir) + -rm -f $(bindir)/grap2graph + $(INSTALL_SCRIPT) grap2graph $(bindir)/grap2graph + +uninstall_sub: + -rm -f $(bindir)/grap2graph diff --git a/contrib/groff/contrib/grap2graph/grap2graph.man b/contrib/groff/contrib/grap2graph/grap2graph.man new file mode 100644 index 000000000000..0c6d4568d77e --- /dev/null +++ b/contrib/groff/contrib/grap2graph/grap2graph.man @@ -0,0 +1,105 @@ +.\" $Id: grap2graph.man,v 1.3 2003/10/28 07:46:23 wlemb Exp $ +.\" This documentation is released to the public domain. +. +. +.TH GRAP2GRAPH @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.IX grap2graph +.SH NAME +grap2graph \- convert a grap diagram into a cropped bitmap image +. +. +.SH SYNOPSIS +.B grap2graph +[ +.B \-unsafe +] +[ +.BI \-resolution\ M\fR|\fPMxN +] +[ +.BI \-format\ fmt +] +. +. +.SH DESCRIPTION +Reads a grap program as input; produces an image file (by default in +Portable Network Graphics format) suitable for the Web as output. +For a description of the grap language, see +.BR grap (1). +.P +Your graph specification should \fInot\fR be wrapped with the \&.G1 and +\&.G2 macros that normally guard it within +.BR groff (@MAN1EXT@) +macros. +.P +The output image will be a black-on-white graphic clipped to the +smallest possible bounding box that contains all the black pixels. +By specifying command-line options to be passed to +.BR convert (1) +you can give it a border, set the background transparent, set the +image's pixel density, or perform other useful transformations. +.P +This program uses +.BR grap (1), +.BR @g@pic (@MAN1EXT@), +.BR groff (@MAN1EXT@), +and the ImageMagick +.BR convert (1) +program. +These programs must be installed on your system and accessible on your +$PATH for \fBgrap2graph\fR to work. +. +. +.SH OPTIONS +.TP +.B \-unsafe +Run +.BR @g@pic (@MAN1EXT@) +and +.BR groff (@MAN1EXT@) +in the `unsafe' mode enabling the PIC macro +.B sh +to execute arbitrary commands. +The default is to forbid this. +.TP +.BI \-format\ fmt +Specify an output format; the default is PNG (Portable Network Graphics). +Any format that +.BR convert (1) +can emit is supported. +.PP +Command-line switches and arguments not listed above are passed to +.BR convert (1). +. +. +.SH ENVIRONMENT +.TP +.B GROFF_TMPDIR +The directory in which temporary files will be created. +If this is not set +.B grap2graph +searches the environment variables +.BR \%TMPDIR , +.BR TMP , +and +.B TEMP +(in that order). +Otherwise, temporary files will be created in +.BR /tmp . +. +. +.SH "SEE ALSO" +.BR pic2graph (@MAN1EXT@), +.BR eqn2graph (@MAN1EXT@), +.BR @g@pic (@MAN1EXT@), +.BR groff (@MAN1EXT@), +.BR gs (1), +.BR convert (1). +. +. +.SH AUTHOR +Eric S. Raymond +. +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/contrib/groff/contrib/grap2graph/grap2graph.sh b/contrib/groff/contrib/grap2graph/grap2graph.sh new file mode 100644 index 000000000000..7c830c1a2519 --- /dev/null +++ b/contrib/groff/contrib/grap2graph/grap2graph.sh @@ -0,0 +1,85 @@ +#! /bin/sh +# +# grap2graph -- compile graph description descriptions to bitmap images +# +# by Eric S. Raymond , May 2003 +# +# In Unixland, the magic is in knowing what to string together... +# +# Take grap description on stdin, emit cropped bitmap on stdout. +# The pic markup should *not* be wrapped in .G1/.G2, this script will do that. +# A -U option on the command line enables gpic/groff "unsafe" mode. +# A -format FOO option changes the image output format to any format +# supported by convert(1). All other options are passed to convert(1). +# The default format is PNG. +# + +# Requires the groff suite and the ImageMagick tools. Both are open source. +# This code is released to the public domain. +# +# Here are the assumptions behind the option processing: +# +# 1. None of the options of grap(1) are relevant. +# +# 2. Only the -U option of groff(1) is relevant. +# +# 3. Many options of convert(1) are potentially relevant, (especially +# -density, -interlace, -transparency, -border, and -comment). +# +# Thus, we pass -U to groff(1), and everything else to convert(1). +# +# $Id: grap2graph.sh,v 1.4 2005/05/18 07:03:06 wl Exp $ +# +groff_opts="" +convert_opts="" +format="png" + +while [ "$1" ] +do + case $1 in + -unsafe) + groff_opts="-U";; + -format) + format=$2 + shift;; + -v | --version) + echo "GNU grap2graph (groff) version @VERSION@" + exit 0;; + --help) + echo "usage: grap2graph [ option ...] < in > out" + exit 0;; + *) + convert_opts="$convert_opts $1";; + esac + shift +done + +# create temporary directory +tmp= +for d in "$GROFF_TMPDIR" "$TMPDIR" "$TMP" "$TEMP" /tmp; do + test -z "$d" && continue + + tmp=`(umask 077 && mktemp -d -q "$d/grap2graph-XXXXXX") 2> /dev/null` \ + && test -n "$tmp" && test -d "$tmp" \ + && break + + tmp=$d/grap2graph$$-$RANDOM + (umask 077 && mkdir $tmp) 2> /dev/null && break +done; +if test -z "$tmp"; then + echo "$0: cannot create temporary directory" >&2 + { (exit 1); exit 1; } +fi + +trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15 + +# Here goes: +# 1. Add .G1/.G2. +# 2. Process through grap(1) to emit pic markup. +# 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 -trim -crop 0x0 $convert_opts - $tmp/grap2graph.$format \ + && cat $tmp/grap2graph.$format + +# End diff --git a/contrib/groff/contrib/groffer/ChangeLog b/contrib/groff/contrib/groffer/ChangeLog index f706907d372a..c436f8cee5e1 100644 --- a/contrib/groff/contrib/groffer/ChangeLog +++ b/contrib/groff/contrib/groffer/ChangeLog @@ -1,4 +1,977 @@ -2003-01-22 Bernd Warken + ________________________________________________________________ + * release of groffer 0.9.22 + +2005-22-04 Bernd Warken + + ### `--whatis' + + Produce a `groff' output and allow wild cards on filespec + parameters for `--whatis'. + + * groffer2.sh: + - $_FILESPEC_ARG: New variable for storing the actual filespec + parameter. + - main_do_fileargs(): Set $_FILESPEC_ARG and add + what_is_filespec(). + - main_parse_args(): Add --all to --whatis. + - to_tmp_line(): New function to write the arguments to the + temorary cat file. + - whatis_filename(): Rename of what_is(). Construct a better + printout using $_FILESPEC_ARG. Repair the sed sequneces. + - whatis_filespec(): New function to print the filespec once + during the `whatis' process. + - whatis_header(): New funtion for printing the header of the + `whatis' output. + + * groffer.man: Revise the documentation of --whatis. + + ### `--apropos*' + + Produce `groff' for `--apropos*'. Allow `--sections' for + `--apropos', ignore it with `--apropos-*'. + + * groffer2.sh: + - --apropos*: Make these options without argument. + - $_APROPOS_PROG: New variable for the program that is is used for + `apropos'. + - $_APROPOS_SECTIONS: New variable to determine the sections that + are filtered out of `apropos' output depending on `--apropos-*'. + - apropos_filespec(): Handling of apropos at the filespec level. + - apropos_run(): Remove it. + - apropos_setup(): New function. + - main_set_mode(): Remove handling of $_OPT_APROPOS*. + + * groffer.man: + - Revise the documentation of `--apropos*'. + - Split section 'options for GNU man' into two sections `options + for man pages' and `long options taken over from GNU man'. + - Move `--apropos*', `--whatis', `--man', and `--no-man' to + section `options for man pages'. + + ### special display (apropos and whatis) + + * groffer2.sh: + - special_setup(): New function that chooses the setup between + apropos and whatis. + - special_filespec(): New function that does the output at the + filespec level for apropos or whatis. + + ### handle `--sections' for man page searching + + * groffer2.sh: + - man_do_filespec(): Use $_OPT_SECTIONS of --sections instead of + $_MAN_AUTO_SEC if non-empty. If a section was given on the + filespec parameter $_OPT_SECTIONS is ignored. This differs from + `man' which always uses the restricted sections of --sections. + This function works for both normal man page search and whatis. + - apropos_filespec(): Use --sections for --apropos, but not for + --apropos-* because these provide already their own sections. + + ### wildcards in filespec arguments + + * groffer2.sh: Wildcards are now accepted. In `--apropos*' and + `--whatis' they are interpreted as wildcard search elements; but + in normal display they are only handled as their own character. + + ### development; new option + + * groffer2.sh: + - --print: New option that prints just its argument for parameter + check. + - usage(): Add new option. + - $_OPT_DO_NOTHING: New variable for do_nothing(). Handle it at + the end of main_parse_Args(). + + * groffer.man: Add information on --print. + + ### safe exit + + * groffer2.sh: + - error(): Always exit with $_ERROR. + - exit_test(): New function to exit when first exit was hidden by + (). Call it after each $(). + + ### automatic shell determination + + * groffer.sh: + - If no option --shell is given perform a test of several shells + to automatically start some shell for groffer2.sh. `ksh' is used + first because it can be safely terminated by Ctrl-C. + - This can be cancelled by providing --shell=''. + - Add test on `sed' program. + + * groffer.man: Revise information on --shell. + + ### trap + + * groffer2.sh: + - trap_set(): Remove argument. Instead of $_ALL_EXIT use only + signal 0. + - trap_unset(): Rename trap_clean(). Instead of $_ALL_EXIT use + only signal 0. + - $_ALL_EXIT: Remove this variable. + - Replace all direct `trap' calls by trap_set(). + + * README_SH: New section `Bugs' on `trap'.. + + ### user errors, error output without function stack + + * groffer2.sh: + - error_user(): New function for user errors. + - error(): Remove call of clean_up() because the trap will do it + with the exit. Remove the `kill' commands. Create a temporary + file `.error' that can be tested by exit_test() for a better exit + test (especially for shell `ksh'). + - $_DEBUG_USER_WITH_STACK: New variable to enable function stack + output in error_user(). + - list_from_cmdline(), list_single_from_abbrev(), main_set_mode(): + Use error_user(). + + ### test modes on X and tty + + * groffer2,sh: + - is_X(), is_not_X(): New functions for checking on X Window. + - $_VIEWER_HTML_TTY, $_VIEWER_HTML_X: New variables that split + $_VIEWER_HTML. Add `galeon'. + - main_parse_args(): Allow mode change for graphical modes only + when in X Window. + - _do_display() of main_display(): Create a special run for + viewers that run on the terminal; `lynx' is the only one so far. + + ### add $GROFFER_MODE to command line + + * groffer.sh: + - After the handling of the configuration files integrate + $GROFFER_OPT to the command line. + - This makes a `set' in the shell determination unnecessary. + + * groffer2.sh: + - The debug test gets simpler because quotes are vanished without + $GROFFER_OPT. + - main_parse_MANOPT(): Prepend $mpm_list to the command line. + - main_parse_args(): `set' is unnecessary. + + ### debug; new options + + * groffer2.sh: + - --debug-all, --debug-lm, --debug-params, --debug-shell, + --debug-stacks, --debug-tmpdir, --debug-user: New options. + - --debug: Enable all debug variables except $_DEBUG_STACKS and + $_DEBUG_LM. By the new options the smallest abbreviation is now + `--debug'. + - $_DEBUG_STACKS: Rename $_DEBUG. + - $_DEBUG_PRINT_TMPDIR: New debug variable for printing the name + of the temporary directory in main_init(). + - $_OPT_DEBUG: Remove this variable because debug is handled at + the early part of the script. + - clean_up(): Enlarge $_DEBUG_KEEP_FILES to not deleting the + temporary directory. + - usage(): Move all development options on a section of its own. + - Move the test of rudimentary shell functionality at the + beginning of the script. Add test on `sed'. + - Follow this by the debug section. The determination of all + --debug* options can be done without a function. + + * groffer.man: Revise information on --debug and add new options. + + ### variables + + * groffer.sh: + - $_ERROR: Move the definition of this variable here. + - $_GROFF_VERSION: New variable, is set over @...@ construct. + - $_OUTPUT_FILE_NAME: Move this variable to groffer2.sh. + + * groffer2.sh: + - $_MAN_AUTO_SEC_LIST: Rename $_MAN_AUTO_SEC because it represents + a list. + - $_MAN_AUTO_SEC_CHARS: New read-only variable for storing + $_MAN_AUTO_SEC_LIST in [] construct. Use it in man_do_filespec() + and whatis_filename(). + - $_SPACE_CASE: New read-only variable with [] on space characters + with \ for `case' patterns. Use it in several functions. + - $_SPACE_SED: New read-only variable with [] on space characters + for `sed'. Use it in several functions. + + ### options and display + + * groffer2.sh: + - list_from_cmdline(): Add test whether the same abbreviation is + part of long options with and without arguments. Give handling of + `=' a `case' pattern of its own. + - main_display(): Remove unnecessary calls of `clean_up' in order + to use `mozilla' without problems. In _do_display(): Fix -X by + providing a different process when $_DISPLAY_PROG is empty. + - main_set_mode(): Accept options for viewers as is, without check + for program. Add test whether no program is given for a mode. + This avoids unnecessary empty $_DISPLAY_PROG in main_display(). + + ### viewer programs that run on the terminal (tty); new options + + * groffer2.sh: + - $_VIEWER_TERMINAL: New variable that stores whether a viewer was + supposed to run on tty. + - --dvi-viewer-tty, --html-viewer-tty, --pdf-viewer-tty, + --ps-viewer-tty, --tty-viewer-tty, --X-viewer-tty, --x-viewer-tty, + --www-viewer-tty: New options for viewers that run on a terminal. + - main_parse_args(), _do_display() of main_display(): Use the new + options and the new variable. + - usage(): Add the new options. + + * groffer.man: Add information on options --*-viewer-tty. + + ### other fixes + + * groffer2.sh: + - _do_display() of main_display(): Bear errors of `groff' run. + - is_not_file: Fix to have exactly one argument. + - is_not_prog(): Handle no arguments. + - list_has_not(): Fix. + - main_do_fileargs(): Remove $mdfa_exitcode. + - register_title(): Limit title to 4 elements. + - version(): Print the version information to standard output just + like `groff' does. + - --no-special: New option to disable former calls of `--all', + `--apropos*', and `whatis. + - --title: Make it an option with argument. + +2005-08-07 Keith Marshall + + * contrib/groffer/Makefile.sub (install): Reference groffer2.sh + as $(srcdir)/groffer2.sh, so it will install when building in a + different directory from the source. + + ________________________________________________________________ + * release of groffer 0.9.21 + +2005-08-02 Bernd Warken + + ### @...@ constructs + + * groffer.sh: + - $_AT: New variable for `@'. + - @...@: Replace the @...@ constructs by variables _AT_..._AT. + These constructs are transformed by `make' to useful information. + Keep all of these constructs in the first part of groffer.sh. For + a run before a `make' call, the script sets these variables to + special values for testing purpose. + - $_GROFFER_LIBDIR: Variable pointing to the groffer library + directory @libdir@/groff/groffer. + + ### Configuration files + + * groffer.sh: + - Add test for `$()' construct. + - Read and transform the configuration files and execute the + emerging commands. The `sed' script was heavily enlarged to + handle line with spaces and quotes. The emerging script is now + called by `eval', so no temporary file is needed. + - $_CONF_FILE_ETC, $_CONF_FILE_HOME: New variables for the config + files. + - $_SQ, $_SP: Move variables for characters before the handling of + the configuration files. Rename $_SQUOTE to $_SQ and $_SPACE to + $_SP. + - $GROFFER_OPT: Remove cleaning of this variable before the + reading of the configuration files. + + * groffer2.sh: + - main_init(): Remove the getting of the configuration files. + + ### Rewrite the shell determination + + * groffer.sh: + - Get rid of all functions in `groffer.sh'. Rewrite the shell + determination with `` and $(). + - --shell: Shortest abbreviation is `--sh'. Allow arguments for + the shell name. + - Allow an empty argument for --shell as shell name to overwrite a + specified shell; an empty shell name gets back to the default + shell. + - The shell determination now inludes the full handling of the + config files. The `--shell' option needs no longer a line + starting with `-'. + + ### Test of unset + + * groffer.sh: + - Remove test of `unset'. + - Remove all calls of `unset'. + - Use one character names for all variables that are meant to be + local in this script. + + * groffer2.sh: + - Move the test of `unset' to the testing of rudimentary shell + functionality without change. + + ### Allow abbreviations for long options + + * groffer2.sh: + - list_has_abbrev(): New function for checking a list having an + element with a given abbreviation. + - list_get_single_from_abbrev(): New function to retrieve the + element having a given abbreviation. + - list_from_cmd_line(): For an option abbreviation determine the + corresponding long option. + - From the man option lists remove the elements that are also in + a groffer list. + - Allow abbreviation for the early test of --debug. + + * groffer.sh: Allow abbreviation for the early test on --shell. + - get_opt_shell(): Rewrite _get_opt_shell() and the shell test + around it. + - test_on_shell(): Rename function _test_on_shell(). + - $_SHELL: global variable for the shell to run groffer2.sh. + + ### Get rid of `sh -c' + + * groffer2.sh: + - main_display(), _do_display(): Remove the `sh -c' calls. Make + the cleanup working without it. + - _do_display(): Extend _do_display() such that it can be used for + the pdf mode as well. + - _make_pdf(): New subfunction of main_display() for running the + additional parts of pdf mode in _do_display(). + - rm_file(), rm_file_with_debug(), rm_tree(): New functions for + removing files and directories. + + ### Change directory + + * groffer2.sh: + - $_START_DIR: New variable to store the directory at the starting + time of the script. + - main_display(): Go to the groffer temporary directory to be able + to process internal `groff' data like pictures. + - clean_up(): Get back to the starting directory. + + ### Compatibility with strange shells + + * groffer2.sh: + - clean_up(): `zsh' and `posh' had difficulties with `eval'. + - is_*(): Add test on empty argument. Some shells return true on + `test -d' etc. with empty argument, while most shells return + false. + - echo1(); New function to print single line `cat <file' for generating an empty file. + - rmdir: Replace `rmdir' by `rm -f -r'. + - eval: Add `eval' to many commands with variable arguments. + + * groffer.sh: repair `debug' + - Print all debug output to stderr. + - $_FUNC_STACK: Built function call stack even when $_DEBUG is not + set. Now the arguments are not added. + - $_DEBUG: If set to `yes' print 3 call stack events: the function + that is added with its arguments is printed with `+++ ' + (func_push()); the call stack after the addition is printed with + `>>> ' (func_push()); the call stack after the removing is printed + with `<<< ' (func_pop()). + - error(): Always print the function call stack on errors. + + * groffer.sh: Corrections + - $_groffer_run: Rename to $_GROFFER_RUN. + - $unset: Rename to $_UNSET. + - Repair test of `unset'. + - Repair test for `--shell'. The script is now rerun under the + shell specified in the option argument. This can increase the + speed. + + * README_SH: `zsh' now works. + + * groffer.man: + - Reformulate the information for the `groffer' specific details + of option `-V'. + - Add information on the debug process. + - Add information on the default devices in `x mode'. + - Minor corrections. + + ________________________________________________________________ + * release of groffer 0.9.18 + +2005-07-01 Bernd Warken + + * groffer.sh: further shell compatibility + - `echo': Remove options and possible options of `echo' by + preceding the argument with a character `x' that is removed by + `sed' or replace `echo' by `cat </README_SH + + + ******* Extension of the `apropos' handling + + The output of man's `apropos' has grown immensely meanwhile, so it + has become inefficient. Now `groffer' provides new options to get + the a selected information from this output. + + * groffer.sh: + `--apropos-progs': new option for displaying only information + on programs (man page sections 1, 6, and 8) + `--apropos-data': new option for displaying only information + on documented data (man page sections 4, 5 and 7) + `--apropos-devel': new option for displaying only information + on development documentation (man page sections 2, 3 and 9) + `--apropos': still displays just the output of man's `apropos' + program. + - Specify all of these options as a single argument option; that + makes groffer's `--apropos' option slightly different because + the corresponding `man' option does not have arguments, but takes + all file arguments as apropos targets. So just ignore the `man' + options `-k' and `--apropos' in the parsing of $MANOPT. + - Exit after processing one `apropos' call. + + + ******* Quasi object oriented function arguments + + An object is the name of an environment variable. The value of + this variable contains the object's content. This allows to + specify function arguments and the calling syntax in a simpler way + by letting the first argument be a variable name, usable for input + or output. + + Such an object type is `list', the string value of a shell + variable arranged in space-separated single-quoted elements, such + as $GROFFER_OPT internally. + + * groffer.sh: + - Remove list_from_args(), list_element_from_arg() + list_from_lists(), list_length(), and list_prepend(). + They can be replaced by list_append(). + - All list*() functions are rearranged such that the first + argument is a list object, the name of a variable. + + + ******* Simplification of configuration files + + The new syntax of the groffer configuration files is + - all lines starting with a `-' character are interpreted as + command line options for all calls of groffer; they are collected + and prepended to the actual value of $GROFFER_OPT; optional + spaces at the beginning.of the line are omitted. + - all other lines are interpreted as a shell command and executed + in the current shell of the groffer call. + + Precedence: + - The command line and the external environment variables such as + $GROFFER_OPT of the groffer call have the highest precedence. + - This is overwritten by the configuration file in the user's home + directory. + - The system configuration file in /etc has the lowest + precedence. + + * groffer.sh: + The configuration files are now called after the determination of + the temporary files in main_init(). + + + ******* Script file name + + The file name of the script is needed for the several calls during + the search for the optimal shell. + + * groffer.sh: + - $_GROFFER_SH: replace $_this by $_GROFFER_SH and use $0 for + determining the file name of the script for the following calls, + instead of the cumbersome @BINDIR@ construction. + - Force the script to be called as an executable file, so $0 must + contain the program name. + + + ******* Improved temporary file names + + Just like groff, groffer mixes all file parameters into a single + output file. Its name is now constructed as a comma-separated + list built from the file name arguments without a leading comma. + So a leading comma can be used for the internal temporary file + names. + + * groffer.sh: + - $_OUTPUT_FILE_NAME: new global variable as basis for the output + file name; it is set in main_set_resources(). + - tmp_create(): use `,name' for temporary files different from + output file because the output file name does not start with a + comma. `$$' is not needed anymore. + - main_display(): simplification of $_modefile in _do_display() + and single display modes. + - Add extension `.html' to output file name in html mode. + - base_name(): correction for strange positions of `/'. + + + ******* Mode fixes + + * groffer.sh: + - Set the main default mode to `x' with groff's X Window viewer + `gxditview'. + - Allow 'x' and 'X' in `--mode' for the X Window mode; the same + for `--x' and `X', `--x-viewer' and `--X-viewer'. + - Make groff's `-X' equivalent to `mode X'. + - Fix `--auto', `--mode auto', and `--default-modes'. + - `html' mode: new mode equivalent to `www', add `konqueror' and + `lynx' as viewers. + - `pdf' mode: fix zoom options for pdf-viewer `xpdf' in + main_set_resources(); in main_display() fix the display structure. + - Set default X Window resolution to 75dpi. This is not optimal, + but with a higher value the options and resources for some viewers + must be optimized. + `--text' and `--mode text': new option for text output without a + pager. + - `--tty-viewer': new option equivalent to `--pager'. + - Correct the pagers for `tty' mode. + - Fix `groff' mode in main_set_resources() and main_display(). + - Harmonize `--mode arg' with the equivalent options `--arg'. + + + ******* Fixes for command line options + + * groffer.sh: + - list_from_cmdline(): fix the parsing of options with arguments. + - Rename $_OPT_TTY_DEVICE to $_OPT_TEXT_DEVICE. + - $_OPTS_X_*: new variables for the inhereted X Window variables. + - Improve the distribution of the command line options into + $_OPTS_GROFFER_*, $_OPTS_GROFF_*, $_OPTS_X_*, and $_OPTS_MAN_*. + - $_OPTS_MANOPT_*: new variables for the parsing of $MANOPT. + - Correct $_OPTS_CMDLINE_*. + - Remove some unused $_OPTS_*. + - `--iconic': new option from `-iconic' of the X Window toolkit. + - Correct `--rv' to an option without argument. + - Minor fixes of other X Window toolkit options. + + + ******* Other fixes + + * groffer.sh: + - is_prog(): allow 0 arguments. + - is_not_writable(): new function. + - is_*(): fix trailing return codes. + - Replace most `test' calls by is_*() functions. + - man_setup(): due to bugs in `manpath', prefer + manpath_set_from_path() for the determination of the man page path. + - man_search_section(): correction of some `for' loops. + - Remove export of external non-groffer variables. + + + ******* Documentation + + * groffer.man: + - Reorder the option details according to the option origin as + groffer, groff, X, and man options. + - Add the programming changes information mentioned above. + - Support man pages with a dot in their name + + * README_SH: new file + Move large parts of the documentation in `groffer.sh' into this + file. + + * groffer.sh: usage(): + - Change the output for `--help' to standard output. + - Restructure the information for this help output. + + + ******* Removement of the author's email address + + Because of the extreme spam attacks, the author removed all + occurencies of his email address in every file of the groffer + source. + +2003-01-22 Bernd Warken ________________________________________________________________ * release of groffer 0.9.4 @@ -15,11 +988,11 @@ - Test existence of directory before deleting it in the `clean_up' definitions. - Correct help output in `usage' (called by `--help'). - + * TODO: Remove mention of `shoop' and `apropos'. -2002-10-21 Bernd Warken +2002-10-21 Bernd Warken ________________________________________________________________ * release of groffer 0.9.3 @@ -42,8 +1015,8 @@ * TODO: think about... - writing part of groffer in C/C++. - handling several files with different macro packages. - -2002-10-17 Bernd Warken + +2002-10-17 Bernd Warken ________________________________________________________________ * fixes of groffer 0.9.2 @@ -55,12 +1028,12 @@ - New macro ".Header_CB" for CB font in .TP headers; used for definition of variables in option --mode. - Fix some option references to refer to long options. - + * README: New file for general information on the groffer source; it is not installed. - -2002-10-14 Bernd Warken + +2002-10-14 Bernd Warken * Makefile.sub: add replacement "@BINDIR@" to "$(bindir)" for "groffer:" @@ -72,7 +1045,7 @@ * groffer.man: Remove double definition of filespec parameters. -2002-10-13 Bernd Warken +2002-10-13 Bernd Warken ________________________________________________________________ * release of groffer 0.9.2 @@ -94,16 +1067,16 @@ - New macro for file names ".File_name". - "Option Parsing" is moved to section "COMPATIBILITY". - Fix some "EXAMPLES". - -2002-09-30 Bernd Warken + +2002-09-30 Bernd Warken ________________________________________________________________ * release of groffer 0.9.1 - + * TODO: remove done entries - Remove request for different shells. - Remove the 'sed' complaints. -2002-07-15 Bernd Warken +2002-07-15 Bernd Warken * groffer.sh: replace `sed' interface by direct `sed' - This improves the performance of the shell programming parts @@ -127,7 +1100,7 @@ groffer was called from the command line, or with the shell name in the first line of the script, actually `/bin/sh'. -2002-07-12 Bernd Warken +2002-07-12 Bernd Warken ________________________________________________________________ * fixes for groffer 0.9.0 @@ -137,7 +1110,7 @@ - the string `is part of ' - groff's version information (version number and copyright), but not groff's `called subprograms' information. - + * groffer.sh: minor fixes - Fix the argument parser to process argument `-' correctly. - Some display programs have trouble with empty input; feed a @@ -147,7 +1120,7 @@ * TODO: fix entry `shoop' (not 'shopt'). -2002-06-28 Bernd Warken +2002-06-28 Bernd Warken ________________________________________________________________ * release of groffer 0.9.0 @@ -160,25 +1133,25 @@ - New options `--pdf', `--pdf-viewer', `--mode pdf'. - Standard pdf viewers `xpdf' and `acroread'. - For `xpdf', choose zoom `z 3' for 100 dpi, `z 2' for 75 dpi. - + * groffer.sh: support bzip2 decompression - add test for `bzip2' with necessary options - extend functions `catz()' and `save_stdin()'. * TODO remove entry on `bzip' decompression (done). - + * groffer.man: - Document new `pdf' features. - Document new `bzip2' decompression. - Fix documentation for `--auto-modes'. - + * groffer.sh: minor fixes - Improve device tests in `tty' and `dvi' modes. - Internally, map mode `auto' to '' to facilitate tests. - Fix auto mode sequence to: `ps,x,tty' as was intended. -2002-06-25 Bernd Warken +2002-06-25 Bernd Warken * groffer.sh: Fix `source' mode. @@ -186,7 +1159,7 @@ * groffer.man: Fix some indentations. -2002-06-23 Bernd Warken +2002-06-23 Bernd Warken ________________________________________________________________ * release of groffer 0.8 @@ -198,7 +1171,7 @@ - Document the configuration files in new section `FILES'. - Redesign section `EXAMPLES'. - Remove documentation for `-W'. - + * groffer.sh: new debugging features - Disabled by default; enabled by environment variables. - Add landmark() to catch typos with quotes. @@ -210,7 +1183,7 @@ - Actually, the groffer script uses only shell builtins found in `ash' (a subset of POSIX) and POSIX `sed' as the only external shell utility. - + * groffer.sh: customization of viewers - In `groff' mode, the groffer viewing facilities are disabled. - The postprocessor option `-P' costumizes the viewer only in @@ -231,7 +1204,7 @@ -> `--title': set viewer window title. -> `--xrm': set X resource. - Remove misnamed option `--xrdb'. - + * groffer.sh: new mode structure - New Postcript mode `ps' (`--ps'): -> default viewers: gv,ghostview,gs_x11,gs; @@ -256,7 +1229,7 @@ -> automatically active with one of `-V', `-X', `-Z'. - Revise `tty' mode: -> allow several text devices. - -> + -> - Reorganize the mode management: -> new mode setting option `--mode'. -> logically separate source, groff, and display modes. @@ -269,7 +1242,7 @@ - `${HOME}/.groff/groffer.conf' user configuration. - The configuration file are shell scripts for now; later implementations can identify this from the `#! /bin/sh' line. - + * groffer.sh: new data structure `list': - Implement a `list' data structure as a string consisting of single-quoted elements, separated by a space character; @@ -286,18 +1259,18 @@ allow unusual characters in options. - Parse $MANOPT first; translate essential arguments into groffer options. - + * groffer.man: - determine prompt length for `.Shell_cmd'* dynamically. - naming scheme for static strings and registers changed to `namespace:macro.variable'. - + 2002-06-16 Werner Lemberg * groffer.sh: Implement man option `--ascii' by `-mtty-char'. - + 2002-05-31 Werner LEMBERG @@ -305,7 +1278,7 @@ Increase to 4m (we use `sh#' as the prompt). -2002-05-31 Bernd Warken +2002-05-31 Bernd Warken ________________________________________________________________ * release of groffer 0.7 @@ -341,14 +1314,14 @@ - fix TP_header. -2002-05-28 Bernd Warken +2002-05-28 Bernd Warken ________________________________________________________________ * release of groffer 0.6 This is almost a complete rewrite since groffer 0.5 . ________________________________________________________________ * Documentation - + * groffer.man: - Apply the changes done in www.tmac (.URL and .MTO) - Replace \fP by \f[]. @@ -381,7 +1354,7 @@ - The only external programs used are POSIX `sed' and the fallback to `apropos'. All other program calls were replaced by shell builtins and functions. - + ________________________________________________________________ * Cosmetics @@ -433,10 +1406,10 @@ characters in file names). - Fix and complement usage(). - The filespec parsers gets a function of its own do_manpage(). - - -2002-01-08 Bernd Warken - + + +2002-01-08 Bernd Warken + * groffer 0.5 (beta) released * groffer.man: @@ -445,7 +1418,7 @@ - Examples of shell commands now print in font CR instead of CB. - Remove documentation for option `-X'. - Add documentation for option `--dpi'. - + * groffer.sh: - New method for creating temporary files, based on process IDs. This is reliable enough and suitable for GNU and POSIX. @@ -462,15 +1435,15 @@ - Implement option `--dpi' for setting the resolution for the X viewer, which had already been documented in earlier versions. -2002-01-07 Bernd Warken +2002-01-07 Bernd Warken * groffer 0.4 (beta) released (as groff `contrib') - + * groffer.man: - New features documented. - Macros stream-lined. - Section EXAMPLES added. - + * groffer.sh: - System tests added/optimized. - Speed/memory optimizations by defining some shell functions @@ -501,7 +1474,7 @@ * groffer.man (OptDef): Add missing backslashes. Update copyright. -2001-12-15 Bernd Warken +2001-12-15 Bernd Warken * groffer 0.3 (alpha) released (still stand-alone package). @@ -519,20 +1492,20 @@ * Recognize the following filespecs as man-page parameters: man:name(section), man:name, name.section, name. - -2001-12-03 Bernd Warken + +2001-12-03 Bernd Warken * Stand-alone package for groffer 0.2 (alpha) created Files: groffer, groffer.man, Makefile, TODO, ChangeLog - -2001-12-02 Bernd Warken + +2001-12-02 Bernd Warken * groffer 0.2 (alpha) program released. * Name changed from `groffview' to `groffer'. * Comments added. - + * Name changed from `groffview' to `groffer'. * Options harmonized with groff. @@ -544,14 +1517,30 @@ * Bugs with temporary files fixed. * Code restructured and comments added. - -2001-11-28 Bernd Warken + +2001-11-28 Bernd Warken ***** groffview 0.1 (experimental) and groffview.man released (predecessor of groffer, shell script) * Options : -h --help, -v --version - + * Search for man-pages based on $MANPATH * development of `groffview' shell script started + +2001-11-28 Bernd Warken + + ________________________________________________________________ + License + + Copyright (C) 2001,2002,2003,2004,2005 + Free Software Foundation, Inc. + Written by Bernd Warken + + Copying and distribution of this file, with or without + modification, are permitted provided the copyright notice and this + notice are preserved. + + This file is part of `groffer', which is part of the `groff' + project. diff --git a/contrib/groff/contrib/groffer/Makefile.sub b/contrib/groff/contrib/groffer/Makefile.sub index 333dedbd4533..54dfce40933b 100644 --- a/contrib/groff/contrib/groffer/Makefile.sub +++ b/contrib/groff/contrib/groffer/Makefile.sub @@ -1,47 +1,60 @@ -# Makefile.sub for `groffer' (integration into the groff source tree) +# Makefile.sub for `groffer' (integration into the `groff' source tree) # File position: /contrib/groffer/Makefile.sub -# Last update: 21 October 2002 +# Copyright (C) 2001,2002,2005 Free Software Foundation, Inc. +# Written by Werner Lemberg and Bernd Warken. -# Copyright (C) 2001,2002 Free Software Foundation, Inc. -# Written by Werner Lemberg +# Last update: 15 August 2005 -# This file is part of groff. +# This file is part of `groffer' which is part of `groff'. -# 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 file COPYING. If not, write to the -# Free Software Foundation, 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA. +# 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. ######################################################################## MAN1=groffer.n CLEANADD=groffer +# not all make programs have $(RM) predefined. +RM=rm -f + all: groffer -groffer: groffer.sh - rm -f $@; \ - sed -e "s|@BINDIR@|$(bindir)|g" \ +groffer: groffer.sh groffer2.sh $(SH_DEPS_SED_SCRIPT) + $(RM) $@; + sed -f $(SH_DEPS_SED_SCRIPT) \ + -e "s|@g@|$(g)|g" \ + -e "s|@BINDIR@|$(bindir)|g" \ + -e "s|@libdir@|$(libdir)|g" \ -e "s|@VERSION@|$(version)$(revision)|g" \ - -e $(SH_SCRIPT_SED_CMD) $(srcdir)/groffer.sh >$@; \ + -e $(SH_SCRIPT_SED_CMD) $(srcdir)/groffer.sh >$@; chmod +x $@ install_data: groffer -test -d $(bindir) || $(mkinstalldirs) $(bindir) - -rm -f $(bindir)/groffer + -$(RM) $(bindir)/groffer $(INSTALL_SCRIPT) groffer $(bindir)/groffer + -test -d $(libdir)/groff/groffer || \ + $(mkinstalldirs) $(libdir)/groff/groffer + -$(RM) $(libdir)/groff/groffer/groffer2.sh + $(INSTALL_SCRIPT) $(srcdir)/groffer2.sh \ + $(libdir)/groff/groffer/groffer2.sh uninstall_sub: - -rm -f $(bindir)/groffer + -$(RM) $(bindir)/groffer + -$(RM) $(libdir)/groff/groffer/groffer2.sh + -rmdir $(libdir)/groff/groffer diff --git a/contrib/groff/contrib/groffer/README b/contrib/groff/contrib/groffer/README index 413f49f0c2d2..66d36123e62b 100644 --- a/contrib/groff/contrib/groffer/README +++ b/contrib/groff/contrib/groffer/README @@ -1,23 +1,104 @@ -The `groffer' program is the easiest way to read `groff' documents. -All input is sent to `grog' and then to `groff' such that no special -`groff' arguments must be determined. +README -`groffer' also has many built-in `man' functionalities to find and -read the manual pages on UNIX and similar operating systems. It -accepts the information from an installed `man' program, but tries to -find a man path by itself if there isn't any. +The `groffer' program is the easiest way to read documents written in +some `roff' language, such as the `man pages', the manual pages in +many operating systems. -So far, `groffer' is a shell script. It should run on any POSIX or -Bourne style shell, but it runs the fastest if the `ash' shell is -installed on the system. This shell is found out and started -automatically. There are efforts to port part of the shell script to -C/C++ to increase the speed independent of the shell. + +Input + +Input comes from either standard input or command line parameters that +represent names of exisiting roff files or standardized specifications +for searching man pages. All of these can be compressed in a format +that is decompressible by `gzip', including `.gz', `bz2', and `.Z'. + +`groffer' has many built-in `man' functionalities to find and read the +manual pages on UNIX and similar operating systems. It accepts the +information from an installed `man' program, but tries to find a man +path by itself. + +`groffer' bundles all filespec parameters into a single output file in +the same way as `groff'. The disadvantage of this is that all file +name arguments must use the same groff language. To change this, the +option parsing must be revised for large parts. It seems that this +would create incompatibilities, so the actual option strategy is kept. + + +Output + +All input is first sent to `grog' to determine the necessary `groff' +options and then to `groff'. So no special `groff' arguments must be +given. But all `groff' options can be specified when this seems to be +appropriate. + +The following displaying modes for the output are available: +- Display formatted input with +-- the X `roff' viewer `gxditview', +-- a Postcript viewer, +-- a PDF viewer, +-- a DVI viewer, +-- a web browser, +-- a pager in a text terminal (tty). +- Generate `groff' output on stdout without a viewer. +- Generate the `groff intermediate output' on standard output without + postprocessing. +- Output the source code without any `groff' processing. +- There are some information outputs without `groff' processing, such + as by option `-V' and the `man' like `whatis' and `apropos' + outputs. + +By default, the program tries to display with `gxditview' as graphical +device in X; on non-X text terminals, the `tty' text mode with a pager +is tried by default. + + +Compatibility + +`groffer' consists of two shell scripts. It should run on any POSIX +or Bourne style shell that supports shell functions. See file +`README_SH' for more information. + + +Mailing lists For reporting bugs of `groffer', groff's free mailing list - can be used. For a general discussion, the - is more useful; see the `README' file in the top -directory of the `groff' source package for more details on this -mailing list. + can be used. -`groffer' is a `groff contrib' project that was written by Bernd -Warken . +For a general discussion, the mailing list is more +useful, but one has to subscribe to this list at +http://lists.gnu.org/mailman/listinfo/groff. + +See the `README' file in the top directory of the `groff' source +package for more details on these mailing lists. + + +####### License + +Last update: 2 August 2005 + +Copyright (C) 2003,2004,2005 Free Software Foundation, Inc. +Written by Bernd Warken + +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. + + +####### Emacs settings + +Local Variables: +mode: text +End: diff --git a/contrib/groff/contrib/groffer/README_SH b/contrib/groff/contrib/groffer/README_SH new file mode 100644 index 000000000000..05d085e5cb0e --- /dev/null +++ b/contrib/groff/contrib/groffer/README_SH @@ -0,0 +1,268 @@ +Additional description for the shell version of `groffer' + + +Scripts + +The shell version of `groffer' contains two files, `groffer.sh' and +`groffer2.sh'. + +`groffer.sh' is a short introductory script without any functions. I +can be run with a very poor Bourne shell. It just contains some basic +variables, the reading of the configuration files, and the +determination of the shell for `groffer2.sh'. This script is +transformed by `make' into `groffer' which will be installed into +@bindir@, which is usually /usr/local/bin. + +`groffer2.sh' is a long main script with all functions; it is called +by `groffer.sh' (`groffer' after installation). It is installed +unchanged into @libdir@/groff/groffer, which is usually +/usr/local/lib/groff/groffer. This script can be called with a +different shell, using the `groffer' option `--shell'. + + +Options + +The `groffer' script provides its own option parser. It is compatible +to the usual GNU style command line This includes long option names +with two signs such as `--option', clusters of short options, the +mixing of options and non-option file names, the option `--' to close +the option handling, and it is possible to abbreviate the long option +names. + +The flexible mixing of options and file names in GNU style is always +possible, even if the environment variable `$POSIXLY_CORRECT' is set +to a non-empty value. This disables the rather wicked POSIX behavior +to terminate option parsing when the first non-option command line +argument is found. + + +Error Handling + +Error handling and exit behavior is complicated by the fact that +`exit' can only escape from the current shell; trouble occurs in +subshells. This was solved by sending kill signals, see $_PROCESS_ID +and error(). + + +Function Definitions in `groffer2.sh' + +Each funtion in groffer2.sh has a description that starts with the +function name and symbols for its arguments in paranthesis `()'. Each +`<>' construction gives an argument name that just gives a hint on +what the argument is meant to be; these argument names are otherwise +irrelevant. The `>' sign can be followed by another character that +shows how many of these arguments are possible. + + exactly 1 of this argument +? 0 or 1 of these arguments +* arbitrarily many such arguments, incl. none ++ one or more such arguments +... one or more such arguments +[...] optional arguments + +A function that starts with an underscore `_' is an internal function +for some other function. The internal functions are defined just +after their corresponding function. + + +External Environment Variables + +The groffer.sh script uses the following external system variables. +It is supposed that these variables are already exported outside of +groffer.sh; otherwise they do not have a value within the script. + +external system environment variables that are explicitly used +$DISPLAY: Presets the X display. +$LANG: For language specific man pages. +$LC_ALL: For language specific man pages. +$LC_MESSAGES: For language specific man pages. +$PAGER: Paging program for tty mode. +$PATH: Path for the programs called (`:' separated list). + +groffer native environment variables +$GROFFER_OPT preset options for groffer. + +all groff environment variables are used, see groff(1) +$GROFF_BIN_PATH: Path for all groff programs. +$GROFF_COMMAND_PREFIX: '' (normally) or 'g' (several troffs). +$GROFF_FONT_PATH: Path to non-default groff fonts. +$GROFF_TMAC_PATH: Path to non-default groff macro files. +$GROFF_TMPDIR: Directory for groff temporary files. +$GROFF_TYPESETTER: Preset default device. + +all GNU man environment variables are used, see man(1). +$MANOPT: Preset options for man pages. +$MANPATH: Search path for man pages (: list). +$MANROFFSEQ: Ignored because of grog guessing. +$MANSECT: Search man pages only in sections (:). +$SYSTEM: Man pages for different OS's (, list). + + +Object-oriented Functions + +The groffer script provides an object-oriented construction (OOP). In +object-oriented terminology, a type of object is called a `class'; a +function that handles objects from a class is named `method'. + +In the groffer script, the object is a variable name whose content is +the object's data. Methods are functions that have an object as first +argument. + +The basic functions for object handling are obj_*(). + +The class `list' represents an array structure, see list_*(). + + +Shell Compatibility + +The `groffer' shell scripts are compatible to both the GNU and the +POSIX shell and utilities. Care was taken to restrict the programming +technics used here in order to achieve POSIX compatibility as far back +as POSIX P1003.2 Draft 11.2 of September 1991. This draft is +available at http://www.funet.fi/pub/doc/posix/p1003.2/d11.2 in the +internet. + +The POSIX draft does not include `local' variables for functions. So +this concept was replaced by global variables with a prefix that +differs for each function. The prefix is chosen from the function +name. These quasi-local variables are unset before each return of the +function. + +The `groffer' scripts were tested under the shells `ash', `bash', +`bash-minimal', `dash', 'ksh', `mksh', `pdksh', 'posh', and `zsh' +without problems in Linux Debian. A shell can be tested by the +`groffer' option `--shell', but that will run only with groffer2.sh. +To start it directly from the beginning under this shell the following +command can be used. + + groffer.sh --shell= ... + + +Some shells are not fully POSIX compatible. For them the following +restrictions were done. For more information look at the +documentation `Portable shells' in the `info' page of `autoconf' +(look-up in Emacs-Help-Manuals_Info). + +- The command parts `then', `else', and `do' must be written each on a + line of their own. + +- Replace `for i in "$@"' by `for i' and remove internal `;' (kah). + +- Replace `set -- ...' by `set x ...; shift'. After the first + non-option argument, all arguments including those starting with `-' + are accepted as non-option. For variables or `$()' constructs with + line-breaks, use `eval set' without quotes. That transforms a + line-break within a variable to a space. + +- The name of the variable in `for' is chosen as a single character + (old ash). The content of such variables is not safe because it can + also occur in other functions. So it is often stored in an + additional quasi-local variable. + +- `echo' is not portable on options; some `echo' commands have many + options, others have none. So `echo -n' cannot be used, such that + the output of each function has complete lines. There are two + methods to avoid having `-' as the first character of any argument. + Either a character such as `x' can be prepended to the argument; + this must later on be removed by `sed'. Otherwise, `echo' can be + replaced by `cat </contrib/groffer/TODO +File position: /contrib/groffer/TODO -# Last update: 22 Jan 2003 -# Copyright (C) 2001,2002,2003 Free Software Foundation, Inc. -# Written by Bernd Warken - -# 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. - -######################################################################## - -TODO - -Optimization: -- Optimize man path determination in manpath_add_lang_sys() for speed - by building-up the man path only by and by as far as necessary - (not trivial). -- To increase the running speed write part of the groffer shell script - in C/C++. - -Features: -- Revise option handling of `grog'. -- `gxditview' needs a complete shower. +####### TODO Revision: -- Should there be a native implementation for `--apropos'? -- Revise the `--all' feature to better reflect GNU man. -- The debug function stack is buggy (no effect on normal operation). -- The actual `groff' and `grog' do not support file arguments each -of which has a different macro package (except `man' and `doc'). So -`roffer' should create several display files for such arguments. + +Optimization: +- Optimize `man' path determination in manpath_add_lang_sys() for speed + by building-up the `man' path only by and by as far as necessary + (not trivial). +- To increase the running speed write part of the `groffer' shell + script in C/C++. + +Features of external programs: +- Revise option handling of `grog'. Documentation: -- Improve the documentation of the search algorithm for man pages in - both the groffer script and the man page `groffer.man'. -- In `groff.man', add more documentation for parts that were taken over - from GNU `man'. +- Improve the documentation of the search algorithm for `man' pages in + both the `groffer' scripts and the `man' page `groffer.man'. +- In `groffer.man', add more documentation for parts that were taken + over from GNU `man'. - The documentation in the headers for some function definitions in - `groffer.sh' needs to be updated. + `groffer2.sh' needs to be updated. + + +####### License + +Last update: 16 August 2005 + +Copyright (C) 2003,2004,2005 Free Software Foundation, Inc. +Written by Bernd Warken + +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. + + +####### Emacs settings + +Local Variables: +mode: text +End: diff --git a/contrib/groff/contrib/groffer/groffer.man b/contrib/groff/contrib/groffer/groffer.man index da6a53250eb4..80177d6c26e9 100644 --- a/contrib/groff/contrib/groffer/groffer.man +++ b/contrib/groff/contrib/groffer/groffer.man @@ -15,22 +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.2 -Last update : 13 Oct 2002 +Last update: 22 August 2005 -This file is part of groff, the GNU roff type-setting system. - -Copyright (C) 2001, 2002 Free Software Foundation, Inc. -Written by Bernd Warken - -Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.1 or -any later version published by the Free Software Foundation; with the -Invariant Sections being this .ig-section and AUTHORS, with no -Front-Cover Texts, and with no Back-Cover Texts. - -A copy of the Free Documentation License is included as a file called -FDL in the main directory of the groff source package. +Source file position: /contrib/groffer/groffer.man +.. +.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 .. . .\" -------------------------------------------------------------------- @@ -50,15 +79,6 @@ FDL in the main directory of the groff source package. . 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 ".\|.\|.\"" . .\" -------------------------------------------------------------------- @@ -180,7 +200,7 @@ FDL in the main directory of the groff source package. .c -------------------------------------------------------------------- .c .Opt_- ([]) .c -.c Print `-' (minus sign); optional punctuation. +.c Print `-' (minus sign); optional punctuation. .c .de Opt_- . ie (\\n[.$] == 0) \ @@ -191,7 +211,7 @@ FDL in the main directory of the groff source package. .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) \ @@ -202,7 +222,7 @@ FDL in the main directory of the groff source package. .c -------------------------------------------------------------------- .c .Opt_-- ([]) .c -.c Print `--' (double minus); optional punctuation. +.c Print `--' (double minus); optional punctuation. .c .de Opt_-- . ie (\\n[.$] == 0) \ @@ -213,7 +233,7 @@ FDL in the main directory of the groff source package. .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) \ @@ -276,8 +296,8 @@ FDL in the main directory of the groff source package. .c Alternating options; base macro for many others; do not use directly. .c .c Arguments: -.c
: prefix, resulted is preceded by this.
-.c   : separator between minux/opt pairs.
+.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).
 .c   : a name for an option, empty allowed (font CB).
@@ -286,7 +306,8 @@ FDL in the main directory of the groff source package.
 .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]\"
@@ -306,24 +327,29 @@ FDL in the main directory of the groff source package.
 .    \}
 .    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) \
 .    Error .\\0: wrong arguments: \\$@
-.  c                                     all pairs are done
+.  c                                    all pairs are done
 .  ie (\\n[.$] == 0) \
 .    as @res \f[CR]\\*[@post]\"
 .  el \{\
-.    c                                   optional option argument
+.    c                                  optional option argument
 .    if !'\\$1'' \
 .      as @res \f[CR] \,\f[I]\\$1\"
 .    shift
-.    as @res \\f[CR]\\*[@post]\"         postfix
+.    c                                  postfix
+.    as @res \\f[CR]\\*[@post]\"
 .    if (\\n[.$] >= 1) \{\
-.      c                                 add punctuation
+.      c                                add punctuation
 .      as @res \f[\\n[@font]]\\$1\"
 .    \}
 .  \}
@@ -399,6 +425,14 @@ FDL in the main directory of the groff source package.
 .  Opt_alt -- "\\$1" "" "\\$2"
 ..
 .c --------------------------------------------------------------------
+.c .Opt_long_arg  ([  []])
+.c
+.c Print `--name=arg' somewhere in the text; optional punctuation.
+.c
+.de Opt_long_arg
+.  Opt_alt -- "\\$1=\\$2" "" "\\$3"
+..
+.c --------------------------------------------------------------------
 .c .Opt_[long]  ([ []])
 .c
 .c Print `--name' somewhere in the text; optional punctuation.
@@ -536,7 +570,9 @@ FDL in the main directory of the groff source package.
 .de Text
 .  if (\\n[.$] == 0) \
 .    return
+.  nh
 .  nop \)\\$*\)
+.  hy
 ..
 .c --------------------------------------------------------------------
 .c .Topic  ([])
@@ -629,10 +665,9 @@ FDL in the main directory of the groff source package.
 .
 .ad l
 .Synopsis groffer
-.RI [ groffer_options ]
-.RI [ groff_options ]
+.RI [ option... ]
 .Opt_[--]
-.RI [ "filespec" "\*[Ellipsis]]"
+.RI [ "\%filespec" "\*[Ellipsis]]"
 ./Synopsis
 .
 .Synopsis groffer
@@ -649,62 +684,106 @@ FDL in the main directory of the groff source package.
 .\" --------------------------------------------------------------------
 .
 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.
 .
-These can be stored in a configuration file.
+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 .
+.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.
+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 options that must be named when running
-.I groff
-are determined automatically because
-.I groffer
-internally calls the
-.BR grog (@MAN1EXT@)
+Most of the options that must be named when running
+.B \%groff
+directly are determined automatically for
+.BR \%groffer ,
+due to the internal usage of the
+.BR \%grog (@MAN1EXT@)
 program.
 .
-But all parts can be controlled manually by supplying options.
+But all parts can also be controlled manually by arguments.
+.
+.
+.P
+Several file names can be specified on the command line arguments.
+.
+They are transformed into a single document in the normal way of
+.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.
 .
 .
 .\" --------------------------------------------------------------------
@@ -712,173 +791,136 @@ But all parts can be controlled manually by supplying options.
 .\" --------------------------------------------------------------------
 .
 .TP
-.I groffer_options
-The following options determine and configure the display mode.
-.
-They were synchronized with the options of both
-.BR groff (@MAN1EXT@)
-and GNU
-.BR man (1).
-.
-If none of these options is used groffer tries to find a suitable
-display mode automatically.
-.
-.
+.I breaking options
 .RS
-.
 .P
-.Opt_[alt] - Q -- source
-.Opt_[alt] - T -- device device
-.Opt_[alt] -- auto-modes mode1,mode2,\*[Ellipsis]
-.Opt_[alt] -- debug
+.Opt_[alt] - h -- help
+.Opt_[alt] - v -- version
+.RE
+.
+.
+.TP
+.I \%groffer mode options
+.RS
+.P
+.Opt_[alt] -- auto
 .Opt_[alt] -- default
+.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] -- location
+.Opt_[alt] -- html
+.Opt_[alt] -- html\-viewer prog
+.Opt_[alt] -- html\-viewer\-tty prog
 .Opt_[alt] -- mode display_mode
-.Opt_[alt] -- pager program
 .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] -- shell
+.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\-tty prog
 .Opt_[alt] -- www
-.Opt_[alt] -- www-viewer prog
-.Opt_[alt] -- x
-.Opt_[alt] -- x-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\-tty -- X\-viewer\-tty prog
+.RE
 .
 .
+.TP
+.I development options
+.RS
 .P
-The following long options were adapted from the corresponding X
-Toolkit options.
-.
-Their single leading minus in X Toolkit was changed to a double minus
-for long options; see
-.BR X (1).
+.Opt_[alt] -- debug
+.Opt_[alt] -- do\-nothing
+.Opt_[alt] -- shell prog
+.Opt_[alt] - Q -- source
+.Opt_[alt] - V
+.RE
 .
 .
+.TP
+.I options related to \%groff
+.RS
 .P
-.Opt_[alt] -- bd
-.Opt_[alt] -- bg -- background
-.Opt_[alt] -- bw
-.Opt_[alt] -- display
-.Opt_[alt] -- fg -- foreground
-.Opt_[alt] -- ft -- font
-.Opt_[alt] -- geometry size_pos
-.Opt_[alt] -- resolution value
-.Opt_[alt] -- rv
-.Opt_[alt] -- title string
-.Opt_[alt] -- xrm X_resource
-.
-.
+.Opt_[alt] - T -- device device
+.Opt_[alt] - Z -- intermediate\-output -- ditroff
 .P
-The following long options regulate whether and how
-.I man\~pages
-(UNIX manual pages) are searched.
-.
-They were constructed for
-.IR groffer ,
-but they are compatible with the long options of the
-.I GNU man
-program.
+All further
+.B \%groff
+short options are accepted.
+.RE
 .
 .
+.TP
+.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 long options taken over from GNU man
+.RS
 .P
 .Opt_[alt] -- all
 .Opt_[alt] -- ascii
-.Opt_[alt] -- apropos
 .Opt_[alt] -- ditroff
 .Opt_[alt] -- extension suffix
 .Opt_[alt] -- locale language
 .Opt_[alt] -- local-file
-.Opt_[alt] -- man
 .Opt_[alt] -- manpath dir1:dir2:\*[Ellipsis]
-.Opt_[alt] -- no-location
-.Opt_[alt] -- no-man
+.Opt_[alt] -- pager program
 .Opt_[alt] -- sections sec1:sec2:\*[Ellipsis]
 .Opt_[alt] -- systems sys1,sys2,\*[Ellipsis]
 .Opt_[alt] -- troff-device device
-.Opt_[alt] -- whatis
-.
-.
 .P
-The GNU
-.I man
-long options that are not mentioned are recognized, but they are just
-ignored because of alternative implementations.
-.
-The full set of long and short options of the GNU man program can be
-passed via the environment variable
-.Env_var $MANOPT ;
-see
-.BR man (1)
-if your system has GNU man installed.
-.
+Further long options of \f[CR]GNU\f[]
+.B man
+are accepted as well.
 .RE
 .
 .
 .TP
-.I groff_options
-Any combination of (short) options from the
-.BR groff (@MAN1EXT@)
-program is accepted; the options that are not explicitly handled by
-groffer are transparently passed to groff.
-.
-Due to the automatism in groffer, none of these groff options should
-be necessary, except for advanced usage.
-.
-.
+.I X Window Toolkit options
 .RS
-.
 .P
-Because of the special outputting behavior of the groff options
-.Opt_short V,
-.Opt_short X,
-and
-.Opt_short Z,
-groffer was designed to be switched into
-.I groff
-mode by each of these options; in this mode, the groffer viewing
-features are disabled.
-.
-.P
-The other groff options do not switch the mode, but allow to customize
-the formatting process.
-.
-Useful groff formatting options include
-.Opt_short m
-(to add macro files that cannot be recognized by grog), and
-.Opt_short T
-(to specify an alternative device for the modes
-.I tty
-and
-.IR x ).
-.
+.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
-is one or more file names or templates for searching
-man\~pages, see
-.BR man (1).
-Each
-.I filespec
-can have one of the following forms.
-.
-.
+.I \%filespec arguments
 .RS
-.
 .P
 No
-.I filespec
+.I \%filespec
 parameters means standard input.
 .
 .
 .TP 10m
-.Opt_short
+.Opt_short ""
 stands for standard input (can occur several times).
 .
 .
@@ -888,377 +930,256 @@ the path name of an existing file.
 .
 .
 .TP
-.I name
-if 
-.I name
-is not an existing file search for the man\~page called in the lowest
-man\~section that has a document for this name.
-.
-.
-.TP
-.BI man: name
-search for a man\~page in the lowest man\~section that has a document
-called
-.IR name .
-.
-.
-.TP
-.BI man: name . section
-.TP+
 .BI man: name ( section )
 .TP+
 .IB name ( section )
-.TP+
-.IB name . section
-each of these search the man\~page
-.I name
-in man\~section\~\c
+search the \%man\~page
+.I \%name
+in \%man\~section
 .IR section .
 .
 .
 .TP
-.I "std_section name"
-two arguments like in the
-.BR man (1)
-program to find man\~page
+.BI man: name . s
+.TP+
+.IB name . s
+if
+.I s
+is a character in
+.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 .
+.
+.
+.TP
+.I "s name"
+if
+.I s
+is a character in
+.BR \%[1-9on] ,
+search for a \%man\~page
+.I \%name
+in \%man\~section
+.IR s .
+.
+.
+.TP
 .I name
-in man\~section
-.IR std_section .
-.
-In
-.IR groffer ,
-the argument
-.I std_section
-is a standard section name for man\~pages; these are a digit `1',
-\&\*[Ellipsis], `9', or the single letters `o' or `n'.
-.
-This should be used only with care.
+if
+.I \%name
+is not an existing file search for the man\~page
+.I \%name
+in the lowest man\~section.
 .
 .RE
 .
 .
 .\" --------------------------------------------------------------------
-.SH "GROFFER OPTIONS"
+.SH "OPTION DETAILS"
 .\" --------------------------------------------------------------------
 .
-All short options of
-.I groffer
-are compatible with the short options of
-.BR groff (@MAN1EXT@).
+The
+.B \%groffer
+program can usually be run with very few options.
 .
-Some of the
-.I groff
-options were given a special meaning within
-.IR groffer .
+But for special purposes, it supports many options.
 .
-All other
-.I groff
-options are supported by
-.IR groffer ,
-but they are just transparently transferred to
-.I groff
-without any intervention.
-.
-Therefore these transparent options are not documented here, but in
-.BR groff (@MAN1EXT@).
+These can be classified in 5 option classes.
 .
 .
 .P
+All short options of
+.B \%groffer
+are compatible with the short options of
+.BR \%groff (@MAN1EXT@).
+.
 All long options of
-.I groffer
+.B \%groffer
 are compatible with the long options of
-.BR man (1).
-.
-Most of the
-.I man
-long options were implemented as native options into
-.IR groffer .
-.
-These options are documented in the following; the other
-.I man
-options are recognized, but ignored.
+.BR \%man (1).
 .
 .
-.Opt_def - h
-Print usage message to standard error and exit.
+.\" --------------------------------------------------------------------
+.SS "groffer breaking Options"
+.\" --------------------------------------------------------------------
+.
+As soon as one of these options is found on the command line it is
+executed, printed to standard output, and the running
+.B \%groffer
+is terminated thereafter.
+.
+All other arguments are ignored.
 .
 .
-.Opt_def - Q
-Output the roff source code of the input files unprocessed.
-.
-This is the equivalent
-.Opt_long mode\~source .
+.Opt_def - h -- help
+Print a helping information with a short explanation of option sto
+standard output.
 .
 .
-.Opt_def - T devname
-Switch to
-.Opt_long mode
-.IR devname .
+.Opt_def - v -- version
+Print version information to standard output.
 .
-The input is formatted and postprocessed using plain
-.I groff
+.
+.\" --------------------------------------------------------------------
+.SS "groffer Mode Options"
+.\" --------------------------------------------------------------------
+.
+The display mode and the viewer programs are determined by these
+options.
+.
+If none of these mode and viewer options is specified
+.B \%groffer
+tries to find a suitable display mode automatically.
+.
+The default modes are
+.I mode x
 with
-.I devname
-as the output device.
-.
-The allowed device names are listed in
-.BR groff (@MAN1EXT@).
-.
-Note that this forces all device names that begin with the letter
-.I X
-to be displayed with
-.BR gxditview (@MAN1EXT@);
-all other device names generate output for the specified device; this
-is printed onto standard output without a pager.
+.B gxditview
+in \%\f[CR]X\~Window\f[] and
+.I mode tty
+with device
+.I latin1
+under
+.B less
+on a terminal.
 .
 .
-.Opt_def - v
-Print version information onto standard error.
+.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 .
 .
 .
-.Opt_def - V
-Switch into
-.I groff
-mode and format the input with groff option
-.Opt_short V ;
-this produces the groff calling pipe without formatting the input.
+.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.
 .
-This an advanced option from
-.BR groff (@MAN1EXT@) ,
-only useful for debugging.
+So you really need
+.Opt_long *\-viewer\-tty
+for viewers that run on tty.
 .
 .
-.Opt_def - X
-Switch into
-.I groff
-mode and format the input with groff option
-.Opt_short X ;
-actually, this formats the input and displays it with
-.BR gxditview (@MAN1EXT@) .
-.
-This differs from groffer's mode
-.I x
-because groffer's viewer options are not used, but the viewer is
-configured like in groff with the groff option
-.Opt_short P .
-This option is inhereted from
-.BR groff (@MAN1EXT@) .
-.
-.
-.Opt_def - Z
-Switch into
-.I groff
-mode and format the input with groff option
-.Opt_short Z ;
-this produces the groff intermediate output without postprocessing; see
-.BR groff_out (@MAN1EXT@) .
-This an advanced option from
-.BR groff (@MAN1EXT@) ,
-useful for debugging.
-.
-.
-.Opt_def -- all
-In searching man pages, retrieve all suitable ones instead of only one.
-.
-.
-.Opt_def -- apropos
-Instead of displaying, start the `apropos' command for searching
-within man page descriptions; only kept for compatibility with `man'.
-.
-.
-.Opt_def -- auto-modes mode1,mode2,\*[Ellipsis]
-Set the sequence of modes for default mode to the comma separated list
-given in the argument.
-.
-.
-.Opt_def -- background color
-This is equivalent to
-.Opt_long bg .
-.
-.
-.Opt_def -- bd pixels
-Specifies the color of the border surrounding the viewer
-window.
-.
-This is an adaption of the X Toolkit option
-.Opt_short bd .
-.
-The argument is an X color name, see
-.BR (1)
-for details.
-.
-.
-.Opt_def -- bg color
-Set the background color of the viewer window.
-.
-This is an adaption of the X Toolkit option
-.Opt_short bg .
-.
-The argument is an X color name, see
-.BR (1)
-for details.
-.
-.
-.Opt_def -- bw pixels
-Specifies the width in pixels of the border surrounding the viewer
-window (not available for all viewers).
-.
-This is an adaption of the X Toolkit option
-.Opt_short bw .
-.
-.
-.Opt_def -- debug
-Print debugging information.
-.
-Actually, a function call stack is printed if an error occurs.
+.Opt_def -- auto
+Equivalent to
+.Opt_long_arg mode auto .
 .
 .
 .Opt_def -- default
 Reset all configuration from previously processed command line options
 to the default values.
 .
-This is useful to wipe out all effects of former options and restart
-option processing using only the rest of the command line.
+This is useful to wipe out all former options of the configuration, in
+.Env_var $GROFFER_OPT ,
+and restart option processing using only the rest of the command line.
 .
 .
-.Opt_def -- device
-Eqivalent to
-.Opt_short T .
+.Opt_def -- default\-modes mode1,mode2,\*[Ellipsis]
+Set the sequence of modes for
+.I \%auto\~mode
+to the comma separated list given in the argument.
 .
+See
+.Opt_long mode
+for details on modes.  Display in the default manner; actually, this
+means to try the modes
+.IR x ,
+.IR ps ,
+and
+.I \%tty
+in this sequence.
 .
-.Opt_def -- display X-display
-Set the X display on which the viewer program shall be started, see
-.BR X (1)
-for the syntax of the argument.
-.
-.
-.Opt_def -- ditroff
-Eqivalent to
-.Opt_short Z .
-This is kept for compatibiliy with GNU
-.BR man (1).
 .
 .
 .Opt_def -- dvi
-Choose dvi mode; the formatted input is displayed with the  
-by default, the formatted input is displayed with the
-.BR xdvi (1)
-program.
+Equivalent to
+.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 -- extension suffix
-Restrict man\~page search to file names that have
-.I suffix
-appended to their section element.
+.Opt_def -- dvi\-viewer\-tty prog
+Choose a program running on the terminal for viewing the output of
+.IR \%dvi\~mode .
 .
-For example, in the file name
-.I /usr/share/man/man3/terminfo.3ncurses.gz
-the man\~page extension is
-.IR ncurses .
-.
-Originates from GNU
-.IR man .
-.
-.
-.Opt_def -- foreground color
-This is equivalent to
-.Opt_long fg .
-.
-.
-.Opt_def -- fg color
-Set the foreground color of the viewer window.
-.
-This is an adaption of the X Toolkit option
-.Opt_long bg .
-.
-The argument is an X color name, see
-.BR (1)
-for details.
-.
-.
-.Opt_def -- font font_name
-This is equivalent to
-.Opt_long ft .
-.
-.
-.Opt_def -- ft font_name
-Set the font used by the viewer window.
-.
-This is an adaption of the X Toolkit option
-.Opt_short ft .
-.
-The argument is an X font name, see
-.BR (1)
-for details.
-.
-.
-.Opt_def -- geometry size_pos
-Set the geometry of the display window, that means its size and its
-starting position.
-.
-See
-.BR X (1)
-for details on the syntax of the argument.
-.
-If the actual display mode is not X then this option is ignored.
+This can be a file name or a program to be searched in
+.Env_var $PATH ;
+arguments can be provided additionally.
 .
 .
 .Opt_def -- groff
-Set
-.I groff
-mode.
-.
-Switch groffer to process the input like
-.BR groff (@MAN1EXT@).
-.
-This disables the groffer viewing features, all groffer viewing
-options are ignored.
+Equivalent to
+.Opt_long_arg mode groff .
 .
 .
-.Opt_def -- help
-Eqivalent to
-.Opt_short h .
+.Opt_def -- html
+Equivalent to
+.Opt_long_arg mode html .
 .
 .
-.Opt_def -- location
-Print the location of the retrieved files to standard error.
+.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 -- locale language
+.Opt_def -- html\-viewer\-tty
+Choose a terminal program for viewing the output of
+.I \%html\~mode .
 .
-Set the language for man pages.
-.
-This option originates from GNU
-.BR man (1).
-.
-.
-.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 if it is an existing file.
-.
-.
-.Opt_def -- manpath "'dir1:dir2:\*[Ellipsis]'"
-Use the specified search path for retrieving man\~pages instead of the
-program defaults.
-.
-If the argument is set to the empty string "" the search for man\~page
-is disabled.
+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
@@ -1267,66 +1188,173 @@ Set the display mode.
 .
 The following mode values are recognized:
 .
-.
 .RS
 .
-.
 .TP
 .Header_CB auto
-Display in the default manner; this actually means to try the modes
-.IR ps ,
-.IR x ,
-and
-.I tty
-in this sequence.
+Select the automatic determination of the display mode.
 .
-Useful for restoring default mode when a different mode was specified
-with
-.Env_var $GROFFER_OPT .
+The sequence of modes that are tried can be set with the
+.Opt_long default\-modes
+option.
+.
+Useful for restoring the
+.I \%default\~mode
+when a different mode was specified before.
 .
 .
 .TP
 .Header_CB dvi
-Display formatted input in a dvi viewer program; equivalent to
+Display formatted input in a
+.I \%dvi
+viewer program.
+.
+By default, the formatted input is displayed with the
+.BR \%xdvi (1)
+program.
 .Opt_long dvi .
 .
 .
 .TP
+.Header_CB groff
+After the file determination, switch
+.B \%groffer
+to process the input like
+.BR \%groff (@MAN1EXT@)
+would do.
+.
+This disables the
+.I \%groffer
+viewing features.
+.
+.
+.TP
+.Header_CB html
+Translate the input into html format and display the result in a web
+browser program.
+.
+By default, the existence of a sequence of standard web browsers is
+tested, starting with
+.BR \%konqueror (1)
+and
+.BR \%mozilla (1).
+The text html viewer is
+.BR \%lynx (1).
+.
+.
+.TP
 .Header_CB pdf
-Display formatted input in a PDF (Portable Document Format) viewer
-program; equivalent to
-.Opt_long pdf .
+Display formatted input in a
+.I \%PDF
+(Portable Document Format) viewer
+program.
+.
+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)
+or the
+.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
+.I \%auto\~mode .
 .
 .
 .TP
 .Header_CB ps
-Display formatted input in a Postscript viewer program; equivalent to
-.Opt_long ps .
+Display formatted input in a Postscript viewer program.
+.
+By default, the formatted input is displayed with the
+.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.
+.
+The text device,
+.I \%latin1
+by default, can be chosen with option
+.Opt_short T .
 .
 .
 .TP
 .Header_CB tty
-Display formatted input in a text terminal; equivalent to
-.Opt_long tty .
+Format in a
+.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
-Display formatted input in a internet browser program; equivalent to
-.Opt_long www .
+Equivalent to
+.Opt_long_arg mode html .
 .
 .
 .TP
 .Header_CB x
-Display formatted input in a native roff viewer such as
-.BR gxditview (@MAN1EXT@);
-equivalent to
-.Opt_long 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
+.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
+Equivalent to
+.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.
@@ -1335,565 +1363,1444 @@ 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.
 .
 .
 .TP
 .Header_CB source
-Display source code; same as
+Display the source code of the input without formatting; equivalent to
 .Opt_short Q .
 .
 .
 .RE
 .
 .
-.Opt_def -- no-location
-Do not display the location of retireved files; this resets a former
-call to
-.Opt_long location .
-.
-.
-.Opt_def -- no-man
-Do not check for man\~pages.
-.
-.
-.Opt_def -- pager
-Set the pager program in tty mode; default is
-.IR less .
-.
-.
 .Opt_def -- pdf
-Choose pdf mode (Portable Document Format).
-.
-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)
-(this is quite slow), and finally displayed either with the
-.BR xpdf (1)
-or the
-.BR acroread (1)
-program; this can be configured with option
-.Opt_long viewer-pdf .
-.
-PDF has a big advantage because the text is displayed graphically and
-is searchable nevertheless; but as thtransformation into pdf takes a
-considerable amount of time, the pdf mode is not suitable as a default
-device for the auto mode.
-.
-The only device that is compatible to this mode is
-.IR ps ,
-which is also the default when no device is specified.
+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
-Choose ps mode (Postscript).
-.
-By default, the formatted input is displayed with the
-.BR ghostview (@MAN1EXT@)
-program; this can be configured with option
-.Opt_long viewer-ps .
-.
-The only device that is compatible to this mode is
-.IR ps ,
-which is also the default when no device is specified.
+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 -- resolution value
-Set X resolution in dpi (dots per inch) in some viewer programs.
+.Opt_def -- ps\-viewer\-tty prog
+Choose a terminal viewer program for
+.IR \%ps\~mode .
 .
-The only supported dpi values are
-.B 75
+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 .
+.
+.
+.Opt_def -- tty
+Equivalent 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 html .
+.
+.
+.Opt_def -- www\-viewer prog
+Equivalent to
+.Opt_long html\-viewer .
+.
+.
+.Opt_def -- www\-viewer\-tty prog
+Equivalent to
+.Opt_long html\-viewer\-tty .
+.
+.
+.Opt_def -- X -- x
+Equivalent to
+.Opt_long_arg mode x .
+.
+.
+.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@)
+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.
+.
+.
+.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
+parameters.
+.
+.
+.P
+Besides these,
+.B \%groffer
+accepts all short options that are valid for the
+.BR \%groff (@MAN1EXT@)
+program.
+.
+All
+.RB \%non- groffer
+options are sent unmodified via
+.B \%grog
+to
+.BR \%groff .
+.
+So postprocessors, macro packages, compatibility with
+.I classical
+.IR \%troff ,
+and much more can be manually specified.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "Options for Development"
+.\" --------------------------------------------------------------------
+.
+.Opt_def -- debug
+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.
+.
+.
+.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
+.File_name \%groffer2.sh
+script should be run.
+.
+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
+Output the roff source code of the input files without further
+processing.
+.
+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
+.B \%groff
+option
+.Opt_short Z
 and
-.BR 100 .
-This is an adaption of the X Toolkit option
-.Opt_short resolution .
+.Opt_long_arg mode groff .
 .
 .
-.Opt_def -- rv
-Reverse foreground and background color of the viewer window.
+.\" --------------------------------------------------------------------
+.SH "Options related to groff"
+.\" --------------------------------------------------------------------
 .
-This is an adaption of the X Toolkit option
-.Opt_short rv .
-This feature is not available in all viewer programs.
+All short options of
+.B \%groffer
+are compatible with the short options of
+.BR \%groff (@MAN1EXT@).
+.
+The following of
+.B \%groff
+options have either an additional special meaning within
+.B \%groffer
+or make sense for normal usage.
 .
 .
-.Opt_def -- sections
-Restrict searching for man pages to the given
+.P
+Because of the special outputting behavior of the
+.B \%groff
+option
+.Opt_short Z
+.B \%groffer
+was designed to be switched into
+.I \%groff\~mode ;
+the
+.I \%groffer
+viewing features are disabled there.
+.
+The other
+.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 the
+.IR \%text\~modes .
+.
+That could be important when the text pager has problems with control
+sequences in
+.IR "tty mode" .
+.
+.
+.Opt_def - m file
+Add
+.I \%file
+as a
+.I \%groff
+macro file.
+.
+This is useful in case it cannot be recognized automatically.
+.
+.
+.Opt_def - P opt_or_arg
+Send the argument
+.I \%opt_or_arg
+as an option or option argument to the actual
+.B \%groff
+postprocessor.
+.
+.
+.Opt_def - T -- device devname
+.
+This option determines
+.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 ,
+and others.
+.
+Each of these arguments switches
+.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
+arguments are mapped to the corresponding
+.B \%groffer
+.Opt_long_arg mode \fIdevname\fR
+option:
+.BR \%dvi ,
+.BR \%html ,
+and
+.BR \%ps .
+All
+.B \%X*
+arguments are mapped to
+.IR \%mode\~x .
+Each other
+.I \%devname
+argument switches to
+.I \%mode\~groff
+using this device.
+.
+.
+.Opt_def - X
+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 the
+.I \%groff intermediate output
+without postprocessing; see
+.BR \%groff_out (@MAN5EXT@).
+This is equivalent to option
+.Opt_long ditroff
+of
+.IR \%man ,
+which can be used as well.
+.
+.
+.P
+All other
+.B \%groff
+options are supported by
+.BR \%groffer ,
+but they are just transparently transferred to
+.B \%groff
+without any intervention.
+.
+The options that are not explicitly handled by
+.B \%groffer
+are transparently passed to
+.BR \%groff .
+.
+Therefore these transparent options are not documented here, but in
+.BR \%groff (@MAN1EXT@).
+Due to the automatism in
+.BR \%groffer ,
+none of these
+.B \%groff
+options should be needed, except for advanced usage.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Options for man\~pages"
+.\" --------------------------------------------------------------------
+.
+.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 -- apropos\-data
+Show only the
+.B \%apropos
+descriptions for data documents, these are the
+.BR \%man (7)
+sections 4, 5, and 7.
+.
+Direct section declarations are ignored, wildcards are accepted.
+.
+.
+.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 -- apropos\-progs
+Show only the
+.B \%apropos
+descriptions for documents on programs, these are the
+.BR \%man (7)
+sections 1, 6, and 8.
+.
+Direct section declarations are ignored, wildcards are accepted.
+.
+.
+.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
+.
+.
+.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 default is looking up for local files.
+.
+.
+.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 -- no-man -- local-file
+Do not check for
+.IR \%man\~pages .
+.
+.Opt_long local-file
+is the corresponding
+.B man
+option.
+.
+.
+.Opt_def -- no-special
+Disable former calls of
+.Opt_long all ,
+.Opt_long apropos* ,
+and
+.Opt_long whatis .
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Long options taken over from GNU man"
+.\" --------------------------------------------------------------------
+.
+The long options of
+.B \%groffer
+were synchronized with the long options of \f[CR]GNU\f[]
+.BR man .
+.
+All long options of \f[CR]GNU\f[]
+.B man
+are recognized, but not all of these options are important to
+.BR \%groffer ,
+so most of them are just ignored.
+.
+.
+.P
+In the following, the
+.B man
+options that have a special meaning for
+.B \%groffer
+are documented.
+.
+.
+.P
+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 \f[CR]GNU\f[]
+.B man
+installed.
+.
+.
+.Opt_def -- all
+In searching
+.IR \%man\~pages ,
+retrieve all suitable documents instead of only one.
+.
+.
+.Opt_def - 7 -- ascii
+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
+.B \%groffer
+.Opt_short Z .
+.
+.
+.Opt_def -- extension 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
+.I \%man\~page
+extension is
+.IR \%ncurses .
+.
+.
+.Opt_def -- locale language
+.
+Set the language for
+.IR \%man\~pages .
+.
+This has the same effect, but overwrites
+.Env_var $LANG
+.
+.
+.Opt_def -- location
+Print the location of the retrieved files to standard error.
+.
+.
+.Opt_def -- no-location
+Do not display the location of retrieved files; this resets a former
+call to
+.Opt_long location .
+.
+This was added by
+.BR \%groffer .
+.
+.
+.Opt_def -- manpath "'dir1:dir2:\*[Ellipsis]'"
+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
+.I \%man\~page
+is disabled.
+.
+.
+.Opt_def -- pager
+Set the pager program in
+.IR \%tty\~mode ;
+default is
+.BR \%less .
+This is equivalent to
+.Opt_long tty\-viewer .
+.
+.
+.Opt_def -- sections "'sec1:sec2:\*[Ellipsis]'"
+Restrict searching for
+.I \%man\~pages
+to the given
 .IR sections ,
 a colon-separated list.
 .
 .
-.Opt_def -- shell "shell_program"
-Specify the shell under which the groffer script should be run.
-.
-The script first tests whether this option is set (either 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.
-.
-.
-.Opt_def -- source
-Equivalent to
-.Opt_short Q .
-.
-.
-.Opt_def -- systems
-Search for man pages for the given operating systems; the argument
-.I systems
+.Opt_def -- systems "'sys1,sys2,\*[Ellipsis]'"
+Search for
+.I \%man\~pages
+for the given operating systems; the argument
+.I \%systems
 is a comma-separated list.
 .
 .
-.Opt_def -- title "'some text'"
-Set the title for the viewer window.
-.
-This feature is not available in all viewer programs.
-.
-.
-.Opt_def -- to-postproc opt_or_arg
-Eqivalent to
-.Opt_short P .
-.
-.
-.Opt_def -- troff-device
-Eqivalent to
-.Opt_short T .
-This option is only kept for compatibility with GNU
-.BR man (1).
-.
-.
-.Opt_def -- tty
-Choose tty display mode, that means displaying in a text pager even
-when in X; eqivalent to
-.Opt_long mode\~tty .
-.
-.
-.Opt_def -- version
-Eqivalent to
-.Opt_short v .
-.
-.
-.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 .
 .
 .
-.Opt_def -- www
-Choose www mode (html), display in a web browser program, which can be
-specified with option
-.Opt_long www-viewer .
-By default, the existence of a sequence of standard web browsers is
-tested, starting with
-.BR mozilla (1)
-and
-.BR netscape (1)
+.\" --------------------------------------------------------------------
+.SS "X\~\%Window\~\%Toolkit Options"
+.\" --------------------------------------------------------------------
 .
+The following long options were adapted from the corresponding
+\%\f[CR]X\~\Window\~Toolkit\f[] options.
 .
-.Opt_def -- www-viewer prog
-Set the web browser program for viewing in
-.I www
-mode.
+.B \%groffer
+will pass them to the actual viewer program if it is an
+\%\f[CR]X\~Window\f[] program.
 .
-Each program that accepts html input and allows the
-.BI file://localhost/ dir / file
-syntax on the command line is suitable; 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 -- x
-Choose
-.I x
-mode (view in X 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.
-.
-This can be configured with option
-.Opt_long x-viewer .
-.
-The only devices (option
-.Opt_short T )
-that are compatible with this mode are
-.IR X75 ,
-.IR X100 ,
-.IR X75-12 ,
-.IR X100-12 ,
-and
-.I ps
-(the default device).
-.
-.
-.Opt_def -- x-viewer prog
-Set the viewer program for
-.I x
-mode.
-.
-Suitable viewer programs are
-.BR gxditview (@MAN1EXT@)
-and
-.BR xditview (1).
-.
-But the argument can be any executable file or a program in
-.Env_var $PATH .
-.
-In each case, arguments can be provided additionally.
-.
-.
-.TP
-.Opt_--
-Signals the end of option processing; all remaining arguments are
-interpreted as
-.I filespec
-parameters.
+Otherwise these options are ignored.
 .
 .
 .P
-Besides these, groffer accepts all arguments that are valid for the
-.BR groff (@MAN1EXT@)
+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.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Filespec Arguments"
+.\" --------------------------------------------------------------------
+.
+A
+.I \%filespec
+parameter is an argument that is not an option or option argument.
+.
+It means an input source.
+.
+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
+The strange \%\f[CR]POSIX\f[] behavior to regard all arguments behind
+the first non-option argument as
+.I \%filespec
+arguments is ignored.
+.
+The \f[CR]GNU\f[] behavior to recognize options even when mixed with
+.I \%filespec
+arguments is used througout.
+.
+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
+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 a digit from
+.B 1
+to
+.B 9
+or one of the characters
+.B n
+or
+.BR o .
+.
+In the following, a stand-alone character
+.I s
+stands for a
+.IR "classical man section" .
+The internal precedence of
+.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
+.B \%groffer
+.I \%man\~page
+facility is based on the classical single character sections.
+.
+.
+.P
+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 ,
+where
+.I \%section
+can be any string, but it must exist in the
+.I \%man
+system.
+.
+.
+.Topic
+Next some patterns based on the
+.I classical man sections
+are checked.
+.
+.BI \%man: name . s
+and
+.IB \%name . s
+search for a \%man\~page
+.I \%name
+in \%man\~section
+.I s
+if
+.I s
+is a
+.I classical man section
+mentioned above.
+.
+Otherwise a
+.I \%man\~page
+named
+.IR \%name.s
+is searched in the lowest
+.B man\~section .
+.
+.
+.Topic
+Now
+.BI \%man: name
+searches for a
+.I \%man\~page
+in the lowest
+.I \%man\~section
+that has a document called
+.IR \%name .
+.
+.
+.Topic
+The pattern
+.I \%s\~name
+originates from a strange argument parsing of the
+.B man
 program.
 .
-All non-groffer options are sent unmodified via grog to groff.
+If
+.I s
+is a
+.I classical man section
+interpret it as a search for a
+.I \%man\~page
+called
+.I \%name
+in man\~section
+.IR s ,
+otherwise interpret both
+.I s
+and
+.I \%name
+as two independent
+.I \%filespec
+arguments.
 .
-Postprocessors, macro packages, compatibility with classical troff,
-and much more can be manually specified.
+.
+.Topic
+We are left with the argument
+.I \%name
+which is not an existing file.
+.
+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
+.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
+language.
 .
 .
 .\" --------------------------------------------------------------------
 .SH "OUTPUT MODES"
 .\" --------------------------------------------------------------------
 .
-By default, the groffer program formats the input and then
-automatically chooses a suitable display mode, but the user can also
-choose between the following modes:
+By default, the
+.B \%groffer
+program collects all input into a single file, formats it with the
+.B \%groff
+program for a certain device, and then chooses a suitable viewer
+program.
 .
-.Topic
-graphically display the formatted input with an X window program,
-including
+The device and viewer process in
+.B \%groffer
+is called a
+.IR \%mode .
 .
-.RS
-.Topic
-with X window roff viewers such as
-.BR gxditview (@MAN1EXT@)
-.RI ( x
-mode),
+The mode and viewer of a running
+.B \%groffer
+program is selected automatically, but the user can also choose it
+with options.
 .
-.Topic
-in a dvi viewer program
-.RI ( dvi
-mode),
 .
-.Topic
-in a Postscript viewer
-.RI ( ps
-mode),
-.
-.Topic
-in a PDF viewer
-.RI ( pdf
-mode),
-.
-.Topic
-in a web browser
-.RI ( www
-mode),
-.RE
-.
-.Topic
-display formatted input in a pager on the text terminal
-.RI ( tty
-mode),
-.
-.Topic
-run groffer like groff, but with decompression and man\~page searching
-.RI ( groff
-mode); this includes things like generating the groff intermediate
-output.
-.
-.Topic
-stream the unformatted source code of the input onto standard output
-.RI ( source
-mode),
+The modes are selected by option the arguments of
+.Opt_long_arg mode \fIanymode .
+Additionally, each of this argument can be specified as an option of
+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 .
 .
 .
 .P
-By
-.IR default ,
-.I groffer
+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.
+.
+.
+.P
+By default,
+.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 default
-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
-or the option
+and the option
 .Opt_long display
-are used for specifying the X display to be used; if neither is
-specified, groffer assumes that no X is running.
+are used for specifying the \%\f[CR]X\~Window\f[] display to be used.
+.
+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
-A certain graphical display mode can be selected by one of the options
-.Opt_long dvi ,
-.Opt_long pdf ,
-.Opt_long ps ,
-.Opt_short X ,
-and
-.Opt_long www .
+Known viewers for the graphical display modes and their standard
+\%\f[CR]X\~Window\f[] viewer progams are
 .
-By default, some graphical modes are tried first.  If none succeeds
-groffer switches to
-.B tty
-mode.
+.Topic
+\%\f[CR]X\~Window\f[]
+.I roff
+viewers such as
+.BR \%gxditview (@MAN1EXT@)
+or
+.BR \%xditview (1)
+(in
+.IR \%x\~mode ),
 .
+.Topic
+in a Postscript viewer
+.nh
+.RI ( \%ps\~mode ),
+.hy
 .
-.P
-The graphical modes can be customized by options that were named
-according to the resource options in the
-.BR X (1)
-Toolkit but using a leading double minus instead of the single minus
-used by X.
+.Topic
+in a dvi viewer program
+.nh
+.RI ( \%dvi\~mode ),
+.hy
 .
-These include
-.Opt_long background ,
-.Opt_long foreground ,
-.Opt_long geometry ,
-.Opt_long resolution ,
-.Opt_long title ,
-.Opt_long xrm ,
-etc.
+.Topic
+in a PDF viewer
+.nh
+.RI ( \%pdf\~mode ),
+.hy
+.
+.Topic
+in a web browser
+.nh
+.RI ( html
+or
+.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 a long time to transform the input into the
-PDF format, so it was not chosen as the major mode.
-.
-You can change this by the options
-.Opt_long pdf
-and
-.Opt_long auto\-modes .
-.
-.
-.\" --------------------------------------------------------------------
-.SS "Text mode"
-.\" --------------------------------------------------------------------
-.
-If the variable
-.Env_var $DISPLAY
-is not set or empty, groffer assumes that it should produce output on
-a text terminal.
-.
-This mode can also be forced by option
-.Opt_long tty .
+Unfortunately, it takes some time to transform the input into the PDF
+format, so it was not chosen as the major mode.
 .
 .
 .P
-In the actual implementation, the groff output device
-.I latin1
-is chosen and the processed output is piped into a pager program.
+These graphical viewers can be customized by options of the
+\%\f[CR]X\~Window\~Toolkit\f[].
+.
+But the
+.B \%groffer
+options use a leading double minus instead of the single minus used by
+the \%\f[CR]X\~Window\~Toolkit\f[].
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Text modes"
+.\" --------------------------------------------------------------------
+.
+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,
+.B \%groffer
+assumes that it should use
+.IR \%tty\~\%mode .
+.
+.
+.P
+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_long tty-device .
+.Opt_short T
+or
+.Opt_long device .
 .
 .
 .P
-The pager to be used can be specified by option
+The pager to be used can be specified by one of the options
 .Opt_long pager
+and
+.Opt_long tty\-viewer ,
 or by the environment variable
 .Env_var $PAGER .
-If this is not set or empty the
-.BR less (1)
-program is used as the default pager.
+If all of this is not used the
+.BR \%less (1)
+program with the option
+.Opt_short r
+for correctly displaying control sequences is used as the default
+pager.
 .
 .
 .\" --------------------------------------------------------------------
-.SS "Non-displaying Modes"
+.SS "Special Modes for Debugging and Development"
 .\" --------------------------------------------------------------------
 .
-There are some special modes that do not display the formatted output
-in a viewer program.
+These modes use the
+.I \%groffer
+file determination and decompression.
+.
+This is combined into a single input file that is fed directly into
+.B \%groff
+with different strategy without the
+.I \%groffer
+viewing facilities.
 .
 These modes are regarded as advanced, they are useful for debugging
-purposes.
+and development purposes.
 .
 .
-.TP
-.I source mode
-Instead of displaying the formatted output, it is also possible to
-have the roff source code streamed onto the standard output.
-.
-This mode must be requested by one of the options
+.P
+The
+.I \%source\~mode
+with option
 .Opt_short Q
-or
-.Opt_long source .
+and
+.Opt_long source
+just displays the decompressed input.
 .
 .
-.TP
-.I groff mode
-This mode disables the groffer viewing facilities.
-.
-The input is handled as usual with decompression and man\~page
-searching, but then it is passed to groff using only the options
-provided by groff.
+.P
+The
+.I \%groff\~mode
+passes the input to
+.B \%groff
+using only some suitable options provided to
+.BR \%groffer .
 .
 This enables the user to save the generated output into a file or pipe
 it into another program.
 .
+.
+.P
+In
+.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.
 .
-This mode is activated automatically by the three groff options
-.Opt_short V
-(print roff pipe, no formatting),
-.Opt_short X
-(display with gxditview in groff's native way, using
-.Opt_short P
-for customization), and
-.Opt_short Z
-(disable post-processing, thus producing the groff intermediate output).
+.
+.P
+All
+.B \%groff
+short options are supported by
+.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.
 .
@@ -1901,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.
 .
@@ -1917,35 +2826,46 @@ If this is empty, the program tries to read it from the environment
 variable
 .Env_var $MANOPT .
 .
+.
+.Topic
+If this does not work a reasonable default path from
+.Env_var $PATH
+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.
-.
-.
-.Topic
-If this does not work a reasonable default path is searched for
-man\~pages.
+.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
 .
@@ -1966,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
@@ -2019,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
@@ -2049,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).
 .
 .
 .\" --------------------------------------------------------------------
@@ -2061,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
@@ -2081,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.
 .
 .
@@ -2097,42 +3036,53 @@ 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.
 .
-The content of this variable is run through the shell builitin `eval';
+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 &
 .
 .
@@ -2144,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
@@ -2154,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.
 .
@@ -2180,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
+.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 variables have a direct meaning for the groffer program.
+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 ;
@@ -2248,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.
@@ -2261,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
@@ -2271,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 .
@@ -2280,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 ;
@@ -2290,36 +3259,91 @@ 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.
 .
 .
 .\" --------------------------------------------------------------------
 .SH "CONFIGURATION FILES"
 .\" --------------------------------------------------------------------
 .
-The groffer program can be preconfigured by two configuration files.
-.
-Both of them are shell scripts that are called at the beginning of
-groffer using the `\c
-.CB .\~\c
-.IR filename '
-syntax.
+The
+.B \%groffer
+program can be preconfigured by two configuration files.
 .
 .
 .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
+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.
+.
+.
+.P
+The lines with the beginning minus are interpreted as
+.B groffer
+options.
+.
+This easily allows to set general
+.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 configuration files
+have been transferred into a shell script that is called within
+.B \%groffer
+using the `\c
+.CB \.\~\c
+.IR \%filename '
+shell syntax.
 .
 .
 .P
@@ -2327,123 +3351,238 @@ It makes sense to use these configuration files for the following
 tasks:
 .
 .Topic
-Preset environment variables recognized by groffer; preferably a
-variable should only be set when it is unset in order not to override
-a user-provided value.
+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 command line options by prepending them to
-.Env_var $GROFFER_OPT ;
-prepending should be preferred to appending and setting in order not
-to delete the environment variable provided by the 
+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.
+As an example, consider the following configuration file in
+.File_name ~/.groff/groffer.conf ,
+say.
 .
 .P
 .ft CR
 .nh
 .nf
-#! /bin/sh
-# ~/.groff/groffer.conf
+# groffer configuration file
+#
+# groffer options that are used in each call of groffer
+\-\-shell=ksh
+\-\-foreground=DarkBlue
+\-\-resolution=100
+\-\-x\-viewer='gxditview \-geometry 900x1200'
+#
+# some shell commands
 if test "$DISPLAY" = ""; then
-  DISPLAY='localhost:0.0';
-fi;
-GROFF_OPT="--resolution=100 $GROFF_OPT";
-gxditview()
-{
-  /usr/local/bin/gxditview --fg DarkBlue "$@";
-}
-GROFF_OPT="--x-viewer gxditview $GROFF_OPT";
+  export DISPLAY='localhost:0.0'
+fi
+date >>~/mygroffer.log
 .fi
 .hy
 .ft
 .
 .
 .P
+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
-allows to start groffer in a graphical mode (here on first running X
-display by
-.IR localhost:0.0 )
-even from a text terminal (empty
-.Env_var $DISPLAY );
-.Topic
-all graphical modes use a resolution of
-.I 100 dpi
-where applicable;
-.Topic
-the
-.BR gxditview (@MAN1EXT@)
-program is told to use
-.I DarkBlue
-as the text color by defining a shell function with the program's name
-.Topic
-force
-.I gxditview
-to be used in X mode by option
-.Opt_long x\­viewer .
 .
 .
-.P
-These configurations can be overridden by command line options and by
-environment variable
-.Env_var $GROFFER_OPT .
+.Topic
+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
+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
+.I \%x-mode
+viewer using the geometry option for setting the width to
+.B 900\~dpi
+and the height to
+.BR 1200\~dpi .
+This geometry is suitable for a resolution of
+.BR 100\~dpi .
+.
+.
+.Topic
+If the environment variable
+.Env_var $DISPLAY
+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
+.B \%groffer
+start is written to the file
+.File_name mygroffer.log
+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 a default 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.7\~groff\~\[cq]troff(1)\[cq]\~man:roff"
+.Shell_cmd "groffer\~groff"
+If the file
+.File_name \%./groff
+exists use it as input.
+.
+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
+.I \%man\~page
+of
+.B \%groff
+even when the file
+.File_name ./groff
+exists.
+.
+.
+.TP
+.Shell_cmd "groffer\~groff.7"
+.TP+
+.Shell_cmd "groffer\~7\~groff"
+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.
+.
+.
+.TP
+.Shell_cmd "groffer\~fb.modes"
+If the file
+.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
+is not a single character in classical section style the argument is
+not split to a search for
+.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
-(in man\~section\~7),
-.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](
@@ -2455,46 +3594,56 @@ The formatted files are concatenated and displayed in one piece.
 .
 .
 .TP
-.Shell_cmd "LANG=de\~groffer\~--man\~--www\~--www-viever=netscape\~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 (the English version is used if there is no German version),
-decompress it, format it into the html format (www mode) and view the
-result in the default web browser
-.I netscape .
+program, decompress it, format it to
+.I \%html
+format
+.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\~-Q\~'man:roff(7)'"
+.Shell_cmd "groffer\~--source\~'man:roff(7)'"
 .
-Get the man\~page called
-.I roff
-in man\~section 7 and print its unformatted content (source code
-because of option
-.Opt_short Q )
-on standard output.
+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, switch to
-.I groff
-using macro package
-.I foo
-(groff option
-.Opt_short m ) in non-postprocessing mode (groff option
-.Opt_short Z );
-this produces the groff intermediate output, see
-.BR groff_out (@MAN7EXT@).
+Decompress the standard input, send this to
+.I \%groff intermediate output mode
+without post-processing
+.RB ( groff
+option
+.Opt_short Z ),
+using macro package by
+.I \%foo
+.RB ( groff
+option
+.Opt_short m ) .
 .
 .
 .TP
@@ -2511,79 +3660,121 @@ bold font, using color yellow on red background.
 .\" --------------------------------------------------------------------
 .
 The
-.B groffer
-shell script is compatible to both POSIX and GNU.
-.
-POSIX compatibility refers to
-.B IEEE P1003.2/D11.2
-of September 1991, a very early version of this standard.
-.
-The script uses only a quite restricted set of shell language elements
-and shell builtins, common to all POSIX versions; the only external
-program used is `sed', again only the most basic POSIX features of
-`sed' are used.
-.
-The groffer script should work on most actual free and commercial
-operating systems.
+.B \%groffer
+program consists of two shell scripts.
 .
 .
 .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 starting script is the file
+.File_name \%groffer
+that is installed in a
+.File_name bin
+directory.
+.
+It is generated from the source file
+.File_name \%groffer.sh .
+.
+It is just a short starting script without any functions such that it
+can run on very poor shells.
 .
 .
 .P
-The groffer shell script was tested with the following common
-implementations of the POSIX shell:
-.BR ash (1),
-.BR bash (1),
-.BR ksh (1),
-POSIX
-.BR sh (1),
-and others.
+The main part of the
+.B \%groffer
+program is the file
+.File_name groffer2.sh
+that is installed in the
+.I groff
+library directory.
 .
-Free POSIX compatible shells and shell utilities for most operating
-systems are available at the
-.URL http://\:www.gnu.org/software/ "GNU software archive" .
-.
-.
-.P
-The best performance was obtained with the
-.I ash
-shell; so groffer tries to run under
-.I ash
-whenever possible.
-.
-If not available the shell under which the script was started in the
-first place is used instead.
-.
-This can be modified by the option
+This script can be run under a different shell by using the
+.B \%groffer
+option
 .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).
+Both scripts are compatible with both
+\f[CR]GNU\f[] and \%\f[CR]POSIX\f[].
 .
-The following usual types of options are supported.
+\%\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
+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.
+.
+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.
+.
+.
+.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
+.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 options, for example,
+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
-.Opt_short Q\~\-m\~foo.
+.Opt_short Q\~\-m\~foo .
 .
 .
 .Topic
-Long options that means option with names longer than one character
-are always prededed 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,
+Long options are options with names longer than one character; they
+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,
 .Opt_alt -- long=arg
 is equivalent to
 .Opt_alt -- long\~arg .
@@ -2593,144 +3784,232 @@ is equivalent to
 An argument of
 .Opt_--
 ends option parsing; all further command line arguments are
-interpreted as filespec 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; in this case, option processing is stopped as
-soon as the first non-option argument is found.
+The free mixing of options and
+.I \%filespec
+parameters follows the GNU principle.
 .
-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 .
+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.
+.
+The end of option processing can be forced by the option
+.RB ` \-\- '
+anyway.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "BUGS"
+.\" --------------------------------------------------------------------
+.
+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.
+.
+.
+.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" .
+.
+.
+.P
+See
+.BR \%groff (@MAN1EXT@)
+for information on availability.
 .
 .
 .\" --------------------------------------------------------------------
 .SH "SEE ALSO"
 .\" --------------------------------------------------------------------
 .
-.TP
-.BR groff (@MAN1EXT@)
-.TP+
-.BR troff (@MAN1EXT@)
-Details on the options and environment variables available in groff;
-all of them can be used with groffer.
+.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 grog (@MAN1EXT@)
-Internally, groffer tries to guess the groff command line options from
-the input using this program.
+.BR \%groff (@MAN7EXT@)
+Documentation of the
+.I \%groff
+language.
+.
+.
+.TP
+.BR \%grog (@MAN1EXT@)
+Internally,
+.B \%groffer
+tries to guess the
+.B \%groff
+command line options from the input using this program.
 .
 .
 .TP
 .BR groff_out (@MAN5EXT@)
-Documentation on the groff intermediate output (ditroff output).
+Documentation on the
+.I \%groff intermediate output
+.nh
+.RI ( ditroff
+output).
+.hy
 .
 .
 .TP
-.BR xdvi (1)
-.TP+
-.BR dvilx (1)
-Viewers for groffer's
-.I dvi
-mode.
+.BR groff_tmac (@MAN5EXT@)
+Documentation on the
+.I \%groff
+macro files.
 .
 .
 .TP
-.BR gv (1)
-.TP+
-.BR ghostview (1)
-Viewers for groffer's
-.I ps
-mode.
+.BR \%man (1)
+The standard program to display
+.IR \%man\~pages .
 .
-.
-.TP+
-.BR gs (1)
-Transformer from
-.I ps
-to
-.IR pdf ;
-and a
-.I ps
-viewer.
-.
-.
-.TP
-.BR xpdf (1)
-Viewers for
-.I pdf
-files.
-.
-.
-.TP
-.BR gxditview (@MAN1EXT@)
-.TP+
-.BR xditview (1x)
-Viewers for groffer's
-.I x
-mode.
-.
-.
-.TP
-.BR gzip (1)
-.TP+
-.BR bzip2 (1)
-The decompression programs supported by groffer.
-.
-.
-.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" .
+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 groffer.
+supported by
+.BR \%groffer .
+.
+.
+.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
+.
+.
+.P
+.BR \%gxditview (@MAN1EXT@),
+.BR \%xditview (1x)
+.RS
+Viewers for
+.BR \%groffer 's
+.IR \%x\~mode .
+.RE
+.
+.
+.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
+.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
+.
+.
+.P
+.BR \%kdvi (1),
+.BR \%xdvi (1),
+.BR \%dvilx (1)
+.RS
+Viewers for
+.BR \%groffer 's
+.IR \%dvi\~mode .
+.RE
+.
+.
+.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"
 .\" --------------------------------------------------------------------
-.
-Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-.
-.P
-This document is distributed under the terms of the FDL (GNU Free
-Documentation License) version 1.1 or later.
-.
-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.
-.
-It was written by
-.MTO bwarken@mayn.de "Bernd Warken" .
+.author
 .
 .
-\" --------------------------------------------------------------------
+.\" --------------------------------------------------------------------
+.SH "COPYING"
+.\" --------------------------------------------------------------------
+.copyleft
+.
+.
+.\" --------------------------------------------------------------------
 .\" Emacs settings
 .\" --------------------------------------------------------------------
 .
diff --git a/contrib/groff/contrib/groffer/groffer.sh b/contrib/groff/contrib/groffer/groffer.sh
index 4e7332c0648b..1cb55c72c9ca 100644
--- a/contrib/groff/contrib/groffer/groffer.sh
+++ b/contrib/groff/contrib/groffer/groffer.sh
@@ -1,4467 +1,299 @@
-#!/bin/sh
+#! /bin/sh
 
 # groffer - display groff files
 
 # Source file position: /contrib/groffer/groffer.sh
 
-# Copyright (C) 2001,2002,2003 Free Software Foundation, Inc.
-# Written by Bernd Warken 
+# Copyright (C) 2001,2002,2003,2004,2005
+# Free Software Foundation, Inc.
+# Written by Bernd Warken
 
-# This file is part of groff.
+# 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 file COPYING.  If not, write to the
-# Free Software Foundation, 59 Temple Place - Suite 330, Boston,
-# MA 02111-1307, USA.
+# 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.
+
+########################################################################
+
+_PROGRAM_VERSION='0.9.22';
+_LAST_UPDATE='22 August 2005';
 
-export _PROGRAM_NAME;
 export _PROGRAM_VERSION;
 export _LAST_UPDATE;
 
-_PROGRAM_NAME='groffer';
-_PROGRAM_VERSION='0.9.4';
-_LAST_UPDATE='22 Jan 2003';
+export GROFFER_OPT;		# option environment for groffer
 
-# This program is installed with groff version @VERSION@.
-
-########################################################################
-# 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}" != 'second'; then
-  # only reached during the first run of the script
-
-  export GROFFER_OPT;
-  export _groffer_run;
-  export _this;
-
-  _this="@BINDIR@/${_PROGRAM_NAME}";
-
-  ###########################
-  # _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} "${_this}" "$@";
-    exit;
-  fi;
-
-  # clean-up of shell determination
-  unset _shell;
-  unset _this;
-  unset _groffer_run;
-  _get_opt_shell()
-  {
-    return 0;
-  }
-  _test_on_shell()
-  {
-    return 0;
-  }
-
-fi;
-
-
-########################################################################
-# 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
-
-
-########################################################################
-#                          Description
-########################################################################
-
-# Display groff files and man pages on X or tty, even when compressed.
-
-
-### Usage
-
-# Input comes from either standard input or command line parameters
-# that represent either names of exisiting roff files or standardized
-# specifications for man pages.  All of these can be compressed in a
-# format that is decompressible by `gzip'.
-
-# The following displaying modes are available:
-# - Display formatted input with the X roff viewer `gxditview',
-# - with a Prostcript viewer,
-# - with a dvi viewer,
-# - with a web browser.
-# - Display formatted input in a text terminal using a text device.
-# - Generate output for some groff device on stdout without a viewer.
-# - Output only the source code without any groff processing.
-# - Generate the troff intermediate output on standard output
-#   without groff postprocessing.
-# By default, the program tries to display with `gxditview' (1); if
-# this does not work, text display (2) is used.
-
-
-### Error handling
-
-# Error handling and exit behavior is complicated by the fact that
-# `exit' can only escape from the current shell; trouble occurs in
-# subshells.  This was solved by sending kill signals, see
-# $_PROCESS_ID and error().
-
-
-### Compatibility
-
-# This shell script is compatible to the both the GNU and the POSIX
-# shell and utilities.  Care was taken to restrict the programming
-# technics used here in order to achieve POSIX compatibility as far
-# back as POSIX P1003.2 Draft 11.2 of September 1991.
-
-# The only non-builtin used here is POSIX `sed'.  This script was
-# tested under `bash', `ash', and `ksh'.  The speed under `ash' is
-# more than double when compared to the larger shells.
-
-# This script provides its own option parser.  It is compatible to the
-# usual GNU style command line (option clusters, long options, mixing
-# of options and non-option file names), except that it is not
-# possible to abbreviate long option names.
-
-# The mixing of options and file names can be prohibited by setting
-# the environment variable `$POSIXLY_CORRECT' to a non-empty value.
-# This enables the rather wicked POSIX behavior to terminate option
-# parsing when the first non-option command line argument is found.
-
-
-########################################################################
-#            Survey of functions defined in this document
-########################################################################
-
-# The elements specified within paranthesis `(<>)' give hints to what
-# the arguments are meant to be; the argument names are irrelevant.
-# <>?     0 or 1
-# <>*     arbitrarily many such arguments, incl. none
-# <>+     one or more such arguments
-# <>      exactly 1
-
-# A function that starts with an underscore `_' is an internal
-# function for some function.  The internal functions are defined just
-# after their corresponding function; they are not mentioned in the
-# following.
-
-# abort (text>*)
-# base_name (path)
-# catz ()
-# clean_up ()
-# diag (text>*)
-# dirname_append ( [])
-# dirname_chop ()
-# do_filearg ()
-# do_nothing ()
-# echo2 (*)
-# echo2n (*)
-# error (*)
-# get_first_essential (*)
-# is_dir ()
-# is_empty ()
-# is_equal ( )
-# is_file ()
-# is_not_empty ()
-# is_not_equal ( )
-# is_not_file ()
-# is_not_prog ()
-# is_prog ()
-# is_yes ()
-# leave ()
-# landmark ()
-# list_append ( ...)
-# list_check ()
-# list_from_args (...)
-# list_from_cmdline (    [...])
-# list_from_split ( )
-# list_has ( )
-# list_has_not ( )
-# list_length ()
-#   main_*(), see after the functions
-# man_do_filespec ()
-# man_setup ()
-# man_register_file ( [ [
]]) -# man_search_section (
) -# man_set() -# manpath_add_lang( ) -# manpath_add_system() -# manpath_from_path () -# normalize_args ( *) -# path_chop () -# path_clean () -# path_contains ( ) -# path_not_contains ( ) -# path_split () -# register_file () -# register_title () -# reset () -# save_stdin () -# string_contains ( ) -# string_not_contains ( ) -# tmp_cat () -# tmp_create (?) -# to_tmp () -# trap_clean () -# trap_set () -# usage () -# version () -# warning () -# whatis () -# where () - - -######################################################################## -# 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 - - -######################################################################## -# External environment variables - -# If these variables are exported here then the `ash' shell coughs -# when calling `groff' in `main_display()'. - -if test "${GROFFER_EXPORT_EXTERNALS}" = 'yes'; then - - # external system environment variables that are explicitly used - export DISPLAY; # Presets the X display. - export LANG; # For language specific man pages. - export LC_ALL; # For language specific man pages. - export LC_MESSAGES; # For language specific man pages. - export PAGER; # Paging program for tty mode. - export PATH; # Path for the programs called (: list). - - # groffer native environment variables - export GROFFER_OPT # preset options for groffer. - - # all groff environment variables are used, see groff(1) - export GROFF_BIN_PATH; # Path for all groff programs. - export GROFF_COMMAND_PREFIX; # '' (normally) or 'g' (several troffs). - export GROFF_FONT_PATH; # Path to non-default groff fonts. - export GROFF_TMAC_PATH; # Path to non-default groff macro files. - export GROFF_TMPDIR; # Directory for groff temporary files. - export GROFF_TYPESETTER; # Preset default device. - - # all GNU man environment variables are used, see man(1). - export MANOPT; # Preset options for man pages. - export MANPATH; # Search path for man pages (: list). - export MANROFFSEQ; # Ignored because of grog guessing. - export MANSECT; # Search man pages only in sections (:). - export SYSTEM; # Man pages for different OS's (, list). - -fi; - - -######################################################################## -# 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') +# @...@ constructs -_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='ps,x,tty'; -export _DEFAULT_RESOLUTION; -_DEFAULT_RESOLUTION='100'; - -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_WWW_X; # viewer program for www mode in X -export _VIEWER_WWW_TTY; # viewer program for www mode in tty -_VIEWER_DVI='xdvi,dvilx'; -_VIEWER_PDF='xpdf,acroread'; -_VIEWER_PS='gv,ghostview,gs_x11,gs'; -_VIEWER_WWW='mozilla,netscape,opera,amaya,arena'; -_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_MAN_SHORT_ARG; -export _OPTS_MAN_SHORT_NA; -export _OPTS_MAN_LONG_ARG; -export _OPTS_MAN_LONG_NA; -export _OPTS_GROFFER_LONG; -export _OPTS_GROFFER_SHORT; -export _OPTS_GROFF_LONG; -export _OPTS_GROFF_SHORT; -export _OPTS_CMDLINE_SHORT_NA; -export _OPTS_CMDLINE_SHORT_ARG; -export _OPTS_CMDLINE_SHORT; -export _OPTS_CMDLINE_LONG_NA; -export _OPTS_CMDLINE_LONG_ARG; -export _OPTS_CMDLINE_LONG; - - -###### native groffer options - -_OPTS_GROFFER_SHORT_NA="'h' 'Q' 'v' 'V' 'X' 'Z'"; -_OPTS_GROFFER_SHORT_ARG="'T'"; - -_OPTS_GROFFER_LONG_NA="'all' 'apropos' 'ascii' 'auto' 'default' 'dvi' \ -'groff' 'help' 'intermediate-output' 'local-file' 'location' 'man' \ -'no-location' 'no-man' 'pdf' 'ps' 'rv' 'source' 'tty' 'tty-device' \ -'version' 'whatis' 'where' 'www' 'x'"; - -_OPTS_GROFFER_LONG_ARG="'background' 'bd' 'bg' 'bw' 'default-modes' \ -'device' 'display' 'dvi-viewer' 'extension' 'fg' 'fn' 'font' \ -'foreground' 'geometry' 'locale' 'manpath' 'mode' 'pager' \ -'pdf-viewer' 'ps-viewer' 'resolution' 'sections' 'shell' \ -'systems' 'title' 'troff-device' 'www-viewer' 'xrm' 'x-viewer'"; - -##### 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=""; -_OPTS_GROFF_LONG_ARG=""; - -###### man options (for parsing $MANOPT only) - -_OPTS_MAN_SHORT_NA="'7' 'a' 'c' 'd' 'D' 'f' 'h' 'k' 'l' 't' 'u' \ -'V' 'w' 'Z'"; -_OPTS_MAN_SHORT_ARG="'e' 'L' 'm' 'M' 'p' 'P' 'r' 'S' 'T'"; - -_OPTS_MAN_LONG_NA="'all' 'ascii' 'apropos' 'catman' 'debug' 'default' \ -'ditroff' 'help' 'local-file' 'location' 'troff' 'update' 'version' \ -'whatis' 'where'"; - -_OPTS_MAN_LONG_ARG="'extension' 'locale' 'manpath' \ -'pager' 'preprocessor' 'prompt' 'sections' 'systems' 'troff-device'"; - -###### collections of options - -# groffer - -_OPTS_GROFFER_LONG="${_OPTS_GROFFER_LONG_ARG} ${_OPTS_GROFFER_LONG_NA}"; -_OPTS_GROFFER_SHORT=\ -"${_OPTS_GROFFER_SHORT_ARG} ${_OPTS_GROFFER_SHORT_NA}"; - -# groff - -_OPTS_GROFF_LONG="${_OPTS_GROFF_LONG_ARG} ${_OPTS_GROFF_LONG_NA}"; -_OPTS_GROFF_SHORT="${_OPTS_GROFF_SHORT_ARG} ${_OPTS_GROFF_SHORT_NA}"; - -# all command line options - -_OPTS_CMDLINE_SHORT_NA="\ -${_OPTS_GROFFER_SHORT_NA} ${_OPTS_GROFF_SHORT_NA}"; -_OPTS_CMDLINE_SHORT_ARG="\ -${_OPTS_GROFFER_SHORT_ARG} ${_OPTS_GROFF_SHORT_ARG}"; -_OPTS_CMDLINE_SHORT="${_OPTS_GROFFER_SHORT} ${_OPTS_GROFF_SHORT}"; - -_OPTS_CMDLINE_LONG_NA="${_OPTS_GROFFER_LONG_NA} \ -${_OPTS_GROFF_LONG_NA} ${_OPTS_MAN_LONG_NA}"; -_OPTS_CMDLINE_LONG_ARG="${_OPTS_GROFFER_LONG_ARG} \ -${_OPTS_GROFF_LONG_ARG} ${_OPTS_MAN_LONG_ARG}"; -_OPTS_CMDLINE_LONG="${_OPTS_GROFFER_LONG} ${_OPTS_GROFF_LONG}"; - - -######################################################################## -# 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; # branch to `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_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_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_TTY_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_WWW; # viewer program for www mode -export _OPT_VIEWER_X; # viewer program for x mode -export _OPT_WHATIS; # print the one-liner man info -export _OPT_X; # groff option -X. -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 - - -######################################################################## -# Test of rudimentary shell functionality -######################################################################## - - -######################################################################## -# Test of `test'. -# -test "a" = "a" || exit 1; - - -######################################################################## -# Test of `echo' and the `$()' construct. -# -echo -n '' >/dev/null || exit "${_ERROR}"; -if test "$(echo -n 'te' && echo -n '' && echo -n 'st')" != "test"; then - exit "${_ERROR}"; +export _GROFF_VERSION +_GROFF_VERSION='@VERSION@'; +if test _@VERSION@_ = _${_AT}VERSION${_AT}_ +then + _GROFF_VERSION='1.19.2'; 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 - : +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 - echo 'shell does not support function definitions.' >&2; - exit "${_ERROR}"; + _AT_BINDIR_AT='@BINDIR@'; + _AT_G_AT='@g@'; + _AT_LIBDIR_AT='@libdir@'; + _GROFFER_LIBDIR="${_AT_LIBDIR_AT}"'/groff/groffer'; 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='no'; - _OPT_BD=''; - _OPT_BG=''; - _OPT_BW=''; - _OPT_DEBUG='no'; - _OPT_DEFAULT_MODES=''; - _OPT_DEVICE=''; - _OPT_DISPLAY=''; - _OPT_FG=''; - _OPT_FN=''; - _OPT_GEOMETRY=''; - _OPT_LANG=''; - _OPT_LOCATION='no'; - _OPT_MODE=''; - _OPT_MANPATH=''; - _OPT_PAGER=''; - _OPT_RESOLUTION=''; - _OPT_RV=''; - _OPT_SECTIONS=''; - _OPT_SYSTEMS=''; - _OPT_TITLE=''; - _OPT_TTY_DEVICE=''; - _OPT_V='no'; - _OPT_VIEWER_DVI=''; - _OPT_VIEWER_PDF=''; - _OPT_VIEWER_PS=''; - _OPT_VIEWER_WWW=''; - _OPT_VIEWER_X=''; - _OPT_WHATIS='no'; - _OPT_X='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; - 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."; +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; -############# -# 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; -} - - -############# -# 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.'; - ;; - *!*) - # split at first bang `!'. - _FUNC_STACK="$(echo -n ${_FUNC_STACK} \ - | sed -e 's/^[^!]*!//')"; - ;; - *) - _FUNC_STACK=''; - ;; - esac; - fi; -} - - -############# -# 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}"; - fi; - fi; -} - - -############# -# func_stack_dump () -# -# Print the content of the stack. Ignore the arguments. -# -func_stack_dump() -{ - diag 'call stack:'; - case "${_FUNC_STACK}" in - *!*) - _rest="${_FUNC_STACK}"; - while test "${_rest}" != ''; do - # get part before the first bang `!'. - diag "$(echo -n "${_rest}" | sed -e 's/!.*$//')"; - # delete part before and including the first bang `!'. - _rest="$(echo -n "${_rest}" | sed -e 's/^[^!]*!//')"; - done; - ;; - *) - diag "${_FUNC_STACK}"; - ;; - esac; -} - - -######################################################################## -# System Test -######################################################################## - -landmark "2: system test"; - -# Test the availability of the system utilities used in this script. - - -######################################################################## -# Test of `true'. -# -if true >/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}"; -} - -if _t_e_s_t_f_u_n_c_; then - : -else - local() - { - if test "$1" != ''; then - error "overriding global variable \`$1' with local value."; - fi; - } -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'; -} - -_t_e_s_t_f_u_n_c_; -if test "${_global}" != 'inside' || test "${_clobber}" != 'outside'; +export _NULL_DEV; +if test -c /dev/null then - error "Cannot assign to global variables from within functions."; + _NULL_DEV="/dev/null"; +else + _NULL_DEV="NUL"; 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'; +# Test of the `$()' construct. +if test _"$(echo "$(echo 'test')")"_ \ + != _test_ then - error 'Test of "sed" command failed.'; + echo 'The "$()" construct did not work.' >&2; + exit "${_ERROR}"; +fi; + +# 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; -######################################################################## -# Test of function `cat'. -# -if test "$(echo test | cat)" != "test"; then - error 'Test of "cat" command failed.'; -fi; +########################### configuration - -######################################################################## -# 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 - - -######################################################################## -# base_name () -# -# Get the file name part of , i.e. delete everything up to last -# `/' from the beginning of . -# -# Arguments : 1 -# Output : the file name part (without slashes) -# -base_name() -{ - func_check base_name = 1 "$@"; - case "$1" in - */) - do_nothing; - ;; - */*) - # delete everything before and including the last slash `/'. - echo -n "$1" | sed -e '\|^.*//*\([^/]*\)$|s||\1|'; - ;; - *) - echo -n "$1"; - ;; - 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 is_yes "${_HAS_BZIP}"; 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}"; - } -else - catz() - { - func_check catz = 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 "$@"; - 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 is_yes "${_MAN_ENABLE}"; then - if is_yes "${_MAN_FORCE}"; then - set -- 'Manpage' 'File'; - else - set -- 'File' 'Manpage'; - fi; +# 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 - set -- 'File'; + GROFFER_OPT="${o} ${GROFFER_OPT}"; 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 is_not_yes "${_MAN_IS_SETUP}"; 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 test "$#" -eq 0; then - eval "${return_ok}"; - fi; - for i in "$@"; do - if is_not_empty "$i"; 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 is_not_empty "$1" && test -d "$1" && test -r "$1"; then - eval "${return_yes}"; - else - eval "${return_no}"; fi; - eval "${return_ok}"; -} +done; - -######################################################################## -# 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 -z "$1"; then - eval "${return_yes}"; - else - eval "${return_no}"; - fi; - eval "${return_ok}"; -} - - -######################################################################## -# 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}"; - else - eval "${return_no}"; - fi; - eval "${return_ok}"; -} - - -######################################################################## -# 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}"; - else - eval "${return_no}"; - fi; - eval "${return_ok}"; -} - - -######################################################################## -# 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}"; - else - eval "${return_yes}"; - fi; - eval "${return_ok}"; -} - - -######################################################################## -# 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}"; - else - eval "${return_yes}"; - fi; - eval "${return_ok}"; -} - - -######################################################################## -# is_not_equal ( ) -# -# Test whether `string1' and differ. -# -# Arguments : 2 -# -is_not_equal() -{ - func_check is_not_equal = 2 "$@"; - if is_equal "$1" "$2"; then - eval "${return_no}"; - else - eval "${return_yes}"; - fi; - eval "${return_ok}"; -} - - -######################################################################## -# 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}"; - else - eval "${return_yes}"; - fi; - eval "${return_ok}"; -} - - -######################################################################## -# 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}"; - else - eval "${return_yes}"; - fi; - eval "${return_ok}"; -} - - -######################################################################## -# is_not_yes () -# -# Test whether `string' is not "yes". -# -# Arguments : 1 -# -is_not_yes() -{ - func_check is_not_yes = 1 "$@"; - if test "$1" = 'yes'; then - eval "${return_no}"; - else - eval "${return_yes}"; - fi; - eval "${return_ok}"; -} - - -######################################################################## -# is_prog () -# -# Determine whether arg is a program in $PATH -# -# Arguments : >=1 (empty allowed) -# more args are ignored, this allows to specify progs with arguments -# -is_prog() -{ - func_check is_prog '>=' 1 "$@"; - if where "$1" >/dev/null; then - eval "${return_yes}"; - else - eval "${return_no}"; - fi; - eval "${return_ok}"; -} - - -######################################################################## -# 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 test "$1" = 'yes'; then - eval "${return_yes}"; - else - eval "${return_no}"; - fi; - eval "${return_ok}"; -} - - -######################################################################## -# 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_append ( ...) -# -# Arguments: >=2 -# : a space-separated list of single-quoted elements. -# : some sequence of characters. -# Output: -# if is empty: "'' '...'" -# otherwise: " '' ..." -# -list_append() -{ - func_check list_append '>=' 2 "$@"; - local _element; - local _res; - _res="$1"; +# integrate $GROFFER_OPT into the command line; it isn't needed any more +if test _"${GROFFER_OPT}"_ != __ +then + eval set x "${GROFFER_OPT}" '"$@"'; 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 for `sed'. - _element="$(echo -n "$s" | sed -e 's/'"${_SQUOTE}"'/&\\&&/g')"; + GROFFER_OPT=''; +fi; + + +########################### 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; + ;; + --shell=*|--sh=*|--she=*|--shel=*) + # delete up to first "=" character + s="$(echo x"$1" | sed -e 's/^x[^=]*=//')"; ;; *) - _element="$s"; - ;; - esac; - _res="${_res} '${_element}'"; - done; - echo -n "${_res}"; - eval "${return_ok}"; -} + shift; + continue; + esac; + if test _"${x}"_ = __ + then + x="'${s}'"; + else + x="'${s}' ${x}"; + fi; + shift; + done; - -######################################################################## -# list_check () -# -# 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 single-quotes left. Watch out for escaped single quotes; they -# have the form '\'' (sq bs sq sq). -# -# Arguments: 1 -# Output: the argument unchanged, it the check succeeded. -# -list_check() -{ - func_check list_check = 1 "$@"; - local _list; - if is_empty "$1"; then - eval "${return_ok}"; - fi; - case "$1" in - \'*\') _list="$1"; ;; - *) - error "list_check() bad list: $1" - ;; - esac; - # Remove leading single quote, - # remove final single quote, - # remove escaped single quotes (squote bslash squote squote) - # [note that `sed' doubles the backslash (bslash bslash)], - # remove field separators (squote space squote). - _list="$(echo -n "${_list}" \ - | sed -e 's/^'"${_SQUOTE}"'//' \ - | sed -e 's/'"${_SQUOTE}"'$//' \ - | sed -e \ - 's/'"${_SQUOTE}${_BSLASH}${_BSLASH}${_SQUOTE}${_SQUOTE}"'//g' \ - | sed -e 's/'"${_SQUOTE}${_SPACE}${_SPACE}"'*'"${_SQUOTE}"'//g')"; - case "${_list}" in - *\'*) # criterium fails if squote is left - error 'list_check() bad list: '"${_list}"; - ;; - esac; - echo -n "$1"; - eval "${return_ok}"; -} - - -######################################################################## -# list_element_from_arg () -# -# Arguments: 1 -# : some sequence of characters (also single quotes allowed). -# Output: the list element generated from . -# -list_element_from_arg() -{ - func_check list_element_from_arg = 1 "$@"; - local _res; - echo -n "'"; - # replace each single quote "'" by "'\''". - echo -n "$1" | sed -e 's/'\''/&\\&&/g'; # ' for emacs - echo -n "'"; - eval "${return_ok}"; -} - - -######################################################################## -# list_from_args (...) -# -# Generate a space-separated list of single-quoted elements from args. -# -# Arguments: -# : some sequence of characters. -# Output: "'' '...'" -# -list_from_args() -{ - func_check list_from_args '>=' 1 "$@"; - local _list; - _list=""; - for s in "$@"; do - _list="$(list_append "${_list}" "$s")"; - done; - echo -n "${_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 the command line (by "$@"). -# -# 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 (default), non-options 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_check "$1")"; # short options, no argument - _short_a="$(list_check "$2")"; # short options with argument - _long_n="$(list_check "$3")"; # long options, no argument - _long_a="$(list_check "$4")"; # long options with argument - shift 4; - _fn='list_from_cmdline():'; # for error messages - if test "$#" -eq 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 - _result="$(list_append "${_result}" "--${_opt}")"; - continue; - fi; - if list_has "${_long_a}" "${_opt}"; then - # long option with argument - _result="$(list_append "${_result}" "--${_opt}")"; - if test "$#" -le 0; then - error "${_fn} no argument for option --${_opt}." - fi; - _result="$(list_append "${_result}" "$1")"; - shift; - 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/^[^=]*=//')"; - _result="$(list_append "${_result}" \ - "--${_lopt}" "${_optarg}")"; - continue; - fi; - fi; - error "${_fn} --${_opt} is not an option." - ;; - -?*) # short option (cluster) - # delete leading `-'; - _rest="$(echo -n "${_arg}" | sed -e 's/^.//')"; - while is_not_empty "${_rest}"; 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 - _result="$(list_append "${_result}" "-${_optchar}")"; - continue; - elif list_has "${_short_a}" "${_optchar}"; then - # remove leading character - case "${_optchar}" in - /) - _rest="$(echo -n "${_rest}" | sed -e '\|^.|s|||')"; - ;; - ?) - _rest="$(echo -n "${_rest}" | sed -e 's/^.//')"; - ;; - ??*) - error "${_fn} several chars parsed for short option." - ;; - esac; - if is_empty "${_rest}"; then - if test "$#" -ge 1; then - _result="$(list_append "${_result}" \ - "-${_optchar}" "$1")"; - shift; - continue; - else - error \ - "${_fn}"' no argument for option -'"${_optchar}." - fi; - else # rest is the argument - _result="$(list_append "${_result}" \ - "-${_optchar}" "${_rest}")"; - _rest=''; + # 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 < ...) -# -# Generate a list from the concatenation of the lists in the arguments. -# -# Arguments: >=2 -# : string of space-separated single-quoted elements. -# Output: "'' ..." -# -list_from_lists() -{ - func_check list_from_lists '>=' 2 "$@"; - _list=''; - echo -n "$*"; - eval "${return_ok}"; -} - -######################################################################## -# list_from_split ( ) -# -# In escape white space and replace each by space. -# -# Arguments: 2: a that is to be split into parts divided by -# -# Output: the resulting 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_has ( ) -# -# Arguments: 2 -# : a space-separated list of single-quoted elements. -# : some sequence of characters. -# Output: -# if is empty: "'' '...'" -# otherwise: " '' ..." -# -list_has() -{ - func_check list_has = 2 "$@"; - if is_empty "$1"; then - eval "${return_no}"; - fi; - _list="$1"; - _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 "$@"; - if is_empty "$1"; then - eval "${return_yes}"; - fi; - _list="$1"; - _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}"; -} - - -######################################################################## -# list_length () -# -# Arguments: 1 -# : a space-separated list of single-quoted elements. -# Output: the number of elements in -# -list_length() -{ - func_check list_length = 1 "$@"; - eval set -- "$1"; - echo -n "$#"; - eval "${return_ok}"; -} - - -######################################################################## -# list_prepend ( ...) -# -# Insert new at the beginning of -# -# Arguments: >=2 -# : a space-separated list of single-quoted elements. -# : some sequence of characters. -# Output: -# if is empty: "'' ..." -# otherwise: "'' ... " -# -list_prepend() -{ - func_check list_prepend '>=' 2 "$@"; - local _res; - _res="$1"; - shift; - for s in "$@"; do - # escape single quotes in list style (squote bslash squote squote). - _element="$(echo -n "$s" | sed -e 's/'\''/&\\&&/g')"; - _res="'${_element}' ${_res}"; - done; - echo -n "${_res}"; - 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 is_empty "${_MAN_PATH}"; 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:?*.?*) # man:name.section - _name="$(echo -n "${_spec}" \ - | sed -e 's/^man:\(..*\)\.\(..*\)$/\1/')"; - _section="$(echo -n "${_spec}" \ - | sed -e 's/^man:\(..*\)\.\(..*\)$/\2/')"; - ;; - 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/')"; - ;; - ?*.?*) # name.section - _name="$(echo -n "${_spec}" \ - | sed -e 's/^\(..*\)\.\(..*\)$/\1/')"; - _section="$(echo -n "${_spec}" \ - | sed -e 's/^\(..*\)\.\(..*\)$/\2/')"; - ;; - ?*) - _name="${_filespec}"; - ;; - esac; - if is_empty "${_name}"; then - eval "${return_bad}"; - fi; - _got_one='no'; - if is_empty "${_section}"; then - eval set -- "${_MAN_AUTO_SEC}"; - for s in "$@"; do - if man_search_section "${_name}" "$s"; then # found - if is_yes "${_MAN_ALL}"; 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 is_yes "${_MAN_ALL}" && 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 is_empty "${_MAN_PATH}"; 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 is_empty "${_MAN_EXT}"; then - for d in "$@"; do - _dir="$(dirname_append "$d" "man${_section}")"; - if is_dir "${_dir}"; then - _prefix="$(dirname_append "${_dir}" "${_name}.${_section}")"; - for f in $(echo -n ${_prefix}*); do - if is_file "$f"; then - if is_yes "${_got_one}"; then - register_file "$f"; - elif is_yes "${_MAN_ALL}"; 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 is_dir "${_dir}"; then - _prefix="$(dirname_append "${_dir}" "${_name}.${_section}")"; - for f in ${_prefix}*; do - if is_file "$f"; then - if is_yes "${_got_one}"; then - register_file "$f"; - elif is_yes "${_MAN_ALL}"; 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 is_dir "${_dir}"; then - _prefix="$(dirname_append "${_dir}" \ - "${_name}.${_section}${_ext}")"; - for f in ${_prefix}*; do - if is_file "$f"; then - if is_yes "${_got_one}"; then - register_file "$f"; - elif is_yes "${_MAN_ALL}"; 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 is_yes "${_MAN_ALL}" && 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 is_yes "${_MAN_IS_SETUP}"; then - eval "${return_ok}"; - fi; - _MAN_IS_SETUP='yes'; - - if is_not_yes "${_MAN_ENABLE}"; then - eval "${return_ok}"; - fi; - - # determine basic path for man pages - _MAN_PATH="$(get_first_essential \ - "${_OPT_MANPATH}" "${_MANOPT_PATH}" "${MANPATH}")"; - if is_empty "${_MAN_PATH}"; then - if is_prog 'manpath'; then - _MAN_PATH="$(manpath 2>/dev/null)"; # not always available - fi; - fi; - if is_empty "${_MAN_PATH}"; then - manpath_set_from_path; - else - _MAN_PATH="$(path_clean "${_MAN_PATH}")"; - fi; - if is_empty "${_MAN_PATH}"; then - _MAN_ENABLE="no"; - eval "${return_ok}"; - fi; - - _MAN_ALL="$(get_first_essential "${_OPT_ALL}" "${_MANOPT_ALL}")"; - if is_empty "${_MAN_ALL}"; 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 is_empty "${_MAN_PATH}"; 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 is_empty "${_MAN_PATH}"; 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 - # - local d; -# if test "$#" -ne 2; then -# error "manpath_add_system_single() needs 2 arguments."; -# fi; - _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 path_not_contains "${_res}" "${_dir}" && is_dir "${_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 is_not_empty "${PATH}"; 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 path_not_contains "${_manpath}" "$d" && is_dir "$d"; then - _manpath="${_manpath}:$d"; - fi; - done; - - _MAN_PATH="${_manpath}"; - eval "${return_ok}"; -} # manpath_set_from_path() - - -######################################################################## -landmark '9: path_*()'; -######################################################################## - -######################################################################## -# 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 test "$#" -ne 1; then - error 'path_clean() needs 1 argument.'; - fi; - _arg="$1"; - eval set -- "$(path_split "${_arg}")"; - _res=""; - for i in "$@"; do - if is_not_empty "$i" \ - && path_not_contains "${_res}" "$i" \ - && is_dir "$i"; + )"; + if test _"${s}"_ != __ then - case "$i" in - ?*/) _res="${_res}$(dirname_chop "$i")"; ;; - *) _res="${_res}:$i"; - esac; + cat <${_NULL_DEV})"_ = _ok_ >&2 + then + _SHELL="$s"; + break; 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}"; -} - - -######################################################################## -# reset () -# -# Reset the variables that can be affected by options to their default. -# -# -# Defined in section `Preset' after the rudimentary shell tests. - - -######################################################################## -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 is_empty "${_title}"; then - eval "${return_ok}"; - fi; - _REGISTERED_TITLE="${_REGISTERED_TITLE} ${_title}"; - eval "${return_ok}"; -} - - -######################################################################## -# save_stdin () -# -# Store standard input to temporary file (with decompression). -# -if test "${_HAS_COMPRESSION}" = '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; - _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 is_yes "${_OPT_LOCATION}"; then - echo2 "$1"; - fi; - if is_yes "${_OPT_WHATIS}"; 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 -# -usage() -{ - func_check usage = 0 "$@"; - echo2; - version; - cat >&2 <&2 <&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 is_not_empty "${_res}"; 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 is_not_empty "${_res}"; 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 is_empty "${_arg}"; 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; - - for f in ${_CONFFILES}; do - if is_file "$f"; then - . "$f"; - fi; - done; - - # determine temporary directory - umask 000; - _TMP_DIR=''; - for d in "${GROFF_TMPDIR}" "${TMPDIR}" "${TMP}" "${TEMP}" \ - "${TEMPDIR}" "${HOME}"'/tmp' '/tmp' "${HOME}" '.'; - do - if test "$d" != ""; then - if test -d "$d" && test -r "$d" && test -w "$d"; then - _TMP_DIR="${d}/${_PROGRAM_NAME}${_PROCESS_ID}"; - if test -d "${_TMP_DIR}"; then - rm -f "${_TMP_DIR}"/*; - break; - else - mkdir "${_TMP_DIR}"; - if test ! -d "${_TMP_DIR}"; then - _TMP_DIR=''; - continue; - fi; - break; - fi; - fi; - if test ! -w "${_TMP_DIR}"; then - _TMP_DIR=''; - continue; - fi; - fi; - done; - unset d; - if test "${_TMP_DIR}" = ''; then - error "Couldn't create a directory for storing temporary files."; - fi; - - _TMP_CAT="$(tmp_create groffer_cat)"; - _TMP_STDIN="$(tmp_create groffer_input)"; - 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_MAN_* -# 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 test "${MANOPT}" != ''; then - MANOPT="$(echo -n "${MANOPT}" | \ - sed -e 's/^'"${_SPACE}${_SPACE}"'*//')"; - fi; - if test "${MANOPT}" = ''; then - eval "${return_ok}"; - fi; - # add arguments in $MANOPT by mapping them to groffer options - eval set -- "$(list_from_cmdline \ - "${_OPTS_MAN_SHORT_NA}" "${_OPTS_MAN_SHORT_ARG}" \ - "${_OPTS_MAN_LONG_NA}" "${_OPTS_MAN_LONG_ARG}" \ - "${MANOPT}")"; - until test "$#" -le 0 || is_equal "$1" '--'; do - _opt="$1"; - shift; - case "${_opt}" in - -7|--ascii) - _list="$(list_append "${_list}" '--ascii')"; - ;; - -a|--all) - _list="$(list_append "${_list}" '--all')"; - ;; - -c|--catman) - do_nothing; - shift; - ;; - -d|--debug) - _list="$(list_append "${_list}" '--debug')"; - ;; - -D|--default) - # undo all man options so far - _list=''; - ;; - -e|--extension) - _list="$(list_append "${_list}" '--extension')"; - shift; - ;; - -f|--whatis) - _list="$(list_append "${_list}" '--whatis')"; - shift; - ;; - -h|--help) - do_nothing; - shift; - ;; - -k|--apropos) - _list="$(list_append "${_list}" '--apropos')"; - shift; - ;; - -l|--local-file) - _list="$(list_append "${_list}" '--local-file')"; - ;; - -L|--locale) - _list="$(list_append "${_list}" '--locale' "$1")"; - shift; - ;; - -m|--systems) - _list="$(list_append "${_list}" '--systems' "$1")"; - shift; - ;; - -M|--manpath) - _list="$(list_append "${_list}" '--manpath' "$1")"; - shift; - ;; - -p|--preprocessor) - do_nothing; - shift; - ;; - -P|--pager) - _list="$(list_append "${_list}" '--pager' "$1")"; - shift; - ;; - -r|--prompt) - do_nothing; - shift; - ;; - -S|--sections) - _list="$(list_append "${_list}" '--sections' "$1")"; - shift; - ;; - -t|--troff) - do_nothing; - shift; - ;; - -T|--device) - _list="$(list_append "${_list}" '-T' "$1")"; - shift; - ;; - -u|--update) - do_nothing; - shift; - ;; - -V|--version) - do_nothing; - ;; - -w|--where|--location) - _list="$(list_append "${_list}" '--location')"; - ;; - -Z|--ditroff) - _list="$(list_append "${_list}" '-Z' "$1")"; - shift; - ;; - # ignore all other options - esac; - done; - GROFFER_OPT="$(list_from_lists "${_list}" "${GROFFER_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 -# -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"; - shift; - ;; - -v|--version) - version; - leave; - ;; - -V) - _OPT_V='yes'; - ;; - -X) - _OPT_X='yes'; - ;; - -Z|--ditroff|--intermediate-output) - # groff intermediate output - _OPT_Z='yes'; - ;; - -?) - # delete leading `-' - _optchar="$(echo -n "${_opt}" | sed -e 's/^.//')"; - if list_has "${_OPTS_GROFF_SHORT_NA}" "${_optchar}"; - then - _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" \ - "${_opt}")"; - elif list_has "${_OPTS_GROFF_SHORT_ARG}" "${_optchar}"; - then - _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" \ - "${_opt}" "$1")"; - shift; - else - error "Unknown option : \`$1'"; - fi; - ;; - --all) - _OPT_ALL="yes"; - ;; - --ascii) - _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" \ - '-mtty-char')"; - ;; - --apropos) - _OPT_APROPOS="yes"; - ;; - --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) # sequence of modes in auto mode; arg - _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'; - ;; - --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|'') # the default automatic mode - _mode=''; - ;; - groff) # pass input to plain groff - _mode='groff'; - ;; - dvi) # display with xdvi viewer - _mode='dvi'; - ;; - pdf) # display with PDF viewer - _mode='pdf'; - ;; - ps) # display with Postscript viewer - _mode='ps'; - ;; - X|x) # output on X roff viewer - _mode='x'; - ;; - tty) # output on terminal - _mode='tty'; - ;; - 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; - ;; - --title) # title for X viewers; arg - _OPT_TITLE="$1"; - shift; - ;; - --tty) - _OPT_MODE="tty"; - ;; - --tty-device) # device for tty mode; arg - _OPT_TTY_DEVICE="$1"; - shift; - ;; - --whatis) - _OPT_WHATIS='yes'; - ;; - --www) # display with web browser - _OPT_MODE='www'; - ;; - --www-viewer) # viewer program for www mode; arg - _OPT_VIEWER_WWW="$1"; - shift; - ;; - --x) - _OPT_MODE='x'; - ;; - --xrm) # pass X resource string, arg; - _OPT_XRM="$(list_append "${_OPT_XRM}" "$1")"; - shift; - ;; - --x-viewer) # viewer program for x mode; arg - _OPT_VIEWER_X="$1"; - shift; - ;; - *) - error 'error on argument parsing : '"\`$*'"; - ;; - esac; - done; - shift; # remove `--' argument - - if test "${_DEBUG}" != 'yes'; then - if test "${_OPT_DEBUG}" = 'yes'; then - _DEBUG='yes'; - fi; - fi; - - # Remaining arguments are file names (filespecs). - # Save them to list $_FILEARGS - if test "$#" -eq 0; then # use "-" for standard input - set -- '-'; - fi; - _FILEARGS="$(list_from_args "$@")"; - if list_has "$_FILEARGS" '-'; then - save_stdin; - fi; - # $_FILEARGS must be retrieved with `eval set -- "$_FILEARGS"' - eval "${return_ok}"; -} # main_parse_args() - - -######################################################################## -# 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 is_yes "${_OPT_APROPOS}"; then - apropos "$@"; - _code="$?"; - clean_up; - exit "${_code}"; - fi; - - # set display - if is_not_empty "${_OPT_DISPLAY}"; then - DISPLAY="${_OPT_DISPLAY}"; - fi; - - if is_yes "${_OPT_V}"; then - _DISPLAY_MODE='groff'; - _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" '-V')"; - fi; - if is_yes "${_OPT_X}"; then - _DISPLAY_MODE='groff'; - _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" '-X')"; - fi; - if is_yes "${_OPT_Z}"; then - _DISPLAY_MODE='groff'; - _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" '-Z')"; - fi; - if is_equal "${_OPT_MODE}" 'groff'; then - _DISPLAY_MODE='groff'; - fi; - if is_equal "${_DISPLAY_MODE}" 'groff'; then - eval "${return_ok}"; - fi; - - if is_equal "${_OPT_MODE}" 'source'; then - _DISPLAY_MODE='source'; - eval "${return_ok}"; - fi; - - case "${_OPT_MODE}" in - '') # automatic mode - case "${_OPT_DEVICE}" in - X*) - if is_empty "${DISPLAY}"; then - error "no X display found for device ${_OPT_DEVICE}"; - fi; - _DISPLAY_MODE='x'; - eval "${return_ok}"; - ;; - ascii|cp1047|latin1|utf8) - _DISPLAY_MODE='tty'; - eval "${return_ok}"; - ;; - esac; - if is_empty "${DISPLAY}"; then - _DISPLAY_MODE='tty'; - eval "${return_ok}"; - fi; - - if is_empty "${_OPT_DEFAULT_MODES}"; then - _modes="${_DEFAULT_MODES}"; - else - _modes="${_OPT_DEFAULT_MODES}"; - fi; - ;; - tty) - _DISPLAY_MODE='tty'; - eval "${return_ok}"; - ;; - *) # display mode was given - if is_empty "${DISPLAY}"; 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 - tty) - _DISPLAY_MODE='tty'; - eval "${return_ok}"; - ;; - x) - if is_not_empty "${_OPT_VIEWER_X}"; then - _viewers="${_OPT_VIEWER_X}"; - else - _viewers="${_VIEWER_X}"; - fi; - _viewer="$(_get_first_prog "${_viewers}")"; - if test "$?" -ne 0; then - continue; - fi; - _DISPLAY_PROG="${_viewer}"; - _DISPLAY_MODE='x'; - eval "${return_ok}"; - ;; - dvi) - if is_not_empty "${_OPT_VIEWER_DVI}"; then - _viewers="${_OPT_VIEWER_DVI}"; - else - _viewers="${_VIEWER_DVI}"; - fi; - _viewer="$(_get_first_prog "${_viewers}")"; - if test "$?" -ne 0; then - continue; - fi; - _DISPLAY_PROG="${_viewer}"; - _DISPLAY_MODE="dvi"; - eval "${return_ok}"; - ;; - pdf) - if is_not_empty "${_OPT_VIEWER_PDF}"; then - _viewers="${_OPT_VIEWER_PDF}"; - else - _viewers="${_VIEWER_PDF}"; - fi; - _viewer="$(_get_first_prog "${_viewers}")"; - if test "$?" -ne 0; then - continue; - fi; - _DISPLAY_PROG="${_viewer}"; - _DISPLAY_MODE="pdf"; - eval "${return_ok}"; - ;; - ps) - if is_not_empty "${_OPT_VIEWER_PS}"; then - _viewers="${_OPT_VIEWER_PS}"; - else - _viewers="${_VIEWER_PS}"; - fi; - _viewer="$(_get_first_prog "${_viewers}")"; - if test "$?" -ne 0; then - continue; - fi; - _DISPLAY_PROG="${_viewer}"; - _DISPLAY_MODE="ps"; - eval "${return_ok}"; - ;; - www) - if is_not_empty "${_OPT_VIEWER_WWW}"; then - _viewers="${_OPT_VIEWER_WWW}"; - else - _viewers="${_VIEWER_WWW}"; - fi; - _viewer="$(_get_first_prog "${_viewers}")"; - if test "$?" -ne 0; then - continue; - fi; - _DISPLAY_PROG="${_viewer}"; - _DISPLAY_MODE="www"; - eval "${return_ok}"; - ;; - esac; - done; - error "no suitable display mode found."; -} - -_get_first_prog() -{ - local i; - if test "$#" -eq 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 is_empty "$i"; 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. -# -landmark '18: main_set_resources()'; -main_set_resources() -{ - func_check main_set_resources = 0 "$@"; - local _prog; # viewer program - local _rl; # resource list - _rl=''; - if is_empty "${_DISPLAY_PROG}"; then - eval "${return_ok}"; - fi; - set -- ${_DISPLAY_PROG}; - _prog="$(base_name "$1")"; - if is_not_empty "${_OPT_BD}"; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - _rl="$(list_append "$_rl" '-bd' "${_OPT_BD}")"; - ;; - esac; - fi; - if is_not_empty "${_OPT_BG}"; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - _rl="$(list_append "$_rl" '-bg' "${_OPT_BG}")"; - ;; - xpdf) - _rl="$(list_append "$_rl" '-papercolor' "${_OPT_BG}")"; - ;; - esac; - fi; - if is_not_empty "${_OPT_BW}"; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - _rl="$(list_append "$_rl" '-bw' "${_OPT_BW}")"; - ;; - esac; - fi; - if is_not_empty "${_OPT_FG}"; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - _rl="$(list_append "$_rl" '-fg' "${_OPT_FG}")"; - ;; - esac; - fi; - if is_not_empty "${_OPT_FN}"; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - _rl="$(list_append "$_rl" '-fn' "${_OPT_FN}")"; - ;; - esac; - fi; - if is_not_empty "${_OPT_GEOMETRY}"; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi|xpdf) - _rl="$(list_append "$_rl" '-geometry' "${_OPT_GEOMETRY}")"; - ;; - esac; - fi; - if is_empty "${_OPT_RESOLUTION}"; then - case "${_prog}" in - gxditview|xditview) - _rl="$(list_append "$_rl" \ - '-resolution' "${_DEFAULT_RESOLUTION}")"; - ;; - xpdf) - case "${_DEFAULT_RESOLUTION}" in - 75) - _rl="$(list_append "$_rl" '-z' '2')"; - ;; - 100) - _rl="$(list_append "$_rl" '-z' '3')"; - ;; - esac; - ;; - esac; - else - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - _rl="$(list_append "$_rl" '-resolution' "${_OPT_RESOLUTION}")"; - ;; - xpdf) - case "${_OPT_RESOLUTION}" in - 75) - _rl="$(list_append "$_rl" '-z' '2')"; - ;; - 100) - _rl="$(list_append "$_rl" '-z' '3')"; - ;; - esac; - ;; - esac; - fi; - if is_not_empty "${_OPT_RV}"; then - case "${_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - _rl="$(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 - _rl="$(list_append "$_rl" '-xrm' "$i")"; - done; - ;; - esac; - fi; - _title="$(get_first_essential \ - "${_OPT_TITLE}" "${_REGISTERED_TITLE}")"; - if is_not_empty "${_title}"; then - case "${_prog}" in - gxditview|xditview) - _rl="$(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; - - # Some display programs have trouble with empty input. - # This is avoided by feeding a space character in this case. - # Test on non-empty file by tracking a line with at least 1 character. - if is_empty "$(tmp_cat | sed -e '/./q')"; then - echo ' ' > "${_TMP_CAT}"; - fi; - - case "${_DISPLAY_MODE}" in - groff) - _ADDOPTS_GROFF="${_ADDOPTS_GROFF} ${_ADDOPTS_POST}"; - if is_not_empty "${_OPT_DEVICE}"; 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; - _PROCESS_ID="$$"; - _modefile="${_TMP_DIR}/${_PROGRAM_NAME}${_PROCESS_ID}"; - rm -f "${_modefile}"; - mv "${_TMP_CAT}" "${_modefile}"; - rm -f "${_TMP_CAT}"; - cat "${_modefile}" | \ - ( - clean_up() - { - rm -f "${_modefile}"; - } - trap clean_up 0 2>/dev/null || true; - eval "${_groggy}" "${_ADDOPTS_GROFF}"; - ) &' - ;; - tty) - case "${_OPT_DEVICE}" in - '') - _device="$(get_first_essential \ - "${_OPT_TTY_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})"; - _pager=''; - for p in "${_OPT_PAGER}" "${PAGER}" "${_MANOPT_PAGER}" \ - 'less' 'more' 'cat'; do - if is_prog "$p"; then - _pager="$p"; - break; - fi; - done; - if is_empty "${_pager}"; then - error 'no pager program found for tty mode'; - fi; - tmp_cat | eval "${_groggy}" "${_addopts}" | \ - eval "${_pager}"; - 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; - ;; - pdf) - case "${_OPT_DEVICE}" in - ''|ps) - do_nothing; - ;; - *) - warning \ - "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; - ;; - esac; - _groggy="$(tmp_cat | grog -Tps)"; - trap_clean; - # start a new shell program to get another process ID. - sh -c ' - set -e; - _PROCESS_ID="$$"; - _psfile="${_TMP_DIR}/${_PROGRAM_NAME}${_PROCESS_ID}"; - _modefile="${_TMP_DIR}/${_PROGRAM_NAME}${_PROCESS_ID}.pdf"; - rm -f "${_psfile}"; - rm -f "${_modefile}"; - cat "${_TMP_CAT}" | \ - eval "${_groggy}" "${_ADDOPTS_GROFF}" > "${_psfile}"; - gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \ - -sOutputFile="${_modefile}" -c save pop -f "${_psfile}"; - rm -f "${_psfile}"; - rm -f "${_TMP_CAT}"; - ( - clean_up() - { - rm -f "${_modefile}"; - } - 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; - ;; - www) - case "${_OPT_DEVICE}" in - ''|html) do_nothing; ;; - *) - warning \ - "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; - ;; - esac; - _groggy="$(tmp_cat | grog -Thtml)"; - _do_display; - ;; - 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() -{ - trap_clean; - # start a new shell program for another process ID and better - # cleaning-up of the temporary files. - sh -c ' - set -e; - _PROCESS_ID="$$"; - _modefile="${_TMP_DIR}/${_PROGRAM_NAME}${_PROCESS_ID}"; - 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}"/*; - 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 "$@"; +########################### start groffer2.sh + +if test _"${_SHELL}"_ = _empty_ +then + _SHELL=''; +fi; + +if test _"${_SHELL}"_ = __ +then + # no shell found, so start groffer2.sh normally + eval exec "'${_GROFFER2_SH}'" '"$@"'; + exit; +else + # start groffer2.sh with the found $_SHELL + # do not quote $_SHELL to allow arguments + eval exec "${_SHELL} '${_GROFFER2_SH}'" '"$@"'; + exit; +fi; diff --git a/contrib/groff/contrib/groffer/groffer2.sh b/contrib/groff/contrib/groffer/groffer2.sh new file mode 100644 index 000000000000..60ca91130f6f --- /dev/null +++ b/contrib/groff/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/contrib/mm/ChangeLog b/contrib/groff/contrib/mm/ChangeLog index d678fe8331fe..c1f8985693c1 100644 --- a/contrib/groff/contrib/mm/ChangeLog +++ b/contrib/groff/contrib/mm/ChangeLog @@ -1,3 +1,37 @@ +Thu May 26 08:23:40 2005 Werner LEMBERG + + * m.tmac: Load devtag.tmac. + +Wed Mar 16 06:56:02 2005 Larry Kollar + + Add rudimentary support for grohtml. + + * m.tmac (H): Call DEVTAG-NH and DEVTAG-EO-H. + (pg@enable-trap, pg@header): Do nothing for devhtml. + +Sun Mar 7 16:34:46 2004 Jeff Conrad + + * m.tmac (S): Improve debug message. + +Wed Mar 05:38:57 2004 Joergen Haegg + + * Changed default value for Hy in manual to 0 + * Check Hy at each new page + +Mon Mar 1 22:16:38 2004 Jeff Conrad + + * m.tmac (S): Fix scaling indicator for vertical spacing. + +Tue Nov 05:14:45 2003 Joergen Haegg + + * another patch from ulrich lauther to fix the + TOC up to 14 heading levels. + +Mon Oct 13:48:25 2003 Joergen Haegg + + * problem with more than 7 levels of headings fixed with + patch from ulrich lauther. + Wed Apr 06:42:35 2003 Joergen Haegg * the footer was not adjusted by VM due to a missing diff --git a/contrib/groff/contrib/mm/groff_mm.man b/contrib/groff/contrib/mm/groff_mm.man index 8229f23cd8b7..bd5223d47764 100644 --- a/contrib/groff/contrib/mm/groff_mm.man +++ b/contrib/groff/contrib/mm/groff_mm.man @@ -1,5 +1,5 @@ .\" -.\" $Id: groff_mm.man,v 2.9 2003/03/19 22:05:11 wlemb Exp $ +.\" $Id: groff_mm.man,v 2.13 2004/07/03 12:46:56 wlemb Exp $ .\" .de T2 .if t .ne 2v @@ -7,12 +7,14 @@ \\$1 .sp -1 .. +. .de T3 .if t .ne 2v .ti -.5i \fB\\$1\fP .br .. +. .TH GROFF_MM @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" .SH NAME groff_mm \- groff mm macros @@ -612,7 +614,7 @@ See \fBINITR\fP. .TP .B "H level [heading-text [heading-suffix]]" Numbered section heading. -Section headers can have a level between 1 and 7, level 1 is the +Section headers can have a level between 1 and 14, level 1 is the top level. The text is given in \fIheading-text\fP, and must be surrounded by double quotes if it contains spaces. @@ -679,8 +681,8 @@ is centerered. The font of each heading level is controlled by string \fBHF\fP. It contains a fontnumber or fontname for each level. Default -is \fB2\ 2\ 2\ 2\ 2\ 2\ 2\fP (all headings in italic). -Could also be written as \fBI\ I\ I\ I\ I\ I\ I\fP. +is \fB2\ 2\ 2\ 2\ 2\ 2\ 2\ 2\ 2\ 2\ 2\ 2\ 2\ 2\fP (all headings in italic). +Could also be written as \fBI\ I\ I\ I\ I\ I\ I\ I\ I\ I\ I\ I\ I\ I\fP. Note that some other implementations use \fB3\ 3\ 2\ 2\ 2\ 2\ 2\fP as the default value. All omitted values are presumed to be a 1. @@ -690,7 +692,7 @@ All omitted values are presumed to be a 1. String \fBHP\fP controls the pointsize of each heading, in the same way as \fBHF\fP controls the font. A value of 0 selects the default point size. -Default value is \fB0\ 0\ 0\ 0\ 0\ 0\ 0\fP. +Default value is \fB0\ 0\ 0\ 0\ 0\ 0\ 0\ 0\ 0\ 0\ 0\ 0\ 0\ 0\fP. Beware that only the point size changes, not the vertical size. That can be controlled by the user specified macro \fBHX\fP and/or @@ -698,7 +700,7 @@ That can be controlled by the user specified macro \fBHX\fP and/or .sp \fBHeading counters\fP .br -Seven number registers, named \fBH1\fP thru \fBH7\fP contains +Fourteen number registers, named \fBH1\fP thru \fBH14\fP contains the counter for each heading level. The values are printed using arabic numerals, this can be changed with the macro \fBHM\fP (see below). @@ -771,7 +773,7 @@ Resets to the default if called without argument. Hyphenation can be turned off by setting number register \fBHy\fP to 0 in the beginning of the file. .TP -.B "HM [arg1 [arg2 [... [arg7]]]]" +.B "HM [arg1 [arg2 [... [arg14]]]]" Heading mark style. Controls the type of marking for printing of the heading counters. Default is 1 for all levels. @@ -1276,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 @@ -1803,7 +1805,7 @@ No output will occur if \fBAph\fP is zero, but there will always be an appendix-entry in the 'List of contents'. .TP .B Cl -Contents level [0:7], contents saved if heading level <= Cl, default 2. +Contents level [0:14], contents saved if heading level <= Cl, default 2. .TP .B Cp Eject page between LIST OF XXXX if Cp == 0, default 0. @@ -1850,10 +1852,10 @@ just before the page break. Useful in user defined header macros. .TP .B Hb -Heading break level [0:7], default\ 2. +Heading break level [0:14], default\ 2. .TP .B Hc -Heading centering level, [0:7]. +Heading centering level, [0:14]. Default\ 0. .TP .B Hi @@ -1885,7 +1887,7 @@ is less than or equal to \fBHps\fP. Value is in units, normally\ 1. .TP .B Hs -Heading space level [0:7], default\ 2. +Heading space level [0:14], default\ 2. .TP .B Hss This is the number of lines that follows \fB.H\fP when the heading-level @@ -1902,7 +1904,7 @@ Heading numbering type, default 0. Unnumbered heading level, default 2. .TP .B Hy -Hyphenation in body, default 1. +Hyphenation in body, default 0. .br 0\ ->\ no hyphenation .br diff --git a/contrib/groff/contrib/mm/m.tmac b/contrib/groff/contrib/mm/m.tmac index f78519105981..db52e93deb7a 100644 --- a/contrib/groff/contrib/mm/m.tmac +++ b/contrib/groff/contrib/mm/m.tmac @@ -3,11 +3,12 @@ .ds RE \\$2 .. .\" -.\" $Id: m.tmac,v 2.18 2003/04/02 04:44:59 jhaegg Exp $ -.@revision $Revision: 2.18 $ +.\" $Id: m.tmac,v 2.26 2005/05/26 06:28:38 wl Exp $ +.@revision $Revision: 2.26 $ .ig -Copyright (C) 1991-2000 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,8 +37,9 @@ 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:7], contents saved if heading level <= Cl +.\" Contents level [0:14], contents saved if heading level <= Cl .nr Cl 2 .\" Eject page between LIST OF XXXX if Cp == 0 .nr Cp 0 @@ -66,20 +68,27 @@ Index array!index .nr H5 0 1 .nr H6 0 1 .nr H7 0 1 -.\" Heading break level [0:7] +.nr H8 0 1 +.nr H9 0 1 +.nr H10 0 1 +.nr H11 0 1 +.nr H12 0 1 +.nr H13 0 1 +.nr H14 0 1 +.\" Heading break level [0:14] .nr Hb 2 -.\" heading centering level, [0:7] +.\" heading centering level, [0:14] .nr Hc 0 .\" header format -.ds HF 2 2 2 2 2 2 2 +.ds HF 2 2 2 2 2 2 2 2 2 2 2 2 2 2 .\" heading temp. indent [0:2] .\" 0 -> 0 indent, left margin .\" 1 -> indent to right , like .P 1 .\" 2 -> indent to line up with text part of preceding heading .nr Hi 1 .\" header pointsize -.ds HP 0 0 0 0 0 0 0 -.\" heading space level [0:7] +.ds HP 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +.\" heading space level [0:14] .nr Hs 2 .\" heading numbering type .\" 0 -> multiple (1.1.1 ...) @@ -637,15 +646,21 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if !'\\*[misc*b]'C' \{\ . ie '\\*[misc*b]'P' .vs \\n[misc*S-vs]u . el \{\ -. ie '\\*[misc*b]'D' .vs \\n[.ps]u+2p +. ie '\\*[misc*b]'D' .vs \\n[.ps]s+2p . el .vs \\*[misc*b] . if \\n[D]>2 .tm S: .vs \\*[misc*b] . \} .\} .nr @ps \\n[.ps] +.nr @psu \\n[.ps]s .nr @vs \\n[.v] +.nr @vsp \\n[.v]u/1p +.nr @res 1i .\" -.if \\n[D]>1 .tm S(\\$*): ma:\\*[misc*a], mb:\\*[misc*b] => ps:\\n[@ps]u, vs:\\n[@vs]u +.if \\n[D]>1 \{\ +. tmc "S(\\$*): ma:\\*[misc*a], mb:\\*[misc*b] +. tm1 " => ps:\\n[.s]p (\\n[@psu]u), vs:\\n[@vsp]p (\\n[@vs]u) (res:\\n[@res]) +.\} .nr misc*S-ps \\n[misc*S-ps1] .nr misc*S-vs \\n[misc*S-vs1] .nr misc*S-ps1 \\n[@ps] @@ -930,7 +945,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" .\" clear lower counters .nr hd*i 1 1 -.while \\n+[hd*i]<8 .if \\n[hd*level]<\\n[hd*i] .nr H\\n[hd*i] 0 1 +.while \\n+[hd*i]<15 .if \\n[hd*level]<\\n[hd*i] .nr H\\n[hd*i] 0 1 .\" .\" save last text for use in TP .if \\n[hd*level]=1 .ds H1txt \\$2\\$3 @@ -962,7 +977,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if \\n[hd*level]>1 .as hd*mark \\n[H2] .\" .nr hd*i 2 1 -.while \\n+[hd*i]<8 .if \\n[hd*level]>(\\n[hd*i]-1) .as hd*mark .\\n[H\\n[hd*i]] +.while \\n+[hd*i]<15 .if \\n[hd*level]>(\\n[hd*i]-1) .as hd*mark .\\n[H\\n[hd*i]] .if \\n[Ht] .ds hd*mark \\n[H\\n[hd*level]]. .\" .\" special case, no dot after level one heading if not H1dot true @@ -1025,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 @@ -1072,11 +1088,12 @@ 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 .nr hd*i 0 1 -.while \\n+[hd*i]<8 .af H\\n[hd*i] \\$[\\n[hd*i]] 1 +.while \\n+[hd*i]<15 .af H\\n[hd*i] \\$[\\n[hd*i]] 1 .. .\"---------------------- .\" set page-nr, called from header @@ -1134,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 @@ -1185,7 +1205,12 @@ 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 +.el 'nh .if \\n[Idxf] \{\ .tl '''' .\} @@ -1241,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 @@ -2426,8 +2452,8 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" .toc@read-Ci lev1 lev2 lev3 lev4 ... lev7 .de toc@read-Ci .nr toc*i 0 1 -.while \\n+[toc*i]<8 \{\ -. nr toc*hl!\\n[toc*i] \\$\\n[toc*i] +.while \\n+[toc*i]<15 \{\ +. nr toc*hl!\\n[toc*i] \\$[\\n[toc*i]] .\} .. .\"----------- @@ -2883,7 +2909,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\} .\" clear lower counters .nr app*i 1 1 -.while \\n+[app*i]<8 .nr H\\n[app*i] 0 1 +.while \\n+[app*i]<15 .nr H\\n[app*i] 0 1 .. .\"------------ .de app@index diff --git a/contrib/groff/contrib/mm/mmroff.pl b/contrib/groff/contrib/mm/mmroff.pl index 155550bf97ea..f61daa102bcf 100755 --- a/contrib/groff/contrib/mm/mmroff.pl +++ b/contrib/groff/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/contrib/mom/BUGS b/contrib/groff/contrib/mom/BUGS index a96c0619251e..33765ba0140f 100644 --- a/contrib/groff/contrib/mom/BUGS +++ b/contrib/groff/contrib/mom/BUGS @@ -2,15 +2,238 @@ Assume that anything that doesn't work or behaves oddly is a bug. The documentation should be taken as the authoritative source for how things ought to be. -Post to the groff mailing list (groff@ffii.org) with bug reports, -questions and suggestions, or contact me directly at: +Post to the groff mailing list with bug reports, questions and +suggestions, or contact me directly at: - df191@ncf.ca + peter@faustus.dyn.ca + or + ptpi@golden.net + +If writing me directly, please include the word "groff" or "mom" in +the Subject line or you risk my spam filters nuking your message. +Also, please--no html email. That, too, gets nuked. --Peter Schaffter ======================================================================== +Version 1.3 +=========== + +Persistent error in html coding of docs ( tag). +---Fixed--- + +Version 1.2-f +============ + +Multiple line subheads near page bottom sometimes printing one line +of subhead at page bottom, and subsequent lines on next page. +---Fixed--- + +Post-quote spacing still wonky when paragraph spacing is turned on. +---Fixed--- (for good would be nice) + +RULE not always resetting quad and quad value. +---Fixed--- + +Version 1.2-e +============= + +Some string definitions in om.tmac had superfluous spaces after +them (e.g. $COVERTITLE). +---Fixed--- + +Spacing under quotes not correct when paragraph spacing is turned +on. +---Fixed--- + + +First word of last line before footnotes is getting chopped. +---Fixed--- + +Version 1.2-d +============= + +HEADER_FAMILY not changing header family. +---Fixed--- + +FAMILY, after COLLATE, not changing the family of all and every +page element or tag. +---Fixed--- + +Heads and subheads at the start of docs are printing one line lower +than they should. +---Fixed--- + +Gaps are appearing at the bottom of pages when there's a linebreak +followed by a subhead. +---Fixed--- + +When LS is invoked after a single text line at the top of a page +containing a T_MARGIN (set with T_MARGIN or PAGE), mom is performing +spacing adjustments as if the first line doesn't exist. +---Fixed--- + +Changes made to ALD and LS in version 1.2-c should not apply when +the document processing macros are used. There is a significant +conflict with the internal use of ALD when the docheader is only +one line long (as, for example, when DOCTYPE is CHAPTER). +---Fixed, pending discovery of further conflicts--- + +Version 1.2-c +============= + +Deferred footnotes not always being output, and groff complains +"ending diversion FN_OVERFLOW on exit." +---Fixed--- + +First .LS call after a top margin has been set (with .T_MARGIN +or .PAGE) causing mom to move off the top margin baseline. Also, +there are conflicts between ALD, LS and T_MARGIN. +---Fixed--- + +DROPCAP not properly restoring a running \*[COND] or \*[EXT] after +COND or EXT are given as arguments to DROPCAP. +---Fixed--- + +Version 1.2 +=========== + +.PAD not co-operating with mom's fontstyles, esp. when a full +family+fontstyle is given to .FT. +---Fixed--- + +.DROPCAP -- ditto the above. +---Fixed--- + +Version 1.1.9 +============= + +Footnote markers not resetting properly on new pages when COLUMNS +is enabled. +---Fixed--- + +When overflowed footnote material is the only footnote material on +the page or in the column, no footnotes are output. +---Fixed--- + +The AUTOLEAD used in FOOTNOTE not being disabled after FOOTNOTES +are output, or after PROCESS_FN_LEFTOVER/PROCESS_FN_IN_DIVER. +---Fixed--- + +COL_NEXT and COL_BREAK, when invoked during the last column on a +page, are overprinting the last column instead of breaking to a new +page when there are footnotes in the column. +---Fixed--- + +BR_AT_LINE_KERN not "break-and-spreading" text when used in +justified copy. +---Fixed--- + +Version 1.1.8 +============= + +BLOCKQUOTE_FAMILY not changing blockquote family. +---Fixed--- + +FOOTNOTE, whether in column mode or not, was using +#FN_COUNT_FOR_COLS for all footnote markers and handling. +---Fixed--- + +Deferred footnotes that occured on the second to last page of +documents not printing. +---Fixed--- + +Version 1.1.7-a +=============== + +Suite number in DOCTYPE LETTER not printing. +---Fixed--- + +Footer elements not always vertically aligning. +---Fixed--- + +Footer rule gap not always correctly observed. +---Fixed--- + +Page numbering, when at top of page, not always falling on +HDRFTR_MARGIN. +---Fixed--- + +Default page numbering style for COPYSTYLE draft is DIGIT instead +of roman. +---Fixed--- + +Hyphens around page numbering when style is DIGIT, ROMAN or ALPHA +not vertically centered. +---Fixed--- + +EXT arg not working with DROPCAP. +---Fixed--- + +DOC_QUAD not automatically set immediately after START +---Fixed-- + +Tabs behaving erratically during document processing. +---Fixed--- + +Version 1.1.7 +============= + +When DOCHEADER OFF is given, if falls short +of the top margin of running text, is not respected and +bottom margin falls low. +---Fixed--- + + +Version 1.1.6-e +=============== + +The " mark (doublequote), when entered while not in document +processing mode (i.e. just straightforward typesetting), outputs +nothing unless SMARTQUOTES is invoked explicitly. +---Fixed--- + +Version 1.1.6-c +=============== + +In document processing mode, docs that use *none* of the +docprocessing tags being ignored. +---Fixed--- + +Version 1.1.6-b +=============== + +String tabs not picking up #L_MARGIN when #L_MARGIN not explicitly +set with L_MARGIN, PAPER or PAGE. +---Fixed--- + +Infinite loop when B_MARGIN is set lower than FOOTER_MARGIN during +doc processing. +---Fixed--- + +Version 1.1.6-a +=============== + +Mom partially broken when run with groff 1.19.1. Don't know yet +what this is, whether bad coding in mom, or a problem with 1.19.1. +Only solution for now: run mom 1.1.6 with groff 1.18. +----Fixed--- + +Top margin of endnotes pages after the first endnotes page when +PRINTSTYLE is TYPEWRITE and endnotes single-spacing is turned on +falling one line too high. +---Fixed--- + +Version 1.1.6 +============= + +DOCHEADER OFF (distance) not being respected. +---Fixed--- + +FINIS killing ENDNOTES page numbering and heads. +---Fixed--- + Version 1.1.5 ============= diff --git a/contrib/groff/contrib/mom/ChangeLog b/contrib/groff/contrib/mom/ChangeLog index ce93092e8c15..d99c02399ff8 100644 --- a/contrib/groff/contrib/mom/ChangeLog +++ b/contrib/groff/contrib/mom/ChangeLog @@ -1,3 +1,396 @@ +*Thu Aug 11 2005 + +o Makefile.sub (HTMLDOCFILES): Add `refer.html' + +*Mon Jun 20 2005 + +o Makefile.sub (HTMLDOCFILES_, EXAMPLEFILES_, PROCESSEDEXAMPLEFILES_): New + variables. + (install_data): Install files in `mom' subdirectories. + Make it work actually. + (uninstall_sub): Updated. + +*Thu Jun 16 2005 + +o Makefile.sub (install_data, uninstall_sub): Use $(exampledir) for example +files. Reported by Keith Marshall. + +*Mon May 16 2005 + +o Update groff_mom.man. + +*Thu May 12 2005 + +o Added margin notes capability + +o Added mom-specific refer support; refer calls can be embedded in + running text, sent to footnotes or endnotes, or collected for + output on a bibliography page; also added mom-specific refer + control macros + +o Added bibliography page capability, with full suite of control + macros + +o Added referencing of footnotes and endnotes by line number + +o Added capability to have footnotes run on when footnotes are + being referenced by line number + +o Added a post footnote space option, in case users want a little + space between their footnotes + +o Added ENDNOTE_MARKER_STYLE, so user can choose between endnotes + identified by a numerical marker in the text, or by line number + +o Added control macros to accommodate differing needs for endnotes + identified by line number + +o Added ENDNOTE_TITLE_SPACE, so user can control starting position + of the endnotes page title + +o Extended LIST so that it accepts lowercase alpha, uppercase roman + numeral and lowercase roman numeral enumerators; also added a + "prefix" argument (which comes *after* the separator argument) + +o Changed RESET_LIST so that it can reset a list to any number, + letter, or roman numeral, instead of just 1, a, A, I and i + +o Change to handling of footnote/endnote markers in text; input + lines before FOOTNOTE still require \c, but input line after + FOOTNOTE OFF must be entered as a literal continuation of the + line before FOOTNOTE, including any required word space or + punctuation (this so users can get the footnote marker in text + either before or after the punctuation without hassle) + +o Added QUOTE_AUTOLEAD and BLOCKQUOTE_AUTOLEAD, so user can have + quotes and blockquotes leaded differently from running text + +o Reworked QUOTE and BLOCKQUOTE to accommodate _AUTOLEAD control; + spacing above and below quotes is equalized *on a per quote + basis* (not completely happy with this, but at least it gives + users some flexibility in designing (block)quotes) + +*Fri Mar 18 2005 + +o Added mom.vim to /examples + +*Thu Jan 20 2005 + +o Added \*[TB+] and \*[B] to give inline functionality of .TN and + .EL, respectively. + +o Added SECTION and SECTION_CHAR as aliases of LINEBREAK and + LINEBREAK_CHAR + +o Added a NOBREAK option to PAD, so when PAD is called, it's possible + to instruct mom not to advance on the page. + +*Wed Jan 19 2005 + +o New macro, ADD_SPACE, so that extra space can be added at the + top of a new page in document processing; the .ns call in HEADER + was making additional space impossible + +o Reworked handling of ALD/SPACE/SP and LS when they're used at + the tops of pages during pure (i.e. non-docprocessing) + typesetting. First lines were still wandering. Should also be + more intuitive: ALD after LS advances the specified distance from + the top baseline; LS after ALD doesn't change the position of the + first baseline (i.e. merely sets the lead for the text that + follows). + +*Tue Dec 14 2004 + +o Fixed a small problem with spacing under quotes when paragraph + spacing is turned on. + +*Fri Dec 10 2004 + +o Put all calls in VFP_CHECK inside their own environment. Without + the .ev call, the trap invoked VFP_CHECK was chopping off the + first word of the last line before footnotes. + +*Dec 6 2004 + +o Small fixes to elvis_syntax.new (dealing with strings, \{\ and \} + +o Changed + . ie \\n[#START] \{\ + . if \\n[#DOC_HEADER]=0 \{ . \} + . \} + in HEAD to + . ie \\n[#START] \{\ + . if \\n[#DOC_HEADER]=0 \{ .RLD 1v \} + . \} + so that HEADs at the start of docs with no docheaders falls on + the correct baseline. + +*Dec 3 2004 + +o Removed spurious parens from if ( \\n[#TRAP_DISTANCE] < \\n[#DOC_LEAD]*2 ) + in SUBHEAD. + +*Oct 14 2004 + +o Reworked the LL macro so that the argument can take a prepended + + or - sign (i.e. the argument is relative to the current line + length). + +*Oct 13 2004 + +o Added an .if \\n(.n=0 if to the ie clause in LS that controls how mom + responds to initial LS invocation at page top if T_MARGIN has + been set. Now, if there's text on the "top" baseline, LS behaves + as expected when invoked afterwards. + +*Oct 11 2004 + +o Added an ie !r#DOCS clause to the processing of "top baseline" + ALDs. ALD is used extensively (internally) in the document + processing macros, and does not need to check--indeed, should not + check--for top baseline placement prior to execution. + +*Sep 29 2004 + +o Additions to elvis_syntax.new + +*Sep 12 2004 + +o Small fixes to the documentation. + +*Aug 21 2004 + +o Removed superfluous second arguments from strings UP, DOWN, FWD + and BCK + +*Aug 8 2004 + +o Version changed from the 1.1.x series to 1.2. All of the + features I originally wanted mom to have originally have been + implemented, and appear to be stable. + +o Major overhaul to the setting of page traps and the handling of + footnotes, both "normal" footnotes and footnotes that occur + inside QUOTE, BLOCKQUOTE and EPIGRAPH. + +o Addtion of font "styles" to om.tmac, plus changes to the FAMILY + and FT macros to manage them. New section in the doc appendices + on adding fonts and managing the new font styles. + +o Mom now uses a "fallback font" whenever there's an illegal call + to FAMILY. + +o RW and EW now affect only the font in effect. A change of family + or font disables them. + +o BR_AT_LINE_KERN now properly does a .brp (spread and break) when + used in justified text. + +o NEWPAGE, which used to be an alias for .bp, has been moved into + its own macro, in order to make it more responsive to some unusal + situations. + +o Some changes to elvis_syn.new, including that the file extensions + recognized by elvis now include both .mom and .tmac. This makes + om.tmac much easier to read. + +*Jul 6 2004 + +o FT and FAM(ILY) reworked to take advantage of if S, if F and + \n[.sty] additions to groff (1.19.2). Warnings are emitted if a + style hasn't been registered, or if a font style doesn't exist in + the current family. Invalid .FAM(ILY) calls now use a "fallback" + font" (although no warning is issued); fallback is user-settable + +o New macro, FALLBACK_FONT. Not only controls the fallback font + for invalid family calls, but also controls whether mom aborts on + invalid .FT calls after issuing a warning. + +o RW/EW now affect only the current font (or font style) + +o BR_AT_LINE_KERN now (properly) does a break-and-spread when text + is justified. + +o Fairly extensive list of .sty's added to om.tmac. Hopefully, + this will make life easier for users wishing to add new fonts + and/or entire new families to their groff site-font/devps + directory. + +*Jun 6 2004 + +o Altered kerning slightly for footnote markers in text. Daggers + and double-daggers were getting a bit jammed + +*Fri Jun 4 2004 + +o Makefile.sub (HTMLDOCFILES, EXAMPLEFILES, PROCESSEDEXAMPLEFILES): Updated. + +*Thu Jun 3 2004 + +o Rewrote the routines dealing with _FAMILY, _FONT, _SIZE, _COLOR + and _QUAD. A single macro for each checks for the calling alias + (e.g. TITLE_FAMILY in _FAMILY), and performs the appropriate + action. + +o All "COLOUR" aliases of "COLOR", no matter where, have been + removed. + +o Added cover and doc cover page generation. + +o Added reference macros COVERTITLE, DOC_COVERTITLE, MISC and + COPYRIGHT (for use with covers only) + +o Fixed EL and TN so they don't spring page traps; in nofill modes + the preceding input line must be terminated by \c. + +o Added #T_MARGIN_LEAD_ADJ to DO_B_MARGIN, DO_T_MARGIN and NEWPAGE + to ensure accurate placement of first lines on new pages when + docprocessing is not taking place. + +o Made NEWPAGE it's own macro; formerly just an alias of .bp. + +o Made BREAKQUOTE obsolete; rewrote sections of footnote handling, + including adding support macros to deal with processing of + footnotes that were started inside quotes, blockquotes and + epigraphs. + +o Added a TERMINATE .em to docprocessing (except letters) to ensure + that deferred footnotes print on the last page of a doc. + + +*Mar 15 2004 + +o Added color support + +o Adjusted vertical placement of hyphens around page numbering + so that they are better centered on the height of the page + number. + +o Re-wrote portions of the document processing macros so that tabs + behave in a consistent and intuitive manner. Tab structures are + now properly preserved from page to page and column to column. + +*Feb 20 2004 + +o Rewrote the macros associated with DOCTYPE LETTER so that the + user can enter DATE, TO and FROM in any order s/he likes. For + backward compatibility, if the older, fixed order (DATE-TO-FROM) + is used, the date goes flush right with two linespaces after + it, while the other fields go flush left with a single linespace + separating them. + +o Fixed handling of DOCHEADER OFF when fell + short of the top margin of running text (the change is actually + in the SHIM macro, which is called by DOCHEADER). + +o Added a selection of iso 639 two-letter language codes as + optional arguments to SMARTQUOTES, so that the use can enter + her/his language code to get language specific quoting styles + +o Changed the way the strings for \*[ST], \*[STX], \*[FU] + and \*[BU] are read. Formerly, they were entered literally. + Now they're entered as an array. + +*Jan 24 2004 + +o Added lists and associated macros. Mom now does (nested) lists. + +o Added German-style lowered double quotes and two styles of + guillemets to SMARTQUOTES. + +o Added macro SIZE, intended to be called inline as \*[SIZE ]. + This is to bring mom's inline size change syntax into line with + her other inlines. + +o Added ESC_CHAR as an alias of .ec + +o Added doc entries for lists. + +o Updated SMARTQUOTES entry in docs. + +o Updated reserved words in docs. + +o Fixed a few more typos in docs. + +*Tue Oct 21 2003 + +o Changed \n[#DRAFT] and \n[#REVISION] to strings \*[$DRAFT] and + \*[$REVISION], allowing for the possibility of blank entries that + don't mess up headers/footers with zeros if user doesn't want any + numbers. + +o Extended handling of draft and revision numbers and strings in + headers/footers for increased flexibility. It's possible now to + have just about any combo of DRAFT_STRING, DRAFT, REVISION_STRING + and REVISION, and have them come out in headers/footers as one + intuitively expects/wants. + +*Fri Jul 25 2003 + +o Added a .bp after .if \\n[#START]=1 in FOOTER. Without it, + in document processing mode, documents that use *none* of the + docprocessing tags (yes, there are times when users want to do + this) ignored the footer trap. + +*Fri Jun 6 2003 + +o Changed register #DOCHEADER_LEAD_ADJ to string + +*Wed May 21 2003 + +o DOC_TITLE changed to be used exclusively with DOCTYPE DEFAULT + +o Fixed problem with restoration of previous doc pagenum + style when endnotes use a different pagenum style (set with + ENDNOTES_PAGENUM_STYLE) + +o Fixed handling of headers/footers with respect to endnotes. Now, + when either headers or footers are on, mom picks up the correct + page header/footer on the last page prior to ENDNOTES, gets the + pageheaders correct for endnotes pages *including the last one*, + and picks up correct page headers/footers for the subsequent docs + after COLLATE + +*Sat May 17 2003 + +o Added TOC (finally) and a nearly complete set of associated + control macros + +o Added new control macros to endnotes: + + ENDNOTES_STRING_CAPS - capitalize the endnotes string + ENDNOTES_NO_COLUMNS - allows docs in columns and endnotes not + ENDNOTES_PAGENUM_STYLE - set page numbering style for endnotes + ENDNOTES_FIRST_PAGENUMBER - set first pagenumber for endnotes + ENDNOTES_ALLOWS_HEADERS - page headers on endnotes pages off or on + ENDNOTES_NO_FIRST_PAGENUM - allows non-printing first page number when page footers are being used instead of headers + ENDNOTES_SINGLE_SPACE - for TYPEWRITE, if doc double-spaced + SUSPEND/RESTORE_PAGINATION - turns page numbering off for endnotes + +o Added an ADJUST option to ENDNOTE_LEAD + +o Added DOC_TITLE (like TITLE, but sets document-wide title for collated docs) + +o Added HDRFTR_CENTER_PAD, to allow adjustments to placement of + HDRFTR_CENTER_STRING + +o Added BLANKPAGE macro, to output blank pages (silently numbered) + +o Extensive changes to DEFAULTS, START, COLLATE, HEAD, SUBHEAD and + PARAHEAD because of new TOC and extended flexibility of ENDNOTES + page design + +o Fixed DOCHEADER OFF (distance), FINIS + +----------------------------------------------------------------------- + +*Sat Feb 22 2003 + +o (Re)-fixed handling of post epigraph spacing after #START for + TYPEWRITE double-spaced. + +------------------------------------------------------------------------ + *Sun Feb 16 2003 o Added James Ramsey's proposed CHAPTER_TITLE macro, along with his @@ -57,6 +450,8 @@ o Changed handling of inline horizontal and vertical movements. The older forms \*[FP#] and \*[BP#] still work (horizontals), as do \*[ALD#] and \*[RLD#] (verticals). +------------------------------------------------------------------------ + *Mon Aug 19 2002 o Fixed ENDNOTES so footnotes output properly when ENDNOTES is called @@ -72,15 +467,6 @@ o Added .nf to top of PAD, with a test beforehand for current fill processing. Updated reserved.html to include number register #FILL_MODE. -*Mon Jul 29 2002 - -o Makefile.sub (FFLAG, TFLAG): Add paths to source directories. - -*Wed Jul 24 2002 - -o Makefile.sub (groff_bin_path): Don't use ' \+' but ' *' for sed. - (GROFF): Set GROFF_COMMAND_PREFIX to empty value. - *Fri Jul 12 2002 o More fixes to underlining. @@ -111,10 +497,6 @@ o Fixed the character translations for UNDERLINE so they work properly o Expanded docprocessing.html entry "Special Note on Chapters". Tidied up html a bit. -*Tue Jun 18 2002 - -o examples/macros.mom: Fix path to penguin.ps. - *Sat Jun 15 2002 o Small fix to PAD to make the use of inlines within the pad string @@ -123,17 +505,17 @@ o Small fix to PAD to make the use of inlines within the pad string o Added \*[RULE] ( = \l'\n(.lu' ) so that full measure rules (either to full line length or within tabs) are easier to set. -*Sat Jun 8 2002 +*Sat Jun 8 2002 o Macro .PS renamed to .PT_SIZE. Alias .TS removed. -o .tr bits in .CAPS rewritten in the form .tr é\['E]. +o .tr bits in .CAPS rewritten in the form .tr é\[`E]. -o General cleanup of docs to reflect changes. +o General cleanup of docs to reflect changes -o Small changes/additions to `elvis_syntax'. +o Small changes/additions to elvis_syn -*Thu Jun 6 2002 +*Thu Jun 6 2002 o In DOCTYPE, in .if '\\$1'LETTER', added .FOOTER_RIGHT_SIZE +0. Without it, the suite page was printing at the default diff --git a/contrib/groff/contrib/mom/Makefile.sub b/contrib/groff/contrib/mom/Makefile.sub index f066153a74f2..b71ccda3629e 100644 --- a/contrib/groff/contrib/mom/Makefile.sub +++ b/contrib/groff/contrib/mom/Makefile.sub @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. # Written by Werner Lemberg (wl@gnu.org) # # This file is part of groff. @@ -15,11 +15,11 @@ # # 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. # These may be overridden if cross-compiling. GROFFBIN=$(top_builddir)/src/roff/groff/groff -GROFF_BIN_PATH=`echo $(groff_bin_dirs) | sed -e 's| *|:|g'` +GROFF_BIN_PATH=`echo $(groff_bin_dirs) | sed -e 's| *|$(SH_SEP)|g'` groff_bin_dirs=\ $(top_builddir)/src/roff/groff \ @@ -44,6 +44,7 @@ NORMALFILES=\ HTMLDOCFILES=\ momdoc/appendices.html \ + momdoc/color.html \ momdoc/cover.html \ momdoc/definitions.html \ momdoc/docelement.html \ @@ -53,7 +54,9 @@ HTMLDOCFILES=\ momdoc/inlines.html \ momdoc/intro.html \ momdoc/letters.html \ + momdoc/macrolist.html \ momdoc/rectoverso.html \ + momdoc/refer.html \ momdoc/reserved.html \ momdoc/toc.html \ momdoc/typemacdoc.html \ @@ -62,36 +65,42 @@ HTMLDOCFILES=\ EXAMPLEFILES=\ examples/letter.mom \ - examples/macros.mom \ - examples/typeset.mom \ - examples/typewrite.mom \ - examples/README.mom \ + examples/sample_docs.mom \ + examples/typesetting.mom \ + examples/README.txt \ examples/elvis_syntax \ + examples/elvis_syntax.new \ examples/penguin.ps PROCESSEDEXAMPLEFILES=\ examples/letter.ps \ - examples/macros.ps \ - examples/typeset.ps \ - examples/typewrite.ps + examples/sample_docs.ps \ + examples/typesetting.ps + +HTMLDOCFILES_=`echo $(HTMLDOCFILES) | sed 's|momdoc/||g'` +EXAMPLEFILES_=`echo $(EXAMPLEFILES) | sed 's|examples/||g'` +PROCESSEDEXAMPLEFILES_=`echo $(PROCESSEDEXAMPLEFILES) | sed 's|examples/||g'` CLEANADD=\ penguin.ps \ - $(PROCESSEDEXAMPLEFILES) + $(PROCESSEDEXAMPLEFILES) \ + examples/stamp .SUFFIXES: .mom .ps .mom.ps: $(GROFF) -Tps -mom $< >$@ -all: make_examples +all: $(PROCESSEDEXAMPLEFILES) -.PHONY: make_examples -make_examples: prepare_make_examples $(PROCESSEDEXAMPLEFILES) +$(PROCESSEDEXAMPLEFILES): penguin.ps examples/stamp -prepare_make_examples: examples/penguin.ps +penguin.ps: + cp $(srcdir)/examples/penguin.ps . + +examples/stamp: test -d examples || $(mkinstalldirs) examples - test -f penguin.ps || cp $(srcdir)/examples/penguin.ps . + touch $@ install_data: $(NORMALFILES) $(HTMLDOCFILES) \ $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES) @@ -100,29 +109,30 @@ install_data: $(NORMALFILES) $(HTMLDOCFILES) \ rm -f $(tmacdir)/$$f; \ $(INSTALL_DATA) $(srcdir)/$$f $(tmacdir)/$$f; \ done - -test -d $(htmldocdir)/momdoc || $(mkinstalldirs) $(htmldocdir)/momdoc - for f in $(HTMLDOCFILES); do \ - rm -f $(htmldocdir)/$$f; \ - $(INSTALL_DATA) $(srcdir)/$$f $(htmldocdir)/$$f; \ + -test -d $(htmldocdir)/mom || $(mkinstalldirs) $(htmldocdir)/mom + for f in $(HTMLDOCFILES_); do \ + rm -f $(htmldocdir)/mom/$$f; \ + $(INSTALL_DATA) $(srcdir)/momdoc/$$f $(htmldocdir)/mom/$$f; \ done - -test -d $(exampledir) || $(mkinstalldirs) $(exampledir) - for f in $(EXAMPLEFILES); do \ - rm -f $(exampledir)/$$f; \ - $(INSTALL_DATA) $(srcdir)/$$f $(docdir)/$$f; \ + -test -d $(exampledir)/mom || $(mkinstalldirs) $(exampledir)/mom + for f in $(EXAMPLEFILES_); do \ + rm -f $(exampledir)/mom/$$f; \ + $(INSTALL_DATA) $(srcdir)/examples/$$f $(exampledir)/mom/$$f; \ done - for f in $(PROCESSEDEXAMPLEFILES); do \ - rm -f $(exampledir)/$$f; \ - $(INSTALL_DATA) $$f $(docdir)/$$f; \ + for f in $(PROCESSEDEXAMPLEFILES_); do \ + rm -f $(exampledir)/mom/$$f; \ + $(INSTALL_DATA) examples/$$f $(exampledir)/mom/$$f; \ done uninstall_sub: -for f in $(NORMALFILES); do \ rm -f $(tmacdir)/$$f; \ done - -for f in $(HTMLDOCFILES); do \ - rm -f $(htmldocdir)/$$f; \ + -for f in $(HTMLDOCFILES_); do \ + rm -f $(htmldocdir)/mom/$$f; \ done - -rmdir $(htmldocdir)/momdoc - -for f in $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES); do \ - rm -f $(docdir)/$$f; \ + -rmdir $(htmldocdir)/mom + -for f in $(EXAMPLEFILES_) $(PROCESSEDEXAMPLEFILES_); do \ + rm -f $(exampledir)/mom/$$f; \ done + -rmdir $(exampledir)/mom diff --git a/contrib/groff/contrib/mom/NEWS b/contrib/groff/contrib/mom/NEWS index d4ca87f7666b..2433eb001e30 100644 --- a/contrib/groff/contrib/mom/NEWS +++ b/contrib/groff/contrib/mom/NEWS @@ -1,3 +1,240 @@ +Release 1.3 +----------- + +Added line numbering capabilities, with controls. + +Footnotes and endnotes can now be referenced by line number. + +Added ability to adjust vertical position of the title that appears +on the first endnotes page. + +Footnotes can run on when being referenced by line number. + +Footnotes now have a post-footnote spacing option, for adding +a little space between footnotes. + +Extended LIST so it accepts alpha, ROMAN and roman enumerators. + +Added margin notes capability. + +Added refer support. + +Added bibliography page support. + +Added QUOTE_AUTOLEAD and BLOCKQUOTE_AUTOLEAD, so user can have +quotes and blockquotes leaded differently from running text. + +Change: the input line immediately after FOOTNOTE OFF must be +entered as a literal continuation of the line prior to FOOTNOTE, +including any initial spaces or punctuation marks. This allows +for hassle-free placing of footnote markers in running text either +before or after punctuation marks. + +Release 1.2-f +------------- + +Added ADD_SPACE, to permit users to insert space at the top of +running text (after the first page) when using the docprocessing +macros. + +Releases 1.2-a and 1.2-b +------------------------ + +My personal email address has changed. 1.2-a and -b have been +updated to reflect that. Additionally, I made some small changes +to the documentation. + +Release 1.2 +----------- + +As of 1.2, the recommended version of groff to use with mom has +been bumped up from groff, 1.18 to groff, 1.19.2. Although mom will +continue to work with groff, 1.18, her handling of .FAM(ILY) and .FT +is now slightly different, therefore users of groff 1.18 may have to +update documents created with mom so that every .FAM(ILY) request is +followed by a .FT request before any text is input, otherwise mom +will set the text after .FAM(ILY) in Courier (until she encounters a +.FT request). People running groff, >= 1.19.2 don't have to worry +about this, but I recommend that, regardless of which version you're +running, you have a look at the document entries for FAMILY and FT +in order to see how mom will be handling .FAMILY and .FT from now +on. + +When used with groff >=1.19.2, mom now emits warnings if a style +hasn't been registered, or if a font style doesn't exist in the +current family. Invalid .FAM(ILY) calls now use a "fallback" font" +(although no warning is issued). The fallback is user-settable. + +Mom's macro file, om.tmac, now sets up a fairly extensive list of +font "styles," thus expanding the range of arguments that can be +passed to .FT (formerly, just R, I, B and BI, unless users had +already rolled their own solution to the problem of extensive type +families containing fonts like condensed, demibold, black, light, etc). +Users are advised to read the documentation sections on FAM(ILY), +FT and FALLBACK_FONT, as well as the new appendix section, "Adding +PostScript fonts to groff", for information on using mom's style +extensions (and how to disable them, should they conflict with a +user's present groff site-font/devps setup). + +A new macro, FALLBACK_FONT, has been added. It controls not only +the fallback font for invalid .FAMILY calls, but also whether mom +aborts on invalid .FT calls after issuing a warning, or continues +processing using the fallback. + +Release 1.1.9 +------------- + +Added the (optional) generation of cover pages and document cover +pages, plus a full suite of control macros for all cover page +elements. + +Added new reference macros that apply to covers: COVERTITLE, +DOC_COVERTITLE, COPYRIGHT and MISC. + +The need for TRAP OFF/TRAP to deal with ELs and TNs that fall at +the bottom page has been obsoleted. However, both EL and TN, when +invoked in any "nofill" mode (LEFT, RIGHT, CENTER, or the L | R | C +arguments to TAB_SET or ST when no QUAD argument is given), must now +have the input line preceding the EL or TN terminated by \c. Fill +modes do not have this requirement, i.e. no \c is required. + +Footnotes that occur inside quotes, blockquotes and epigraphs now +work just like regular footnotes, with no user intervention +required. This obsoletes the macro BREAK_QUOTE. + +Removed all aliases that used the word COLOUR. Users must use +COLOR wherever COLOR is needed. COLOUR, as a replacement/alias, is +no longer supported. + +NEWPAGE, which used to be an alias of .bp, is now its own macro. + +Release 1.1.8 +------------- + +Added text color support. Users can now define or initialize a color, +and afterwards change text color with an inline of the form +\*[], or with the macro .COLOR. In document processing, +the docelement tag control macros have been expanded to include +_COLOR, e.g. .HEAD_COLOR will colorize +heads, PAGENUM_COLOR ]. +This brings mom's inline size change syntax into line with her other +inlines. \*S[] can still be used for the same thing. + +The file elvis_syntax (for elvis prior to 2.2h) is no longer being +maintained. It was getting messy and long in the tooth. The +official elvis syntax file is elvis_syntax.new, which works for +2.2h of elvis (and higher, one hopes). elvis users are encouraged +to update to 2.2h or higher. + +Release 1.1.6-e +--------------- + +Extended handling of draft and revision numbers and strings in +headers/footers for increased flexibility. It's possible now to +have just about any combo of DRAFT_STRING, DRAFT, REVISION_STRING +and REVISION, and have them come out in headers/footers as one +intuitively expects/wants. + +Also added a new set of syntax highlighting rules for the vi clone, +elvis. Version 2-2h-beta of elvis finally made possible the +highlighting of \*[...] inline escapes, whether or not they're +separated from surrounding text by spaces. This is a terrific +improvement in elvis, and makes for greatly improved readability of +mom files. + +Release 1.1.6-b - 1.1.6d +------------------------ + +Trivial changes to documentation and some cleanups of the main +om.tmac file, including: + +Added a .bp after .if \\n[#START]=1 in FOOTER. Without it, +in document processing mode, documents that use *none* of the +docprocessing tags (yes, there are times when users want to do +this) ignored the footer trap. + +Changed register #DOCHEADER_LEAD_ADJ to string +$DOCHEADER_LEAD_ADJ. This means that .DOCHEADER_LEAD no longer +requires a unit of measure; points is assumed. + +Release 1.1.6-b +--------------- + +Added a SHIM macro that calculates and moves to the next "legal" +baseline during document processing (useful if user starts playing +around with spacing/leading on a page and needs to get the leading +back on track). + +Fixed handling of DOCHEADER OFF so that the first line of +running text falls on a "legal" baseline when is given. + +Release 1.1.6-a +--------------- + +Problem with groff 1.19.1 fixed by Werner (.return handled arguments +incorrectly). + +Fixed handling of page numbering style restoration in endnotes, so +that (collated) docs have the correct page numbering style when the +style has been changed for endnotes (with ENDNOTES_PAGENUM_STYLE). + +DOC_TITLE has been made for use exclusively with DOCTYPE DEFAULT. + +Fixed handling of headers/footers with respect to endnotes. Now, +when either headers or footers are on, mom picks up the correct +page header/footer on the last page prior to ENDNOTES, gets the +pageheaders correct for endnotes pages *including the last one*, and +picks up correct page headers/footers for the subsequent docs after +COLLATE. + + +Release 1.1.6 +------------- + +BAD NEWS: mom appears to be crippled in some areas when run with +groff 1.19.1. Pending a solution, mom must be run with groff 1.18 + +***NEW*** + +Added TOC capabilities. + +Extended range of endnotes control macros. See the documentation +on endnotes control macros. + +Added a new DOC_TITLE macro, to deal with collated documents that +have an overall title, while each doc has its own separate doc +title (from TITLE). + + Release 1.1.5 ------------- diff --git a/contrib/groff/contrib/mom/TODO b/contrib/groff/contrib/mom/TODO index c5f15413db6b..1297bbd6a5bb 100644 --- a/contrib/groff/contrib/mom/TODO +++ b/contrib/groff/contrib/mom/TODO @@ -1,3 +1,20 @@ +As of version 1.2, the items on this TODO list will only be dealt +with if users request they be implemented. + +UNDERLINING +----------- +Explore "the ultimative underline macro" for possible inclusion +into mom. + +NUMBERED HEADS, SUBHEADS and PARAHEADS +-------------------------------------- +Macros to set numbering style (roman, arabic, alpha, etc)? + +FOOTNOTES +--------- +In columnar docs, maybe give user the choice of gathering all +footnotes at the bottom of the last column? + CONTROL MACROS -- _INDENT -------------- Let user be able to enter decimal fractions as the argument to _INDENT @@ -5,17 +22,4 @@ control macros, or, instead, let user be able to enter absolute values with a unit of measure in addition to current behaviour, which is relative. -LISTS ------ -Possbility of indented, nested lists, html-style. Options for numbered, -alpha-ed, bulleted, dashed. Again, not sure how useful these would be -for mom's target users. As things stand now, it's easy enough to -set up lists with string tabs or hanging indents. - -BIBLIOGRAPHY ------------- -Thinking about macros to *assist* in user-written bibliographies (i.e. -not biblios that get generated automatically at the ends of docs). Style -considerations are a nightmare, though. - ------------------------------------------------------------------------ diff --git a/contrib/groff/contrib/mom/copyright b/contrib/groff/contrib/mom/copyright index ea18d013387b..51756d000992 100644 --- a/contrib/groff/contrib/mom/copyright +++ b/contrib/groff/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/contrib/mom/examples/README.txt b/contrib/groff/contrib/mom/examples/README.txt new file mode 100644 index 000000000000..65188a798851 --- /dev/null +++ b/contrib/groff/contrib/mom/examples/README.txt @@ -0,0 +1,115 @@ +The files in this directory show mom in action. + +If you have downloaded and untarrred a version of mom from her +homepage, you'll see that none of the example files come with +corresponding PostScript (.ps) files, as they do with pre-compiled +versions of groff, or groff built from source. + +I haven't included the PostScript output because I want to +keep the mom archive as lean as possible. To view the PostScript +output, process the files with groff and either + + a) send the output to a separate file for previewing with a + PostScript viewer such as gv (ghostview), or + + b) to your printer. + +Using the file sample_docs.mom as an example, you would +accomplish a) like this: + + groff -mom -Tps sample_docs.mom > sample_docs.ps + gv sample_docs.ps + +Accomplishing b) depends on your printer setup, but a fairly +standard way to do it would be + + groff -mom -Tps sample_docs.mom | lpr + + or + + groff -mom -Tps -l sample_docs.mom + +Note: I don't recommend previewing with gxditview because it doesn't +render some of mom's effects properly. + +The files themselves +-------------------- + +All are set up for 8.5x11 inch paper (US letter). + +***typesetting.mom** + +The file, typesetting.mom, demonstrates the use of typesetting tabs, +string tabs, line padding, multi-columns and various indent styles, +as well as some of the refinements and fine-tuning available via +macros and inline escapes. + +Because the file also demonstrates a "cutaround" using a small +picture (of everybody's favourite mascot, Tux), the PostScript file, +penguin.ps has been included in the directory. + +***sample_docs.mom*** + +The file, sample_docs.mom, shows examples of three of the document +styles available with the mom's document processing macros, as well +as demonstrating the use of COLLATE. + +The PRINTSTYLE of this file is TYPESET, to give you an idea of mom's +default behaviour when typesetting a document. + +The last sample, set in 2 columns, shows off mom's flexibility +when it comes to designing documents. + +If you'd like to see how mom handles exactly the same file when the +PRINTSTYLE is TYPEWRITE (i.e. typewritten, double-spaced), simply +change + + .PRINTSTYLE TYPESET + +to + + .PRINTSTYLE TYPEWRITE + +near the top of the file. + +***letter.mom*** + +This is just the tutorial example from the momdocs, ready for +previewing. + +***elvis_syntax.new*** + +For those who use the vi clone, elvis, you can paste this file into +your elvis.syn. Provided your mom documents have the extension +.mom, they'll come out with colorized syntax highlighting. The +rules in elvis_syntax aren't exhaustive, but they go a LONG way to +making mom files more readable. + +The file elvis_syntax (for pre-2.2h versions of elvis) is no longer +being maintained. Users are encouraged to update to elvis 2.2h or +higher, and to use elvis_syntax.new for mom highlighting. + +I'll be very happy if someone decides to send me syntax highlighting +rules for emacs. :) + +***mom.vim*** + +Christian V. J. Brüssow has kindly contributed a set of mom syntax +highlighting rules for use with vim. Copy the file to your +~/.vim/syntax directory, then, if your vim isn't already set up to +do so, enable mom syntax highlighting with + + :syntax enable + +or + + :syntax on + +Please note: I don't use vim, so I won't be making changes to this +file myself. Christian Brüssow is the maintainer of the ruleset, +which is available on the Web at + + http://www.cvjb.de/comp/vim/mom.vim + +Contact Christian (cvjb@cvjb.de) if you have any suggestions or +requests. diff --git a/contrib/groff/contrib/mom/examples/elvis_syntax b/contrib/groff/contrib/mom/examples/elvis_syntax index 02b91a48b1b8..64fbb3b06de2 100644 --- a/contrib/groff/contrib/mom/examples/elvis_syntax +++ b/contrib/groff/contrib/mom/examples/elvis_syntax @@ -1,130 +1,90 @@ #Mom language mom -extension .mom -startword .\ -inword _( -keyword .ALD .ALIAS .ALWAYS_FULLSPACE_QUOTES .ATTRIBUTE_STRING -keyword .AUTHOR .AUTHOR_FAMILY .AUTHOR_FONT .AUTHOR_SIZE .AUTOLEAD -keyword .BLOCKQUOTE .BLOCKQUOTE_FAMILY .BLOCKQUOTE_FONT .BLOCKQUOTE_QUAD .BLOCKQUOTE_SIZE -keyword .B_MARGIN .BR .BR_AT_LINE_KERN .BREAK_QUOTE -keyword .CAPS .CENTER .CENTRE -keyword .CHAPTER .CHAPTER_TITLE CHAPTER_STRING .CITATION .CITE .CLOSING -keyword .COLLATE .COL_BREAK .COL_BREAK .COL_NEXT .COLUMNS -keyword .COMMENT .CONDENSE .COPYSTYLE -keyword .DATE .DEFAULTS -keyword .DOC_FAM .DOC_FAMILY .DOCHEADER -keyword .DOCHEADER_ADVANCE .DOCHEADER_LEAD -keyword .DOC_LEAD .DOC_LEAD_ADJUST .DOC_LEFT_MARGIN .DOC_LINE_LENGTH -keyword .DOC_LLENGTH .DOC_L_LENGTH .DOC_L_MARGIN .DOC_LMARGIN -keyword .DOC_LS .DOC_PS .DOC_PT_SIZE .DOC_QUAD -keyword .DOC_RIGHT_MARGIN .DOC_R_MARGIN .DOC_RMARGIN -keyword .DOCTYPE .DOCTYPE_FAMILY .DOCTYPE_FONT .DOCTYPE_SIZE -keyword .DRAFT .DRAFT_STRING .DRAFT_WITH_PAGENUMBER -keyword .DROPCAP .DROPCAP_ADJUST .DROPCAP_FAMILY .DROPCAP_FONT .DROPCAP_GUTTER .DROPCAP_OFF -keyword .EL -keyword .ENDNOTE .ENDNOTES -keyword .ENDNOTE_FAMILY .ENDNOTE_FONT .ENDNOTE_PT_SIZE .ENDNOTE_LEAD .ENDNOTE_QUAD -keyword .ENDNOTE_STRING .ENDNOTE_STRING_FAMILY .ENDNOTE_STRING_FONT .ENDNOTE_STRING_SIZE -keyword .ENDNOTE_STRING_QUAD .ENDNOTE_STRING_UNDERSCORE -keyword .ENDNOTE_TITLE .ENDNOTE_TITLE_FAMILY .ENDNOTE_TITLE_FONT .ENDNOTE_TITLE_SIZE -keyword .ENDNOTE_TITLE_QUAD .ENDNOTE_TITLE_UNDERSCORE -keyword .ENDNOTE_NUMBER_FAMILY .ENDNOTE_NUMBER_FONT .ENDNOTE_NUMBER_SIZE -keyword .ENDNOTE_NUMBERS_ALIGN_RIGHT .ENDNOTE_NUMBERS_ALIGN_LEFT -keyword .ENDNOTE_PARA_INDENT .ENDNOTE_PARA_SPACE .ENDNOTES_FOOTER_CENTER .ENDNOTES_HEADER_CENTER -keyword .EPIGRAPH .EPIGRAPH_AUTOLEAD .EPIGRAPH_FAMILY .EPIGRAPH_FONT -keyword .EPIGRAPH_INDENT .EPIGRAPH_QUAD .EPIGRAPH_SIZE -keyword .EW .EXTEND -keyword .FAM .FAMILY -keyword .FINIS .FINIS_STRING -keyword .FOOTER .FOOTER_CENTER .FOOTER_CENTER_CAPS .FOOTER_CENTER_FAM .FOOTER_CENTER_FAMILY -keyword .FOOTER_CENTER_FONT .FOOTER_CENTER_FT .FOOTER_CENTER_PS .FOOTER_CENTER_SIZE -keyword .FOOTER_CENTRE .FOOTER_CENTRE_CAPS .FOOTER_CENTRE_FAM .FOOTER_CENTRE_FAMILY -keyword .FOOTER_CENTRE_FT .FOOTER_CENTRE_PS .FOOTER_CENTRE_SIZE .FOOTER_FAM -keyword .FOOTER_FAMILY .FOOTER_GAP .FOOTER_LEFT .FOOTER_LEFT_CAPS .FOOTER_LEFT_FAM -keyword .FOOTER_LEFT_FAMILY .FOOTER_LEFT_FONT .FOOTER_LEFT_FT .FOOTER_LEFT_PS -keyword .FOOTER_LEFT_SIZE .FOOTER_MARGIN .FOOTER_ON_FIRST_PAGE .FOOTER_PLAIN -keyword .FOOTER_RECTO .FOOTER_RIGHT .FOOTER_RIGHT_CAPS .FOOTER_RIGHT_FAM .FOOTER_RIGHT_FAMILY -keyword .FOOTER_RIGHT_FONT .FOOTER_RIGHT_FT .FOOTER_RIGHT_PS .FOOTER_RIGHT_SIZE -keyword .FOOTER_RULE .FOOTER_RULE_GAP .FOOTERS .FOOTER_SIZE .FOOTER_VERSO -keyword .FOOTNOTE .FOOTNOTE_AUTOLEAD .FOOTNOTE_FAMILY .FOOTNOTE_FONT .FOOTNOTE_MARKERS -keyword .FOOTNOTE_MARKER_STYLE .FOOTNOTE_QUAD .FOOTNOTE_RULE .FOOTNOTE_RULE_ADJ -keyword .FOOTNOTE_RULE_LENGTH .FOOTNOTE_SIZE -keyword .FROM .FT -keyword .GREETING -keyword .HDRFTR_CENTER .HDRFTR_CENTER .HDRFTR_CENTER_CAPS .HDRFTR_CENTER_FAMILY -keyword .HDRFTR_CENTER_FONT .HDRFTR_CENTER_SIZE .HDRFTR_FAMILY .HDRFTR_GAP -keyword .HDRFTR_LEFT .HDRFTR_LEFT .HDRFTR_LEFT_CAPS .HDRFTR_LEFT_FAMILY -keyword .HDRFTR_LEFT_FONT .HDRFTR_LEFT_SIZE .HDRFTR_MARGIN .HDRFTR_PLAIN -keyword .HDRFTR_RIGHT .HDRFTR_RIGHT_CAPS .HDRFTR_RIGHT_FAMILY .HDRFTR_RIGHT_FONT -keyword .HDRFTR_RIGHT_SIZE .HDRFTR_RULE .HDRFTR_RULE_GAP .HDRFTR_RULE_INTERNAL -keyword .HDRFTR_RULE_INTERNAL .HDRFTR_SIZE -keyword .HEAD .HEAD_CAPS .HEADER .HEADER_CENTER .HEADER_CENTER_CAPS -keyword .HEADER_CENTER_FAM .HEADER_CENTER_FAMILY .HEADER_CENTER_FONT -keyword .HEADER_CENTER_FT .HEADER_CENTER_PS .HEADER_CENTER_SIZE .HEADER_CENTRE -keyword .HEADER_CENTRE_CAPS .HEADER_CENTRE_FAM .HEADER_CENTRE_FAMILY -keyword .HEADER_CENTRE_FONT .HEADER_CENTRE_FT .HEADER_CENTRE_PS .HEADER_CENTRE_SIZE -keyword .HEADER_FAM .HEADER_FAMILY .HEADER_GAP -keyword .HEADER_LEFT .HEADER_LEFT_CAPS .HEADER_LEFT_FAM .HEADER_LEFT_FAMILY -keyword .HEADER_LEFT_FONT .HEADER_LEFT_FT .HEADER_LEFT_PS .HEADER_LEFT_SIZE -keyword .HEADER_MARGIN .HEADER_PLAIN -keyword .HEADER_RECTO .HEADER_RIGHT .HEADER_RIGHT_CAPS .HEADER_RIGHT_FAM .HEADER_RIGHT_FAMILY -keyword .HEADER_RIGHT_FONT .HEADER_RIGHT_FT .HEADER_RIGHT_PS .HEADER_RIGHT_SIZE .HEADER_VERSO -keyword .HEADER_RULE .HEADER_RULE_GAP .HEADERS .HEADER_SIZE -keyword .HEAD_FAMILY .HEAD_FONT .HEAD_QUAD .HEAD_SIZE .HEAD_SPACE .HEAD_UNDERLINE -keyword .HI .HY .HYPHENATE .HYPHENATION .HY_SET -keyword .IB .IBX .IBQ .IH .IL .ILX .ILQ -keyword .IQ .IR .IRX .IRQ .IT .IX -keyword .INDENT_FIRST_PARAS .ITALIC_MEANS_ITALIC -keyword .JUSTIFY -keyword .KERN -keyword .LEADER_CHARACTER .LEFT .LIG .LIGATURES .LINEBREAK .LL .LL .L_MARGIN .LS -keyword .MCO .MCR .MCX -keyword .NEWPAGE .NEW_PAGE .NO_SUITE .NUMBER_HEADS .NUMBER_PARAHEADS .NUMBER_SUBHEADS -keyword .PAD .PADMARKER .PAD_STRING .PAGE .PAGE_LENGTH .PAGELENGTH .PAGEWIDTH -keyword .PAGENUM .PAGENUM_FAMILY .PAGENUM_FONT .PAGENUM_HYPHENS -keyword .PAGENUM_ON_FIRST_PAGE .PAGENUM_POS .PAGENUM_SIZE .PAGENUM_STYLE -keyword .PAGINATE .PAGINATION .PAPER -keyword .PARAHEAD .PARAHEAD_FAMILY .PARAHEAD_FONT .PARAHEAD_INDENT .PARAHEAD_SIZE -keyword .PARA_INDENT .PARA_SPACE -keyword .PP .PP_FONT .PP_FT .PT_SIZE .PSPIC -keyword .PRINTSTYLE -keyword .QUAD -keyword .QUOTE .QUOTE_FAMILY .QUOTE_FONT .QUOTE_INDENT .QUOTE_SIZE -keyword .RECTO_VERSO -keyword .RESET_FOOTNOTE_NUMBER .RESET_HEAD_NUMBER .RESET_PARAHEAD_NUMBER -keyword .RESET_SUBHEAD_NUMBER -keyword .REVISION .REVISION_STRING .RIGHT .RLD .R_MARGIN .RW -keyword .SETBOLDER .SETSLANT .SILENT .SLANT_MEANS_SLANT .SMARTQUOTES .SP .SPACE -keyword .SPREAD .SS .ST .START .STRING .SUBHEAD .SUBHEAD_FAMILY .SUBHEAD_FONT .SUBHEAD_SIZE -keyword .SUBTITLE .SUBTITLE_FAMILY .SUBTITLE_FONT .SUBTITLE_SIZE -keyword .SWITCH_FOOTERS .SWITCH_HDRFTR .SWITCH_HEADERS -keyword .TAB_SET .TAB .TABSET .TB .TI -keyword .TITLE .TITLE_FAMILY .TITLE_FONT .TITLE_SIZE .T_MARGIN -keyword .TN .TO .TQ .TRAP .TYPESIZE -keyword .UNDERLINE .UNDERLINE_ITALIC .UNDERLINE_QUOTES .UNDERLINE_SLANT -keyword .UNDERSCORE .UNDERSCORE_2 .UNDERSCORE2 -keyword .WS -font fixed DEFAULT CHAPTER NAMED LETTER -font fixed TYPESET TYPEWRITE -font fixed FINAL DRAFT -font fixed BLOCK QUAD -font fixed LEFT RIGHT CENTER CENTRE JUSTIFY TOP BOTTOM -font fixed OFF QUIT END EXIT DONE NO -font fixed PAGE NUMBER STAR -font fixed COND EXT -font fixed LETTER LEGAL EXECUTIVE LEDGER TABLOID QUARTO FOLIO -font fixed 10x14 A3 A4 A5 B4 B5 -font fixed SINGLESPACE -font fixed FACTOR -font underlined \/ \/. \/? \/! \/, \/; \/: -font underlined \, \,. \,? \,! \,, \,; \,: -font underlined \\ \~ \% \0 \: \( \| \^ \& \% -font underlined \b \c \C \d \D \e \f \f( \h \l \L \p \r \s \s+ \s- \S \u \v \w -font fixed \(bu \(co \(ct \(de \(dg \(di \(em \(en \(mu \(pl \(rg \(sc \(sq -font fixed \(14 \(12 \(34 \(+- -font fixed # ' ^ -font italic " -character \] -comment \# -comment \" -comment \! +extension .mom .tmac + +startword . +color startword normal + +inword _.' +color inword normal + +other initialpunct +mostly normal + +backslash none + +color args like fixed +color braces like char +color brackets like underlined +color chars like emphasized +color decimals like number +color ellipsis normal +color escapes like keyword +color math like cursor +color misc like string +color operators like string +color parens like comment +color reg_string like math +color tmac_escapes like keyword +color single_slash like char + +font args DA DE EN ES FR IT NL NO PT SV +font args DEFAULT CHAPTER NAMED LETTER +font args TYPESET TYPEWRITE +font args FINAL DRAFT +font args BLOCK QUAD +font args LEFT RIGHT CENTER CENTRE JUSTIFY TOP BOTTOM L R C J +font args OFF QUIT END EXIT DONE NO ALL +font args PAGE NUMBER STAR +font args LETTER LEGAL EXECUTIVE LEDGER TABLOID QUARTO FOLIO +font args 10x14 A3 A4 A5 B4 B5 +font args SINGLESPACE +font args FACTOR +font args DASH BULLET ALPHA DIGIT USER +font args RGB CYM CMYK GRAY GREY +font args COND CONDX EXT EXTX SUP SUPX CONDSUP CONDSUPX EXTSUP EXTSUPX +font args BOLDER BOLDERX SLANT SLANTX +font args UP DOWN BCK FWD BU BP FU FP +font args ROM IT BD BDI PREV +font args ST +font args SUSPEND RESUME + +prefix { \{ \{\ +font braces { \{ \{\ +prefix [ ] +font brackets [ ] +prefix \(bu \(co \(ct \(de \(dg \(di \(em \(en \(mu \(pl \(rg \(sc \(sq \(lq \(rq +font chars \(bu \(co \(ct \(de \(dg \(di \(em \(en \(mu \(pl \(rg \(sc \(sq \(lq \(rq +prefix \(14 \(12 \(34 \(+- +font chars \(14 \(12 \(34 \(+- +prefix \fR \fB \fI \fP \f0 \f1 \f2 \f3 +font chars \fR \fB \fI \fP \f0 \f1 \f2 \f3 +prefix .0 .1 .2 .3 .4 .5 .6 .7 .8 .9 +font decimals . .0 .1 .2 .3 .4 .5 .6 .7 .8 .9 +prefix \/ \/. \/? \/! \/, \/; \/: +font escapes \/ \/. \/? \/! \/, \/; \/: +prefix \, \,. \,? \,! \,, \,; \,: +font escapes \, \,. \,? \,! \,, \,; \,: +prefix \~ \0 \: \| \^ \& \% \! +font escapes \~ \0 \: \| \^ \& \% \! +prefix \b \c \C \d \D \e \f \f( \h \l \L \p \r \s \s+ \s- \S \u \v \w +font escapes \b \c \C \d \D \e \f \f( \h \l \L \p \r \s \s+ \s- \S \u \v \w +prefix ... +font ellipsis ... +prefix + - * / = == < > <= >= ? % +font math + - * / = == < > <= >= ? % +prefix | +font misc | +prefix ! : & +font operators ! : & +prefix ( ) +font parens ( ) +prefix # * $ +font reg_string # * $ +prefix \n \* \[ +font single_slash \n \* \[ +prefix \\n \\* \\$ +font tmac_escapes \\n \\* \\$ + +comment \# +comment \" diff --git a/contrib/groff/contrib/mom/examples/elvis_syntax.new b/contrib/groff/contrib/mom/examples/elvis_syntax.new new file mode 100644 index 000000000000..d31e0c2634f0 --- /dev/null +++ b/contrib/groff/contrib/mom/examples/elvis_syntax.new @@ -0,0 +1,106 @@ +" Steve Kirkendall has thoughtfully reworked elvis's syntax +" highlighting so that it now supports nroff constructs like \fBword +" and \(emword, with \fB and \(em being highlighted while "word" is +" not. +" +" There are some other enhancements as well, making it possible +" to have any word beginning with punctuation (i.e. groff +" requests) highlighted. I've decided to take advantage of these +" improvements, which apply to elvis-2.2h onwards, and write a new +" simplified set of syntax highlighting rules for mom. Just plug +" this file at the end of /etc/elvis/elvis.syn to use them. +" +" If you're using an older version of elvis, stick with the +" highlighting rules in the files elvis_syntax. + +#Mom +language mom +extension .mom .tmac + +startword . +color startword normal + +inword _.' +color inword normal + +other initialpunct +mostly normal + +backslash none + +color args like fixed +color braces like char +color brackets like underlined +color chars like emphasized +color decimals normal +color ellipsis normal +color escapes like keyword +color math like cursor +color misc like string +color operators like string +color parens like comment +color reg_string like math +color tmac_escapes like keyword +color single_slash like char + +font args DA DE EN ES FR IT NL NO PT SV +font args DEFAULT CHAPTER NAMED LETTER +font args TYPESET TYPEWRITE +font args FINAL DRAFT +font args BLOCK QUAD +font args LEFT RIGHT CENTER CENTRE JUSTIFY TOP BOTTOM L R C J +font args OFF QUIT END EXIT DONE NO ALL +font args PAGE NUMBER STAR LINE +font args LETTER LEGAL EXECUTIVE LEDGER TABLOID QUARTO FOLIO +font args 10x14 A3 A4 A5 B4 B5 +font args SINGLESPACE +font args FACTOR +font args DASH BULLET ALPHA DIGIT USER ROMAN roman alpha +font args SUSPEND RESUME +font args RGB CYM CMYK GRAY GREY +font args COND CONDX EXT EXTX SUP SUPX CONDSUP CONDSUPX EXTSUP EXTSUPX +font args BOLDER BOLDERX SLANT SLANTX +font args UP DOWN BCK FWD BU BP FU FP FN_MARK EN_MARK +font args ROM IT BD BDI PREV +font args ST + +prefix { \{ \} \{\ } +font braces { \{ \} \{\ } +prefix [ ] +font brackets [ ] +prefix \(bu \(co \(ct \(de \(dg \(di \(em \(en \(mu \(pl \(rg \(sc \(sq \(lq \(rq +font chars \(bu \(co \(ct \(de \(dg \(di \(em \(en \(mu \(pl \(rg \(sc \(sq \(lq \(rq +prefix \(14 \(12 \(34 \(+- +font chars \(14 \(12 \(34 \(+- +prefix \fR \fB \fI \fP \f0 \f1 \f2 \f3 +font chars \fR \fB \fI \fP \f0 \f1 \f2 \f3 +prefix .0 .1 .2 .3 .4 .5 .6 .7 .8 .9 +font decimals . .0 .1 .2 .3 .4 .5 .6 .7 .8 .9 +prefix \/ \/. \/? \/! \/, \/; \/: +font escapes \/ \/. \/? \/! \/, \/; \/: +prefix \, \,. \,? \,! \,, \,; \,: +font escapes \, \,. \,? \,! \,, \,; \,: +prefix \~ \0 \: \| \^ \& \% \! +font escapes \~ \0 \: \| \^ \& \% \! +prefix \b \c \C \d \D \e \f \f( \h \l \L \p \r \s \s+ \s- \S \u \v \w +font escapes \b \c \C \d \D \e \f \f( \h \l \L \p \r \s \s+ \s- \S \u \v \w +prefix ... +font ellipsis ... +prefix + - * / = == < > <= >= ? % +font math + - * / = == < > <= >= ? % +prefix | +font misc | +prefix ! : & +font operators ! : & +prefix ( ) +font parens ( ) +prefix # * $ +font reg_string # * $ +prefix \n \* +font single_slash \n \* +prefix \\n \\* \\$ +font tmac_escapes \\n \\* \\$ + +character \]' +comment \# +comment \" diff --git a/contrib/groff/contrib/mom/examples/sample_docs.mom b/contrib/groff/contrib/mom/examples/sample_docs.mom new file mode 100644 index 000000000000..592c75e170ff --- /dev/null +++ b/contrib/groff/contrib/mom/examples/sample_docs.mom @@ -0,0 +1,574 @@ +\# This file contains three greeked documents collated together: +\# +\# i) two pages of a novelist's outline +\# ii) two pages of a chapter using COPYSTYLE DRAFT +\# iii) three pages of an academic paper, set in two columns +\# +\# Mom's defaults are used throughout, except for iii), which +\# demonstrates some of the ways you can design your own documents. +\# +\# Since the text throughout is greeked, and groff doesn't know how +\# to hyphenate all that pseudo-latinate nonsense, I've inserted +\# discretionary hyphens (\%) into a large number of the the words. +\# Normally, this isn't necessary. +\# +\# The PRINTSTYLE is TYPESET. If you'd like to see what mom does +\# with the documents when the PRINTSTYLE is TYPEWRITE, change +\# PRINTSTYLE TYPESET, below, to PRINTSTYLE TYPEWRITE. Also, in the +\# third example, comment out PARA_INDENT and QUOTE_INDENT (lines +\# 332 and 333). +\# +\# =================================================================== +\# +\# First, a sample "NAMED" document--in this case, an outline. +\# A novelist wouldn't normally write an outline with numbered heads, +\# subheads and paraheads. I've turned the feature on merely to +\# demonstrate it. +\# +\# Reference macros +\# +.TITLE "Lake Attica's Shores" +.SUBTITLE "A Romance Novel" +.AUTHOR "Rosemary Winspeare" +.DRAFT 1 \" Ignored because COPYSTYLE is FINAL +.REVISION 2 \" Ignored because COPYSTYLE is FINAL +.COPYRIGHT "2004 Alma Podborski +\# +\# Reference macros for the document cover +\# +.DOC_COVERTITLE "Sample mom Documents" +.MISC "Three types of mom documents" "assembled and collated by mom's author" +\# +\# Docstyle macros +\# +.DOCTYPE NAMED "Outline" +.PRINTSTYLE TYPESET \" Or TYPEWRITE to preview "typewritten, double-spaced" +\# +.DOC_COVER COVERTITLE MISC +.COVER TITLE AUTHOR DOCTYPE COPYRIGHT +\# +\# Additional setup macros +\# +.NUMBER_PARAHEADS +\# +.START +.PP +.PARAHEAD "A note on the setting" +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. Stet clita kasd gubergren, no sea takimata sanctus est. +At vero eos et accusam et justo duo do\%lo\%re et ea rebum. +.PP +Stet clita kasd gubergren, no sea takimata sanctus est. Lorem ipsum +dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam +voluptua. +.PP +Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt +ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At +vero, eos et accusam et justo duo do\%lo\%res et ea rebum. Consetetur +sadipscing elitr, sed diam nonumy. +.LINEBREAK +.PP +.PARAHEAD "About historical personnages" +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est. Tempor invidunt ut +labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. Consetetur sadipscing elitr, sed diam nonumy +eirmod tempor invidunt ut labore et do\%lo\%re magna. Tempor invidunt +ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +.NUMBER_HEADS +.NUMBER_SUBHEADS +.HEAD "Part One" +.SUBHEAD "Chapter 1" +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, +sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. At vero eos et accusam et +justo duo do\%lo\%res et ea rebum. +.PP +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est. Lorem ipsum dolor sit +amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +Stet clita kasd gubergren, no sea takimata sanctus est. +.SUBHEAD "Chapter 2" +.PP +Stet clita kasd gubergren, no sea takimata sanctus est. Lorem ipsum +dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam +voluptua. At vero eos et accusam et justo duo do\%lo\%res et ea rebum. +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, +sed diam nonumy eirmod tempor invidunt. Ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua at vero. +.SUBHEAD "Chapter 3" +.PP +Eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita kasd +gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet. +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. At vero eos et accusam et justo duo do\%lo\%res et +ea rebum. +.HEAD "Part Two" +.SUBHEAD "Chapter 4" +.PP +Stet clita kasd gubergren, no sea takimata sanctus est +lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur +sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore +et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +.PP +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet. +.PP +Nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. At vero eos et accusam et justo duo do\%lo\%res et +ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, +sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. At vero eos et accusam et justo +duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, no sea takimata +sanctus est lorem ipsum dolor sit amet. Consetetur sadipscing elitr, +sed diam nonumy eirmod tempor invidunt. +.SUBHEAD "Chapter 5" +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed +diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. At vero eos et accusam et +justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, +no sea takimata sanctus est lorem ipsum dolor sit amet. +.PP +Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt +ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero +eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita kasd +gubergren, no sea takimata sanctus. +.PP +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren. Sea takimata sanctus est lorem ipsum dolor +sit amet. Accusam et justo duo do\%lo\%res et ea rebum +.SPREAD +.RIGHT +\*[BD]\&...end of sample outline\c +.EL +.COLLATE +\# +\# The .EL after the line "...end of sample outline" ensures that +\# mom doesn't spring the page trap, which would deposit a header at +\# the top of the next page. COLLATE doesn't print a page header +\# on the first page of a collated document, but if the page trap +\# has already deposited one there, COLLATE can't undo it. +\# +\# Normally, this isn't necessary; here we require it because the +\# line falls right at the bottom of the page, and would therefore +\# normally spring the page trap. Sorry for the fussiness, but at +\# least now you know what to do if you ever encounter the problem +\# of a page header printing at the top of a collated document. +\# +\# Please notice, too, the use of "\&" before "..." Whenever an +\# input line begins with either a period, an apostrophe or a space, +\# you must precede it with \&, otherwise the line will disappear, +\# even when, as here, there's an inline escape that starts the +\# line. +\# +\# ===================================================================== +\# +\# Next, two pages of a chapter, set in DRAFT style, showing +\# the use of the EPIGRAPH BLOCK macro and the QUOTE macro. +\# +\# You'll notice that the starting page number of this "draft" is 1 (in +\# roman numerals). COPYSTYLE DRAFT always numbers the first page of a +\# document 1. +\# +\# Reference macros +\# +.TITLE "Lake Attica's Shores" +.SUBTITLE "A Romance Novel" +.AUTHOR "Rosemary Winspeare" +.CHAPTER 1 +.CHAPTER_TITLE "The Bonny Blue Yonder" +.DRAFT 1 +.REVISION 2 +.MISC "Draft 1, 2nd revision" +\# +\# Docstyle macros +\# +.DOCTYPE CHAPTER +.COPYSTYLE DRAFT +\# +\# Additional style macros +\# +.EPIGRAPH_FONT I \" Epigraphs are normally set in roman +.DRAFT_WITH_PAGENUMBER \" Draft/revision info usually goes in the header +.COVER_MISC_QUAD RIGHT \" Change default position of the cover "misc" line +\# +.COVER CHAPTER+TITLE MISC +\# +.START +.EPIGRAPH BLOCK +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. +.RIGHT +\*[ROM]\(emJoseph E. Blough +.EPIGRAPH OFF +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. At vero eos et accusam et justo duo do\%lo\%res et +ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est. +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Lorem ipsum +dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam +voluptua. At vero eos et accusam et justo duo do\%lo\%res et ea rebum. +Stet clita kasd gubergren, no sea takimata sanctus est. At vero eos +et accusam et justo duo do\%lo\%res et ea rebum. +.PP +Stet clita kasd gubergren, no sea takimata sanctus est. Lorem ipsum +dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt. +.PP +"Consetetur sadipscing elitr," dixit ea. +.PP +"Sed diam nonumy eirmod tempor invidunt ut labore," dixit eum. +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. Consetetur sadipscing elitr, sed diam nonumy +eirmod tempor invidunt ut labore et do\%lo\%re magna. +.PP +"Lorem ipsum dolor sit amet," dixit ea. +.PP +"At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est," dixit eum. "Sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua." +.PP +Consetetur sadipscing elitr, sed diam nonumy eirmod tempor: +.QUOTE +Invidunt ut labore et do\%lo\%re +Magna ali\%quyam erat sed diam +Voluptua stet clita kasd gubergren +No sea takimata sanctus est. +.QUOTE OFF +.PP +Justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, no +sea takimata sanctus est. Lorem ipsum dolor sit amet, consetetur +sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore +et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +.PP +"Stet clita kasd gubergren," dixit ea. +.PP +"No sea takimata sanctus est," dixit eum. +.PP +Nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. Aliquyam erat +sed diam voluptua. At vero eos et accusam et justo, duo do\%lo\%res et +ea rebum. +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt. Ut labore et do\%lo\%re magna ali\%quyam +erat, sed diam voluptua at vero. Stet clita kasd gubergren, no sea +takimata sanctus est. Consetetur sadipscing elitr, sed diam nonumy +eirmod tempor invidunt ut labore et do\%lo\%re magna. +.PP +Invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est. At vero eos et accusam et +justo duo do\%lo\%res et ea rebum. Lorem ipsum dolor sit amet, consetetur +sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore +et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero eos et +accusam et justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, +no sea takimata sanctus est. At vero eos et accusam et justo duo +do\%lo\%res et ea rebum. +.RIGHT +\*[BD]\&...end of sample chapter +.COLLATE +\# +\# ===================================================================== +\# +\# Finally, a sample academic article, set in two columns with a +\# 1.5-pica gutter between them. This example also uses QUOTES, +\# BLOCKQUOTES and FOOTNOTES. In addition, it's set RECTO_VERSO, +\# with differing left and right margins that alternate from page to +\# page. (The header also flips from right to left, which you can +\# see on the 2nd and 3rd pages). +\# +\# In order to accomodate the narrow measure of the columns, there's also +\# a demonstration of things you can change with both the typesetting +\# macros and the document processing "control" macros. +\# +\# Reference macros +\# +.TITLE "CONTROL EQUALS CHAOS" +.SUBTITLE "\*[ALD1]The Psychological and Auditory \ +Impact of Serial vs. Aleatoric Music\*[RLD1]" +.AUTHOR "Joe Chang" "and" "Brad Hegel Connors" +.COPYRIGHT "2004 J. Chang, B.H. Connors +.MISC "Submitted June 3, 2004" "\*[IT]Piano Quarterly\*[PREV]" +\# +\# Docstyle macros +\# +.DOCTYPE DEFAULT +.COPYSTYLE FINAL +\# +\# Additional style macros -- general type parameters +\# +.L_MARGIN 6P +.R_MARGIN 4P+6p +.PT_SIZE 10 +.AUTOLEAD 1.5 +\# +\# Additional style macros -- change mom's default behaviour +\# +.RECTO_VERSO +.PAGENUM 1 +.HEADER_LEFT "Chang, Connors" \" Because we have two authors +.COLUMNS 2 1P+6p +.SUBTITLE_SIZE +1.5 +.AUTHOR_SIZE +.5 +.DOCHEADER_LEAD +2p +.HEADER_SIZE +1 +.PARA_INDENT 1P \" Comment this out if previewing PRINTSTYLE TYPEWRITE +.QUOTE_INDENT 2 \" Comment this out if previewing PRINTSTYLE TYPEWRITE +.SUBHEAD_SIZE +0 +.BLOCKQUOTE_FAMILY H +.BLOCKQUOTE_SIZE -2 +.NUMBER_HEADS OFF \" Because we turned them on in the first example +.NUMBER_SUBHEADS OFF \" Ibid +\# +.COVER TITLE AUTHOR COPYRIGHT MISC +\# +.START +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr. Sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. Ali\%quyam +erat, sed diam voluptua. +.PP +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren no sea takimata. Sanctus est, lorem ipsum dolor sit +amet. Consetetur sadipscing elitr, sed diam nonumy. Eirmod tempor +invidunt ut labore et do\%lo\%re magna ali\%quyam erat. Sed diam voluptua +at vero eos et accusam et justo. +\# +.BLOCKQUOTE +Stet clita kasd gubergren, no sea takimata sanctus est lorem. +Ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy +eirmod tempor. Invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua at vero. Eos et accusam et justo duo do\%lo\%res et +ea rebum stet clita.\c +.FOOTNOTE \" Note the use of \c, above, to keep the word and footnote marker together. +Clita ipsum dolor sit amet, consetetur sadipscing elitr. +.FOOTNOTE OFF +.BLOCKQUOTE OFF +\# +.PP +Duo do\%lo\%res et ea rebum, stet clita kasd gubergren. No sea takimata +sanctus est lorem ipsum dolor sit amet, consetetur sadipscing elitr. +Sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam. Erat sed diam voluptua at. Vero eos et accusam et justo +duo do\%lo\%res et ea rebum stet. Clita kasd gubergren no sea takimata +sanctus est. +.PP +Nonumy eirmod tempor invidunt, ut labore et do\%lo\%re magna ali\%quyam +erat? At vero eos et accusam et justo duo do\%lo\%res et ea. Rebum stet +clita kasd gubergren no sea takimata sanctus. Est lorem ipsum dolor +sit amet. Sadipscing\c +.FOOTNOTE +Sadipscing diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. +.FOOTNOTE OFF + elitr sed diam nonumy eirmod tempor invidunt. Ut labore et do\%lo\%re +magna ali\%quyam erat, sed diam voluptua. At vero eos et accusam et +justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren no sea. +\# +.SUBHEAD "Schoenberg\(em" "The Origins of Serial Pitch Organization" +\# +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. At vero eos et accusam et justo duo do\%lo\%res et ea +rebum. Stet clita kasd gubergren, no sea takimata sanctus est lorem. +Ipsum dolor sit amet consetetur sadipscing. Elitr, sed diam nonumy, +eirmod tempor invidunt ut labore et do\%lo\%re magna. Ali\%quyam erat sed +diam voluptua, at vero eos. Et accusam et justo duo do\%lo\%res et ea +rebum stet clita kasd gubergren lorem ipsum. Dolor sit amet +consetetur, sadipscing elitr, sed diam. Nonumy eirmod tempor invidunt +ut labore et do\%lo\%re. Magna ali\%quyam erat sed diam voluptua at vero. +Eos et accusam et justo duo do\%lo\%res et ea rebum stet clita kasd. +Gubergren no sea takimata sanctus est. +.PP +Amet consetetur sadipscing elitr sed diam nonumy eirmod. Tempor +invidunt ut labore. Et dolor\%e magna ali\%quyam erat, sed diam voluptua, +at vero. Eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren. +.PP +No sea takimata\c +.FOOTNOTE +Takimata sadipscing elitr, sed diam nonumy eirmod tempor invidunt +ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +.FOOTNOTE OFF + sanctus est lorem. Ipsum dolor sit amet, consetetur +sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore +et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero eos et +accusam et justo duo do\%lo\%res et ea rebum amet. Consetetur sadipscing +elitr sed diam nonumy eirmod tempor invidunt ut labore, et do\%lo\%re +magna ali\%quyam erat. Sed diam voluptua, at vero, eos et accusam et +justo duo do\%lo\%res et ea rebum. +\# +.SUBHEAD "Messiaen to Stockhausen\(em" "The Quest for Absolute Control" +\# +.PP +Vero eos et accusam et justo duo do\%lo\%res et ea rebum amet: +.QUOTE +Eirmod tempor invidunt +Ut labore et do\%lo\%re magna ali\%quyam erat +Sed diam voluptua +At vero eos et accusam et justo duo do\%lo\%res. +.QUOTE OFF +Lorem ipsum dolor sit amet, consetetur sadipscing elitr +sed diam. Nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. +Aliquyam erat, sed diam voluptua at vero eos et accusam. Et +justo duo do\%lo\%res et ea rebum stet. +.PP +Elitr sed diam nonumy eirmod tempor. Invidunt ut labore et do\%lo\%re +magna ali\%quyam erat sed. Diam voluptua at vero eos et accusam et +justo duo do\%lo\%res et ea rebum. +\# +.BLOCKQUOTE +Sanctus est lorem ipsum dolor sit amet, consetetur sadipscing. Elitr, +sed diam nonumy eirmod tempor, invidunt ut labore et do\%lo\%re magna +ali\%quyam. Erat sed diam voluptua, at vero eos et accusam et justo +rebum amet. Consetetur sadipsc\%ing elitr sed diam nonumy eirmod +sed diam nonumy, eirmod tempor. Invidunt tempor invidunt ut labore.\c +.FOOTNOTE +Labore diam nonumy eirmod tempor, invidunt ut labore et do\%lo\%re +magna ali\%quyam. Erat sed diam voluptua, at vero eos et accusam et +justo. +.FOOTNOTE OFF + Et do\%lo\%re et magna ali\%quyam erat, sed diam voluptua, at vero. +Eos et accusam et justo duo. +.BLOCKQUOTE OFF +\# +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr. Sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. +.PP +Nonumy eirmod tempor invidunt, ut labore et do\%lo\%re magna ali\%quyam +erat? At vero eos et accusam et justo duo do\%lo\%res et ea. Rebum stet +clita kasd gubergren no sea takimata sanctus. Est lorem ipsum dolor +sit amet. Sadipscing elitr sed diam nonumy eirmod tempor invidunt. +Ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. +Stet clita kasd gubergren no sea. Ali\%quyam erat, sed diam voluptua. +\# +.SUBHEAD "John Cage\(em" "Leaving It All to Chance" +\# +.PP +Sit amet, consetetur sadipscing elitr, sed diam nonumy. Eirmod tempor +invidunt ut labore et do\%lo\%re magna. Ali\%quyam erat, sed diam +voluptua at vero. Eos et accusam et justo duo dolores et ea rebum. +Stet clita kasd gubergren, no sea taki\%mata sanctus est. +.PP +Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt +ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero +eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita kasd +gubergren, no sea takimata sanctus est lorem. Ipsum dolor sit amet, +consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt +ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero +eos et accusam et justo duo do\%lo\%res et ea rebum. +.PP +Stet clita kasd gubergren. No sea takimata sanctus est lorem ipsum +dolor sit. Amet consetetur sadipscing elitr, sed diam nonumy eirmod +tempor. Invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam +voluptua, at vero. Eos et accusam et justo duo do\%lo\%res et ea rebum. +Stet clita kasd gubergren, no sea takimata. Sanctus est lorem ipsum +dolor sit amet consetetur. Sadipscing elitr sed diam nonumy eirmod +tempor invidunt. Ut labore et do\%lo\%re magna ali\%quyam erat, sed diam +voluptua. At vero eos et accusam et justo duo do\%lo\%res et ea rebum. +\# +.BLOCKQUOTE +.PP +Stet clita kasd gubergren no sea. Takimata sanctus est lorem ipsum +dolor sit amet. Consetetur sadipscing elitr sed diam nonumy eirmod +tempor invidunt ut labore et do\%lo\%re. Magna ali\%quyam\c +.FOOTNOTE +Aliquyam nonumy eirmod tempor invidunt ut labore. +.FOOTNOTE OFF + erat, sed diam +voluptua at vero eos et accusam. Et justo duo do\%lo\%res et ea rebum, +stet clita kasd gubergren, no sea takimata. +.PP +Sanctus est lorem ipsum. Dolor sit amet consetetur sadipscing +elitr. Sed diam nonumy eirmod tempor invidunt ut labore. Et +do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero eos et +accusam et justo duo. Dolores et ea rebum stet clita kasd gubergren +no sea. +.PP +Takimata lorem ipsum dolor sit amet consetetur sadipscing elitr. +Sed diam, nonumy eirmod tempor, invidunt ut labore et do\%lo\%re magna. +Aliquyam erat sed diam voluptua. At vero eos et accusam et +justo.\c +.FOOTNOTE +Justo vero eos et accusam et justo duo. +.FOOTNOTE OFF +.BLOCKQUOTE OFF +\# +.PP +Duo do\%lo\%res et ea rebum, stet clita kasd gubergren, no sea takimata +sanctus. Est lorem ipsum. Dolor sit amet, consetetur sadipscing elitr, +sed diam nonumy. Eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. At vero eos et accusam. +.PP +Et justo duo do\%lo\%res et ea rebum stet clita kasd. Gubergren +no sea takimata sanctus est. Lorem ipsum dolor sit amet, consetetur +sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore +et dolore magna ali\%quyam erat, sed diam voluptua. At vero eos et +accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, +no sea takimata sanctus est. +\# +.SUBHEAD "Beyond Cage\(em" "Catching the Midnight Train" +\# +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr. Sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. Ali\%quyam +erat, sed diam voluptua. +.PP +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren no sea takimata. Sanctus est, lorem ipsum dolor sit +amet. Consetetur sadipscing elitr, sed diam nonumy. Eirmod tempor +invidunt ut labore et do\%lo\%re magna ali\%quyam erat. Sed diam voluptua +at vero eos et accusam et justo. +.PP +Duo do\%lo\%res et ea rebum, stet clita kasd gubergren. No sea takimata +sanctus est lorem ipsum dolor sit amet, consetetur sadipscing elitr. +Sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam. Erat sed diam voluptua at. Vero eos et accusam et justo +duo do\%lo\%res et ea rebum stet. Clita kasd gubergren no sea takimata +sanctus est. +.PP +Nonumy eirmod tempor invidunt, ut labore et do\%lo\%re magna ali\%quyam +erat? At vero eos et accusam et justo duo do\%lo\%res et ea. Rebum stet +clita kasd gubergren no sea takimata sanctus. Est lorem ipsum dolor +sit amet. Sadipscing\c +.FOOTNOTE +Sadipscing diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. +.FOOTNOTE OFF + elitr sed diam nonumy eirmod tempor invidunt. Ut labore et do\%lo\%re +magna ali\%quyam erat, sed diam voluptua. At vero eos et accusam et +justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren no sea +takimata lorem. Ipsum dolor sit amet, consetetur sadipscing elitr. +Sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. +Ali\%quyam erat, sed diam voluptua. At vero eos et accusam et justo +duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, no sea +takimata sanctus est. +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed +diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. At vero eos et accusam et justo +duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, no sea +takimata sanctus est. +.RIGHT +\*[BD]\&...end of sample article\*[PREV] +.FINIS diff --git a/contrib/groff/contrib/mom/examples/typesetting.mom b/contrib/groff/contrib/mom/examples/typesetting.mom new file mode 100644 index 000000000000..cd16dc380dae --- /dev/null +++ b/contrib/groff/contrib/mom/examples/typesetting.mom @@ -0,0 +1,673 @@ +\# Most mom users rely on mom's document processing macros to format +\# their work. The doc processing macros take care of all things +\# typographic and are simple, clear and easy to learn. The kind of +\# "by hand" typesetting this file shows off is really geared toward +\# professional typographers. Bear in mind, though, that the full +\# power of mom's typesetting capabilities can be brought to bear +\# on document processing as well. +\# +\# Basic page setup +\# +.PAGE 8.5i 11i \" Printer sheet size +.L_MARGIN 1i \" Left margin 1 inch +.R_MARGIN 1i \" Right margin 1 inch (calculates the line length) +\# +\# Basic type parameters +\# +.FAMILY T \" Times Roman family +.FT B \" Bold font +.PT_SIZE 12 \" Point size +.LS 14 \" Leading (line spacing) +.LEFT \" Set lines flush left, nofill mode +\# +\# Refinements +\# +.HY \" Hyphenate +.KERN \" Automatic pairwise kerning +.LIGATURES \" Automatic ligature generation +.SMARTQUOTES \" Enable smartquotes +.SS 0 \" No extra space between sentences +\# +.ALD 1i-1v \" Advance 1 inch from top of paper to first baseline +Example 1\*[BU 2]: +.ALD .25v \" Advance an extra 1/4 linespace +.UNDERSCORE 3.75p "T\*[BU 4]asting notes using padding, string tabs \ +and multi-columns" +\# +.SP \" Add an extra line space +\# +.FAM H \" Helvetica family +.PT_SIZE 10 +.LS 11 \" New leading +\# +\# The following uses a combination of padding, string tabs, and the +\# FWD escape to set up five tabs with 1-pica gutters stretched over +\# the full line length. +\# +.SILENT \" Don't print the next line +.PAD "\*[ST1]VIN#\*[ST1X]\*[FWD 1P]\*[ST2]ROBE#\*[ST2X]\*[FWD 1P]\*[ST3]NEZ#\*[ST3X]\*[FWD 1P]\*[ST4]BOUCHE#\*[ST4X]\*[FWD 1P]\*[ST5]COMMENTAIRES\*[ST5X]" +.SILENT OFF \" Resume normal printing of text +\# +\# Now that the string tabs have been marked off, we "set" them. +\# +.ST 1 L \" First string tab flush left, nofill mode (no need for .BR's between input lines) +.ST 2 L QUAD \" Remaining tabs are flush left/rag right, fill mode +.ST 3 L QUAD +.ST 4 L QUAD +.ST 5 L QUAD +\# +.TAB 1 \" Call first tab +.UNDERSCORE "VIN" +.TN \" Move to next tab and stay on the same baseline +.UNDERSCORE "ROBE" +.TN \" Ibid +.UNDERSCORE "NEZ" +.TN \" Ibid +.UNDERSCORE "BOUCHE" +.TN \" Ibid +.UNDERSCORE "COMMENTAIRES" +.TQ \" Quit tabs +\# +.ALD 6p \" Advance an extra 6 points +.FT R \" Change font to roman (medium) +.MCO \" Turn multi-column mode on +\# +.TAB 1 \" Notice that this tab gets set line-for-line +\*[IT]Peelee Island \" Set italic +\*[PREV]Gewürztraminer \" Revert to former font (roman) +2000 +(Canada) +.MCR \" Return to top of column +.TAB 2 \" Call tab 2; in multi-column mode, don't use .TN +Jaune pâle. +.MCR +.TB 3 \" Notice that from here on, we use the alias TB instead of TAB +Frais, fruité, ci\%tronné, arômes fortes de lichee et de fruits +tropicaux. +.MCR +.TB 4 +Doux, fruité, bien équilibré avec une bonne acidité. +.MCR +.TB 5 +Bon apéro. Servir avec des plats +.RW .1 \" Reduce Whitespace between letters to tighten this line +indiens ou \%chinois. +.RW 0 \" Back to normal spacing between letters +.BR +Excellent rapport qualité/prix. +.MCX 8p \" Multi-column mode off; advance an extra 8 points +.MCO \" Re-invoke multi-columns for next wine description +.TB 1 +\*[IT]Carau Pujol +\*[ROM]Tannat +1995 +(Uraguay) +.MCR +.TB 2 +Rubis foncé, vio\%lacée, presque opaque. +.MCR +.TB 3 +Belles arômes de fruits foncés (prunes, cerises noires, cassis). +Odeurs tertiares de cuir, cèdre, violets, eucalyptus, avec une trace +exotique de Band-Aid*\*[BU 12]. +\# +\# The \*[BU 12], above, pulls the period back so that it falls +\# underneath the asterisk. \*[BP] could have been used instead +\# if you prefer to use points rather than kern units. +\# +.MCR +.TB 4 +Très rond, tannins mûres et veloutés, avec un long finis fruité et +doucement alcoolique. +.MCR +.TB 5 +Superbe\|! Une aubaine à ne pas manquer. Prêt à boire maintenant. +.MCX 1v \" Multi-columns off; advance an extra linespace +\# +\# Now, an example of a hanging indent. This is excessively fussy +\# from a typographic standpoint in that it hangs the asterisk outside +\# the current left margin so that the text following it lines up with +\# with the text in the tasting notes. Notice that in order to use a +\# hanging indent, you must first set a left indent. +\# +.FT I \" Change font to italic +.PT_SIZE -.5 \" Reduce point size by 1/2 point +.LS -.5 \" Reduce leading by 1/2 point +.JUSTIFY \" Set text justified +\# +\# Now, move the left margin back by the width of an asterisk plus 2 points... +\# +.L_MARGIN -(\w'*'+2p) +\# +\# ...and set a left indent equal to the width of an asterisk plus 2 points +\# +.IL \w'*'+2p +\# +\# Now, set the hanging indent equal to the left indent, effectively pulling +\# the first line of the following text back to the new left margin. +\# Subsequent output lines will be indented by the .IL amount. +\# Notice that when using the \w inline escape, there's no need to append +\# a unit of measure to it. +\# +.HI \w'*'+2p +*\*[FWD 1p]The term "Band-Aid" means the slightly sweet, vaguely chemical +smell associated with medical-grade plastics. It is often found in +wines from terroirs in South America. Provided a wine has a sufficient +concentration of fruit +.RW .04 \" Kern the whole next line slightly, so "lipstick" doesn't hyphenate. +aromas and complex tertiary characteristics, Band-Aid is a Good Thing. +Otherwise, it smells like cheap lipstick. +.RW 0 \" Reset kerning to 0 +\# +\# Notice, above, that although the values for IL and HI are the width +\# of an asterisk plus 2 points, when setting the first line of text +\# (the one with the asterisk at the beginning), we put only 1 point of +\# space after the *. This is to compensate for the fact that in the +\# italic font, the letter T doesn't align visually with the rest of +\# the text. As already noted, this is an extremely fussy example. :) +\# +.IQ CLEAR \" Cancel and clear stored indent values +.L_MARGIN 1i \" Reset left margin to its original value. +\# +.ALD 2P \" Add 2-picas extra space before next example +\# +.FAM T +.FT B +.PT_SIZE 12 +.LS 14 +\# +Example 2: +.ALD .25v +\# +.COMMENT \" COMMENT lets you enter comments without using \# or \" +In the next line, because the string to be underscored must be +enclosed in double-quotes, you can't use the double-quote character +itself around the word "Massaging". We circumvent this by using the +groff inline escapes \(lq and \(rq (leftquote and rightquote). +.COMMENT OFF \" Remember to turn COMMENT off! +\# +.UNDERSCORE 3.75p "\(lqMassaging\(rq \*[BCK 1p]a passage of rag right text" +.SP \" Add an extra linespace +\# +.PT_SIZE 12.5 +.LS 14 +.PT_SIZE -1 \" Reduce point size by 1 point +Passage using groff spacing defaults +\# +.ALD .5v \" Add an extra 1/2 line space +\# +.PT_SIZE +1 \" Restore point size +.QUAD LEFT \" Set quad left, fill mode +.IB 3P \" Indent 3 picas from both the left and right margins +.FT R +The thousand injuries of Fortunato I had borne as I best could; +but when he ventured upon insult, I vowed revenge. You, who so well +know the nature of my soul, will not suppose, however, that I gave +utterance to a threat. \*[IT]At length\*[PREV] I would be +avenged; this was a point definitively settled\(embut the very +definitiveness with which it was resolved, precluded the idea of +risk. I must not only punish, but punish with impunity. A +wrong is unredressed when retribution overtakes its redresser. +It is equally unredressed when the avenger fails to make himself +felt as such to him who has done the wrong. +.ALD 6p +\# +\# The next line is set quad right, nofill mode, 1/2 point smaller +\# than the preceding text (using the \*[SIZE ] inline escape. +\# +.RIGHT +\*[SIZE -.5]\(emEdgar Allen Poe, \*[IT]The Cask of Amontillado\*[PREV]\*[SIZE +.5] +.SP \" Extra linespace +.IBQ \" Disable "indent both" +\# +\# The passage above, while acceptable in a longer document, exhibits a +\# few typographic flaws. The shape of the right margin rag exhibits +\# a decidedly "rounded" appearance. The word "I" stands alone at the +\# end of the third line. The space between the 1st and 2nd sentences +\# ("...revenge. You...") is too large, owing to the letter "Y" that +\# begins the 2nd sentence. The spacing between "A wrong..." (line 6) +\# is equally too large because of the way "A" and "w" fit together. +\# The em-dash before Edgar isn't vertically centered with the letter "E". +\# And so on. The most important correction below is fixing the rag +\# so that longer and shorter lines alternate. This is accomplished by +\# manually breaking lines and then slightly lengthening and shortening +\# them until a pleasing rag is achieved. The remainder of the little +\# flaws are fixed with inline escapes. +\# +.FT B +.PT_SIZE -1 +.LEFT +The same passage, \*[BU 4]"massaged" +\# +.ALD .5v +\# +.FT R +.PT_SIZE +1 +.QUAD LEFT +.HY OFF \" Turn automatic hyphenation off +.BR_AT_LINE_KERN \" Automatically insert a line break (.BR) with each invocation of .RW and .EW +.WS +1 \" Increase word space slightly +.IB \" Turn "indent both" back on; values are the same as before +\# +The thousand injuries of Fortunato I had borne as I best could; but +when he ventured upon insult, I \*[BU 2]vowed revenge. \*[BU 4]Y\*[BU 6]ou, +\*[BU 4]who so \*[BU 2]well know the nature +.EW .2 +of my soul, \*[BU 2]will not suppose, however, that I gave utterance to +a threat. \*[IT]At +.EW .2 +length\*[PREV] I would be avenged; this was a point definitively +settled\(embut the +.EW .2 +v\*[BU 1]ery definitiveness with which it was resolved, precluded the idea +of risk. +.EW 0 +I must not only punish, but punish with impunity. A \*[BCK 1p]wrong is +unredressed +.EW .1 +when retribution overtakes its redresser. It is equally unredressed +when the +.RW .1 +avenger fails to make himself felt as such to him \*[BU 2]who has done +the wrong. +.RW 0 \" Restore normal kerning +.WS +0 \" Restore normal wordspacing +.ALD 6p +.PT_SIZE -.5 +.RIGHT +\*[UP 1.5p]\(em\*[DOWN 1.5p]\*[BCK 1p]Edgar \*[BCK 1p]Allen Poe, \*[IT]The Cask of Amontillado\*[PREV] +.IQ CLEAR \" Cancel and clear stored values of all indents +\# +\# +.NEWPAGE \" Start a new page +.T_MARGIN 1i \" Set top margin to 1i (approx. equivalent to .ALD 1i-1v above) +\# +.FAM T +.FT B +.PT_SIZE 12 +.LS 14 +.LEFT +\# +Example 3: +.ALD .25v +.UNDERSCORE 3.75p "A \*[BU 2]recipe for enumerated lists using indents" +.SP .5v \" Add an extra half line space +.FAM N \" New Century Schoolbook family +.FT R +.PT_SIZE 11 +.LS 13 +.HY \" Turn hyphenation back on +.JUSTIFY \" Justify text +This example demonstrates the use of left and hanging indents for +simple enumerated lists. Nested lists are possible, as the example +shows; however, the more complex the nesting, the wiser it becomes +to use (string) tabs, as seen in Example 4. +.TI 1.5m +\*[BD]Please note: mom\*[PREV] has macros that allow you to set +enumerated lists automatically. These examples merely show hanging +indents and string tabs in use. +\# +.JUSTIFY \" Justify text +.IL \w'\0.\0' \" Establish a left indent equal to the width of 2 figure spaces plus a period. +.HI \w'\0.\0' \" Establish a hanging indent equal to the size of the left indent. +.ALD 6p +\# +\# +1.\0This is the first item in the list. N\*[BU 2]otice how the first line +"hangs" back from the remaining text, which is otherwise +indented by the width of by two figure-spaces (digit-width +spaces) and a period. +.BR +.HI \" Notice that HI doesn't require an argument once the value's been set +.ALD 6p +2.\0This is the second item in the list. As with the above item, +notice the use of the \*[BU 8]\\0 escape sequence in the input text. It's +there to ensure that the space after the number/period combination +always remains the same (i.e. doesn't stretch when the line is +justified). That way, the text of each item always lines up perfectly. +\# +.COMMENT +Now we're going to set a bullet-point list, indented from the text +above by 1 pica. IL arguments are always added to whatever value +is in already effect for IL, hence all we have to do is tell mom to +indent (from the current left indent) 1 pica plus the width of the +bullet character ( \(bu ). \*[FWD 3p] puts three points of space after +the bullet so that the bullet and the text are visually separated. +.COMMENT OFF +\# +\# +.IL 1P+\w'\(bu\*[FWD 3p]' +\# +\# Hanging indents are always relative to the current left indent. +\# The additional 1-pica indent, above, already having been taken +\# care of, we only want to hang the first lines of bullet list items +\# back by the width of the bullet character plus its 3 extra +\# points of space. +\# +.ALD 6p +.HI \w'\(bu\*[FWD 3p]' +\*[DOWN 1p]\(bu\*[UP 1p]\*[FWD 3p]This is the first line of a sublist with bullets. +N\*[BU 2]otice how the first line (the one with the bullet) is indented +exactly one pica from the text of the list item above it, while the +remaining lines align with the left indent we set above. +.ALD 6p +.HI +\*[DOWN 1p]\(bu\*[UP 1p]\*[FWD 3p]This is the second item of the sublist with bullets. \*[BU 4]We +could go on indefinitely, but let's go back to the top level (numbered) +list... +\# +\# The easiest way to return to a previous indent value is by subtraction. +\# The argument to IL, above, was 1P+\w'\(bu\*[FWD 3p]', so we just reverse +\# it by putting a minus sign in front. The parentheses are required +\# for groff to evaluate the expression properly. +\# +.IL -(1P+\w'\(bu\*[FWD 3p]') +.HI \w'\0.\0' \" Reset hanging indent for use with numbered items. +.ALD 6p +3.\0...and here we are. +.HI \" Again, notice that once HI has been set, you don't have to keep passing it an argument. +.ALD 6p +4.\0In order not to make the example too long, we'll stop here. +.IQ CLEAR \" Don't forget to cancel and/or clear indents! +\# +.FAM T +.FT B +.PT_SIZE 12 +.LS 14 +.LEFT +.SP +\# +Example 4: +.ALD .25v +.UNDERSCORE 3.75p "A \*[BU 2]recipe for nested lists using string tabs" +.SP .5v +.FAM N +.FT R +.PT_SIZE 11 +.LS 13 +.JUSTIFY +Although setting up string tabs is a bit more complex than setting +up indents, it's \*[BU 3]well worth the effort, especially for nested lists. +.ALD 6p +\# +.COMMENT +The PAD line, below, sets up two string tabs. The first (ST1) +is exactly the length of two figure spaces and a period. The +second (ST2) is simply "the remainder of the line." +.COMMENT OFF +\# +.SILENT \" Don't print any of this +.PAD "\*[ST1]\0.\0\*[ST1X]\*[ST2]#\*[ST2X]" +.ST 1 L \" String tabs must be "set" after being marked off in a line +.ST 2 J \" ST 1 will be set flush left, nofill; ST 2 will be justified. +.SILENT OFF \" Restore printing +\# +.TB 1 +1. +.TN \" Use .TN here so text stays on the same baseline as the number in tab 1 +This is the first item in the list. N\*[BU 2]otice how, just as in Example 3, +the first line hangs back from the remaining text, which is otherwise +indented. +.ALD 6p +.TB 1 +2. +.TN +This is the second item in the list. N\*[BU 2]otice that when setting "lists" +with tabs, there's no need to use the \*[BU 8]\\0 escape sequence after +the number/period combination in the input text. +.ALD 6p +\# +.COMMENT +Now, set up the indented bullet-point sublist. The PAD line +says: move forward 12 points (1 pica), then mark off a string +tab (ST3) that's the length of the bullet character; move foward +another three points, then make the next string tab (ST4) the +length of remainder of the line. +.COMMENT OFF +\# +.SILENT +.PAD "\*[FWD 12p]\*[ST3]\(bu\*[ST3X]\*[FWD 3p]\*[ST4]#\*[ST4X]" +.ST 3 L +.ST 4 J +.SILENT OFF +.ALD 6p +.TB 3 +\*[DOWN 1p]\(bu\*[UP 1p] +.TN +This is the first line of a sublist with bullets. N\*[BU 2]otice how the +bullets and the text line up exactly the same as in Example 3. +.ALD 6p +.TB 3 +\*[DOWN 1p]\(bu\*[UP 1p] +.TN +This is the second item of the sublist with bullets. For the fun of +it, lets add in an +.SPREAD +en-dashed sub-sublist. +.BR \" We're in a fill mode right now, so you *must* terminate the line with BR +\# +.SILENT +.PAD "\*[FWD 12p]\*[ST5]\(en\*[ST5X]\*[FWD 4p]\*[ST6]#\*[ST6X]" +.ST 5 L +.ST 6 J +.SILENT OFF +.ALD 6p +.TB 5 +\*[UP .75p]\(en\*[DOWN .75p] +.TN +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, +sed diam voluptua. +.ALD 6p +.TB 5 +\*[UP .75p]\(en\*[DOWN .75p] +.TN +At \*[BU 3]vero eos et accusam et justo duo dolores et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet. +.ALD 6p +.TB 1 +3. +.TN +And here we are, back at the top-level numbered list with a minimum +of muss and fuss, +.ALD 6p +.TB 1 +4. +.TN +Generally speaking, once you get the hang of string tabs and the +\*[BD]PAD\*[PREV] macro, you'll find setting up complex nested lists +(or anything similar to them) easier than with hanging indents. +.TQ +\# +.NEWPAGE +.FAM T +.FT B +.PT_SIZE 12 +.LS 14 +.LEFT +\# +Example 5: +.ALD .25v +.UNDERSCORE 3.75p "Word spacing" +.ALD 8p +.FAM P \" Palatino family +.PT_SIZE 11 +.LS 14 +\# +\# The "label" lines for the following are set in Helvetica bold, one +\# point smaller than the examples themselves. This demonstrates the +\# use of the groff inline escape \f[...] to change both family and +\# font inline. It also shows using the mom inline \*S[...], which is +\# an alternate form of the inline, \*[SIZE ] +\# +\f[HB]\*S[-1]Normal word spacing\*S[+1]\*[PREV] +.FT R +N\*[BU 1]o\*[BU 1]w \*[BU 1]is the time for all good men to come to the aid of the party. +.ALD 4p +\f[HB]\*S[-1]Word spacing adjusted by \*[UP 1p]\*[BU 3]+\*[DOWN 1p]\*[BU 1]2\*S[+1]\*[PREV] +.FT R +.WS +2 +N\*[BU 1]o\*[BU 1]w \*[BU 1]is the time for all good men to come to the aid of the party. +.WS +0 +.ALD 4p +\f[HB]\*S[-1]Word spacing adjusted by \*[UP 1p]\*[BU 3]+\*[DOWN 1p]4\*S[+1]\*[PREV] +.FT R +.WS +4 +N\*[BU 1]o\*[BU 1]w \*[BU 1]is the time for all good men to come to the aid of the party. +.WS +0 +.ALD 4p +\f[HB]\*S[-1]Word spacing adjusted by \*[UP 1p]\*[BU 3]+\*[DOWN 1p]6\*S[+1]\*[PREV] +.FT R +.WS +6 +N\*[BU 1]o\*[BU 1]w \*[BU 1]is the time for all good men to come to the aid of the party. +.WS +0 +.SP 1.5v +\# +.FAM T +.FT B +.PT_SIZE 12 +.LS 14 +\# +.LEFT +Example 6: +.ALD .25v +.UNDERSCORE 3.75p "Line kerning" +.ALD 8p +.FAM P \" Palatino family +.FT R +.PT_SIZE 11 +.LS 15 +\# +\# Here, we set up some tabs so the examples can go into facing columns. +\# +.TAB_SET 1 0 19.5P L +.TAB_SET 2 19.5P 19.5P L +\# +.MCO \" Turn multi-columns on +.TB 1 +\f[HB]\*S[-1]Unkerned line\*S[+1]\*[PREV] +.FT R +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.ALD 4p +\f[HB]\*S[-1]Line "tightened" \(en .RW .1\*S[+1]\*[PREV] +.RW .1 +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.ALD 4p +\# +\# In the next line, notice that because it uses a different family +\# (Helvetica instead of Palatino), the RW macro doesn't affect it. +\# +\f[HB]\*S[-1]Line "tightened" \(en .RW .2\*S[+1]\*[PREV] +.RW .2 +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.ALD 4p +\f[HB]\*S[-1]Line "tightened" \(en .RW .3\*S[+1]\*[PREV] +.RW .3 +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.MCR +.TB 2 +\f[HB]\*S[-1]Unkerned line\*S[+1]\*[PREV] +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.ALD 4p +\f[HB]\*S[-1]Line "loosened" \(en .EW .1\*S[+1]\*[PREV] +.EW .1 +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.ALD 4p +\f[HB]\*S[-1]Line "loosened" \(en .EW .2\*S[+1]\*[PREV] +.EW .2 +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.ALD 4p +\f[HB]\*S[-1]Line "loosened" \(en .EW .3\*S[+1]\*[PREV] +.EW .3 +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.MCX 1.5v +\# +.FAM T +.FT B +.PT_SIZE 12 +.LS 14 +.LEFT +\# +Example 7: +.ALD .25v +.UNDERSCORE 3.75p "Cutaround using left\*[FU 2]/right indents, multi columns \ +and a dropcap" +.SP +\# +.FT R +.PT_SIZE 11 +.LS 12 +.BR_AT_LINE_KERN OFF \" In justified text, it's best to have this OFF +\# +.TAB_SET 1 0 18.5P J +.TAB_SET 2 20.5P 18.5P J +.MCO +.ALD 5P+9p +\# +\# The little picture of tux. +\# +.PSPIC penguin.ps +.MCR +.TAB 1 +.XCOLOR red \" Initialize the X11 color, red +.DROPCAP_COLOR red +.DROPCAP_FONT B +.DROPCAP L 3 COND 80 \" i.e. the letter L dropped 3 lines, condensed to 80% of its normal width +.EW .2 +orem ipsum dolor sit amet, consetetur sa\%dip\%scing elitr, sed diam +nonumy eir\%mod tempor invidunt ut labore et dolore magna aliquyam erat, +sed diam voluptua. +.EW 0 +.TI 1P +At vero eos et accusam et justo duo dolores et ea rebum. Stet clita +kasd gubergren, no sea taki- +.SPREAD \" Force justify preceding line before starting indent +.IR 3.5P +kimata sanctus est lorem ipsum dolor sit amet. +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor. +.EW .2 +.TI +Invidunt ut labore et dolore magna ali\%qu\%yam erat, sed diam voluptua. +At +.EW 0 +vero eos et accusam et justo duo dolores et ea rebum. +.TI +Stet clita kasd gubergren, no sea ta- +.SPREAD \" Force justify preceding line before quitting indent +.IRQ +kimata sanctus est lorem ipsum dolor sit amet. Lorem ipsum dolor +sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +in\%vi\%dunt ut labore et dolore magna aliquyam erat. Sed diam voluptua, +at vero eos et accusam et justo duo +.SPREAD +.EW .3 +dolores et ea rebum. Stet clita no kasd guber- +.SPREAD +.MCR +.TB 2 +gren, no sea takimata sanctus est lorem ipsum +.EW 0 +dolor sit amet. Consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et dolore. +.TI +Magna aliquyam erat, sed diam voluptua, at vero eos et accusam. +Et justo duo dolores et ea +.SPREAD +.IL 3.5P +rebum, stet clita kasd gubergren. No sea +takimata sanctus est, lorem ipsum dolor sit amet. +.TI +Sit amet, consetetur sadipscing elitr, sed diam. Nonumy eirmod tempor +in\%vi- +.EW .3 +dunt ut labore et dolore magna. Ali- +.EW 0 +quyam erat sed diam voluptua. +At vero eos et accusam et justo duo dolores et ea rebum stet. +.ILQ +.TI +Dolores et ea rebum stet clita kasd gubergren, no sea takimata +sanctus. Sadipscing elitr sed diam, nonumy eirmod tempor, invidunt +ut labore et dolore magna aliquyam erat. Sed diam voluptua, at vero +eos et accusam et justo duo dolores et ea rebum. diff --git a/contrib/groff/contrib/mom/groff_mom.man b/contrib/groff/contrib/mom/groff_mom.man index dea6a91d147e..b82fcad71898 100644 --- a/contrib/groff/contrib/mom/groff_mom.man +++ b/contrib/groff/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 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 @@ -14,6 +14,9 @@ A copy of the Free Documentation License is included as a file called FDL in the main directory of the groff source package. .. . +.do nr groff_mom_C \n[.C] +.cp 0 +. .mso www.tmac . .de TQ @@ -85,10 +88,13 @@ 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] . .\" Local Variables: .\" mode: nroff diff --git a/contrib/groff/contrib/mom/momdoc/appendices.html b/contrib/groff/contrib/mom/momdoc/appendices.html index 64d3b8f54c37..6b5b63fcd610 100644 --- a/contrib/groff/contrib/mom/momdoc/appendices.html +++ b/contrib/groff/contrib/mom/momdoc/appendices.html @@ -1,3 +1,4 @@ + @@ -7,8 +8,10 @@ -Prev   +Next   +Prev   Back to Table of Contents +

@@ -17,9 +20,13 @@

@@ -58,30 +65,517 @@ basic (text only) html. I may have written mom, but I still regularly call on her documentation. Elvis, with its html capabilities, lets me write and format mom documents AND peruse her documentation, clicking on links as -necessary, without ever leaveing the comfy confines of my +necessary, without ever leaving the comfy confines of my text editor.

Not everyone, of course, uses an editor with html capabilities. For them, firing up a browser is obviously necessary for reading mom's documentation. Browsers being what they are, and not everyone on the globe having the cash for muscle machines -to run Galeon, or Konqueror, or Mozilla, or Netscape, their browser -needs to be one that's fast and light -- Lynx, in other words. +to run Galeon, or Konqueror or Mozilla, their browser +needs to be fast and light--and probably "text-only".

Some mom users may notice the absence of graphics, -frames, and (for the most part) tables in this documentation. -The reason is simple: Lynx. People who, for whatever reason (choice -or necessity), use Lynx to read the documentation must be able to make -sense of it. All of it. Graphical examples of mom -in action might have made some parts of the documenation easier to -write, but would have excluded Lynx-only users. And it goes -without saying that the documentation looks fine if you're -reading it in a graphical browser. +frames, and (for the most part) tables in this documentation. The +reason is simple: text-only browsers. People who, for whatever +reason (choice or necessity), use lynx, or links or w3m to read +the documentation must be able to make sense of it. All of it. +Graphical examples of mom in action might have made +some parts of the documentation easier to write, but would have +excluded text-only browser users. And it goes without saying that +the documentation looks fine if you're reading it in a graphical +browser.


+
+

Adding PostScript fonts to groff

+
+ + +Small note: the term <prefix> in this +section refers to the directory in which groff is installed, +typically something like /usr/share/groff/<version#> +(for distro-specific, pre-compiled groff packages) or +/usr/local/share/groff/<version#> (if you've built groff +from source). +

+Groff comes with a small library of PostScript +families +(see the +FAMILY +macro for a list). The families have four +fonts +associated with them. These fonts are a combination of +weight +and +shape: +
+

    +
  • R (Roman, usually Medium weight), +
  • I (Italic, usually Medium weight), +
  • B (Bold, usually Roman shape) and +
  • BI (Bold Italic). +
+

+If you do a lot of document processing or typesetting with +mom, you'll find, sooner or later, that these +families and their associated fonts aren't sufficient. You'll want +to supplement them, either with more fonts for the families already +provided--"Damn! I need Helvetica Bold Condensed Italic!"--or with +entire new families. +

+Without going into the gory details (yet), while it's true that +adding fonts to groff is a relatively straightforward +process, extending existing families or adding new ones requires +some planning. +

+The traditional approach to extending groff families has been +to create new families for non-default weights and +shapes (e.g. Light, which is a weight; Condensed, which is a +shape), then to associate them with groff's predefined R, +I, B and BI font styles. An example +of this can be seen in the groff PostScript font library itself +(<prefix>/font/devps/): there's one "family" for +Helvetica (HR, HI, HB, HBI) and another for Helvetica Narrow (HNR, +HNI, HNB, HNBI). +

+The difficulty with this approach is that typographers +tend to think of "families" as referring to the +entire set of font weights and shapes associated with a +particular family name. For example, when a typesetter says +"the Helvetica family", s/he is including the weights Helvetica Thin, +Helvetic Light, Helvetica Regular, Helvetica Bold, Helvetica Heavy, +etc, and all their associated +shapes +(Roman, +Italic, Condensed, Narrow, Extended, Outline, etc). +

+Thus, intuitively, when a typesetter gives mom a +.FAM(ILY) directive, s/he reasonably expects that any +subsequent .FT directive will access the desired font +from the Helvetica family--without the need to state explicitly both +family and font to .FT, as it is explained one can do in +the +FAMILY +and +FT +sections of these documents. +

+If one had, say, the fonts, Helvetica Light Roman +and Helvetica Light Italic as well as Helvetica Light Condensed +Roman and Helvetica Light Condensed Italic, the traditional +approach would require two "partial" families: HLR/HLI and +HLCDR/HLCDI. Accessing these family/font combos +routinely throughout a document would then require +changing family (with .FAM(ILY)) and selecting the +desired font (with .FT R or .FT I), or +passing .FT the lengthy family+fontname (.e.g. .FT +HLCDI). +

+Fortunately, groff provides a mechanism whereby it's possible to +extend the basic R, I, B and BI +fonts ("styles" in groff-speak) so that one can, in +fact, create extensive type families, and access all the fonts +in them with .ft (groff) or .FT (mom). +

+mom uses this mechanism to offer, in addition to +groff's default PostScript font styles, the following: +

+ +

+Mom's extensions to groff's basic font styles
+=============================================
+
+	L      =  Light Roman
+	LI     =  Light Italic
+	LCD    =  Light Condensed Roman
+	LCDI   =  Light Condensed Italic
+	LEX    =  Light Extended Roman
+	LEXI   =  Light Extended Italic
+	CD     =  Medium/Book Condensed Roman
+	CDI    =  Medium/Book Condensed Italic
+	EX     =  Medium/Book Extended Roman
+	EXI    =  Medium/Book Extended Italic
+	DB     =  DemiBold Roman
+	DBI    =  DemiBold Italic
+	BCD    =  Bold Condensed Roman
+	BCDI   =  Bold Condensed Italic
+	BEX    =  Bold Extended Roman
+	BEXI   =  Bold Extended Italic
+	HV     =  Heavy Roman
+	HVI    =  Heavy Italic
+	HVCD   =  Heavy Condensed Roman
+	HVCDI  =  Heavy Condensed Italic
+	HVEX   =  Heavy Extended Roman
+	HVEXI  =  Heavy Extended Italic
+	BL     =  Black Roman
+	BLI    =  Black Italic
+	BLCD   =  Black Condensed Roman
+	BLCDI  =  Black Condensed Italic
+	BLEX   =  Black Extended Roman
+	BLEXI  =  Black Extended Italic
+	UBL    =  Ultra-Black Roman
+	UBLI   =  Ultra-Black Italic
+
+ +Thus, with mom, if you've installed, say, some +extra Helvetica fonts and named them according to the convention FS +(where "F" means family and "S" means font +style), once having entered +

+

+	.FAMILY H
+	  or
+	.FAM H
+
+ +you can access any of those Helvetica fonts simply by +passing the correct argument from the list above to +FT. +

+For example, if you were working in Medium Roman (.FT R) +and you needed Medium Condensed Italic for a while (assuming it's +installed), you'd just type +

+

+	.FT CDI
+
+ +to access the Medium Condensed Italic font from the Helvetica +family. +

+Mom's list of font styles doesn't pretend to +be exhaustive, but rather tries to cover the basic weight/shape +combinations likely to be found in any reasonably complete type +family. +

+The actual extension names are arbitrary and can be used in a +flexible manner. For example, if you create a family that has a +DemiBold font (DB) but no Bold font (B), you might find it more +convenient to give the DemiBold font the extension "B". +Equally, if the family has an ExtraBold font, you might find it more +convenient to use the extension "HV" (Heavy). + +

+However, you may, at needs, want to add to mom's +list of font styles. You can do this by editing the file, om.tmac. +Near the top, you'll see lines of the form +

+

+	.sty \n[.fp] L       \" Light Roman
+	.sty \n[.fp] LI      \" Light Italic
+	.sty \n[.fp] LCD     \" Light Condensed Roman
+
+ +Simply add your new font style by imitating what you see and +plugging in your new font style (having, of course, first created the +font, correctly named, in groff's PostScript font directory; see +How to create a PostScript font for use with groff). +

+For example, if you already have some fonts from the Univers +family installed and have called the family UN, you might decide at +some point to add the Bold Outline font (UNBO). In which case, +you'd add +

+

+	.sty \n[.fp] BO      \" Bold Outline
+
+ +to the .sty \n[.fp] <font style> list in om.tmac. +

+Be careful, though, that any styles you add do not conflict +with family names that already exist. +"C", for example, conflicts with the Courier family +(CR, CI, CB, CI). Were you to create a font style "C", +thinking that .FT C would give you access to font style +once you'd given a .FAM(ILY) directive, you'd get a nasty +surprise: your type would come out in Courier Roman! +

+VERY IMPORTANT NOTE: mom's font extensions are +not "user-space" controllable via a macro. If you've +been using groff for a long time, and have already rolled your own +solution to adding PostScript families, fonts, weights, shapes, etc. to +groff, you may find that mom's font extensions +conflict with your own scheme. Should that be the case, comment out +the .sty \n[.fp] <font style> lines found near the +top of the om.tmac file. + +

How to create a PostScript font for use with groff

+These instructions aren't meant to cover all possibilities, merely +to present one way of making PostScript families/fonts available to +groff and mom. +

+GNU/Linux distributions being what they are, directory locations may +differ and the presence of some executables can't be guaranteed. +I run a Debian system. The instructions reflect that. Users of +other distros will have to interpret them according to the way their +distro operates. +

+What you need before you start: +
+

    +
  • groff, version 1.18 or higher +
    + (Debian package: groff) +
  • a full installation of gs and associated tools +
    + (Debian package: gs or gs-gpl) +
  • a library of gs fonts +
    + (Debian package: gsfonts) +
  • a utility for converting TrueType fonts to Type1 fonts +
    + (Debian package: ttf2pt1) +
  • a font manager +
    + (Debian packages: defoma, psfontmgr, dfontmgr) +
  • perl +
    + (Debian package: perl) +
+
+A reasonably complete installation of any major GNU/Linux distro +should already have these on your system, except perhaps for the +utility to convert TrueType fonts to Type1 fonts. +

+Initial preparation (you only have to do this once): +
+

    +
  1. If you don't already have one, create a directory in your + home directory to hold new fonts. Any directory name will do. + I use ~/Fonts, with subdirectories for Type1, TrueType and Groff + fonts. + +
  2. Locate the groff directory, site-font. The exact location is + difficult to predict, owing to differences between distros + and whether you're using a pre-packaged groff or have built + it from source. Some typical locations are +
    +
      +
    • /usr/share/groff, +
    • /usr/local/share/groff +
    • /etc/groff +
    +

    + If you can't find the site-font directory, locate + groff's site-tmac directory, and, as root, create site-font + in the same directory as the one that holds site-tmac. + E.g., if you find site-tmac in /usr/share/groff, create + site-font in /usr/share/groff. +

  3. Locate the file <prefix>/font/devps/generate/textmap + and symlink it to textmap in the directory that + contains your personal collection of PostScript fonts. (See the + Small Note, + above, for the meaning of <prefix>). On my system, + at the time of writing, <prefix> is + /usr/local/share/groff/1.19.2/, therefore, I symlink it in + ~/Fonts/Type1 with +
    +
    +ln -s /usr/local/share/groff/1.19.2/font/devps/generate/textmap textmap
    +		
    +
  4. Locate the file <prefix>/font/devps/text.enc and + symlink it to text.enc in your personal font + directory. On my system, in ~/Fonts/Type1 +
    +ln -s /usr/local/share/groff/1.19.2/font/devps/text.enc text.enc
    +		
    +
  5. Make sure you know which directory/ies holds your gs fonts. + You'll need the information later. On a Debian box, some + typical locations are +
    +
      +
    • /usr/lib/ghostscript/fonts +
    • /usr/share/ghostscript/fonts +
    • /usr/share/fonts/type1/gsfonts +
    +
+
+Font creation/installation: +
+
    +
  1. Acquire the font in either Type1 (.pfb) or TrueType + (.ttf) format. +
  2. Place the font in your personal font directory; for me, + that's ~/Fonts/Type1 or ~/Fonts/TrueType. +
  3. In your personal font directory, run one of the following: +
    +
      +
    • For Type1 fonts +
      +
        +
      • getafm fontfilename.pfb | gsnd - > fontfilename.afm +
        + For Type1 fonts, this will generate something called + an .afm (Adobe Font Metrics) file, which is + required to create PostScript fonts for groff. +
      +
    • For TrueType fonts +
      +
        +
      • ttf2pt1 \-b fontfilename.ttf +
        + For TrueType fonts, this will generate a PostScript + .pfb file as well as an .afm file. +
      +
    +
  4. Still in your personal font directory, run +
    +
      +
    • afmtodit -e text.enc fontfilename.afm textmap GROFF_FONTNAME +
    +

    + Q: How do I choose a GROFF_FONTNAME? +

    + A: Start by considering the + family + to which the font belongs. If you're adding to a family that + already exists in groff's <prefix>/font/devps + directory, that will be the first part of the font name. + (See + here + for a list of families already installed, along with their groff + names.) Add to that name the appropriate weight/style extension, + listed + here. +

    + For example, if you're adding Helvetica Light Roman, your + GROFF_FONTNAME would be HL. If you're + adding Helvetica Light Italic, your GROFF_FONTNAME would be + HLI. +

    + If you're adding a font not already in groff's PostScript + families, first choose a meaningful name for the + family + to which the font belongs. The name can be anything you like. If, + for example, the family is Garamond, you could choose GARAMOND, + GARA, GD, or even just plain G as the family name. Then tack on the + appropriate style/weight extension. Thus, if you were installing + Garamond Bold Condensed Italic and had chosen GD + as the family name for Garamond, your GROFF_FONTNAME would be + GDBCDI. +

    + In mom, you can then access the Garamond + family with .FAM GD, and the Bold Condensed + Italic font wth .FT BCDI. +

    + Note: The family name need not be in upper + case, and there's no limit to the length of the name. + "Garamond", for example, could be the name you + give the Garamond family. In fact, you might find it + preferable, since a) you wouldn't have to remember how + you'd named the family, and b) should you be scanning + your + site-font directory, + something like GaramondBCDI will be more meaningful than, + say, GDBCDI. +

  5. Copy or move GROFF_FONTNAME to your + site-font directory, + or change to the site-font directory and make a symlink to + GROFF_FONTNAME in your personal directory. +
  6. Copy or move the .pfb file to the directory that + holds your gs fonts, or change to that directory and make a + symlink to the .pfb file in your personal directory. +
  7. Do whatever your system or distro requires in order to + register the new PostScript font (the .pfb file). On a + Debian system, as root, you can run dfontmgr for a + graphical interface that will take care of registering the + font. +
+

+Written out in full, adding fonts looks like a lot of work. It +isn't. Basically, it's just: +
+

    +
  • acquire the font +
  • generate an .afm file for the font +
  • create the groff font +
  • put the groff font in <prefix>/font/devps +
  • make sure gs knows about the font +
+
+After you've done it a couple of times, it all makes sense, and is +really quite easy. Not to mention that once you understand the +process, you can write a bash script to automate the process. +Here's an example, which you can adapt to your own needs. The +script requires an argument (the .pfb filename), then prompts for +the GROFF_FONTNAME. +

+

+#! /bin/bash
+
+# A script for installing Type1 fonts.
+#
+# Builds .afm files from .pfb files, generates a groff font from the
+# .afm file, makes a symlink in /usr/lib/ghostscript/font/ to the
+# .pfb file, and a symlink in site-font to the groff font
+
+# .pfb filename, stripped of .pfb extension
+FONT=`basename $1 .pfb`
+
+# Directory holding my personal collection of type1 fonts
+FONTDIR="$HOME/Fonts/Type1"
+
+# Directory holding system ghostscript fonts
+GS_FONTDIR="/usr/lib/ghostscript/fonts"
+
+# Location of site-font/devps
+GROFF_SITE_FONTDIR="/usr/local/share/groff/site-font/devps"
+
+# Personal groff fonts directory
+GROFF_FONTS="$HOME/Fonts/Groff"
+
+# Symlinks to textmap and text.enc
+TEXTMAP="$FONTDIR/textmap"
+TEXTENC="$FONTDIR/text.enc"
+
+if [ ! `pwd` = "$FONTDIR" ] ; then
+    echo "Changing into $FONTDIR directory.."
+    cd $FONTDIR
+    sleep 1
+else
+	sleep 1
+fi
+
+echo -n "Groff name for this font: "
+read FONTNAME
+sleep 1
+
+echo "Getting .afm.."
+getafm $FONT.pfb | gsnd - > $FONT.afm
+sleep 1
+
+echo "Creating $FONTNAME.."
+afmtodit -e $TEXTENC $FONTDIR/$FONT.afm $TEXTMAP $FONTNAME
+mv -i $FONTNAME $GROFF_FONTS
+sudo ln -s $GROFF_FONTS/$FONTNAME $GROFF_SITE_FONTDIR/$FONTNAME
+sleep 1
+
+echo "Linking $FONT in $GS_FONTDIR.."
+cd $GS_FONTDIR
+sudo ln -s $FONTDIR/$FONT.afm $FONT.afm
+sudo ln -s $FONTDIR/$FONT.pfb $FONT.pfb
+sleep 1
+
+# This next bit is Debian specific.  If you're not running a
+# Debian system, replace it with whatever your distro requires
+# in order to register Type1 fonts.
+
+if [ !`pidof -x /usr/bin/dfontmgr` ] ; then
+    echo "I will now run dfontmgr so you can register the font."
+    exec sudo dfontmgr &
+else
+    echo "You may now register the font with dfontmgr."
+fi
+
+
+ + +

Some reflections on mom

@@ -99,12 +593,14 @@ scratching a personal itch, then mom can truly be called open source, even if, a mere humble set of macros standing on the shoulders of a giant named troff, she isn't programming at all.

-As a writer living in a perpeptual state of penury, all the computers +As a writer living in a perpetual state of penury, all the computers I've ever owned have been hand-me-downs -- several generations out-of-date and "resource challenged". Disk space has always been an issue, as has processor speed and available RAM. -One of the reasons I run Linux is that it has helped enormously to -get the most out of my poor little boxes. +One of the reasons I run GNU/Linux is that it has helped enormously +to get the most out of my poor little boxes. (It has been pointed +out to me that NetBSD might be an even better choice of operating +systems for computers with limited resources.)

In Linux-land, the choice of typesetting systems basically comes down to groff or TeX. Both are wonderful -- monumental achievements if you @@ -122,7 +618,7 @@ However, groff has always had a liability: it's incredibly geeky. Owing to its very long history, it -- and its "power users" -- have remained stuck in a time warp. Most common macro packages still look as they did in those decades when memory was exorbitantly -expensive, and every byte mattered. Documentation -- not always +expensive and every byte mattered. Documentation -- not always easy to find -- is written as if all readers are computer whizzes, or at least have a university degree in one of the higher sciences.

@@ -132,6 +628,13 @@ ambiguity of groff's documentation. Making sense of certain primitives has often involved days of testing, interpreting the documentation instead of just using the primitive.

+(ADDENDUM to the previous two paragraphs: A tremendous amount of +effort has gone into creating a groff manual that can be read with +"info," as well as creating truly useful man pages. The info +manual is clear and well-written, so my comments are actually out +of date. I leave them in for the benefit of groff newbies, who may +still find the documents a bit intimidating.) +

For some time now, groff users and macro writers have had the option to use "long" names, yet have mostly chosen not to. With long names, it's possible to create macro sets that are humanly @@ -145,15 +648,11 @@ newbies and old hands alike. and a host of other groff goodies that have become part of the whole groff picture under the unflagging guidance of groff's current maintainer, Werner Lemberg. Nearly every macro, number register and -string is "recognisable" simply by its name. The file is +string is "recognizable" simply by its name. The file is heavily commented. A consistent, if idiosyncratic, indenting style is used as well, significantly improving readability. Anyone wanting to futz around with mom's macros should be able to do so with a minimum of head scratching. -

-To all you groff-jocks out there who love the aracana of -groff-as-it-used-to-be, I apologise. To everyone else, I simply say: -Welcome, and enjoy.


@@ -171,14 +670,22 @@ groff mailing list at (subscription information available here) or contact me, Peter Schaffter, directly at -

-

- df191@ncf.ca -
+peter@faustus.dyn.ca +or +ptpi@golden.net. +

+Please include the word "mom" or "groff" in the +Subject: line of any message sent to my personal address, or you +risk the wrath of my implacable spam filters. :) +

+If you want to visit mom's homepage, you'll find +it +here.


-Prev   +Next   +Prev   Top   Back to Table of Contents diff --git a/contrib/groff/contrib/mom/momdoc/color.html b/contrib/groff/contrib/mom/momdoc/color.html new file mode 100644 index 000000000000..a6badbc4ba20 --- /dev/null +++ b/contrib/groff/contrib/mom/momdoc/color.html @@ -0,0 +1,338 @@ + + + + +Mom -- Colour + + + + + +Next   +Prev   +Back to Table of Contents + + +

+ Coloured text +

+

+Introduction to coloured text +
+Index of colour macros +

+ + +

Introduction to coloured text

+ + +Mom's support for coloured text is straightforward. +You begin by telling mom about the colours you want +with +NEWCOLOR +or +XCOLOR. +Afterward, any time you want text to be coloured, you either colour +it with an +inline escape +that contains the colour name (e.g. \*[red] or +\*[blue]) or invoke the macro, +COLOR, +with the name of the colour you want. + +

+For example, say you want to have the name "Jack" in the +sentence "All work and no play makes Jack a dull boy" +appear in yellow. You'd begin by telling mom about +the colour, yellow. There are two ways of doing this; see +NEWCOLOR +and +XCOLOR +for a full explanation of the difference between the two. If you +use XCOLOR, you'd enter this: +

+

+	.XCOLOR yellow
+
+ +If you use NEWCOLOR, you might enter +

+

+	.NEWCOLOR yellow RGB #FFFF00
+
+ + +After "defining" (or "initializing") the colour +"yellow", you'd colourize the name, Jack, either with an +inline escape +

+

+	All work and no play makes \*[yellow]Jack\*[black] a dull boy.
+
+ +or with the COLOR macro +

+

+	All work and no play makes
+	.COLOR yellow
+	Jack
+	.COLOR black
+	a dull boy.
+
+ +Notice, in both examples, that a) you have to set the colour back to +black after "Jack", and b) you don't have to define or +intialize the colour, black. Mom predefines +"black", "BLACK", "white" and +"WHITE" for you. +

+For information on using colour during +document processing, +see +Colour support in document processing. +

+Please note: Mom's colour support is for text only. +She doesn't support "fill" (or "background") +colour for drawn objects. Please also note that if you're +accustomed to using groff's .defcolor to define colours, +and groff's inline \m[<colorname>] to call them, you may +continue to do so without confusing mom. + +

+

Index of colour macros

+ +

+ + + +


+

Creating (initializing) a colour with NEWCOLOR

+
+
Macro: NEWCOLOR <colour name> [<colour scheme>] <colour components> + +

+NEWCOLOR lets you create a colour, rather like an +artist mixing paint on a palette. The colour isn't used +immediately; NEWCOLOR merely tells +mom how to mix the colour when you need it. If +you haven't invoked NEWCOLOR (or +XCOLOR), +mom doesn't have a clue what you mean when you +reference a colour (with +COLOR +or +\*[<color name>]). +

+The first argument to NEWCOLOR is a name for your +colour. It can be anything you like--provided it's just one word +long--and can be caps, lower case, or any combination of the two. +

+The second argument, which is entirely optional, is the "colour +scheme" you want mom to use when mixing the +colour. Valid arguments are RGB (3 components, +red green blue), CYM (3 components cyan yellow +magenta), CMYK (4 components cyan magenta yellow +black) or GRAY (1 component). If you omit the +second argument, mom assumes you want RGB. +

+The final argument is the components of your colour. This can be +hexadecimal string starting with a pound sign (#) (for colour values +in the 0-255 range) or two pound signs (##) (for colour values +in the 0-65535 range), or it can be a series of decimal digits, +separated by spaces, one digit per component, with the argument +enclosed in double quotes. (If this is all gibberish to you, see +Tips for newbies.) +

+Thus, to tell mom about a colour named +"YELLOW", you could enter one of the following: +

+

+	.NEWCOLOR YELLOW #FFFF00         \"or ##FFFFFFFF0000 or "1 1 0"
+	.NEWCOLOR YELLOW RGB #FFFF00     \"or ##FFFFFFFF0000 or "1 1 0"
+	.NEWCOLOR YELLOW CYM #00FF00     \"or ##0000FFFF0000 or "0 1 0"
+	.NEWCOLOR YELLOW CYMK #00FF0000  \"or ##0000FFFF00000000 or "1 1 0"
+
+ +After you've told mom about a colour, you can then get +her to set text in that colour either with the inline escape +\*[<colorname>] +or the macro +COLOR. +(See the +example, +above.) +
+

Tips for newbies

+Colour manipulation can be tremendously confusing if you don't have +a background in graphic arts or computing. My advice, if color +intimidates you, is to stick to using mom's +default RGB colour scheme, and to fire up a color chooser that +gives you the RGB values you want for the colour you select. Plug +those values into the components argument to +NEWCOLOR, and you'll get the colour you want. +Both the KDE and gnome desktops have colour selectors that provide +you with the shorter RGB hexadecimal string. If you're not running +KDE or gnome, the X utility, xcolorsel, provides you with a similar +functionality, although it only provides RGB values for 256 +pre-defined colours. If you use xcolorsel, be sure to click the +button "Display format" and select "8 bit truncated +rgb". +

+Alternatively, you can use mom's simpler +XCOLOR +macro to initialize one of the 256 pre-defined X colours by +supplying the name of the color as an argument. +
+ + + +


+

Initializing a colour with XCOLOR

+
+Macro: XCOLOR <X color name> [<alias>] +
+*<X color name> must be all one word, all lower case. +
+(See +
Finding X color names +for how to get a list of valid colour names.) + +

+XCOLOR is similar to NEWCOLOR in +that it tells mom to initialize a colour, but it's +easier to use. All you have to do is pass it, as an argument, the +legal name of one of the 256 pre-defined X colours. The name must +be all one word, and, breaking with mom policy, it +must be entered in lower case. +

+For example, if you want to intialize the X colour, coral, all you +have to do is enter +
+

+	.XCOLOR coral
+
+ +Afterwards +

+

+	.COLOR coral
+
+ +will colourize subsequent text coral until you instruct +mom to return to black, or some other pre-defined +initialized colour. (The +inline escape +\*[coral] will equally colourize text coral after you've +initialized the colour with XCOLOR.) +

+The downside of XCOLOR is that you can't create +custom colours. This restriction, however, is mitigated by the +fact that for many users, 256 colours is more than enough to play +around with. +

+While some X colours have fanciful names (peachpuff, papayawhip, +thistle, snow), many are self-explanatory and self-descriptive in +ordinary colour terms. "blue" is pure (rgb) blue, +"green" is pure (rgb) green, and so on. Furthermore, for +many X colors, there exist four variants, each representing +increasingly darker shades of the same colour. For example, +"blue" (and "blue1") are the brightest forms of +(rgb) blue; "blue2", "blue3" and "blue4" +are increasingly darker shades of the same blue. For that reason, +you may find XCOLOR is a better choice than +NEWCOLOR when it comes to initializing common +colors. +

+The whimsical nature of X colour names sometimes makes for names +that are long to type in, e.g. "mediumspringgreen". +The optional second argument to XCOLOR allows you +to come up with more convenient name by which to reference the +colour. For example, you could enter +

+

+	.XCOLOR mediumspringgreen mygreen
+	    or
+	.XCOLOR mediumspringgreen MYGREEN
+
+ +so that whenever you want text mediumspringgreen-ed, you can use +either .COLOR mygreen (or .COLOR MYGREEN) or +the inline escape \*[mygreen] (or +\*[MYGREEN].) +

+

Finding X color names

+
+There are two ways of finding the names of the pre-defined X +colours. One is to consult the file, rgb.txt, included with +all X11 installations. The location of the file on a Debian +GNU/Linux distribution is typically /etc/X11/rgb.txt. Other +distributions and other X installations may have the file in +another location. The file lists the colour names, but doesn't +show you what the colours actually look like. +

+A better way to get the colour names, as well as to see what the +colours look like, is to fire up a colour chooser (like xcolorsel) +that both lists the colour names and shows a swatch of the colour +as well. +

+Whichever method you use to find X color names, remember that the +names, passed as arguments to XCOLOR, must +be all one word, all in lower case. +
+ + + +


+

Invoking a color

+
+Macro: COLOR <colorname> +
+
Inline: \*[<colorname>] +

+ +Once you've told mom about a colour (via +NEWCOLOR or XCOLOR), you use either +the macro, COLOR, or the +inline escape, +\*[<colorname>], to cause mom to +set subsequent text in that colour. See the +example, +above, which shows both in action. +

+NOTE: You can use the +\*[<colorname>] inline escape in any +document processing +macro that takes a +string argument. +However, you must remember to reset the colour at the end of the +argument (typically with \*[black]) unless you want all +subsequent invocations of that particular macro to be colourized. +

+Furthermore, if you use \*[<colorname>] in the +string argument passed to +.HEAD, +.SUBHEAD +or +.PARAHEAD, +and you've requested that any of these types of heads be numbered, +the numbers themselves will not be coloured, only the text you +passed the macro. If you wish the numbers to be colourized as +well, you must explicitly tell mom that you wish +all of the head(s), subhead(s) or parahead(s), including the +numbers, colourized by invoking the appropriate +control macro. + +
+ +


+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/groff/contrib/mom/momdoc/cover.html b/contrib/groff/contrib/mom/momdoc/cover.html index 11b6a8545821..2566547cb511 100644 --- a/contrib/groff/contrib/mom/momdoc/cover.html +++ b/contrib/groff/contrib/mom/momdoc/cover.html @@ -1,3 +1,4 @@ + @@ -7,41 +8,503 @@ -Next   +Next   Prev   Back to Table of Contents +

- - -

CREATING A COVER PAGE

+ +

CREATING A COVER PAGE

+ + +

Introduction to cover pages

-At present, mom provides no mechanism for -automatically generating cover pages. It's a situation not likely -to change, given that what's needed on document covers changes from -document to document, both in terms of style and content. And, -more often than not, what goes on covers is matter of personal taste. +As of version 1.19 of mom, you can now have cover +pages generated automatically.

-If you want a document to begin with a cover page, typeset the cover -(using the -typesetting macros). -At the end, invoke -NEWPAGE, -then set up your document in full (see -Tutorial -- Setting up a mom document), -invoking -START -as usual once you're done. The cover page (and any typesetting -commands on it) will have no effect on mom's -processing of the document itself, the first page of which, moreover, -will be numbered "1" unless you instruct her otherwise +Though identical in treatment, mom provides two +kinds of cover pages: section cover pages (which I shall refer to +simply as "cover pages") and document cover pages +("doc covers"). +

+A document cover page +(doc cover) +is what you'd most likely use at the start of a collated document, where +you might want the name of the complete document, the author(s) and +the copyright line to appear. Another place you might use a doc +cover is for a novel, where you want the title of the novel, not +the chapter title or chapter number, as the first cover page. +

+A section +cover +page is what you'd use for cover pages that separate sections of a +collated document. A section cover page (but not a doc cover page) +in a collated document could, for example, simply read "PART +I". +

+In non-collated documents (say, an essay) you can use either a +section cover or a doc cover to generate a cover sheet. +

+In addition, nothing prevents you from generating both a doc cover +page and a section cover page for every document in a collated +document. Or you can selectively disable the automatic generation +of either doc covers or section covers in a collated document, +on-the-fly. +

+Important note: +automatic generation of cover or doc cover pages after the first +one(s) only takes place if you are working with collated documents. +Mom provides no mechanism for saying "print +a section cover here even though I'm still working on the same +(non-collated) document." + +

Description of what mom does on cover pages

+ +By default, mom typesets cover (and doc cover) +pages identically to +docheaders +(see +How to change the look of docheaders +for a description of what a docheader looks like). The only +differences are +
+
    +
  • the position on the page where the information is output +
  • the (optional) addition of copyright and miscellaneous + information +
  • there's no running text underneath +
+ +

+You tell mom what you want to appear on the cover +pages through the arguments you pass to +COVER +and/or +DOC_COVER. +Provided you have already given mom the +appropriate references macro (e.g. +TITLE +or +AUTHOR), +she will output cover (and doc cover) pages identically to how she +would output docheaders containing the same information. +

+By default, mom starts cover (and doc cover) pages +one-third of the way down the page. This can be changed through +the use of the control macros +COVER_ADVANCE/DOC_COVER_ADVANCE. +

+If you request copyright information (and have already given +mom the reference macro, +COPYRIGHT), +she sets it, by default, in a smaller +point size +in the bottom right hand corner of the cover (or doc cover) page. +The default point size and the position can be controlled with +COVER_COPYRIGHT_SIZE/DOC_COVER_COPYRIGHT_SIZE +and +COVER_COPYRIGHT_QUAD/DOC_COVER_COPYRIGHT_QUAD. +

+Similarly, if you request miscellaneous information (and have already given +mom the reference macro, +MISC), +she sets it, by default, in a smaller point size in the bottom left +hand corner of the cover (or doc cover) page. The default point +size is dependent on +COVER_COPYRIGHT_SIZE/DOC_COVER_COPYRIGHT_SIZE, +but the position can be controlled with +COVER_MISC_QUAD/DOC_COVER_MISC_QUAD. + + +

+NOTE: mom does not set any +headers +or +footers +on cover pages. Neither does she set any page numbers. From the +point of pagination, cover (and doc cover) pages are considered +"null" pages; if you wish them to be included in the +pagination scheme (even though no page numbers appear), you must +set the page number of each first page following a +COLLATE +manually with PAGENUMBER. + +

+Finally, if you want to design your own cover page(s), you can +always typeset them (using the +typesetting macros), +invoke +NEWPAGE, +set up your document in full (see +Tutorial -- Setting up a mom document), +and lastly invoke +START. +The cover page (and any typesetting commands on it) will have no +effect on mom's processing of the document itself, +the first page of which, moreover, will be numbered "1" +unless you instruct her otherwise with +PAGENUMBER. +

+ + + +


+

+ + Macro: COVER +
+ Macro: DOC_COVER +
+ Required argument: TITLE | DOCTITLE | COVERTITLE | CHAPTER | CHAPTER_TITLE | CHAPTER+TITLE +
+ Optional arguments: [ SUBTITLE AUTHOR DOCTYPE COPYRIGHT MISC ] +

+ *Note: these macros should be placed in the + "style-sheet" section of your document setup (see the + Tutorial -- Setting up a mom document), + i.e. after PRINTSTYLE (and/or DOCTYPE and/or COPYSTYLE), but + before START. + + +

+COVER and DOC_COVER behave +identically. The reason mom provides two macros +for automatic cover page generation is so that you can have two +different kinds of covers with different information on each. +

+Imagine, for a moment, you've written a document comprised of three +sections. When you +COLLATE +the document for output, you could use DOC_COVER +to generate a cover page that contained the name of the entire +document, your (the author's) name, and perhaps the copyright date. +Subsequently, you could use COVER, after each +COLLATE but before each +START, +to generate a cover page (or cover "sheet", if you prefer) +containing just the name of the section. +
+ +

The required argument

+ +Both COVER and DOC_COVER, whenever +invoked, require a first argument, as listed above. This first argument +will become the first bit of information mom +prints on the cover (or doc cover) page (i.e. it will be the +"title"). +

+In order for the information to appear, you must, of course, first +have given mom the appropriate +reference macro. +A list of arguments with their equivalent reference macros follows. +
+ +

+
TITLE +
-means the argument you gave to +TITLE +
DOCTITLE +
-means the argument you gave to +DOCTITLE +
COVERTITLE +
-means the argument you gave to +COVERTITLE +or +DOC_COVERTITLE +
CHAPTER, CHAPTER_TITLE, CHAPTER+TITLE +
-see below (How the CHAPTER argument and friends work) +
+
+ +

How the CHAPTER argument and friends work

+ +CHAPTER, by itself, will print the CHAPTER_STRING as well +as the chapter number that you gave to +CHAPTER. +For example, assuming a vanilla setup for your chapter +

+

+	\# Reference macros
+	.CHAPTER 1
+	.CHAPTER_TITLE "The Bonny Blue Yonder"
+	<other stuff>
+	.COVER CHAPTER \" (or .DOC_COVER CHAPTER)
+	.START
+
+ +will simply print +

+

+	Chapter 1
+
+ +CHAPTER_TITLE will print the chapter title you +gave to +CHAPTER_TITLE. +For example, assuming a vanilla setup for your chapter +

+

+	\# Reference macros
+	.CHAPTER 1
+	.CHAPTER_TITLE "The Bonny Blue Yonder"
+	<other stuff>
+	.COVER CHAPTER_TITLE \" (or .DOC_COVER CHAPTER_TITLE)
+	.START
+
+ +will simply print +

+

+	The Bonny Blue Yonder
+
+ +

+CHAPTER+TITLE will print both the +chapter string + number AND the chapter title. For example, +assuming a vanilla setup for your chapter +

+

+	\# Reference macros
+	.CHAPTER 1
+	.CHAPTER_TITLE "The Bonny Blue Yonder"
+	<other stuff>
+	.COVER CHAPTER+TITLE \" (or .DOC_COVER CHAPTER+TITLE)
+	.START
+
+ +will print +

+

+	      Chapter 1
+	The Bonny Blue Yonder
+
+ +

The optional arguments

+ +The remainder of the arguments to COVER and +DOC_COVER are optional. They refer specifically +to the information you gave the +reference macros +bearing the same name as the arguments. +

+You may enter as many or as few as you would like to see on your +cover (or doc cover) page. The only hitch is--PAY ATTENTION, +CLASS!--they must be entered in the order given above. For +example, if you want TITLE, AUTHOR, +COPYRIGHT and MISC +

+

+	.COVER TITLE AUTHOR COPYRIGHT MISC
+
+ +is correct, while +

+

+	.COVER TITLE AUTHOR MISC COPYRIGHT
+
+ +is not. +
+ +

What the DOCTYPE argument means

+ +When you pass COVER or DOC_COVER +the argument, DOCTYPE, it refers to the argument you +gave to +DOCTYPE NAMED. +For example, if, in your +docstyle macros +you gave a +

+

+	.DOCTYPE NAMED "Abstract"
+
+ +the argument, DOCTYPE, in the COVER or +DOC_COVER macros, would mean that you wanted the +word, Abstract, to appear on the cover (or doc cover), just as it +would in the +docheader. +
+ + + +
+

+ + Macro: COVERS <toggle> +
+ Macro: DOC_COVERS <toggle> + +

+By default, if you give mom a +COVER +or +DOC_COVER +macro, she will print it. In a document that contains sections, +articles or chapters formerly treated as "one-off's" but +now being +collated, +such behaviour may not be desirable. +

+Mom lets you selectively enable or disable the +generation of covers and/or doc covers with the toggle macros +COVERS and DOC_COVERS. Because +they're toggle macros, simply invoking them by themselves enables +automatic cover (or doc cover) generation, while invoking them +with any argument at all (OFF, QUIT, X, etc) +disables cover (or doc cover) generation. +

+NOTE: You must place these macros prior to any +instance of +START. Since they're +"on" by default, there's no need to use them if you want +covers. However, if you don't, especially in the kind of scenario +described above, the best place to put them (most likely with an +OFF, NO, X, etc. argument), is immediately after the +first invocation of START. By doing so, you ensure +they precede all subsequent instances of START. +

+ +


+

+

Control macros--changing the defaults for covers and document covers

+The default typographic appearance of the items on a cover (or doc +cover) page is identical to that of the items in a +docheader. +(See +How to change the look of docheaders +for a description of the defaults.) +

+COPYRIGHT +and +MISC, +which do not appear in docheaders, have the following default +characteristics: +
+

    +
  1. The copyright line is set in the bottom right hand corner + of the page, 2 + point sizes + smaller than the size of + running text +
  2. The "misc" line is set in the bottom left hand + corner of the page, in the same family, font and point size + as the copyright line. +
+

+With the exception of the copyright and "misc" lines, the +defaults for the entirety of cover (and doc cover) pages, and all +the elements thereon, can be changed with control macros whose +behaviour and arguments are identical to +the control macros used for docheaders. +The only difference is the name by which you invoke the control +macro(s). +

+The complete list of cover (and doc cover) page control macros +follows; please refer to the +docheader control macros index +in order to understand how to use them. +

+

Index of cover and doc cover control macros

+
+.COVER_ADVANCE  .DOC_COVER_ADVANCE -+
+.COVER_FAMILY   .DOC_COVER_FAMILY   | like DOCHEADER_
+.COVER_LEAD     .DOC_COVER_LEAD    -+
+
+.COVER_TITLE_FAMILY  .DOC_COVER_TITLE_FAMILY -+
+.COVER_TITLE_FONT    .DOC_COVER_TITLE_FONT    | like
+.COVER_TITLE_COLOR   .DOC_COVER_TITLE_COLOR   | TITLE_
+.COVER_TITLE_SIZE    .DOC_COVER_TITLE_SIZE   -+
+
+.COVER_CHAPTER_TITLE_FAMILY  .DOC_COVER_CHAPTER_TITLE_FAMILY -+
+.COVER_CHAPTER_TITLE_FONT    .DOC_COVER_CHAPTER_TITLE_FONT    | like
+.COVER_CHAPTER_TITLE_COLOR   .DOC_COVER_CHAPTER_TITLE_COLOR   | CHAPTER_TITLE_
+.COVER_CHAPTER_TITLE_SIZE    .DOC_COVER_CHAPTER_TITLE_SIZE   -+
+
+.COVER_SUBTITLE_FAMILY  .DOC_COVER_SUBTITLE_FAMILY -+
+.COVER_SUBTITLE_FONT    .DOC_COVER_SUBTITLE_FONT    | like
+.COVER_SUBTITLE_COLOR   .DOC_COVER_SUBTITLE_COLOR   | SUBTITLE_
+.COVER_SUBTITLE_SIZE    .DOC_COVER_AUTHOR_SIZE     -+
+
+.COVER_ATTRIBUTE_COLOR  .DOC_COVER_ATTRIBUTE_COLOR - like ATTRIBUTE_COLOR
+ - the macro, .ATTRIBUTE_STRING, controls the attribution string
+   for both docheaders and cover pages; cover pages have no
+   separate ATTRIBUTE_STRING macro
+
+.COVER_AUTHOR_FAMILY  .DOC_COVER_AUTHOR_FAMILY -+
+.COVER_AUTHOR_FONT    .DOC_COVER_AUTHOR_FONT    | like
+.COVER_AUTHOR_COLOR   .DOC_COVER_AUTHOR_COLOR   | AUTHOR_
+.COVER_AUTHOR_SIZE    .DOC_COVER_AUTHOR_SIZE   -+
+
+.COVER_DOCTYPE_FAMILY  .DOC_COVER_DOCTYPE_FAMILY -+
+.COVER_DOCTYPE_FONT    .DOC_COVER_DOCTYPE_FONT    | like
+.COVER_DOCTYPE_COLOR   .DOC_COVER_DOCTYPE_COLOR   | DOCTYPE_
+.COVER_DOCTYPE_SIZE    .DOC_COVER_DOCTYPE_SIZE   -+
+
+.COVER_COPYRIGHT_FAMILY  .DOC_COVER_COPYRIGHT_FAMILY -+
+.COVER_COPYRIGHT_FONT    .DOC_COVER_COPYRIGHT_FONT    | like any
+.COVER_COPYRIGHT_COLOR   .DOC_COVER_COPYRIGHT_COLOR   | of the above
+.COVER_COPYRIGHT_SIZE    .DOC_COVER_COPYRIGHT_SIZE   -+
+.COVER_COPYRIGHT_QUAD    .DOC_COVER_COPYRIGHT_QUAD
+ - the copyright quad can be either L (left) or R (right); default is left
+
+.COVER_MISC_COLOR  .DOC_COVER_MISC_COLOR - like any of the above _COLOR
+.COVER_MISC_QUAD   .DOC_COVER_MISC_QUAD
+ - the misc quad can be either L (left) or R (right); default is right
+
+ +Note: COVER_MISC and +DOC_COVER_MISC have only two control macros, +_COLOR and _QUAD. The +family, font and size of the MISC argument to +COVER or DOC_COVER are always the +same as for COPYRIGHT. Should you wish the family, font +or size to be different from COPYRIGHT, I suggest setting +the type specs for COPYRIGHT to the ones you want for +MISC, then altering them for COPYRIGHT using +inline escapes +in the +string argument +you pass to the macro, +COPYRIGHT. (Of course, +you could always do the reverse, but if you pass several arguments +to +MISC, +it's more likely you want to get MISC right first.) +


-Next   +Next   Prev   Top   Back to Table of Contents diff --git a/contrib/groff/contrib/mom/momdoc/definitions.html b/contrib/groff/contrib/mom/momdoc/definitions.html index be393156ecab..80542afa0395 100644 --- a/contrib/groff/contrib/mom/momdoc/definitions.html +++ b/contrib/groff/contrib/mom/momdoc/definitions.html @@ -1,3 +1,4 @@ + @@ -10,7 +11,7 @@ Next   Prev   Back to Table of Contents - +

DEFINITIONS OF TERMS USED IN THIS MANUAL

@@ -26,9 +27,8 @@ I use a number of typesetting-specific and groff-specific terms throughout this documentation, as well as a few terms that apply to mom herself. To make life easier, I'll explain them here. Refer back to this section should you encounter a word -or concept you're not familiar with. Words in these definitions that -are defined elsewhere in this section are marked with asterisks. -
+or concept you're not familiar with. +


@@ -61,14 +61,16 @@ are defined elsewhere in this section are marked with asterisks.
  • Point Size
  • Quad
  • Rag +
  • Shape
  • Solid/set solid
  • Track kerning/Line kerning
  • Unbreakable space +
  • Weight
  • Word space
  • x-height -
    +
    Ascender
    The portion of a letter that extends above the bowl. For example, the letters a, c, and e have no ascenders. The letters b, d, and h @@ -79,8 +81,9 @@ do. bowls of lower case letters rest.
    Ballot box -
    An unfilled square, usually *cap-height in size, -typically placed beside items in a checklist. +
    An unfilled square, usually +cap-height +in size, typically placed beside items in a checklist.
    Bullet
    A small, filled circle typically found beside items or points in @@ -88,12 +91,14 @@ a list.
    Cap-height
    The height of the tallest capital letter in a given -*font at the current *point -size. +font +at the current +point size.
    Descender
    The portion of a letter that extends beneath the -*baseline (j, q, y are letters with descenders). +baseline +(j, q, y are letters with descenders).
    Discretionary hyphen
    A symbol inserted between two syllables of a word that indicates to a @@ -121,25 +126,30 @@ letter until the bottom of the drop cap is reached, at which point text reverts to the left margin.
    Em/en -
    A relative measurement equal to the width of the letter M at a -given *point size in a given *font. +
    An em is a relative measurement equal to the width of the +letter M at a given +point size +in a given +font. Since most Ms are designed square, an em is usually (but sometimes -erroneously) considered to be the same size as the current point size -(i.e. if the point size of the type is 12, one em equals 12 points). -An en is equal to the width of a letter N (historically 2/3 of an em, -although groff treats an en as 1/2 of an em). Typically, ems and -ens are used to measure indents, or to define the length of dashes -(long hyphens). +erroneously) considered to be the same size as the current point +size (i.e. if the point size of the type is 12, one em equals 12 +points). An en is equal to the width of a letter N (historically +2/3 of an em, although groff treats an en as 1/2 of an em). +Typically, ems and ens are used to measure indents, or to define the +length of dashes (long hyphens).
    Family
    The collective name by which a collection of -*fonts are known, e.g. Helvetica, Times Roman, -Garamond. +fonts +are known, e.g. Helvetica, Times Roman, Garamond.
    Figure space/Digit space -
    A *fixed width space that has the width of one digit. Used for -aligning numerals in, say, columns or numbered lists. In groff, -the figure space is entered with +
    A +fixed width space +that has the width of one digit. Used for aligning numerals in, +say, columns or numbered lists. In groff, the figure space is +entered with

     	\0
    @@ -148,9 +158,11 @@ the figure space is entered with
     (backslash followed by a zero).
     
     
    Fixed width space -
    Equal to *word space, but does not expand or -contract when text is *justified. In groff, fixed -width space is entered with +
    Equal to +word space, +but does not expand or contract when text is +justified. +In groff, fixed width space is entered with

     	\<space>
    @@ -159,17 +171,25 @@ width space is entered with
     where <space> means "hit the spacebar on your keyboard."
     
     
    Font -
    The specific style of type within a *family, -e.g. roman, italic. Groff understands four fonts within any given -family: roman, italic, bold, and bold italic. +
    The specific +weight +and +shape +of type within a +family, +e.g. light, medium, bold (which are weights), and roman, italic, +condensed (which are shapes). By default, groff knows of four fonts +within its default set of families: R (medium roman), I (medium +italic), B (bold roman) and BI (bold italic).
    Force justify -
    Sometimes, in *justified text, a line needs to be -broken short of the right margin. Force justifying means telling a -typesetting program (like groff) that you want the line broken early -AND that you want the line's word spacing stretched to force the line -flush with the right margin. +
    Sometimes, in +justified +text, a line needs to be broken short of the right margin. Force +justifying means telling a typesetting program (like groff) that you +want the line broken early AND that you want the line's word spacing +stretched to force the line flush with the right margin.
    Gutter
    The vertical whitespace separating columns of type. @@ -179,7 +199,8 @@ flush with the right margin. right margins. Justification is the act of making both margins flush. Some people use the terms "left justified" and "right justified" to mean type where only the left (or right) margins align. I don't. -See *quad. +See +quad.
    Kerning
    Moving pairs of letters closer together to remove excess @@ -187,7 +208,7 @@ whitespace between them. In the days before phototypesetting, type was set from small, rectangular blocks of wood or metal, each block having exactly one letter. Because the edge of each block determined the edge of each letter, certain letter combinations (TA, -for example) didn't fit together well and had to be morticed by hand +for example) didn't fit together well and had to be mortised by hand to bring them visually closer. Modern typesetting systems usually take care of kerning automatically, but they're far from perfect. Professional typesetters still devote a lot of time to fitting letters @@ -195,31 +216,37 @@ and punctuation together properly.
    Kern Units
    A relative distance equal to 1/36 of the current -*point size. Used between individual letters -for *kerning. Different typesetting systems use -different values (1/54 is popular), and sometimes call kern units by -a different name. +point size. +Used between individual letters +for +kerning. +Different typesetting systems use different values (1/54 is +popular), and sometimes call kern units by a different name.

    Experts:
    A kern unit has nothing to do with groff machine units.

    Lead/leading -
    The distance from the *baseline of one line of -type to the line of type immediately beneath it. Pronounced "ledding." -Also called line spacing. Usually measured in *points. +
    The distance from the +baseline +of one line of type to the line of type immediately beneath it. +Pronounced "ledding." Also called line spacing. Usually measured +in +points.

    In case you're interested... In previous centuries, -lines of type were separated by thin strips of -- you guessed it --- lead. Lines of type that had no lead between them were said to +lines of type were separated by thin strips of--you guessed +it--lead. Lines of type that had no lead between them were said to be "set solid." Once you began separating them with strips of lead, they were said to be "leaded", and the spacing was -expressed in terms of the number of *points of lead. -For this reason, "leading" and "line spacing" -aren't, historically speaking, synonymous. If type was set 10 on 12, -for example, the leading was 2 points, not 12. Nowadays, however, -the two terms are used interchangeably to mean the distance from -baseline to baseline. +expressed in terms of the number of +points +of lead. For this reason, "leading" and "line +spacing" aren't, historically speaking, synonymous. If type +was set 10 on 12, for example, the leading was 2 points, not 12. +Nowadays, however, the two terms are used interchangeably to mean +the distance from baseline to baseline.

    Leaders
    Single characters used to fill lines, usually to their end. @@ -247,29 +274,60 @@ have always used their own system of measurement for weight (carats), typographers have always used their own system of measurement for type.
    Point Size -
    The nominal size of type, measured in *points, -from the bottom of the longest *descender to the top -of the highest *ascender. In reality, type is always -fractionally smaller than its point size. +
    The nominal size of type, measured in +points +from the bottom of the longest +descender +to the top of the highest +ascender. +In reality, type is always fractionally smaller than its point size.
    Quad
    When only one margin of type is flush, lines of type are quadded in the direction of the flush margin. Therefore, quad left means the left margin is flush, the right isn't. Quad right means the right -margin is flush, the left isn't. Quad center means neither the left +margin is flush, the left isn't. Quad centre means neither the left nor the right margin is flush; rather, lines of type are quadded on -both sides so that type appears centered on the page. +both sides so that type appears centred on the page.
    Rag
    Describes a margin that isn't flush. Rag right means the right margin isn't flush. Rag left means the left margin isn't flush. The expression "flush left/rag right" is sometimes used to describe -type that is *quadded left. +type that is +quadded +left. + +
    Shape +
    The degree of slant and/or the width of characters. +(Technically speaking, this is not a proper typesetting term; +however, it may help clarify some concepts presented in these +documents.) +

    +Some typical shapes are: +

      +
    • "Roman", which has no slant, and has letterforms of + average width +
    • "Italic", which is slanted, and has letterforms + of average width +
    • "Condensed", which has no slant, but has + letterforms narrower than the average represented by Roman +
    • "Condensed Italic", which is slanted, with letterforms narrower + than average +
    +The term +font, +as it is used in these documents, refers to a combination of +weight +and shape.
    Solid/set solid -
    When no *lead is added between lines of type -(i.e. the *point size and linespacing are the -same), the lines are said to be "set solid." +
    When no +lead +is added between lines of type (i.e. the +point size +and linespacing are the same), the lines are said to be "set +solid."
    Track kerning/Line kerning
    Sometimes, it's advantageous to increase or decrease the amount of @@ -279,10 +337,13 @@ The correct term is letter spacing, but track kerning and line kerning (and sometimes, just "kerning") have come to mean the same thing.
    Unbreakable space -
    Equal to *word space, however words separated by -an unbreakable space will always be kept together on the same line. -Expands and contracts like word space. Useful for proper names, which -should never be broken. In groff, unbreakable space is entered with +
    Equal to +word space, +however words separated by an unbreakable space will always be kept +together on the same line. Expands and contracts like word space. +Useful for proper names, which one should, whenever possible, avoid +splitting onto two lines. In groff, unbreakable space is entered +with

     	\~
    @@ -290,16 +351,26 @@ should never be broken.  In groff, unbreakable space is entered with
     
     (backslash followed by a tilde).
     
    +
    Weight +
    The thickness of the strokes of letterforms. Medium and Book +have average thicknesses and are the weights used for most of the +text in books, magazines, newspapers, etc. Light has strokes +slightly thinner than Medium or Book, but is still acceptable for +most text. Semibold, Bold, Heavy and Black all have strokes of +increasing thickness, making them suitable for heads, subheads, +headlines and the like. +
    Word space
    The amount of whitespace between words. When text is -*justified, word space expands or contracts to make -the margins flush. +justified, +word space expands or contracts to make the margins flush.
    x-height
    The height of a lower case letter x in a given font at a given point size. Generally used to mean the average height of the bowl of lower case letters.
    +


    @@ -326,20 +397,23 @@ of lower case letters.
    Alias -
    A *macro invoked by a name different from its -"official" name. For example, the official name of the -macro to change *family is FAMILY. -Its alias is FAM. Aliases may be created for any -macro (via the +
    A +macro +invoked by a name different from its "official" +name. For example, the official name of the macro to change +family +is FAMILY. Its alias is +FAM. Aliases may be created for any macro (via the ALIAS macro) provided the alias uses a name not already taken by the mom macros or one of the groff -*primitives. For a complete list of alias names -you must not use, see the +primitives. +For a complete list of words or names you must not use, see the list of reserved words.
    Arguments -
    Parameters or information needed by a *macro +
    Parameters or information needed by a +macro to do its job. For example, in the macro

    @@ -356,32 +430,42 @@ LEFT is the argument.  Arguments are separated from macros by spaces.
     Some macros require several arguments; each is separated by a space.
     
     
    Comment Lines -
    *Input lines introduced with the comment character +
    Input lines +introduced with the comment character

     	\#
     
    -When processing output, groff silently ignores everything on the -line after the comment character. +When processing output, groff silently ignores everything on a +line that begins with the comment character.
    Control Lines
    Instructions to groff that appear on a line by themselves, which means that "control lines" are either -*macros or *groff primitives. +macros +or groff +primitives. Control lines begin with a period or, occasionally, an apostrophe.
    Filled lines/fill mode -
    Automatic *justification or -*quadding. In fill mode, the ends of lines as they -appear in your text editor are ignored. Instead, words from adjoining -*input lines are added one at a time to the output -line until no more words fit. Then, depending whether text is to -be *justified or *quadded (left, -right, or center), and depending on whether automatic hyphenation -is turned on, groff attempts to hyphenate the last word, or, barring -that, spreads and breaks the line (when justification is turned on) or -breaks and quads the line (when quadding is turned on). +
    Automatic +justification +or +quadding. +In fill mode, the ends of lines as they appear in your text editor +are ignored. Instead, words from adjoining +input lines +are added one at a time to the output line until no more words fit. +Then, depending whether text is to be +justified +or +quadded +(left, right, or centre), and depending on whether automatic +hyphenation is turned on, groff attempts to hyphenate the last word, +or, barring that, spreads and breaks the line (when justification +is turned on) or breaks and quads the line (when quadding is turned +on).

    Nofill mode (non-filled text) means that groff respects the ends @@ -389,25 +473,30 @@ of lines as they appear in your text editor.

    Inline escapes
    Instructions issued to groff that appear as part of an -*input line (as opposed to *macros, -which must appear on a line by themselves). Inline escapes are always -introduced by the backslash character. For example, +input line +(as opposed to +macros, +which must appear on a line by themselves). Inline escapes are +always introduced by the backslash character. For example,

     	A line of text with the word T\*[BU 2]oronto in it
     
    contains the inline escape \*[BU 2] (which means "move the letter -'o' 2 *kern units closer to the letter 'T'"). +'o' 2 +kern units +closer to the letter 'T'").

    Mom's inline escapes always take the form \*[ESCAPE], where ESCAPE is composed of capital letters, sometimes followed immediately -by a digit, sometimes followed by a space and a *numeric -argument. Groff's escapes begin with the -backslash character but typically have no star and are in lower case. -For example, the mom escapes to move forward 6 points -on a line are either +by a digit, sometimes followed by a space and a +numeric argument. +Groff's escapes begin with the backslash character +but typically have no star and are in lower case. For example, the +mom escapes to move forward 6 points on a line are +either

     	\*[FP6]  or  \*[FWD 6p]
    @@ -426,20 +515,26 @@ while the groff escape for the same thing is
     
    Instructions embedded in a document that determine how groff processes the text for output. mom's macros always begin with a period, on a line by themselves, and must be typed in capital letters. -Typically, macros contain complex commands issued to groff -- behind -the scenes -- via groff *primitives. +Typically, macros contain complex commands issued to groff--behind +the scenes--via groff +primitives.
    Machine units -
    A machine unit is 1/1000 of a *point when the -groff device is ps. ("ps" means "PostScript" -- -the default device for which groff prepares output, and the device for -which mom was specifically designed.) +
    A machine unit is 1/1000 of a +point +when the groff device is ps. ("ps" means +"PostScript"--the default device for which groff +prepares output, and the device for which mom was +specifically designed.)
    Numeric argument -
    An *argument that has the form of a digit. -Numeric arguments can be built out of arithmetic expressions using -+, -, *, and / for plus, minus, times, and divided-by respectively. -If a numeric argument requires a *unit of measure, +
    An +argument +that has the form of a digit. Numeric arguments can be built out +of arithmetic expressions using +, -, *, and / for plus, minus, +times, and divided-by respectively. If a numeric argument requires +a +unit of measure, a unit of measure must be appended to every digit in the argument. For example:

    @@ -461,9 +556,12 @@ or minus sign when using mom's macros is slim. native command language, and out of which macros are built.

    String Argument -
    Technically, any *argument that is not numeric. -In this documentation, string argument means an argument that requires -the user to input text. For example, in the *macro +
    Technically, any +argument +that is not numeric. In this documentation, string argument means +an argument that requires the user to input text. For example, in +the +macro

     	.TITLE "My Pulitzer Novel"
    @@ -473,21 +571,22 @@ the user to input text.  For example, in the *macro
     

    Because string arguments must be enclosed by double-quotes, you can't use double-quotes as part of the string argument. If you need -double-quotes to be part of a string argument, use the *inline -escapes \(lq and \(rq -(leftquote and rightquote respectively) in place of the double-quote -character ("). +double-quotes to be part of a string argument, use the +inline escapes +\(lq and \(rq (leftquote and rightquote +respectively) in place of the double-quote character (").

    Unit of measure -
    The single letter after a *numeric argument +
    The single letter after a +numeric argument that tells mom what measurement scale the argument -should use. Commonly valid units are: +should use. Common valid units are:

  • @@ -510,7 +609,8 @@ that set the size or measure of something MUST be given a unit of measure. mom's macros do not have default units of measure. There are a couple of exceptions, the most notable of which are PT_SIZE and LS. Both use -*points as the default unit of measure, which means +points +as the default unit of measure, which means you don't have to append "p" to their argument.

    You can enter decimal values for any unit of measure. Different units @@ -523,10 +623,15 @@ and 5 points. If you want 12 picas and 5 points, you have to enter the measure as 12P+5p.

    Zero-width character -
    The *inline escape that allows you to print a -literal period, apostrophe and, if *output lines -are *filled, a space that falls at the beginning of -an *input line. It looks like this: +
    The +inline escape +that allows you to print a literal period, apostrophe and, if +output lines +are +filled, +a space that falls at the beginning of an +input line. +It looks like this:

     	\&
    @@ -535,15 +640,17 @@ an *input line.  It looks like this:
     (backslash followed by an ampersand).
     

    Normally, groff interprets a period (or an apostrophe) at the beginning -of an input line as meaning that what follows is a *control -line. In fill modes, groff treats a space at the beginning -of an input line as meaning "start a new line and put a space -at the beginning of it." If you want groff to interpret periods -and apostrophes at the beginning of input lines literally (ie. print +of an input line as meaning that what follows is a +control line. +In fill modes, groff treats a space at the beginning of an input +line as meaning "start a new line and put a space at the +beginning of it." If you want groff to interpret periods and +apostrophes at the beginning of input lines literally (i.e. print them), or spaces at the beginning of input lines as just garden variety word spaces, you must start the line with the zero-width character. +


    @@ -567,16 +674,19 @@ character.
    Blockquote -
    Cited material other than *quotes. +
    Cited material other than +quotes. Typically set at a smaller point size than paragraph text, indented from the left and right margins. Blockquotes are -*filled. +filled.
    Control macro
    Macros used in document processing to control/alter the appearance of document elements (e.g. heads, -quotes, footnotes, *headers, etc.). +quotes, footnotes, +headers, +etc.).
    Document header/docheader
    Document information (title, subtitle, author, etc) output @@ -590,7 +700,7 @@ beginning of a chapter, story, or other document.
    Document information (frequently author and title) output in the bottom margin of pages after page one. Not to be confused with footnotes, which are considered part of -*running text. +running text.
    Head
    A title that introduces a major section of a document. @@ -600,20 +710,23 @@ confused with footnotes, which are considered part of the top margin of pages after page one.

    NOTE: In terms of content and style, headers and -*footers are the same; they differ only in their -placement on the page. In most places in this documentation, -references to the content or style of headers applies equally to -footers. +footers +are the same; they differ only in their placement on the page. In +most places in this documentation, references to the content or +style of headers applies equally to footers.

    Linebreak/author linebreak -
    A horizontal gap in *running text, frequently -set off by typographic symbols such as asterisks or daggers. Used to -indicate a shift in the content of a document (e.g. a scene change in a -short story). +
    A horizontal gap in +running text, +frequently set off by typographic symbols such as asterisks or +daggers. Used to indicate a shift in the content of a document +(e.g. a scene change in a short story). Also commonly called a +scene break or a section break.
    Paragraph head
    A title joined to the body of a paragraph; hierarchically one -level beneath *subheads. +level beneath +subheads.
    Quote
    A quote, to mom, is a line-for-line setting @@ -625,14 +738,16 @@ with quotes.
    Running text
    In a document formatted with mom, running text means text that forms the body of the document, including -elements such as heads and subheads. *Docheaders, -*headers, *footers and page numbers are NOT part of -running text. +elements such as heads and subheads. +Docheaders, +headers, +footers +and page numbers are NOT part of running text.
    Subhead
    A title used to introduce secondary sections of a document; hierarchically one level beneath sections introduced by -*heads. +heads.
    Toggle
    A macro or tag that, when invoked without an argument, diff --git a/contrib/groff/contrib/mom/momdoc/docelement.html b/contrib/groff/contrib/mom/momdoc/docelement.html index e1db2ab8b919..13a1e0eeeb10 100644 --- a/contrib/groff/contrib/mom/momdoc/docelement.html +++ b/contrib/groff/contrib/mom/momdoc/docelement.html @@ -1,3 +1,4 @@ + @@ -10,10 +11,10 @@ Next   Prev   Back to Table of Contents - +

    -

    THE DOCUMENT ELEMENT TAGS

    +

    THE DOCUMENT ELEMENT TAGS

      @@ -54,16 +55,17 @@ she does things. This is usually done prior to but can, in fact, be done at any time in the course of a document. Any change to a tag's style affects all subsequent invocations of the tag. +

      Control macros -- changing defaults

      The control macros for document processing tags let you "design" the look of all the parts of your documents -- -should you wish. At a bare minimum, all tags have macros to -change mom's defaults for family, font -and point size. Where appropriate, there are macros to control -leading, indents and quad as well. +should you wish. At a bare minimum, all tags have macros to change +mom's defaults for family, font, point size and +colour. Where appropriate, there are macros to control leading, +indents and quad as well.

      In addition, many tags have special macros to control features that are pertinent to those tags alone. Have a look at the section dealing @@ -88,8 +90,8 @@ Equally, can be used in tags that take string arguments.

      -IMPORTANT NOTE: The family, font, point size and -leading control macros have no effect in +IMPORTANT NOTE: The family, font, point size, +colour and leading control macros have no effect in PRINTSTYLE TYPEWRITE, which sets EVERYTHING in Courier roman, 12/24 (i.e. 12-point type on a linespace of 24 points). @@ -101,7 +103,7 @@ unless a default for TYPEWRITE is also given.

      A WORD OF ADVICE: Get familiar with mom at her default settings before exploring the -control macros. Put her through her paces. She how she behaves. +control macros. Put her through her paces. See how she behaves. Get to know what she feels like and how she looks, both in your text editor and on the printed page. Then, if you don't like something, use this documentation to find the precise macro you need to change it. @@ -109,6 +111,7 @@ There are tons of control macros. Reading up on them and trying to remember them all might lead you to think that mom is complex and unwieldy, which is not only untrue, but would offend her mightily. +

      Arguments to the control macros

      @@ -137,6 +140,22 @@ There's no need for a unit of measure with the _SIZE control macros; points is assumed. +

      Colour

      +Control macros that end in _COLOR take as their +argument a colour name pre-defined (or "initialized") +with +NEWCOLOR +or +XCOLOR. +For example, if you want your heads to be red, once you've defined +or initialized the color, red, +

      +

      +	.HEAD_COLOR red
      +
      + +will turn your heads red. +

      Lead/linespacing

      Control macros that end in _AUTOLEAD take the same argument as @@ -158,7 +177,7 @@ one point greater than the footnote's point size), do .FOOTNOTE_AUTOLEAD 1
    -

    Indents

    +

    Indents

    Except for PARA_INDENT, the argument to the control macros that end in _INDENT is always a single digit (whole numbers @@ -172,7 +191,8 @@ correct indent for a particular tag. Control macros that end in _QUAD take the same arguments as QUAD. - +

    +


    Document element tags list

    -
  • Linebreaks (author linebreaks) +
  • Linebreaks (author linebreaks, section breaks)
  • Quotes (line for line) +
  • Nested lists + +
  • Line numbering +
  • Footnotes +
  • Margin notes +
      +
    • MN_INIT -- initialize margin notes +
    • MN -- start and end a margin note +
    +
  • Bibliographies and references + +
  • Blank pages +
  • Table of contents +
  • Document termination +
    @@ -244,24 +301,24 @@ arguments as

    Epigraphs -color, flavour, or comment on the document they precede. Typically, -they are centered at the top of a document's first page (underneath the +colour, flavour, or comment on the document they precede. Typically, +they are centred at the top of a document's first page (underneath the title) and set in a smaller point size than that of paragraph text.

    -By default, mom sets epigraphs centered and +By default, mom sets epigraphs centred and unfilled; this lets you input them on a line for line basis. This behaviour can be changed to accomodate filled epigraph "blocks." -
    +


    - Macro: EPIGRAPH <toggle> | [ BLOCK ] + Macro: EPIGRAPH <toggle> | [ BLOCK ]

    @@ -298,6 +355,7 @@ want quotes or cited text, use QUOTE or BLOCKQUOTE. +

    Epigraph control macros

    @@ -308,6 +366,7 @@ See .EPIGRAPH_FAMILY default = prevailing document family; default is Times Roman .EPIGRAPH_FONT default = roman .EPIGRAPH_SIZE default = -1.5 (points) +.EPIGRAPH_COLOR default = black .EPIGRAPH_AUTOLEAD default = 2 points (The next two apply to "block" style epigraphs only) @@ -337,7 +396,7 @@ and indent appropriate to where you are in your document are taken care of automatically.

    By default, mom does not indent the first paragraph -of a document, nor paragraphs that fall imediately after +of a document, nor paragraphs that fall immediately after heads or subheads. @@ -361,7 +420,7 @@ will break these one-liners -- if they fall at the bottom of the page -- to a new page, which is not what you want.

    TIP: The last thing you want while you're writing -and editing drafts of a document (particulary stories and chapters) +and editing drafts of a document (particularly stories and chapters) is a text file cluttered up with PP's. The visual interruption in the flow of text is a serious obstacle to creativity and critiquing. @@ -385,7 +444,7 @@ that blank lines should be interpreted as PP's. .blm PP tells groff that all blank lines are really the macro PP. -
    +

    @@ -416,14 +475,16 @@ element tags.

    1. Family control
    2. Font control +
    3. Paragraph colour
    4. Leading/linespacing control
    5. Justification/quad control
    6. First-line indent control -
    7. Intitial paragraphs indent control +
    8. Initial paragraphs indent control
    9. Paragraph spacing control

    1. Family

    +

    The paragraph family is set with @@ -442,8 +503,10 @@ to differ from the prevailing document family.

    Mom's default paragraph (and document) family is Times Roman. +

    2. Font -- PP_FONT

    +

    To change the font used in regular text paragraphs, use .PP_FONT, @@ -460,8 +523,60 @@ remain at their default setting (medium roman) unless you change them with the appropriate control macros.

    Mom's default paragraph font is medium roman. +

    -

    3.Leading

    +

    3. Paragraph colour

    +

    +Mom has no special control macro for colourizing +paragraphs. If you wish a colourized paragraph, you must use the +macro, +COLOR, +or the +inline escape, +\*[<colorname>], +after .PP. The colour must be one +pre-defined (or "initialized") with +NEWCOLOR +or +XCOLOR. +

    +Please note that unless you change the colour back to it's default +(usually black) at the end of the paragraph, all subsequent +paragraphs will be set in the new colour, although most other +elements of your document will continue to be set in the default +colour (usually black). +

    +For example, assuming you have defined the colour, blue, +

    +

    +	.PP
    +	.COLOR blue
    +	<first paragraph>
    +	.HEAD "Monty Python"
    +	.SUBHEAD "The Origins of Spam"
    +	.PP
    +	<second paragraph>
    +
    + +the first paragraph will be blue, the head and subhead will be in +the document's default colour (usually black), and the second +paragraph will be in blue. +

    +The one document element that is affected by changing the colour +of paragraphs are +paraheads, +since they are attached directly to the body of paragraphs. In +other words, if you change the colour of a paragraph and do not +reset the paragraph colour back to its default, subsequent paraheads +will appear in the same colour as your paragraphs unless you have +explicitly told mom you want a pre-defined (or +"initialized") color (usually black) for your paraheads. +

    +See the footnote to +.PARAHEAD_COLOR. + +

    4. Leading

    +

    The paragraph leading is set with @@ -483,19 +598,25 @@ EVERY paragraph whose leading you wish to change. HYPER-IMPORTANT NOTE: It is extremely unwise to change paragraph leading with LS, as it will, in all cases, screw up mom's ability to balance the bottom margin -of pages. +of pages. Should you absolutely need to change paragraph leading +with LS, and subsequently want mom +to get back on the right leading track, use the +SHIM +macro.

    Mom's default paragraph leading (document leading) is 16 points, adjusted to fill the page. +

    -

    4. Justification/quad

    +

    5. Justification/quad

    +

    The justification/quad-direction of regular text paragraphs (i.e. justified, or filled and quadded -left/right/center) is set with +left/right/centre) is set with JUSTIFY or QUAD @@ -524,12 +645,17 @@ Only the paragraph in question gets justified or quadded differently; subsequent paragraphs remain unaffected.

    Mom's default justification/quad-direction for -paragraphs is justified for -PRINTSTYLE_TYPESET -and quad left for -PRINTSTYLE_TYPEWRITE. - -

    5. First-line indent -- PARA_INDENT

    +paragraphs is +
    + +

    +

    6. First-line indent -- PARA_INDENT

    +

    The first-line indent of paragraphs is controlled by PARA_INDENT, which takes one argument: the size of the indent. PARA_INDENT may be used before @@ -551,7 +677,7 @@ paragraphs, PARA_INDENT also affects quotes and blockquotes, -whose overal indenting from the left and (where applicable) right +whose overall indenting from the left and (where applicable) right margins is relative to PARA_INDENT. Furthermore, the first-line indent of paragraphs within these document elements (as well as footnotes) is also relative to PARA_INDENT (always @@ -562,8 +688,10 @@ ems for PRINTSTYLE_TYPESET and 3 picas (1/2 inch) for PRINTSTYLE_TYPEWRITE. +

    -

    6. Indenting initial paragraphs -- INDENT_FIRST_PARAS

    +

    7. Indenting initial paragraphs -- INDENT_FIRST_PARAS

    +

    By default, mom does not indent the first paragraph of a document, nor the first paragraph after a head or subhead, nor the first paragraphs of @@ -582,8 +710,10 @@ before or after passing it any argument (OFF, QUIT, Q, X...) cancels its effect, meaning that first paragraphs will once again NOT be indented. +

    -

    7. Spacing paragraphs -- PARA_SPACE

    +

    8. Spacing paragraphs -- PARA_SPACE

    +

    By default, mom does not insert a blank line between paragraphs. If you would like her to do so, invoke the macro .PARA_SPACE with no argument, either @@ -593,6 +723,27 @@ before or after it any argument (OFF, QUIT, Q, X...) cancels its effect, meaning that paragraphs will once again NOT be separated by a blank line. +

    +NOTE: If PARA_SPACE is on, +mom spaces only those paragraphs that come after +an "initial" paragraph. Initial paragraphs are those +that come immediately after the +docheader, +epigraphs, +heads, +subheads +and +linebreaks. +(The first paragraph after these document elements requires no +blank line to separate it from other paragraphs.) +

    +Sometimes, you can be fairly deep into a document before using +.PP for the first time, and when you do, because +mom is still waiting for that "initial" +paragraph, she doesn't space it with a blank line, even though +you expect her to. The simple workaround for this is to invoke +.PP twice (in succession) at the point you +expect the blank line to appear.


    @@ -613,21 +764,21 @@ hierarchically in numbered and paraheads.

    -By default, heads are centered on the page, underlined, +By default, heads are centred on the page, underlined, all in caps. A double linespace precedes each head. In PRINTSTYLE TYPESET, heads are bold, slightly larger than paragraph text.

    If these defaults don't suit you, you can change them with the head control macros. -
    +


    - Macro: HEAD "<text of head>" [ "<2nd line>" [ "<3rd line>" ... ] ] + Macro: HEAD "<text of head>" [ "<2nd line>" [ "<3rd line>" ... ] ]

    @@ -639,6 +790,33 @@ head, simply surround each line with double-quotes. and mom is unable to fit the head plus at least one line of text underneath it, she will set the head at the top of the next page. +

    +ADDITIONAL NOTE: If an +input line +in a head (i.e. one of the lines surrounded by double-quotes) has +to be broken by mom in order to fit the current +line-length (say, a narrow column measure), the head underline +(underscore) will not behave. You'll recognize the problem as soon +as you preview your document. If you encounter a head that +misbehaves with respect to underlining, the solution is to +supply each line as you want it as a separate argument +(surrounded by double-quotes) to the HEAD macro. +

    +For example, if mom breaks +

    +	.HEAD "This is a very, very, very long head"
    +
    +into +
    +	This is a very, very, very
    +	        long head        
    +
    + +you'll see the misbehaving underscore and should change the +argument to HEAD to +
    +	.HEAD "This is a very, very very" "long head"
    +

    Head control macros

    @@ -648,7 +826,7 @@ underlining, and so on. Check them out if you're unhappy with mom's defaults.

      -
    1. Family/font/size/quad +
    2. Family/font/size/colour/quad
    3. Caps
    4. Pre-head space
    5. Underlining @@ -657,7 +835,7 @@ underlining, and so on. Check them out if you're unhappy with
    6. Vertical inline escapes inside heads

    -

    1. Family/font/size/quad

    +

    1. Family/font/size/colour/quad

    See Arguments to the control macros. @@ -666,10 +844,12 @@ See .HEAD_FAMILY default = prevailing document family; default is Times Roman .HEAD_FONT default = bold .HEAD_SIZE default = +1 (point) +.HEAD_COLOR default = black .HEAD_QUAD default = CENTER

    2. Capitalizing heads -- HEAD_CAPS

    +

    By default, mom sets heads in caps, regardless of the string(s) @@ -685,8 +865,10 @@ To change this behaviour, do any argument you like instead of OFF (END, QUIT, Q, X...). To turn HEAD_CAPS back on, simply invoke it without an argument. +

    3. Space before heads -- HEAD_SPACE

    +

    By default, mom deposits 2 blank lines prior to every head. If you'd prefer just a single blank line, do

    @@ -698,8 +880,10 @@ head. If you'd prefer just a single blank line, do any argument you like instead of OFF (END, QUIT, Q, X...). To restore the space before heads to 2 blank lines, invoke HEAD_SPACE without an argument. +

    4. Underlining heads -- HEAD_UNDERLINE

    +

    By default, mom underlines heads. To change this behaviour, do

    @@ -711,8 +895,10 @@ behaviour, do use any argument you like instead of OFF (END, QUIT, Q, X...). To restore underlining of heads, invoke HEAD_UNDERLINE without an argument. +

    5. Number heads -- NUMBER_HEADS

    +

    If you'd like your heads numbered, simply invoke NUMBER_HEADS with no argument. Mom will number all subsequent heads automatically (in ascending order, @@ -729,8 +915,10 @@ Should you wish to stop head numbering, invoke NUMBER_HEADS with any argument (OFF, QUIT, END, X...). Head numbering will cease, and the head number will not be included in the numbering of subheads and/or paraheads. +

    6. Reset head numbering -- RESET_HEAD_NUMBER

    +

    Should you wish to reset the head number to "1", invoke RESET_HEAD_NUMBER with no argument. If, for some reason, you want mom to use a head number that is not @@ -743,8 +931,10 @@ the next in ascending order (i.e. the last head number + 1), invoke Your next head will be numbered "6" and subsequent heads will be numbered in ascending order from "6". +

    7. Vertical inline escapes inside heads

    +

    If you need to adjust the baseline position of a head (e.g. the head falls at the top of a column and @@ -755,17 +945,17 @@ to line up with the ascenders of in other columns), you can embed a vertical motion inline escape (either -mom's +mom's or -groff's +groff's in the string(s) you pass to HEAD

    For example,

     	.HEAD "\[ALD3]Text of head"
    -        or
    -    .HEAD "\[DOWN 3p]Text of head"
    +	    or
    +	.HEAD "\[DOWN 3p]Text of head"
     
    will lower the baseline of the head by three points. Note that @@ -776,14 +966,9 @@ the escape in the string for each line, like this:

     	.HEAD "\[ALD3]First line" "\[ALD3]Next line" 
    -        or
    -    .HEAD "\[DOWN 3p]First line" "\[DOWN 3p]Next line" 
    +	    or
    +	.HEAD "\[DOWN 3p]First line" "\[DOWN 3p]Next line" 
     
    - - - - -

    @@ -811,14 +996,14 @@ document structuring.

    If these defaults don't suit you, you can change them with the subhead control macros. -
    +


    - Macro: SUBHEAD "<text of subhead>" [ "<2nd line>" [ "<3rd line>" ... ] ] + Macro: SUBHEAD "<text of subhead>" [ "<2nd line>" [ "<3rd line>" ... ] ]

    The argument to SUBHEAD is the text of the subhead, @@ -836,7 +1021,7 @@ In addition to the usual family/font/size/quad control macros, there are macros to manage subhead numbering.

      -
    1. Family/font/size/quad +
    2. Family/font/size/colour/quad
    3. Numbering
    4. Reset subhead numbering
    5. Vertical inline escapes inside subheads @@ -851,10 +1036,12 @@ See .SUBHEAD_FAMILY default = prevailing document family; default is Times Roman .SUBHEAD_FONT default = bold .SUBHEAD_SIZE default = +.5 (point) +.SUBHEAD_COLOR default = black .SUBHEAD_QUAD default = LEFT

      2. Number subheads -- NUMBER_SUBHEADS

      +

      If you'd like your subheads numbered, simply invoke .NUMBER_SUBHEADS with no argument. Mom will number all subsequent subheads automatically @@ -869,8 +1056,10 @@ Should you wish to stop subhead numbering, invoke NUMBER_SUBHEADS with any argument (OFF, QUIT, END, X...). Subhead numbering will cease, and the subhead number will not be included in the numbering of paraheads. +

      3. Reset head numbering -- RESET_SUBHEAD_NUMBER

      +

      Should you wish to reset the subhead number to "1", invoke RESET_SUBHEAD_NUMBER with no argument. If, for some reason, you want mom to use a subhead number that is not @@ -888,9 +1077,7 @@ subheads will be numbered in ascending order from "4". See Vertical inline escapes inside heads. The information there applies equally to subheads. - - -
      +


      @@ -917,14 +1104,14 @@ they are underlined.

      If these defaults don't suit you, you can change them with the parahead control macros. -
      +


      - Macro: PARAHEAD "<text of parahead>" + Macro: PARAHEAD "<text of parahead>"

      PARAHEAD must come AFTER @@ -937,20 +1124,21 @@ only one argument (see HEAD and SUBHEAD). +

      Parahead control macros

      -In addition to the family/font/size/indent control macros, there are -macros to manage parahead numbering. +In addition to the family/font/size/colour/indent control macros, +there are macros to manage parahead numbering.

        -
      1. Family/font/size +
      2. Family/font/size/color
      3. Indent
      4. Numbering
      5. Reset parahead numbering

      -

      1. Family/font/size

      +

      1. Family/font/size/colour

      See Arguments to the control macros. @@ -959,9 +1147,18 @@ See .PARAHEAD_FAMILY default = prevailing document family; default is Times Roman .PARAHEAD_FONT default = bold italic .PARAHEAD_SIZE default = +.5 (point) +.PARAHEAD_COLOR default = black* + +*If you colourize paragraph text, paraheads will appear in the same +colour as the text unless you explicitly tell mom to colour them +otherwise by invoking .PARAHEAD_COLOR. If you do want paraheads +that are coloured the same as paragraph text, it's generally a good +idea to invoke .PARAHEAD_COLOR anyway (with the same colour used +for paragraph text), just to let mom know.

      2. Indent

      +

      Unlike other control macros that end in _INDENT, the argument to the macro that controls indenting of paragraph heads @@ -989,8 +1186,10 @@ paragraphs", as defined in are not indented unless you turn INDENT_FIRST_PARAS on. +

      3. Number paraheads -- NUMBER_PARAHEADS

      +

      If you'd like your paraheads numbered, simply invoke .NUMBER_PARAHEADS with no argument. Mom will number all subsequent paraheads automatically @@ -1006,8 +1205,10 @@ parahead number (separated by a period [dot]). Should you wish to stop parahead numbering, invoke NUMBER_PARAHEADS with any argument (OFF, QUIT, END, X...). Parahead numbering will cease. +

      4. Reset head numbering -- RESET_PARAHEAD_NUMBER

      +

      Should you wish to reset the parahead number to "1", invoke RESET_PARAHEAD_NUMBER with no argument. If, for some reason, you want mom to use a parahead number that is not @@ -1020,7 +1221,7 @@ the next in ascending order (i.e. the last parahead number + 1), invoke Your next parahead will be numbered "7" and subsequent paraheads will be numbered in ascending order from "7". -
      +


      @@ -1033,10 +1234,10 @@ paraheads will be numbered in ascending order from "7".

      By default, mom marks author linebreaks -with three centered asterisks. You can change this behaviour +with three centred asterisks. You can change this behaviour with the linebreak character control macro. -
      +

      @@ -1045,6 +1246,8 @@ with the linebreak character Macro: LINEBREAK +
      +Alias: SECTION

      LINEBREAK takes no arguments. Simply invoke it @@ -1057,12 +1260,13 @@ macro.

      Linebreak character control macro

      - Macro: LINEBREAK_CHAR [ <character> ] [ <iterations> [ <vertical adjustment> ] ] + Macro: LINEBREAK_CHAR [ <character> ] [ <iterations> [ <vertical adjustment> ] ]
      +Alias: SECTION_CHAR +
      *The third optional argument requires a unit of measure. -

      LINEBREAK_CHAR determines what mom prints when LINEBREAK is invoked. It takes 3 @@ -1074,12 +1278,13 @@ The first argument is any legal groff character (e.g. * [an asterisk], \(dg [a dagger], \f(ZD\N'141\fP [an arbitrary character from Zapf Dingbats], \l'4P' [a 4-pica long rule]). Mom sets the character -centered on the current line length. +centred on the current line length. (See "man groff_char" +for a list of all legal groff characters.)

      The second argument is the number of times to repeat the character.

      The third argument is a +|- value by which to raise (+) or lower (-) -the character in order to make it appear visually centered between +the character in order to make it appear visually centred between sections of text. This lets you make vertical adjustments to characters that don't sit on the baseline @@ -1101,6 +1306,16 @@ position (for PRINTSTYLE TYPESET; the vertical adjustment is -2 points for PRINTSTYLE TYPEWRITE). + +

      Linebreak colour control macro

      +

      + + Macro: LINEBREAK_COLOR <color name> + +

      +To change the colour of the linebreak character(s), simply invoke +LINBREAK_COLOR with the name of a pre-defined (or +"initialized") colour.


      @@ -1131,9 +1346,13 @@ or underlined (PRINTSTYLE TYPEWRITE), indented from the left margin. Obviously, she's thinking "quotes from poetry or song lyrics", but with the -quote control macros you can change her defaults so -QUOTE serves other needs, e.g. entering snippets of -programming code, command line instructions, and so on. +quote control macros +you can change her defaults so QUOTE serves other +needs, e.g. entering verbatim snippets of programming code, command +line instructions, and so on. (See the +tip +below for suggestions about including programming code snippets in +documents.)

      Besides indenting quotes, mom further sets them @@ -1158,14 +1377,84 @@ and BLOCKQUOTE, as does the control macro QUOTE_INDENT. -
      +

      +Version 1.3: mom's handling of the vertical +whitespace around quotes has changed slightly. In versions prior +to 1.3, it was not possible to alter the +leading +of quotes and blockquotes (which was the same as the document +leading), ensuring that the vertical whitespace remained consistent, +as described above. In 1.3 and later, it is possible to change the +leading of quotes and blockquote via +the QUOTE_AUTOLEAD and +BLOCKQUOTE_AUTOLEADmacro. Now, if your quote +(or blockquote) leading differs from the document leading, +mom attempts to observe the same rules for vertical +whitespace outlined above; however, she will also insert a small, +flexible amount of extra whitespace around the quotes to make sure +the whitespace is equal, top and bottom. Since she does this on a +quote by quote basis, rather than by figuring out how much extra +whitespace is needed to adjust all quotes on a page, +the spacing around multiple quotes on the same page will differ +slightly, although each will be balanced between lines of normal +running text, +top and bottom. (The inability to scan an entire page and insert +equalized whitespace at marked places is a limitation of groff, +which, by and large, works in a linear, line by line fashion.) +If you don't provide mom with a +QUOTE_AUTOLEAD, quotes are leaded at the default +for normal running text, meaning that multiple quotes on the same +page are all spaced identically. +

      +TIP: +If you want to include snippets of programming code in +mom documents, you may come acropper of the fact +that groff (and mom's) escape character is the +backslash. In order for mom not to interpret +backslashes that occur in code snippets as escapes, you have to +tell mom that the backslash character is +(temporarily) no longer the escape character. The easiest way +to do this is to set the escape character to something else for +the duration of the code snippet. You accomplish this with +ESC_CHAR, like this: +

      +

      +	.ESC_CHAR c
      +
      + +where "c", above, is the alternate escape character +(which should be a character that does not appear in the code). To +set the escape character back to the backslash, simply invoke +.ESC_CHAR by itself (i.e. with no argument). +

      +Because mom, by default, sets the text after +.QUOTE in italic (for PRINTSTYLE +TYPESET) or underlined (for PRINTSTYLE +TYPEWRITE), you'll want to change that behaviour as +well. Therefore, a recipe for setting verbatim code snippets using +QUOTE could be (assuming you want a fixed width +font like Courier): +

      +

      +	\# You only need the first two lines before the first invocation
      +	\# of QUOTE.  They stay in effect for all subsequent invocations.
      +	\#
      +	.QUOTE_FONT       CR    \" Set quote font to Courier roman
      +	.UNDERLINE_QUOTES OFF   \" Don't underline quotes in TYPEWRITE
      +	.QUOTE
      +	.ESC_CHAR ^             \" Change escape character to ^
      +	<code snippet>
      +	.ESC_CHAR               \" Restore escape character to \
      +	.QUOTE OFF
      +
      +

      - Macro: QUOTE toggle + Macro: QUOTE toggle

      @@ -1186,27 +1475,30 @@ argument (e.g. OFF, END, X, Q...) to turn it off. Example:

      Quote control macros

        -
      1. Family/font/size/indent +
      2. Family/font/size/leading/colour/indent
      3. Spacing above and below (typeset only)
      4. Underline quotes (typewrite only)
      5. Manually break a footnoted quote that crosses pages/columns

      -

      1. Family/font/size/indent

      +

      1. Family/font/size/colour/indent

      See Arguments to the control macros.

      -.QUOTE_FAMILY default = prevailing document family; default is Times Roman
      -.QUOTE_FONT   default = italic
      -.QUOTE_SIZE   default = 0 (i.e. same size as paragraph text)
      -.QUOTE_INDENT default = paragraph indent x 3 (typeset); x 2 (typewrite)
      -             (note that this macro also sets the indents (left and right)
      -              for blockquotes)
      +.QUOTE_FAMILY   default = prevailing document family; default is Times Roman
      +.QUOTE_FONT     default = italic; underlined in TYPEWRITE
      +.QUOTE_SIZE     default = +0 (i.e. same size as paragraph text)
      +.QUOTE_AUTOLEAD default = none; leading of quotes is the same as paragraphs
      +.QUOTE_COLOR    default = black
      +.QUOTE_INDENT   default = paragraph indent x 3 (typeset); x 2 (typewrite)
      +               (note that this macro also sets the indents (left and right)
      +                for blockquotes)
       

      2. Spacing above and below -- ALWAYS_FULLSPACE_QUOTES (typeset only)

      +

      If you'd like mom always to put a full linespace above and below quotes, invoke .ALWAYS_FULLSPACE_QUOTES with no argument. If you wish to restore mom's @@ -1218,8 +1510,10 @@ X...) NOTE: This macro also sets mom's spacing policy for blockquotes. +

      3. Underlining -- UNDERLINE_QUOTES (typewrite only)

      +

      By default in PRINTSTYLE TYPEWRITE, mom underlines quotes. If you'd rather she didn't, @@ -1237,8 +1531,20 @@ of italics by default in PRINTSTYLE TYPEWRITE, you must also make sure that ITALIC_MEANS_ITALIC is enabled (see PRINTSTYLE TYPEWRITE control macros). +

      4. Manually break a footnoted quote -- BREAK_QUOTE

      +

      +NOTE: As of version 1.1.9, the macro +BREAK_QUOTE has become obsolete (or, at least, +should have become obsolete.) It remains here for backward +compatibility with documents created prior to 1.1.9, and just in +case, despite my efforts to make it obsolete, you still encounter the +problem it's supposed to fix. Should you find yourself having to +use BREAK_QUOTE while running mom +1.1.9 or higher, please notify me immediately. + +

      Exceptionally, a quote or blockquote containing a footnote may cross a page or column. When this happens, the footnote marker may not be correct for its position relative to other footnotes on the page, and @@ -1252,7 +1558,7 @@ will be marked correctly and appear on the correct page. BREAK_QUOTE may be used with both quotes and blockquotes, and hence is aliased as BREAK_BLOCKQUOTE, BREAK_CITATION and BREAK_CITE. -
      +


      @@ -1281,24 +1587,16 @@ Besides indenting blockquotes, mom further sets them off from running text with a small amount of vertical whitespace top and bottom. (See above -for a complete explanation of how this is managed, and how to control it.) +for a complete explanation of how this is managed, and how to control it. +Be sure to read the section Version 1.3.)

      -You may notice that BLOCKQUOTE has no macro to -control -leading, -although you can change the point size. There are Very Good -Reasons for this. If you can't live with the limitation, change -the leading of blockquotes (after invoking the tag) with -LS, -but know that there will be Bottom Margin Consequences. -


      - Macro: BLOCKQUOTE toggle + Macro: BLOCKQUOTE toggle
      Aliases: CITE, CITATION
      @@ -1326,31 +1624,35 @@ with

      NOTE: The aliases CITE and CITATION may be used in place of the -BLOCKQUOTE tag, but "CITE" and -"CITATION" must not be used to replace "BLOCKQUOTE" -in any of the tag's control macros. +BLOCKQUOTE tag, as well as in any of the control +macros that begin with BLOCKQUOTE_ or end with +_BLOCKQUOTE.

      Blockquote control macros

        -
      1. Family/font/size/indent +
      2. Family/font/size/leading/colour/quad/indent
      3. Spacing above and below (typeset only)
      4. Manually break a footnoted blockquote that crosses pages/columns

      -

      1. Family/font/size/indent

      +

      1. Family/font/size/colour/quad/indent

      See Arguments to the control macros.

      -.BLOCKQUOTE_FAMILY default = prevailing document family; default is Times Roman
      -.BLOCKQUOTE_FONT   default = italic
      -.BLOCKQUOTE_SIZE   default = -1 (point)
      -.QUOTE_INDENT      default = paragraph indent x 3 (typeset); x 2 (typewrite)
      -                  (note that this macro also sets the left indent for quotes)
      +.BLOCKQUOTE_FAMILY   default = prevailing document family; default is Times Roman
      +.BLOCKQUOTE_FONT     default = roman
      +.BLOCKQUOTE_SIZE     default = -1 (point)
      +.BLOCKQUOTE_AUTOLEAD default = none; leading of blockquotes is the same as paragraphs
      +.BLOCKQUOTE_COLOR    default = black
      +.BLOCKQUOTE_QUAD     default = left
      +.BLOCKQUOTE_INDENT   default = paragraph indent x 3 (typeset); x 2 (typewrite)
      +                    (note that this macro also sets the left indent for quotes)
       

      2. Spacing above and below -- ALWAYS_FULLSPACE_QUOTES (typeset only)

      +

      If you'd like mom always to put a full linespace above and below blockquotes, invoke .ALWAYS_FULLSPACE_QUOTES with no argument. If you wish to restore mom's @@ -1362,7 +1664,880 @@ X...). NOTE: This macro also sets mom's spacing policy for quotes. +

      +


      + + + +

      Nested lists

      + +

      +Lists are points or items of interest or importance that are +separated from +running text +by enumerators. Some typical enumerators are +en-dashes, +bullets, +digits and letters. +

      +Setting lists with mom is easy. First, you +initialize a list with the LIST macro. Then, for +every item in the list, you invoke the macro, ITEM, +followed by the text of the item. When a list is finished, you +exit the list with LIST OFF (or +QUIT, END, BACK, +etc.) +

      +By default mom starts each list with the enumerator +flush with the left margin of running text that comes before it, +like this: +

      +

      +	My daily schedule needs organizing.  I can't
      +	seem to get everything done I want.
      +	o an hour's worth of exercise
      +	o time to prepare at least one healthy
      +	  meal per day
      +	o reading time
      +	o work on mom
      +	o writing
      +	  - changes from publisher
      +	  - current novel
      +	o a couple of hours at the piano
      +
      + +In other words, mom does not, by default, indent +entire lists. Indenting a list is controlled by the macro, +SHIFT_LIST. +(This is a design decision; there are too many instances where a +default indent is not desirable.) Equally, mom +does not add any extra space above or below lists. +

      +Lists can be nested (as in the example above). In other words, you +can set lists within lists, each with an enumerator (and possibly, +indent) of your choosing. In nested lists, each invocation of +LIST OFF (you may prefer to use LIST +BACK) takes you back to the previous depth (or +level) of list, with that list's enumerator and indent intact. The +final LIST OFF exits lists completely and returns +you to the left margin of running text. +

      +Finally, lists can be used in documents created with either the +document processing macros or just the typesetting macros. +

      + + + +


      +

      + + Macro: LIST [ BULLET | DASH | DIGIT | ALPHA | alpha | ROMAN<n> | roman<n> | USER <string>] [ <separator> | <user-defined enumerator> ] [ <prefix> ] [ <off> ] +

      +Invoked by itself (i.e. with no argument), LIST +initializes a list (with bullets as the default enumerator). +Afterwards, each block of input text preceded by +.ITEM, +on a line by itself, is treated as a list item. +

      +NOTE: Every time you invoke LIST +to start a list (as opposed to +exiting one), +you must supply an enumerator (and optionally, a separator) for the +list, unless you want mom's default enumerator, +which is a bullet. Within nested lists, mom +stores the enumerator, separator and indent for any list you return +backwards to (i.e. with LIST OFF), but +does not store any information for lists you move forward +to.
      + +

      The first argument--enumerator style

      +

      +The optional arguments BULLET, +DASH, DIGIT (for +Arabic numerals), ALPHA (for uppercase +letters), alpha (for lowercase letters), +ROMAN<n> (for uppercase roman numerals), +roman<n> (for lowercase roman numerals) tell +mom what kind of enumerator to use for a given +list. +

      +The arguments, ROMAN<n> and +roman<n>, are special. You must append to +them a digit (arabic, e.g. "1" or "9" or "17") saying how many items +a particular roman-numeralled LIST is going to +have. Mom requires this information in order to +align roman numerals sensibly, and will abort--with a message--if +you don't provide it. +

      +A roman-numeralled list containing, say, five items, would be set +up like this: +

      +

      +	.LIST roman5        producing        i)   Item 1.
      +	.ITEM                                ii)  Item 2.
      +	Item 1.                              iii) Item 3.
      +	.ITEM                                iv)  Item 4.
      +	Item 2.                              v)   Item 5.
      +	.ITEM
      +	Item 3
      +	.ITEM
      +	Item 4
      +	.ITEM
      +	Item 5
      +
      + +

      +The argument, USER, lets you make up your own +enumerator, and must be followed by a second argument: what you'd +like the enumerator to look like. For example, if you want a list +enumerated with +=>, +

      +

      +	.LIST USER =>
      +	.ITEM
      +	A list item
      +
      + +will produce +

      +

      +	=> A list item
      +
      + +Please note: if the argument to +USER contains spaces, you must enclose the argument +in double quotes. + +
      + +

      The second argument--separator style

      +

      +If you choose DIGIT, ALPHA, +alpha, ROMAN<n>, or +roman<n>, you may enter the optional +argument, separator, to say what kind of separator +you want after the enumerator. The separator can be anything you +like. The default for DIGIT is a period (dot), +like this: +

      +

      +	1. A list item
      +
      + +The default separator for ALPHA, +alpha, ROMAN<n> and +roman<n> is a right parenthesis, like this: +

      +

      +	a) An alpha-ed list item
      +	b) A second alpha-ed list item
      +
      +	   or
      +
      +	i)  A roman-ed list item
      +	ii) A second roman-ed item
      +
      + +If you'd prefer, say, digits with right-parenthesis separators +instead of the default period, you'd do +

      +

      +	.LIST DIGIT )
      +	.ITEM
      +	A numberd list item
      +
      + +which would produce +

      +

      +	1) A numbered list item
      +
      + +Please note: BULLET, DASH and +USER do not take a separator. +
      + +

      The third argument--prefix style

      +

      +Additionally, you may give a prefix (i.e. a character that comes +before the enumerator) when your enumerator style for a +particular list is DIGIT, ALPHA, +alpha, ROMAN<n> +or roman<n>. In the arguments to +LIST, the prefix comes after the +separator, which may seem counter-intuitive, so please be careful. +

      +A prefix can be anything you like. Most likely, you'll want some +kind of open-bracket, such as a left parenthesis. If, for example, +you want a DIGIT list with the numbers enclosed in +parentheses, you'd enter +

      +

      +	.LIST DIGIT ) (
      +	.ITEM
      +	The first item on the list.
      +	.ITEM
      +	The second item on the list.
      +
      + +which would produce +

      +

      +	(1) The first item on the list.
      +	(2) The second item on the list.
      +
      + +Please note: BULLET, DASH and +USER do not take a prefix. +
      + + +

      Exiting lists--.LIST OFF/BACK or .QUIT_LISTS

      +

      +Any single argument to LIST other +than BULLET, DASH, +DIGIT, ALPHA, +alpha, ROMAN<n>, +roman<n> or USER (e.g. +LIST OFF or LIST +BACK) takes you out of the current list. +

      +If you are at the first list-level (or "list-depth"), +mom returns you to the left margin of running text. +Any indents that were in effect prior to setting the list are fully +restored. +

      +If you are in a nested list, mom moves you +back one list-level (i.e. does not take you out of the +list structure) and restores the enumerator, separator and indent +appropriate to that level. +

      +Each invocation of LIST should be be matched by +a corresponding LIST OFF in order to fully exit +lists. For example, +

      +

      +	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
      +	sed diam nonumy eirmod tempor invidunt ut labore.
      +	o List item in level 1
      +	o List item in level 1
      +	  - List item in level 2
      +	  - List item in level 2
      +	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
      +	sed diam nonumy eirmod tempor invidunt ut labore.
      +
      + +is created like this: +

      +

      +	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
      +	sed diam nonumy eirmod tempor invidunt ut labore.
      +	.LIST BULLET
      +	.ITEM
      +	List item in level 1
      +	.ITEM
      +	List item in level 1
      +	.LIST DASH
      +	.ITEM
      +	List item in level 2
      +	.ITEM
      +	List item in level 2
      +	.LIST OFF    \" Turn level 2 list off
      +	.LIST OFF    \" Turn level 1 list off
      +	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
      +	sed diam nonumy eirmod tempor invidunt ut labore.
      +
      + +Alternatively, you may use the single-purpose macro, +QUIT_LISTS, to get yourself out of a list +structure. In the example above, the two .LIST OFF +lines could be replaced with a single .QUIT_LISTS. +

      + +


      +

      + + Macro: ITEM +

      +After you've initialized a list with +LIST, +precede each item you want in the list with ITEM. +Mom takes care of everything else with respect to +setting the item appropriate to the list you're in. +

      +In document processing, it is legal to have list items that contain +multiple paragraphs. Simply issue a +PP +request for each paragraph following the first item. +I.e., don't do this: +

      +

      +	.ITEM
      +	.PP
      +	Some text...
      +	.PP
      +	A second paragraph of text
      +
      + +but rather +

      +

      +	.ITEM
      +	Some text...
      +	.PP
      +	A second paragraph of text
      +
      +
      + +

      List control macros

      +
        +
      1. Indenting lists (SHIFT_LIST) +
      2. Resetting an initialized list's enumerator (RESET_LIST) +
      3. Padding digit enumerators (PAD_LIST_DIGITS) +
      + +

      1. Indenting lists -- SHIFT_LIST

      +

      +If you want a list to be indented to the right of running text, or +indented to the right of a current list, use the macro +SHIFT_LIST immediately after +LIST. +SHIFT_LIST takes just one argument: the amount by +which you want the list shifted to the right. The argument requires +a +unit of measure, +

      +SHIFT_LIST applies only to the list you +just initialized with LIST. It does not carry +over from one invocation of LIST to the next. +However, the indent remains in effect when you return to a +list level in a nested list. +

      +For example, if you want a 2-level list, with each list indented to +the right by 18 +points, +

      +

      +	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
      +	sed diam nonumy eirmod tempor invidunt ut labore.
      +	.LIST           \" List 1
      +	.SHIFT_LIST 18p \" Indent 18 points right of running text
      +	.ITEM
      +	List 1 item
      +	.ITEM
      +	List 1 item
      +	.LIST DASH      \" List 2
      +	.SHIFT_LIST 18p \" Indent 18 points right of list 1
      +	.ITEM
      +	List 2 item
      +	.ITEM
      +	List 2 item
      +	.LIST OFF       \" Move back to list 1
      +	.ITEM
      +	List 1 item
      +	.ITEM
      +	List 1 item
      +	.LIST OFF       \" Exit lists
      +	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
      +	sed diam nonumy eirmod tempor invidunt ut labore.
      +
      + +produces (approximately) +

      +

      +	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
      +	sed diam nonumy eirmod tempor invidunt ut labore.
      +	    o List 1 item
      +	    o List 1 item
      +	        - List 2 item
      +	        - List 2 item
      +	    o List 1 item
      +	    o List 1 item
      +	Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
      +	sed diam nonumy eirmod tempor invidunt ut labore.
      +
      + +

      2. Resetting an initialized list's enumerator -- RESET_LIST

      +

      +In nested lists, if your choice of list enumerator for a given +level of list is DIGIT, ALPHA, +alpha, ROMAN or +roman, you may sometimes want to reset the list's +enumerator when you return to that list. Consider the following: +

      +

      +	Things to do religiously each and every day:
      +	1. Take care of the dog
      +	   a) walk every day
      +	   b) brush once a week
      +	      - trim around the eyes every fourth brushing
      +	      - don't forget to check nails
      +	2. Feed the cat
      +	   a) soft food on Mon., Wed. and Fri.
      +	   b) dry food on Tues., Thurs. and Sat.
      +	   c) canned tuna on Sunday
      +
      + +Normally, within a nested list, when you return to an +incrementally-enumerated list, the enumerator continues incrementing +from where it left off. That means, in the example above, the +normal state of affairs for the alpha'ed list under "2. Feed +the cat" would be c), d) and e). The solution, in such a case, +is simply to reset the enumerator --before ITEM!-- +with the macro, RESET_LIST. +

      +By default, with no argument, RESET_LIST resets the +enumerator to 1, A, a, I or i depending on the style of enumerator. +You may, if you wish, pass RESET_LISTS a numeric +argument representing the starting enumerator for the reset (if +different from "1"), although I can't at present think of a use for +this feature. +

      +

      3. Padding digit enumerators (PAD_LIST_DIGITS)

      +

      +Arabic digits +

      +When your choice of enumerators is DIGIT AND the +number of items in the list exceeds nine (9), you have to make a +design decision: should mom leave room for the +extra numeral in two-numeral digits to the right or the left of +the single-numeral digits? +

      +If you want the extra space to the right, invoke the macro, +.PAD_LIST_DIGITS (with no argument), after +LIST and before ITEM. This will +produce something like +

      +

      +	8.  List item
      +	9.  List item
      +	10. List item
      +
      + +If you want the extra space to the left, invoke +PAD_LIST_DIGITS with the single argument, +LEFT, which will produce +

      +

      +	 8. List item
      +	 9. List item
      +	10. List item
      +
      + +Of course, if the number of items in the list is less than ten +(10), there's no need for PAD_LIST_DIGITS. +

      +Roman numerals +

      +By default, mom sets roman numerals in lists flush +left. The <n> argument appended to +ROMAN<n> or roman<n> +allows her to calculate how much space to put after each numeral in +order to ensure that the text of items lines up properly. +

      +If you'd like the roman numerals to line up flush right (i.e. be +padded "left"), simply invoke PAD_LIST_DIGITS +LEFT after LIST ROMAN<n> +or LIST roman<n> amd before +ITEM. +

      +


      + + + +

      Line numbering

      + + +

      +Mom's line-numbering capabilities are not as flexible +as most of her other document processing macros. The reason is +that groff's underlying line-numbering +primitive, +.nm, is, well...primtive. It is not possible, for +example, to select a particular family or font for use exclusively +with line numbers. Nor is it possible to set the +gutter +using any +unit of measure +other than the +figure space. +

      +That said, when you turn line-numbering on, mom, +by default +
      + +

        +
      • numbers every line of paragraph text; line-numbering is + suspended for all other document processing tags (like + docheaders, epigraphs, heads, subheads, etc.) and special + pages (covers, endotes, bibliographies, etc.); be aware, + though, that if you turn + docheaders + off (with + DOCHEADER OFF) + and create your own docheader, mom + will line-number your custom docheader +
      • doesn't touch your line length; line numbers are hung + outside your current left margin (as set with + L_MARGIN, + PAGE + or + DOC_LEFT_MARGIN), + regardless of any indents that may be active +
      • separates line numbers from running text by two + figure spaces. +
      +

      +Line numbering may be enabled and disabled for +QUOTE +and/or +BLOCKQUOTE +in one of three styles. See +Line numbering control macros for quotes and blockquotes. +

      +The first time you invoke +NUMBER_LINES +you must, at a minimum, tell it what line number you want the +next +output line +to have. Optional arguments allow you to state which lines should +be numbered (e.g. every five or every ten lines), and the gutter to +place between line numbers and +running text. +

      +Subsequently, you can turn line-numbering off, either permanently, +or resume it later at a place of your choosing. When you +resume line-numbering, the line numbers pick up where you left off. +

      + + + +


      +

      + + + Macro: NUMBER_LINES <start number> [ <which lines to number> [ <gutter> ] ] +
      + Macro: NUMBER_LINES <anything> | RESUME +
      +
      + + +

      +NUMBER_LINES does what it says: prints line +numbers, to the left of +output lines +of paragraph text. One of the chief reasons for wanting numbered +lines is in order to identify footnotes or endnotes by line number +instead of by a marker in the text. (See +.FOOTNOTE_MARKER_STYLE LINE +for instructions on line-numbered footnotes, and +.ENDNOTE_MARKER_STYLE +for instructions on line-numbered endnotes.) +

      +Every time you invoke NUMBER_LINES, unless you are +using the arguments OFF (QUIT, +END, X, etc.) or +RESUME you must, at a minimum, pass it one +argument, namely the number (digit) you want the next +output line +to have. For example, +

      +	.NUMBER_LINES 3
      +
      + +will prepend the number, 3, to the next output line. +

      +Normally, of course, you will number lines of text starting at 1. +All you have to do in that case is ensure that +

      +	.NUMBER_LINES 1
      +
      + +precedes your first line of input text, which will also be the +first line of output text. +

      +You can alter mom's default line numbering +behaviour (see +above) +with the optional arguments <which lines to +number> and <gutter>. +

      +<which lines to number> instructs +NUMBER_LINES to number only certain lines, e.g. +every two lines or every five lines. If you want, say, only every +five lines to have a prepended number, you'd do +

      +	.NUMBER_LINES 1 5
      +
      + +GOTCHA! The argument to <which +lines to number> only numbers those lines that are +multiples of the argument. Hence, in the above example, line +number "1" will not be numbered, since "1" is not a +multiple of "5". +

      +If you wanted line number "1" to be numbered, you'd have to invoke +.NUMBER_LINES 1 1 before the first output line, then +study your output copy and determine where best to insert +the following in your input copy: +

      +	.NUMBER_LINES \n(ln 5
      +
      + +(The escape, \n(ln, ensures that +NUMBER_LINES automatically supplies the correct +value for the first argument, <start +number>.) +

      +Following this recipe, line number 1 will be numbered; subsequently, +only line numbers that are multiples of 5 will be numbered. A +little experimentation may be required to determine the best place +for it. +

      +The optional argument, <gutter>, tells +mom how much space to put between the line numbers +and the running text. +

      +Note: when giving a value for +<gutter>, you cannot skip the +<which lines to number> argument. Either +fill in the desired value, or use two double-quotes +("") to have mom use the value +formerly in effect. +

      +<gutter> does not require (or even accept) a +unit of measure. +The argument you pass to it is the number of +figure spaces +you want between line numbers and running text. +Mom's default gutter is two figure spaces. If +you'd like a wider gutter, say, four figures spaces, you'd do +

      +	.NUMBER_LINES 1 1 4
      +	                |
      +	                +-- Notice you *must* supply a value
      +	                    for the 2nd argument in order to supply
      +	                    a value for the 3rd.
      +
      + +

      +After you've set up line-numbering, NUMBER_LINES +can be used to control line numbering. +
      +

      Line-numbering control

      +

      +NUMBER_LINES OFF (or END, QUIT, X, etc.) +turns line-numbering off. +

      +Sometimes, you merely want to suspend line-numbering. In that case, +turn line numbering off with NUMBER_LINES OFF. +Later, when you want it to resume, enter +

      +	.NUMBER_LINES RESUME
      +
      + +Line numbering will resume exactly where it left off. If this is +not what you want--say you want to reset the line number to "1"--simply +invoke NUMBER_LINES with whatever arguments +are needed for the desired result. +

      +Extra Notes: +
      +

        +
      1. In document processing, you may invoke NUMBER_LINES + either before or after START. + Mom doesn't care. +
      2. If you're collating documents with + COLLATE, + you should re-invoke, at a minimum, .NUMBER_LINES + 1 for each collated document, in order to ensure that + each begins with the number "1" prepended to the first line + (unless, of course, that is not what you want). +
      3. Occasionally, you may want to change the current gutter + between line numbers and running text without knowing + what the next output line number should be. Since + NUMBER_LINES requires this number + as its first argument, in such instances, pass + NUMBER_LINES as its first argument the + escape \n(ln. +

        + For example, if you were numbering every 5 lines with a + gutter of 2 (figure spaces) and you needed to change the + gutter to 4 (figures spaces), +

        +     .NUMBER_LINES \n(ln 5 4 +

        + would do the trick. +

      4. If you're using margin notes in a document, be sure to set + the gutter for margin notes wide enough to allow room for + the line numbers. +
      5. Mom (groff, actually), only numbers lines + to the left of text. For aesthetic reason, + therefore, the use of line numbering when setting a document + in columns is discouraged. However, should you wish to + number lines when setting in columns, make sure the + gutter(s) + between columns is wide enough to leave room for the + numbers. +
      +
      + +

      Line numbering control macros for QUOTE and BLOCKQUOTE

      +
        +
      1. NUMBER_QUOTE_LINES +
      2. NUMBER_BLOCKQUOTE_LINES +
      3. Setting up line numbering in quotes and blockquotes on a case by case basis +
      + +

      1. NUMBER_QUOTE_LINES

      +

      +If you'd like mom to number lines of output text +in a +QUOTE +as part of the same order and sequence as paragraph text, simply +invoke NUMBER_QUOTE_LINES by itself. +

      +There is a catch with numbering quotes, though. Owing to groff's +restriction of accepting only the figure space as the line number +gutter's unit of measure, it is not possible for line numbers +in quotes to hang outside a document's overall left margin and +be reliably flush with the line numbers of paragraph text. +Conseqently, line numbers in quotes hang to the left of the quote, +separated from the quote by the <gutter> +argument. +

      +If you'd like to change the gutter for quotes line-numbered in +this way, invoke NUMBER_QUOTE_LINES with a digit +representing the number of +figure spaces +you'd like between the line numbers and the quoted text, like this: +

      +	.NUMBER_QUOTE_LINES 1
      +
      + +With the above, line numbers in quotes (and only quotes) will have +a gutter of 1 figure space. +

      +If you are using "line numbering style" for footnotes +(FOOTNOTE_MARKER_STYLE LINE), +you may not wish to have quotes visibly line-numbered, but +still want to embed footnotes inside quotes. In order to do that, +mom allows you to say NUMBER_QUOTE_LINES +SILENT. +

      +When you invoke NUMBER_QUOTE_LINES +SILENT, mom continues to increment line +numbers while quotes are being output, but they won't appear in the +output copy. (Compare this with mom's default +behaviour of suspending incrementing of line numbers +during the output of quotes.) This allows you to embed +line-numbered footnotes inside quotes and have the line number +"label" in the footnote come out sensibly. +

      +Once having turned NUMBER_QUOTE_LINES on, you +may disable it with NUMBER_QUOTE_LINES OFF (or +QUIT, END, X, +etc). +

      + +

      2. NUMBER_BLOCKQUOTE_LINES

      +

      +If you'd like mom to number lines of output text +in a +BLOCKQUOTE +as part of the same order and sequence as paragraph text, simply +invoke NUMBER_BLOCKQUOTE_LINES by itself. +

      +There is a catch with numbering blockquotes, though. Owing to +groff's restriction of accepting only the figure space as the +line number gutter's unit of measure, it is not possible for line +numbers in blockquotes to hang outside a document's overall left +margin and be reliably flush with the line numbers of paragraph +text. Conseqently, line numbers in blockquotes hang to the +left of the blockquote, separated from the blockquote by the +<gutter> argument. +

      +If you'd like to change the gutter for blockquotes line-numbered in +this way, invoke NUMBER_BLOCKQUOTE_LINES with a digit +representing the number of +figure spaces +you'd like between the line numbers and the blockquoted text, like +this: +

      +	.NUMBER_BLOCKQUOTE_LINES 1
      +
      + +With the above, line numbers in blockquotes (and only blockquotes) +will have a gutter of 1 figure space. +

      +If you are using "line numbering style" for footnotes +(FOOTNOTE_MARKER_STYLE LINE), +you may not wish to have blockquotes visibly line-numbered, +but still want to embed footnotes inside blockquotes. In +order to do that, mom allows you to say +NUMBER_BLOCKQUOTE_LINES SILENT. +

      +When you invoke NUMBER_BLOCKQUOTE_LINES +SILENT, mom continues to increment line +numbers while blockquotes are being output, but they won't appear in +the output copy. (Compare this with mom's default +behaviour of suspending incrementing of line numbers during +the output of blockquotes.) This allows you to embed line-numbered +footnotes inside blockquotes and have the line number "label" in the +footnote come out sensibly. +

      +Once having turned NUMBER_BLOCKQUOTE_LINES on, you +may disable it with NUMBER_BLOCKQUOTE_LINES OFF (or +QUIT, END, X, +etc). +

      + +

      3. Setting up line numbering in quotes and blockquotes on a case by case basis

      +

      +Sometimes, you may want quotes or blockquotes to have a different +line numbering scheme from the one used in the rest of the +document. Or, you may want line numbering enabled only inside a +particular quote or blockquote. A common reason for this would be +if you were using the +QUOTE +macro to insert lines of programming code into a document. (See +here +for suggestions about including programming code snippets in +documents.) +

      +To enable line numbering within quotes or blockquotes on a case by +case basis, simply invoke NUMBER_LINES, with the +arguments you need, immediately after entering QUOTE +or BLOCKQUOTE. (NUMBER_QUOTE_LINES +and/or NUMBER_BLOCKQUOTE_LINES should be turned +off if you're doing this.) The quote or blockquote will then be +line-numbered according to your specifications: the starting line +number of the quote or blockquote will be the one you give as a +first argument to NUMBER_LINES; which lines to +number will be the value you pass to <which lines to +number> (defaults to "1"); line numbers will hang +to the left of the quote or blockquote, separated from the quote or +blockquote by <gutter> (defaults to "2"). +

      +As soon as QUOTE or BLOCKQUOTE is +turned off, line numbering ceases, not only with respect to +subsequent paragraph text (if they are not being line-numbered), +but also for any subsequent invocation of QUOTE or +BLOCKQUOTE. In other words, you must re-enable +quote or blockquote line-numbering inside every instance of +QUOTE or BLOCKQUOTE when +line-numbering either of them on a case by case basis. +


      @@ -1370,6 +2545,9 @@ spacing policy for

      Footnotes

      @@ -1384,51 +2562,106 @@ You just type, for example .FOOTNOTE <footnote about who the hell is Schelling> .FOOTNOTE OFF - were generally the points of discussion presenting the most + were generally the points of discussion presenting the most of beauty to the imaginative Morella. -and be done with it. (Note the obligatory use of the -\c -inline escape.) -Mom takes care of everything: -putting footnote markers in the body of the document, keeping track -of how many footnotes are on the page, identifying the footnotes -themeselves appropriately, balancing them properly with the botton -margin, deferring footnotes that don't fit on the page... Even if -you're using +and be done with it. +

      +(Note the obligatory use of the \c +inline escape. +It is required when your +FOOTNOTE_MARKER_STYLE +is either STAR [star/dagger footnotes] or +NUMBER [superscript numbers]; it is NOT to be used +when the FOOTNOTE_MARKER_STYLE is +LINE, or when footnote markers have been disabled +with +.FOOTNOTE_MARKERS +OFF.) +

      +***Version 1.3 change*** +

      +As of version 1.3, the manner of entering the line +after .FOOTNOTE OFF has changed +to accommodate users' differing wishes with respect to +the order of punctuation and footnote markers. The +correct way to enter the line after .FOOTNOTE +OFF--ONLY if your +FOOTNOTE_MARKER_STYLE is +STAR or NUMBER--is to input +it as if it's literally a continuation of the line before +.FOOTNOTE, and therefore begins with either a space +or a punctuation mark, as in the two following examples. +

      +

      +	   Example 1					  Example 2
      +	   ---------                      ---------
      +
      +	A line of text,\c				A line of text\c
      +	.FOOTNOTE						.FOOTNOTE
      +	A footnote line.				A footnote line.
      +	.FOOTNOTE OFF					.FOOTNOTE OFF
      +	 broken up with a comma.		, broken up with a comma.
      +
      +	(last line begins with			(last line begins with
      +	 a literal space)				 the comma and a space)
      +
      + +If your FOOTNOTE_MARKER_STYLE is line, none of +this is a concern. +

      +***End of version 1.3 change*** +

      +After you invoke FOOTNOTE, mom +takes care of everything: putting footnote markers in the body of +the document, keeping track of how many footnotes are on the page, +identifying the footnotes themselves appropriately, balancing them +properly with the bottom margin, deferring footnotes that don't fit +on the page... Even if you're using COLUMNS, mom knows what to do, and Does The Right Thing.

      Footnotes can be sly little beasts, though. If you're writing a document that's footnote-heavy, you might want to read the following. +

      Footnote behaviour

      -By default, mom marks footnotes with -alternating stars (asterisks) and daggers. The first footnote -gets a star, the second a dagger, the third two stars, -the fourth two daggers, etc. If you prefer numbered footnotes, rest -assured mom is happy to oblige. +By default, mom marks footnotes with alternating +stars (asterisks), daggers, and double-daggers. The first footnote +gets a star, the second a dagger, the third a double-dagger, the +fourth two stars, the fifth two daggers, etc. If you prefer +numbered footnotes, rest assured mom is happy to +oblige.

      A small amount of vertical whitespace and a short horizontal rule separate footnotes from the document body. The amount of whitespace varies slightly from page to page depending on the number of lines -in the footnotes. Mom tries for a nice balance +in the footnotes. Mom tries for a nice balance between too little whitespace and too much, but when push comes to -shove, she'll opt for ample over cramped. The last lines of footnotes -are always flush with the document's bottom margin. +shove, she'll usually opt for ample over cramped. The last lines of +footnotes are always flush with the document's bottom margin. +

      If mom sees that a portion of a footnote cannot be fit on its page, she carries that portion over to the next -page. If an entire footnote can't be fitted on its page (i.e. +page. If an entire footnote can't be fit on its page (i.e. FOOTNOTE has been called too close to the bottom), she defers the footnote to the next page, but sets it with the appropriate marker from the previous page.

      +When footnotes occur within cited text, for example a +QUOTE +or a +BLOCKQUOTE, +mom will usually opt for deferring the footnote +over to the next page if it allows her to complete the cited text +on one page. +

      In the unfortunate happenstance that a deferred footnote is the only footnote on its page (i.e. it's marked in the document body with -a star) and the page it's deferred has its own footnotes, +a star) and the page it's deferred to has its own footnotes, mom separates the deferred footnote from the page's proper footnote(s) with a blank line. This avoids the confusion that might result from readers seeing two footnote entries on the same page @@ -1437,32 +2670,102 @@ numbered footnotes that begin at 1 on every page). The blank line makes it clear that the first footnote entry belongs to the previous page.

      -In the circumstance where a deferred footnote is not the only one on -its page, and is consequently marked by something other than a single -star, there's no confusion and mom doesn't bother -with the blank line. (By convention, the first footnote on a page is -always marked with a single star, so if readers see, say, a dagger or two -stars marking the first footnote entry, they'll know the entry belongs -to the previous page). +In the circumstance where a deferred footnote is not the only one +on its page, and is consequently marked by something other than a +single star, there's no confusion and mom doesn't +bother with the blank line. (By convention, the first footnote on +a page is always marked with a single star, so if readers see, say, +a dagger or double-dagger marking the first footnote entry, they'll +know the entry belongs to the previous page). +

      +Very exceptionally, two footnotes may have to be deferred (e.g. one +occurs on the second to last line of a page, and another on the +last line). In such a circumstance, mom does not +add a blank after the second deferred footnote. If you'd like a +blank line separating both deferred footnotes from any footnotes +proper to the page the deferred ones were moved to, add the space +manually by putting a +.SPACE +command at the end of the footnote text, before +FOOTNOTE OFF (or FOOTNOTE X, QUIT, +EXIT, etc...).

      Obviously, deferred footnotes aren't an issue if you request numbered footnotes that increase incrementally throughout the whole document -- yet another convenience mom has thought of.

      -Exceptionally, you may encounter problems with footnotes inside -quotes and blockquotes that cross a page or column. See -BREAK_QUOTE +While mom's handling of footnotes is +sophisticated, and tries to take nearly every imaginable situation +under which they might occur into account, some situations are +simply impossible from a typographic standpoint. For example, if +you have a +HEAD +near the bottom of the page AND that page has some footnotes on it, +mom may simply not have room to set any text under +the head (normally, she insists on having room for at least one line +of text beneath a head). In such an instance, mom +will either set the head, with nothing under it but footnotes, +or transfer the head to the next page. Either way, you'll have a +gaping hole at the bottom of the page. It's a sort of typographic +Catch-22, and can only be resolved by you, the writer or formatter +of the document, adjusting the type on the offending page so as to +circumvent the problem. +

      +NOTE: Exceptionally, you may encounter problems with footnotes inside +quotes and blockquotes that cross a page or column. See BREAK_QUOTE for a solution. -
      +

      + +

      Footnote markers and punctuation in the running text

      + +

      +As of version 1.3, the manner of entering the line after +.FOOTNOTE OFF has changed. The correct way to +enter the line after .FOOTNOTE OFF now is to +input it as if it's literally a continuation of the line before +.FOOTNOTE, and therefore begins with either a space +or a punctuation mark, as in the two following examples. +

      +

      +	   Example 1					  Example 2
      +	   ---------                      ---------
      +
      +	A line of text,\c				A line of text\c
      +	.FOOTNOTE						.FOOTNOTE
      +	A footnote line.				A footnote line.
      +	.FOOTNOTE OFF					.FOOTNOTE OFF
      +	 broken up with a comma.		, broken up with a comma.
      +
      +	(last line begins with			(last line begins with
      +	 a literal space)				 the comma and a space)
      +
      + +Care must be taken, though, if the punctuation mark that begins the +line after FOOTNOTE OFF is a period (dot). You +must begin such lines with +\&., like this: +

      +

      +	end of a sentence\c
      +	.FOOTNOTE
      +	A footnote line.
      +	.FOOTNOTE OFF
      +	\&.  A new sentence...
      +
      + +If you omit the \&., the line will vanish! +

      +


      - Macro: FOOTNOTE <toggle> | INDENT LEFT | RIGHT | BOTH <indent value> + Tag: FOOTNOTE <toggle> | INDENT LEFT | RIGHT | BOTH <indent value>
      - *See
      HYPER-IMPORTANT NOTE!!! + *See HYPER-IMPORTANT NOTE!!!
      <indent value> requires a unit of measure
      @@ -1502,25 +2805,45 @@ The final word on the that comes immediately before FOOTNOTE MUST terminate with a \c -inline escape. Otherwise, the footnote marker for the word won't be attached to -it (i.e. mom will insert a word space between the word -and the marker). See the +inline escape if your +FOOTNOTE_MARKER_STYLE +is either STAR or NUMBER. +See the footnote example above. +

      +Additionally, the line after a FOOTNOTE +OFF should be entered as if there were no interruption in +the input text, i.e. the line should begin with a literal space or +punctuation mark. See +above. +

      +Do NOT use the \c inline escape if your +FOOTNOTE_MARKER_STYLE is LINE, or +if you have disabled footnote markers with +.FOOTNOTE_MARKERS +OFF. As well, the line after +FOOTNOTE OFF should be entered normally.

      Footnote control macros

        -
      1. Family/font/size/lead/quad +
      2. Family/font/size/colour/lead/quad
      3. Footnote markers -- on or off -
      4. Footnote marker style -- star+dagger or numbered +
      5. Footnote marker style -- star+dagger, numbered or by line number +
      6. Reset footnote number -- set footnote marker number to 1 +
      7. Inter-footnote spacing
      8. Footnote rule -- on or off
      9. Footnote rule length -- length of footnote separator rule
      10. Adjust vertical position of footnote separator rule

      -

      1. Family/font/size/quad/lead

      +

      1. Family/font/size/colour/lead/quad

      See Arguments to the control macros. @@ -1529,11 +2852,13 @@ See .FOOTNOTE_FAMILY default = prevailing document family; default is Times Roman .FOOTNOTE_FONT default = roman .FOOTNOTE_SIZE default = -2 (points) +.FOOTNOTE_COLOR default = black .FOOTNOTE_AUTOLEAD default = 2 points (typeset); single-spaced (typewrite) .FOOTNOTE_QUAD default = same as paragraphs

      2. Footnote markers -- FOOTNOTE_MARKERS

      +

      If you don't want footnote markers, in either the body of the document or beside footnote entries themselves, toggle them off with .FOOTNOTE_MARKERS OFF (or @@ -1541,8 +2866,14 @@ them off with .FOOTNOTE_MARKERS OFF (or you'll have to roll your own. If you want them back on, invoke .FOOTNOTE_MARKERS with no argument. Footnote markers are on by default. +

      +If FOOTNOTE_MARKERS are disabled, do NOT use the +\c inline escape to terminate the line before +.FOOTNOTE. +

      3. Footnote marker style -- FOOTNOTE_MARKER_STYLE

      +

      Mom gives you two choices of footnote marker style: star+dagger (see footnote behaviour @@ -1557,28 +2888,137 @@ numbers, both in the document body and in the footnote entries themselves. By default, footnote numbers increase incrementally (prev. footnote number + 1) throughout the whole document. You can ask mom to start each page's footnote numbers at 1 -with .RESET_FOOTNOTE_NUMBER (see below). +with .RESET_FOOTNOTE_NUMBER +(see below.) +

      +

      +.FOOTNOTE_MARKER_STYLE LINE lets you have +footnotes which are identified by line number, rather than by a +marker in the text. (Note that +NUMBER_LINES +must be enabled in order to use this marker style.) +

      +With FOOTNOTE_MARKER_STYLE LINE, mom +will identify footnotes either by single line numbers, or line +ranges. If what you want is a single line number, you need only +invoke .FOOTNOTE, without terminating the text +line before it with \c, at the appropriate +place in running text. +

      +If you want a range of line numbers (e.g. [5-11] ), +insert, directly into the first line of the range you want, the +inline escape, +\*[FN-MARK]. For the terminating line number of +the range, you need only invoke .FOOTNOTE, (again, +without attaching \c to the text line before it). +Mom is smart enough to figure out that where +FOOTNOTE was invoked represents the terminating +line number. Range-numbered footnotes are always output on the page +where FOOTNOTE was invoked, not the page where +\*[FN-MARK] appears (subject, of course, to the +rules for footnotes that fall too close to the bottom of a page, as +outlined +here). + +

      +Mom, by default, puts footnote line numbers inside +square brackets. The style of the brackets may be changed with +the macro, FOOTNOTE_LINENUMBER_BRACKETS, which +takes one of three possible arguments: PARENS +("round" brackets), SQUARE (the default) or +BRACES (curly braces). If you prefer a +shortform, the arguments, (, [ or +{ may be used instead. + +

      +If you don't want the numbers enclosed in brackets, you may tell +mom to use a "separator" instead. A common +separator would be the colon, but it can be anything you like. The +macro to do this is FOOTNOTE_LINENUMBER_SEPARATOR, +which takes, as its single argument, the separator you want. For +safety and consistency's sake, ALWAYS enclose the argument in +double-quotes. +

      +The separator can be composed of any legal groff character, or any +combination of characters. A word of caution: when +using a separator, mom doesn't insert a space +after the separator. Hence, if you want the space (you probably +do), you must make the space part of the argument you pass to +FOOTNOTE_LINENUMBER_SEPARATOR. For example, +to get a colon separator with a space after it, you'd do +

      +

      +	.FOOTNOTE_LINENUMBER_SEPARATOR ": "
      +
      -

      4. Reset footnote number -- RESET FOOTNOTE NUMBER

      +RUN-ON FOOTNOTES +

      +Finally, if your footnote marker style is LINE, you +may instruct mom to do "run-on style" footnotes. +Run-on footnotes do not treat footnotes as discrete entities, i.e. +on a line by themselves. Rather, each footnote is separated from +the footnote before it by a space, so that the footnotes on any +given page form a continuous block, like lines in a paragraph. The +macro to get +mom to run footnotes on is +.FOOTNOTES_RUN_ON. Invoked by itself, it turns +the feature on. Invoked with any other argument +(OFF, NO, etc.), it turns the +feature off. It is generally NOT a good idea to turn the feature +on and off during the course of a single document. If you do, +mom will issue a warning if there's going to be a +problem. However, it is always perfectly safe to enable/disable the +feature after +COLLATE. +

      +The usual reason for wanting run-on footnotes is that you're +using them to hold many, short references. (See +here +for instructions on using the groff program, +refer, to set up references.) + +

      + +

      4. Reset footnote number -- RESET_FOOTNOTE_NUMBER

      +

      .RESET_FOOTNOTE_NUMBER, by itself, resets footnote numbering so that the next footnote you enter is numbered 1.

      .RESET_FOOTNOTE_NUMBER PAGE tells mom to start every page's footnote numbering at 1. +

      -

      5. Footnote rule -- FOOTNOTE_RULE

      +

      5. Inter-footnote spacing -- FOOTNOTE_SPACE

      +

      +If you'd like a little extra space between footnotes, you can have +mom put it in for you by invoking +.FOOTNOTE_SPACE with an argument representing the +amount of extra space you'd like. The argument to +FOOTNOTE_SPACE requires a +unit of measure. +

      +In the following example, footnotes will be separated from each +other by 3 +points. +

      +	.FOOTNOTE_SPACE 3p
      +
      + +

      6. Footnote rule -- FOOTNOTE_RULE

      +

      If you don't want a footnote separator rule, toggle it off with .FOOTNOTE_RULE OFF (or END, QUIT, X...). Toggle it back on by invoking .FOOTNOTE_RULE with no argument. The default is to print the rule. +

      -

      6. Footnote rule length -- FOOTNOTE_RULE_LENGTH

      +

      7. Footnote rule length -- FOOTNOTE_RULE_LENGTH

      +

      If you want to change the length of the footnote separator rule, invoke .FOOTNOTE_RULE_LENGTH with a length, like this, -

       	.FOOTNOTE_RULE_LENGTH 1i
       
      @@ -1588,8 +3028,11 @@ which sets the length to 1 inch. Note that a is required. The default is 4 picas for both -printstyles. -

      7. Adjust vertical position of footnote separator rule -- FOOTNOTE_RULE_ADJ

      +PRINTSTYLES. +

      + +

      8. Adjust vertical position of footnote separator rule -- FOOTNOTE_RULE_ADJ

      +

      The footnote separator rule is actually a baseline rule that falls on the baseline @@ -1609,7 +3052,21 @@ raises the rule by 4-1/4 points. Note that you can only raise the rule, not lower it. A unit of measure is required. -
      +

      +Tip: If your document +leading +is 2 +points +or less (e.g your +point size +is 10 and your linespacing is 10, 11, or 12, lowering +mom's default footnote rule adjustment will +almost certainly give you nicer looking results than leaving +the adjustment at the default. Furthermore, you can invoke +FOOTNOTE_RULE_ADJ on any page in which footnotes +appear, or in any column, so that the placement of the footnote rule +can be changed on-the-fly, should you wish to do so. +


      @@ -1623,7 +3080,7 @@ is required.
    6. Tag: ENDNOTE
    7. Macro: ENDNOTES -- tell mom to output endnotes -
    8. ENDNOTE control macros +
    9. ENDNOTES control macros

      @@ -1641,27 +3098,66 @@ except that .FOOTNOTE has been replaced with .ENDNOTE <endnote about who the hell is Schelling> .ENDNOTE OFF - were generally the points of discussion presenting the most + were generally the points of discussion presenting the most of beauty to the imaginative Morella. As with footnotes, note the obligatory use of the \c -inline escape. +inline escape +when your +ENDNOTE_MARKER_STYLE +is NUMBER (which marks endnotes references in +running text +with superscript numbers). When the marker style is +LINE, you must not use the +\c escape. +

      +***Version 1.3 change*** +

      +As of version 1.3, the manner of entering the line after +.ENDNOTE OFF has changed to accommodate users' +differing wishes with respect to the order of punctuation and +endnote markers. The correct way to enter the line after +.ENDNOTE OFF--but NOT +if your +ENDNOTE_MARKER_STYLE +is LINE--is to input it as if it's literally +a continuation of the line before .ENDNOTE, and +therefore begins with either a space or a punctuation mark, as in +the two following examples. +

      + +

      +	   Example 1					  Example 2
      +	   ---------                      ---------
      +
      +	A line of text,\c				A line of text\c
      +	.ENDNOTE						.ENDNOTE
      +	A footnote line.				A footnote line.
      +	.ENDNOTE OFF					.ENDNOTE OFF
      +	 broken up with a comma.		, broken up with a comma.
      +
      +	(last line begins with			(last line begins with
      +	 a literal space)				 the comma and a space)
      +
      + +***End version 1.3 change***

      Endnotes differ from footnotes in two ways (other than the fact that endnotes come at the end of a document whereas footnotes appear in the body of the document):

        -
      1. Endnotes are always numbered incrementally throughout a - document. In other words, you don't get a choice of marker styles, - as you do with footnotes. +
      2. When your ENDNOTE_MARKER_STYLE is + NUMBER, endnotes are always numbered + incrementally, starting at "1".
      3. Endnotes MUST be output explicitly; mom does not output them for you. In collated documents, this allows you to choose whether you want the endnotes to appear at the end of each chapter or - section, or grouped together at the very end of the document. + article in a document, or grouped together at the very end + of the document.

      Within endnotes, you may use the document element tags @@ -1682,9 +3178,10 @@ to invoking QUOTE or BLOCKQUOTE, and undo them prior to terminating the endnote (i.e. before ENDNOTE OFF), otherwise the changes will affect subsequent quotes and blockquotes that appear in the document body as well. +

      Endnote behaviour

      -

      +
      When you output endnotes (with ENDNOTES), mom finishes processing the last page of your document, @@ -1697,7 +3194,7 @@ the centre part of the removed.

      By default, mom starts the endnotes page with a -bold, centered, double-underscored head, "ENDNOTES". +bold, centred, double-underscored head, "ENDNOTES". Underneath--flush left, bold, and underscored--she prints the document title (or, in the case of chapters, the chapter number or title). She then prints the endnotes. Each endnote is identified by its appropriate @@ -1716,18 +3213,19 @@ The attentive will notice that endnotes have an awful lot of control macros. This is because endnotes are like a mini-document unto themselves, and therefore need not be bound by the style parameters of the body of the document. +

      A Note on Endnote Spacing

      -

      +
      On the endnotes page(s), each new endnote is separated from the previous endnote by a full line space. This can result in a bottom margin that hangs, and is the one instance, other than the use of PARA_SPACE, where mom allows unequal bottom alignment of pages. Should you wish to correct this, by adding or subtracting small amounts -of space between endnotes that appear together on an endnote page, make +of space between endnotes that appear together on an endnotes page, make the adjustment (with ALD, RLD @@ -1736,25 +3234,28 @@ or at the end of each endnote (i.e. just before invoking ENDNOTE OFF) rather than at the top. +

      Endnotes and columnar documents

      -

      -At present, there is no way to set a document in columns (see -COLUMNS) -and then turn off column mode for endnotes. If your document is set in -columns, your endnotes will be, too.
      +Formerly (pre 1.1.6), there was no way to set a document in columns +(see +COLUMNS) +and then turn off column mode for endnotes. As of version 1.1.6, +you may now do so. See +ENDNOTES_NO_COLUMNS. +


      - Macro: ENDNOTE <toggle> + Macro: ENDNOTE <toggle>
      - *See
      HYPER-IMPORTANT NOTE!!! + *See HYPER-IMPORTANT NOTE!!!

      @@ -1770,23 +3271,36 @@ that you've finished the endnote. tag. Use PP only to introduce subsequent paragraphs.

      HYPER-IMPORTANT NOTE: -The final word on the +If your +ENDNOTE_MARKER_STYLE +is NUMBER (mom's default), the +final word on the input line that comes immediately before ENDNOTE MUST terminate with a \c -inline escape. Otherwise, the endnote number for the word won't be attached to -it (i.e. mom will insert a word space between the word -and the number). See the +inline escape. See the endnote example above. -
      +

      +Additionally, the line after +.ENDNOTE OFF should be entered as if there +were no interruption in the input text, i.e. the line should begin +with a literal space or punctuation mark. See the two +examples, +above. +

      +If your ENDNOTE_MARKER_STYLE is +LINE, do NOT use the \c escape, +and enter the line after .ENDNOTE OFF +normally. +


      -Macro: ENDNOTES +Tag: ENDNOTES

      Unlike footnotes, which mom automatically outputs at the @@ -1810,34 +3324,58 @@ appropriately, on a separate page prior to starting the next section of the document. Each subsequent invocation of ENDNOTES outputs only those endnotes that mom collected after the previous invocation. -
      +


      Endnote control macros

      -Every time you embed an endnote in the body of a document, -mom collects and processes the endnote for -later outputting when you invoke -ENDNOTES. -For this reason, endnote control macros should always be invoked prior -to the first instance of -ENDNOTE/ENDNOTE OFF. +VERY IMPORTANT NOTE!
      +Endnote control macros must always be invoked prior to the first +instance of +ENDNOTE/ENDNOTE OFF. +

      +When you embed endnotes in the body of a document, +mom collects and processes them for later +outputting (when you invoke +ENDNOTES). +By the time you do invoke ENDNOTES, it's much too +late to change your mind about how you want them to look. +

      +My advice? If you're planning to change the default appearance of +endnotes pages, set them up prior to +START. +

      1. General endnotes-pages style control
      2. Endnotes-page header/footer control -
      3. Endnotes-page head control + +
      4. Endnotes-page head (i.e. the title at the top) control
      5. Endnote document-identification title
          @@ -1847,6 +3385,12 @@ to the first instance of
      6. Endnotes-pages endnote numbering style
          +
        • Endnote marker style--by numbers in the text, or by line number +
        • Endnotes-pages endnote numbering style control
        • Endnote numbering alignment
            @@ -1859,7 +3403,7 @@ to the first instance of

            1. General endnotes page style control

            -

            Endnote family/font/quad

            +

            *Endnote family/font/quad

            See Arguments to the control macros. @@ -1867,14 +3411,16 @@ See

             .ENDNOTE_FAMILY    default = prevailing document family; default is Times Roman
             .ENDNOTE_FONT      default = roman
            -.ENDNOTE_QUAD      default = justified
            +.ENDNOTE_QUAD*     default = justified
            +
            +*Note: ENDNOTE_QUAD must be set to either L or J
             
            -

            Endnote point size

            +

            *Endnote point size

            -Macro: ENDNOTE_PT_SIZE <base type size of endnotes> +Macro: ENDNOTE_PT_SIZE <base type size of endnotes>

            Unlike most other control macros that deal with size of document @@ -1906,13 +3452,16 @@ the point size of other endnote page elements is calculated.

            The default for PRINTSTYLE TYPESET -is 12 points (the same default size used in the body of the document). +is 12.5 points (the same default size used in the body of the document). +

            -

            Endnote lead

            +

            *Endnote lead

            -Macro: ENDNOTE_LEAD <base leading of endnotes> +Macro: ENDNOTE_LEAD <base leading of endnotes> [ ADJUST ] +
            +*Does not require a unit of measure; points is assumed

            Unlike most other control macros that deal with leading of document @@ -1939,15 +3488,52 @@ points, whereas sets the base leading of type on the endnotes page to 1/2 inch.

            +If you want the leading of endnotes adjusted to fill the page, pass +ENDNOTE_LEAD the optional argument +ADJUST. (See +DOC_LEAD_ADJUST +for an explanation of leading adjustment.) +

            The default for PRINTSTYLE TYPESET -is 14 points. +is 14 points, adjusted. +

            +NOTE: Even if you give mom a +DOC_LEAD_ADJUST OFF command, she will still, by +default, adjust endnote leading. You MUST enter +ENDNOTE_LEAD <lead> with no +ADJUST argument to disable this default behaviour. +

            + + + +

            *Singlespace endnotes (TYPEWRITE only)

            +

            +Macro: SINGLESPACE_ENDNOTES <toggle> + +

            +If your +PRINTSTYLE +is TYPEWRITE and you use TYPEWRITE's default +double-spacing, endnotes are double-spaced. If your document is +single-spaced, endnotes are single-spaced. +

            +If, for some reason, you'd prefer that endnotes be single-spaced +in an otherwise double-spaced document (including double-spaced +collated +documents), invoke SINGLESPACE_ENDNOTES with +no argument. And if, god help you, you want to change endnote +single-spacing back to double-spacing for different spacing of +endnotes output at the ends of separate documents in a collated +document, invoke SINGLESPACE_ENDNOTES with any +argument (OFF, QUIT, Q, X...). +

            -

            Endnote paragraph indent

            +

            *Endnote paragraph indenting

            -Macro: ENDNOTE_PARA_INDENT <amount to indent first line of paragraphs in endnotes> +Macro: ENDNOTE_PARA_INDENT <amount to indent first line of paragraphs in endnotes>
            *Requires a unit of measure @@ -1969,12 +3555,13 @@ for (the one attached immediately to the identifying endnote number) is never indented. Only subsequent paragraphs are affected by ENDNOTE_PARA_INDENT. +

            -

            Endnote paragraph spacing

            +

            *Endnote paragraph spacing

            -Macro: ENDNOTE_PARA_SPACE <toggle> +Macro: ENDNOTE_PARA_SPACE <toggle>

            ENDNOTE_PARA_SPACE works exactly the same way as @@ -1988,11 +3575,107 @@ endnotes. NOTE: Each endnote itself is always separated from any previous endnote by a line space. ENDNOTE_PARA_SPACE refers only to paragraphs that appear within each discrete endnote. +

            + + + +

            *Turning off column mode during endnotes output

            +

            +Macro: ENDNOTES_NO_COLUMNS <toggle> + +

            +By default, if your document is +set in columns, +mom sets the endnotes in columns, too. However, +if your document is set in columns and you'd like the endnotes not +to be, just invoke ENDNOTES_NO_COLUMNS with no +argument. The endnotes pages will be set to the full page measure +of your document. +

            +If you output endnotes at the end of each document in a +collated +document set in columns, column mode will automatically +be reinstated for each document, even with +ENDNOTES_NO_COLUMNS turned on. +

            + + + +

            *Endnotes-pages page numbering style

            +

            +Macro: ENDNOTES_PAGENUM_STYLE DIGIT | ROMAN | roman | ALPHA | alpha + +

            +Use this macro to set the page numbering style of endnotes pages. +The arguments are identical to those for +PAGENUM_STYLE. +The default is digit. You may want to change it +to, say, alpha, which you would do with +

            +

            +	.ENDNOTES_PAGENUM_STYLE alpha
            +
            + + + +

            *Setting the first page number of endnotes pages

            +

            +Macro: ENDNOTES_FIRST_PAGENUMBER <page # that appears on page 1 of endnotes> + +

            +Use this macro with caution. If all endnotes for several +collated +documents are to be output at once, i.e. not at the end of each +separate doc, ENDNOTES_FIRST_PAGENUMBER tells +mom what page number to put on the first page of +the endnotes. +

            +If you set ENDNOTES_FIRST_PAGENUMBER in collated +documents where the endnotes are output after each separate doc, +you have to reset every separate document's first page number after +COLLATE +and before +START. +

            + + + +

            *Omitting a page number on the first page of endnotes

            +

            +Macro: ENDNOTES_NO_FIRST_PAGENUM <toggle> + +

            +This macro is for use only if FOOTERS are on. It +tells +ENDNOTES +not to print a page number on the first endnotes page. +Mom's default is to print the page number. +

            + + + +

            *Suspending pagination of endnotes pages

            +

            +Macro: SUSPEND_PAGINATION +
            +Macro: RESTORE_PAGINATION + +

            +SUSPEND_PAGINATION doesn't take an argument. +Invoked immediately prior to +ENDNOTES, +it turns off endnotes pages pagination. Mom +continues, however to increment page numbers silently. +

            +To restore normal document pagination after endnotes, invoke +RESTORE_PAGINATION (again, with no argument) +immediately after ENDNOTES.

            2. Endnotes-page header/footer control

            -If you wish to modify the header/footer that appears on endnotes -page(s), make the changes before you invoke + +If you wish to modify what appears in the header/footer that appears +on endnotes page(s), make the changes before you invoke ENDNOTES, not afterwards.

            @@ -2007,10 +3690,27 @@ title.) In most cases, this is what you want. However, should you the endnotes page(s) headers/footers, invoke ENDNOTES_HEADER_CENTER with no argument. - -

            Endnotes page(s) header/footer center string

            -Macro: ENDNOTES_HEADER_CENTER toggle +An important change you may want to make is to put the word +"Endnotes" in the header/footer centre position. +To do so, do +

            +

            +	.HEADER_CENTER "Endnotes"
            +	           or
            +	.FOOTER_CENTER "Endnotes"
            +
            + +prior to invoking .ENDNOTES. If your +DOCTYPE +is CHAPTER, you must also invoke +ENDNOTES_HEADER_CENTER +for the HEADER_CENTER to appear. +

            + +

            *Endnotes page(s) header/footer centre string

            +

            +Macro: ENDNOTES_HEADER_CENTER toggle

            If your @@ -2019,20 +3719,45 @@ is CHAPTER and you want mom to include a centre string in the headers/footers that appear on endnotes pages, invoke ENDNOTES_HEADER_CENTER (or ENDNOTES_FOOTER_CENTER) with no argument. -Mom's default is NOT to print the center string. +Mom's default is NOT to print the centre string. +

            +If, for some reason, having enabled the header/footer centre string +on endnotes pages, you wish to disable it, invoke the same macro +with any argument (OFF, QUIT, Q, X...).

            -If, for some -reason, having enabled the header/footer center string on endnotes -pages, you wish to disable it, invoke the same macro with any argument -(OFF, QUIT, Q, X...). -

            3. Endnotes page head control

            +

            *Allow headers on endnotes-pages

            +

            +Macro: ENDNOTES_ALLOWS_HEADERS <none> | ALL + +

            +By default, if HEADERS are on, mom +prints page headers on all endnotes pages except the first. If you +don't want her to print headers on endnotes pages, do +

            +

            +	.ENDNOTES_ALLOWS_HEADERS OFF
            +
            + +If you want headers on every page including the first, do +

            +

            +	.ENDNOTES_ALLOWS_HEADERS ALL
            +
            + +NOTE: If FOOTERS are on, +mom prints footers on every endnotes page. This is +a style convention. In mom, there is no such beast +as ENDNOTES_ALLOWS_FOOTERS OFF. +

            + +

            3. Endnotes-page first page head (title) control

            -

            Endnotes-page head string

            +

            *Endnotes-page first page head (title) string

            -Macro: ENDNOTE_STRING "<head to print at the top of endnotes>" +Macro: ENDNOTE_STRING "<head to print at the top of endnotes>"

            By default, mom prints the word "ENDNOTES" @@ -2043,28 +3768,29 @@ you don't want a head at the top of the first endnotes-page, invoke ENDNOTE_STRING with a blank argument (either two double-quotes side by side -- "" -- or no argument at all). +

            -

            Endnotes-page head control

            +

            *Endnotes-page first page head (title) control

            See Arguments to the control macros.

             .ENDNOTE_STRING_FAMILY    default = prevailing document family; default is Times Roman
            -.ENDNOTE_STRING_FONT*     default = bold
            -.ENDNOTE_STRING_SIZE      default = +1
            -.ENDNOTE_STRING_QUAD      default = centered
            +.ENDNOTE_STRING_FONT      default = bold
            +.ENDNOTE_STRING_SIZE*     default = +1
            +.ENDNOTE_STRING_QUAD      default = centred
             
             *Relative to the size of the endnotes text (set with ENDNOTE_PT_SIZE)
             
            -

            Endnotes-page head underscoring

            +

            *Endnotes-page head (title) underscoring

            -Macro: ENDNOTE_STRING_UNDERSCORE toggle | 2 +Macro: ENDNOTE_STRING_UNDERSCORE toggle | 2

            Invoked by itself, ENDNOTE_STRING_UNDERSCORE will @@ -2079,27 +3805,55 @@ head, therefore if you want no underscoring, you must insert NONE, etc.) into your document prior to outputting endnotes with ENDNOTES. + + +

            *Endnotes-page head (title) automatic capitalization

            +

            +Macro: ENDNOTE_STRING_CAPS toggle + +

            +Invoked by itself, ENDNOTE_STRING_CAPS will +automatically capitalize the endnotes-page head. Invoked with any +other argument, the macro disables automatic capitalization of the +head. +

            +If you're generating a table of contents, you may want the +endnotes-pages head string in caps, but the toc entry in caps/lower +case. If the argument to +ENDNOTE_STRING +is in caps/lower case and ENDNOTE_STRING_CAPS is +on, this is exactly what will happen. +

            +Mom's default is to capitalize the endnotes-pages +head string. +

            +

            4. Endnote document-identification title

            -

            Endnote document-identification title string

            +

            *Endnote document-identification title string

            -Macro: ENDNOTE_TITLE "<title to identify a document in endnotes>" +Macro: ENDNOTE_TITLE "<title to identify a document in endnotes>"

            By default, mom identifies the document(s) to which endnotes belong by the document title(s) given to the TITLE -macro. If you want her to identify the document(s) another way, -invoke ENDNOTE_TITLE with the identifying title you -want, surrounded by double-quotes. If you don't any identifying title, -invoke ENDNOTE_TITLE with a blank argument (either two -double-quotes side by side -- "" -- or no argument -at all). +macro. If you'd want her to identify the document(s) another way, +just invoke ENDNOTE_TITLE with the identifying +title you want, surrounded by double-quotes. +

            +If you don't want any identifying title, invoke +ENDNOTE_TITLE with a blank argument (either two +double-quotes side by side -- "" -- or no +argument at all). This is particularly useful if you have a single +(i.e. non-collated) document and find having the document's title +included in the endnotes redundant. +

            -

            Endnote document-identification title control

            +

            *Endnote document-identification title control

            See Arguments to the control macros. @@ -2115,27 +3869,126 @@ See -

            Endnote document-identification title underscoring

            +

            *Endnote document-identification title underscoring

            -Macro: ENDNOTE_TITLE_UNDERSCORE toggle +Macro: ENDNOTE_TITLE_UNDERSCORE toggle

            -Inovked by itself, ENDNOTE_TITLE_UNDERSCORE will -underscore the endnote document-identification title. Invoked with any -other argument, the macro disables underscoring of the title. +Invoked by itself, ENDNOTE_TITLE_UNDERSCORE will +underscore the endnote document-identification title(s). Invoked with any +other argument, the macro disables underscoring of the title(s).

            Mom's default is to underscore the document-identification title, therefore if you want no underscoring, you must insert .ENDNOTE_TITLE_UNDERSCORE OFF (or QUIT, X, NO, NONE, etc.) into your document prior to outputting endnotes with ENDNOTES. - -at all. +

            5. Endnotes-pages endnote numbering style

            -

            Endnote numbering style control

            +

            *Endnote marker style

            +

            +The macro to control how endnotes are referenced is +ENDNOTE_MARKER_STYLE. +

            +By default, mom places superscript numbers in +running text +to identify endnotes. However, if you have +line-numbering +turned on, you may instruct mom not to put +superscript numbers in the running text, but rather to reference +endnotes by line number. The command to do this is +

            +

            +	.ENDNOTE_MARKER_STYLE LINE
            +
            + +With ENDNOTE_MARKER_STYLE LINE, mom +will identify endnotes either by single line numbers, or line +ranges. If what you want is a single line number, you need only +invoke .ENDNOTE, without terminating the text +line before it with \c, at the appropriate +place in running text. (Should you wish to revert to +mom's default behaviour of placing a superscript +number in the text to identify an endnote, you can invoke +ENDNOTE_MARKER_STYLE with the argument, +NUMBER. It is not advisable to switch marker +styles within a single document, for aesthetic reasons, but there +is nothing to prevent you from doing so.) +

            +If you want a range of line numbers (e.g. [5-11] ), +insert, directly into the first line of the range you want, the +inline escape, +\*[EN-MARK]. For the terminating line number of +the range, you need only invoke .ENDNOTE, (again, +without attaching \c to the text line before it). +Mom is smart enough to figure out that where +ENDNOTE was invoked represents the terminating +line number. + +

            +Given the impossibility of knowing, in advance, the "string length" +of all the line numbers or ranges of line numbers that will be used +in endnotes (the string length of 12 is two; the string length +of 12-15 is 5), mom cannot "hang" line numbers +and guarantee that they, and the endnote text, will align in a +visually pleasing manner. Consequently, mom sets +the entirety of line-numbered endnotes completely flush left, +including the line numbers themselves. The line +numbers (by default, enclosed in square brackets) are separated from +the beginning of each endnote by a gap, so that a line-numbered +endnote looks approximately like this: +

            +

            +	[1-2]   Notwithstanding, Frye later asserts that Christianity
            +	is "a ghost  with the chains of a foul historical record of
            +	cruelty clanking behind it."
            +
            + +The default gap for PRINTSTYLE TYPESET and +PRINSTYLE TYPEWRITE is 1.5 +ems. +You can change the size of the gap with the macro, +ENDNOTE_LINENUMBER_GAP, which takes, as its single +argument, the size of the gap. The argument requires a +unit of measure, +so, for example, to change the gap to 2 +picas, +you'd do +

            +

            +	.ENDNOTE_LINENUMBER_GAP 2P
            +
            + + +By default, mom puts endnote line numbers inside +square brackets. The style of the brackets may be changed with +the macro, ENDNOTE_LINENUMBER_BRACKETS, which +takes one of three possible arguments: PARENS +("round" brackets), SQUARE (the default) or +BRACES (curly braces). If you prefer a +shortform, the arguments, (, [ or +{ may be used instead. + +

            +If you don't want the numbers enclosed in brackets, you may tell +mom to use a "separator" instead. A common +separator would be the colon, but it can be anything you like. The +macro to do this is ENDNOTE_LINENUMBER_SEPARATOR, +which takes, as its single argument, the separator you want. +(If the argument contains spaces, don't forget to enclose the +argument in double-quotes.) The separator can be composed of +any legal groff character, or any combination of characters. +For example, to get a colon separator after the line number in +line-numbered endnotes, you'd do +

            +

            +	.ENDNOTE_LINENUMBER_SEPARATOR :
            +
            + +

            *Endnote numbering style control

            See Arguments to the control macros. @@ -2152,7 +4005,7 @@ endnote numbers that appear in the body of the document(s). *Relative to the size of the endnotes text (set with ENDNOTE_PT_SIZE) -

            Endnote numbering alignment

            +

            *Endnote numbering alignment

            By default, mom hangs the numbers on endnotes pages, aligned right to two placeholders, producing this: @@ -2181,7 +4034,7 @@ The macros to alter this behaviour are

            - Macro: ENDNOTE_NUMBERS_ALIGN_RIGHT <number of placeholders> + Macro: ENDNOTE_NUMBERS_ALIGN_RIGHT <number of placeholders>

            ENDNOTE_NUMBERS_ALIGN_RIGHT takes one (non-optional) @@ -2203,7 +4056,8 @@ endnotes, you'd want to do to ensure that the numbers hang and are properly right-aligned. -
            +

            +


            @@ -2229,12 +4083,292 @@ comes out like this: sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. - -

            +

            Margin notes

            + + +

            +Margin notes are short annotations that appear in either the left +or right margin of a document. Sometimes they comment on the text. +Sometimes they assist in following the "flow" of a document by +summarizing the subject of a portion of text. Sometimes they're +comments to yourself in a draft copy. +

            +The margin notes macros and routines in om.tmac +(mom) are "mommified" versions of the margin notes +macros and routines written by Werner Lemberg and patched by Gaius +Mulley. +

            + +Margin notes behaviour +

            +First things first: before you enter your first margin note, you +must "initialize" margin notes with +MN_INIT. +MN_INIT sets up the style parameters for margin +notes, including things like +font, +family +and +leading. +

            +After initializing margin notes, you create margin notes with the +MN +macro. Based on the argument you pass MN, your +margin note will go in either the left or the right margin. +

            +Margin notes are tricky from a typographic standpoint with respect +to vertical placement. Since the leading of margin notes may +differ from that of +running text, +it's impossible for mom to guess whether to align +the first lines of margin notes with a document +baseline, +whether to align the last lines of margin notes with a document +baseline, or whether to center them, vertically, so that neither +first nor last line aligns with anything! +

            +Given this difficulty, mom always aligns the first +line of any margin note with a document baseline. If you want a +different behaviour, you must adjust the position(s) of margin +notes yourself, on a note by note basis. (See +Adjusting the vertical position of margin notes.) +

            +Generally speaking, mom tries to place margin +notes at the point where you invoke the tag, +MN. +However, in the event that a margin note runs deep, she may not +be able to place a subsequent margin note exactly where you want. +In such an instance, mom will "shift" the margin +note down on the page, placing it one (margin note) +linespace beneath the previous margin note (plus whatever vertical +space is required to get the first line to line up with a baseline +of running text). A warning will be issued, letting you know this +has happened, and where. +

            +Sometimes, if a margin note has to be shifted down, there simply +isn't enough room to start the margin note on the page on which +MN is invoked. In that case, mom +ignores the margin note entirely and issues a warning, letting you +know what she's done, and where. +

            +In the event that a margin note, sucessfully begun on a page, +runs past your bottom margin (or the last line before footnotes +begin), the margin note will "flow" onto the next page. If it is a +"left" margin note, it will continue in the left margin. If it is a +"right" margin note, it will continue in the right margin. +

            +If your document is being set in two columns, mom +will sensibly and automatically set all margin notes pertaining +to the left column in the left margin, and all margin notes +pertaining to the right column in the right margin, regardless of +the "direction" argument you give the MN tag. If +you try to use MN in documents of more than two +columns, mom will ignore all margin notes, and +issue warning for each. +

            +

            Adjusting the vertical position of margin notes

            +

            +When the +leading +of margin notes differs from the leading used throughout a document, +you may want to adjust the vertical position of individual margin +notes. This is most often going to be the case with margin notes +that end near the bottom of the page, where you want the last line of +the margin note to line up with the last line of text on the page. +

            +Adjustments to the vertical position of margin notes must be done +inside the margin note (i.e. after MN), at the +top, before entering text. The commands to use are +\!.ALD +(to lower the margin note), and +\!.RLD +(to raise it). The \! must precede the +macros, or they won't have any effect. + +

            +


            + + + +

            + + Macro: MN_INIT [ ragged | symmetric ] < left-width right-width gutter family+font point-size lead colour hyphenation-flags > + +

            +Before you enter your first margin note, you must initialize +all the parameters associated with margin notes with +MN_INIT. If you forget to do so, +mom will issue a warning and abort. +

            +The argument list is quite long; an +explanation of each argument follows. Any argument whose value you +want to be the default must be entered as "" (i.e. two +double-quotes with no space between them). Defaults for each +argument are given in the explanation below. +

            +[ ragged | symmetric ] +
            +If the first argument is "ragged", both left and right margin notes +will be flush left. If the first argument is "symmetric", left +margin notes will be set flush right, and right margin +notes will be set flush left. The effect is something +like this: +

            +

            +	     A left    This is a meaningless batch        A right
            +	margin note    of text whose sole purpose is      margin note
            +	  with just    to demonstrate how the sym-        with just
            +	a few words    metric argument to MN sets left    a few words
            +	     in it.    and right margin notes.            in it.
            +
            + + +If the argument is omitted, +or given as "", both left and right margin notes will be set +justified. (Justified is usually not a good idea, since the narrow +measure of margin notes makes pleasing justification a near +impossibility.) +

            +left-width +
            +The width of left margin notes. A +unit of measure +must be appended directly onto the argument. The default is to set +left margin notes right out to the edge of the page, which is +almost certainly not what you want, so you should give a value for +this argument if using left margin notes. +

            +right-width +
            +The width of right margin notes. A +unit of measure +must be appended directly onto the argument. The default is to set +right margin notes right out to the edge of the page, which is +almost certainly not what you want, so you should give a value for +this argument if using right margin notes. +

            +gutter +
            +The +gutter +between margin notes and +running text. +A +unit of measure +must be appended directly onto the argument. The gutter applies to +both left and right margin notes. The default is 1 +em. +

            +font +
            +The family+font for margin notes. Yes, that's right: the family +PLUS font combo. For example, if you want Times Roman Medium, +the argument must be TR. If you want Palatino Medium Italic, the +argument must be PI. The default is the same family+font combo used +for a document's paragraph text. +

            +lead +
            +The +leading +of margin notes. lead uses +points +as its unit of measure, so don't tack a unit of measure onto the +end of the argument. The default lead is the same leading as +is used for paragraph text (i.e. the document's base leading). +For convenience and clarity, you may also give the word, +DOC, to this argument, which indicates that the +leading should be the same as the document's base leading. +

            +colour +
            +The colour of margin notes. The colour must be pre-initialized +with +NEWCOLOR +or +XCOLOR. +The default is black. +

            +hyphenation-flags +
            +A number telling groff how you want margin notes +hyphenated. +

            +

            +	1 = hyphenate without restrictions
            +	2 = do not hyphenate the last word on the page
            +	4 = do not hyphenate the last two characters of a word
            +	8 = do not hyphenate the first two characters of a word
            +
            + +The values can be added together, so, for example, if you want +neither the first two nor the last two characters of words +hyphenated, the hyphenation-flag would be 12. The default value is +14 (i.e. 2+4+8). + +

            +


            + + + +

            + + Macro: MN LEFT|RIGHT | <anything> + +

            +Once you've initialized margin notes with +MN_INIT, +you can enter margin notes any time you like with +MN. An argument of LEFT will set +a left margin note. An argument of RIGHT will set +a right margin note. +

            +Any argument, such as OFF (or +QUIT, END, X, +etc) exits the current margin note. + +

            +


            + + + +

            Inserting a blank page into the document

            +

            + + Macro: BLANKPAGE <# of blank pages to insert> + + +

            +This one does exactly what you'd expect -- inserts a blank page into +the document. Mom silently increments the page +number of every blank page and keeps track of +recto/verso +stuff, but otherwise, does nothing. It's up to you, the user, to +figure out what to do with this feature. However, it's worth +noting that without it, inserting completely blank pages, to use +a vernacular Québécois phrase, "c'est pas évident" +(somewhere between "isn't easy", "isn't +obvious" and "isn't fun"). +

            +The argument to BLANK_PAGE is the number of blank +pages to insert. The argument is not optional, hence even if you +only want one blank page, you have to tell mom: +

            +

            +	.BLANKPAGE 1
            +
            +

            Terminate document processing

            • Tag: FINIS @@ -2243,18 +4377,586 @@ comes out like this:

              The use of FINIS is optional. If you invoke it -(at the end of a document, of course), mom turns off -footers -(if they're on) and page numbering (if page -numbers are at the bottom of the page) and deposits the word -END, centered after a blank line, beneath the last +(at the end of a document before +TOC +or +ENDNOTES), +mom +deposits the word END, centred after a blank line, beneath the last line of the document. END is enclosed between em-dashes.

              +Please note that in versions of +mom prior to 1.1.9, FINIS used to +turn off +footers +(if they were on) and page numbering (if page numbers were at the +bottom of the page). Damned if I can recall why I thought anyone +would want this behaviour, but it has been removed. +

              If you're writing in a language other than English, you can change what mom prints for END with the control macro FINIS_STRING. +

              +


              + + + +

              Table of contents

              + + +

              +Want a table of contents for your document? Easy. Just enter +

              +

              +	.TOC
              +
              + +as the very last macro of your document file. Mom +will have picked up all document titles (in +collated +documents), all heads, subheads, and paragraph heads, as well as any +endnotes pages that have been output, and assigned them the +appropriate page number (and page numbering style). Talk about a +no-brainer! + +That said, tables of contents (tocs) have even more control macros +than endnotes. As always, the reason for so many control macros is +so that if you want to change just about any aspect of the toc's +typographic appearance, you can. Mom is all about +simplicity AND flexibility. +

              + +

              TOC behaviour

              +

              +When you output a toc (with +TOC), +mom finishes processing the last page of your document, +then breaks to a new page for printing the toc. +

              +Mom follows standard typesetting conventions for +tables of contents. To this end, if +HEADERS +are on for the document, the first page of the toc has no page +header, but does have a first page (roman numeral) number, always +"1", in the bottom margin. If +FOOTERS +are on for the document, the first page has neither a footer, nor a +page number in the top margin. (If you absolutely must have a page +footer on the first page of the toc, simply invoke +FOOTER_ON_FIRST_PAGE +immediately before TOC.) Subsequent toc pages have +both page headers or footers and a page number. +

              +Entries in the toc are hierarchically indented, as you would +expect. By default, each type of entry (e.g. a head or a subhead) +is set in a different font as well. If any of heads, subheads or +paragraph heads are numbered in the body of the document, they are +also numbered in the toc. Head numbering in the toc is NOT +concatenated as it is in the body of the document, which would be +visually redundant in a toc. +

              +Tocs are never set in columns, regardless of whether the rest of +the document is. Lastly, if +recto/verso +printing is enabled, the toc respects it. This sometimes leads to +tocs that begin with the wrong margins, but the margins can be +corrected either by outputting a +BLANKPAGE +or by using the toc control macro +TOC_RV_SWITCH. +

              +The overall toc +family, +point size +and +lead +can be altered with the toc +control macros, +as can the family, +font, +point size and indent of each type of toc entry (i.e. title, head, +subhead, paragraph head). Furthermore, the page numbering style +can be changed, as can the amount of visual space reserved for toc +entry page numbers. +

              + + + +


              +

              +Macro: TOC + +

              +If you want a toc, just put TOC as the last macro +in a document. Mom takes care of the rest. +

              +


              + +

              TOC control macros

              +

              +Toc entries are not actually processed when mom +collects them, so you can put any toc control macros anywhere you +like in your document. Some may prefer to place them at the top of +the file. Others may prefer to place them just before outputting +the toc. The choice is yours.
              +

                +
              1. General toc page style control + +
              2. Toc page numbering + +
              3. Changing the toc header (title), string and style + +
              4. Changing the style for toc entries + +
              5. Additional toc control macros + +
              +
              + +

              1. General toc page style control

              + +

              *Toc family

              +

              +See +Arguments to the control macros. +

              +Set the family of toc pages with TOC_FAMILY, which +establishes the default family for every element of a toc page, +including the toc title ("Contents") and the page number +in the top or bottom margin. The default is the prevailing document +family. +

              +All elements on a toc page also have their own _FAMILY +control macros, which override the default set by +TOC_FAMILY. +

              + + + +

              *Toc point size

              +

              +Macro: TOC_PT_SIZE <base type size of the toc> + +

              +Unlike most other control macros that deal with size of document +elements, TOC_PT_SIZE takes as its argument an +absolute value, relative to nothing. Therefore, the argument +represents the size of toc type in +points, +unless you append an alternative +unit of measure. +For example, +

              +

              +	.TOC_PT_SIZE 12
              +
              + +sets the base point size of type for the toc to 12 points, whereas +

              +

              +	.TOC_PT_SIZE .6i
              +
              + +sets the base point size of type for the toc to 1/6 of an inch. +

              +The type size set with TOC_PT_SIZE forms the basis +from which the point size of other toc page elements are calculated. +

              +The default for +PRINTSTYLE TYPESET +is 12.5 points (the same default size used in the body of the +document). +

              + + + +

              *Toc lead

              +

              +Macro: TOC_LEAD <leading of the toc> [ ADJUST ] +
              +*Does not require a unit of measure; points is assumed + +

              +Unlike most other control macros that deal with leading of document +elements, TOC_LEAD takes as its argument an +absolute value, relative to nothing. Therefore, the argument +represents the +leading +of tocs in +points +unless you append an alternative +unit of measure. +For example, +

              +

              +	.TOC_LEAD 14
              +
              + +sets the base leading of type on the endnotes page to 14 +points, whereas +

              +

              +	.TOC_LEAD .5i
              +
              + +sets the base leading of type on the endnotes page to 1/2 inch. +

              +If you want the leading of toc pages adjusted to fill the +page, pass TOC_LEAD the optional argument +ADJUST. (See +DOC_LEAD_ADJUST +for an explanation of leading adjustment.) +

              +The default for +PRINTSTYLE TYPESET +is the prevailing document lead (16 by default), adjusted. +

              +NOTE: Even if you give mom a +DOC_LEAD_ADJUST OFF command, she will still, by +default, adjust toc leading. You MUST enter +TOC_LEAD <lead> with no +ADJUST argument to disable this default behaviour. +

              +ADDITIONAL NOTE: Tocs are always double-spaced in +PRINTSTYLE TYPEWRITE, regardless of whether the +body of the document is single-spaced. + +

              2. Toc page numbering

              +

              +The page numbering of toc pages is controlled by the same macros +that control +document page numbering, +except +PAGENUM +(tocs always start on page 1). The defaults are the same as the +rest of the document. +

              +If you wish to change some aspect of toc pagination, use the +document pagination control macros immediately prior to +.TOC. +

              +A special macro, +TOC_PAGENUM_STYLE +controls the style of toc pages page numbers. +

              + +


              + + + +

              + + Macro: PAGINATE_TOC <toggle> + +

              +By default, mom paginates the toc. If you'd like +her not to, do +

              +

              +	.PAGINATE_TOC OFF
              +
              + +NOTE: Simply invoking PAGINATION +OFF or PAGINATE OFF disables toc +pagination for the first toc page only. You MUST use +.PAGINATE_TOC OFF to disable toc pagination, even +if pagination is turned off elsewhere in your document. +

              + +


              +

              + + + + + Macro: TOC_PAGENUM_STYLE <DIGIT | ROMAN | roman | ALPHA | alpha> + +

              +By default, mom uses roman numerals to number +toc pages. Use TOC_PAGENUM_STYLE if you'd prefer +something else. For example, to have standard digits instead of +roman numerals, do the following: +

              +

              +	.TOC_PAGENUM_STYLE DIGIT
              +
              + +
              + +

              3. Changing the toc header (title) string and style

              +

              +The toc header string is the title that appears at to top of the +toc. By default, it's "Contents". If you'd like +something else, say, "Table of Contents", do +

              + +

              +	.TOC_HEADER_STRING "Table of Contents"
              +
              + + +The style of the toc header (title) is managed by the usual control +macros (see +arguments to the control macros). +

              +

              +	.TOC_HEADER_FAMILY  default = prevailing doc family (Times Roman in TYPEWRITE)
              +	.TOC_HEADER_FONT    default = bold
              +	.TOC_HEADER_SIZE    default = +4
              +	.TOC_HEADER_QUAD    default = left
              +
              + +

              4. Changing the style for toc entries

              +

              +"Toc entries" refers to titles, heads, subheads and +paragraph heads as they appear in the toc. Their style is managed +by the usual +control macros, +starting with TOC_ +

              + +

              The toc _INDENT control macros

              +

              +The toc control macros that end in _INDENT all take a single +argument that requires a +unit of measure. +The argument is the distance to indent the entry, always measured +from the left margin. For example, +

              +

              +	.TOC_HEAD_INDENT 2P
              +
              + +indents head entries 2 +picas +from the left margin. +

              + +

              *Changing the style for toc title entries

              +

              +(See +arguments to the control macros). +

              +Toc title entries are the titles of documents that have been +collated +together. +

              +

              +	.TOC_TITLE_FAMILY  default = prevailing doc family (Times Roman in TYPEWRITE)
              +	.TOC_TITLE_FONT    default = bold italic
              +	.TOC_TITLE_SIZE    default = +0
              +	.TOC_TITLE_INDENT  default = 0 for TYPESET and TYPEWRITE
              +
              + +

              *Changing the style for toc head entries

              +

              +(See +arguments to the control macros). +

              +Toc head entries are main heads that appear in the body of a +document. +

              +

              +	.TOC_HEAD_FAMILY  default = prevailing doc family (Times Roman in TYPEWRITE)
              +	.TOC_HEAD_FONT    default = bold
              +	.TOC_HEAD_SIZE    default = +.5
              +	.TOC_HEAD_INDENT  default = 18p for TYPESET; 2m for TYPEWRITE
              +
              + +

              *Changing the style for toc subhead entries

              +

              +(See +arguments to the control macros). +

              +Toc subhead entries are subheads that appear in the body of a +document. +

              +

              +	.TOC_SUBHEAD_FAMILY  default = prevailing doc family (Times Roman in TYPEWRITE)
              +	.TOC_SUBHEAD_FONT    default = roman
              +	.TOC_SUBHEAD_SIZE    default = +0
              +	.TOC_SUBHEAD_INDENT  default = 30p for TYPESET; 4m for TYPEWRITE
              +
              + +

              *Changing the style for toc paragraph head entries

              +

              +(See +arguments to the control macros). +

              +Toc paragraph head entries are paragraph heads that appear in the +body of a document. +

              +

              +	.TOC_PARAHEAD_FAMILY  default = prevailing doc family (Times Roman in TYPEWRITE)
              +	.TOC_PARAHEAD_FONT    default = italic
              +	.TOC_PARAHEAD_SIZE    default = +0
              +	.TOC_PARAHEAD_INDENT  default = 42p for TYPESET; 6m for TYPEWRITE
              +
              + +

              *Changing the style for toc paragraph page number listings

              +

              +(See +arguments to the control macros). +

              +Toc paragraph head entries are paragraph heads that appear in the +body of a document. +

              +

              +	.TOC_PN_FAMILY  default = prevailing doc family (Times Roman in TYPEWRITE)
              +	.TOC_PN_FONT    default = roman
              +	.TOC_PN_SIZE    default = +0
              +
              + +

              5. Additional toc macros

              +

              +The following macros allow you to switch page margins should +they be incorrect for recto/verso printing, to establish how +many placeholders to leave for page listings, and to have +mom append author(s) to toc title entries. +

              + +


              + + + +

              + + Macro: TOC_RV_SWITCH + +

              +TOC_RV_SWITCH doesn't take an argument. It simply +instructs mom to switch the left and right margins +of +recto/verso +documents should the toc happen to begin on an even page when you +want an odd, or vice versa. +

              +The same result can be accomplished by outputting a +BLANKPAGE. +

              + +


              + + + +

              + + Macro: TOC_TITLE_ENTRY <"alternate wording for a title entry in the toc"> + +

              +In +collated +documents, the title of each separate document appears in the table +of contents. It may sometimes happen that you don't want the title +as it appears in the toc to be the same as what appears in +the +docheader. +You might, for example, want to shorten it. Or, in the case of +chapters where the docheader contains both a chapter number and a +chapter title, like this +

              +

              +	           Chapter 6
              +	Burning Bush -- Maybe God Was Right
              +
              + +you might want only the chapter title, not the chapter number, to +show up in the toc. (By default, TOC generates +both.) +

              +If you want to change the wording of a title entry in the toc, +simply invoke TOC_TITLE_ENTRY with the desired +wording, enclosed in double-quotes. Using the example, above, +

              +

              +	.CHAPTER 6
              +	.CHAPTER_TITLE "Burning Bush -- Maybe God Was Right"
              +	.TOC_TITLE_ENTRY "Burning Bush"
              +	.DOCTYPE CHAPTER
              +
              + +would identify chapter 6 in the toc simply as "Burning +Bush". + +

              + +


              + + + +

              + + Macro: TOC_APPENDS_AUTHOR <none> | <"name(s) of authors"> + +

              +In certain kinds of collated documents, different authors are +responsible for the articles or stories contained within them. In +such documents, you may wish to have the author or authors +appended to the toc's title entry for each story or article. +

              +If you invoke TOC_APPENDS_AUTHOR with no argument, +mom appends the first argument you passed to +AUTHOR +to toc title entries, separated by a front-slash. +

              +If you invoke TOC_APPENDS_AUTHOR with an argument +(surrounded by double-quotes), mom will append it +to the toc title entries instead. This is useful if you have +multiple authors you wish to identify by last name only. For +example, if three authors--Joe Blough, Jane Doe, and John +Deere--are responsible for a single article +

              +

              +	.TOC_APPENDS_AUTHOR "Blough et al."
              +
              + +would be a good way to identify them in the toc. +

              + +


              + + + +

              + + Macro: TOC_PADDING <# of placeholders to allow for page number listings> + +

              +By default, mom allows room for 3 digits in the +page number listings of tocs. If you'd like some other number of +placeholders, say 2, do +

              +

              +	.TOC_PADDING 2
              +
              @@ -2266,7 +4968,11 @@ the control macro FINIS_STRING.

              The use of FINIS is optional, but if you use -it, it should be the last macro you invoke in a document. See +it, it should be the last macro you invoke in a document (before +ENDNOTES +or +TOC). +See above for a description of how FINIS behaves.

              @@ -2309,11 +5015,22 @@ a blank string, i.e. mom will still print the em-dashes if you invoke FINIS. This, in effect, produces a -short, centered horizontal rule that terminates the document. +short, centred horizontal rule that terminates the document. (In PRINTSTYLE TYPEWRITE, it's a short, dashed line composed of four hyphens.) +

              Changing the FINIS colour

              +

              +Invoking FINIS_COLOR with a pre-defined (or +"initalized") color changes the colour of both the FINIS +string and the em-dashes that surround it. If you use the +inline escape, +\*[<colorname>], +in the argument passed to FINIS, only the text +will be in the new colour; the em-dashes will be in the default +document colour (usually black). +


              Next   diff --git a/contrib/groff/contrib/mom/momdoc/docprocessing.html b/contrib/groff/contrib/mom/momdoc/docprocessing.html index 04475372b5ea..6f64d68d9599 100644 --- a/contrib/groff/contrib/mom/momdoc/docprocessing.html +++ b/contrib/groff/contrib/mom/momdoc/docprocessing.html @@ -1,3 +1,4 @@ + @@ -7,22 +8,23 @@ -Next   -Prev   +Next   +Prev   Back to Table of Contents - +

              -

              DOCUMENT PROCESSING WITH MOM -

              +

              DOCUMENT PROCESSING WITH MOM

              - Introduction to document processing
              Some document defaults -

              +
              * IMPORTANT NOTE on leading/spacing and bottom margins * -

              +
              +The SHIM macro +
              +

              Table of Contents for document processing

              +

              Introduction to document processing

              -

              + As explained in Document processing with mom, document processing uses markup tags to identify document elements -like heads, paragraphs, and so on. The tags are, of course, macros, +such as heads, paragraphs, and so on. The tags are, of course, macros, but with sensible, readable names that make them easy to grasp and easy to remember. (And don't forget: if you don't like the "official" name of a tag -- too long, cumbersome @@ -224,13 +234,13 @@ Setting up a mom doc is a simple, four-part procedure. You begin by entering information about the document itself (title, subtitle, author, etc.). Next, you tell mom what kind of document you're creating (e.g. chapter, letter, abstract, -etc...) and what kind of output you want (typeset, typewrittten, +etc...) and what kind of output you want (typeset, typewritten, draft-style, etc). Thirdly, you make as many or as few changes to mom's default behaviour as you wish. Lastly, you invoke the START macro. Voilà! You're ready to write. -
              +


              @@ -248,7 +258,7 @@ documentation. Just in case, here they are.
            • the left and right margins are 1-inch
            • the top and bottom margins for document text are plus/minus visually 1-inch -
            • pages are numbered; the number appears centered, at the +
            • pages are numbered; the number appears centred, at the bottom, surrounded by hyphens ( e.g. -6- )
            • the first page of a document begins with a document header @@ -261,7 +271,7 @@ Another way to check up on document processing defaults is to have a look at the macro file (om.tmac). Each macro is preceded by a description that (generally) says what its default is (if it has one). -
              +


              @@ -277,11 +287,11 @@ short). In order to ensure even bottom margins, mom uses the "base" document leading -in effect at the start of each page (i.e. the leading used -in paragraphs) to calculate the spacing of every document element. -Prior to invoking +in effect at the start of running text on each page (i.e. +the leading used in paragraphs) to calculate the spacing of every +document element. Prior to invoking START, -this is done with the +this is set with the typesetting macro LS, afterwards with the document @@ -310,15 +320,80 @@ since "v" accepts decimal fractions, you can add/subtract half linespaces and quarter linespaces with "v" as well, provided you compensate for the fractional linespace somewhere else on the page. -
              +

              +If all this seems like too much work, mom +provides a special macro to get you out of trouble if you've played +around with leading and/or spacing. The macro is called +SHIM (like those little pieces of wood carpenters +use to get their work even, level and snug), and it's described +below. +

              + + + +


              +

              + +Macro: SHIM + +

              +SHIM doesn't take any argument. Use it whenever +you've played around with the +leading +or spacing on a page and you +need to get mom's document leading back on track. +

              +For example, say you want to insert a picture into a document with +the special groff macro, PSPIC (see the +groff_tmac man page for usage). +

              +Pictures aren't usually conveniently sized in multiples of document +leading, which means that when you insert the picture, you disrupt +mom's ordered placement of baselines on the page. +This will certainly result in a bottom margin that doesn't match the +bottom margins of your document's other pages. +

              +The solution is to insert SHIM after the picture, +like this: +

              +

              +	<some lines of text>
              +	.PSPIC <full path to picture>
              +	.SHIM
              +	<more lines of text>
              +
              +SHIM instructs mom to insert as +much or a little space after the picture as is needed to ensure that +the baseline of the next +output line +falls where mom would have put it had you not +disrupted the normal flow of output lines with the picture. +

              +And say, on previewing the above example, you find that the picture +doesn't centre nicely between the lines of text, you can always do +

              +

              +	<some lines of text>
              +	.RLD 3p
              +	.PSPIC <full path to picture>
              +	.SHIM
              +	<more lines of text>
              +
              + +to raise the picture slightly +(Reverse LeaD +3 points; see +RLD), +and still have SHIM ensure that text underneath +falls exactly where it's supposed to. +


              Document setup

              - +

              Tutorial -- Setting up a mom document

              -

              There are four "parts" to setting up a mom doc (three, actually, with one optional). Before we proceed, though, be reassured that something as simple as @@ -366,11 +441,17 @@ some reference information. The reference macros are:

              • TITLE +
              • DOCTITLE +
              • COVERTITLE
              • SUBTITLE
              • AUTHOR
              • CHAPTER -- the chapter number
              • DRAFT -- the draft number
              • REVISION -- the revision number +
              • COPYRIGHT -- only used on cover pages +
              • MISC -- only used on cover pages +
              • COVER_TITLE -- only on cover pages; only if needed +
              • DOC_COVER_TITLE -- only on document cover pages; only if needed

              You can use as many or as few as you wish, although at a minimum, @@ -440,7 +521,10 @@ here to change mom's document defaults (paper size, margins, family, point size, line space, rag, etc), or any of the document processing macros that set/change/control the appearance of document elements. Think of this as the -"style-sheet " section of a document. +"style-sheet " section of a document. And please note: +you MUST give mom a +PRINTSTYLE +directive before making any such changes.

              Joe Blow wants his story printed in Helvetica, 12 on 14, rag right, with @@ -467,7 +551,7 @@ The setup for Joe Blow's story now looks like this: .FAMILY H .PT_SIZE 12 .LS 14 - .QUAD LEFT \"ie. rag right + .QUAD LEFT \"i.e. rag right .FOOTERS .LINEBREAK_CHAR * @@ -494,7 +578,7 @@ Here's the complete setup for My Pulitzer Winner: .FAMILY H .PT_SIZE 12 .LS 14 - .QUAD LEFT \"ie. rag right + .QUAD LEFT \"i.e. rag right .FOOTERS .LINEBREAK_CHAR * \# @@ -548,7 +632,7 @@ number of drafts already, J. Blow may very well decide his as well leave in the superfluous macros. That way, when draft 7, rev. 62 becomes draft 8, rev. 1, he'll be ready to tackle his Pulitzer winner again. -
              +


              @@ -559,31 +643,38 @@ winner again. The reference macros give mom the information she needs to generate -docheaders +docheaders, +page headers, and -page headers. They -must go at the top of any file that uses mom's +covers. +They must go at the top of any file that uses mom's document processing macros. - +

              Reference macros list

              +

              -Macro: TITLE "<title>" +Macro: TITLE "<title>"
              *Argument must be enclosed in double-quotes @@ -605,14 +696,61 @@ the title always gets converted to caps. DOCTYPE is CHAPTER, TITLE should be the title of the opus, not "CHAPTER whatever". +

              + + + +


              +

              + +Macro: DOCTITLE "<overall document title>"
              +*Argument must be enclosed in double-quotes + +

              +NOTE: This macro should be used only if your +DOCTYPE +is DEFAULT (which is mom's +default). +

              +When you're creating a single document, say, an essay or a short +story, you have no need of this macro. +TITLE +takes care of all your title needs. +

              +However if you're +collating +a bunch of documents together, say, to print out a report containing +many articles with different titles, or a book of short stories, you +need DOCTITLE. +

              +DOCTITLE tells mom the title +of the complete document (as opposed to the title of each article +or entitled section). +

              +The doctitle string can be caps or caps/lower-case; it's up to you. +In +PRINTSTYLE TYPESET, +by default, the doctitle appears in the rightmost position of +page headers, +all in caps unless you turn that feature off (see +HEADER_<POSITION>_CAPS). In +PRINTSTYLE TYPEWRITE, +the doctitle always gets converted to caps. +

              +NOTE: If your +DOCTYPE +is CHAPTER, you don't need +DOCTITLE. TITLE takes care of +everything. +


              -Macro: SUBTITLE "<subtitle>" +Macro: SUBTITLE "<subtitle>"
              *Argument must be enclosed in double-quotes @@ -621,16 +759,16 @@ The subtitle string can be caps or caps/lower-case. Since a document's subtitle appears only in the docheader, and the title is most likely in caps, I recommend caps/lower case. -
              +


              -Macro: AUTHOR "<author string>" [ "<author2 string>" "<author3 string>" ... ] +Macro: AUTHOR "<author string>" [ "<author2 string>" "<author3 string>" ... ]
              -*Multiple arguments must be enclosed in double-quotes +*Multiple arguments must all be enclosed in double-quotes

              Each author string can hold as many names as you like, e.g. @@ -653,14 +791,14 @@ authors), redefine the appropriate part of the header (see

              The strings can be caps or caps/lower-case. I recommend caps/lower case. -
              +


              -Macro: CHAPTER <chapter number> +Macro: CHAPTER <chapter number>

              The chapter number can be in any form you like -- a digit, a roman @@ -673,15 +811,19 @@ single line She also puts the same thing in the middle of page headers.

              +Please note that if your argument to CHAPTER runs +to more than one word, you must enclose the argument in +double-quotes. +

              If you're not using DOCTYPE CHAPTER, the macro serves no purpose and mom ignores it.

              -CHAPTER_STRING +CHAPTER_STRING

              If you're not writing in English, you can ask mom -to use the word for chapter in your own language by telling -her what it is with the CHAPTER_STRING macro, -like this: +to use the word for "chapter" in your own language by +telling her what it is with the CHAPTER_STRING +macro, like this:

               	.CHAPTER_STRING "Chapître"
              @@ -690,19 +832,21 @@ like this:
               You can also use CHAPTER_STRING if you want
               "CHAPTER" instead of "Chapter" in the doc- and
               page-headers.
              -
              +


              -Macro: CHAPTER_TITLE "<chapter title>" +Macro: CHAPTER_TITLE "<chapter title>" +
              +*Argument must be enclosed in double-quotes

              If, either in addition to or instead of "Chapter #" appearing at the top of chapters, you want your chapter to have a title, use -CHAPTER_TITLE with your title enclosed in +CHAPTER_TITLE, with your title enclosed in double-quotes, like this:

              @@ -711,8 +855,8 @@ double-quotes, like this:
               
               If you've used
               CHAPTER to give the chapter a number,
              -"Chapter #" and the title will appear at the top of the
              -chapter, like this:
              +both "Chapter #" and the chapter title will appear at the
              +top of the chapter, like this:
               

                                      Chapter 1
              @@ -720,75 +864,245 @@ chapter, like this:
               
              In such a case, by default, only the chapter's title will appear in the -page headers, not "Chapter #". +page headers, +not "Chapter #".

              If you omit CHAPTER when setting up your reference macros, only the title will appear, both at the top of page one and in subsequent page headers. -
              +

              +The style of the chapter title can be altered by +control macros, +e.g. CHAPTER_TITLE_FAMILY, +CHAPTER_TITLE_FONT, etc. The default family, +font and point size are Times Roman, Bold Italic, 4 points larger +than +running text. +


              -Macro: DRAFT <draft #> +Macro: DRAFT <draft #>

              DRAFT only gets used with COPYSTYLE DRAFT. If the COPYSTYLE is FINAL (the default), mom ignores DRAFT. -DRAFT only accepts a -numeric argument. +DRAFT accepts both alphabetic and numeric +arguments, hence it's possible to do either

              -Mom prints the draft number beside the word -"Draft" in the middle part of +

              +	.DRAFT 2
              +	   or
              +	.DRAFT Two
              +
              + +Mom prints the argument to .DRAFT +(i.e. the draft number) beside the word "Draft" in the +middle part of page headers.

              -DRAFT STRING +A small word of caution: If your argument to +.DRAFT is more than one word long, you must +enclose the argument in double-quotes. +

              +You may, if you wish, invoke .DRAFT without an +argument, in which case, no draft number will be printed beside +"Draft" in headers or footers. +

              +DRAFT_STRING

              If you're not writing in English, you can ask mom -to use the word for draft in your own language by telling -her what it is with the DRAFT_STRING macro, +to use the word for "draft" in your own language by +telling her what it is with the DRAFT_STRING macro, like this:

               	.DRAFT_STRING "Jet"
               
              +Equally, DRAFT_STRING can be used to roll your own +solution to something other than the word "Draft." For +example, you might want "Trial run alpha-three" to appear +in the headers of a draft version. You'd accomplish this by doing +

              +

              +	.DRAFT alpha-three
              +	.DRAFT_STRING "Trial run
              +
              + +.DRAFT without an argument, above, ensures that +only the DRAFT_STRING gets printed. +

              +NOTE: If you define both a blank .DRAFT +and a blank .DRAFT_STRING, mom +skips the draft field in headers entirely. If this is what you +want, this is also the only way to do it. Simply leaving out +.DRAFT and .DRAFT_STRING will +result in mom using her default, which is to print +"Draft 1". +

              +


              -Macro: REVISION <revision #> +Macro: REVISION <revision #>

              REVISION only gets used with COPYSTYLE DRAFT. If the COPYSTYLE is FINAL (the default), mom ignores the -REVISION macro. REVISION only -accepts a -numeric argument. +REVISION macro. REVISION accepts +both alphabetic and numeric arguments, hence it's possible to do +either

              +

              +	.REVISION 2
              +	   or
              +	.REVISION Two
              +
              + Mom prints the revision number beside the shortform "Rev." in the middle part of page headers.

              -REVISION STRING +A small word of caution: If your argument to +.REVISION is more than one word long, you must +enclose the argument in double-quotes. +

              +You may, if you wish, invoke .REVISION without an +argument, in which case, no revision number will be printed beside +"Rev." in headers or footers. +

              +REVISION_STRING

              If you're not writing in English, you can ask mom -to use the word for revision, or a shortform therof in your own language -by telling her what it is with the REVISION_STRING -macro, like this: +to use the word for "revision," or a shortform +thereof, in your own language by telling her what it is with the +REVISION_STRING macro, like this:

               	.REVISION_STRING "Rév."
               
              -
              +Additionally, you may sometimes want to make use of +mom's +COPYSTYLE DRAFT +but not actually require any draft information. For example, you +might like mom to indicate only the revision number +of your document. The way to do that is to define an empty +.DRAFT and .DRAFT_STRING in +addition to .REVISION, like this: +

              +

              +	.DRAFT
              +	.DRAFT_STRING
              +	.REVISION 2
              +
              + +

              +Equally, if you want to roll your own solution to what revision +information appears in headers, you could do something like this: +

              +	.DRAFT
              +	.DRAFT_STRING
              +	.REVISION "two-twenty-two"
              +	.REVISION_STRING "Revision"
              +
              + +

              +The above, naturally, has no draft information. If you want to +roll your own .DRAFT and/or +.DRAFT_STRING as well, simply supply arguments to +either or both. +

              + + + +


              +

              + +Macro: COPYRIGHT "<copyright info>" +
              +*Argument must be enclosed in double-quotes + +

              +The argument passed to COPYRIGHT is only used on +cover or doc cover pages, and then only if the argument COPYRIGHT is +passed to +COVER +or +DOC_COVER. +Do not include the copyright symbol in the argument passed to +COPYRIGHT; mom puts it in for +you. +

              + + + +


              +

              + +Macro: MISC "<argument 1>" ["<argument 2>" "<argument 3>" ...] +
              +*Multliple arguments must all be enclosed in double-quotes + +

              +The argument(s) passed to MISC are only used on +cover or doc cover pages, and then only if the argument MISC is +passed to +COVER +or +DOC_COVER. +MISC can contain any information you like. Each +argument appears on a separate line at the bottom of the cover or +doc cover page. +

              +For example, if you're submitting an essay where the prof has +requested that you include the course number, his name and the +date, you could do +

              +

              +	.MISC "Music History 101" "Professor Hasbeen" "Dec. 24, 2006"
              +
              + +and the information would appear on the essay's cover page. +

              + + + +


              +

              + +Macro: COVERTITLE "<user defined cover page title>" +
              +Macro: DOC_COVERTITLE "<user defined document cover page title>" +
              +*Argument must be enclosed in double-quotes + +

              +The argument passed to COVERTITLE or +DOC_COVERTITLE is only used on cover or doc cover +pages, and then only if the argument COVERTITLE is passed to +COVER +or +DOC_COVER. +

              +The only time you require a COVERTITLE or +DOC_COVERTITLEis when none of the required first +arguments to COVER or DOC_COVER +fits your needs for the title you want to appear on cover (or doc +cover) pages. + +

              +


              @@ -816,13 +1130,14 @@ draft and revision information in the headers) or a final copy.
          • COPYSTYLE
          +

          -Macro: DOCTYPE DEFAULT | CHAPTER | NAMED "<name>" | LETTER +Macro: DOCTYPE DEFAULT | CHAPTER | NAMED "<name>" | LETTER

          The arguments DEFAULT, CHAPTER and NAMED tell mom what to put @@ -831,7 +1146,7 @@ in the and page headers. LETTER tells her that you want to write a -lettter. +letter.

          Mom's default DOCTYPE is DEFAULT. If that's what you want, you don't @@ -844,7 +1159,7 @@ containing the title, subtitle and author information given to the and page headers with the author and title. (See Default specs for headers -for how mom's outputs each part of the page header.) +for how mom outputs each part of the page header.)

          CHAPTER prints "Chapter #" in place of a docheader @@ -854,17 +1169,18 @@ for how mom's outputs each part of the page header.) If you give the chapter a title with CHAPTER TITLE, mom prints "Chapter #" and the title -underneath. If you omit the CHAPTER reference -macro but supply a +underneath. If you omit the +CHAPTER +reference macro but supply a CHAPTER_TITLE, mom prints only the chapter title. (*For -backward compatability with pre-1.1.5 versions of +backward compatibility with pre-1.1.5 versions of mom, you can also supply a chapter title by -ommitting the CHAPTER reference macro and -supplying a chapter title with -CHAPTER_STRING. +omitting the CHAPTER reference macro and +supplying a chapter title with +CHAPTER_STRING.)

          -The page headers in DOCTYPE CHAPTER contain the author, +The page headers in DOCTYPE CHAPTER contain the author, the title of the book (which you gave with TITLE), and "Chapter #" (or the chapter title). See @@ -882,22 +1198,41 @@ except that mom prints the argument to as well as in page headers. (See Default specs for headers -for how mom's outputs each part of the page header.) +for how mom outputs each part of the page header.) +

          +Additionally, if you wish the name of this particular kind of +document to be coloured, you can pass DOCTYPE NAMED +a third (optional) argument: the name of a colour pre-defined (or +"initialized") with +NEWCOLOR +or +XCOLOR. +For example, if you have a doctype named "Warning", and +you'd like "Warning" to be in red, assuming you've +pre-defined (or "initialized") the color, red, this is +what the DOCTYPE entry would look like: +

          +

          +	.DOCTYPE NAME "Warning" red
          +
          +

          LETTER tells mom you're writing a letter. See the section Writing Letters for instructions on using mom to format letters. -
          +


          -Macro: PRINTSTYLE TYPESET | TYPEWRITE [ SINGLESPACE ] +Macro: PRINTSTYLE TYPESET | TYPEWRITE [ SINGLESPACE ]
          *Required for document processing. +
          +*Must come before any changes to default document style

          PRINTSTYLE tells mom whether to typeset @@ -909,6 +1244,15 @@ a PRINTSTYLE. If you don't give one, mom will warn you on stderr and print a single page with a nasty message.

          +Furthermore, PRINTSTYLE must come before any +changes to mom's default typestyle parameters. +(This applies primarily to, but is by no means restricted to, +PRINTSTYLE TYPESET.) PRINTSTYLE +sets up complete "templates" that include default +papersize, margins, family, fonts, point sizes, and so on. +Therefore, changes to any aspect of document style must come +afterwards. +

          TYPESET, as the argument implies, typesets documents (by default in Times Roman; see TYPESET defaults). @@ -918,6 +1262,27 @@ as well as the style control macros of document processing.

          +As mentioned above, PRINTSTYLE TYPESET must come +before any changes to mom's default typographic +settings. For example, + +

          +	.PAPER A4
          +	.LS 14
          +	.PRINTSTYLE TYPESET
          +
          + +will not changes mom's default paper size to A4, +nor her default document leading 14 points, whereas + +
          +	.PRINTSTYLE TYPESET
          +	.PAPER A4
          +	.LS 14
          +
          + +will. +

          With TYPEWRITE, mom does her best to reproduce the look and feel of typewritten, double-spaced copy (see TYPEWRITE defaults). @@ -958,7 +1323,7 @@ or singlespaced, the only way to get it is with the macro, and then ONLY if DOC_LEAD is set before you invoke the START macro. - +

          TYPESET defaults

           	Family            = Times Roman
          @@ -1014,6 +1379,7 @@ these macros in the midst of a document,
           .UNDERLINE_SLANT restore underlining of
           italics and pseudo-italics.
           

          + Additionally, by default, mom underlines quotes (but not @@ -1039,14 +1405,14 @@ headers/footers should they become crowded (quite likely to happen if the title of your document is long and your COPYSTYLE is DRAFT). -
          +


          -Macro: COPYSTYLE DRAFT | FINAL +Macro: COPYSTYLE DRAFT | FINAL

          Mom's default COPYSTYLE is @@ -1066,13 +1432,13 @@ you want to. REVISION (see reference macros), - appear in the center part of + appear in the centre part of page headers - (or footers, depending on which you'ves selected) along with + (or footers, depending on which you've selected) along with any other information that normally appears there.

      -IMPORTANT: If you define your own center part for page +IMPORTANT: If you define your own centre part for page headers with HEADER_CENTER, no draft and/or revision number will appear there. If you want draft @@ -1083,11 +1449,11 @@ and revision information in this circumstance, use

      1. it respects the starting page number you give the document -
      2. page numbers are set in normal (arabic) digits +
      3. page numbers are set in normal (Arabic) digits
      4. no draft or revision number appears in the page headers

      -NOTE: The center part of page headers can get crowded, +NOTE: The centre part of page headers can get crowded, especially with DOCTYPE CHAPTER and @@ -1100,17 +1466,17 @@ Another, which only works with PRINTSTYLE TYPESET, is to reduce the size of the header's centre part only (with HEADER_CENTER_SIZE). -And finally, you can elect to have the draft/revsion information -attached to page numbers instead of having it appear in the center +And finally, you can elect to have the draft/revision information +attached to page numbers instead of having it appear in the centre of page headers (see DRAFT_WITH_PAGENUMBER). -
      +


      Changing type/style parameters prior to START

      - +

      In the third (optional) part of setting up a document (see Tutorial -- setting up a mom document), you can use the @@ -1139,39 +1505,86 @@ adjusted to fill pages fully to the bottom margin.

    10. Docheader control +

      Using the typesetting macros prior to START

      - -When used before the -START -macro, the following +

      +From time to time (or maybe frequently), you'll want the overall +look of a document to differ from mom's defaults. +Perhaps you'd like her to use a different +family, +or a different overall +leading, +or have different left and/or right page margins. +

      +To accomplish such alterations, use the appropriate typesetting macros -have these meanings: +(listed below) after +PRINTSTYLE +and before +START. +

      +More than one user has, quite understandably, not fully grasped +the significance of the preceding sentence. The part they've missed +is "after PRINTSTYLE". +

      +Changes to any aspect of the default look and/or formatting +of a mom document must come after +PRINTSTYLE. For example, it might seem natural to +set up page margins at the very top of a document with

      -	L_MARGIN         Left margin of pages, including headers/footers
      -	R_MARGIN         Right margin of pages, including headers/footers
      -	T_MARGIN         The point at which running text (i.e. not
      -	                 headers/footers or page numbers) starts on each page
      -	B_MARGIN         The point at which running text (i.e. not
      -	                 headers/footers or page numbers) ends on each page
      +	.L_MARGIN 1i
      +	.R_MARGIN 1.5i
      +
      - (PAGE If you use PAGE, its first four arguments have the - same meaning as L_ R_ T_ and B_MARGIN above.) +However, when you invoke .PRINTSTYLE, those +margins will be overridden. The correct place to set margins--and +all other changes to the look of a document--is after +PRINTSTYLE. - LL The line length for everything on the page; - equivalent to setting the right margin with R_MARGIN - FAMILY The family of all type in the document - PT_SIZE The point size of type in paragraphs; mom uses this - calculate automatic point size changes (eg. for heads, - footnotes, quotes, headers, etc) - *LS or AUTOLEAD The leading used in paragraphs; all leading and spacing - of running text is calculated from this - QUAD Affects paragraphs only +

      +NOTE: Don't use the macros listed in Changing document-wide typesetting +parameters after START prior to START; they are +exclusively for use afterwards. +

      +When used before +START, +the +typesetting macros +(below) have the following meanings: +

      +

      +	L_MARGIN       Left margin of pages, including headers/footers
      +	R_MARGIN       Right margin of pages, including headers/footers
      +	T_MARGIN       The point at which running text (i.e. not
      +	               headers/footers or page numbers) starts on each page
      +	B_MARGIN*      The point at which running text (i.e. not
      +	(see note)     headers/footers or page numbers) ends on each page
      +
      +	PAGE           If you use PAGE, its final four arguments have the
      +	               same meaning as L_ R_ T_ and B_MARGIN (above).
      +
      +	LL             The line length for everything on the page;
      +	               equivalent to setting the right margin with R_MARGIN
      +	FAMILY         The family of all type in the document
      +	PT_SIZE        The point size of type in paragraphs; mom uses this
      +	               to calculate automatic point size changes (e.g. for
      +	               heads, footnotes, quotes, headers, etc)
      +	LS/AUTOLEAD**  The leading used in paragraphs; all leading and spacing
      +	               of running text is calculated from this
      +
      +	QUAD/JUSTIFY   Affects paragraphs only
      +	LEFT           No effect***
      +	RIGHT          No effect***
      +	CENTER         No effect***
       
       ------
      -*See DOC_LEAD_ADJUST
      +  *See FOOTER MARGIN AND BOTTOM MARGIN for an important warning
      + **See DOC_LEAD_ADJUST
      +***See Special note
       
      Other macros that deal with type style, or refinements thereof @@ -1179,11 +1592,79 @@ Other macros that deal with type style, or refinements thereof It is not recommended that you set up tabs or indents prior to START.

      -If you want to change any of the basic parameters above +If you want to change any of the basic parameters (above) after START and have them affect a document globally (as if you'd entered them before START), you must use the macros listed in Changing document-wide style parameters after START. + + +

      Special note on .LEFT, .RIGHT and .CENTER prior to START

      +In a word, these three macros have no effect on document processing +when invoked prior to START. +

      +All mom's document element tags +(PP, HEAD, +BLOCKQUOTE, FOOTNOTE, etc.) +except +QUOTE +set a +fill mode +as soon as they're invoked. If you wish to turn fill mode off for +the duration of any tag (with +.LEFT, .RIGHT or .CENTER) +you must do so immediately after invoking the tag. Furthermore, +the change affects only the current invocation of the tag. +Subsequent invocations of the same tag for which you want the same +change require that you invoke LEFT, +RIGHT or CENTER immediately after +every invocation of the tag. +

      + + +

      Colour

      +
      +Although it doesn't really matter where you define/initialize +colours for use in document processing (see +NEWCOLOR +and +XCOLOR +in the section +Coloured text), +I recommend doing so before you begin document processing with +START. +

      +The macro, +COLOR, +and the +inline escape, +\[<colorname>], +can be used at any time during document processing for occasional +colour effects. However, consistent and reliable colourizing of +various document elements (the docheader, heads, linebreaks, +footnotes, pagenumbers, and so on) must be managed through the use +of the +document element control macros. +

      +PLEASE NOTE: If you plan to have mom +generate a +table of contents, +do NOT embed colour +inline escapes +(\[<colorname>]) +in the +string arguments +given to any of the +reference macros, +nor in the string arguments given to +.HEAD, +.SUBHEAD +or +.PARAHEAD. +Use, rather, the +control macros +mom provides to automatically colourize these +elements.
      @@ -1191,7 +1672,7 @@ document globally (as if you'd entered them before


      Adjusting document leading to fill pages


      -Macro: DOC_LEAD_ADJUST toggle +Macro: DOC_LEAD_ADJUST toggle
      *Must come after LS or AUTOLEAD and before START @@ -1208,49 +1689,65 @@ leading, then incrementally adds to the leading until the maximum number of lines at the new leading matches the bottom margin. In most instances, the difference between the requested lead and the adjusted lead is -unnoticeable. +unnoticeable, and since in almost all cases adjusted leading is +what you want, it's mom's default.

      -Mom uses DOC_LEAD_ADJUST with -her default document settings, but if you invoke -LS -or -AUTOLEAD -prior to -START, -you have to do -

      -

      -	.DOC_LEAD_ADJUST
      -
      -in order to enable it. -

      -If you don't like the idea of mom playing around -with the leading by default, you can turn adjusting off with +Should you NOT want adjusted document leading, you MUST turn it +off manually, like this:

       	.DOC_LEAD_ADJUST OFF
       
      + If you set the document leading prior to START +with +LS +or +AUTOLEAD, +DOC_LEAD_ADJUST OFF must come afterwards, like +this: +

      +

      +	.LS 12
      +	.DOC_LEAD_ADJUST OFF
      +
      In this scenario, the maximum number of lines that fit on a page at -the current document leading determine where mom ends +a +leading +of 12 +points +determine where mom ends a page. The effect will be that last lines usually fall (slightly) -short of your expected bottom margin. +short of the "official" bottom margin. +

      +In +PRINTSTYLE +TYPEWRITE, the leading is always adjusted and +can't be turned off.

      NOTE: DOC_LEAD_ADJUST, if used, must be invoked after -LS +LS or AUTOLEAD and before START -
      +

      +ADDITIONAL NOTE: Even if you disable +DOC_LEAD_ADJUST, mom will still +adjust the leading of endnotes pages and toc pages. See +ENDNOTE_LEAD +and +TOC_LEAD +for an explanation of how to disable this default behaviour. +


      Managing the docheader


      -Macro: DOCHEADER <toggle> [ distance to advance from top of page ] +Macro: DOCHEADER <toggle> [ distance to advance from top of page ]
      *Must come before START; distance requires a unit of measure @@ -1270,17 +1767,22 @@ turn it off with have to be OFF; it can be anything you like.

      If you turn the docheader off, mom, by default, starts -your document in the same place she would if the docheader were there. -If you'd like her to start at a different vertical position, give -her the distance you'd like as a second argument. +the running text of your document on the same top +baseline +as all subsequent pages. If you'd like her to start at a different +vertical position, give her the distance you'd like as a second +argument.

       	.DOCHEADER OFF 1.5i
       
      -This starts the document 1.5 inches from the top of the page. -The distance you give is measured from the top edge of the paper -to the +This starts the document 1.5 inches from the top of the page PLUS +whatever spacing adjustment mom has to make in +order to ensure that the first baseline of running text falls on a +"legal" baseline (i.e. one that ensures that the bottom +margin of the first page falls where it should). The distance is +measured from the top edge of the paper to the baseline of the first line of type.

      @@ -1293,8 +1795,8 @@ like the way mom does things) and use DOCHEADER OFF with its optional distance argument to ensure that the body of your document starts where you want. You can even insert a PostScript file (with .PSPIC; -see the grops man page for usage). - +see the groff_tmac man page for usage). +

      How to change the look of docheaders: docheader control macros

      @@ -1336,18 +1838,40 @@ is CHAPTER, The family is the prevailing family of the whole document. +

      +NOTE: If your DOCTYPE is +CHAPTER and you have both "Chapter #" +and a "Chapter Title" (as above), you may find the +leading +a bit cramped (owing to mom's default docheader +leading). If this is the case, you can adjust the leading either +with +DOCHEADER_LEAD +or by including the +inline escape, +\*[DOWN], +in the argument you pass to +CHAPTER_TITLE, like this: +

      +

      +	.CHAPTER_TITLE "\*[DOWN 2p]Why Not Patent Calculus?"
      +
      -

      The docheader macros to:

      + +

      The docheader macros to:

        -
      1. Change the starting position +
      2. Change the starting position of the docheader +
      3. Change the family of the entire docheader
      4. Adjust the docheader leading -
      5. Change the family of docheader elements +
      6. Change the family of individual docheader elements
      7. Change the font of docheader elements +
      8. Change the colour of the docheader
      9. Adjust the size of docheader elements
      10. Change the attribution string ("by")

      1. Change the starting position

      +

      By default, a docheader starts on the same baseline as @@ -1379,14 +1903,41 @@ you might find the docheaders a bit high when headers are off. Use DOCHEADER_ADVANCE to place them where you want. +

      +

      2. Change the family of the entire docheader

      +

      +By default, mom sets the docheader in the same +family used for +running text. +If you'd prefer to have your docheaders set in a different family, +invoke DOCHEADER_FAMILY with the family you want. +The argument for DOCHEADER_FAMILY is the same as +for +FAMILY. +

      +For example, mom's default family for running text +is Times Roman. If you'd like to keep that default, but have the +docheaders set entirely in Helvetica, +

      +

      +	.DOCHEADER_FAMILY H
      +
      -

      2. Adjust the leading

      +is how you'd do it. +

      +Please note that if you use DOCHEADER_FAMILY, +you can still alter the family of individual parts of the docheader +with the macros listed +here. + +

      3. Adjust the leading

      +

      The -leading of -docheaders is the same as running text (except when +leading +of docheaders is the same as running text (except when DOCTYPE -is CHAPTER and both a chapter number and a +is CHAPTER and both a chapter number and a chapter title have been supplied, in which case the default is 4 points more than running text.)

      @@ -1394,42 +1945,48 @@ If you'd like your docheaders to have a different leading, say, 2 points more than the lead of running text, use:

      -	.DOCHEADER_LEAD +2p
      +	.DOCHEADER_LEAD +2
       
      Since the leading of docheaders is calculated from the lead of running text, a + or - sign is required before the argument (how much to add -or subtract from the lead of running text). The +or subtract from the lead of running text). No unit of measure -is also required. +is required; points is assumed. +

      -

      3. Change the family of docheader elements

      +

      4. Change the family of docheader elements

      +

      The following macros let you change the family of each docheader element separately:

        -
      • TITLE_FAMILY <family> -
      • CHAPTER_TITLE_FAMILY <family> -
      • SUBTITLE_FAMILY <family> -
      • AUTHOR_FAMILY <family> -
      • DOCTYPE_FAMILY <family> (if +
      • TITLE_FAMILY <family> +
      • CHAPTER_TITLE_FAMILY <family> +
      • SUBTITLE_FAMILY <family> +
      • AUTHOR_FAMILY <family> +
      • DOCTYPE_FAMILY <family> (if DOCTYPE is NAMED)

      -Simply pass the appropriate macro the family you want. +Simply pass the appropriate macro the family you want, just as you +would with +FAMILY. +

      -

      4. Change the font of docheader elements

      +

      5. Change the font of docheader elements

      +

      The following macros let you change the font of each docheader element separately:

        -
      • TITLE_FONT R | B | I | BI -
      • CHAPTER_TITLE_FONT R | B | I | BI -
      • SUBTITLE_FONT R | B | I | BI -
      • AUTHOR_FONT R | B | I | BI -
      • DOCTYPE_FONT R | B | I | BI (if +
      • TITLE_FONT R | B | I | BI +
      • CHAPTER_TITLE_FONT R | B | I | BI +
      • SUBTITLE_FONT R | B | I | BI +
      • AUTHOR_FONT R | B | I | BI +
      • DOCTYPE_FONT R | B | I | BI (if DOCTYPE is NAMED)

      @@ -1437,9 +1994,60 @@ Simply pass the appropriate macro the font you want. R, B, I and BI have the same meaning as they do for FT. +

      +

      6. Change the colour of the docheader elements individually

      +

      +The following macros let you change the color of each docheader +element separately. You must pre-define (or +"initialize") the color with +NEWCOLOR +or +XCOLOR. +

      +

        +
      • TITLE_COLOR <colorname> +
      • CHAPTER_TITLE_COLOR <colorname> +
          +
        • Note: CHAPTER_TITLE_COLOR is needed + only if you enter both a CHAPTER + reference macro AND a CHAPTER_TITLE + macro. Otherwise, the macro, + TITLE_COLOR takes care of colorizing + the chapter header. +
        +
      • SUBTITLE_COLOR <colorname> +
      • ATTRIBUTE_COLOR <colorname> + (the "by" string that precedes the author[s] name[s]) +
      • AUTHOR_COLOR <colorname> +
      • DOCTYPE_COLOR <colorname> (if + DOCTYPE is NAMED) +
      +

      +It is not recommended that you embed colour (with the +inline escape, +\*[<colorname>]) +in the strings passed to +TITLE, CHAPTER_TITLE, +SUBTITLE, AUTHOR or the name you +give DOCTYPE NAMED. The strings passed to these +macros are used to generate page +headers +and +footers. +An embedded colour will cause the string to be colourized any time +it appears in headers or footers. (If you want headers or footers +colourized, or parts thereof, use the header/footer control macros.) +

      + +If you want to colourize the entire docheader, use the macro +

      +

        +
      • DOCHEADER_COLOR <color name>. +
      -

      5. Adjust the size of docheader elements

      +

      7. Adjust the size of docheader elements

      +

      The following macros let you adjust the point size of each docheader element separately.

      @@ -1452,27 +2060,28 @@ so there's no need to append a unit to the argument. Fractional point sizes are allowed.

        -
      • TITLE_SIZE <+/-points> +
      • TITLE_SIZE <+/-points>
        default = +3.5 (+4 if docheader title is "Chapter #") -
      • CHAPTER_TITLE_SIZE <+/-points> +
      • CHAPTER_TITLE_SIZE <+/-points>
        default = +4 -
      • SUBTITLE_SIZE <+/-points> +
      • SUBTITLE_SIZE <+/-points>
        default = +0 -
      • AUTHOR_SIZE <+/-points> +
      • AUTHOR_SIZE <+/-points>
        default = +0 -
      • DOCTYPE_SIZE <+/-points> (if +
      • DOCTYPE_SIZE <+/-points> (if DOCTYPE is NAMED)
        default = +3

      Simply pass the appropriate macro the size adjustment you want. +

      -

      6. Change the attribution string ("by")

      +

      8. Change the attribution string ("by")

      If you're not writing in English, you can change what mom prints where "by" appears in @@ -1502,12 +2111,12 @@ in the argument to ATTRIBUTE_STRING. For example,

      -	.ATTRIBUTE_STRING "\f[HBI]\*S[-2p] by \*S[+2p]\*[PREV]"
      +	.ATTRIBUTE_STRING "\f[HBI]\*[SIZE -2p] by \*[SIZE +2p]\*[PREV]"
       
      would set "by" in Helvetica bold italic, 2 points smaller than normal. -
      +


      @@ -1545,14 +2154,14 @@ and (and probably the paragraph first-line indent as well). -
      +


      COLUMNS


      -Macro: COLUMNS <number of columns> <width of gutters> +Macro: COLUMNS <number of columns> <width of gutters>
      *Should be the last macro before START
      @@ -1580,9 +2189,19 @@ when the is TYPEWRITE. The notion of typewriter-style output in columns is just too ghastly for her to bear. +

      Using tabs when COLUMNS are enabled

      +Mom's tabs +(both +typesetting tabs +and +string tabs) +behave as you'd expect during document processing, even when +COLUMNS are enabled. Tab structures set up +during document processing carry over from page to page and column +to column. +

      Breaking columns manually

      -

      Mom takes care of breaking columns when they reach the bottom margin of a page. However, there may be times you want to break the columns yourself. There are two macros for breaking columns @@ -1634,7 +2253,7 @@ merges it with her defaults, sets up headers and page numbering, and prepares mom to process your document using the document element tags. No document processing takes place until you invoke START. -
      +

      @@ -1655,7 +2274,7 @@ don't use START. At a barest minimum before START, you must enter a PRINTSTYLE command. -
      +


      @@ -1670,9 +2289,9 @@ parameters of a document before using typesetting macros (L_MARGIN, FAMILY, PT_SIZE, LS, etc). After -START, you must use the following macros to make +START, you MUST use the following macros to make global changes to the basic type parameters of a document. -
      +

      Macro list

      @@ -1687,11 +2306,12 @@ global changes to the basic type parameters of a document.
    11. DOC_LEAD_ADJUST
    12. DOC_QUAD +

      - Macro: DOC_LEFT_MARGIN <left margin> + Macro: DOC_LEFT_MARGIN <left margin>
      *Requires a unit of measure @@ -1703,13 +2323,12 @@ global changes to the basic type parameters of a document.

    13. the line length remains the same (i.e. the right margin shifts when you change the left margin) -

      - Macro: DOC_RIGHT_MARGIN <right margin> + Macro: DOC_RIGHT_MARGIN <right margin>
      *Requires a unit of measure @@ -1717,7 +2336,17 @@ global changes to the basic type parameters of a document.

      @@ -1726,42 +2355,50 @@ global changes to the basic type parameters of a document.

      - Macro: DOC_LINE_LENGTH <length> + Macro: DOC_LINE_LENGTH <length>
      *Requires a unit of measure



      - Macro: DOC_FAMILY <family> + Macro: DOC_FAMILY <family>

      • the argument is the same as for FAMILY
      • globally changes the type family -
      • if you wish the - header - and/or page number families to remain at their old values, - you must reset them with - HEADER_FAMILY - and - PAGENUM_FAMILY +
      • any page elements (e.g. + headers, + page numbers, footnotes) whose families you wish to remain + at their old values must be reset with the appropriate + control macros


      - Macro: DOC_PT_SIZE <point size> + Macro: DOC_PT_SIZE <point size>
      *Does not require a unit of measure; points is assumed @@ -1782,7 +2419,7 @@ global changes to the basic type parameters of a document.


      - Macro: DOC_LEAD <points> [ ADJUST ] + Macro: DOC_LEAD <points> [ ADJUST ]
      *Does not require a unit of measure; points is assumed @@ -1814,10 +2451,20 @@ immediately prior to a new page, like this: .NEWPAGE +NOTE: Even if you don't pass +DOC_LEAD the optional argument +ADJUST, mom will still adjust the +leading of endnotes pages and toc pages. See +ENDNOTE_LEAD +and +TOC_LEAD +for an explanation of how to disable this default behaviour. +

      +


      - Macro: DOC_QUAD L | R | C | J + Macro: DOC_QUAD L | R | C | J

        @@ -1826,11 +2473,11 @@ immediately prior to a new page, like this:
      • affects paragraphs, epigraphs and footnotes; does not affect blockquotes
      +
      -


      -Next   -Prev   +Next   +Prev   Top   Back to Table of Contents diff --git a/contrib/groff/contrib/mom/momdoc/goodies.html b/contrib/groff/contrib/mom/momdoc/goodies.html index 8876966a068f..6b907b49bdff 100644 --- a/contrib/groff/contrib/mom/momdoc/goodies.html +++ b/contrib/groff/contrib/mom/momdoc/goodies.html @@ -1,3 +1,4 @@ + @@ -10,16 +11,16 @@ Next   Prev   Back to Table of Contents - +

      -

      Goodies

      +

      Goodies

      - +

      The macros in this section are a collection of useful (and sometimes -nearly indispensible) routines to simplify typesetting. - +nearly indispensable) routines to simplify typesetting. +

      Goodies list

      @@ -28,8 +29,9 @@ nearly indispensible) routines to simplify typesetting.
    14. ALIAS (rename macros)
    15. SILENT ("hide" input lines from output)
    16. TRAP (suspend/re-invoke traps) -
    17. SMARTQUOTES +
    18. SMARTQUOTES (convert typewriter doublequotes to proper doublequotes)
    19. CAPS (convert to upper case) +
    20. STRING (user-definable strings)
    21. Underscore/underline -
    22. Superscript +
    23. Superscripts +
    24. Lists + @@ -72,7 +84,7 @@ nearly indispensible) routines to simplify typesetting.

      Rename macros


      -Macro: ALIAS <new name> <old name> +Macro: ALIAS <new name> <old name>

      The ALIAS macro may well be your best friend. With it, @@ -142,14 +154,14 @@ of your documents, please. EXPERTS: ALIAS is an alias of .als. You can use either, or mix 'n' match with impunity. -
      +


      Hide input lines from output


      -Macro: SILENT toggle +Macro: SILENT toggle
      Alias: COMMENT @@ -195,14 +207,14 @@ or to which you've passed the J or QUAD argument. You must insert .BR yourself, or risk a portion of your text disappearing into a black hole. -
      +


      Suspend/re-invoke traps


      -Macro: TRAP toggle +Macro: TRAP toggle

      Traps are vertical positions on the output page at which you or @@ -211,13 +223,8 @@ something automatically. Commonly, this is near the bottom of the page, where automatic behind-the-scenes processing is needed in order for one page to finish and another to start.

      -Sometimes, traps get sprung when you don't want them, notably -when using the -EL -and -TN -macros. If this happens, surround just the offending macros and -input lines with +Sometimes, traps get sprung when you don't want them. If this +happens, surround just the offending macros and input lines with

       	.TRAP OFF
      @@ -229,22 +236,27 @@ input lines with
       turns it off (i.e. suspends the trap), and no argument turns it
       (back) on.
       

      -Have a look at the IMPORTANT sections -of EL and TN to see -TRAP in action. -


      -

      Smartquotes

      +

      Convert typewriter doublequotes to proper doublequotes


      -Macro: SMARTQUOTES toggle +Macro: SMARTQUOTES [<off>] [ ,, | >> | << ] +
      +or +
      +Macro: SMARTQUOTES DA | DE | ES | FR | IT | NL | NO | PT | SV

      -SMARTQUOTES converts all instances of the -inch-mark, (" -- also called a "doublequote"), -into the appropriate instances of true open- and close-doublequotes. +If you invoke SMARTQUOTES without an argument, +mom converts all instances of the inch-mark, +(" -- also called a "doublequote"), into +the appropriate instances of true Anglo-American open- and +close-doublequotes. (See +Internationalization +for how to get SMARTQUOTES to behave correctly for non-English +quoting styles.)

      Typographically, there is a difference between the inch-mark and doublequotes -- a BIG difference. Sadly, typewriters and computer @@ -255,20 +267,83 @@ typeset copy. Failure to turn inches into quotes is the first thing a professional typesetter notices in documents prepared by amateurs. And you don't want to look like an amateur, do you?

      -When preparing documents for typesetting, by all means, use the -inch-mark. Just make sure to turn SMARTQUOTES -on. SMARTQUOTES is a toggle, so invoking it with -no argument turns it on, and invoking it with any argument at all -turns it off. +

      Internationalization

      +

      +If you invoke SMARTQUOTES with one of the optional +arguments (,, or >> or +<<) you can use " as "cheap" +open- and close-quotes when inputting text in a language other than +English, and have mom convert them, on output, +into the chosen open- and close-quote style. +

      +,, opens quotes with "lowered doublequotes" and +closes them with "raised doublequotes", as in this ascii +approximation: +

      +

      +	,,Hilfe !``
      +
      + +>> opens quotes with guillemets pointing to the +right, and closes them with guillemets pointing to the left, as in +this ascii approximation: +

      +

      +	>>Zurück !<<
      +
      + +<< opens quotes with guillemets pointing to the +left, and closes them with guillemets pointing to the right, as in +this ascii approximation: +

      +

      +	<<Mais monsieur! Je ne suis pas ce genre de fille!>>
      +
      + +Please note: the above arguments to SMARTQUOTES +are literal ASCII characters. ,, is two commas, +<< is two less-than signs and >> +is two greater-than signs. +

      +Alternatively, you can pass SMARTQUOTES the +two-letter, ISO 639 abbreviation for the language you're writing in, +and mom will output the correct quotes. +

      +

      +	.SMARTQUOTES DA     = Danish      >>text<<
      +	.SMARTQUOTES DE     = German      ,,text``
      +	.SMARTQUOTES ES     = Spanish     ``text´´
      +	.SMARTQUOTES FR     = French      << text >>
      +	.SMARTQUOTES IT     = Italian     << text >>
      +	.SMARTQUOTES NL     = Dutch       ´´text´´
      +	.SMARTQUOTES NO     = Norwegian   <<text>>
      +	.SMARTQUOTES PT     = Portuguese  <<text>>
      +	.SMARTQUOTES SV     = Swedish     >>text>>
      +
      +

      +Turn SMARTQUOTES off by passing it any argument +not in the argument list (e.g. OFF, +QUIT, X, etc.)

      If you're using the document processing macros with PRINTSTYLE TYPESET, -SMARTQUOTES is on by default; with +SMARTQUOTES is on by default (in the Anglo-American +style); with PRINTSTYLE TYPEWRITE, it's off by default (and should probably stay that way).

      +Finally, if you're fussy about the kerning of quote marks in +relation to the text they surround, or have special quoting needs, +you have to enter quote marks by hand using groff's native +inline escapes +for special characters (see man groff_char for a complete list of +special characters). Entering quote marks this way allows you to +use mom's +inline kerning escapes +to fine-tune the look of quotes. +

      NOTE: SMARTQUOTES does not work on single quotes, which most people input with the apostrophe (found at the right-hand end of the "home row" on a QWERTY keyboard). @@ -289,14 +364,14 @@ the foot- and inch-marks, when you need them, with the inline escapes \*[FOOT] and \*[INCH], instead of ' and ". -
      +


      Convert to upper case


      -Macro: CAPS toggle +Macro: CAPS toggle

      CAPS converts all lower case letters to upper @@ -318,12 +393,57 @@ produces, on output ALL WORK AND NO PLAY MAKES JACK A DULL BOY.

      + + +
      +

      User-defined strings

      +
      +Macro: STRING <name> <what you want in the string> + +

      +You may find sometimes that you have to type out portions of text +repeatedly. If you'd like not to wear out your fingers, you can +define a "string" that, whenever you call it by name, +outputs whatever you put into it. +

      +For example, say you're creating a document that repeatedly uses +the phrase "the Montreal/Windsor corridor". Instead of +typing all that out every time, you could define a string, like +this: +

      +

      +	.STRING mw the Montreal/Windsor corridor
      +
      + +Once a string is defined, you can call it any time with the +inline escape +\*[<stringname>]. Using the example string above +

      +

      +	The schedule for trains along \*[mw]:
      +
      + +produces, on output +

      +

      +	The schedule for trains along the Montreal/Windsor corridor:
      +
      + +NOTE: Be very careful not to put any spaces at the +ends of strings you're defining, unless you want them. Everything +after the name argument you pass to STRING goes +into the string, including trailing spaces. +

      +Experts: STRING is an alias for ds. +You can use either, or mix 'n' match with impunity. +

      +


      Single underscore


      -Macro: UNDERSCORE [ <distance below baseline> ] "<string>" +Macro: UNDERSCORE [ <distance below baseline> ] "<string>"
      *Optional argument requires a unit of measure @@ -383,14 +503,14 @@ no solution to the occasional problems with justified copy. printed, looks fine. Generally, I recommend using gv to preview files anyway. See the section on previewing. -
      +


      Double underscore


      -Macro: UNDERSCORE2 [ <distance below baseline> [ <distance between rules> ] ] "<string>" +Macro: UNDERSCORE2 [ <distance below baseline> [ <distance between rules> ] ] "<string>"
      *Optional arguments require a unit of measure @@ -427,20 +547,20 @@ to UNDERSCORE2 as to UNDERSCORE. See the NOTES for UNDERSCORE. -
      +


      Underline text -- Courier font only!


      -Macro: UNDERLINE toggle +Macro: UNDERLINE toggle

      If your font is Courier, or you're using the document processing macro PRINTSTYLE TYPEWRITE, UNDERLINE allows you to underline words and -passages that, in typeset copy, would be italicised. You invoke +passages that, in typeset copy, would be italicized. You invoke UNDERLINE as you do with all toggle macros -- by itself (i.e. with no argument) to initiate underlining, and with any argument to turn underlining off. @@ -453,7 +573,7 @@ readable copy than a solid underline. inline with the escapes \*[UL]...\*[ULX]. -
      +

      @@ -466,7 +586,7 @@ Inline: \*[UL]...\*[ULX] If your font is Courier, or you're using the document processing macro PRINTSTYLE TYPEWRITE, \*[UL]...\*[ULX] underlines words and -passages that, in typeset copy, would be italicised. +passages that, in typeset copy, would be italicized.

      \*[UL] underlines all letters, words and numbers following it, but not punctuation or spaces. This makes for more @@ -512,11 +632,13 @@ produces the same result as


      Insert space into lines


      -Macro: PAD "<string with pad markers inserted>" +Macro: PAD "<string with pad markers inserted>" [NOBREAK]

      With PAD, you can insert unspecified amounts of -whitespace into a line. +whitespace into a line. The optional NOBREAK +argument tells mom not to advance on the page +after the PAD macro has been invoked.

      PAD calculates the difference between the length of text on the line and the distance remaining to its end, then inserts @@ -560,55 +682,50 @@ particularly useful in conjunction with string tabs. The following uses the Date/Signature example above, but adds rules into the whitespace through the use of string tabs and +mom's +inline escape +\*[RULE]. +(Instead of \*[RULE], groff's line drawing function, -\l. +\l +could be used.)

       	.LL 30P
      -	.PAD "Date\*[ST1]#\*[ST1X]Signature\*[ST2]###\*[ST2X]"
      -	.EL
      +	.PAD "Date \*[ST1]#\*[ST1X] Signature \*[ST2]###\*[ST2X]" NOBREAK
       	.ST 1 J
       	.ST 2 J
       	.TAB 1
      -	\l'\n(.lu'
      +	\*[RULE]
       	.TN
      -	\l'\n(.lu'
      +	\*[RULE]
       	.TQ
       
      If you're not a typesetter, and if you're new to groff, the example probably looks like gibberish. My apologies. However, remember that typesetting is a craft, and without having studied -the craft, it takes a while to grasp its concepts. Also, -although mom tries very hard to provide -consistent-looking, comprehensible alternatives to groff's -native -inline escapes, -mom has not yet found a replacement for -\l. +the craft, it takes a while to grasp its concepts.

      Basically, what the example does is:

      1. Pads the Date/Signature line (using the pad marker #), encloses the padded space with two string tabs markers, - and outputs the line + and outputs the line.
      2. Sets the two string tabs (notice the use of EL beforehand; you don't want mom - to advance a line at this point) + to advance a line at this point).
      3. Calls the first string tab and draws a rule to its full - length (\l'\n(.lu'; for an easier way to draw a rule - that fills a tab, see - Full measure - rules). + length.
      4. Calls the second tab with TN (which moves to tab 2 and stays on the same baseline) - then draws a rule to the full length of string tab 2 + then draws a rule to the full length of string tab 2.

      Often, when setting up string tabs this way, you don't want the @@ -632,14 +749,14 @@ this is to use the groff \(lq and \(rq (leftquote and rightquote respectively) whenever double-quotes are required in the string passed to PAD. -
      +


      Change/set the marker used with PAD


      -Macro: PAD_MARKER <character to use as the pad marker> +Macro: PAD_MARKER <character to use as the pad marker>

      If you need to change mom's default pad marker @@ -658,7 +775,7 @@ Once you've changed the pad marker, the new marker remains in effect for every instance of PAD until you change it again (say, back to the pound sign). -
      +

      @@ -714,7 +831,7 @@ with leaders. The result looks like this:


      Change/set the leader character


      -Macro: LEADER_CHARACTER <character> +Macro: LEADER_CHARACTER <character>

      LEADER_CHARACTER takes one argument: a single @@ -736,7 +853,7 @@ default (a period) to the underscore character, enter


      Drop caps


      -Macro: DROPCAP <dropcap letter> <number of lines to drop> [ COND <percentage> | EXT <percentage> ] +Macro: DROPCAP <dropcap letter> <number of lines to drop> [ COND <percentage> | EXT <percentage> ]

      The first two arguments to DROPCAP are the letter you @@ -812,6 +929,8 @@ rest she solves with macros that change the default behaviour of
      DROPCAP_FONT,
      +DROPCAP_COLOR, +
      DROPCAP_ADJUST
      and @@ -862,10 +981,22 @@ e.g. points, therefore do not append any unit of measure -to the argument. And always be sure to preprend the plus or +to the argument. And always be sure to prepend the plus or minus sign, depending on whether you want the drop cap larger or smaller. + +

      DROPCAP_COLOR

      + +If you'd like your drop cap colourized, simply invoke +DROPCAP_COLOR with the name of a colour you've already +created ("initialized") with +NEWCOLOR +or +XCOLOR. Only the drop cap will be +colourized; all other text will remain at the current colour +default (usually black). +

      DROPCAP_GUTTER

      By default, mom puts three points of space @@ -916,7 +1047,6 @@ I'm neither a mathematician nor a chemist, so I don't need them. Of course, anyone who wishes to contribute a subscript routine to mom will receive eternal blessings not only in this lifetime, but in all lifetimes to come. -


      Next   diff --git a/contrib/groff/contrib/mom/momdoc/headfootpage.html b/contrib/groff/contrib/mom/momdoc/headfootpage.html index b82cac22f09d..723b18110575 100644 --- a/contrib/groff/contrib/mom/momdoc/headfootpage.html +++ b/contrib/groff/contrib/mom/momdoc/headfootpage.html @@ -1,3 +1,4 @@ + @@ -10,10 +11,11 @@ Next   Prev   Back to Table of Contents +

      -

      DOCUMENT HEADERS, FOOTERS, AND PAGINATION

      +

      PAGE HEADERS, FOOTERS, AND PAGINATION

      +
    25. Control macros for headers/footers
      • Header/footer strings +
      • Header/footer style
      • Pagination @@ -64,7 +71,6 @@

        Introduction

        -

        Headers and footers, @@ -110,16 +116,17 @@ correspondingly dense at this point. above or below running text is technically a kind of header/footer, mom and this documentation treat it as a separate page element. +

        General description of headers/footers

        -Headers comprise three distinct parts: a left part, a center part, +Headers comprise three distinct parts: a left part, a centre part, and a right part. Each part contains text (a "string") that identifies some aspect of the document as a whole.

        The left part ("header left") lines up with the document's -left margin. The center part ("header center") is -centered on the document's line length. The right part ("header +left margin. The centre part ("header centre") is +centred on the document's line length. The right part ("header right") lines up with the document's right margin. Not all parts need contain a string, and if you don't want headers at all, you can turn them off completely. @@ -134,7 +141,7 @@ to the document type selected with DOCTYPE. You can, however, supply whatever strings you like -- including page numbers -- to go in any part of headers. What's more, you can set the -family, font, size and capitalisation style (caps or caps/lower-case) +family, font, size and capitalization style (caps or caps/lower-case) for each header part individually.

        By default, mom prints a horizontal rule beneath @@ -143,11 +150,12 @@ footers, the rule is above running text. You can increase or decrease the space between the header and the rule if you like (with HEADER_RULE_GAP), or remove it completely. +

        Default specs for headers/footers

        Mom makes small type adjustments to each part of -the header (left, center, right) to achieve an aesthetically +the header (left, centre, right) to achieve an aesthetically pleasing result. The defaults are listed below. (The strings mom puts by default in each part are explained in DOCTYPE.) @@ -161,6 +169,7 @@ TYPE SPEC HEADER LEFT HEADER CENTER HEADER RIGHT --------- ----------- ------------- ------------ Family document default document default document default Font roman italic roman +Colour (black) (black) (black) All caps no no yes Size* -.5 (points) -.5 (points) -2 (points) (-2 if all caps) (-2 if all caps) (-.5 if not all caps) @@ -175,7 +184,9 @@ up, mom has a special macro, that removes all type adjustments to headers. The straightforward type specs for paragraphs are used instead, providing a simple reference point for any alterations you want to make to the family, -font, size and capitalisation style of any header part. +font, size and capitalization style of any header part. +

        +

        Vertical placement and spacing of headers/footers

        As explained in the section on @@ -184,7 +195,7 @@ the top and bottom margins of a mom document are the vertical start and end positions of running text, not the vertical positions of headers or footers, which, by definition, -appear in the margin above (or below) running text. +appear in the margins above (or below) running text.

        The vertical placement of headers is controlled by the macro @@ -208,7 +219,10 @@ running text at whatever top margin you gave. FOOTER_GAP and B_MARGIN work similarly, except they determine where running text -ends on the page. +ends on the page. (See +FOOTER MARGIN AND BOTTOM MARGIN -- VERY IMPORTANT! +for a warning about possible conflicts between the footer margin +and the bottom margin.)

        Confused? Mom apologizes. It's really quite simple. By default, mom sets headers 4-1/2 @@ -238,7 +252,7 @@ or the bottom of the page, is managed exactly as if the page numbers were headers (or footers), and are controlled by the same macros. See Pagination control. -
        +


        @@ -272,14 +286,14 @@ automatically turned off. Equally, if footers are on, headers you'd prefer footers in a document, you need only invoke FOOTERS; there's no need to turn headers off first. -
        +


        -Macro: HEADERS toggle +Macro: HEADERS toggle

        Page headers @@ -311,14 +325,14 @@ Explicitly invoking footers moves page numbering to the top of the page, where its placement and spacing are the same as for headers. (I.e. the top margin of running text remains 7.5 picas.) -
        +


        -Macro: FOOTERS toggle +Macro: FOOTERS toggle

        Page footers @@ -342,14 +356,14 @@ page of a document, nor on first pages after COLLATE. If you don't want this behaviour, you can change it with PAGENUM_ON_FIRST_PAGE. -
        +


        -Macro: FOOTER_ON_FIRST_PAGE toggle +Macro: FOOTER_ON_FIRST_PAGE toggle

        If you invoke @@ -357,9 +371,9 @@ If you invoke mom, by default, does not print a footer on the first page of the document. (The docheader -on page makes it redundant.) However, should you wish a footer on +on page 1 makes it redundant.) However, should you wish a footer on page 1, invoke FOOTER_ON_FIRST_PAGE without any argument. -
        +


        @@ -377,8 +391,8 @@ information contained in the headers/footers split over two pages, as is often the case with recto/verso documents.

        Say, for example, you want recto page headers to contain a document's -author, centered, and verso page headers to contain the document's -title, also centered, like this: +author, centred, and verso page headers to contain the document's +title, also centred, like this:

         	+------------------------+   +------------------------+     
        @@ -403,17 +417,17 @@ With mom's standard 3-part headers, this isn't
         possible, even when
         RECTO_VERSO
         is enabled.  RECTO_VERSO switches the left and
        -right parts of headers on alternate pages, but the center
        +right parts of headers on alternate pages, but the centre
         part remains unchanged.
         

        -Anytime you need distinctly different headers on alternate +Any time you need distinctly different headers on alternate pages, mom has macros that let you manually design and determine what goes into headers on recto pages, and what goes into headers on verso pages. The macros are HEADER_RECTO and HEADER_VERSO. -Both allow you to state whether the header is flush left, centered, +Both allow you to state whether the header is flush left, centred, or flush right, and both take a single string argument with which, by combining text and @@ -421,18 +435,19 @@ with which, by combining text and you can make the headers come out just about any way you want. Use of the \*[PAGE#] escape is permitted in the string argument (see -Including the page number in header-left, -center or -right), -and mom provides a special mechanism whereby -it's possible to "pad" it as well. -
        +Including the page number in header-left, -centre or -right), +and as an added bonus, mom provides a special +mechanism whereby it's possible to "pad" the string as well. +


        -Macro: HEADER_RECTO LEFT | CENTER | RIGHT "<header recto string>" -Macro: HEADER_VERSO LEFT | CENTER | RIGHT "<header verso string>" +Macro: HEADER_RECTO LEFT | CENTER | RIGHT "<header recto string>" +
        +Macro: HEADER_VERSO LEFT | CENTER | RIGHT "<header verso string>"

        @@ -451,7 +466,10 @@ place of LEFT, CENTER and surrounded by double-quotes, containing what you want in the header. HEADER_RECTO disables mom's normal 3-part headers, therefore anything you want in the -headers must be entered by hand in the string. +headers must be entered by hand in the string, including colours +(via the +inline escape +\*[<colorname>]).

        By default, HEADER_RECTO is set at the same size, and in the same family and font, as paragraph text. The @@ -471,9 +489,9 @@ inline escapes.

        To include the current page number in the string, use the \*[PAGE#] inline. +
        -

        Padding the HEADER_RECTO/HEADER_VERSO string

        -

        +

        *Padding the HEADER_RECTO/HEADER_VERSO string

        You can "pad" the header-recto string, a convenience you'll appreciate in circumstances such as the following.

        @@ -504,7 +522,9 @@ point in the string where you want an equalized amount of whitespace inserted. (If you're unsure what padding is, see Insert space into lines.) Note that if you're padding the string, it doesn't matter what -quad direction you give HEADER_RECTO. +quad direction you give HEADER_RECTO since +padding, by its nature, justifies text to the left and right +margins.

        The situation depicted above is accomplished like this:

        @@ -517,6 +537,16 @@ Note that mom does not interpret the # in \*[PAGE#] as a padding marker (i.e. as a place to insert whitespace).

        +Also, notice that the argument LEFT is used in both +cases. When padding a header, it doesn't matter whether you use +LEFT, CENTER or RIGHT as the argument. +

        +Furthermore, should you need a user-defined header of +the sort provided by HEADER_RECTO and +HEADER_VERSO but aren't actually printing +recto/verso, you can use HEADER_RECTO to design the +header that appears at the top of every page. +

        IMPORTANT: The PAD_MARKER macro, which changes the default pad marker (#) used by @@ -524,20 +554,20 @@ macro, which changes the default pad marker (#) used by has no effect on the pad marker used in the HEADER_RECTO string. If you absolutely must have a literal pound sign in your HEADER_RECTO -string, use the escape sequence \N'35' where you want -the pound sign to go. -
        +string, use the escape sequence for the pound sign +(\[sh]) where you want the pound sign to go. +


        Control macros for headers/footers

        -

        Virtually every part of headers (see the paragraph on how "headers" means "footers" in the introduction to headers/footers) can be designed to your own specifications. +

        Header/footer control macros

        @@ -548,23 +578,28 @@ can be designed to your own specifications.
      • STYLE
        • Part-by-part changes -
        • _FAMILY -- left, center or right family -
        • _FONT   -- left, center or right font -
        • _SIZE   -- left, center or right size -
        • _CAPS   -- left, center or right all caps +
        • _FAMILY -- left, centre or right family +
        • _FONT   -- left, centre or right font +
        • _SIZE   -- left, centre or right size +
        • _CAPS   -- left, centre or right all caps +
        • _COLOR  -- left, centre or right colour
      • VERTICAL PLACEMENT AND SPACING @@ -584,20 +620,20 @@ can be designed to your own specifications.

        Header/footer strings

        - Macro: HEADER_LEFT "<text of header left>" | # + Macro: HEADER_LEFT "<text of header left>" | #
        - Macro: HEADER_CENTER "<text of header center>" | # + Macro: HEADER_CENTER "<text of header centre>" | #
        - Macro: HEADER_RIGHT "<text of header right>" | # + Macro: HEADER_RIGHT "<text of header right>" | #

        -To change the text (the "string") of the left, center, -or right part of headers, invoke the appopriate macro above with +To change the text (the "string") of the left, centre, +or right part of headers, invoke the appropriate macro above with the string you want. For example, mom, by default, prints the document's author in the header-left position. If your document has, say, two authors, and you want both their names to @@ -614,11 +650,155 @@ they must be enclosed in double-quotes.

        NOTE: Replace HEADER_, above, with FOOTER_ to change the strings in footers. + +

        *Padding the header/footer centre string

        +

        +Macro: HEADER_CENTER_PAD LEFT | RIGHT <amount of space by which to pad centre string left or right>
        +*Requires a unit of measure +

        +By default, mom centres the header centre string +literally on the line length in effect for page headers. In some +cases, notably when the header left or header right strings are +particularly long, the effect isn't pretty. The offendingly long +header left or right crowds, or even overprints, the header centre. +That's where HEADER_CENTER_PAD comes in. With a +bit of experimentation (yes, you have to preview the document), you +can use HEADER_CENTER_PAD to move the header +centre string left or right until it looks acceptably centred +between the two other strings. +

        +For example, say your document is an outline for a novel called "By +the Shores of Lake Attica." You've told mom +you want +

        +    DOCTYPE + +NAMED "Outline" +

        +but when you preview your work, you see that "Outline", in the +centre of the page header, is uncomfortably close to the title, +which is to the right of it. By invoking +

        +

        +	.HEADER_CENTER_PAD RIGHT 3P
        +
        + +you can scoot the word "Outline" over three +picas +to the left (the padding's added to the right of the string) +so that your head looks nicely spaced out. Invoking +HEADER_CENTER_PAD with the LEFT +argument obviously puts the padding on the left side of the string. +

        +Most reassuring of all is that if you use +HEADER_CENTER_PAD conjunction with +RECTO_VERSO, +mom will pad the centre string appropriately left +OR right, depending on which page you're on, without you having to +tell her to do so. +

        + +


        +

        +

        Using mom's "reserved" strings in header/footer definitions

        +

        +As pointed out in the author's note in the introduction to +headers/footers, headers and footers are something you don't +normally have to worry much about. Mom usually +knows what to do. +

        +However, situations do arise where you need to manipulate what goes +in the header/footer strings, setting and resetting them as you go +along. A case where you might want to do this would be if you want +to output endnotes at the end of each document in a series of +collated +documents, and you want the word "Endnotes" to go in the header +centre position of the endnotes, but want, say, the +TITLE +to go back into the centre position for the next output document. +

        +In scenarios like the above, mom has a number of +"reserved" strings that you can plug into the +HEADER_LEFT, _CENTER and _RIGHT +macros. They are: +

        +

        +	\*[$TITLE]          -- the argument passed to .TITLE
        +	\*[$DOCTITLE]       -- the argument passed to .DOCTITLE
        +	\*[$AUTHOR_1]       -- the first argument passed to .AUTHOR
        +	\*[$CHAPTER_STRING] -- the argument passed to .CHAPTER_STRING,
        +	                       if invoked, otherwise, "Chapter"
        +	\*[$CHAPTER]        -- the argument (typically a number) passed
        +	                       to .CHAPTER
        +	\*[$CHAPTER_TITLE]  -- the argument passed to .CHAPTER_TITLE
        +
        + +Returning to the scenario above, first, you'd define a centre +string for the endnotes page: +

        +

        +	.HEADER_CENTER "Endnotes"
        +
        + +Then, you'd output the endnotes: +

        +

        +	.ENDNOTES
        +
        + +Then, you'd prepare mom for the next document: +

        +

        +	.COLLATE
        +	.TITLE "New Doc Title"
        +	.AUTHOR "Josephine Blough"
        +
        + +Then, you'd redefine the header centre string using the reserved +string \*[$TITLE], like this: +

        +

        +	.HEADER_CENTER "\*[$TITLE]"
        +
        + +And last, you'd do: +

        +

        +	.START
        +
        + +Voilà! Any argument you pass to TITLE from here +on in (say, for subsequent documents) is back in the header centre +position. Here's the whole routine again: +

        +

        +	.HEADER_CENTER "Endnotes"
        +	.ENDNOTES
        +	.COLLATE
        +	.TITLE         "New Doc Title"
        +	.AUTHOR        "Josephine Blough"
        +	.HEADER_CENTER "\*[$TITLE]"
        +	.START
        +
        + +If need be, you can concatenate the strings, as in the following +example. +

        +

        +	.HEADER_CENTER "\*[$CHAPTER_STRING] \*[$CHAPTER]"
        +
        + +which, assuming a .CHAPTER_STRING of +"Chapter" and a .CHAPTER of +"2", would put "Chapter 2" in the header centre +position. +

        -

        Replacing header-left, -center or -right with the page number

        +

        *Replacing header-left, -CENTER or -right with the page number

        +

        If you would like to have the current page number to appear header-left, -center, or -right instead of a text string, invoke the appropriate macro, above, with the single @@ -630,12 +810,14 @@ double-quotes. For example, .HEADER_CENTER #

      • -will print the current page number in the center part of +will print the current page number in the CENTER part of headers. +

        -

        Including the page number in header-left, -center or -right

        +

        *Including the page number in header-left, -CENTER or -right

        +

        If you would like to include the current page number in the string you pass to HEADER_LEFT, _CENTER, or _RIGHT, use the special @@ -653,7 +835,7 @@ invoke HEADER_RIGHT as follows: Header-right of page two will read "page 2 of 10", header-right of page three will read "page 3 of 10", and so on. -
        +


        @@ -674,12 +856,13 @@ Please note that HEADER_FAMILY and
      • HEADER_FAMILY
      • HEADER_SIZE
      • HEADER_PLAIN +
      • HEADER_COLOR

      - Macro: HEADER_FAMILY <family> + Macro: HEADER_FAMILY <family>

      @@ -693,12 +876,12 @@ typesetting macro

      NOTE: Replace HEADER_, above, with FOOTER_ to change the footer family. -
      +


      - Macro: HEADER_SIZE <+|-number of points> + Macro: HEADER_SIZE <+|-number of points>
      *Argument is relative to the point size of type in paragraphs
      @@ -740,7 +923,7 @@ You'll most likely require this when the COPYSTYLE is DRAFT, since portions of the header may overprint if, say, the title of your document is very long. -
      +


      @@ -762,7 +945,33 @@ and point size as she uses in paragraphs. NOTE: Replace HEADER_, above, with FOOTER_ to disable mom's default behaviour for the various elements of footer style. -
      +

      + +


      +

      + + Macro: HEADER_COLOR <colorname> + + +

      +If you want your headers in a colour different from the document +default (usually black), invoke HEADER_COLOR with +the name of a colour pre-defined (or "initialized") with +NEWCOLOR +or +XCOLOR. +

      +HEADER_COLOR will set all the parts of the header +AND the header rule in the colour you give it as an argument. If +you wish finer control over colour in headers, you can use +HEADER_<POSITION>_COLOR +to colourize each part of the header separately, as well as +HEADER_RULE_COLOR +to change the colour of the header rule. +

      +NOTE: Replace HEADER_, above, +with FOOTER_ to colourize footers. +


      @@ -777,12 +986,13 @@ or RIGHT as appropriate.

    26. HEADER_<POSITION>_FONT
    27. HEADER_<POSITION>_SIZE
    28. HEADER_<POSITION>_CAPS +
    29. HEADER_<POSITION>_COLOR

      - Macro: HEADER_<POSITION>_FAMILY <family> + Macro: HEADER_<POSITION>_FAMILY <family>

      Use HEADER_<POSITION>_FAMILY to change the @@ -794,12 +1004,12 @@ for an explanation of how control macros ending in

      NOTE: Replace HEADER_, above, with FOOTER_ to change a footer part's family. -
      +


      - Macro: HEADER_<POSITION>_FONT <font> + Macro: HEADER_<POSITION>_FONT <font>

      Use HEADER_<POSITION>_FONT to change the @@ -811,12 +1021,12 @@ for an explanation of how control macros ending in

      NOTE: Replace HEADER_, above, with FOOTER_ to change a footer part's font. -
      +


      - Macro: HEADER_<POSITION>_SIZE <+|-number of points> + Macro: HEADER_<POSITION>_SIZE <+|-number of points>

      Use HEADER_<POSITION>_SIZE to change the size of any @@ -828,12 +1038,12 @@ for an explanation of how control macros ending in

      NOTE: Replace HEADER_, above, with FOOTER_ to change a footer part's size. -
      +


      - Macro: HEADER_<POSITION>_CAPS toggle + Macro: HEADER_<POSITION>_CAPS toggle

      HEADER_<POSITION>_CAPS is a @@ -853,7 +1063,50 @@ QUIT, END, X...). NOTE: Replace HEADER_, above, with FOOTER_ to change a footer part's capitalization style. -
      + +

      +


      +

      + + Macro: HEADER_<POSITION>_COLOR <colorname> + +

      +HEADER_<POSITION>_COLOR allows you to set a +colour for each of the three possible parts of a page header +separately. For example, say you want the right part of the header +(by default, the document title) in red, this is how you'd get it: +

      +

      +	.HEADER_RIGHT_COLOR red
      +
      + +The other parts of the header will be in the default header colour +(usually black, but that can be changed with +HEADER_COLOR). +

      +Remember that you have to define (or "initialize") a +colour with +NEWCOLOR +or +XCOLOR +before you can use the colour. +

      +If you create a +user-defined header +with +HEADER_RECTO +or +HEADER_VERSO, +and you want various elements within the header to be colourized, +embed the colours in the string passed to HEADER_RECTO +or HEADER_VERSO with the +\*[<colorname>] +inline escape. +

      +NOTE: Replace HEADER_, above, +with FOOTER_ to set the colours for the various +elements of footers. +


      @@ -867,14 +1120,14 @@ See Vertical placement and spacing of headers/footers for an explanation of how mom deals with headers, footers, and top/bottom page margins. -
      +


      -Macro: HEADER_MARGIN <distance to baseline of header> +Macro: HEADER_MARGIN <distance to baseline of header>
      *Requires a unit of measure @@ -902,11 +1155,60 @@ edge of the page to the baseline of type in footers.

      Mom's default footer margin is 3 picas. + +

      -NOTE: Mom uses -HEADER_MARGIN and +FOOTER MARGIN AND BOTTOM MARGIN -- VERY IMPORTANT! +

      +Mom requires a footer margin for proper operation, +hence she sets one, even if you don't. (As stated above, her default +footer margin is 3-picas). +

      +If you set a bottom margin for your document (with +B_MARGIN, +prior to +START) +and the margin's too close to mom's default +footer margin (or a footer margin you set yourself +with FOOTER_MARGIN), mom will +not print your footers; additionally, she'll give you a warning +and some advice on standard error. When this happens, you must +reset either B_MARGIN or +FOOTER_MARGIN so there's an adequate amount of +space for mom to print the bottom line of running +text and the footer. +

      +If you see the warning even when footers and/or bottom-of-page page +numbering are disabled, set a nominal footer margin of 0 prior to +START, +as in these examples. +

      +Example 1 +

      +

      +	<reference macros, etc>
      +	.PAGINATION    OFF
      +	.B_MARGIN      .25i
      +	.FOOTER_MARGIN O
      +	.START
      +
      + +Example 2 +

      +

      +	<reference macros, etc>
      +	.HEADERS       OFF
      +	.PAGENUM_POS   TOP RIGHT
      +	.B_MARGIN      .25i
      +	.FOOTER_MARGIN O
      +	.START
      +
      + +

      A note on header/footer margins and page numbering

      +Mom uses HEADER_MARGIN
      and FOOTER_MARGIN to establish the baseline -position of page numbers in addition to headers and footers. +position of page numbers in addition to the baseline position of +headers and footers.

      By default, page numbers appear at the bottom of the page, therefore if you want the default position (bottom), but want to change the @@ -918,14 +1220,14 @@ there with PAGENUM_POS, you'd use HEADER_MARGIN to change their baseline placement. -
      +


      -Macro: HEADER_GAP <distance from header to start of running text> +Macro: HEADER_GAP <distance from header to start of running text>
      *Requires a unit of measure @@ -950,7 +1252,7 @@ top margin.

      Mom's default header gap is 3 picas, -but if you want a different gap, say, 2 centimeters, do +but if you want a different gap, say, 2 centimetres, do

       	.HEADER_GAP 2c
      @@ -987,7 +1289,7 @@ the last line of running text and a bottom page number, use
       FOOTER_GAP.  If page numbers are at the top of the
       page, change the gap between the number and the first line of running
       text with HEADER_GAP.
      -
      +


      @@ -1010,14 +1312,14 @@ footer), you can alter its placement.

      -Macro: HEADER_RULE toggle +Macro: HEADER_RULE toggle

      By default, mom prints a header separator rule @@ -1036,14 +1338,14 @@ without any argument. with FOOTER_ to enable/disable the printing of the footer separator rule. (Most likely, if you're using FOOTERS, you'll want it off.) -
      +


      -Macro: HEADER_RULE_GAP distance of rule beneath header +Macro: HEADER_RULE_GAP distance of rule beneath header
      *Requires a unit of measure @@ -1057,7 +1359,7 @@ required, and decimal fractions are allowed. Please note that (i.e. HEADER_RULE_GAP is NOT added to HEADER_GAP when mom calculates the space between headers and the start of -running text. +running text).

      By default, the header rule gap is 4 points. @@ -1087,7 +1389,34 @@ footer or mom may not get the rule gap right. Inline changes to the size of type in FOOTER_RECTO and FOOTER_VERSO should always be negative (smaller) than the default. -
      +

      + + + +


      +

      + +Macro: HEADER_RULE_COLOR <colorname> + +

      +If you wish to change the colour of the header rule, invoke +HEADER_RULE_COLOR with the name of a colour +pre-defined (or "initialized") with +NEWCOLOR +or +XCOLOR. +

      +Please note that HEADER_RULE_COLOR overrides the +colour set with +HDRFTR_COLOR, +so that it's possible to have the heads entirely in, say, blue (set +with HEADER_COLOR), and the header rule in, say, +red. +

      +NOTE: Replace HEADER_, above, +with FOOTER_ to change the colour of the footer +rule. +


      @@ -1096,11 +1425,11 @@ should always be negative (smaller) than the default.

      By default, mom paginates documents. Page numbers -appear in the bottom margin of the page, centered between two hyphens. +appear in the bottom margin of the page, centred between two hyphens. As with all elements of mom's document processing, most aspects of pagination style can be altered to suit your taste with control macros. -
      +

      Pagination macros list

      @@ -1114,14 +1443,14 @@ with control macros.
    30. DRAFT_WITH_PAGENUMBER -- attach draft/revision information to page numbers
    31. Control macros -
      +


      -Macro: PAGINATE toggle +Macro: PAGINATE toggle
      Alias: PAGINATION @@ -1137,14 +1466,14 @@ NO, QUIT, END, X...), e.g. To (re)start pagination, invoke PAGINATE without any argument. -
      +


      -Macro: PAGENUMBER <number> +Macro: PAGENUMBER <number>

      As is to be expected, pagination of documents begins at page 1. @@ -1157,34 +1486,34 @@ number on the first page of a document, invoke any time to tell mom what number you want a page to have. Subsequent page numbers will, of course, be incremented by 1 from that number. -
      +


      -Macro: PAGENUM_STYLE DIGIT | ROMAN | roman | ALPHA | alpha +Macro: PAGENUM_STYLE DIGIT | ROMAN | roman | ALPHA | alpha

      PAGENUM_STYLE lets you tell mom what kind of page numbering you want.

  • i = inches
    p = points
    P = picas -
    c = centimeters +
    c = centimetres
    m = ems
    n = ens
    v = the current leading (line space)
    -
    DIGIT=arabic digits (1, 2, 3...) +
    DIGIT=Arabic digits (1, 2, 3...)
    ROMAN=upper case roman numerals (I, II, III...)
    roman=lower case roman numerals (i, ii, iii...)
    ALPHA=upper case letters (A, B, C...)
    alpha=lower case letters (a, b, c...)
    -
    +


    -Macro: PAGENUM_ON_FIRST_PAGE toggle +Macro: PAGENUM_ON_FIRST_PAGE toggle

    This macro applies only if you've enabled @@ -1207,7 +1536,7 @@ page of a document, but do want one on pages that appear after START of the document, then invoke it either just before or after your first COLLATE. -
    +

    @@ -1219,7 +1548,7 @@ Macro: DRAFT_WITH_PAGENUMBER

    Sometimes, in COPYSTYLE DRAFT, -the center part of page headers gets overcrowded because of the draft +the CENTER part of page headers gets overcrowded because of the draft and revision information that go there by default. DRAFT_WITH_PAGENUMBER is one way to fix the problem. @@ -1236,7 +1565,7 @@ See the note in COPYSTYLE DRAFT for other ways of dealing with crowded page headers when formatting draft-style copy. -
    +


    @@ -1244,12 +1573,12 @@ draft-style copy.

    Pagination control macros

      -
    1. Family/font/size +
    2. Family/font/size/colour
    3. Page number position (vertical and horizontal)
    4. Enclose page numbers with hyphens (on or off)

    -

    1. Page number family/font/size

    +

    1. Page number family/font/size/colour

    See Arguments to the control macros. @@ -1258,11 +1587,12 @@ See .PAGENUM_FAMILY default = prevailing document family; default is Times Roman .PAGENUM_FONT default = roman .PAGENUM_SIZE default = 0 (i.e. same size as paragraph text) +.PAGENUM_COLOR default= black

    2. Page number position

    -Macro: PAGENUM_POS TOP | BOTTOM  LEFT | CENTER | RIGHT +Macro: PAGENUM_POS TOP | BOTTOM  LEFT | CENTER | RIGHT

    Use PAGENUM_POS to change the default position of @@ -1275,14 +1605,15 @@ For example, if you turn both and footers off (with .HEADERS OFF and .FOOTERS -OFFmom to number your +OFF) and you want mom to number your pages at the top right position, enter

     	.PAGENUM_POS TOP RIGHT
     
    -

    3. Enclose page numbers with hyphens (on or off)

    +

    3. Enclose page numbers with hyphens (on or off)

    +

    By default, mom encloses page numbers between hyphens. If you don't want this behaviour, invoke the macro PAGENUM_HYPHENS with any argument (OFF, QUIT, END, X...), @@ -1294,8 +1625,8 @@ like this: If, for some reason, you want to turn page number hyphens back on, invoke the macro without an argument. -

    +


    Next   Prev   diff --git a/contrib/groff/contrib/mom/momdoc/inlines.html b/contrib/groff/contrib/mom/momdoc/inlines.html index 2d8aa82a9a30..9409aab9320d 100644 --- a/contrib/groff/contrib/mom/momdoc/inlines.html +++ b/contrib/groff/contrib/mom/momdoc/inlines.html @@ -1,3 +1,4 @@ + @@ -7,19 +8,19 @@ -Next   +Next   Prev   Back to Table of Contents -

    +

    Inline escapes -

    - + +

    Introduction to inline escapes
    Index of inline escapes -
    +

    Introduction to inline escapes

    @@ -52,14 +53,14 @@ backslash character as part of a line of text, simply enter it twice character." (You can also use \e to print a literal backslash.)

    -Groff has a number of ways of recognising what constitutes a complete +Groff has a number of ways of recognizing what constitutes a complete escape sequence. This is both a boon and a curse; some escape sequences have no terminating delimiter and consequently become difficult to distinguish from real input text. Others require the use of an opening parenthesis with no corresponding closing parenthesis. Still others need to be enclosed in square brackets.

    -Mom recognises that certain escapes get used more +Mom recognizes that certain escapes get used more often than others. For these, she has a consistent input style that takes the form \*[...], which makes them stand out well from the text of your documents. These escapes are the ones listed under @@ -88,6 +89,8 @@ that take

  • Pairwise kerning
  • Horizontal movement
  • Vertical movement +
  • Terminate a line without advancing on the page +
  • Call the next sequential tab without advancing on the page
  • Full measure rules
  • Groff inline escapes @@ -100,6 +103,7 @@ that take
  • Special characters +


    @@ -109,27 +113,43 @@ that take

    Changing fonts

    -Mom provides five inlines to change fonts -inline. +Mom provides five escapes for changing fonts +inline:

    - - +
    \*[ROM]Change font to roman -
    \*[IT]Change font to italic -
    \*[BD]Change font to bold -
    \*[BDI]Change font to bold italic -
    \*[PREV]Revert to previous font
    + + + + + + + + + + + + + + + + + + + +
    \*[ROM]Change font to medium roman
    \*[IT]Change font to medium italic
    \*[BD]Change font to bold roman
    \*[BDI]Change font to bold italic
    \*[PREV]Revert to previous font

    -See also -font control with \f -for other ways to change fonts inline. +These escapes are provided for merely for convenience, legibility, +and consistency when typesetting with mom. For +more complete and flexible inline font control, please see +font control with \f.

    NOTE: If you're using the document processing macros, inline font changes remain in effect only for the duration of the -current macro. -
    +current document element tag. +

    @@ -137,42 +157,59 @@ current macro.

    Changing point size

    -Mom's inline escape for changing point -size, sadly, does not observe her normal inline syntax -\*[whatever]. It's the only exception, and there's -no way around it. The escape for changing point size looks like this: +Mom has two inline escapes for changing point +size:

    -	\*S[size]
    +	\*[SIZE <size>]
     
    -where "size" is the new size you want. For example, to -change the point size inline to 12 points, you'd enter +and +

    +

    +	\*[S<size>]
    +
    + +where "size" is the new size you want. You can use +either; they behave exactly the same way. For example, to change +the point size of type inline to 12 points, you could enter either +

    +

    +	\*[SIZE 12]
    +
    + +or

     	\*S[12]
     
    -Notice that the new size does not require a +The advantage of the first form is that it's easy to remember, and +follows mom's usual inline syntax. The advantage +of the second is that it's more concise. +

    +Notice that in both cases, the new size does not require a unit of measure; points -is assumed. However, a unit of measure may be appended to the size, +is assumed. However, a unit of measure may be appended to the size if that's what you wish. Fractional sizes are, of course, allowed.

    -The size given to \*S may be expressed in plus -or minus terms, which can be very useful. In the following -example, the word "mom" will be output 2 points larger -than the point size of the rest of the line. +The size given to \*[SIZE <size>] or +\*S[<size>] may be expressed in plus or minus +terms, which can be very useful. In the following examples, the word +"mom" will be output 2 points larger than the point size +of the rest of the line.

     	While she isn't perfect, \*S[+2]mom\*S[-2] isn't half bad.
    +	While she isn't perfect, \*[SIZE +2]mom\*[SIZE -2] isn't half bad.
     
    NOTE: If you're accustomed to groff's usual way of handling inline size requests (\sN, \s±N, \s(NN, \s±(NN, \s[NNN], \s±[NNN]), feel free to continue with your old habits. Mom doesn't care. -
    +

    @@ -187,16 +224,20 @@ for more details).

    Mom permits inline pairwise kerning through the use of the inline escapes -

    - -
    \*[BU #]Closes the space between letters (Back Units). -
    \*[FU #]Opens the space between letters (Forward Units). + + + + + + + + +
    \*[BU n]
    Closes the space between letters (Back Units).
    \*[FU n]
    Opens the space between letters (Forward Units).

    -"#" is the number of kern units -by which to close or open the space between letters. Decimal fractions -are allowed. +"n" is the number of +kern units +by which to close or open the space between letters.

    For example,

    @@ -210,14 +251,15 @@ to the letter W. Additionally, the letter T in "WATER" is moved 5 kern units closer to the letter A.

    For backward compatibility, the forms -

    - - + + diff --git a/contrib/groff/contrib/mom/momdoc/rectoverso.html b/contrib/groff/contrib/mom/momdoc/rectoverso.html index 88e661eaddfa..064490379e61 100644 --- a/contrib/groff/contrib/mom/momdoc/rectoverso.html +++ b/contrib/groff/contrib/mom/momdoc/rectoverso.html @@ -1,3 +1,4 @@ + @@ -10,14 +11,12 @@ Next   Prev   Back to Table of Contents +

    + -

    RECTO/VERSO PRINTING and COLLATING

    - - - -

    Recto/verso and collating

    +

    RECTO/VERSO PRINTING and COLLATING

      @@ -57,7 +56,7 @@ of the following aspects of alternating page layout: if user-defined, single string recto/verso headers or footers are used in place of the default 3-part headers or footers -
    • switching the page number position (if page numbers are not centered) +
    • switching the page number position (if page numbers are not centred)

    It is beyond the scope of this documentation to cover the different @@ -74,8 +73,7 @@ appropriately, put them back in your printer, and have work from the command line, check out the man pages for pstops and psbook. There are other programs out there as well to help with two-sided printing. -
    - +

    Recto/verso macros list

    @@ -85,6 +83,7 @@ programs out there as well to help with two-sided printing.
  • RECTO_VERSO
  • SWITCH_HEADERS (also FOOTERS) +


    @@ -92,7 +91,6 @@ programs out there as well to help with two-sided printing.

    Recto/verso printing

    -
    Macro: RECTO_VERSO

    @@ -122,11 +120,11 @@ and (before or after START).

    Equally, recto/verso only switches the page number position if page -numbers aren't centered, which means you have to set the page +numbers aren't centred, which means you have to set the page number position with PAGENUM_POS (before or after START). -
    +

    @@ -134,7 +132,6 @@ number position with

    Switch header left part/right part

    -
    Macro: SWITCH_HEADERS

    @@ -144,7 +141,7 @@ string (by default, the document title). If you don't like mom's default placement of author and title, use SWITCH_HEADERS to reverse it.

    -SWITCH_HEADERS can also be useful in conjuction +SWITCH_HEADERS can also be useful in conjunction with RECTO_VERSO. The assumption of RECTO_VERSO is that the first @@ -160,7 +157,7 @@ respect to headers) will come out as you want.

    NOTE: Replace _HEADERS, above, with _FOOTERS if your document uses footers. -
    +


    @@ -205,15 +202,14 @@ files, chances are the PRINTSTYLE's already there.
    1. Do not collate documents of differing PRINTSTYLES (i.e. don't try to - collate a TYPESET document and TYPEWRITE document -- - why would you want to do that anyway?) + collate a TYPESET document and TYPEWRITE document).
    2. Use DOC_FAMILY instead of FAMILY if, for some reason, you want to change the family of all the document elements after COLLATE. FAMILY, by itself, will change the family of paragraph text only.
    -
    +

    @@ -221,7 +217,7 @@ files, chances are the PRINTSTYLE's already there.

    Collate document files

    -
    + Macro: COLLATE

    @@ -239,14 +235,14 @@ that require their own titles, looks like this:

     	.COLLATE
    -	.CHAPTER_STRING "Geek Fatigue: Symptoms and Causes"
    +	.CHAPTER_TITLE "Geek Fatigue: Symptoms and Causes"
     	.START
     
    NOTE: See the two words of caution, above. -
    +


    Next   diff --git a/contrib/groff/contrib/mom/momdoc/refer.html b/contrib/groff/contrib/mom/momdoc/refer.html new file mode 100644 index 000000000000..bda1e4bca48e --- /dev/null +++ b/contrib/groff/contrib/mom/momdoc/refer.html @@ -0,0 +1,1482 @@ + + + + +Mom -- Bibliographies and References + + + + + +Next   +Prev   +Back to Table of Contents + + +

    + Bibliographies and references +

    +

    +Introduction to bibliographies and references +
    +Tutorial +

    +
    +Index of bibliography and reference macros +

    + + +

    Introduction to bibliographies and references

    + + +Mom provides the ability to automatically format +and generate bibliography pages, as well as footnote or endnote +bibliographic references, or references embedded in text. She +accomplishes this by working in conjunction with a special +groff program called "refer". +

    +refer is a groff +"pre-processor", which is to say that it scans your files looking +for very specific commands (i.e. lines that begin with a period +[dot], just like macros and document element tags). If the +commands aren't there, refer can't do it's job, +and neither can mom. The scanning is done +before any actual mom processing +occurs. +

    +refer is a program that's been around for a long +time. It's powerful and has many, many features. Unfortunately, +the manpage (man refer), while complete and accurate, is +dense and not a good introduction to refer. (It's +a classic manpage Catch-22: the information it contains is most +useful only after you already grasp it.) +

    +In order to get mom users up and running with +refer, this section of mom's +documentation focuses exclusively, in a recipe-like manner, on +what you need to know to use refer satisfactorily +in conjunction with mom. The information and +instructions are not to be taken as +a manual or tutorial on full refer usage. Much has +been left out, on purpose. +

    +It is tempting to provide two levels of documentation, one for +users familiar with refer and one for newcomers +to groff and mom, but such an +approach may muddy the waters for newcomers. Mom's +allegiance, first and foremost, is to newcomers. If you're already +a refer user, the information herein will be useful +for adapting your current refer usage to +mom's way of doing things. If you've never used +refer, the information is essential, and, in many +cases, may be all you need. +

    +(For the benefit of old groff-hands: refer +support in mom is heavily based on the +refer module of the ms macros. The choice +was deliberate so that those wishing to play around with +mom's bibliography formatting style would be +tinkering with the familiar.) +

    +refer requires first that you create a +bibliographic database. From the information contained in the +database, mom formats and generates bibliographies +and references in MLA (Modern Language Association) style. MLA +style is clean, contemporary and flexible, and is widely used in +the humanities, where the range of material that has to be +referenced can run from simple books to live interviews and film. +

    +Once you have created your database, you instruct +refer (and mom) to access entries +in it by supplying keywords from the entries. Depending on what +you've instructed mom to do, she will put the +entries--fully and properly formatted with respect to order, punctuation +and italicization--in footnotes, endnotes, or a full bibliography. +

    +I encourage anyone interested in what MLA style looks like--and, by +extension, how your bibliographies and references will look after +mom formats them--to check out +

    +

    +	http://www.aresearchguide.com/12biblio.html
    +
    + +or any other website or reference book on MLA style. +

    +NOTE: MLA style requires that second and +subsequent lines of individual references be indented. Mom +takes care of this for you with a default indent, which +can be changed with the macro +INDENT_REFS. + + +

    Tutorial

    + +
      +
    1. Creating a refer database +
    2. Required "refer" commands +
    3. Accessing references +
    4. Telling mom where to put references +
    5. Creating bibliography pages +
    6. Invoking groff with mom and refer +
    +

    + +

    1. Creating a refer database

    +

    +The first step in using refer with +mom is setting up your bibliographic database. +The database is a file containing separate entries for each +reference you want to access from your mom files. +The file is not a "mom" file; it is a separate database. +You may set up individual databases for individual documents, or +create a large database that contains all the references you'll +ever need. +

    +Entries ("records") in the database file are separated from each +other by a single, blank line. The records themselves are composed +of single lines ("fields") with no blank lines between them. Each +field begins with a percent sign and a single letter (the "field +identifier") e.g. %A or %T. The letter identifies what part of a +bibliographic entry the field refers to: Author, Title, Publisher, +Date, etc. After the field identifier comes a single space, +followed by the information appropriate to field. No punctuation +should go at the ends of fields; mom adds what's +correct automatically. Do note, however, that author(s) (%A) +requires that you enter the author information exactly as you wish +it to come out (minus the period), including the comma after the +first author's last name. +

    +Here's a sample database containing two records so you can +visualize what the above paragraph says: +

    +

    +%A Schweitzer, Albert
    +%A C.M. Widor
    +%T J.S. Bach
    +%l Ernest Newman
    +%V Vol 2
    +%C London
    +%I Adam and Charles Black
    +%D 1923
    +%O 2 vols
    +%K bach vol 2
    +
    +%A Schaffter, Peter
    +%T The Schumann Proof
    +%C Toronto
    +%I RendezVous Press
    +%D 2004
    +%K schumann schaffter
    +
    + +The order in which you enter fields doesn't matter. +mom and refer will re-arrange +them in the correct order for you. +

    +The meaning of the letters follows. There are, with +refer, quite a few--all uppercase--which have, over +time, come to be "standard". Mom respects these. +However, she adds to the list (mostly the lowercase letters). +

    +

    +	%A Author           -- additional authors may be entered on separate %A
    +	                       lines as in first entry of the sample, above; mom 
    +	                       and refer will figure out what to do with multiple
    +	                       authors according to MLA rules
    +	%T Title            -- either the primary title (e.g. of a book), or the
    +	                       title of an article (e.g. within a book or
    +	                       journal or magazine)
    +	%B Book title       -- the title of a book when %T contains the title
    +	                       of an article; otherwise, use %T for book
    +	                       titles
    +	%R Report number    -- for technical reports
    +	%J Journal name     -- the name of a journal or magazine when %T
    +	                       contains the title of an article
    +	%E Editor           -- additional editors may be entered on separate %E
    +	                       lines (like authors); mom and refer will figure
    +	                       out what to do with them according to MLA rules
    +	%e Edition          -- the number of name of a specific edition
    +	                       (e.g. Second, 2nd, Collector's, etc.)
    +	%V Volume           -- volume number of a journal or series of books
    +	%N Journal number   -- journal or magazine number
    +	%S Series           -- series name for books or journals that are part of
    +	                       a series
    +	%C City             -- the city of publication
    +	%I Publisher        -- the publisher; %I stands for "Issuer"
    +	%D Publication date
    +	%P Page number(s)   -- enter page ranges as, e.g., 22-25
    +	%G Gov't.
    +	   ordering number  -- for government publications
    +	%O Other            -- additional information or comments you want
    +	                       to appear at the end of the reference
    +	%K Keywords         -- any words that will clear up ambiguities
    +	                       resulting from database entries that
    +	                       contain, say, the same author or the
    +	                       same title
    +	%d original
    +	   publication date -- if different from the date
    +	                                   of publication
    +	%a additions        -- for books, any additions to the original work,
    +					       such as the preface to a new edition or a new
    +	                       introduction
    +	%t reprint title    -- if different from a work's original title
    +	%l translator       -- if the translator is not the editor; if more
    +	                        than one translator, this field should contain
    +	                        all the names, with appropriate punctuation
    +	%r translator
    +	   and editor       -- if tr. and ed. are one in the same;
    +	%s site name        -- for web sites, the site name
    +	%c content
    +	   of site          -- for web sites, the content, if unclear
    +	                       (i.e. advertisement, cartoon, blog)
    +	%o organization     -- for web sites, the organization, group or
    +	                       sponsor of the site
    +	%a access date      -- for a website, the date you accessed it
    +	%u URL              -- for websites, the full URL of the site
    +
    + +
    +Tip: If you have hyphenation turned on in your +document (you probably do), mom will hyphenate +your references. This can be a problem because references +typically contain several proper names. Proper names shouldn't be +hyphenated. The solution is to prepend to any proper name in the +database the groff +discretionary hyphen +character, \%, like this: +

    +

    +	%A Hill, \%Reginald
    +
    + +Alternatively, you can turn hyphenation off entirely in +references with the macro, +HYPHENATE_REFS OFF. +

    + +

    2. Required "refer" commands

    +

    +Having set up your database, you now need to put some +refer-specific commands at the top of your +mom file. You cannot skip this step, nor can you +"source" these commands with the groff +primitive, +.so. They must +appear, exactly as shown, in every file requiring bibliographic +references. +

    +refer commands are introduced with a single +line containing .R1, and concluded with a single line +containing .R2. What you put between the .R1 +and .R2 lines are the commands themselves. The commands +should be entered one per line, in lowercase letters, with +no initial period (dot). +

    +Here's an example: +

    +

    +	.R1
    +	no-label-in-text
    +	no-label-in-reference
    +	.R2
    +
    + +There are an awful lot of refer commands. We will +focus only on those required to get mom cooperating +with refer. If you're interested, study the +refer manpage to discover what other commands are +available and how to manipulate them. +

    +At a minimum, all mom files accessing +a bibliographic database must contain the following +refer commands, exactly as shown: +

    + +

    +.R1
    +no-label-in-text
    +no-label-in-reference
    +join-authors ", and " ", " ", and "
    +database <full path to the database>
    +.R2
    +
    + +The first two commands tell refer to let +mom handle everything associated with footnote +and endnote markers, both in the body of the document, and in the +footnotes/endnotes themselves. +

    +The third command is required for mom to handle +multiple authors in proper, MLA style. +

    +The last command, database, assumes you have created +your own database, and do not otherwise have a system-wide +"default" database. "...full path to the database" means the full +path including the database filename, e.g. +/home/user/refer/my_database. +

    If you're already a refer user, feel free to +enter whatever refer commands are necessary to +access the database(s) you want. +

    +With the above refer block, you can embed +references directly into the text of your document, or have them +output as footnotes or endnotes. If you want to "collect" +references for later output on a bibliography page, the block must +read: +

    +

    +.R1
    +no-label-in-text
    +no-label-in-reference
    +join-authors ", and " ", " ", and "
    +database <full path to the database>
    +sort
    +accumulate
    +.R2
    +
    + +

    3. Accessing references

    +

    +References are accessed by putting keywords, all on one line, +between the refer commands .[ and +.]. Both of these commands must appear on separate +lines, by themselves, like this: +

    +

    +	.[
    +	keyword(s)
    +	.]
    +
    + +Keywords are any word, or set of words, that identify a database +record (i.e. a reference) unambiguously. (refer +doesn't like ambiguity.) +

    +If, for example, you want to reference a book by Ray Bradbury, +and the database contains only one book by Bradbury, a suitable +keyword would be "Bradbury". If your database contains several +books by Bradbury, say, Fahrenheit 451 and The Martian +Chronicles, you could reference them with the keywords, "451" +and "Martian". If, in addition to the two books by Bradbury, you +also had one whose title was The Martian Mission, suitable +keywords to reference The Martian Chronicles might be: +

    +

    +	.[                or    .[                   or  .[
    +	Bradbury Martian        Bradbury Chronicles      Martian Chronicles
    +	.]                      .]                       .]
    +
    + +The database field identifier, %K, lets you create special keywords +for references. This can be very handy if you need both a "short" +and a "long" reference to the same work. The short reference might +be used in footnotes; the long one in a bibliography. Consider the +following: +

    +

    +	%A Isherwood, Christopher      %A Isherwood
    +	%T Mr. Norris Changes Trains   %T Mr. Norris Changes Trains
    +	%d 1935                        %K Nor short
    +	%t The Last of Mr. \%Norris
    +	%a Intro. Tom Crawford
    +	%C New York
    +	%I New Directions
    +	%D 1945
    +	%K Norris
    +
    +
    + +To access the shorter reference, you'd do +

    +

    +	.[
    +	Nor short
    +	.]
    +
    + +To access the longer one, you'd do +
    +	.[
    +	Norris
    +	.]
    +
    + +

    4. Telling mom where to put references

    +

    +Mom provides several mechanisms for outputting +references where you want. +

    +

    Embedding references in the document body

    +

    +References may be embedded in the document body, surrounded by +parentheses, square brackets, or braces. Use whichever you prefer, +following the recipes below. +

    +

    +	Parentheses    Square brackets    Braces
    +	-----------    ---------------    ------
    +
    +	.REF(          .REF[              .REF{
    +	.[             .[                 .[
    +	keyword(s)     keyword(s)         keyword(s)
    +	.]             .]                 .]
    +	.REF)          .REF]              .REF}
    +
    + +

    Footnote or endnote references

    +

    +Most times, you'll probably want references in either footnotes or +endnotes. Mom provides a simple mechanism whereby +you can choose which, or even switch back and forth. The primary +tag is +REF, which is used like this: +

    +

    +	.REF
    +	.[
    +	keyword(s)
    +	.]
    +	.REF
    +
    + +REF collects references and outputs them +where you say with the macros, +FOOTNOTE_REFS +or +ENDNOTE_REFS. +Neither +FOOTNOTE_REFS nor ENDNOTE_REFS +requires an argument. All they do is tell REF, +whenever it's invoked, where to put the references. +

    +A recipe for footnote references looks like this: +

    +	.FOOTNOTE_REFS
    +	.REF
    +	.[
    +	keyword(s)
    +	.]
    +	.REF
    +
    + +When FOOTNOTE_REFS are enabled, REF +behaves identically to +FOOTNOTE, +so please read the +HYPER IMPORTANT NOTE +found in the document entry for FOOTNOTE. +

    +The reference between the first and second REF +will be treated as a footnote, as will all subsequent +REF pairs unless you invoke the macro, +ENDNOTE_REFS. +

    +A recipe for endnote references looks like this: +

    +	.ENDNOTE_REFS
    +	.REF
    +	.[
    +	keyword(s)
    +	.]
    +	.REF
    +
    + +The reference between the first and second REF +will be treated as an endnote, as will all subsequent +REF pairs unless you invoke the macro, +FOOTNOTE_REFS. +

    +When ENDNOTE_REFS are enabled, REF +behaves identically to +ENDNOTE, +so please read the +HYPER IMPORTANT NOTE +found in the document entry for ENDNOTE. +

    +The innate flexibility of this scheme allows you to have both +footnote references and endnote references in the same document. +This would be desirable if, say, you wanted "short" references in +footnotes, and complete references in endnotes. +

    + +

    Collected references

    +

    +Sometimes, you may want to put references in input text near +sections of text to which they pertain, but not actually want +them output until later (typically, on a bibliography page). +REF is used for this, too, but you have to make +sure your refer commands block is set up properly. +The recipe for this is: +

    + +

    +.R1
    +no-label-in-text
    +no-label-in-reference
    +join-authors ", and " ", " ", and "
    +database <full path to the database>
    +sort
    +accumulate
    +.R2
    +
    + +After this set up, and provided you don't issue a +FOOTNOTE_REFS or ENDNOTE_REFS +command, all reference between REF pairs will be +collected for later output. +

    +As a precaution, mom will issue a message the +first time you call .REF if neither +FOOTNOTE_REFS nor ENDNOTE_REFS is +in effect. If collected references are what you want, and you have +set up your .R1 - .R2 block as above, you may +safely ignore the message. +

    +LIMITATION: You cannot combine "collected" +references (plain REF) with REFs +that are instructed to go into footnotes (with +FOOTNOTE_REFS) or endnotes (with +ENDNOTE_REFS). This is a limitation imposed by +refer, not mom. + +

    5. Creating bibliography pages

    +

    +Bibliography pages are separate pages, like endnotes, on which +complete bibliographies are output. And, like endnotes pages, just +about every element on them can be designed to your specifications +with control macros. (See +Control macros for bibliographies.) +A bibliography page that uses mom's defaults +begins with the macro, +BIBLIOGRAPHY, +like this: +

    +

    +	.BIBLIOGRAPHY
    +
    + +

    +Following BIBLIOGRAPHY, you have three choices of +how to proceed. +

    +If you have elected to have references collected from within the +body of a document (see above, +Collected references, +for instructions), which assumes you have a refer +command block like the one +here +at the top of your document, you need only do +

    +

    +	.BIBLIOGRAPHY
    +	.[
    +	$LIST$
    +	.]
    +
    + +If you want to create the bibliography by hand (which may be the +case if you've used footnote and/or endnote references throughout +your document), follow this recipe, which assumes you already have a +refer block like the one +here +at the top of your document: +

    +

    +	.BIBLIOGRAPHY
    +	.R1
    +	sort
    +	accumulate
    +	.R2
    +	.[          -+
    +	keyword(s)   |
    +	.]           | "keyword(s)" are keywords identifying the
    +	.[           | particular bibliographic reference you want
    +	keyword(s)   | from your database.  Order doesn't matter here;
    +	.]           | the refer command, sort, takes care of that.
    +	.[           |
    +	keyword(s)   |
    +	.]          -+
    +	.[
    +	$LIST$
    +	.]
    +
    + +Your final choice is to output your whole database. Again, +assuming you have a refer block like the one +here at the top of your file, you need +only do: +

    +

    +	.BIBLIOGRAPHY
    +	.R1
    +	bibliography <full path to database>
    +	.R2
    +
    + +If you haven't put a refer block in +your file already, you can put the whole thing after +BIBLIOGRAPHY, like this: +

    +

    +	.BIBLIOGRAPHY
    +	.R1
    +	no-label-in-text                       -+
    +	no-label-in-reference                   | These are actually optional
    +	database <full path to the database>   -+ 
    +	join-authors ", and " ", " ", and "
    +	bibliography <full path to database>
    +	.R2
    +
    + +Whichever option you choose, mom will output a +full bibliography page, complete with a title (BIBLIOGRAPHY by +default, but that can be changed). + +

    6. Invoking groff with mom and refer

    +

    +So, now you've got a document, formatted properly to use +references processed with refer, what do you do to +output the document? +

    +It's simple. Instead of invoking groff with just +the -mom option, as explained +here, +invoke groff with the -R option as well, like this: +

    +

    +	groff -R -mom filename
    +
    + +
    + +

    +

    Index of bibliography and reference macros

    + +

    + + + +


    +

    Marking off references for footnotes, endnotes, or collection

    +

    + +Tag: REF +

    +The macro, REF, tells mom that +what follows is refer-specific, a +keyword-identified reference from a +refer database. Depending on whether you've +issued a +FOOTNOTE_REFS +or +ENDNOTE_REFS +instruction, REF also tells mom +where to place the reference. If FOOTNOTE_REFS, +the reference will be formatted and placed in a footnote. If +ENDNOTE_REFS, the reference will be collected for +output as an endnote. If you have issued neither instruction, the +reference will be collected for later output, most likely on a +bibliography page. +

    +Before you use REF, you must create a +refer block containing refer +commands (see +Required refer commands +in the tutorial, above). +

    +REF usage always looks like this: +

    +

    +	.REF
    +	.[
    +	keyword(s)
    +	.]
    +	.REF
    +
    + +Notice that REF "brackets" the +refer call, and never takes an argument. +

    +What REF really is is a convenience. One could, +for example, put a reference in a footnote by doing +

    +

    +	.FOOTNOTE
    +	.[
    +	keyword(s)
    +	.]
    +	.FOOTNOTE OFF
    +
    + +However, if you have a lot of references going into footnotes (or +endnotes), it's much shorter to type .REF/.REF than +.FOOTNOTE/.FOOTNOTE OFF. It also helps you +distinguish--visually, in your input file--between footnotes (or +endnotes) which are references, and footnotes (or endnotes) which +are explanatory, or expand on the text. +

    +Additional arguments: If you're using +REF to put references in footnotes and your +footnotes need to be indented, you may (indeed, should) pass +REF the same arguments used to indent footnotes. +See +FOOTNOTE. +

    +Note: +When REF is used with +FOOTNOTE_REFS, +it behaves identically to +FOOTNOTE, +so please read the +HYPER IMPORTANT NOTE +found in the document entry for FOOTNOTE. +

    +When REF is used with +ENDNOTE_REFS, +it behaves identically to +ENDNOTE, +so please read the +HYPER IMPORTANT NOTE +found in the document entry for ENDNOTE. + +
    + + + +


    +

    Instruct REF to put references in footnotes

    +

    + +Macro: FOOTNOTE_REFS +

    +FOOTNOTE_REFS is an instruction to +REF, +saying, "put all subsequent references bracketed by the +REF macro into footnotes." You invoke it by +itself, with no argument. +

    +When FOOTNOTE_REFS is in effect, regular +footnotes, (i.e. those introduced with .FOOTNOTE and +terminated with .FOOTNOTE OFF) continue to behave +normally. +

    +You may switch between FOOTNOTE_REFS and +ENDNOTE_REFS +at any time. +

    +If you have a lot of footnote references, and are identifying +footnotes by line number rather than by markers in the text, you may +want to enable +FOOTNOTES_RUN_ON +in conjunctions with FOOTNOTE_REFS. + +
    + + + +


    +

    Instruct REF to put references in endnotes

    +

    + +Macro: ENDNOTE_REFS +

    +ENDNOTE_REFS is an instruction to +REF, +saying, "add all subsequent references bracketed by the +REF macro to endnotes." You invoke it by +itself, with no argument. +

    +When ENDNOTE_REFS is in effect, +mom continues to format regular endnotes, (i.e. +those introduced with .ENDNOTE and terminated with +.ENDNOTE OFF) in the normal way. +

    +You may switch between ENDNOTE_REFS and +FOOTNOTE_REFS +at any time. + +
    + + + +


    +

    References embedded in text

    +

    + +Macro pair: REF(  ...  REF) +
    +Macro pair: REF[  ...  REF] +
    +Macro pair: REF{  ...  REF} +

    +You may sometimes want to embed references directly into the body +of your documents, typically, but not always, inside parentheses. +Mom makes this possible through the use of the +REF<bracket type> macros. +

    +All three macro pairs, above, are invoked the same way, namely by +introducing the reference with the first ("open") macro of +the REF<bracket type> pair, and +terminating it with the second ("close") +REF<bracket type> of the pair. For +example +

    +

    +	.REF(
    +	.[
    +	keyword(s)
    +	.]
    +	.REF)
    +
    + +will embed a reference in the body of your document, surrounded by +parentheses. .REF[ ... .REF] will +surround the reference with square brackets. +.REF{ ... .REF} will surround it with +curly braces. +
    + + + +
    +

    Manage the second-line indent of references

    +

    + +Macro: INDENT_REFS FOOTNOTE | ENDNOTE | BIBLIO <indent> +
    +*<indent> requires a unit of measure +

    +Proper MLA-style references should have their second, and subsequent +lines, if any, indented. Since mom formats +references in MLA style, she automatically indents second lines. +By default, the indent for the second line of references, +regardless of whether the references appear in footnotes, endnotes, +or bibliographies, is 1.5 +ems +for +PRINSTYLE +TYPESET +and 2 ems for +PRINSTYLE +TYPEWRITE. +

    +If you'd like to change the indent for footnotes, endnotes or +bibliographies, just invoke INDENT_REFS with a +first argument telling mom for which you want the +indent changed, and a second argument saying what you'd like the +indent to be. For example, if you want the second-line indent of +references on a bibliography page to be 3 +picas, +

    +

    +	.INDENT_REFS BIBLIO 3P
    +
    + +is how you'd set it up. +

    +Tip: if you are identifying endnotes by line +number +(ENDNOTE_MARKER_STYLE LINE) +and you have instructed mom to put references +bracketed by +REF +into endnotes (with +ENDNOTE_REFS), +you will probably want to adjust the second-line indent for +references in endnotes, owing to the way mom +formats line-numbered endnotes. Study the output of such +documents to see whether an indent adjustment is required. +
    + + + +


    +

    Enable/disable hyphenation of references

    +

    + +Macro: HYPHENATE_REFS <toggle> +

    +If you have hyphenation turned on for a document (see HY), +and in most cases you probably do, mom will +hyphenate references bracketed by the +REF +macro. Since references typically contain quite a lot of proper +names, which shouldn't be hyphenated, you may want to disable +hyphenation for references. +

    +HYPHENATE_REFS is a toggle macro; +invoking it by itself will turn automatic hyphenation of +REF-bracketed references on (the default). +Invoking it with any other argument (OFF, +NO, X, etc.) will disable +automatic hyphenation for references bracketed by +REF. +

    +An alternative to turning reference hyphenation off is to prepend +to selected proper names in your refer database +the groff +discretionary hyphen +character, \%. (See +here +in the tutorial for an example.) +

    +Note: references embedded in the body of a document +with +REF<bracket type> +are considered part of +running text, +and are hyphenated (or not) according to whether hyphenation +is turned on or off for running text. Therefore, if you want to +disable hyphenation for such references, you must do so +temporarily, with HY, like this: +

    +

    +	.HY OFF
    +	.REF(
    +	.[
    +	keyword(s)
    +	.]
    +	.REF)
    +	.HY
    +
    + +Alternatively, sprinkle your database fields liberally with +\%. +
    + + + +
    +

    Begin a bibliography page

    +

    + +Macro: BIBLIOGRAPHY +
    +

    +If you want to append a bibliography to your document, all you need +do is invoke BIBLIOGRAPHY at the place you want +it. BIBLIOGRAPHY breaks to a new page, prints the +title (BIBLIOGRAPHY by default, but that can be changed), and awaits +refer instructions. How to create bibliographies +is covered in the tutorial section, +Creating bibliography pages. +

    +See the +Bibliography page style control macros +for macros to tweak, design and control the appearance of +bibliography pages. +
    + + + +


    +

    Plain, or numbered list bibliography

    +

    + +Macro: BIBLIOGRAPHY_TYPE PLAIN | LIST [ <list separator> ] [ <list prefix> ] +

    +Mom offers two styles of bibliography output: plain, +or numbered list style. With PLAIN, bibliography +entries are output with no enumerators. With LIST, +each entry is numbered. +

    +Entering .BIBLIOGRPHY_TYPE PLAIN gives you a plain +bibliography. +

    +Entering .BIBLIOGRAPHY_TYPE LIST gives you an enumerated +bibliography. The two optional arguments, +<list separator> and +<list prefix> have the same meaning as +the equivalent arguments to +LIST +(i.e. <separator> and <prefix>). +

    +You may enter BIBLIOGRAPHY_TYPE either before or +after BIBLIOGRAPHY. It must, however, always come +before the refer command to output bibliographies. +(See the tutorial section, +Creating bibliography pages, +for instructions on how to output bibliographies.) +

    +Mom's default BIBLIOGRAPHY_TYPE +is LIST, with a period (dot) as the separator, and +no prefix. + +
    + + + +


    +

    Bibliography page style control

    + +

    +Mom processes bibliography pages in a manner very +similar to the way she processes endnotes pages. The bibliography +page control macros, therefore, behave in the same way as their +endnotes pages equivalents. +
    +

      +
    1. General bibliography page style control + +
    2. Bibliography pages header/footer control + +
    3. Bibliography page head (i.e. the title at the top) control + + +
    +
    + +

    1. General bibliography page style control

    + +

    *Bibliography family/font/quad

    +

    +See +Arguments to the control macros. +

    +

    +.BIBLIOGRAPHY_FAMILY    default = prevailing document family; default is Times Roman
    +.BIBLIOGRAPHY_FONT      default = roman
    +.BIBLIOGRAPHY_QUAD*     default = justified
    +
    +*Note: BIBLIOGRAPHY_QUAD must be set to either L or J
    +
    + + + +

    *Bibliography point size

    +

    +Macro: BIBLIOGRAPHY_PT_SIZE <base type size of bibliography> + +

    +Unlike most other control macros that deal with size of document +elements, BIBLIOGRAPHY_PT_SIZE takes as its argument an +absolute value, relative to nothing. Therefore, the argument represents +the size of bibliography type in +points, +unless you append an alternative +unit of measure. +For example, +

    +

    +	.BIBLIOGRAPHY_PT_SIZE 12
    +
    + +sets the base point size of type on the bibliography page to 12 +points, whereas +

    +

    +	.BIBLIOGRAPHY_PT_SIZE .6i
    +
    + +sets the base point size of type on the bibliography page to 1/6 of an +inch. +

    +The type size set with BIBLIOGRAPHY_PT_SIZE is the size of +type used for the text of the bibliographies, and forms the basis from which +the point size of other bibliography page elements is calculated. +

    +The default for +PRINTSTYLE TYPESET +is 12.5 points (the same default size used in the body of the document). +

    + + + +

    *Bibliography lead

    +

    +Macro: BIBLIOGRAPHY_LEAD <base leading of bibliographies> [ ADJUST ] +
    +*Does not require a unit of measure; points is assumed + +

    +Unlike most other control macros that deal with leading of document +elements, BIBLIOGRAPHY_LEAD takes as its argument an +absolute value, relative to nothing. Therefore, the argument represents +the +leading +of endnotes in +points +unless you append an alternative +unit of measure. +For example, +

    +

    +	.BIBLIOGRAPHY_LEAD 14
    +
    + +sets the base leading of type on the bibliography page to 14 +points, whereas +

    +

    +	.BIBLIOGRAPHY_LEAD .5i
    +
    + +sets the base leading of type on the bibliography page to 1/2 inch. +

    +If you want the leading of bibliographies adjusted to fill the page, +pass BIBLIOGRAPHY_LEAD the optional argument +ADJUST. (See +DOC_LEAD_ADJUST +for an explanation of leading adjustment.) +

    +The default for +PRINTSTYLE TYPESET +is 14 points, adjusted. +

    +NOTE: Even if you give mom a +DOC_LEAD_ADJUST OFF command, she will still, by +default, adjust bibliography leading. You MUST enter +BIBLIOGRAPHY_LEAD <lead> with no +ADJUST argument to disable this default behaviour. +

    + + + +

    *Singlespace bibliographies (TYPEWRITE only)

    +

    +Macro: SINGLESPACE_BIBLIOGRAPHY <toggle> + +

    +If your +PRINTSTYLE +is TYPEWRITE and you use TYPEWRITE's default +double-spacing, bibliographies are double-spaced. If your document +is single-spaced, bibliographies are single-spaced. +

    +If, for some reason, you'd prefer that bibliographies be single-spaced +in an otherwise double-spaced document (including double-spaced +collated +documents), invoke SINGLESPACE_BIBLIOGRAPHY with +with no argument. +

    + + + +

    *Adjusting the space between bibliography entries

    +

    +Macro: BIBLIOGRAPHY_SPACING <amount of space> +
    +*Requires a unit of measure + +

    +By default, mom inserts 1 linespaces between +bibliography entries on bibliography pages. If you'd prefer she +add a different amount of space, instruct her to do so with the +macro, BIBLIOGRAPHY_SPACING. Say, for example, +you'd prefer only 1/2 linespace. That would be done with +

    +

    +	.BIBLIOGRAPHY_SPACING .5v
    +
    + +As with endnotes pages, owing to the space inserted between bibliography +entries, bibliography pages may have hanging bottom margins. +Unlike endnotes pages, mom is sad to report that +there's nothing you can do about this, except a) pray things work +out, or b) set your BIBLIOGRAPHY_SPACING to zero. + + + +

    *Turning off column mode during bibliography output

    +

    +Macro: BIBLIOGRAPHY_NO_COLUMNS <toggle> + +

    +By default, if your document is +set in columns, +mom sets the bibliographies in columns, too. However, +if your document is set in columns and you'd like the bibliographies not +to be, just invoke BIBLIOGRAPHY_NO_COLUMNS with no +argument. The bibliography pages will be set to the full page measure +of your document. +

    +If you output bibliographies at the end of each document in a +collated +document set in columns, column mode will automatically +be reinstated for each document, even with +BIBLIOGRAPHY_NO_COLUMNS turned on. +

    + + + +

    *Bibliography-page page numbering style

    +

    +Macro: BIBLIOGRAPHY_PAGENUM_STYLE DIGIT | ROMAN | roman | ALPHA | alpha + +

    +Use this macro to set the page numbering style of bibliography pages. +The arguments are identical to those for +PAGENUM_STYLE. +The default is digit. You may want to change it +to, say, alpha, which you would do with +

    +

    +	.BIBLIOGRAPHY_PAGENUM_STYLE alpha
    +
    + + + +

    *Setting the first page number of bibliography pages

    +

    +Macro: BIBILOGRAPHY_FIRST_PAGENUMBER <page # that appears on page 1 of bibliographies> + +

    +Use this macro with caution. If all bibliographies for several +collated +documents are to be output at once, i.e. not at the end of each +separate doc, BIBLIOGRAPHY_FIRST_PAGENUMBER tells +mom what page number to put on the first page of +the bibliography. +

    +If you set BIBLIOGRAPHY_FIRST_PAGENUMBER in collated +documents where the bibliographies are output after each separate doc, +you have to reset every separate document's first page number after +COLLATE +and before +START. +

    + + + +

    *Omitting a page number on the first page of bibliographies

    +

    +Macro: BIBLIOGRAPHY_NO_FIRST_PAGENUM <toggle> + +

    +This macro is for use only if FOOTERS are on. It +tells +BIBLIOGRAPHY +not to print a page number on the first bibliography page. +Mom's default is to print the page number. +

    + + + +

    *Suspending pagination of bibliography pages

    +

    +Macro: SUSPEND_PAGINATION +
    +Macro: RESTORE_PAGINATION + +

    +SUSPEND_PAGINATION doesn't take an argument. +Invoked immediately prior to +BIBLIOGRAPHY, +it turns off pagination for the duration of the bibliography. +Mom continues, however to increment page numbers +silently. +

    +To restore normal document pagination after bibliographies, invoke +RESTORE_PAGINATION (again, with no argument) +immediately after you've finished with your bibliography. + +

    2. Bibliography page header/footer control

    +

    + +If you wish to modify what appears in the header/footer that appears +on bibliography pages, make the changes before you invoke +BIBLIOGRAPHY, +not afterwards. +

    +Except in the case of +DOCTYPE CHAPTER, +mom prints the same header or footer used throughout +the document on bibliography pages. Chapters get treated differently +in that, by default, mom does not print the +header/footer centre string (normally the chapter number or chapter +title.) In most cases, this is what you want. However, should you +not want mom to remove the centre string from +the bibliography pages headers/footers, invoke +BIBLIOGRAPHY_HEADER_CENTER +with no argument. +

    +An important change you may want to make is to put the word +"Bibliography" in the header/footer centre position. +To do so, do +

    +

    +	.HEADER_CENTER "Bibliography"
    +	           or
    +	.FOOTER_CENTER "Bibliography"
    +
    + +prior to invoking .BIBLIOGRAPHY. If your +DOCTYPE +is CHAPTER, you must also invoke +BIBLIOGRAPHY_HEADER_CENTER +for the HEADER_CENTER to appear. +

    + +

    *Bibliography page header/footer centre string

    +

    +Macro: BIBLIOGRAPHY_HEADER_CENTER toggle + +

    +If your +DOCTYPE +is CHAPTER and you want mom to include +a centre string in the headers/footers that appear on bibliography pages, +invoke BIBLIOGRAPHY_HEADER_CENTER (or +BIBLIOGRAPHY_FOOTER_CENTER) with no argument. +Mom's default is NOT to print the centre string. +

    +If, for some reason, having enabled the header/footer centre string +on bibliography pages, you wish to disable it, invoke the same macro +with any argument (OFF, QUIT, Q, X...). +

    + +

    *Allow headers on bibliography pages

    +

    +Macro: BIBLIOGRAPHY_ALLOWS_HEADERS <none> | ALL + +

    +By default, if HEADERS are on, mom +prints page headers on all bibliography pages except the first. If you +don't want her to print headers on bibliography pages, do +

    +

    +	.BIBLIOGRAPHY_ALLOWS_HEADERS OFF
    +
    + +If you want headers on every page including the first, do +

    +

    +	.BIBLIOGRAPHY_ALLOWS_HEADERS ALL
    +
    + +NOTE: If FOOTERS are on, +mom prints footers on every bibliography page. This is +a style convention. In mom, there is no such beast +as BIBLIOGRAPHY_ALLOWS_FOOTERS OFF. +

    + +

    3. Bibliography page first page head (title) control

    + + + +

    *Bibliography pages first page head (title) string

    +

    +Macro: BIBLIOGRAPHY_STRING "<head to print at the top of bibliography pages>" + +

    +By default, mom prints the word "BIBLIOGRAPHY" +as a head at the top of the first page of a bibliography. If you want her +to print something else, invoke BIBLIOGRAPHY_STRING with +the bibliography page head you want, surrounded by double-quotes. If +you don't want a head at the top of the first bibliography page, invoke +BIBLIOGRAPHY_STRING with a blank argument (either two +double-quotes side by side -- "" -- or no argument +at all). +

    + + + +

    *Bibliography page first page head (title) control

    +

    +See +Arguments to the control macros. +

    +

    +.BIBLIOGRAPHY_STRING_FAMILY    default = prevailing document family; default is Times Roman
    +.BIBLIOGRAPHY_STRING_FONT      default = bold
    +.BIBLIOGRAPHY_STRING_SIZE*     default = +1
    +.BIBLIOGRAPHY_STRING_QUAD      default = centred
    +
    +*Relative to the size of the bibliography text (set with BIBLIOGRAPHY_PT_SIZE)
    +
    + + + +

    *Bibliography-page head (title) underscoring

    +

    +Macro: BIBLIOGRAPHY_STRING_UNDERSCORE toggle | 2 + +

    +Invoked by itself, BIBLIOGRAPHY_STRING_UNDERSCORE will +underscore the bibliography page head. Invoked with the argument 2 +(i.e. the digit 2), BIBLIOGRAPHY_STRING_UNDERSCORE will +double-underscore the head. Invoked with any other argument, the macro +disables underscoring of the head. +

    +Mom's default is to double-underscore the +head, therefore if you want no underscoring, you must insert +.BIBLIOGRAPHY_STRING_UNDERSCORE OFF (or QUIT, X, NO, +NONE, etc.) into your document prior to outputting a +bibliography with +BIBLIOGRAPHY. + + + +

    *Bibliography-page head (title) automatic capitalization

    +

    +Macro: BIBLIOGRAPHY_STRING_CAPS toggle + +

    +Invoked by itself, BIBLIOGRAPHY_STRING_CAPS will +automatically capitalize the bibliography page head. Invoked with any +other argument, the macro disables automatic capitalization of the +head. +

    +If you're generating a table of contents, you may want the +bibliography page head string in caps, but the toc entry in caps/lower +case. If the argument to +BIBLIOGRAPHY_STRING +is in caps/lower case and BIBLIOGRAPHY_STRING_CAPS is +on, this is exactly what will happen. +

    +Mom's default is to capitalize the bibliography-page +head string. +

    + +
    + +


    +Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/groff/contrib/mom/momdoc/reserved.html b/contrib/groff/contrib/mom/momdoc/reserved.html index 193b56d88016..ab8eeb193396 100644 --- a/contrib/groff/contrib/mom/momdoc/reserved.html +++ b/contrib/groff/contrib/mom/momdoc/reserved.html @@ -1,3 +1,4 @@ + @@ -7,11 +8,26 @@ -Prev   Back to Table of Contents

    LIST OF RESERVED WORDS

    The following is a list of "reserved" words used by mom. Before changing the name of any macro or document element tag with ALIAS, I strongly recommend doing a search of this page for your proposed new name. If you find it in the left hand column, DON'T USE IT. Choose something else instead.

    +Prev   Back to Table of Contents +

    + + + +

    LIST OF RESERVED WORDS

    + +

    The following is a list of "reserved" words used by +mom. Before changing the name of any macro or +document element tag with +ALIAS, +I strongly recommend doing a search of this page for your proposed +new name. If you find it in the left hand column, DON'T USE IT. +Choose something else instead. +

    Anyone interested in playing around inside mom's macro file (om.tmac) will find this list useful as well since it lists all -(I hope) the macros, strings, and number registers mom -uses, along with brief descriptions of their functions. +(I hope) the macros, strings, diversions and number registers +mom uses, along with brief descriptions of their +functions.

     TYPESETTING
    @@ -28,25 +44,32 @@ PAPER       Letter, legal, or A4
     
     B_MARGIN  Space to leave at page bottom
     L_MARGIN  Page offset
    -R_MARGIN  Line length as a function of pagewidth - pageoffset - rightmargin
    +R_MARGIN  Line length as a function of
    +          pagewidth minus pageoffset minus rightmargin
     T_MARGIN  Advance lead from page top
     
     Page control
     ------------
    -DO_B_MARGIN  Margin at bottom of page
    -DO_T_MARGIN  Margin at top of page
    +DO_B_MARGIN  Margin at bottom of page; trap-invoked
    +DO_T_MARGIN  Margin at top of page; trap-invoked
     
     Style
     -----
    -CONDENSE   Set percentage of pseudo-condense (alias of CONDENSE_OR_EXTEND)
    -EXTEND     Set percentage of pseudo-extend (alias of CONDENSE_OR_EXTEND)
    -FAMILY     Family
    -FT         Font
    -LL         Line length
    -LS         Leading (.vs)
    -PT_SIZE    Point size
    -SETBOLDER  Set degree of emboldening (pseudo-bold) in units
    -SETSLANT   Set degree of pseudo-italic
    +COLOR          Change color of text to predefined value
    +CONDENSE       Set percentage of pseudo-condense (alias of
    +               CONDENSE_OR_EXTEND)
    +EXTEND         Set percentage of pseudo-extend (alias of
    +               CONDENSE_OR_EXTEND)
    +FAMILY         Family
    +FT             Font
    +FALLBACK_FONT  Font to use whenever FAMILY or FT errors occur
    +LL             Line length
    +LS             Leading (.vs)
    +NEWCOLOR       Define a text color
    +PT_SIZE        Point size
    +SETBOLDER      Set degree of emboldening (pseudo-bold) in units
    +SETSLANT       Set degree of pseudo-italic
    +XCOLOR         Initialize a color from rgb.txt
     
     Autolead
     --------
    @@ -55,11 +78,11 @@ AUTOLEAD  Always lead n points more than .PT_SIZE
     Flush
     -----
     JUSTIFY  Justified text
    -QUAD     Filled text, left, right, or center
    +QUAD     Filled text, left, right, or centre
     
     Quad
     ----
    -CENTER  Non-filled text, center
    +CENTER  Non-filled text, centre
     LEFT    Non-filled text, left
     RIGHT   Non-filled text, right
     
    @@ -129,32 +152,45 @@ Misc + Support
     BR_AT_LINE_KERN  Deposit a break before RW and WE
     CAPS             Convert u/lc to UC
     COMMENT          Don't print lines till COMMENT OFF (alias of SILENT)
    -DROPCAP_ADJUST   Points (poss. fractional) to add/subtract from drop caps
    +DROPCAP_ADJUST   Points (poss. fractional) to add/subtract
    +                 from drop caps
     DROPCAP          Create drop cap
     DROPCAP_FAMILY   Drop cap family
     DROPCAP_FONT     Drop cap font
     DROPCAP_GUTTER   Drop cap gutter
     DROPCAP_OFF      Support only; restores .in if there was one
    -EW               Extra white -- loosen overall line kern (character spacing)
    +ESC_CHAR         Alias for .ec
    +EW               Extra white -- loosen overall line kern
    +                 (character spacing)
     LEADER_CHARACTER Sets leader character
     PAD              Insert padding spaces at marked places
     PADMARKER        Sets character to use instead of # in PAD
    -PRINT            Simply prints args passed to it; keeps my code indented nicely
    -RW               Reduce white -- tighten overal line kern (character spacing)
    +PRINT            Simply prints args passed to it; keeps my code
    +                 indented nicely
    +RW               Reduce white -- tighten overall line kern
    +                 (character spacing)
     SILENT           Don't print lines till SILENT OFF
    -SIZESPECS        Get cap-height, x-height and descender depth for current point size
    +SIZESPECS        Get cap-height, x-height and descender depth for
    +                 current point size
     TRAP             Turn traps off or on
     
     +++DIVERSIONS+++
     
     NO_FLASH    Diverts output of SILENT or COMMENT so they don't print
    -NULL        Diverts SIZESPECS in PRINT_HDRFTR so it SIZESPECS doesn't screw up FOOTER and FOOTNOTE processing when FOOTERS are on
    +NULL        Diverts SIZESPECS in PRINT_HDRFTR so it doesn't screw up
    +            FOOTER and FOOTNOTE processing when FOOTERS are on
     PAD_STRING  Diverts $PAD_STRING for processing
     TYPESIZE    Diverts SIZESPECS routine so it doesn't print
     
     +++NUMBER REGISTERS+++
     
    +#ABORT_FT_ERRORS        Abort on FT errors? (toggle)
     #ALD                    ALD value
    +#ARGS_TO_LIST           Tells LIST whether LIST was invoked with a legal
    +                        arg; controls LIST OFF processing
    +#ARGS_TO_SQ             Tells SMARTQUOTES whether it was invoked with a
    +                        legal arg; controls SMARTQUOTES OFF
    +                        processing
     #AUTOLEAD_FACTOR        Using FACTOR arg to AUTOLEAD? (toggle)
     #AUTO_LEAD              Using autolead? (toggle)
     #AUTO_LEAD_VALUE        Auto leading value
    @@ -164,22 +200,28 @@ TYPESIZE    Diverts SIZESPECS routine so it doesn't print
     #BR_INDENT              Value of right indent when IB
     c                       column mark
     #CONDENSE               Are we in pseudo-condense mode? (toggle)
    -#COND_WIDTH             Width of pseudo-condensed type (pointsize x $COND_PERCENT)
    +#CONDENSE_WAS_ON        For restoring \*[COND] in DROPCAP
    +#COND_WIDTH             Width of pseudo-condensed type
    +                        (pointsize x $COND_PERCENT)
    +#CURRENT_L_LENGTH       Current line length at first invocation of LIST;
    +                        like #ORIG_L_LENGTH
     #CURRENT_TAB            Current tab number
     #DC_GUT                 Width of dropcap gutter
     #DEGREES                # of degrees slant for pseudo-italic
    +#ENUMERATOR<n>          Number register enumerator for depth <n> in lists 
    +#EXT_WIDTH              Width of pseudo-extended type
    +                        (pointsize x $EXT_PERCENT)
     #EXTEND                 Are we in pseudo-extend mode? (toggle)
    -#EXT_WIDTH              Width of pseudo-extended type (pointsize x $EXT_PERCENT)
    +#EXTEND_WAS_ON          For restoring \*[EXT] in DROPCAP
     #FILL_MODE              Are we in fill mode (i.e. \n(.u=1)? (toggle)
    -#FONT_FOR_PAD           Used to ensure that the font in effect prior
    -                          to PAD is restored at the start of every iteration
    -                          of $PAD_STRING
     #H_INDENT               Value of left indent when IH
     #HL_INDENT              Value of the hang when IH
     #HYPHENATE              Hyphenation on? (toggle)
    -#HY_SET                 Did we manually set hyphenation parameters? (toggle)
    -#IN_TAB                 Are we in a tab? (toggle)  Set in macro TAB; used in ST to
    -                          determine whether to add #ST_OFFSET to #ST<#>_OFFSETT
    +#HY_SET                 Did we manually set hyphenation parameters?
    +                        (toggle)
    +#IN_TAB                 Are we in a tab? (toggle)
    +                        Set in macro TAB; used in ST to determine
    +                        whether to add #ST_OFFSET to #ST<#>_OFFSET
     #INDENT_ACTIVE          Indicates whether an indent is active (toggle)
     #INDENT_BOTH_ACTIVE     Toggle
     #INDENT_LEFT_ACTIVE     Toggle
    @@ -190,37 +232,59 @@ c                       column mark
     #INDENT_STYLE_RIGHT     Indicates IR when #INDENT_ACTIVE=1 (toggle)
     #INDENT_STYLE_TEMP      Indicates IT when #INDENT_ACTIVE=1 (toggle)
     #IX_WARN                Toggles to 1 the first time IX is user-invoked
    +#JUSTIFY                In EW/RW, when BR_AT_LINE_KERN, whether to
    +                        break or break-spread preceding line (toggle)
     #KERN                   Kern on? (toggle)
     #LAST_TAB               Last tab number set in multi-columns
     #LEAD                   Leading (alias)
     #LIGATURES              Ligatures on? (toggle)
    +#LIST_INDENT<n>         Left indent of list <n>
     #L_INDENT               Value of left indent
     #L_LENGTH               Line length
    -#L_MARGIN               Page offset if set with LMARGIN; if .po used, \n(.o returns
    +#L_MARGIN               Page offset if set with LMARGIN;
    +                        if .po used, \n(.o returns page offset
     #LOOP                   #LOOP=1 if a while loop executes; otherwise 0.
    +#NEXT_DEPTH_BACK        Next list level back in lists
     #NEXT_TAB               Current tab number + 1 (used in TN)
     #NEXT_TAB               Next tab in an n+1 sequence
    +#OLD_LEAD               Lead in effect prior to changing it with .vs
    +                        in .LS
     #OPEN_CLOSE             Manipulates character " to print `` or ''
    -p                       Output line horiz position at end of $PAD_STRING
    +#ORIGINAL_L_LENGTH      Used in LIST for IB processing; holds \n(.l
    +p                       Output line horiz position at end of
    +                        $PAD_STRING
     #PAD_COUNT              Number of times # was included in arg to PAD
    +#PAD_LIST_DIGITS        Pad list digits to the left? (toggle)
     #PAD_SPACE              Size of padding space
     #PAGE_LENGTH            Page length (alias)
     #PAGE_WIDTH             Page width
     #PP_ACTIVE              Are we in the context of a para? (toggle)
    -#PRINT_FOOTER_ON_PAGE_1 toggle
    +#PRINT_FOOTER_ON_PAGE_1 (toggle)
    +#PSEUDO_FILL            Signals that LEFT, RIGHT or CENTER is
    +                        in effect (toggled off, i.e. to 0, when
    +                        QUAD  or JUSTIFY is called)
     #PT_SIZE                Point size (fractional) in units (alias)
    -#Q_AT_TOP               Does a quote start at the top of a new page? (toggle)
    +#Q_AT_TOP               Does a quote start at the top of a new page?
    +                        (toggle)
     #QUAD                   In autoquad mode? (toggle)
    +#QUIT                   Tells LIST whether to exit lists completely
    +                        (toggle)
    +#REMOVE                 Used in LIST OFF cleanup
     #RESTORE_LEAD           Lead value in effect prior to AUTOLEAD
     #RESTORE_LINE_LENGTH    Restores actual line length in RULE
    -#RESTORE_PT_SIZE        Stores current point size (in units) prior to underscore
    +#RESTORE_LN_NUMBER      Start linenumbering again with stored
    +                        #NEXT_LN? (toggle)
    +#RESTORE_PT_SIZE        Stores current point size (in units) prior
    +                        to underscore
     #R_INDENT               Value of right indent
    -#RLD                    RLD value
     #R_MARGIN               Right margin
    +#RESTORE_PREV_INDENT    Tells LIST OFF what kind of indent was active
    +                        prior to first invocation of LIST
    +#RLD                    RLD value
     #SILENT                 Is silent on? (toggle)
     #SIZE_FOR_PAD           Used to ensure that the size in effect prior
    -                          to PAD is restored at the start of every iteration
    -                          of $PAD_STRING
    +                        to PAD is restored at the start of every
    +                        iteration of $PAD_STRING
     #SLANT_ON               Is SLANT on? (toggle)
     #SMART_QUOTES           Smartquotes on? (toggle)
     #SPACE_TO_END           Whitespace at end of string passed to PAD
    @@ -228,45 +292,87 @@ p                       Output line horiz position at end of $PAD_STRING
     #ST<#>_MARK             Page offset of autotab <#> at ST<#>X
     #ST_NUM                 Incrementing counter for autotab identification
     #ST_OFFSET              Offset (from current tab) to add to #ST<#>_OFFSET
    -                          when calculating string indents set from within tabs
    +                        when calculating string indents set from within
    +                        tabs
     #ST<#>_OFFSET           Indent of autotab <#> (page offset)
    -t                       "mark" register set in T_MARGIN; recalled in LS and AUTOLEAD if #T_MARGIN_SET is 1
    +#STORED_L_INDENT        Current left indent at first invocation of LIST
    +#STORED_R_INDENT        Current right indent at first invocation of LIST
    +#STORED_BL_INDENT       Current "both, left" indent at first invocation
    +                        of LIST
    +#STORED_BR_INDENT       Current "both, right" indent at first invocation
    +                        of LIST
    +#STORED_HL_INDENT       Current hanging indent at first invocation
    +                        of LIST
    +#STORED_T_INDENT        Current temporary indent at first invocation
    +                        of LIST
    +#T_INDENT               Value of temporary indent
    +#T_MARGIN               Top margin
     #TAB_ACTIVE             Are we in a tab? (toggle)
     #TAB_NUMBER             Tab number
     #TAB_OFFSET             Tab indent
    -#T_INDENT               Value of temporary indent
    -#T_MARGIN               Top margin
    -#T_MARGIN_SET           Did we set the top margin with T_MARGIN? (toggle)
    +#TOP                    Set to 1 in T_MARGIN, DO_T_MARGIN and ALD; tells
    +                        the first LS or AUTOLEAD on a page to maintain
    +                        the baseline position prior to the LS call
    +#TOP_BASELINE_ADJ       Amount by which to adjust the baseline position
    +                        of the first line on the page if an LS or AUTOLEAD
    +                        request differs from the lead current at the end of
    +                        the previous page
    +#TOTAL_LISTS            Total number of lists in a nest
     #USER_SET_L_LENGTH      Did user invoke LL? (toggle)
    +#USER_SET_TITLE_ITEM    Did user invoke TOC_TITLE_ENTRY?
     u                       Horiz position of start of underscore
     
     +++STRINGS+++
     
     $COND_PERCENT        Percentage by which to pseudo-condense type
    +$COLOR_SCHEME        Color scheme used in NEWCOLOR
     $CURRENT_QUAD        Restores current quad value in RULE
     $CURRENT_TAB         Current tab number
     $DC_ADJUST           +|- # of points to subtract from dropcap
     $DC_FAM              Drop cap family
     $DC_FT               Drop cap font
    +$ENUMERATOR<n>       String enumerator for depth <n> in lists 
     $EXT_PERCENT         Percentage by which to pseudo-extend type
     $FAMILY              Family
     $FAMILY_FOR_PAD      Used to ensure that the family in effect prior
    -                       to PAD is restored at the start of every iteration
    -                       of $PAD_STRING
    +                     to PAD is restored at the start of every
    +                     iteration of $PAD_STRING
     $FONT                Font
    +$FONT_FOR_PAD        Used to ensure that the font in effect prior
    +                     to PAD is restored at the start of every
    +                     iteration of $PAD_STRING
     $PAD_MARKER          Character to mark off padding in PAD
     $PAD_STRING          Arg passed to PAD
    -$QUAD_VALUE          Quad value (left, right, center, justify)
    -$QUOTE0              ``
    -$QUOTE1              ''
    -$RESTORE_QUAD_VALUE  Quad value for use in restoring L, R, C, J (after tabs)
    +$QUAD_VALUE          Quad value (left, right, centre, justify)
    +$QUOTE0              Open quotation marks
    +$QUOTE1              Close quotation marks
    +$RESTORE_COND        Restores the pseudo-condense value in effect
    +                     prior to DROPCAP
    +$RESTORE_EXT         Restores the pseudo-extend value in effect
    +                     prior to DROPCAP
    +$RESTORE_FAM         Used to restore the family in effect
    +                     prior to DROPCAP
    +$RESTORE_FT          Used to restore the font/fontstyle in effect
    +                     prior to DROPCAP
    +$RESTORE_PT_SIZE     Used to restore the point size of normal
    +                     running text after a dropcap
    +$RESTORE_QUAD_VALUE  Quad value for use in restoring L, R, C, J
    +                     (after tabs)
    +$SAVED_STYLE         Current style, if there is one (used in FAMILY)
    +$SEPARATOR<n>        Separator for depth <n> in lists
     $SS_VAR              Holds + or - sentence space value
     $ST<#>_FILL          Always QUAD if QUAD passed to ST <#>
     $ST<#>_QUAD_DIR      Quad direction supplied to ST for <#>
    -$TAB_NUMBER          Argument passed to TAB macro to call TAB# macro created in TAB_SET
    +$TAB_NUMBER          Argument passed to TAB macro to call TAB# macro
    +                     created in TAB_SET
     $WS_CONSTANT         12; used to hold groff default wordspace
    -$WS                  Holds WS value; concatenation of WS_CONSTANT and WS_VAR
    +$WS                  Holds WS value; concatenation of WS_CONSTANT and
    +                     WS_VAR
     $WS_VAR              + or - value to add to $WS_CONSTANT
    +BLACK                Pre-defined black color
    +black                Pre-defined black color
    +WHITE                Pre-defined white color
    +white                Pre-defined white color
     
     +++ALIASES+++
     
    @@ -274,6 +380,7 @@ ALIAS         als
     ALIASN        aln
     BR            br
     CENTRE        CENTER
    +COLOUR        COLOR
     COMMENT       SILENT
     CONDENSE      CONDENSE_OR_EXTEND
     EXTEND        CONDENSE_OR_EXTEND
    @@ -285,6 +392,7 @@ LIG           LIGATURES
     LL            LINE_LENGTH
     MAC           de
     NEW_PAGE      bp
    +NEWCOLOUR     NEWCOLOR
     NEWPAGE       NEW_PAGE
     PAGELENGTH    PAGE_LENGTH
     PAGE_LENGTH   pl
    @@ -296,6 +404,7 @@ TABSET        TAB_SET
     TB            TAB
     TI            IT
     UNDERSCORE_2  UNDERSCORE2
    +XCOLOUR       XCOLOR
     
     +++ALIASES FOR NUMBER REGISTERS+++
     
    @@ -316,11 +425,14 @@ BOLDER       Pseudo-bold on
     BOLDERX      Pseudo-bold off
     BP           Back points (horizontal movement)
     BU           Back units (inline pairwise kerning)
    -COND_FOR_SUP Pseudo-condense string for use with superscripts (called with CONDSUP)
    -COND_FOR_SUP Pseudo-extend string for use with superscripts (called with EXTSUP)
    +COND_FOR_SUP Pseudo-condense string for use with superscripts
    +             (called with CONDSUP)
    +COND_FOR_SUP Pseudo-extend string for use with superscripts (called
    +             with EXTSUP)
     COND         Pseudo-condense type
     CONDX        Pseudo-condense off
    -CONDSUP      Pseudo-condensed superscript (using value set with CONDENSE)
    +CONDSUP      Pseudo-condensed superscript (using value set with
    +             CONDENSE)
     CONDSUPX     Pseudo-condensed superscript off
     DOWN         Inline downward vertical movement
     EXT          Pseudo-extend type
    @@ -331,7 +443,8 @@ FP           Forward points (horizontal movement)
     FU           Forward units (inline pairwise kerning)
     FWD          Inline forward horizontal movement
     LEADER       Deposit leader to end of current LL or TAB
    -RULE         Draw a rule to the full measure of the current line or tab length
    +RULE         Draw a rule to the full measure of the current line or
    +             tab length
     SLANT        Slant (pseudo-italic on
     SLANTX       Slant off
     ST<#>        String tab end marker
    @@ -357,556 +470,1430 @@ Document info
     AUTHOR          Author
     CHAPTER         Chapter number
     CHAPTER_TITLE   Chapter title
    +COPYRIGHT       Copyright info (covers only)
    +DOCTITLE        Overall doc title (for collated docs)
     DRAFT           Draft number
    +MISC            Misc info (covers only)
     REVISION        Revision number
     SUBTITLE        Doc subtitle
     TITLE           Doc title
     
    +Covers
    +------
    +COVER               What goes on cover
    +COVERS              Whether covers get printed (toggle)
    +COVER_ADVANCE       Set vertical start position of cover material
    +COVER_LEAD          Overall leading of covers
    +COVERTITLE          User-defined cover title string
    +DOC_COVER           What goes on doc cover
    +DOC_COVERS          Whether doc covers get printed
    +DOC_COVER_ADVANCE   Set vertical start position of doc cover material
    +DOC_COVER_LEAD      Overall leading of doc covers
    +DOC_COVERTITLE      User-defined doc cover title string
    +
     Document style
     --------------
    -COPYSTYLE   Output style (DRAFT or FINAL)
    -DEFAULTS    In START, sets defaults
    -DOCTYPE     Kind of doc (DEFAULT, CHAPTER, NAMED, LETTER)
    -PAGENUMBER  Page number that appears on 1st page of doc
    -PAPER       Paper size (LETTER, LEGAL, A4)
    -PRINTSTYLE  Print style (TYPEWRITE or TYPESET)
    +COPYSTYLE     Output style (DRAFT or FINAL)
    +DEFAULTS      In START, sets defaults
    +DOCTYPE       Kind of doc (DEFAULT, CHAPTER, NAMED, LETTER)
    +PAGENUMBER    Page number that appears on 1st page of doc
    +PAPER         Paper size (LETTER, LEGAL, A4)
    +PRINTSTYLE    Print style (TYPEWRITE or TYPESET)
    +NUMBER_LINES  Number output lines in the left margin
     
    -Document tags
    --------------
    -BLOCKQUOTE  Block-indented, quoted text
    -COL_BREAK   Breaks and spreads line before invocation; moves to next column on page or 1st col of next page.  An alias of COL_NEXT.
    -COL_NEXT    Moves to next column on page or 1st col of next page
    -ENDNOTE     Endnote
    -ENDNOTES    Output endnotes
    -EPIGRAPH    Epigraph before 1st para 
    -FINIS       Prints --END--
    -FOOTNOTE    Collects footnotes in text for printing at bottom of page
    -HEAD        Section title (main heads)
    -LINEBREAK   Break between narrative sections
    -PARAHEAD    Paragraph head
    -PP          Paragraph
    -QUOTE       Poetic or line for line quotes
    -START       Prints info collected with doc info macros
    -SUBHEAD     Subheads
    +Document tags and macros
    +------------------------
    +ADD_SPACE               Special macro to add space to the top of a pages after
    +                        page 1; must be preceded by NEWPAGE
    +BIBLIOGRAPHY            Begin a bibliography page
    +BIBLIOGRAPHY_TYPE       LIST or PLAIN
    +BLOCKQUOTE              Block-indented, quoted text
    +COL_BREAK               Breaks and spreads line before invocation; moves to
    +                        next column on page or 1st col of next page.  An alias
    +                        of COL_NEXT.
    +COL_NEXT                Moves to next column on page or 1st col of next page
    +ENDNOTE                 Endnote
    +ENDNOTE_REFS            Send REFs to endnotes
    +ENDNOTES                Output endnotes
    +EPIGRAPH                Epigraph before 1st para 
    +FINIS                   Prints --END--
    +FOOTNOTE                Collects footnotes in text for printing at bottom of page
    +FOOTNOTE_REFS           Send REFs to footnotes
    +HEAD                    Section title (main heads)
    +HYPHENATE_REFS          Turn on/off hyphenation of REF references
    +ITEM                    Begin a list item
    +LINEBREAK               Break between narrative sections
    +LIST                    Initialize a list
    +MN                      Margin note
    +MN_INIT                 Initialize parameters for margin notes
    +NUMBER_LINES            Number text lines
    +NUMBER_BLOCKQUOTE_LINES Number blockquote lines
    +NUMBER_QUOTE_LINES      Number quote lines
    +PAD_LIST_DIGITS         Leave space for two-numeral digit enumerators
    +                        in a list
    +PARAHEAD                Paragraph head
    +PP                      Paragraph
    +QUOTE                   Poetic or line for line quotes
    +REF                     Wrapper around FOOTNOTE or ENDNOTE, depending
    +                        on FOOTNOTE_REFS or ENDNOTE_REFS
    +REF(                    Begin embedded reference, parens
    +REF)                    End embedded reference, parens
    +REF[                    Begin embedded reference, square brackets
    +REF]                    End embedded reference, square brackets
    +REF{                    Begin embedded reference, braces
    +REF}                    End embedded reference, braces
    +REF_INDENT              Amount of 2nd line indent of references for
    +                        footnote, endnote or bibliography refs
    +RESET_LIST              Reset digit or alpha list enumerator
    +SHIFT_LIST              Move a list over to the right
    +START                   Sets doc defaults and prints info collected
    +                        with doc info macros
    +SUBHEAD                 Subheads
     
     Headers/footers
    ---------------
    -BREAK_QUOTE          Manually break a footnoted quote that crosses a page/column
    +---------------
    +BREAK_QUOTE          Manually break a footnoted quote that crosses
    +                     a page/column
     DO_FOOTER            Prints footer (after footnote processing, if any)
     FOOTER_ON_FIRST_PAGE Print footer on first page? (toggle)
     FOOTER               Trap-invoked footer macro
     HEADER               Trap-invoked header macro
     PAGINATE             Turns page numbering on or off (doc default=on)
    -RECTO_VERSO          Enables switch HEADER_LEFT and HEADER_RIGHT on alternate pages
    +PAGINATE_TOC         Turns pagination of toc on or off (default=on)
    +RECTO_VERSO          Enables switch HEADER_LEFT and HEADER_RIGHT on
    +                     alternate pages
     
     Alter doc "look" and/or change defaults
     ---------------------------------------
    -ALWAYS_FULLSPACE_QUOTES  Fullspace quotes instead of default 1/2 spacing them.
    +***General***
    +
    +ALWAYS_FULLSPACE_QUOTES  Fullspace quotes instead of default
    +                         1/2 spacing them.
     ATTRIBUTE_STRING         What to print before author (default is "by")
    -AUTHOR_FAMILY            Family to use for author in doc header
    -AUTHOR_FONT              Font to use for author in doc header
    -AUTHOR_SIZE              ps to use for author in doc header
    -BLOCKQUOTE_FAMILY        Family to use in blockquotes
    -BLOCKQUOTE_FONT          Font to use in blockquotes
    -BLOCKQUOTE_QUAD          How to quad blockquotes
    -BLOCKQUOTE_SIZE          How much to de/increase point size of bquotes
    -CHAPTER_STRING           What to print whenever the word "chapter" is required
    -CHAPTER_TITLE_FAMILY     Family to use for chapter title in doc header
    -CHAPTER_TITLE_FONT       Font to use for chapter title in doc header
    -CHAPTER_TITLE_SIZE       ps in/decrease of chapter title (relative to size of running text)
    +CHAPTER_STRING           What to print whenever the word "chapter"
    +                         is required
     COLUMNS                  Print in columns
     DOC_FAMILY               Overall doc family
    -DOCHEADER_ADVANCE        Start position of docheader (relative to top of page)
    -DOCHEADER_LEAD           +|- value applied to #DOC_LEAD to in/decrease leading of doc header
    -DOC_HEADER               Print doc header?
    +DOCHEADER                Print doc header?
    +DOCHEADER_ADVANCE        Start position of docheader (relative to top
    +                         of page)
    +DOCHEADER_LEAD           +|- value applied to #DOC_LEAD to in/decrease
    +                         leading of doc header
     DOC_LEAD_ADJUST          Adjust #DOC_LEAD to fill page to #B_MARGIN
     DOC_LEAD                 Overall doc leading
     DOC_LEFT_MARGIN          Doc left margin
     DOC_LINE_LENGTH          Doc line length
     DOC_PT_SIZE              Overall doc point size
    -DOC_QUAD                 Overall quad of document
     DOC_RIGHT_MARGIN         Doc right margin
    -DOCTYPE_FAMILY           Family to use for doctype string in doc header
    -DOCTYPE_FONT             Font to use for doctype string in doc header
    -DOCTYPE_SIZE             ps to use for doctype string in doc header
    -DOCTYPE                  Type of doc (DEFAULT, CHAPTER, NAMED, LETTER)
    -DO_QUOTE                 Print quote (invoked from QUOTE or BLOCKQUOTE)
    -DRAFT_STRING             What to print whenever the word "draft" is required
    -DRAFT_WITH_PAGENUMBER    Attach draft/revision info to page number (instead of putting it HEADER center)
    -ENDNOTE_FAMILY           Family for endnotes
    -ENDNOTE_FONT             Font for endnotes
    -ENDNOTE_LEAD             Leading for endnotes page
    -ENDNOTE_PARA_INDENT      First line indent of paras in multi-para endnotes
    -ENDNOTE_PARA_SPACE       Whether to space paras in multi-para endnotes
    -ENDNOTE_PT_SIZE          Base point size for endnotes page
    -ENDNOTE_QUAD             Endnote quad
    -ENDNOTE_STRING           Endnotes page head
    -ENDNOTE_STRING_FAMILY    Family for endnotes page head
    -ENDNOTE_STRING_FONT      Font for endnotes page head
    -ENDNOTE_STRING_QUAD      Quad direction for endnotes page head
    -ENDNOTE_STRING_SIZE      Size for endnotes page head
    -ENDNOTE_STRING_UNDERSCORE Underscoring of endnotes page head
    -ENDNOTE_TITLE            Endnotes identifying title
    -ENDNOTE_TITLE_FAMILY     Family for endnotes identifying title
    -ENDNOTE_TITLE_FONT       Font for endnotes identifying title
    -ENDNOTE_TITLE_QUAD       Quad direction for endnotes identifying title
    -ENDNOTE_TITLE_SIZE       Size for endnotes identifying title
    -ENDNOTE_TITLE_UNDERSCORE Underscoring of endnotes identifying title
    -ENDNOTE_NUMBER_FAMILY    Family of endnote numbers
    -ENDNOTE_NUMBER_FONT      Font of endnote numbers
    -ENDNOTE_NUMBER_SIZE      Size of endnote numbers
    -ENDNOTE_NUMBERS_ALIGN_RIGHT Hang endnote numbers and align right
    -ENDNOTE_NUMBERS_ALIGN_LEFT  Dont' hang endnote numbers and align left
    -ENDNOTES_HDRFTR_CENTER   Print header/footer center string on endnotes pages?
    -ENDNOTES_HEADER_CENTER   Print header center string on endnotes pages?
    -ENDNOTES_FOOTER_CENTER   Print footer center string on endnotes pages?
    +DOC_TITLE                Overall doc title that gets printed in
    +                         headers/footers (mostly for use with collated
    +                         docs where each doc is an article with a
    +                         different title
    +DRAFT_STRING             What to print whenever the word "draft" is
    +                         required
    +DRAFT_WITH_PAGENUMBER    Attach draft/revision info to page number
    +                         (instead of putting it HEADER centre)
    +REVISION_STRING          What to print whenever the word "revision"
    +                         is required
    +
    +***Covers***
    +
    +COVER_ADVANCE            Vertical place on page to start outputting
    +                         cover material
    +COVER_LEAD               Lead in/decrease for cover pages
    +DOC_COVER_ADVANCE        Vertical place on page to start outputting
    +                         doc cover material
    +DOC_COVER_LEAD           Lead in/decrease for doc cover pages
    +
    +***Epigraphs and finis***
    +
     EPIGRAPH_AUTOLEAD        Autolead value for epigraphs
    -EPIGRAPH_FAMILY          Family to use in epigraphs
    -EPIGRAPH_FONT            Font to use in epigraphs
    -EPIGRAPH_INDENT          Value by which to multiply PP_INDENT for block epigraphs
    -EPIGRAPH_QUAD            Quad value of block style epigraphs
    -EPIGRAPH_SIZE            ps de/increase of epigraphs*
    +EPIGRAPH_INDENT          Value by which to multiply PP_INDENT for
    +                         block epigraphs
     FINIS_STRING             What to print when FINIS is invoked
    +
    +***Footnotes***
    +
    +FOOTNOTE_AUTOLEAD             Autolead to use in footnotes
    +FOOTNOTE_LINENUMBER_BRACKETS  Brackets for footnote linenumbers
    +FOOTNOTE_LINENUMBER_SEPARATOR Separator for footnote linenumbers
    +FOOTNOTE_MARKERS              Turns footnote markers on or off
    +FOOTNOTE_MARKER_STYLE         STAR or NUMBER; default=STAR
    +FOOTNOTE_RULE_ADJ             # of points to raise footnote rule from its
    +                              baseline
    +FOOTNOTE_RULE_LENGTH          Length of footnote separator rule
    +FOOTNOTE_RULE                 Turns printing of fn separator rule on or off;
    +                              default is on
    +FOOTNOTE_SPACING              Post footnote item spacing
    +FOOTNOTES_RUN_ON              Run footnotes on (line numbering mode only)
    +RESET_FOOTNOTE_NUMBER         Reset fn# to 1, or, if arg PAGE, reset
    +                              automatically to 1 on every page
    +RUNON_WARNING                 Utility macro; warns if FOOTNOTES_RUN_ON
    +                              was called when fn marker style is STAR or NUMBER
    +
    +***Endnotes***
    +
    +ENDNOTE_LEAD                 Leading for endnotes page
    +ENDNOTE_LINENUMBER_BRACKETS  Brackets around line numbers identifying
    +                             endnotes and text
    +ENDNOTE_LINENUMBER_GAP       Amount of space to leave between line
    +ENDNOTE_LINENUMBER_SEPARATOR Separator between line numbers identifying
    +                             endnotes and the endnote item text
    +                             endnotes and text
    +ENDNOTE_MARKER_STYLE         NUMBER or LINE
    +ENDNOTE_NUMBERS_ALIGN_RIGHT  Hang endnote numbers and align right
    +ENDNOTE_NUMBERS_ALIGN_LEFT   Don't hang endnote numbers and align left
    +ENDNOTE_PARA_INDENT          First line indent of paras in multi-para
    +                             endnotes
    +ENDNOTE_PARA_SPACE           Whether to space paras in multi-para endnotes
    +ENDNOTE_PT_SIZE              Base point size for endnotes page
    +ENDNOTE_STRING               Endnotes page head
    +ENDNOTE_STRING_CAPS          Capitalize the endnotes string
    +ENDNOTE_STRING_UNDERSCORE    Underscoring of endnotes page head
    +ENDNOTE_TITLE                Endnotes identifying title
    +ENDNOTE_TITLE_SPACE          Distance from top of page to endnotest title
    +ENDNOTE_TITLE_UNDERSCORE     Underscoring of endnotes identifying title
    +ENDNOTES_ALLOWS_HEADERS      Page headers on endnotes pages? (toggle)
    +ENDNOTES_FIRST_PAGENUMBER    Page number to appear on page 1 of endnotes
    +                             pages
    +ENDNOTES_HDRFTR_CENTER       Print header/footer centre string on endnotes
    +                             pages?
    +ENDNOTES_HEADER_CENTER       Print header centre string on endnotes pages?
    +ENDNOTES_FOOTER_CENTER       Print footer centre string on endnotes pages?
    +ENDNOTES_NO_COLUMNS          Turn columnar mode off for endnotes pages
    +ENDNOTES_NO_FIRST_PAGENUM    Don't print a pagenumber on page 1 of
    +                             endnotes.
    +ENDNOTES_PAGENUM_STYLE       Set numbering style for endnotes pages page
    +                             numbers
    +SINGLESPACE_ENDNOTES         Single space TYPEWRITE endnotes
    +
    +***Bibliographies***
    +
    +BIBLIOGRAPHY_ALLOWS_HEADERS    Allow headers on bib pages
    +BIBLIOGRAPHY_FIRST_PAGENUMBER  Starting page number for bibliographies
    +BIBLIOGRAPHY_HDRFTR_CENTER     Header/footer center string for bib pages
    +BIBLIOGRAPHY_LEAD              Base lead of bib pages
    +BIBLIOGRAPHY_NO_COLUMNS        De-columnize bibliographies
    +BIBLIOGRAPHY_NO_FIRST_PAGENUM  Don't print a page number on the first
    +                               page of bibliographies
    +BIBLIOGRAPHY_PAGENUM_STYLE     Format for bib pages page numbering
    +BIBLIOGRAPHY_PT_SIZE           Base point size for bib pages
    +BIBLIOGRAPHY_SPACING           Post bib entry space
    +BIBLIOGRAPHY_STRING            String for bib title
    +BIBLIOGRAPHY_STRING_CAPS       Capitalize bib title string
    +BIBLIOGRAPHY_STRING_UNDERSCORE Underscore bib title string
    +SINGLESPACE_BIBLIOGRAPHY       Singlespace bibs if PRINTSTYLE TYPEWRITE
    +
    +***Headers and footers***
    +
    +FOOTER_COLOR             Footer color
     FOOTER_GAP               Distance between running text and footer
     FOOTER_MARGIN            Distance from footer to bottom of page
     FOOTERS                  Turns footers on or off
    -FOOTNOTE_AUTOLEAD        Autolead to use in footnotes
    -FOOTNOTE_FAMILY          Family to use in footnotes
    -FOOTNOTE_FONT            Font to use in footnotes
    -FOOTNOTE_MARKERS         Turns footnote markers on or off
    -FOOTNOTE_MARKER_STYLE    STAR or NUMBER; default=STAR
    -FOOTNOTE_QUAD            Quad to use in footnotes
    -FOOTNOTE_RULE_ADJ        # of points to raise footnote rule from its baseline
    -FOOTNOTE_RULE_LENGTH     Length of footnote separator rule
    -FOOTNOTE_RULE            Turns printing of fn separator rule on or off; default is on
    -FOOTNOTE_SIZE            ps of footnotes
    -HDRFTR_CENTER_CAPS       Center part of header/footer in caps? (toggle)
    -HDRFTR_CENTER_FAMILY     Family of center part of header/footer
    -HDRFTR_CENTER_FONT       Font of center part of header/footer
    -HDRFTR_CENTER_SIZE       ps in/decrease of center part of header/footer**
    -HDRFTR_CENTER            String to go in center part of header/footer; default doctype 
    -HDRFTR_CENTER            The header/footer center string
    -HDRFTR_FAMILY            Family to use in the headers/footers
    +HDRFTR_CENTER            String to go in centre part of header/footer;
    +                         default doctype 
    +HDRFTR_CENTER_CAPS       Centre part of header/footer in caps? (toggle)
    +HDRFTR_CENTER_PAD        Pad hdrftr CENTER left or right by specified
    +                         amount
     HDRFTR_GAP               Distance from header/footer to running text
     HDRFTR_LEFT_CAPS         Left part of header/footer in caps? (toggle)
    -HDRFTR_LEFT_FAMILY       Family of left part of header/footer
    -HDRFTR_LEFT_FONT         Font of left part of header/footer
    -HDRFTR_LEFT_SIZE         ps in/decrease of left part of headers/footers**
    -HDRFTR_LEFT              String to go in left part of header/footer; default author
    +HDRFTR_LEFT              String to go in left part of header/footer;
    +                         default is AUTHOR_1
     HDRFTR_LEFT              The header/footer left string
     HDRFTR_MARGIN            Distance from top of page to header
    -HDRFTR_PLAIN             Header/footer fam/ft/ps all same as running text
    -HDRFTR_RECTO             User-defined, single string recto header/footer
    +HDRFTR_PLAIN             Header/footer fam/ft/ps all same as running
    +                         text
    +HDRFTR_RECTO             User-defined, single string recto
    +                         header/footer
     HDRFTR_RIGHT_CAPS        Right part of header/footer in caps? (toggle)
    -HDRFTR_RIGHT_FAMILY      Family of right part of headers/footers
    -HDRFTR_RIGHT_FONT        Font of right part of headers/footers
    -HDRFTR_RIGHT_SIZE        Size of right part of headers/footers
     HDRFTR_RIGHT             The header/footer right string
    -HDRFTR_RULE_GAP          Space between header/footer and header/footer rule
    +HDRFTR_RULE_GAP          Space between header/footer and header/footer
    +                         rule
     HDRFTR_RULE_INTERNAL     Prints the header/footer rule
     HDRFTR_RULE              Turns header/footer rule on or off
    -HDRFTR_RULE              Turns header/footer rule on or off.  When invoked internally, prints the rule.
    -HDRFTR_SIZE              ps in/decrease of headers/footers*
    -HDRFTR_VERSO             User-defined, single string verso header/footer
    -HEAD_CAPS                Print section titles in caps? (toggle)
    +                         When invoked internally, prints the rule.
    +HDRFTR_VERSO             User-defined, single string verso
    +                         header/footer
    +HEADERS                  Turns headers on or off
    +SWITCH_HDRFTR            Switch HDRFTR_LEFT and HDRFTR_RIGHT
    +
    +***Page numbering***
    +
    +PAGENUM_HYPHENS          Turns on/off hyphens surrounding page numbers
    +PAGENUM_ON_FIRST_PAGE    Print page number on first page when footers
    +                         are on (toggle)
    +PAGENUM_POS              Controls placement of page numbers;
    +                         default=bottom/centred
    +PAGENUM_SIZE             How much to in/decrease point size of page
    +                         numbers*
    +PAGENUM_STYLE            Page # in roman, Arabic, or alphabetic
    +RESTORE_PAGINATION       Restore pagination after outputting non-
    +                         paginated endnotes.
    +SUSPEND_PAGINATION       Suspend pagination prior to outputting
    +                         endnotes
    +
    +***Heads***
    +
     HEADER_GAP               Space between header and running text
     HEADER_MARGIN            Space from top of page to header
    -HEADERS                  Turns headers on or off
    -HEAD_FAMILY              Family to use in section titles
    -HEAD_FONT                Font to use in section titles
    -HEAD_QUAD                Quad value of section titles
    -HEAD_SIZE                How much to in/decrease point size of section titles
    -HEAD_SPACE               Give HEADs 2 line-spaces before. If OFF, only 1.  Default is on.
    +HEAD_CAPS                Print section titles in caps? (toggle)
    +HEAD_SPACE               Give HEADs 2 line-spaces before. If OFF,
    +                         only 1.  Default is on.
     HEAD_UNDERLINE           Underline section titles? (toggle)
    -INDENT_FIRST_PARAS       Indent 1st paras? (doc default=not indented) 
    -ITALIC_MEANS_ITALIC      For TYPEWRITE; render .FT I in italic.
     NUMBER_HEADS             Print head numbers
    -NUMBER_PARAHEADS         Print parahead numbers
    +RESET_HEAD_NUMBER        Reset head number
    +
    +***Subheads***
    +
     NUMBER_SUBHEADS          Print subhead numbers
    -PAGENUM_FAMILY           Family to use in footers
    -PAGENUM_FONT             Font to use for page numbers
    -PAGENUM_HYPHENS          Turns on/off hyphens surrounding page numbers
    -PAGENUM_ON_FIRST_PAGE    Print page number on first page when footers are on (toggle)
    -PAGENUM_POS              Controls placement of page numbers default=bottom/centered
    -PAGENUM_SIZE             How much to in/decrease point size of page numbers
    -PAGENUM_STYLE            Page # in roman, arabic, or alphabetic
    -PARAHEAD_FAMILY          Family to use for paraheads
    -PARAHEAD_FONT            Font to use for paraheads
    -PARAHEAD_INDENT          How mucht to indent paraheads
    -PARAHEAD_SIZE            Size of paraheads
    +RESET_SUBHEAD_NUMBER     Reset subhead number
    +
    +***Para heads***
    +
    +NUMBER_PARAHEADS         Print parahead numbers
    +PARAHEAD_INDENT          How much to indent paraheads
    +RESET_PARAHEAD_NUMBER    Reset parahead number
    +
    +***Paragraphs***
    +
    +INDENT_FIRST_PARAS       Indent 1st paras? (doc default=not indented) 
     PARA_INDENT              Size of para indent
     PARA_SPACE               Put a line space before paras
     PP_FONT                  Overall doc font
    -QUOTE_FAMILY             Family to use in pquotes
    -QUOTE_FONT               Font to use in pquotes
    -QUOTE_INDENT             Value by which to multiply PP_INDENT for block quotes
    -QUOTE_SIZE               How much to de/increase point size of pquotes
    -RESET_FOOTNOTE_NUMBER    Reset fn# to 1, or, if arg PAGE, reset automatically to 1 on every page
    -RESET_HEAD_NUMBER        Reset head number
    -RESET_PARAHEAD_NUMBER    Reset parahead number
    -RESET_SUBHEAD_NUMBER     Reset subhead number
    -REVISION_STRING          What to print whenever the word "revision" is required
    +
    +***Quotes***
    +
    +Q_FITS                  Utility macro for DO_QUOTE
    +Q_NOFIT                 Utility macro for DO_QUOTE
    +QUOTE_AUTOLEAD          Leading of (block)quotes
    +
    +***Line/section breaks***
    +
    +LINEBREAK_CHAR           Linebreak character, iterations and positioning
    +
    +***Printstyle TYPEWRITE***
    +
    +ITALIC_MEANS_ITALIC      For TYPEWRITE; render .FT I in italic.
     SLANT_MEANS_SLANT        In TYPEWRITE, render \*[SLANT] as slant
    -SUBHEAD_FAMILY           Family to use in subheads
    -SUBHEAD_FONT             Font to use in subheads
    -SUBHEAD_SIZE             How much to in/decrease point size of subheads
    -SUBTITLE_FAMILY          Family to use for subtitle in doc header
    -SUBTITLE_FONT            Font to use for subtitle in doc header
    -SUBTITLE_SIZE            ps to use for subtitle in doc header
    -SWITCH_HDRFTR            Switch HDRFTR_LEFT and HDRFTR_RIGHT
    -TITLE_FAMILY             Family to use for title in doc headers
    -TITLE_FONT               Font to use for title in doc headers
    -TITLE_SIZE               How much to in/decrease title at start of doc
     UNDERLINE_ITALIC         In TYPEWRITE, render .FT I as underlined
     UNDERLINE_QUOTES         In TYPEWRITE, underline quotes? (toggle)
     UNDERLINE_SLANT          In TYPEWRITE, render \*[SLANT] as underlined
     
    - *relative to #DOC_PT_SIZE
    -**relative to overall ps of headers as set by HEADER_SIZE
    +***Table of contents***
    +
    +TOC_APPENDS_AUTHORS      Appends author(s) to toc doc title entries
    +TOC_LEAD                 Leading of toc pages
    +TOC_PADDING              Number of placeholders for toc entries page
    +                         numbers
    +TOC_HEAD_INDENT          Indent of toc head entries
    +TOC_HEADER_STRING        TOC header string (default=Contents)
    +TOC_PAGENUM_STYLE        Page numbering style (hdrftr nums) of
    +                         toc pages
    +TOC_RV_SWITCH            Switch L/R margins of toc pages
    +TOC_PARAHEAD_INDENT      Indent of toc parahead entries
    +TOC_SUBHEAD_INDENT       Indent of toc subhead entries
    +TOC_TITLE_ENTRY          User supplied toc doc title entry
    +TOC_TITLE_INDENT         Indent of toc doc title entries
    +
    +***Aliases for headers and footers***
    +HEADER_SIZE           HDRFTR_SIZE
    +HEADER_RIGHT_PS       HDRFTR_RIGHT_SIZE
    +HEADER_RIGHT_SIZE     HDRFTR_RIGHT_SIZE
    +HEADER_RIGHT_FAM      HDRFTR_RIGHT_FAMILY
    +HEADER_RIGHT_FAMILY   HDRFTR_RIGHT_FAMILY
    +HEADER_RIGHT_FONT     HDRFTR_RIGHT_FONT
    +HEADER_RIGHT_FT       HDRFTR_RIGHT_FONT
    +HEADER_LEFT_PS        HDRFTR_LEFT_SIZE
    +HEADER_LEFT_SIZE      HDRFTR_LEFT_SIZE
    +HEADER_LEFT_FAM       HDRFTR_LEFT_FAMILY
    +HEADER_LEFT_FAMILY    HDRFTR_LEFT_FAMILY
    +HEADER_LEFT_FONT      HDRFTR_LEFT_FONT
    +HEADER_LEFT_FT        HDRFTR_LEFT_FONT
    +HEADER_CENTRE_PS      HDRFTR_CENTER_SIZE
    +HEADER_CENTRE_SIZE    HDRFTR_CENTER_SIZE
    +HEADER_FAM            HDRFTR_FAMILY
    +HEADER_FAMILY         HDRFTR_FAMILY
    +HEADER_CENTRE_FAM     HDRFTR_CENTER_FAMILY
    +HEADER_CENTRE_FAMILY  HDRFTR_CENTER_FAMILY
    +HEADER_CENTRE_FONT    HDRFTR_CENTER_FONT
    +HEADER_CENTRE_FT      HDRFTR_CENTER_FONT
    +HEADER_CENTER_PS      HDRFTR_CENTER_SIZE
    +HEADER_CENTER_SIZE    HDRFTR_CENTER_SIZE
    +HEADER_CENTER_FAM     HDRFTR_CENTER_FAMILY
    +HEADER_CENTER_FAMILY  HDRFTR_CENTER_FAMILY
    +HEADER_CENTER_FONT    HDRFTR_CENTER_FONT
    +HEADER_CENTER_FT      HDRFTR_CENTER_FONT
    +FOOTER_SIZE           HDRFTR_SIZE
    +FOOTER_RIGHT_PS       HDRFTR_RIGHT_SIZE
    +FOOTER_RIGHT_SIZE     HDRFTR_RIGHT_SIZE
    +FOOTER_RIGHT_FAM      HDRFTR_RIGHT_FAMILY
    +FOOTER_RIGHT_FAMILY   HDRFTR_RIGHT_FAMILY
    +FOOTER_RIGHT_FONT     HDRFTR_RIGHT_FONT
    +FOOTER_RIGHT_FT       HDRFTR_RIGHT_FONT
    +FOOTER_LEFT_PS        HDRFTR_LEFT_SIZE
    +FOOTER_LEFT_SIZE      HDRFTR_LEFT_SIZE
    +FOOTER_LEFT_FAM       HDRFTR_LEFT_FAMILY
    +FOOTER_LEFT_FAMILY    HDRFTR_LEFT_FAMILY
    +FOOTER_LEFT_FONT      HDRFTR_LEFT_FONT
    +FOOTER_LEFT_FT        HDRFTR_LEFT_FONT
    +FOOTER_CENTRE_PS      HDRFTR_CENTER_SIZE
    +FOOTER_CENTRE_SIZE    HDRFTR_CENTER_SIZE
    +FOOTER_FAM            HDRFTR_FAMILY
    +FOOTER_FAMILY         HDRFTR_FAMILY
    +FOOTER_CENTRE_FAM     HDRFTR_CENTER_FAMILY
    +FOOTER_CENTRE_FAMILY  HDRFTR_CENTER_FAMILY
    +FOOTER_CENTRE_FT      HDRFTR_CENTER_FONT
    +FOOTER_CENTER_PS      HDRFTR_CENTER_SIZE
    +FOOTER_CENTER_SIZE    HDRFTR_CENTER_SIZE
    +FOOTER_CENTER_FAM     HDRFTR_CENTER_FAMILY
    +FOOTER_CENTER_FAMILY  HDRFTR_CENTER_FAMILY
    +FOOTER_CENTER_FONT    HDRFTR_CENTER_FONT
    +FOOTER_CENTER_FT      HDRFTR_CENTER_FONT
    +
    +   *relative to #DOC_PT_SIZE
    +  **relative to overall ps of headers as set by HEADER_SIZE
    + ***relative to overall ps of endnotes pages
    +****relative to overall ps of toc pages
     
     +++LETTER MACROS+++
     
    -CLOSING      Closing (ie. Yours truly,)
    -DATE         Date string for letters
    -FROM         Addressor's name and address
    -GREETING     Full salutation (eg. Dear John Smith,)
    +CLOSING      Closing (i.e. Yours truly,)
    +DATE         Date for letters
    +FROM         Addresser's name and address
    +GREETING     Full salutation (e.g. Dear John Smith,)
     NO_SUITE     Remove suite page numbers from bottom of letter pages
     TO           Addressee's name and address
     ALL_DONE     .em (the "end macro") for letters
     
    -+++DIVERSIONS+++
    -
    -B_QUOTE      Block (indented) quote text
    -CLOSING      Closing (ie. Yours truly,)
    -DATE         Date string for letters
    -EPI_TEXT     Epigraph text
    -FN_OVERFLOW  Excess footnotes when B_MARGIN is reached
    -FOOTNOTES    Text of footnotes
    -FROM_ADDRESS Addressor's name and address
    -GREETING     Full salutation (eg. Dear John Smith,)
    -P_QUOTE      Line for line (poetic) quote text
    -TO_ADDRESS   Addressee's name and address
    -
     +++SUPPORT+++
     
    -CHECK_INDENT         Applies indents to doc elements inside ev's (head, subhead, etc)
    -D0_QUOTE             Outputs quotes with space adjustments before and after
    -DIVERT_FN_LEFTOVER   Diverts excess fn stored in FN_OVERFLOW into FOOTNOTE
    -DIVERT_FN_OVERFLOW   Diverts excess fn stored in FN_OVERFLOW when FN_DEFER into FOOTNOTE
    -DO_EPIGRAPH          Outputs epigraphs with space adjustments before and after
    -FN_OVERFLOW_TRAP     Fixed at B_MARGIN; if footnotes run longer than B_MARGIN, diverts excess into FN_OVERFLOW
    +CHECK_INDENT         Applies indents to doc elements inside ev's
    +                     (head, subhead, etc)
    +CLEANUP_DEFAULTS     Removes selected rregisters and strings
    +                     from DEFAULTS after START
    +DO_COVER             Formats and outputs covers
    +DO_DOC_COVER         Formats and outputs doc covers
    +D0_QUOTE             Outputs quotes with space adjustments before
    +                     and after
    +DIVER_FN_1_PRE  -+     
    +DIVER_FN_2_PRE   |   Manage footnotes called inside diversions
    +                 |   QUOTE, BLOCKQUOTE and EPIGRAPH
    +DIVER_FN_2_POST -+
    +DIVERT_FN_LEFTOVER   Diverts excess fn stored in FN_OVERFLOW into
    +                     FOOTNOTE
    +DIVERT_FN_OVERFLOW   Diverts excess fn stored in FN_OVERFLOW when
    +                     FN_DEFER into FOOTNOTE
    +DO_EPIGRAPH          Outputs epigraphs with space adjustments before
    +                     and after
    +FN_OVERFLOW_TRAP     Fixed at B_MARGIN; if footnotes run longer than
    +                     B_MARGIN, diverts excess into FN_OVERFLOW
    +GET_ROMAN_INDENT     Figures out amount of space to reserve
    +                     for roman numerals in lists
     HDRFTR_RULE          Prints rule under header or over footer
    -PRINT_FOOTNOTE_RULE  An alias of PRINT_FOOTNOTE; prints footnote separator rule
    +MN_OVERFLOW_TRAP     Trap-invoked macro to collect margin note
    +                     overflows
    +PRINT_FOOTNOTE_RULE  An alias of PRINT_FOOTNOTE; prints footnote
    +                     separator rule
     PRINT_HDRFTR         Prints header/footer (trap invoked)
     PRINT_PAGE_NUMBER    Invoked in HEADER or FOOTER
    -PRINT_USERDEF_HDRFTR Prints user defined, single string recto/verso header/footer
    +PRINT_USERDEF_HDRFTR Prints user defined, single string recto/verso
    +                     header/footer
    +PROCESS_SHIM         Calculates #SHIM when \n(.d is lower on the
    +                     page than #T_MARGIN
    +PROCESS_FN_IN_DIVER  Processes footnotes gathered in a diversion (called
    +                     at page/column breaks)
     REMOVE_INDENT        Removes indents set with CHECK_INDENT
    -TRAPS                Sets hdrftr traps; optionally adjusts #DOC_LEAD to fill page to #B_MARGIN
    +Q_FITS               Handles spacing of quotes when quote fits on the page
    +Q_NOFIT              Handles spacing of quotes when quote does not fit on
    +                     the page
    +QUIT_LISTS           Exit lists cleanly and completely
    +SET_LIST_INDENT      Restore indent of a prev. level of list
    +SHIM                 Advance to next "legal" baseline
    +TERMINATE            .em that ensures deferred footnotes get output
    +                     on final pages
    +TRAPS                Sets hdrftr traps; optionally adjusts #DOC_LEAD
    +                     to fill page to #B_MARGIN
    +TYPEWRITER           Sets family (C), font (R) and point size (12)
    +                     for PRINTSTYLE TYPEWRITE
    +VFP_CHECK            Trap-sprung macro 1 legal baseline higher than
    +                     where FOOTER will be sprung; checks whether
    +                     there is, in fact, just enough room for
    +                     another line of running text to be added to
    +                     the page without jamming footnotes too close
    +                     to running text.
    +
    ++++DIVERSIONS+++
    +
    +B_QUOTE           Block (indented) quote text
    +CLOSING           Closing (i.e. Yours truly,)
    +EPI_TEXT          Epigraph text
    +END_NOTES         Endnotes text
    +FN_IN_DIVER       Footnotes gathered from inside a diversion
    +FN_OVERFLOW       Excess footnotes when B_MARGIN is reached
    +FOOTNOTES         Text of footnotes
    +GREETING          Full salutation (e.g. Dear John Smith,)
    +LETTERHEAD<n>     Date, addresser, addressee or greeting;
    +                  <n> is from 1 to 4, supplied by #FIELD
    +P_QUOTE           Line for line (poetic) quote text
    +RUNON_FOOTNOTES   Special diversion for run-on footnotes
    +RUNON_FN_IN_DIVER Special diversion for run-on footnotes inside
    +                  (block)quotes
    +TOC_ENTRIES       TOC entries
     
     +++NUMBER REGISTERS+++
     
    +#1ST_FN_VP_ADJ             An adjustment factor that ensures VFP
    +                           doesn't fall below what should be the
    +                           correct last printed line of running
    +                           text
    +#ADD_BREAK                 Instructs FOOTNOTEs and ENDNOTEs to add
    +                           a break afer processing a footnote if
    +                           we're not in fill mode
    +#ADJ_BIB_LEAD              Adjust BIB_LEAD? (toggle)
     #ADJ_DOC_LEAD              Adjust DOC_LEAD? (toggle)
    -#ARG_NUM                   Keeps track of number of args passed to a macro
    -#AUTHOR_LINES              # of lines of authors in doc header; odd=0 even=1
    -#AUTHOR_NUM                Keeps track of user-defined string AUTHOR_<#> in AUTHOR
    -#AUTHORS                   Equals final value of AUTHOR_NUM; used for authors in doc header
    +#ADJ_TOC_LEAD              Adjust TOC_LEAD? (toggle)
    +#ARG_NUM                   Keeps track of number of args passed to a
    +                           macro
    +#ARGS_TO_LIST              Was LIST passed some args? (toggle)
    +#AUTHOR_[n]                Strings passed to AUTHOR
    +#AUTHOR_LINES              # of lines of authors in doc header; odd=0
    +                           even=1
    +#AUTHOR_NUM                Keeps track of user-defined string
    +                           AUTHOR_<#> in AUTHOR
    +#AUTHORS                   Equals final value of AUTHOR_NUM;
    +                           used for authors in doc header
    +#BASELINE_MARK             In PP, the vertical position on the page
    +                           (when paragraph spacing is on) after a
    +                           quote or blockquote has been output and
    +                           the post-quote space has been added.
    +#BMARG                     Position of unvarying bottom margin
    +                           during doc processing; required for
    +                           collecting footnotes inside diversions
    +#BIB_ALLOWS_HEADERS        Put headers on bib pages? (toggle)
    +#BIB_ALLOWS_HEADERS_ALL    Put headers on all bib pages? (toggle)
    +#BIB_FIRST_PAGE            Tells PRINT_PAGE_NUMBER about bibliography
    +                           first page number
    +#BIB_FIRST_PN              Starting pagenumber for bibliographies
    +#BIB_HDRFTR_CENTER         Put a center string in bib page headers?
    +                           (toggle)
    +#BIB_LEAD                  Bibliography lead, expressed in points
    +#BIB_LIST                  Output bibs in list style? (toggle)
    +#BIB_NO_COLS               De-columnize bibliographies? (toggle)
    +#BIB_NO_FIRST_PN           Put a page number on the first page of
    +                           bibliographies? (toggle)
    +#BIB_SINGLESPACE           Single-space TYPEWRITE bibliographies? (toggle)
    +#BIB_SPACE                 Post item space for bibliography pages
    +#BIB_STRING_CAPS           Capitalize bib title? (toggle)
    +#BIB_STRING_UNDERSCORE     Underscore bib title? 0=no; 1=yes; 2=double
    +#BIB_PS                    Base point size for bibliography pages expressed
    +                           in points
    +#BIBLIOGRAPHY              Are we doing a bib page? (toggle)
    +#BQ_AUTOLEAD               Register created by BLOCKQUOTE_AUTOLEAD
    +#BQ_LEAD                   Leading of blockquotes
    +#BQUOTE_COLOR              Colored blockquotes? (toggle)
    +#BQUOTE_LN                 Number blockquotes? (toggle)
     #BROKEN_QUOTE              Did we invoke BREAK_QUOTE? (toggle)
    -#CAP_HEIGHT_ADJUST         Tallest cap height of strings LEFT, CENTER, and RIGHT in footers; used to place rule over footer
    -#CAPS_WAS_ON               In HDRFTR, to re-enable running text CAPS (toggle)
    -#CENTER_CAP_HEIGHT         Cap height of center string in headers/footers
    +#CAP_HEIGHT_ADJUST         Tallest cap height of strings LEFT, CENTER,
    +                           and RIGHT in footers; used to place rule
    +                           over footer
    +#CAPS_WAS_ON               In HDRFTR, to re-enable running text CAPS
    +                           (toggle)
    +#CENTER_CAP_HEIGHT         Cap height of CENTER string in
    +                           headers/footers
    +#CHAPTER_TITLE_COLOR       Colored chapter title? (toggle)
     #CLOSING                   Is there a closing (for letters)? 1=yes
     #COL_L_LENGTH              Line length of columns
    -#COL_NEXT                  Was COL_NEXT invoked? (toggle; used in FOOTER)
    -#COL_NUM                   Incrementing counter of num of columns; for use with #COL_<#>_L_MARGIN
    -#COL_TOTAL                 #COL_L_LENGTH + #GUTTER; used to calculate #COL_<#>_L_MARGIN
    +#COL_NEXT                  Was COL_NEXT invoked? (toggle; used in
    +                           FOOTER)
    +#COL_NUM                   Incrementing counter of num of columns;
    +                           for use with #COL_<#>_L_MARGIN
    +#COL_TOTAL                 #COL_L_LENGTH + #GUTTER; used to calculate
    +                           #COL_<#>_L_MARGIN
    +#COLLATED_DOC              If 1, instructs TOC that this is a collated
    +                           doc
     #COLUMNS                   Are columns turned on? (toggle)
    +#COLUMNS_WERE_ON           Stores columnar state prior to outputting
    +                           endnotes in no-columns mode
     #COPY_STYLE                1=draft, 2=final
    -#DATE                      Is there a date (for letters)? 1=yes
    +#COUNTERS_RESET            Tells FOOTNOTE if fn counters have
    +                           been reset because of footnotes gathered
    +                           inside a diversion
    +#COVER_COLOR               Colored cover? (toggle)
    +#COVER_START_POS           Vertical starting pos of cover material
    +#COVER_TITLE_COLOR         Colored cover title? (toggle)
    +#COVER_SUBTITLE_COLOR      Colored cover subtitle? (toggle)
    +#COVER_ATTRIBUTE_COLOR     Colored cover attribution string? (toggle)
    +#COVER_AUTHOR_COLOR        Colored cover author(s)? (toggle)
    +#COVER_DOCTYPE_COLOR       Colored cover doctype? (toggle)
    +#COVER_COPYRIGHT_COLOR     Colored cover copyright line? (toggle)
    +#COVER_MISC_COLOR          Colored cover misc line? (toggle)
    +#CURRENT_V_POS             \n(.d ; used in SHIM
    +#COVERS                    Print covers? (toggle)
    +#DATE_FIRST                Was .DATE invoked as first letter
    +                           header after .START? (toggle)
     dc                         "mark" register for document columns
    -#DEPTH_1                   Doc header depth with lead adjustment (#DOCHEADER_LINES * #DOCHEADER_LEAD)
    -#DEPTH_2                   Doc header depth without lead adjustment (#DOCHEADER_LINES * #DOC_LEAD)
    +#DIVER_FN                  Register that tells FOOTNOTE whether to
    +                           "move" or "defer" a footnote collected
    +                           inside a diversion
    +#DEFER_BIB_SPACING         Tells DEFAULTS to do BIBLIOGRAPHY_SPACING
    +                           if it was called before START
    +#DEFER_PAGINATION          Tells COLLATE to restore pagination (from
    +                           RESTORE_PAGINATION
    +#DELAY_SHIM                Instructs DO_QUOTE to delay SHIM when quote
    +                           falls at the top of a page
    +#DEPTH_1                   Doc header depth with lead adjustment
    +                           (#DOCHEADER_LINES * #DOCHEADER_LEAD)
    +#DEPTH_2                   Doc header depth without lead adjustment
    +                           (#DOCHEADER_LINES * #DOC_LEAD)
     #DEPTH_TO_B_MARGIN         Page length minus #B_MARGIN
    -#DOCHEADER_ADVANCE         Distance from top-of-page to baseline of docheader
    -#DOCHEADER_LEAD_ADJ        +|- value applied to #DOC_LEAD to in/decrease leading of doc header
    -#DOCHEADER_LEAD            Lead of doc header (#DOC_LEAD + #DOCHEADER_LEAD_ADJ)
    -#DOCHEADER_SPACE_ADJ       Lead difference between #DEPTH_1 and #DEPTH_2
    +#DIVERSIONS_HY_MARGIN      A reasonable value for .hym applied to
    +                           QUOTE, BLOCKQUOTE and EPIGRAPH to
    +                           avoid excessive hyphenation if these are
    +                           set quad left
    +#DIVERTED                  Set to 1 in DIVERT_FN_OVERFLOW; reset
    +                           subsequently in FOOTNOTES when called by
    +                           PROCESS_FN_LEFTOVER to 2 or 3 for use by
    +                           FOOTER to decide whether to in/decrease
    +                           #FN_DEPTH when outputting footnotes
    +#DOCHEADER_ADVANCE         Distance from top-of-page to baseline of
    +                           docheader
    +#DOCHEADER_COLOR           Colored docheader? (toggle)
    +#DOCHEADER_LEAD            Lead of doc header
    +                           (#DOC_LEAD + #DOCHEADER_LEAD_ADJ)
    +#DOCHEADER_SPACE_ADJ       Lead difference between #DEPTH_1 and
    +                           #DEPTH_2
    +#DOC_COVER_START_POS       Vertical starting pos of doc cover material
    +#DOC_COVERS                Print doc covers? (toggle)
    +#DOC_COVER_COLOR           Colored cover? (toggle)
    +#DOC_COVER_START_POS       Vertical starting pos of cover material
    +#DOC_COVER_TITLE_COLOR     Colored doc cover title? (toggle)
    +#DOC_COVER_SUBTITLE_COLOR  Colored doc cover subtitle? (toggle)
    +#DOC_COVER_ATTRIBUTE_COLOR Colored doc cover attribution string? (toggle)
    +#DOC_COVER_AUTHOR_COLOR    Colored doc cover author(s)? (toggle)
    +#DOC_COVER_DOCTYPE_COLOR   Colored doc cover doctype? (toggle)
    +#DOC_COVER_COPYRIGHT_COLOR Colored doc cover copyright line? (toggle)
    +#DOC_COVER_MISC_COLOR      Colored doc cover misc line? (toggle)
     #DOC_HEADER                Whether to print a doc header (toggle)
    -#DOC_LEAD_ADJ              Incrementing value (in units) added to #DOC_LEAD to fill page to #B_MARGIN
    +#DOC_LEAD_ADJ              Incrementing value (in units) added to
    +                           #DOC_LEAD to fill page to #B_MARGIN
     #DOC_LEAD                  Leading used in body
     #DOC_L_LENGTH              Global L_LENGTH
     #DOC_L_MARGIN              Global L_MARGIN
    -#DOC_LR_MARGIN_TMP         In HEADER, if RECTO_VERSO=1, temporarily holds DOC_L_MARGIN during page margin switch
    +#DOC_LR_MARGIN_TMP         In HEADER, if RECTO_VERSO=1, temporarily
    +                           holds DOC_L_MARGIN during page margin switch
     #DOC_PT_SIZE               Point size used for body text
     #DOC_R_MARGIN              Global R_MARGIN
     #DOCS                      Always 1 after START
     #DOC_TYPE                  1=default, 2=chapter, 3=named, 4=letter
    -#DRAFT                     The draft number
    -#DRAFT_WITH_PAGENUM        Are we attaching draft/revision info to page number? (toggle)
    +#DOING_COVER               Tells PRINT_AUTHORS that it's printing
    +                           the authors for a cover or doc cover
    +#DONE_ONCE                 Keeps track of how many times footnotes
    +                           have been collected inside the same diversion
    +#DONT_RULE_ME              Rule this (apparent) first footnote? (toggle)
    +#DIVER_LN_OFF              Turn linenumbering off in (block)quotes?
    +                           (toggle)
    +#DRAFT_WITH_PAGENUM        Are we attaching draft/revision info to page
    +                           number? (toggle)
     #EM_ADJUST                 Amount to raise \(em at END
    -#EN_PS                     ps of endnotes
    +#EN_ALLOWS_HEADERS         Put page headers on endnotes pages? (toggle)
    +#EN_ALLOWS_HEADERS_ALL     Put page headers on all endnotes pages?
    +                           (toggle)
    +#EN_BQ_AUTOLEAD            Register created by EN_BLOCKQUOTE_AUTOLEAD
    +#EN_BQ_LEAD                Leading of blockquotes on endnotes pages
    +#EN_FIGURE_SPACE           Width of \0, for use with formatting endnotes
    +#EN_FIRST_PAGE             Tells PRINT_PAGE_NUMBER about endnotes
    +                           first page number
    +#EN_FIRST_PN               Page number that appears on page 1 of
    +                           endnotes pages.
    +#EN_HDRFTR_CENTER          Should we print centre string of
    +                           headers/footers on endnotes pages? (toggle)
     #EN_LEAD                   Lead of endnotes
    -#EN_STRING_UNDERSCORE      Underscore endnotes page head? (toggle)
    -#EN_TITLE_UNDERSCORE       Underscore endnotes document identifier? (toggle)
    -#EN_NUMBERS_ALIGN_RIGHT    Hang and align endnote numbers right? (toggle)
    -#EN_NUMBERS_ALIGN_LEFT     Align endnote numbers with left margin? (toggle)
    -#EN_NUMBERS_PLACEHOLDERS   Number of placeholders when endnote numbers hang and align right
    -#EN_NUMBER_L_LENGTH        Line length for endnote numbers when they're right aligned
    -#EN_PP_INDENT              First line indent of paras in multi-para endnotes
    +#EN_LN_BRACKETS            Are we using brackets for line-numbered
    +                           endnotes (toggle)
    +#EN_LN_SEP                 Are we using a separator for line-numbered
    +                           endnotes (toggle)
    +#EN_MARK                   \n(ln when \*[EN-MARK] is called
    +#EN_MARK_2                 \n(ln when ENDNOTE is called
    +#EN_MARKER_STYLE           1=NUMBER; 2=LINE
    +#EN_NO_COLS                Do not set endnotes in columns? (toggle)
    +#EN_NO_FIRST_PN            Put pagenumber on 1st page of endnotes?
    +                           (toggle)
    +#EN_NUMBERS_ALIGN_RIGHT    Hang and align endnote numbers right?
    +                           (toggle)
    +#EN_NUMBERS_ALIGN_LEFT     Align endnote numbers with left margin?
    +                           (toggle)
    +#EN_NUMBERS_PLACEHOLDERS   Number of placeholders when endnote numbers
    +                           hang and align right
    +#EN_NUMBER_L_LENGTH        Line length for endnote numbers when they're
    +                           right aligned
    +#EN_PP_INDENT              First line indent of paras in multi-para
    +                           endnotes
     #EN_PP_SPACE               Space multi-paras in endnotes? (toggle)
    -#EN_TEXT_INDENT            Page offset for text of endnotes when numbers right align
    -#END_QUOTE                 For PP=0 indenting; did we just end a quote? (toggle)
    +#EN_PS                     ps of endnotes
    +#EN_Q_AUTOLEAD             Register created by EN_QUOTE_AUTOLEAD
    +#EN_Q_LEAD                 Leading of quotes on endnotes pages
    +#EN_REF                    Put REFs in endnotes? (toggle)
    +#EN_SINGLESPACE            Single space endnotes pages? (toggle)
    +#EN_STRING_CAPS            Should ENDNOTES capitalize the endnotes
    +                           string? (toggle)
    +#EN_STRING_UNDERSCORE      Underscore endnotes page head? (toggle)
    +#EN_TITLE_UNDERSCORE       Underscore endnotes document identifier?
    +                           (toggle)
    +#EN_TEXT_INDENT            Page offset for text of endnotes when
    +                           numbers right align
    +#END_QUOTE                 For PP=0 indenting; did we just end a quote?
    +                           (toggle)
     #ENDNOTE                   Are we in an endnote? (toggle)
    -#EN_HDRFTR_CENTER          Should we print centre string of headers/footers on endnotes pages? (toggle)
    +#ENDNOTE_REFS              Are REFs going to endnotes? (toggle)
    +#ENDNOTES                  Are we in an endnote (for FOOTERs; toggle)
     #EPI_ACTIVE                Are we in an epigraph? (toggle)
    -#EPI_DEPTH                 Depth of epigraph from first baseline to last
    +#EPI_COLOR                 Colored epigraphs? (toggle)
    +#EPI_DEPTH                 Depth of epigraph from first baseline to
    +                           last
     #EPI_FITS                  Does epigraph fit on page/column? (toggle)
     #EPIGRAPH                  Did we have an epigraph? (toggle) 
     #EPI_LEAD_DIFF             Difference between #DOC_LEAD and #EPI_LEAD
     #EPI_LEAD                  Leading of epigraph; set by AUTOLEAD
    -#EPI_LINES_EVEN            Even # of lines at end of epi crossing page in TYPEWRITE (d-spaced)?
    +#EPI_LINES_EVEN            Even # of lines at end of epi crossing page in
    +                           TYPEWRITE (d-spaced)?
     #EPI_LINES                 Number of lines in the epigraph
    -#EPI_LINES_TO_END          Number of epigraph lines remaining after footer trap is sprung
    -#EPI_LINES_TO_TRAP         Number of epigraph lines till footer trap is sprung
    +#EPI_LINES_TO_END          Number of epigraph lines remaining after
    +                           footer trap is sprung
    +#EPI_LINES_TO_TRAP         Number of epigraph lines till footer trap is
    +                           sprung
     #EPI_L_LENGTH              Epigraph line length
     #EPI_OFFSET                Left margin of epigraphs
     #EPI_OFFSET_VALUE          Epigraph indent as a function of page offset
     #EPI_ON                    Are we in an epigraph? (toggle)
    -#EPI_WHITESPACE            Space after epigraph to compensate for epigraph leading
    +#EPI_WHITESPACE            Space after epigraph to compensate for
    +                           epigraph leading
    +#FIELD                     Incrementing register tacked onto LETTERHEAD
    +#FINIS                     Was FINIS invoked? (toggle)
    +#FINIS_COLOR               Colored FINIS? (toggle)
     #FN_AUTOLEAD               Autolead value of footnotes
     #FN_BL_INDENT              Left indent of INDENT BOTH in footnotes
     #FN_BR_INDENT              Right indent of INDENT BOTH in footnotes
    -#FN_COUNT_FOR_COLS         Holds a separate footnote count for columns (so they don't reset to 0 1 until page break)
    -#FN_DEFER                  Defer footnote to next page/column? (toggle)  If 0, don't defer.
    -#FN_DEFER_SPACE            Whether to deposit space before footnote 1 because there's a deferred footnote on the page
    +#FN_COUNT                  Which fn marker to print; also to
    +                           tell mom to reserve space for and print
    +                           the rule above footnotes
    +#FN_COUNT_AT_FOOTER        The FN_COUNT after FOOTNOTES has been
    +                           output in FOOTER
    +#FN_COUNT_FOR_COLS         Holds a separate footnote count for columns
    +                           (so they don't reset to 0 1 until page break)
    +#FN_DEFER                  Defer footnote to next page/column? (toggle)
    +                           If 0, don't defer.
    +#FN_DEFER_SPACE            Whether to deposit space before
    +                           footnote 1 because there's a deferred
    +                           footnote on the page
     #FN_DEPTH                  Depth of footnote diversion(s)
    -#FN_FOR_EPI                Signals to epigraph that a footnote is being processed
    -#FN_LEAD                   Lead in footnotes after FN_AUTOLEAD is applied
    +#FN_FOR_EPI                Signals to epigraph that a footnote is being
    +                           processed
    +#FN_GAP                    When there are footnotes on a page, the
    +                           difference between where FOOTER will be
    +                           sprung and the next legal baseline.
    +                           Used in VFP_CHECK.
    +#FN_LEAD                   Lead in footnotes after FN_AUTOLEAD is
    +                           applied
     #FN_L_INDENT               Left indent of INDENT LEFT in footnotes
    -#FN_LINES                  Number of lines in fn; used to calculate fn depth
    +#FN_LINES                  Number of lines in fn; used to calculate
    +                           fn depth
    +#FN_LN_BRACKETS            Are footnote linenumber brackets being used?
    +                           (toggle)
    +#FN_LN_SEP                 Is a footnote linenumber separator being used?
    +                           (toggle)
    +#FN_MARK                   \n(ln when \*[FN-MARK] is called
    +#FN_MARK_2                 \n(nl when FOOTNOTE is called
     #FN_MARKERS                Print footnote markers? (toggle)
     #FN_MARKER_STYLE           1=STAR; 2=NUMBER
    -#FN_NUMBER                 Running count of fn #; used to print fn marker numbers
    +#FN_NUMBER                 The footnote number attached to running text
    +                           (and fns) when numbers instead of
    +                           star/dagger is being used for footnootes
    +                           numbers
    +#FN_OVERFLOW_TRAP_POS      The register that sets the position of
    +                           trap FN_OVERFLOW_TRAP.
     #FN_R_INDENT               Right indent of INDENT RIGHT in footnotes
    -#FN_RULE_ADJ               # of points to raise footnote separator from its baseline
    +#FN_REF                    Put REFs in footnotes? (toggle)
    +#FN_RULE_ADJ               # of points to raise footnote separator from
    +                           its baseline
     #FN_RULE_LENGTH            Length of footnote separator rule
     #FN_RULE                   Print fn rule? (toggle)
    -#FN_WAS_DEFERED            Tells HEADER about a defered footnote
    -#FOOTER_GAP                Amount of space between end of text and page #
    -#FOOTER_MARGIN             Amount of space between page # and bottom of page
    -#FROM                      Is there an addressor (for letters)? 1=yes
    +#FN_SPACE                  Post footnote space
    +#FN_WAS_DEFERED            Tells HEADER about a deferred footnote
    +#FOOTER_DIFF               In TRAPS, the difference between the
    +                           original #B_MARGIN and #VISUAL_B_MARGIN
    +#FOOTER_GAP                Amount of space between end of text and
    +                           page #
    +#FOOTER_MARGIN             Amount of space between page # and bottom
    +                           of page
    +#FOOTER_POS                Position of footer trap (required for
    +                           collecting footnotes inside a diversion)
    +#FOOTERS_ON                Are we using footers? (toggle)
    +#FOOTERS_WERE_ON           Were footers on? - used in FINIS and BLANKPAGE
    +                           (toggle)
    +#FOOTNOTE_COLOR            Colored footnotes? (toggle)
    +#FROM_DIVERT_FN            Signals to FOOTNOTE, when run from
    +                           within DIVERT_FN_LEFTOVER, to set #SPACE_REMAINING
    +                           to the total area allowable for running text
    +#FROM_FOOTER               In col to col footnote processing, tells
    +                           FOOTNOTE that FOOTNOTES was output from
    +                           FOOTER.
    +#FROM_HEADER               In col to col footnote processing, tells
    +                           FOOTNOTE that FOOTNOTES was output from
    +                           HEADER.
     #FULLSPACE_QUOTES          Should we fullspace quotes? (toggle)
    -#GREETING                  Is there a greeting (for letters)? 1=yes
    +#GET_DEPTH                 Signals to FOOTNOTE that it should
    +                           measure the depth of current footnotes
    +                           plus the most recently added one, except
    +                           where the footnote is to be deferred to
    +                           the next page or column
     #GUTTER                    Width of gutter between columns
    -#HDRFTR_CENTER_CAPS        Center part of header/footer in caps? (toggle; default=off)
    -#HDRFTR_HEIGHT             Cap height of $HDRFTR_RECTO/$HDRFTR_VERSO strings
    -#HDRFTR_LEFT_CAPS          Left part of header/footer in caps? (toggle; default=off)
    -#HDRFTR_RIGHT_CAPS         Right part of header/footer in caps? (toggle; default=on)
    -#HDRFTR_RULE_GAP           Space between header/footer and header/footer rule
    +#HDRFTR_CENTER_CAPS        CENTER part of header/footer in caps?
    +                           (toggle; default=off)
    +#HDRFTR_COLOR              Colored headers/footers? (toggle)
    +#HDRFTR_CTR_PAD_LEFT       Amount of hdrftr CENTER padding on the left
    +#HDRFTR_CTR_PAD_RIGHT      Amount of hdrftr CENTER padding on the right
    +#HDRFTR_CTR_PAD_TMP        Temp storage of left hdrftr CENTER padding
    +                           (for recto/verso switch)
    +#HDRFTR_HEIGHT             Cap height of $HDRFTR_RECTO/$HDRFTR_VERSO
    +                           strings
    +#HDRFTR_LEFT_CAPS          Left part of header/footer in caps?
    +                           (toggle; default=off)
    +#HDRFTR_RIGHT_CAPS         Right part of header/footer in caps?
    +                           (toggle; default=on)
    +#HDRFTR_RULE_COLOR         Colored header/footer rule? (toggle)
    +#HDRFTR_RULE_GAP           Space between header/footer and
    +                           header/footer rule
     #HDRFTR_RULE               Print head/footer rule? (toggle)
    -#HDRFTR_TMP_CAPS_SWITCH    Temporarily holds HDRFTR_LEFT_CAPS value if #SWITCH_HDRFTR=1
    +#HDRFTR_TMP_CAPS_SWITCH    Temporarily holds HDRFTR_LEFT_CAPS value if
    +                           #SWITCH_HDRFTR=1
     #HEAD                      1=main/section head 2=subhead
     #HEAD_CAPS                 Print section titles in caps? (toggle)
    +#HEAD_COLOR                Colored heads? (toggle)
     #HEADER_GAP                Distance from header to running text
     #HEADER_MARGIN             Distance from top of page to header
     #HEADERS_ON                Headers on? (toggle)
    -#HEADER_STATE              Saves header state in COLLATE for use in START after COLLATE
    +#HEADER_STATE              Saves header state in COLLATE for use in
    +                           START after COLLATE
    +#HEADERS_WERE_ON           Were headers on? - used in BLANKPAGE (toggle)
     #HEAD_NUM                  Head number
    -#HEAD_SPACE                2 line spaces before heads? (toggle; 1=yes, 0=no)
    -#HEAD_UNDERLINE            Underline section titles? (toggle)
    -#IGNORE                    Should we ignore this macro? Set to 1 in TYPEWRITE.
    +#HEAD_SPACE                2 line spaces before heads?
    +                           (toggle; 1=yes, 0=no)
    +#HORIZ_MARK                Horizontal 
    +#HOW_MANY                  Number of blank pages to output
    +#IGNORE                    Should we ignore this macro? Set to 1 in
    +                           TYPEWRITE.
    +#IN_BIB_LIST               Tells ITEM we're doing a bibliography in
    +                           list style
     #INDENT_FIRST_PARAS        Indent first paras? (toggle)
    -#INDENT_FIRSTS             Tells foonotes to leave INDENT_FIRST_PARAS alone if it's on for running text.
    +#INDENT_FIRSTS             Tells footnotes to leave INDENT_FIRST_PARAS
    +                           alone if it's on for running text.
     #ITALIC_MEANS_ITALIC       For TYPEWRITE.  1=yes; 0=no
    +#L_LENGTH_FOR_EPI          Stores line length at top of doc for use
    +                           with EPIGRAPH when columns are on
    +#L_MARGIN_DIFF             Difference between DOC_L_MARGIN and
    +                           L_MARGIN
     #LEFT_CAP_HEIGHT           Cap height of left string in headers/footers
    +#LEGAL_BASELINE            Calculates vert. position of next legal
    +                           baseline in SHIM
     #LETTER_STYLE              1=BUSINESS 2=PERSONAL
     #LINEBREAK                 Did we have a linebreak? (toggle)
    -#LINES_PER_PAGE            # of lines (at DOC_LEAD) that fit on page after #B_MARGIN is set
    -#L_LENGTH_FOR_EPI          Stores line length at top of doc for use with EPIGRAPH when columns are on
    -#L_MARGIN_DIFF             Difference between DOC_L_MARGIN and L_MARGIN
    +#LINEBREAK_COLOR           Colored linebreak? (toggle)
    +#LINENUMBERS               Holds various states of line-numbering when
    +                           line numbering is enabled
    +#LINES_PER_PAGE            # of lines (at DOC_LEAD) that fit on
    +                           page after #B_MARGIN is set
    +#LN                        Are line numbers on? (toggle)
    +#MISC_<n>            Used to print "next" misc lines in DO_COVER
    +#MISC_NUM                  Number of MISC lines
    +#MISCS                     =#MISC_NUM in DO_COVER
    +#MN_OVERFLOW_LEFT          If 1, left margin note text overflows
    +#MN_OVERFLOW_RIGHT         If 1, right margin note text overflows
     #n%_AT_PAGENUM_SET         Page # from n% when PAGENUMBER invoked
    -#NEXT_AUTHOR               Supplies correct digit to AUTHOR_<#> when printing authors in doc header
    +#NEEDS_SPACE               Instruct FOOTNOTE, when called by
    +                           PROCESS_FN_IN_DIVER, that if the footnote
    +                           had to be deferred, the VFP must be
    +                           raised by 1v (set in DIVER_FN_2_PRE)
    +#NEXT_AUTHOR               Supplies correct digit to AUTHOR_<#>
    +                           when printing authors in doc header
    +#NEXT_LN                   Next linenumber when \n(ln has to be stored
    +                           because linenumbering suspended
    +#NEXT_MISC                 Incrementing counter for misc lines in
    +                           DO_COVER
    +#NO_BACK_UP                Instructs FN_OVERFLOW_TRAP not to
    +                           subtract 1 line of footnote lead from
    +                           FN_OVERFLOW in a PREV_FN_DEFERRED
    +                           situation.
    +#NO_SPACE                  When para spacing is active, instructs
    +                           PP not to add space after a quote or blockquote.
     #NO_TRAP_RESET             Should we reset page traps? (toggle)
    -#NUM_AUTHORS               # of authors mod 2 to test if odd or even # of authors
    +#NUM_AUTHORS               # of authors mod 2 to test if odd or even
    +                           # of authors
    +#NUM_MISCS                 Number of args passed to MISC
     #NUMBER_HEAD               Are heads numbered? (toggle)
     #NUMBER_PH                 Are paraheads numbered? (toggle)
     #NUMBER_SH                 Are subheads numbered? (toggle)
     #NUM_COLS                  Number of columns per page
    +#NUM_FIELDS                Incrementing register used to match
    +                           #TOTAL_FIELDS
    +#OK_PROCESS_LEAD           Initial processing of TOC and endnote
    +                           leading is deferred until OK_PROCESS_LEAD=1
    +#ORIGINAL_B_MARGIN         The value for #B_MARGIN as set by the
    +                           macro B_MARGIN
    +#ORIGINAL_DOC_LEAD         The lead for PRINT_STYLE 1 as set in
    +                           PRINTSTYLE; required so that PRINT_STYLE 1
    +                           footnotes have an unadjusted lead of
    +                           12 points
    +#OVERFLOW                  Signals to FOOTNOTE that some of the
    +                           footnote text won't fit on the page
     #PAGE_NUM_ADJ              What to add to n% to get #PAGENUMBER
     #PAGENUMBER                The page number
     #PAGENUM_STYLE_SET         Did we set pagenumber style? (toggle)
    -#PAGE_NUM_H_POS            1=left 2=center 3=right; default=2
    -#PAGE_NUM_HYPHENS          Print hyphens surrounding page numbers? (toggle)
    -#PAGE_NUM_HYPHENS_SET      Did user set (or unset) hyphens around page numbers? (toggle)
    +#PAGE_NUM_H_POS            1=left 2=CENTER 3=right; default=2
    +#PAGE_NUM_COLOR            Colored pagenumbers? (toggle)
    +#PAGE_NUM_HYPHENS          Print hyphens surrounding page numbers?
    +                           (toggle)
    +#PAGE_NUM_HYPHENS_SET      Did user set (or unset) hyphens around page
    +                           numbers? (toggle)
     #PAGE_NUM_POS_SET          Did user set page number position? (toggle)
    -#PAGE_NUM_SET              Test if PAGE_1_NUM was used to set 1st page number
    +#PAGE_NUM_SET              Test if PAGE_1_NUM was used to set 1st page
    +                           number
     #PAGE_NUMS                 Print page numbers? (toggle)
     #PAGE_NUM_V_POS            1=top 2=bottom; default=2
     #PAGE_TOP                  \n(nl after HEADER completes itself
    +#PH_COLOR                  Colored paraheads? (toggle)
     #PH_NUM                    Parahead number
    -#PAGINATION_STATE          Saves pagination state in COLLATE for use in START after a COLLATE
    +#PAGE_POS                  Exact position on page during a diversion
    +                           (required for collecting footnotes inside
    +                           a diversion)
    +#PAGINATE_TOC              Is toc pagination on? (toggle)
    +#PAGINATE_WAS_ON           Keeps track of pagination state while
    +                           outputting blank pages
    +#PAGINATION_STATE          Saves pagination state in COLLATE for use in
    +                           START after a COLLATE
    +#PAGINATION_WAS_ON         Was pagination on? - used in FINIS (toggle)
     #PP                        0 at first para; auto-increments
     #PP_AT_PAGE_BREAK          # of last (incl. partial) para on page
     #PP_INDENT                 How much to indent paras
     #PP_SPACE                  Put space before paras? (toggle)
    -#PP_SPACE_SUSPEND          Suspend para spacing for blockquotes and epigraphs
    -#PP_STYLE_PREV             In footnotes, stores PP style in effect prior to invoking FOOTNOTE
    +#PP_SPACE_SUSPEND          Suspend para spacing for blockquotes and
    +                           epigraphs
    +#PP_STYLE_PREV             In footnotes, stores PP style in effect
    +                           prior to invoking FOOTNOTE
     #PP_STYLE                  Regular para=1; quote or epi para=2
    -#PRINT_PAGENUM_ON_PAGE_1   Should we print the page number on first page of doc when footers are on? (toggle)
    +#PRINT_PAGENUM_ON_PAGE_1   Should we print the page number on first
    +                           page of doc when footers are on? (toggle)
     #PRINT_STYLE               Typewrite=1, typeset=2
    -#PT_SIZE_IN_UNITS          Stored value of \n[.ps] from last time PT_SIZE was called
    +#PT_SIZE_IN_UNITS          Stored value of \n[.ps] from last time
    +                           PT_SIZE was called
    +#Q_AUTOLEAD                Register created by QUOTE_AUTOLEAD
     #Q_DEPTH                   Depth of quote
    -#Q_FITS                    Does this quote fit on one page/column? (toggle)
    +#Q_FITS                    Does this quote fit on one page/column?
    +                           (toggle)
    +#Q_LEAD                    Leading of quotes
    +#Q_LEAD_DIFF               Difference between leading of running text
    +                           and the leading used in quotes/blockquotes
    +#Q_LEAD_REAL               Leading of quotes and blockquotes saved at the
    +                           ends of their respective diversions
     #Q_L_LENGTH                Line length of quotes
     #Q_OFFSET                  Page offset for quotes
    -#Q_OFFSET_VALUE            Factor by which to multiply PP_INDENT to offset quotes
    -#Q_PP                      In PP, stores para # in QUOTE.  Removed in ENDQUOTE.
    +#Q_OFFSET_VALUE            Factor by which to multiply PP_INDENT to
    +                           offset quotes
    +#Q_PARTIAL_DEPTH           The amount of a quote/blockquote that fits at
    +                           the bottom of a page when a quote/blockquote
    +                           spans pages
    +#Q_PP                      In PP, stores para # in QUOTE.  Removed in
    +                           ENDQUOTE.
    +#Q_SPACE_ADJ               The flexible amount of whitespace to add before
    +                           and after a quote/blockquote
     #Q_TOP                     Vertical place on page that a quote starts
     #QUOTE                     1=PQUOTE, 2=BQUOTE
    -#RECTO_VERSO               Switch HEADER_LEFT and HEADER_RIGHT on alternate pages? (toggle); default=0
    -#REPEAT                    Number of times to repeat linebreak character
    +#QUOTE_COLOR               Color quotes (poetic)? (toggle)
    +#QUOTE_LN                  Linenumber quotes? (toggle)
    +#RECTO_VERSO               Switch HEADER_LEFT and HEADER_RIGHT on
    +                           alternate pages? (toggle); default=0
    +#REF_HYPHENATE             Hyphenate REFs? (toggle)
    +#REF_WARNING               Have we issued a ref warning? (toggle)
    +#REPEAT                    Number of times to repeat linebreak
    +                           character
    +#RESERVED_SPACE            Just enough room to put 1 more line of
    +                           footnotes on the page
     #RESET_EN_PP               Holds value of register #EN_PP_INDENT
    -#RESET_FN_NUMBER           Should fn# start at 1 on every page? (toggle)
    +#RESET_FN_COUNTERS         1 = "moved" footnote collected in a diversion
    +                           2 = "deferred" fn collected in a diversion
    +#RESET_FN_NUMBER           Should fn# start at 1 on every page?
    +                           (toggle)
     #RESET_L_LENGTH            Stores current line length when necessary
    -#RESET_PARA_SPACE          Holds current value of toggle register #PP_SPACE
    +#RESET_PARA_SPACE          Holds current value of toggle register
    +                           #PP_SPACE
     #RESET_PP_INDENT           Stores value of PP_INDENT when necessary
    -#RESET_QUOTE_SPACING       Stores value of toggle register #FULLSPACE_QUOTES (used in endnotes)
    -#RESTORE_DOC_LEAD          Holds value of current doc lead (used in endnotes)
    -#RESTORE_OFFSET            Page offset at moment footer trap is sprung; not currently used
    -#REVISION                  The revision number
    -#RIGHT_CAP_HEIGHT          Cap height of right string in headers/footers
    -#SH_LEAD_ADJUST            #DOC_LEAD/8 (TYPESET) or /2 (TYPEWRITE) (used for subhead spacing)
    +#RESET_QUOTE_SPACING       Stores value of toggle register
    +                           #FULLSPACE_QUOTES (used in endnotes)
    +#RESTORE_DOC_LEAD          Holds value of current doc lead (used in
    +                           endnotes)
    +#RESTORE_HY                Restore hyphenation after .][? (toggle)
    +#RESTORE_OFFSET            Page offset at moment footer trap is sprung;
    +                           not currently used
    +#RESTORE_TOC_PN_PADDING    Saves #TOC_PN_PADDING in TOC prior to
    +                           processing $FIRST_DOC_TITLE
    +#RIGHT_CAP_HEIGHT          Cap height of right string in
    +                           headers/footers
    +#RULED                     Tells FOOTNOTE if a rule (or space has been
    +                           put above the first footnote on the page
    +#RUNON_FN_IN_DIVER         If #LN=1, if we're in a (block)quote, instructs
    +                           FOOTNOTE to unformat diversion RUNON_FN_IN_DIVER
    +#RUNON_FOOTNOTES           If #LN=1, instructs FOOTNOTE to unformat
    +                           diversion RUNON_FOOTNOTES
    +#RUN_ON                    Are we using run-on footnotes? (toggle)
    +#SAVED_DIVER_FN_COUNT      In the case of a footnote inside a
    +                           diversion that should be treated as a
    +                           "normal" footnote, FOOTNOTE needs to
    +                           distinguish between a "normal" deferred
    +                           footnote (always the 1st footnote on the
    +                           page) and one that only looks as if
    +                           it should be deferred, when, in fact,
    +                           it's an overflow; this register lets
    +                           FOOTNOTE know whether the diversion
    +                           footnote is, in fact, the first on the
    +                           page.
    +#SAVED_FN_COUNT            #FN_COUNT+1 prior to +#FN_COUNT; used
    +                           in FOOTNOTES while gathering fns inside
    +                           diversions
    +#SAVED_FN_COUNT_FOR_COLS   #FN_COUNT_FOR_COLS+1 prior to
    +                           +#FN_COUNT_FOR_COLS; used in FOOTNOTES
    +                           while gathering fns inside diversions
    +#SAVED_FN_DEPTH_1          Footnote depth prior to adding footnote
    +                           diversion depth to FN_DEPTH; used when
    +                           footnote text will overflow
    +#SAVED_FN_DEPTH_2          Footnote depth after to adding footnote
    +                           diversion depth to FN_DEPTH; used when
    +                           footnote text will overflow
    +#SAVED_FOOTER_POS          Position of FOOTER in DO_QUOTE (hack)
    +#SAVED_LEAD                In FOOTER and DO_FOOTER, stores the
    +                           lead in effect prior to outputting
    +                           FOOTNOTES or performing either
    +                           PROCESS_FN_LEFTOVER or
    +                           PROCESS_FN_IN_DIVERSION; both the
    +                           diversion FOOTNOTES and the two macros
    +                           have, for PRINT_STYLE 2, an AUTOLEAD
    +                           call, which requires that an LS be
    +                           performed with the #SAVED_LEAD in
    +                           order to remove register #AUTO_LEAD or
    +                           #AUTO_LEAD_FACTOR.
    +#SEP_TYPE                  Set to 1 if LIST separator is ( or [ or {
    +#SH_LEAD_ADJUST            #DOC_LEAD/8 (TYPESET) or /2 (TYPEWRITE)
    +                           (used for subhead spacing)
     #SH_NUM                    Subhead number
    +#SHIM                      Amount of lead required to advance to
    +                           next legal baseline
    +#SILENT_BQUOTE_LN          "Silently" linenumber blockquotes? (toggle)
    +#SILENT_QUOTE_LN           "Silently" linenumber quotes? (toggle)
     #SINGLE_SPACE              Is TYPEWRITE in single space mode? (toggle)
    +#SKIP_FOOTER               If 1, instructs DO_FOOTER to do nothing
    +                           if B_MARGIN falls below FOOTER_MARGIN
     #SLANT_MEANS_SLANT         For TYPEWRITE.  1=yes; 0=no
    -#SLANT_WAS_ON              Keeps track of SLANT when it needs to go off for a while
    -#SPACE_REMAINING           Space remaining to footer trap; used to decide whether or not to defer a footnote
    +#SLANT_WAS_ON              Keeps track of SLANT when it needs to go off
    +                           for a while
    +#SPACE_REMAINING           Space remaining to footer trap; used to
    +                           decide whether or not to defer a footnote
    +#SR_ADJ_FACTOR             An adjustment factor that compensates
    +                           for the fact that #SPACE_REMAINING
    +                           sometimes reports a fractionally larger
    +                           space than is actually available for
    +                           footnote text.
     #START                     If 1, signals completion of START
    -#START_FOR_FOOTERS         Toggle set in START; signals to PRINT_HDRFTR that START has been invoked, allowing PRINT_HDRFTR to decide whether or not to print a footer on page 1
    +#START_FOR_FOOTERS         Toggle set in START; signals to
    +                           PRINT_HDRFTR that START has been invoked,
    +                           allowing PRINT_HDRFTR to decide whether or
    +                           not to print a footer on page 1
    +#START_FOR_MNinit          If 1, defer processing MN_INIT until #START
    +#STORED_PP_INDENT          Temporarily holds value of #PP_INDENT
     #SUITE                     Current page number (for letters)
     #SUP_PT_SIZE               Point size of superscript
    -#SWITCH_HDRFTR             Switch HDRFTR_LEFT and HDRFTR_RIGHT? (toggle)
    +#SUSPEND_PAGINATION        Suspend pagination prior to endnotes?
    +#SWITCH_HDRFTR             Switch HDRFTR_LEFT and HDRFTR_RIGHT?
    +                           (toggle)
    +#T_MARGIN_LEAD_ADJ         \n(.v-12000; ensures critically accurate
    +                           placement of first lines on pages when
    +                           doc processing is not being used and
    +                           a T_MARGIN has been set
     #TAB_OFFSET#               "#" at the end is from $CURRENT_TAB
    -#TO                        Is there an addressee date (for letters)? 1=yes
    +#TERMINATE                 Has TERMINATE been called? (toggle)
    +#TOC_AUTHORS               Whether to append author(s) to toc doc
    +                           title entries (toggle)
    +#TOC_ENTRY_PN              Current page number when a toc entry is
    +                           collected
    +#TOC_FIRST_PAGE            If 1, tells PRINT_PAGE_NUMBER that this
    +                           is the first page of the toc
    +#TOC_LEAD                  Leading of toc pages
    +#TOC_PN_PADDING            Max. # of placeholders for toc entries
    +                           page numbers
    +#TOC_PS                    Point size of toc pages
    +#TOC_RV_SWITCH             Switch L/R margins of toc pages
    +#TOC_HEAD_INDENT           Indent of toc head entries
    +#TOC_HEAD_SIZE_CHANGE      ps in/decrease of toc head entries****
    +#TOC_PH_INDENT             Indent of toc parahead entries
    +#TOC_PH_SIZE_CHANGE        ps in/decrease of toc parahead entries****
    +#TOC_SH_INDENT             Indent of toc subhead entries
    +#TOC_SH_SIZE_CHANGE        ps in/decrease of toc subhead entries****
    +#TOC_TITLE_INDENT          Indent of toc doc title entries
    +#TOC_TITLE_SIZE_CHANGE     ps in/decrease of toc doc title entries****
    +#TOTAL_FIELDS              Total number of letter header fields
     #UNDERLINE_ITALIC          For TYPEWRITE.  1=yes; 0=no
     #UNDERLINE_QUOTE           Underline pquotes? (toggle)
     #UNDERLINE_SLANT           For TYPEWRITE.  1=yes; 0=no
    -#UNDERLINE_WAS_ON          In HEADER to re-enable running text UNDERLINE (toggle)
    -#USERDEF_HDRFTR            User defined single string recto/verso header/footer? (toggle)
    -#USERDEF_HDRFTR_RECTO_QUAD 1=left, 2=center, 3=right
    -#USERDEF_HDRFTR_VERSO_QUAD 1=left, 2=center, 3=right
    -#USER_DEF_HEADER_CENTER    User defined center title? (1=yes); used in COPYSTYLE
    -#USER_DEF_HEADER_LEFT      User defined center title? (1=yes); used in COPYSTYLE
    -#USER_DEF_HEADER_RIGHT     User defined center title? (1=yes); used in COPYSTYLE
    -#VARIABLE_FOOTER_POS       Wandering trap position for processing footnotes and footers; pos depends on footnotes
    +#UNDERLINE_WAS_ON          In HEADER to re-enable running text
    +                           UNDERLINE (toggle)
    +#USERDEF_HDRFTR            User defined single string recto/verso
    +                           header/footer? (toggle)
    +#USERDEF_HDRFTR_RECTO_QUAD 1=left, 2=CENTER, 3=right
    +#USERDEF_HDRFTR_VERSO_QUAD 1=left, 2=CENTER, 3=right
    +#USER_DEF_HEADER_CENTER    User defined CENTER title? (1=yes);
    +                           used in COPYSTYLE
    +#USER_DEF_HEADER_LEFT      User defined CENTER title? (1=yes);
    +                           used in COPYSTYLE
    +#USER_DEF_HEADER_RIGHT     User defined CENTER title? (1=yes);
    +                           used in COPYSTYLE
    +#VARIABLE_FOOTER_POS       Wandering trap position for processing
    +                           footnotes and footers; pos depends on
    +                           footnotes
    +#VISUAL_B_MARGIN           Set in TRAPS, what \n(nl would report
    +                           on the last line of running text before
    +                           FOOTER is sprung.
    +#VFP_DIFF                  #FN_DEPTH minus #SAVED_FN_DEPTH; the
    +                           number of footnote lines that will fit
    +                           on the page when there will be over, and
    +                           therefore the amount by which to raise
    +                           the VFP for footnotes with overflow after
    +                           the 1st footnote.
    +y                          Vertical position stored with mk in hdrftrs.
      
     +++STRINGS+++
     
    -$ATTRIBUTE_STRING              "by" line in doc header
    -$AUTHOR_1...9                   Document author(s)
    -$AUTHOR_FAM                     Family to use for author in doc header
    -$AUTHOR_FT                      Font to use for author in doc header
    -$AUTHOR_SIZE_CHANGE             ps in/decrease of author in doc header*
    -$AUTHOR_PT_SIZE                 Absolute ps of authors
    -$BQUOTE_FAM                     Family to use for blockquotes
    -$BQUOTE_FT                      Font to use for blockquotes
    -$BQUOTE_QUAD                    Quad value for blockquotes
    -$BQUOTE_SIZE_CHANGE             ps in/decrease of blockquotes*
    -$CENTER_TITLE                   What to put in the middle of header title
    -$CHAPTER                        The chapter number
    -$CHAPTER_STRING                 What to print whenever the word "chapter" is required
    -$CHAPTER_TITLE                  Chapter title (if there is one)
    -$CHAPTER_TITLE_FAM              Family of chapter title
    -$CHAPTER_TITLE_FT               Font of chapter title
    -$CHAPTER_TITLE_SIZE_CHANGE      ps in/decrease of chapter title*
    -$CHAPTER_TITLE_PT_SIZE          Absolute ps of chapter title
    -$COPY_STYLE                     DRAFT or FINAL
    -$DOC_FAM                        Predominant font family used in the document
    -$DOC_QUAD                       Quad used for body text (justified or left) 
    -$DOC_TYPE                       Document type (default, chapter, named, letter)
    -$DOCTYPE_FAM                    Family to use for DOCTYPE string in doc header
    -$DOCTYPE_FT                     Font to use for DOCTYPE string in doc header
    -$DOCTYPE_SIZE_CHANGE            ps in/decrease of DOCTYPE string in doc header*
    -$DOCTYPE_PT_SIZE                Absolute ps of DOCTYPE
    -$DRAFT_STRING                   What to print whenever the word "draft" is required
    -$EN_FAMILY                      Family for endnotes
    -$EN_FT                          Font for endnotes
    -$EN_QUAD                        Quad for endnotes
    -$EN_STRING                      Endnotes page head
    -$EN_STRING_FAM                  Endnotes page head family
    -$EN_STRING_FT                   Endnotes page head font
    -$EN_STRING_QUAD                 Endnotes page head quad direction
    -$EN_STRING_SIZE_CHANGE          Endnotes page head size***
    -$EN_TITLE                       Endnote document identifier
    -$EN_TITLE_FAM                   Endnote document identifier family
    -$EN_TITLE_FT                    Endnote document identifier font
    -$EN_TITLE_QUAD                  Endnote document identifier quad direction
    -$EN_TITLE_SIZE_CHANGE           Endnote document identifier size***
    -$EN_NUMBER_FAM                  Endnote numbering family
    -$EN_NUMBER_FT                   Endnote numbering font
    -$EN_NUMBER_SIZE_CHANGE          Endnote numbering size***
    -$EPI_AUTOLEAD                   Autolead value (decimals ok) of epigraphs
    -$EPI_FAM                        Family to use in epigraphs
    -$EPI_FT                         Font to use in epigraphs
    -$EPI_QUAD                       Quad in block-style epigraphs (justified or left)
    -$EPI_SIZE_CHANGE                ps in/decrease of epigraphs*
    -$FINIS_STRING                   What to print when FINIS macro is invoked
    -$FN_FAM                         Family used in footnotes
    -$FN_FT                          Font used in footnotes
    -$FN_QUAD                        Quad used in footnotes
    -$FN_SIZE_CHANGE                 ps in/decrease of footnotes*
    -$HDRFTR_CENTER_FAM              Family of center part of headers
    -$HDRFTR_CENTER_FT               Font of center part of headers
    -$HDRFTR_CENTER_SIZE_CHANGE      ps in/decrease of center title in headers**
    -$HDRFTR_CENTER                  What to put in center part of headers; default doctype
    -$HDRFTR_FAM                     Family to use in headers
    -$HDRFTR_LEFT_FAM                Family of left part of headers
    -$HDRFTR_LEFT_FT                 Font of left part of headers
    -$HDRFTR_LEFT_SIZE_CHANGE        ps in/decrease of author in headers**
    -$HDRFTR_LEFT                    What to put in left part of headers; default author
    -$HDRFTR_RIGHT_FAM               Family of right part of headers
    -$HDRFTR_RIGHT_FT                Font of right part of headers
    -$HDRFTR_RIGHT_SIZE_CHANGE       ps in/decrease of right part of headers**
    -$HDRFTR_RIGHT                   What to put in right part of headers; default title
    -$HDRFTR_SIZE_CHANGE             ps in/decrease of headers*
    -$HDRFTR_TMP_SIZE_CHANGE_SWITCH  Temporarily holds HDRFTR_LEFT_SIZE_CHANGE if #SWITCH_HDRFTRS=1
    -$HDRFTR_TMP_SWITCH              Temporarily holds HDRFTR_LEFT if #SWITCH_HDRFTRS=1
    -$HEAD_FAM                       Family to use for section titles
    -$HEAD_FT                        Font to use for section titles
    -$HEAD_QUAD                      Quad valude of section titles
    -$HEAD_SIZE_CHANGE               ps in/decrease of section titles*
    -$LINEBREAK_CHAR                 Character that marks line breaks
    -$LINEBREAK_CHAR_V_ADJ           +|- amount by which to raise/lower linebreak character
    -PAGE#                           For use in hdrftr strings where page # is needed; \*[PAGE]
    -$PAGENUM_STYLE                  String passed to PAGENUM_STYLE
    -$PAGE_NUM_FAM                   Family of page numbers
    -$PAGE_NUM_FT                    Font of page numbers
    -$PAGE_NUM_SIZE_CHANGE           ps in/decrease of page numbers
    -$PAPER                          Paper size (LETTER, A4, LEGAL); default=LETTER
    -$PP_FT                          Font used in paragraphs
    -$QUOTE_FAM                      Family to use for pquotes
    -$QUOTE_FT                       Font to use for pquotes
    -$QUOTE_SIZE_CHANGE              ps in/decrease of pquotes*
    -$REVISION_STRING                What to print whenever the word "revision" is required
    -$SH_FAM                         Family to use in subheads
    -$SH_FT                          Font to use in subheads
    -$SH_SIZE_CHANGE                 ps in/decrease of subheads*
    -$SUBTITLE                       Document subtitle
    -$SUBTITLE_FAM                   Family to use for subtitle in doc header
    -$SUBTITLE_FT                    Font to use for subtitle in doc header
    -$SUBTITLE_SIZE_CHANGE           ps in/decrease of subtitle*
    -$SUBTITLE_PT_SIZE               Absolute ps of subtitle
    -$SUITE                          The #SUITE number register
    -$TITLE                          Document title
    -$TITLE_FAM                      Family to use for title in doc header
    -$TITLE_FT                       Font to use for title in doc header
    -$TITLE_PT_SIZE                  Absolute point size of title in docheader
    -$TITLE_SIZE_CHANGE              ps in/decrease of title in doc header*
    -$USERDEF_HDRFTR_RECTO           User defined header/footer recto string
    -$USERDEF_HDRFTR_VERSO           User defined header/footer verso string
    +$1ST_LETTER                      First letter of first arg to LIST
    +$ADJUST_BIB_LEAD                 2nd arg to BIBLIOGRAPHY_LEAD; if not blank
    +                                 adjust bib leading
    +$ATTRIBUTE_STRING               "by" line in doc header
    +$AUTHOR_1...9                    Document author(s)
    +$AUTHOR_FAM                      Family to use for author in doc header
    +$AUTHOR_FT                       Font to use for author in doc header
    +$AUTHOR_SIZE_CHANGE              ps in/decrease of author in doc header*
    +$AUTHOR_PT_SIZE                  Absolute ps of authors
    +$BIB_FAM                         Bibliography page family
    +$BIB_FT                          Bibliography page font
    +$BIB_LEAD                        Base leading for bibliographies
    +$BIB_LIST_SEPARATOR              Separator between enumerator and text
    +                                 when outputting bibliographies in LIST style
    +$BIB_LIST_PREFIX                 Prefix before enumerator when outputting
    +                                 bibliographies in LIST style
    +$BIB_PN_STYLE                    Format of bibliography page numbers
    +$BIB_SPACE                       Post entry space for bibliographies
    +$BIB_STRING                      Bibliography title string
    +$BIB_STRING_FAM                  Bib title family
    +$BIB_STRING_FT                   Bib title font
    +$BIB_STRING_QUAD                 Bib title quad
    +$BIB_STRING_SIZE_CHANGE          Bib title size (+ or -)
    +$BQ_LN_GUTTER                    Gutter between line numbers and bquotes in
    +                                 bquotes
    +$BQUOTE_COLOR                    Blockquote color
    +$BQUOTE_FAM                      Family to use for blockquotes
    +$BQUOTE_FT                       Font to use for blockquotes
    +$BQUOTE_QUAD                     Quad value for blockquotes
    +$BQUOTE_SIZE_CHANGE              ps in/decrease of blockquotes*
    +$CENTER_TITLE                    What to put in the middle of header
    +                                 title
    +$CHAPTER                         The chapter number
    +$CHAPTER_STRING                  What to print whenever the word
    +                                 "chapter" is required
    +$CHAPTER_TITLE                   Chapter title (if there is one)
    +$CHAPTER_TITLE_FAM               Family of chapter title
    +$CHAPTER_TITLE_FT                Font of chapter title
    +$CHAPTER_TITLE_SIZE_CHANGE       ps in/decrease of chapter title*
    +$CHAPTER_TITLE_PT_SIZE           Absolute ps of chapter title
    +$CHAPTER_TITLE_COLOR             Color of chapter title
    +$COPYRIGHT_FAM                   Copyright line family
    +$COPYRIGHT_FT                    Copyright line font
    +$COPYRIGHT_SIZE_CHANGE           Copyright line size*
    +$COPYRIGHT_COLOR                 Copyright line color
    +$COPYRIGHT_QUAD                  Copyright line quad direction
    +$COPY_STYLE                      DRAFT or FINAL
    +$COVER_FAM                       Overall cover family
    +$COVER_COLOR                     Overall cover color
    +$COVER_TITLE                     User-defined cover title string
    +$COVER_TITLE_FAM                 Cover title family
    +$COVER_TITLE_FT                  Cover title font
    +$COVER_TITLE_SIZE_CHANGE         Cover title size*
    +$COVER_TITLE_COLOR               Cover title color
    +$COVER_SUBTITLE_FAM              Cover subtitle family
    +$COVER_SUBTITLE_FT               Cover subtitle font
    +$COVER_SUBTITLE_SIZE_CHANGE      Cover subtitle size*
    +$COVER_SUBTITLE_COLOR            Cover subtitle color
    +$COVER_ATTRIBUTE_COLOR           Cover attribution string color
    +$COVER_AUTHOR_FAM                Cover author(s) family
    +$COVER_AUTHOR_FT                 Cover author(s) font
    +$COVER_AUTHOR_SIZE_CHANGE        Cover author(s) size*
    +$COVER_AUTHOR_COLOR              Cover author(s) color
    +$COVER_DOCTYPE_FAM               Cover doctype family
    +$COVER_DOCTYPE_FT                Cover doctype font
    +$COVER_DOCTYPE_SIZE_CHANGE       Cover doctype size*
    +$COVER_DOCTYPE_COLOR             Cover doctype color
    +$COVER_COPYRIGHT_FAM             Cover copyright family
    +$COVER_COPYRIGHT_FT              Cover copyright font
    +$COVER_COPYRIGHT_SIZE_CHANGE     Cover copyright size*
    +$COVER_COPYRIGHT_COLOR           Cover copyright color
    +$COVER_MISC_FAM                  Cover misc family
    +$COVER_MISC_FT                   Cover misc font
    +$COVER_MISC_SIZE_CHANGE          Cover misc size*
    +$COVER_MISC_COLOR                Cover misc color
    +$CURRENT_EV                      \n[.ev] at REF_BRACKETS_START
    +$DOC_COVER_FAM                   Overall doc cover family
    +$DOC_COVER_COLOR                 Overall doc cover color
    +$DOC_COVER_TITLE                 User-defined doc cover title string
    +$DOC_COVER_TITLE_FAM             Doc cover title family
    +$DOC_COVER_TITLE_FT              Doc cover title font
    +$DOC_COVER_TITLE_SIZE_CHANGE     Doc cover title size*
    +$DOC_COVER_TITLE_COLOR           Doc cover title color
    +$DOC_COVER_SUBTITLE_FAM          Doc cover subtitle family
    +$DOC_COVER_SUBTITLE_FT           Doc cover subtitle font
    +$DOC_COVER_SUBTITLE_SIZE_CHANGE  Doc cover subtitle size*
    +$DOC_COVER_SUBTITLE_COLOR        Doc cover subtitle color
    +$DOC_COVER_ATTRIBUTE_COLOR       Doc cover attribution string color
    +$DOC_COVER_AUTHOR_FAM            Doc cover author(s) family
    +$DOC_COVER_AUTHOR_FT             Doc cover author(s) font
    +$DOC_COVER_AUTHOR_SIZE_CHANGE    Doc cover author(s) size*
    +$DOC_COVER_AUTHOR_COLOR          Doc cover author(s) color
    +$DOC_COVER_DOCTYPE_FAM           Doc cover doctype family
    +$DOC_COVER_DOCTYPE_FT            Doc cover doctype font
    +$DOC_COVER_DOCTYPE_SIZE_CHANGE   Doc cover doctype size*
    +$DOC_COVER_DOCTYPE_COLOR         Doc cover doctype color
    +$DOC_COVER_COPYRIGHT_FAM         Doc cover copyright family
    +$DOC_COVER_COPYRIGHT_FT          Doc cover copyright font
    +$DOC_COVER_COPYRIGHT_SIZE_CHANGE Doc cover copyright size*
    +$DOC_COVER_COPYRIGHT_COLOR       Doc cover copyright color
    +$DOC_COVER_MISC_FAM              Doc cover misc family
    +$DOC_COVER_MISC_FT               Doc cover misc font
    +$DOC_COVER_MISC_SIZE_CHANGE      Doc cover misc size*
    +$DOC_COVER_MISC_COLOR            Doc cover misc color
    +$DOC_FAM                         Predominant font family used in the
    +                                 document
    +$DOC_QUAD                        Quad used for body text (justified or
    +                                 left) 
    +$DOC_TITLE                       Overall doc title that gets printed in
    +                                 headers/footers (mostly for use with
    +                                 collated docs where each doc is an
    +                                 article with a different title)
    +$DOC_TYPE                        Document type (default, chapter, named,
    +                                 letter)
    +$DOCHEADER_COLOR                 Color of docheader
    +$DOCHEADER_FAM                   Family used for all parts of the docheader
    +$DOCHEADER_LEAD_ADJ              +|- value applied to #DOC_LEAD to
    +                                 in/decrease leading of doc header
    +$DOCTYPE_FAM                     Family to use for DOCTYPE string in
    +                                 doc header
    +$DOCTYPE_FT                      Font to use for DOCTYPE string in
    +                                 doc header
    +$DOCTYPE_SIZE_CHANGE             ps in/decrease of DOCTYPE string in
    +                                 doc header*
    +$DOCTYPE_PT_SIZE                 Absolute ps of DOCTYPE
    +$DRAFT                           The draft number (string valued)
    +$DRAFT_STRING                    What to print whenever the word "draft"
    +                                 is required
    +EN_MARK                          Inline, gets #EN_MARK (\(ln)
    +$EN_CLOSE_BRACKET                Close bracket for line-number enumerated
    +                                 endnotes
    +$EN_FAMILY                       Family for endnotes
    +$EN_FT                           Font for endnotes
    +$EN_LINENUMBER                   String to print for line-number enumerators
    +                                 in line-numbered endnotes
    +$EN_LN_FAM                       Family for line-numbers in line-number
    +                                 identified endnotes
    +$EN_LN_FT                        Font for line-numbers in line-number
    +                                 identified endnotes
    +$EN_LN_GAP                       Gap to leave in initial endnote lines
    +                                 between line-number identifies and text
    +$EN_OPEN_BRACKET                 Open bracket for line-number enumerated
    +                                 endnotes
    +$EN_LN_SIZE_CHANGE               Size change (+ or -) for line-numbers in
    +                                 line-number identified endnotes
    +$EN_PN_STYLE                     Pagenumbering style for endnotes pages
    +$EN_QUAD                         Quad for endnotes
    +$EN_STRING                       Endnotes page head
    +$EN_STRING_FAM                   Endnotes page head family
    +$EN_STRING_FT                    Endnotes page head font
    +$EN_STRING_QUAD                  Endnotes page head quad direction
    +$EN_STRING_SIZE_CHANGE           Endnotes page head size***
    +$EN_TITLE                        Endnote document identifier
    +$EN_TITLE_FAM                    Endnote document identifier family
    +$EN_TITLE_FT                     Endnote document identifier font
    +$EN_TITLE_QUAD                   Endnote document identifier quad
    +                                 direction
    +$EN_TITLE_SIZE_CHANGE            Endnote document identifier size***
    +$EN_NUMBER_FAM                   Endnote numbering family
    +$EN_NUMBER_FT                    Endnote numbering font
    +$EN_NUMBER_SIZE_CHANGE           Endnote numbering size***
    +$EPI_AUTOLEAD                    Autolead value (decimals ok) of
    +                                 epigraphs
    +$EPI_COLOR                       Color of epigraphs
    +$EPI_FAM                         Family to use in epigraphs
    +$EPI_FT                          Font to use in epigraphs
    +$EPI_QUAD                        Quad in block-style epigraphs
    +                                 (justified or left)
    +$EPI_SIZE_CHANGE                 ps in/decrease of epigraphs*
    +$EVAL_BIB_SPACE                  Temporary string to find out if the
    +                                 arg to BIBLIOGRAPHY_SPACING ended in "v"
    +$FINIS_COLOR                     Color of FINIS string
    +$FINIS_STRING                    What to print when FINIS macro is
    +                                 invoked
    +$FIRST_DOC_TITLE                 1st doc's title captured in COLLATE
    +FN_MARK                          Inline, gets #FN_MARK (\n(ln)
    +$FN_CLOSE_BRACKET                Close bracket for line-number identified
    +                                 footnotes
    +$FN_FAM                          Family used in footnotes
    +$FN_FT                           Font used in footnotes
    +$FN_LINENUMBER                   String to print before footnotes when
    +                                 line-numbering enabled for footnotes
    +$FN_LN_SEP                       Separator after line-number identified
    +                                 footnotes
    +$FN_OPEN_BRACKET                 Open bracket for line-number identified
    +                                 footnotes
    +$FN_QUAD                         Quad used in footnotes
    +$FN_SIZE_CHANGE                  ps in/decrease of footnotes*
    +$FOOTNOTE_COLOR                  Footnote color
    +$HDRFTR_CENTER                   What to put in CENTER part of headers;
    +                                 default doctype
    +$HDRFTR_CENTER_FAM               Family of CENTER part of headers
    +$HDRFTR_CENTER_FT                Font of centre part of headers
    +$HDRFTR_CENTER_NEW               HDRFTR_CENTER after the start of TOC;
    +                                 defined in HDRFTR_CENTER if
    +                                 HDRFTR_CENTER is called as
    +                                 FOOTER_CENTER
    +$HDRFTR_CENTER_OLD               HDRFTR_CENTER just prior to start of
    +                                 TOC; defined in HDRFTR_CENTER if
    +                                 HDRFTR_CENTER is called as
    +                                 FOOTER_CENTER
    +$HDRFTR_CENTER_SIZE_CHANGE       ps in/decrease of centre title in
    +                                 headers**
    +$HDRFTR_COLOR                    Color of headers/footers
    +$HDRFTR_FAM                      Family to use in headers
    +$HDRFTR_LEFT_FAM                 Family of left part of headers
    +$HDRFTR_LEFT_FT                  Font of left part of headers
    +$HDRFTR_LEFT_SIZE_CHANGE         ps in/decrease of author in headers**
    +$HDRFTR_LEFT                     What to put in left part of headers;
    +                                 default author
    +$HDRFTR_RIGHT_FAM                Family of right part of headers
    +$HDRFTR_RIGHT_FT                 Font of right part of headers
    +$HDRFTR_RIGHT_SIZE_CHANGE        ps in/decrease of right part of
    +                                 headers**
    +$HDRFTR_RIGHT                    What to put in right part of headers;
    +                                 default title
    +$HDRFTR_SIZE_CHANGE              ps in/decrease of headers*
    +$HDRFTR_TMP_SIZE_CHANGE_SWITCH   Temporarily holds
    +                                 HDRFTR_LEFT_SIZE_CHANGE if
    +                                 #SWITCH_HDRFTRS=1
    +$HDRFTR_TMP_SWITCH               Temporarily holds HDRFTR_LEFT if
    +                                 #SWITCH_HDRFTRS=1
    +$HEAD_COLOR                      Head color
    +$HEAD_FAM                        Family to use for section titles
    +$HEAD_FT                         Font to use for section titles
    +$HEAD_QUAD                       Quad value of section titles
    +$HEAD_SIZE_CHANGE                ps in/decrease of section titles*
    +$LINEBREAK_CHAR                  Character that marks line breaks
    +$LINEBREAK_CHAR_V_ADJ            +|- amount by which to raise/lower
    +                                 linebreak character
    +$LAST_CHAR                       Temporary string used to discover whether
    +                                 user has remembered to put a digit after
    +                                 ROMAN or roman in arg to LIST
    +$LINEBREAK_COLOR                 Linebreak color
    +$LIST_ARG_1                      The first arg to LIST (minus digits if
    +                                 ROMAN or roman
    +$LN_GUTTER                       Gutter to leave between line numbers
    +                                 and text
    +$LN_INC                          2nd arg to NUMBER_LINES as a string
    +$LN_NUM                          1st arg to NUMBER_LINES as a string
    +$MISC_COLOR                      Misc line color
    +$MISC_QUAD                       Misc line quad
    +PAGE#                            For use in hdrftr strings where page #
    +                                 is needed; \*[PAGE]
    +$PAGENUM_COLOR                   Page number color
    +$PAGENUM_STYLE                   String passed to PAGENUM_STYLE
    +$PAGE_NUM_FAM                    Family of page numbers
    +$PAGE_NUM_FT                     Font of page numbers
    +$PAGE_NUM_SIZE_CHANGE            ps in/decrease of page numbers
    +$PAPER                           Paper size (LETTER, A4, LEGAL);
    +                                 default=LETTER
    +$PH_COLOR                        Parahead color
    +$PP_FT                           Font used in paragraphs
    +$ROMAN_WIDTH                     The digit(s) appended to ROMAN or
    +                                 roman LIST args
    +$Q_LN_GUTTER                     Gutter between linenumbers and quotes
    +                                 in quotes
    +$QUOTE_COLOR                     Quote (poetic) color
    +$QUOTE_FAM                       Family to use for pquotes
    +$QUOTE_FT                        Font to use for pquotes
    +$QUOTE_SIZE_CHANGE               ps in/decrease of pquotes*
    +$REF_BIB_INDENT                  2nd line indent value for references in
    +                                 bibliographies
    +$REF_EN_INDENT                   2nd line indent value for references in
    +                                 endnotes
    +$REF_FN_INDENT                   2nd line indent value for references in
    +                                 footnotes
    +$RESTORE_SS_VAR                  Saves \*[$SS_VAR] for use with ref*build
    +#REVISION                        The revision number (string valued)
    +$REVISION_STRING                 What to print whenever the word
    +                                 "revision" is required
    +$SH_FAM                          Family to use in subheads
    +$SH_FT                           Font to use in subheads
    +$SH_SIZE_CHANGE                  ps in/decrease of subheads*
    +$SH_COLOR                        Subhead color
    +$SUBTITLE                        Document subtitle
    +$SUBTITLE_FAM                    Family to use for subtitle in doc
    +                                 header
    +$SUBTITLE_FT                     Font to use for subtitle in doc header
    +$SUBTITLE_SIZE_CHANGE            ps in/decrease of subtitle*
    +$SUBTITLE_PT_SIZE                Absolute ps of subtitle
    +$SUITE                           The #SUITE number register
    +$TITLE                           Document title
    +$TITLE_FAM                       Family to use for title in doc header
    +$TITLE_FT                        Font to use for title in doc header
    +$TITLE_PT_SIZE                   Absolute point size of title in docheader
    +$TITLE_SIZE_CHANGE               ps in/decrease of title in doc header*
    +$TOC_AUTHORS                     What to print after toc doc title entry
    +                                 if #TOC_AUTHORS=1
    +$TOC_FAM                         Family to use on toc pages
    +$TOC_HEAD_FAM                    Family of toc head entries
    +$TOC_HEAD_FT                     Font of toc head entries
    +$TOC_HEAD_ITEM                   A head as collected for TOC_ENTRIES
    +$TOC_HEADER_FAM                  Family to use for "Contents"
    +$TOC_HEADER_FT                   Font to use for "Contents"
    +$TOC_HEADER_QUAD                 Quad direction of "Contents"
    +$TOC_HEADER_SIZE                 ps in/decrease of "Contents"****
    +$TOC_HEADER_STRING               Header string of first toc page
    +$TOC_PN                          Sets up toc leaders + entry pn
    +                                 (typeset)
    +$TOC_PN_FAM                      Family for toc entries page numbers
    +$TOC_PN_FT                       Font for toc entries page numbers
    +$TOC_PN_SIZE_CHANGE              ps in/decrease of toc entries page
    +                                 numbers
    +$TOC_PN_STYLE                    Page-numbering style of toc pages
    +$TOC_PN_TYPEWRITE                Sets up toc leaders + entry pn
    +                                 (typewrite)
    +$TOC_PH_FAM                      Family of toc parahead entries
    +$TOC_PH_FT                       Font of toc parahead entries
    +$TOC_PARAHEAD_ITEM               A parahead collected for TOC_ENTRIES
    +$TOC_SH_FAM                      Family of toc subhead entries
    +$TOC_SH_FT                       Font of toc subhead entries
    +$TOC_SH_ITEM                     A subhead collected for TOC_ENTRIES
    +$TOC_TITLE_FAM                   Family of toc doc title entries
    +$TOC_TITLE_FT                    Font of toc doc title entries
    +$USER_SET_TITLE_ITEM             User defined toc doc title entry as
    +                                 set by TOC_TITLE_ENTRY
    +$UR_PAGINATION_STYLE             Pagination style prior to endnotes
    +$USERDEF_HDRFTR_RECTO            User defined header/footer recto string
    +$USERDEF_HDRFTR_VERSO            User defined header/footer verso string
     
    -  *relative to #DOC_PT_SIZE
    - **relative to overall ps of headers as set by HEADER_SIZE
    -***relative to overall ps of endnotes
    +   *relative to #DOC_PT_SIZE
    +  **relative to overall ps of headers as set by HEADER_SIZE
    + ***relative to overall ps of endnotes
    +****relative to overall ps of toc pages
     
     +++PREPROCESSOR KEYWORDS+++
     
    @@ -948,6 +1935,19 @@ cend
     
     +++ALIASES+++
     
    +Please note:
    +
    +Prior to version 1.1.9, all macros that included the word COLOR had
    +aliases that used COLOUR instead.  This convenience has now been
    +removed, in an effort to reduce the size of the om.tmac file.
    +
    +Furthermore, if you want the convenience, you'll have to edit the
    +om.tmac file.  Simply aliasing, say, HEAD_COLOR as HEAD_COLOUR will
    +not work, owing to significant changes in the handling of
    +docelement control macros that end in _COLOR.
    +
    ++++The following are for convenience, and header/footer management+++
    +
     BREAK_BLOCKQUOTE      BREAK_QUOTE
     BREAK_CITATION        BREAK_QUOTE
     BREAK_CITE            BREAK_QUOTE
    @@ -956,7 +1956,7 @@ CITE                  BLOCKQUOTE
     COL_BREAK             COL_NEXT
     DOC_FAM               DOC_FAMILY
     DOC_LLENGTH           DOC_LINE_LENGTH
    -DOC_L_LENGTT          DOC_LINE_LENGTH
    +DOC_L_LENGTH          DOC_LINE_LENGTH
     DOC_L_MARGIN          DOC_LEFT_MARGIN
     DOC_LMARGIN           DOC_LEFT_MARGIN
     DOC_LS                DOC_LEAD
    @@ -964,84 +1964,31 @@ DOC_PS                DOC_PT_SIZE
     DOC_R_MARGIN          DOC_RIGHT_MARGIN
     DOC_RMARGIN           DOC_RIGHT_MARGIN
     FOOTER_CENTER_CAPS    HDRFTR_CENTER_CAPS
    -FOOTER_CENTER_FAM     HDRFTR_CENTER_FAMILY
    -FOOTER_CENTER_FAMILY  HDRFTR_CENTER_FAMILY
    -FOOTER_CENTER_FONT    HDRFTR_CENTER_FONT
    -FOOTER_CENTER_FT      HDRFTR_CENTER_FONT
     FOOTER_CENTER         HDRFTR_CENTER
    -FOOTER_CENTER_PS      HDRFTR_CENTER_SIZE
    -FOOTER_CENTER_SIZE    HDRFTR_CENTER_SIZE
     FOOTER_CENTRE_CAPS    HDRFTR_CENTER_CAPS
    -FOOTER_CENTRE_FAM     HDRFTR_CENTER_FAMILY
    -FOOTER_CENTRE_FAMILY  HDRFTR_CENTER_FAMILY
    -FOOTER_CENTRE_FT      HDRFTR_CENTER_FONT
     FOOTER_CENTRE         HDRFTR_CENTER
    -FOOTER_CENTRE_PS      HDRFTR_CENTER_SIZE
    -FOOTER_CENTRE_SIZE    HDRFTR_CENTER_SIZE
    -FOOTER_FAM            HDRFTR_FAMILY
    -FOOTER_FAMILY         HDRFTR_FAMILY
     FOOTER_LEFT_CAPS      HDRFTR_LEFT_CAPS
    -FOOTER_LEFT_FAM       HDRFTR_LEFT_FAMILY
    -FOOTER_LEFT_FAMILY    HDRFTR_LEFT_FAMILY
    -FOOTER_LEFT_FONT      HDRFTR_LEFT_FONT
    -FOOTER_LEFT_FT        HDRFTR_LEFT_FONT
     FOOTER_LEFT           HDRFTR_LEFT
    -FOOTER_LEFT_PS        HDRFTR_LEFT_SIZE
    -FOOTER_LEFT_SIZE      HDRFTR_LEFT_SIZE
     FOOTER_PLAIN          HDRFTR_PLAIN
     FOOTER_RECTO          HDRFTR_RECTO
     FOOTER_RIGHT_CAPS     HDRFTR_RIGHT_CAPS
    -FOOTER_RIGHT_FAM      HDRFTR_RIGHT_FAMILY
    -FOOTER_RIGHT_FAMILY   HDRFTR_RIGHT_FAMILY
    -FOOTER_RIGHT_FONT     HDRFTR_RIGHT_FONT
    -FOOTER_RIGHT_FT       HDRFTR_RIGHT_FONT
     FOOTER_RIGHT          HDRFTR_RIGHT
    -FOOTER_RIGHT_PS       HDRFTR_RIGHT_SIZE
    -FOOTER_RIGHT_SIZE     HDRFTR_RIGHT_SIZE
     FOOTER_RULE_GAP       HDRFTR_RULE_GAP
     FOOTER_RULE           HDRFTR_RULE
    -FOOTER_SIZE           HDRFTR_SIZE
     FOOTER_VERSO          HDRFTR_VERSO
     HDRFTR_RULE_INTERNAL  HDRFTR_RULE
     HEADER_CENTER_CAPS    HDRFTR_CENTER_CAPS
    -HEADER_CENTER_FAM     HDRFTR_CENTER_FAMILY
    -HEADER_CENTER_FAMILY  HDRFTR_CENTER_FAMILY
    -HEADER_CENTER_FONT    HDRFTR_CENTER_FONT
    -HEADER_CENTER_FT      HDRFTR_CENTER_FONT
     HEADER_CENTER         HDRFTR_CENTER
    -HEADER_CENTER_PS      HDRFTR_CENTER_SIZE
    -HEADER_CENTER_SIZE    HDRFTR_CENTER_SIZE
     HEADER_CENTRE_CAPS    HDRFTR_CENTER_CAPS
    -HEADER_CENTRE_FAM     HDRFTR_CENTER_FAMILY
    -HEADER_CENTRE_FAMILY  HDRFTR_CENTER_FAMILY
    -HEADER_CENTRE_FONT    HDRFTR_CENTER_FONT
    -HEADER_CENTRE_FT      HDRFTR_CENTER_FONT
     HEADER_CENTRE         HDRFTR_CENTER
    -HEADER_CENTRE_PS      HDRFTR_CENTER_SIZE
    -HEADER_CENTRE_SIZE    HDRFTR_CENTER_SIZE
    -HEADER_FAM            HDRFTR_FAMILY
    -HEADER_FAMILY         HDRFTR_FAMILY
     HEADER_LEFT_CAPS      HDRFTR_LEFT_CAPS
    -HEADER_LEFT_FAM       HDRFTR_LEFT_FAMILY
    -HEADER_LEFT_FAMILY    HDRFTR_LEFT_FAMILY
    -HEADER_LEFT_FONT      HDRFTR_LEFT_FONT
    -HEADER_LEFT_FT        HDRFTR_LEFT_FONT
     HEADER_LEFT           HDRFTR_LEFT
    -HEADER_LEFT_PS        HDRFTR_LEFT_SIZE
    -HEADER_LEFT_SIZE      HDRFTR_LEFT_SIZE
     HEADER_PLAIN          HDRFTR_PLAIN
     HEADER_RECTO          HDRFTR_RECTO
     HEADER_RIGHT_CAPS     HDRFTR_RIGHT_CAPS
    -HEADER_RIGHT_FAM      HDRFTR_RIGHT_FAMILY
    -HEADER_RIGHT_FAMILY   HDRFTR_RIGHT_FAMILY
    -HEADER_RIGHT_FONT     HDRFTR_RIGHT_FONT
    -HEADER_RIGHT_FT       HDRFTR_RIGHT_FONT
     HEADER_RIGHT          HDRFTR_RIGHT
    -HEADER_RIGHT_PS       HDRFTR_RIGHT_SIZE
    -HEADER_RIGHT_SIZE     HDRFTR_RIGHT_SIZE
     HEADER_RULE_GAP       HDRFTR_RULE_GAP
     HEADER_RULE           HDRFTR_RULE
    -HEADER_SIZE           HDRFTR_SIZE
     HEADER_VERSO          HDRFTR_VERSO
     PAGENUM               PAGENUMBER
     PAGINATION            PAGINATE
    @@ -1049,6 +1996,200 @@ PP_FT                 PP_FONT
     PRINT_FOOTNOTE_RULE   FOOTNOTE_RULE
     SWITCH_FOOTERS        SWITCH_HDRFTR
     SWITCH_HEADERS        SWITCH_HDRFTR
    +TOC_LS                TOC_LEAD
    +TOC_PS                TOC_PT_SIZE
    +
    ++++The following are used for docelement type-style control+++
    +
    +AUTHOR_FAMILY                 _FAMILY
    +AUTHOR_FONT                   _FONT
    +AUTHOR_SIZE                   _SIZE
    +BIBLIOGRAPHY_FAMILY           _FAMILY
    +BIBLIOGRAPHY_FONT             _FONT
    +BIBLIOGRAPHY_FOOTER_CENTER    BIBLIOGRAPHY_HDRFTR_CENTER
    +BIBLIOGRAPHY_FOOTER_CENTRE    BIBLIOGRAPHY_HDRFTR_CENTRE
    +BIBLIOGRAPHY_HEADER_CENTER    BIBLIOGRAPHY_HDRFTR_CENTER
    +BIBLIOGRAPHY_HEADER_CENTRE    BIBLIOGRAPHY_HDRFTR_CENTRE
    +BIBLIOGRAPHY_QUAD             _QUAD
    +BIBLIOGRAPHY_STRING_FAMILY    _FAMILY
    +BIBLIOGRAPHY_STRING_FONT      _FONT
    +BIBLIOGRAPHY_STRING_QUAD      _QUAD
    +BIBLIOGRAPHY_STRING_SIZE      _SIZE
    +BLOCKQUOTE_AUTOLEAD           Q_AUTOLEAD
    +BLOCKQUOTE_AUTOLEAD           QUOTE_AUTOLEAD
    +BLOCKQUOTE_COLOR              _COLOR
    +BLOCKQUOTE_FAMILY             _FAMILY
    +BLOCKQUOTE_FONT               _FONT
    +BLOCKQUOTE_QUAD               _QUAD
    +BLOCKQUOTE_SIZE               _SIZE
    +CHAPTER_TITLE_COLOR           _COLOR
    +CHAPTER_TITLE_FAMILY          _FAMILY
    +CHAPTER_TITLE_FONT            _FONT
    +CHAPTER_TITLE_SIZE            _SIZE
    +COVER_ATTRIBUTE_COLOR         _COLOR
    +COVER_AUTHOR_COLOR            _COLOR
    +COVER_AUTHOR_FAMILY           _FAMILY
    +COVER_AUTHOR_FONT             _FONT
    +COVER_AUTHOR_SIZE             _SIZE
    +COVER_COLOR                   _COLOR
    +COVER_COPYRIGHT_COLOR         _COLOR
    +COVER_COPYRIGHT_FAMILY        _FAMILY
    +COVER_COPYRIGHT_FONT          _FONT
    +COVER_COPYRIGHT_QUAD          _QUAD
    +COVER_COPYRIGHT_SIZE          _SIZE
    +COVER_DOCTYPE_COLOR           _COLOR
    +COVER_DOCTYPE_FAMILY          _FAMILY
    +COVER_DOCTYPE_FONT            _FONT
    +COVER_DOCTYPE_SIZE            _SIZE
    +COVER_FAMILY                  _FAMILY
    +COVER_MISC_COLOR              _COLOR
    +COVER_MISC_QUAD               _QUAD
    +COVER_SUBTITLE_COLOR          _COLOR
    +COVER_SUBTITLE_FAMILY         _FAMILY
    +COVER_SUBTITLE_FONT           _FONT
    +COVER_SUBTITLE_SIZE           _SIZE
    +COVER_TITLE_COLOR             _COLOR
    +COVER_TITLE_FAMILY            _FAMILY
    +COVER_TITLE_FONT              _FONT
    +COVER_TITLE_SIZE              _SIZE
    +DOC_COVER_ATTRIBUTE_COLOR     _COLOR
    +DOC_COVER_AUTHOR_COLOR        _COLOR
    +DOC_COVER_AUTHOR_FAMILY       _FAMILY
    +DOC_COVER_AUTHOR_FONT         _FONT
    +DOC_COVER_AUTHOR_SIZE         _SIZE
    +DOC_COVER_COLOR               _COLOR
    +DOC_COVER_COPYRIGHT_COLOR     _COLOR
    +DOC_COVER_COPYRIGHT_FAMILY    _FAMILY
    +DOC_COVER_COPYRIGHT_FONT      _FONT
    +DOC_COVER_COPYRIGHT_QUAD      _QUAD
    +DOC_COVER_COPYRIGHT_SIZE      _SIZE
    +DOC_COVER_DOCTYPE_COLOR       _COLOR
    +DOC_COVER_DOCTYPE_FAMILY      _FAMILY
    +DOC_COVER_DOCTYPE_FONT        _FONT
    +DOC_COVER_DOCTYPE_SIZE        _SIZE
    +DOC_COVER_FAMILY              _FAMILY
    +DOC_COVER_MISC_COLOR          _COLOR
    +DOC_COVER_MISC_QUAD           _QUAD
    +DOC_COVER_SUBTITLE_COLOR      _COLOR
    +DOC_COVER_SUBTITLE_FAMILY     _FAMILY
    +DOC_COVER_SUBTITLE_FONT       _FONT
    +DOC_COVER_SUBTITLE_SIZE       _SIZE
    +DOC_COVER_TITLE_COLOR         _COLOR
    +DOC_COVER_TITLE_FAMILY        _FAMILY
    +DOC_COVER_TITLE_FONT          _FONT
    +DOC_COVER_TITLE_SIZE          _SIZE
    +DOCHEADER_COLOR               _COLOR
    +DOCHEADER_FAMILY              _FAMILY
    +DOC_QUAD                      _QUAD
    +DOCTYPE_FAMILY                _FAMILY
    +DOCTYPE_FONT                  _FONT
    +DOCTYPE_SIZE                  _SIZE
    +ENDNOTE_BLOCKQUOTE_AUTOLEAD   Q_AUTOLEAD
    +ENDNOTE_BLOCKQUOTE_AUTOLEAD   QUOTE_AUTOLEAD
    +ENDNOTE_FAMILY                _FAMILY
    +ENDNOTE_FONT                  _FONT
    +ENDNOTE_LINENUMBER_FAMILY     _FAMILY
    +ENDNOTE_LINENUMBER_FONT       _FONT
    +ENDNOTE_LINENUMBER_SIZE       _SIZE
    +ENDNOTE_NUMBER_FAMILY         _FAMILY
    +ENDNOTE_NUMBER_FONT           _FONT
    +ENDNOTE_NUMBER_SIZE           _SIZE
    +ENDNOTE_QUAD                  _QUAD
    +ENDNOTE_QUOTE_AUTLOEAD        Q_AUTOLEAD
    +ENDNOTE_QUOTE_AUTOLEAD        QUOTE_AUTOLEAD
    +ENDNOTE_STRING_FAMILY         _FAMILY
    +ENDNOTE_STRING_FONT           _FONT
    +ENDNOTE_STRING_QUAD           _QUAD
    +ENDNOTE_STRING_SIZE           _SIZE
    +ENDNOTE_TITLE_FAMILY          _FAMILY
    +ENDNOTE_TITLE_FONT            _FONT
    +ENDNOTE_TITLE_QUAD            _QUAD
    +ENDNOTE_TITLE_SIZE            _SIZE
    +EPIGRAPH_COLOR                _COLOR
    +EPIGRAPH_FAMILY               _FAMILY
    +EPIGRAPH_FONT                 _FONT
    +EPIGRAPH_QUAD                 _QUAD
    +EPIGRAPH_SIZE                 _SIZE
    +FINIS_COLOR                   _COLOR
    +FOOTNOTE_COLOR                _COLOR
    +FOOTNOTE_FAMILY               _FAMILY
    +FOOTNOTE_FONT                 _FONT
    +FOOTNOTE_QUAD                 _QUAD
    +FOOTNOTE_SIZE                 _SIZE
    +HDRFTR_CENTER_FAMILY          _FAMILY
    +HDRFTR_CENTER_FONT            _FONT
    +HDRFTR_CENTER_SIZE            _SIZE
    +HDRFTR_COLOR                  _COLOR
    +HDRFTR_FAMILY                 _FAMILY
    +HDRFTR_LEFT_FAMILY            _FAMILY
    +HDRFTR_LEFT_FONT              _FONT
    +HDRFTR_LEFT_SIZE              _SIZE
    +HDRFTR_RIGHT_FAMILY           _FAMILY
    +HDRFTR_RIGHT_FONT             _FONT
    +HDRFTR_RIGHT_SIZE             _SIZE
    +HDRFTR_RULE_COLOR             _COLOR
    +HDRFTR_SIZE                   _SIZE
    +HEAD_COLOR                    _COLOR
    +HEAD_FAMILY                   _FAMILY
    +HEAD_FONT                     _FONT
    +HEAD_QUAD                     _QUAD
    +HEAD_SIZE                     _SIZE
    +LINEBREAK_COLOR               _COLOR
    +MISC_COLOR                    _COLOR
    +MISC_QUAD                     _QUAD
    +PAGENUM_COLOR                 _COLOR
    +PAGENUM_FAMILY                _FAMILY
    +PAGENUM_FONT                  _FONT
    +PARAHEAD_COLOR                _COLOR
    +PARAHEAD_FAMILY               _FAMILY
    +PARAHEAD_FONT                 _FONT
    +PARAHEAD_SIZE                 _SIZE
    +QUOTE_COLOR                   _COLOR
    +QUOTE_FAMILY                  _FAMILY
    +QUOTE_FONT                    _FONT
    +QUOTE_INDENT                  _INDENT
    +QUOTE_SIZE                    _SIZE
    +REF_INDENT                    INDENT_REFS
    +REF)                          REF_BRACKETS_END
    +REF]                          REF_BRACKETS_END
    +REF}                          REF_BRACKETS_END
    +REF(                          REF_BRACKETS_START
    +REF[                          REF_BRACKETS_START
    +REF{                          REF_BRACKETS_START
    +SUBHEAD_COLOR                 _COLOR
    +SUBHEAD_FAMILY                _FAMILY
    +SUBHEAD_FONT                  _FONT
    +SUBHEAD_SIZE                  _SIZE
    +SUBTITLE_COLOR                _COLOR
    +SUBTITLE_FAMILY               _FAMILY
    +SUBTITLE_FONT                 _FONT
    +SUBTITLE_SIZE                 _SIZE
    +TITLE_COLOR                   _COLOR
    +TITLE_FAMILY                  _FAMILY
    +TITLE_FONT                    _FONT
    +TITLE_SIZE                    _SIZE
    +TOC_FAM                       _FAMILY
    +TOC_FAMILY                    _FAMILY
    +TOC_HEADER_FAMILY             _FAMILY
    +TOC_HEADER_FONT               _FONT
    +TOC_HEADER_QUAD               _QUAD
    +TOC_HEADER_SIZE               _SIZE
    +TOC_HEAD_FAMILY               _FAMILY
    +TOC_HEAD_FONT                 _FONT
    +TOC_HEAD_SIZE                 _SIZE
    +TOC_PARAHEAD_FAMILY           _FAMILY
    +TOC_PARAHEAD_FONT             _FONT
    +TOC_PARAHEAD_SIZE             _SIZE
    +TOC_PN_FAMILY                 _FAMILY
    +TOC_PN_FONT                   _FONT
    +TOC_PN_SIZE                   _SIZE
    +TOC_PT_SIZE                   _SIZE
    +TOC_SUBHEAD_FAMILY            _FAMILY
    +TOC_SUBHEAD_FONT              _FONT
    +TOC_SUBHEAD_SIZE              _SIZE
    +TOC_TITLE_FAMILY              _FAMILY
    +TOC_TITLE_FONT                _FONT
    +TOC_TITLE_SIZE                _SIZE
     

    diff --git a/contrib/groff/contrib/mom/momdoc/toc.html b/contrib/groff/contrib/mom/momdoc/toc.html index cd853e8e88a0..515740449cfc 100644 --- a/contrib/groff/contrib/mom/momdoc/toc.html +++ b/contrib/groff/contrib/mom/momdoc/toc.html @@ -1,14 +1,75 @@ + -Mom -- Table of Contents +Mom, version 1.3-a -- Table of Contents -

    Table of Contents

    +

    Table of Contents for mom, version 1.3-a

    + +The table of contents has grown quite large. If you've been using +mom for a while, you might prefer the +Quick Reference Guide. +

    +If you're new to mom, click on any link in the +Quick Table of Contents +to go to the +appropriate section of the Full Table of Contents. +

    +Or click +here +to go directly to the Full Table of Contents. +

    +


    + +

    Quick Table of Contents

    +INTRODUCTORY STUFF +TYPESETTING WITH MOM + +

    +DOCUMENT PROCESSING WITH MOM +

    +
    +
    + +

    Full Table of Contents

    + +
  • 1. WHAT IS MOM? +
  • 2. DEFINITIONS OF TERMS USED IN THIS MANUAL +
  • 3. USING MOM +
  • 4. THE TYPESETTING MACROS +
  • 4.9 Multi-columns +
  • 4.10 Indents +
  • 4.11 Goodies -- aliases, transparent lines, smartquotes, caps, underscoring/underlining, padding lines, leaders, drop - caps, superscripts + caps, superscripts, (nested) lists, user-definable strings +
  • 4.12 Inline Escapes + +
  • 4.13 Coloured text + + +
  • 5. DOCUMENT PROCESSING WITH MOM +
  • 5.6 PAGINATION +
  • 5.7 RECTO/VERSO PRINTING AND COLLATING -
  • 5.8 CREATING A COVER PAGE + +
  • 5.8 CREATING COVER PAGES
    -
  • 5.9 WRITING LETTERS + +
  • 5.9 BIBLIOGRAPHIES AND REFERENCES +
    + +
  • 5.10 WRITING LETTERS -
  • 5.10 USING TYPESETTING MACROS DURING DOCUMENT PROCESSING -
  • 6. APPENDICES + +
  • 6. QUICK REFERENCE GUIDE TO MOM +

    + +

  • 7. APPENDICES diff --git a/contrib/groff/contrib/mom/momdoc/typemacdoc.html b/contrib/groff/contrib/mom/momdoc/typemacdoc.html index ef23d08442f4..bedd031905bc 100644 --- a/contrib/groff/contrib/mom/momdoc/typemacdoc.html +++ b/contrib/groff/contrib/mom/momdoc/typemacdoc.html @@ -1,3 +1,4 @@ + @@ -7,9 +8,10 @@ -Next   -Prev   +Next   +Prev   Back to Table of Contents +

    @@ -29,24 +31,27 @@ alone. (To indent footnotes, see the full explanation of the FOOTNOTE macro.)

    -There are, however, some typesetting macros that, used during document +Mom's tabs +(both +typesetting tabs +and +string tabs) +behave as expected in running text during document processing. Tab +structures that do not exceed the line length of running text are +preserved sensibly from page to page, and, if +COLUMNS +are enabled, from column to column. +

    +Some typesetting macros, however, when used during document processing, behave in special ways. These are the macros that deal -with the basic parameters of type style: horizontal and vertical margins, -line length, +with the basic parameters of type style: horizontal and vertical +margins, line length, family, font, -point size, +point size, leading, and quad. -

    -NOTE: See the section on -Top and bottom margins in document processing -for information on how mom interprets -T_MARGIN -and -B_MARGIN -in document processing.

    Mom assumes that any changes to these parameters @@ -58,7 +63,17 @@ middle of a document.

    The following lists those typesetting macros whose behaviour during document processing requires some explanation. -

    +(Please refer to +Top and bottom margins in document processing +for information on how mom interprets +T_MARGIN +and +B_MARGIN +in document processing. Additionally, see +ADD_SPACE +if you encounter the problem of trying to get mom +to put space at the tops of pages after the first.) +

     MACRO           EFFECT DURING DOCUMENT PROCESSING
     -----           ---------------------------------
    @@ -115,9 +130,14 @@ LS              *Changes line space for the duration of the
                      current tag only.  As soon as another document
                      element tag is entered, the line space reverts to
                      the current document default for the new
    -                 tag.  Highly NOT recommended, since changes to
    -                 a document's leading interfere with mom's
    -                 ability to balance bottom margins.
    +                 tag.
    +
    +                 Using LS to temporarily change leading within a
    +                 document will almost certainly result in a bottom
    +                 margin that doesn't align with the bottom margin
    +                 of subsequent pages.  You'll need to use the SHIM
    +                 macro to get mom back on track when you're ready
    +                 to return to the document's default leading.
     
     QUAD            *Changes quad for the duration of the
                      current tag only.  As soon as another document
    @@ -159,10 +179,56 @@ running text, but have no effect on the placement of
     footers,
     or page numbers.
     
    +
    +	

    ADD_SPACE

    +
    + +

    +Occasionally, you may want to insert space before the start of +running text +on pages after the first. +

    +You might have tried using +ALD +or +SPACE +and found it did nothing. This is because mom +normally inhibits any extra space before the start of running text +on pages after the first. +

    +If you need the space, you must use the macro, +ADD_SPACE, in conjuction with +NEWPAGE. +ADD_SPACE takes as its single argument the +distance you want mom to advance from the normal +baseline position at the top of the page. A +unit of measure +is required. + +

    +For example, say you wanted to insert 2 inches of space before the +start of running text on a page other than the first. You'd +accomplish it with + +

    +

    +	.NEWPAGE
    +	.ADD_SPACE 2i
    +
    + +which would terminate your current page, break to a new page, +print the header (assuming headers are on) and insert 2 inches of +space before the start of running text. +

    +Since adding space in this way is almost sure to disrupt +mom's ability to guarantee perfectly flush bottom +margins, I highly recommend using the +SHIM +macro immediately after ADD_SPACE.


    -Next   -Prev   +Next   +Prev   Top   Back to Table of Contents diff --git a/contrib/groff/contrib/mom/momdoc/typesetting.html b/contrib/groff/contrib/mom/momdoc/typesetting.html index 8ac345ee2b23..a161c5b4c341 100644 --- a/contrib/groff/contrib/mom/momdoc/typesetting.html +++ b/contrib/groff/contrib/mom/momdoc/typesetting.html @@ -1,3 +1,4 @@ + @@ -10,7 +11,7 @@ Next   Prev   Back to Table of Contents - +

    THE TYPESETTING MACROS

    @@ -29,7 +30,7 @@
  • Introduction to Basic Parameters
  • List of macros -
  • JUSTIFYING, QUADDING, FILLING, BREAKING LINES +
  • JUSTIFYING, QUADDING, FILLING, BREAKING and JOINING LINES +


    Introduction to the typesetting macros

    @@ -108,12 +110,12 @@ the same thing. Mom's typesetting macros can be used as a standalone package, independent of the document processing macros. -With them, you can typeset on-the-fly. Document covers, your best -friend's résumé, a poster for a lost dog -- none of these requires +With them, you can typeset on-the-fly. Book covers, your best +friend's résumé, a poster for a lost dog--none of these requires structured document processing (page headers, paragraphs, heads, footnotes, etc). What they do demand is precise control over every element on the page. The typesetting macros give you that control. -
    +


    @@ -138,7 +140,7 @@ for a number of well-known, established paper sizes. The PAGE macro provides a convenient way of setting the page dimensions and some or all of the page margins with a single macro. -
    +

    Page setup macros list

    @@ -155,13 +157,14 @@ some or all of the page margins with a single macro.
  • PAGE (page dimensions and margins all in one fell swoop)
  • NEWPAGE (start a new page) +


    Page width


    -Macro: PAGEWIDTH <width of printer sheet> +Macro: PAGEWIDTH <width of printer sheet>
    *Requires a unit of measure @@ -180,7 +183,7 @@ the width of your printer sheet is 8-1/2 inches, you enter

    Page length


    -Macro: PAGELENGTH <length of printer sheet> +Macro: PAGELENGTH <length of printer sheet>
    *Requires a unit of measure @@ -200,12 +203,12 @@ enter

    Paper


    -Macro: PAPER <paper type> +Macro: PAPER <paper type>

    PAPER provides a convenient way to set the page -dimensions for some common printer sheet sizes. <paper -type> can be one of: +dimensions for some common printer sheet sizes. <paper +type> can be one of:

     	LETTER
    @@ -243,7 +246,7 @@ than to remember the correct dimensions and enter
     

    Left margin


    -Macro: L_MARGIN <left margin> +Macro: L_MARGIN <left margin>
    *Requires a unit of measure @@ -282,14 +285,14 @@ using the See Typesetting Macros in Document Processing for an explanation. -
    +


    Right margin


    -Macro: R_MARGIN <right margin> +Macro: R_MARGIN <right margin>
    *Requires a unit of measure @@ -356,14 +359,14 @@ when you're using the See Typesetting Macros in Document Processing for an explanation. -
    +


    Top margin


    -Macro: T_MARGIN <top margin> +Macro: T_MARGIN <top margin>
    *Requires a unit of measure @@ -371,7 +374,7 @@ Macro: T_MARGIN <top margin> T_MARGIN establishes the distance from the top of the printer sheet at which you want your type to start. It requires a unit of measure, and decimal fractions are allowed. To set a top -margin of 2-1/2 centimeters, you'd enter +margin of 2-1/2 centimetres, you'd enter

     	.T_MARGIN 2.5c
    @@ -408,14 +411,14 @@ slightly different when you're using the
     See
     Top and bottom margins in document processing
     for an explanation.
    -
    +


    Bottom margin


    -Macro: B_MARGIN <bottom margin> +Macro: B_MARGIN <bottom margin>
    *Requires a unit of measure @@ -449,7 +452,7 @@ slightly different when you're using the document processing macros. See Top and bottom margins in document processing for an explanation. -
    +

    @@ -457,7 +460,7 @@ for an explanation.

    Page


    Macro: PAGE -<width> [ <length> [ <lm> [ <rm> [ <tm> [ <bm> ] ] ] ] ] +<width> [ <length> [ <lm> [ <rm> [ <tm> [ <bm> ] ] ] ] ]
    *All arguments require a unit of measure @@ -465,8 +468,8 @@ Macro: PAGE PAGE lets you establish paper dimensions and page margins with a single macro. The only required argument is page width. The rest are optional, but they must appear in order and you can't -skip over any. <lm>, <rm>, <tm> -and <bm> refer to the left, right, top and bottom +skip over any. <lm>, <rm>, <tm> +and <bm> refer to the left, right, top and bottom margins respectively.

    Assuming your page dimensions are 11 inches by 17 inches, and that's @@ -484,7 +487,7 @@ If you want to set the left margin as well, say, at 1 inch,

    Now suppose you also want to set the top margin, say, at 1-1/2 -inches. <tm> comes after <rm> +inches. <tm> comes after <rm> in the optional arguments, but you can't skip over any arguments, therefore to set the top margin, you must also give a right margin. The PAGE macro would look like this: @@ -528,7 +531,7 @@ of the first line of text down by one linespace. To compensate, do immediately before entering any text, or, if it's feasible, make PAGE the last macro you invoke prior to entering text. -
    +

    @@ -544,10 +547,16 @@ processing the current page and move you to the top of a new one (subject to the top margin set with T_MARGIN.

    -Experts: NEWPAGE is an alias of -.bp. You can use either, or mix 'n' match with -impunity. -
    +Experts: Prior to version 1.1.9, +NEWPAGE was simply an alias of +.bp. As of 1.1.9, NEWPAGE, +is its own mom macro. While the new macro +should be backwardly compatible with documents created using +pre-1.1.9 moms, I suggest that from this version +onward, if you were in the habit of using .bp +whenever you wanted to break to a new page, you now begin to use +NEWPAGE instead. +


    @@ -566,12 +575,13 @@ to the basic parameter macros remain in effect until you change them. The document processing macros handle things differently. See Typesetting Macros in Document Processing for an explanation. -
    +

    Basic parameter macros list

    • FAMILY (type family)
    • FONT (font) +
    • FALLBACK_FONT (for invalid fonts)
    • PT_SIZE (point size of type)
    • LS (line spacing/leading)
    • AUTOLEAD (automatic line spacing) @@ -583,12 +593,13 @@ for an explanation.

      Type family


      -Macro: FAMILY <family> +Macro: FAMILY <family>
      Alias: FAM

      -FAMILY takes one argument: the name of the type family +FAMILY takes one argument: the name of the +family you want. Groff comes with a number of PostScript families, each identified by a 1-, 2- or 3-letter mnemonic. The standard families are: @@ -596,29 +607,80 @@ are:

  • +
    \*[BU1]...\*[BU36] -Move back 1...36 -kern units -
    \*[FU1]...\*[FU36] -Move forward 1...36 -kern units + + + + + + + + +
    \*[BU1]...\*[BU36]
    Move back 1...36 kern units
    \*[FU1]...\*[FU36]
    Move forward 1...36 kern units

    also exist (i.e. with no space before the number of kern units desired, @@ -227,7 +269,7 @@ up to a limit of 36). between characters pairs that are already automatically kerned disables the automatic kerning and uses the value you give to BU or FU instead. -
    +

    @@ -245,17 +287,21 @@ line in order to create special typographic effects.

    Mom's inline escapes for these horizontal movements are

    - +
    + - + + + - + +
    \*[FWD #<unit>] -Move forward inline the specified number of -units of measure; -decimal fractions are allowed. +
    \*[FWD n<unit>]
    Move forward inline the specified number of + units of measure; + decimal fractions are allowed.
    \*[BCK #<unit>] -Move backward inline the specified number of -units of measure; -decimal fractions are allowed. +
    \*[BCK n<unit>]
    Move backward inline the specified number of + units of measure; + decimal fractions are allowed.

    For example, @@ -268,9 +314,15 @@ puts 12 points of space between "1." and

    NOTE: For backward compatibility, the forms

    - - +
    \*[BP.25]...\*[BP12.75]Move back .25...12.75 points -
    \*[FP.25]...\*[FP12.75]Move forward .25...12.75 points
    + + + + + + + +
    \*[BP.25]...\*[BP12.75]
    Move back .25...12.75 points
    \*[FP.25]...\*[FP12.75]
    Move forward .25...12.75 points

    also exist (i.e. with no space before the digit and points being @@ -278,7 +330,7 @@ the unit of measure, hence no unit of measure required). Both accept quarter points, so it's possible to do, for example, \*[FP.5] or \*[BP1.25] up to a limit of 12.75 points. -
    +

    @@ -289,15 +341,19 @@ of 12.75 points. If you need to move portions of type up or down on a line, mom provides the following inline escapes:

    - +
    + - + + + - + +
    \*[UP #<unit>] -Move up inline the specified number of -units of measure +
    \*[UP n<unit>]
    Move up inline the specified number of + units of measure
    \*[DOWN #<unit>] -Move down inline the specified number of -units of measure +
    \*[DOWN n<unit>]
    Move down inline the specified number of + units of measure

    For example, @@ -309,20 +365,95 @@ For example, moves the hyphen in the telephone number up by 1 point, then moves back down by the same amount.

    -NOTE: For backward compatibility, the following are -also available: +NOTE: \*[UP] and \*[DOWN] do not +work with the inline escape, +\*[RULE]. +See +here +for details.

    - - +ADDITIONAL NOTE: For backward compatibility, the +following are also available: +

    +

    \*[ALD.25]...\*[ALD12.75] -Advance lead .25...12.75 points (move downward) -
    \*[RLD.25]...\*[RLD12.75] -Reverse lead .5...12.75 points (move upward)
    + + + + + +
    \*[ALD.25]...\*[ALD12.75]
    +
    Advance lead .25...12.75 points (move downward) +
    \*[RLD.25]...\*[RLD12.75]
    Reverse lead .5...12.75 points (move upward)

    Both \*[ALD] and \*[RLD] work in -points, hence you musn't use a unit of measure. -
    +points, hence you mustn't use a unit of measure. +

    + + + +


    +

    Terminate a line without advancing on the page

    + +

    +Sometimes, you want mom to break a line but not +advance on the page. See +here +for an example of when you might want to do this. +

    +In versions of mom prior to 1.2-f, this was +accomplished through the use of +EL. +As of 1.2-f, you can, if you prefer, accomplish the same thing +by using the inline escape, \*[B]. Simply +attach the escape to the end of any line. Using the example +given in the document entry for EL, you'd use +\*[B] like this: + +

    +

    +	.LEFT
    +	.LS 12.5
    +	A line of text.\*[B]
    +	.ALD 24p
    +	The next line of text.
    +
    + +\*[B] works reliably regardless of the current +fill mode. +

    + + + +


    +

    Call the next sequential tab without advancing on the page

    + +

    +Sometimes, you want mom to move to the next tab in +sequence (e.g. from TAB 1 to TAB 2, or TAB 8 to TAB 9) without +mom advancing on the page. (See the example in +here +if you're not clear how mom manages tabs and +linebreaks.) +

    +In versions of mom prior to 1.2-f, this was +accomplished through the use of +TN. +As of 1.2-f, you can, if you prefer, accomplish the same thing +by using the inline escape, \*[TB+]. Simply +attach the escape to the end of any line in a tab, like this: + +

    +

    +	.TAB 1
    +	Some text\*[TB+]    \" This line is in tab 1
    +	Some more text      \" This line is in tab 2, on the same baseline as tab 1
    +
    + +\*[TB+] works reliably regardless of the current +fill mode. +

    @@ -344,10 +475,28 @@ example: The above draws a rule the full measure of the 6-pica line length. -Please note that \*[$RULE] should appear on a line by -itself and that it draws the rule to the full measure, hence it -cannot be used to fill the remainder of a partial line with -a rule in this way: +

    +\*[RULE] should appear on a line by itself. In +fill modes, +(i.e. +QUAD +or +JUSTIFY), +it requires a +.BR +on the line immediately before it; otherwise, the rule will be drawn +on the same baseline occupied by any type preceding it. In +nofill modes +(i.e +LEFT, +RIGHT +or +CENTER), +the .BR is not required. +

    +Please note that \*[RULE] draws the rule to the +full measure, hence it cannot be used to fill the remainder +of a partial line with a rule in this way:

     	Signature__________________________________________
    @@ -358,13 +507,34 @@ If you wish to accomplish this effect, you have to use
     PAD
     macro and
     string tabs.
    -(See the example provided with
    -.PAD.
    +(See the
    +example
    +provided with PAD.)
    +
     

    +Please also note that the inline escapes +\*[UP] +and +\*[DOWN] +cannot be used in conjunction with \*[RULE]. This +doesn't work: +

    +

    +	\*[DOWN 2p]\*[RULE]\*[UP 2p]
    +
    + +This does: +

    +

    +	.ALD 2p
    +	\*[RULE]
    +	.RLD 2p
    +
    + See groff's Horizontal line drawing function for more information on drawing horizontal rules. -
    +


    @@ -375,33 +545,52 @@ for more information on drawing horizontal rules.

    Groff's basic mechanism for inline font control is the escape -\f. +\f[<font>].

    - - +
    \fRChange font to roman -
    \fIChange font to italic -
    \fBChange font to bold -
    \f(BIChange font to bold italic -
    \fPRevert to previous font
    + + + + + + + + + + + + + + + + + + + +
    \f[R]Change font to medium roman (equivalent to mom's \*[ROM])
    \f[I]Change font to medium italic (equivalent to mom's \*[IT])
    \f[B]Change font to bold roman (equivalent to mom's \*[BD])
    \f[BI]Change font to bold italic (equivalent to mom's \*[BDI])
    \f[P]Revert to previous font (equivalent to mom's \*[PREV])

    -A special instance of \f is -\f[font], where "font" can be a -complete legal family/font name combo. This is especially -useful should you need to change both family and font inline. -For example, if your prevailing family and font are Times Roman -and you want a few words in Courier Bold Italic, you could do -this: +\f[<font>] can be used with +any legal font style registered with groff. (See +here +for a list of pre-registered font styles provided by +mom). +

    +\f[<font>] can also take a +complete legal family+font name combo. This is especially useful +should you need to change both family and font inline. For example, +if your prevailing family and font are Times Roman and you want a +few words in Courier Bold Italic, you could do this:

     	.FAM T
     	.FT  R
    -	The command \f[CBI]ls -l\fP gives a "long" directory listing.
    +	The command \f[CBI]ls -l\f[P] gives a "long" directory listing.
     
    The Unix command "ls -l" will appear in Courier Bold Italic in a line that is otherwise in Times Roman. -
    +

    @@ -423,7 +612,7 @@ moves you 1.25 inches to the right (forwards) of the horizontal position on the current output line. \h'<distance>' is exactly equivalent to -\*[FWD #<unit>]. +\*[FWD n<unit>].

     	\h'-1.25i'
    @@ -431,8 +620,8 @@ position on the current
     
     moves you 1.25 inches to the left (backwards).
     \h'-<distance>' is exactly equivalent to
    -\*[BCK #<unit>].
    -
    +\*[BCK n<unit>]. +

    @@ -456,7 +645,7 @@ moves you (approx.) 2/3 of an downward on the current output line. \v'<distance>' is exactly equivalent to -\*[DOWN #<unit>]. +\*[DOWN n<unit>].

     	\v'-.6m'
    @@ -464,7 +653,7 @@ downward on the current
     
     moves you (approx.) 2/3 of an em upward.
     \v'<-distance>' is exactly equivalent to \*[UP #<unit>].
    +href="#UP">\*[UP n<unit>].
     

    IMPORTANT: The vertical motion of \v affects ONLY type on the current @@ -479,7 +668,7 @@ you've done what you want to do. Otherwise, the remaining type will be set too high (if you used \v with the minus sign) or too low (if you used \v without the minus sign). -
    +

    @@ -507,7 +696,7 @@ argument. Furthermore, if the string is composed of several words separated by spaces, you MUST surround the whole escape with double quotes, as in the example above. -
    +

    @@ -543,15 +732,16 @@ a number of other line-drawing escapes, but frankly, using them for typographically precise drawing is a bit like hammering in a nail with a screwdriver -- doable, but not recommended.

    -Groff comes with a number of "preprocessors" designed to ease -creating rules, boxes, splines, and so on (tbl, pic, and friends), but -I tend not to use them. A firm believer in the "right tool for -the job," I prefer a vector drawing program (in my case, tgif) -when I need to combine type with graphic elements (say, a complex -ruled form). Inserting the results into a document is easy enough -with .PSPIC (consult the grops -man page for information on this indispensible and easy-to-use macro). -
    +Groff comes with a number of "preprocessors" designed +to ease creating rules, boxes, splines, and so on (tbl, pic, +and friends), but I tend not to use them. A firm believer +in the "right tool for the job," I prefer a vector +drawing program when I need to combine type with graphic elements +(say, a complex ruled form). Inserting the results into a +document is easy enough with .PSPIC (consult +the groff_tmac man page for information on this +indispensable and easy-to-use macro). +

    @@ -563,11 +753,12 @@ Here follows a short list of commonly-used special characters available via inline escapes. If you're not sure of the meaning of some of these characters, consult the Definitions of Terms. -For a more complete list, consult the section Special -Character Names at the end of the Tutorial Examples -in cstr54, available -here. - +

    +For a complete list of special characters and glyphs (i.e. just +about anything you'd ever want to appear on the printed page, +including mathematical symbols, accented characters, unusual +ligatures and letters unique to various European languages), consult +man groff_char.

         CHARACTER                   ESCAPE SEQUENCE
    @@ -603,7 +794,7 @@ in cstr54, available
     

    -Next   +Next   Prev   Top   Back to Table of Contents diff --git a/contrib/groff/contrib/mom/momdoc/intro.html b/contrib/groff/contrib/mom/momdoc/intro.html index 40c306d7302e..4c6e3ebef747 100644 --- a/contrib/groff/contrib/mom/momdoc/intro.html +++ b/contrib/groff/contrib/mom/momdoc/intro.html @@ -1,3 +1,4 @@ + @@ -25,6 +26,8 @@
    A note on mom's documentation
    +Canonical reference materials +
    How to read macro arguments

    Who is mom meant for?

    @@ -50,7 +53,7 @@ She's aimed at three kinds of users: started.

    -As might be infered from the above, mom is two macro +As might be inferred from the above, mom is two macro packages in one: a set of typesetting macros, and a set of document processing macros. The typesetting macros govern the physical aspects of page layout and provide sane, comprehensible control over @@ -61,7 +64,7 @@ typesetting or page layout at all. Because mom provides both typesetting and document processing macros, it's safe to say she blurs the distinction between document processing and document design. While her basic document style -comes with pretty spiffy defaults (okay -- change "spiffy" +comes with pretty spiffy defaults (okay--change "spiffy" to "typographically professional"), you can easily control how all the various document elements look: titles, page headers and footers, page numbering, heads, subheads, footnotes and so on can be @@ -72,6 +75,7 @@ read up on groff primitives in order to accomplish what you want; the typesetting macros take care of that. +

    Typesetting with mom

    @@ -101,13 +105,12 @@ want document processing (via the START macro; see below), every macro is a literal command that remains in effect until you modify it or turn it off. This means that if you -want to create flyers, document covers, surveys, tabulated forms, -curricula vitae and so on, you may do so in the good old-fashioned -way: one step at a time with complete control over every element on -the page. +want to create flyers, surveys, tabulated forms, curricula vitae and +so on, you may do so in the good old-fashioned way: one step at a +time with complete control over every element on the page.

    Years of reading various mailing lists dealing with computer -typesetting (groff, TeX, and friends) have convinced me that no progam +typesetting (groff, TeX, and friends) have convinced me that no program can ever replace the human eye and human input when it comes to high quality typesetting. As of this writing, a thread on the subject of "micro typography" in groff has been going on for nearly a @@ -117,26 +120,25 @@ rendered flawlessly by any algorithm, no matter how clever. (For whatever it's worth, a similar problem exists with engraving musical scores by computer.)

    -Mom does not try to solve the problems posed by -things like hanging punctuation, left-margin adjustments for those -annoying "space-y" upper case letters like T and W, and -so on. She merely tries to provide tools that allow knowledgeable -typesetters to come up with solutions to these problems -in ways that are somewhat easier and more intuitive than manipulating -groff at the -primtive +Mom does not try to solve the problems posed +by things like hanging punctuation, left-margin adjustments for +upper case letters like T and W, and so on. She merely tries to +provide tools that allow knowledgeable typesetters to come up with +solutions to these problems in ways that are easier and more +intuitive than manipulating groff at the +primitive level. As a professional typesetter of more than two decades, and a writer, I have encountered few situations that cannot be handled by mom's typesetting macros.

    Author's note: One area where groff itself needs serious rethinking is in the matter of an algorithm that takes into -account both word AND letter spacing when +account both word and letter spacing when justifying lines. At present, only word spacing is adjusted, requiring what I consider an unnecessary amount of user intervention whenever letter spacing is required. - +

    Document processing with mom

    @@ -149,7 +151,7 @@ differs is in the degree of control you have over the look and placement of the various elements of a document. For example, if you don't want your heads underlined, or you want them bigger/smaller, or you'd prefer them to be in a different font, or you'd rather they -were flush left instead of centered, you can make the changes easily +were flush left instead of centred, you can make the changes easily and have them apply to the whole document. Temporary and one-off changes are easy, too.

    @@ -157,13 +159,13 @@ changes are easy, too. don't provide. For example, you can switch between draft-style and final-copy output. If you regularly make submissions to publishers and editors who insist on "typewritten, double-spaced," there's a -special macro -- +special macro-- PRINTSTYLE TYPEWRITE --- that changes typeset documents into ones that would make your -high-school typing teacher proud. Footnotes, multiple columns, -recto/verso printing and user designable headers and footers are also -part of the fun. - +--that changes typeset documents into ones that would make your +high-school typing teacher proud. Footnotes, endnotes, tables of +contents, multiple columns, nested lists, recto/verso printing and +user designable headers and footers are also part of the fun. +

    Mom's philosophy

    @@ -194,8 +196,9 @@ for their special typesetting needs. Not to put too fine a point on it, groff primitives tend toward the abstruse, and most inline escapes are about as readable in-line as an encrypted password. This does not make for happy-camper writers, who either find themselves stuck -with document formatting style they don't really like, or are forced to -learn groff from the ground up -- a daunting task, to say the least. +with a document formatting style they don't really like, or are +forced to learn groff from the ground up--a daunting task, to say +the least.

    Mom aims to make creating documents a simple matter, but with no corresponding loss of user control. The document @@ -220,8 +223,7 @@ produce output that looks good no matter where it's displayed. She's designed for printed output, although with PRINTSTYLE TYPEWRITE she produces acceptable terminal copy. She makes no attempt to be -compatible with older versions of troff. And she remains largely -untested with the groff preprocessors (tbl, pic, eqn, etc.) +compatible with older versions of troff.

    One special feature in mom's design is the attention she pays to aligning the bottom margins of every page. Nothing screams @@ -233,7 +235,7 @@ bottom of the page without some text underneath it), but in all cases where hanging bottom margins can be avoided, mom does avoid them, by clever adjustments to leading ("line spacing") and the spacing between different elements on the page. - +

    A note on mom's documentation

    @@ -249,40 +251,54 @@ that gets tossed. Mom's documentation assumes users know their way around GNU/Linux. It further assumes they at least know what groff is, even if they don't know much about it. Lastly, it assumes that -everyone -- groff newbies and experts alike -- learns faster from +everyone--groff newbies and experts alike--learns faster from a few well-placed examples than from manpage-style reference docs. What mom's documentation doesn't assume is that -you know everything -- not about groff, not about typesetting, +you know everything--not about groff, not about typesetting, not about document processing. Even experts have odd lacunae in their knowledge base. Therefore, whenever I suspect that a term or procedure will cause head scratching, I offer an explanation. And when explanations aren't enough, I offer examples. - +
    + +

    Canonical reference materials

    -The canonical reference materials for groff are cstr54 -(a downloadable PostScript copy of which is available +The canonical reference materials for groff are +cstr54 (a downloadable PostScript copy of which is +available here) -and the troff and groff_diff manpages. -I've tried to avoid reiterating them, however, in a few places, this has -proved impossible. Be forewarned: I have no qualms about sidestepping -excrutiating completeness about groff usage; I'm more concerned with -getting mom users up and running. Mea culpa. +and the troff and groff_diff +manpages. Another excellent source of information (maybe the best) +is the groff info pages, available by typing +

    +

    +	info groff
    +
    + +at the command line (assuming you have info +installed on your system). And for inputting special characters, +see man groff_char. +

    +I've tried to avoid reiterating the information contained in these +documents; however, in a few places, this has proved impossible. +But be forewarned: I have no qualms about sidestepping excruciating +completeness concerning groff usage; I'm more interested in getting +mom users up and running. Mea culpa.

    Note: Mom's macro file (om.tmac) is heavily commented. Each macro is preceded by a -description of its arguments, function, and usage, which may +description of its arguments, function and usage, which may give you information in addition to what's contained in this documentation. - +

    How to read macro arguments

    -

    The concise descriptions of macros in this documentation typically look like this:

    -Macro: NAME arguments +Macro: NAME arguments
    arguments lists the macro's arguments using conventions that should be familiar to anyone who has ever read a manpage. Briefly: @@ -299,7 +315,7 @@ should be familiar to anyone who has ever read a manpage. Briefly: which means "or."
  • Arguments that are optional are surrounded by square brackets.
  • <off> in an argument list means that any argument - turns the macro off. + other than those in the argument list turns the macro off.

    Toggle macros

    @@ -313,14 +329,16 @@ it could even be I_LOVE_MOM. Since these macros toggle things on and off, the argument list simply reads
    -toggle +toggle
    +

    Example 1: an argument requiring double-quotes

    -Macro: TITLE "<title of document>" +Macro: TITLE "<title of document>"
    +

    The required argument to TITLE is the title of your document. Since it's surrounded by double-quotes, you must include them in the argument, like this: @@ -331,8 +349,9 @@ include them in the argument, like this:

    Example 2: a macro with required and optional arguments

    -Macro: TAB_SET <tab #> <indent> <length> [ L | R | C | J [ QUAD ] ] +Macro: TAB_SET <tab #> <indent> <length> [ L | R | C | J [ QUAD ] ]
    +

    The first required argument is a number that identifies the tab (say, "3"). The second required argument is an indent from the left margin (say, 6 picas). The third required argument is the length of the tab @@ -355,12 +374,12 @@ you could enter: .TAB_SET 3 6P 3P L QUAD

  • -

    Example 3: a sample toggle macro:

    - + +

    Example 3: a sample toggle macro:

    -Macro: QUOTE toggle +Macro: QUOTE toggle
    - +

    QUOTE begins a section of quoted text in a document and doesn't require an argument. When the quote's finished, you have to tell mom it's done. diff --git a/contrib/groff/contrib/mom/momdoc/letters.html b/contrib/groff/contrib/mom/momdoc/letters.html index a344f4c61b36..ad35a7118950 100644 --- a/contrib/groff/contrib/mom/momdoc/letters.html +++ b/contrib/groff/contrib/mom/momdoc/letters.html @@ -1,3 +1,4 @@ + @@ -7,9 +8,10 @@ -Next   -Prev   +Next   +Prev   Back to Table of Contents +

    @@ -33,11 +35,11 @@ to design correspondence to your own specifications. However, flexibility in the matter of letters, which are, after all, simple communicative documents whose only real style requirements are that they be neat and professional-looking. - +

    Tutorial on writing letters

    - -Mom letters begin, like all mom -processed documents, with a +

    +Mom letters begin, like all +mom-processed documents, with a reference macro (in this case, AUTHOR), @@ -46,7 +48,8 @@ a (LETTER, obviously), the essential PRINTSTYLE macro, and -START. +START, +like this:

     	.AUTHOR    "Yannick P. Guique"
    @@ -58,30 +61,40 @@ macro, and
     PRINTSTYLE, above, could also be
     TYPEWRITE.  Mom has no objection
     to creating letters that look like they were typed on an Underwood
    -by a shapely secretary with great gams back in the 1940s.
    +by a shapely secretary with 1940s gams.
     

    -After the START macro, you enter data pertinent to +After the START macro, you enter headers pertinent to your letter: the date, the addressee (in business correspondence, -typically both name and address), the addressor (that's you; in +typically both name and address), the addresser (that's you; in business correspondence, typically both name and address), and a -greeting (in full, e.g. "Dear Mr. Smith,"). +greeting (in full, e.g. "Dear Mr. Smith," or "Dear +Mr. Smith:").

    -The macros for entering the data are simple (they're not even -toggles) -and entered in an intuitive order. -
    -

      -
    1. .DATE -
    2. .TO -
    3. .FROM -
    4. .GREETING -
    +The macros for entering the headers are simple (they're not even +toggles):

    -Mom ignores any you omit and spaces the letter's -opening according to what you do include. +

    +	.DATE
    +	.TO
    +	.FROM
    +	.GREETING
    +
    + +You may enter them in any order you like, except for +GREETING, which must come last. +Mom ignores any headers you omit and spaces the +letter's opening according to what you do include. See +Default for letters +to find out how mom formats the headers. +

    +(In pre 1.1.7-a releases of mom, the order +of entry was fixed at the above. This has been changed, although +if you do follow the above order, mom will +continue to behave exactly as she did in pre 1.1.7-a.)

    Once you've filled in what you need to get a letter started, simply -type the letter, introducing each and every paragraph with the +type the letter, introducing each and every paragraph, including +the first, with the PP macro.

    @@ -132,19 +145,79 @@ here's what the complete letter looks like. .CLOSING Sincerely,

    + +This produces a letter with headers that follow the North American +standard for business correspondence. If you'd prefer another +style of correspondence, for example, British, you'd set up the +same letter like this: +

    +

    +	.AUTHOR    "Yannick P. Guique"
    +	.DOCTYPE    LETTER
    +	.PRINTSTYLE TYPESET
    +	.START
    +	.FROM
    +	.RIGHT
    +	Y.P. GUIQUE
    +	022 Umask Road
    +	St-Sauveur-en-dehors-de-la-mappe, Québec
    +	.TO
    +	GUILLAUME BARRIÈRES
    +	Minidoux Corporation
    +	5000 Pannes Drive
    +	Redmond, Virginia
    +	.DATE
    +	.RIGHT
    +	August 25, 2004
    +	.GREETING
    +	Dear Mr. Barrières,
    +
    + +Notice the use of .RIGHT after +.FROM and .DATE in this example, +used to change the default quad for these macros. +


    Defaults for letters

    -In letters, mom sets: +In letters, if the order of header macros is

    +

    +	.DATE
    +	.TO
    +	.FROM
    +	.GREETING
    +
    + +mom sets +
      -
    1. the date flush right, page right, at the top of page one -
    2. the addressee in a block flush left, page left -
    3. the addressor in a block flush left, page left -
    4. the greeting flush left +
    5. the date flush right, page right, at the top of page one, +with a gap of two linespaces underneath +
    6. the addressee in a block flush left, page left, with a gap of +one linespace underneath +
    7. the addresser in a block flush left, page left, with a gap of +one linespace underneath +
    8. the greeting flush left, with a gap of one linespace +underneath +
    +

    +which is the standard for North American business correspondence. +

    +If you switch the order of .DATE, +.TO and/or .FROM, +mom sets all the headers flush left, with a gap of +one linespace underneath each. (The default left quad of any header +can be changed by invoking the .RIGHT macro, on +a line by itself, immediately before inputting the text of the +header.) +

    +Following the headers, mom sets +

    +

    • the body of the letter justified
    • in multi-page letters:
        @@ -152,7 +225,7 @@ In letters, mom sets:
      • the page number at the top of every page after page one
    • the closing/signature line flush left, indented halfway across the page - +

    Other important style defaults are listed below, and may be changed via the @@ -185,7 +258,7 @@ Spaced paragraphs yes no Footers* yes yes Footer margin 3 picas 3 picas Footer gap 3 picas 3 picas -Page numbers top, centered top, centered +Page numbers top, centred top, centred *Footers contain a "next page" number of the form .../#

    @@ -207,6 +280,7 @@ except NO_SUITE.
  • CLOSING
  • NO_SUITE -- "next page" number off +
    @@ -224,6 +298,29 @@ underneath, like this: October 31, 2002
  • +If you wish to change the default quad direction for the date, +enter .LEFT or .RIGHT, on a line by itself, +immediately after .DATE. +

    +If you wish to insert additional space between the date and any +letter header that comes after it, do so after inputting the date, +not at the top of the next header macro, like this: +

    +

    +	.DATE
    +	October 31, 2002
    +	.SPACE     \" Or, more simply, .SP
    +
    + +If you wish to remove the default space, +

    +

    +	.SPACE -1v \" Or, more simply, .SP -1v
    +
    + +will do the trick. +

    +


    @@ -242,6 +339,31 @@ and address of the addressee underneath, like this: Bramladesh, Ont. +If you wish to change the default quad direction for the address, +enter .LEFT or .RIGHT, on a line by itself, +immediately after .TO. +

    +If you wish to insert additional space between the address and +any letter header that comes after it, do so after inputting the +address, not at the top of the next header macro, like this: +

    +

    +	.TO
    +	JOHN SMITH
    +	10 Roberts Crescent
    +	Bramladesh, Ont.
    +	.SPACE     \" Or, more simply, .SP
    +
    + +If you wish to remove the default space, +

    +

    +	.SPACE -1v \" Or, more simply, .SP -1v
    +
    + +will do the trick. +

    +


    @@ -251,7 +373,7 @@ Macro: FROM

    Invoke FROM on a line by itself, with the name -and address of the addressor underneath, like this: +and address of the addresser underneath, like this:

     	.FROM
    @@ -260,6 +382,31 @@ and address of the addressor underneath, like this:
     	Ste-Vieille-Andouille, Québec
     
    +If you wish to change the default quad direction for the address, +enter .LEFT or .RIGHT, on a line by itself, +immediately after .FROM. +

    +If you wish to insert additional space between the address and +any letter header that comes after it, do so after inputting the +address, not at the top of the next header macro, like this: +

    +

    +	.FROM
    +	JOE BLOW
    +	15 Brunette Road
    +	Ste-Vieille-Andouille, Québec
    +	.SPACE     \" Or, more simply, .SP
    +
    + +If you wish to remove the default space, +

    +

    +	.SPACE -1v \" Or, more simply, .SP -1v
    +
    + +will do the trick. +

    +


    @@ -308,8 +455,8 @@ page" number at the bottom of multi-page letters, invoke


    -Next   -Prev   +Next   +Prev   Top   Back to Table of Contents diff --git a/contrib/groff/contrib/mom/momdoc/macrolist.html b/contrib/groff/contrib/mom/momdoc/macrolist.html new file mode 100644 index 000000000000..01125f72e08d --- /dev/null +++ b/contrib/groff/contrib/mom/momdoc/macrolist.html @@ -0,0 +1,1794 @@ + + + + +Mom -- Quick reference guide + + + + + +Next   +Prev   +Back to Table of Contents + + +

    + Quick reference guide +

    + +Once you know your way around mom, you may find +this guide preferable to using the Table of Contents. It lists (I +hope) all mom's user-space macros. The links +point to references found elsewhere in the documentation. +

    +NOTE: This guide uses tables extensively. Better +make sure you're reading it in a browser that renders them +sensibly. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypesettingDocument processing
    Page/paper size; margins; line lengthReference macros
    Family/font; pointsize; leadingLetters
    Font modificationsDocument style
    Underscoring and underliningSpecial to PRINTSTYLE TYPEWRITE
    ColourBegin document processing
    Quad, justification and fillCustomizing the document header
    Line terminationPagination
    HyphenationRecto/verso
    Word and sentence spacingAutomatic columns
    Kerning; ligaturesEpigraphs
    Vertical movementsHeads
    Horizontal movementsSubheads
    IndentsParagraph heads
    TabsParagraphs
    Manual columnsQuotes
    SuperscriptsBlockquotes
    DropcapsAuthor linebreaks
    ListsFootnotes
    Padding linesEndnotes
    MiscellaneousDesigning endnotes pages
     Lists
     Margin notes
     Line numbering
     References
     Bibliographies
     Table of contents
     Designing a table of contents
     Finis
     Headers and footers
     Part-by-part control +
    of headers
     Footers
     Covers and doc covers
     Customizing covers +
    and doc covers
     Part-by-part control of +
    covers and doc covers
     Miscellaneous
    + +
    +


    +

    Typesetting macros

    + +

    Page/paper size; margins; line length

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Page/paper sizeMarginsLine length
    PAGEWIDTHT_MARGINLL
    PAGELENGTHB_MARGIN 
    PAPERL_MARGIN 
    PAGER_MARGIN 
    + +

    Family/font; pointsize; leading

    + + + + + + + + + + + + + + + + + + + + + + +
    Family/fontPoint sizeLeading
    FAMILYPT_SIZELS
    FT\*[SIZE n]AUTOLEAD
    FALLBACK_FONT  
    + +

    Font modifications (pseudo-italic, -bold, -condensed, -extended)

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ItalicizeEmboldenCondenseExtend
    SETSLANTSETBOLDERCONDENSEEXTEND
    \*[SLANT]\*[BOLDER]\*[COND]\*[EXT]
    \*[SLANTX]\*[BOLDERX]\*[CONDX]\*[EXTX]
    + +

    Underscoring and underlining

    + + + + + + + + + + + + + + +
    UnderscoreUnderline
    UNDERSCOREUNDERLINE
    UNDERSCORE_2\*[UL]...\*[ULX]
    + +

    Colour

    + + + + + + + + + + + + + +
    Define coloursInvoke colours
    NEWCOLORCOLOR
    XCOLOR\*[<colorname>]
    + +

    Quad, justification and fill

    + + + + + + + + + + + + + + + + + + +
    Fill modesNo-fill modes
    JUSTIFYLEFT
    QUADCENTER
     RIGHT
    + +

    Line termination

    + + + + + + + + + + + + + + +
    BreakBreak (no space)Break (extra space)Break (force justify)
    BRELSPACESPREAD
    + +

    Hyphenation

    + + + + + + + + + + +
    EnableSet parameters
    HYHY_SET
    + +

    Word and sentence spacing

    + + + + + + + + + + +
    Word spaceSentence space
    WSSS
    + +

    Character pair and full line kerning; ligatures

    + + + + + + + + + + + + + + + + + + + + +
    Kern character pairsKern full linesLigatures
    KERNRWLIGATURES
    \*[BU n] + EW 
    \*[FU n] + BR_AT_LINE_KERN 
    + +

    Vertical movements

    + + + + + + + + + + + + + + +
    DownUp
    ALDRLD
    \*[DOWN n]\*[UP n]
    + +

    Horizontal movements

    + + + + + + + + + + +
    ForwardBack
    \*[FWD n]\*[BCK n]
    + +

    Indents

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    LeftRightBothQuitTempHanging
    ILIRIBIQTIHI
    ILXIRXIBX   
    + +

    Tabs

    + + + + + + + + + + + + + + + + + + + + + + +
    SetupInvokingQuitting
    TAB_SETTABTQ
    \*[STn]...\*[STnX]TN 
    ST  
    + +

    Manual columns

    + + + + + + + + + + + + +
    InitializingReturning to topExiting
    MCOMCRMCX
    + +

    Superscripts

    + + + + + + + + + + + + +
    SuperscriptCondensed superscriptExtended superscript
    \*[SUP]...\*[SUPX]\*[CONDSUP]...\*[CONDSUPX]\*[EXTSUP]...\*[EXTSUPX]
    + +

    Dropcaps

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    InvokingDropcap control
    DROPCAPDROPCAP_FAMILY
     DROPCAP_FONT
     DROPCAP_COLOR
     DROPCAP_ADJUST
     DROPCAP_GUTTER
    + +

    Lists

    + + + + + + + + + + + + + + + + + + + + + + +
    InitializingSetting itemsList control
    LISTITEMSHIFT_LIST
      RESET_LIST
      PAD_LIST_DIGITS
    + +

    Padding lines

    + + + + + + + + + + +
    Pad a lineChange the pad marker
    PADPAD_MARKER
    + +

    Miscellaneous

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NewpageAll capsSmartquotesRules/leaders
    NEWPAGECAPSSMARTQUOTES\*[RULE]
       \*[LEADER]
       LEADER_CHARACTER
    +
    + + + + + + + + + + + + + + + + + +
    Change the escape characterSuppress inputDisable traps
    ESC_CHARCOMMENTTRAP
     SILENT 
    + +
    +
    + +

    Document processing

    + +

    Reference macros

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TitlesAuthorsDraft copies
    TITLEAUTHORDRAFT
    SUBTITLE REVISION
    DOCTITLE DRAFT_STRING
    CHAPTER REVISION_STRING
    + +

    Letters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    HeadersClosingControl
    DATECLOSINGNO_SUITE
    FROM  
    TO  
    GREETING  
    + +

    Document style

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Basic styleStyle control*
    COPYSTYLEDOC_LEFT_MARGIN
    DOCTYPEDOC_RIGHT_MARGIN
    PRINTSTYLE**DOC_LINE_LENGTH
     DOC_FAMILY
     DOC_PT_SIZE
     DOC_LEAD
     DOC_LEAD_ADJUST
     DOC_QUAD
    +

    +*See the note +Changing document-wide style parameters after START +
    +**Absolutely required if you wish to use the document processing macros. + +

    Special to PRINTSTYLE TYPEWRITE

    + + + + + + + + + + + + + + + + + + + + + + +
    Italic/underliningQuotes
    UNDERLINE_ITALICUNDERLINE_QUOTES
    ITALIC_MEANS_ITALIC 
    UNDERLINE_SLANT 
    SLANT_MEANS_SLANT 
    + +

    Begin document processing

    + + + + + + + +
    Absolutely required in order to initialize document processing
    START
    + +

    Customizing the document header

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    GlobalTitleSubtitleChapter
    DOCHEADERTITLE_FAMILYSUBTITLE_FAMILYCHAPTER_STRING
    DOCHEADER_ADVANCETITLE_FONTSUBTITLE_FONTCHAPTER_TITLE_FAMILY
    DOCHEADER_FAMILYTITLE_SIZESUBTITLE_SIZECHAPTER_TITLE_FONT
    DOCHEADER_COLORTITLE_COLORSUBTITLE_COLORCHAPTER_TITLE_SIZE
       CHAPTER_TITLE_COLOR
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributionAuthorDocument type
    ATTRIBUTE_STRINGAUTHOR_FAMILYDOCTYPE_FAMILY
    ATTRIBUTE_COLORAUTHOR_FONTDOCTYPE_FONT
     AUTHOR_SIZEDOCTYPE_SIZE
     AUTHOR_COLORDOCTYPE_COLOR
    + +

    Pagination

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    PaginateStyle control
    PAGINATEPAGENUM_FAMILY
    PAGENUMBERPAGENUM_FONT
    PAGENUM_STYLE*PAGENUM_SIZE
    PAGENUM_ON_FIRST_PAGEPAGENUM_COLOR
    DRAFT_WITH_PAGENUMBERPAGENUM_POS
    SUSPEND_PAGINATIONPAGENUM_HYPHENS
    RESTORE_PAGINATION 
    +

    +*I.e. the "format" of page numbering (digits, roman numerals, letters) + +

    Recto/verso

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    EnablingControlingUser-defined page headers/footers +
    + for alternating pages* +
    RECTO_VERSOSWITCH_HEADERSHEADER_RECTO
     SWITCH_FOOTERS*HEADER_VERSO
      FOOTER_RECTO*
      FOOTER_VERSO*
    +

    +*Please note that most aspects of page header and footer control +are treated identically. In the documentation, the descriptions +of macros that control header and footer behaviour usually only +mention "HEADER" or "HEADER_". Simply apply +"FOOTER" or "FOOTER_" to the appropriate +"HEADER" or "HEADER_"macros in order to enable +their behaviour for footers. + + +

    Automatic columns

    + + + + + + + + + + + + + + +
    EnablingControling
    COLUMNSCOL_NEXT
     COL_BREAK
    + +

    Epigraphs

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MacroType-style controlOther
    EPIGRAPHEPIGRAPH_FAMILYEPIGRAPH_AUTOLEAD
     EPIGRAPH_FONTEPIGRAPH_QUAD
     EPIGRAPH_SIZEEPIGRAPH_INDENT
     EPIGRAPH_COLOR 
    + +

    Heads

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MacroType-style controlOther
    HEADHEAD_FAMILYHEAD_QUAD
     HEAD_FONTHEAD_CAPS
     HEAD_SIZEHEAD_UNDERLINE
     HEAD_COLORHEAD_SPACE
      NUMBER_HEADS
      RESET_HEAD_NUMBER
    + +

    Subheads

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MacroType-style controlOther
    SUBHEADSUBHEAD_FAMILYSUBHEAD_QUAD
     SUBHEAD_FONTNUMBER_SUBHEADS
     SUBHEAD_SIZERESET_SUBHEAD_NUMBER
      SUBHEAD_COLOR
    + +

    Paragraph heads

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MacroType-style controlOther
    PARAHEADPARAHEAD_FAMILYPARAHEAD_INDENT
     PARAHEAD_FONTNUMBER_PARAHEADS
     PARAHEAD_SIZERESET_PARAHEAD_NUMBER
     PARAHEAD_COLOR 
    + +

    Paragraphs

    + + + + + + + + + + + + + + + + + + + + + + +
    MacroType-style control*Other
    PPPP_FONTPARA_INDENT
      INDENT_FIRST_PARAS
      PARA_SPACE
    +

    +*For an in-depth explanation of how to manage the type-style of +paragraphs, much of which is normally established through the use of +typesetting macros prior to +START, +see +Paragraph control macros. + +

    Quotes +
    +(line-for-line cited text, e.g. poetry or code snippets) +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MacroType-style controlOther
    QUOTEQUOTE_FAMILYQUOTE_INDENT*
     QUOTE_FONTALWAYS_FULLSPACE_QUOTES
     QUOTE_SIZEBREAK_QUOTE
     QUOTE_AUTOLEADUNDERLINE_QUOTES
     QUOTE_COLOR 
    +

    +*Note that the use of QUOTE_INDENT sets the indent for both QUOTE +and BLOCKQUOTE. + +

    Blockquotes +
    +(formatted citations) +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MacroType-style controlOther
    BLOCKQUOTEBLOCKQUOTE_FAMILYBLOCKQUOTE_INDENT
     BLOCKQUOTE_FONTBLOCKQUOTE_QUAD
     BLOCKQUOTE_SIZEBREAK_BLOCKQUOTE
     BLOCKQUOTE_AUTOLEAD 
     BLOCKQUOTE_COLOR 
    +

    +*Note that the use of BLOCKQUOTE_INDENT sets the indent for both BLOCKQUOTE +and QUOTE. + +

    Author linebreaks +
    +(also called "scene" or "section" breaks) +

    + + + + + + + + + + + + +
    MacroType-style controlOther
    LINEBREAKLINEBREAK_COLORLINEBREAK_CHAR
    + +

    Footnotes

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MacroType-style controlOther
    FOOTNOTE*FOOTNOTE_FAMILYFOOTNOTE_AUTOLEAD
     FOOTNOTE_FONTFOOTNOTE_QUAD
     FOOTNOTE_SIZEFOOTNOTE_MARKERS
     FOOTNOTE_COLORFOOTNOTE_MARKER_STYLE
      RESET_FOOTNOTE_NUMBER
      FOOTNOTE_RULE
      FOOTNOTE_RULE_ADJ
      FOOTNOTE_RULE_LENGTH
      FOOTNOTES_RUN_ON
    +

    +*Indenting of footnotes is handled by arguments passed to FOOTNOTE. + +

    Endnotes

    + + + + + + + + + + +
    Input endnotesOutput endnotes pages
    ENDNOTEENDNOTES
    + +

    Designing endnotes pages +
    +(if you want to change the defaults) +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Type-style controlEndnotes page +
    title string* +
    Document identification string**
    ENDNOTE_FAMILYENDNOTE_STRINGENDNOTE_TITLE
    ENDNOTE_FONTENDNOTE_STRING_FAMILYENDNOTE_TITLE_FAMILY
    ENDNOTE_LEADENDNOTE_STRING_FONTENDNOTE_TITLE_FONT
    ENDNOTE_PT_SIZEENDNOTE_STRING_SIZEENDNOTE_TITLE_SIZE
    ENDNOTE_QUADENDNOTE_STRING_CAPSENDNOTE_TITLE_QUAD
     ENDNOTE_STRING_UNDERSCOREENDNOTE_TITLE_UNDERSCORE
    +

    +*By default, "Endnotes", at the top of the first page of +endnotes +
    +**I.e. how each document in the endnotes for a collated document is +identified (by default, the strings passed to the reference +macro, .TITLE +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Endnotes numberingParagraph controlEndnotes headers/footers
    ENDNOTE_NUMBER_FAMILYENDNOTE_PARA_INDENTENDNOTES_ALLOWS_HEADERS
    ENDNOTE_NUMBER_FONTENDNOTE_PARA_SPACEENDNOTES_HEADER_CENTER
    ENDNOTE_NUMBER_SIZE ENDNOTES_FOOTER_CENTER
    ENDNOTE_NUMBERS_ALIGN_LEFT  
    ENDNOTE_NUMBERS_ALIGN_RIGHT  
    +
    + + + + + + + + + + + + + + + + + + +
    Endnotes page numberingMisc
    ENDNOTES_FIRST_PAGENUMBERENDNOTES_NO_COLUMNS
    ENDNOTES_PAGENUM_STYLE*SINGLESPACE_ENDNOTES**
    ENDNOTES_NO_FIRST_PAGENUM 
    +

    +*I.e. the format of page numbering (digits, roman, letters) +
    +**Applies to PRINTSTYLE TYPEWRITE only + +

    Margin notes

    + + + + + + + + + + +
    InitializeStart
    MN_INITMN
    + +

    Line numbering

    + + + + + + + + + + + + +
    TextQuotesBlockquotes
    NUMBER_LINESNUMBER_QUOTE_LINESNUMBER_BLOCKQUOTE_LINES
    + +

    References

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Begin/end refsFootnote refsEndnote refsEmbedded refs
    REFFOOTNOTE_REFSENDNOTE_REFSREF( / REF)
       REF( / REF)
       REF[ / REF]
       REF{ / REF}
    + +

    Bibliographies

    + + + + + + + + + + +
    Start bibliography pageBibliography type
    BIBLIOGRAPHYBIBLIOGRAPHY_TYPE
    + +

    Table of contents

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    GenerateGeneral +
    + type-style control +
    TOC title string* +
    + and style control +
    TOCTOC_FAMILYTOC_HEADER_STRING
     TOC_PT_SIZETOC_HEADER_FAMILY
     TOC_LEADTOC_HEADER_FONT
      TOC_HEADER_SIZE
      TOC_HEADER_QUAD
    +

    +*By default, "Table of Contents" + +

    Designing a table of contents +
    +(if you want to change the defaults) +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Title entriesHead entriesSubhead entries
    TOC_TITLE_ENTRYTOC_HEAD_FAMILYTOC_SUBHEAD_FAMILY
    TOC_APPENDS_AUTHORTOC_HEAD_FONTTOC_SUBHEAD_FONT
    TOC_TITLE_FAMILYTOC_HEAD_SIZETOC_SUBHEAD_SIZE
    TOC_TITLE_FONTTOC_HEAD_INDENTTOC_SUBHEAD_INDENT
    TOC_TITLE_SIZE  
    TOC_TITLE_INDENT  
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Parahead entriesPage number entriesPaginationMisc
    TOC_PARAHEAD_FAMILYTOC_PN_FAMILYPAGINATE_TOCTOC_RV_SWITCH
    TOC_PARAHEAD_FONTTOC_PN_FONTTOC_PAGENUM_STYLE* 
    TOC_PARAHEAD_SIZETOC_PN_SIZE  
    TOC_PARAHEAD_INDENTTOC_PADDING  
    +

    +*I.e. the format of page numbering (digits, roman, letters) + +

    Finis

    + + + + + + + + + + + + + + +
    MacroType style control
    FINISFINIS_COLOR
    FINIS_STRING 
    + +

    Headers and footers

    +

    +Mom treats all aspects of headers and footers +identically. The only difference between the two is whether the +information they contain appears at the top of the page or at the +bottom. Consequently, in the following, substitute FOOTERS +for HEADERS, and FOOTER_ for HEADER_ if you're hunting down how to +do something with footers. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MacroPlacementUser-defined headersGeneral +
    + type-style control +
    HEADERSHEADER_MARGINHEADER_RECTOHEADER_FAMILY
     HEADER_GAPHEADER_VERSOHEADER_SIZE
       HEADER_COLOR
       HEADER_PLAIN
    + +

    Part-by-part control of headers

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    LeftCenterRight
    HEADER_LEFTHEADER_CENTERHEADER_RIGHT
    HEADER_LEFT_FAMILYHEADER_CENTER_FAMILYHEADER_RIGHT_FAMILY
    HEADER_LEFT_FONTHEADER_CENTER_FONTHEADER_RIGHT_FONT
    HEADER_LEFT_SIZEHEADER_CENTER_SIZEHEADER_RIGHT_SIZE
    HEADER_LEFT_COLORHEADER_CENTER_COLORHEADER_RIGHT_COLOR
    HEADER_LEFT_CAPSHEADER_CENTER_CAPSHEADER_RIGHT_CAPS
     HEADER_CENTER_PAD 
    +
    + + + + + + + + + + + + + + + + + + +
    Separator ruleMisc
    HEADER_RULEREVISION_STRING
    HEADER_RULE_GAPDRAFT_STRING
    HEADER_RULE_COLOR 
    + +

    Footers

    +

    +This is the one exception to the "HEADER also means FOOTER" +convention used throughout the documentation. + + + + + +
    FOOTER_ON_FIRST_PAGE
    + +

    Covers and doc covers

    + + + + + + + + + + + + + + +
    CoversDoc covers
    COVERDOC_COVER
    COVERSDOC_COVERS
    + + +

    Customizing covers and doc covers

    + + + + + + + + + + + + + + + + + + + + + + +
    CoversDoc covers
    COVERTITLEDOC_COVERTITLE
    COVER_ADVANCEDOC_COVER_ADVANCE
    COVER_FAMILYDOC_COVER_FAMILY
    COVER_LEADDOC_COVER_LEAD
    + +

    Part-by-part control of covers and doc covers

    + +

    +For part-by-part control of the family, font, size and color, please +see + + + + + + + + +
    Control macros--changing the defaults for covers and document covers
    Index of cover and doc cover control macros
    + +

    Miscellaneous

    + + + + + + + + + + + + +
    Output a blank pageCollate multiple +
    documents
    Get leading back +
    on track
    BLANKPAGECOLLATESHIM
    + +
    +
    + +Next   +Prev   +Top   +Back to Table of Contents
    AAvant Garde
    BM Bookman
    HHelvetica +
    HNHelvetica Narrow
    NNew Century Schoolbook
    PPalatino
    TTimes Roman
    ZCMZapf Chancery

    The argument you pass to FAMILY is the identifier at -left above. For example, if you want Helvetica, enter +left, above. For example, if you want Helvetica, enter

     	.FAMILY H
     
    -NOTE: The font macro -(FT) lets you to specify both the type family +NOTE: The +font macro +(FT) lets you specify both the type family and the desired font with a single macro. While this saves a few keystrokes, I recommend using FAMILY for family, and FT for font, except where doing so is genuinely -inconvenient. +inconvenient. ZCM, for example, only exists in one +style: Italic (I). Therefore, .FT ZCMI +makes more sense than setting the family to "ZCM", then +setting the font to "I". +

    + +ADDITIONAL NOTE: As of mom, version +1.1.9-a, if you are running a version of groff lower +than 1.19.2, you MUST follow all FAMILY +requests with a FT request, otherwise +mom will set all type up to the next +FT request in the +fallback font. +

    +If you are running a version of groff greater than or equal +to 1.19.2, when you invoke the FAMILY macro, +mom "remembers" the font style (Roman, +Italic, etc) currently in use (if the font style exists in the new +family) and will continue to use the same font style in the new +family. For example: +

    +

    +	.FAMILY BM   \" Bookman family
    +	.FT     I    \" Medium Italic
    +	<some text>  \" Bookman Medium Italic
    +	.FAMILY H    \" Helvetica family
    +	<more text>  \" Helvetica Medium Italic
    +
    + +However, if the font style does not exist in the new family, +mom will set all subsequent type in the +fallback font +(by default, Courier Medium Roman) until she encounters a +.FT +request that's valid for the family. For example, assuming +you don't have the font "Medium Condensed Roman" +(mom extension "CD") +in the Helvetica family: +

    +

    +	.FAMILY UN    \" Univers family
    +	.FT     CD    \" Medium Condensed
    +	<some text>   \" Univers Medium Condensed
    +	.FAMILY H     \" Helvetica family
    +	<more text>   \" Courier Medium Roman!
    +
    + +In the above example, you must follow .FAMILY H with a +FT request that's valid for Helvetica.

    Experts:
    If you add other PostScript families to groff's /font/devps directory, -be sure to follow the groff standard for naming families and fonts. +I recommend following the groff standard for naming families and fonts. For example, if you add the Garamond family, name the font files

    @@ -632,54 +694,180 @@ GARAMOND then becomes a legal family name you can pass to
     FAMILY.  (You could, of course, shorten GARAMOND to just
     G, or GD.)  R, I, B, and BI after GARAMOND are the roman, italic,
     bold and bold-italic fonts respectively.
    -
    +

    +Please see the Appendices, +Adding PostScript fonts to groff, +for information on adding fonts and families to groff, as well as +to see a list of the extensions mom provides to +groff's basic R, I, B, BI styles. +


    Font


    -Macro: FT R | I | B | BI +Macro: FT R | I | B | BI | <any other valid font style>

    -FT takes one of four possible arguments specifying the -desired font: +By default, groff permits FT to take one of four +possible arguments specifying the desired font: - +
    R = roman -
    I = italic -
    B = bold -
    BI = bold-italic
    R = (Medium) Roman +
    I = (Medium) Italic +
    B = Bold (Roman) +
    BI = Bold Italic

    -For example, if your family is Helvetica, entering +For example, if your +family +is Helvetica, entering

     	.FT B
     
    -will give you the Helvetica bold font. If your family were -Palatino, you'd get the Palatino bold font. +will give you the Helvetica bold +font. +If your family were Palatino, you'd get the Palatino bold font.

    -You can specify both family and font in the FT macro. -As an example, +(As of mom, version 1.1.9-a, the range of arguments +that can be passed to FT has been considerably +extended, allowing access to a greater variety of font +weights +and +shapes. +Please see the +NOTE, +below.) +

    +How mom reacts to an invalid argument to +FT depends on which version of groff you're using. +If your groff version is greater than or equal to 1.19.2, +mom will issue a warning and, depending on how +you've set up the +fallback font, +either continue processing using the fallback font, or abort +(allowing you to correct the problem). If your groff version is less +than 1.19.2, mom will silently continue processing, +using either the fallback font or the font that was in effect prior +to the invalid FT call. +

    +FT will also accept, as an argument, a full +family+font name. For example,

     	.FT HB
     
    -sets the font to Helvetica bold. I strongly recommend keeping -family and font separate. +will set subsequent type in Helvetica Bold. However, I strongly +recommend keeping family and font separate except where doing so is +genuinely inconvenient.

    -Fonts can also be changed inline. See +For inline control of fonts, see Inline Escapes, font control. +

    + +NOTE: mom, versions 1.1.9-a and higher, +considerably extends the range of arguments you can pass to +FT, making it more convenient to add and access +fonts of differing +weights +and +shapes +within the same family. Have a look +here +for a list of the weight/style arguments mom +allows. +

    +Be aware, though, that you must have the fonts, correctly +installed and named, in order to use the arguments. (See +How to create a PostScript font for use with groff +for how to add fonts to groff.) Please also read the +ADDITIONAL NOTE +found in the description of the FAMILY macro. +

    + + + +


    +

    Fallback font


    +Macro: FALLBACK_FONT <fallback font> [ ABORT | WARN ] | ABORT | WARN + +

    +In the event that you pass an invalid argument to +.FAMILY +(i.e. a non-existent family), mom, by default, uses +the fallback font, Courier Medium Roman (CR), in order to continue +processing your file. +

    +If you'd prefer another fallback font, pass +FALLBACK_FONT the full family+font name +of the font you'd like. For example, if you'd rather the +fallback font were Times Roman Medium Roman, + +

    +	.FALLBACK_FONT TR
    +
    +

    +would do the trick. +

    +Additionally, if your version of groff accepts accepts "if +F" and "if S" (see +above), +mom issues a warning whenever a +font style set with +.FT +does not exist, either because you haven't registered the style +(see +here +for instructions on registering styles), or because the font style +does not exist in the current family set with +.FAMILY. +By default, mom then aborts, which allows you to +correct the problem. +

    +If you'd prefer that mom not abort on non-existent +fonts, but rather continue processing using a fallback font, +you can pass FALLBACK_FONT the argument +WARN, either by itself, or in conjunction with your +chosen fallback font. +

    +Some examples of invoking FALLBACK_FONT: +
    +

      +
    • .FALLBACK_FONT WARN +
      + mom will issue a warning whenever you try + to access a non-existent font but will continue processing + your file with the default fallback font, Courier Medium Roman. +
    • .FALLBACK_FONT TR WARN +
      + mom will issue a warning whenever you try + to access a non-existent font but will continue processing + your file with a fallback font of Times Roman Medium Roman; + additionally, "TR" will be the fallback font whenever + you try to access a family that does not exist. +
    • .FALLBACK_FONT TR ABORT +
      + mom will abort whenever you try to access a + non-existent font, and will use the fallback font + "TR" whenever you try to access a family + that does not exist. +
    +

    +If, for some reason, you want to revert to ABORT, just enter +.FALLBACK_FONT ABORT and mom will once +again abort on font errors. +


    Point size of type


    -Macro: PT_SIZE <size of type in points> +Macro: PT_SIZE <size of type in points>
    *Does not require a unit of measure @@ -714,14 +902,27 @@ then later reset it to 12 with The size of type can also be changed inline. See Inline Escapes, changing point size. -
    +

    +NOTE: It is unfortunate that the pic +pre-processor uses PS, and thus +mom's macro for setting point sizes can't use it. +However, if you aren't using pic, you might want to +alias PT_SIZE as PS, since +there'd be no conflict. +

    +

    +	.ALIAS PS PT_SIZE
    +
    + +would allow you to set point sizes with .PS. +


    Line spacing/leading


    -Macro: LS <distance between lines> +Macro: LS <distance between lines>
    *Does not require a unit of measure @@ -767,14 +968,14 @@ then later reset it to 14 points with ls. LS acts like vs. mom does not provide a macro analogous to ls. -
    +


    Automatic line spacing


    -Macro: AUTOLEAD <amount of automatic leading> [FACTOR] +Macro: AUTOLEAD <amount of automatic leading> [FACTOR]
    *Does not require a unit of measure @@ -822,14 +1023,14 @@ to 14, the leading automatically changes to 15.75 (14 x 1.125). NOTE: There's no need to prepend a plus sign (+) to AUTOLEAD's argument, although you may do so if you wish. -
    +


    Line length


    -Macro: LL <line length> +Macro: LL <line length>
    *Requires a unit of measure @@ -855,11 +1056,37 @@ As with other macros that require a unit of measure, the argument to sets the line length to 4-1/2 inches. +

    +Additionally, you may express a new line length relative to the +current line length by prepending a plus or minus sign to the +argument. Thus, if you wanted to increase the line length by 3 +points, you could +do +

    +

    +	.LL +3p
    +
    + +This is especially handy when you want to "hang" +punctuation outside the right margin since you can pass groff's +\w +escape as the argument to LL, like this: +

    +

    +	.LL +\w'.'u
    +
    + +The above example increases the current line length by the width of +a period. Notice that you must append the +unit of measure, +u, to the escape since .LL requires a unit of +measure. +

    NOTE: The right margin macro (R_MARGIN) can also be used to set line length. -
    +


    @@ -873,34 +1100,39 @@ length. The justification and quadding macros deal with how type aligns along the left and right margins. In a nutshell, type either aligns at the left margin, at the right margin, at both margins, or at neither margin -(centered). +(centred).

    These macros also determine whether or not -input lines are joined and -filled during output. +input lines +are joined and +filled +during output.

    Additionally, macros that deal with how to break -output lines are covered in this -section, as is the -inline escape for joining output lines. +output lines +are covered in this section, as is the +inline escape +for joining input lines.

    You may encounter some words here that are unfamiliar. Refer to -Typesetting terms and -Groff terms for an explanation. +Typesetting terms +and +Groff terms +for an explanation.

    Justification, quad, fill, and break macro list

    - +

    • Fill modes
      • JUSTIFY (set lines justified) -
      • QUAD (set filled lines flush left, right or centered) +
      • QUAD (set filled lines flush left, right or centred)
    • Nofill modes
      • LEFT (set non-filled lines flush left)
      • RIGHT (set non-filled lines flush right) -
      • CENTER (set non-filled lines centered) +
      • CENTER (set non-filled lines centred)
    • Breaking lines
        @@ -909,7 +1141,8 @@ You may encounter some words here that are unfamiliar. Refer to
      • SPACE (break a line and add space before the next output line)
      • SPREAD (break and force-justify an output line)
      -
    • Joining lines +
    • Joining input lines in + nofill mode
      • \c inline escape
      @@ -935,14 +1168,14 @@ upon output. To break lines and prevent them from being filled and justified, use the BR macro. -
      +


      -

      Quad lines left, right, or center

      +

      Quad lines left, right, or centre


      -Macro: QUAD L | LEFT | R | RIGHT | C | CENTER | J | JUSTIFY +Macro: QUAD L | LEFT | R | RIGHT | C | CENTER | J | JUSTIFY
      Alias: FILL
      @@ -963,7 +1196,7 @@ along the left margin. If R or RIGHT, type is set flush along the right margin.

      -If C or CENTER type is set centered +If C or CENTER type is set centred on the current line length.

      J and JUSTIFY justify text, @@ -974,12 +1207,12 @@ href="#JUSTIFY">JUSTIFY.

      To break lines and prevent them from being filled, use the BR macro. -
      +


      -

      Set non-filled lines flush left, right, or centered

      +

      Set non-filled lines flush left, right, or centred


      Macro: LEFT   Macro: RIGHT @@ -1029,7 +1262,7 @@ modes, groff does not always respect the current line length. that run long may exceed it, or get broken in undesirable ways. Therefore, when using these three macros, you should preview your work to ensure that all lines fit as expected. -
      +

      @@ -1069,7 +1302,7 @@ ALL macros cause a break. If a break is not desired, use the

      Experts: BR is an alias for br. You can use either, or mix 'n' match with impunity. -
      +

      @@ -1077,7 +1310,25 @@ You can use either, or mix 'n' match with impunity.

      Manually break a line without advancing on the page


      Macro: EL - +
      +*In nofill modes (LEFT, RIGHT, CENTER), you must terminate the +line input preceding EL with the \c inline +escape. See +NOTES, +below. +
      +*If you find remembering whether to put in the \c +bothersome, you may prefer to use the +inline escape +alternative to +.EL, +\*[B], +which works consistently regardless of the fill mode. +
      +*EL does not work after the PAD macro. +See +PAD +for the way around this
      .

      The mnemonic "EL" is borrowed from old Compugraphic typesetting systems, where it stood for "End Line." Conceptually, @@ -1088,11 +1339,14 @@ with no linefeed. Note to groff jocks: EL is unrelated to groff's .el. If you find the similarity confusing, you may want to alias EL as -EOL. +something else (but don't use EOL; it's already +taken.)

      EL's function is simple: it breaks a line without -advancing on the page. As an example of where you might use it, +advancing on the page. +As +an example of where you might use it, imagine that you're working from marked-up copy. The markup indicates 24 points of space between two given lines, but the prevailing line spacing is 12.5 points. You may find it more @@ -1102,16 +1356,18 @@ instead of calculating the lead that needs to be added to 12.5 to get 24. To demonstrate:

      +	.LEFT
       	.LS 12.5
      -	A line of text.
      +	A line of text.\c
       	.EL
       	.ALD 24p
       	The next line of text.
       
      -may be more instuitive than +may be more intuitive than

      +	.LEFT
       	.LS 12.5
       	A line of text.
       	.ALD 11.5p
      @@ -1127,46 +1383,49 @@ you don't have to recalculate the extra space.
       from Compugraphic), which is covered in the section
       Vertical movement.
       

      -IMPORTANT: -EL does not work as advertised on the last +NOTES: +

      +In versions of mom prior to 1.1.9, EL did not +always work as advertised on the last output line -of pages that contain a footer trap (e.g. one set with +of pages that contained a footer trap (e.g. one set with B_MARGIN or in documents formatted using the document processing macros). -The reason is that the EL macro itself deposits -a line break that trips the trap (hey, I like that -- -"trips the trap"), and once the trap has been sprung, -mom can't recover. She places the line after -the EL on the next page.

      -If you need EL functionality on the last line of -a page with a footer trap, turn the trap off with -TRAP, -as in this example: +EL has been re-written so that this should no longer be the +case. However, in order for it to work in the +nofill +modes +(LEFT, +RIGHT +or +CENTER), +you must always "join" .EL to the line +before it using the +\c +inline escape, +like this:

      -	3.
      -	.TRAP OFF
      +	.LEFT
      +	A line I don't want to advance\c
       	.EL
      -	.TRAP
      -	\*[FP12]Establish, once and for all, if 42 really is the answer.
       
      -The above looks something like this upon output: +Conversely, in +fill modes +(QUAD LEFT, +QUAD RIGHT, +QUAD CENTER +or +JUSTIFY), +the \c must not be used.

      -

      -	3.  Establish, once and for all, if 42 really is the answer.
      -
      - -with "3." flush at the left margin, and "Establish, -once and for all..." on the same line as "3." but -starting 12 points in from the left margin. -

      -If you hadn't turned the trap off for .EL, -"3." would have appeared at the bottom of the page by -itself, with "Establish, once and for all..." -appearing at the top of the next page. +If EL is used after most macros or groff +primitives +(see the exception, below), you don't have to worry about this, +regardless of the fill mode. Just type .EL
      @@ -1174,15 +1433,17 @@ appearing at the top of the next page.


      Break lines and add space between


      -Macro: SPACE <space to add between lines> +Macro: SPACE <space to add between lines>
      Alias: SP

      SPACE breaks a line, just like BR, then adds space after the line. With no -argument, it adds an extra line space. If you pass it a numeric -argument without supplying a +argument, it adds an extra line space of a value equal to the +current +leading. +If you pass it a numeric argument without supplying a unit of measure, it advances that number of extra line spaces. For example:

      @@ -1200,15 +1461,18 @@ breaks the line and adds two extra linespaces.

      If you supply a unit of measure, SPACE breaks the -line then adds the specified amount of extra space to the current -linespace, as in +line then advances one linespace (at the current +leading) +PLUS the specified amount of extra space given to +SPACE, +as in

       	.SPACE 6p
       
      -which breaks the line then adds six points of space to the current -linespace. +which breaks the line and advances one full linespace plus six +points.

      SUGGESTION: SPACE and @@ -1225,7 +1489,7 @@ after a line.

      Experts: SPACE is an alias of sp. You can use either, or mix 'n' match with impunity. -
      +

      @@ -1248,7 +1512,7 @@ and have it came out fully justified.

      Experts: SPREAD is an alias for brp. You can use either, or mix 'n' match with impunity. -
      +

      @@ -1300,7 +1564,18 @@ words of the output line would read Please also note that had the example been in one of the fill modes, there'd have been no need for the \c. -
      +

      +Addendum: The example, above, is designed to +demonstrate the use of \c. However, an easier and +more intuitive way to accomplish the family/font change in the +example would be with the groff +inline escape, +\f. +

      +

      +	Some lines of text to be \f[HB]joined\*[PREV] together.
      +
      +


      @@ -1318,7 +1593,6 @@ ensuring that your documents look typographically professional.

      Typographic refinements macro list

      -
      • Word and sentence spacing
          @@ -1348,7 +1622,7 @@ ensuring that your documents look typographically professional.

          Word spacing


          -Macro: WS <+|-wordspace> | DEFAULT +Macro: WS <+|-wordspace> | DEFAULT

          WS (Word Space) increases or decreases the amount @@ -1412,14 +1686,14 @@ its groff default by entering This can be particularly useful if you've been playing around with plus and minus values, and can't remember by how much you have to in/decrease the word space to get it back to normal. -
          +


          Sentence space


          -Macro: SS <+sentence space> | 0 | DEFAULT +Macro: SS <+sentence space> | 0 | DEFAULT

          SS (Sentence Space) tells groff how to treat double @@ -1486,22 +1760,22 @@ school of typists that puts two spaces between sentences. If you ignore this advice and use SS when you habitually put only one space between sentences, you risk producing output where the space between sentences is not equal. -
          +


          Automatic hyphenation control


          -Macro: HY toggle +Macro: HY toggle
          -Macro: HY LINES <max. number of consecutive hyphenated lines> +Macro: HY LINES <max. number of consecutive hyphenated lines>
          -Macro: HY MARGIN <size of hyphenation margin> +Macro: HY MARGIN <size of hyphenation margin>
          -Macro: HY SPACE <extra interword spacing to prevent hyphenation> +Macro: HY SPACE <extra interword spacing to prevent hyphenation>
          -Macro: HY DEFAULT +Macro: HY DEFAULT
          Aliases: HYPHENATE, HYPHENATION @@ -1514,8 +1788,6 @@ you can pass to HY, I've broken them down into separate sections.

          1. HY

          - -

          HY by itself (i.e. with no argument) simply turns automatic hyphenation on. Any argument other than LINES, MARGIN, SPACE or DEFAULT, turns automatic @@ -1534,15 +1806,13 @@ you could turn HY off by entering HY observes the following default hyphenation rules:

            -
          1. Last lines (i.e. ones that will spring a trap -- typically +
          2. Last lines (i.e. ones that will spring a trap--typically the last line on a page) will not be hyphenated.
          3. The first and last two characters of a word are never split off.

          2. HY LINES

          - -

          HY LINES sets the maximum number of consecutive hyphenated lines that will appear in output copy. 2 is a very good choice, and you'd set it with @@ -1561,8 +1831,6 @@ count when groff is figuring out how many lines to hyphenate; explicit hyphens do not.

          3. HY MARGIN

          - -

          HY MARGIN sets the amount of room allowed at the end of a line before hyphenation is tripped (e.g. if there's only 6 points left at the end of a line, groff won't try to hyphenate @@ -1585,8 +1853,6 @@ MARGIN requires a unit of measure.

          4. HY SPACE

          - -

          HY SPACE sets an amount of extra interword space that groff will try to put between words on a line in order to PREVENT hyphenation. HY SPACE @@ -1606,19 +1872,15 @@ value might be half a point, or one point, which you'd set with SPACE requires a unit of measure. -

          4. HY DEFAULT

          - -

          +

          5. HY DEFAULT

          HY DEFAULT resets automatic hyphenation to its default behaviour, cancelling any changes made with LINES, MARGIN, and/or SPACE.

          A note on hyphenation in general

          - -

          Hyphenation is a necessary evil. If it can be avoided, it should be. If it can't be, it should occur infrequently. That's the reason for -number of parameters you can set with HY. +the number of parameters you can set with HY.

          Furthermore, hyphenation in @@ -1629,14 +1891,14 @@ on consecutive lines to achieve a pleasing, natural-looking rag. Since such adjustments are often too fussy for document processing, I recommend playing around with HY MARGIN a bit if your copy looks hyphen-heavy. -
          +


          Set hyphenation parameters all at once


          -Macro: HY_SET <lines> [ <margin> [ <space> ] ] +Macro: HY_SET <lines> [ <margin> [ <space> ] ]
          Alias: HYSET @@ -1678,14 +1940,14 @@ copy,
      is how you'd do it. -
      +


      Reduce whitespace


      -Macro: RW <amount of whitespace reduction between letters> +Macro: RW <amount of whitespace reduction between letters>

      @@ -1716,30 +1978,40 @@ highly recommend previewing your work to assess the effect of

      -IMPORTANT: RW affects all +IMPORTANT: In versions prior to 1.1.9-a, +RW affected all fonts in the family -current at the time it's invoked. It must be reset to zero to -cancel its effect (.RW 0) on those fonts, or reinvoked -(possibly with a different value) if you change family. +current at the time it was invoked. As of 1.1.9-a, this behaviour +has been changed. RW affects only the font +current at the time it's invoked, and remains in effect for that +font every time the font is called, hence must be reset to zero to +cancel its effect (.RW 0) on that font.

      NOTE: By default, RW does not deposit a break -(BR) when it's invoked. If you want +(BR) when it's invoked if you're in one of the +fill +modes (i.e. +QUAD +L, R, C, J or +JUSTIFY). +If you want RW to break at the ends of the previous -input lines, -you can tell mom that's what you want by invoking the +input lines +while you're in a fill mode, tell mom +that's what you want by invoking the BR_AT_LINE_KERN toggle macro. -
      +


      Expand whitespace


      -Macro: EW <amount of whitespace expansion between letters> +Macro: EW <amount of whitespace expansion between letters>

      @@ -1762,42 +2034,71 @@ small decimal values when loosening lines. For example, may be just enough to open up a line without the change in letter spacing being obvious. I highly recommend previewing your work to assess the effect of EW. - +

      +IMPORTANT: In versions prior to 1.1.9-a, +EW affected all +fonts +in the +family +current at the time it was invoked. As of 1.1.9-a, this behaviour +has been changed. EW affects only the font +current at the time it's invoked, and remains in effect for that +font every time the font is called, hence must be reset to zero to +cancel its effect (.EW 0) on that font.

      NOTE: By default, EW does not deposit a break -(BR) when it's invoked. If you want +(BR) when it's invoked if you're in one of the +fill +modes (i.e. +QUAD +L, R, C, J or +JUSTIFY). +If you want EW to break at the ends of the previous -input lines, -you can tell mom that's what you want by invoking the +input lines +while you're in a fill mode, tell mom +that's what you want by invoking the BR_AT_LINE_KERN toggle macro. -
      +


      Break before line kerning


      -Macro: BR_AT_LINE_KERN toggle +Macro: BR_AT_LINE_KERN toggle

      -By default, mom does not break +By default, in +fill +modes (i.e. +QUAD +L, R, C, J or +JUSTIFY) +mom does not break input lines when you invoke RW or EW. -If you'd like mom to break input lines prior -to RW or EW, invoke -BR_AT_INPUT_LINE without any argument. To -disable the breaks, invoke BR_AT_INPUT_LINE -with any argument (OFF, QUIT, Q, X...), like -this +If you'd like her to break input lines prior to RW +or EW, invoke BR_AT_INPUT_LINE +without any argument. To disable the breaks, invoke +BR_AT_INPUT_LINE with any argument (OFF, +QUIT, Q, X...), like this

       	.BR_AT_LINE_KERN OFF
       	    or
       	.BR_AT_LINE_KERN X
       
      + +In QUAD L, R or C, +mom simply breaks the line. In QUAD J +(or JUSTIFY, which is the same thing), she breaks +and +force justifies +the line prior to EW or RW.
      @@ -1805,7 +2106,7 @@ this

      Automatic kerning


      -Macro: KERN toggle +Macro: KERN toggle

      @@ -1817,16 +2118,16 @@ off.

      Kerning of individual character pairs can be controlled with the inline escapes -\*[BU #] and \*[FU #]. See +\*[BU <n>] and \*[FU <n>]. See Inline Escapes, kerning. -
      +


      Automatic ligature generation


      -Macro: LIGATURES toggle +Macro: LIGATURES toggle
      Alias: LIG @@ -1845,7 +2146,7 @@ Good Thing, hence mom has them on by default. ligature generation off.

      NOTE: Not all fonts support ligatures. -
      +


      @@ -1863,7 +2164,7 @@ be missing an italic font, or a bold font. Or you might not be able to get your hands on a condensed family. That's where these macros and inline escapes come in. With them, you can fake the fonts you're missing. A word of caution, though: "faked" -fonts are just that -- faked. You should only use them as a +fonts are just that--faked. You should only use them as a last resort, and then only sparingly. A word or two or a line or two in a faked font will pass unnoticed; large patches of type in a faked font look typographically cheap. @@ -1876,8 +2177,8 @@ type in a faked font look typographically cheap.
      • Pseudo italic
          -
        • SETSLANT -- degree of pseudo-italicising -
        • \*[SLANT] -- inline escape for pseudo-italicising type +
        • SETSLANT -- degree of pseudo-italicizing +
        • \*[SLANT] -- inline escape for pseudo-italicizing type
      • Pseudo bold
          @@ -1899,12 +2200,12 @@ type in a faked font look typographically cheap.
          -

          Set degree of slant for pseudo-italicising

          +

          Set degree of slant for pseudo-italicizing


          -Macro: SETSLANT <degrees to slant type> | RESET +Macro: SETSLANT <degrees to slant type> | RESET

          -Pseudo-italicising of type is accomplished by slanting a roman font +Pseudo-italicizing of type is accomplished by slanting a roman font a certain number of degrees to the right. SETSLANT lets you fix the number of degrees. Mom's default is 15, which produces an acceptable approximation of an @@ -1923,12 +2224,12 @@ to the mom default, do

    NOTE: By itself, SETSLANT -will not start pseudo-italicising type; it merely tells +will not start pseudo-italicizing type; it merely tells mom what degree of slant you want. To start -pseudo-italicising, use the +pseudo-italicizing, use the inline escape \*[SLANT]. -
    +

    @@ -1940,7 +2241,7 @@ Inline: \*[SLANT] -- turn pseudo-italic on Inline: \*[SLANTX] -- turn pseudo-italic off

    -\*[SLANT] begins pseudo-italicising type. +\*[SLANT] begins pseudo-italicizing type. \*[SLANTX] turns the feature off. Both are inline escapes, therefore they should not appear as separate lines, but rather @@ -1950,7 +2251,7 @@ be embedded in text lines, like this: Not \*[SLANT]everything\*[SLANTX] is as it seems. -Alternatively, if you wanted the whole line pseudo-italicised, +Alternatively, if you wanted the whole line pseudo-italicized, you'd do

    @@ -1968,14 +2269,14 @@ with
     mom underlines pseudo-italics by default.  To
     change this behaviour, use the special macro
     SLANT_MEANS_SLANT.
    -
    +


    Set amount of emboldening


    -Macro: SETBOLDER <amount of emboldening, in machine units> | RESET +Macro: SETBOLDER <amount of emboldening, in machine units> | RESET

    Emboldening of type is accomplished by printing characters @@ -2004,7 +2305,7 @@ will not start emboldening type; it merely tells To start emboldening, use the inline escape \*[BOLDER]. -
    +

    @@ -2043,14 +2344,14 @@ with PRINTSTYLE TYPEWRITE, mom ignores \*[BOLDER] requests. -
    +


    Set percentage for pseudo-condensed type


    -Macro: CONDENSE <pseudo-condense percentage> +Macro: CONDENSE <pseudo-condense percentage>

    Pseudo-condensing of type is accomplished by reducing the width of @@ -2084,7 +2385,7 @@ is off (with \*[CONDX]) before before making any changes to the pseudo-condense percentage with CONDENSE. -
    +

    @@ -2127,14 +2428,14 @@ with PRINTSTYLE TYPEWRITE, mom ignores \*[COND] requests. -
    +


    Set percentage for pseudo-extended type


    -Macro: EXTEND <pseudo-extend percentage> +Macro: EXTEND <pseudo-extend percentage>

    Pseudo-extending of type is accomplished by increasing the width of @@ -2148,7 +2449,7 @@ to be extended. EXTEND, therefore you must set it before using the inline escape \*[EXT]. -120 percent of the normal character width is a good value, and +120% of the normal character width is a good value, and you'd set it like this:

    @@ -2169,7 +2470,7 @@ pseudo-extending is off (with
     \*[EXTX])
     before before making any changes to the pseudo-extend percentage
     with EXTEND.
    -
    +

    @@ -2212,7 +2513,7 @@ with PRINTSTYLE TYPEWRITE, mom ignores \*[EXT] requests. -
    +


    @@ -2240,7 +2541,7 @@ relative to the current

    Advance Lead (move downward)


    -Macro: ALD <distance to move downward> +Macro: ALD <distance to move downward>
    *Requires a unit of measure @@ -2291,14 +2592,14 @@ way if you have set a top margin with T_MARGIN or PAGE. -
    +


    Reverse Lead (move upward)


    -Macro: RLD <distance to move upward> +Macro: RLD <distance to move upward>
    *Requires a unit of measure @@ -2328,7 +2629,7 @@ As the mnemonic (Rdvance use RLD with points of lead. -
    +


    @@ -2345,26 +2646,32 @@ do with the tab key on your keyboard, and both are utterly divorced from groff's notion of tabs. I recommend reading this section carefully in order to understand how mom handles tabs. +

    +NOTE: see the section +Using typesetting macros during document processing +for re-assuring information on the use of tabs during +document processing. +

    Typesetting tabs

    Typesetting tabs are defined by both an indent from the left margin and a line length. This is quite different from typewriter-style tab stops (the groff norm) that only define the left indent. In conjunction -with the multi-column macros, typesetting tabs significantly facilitate +with the +multi-column macros, +typesetting tabs significantly facilitate tabular and columnar work.

    -Typesetting tabs are created with the TAB_SET +Typesetting tabs are created with the +TAB_SET macro. TAB_SET identifies the tab (by number), establishes its left indent and line length, and optionally sets a quad direction and fill mode. After tabs have been created with TAB_SET, they can be called at any time with the -TAB macro. +TAB +macro.

    -NOTE: see the section -Typesetting Macros in Document Processing -for information and advice on using tabs with the -document processing macros.

    Quickie tutorial on typesetting tabs

    @@ -2411,7 +2718,7 @@ You want the second tab ("EVALUATION")

    • to begin 8 picas from the left margin
    • to have a length of 9 picas -
    • to be set centered. +
    • to be set centred.

    You set it up like this: @@ -2523,13 +2830,17 @@ tab 3 means you don't have to worry about the length of mom fills the tab and sets the type flush left. - +

    String tabs (autotabs)

    -String tabs let you mark off tab positions inline. Left indents -and line lengths are calculated from the beginning and end positions of -the marks. This is especially useful when tab indents and lengths -need to be determined from the text that goes in each tab. +String tabs let you mark off tab positions with +inline escapes +embedded in +input lines. +Left indents and line lengths are calculated from the beginning and +end positions of the marks. This is especially useful when tab +indents and lengths need to be determined from the text that goes in +each tab.

    Setting up string tabs is a two-step procedure. First, you enter an input line in which you mark off where you want tabs to begin and end. @@ -2550,10 +2861,10 @@ In combination with the macro and the groff inline escape \h (move horizontally across the page) or mom's -\*[FP#] -(Forward Points) inline, string tabs provide +\*[FWD <distance>] +(move forward) inline, string tabs provide tremendous flexibility in setting up complex tab structures. - +

    Quickie tutorial on string tabs

    Say you want to set up tabs for the @@ -2577,8 +2888,12 @@ The first thing you need for string tabs is an input line with tab positions marked on it. Tabs are marked with the inline escapes -\*[ST#] and \*[ST#X]. (In this -example, we enclose the input line with the +\*[ST<n>] +and +\*[ST<n>X], +where <n> +is the number you want the tab to have. (In this example, we +enclose the input line with the SILENT macro so the line doesn't print. We also use the PAD @@ -2589,7 +2904,7 @@ The setup looks like this:

     	.SILENT
    -	.PAD "\*[ST1]CRITERION\*[ST1X]\*[FP12]\*[ST2]EVALUATION\*[ST2X]\*[FP12]\*[ST3]#\*[ST3X]"
    +	.PAD "\*[ST1]CRITERION\*[ST1X]\*[FWD 12p]\*[ST2]EVALUATION\*[ST2X]\*[FWD 12p]\*[ST3]#\*[ST3X]"
     	.SILENT OFF
     
    @@ -2603,10 +2918,10 @@ Here's what it means when broken down into its component parts: \*[ST1]CRITERION\*[ST1X]
  • We want a 1 pica (12 points) gutter between tab 1 and 2, - so we insert 12 points of space with \*[FP12] - (Forward Points 12): + so we insert 12 points of space with \*[FWD 12p] + (ForWarD 12 points):

    - \*[FP12] + \*[FWD 12p]

  • The longest line in tab 2 is "EVALUATION", so we enclose EVALUATION with begin/end markers for string @@ -2615,9 +2930,9 @@ Here's what it means when broken down into its component parts: \*[ST2]EVALUATION\*[ST2X]
  • We want 1 pica (12 points) between tab 2 and 3, so we - insert 12 points of space with another \*[FP12]: + insert 12 points of space with another \*[FWD 12p]:

    - \*[FP12] + \*[FWD 12p]

  • We want tab 3 to be as long as whatever space remains on the current line length, so we enclose the @@ -2656,7 +2971,7 @@ just like typesetting tabs (see typesetting tabs tutorial).

    Here's the complete setup and entry for the sample employee -evaluation form utilising string tabs. +evaluation form utilizing string tabs.

     	.PAGE 8.5i 11i 1i 1i 1i
    @@ -2669,7 +2984,7 @@ evaluation form utilising string tabs.
     	.HY OFF
     	.SS 0
     	.SILENT
    -	.PAD "\*[ST1]CRITERION\*[ST1X]\*[FP12]\*[ST2]EVALUATION\*[ST2X]\*[FP12]\*[ST3]#\*[ST3X]"
    +	.PAD "\*[ST1]CRITERION\*[ST1X]\*[FWD 12p]\*[ST2]EVALUATION\*[ST2X]\*[FWD 12p]\*[ST3]#\*[ST3X]"
     	.SILENT OFF
     	.ST  1  L
     	.ST  2  L
    @@ -2717,11 +3032,11 @@ it again.  You'll see that the tab structure remains identical (tab
     between tabs is still 1 pica), while the position and length 
     of the tabs have altered because of the new point size.
     

    -Now try increasing the gutters to 2 picas (put an additional -\*[FP12] after each \*[FP12]). Preview the +Now try increasing the gutters to 2 picas (\*[FWD 24p] or +\*[FWD 2P] instead of \*[FWD 12p]). Preview the file again, and notice how the tab structure remains the same, but the gutters are wider. - +

    Tabs macro list

    @@ -2739,9 +3054,9 @@ the gutters are wider.
    -

    Set up typsetting tabs

    +

    Set up typesetting tabs


    -Macro: TAB_SET <tab number> <indent> <length> L | R | C | J [ QUAD ] +Macro: TAB_SET <tab number> <indent> <length> L | R | C | J [ QUAD ]
    *<indent> and <length> require a unit of measure @@ -2761,7 +3076,7 @@ four required arguments:
  • a direction
    -To set up a centered tab 6 picas long and 9 points from the left +To set up a centred tab 6 picas long and 9 points from the left margin, you'd enter

    @@ -2774,7 +3089,7 @@ need to set up tabs in numerical sequence.
     

    By default, tabs are in nofill -mode, meaning you can enter text in tabs on a line for line basis +mode, meaning you can enter text in tabs on a line-for-line basis without having to use the BR macro. If you want a tab to be @@ -2816,7 +3131,7 @@ up a tab structure within the confines of an existing tab). Indents) before setting up tabs with TAB_SET, or mom may get confused. -
    +

    @@ -2824,7 +3139,19 @@ before setting up tabs with TAB_SET, or

    Mark positions of string tabs


    Inlines: \*[ST<number>]...\*[ST<number>X] - +
    +*Quad +direction must be LEFT or JUSTIFY (see +QUAD +and +JUSTIFY) +or the +no-fill mode +set to +LEFT. +Please see +IMPORTANT, +below.

    String tabs need to be marked off with inline escapes @@ -2864,20 +3191,73 @@ printing, use the SILENT macro.

    -IMPORTANT: Do not try to set up string tabs on -a line that is broken with +IMPORTANT: +Owing to the way groff processes +input lines +and turns them into +output lines, +it is not possible for mom to "guess" the +correct starting position of string tabs marked off in lines that +are centered or set flush right. +

    +Equally, she cannot guess the starting position if a line is fully +justified and broken with SPREAD. -Mom calculates string tab positions and lengths -as she reads the input line, not after the line has undergone -manipulations to the word spacing. -
    +

    +In other words, in order to use string tabs, +LEFT +must be active, or, if +QUAD LEFT +or +JUSTIFY +are active, the line on which the string tabs are marked must be +broken "manually" with +BR +(but not +SPREAD). +

    +To circumvent this behaviour, I recommend using the +PAD +to set up string tabs in centered or flush right lines. Say, for +example, you want to use a string tab to underscore the text of a +centered line with a rule. Rather than this, +

    +

    +	.CENTER
    +	\*[ST1]A line of text\*[ST1X]\c
    +	.EL
    +	.ST 1
    +	.TAB 1
    +	.PT_SIZE 24
    +	.ALD 3p
    +	\*[RULE]
    +	.RLD 3p
    +	.TQ
    +
    + +you should do: +

    +

    +	.QUAD CENTER
    +	.PAD "#\*[ST1]A line of text\*[ST1X]#"
    +	.EL
    +	.ST 1
    +	.TAB 1
    +	.PT_SIZE 24
    +	.ALD 3p
    +	\*[RULE] \" Note that you can't use \*[UP ] or \*[DOWN] with \*[RULE]
    +	.RLD 3p
    +	.TQ
    +
    + +


    Set string tabs


    -Macro: ST <tab number> L | R | C | J [ QUAD ] +Macro: ST <tab number> L | R | C | J [ QUAD ]

    After string tabs have been marked off on an input line (see @@ -2911,14 +3291,14 @@ If you want it to be justified, enter See the Quickie tutorial on string tabs for a full explanation of setting up string tabs. -
    +


    Call tabs


    -Macro: TAB <tab number> +Macro: TAB <tab number>
    Alias: TB

    @@ -2980,7 +3360,7 @@ If you were happily zipping down the page with a left indent of 2 picas turned on, and you call a tab whose indent from the left margin is 6 picas, your new distance from the left margin will be 6 picas, not 6 picas plus the 2 pica indent. -
    +

    @@ -2989,6 +3369,21 @@ not 6 picas plus the 2 pica indent.
    Macro: TN
    +*In tabs that aren't given the QUAD argument when they're set up +with +TAB_SET +or +ST, you must terminate the line preceding +TN with the \c inline escape. See the +ADDITIONAL NOTE, +
    +*If you find remembering whether to put in the \c +bothersome, you may prefer to use the +inline escape +alternative to +.TN, +\*[TB+], +which works consistently regardless of the fill mode.

    TN moves over to the next tab in numeric @@ -2997,36 +3392,73 @@ sequence (tab n+1) without advancing on the page. See the in the description of the TAB macro for an example of how TN works.

    -NOTE: TN is like -EL -in that it doesn't work as advertised on the last line before a -footer trap is sprung. If you need to use TN -on the last line of a page with a footer trap, turn the trap off with -TRAP, -as in this example: +NOTE: You must put text in the +input line +immediately after TN. "Stacking" of +TN's is not allowed. In other words, you cannot +do +

    +

    +	.TAB 1
    +	Some text
    +	.TN
    +	Some more text
    +	.TN
    +	.TN
    +	Yet more text
    +
    + +The above example, assuming tabs numbered from 1 to 4, should be entered +

    +

    +	.TAB 1
    +	Some text
    +	.TN
    +	Some more text
    +	.TAB 4
    +	Yet more text
    +
    +

    +ADDITIONAL NOTE: +In versions of mom prior to 1.1.9, TN did not +always work as advertised on the last +output line +of pages that contained a footer trap (e.g. one set with +B_MARGIN +or in documents formatted using the +document processing macros). +

    +TN has been re-written so that this should no longer be the +case. However, in order for it to work in tabs that have not been +given a QUAD argument (see +TAB_SET +and +ST) +you must always "join" .TN to the line +before it using the +\c +inline escape, +as in the following example:

     	.TAB_SET 1 0  1P  L
     	.TAB_SET 2 1P 20P L
     	.TAB 1
    -	.TRAP OFF
    -	1.
    +	1.\c
     	.TN
     	The first rule of survival is "make and keep good friends."
    -	.TRAP
     
    -The above, at the bottom of a page, will look something like this: +When output, the example will look like this:

     	1.  The first rule of survival is "make and keep good friends."
     
    -If you hadn't turned the trap off before .TN, -"1." would have appeared as the last line on the page, -with "The first rule of survival..." being the first -line on the next page. -
    +Conversely, if you did give a QUAD argument +to TAB_SET or ST, the +\c must not be used. +

    @@ -3042,7 +3474,7 @@ advances 1 linespace, and restores the left margin, line length, quad direction and fill mode that were in effect prior to invoking any tabs. -
    +


    @@ -3123,7 +3555,7 @@ the COLUMNS macro in the document processing macros. - +

    Columns macro list

    @@ -3147,7 +3579,7 @@ Macro: MCO is the macro you use to begin multi-column setting. It marks the current baseline -as the top of your columns, for use late with +as the top of your columns, for use later with MCR. See the introduction to columns for an explanation of multi-columns and some sample @@ -3158,7 +3590,7 @@ the COLUMNS macro in the document processing macros. -
    +

    @@ -3173,14 +3605,14 @@ Once you've turned multi-columns on (with MCO), MCR, at any time, returns you to the top of your columns. -
    +


    Exit multi-columns


    -Macro: MCX [ <distance to advance below longest column> ] +Macro: MCX [ <distance to advance below longest column> ]
    *Optional argument requires a unit of measure @@ -3196,9 +3628,9 @@ below the longest column. Linespace, in this instance, is the in effect at the moment MCX is invoked.

    -If you pass the <distance> argument to +If you pass the <distance> argument to MCX, it advances 1 linespace below the longest -column (see above) PLUS the distance specified by the argumemnt. +column (see above) PLUS the distance specified by the argument. The argument requires a unit of measure; therefore, to advance an extra 6 points below where MCX would normally place you, you'd enter @@ -3223,7 +3655,7 @@ macro, like this: The above advances to precisely 24 points below the baseline of the longest column. -
    +


    @@ -3240,7 +3672,7 @@ provides temporary left indents (i.e. only one line is indented, as at the start of a paragraph) and "hanging" left indents (the reverse of a temporary indent; the first line isn't indented, subsequent lines are). - +

    A brief explanation of how mom handles indents

    Mom provides five kinds of indents: left, right, @@ -3373,7 +3805,7 @@ picas and control each separately, as in the following example. More text \"Text is still indented 4 picas left

    -If, at .IRX, you wanted the text afterward to have no +If, at .IRX, you wanted the text afterwards to have no indents (either left or right), you would enter .IQ, which exits all indent styles at once.

    @@ -3388,9 +3820,9 @@ at which they excel.

    NOTE: see the section Typesetting Macros in Document Processing -for information and advice on using idents with the +for information and advice on using indents with the document processing macros. - +

    Indents macro list

    • IL  (Indent left) @@ -3412,7 +3844,7 @@ for information and advice on using idents with the

      Indent left


      -Macro: IL [ <measure> ] +Macro: IL [ <measure> ]
      *The optional argument requires a unit of measure @@ -3447,15 +3879,15 @@ for more details. automatically cancels any active indents.

      ADDITIONAL NOTE: Invoking IL -automtically turns off IB. -
      +automatically turns off IB. +


      Indent right


      -Macro: IR [ <measure> ] +Macro: IR [ <measure> ]
      *The optional argument requires a unit of measure @@ -3468,7 +3900,7 @@ measure. Subsequent invocations with a measure add to the previous indent measure. A minus sign may be prepended to the argument to subtract from the current indent measure. The \w -inline esacpe +inline escape may be used to specify a text-dependent measure, in which case no unit of measure is required. For example,

      @@ -3488,15 +3920,15 @@ for more details. automatically cancels any active indents.

      ADDITIONAL NOTE: Invoking IR -automtically turns off IB. -
      +automatically turns off IB. +


      Indent both


      -Macro: IB [ <left measure> <right measure> ] +Macro: IB [ <left measure> <right measure> ]
      *The optional arguments require a unit of measure @@ -3519,12 +3951,12 @@ save yourself a lot of grief. A minus sign may be prepended to the arguments to subtract from their current values. The \w -inline esacpe +inline escape may be used to specify text-dependent measures, in which case no unit of measure is required. For example,

      -	.IB \w'margaraine' \w'jello'
      +	.IB \w'margarine' \w'jello'
       
      left indents text by the width of the word "margarine" @@ -3540,22 +3972,22 @@ for more details. automatically cancels any active indents.

      ADDITIONAL NOTE: Invoking IB -automtically turns off IL and +automatically turns off IL and IR. -
      +


      Temporary (left) indent


      -Macro: TI [ <measure> ] +Macro: TI [ <measure> ]
      *The optional argument requires a unit of measure

      A temporary indent is one that applies only to the first line of -text that comes after it. It's chief use is indenting the first +text that comes after it. Its chief use is indenting the first line of paragraphs. (Mom's PP macro, for example, uses a temporary indent.) @@ -3594,7 +4026,7 @@ are NOT additive. In the following example, the second .TI


      Hanging indent


      -Macro: HI [ <measure> ] +Macro: HI [ <measure> ]
      *The optional argument requires a unit of measure @@ -3639,10 +4071,15 @@ prior to the line you want hung (i.e. without any intervening control lines). And because hanging indents affect only one line, there's no need to turn them off. - +

      A recipe for numbered lists

      -A common use for hanging indents is setting numbered lists. +PLEASE NOTE: mom now has macros for setting lists (see +Nested lists), +making this recipe superfluous. It remains here in the hope that +it will clarify the use of hanging indents generally, if no longer +specifically. +

      Consider the following example:

      @@ -3678,7 +4115,7 @@ of 2
       plus a period (using the
       \w
       inline escape).  At this point, the left indent is active; text
      -afterward would normally be indented.  However, we invoke a hanging
      +afterwards would normally be indented.  However, we invoke a hanging
       indent of exactly the same width, which hangs the first line (and
       first line only!) to the left of the indent by the same distance
       (in this case, that means "out to the left margin").
      @@ -3697,20 +4134,20 @@ Paste the example above into a file and preview it with groff -mom -X
       IB, measures given to HI
       are NOT additive.  Each time you pass a measure to
       HI, the measure is treated literally.
      -
      +


      Quitting indents


      -Macro: IQ  [ CLEAR ]  (quit any/all indents -- see *IMPORTANT NOTE) +Macro: IQ  [ CLEAR ]  (quit any/all indents -- see *IMPORTANT NOTE)
      -Macro: ILX [ CLEAR ]  (exit Indent Left) +Macro: ILX [ CLEAR ]  (exit Indent Left)
      -Macro: IRX [ CLEAR ]  (exit Indent Right) +Macro: IRX [ CLEAR ]  (exit Indent Right)
      -Macro: IBX [ CLEAR ]  (exit Indent Both) +Macro: IBX [ CLEAR ]  (exit Indent Both)

      *IMPORTANT NOTE: @@ -3728,7 +4165,7 @@ now also be invoked as ILQ, IRQ and IBQ. Both forms are acceptable.

      Without an argument, the macros to quit indents merely restore your -original left margin and line length. The measures stored in the +original margins and line length. The measures stored in the indent macros themselves are saved so you can call them again without having to supply a measure.

      @@ -3747,5 +4184,6 @@ the values for all indent styles at once. Prev   Top   Back to Table of Contents + diff --git a/contrib/groff/contrib/mom/momdoc/using.html b/contrib/groff/contrib/mom/momdoc/using.html index 327e86ba4da3..1265eec8cd97 100644 --- a/contrib/groff/contrib/mom/momdoc/using.html +++ b/contrib/groff/contrib/mom/momdoc/using.html @@ -1,3 +1,4 @@ + @@ -10,7 +11,7 @@ Next   Prev   Back to Table of Contents - +

      USING MOM

      @@ -23,7 +24,7 @@ Invoking groff
      Previewing documents -
      +


      Introduction

      @@ -46,11 +47,11 @@ macro, explained below. After START, mom determines the appearance of text following the markup tags automatically, although you, the user, can easily change how mom interprets the tags. This gives you -nearly complete control over the look and feel of your documents. -In addition, the typesetting macros, in combination with document -processing, let you meet all sorts of typesetting needs that just -can't be covered by "one macro fits all" markup tags. - +nearly complete control over document design. In addition, the +typesetting macros, in combination with document processing, let you +meet all sorts of typesetting needs that just can't be covered by +"one macro fits all" markup tags. +

      How to input mom's macros

      @@ -67,9 +68,9 @@ following apply. rules for mom's macros and inline escapes. I use the vi clone called elvis, and find it a pure - joy in this regard. Simply colorizing macros and + joy in this regard. Simply colourizing macros and inlines to half-intensity can be enough to make text stand - out clearly from formattting commands. + out clearly from formatting commands.
    • All mom's macros begin with a period (dot) and must be entered in upper case (capital) letters. @@ -120,12 +121,12 @@ Consider the following, which is a template for starting the chapter of a book.

      -	.TITLE   "My Pulizter Novel"
      +	.TITLE   "My Pulitzer Novel"
       	.AUTHOR  "Joe Blow"
       	.CHAPTER  1
       	\#
       	.DOCTYPE    CHAPTER
      -	.PRINTSTYPE TYPESET
      +	.PRINTSTYLE TYPESET
       	\#
       	.FAM     P
       	.PT_SIZE 10
      @@ -171,7 +172,7 @@ option along with the other options you require.  Theoretically, you
       only need -U with .open, .opena, .pso, .sy,
       and .pi, however reality seems, at times, to dictate
       otherwise.
      -
      +

      How to preview documents

      @@ -184,7 +185,7 @@ Groff itself comes with a quick and dirty previewer called gxditview. Invoke it with

      -	groff -X -mom <filename>
      +	groff -X -mom filename
       
      It's not particularly pretty, doesn't have many navigation @@ -200,18 +201,24 @@ doesn't gobble up system resources.

      A surer way to preview documents is with gv (ghostview). This involves processing documents with groff, -directing the output to a temporary (PostScript) file, then opening -the temporary file in gv. While that may sound -like a lot of work, I've set up my editor (elvis) to do it for me. -Whenever I'm working on a document that needs previewing/checking, -I fire up gv with the "Watch File" -option turned on. To look at the file, I tell elvis to process -it (with groff) and send it to a temporary file (groff --mom filename > filename.ps), then open the file inside -gv. Ever after, when I want to look at any changes -I make, I simply tell elvis to work his magic again. The Watch File -option in gv registers that the file has changed, -and automatically loads the new version. Voilà! -- instant previewing. +and directing the output to a PostScript file, like this, +

      +

      +	groff -mom filename > filename.ps
      +
      +then opening .ps file in gv. +

      +While that may sound like a lot of work, I've set up my editor +(elvis) to do it for me. Whenever I'm working on a document that +needs previewing/checking, I fire up gv with the +"Watch File" option turned on. To look at the file, I +tell elvis to process it (with groff) and send it to a temporary +file (groff -mom filename > filename.ps), then open +the file inside gv. Ever after, when I want to +look at any changes I make, I simply tell elvis to work his magic +again. The Watch File option in gv registers that +the file has changed, and automatically loads the new version. +Voilà! --instant previewing.


      diff --git a/contrib/groff/contrib/mom/om.tmac b/contrib/groff/contrib/mom/om.tmac index 5d43b5087bec..37e9161fd841 100644 --- a/contrib/groff/contrib/mom/om.tmac +++ b/contrib/groff/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.5 -\# ------------- +.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. +.. \# +\# ==================================================================== +\# +\# 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! -\# -\# 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. +. 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,16 +92,21 @@ \# \# +++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,44 +125,37 @@ \# \# MISCELLANEOUS \# ============= -.cflags 4 /\(en +.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 @@ -119,7 +164,7 @@ \# PAGE WIDTH \# ---------- \# *Argument: -\# +\# \# *Function: \# Stores user supplied page width in register #PAGE_WIDTH. \# *Notes: @@ -137,7 +182,7 @@ \# L_MARGIN \# -------- \# *Argument: -\# +\# \# *Function: \# Stores user supplied page offset in register #L_MARGIN. \# Sets .po to user supplied offset. @@ -154,7 +199,7 @@ \# R_MARGIN \# -------- \# *Argument: -\# +\# \# *Function: \# Stores user supplied right margin in register #R_MARGIN. \# *Notes: @@ -178,7 +223,7 @@ \# T_MARGIN \# -------- \# *Argument: -\# +\# \# *Function: \# Stores the user supplied top margin in register #T_MARGIN. \# Advances user supplied depth from the top of the page. @@ -186,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 @@ -200,7 +243,7 @@ \# B_MARGIN \# -------- \# *Argument: -\# +\# \# *Function: \# Stores the user supplied bottom margin in register #B_MARGIN. \# *Notes: @@ -209,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 \# @@ -229,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 \# \# ===================================================================== @@ -250,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 \# \# @@ -266,14 +313,52 @@ \# *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 +. 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 \# \# ===================================================================== @@ -287,7 +372,7 @@ \# LINE LENGTH \# ----------- \# *Argument: -\# +\# \# *Function: \# Stores user supplied line length in register #L_LENGTH. \# Sets .ll to #L_LENGTHu @@ -295,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: @@ -311,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. \# @@ -342,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 \# \# @@ -369,31 +535,55 @@ .END \# \# +\# SIZE (inline) +\# ------------- +\# *Arguments: +\# +\# *Function: +\# Sets point size to user supplied value in scaled points. +\# Intended to be called inline with \*[SIZE ] +\# *Notes: +\# Can be used with a unit of measure or not. +\# +.MAC SIZE END +\c +.ps \\$1 +.END +\# +\# \# LEADING \# ------- \# *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 \# -------- @@ -409,13 +599,11 @@ \# multiplied by #AUTOLEAD_VALUE instead of the two being added \# together. \# -\# When AUTOLEAD is turned off, the leading reverts to the leading value -\# in effect prior to invoking AUTOLEAD. -\# .MAC AUTOLEAD END . 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' \{\ @@ -426,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 \# @@ -442,7 +632,6 @@ .ds PREV \EfP .ds S \Es \# -\# \# ===================================================================== \# \# +++KERNING+++ @@ -460,129 +649,71 @@ . nr #KERN 1 . \} . el \{\ -. kern 0 -. nr #KERN 0 +. kern 0 +. nr #KERN 0 . \} .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 executed 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 #] where #, 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)' .ds FU \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*\\$1u)' \# -.ds BU1 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*1u)' -.ds BU2 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*2u)' -.ds BU3 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*3u)' -.ds BU4 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*4u)' -.ds BU5 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*5u)' -.ds BU6 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*6u)' -.ds BU7 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*7u)' -.ds BU8 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*8u)' -.ds BU9 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*9u)' -.ds BU10 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*10u)' -.ds BU11 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*11u)' -.ds BU12 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*12u)' -.ds BU13 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*13u)' -.ds BU14 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*14u)' -.ds BU15 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*15u)' -.ds BU16 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*16u)' -.ds BU17 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*17u)' -.ds BU18 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*18u)' -.ds BU19 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*19u)' -.ds BU20 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*20u)' -.ds BU21 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*21u)' -.ds BU22 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*22u)' -.ds BU23 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*23u)' -.ds BU24 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*24u)' -.ds BU25 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*25u)' -.ds BU26 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*26u)' -.ds BU27 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*27u)' -.ds BU28 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*28u)' -.ds BU29 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*29u)' -.ds BU30 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*30u)' -.ds BU31 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*31u)' -.ds BU32 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*32u)' -.ds BU33 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*33u)' -.ds BU34 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*34u)' -.ds BU35 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*35u)' -.ds BU36 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*36u)' +\# Initialize strings for pre-1.1.3c-style BU and FU \# +.nr #LOOP 0 1 +.while \n+[#LOOP]<37 \{\ +. ds BU\n[#LOOP] \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*\n[#LOOP]u)' +.\} \# -.ds FU1 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*1u)' -.ds FU2 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*2u)' -.ds FU3 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*3u)' -.ds FU4 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*4u)' -.ds FU5 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*5u)' -.ds FU6 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*6u)' -.ds FU7 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*7u)' -.ds FU8 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*8u)' -.ds FU9 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*9u)' -.ds FU10 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*10u)' -.ds FU11 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*11u)' -.ds FU12 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*12u)' -.ds FU13 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*13u)' -.ds FU14 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*14u)' -.ds FU15 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*15u)' -.ds FU16 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*16u)' -.ds FU17 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*17u)' -.ds FU18 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*18u)' -.ds FU19 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*19u)' -.ds FU20 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*20u)' -.ds FU21 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*21u)' -.ds FU22 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*22u)' -.ds FU23 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*23u)' -.ds FU24 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*24u)' -.ds FU25 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*25u)' -.ds FU26 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*26u)' -.ds FU27 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*27u)' -.ds FU28 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*28u)' -.ds FU29 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*29u)' -.ds FU30 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*30u)' -.ds FU31 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*31u)' -.ds FU32 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*32u)' -.ds FU33 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*33u)' -.ds FU34 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*34u)' -.ds FU35 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*35u)' -.ds FU36 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*36u)' +.nr #LOOP 0 1 +.while \n+[#LOOP]<37 \{\ +. ds FU\n[#LOOP] \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*\n[#LOOP]u)' +.\} +.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' @@ -691,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: \# @@ -708,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 \# \# @@ -768,24 +904,24 @@ \# *Arguments: \# | | DEFAULT \# or -\# LINES <#> | MARGIN <#> | SPACE <#> +\# LINES | MARGIN | SPACE \# *Function: \# Turns auto hyphenation on or off, resets the hyphenation style \# 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 \# made to LINES, MARGIN, or SPACE. \# -\# HY LINES <#> sets the number of allowable consecutive hyphenated lines. +\# HY LINES sets the number of allowable consecutive hyphenated lines. \# -\# HY MARGIN <#> sets the amount of space (ipPcm) allowed at the end +\# HY MARGIN sets the amount of space (ipPcm) allowed at the end \# of a line in QUAD mode before hyphenation is tripped (e.g. if there's \# only 6 points left, groff won't try to hyphenate the next word). \# @@ -852,11 +988,25 @@ \# Creates or modifies register #ALD. Adds user supplied lead \# below current baseline. \# *Notes: -\# Requires unit of measure ipPcmv. +\# 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 \# \# @@ -868,7 +1018,7 @@ \# Creates or modifies register #RLD. Reverses user supplied \# lead above current baseline. \# *Notes: -\# Requires unit of measure ipPcmv. +\# Requires a unit of measure. \# .MAC RLD END . nr #RLD (\\$1) @@ -877,13 +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' @@ -1003,7 +1156,7 @@ \# Ligatures may be supplied manually with \(fi, \(fl, etc. \# .MAC LIGATURES END -. ie '\\$1'' \{\ +. ie '\\$1'' \{\ . lg . nr #LIGATURES 1 . \} @@ -1017,32 +1170,101 @@ \# SMARTQUOTES \# ----------- \# *Arguments: -\# | +\# [ ,, ] | [ << ] | [ >> ] | +\# or +\# [ DA | DE | ES | FR | IT | NL | NO | PT | SV ] | \# *Function: -\# Turns smartquotes on or off. +\# Turns smartquotes on (optionally with a quoting style from the +\# argument list, or off). \# *Notes: \# The " character is read outside the macro when mom is -\# processed. The strings for open/close ($QUOTE#) are then -\# defined in the macro. \N'34' is the ASCII code for ". If -\# incompatibilities arise, find the code for " that applies -\# to your system and plug in that code instead. +\# processed. The strings for open/close ($QUOTE) are then +\# defined in the macro. +\# +\# (Note to myself: code for " is \N'34'.) \# .char " \\*[$QUOTE\\n[#OPEN_CLOSE]]\R'#OPEN_CLOSE (1-\\n[#OPEN_CLOSE])' \# .MAC SMARTQUOTES END +. rr #ARGS_TO_SQ . ie '\\$1'' \{\ . nr #OPEN_CLOSE 0 -. ds $QUOTE0 `` -. ds $QUOTE1 '' -. nr #SMART_QUOTES 1 +. ds $QUOTE0 \\[lq] +. ds $QUOTE1 \\[rq] . \} . el \{\ -. ds $QUOTE0 \\N'34' -. ds $QUOTE1 \\N'34' -. nr #SMART_QUOTES 0 +. if '\\$1',,' \{\ +. nr #ARGS_TO_SQ 1 +. ds $QUOTE0 \\[Bq] +. ds $QUOTE1 \\[lq] +. \} +. if '\\$1'<<' \{\ +. nr #ARGS_TO_SQ 1 +. ds $QUOTE0 \\[Fo] +. ds $QUOTE1 \\[Fc] +. \} +. if '\\$1'>>' \{\ +. nr #ARGS_TO_SQ 1 +. ds $QUOTE0 \\[Fc] +. ds $QUOTE1 \\[Fo] +. \} +. if '\\$1'DA' \{\ +. nr #ARGS_TO_SQ 1 +. ds $QUOTE0 \\[Fc] +. ds $QUOTE1 \\[Fo] +. \} +. if '\\$1'DE' \{\ +. nr #ARGS_TO_SQ 1 +. ds $QUOTE0 \\[Bq] +. ds $QUOTE1 \\[lq] +. \} +. if '\\$1'ES' \{\ +. nr #ARGS_TO_SQ 1 +. ds $QUOTE0 \\[lq] +. ds $QUOTE1 \\[rq] +. \} +. if '\\$1'FR' \{\ +. nr #ARGS_TO_SQ 1 +. ds $QUOTE0 \\[Fo]\\| +. ds $QUOTE1 \\|\\[Fc] +. \} +. if '\\$1'IT' \{\ +. nr #ARGS_TO_SQ 1 +. ds $QUOTE0 \\[Fo]\\| +. ds $QUOTE1 \\|\\[Fc] +. \} +. if '\\$1'NL' \{\ +. nr #ARGS_TO_SQ 1 +. ds $QUOTE0 \\[rq] +. ds $QUOTE1 \\[rq] +. \} +. if '\\$1'NO' \{\ +. nr #ARGS_TO_SQ 1 +. ds $QUOTE0 \\[Fo] +. ds $QUOTE1 \\[Fc] +. \} +. if '\\$1'PT' \{\ +. nr #ARGS_TO_SQ 1 +. ds $QUOTE0 \\[Fo] +. ds $QUOTE1 \\[Fc] +. \} +. if '\\$1'SV' \{\ +. nr #ARGS_TO_SQ 1 +. ds $QUOTE0 \\[Fc] +. ds $QUOTE1 \\[Fc] +. \} +. if !r#ARGS_TO_SQ \{\ +. ds $QUOTE0 \\[dq] +. ds $QUOTE1 \\[dq] +. \} . \} .END \# +.ds $QUOTE0 \[dq] +.ds $QUOTE1 \[dq] +\# +\# Strings for foot and inch marks +\# .ds FOOT \(fm .ds INCH \(fm\(fm \# @@ -1058,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+++ @@ -1079,9 +1309,9 @@ \# *Argument: \# \# *Function: -\# Turns fill on and sets .ad to b. +\# Turns fill on and sets .ad to b. \# *Notes: -\# Justifies text left and right. +\# Justifies text left and right. \# .MAC JUSTIFY END . if \\n[#TAB_ACTIVE]=0 \{\ @@ -1091,7 +1321,7 @@ ' ce 0 . QUAD J . if \\n[#PRINT_STYLE]=1 \{ .QUAD L \} -. nr #FILL 0 +. nr #PSEUDO_FILL 0 .END \# \# @@ -1116,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 \# ---- @@ -1148,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. \# @@ -1159,7 +1419,9 @@ . \} . 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 \# \# @@ -1181,7 +1443,7 @@ . \} . fi . rj 100000 -. nr #FILL 1 +. nr #PSEUDO_FILL 1 .END \# \# @@ -1198,86 +1460,70 @@ \# .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 <#>, where <#> -\# 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 <#>, -\# 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 \*[ST<#>], where <#> is -\# the desired number of the tab. The end of the the tab is marked -\# with \*[ST<#>X]. All ST's must have a matching STX. String tabs -\# may be nested. -\# -\# Next, the user invokes .ST <#> 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 \# ------------------------------ \# -.ds ST1 \Ek[#ST1_OFFSET] -.ds ST2 \Ek[#ST2_OFFSET] -.ds ST3 \Ek[#ST3_OFFSET] -.ds ST4 \Ek[#ST4_OFFSET] -.ds ST5 \Ek[#ST5_OFFSET] -.ds ST6 \Ek[#ST6_OFFSET] -.ds ST7 \Ek[#ST7_OFFSET] -.ds ST8 \Ek[#ST8_OFFSET] -.ds ST9 \Ek[#ST9_OFFSET] -.ds ST10 \Ek[#ST10_OFFSET] -.ds ST11 \Ek[#ST11_OFFSET] -.ds ST12 \Ek[#ST12_OFFSET] -.ds ST13 \Ek[#ST13_OFFSET] -.ds ST14 \Ek[#ST14_OFFSET] -.ds ST15 \Ek[#ST15_OFFSET] -.ds ST16 \Ek[#ST16_OFFSET] -.ds ST17 \Ek[#ST17_OFFSET] -.ds ST18 \Ek[#ST18_OFFSET] -.ds ST19 \Ek[#ST19_OFFSET] -.ds ST1X \Ek[#ST1_MARK] -.ds ST2X \Ek[#ST2_MARK] -.ds ST3X \Ek[#ST3_MARK] -.ds ST4X \Ek[#ST4_MARK] -.ds ST5X \Ek[#ST5_MARK] -.ds ST6X \Ek[#ST6_MARK] -.ds ST7X \Ek[#ST7_MARK] -.ds ST8X \Ek[#ST8_MARK] -.ds ST9X \Ek[#ST9_MARK] -.ds ST10X \Ek[#ST10_MARK] -.ds ST11X \Ek[#ST11_MARK] -.ds ST12X \Ek[#ST12_MARK] -.ds ST13X \Ek[#ST13_MARK] -.ds ST14X \Ek[#ST14_MARK] -.ds ST15X \Ek[#ST15_MARK] -.ds ST16X \Ek[#ST16_MARK] -.ds ST17X \Ek[#ST17_MARK] -.ds ST18X \Ek[#ST18_MARK] -.ds ST19X \Ek[#ST19_MARK] +\# Initialize string tab markers numbered 1 to 19. +\# +.nr #LOOP 0 1 +.while \n+[#LOOP]<20 \{\ +. ds ST\n[#LOOP] \Ek[#ST\n[#LOOP]_OFFSET] +.\} +\# +.nr #LOOP 0 1 +.while \n+[#LOOP]<20 \{\ +. ds ST\n[#LOOP]X \Ek[#ST\n[#LOOP]_MARK] +.\} +.rr #LOOP +\# +\# +\# These are reserved ST numbers for internal use +.ds ST100 \Ek[#ST100_OFFSET] +.ds ST100X \Ek[#ST100_MARK] +.ds ST101 \Ek[#ST101_OFFSET] +.ds ST101X \Ek[#ST101_MARK] \# \# \# QUAD AND SET STRING TABS @@ -1288,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 @@ -1311,13 +1557,13 @@ \# TAB SET \# ------- \# *Arguments: -\# <#> ident(ipPcm) length(ipPcm) [L | R | C | J [QUAD]] +\# ident(ipPcm) length(ipPcm) [L | R | C | J [QUAD]] \# *Function: -\# Creates macros TAB<#> and TAB <#>, where # is any arbitrary number. -\# TAB# is a typesetting tab (i.e. a tab defined as an indent +\# Creates macros TABn and TAB n, where "n" is any arbitrary number. +\# TABn is a typesetting tab (i.e. a tab defined as an indent \# from the page left offset plus a line length.) \# *Notes: -\# <#> = arbitrary digit to identify the tab +\# n = arbitrary digit to identify the tab \# indent = indent from left margin; unit of measure required \# length = length of tab (unit of measure required; can be \# \w''u--if more than one word in string, surround @@ -1331,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 <#> 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 @@ -1373,13 +1622,19 @@ . 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] -. po \\n[#L_MARGIN]u+\\n[#TAB_OFFSET]u -. nr #ST_OFFSET \\n[#TAB_OFFSET] +. ds $CURRENT_TAB \\*[$CURRENT_TAB] . nr #TAB_OFFSET\\*[$CURRENT_TAB] \\n[#TAB_OFFSET] +. nr #ST_OFFSET \\n[#TAB_OFFSET] +. po \\\\n[#L_MARGIN]u+\\\\n[#TAB_OFFSET\\\\*[$CURRENT_TAB]]u . ll \\n[#TAB_LENGTH]u . ta \En(.lu . ie '\\$5'QUAD' \{\ @@ -1395,6 +1650,10 @@ . if '\\$4'C' \{ .CENTER \} . if '\\$4'J' \{ .JUSTIFY \} . \} +. if \\\\n[#TN]=1 \{\ +. TRAP +. rr #TN +. \} .DONE . rr #TAB_ACTIVE .END @@ -1411,7 +1670,6 @@ . ds $TAB_NUMBER \\$1 . TAB\\*[$TAB_NUMBER] . nr #IN_TAB 1 -. po \\n[#L_MARGIN]u+\\n[#TAB_OFFSET\\*[$TAB_NUMBER]]u .END \# \# @@ -1420,19 +1678,26 @@ \# *Argument: \# \# *Function: -\# Automagically moves to TAB#+1 on the same line as the last +\# 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. +\# 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 -. br +. nr #TN 1 +. TRAP OFF +. sp -1v . nr #NEXT_TAB \\n[#CURRENT_TAB]+1 . TAB\\n[#NEXT_TAB] -. 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 TB+ "\c\\R'#TB+ 1'\\R'#TN 1'\\R'#NEXT_TAB \\n[#CURRENT_TAB]+1'\\*[TAB\\n[#NEXT_TAB]]\c \# \# TAB QUIT \# -------- @@ -1470,6 +1735,84 @@ . \} .END \# +\# ==================================================================== +\# +\# COLOR HANDLING +\# ============== +\# +\# COLOR +\# ----- +\# *Arguments: +\# +\# *Function: +\# Allows the inline escape for setting color to be called +\# as a macro. +\# +.MAC COLOR END +.ie \\n(.u=1 \{\ +\c +\\*[\\$1]\c +.\} +.el \{ \\*[\\$1] \} +.END +\# +\# +\# NEWCOLOR +\# -------- +\# *Arguments: +\# [] +\# *Function: +\# Based on .defcolor, allows users to name and define colors using +\# one of the four color schemes rgb, cmy, cmyk and grey. The new +\# color is then defined as a string so that it can be called inline +\# with \*[COLORNAME] or with .COLOR. +\# *Notes: +\# With only two args, the default color scheme is rgb. +\# +\# It is highly recommended that users define new colors as +\# all-cap strings, to differentiate them from x colors, which must +\# be in lower case. +\# +.MAC NEWCOLOR END +. if \\n[#NUM_ARGS]=2 \{\ +. defcolor \\$1 rgb \\$2 +. \} +. if \\n[#NUM_ARGS]=3 \{\ +. if '\\$2'RGB' .ds $COLOR_SCHEME rgb +. if '\\$2'CYM' .ds $COLOR_SCHEME cym +. if '\\$2'CMYK' .ds $COLOR_SCHEME cmyk +. if '\\$2'GRAY' .ds $COLOR_SCHEME gray +. if '\\$2'GREY' .ds $COLOR_SCHEME gray +. defcolor \\$1 \\*[$COLOR_SCHEME] \\$3 +. \} +. ds \\$1 \\m[\\$1] +.END +\# +\# +\# XCOLOR +\# ------ +\# *Arguments: +\# [] +\# *Function: +\# Defines a string of x color name (i.e. a predefined x +\# color). If is given, creates a string of +\# that references the x color name of the first argument. +\# *Notes: +\# The color name must be a legal color name from rgb.txt, and +\# must be given entirely in lower case, all one word. +\# +.MAC XCOLOR END +. ds \\$1 \m[\\$1] +. if \\n[#NUM_ARGS]=2 .ds \\$2 \m[\\$1] +.END +\# +\# Pre-define xcolors black and white +\# +.ds black \m[black] +.ds BLACK \m[black] +.ds white \m[white] +.ds WHITE \m[WHITE] +\# \# ===================================================================== \# \# +++MISCELLANEOUS USEFUL MACROS AND STRINGS+++ @@ -1860,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]'\ @@ -2047,46 +2390,49 @@ \# *Argments: \# "" \# *Function: -\# Defines and redefines padding character (default=pound sign unless -\# padding character has been set with PAD_MARKER) several times -\# so that when the string is output at the end of the macro, every # -\# has been converted to an equal-sized amount of padding (blank space) -\# on a line. # is equivalent to CompuGraphic's old . +\# Defines and redefines padding character (default=pound sign +\# unless padding character has been set with PAD_MARKER) +\# several times so that when the string is output at the end +\# of the macro, every # has been converted to an equal-sized +\# amount of padding (blank space) on a line. # is equivalent to +\# CompuGraphic's old . \# *Notes: \# String tabs may be marked off during PAD. \# .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 \{\ @@ -2099,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 \# -------------------- @@ -2152,6 +2504,23 @@ .END \# \# +\# DROPCAP COLOR +\# ------------- +\# *Arguments: +\# +\# *Function: +\# Defines string $DC_COLOR to argument. +\# *Notes: +\# User must define an XCOLOR or NEWCOLOR before using +\# DC_COLOR. +\# +.MAC DROPCAP_COLOR END +. if \\n[#PRINT_STYLE]=1 \{ .return \} +. nr #DC_COLOR 1 +. ds $DC_COLOR \\$1 +.END +\# +\# \# DROP CAP GUTTER \# --------------- \# *Argument: @@ -2221,51 +2590,79 @@ . \} . ds $DROPCAP \\$1 . nr #DC_LINES \\$2-1 -. ds $RESTORE_COND \\*[$COND_PERCENT] -. ds $RESTORE_EXT \\*[$EXT_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 -. ie '\\$3'COND' \{ .PRINT \\*[COND]\\*[$DROPCAP]\\*[CONDX] \} -. el \{ .PRINT \\*[$DROPCAP] \} +. ie \\n[#DC_COLOR]=1 \{\ +. ie !'\\$3'' \{\ +. ie '\\$3'COND' \{ .PRINT \m[\\*[$DC_COLOR]]\\*[COND]\\*[$DROPCAP]\\*[CONDX]\m[] \} +. el \{ .PRINT \m[\\*[$DC_COLOR]]\\*[EXT]\\*[$DROPCAP]\\*[EXTX]\m[] \} +. \} +. el \{ .PRINT \m[\\*[$DC_COLOR]]\\*[$DROPCAP]\m[] \} +. \} +. el \{\ +. ie !'\\$3'' \{\ +. ie '\\$3'COND' \{ .PRINT \\*[COND]\\*[$DROPCAP]\\*[CONDX] \} +. el \{ .PRINT \\*[EXT]\\*[$DROPCAP]\\*[EXTX] \} +. \} +. el \{ .PRINT \m[\\*[$DC_COLOR]]\\*[$DROPCAP]\m[] \} +. \} . 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 @@ -2287,7 +2684,10 @@ \# *Notes: \# .MAC RULE END -. if \\n(.j=1 \{\ +\c +. EL +. if \\n(.u=1 \{\ +. nr #FILL_WAS_ON 1 . ds $CURRENT_QUAD \\*[$QUAD_VALUE] . nf . \} @@ -2295,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]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 \# @@ -2331,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]) @@ -2377,85 +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 in ipPcm. The size may also -\# be entered using the \w'#' function--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 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. 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 \# ----------- @@ -2591,7 +2998,7 @@ . if '\\$1'CLEAR' \{\ . rr #L_INDENT . rr #INDENT_STYLE_LEFT -. \} +. \} .END \# \# @@ -2609,7 +3016,7 @@ . ta \\n(.lu . \} . \} -. if '\\$1'CLEAR' \{\ +. if '\\$1'CLEAR' \{\ . rr #R_INDENT . rr #INDENT_STYLE_RIGHT . \} @@ -2699,7 +3106,7 @@ . ie \\n[#COLUMNS] \{\ . ll \\n[#COL_L_LENGTH]u . ta \\n(.lu -. \} +. \} . el \{\ . ll \\n[#L_LENGTH]u . ta \\n(.lu @@ -2742,7 +3149,9 @@ \# Returns to the top of a column set \# .MAC MCR END +. TRAP OFF . sp |\\ncu +. TRAP .END \# \# MULTIPLE COLUMNS OFF @@ -2768,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 \# @@ -2783,11 +3192,11 @@ \# *Function: \# Enables/disables traps. \# *Notes: -\# EL and TN don't function as advertised on the last line before a -\# trap (when they break the preceding line, they spring the trap, and -\# groff won't back up to the line preceding the trap). TRAP is a kludge -\# to get EL and TN work properly on last lines. The user simply enloses -\# the offending lines in TRAP OFF/TRAP. +\# EL and TN don't function as advertised on the last line before +\# a trap (when they break the preceding line, they spring the +\# trap, and groff won't back up to the line preceding the trap). +\# TRAP is a kludge to get EL and TN work properly on last lines. +\# The user simply enloses the offending lines in TRAP OFF/TRAP. \# .MAC TRAP END . ie '\\$1'' \{ .vpt 1 \} @@ -2800,7 +3209,7 @@ \# *Arguments: \# | \# *Function: -\# Diverts text so that it doesn't print, or turns to function off. +\# Diverts text so that it doesn't print, or turns the function off. \# *Notes: \# Useful for setting up autotabs where you don't want the line with \# the tab marks to print. @@ -2820,15 +3229,14 @@ . \} .END \# +\# \# PRINT \# ----- -\# *Arguments: -\# \# *Function: \# Prints anything. A macro that helps keep my code nicely indented. \# .MAC PRINT END -\\$* +. nop \\$* .END \# \# @@ -2935,7 +3343,9 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# +++TYPESETTING ALIASES+++ \# +.ALIAS ADD_SPACE ALD .ALIAS CENTRE CENTER +.ALIAS COLOUR COLOR .ALIAS COMMENT SILENT .ALIAS CONDENSE CONDENSE_OR_EXTEND .ALIAS EXTEND CONDENSE_OR_EXTEND @@ -2943,15 +3353,19 @@ y\\R'#DESCENDER \\n[.cdp]' .ALIAS HYPHENATE HY .ALIAS HYPHENATION HY .ALIAS HYSET HY_SET -.ALIAS LIG LIGATURES .ALIAS IBQ IBX .ALIAS ILQ ILX .ALIAS IQ IX .ALIAS IRQ IRX +.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 XCOLOR \# \# \# ==================================================================== @@ -2966,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 @@ -3045,68 +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 -. ie '\\$2'SINGLESPACE' \{\ -. nr #SINGLE_SPACE 1 -. vs 12 +. 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 `' . \} -. 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 +. 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 -. 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 -. \} -. 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 . \} .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: @@ -3224,13 +3654,13 @@ y\\R'#DESCENDER \\n[.cdp]' . ds $COPY_STYLE \\$1 . if '\\*[$COPY_STYLE]'DRAFT' \{\ . nr #COPY_STYLE 1 -. if !r#DRAFT \{ .DRAFT 1 \} +. if !d$DRAFT \{ .DRAFT 1 \} . \} . if '\\*[$COPY_STYLE]'FINAL' \{ .nr #COPY_STYLE 2 \} . 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] \} @@ -3240,14 +3670,14 @@ y\\R'#DESCENDER \\n[.cdp]' . ds $HDRFTR_CENTER . \} . el \{\ -. ie !\\n[#REVISION] \{\ +. ie '\\*[$REVISION]'' \{\ . ds $HDRFTR_CENTER \ - \\*[$DRAFT_STRING] \\n[#DRAFT] + \\*[$DRAFT_STRING]\\*[$DRAFT] . \} . el \{\ . ds $HDRFTR_CENTER \ - \\*[$DRAFT_STRING] \\n[#DRAFT], \ - \\*[$REVISION_STRING] \\n[#REVISION] + \\*[$DRAFT_STRING]\\*[$DRAFT], \ + \\*[$REVISION_STRING] \\*[$REVISION] . \} . \} . \} @@ -3255,12 +3685,16 @@ y\\R'#DESCENDER \\n[.cdp]' . el \{\ . ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} . el \{ .PAGENUM_STYLE DIGIT \} -. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{ .ds $HDRFTR_CENTER \} +. 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 \} @@ -3270,77 +3704,128 @@ 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 \\*[$CHAPTER_TITLE] +. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE] . \} -. el \{ .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \\*[$CHAPTER] \} +. el .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \\*[$CHAPTER] . \} . \} . el \{\ -. ie !\\n[#REVISION] \{\ +. ie '\\*[$REVISION]'' \{\ . ie '\\*[$CHAPTER]'' \{\ . ie !'\\*[$CHAPTER_TITLE]'' \{\ -. ds $HDRFTR_CENTER \ - \\*[$CHAPTER_TITLE], \ - \\*[$DRAFT_STRING] \\n[#DRAFT] +. ie '\\*[$DRAFT]'' \{\ +. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE] +. \} +. el \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_TITLE], \ + \\*[$DRAFT_STRING]\\*[$DRAFT] +. \} . \} . el \{\ -. ds $HDRFTR_CENTER \ - \\*[$CHAPTER_STRING], \ - \\*[$DRAFT_STRING] \\n[#DRAFT] +. ie '\\*[$DRAFT]'' \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_STRING] +. \} +. el \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_STRING], \ + \\*[$DRAFT_STRING]\\*[$DRAFT] +. \} . \} . \} . el \{\ . ie !'\\*[$CHAPTER_TITLE]'' \{\ -. ds $HDRFTR_CENTER \ - \\*[$CHAPTER_TITLE], \ - \\*[$DRAFT_STRING] \\n[#DRAFT] +. ie '\\*[$DRAFT]'' \{\ +. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE] +. \} +. el \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_TITLE], \ + \\*[$DRAFT_STRING]\\*[$DRAFT] +. \} . \} . el \{\ -. ds $HDRFTR_CENTER \ - \\*[$CHAPTER_STRING] \\*[$CHAPTER], \ - \\*[$DRAFT_STRING] \\n[#DRAFT] +. ie '\\*[$DRAFT]'' \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_STRING] \\*[$CHAPTER] +. \} +. el \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_STRING] \\*[$CHAPTER], \ + \\*[$DRAFT_STRING]\\*[$DRAFT] +. \} . \} . \} . \} . el \{\ . ie '\\*[$CHAPTER]'' \{\ . ie !'\\*[$CHAPTER_TITLE]'' \{\ -. ds $HDRFTR_CENTER \ - \\*[$CHAPTER_TITLE], \ - \\*[$DRAFT_STRING] \\n[#DRAFT], \ - \\*[$REVISION_STRING] \\n[#REVISION] +. ie '\\*[$DRAFT]'' \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_TITLE], \ + \\*[$REVISION_STRING] \\*[$REVISION] +. \} +. el \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_TITLE], \ + \\*[$DRAFT_STRING]\\*[$DRAFT], \ + \\*[$REVISION_STRING] \\*[$REVISION] +. \} . \} . el \{\ -. ds $HDRFTR_CENTER \ - \\*[$CHAPTER_STRING], \ - \\*[$DRAFT_STRING] \\n[#DRAFT], \ - \\*[$REVISION_STRING] \\n[#REVISION] +. ie '\\*[$DRAFT]'' \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_STRING], \ + \\*[$REVISION_STRING] \\*[$REVISION] +. \} +. el \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_STRING], \ + \\*[$DRAFT_STRING]\\*[$DRAFT], \ + \\*[$REVISION_STRING] \\*[$REVISION] +. \} . \} . \} . el \{\ . ie !'\\*[$CHAPTER_TITLE]'' \{\ -. ds $HDRFTR_CENTER \ - \\*[$CHAPTER_TITLE], \ - \\*[$DRAFT_STRING] \\n[#DRAFT], \ - \\*[$REVISION_STRING] \\n[#REVISION] +. ie '\\*[$DRAFT]'' \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_TITLE], \ + \\*[$REVISION_STRING] \\*[$REVISION] +. \} +. el \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_TITLE], \ + \\*[$DRAFT_STRING]\\*[$DRAFT], \ + \\*[$REVISION_STRING] \\*[$REVISION] +. \} . \} . el \{\ -. ds $HDRFTR_CENTER \ - \\*[$CHAPTER_STRING] \\*[$CHAPTER], \ - \\*[$DRAFT_STRING] \\n[#DRAFT], \ - \\*[$REVISION_STRING] \\n[#REVISION] +. ie '\\*[$DRAFT]'' \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_STRING] \\*[$CHAPTER], \ + \\*[$REVISION_STRING] \\*[$REVISION] +. \} +. el \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_STRING] \\*[$CHAPTER], \ + \\*[$DRAFT_STRING]\\*[$DRAFT], \ + \\*[$REVISION_STRING] \\*[$REVISION] +. \} . \} . \} . \} . \} . \} . \} -\# 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 \} @@ -3363,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] \} @@ -3373,21 +3858,34 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . el \{\ . if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\ -. ie !\\n[#REVISION] \{\ -. ds $HDRFTR_CENTER \ - \\*[$DOC_TYPE], \ - \\*[$DRAFT_STRING] \\n[#DRAFT] +. ie '\\*[$REVISION]'' \{\ +. ie '\\*[$DRAFT]'' \{\ +. ds $HDRFTR_CENTER \\*[$DOC_TYPE] +. \} +. el \{\ +. ds $HDRFTR_CENTER \ + \\*[$DOC_TYPE], \ + \\*[$DRAFT_STRING]\\*[$DRAFT] +. \} . \} . el \{\ -. ds $HDRFTR_CENTER \ - \\*[$DOC_TYPE], \ - \\*[$DRAFT_STRING] \\n[#DRAFT], \ - \\*[$REVISION_STRING] \\n[#REVISION] +. ie '\\*[$DRAFT]'' \{\ +. ds $HDRFTR_CENTER \ + \\*[$DOC_TYPE], \ + \\*[$REVISION_STRING] \\*[$REVISION] +. \} +. el \{\ +. ds $HDRFTR_CENTER \ + \\*[$DOC_TYPE], \ + \\*[$DRAFT_STRING]\\*[$DRAFT], \ + \\*[$REVISION_STRING] \\*[$REVISION] +. \} . \} . \} . \} . \} . 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 \} @@ -3399,13 +3897,18 @@ 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 \# *Function: \# Collect information about documents. \# +\# +.MAC DOCTITLE END +. ds $DOC_TITLE \\$1 +.END +\# .MAC TITLE END \"Document title . ds $TITLE \\$1 .END @@ -3427,12 +3930,13 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# .MAC DRAFT END \"Draft number -. nr #DRAFT \\$1 +. ie '\\$1'' .ds $DRAFT +. el .ds $DRAFT " \\$1 .END \# \# .MAC REVISION END \"Revision number -. nr #REVISION \\$1 +. ds $REVISION \\$1 .END \# \# @@ -3445,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] @@ -3501,7 +4019,7 @@ y\\R'#DESCENDER \\n[.cdp]' . FOOTER_LEFT "" . FOOTER_CENTER "" . FOOTER_RIGHT_SIZE +0 -. FOOTER_RIGHT ".../\E*[$SUITE] +. FOOTER_RIGHT "\&.../\E*[$SUITE] . FOOTER_ON_FIRST_PAGE . em ALL_DONE . \} @@ -3509,17 +4027,29 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# +++LETTER MACROS+++ \# +\# First, create a register to hold incrementing numbers to be +\# appended to LETTERHEAD. +\# +.nr #FIELD 0 1 +\# \# DATE \# ---- \# *Arguments: -\# +\# \# *Function: -\# Stores date string in string $DATE. +\# Stores date (entered on the line after .DATE) in diversion +\# LETTERHEAD \# .MAC DATE END -. nr #DATE 1 -. di DATE -. RIGHT +. if !'\\n(.z'' \{ .di \} +. di LETTERHEAD\\n+[#FIELD] +. ie \\n[#FIELD]=1 \{\ +. nr #DATE_FIRST 1 +. RIGHT +. \} +. el \{\ +. LEFT +. \} .END \# \# @@ -3528,12 +4058,12 @@ y\\R'#DESCENDER \\n[.cdp]' \# *Arguments: \# \# *Function: -\# Stores "to" info in diversion TO_ADDRESS. +\# Stores addressee address (entered on the line after .TO) in +\# diversion LETTERHEAD \# .MAC TO END . if !'\\n(.z'' \{ .di \} -. nr #TO 1 -. di TO_ADDRESS +. di LETTERHEAD\\n+[#FIELD] . LEFT .END \# @@ -3543,12 +4073,12 @@ y\\R'#DESCENDER \\n[.cdp]' \# *Arguments: \# \# *Function: -\# Stores "from" info in diversion FROM_ADDRESS. +\# Stores addresser address (entered on the line after .FROM) in +\# diversion LETTERHEAD \# .MAC FROM END . if !'\\n(.z'' \{ .di \} -. nr #FROM 1 -. di FROM_ADDRESS +. di LETTERHEAD\\n+[#FIELD] . LEFT .END \# @@ -3556,14 +4086,14 @@ y\\R'#DESCENDER \\n[.cdp]' \# GREETING \# -------- \# *Arguments: -\# +\# \# *Function: -\# Stores greeting in string $GREETING. +\# Stores greeting (entered on the line after .GREETING) in +\# diversion LETTERHEAD \# .MAC GREETING END . if !'\\n(.z'' \{ .di \} -. nr #GREETING 1 -. di GREETING +. di LETTERHEAD\\n+[#FIELD] . LEFT .END \# @@ -3573,7 +4103,7 @@ y\\R'#DESCENDER \\n[.cdp]' \# *Arguments: \# \# *Function: -\# Stores greeting in string $CLOSING. +\# Stores greeting in diversion CLOSING. \# .MAC CLOSING END . br @@ -3588,7 +4118,7 @@ y\\R'#DESCENDER \\n[.cdp]' \# *Arguments: \# \# *Function: -\# Redefines $SUITE to blank so that a suite number doesn't +\# Redefines $FOOTER_RIGHT to blank so that a suite number doesn't \# appear at the bottom of letter pages. \# .MAC NO_SUITE END @@ -3599,6 +4129,375 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# +++DEFAULTS+++ \# +\# TYPE-STYLE CONTROL MACROS +\# ------------------------- +\# +.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 '\\$0'AUTHOR_COLOR' \{\ +. nr #AUTHOR_COLOR 1 +. ds $AUTHOR_COLOR \\$1 +. \} +. if '\\$0'BLOCKQUOTE_COLOR' \{\ +. nr #BQUOTE_COLOR 1 +. ds $BQUOTE_COLOR \\$1 +. \} +. if '\\$0'CITATION_COLOR' \{\ +. nr #BQUOTE_COLOR 1 +. ds $BQUOTE_COLOR \\$1 +. \} +. if '\\$0'CITE_COLOR' \{\ +. nr #BQUOTE_COLOR 1 +. ds $BQUOTE_COLOR \\$1 +. \} +. 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: @@ -3612,7 +4511,10 @@ y\\R'#DESCENDER \\n[.cdp]' .MAC DEFAULTS END . if !d$PAPER \{ .PAPER LETTER \} . if !\\n[#DOC_TYPE] \{ .DOCTYPE DEFAULT \} -. if \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} +. 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 \{\ @@ -3646,36 +4548,52 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . \} . 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 \} +. if (\\n[#FOOTER_MARGIN]+\\n(.v)>\\n[#B_MARGIN] \{\ +. tm1 "[mom]: Your chosen bottom margin for running text is too close to the footer margin. +. 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 " type in .FOOTER_MARGIN 0 before .START +. \} . if !r#HDRFTR_RULE_GAP \{\ . if \\n[#HEADERS_ON] \{ .HDRFTR_RULE_GAP 4p \} . if \\n[#FOOTERS_ON] \{ .HDRFTR_RULE_GAP 4p \} . \} -. 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 +. if !r#HDRFTR_RULE \{ .HDRFTR_RULE \} +. if !r#PAGE_NUM_SET \{ .PAGENUMBER 1 \} +.\" 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] \} @@ -3697,19 +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_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 \\*[$DOC_FAM] \} -. if !d$EN_STRING_QUAD \{ .ENDNOTE_STRING_QUAD CENTER \} -. if !r#EN_STRING_UNDERSCORE \{ .ENDNOTE_STRING_UNDERSCORE 2 \} +. 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]" \} @@ -3717,68 +4638,228 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . el \{ .ENDNOTE_TITLE "\\*[$TITLE]" \} . \} -. if !d$EN_TITLE_FAM \{ .ENDNOTE_TITLE_FAM \\*[$DOC_FAM] \} -. 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 \\*[$DOC_FAM] \} -. if !r#EN_NUMBERS_ALIGN_LEFT \{\ -. if !r#EN_NUMBERS_ALIGN_RIGHT \{ .ENDNOTE_NUMBERS_ALIGN_RIGHT 2 \} -. \} -\# String defaults for both PRINTSTYLEs -. if !d$ATTRIBUTE_STRING \{ .ATTRIBUTE_STRING "by" \} -. 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] \} -. rr #USER_DEF_HDRFTR_RIGHT -. if !d$FINIS_STRING \{ .FINIS_STRING "END" \} -\# Defaults for printstyle TYPEWRITE +. if !d$EN_TITLE_FAM \{ .ENDNOTE_TITLE_FAMILY \\*[$EN_FAM] \} +. 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_RIGHT \{ .ENDNOTE_NUMBERS_ALIGN_RIGHT 2 \} +. \} +. 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] +. rr #USER_DEF_HDRFTR_LEFT +. 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] +. rr #USER_DEF_HDRFTR_LEFT +. 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] +. rr #USER_DEF_HDRFTR_RIGHT +. \} +. \} +. el \{\ +. 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] +. rr #USER_DEF_HDRFTR_RIGHT +. \} +. 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 !r#DOCHEADER_LEAD_ADJ \{\ +. if !d$DOCHEADER_LEAD_ADJ \{\ . ie !'\\*[$CHAPTER_TITLE]'' \{\ . ie !'\\*[$CHAPTER_STRING]'' \{\ -. DOCHEADER_LEAD +4p +. DOCHEADER_LEAD +4 . \} . el \{ .DOCHEADER_LEAD +0 \} . \} . 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 \} . \} @@ -3788,54 +4869,172 @@ 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 !r#EN_LEAD \{ .ENDNOTE_LEAD 13.5p \} . 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_TITLE_SIZE_CHANGE \{ .ENDNOTE_TITLE_SIZE +0 \} . if !d$EN_NUMBER_FT \{ .ENDNOTE_NUMBER_FONT B \} -. if !$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_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_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_SH_SIZE_CHANGE \{ .TOC_SUBHEAD_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 \{ . \} +. \} +.\" 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 +. 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 \} +. \} +. \} . \} -. TRAPS . if \\n[#PRINT_STYLE]=1 \{ .nr #IGNORE 1 \} .END \# @@ -3861,44 +5060,94 @@ y\\R'#DESCENDER \\n[.cdp]' \# are stored in #DOC_L_LENGTH, $DOC_FAM, and #DOC_PT_SIZE for \# use in the HEADER and FOOTER macros. \# -.\" First, define some strings for point sizes +\# 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 +\# 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] \{\ -. PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]] -. \} +. nr #AUTHORS \\n[#AUTHOR_NUM] +. nr #NEXT_AUTHOR 0 1 +. 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 \{\ +. 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 \# .MAC DEFAULT_DOCHEADER END -. CENTER -. FAMILY \\*[$TITLE_FAM] -. FT \\*[$TITLE_FT] -. PT_SIZE \\*[$TITLE_PT_SIZE] -. LS \\n[#DOCHEADER_LEAD]u -. PRINT \\*[$TITLE] -. if !'\\*[$SUBTITLE]'' \{\ -. FAMILY \\*[$SUBTITLE_FAM] -. FT \\*[$SUBTITLE_FT] -. PT_SIZE \\*[$SUBTITLE_PT_SIZE] -. PRINT \\*[$SUBTITLE] -. \} -. if !'\\*[$AUTHOR_1]'' \{\ -. FAMILY \\*[$AUTHOR_FAM] -. FT \\*[$AUTHOR_FT] -. PT_SIZE \\*[$AUTHOR_PT_SIZE] -. PRINT \\*[$ATTRIBUTE_STRING] -. PRINT_AUTHORS +. CENTER +. FAMILY \\*[$TITLE_FAM] +. FT \\*[$TITLE_FT] +. PT_SIZE \\*[$TITLE_PT_SIZE] +. LS \\n[#DOCHEADER_LEAD]u +. ie \\n[#TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$TITLE_COLOR]]\\*[$TITLE]\m[] +. \} +. el \{ .PRINT \\*[$TITLE] \} +. if !'\\*[$SUBTITLE]'' \{\ +. FAMILY \\*[$SUBTITLE_FAM] +. FT \\*[$SUBTITLE_FT] +. PT_SIZE \\*[$SUBTITLE_PT_SIZE] +. ie \\n[#SUBTITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$SUBTITLE_COLOR]]\\*[$TITLE]\m[] +. \} +. el \{ .PRINT \\*[$SUBTITLE] \} +. \} +. if !'\\*[$AUTHOR_1]'' \{\ +. FAMILY \\*[$AUTHOR_FAM] +. FT \\*[$AUTHOR_FT] +. PT_SIZE \\*[$AUTHOR_PT_SIZE] +. if !'\\*[$ATTRIBUTE_STRING]'' \{\ +. ie \\n[#ATTRIBUTE_COLOR]=1 \{\ +. PRINT \m[\\*[$ATTRIBUTE_COLOR]]\\*[$ATTRIBUTE_STRING]\m[] . \} +. el \{ .PRINT \\*[$ATTRIBUTE_STRING] \} +. \} +. PRINT_AUTHORS +. \} .END \# \# @@ -3908,6 +5157,7 @@ y\\R'#DESCENDER \\n[.cdp]' . FT \\*[$TITLE_FT] . PT_SIZE \\*[$TITLE_PT_SIZE] . LS \\n[#DOCHEADER_LEAD]u +.\" Chapter title only . ie '\\*[$CHAPTER]'' \{\ . ie !'\\*[$CHAPTER_TITLE]'' \{\ . if \\n[#PRINT_STYLE]=2 \{\ @@ -3916,22 +5166,35 @@ y\\R'#DESCENDER \\n[.cdp]' . PT_SIZE \\*[$CHAPTER_TITLE_PT_SIZE] . LS \\n[#DOCHEADER_LEAD]u . \} -. PRINT \\*[$CHAPTER_TITLE] +. ie \\n[#TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$TITLE_COLOR]]\\*[$CHAPTER_TITLE]\m[] +. \} +. el \{ .PRINT \\*[$CHAPTER_TITLE] \} . \} . el \{\ -. PRINT \\*[$CHAPTER_STRING] +. ie \\n[#TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$TITLE_COLOR]]\\*[$CHAPTER_STRING]\m[] +. \} +. el \{ .PRINT \\*[$CHAPTER_STRING] \} . \} . \} +.\" Chapter string, possibly with a chapter title . el \{\ -. PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] +. ie \\n[#TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$TITLE_COLOR]]\\*[$CHAPTER_STRING] \\*[$CHAPTER]\m[] +. \} +. el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \} . if !'\\*[$CHAPTER_TITLE]'' \{\ -. if \\n[#PRINT_STYLE]=1 \{ .PRINT \\*[$CHAPTER_TITLE] \} +. if \\n[#PRINT_STYLE]=1 \{ .PRINT \\*[$CHAPTER_TITLE] \} . if \\n[#PRINT_STYLE]=2 \{\ . FAMILY \\*[$CHAPTER_TITLE_FAM] . FT \\*[$CHAPTER_TITLE_FT] . PT_SIZE \\*[$CHAPTER_TITLE_PT_SIZE] . LS \\n[#DOCHEADER_LEAD]u -. PRINT \\*[$CHAPTER_TITLE] +. 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 . \} . \} @@ -3940,31 +5203,649 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# .MAC NAMED_DOCHEADER END -. CENTER -. FAMILY \\*[$TITLE_FAM] -. FT \\*[$TITLE_FT] -. PT_SIZE \\*[$TITLE_PT_SIZE] -. LS \\n[#DOCHEADER_LEAD]u -. PRINT \\*[$TITLE] -. if !'\\*[$SUBTITLE]'' \{\ -. FAMILY \\*[$SUBTITLE_FAM] -. FT \\*[$SUBTITLE_FT] -. PT_SIZE \\*[$SUBTITLE_PT_SIZE] -. PRINT \\*[$SUBTITLE] +. CENTER +. FAMILY \\*[$TITLE_FAM] +. FT \\*[$TITLE_FT] +. PT_SIZE \\*[$TITLE_PT_SIZE] +. LS \\n[#DOCHEADER_LEAD]u +. ie \\n[#TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$TITLE_COLOR]]\\*[$TITLE]\m[] +. \} +. el \{ .PRINT \\*[$TITLE] \} +. if !'\\*[$SUBTITLE]'' \{\ +. FAMILY \\*[$SUBTITLE_FAM] +. FT \\*[$SUBTITLE_FT] +. PT_SIZE \\*[$SUBTITLE_PT_SIZE] +. ie \\n[#SUBTITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$SUBTITLE_COLOR]]\\*[$TITLE]\m[] +. \} +. el \{ .PRINT \\*[$SUBTITLE] \} +. \} +. if !'\\*[$AUTHOR_1]'' \{\ +. FAMILY \\*[$AUTHOR_FAM] +. FT \\*[$AUTHOR_FT] +. PT_SIZE \\*[$AUTHOR_PT_SIZE] +. if !'\\*[$ATTRIBUTE_STRING]'' \{\ +. ie \\n[#ATTRIBUTE_COLOR]=1 \{\ +. PRINT \m[\\*[$ATTRIBUTE_COLOR]]\\*[$ATTRIBUTE_STRING]\m[] . \} -. if !'\\*[$AUTHOR_1]'' \{\ -. FAMILY \\*[$AUTHOR_FAM] -. FT \\*[$AUTHOR_FT] -. PT_SIZE \\*[$AUTHOR_PT_SIZE] -. PRINT \\*[$ATTRIBUTE_STRING] -. PRINT_AUTHORS +. el \{ .PRINT \\*[$ATTRIBUTE_STRING] \} +. \} +. PRINT_AUTHORS +. \} +. FAMILY \\*[$DOCTYPE_FAM] +. FT \\*[$DOCTYPE_FT] +. PT_SIZE \\*[$DOCTYPE_PT_SIZE] +. LS \\n[#DOCHEADER_LEAD]u +. ALD \\n[#DOCHEADER_LEAD]u +. ie \\n[#DOCTYPE_COLOR]=1 \{\ +. COLOR \\*[$DOCTYPE_COLOR] +. UNDERSCORE "\\*[$DOC_TYPE] +. \} +. el .UNDERSCORE "\\*[$DOC_TYPE] +.END +\# +\# +\# 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 \} +. \} +. 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 +. \} +. \} +. el \{\ +. ie '\\$1'' \{\ +. rr #COVERS_OFF +. nr #COVERS 1 +. \} +. el \{\ +. 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 . \} -. FAMILY \\*[$DOCTYPE_FAM] -. FT \\*[$DOCTYPE_FT] -. PT_SIZE \\*[$DOCTYPE_PT_SIZE] -. LS \\n[#DOCHEADER_LEAD]u -. ALD \\n[#DOCHEADER_LEAD]u -. UNDERSCORE "\\*[$DOC_TYPE] +. 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 \{\ +. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\ +. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$DOC_TITLE]\m[] +. \} +. el \{ .PRINT \\*[$DOC_TITLE] \} +. \} +. \} +. if \\n[#DOC_COVER_TITLE]=3 \{\ +. 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 \\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 \# \# @@ -3982,50 +5863,187 @@ y\\R'#DESCENDER \\n[.cdp]' . ab PRINTSTYLE missing . \} . nr #DOCS 1 -. DEFAULTS +. 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 \{\ +\!. 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 +. \} +. el \{\ +. nr #FIRST_DOC_TITLE_PN \\n%+\\n[#PAGE_NUM_ADJ] +. af #FIRST_DOC_TITLE_PN \\g[#PAGENUMBER] +. nr #FIRST_DOC_TOC_PN_PADDING \\n[#TOC_PN_PADDING] +. \} +.\" 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 . ie \\n[#DOC_HEADER]=0 \{\ . PRINT \& . if \\n[#DOC_TYPE]=4 \{\ . if !'\\n(.z'' \{ .di \} . \} -. ie r#ADVANCE_FROM_TOP \{ .sp |\\n[#ADVANCE_FROM_TOP]u-1v \} -. el \{ .sp |\\n[#T_MARGIN]u-1v \} +. nr #STORED_PP_INDENT \\n[#PP_INDENT] +. PARA_INDENT 0 . PP +. PARA_INDENT \\n[#STORED_PP_INDENT]u +. rr #STORED_PP_INDENT +. ie r#ADVANCE_FROM_TOP \{\ +. sp |\\n[#ADVANCE_FROM_TOP]u-1v +. if \\n[#ADJ_DOC_LEAD]=1 \{ .SHIM \} +. \} +. el \{ .sp |\\n[#T_MARGIN]u-1v \} +. if \\n[#COLUMNS] \{\ +. mk dc +. nr #COL_NUM 0 1 +. po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u +. nr #L_MARGIN \\n(.o +. ll \\n[#COL_L_LENGTH]u +. \} . nr #PP 0 . rr #DOC_HEADER . if r#ADVANCE_FROM_TOP \{ .rr #ADVANCE_FROM_TOP \} . \} . el \{\ -. if \\n[#PRINT_STYLE]=2 \{ .LS \\n[#DOC_LEAD]u+\\n[#DOCHEADER_LEAD_ADJ]u \} +. 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 -. ev TITLE +. ev DOCHEADER +. if \\n[#DOCHEADER_COLOR]=1 \{\ +. nf +\m[\\*[$DOCHEADER_COLOR]] +. 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 @@ -4051,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 \} @@ -4081,19 +6099,22 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . ev . \} -\# Chapter +.\" Chapter . if \\n[#DOC_TYPE]=2 \{\ . PRINT \& . sp |\\n[#DOCHEADER_ADVANCE]u-1v -. ev TITLE +. ev DOCHEADER +. if \\n[#DOCHEADER_COLOR]=1 \{\ +. nf +\m[\\*[$DOCHEADER_COLOR]] +. 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 @@ -4130,19 +6151,22 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . ev . \} -\# Named +.\" Named . if \\n[#DOC_TYPE]=3 \{\ . PRINT \& . sp |\\n[#DOCHEADER_ADVANCE]u-1v -. ev NAMED +. ev DOCHEADER +. if \\n[#DOCHEADER_COLOR]=1 \{\ +. nf +\m[\\*[$DOCHEADER_COLOR]] +. 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 @@ -4168,13 +6192,13 @@ 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 \} . \} -. \} . vs \\n[#DOC_LEAD]u +. \} . el \{\ . ie !d$SUBTITLE \{\ . ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u*2u \} @@ -4205,34 +6229,98 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . if !\\n[#DOC_TYPE]=4 \{\ . if \\n[#PRINT_STYLE]=1 \{ .ALD \\n[#DOC_LEAD]u \} -. nr #DOCHEADER_SPACE_ADJ \\n[#DOCHEADER_DEPTH]%\\n[#DOC_LEAD] \"Do we need the units? -. ie !\\n[#DOCHEADER_SPACE_ADJ]=0 \{ .nr #DOCHEADER_EXTRA_SPACE \\n[#DOC_LEAD]u-\\n[#DOCHEADER_SPACE_ADJ]u \} +. nr #DOCHEADER_SPACE_ADJ \\n[#DOCHEADER_DEPTH]%\\n[#DOC_LEAD] +. ie !\\n[#DOCHEADER_SPACE_ADJ]=0 \{ .nr #DOCHEADER_EXTRA_SPACE \\n[#DOC_LEAD]-\\n[#DOCHEADER_SPACE_ADJ] \} . el \{ .nr #DOCHEADER_EXTRA_SPACE 0 \} . if \\n[#PRINT_STYLE]=2 \{ .ALD (\\n[#DOC_LEAD]u*2u)+\\n[#DOCHEADER_EXTRA_SPACE]u \} . if \\n[#COLUMNS] \{\ . nr #COL_NUM 0 1 . nr #L_LENGTH_FOR_EPI \\n[#L_LENGTH] . po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u +. nr #L_MARGIN \\n(.o . LL \\n[#COL_L_LENGTH]u . ta \\n(.lu . mk dc . \} . \} . \} -. rr #DOCHEADER_LEAD -. rr #DOCHEADER_LEAD_ADJ +. LS \\n[#DOC_LEAD]u +. if \\n[#ADJ_DOC_LEAD]=1 \{ .SHIM \} +. QUAD \\*[$DOC_QUAD] +. 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 #ADVANCE_FROM_TOP -. rr #DOCHEADER_SPACE_ADJ . rr #DOCHEADER_EXTRA_SPACE -. rr #AUTHORS +. rr #DOCHEADER_LEAD +. rr #DOCHEADER_SPACE_ADJ +. rr #MISC_NUM +. rr #MISCS . rr #NEXT_AUTHOR -. rr #AUTHOR_NUM +. rr #NEXT_MISC . rr #NUM_AUTHORS -. nr #START 1 -. nr #START_FOR_FOOTERS 1 .END \# \# ==================================================================== @@ -4266,13 +6354,13 @@ y\\R'#DESCENDER \\n[.cdp]' \# *Arguments: \# <+|- amount by which to in/decrease leading of doc header> \# *Function: -\# Stores user supplied lead in/decrease in register #DOCHEADER_LEAD_ADJ. +\# Stores user supplied lead in/decrease in string $DOCHEADER_LEAD_ADJ. \# *Notes: \# A unit of measure must be supplied. Decimal fractions OK. \# Default is +0, i.e. same as DOC_LEAD. \# .MAC DOCHEADER_LEAD END -. nr #DOCHEADER_LEAD_ADJ (\\$1) +. ds $DOCHEADER_LEAD_ADJ \\$1 .END \# \# @@ -4291,234 +6379,6 @@ y\\R'#DESCENDER \\n[.cdp]' .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 -\# -\# -\# 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 -\# -\# -\# 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 -\# -\# -\# 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 -\# -\# \# DOCUMENT LEFT MARGIN \# -------------------- \# *Argument: @@ -4580,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] @@ -4592,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 \# \# @@ -4601,7 +6461,7 @@ y\\R'#DESCENDER \\n[.cdp]' \# *Argument: \# \# *Function: -\# Creates or modifies register $DOC_PT_SIZE. +\# Creates or modifies register #DOC_PT_SIZE. \# *Notes: \# DOC_PT_SIZE is the basis for calculating all type sizes in \# a document. @@ -4640,6 +6500,7 @@ y\\R'#DESCENDER \\n[.cdp]' . if '\\$2'ADJUST' \{ .TRAPS \} .END \# +\# \# ADJUST DOCUMENT LEAD \# -------------------- \# *Arguments: @@ -4649,30 +6510,62 @@ 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 \# \# -\# DOCUMENT QUAD -\# ------------- -\# *Arguments: -\# L | LEFT | R | RIGHT | C | CENTER | CENTRE | J | JUSTIFY +\# SHIM +\# ---- +\# *Argument: +\# None \# *Function: -\# Creates or modifies string $DOC_QUAD. +\# Advances to the next "legal" baseline. \# *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. +\# If a user plays around with spacing in a doc (say, with ALD), +\# it isn't easy to get mom back on track so she can achieve +\# perfectly flush bottom margins. Any time SHIM is used, it +\# ensures that the next output line falls on a legal baseline. \# -\# Default is LEFT for printstyle TYPEWRITE, JUSTIFY for printstyle -\# TYPESET. +\# First, a little convenience macro \# -.MAC DOC_QUAD END -. ds $DOC_QUAD \\$1 -. QUAD \\*[$DOC_QUAD] +.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 #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] +. \} +. el \{\ +. PROCESS_SHIM +. \} +. \} +. el \{\ +. PROCESS_SHIM +. \} +. ALD \\n[#SHIM]u +. rr #CURRENT_V_POS +.END +\# +\# +\# \# ==================================================================== \# \# +++INTERNATIONALIZATION+++ @@ -4750,6 +6643,7 @@ y\\R'#DESCENDER \\n[.cdp]' . CAPS OFF .END \# +\# \# ==================================================================== \# \# +++RECTO/VERSO+++ @@ -4775,65 +6669,6 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# +++EPIGRAPHS+++ \# -\# EPIGRAPH FAMILY -\# --------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $EPI_FAM. -\# *Notes: -\# Default is same as running text. -\# -.MAC EPIGRAPH_FAMILY END -. ds $EPI_FAM \\$1 -.END -\# -\# -\# EPIGRAPH FONT -\# ------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $EPI_FT. -\# *Notes: -\# Default is same as running text. -\# -.MAC EPIGRAPH_FONT END -. ds $EPI_FT \\$1 -.END -\# -\# -\# EPIGRAPH SIZE -\# ------------- -\# *Argument: -\# <-|+ number of points by which to de/increase point size of epigraphs -\# (relative to running text)> -\# *Function: -\# Creates or modifies string $EPI_SIZE_CHANGE. -\# *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. -\# -.MAC EPIGRAPH_SIZE END -. ds $EPI_SIZE_CHANGE \\$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: @@ -4883,6 +6718,10 @@ y\\R'#DESCENDER \\n[.cdp]' .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 \} @@ -4891,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 @@ -4921,11 +6761,19 @@ y\\R'#DESCENDER \\n[.cdp]' . FAMILY \\*[$EPI_FAM] . FT \\*[$EPI_FT] . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$EPI_SIZE_CHANGE] +. if \\n[#EPI_COLOR]=1 \{\ +. nf +\m[\\*[$EPI_COLOR]] +. 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 \{\ @@ -4971,9 +6819,16 @@ y\\R'#DESCENDER \\n[.cdp]' . FAMILY \\*[$EPI_FAM] . FT \\*[$EPI_FT] . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$EPI_SIZE_CHANGE] +. if \\n[#EPI_COLOR]=1 \{\ +. nf +\m[\\*[$EPI_COLOR]] +. 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 @@ -5003,13 +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] \} +. 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] \{\ @@ -5024,7 +6893,9 @@ y\\R'#DESCENDER \\n[.cdp]' . ie \\n[#EPI_DEPTH]<\\n[#TRAP_DISTANCE] \{\ . nr #EPI_FITS 1 . 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] \} +. 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 \} . \} @@ -5036,20 +6907,28 @@ 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 \} +. 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] \} +. 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 \} . \} . \} . if \\n[#EPIGRAPH]=1 \{\ . po \\n[#L_MARGIN]u -. if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \} +. if \\n[#COLUMNS] \{\ +. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u +. nr #L_MARGIN \\n(.o +. \} . \} . if \\n[#EPIGRAPH]=2 \{\ . nr #EPI_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE]) @@ -5065,8 +6944,10 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#PRINT_STYLE]=1 \{\ . ie \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \} . el \{\ -. if \\n[#EPI_WHITESPACE]=\\n[#DOC_LEAD] \{ .ALD \\n[#DOC_LEAD]u/2u \} +. 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] \{\ @@ -5075,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 \{\ @@ -5083,7 +6965,9 @@ y\\R'#DESCENDER \\n[.cdp]' . ie \\n[#FN_FOR_EPI] \{\ . nr #EPI_LINES_TO_END 1 . 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] \} +. 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 \{\ @@ -5102,10 +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] \} +. 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] \{\ @@ -5122,13 +7008,21 @@ y\\R'#DESCENDER \\n[.cdp]' . ALD \\n[#DOC_LEAD]u . QUAD \\*[$DOC_QUAD] . po \\n[#L_MARGIN]u -. if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \} +. if \\n[#COLUMNS] \{\ +. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u +. nr #L_MARGIN \\n(.o +. \} . if \\n[#START] \{\ . if \\n[#COLUMNS] \{\ . po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u +. nr #L_MARGIN \\n(.o . mk dc . \} . \} +. if \\n[#LINENUMBERS]=2 \{\ +. NUMBER_LINES RESUME +. nr #LINENUMBERS 1 +. \} .END \# \# ==================================================================== @@ -5143,18 +7037,26 @@ y\\R'#DESCENDER \\n[.cdp]' \# Deposits --END-- at the end of a document. \# .MAC FINIS END +. br +. ev FINIS +. evc 0 . if \\n[#TAB_ACTIVE] \{ .TQ \} . if \\n[#INDENT_ACTIVE] \{ .IQ CLEAR \} -. FOOTERS OFF -. PAGINATION OFF . nr #EM_ADJUST (1m/8) -. if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \} +. if \\n[#COLUMNS] \{\ +. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u +. nr #L_MARGIN \\n(.o +. \} . ALD \\n[#DOC_LEAD]u . CENTER . if \\n[#PRINT_STYLE]=1 \{ .PRINT "--\\*[$FINIS_STRING]--\} . if \\n[#PRINT_STYLE]=2 \{\ -. PRINT "\v'-\\n[#EM_ADJUST]u'\(em\v'+\\n[#EM_ADJUST]u'\\*[$FINIS_STRING]\v'-\\n[#EM_ADJUST]u'\*[FU1]\(em +. 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 \# \# ==================================================================== @@ -5168,47 +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 RULE GAP \# --------------- \# *Argument: @@ -5252,48 +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 CAPS \# ---------------- \# *Argument: @@ -5310,7 +7129,7 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . el \{\ . nr #HDRFTR_LEFT_CAPS 0 -. ds $HDRFTR_RIGHT_SIZE_CHANGE +0 +. ds $HDRFTR_LEFT_SIZE_CHANGE +0 . \} .END \# @@ -5338,52 +7157,18 @@ y\\R'#DESCENDER \\n[.cdp]' \# .MAC HDRFTR_CENTER END . nr #USER_DEF_HDRFTR_CENTER 1 +. if '\\$0'FOOTER_CENTER' \{\ +. ds $HDRFTR_CENTER_OLD \\*[$HDRFTR_CENTER] +. ds $HDRFTR_CENTER_NEW \\$1 +. \} +. if '\\$0'FOOTER_CENTRE' \{\ +. ds $HDRFTR_CENTER_OLD \\*[$HDRFTR_CENTER] +. ds $HDRFTR_CENTER_NEW \\$1 +. \} . ds $HDRFTR_CENTER \\$1 .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 CAPS \# ------------------ \# *Argument: @@ -5396,7 +7181,7 @@ y\\R'#DESCENDER \\n[.cdp]' \# .MAC HDRFTR_CENTER_CAPS END . ie '\\$1'' \{\ -. nr #HDRFTR_CENTER_CAPS 1 +. nr #HDRFTR_CENTER_CAPS 1 . \} . el \{\ . nr #HDRFTR_CENTER_CAPS 0 @@ -5405,6 +7190,50 @@ y\\R'#DESCENDER \\n[.cdp]' .END \# \# +\# HDRFTR CENTER PADDING +\# --------------------- +\# *Argument: +\# LEFT | RIGHT +\# *Function: +\# Creates or modifies registers #HDRFTR_CTR_PAD_LEFT or +\# #HDRFTR_CTR_PAD_RIGHT. +\# *Notes: +\# By default, the HDRFTR_CENTER string is centered on the doc +\# line length. Long titles or long author names can screw up +\# visual centering, or create overprints. This macro allows the +\# user to pad the center string by the specified amount of space +\# to fix these problems. Use only one of LEFT or RIGHT. +\# +\# A unit of measure is required. +\# +.MAC HDRFTR_CENTER_PAD END +. if '\\$1'LEFT' \{\ +. nr #HDRFTR_CTR_PAD_LEFT (\\$2) +. \} +. if '\\$1'RIGHT' \{\ +. nr #HDRFTR_CTR_PAD_RIGHT (\\$2) +. \} +.END +\# +\# +\# SWITCH HDRFTR CENTER PADDING SIDE - support macro +\# -------------------------------- +\# *Argument: +\# +\# *Function: +\# Switches the padding side of hdrftr center padding. +\# *Notes: +\# Required to keep spacing around hdrftr string constant +\# in recto/verso documents. +\# +.MAC SWITCH_HDRFTR_CENTER_PAD END +. nr #HDRFTR_CTR_PAD_TMP \\n[#HDRFTR_CTR_PAD_LEFT] +. HDRFTR_CENTER_PAD LEFT \\n[#HDRFTR_CTR_PAD_RIGHT]u +. HDRFTR_CENTER_PAD RIGHT \\n[#HDRFTR_CTR_PAD_TMP]u +.END +\# +\# \# HDRFTR RIGHT \# ------------ \# *Argument: @@ -5431,48 +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 CAPS \# ----------------- \# *Argument: @@ -5485,7 +7272,7 @@ y\\R'#DESCENDER \\n[.cdp]' \# .MAC HDRFTR_RIGHT_CAPS END . ie '\\$1'' \{\ -. nr #HDRFTR_RIGHT_CAPS 1 +. nr #HDRFTR_RIGHT_CAPS 1 . \} . el \{\ . nr #HDRFTR_RIGHT_CAPS 0 @@ -5493,24 +7280,35 @@ y\\R'#DESCENDER \\n[.cdp]' . \} .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' \{\ . ie \\n[#USERDEF_HDRFTR] \{\ . nr #CAP_HEIGHT_ADJUST \\n[#HDRFTR_HEIGHT] -. PT_SIZE 12 -. if \\n[#HEADERS_ON] \{ .ALD \\n[#HDRFTR_RULE_GAP]u \} +. ps 12 +. if \\n[#HEADERS_ON] \{\ +. rt \\nyu +. ALD \\n[#HDRFTR_RULE_GAP]u +. \} . if \\n[#FOOTERS_ON] \{\ +. rt \\nyu . RLD \\n[#HDRFTR_RULE_GAP]u+\\n[#CAP_HEIGHT_ADJUST]u+1p . \} -. PRINT \\l'\\n[#DOC_L_LENGTH]u' +. ie \\n[#HDRFTR_RULE_COLOR]=1 \{\ +. PRINT \m[\\*[$HDRFTR_RULE_COLOR]]\\l'\\n[#DOC_L_LENGTH]u'\m[] +. \} +. el \{\ +. PRINT \\l'\\n[#DOC_L_LENGTH]u' +. \} . br . \} . el \{\ @@ -5527,12 +7325,21 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . el \{ .nr #CAP_HEIGHT_ADJUST \\n[#RIGHT_CAP_HEIGHT] \} . \} -. PT_SIZE 12 -. if \\n[#HEADERS_ON] \{ .ALD \\n[#HDRFTR_RULE_GAP]u \} -. if \\n[#FOOTERS_ON] \{\ -. RLD \\n[#LEAD]u*3u+\\n[#HDRFTR_RULE_GAP]u+\\n[#CAP_HEIGHT_ADJUST]u+1p +. ps 12 +. if \\n[#HEADERS_ON] \{\ +. rt \\nyu +. ALD \\n[#HDRFTR_RULE_GAP]u +. \} +. if \\n[#FOOTERS_ON] \{\ +. rt \\nyu +. RLD \\n[#HDRFTR_RULE_GAP]u+\\n[#CAP_HEIGHT_ADJUST]u+1p +. \} +. ie \\n[#HDRFTR_RULE_COLOR]=1 \{\ +. PRINT \m[\\*[$HDRFTR_RULE_COLOR]]\\l'\\n[#DOC_L_LENGTH]u'\m[] +. \} +. el \{\ +. PRINT \\l'\\n[#DOC_L_LENGTH]u' . \} -. PRINT \\l'\\n[#DOC_L_LENGTH]u' . br . \} . \} @@ -5581,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 \} @@ -5613,7 +7422,9 @@ y\\R'#DESCENDER \\n[.cdp]' \# *Notes: \# For use when users don't want 3-part headers/footers, but rather \# want to design their own headers/footers and need different -\# headers/footers on recto and verso pages. +\# headers/footers on recto and verso pages. Using just +\# HEADER_RECTO, even when recto/verso is not on, allows users to +\# design their own headers/footers for doc pages. \# .MAC HDRFTR_RECTO END . nr #USERDEF_HDRFTR 1 @@ -5706,7 +7517,6 @@ y\\R'#DESCENDER \\n[.cdp]' . if !\\n[#PRINT_FOOTER_ON_PAGE_1] \{ .return \} . \} . \} -. if \\n[#HEADERS_ON] \{ .vs 0 \} . if \\n[#USERDEF_HDRFTR] \{\ . PRINT_USERDEF_HDRFTR . return @@ -5721,12 +7531,17 @@ y\\R'#DESCENDER \\n[.cdp]' . nr #HDRFTR_TMP_CAPS_SWITCH \\n[#HDRFTR_LEFT_CAPS] . nr #HDRFTR_LEFT_CAPS \\n[#HDRFTR_RIGHT_CAPS] . nr #HDRFTR_RIGHT_CAPS \\n[#HDRFTR_TMP_CAPS_SWITCH] +. ds $HDRFTR_TMP_COLOR_SWITCH \\*[$HDRFTR_LEFT_COLOR] +. ds $HDRFTR_LEFT_COLOR \\*[$HDRFTR_RIGHT_COLOR] +. ds $HDRFTR_RIGHT_COLOR \\*[$HDRFTR_TMP_COLOR_SWITCH] . rr #HDRFTR_TMP_CAPS_SWITCH . rm $HDRFTR_TMP_SWITCH . rm $HDRFTR_TMP_SIZE_CHANGE_SWITCH +. rm $HDRFTR_TMP_COLOR_SWITCH . nr #SWITCH_HDRFTR 0 . \} . nr #PAGENUMBER \\n%+\\n[#PAGE_NUM_ADJ] +. if \\n[#ENDNOTES] \{ .PAGENUM_STYLE \\*[$EN_PN_STYLE] \} . if \\n[#PRINT_STYLE]=1 \{\ . if \\n[#FOOTERS_ON] \{\ . di NULL @@ -5748,11 +7563,12 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#HDRFTR_LEFT_CAPS] \{ .CAPS OFF \} . CENTER . if \\n[#HDRFTR_CENTER_CAPS] \{ .CAPS \} +. rt \\nyu . ie '\\*[$HDRFTR_CENTER]'#' \{\ -. PRINT \\v'-(\\n[#LEAD]u*1u)'\\n[#PAGENUMBER] +. PRINT \\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\\n[#PAGENUMBER]\\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u' . \} . el \{\ -. ie !'\\*[$HDRFTR_CENTER]'' \{ .PRINT \\v'-(\\n[#LEAD]u*1u)'\\*[$HDRFTR_CENTER] \} +. ie !'\\*[$HDRFTR_CENTER]'' \{ .PRINT \\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\\*[$HDRFTR_CENTER]\\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u' \} . el \{ .PRINT \& \} . \} . if \\n[#HDRFTR_CENTER_CAPS] \{ .CAPS OFF \} @@ -5760,19 +7576,26 @@ y\\R'#DESCENDER \\n[.cdp]' . if e \{ .RIGHT \} . if \\n[#RECTO_VERSO]=0 \{ .RIGHT \} . if \\n[#HDRFTR_RIGHT_CAPS] \{ .CAPS \} +. rt \\nyu . ie '\\*[$HDRFTR_RIGHT]'#' \{\ -. PRINT \\v'-(\\n[#LEAD]u*2u)'\\n[#PAGENUMBER] +. PRINT \\n[#PAGENUMBER] . \} . el \{\ -. ie !'\\*[$HDRFTR_RIGHT]'' \{ .PRINT \v'-(\\n[#LEAD]u*2u)'\\*[$HDRFTR_RIGHT] \} +. ie !'\\*[$HDRFTR_RIGHT]'' \{ .PRINT \\*[$HDRFTR_RIGHT] \} . el \{ .PRINT \& \} . \} . if \\n[#HDRFTR_RIGHT_CAPS] \{ .CAPS OFF \} . \} . if \\n[#PRINT_STYLE]=2 \{\ -. FAMILY \\*[$HDRFTR_LEFT_FAM] -. FT \\*[$HDRFTR_LEFT_FT] -. PT_SIZE \\n[#HDRFTR_PT_SIZE]u\\*[$HDRFTR_LEFT_SIZE_CHANGE] +. if \\n[#HDRFTR_COLOR]=1 \{\ +. nf +\m[\\*[$HDRFTR_COLOR]] +. EOL +. \} +. fam \\*[$HDRFTR_LEFT_FAM] +. ft \\*[$HDRFTR_LEFT_FT] +. ps \\n[#HDRFTR_PT_SIZE]u\\*[$HDRFTR_LEFT_SIZE_CHANGE] +. vs 12 . if \\n[#FOOTERS_ON] \{\ . di NULL . SIZESPECS @@ -5783,15 +7606,30 @@ y\\R'#DESCENDER \\n[.cdp]' . if e \{ .RIGHT \} . if \\n[#RECTO_VERSO]=0 \{ .LEFT \} . if \\n[#HDRFTR_LEFT_CAPS] \{ .CAPS \} -. ie '\\*[$HDRFTR_LEFT]'#' \{ .PRINT \\n[#PAGENUMBER] \} +. ie '\\*[$HDRFTR_LEFT]'#' \{\ +. ie \\n[#HDRFTR_LEFT_COLOR]=1 \{\ +. PRINT \m[\\*[$HDRFTR_LEFT_COLOR]]\\n[#PAGENUMBER]\m[] +. \} +. el \{\ +. PRINT \\n[#PAGENUMBER] +. \} +. \} . el \{\ -. ie !'\\*[$HDRFTR_LEFT]'' \{ . PRINT \\*[$HDRFTR_LEFT] \} +. ie !'\\*[$HDRFTR_LEFT]'' \{\ +. ie \\n[#HDRFTR_LEFT_COLOR]=1 \{\ +. PRINT \m[\\*[$HDRFTR_LEFT_COLOR]]\\*[$HDRFTR_LEFT]\m[] +. \} +. el \{\ +. PRINT \\*[$HDRFTR_LEFT] +. \} +. \} . el \{ .PRINT \& \} . \} . if \\n[#HDRFTR_LEFT_CAPS] \{ .CAPS OFF \} -. FAMILY \\*[$HDRFTR_CENTER_FAM] -. FT \\*[$HDRFTR_CENTER_FT] -. PT_SIZE \\n[#HDRFTR_PT_SIZE]u\\*[$HDRFTR_CENTER_SIZE_CHANGE] +. fam \\*[$HDRFTR_CENTER_FAM] +. ft \\*[$HDRFTR_CENTER_FT] +. ps \\n[#HDRFTR_PT_SIZE]u\\*[$HDRFTR_CENTER_SIZE_CHANGE] +. vs 12 . if \\n[#FOOTERS_ON] \{\ . di NULL . SIZESPECS @@ -5800,17 +7638,31 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . CENTER . if \\n[#HDRFTR_CENTER_CAPS] \{ .CAPS \} +. rt \\nyu . ie '\\*[$HDRFTR_CENTER]'#' \{\ -. PRINT \\v'-(\\n[#LEAD]u*1u)'\\n[#PAGENUMBER] +. ie \\n[#HDRFTR_CENTER_COLOR]=1 \{\ +. PRINT \\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\m[\\*[$HDRFTR_CENTER_COLOR]]\\n[#PAGENUMBER]\\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u'\m[] +. \} +. el \{\ +. PRINT \\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\\n[#PAGENUMBER]\\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u' +. \} . \} . el \{\ -. ie !'\\*[$HDRFTR_CENTER]'' \{ .PRINT \\v'-(\\n[#LEAD]u*1u)'\\*[$HDRFTR_CENTER] \} +. ie !'\\*[$HDRFTR_CENTER]'' \{\ +. ie \\n[#HDRFTR_CENTER_COLOR]=1 \{\ +. PRINT \\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\m[\\*[$HDRFTR_CENTER_COLOR]]\\*[$HDRFTR_CENTER]\\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u'\m[] +. \} +. el \{\ +. PRINT \\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\\*[$HDRFTR_CENTER]\\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u' +. \} +. \} . el \{ .PRINT \& \} . \} . if \\n[#HDRFTR_CENTER_CAPS] \{ .CAPS OFF \} -. FAMILY \\*[$HDRFTR_RIGHT_FAM] -. FT \\*[$HDRFTR_RIGHT_FT] -. PT_SIZE \\n[#HDRFTR_PT_SIZE]u\\*[$HDRFTR_RIGHT_SIZE_CHANGE] +. fam \\*[$HDRFTR_RIGHT_FAM] +. ft \\*[$HDRFTR_RIGHT_FT] +. ps \\n[#HDRFTR_PT_SIZE]u\\*[$HDRFTR_RIGHT_SIZE_CHANGE] +. vs 12 . if \\n[#FOOTERS_ON] \{\ . di NULL . SIZESPECS @@ -5821,11 +7673,24 @@ y\\R'#DESCENDER \\n[.cdp]' . if e \{ .LEFT \} . if \\n[#RECTO_VERSO]=0 \{ .RIGHT \} . if \\n[#HDRFTR_RIGHT_CAPS] \{ .CAPS \} +. rt \\nyu . ie '\\*[$HDRFTR_RIGHT]'#' \{\ -. PRINT \\v'-(\\n[#LEAD]u*2u)'\\n[#PAGENUMBER] +. ie \\n[#HDRFTR_RIGHT_COLOR]=1 \{\ +. PRINT \m[\\*[$HDRFTR_RIGHT_COLOR]]\\n[#PAGENUMBER]\m[] +. \} +. el \{\ +. PRINT \\n[#PAGENUMBER] +. \} . \} . el \{\ -. ie !'\\*[$HDRFTR_RIGHT]'' \{ .PRINT \v'-(\\n[#LEAD]u*2u)'\\*[$HDRFTR_RIGHT] \} +. ie !'\\*[$HDRFTR_RIGHT]'' \{\ +. ie \\n[#HDRFTR_RIGHT_COLOR]=1 \{\ +. PRINT \m[\\*[$HDRFTR_RIGHT_COLOR]]\\*[$HDRFTR_RIGHT]\m[] +. \} +. el \{\ +. PRINT \\*[$HDRFTR_RIGHT] +. \} +. \} . el \{ .PRINT \& \} . \} . if \\n[#HDRFTR_RIGHT_CAPS] \{ .CAPS OFF \} @@ -5833,6 +7698,7 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#HDRFTR_RULE] \{\ . HDRFTR_RULE_INTERNAL . \} +. br .END \# \# @@ -5853,6 +7719,10 @@ y\\R'#DESCENDER \\n[.cdp]' . FAMILY \\*[$HDRFTR_FAM] . FT R . PT_SIZE \\n[#HDRFTR_PT_SIZE]u +. if \\n[#HDRFTR_COLOR]=1 \{\ +. nf +. COLOR \\*[$HDRFTR_COLOR] +. \} . \} . ie \\n[#RECTO_VERSO] \{\ . if o \{\ @@ -5860,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 @@ -5873,21 +7743,21 @@ y\\R'#DESCENDER \\n[.cdp]' . if \\n[#USERDEF_HDRFTR_VERSO_QUAD]=1 \{ .LEFT \} . if \\n[#USERDEF_HDRFTR_VERSO_QUAD]=2 \{ .CENTER \} . if \\n[#USERDEF_HDRFTR_VERSO_QUAD]=3 \{ .RIGHT \} -. \} -. PRINT \\*[$USERDEF_HDRFTR_VERSO] -. EL -. if \\n[#FOOTERS_ON] \{\ -. di NULL -. SIZESPECS -. nr #HDRFTR_HEIGHT \\n[#CAP_HEIGHT] -. di +. PRINT \\*[$USERDEF_HDRFTR_VERSO] +. EOL +. if \\n[#FOOTERS_ON] \{\ +. di NULL +. SIZESPECS +. nr #HDRFTR_HEIGHT \\n[#CAP_HEIGHT] +. di +. \} . \} . el \{\ . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=1 \{ .LEFT \} . 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 @@ -5902,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 @@ -5911,6 +7781,10 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . \} . fc +. if \\n[#PRINT_STYLE]=2 \{\ +. ie \\n[#HDRFTR_COLOR]=1 \m[\\*[$HDRFTR_COLOR]] +. el \m[black] +. \} . if \\n[#HDRFTR_RULE] \{\ . HDRFTR_RULE_INTERNAL . \} @@ -5976,37 +7850,46 @@ 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] \{\ -. nr #DOC_LR_MARGIN_TMP \\n[#DOC_L_MARGIN] -. DOC_LEFT_MARGIN \\n[#DOC_R_MARGIN]u -. DOC_RIGHT_MARGIN \\n[#DOC_LR_MARGIN_TMP]u +. if !\\n[#TOC_RV_SWITCH] \{\ +. nr #DOC_LR_MARGIN_TMP \\n[#DOC_L_MARGIN] +. DOC_LEFT_MARGIN \\n[#DOC_R_MARGIN]u +. DOC_RIGHT_MARGIN \\n[#DOC_LR_MARGIN_TMP]u +. SWITCH_HDRFTR_CENTER_PAD +. \} +. rr #TOC_RV_SWITCH . \} . ev HEADER -. if \\n[#PRINT_STYLE]=1 \{ .vs 0 \} -. if \\n[#PRINT_STYLE]=2 \{ .LS 0 \} +. if \\n[#PAGE_NUM_V_POS]=1 \{ .vs 0 \} . sp |\\n[#HEADER_MARGIN]u-1v +. mk y . ll \\n[#DOC_L_LENGTH]u . ta \\n(.lu -. if \\n[#PRINT_STYLE]=2 \{\ -. FAMILY \\*[$HDRFTR_FAM] -. FT R -. PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$HDRFTR_SIZE_CHANGE] -. \} . if \\n[#PRINT_STYLE]=1 \{\ . fam C . ft R . ps 12\\*[$HDRFTR_SIZE_CHANGE] . \} +. if \\n[#PRINT_STYLE]=2 \{\ +. fam \\*[$HDRFTR_FAM] +. ft R +. ps \\n[#DOC_PT_SIZE]u\\*[$HDRFTR_SIZE_CHANGE] +. vs 12 +. \} . nr #HDRFTR_PT_SIZE \\n[#PT_SIZE] . if \\n[#CAPS_ON] \{\ . nr #CAPS_WAS_ON 1 @@ -6016,6 +7899,15 @@ y\\R'#DESCENDER \\n[.cdp]' . nr #UNDERLINE_WAS_ON 1 . UNDERLINE OFF . \} +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#ENDNOTES]=1 \{\ +.\" 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 +. \} +. \} +. \} . ie \\n[#HEADERS_ON] \{\ . PRINT_HDRFTR . sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u @@ -6030,6 +7922,14 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . el \{ .sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u \} . \} +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#ENDNOTES]=1 \{\ +. if \\n[#EN_SINGLESPACE] \{\ +. nr #DOC_LEAD \\n[#RESTORE_DOC_LEAD]u +. rr #RESTORE_DOC_LEAD +. \} +. \} +. \} . nr #PAGE_TOP \\n(nl . ev . po \\n[#L_MARGIN]u @@ -6051,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] \} @@ -6067,15 +7968,19 @@ y\\R'#DESCENDER \\n[.cdp]' . el \{\ . ie \\n[#EPI_FITS] \{ .ns \} . el \{ .ALD \\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u \} -. \} +. \} . \} . 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 . mk dc . po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u +. nr #L_MARGIN \\n(.o +. if \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \} . ll \\n[#COL_L_LENGTH]u . ta \\n(.lu . if \\n[#QUOTE] \{\ @@ -6089,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 \# \# ==================================================================== @@ -6166,42 +8104,106 @@ y\\R'#DESCENDER \\n[.cdp]' \# FINAL respects PAGENUMBER. \# .MAC FOOTER END -. ev PAGE_BOTTOM +. 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 \} +. 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 \{\ -. sp |\\n(dcu +. ie \\n[#ENDNOTES] \{ .sp |\\n(ecu-\\n[#EN_LEAD]u \} +. el \{ .sp |\\n(dcu \} . po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u -. PROCESS_FN_LEFTOVER +. nr #L_MARGIN \\n(.o +. 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] \{\ -. nr #Q_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE]) -. if \\n[#COLUMNS] \{ .nr #Q_OFFSET \\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE]) \} -. po \\n[#Q_OFFSET]u +. ie \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \} +. el \{\ +. nr #Q_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE]) +. if \\n[#COLUMNS] \{ .nr #Q_OFFSET \\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE]) \} +. po \\n[#Q_OFFSET]u +. \} . \} . if \\n[#EPIGRAPH] \{\ -. nr #EPI_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE]) -. if \\n[#COLUMNS] \{ .nr #EPI_OFFSET \\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE]) \} -. po \\n[#EPI_OFFSET]u +. ie \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \} +. el \{\ +. nr #EPI_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE]) +. if \\n[#COLUMNS] \{ .nr #EPI_OFFSET \\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE]) \} +. po \\n[#EPI_OFFSET]u +. \} . \} . ie \\n[#EPIGRAPH] \{\ . ie !\\n[#EPI_ACTIVE] \{\ @@ -6217,6 +8219,7 @@ y\\R'#DESCENDER \\n[.cdp]' . ev . \} . ns +. rr #DIVERTED . \} . el \{ .DO_FOOTER \} .END @@ -6231,7 +8234,20 @@ y\\R'#DESCENDER \\n[.cdp]' \# Resets CAPS and UNDERLINE if they were on. \# .MAC DO_FOOTER END -. sp |\\n[#PAGE_LENGTH]u-\\n[#FOOTER_MARGIN]u-1v +.\" 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 \{\ +. vpt 0 +. sp |\\n[#PAGE_LENGTH]u-\\n[#FOOTER_MARGIN]u-1v +. mk y +. vpt 1 +. \} . ev FOOTER . po \\n[#DOC_L_MARGIN]u . ll \\n[#DOC_L_LENGTH]u @@ -6240,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 @@ -6254,13 +8269,16 @@ y\\R'#DESCENDER \\n[.cdp]' . UNDERLINE OFF . \} . ie \\n[#FOOTERS_ON] \{\ -. PRINT_HDRFTR +. if !\\n[#SKIP_FOOTER]=1 \{ .PRINT_HDRFTR \} . \} . el \{\ . if \\n[#PAGINATE] \{\ -. if \\n[#PAGE_NUM_V_POS]=2 \{ .PRINT_PAGE_NUMBER \} +. if \\n[#PAGE_NUM_V_POS]=2 \{\ +. if !\\n[#SKIP_FOOTER]=1 \{ .PRINT_PAGE_NUMBER \} +. \} . \} . \} +. rr #SKIP_FOOTER . if \\n[#CAPS_WAS_ON] \{\ . CAPS . rr #CAPS_WAS_ON @@ -6270,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 \# @@ -6399,65 +8420,6 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# ---Main heads--- \# -\# HEAD FAMILY -\# ----------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $HEAD_FAM. -\# *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: @@ -6519,7 +8481,71 @@ y\\R'#DESCENDER \\n[.cdp]' \# .MAC HEAD END . br +.\" Collect head for TOC. . nr #ARG_NUM 0 1 +. nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ] +. af #TOC_ENTRY_PN \\g[#PAGENUMBER] +. while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\ +. ie \\n[#ARG_NUM]=\\n[#NUM_ARGS] \{\ +. as $TOC_HEAD_ITEM \\$[\\n+[#ARG_NUM]]\\| +. \} +. el \{\ +.\" 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]]\ +. nr #HEAD_NUM \\n-[#HEAD_NUM] +. \} +. el \{\ +. as $TOC_HEAD_ITEM \\$[\\n+[#ARG_NUM]]\ +. \} +. \} +. el \{\ +. 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. +. ev TOC_EV +. da TOC_ENTRIES +. if \\n[#PRINT_STYLE]=1 \{\ +\!. fam C +\!. ft R +\!. ps 12 +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +\!. FAMILY \\*[$TOC_HEAD_FAM] +\!. FT \\*[$TOC_HEAD_FT] +\!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_HEAD_SIZE_CHANGE] +. \} +\!. TRAP OFF +. ie \\n[#PRINT_STYLE]=1 \{\ +\!. PAD "\\h'2m'\\*[$TOC_HEAD_ITEM]\\*[$TOC_PN_TYPEWRITE]" +. \} +. el \{\ +\!. PAD "\\h'\\n[#TOC_HEAD_INDENT]u'\\*[$TOC_HEAD_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 head for TOC +.\" Process head . nr #HEAD 1 . ev HEAD . ll \\n[#L_LENGTH]u @@ -6531,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 . \} @@ -6545,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 \{\ @@ -6574,7 +8598,7 @@ y\\R'#DESCENDER \\n[.cdp]' . el \{ .ALD \\n[#DOC_LEAD]u \} . \} . if \\n[#END_QUOTE] \{\ -. if !\\n[#Q_FITS] \{\ +. if !\\n[#Q_FITS] \{\ . RLD \\n[#DOC_LEAD]u . if \\n[#PP_ACTIVE] \{ .ALD \\n[#DOC_LEAD]u \} . \} @@ -6588,7 +8612,17 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . \} . \} +.\" 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] +. EOL +. TRAP +. \} +. \} . while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\ . ie \\n[#NUMBER_HEAD] \{\ . ie \\n[#ARG_NUM]=0 \{\ @@ -6610,7 +8644,7 @@ y\\R'#DESCENDER \\n[.cdp]' . el \{ .UNDERSCORE "\\$[\\n+[#ARG_NUM]]\} . br . \} -. \} +.\} . REMOVE_INDENT . CAPS OFF . ev @@ -6626,71 +8660,13 @@ y\\R'#DESCENDER \\n[.cdp]' . if r#Q_AT_TOP \{ .rr #Q_AT_TOP \} . if r#PP_ACTIVE \{ .rr #PP_ACTIVE \} . rr #ARG_NUM +. rm $TOC_HEAD_ITEM . nr #PP 0 .END \# \# \# ---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 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: @@ -6707,6 +8683,70 @@ y\\R'#DESCENDER \\n[.cdp]' \# .MAC SUBHEAD END . br +.\" 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] \{\ +. ie \\n[#ARG_NUM]=\\n[#NUM_ARGS] \{\ +. as $TOC_SH_ITEM \\$[\\n+[#ARG_NUM]]\\| +. \} +. el \{\ +.\" 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]]\ +. nr #SH_NUM \\n-[#SH_NUM] +. \} +. el \{\ +. as $TOC_SH_ITEM \\$[\\n+[#ARG_NUM]]\ +. \} +. \} +. el \{\ +. 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. +. ev TOC_EV +. da TOC_ENTRIES +. if \\n[#PRINT_STYLE]=1 \{\ +\!. fam C +\!. ft R +\!. ps 12 +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +\!. FAMILY \\*[$TOC_SH_FAM] +\!. FT \\*[$TOC_SH_FT] +\!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_SH_SIZE_CHANGE] +. \} +\!. TRAP OFF +. ie \\n[#PRINT_STYLE]=1 \{\ +\!. PAD "\\h'4m'\\*[$TOC_SH_ITEM]\\*[$TOC_PN_TYPEWRITE]" +. \} +. el \{\ +\!. PAD "\\h'\\n[#TOC_SH_INDENT]u'\\*[$TOC_SH_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 head for TOC +.\" Process subhead . nr #ARG_NUM 0 1 . if r#QUOTE \{ .rr #QUOTE \} . if r#Q_AT_TOP \{ .rr #Q_AT_TOP \} @@ -6719,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 @@ -6735,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 \} . \} @@ -6759,6 +8797,7 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . \} . \} +.\" Print subhead . if \\n[#PRINT_STYLE]=1 \{\ . while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\ . ie \\n[#NUMBER_SH] \{\ @@ -6786,12 +8825,13 @@ 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 \} . \} . if \\n[#PRINT_STYLE]=2 \{\ +. if \\n[#SH_COLOR]=1 \{ .COLOR \\*[$SH_COLOR] \} . ie \\n[#PP_SPACE]=0 \{\ . while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\ . ie \\n[#NUMBER_SH] \{\ @@ -6818,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 @@ -6827,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 . \} . \} @@ -6839,57 +8879,13 @@ y\\R'#DESCENDER \\n[.cdp]' . if r#Q_FITS \{ .rr #Q_FITS \} . if r#END_QUOTE \{ .rr #END_QUOTE \} . if r#LINEBREAK \{ .rr #LINEBREAK \} +. rm $TOC_SH_ITEM . nr #PP 0 . nr #HEAD 2 .END \# \# ---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 INDENT \# --------------- \# *Argument: @@ -6915,6 +8911,52 @@ y\\R'#DESCENDER \\n[.cdp]' \# PARAHEAD *must* come after PP. \# .MAC PARAHEAD END +.\" 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\\| +. nr #PH_NUM \\n-[#PH_NUM] +. \} +. el \{\ +. ds $TOC_PH_ITEM \\$1\\| +. \} +. ev TOC_EV +. da TOC_ENTRIES +. if \\n[#PRINT_STYLE]=1 \{\ +\!. fam C +\!. ft R +\!. ps 12 +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +\!. FAMILY \\*[$TOC_PH_FAM] +\!. FT \\*[$TOC_PH_FT] +\!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_PH_SIZE_CHANGE] +. \} +\!. TRAP OFF +. ie \\n[#PRINT_STYLE]=1 \{\ +\!. PAD "\\h'6m'\\*[$TOC_PH_ITEM]\\*[$TOC_PN_TYPEWRITE]" +. \} +. el \{\ +\!. PAD "\\h'\\n[#TOC_PH_INDENT]u'\\*[$TOC_PH_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 parahead for TOC +.\" Process parahead . if \\n[#SLANT_ON] \{\ . nr #SLANT_WAS_ON 1 \E*[SLANTX] @@ -6926,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] \{\ @@ -6970,38 +9010,41 @@ y\\R'#DESCENDER \\n[.cdp]' . FAM \\*[$PH_FAM] . FT \\*[$PH_FT] . PT_SIZE \\*[$PH_SIZE_CHANGE] -. ie \\n[#NUMBER_PH] \{\ -. if \\n[#NUMBER_HEAD] \{\ +. if \\n[#PH_COLOR]=1 \{ .COLOR \\*[$PH_COLOR] \} +. ie \\n[#NUMBER_PH] \{\ +. if \\n[#NUMBER_HEAD] \{\ +. ie \\n[#NUMBER_SH] \{\ +. PRINT "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n[#SH_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c" +. \} +. el \{\ +. PRINT "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c" +. \} +. \} . ie \\n[#NUMBER_SH] \{\ -. PRINT "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n[#SH_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c" +. if !\\n[#NUMBERED] \{\ +. PRINT "\\n[#SH_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c" +. \} . \} . el \{\ -. PRINT "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c" -. \} -. \} -. ie \\n[#NUMBER_SH] \{\ -. if !\\n[#NUMBERED] \{\ -. PRINT "\\n[#SH_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c" +. if !\\n[#NUMBERED] \{\ +. PRINT "\\n+[#PH_NUM].\0\\$1\h'.6m'\c" +. \} . \} . \} . el \{\ -. if !\\n[#NUMBERED] \{\ -. PRINT "\\n+[#PH_NUM].\0\\$1\h'.6m'\c" -. \} +. PRINT "\\$1\h'.6m'\c" . \} . \} -. el \{\ -. PRINT "\\$1\h'.6m'\c" -. \} -. FAMILY \\*[$DOC_FAM] -. FT \\*[$PP_FT] -. PT_SIZE \\n[#DOC_PT_SIZE]u -. 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 .END \# \# @@ -7032,7 +9075,7 @@ y\\R'#DESCENDER \\n[.cdp]' . while \\$2>\\n[#REPEAT] \{\ . as $LINEBREAK_CHAR "\\ \\$1 . nr #REPEAT \\n[#REPEAT]+1 -. \} +.\} . rr #REPEAT .END \# @@ -7059,10 +9102,13 @@ y\\R'#DESCENDER \\n[.cdp]' . ie \\n[#END_QUOTE] \{ . \} . el \{ .ALD \\n[#DOC_LEAD]u \} . \} +. ev LINEBREAK +. evc 0 . CENTER -. PRINT \\v'\\*[$LINEBREAK_CHAR_V_ADJ]'\\*[$LINEBREAK_CHAR]\\v'\\*[$LINEBREAK_CHAR_V_ADJ]' +. PRINT \m[\\*[$LINEBREAK_COLOR]]\\v'\\*[$LINEBREAK_CHAR_V_ADJ]'\\*[$LINEBREAK_CHAR]\\v'\\*[$LINEBREAK_CHAR_V_ADJ]'\m[] . if \\n[#PRINT_STYLE]=1 \{ .ALD \\n[#DOC_LEAD]u \} . if \\n[#PRINT_STYLE]=2 \{ .ALD \\n[#DOC_LEAD]u \} +. ev . QUAD \\*[$DOC_QUAD] . \} . nr #LINEBREAK 1 @@ -7165,30 +9211,22 @@ y\\R'#DESCENDER \\n[.cdp]' . br . if \\n[#DOC_TYPE]=4 \{\ . if !'\\n(.z'' \{ .di \} -. if \\n[#DATE] \{\ -. nf -. DATE -. QUAD \\*[$DOC_QUAD] -. ALD \\n[#DOC_LEAD]u*2u -. rr #DATE -. \} -. if \\n[#TO] \{\ -. nf -. TO_ADDRESS -. ALD \\n[#DOC_LEAD]u -. rr #TO -. \} -. if \\n[#FROM] \{\ -. nf -. FROM_ADDRESS -. ALD \\n[#DOC_LEAD]u -. rr #FROM -. \} -. if \\n[#GREETING] \{\ -. nf -. GREETING -. ALD \\n[#DOC_LEAD]u -. rr #GREETING +. nr #TOTAL_FIELDS \\n[#FIELD] +. nr #FIELD 0 1 +. nr #NUM_FIELDS 0 1 +. if \\n[#TOTAL_FIELDS]>0 \{\ +. while \\n+[#NUM_FIELDS]<=\\n[#TOTAL_FIELDS] \{\ +. nf +. LETTERHEAD\\n+[#FIELD] +. QUAD \\*[$DOC_QUAD] +. ALD \\n[#DOC_LEAD]u +. 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 . \} . \} . rr #PP_ACTIVE @@ -7202,14 +9240,16 @@ y\\R'#DESCENDER \\n[.cdp]' . br . if !\\n[#ENDNOTE] \{ .po \\n[#L_MARGIN]u \} . if \\n[#COLUMNS] \{\ -. if !\\n[#ENDNOTE] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \} +. if !\\n[#ENDNOTE] \{\ +. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u +. nr #L_MARGIN \\n(.o +. \} . \} . if \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \} . ie \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 -. vs \\n[#DOC_LEAD]u +. TYPEWRITER +. ie \\n[#ENDNOTE] \{ .vs \\n[#EN_LEAD]u \} +. el \{ .vs \\n[#DOC_LEAD]u \} . QUAD \\*[$DOC_QUAD] . UNDERLINE OFF . if \\n[#SLANT_ON] \{\ @@ -7221,7 +9261,7 @@ y\\R'#DESCENDER \\n[.cdp]' . FAMILY \\*[$EN_FAM] . FT \\*[$EN_FT] . PT_SIZE \\n[#EN_PS]u -. LS \\n[#DOC_LEAD]u +. vs \\n[#EN_LEAD]u . QUAD \\*[$EN_QUAD] . \} . el \{\ @@ -7257,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 \} @@ -7276,8 +9327,8 @@ y\\R'#DESCENDER \\n[.cdp]' . if r#Q_FITS \{ .rr #Q_FITS \} . if r#LINEBREAK \{ .rr #LINEBREAK \} . if \\n[#ENDNOTE] \{\ -. ie \\n[#RESET_PARA_SPACE] \{ .PARA_SPACE \} -. el \{ .PARA_SPACE OFF \} +. ie \\n[#RESET_PARA_SPACE] \{ .PARA_SPACE \} +. el \{ .PARA_SPACE OFF \} . \} . if \\n[#CONDENSE] \{\ \E*[COND]\c @@ -7321,52 +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 -\# +\# ---Line for line quotes, i.e. poetry or code snippets--- \# \# UNDERLINE QUOTES \# ---------------- @@ -7399,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: @@ -7428,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 . \} @@ -7451,8 +9485,35 @@ 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]] +. 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 . if \\n[#PRINT_STYLE]=1 \{\ @@ -7464,75 +9525,15 @@ 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: -\# -\# *Function: -\# Creates or modifies string $BQUOTE_FT. -\# *Notes: -\# Default is same as running text. -\# -.MAC BLOCKQUOTE_FONT END -. ds $BQUOTE_FT \\$1 -.END -\# -\# -\# 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 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. +\# equivalently, 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 @@ -7543,8 +9544,17 @@ y\\R'#DESCENDER \\n[.cdp]' \# .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 @@ -7573,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 . \} @@ -7584,12 +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]] +. EOL +. \} +. QUAD \\*[$BQUOTE_QUAD] +. 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 \} . \} -. QUAD \\*[$BQUOTE_QUAD] -. HY . \} . nr #Q_TOP \\n(nl . if \\n[#INDENT_FIRST_PARAS] \{\ @@ -7615,7 +9649,7 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# *Function: \# Ends the diversion P_QUOTE or B_QUOTE. Spaces them according to -\# PRINT_STYLE, whether there's inter-paragraph spacing, and page +\# PRINTSTYLE, whether there's inter-paragraph spacing, and page \# position. TYPEWRITE treats spacing the same way in all circumstance \# (viz. an extra line space). TYPESET puts in only half \# line spaces if the entire quote plus 1 line of body under the quote @@ -7623,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 \{\ @@ -7650,32 +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 . \} . \} . \} @@ -7687,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 @@ -7701,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[#Q_FITS] \{\ -. ie \\n[#Q_TOP]=\\n[#PAGE_TOP] \{\ -. nr #Q_AT_TOP 1 -. ALD \\n[#DOC_LEAD]u -. \} -. el \{\ -. ie \\n[#FULLSPACE_QUOTES] \{ .ALD \\n[#DOC_LEAD]u \} -. el \{ .ALD \\n[#DOC_LEAD]u/2u \} -. \} +. 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 +. nr #DELAY_SHIM 1 +. \} +. 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 @@ -7736,7 +9810,10 @@ y\\R'#DESCENDER \\n[.cdp]' . in \\n[#EN_TEXT_INDENT]u . \} . if \\n[#COLUMNS] \{\ -. if !\\n[#ENDNOTE] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \} +. if !\\n[#ENDNOTE] \{\ +. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u +. nr #L_MARGIN \\n(.o +. \} . if \\n[#ENDNOTE] \{\ . in \\n[#EN_TEXT_INDENT]u . \} @@ -7755,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 \# \# ==================================================================== @@ -7780,7 +9939,7 @@ y\\R'#DESCENDER \\n[.cdp]' . nr #BROKEN_QUOTE 1 . REMOVE_INDENT . ev -. nr #Q_DEPTH \\n[#DIVER_DEPTH]+(\\n[#LEAD]*1) +. nr #Q_DEPTH \\n[#DIVER_DEPTH]+\\n[#LEAD] . if \\n[#PRINT_STYLE]=1 \{\ . if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \} . if \\n[#HEAD] \{\ @@ -7808,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 @@ -7826,7 +9984,10 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . \} . po \\n[#L_MARGIN]u -. if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \} +. if \\n[#COLUMNS] \{\ +. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u +. nr #L_MARGIN \\n(.o +. \} . QUAD \\*[$DOC_QUAD] . sp |\\n[#PAGE_LENGTH]u \" To trip footer/header . BLOCKQUOTE @@ -7841,9 +10002,8 @@ y\\R'#DESCENDER \\n[.cdp]' \# *Arguments: \# | \# *Function: -\# Turns page numbering off or on. +\# Turns page numbering off or on during document processing. \# *Notes: -\# Page numbering is on by default with .PAPER. \# Default is on. \# .MAC PAGINATE END @@ -7852,48 +10012,33 @@ y\\R'#DESCENDER \\n[.cdp]' .END \# \# -\# PAGENUMBER FAMILY -\# ----------------- +\# SUSPEND PAGINATION (before ENDNOTES) +\# ------------------ \# *Argument: -\# +\# \# *Function: -\# Creates or modifies string $PAGE_NUM_FAM. +\# Creates register #SUSPEND_PAGINATION \# *Notes: -\# Default is same as running text. +\# Useful only to suspend pagination before outputting endnotes. \# -.MAC PAGENUM_FAMILY END -. ds $PAGE_NUM_FAM \\$1 +.MAC SUSPEND_PAGINATION END +. nr #SUSPEND_PAGINATION 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 -\# ---------------- +\# RESTORE PAGINATION (after ENDNOTES) +\# ------------------ \# *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. +\# Removes register #SUSPEND_PAGINATION. Creates register +\# #DEFER_PAGINATION \# *Notes: -\# Must be preceded by a +|- sign with no space afterward. -\# Fractional point sizes are allowed. -\# Default is +0. +\# Useful only to restore pagination after outputting endnotes. \# -.MAC PAGENUM_SIZE END -. ds $PAGE_NUM_SIZE_CHANGE \\$1 +.MAC RESTORE_PAGINATION END +. rr #SUSPEND_PAGINATION +. if \\n[#PAGE_NUM_V_POS]=1 \{ .PAGINATE \} +. if \\n[#PAGE_NUM_V_POS]=2 \{ .nr #DEFER_PAGINATION 1 \} .END \# \# @@ -7967,15 +10112,25 @@ y\\R'#DESCENDER \\n[.cdp]' .END \# \# +.MAC PN_WITH_HYPHENS END +. 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 +\# +\# \# PRINT PAGE NUMBER \# ----------------- \# *Arguments: \# \# *Function: -\# Prints page number if PAGEINATE=1. +\# Prints page number if PAGINATE=1. \# .MAC PRINT_PAGE_NUMBER END . ev PAGENUMBER +. nf +. na . po \\n[#DOC_L_MARGIN]u . ll \\n[#DOC_L_LENGTH]u . ta \\n(.lu @@ -7983,9 +10138,7 @@ 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 \{ .vs 0 \} . if o \{\ @@ -7993,23 +10146,69 @@ y\\R'#DESCENDER \\n[.cdp]' . el \{ .RIGHT \} . \} . if e \{\ -. ie \\n[#PAGE_NUM_H_POS]=1 \{ .RIGHT \} -. el \{ .LEFT \} +. ie \\n[#PAGE_NUM_H_POS]=1 \{ .RIGHT \} +. el \{ .LEFT \} . \} -. if \\n[#PAGE_NUM_H_POS]=2 \{.CENTER \} +. if \\n[#PAGE_NUM_H_POS]=2 \{ .CENTER \} . if \\n[#RECTO_VERSO]=0 \{\ . if \\n[#PAGE_NUM_H_POS]=1 \{ .LEFT \} . if \\n[#PAGE_NUM_H_POS]=2 \{ .CENTER \} . if \\n[#PAGE_NUM_H_POS]=3 \{ .RIGHT \} . \} . nr #PAGENUMBER \\n%+\\n[#PAGE_NUM_ADJ] +. if \\n[#EN_FIRST_PAGE] \{\ +. 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 +. \} . ie \\n[#DRAFT_WITH_PAGENUM] \{\ -. ie !\\n[#REVISION] \{ .PRINT "\\*[$DRAFT_STRING] \\n[#DRAFT] / \\n[#PAGENUMBER]" \} -. el \{ .PRINT "\\*[$DRAFT_STRING] \\n[#DRAFT], \\*[$REVISION_STRING] \\n[#REVISION] / \\n[#PAGENUMBER]" \} +. ie '\\*[$REVISION]'' \{\ +. PRINT "\\*[$DRAFT_STRING]\\*[$DRAFT] / \\n[#PAGENUMBER]" +. \} +. el \{\ +. ie '\\*[$DRAFT]'' \{\ +. PRINT "\\*[$REVISION_STRING] \\*[$REVISION] / \\n[#PAGENUMBER]" +. \} +. el \{\ +. PRINT "\\*[$DRAFT_STRING]\\*[$DRAFT], \\*[$REVISION_STRING] \\*[$REVISION] / \\n[#PAGENUMBER]" +. \} +. \} . \} . el \{\ -. ie \\n[#PAGE_NUM_HYPHENS] \{ .PRINT "- \\n[#PAGENUMBER] -" \} -. el \{ .PRINT "\\n[#PAGENUMBER]" \} +. ie \\n[#PAGE_NUM_HYPHENS] \{\ +. if '\\*[$PAGENUM_STYLE]'DIGIT' \{\ +. di NULL +1\\R'#CAP_HEIGHT \\n[.cht]' +. di +. PN_WITH_HYPHENS +. \} +. if '\\*[$PAGENUM_STYLE]'ROMAN' \{\ +. di NULL +I\\R'#CAP_HEIGHT \\n[.cht]' +. di +. PN_WITH_HYPHENS +. \} +. if '\\*[$PAGENUM_STYLE]'ALPHA' \{\ +. di NULL +E\\R'#CAP_HEIGHT \\n[.cht]' +. di +. PN_WITH_HYPHENS +. \} +. if '\\*[$PAGENUM_STYLE]'roman' \{\ +. PRINT \m[\\*[$PAGENUM_COLOR]]-\|\\n[#PAGENUMBER]\|- +. \} +. if '\\*[$PAGENUM_STYLE]'alpha' \{\ +. PRINT "\m[\\*[$PAGENUM_COLOR]]-\|\\n[#PAGENUMBER]\|-" +. \} +. \} +. el \{ .PRINT "\m[\\*[$PAGENUM_COLOR]]\\n[#PAGENUMBER]" \} . \} . ev .END @@ -8018,50 +10217,14 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# +++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 -\# +.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 \# ----------------- @@ -8077,20 +10240,6 @@ y\\R'#DESCENDER \\n[.cdp]' .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: @@ -8109,23 +10258,129 @@ y\\R'#DESCENDER \\n[.cdp]' \# 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: @@ -8188,10 +10443,10 @@ y\\R'#DESCENDER \\n[.cdp]' .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] . \} @@ -8202,10 +10457,76 @@ y\\R'#DESCENDER \\n[.cdp]' .END \# \# +\# FOOTNOTE SPACING +\# ---------------- +\# *Arguments: +\# | +\# *Function: +\# Enables printing of post footnote spacing. +\# *Notes: +\# Default is no space. +\# +.MAC FOOTNOTE_SPACING END +. ie \B'\\$1' \{ .nr #FN_SPACE (\\$1) \} +. el \{ .nr #FN_SPACE 0 \} +.END +\# +\# +\# 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 > | +\# | INDENT L|LEFT|R|RIGHT|B|BOTH | \# *Function: \# Begins collecting and diverting footnote text if no argument \# given. Otherwise, ends diversion FOOTNOTES, measures footnote @@ -8215,14 +10536,125 @@ y\\R'#DESCENDER \\n[.cdp]' \# or the footnote marker will be spaced away from the word it \# should be joined to. \# -\# If FOOTNOTES is invoked with INDENT, the footnote will +\# 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 \{\ @@ -8231,48 +10663,75 @@ y\\R'#DESCENDER \\n[.cdp]' . 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 \} -. \} -. 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 \} -. \} -. \} -. 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]" \} -. \} -. \} +.\" ...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 \} +. \} +. \} +.\" 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" \} +. \} +. \} +. \} +. \} +.\" 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 #SPACE_REMAINING \\n[#PAGE_LENGTH]-\\n[#B_MARGIN]-(\\n(nl+1v) . 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 . \} @@ -8290,64 +10749,193 @@ y\\R'#DESCENDER \\n[.cdp]' . 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[#EPIGRAPH] \{ .nr #FN_FOR_EPI 1 \} -. if \\n[#FN_DEFER_SPACE] \{\ -. if \\n[#FN_MARKER_STYLE]=1 \{ .ALD 1v \} -. if \\n[#RESET_FN_NUMBER] \{ .ALD 1v \} -. rr #FN_DEFER_SPACE +.\" 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] . \} -. 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 \} +. 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] \{\ +.\" ...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 . \} . \} -. if \\n[#FN_MARKERS] \{\ +.\" 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 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 +. \} +. \} +. \} +. 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 \} -. \} -. 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 \} -. \} -. \} -. 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" \} -. \} -. \} -. \} +.\" ...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 \{\ +. ds $FN_LINENUMBER \\n[#FN_MARK]\v'-.1m'-\v'.1m'\\n[#FN_MARK_2]\\*[$FN_LN_SEP] +. \} +. \} +. 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 @@ -8368,12 +10956,36 @@ y\\R'#DESCENDER \\n[.cdp]' . 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 @@ -8386,124 +10998,555 @@ y\\R'#DESCENDER \\n[.cdp]' . 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 +.\" 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 +. nr #NO_FN_MARKER 0 +. \} +. if \\n[#ADD_BREAK] \{\ +. br +. rr #ADD_BREAK +. \} .END \# +\# Utility macros to manage footnotes that occur inside diversions +\# --------------------------------------------------------------- \# -.MAC FN_OVERFLOW_TRAP 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 +\# +\# 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 +. \} +. \} +. \} +. \} +.END +\# +\# b) Treat as a normal footnote, including defers. +\# +.MAC DIVER_FN_2_PRE END +. nr #RESET_FN_COUNTERS 2 +.END +\# +\# 2. Post-footnote processing for footnotes in diversions +\# +\# 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 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. +\# ----------------------------------------------- +\# +.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 -. \} -.END -\# -\# -.MAC DIVERT_FN_LEFTOVER END -. nr #NO_FN_MARKER 1 -. nr #OVERFLOW 1 -. FOOTNOTE -. nf -. FN_OVERFLOW -. FOOTNOTE OFF -. rr #FN_OVERFLOW_DEPTH +. 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 \\n[#FN_DEFER] \{\ -. nr #VARIABLE_FOOTER_POS -(\\n[#FN_DEPTH]+\\n[#DOC_LEAD]) +. 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 -. da FOOTNOTES -. di . 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 +. DIVERT_FN_LEFTOVER . \} . \} -. nr #FN_COUNT 0 1 +. 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 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+++ \# -\# 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. -\# -\# ENDNOTE FAMILY -\# -------------- -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $EN_FAM. -\# *Notes: -\# Default is same as running text in body of document. -\# -.MAC ENDNOTE_FAMILY END -. ds $EN_FAM \\$1 -.END -\# -\# -\# ENDNOTE FONT -\# ------------ -\# *Argument: -\# -\# *Function: -\# Creates or modifies string $EN_FT. -\# *Notes: -\# Default is roman. -\# -.MAC ENDNOTE_FONT END -. ds $EN_FT \\$1 -.END +.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 \# ------------------ @@ -8533,28 +11576,37 @@ y\\R'#DESCENDER \\n[.cdp]' \# ENDNOTE LEAD \# ------------ \# *Argument: -\# +\# [ ADJUST ] \# *Function: -\# Creates or modifies register #EN_LEAD. +\# Creates or modifies register #EN_LEAD. Creates or removes +\# register #ADJ_EN_LEAD. Stores arguments in strings if ENDNOTE_LEAD +\# set before START. \# *Notes: -\# Default is 13.5 points for TYPESET; 24 for TYPEWRITE. +\# Default is 14 points for TYPESET, adjusted; 24 for TYPEWRITE. \# .MAC ENDNOTE_LEAD END +. if !\\n[#OK_PROCESS_LEAD] \{\ +. ds $EN_LEAD \\$1 +. if !'\\$2'' \{\ +. ds $ADJUST_EN_LEAD \\$2 +. \} +. return +. \} +. rr #ADJ_EN_LEAD . nr #EN_LEAD (p;\\$1) -.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 +. 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 +. DOC_LEAD \\n[#EN_LEAD]u ADJUST +. nr #EN_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 \# \# @@ -8583,70 +11635,13 @@ y\\R'#DESCENDER \\n[.cdp]' \# *Function: \# Creates or modifies string $EN_STRING. \# *Notes: -\# Default is "ENDNOTES" +\# Default is "Endnotes" \# .MAC ENDNOTE_STRING END . ds $EN_STRING \\$1 .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: @@ -8661,11 +11656,32 @@ y\\R'#DESCENDER \\n[.cdp]' . ie '\\$1'' \{ .nr #EN_STRING_UNDERSCORE 1 \} . el \{\ . ie '\\$1'2' \{ .nr #EN_STRING_UNDERSCORE 2 \} -. el \{ .rr #EN_STRING_UNDERSCORE \} +. el \{ .nr #EN_STRING_UNDERSCORE 0 \} . \} .END \# \# +\# ENDNOTE STRING CAPS +\# ------------------- +\# *Arguments: +\# | +\# *Function: +\# Turns capitalization of the endnotes pages title string +\# "Endnotes" on or off. +\# *Notes: +\# Users may want the endnotes pages title string to be in caps, +\# but the toc entry for endnotes in lower case. If the argument +\# to ENDNOTE_STRING is in lower case and ENDNOTE_STRING_CAPS is +\# turned on, this is exactly what will happen. +\# +\# Default is on. +\# +.MAC ENDNOTE_STRING_CAPS END +. ie '\\$1'' \{ .nr #EN_STRING_CAPS 1 \} +. el \{ .rr #EN_STRING_CAPS \} +.END +\# +\# \# ENDNOTE TITLE \# ------------- \# *Argument: @@ -8680,60 +11696,8 @@ y\\R'#DESCENDER \\n[.cdp]' .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 -.END -\# -\# -\# ENDNOTE TITLE SIZE -\# ------------------ -\# *Argument: -\# <+|- number of points by which to in/decrease endnote title -\# (relative to base endnote size)> -\# *Function: -\# Creates string $EN_TITLE_SIZE_CHANGE. -\# *Notes: -\# Default is 0 (i.e. title same size as text of endnotes). -\# -.MAC ENDNOTE_TITLE_SIZE END -. ds $EN_TITLE_SIZE_CHANGE \\$1 -.END -\# -\# -\# ENDNOTE TITLE QUAD -\# ------------------ -\# *Argument: -\# -\# *Function: -\# Creates string $EN_TITLE_QUAD. -\# *Notes: -\# Default is left. -\# -.MAC ENDNOTE_TITLE_QUAD END -. ds $EN_TITLE_QUAD \\$1 +.MAC ENDNOTE_TITLE_SPACE END +. nr #EN_TITLE_SPACE (\\$1) .END \# \# @@ -8752,61 +11716,108 @@ y\\R'#DESCENDER \\n[.cdp]' .END \# \# -\# ENDNOTE NUMBER FAMILY -\# --------------------- -\# *Argument: -\# +\# ENDNOTE MARKER STYLE +\# -------------------- +\# *Arguments: +\# NUMBER | LINE \# *Function: -\# Creates string $EN_NUMBER_FAM. +\# Sets register #EN_MARKER_STYLE, used in ENDNOTE to determine +\# the style of endnote markers (labels). \# *Notes: -\# Default is same as running text of document. +\# 1=NUMBER; 2=LINE. LINE means "use output line numbers". +\# Default is NUMBER. \# -\# 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_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 NUMBER FONT -\# ------------------- -\# *Argument: -\# +\# ENDNOTE LINENUMBER MARK +\# ----------------------- \# *Function: -\# Creates string $EN_NUMBER_FT. -\# *Notes: -\# Default is bold for TYPESET; roman for TYPEWRITE. +\# This string, when called inline, stores the current output line +\# number in register #EN_MARK for use with 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. +.ds EN-MARK \R'#EN_MARK \En(ln' \# -.MAC ENDNOTE_NUMBER_FONT END \"Default for TYPESET is bold -. ds $EN_NUMBER_FT \\$1 +\# +\# ENDNOTE LINENUMBER SEPARATOR +\# ---------------------------- +\# *Argument: +\# +\# *Function: +\# 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. +\# +.MAC ENDNOTE_LINENUMBER_SEPARATOR END +. rr #EN_LN_BRACKETS +. nr #EN_LN_SEP 1 +. ds $EN_LN_SEP "\\$1 .END \# \# -\# ENDNOTE NUMBER SIZE -\# ------------------- +\# ENDNOTE LINENUMBER BRACKETS +\# --------------------------- \# *Argument: -\# <+|- number of points by which to in/decrease endnote numbers -\# (relative to base endnote size)> +\# PARENS | SQUARE | BRACES or ( | [ | { \# *Function: -\# Creates string $EN_NUMBER_SIZE_CHANGE. -\# *Notes: -\# Default is 0. +\# 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_SIZE END \"Default for TYPESET is 0 -. ds $EN_NUMBER_SIZE_CHANGE \\$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 LINENUMBER GAP +\# ---------------------- +\# *Argument: +\# +\# *Function: +\# Defines string $EN_LN_GAP, used during printing of line-number +\# labels in ENDNOTE. +\# +.MAC ENDNOTE_LINENUMBER_GAP END +. ds $EN_LN_GAP \\$1 +.END +\# +\# \# ENDNOTE NUMBERS ALIGN RIGHT \# --------------------------- \# *Argument: @@ -8856,6 +11867,144 @@ y\\R'#DESCENDER \\n[.cdp]' .END \# \# +\# TURN OFF COLUMN MODE FOR ENDNOTES +\# --------------------------------- +\# *Argument: +\# | +\# *Function: +\# Creates or removes register #EN_NO_COLS +\# *Notes: +\# Allows user to tell mom not to set endnotes in columnar +\# documents in columns. Default is to set endnotes in columns. +\# +.MAC ENDNOTES_NO_COLUMNS END +. ie '\\$1'' \{ .nr #EN_NO_COLS 1 \} +. el \{ .rr #EN_NO_COLS \} +.END +\# +\# +\# NO FIRST PAGE NUMBER ON ENDNOTES FIRST PAGE +\# ------------------------------------------- +\# *Argument: +\# | +\# *Function: +\# Creates or removes register #EN_NO_FIRST_PN +\# *Notes: +\# For use if FOOTERS are on. Tells ENDNOTES not to put a page +\# number on the first endnotes page. Some users may want this. +\# Default is to print a page number at the top of the first +\# endnotes page when footers are on. +\# +.MAC ENDNOTES_NO_FIRST_PAGENUM END +. ie '\\$1'' \{ .nr #EN_NO_FIRST_PN 1 \} +. el \{ .rr #EN_NO_FIRST_PN \} +.END +\# +\# +\# PAGE HEADERS ON ENDNOTES PAGES +\# ------------------------------ +\# *Argument: +\# | ALL +\# *Function: +\# Creates or removes register #EN_ALLOWS_HEADERS or +\# #EN_ALLOWS_HEADERS_ALL +\# *Notes: +\# Whether ENDNOTES puts a page header at the top of endnotes +\# pages if page headers are used throughout the document. +\# Default is to insert the page headers, but not on the first +\# page. If the optional argument ALL is given, ENDNOTES puts a +\# page header on the first page as well. +\# +.MAC ENDNOTES_ALLOWS_HEADERS END +. ie '\\$1'' \{ .nr #EN_ALLOWS_HEADERS 1 \} +. el \{\ +. ie '\\$1'ALL' \{\ +. nr #EN_ALLOWS_HEADERS 1 +. nr #EN_ALLOWS_HEADERS_ALL 1 +. \} +. el \{\ +. rr #EN_ALLOWS_HEADERS +. rr #EN_ALLOWS_HEADERS_ALL +. \} +. \} +.END +\# +\# +\# ENDNOTES PAGES PAGE NUMBERING STYLE +\# ----------------------------------- +\# *Argument: +\# DIGIT | ROMAN | roman | ALPHA | alpha +\# *Function: +\# Creates or modifies $EN_PN_STYLE. +\# *Notes: +\# Allows user to define what style should be used for endnotes +\# pages page numbering. Arguments are the same as for +\# PAGENUM_STYLE. +\# +\# Default is DIGIT. +\# +.MAC ENDNOTES_PAGENUM_STYLE END +. ds $EN_PN_STYLE \\$1 +.END +\# +\# +\# FIRST PAGE NUMBER FOR ENDNOTES +\# ------------------------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $EN_FIRST_PN +\# *Notes: +\# To be used with caution, only if all endnotes +\# are to be output at once, i.e. not at the end of the separate +\# docs of a collated doc +\# +.MAC ENDNOTES_FIRST_PAGENUMBER END +. nr #EN_FIRST_PN \\$1 +.END +\# +\# SINGLESPACE ENDNOTES +\# -------------------- +\# *Argument: +\# | +\# *Function: +\# Sets lead of endnotes pages in TYPEWRITE to 12 points, +\# adjusted. +\# *Notes: +\# Default is to double-space endnotes pages. +\# +.MAC SINGLESPACE_ENDNOTES END +. if \\n[#PRINT_STYLE]=1 \{\ +. ie \\n[#SINGLE_SPACE] \{\ +. nr #EN_SINGLESPACE 1 +. rr #IGNORE +. if \\n[#OK_PROCESS_LEAD] \{\ +. ENDNOTE_LEAD 12 ADJUST +. nr #IGNORE 1 +. \} +. \} +. el \{\ +. ie '\\$1'' \{\ +. nr #EN_SINGLESPACE 1 +. rr #IGNORE +. if \\n[#OK_PROCESS_LEAD] \{\ +. ENDNOTE_LEAD 12 ADJUST +. nr #IGNORE 1 +. \} +. \} +. el \{\ +. rr #EN_SINGLESPACE +. rr #IGNORE +. if \\n[#OK_PROCESS_LEAD] \{\ +. ENDNOTE_LEAD 24 ADJUST +. nr #IGNORE 1 +. \} +. \} +. \} +. \} +.END +\# +\# \# ENDNOTE PARAGRAPH SPACE \# ----------------------- \# *Argument: @@ -8879,55 +12028,67 @@ y\\R'#DESCENDER \\n[.cdp]' \# 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 #RESTORE_DOC_LEAD \\n[#DOC_LEAD] . nr #PP_STYLE_PREV \\n[#PP_STYLE] . nr #PP_STYLE 1 . if \\n[#INDENT_FIRST_PARAS] \{ .nr #INDENT_FIRSTS 1 \} . INDENT_FIRST_PARAS . ev EN . da END_NOTES -. nr #NO_TRAP_RESET 1 -. if \\n[#PRINT_STYLE]=2 \{ .DOC_LEAD \\n[#EN_LEAD]u ADJUST \} -. rr #NO_TRAP_RESET -. vs \\n[#DOC_LEAD]u . LL \\n[#DOC_L_LENGTH]u . ta \\n(.lu . if \\n[#COLUMNS] \{\ -. LL \\n[#COL_L_LENGTH]u +. ie \\n[#EN_NO_COLS] \{ .LL \\n[#DOC_L_LENGTH]u \} +. el \{ .LL \\n[#COL_L_LENGTH]u \} . ta \\n(.lu . \} +. vs \\n[#EN_LEAD]u . if \\n[#EN_NUMBER]=1 \{\ -\!. ne 3 -. if !'\\*[$EN_STRING]'' \{ .sp \} +\!. ne 3 . if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 +. TYPEWRITER . \} . if \\n[#PRINT_STYLE]=2 \{\ . FAMILY \\*[$EN_TITLE_FAM] . FT \\*[$EN_TITLE_FT] . PT_SIZE \\n[#EN_PS]u\\*[$EN_TITLE_SIZE_CHANGE] . \} +. sp . if !'\\*[$EN_TITLE]'' \{\ . if '\\*[$EN_TITLE_QUAD]'L' \{ .LEFT \} . if '\\*[$EN_TITLE_QUAD]'LEFT' \{ .LEFT \} @@ -8944,80 +12105,126 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . \} . \} -. 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 +. 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[#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] +. \} +. \} +. 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'.' -. ll \\n[#EN_NUMBER_L_LENGTH]u . RIGHT -\En[#EN_NUMBER]. -. if \\n[#PRINT_STYLE]=1 \{\ -. fam C -. ft R -. ps 12 -. \} -. if \\n[#PRINT_STYLE]=2 \{\ -. FAMILY \\*[$EN_FAM] -. FT \\*[$EN_FT] -. PT_SIZE \\n[#EN_PS]u -. \} -. 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 . \} . 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 +. \} +. 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) +. \} . \} -. if \\n[#PRINT_STYLE]=2 \{\ -. FAMILY \\*[$EN_NUMBER_FAM] -. FT \\*[$EN_NUMBER_FT] -. PT_SIZE \\n[#EN_PS]u\\*[$EN_NUMBER_SIZE_CHANGE] -. \} -. 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 -. DOC_LEAD \\n[#RESTORE_DOC_LEAD]u +.\" 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 \} . rr #INDENT_FIRSTS . rr #ENDNOTE -. ev . if \\n[#PRINT_STYLE]=1 \{\ . if \\n[#UNDERLINE_WAS_ON] \{\ . rr #UNDERLINE_WAS_ON @@ -9029,6 +12236,10 @@ y\\R'#DESCENDER \\n[.cdp]' \*[SLANT]\c . \} . \} +. if \\n[#ADD_BREAK] \{\ +. br +. rr #ADD_BREAK +. \} .END \# \# @@ -9042,26 +12253,137 @@ y\\R'#DESCENDER \\n[.cdp]' \# with endnotes, then outputs diversion END_NOTES. \# .MAC ENDNOTES END -. if \\n[#DOC_TYPE]=2 \{\ +. nr #ENDNOTES 1 +. 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 \} +. \} +. if \\n[#HEADER_STATE]=1 \{\ . ie \\n[#EN_HDRFTR_CENTER]=1 \{ . \} -. el \{ .HDRFTR_CENTER \} +. el \{ .rm $HDRFTR_CENTER \} +. \} +. ie !\\n[#SUSPEND_PAGINATION] \{\ +. if \\n[#PAGINATE]=1 \{\ +. if \\n[#PAGE_NUM_V_POS]=1 \{\ +. PAGENUM_STYLE \\*[$EN_PN_STYLE] +. if \\n[#EN_FIRST_PN] \{ .PAGENUMBER \\n[#EN_FIRST_PN]-1 \} +. if r#EN_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 -. nr #RESTORE_DOC_LEAD \\n[#DOC_LEAD] -. if \\n[#PRINT_STYLE]=2 \{ .DOC_LEAD \\n[#EN_LEAD]u ADJUST \} +. 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#EN_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 \\*[$EN_PN_STYLE] +. if \\n[#EN_FIRST_PN] \{ .PAGENUMBER \\n[#EN_FIRST_PN] \} +. if \\n[#HEADER_STATE]=1 \{\ +. if \\n[#EN_ALLOWS_HEADERS] \{ .HEADERS \} +. \} +.\" 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 \{\ +. 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 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] \{\ +. if \\n[#COLUMNS] \{ .nr #COLUMNS_WERE_ON 1 \} +. nr #COLUMNS 0 +. \} +. nr #RESTORE_DOC_LEAD \\n[#DOC_LEAD] +. ie \\n[#ADJ_EN_LEAD] \{\ +. nr #DOC_LEAD \\n[#EN_LEAD] +. \} +. el \{ .DOC_LEAD \\n[#EN_LEAD]u \} +. \} +. PRINT \& +. 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 . \} +. 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 \{\ +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if \\n[#COLUMNS] \{\ +. ie \\n[#EN_NO_COLS] \{ .LL \\n[#DOC_L_LENGTH]u \} +. el \{ .LL \\n[#COL_L_LENGTH]u \} +. ta \\n(.lu +. \} . FAMILY \\*[$EN_STRING_FAM] . FT \\*[$EN_STRING_FT] . PT_SIZE \\n[#EN_PS]u\\*[$EN_STRING_SIZE_CHANGE] +. vs \\n[#EN_LEAD]u . \} . if '\\*[$EN_STRING_QUAD]'L' \{ .LEFT \} . if '\\*[$EN_STRING_QUAD]'LEFT' \{ .LEFT \} @@ -9070,7 +12392,8 @@ y\\R'#DESCENDER \\n[.cdp]' . 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 \{\ . UNDERSCORE2 "\\*[$EN_STRING] @@ -9083,14 +12406,785 @@ y\\R'#DESCENDER \\n[.cdp]' . PRINT "\\*[$EN_STRING] . \} . \} -. ev EN +. CAPS OFF +. 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 -. vs \\n[#DOC_LEAD]u . END_NOTES . br . ev . rm END_NOTES -. DOC_LEAD \\n[#RESTORE_DOC_LEAD]u +. if \\n[#PRINT_STYLE]=1 \{ .vs \\n[#DOC_LEAD]u \} +. if \\n[#PRINT_STYLE]=2 \{\ +. ie \\n[#ADJ_EN_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 \} +. if \\n[#LINENUMBERS]=2 \{\ +. NUMBER_LINES RESUME +. nr #LINENUMBERS 1 +. \} +. rr #ENDNOTES +.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 $BIB_LEAD \\$1 +. if !'\\$2'' \{\ +. ds $ADJUST_BIB_LEAD \\$2 +. \} +. return +. \} +. 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_BIB_LEAD 1 +. nr #NO_TRAP_RESET 1 +. DOC_LEAD \\n[#BIB_LEAD]u ADJUST +. nr #BIB_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 +\# +.MAC BIBLIOGRAPHY_HDRFTR_CENTER END +. ie '\\$1'' \{ .nr #BIB_HDRFTR_CENTER 1 \} +. el \{ .rr #BIB_HDRFTR_CENTER \} +.END +\# +.MAC BIBLIOGRAPHY_STRING END +. ds $BIB_STRING \\$1 +.END +\# +.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 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 +\# +.MAC BIBLIOGRAPHY_NO_FIRST_PAGENUM END +. ie '\\$1'' \{ .nr #BIB_NO_FIRST_PN 1 \} +. el \{ .rr #BIB_NO_FIRST_PN \} +.END +\# +.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 +\# +.MAC BIBLIOGRAPHY_FIRST_PAGENUMBER END +. nr #BIB_FIRST_PN \\$1 +.END +\# +.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 +\# +\# +\# Style for outputting collected bibliographic references +\# ------------------------------------------------------- +\# *Argument: +\# LIST | PLAIN [ ] [ ] +\# *Function: +\# Sets #BIB_LIST to 1 for numbered list style, 0 for plain output +\# *Notes: +\# 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. +\# +\# 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 +\# +\# Spacing between items in bibliographies +\# --------------------------------------- +\# *Argument: +\# +\# *Function: +\# Gets value for #BIB_SPACE in units. +\# *Notes: +\# Requires a unit of measure. +\# +.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 +\# +\# Set up bibliography page +\# ------------------------ +\# *Function: +\# Sets up a new page, with title, ready to accept the output +\# of refer's $LIST$ or .R1 bibliography .R2 +\# *Notes: +\# 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 +\# +\# ==================================================================== +\# +\# +++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 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 +. 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 +\# +\# +\# 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 +.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 \} +.END +\# +\# - for TOC "doc header" (i.e. "Contents") +\# +\# 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 TOC entries page number numerals +\# +\# 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_TITLE_INDENT END +. nr #TOC_TITLE_INDENT (\\$1) +.END +\# +\# +.MAC TOC_TITLE_ENTRY END +. nr #USER_SET_TITLE_ITEM 1 +. ds $USER_SET_TITLE_ITEM \\$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. +\# +\# 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_APPENDS_AUTHOR END +. nr #TOC_AUTHORS 1 +. if !'\\$1'' \{\ +. ds $TOC_AUTHORS \\$1 +. \} +.END +\# +\# - for head entries +\# +.MAC TOC_HEAD_INDENT END +. nr #TOC_HEAD_INDENT (\\$1) +.END +\# +\# - for subhead entries +\# +.MAC TOC_SUBHEAD_INDENT END +. nr #TOC_SH_INDENT (\\$1) +.END +\# +\# - for parahead entries +\# +.MAC TOC_PARAHEAD_INDENT END +. nr #TOC_PH_INDENT (\\$1) +.END +\# +\# +.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] \{\ +. if \\n[#FOOTERS_WERE_ON] \{\ +. FOOTERS \" Have to turn FOOTERS on for next bit to work, so we can't skip this step +. \} +. \} +. if \\n[#FOOTERS_ON]=1 \{\ +. if !'\\*[$HDRFTR_CENTER_OLD]'' .ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_OLD] +. ie \\n[#PAGINATE_TOC]=1 \{ .PAGINATE \} +. el \{ .PAGINATION OFF \} +. \} +. if \\n[#FOOTERS_WERE_ON] \{ .FOOTERS OFF \} \" But have to turn FOOTERS off again so they don't print when FINIS was called +. COLLATE +. if \\n[#FINIS] \{\ +. if \\n[#FOOTERS_WERE_ON] \{ .FOOTERS \} \" Finally, turn footers on if they were on +. rr #FOOTERS_WERE_ON +. if \\n[#PAGINATION_WAS_ON] \{\ +. nr #PAGINATE 1 +. rr #PAGINATION_WAS_ON +. \} +. rr #FINIS +. \} +. ie \\n[#PAGINATE_TOC]=1 \{ .PAGINATE \} +. el \{ .PAGINATION OFF \} +. if \\n[#FOOTERS_ON]=1 \{\ +. ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_NEW] +. rm $HDRFTR_CENTER_OLD +. rm $HDRFTR_CENTER_NEW +. \} +. rr #COLLATED_DOC +. DOCHEADER OFF +. PAGENUMBER 1 +. if \\n[#PRINT_STYLE]=1 \{\ +. rr #IGNORE +. DOC_LEAD 24 ADJUST +. nr #IGNORE 1 +. \} +. if \\n[#LINENUMBERS]=2 \{ .nr #LINENUMBERS 3 \} +. START +. PP +. nr #COLUMNS 0 +. if \\n[#PRINT_STYLE]=2 \{\ +. ie r#ADJ_TOC_LEAD \{\ +. nr #NO_TRAP_RESET 1 +. DOC_LEAD \\n[#TOC_LEAD]u ADJUST +. rr #NO_TRAP_RESET +. \} +. el \{ .DOC_LEAD \\n[#TOC_LEAD]u \} +. \} +. sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u +. if \\n[#SLANT_ON] \{\ +\*[SLANTX]\c +. \} +. DOC_LINE_LENGTH \\n[#DOC_L_LENGTH]u +. QUAD \\*[$TOC_HEADER_QUAD] +. PAGENUM_STYLE \\*[$TOC_PN_STYLE] +. if \\n[#PRINT_STYLE]=1 \{\ +. TYPEWRITER +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$TOC_HEADER_FAM] +. FT \\*[$TOC_HEADER_FT] +. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_HEADER_SIZE_CHANGE] +. \} +. ie \\n[#PRINT_STYLE]=1 \{\ +. CAPS +. UNDERLINE +. PRINT "\\*[$TOC_HEADER_STRING]" +. UNDERLINE OFF +. CAPS OFF +. \} +. el \{\ +. PRINT "\\*[$TOC_HEADER_STRING]" +. \} +. LEFT +. SP +.\" 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] +. TOC_PADDING \\n[#FIRST_DOC_TOC_PN_PADDING] +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$TOC_TITLE_FAM] +. FT \\*[$TOC_TITLE_FT] +. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_TITLE_SIZE_CHANGE] +. \} +. ie \\n[#PRINT_STYLE]=1 \{\ +. PAD "\\*[$FIRST_DOC_TITLE]\\*[$TOC_PN_TYPEWRITE]" +. \} +. el \{\ +. PAD "\\h'\\n[#TOC_TITLE_INDENT]u'\\*[$FIRST_DOC_TITLE]\\*[$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 +. PRINT \\n[#FIRST_DOC_TITLE_PN] +. TQ +. \} +. TOC_PADDING \\n[#RESTORE_TOC_PN_PADDING] +. nf +. TOC_ENTRIES +. br +. rr #TOC +. if \\n[#LINENUMBERS]=3 \{\ +. NUMBER_LINES RESUME +. nr #LINENUMBERS 1 +. nn 1 +. \} .END \# \# ==================================================================== @@ -9118,6 +13212,9 @@ y\\R'#DESCENDER \\n[.cdp]' . 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 @@ -9150,6 +13247,699 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# ==================================================================== \# +\# +++LISTS+++ +\# +\# LIST +\# ---- +\# *Arguments: +\# [ 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). +\# *Notes: +\# Default enumerator is a bullet. +\# +\# Enumerator *must* be supplied for every list that's to the +\# right of another list, every time, unless the default bullet is +\# desired. +\# +\# moves back one list level intuitively, or exits lists +\# 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] +. nr #CURRENT_L_LENGTH \\n(.l +. nr #DEPTH 0 1 +. if \\n[#INDENT_ACTIVE]=1 \{\ +. if \\n[#INDENT_LEFT_ACTIVE]=1 \{\ +. nr #STORED_L_INDENT \\n[#L_INDENT] +. nr #RESTORE_PREV_INDENT 1 +. \} +. if \\n[#INDENT_BOTH_ACTIVE]=1 \{\ +. nr #STORED_BL_INDENT \\n[#BL_INDENT] +. nr #STORED_BR_INDENT \\n[#BR_INDENT] +. IBX +. nr #ORIG_L_LENGTH \\n(.l +. IB +. nr #RESTORE_PREV_INDENT 2 +. \} +. if \\n[#INDENT_RIGHT_ACTIVE]=1 \{\ +. nr #STORED_R_INDENT \\n[#R_INDENT] +. IRX +. nr #ORIG_L_LENGTH \\n(.l +. IR +. nr #RESTORE_PREV_INDENT 3 +. if \\n[#INDENT_LEFT_ACTIVE]=1 \{ .nr #RESTORE_PREV_INDENT 4 \} +. \} +. \} +. \} +. 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 '\\*[$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 '\\*[$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 '\\*[$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] . +. 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 '\\*[$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 '\\*[$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 \{\ +. ie \\n[#DEPTH]=1 \{\ +. ie \\n[#NEXT_DEPTH_BACK]=0 \{\ +. SET_LIST_INDENT +. if \\n[#QUIT]=1 \{\ +. QUIT_LISTS +. return +. \} +. return +. \} +. el \{\ +. QUIT_LISTS +. return +. \} +. \} +. el \{\ +. SET_LIST_INDENT +. return +. \} +. \} +. \} +. \} +. nr #TOTAL_LISTS \\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]]\ ' +. \} +. \} +. 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 \{\ +. ie \\n[#INDENT_ACTIVE]=1 \{\ +. if \\n[#INDENT_LEFT_ACTIVE]=1 \{\ +. nr #L_INDENT \\n[#L_INDENT]+\\n[#LIST_INDENT\\n[#DEPTH]] +. nr #HL_INDENT\\n[#DEPTH] \\n[#LIST_INDENT\\n[#DEPTH]] +. nr #LIST_INDENT\\n[#DEPTH] \\n[#L_INDENT] +. \} +. if \\n[#INDENT_BOTH_ACTIVE]=1 \{\ +. nr #L_INDENT \\n[#BL_INDENT]+\\n[#LIST_INDENT\\n[#DEPTH]] +. nr #HL_INDENT\\n[#DEPTH] \\n[#LIST_INDENT\\n[#DEPTH]] +. nr #LIST_INDENT\\n[#DEPTH] \\n[#L_INDENT] +. \} +. if \\n[#INDENT_RIGHT_ACTIVE]=1 \{\ +. ie \\n[#INDENT_LEFT_ACTIVE]=1 \{\ +. \" Don't do anything; we already have a left indent +. \} +. el \{\ +. nr #L_INDENT +\\n[#LIST_INDENT\\n[#DEPTH]] +. nr #HL_INDENT\\n[#DEPTH] \\n[#LIST_INDENT\\n[#DEPTH]] +. \} +. \} +. \} +. el \{\ +. nr #L_INDENT +\\n[#LIST_INDENT\\n[#DEPTH]] +. nr #HL_INDENT\\n[#DEPTH] \\n[#LIST_INDENT\\n[#DEPTH]] +. \} +. \} +. el \{\ +. nr #L_INDENT +\\n[#LIST_INDENT\\n[#DEPTH]] +. nr #HL_INDENT\\n[#DEPTH] \\n[#LIST_INDENT\\n[#DEPTH]] +. \} +.END +\# +\# +\# ITEM +\# ---- +\# *Arguments: +\# none +\# *Function: +\# Prints enumerator for a given list depth and prepares mom to +\# receive the text of an item. +\# +.MAC ITEM END +. 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 +. 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 \{\ +.\" 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 "\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 \{\ +.\" 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]] +. \} +. \} +. \} +. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'other' \{\ +. 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] +. \} +. TRAP +. 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: +\# Adds the value of the arg to the current list's indent. +\# *Notes: +\# Requires a unit of measure. +\# +.MAC SHIFT_LIST END +. 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 +\# +\# +\# PAD LIST DIGITS +\# --------------- +\# *Arguments: +\# [ LEFT ] +\# *Function: +\# Adds a figure space to a list's hanging and left indent. If +\# LEFT is given, sets reg. #PAD_LIST_DIGITS to 1 for use in ITEM. +\# +.MAC PAD_LIST_DIGITS END +. if '\\g[#ENUMERATOR\\n[#DEPTH]]'0' \{\ +. nr #LIST_INDENT\\n[#DEPTH] +\\w'\\0' +. nr #L_INDENT \\n[#LIST_INDENT\\n[#DEPTH]]+\\n[#LIST_INDENT\\n-[#DEPTH]] +. 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 +\# +\# +\# RESET LIST +\# ---------- +\# *Arguments: +\# none +\# *Function: +\# Resets register enumerators to 1 or a. +\# +.MAC RESET_LIST END +. ie '\\$1'' \{ .nr #ENUMERATOR\\n[#DEPTH] 0 1 \} +. el \{ .nr #ENUMERATOR\\n[#DEPTH] \\$1-1 1 \} +.END +\# +\# +\# QUIT LISTS +\# ---------- +\# *Arguments: +\# none +\# *Function: +\# Exits lists cleanly and restores any indents that were in +\# effect prior to LIST. +\# +.MAC QUIT_LISTS END +. IQ CLEAR +. nr #HL_INDENT \\n[#STORED_HL_INDENT] +. nr #T_INDENT \\n[#STORED_T_INDENT] +. rr #STORED_HL_INDENT +. if \\n[#RESTORE_PREV_INDENT]=1 \{\ +. nr #L_INDENT \\n[#STORED_L_INDENT] +. IL +. rr #STORED_L_INDENT +. \} +. if \\n[#RESTORE_PREV_INDENT]=2 \{\ +. nr #BL_INDENT \\n[#STORED_BL_INDENT] +. nr #BR_INDENT \\n[#STORED_BR_INDENT] +. LL \\n[#ORIG_L_LENGTH]u +. IB +. rr #STORED_BL_INDENT +. rr #STORED_BR_INDENT +. \} +. if \\n[#RESTORE_PREV_INDENT]=3 \{\ +. nr #R_INDENT \\n[#STORED_R_INDENT] +. LL \\n[#ORIG_L_LENGTH]u +. IR +. rr #STORED_R_INDENT +. \} +. if \\n[#RESTORE_PREV_INDENT]=4 \{\ +. nr #R_INDENT \\n[#STORED_R_INDENT] +. nr #L_INDENT \\n[#STORED_L_INDENT] +. LL \\n[#ORIG_L_LENGTH]u +. IR +. IL +. rr #STORED_R_INDENT +. rr #STORED_L_INDENT +. \} +.\" Clean up after exiting last depth of list +. nr #REMOVE 0 1 +. while \\n+[#REMOVE]<=\\n[#TOTAL_LISTS] \{\ +. rr #LIST_INDENT\\n[#REMOVE] +. rr #ENUMERATOR\\n[#REMOVE] +. rm $ENUMERATOR\\n[#REMOVE] +. rr #SEPARATOR\\n[#REMOVE] +. rm $ENUMERATOR_TYPE\\n[#REMOVE] +. rr #PAD_LIST_DIGITS\\n[#REMOVE] +.\} +. rr #REMOVE +. rr #TOTAL_LISTS +. rr #QUIT +. rr #DEPTH +. rr #NEXT_DEPTH_BACK +. rr #RESTORE_PREV_INDENT +. rr #ORIG_L_LENGTH +. rr #CURRENT_L_LENGTH +.END +\# +\# +\# SET LIST INDENT +\# --------------- +\# *Arguments: +\# none +\# *Function: +\# Restores indent of prev. list in nested lists. Also sets the +\# #QUIT register if an invocation of LIST OFF applies to the first +\# level of list. +\# +.MAC SET_LIST_INDENT END +. nr #NEXT_DEPTH_BACK \\n[#DEPTH]-1 +. if \\n[#NEXT_DEPTH_BACK]=0 \{\ +. nr #QUIT 1 +. return +. \} +. nr #L_INDENT -\\n[#LIST_INDENT\\n[#DEPTH]] +. nr #HL_INDENT \\n[#HL_INDENT\\n-[#DEPTH]] +.END +\# +\# ==================================================================== +\# \# +++DOCUMENT PROCESSING MISC AND SUPPORT MACROS+++ \# \# COLLATE @@ -9178,15 +13968,207 @@ y\\R'#DESCENDER \\n[.cdp]' . \} . IQ CLEAR . TQ +.\" 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]\\| +. rr #USER_SET_TITLE_ITEM +. rm $USER_SET_TITLE_ITEM +. \} +. el \{\ +. ie \\n[#DOC_TYPE]=2 \{\ +. ie '\\*[$CHAPTER_TITLE]'' \{\ +. ds $FIRST_DOC_TITLE \\*[$CHAPTER_STRING] \\*[$CHAPTER]\\| +. \} +. el \{\ +. ie '\\*[$CHAPTER]'' \{\ +. ds $FIRST_DOC_TITLE \\*[$CHAPTER_TITLE]\\| +. \} +. el \{\ +. ds $FIRST_DOC_TITLE \\*[$CHAPTER_STRING] \\*[$CHAPTER]: \\*[$CHAPTER_TITLE]\\| +. \} +. \} +. \} +. el \{\ +. ds $FIRST_DOC_TITLE \\*[$TITLE]\\| +. \} +. \} +. if \\n[#TOC_AUTHORS]=1 \{\ +. ie '\\*[$TOC_AUTHORS]'' \{\ +. as $FIRST_DOC_TITLE /\\|\\*[$AUTHOR_1]\\| +. \} +. el \{\ +. as $FIRST_DOC_TITLE /\\|\\*[$TOC_AUTHORS]\\| +. rm $TOC_AUTHORS +. \} +. \} +. nr #COLLATED_DOC 1 +. \} +.\" 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] \*[EXTX] ' NEWPAGE -. rr #PAGENUM_STYLE_SET +. if \\n[#DEFER_PAGINATION] \{ .PAGINATE \} +. if !'\\*[$RESTORE_PAGENUM_STYLE]'' \{\ +. PAGENUM_STYLE \\*[$RESTORE_PAGENUM_STYLE] +. rm $RESTORE_PAGENUM_STYLE +. \} . rm $EN_TITLE +. rr #PAGENUM_STYLE_SET +.END +\# +\# +\# 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 \# \# @@ -9196,48 +14178,73 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# *Function: \# Sets header/footer/footnotes/etc... traps. -\# Calculates the number of lines that actually fit on a +\# +\# 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, +\# 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 +.\" 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 +. 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] \{\ +.\" 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 #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 -. while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]+\\n+[#DOC_LEAD_ADJ]*\\n[#LINES_PER_PAGE])<\\n[#DEPTH_TO_B_MARGIN] \{ . \} +.\" 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. +.\" ...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])) +. 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 +.\" 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 +. wh 20i FOOTER +. wh -(\\n[#FN_OVERFLOW_TRAP_POS]u) FN_OVERFLOW_TRAP . ch FOOTER -\\n[#B_MARGIN]u . \} .END @@ -9278,7 +14285,7 @@ y\\R'#DESCENDER \\n[.cdp]' . 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 @@ -9314,7 +14321,66 @@ y\\R'#DESCENDER \\n[.cdp]' .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 \# \# ==================================================================== \# @@ -9323,115 +14389,1501 @@ y\\R'#DESCENDER \\n[.cdp]' \# Aliases to make life easier for users: synonyms, short forms \# and alternate spellings. \# -\# Macros -\# ------ -.ALIAS BREAK_BLOCKQUOTE BREAK_QUOTE -.ALIAS BREAK_CITATION BREAK_QUOTE -.ALIAS BREAK_CITE BREAK_QUOTE -.ALIAS CITATION BLOCKQUOTE -.ALIAS CITE BLOCKQUOTE -.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 FILL QUAD -.ALIAS PP_FT PP_FONT -.ALIAS DOC_PS DOC_PT_SIZE -.ALIAS DOC_LS DOC_LEAD -.ALIAS PAGENUM PAGENUMBER -.ALIAS PAGINATION PAGINATE +.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 ENDNOTES_HEADER_CENTER ENDNOTES_HDRFTR_CENTER -.ALIAS HEADER_FAMILY HDRFTR_FAMILY -.ALIAS HEADER_FAM HDRFTR_FAMILY -.ALIAS HEADER_SIZE HDRFTR_SIZE -.ALIAS HEADER_PLAIN HDRFTR_PLAIN -.ALIAS HEADER_RULE_GAP HDRFTR_RULE_GAP -.ALIAS HEADER_RULE HDRFTR_RULE -.ALIAS HEADER_LEFT HDRFTR_LEFT -.ALIAS HEADER_LEFT_FAMILY HDRFTR_LEFT_FAMILY -.ALIAS HEADER_LEFT_FAM HDRFTR_LEFT_FAMILY -.ALIAS HEADER_LEFT_FONT HDRFTR_LEFT_FONT -.ALIAS HEADER_LEFT_FT HDRFTR_LEFT_FONT -.ALIAS HEADER_LEFT_SIZE HDRFTR_LEFT_SIZE -.ALIAS HEADER_LEFT_PS HDRFTR_LEFT_SIZE -.ALIAS HEADER_LEFT_CAPS HDRFTR_LEFT_CAPS -.ALIAS HEADER_CENTER HDRFTR_CENTER -.ALIAS HEADER_CENTRE HDRFTR_CENTER -.ALIAS HEADER_CENTER_FAMILY HDRFTR_CENTER_FAMILY -.ALIAS HEADER_CENTRE_FAMILY HDRFTR_CENTER_FAMILY -.ALIAS HEADER_CENTER_FAM HDRFTR_CENTER_FAMILY -.ALIAS HEADER_CENTRE_FAM HDRFTR_CENTER_FAMILY -.ALIAS HEADER_CENTER_FONT HDRFTR_CENTER_FONT -.ALIAS HEADER_CENTRE_FONT HDRFTR_CENTER_FONT -.ALIAS HEADER_CENTER_FT HDRFTR_CENTER_FONT -.ALIAS HEADER_CENTRE_FT HDRFTR_CENTER_FONT -.ALIAS HEADER_CENTER_SIZE HDRFTR_CENTER_SIZE -.ALIAS HEADER_CENTRE_SIZE HDRFTR_CENTER_SIZE -.ALIAS HEADER_CENTER_PS HDRFTR_CENTER_SIZE -.ALIAS HEADER_CENTRE_PS HDRFTR_CENTER_SIZE -.ALIAS HEADER_CENTER_CAPS HDRFTR_CENTER_CAPS -.ALIAS HEADER_CENTRE_CAPS HDRFTR_CENTER_CAPS -.ALIAS HEADER_RIGHT HDRFTR_RIGHT -.ALIAS HEADER_RIGHT_FAMILY HDRFTR_RIGHT_FAMILY -.ALIAS HEADER_RIGHT_FAM HDRFTR_RIGHT_FAMILY -.ALIAS HEADER_RIGHT_FONT HDRFTR_RIGHT_FONT -.ALIAS HEADER_RIGHT_FT HDRFTR_RIGHT_FONT -.ALIAS HEADER_RIGHT_SIZE HDRFTR_RIGHT_SIZE -.ALIAS HEADER_RIGHT_PS HDRFTR_RIGHT_SIZE -.ALIAS HEADER_RIGHT_CAPS HDRFTR_RIGHT_CAPS -.ALIAS HEADER_RECTO HDRFTR_RECTO -.ALIAS HEADER_VERSO HDRFTR_VERSO -.ALIAS ENDNOTES_FOOTER_CENTER ENDNOTES_HDRFTR_CENTER -.ALIAS FOOTER_FAMILY HDRFTR_FAMILY -.ALIAS FOOTER_FAM HDRFTR_FAMILY -.ALIAS FOOTER_SIZE HDRFTR_SIZE -.ALIAS FOOTER_PLAIN HDRFTR_PLAIN -.ALIAS FOOTER_RULE_GAP HDRFTR_RULE_GAP -.ALIAS FOOTER_RULE HDRFTR_RULE -.ALIAS FOOTER_LEFT HDRFTR_LEFT -.ALIAS FOOTER_LEFT_FAMILY HDRFTR_LEFT_FAMILY -.ALIAS FOOTER_LEFT_FAM HDRFTR_LEFT_FAMILY -.ALIAS FOOTER_LEFT_FONT HDRFTR_LEFT_FONT -.ALIAS FOOTER_LEFT_FT HDRFTR_LEFT_FONT -.ALIAS FOOTER_LEFT_SIZE HDRFTR_LEFT_SIZE -.ALIAS FOOTER_LEFT_PS HDRFTR_LEFT_SIZE -.ALIAS FOOTER_LEFT_CAPS HDRFTR_LEFT_CAPS -.ALIAS FOOTER_CENTER HDRFTR_CENTER -.ALIAS FOOTER_CENTRE HDRFTR_CENTER -.ALIAS FOOTER_CENTER_FAMILY HDRFTR_CENTER_FAMILY -.ALIAS FOOTER_CENTRE_FAMILY HDRFTR_CENTER_FAMILY -.ALIAS FOOTER_CENTER_FAM HDRFTR_CENTER_FAMILY -.ALIAS FOOTER_CENTRE_FAM HDRFTR_CENTER_FAMILY -.ALIAS FOOTER_CENTER_FONT HDRFTR_CENTER_FONT -.ALIAS FOOTER_CENTRE_FONT HDRFTR_CENTER_FONT -.ALIAS FOOTER_CENTER_FT HDRFTR_CENTER_FONT -.ALIAS FOOTER_CENTRE_FT HDRFTR_CENTER_FONT -.ALIAS FOOTER_CENTER_SIZE HDRFTR_CENTER_SIZE -.ALIAS FOOTER_CENTRE_SIZE HDRFTR_CENTER_SIZE -.ALIAS FOOTER_CENTER_PS HDRFTR_CENTER_SIZE -.ALIAS FOOTER_CENTRE_PS HDRFTR_CENTER_SIZE -.ALIAS FOOTER_CENTER_CAPS HDRFTR_CENTER_CAPS -.ALIAS FOOTER_CENTRE_CAPS HDRFTR_CENTER_CAPS -.ALIAS FOOTER_RIGHT HDRFTR_RIGHT -.ALIAS FOOTER_RIGHT_FAMILY HDRFTR_RIGHT_FAMILY -.ALIAS FOOTER_RIGHT_FAM HDRFTR_RIGHT_FAMILY -.ALIAS FOOTER_RIGHT_FONT HDRFTR_RIGHT_FONT -.ALIAS FOOTER_RIGHT_FT HDRFTR_RIGHT_FONT -.ALIAS FOOTER_RIGHT_SIZE HDRFTR_RIGHT_SIZE -.ALIAS FOOTER_RIGHT_PS HDRFTR_RIGHT_SIZE -.ALIAS FOOTER_RIGHT_CAPS HDRFTR_RIGHT_CAPS -.ALIAS FOOTER_RECTO HDRFTR_RECTO -.ALIAS FOOTER_VERSO HDRFTR_VERSO -.ALIAS SWITCH_HEADERS SWITCH_HDRFTR -.ALIAS SWITCH_FOOTERS SWITCH_HDRFTR +.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 \# -\# SUPPORT ALIASES +\# Type-style aliases \# -.ALIAS COL_BREAK COL_NEXT -.ALIAS PRINT_FOOTNOTE_RULE FOOTNOTE_RULE +.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: +\# Instruct REF to put references in footnotes. +\# +.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. +\# +.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: +\# Calls FOOTNOTE or ENDNOTE, depending on whether #REF_FN or +\# #REF_EN is set to 1. +\# *Notes: +\# For convenience, REF is a toggle. +\# +\# 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 +. \} +. \} +. el \{\ +. 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 \} +. \} +. \} +.END +\# +\# Embedded references in text (with brackets) +\# ------------------------------------------- +\# +.MAC REF_BRACKETS_START END +. ds $CURRENT_EV \\n[.ev] +. ev REFERENCE +. evc \\*[$CURRENT_EV] +. di REFERENCE +.END +\# +.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 {}. +\# +.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: +\# Sets strings $REF_FN_INDENT, $REF_EN_INDENT or $REF_BIB_INDENT. +\# *Notes: +\# Indent value requires a unit of measure. +\# +.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 +\# +.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] +.\} +.. +\# +.de ]> +.LIST OFF +.rr #REF +.rr #IN_BIB_LIST +.als ref*print ref*normal-print +.. +\# +\# Output +\# ------ +\# +\# Output normal, non-collected refs +\# +.de ref*normal-print +.nr #CURRENT_HY \\n[.hy] +\\*[ref*string] +.. +\# +\# Output collected refs +\# +.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 +.. +\# +\# 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 +\# +.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 +\# +.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/contrib/pdfmark/ChangeLog b/contrib/groff/contrib/pdfmark/ChangeLog new file mode 100644 index 000000000000..97417ccc8368 --- /dev/null +++ b/contrib/groff/contrib/pdfmark/ChangeLog @@ -0,0 +1,137 @@ +2005-06-22 Keith Marshall + + pdfroff.sh portability enhancement. + + * pdfroff.sh: (ARGLIST): Variable removed. + (GROFF_STYLE): Use it for all groff invocations. + (INPUT_FILES): Pass to all groff invocations, instead of ARGLIST. + (CS_MACRO, CE_MACRO): Initialize independently. + (CS_FILTER): Simplify quoting; it used to confuse some shells. + (Source): CVS keyword removed; replaced by... + (RCSfile, Revision): these. + +2005-06-17 Keith Marshall + + * pdfroff.sh: (MATCH): Correct quoting. + (Source): Add terminating `$' on CVS keyword. + +2005-06-17 Zvezdan Petkovic + + * Makefile.sub: (RM): Define as `rm -f', for `make' programs + which don't predefine it. + +2005-06-16 Bernd Warken + + * pdfroff.sh: (NULLDEV): Correct misspelled instance of NULDEV. + +2005-05-28 Werner LEMBERG + + * Makefile.sub (.ms.pdf): Use `--stylesheet', not `--style'. + +2005-05-17 Keith Marshall + + Improve portability of `pdfroff' shell script. + + * pdfroff.sh: Add space in shebang, conforming to portability + guidelines in `autoconf' docs. + (searchpath): New shell function; use it instead of `type' command + to locate prerequisite helper programs. + + * pdfroff.man: Document influence of `OSTYPE' and `PATH_SEPARATOR' + environment variables. + + * Makefile.sub: (pdfroff): Make it depend on SH_DEPS_SED_SCRIPT, + from arch/misc/shdeps.sh; use it to customize PATH_SEPARATOR + initialization code for `searchpath' function in pdfroff.sh. + +2005-05-16 Keith Marshall + + Interim documentation update. + + * pdfmark.ms: (GROFF-WEBSITE): New string; use it in references and + examples. + (Section 2.5): Add definitions of D and Z operators, for use with + pdfhref macro. + (Section 2.5.4): Complete description of pdfhref macro usage for + `Linking to Internet Resources'; provide examples. + +2005-05-14 Nick Stoughton + + * pdfmark.tmac (LB): Renamed to ... + (PDFLB): This to avoid conflicts with mm's LB macro. + +2005-05-02 Keith Marshall + + Handle parsing anomalies in Cygwin's `ash', and similar, shells. + + * pdfroff.sh: ($CAT, $GREP, $SED, $GROFF, $DIFF): Avoid interpreting + misdirected error messages, which `type' sends to `stdout' in some + shells, as a successful program file match. + + ($AWK, $GS): Likewise; also ensure that multiple choice match + prototypes are eval'ed as such, in case token splitting occurs + before variable expansion. + +2005-04-24 Keith Marshall + + Add support for folded outlines in PDF documents. + + * pdfmark.tmac (PDFOUTLINE.FOLDLEVEL): New register. + (pdf:bm.emit): Use it. + + * pdfmark.ms: Document it. + +2005-03-25 Werner LEMBERG + + * Makefile.in: Removed. + +2005-03-24 Werner LEMBERG + + * Makefile: Renamed to... + * Makefile.in: This. + +2005-03-22 Keith Marshall + + * pdfroff.sh: Eliminate invalid program reference to $AWK, when + invoked with `--no-reference-dictionary' option. + +2005-03-02 Keith Marshall + + * contrib/pdfmark/Makefile.sub (install_data): Use $(INSTALL_SCRIPT) + to install `pdfroff'. + * contrib/pdfmark/pdfroff.man (opte): New macro. + Use it to remove spurious equal signs from SYNOPSIS. + +2005-02-28 Keith Marshall + + Provide `pdfroff' shell script, and manpage to document it; + runs multiple groff passes, to format PDF documents. + + * pdfroff.sh: New shell script template; + * pdfroff.man: New man page to document it. + + Integrate `pdfmark' into normal groff build system; + install macro `pdfmark' packages, build and install `pdfroff', + and PDF format documentation. + + * Makefile.sub: Rewritten. + * pdfmark.tmac: Modified. + (pdfhref): New macro operators, `D' and `Z'. + (pdf*href-D, pdf*href-Z): New macros: implement them. + (pdf*href.mark.resolve, pdf*href.mark.emit, pdf*href.mark.flush): + Modified macro algorithm, to eliminate inconsistencies between + `grohtml' representations of `opminy' from differing groff versions. + (pdf*href.mark, pdf*href.mark.release, pdf*href.mark.close): + deleted (redundant macros). + (PDFHREF.LEADING): Default value changed (was 2.5p; now -1.0p). + Global comment updates. + + * TODO: Updated. + +2004-12-10 Werner LEMBERG + + * TODO: Updated. + +2004-12-08 Keith Marshall + + First import of pdfmark files. diff --git a/contrib/groff/contrib/pdfmark/Makefile.sub b/contrib/groff/contrib/pdfmark/Makefile.sub new file mode 100644 index 000000000000..39376007c997 --- /dev/null +++ b/contrib/groff/contrib/pdfmark/Makefile.sub @@ -0,0 +1,114 @@ +# Copyright (C) 2005, 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. + +MAN1=\ + pdfroff.n + +CMDFILES=\ + pdfroff + +TMACFILES=\ + pdfmark.tmac \ + spdf.tmac + +PDFDOCFILES=\ + pdfmark.pdf + +CLEANADD=\ + gnu.eps \ + $(PDFDOCFILES) \ + $(CMDFILES) + +# Some `makes' don't predefine RM... +RM=rm -f + +GROFF_BIN_DIR=$(top_builddir)/src/roff/groff +GROFF_OTHER_BIN_DIRS=\ + $(top_builddir)/src/roff/troff \ + $(top_builddir)/src/devices/grops +GROFF_BIN_DIRS=$(GROFF_BIN_DIR) $(GROFF_OTHER_BIN_DIRS) +GROFF_BIN_PATH=`echo $(GROFF_BIN_DIRS) | sed -e 's| *|$(SH_SEP)|g'` + +FFLAG=-F$(top_builddir)/font -F$(top_srcdir)/font +MFLAG=-M$(srcdir) -M$(top_builddir)/tmac -M$(top_srcdir)/tmac +PFLAG=-dpaper=$(PAGE) -P-p$(PAGE) + +PDFROFF=\ + export GROFF_COMMAND_PREFIX; GROFF_COMMAND_PREFIX=''; \ + export GROFF_BIN_DIR; GROFF_BIN_DIR=$(GROFF_BIN_DIR); \ + export GROFF_BIN_PATH; GROFF_BIN_PATH=$(GROFF_BIN_PATH); \ + ./pdfroff $(FFLAG) $(MFLAG) $(PFLAG) + +.SUFFIXES: .ms .pdf +.ms.pdf: + $(RM) $@ + $(PDFROFF) -mspdf --stylesheet=$(srcdir)/cover.ms $< >$@ + +all: pdfroff $(make_pdfdoc) + +pdfdoc: gnu.eps $(PDFDOCFILES) + +gnu.eps: + if test -f $(top_srcdir)/doc/gnu.eps; then \ + cp $(top_srcdir)/doc/gnu.eps . ; \ + elif test -f $(top_builddir)/doc/gnu.eps; then \ + cp $(top_builddir)/doc/gnu.eps . ; \ + else \ + xpmtoppm $(top_srcdir)/doc/gnu.xpm | pnmdepth 15 | \ + $(pnmtops_nosetpage) -noturn -rle >$@ ; \ + fi + +pdfroff: pdfroff.sh $(SH_DEPS_SED_SCRIPT) + $(RM) $@ + sed -f $(SH_DEPS_SED_SCRIPT) \ + -e "s|@VERSION@|$(version)$(revision)|" \ + -e "s|@GROFF_AWK_INTERPRETERS@|$(ALT_AWK_PROGS)|" \ + -e "s|@GROFF_GHOSTSCRIPT_INTERPRETERS@|$(ALT_GHOSTSCRIPT_PROGS)|" \ + -e "s|@GROFF_BIN_DIR@|$(bindir)|" $(srcdir)/pdfroff.sh >$@ + chmod +x $@ + +install_data: $(make_install_pdfdoc) + -test -d $(bindir) || $(mkinstalldirs) $(bindir) + for f in $(CMDFILES); do \ + $(RM) $(bindir)/$$f; \ + $(INSTALL_SCRIPT) $$f $(bindir)/$$f; \ + done + -test -d $(tmacdir) || $(mkinstalldirs) $(tmacdir) + for f in $(TMACFILES); do \ + $(RM) $(tmacdir)/$$f; \ + $(INSTALL_DATA) $(srcdir)/$$f $(tmacdir)/$$f; \ + done + +install_pdfdoc: + -test -d $(pdfdocdir) || $(mkinstalldirs) $(pdfdocdir) + for f in $(PDFDOCFILES); do \ + $(RM) $(pdfdocdir)/$$f; \ + $(INSTALL_DATA) $$f $(pdfdocdir)/$$f; \ + done + +uninstall_sub: + for f in $(CMDFILES); do \ + $(RM) $(bindir)/$$f; \ + done + for f in $(TMACFILES); do \ + $(RM) $(tmacdir)/$$f; \ + done + for f in $(PDFDOCFILES); do \ + $(RM) $(pdfdocdir)/$$f; \ + done diff --git a/contrib/groff/contrib/pdfmark/PROBLEMS b/contrib/groff/contrib/pdfmark/PROBLEMS new file mode 100644 index 000000000000..2fa848bdc447 --- /dev/null +++ b/contrib/groff/contrib/pdfmark/PROBLEMS @@ -0,0 +1,25 @@ +Known PROBLEMS in pdfmark.tmac +============================== + +Bounding boxes for link hot-spots which straddle a page break +are not computed correctly. + +*** Resolved: 06-Dec-2004 (KDM): pdfmark.tmac.patch-20041206 *** + +-------- + +Documents including a large number of cross references may fail, +with an 'input stack limit exceeded' error. + +*** Resolved: 27-Sep-2004 (KDM): pdfmark.tmac.patch-20040927 *** + +-------- + +Links placed in diversions, such as footnotes or floating keeps, +resolve to the wrong destinations; (mapping order becomes confused +between links in diversion, and links in running text following +the diversion). + +-------- + +Annotations placed by .pdfnote cannot exceed about 200 chars. diff --git a/contrib/groff/contrib/pdfmark/README b/contrib/groff/contrib/pdfmark/README new file mode 100644 index 000000000000..276d610fae4e --- /dev/null +++ b/contrib/groff/contrib/pdfmark/README @@ -0,0 +1,50 @@ +README for pdfmark.tmac +======================= + +Copyright (C) 2004, Free Software Foundation Inc. +Contributed by Keith Marshall (keith.d.marshall@ntlworld.com) + +This is free software. See file COPYING, for copying permissions, +and warranty disclaimer. + +This is a preview release of a proposed pdfmark.tmac macro package, +for use with GNU troff (groff). It is not yet complete, and should +be considered as an alpha release; there are a few problems to be +resolved (see file PROBLEMS). + +Partial documentation is provided, in groff-ms format. To convert +this to PDF format, you will require a working groff installation, +a working ghostscript installation, with the gs command in your PATH, +and a GNU-compatible make. The tarball should be unpacked in the +top directory of your groff source tree, then: + + cd /contrib/pdfmark + make pdfmark + +where is the top directory of your current groff +source tree. + +Included in this package, are: + + pdfmark.tmac -- the core pdfmark macro set + spdf.tmac -- a rudimentary set of bindings for ms macros + pdfmark.ms -- preliminary documentation + cover.ms -- a template for the documentation cover sheet + gnu.eps -- the groff logo, copied from the groff distribution + Makefile -- makefile, for formatting the documentation + README -- this file + PROBLEMS -- a list of known problems + TODO -- a list of planned features, not yet implemented + +To make the pdfmark macros generally usable, copy pdfmark.tmac to the +'site-tmac' directory appropriate to your groff installation; (ms users +may also wish to copy spdf.tmac). The macros may then be accessed, by +including the '-mpdfmark' option on the groff command line; (for ms +users, '-mspdf' is equivalent to '-ms -mpdfmark', with some extra +macros 'thrown in'). + +Comments, and bug reports are welcomed. Please post to the groff +mailing list, groff@gnu.org; (you must be subscribed to this list to +post mails). To subscribe, visit + + http://lists.gnu.org/mailman/listinfo/groff diff --git a/contrib/groff/contrib/pdfmark/TODO b/contrib/groff/contrib/pdfmark/TODO new file mode 100644 index 000000000000..a63b14f90f59 --- /dev/null +++ b/contrib/groff/contrib/pdfmark/TODO @@ -0,0 +1,53 @@ +TODO items for pdfmark.tmac +=========================== + +Add copyright information to PDF documentation. + +-------- + +Add acknowledgements and trade mark ownership notifications +to PDF documentation. + +-------- + +Provide documentation in man page and texinfo formats. + +-------- + +Add comments in spdf.tmac, to clarify its operation. +Also add commentary in pdfmark.tmac, to clarify operation of +recent changes. + +-------- + +Make Makefile generic, so 'configure' can resolve target +system dependencies. + +* Comment added 2005-02-26 by Keith Marshall + +If this refers to contrib/pdfmark/Makefile, then it is addressed by the new +`pdfroff' script; the original Makefile may be considered redundant. Local +system dependencies are resolved by `configure', and applied to `pdfroff', +when it is generated from `pdfroff.sh'. + +-------- + +Improve Makefile.sub, to integrate pdfmark.tmac installation +into a regular groff build. Add it to groff's Makefile.in. + +* Comment added 2005-02-26 by Keith Marshall + +Completed. + +-------- + +Provide a `pdfmark' script (or call it `groff2pdf'?) which +actually converts a groff input file to pdf, and which +takes care of the necessary intermediate steps to handle +PDF marks. + +* Comment added 2005-02-26 by Keith Marshall + +This facility now provided by `pdfroff' script; documented in `pdfroff.man'. +Man page still requires an additional section, to describe use of `stylesheet' +feature. Script also requires documentation in PDF and texinfo formats. diff --git a/contrib/groff/contrib/pdfmark/cover.ms b/contrib/groff/contrib/pdfmark/cover.ms new file mode 100644 index 000000000000..1fe7e542c486 --- /dev/null +++ b/contrib/groff/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/contrib/pdfmark/pdfmark.ms b/contrib/groff/contrib/pdfmark/pdfmark.ms new file mode 100644 index 000000000000..0e9f0747faed --- /dev/null +++ b/contrib/groff/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/contrib/pdfmark/pdfmark.tmac b/contrib/groff/contrib/pdfmark/pdfmark.tmac new file mode 100644 index 000000000000..385185c42af5 --- /dev/null +++ b/contrib/groff/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 -
      "); 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,38 +669,40 @@ 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, int pageoffset, int linelength) + int indentation_value, int page_offset, + int line_length, int space) { - html_indent *indent; + html_indent *ind; - if (indentation == 0) - indent = NULL; + if (indentation_value == 0) + ind = NULL; else - indent = new html_indent(op, indentation, pageoffset, linelength); - do_para(arg1, indent); + ind = new html_indent(op, indentation_value, page_offset, line_length); + do_para(arg1, ind, space); } /* @@ -671,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; } /* @@ -695,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 */ @@ -702,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; } } @@ -724,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; } @@ -756,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) @@ -765,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) @@ -773,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; } /* @@ -817,7 +879,7 @@ void html_text::remove_def (tag_definition *t) if (l->next == NULL) lastptr = l; } - free(p); + delete p; } } @@ -837,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) @@ -882,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
      @@ -910,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; @@ -919,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. @@ -962,4 +1045,3 @@ void html_text::do_sub (void) { push_para(SUB_TAG); } - diff --git a/contrib/groff/src/devices/grohtml/html-text.h b/contrib/groff/src/devices/grohtml/html-text.h index aa4dd800a592..e0e3cc755ca0 100644 --- a/contrib/groff/src/devices/grohtml/html-text.h +++ b/contrib/groff/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/src/devices/grohtml/html.h b/contrib/groff/src/devices/grohtml/html.h index 431647c62e69..b14fb2c98e59 100644 --- a/contrib/groff/src/devices/grohtml/html.h +++ b/contrib/groff/src/devices/grohtml/html.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001 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/src/devices/grohtml/output.cpp b/contrib/groff/src/devices/grohtml/output.cpp index 2705b9e441da..f25312774aae 100644 --- a/contrib/groff/src/devices/grohtml/output.cpp +++ b/contrib/groff/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/src/devices/grohtml/post-html.cpp b/contrib/groff/src/devices/grohtml/post-html.cpp index 7c96debbf5d1..1283e06139a7 100644 --- a/contrib/groff/src/devices/grohtml/post-html.cpp +++ b/contrib/groff/src/devices/grohtml/post-html.cpp @@ -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 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 @@ -78,6 +79,16 @@ static int simple_anchors = FALSE; /* default to anchors with static int manufacture_headings = FALSE; /* default is to use the Hn html headings, */ /* rather than manufacture our own. */ static color *default_background = NULL; /* has user requested initial bg color? */ +static string job_name; /* if set then the output is split into */ + /* multiple files with `job_name'-%d.html */ +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 */ /* @@ -109,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)); } /* @@ -118,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'); } /* @@ -128,6 +139,9 @@ static int is_digit (char ch) struct file { FILE *fp; file *next; + int new_output_file; + int require_links; + string output_file_name; file (FILE *f); }; @@ -137,21 +151,28 @@ struct file { */ file::file (FILE *f) - : fp(f), next(0) + : fp(f), next(NULL), new_output_file(FALSE), + require_links(FALSE), output_file_name("") { } class files { public: - files (); - FILE *get_file (void); - void start_of_list (void); - void move_next (void); - void add_new_file (FILE *f); + files (); + FILE *get_file (void); + void start_of_list (void); + void move_next (void); + void add_new_file (FILE *f); + void set_file_name (string name); + void set_links_required (void); + int are_links_required (void); + int is_new_output_file (void); + string file_name (void); + string next_file_name (void); private: - file *head; - file *tail; - file *ptr; + file *head; + file *tail; + file *ptr; }; /* @@ -159,7 +180,7 @@ private: */ files::files () - : head(0), tail(0), ptr(0) + : head(NULL), tail(NULL), ptr(NULL) { } @@ -169,11 +190,10 @@ files::files () FILE *files::get_file (void) { - if (ptr) { - return( ptr->fp ); - } else { - return( 0 ); - } + if (ptr) + return ptr->fp; + else + return NULL; } /* @@ -191,7 +211,7 @@ void files::start_of_list (void) void files::move_next (void) { - if (ptr != 0) + if (ptr != NULL) ptr = ptr->next; } @@ -201,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 { @@ -211,6 +231,76 @@ void files::add_new_file (FILE *f) ptr = tail; } +/* + * set_file_name - sets the final file name to contain the html + * data to name. + */ + +void files::set_file_name (string name) +{ + if (ptr != NULL) { + ptr->output_file_name = name; + ptr->new_output_file = TRUE; + } +} + +/* + * set_links_required - issue links when processing this component + * of the file. + */ + +void files::set_links_required (void) +{ + if (ptr != NULL) + ptr->require_links = TRUE; +} + +/* + * are_links_required - returns TRUE if this section of the file + * requires that links should be issued. + */ + +int files::are_links_required (void) +{ + if (ptr != NULL) + return ptr->require_links; + return FALSE; +} + +/* + * is_new_output_file - returns TRUE if this component of the file + * is the start of a new output file. + */ + +int files::is_new_output_file (void) +{ + if (ptr != NULL) + return ptr->new_output_file; + return FALSE; +} + +/* + * file_name - returns the name of the file. + */ + +string files::file_name (void) +{ + if (ptr != NULL) + return ptr->output_file_name; + return string(""); +} + +/* + * next_file_name - returns the name of the next file. + */ + +string files::next_file_name (void) +{ + if (ptr != NULL && ptr->next != NULL) + return ptr->next->output_file_name; + return string(""); +} + /* * the class and methods for styles */ @@ -229,7 +319,7 @@ struct style { }; style::style() - : f(0) + : f(NULL) { } @@ -265,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"); } @@ -280,7 +370,7 @@ char_block::char_block(int length) char_block::~char_block() { if (buffer != NULL) - free(buffer); + a_delete buffer; } class char_buffer { @@ -295,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; @@ -316,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 { @@ -341,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) @@ -382,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); @@ -392,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); @@ -423,16 +517,16 @@ text_glob::text_glob (style *s, const char *str, int length, int max_vertical, int max_horizontal, bool is_troff_command, bool is_auto_image, bool is_special_command, - bool is_a_line, int line_thickness) + bool is_a_line_flag, int line_thickness) : text_style(*s), text_string(str), text_length(length), minv(min_vertical), minh(min_horizontal), maxv(max_vertical), maxh(max_horizontal), is_tag(is_troff_command), is_img_auto(is_auto_image), is_special(is_special_command), - is_line(is_a_line), thickness(line_thickness), tab(NULL) + is_line(is_a_line_flag), thickness(line_thickness), tab(NULL) { } 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) { } @@ -483,11 +577,11 @@ void text_glob::text_glob_special (style *s, char *str, int length, void text_glob::text_glob_line (style *s, int min_vertical , int min_horizontal, int max_vertical , int max_horizontal, - int thickness) + int thickness_value) { text_glob *g = new text_glob(s, "", 0, min_vertical, min_horizontal, max_vertical, max_horizontal, - FALSE, FALSE, FALSE, TRUE, thickness); + FALSE, FALSE, FALSE, TRUE, thickness_value); *this = *g; delete g; } @@ -565,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); } /* @@ -574,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_nf - returns TRUE if glob contains the tag .nf + * 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 .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); } /* @@ -602,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); } /* @@ -611,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); } /* @@ -620,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); } /* @@ -629,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); } /* @@ -638,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); } /* @@ -647,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); } /* @@ -656,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); } /* @@ -665,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); } /* @@ -674,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); } /* @@ -683,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); } /* @@ -705,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))) @@ -732,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 @@ -774,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 { @@ -893,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) @@ -902,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; @@ -911,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; @@ -921,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; @@ -931,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; - } } } } @@ -948,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; } } @@ -991,7 +1136,7 @@ void list::start_from_tail (void) int list::is_empty (void) { - return( head == 0 ); + return head == NULL; } /* @@ -1000,7 +1145,7 @@ int list::is_empty (void) int list::is_equal_to_tail (void) { - return( ptr == tail ); + return ptr == tail; } /* @@ -1009,7 +1154,7 @@ int list::is_equal_to_tail (void) int list::is_equal_to_head (void) { - return( ptr == head ); + return ptr == head; } /* @@ -1036,7 +1181,7 @@ void list::move_right (void) text_glob* list::get_data (void) { - return( ptr->datum ); + return ptr->datum; } /* @@ -1047,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; } /* @@ -1062,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; } /* @@ -1078,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); @@ -1121,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, @@ -1183,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); @@ -1202,15 +1347,18 @@ void page::add_tag (style *s, const string &str, void page::add_line (style *s, int line_number, - int x1, int y1, int x2, int y2, + int x_1, int y_1, int x_2, int y_2, int thickness) { - if (y1 == y2) { + if (y_1 == y_2) { text_glob *g = new text_glob(); g->text_glob_line(s, - min(y1, y2), min(x1, y2), max(y1, y2), max(x1, x2), + min(y_1, y_2), min(x_1, x_2), + max(y_1, y_2), max(x_1, x_2), thickness); - glyphs.add(g, line_number, min(y1, y2), min(x1, y2), max(y1, y2), max(x1, x2)); + glyphs.add(g, line_number, + min(y_1, y_2), min(x_1, x_2), + max(y_1, y_2), max(x_1, x_2)); } } @@ -1240,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; @@ -1267,10 +1416,10 @@ void page::add_and_encode (style *s, const string &str, if (html_glyph) html_string += html_glyph; else { - int index=s->f->name_to_index((troff_charname + '\0').contents()); + int idx=s->f->name_to_index((troff_charname + '\0').contents()); - if (s->f->contains(index) && (index != 0)) - html_string += s->f->get_code(index); + if (s->f->contains(idx) && (idx != 0)) + html_string += s->f->get_code(idx); } } } else @@ -1279,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); } } @@ -1380,18 +1538,21 @@ public: header_desc (); ~header_desc (); - int no_of_headings; // how many headings have we found? - char_buffer headings; // all the headings used in the document - list headers; // list of headers built from .NH and .SH - int header_level; // current header level - int written_header; // have we written the header yet? - string header_buffer; // current header text + int no_of_level_one_headings; // how many .SH or .NH 1 have we found? + int no_of_headings; // how many headings have we found? + char_buffer headings; // all the headings used in the document + list headers; // list of headers built from .NH and .SH + list header_filename; // in which file is this header? + int header_level; // current header level + int written_header; // have we written the header yet? + string header_buffer; // current header text void write_headings (FILE *f, int force); }; header_desc::header_desc () - : no_of_headings(0), header_level(2), written_header(0) + : no_of_level_one_headings(0), no_of_headings(0), + header_level(2), written_header(0) { } @@ -1412,9 +1573,15 @@ void header_desc::write_headings (FILE *f, int force) int h=1; headers.start_from_head(); + header_filename.start_from_head(); do { g = headers.get_data(); - fputs("text_string, f); + } + fputs("#", f); if (simple_anchors) { string buffer(ANCHOR_TEMPLATE); @@ -1428,12 +1595,345 @@ void header_desc::write_headings (FILE *f, int force) fputs(g->text_string, f); fputs("
      \n", f); headers.move_right(); + if (multiple_files && (! header_filename.is_empty())) + header_filename.move_right(); } while (! headers.is_equal_to_head()); fputs("\n", f); } } } +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; @@ -1477,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 &); @@ -1508,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); @@ -1533,6 +2050,9 @@ class html_printer : public printer { void do_auto_image (text_glob *g, const char *filename); 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); int start_subscript (text_glob *g); @@ -1563,6 +2083,18 @@ class html_printer : public printer { void remove_courier_tabs (void); void update_min_max (colType type_of_col, int *minimum, int *maximum, text_glob *g); void add_table_end (const char *); + void do_file_components (void); + 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: @@ -1570,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 (); }; @@ -1639,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. */ @@ -1650,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"); @@ -1669,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. */ @@ -1711,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. */ @@ -1721,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. */ @@ -1759,7 +2313,8 @@ static string &generate_img_src (const char *filename) filename++; } if (exists(filename)) - *s += string(""; + *s += string(""; return *s; } @@ -1808,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; @@ -1830,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 */ @@ -1861,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; } @@ -1897,7 +2445,7 @@ void html_printer::write_header (void) // lastly we generate a tag - html.nl().put_string("").nl(); } - current_paragraph->do_para(&html, "", indentation, pageoffset, linelength); + /* and now we save the file name in which this header will occur */ + + style st; // fake style to enable us to use the list data structure + + text_glob *h=new text_glob(); + h->text_glob_html(&st, + header.headings.add_string(file_list.file_name()), + file_list.file_name().length(), + header.no_of_headings, header.header_level, + header.no_of_headings, header.header_level); + + header.header_filename.add(h, + header.no_of_headings, + header.no_of_headings, header.no_of_headings, + header.no_of_headings, header.no_of_headings); + + current_paragraph->do_para(&html, "", get_troff_indent(), pageoffset, linelength, space); } } @@ -1955,6 +2519,10 @@ void html_printer::determine_header_level (int level) } } header.header_level = level+1; + if (header.header_level >= 2 && header.header_level <= split_level) { + header.no_of_level_one_headings++; + insert_split_file(); + } } /* @@ -1964,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 tags 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); @@ -2046,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; } /* @@ -2056,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; } /* @@ -2066,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; } /* @@ -2077,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); } } @@ -2105,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); } } @@ -2134,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; } } @@ -2168,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; + } } /* @@ -2205,26 +2875,110 @@ 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(); html.set_file(file_list.get_file()); } +/* + * insert_split_file - + */ + +void html_printer::insert_split_file (void) +{ + if (multiple_files) { + current_paragraph->done_para(); // flush paragraph + html.end_line(); // flush line + html.set_file(file_list.get_file()); // flush current file + file_list.add_new_file(xtmpfile()); + string split_file = job_name; + + split_file += string("-"); + split_file += as_string(header.no_of_level_one_headings); + split_file += string(".html"); + split_file += '\0'; + + file_list.set_file_name(split_file); + html.set_file(file_list.get_file()); + } +} + +/* + * do_job_name - assigns the job_name to name. + */ + +void html_printer::do_job_name (char *name) +{ + if (! multiple_files) { + multiple_files = TRUE; + while (name != NULL && (*name != (char)0) && (*name == ' ')) + name++; + job_name = 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; } @@ -2237,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; @@ -2258,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) @@ -2283,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); @@ -2292,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); @@ -2313,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(); @@ -2354,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(); @@ -2363,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); @@ -2389,6 +3152,12 @@ void html_printer::troff_tag (text_glob *g) do_pointsize(a); } else if (strcmp(t, ".links") == 0) { do_links(); + } 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) { @@ -2412,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 ); } /* @@ -2427,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 */ @@ -2456,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; } @@ -2471,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--; } } @@ -2491,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(); @@ -2517,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); @@ -2537,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(); @@ -2553,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); } @@ -2595,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) { @@ -2608,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()); } @@ -2624,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()) @@ -2640,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) @@ -2707,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) @@ -2721,9 +3516,9 @@ void html_printer::lookahead_for_tables (void) int found_col = FALSE; int seen_text = FALSE; int ncol = 0; - int colmin; - int colmax; - html_table *table = new html_table(&html, -1); + int colmin = 0; // pacify compiler + int colmax = 0; // pacify compiler + html_table *tbl = new html_table(&html, -1); const char *tab_defs = NULL; char align = 'L'; int nf = FALSE; @@ -2735,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, " [") ; @@ -2752,11 +3568,11 @@ void html_printer::lookahead_for_tables (void) if (type_of_col == tab_tag && start_of_table != NULL) { page_contents->glyphs.move_left(); insert_tab_te(); - start_of_table->remember_table(table); - table = new html_table(&html, -1); + start_of_table->remember_table(tbl); + tbl = new html_table(&html, -1); page_contents->insert_tag(string("*** TAB -> COL ***")); if (tab_defs != NULL) - table->tab_stops->init(tab_defs); + tbl->tab_stops->init(tab_defs); start_of_table = NULL; last = NULL; } @@ -2770,28 +3586,28 @@ void html_printer::lookahead_for_tables (void) type_of_col = tab_tag; colmin = g->get_tab_args(&align); align = 'L'; // for now as 'C' and 'R' are broken - ncol = table->find_tab_column(colmin); - colmin += pageoffset + indentation; - colmax = table->get_tab_pos(ncol+1); + ncol = tbl->find_tab_column(colmin); + 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(); insert_tab_te(); - start_of_table->remember_table(table); - table = new html_table(&html, -1); + start_of_table->remember_table(tbl); + tbl = new html_table(&html, -1); page_contents->insert_tag(string("*** COL -> TAB ***")); start_of_table = NULL; last = NULL; } if (tab_defs != NULL) - table->tab_stops->init(tab_defs); + tbl->tab_stops->init(tab_defs); type_of_col = tab0_tag; ncol = 1; colmin = 0; - colmax = table->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); @@ -2805,34 +3621,39 @@ void html_printer::lookahead_for_tables (void) seen_text = FALSE; } else if (g->is_ce() && (start_of_table != NULL)) { add_table_end("*** CE ***"); - start_of_table->remember_table(table); + 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 (!table->tab_stops->compatible(tab_defs)) { + + 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 ***"); - start_of_table->remember_table(table); - table = new html_table(&html, -1); + start_of_table->remember_table(tbl); + tbl = new html_table(&html, -1); start_of_table = NULL; type_of_col = none; last = NULL; } - table->tab_stops->init(tab_defs); + tbl->tab_stops->init(tab_defs); } } if (((! g->is_a_tag()) || g->is_tab()) && (start_of_table != NULL)) { // we are in a table and have a glyph - if ((ncol == 0) || (! table->add_column(ncol, colmin, colmax, align))) { + if ((ncol == 0) || (! tbl->add_column(ncol, colmin, colmax, align))) { if (ncol == 0) add_table_end("*** NCOL == 0 ***"); else add_table_end("*** CROSSED COLS ***"); - start_of_table->remember_table(table); - table = new html_table(&html, -1); + start_of_table->remember_table(tbl); + tbl = new html_table(&html, -1); start_of_table = NULL; type_of_col = none; last = NULL; @@ -2843,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; @@ -2876,18 +3700,20 @@ void html_printer::lookahead_for_tables (void) page_contents->glyphs.move_left(); insert_tab_te(); - start_of_table->remember_table(table); - table = NULL; + start_of_table->remember_table(tbl); + tbl = NULL; page_contents->insert_tag(string("*** LAST ***")); } } - if (table != NULL) - delete table; + 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; } @@ -2934,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. */ @@ -2945,7 +3802,7 @@ int html_printer::is_font_courier (font *f) return( (fontname != 0) && (fontname[0] == 'C') ); } - return( FALSE ); + return FALSE; } /* @@ -2994,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(); @@ -3163,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 */ @@ -3187,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) @@ -3297,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()); @@ -3336,17 +4228,17 @@ html_printer::html_printer() * add_to_sbuf - adds character code or name to the sbuf. */ -void html_printer::add_to_sbuf (int index, const string &s) +void html_printer::add_to_sbuf (int idx, const string &s) { if (sbuf_style.f == NULL) return; char *html_glyph = NULL; - unsigned int code = sbuf_style.f->get_code(index); + unsigned int code = sbuf_style.f->get_code(idx); if (s.empty()) { - if (sbuf_style.f->contains(index)) - html_glyph = (char *)sbuf_style.f->get_special_device_encoding(index); + if (sbuf_style.f->contains(idx)) + html_glyph = (char *)sbuf_style.f->get_special_device_encoding(idx); else html_glyph = NULL; @@ -3362,7 +4254,7 @@ void html_printer::add_to_sbuf (int index, const string &s) sbuf += html_glyph; } -int html_printer::sbuf_continuation (int index, const char *name, +int html_printer::sbuf_continuation (int idx, const char *name, const environment *env, int w) { /* @@ -3372,7 +4264,7 @@ int html_printer::sbuf_continuation (int index, const char *name, || ((sbuf_prev_hpos < sbuf_end_hpos) && (env->hpos < sbuf_end_hpos) && ((sbuf_end_hpos-env->hpos < env->hpos-sbuf_prev_hpos)))) { - add_to_sbuf(index, name); + add_to_sbuf(idx, name); sbuf_prev_hpos = sbuf_end_hpos; sbuf_end_hpos += w + sbuf_kern; return TRUE; @@ -3384,7 +4276,7 @@ int html_printer::sbuf_continuation (int index, const char *name, */ if (env->hpos-sbuf_end_hpos < space_width) { - add_to_sbuf(index, name); + add_to_sbuf(idx, name); sbuf_prev_hpos = sbuf_end_hpos; sbuf_end_hpos = env->hpos + w; return TRUE; @@ -3401,18 +4293,18 @@ int html_printer::sbuf_continuation (int index, const char *name, char *get_html_translation (font *f, const string &name) { - int index; + int idx; if ((f == 0) || name.empty()) return NULL; else { - index = f->name_to_index((char *)(name + '\0').contents()); - if (index == 0) { + idx = f->name_to_index((char *)(name + '\0').contents()); + if (idx == 0) { error("character `%s' not found", (name + '\0').contents()); return NULL; } else - if (f->contains(index)) - return (char *)f->get_special_device_encoding(index); + if (f->contains(idx)) + return (char *)f->get_special_device_encoding(idx); else return NULL; } @@ -3425,7 +4317,7 @@ char *get_html_translation (font *f, const string &name) * is flushed. */ -int html_printer::overstrike(int index, const char *name, const environment *env, int w) +int html_printer::overstrike(int idx, const char *name, const environment *env, int w) { if ((env->hpos < sbuf_end_hpos) || ((sbuf_kern != 0) && (sbuf_end_hpos - sbuf_kern < env->hpos))) { @@ -3435,7 +4327,7 @@ int html_printer::overstrike(int index, const char *name, const environment *env if (overstrike_detected) { /* already detected, remove previous glyph and use this glyph */ sbuf.set_length(last_sbuf_length); - add_to_sbuf(index, name); + add_to_sbuf(idx, name); sbuf_end_hpos = env->hpos + w; return TRUE; } else { @@ -3444,7 +4336,7 @@ int html_printer::overstrike(int index, const char *name, const environment *env if (! is_bold(sbuf_style.f)) flush_sbuf(); overstrike_detected = TRUE; - add_to_sbuf(index, name); + add_to_sbuf(idx, name); sbuf_end_hpos = env->hpos + w; return TRUE; } @@ -3453,11 +4345,13 @@ int html_printer::overstrike(int index, 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) { @@ -3471,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; @@ -3516,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 */ @@ -3573,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) @@ -3606,6 +4535,133 @@ void html_printer::do_body (void) } } +/* + * emit_link - generates:
      name + */ + +void html_printer::emit_link (const string &to, const char *name) +{ + fputs("", stdout); + fputs(name, stdout); + fputs("", stdout); +} + +/* + * write_navigation - writes out the links which navigate between + * file fragments. + */ + +void html_printer::write_navigation (const string &top, const string &prev, + const string &next, const string ¤t) +{ + int need_bar = FALSE; + + if (multiple_files) { + write_rule(); + fputs("[ ", stdout); + if ((strcmp(prev.contents(), "") != 0) && prev != top && prev != current) { + emit_link(prev, "prev"); + need_bar = TRUE; + } + if ((strcmp(next.contents(), "") != 0) && next != top && next != current) { + if (need_bar) + fputs(" | ", stdout); + emit_link(next, "next"); + need_bar = TRUE; + } + if (top != "" && (strcmp(top.contents(), "") != 0) && top != current) { + if (need_bar) + fputs(" | ", stdout); + emit_link(top, "top"); + } + fputs(" ]\n", stdout); + write_rule(); + } +} + +/* + * 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. + */ + +void html_printer::do_file_components (void) +{ + int fragment_no = 1; + string top; + string prev; + string next; + string current; + + file_list.start_of_list(); + top = string(job_name); + top += string(".html"); + top += '\0'; + next = file_list.next_file_name(); + next += '\0'; + current = next; + while (file_list.get_file() != 0) { + if (fseek(file_list.get_file(), 0L, 0) < 0) + fatal("fseek on temporary file failed"); + html.copy_file(file_list.get_file()); + fclose(file_list.get_file()); + + file_list.move_next(); + if (file_list.is_new_output_file()) { + if (fragment_no > 1) + write_navigation(top, prev, next, current); + prev = current; + current = next; + next = file_list.next_file_name(); + next += '\0'; + string split_file = file_list.file_name(); + split_file += '\0'; + fflush(stdout); + freopen(split_file.contents(), "w", stdout); + fragment_no++; + writeHeadMetaStyle(); + write_navigation(top, prev, next, current); + } + if (file_list.are_links_required()) + header.write_headings(stdout, TRUE); + } + if (fragment_no > 1) + write_navigation(top, prev, next, current); + else + write_rule(); +} + +/* + * writeHeadMetaStyle - emits the and \n", stdout); +} + html_printer::~html_printer() { #ifdef LONG_FOR_TIME_T @@ -3628,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(); @@ -3650,28 +4700,131 @@ html_printer::~html_printer() #endif html.end_line(); html.end_line(); - /* - * now run through the file list copying each temporary file in turn and emitting the links. - */ - file_list.start_of_list(); - while (file_list.get_file() != 0) { - if (fseek(file_list.get_file(), 0L, 0) < 0) - fatal("fseek on temporary file failed"); - html.copy_file(file_list.get_file()); - fclose(file_list.get_file()); - file_list.move_next(); - if (file_list.get_file() != 0) - header.write_headings(stdout, TRUE); + + if (multiple_files) { + fputs("\n", stdout); + fputs("\n", stdout); + do_file_components(); + } else { + do_file_components(); + fputs("\n", stdout); + fputs("\n", stdout); } - write_rule(); - fputs("\n", stdout); - fputs("\n", stdout); } /* - * 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) @@ -3702,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. + * 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. */ } 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), @@ -3722,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]; @@ -3733,58 +4963,69 @@ 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: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 'l': - auto_links = FALSE; - break; - case 'r': - auto_rule = FALSE; - break; - case 'd': - /* handled by pre-html */ + 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 'o': - /* handled by pre-html */ - break; - case 'p': - /* handled by pre-html */ - break; case 'i': /* handled by pre-html */ break; case 'I': /* handled by pre-html */ break; - case 'D': - /* handled by pre-html */ + case 'j': + multiple_files = TRUE; + job_name = optarg; + break; + case 'l': + auto_links = FALSE; break; case 'n': simple_anchors = TRUE; break; + case 'o': + /* handled by pre-html */ + break; + case 'p': + /* handled by pre-html */ + break; + case 'r': + auto_rule = FALSE; + break; + case 's': + base_point_size = atoi(optarg); + break; + case 'S': + split_level = atoi(optarg) + 1; + break; + case 'v': + printf("GNU post-grohtml (groff) version %s\n", Version_string); + exit(0); + break; case CHAR_MAX + 1: // --help usage(stdout); exit(0); diff --git a/contrib/groff/src/devices/grolbp/lbp.cpp b/contrib/groff/src/devices/grolbp/lbp.cpp index b34a1e08f94c..081ab998ff26 100644 --- a/contrib/groff/src/devices/grolbp/lbp.cpp +++ b/contrib/groff/src/devices/grolbp/lbp.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1994, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +/* 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. @@ -18,16 +19,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. */ /* TODO - Add X command to include bitmaps */ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif #include "driver.h" #include "lbp.h" @@ -93,21 +91,6 @@ private: int paperwidth; }; -// Compatibility section. -// -// Here we define some functions not present in some of the targets -// platforms -#ifndef HAVE_STRSEP -// Solaris 8 doesn't have the strsep function -static char *strsep(char **pcadena, const char *delim) -{ - char *p; - p = strtok(*pcadena, delim); - *pcadena = strtok(NULL, delim); - return p; -} -#endif - lbp_font::lbp_font(const char *nm) : font(nm) { @@ -231,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) { @@ -294,10 +277,10 @@ char *lbp_printer::font_name(const lbp_font *f, const int siz) return bfont_name; } -void lbp_printer::set_char(int index, font *f, const environment *env, +void lbp_printer::set_char(int idx, font *f, const environment *env, int w, const char *) { - int code = f->get_code(index); + int code = f->get_code(idx); unsigned char ch = code & 0xff; unsigned short symbol_set = code >> 8; if (f != cur_font) { @@ -441,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) { @@ -663,12 +646,15 @@ int main(int argc, char **argv) int c = 0; int option_index = 0; while (c >= 0) { - c = getopt_long (argc, argv, "F:p:lvo:c:hw:", + c = getopt_long (argc, argv, "c:F:hI:lo:p:vw:", long_options, &option_index); switch (c) { case 'F': font::command_line_font_dir(optarg); break; + case 'I': + // ignore include path arguments + break; case 'p': { const char *s; @@ -694,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/src/devices/grolbp/lbp.h b/contrib/groff/src/devices/grolbp/lbp.h index e669ff2ab0c6..b3171cf03fdd 100644 --- a/contrib/groff/src/devices/grolbp/lbp.h +++ b/contrib/groff/src/devices/grolbp/lbp.h @@ -1,5 +1,6 @@ // -*- C -*- -/* Copyright (C) 1994, 2000, 2001, 2003 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 index ) +lbpsavestatus(int idx ) { - fprintf(lbpoutput,"\033[%d%%y",index); -}; + fprintf(lbpoutput,"\033[%d%%y",idx); +} + static inline void -lbprestorestatus(int index ) +lbprestorestatus(int idx ) { - fprintf(lbpoutput,"\033[%d%cz",index ,'%'); -}; + fprintf(lbpoutput,"\033[%d%cz",idx ,'%'); +} + static inline void -lbpsavepos(int index) +lbpsavepos(int idx) { - fprintf(lbpoutput,"\033[1;%d;0x",index); -}; + fprintf(lbpoutput,"\033[1;%d;0x",idx); +} + static inline void -lbprestorepos(int index) +lbprestorepos(int idx) { - fprintf(lbpoutput,"\033[0;%d;0x",index); -}; + fprintf(lbpoutput,"\033[0;%d;0x",idx); +} + static inline void -lbprestoreposx(int index) +lbprestoreposx(int idx) { - fprintf(lbpoutput,"\033[0;%d;1x",index); -}; + 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,\ @@ -228,11 +250,12 @@ vdmvarc(int centerx, int centery,int radius, int startx, int starty, int endx, i { char x[4],y[4],rad[4],stx[4],sty[4],enx[4],eny[4],styl[4],op[4]; - vdmprintf("}6%s%s%s%s%s%s%s%s\x1e",vdmnum(arcopen,op),\ + vdmprintf("}6%s%s%s%s%s%s%s%s%s\x1e",vdmnum(arcopen,op),\ 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) */ @@ -348,13 +378,13 @@ static inline void splinerel(double px,double py,int flush) { static int lx = 0 ,ly = 0; - static float pend = 0.0; + static double pend = 0.0; static int dy = 0, despx = 0, despy = 0, sigpend = 0; - int dxnew ,dynew, sg; + int dxnew = 0, dynew = 0, sg; char xcoord[4],ycoord[4]; - float npend ; + 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,111 +431,116 @@ 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 */ static void -quadratic_spline(double a1,double b1, double a2, double b2, \ - double a3, double b3, double a4, double b4) +quadratic_spline(double a_1, double b_1, double a_2, double b_2, \ + double a_3, double b_3, double a_4, double b_4) { - double x1, y1, x4, y4; - double xmid, ymid; + double x_1, y_1, x_4, y_4; + double x_mid, y_mid; - x1 = a1; y1 = b1; - x4 = a4; y4 = b4; - xmid = (a2 + a3)/2.0; - ymid = (b2 + b3)/2.0; - if ((fabs(x1 - xmid) < THRESHOLD) && (fabs(y1 - ymid) < THRESHOLD)) { - splinerel(xmid,ymid,0); -/* fprintf(tfp, "PA%.4f,%.4f;\n", xmid, ymid);*/ + x_1 = a_1; y_1 = b_1; + x_4 = a_4; y_4 = b_4; + x_mid = (a_2 + a_3)/2.0; + y_mid = (b_2 + b_3)/2.0; + if ((fabs(x_1 - x_mid) < THRESHOLD) + && (fabs(y_1 - y_mid) < THRESHOLD)) { + splinerel(x_mid, y_mid, 0); +/* fprintf(tfp, "PA%.4f,%.4f;\n", x_mid, y_mid);*/ } else { - quadratic_spline(x1, y1, ((x1+a2)/2.0), ((y1+b2)/2.0), - ((3.0*a2+a3)/4.0), ((3.0*b2+b3)/4.0), xmid, ymid); - } + quadratic_spline(x_1, y_1, ((x_1+a_2)/2.0), ((y_1+b_2)/2.0), + ((3.0*a_2+a_3)/4.0), ((3.0*b_2+b_3)/4.0), x_mid, y_mid); + } - if ((fabs(xmid - x4) < THRESHOLD) && (fabs(ymid - y4) < THRESHOLD)) { - splinerel(x4,y4,0); -/* fprintf(tfp, "PA%.4f,%.4f;\n", x4, y4);*/ + if ((fabs(x_mid - x_4) < THRESHOLD) + && (fabs(y_mid - y_4) < THRESHOLD)) { + splinerel(x_4, y_4, 0); +/* fprintf(tfp, "PA%.4f,%.4f;\n", x_4, y_4);*/ } else { - quadratic_spline(xmid, ymid, ((a2+3.0*a3)/4.0), ((b2+3.0*b3)/4.0), - ((a3+x4)/2.0), ((b3+y4)/2.0), x4, y4); - }; -}; /* quadratic_spline */ + 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); + } +} + #define XCOORD(i) numbers[(2*i)] #define YCOORD(i) numbers[(2*i)+1] static void -vdmspline(int numpoints, int ox,int oy, int *numbers) +vdmspline(int numpoints, int o_x, int o_y, int *numbers) { - double cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4; - double x1, y1, x2, y2; + double cx_1, cy_1, cx_2, cy_2, cx_3, cy_3, cx_4, cy_4; + double x_1, y_1, x_2, y_2; char xcoord[4],ycoord[4]; int i; /*p = s->points; - x1 = p->x/ppi;*/ - x1 = ox; - y1 = oy; + x_1 = p->x/ppi;*/ + x_1 = o_x; + y_1 = o_y; /* p = p->next; - x2 = p->x/ppi; - y2 = p->y/ppi;*/ - x2 = ox + XCOORD(0); - y2 = oy + YCOORD(0); - cx1 = (x1 + x2)/2.0; - cy1 = (y1 + y2)/2.0; - cx2 = (x1 + 3.0*x2)/4.0; - cy2 = (y1 + 3.0*y2)/4.0; + x_2 = p->x/ppi; + y_2 = p->y/ppi;*/ + x_2 = o_x + XCOORD(0); + y_2 = o_y + YCOORD(0); + cx_1 = (x_1 + x_2)/2.0; + cy_1 = (y_1 + y_2)/2.0; + cx_2 = (x_1 + 3.0*x_2)/4.0; + cy_2 = (y_1 + 3.0*y_2)/4.0; -/* fprintf(stderr,"Spline %d (%d,%d)\n",numpoints,(int)x1,(int)y1);*/ - vdmprintf("1%s%s",vdmnum((int)x1,xcoord),vdmnum((int)y1,ycoord)); - splinerel(x1,y1,-1); - splinerel(cx1,cy1,0); +/* fprintf(stderr,"Spline %d (%d,%d)\n",numpoints,(int)x_1,(int)y_1);*/ + vdmprintf("1%s%s",vdmnum((int)x_1,xcoord),vdmnum((int)y_1,ycoord)); + splinerel(x_1,y_1,-1); + splinerel(cx_1,cy_1,0); /* fprintf(tfp, "PA%.4f,%.4f;PD%.4f,%.4f;\n", - x1, y1, cx1, cy1);*/ + x_1, y_1, cx_1, cy_1);*/ /*for (p = p->next; p != NULL; p = p->next) {*/ for (i = 1; i < (numpoints); i++) { - x1 = x2; - y1 = y2; -/* x2 = p->x/ppi; - y2 = p->y/ppi;*/ - x2 = x1 + XCOORD(i); - y2 = y1 + YCOORD(i); - cx3 = (3.0*x1 + x2)/4.0; - cy3 = (3.0*y1 + y2)/4.0; - cx4 = (x1 + x2)/2.0; - cy4 = (y1 + y2)/2.0; - /* fprintf(stderr,"Point (%d,%d) - (%d,%d)\n",(int)x1,(int)(y1),(int)x2,(int)y2);*/ - quadratic_spline(cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4); - cx1 = cx4; - cy1 = cy4; - cx2 = (x1 + 3.0*x2)/4.0; - cy2 = (y1 + 3.0*y2)/4.0; - } - x1 = x2; - y1 = y2; -/* p = s->points->next; - x2 = p->x/ppi; - y2 = p->y/ppi;*/ - x2 = ox + XCOORD(0); - y2 = oy + YCOORD(0); - cx3 = (3.0*x1 + x2)/4.0; - cy3 = (3.0*y1 + y2)/4.0; - cx4 = (x1 + x2)/2.0; - cy4 = (y1 + y2)/2.0; - splinerel(x1,y1,0); - splinerel(x1,y1,1); - /*vdmprintf("%s%s",vdmnum((int)(x1-lx),xcoord),\ - vdmnum((int)(y1-ly),ycoord));*/ + x_1 = x_2; + y_1 = y_2; +/* x_2 = p->x/ppi; + y_2 = p->y/ppi;*/ + x_2 = x_1 + XCOORD(i); + y_2 = y_1 + YCOORD(i); + cx_3 = (3.0*x_1 + x_2)/4.0; + cy_3 = (3.0*y_1 + y_2)/4.0; + cx_4 = (x_1 + x_2)/2.0; + cy_4 = (y_1 + y_2)/2.0; + /* fprintf(stderr,"Point (%d,%d) - (%d,%d)\n",(int)x_1,(int)(y_1),(int)x_2,(int)y_2);*/ + quadratic_spline(cx_1, cy_1, cx_2, cy_2, cx_3, cy_3, cx_4, cy_4); + cx_1 = cx_4; + cy_1 = cy_4; + cx_2 = (x_1 + 3.0*x_2)/4.0; + cy_2 = (y_1 + 3.0*y_2)/4.0; + } + x_1 = x_2; + y_1 = y_2; +/* p = s->points->next; + x_2 = p->x/ppi; + y_2 = p->y/ppi;*/ + x_2 = o_x + XCOORD(0); + y_2 = o_y + YCOORD(0); + cx_3 = (3.0*x_1 + x_2)/4.0; + cy_3 = (3.0*y_1 + y_2)/4.0; + cx_4 = (x_1 + x_2)/2.0; + cy_4 = (y_1 + y_2)/2.0; + splinerel(x_1, y_1, 0); + splinerel(x_1, y_1, 1); + /*vdmprintf("%s%s",vdmnum((int)(x_1-lx),xcoord),\ + vdmnum((int)(y_1-ly),ycoord));*/ vdmprintf("\x1e\n"); -/* fprintf(tfp, "PA%.4f,%.4f;PU;\n", x1, y1);*/ +/* fprintf(tfp, "PA%.4f,%.4f;PU;\n", x_1, y_1);*/ -}; /* vdmspline */ +} #endif diff --git a/contrib/groff/src/devices/grolj4/Makefile.sub b/contrib/groff/src/devices/grolj4/Makefile.sub index 9899b7a58bb4..1216a49aa8ad 100644 --- a/contrib/groff/src/devices/grolj4/Makefile.sub +++ b/contrib/groff/src/devices/grolj4/Makefile.sub @@ -1,5 +1,6 @@ PROG=grolj4$(EXEEXT) MAN1=grolj4.n +MAN5=lj4_font.n XLIBS=$(LIBDRIVER) $(LIBGROFF) MLIB=$(LIBM) OBJS=lj4.$(OBJEXT) diff --git a/contrib/groff/src/devices/grolj4/grolj4.man b/contrib/groff/src/devices/grolj4/grolj4.man index 267c62183820..260a6198b31b 100644 --- a/contrib/groff/src/devices/grolj4/grolj4.man +++ b/contrib/groff/src/devices/grolj4/grolj4.man @@ -1,5 +1,5 @@ .ig -Copyright (C) 1994-2000, 2001, 2002 Free Software Foundation, Inc. +Copyright (C) 1994-2000, 2001, 2002, 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 @@ -140,6 +140,7 @@ Macros for use with .SH BUGS Small dots. .SH "SEE ALSO" +.BR lj4_font (@MAN5EXT@), .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), .BR groff_out (@MAN5EXT@), diff --git a/contrib/groff/src/devices/grolj4/lj4.cpp b/contrib/groff/src/devices/grolj4/lj4.cpp index 1332e1980ddf..12849542b275 100644 --- a/contrib/groff/src/devices/grolj4/lj4.cpp +++ b/contrib/groff/src/devices/grolj4/lj4.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1994, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1994, 2000, 2001, 2002, 2003, 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. */ /* TODO @@ -277,10 +278,10 @@ int is_unprintable(unsigned char c) return c < 32 && (c == 0 || (7 <= c && c <= 15) || c == 27); } -void lj4_printer::set_char(int index, font *f, const environment *env, +void lj4_printer::set_char(int idx, font *f, const environment *env, int w, const char *) { - int code = f->get_code(index); + int code = f->get_code(idx); unsigned char ch = code & 0xff; unsigned short symbol_set = code >> 8; @@ -611,18 +612,21 @@ int main(int argc, char **argv) { "version", no_argument, 0, 'v' }, { NULL, 0, 0, 0 } }; - while ((c = getopt_long(argc, argv, ":F:p:d:lvw:c:", long_options, NULL)) + while ((c = getopt_long(argc, argv, "c:d:F:I:lp:vw:", long_options, NULL)) != EOF) switch(c) { case 'l': landscape_flag = 1; break; + case 'I': + // ignore include search path + break; case ':': if (optopt == 'd') { fprintf(stderr, "duplex assumed to be long-side\n"); duplex_flag = 1; } else - fprintf(stderr, "option -%c requires an operand\n", optopt); + fprintf(stderr, "option -%c requires an argument\n", optopt); fflush(stderr); break; case 'd': @@ -644,11 +648,9 @@ int main(int argc, char **argv) break; } case 'v': - { - printf("GNU grolj4 (groff) version %s\n", Version_string); - exit(0); - break; - } + printf("GNU grolj4 (groff) version %s\n", Version_string); + exit(0); + break; case 'F': font::command_line_font_dir(optarg); break; diff --git a/contrib/groff/src/devices/grolj4/lj4_font.man b/contrib/groff/src/devices/grolj4/lj4_font.man new file mode 100644 index 000000000000..e82edff7c78f --- /dev/null +++ b/contrib/groff/src/devices/grolj4/lj4_font.man @@ -0,0 +1,167 @@ +.tr ~ +.ig +Copyright (C) 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 preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +.\" 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" +.. +.tr ~ +.TH LJ4_FONT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" +.\" -------------------------------------------------------------------------- +.SH NAME +.\" -------------------------------------------------------------------------- +lj4_font \- groff fonts for use with devlj4 +.\" -------------------------------------------------------------------------- +.SH DESCRIPTION +.\" -------------------------------------------------------------------------- +Nominally, all Hewlett-Packard LaserJet~4\(enseries and newer printers +have the same internal fonts: 45 scalable fonts and one bitmapped +Lineprinter font. +The scalable fonts are available in sizes between 0.25 point and 999.75 +points, in 0.25-point increments; the Lineprinter font is available only +in 8.5-point size. +.LP +The LaserJet font files included with +.B groff +assume that all printers since the LaserJet~4 are identical. +There are some differences between fonts in the earlier and more recent +printers, however. +The LaserJet~4 printer used Agfa Intellifont technology for 35 of the +internal scalable fonts; the remaining 10 scalable fonts were TrueType. +Beginning with the LaserJet~4000\(enseries printers introduced in 1997, +all scalable internal fonts have been TrueType. +The number of printable glyphs differs slightly between Intellifont and +TrueType fonts (generally, the TrueType fonts include more glyphs), and +there are some minor differences in glyph metrics. +Differences among printer models are described in the +.I "PCL~5 Comparison Guide" +and the +.I "PCL~5 Comparison Guide Addendum" +(for printers introduced since approximately 2001). +.LP +LaserJet printers reference a glyph by a combination of a 256-glyph +symbol set and an index within that symbol set. +Many glyphs appear in more than one symbol set; all combinations of +symbol set and index that reference the same glyph are equivalent. +For each glyph, +.BR hpftodit (@MAN1EXT@) +searches a list of symbol sets, and selects the first set that contains +the glyph. +The printing code generated by +.BR hpftodit (@MAN1EXT@) +is an integer that encodes a numerical value for the symbol set in the +high byte(s), and the index in the low byte. +See +.BR groff_font (@MAN5EXT@) +for a complete description of the font file format; symbol sets are +described in greater detail in the +.IR "PCL~5 Printer Language Technical Reference Manual" . +.LP +Two of the scalable fonts, Symbol and Wingdings, are bound to +256-glyph symbol sets; the remaining scalable fonts, as well as the +Lineprinter font, support numerous symbol sets, sufficient to enable +printing of more than 600 glyphs. +.LP +The metrics generated by +.BR hpftodit (@MAN1EXT@) +assume that the DESC file contains values of 1200 for res and 6350 for +unitwidth (or any combination (e.g., 2400 and 3175) for which +res~\(mu~unitwidth~=~7\|620\|000). +Although HP PCL~5 LaserJet printers support an internal resolution of +7200 units per inch, they use a 16-bit signed integer for cursor +positioning; if +.B devlj4 +is to support U.S. ledger paper (11\(sd~\(mu~17\(sd), the maximum usable +resolution is 32\|767~/~17, or 1927, units per inch, which rounds down to +1200 units per inch. +If the largest required paper size is less (e.g., 8.5\(sd~\(mu~11\(sd or +A5), a greater resolution (and lesser unitwidth) can be specified. +.\" -------------------------------------------------------------------------- +.SH LIMITATIONS +.\" -------------------------------------------------------------------------- +Font metrics for Intellifont fonts were provided by Tagged Font Metric +(TFM) files originally developed by Agfa/Compugraphic. +The TFM files provided for these fonts supported 600+ glyphs and +contained extensive lists of kern pairs. +.LP +To accommodate developers who had become accustomed to TFM files, HP also +provided TFM files for the 10 TrueType fonts included in the LaserJet~4. +The TFM files for TrueType fonts generally included less information +than the Intellifont TFMs, supporting fewer glyphs, and in most cases, +providing no kerning information. +By the time the LaserJet~4000 printer was introduced, most +developers had migrated to other means of obtaining font metrics, +and support for new TFM files was very limited. +The TFM files provided for the TrueType fonts in the LaserJet~4000 +support only the Latin 2 (ISO 8859-2) symbol set, and include no kerning +information; consequently, they are of little value for any but the most +rudimentary documents. +.LP +Because the Intellifont TFM files contain considerably more information, +they generally are preferable to the TrueType TFM files even for use +with the TrueType fonts in the newer printers. +The metrics for the TrueType fonts are very close, though not identical, +to those for the earlier Intellifont fonts of the same names. +Although most output using the Intellifont metrics with the newer +printers is quite acceptable, a few glyphs may fail to print as +expected. +The differences in glyph metrics may be particularly noticeable with +composite parentheses, brackets, and braces used by +.BR eqn (@MAN1EXT@) . +A script, located in +.BR @FONTDIR@/devlj4/generate , +can be used to adjust the metrics for these glyphs in the special font S +for use with printers that have all TrueType fonts. +.LP +At the time HP last supported TFM files, only Version 1 of the Unicode +standard was available. +Consequently, many glyphs lacking assigned code points were assigned by +HP to the Private Use Area (PUA). +Later versions of the Unicode standard included code points outside the +PUA for many of these glyphs. +The HP-supplied TrueType TFM files use the PUA assignments; +TFM files generated from more recent TrueType font files require the +later Unicode values to access the same glyphs. +Consequently, two different mapping files may be required: one for the +HP-supplied TFM files, and one for more recent TFM files. +.\" -------------------------------------------------------------------------- +.SH FILES +.\" -------------------------------------------------------------------------- +.Tp \w'\fB@FONTDIR@/devlj4/DESC'u+2n +.B @FONTDIR@/devlj4/DESC +Device description file. +.TP +.BI @FONTDIR@/devlj4/ F +Font description file for font +.IR F . +.\" -------------------------------------------------------------------------- +.SH "SEE ALSO" +.\" -------------------------------------------------------------------------- +.ad 0 +.BR groff (@MAN1EXT@), +.BR groff_diff (@MAN1EXT@), +.BR hpftodit (@MAN1EXT@), +.BR grolj4 (@MAN1EXT@), +.BR groff_font (@MAN5EXT@) +. +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/contrib/groff/src/devices/grops/grops.man b/contrib/groff/src/devices/grops/grops.man index e9f8f02a9835..0ff2579d73b2 100644 --- a/contrib/groff/src/devices/grops/grops.man +++ b/contrib/groff/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 @@ -17,6 +18,9 @@ translations approved by the Free Software Foundation instead of in the original English. .. . +.do nr grops_C \n[.C] +.cp 0 +. .mso www.tmac . . @@ -62,6 +66,7 @@ grops \- PostScript driver for groff .OP \-b n .OP \-c n .OP \-F dir +.OP \-I dir .OP \-p papersize .OP \-P prologue .OP \-w n @@ -112,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 @@ -184,6 +198,9 @@ PostScript command). This was the behaviour of groff version 1.18.1 and earlier; it is needed for older printers which don't understand PostScript LanguageLevel\~2. . +It is also necessary if the output is further processed to get an +encapsulated PS (EPS) file -- see below. +. .IP The default value can be specified by a . @@ -225,6 +242,19 @@ This option allows you to generate documents that can be printed both on letter (8.5\(mu11) paper and on A4 paper without change. . .TP +.BI \-I dir +This option may be used to specify a directory to search for +files on the command line and files named in +.B \eX'ps: import' +and +.B \eX'ps: file' +escapes. +The current directory is always searched first. +This option may be specified more than once; +the directories will be searched in the order specified. +No directory search is performed for files specified using an absolute path. +. +.TP .B \-l Print the document in landscape format. . @@ -754,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; @@ -772,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, @@ -783,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 @@ -1002,6 +1032,32 @@ comments) should be used. . . +.SS Encapsulated PostScript +.B grops +itself doesn't emit bounding box information. +. +With the help of GhostScript the following commands will produce an +encapsulated PS file +.B foo.eps +from input file +.BR foo : +. +.IP +.B +groff -P-b16 foo > foo.ps +.br +.B +gs -dNOPAUSE -sDEVICE=bbox -- foo.ps 2> foo.bbox +.br +.B +cat foo.ps | sed \-e '/%%Orientation/rfoo.bbx' > foo.eps +.br +.B +rm foo.bbx +.br +. +. +. .SS TrueType fonts TrueType fonts can be used with .B grops @@ -1103,6 +1159,12 @@ 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: .\" mode: nroff .\" End: diff --git a/contrib/groff/src/devices/grops/ps.cpp b/contrib/groff/src/devices/grops/ps.cpp index f1c094b494da..b6a54032c9d9 100644 --- a/contrib/groff/src/devices/grops/ps.cpp +++ b/contrib/groff/src/devices/grops/ps.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, 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. */ /* * PostScript documentation: @@ -42,6 +42,9 @@ extern "C" { extern "C" const char *Version_string; +// search path defaults to the current directory +search_path include_search_path(0, 0, 0, 1); + static int landscape_flag = 0; static int manual_feed_flag = 0; static int ncopies = 1; @@ -326,9 +329,14 @@ ps_output &ps_output::put_fix_number(int i) ps_output &ps_output::put_float(double d) { char buf[128]; - sprintf(buf, "%.3g", d); - int len = strlen(buf); - if (col > 0 && col + len + need_space > max_line_length) { + sprintf(buf, "%.4f", d); + int last = strlen(buf) - 1; + while (buf[last] == '0') + last--; + if (buf[last] == '.') + last--; + buf[++last] = '\0'; + if (col > 0 && col + last + need_space > max_line_length) { putc('\n', fp); col = 0; need_space = 0; @@ -338,7 +346,7 @@ ps_output &ps_output::put_float(double d) col++; } fputs(buf, fp); - col += len; + col += last; need_space = 1; return *this; } @@ -789,7 +797,7 @@ void ps_printer::define_encoding(const char *encoding, int encoding_index) p++; if (*p != '#' && *p != '\0' && (p = strtok(buf, WS)) != 0) { char *q = strtok(0, WS); - int n; + int n = 0; // pacify compiler if (q == 0 || sscanf(q, "%d", &n) != 1 || n < 0 || n >= 256) fatal_with_file_and_line(path, lineno, "bad second field"); vec[n] = new char[strlen(p) + 1]; @@ -1790,7 +1798,7 @@ int main(int argc, char **argv) { "version", no_argument, 0, 'v' }, { NULL, 0, 0, 0 } }; - while ((c = getopt_long(argc, argv, "b:c:F:glmp:P:vw:", long_options, NULL)) + while ((c = getopt_long(argc, argv, "b:c:F:gI:lmp:P:vw:", long_options, NULL)) != EOF) switch(c) { case 'b': @@ -1810,6 +1818,9 @@ int main(int argc, char **argv) case 'g': guess_flag = 1; break; + case 'I': + include_search_path.command_line_dir(optarg); + break; case 'l': landscape_flag = 1; break; @@ -1864,6 +1875,7 @@ int main(int argc, char **argv) static void usage(FILE *stream) { fprintf(stream, - "usage: %s [-glmv] [-b n] [-c n] [-w n] [-P prologue] [-F dir] [files ...]\n", +"usage: %s [-glmv] [-b n] [-c n] [-w n] [-I dir] [-P prologue]\n" +" [-F dir] [files ...]\n", program_name); } diff --git a/contrib/groff/src/devices/grops/ps.h b/contrib/groff/src/devices/grops/ps.h index a4b4169b1255..fabf47dbfcab 100644 --- a/contrib/groff/src/devices/grops/ps.h +++ b/contrib/groff/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: @@ -123,3 +123,7 @@ enum { USE_PS_ADOBE_2_0 = 010, NO_PAPERSIZE = 020 }; + +#include "searchpath.h" + +extern search_path include_search_path; diff --git a/contrib/groff/src/devices/grops/psrm.cpp b/contrib/groff/src/devices/grops/psrm.cpp index ab94ffee6077..f1894f593c44 100644 --- a/contrib/groff/src/devices/grops/psrm.cpp +++ b/contrib/groff/src/devices/grops/psrm.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, 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 "driver.h" #include "stringclass.h" @@ -347,7 +347,7 @@ void resource_manager::supply_resource(resource *r, int rank, FILE *outfp, r->flags |= resource::BUSY; if (rank > r->rank) r->rank = rank; - char *path; + char *path = 0; // pacify compiler FILE *fp = 0; if (r->filename != 0) { if (r->type == RESOURCE_FONT) { @@ -360,7 +360,7 @@ void resource_manager::supply_resource(resource *r, int rank, FILE *outfp, } else { errno = 0; - fp = fopen(r->filename, "r"); + fp = include_search_path.open_file_cautious(r->filename); if (!fp) { error("can't open `%1': %2", r->filename, strerror(errno)); a_delete r->filename; diff --git a/contrib/groff/src/devices/grotty/grotty.man b/contrib/groff/src/devices/grotty/grotty.man index 198ca4732995..6c56457044e5 100644 --- a/contrib/groff/src/devices/grotty/grotty.man +++ b/contrib/groff/src/devices/grotty/grotty.man @@ -1,5 +1,5 @@ .ig -Copyright (C) 1989-2000, 2001, 2002 Free Software Foundation, Inc. +Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -17,6 +17,8 @@ translations approved by the Free Software Foundation instead of in the original English. .. . +.do nr grotty_C \n[.C] +.cp 0 . .TH GROTTY @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" .SH NAME @@ -414,6 +416,8 @@ cell, affecting all subsequent operations. .BR man (1), .BR less (1) . +.cp \n[grotty_C] +. .\" Local Variables: .\" mode: nroff .\" End: diff --git a/contrib/groff/src/devices/grotty/tty.cpp b/contrib/groff/src/devices/grotty/tty.cpp index 812ebf826496..a959461f922a 100644 --- a/contrib/groff/src/devices/grotty/tty.cpp +++ b/contrib/groff/src/devices/grotty/tty.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- -/* 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. @@ -16,14 +17,16 @@ 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" #include "ptable.h" -declare_ptable(char) -implement_ptable(char) +typedef signed char schar; + +declare_ptable(schar) +implement_ptable(schar) extern "C" const char *Version_string; @@ -41,25 +44,38 @@ extern "C" const char *Version_string; static int horizontal_tab_flag = 0; static int form_feed_flag = 0; -static int bold_flag = 1; -static int underline_flag = 1; +static int bold_flag_option = 1; +static int bold_flag; +static int underline_flag_option = 1; +static int underline_flag; static int overstrike_flag = 1; static int draw_flag = 1; -static int italic_flag = 0; -static int reverse_flag = 0; +static int italic_flag_option = 0; +static int italic_flag; +static int reverse_flag_option = 0; +static int reverse_flag; static int old_drawing_scheme = 0; +static void update_options(); +static void usage(FILE *stream); + +static int hline_char = '-'; +static int vline_char = '|'; + enum { UNDERLINE_MODE = 0x01, BOLD_MODE = 0x02, VDRAW_MODE = 0x04, HDRAW_MODE = 0x08, CU_MODE = 0x10, - COLOR_CHANGE = 0x20 + COLOR_CHANGE = 0x20, + START_LINE = 0x40, + END_LINE = 0x80 }; // Mode to use for bold-underlining. -static unsigned char bold_underline_mode = BOLD_MODE|UNDERLINE_MODE; +static unsigned char bold_underline_mode_option = BOLD_MODE|UNDERLINE_MODE; +static unsigned char bold_underline_mode; #ifndef IS_EBCDIC_HOST #define CSI "\033[" @@ -77,7 +93,7 @@ static unsigned char bold_underline_mode = BOLD_MODE|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" @@ -105,13 +121,14 @@ tty_font *tty_font::load_tty_font(const char *s) const char *num = f->get_internal_name(); long n; if (num != 0 && (n = strtol(num, 0, 0)) != 0) - f->mode = int(n & (BOLD_MODE|UNDERLINE_MODE)); + f->mode = (unsigned char)(n & (BOLD_MODE|UNDERLINE_MODE)); if (!underline_flag) f->mode &= ~UNDERLINE_MODE; if (!bold_flag) f->mode &= ~BOLD_MODE; if ((f->mode & (BOLD_MODE|UNDERLINE_MODE)) == (BOLD_MODE|UNDERLINE_MODE)) - f->mode = (f->mode & ~(BOLD_MODE|UNDERLINE_MODE)) | bold_underline_mode; + f->mode = (unsigned char)((f->mode & ~(BOLD_MODE|UNDERLINE_MODE)) + | bold_underline_mode); return f; } @@ -138,11 +155,12 @@ class glyph { static glyph *free_list; public: glyph *next; - short hpos; + int w; + int hpos; unsigned int code; unsigned char mode; - char back_color_idx; - char fore_color_idx; + schar back_color_idx; + schar fore_color_idx; void *operator new(size_t); void operator delete(void *); inline int draw_mode() { return mode & (VDRAW_MODE|HDRAW_MODE); } @@ -181,19 +199,19 @@ class tty_printer : public printer { int nlines; int cached_v; int cached_vpos; - char curr_fore_idx; - char curr_back_idx; + schar curr_fore_idx; + schar curr_back_idx; int is_underline; int is_bold; int cu_flag; - PTABLE(char) tty_colors; - void make_underline(); - void make_bold(unsigned int); - char color_to_idx(color *col); - void add_char(unsigned int, int, int, color *, color *, unsigned char); + PTABLE(schar) tty_colors; + void make_underline(int); + void make_bold(unsigned int, int); + schar color_to_idx(color *col); + 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, char *, - char = DEFAULT_COLOR_IDX); + int tty_color(unsigned int, unsigned int, unsigned int, schar *, + schar = DEFAULT_COLOR_IDX); public: tty_printer(const char *device); ~tty_printer(); @@ -203,7 +221,7 @@ public: void change_color(const environment * const env); void change_fill_color(const environment * const env); void put_char(unsigned int); - void put_color(char, int); + void put_color(schar, int); void begin_page(int) { } void end_page(int page_length); font *make_font(const char *); @@ -233,14 +251,14 @@ char *tty_printer::make_rgb_string(unsigned int r, int tty_printer::tty_color(unsigned int r, unsigned int g, - unsigned int b, char *idx, char value) + unsigned int b, schar *idx, schar value) { int unknown_color = 0; char *s = make_rgb_string(r, g, b); - char *i = tty_colors.lookup(s); + schar *i = tty_colors.lookup(s); if (!i) { unknown_color = 1; - i = new char[1]; + i = new schar[1]; *i = value; tty_colors.define(s, i); } @@ -249,10 +267,14 @@ int tty_printer::tty_color(unsigned int r, return unknown_color; } -tty_printer::tty_printer(const char *device) : cached_v(0) +tty_printer::tty_printer(const char *dev) : cached_v(0) { - is_utf8 = !strcmp(device, "utf8"); - char dummy; + is_utf8 = !strcmp(dev, "utf8"); + if (is_utf8) { + hline_char = 0x2500; + vline_char = 0x2502; + } + schar dummy; // black, white (void)tty_color(0, 0, 0, &dummy, 0); (void)tty_color(color::MAX_COLOR_VAL, @@ -278,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) { @@ -297,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) @@ -310,13 +345,13 @@ void tty_printer::make_bold(unsigned int c) } } -char tty_printer::color_to_idx(color *col) +schar tty_printer::color_to_idx(color *col) { if (col->is_default()) return DEFAULT_COLOR_IDX; unsigned int r, g, b; col->get_rgb(&r, &g, &b); - char idx; + schar idx; if (tty_color(r, g, b, &idx)) { char *s = col->print_color(); error("Unknown color (%1) mapped to default", s); @@ -328,15 +363,15 @@ char 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) @@ -377,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); @@ -400,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') @@ -433,17 +470,18 @@ void tty_printer::special(char *arg, const environment *env, char type) old_drawing_scheme = 1; else old_drawing_scheme = 0; + update_options(); } } 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) @@ -462,10 +500,22 @@ void tty_printer::draw(int code, int *p, int np, const environment *env) v += len; len = -len; } - while (len >= 0) { - add_char('|', env->hpos, v, env->col, env->fill, VDRAW_MODE); + if (len >= 0 && len <= font::vert) + add_char(vline_char, font::hor, env->hpos, v, env->col, env->fill, + VDRAW_MODE|START_LINE|END_LINE); + else { + 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, 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, font::hor, env->hpos, v, env->col, env->fill, + VDRAW_MODE|END_LINE); } } if (p[1] == 0) { @@ -476,10 +526,22 @@ void tty_printer::draw(int code, int *p, int np, const environment *env) h += len; len = -len; } - while (len >= 0) { - add_char('-', h, env->vpos, env->col, env->fill, HDRAW_MODE); + if (len >= 0 && len <= font::hor) + add_char(hline_char, font::hor, h, env->vpos, env->col, env->fill, + HDRAW_MODE|START_LINE|END_LINE); + else { + 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, 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, font::hor, h, env->vpos, env->col, env->fill, + HDRAW_MODE|END_LINE); } } } @@ -511,7 +573,7 @@ void tty_printer::put_char(unsigned int wc) putchar(wc); } -void tty_printer::put_color(char color_index, int back) +void tty_printer::put_color(schar color_index, int back) { if (color_index == DEFAULT_COLOR_IDX) { putstring(SGR_DEFAULT); @@ -541,6 +603,20 @@ void tty_printer::put_color(char color_index, int back) } } +// The possible Unicode combinations for crossing characters. +// +// ` ' = 0, ` -' = 4, `- ' = 8, `--' = 12, +// +// ` ' = 0, ` ' = 1, `|' = 2, `|' = 3 +// | | + +static int crossings[4*4] = { + 0x0000, 0x2577, 0x2575, 0x2502, + 0x2576, 0x250C, 0x2514, 0x251C, + 0x2574, 0x2510, 0x2518, 0x2524, + 0x2500, 0x252C, 0x2534, 0x253C +}; + void tty_printer::end_page(int page_length) { if (page_length % font::vert != 0) @@ -588,7 +664,12 @@ void tty_printer::end_page(int page_length) if (nextp && p->hpos == nextp->hpos) { if (p->draw_mode() == HDRAW_MODE && nextp->draw_mode() == VDRAW_MODE) { - nextp->code = '+'; + if (is_utf8) + nextp->code = + crossings[((p->mode & (START_LINE|END_LINE)) >> 4) + + ((nextp->mode & (START_LINE|END_LINE)) >> 6)]; + else + nextp->code = '+'; continue; } if (p->draw_mode() != 0 && p->draw_mode() == nextp->draw_mode()) { @@ -611,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); @@ -627,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); @@ -655,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); @@ -666,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; @@ -682,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 @@ -711,7 +792,23 @@ printer *make_printer() return new tty_printer(device); } -static void usage(FILE *stream); +static void update_options() +{ + if (old_drawing_scheme) { + italic_flag = 0; + reverse_flag = 0; + bold_underline_mode = bold_underline_mode_option; + bold_flag = bold_flag_option; + underline_flag = underline_flag_option; + } + else { + italic_flag = italic_flag_option; + reverse_flag = reverse_flag_option; + bold_underline_mode = BOLD_MODE|UNDERLINE_MODE; + bold_flag = 1; + underline_flag = 1; + } +} int main(int argc, char **argv) { @@ -726,7 +823,7 @@ int main(int argc, char **argv) { "version", no_argument, 0, 'v' }, { NULL, 0, 0, 0 } }; - while ((c = getopt_long(argc, argv, "bBcdfF:hioruUv", long_options, NULL)) + while ((c = getopt_long(argc, argv, "bBcdfF:hiI:oruUv", long_options, NULL)) != EOF) switch(c) { case 'v': @@ -735,11 +832,14 @@ int main(int argc, char **argv) break; case 'i': // Use italic font instead of underlining. - italic_flag = 1; + italic_flag_option = 1; + break; + case 'I': + // ignore include search path break; case 'b': // Do not embolden by overstriking. - bold_flag = 0; + bold_flag_option = 0; break; case 'c': // Use old scheme for emboldening and underline. @@ -747,7 +847,7 @@ int main(int argc, char **argv) break; case 'u': // Do not underline. - underline_flag = 0; + underline_flag_option = 0; break; case 'o': // Do not overstrike (other than emboldening and underlining). @@ -755,15 +855,15 @@ int main(int argc, char **argv) break; case 'r': // Use reverse mode instead of underlining. - reverse_flag = 1; + reverse_flag_option = 1; break; case 'B': // Do bold-underlining as bold. - bold_underline_mode = BOLD_MODE; + bold_underline_mode_option = BOLD_MODE; break; case 'U': // Do bold-underlining as underlining. - bold_underline_mode = UNDERLINE_MODE; + bold_underline_mode_option = UNDERLINE_MODE; break; case 'h': // Use horizontal tabs. @@ -790,15 +890,7 @@ int main(int argc, char **argv) default: assert(0); } - if (old_drawing_scheme) { - italic_flag = 0; - reverse_flag = 0; - } - else { - bold_underline_mode = BOLD_MODE|UNDERLINE_MODE; - bold_flag = 1; - underline_flag = 1; - } + update_options(); if (optind >= argc) do_file("-"); else { diff --git a/contrib/groff/src/devices/xditview/ChangeLog b/contrib/groff/src/devices/xditview/ChangeLog new file mode 100644 index 000000000000..41ea31c5967d --- /dev/null +++ b/contrib/groff/src/devices/xditview/ChangeLog @@ -0,0 +1,542 @@ +2004-05-29 Werner LEMBERG + + gxditview and xtotroff have been integrated into the normal groff + directory structure; future changes are logged in the main + ChangeLog file. + +2004-05-13 Werner LEMBERG + +Version 1.19.1 released +======================= + +2004-04-17 Werner LEMBERG + + * device.c (scale_round): Round correctly for negative values + (this is the same function as in src/libs/libgroff/font.c). + Found by Paul Eggert. + +2003-11-10 Werner LEMBERG + + * Imakefile.in: s/@top_srcdir@/@abs_top_srcdir@/, + s/@groff_top_builddir@/@abs_top_builddir@/. + +Version 1.19 released +===================== + +2003-03-03 Werner LEMBERG + + * Imakefile.in (extraclean): Added gxditview._man. + +2003-01-28 Werner LEMBERG + + * Imakefile.in (SEP): New variable; set to @PATH_SEPARATOR@. + (GROFF_FONTPATH): Use it. + +2003-01-07 Werner LEMBERG + + * DviChar.c (Adobe_Symbol_map): Add `sqrt'. + +2003-01-06 Werner LEMBERG + + * DviChar.c (Adobe_Symbol_map): Add `integral'. + +2002-12-29 Werner LEMBERG + + * DviChar.c (ISO_8859_1_map): Remove `ap' and `eq'. + +2002-12-20 Werner LEMBERG + + * DviChar.c (Adobe_Symbol_map): Don't include `or'. + * draw.c (AdjustCharDeltas): Apply correction only if nadj > 1. + (DoCharacter): Call FlushCharCache if font size and font number + differ. + Reset `dw->dvi.cache.adjustable' properly. + +2002-12-09 Werner LEMBERG + + * DviChar.c (ISO_8859_1_map): Use `tno' symbol instead of `no'. + +2002-12-01 Werner LEMBERG + + * Imakefile.in: Use `InstallAppDefaultsLong' instead of + `InstallAppDefaults' to make it work if build directory isn't + $srcdir. + +2002-11-24 Werner LEMBERG + + * DviChar.c (Adobe_Symbol_map): Add glyph `braceex'. + +2002-11-14 Werner LEMBERG + + * DviChar.c (ISO_8859_1_map): Don't include `or'. + +Version 1.18.1 released +======================= + +2002-09-16 Werner LEMBERG + + * Imakefile.in (GROFF_LOCALFONTDIR): New variable. + (GROFF_FONTPATH): Use it. + Remove /usr/local/lib/font. + +Version 1.18.0 released +======================= + +2002-06-22 Werner LEMBERG + + * gxditview.c (main): Handle `-help' and `--help' correctly. + +2002-06-17 Colin Watson + + * Imakefile.in: s/@top_builddir@/@groff_top_builddir@/. + +2002-04-06 Werner LEMBERG + + * DviChar.c (ISO_8859_1_map, Adobe_Symbol_map): Remove all + characters > 0x80. + * parse.c (ParseInput): Ignore `m' command. + (ParseDrawFunction): Don't move for unknown drawing functions. + Don't move for `f' drawing function. + +2002-03-25 Werner LEMBERG + + * DviChar.c (ISO_8859_1_map): Use `t+-', `tmu', and `tdi' symbols + instead of `+-', `mu', and `di', respectively. + +2002-02-23 Werner LEMBERG + + * DviChar.c (ISO_8859_1_map): Add `mc' symbol. + +2001-09-22 Werner LEMBERG + + * Imakefile.in: Redefine `ProgramTargetHelper' as + `ProgramTargetHelperNoMan' and add a call to `InstallManPageLong' + to make the `install.man' target work if the build directory isn't + $srcdir. + +Version 1.17.2 released +======================= + +Version 1.17.1 released +======================= + +2001-04-21 Albert Chin-A-Young + + * Imakefile.in: Add support for recent HP architectures. + +Version 1.17 released +===================== + +2001-01-04 Rob Daasch + + * parse.c (ParseInput): Added 'F' to command switch to swallow + filename strings as ignored comments. + +2000-12-02 Werner LEMBERG + + * device.c (find_file): Remove home directory in search path. + +2000-11-14 Werner LEMBERG + + * device.c (open_device_file): Remove `path' parameter. + (find_file): Construct font path similar to groff: First the contents + of GROFF_FONT_PATH, then the home directory, and finally the default + font path. + * Imakefile.in: Fix GROFF_DATAPROGRAMDIR and GROFF_FONTPATH. + +2000-10-23 Werner LEMBERG + + Change installation structure for data files from .../groff/... to + .../groff//... to be conform with other GNU + programs. + + * Imakefile.in: Implement it. + +Version 1.16.1 released +======================= + +Version 1.16 released +===================== + +2000-05-18 Werner LEMBERG + + * DviChar.c: Adding `cq' as an alias for "'" in latin-1 map. + +2000-05-03 Werner LEMBERG + + * DviChar.c: Adding `dq' as an alias for `"' in latin-1 map. + +2000-04-28 Werner LEMBERG + + * DviChar.c: Replacing `md' glyph name with `pc' in latin-1 map to + make it distinct from the `md' glyph in the symbol font. + +2000-03-03 Werner LEMBERG + + * Imakefile replaced with Imakefile.in which will be configured by + the main configure script of groff. This will set the correct font + path, and it will make it possible to build xditview in a directory + different from $srcdir. + +2000-03-01 Colin Phipps + + * Dvi.c (OpenFile): Use tmpdir() for security reasons. + * xtotroff.c (MapFont): Avoid race while opening file. + +2000-02-06 Werner LEMBERG + + * Imakefile: Adapted to new directory structure. + + * README: Updated. + +Version 1.15 released +===================== + +1999-12-21 Werner LEMBERG + + * README: Fixed ftp GNU address. + +1999-12-13 Werner LEMBERG + + * device.c: Use extern declarations of strtok(), strchr(), and + getenv() only if not defined as macros. + +1999-11-18 Larry Jones + + * xditview.c: Add fallback_resources to allow running without + access to the app-defaults file. + + * Imakefile: Added rule to create app-defaults to a C header file. + + * GXditview-ad.h: New file containing fallback default resources. + + * ad2c: New file to do the app-defaults -> C header file + conversion. + +1999-10-27 Larry Jones + + * font.c (DisposeFontSizes): If there's a problem loading a font, + xditview will fall-back and use the default font, but it hasn't + checked before unloading fonts which could result in unloading the + default font (possibly multiple times) and then X errors. + +1999-09-13 Werner LEMBERG + + * Imakefile (extraclean): Added Makefile. + + * xditview.c (main, MakePrompt): Fixing compilation warnings. + + * TODO: Imakefile should be replaced with a configure script. + +1999-09-13 Werner LEMBERG + + * Makefile: Removed. + +1999-09-12 Werner LEMBERG + + * Imakefile (GROFF_FONTPATH): Another addition. + + * device.c (FONTPATH): Update to match current groff version. + +1999-09-11 Larry Jones + + * Imakefile (GROFF_LIBDIR, GROFF_FONTPATH): Update to match + current groff version. + + * Dvi.c (Realize, Destroy), DviP.h, draw.c (setFillGC), gray*.bm: + Allow 8 levels of gray rather than just 1. + + * draw.c (DrawFilledCircle, DrawFilledEllipse, DrawFilledPolygon): + Draw outlines to prevent gaps between abutting figures. + +1999-05-27 Werner LEMBERG + + * xtotroff.c (usage): Fixed typo. + +Mon Sep 11 10:40:33 1995 James Clark + + * device.c (INT_MIN, INT_MAX): Don't define if already defined. + +Mon Aug 8 11:14:11 1994 James Clark (jjc@jclark.com) + + * DviChar.c (Adobe_Symbol_map): Use \(nb for notsubset. + +Tue Apr 19 04:41:16 1994 James Clark (jjc@jclark.com) + + * Dvi.c (resources): Change default for background and foreground + to "XtDefaultBackground" and "XtDefaultForeground". + +Sat Feb 12 10:38:47 1994 James Clark (jjc@jclark.com) + + * DviChar.c (Adobe_Symbol_map): Rename radicalex to rn. + +Thu May 27 20:30:12 1993 James Clark (jjc@jclark.com) + + * device.c (isascii): Define if necessary. + (canonicalize_name): Cast argument to isdigit() to unsigned char. + +Thu Apr 29 18:36:57 1993 James Clark (jjc at jclark.com) + + * xditview.c: Include . + (NewFile): Don't declare rindex(). Use strrchr() rather than + rindex(). + +Tue Mar 30 15:12:09 1993 James Clark (jjc at jclark) + + * draw.c (charExists): Check that fi->per_char is not NULL. + +Sat Dec 12 17:42:40 1992 James Clark (jjc at jclark) + + * Dvi.c (SetGeometry): Cast XtMakeGeometryRequest arguments. + + * draw.c (DrawPolygon, DrawFilledPolygon): Cast Xtfree argument. + + * font.c (DisposeFontSizes): Add declaration. + + * draw.c (FakeCharacter): Add declaration. + +Wed Oct 28 13:24:00 1992 James Clark (jjc at jclark) + + * Imakefile (install.dev): Deleted. + (fonts): New target. + +Mon Oct 12 10:50:44 1992 James Clark (jjc at jclark) + + * Imakefile (install.dev): Say when we're installing devX*-12. + + * Imakefile (install.dev): Depends on DESC and FontMap. + +Thu Oct 1 20:03:45 1992 James Clark (jjc at jclark) + + * xditview.c (Syntax): Mention -filename option. + +Sat Aug 15 12:56:39 1992 James Clark (jjc at jclark) + + * GXditview.ad: Bind space and return to NextPage. Bind backspace + and delete to previous page. + + * DviChar.c (Adobe_Symbol_map): Add `an'. + + * DviChar.c (Adobe_Symbol_map): Add arrowvertex, arrowverttp, and + arrowvertbt. + +Mon Aug 10 11:54:27 1992 James Clark (jjc at jclark) + + * FontMap: Add m/p fields to the fonts names. + +Sat Aug 8 12:00:28 1992 James Clark (jjc at jclark) + + * DESC: Leave font positions 5-9 blank. + +Tue Jul 28 11:37:05 1992 James Clark (jjc at jclark) + + * Imakefile: Don't use gendef. Pass definition of FONTPATH using + DEFINES. + (path.h): Deleted. + (device.c): Don't include path.h. Provide default definition of + FONTPATH. + +Mon Jul 6 14:06:53 1992 James Clark (jjc at jclark) + + * Imakefile: Don't install tmac.X and tmac.Xps. + * tmac.X, tmac.Xps: Moved to ../macros. + + * Imakefile: Don't install eqnchar. + * eqnchar: Deleted. + +Sun Jun 14 12:55:02 1992 James Clark (jjc@jclark) + + * tmac.Xps: Handle OE, oe, lq, rq. + * draw.c (FakeCharacter): Don't handle these. + + * draw.c (FakeCharacter): Don't handle f/. + +Mon Jun 8 11:46:37 1992 James Clark (jjc@jclark) + + * tmac.X: Translate char160 to space. + +Sun Jun 7 14:39:53 1992 James Clark (jjc@jclark) + + * tmac.X: Do `mso tmac.psic' before restoring compatibility mode. + + * tmac.X: Add \(OE, \(oe, \(ah, \(ao, \(ho. + + * tmac.Xps: Make it work in compatibility mode. + Redo existing character definitions with .Xps-char. + Add more character definitions. + (Xps-char): New macro. + +Sat Jun 6 21:46:03 1992 James Clark (jjc@jclark) + + * DviChar.c (Adobe_Symbol_map): Add +h, +f, +p, Fn, lz. + * tmac.X: Add \(bq, \(Bq, \(aq. + * tmac.Xps: Handle \(aq, \(bq, \(Bq, \(Fn. + +Wed Jun 3 11:11:15 1992 James Clark (jjc@jclark) + + * DviChar.c (Adobe_Symbol_map): Add wp. + +Tue Apr 21 09:21:59 1992 James Clark (jjc at jclark) + + * GXditview.ad: Bind n, p, q keys to NextPage, PreviousPage and + Quit actions. + + * xditview.c (RerasterizeAction): New function. + (xditview_actions): Add RerasterizeAction. + * GXditview.ad: Bind r key to Rerasterize action. + +Fri Apr 17 08:25:36 1992 James Clark (jjc at jclark) + + * xditview.c: Add -filename option. + (main): Copy any -filename argument into current_file_name. + +Mon Mar 16 10:21:58 1992 James Clark (jjc at jclark) + + * tmac.X: Load tmac.pspic. + +Sun Mar 8 11:27:19 1992 James Clark (jjc at jclark) + + * Lex.c (GetLine, GetWord, GetNumber): Rewrite. + +Sat Oct 12 22:58:52 1991 James Clark (jjc at jclark) + + * Dvi.c (SetDevice): If the size change request is refused but a + larger geometry is offered, request that. + +Wed Oct 9 12:27:48 1991 James Clark (jjc at jclark) + + * font.c (InstallFontSizes): Ignore FontNameAverageWidth component. + + * Dvi.c (default_font_map): Add `adobe' to font names to avoid + ambiguity. + + * FontMap: New file. + * FontMap.X100, FontMap.X75: Deleted. + * xtotroff.c (main, usage): Add -s and -r options. + (MapFont): Change the font pattern to have the selected resolution and + size. + * Imakefile (install.dev): Use FontMap and supply appropriate -s + and -r options. + + * xtotroff.c (MapFont): Check for ambiguity by comparing canonicalized + font names. + + * DviP.h (DviFontList): Add initialized and scalable members. + (font.c): Add support for scalable fonts based on R5 xditview. + + * DviChar.c: Use xmalloc rather than malloc. + * xditview.c (xmalloc): New function. + * xtotroff.c (xmalloc): New function. + * other files: Use XtMalloc and XtFree instead of malloc and free. + +Thu Aug 29 20:15:31 1991 James Clark (jjc at jclark) + + * draw.c (setGC): Do multiplication in floating point to avoid + overflow. + +Tue Aug 13 12:04:41 1991 James Clark (jjc at jclark) + + * draw.c (FakeCharacter): Remove casts in defintion of pack2. + +Tue Jul 30 11:42:39 1991 James Clark (jjc at jclark) + + * tmac.Xps: New file. + * Imakefile (install): Install tmac.Xps. + +Tue Jul 2 09:31:37 1991 James Clark (jjc at jclark) + + * xtotroff.c (main): Pass argv[0] to usage(). + +Sun Jun 30 12:34:06 1991 James Clark (jjc at jclark) + + * xtotroff.c (MapFont): Handle the case where XLoadQueryFont + returns NULL. + +Sat Jun 29 12:32:52 1991 James Clark (jjc at jclark) + + * Imakefile: Use ../gendef to generate path.h. + +Sun Jun 16 13:26:34 1991 James Clark (jjc at jclark) + + * Imakefile (depend.o): Change to device.o. + +Sun Jun 2 12:17:56 1991 James Clark (jjc at jclark) + + * Imakefile: Remove spaces from the beginning of variable + assignment lines. + +Sun May 26 14:14:01 1991 James Clark (jjc at jclark) + + * xditview.c (Syntax): Update. + + * Dvi.c (DviSaveToFile, SaveToFile): New functions. + (FindPage): Check that we're not readingTmp before checking for + end of file of normal input file. + (ClassPartInitialize): New function. + * Dvi.h: Add declaration of DviSaveToFile. + * DviP.h: Add save method to DviClassPart. Declare + InheritSaveToFile. + * xditview.c (DoPrint, Print, PrintAction): New functions. + * xditview.c: Add print menu entry. + * xditview.c: Provide printCommand application resource. + * lex.c: Don't output EOF to temporary file. + + * Dvi.c (QueryGeometry): Check request->request_mode. + + * Dvi.c (SetDevice): New function. + (SetDeviceResolution): Deleted. + + * Dvi.c: Add resolution resource. + * DviP.h: Add definitions of XtNResolution and XtCResolution. + * xditview.c: Add -resolution argument. + * GXditview.ad: Add default for GXditview.height. + * Dvi.c (Initialize, SetDevice): Use default_resolution. + + * Dvi.c: Make MY_HEIGHT and MY_WIDTH use the paperlength and + paperwidth commands in the DESC file. + + * Dvi.c: Add SS font to default font map. + + * draw.c: Rewritten so as not to assume device and display + resolution is the same. + * DviP.h: Include device.h. Add device_font member to DviFontList. + Add adjustable array to DviCharCache. Add text_x_width, + text_device_width, word_flag, device_font, device_font_number, + device, native, device_resolution, display_resolution, + paperlength, paperwidth, scale_factor, sizescale members. + * Dvi.c (Initialize): Initialize new variable used by draw.c. + (Destroy): Call device_destroy. + * font.c (MaxFontPosition): New function. + (LookupFontSizeBySize): Handle sizescale. + (InstallFont): Load the device font. + (ForgetFonts): New function. + (QueryDeviceFont): New function. + * parse.c (ParseInput): Handle t and u commands. Split off + character output into draw.c. + (ParseDeviceControl): Ignore res command. Use the device argument + to the T command. + + * font.c (MapXNameToDviName): Ifdefed out. + + * path.h: New file. + * device.c, device.h: New files. + + * DviChar.c: Add entries for lB, rB, oq, lC, rC, md. + + * INSTALL: New file. + + * libxdvi: Merged into main directory. + * xtotroff.c, xditview.c: Change includes accordingly. + + * devX75, devX100: Merged into main directory. + * xditview.man: Renamed to gxditview.man. + + * Xditview.ad: Renamed to GXditview.ad. + * xditview.c (main): Use class of GXditview rather than xditview. + + * Imakefile: New file. + * Makefile: Deleted. + + * xtotroff.c (MapFont): Unlink output file before opening it. + + * Started separate ChangeLog. diff --git a/contrib/groff/src/devices/xditview/DESC.in b/contrib/groff/src/devices/xditview/DESC.in new file mode 100644 index 000000000000..172170c9c0b5 --- /dev/null +++ b/contrib/groff/src/devices/xditview/DESC.in @@ -0,0 +1,9 @@ +styles R I B BI +fonts 6 0 0 0 0 0 S +sizes 8 10 12 14 18 24 0 +res 75 +X11 +hor 1 +vert 1 +unitwidth 10 +postpro gxditview diff --git a/contrib/groff/src/devices/xditview/Dvi.c b/contrib/groff/src/devices/xditview/Dvi.c new file mode 100644 index 000000000000..f849fb14a9b7 --- /dev/null +++ b/contrib/groff/src/devices/xditview/Dvi.c @@ -0,0 +1,611 @@ +#ifndef SABER +#ifndef lint +static char Xrcsid[] = "$XConsortium: Dvi.c,v 1.9 89/12/10 16:12:25 rws Exp $"; +#endif /* lint */ +#endif /* SABER */ + +/* + * Dvi.c - Dvi display widget + * + */ + +#define XtStrlen(s) ((s) ? strlen(s) : 0) + + /* The following are defined for the reader's convenience. Any + Xt..Field macro in this code just refers to some field in + one of the substructures of the WidgetRec. */ + +#include +#include +#include +#include +#include +#include "DviP.h" + +/**************************************************************** + * + * Full class record constant + * + ****************************************************************/ + +/* Private Data */ + +static char default_font_map_1[] = "\ +TR -adobe-times-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\ +TI -adobe-times-medium-i-normal--*-100-*-*-*-*-iso8859-1\n\ +TB -adobe-times-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\ +TBI -adobe-times-bold-i-normal--*-100-*-*-*-*-iso8859-1\n\ +CR -adobe-courier-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\ +CI -adobe-courier-medium-o-normal--*-100-*-*-*-*-iso8859-1\n\ +CB -adobe-courier-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\ +CBI -adobe-courier-bold-o-normal--*-100-*-*-*-*-iso8859-1\n\ +"; +static char default_font_map_2[] = "\ +HR -adobe-helvetica-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\ +HI -adobe-helvetica-medium-o-normal--*-100-*-*-*-*-iso8859-1\n\ +HB -adobe-helvetica-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\ +HBI -adobe-helvetica-bold-o-normal--*-100-*-*-*-*-iso8859-1\n\ +"; +static char default_font_map_3[] = "\ +NR -adobe-new century schoolbook-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\ +NI -adobe-new century schoolbook-medium-i-normal--*-100-*-*-*-*-iso8859-1\n\ +NB -adobe-new century schoolbook-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\ +NBI -adobe-new century schoolbook-bold-i-normal--*-100-*-*-*-*-iso8859-1\n\ +S -adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\n\ +SS -adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\n\ +"; + +#define offset(field) XtOffset(DviWidget, field) + +#define MY_WIDTH(dw) ((int)(dw->dvi.paperwidth * dw->dvi.scale_factor + .5)) +#define MY_HEIGHT(dw) ((int)(dw->dvi.paperlength * dw->dvi.scale_factor + .5)) + +static XtResource resources[] = { + {(String)XtNfontMap, (String)XtCFontMap, (String)XtRString, + sizeof (char *), offset(dvi.font_map_string), + (String)XtRString, NULL /* set in code */}, + {(String)XtNforeground, (String)XtCForeground, (String)XtRPixel, + sizeof (unsigned long), offset(dvi.foreground), + (String)XtRString, (XtPointer)"XtDefaultForeground"}, + {(String)XtNbackground, (String)XtCBackground, (String)XtRPixel, + sizeof (unsigned long), offset(dvi.background), + (String)XtRString, (XtPointer)"XtDefaultBackground"}, + {(String)XtNpageNumber, (String)XtCPageNumber, (String)XtRInt, + sizeof (int), offset(dvi.requested_page), + (String)XtRString, (XtPointer)"1"}, + {(String)XtNlastPageNumber, (String)XtCLastPageNumber, (String)XtRInt, + sizeof (int), offset (dvi.last_page), + (String)XtRString, (XtPointer)"0"}, + {(String)XtNfile, (String)XtCFile, (String)XtRFile, + sizeof (FILE *), offset (dvi.file), + (String)XtRFile, (XtPointer)0}, + {(String)XtNseek, (String)XtCSeek, (String)XtRBoolean, + sizeof (Boolean), offset(dvi.seek), + (String)XtRString, (XtPointer)"false"}, + {(String)XtNfont, (String)XtCFont, (String)XtRFontStruct, + sizeof (XFontStruct *), offset(dvi.default_font), + (String)XtRString, (XtPointer)"xtdefaultfont"}, + {(String)XtNbackingStore, (String)XtCBackingStore, (String)XtRBackingStore, + sizeof (int), offset(dvi.backing_store), + (String)XtRString, (XtPointer)"default"}, + {(String)XtNnoPolyText, (String)XtCNoPolyText, (String)XtRBoolean, + sizeof (Boolean), offset(dvi.noPolyText), + (String)XtRString, (XtPointer)"false"}, + {(String)XtNresolution, (String)XtCResolution, (String)XtRInt, + sizeof(int), offset(dvi.default_resolution), + (String)XtRString, (XtPointer)"75"}, +}; + +#undef offset + +static void ClassInitialize (void); +static void ClassPartInitialize(WidgetClass); +static void Initialize(Widget, Widget, ArgList, Cardinal *); +static void Realize (Widget, XtValueMask *, XSetWindowAttributes *); +static void Destroy (Widget); +static void Redisplay (Widget, XEvent *, Region); +static Boolean SetValues (Widget, Widget, Widget, + ArgList, Cardinal *); +static Boolean SetValuesHook (Widget, ArgList, Cardinal *); +static XtGeometryResult QueryGeometry (Widget, XtWidgetGeometry *, + XtWidgetGeometry *); +static void ShowDvi (DviWidget); +static void CloseFile (DviWidget); +static void OpenFile (DviWidget); +static void FindPage (DviWidget); + +static void SaveToFile (Widget, FILE *); + +/* font.c */ +extern void ParseFontMap(DviWidget); +extern void DestroyFontMap(DviFontMap *); +extern void ForgetFonts(DviWidget); + +/* page.c */ +extern void DestroyFileMap(DviFileMap *); +extern long SearchPagePosition(DviWidget, int); +extern void FileSeek(DviWidget, long); +extern void ForgetPagePositions(DviWidget); + +/* parse.c */ +extern int ParseInput(register DviWidget); + +DviClassRec dviClassRec = { +{ + &widgetClassRec, /* superclass */ + (String)"Dvi", /* class_name */ + sizeof(DviRec), /* size */ + ClassInitialize, /* class_initialize */ + ClassPartInitialize, /* class_part_initialize */ + FALSE, /* class_inited */ + Initialize, /* initialize */ + NULL, /* initialize_hook */ + Realize, /* realize */ + NULL, /* actions */ + 0, /* num_actions */ + resources, /* resources */ + XtNumber(resources), /* resource_count */ + NULLQUARK, /* xrm_class */ + FALSE, /* compress_motion */ + TRUE, /* compress_exposure */ + TRUE, /* compress_enterleave */ + FALSE, /* visible_interest */ + Destroy, /* destroy */ + NULL, /* resize */ + Redisplay, /* expose */ + SetValues, /* set_values */ + SetValuesHook, /* set_values_hook */ + NULL, /* set_values_almost */ + NULL, /* get_values_hook */ + NULL, /* accept_focus */ + XtVersion, /* version */ + NULL, /* callback_private */ + 0, /* tm_table */ + QueryGeometry, /* query_geometry */ + NULL, /* display_accelerator */ + NULL /* extension */ +},{ + SaveToFile, /* save */ +}, +}; + +WidgetClass dviWidgetClass = (WidgetClass) &dviClassRec; + +static void ClassInitialize (void) +{ + int len1 = strlen(default_font_map_1); + int len2 = strlen(default_font_map_2); + int len3 = strlen(default_font_map_3); + char *dfm = XtMalloc(len1 + len2 + len3 + 1); + char *ptr = dfm; + strcpy(ptr, default_font_map_1); ptr += len1; + strcpy(ptr, default_font_map_2); ptr += len2; + strcpy(ptr, default_font_map_3); + resources[0].default_addr = dfm; + + XtAddConverter( XtRString, XtRBackingStore, XmuCvtStringToBackingStore, + NULL, 0 ); +} + +/**************************************************************** + * + * Private Procedures + * + ****************************************************************/ + +/* ARGSUSED */ +static void Initialize(Widget request, Widget new_wd, + ArgList args, Cardinal *num_args) +{ + DviWidget dw = (DviWidget) new_wd; + + dw->dvi.current_page = 0; + dw->dvi.font_map = 0; + dw->dvi.cache.index = 0; + dw->dvi.text_x_width = 0; + dw->dvi.text_device_width = 0; + dw->dvi.word_flag = 0; + dw->dvi.file = 0; + dw->dvi.tmpFile = 0; + dw->dvi.state = 0; + dw->dvi.readingTmp = 0; + dw->dvi.cache.char_index = 0; + dw->dvi.cache.font_size = -1; + dw->dvi.cache.font_number = -1; + dw->dvi.cache.adjustable[0] = 0; + dw->dvi.file_map = 0; + dw->dvi.fonts = 0; + dw->dvi.seek = False; + dw->dvi.device_resolution = dw->dvi.default_resolution; + dw->dvi.display_resolution = dw->dvi.default_resolution; + dw->dvi.paperlength = dw->dvi.default_resolution*11; + dw->dvi.paperwidth = (dw->dvi.default_resolution*8 + + dw->dvi.default_resolution/2); + dw->dvi.scale_factor = 1.0; + dw->dvi.sizescale = 1; + dw->dvi.line_thickness = -1; + dw->dvi.line_width = 1; + dw->dvi.fill = DVI_FILL_MAX; + dw->dvi.device_font = 0; + dw->dvi.device_font_number = -1; + dw->dvi.device = 0; + dw->dvi.native = 0; + + request = request; /* unused; suppress compiler warning */ + args = args; + num_args = num_args; +} + +#include "gray1.bm" +#include "gray2.bm" +#include "gray3.bm" +#include "gray4.bm" +#include "gray5.bm" +#include "gray6.bm" +#include "gray7.bm" +#include "gray8.bm" + +static void +Realize (Widget w, XtValueMask *valueMask, XSetWindowAttributes *attrs) +{ + DviWidget dw = (DviWidget) w; + XGCValues values; + + if (dw->dvi.backing_store != Always + WhenMapped + NotUseful) { + attrs->backing_store = dw->dvi.backing_store; + *valueMask |= CWBackingStore; + } + XtCreateWindow (w, (unsigned)InputOutput, (Visual *) CopyFromParent, + *valueMask, attrs); + values.foreground = dw->dvi.foreground; + values.cap_style = CapRound; + values.join_style = JoinRound; + values.line_width = dw->dvi.line_width; + dw->dvi.normal_GC = XCreateGC (XtDisplay (w), XtWindow (w), + GCForeground|GCCapStyle|GCJoinStyle + |GCLineWidth, + &values); + dw->dvi.gray[0] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray1_bits, + gray1_width, gray1_height); + dw->dvi.gray[1] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray2_bits, + gray2_width, gray2_height); + dw->dvi.gray[2] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray3_bits, + gray3_width, gray3_height); + dw->dvi.gray[3] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray4_bits, + gray4_width, gray4_height); + dw->dvi.gray[4] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray5_bits, + gray5_width, gray5_height); + dw->dvi.gray[5] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray6_bits, + gray6_width, gray6_height); + dw->dvi.gray[6] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray7_bits, + gray7_width, gray7_height); + dw->dvi.gray[7] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w), + gray8_bits, + gray8_width, gray8_height); + values.background = dw->dvi.background; + values.stipple = dw->dvi.gray[5]; + dw->dvi.fill_GC = XCreateGC (XtDisplay (w), XtWindow (w), + GCForeground|GCBackground|GCStipple, + &values); + + dw->dvi.fill_type = 9; + + if (dw->dvi.file) + OpenFile (dw); + ParseFontMap (dw); +} + +static void +Destroy(Widget w) +{ + DviWidget dw = (DviWidget) w; + + XFreeGC (XtDisplay (w), dw->dvi.normal_GC); + XFreeGC (XtDisplay (w), dw->dvi.fill_GC); + XFreePixmap (XtDisplay (w), dw->dvi.gray[0]); + XFreePixmap (XtDisplay (w), dw->dvi.gray[1]); + XFreePixmap (XtDisplay (w), dw->dvi.gray[2]); + XFreePixmap (XtDisplay (w), dw->dvi.gray[3]); + XFreePixmap (XtDisplay (w), dw->dvi.gray[4]); + XFreePixmap (XtDisplay (w), dw->dvi.gray[5]); + XFreePixmap (XtDisplay (w), dw->dvi.gray[6]); + XFreePixmap (XtDisplay (w), dw->dvi.gray[7]); + DestroyFontMap (dw->dvi.font_map); + DestroyFileMap (dw->dvi.file_map); + device_destroy (dw->dvi.device); +} + +/* + * Repaint the widget window + */ + +/* ARGSUSED */ +static void +Redisplay(Widget w, XEvent *event, Region region) +{ + DviWidget dw = (DviWidget) w; + XRectangle extents; + + XClipBox (region, &extents); + dw->dvi.extents.x1 = extents.x; + dw->dvi.extents.y1 = extents.y; + dw->dvi.extents.x2 = extents.x + extents.width; + dw->dvi.extents.y2 = extents.y + extents.height; + ShowDvi (dw); + + event = event; /* unused; suppress compiler warning */ +} + +/* + * Set specified arguments into widget + */ +/* ARGSUSED */ +static Boolean +SetValues (Widget wcurrent, Widget wrequest, Widget wnew, + ArgList args, Cardinal *num_args) +{ + Boolean redisplay = FALSE; + char *new_map; + int cur, req; + DviWidget current = (DviWidget)wcurrent; + DviWidget request = (DviWidget)wrequest; + DviWidget new_wd = (DviWidget)wnew; + + if (current->dvi.font_map_string != request->dvi.font_map_string) { + new_map = XtMalloc (strlen (request->dvi.font_map_string) + 1); + if (new_map) { + redisplay = TRUE; + strcpy (new_map, request->dvi.font_map_string); + new_wd->dvi.font_map_string = new_map; + if (current->dvi.font_map_string) + XtFree (current->dvi.font_map_string); + current->dvi.font_map_string = 0; + ParseFontMap (new_wd); + } + } + + req = request->dvi.requested_page; + cur = current->dvi.requested_page; + if (cur != req) { + if (!request->dvi.file) + req = 0; + else { + if (req < 1) + req = 1; + if (current->dvi.last_page != 0 && + req > current->dvi.last_page) + req = current->dvi.last_page; + } + if (cur != req) + redisplay = TRUE; + new_wd->dvi.requested_page = req; + if (current->dvi.last_page == 0 && req > cur) + FindPage (new_wd); + } + + args = args; /* unused; suppress compiler warning */ + num_args = num_args; + + return redisplay; +} + +/* + * use the set_values_hook entry to check when + * the file is set + */ + +static Boolean +SetValuesHook (Widget wdw, ArgList args, Cardinal *num_argsp) +{ + Cardinal i; + DviWidget dw = (DviWidget)wdw; + + for (i = 0; i < *num_argsp; i++) { + if (!strcmp (args[i].name, XtNfile)) { + CloseFile (dw); + OpenFile (dw); + return TRUE; + } + } + return FALSE; +} + +static void CloseFile (DviWidget dw) +{ + if (dw->dvi.tmpFile) + fclose (dw->dvi.tmpFile); + ForgetPagePositions (dw); +} + +static void OpenFile (DviWidget dw) +{ + dw->dvi.tmpFile = 0; + if (!dw->dvi.seek) + dw->dvi.tmpFile = tmpfile(); + dw->dvi.requested_page = 1; + dw->dvi.last_page = 0; +} + +static XtGeometryResult +QueryGeometry (Widget w, XtWidgetGeometry *request, + XtWidgetGeometry *geometry_return) +{ + XtGeometryResult ret; + DviWidget dw = (DviWidget) w; + + ret = XtGeometryYes; + if (((request->request_mode & CWWidth) + && request->width < MY_WIDTH(dw)) + || ((request->request_mode & CWHeight) + && request->height < MY_HEIGHT(dw))) + ret = XtGeometryAlmost; + geometry_return->width = MY_WIDTH(dw); + geometry_return->height = MY_HEIGHT(dw); + geometry_return->request_mode = CWWidth|CWHeight; + return ret; +} + +void +SetDevice (DviWidget dw, const char *name) +{ + XtWidgetGeometry request, reply; + XtGeometryResult ret; + + ForgetFonts (dw); + dw->dvi.device = device_load (name); + if (!dw->dvi.device) + return; + dw->dvi.sizescale = dw->dvi.device->sizescale; + dw->dvi.device_resolution = dw->dvi.device->res; + dw->dvi.native = dw->dvi.device->X11; + dw->dvi.paperlength = dw->dvi.device->paperlength; + dw->dvi.paperwidth = dw->dvi.device->paperwidth; + if (dw->dvi.native) { + dw->dvi.display_resolution = dw->dvi.device_resolution; + dw->dvi.scale_factor = 1.0; + } + else { + dw->dvi.display_resolution = dw->dvi.default_resolution; + dw->dvi.scale_factor = ((double)dw->dvi.display_resolution + / dw->dvi.device_resolution); + } + request.request_mode = CWWidth|CWHeight; + request.width = MY_WIDTH(dw); + request.height = MY_HEIGHT(dw); + ret = XtMakeGeometryRequest ((Widget)dw, &request, &reply); + if (ret == XtGeometryAlmost + && reply.height >= request.height + && reply.width >= request.width) { + request.width = reply.width; + request.height = reply.height; + XtMakeGeometryRequest ((Widget)dw, &request, &reply); + } +} + +static void +ShowDvi (DviWidget dw) +{ + if (!dw->dvi.file) { + static char Error[] = "No file selected"; + + XSetFont (XtDisplay(dw), dw->dvi.normal_GC, + dw->dvi.default_font->fid); + XDrawString (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC, + 20, 20, Error, strlen (Error)); + return; + } + + FindPage (dw); + + dw->dvi.display_enable = 1; + ParseInput (dw); + if (dw->dvi.last_page && dw->dvi.requested_page > dw->dvi.last_page) + dw->dvi.requested_page = dw->dvi.last_page; +} + +static void +FindPage (DviWidget dw) +{ + int i; + long file_position; + + if (dw->dvi.requested_page < 1) + dw->dvi.requested_page = 1; + + if (dw->dvi.last_page != 0 && dw->dvi.requested_page > dw->dvi.last_page) + dw->dvi.requested_page = dw->dvi.last_page; + + file_position = SearchPagePosition (dw, dw->dvi.requested_page); + if (file_position != -1) { + FileSeek(dw, file_position); + dw->dvi.current_page = dw->dvi.requested_page; + } else { + for (i=dw->dvi.requested_page; i > 0; i--) { + file_position = SearchPagePosition (dw, i); + if (file_position != -1) + break; + } + if (file_position == -1) + file_position = 0; + FileSeek (dw, file_position); + + dw->dvi.current_page = i; + + dw->dvi.display_enable = 0; + while (dw->dvi.current_page != dw->dvi.requested_page) { + dw->dvi.current_page = ParseInput (dw); + /* + * at EOF, seek back to the beginning of this page. + */ + if (!dw->dvi.readingTmp && feof (dw->dvi.file)) { + file_position = SearchPagePosition (dw, + dw->dvi.current_page); + if (file_position != -1) + FileSeek (dw, file_position); + dw->dvi.requested_page = dw->dvi.current_page; + break; + } + } + } +} + +void DviSaveToFile(Widget w, FILE *fp) +{ + XtCheckSubclass(w, dviWidgetClass, NULL); + (*((DviWidgetClass) XtClass(w))->command_class.save)(w, fp); +} + +static +void SaveToFile(Widget w, FILE *fp) +{ + DviWidget dw = (DviWidget)w; + long pos; + int c; + + if (dw->dvi.tmpFile) { + pos = ftell(dw->dvi.tmpFile); + if (dw->dvi.ungot) { + pos--; + dw->dvi.ungot = 0; + /* The ungot character is in the tmpFile, so we don't + want to read it from file. */ + (void)getc(dw->dvi.file); + } + } + else + pos = ftell(dw->dvi.file); + FileSeek(dw, 0L); + while (DviGetC(dw, &c) != EOF) + if (putc(c, fp) == EOF) { + /* XXX print error message */ + break; + } + FileSeek(dw, pos); +} + +static +void ClassPartInitialize(WidgetClass widget_class) +{ + DviWidgetClass wc = (DviWidgetClass)widget_class; + DviWidgetClass super = (DviWidgetClass) wc->core_class.superclass; + if (wc->command_class.save == InheritSaveToFile) + wc->command_class.save = super->command_class.save; +} + +/* +Local Variables: +c-indent-level: 8 +c-continued-statement-offset: 8 +c-brace-offset: -8 +c-argdecl-indent: 8 +c-label-offset: -8 +c-tab-always-indent: nil +End: +*/ diff --git a/contrib/groff/src/devices/xditview/Dvi.h b/contrib/groff/src/devices/xditview/Dvi.h new file mode 100644 index 000000000000..bf97374d0275 --- /dev/null +++ b/contrib/groff/src/devices/xditview/Dvi.h @@ -0,0 +1,46 @@ +/* +* $XConsortium: Dvi.h,v 1.4 89/07/21 14:22:06 jim Exp $ +*/ + +#ifndef _XtDvi_h +#define _XtDvi_h + +/*********************************************************************** + * + * Dvi Widget + * + ***********************************************************************/ + +/* Parameters: + + Name Class RepType Default Value + ---- ----- ------- ------------- + background Background pixel White + foreground Foreground Pixel Black + fontMap FontMap char * ... + pageNumber PageNumber int 1 +*/ + +#define XtNfontMap (String)"fontMap" +#define XtNpageNumber (String)"pageNumber" +#define XtNlastPageNumber (String)"lastPageNumber" +#define XtNnoPolyText (String)"noPolyText" +#define XtNseek (String)"seek" +#define XtNresolution (String)"resolution" + +#define XtCFontMap (String)"FontMap" +#define XtCPageNumber (String)"PageNumber" +#define XtCLastPageNumber (String)"LastPageNumber" +#define XtCNoPolyText (String)"NoPolyText" +#define XtCSeek (String)"Seek" +#define XtCResolution (String)"Resolution" + +typedef struct _DviRec *DviWidget; /* completely defined in DviP.h */ +typedef struct _DviClassRec *DviWidgetClass; /* completely defined in DviP.h */ + +extern WidgetClass dviWidgetClass; + +void DviSaveToFile(Widget, FILE *); + +#endif /* _XtDvi_h */ +/* DON'T ADD STUFF AFTER THIS #endif */ diff --git a/contrib/groff/src/devices/xditview/DviP.h b/contrib/groff/src/devices/xditview/DviP.h new file mode 100644 index 000000000000..00f32c81bc5f --- /dev/null +++ b/contrib/groff/src/devices/xditview/DviP.h @@ -0,0 +1,233 @@ +/* + * $XConsortium: DviP.h,v 1.5 89/07/22 19:44:08 keith Exp $ + */ + +/* + * DviP.h - Private definitions for Dvi widget + */ + +#ifndef _XtDviP_h +#define _XtDviP_h + +#include "Dvi.h" +#include "DviChar.h" +#include "device.h" + +/*********************************************************************** + * + * Dvi Widget Private Data + * + ***********************************************************************/ + +/************************************ + * + * Class structure + * + ***********************************/ + +/* Type for save method. */ + +typedef void (*DviSaveProc)(Widget, FILE *); + +/* + * New fields for the Dvi widget class record + */ + + +typedef struct _DviClass { + DviSaveProc save; +} DviClassPart; + +/* + * Full class record declaration + */ + +typedef struct _DviClassRec { + CoreClassPart core_class; + DviClassPart command_class; +} DviClassRec; + +extern DviClassRec dviClassRec; + +/*************************************** + * + * Instance (widget) structure + * + **************************************/ + +/* + * a list of fonts we've used for this widget + */ + +typedef struct _dviFontSizeList { + struct _dviFontSizeList *next; + int size; + char *x_name; + XFontStruct *font; + int doesnt_exist; +} DviFontSizeList; + +typedef struct _dviFontList { + struct _dviFontList *next; + char *dvi_name; + char *x_name; + int dvi_number; + Boolean initialized; + Boolean scalable; + DviFontSizeList *sizes; + DviCharNameMap *char_map; + DeviceFont *device_font; +} DviFontList; + +typedef struct _dviFontMap { + struct _dviFontMap *next; + char *dvi_name; + char *x_name; +} DviFontMap; + +#define DVI_TEXT_CACHE_SIZE 256 +#define DVI_CHAR_CACHE_SIZE 1024 + +typedef struct _dviCharCache { + XTextItem cache[DVI_TEXT_CACHE_SIZE]; + char adjustable[DVI_TEXT_CACHE_SIZE]; + char char_cache[DVI_CHAR_CACHE_SIZE]; + int index; + int max; + int char_index; + int font_size; + int font_number; + XFontStruct *font; + int start_x, start_y; + int x, y; +} DviCharCache; + +typedef struct _dviState { + struct _dviState *next; + int font_size; + int font_number; + int x; + int y; +} DviState; + +typedef struct _dviFileMap { + struct _dviFileMap *next; + long position; + int page_number; +} DviFileMap; + +/* + * New fields for the Dvi widget record + */ + +typedef struct { + /* + * resource specifiable items + */ + char *font_map_string; + unsigned long foreground; + unsigned long background; + int requested_page; + int last_page; + XFontStruct *default_font; + FILE *file; + Boolean noPolyText; + Boolean seek; /* file is "seekable" */ + int default_resolution; + /* + * private state + */ + FILE *tmpFile; /* used when reading stdin */ + char readingTmp; /* reading now from tmp */ + char ungot; /* have ungetc'd a char */ + GC normal_GC; + GC fill_GC; + DviFileMap *file_map; + DviFontList *fonts; + DviFontMap *font_map; + int current_page; + int font_size; + int font_number; + DeviceFont *device_font; + int device_font_number; + Device *device; + int native; + int device_resolution; + int display_resolution; + int paperlength; + int paperwidth; + double scale_factor; /* display res / device res */ + int sizescale; + int line_thickness; + int line_width; + +#define DVI_FILL_MAX 1000 + + int fill; +#define DVI_FILL_WHITE 0 +#define DVI_FILL_GRAY 1 +#define DVI_FILL_BLACK 2 + int fill_type; + Pixmap gray[8]; + int backing_store; + XFontStruct *font; + int display_enable; + struct ExposedExtents { + int x1, y1, x2, y2; + } extents; + DviState *state; + DviCharCache cache; + int text_x_width; + int text_device_width; + int word_flag; +} DviPart; + +int DviGetAndPut(DviWidget, int *); +#define DviGetIn(dw,cp)\ + (dw->dvi.tmpFile ? (\ + DviGetAndPut (dw, cp) \ + ) :\ + (*cp = getc (dw->dvi.file))\ +) + +#define DviGetC(dw, cp)\ + (dw->dvi.readingTmp ? (\ + ((*cp = getc (dw->dvi.tmpFile)) == EOF) ? (\ + fseek (dw->dvi.tmpFile, 0l, 2),\ + (dw->dvi.readingTmp = 0),\ + DviGetIn (dw,cp)\ + ) : (\ + *cp\ + )\ + ) : (\ + DviGetIn(dw,cp)\ + )\ +) + +#define DviUngetC(dw, c)\ + (dw->dvi.readingTmp ? (\ + ungetc (c, dw->dvi.tmpFile)\ + ) : ( \ + (dw->dvi.ungot = 1),\ + ungetc (c, dw->dvi.file))) + +/* + * Full widget declaration + */ + +typedef struct _DviRec { + CorePart core; + DviPart dvi; +} DviRec; + +#define InheritSaveToFile ((DviSaveProc)_XtInherit) + +XFontStruct *QueryFont (DviWidget, int, int); + +DviCharNameMap *QueryFontMap (DviWidget, int); + +DeviceFont *QueryDeviceFont (DviWidget, int); + +char *GetWord(DviWidget, char *, int); +char *GetLine(DviWidget, char *, int); +#endif /* _XtDviP_h */ diff --git a/contrib/groff/src/devices/xditview/FontMap b/contrib/groff/src/devices/xditview/FontMap new file mode 100644 index 000000000000..90911f048ded --- /dev/null +++ b/contrib/groff/src/devices/xditview/FontMap @@ -0,0 +1,17 @@ +TR -adobe-times-medium-r-normal--*-*-*-*-p-*-iso8859-1 +TI -adobe-times-medium-i-normal--*-*-*-*-p-*-iso8859-1 +TB -adobe-times-bold-r-normal--*-*-*-*-p-*-iso8859-1 +TBI -adobe-times-bold-i-normal--*-*-*-*-p-*-iso8859-1 +CR -adobe-courier-medium-r-normal--*-*-*-*-m-*-iso8859-1 +CI -adobe-courier-medium-o-normal--*-*-*-*-m-*-iso8859-1 +CB -adobe-courier-bold-r-normal--*-*-*-*-m-*-iso8859-1 +CBI -adobe-courier-bold-o-normal--*-*-*-*-m-*-iso8859-1 +HR -adobe-helvetica-medium-r-normal--*-*-*-*-p-*-iso8859-1 +HI -adobe-helvetica-medium-o-normal--*-*-*-*-p-*-iso8859-1 +HB -adobe-helvetica-bold-r-normal--*-*-*-*-p-*-iso8859-1 +HBI -adobe-helvetica-bold-o-normal--*-*-*-*-p-*-iso8859-1 +NR -adobe-new century schoolbook-medium-r-normal--*-*-*-*-p-*-iso8859-1 +NI -adobe-new century schoolbook-medium-i-normal--*-*-*-*-p-*-iso8859-1 +NB -adobe-new century schoolbook-bold-r-normal--*-*-*-*-p-*-iso8859-1 +NBI -adobe-new century schoolbook-bold-i-normal--*-*-*-*-p-*-iso8859-1 +S -adobe-symbol-medium-r-normal--*-*-*-*-p-*-adobe-fontspecific diff --git a/contrib/groff/src/devices/xditview/GXditview.ad b/contrib/groff/src/devices/xditview/GXditview.ad new file mode 100644 index 000000000000..e99ff5e16f38 --- /dev/null +++ b/contrib/groff/src/devices/xditview/GXditview.ad @@ -0,0 +1,57 @@ +GXditview.height: 840 + +GXditview.paned.allowResize: true +GXditview.paned.viewport.allowVert: true +GXditview.paned.viewport.allowHoriz: true +GXditview.paned.viewport.skipAdjust: false +GXditview.paned.viewport.width: 600 +GXditview.paned.viewport.height: 800 +GXditview.paned.viewport.showGrip: false +GXditview.paned.label.skipAdjust: true + +GXditview.paned.viewport.dvi.translations: #augment \ + : XawPositionSimpleMenu(menu) MenuPopup(menu)\n\ + Next: NextPage()\n\ + n: NextPage()\n\ + space: NextPage()\n\ + Return: NextPage()\n\ + Prior: PreviousPage()\n\ + p: PreviousPage()\n\ + BackSpace: PreviousPage()\n\ + Delete: PreviousPage()\n\ + Select: SelectPage()\n\ + Find: OpenFile()\n\ + r: Rerasterize()\n\ + q: Quit() +GXditview.paned.label.translations: #augment \ + : XawPositionSimpleMenu(menu) MenuPopup(menu)\n\ + Next: NextPage()\n\ + n: NextPage()\n\ + space: NextPage()\n\ + Return: NextPage()\n\ + Prior: PreviousPage()\n\ + p: PreviousPage()\n\ + BackSpace: PreviousPage()\n\ + Delete: PreviousPage()\n\ + Select: SelectPage()\n\ + Find: OpenFile()\n\ + r: Rerasterize()\n\ + q: Quit() +GXditview.menu.nextPage.label: Next Page +GXditview.menu.previousPage.label: Previous Page +GXditview.menu.selectPage.label: Select Page +GXditview.menu.print.label: Print +GXditview.menu.openFile.label: Open +GXditview.menu.quit.label: Quit + +GXditview.promptShell.allowShellResize: true +GXditview.promptShell.promptDialog.value.translations: #override \ + Return: Accept() + +GXditview.promptShell.promptDialog.accept.label: Accept +GXditview.promptShell.promptDialog.accept.translations: #override \ + : Accept() unset() + +GXditview.promptShell.promptDialog.cancel.label: Cancel +GXditview.promptShell.promptDialog.cancel.translations: #override \ + : Cancel() unset() diff --git a/contrib/groff/src/devices/xditview/Makefile.sub b/contrib/groff/src/devices/xditview/Makefile.sub new file mode 100644 index 000000000000..f40302091d22 --- /dev/null +++ b/contrib/groff/src/devices/xditview/Makefile.sub @@ -0,0 +1,47 @@ +PROG=gxditview$(EXEEXT) +MAN1=gxditview.n +MLIB=$(LIBM) +XLIBS=$(LIBXUTIL) +EXTRA_CFLAGS=$(X_CFLAGS) +EXTRA_LDFLAGS=$(X_LIBS) $(X_PRE_LIBS) -lXaw -lXmu -lXt -lX11 $(X_EXTRA_LIBS) +OBJS=\ + device.$(OBJEXT) \ + draw.$(OBJEXT) \ + Dvi.$(OBJEXT) \ + font.$(OBJEXT) \ + lex.$(OBJEXT) \ + page.$(OBJEXT) \ + parse.$(OBJEXT) \ + xditview.$(OBJEXT) +CSRCS=\ + $(srcdir)/device.c \ + $(srcdir)/draw.c \ + $(srcdir)/Dvi.c \ + $(srcdir)/font.c \ + $(srcdir)/lex.c \ + $(srcdir)/page.c \ + $(srcdir)/parse.c \ + $(srcdir)/xditview.c +HDRS=\ + $(srcdir)/device.h \ + $(srcdir)/Dvi.h \ + $(srcdir)/DviP.h \ + $(srcdir)/Menu.h +GENHDRS=GXditview-ad.h + +all depend: $(GENHDRS) + +GXditview-ad.h: $(srcdir)/GXditview.ad + @echo Making $@ + @-rm -f $@ + $(SHELL) $(srcdir)/ad2c $(srcdir)/GXditview.ad >GXditview-ad.h + +install_data: $(srcdir)/GXditview.ad + -test -d $(appresdir) || $(mkinstalldirs) $(appresdir) + if test -f $(appresdir)/GXditview; then \ + mv $(appresdir)/GXditview $(appresdir)/GXditview.old; \ + fi + $(INSTALL_DATA) $(srcdir)/GXditview.ad $(appresdir)/GXditview + +uninstall_sub: + -rm -f $(appresdir)/GXditview diff --git a/contrib/groff/src/devices/xditview/Menu.h b/contrib/groff/src/devices/xditview/Menu.h new file mode 100644 index 000000000000..c306b2740a61 --- /dev/null +++ b/contrib/groff/src/devices/xditview/Menu.h @@ -0,0 +1,46 @@ +/* + * $XConsortium: Menu.h,v 1.2 89/07/21 14:22:10 jim Exp $ + */ + +#ifndef _XtMenu_h +#define _XtMenu_h + +/*********************************************************************** + * + * Menu Widget + * + ***********************************************************************/ + +/* Parameters: + + Name Class RepType Default Value + ---- ----- ------- ------------- + background Background pixel White + border BorderColor pixel Black + borderWidth BorderWidth int 1 + height Height int 120 + mappedWhenManaged MappedWhenManaged Boolean True + reverseVideo ReverseVideo Boolean False + width Width int 120 + x Position int 0 + y Position int 0 + +*/ + +#define XtNmenuEntries "menuEntries" +#define XtNhorizontalPadding "horizontalPadding" +#define XtNverticalPadding "verticalPadding" +#define XtNselection "Selection" + +#define XtCMenuEntries "MenuEntries" +#define XtCPadding "Padding" +#define XtCSelection "Selection" + +typedef struct _MenuRec *MenuWidget; /* completely defined in MenuPrivate.h */ +typedef struct _MenuClassRec *MenuWidgetClass; /* completely defined in MenuPrivate.h */ + +extern WidgetClass menuWidgetClass; + +extern Widget XawMenuCreate (); +#endif /* _XtMenu_h */ +/* DON'T ADD STUFF AFTER THIS #endif */ diff --git a/contrib/groff/src/devices/xditview/README b/contrib/groff/src/devices/xditview/README new file mode 100644 index 000000000000..1461b5ab6039 --- /dev/null +++ b/contrib/groff/src/devices/xditview/README @@ -0,0 +1,13 @@ +This is gxditview, an X11 previewer for groff based on MIT's xditview. +This version can be used with the output of gtroff -Tps as well as +with -TX75 and -TX100. You will need X11R5 or newer to install it (it +might work on X11R4, but I haven't tested it.) + +Previously, gxditview was installed in the usual place for X binaries +(e.g., /usr/bin/X11); you have to remove it manually. + +xditview is copyrighted by MIT under the usual X terms (see +gxditview.man); the changes to that which come along with the groff package +are in the public domain. + +Please report bugs to bug-groff@gnu.org. diff --git a/contrib/groff/src/devices/xditview/TODO b/contrib/groff/src/devices/xditview/TODO new file mode 100644 index 000000000000..161a7cf115ce --- /dev/null +++ b/contrib/groff/src/devices/xditview/TODO @@ -0,0 +1,17 @@ +Replace Imakefile with a configure script. + +Better error handling. + +Resource and command-line option to specify font path. + +Resource to specify name of environment variable from which to get the +font path. + +Have character substitutions (currently done in draw.c:FakeCharacter) +specified in a resource (similar format to FontMap). + +The initial width of the dialog box should expand to accommodate the +default value. + +Option in Print dialog to specify that only the current page should be +printed. diff --git a/contrib/groff/src/devices/xditview/ad2c b/contrib/groff/src/devices/xditview/ad2c new file mode 100644 index 000000000000..ad5d12157e5d --- /dev/null +++ b/contrib/groff/src/devices/xditview/ad2c @@ -0,0 +1,64 @@ +#! /bin/sh +# +# ad2c : Convert app-defaults file to C strings decls. +# +# George Ferguson, ferguson@cs.rcohester.edu, 12 Nov 1990. +# 19 Mar 1991: gf +# Made it self-contained. +# 6 Jan 1992: mycroft@gnu.ai.mit.edu (Charles Hannum) +# Removed use of "-n" and ":read" label since Gnu and +# IBM sed print pattern space on "n" command. Still works +# with Sun sed, of course. +# 7 Jan 1992: matthew@sunpix.East.Sun.COM (Matthew Stier) +# Escape quotes after escaping backslashes. +# 8 Jul 1992: Version 1.6 +# Manpage fixes. +# 19 Apr 1993: Version 1.7 +# Remove comments that were inside the sed command since +# some versions of sed don't like them. The comments are +# now given here in the header. +# 31 May 2004: Werner Lemberg +# Force casts to `String'. +# +# Comments on the script by line: +# /^!/d Remove comments +# /^$/d Remove blanks +# s/\\/\\\\/g Escape backslashes... +# s/\\$//g ...except the line continuation ones +# s/"/\\"/g Escape quotes +# s/^/"/ Add leading quote and cast +# : test Establish label for later branch +# /\\$/b slash Branch to label "slash" if line ends in backslash +# s/$/",/ Otherwise add closing quote and comma... +# p ...output the line... +# d ...and clear the pattern space so it's not printed again +# : slash Branch comes here if line ends in backslash +# n Read next line, append to pattern space +# [...] The "d" and "s" commands that follow just delete +# comments and blank lines and escape control sequences +# b test Branch up to see if the line ends in backslash or not +# + +sed ' +/^!/d +/^$/d +s/\\/\\\\/g +s/\\$//g +s/"/\\"/g +s/^/(String)"/ +: test +/\\$/b slash +s/$/",/ +p +d +: slash +n +/^!/d +/^$/d +s/"/\\"/g +s/\\\\/\\/g +s/\\n/\\\\n/g +s/\\t/\\\\t/g +s/\\f/\\\\f/g +s/\\b/\\\\b/g +b test' "$@" diff --git a/contrib/groff/src/devices/xditview/device.c b/contrib/groff/src/devices/xditview/device.c new file mode 100644 index 000000000000..2cb221944ac4 --- /dev/null +++ b/contrib/groff/src/devices/xditview/device.c @@ -0,0 +1,565 @@ +/* device.c */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include + +#include +#include + +#include "device.h" +#include "defs.h" + +#ifndef isascii +#define isascii(c) (1) +#endif + +/* Name of environment variable containing path to be used for +searching for device and font description files. */ +#define FONTPATH_ENV_VAR "GROFF_FONT_PATH" + +#define WS " \t\r\n" + +#ifndef INT_MIN +/* Minimum and maximum values a `signed int' can hold. */ +#define INT_MIN (-INT_MAX-1) +#define INT_MAX 2147483647 +#endif + +#define CHAR_TABLE_SIZE 307 + +struct _DeviceFont { + char *name; + int special; + DeviceFont *next; + Device *dev; + struct charinfo *char_table[CHAR_TABLE_SIZE]; + struct charinfo *code_table[256]; +}; + +struct charinfo { + int width; + int code; + struct charinfo *next; + struct charinfo *code_next; + char name[1]; +}; + +static char *current_filename = 0; +static int current_lineno = -1; + +static void error(const char *s); +static FILE *open_device_file(const char *, const char *, char **); +static DeviceFont *load_font(Device *, const char *); +static Device *new_device(const char *); +static DeviceFont *new_font(const char *, Device *); +static void delete_font(DeviceFont *); +static unsigned hash_name(const char *); +static struct charinfo *add_char(DeviceFont *, const char *, int, int); +static int read_charset_section(DeviceFont *, FILE *); +static char *canonicalize_name(const char *); +static int scale_round(int, int, int); + +static +Device *new_device(const char *name) +{ + Device *dev; + + dev = XtNew(Device); + dev->sizescale = 1; + dev->res = 0; + dev->unitwidth = 0; + dev->fonts = 0; + dev->X11 = 0; + dev->paperlength = 0; + dev->paperwidth = 0; + dev->name = XtNewString(name); + return dev; +} + +void device_destroy(Device *dev) +{ + DeviceFont *f; + + if (!dev) + return; + f = dev->fonts; + while (f) { + DeviceFont *tem = f; + f = f->next; + delete_font(tem); + } + + XtFree(dev->name); + XtFree((char *)dev); +} + +Device *device_load(const char *name) +{ + Device *dev; + FILE *fp; + int err = 0; + char buf[256]; + + fp = open_device_file(name, "DESC", ¤t_filename); + if (!fp) + return 0; + dev = new_device(name); + current_lineno = 0; + while (fgets(buf, sizeof(buf), fp)) { + char *p; + current_lineno++; + p = strtok(buf, WS); + if (p) { + int *np = 0; + char *q; + + if (strcmp(p, "charset") == 0) + break; + if (strcmp(p, "X11") == 0) + dev->X11 = 1; + else if (strcmp(p, "sizescale") == 0) + np = &dev->sizescale; + else if (strcmp(p, "res") == 0) + np = &dev->res; + else if (strcmp(p, "unitwidth") == 0) + np = &dev->unitwidth; + else if (strcmp(p, "paperwidth") == 0) + np = &dev->paperwidth; + else if (strcmp(p, "paperlength") == 0) + np = &dev->paperlength; + + if (np) { + q = strtok((char *)0, WS); + if (!q || sscanf(q, "%d", np) != 1 || *np <= 0) { + error("bad argument"); + err = 1; + break; + } + } + } + } + fclose(fp); + current_lineno = -1; + if (!err) { + if (dev->res == 0) { + error("missing res line"); + err = 1; + } + else if (dev->unitwidth == 0) { + error("missing unitwidth line"); + err = 1; + } + } + if (dev->paperlength == 0) + dev->paperlength = dev->res*11; + if (dev->paperwidth == 0) + dev->paperwidth = dev->res*8 + dev->res/2; + if (err) { + device_destroy(dev); + dev = 0; + } + XtFree(current_filename); + current_filename = 0; + return dev; +} + + +DeviceFont *device_find_font(Device *dev, const char *name) +{ + DeviceFont *f; + + if (!dev) + return 0; + for (f = dev->fonts; f; f = f->next) + if (strcmp(f->name, name) == 0) + return f; + return load_font(dev, name); +} + +static +DeviceFont *load_font(Device *dev, const char *name) +{ + FILE *fp; + char buf[256]; + DeviceFont *f; + int special = 0; + + fp = open_device_file(dev->name, name, ¤t_filename); + if (!fp) + return 0; + current_lineno = 0; + for (;;) { + char *p; + + if (!fgets(buf, sizeof(buf), fp)) { + error("no charset line"); + return 0; + } + current_lineno++; + p = strtok(buf, WS); + /* charset must be on a line by itself */ + if (p && strcmp(p, "charset") == 0 && strtok((char *)0, WS) == 0) + break; + if (p && strcmp(p, "special") == 0) + special = 1; + } + f = new_font(name, dev); + f->special = special; + if (!read_charset_section(f, fp)) { + delete_font(f); + f = 0; + } + else { + f->next = dev->fonts; + dev->fonts = f; + } + fclose(fp); + XtFree(current_filename); + current_filename = 0; + return f; +} + +static +DeviceFont *new_font(const char *name, Device *dev) +{ + int i; + DeviceFont *f; + + f = XtNew(DeviceFont); + f->name = XtNewString(name); + f->dev = dev; + f->special = 0; + f->next = 0; + for (i = 0; i < CHAR_TABLE_SIZE; i++) + f->char_table[i] = 0; + for (i = 0; i < 256; i++) + f->code_table[i] = 0; + return f; +} + +static +void delete_font(DeviceFont *f) +{ + int i; + + if (!f) + return; + XtFree(f->name); + for (i = 0; i < CHAR_TABLE_SIZE; i++) { + struct charinfo *ptr = f->char_table[i]; + while (ptr) { + struct charinfo *tem = ptr; + ptr = ptr->next; + XtFree((char *)tem); + } + } + XtFree((char *)f); +} + + +static +unsigned hash_name(const char *name) +{ + unsigned n = 0; + /* XXX do better than this */ + while (*name) + n = (n << 1) ^ *name++; + + return n; +} + +static +int scale_round(int n, int x, int y) +{ + int y2; + + if (x == 0) + return 0; + y2 = y/2; + if (n >= 0) { + if (n <= (INT_MAX - y2)/x) + return (n*x + y2)/y; + return (int)(n*(double)x/(double)y + .5); + } + else { + if (-(unsigned)n <= (-(unsigned)INT_MIN - y2)/x) + return (n*x - y2)/y; + return (int)(n*(double)x/(double)y + .5); + } +} + +static +char *canonicalize_name(const char *s) +{ + static char ch[2]; + if (s[0] == 'c' && s[1] == 'h' && s[2] == 'a' && s[3] == 'r') { + const char *p; + int n; + + for (p = s + 4; *p; p++) + if (!isascii(*p) || !isdigit((unsigned char)*p)) + return (char *)s; + n = atoi(s + 4); + if (n >= 0 && n <= 0xff) { + ch[0] = (char)n; + return ch; + } + } + return (char *)s; +} + +/* Return 1 if the character is present in the font; widthp gets the +width if non-null. */ + +int device_char_width(DeviceFont *f, int ps, const char *name, int *widthp) +{ + struct charinfo *p; + + name = canonicalize_name(name); + for (p = f->char_table[hash_name(name) % CHAR_TABLE_SIZE];; p = p->next) { + if (!p) + return 0; + if (strcmp(p->name, name) == 0) + break; + } + *widthp = scale_round(p->width, ps, f->dev->unitwidth); + return 1; +} + +int device_code_width(DeviceFont *f, int ps, int code, int *widthp) +{ + struct charinfo *p; + + for (p = f->code_table[code & 0xff];; p = p->code_next) { + if (!p) + return 0; + if (p->code == code) + break; + } + *widthp = scale_round(p->width, ps, f->dev->unitwidth); + return 1; +} + +char *device_name_for_code(DeviceFont *f, int code) +{ + static struct charinfo *state = 0; + if (f) + state = f->code_table[code & 0xff]; + for (; state; state = state->code_next) + if (state->code == code && state->name[0] != '\0') { + char *name = state->name; + state = state->code_next; + return name; + } + return 0; +} + +int device_font_special(DeviceFont *f) +{ + return f->special; +} + +static +struct charinfo *add_char(DeviceFont *f, const char *name, int width, int code) +{ + struct charinfo **pp; + struct charinfo *ci; + + name = canonicalize_name(name); + if (strcmp(name, "---") == 0) + name = ""; + + ci = (struct charinfo *)XtMalloc(XtOffsetOf(struct charinfo, name[0]) + + strlen(name) + 1); + + strcpy(ci->name, name); + ci->width = width; + ci->code = code; + + if (*name != '\0') { + pp = &f->char_table[hash_name(name) % CHAR_TABLE_SIZE]; + ci->next = *pp; + *pp = ci; + } + pp = &f->code_table[code & 0xff]; + ci->code_next = *pp; + *pp = ci; + return ci; +} + +/* Return non-zero for success. */ + +static +int read_charset_section(DeviceFont *f, FILE *fp) +{ + struct charinfo *last_charinfo = 0; + char buf[256]; + + while (fgets(buf, sizeof(buf), fp)) { + char *name; + int width; + int code; + char *p; + + current_lineno++; + name = strtok(buf, WS); + if (!name) + continue; /* ignore blank lines */ + p = strtok((char *)0, WS); + if (!p) /* end of charset section */ + break; + if (strcmp(p, "\"") == 0) { + if (!last_charinfo) { + error("first line of charset section cannot use `\"'"); + return 0; + } + else + (void)add_char(f, name, + last_charinfo->width, last_charinfo->code); + } + else { + char *q; + if (sscanf(p, "%d", &width) != 1) { + error("bad width field"); + return 0; + } + p = strtok((char *)0, WS); + if (!p) { + error("missing type field"); + return 0; + } + p = strtok((char *)0, WS); + if (!p) { + error("missing code field"); + return 0; + } + code = (int)strtol(p, &q, 0); + if (q == p) { + error("bad code field"); + return 0; + } + last_charinfo = add_char(f, name, width, code); + } + } + return 1; +} + +static +FILE *find_file(const char *file, char **result) +{ + char *buf = NULL; + int bufsiz = 0; + int flen; + FILE *fp; + char *path; + char *env; + + env = getenv(FONTPATH_ENV_VAR); + path = XtMalloc(((env && *env) ? strlen(env) + 1 : 0) + + strlen(FONTPATH) + 1); + *path = '\0'; + if (env && *env) { + strcat(path, env); + strcat(path, ":"); + } + strcat(path, FONTPATH); + + *result = NULL; + + if (file == NULL) + return NULL; + if (*file == '\0') + return NULL; + + if (*file == '/') { + fp = fopen(file, "r"); + if (fp) + *result = XtNewString(file); + return fp; + } + + flen = strlen(file); + + while (*path) { + int len; + char *start, *end; + + start = path; + end = strchr(path, ':'); + if (end) + path = end + 1; + else + path = end = strchr(path, '\0'); + if (start >= end) + continue; + if (end[-1] == '/') + --end; + len = (end - start) + 1 + flen + 1; + if (len > bufsiz) { + if (buf) + buf = XtRealloc(buf, len); + else + buf = XtMalloc(len); + bufsiz = len; + } + memcpy(buf, start, end - start); + buf[end - start] = '/'; + strcpy(buf + (end - start) + 1, file); + fp = fopen(buf, "r"); + if (fp) { + *result = buf; + return fp; + } + } + XtFree(buf); + return NULL; +} + +static +FILE *open_device_file(const char *device_name, const char *file_name, + char **result) +{ + char *buf; + FILE *fp; + + buf = XtMalloc(3 + strlen(device_name) + 1 + strlen(file_name) + 1); + sprintf(buf, "dev%s/%s", device_name, file_name); + fp = find_file(buf, result); + if (!fp) { + fprintf(stderr, "can't find device file `%s'\n", file_name); + fflush(stderr); + } + XtFree(buf); + return fp; +} + +static +void error(const char *s) +{ + if (current_filename) { + fprintf(stderr, "%s:", current_filename); + if (current_lineno > 0) + fprintf(stderr, "%d:", current_lineno); + putc(' ', stderr); + } + fputs(s, stderr); + putc('\n', stderr); + fflush(stderr); +} + +/* +Local Variables: +c-indent-level: 4 +c-continued-statement-offset: 4 +c-brace-offset: -4 +c-argdecl-indent: 4 +c-label-offset: -4 +c-tab-always-indent: nil +End: +*/ diff --git a/contrib/groff/src/devices/xditview/device.h b/contrib/groff/src/devices/xditview/device.h new file mode 100644 index 000000000000..6f2944b5ecf4 --- /dev/null +++ b/contrib/groff/src/devices/xditview/device.h @@ -0,0 +1,21 @@ + +typedef struct _DeviceFont DeviceFont; + +typedef struct _Device { + char *name; + int sizescale; + int res; + int unitwidth; + int paperlength; + int paperwidth; + int X11; + DeviceFont *fonts; +} Device; + +void device_destroy(Device *); +Device *device_load(const char *); +DeviceFont *device_find_font(Device *, const char *); +int device_char_width(DeviceFont *, int, const char *, int *); +char *device_name_for_code(DeviceFont *, int); +int device_code_width(DeviceFont *, int, int, int *); +int device_font_special(DeviceFont *); diff --git a/contrib/groff/src/devices/xditview/draw.c b/contrib/groff/src/devices/xditview/draw.c new file mode 100644 index 000000000000..a808abafbb02 --- /dev/null +++ b/contrib/groff/src/devices/xditview/draw.c @@ -0,0 +1,699 @@ +/* + * draw.c + * + * accept dvi function calls and translate to X + */ + +#include +#include +#include +#include +#include +#include + +/* math.h on a Sequent doesn't define M_PI, apparently */ +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +#include "DviP.h" + +#define DeviceToX(dw, n) ((int)((n) * (dw)->dvi.scale_factor + .5)) +#define XPos(dw) (DeviceToX((dw), (dw)->dvi.state->x - \ + (dw)->dvi.text_device_width) + (dw)->dvi.text_x_width) +#define YPos(dw) (DeviceToX((dw), (dw)->dvi.state->y)) + +static int FakeCharacter(DviWidget, char *, int); + +/* font.c */ +extern int MaxFontPosition(DviWidget); + +void +HorizontalMove(DviWidget dw, int delta) +{ + dw->dvi.state->x += delta; +} + +void +HorizontalGoto(DviWidget dw, int NewPosition) +{ + dw->dvi.state->x = NewPosition; +} + +void +VerticalMove(DviWidget dw, int delta) +{ + dw->dvi.state->y += delta; +} + +void +VerticalGoto(DviWidget dw, int NewPosition) +{ + dw->dvi.state->y = NewPosition; +} + +void +AdjustCacheDeltas (DviWidget dw) +{ + int extra; + int nadj; + int i; + + nadj = 0; + extra = DeviceToX(dw, dw->dvi.text_device_width) + - dw->dvi.text_x_width; + if (extra == 0) + return; + for (i = 0; i <= dw->dvi.cache.index; i++) + if (dw->dvi.cache.adjustable[i]) + ++nadj; + dw->dvi.text_x_width += extra; + if (nadj <= 1) + return; + for (i = 0; i <= dw->dvi.cache.index; i++) + if (dw->dvi.cache.adjustable[i]) { + int x; + int *deltap; + + x = extra/nadj; + deltap = &dw->dvi.cache.cache[i].delta; +#define MIN_DELTA 2 + if (*deltap > 0 && x + *deltap < MIN_DELTA) { + x = MIN_DELTA - *deltap; + if (x <= 0) + *deltap = MIN_DELTA; + else + x = 0; + } + else + *deltap += x; + extra -= x; + --nadj; + dw->dvi.cache.adjustable[i] = 0; + } +} + +void +FlushCharCache (DviWidget dw) +{ + if (dw->dvi.cache.char_index != 0) { + AdjustCacheDeltas (dw); + XDrawText (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC, + dw->dvi.cache.start_x, dw->dvi.cache.start_y, + dw->dvi.cache.cache, dw->dvi.cache.index + 1); + } + dw->dvi.cache.index = 0; + dw->dvi.cache.max = DVI_TEXT_CACHE_SIZE; +#if 0 + if (dw->dvi.noPolyText) + dw->dvi.cache.max = 1; +#endif + dw->dvi.cache.char_index = 0; + dw->dvi.cache.cache[0].nchars = 0; + dw->dvi.cache.start_x = dw->dvi.cache.x = XPos (dw); + dw->dvi.cache.start_y = dw->dvi.cache.y = YPos (dw); +} + +void +Newline (DviWidget dw) +{ + FlushCharCache (dw); + dw->dvi.text_x_width = dw->dvi.text_device_width = 0; + dw->dvi.word_flag = 0; +} + +void +Word (DviWidget dw) +{ + dw->dvi.word_flag = 1; +} + +#define charWidth(fi,c) (\ + (fi)->per_char ?\ + (fi)->per_char[(c) - (fi)->min_char_or_byte2].width\ + :\ + (fi)->max_bounds.width\ +) + + +static +int charExists (XFontStruct *fi, int c) +{ + XCharStruct *p; + + /* `c' is always >= 0 */ + if (fi->per_char == NULL + || (unsigned int)c < fi->min_char_or_byte2 + || (unsigned int)c > fi->max_char_or_byte2) + return 0; + p = fi->per_char + (c - fi->min_char_or_byte2); + return (p->lbearing != 0 || p->rbearing != 0 || p->width != 0 + || p->ascent != 0 || p->descent != 0 || p->attributes != 0); +} + +/* `wid' is in device units */ +static void +DoCharacter (DviWidget dw, int c, int wid) +{ + register XFontStruct *font; + register XTextItem *text; + int x, y; + + x = XPos(dw); + y = YPos(dw); + + /* + * quick and dirty extents calculation: + */ + if (!(y + 24 >= dw->dvi.extents.y1 + && y - 24 <= dw->dvi.extents.y2 +#if 0 + && x + 24 >= dw->dvi.extents.x1 + && x - 24 <= dw->dvi.extents.x2 +#endif + )) + return; + + if (y != dw->dvi.cache.y + || dw->dvi.cache.char_index >= DVI_CHAR_CACHE_SIZE) { + FlushCharCache (dw); + x = dw->dvi.cache.x; + dw->dvi.cache.adjustable[dw->dvi.cache.index] = 0; + } + /* + * load a new font, if the current block is not empty, + * step to the next. + */ + if (dw->dvi.cache.font_size != dw->dvi.state->font_size || + dw->dvi.cache.font_number != dw->dvi.state->font_number) + { + FlushCharCache (dw); + x = dw->dvi.cache.x; + dw->dvi.cache.font_size = dw->dvi.state->font_size; + dw->dvi.cache.font_number = dw->dvi.state->font_number; + dw->dvi.cache.font = QueryFont (dw, + dw->dvi.cache.font_number, + dw->dvi.cache.font_size); + if (dw->dvi.cache.cache[dw->dvi.cache.index].nchars != 0) { + ++dw->dvi.cache.index; + if (dw->dvi.cache.index >= dw->dvi.cache.max) + FlushCharCache (dw); + dw->dvi.cache.cache[dw->dvi.cache.index].nchars = 0; + dw->dvi.cache.adjustable[dw->dvi.cache.index] = 0; + } + } + if (x != dw->dvi.cache.x || dw->dvi.word_flag) { + if (dw->dvi.cache.cache[dw->dvi.cache.index].nchars != 0) { + ++dw->dvi.cache.index; + if (dw->dvi.cache.index >= dw->dvi.cache.max) + FlushCharCache (dw); + dw->dvi.cache.cache[dw->dvi.cache.index].nchars = 0; + dw->dvi.cache.adjustable[dw->dvi.cache.index] = 0; + } + dw->dvi.cache.adjustable[dw->dvi.cache.index] + = dw->dvi.word_flag; + dw->dvi.word_flag = 0; + } + font = dw->dvi.cache.font; + text = &dw->dvi.cache.cache[dw->dvi.cache.index]; + if (text->nchars == 0) { + text->chars = &dw->dvi.cache.char_cache[dw->dvi.cache.char_index]; + text->delta = x - dw->dvi.cache.x; + if (font != dw->dvi.font) { + text->font = font->fid; + dw->dvi.font = font; + } else + text->font = None; + dw->dvi.cache.x += text->delta; + } + if (charExists(font, c)) { + int w; + dw->dvi.cache.char_cache[dw->dvi.cache.char_index++] = (char) c; + ++text->nchars; + w = charWidth(font, c); + dw->dvi.cache.x += w; + if (wid != 0) { + dw->dvi.text_x_width += w; + dw->dvi.text_device_width += wid; + } + } +} + +static +int FindCharWidth (DviWidget dw, char *buf, int *widp) +{ + int maxpos; + int i; + + if (dw->dvi.device_font == 0 + || dw->dvi.state->font_number != dw->dvi.device_font_number) { + dw->dvi.device_font_number = dw->dvi.state->font_number; + dw->dvi.device_font + = QueryDeviceFont (dw, dw->dvi.device_font_number); + } + if (dw->dvi.device_font + && device_char_width (dw->dvi.device_font, + dw->dvi.state->font_size, buf, widp)) + return 1; + + maxpos = MaxFontPosition (dw); + for (i = 1; i <= maxpos; i++) { + DeviceFont *f = QueryDeviceFont (dw, i); + if (f && device_font_special (f) + && device_char_width (f, dw->dvi.state->font_size, + buf, widp)) { + dw->dvi.state->font_number = i; + return 1; + } + } + return 0; +} + +/* Return the width of the character in device units. */ + +int PutCharacter (DviWidget dw, char *buf) +{ + int prevFont; + int c = -1; + int wid = 0; + DviCharNameMap *map; + + if (!dw->dvi.display_enable) + return 0; /* The width doesn't matter in this case. */ + prevFont = dw->dvi.state->font_number; + if (!FindCharWidth (dw, buf, &wid)) + return 0; + map = QueryFontMap (dw, dw->dvi.state->font_number); + if (map) + c = DviCharIndex (map, buf); + if (c >= 0) + DoCharacter (dw, c, wid); + else + (void) FakeCharacter (dw, buf, wid); + dw->dvi.state->font_number = prevFont; + return wid; +} + +/* Return 1 if we can fake it; 0 otherwise. */ + +static +int FakeCharacter (DviWidget dw, char *buf, int wid) +{ + int oldx, oldw; + char ch[2]; + const char *chars = 0; + + if (buf[0] == '\0' || buf[1] == '\0' || buf[2] != '\0') + return 0; +#define pack2(c1, c2) (((c1) << 8) | (c2)) + + switch (pack2(buf[0], buf[1])) { + case pack2('f', 'i'): + chars = "fi"; + break; + case pack2('f', 'l'): + chars = "fl"; + break; + case pack2('f', 'f'): + chars = "ff"; + break; + case pack2('F', 'i'): + chars = "ffi"; + break; + case pack2('F', 'l'): + chars = "ffl"; + break; + } + if (!chars) + return 0; + oldx = dw->dvi.state->x; + oldw = dw->dvi.text_device_width; + ch[1] = '\0'; + for (; *chars; chars++) { + ch[0] = *chars; + dw->dvi.state->x += PutCharacter (dw, ch); + } + dw->dvi.state->x = oldx; + dw->dvi.text_device_width = oldw + wid; + return 1; +} + +void +PutNumberedCharacter (DviWidget dw, int c) +{ + char *name; + int wid; + DviCharNameMap *map; + + if (!dw->dvi.display_enable) + return; + + if (dw->dvi.device_font == 0 + || dw->dvi.state->font_number != dw->dvi.device_font_number) { + dw->dvi.device_font_number = dw->dvi.state->font_number; + dw->dvi.device_font + = QueryDeviceFont (dw, dw->dvi.device_font_number); + } + + if (dw->dvi.device_font == 0 + || !device_code_width (dw->dvi.device_font, + dw->dvi.state->font_size, c, &wid)) + return; + if (dw->dvi.native) { + DoCharacter (dw, c, wid); + return; + } + map = QueryFontMap (dw, dw->dvi.state->font_number); + if (!map) + return; + for (name = device_name_for_code (dw->dvi.device_font, c); + name; + name = device_name_for_code ((DeviceFont *)0, c)) { + int code = DviCharIndex (map, name); + if (code >= 0) { + DoCharacter (dw, code, wid); + break; + } + if (FakeCharacter (dw, name, wid)) + break; + } +} + +void +ClearPage (DviWidget dw) +{ + XClearWindow (XtDisplay (dw), XtWindow (dw)); +} + +static void +setGC (DviWidget dw) +{ + int desired_line_width; + + if (dw->dvi.line_thickness < 0) + desired_line_width = (int)(((double)dw->dvi.device_resolution + * dw->dvi.state->font_size) + / (10.0*72.0*dw->dvi.sizescale)); + else + desired_line_width = dw->dvi.line_thickness; + + if (desired_line_width != dw->dvi.line_width) { + XGCValues values; + values.line_width = DeviceToX(dw, desired_line_width); + if (values.line_width == 0) + values.line_width = 1; + XChangeGC(XtDisplay (dw), dw->dvi.normal_GC, + GCLineWidth, &values); + dw->dvi.line_width = desired_line_width; + } +} + +static void +setFillGC (DviWidget dw) +{ + int fill_type; + unsigned long mask = GCFillStyle | GCForeground; + + fill_type = (dw->dvi.fill * 10) / (DVI_FILL_MAX + 1); + if (dw->dvi.fill_type != fill_type) { + XGCValues values; + if (fill_type <= 0) { + values.foreground = dw->dvi.background; + values.fill_style = FillSolid; + } else if (fill_type >= 9) { + values.foreground = dw->dvi.foreground; + values.fill_style = FillSolid; + } else { + values.foreground = dw->dvi.foreground; + values.fill_style = FillOpaqueStippled; + values.stipple = dw->dvi.gray[fill_type - 1]; + mask |= GCStipple; + } + XChangeGC(XtDisplay (dw), dw->dvi.fill_GC, mask, &values); + dw->dvi.fill_type = fill_type; + } +} + +void +DrawLine (DviWidget dw, int x, int y) +{ + int xp, yp; + + AdjustCacheDeltas (dw); + setGC (dw); + xp = XPos (dw); + yp = YPos (dw); + XDrawLine (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC, + xp, yp, + xp + DeviceToX (dw, x), yp + DeviceToX (dw, y)); +} + +void +DrawCircle (DviWidget dw, int diam) +{ + int d; + + AdjustCacheDeltas (dw); + setGC (dw); + d = DeviceToX (dw, diam); + XDrawArc (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC, + XPos (dw), YPos (dw) - d/2, + d, d, 0, 64*360); +} + +void +DrawFilledCircle (DviWidget dw, int diam) +{ + int d; + + AdjustCacheDeltas (dw); + setFillGC (dw); + d = DeviceToX (dw, diam); + XFillArc (XtDisplay (dw), XtWindow (dw), dw->dvi.fill_GC, + XPos (dw), YPos (dw) - d/2, + d, d, 0, 64*360); + XDrawArc (XtDisplay (dw), XtWindow (dw), dw->dvi.fill_GC, + XPos (dw), YPos (dw) - d/2, + d, d, 0, 64*360); +} + +void +DrawEllipse (DviWidget dw, int a, int b) +{ + AdjustCacheDeltas (dw); + setGC (dw); + XDrawArc (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC, + XPos (dw), YPos (dw) - DeviceToX (dw, b/2), + DeviceToX (dw, a), DeviceToX (dw, b), 0, 64*360); +} + +void +DrawFilledEllipse (DviWidget dw, int a, int b) +{ + AdjustCacheDeltas (dw); + setFillGC (dw); + XFillArc (XtDisplay (dw), XtWindow (dw), dw->dvi.fill_GC, + XPos (dw), YPos (dw) - DeviceToX (dw, b/2), + DeviceToX (dw, a), DeviceToX (dw, b), 0, 64*360); + XDrawArc (XtDisplay (dw), XtWindow (dw), dw->dvi.fill_GC, + XPos (dw), YPos (dw) - DeviceToX (dw, b/2), + DeviceToX (dw, a), DeviceToX (dw, b), 0, 64*360); +} + +void +DrawArc (DviWidget dw, int x_0, int y_0, int x_1, int y_1) +{ + int angle1, angle2; + int rad = (int)((sqrt ((double)x_0*x_0 + (double)y_0*y_0) + + sqrt ((double)x_1*x_1 + (double)y_1*y_1) + + 1.0)/2.0); + if ((x_0 == 0 && y_0 == 0) || (x_1 == 0 && y_1 == 0)) + return; + angle1 = (int)(atan2 ((double)y_0, (double)-x_0)*180.0*64.0/M_PI); + angle2 = (int)(atan2 ((double)-y_1, (double)x_1)*180.0*64.0/M_PI); + + angle2 -= angle1; + if (angle2 < 0) + angle2 += 64*360; + + AdjustCacheDeltas (dw); + setGC (dw); + + rad = DeviceToX (dw, rad); + XDrawArc (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC, + XPos (dw) + DeviceToX (dw, x_0) - rad, + YPos (dw) + DeviceToX (dw, y_0) - rad, + rad*2, rad*2, angle1, angle2); +} + +void +DrawPolygon (DviWidget dw, int *v, int n) +{ + XPoint *p; + int i; + int dx, dy; + + n /= 2; + + AdjustCacheDeltas (dw); + setGC (dw); + p = (XPoint *)XtMalloc((n + 2)*sizeof(XPoint)); + p[0].x = XPos (dw); + p[0].y = YPos (dw); + dx = 0; + dy = 0; + for (i = 0; i < n; i++) { + dx += v[2*i]; + p[i + 1].x = DeviceToX (dw, dx) + p[0].x; + dy += v[2*i + 1]; + p[i + 1].y = DeviceToX (dw, dy) + p[0].y; + } + p[n+1].x = p[0].x; + p[n+1].y = p[0].y; + XDrawLines (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC, + p, n + 2, CoordModeOrigin); + XtFree((char *)p); +} + +void +DrawFilledPolygon (DviWidget dw, int *v, int n) +{ + XPoint *p; + int i; + int dx, dy; + + n /= 2; + if (n < 2) + return; + + AdjustCacheDeltas (dw); + setFillGC (dw); + p = (XPoint *)XtMalloc((n + 2)*sizeof(XPoint)); + p[0].x = p[n+1].x = XPos (dw); + p[0].y = p[n+1].y = YPos (dw); + dx = 0; + dy = 0; + for (i = 0; i < n; i++) { + dx += v[2*i]; + p[i + 1].x = DeviceToX (dw, dx) + p[0].x; + dy += v[2*i + 1]; + p[i + 1].y = DeviceToX (dw, dy) + p[0].y; + } + XFillPolygon (XtDisplay (dw), XtWindow (dw), dw->dvi.fill_GC, + p, n + 1, Complex, CoordModeOrigin); + XDrawLines (XtDisplay (dw), XtWindow (dw), dw->dvi.fill_GC, + p, n + 2, CoordModeOrigin); + XtFree((char *)p); +} + +#define POINTS_MAX 10000 + +static void +appendPoint(XPoint *points, int *pointi, int x, int y) +{ + if (*pointi < POINTS_MAX) { + points[*pointi].x = x; + points[*pointi].y = y; + *pointi += 1; + } +} + +#define FLATNESS 1 + +static void +flattenCurve(XPoint *points, int *pointi, + int x_2, int y_2, int x_3, int y_3, int x_4, int y_4) +{ + int x_1, y_1, dx, dy, n1, n2, n; + + x_1 = points[*pointi - 1].x; + y_1 = points[*pointi - 1].y; + + dx = x_4 - x_1; + dy = y_4 - y_1; + + n1 = dy*(x_2 - x_1) - dx*(y_2 - y_1); + n2 = dy*(x_3 - x_1) - dx*(y_3 - y_1); + if (n1 < 0) + n1 = -n1; + if (n2 < 0) + n2 = -n2; + n = n1 > n2 ? n1 : n2; + + if (n*n / (dy*dy + dx*dx) <= FLATNESS*FLATNESS) + appendPoint (points, pointi, x_4, y_4); + else { + flattenCurve (points, pointi, + (x_1 + x_2)/2, + (y_1 + y_2)/2, + (x_1 + x_2*2 + x_3)/4, + (y_1 + y_2*2 + y_3)/4, + (x_1 + 3*x_2 + 3*x_3 + x_4)/8, + (y_1 + 3*y_2 + 3*y_3 + y_4)/8); + flattenCurve (points, pointi, + (x_2 + x_3*2 + x_4)/4, + (y_2 + y_3*2 + y_4)/4, + (x_3 + x_4)/2, + (y_3 + y_4)/2, + x_4, + y_4); + } +} + +void +DrawSpline (DviWidget dw, int *v, int n) +{ + int sx, sy, tx, ty; + int ox, oy, dx, dy; + int i; + int pointi; + XPoint points[POINTS_MAX]; + + if (n == 0 || (n & 1) != 0) + return; + AdjustCacheDeltas (dw); + setGC (dw); + ox = XPos (dw); + oy = YPos (dw); + dx = v[0]; + dy = v[1]; + sx = ox; + sy = oy; + tx = sx + DeviceToX (dw, dx); + ty = sy + DeviceToX (dw, dy); + + pointi = 0; + + appendPoint (points, &pointi, sx, sy); + appendPoint (points, &pointi, (sx + tx)/2, (sy + ty)/2); + + for (i = 2; i < n; i += 2) { + int ux = ox + DeviceToX (dw, dx += v[i]); + int uy = oy + DeviceToX (dw, dy += v[i+1]); + flattenCurve (points, &pointi, + (sx + tx*5)/6, (sy + ty*5)/6, + (tx*5 + ux)/6, (ty*5 + uy)/6, + (tx + ux)/2, (ty + uy)/2); + sx = tx; + sy = ty; + tx = ux; + ty = uy; + } + + appendPoint (points, &pointi, tx, ty); + + XDrawLines (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC, + points, pointi, CoordModeOrigin); +} + + +/* +Local Variables: +c-indent-level: 8 +c-continued-statement-offset: 8 +c-brace-offset: -8 +c-argdecl-indent: 8 +c-label-offset: -8 +c-tab-always-indent: nil +End: +*/ diff --git a/contrib/groff/src/devices/xditview/font.c b/contrib/groff/src/devices/xditview/font.c new file mode 100644 index 000000000000..c111a7b9f8ed --- /dev/null +++ b/contrib/groff/src/devices/xditview/font.c @@ -0,0 +1,442 @@ +/* + * font.c + * + * map dvi fonts to X fonts + */ + +#include +#include +#include +#include +#include +#include +#include "DviP.h" +#include "XFontName.h" + +static void DisposeFontSizes(DviWidget, DviFontSizeList *); +void DestroyFontMap(DviFontMap *); + +static char * +savestr (const char *s) +{ + char *n; + + if (!s) + return 0; + n = XtMalloc (strlen (s) + 1); + if (n) + strcpy (n, s); + return n; +} + +static DviFontList * +LookupFontByPosition (DviWidget dw, int position) +{ + DviFontList *f; + + for (f = dw->dvi.fonts; f; f = f->next) + if (f->dvi_number == position) + break; + return f; +} + +int +MaxFontPosition (DviWidget dw) +{ + DviFontList *f; + int n = -1; + + for (f = dw->dvi.fonts; f; f = f->next) + if (f->dvi_number > n) + n = f->dvi_number; + return n; +} + +static DviFontSizeList * +LookupFontSizeBySize (DviWidget dw, DviFontList *f, int size) +{ + DviFontSizeList *fs, *best = 0, *smallest = 0; + int bestsize = 0; + XFontName fontName; + unsigned int fontNameAttributes; + char fontNameString[2048]; + int decipointsize; + + if (f->scalable) { + decipointsize = (10*size)/dw->dvi.sizescale; + for (best = f->sizes; best; best = best->next) + if (best->size == decipointsize) + return best; + best = (DviFontSizeList *) XtMalloc(sizeof *best); + best->next = f->sizes; + best->size = decipointsize; + f->sizes = best; + XParseFontName (f->x_name, &fontName, &fontNameAttributes); + fontNameAttributes &= ~(FontNamePixelSize|FontNameAverageWidth); + fontNameAttributes |= FontNameResolutionX; + fontNameAttributes |= FontNameResolutionY; + fontNameAttributes |= FontNamePointSize; + fontName.ResolutionX = dw->dvi.display_resolution; + fontName.ResolutionY = dw->dvi.display_resolution; + fontName.PointSize = decipointsize; + XFormatFontName (&fontName, fontNameAttributes, fontNameString); + best->x_name = savestr (fontNameString); + best->doesnt_exist = 0; + best->font = 0; + return best; + } + for (fs = f->sizes; fs; fs=fs->next) { + if (dw->dvi.sizescale*fs->size <= 10*size + && fs->size >= bestsize) { + best = fs; + bestsize = fs->size; + } + if (smallest == 0 || fs->size < smallest->size) + smallest = fs; + } + return best ? best : smallest; +} + +static char * +SkipFontNameElement (char *n) +{ + while (*n != '-') + if (!*++n) + return 0; + return n+1; +} + +# define SizePosition 8 +# define EncodingPosition 13 + +static int +ConvertFontNameToSize (char *n) +{ + int i, size; + + for (i = 0; i < SizePosition; i++) { + n = SkipFontNameElement (n); + if (!n) + return -1; + } + size = atoi (n); + return size; +} + +static char * +ConvertFontNameToEncoding (char *n) +{ + int i; + for (i = 0; i < EncodingPosition; i++) { + n = SkipFontNameElement (n); + if (!n) + return 0; + } + return n; +} + +DviFontSizeList * +InstallFontSizes (DviWidget dw, const char *x_name, Boolean *scalablep) +{ + char fontNameString[2048]; + char **fonts; + int i, count; + int size; + DviFontSizeList *sizes, *new_size; + XFontName fontName; + unsigned int fontNameAttributes; + + *scalablep = FALSE; + if (!XParseFontName ((XFontNameString)x_name, &fontName, + &fontNameAttributes)) + return 0; + fontNameAttributes &= ~(FontNamePixelSize|FontNamePointSize + |FontNameAverageWidth); + fontNameAttributes |= FontNameResolutionX; + fontNameAttributes |= FontNameResolutionY; + fontName.ResolutionX = dw->dvi.display_resolution; + fontName.ResolutionY = dw->dvi.display_resolution; + XFormatFontName (&fontName, fontNameAttributes, fontNameString); + fonts = XListFonts (XtDisplay (dw), fontNameString, 10000000, &count); + sizes = 0; + for (i = 0; i < count; i++) { + size = ConvertFontNameToSize (fonts[i]); + if (size == 0) { + DisposeFontSizes (dw, sizes); + sizes = 0; + *scalablep = TRUE; + break; + } + if (size != -1) { + new_size = (DviFontSizeList *) XtMalloc (sizeof *new_size); + new_size->next = sizes; + new_size->size = size; + new_size->x_name = savestr (fonts[i]); + new_size->doesnt_exist = 0; + new_size->font = 0; + sizes = new_size; + } + } + XFreeFontNames (fonts); + return sizes; +} + +static void +DisposeFontSizes (DviWidget dw, DviFontSizeList *fs) +{ + DviFontSizeList *next; + + for (; fs; fs=next) { + next = fs->next; + if (fs->x_name) + XtFree (fs->x_name); + if (fs->font && fs->font != dw->dvi.default_font) { + XUnloadFont (XtDisplay (dw), fs->font->fid); + XFree ((char *)fs->font); + } + XtFree ((char *) fs); + } +} + +static DviFontList * +InstallFont (DviWidget dw, int position, + const char *dvi_name, const char *x_name) +{ + DviFontList *f; + char *encoding; + + if ((f = LookupFontByPosition (dw, position)) != NULL) { + /* + * ignore gratuitous font loading + */ + if (!strcmp (f->dvi_name, dvi_name) && + !strcmp (f->x_name, x_name)) + return f; + + DisposeFontSizes (dw, f->sizes); + if (f->dvi_name) + XtFree (f->dvi_name); + if (f->x_name) + XtFree (f->x_name); + f->device_font = 0; + } else { + f = (DviFontList *) XtMalloc (sizeof (*f)); + f->next = dw->dvi.fonts; + dw->dvi.fonts = f; + } + f->initialized = FALSE; + f->dvi_name = savestr (dvi_name); + f->device_font = device_find_font (dw->dvi.device, dvi_name); + f->x_name = savestr (x_name); + f->dvi_number = position; + f->sizes = 0; + f->scalable = FALSE; + if (f->x_name) { + encoding = ConvertFontNameToEncoding (f->x_name); + f->char_map = DviFindMap (encoding); + } else + f->char_map = 0; + /* + * force requery of fonts + */ + dw->dvi.font = 0; + dw->dvi.font_number = -1; + dw->dvi.cache.font = 0; + dw->dvi.cache.font_number = -1; + dw->dvi.device_font = 0; + dw->dvi.device_font_number = -1; + return f; +} + +void +ForgetFonts (DviWidget dw) +{ + DviFontList *f = dw->dvi.fonts; + + while (f) { + DviFontList *tem = f; + + if (f->sizes) + DisposeFontSizes (dw, f->sizes); + if (f->dvi_name) + XtFree (f->dvi_name); + if (f->x_name) + XtFree (f->x_name); + f = f->next; + XtFree ((char *) tem); + } + + /* + * force requery of fonts + */ + dw->dvi.font = 0; + dw->dvi.font_number = -1; + dw->dvi.cache.font = 0; + dw->dvi.cache.font_number = -1; + dw->dvi.device_font = 0; + dw->dvi.device_font_number = -1; + dw->dvi.fonts = 0; +} + + +static char * +MapDviNameToXName (DviWidget dw, const char *dvi_name) +{ + DviFontMap *fm; + + for (fm = dw->dvi.font_map; fm; fm=fm->next) + if (!strcmp (fm->dvi_name, dvi_name)) + return fm->x_name; + return 0; +} + +#if 0 +static char * +MapXNameToDviName (DviWidget dw, const char *x_name) +{ + DviFontMap *fm; + + for (fm = dw->dvi.font_map; fm; fm=fm->next) + if (!strcmp (fm->x_name, x_name)) + return fm->dvi_name; + return 0; +} +#endif + +void +ParseFontMap (DviWidget dw) +{ + char dvi_name[1024]; + char x_name[2048]; + char *m, *s; + DviFontMap *fm, *new_map; + + if (dw->dvi.font_map) + DestroyFontMap (dw->dvi.font_map); + fm = 0; + m = dw->dvi.font_map_string; + while (*m) { + s = m; + while (*m && !isspace (*m)) + ++m; + strncpy (dvi_name, s, m-s); + dvi_name[m-s] = '\0'; + while (isspace (*m)) + ++m; + s = m; + while (*m && *m != '\n') + ++m; + strncpy (x_name, s, m-s); + x_name[m-s] = '\0'; + new_map = (DviFontMap *) XtMalloc (sizeof *new_map); + new_map->x_name = savestr (x_name); + new_map->dvi_name = savestr (dvi_name); + new_map->next = fm; + fm = new_map; + ++m; + } + dw->dvi.font_map = fm; +} + +void +DestroyFontMap (DviFontMap *font_map) +{ + DviFontMap *next; + + for (; font_map; font_map = next) { + next = font_map->next; + if (font_map->x_name) + XtFree (font_map->x_name); + if (font_map->dvi_name) + XtFree (font_map->dvi_name); + XtFree ((char *) font_map); + } +} + +/* ARGSUSED */ + +void +SetFontPosition (DviWidget dw, int position, + const char *dvi_name, const char *extra) +{ + char *x_name; + + x_name = MapDviNameToXName (dw, dvi_name); + if (x_name) + (void) InstallFont (dw, position, dvi_name, x_name); + + extra = extra; /* unused; suppress compiler warning */ +} + +XFontStruct * +QueryFont (DviWidget dw, int position, int size) +{ + DviFontList *f; + DviFontSizeList *fs; + + f = LookupFontByPosition (dw, position); + if (!f) + return dw->dvi.default_font; + if (!f->initialized) { + f->sizes = InstallFontSizes (dw, f->x_name, &f->scalable); + f->initialized = TRUE; + } + fs = LookupFontSizeBySize (dw, f, size); + if (!fs) + return dw->dvi.default_font; + if (!fs->font) { + if (fs->x_name) + fs->font = XLoadQueryFont (XtDisplay (dw), fs->x_name); + if (!fs->font) + fs->font = dw->dvi.default_font; + } + return fs->font; +} + +DeviceFont * +QueryDeviceFont (DviWidget dw, int position) +{ + DviFontList *f; + + f = LookupFontByPosition (dw, position); + if (!f) + return 0; + return f->device_font; +} + +DviCharNameMap * +QueryFontMap (DviWidget dw, int position) +{ + DviFontList *f; + + f = LookupFontByPosition (dw, position); + if (f) + return f->char_map; + else + return 0; +} + +#if 0 +LoadFont (DviWidget dw, int position, int size) +{ + XFontStruct *font; + + font = QueryFont (dw, position, size); + dw->dvi.font_number = position; + dw->dvi.font_size = size; + dw->dvi.font = font; + XSetFont (XtDisplay (dw), dw->dvi.normal_GC, font->fid); + return; +} +#endif + +/* +Local Variables: +c-indent-level: 8 +c-continued-statement-offset: 8 +c-brace-offset: -8 +c-argdecl-indent: 8 +c-label-offset: -8 +c-tab-always-indent: nil +End: +*/ diff --git a/contrib/groff/src/devices/xditview/gray1.bm b/contrib/groff/src/devices/xditview/gray1.bm new file mode 100644 index 000000000000..c40a95e6eab6 --- /dev/null +++ b/contrib/groff/src/devices/xditview/gray1.bm @@ -0,0 +1,4 @@ +#define gray1_width 3 +#define gray1_height 3 +static char gray1_bits[] = { + 0x00, 0x02, 0x00}; diff --git a/contrib/groff/src/devices/xditview/gray2.bm b/contrib/groff/src/devices/xditview/gray2.bm new file mode 100644 index 000000000000..e87a1bcc073c --- /dev/null +++ b/contrib/groff/src/devices/xditview/gray2.bm @@ -0,0 +1,4 @@ +#define gray2_width 3 +#define gray2_height 3 +static char gray2_bits[] = { + 0x00, 0x03, 0x00}; diff --git a/contrib/groff/src/devices/xditview/gray3.bm b/contrib/groff/src/devices/xditview/gray3.bm new file mode 100644 index 000000000000..d9313ebd5e8f --- /dev/null +++ b/contrib/groff/src/devices/xditview/gray3.bm @@ -0,0 +1,4 @@ +#define gray3_width 3 +#define gray3_height 3 +static char gray3_bits[] = { + 0x00, 0x03, 0x02}; diff --git a/contrib/groff/src/devices/xditview/gray4.bm b/contrib/groff/src/devices/xditview/gray4.bm new file mode 100644 index 000000000000..dad142a9b0f0 --- /dev/null +++ b/contrib/groff/src/devices/xditview/gray4.bm @@ -0,0 +1,4 @@ +#define gray4_width 3 +#define gray4_height 3 +static char gray4_bits[] = { + 0x00, 0x07, 0x02}; diff --git a/contrib/groff/src/devices/xditview/gray5.bm b/contrib/groff/src/devices/xditview/gray5.bm new file mode 100644 index 000000000000..5f576184172d --- /dev/null +++ b/contrib/groff/src/devices/xditview/gray5.bm @@ -0,0 +1,4 @@ +#define gray5_width 3 +#define gray5_height 3 +static char gray5_bits[] = { + 0x04, 0x07, 0x02}; diff --git a/contrib/groff/src/devices/xditview/gray6.bm b/contrib/groff/src/devices/xditview/gray6.bm new file mode 100644 index 000000000000..b76701db16d3 --- /dev/null +++ b/contrib/groff/src/devices/xditview/gray6.bm @@ -0,0 +1,4 @@ +#define gray6_width 3 +#define gray6_height 3 +static char gray6_bits[] = { + 0x04, 0x07, 0x03}; diff --git a/contrib/groff/src/devices/xditview/gray7.bm b/contrib/groff/src/devices/xditview/gray7.bm new file mode 100644 index 000000000000..ef47bc692e99 --- /dev/null +++ b/contrib/groff/src/devices/xditview/gray7.bm @@ -0,0 +1,4 @@ +#define gray7_width 3 +#define gray7_height 3 +static char gray7_bits[] = { + 0x05, 0x07, 0x03}; diff --git a/contrib/groff/src/devices/xditview/gray8.bm b/contrib/groff/src/devices/xditview/gray8.bm new file mode 100644 index 000000000000..12de7cb6f577 --- /dev/null +++ b/contrib/groff/src/devices/xditview/gray8.bm @@ -0,0 +1,4 @@ +#define gray8_width 3 +#define gray8_height 3 +static char gray8_bits[] = { + 0x05, 0x07, 0x07}; diff --git a/contrib/groff/src/devices/xditview/gxditview.man b/contrib/groff/src/devices/xditview/gxditview.man new file mode 100644 index 000000000000..2c1302bbc6fd --- /dev/null +++ b/contrib/groff/src/devices/xditview/gxditview.man @@ -0,0 +1,410 @@ +.TH GXDITVIEW @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +. +. +.SH NAME +gxditview \- display groff intermediate output files +. +. +.SH SYNOPSIS +.B \%gxditview +.RI [\fB\- toolkitoption\ .\|.\|.\|] +.RI [\fB\- option\ .\|.\|.\|] +.RI [ filename ] +. +. +.SH DESCRIPTION +The +.B \%gxditview +program displays the +.I groff intermediate +.IR output , +see +.BR groff_out (@MAN5EXT@), +on an X\~display. +. +It uses the standard X11 fonts, so it does not require access to the +server machine for font loading. +. +There are several ways to use +.BR \%gxditview . +. +. +.PP +The +.I groff intermediate output +can be generated by +.BR groff\~\-Z . +This can be viewed by explicity calling +.B \%gxditview +.IR \%filename . +If +.I filename +is +.BR \- , +.B \%gxditview +will read the standard input; +.I \%filename +cannot be omitted. +. +The +.I groff intermediate output +is different for all devices. +. +.B \%gxditview +can view it for all devices, but the quality is not always good. +. +. +.PP +The best result is achieved with the +.BR X * +devices for +.BR groff 's +option +.BR \-T . +. +There are four +.BR X * +devices: +.BR \%\-TX75 , +.BR \%\-TX75\-12 , +.BR \%\-TX100 , +.BR \%\-TX100\-12 . +They differ by the X\~resolution (75dpi or 100dpi) and the used base font +size (10pt or 12pt). +. +They are especially built for +.BR \%gxditview . +When using one of them +.B groff +generates the +.I intermediate output +for this device and calls +.B \%gxditview +automatically for viewing. +. +. +.PP +.BR groff 's +option +.B \-X +should be considered obsolete today; it produces +.I intermediate output +for +.I Postscript +and uses +.B \%gxditview +as a viewer for it, but with a bad quality. +. +Simply don't use it. +. +. +.PP +During the run of +.BR \%gxditview , +the left mouse button brings up a menu with the following entries: +. +.TP 8 +.B "Next Page" +Display the next page. +. +.TP +.B "Previous Page" +Display the previous page. +. +.TP +.B "Select Page" +Select a particular numbered page specified by a dialog box. +. +.TP +.B Print +Print the +.I groff intermediate output +using a command specified by a dialog box. +. +The default command initially displayed is controlled by the +.B printCommand +application resource, and by the +.B \-printCommand +option. +. +.TP +.B Open +Open for display a new file specified by a dialog box. +. +The file should contain some +.I groff intermediate +.IR output . +If the filename starts with +.B | +it will be taken to be a command to read from. +. +.TP +.B Quit +Exit from +.BR \%gxditview . +. +. +.PP +The +.IR n , +.I Space +and +.I Return +keys are bound to the +.B Next\ Page +action. +. +The +.IR p , +.I BackSpace +and +.I Delete +keys are bound to the +.B Previous\ Page +action. +. +The +.I q +key is bound to the +.B Quit +action. +. +The +.I r +key is bound to the +.B Rerasterize +action which rereads the current file, and redisplays the current +page; if the current file is a command, the command will be +reexecuted. +. +. +.PP +The +.B paperlength +and +.B paperwidth +commands in the DESC file specify the length and width in machine units +of the virtual page displayed by +.BR \%gxditview . +. +. +.SH OPTIONS +The +.B \%gxditview +program accepts all of the standard X\~Toolkit command line options +along with the additional options listed below: +. +.TP 8 +.B \-help +This option indicates that a brief summary of the allowed options should be +printed. +. +.TP +.B \-page +This option specifies the page number of the document to be displayed. +. +.TP +.BI \-backingStore\ backing-store-type +Redisplay of the +.I groff intermediate output +window can take up to a second or so, this option causes the server to +save the window contents so that when it is scrolled around the +viewport, the window is painted from contents saved in backing store. +.I backing-store-type +can be one of +.BR Always , +.B WhenMapped +or +.BR NotUseful . +. +.TP +.BI \-printCommand\ command +The default command displayed in the dialog box for the +.B Print +menu entry will be +.IR command . +. +.TP +.BI \-resolution\ res +The +.I groff intermediate output +file will be displayed at a resolution of +.I res +dpi, unless the DESC file contains the +.B X11 +command, in which case the device resolution will be used. +. +This corresponds to the +.I Dvi +widget's +.B resolution +resource. +. +The default is 75. +. +.TP +.BI \-filename\ string +The default filename displayed in the dialog box for the +.B Open +menu entry will be +.IR string . +This can be either a filename, or a command starting with +.BR | . +. +. +.PP +The following standard X\~Toolkit command line arguments are commonly used +with +.BR \%gxditview : +. +.TP 8 +.BI \-bg\ color +This option specifies the color to use for the background of the window. +. +The default is \fIwhite\fP. +. +.TP +.BI \-bd\ color +This option specifies the color to use for the border of the window. +. +The default is \fIblack\fP. +. +.TP +.BI \-bw\ number +This option specifies the width in pixels of the border surrounding the +window. +. +.TP +.BI \-fg\ color +This option specifies the color to use for displaying text. +. +The default is +\fIblack\fP. +. +.TP +.BI \-fn\ font +This option specifies the font to be used for displaying widget text. +. +The default is \fIfixed\fP. +. +.TP +.B \-rv +This option indicates that reverse video should be simulated by swapping +the foreground and background colors. +. +.TP +.BI \-geometry\ geometry +This option specifies the preferred size and position of the window. +. +.TP +.BI \-display\ host : display +This option specifies the X\~server to contact. +. +.TP +.BI \-xrm\ resourcestring +This option specifies a resource string to be used. +. +. +.SH X DEFAULTS +This program uses the +.I Dvi +widget in the X\~Toolkit. +. +It understands all of the core resource names and classes as well as: +. +.TP 8 +.BR width\ (class\ Width ) +Specifies the width of the window. +. +.TP +.BR height\ (class\ Height ) +Specifies the height of the window. +. +.TP +.BR foreground\ (class\ Foreground ) +Specifies the default foreground color. +. +.TP +.BR font\ (class\ Font ) +Specifies the font to be used for error messages. +. +.TP +.BR fontMap\ (class\ FontMap ) +Specifies the mapping from +.I groff +font names to X\~font names. +. +This must be a string containing a sequence of lines. +. +Each line contains two whitespace separated fields: first the +.I groff +font name, and secondly the X\~font name. +. +The default is +.nf +"\e +TR -adobe-times-medium-r-normal--*-100-*-*-*-*-iso8859-1\en\e +TI -adobe-times-medium-i-normal--*-100-*-*-*-*-iso8859-1\en\e +TB -adobe-times-bold-r-normal--*-100-*-*-*-*-iso8859-1\en\e +TBI -adobe-times-bold-i-normal--*-100-*-*-*-*-iso8859-1\en\e +CR -adobe-courier-medium-r-normal--*-100-*-*-*-*-iso8859-1\en\e +CI -adobe-courier-medium-o-normal--*-100-*-*-*-*-iso8859-1\en\e +CB -adobe-courier-bold-r-normal--*-100-*-*-*-*-iso8859-1\en\e +CBI -adobe-courier-bold-o-normal--*-100-*-*-*-*-iso8859-1\en\e +HR -adobe-helvetica-medium-r-normal--*-100-*-*-*-*-iso8859-1\en\e +HI -adobe-helvetica-medium-o-normal--*-100-*-*-*-*-iso8859-1\en\e +HB -adobe-helvetica-bold-r-normal--*-100-*-*-*-*-iso8859-1\en\e +HBI -adobe-helvetica-bold-o-normal--*-100-*-*-*-*-iso8859-1\en\e +NR -adobe-new century schoolbook-medium-r-normal--*-100-*-*-*-*-iso8859-1\en\e +NI -adobe-new century schoolbook-medium-i-normal--*-100-*-*-*-*-iso8859-1\en\e +NB -adobe-new century schoolbook-bold-r-normal--*-100-*-*-*-*-iso8859-1\en\e +NBI -adobe-new century schoolbook-bold-i-normal--*-100-*-*-*-*-iso8859-1\en\e +S -adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\en\e +SS -adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\en\e +" +.fi +. +. +.SH "SEE ALSO" +.BR X (1), +.BR xrdb (1), +.BR xditview (1), +.BR groff (@MAN1EXT@), +.BR groff_out (@MAN5EXT@) +. +. +.SH ORIGIN +This program is derived from +.BR \%xditview ; +portions of +.B \%xditview +originated in +.B \%xtroff +which was derived from +.BR \%suntroff . +. +. +.SH COPYRIGHT +Copyright 1989, Massachusetts Institute of Technology. +.br +See +.BR X (1) +for a full statement of rights and permissions. +. +. +.SH AUTHORS +Keith Packard (MIT X Consortium) +.br +Richard L. Hyde (Purdue) +.br +David Slattengren (Berkeley) +.br +Malcolm Slaney (Schlumberger Palo Alto Research) +.br +Mark Moraes (University of Toronto) +.br +James Clark +. +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/contrib/groff/src/devices/xditview/lex.c b/contrib/groff/src/devices/xditview/lex.c new file mode 100644 index 000000000000..dfe1e0d4bd22 --- /dev/null +++ b/contrib/groff/src/devices/xditview/lex.c @@ -0,0 +1,96 @@ +#include +#include +#include +#include +#include "DviP.h" + +int +DviGetAndPut(DviWidget dw, int *cp) +{ + if (dw->dvi.ungot) { + dw->dvi.ungot = 0; + *cp = getc (dw->dvi.file); + } + else { + *cp = getc (dw->dvi.file); + if (*cp != EOF) + putc (*cp, dw->dvi.tmpFile); + } + return *cp; +} + +char * +GetLine(DviWidget dw, char *Buffer, int Length) +{ + int i = 0, c; + + Length--; /* Save room for final '\0' */ + + while (DviGetC (dw, &c) != EOF) { + if (Buffer && i < Length) + Buffer[i++] = c; + if (c == '\n') { + DviUngetC(dw, c); + break; + } + } + if (Buffer) + Buffer[i] = '\0'; + return Buffer; +} + +char * +GetWord(DviWidget dw, char *Buffer, int Length) +{ + int i = 0, c; + + Length--; /* Save room for final '\0' */ + while (DviGetC(dw, &c) == ' ' || c == '\n') + ; + while (c != EOF) { + if (Buffer && i < Length) + Buffer[i++] = c; + if (DviGetC(dw, &c) == ' ' || c == '\n') { + DviUngetC(dw, c); + break; + } + } + if (Buffer) + Buffer[i] = '\0'; + return Buffer; +} + +int +GetNumber(DviWidget dw) +{ + int i = 0, c; + int negative = 0; + + while (DviGetC(dw, &c) == ' ' || c == '\n') + ; + if (c == '-') { + negative = 1; + DviGetC(dw, &c); + } + + for (; c >= '0' && c <= '9'; DviGetC(dw, &c)) { + if (negative) + i = i*10 - (c - '0'); + else + i = i*10 + c - '0'; + } + if (c != EOF) + DviUngetC(dw, c); + return i; +} + +/* +Local Variables: +c-indent-level: 8 +c-continued-statement-offset: 8 +c-brace-offset: -8 +c-argdecl-indent: 8 +c-label-offset: -8 +c-tab-always-indent: nil +End: +*/ diff --git a/contrib/groff/src/devices/xditview/page.c b/contrib/groff/src/devices/xditview/page.c new file mode 100644 index 000000000000..d1c5c9f657cb --- /dev/null +++ b/contrib/groff/src/devices/xditview/page.c @@ -0,0 +1,82 @@ +/* + * page.c + * + * map page numbers to file position + */ + +#include +#include +#include +#include +#include +#include "DviP.h" + +#ifdef X_NOT_STDC_ENV +extern long ftell(); +#endif + +static DviFileMap * +MapPageNumberToFileMap (DviWidget dw, int number) +{ + DviFileMap *m; + + for (m = dw->dvi.file_map; m; m=m->next) + if (m->page_number == number) + break; + return m; +} + +void +DestroyFileMap (DviFileMap *m) +{ + DviFileMap *next; + + for (; m; m = next) { + next = m->next; + XtFree ((char *) m); + } +} + +void +ForgetPagePositions (DviWidget dw) +{ + DestroyFileMap (dw->dvi.file_map); + dw->dvi.file_map = 0; +} + +void +RememberPagePosition(DviWidget dw, int number) +{ + DviFileMap *m; + + if (!(m = MapPageNumberToFileMap (dw, number))) { + m = (DviFileMap *) XtMalloc (sizeof *m); + m->page_number = number; + m->next = dw->dvi.file_map; + dw->dvi.file_map = m; + } + if (dw->dvi.tmpFile) + m->position = ftell (dw->dvi.tmpFile); + else + m->position = ftell (dw->dvi.file); +} + +long +SearchPagePosition (DviWidget dw, int number) +{ + DviFileMap *m; + + if (!(m = MapPageNumberToFileMap (dw, number))) + return -1; + return m->position; +} + +void +FileSeek(DviWidget dw, long position) +{ + if (dw->dvi.tmpFile) { + dw->dvi.readingTmp = 1; + fseek (dw->dvi.tmpFile, position, 0); + } else + fseek (dw->dvi.file, position, 0); +} diff --git a/contrib/groff/src/devices/xditview/parse.c b/contrib/groff/src/devices/xditview/parse.c new file mode 100644 index 000000000000..de7d6baa08a3 --- /dev/null +++ b/contrib/groff/src/devices/xditview/parse.c @@ -0,0 +1,366 @@ +/* + * parse.c + * + * parse dvi input + */ + +#include +#include +#include +#include +#include +#include "DviP.h" + +static int StopSeen = 0; +static void ParseDrawFunction(DviWidget, char *); +static void ParseDeviceControl(DviWidget); +static void push_env(DviWidget); +static void pop_env(DviWidget); + +/* draw.c */ +extern int PutCharacter(DviWidget, char *); +extern int PutNumberedCharacter(DviWidget, int); +extern void HorizontalGoto(DviWidget, int); +extern void Word(DviWidget); +extern void VerticalGoto(DviWidget, int); +extern void VerticalMove(DviWidget, int); +extern void FlushCharCache(DviWidget); +extern void Newline(DviWidget); +extern void DrawLine(DviWidget, int, int); +extern void DrawCircle(DviWidget, int); +extern void DrawFilledCircle(DviWidget, int); +extern void DrawEllipse(DviWidget, int, int); +extern void DrawFilledEllipse(DviWidget, int, int); +extern void DrawArc(DviWidget, int, int, int, int); +extern void DrawPolygon(DviWidget, int *, int); +extern void DrawFilledPolygon(DviWidget, int *, int); +extern void DrawSpline(DviWidget, int *, int); + +/* Dvi.c */ +extern void SetDevice(DviWidget, const char *); + +/* page.c */ +extern void RememberPagePosition(DviWidget, int); + +/* font.c */ +extern void SetFontPosition(DviWidget, int, const char *, const char *); + +/* lex.c */ +extern int GetNumber(DviWidget); + +#define HorizontalMove(dw, delta) ((dw)->dvi.state->x += (delta)) + + +int +ParseInput(register DviWidget dw) +{ + int n, k; + int c; + char Buffer[BUFSIZ]; + int NextPage; + int otherc; + + StopSeen = 0; + + /* + * make sure some state exists + */ + + if (!dw->dvi.state) + push_env (dw); + for (;;) { + switch (DviGetC(dw, &c)) { + case '\n': + break; + case ' ': /* when input is text */ + case 0: /* occasional noise creeps in */ + break; + case '{': /* push down current environment */ + push_env(dw); + break; + case '}': + pop_env(dw); + break; + /* + * two motion digits plus a character + */ + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + HorizontalMove(dw, (c-'0')*10 + + DviGetC(dw,&otherc)-'0'); + /* fall through */ + case 'c': /* single ascii character */ + DviGetC(dw,&c); + if (c == ' ') + break; + Buffer[0] = c; + Buffer[1] = '\0'; + (void) PutCharacter (dw, Buffer); + break; + case 'C': + GetWord (dw, Buffer, BUFSIZ); + (void) PutCharacter (dw, Buffer); + break; + case 't': + Buffer[1] = '\0'; + while (DviGetC (dw, &c) != EOF + && c != ' ' && c != '\n') { + Buffer[0] = c; + HorizontalMove (dw, PutCharacter (dw, Buffer)); + } + break; + case 'u': + n = GetNumber(dw); + Buffer[1] = '\0'; + while (DviGetC (dw, &c) == ' ') + ; + while (c != EOF && c != ' ' && c != '\n') { + Buffer[0] = c; + HorizontalMove (dw, + PutCharacter (dw, Buffer) + n); + DviGetC (dw, &c); + } + break; + + case 'D': /* draw function */ + (void) GetLine(dw, Buffer, BUFSIZ); + if (dw->dvi.display_enable) + ParseDrawFunction(dw, Buffer); + break; + case 's': /* ignore fractional sizes */ + n = GetNumber(dw); + dw->dvi.state->font_size = n; + break; + case 'f': + n = GetNumber(dw); + dw->dvi.state->font_number = n; + break; + case 'H': /* absolute horizontal motion */ + k = GetNumber(dw); + HorizontalGoto(dw, k); + break; + case 'h': /* relative horizontal motion */ + k = GetNumber(dw); + HorizontalMove(dw, k); + break; + case 'w': /* word space */ + Word (dw); + break; + case 'V': + n = GetNumber(dw); + VerticalGoto(dw, n); + break; + case 'v': + n = GetNumber(dw); + VerticalMove(dw, n); + break; + case 'P': /* new spread */ + break; + case 'p': /* new page */ + (void) GetNumber(dw); + NextPage = dw->dvi.current_page + 1; + RememberPagePosition(dw, NextPage); + FlushCharCache (dw); + return(NextPage); + case 'N': + n = GetNumber(dw); + PutNumberedCharacter (dw, n); + break; + case 'n': /* end of line */ + GetNumber(dw); + GetNumber(dw); + Newline (dw); + HorizontalGoto(dw, 0); + break; + case 'F': /* input files */ + case '+': /* continuation of X device control */ + case 'm': /* color */ + case '#': /* comment */ + GetLine(dw, NULL, 0); + break; + case 'x': /* device control */ + ParseDeviceControl(dw); + break; + case EOF: + dw->dvi.last_page = dw->dvi.current_page; + FlushCharCache (dw); + return dw->dvi.current_page; + default: + break; + } + } +} + +static void +push_env(DviWidget dw) +{ + DviState *new_state; + + new_state = (DviState *) XtMalloc (sizeof (*new_state)); + if (dw->dvi.state) + *new_state = *(dw->dvi.state); + else { + new_state->font_size = 10; + new_state->font_number = 1; + new_state->x = 0; + new_state->y = 0; + } + new_state->next = dw->dvi.state; + dw->dvi.state = new_state; +} + +static void +pop_env(DviWidget dw) +{ + DviState *old; + + old = dw->dvi.state; + dw->dvi.state = old->next; + XtFree ((char *) old); +} + +static void +InitTypesetter (DviWidget dw) +{ + while (dw->dvi.state) + pop_env (dw); + push_env (dw); + FlushCharCache (dw); +} + +#define DRAW_ARGS_MAX 128 + +static void +ParseDrawFunction(DviWidget dw, char *buf) +{ + int v[DRAW_ARGS_MAX]; + int i, no_move = 0; + char *ptr; + + v[0] = v[1] = v[2] = v[3] = 0; + + if (buf[0] == '\0') + return; + ptr = buf+1; + + for (i = 0; i < DRAW_ARGS_MAX; i++) { + if (sscanf(ptr, "%d", v + i) != 1) + break; + while (*ptr == ' ') + ptr++; + while (*ptr != '\0' && *ptr != ' ') + ptr++; + } + + switch (buf[0]) { + case 'l': /* draw a line */ + DrawLine(dw, v[0], v[1]); + break; + case 'c': /* circle */ + DrawCircle(dw, v[0]); + break; + case 'C': + DrawFilledCircle(dw, v[0]); + break; + case 'e': /* ellipse */ + DrawEllipse(dw, v[0], v[1]); + break; + case 'E': + DrawFilledEllipse(dw, v[0], v[1]); + break; + case 'a': /* arc */ + DrawArc(dw, v[0], v[1], v[2], v[3]); + break; + case 'p': + DrawPolygon(dw, v, i); + break; + case 'P': + DrawFilledPolygon(dw, v, i); + break; + case '~': /* wiggly line */ + DrawSpline(dw, v, i); + break; + case 't': + dw->dvi.line_thickness = v[0]; + break; + case 'f': + if (i > 0 && v[0] >= 0 && v[0] <= DVI_FILL_MAX) + dw->dvi.fill = v[0]; + no_move = 1; + break; + default: +#if 0 + warning("unknown drawing function %s", buf); +#endif + no_move = 1; + break; + } + + if (!no_move) { + if (buf[0] == 'e') { + if (i > 0) + dw->dvi.state->x += v[0]; + } + else { + while (--i >= 0) { + if (i & 1) + dw->dvi.state->y += v[i]; + else + dw->dvi.state->x += v[i]; + } + } + } +} + +static void +ParseDeviceControl(DviWidget dw) /* Parse the x commands */ +{ + char str[20], str1[50]; + int c, n; + + GetWord (dw, str, 20); + switch (str[0]) { /* crude for now */ + case 'T': /* output device */ + GetWord (dw, str, 20); + SetDevice (dw, str); + break; + case 'i': /* initialize */ + InitTypesetter (dw); + break; + case 't': /* trailer */ + break; + case 'p': /* pause -- can restart */ + break; + case 's': /* stop */ + StopSeen = 1; + return; + case 'r': /* resolution when prepared */ + break; + case 'f': /* font used */ + n = GetNumber (dw); + GetWord (dw, str, 20); + GetLine (dw, str1, 50); + SetFontPosition (dw, n, str, str1); + break; + case 'H': /* char height */ + break; + case 'S': /* slant */ + break; + } + while (DviGetC (dw, &c) != '\n') /* skip rest of input line */ + if (c == EOF) + return; + return; +} + + +/* +Local Variables: +c-indent-level: 8 +c-continued-statement-offset: 8 +c-brace-offset: -8 +c-argdecl-indent: 8 +c-label-offset: -8 +c-tab-always-indent: nil +End: +*/ diff --git a/contrib/groff/src/devices/xditview/xdit.bm b/contrib/groff/src/devices/xditview/xdit.bm new file mode 100644 index 000000000000..0c7aa8cc98f6 --- /dev/null +++ b/contrib/groff/src/devices/xditview/xdit.bm @@ -0,0 +1,14 @@ +#define xdit_width 32 +#define xdit_height 32 +static unsigned char xdit_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x02, 0x00, 0x00, 0x02, + 0x8a, 0xa2, 0xfc, 0x03, 0x52, 0x14, 0x03, 0x04, 0x02, 0x80, 0x00, 0x08, + 0x52, 0x54, 0x00, 0x10, 0x8a, 0x22, 0x8f, 0x23, 0x02, 0x20, 0x06, 0x21, + 0x8a, 0x12, 0x8c, 0x40, 0x52, 0x14, 0x8c, 0x40, 0x02, 0x10, 0x58, 0x40, + 0x52, 0x14, 0x30, 0x40, 0x8a, 0x12, 0x30, 0x40, 0x02, 0x10, 0x70, 0x40, + 0x8a, 0x12, 0xc8, 0x40, 0x52, 0x24, 0xc4, 0xe0, 0x02, 0x20, 0x84, 0xe1, + 0x52, 0x54, 0xce, 0xf3, 0x8a, 0xa2, 0x00, 0xf8, 0x02, 0x00, 0x03, 0xfc, + 0x8a, 0x22, 0xfc, 0xf3, 0x52, 0x14, 0x00, 0xc2, 0x02, 0x00, 0x00, 0x02, + 0x52, 0x14, 0x45, 0x02, 0x8a, 0xa2, 0x28, 0x02, 0x02, 0x00, 0x00, 0x02, + 0x02, 0x00, 0x00, 0x02, 0xfe, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/contrib/groff/src/devices/xditview/xdit_mask.bm b/contrib/groff/src/devices/xditview/xdit_mask.bm new file mode 100644 index 000000000000..a584629f6178 --- /dev/null +++ b/contrib/groff/src/devices/xditview/xdit_mask.bm @@ -0,0 +1,14 @@ +#define xdit_mask_width 32 +#define xdit_mask_height 32 +static unsigned char xdit_mask_bits[] = { + 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07, + 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x1f, + 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xc7, + 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07, + 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/contrib/groff/src/devices/xditview/xditview.c b/contrib/groff/src/devices/xditview/xditview.c new file mode 100644 index 000000000000..7afdb47f13ce --- /dev/null +++ b/contrib/groff/src/devices/xditview/xditview.c @@ -0,0 +1,657 @@ +/* + * Copyright 1991 Massachusetts Institute of Technology + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of M.I.T. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. M.I.T. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T. + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ +/* + * xditview -- + * + * Display ditroff output in an X window + */ + +#ifndef SABER +#ifndef lint +static char rcsid[] = "$XConsortium: xditview.c,v 1.17 89/12/10 17:05:08 rws Exp $"; +#endif /* lint */ +#endif /* SABER */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "Dvi.h" + +#include "xdit.bm" +#include "xdit_mask.bm" + +#ifdef NEED_DECLARATION_POPEN +FILE *popen(const char *, const char *); +#endif /* NEED_DECLARATION_POPEN */ + +#ifdef NEED_DECLARATION_PCLOSE +int pclose (FILE *); +#endif /* NEED_DECLARATION_PCLOSE */ + +typedef void (*MakePromptFunc)(const char *); + +static String fallback_resources[] = { +#include "GXditview-ad.h" + NULL +}; + +static struct app_resources { + char *print_command; + char *filename; +} app_resources; + +#define offset(field) XtOffset(struct app_resources *, field) + +/* Application resources. */ + +static XtResource resources[] = { + {(String)"printCommand", (String)"PrintCommand", (String)XtRString, + sizeof(char*), offset(print_command), (String)XtRString, NULL}, + {(String)"filename", (String)"Filename", (String)XtRString, + sizeof(char*), offset(filename), (String)XtRString, NULL}, +}; + +#undef offset + +/* Command line options table. Only resources are entered here...there is a + pass over the remaining options after XtParseCommand is let loose. */ + +static XrmOptionDescRec options[] = { +{(char *)"-page", (char *)"*dvi.pageNumber", + XrmoptionSepArg, NULL}, +{(char *)"-backingStore", (char *)"*dvi.backingStore", + XrmoptionSepArg, NULL}, +{(char *)"-resolution", (char *)"*dvi.resolution", + XrmoptionSepArg, NULL}, +{(char *)"-printCommand", (char *)".printCommand", + XrmoptionSepArg, NULL}, +{(char *)"-filename", (char *)".filename", + XrmoptionSepArg, NULL}, +{(char *)"-noPolyText", (char *)"*dvi.noPolyText", + XrmoptionNoArg, (XPointer)"TRUE"}, +}; + +static char current_print_command[1024]; + +static char current_file_name[1024]; +static FILE *current_file; + +/* + * Report the syntax for calling xditview. + */ + +static void +Syntax(const char *call) +{ + (void) printf ("Usage: %s [-fg ] [-bg ]\n", call); + (void) printf (" [-bd ] [-bw ] [-help]\n"); + (void) printf (" [-display displayname] [-geometry geom]\n"); + (void) printf (" [-page ] [-backing ]\n"); + (void) printf (" [-resolution ] [-print ]\n"); + (void) printf (" [-filename ] [filename]\n\n"); + exit(1); +} + +static void NewFile (const char *); +static void SetPageNumber (int); +static Widget toplevel, paned, viewport, dvi; +static Widget page; +static Widget simpleMenu; + +static void NextPage(Widget, XtPointer, XtPointer); +static void PreviousPage(Widget, XtPointer, XtPointer); +static void SelectPage(Widget, XtPointer, XtPointer); +static void OpenFile(Widget, XtPointer, XtPointer); +static void Quit(Widget, XtPointer, XtPointer); +static void Print(Widget, XtPointer, XtPointer); + +static struct menuEntry { + const char *name; + XtCallbackProc function; +} menuEntries[] = { + {"nextPage", NextPage}, + {"previousPage", PreviousPage}, + {"selectPage", SelectPage}, + {"print", Print}, + {"openFile", OpenFile}, + {"quit", Quit}, +}; + +static void NextPageAction(Widget, XEvent *, String *, Cardinal *); +static void PreviousPageAction(Widget, XEvent *, String *, Cardinal *); +static void SelectPageAction(Widget, XEvent *, String *, Cardinal *); +static void OpenFileAction(Widget, XEvent *, String *, Cardinal *); +static void QuitAction(Widget, XEvent *, String *, Cardinal *); +static void AcceptAction(Widget, XEvent *, String *, Cardinal *); +static void CancelAction(Widget, XEvent *, String *, Cardinal *); +static void PrintAction(Widget, XEvent *, String *, Cardinal *); +static void RerasterizeAction(Widget, XEvent *, String *, Cardinal *); + +static void MakePrompt(Widget, const char *, MakePromptFunc, const char *); + +XtActionsRec xditview_actions[] = { + {(String)"NextPage", NextPageAction}, + {(String)"PreviousPage", PreviousPageAction}, + {(String)"SelectPage", SelectPageAction}, + {(String)"Print", PrintAction}, + {(String)"OpenFile", OpenFileAction}, + {(String)"Rerasterize", RerasterizeAction}, + {(String)"Quit", QuitAction}, + {(String)"Accept", AcceptAction}, + {(String)"Cancel", CancelAction}, +}; + +#define MenuNextPage 0 +#define MenuPreviousPage 1 +#define MenuSelectPage 2 +#define MenuPrint 3 +#define MenuOpenFile 4 +#define MenuQuit 5 + +static char pageLabel[256] = "Page "; + +int main(int argc, char **argv) +{ + char *file_name = 0; + Cardinal i; + static Arg labelArgs[] = { + {XtNlabel, (XtArgVal) pageLabel}, + }; + XtAppContext xtcontext; + Arg topLevelArgs[2]; + Widget entry; + Arg pageNumberArgs[1]; + int page_number; + + toplevel = XtAppInitialize(&xtcontext, "GXditview", + options, XtNumber (options), + &argc, argv, fallback_resources, NULL, 0); + if (argc > 2 + || (argc == 2 && (!strcmp(argv[1], "-help") + || !strcmp(argv[1], "--help")))) + Syntax(argv[0]); + + XtGetApplicationResources(toplevel, (XtPointer)&app_resources, + resources, XtNumber(resources), + NULL, (Cardinal) 0); + if (app_resources.print_command) + strcpy(current_print_command, app_resources.print_command); + + XtAppAddActions(xtcontext, xditview_actions, XtNumber (xditview_actions)); + + XtSetArg (topLevelArgs[0], XtNiconPixmap, + XCreateBitmapFromData (XtDisplay (toplevel), + XtScreen(toplevel)->root, + (char *)xdit_bits, + xdit_width, xdit_height)); + + XtSetArg (topLevelArgs[1], XtNiconMask, + XCreateBitmapFromData (XtDisplay (toplevel), + XtScreen(toplevel)->root, + (char *)xdit_mask_bits, + xdit_mask_width, xdit_mask_height)); + XtSetValues (toplevel, topLevelArgs, 2); + if (argc > 1) + file_name = argv[1]; + + /* + * create the menu and insert the entries + */ + simpleMenu = XtCreatePopupShell ("menu", simpleMenuWidgetClass, toplevel, + NULL, 0); + for (i = 0; i < XtNumber (menuEntries); i++) { + entry = XtCreateManagedWidget(menuEntries[i].name, + smeBSBObjectClass, simpleMenu, + NULL, (Cardinal) 0); + XtAddCallback(entry, XtNcallback, menuEntries[i].function, NULL); + } + + paned = XtCreateManagedWidget("paned", panedWidgetClass, toplevel, + NULL, (Cardinal) 0); + viewport = XtCreateManagedWidget("viewport", viewportWidgetClass, paned, + NULL, (Cardinal) 0); + dvi = XtCreateManagedWidget ("dvi", dviWidgetClass, viewport, NULL, 0); + page = XtCreateManagedWidget ("label", labelWidgetClass, paned, + labelArgs, XtNumber (labelArgs)); + XtSetArg (pageNumberArgs[0], XtNpageNumber, &page_number); + XtGetValues (dvi, pageNumberArgs, 1); + if (file_name) + NewFile (file_name); + /* NewFile modifies current_file_name, so do this here. */ + if (app_resources.filename) + strcpy(current_file_name, app_resources.filename); + XtRealizeWidget (toplevel); + if (file_name) + SetPageNumber (page_number); + XtAppMainLoop(xtcontext); + return 0; +} + +static void +SetPageNumber (int number) +{ + Arg arg[2]; + int actual_number, last_page; + + XtSetArg (arg[0], XtNpageNumber, number); + XtSetValues (dvi, arg, 1); + XtSetArg (arg[0], XtNpageNumber, &actual_number); + XtSetArg (arg[1], XtNlastPageNumber, &last_page); + XtGetValues (dvi, arg, 2); + if (actual_number == 0) + sprintf (pageLabel, "Page "); + else if (last_page > 0) + sprintf (pageLabel, "Page %d of %d", actual_number, last_page); + else + sprintf (pageLabel, "Page %d", actual_number); + XtSetArg (arg[0], XtNlabel, pageLabel); + XtSetValues (page, arg, 1); +} + +static void +SelectPageNumber (const char *number_string) +{ + SetPageNumber (atoi(number_string)); +} + +static int hadFile = 0; + +static void +NewFile (const char *name) +{ + Arg arg[2]; + char *n; + FILE *new_file; + Boolean seek = 0; + + if (current_file) { + if (!strcmp (current_file_name, "-")) + ; + else if (current_file_name[0] == '|') + pclose (current_file); + else + fclose (current_file); + } + if (!strcmp (name, "-")) + new_file = stdin; + else if (name[0] == '|') + new_file = popen (name+1, "r"); + else { + new_file = fopen (name, "r"); + seek = 1; + } + if (!new_file) { + /* XXX display error message */ + return; + } + XtSetArg (arg[0], XtNfile, new_file); + XtSetArg (arg[1], XtNseek, seek); + XtSetValues (dvi, arg, 2); + if (hadFile || name[0] != '-' || name[1] != '\0') { + XtSetArg (arg[0], XtNtitle, name); + if (name[0] != '/' && (n = strrchr (name, '/'))) + n = n + 1; + else + n = (char *)name; + XtSetArg (arg[1], XtNiconName, n); + XtSetValues (toplevel, arg, 2); + } + hadFile = 1; + SelectPageNumber ("1"); + strcpy (current_file_name, name); + current_file = new_file; +} + +static char fileBuf[1024]; + +static void +ResetMenuEntry (Widget entry) +{ + Arg arg[1]; + + XtSetArg (arg[0], (String)XtNpopupOnEntry, entry); + XtSetValues (XtParent(entry) , arg, (Cardinal) 1); +} + +/*ARGSUSED*/ + +static void +NextPage (Widget entry, XtPointer name, XtPointer data) +{ + name = name; /* unused; suppress compiler warning */ + data = data; + + NextPageAction((Widget)NULL, (XEvent *) 0, (String *) 0, (Cardinal *) 0); + ResetMenuEntry (entry); +} + +static void +NextPageAction (Widget widget, XEvent *event, + String *params, Cardinal *num_params) +{ + Arg args[1]; + int number; + + XtSetArg (args[0], XtNpageNumber, &number); + XtGetValues (dvi, args, 1); + SetPageNumber (number+1); + + widget = widget; /* unused; suppress compiler warning */ + event = event; + params = params; + num_params = num_params; +} + +/*ARGSUSED*/ + +static void +PreviousPage (Widget entry, XtPointer name, XtPointer data) +{ + name = name; /* unused; suppress compiler warning */ + data = data; + + PreviousPageAction ((Widget)NULL, (XEvent *) 0, (String *) 0, + (Cardinal *) 0); + ResetMenuEntry (entry); +} + +static void +PreviousPageAction (Widget widget, XEvent *event, + String *params, Cardinal *num_params) +{ + Arg args[1]; + int number; + + XtSetArg (args[0], XtNpageNumber, &number); + XtGetValues (dvi, args, 1); + SetPageNumber (number-1); + + widget = widget; /* unused; suppress compiler warning */ + event = event; + params = params; + num_params = num_params; +} + +/* ARGSUSED */ + +static void +SelectPage (Widget entry, XtPointer name, XtPointer data) +{ + name = name; /* unused; suppress compiler warning */ + data = data; + + SelectPageAction ((Widget)NULL, (XEvent *) 0, (String *) 0, + (Cardinal *) 0); + ResetMenuEntry (entry); +} + +static void +SelectPageAction (Widget widget, XEvent *event, + String *params, Cardinal *num_params) +{ + widget = widget; /* unused; suppress compiler warning */ + event = event; + params = params; + num_params = num_params; + + MakePrompt (toplevel, "Page number", SelectPageNumber, ""); +} + + +static void +DoPrint (const char *name) +{ + FILE *print_file; + RETSIGTYPE (*handler)(int); + + /* Avoid dieing because of an invalid command. */ + handler = signal(SIGPIPE, SIG_IGN); + + print_file = popen(name, "w"); + if (!print_file) + /* XXX print error message */ + return; + DviSaveToFile(dvi, print_file); + pclose(print_file); + signal(SIGPIPE, handler); + strcpy(current_print_command, name); +} + +static void +RerasterizeAction (Widget widget, XEvent *event, + String *params, Cardinal *num_params) +{ + Arg args[1]; + int number; + + if (current_file_name[0] == 0) { + /* XXX display an error message */ + return; + } + XtSetArg (args[0], XtNpageNumber, &number); + XtGetValues (dvi, args, 1); + NewFile(current_file_name); + SetPageNumber (number); + + widget = widget; /* unused; suppress compiler warning */ + event = event; + params = params; + num_params = num_params; +} + +/* ARGSUSED */ + +static void +Print (Widget entry, XtPointer name, XtPointer data) +{ + name = name; /* unused; suppress compiler warning */ + data = data; + + PrintAction ((Widget)NULL, (XEvent *) 0, (String *) 0, (Cardinal *) 0); + ResetMenuEntry (entry); +} + +static void +PrintAction (Widget widget, XEvent *event, + String *params, Cardinal *num_params) +{ + widget = widget; /* unused; suppress compiler warning */ + event = event; + params = params; + num_params = num_params; + + if (current_print_command[0]) + strcpy (fileBuf, current_print_command); + else + fileBuf[0] = '\0'; + MakePrompt (toplevel, "Print command:", DoPrint, fileBuf); +} + + +/* ARGSUSED */ + +static void +OpenFile (Widget entry, XtPointer name, XtPointer data) +{ + name = name; /* unused; suppress compiler warning */ + data = data; + + OpenFileAction ((Widget)NULL, (XEvent *) 0, (String *) 0, (Cardinal *) 0); + ResetMenuEntry (entry); +} + +static void +OpenFileAction (Widget widget, XEvent *event, + String *params, Cardinal *num_params) +{ + widget = widget; /* unused; suppress compiler warning */ + event = event; + params = params; + num_params = num_params; + + if (current_file_name[0]) + strcpy (fileBuf, current_file_name); + else + fileBuf[0] = '\0'; + MakePrompt (toplevel, "File to open:", NewFile, fileBuf); +} + +/* ARGSUSED */ + +static void +Quit (Widget entry, XtPointer closure, XtPointer data) +{ + entry = entry; /* unused; suppress compiler warning */ + closure = closure; + data = data; + + QuitAction ((Widget)NULL, (XEvent *) 0, (String *) 0, (Cardinal *) 0); +} + +static void +QuitAction (Widget widget, XEvent *event, + String *params, Cardinal *num_params) +{ + widget = widget; /* unused; suppress compiler warning */ + event = event; + params = params; + num_params = num_params; + + exit (0); +} + +Widget promptShell, promptDialog; +MakePromptFunc promptfunction; + +/* ARGSUSED */ +static +void CancelAction (Widget widget, XEvent *event, + String *params, Cardinal *num_params) +{ + widget = widget; /* unused; suppress compiler warning */ + event = event; + params = params; + num_params = num_params; + + if (promptShell) { + XtSetKeyboardFocus(toplevel, (Widget) None); + XtDestroyWidget(promptShell); + promptShell = (Widget) 0; + } +} + +static +void AcceptAction (Widget widget, XEvent *event, + String *params, Cardinal *num_params) +{ + (*promptfunction)(XawDialogGetValueString(promptDialog)); + CancelAction (widget, event, params, num_params); +} + +static void +MakePrompt(Widget centerw, const char *prompt, + MakePromptFunc func, const char *def) +{ + static Arg dialogArgs[] = { + {XtNlabel, 0}, + {XtNvalue, 0}, + }; + Arg valueArgs[1]; + Arg centerArgs[2]; + Position source_x, source_y; + Position dest_x, dest_y; + Dimension center_width, center_height; + Dimension prompt_width, prompt_height; + Widget valueWidget; + + CancelAction ((Widget)NULL, (XEvent *) 0, (String *) 0, (Cardinal *) 0); + promptShell = XtCreatePopupShell ("promptShell", transientShellWidgetClass, + toplevel, NULL, (Cardinal) 0); + dialogArgs[0].value = (XtArgVal)prompt; + dialogArgs[1].value = (XtArgVal)def; + promptDialog = XtCreateManagedWidget( "promptDialog", dialogWidgetClass, + promptShell, dialogArgs, XtNumber (dialogArgs)); + XawDialogAddButton(promptDialog, "accept", NULL, (XtPointer) 0); + XawDialogAddButton(promptDialog, "cancel", NULL, (XtPointer) 0); + valueWidget = XtNameToWidget (promptDialog, "value"); + if (valueWidget) { + XtSetArg (valueArgs[0], (String)XtNresizable, TRUE); + XtSetValues (valueWidget, valueArgs, 1); + /* + * as resizable isn't set until just above, the + * default value will be displayed incorrectly. + * rectify the situation by resetting the values + */ + XtSetValues (promptDialog, dialogArgs, XtNumber (dialogArgs)); + } + XtSetKeyboardFocus (promptDialog, valueWidget); + XtSetKeyboardFocus (toplevel, valueWidget); + XtRealizeWidget (promptShell); + /* + * place the widget in the center of the "parent" + */ + XtSetArg (centerArgs[0], XtNwidth, ¢er_width); + XtSetArg (centerArgs[1], XtNheight, ¢er_height); + XtGetValues (centerw, centerArgs, 2); + XtSetArg (centerArgs[0], XtNwidth, &prompt_width); + XtSetArg (centerArgs[1], XtNheight, &prompt_height); + XtGetValues (promptShell, centerArgs, 2); + source_x = (center_width - prompt_width) / 2; + source_y = (center_height - prompt_height) / 3; + XtTranslateCoords (centerw, source_x, source_y, &dest_x, &dest_y); + XtSetArg (centerArgs[0], XtNx, dest_x); + XtSetArg (centerArgs[1], XtNy, dest_y); + XtSetValues (promptShell, centerArgs, 2); + XtMapWidget(promptShell); + promptfunction = func; +} + +/* +Local Variables: +c-indent-level: 4 +c-continued-statement-offset: 4 +c-brace-offset: -4 +c-argdecl-indent: 4 +c-label-offset: -4 +c-tab-always-indent: nil +End: +*/ diff --git a/contrib/groff/src/include/DviChar.h b/contrib/groff/src/include/DviChar.h new file mode 100644 index 000000000000..a77f03615a91 --- /dev/null +++ b/contrib/groff/src/include/DviChar.h @@ -0,0 +1,37 @@ +/* + * DviChar.h + * + * descriptions for mapping dvi names to + * font indexes and back. Dvi fonts are all + * 256 elements (actually only 256-32 are usable). + * + * The encoding names are taken from X - + * case insensitive, a dash separating the + * CharSetRegistry from the CharSetEncoding + */ + +# define DVI_MAX_SYNONYMS 10 +# define DVI_MAP_SIZE 256 +# define DVI_HASH_SIZE 256 + +typedef struct _dviCharNameHash { + struct _dviCharNameHash *next; + const char *name; + int position; +} DviCharNameHash; + +typedef struct _dviCharNameMap { + const char *encoding; + int special; + const char *dvi_names[DVI_MAP_SIZE][DVI_MAX_SYNONYMS]; + DviCharNameHash *buckets[DVI_HASH_SIZE]; +} DviCharNameMap; + +DviCharNameMap *DviFindMap (char *); +void DviRegisterMap (DviCharNameMap *); +#ifdef NOTDEF +char *DviCharName (DviCharNameMap *, int, int); +#else +#define DviCharName(map,index,synonym) ((map)->dvi_names[index][synonym]) +#endif +int DviCharIndex (DviCharNameMap *, const char *); diff --git a/contrib/groff/src/include/Makefile.sub b/contrib/groff/src/include/Makefile.sub index 620d34539310..58e1ac981bad 100644 --- a/contrib/groff/src/include/Makefile.sub +++ b/contrib/groff/src/include/Makefile.sub @@ -5,12 +5,14 @@ HDRS=\ color.h \ device.h \ driver.h \ + DviChar.h \ errarg.h \ error.h \ font.h \ geometry.h \ getopt.h \ - groff-getopt.h \ + getopt_int.h \ + gettext.h \ htmlhint.h \ index.h \ lib.h \ @@ -20,9 +22,13 @@ HDRS=\ printer.h \ ptable.h \ refid.h \ + relocate.h \ search.h \ searchpath.h \ - stringclass.h + stringclass.h \ + symbol.h \ + unicode.h \ + XFontName.h GENHDRS=defs.h all depend: $(GENHDRS) @@ -31,6 +37,7 @@ defs.h: FORCE @$(SHELL) $(top_srcdir)/gendef.sh defs.h \ "PROG_PREFIX=\"$(g)\"" \ "DEVICE=\"$(DEVICE)\"" \ + "INSTALLPATH=\"$(prefix)\"" \ "BINPATH=\"$(bindir)\"" \ "FONTPATH=\"$(fontpath)\"" \ "MACROPATH=\"$(tmacpath)\"" \ diff --git a/contrib/groff/src/include/XFontName.h b/contrib/groff/src/include/XFontName.h new file mode 100644 index 000000000000..4e9c6944efe7 --- /dev/null +++ b/contrib/groff/src/include/XFontName.h @@ -0,0 +1,50 @@ +typedef struct _xFontName { + char Registry[256]; + char Foundry[256]; + char FamilyName[256]; + char WeightName[256]; + char Slant[3]; + char SetwidthName[256]; + char AddStyleName[256]; + unsigned int PixelSize; + unsigned int PointSize; + unsigned int ResolutionX; + unsigned int ResolutionY; + char Spacing[2]; + unsigned int AverageWidth; + char CharSetRegistry[256]; + char CharSetEncoding[256]; +} XFontName; + +#define FontNameRegistry (1<<0) +#define FontNameFoundry (1<<1) +#define FontNameFamilyName (1<<2) +#define FontNameWeightName (1<<3) +#define FontNameSlant (1<<4) +#define FontNameSetwidthName (1<<5) +#define FontNameAddStyleName (1<<6) +#define FontNamePixelSize (1<<7) +#define FontNamePointSize (1<<8) +#define FontNameResolutionX (1<<9) +#define FontNameResolutionY (1<<10) +#define FontNameSpacing (1<<11) +#define FontNameAverageWidth (1<<12) +#define FontNameCharSetRegistry (1<<13) +#define FontNameCharSetEncoding (1<<14) + +#define SlantRoman "R" +#define SlantItalic "I" +#define SlantOblique "O" +#define SlantReverseItalic "RI" +#define SlantReverseOblique "RO" + +#define SpacingMonoSpaced "M" +#define SpacingProportional "P" +#define SpacingCharacterCell "C" + +typedef char *XFontNameString; + +Bool XParseFontName (XFontNameString, XFontName *, unsigned int *); +Bool XFormatFontName (XFontName *, unsigned int, XFontNameString); +Bool XCompareFontName (XFontName *, XFontName *, unsigned int); +Bool XCopyFontName (XFontName *, XFontName *, unsigned int); diff --git a/contrib/groff/src/include/assert.h b/contrib/groff/src/include/assert.h index 18d9c2623eda..76b3b203a920 100644 --- a/contrib/groff/src/include/assert.h +++ b/contrib/groff/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/src/include/cmap.h b/contrib/groff/src/include/cmap.h index 1537d4627d7b..d786829d2ffa 100644 --- a/contrib/groff/src/include/cmap.h +++ b/contrib/groff/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/src/include/color.h b/contrib/groff/src/include/color.h index 205f70ef4c44..52f97c64586a 100644 --- a/contrib/groff/src/include/color.h +++ b/contrib/groff/src/include/color.h @@ -21,9 +21,10 @@ 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" enum color_scheme {DEFAULT, CMY, CMYK, RGB, GRAY}; @@ -38,8 +39,9 @@ private: const size_t); public: + symbol nm; enum {MAX_COLOR_VAL = 0xffff}; - color() : scheme(DEFAULT){} + color(symbol s = default_symbol) : scheme(DEFAULT), nm(s) {} color(const color * const); ~color(); void *operator new(size_t); diff --git a/contrib/groff/src/include/config.hin b/contrib/groff/src/include/config.hin index 13a3630d7cfe..5f871aaa9562 100644 --- a/contrib/groff/src/include/config.hin +++ b/contrib/groff/src/include/config.hin @@ -3,14 +3,21 @@ /* 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 + +/* Define to 1 if you have the header file. */ +#undef HAVE_DIRECT_H /* Define to 1 if you have the header file. */ #undef HAVE_DIRENT_H @@ -33,6 +40,9 @@ /* Define to 1 if you have the `isatty' function. */ #undef HAVE_ISATTY +/* Define to 1 if you have the `kill' function. */ +#undef HAVE_KILL + /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H @@ -48,6 +58,9 @@ /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP +/* Define to 1 if you have the header file. */ +#undef HAVE_PROCESS_H + /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV @@ -93,10 +106,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_DIR_H -/* Define if you have sys_errlist in or in . */ +/* Define if you have sys_errlist in , , or . */ #undef HAVE_SYS_ERRLIST -/* Define if you have sysnerr in or . */ +/* Define if you have sys_nerr in , , or . */ #undef HAVE_SYS_NERR /* Define to 1 if you have the header file. */ @@ -111,6 +124,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the `vsnprintf' function. */ +#undef HAVE_VSNPRINTF + /* Define if the host's encoding is EBCDIC. */ #undef IS_EBCDIC_HOST @@ -147,6 +163,12 @@ /* Define if your C++ doesn't declare strncasecmp(). */ #undef NEED_DECLARATION_STRNCASECMP +/* Define if your C++ doesn't declare vfprintf(). */ +#undef NEED_DECLARATION_VFPRINTF + +/* Define if your C++ doesn't declare vsnprintf(). */ +#undef NEED_DECLARATION_VSNPRINTF + /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT @@ -174,9 +196,6 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Define to 1 if `sys_siglist' is declared by or . */ -#undef SYS_SIGLIST_DECLARED - /* Define if your C++ compiler uses a traditional (Reiser) preprocessor. */ #undef TRADITIONAL_CPP @@ -184,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/src/include/cset.h b/contrib/groff/src/include/cset.h index b3a1a976139e..a241c00280ae 100644 --- a/contrib/groff/src/include/cset.h +++ b/contrib/groff/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/src/include/device.h b/contrib/groff/src/include/device.h index 341af8d2a70f..ecafc26c3ca3 100644 --- a/contrib/groff/src/include/device.h +++ b/contrib/groff/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/src/include/driver.h b/contrib/groff/src/include/driver.h index b15d6c9914fd..f6804efffb12 100644 --- a/contrib/groff/src/include/driver.h +++ b/contrib/groff/src/include/driver.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003 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" diff --git a/contrib/groff/src/include/errarg.h b/contrib/groff/src/include/errarg.h index 08af44ae21cb..1aa191a4e487 100644 --- a/contrib/groff/src/include/errarg.h +++ b/contrib/groff/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/src/include/error.h b/contrib/groff/src/include/error.h index e227682bfa3e..b9d48d0a72e8 100644 --- a/contrib/groff/src/include/error.h +++ b/contrib/groff/src/include/error.h @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2003, 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. */ extern void fatal_with_file_and_line(const char *filename, int lineno, const char *format, @@ -52,7 +53,7 @@ extern void warning(const char *, const errarg &arg3 = empty_errarg); -extern const char *program_name; +extern "C" const char *program_name; extern int current_lineno; extern const char *current_filename; extern const char *current_source_filename; diff --git a/contrib/groff/src/include/font.h b/contrib/groff/src/include/font.h index 43bf12137bf0..3ef4fed458ab 100644 --- a/contrib/groff/src/include/font.h +++ b/contrib/groff/src/include/font.h @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 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. */ typedef void (*FONT_COMMAND_HANDLER)(const char *, const char *, const char *, int); @@ -53,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(); @@ -76,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; @@ -87,7 +91,7 @@ private: unsigned ligatures; font_kern_list **kern_hash_table; int space_width; - short *ch_index; + int *ch_index; int nindices; font_char_metric *ch; int ch_used; @@ -116,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/src/include/geometry.h b/contrib/groff/src/include/geometry.h index d425f157ece1..1ce0df031fc5 100644 --- a/contrib/groff/src/include/geometry.h +++ b/contrib/groff/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/src/include/getopt.h b/contrib/groff/src/include/getopt.h index 4283c35b168a..a4e78cb06bfe 100644 --- a/contrib/groff/src/include/getopt.h +++ b/contrib/groff/src/include/getopt.h @@ -1,21 +1,21 @@ /* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc. + Copyright (C) 1989-1994,1996-1999,2001,2003,2004 + 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program 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. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + 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 Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GETOPT_H @@ -23,6 +23,64 @@ # define _GETOPT_H 1 #endif +/* Standalone applications should #define __GETOPT_PREFIX to an + identifier that prefixes the external functions and variables + defined in this header. When this happens, include the + headers that might declare getopt so that they will not cause + confusion if included after this file. Then systematically rename + identifiers so that they do not collide with the system functions + and variables. Renaming avoids problems with some compilers and + linkers. */ +#if defined __GETOPT_PREFIX && !defined __need_getopt +# include +# include +# if HAVE_UNISTD_H +# include +# endif +# undef __need_getopt +# undef getopt +# undef getopt_long +# undef getopt_long_only +# undef optarg +# undef opterr +# undef optind +# undef optopt +# define __GETOPT_CONCAT(x, y) x ## y +# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) +# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) +# define getopt __GETOPT_ID (getopt) +# define getopt_long __GETOPT_ID (getopt_long) +# define getopt_long_only __GETOPT_ID (getopt_long_only) +# define optarg __GETOPT_ID (optarg) +# define opterr __GETOPT_ID (opterr) +# define optind __GETOPT_ID (optind) +# define optopt __GETOPT_ID (optopt) +#endif + +/* Standalone applications get correct prototypes for getopt_long and + getopt_long_only; they declare "char **argv". libc uses prototypes + with "char *const *argv" that are incorrect because getopt_long and + getopt_long_only can permute argv; this is required for backward + compatibility (e.g., for LSB 2.0.1). + + This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt', + but it caused redefinition warnings if both unistd.h and getopt.h were + included, since unistd.h includes getopt.h having previously defined + __need_getopt. + + The only place where __getopt_argv_const is used is in definitions + of getopt_long and getopt_long_only below, but these are visible + only if __need_getopt is not defined, so it is quite safe to rewrite + the conditional as follows: +*/ +#if !defined __need_getopt +# if defined __GETOPT_PREFIX +# define __getopt_argv_const /* empty */ +# else +# define __getopt_argv_const const +# endif +#endif + /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include , but @@ -34,6 +92,17 @@ # include #endif +#ifndef __THROW +# ifndef __GNUC_PREREQ +# define __GNUC_PREREQ(maj, min) (0) +# endif +# if defined __cplusplus && __GNUC_PREREQ (2,8) +# define __THROW throw () +# else +# define __THROW +# endif +#endif + #ifdef __cplusplus extern "C" { #endif @@ -78,7 +147,7 @@ extern int optopt; The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. + optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but @@ -93,11 +162,7 @@ extern int optopt; struct option { -# if (defined __STDC__ && __STDC__) || defined __cplusplus const char *name; -# else - char *name; -# endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; @@ -137,39 +202,20 @@ struct option arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ -#if (defined __STDC__ && __STDC__) || defined __cplusplus -# ifdef __GNU_LIBRARY__ -/* Many other libraries have conflicting prototypes for getopt, with - differences in the consts, in stdlib.h. To avoid compilation - errors, only prototype getopt for the GNU C library. */ -extern int getopt (int ___argc, char *const *___argv, const char *__shortopts); -# else /* not __GNU_LIBRARY__ */ -extern int getopt (); -# endif /* __GNU_LIBRARY__ */ +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + __THROW; -# ifndef __need_getopt -extern int getopt_long (int ___argc, char *const *___argv, +#ifndef __need_getopt +extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, - const struct option *__longopts, int *__longind); -extern int getopt_long_only (int ___argc, char *const *___argv, + const struct option *__longopts, int *__longind) + __THROW; +extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, - const struct option *__longopts, int *__longind); + const struct option *__longopts, int *__longind) + __THROW; -/* Internal only. Users should not call this directly. */ -extern int _getopt_internal (int ___argc, char *const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - int __long_only); -# endif -#else /* not __STDC__ */ -extern int getopt (); -# ifndef __need_getopt -extern int getopt_long (); -extern int getopt_long_only (); - -extern int _getopt_internal (); -# endif -#endif /* __STDC__ */ +#endif #ifdef __cplusplus } diff --git a/contrib/groff/src/include/getopt_int.h b/contrib/groff/src/include/getopt_int.h new file mode 100644 index 000000000000..401579fd2898 --- /dev/null +++ b/contrib/groff/src/include/getopt_int.h @@ -0,0 +1,131 @@ +/* Internal declarations for getopt. + Copyright (C) 1989-1994,1996-1999,2001,2003,2004 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + + This program 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. + + This program 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 this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _GETOPT_INT_H +#define _GETOPT_INT_H 1 + +extern int _getopt_internal (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + int __long_only, int __posixly_correct); + + +/* Reentrant versions which can handle parsing multiple argument + vectors at the same time. */ + +/* Data type for reentrant functions. */ +struct _getopt_data +{ + /* These have exactly the same meaning as the corresponding global + variables, except that they are used for the reentrant + versions of getopt. */ + int optind; + int opterr; + int optopt; + char *optarg; + + /* Internal members. */ + + /* True if the internal members have been initialized. */ + int __initialized; + + /* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + char *__nextchar; + + /* Describe how to deal with options that follow non-option ARGV-elements. + + If the caller did not specify anything, + the default is REQUIRE_ORDER if the environment variable + POSIXLY_CORRECT is defined, PERMUTE otherwise. + + REQUIRE_ORDER means don't recognize them as options; + stop option processing when the first non-option is seen. + This is what Unix does. + This mode of operation is selected by either setting the environment + variable POSIXLY_CORRECT, or using `+' as the first character + of the list of option characters, or by calling getopt. + + PERMUTE is the default. We permute the contents of ARGV as we + scan, so that eventually all the non-options are at the end. + This allows options to be given in any order, even with programs + that were not written to expect this. + + RETURN_IN_ORDER is an option available to programs that were + written to expect options and other ARGV-elements in any order + and that care about the ordering of the two. We describe each + non-option ARGV-element as if it were the argument of an option + with character code 1. Using `-' as the first character of the + list of option characters selects this mode of operation. + + The special argument `--' forces an end of option-scanning regardless + of the value of `ordering'. In the case of RETURN_IN_ORDER, only + `--' can cause `getopt' to return -1 with `optind' != ARGC. */ + + enum + { + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER + } __ordering; + + /* If the POSIXLY_CORRECT environment variable is set + or getopt was called. */ + int __posixly_correct; + + + /* Handle permutation of arguments. */ + + /* Describe the part of ARGV that contains non-options that have + been skipped. `first_nonopt' is the index in ARGV of the first + of them; `last_nonopt' is the index after the last of them. */ + + int __first_nonopt; + int __last_nonopt; + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + int __nonoption_flags_max_len; + int __nonoption_flags_len; +# endif +}; + +/* The initializer is necessary to set OPTIND and OPTERR to their + default values and to clear the initialization flag. */ +#define _GETOPT_DATA_INITIALIZER { 1, 1 } + +extern int _getopt_internal_r (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + int __long_only, int __posixly_correct, + struct _getopt_data *__data); + +extern int _getopt_long_r (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + struct _getopt_data *__data); + +extern int _getopt_long_only_r (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, + int *__longind, + struct _getopt_data *__data); + +#endif /* getopt_int.h */ diff --git a/contrib/groff/src/include/gettext.h b/contrib/groff/src/include/gettext.h new file mode 100644 index 000000000000..26fd2c5703a5 --- /dev/null +++ b/contrib/groff/src/include/gettext.h @@ -0,0 +1,4 @@ +/* This is a dummy header file to make getopt compile without gettext + support. */ + +#define gettext(s) s diff --git a/contrib/groff/src/include/html-strings.h b/contrib/groff/src/include/html-strings.h index fd757c3fd256..26daeb6cfde8 100644 --- a/contrib/groff/src/include/html-strings.h +++ b/contrib/groff/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/src/include/htmlhint.h b/contrib/groff/src/include/htmlhint.h index f1f46f7282a2..e0b41dd7157a 100644 --- a/contrib/groff/src/include/htmlhint.h +++ b/contrib/groff/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/src/include/index.h b/contrib/groff/src/include/index.h index 7e6081381c2e..c90610e67dd1 100644 --- a/contrib/groff/src/include/index.h +++ b/contrib/groff/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/src/include/lib.h b/contrib/groff/src/include/lib.h index bebad98ea3d4..bb59337fc989 100644 --- a/contrib/groff/src/include/lib.h +++ b/contrib/groff/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,18 +32,8 @@ extern "C" { const char *if_to_a(int, int); } -/* stdio.h on IRIX, OSF/1, emx, and UWIN include getopt.h */ -/* unistd.h on CYGWIN includes getopt.h */ - -#if !(defined(__sgi) \ - || (defined(__osf__) && defined(__alpha)) \ - || defined(_UWIN) \ - || defined(__EMX__) \ - || defined(__CYGWIN__)) -#include -#else +#define __GETOPT_PREFIX groff_ #include -#endif #ifdef HAVE_SETLOCALE #include @@ -52,6 +43,7 @@ extern "C" { char *strsave(const char *s); int is_prime(unsigned); +double groff_hypot(double, double); #include #include @@ -59,13 +51,21 @@ int is_prime(unsigned); #include #endif -/* HP-UX 10.20 doesn't declare snprintf() */ -#if !defined(HAVE_SNPRINTF) || defined(NEED_DECLARATION_SNPRINTF) #include -extern "C" { - int snprintf(char *, size_t, const char *, /*args*/ ...); - int vsnprintf(char *, size_t, const char *, va_list); -} + +/* HP-UX 10.20 and LynxOS 4.0.0 don't declare snprintf() */ +#if !defined(HAVE_SNPRINTF) || defined(NEED_DECLARATION_SNPRINTF) +extern "C" { int snprintf(char *, size_t, const char *, /*args*/ ...); } +#endif + +/* LynxOS 4.0.0 has snprintf() but no vsnprintf() */ +#if !defined(HAVE_VSNPRINTF) || defined(NEED_DECLARATION_VSNPRINTF) +extern "C" { int vsnprintf(char *, size_t, const char *, va_list); } +#endif + +/* LynxOS 4.0.0 doesn't declare vfprintf() */ +#ifdef NEED_DECLARATION_VFPRINTF +extern "C" { int vfprintf(FILE *, const char *, va_list); } #endif #ifndef HAVE_MKSTEMP @@ -90,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); @@ -102,29 +103,21 @@ inline int invalid_input_char(int c) #ifdef HAVE_STRCASECMP #ifdef NEED_DECLARATION_STRCASECMP -extern "C" { - // Ultrix4.3's string.h fails to declare this. - int strcasecmp(const char *, const char *); -} +// Ultrix4.3's string.h fails to declare this. +extern "C" { int strcasecmp(const char *, const char *); } #endif /* NEED_DECLARATION_STRCASECMP */ #else /* not HAVE_STRCASECMP */ -extern "C" { - int strcasecmp(const char *, const char *); -} +extern "C" { int strcasecmp(const char *, const char *); } #endif /* HAVE_STRCASECMP */ #if !defined(_AIX) && !defined(sinix) && !defined(__sinix__) #ifdef HAVE_STRNCASECMP #ifdef NEED_DECLARATION_STRNCASECMP -extern "C" { - // SunOS's string.h fails to declare this. - int strncasecmp(const char *, const char *, int); -} +// SunOS's string.h fails to declare this. +extern "C" { int strncasecmp(const char *, const char *, int); } #endif /* NEED_DECLARATION_STRNCASECMP */ #else /* not HAVE_STRNCASECMP */ -extern "C" { - int strncasecmp(const char *, const char *, size_t); -} +extern "C" { int strncasecmp(const char *, const char *, size_t); } #endif /* HAVE_STRNCASECMP */ #endif /* !_AIX && !sinix && !__sinix__ */ diff --git a/contrib/groff/src/include/macropath.h b/contrib/groff/src/include/macropath.h index b4a2bd0cadaa..3b38baa02629 100644 --- a/contrib/groff/src/include/macropath.h +++ b/contrib/groff/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/src/include/nonposix.h b/contrib/groff/src/include/nonposix.h index 73422d92d8f0..9564a8b764b3 100644 --- a/contrib/groff/src/include/nonposix.h +++ b/contrib/groff/src/include/nonposix.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2000, 2001, 2002, 2003 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,10 +16,12 @@ 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. */ + systems, such as MS-DOS, MS-Windows, etc. It should be loaded after + the system headers like stdio.h to protect against warnings and error + messages w.r.t. redefining macros. */ #if defined _MSC_VER # ifndef _WIN32 @@ -29,31 +32,48 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #if defined(__MSDOS__) || defined(__EMX__) \ || (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN__)) -/* Binary I/O nuisances. Note: "setmode" is right for DJGPP and - Borland; Windows compilers might need _setmode or some such. */ +/* Binary I/O nuisances. */ # include # include # ifdef HAVE_UNISTD_H # include # endif -# ifdef _MSC_VER -# define POPEN_RT "rt" -# define POPEN_WT "wt" -# define popen(c,m) _popen(c,m) -# define pclose(p) _pclose(p) -# define getpid() (1) -# define mkdir(p,m) _mkdir(p) -# define setmode(f,m) _setmode(f,m) -# define WAIT(s,p,m) _cwait(s,p,m) -# define creat(p,m) _creat(p,m) +# ifndef STDIN_FILENO +# define STDIN_FILENO 0 +# define STDOUT_FILENO 1 +# define STDERR_FILENO 2 # endif -# define SET_BINARY(f) do {if (!isatty(f)) setmode(f,O_BINARY);} while(0) -# define FOPEN_RB "rb" -# define FOPEN_WB "wb" -# define FOPEN_RWB "wb+" +# ifdef HAVE_DIRECT_H +# include +# endif +# ifdef HAVE_PROCESS_H +# include +# endif +# if defined(_MSC_VER) || defined(__MINGW32__) +# define POPEN_RT "rt" +# define POPEN_WT "wt" +# define popen(c,m) _popen(c,m) +# define pclose(p) _pclose(p) +# define pipe(pfd) _pipe((pfd),0,_O_BINARY|_O_NOINHERIT) +# define mkdir(p,m) _mkdir(p) +# define setmode(f,m) _setmode(f,m) +# define WAIT(s,p,m) _cwait(s,p,m) +# define creat(p,m) _creat(p,m) +# define read(f,b,s) _read(f,b,s) +# define write(f,b,s) _write(f,b,s) +# define dup(f) _dup(f) +# 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" +# define FOPEN_WB "wb" +# define FOPEN_RWB "wb+" # ifndef O_BINARY # ifdef _O_BINARY -# define O_BINARY (_O_BINARY) +# define O_BINARY (_O_BINARY) # endif # endif @@ -61,96 +81,151 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ systems don't have standard places where it lives, and might not have it installed to begin with. We want to give them some leeway. */ # ifdef __EMX__ -# define getcwd(b,s) _getcwd2(b,s) +# define getcwd(b,s) _getcwd2(b,s) # else -# define BSHELL (system_shell_name()) -# define BSHELL_DASH_C (system_shell_dash_c()) -# define IS_BSHELL(s) (is_system_shell(s)) +# define BSHELL (system_shell_name()) +# define BSHELL_DASH_C (system_shell_dash_c()) +# define IS_BSHELL(s) (is_system_shell(s)) # endif /* The separator for directories in PATH and other environment variables. */ -# define PATH_SEP ";" +# define PATH_SEP ";" +# define PATH_SEP_CHAR ';' /* Characters that separate directories in a path name. */ -# define DIR_SEPS "/\\:" +# define DIR_SEPS "/\\:" /* How to tell if the argument is an absolute file name. */ # define IS_ABSOLUTE(f) \ ((f)[0] == '/' || (f)[0] == '\\' || (f)[0] && (f)[1] == ':') /* The executable extension. */ -# define EXE_EXT ".exe" +# define EXE_EXT ".exe" + +/* Possible executable extensions. */ +# define PATH_EXT ".com;.exe;.bat;.cmd" /* The system null device. */ -# define NULL_DEV "NUL" +# define NULL_DEV "NUL" + +/* The default place to create temporary files. */ +# ifndef P_tmpdir +# ifdef _P_tmpdir +# define P_tmpdir _P_tmpdir +# else +# define P_tmpdir "c:/temp" +# endif +# endif /* Prototypes. */ # ifdef __cplusplus extern "C" { # endif - const char * system_shell_name(void); + char * system_shell_name(void); const char * system_shell_dash_c(void); - int is_system_shell(const char *); + int is_system_shell(const char *); # ifdef __cplusplus } # endif #endif +#if defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN__) +/* Win32 implementations which use the Microsoft runtime library + * are prone to hanging when a pipe reader quits with unread data in the pipe. + * `gtroff' avoids this, by invoking `FLUSH_INPUT_PIPE()', defined as ... */ +# define FLUSH_INPUT_PIPE(fd) \ + do if (!isatty(fd)) \ + { \ + char drain[BUFSIZ]; \ + while (read(fd, drain, sizeof(drain)) > 0) \ + ; \ + } while (0) + +/* The Microsoft runtime library also has a broken argument passing mechanism, + * which may result in improper grouping of arguments passed to a child process + * by the `spawn()' family of functions. In `groff', only the `spawnvp()' + * function is affected; we work around this defect, by substituting a + * wrapper function in place of `spawnvp()' calls. */ + +# ifdef __cplusplus + extern "C" { +# endif + int spawnvp_wrapper(int, char *, char **); +# ifdef __cplusplus + } +# endif +# ifndef SPAWN_FUNCTION_WRAPPERS +# undef spawnvp +# define spawnvp spawnvp_wrapper +# undef _spawnvp +# define _spawnvp spawnvp +# endif /* SPAWN_FUNCTION_WRAPPERS */ + +#else +/* Other implementations do not suffer from Microsoft runtime bugs, + * but `gtroff' requires a dummy definition for FLUSH_INPUT_PIPE() */ +# define FLUSH_INPUT_PIPE(fd) do {} while(0) +#endif + /* Defaults, for Posix systems. */ #ifndef SET_BINARY -# define SET_BINARY(f) do {} while(0) +# define SET_BINARY(f) do {} while(0) #endif #ifndef FOPEN_RB -# define FOPEN_RB "r" +# define FOPEN_RB "r" #endif #ifndef FOPEN_WB -# define FOPEN_WB "w" +# define FOPEN_WB "w" #endif #ifndef FOPEN_RWB -# define FOPEN_RWB "w+" +# define FOPEN_RWB "w+" #endif #ifndef POPEN_RT -# define POPEN_RT "r" +# define POPEN_RT "r" #endif #ifndef POPEN_WT -# define POPEN_WT "w" +# define POPEN_WT "w" #endif #ifndef O_BINARY -# define O_BINARY 0 +# define O_BINARY 0 #endif #ifndef BSHELL -# define BSHELL "/bin/sh" +# define BSHELL "/bin/sh" #endif #ifndef BSHELL_DASH_C -# define BSHELL_DASH_C "-c" +# define BSHELL_DASH_C "-c" #endif #ifndef IS_BSHELL -# define IS_BSHELL(s) ((s) && strcmp(s,BSHELL) == 0) +# define IS_BSHELL(s) ((s) && strcmp(s,BSHELL) == 0) #endif #ifndef PATH_SEP -# define PATH_SEP ":" +# define PATH_SEP ":" +# define PATH_SEP_CHAR ':' #endif #ifndef DIR_SEPS -# define DIR_SEPS "/" +# define DIR_SEPS "/" #endif #ifndef IS_ABSOLUTE -# define IS_ABSOLUTE(f) ((f)[0] == '/') +# define IS_ABSOLUTE(f) ((f)[0] == '/') #endif #ifndef EXE_EXT -# define EXE_EXT "" +# define EXE_EXT "" +#endif +#ifndef PATH_EXT +# define PATH_EXT "" #endif #ifndef NULL_DEV -# define NULL_DEV "/dev/null" +# define NULL_DEV "/dev/null" #endif #ifndef GS_NAME -# define GS_NAME "gs" +# define GS_NAME "gs" #endif #ifndef WAIT -# define WAIT(s,p,m) wait(s) +# define WAIT(s,p,m) wait(s) #endif #ifndef _WAIT_CHILD -# define _WAIT_CHILD 0 +# define _WAIT_CHILD 0 #endif diff --git a/contrib/groff/src/include/paper.h b/contrib/groff/src/include/paper.h index 7a01fc2bf221..e88965d1dec0 100644 --- a/contrib/groff/src/include/paper.h +++ b/contrib/groff/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/src/include/posix.h b/contrib/groff/src/include/posix.h index e7f38cd1bc11..28b807c7c2f0 100644 --- a/contrib/groff/src/include/posix.h +++ b/contrib/groff/src/include/posix.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1992, 2000, 2001 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/src/include/printer.h b/contrib/groff/src/include/printer.h index 3976215b72a2..fb39f48965ff 100644 --- a/contrib/groff/src/include/printer.h +++ b/contrib/groff/src/include/printer.h @@ -2,12 +2,12 @@ // /src/include/printer.h -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003 +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 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 @@ -49,7 +49,7 @@ struct environment { color *fill; }; -struct font; +class font; struct font_pointer_list { font *p; @@ -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/src/include/ptable.h b/contrib/groff/src/include/ptable.h index ffbe8e6f9ebf..b2881872a36b 100644 --- a/contrib/groff/src/include/ptable.h +++ b/contrib/groff/src/include/ptable.h @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2003, 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 #include @@ -43,7 +44,7 @@ struct PASSOC(T) { \ PASSOC(T)(); \ }; \ \ -struct PTABLE(T); \ +class PTABLE(T); \ \ class PTABLE_ITERATOR(T) { \ PTABLE(T) *p; \ diff --git a/contrib/groff/src/include/refid.h b/contrib/groff/src/include/refid.h index 605427e9af9b..84e5119f3063 100644 --- a/contrib/groff/src/include/refid.h +++ b/contrib/groff/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/src/include/relocate.h b/contrib/groff/src/include/relocate.h new file mode 100644 index 000000000000..0d9edc4c17b5 --- /dev/null +++ b/contrib/groff/src/include/relocate.h @@ -0,0 +1,27 @@ +// -*- C++ -*- +/* Provide relocation for macro and font files. + Copyright (C) 2005 Free Software Foundation, Inc. + + This program 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, or (at your option) + any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, + USA. */ + +extern char *curr_prefix; +extern size_t curr_prefix_len; + +void set_current_prefix (); +char *xdirname (char *s); +char *searchpath (const char *name, const char *pathp); +char *relocatep (const char *path); +char *relocate (const char *path); diff --git a/contrib/groff/src/include/search.h b/contrib/groff/src/include/search.h index 260410e2372b..3dde8944f099 100644 --- a/contrib/groff/src/include/search.h +++ b/contrib/groff/src/include/search.h @@ -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,10 @@ 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 search_item; -struct search_item_iterator; +class search_item; +class search_item_iterator; class search_list { public: @@ -34,7 +34,7 @@ private: friend class search_list_iterator; }; -struct bmpattern; +class bmpattern; class linear_searcher { const char *ignore_fields; diff --git a/contrib/groff/src/include/searchpath.h b/contrib/groff/src/include/searchpath.h index 4d89a8d04f1d..dab161e61ef9 100644 --- a/contrib/groff/src/include/searchpath.h +++ b/contrib/groff/src/include/searchpath.h @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2003 + 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 search_path { char *dirs; @@ -27,4 +28,5 @@ public: ~search_path(); void command_line_dir(const char *); FILE *open_file(const char *, char **); + FILE *open_file_cautious(const char *, char ** = 0, const char * = 0); }; diff --git a/contrib/groff/src/include/stringclass.h b/contrib/groff/src/include/stringclass.h index c6295b00f686..fb3299ce90ad 100644 --- a/contrib/groff/src/include/stringclass.h +++ b/contrib/groff/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/src/include/symbol.h b/contrib/groff/src/include/symbol.h new file mode 100644 index 000000000000..c3cc8eea63a8 --- /dev/null +++ b/contrib/groff/src/include/symbol.h @@ -0,0 +1,83 @@ +// -*- C++ -*- +/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2004 + Free Software Foundation, Inc. + Written by James Clark (jjc@jclark.com) + +This file is part of groff. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +groff is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License along +with groff; see the file COPYING. If not, write to the Free Software +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#define DONT_STORE 1 +#define MUST_ALREADY_EXIST 2 + +class symbol { + static const char **table; + static int table_used; + static int table_size; + static char *block; + static int block_size; + const char *s; +public: + symbol(const char *p, int how = 0); + symbol(); + unsigned long hash() const; + int operator ==(symbol) const; + int operator !=(symbol) const; + const char *contents() const; + int is_null() const; + int is_empty() const; +}; + + +extern const symbol NULL_SYMBOL; +extern const symbol EMPTY_SYMBOL; + +inline symbol::symbol() : s(0) +{ +} + +inline int symbol::operator==(symbol p) const +{ + return s == p.s; +} + +inline int symbol::operator!=(symbol p) const +{ + return s != p.s; +} + +inline unsigned long symbol::hash() const +{ + return (unsigned long)s; +} + +inline const char *symbol::contents() const +{ + return s; +} + +inline int symbol::is_null() const +{ + return s == 0; +} + +inline int symbol::is_empty() const +{ + return s != 0 && *s == 0; +} + +symbol concat(symbol, symbol); + +extern symbol default_symbol; diff --git a/contrib/groff/src/include/unicode.h b/contrib/groff/src/include/unicode.h new file mode 100644 index 000000000000..90dab113dfea --- /dev/null +++ b/contrib/groff/src/include/unicode.h @@ -0,0 +1,26 @@ +// -*- C++ -*- +/* Copyright (C) 2002, 2003 + Free Software Foundation, Inc. + Written by Werner Lemberg + +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. */ + +const char *glyph_name_to_unicode(const char *); +const char *unicode_to_glyph_name(const char *); +const char *decompose_unicode(const char *); + +const char *check_unicode_name(const char *); diff --git a/contrib/groff/src/libs/libbib/common.cpp b/contrib/groff/src/libs/libbib/common.cpp index 4b2bcca23e21..9d16e7a0681f 100644 --- a/contrib/groff/src/libs/libbib/common.cpp +++ b/contrib/groff/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/src/libs/libbib/index.cpp b/contrib/groff/src/libs/libbib/index.cpp index 3633df1c78e3..6b9b9e350efe 100644 --- a/contrib/groff/src/libs/libbib/index.cpp +++ b/contrib/groff/src/libs/libbib/index.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 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 "lib.h" @@ -349,7 +350,7 @@ int index_search_item_iterator::next(const linear_searcher &, } int index_search_item_iterator::get_tag(int tagno, - const linear_searcher &searcher, + const linear_searcher &searchr, const char **pp, int *lenp, reference_id *ridp) { @@ -389,7 +390,6 @@ int index_search_item_iterator::get_tag(int tagno, int length = tp->length; int err = 0; if (length == 0) { - struct stat sb; if (fstat(fileno(fp), &sb) < 0) { error("can't stat `%1': %2", filename, strerror(errno)); err = 1; @@ -426,7 +426,7 @@ int index_search_item_iterator::get_tag(int tagno, buf[didx] = buf[sidx]; } buf[length + 1] = '\n'; - res = searcher.search(buf + 1, buf + 2 + length, pp, lenp); + res = searchr.search(buf + 1, buf + 2 + length, pp, lenp); if (res && ridp) *ridp = reference_id(indx->filename_id + tp->filename_index, tp->start); diff --git a/contrib/groff/src/libs/libbib/linear.cpp b/contrib/groff/src/libs/libbib/linear.cpp index 1dd902b84dea..c1919ab7d63a 100644 --- a/contrib/groff/src/libs/libbib/linear.cpp +++ b/contrib/groff/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/src/libs/libbib/map.c b/contrib/groff/src/libs/libbib/map.c index 4d878a24fc2c..f45625d94b5a 100644 --- a/contrib/groff/src/libs/libbib/map.c +++ b/contrib/groff/src/libs/libbib/map.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2004 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 @@ -34,11 +34,13 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define MAP_FILE 0 #endif -char *mapread(fd, nbytes) - int fd; - int nbytes; +#ifdef __cplusplus +extern "C" { +#endif + +char *mapread(int fd, int nbytes) { - char *p = (char *)mmap((caddr_t)0, (size_t)nbytes, PROT_READ, + char *p = (char *)mmap((void *)0, (size_t)nbytes, PROT_READ, MAP_FILE|MAP_PRIVATE, fd, (off_t)0); if (p == (char *)-1) return 0; @@ -48,31 +50,37 @@ char *mapread(fd, nbytes) return p; } -int unmap(p, len) - char *p; - int len; +int unmap(char *p, int len) { - return munmap((caddr_t)p, len); + return munmap((void *)p, len); } +#ifdef __cplusplus +} +#endif + #else /* not HAVE_MMAP */ #include -char *mapread(fd, nbytes) - int fd; - int nbytes; +#ifdef __cplusplus +extern "C" { +#endif + +char *mapread(int fd, int nbytes) { errno = ENODEV; return 0; } -int unmap(p, len) - char *p; - int len; +int unmap(char *p, int len) { errno = EINVAL; return -1; } +#ifdef __cplusplus +} +#endif + #endif /* not HAVE_MMAP */ diff --git a/contrib/groff/src/libs/libbib/search.cpp b/contrib/groff/src/libs/libbib/search.cpp index 2223fb643c22..4ed0baa5bff1 100644 --- a/contrib/groff/src/libs/libbib/search.cpp +++ b/contrib/groff/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/src/libs/libdriver/input.cpp b/contrib/groff/src/libs/libdriver/input.cpp index acb6f13741af..bf8a74e1066c 100644 --- a/contrib/groff/src/libs/libdriver/input.cpp +++ b/contrib/groff/src/libs/libdriver/input.cpp @@ -2,13 +2,13 @@ // /src/libs/libdriver/input.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) 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. @@ -442,7 +441,7 @@ EnvStack::EnvStack(void) { num_allocated = 4; // allocate pointer to array of num_allocated pointers to environment - data = (environment **) malloc(envp_size * num_allocated); + data = (environment **)malloc(envp_size * num_allocated); if (data == 0) fatal("could not allocate environment data"); num_stored = 0; @@ -475,7 +474,7 @@ EnvStack::push(environment *e) if (num_stored >= num_allocated) { environment **old_data = data; num_allocated *= 2; - data = (environment **) malloc(envp_size * num_allocated); + data = (environment **)malloc(envp_size * num_allocated); if (data == 0) fatal("could not allocate data"); for (size_t i = 0; i < num_stored; i++) @@ -608,6 +607,7 @@ void delete_current_env(void) delete current_env->col; delete current_env->fill; delete current_env; + current_env = 0; } ////////////////////////////////////////////////////////////////////// @@ -1034,13 +1034,13 @@ remember_filename(const char *filename) { char *fname; if (strcmp(filename, "-") == 0) - fname = ""; + fname = (char *)""; else - fname = (char *) filename; + fname = (char *)filename; size_t len = strlen(fname) + 1; if (current_filename != 0) free((char *)current_filename); - current_filename = (const char *) malloc(len); + current_filename = (const char *)malloc(len); if (current_filename == 0) fatal("can't malloc space for filename"); strncpy((char *)current_filename, (char *)fname, len); @@ -1060,13 +1060,13 @@ remember_source_filename(const char *filename) { char *fname; if (strcmp(filename, "-") == 0) - fname = ""; + fname = (char *)""; else - fname = (char *) filename; + fname = (char *)filename; size_t len = strlen(fname) + 1; if (current_source_filename != 0) free((char *)current_source_filename); - current_source_filename = (const char *) malloc(len); + current_source_filename = (const char *)malloc(len); if (current_source_filename == 0) fatal("can't malloc space for filename"); strncpy((char *)current_source_filename, (char *)fname, len); @@ -1083,7 +1083,7 @@ void send_draw(const Char subcmd, const IntArray * const args) { EnvInt n = (EnvInt) args->len(); - pr->draw((int) subcmd, (IntArg *) args->get_data(), n, current_env); + pr->draw((int) subcmd, (IntArg *)args->get_data(), n, current_env); } ////////////////////////////////////////////////////////////////////// @@ -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/src/libs/libdriver/printer.cpp b/contrib/groff/src/libs/libdriver/printer.cpp index 179daf1781d0..fd77d6b59eb7 100644 --- a/contrib/groff/src/libs/libdriver/printer.cpp +++ b/contrib/groff/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/src/libs/libgroff/Makefile.sub b/contrib/groff/src/libs/libgroff/Makefile.sub index 30277ab5d9ee..e7606a822251 100644 --- a/contrib/groff/src/libs/libgroff/Makefile.sub +++ b/contrib/groff/src/libs/libgroff/Makefile.sub @@ -1,4 +1,5 @@ LIB=groff +EXTRA_CFLAGS=-D__GETOPT_PREFIX=groff_ OBJS=\ assert.$(OBJEXT) \ change_lf.$(OBJEXT) \ @@ -15,12 +16,18 @@ OBJS=\ geometry.$(OBJEXT) \ getopt.$(OBJEXT) \ getopt1.$(OBJEXT) \ + glyphuni.$(OBJEXT) \ htmlhint.$(OBJEXT) \ + hypot.$(OBJEXT) \ + iftoa.$(OBJEXT) \ invalid.$(OBJEXT) \ + itoa.$(OBJEXT) \ lf.$(OBJEXT) \ lineno.$(OBJEXT) \ macropath.$(OBJEXT) \ + matherr.$(OBJEXT) \ maxfilename.$(OBJEXT) \ + maxpathname.$(OBJEXT) \ mksdir.$(OBJEXT) \ nametoindex.$(OBJEXT) \ new.$(OBJEXT) \ @@ -28,14 +35,18 @@ OBJS=\ prime.$(OBJEXT) \ progname.$(OBJEXT) \ ptable.$(OBJEXT) \ + quotearg.$(OBJEXT) \ + relocate.$(OBJEXT) \ searchpath.$(OBJEXT) \ + spawnvp.$(OBJEXT) \ string.$(OBJEXT) \ strsave.$(OBJEXT) \ + symbol.$(OBJEXT) \ tmpfile.$(OBJEXT) \ tmpname.$(OBJEXT) \ - iftoa.$(OBJEXT) \ - itoa.$(OBJEXT) \ - matherr.$(OBJEXT) \ + unicode.$(OBJEXT) \ + uniglyph.$(OBJEXT) \ + uniuni.$(OBJEXT) \ version.$(OBJEXT) \ $(LIBOBJS) CCSRCS=\ @@ -52,25 +63,32 @@ CCSRCS=\ $(srcdir)/font.cpp \ $(srcdir)/fontfile.cpp \ $(srcdir)/geometry.cpp \ + $(srcdir)/glyphuni.cpp \ $(srcdir)/htmlhint.cpp \ + $(srcdir)/hypot.cpp \ $(srcdir)/invalid.cpp \ $(srcdir)/lf.cpp \ $(srcdir)/lineno.cpp \ $(srcdir)/macropath.cpp \ $(srcdir)/maxfilename.cpp \ + $(srcdir)/maxpathname.cpp \ $(srcdir)/mksdir.cpp \ $(srcdir)/mkstemp.cpp \ $(srcdir)/nametoindex.cpp \ $(srcdir)/new.cpp \ $(srcdir)/paper.cpp \ $(srcdir)/prime.cpp \ - $(srcdir)/progname.cpp \ $(srcdir)/ptable.cpp \ + $(srcdir)/relocate.cpp \ $(srcdir)/searchpath.cpp \ $(srcdir)/string.cpp \ $(srcdir)/strsave.cpp \ + $(srcdir)/symbol.cpp \ $(srcdir)/tmpfile.cpp \ $(srcdir)/tmpname.cpp \ + $(srcdir)/unicode.cpp \ + $(srcdir)/uniglyph.cpp \ + $(srcdir)/uniuni.cpp \ version.cpp CSRCS=\ $(srcdir)/fmod.c \ @@ -80,7 +98,10 @@ CSRCS=\ $(srcdir)/iftoa.c \ $(srcdir)/itoa.c \ $(srcdir)/matherr.c \ + $(srcdir)/progname.c \ $(srcdir)/putenv.c \ + $(srcdir)/quotearg.c \ + $(srcdir)/spawnvp.c \ $(srcdir)/strcasecmp.c \ $(srcdir)/strerror.c \ $(srcdir)/strncasecmp.c \ diff --git a/contrib/groff/src/libs/libgroff/assert.cpp b/contrib/groff/src/libs/libgroff/assert.cpp index 89742e32cbb1..bc08eab2e4e8 100644 --- a/contrib/groff/src/libs/libgroff/assert.cpp +++ b/contrib/groff/src/libs/libgroff/assert.cpp @@ -1,4 +1,4 @@ -/* 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. @@ -15,13 +15,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 #include #include "assert.h" -extern const char *program_name; +extern "C" const char *program_name; void assertion_failed(int lineno, const char *filename) { diff --git a/contrib/groff/src/libs/libgroff/change_lf.cpp b/contrib/groff/src/libs/libgroff/change_lf.cpp index 2e44af1d5749..031377927189 100644 --- a/contrib/groff/src/libs/libgroff/change_lf.cpp +++ b/contrib/groff/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/src/libs/libgroff/cmap.cpp b/contrib/groff/src/libs/libgroff/cmap.cpp index 4b75d06f1dcf..2691c013c786 100644 --- a/contrib/groff/src/libs/libgroff/cmap.cpp +++ b/contrib/groff/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/src/libs/libgroff/color.cpp b/contrib/groff/src/libs/libgroff/color.cpp index da138dc46a23..b82bdcdadf1c 100644 --- a/contrib/groff/src/libs/libgroff/color.cpp +++ b/contrib/groff/src/libs/libgroff/color.cpp @@ -2,9 +2,9 @@ /* /src/libs/libgroff/color.cpp -Last update: 13 Apr 2003 +Last update: 26 May 2004 -Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Written by Gaius Mulley This file is part of groff. @@ -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 @@ -73,6 +74,7 @@ void color::operator delete(void *p) color::color(const color * const c) { + nm = c->nm; scheme = c->scheme; components[0] = c->components[0]; components[1] = c->components[1]; diff --git a/contrib/groff/src/libs/libgroff/cset.cpp b/contrib/groff/src/libs/libgroff/cset.cpp index e4845c11012e..8199e62438b1 100644 --- a/contrib/groff/src/libs/libgroff/cset.cpp +++ b/contrib/groff/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/src/libs/libgroff/device.cpp b/contrib/groff/src/libs/libgroff/device.cpp index 7efbfef25a2d..53baf9757d2f 100644 --- a/contrib/groff/src/libs/libgroff/device.cpp +++ b/contrib/groff/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/src/libs/libgroff/errarg.cpp b/contrib/groff/src/libs/libgroff/errarg.cpp index 2ddc0cc5dc11..1d6ef3006e47 100644 --- a/contrib/groff/src/libs/libgroff/errarg.cpp +++ b/contrib/groff/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/src/libs/libgroff/error.cpp b/contrib/groff/src/libs/libgroff/error.cpp index f7d3ec0f749b..8aea0c0d8f8d 100644 --- a/contrib/groff/src/libs/libgroff/error.cpp +++ b/contrib/groff/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/src/libs/libgroff/fatal.cpp b/contrib/groff/src/libs/libgroff/fatal.cpp index 42560dcaf5e7..bed8298b563f 100644 --- a/contrib/groff/src/libs/libgroff/fatal.cpp +++ b/contrib/groff/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/src/libs/libgroff/fmod.c b/contrib/groff/src/libs/libgroff/fmod.c index 818f946edc04..92e730699377 100644 --- a/contrib/groff/src/libs/libgroff/fmod.c +++ b/contrib/groff/src/libs/libgroff/fmod.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. */ #include diff --git a/contrib/groff/src/libs/libgroff/font.cpp b/contrib/groff/src/libs/libgroff/font.cpp index c633cc825e61..466c71d69b4d 100644 --- a/contrib/groff/src/libs/libgroff/font.cpp +++ b/contrib/groff/src/libs/libgroff/font.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, 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,27 +396,32 @@ 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; } -void font::alloc_ch_index(int index) +const char *font::get_image_generator() +{ + return image_generator; +} + +void font::alloc_ch_index(int idx) { if (nindices == 0) { nindices = 128; - if (index >= nindices) - nindices = index + 10; - ch_index = new short[nindices]; + if (idx >= nindices) + nindices = idx + 10; + ch_index = new int[nindices]; for (int i = 0; i < nindices; i++) ch_index[i] = -1; } else { int old_nindices = nindices; nindices *= 2; - if (index >= nindices) - nindices = index + 10; - short *old_ch_index = ch_index; - ch_index = new short[nindices]; - memcpy(ch_index, old_ch_index, sizeof(short)*old_nindices); + if (idx >= nindices) + nindices = idx + 10; + int *old_ch_index = ch_index; + ch_index = new int[nindices]; + memcpy(ch_index, old_ch_index, sizeof(int)*old_nindices); for (int i = old_nindices; i < nindices; i++) ch_index[i] = -1; a_delete old_ch_index; @@ -443,9 +450,9 @@ void font::compact() break; i++; if (i < nindices) { - short *old_ch_index = ch_index; - ch_index = new short[i]; - memcpy(ch_index, old_ch_index, i*sizeof(short)); + int *old_ch_index = ch_index; + ch_index = new int[i]; + memcpy(ch_index, old_ch_index, i*sizeof(int)); a_delete old_ch_index; nindices = i; } @@ -458,16 +465,16 @@ void font::compact() } } -void font::add_entry(int index, const font_char_metric &metric) +void font::add_entry(int idx, const font_char_metric &metric) { - assert(index >= 0); - if (index >= nindices) - alloc_ch_index(index); - assert(index < nindices); + assert(idx >= 0); + if (idx >= nindices) + alloc_ch_index(idx); + assert(idx < nindices); if (ch_used + 1 >= ch_size) extend_ch(); assert(ch_used + 1 < ch_size); - ch_index[index] = ch_used; + ch_index[idx] = ch_used; ch[ch_used++] = metric; } @@ -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; @@ -704,12 +714,12 @@ int font::load(int *not_found) t.error("unnamed character cannot be duplicate"); return 0; } - int index = name_to_index(nm); - if (index < 0) { + int idx = name_to_index(nm); + if (idx < 0) { t.error("invalid character `%1'", nm); return 0; } - copy_entry(index, last_index); + copy_entry(idx, last_index); } else { font_char_metric metric; @@ -758,9 +768,9 @@ int font::load(int *not_found) metric.special_device_coding = NULL; } else { - char *name = new char[strlen(p) + 1]; - strcpy(name, p); - metric.special_device_coding = name; + char *nam = new char[strlen(p) + 1]; + strcpy(nam, p); + metric.special_device_coding = nam; } if (strcmp(nm, "---") == 0) { last_index = number_to_index(metric.code); @@ -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/src/libs/libgroff/fontfile.cpp b/contrib/groff/src/libs/libgroff/fontfile.cpp index 8502d12f54c4..18d0b86066e1 100644 --- a/contrib/groff/src/libs/libgroff/fontfile.cpp +++ b/contrib/groff/src/libs/libgroff/fontfile.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 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 "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; @@ -57,10 +59,10 @@ void font::command_line_font_dir(const char *dir) font_path.command_line_dir(dir); } -FILE *font::open_file(const char *name, char **pathp) +FILE *font::open_file(const char *nm, char **pathp) { - char *filename = new char[strlen(name) + strlen(device) + 5]; - sprintf(filename, "dev%s/%s", device, name); + char *filename = new char[strlen(nm) + strlen(device) + 5]; + sprintf(filename, "dev%s/%s", device, nm); FILE *fp = font_path.open_file(filename, pathp); a_delete filename; return fp; diff --git a/contrib/groff/src/libs/libgroff/geometry.cpp b/contrib/groff/src/libs/libgroff/geometry.cpp index 256d266a384a..7d96e5c210cf 100644 --- a/contrib/groff/src/libs/libgroff/geometry.cpp +++ b/contrib/groff/src/libs/libgroff/geometry.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, 2004 Free Software Foundation, Inc. Written by Gaius Mulley using adjust_arc_center() from printer.cpp, written by James Clark. @@ -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 @@ -113,174 +113,67 @@ int printer::adjust_arc_center(const int *p, double *c) * Works out in which quadrant the arc starts and * stops, and from this it determines the x, y * max/min limits. The arc is drawn clockwise. - * - * [I'm sure there is a better way to do this, but - * I don't know how. Please can someone let me - * know or "improve" this function.] */ -void check_output_arc_limits(int x1, int y1, - int xv1, int yv1, - int xv2, int yv2, - double c0, double c1, +void check_output_arc_limits(int x_1, int y_1, + int xv_1, int yv_1, + int xv_2, int yv_2, + double c_0, double c_1, int *minx, int *maxx, int *miny, int *maxy) { - int radius = (int)sqrt(c0*c0 + c1*c1); - int x2 = x1 + xv1 + xv2; // end of arc is (x2, y2) - int y2 = y1 + yv1 + yv2; - - // firstly lets use the `circle' limitation - *minx = x1 + xv1 - radius; - *maxx = x1 + xv1 + radius; - *miny = y1 + yv1 - radius; - *maxy = y1 + yv1 + radius; - - /* now to see which min/max can be reduced and increased for the limits of - * the arc - * - * Q2 | Q1 - * -----+----- - * Q3 | Q4 - * - * - * NB. (x1+xv1, y1+yv1) is at the origin - * - * below we ask a nested question - * (i) from which quadrant does the first vector start? - * (ii) into which quadrant does the second vector go? - * from the 16 possible answers we determine the limits of the arc - */ - if (xv1 > 0 && yv1 > 0) { - // first vector in Q3 - if (xv2 >= 0 && yv2 >= 0 ) { - // second in Q1 - *maxx = x2; - *miny = y1; + int radius = (int)sqrt(c_0 * c_0 + c_1 * c_1); + // clockwise direction + int xcenter = x_1 + xv_1; + int ycenter = y_1 + yv_1; + int xend = xcenter + xv_2; + int yend = ycenter + yv_2; + // for convenience, transform to counterclockwise direction, + // centered at the origin + int xs = xend - xcenter; + int ys = yend - ycenter; + int xe = x_1 - xcenter; + int ye = y_1 - ycenter; + *minx = *maxx = xs; + *miny = *maxy = ys; + if (xe > *maxx) + *maxx = xe; + else if (xe < *minx) + *minx = xe; + if (ye > *maxy) + *maxy = ye; + else if (ye < *miny) + *miny = ye; + int qs, qe; // quadrants 0..3 + if (xs >= 0) + qs = (ys >= 0) ? 0 : 3; + else + qs = (ys >= 0) ? 1 : 2; + if (xe >= 0) + qe = (ye >= 0) ? 0 : 3; + else + qe = (ye >= 0) ? 1 : 2; + // make qs always smaller than qe + if ((qs > qe) + || ((qs == qe) && (double(xs) * ye < double(xe) * ys))) + qe += 4; + for (int i = qs; i < qe; i++) + switch (i % 4) { + case 0: + *maxy = radius; + break; + case 1: + *minx = -radius; + break; + case 2: + *miny = -radius; + break; + case 3: + *maxx = radius; + break; } - else if (xv2 < 0 && yv2 >= 0) { - // second in Q2 - *maxx = x2; - *miny = y1; - } - else if (xv2 >= 0 && yv2 < 0) { - // second in Q4 - *miny = MIN(y1, y2); - } - else if (xv2 < 0 && yv2 < 0) { - // second in Q3 - if (x1 >= x2) { - *minx = x2; - *maxx = x1; - *miny = MIN(y1, y2); - *maxy = MAX(y1, y2); - } - else { - // xv2, yv2 could all be zero? - } - } - } - else if (xv1 > 0 && yv1 < 0) { - // first vector in Q2 - if (xv2 >= 0 && yv2 >= 0) { - // second in Q1 - *maxx = MAX(x1, x2); - *minx = MIN(x1, x2); - *miny = y1; - } - else if (xv2 < 0 && yv2 >= 0) { - // second in Q2 - if (x1 < x2) { - *maxx = x2; - *minx = x1; - *miny = MIN(y1, y2); - *maxy = MAX(y1, y2); - } - else { - // otherwise almost full circle anyway - } - } - else if (xv2 >= 0 && yv2 < 0) { - // second in Q4 - *miny = y2; - *minx = x1; - } - else if (xv2 < 0 && yv2 < 0) { - // second in Q3 - *minx = MIN(x1, x2); - } - } - else if (xv1 <= 0 && yv1 <= 0) { - // first vector in Q1 - if (xv2 >= 0 && yv2 >= 0) { - // second in Q1 - if (x1 < x2) { - *minx = x1; - *maxx = x2; - *miny = MIN(y1, y2); - *maxy = MAX(y1, y2); - } - else { - // nearly full circle - } - } - else if (xv2 < 0 && yv2 >= 0) { - // second in Q2 - *maxy = MAX(y1, y2); - } - else if (xv2 >= 0 && yv2 < 0) { - // second in Q4 - *miny = MIN(y1, y2); - *maxy = MAX(y1, y2); - *minx = MIN(x1, x2); - } - else if (xv2 < 0 && yv2 < 0) { - // second in Q3 - *minx = x2; - *maxy = y1; - } - } - else if (xv1 <= 0 && yv1 > 0) { - // first vector in Q4 - if (xv2 >= 0 && yv2 >= 0) { - // second in Q1 - *maxx = MAX(x1, x2); - } - else if (xv2 < 0 && yv2 >= 0) { - // second in Q2 - *maxy = MAX(y1, y2); - *maxx = MAX(x1, x2); - } - else if (xv2 >= 0 && yv2 < 0) { - // second in Q4 - if (x1 >= x2) { - *miny = MIN(y1, y2); - *maxy = MAX(y1, y2); - *minx = MIN(x1, x2); - *maxx = MAX(x2, x2); - } - else { - // nearly full circle - } - } - else if (xv2 < 0 && yv2 < 0) { - // second in Q3 - *maxy = MAX(y1, y2); - *minx = MIN(x1, x2); - *maxx = MAX(x1, x2); - } - } - - // this should *never* happen but if it does it means a case above is wrong - // this code is only present for safety sake - if (*maxx < *minx) { - fprintf(stderr, "assert failed *minx > *maxx\n"); - fflush(stderr); - *maxx = *minx; - } - if (*maxy < *miny) { - fprintf(stderr, "assert failed *miny > *maxy\n"); - fflush(stderr); - *maxy = *miny; - } + *minx += xcenter; + *maxx += xcenter; + *miny += ycenter; + *maxy += ycenter; } diff --git a/contrib/groff/src/libs/libgroff/getcwd.c b/contrib/groff/src/libs/libgroff/getcwd.c index 7a769ffc53f2..d7443ec904e6 100644 --- a/contrib/groff/src/libs/libgroff/getcwd.c +++ b/contrib/groff/src/libs/libgroff/getcwd.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. */ /* Partial emulation of getcwd in terms of getwd. */ diff --git a/contrib/groff/src/libs/libgroff/getopt.c b/contrib/groff/src/libs/libgroff/getopt.c index 289d137e20ba..bcb81c83fe25 100644 --- a/contrib/groff/src/libs/libgroff/getopt.c +++ b/contrib/groff/src/libs/libgroff/getopt.c @@ -2,24 +2,23 @@ NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! - Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002 - Free Software Foundation, Inc. + Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004 + 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program 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. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + 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 Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ @@ -31,35 +30,8 @@ # include #endif -#if !defined __STDC__ || !__STDC__ -/* This is a separate conditional since some stdc systems - reject `defined (const)'. */ -# ifndef const -# define const -# endif -#endif - #include -/* Comment out all this code if we are using the GNU C Library, and are not - actually compiling the library itself. This code is part of the GNU C - Library, but also included in many other GNU distributions. Compiling - and linking in this code is a waste when using the GNU C library - (especially if it is a shared library). Rather than having every GNU - program understand `configure --with-gnu-libc' and omit the object files, - it is simpler to just do this in the source for each such file. */ - -#define GETOPT_INTERFACE_VERSION 2 -#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 -# include -# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION -# define ELIDE_CODE -# endif -#endif - -#ifndef ELIDE_CODE - - /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ @@ -69,47 +41,43 @@ # include #endif /* GNU C library. */ +#include + #ifdef VMS # include -# if HAVE_STRING_H - 0 -# include -# endif #endif -#ifndef _ -/* This is for other GNU distributions with internationalized messages. */ -# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC -# include -# ifndef _ -# define _(msgid) gettext (msgid) -# endif -# else -# define _(msgid) (msgid) -# endif -# if defined _LIBC && defined USE_IN_LIBIO -# include -# endif +#ifdef _LIBC +# include +#else +# include "gettext.h" +# define _(msgid) gettext (msgid) +#endif + +#if defined _LIBC && defined USE_IN_LIBIO +# include #endif #ifndef attribute_hidden # define attribute_hidden #endif -/* This version of `getopt' appears to the caller like standard Unix `getopt' - but it behaves differently for the user, since it allows the user - to intersperse the options with the other arguments. +/* Unlike standard Unix `getopt', functions like `getopt_long' + let the user intersperse the options with the other arguments. - As `getopt' works, it permutes the elements of ARGV so that, + As `getopt_long' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. - Setting the environment variable POSIXLY_CORRECT disables permutation. - Then the behavior is completely standard. + Using `getopt' or setting the environment variable POSIXLY_CORRECT + disables permutation. + Then the application's behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" +#include "getopt_int.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, @@ -134,21 +102,6 @@ char *optarg; /* 1003.2 says this must be 1 before any call. */ int optind = 1; -/* Formerly, initialization of getopt depended on optind==0, which - causes problems with re-calling getopt as programs generally don't - know that. */ - -int __getopt_initialized attribute_hidden; - -/* The next char to be scanned in the option-element - in which the last option character we returned was found. - This allows us to pick up the scan where we left off. - - If this is zero, or a null string, it means resume the scan - by advancing to the next ARGV-element. */ - -static char *nextchar; - /* Callers store zero here to inhibit the error message for unrecognized options. */ @@ -160,57 +113,12 @@ int opterr = 1; int optopt = '?'; -/* Describe how to deal with options that follow non-option ARGV-elements. +/* Keep a global copy of all internal members of getopt_data. */ - If the caller did not specify anything, - the default is REQUIRE_ORDER if the environment variable - POSIXLY_CORRECT is defined, PERMUTE otherwise. +static struct _getopt_data getopt_data; - REQUIRE_ORDER means don't recognize them as options; - stop option processing when the first non-option is seen. - This is what Unix does. - This mode of operation is selected by either setting the environment - variable POSIXLY_CORRECT, or using `+' as the first character - of the list of option characters. - - PERMUTE is the default. We permute the contents of ARGV as we scan, - so that eventually all the non-options are at the end. This allows options - to be given in any order, even with programs that were not written to - expect this. - - RETURN_IN_ORDER is an option available to programs that were written - to expect options and other ARGV-elements in any order and that care about - the ordering of the two. We describe each non-option ARGV-element - as if it were the argument of an option with character code 1. - Using `-' as the first character of the list of option characters - selects this mode of operation. - - The special argument `--' forces an end of option-scanning regardless - of the value of `ordering'. In the case of RETURN_IN_ORDER, only - `--' can cause `getopt' to return -1 with `optind' != ARGC. */ - -static enum -{ - REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER -} ordering; - -/* Value of POSIXLY_CORRECT environment variable. */ -static char *posixly_correct; -#ifdef __GNU_LIBRARY__ -/* We want to avoid inclusion of string.h with non-GNU libraries - because there are many ways it can cause trouble. - On some systems, it contains special magic macros that don't work - in GCC. */ -# include -# define my_index strchr -#else - -# if HAVE_STRING_H -# include -# else -# include -# endif +#ifndef __GNU_LIBRARY__ /* Avoid depending on library functions or files whose names are inconsistent. */ @@ -219,43 +127,8 @@ static char *posixly_correct; extern char *getenv (); #endif -static char * -my_index (str, chr) - const char *str; - int chr; -{ - while (*str) - { - if (*str == chr) - return (char *) str; - str++; - } - return 0; -} - -/* If using GCC, we can safely declare strlen this way. - If not using GCC, it is ok not to declare it. */ -#ifdef __GNUC__ -/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. - That was relevant to code that was here before. */ -# if (!defined __STDC__ || !__STDC__) && !defined strlen -/* gcc with -traditional declares the built-in strlen to return int, - and has done so at least since version 2.4.5. -- rms. */ -extern int strlen (const char *); -# endif /* not __STDC__ */ -#endif /* __GNUC__ */ - #endif /* not __GNU_LIBRARY__ */ -/* Handle permutation of arguments. */ - -/* Describe the part of ARGV that contains non-options that have - been skipped. `first_nonopt' is the index in ARGV of the first of them; - `last_nonopt' is the index after the last of them. */ - -static int first_nonopt; -static int last_nonopt; - #ifdef _LIBC /* Stored original parameters. XXX This is no good solution. We should rather copy the args so @@ -269,14 +142,11 @@ extern char **__libc_argv; # ifdef USE_NONOPTION_FLAGS /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; - -static int nonoption_flags_max_len; -static int nonoption_flags_len; # endif # ifdef USE_NONOPTION_FLAGS # define SWAP_FLAGS(ch1, ch2) \ - if (nonoption_flags_len > 0) \ + if (d->__nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ @@ -298,17 +168,12 @@ static int nonoption_flags_len; `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ -#if defined __STDC__ && __STDC__ -static void exchange (char **); -#endif - static void -exchange (argv) - char **argv; +exchange (char **argv, struct _getopt_data *d) { - int bottom = first_nonopt; - int middle = last_nonopt; - int top = optind; + int bottom = d->__first_nonopt; + int middle = d->__last_nonopt; + int top = d->optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. @@ -320,19 +185,19 @@ exchange (argv) /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ - if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) + if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) - nonoption_flags_len = nonoption_flags_max_len = 0; + d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, - nonoption_flags_max_len), - '\0', top + 1 - nonoption_flags_max_len); - nonoption_flags_max_len = top + 1; + d->__nonoption_flags_max_len), + '\0', top + 1 - d->__nonoption_flags_max_len); + d->__nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } @@ -378,76 +243,71 @@ exchange (argv) /* Update records for the slots the non-options now occupy. */ - first_nonopt += (optind - last_nonopt); - last_nonopt = optind; + d->__first_nonopt += (d->optind - d->__last_nonopt); + d->__last_nonopt = d->optind; } /* Initialize the internal data when the first call is made. */ -#if defined __STDC__ && __STDC__ -static const char *_getopt_initialize (int, char *const *, const char *); -#endif static const char * -_getopt_initialize (argc, argv, optstring) - int argc; - char *const *argv; - const char *optstring; +_getopt_initialize (int argc, char **argv, const char *optstring, + int posixly_correct, struct _getopt_data *d) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ - first_nonopt = last_nonopt = optind; + d->__first_nonopt = d->__last_nonopt = d->optind; - nextchar = NULL; + d->__nextchar = NULL; - posixly_correct = getenv ("POSIXLY_CORRECT"); + d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { - ordering = RETURN_IN_ORDER; + d->__ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { - ordering = REQUIRE_ORDER; + d->__ordering = REQUIRE_ORDER; ++optstring; } - else if (posixly_correct != NULL) - ordering = REQUIRE_ORDER; + else if (d->__posixly_correct) + d->__ordering = REQUIRE_ORDER; else - ordering = PERMUTE; + d->__ordering = PERMUTE; #if defined _LIBC && defined USE_NONOPTION_FLAGS - if (posixly_correct == NULL + if (!d->__posixly_correct && argc == __libc_argc && argv == __libc_argv) { - if (nonoption_flags_max_len == 0) + if (d->__nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') - nonoption_flags_max_len = -1; + d->__nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; - int len = nonoption_flags_max_len = strlen (orig_str); - if (nonoption_flags_max_len < argc) - nonoption_flags_max_len = argc; + int len = d->__nonoption_flags_max_len = strlen (orig_str); + if (d->__nonoption_flags_max_len < argc) + d->__nonoption_flags_max_len = argc; __getopt_nonoption_flags = - (char *) malloc (nonoption_flags_max_len); + (char *) malloc (d->__nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) - nonoption_flags_max_len = -1; + d->__nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), - '\0', nonoption_flags_max_len - len); + '\0', d->__nonoption_flags_max_len - len); } } - nonoption_flags_len = nonoption_flags_max_len; + d->__nonoption_flags_len = d->__nonoption_flags_max_len; } else - nonoption_flags_len = 0; + d->__nonoption_flags_len = 0; #endif return optstring; @@ -495,10 +355,6 @@ _getopt_initialize (argc, argv, optstring) `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. - The elements of ARGV aren't really const, because we permute them. - But we pretend they're const in the prototype to be compatible - with other systems. - LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. @@ -507,32 +363,32 @@ _getopt_initialize (argc, argv, optstring) recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce - long-named options. */ + long-named options. + + If POSIXLY_CORRECT is nonzero, behave as if the POSIXLY_CORRECT + environment variable were set. */ int -_getopt_internal (argc, argv, optstring, longopts, longind, long_only) - int argc; - char *const *argv; - const char *optstring; - const struct option *longopts; - int *longind; - int long_only; +_getopt_internal_r (int argc, char **argv, const char *optstring, + const struct option *longopts, int *longind, + int long_only, int posixly_correct, struct _getopt_data *d) { - int print_errors = opterr; + int print_errors = d->opterr; if (optstring[0] == ':') print_errors = 0; if (argc < 1) return -1; - optarg = NULL; + d->optarg = NULL; - if (optind == 0 || !__getopt_initialized) + if (d->optind == 0 || !d->__initialized) { - if (optind == 0) - optind = 1; /* Don't scan ARGV[0], the program name. */ - optstring = _getopt_initialize (argc, argv, optstring); - __getopt_initialized = 1; + if (d->optind == 0) + d->optind = 1; /* Don't scan ARGV[0], the program name. */ + optstring = _getopt_initialize (argc, argv, optstring, + posixly_correct, d); + d->__initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. @@ -540,40 +396,41 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS -# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ - || (optind < nonoption_flags_len \ - && __getopt_nonoption_flags[optind] == '1')) +# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ + || (d->optind < d->__nonoption_flags_len \ + && __getopt_nonoption_flags[d->optind] == '1')) #else -# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') +# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') #endif - if (nextchar == NULL || *nextchar == '\0') + if (d->__nextchar == NULL || *d->__nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ - if (last_nonopt > optind) - last_nonopt = optind; - if (first_nonopt > optind) - first_nonopt = optind; + if (d->__last_nonopt > d->optind) + d->__last_nonopt = d->optind; + if (d->__first_nonopt > d->optind) + d->__first_nonopt = d->optind; - if (ordering == PERMUTE) + if (d->__ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ - if (first_nonopt != last_nonopt && last_nonopt != optind) - exchange ((char **) argv); - else if (last_nonopt != optind) - first_nonopt = optind; + if (d->__first_nonopt != d->__last_nonopt + && d->__last_nonopt != d->optind) + exchange ((char **) argv, d); + else if (d->__last_nonopt != d->optind) + d->__first_nonopt = d->optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ - while (optind < argc && NONOPTION_P) - optind++; - last_nonopt = optind; + while (d->optind < argc && NONOPTION_P) + d->optind++; + d->__last_nonopt = d->optind; } /* The special ARGV-element `--' means premature end of options. @@ -581,28 +438,29 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ - if (optind != argc && !strcmp (argv[optind], "--")) + if (d->optind != argc && !strcmp (argv[d->optind], "--")) { - optind++; + d->optind++; - if (first_nonopt != last_nonopt && last_nonopt != optind) - exchange ((char **) argv); - else if (first_nonopt == last_nonopt) - first_nonopt = optind; - last_nonopt = argc; + if (d->__first_nonopt != d->__last_nonopt + && d->__last_nonopt != d->optind) + exchange ((char **) argv, d); + else if (d->__first_nonopt == d->__last_nonopt) + d->__first_nonopt = d->optind; + d->__last_nonopt = argc; - optind = argc; + d->optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ - if (optind == argc) + if (d->optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ - if (first_nonopt != last_nonopt) - optind = first_nonopt; + if (d->__first_nonopt != d->__last_nonopt) + d->optind = d->__first_nonopt; return -1; } @@ -611,17 +469,17 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) if (NONOPTION_P) { - if (ordering == REQUIRE_ORDER) + if (d->__ordering == REQUIRE_ORDER) return -1; - optarg = argv[optind++]; + d->optarg = argv[d->optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ - nextchar = (argv[optind] + 1 - + (longopts != NULL && argv[optind][1] == '-')); + d->__nextchar = (argv[d->optind] + 1 + + (longopts != NULL && argv[d->optind][1] == '-')); } /* Decode the current option-ARGV-element. */ @@ -640,8 +498,9 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) This distinction seems to be the most useful approach. */ if (longopts != NULL - && (argv[optind][1] == '-' - || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) + && (argv[d->optind][1] == '-' + || (long_only && (argv[d->optind][2] + || !strchr (optstring, argv[d->optind][1]))))) { char *nameend; const struct option *p; @@ -651,15 +510,15 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int indfound = -1; int option_index; - for (nameend = nextchar; *nameend && *nameend != '='; nameend++) + for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, nextchar, nameend - nextchar)) + if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) { - if ((unsigned int) (nameend - nextchar) + if ((unsigned int) (nameend - d->__nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ @@ -690,37 +549,44 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) char *buf; if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"), - argv[0], argv[optind]) >= 0) + argv[0], argv[d->optind]) >= 0) { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #else fprintf (stderr, _("%s: option `%s' is ambiguous\n"), - argv[0], argv[optind]); + argv[0], argv[d->optind]); #endif } - nextchar += strlen (nextchar); - optind++; - optopt = 0; + d->__nextchar += strlen (d->__nextchar); + d->optind++; + d->optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; - optind++; + d->optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) - optarg = nameend + 1; + d->optarg = nameend + 1; else { if (print_errors) @@ -730,7 +596,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int n; #endif - if (argv[optind - 1][1] == '-') + if (argv[d->optind - 1][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO @@ -749,38 +615,48 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("\ %s: option `%c%s' doesn't allow an argument\n"), - argv[0], argv[optind - 1][0], + argv[0], argv[d->optind - 1][0], pfound->name); #else fprintf (stderr, _("\ %s: option `%c%s' doesn't allow an argument\n"), - argv[0], argv[optind - 1][0], pfound->name); + argv[0], argv[d->optind - 1][0], + pfound->name); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 + |= _IO_FLAGS2_NOTCANCEL; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #endif } - nextchar += strlen (nextchar); + d->__nextchar += strlen (d->__nextchar); - optopt = pfound->val; + d->optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { - if (optind < argc) - optarg = argv[optind++]; + if (d->optind < argc) + d->optarg = argv[d->optind++]; else { if (print_errors) @@ -790,27 +666,36 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) if (__asprintf (&buf, _("\ %s: option `%s' requires an argument\n"), - argv[0], argv[optind - 1]) >= 0) + argv[0], argv[d->optind - 1]) >= 0) { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 + |= _IO_FLAGS2_NOTCANCEL; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #else fprintf (stderr, _("%s: option `%s' requires an argument\n"), - argv[0], argv[optind - 1]); + argv[0], argv[d->optind - 1]); #endif } - nextchar += strlen (nextchar); - optopt = pfound->val; + d->__nextchar += strlen (d->__nextchar); + d->optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } - nextchar += strlen (nextchar); + d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) @@ -825,8 +710,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ - if (!long_only || argv[optind][1] == '-' - || my_index (optstring, *nextchar) == NULL) + if (!long_only || argv[d->optind][1] == '-' + || strchr (optstring, *d->__nextchar) == NULL) { if (print_errors) { @@ -835,15 +720,15 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int n; #endif - if (argv[optind][1] == '-') + if (argv[d->optind][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"), - argv[0], nextchar); + argv[0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option `--%s'\n"), - argv[0], nextchar); + argv[0], d->__nextchar); #endif } else @@ -851,28 +736,36 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) /* +option or -option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"), - argv[0], argv[optind][0], nextchar); + argv[0], argv[d->optind][0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), - argv[0], argv[optind][0], nextchar); + argv[0], argv[d->optind][0], d->__nextchar); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #endif } - nextchar = (char *) ""; - optind++; - optopt = 0; + d->__nextchar = (char *) ""; + d->optind++; + d->optopt = 0; return '?'; } } @@ -880,12 +773,12 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) /* Look at and handle the next short option-character. */ { - char c = *nextchar++; - char *temp = my_index (optstring, c); + char c = *d->__nextchar++; + char *temp = strchr (optstring, c); /* Increment `optind' when we start to process its last character. */ - if (*nextchar == '\0') - ++optind; + if (*d->__nextchar == '\0') + ++d->optind; if (temp == NULL || c == ':') { @@ -896,7 +789,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int n; #endif - if (posixly_correct) + if (d->__posixly_correct) { /* 1003.2 specifies the format of this message. */ #if defined _LIBC && defined USE_IN_LIBIO @@ -919,16 +812,24 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #endif } - optopt = c; + d->optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ @@ -943,14 +844,14 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int option_index; /* This is an option that requires an argument. */ - if (*nextchar != '\0') + if (*d->__nextchar != '\0') { - optarg = nextchar; + d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ - optind++; + d->optind++; } - else if (optind == argc) + else if (d->optind == argc) { if (print_errors) { @@ -962,11 +863,19 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) _("%s: option requires an argument -- %c\n"), argv[0], c) >= 0) { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #else @@ -974,7 +883,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) argv[0], c); #endif } - optopt = c; + d->optopt = c; if (optstring[0] == ':') c = ':'; else @@ -982,22 +891,23 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) return c; } else - /* We already incremented `optind' once; + /* We already incremented `d->optind' once; increment it again when taking next ARGV-elt as argument. */ - optarg = argv[optind++]; + d->optarg = argv[d->optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ - for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) + for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; + nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, nextchar, nameend - nextchar)) + if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) { - if ((unsigned int) (nameend - nextchar) == strlen (p->name)) + if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; @@ -1023,22 +933,30 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) char *buf; if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"), - argv[0], argv[optind]) >= 0) + argv[0], argv[d->optind]) >= 0) { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #else fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), - argv[0], argv[optind]); + argv[0], argv[d->optind]); #endif } - nextchar += strlen (nextchar); - optind++; + d->__nextchar += strlen (d->__nextchar); + d->optind++; return '?'; } if (pfound != NULL) @@ -1049,7 +967,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) - optarg = nameend + 1; + d->optarg = nameend + 1; else { if (print_errors) @@ -1061,11 +979,20 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name) >= 0) { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 + |= _IO_FLAGS2_NOTCANCEL; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #else @@ -1075,14 +1002,14 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) #endif } - nextchar += strlen (nextchar); + d->__nextchar += strlen (d->__nextchar); return '?'; } } else if (pfound->has_arg == 1) { - if (optind < argc) - optarg = argv[optind++]; + if (d->optind < argc) + d->optarg = argv[d->optind++]; else { if (print_errors) @@ -1092,26 +1019,35 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) if (__asprintf (&buf, _("\ %s: option `%s' requires an argument\n"), - argv[0], argv[optind - 1]) >= 0) + argv[0], argv[d->optind - 1]) >= 0) { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 + |= _IO_FLAGS2_NOTCANCEL; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #else fprintf (stderr, _("%s: option `%s' requires an argument\n"), - argv[0], argv[optind - 1]); + argv[0], argv[d->optind - 1]); #endif } - nextchar += strlen (nextchar); + d->__nextchar += strlen (d->__nextchar); return optstring[0] == ':' ? ':' : '?'; } } - nextchar += strlen (nextchar); + d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) @@ -1121,7 +1057,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) } return pfound->val; } - nextchar = NULL; + d->__nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') @@ -1129,26 +1065,26 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ - if (*nextchar != '\0') + if (*d->__nextchar != '\0') { - optarg = nextchar; - optind++; + d->optarg = d->__nextchar; + d->optind++; } else - optarg = NULL; - nextchar = NULL; + d->optarg = NULL; + d->__nextchar = NULL; } else { /* This is an option that requires an argument. */ - if (*nextchar != '\0') + if (*d->__nextchar != '\0') { - optarg = nextchar; + d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ - optind++; + d->optind++; } - else if (optind == argc) + else if (d->optind == argc) { if (print_errors) { @@ -1160,11 +1096,19 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) %s: option requires an argument -- %c\n"), argv[0], c) >= 0) { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + if (_IO_fwide (stderr, 0) > 0) __fwprintf (stderr, L"%s", buf); else fputs (buf, stderr); + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + free (buf); } #else @@ -1173,7 +1117,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) argv[0], c); #endif } - optopt = c; + d->optopt = c; if (optstring[0] == ':') c = ':'; else @@ -1182,8 +1126,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ - optarg = argv[optind++]; - nextchar = NULL; + d->optarg = argv[d->optind++]; + d->__nextchar = NULL; } } return c; @@ -1191,18 +1135,40 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) } int -getopt (argc, argv, optstring) - int argc; - char *const *argv; - const char *optstring; +_getopt_internal (int argc, char **argv, const char *optstring, + const struct option *longopts, int *longind, + int long_only, int posixly_correct) { - return _getopt_internal (argc, argv, optstring, - (const struct option *) 0, - (int *) 0, - 0); + int result; + + getopt_data.optind = optind; + getopt_data.opterr = opterr; + + result = _getopt_internal_r (argc, argv, optstring, longopts, longind, + long_only, posixly_correct, &getopt_data); + + optind = getopt_data.optind; + optarg = getopt_data.optarg; + optopt = getopt_data.optopt; + + return result; +} + +/* glibc gets a LSB-compliant getopt. + Standalone applications get a POSIX-compliant getopt. */ +#if _LIBC +enum { POSIXLY_CORRECT = 0 }; +#else +enum { POSIXLY_CORRECT = 1 }; +#endif + +int +getopt (int argc, char *const *argv, const char *optstring) +{ + return _getopt_internal (argc, (char **) argv, optstring, NULL, NULL, 0, + POSIXLY_CORRECT); } -#endif /* Not ELIDE_CODE. */ #ifdef TEST @@ -1210,9 +1176,7 @@ getopt (argc, argv, optstring) the above definition of `getopt'. */ int -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { int c; int digit_optind = 0; diff --git a/contrib/groff/src/libs/libgroff/getopt1.c b/contrib/groff/src/libs/libgroff/getopt1.c index 22a7efbdd19a..5acd2245af0a 100644 --- a/contrib/groff/src/libs/libgroff/getopt1.c +++ b/contrib/groff/src/libs/libgroff/getopt1.c @@ -1,58 +1,35 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 + Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program 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. - The GNU C Library is distributed in the hope that it will be useful, + This program 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 - Lesser General Public License for more details. + 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 Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H #include #endif -#include "getopt.h" - -#if !defined __STDC__ || !__STDC__ -/* This is a separate conditional since some stdc systems - reject `defined (const)'. */ -#ifndef const -#define const -#endif +#ifdef _LIBC +# include +#else +# include "getopt.h" #endif +#include "getopt_int.h" #include -/* Comment out all this code if we are using the GNU C Library, and are not - actually compiling the library itself. This code is part of the GNU C - Library, but also included in many other GNU distributions. Compiling - and linking in this code is a waste when using the GNU C library - (especially if it is a shared library). Rather than having every GNU - program understand `configure --with-gnu-libc' and omit the object files, - it is simpler to just do this in the source for each such file. */ - -#define GETOPT_INTERFACE_VERSION 2 -#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 -#include -#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION -#define ELIDE_CODE -#endif -#endif - -#ifndef ELIDE_CODE - - /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ @@ -64,14 +41,20 @@ #endif int -getopt_long (argc, argv, options, long_options, opt_index) - int argc; - char *const *argv; - const char *options; - const struct option *long_options; - int *opt_index; +getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, + const struct option *long_options, int *opt_index) { - return _getopt_internal (argc, argv, options, long_options, opt_index, 0); + return _getopt_internal (argc, (char **) argv, options, long_options, + opt_index, 0, 0); +} + +int +_getopt_long_r (int argc, char **argv, const char *options, + const struct option *long_options, int *opt_index, + struct _getopt_data *d) +{ + return _getopt_internal_r (argc, argv, options, long_options, opt_index, + 0, 0, d); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. @@ -80,27 +63,30 @@ getopt_long (argc, argv, options, long_options, opt_index) instead. */ int -getopt_long_only (argc, argv, options, long_options, opt_index) - int argc; - char *const *argv; - const char *options; - const struct option *long_options; - int *opt_index; +getopt_long_only (int argc, char *__getopt_argv_const *argv, + const char *options, + const struct option *long_options, int *opt_index) { - return _getopt_internal (argc, argv, options, long_options, opt_index, 1); + return _getopt_internal (argc, (char **) argv, options, long_options, + opt_index, 1, 0); } +int +_getopt_long_only_r (int argc, char **argv, const char *options, + const struct option *long_options, int *opt_index, + struct _getopt_data *d) +{ + return _getopt_internal_r (argc, argv, options, long_options, opt_index, + 1, 0, d); +} -#endif /* Not ELIDE_CODE. */ #ifdef TEST #include int -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { int c; int digit_optind = 0; diff --git a/contrib/groff/src/libs/libgroff/glyphuni.cpp b/contrib/groff/src/libs/libgroff/glyphuni.cpp new file mode 100644 index 000000000000..4cd4917e609d --- /dev/null +++ b/contrib/groff/src/libs/libgroff/glyphuni.cpp @@ -0,0 +1,504 @@ +// -*- C++ -*- +/* Copyright (C) 2002, 2003, 2004 + Free Software Foundation, Inc. + Written by Werner Lemberg + +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. */ + +#include "lib.h" +#include "stringclass.h" +#include "ptable.h" + +#include "unicode.h" + +struct glyph_to_unicode { + char *value; +}; + +declare_ptable(glyph_to_unicode) +implement_ptable(glyph_to_unicode) + +PTABLE(glyph_to_unicode) glyph_to_unicode_table; + +struct S { + const char *key; + const char *value; +} glyph_to_unicode_list[] = { + { "!", "0021" }, + { "\"", "0022" }, + { "dq", "0022" }, + { "#", "0023" }, + { "sh", "0023" }, + { "$", "0024" }, + { "Do", "0024" }, + { "%", "0025" }, + { "&", "0026" }, + { "aq", "0027" }, + { "(", "0028" }, + { ")", "0029" }, + { "*", "002A" }, + { "+", "002B" }, + { "pl", "002B" }, + { ",", "002C" }, + { ".", "002E" }, + { "/", "002F" }, + { "sl", "002F" }, + { "0", "0030" }, + { "1", "0031" }, + { "2", "0032" }, + { "3", "0033" }, + { "4", "0034" }, + { "5", "0035" }, + { "6", "0036" }, + { "7", "0037" }, + { "8", "0038" }, + { "9", "0039" }, + { ":", "003A" }, + { ";", "003B" }, + { "<", "003C" }, + { "=", "003D" }, + { "eq", "003D" }, + { ">", "003E" }, + { "?", "003F" }, + { "@", "0040" }, + { "at", "0040" }, + { "A", "0041" }, + { "B", "0042" }, + { "C", "0043" }, + { "D", "0044" }, + { "E", "0045" }, + { "F", "0046" }, + { "G", "0047" }, + { "H", "0048" }, + { "I", "0049" }, + { "J", "004A" }, + { "K", "004B" }, + { "L", "004C" }, + { "M", "004D" }, + { "N", "004E" }, + { "O", "004F" }, + { "P", "0050" }, + { "Q", "0051" }, + { "R", "0052" }, + { "S", "0053" }, + { "T", "0054" }, + { "U", "0055" }, + { "V", "0056" }, + { "W", "0057" }, + { "X", "0058" }, + { "Y", "0059" }, + { "Z", "005A" }, +//{ "[", "005B" }, + { "lB", "005B" }, +//{ "\\", "005C" }, + { "rs", "005C" }, +//{ "]", "005D" }, + { "rB", "005D" }, + { "a^", "005E" }, + { "^", "005E" }, + { "ha", "005E" }, + { "_", "005F" }, + { "ru", "005F" }, + { "ul", "005F" }, +//{ "\\`", "0060" }, + { "ga", "0060" }, + { "a", "0061" }, + { "b", "0062" }, + { "c", "0063" }, + { "d", "0064" }, + { "e", "0065" }, + { "f", "0066" }, + { "ff", "0066_0066" }, + { "Fi", "0066_0066_0069" }, + { "Fl", "0066_0066_006C" }, + { "fi", "0066_0069" }, + { "fl", "0066_006C" }, + { "g", "0067" }, + { "h", "0068" }, + { "i", "0069" }, + { "j", "006A" }, + { "k", "006B" }, + { "l", "006C" }, + { "m", "006D" }, + { "n", "006E" }, + { "o", "006F" }, + { "p", "0070" }, + { "q", "0071" }, + { "r", "0072" }, + { "s", "0073" }, + { "t", "0074" }, + { "u", "0075" }, + { "v", "0076" }, + { "w", "0077" }, + { "x", "0078" }, + { "y", "0079" }, + { "z", "007A" }, + { "lC", "007B" }, + { "{", "007B" }, + { "ba", "007C" }, + { "or", "007C" }, + { "|", "007C" }, + { "rC", "007D" }, + { "}", "007D" }, + { "a~", "007E" }, + { "~", "007E" }, + { "ti", "007E" }, + { "r!", "00A1" }, + { "ct", "00A2" }, + { "Po", "00A3" }, + { "Cs", "00A4" }, + { "Ye", "00A5" }, + { "bb", "00A6" }, + { "sc", "00A7" }, + { "ad", "00A8" }, + { "co", "00A9" }, + { "Of", "00AA" }, + { "Fo", "00AB" }, + { "no", "00AC" }, + { "tno", "00AC" }, + { "shc", "00AD" }, + { "rg", "00AE" }, + { "a-", "00AF" }, + { "de", "00B0" }, + { "+-", "00B1" }, + { "t+-", "00B1" }, + { "S2", "00B2" }, + { "S3", "00B3" }, + { "aa", "00B4" }, +//{ "\\'", "00B4" }, + { "mc", "00B5" }, + { "ps", "00B6" }, + { "pc", "00B7" }, + { "ac", "00B8" }, + { "S1", "00B9" }, + { "Om", "00BA" }, + { "Fc", "00BB" }, + { "14", "00BC" }, + { "12", "00BD" }, + { "34", "00BE" }, + { "r?", "00BF" }, + { "`A", "00C0" }, + { "'A", "00C1" }, + { "^A", "00C2" }, + { "~A", "00C3" }, + { ":A", "00C4" }, + { "oA", "00C5" }, + { "AE", "00C6" }, + { ",C", "00C7" }, + { "`E", "00C8" }, + { "'E", "00C9" }, + { "^E", "00CA" }, + { ":E", "00CB" }, + { "`I", "00CC" }, + { "'I", "00CD" }, + { "^I", "00CE" }, + { ":I", "00CF" }, + { "-D", "00D0" }, + { "~N", "00D1" }, + { "`O", "00D2" }, + { "'O", "00D3" }, + { "^O", "00D4" }, + { "~O", "00D5" }, + { ":O", "00D6" }, + { "mu", "00D7" }, + { "tmu", "00D7" }, + { "/O", "00D8" }, + { "`U", "00D9" }, + { "'U", "00DA" }, + { "^U", "00DB" }, + { ":U", "00DC" }, + { "'Y", "00DD" }, + { "TP", "00DE" }, + { "ss", "00DF" }, + { "`a", "00E0" }, + { "'a", "00E1" }, + { "^a", "00E2" }, + { "~a", "00E3" }, + { ":a", "00E4" }, + { "oa", "00E5" }, + { "ae", "00E6" }, + { ",c", "00E7" }, + { "`e", "00E8" }, + { "'e", "00E9" }, + { "^e", "00EA" }, + { ":e", "00EB" }, + { "`i", "00EC" }, + { "'i", "00ED" }, + { "^i", "00EE" }, + { ":i", "00EF" }, + { "Sd", "00F0" }, + { "~n", "00F1" }, + { "`o", "00F2" }, + { "'o", "00F3" }, + { "^o", "00F4" }, + { "~o", "00F5" }, + { ":o", "00F6" }, + { "di", "00F7" }, + { "tdi", "00F7" }, + { "/o", "00F8" }, + { "`u", "00F9" }, + { "'u", "00FA" }, + { "^u", "00FB" }, + { ":u", "00FC" }, + { "'y", "00FD" }, + { "Tp", "00FE" }, + { ":y", "00FF" }, + { "'C", "0106" }, + { "'c", "0107" }, + { ".i", "0131" }, + { "IJ", "0132" }, + { "ij", "0133" }, + { "/L", "0141" }, + { "/l", "0142" }, + { "OE", "0152" }, + { "oe", "0153" }, + { "vS", "0160" }, + { "vs", "0161" }, + { ":Y", "0178" }, + { "vZ", "017D" }, + { "vz", "017E" }, + { "Fn", "0192" }, + { "ah", "02C7" }, + { "ab", "02D8" }, + { "a.", "02D9" }, + { "ao", "02DA" }, + { "ho", "02DB" }, + { "a\"", "02DD" }, + { "*A", "0391" }, + { "*B", "0392" }, + { "*G", "0393" }, + { "*D", "0394" }, + { "*E", "0395" }, + { "*Z", "0396" }, + { "*Y", "0397" }, + { "*H", "0398" }, + { "*I", "0399" }, + { "*K", "039A" }, + { "*L", "039B" }, + { "*M", "039C" }, + { "*N", "039D" }, + { "*C", "039E" }, + { "*O", "039F" }, + { "*P", "03A0" }, + { "*R", "03A1" }, + { "*S", "03A3" }, + { "*T", "03A4" }, + { "*U", "03A5" }, + { "*F", "03A6" }, + { "*X", "03A7" }, + { "*Q", "03A8" }, + { "*W", "03A9" }, + { "*a", "03B1" }, + { "*b", "03B2" }, + { "*g", "03B3" }, + { "*d", "03B4" }, + { "*e", "03B5" }, + { "*z", "03B6" }, + { "*y", "03B7" }, + { "*h", "03B8" }, + { "*i", "03B9" }, + { "*k", "03BA" }, + { "*l", "03BB" }, + { "*m", "03BC" }, + { "*n", "03BD" }, + { "*c", "03BE" }, + { "*o", "03BF" }, + { "*p", "03C0" }, + { "*r", "03C1" }, + { "ts", "03C2" }, + { "*s", "03C3" }, + { "*t", "03C4" }, + { "*u", "03C5" }, + { "*f", "03C6" }, + { "*x", "03C7" }, + { "*q", "03C8" }, + { "*w", "03C9" }, + { "+h", "03D1" }, + { "+f", "03D5" }, + { "+p", "03D6" }, + { "+e", "03F5" }, + { "-", "2010" }, + { "hy", "2010" }, + { "en", "2013" }, + { "em", "2014" }, + { "`", "2018" }, + { "oq", "2018" }, + { "'", "2019" }, + { "cq", "2019" }, + { "bq", "201A" }, + { "lq", "201C" }, + { "rq", "201D" }, + { "Bq", "201E" }, + { "dg", "2020" }, + { "dd", "2021" }, + { "bu", "2022" }, + { "%0", "2030" }, + { "fm", "2032" }, + { "sd", "2033" }, + { "fo", "2039" }, + { "fc", "203A" }, + { "rn", "203E" }, + { "f/", "2044" }, + { "eu", "20AC" }, + { "Eu", "20AC" }, + { "-h", "210F" }, + { "hbar", "210F" }, + { "Im", "2111" }, + { "wp", "2118" }, + { "Re", "211C" }, + { "tm", "2122" }, + { "Ah", "2135" }, + { "18", "215B" }, + { "38", "215C" }, + { "58", "215D" }, + { "78", "215E" }, + { "<-", "2190" }, + { "ua", "2191" }, + { "->", "2192" }, + { "da", "2193" }, + { "<>", "2194" }, + { "va", "2195" }, + { "CR", "21B5" }, + { "lA", "21D0" }, + { "uA", "21D1" }, + { "rA", "21D2" }, + { "dA", "21D3" }, + { "hA", "21D4" }, + { "vA", "21D5" }, + { "fa", "2200" }, + { "pd", "2202" }, + { "te", "2203" }, + { "es", "2205" }, + { "gr", "2207" }, + { "mo", "2208" }, + { "nm", "2209" }, + { "st", "220B" }, + { "product", "220F" }, + { "coproduct", "2210" }, + { "sum", "2211" }, +//{ "\\-", "2212" }, + { "mi", "2212" }, + { "-+", "2213" }, + { "**", "2217" }, + { "sr", "221A" }, + { "pt", "221D" }, + { "if", "221E" }, + { "/_", "2220" }, + { "AN", "2227" }, + { "OR", "2228" }, + { "ca", "2229" }, + { "cu", "222A" }, + { "is", "222B" }, + { "integral", "222B" }, + { "tf", "2234" }, + { "3d", "2234" }, + { "ap", "223C" }, + { "|=", "2243" }, + { "=~", "2245" }, + { "~~", "2248" }, + { "~=", "2248" }, + { "!=", "2260" }, + { "==", "2261" }, + { "ne", "2262" }, + { "<=", "2264" }, + { ">=", "2265" }, + { ">>", "226A" }, + { "<<", "226B" }, + { "sb", "2282" }, + { "sp", "2283" }, + { "nb", "2284" }, + { "nc", "2285" }, + { "ib", "2286" }, + { "ip", "2287" }, + { "c+", "2295" }, + { "c*", "2297" }, + { "pp", "22A5" }, + { "md", "22C5" }, + { "lc", "2308" }, + { "rc", "2309" }, + { "lf", "230A" }, + { "rf", "230B" }, + { "parenlefttp", "239B" }, + { "parenleftex", "239C" }, + { "parenleftbt", "239D" }, + { "parenrighttp", "239E" }, + { "parenrightex", "239F" }, + { "parenrightbt", "23A0" }, + { "bracketlefttp", "23A1" }, + { "bracketleftex", "23A2" }, + { "bracketleftbt", "23A3" }, + { "bracketrighttp", "23A4" }, + { "bracketrightex", "23A5" }, + { "bracketrightbt", "23A6" }, + { "lt", "23A7" }, + { "bracelefttp", "23A7" }, + { "lk", "23A8" }, + { "braceleftmid", "23A8" }, + { "lb", "23A9" }, + { "braceleftbt", "23A9" }, + { "bv", "23AA" }, + { "braceex", "23AA" }, + { "braceleftex", "23AA" }, + { "bracerightex", "23AA" }, + { "rt", "23AB" }, + { "bracerighttp", "23AB" }, + { "rk", "23AC" }, + { "bracerightmid", "23AC" }, + { "rb", "23AD" }, + { "bracerightbt", "23AD" }, + { "an", "23AF" }, + { "br", "2502" }, + { "rk", "251D" }, + { "lk", "2525" }, + { "lt", "256D" }, + { "rt", "256E" }, + { "rb", "256F" }, + { "lb", "2570" }, + { "sq", "25A1" }, + { "lz", "25CA" }, + { "ci", "25CB" }, + { "lh", "261C" }, + { "rh", "261E" }, + { "SP", "2660" }, + { "CL", "2663" }, + { "HE", "2665" }, + { "DI", "2666" }, + { "OK", "2713" }, + { "la", "27E8" }, + { "ra", "27E9" }, +}; + +// global constructor +static struct glyph_to_unicode_init { + glyph_to_unicode_init(); +} _glyph_to_unicode_init; + +glyph_to_unicode_init::glyph_to_unicode_init() { + for (unsigned int i = 0; + i < sizeof(glyph_to_unicode_list)/sizeof(glyph_to_unicode_list[0]); + i++) { + glyph_to_unicode *gtu = new glyph_to_unicode[1]; + gtu->value = (char *)glyph_to_unicode_list[i].value; + glyph_to_unicode_table.define(glyph_to_unicode_list[i].key, gtu); + } +} + +const char *glyph_name_to_unicode(const char *s) +{ + glyph_to_unicode *result = glyph_to_unicode_table.lookup(s); + return result ? result->value : 0; +} diff --git a/contrib/groff/src/libs/libgroff/htmlhint.cpp b/contrib/groff/src/libs/libgroff/htmlhint.cpp index 3015767d0d39..6ade0777d237 100644 --- a/contrib/groff/src/libs/libgroff/htmlhint.cpp +++ b/contrib/groff/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/src/libs/libgroff/hypot.cpp b/contrib/groff/src/libs/libgroff/hypot.cpp new file mode 100644 index 000000000000..6d2606d8f783 --- /dev/null +++ b/contrib/groff/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/src/libs/libgroff/iftoa.c b/contrib/groff/src/libs/libgroff/iftoa.c index 29a3d894cb4a..d1751c57ce24 100644 --- a/contrib/groff/src/libs/libgroff/iftoa.c +++ b/contrib/groff/src/libs/libgroff/iftoa.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2004 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -15,12 +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. */ #define INT_DIGITS 19 /* enough for 64-bit integer */ -char *if_to_a(i, decimal_point) - int i, decimal_point; +#ifdef __cplusplus +extern "C" { +#endif + +char *if_to_a(int i, int decimal_point) { /* room for a -, INT_DIGITS digits, a decimal point, and a terminating '\0' */ static char buf[INT_DIGITS + 3]; @@ -63,3 +67,7 @@ char *if_to_a(i, decimal_point) } return p; } + +#ifdef __cplusplus +} +#endif diff --git a/contrib/groff/src/libs/libgroff/invalid.cpp b/contrib/groff/src/libs/libgroff/invalid.cpp index f36894a8b43a..959aef938175 100644 --- a/contrib/groff/src/libs/libgroff/invalid.cpp +++ b/contrib/groff/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/src/libs/libgroff/itoa.c b/contrib/groff/src/libs/libgroff/itoa.c index 245c7dfebe97..85fb68bba72d 100644 --- a/contrib/groff/src/libs/libgroff/itoa.c +++ b/contrib/groff/src/libs/libgroff/itoa.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2002 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2002, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -16,13 +16,16 @@ 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 -char *i_to_a(i) - int i; +#ifdef __cplusplus +extern "C" { +#endif + +char *i_to_a(int i) { /* Room for INT_DIGITS digits, - and '\0' */ static char buf[INT_DIGITS + 2]; @@ -44,8 +47,7 @@ char *i_to_a(i) return p; } -char *ui_to_a(i) - unsigned int i; +char *ui_to_a(unsigned int i) { /* Room for UINT_DIGITS digits and '\0' */ static char buf[UINT_DIGITS + 1]; @@ -56,3 +58,7 @@ char *ui_to_a(i) } while (i != 0); return p; } + +#ifdef __cplusplus +} +#endif diff --git a/contrib/groff/src/libs/libgroff/lf.cpp b/contrib/groff/src/libs/libgroff/lf.cpp index 34272c7d03d0..3254fcf157cb 100644 --- a/contrib/groff/src/libs/libgroff/lf.cpp +++ b/contrib/groff/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/src/libs/libgroff/macropath.cpp b/contrib/groff/src/libs/libgroff/macropath.cpp index 03c04cbafd79..2c09fd7662ff 100644 --- a/contrib/groff/src/libs/libgroff/macropath.cpp +++ b/contrib/groff/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/src/libs/libgroff/matherr.c b/contrib/groff/src/libs/libgroff/matherr.c index 757a5404171b..2a65e185295b 100644 --- a/contrib/groff/src/libs/libgroff/matherr.c +++ b/contrib/groff/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/src/libs/libgroff/maxfilename.cpp b/contrib/groff/src/libs/libgroff/maxfilename.cpp index 25f554991ca7..9215cd921b51 100644 --- a/contrib/groff/src/libs/libgroff/maxfilename.cpp +++ b/contrib/groff/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/src/libs/libgroff/maxpathname.cpp b/contrib/groff/src/libs/libgroff/maxpathname.cpp new file mode 100644 index 000000000000..7bca55c785a6 --- /dev/null +++ b/contrib/groff/src/libs/libgroff/maxpathname.cpp @@ -0,0 +1,71 @@ +// -*- C++ -*- +/* Copyright (C) 2005 Free Software Foundation, Inc. + Written by Werner Lemberg (wl@gnu.org) + +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. */ + +/* path_name_max(dir) does the same as pathconf(dir, _PC_PATH_MAX) */ + +#include "lib.h" + +#include + +#ifdef HAVE_UNISTD_H +#include +#endif /* HAVE_UNISTD_H */ + +#ifdef _POSIX_VERSION + +size_t path_name_max() +{ + return pathconf("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf("/",_PC_PATH_MAX); +} + +#else /* not _POSIX_VERSION */ + +#include + +#ifdef HAVE_DIRENT_H +# include +#else /* not HAVE_DIRENT_H */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* HAVE_SYS_DIR_H */ +#endif /* not HAVE_DIRENT_H */ + +#ifndef PATH_MAX +# ifdef MAXPATHLEN +# define PATH_MAX MAXPATHLEN +# else /* !MAXPATHLEN */ +# ifdef MAX_PATH +# define PATH_MAX MAX_PATH +# else /* !MAX_PATH */ +# ifdef _MAX_PATH +# define PATH_MAX _MAX_PATH +# else /* !_MAX_PATH */ +# define PATH_MAX 255 +# endif /* !_MAX_PATH */ +# endif /* !MAX_PATH */ +# endif /* !MAXPATHLEN */ +#endif /* !PATH_MAX */ + +size_t path_name_max() +{ + return PATH_MAX; +} + +#endif /* not _POSIX_VERSION */ diff --git a/contrib/groff/src/libs/libgroff/mksdir.cpp b/contrib/groff/src/libs/libgroff/mksdir.cpp index bf4d300b92c8..472bd9e291e0 100644 --- a/contrib/groff/src/libs/libgroff/mksdir.cpp +++ b/contrib/groff/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/src/libs/libgroff/mkstemp.cpp b/contrib/groff/src/libs/libgroff/mkstemp.cpp index cd2717c31376..3279d771fa8f 100644 --- a/contrib/groff/src/libs/libgroff/mkstemp.cpp +++ b/contrib/groff/src/libs/libgroff/mkstemp.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/src/libs/libgroff/nametoindex.cpp b/contrib/groff/src/libs/libgroff/nametoindex.cpp index def26b32b470..e4dacff2ba91 100644 --- a/contrib/groff/src/libs/libgroff/nametoindex.cpp +++ b/contrib/groff/src/libs/libgroff/nametoindex.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, 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 "lib.h" @@ -107,9 +107,9 @@ int font::name_to_index(const char *s) return indexer.ascii_char_index(s[0]); /* char128 and \200 are synonyms */ if (s[0] == 'c' && s[1] == 'h' && s[2] == 'a' && s[3] == 'r') { - char *res; - long n = strtol(s + 4, &res, 10); - if (res != s + 4 && *res == '\0' && n >= 0 && n < 256) + char *val; + long n = strtol(s + 4, &val, 10); + if (val != s + 4 && *val == '\0' && n >= 0 && n < 256) return indexer.ascii_char_index((unsigned char)n); } return indexer.named_char_index(s); diff --git a/contrib/groff/src/libs/libgroff/new.cpp b/contrib/groff/src/libs/libgroff/new.cpp index 739cffa348d2..84393fd8fb21 100644 --- a/contrib/groff/src/libs/libgroff/new.cpp +++ b/contrib/groff/src/libs/libgroff/new.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2003 +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2003, 2004 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 "lib.h" @@ -26,7 +26,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "posix.h" #include "nonposix.h" -extern const char *program_name; +extern "C" const char *program_name; static void ewrite(const char *s) { diff --git a/contrib/groff/src/libs/libgroff/paper.cpp b/contrib/groff/src/libs/libgroff/paper.cpp index db8f5bcfddcb..4f114f4c3cdd 100644 --- a/contrib/groff/src/libs/libgroff/paper.cpp +++ b/contrib/groff/src/libs/libgroff/paper.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2002, 2003 +/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. Written by Werner Lemberg (wl@gnu.org) @@ -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" @@ -49,14 +49,14 @@ static void add_iso_paper(char series, int offset, } // length and width in inch -static void add_american_paper(const char *name, int index, +static void add_american_paper(const char *name, int idx, double length, double width ) { char *p = new char[strlen(name) + 1]; strcpy(p, name); - papersizes[index].name = p; - papersizes[index].length = length; - papersizes[index].width = width; + papersizes[idx].name = p; + papersizes[idx].length = length; + papersizes[idx].width = width; } int papersize_init::initialised = 0; diff --git a/contrib/groff/src/libs/libgroff/progname.c b/contrib/groff/src/libs/libgroff/progname.c new file mode 100644 index 000000000000..a70e3419c2be --- /dev/null +++ b/contrib/groff/src/libs/libgroff/progname.c @@ -0,0 +1 @@ +const char *program_name = 0; diff --git a/contrib/groff/src/libs/libgroff/ptable.cpp b/contrib/groff/src/libs/libgroff/ptable.cpp index 76735c2426de..bde2c3cada6f 100644 --- a/contrib/groff/src/libs/libgroff/ptable.cpp +++ b/contrib/groff/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/src/libs/libgroff/quotearg.c b/contrib/groff/src/libs/libgroff/quotearg.c new file mode 100644 index 000000000000..0ab3dc6aa77a --- /dev/null +++ b/contrib/groff/src/libs/libgroff/quotearg.c @@ -0,0 +1,209 @@ +/* Copyright (C) 2004 + Free Software Foundation, Inc. + Written by: Jeff Conrad (jeff_conrad@msn.com) + and 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. */ + +#include +#include +#include +#include +#include + +/* Define the default mechanism, and messages, for error reporting + * (user may substitute a preferred alternative, by defining his own + * implementation of the macros REPORT_ERROR, QUOTE_ARG_MALLOC_FAILED + * and QUOTE_ARG_REALLOC_FAILED, in the header file `nonposix.h'). + */ + +#include "nonposix.h" + +#ifndef REPORT_ERROR +# define REPORT_ERROR(WHY) fprintf(stderr, "%s:%s\n", program_name, WHY) +#endif +#ifndef QUOTE_ARG_MALLOC_ERROR +# define QUOTE_ARG_MALLOC_ERROR "malloc: Buffer allocation failed" +#endif +#ifndef QUOTE_ARG_REALLOC_ERROR +# define QUOTE_ARG_REALLOC_ERROR "realloc: Buffer resize failed" +#endif + +extern char *program_name; /* main program must define this */ + +#undef FALSE +#undef TRUE +#define FALSE 0 +#define TRUE 1 + +static int +needs_quoting(const char *string) +{ + /* Scan `string' to see whether it needs quoting for MSVC `spawn'/`exec' + * (i.e., whether it contains whitespace or embedded quotes). + */ + + if (string == NULL) /* ignore NULL strings */ + return FALSE; + + if (*string == '\0') /* explicit arguments of zero length */ + return TRUE; /* need quoting, so they aren't discarded */ + + while (*string) { + /* Scan non-NULL strings, up to '\0' terminator, + * returning 'TRUE' if quote or white space found. + */ + + if (*string == '"' || isspace(*string)) + return TRUE; + + /* otherwise, continue scanning to end of string */ + + ++string; + } + + /* Fall through, if no quotes or white space found, + * in which case, return `FALSE'. + */ + + return FALSE; +} + +char * +quote_arg(char *string) +{ + /* Enclose arguments in double quotes so that the parsing done in the + * MSVC runtime startup code doesn't split them at whitespace. Escape + * embedded double quotes so that they emerge intact from the parsing. + */ + + int backslashes; + char *quoted, *p, *q; + + if (needs_quoting(string)) { + /* Need to create a quoted copy of `string'; + * maximum buffer space needed is twice the original length, + * plus two enclosing quotes and one `\0' terminator. + */ + + if ((quoted = (char *)malloc(2 * strlen(string) + 3)) == NULL) { + /* Couldn't get a buffer for the quoted string, + * so complain, and bail out gracefully. + */ + + REPORT_ERROR(QUOTE_ARG_MALLOC_ERROR); + exit(1); + } + + /* Ok to proceed: + * insert the opening quote, then copy the source string, + * adding escapes as required. + */ + + *quoted = '"'; + for (backslashes = 0, p = string, q = quoted; *p; p++) { + if (*p == '\\') { + /* Just count backslashes when we find them. + * We will copy them out later, when we know if the count + * needs to be adjusted, to escape an embedded quote. + */ + + ++backslashes; + } + else if (*p == '"') { + /* This embedded quote character must be escaped, + * but first double up any immediately preceding backslashes, + * with one extra, as the escape character. + */ + + for (backslashes += backslashes + 1; backslashes; backslashes--) + *++q = '\\'; + + /* and now, add the quote character itself */ + + *++q = '"'; + } + else { + /* Any other character is simply copied, + * but first, if we have any pending backslashes, + * we must now insert them, without any count adjustment. + */ + + while (backslashes) { + *++q = '\\'; + --backslashes; + } + + /* and then, copy the current character */ + + *++q = *p; + } + } + + /* At end of argument: + * If any backslashes remain to be copied out, append them now, + * doubling the actual count to protect against reduction by MSVC, + * as a consequence of the immediately following closing quote. + */ + + for (backslashes += backslashes; backslashes; backslashes--) + *++q = '\\'; + + /* Finally, + * add the closing quote, terminate the quoted string, + * and adjust its size to what was actually required, + * ready for return. + */ + + *++q = '"'; + *++q = '\0'; + if ((string = (char *)realloc(quoted, strlen(quoted) + 1)) == NULL) { + /* but bail out gracefully, on error */ + + REPORT_ERROR(QUOTE_ARG_REALLOC_ERROR); + exit(1); + } + } + + /* `string' now refers to the argument, + * quoted and escaped, as required. + */ + + return string; +} + +void +purge_quoted_args(char **argv) +{ + /* To avoid memory leaks, + * free all memory previously allocated by `quoted_arg()', + * within the scope of the referring argument vector, `argv'. + */ + + if (argv) + while (*argv) { + /* Any argument beginning with a double quote + * SHOULD have been allocated by `quoted_arg()'. + */ + + if (**argv == '"') + free( *argv ); /* so free its allocation */ + ++argv; /* and continue to the next argument */ + } +} + +/* quotearg.c: end of file */ diff --git a/contrib/groff/src/libs/libgroff/relocate.cpp b/contrib/groff/src/libs/libgroff/relocate.cpp new file mode 100644 index 000000000000..5aace8b5bb78 --- /dev/null +++ b/contrib/groff/src/libs/libgroff/relocate.cpp @@ -0,0 +1,238 @@ +// -*- C++ -*- +/* Provide relocation for macro and font files. + Copyright (C) 2005 Free Software Foundation, Inc. + + This program 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, or (at your option) + any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, + USA. */ + +// Made after relocation code in kpathsea and gettext. + +#include "lib.h" + +#include +#include + +#include "defs.h" +#include "posix.h" +#include "nonposix.h" +#include "relocate.h" + +#if defined _WIN32 +# define WIN32_LEAN_AND_MEAN +# include +#endif + +#define INSTALLPATHLEN (sizeof(INSTALLPATH) - 1) +#ifndef DEBUG +# define DEBUG 0 +#endif + +extern "C" const char *program_name; + +// The prefix (parent directory) corresponding to the binary. +char *curr_prefix = 0; +size_t curr_prefix_len = 0; + +// Return the directory part of a filename, or `.' if no path separators. +char *xdirname(char *s) +{ + static const char dot[] = "."; + if (!s) + return 0; + // DIR_SEPS[] are possible directory separator characters, see nonposix.h. + // We want the rightmost separator of all possible ones. + // Example: d:/foo\\bar. + char *p = strrchr(s, DIR_SEPS[0]); + const char *sep = &DIR_SEPS[1]; + while (*sep) { + char *p1 = strrchr(s, *sep); + if (p1 && (!p || p1 > p)) + p = p1; + sep++; + } + if (p) + *p = '\0'; + else + s = (char *)dot; + return s; +} + +// Return the full path of NAME along the path PATHP. +// Adapted from search_path::open_file in searchpath.cpp. +char *searchpath(const char *name, const char *pathp) +{ + char *path; + if (!name || !*name) + return 0; +#if DEBUG + fprintf(stderr, "searchpath: pathp: `%s'\n", pathp); + fprintf(stderr, "searchpath: trying `%s'\n", name); +#endif + // Try first NAME as such; success if NAME is an absolute filename, + // or if NAME is found in the current directory. + if (!access (name, F_OK)) { + path = new char[path_name_max()]; +#ifdef _WIN32 + path = _fullpath(path, name, path_name_max()); +#else + path = realpath(name, path); +#endif +#if DEBUG + fprintf(stderr, "searchpath: found `%s'\n", path); +#endif + return path; + } + // Secondly, try the current directory. + // Now search along PATHP. + size_t namelen = strlen(name); + char *p = (char *)pathp; + for (;;) { + char *end = strchr(p, PATH_SEP_CHAR); + if (!end) + end = strchr(p, '\0'); + int need_slash = end > p && strchr(DIR_SEPS, end[-1]) == 0; + path = new char[end - p + need_slash + namelen + 1]; + memcpy(path, p, end - p); + if (need_slash) + path[end - p] = '/'; + strcpy(path + (end - p) + need_slash, name); +#if DEBUG + fprintf(stderr, "searchpath: trying `%s'\n", path); +#endif + if (!access(path, F_OK)) { +#if DEBUG + fprintf(stderr, "searchpath: found `%s'\n", name); +#endif + return path; + } + a_delete path; + if (*end == '\0') + break; + p = end + 1; + } + return 0; +} + +// Search NAME along PATHP with the elements of PATHEXT in turn added. +char *searchpathext(const char *name, const char *pathext, const char *pathp) +{ + char *found = 0; + char *tmpathext = strsave(pathext); // strtok modifies this string, + // so make a copy + char *ext = strtok(tmpathext, PATH_SEP); + while (ext) { + char *namex = new char[strlen(name) + strlen(ext) + 1]; + strcpy(namex, name); + strcat(namex, ext); + found = searchpath(namex, pathp); + a_delete namex; + if (found) + break; + ext = strtok(0, PATH_SEP); + } + a_delete tmpathext; + return found; +} + +// Convert an MS path to a POSIX path. +char *msw2posixpath(char *path) +{ + char *s = path; + while (*s) { + if (*s == '\\') + *s = '/'; + *s++; + } + return path; +} + +// Compute the current prefix. +void set_current_prefix() +{ + char *pathextstr; + curr_prefix = new char[path_name_max()]; + // Obtain the full path of the current binary; + // using GetModuleFileName on MS-Windows, + // and searching along PATH on other systems. +#ifdef _WIN32 + int len = GetModuleFileName(0, curr_prefix, path_name_max()); + if (len) + len = GetShortPathName(curr_prefix, curr_prefix, path_name_max()); +# if DEBUG + fprintf(stderr, "curr_prefix: %s\n", curr_prefix); +# endif /* DEBUG */ +#else /* !_WIN32 */ + curr_prefix = searchpath(program_name, getenv("PATH")); + if (!curr_prefix && !strchr(program_name, '.')) { // try with extensions + pathextstr = strsave(getenv("PATHEXT")); + if (!pathextstr) + pathextstr = strsave(PATH_EXT); + curr_prefix = searchpathext(program_name, pathextstr, getenv("PATH")); + a_delete pathextstr; + } + if (!curr_prefix) + return; +#endif /* !_WIN32 */ + msw2posixpath(curr_prefix); +#if DEBUG + fprintf(stderr, "curr_prefix: %s\n", curr_prefix); +#endif + curr_prefix = xdirname(curr_prefix); // directory of executable + curr_prefix = xdirname(curr_prefix); // parent directory of executable + curr_prefix_len = strlen(curr_prefix); +#if DEBUG + fprintf(stderr, "curr_prefix: %s\n", curr_prefix); + fprintf(stderr, "curr_prefix_len: %d\n", curr_prefix_len); +#endif +} + +// Strip the installation prefix and replace it +// with the current installation prefix; return the relocated path. +char *relocatep(const char *path) +{ +#if DEBUG + fprintf(stderr, "relocatep: path = %s\n", path); + fprintf(stderr, "relocatep: INSTALLPATH = %s\n", INSTALLPATH); + fprintf(stderr, "relocatep: INSTALLPATHLEN = %d\n", INSTALLPATHLEN); +#endif + if (!curr_prefix) + set_current_prefix(); + if (strncmp(INSTALLPATH, path, INSTALLPATHLEN)) + return strsave(path); + char *relative_path = (char *)path + INSTALLPATHLEN; + size_t relative_path_len = strlen(relative_path); + char *relocated_path = new char[curr_prefix_len + relative_path_len + 1]; + strcpy(relocated_path, curr_prefix); + strcat(relocated_path, relative_path); +#if DEBUG + fprintf(stderr, "relocated_path: %s\n", relocated_path); +#endif /* DEBUG */ + return relocated_path; +} + +// Return the original pathname if it exists; +// otherwise return the relocated path. +char *relocate(const char *path) +{ + char *p; + if (access(path, F_OK)) + p = relocatep(path); + else + p = strsave(path); +#if DEBUG + fprintf (stderr, "relocate: %s\n", p); +#endif + return p; +} diff --git a/contrib/groff/src/libs/libgroff/searchpath.cpp b/contrib/groff/src/libs/libgroff/searchpath.cpp index 1f8b233cd6b8..6b9b81cc2543 100644 --- a/contrib/groff/src/libs/libgroff/searchpath.cpp +++ b/contrib/groff/src/libs/libgroff/searchpath.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,16 +17,23 @@ 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 #include +#include #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) { @@ -75,11 +82,11 @@ void search_path::command_line_dir(const char *s) char *p = dirs; p += old_len - init_len; if (init_len == 0) - *p++ = PATH_SEP[0]; + *p++ = PATH_SEP_CHAR; memcpy(p, s, slen); p += slen; if (init_len > 0) { - *p++ = PATH_SEP[0]; + *p++ = PATH_SEP_CHAR; memcpy(p, old + old_len - init_len, init_len); p += init_len; } @@ -103,15 +110,20 @@ FILE *search_path::open_file(const char *name, char **pathp) unsigned namelen = strlen(name); char *p = dirs; for (;;) { - char *end = strchr(p, PATH_SEP[0]); + char *end = strchr(p, PATH_SEP_CHAR); 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 @@ -130,3 +142,67 @@ FILE *search_path::open_file(const char *name, char **pathp) } return 0; } + +FILE *search_path::open_file_cautious(const char *name, char **pathp, + const char *mode) +{ + if (!mode) + mode = "r"; + bool reading = (strchr(mode, 'r') != 0); + if (name == 0 || strcmp(name, "-") == 0) { + if (pathp) + *pathp = strsave(reading ? "stdin" : "stdout"); + return (reading ? stdin : stdout); + } + if (!reading || IS_ABSOLUTE(name) || *dirs == '\0') { + FILE *fp = fopen(name, mode); + if (fp) { + if (pathp) + *pathp = strsave(name); + return fp; + } + else + return 0; + } + unsigned namelen = strlen(name); + char *p = dirs; + for (;;) { + char *end = strchr(p, PATH_SEP_CHAR); + if (!end) + end = strchr(p, '\0'); + int need_slash = end > p && strchr(DIR_SEPS, end[-1]) == 0; + char *origpath = new char[(end - p) + need_slash + namelen + 1]; + memcpy(origpath, p, end - p); + if (need_slash) + 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 + FILE *fp = fopen(path, mode); + if (fp) { + if (pathp) + *pathp = path; + else + a_delete path; + return fp; + } + int err = errno; + a_delete path; + if (err != ENOENT) + { + errno = err; + return 0; + } + if (*end == '\0') + break; + p = end + 1; + } + errno = ENOENT; + return 0; +} diff --git a/contrib/groff/src/libs/libgroff/spawnvp.c b/contrib/groff/src/libs/libgroff/spawnvp.c new file mode 100644 index 000000000000..1848124f3bd5 --- /dev/null +++ b/contrib/groff/src/libs/libgroff/spawnvp.c @@ -0,0 +1,122 @@ +/* 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. */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include + +#ifdef HAVE_PROCESS_H +# include +#endif + +#if defined(__MSDOS__) \ + || (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN__)) \ + || defined(__EMX__) + +#define SPAWN_FUNCTION_WRAPPERS 1 + +/* Define the default mechanism, and messages, for error reporting + * (user may substitute a preferred alternative, by defining his own + * implementation of the macros REPORT_ERROR and ARGV_MALLOC_ERROR, + * in the header file `nonposix.h'). + */ + +#include "nonposix.h" + +#ifndef REPORT_ERROR +# define REPORT_ERROR(WHY) fprintf(stderr, "%s:%s\n", program_name, WHY) +#endif +#ifndef ARGV_MALLOC_ERROR +# define ARGV_MALLOC_ERROR "malloc: Allocation for 'argv' failed" +#endif + +extern char *program_name; + +extern char *quote_arg(char *string); +extern void purge_quoted_args(char **argv); + +int +spawnvp_wrapper(int mode, char *path, char **argv) +{ + /* Invoke the system `spawnvp' service + * enclosing the passed arguments in double quotes, as required, + * so that the (broken) default parsing in the MSVC runtime doesn't + * split them at whitespace. */ + + char **quoted_argv; /* used to build a quoted local copy of `argv' */ + + int i; /* used as an index into `argv' or `quoted_argv' */ + int status = -1; /* initialise return code, in case we fail */ + int argc = 0; /* initialise argument count; may be none */ + + /* First count the number of arguments + * which are actually present in the passed `argv'. */ + + if (argv) + for (quoted_argv = argv; *quoted_argv; ++argc, ++quoted_argv) + ; + + /* If we do not now have an argument count, + * then we must fall through and fail. */ + + if (argc) { + /* We do have at least one argument: + * We will use a copy of the `argv', in which to do the quoting, + * so we must allocate space for it. */ + + if ((quoted_argv = (char **)malloc(++argc * sizeof(char **))) == NULL) { + /* If we didn't get enough space, + * then complain, and bail out gracefully. */ + + REPORT_ERROR(ARGV_MALLOC_ERROR); + exit(1); + } + + /* Now copy the passed `argv' into our new vector, + * quoting its contents as required. */ + + for (i = 0; i < argc; i++) + quoted_argv[i] = quote_arg(argv[i]); + + /* Invoke the MSVC `spawnvp' service + * passing our now appropriately quoted copy of `argv'. */ + + status = spawnvp(mode, path, quoted_argv); + + /* Clean up our memory allocations + * for the quoted copy of `argv', which is no longer required. */ + + purge_quoted_args(quoted_argv); + free(quoted_argv); + } + + /* Finally, + * return the status code returned by `spawnvp', + * or a failure code if we fell through. */ + + return status; +} + +#endif /* __MSDOS__ || _WIN32 */ + +/* spawnvp.c: end of file */ diff --git a/contrib/groff/src/libs/libgroff/strcasecmp.c b/contrib/groff/src/libs/libgroff/strcasecmp.c index ae7601de0fcf..6ed6cc282079 100644 --- a/contrib/groff/src/libs/libgroff/strcasecmp.c +++ b/contrib/groff/src/libs/libgroff/strcasecmp.c @@ -13,7 +13,7 @@ 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. */ + Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ #if HAVE_CONFIG_H # include @@ -29,7 +29,7 @@ # define LENGTH_LIMIT_EXPR(Expr) 0 #endif -#include +#include #include #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) diff --git a/contrib/groff/src/libs/libgroff/strerror.c b/contrib/groff/src/libs/libgroff/strerror.c index be2d1f3b6513..d5757f309dd8 100644 --- a/contrib/groff/src/libs/libgroff/strerror.c +++ b/contrib/groff/src/libs/libgroff/strerror.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2003 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -15,13 +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. */ #ifdef HAVE_CONFIG_H #include #endif #include +#include +#include /* for MinGW */ #define INT_DIGITS 19 /* enough for 64 bit integer */ diff --git a/contrib/groff/src/libs/libgroff/string.cpp b/contrib/groff/src/libs/libgroff/string.cpp index 2ef547e4781f..9be873c8ef8f 100644 --- a/contrib/groff/src/libs/libgroff/string.cpp +++ b/contrib/groff/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/src/libs/libgroff/strsave.cpp b/contrib/groff/src/libs/libgroff/strsave.cpp index dfd2b6f40743..2db70737a18c 100644 --- a/contrib/groff/src/libs/libgroff/strsave.cpp +++ b/contrib/groff/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/src/libs/libgroff/strtol.c b/contrib/groff/src/libs/libgroff/strtol.c index 46b17029a868..0c758a076b94 100644 --- a/contrib/groff/src/libs/libgroff/strtol.c +++ b/contrib/groff/src/libs/libgroff/strtol.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 diff --git a/contrib/groff/src/libs/libgroff/symbol.cpp b/contrib/groff/src/libs/libgroff/symbol.cpp new file mode 100644 index 000000000000..38e30712e6c1 --- /dev/null +++ b/contrib/groff/src/libs/libgroff/symbol.cpp @@ -0,0 +1,159 @@ +// -*- C++ -*- +/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2004 + Free Software Foundation, Inc. + Written by James Clark (jjc@jclark.com) + +This file is part of groff. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +groff is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License along +with groff; see the file COPYING. If not, write to the Free Software +Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include "lib.h" + +#include "errarg.h" +#include "error.h" +#include "symbol.h" + +const char **symbol::table = 0; +int symbol::table_used = 0; +int symbol::table_size = 0; +char *symbol::block = 0; +int symbol::block_size = 0; + +const symbol NULL_SYMBOL; +const symbol EMPTY_SYMBOL(""); + +#ifdef BLOCK_SIZE +#undef BLOCK_SIZE +#endif + +const int BLOCK_SIZE = 1024; +// the table will increase in size as necessary +// the size will be chosen from the following array +// add some more if you want +static const unsigned int table_sizes[] = { + 101, 503, 1009, 2003, 3001, 4001, 5003, 10007, 20011, 40009, 80021, + 160001, 500009, 1000003, 1500007, 2000003, 0 +}; +const double FULL_MAX = 0.3; // don't let the table get more than this full + +static unsigned int hash_string(const char *p) +{ + // compute a hash code; this assumes 32-bit unsigned ints + // see p436 of Compilers by Aho, Sethi & Ullman + // give special treatment to two-character names + unsigned int hc = 0, g; + if (*p != 0) { + hc = *p++; + if (*p != 0) { + hc <<= 7; + hc += *p++; + for (; *p != 0; p++) { + hc <<= 4; + hc += *p; + if ((g = (hc & 0xf0000000)) == 0) { + hc ^= g >> 24; + hc ^= g; + } + } + } + } + return hc; +} + +// Tell compiler that a variable is intentionally unused. +inline void unused(void *) { } + +symbol::symbol(const char *p, int how) +{ + if (p == 0) { + s = 0; + return; + } + if (*p == 0) { + s = ""; + return; + } + if (table == 0) { + table_size = table_sizes[0]; + table = (const char **)new char*[table_size]; + for (int i = 0; i < table_size; i++) + table[i] = 0; + table_used = 0; + } + unsigned int hc = hash_string(p); + const char **pp; + for (pp = table + hc % table_size; + *pp != 0; + (pp == table ? pp = table + table_size - 1 : --pp)) + if (strcmp(p, *pp) == 0) { + s = *pp; + return; + } + if (how == MUST_ALREADY_EXIST) { + s = 0; + return; + } + if (table_used >= table_size - 1 || table_used >= table_size*FULL_MAX) { + const char **old_table = table; + unsigned int old_table_size = table_size; + int i; + for (i = 1; table_sizes[i] <= old_table_size; i++) + if (table_sizes[i] == 0) + fatal("too many symbols"); + table_size = table_sizes[i]; + table_used = 0; + table = (const char **)new char*[table_size]; + for (i = 0; i < table_size; i++) + table[i] = 0; + for (pp = old_table + old_table_size - 1; + pp >= old_table; + --pp) { + symbol temp(*pp, 1); /* insert it into the new table */ + unused(&temp); + } + a_delete old_table; + for (pp = table + hc % table_size; + *pp != 0; + (pp == table ? pp = table + table_size - 1 : --pp)) + ; + } + ++table_used; + if (how == DONT_STORE) { + s = *pp = p; + } + else { + int len = strlen(p)+1; + if (block == 0 || block_size < len) { + block_size = len > BLOCK_SIZE ? len : BLOCK_SIZE; + block = new char [block_size]; + } + (void)strcpy(block, p); + s = *pp = block; + block += len; + block_size -= len; + } +} + +symbol concat(symbol s1, symbol s2) +{ + char *buf = new char [strlen(s1.contents()) + strlen(s2.contents()) + 1]; + strcpy(buf, s1.contents()); + strcat(buf, s2.contents()); + symbol res(buf); + a_delete buf; + return res; +} + +symbol default_symbol("default"); diff --git a/contrib/groff/src/libs/libgroff/tmpfile.cpp b/contrib/groff/src/libs/libgroff/tmpfile.cpp index 41b7f0647d21..fbc48c81d118 100644 --- a/contrib/groff/src/libs/libgroff/tmpfile.cpp +++ b/contrib/groff/src/libs/libgroff/tmpfile.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003 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" @@ -33,6 +33,13 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define GROFF_TMPDIR_ENVVAR "GROFF_TMPDIR" // otherwise if this is set, create temporary files there #define TMPDIR_ENVVAR "TMPDIR" +// otherwise, on MS-DOS or MS-Windows ... +#if defined(__MSDOS__) || defined(_WIN32) +// if either of these is set, create temporary files there +// (giving priority to WIN32_TMPDIR_ENVVAR) +#define WIN32_TMPDIR_ENVVAR "TMP" +#define MSDOS_TMPDIR_ENVVAR "TEMP" +#endif // otherwise if P_tmpdir is defined, create temporary files there #ifdef P_tmpdir # define DEFAULT_TMPDIR P_tmpdir @@ -55,12 +62,23 @@ struct temp_init { temp_init::temp_init() { - const char *tem = getenv(GROFF_TMPDIR_ENVVAR); - if (!tem) { - tem = getenv(TMPDIR_ENVVAR); - if (!tem) - tem = DEFAULT_TMPDIR; - } + // First, choose a location for creating temporary files... + const char *tem; + // using the first match for any of the environment specs in listed order. + if ( + (tem = getenv(GROFF_TMPDIR_ENVVAR)) == NULL + && (tem = getenv(TMPDIR_ENVVAR)) == NULL +#if defined(__MSDOS__) || defined(_WIN32) + // If we didn't find a match for either of the above + // (which are preferred, regardless of the host operating system), + // and we are hosted on either MS-Windows or MS-DOS, + // then try the Microsoft conventions. + && (tem = getenv(WIN32_TMPDIR_ENVVAR)) == NULL + && (tem = getenv(MSDOS_TMPDIR_ENVVAR)) == NULL +#endif + ) + // If we didn't find an environment spec fall back to this default. + tem = DEFAULT_TMPDIR; size_t tem_len = strlen(tem); const char *tem_end = tem + tem_len - 1; int need_slash = strchr(DIR_SEPS, *tem_end) == NULL ? 1 : 0; diff --git a/contrib/groff/src/libs/libgroff/tmpname.cpp b/contrib/groff/src/libs/libgroff/tmpname.cpp index f867fe06d71d..8d80f4ba33da 100644 --- a/contrib/groff/src/libs/libgroff/tmpname.cpp +++ b/contrib/groff/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/src/libs/libgroff/unicode.cpp b/contrib/groff/src/libs/libgroff/unicode.cpp new file mode 100644 index 000000000000..32810dfa80b5 --- /dev/null +++ b/contrib/groff/src/libs/libgroff/unicode.cpp @@ -0,0 +1,67 @@ +// -*- C++ -*- +/* Copyright (C) 2002 + Free Software Foundation, Inc. + Written by Werner Lemberg + +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. */ + +#include "lib.h" +#include "cset.h" +#include "stringclass.h" + +#include "unicode.h" + +const char *check_unicode_name(const char *u) +{ + if (*u != 'u') + return 0; + const char *p = ++u; + for (;;) { + int val = 0; + const char *start = p; + for (;;) { + // only uppercase hex digits allowed + if (!csxdigit(*p)) + return 0; + if (csdigit(*p)) + val = val*0x10 + (*p-'0'); + else if (csupper(*p)) + val = val*0x10 + (*p-'A'+10); + else + return 0; + // biggest Unicode value is U+10FFFF + if (val > 0x10FFFF) + return 0; + p++; + if (*p == '\0' || *p == '_') + break; + } + // surrogates not allowed + if ((val >= 0xD800 && val <= 0xDBFF) || (val >= 0xDC00 && val <= 0xDFFF)) + return 0; + if (val > 0xFFFF) { + if (*start == '0') // no leading zeros allowed if > 0xFFFF + return 0; + } + else if (p - start != 4) // otherwise, check for exactly 4 hex digits + return 0; + if (*p == '\0') + break; + p++; + } + return u; +} diff --git a/contrib/groff/src/libs/libgroff/uniglyph.cpp b/contrib/groff/src/libs/libgroff/uniglyph.cpp new file mode 100644 index 000000000000..ab6f531e44a9 --- /dev/null +++ b/contrib/groff/src/libs/libgroff/uniglyph.cpp @@ -0,0 +1,504 @@ +// -*- C++ -*- +/* Copyright (C) 2002, 2003, 2004 + Free Software Foundation, Inc. + Written by Werner Lemberg + +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. */ + +#include "lib.h" +#include "stringclass.h" +#include "ptable.h" + +#include "unicode.h" + +struct unicode_to_glyph { + char *value; +}; + +declare_ptable(unicode_to_glyph) +implement_ptable(unicode_to_glyph) + +PTABLE(unicode_to_glyph) unicode_to_glyph_table; + +struct S { + const char *key; + const char *value; +} unicode_to_glyph_list[] = { + { "0021", "!" }, +//{ "0022", "\"" }, + { "0022", "dq" }, +//{ "0023", "#" }, + { "0023", "sh" }, +//{ "0024", "$" }, + { "0024", "Do" }, + { "0025", "%" }, + { "0026", "&" }, + { "0027", "aq" }, + { "0028", "(" }, + { "0029", ")" }, + { "002A", "*" }, +//{ "002B", "+" }, + { "002B", "pl" }, + { "002C", "," }, + { "002E", "." }, +//{ "002F", "/" }, + { "002F", "sl" }, + { "0030", "0" }, + { "0031", "1" }, + { "0032", "2" }, + { "0033", "3" }, + { "0034", "4" }, + { "0035", "5" }, + { "0036", "6" }, + { "0037", "7" }, + { "0038", "8" }, + { "0039", "9" }, + { "003A", ":" }, + { "003B", ";" }, + { "003C", "<" }, +//{ "003D", "=" }, + { "003D", "eq" }, + { "003D_0338", "!=" }, + { "003E", ">" }, + { "003F", "?" }, +//{ "0040", "@" }, + { "0040", "at" }, + { "0041", "A" }, + { "0041_0300", "`A" }, + { "0041_0301", "'A" }, + { "0041_0302", "^A" }, + { "0041_0303", "~A" }, + { "0041_0308", ":A" }, + { "0041_030A", "oA" }, + { "0042", "B" }, + { "0043", "C" }, + { "0043_0301", "'C" }, + { "0043_0327", ",C" }, + { "0044", "D" }, + { "0045", "E" }, + { "0045_0300", "`E" }, + { "0045_0301", "'E" }, + { "0045_0302", "^E" }, + { "0045_0308", ":E" }, + { "0046", "F" }, + { "0047", "G" }, + { "0048", "H" }, + { "0049", "I" }, + { "0049_0300", "`I" }, + { "0049_0301", "'I" }, + { "0049_0302", "^I" }, + { "0049_0308", ":I" }, + { "004A", "J" }, + { "004B", "K" }, + { "004C", "L" }, + { "004D", "M" }, + { "004E", "N" }, + { "004E_0303", "~N" }, + { "004F", "O" }, + { "004F_0300", "`O" }, + { "004F_0301", "'O" }, + { "004F_0302", "^O" }, + { "004F_0303", "~O" }, + { "004F_0308", ":O" }, + { "0050", "P" }, + { "0051", "Q" }, + { "0052", "R" }, + { "0053", "S" }, + { "0053_030C", "vS" }, + { "0054", "T" }, + { "0055", "U" }, + { "0055_0300", "`U" }, + { "0055_0301", "'U" }, + { "0055_0302", "^U" }, + { "0055_0308", ":U" }, + { "0056", "V" }, + { "0057", "W" }, + { "0058", "X" }, + { "0059", "Y" }, + { "0059_0301", "'Y" }, + { "0059_0308", ":Y" }, + { "005A", "Z" }, + { "005A_030C", "vZ" }, + { "005B", "lB" }, +//{ "005B", "[" }, + { "005C", "rs" }, +//{ "005C", "\\" }, + { "005D", "rB" }, +//{ "005D", "]" }, +//{ "005E", "^" }, +//{ "005E", "a^" }, + { "005E", "ha" }, +//{ "005F", "_" }, +//{ "005F", "ru" }, + { "005F", "ul" }, + { "0060", "ga" }, +//{ "0060", "\\`" }, + { "0061", "a" }, + { "0061_0300", "`a" }, + { "0061_0301", "'a" }, + { "0061_0302", "^a" }, + { "0061_0303", "~a" }, + { "0061_0308", ":a" }, + { "0061_030A", "oa" }, + { "0062", "b" }, + { "0063", "c" }, + { "0063_0301", "'c" }, + { "0063_0327", ",c" }, + { "0064", "d" }, + { "0065", "e" }, + { "0065_0300", "`e" }, + { "0065_0301", "'e" }, + { "0065_0302", "^e" }, + { "0065_0308", ":e" }, + { "0066", "f" }, + { "0066_0066", "ff" }, + { "0066_0066_0069", "Fi" }, + { "0066_0066_006C", "Fl" }, + { "0066_0069", "fi" }, + { "0066_006C", "fl" }, + { "0067", "g" }, + { "0068", "h" }, + { "0069", "i" }, + { "0069_0300", "`i" }, + { "0069_0301", "'i" }, + { "0069_0302", "^i" }, + { "0069_0308", ":i" }, + { "006A", "j" }, + { "006B", "k" }, + { "006C", "l" }, + { "006D", "m" }, + { "006E", "n" }, + { "006E_0303", "~n" }, + { "006F", "o" }, + { "006F_0300", "`o" }, + { "006F_0301", "'o" }, + { "006F_0302", "^o" }, + { "006F_0303", "~o" }, + { "006F_0308", ":o" }, + { "0070", "p" }, + { "0071", "q" }, + { "0072", "r" }, + { "0073", "s" }, + { "0073_030C", "vs" }, + { "0074", "t" }, + { "0075", "u" }, + { "0075_0300", "`u" }, + { "0075_0301", "'u" }, + { "0075_0302", "^u" }, + { "0075_0308", ":u" }, + { "0076", "v" }, + { "0077", "w" }, + { "0078", "x" }, + { "0079", "y" }, + { "0079_0301", "'y" }, + { "0079_0308", ":y" }, + { "007A", "z" }, + { "007A_030C", "vz" }, + { "007B", "lC" }, +//{ "007B", "{" }, + { "007C", "ba" }, +//{ "007C", "or" }, +//{ "007C", "|" }, + { "007D", "rC" }, +//{ "007D", "}" }, +//{ "007E", "a~" }, + { "007E", "ti" }, +//{ "007E", "~" }, + { "00A1", "r!" }, + { "00A2", "ct" }, + { "00A3", "Po" }, + { "00A4", "Cs" }, + { "00A5", "Ye" }, + { "00A6", "bb" }, + { "00A7", "sc" }, + { "00A8", "ad" }, + { "00A9", "co" }, + { "00AA", "Of" }, + { "00AB", "Fo" }, + { "00AC", "no" }, +//{ "00AC", "tno" }, + { "00AD", "shc" }, + { "00AE", "rg" }, + { "00AF", "a-" }, + { "00B0", "de" }, + { "00B1", "+-" }, +//{ "00B1", "t+-" }, + { "00B2", "S2" }, + { "00B3", "S3" }, + { "00B4", "aa" }, +//{ "00B4", "\\'" }, + { "00B5", "mc" }, + { "00B6", "ps" }, + { "00B7", "pc" }, + { "00B8", "ac" }, + { "00B9", "S1" }, + { "00BA", "Om" }, + { "00BB", "Fc" }, + { "00BC", "14" }, + { "00BD", "12" }, + { "00BE", "34" }, + { "00BF", "r?" }, + { "00C6", "AE" }, + { "00D0", "-D" }, + { "00D7", "mu" }, +//{ "00D7", "tmu" }, + { "00D8", "/O" }, + { "00DE", "TP" }, + { "00DF", "ss" }, + { "00E6", "ae" }, + { "00F0", "Sd" }, + { "00F7", "di" }, +//{ "00F7", "tdi" }, + { "00F8", "/o" }, + { "00FE", "Tp" }, + { "0131", ".i" }, + { "0132", "IJ" }, + { "0133", "ij" }, + { "0141", "/L" }, + { "0142", "/l" }, + { "0152", "OE" }, + { "0153", "oe" }, + { "0192", "Fn" }, + { "02C7", "ah" }, + { "02D8", "ab" }, + { "02D9", "a." }, + { "02DA", "ao" }, + { "02DB", "ho" }, + { "02DD", "a\"" }, + { "0391", "*A" }, + { "0392", "*B" }, + { "0393", "*G" }, + { "0394", "*D" }, + { "0395", "*E" }, + { "0396", "*Z" }, + { "0397", "*Y" }, + { "0398", "*H" }, + { "0399", "*I" }, + { "039A", "*K" }, + { "039B", "*L" }, + { "039C", "*M" }, + { "039D", "*N" }, + { "039E", "*C" }, + { "039F", "*O" }, + { "03A0", "*P" }, + { "03A1", "*R" }, + { "03A3", "*S" }, + { "03A4", "*T" }, + { "03A5", "*U" }, + { "03A6", "*F" }, + { "03A7", "*X" }, + { "03A8", "*Q" }, + { "03A9", "*W" }, + { "03B1", "*a" }, + { "03B2", "*b" }, + { "03B3", "*g" }, + { "03B4", "*d" }, + { "03B5", "*e" }, + { "03B6", "*z" }, + { "03B7", "*y" }, + { "03B8", "*h" }, + { "03B9", "*i" }, + { "03BA", "*k" }, + { "03BB", "*l" }, + { "03BC", "*m" }, + { "03BD", "*n" }, + { "03BE", "*c" }, + { "03BF", "*o" }, + { "03C0", "*p" }, + { "03C1", "*r" }, + { "03C2", "ts" }, + { "03C3", "*s" }, + { "03C4", "*t" }, + { "03C5", "*u" }, + { "03C6", "*f" }, + { "03C7", "*x" }, + { "03C8", "*q" }, + { "03C9", "*w" }, + { "03D1", "+h" }, + { "03D5", "+f" }, + { "03D6", "+p" }, + { "03F5", "+e" }, +//{ "2010", "-" }, + { "2010", "hy" }, + { "2013", "en" }, + { "2014", "em" }, +//{ "2018", "`" }, + { "2018", "oq" }, +//{ "2019", "'" }, + { "2019", "cq" }, + { "201A", "bq" }, + { "201C", "lq" }, + { "201D", "rq" }, + { "201E", "Bq" }, + { "2020", "dg" }, + { "2021", "dd" }, + { "2022", "bu" }, + { "2030", "%0" }, + { "2032", "fm" }, + { "2033", "sd" }, + { "2039", "fo" }, + { "203A", "fc" }, + { "203E", "rn" }, + { "2044", "f/" }, + { "20AC", "Eu" }, +//{ "20AC", "eu" }, + { "210F", "-h" }, +//{ "210F", "hbar" }, + { "2111", "Im" }, + { "2118", "wp" }, + { "211C", "Re" }, + { "2122", "tm" }, + { "2135", "Ah" }, + { "215B", "18" }, + { "215C", "38" }, + { "215D", "58" }, + { "215E", "78" }, + { "2190", "<-" }, + { "2191", "ua" }, + { "2192", "->" }, + { "2193", "da" }, + { "2194", "<>" }, + { "2195", "va" }, + { "21B5", "CR" }, + { "21D0", "lA" }, + { "21D1", "uA" }, + { "21D2", "rA" }, + { "21D3", "dA" }, + { "21D4", "hA" }, + { "21D5", "vA" }, + { "2200", "fa" }, + { "2202", "pd" }, + { "2203", "te" }, + { "2205", "es" }, + { "2207", "gr" }, + { "2208", "mo" }, + { "2208_0338", "nm" }, + { "220B", "st" }, + { "220F", "product" }, + { "2210", "coproduct" }, + { "2211", "sum" }, + { "2212", "mi" }, +//{ "2212", "\\-" }, + { "2213", "-+" }, + { "2217", "**" }, + { "221A", "sr" }, + { "221D", "pt" }, + { "221E", "if" }, + { "2220", "/_" }, + { "2227", "AN" }, + { "2228", "OR" }, + { "2229", "ca" }, + { "222A", "cu" }, + { "222B", "is" }, +//{ "222B", "integral" }, +//{ "2234", "3d" }, + { "2234", "tf" }, + { "223C", "ap" }, + { "2243", "|=" }, + { "2245", "=~" }, +//{ "2248", "~=" }, + { "2248", "~~" }, + { "2261", "==" }, + { "2261_0338", "ne" }, + { "2264", "<=" }, + { "2265", ">=" }, + { "226A", ">>" }, + { "226B", "<<" }, + { "2282", "sb" }, + { "2282_0338", "nb" }, + { "2283", "sp" }, + { "2283_0338", "nc" }, + { "2286", "ib" }, + { "2287", "ip" }, + { "2295", "c+" }, + { "2297", "c*" }, + { "22A5", "pp" }, + { "22C5", "md" }, + { "2308", "lc" }, + { "2309", "rc" }, + { "230A", "lf" }, + { "230B", "rf" }, + { "239B", "parenlefttp" }, + { "239C", "parenleftex" }, + { "239D", "parenleftbt" }, + { "239E", "parenrighttp" }, + { "239F", "parenrightex" }, + { "23A0", "parenrightbt" }, +//{ "23A1", "bracketlefttp" }, + { "23A2", "bracketleftex" }, +//{ "23A3", "bracketleftbt" }, +//{ "23A4", "bracketrighttp" }, + { "23A5", "bracketrightex" }, +//{ "23A6", "bracketrightbt" }, + { "23A7", "lt" }, +//{ "23A7", "bracelefttp" }, + { "23A8", "lk" }, +//{ "23A8", "braceleftmid" }, + { "23A9", "lb" }, +//{ "23A9", "braceleftbt" }, + { "23AA", "bv" }, +//{ "23AA", "braceex" }, +//{ "23AA", "braceleftex" }, +//{ "23AA", "bracerightex" }, + { "23AB", "rt" }, +//{ "23AB", "bracerighttp" }, + { "23AC", "rk" }, +//{ "23AC", "bracerightmid" }, + { "23AD", "rb" }, +//{ "23AD", "bracerightbt" }, + { "23AF", "an" }, + { "2502", "br" }, + { "251D", "rk" }, + { "2525", "lk" }, + { "256D", "lt" }, + { "256E", "rt" }, + { "256F", "rb" }, + { "2570", "lb" }, + { "25A1", "sq" }, + { "25CA", "lz" }, + { "25CB", "ci" }, + { "261C", "lh" }, + { "261E", "rh" }, + { "2660", "SP" }, + { "2663", "CL" }, + { "2665", "HE" }, + { "2666", "DI" }, + { "2713", "OK" }, + { "27E8", "la" }, + { "27E9", "ra" }, +}; + +// global constructor +static struct unicode_to_glyph_init { + unicode_to_glyph_init(); +} _unicode_to_glyph_init; + +unicode_to_glyph_init::unicode_to_glyph_init() { + for (unsigned int i = 0; + i < sizeof(unicode_to_glyph_list)/sizeof(unicode_to_glyph_list[0]); + i++) { + unicode_to_glyph *utg = new unicode_to_glyph[1]; + utg->value = (char *)unicode_to_glyph_list[i].value; + unicode_to_glyph_table.define(unicode_to_glyph_list[i].key, utg); + } +} + +const char *unicode_to_glyph_name(const char *s) +{ + unicode_to_glyph *result = unicode_to_glyph_table.lookup(s); + return result ? result->value : 0; +} diff --git a/contrib/groff/src/libs/libgroff/uniuni.cpp b/contrib/groff/src/libs/libgroff/uniuni.cpp new file mode 100644 index 000000000000..61bc8334ccf1 --- /dev/null +++ b/contrib/groff/src/libs/libgroff/uniuni.cpp @@ -0,0 +1,1994 @@ +// -*- C++ -*- +/* Copyright (C) 2002, 2003, 2004 + Free Software Foundation, Inc. + Written by Werner Lemberg + +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. */ + +// This code has been algorithmically derived from the file +// UnicodeData-3.2.0.txt, available from unicode.org. + +#include "lib.h" +#include "stringclass.h" +#include "ptable.h" + +#include "unicode.h" + +struct unicode_decompose { + char *value; +}; + +declare_ptable(unicode_decompose) +implement_ptable(unicode_decompose) + +PTABLE(unicode_decompose) unicode_decompose_table; + +// the first digit in the composite string gives the number of composites + +struct S { + const char *key; + const char *value; +} unicode_decompose_list[] = { + { "00C0", "20041_0300" }, + { "00C1", "20041_0301" }, + { "00C2", "20041_0302" }, + { "00C3", "20041_0303" }, + { "00C4", "20041_0308" }, + { "00C5", "20041_030A" }, + { "00C7", "20043_0327" }, + { "00C8", "20045_0300" }, + { "00C9", "20045_0301" }, + { "00CA", "20045_0302" }, + { "00CB", "20045_0308" }, + { "00CC", "20049_0300" }, + { "00CD", "20049_0301" }, + { "00CE", "20049_0302" }, + { "00CF", "20049_0308" }, + { "00D1", "2004E_0303" }, + { "00D2", "2004F_0300" }, + { "00D3", "2004F_0301" }, + { "00D4", "2004F_0302" }, + { "00D5", "2004F_0303" }, + { "00D6", "2004F_0308" }, + { "00D9", "20055_0300" }, + { "00DA", "20055_0301" }, + { "00DB", "20055_0302" }, + { "00DC", "20055_0308" }, + { "00DD", "20059_0301" }, + { "00E0", "20061_0300" }, + { "00E1", "20061_0301" }, + { "00E2", "20061_0302" }, + { "00E3", "20061_0303" }, + { "00E4", "20061_0308" }, + { "00E5", "20061_030A" }, + { "00E7", "20063_0327" }, + { "00E8", "20065_0300" }, + { "00E9", "20065_0301" }, + { "00EA", "20065_0302" }, + { "00EB", "20065_0308" }, + { "00EC", "20069_0300" }, + { "00ED", "20069_0301" }, + { "00EE", "20069_0302" }, + { "00EF", "20069_0308" }, + { "00F1", "2006E_0303" }, + { "00F2", "2006F_0300" }, + { "00F3", "2006F_0301" }, + { "00F4", "2006F_0302" }, + { "00F5", "2006F_0303" }, + { "00F6", "2006F_0308" }, + { "00F9", "20075_0300" }, + { "00FA", "20075_0301" }, + { "00FB", "20075_0302" }, + { "00FC", "20075_0308" }, + { "00FD", "20079_0301" }, + { "00FF", "20079_0308" }, + { "0100", "20041_0304" }, + { "0101", "20061_0304" }, + { "0102", "20041_0306" }, + { "0103", "20061_0306" }, + { "0104", "20041_0328" }, + { "0105", "20061_0328" }, + { "0106", "20043_0301" }, + { "0107", "20063_0301" }, + { "0108", "20043_0302" }, + { "0109", "20063_0302" }, + { "010A", "20043_0307" }, + { "010B", "20063_0307" }, + { "010C", "20043_030C" }, + { "010D", "20063_030C" }, + { "010E", "20044_030C" }, + { "010F", "20064_030C" }, + { "0112", "20045_0304" }, + { "0113", "20065_0304" }, + { "0114", "20045_0306" }, + { "0115", "20065_0306" }, + { "0116", "20045_0307" }, + { "0117", "20065_0307" }, + { "0118", "20045_0328" }, + { "0119", "20065_0328" }, + { "011A", "20045_030C" }, + { "011B", "20065_030C" }, + { "011C", "20047_0302" }, + { "011D", "20067_0302" }, + { "011E", "20047_0306" }, + { "011F", "20067_0306" }, + { "0120", "20047_0307" }, + { "0121", "20067_0307" }, + { "0122", "20047_0327" }, + { "0123", "20067_0327" }, + { "0124", "20048_0302" }, + { "0125", "20068_0302" }, + { "0128", "20049_0303" }, + { "0129", "20069_0303" }, + { "012A", "20049_0304" }, + { "012B", "20069_0304" }, + { "012C", "20049_0306" }, + { "012D", "20069_0306" }, + { "012E", "20049_0328" }, + { "012F", "20069_0328" }, + { "0130", "20049_0307" }, + { "0134", "2004A_0302" }, + { "0135", "2006A_0302" }, + { "0136", "2004B_0327" }, + { "0137", "2006B_0327" }, + { "0139", "2004C_0301" }, + { "013A", "2006C_0301" }, + { "013B", "2004C_0327" }, + { "013C", "2006C_0327" }, + { "013D", "2004C_030C" }, + { "013E", "2006C_030C" }, + { "0143", "2004E_0301" }, + { "0144", "2006E_0301" }, + { "0145", "2004E_0327" }, + { "0146", "2006E_0327" }, + { "0147", "2004E_030C" }, + { "0148", "2006E_030C" }, + { "014C", "2004F_0304" }, + { "014D", "2006F_0304" }, + { "014E", "2004F_0306" }, + { "014F", "2006F_0306" }, + { "0150", "2004F_030B" }, + { "0151", "2006F_030B" }, + { "0154", "20052_0301" }, + { "0155", "20072_0301" }, + { "0156", "20052_0327" }, + { "0157", "20072_0327" }, + { "0158", "20052_030C" }, + { "0159", "20072_030C" }, + { "015A", "20053_0301" }, + { "015B", "20073_0301" }, + { "015C", "20053_0302" }, + { "015D", "20073_0302" }, + { "015E", "20053_0327" }, + { "015F", "20073_0327" }, + { "0160", "20053_030C" }, + { "0161", "20073_030C" }, + { "0162", "20054_0327" }, + { "0163", "20074_0327" }, + { "0164", "20054_030C" }, + { "0165", "20074_030C" }, + { "0168", "20055_0303" }, + { "0169", "20075_0303" }, + { "016A", "20055_0304" }, + { "016B", "20075_0304" }, + { "016C", "20055_0306" }, + { "016D", "20075_0306" }, + { "016E", "20055_030A" }, + { "016F", "20075_030A" }, + { "0170", "20055_030B" }, + { "0171", "20075_030B" }, + { "0172", "20055_0328" }, + { "0173", "20075_0328" }, + { "0174", "20057_0302" }, + { "0175", "20077_0302" }, + { "0176", "20059_0302" }, + { "0177", "20079_0302" }, + { "0178", "20059_0308" }, + { "0179", "2005A_0301" }, + { "017A", "2007A_0301" }, + { "017B", "2005A_0307" }, + { "017C", "2007A_0307" }, + { "017D", "2005A_030C" }, + { "017E", "2007A_030C" }, + { "01A0", "2004F_031B" }, + { "01A1", "2006F_031B" }, + { "01AF", "20055_031B" }, + { "01B0", "20075_031B" }, + { "01CD", "20041_030C" }, + { "01CE", "20061_030C" }, + { "01CF", "20049_030C" }, + { "01D0", "20069_030C" }, + { "01D1", "2004F_030C" }, + { "01D2", "2006F_030C" }, + { "01D3", "20055_030C" }, + { "01D4", "20075_030C" }, + { "01D5", "30055_0308_0304" }, + { "01D6", "30075_0308_0304" }, + { "01D7", "30055_0308_0301" }, + { "01D8", "30075_0308_0301" }, + { "01D9", "30055_0308_030C" }, + { "01DA", "30075_0308_030C" }, + { "01DB", "30055_0308_0300" }, + { "01DC", "30075_0308_0300" }, + { "01DE", "30041_0308_0304" }, + { "01DF", "30061_0308_0304" }, + { "01E0", "30041_0307_0304" }, + { "01E1", "30061_0307_0304" }, + { "01E2", "200C6_0304" }, + { "01E3", "200E6_0304" }, + { "01E6", "20047_030C" }, + { "01E7", "20067_030C" }, + { "01E8", "2004B_030C" }, + { "01E9", "2006B_030C" }, + { "01EA", "2004F_0328" }, + { "01EB", "2006F_0328" }, + { "01EC", "3004F_0328_0304" }, + { "01ED", "3006F_0328_0304" }, + { "01EE", "201B7_030C" }, + { "01EF", "20292_030C" }, + { "01F0", "2006A_030C" }, + { "01F4", "20047_0301" }, + { "01F5", "20067_0301" }, + { "01F8", "2004E_0300" }, + { "01F9", "2006E_0300" }, + { "01FA", "30041_030A_0301" }, + { "01FB", "30061_030A_0301" }, + { "01FC", "200C6_0301" }, + { "01FD", "200E6_0301" }, + { "01FE", "200D8_0301" }, + { "01FF", "200F8_0301" }, + { "0200", "20041_030F" }, + { "0201", "20061_030F" }, + { "0202", "20041_0311" }, + { "0203", "20061_0311" }, + { "0204", "20045_030F" }, + { "0205", "20065_030F" }, + { "0206", "20045_0311" }, + { "0207", "20065_0311" }, + { "0208", "20049_030F" }, + { "0209", "20069_030F" }, + { "020A", "20049_0311" }, + { "020B", "20069_0311" }, + { "020C", "2004F_030F" }, + { "020D", "2006F_030F" }, + { "020E", "2004F_0311" }, + { "020F", "2006F_0311" }, + { "0210", "20052_030F" }, + { "0211", "20072_030F" }, + { "0212", "20052_0311" }, + { "0213", "20072_0311" }, + { "0214", "20055_030F" }, + { "0215", "20075_030F" }, + { "0216", "20055_0311" }, + { "0217", "20075_0311" }, + { "0218", "20053_0326" }, + { "0219", "20073_0326" }, + { "021A", "20054_0326" }, + { "021B", "20074_0326" }, + { "021E", "20048_030C" }, + { "021F", "20068_030C" }, + { "0226", "20041_0307" }, + { "0227", "20061_0307" }, + { "0228", "20045_0327" }, + { "0229", "20065_0327" }, + { "022A", "3004F_0308_0304" }, + { "022B", "3006F_0308_0304" }, + { "022C", "3004F_0303_0304" }, + { "022D", "3006F_0303_0304" }, + { "022E", "2004F_0307" }, + { "022F", "2006F_0307" }, + { "0230", "3004F_0307_0304" }, + { "0231", "3006F_0307_0304" }, + { "0232", "20059_0304" }, + { "0233", "20079_0304" }, + { "0340", "10300" }, + { "0341", "10301" }, + { "0343", "10313" }, + { "0344", "20308_0301" }, + { "0374", "102B9" }, + { "037E", "1003B" }, + { "0385", "200A8_0301" }, + { "0386", "20391_0301" }, + { "0387", "100B7" }, + { "0388", "20395_0301" }, + { "0389", "20397_0301" }, + { "038A", "20399_0301" }, + { "038C", "2039F_0301" }, + { "038E", "203A5_0301" }, + { "038F", "203A9_0301" }, + { "0390", "303B9_0308_0301" }, + { "03AA", "20399_0308" }, + { "03AB", "203A5_0308" }, + { "03AC", "203B1_0301" }, + { "03AD", "203B5_0301" }, + { "03AE", "203B7_0301" }, + { "03AF", "203B9_0301" }, + { "03B0", "303C5_0308_0301" }, + { "03CA", "203B9_0308" }, + { "03CB", "203C5_0308" }, + { "03CC", "203BF_0301" }, + { "03CD", "203C5_0301" }, + { "03CE", "203C9_0301" }, + { "03D3", "203D2_0301" }, + { "03D4", "203D2_0308" }, + { "0400", "20415_0300" }, + { "0401", "20415_0308" }, + { "0403", "20413_0301" }, + { "0407", "20406_0308" }, + { "040C", "2041A_0301" }, + { "040D", "20418_0300" }, + { "040E", "20423_0306" }, + { "0419", "20418_0306" }, + { "0439", "20438_0306" }, + { "0450", "20435_0300" }, + { "0451", "20435_0308" }, + { "0453", "20433_0301" }, + { "0457", "20456_0308" }, + { "045C", "2043A_0301" }, + { "045D", "20438_0300" }, + { "045E", "20443_0306" }, + { "0476", "20474_030F" }, + { "0477", "20475_030F" }, + { "04C1", "20416_0306" }, + { "04C2", "20436_0306" }, + { "04D0", "20410_0306" }, + { "04D1", "20430_0306" }, + { "04D2", "20410_0308" }, + { "04D3", "20430_0308" }, + { "04D6", "20415_0306" }, + { "04D7", "20435_0306" }, + { "04DA", "204D8_0308" }, + { "04DB", "204D9_0308" }, + { "04DC", "20416_0308" }, + { "04DD", "20436_0308" }, + { "04DE", "20417_0308" }, + { "04DF", "20437_0308" }, + { "04E2", "20418_0304" }, + { "04E3", "20438_0304" }, + { "04E4", "20418_0308" }, + { "04E5", "20438_0308" }, + { "04E6", "2041E_0308" }, + { "04E7", "2043E_0308" }, + { "04EA", "204E8_0308" }, + { "04EB", "204E9_0308" }, + { "04EC", "2042D_0308" }, + { "04ED", "2044D_0308" }, + { "04EE", "20423_0304" }, + { "04EF", "20443_0304" }, + { "04F0", "20423_0308" }, + { "04F1", "20443_0308" }, + { "04F2", "20423_030B" }, + { "04F3", "20443_030B" }, + { "04F4", "20427_0308" }, + { "04F5", "20447_0308" }, + { "04F8", "2042B_0308" }, + { "04F9", "2044B_0308" }, + { "0622", "20627_0653" }, + { "0623", "20627_0654" }, + { "0624", "20648_0654" }, + { "0625", "20627_0655" }, + { "0626", "2064A_0654" }, + { "06C0", "206D5_0654" }, + { "06C2", "206C1_0654" }, + { "06D3", "206D2_0654" }, + { "0929", "20928_093C" }, + { "0931", "20930_093C" }, + { "0934", "20933_093C" }, + { "0958", "20915_093C" }, + { "0959", "20916_093C" }, + { "095A", "20917_093C" }, + { "095B", "2091C_093C" }, + { "095C", "20921_093C" }, + { "095D", "20922_093C" }, + { "095E", "2092B_093C" }, + { "095F", "2092F_093C" }, + { "09CB", "209C7_09BE" }, + { "09CC", "209C7_09D7" }, + { "09DC", "209A1_09BC" }, + { "09DD", "209A2_09BC" }, + { "09DF", "209AF_09BC" }, + { "0A33", "20A32_0A3C" }, + { "0A36", "20A38_0A3C" }, + { "0A59", "20A16_0A3C" }, + { "0A5A", "20A17_0A3C" }, + { "0A5B", "20A1C_0A3C" }, + { "0A5E", "20A2B_0A3C" }, + { "0B48", "20B47_0B56" }, + { "0B4B", "20B47_0B3E" }, + { "0B4C", "20B47_0B57" }, + { "0B5C", "20B21_0B3C" }, + { "0B5D", "20B22_0B3C" }, + { "0B94", "20B92_0BD7" }, + { "0BCA", "20BC6_0BBE" }, + { "0BCB", "20BC7_0BBE" }, + { "0BCC", "20BC6_0BD7" }, + { "0C48", "20C46_0C56" }, + { "0CC0", "20CBF_0CD5" }, + { "0CC7", "20CC6_0CD5" }, + { "0CC8", "20CC6_0CD6" }, + { "0CCA", "20CC6_0CC2" }, + { "0CCB", "30CC6_0CC2_0CD5" }, + { "0D4A", "20D46_0D3E" }, + { "0D4B", "20D47_0D3E" }, + { "0D4C", "20D46_0D57" }, + { "0DDA", "20DD9_0DCA" }, + { "0DDC", "20DD9_0DCF" }, + { "0DDD", "30DD9_0DCF_0DCA" }, + { "0DDE", "20DD9_0DDF" }, + { "0F43", "20F42_0FB7" }, + { "0F4D", "20F4C_0FB7" }, + { "0F52", "20F51_0FB7" }, + { "0F57", "20F56_0FB7" }, + { "0F5C", "20F5B_0FB7" }, + { "0F69", "20F40_0FB5" }, + { "0F73", "20F71_0F72" }, + { "0F75", "20F71_0F74" }, + { "0F76", "20FB2_0F80" }, + { "0F78", "20FB3_0F80" }, + { "0F81", "20F71_0F80" }, + { "0F93", "20F92_0FB7" }, + { "0F9D", "20F9C_0FB7" }, + { "0FA2", "20FA1_0FB7" }, + { "0FA7", "20FA6_0FB7" }, + { "0FAC", "20FAB_0FB7" }, + { "0FB9", "20F90_0FB5" }, + { "1026", "21025_102E" }, + { "1E00", "20041_0325" }, + { "1E01", "20061_0325" }, + { "1E02", "20042_0307" }, + { "1E03", "20062_0307" }, + { "1E04", "20042_0323" }, + { "1E05", "20062_0323" }, + { "1E06", "20042_0331" }, + { "1E07", "20062_0331" }, + { "1E08", "30043_0327_0301" }, + { "1E09", "30063_0327_0301" }, + { "1E0A", "20044_0307" }, + { "1E0B", "20064_0307" }, + { "1E0C", "20044_0323" }, + { "1E0D", "20064_0323" }, + { "1E0E", "20044_0331" }, + { "1E0F", "20064_0331" }, + { "1E10", "20044_0327" }, + { "1E11", "20064_0327" }, + { "1E12", "20044_032D" }, + { "1E13", "20064_032D" }, + { "1E14", "30045_0304_0300" }, + { "1E15", "30065_0304_0300" }, + { "1E16", "30045_0304_0301" }, + { "1E17", "30065_0304_0301" }, + { "1E18", "20045_032D" }, + { "1E19", "20065_032D" }, + { "1E1A", "20045_0330" }, + { "1E1B", "20065_0330" }, + { "1E1C", "30045_0327_0306" }, + { "1E1D", "30065_0327_0306" }, + { "1E1E", "20046_0307" }, + { "1E1F", "20066_0307" }, + { "1E20", "20047_0304" }, + { "1E21", "20067_0304" }, + { "1E22", "20048_0307" }, + { "1E23", "20068_0307" }, + { "1E24", "20048_0323" }, + { "1E25", "20068_0323" }, + { "1E26", "20048_0308" }, + { "1E27", "20068_0308" }, + { "1E28", "20048_0327" }, + { "1E29", "20068_0327" }, + { "1E2A", "20048_032E" }, + { "1E2B", "20068_032E" }, + { "1E2C", "20049_0330" }, + { "1E2D", "20069_0330" }, + { "1E2E", "30049_0308_0301" }, + { "1E2F", "30069_0308_0301" }, + { "1E30", "2004B_0301" }, + { "1E31", "2006B_0301" }, + { "1E32", "2004B_0323" }, + { "1E33", "2006B_0323" }, + { "1E34", "2004B_0331" }, + { "1E35", "2006B_0331" }, + { "1E36", "2004C_0323" }, + { "1E37", "2006C_0323" }, + { "1E38", "3004C_0323_0304" }, + { "1E39", "3006C_0323_0304" }, + { "1E3A", "2004C_0331" }, + { "1E3B", "2006C_0331" }, + { "1E3C", "2004C_032D" }, + { "1E3D", "2006C_032D" }, + { "1E3E", "2004D_0301" }, + { "1E3F", "2006D_0301" }, + { "1E40", "2004D_0307" }, + { "1E41", "2006D_0307" }, + { "1E42", "2004D_0323" }, + { "1E43", "2006D_0323" }, + { "1E44", "2004E_0307" }, + { "1E45", "2006E_0307" }, + { "1E46", "2004E_0323" }, + { "1E47", "2006E_0323" }, + { "1E48", "2004E_0331" }, + { "1E49", "2006E_0331" }, + { "1E4A", "2004E_032D" }, + { "1E4B", "2006E_032D" }, + { "1E4C", "3004F_0303_0301" }, + { "1E4D", "3006F_0303_0301" }, + { "1E4E", "3004F_0303_0308" }, + { "1E4F", "3006F_0303_0308" }, + { "1E50", "3004F_0304_0300" }, + { "1E51", "3006F_0304_0300" }, + { "1E52", "3004F_0304_0301" }, + { "1E53", "3006F_0304_0301" }, + { "1E54", "20050_0301" }, + { "1E55", "20070_0301" }, + { "1E56", "20050_0307" }, + { "1E57", "20070_0307" }, + { "1E58", "20052_0307" }, + { "1E59", "20072_0307" }, + { "1E5A", "20052_0323" }, + { "1E5B", "20072_0323" }, + { "1E5C", "30052_0323_0304" }, + { "1E5D", "30072_0323_0304" }, + { "1E5E", "20052_0331" }, + { "1E5F", "20072_0331" }, + { "1E60", "20053_0307" }, + { "1E61", "20073_0307" }, + { "1E62", "20053_0323" }, + { "1E63", "20073_0323" }, + { "1E64", "30053_0301_0307" }, + { "1E65", "30073_0301_0307" }, + { "1E66", "30053_030C_0307" }, + { "1E67", "30073_030C_0307" }, + { "1E68", "30053_0323_0307" }, + { "1E69", "30073_0323_0307" }, + { "1E6A", "20054_0307" }, + { "1E6B", "20074_0307" }, + { "1E6C", "20054_0323" }, + { "1E6D", "20074_0323" }, + { "1E6E", "20054_0331" }, + { "1E6F", "20074_0331" }, + { "1E70", "20054_032D" }, + { "1E71", "20074_032D" }, + { "1E72", "20055_0324" }, + { "1E73", "20075_0324" }, + { "1E74", "20055_0330" }, + { "1E75", "20075_0330" }, + { "1E76", "20055_032D" }, + { "1E77", "20075_032D" }, + { "1E78", "30055_0303_0301" }, + { "1E79", "30075_0303_0301" }, + { "1E7A", "30055_0304_0308" }, + { "1E7B", "30075_0304_0308" }, + { "1E7C", "20056_0303" }, + { "1E7D", "20076_0303" }, + { "1E7E", "20056_0323" }, + { "1E7F", "20076_0323" }, + { "1E80", "20057_0300" }, + { "1E81", "20077_0300" }, + { "1E82", "20057_0301" }, + { "1E83", "20077_0301" }, + { "1E84", "20057_0308" }, + { "1E85", "20077_0308" }, + { "1E86", "20057_0307" }, + { "1E87", "20077_0307" }, + { "1E88", "20057_0323" }, + { "1E89", "20077_0323" }, + { "1E8A", "20058_0307" }, + { "1E8B", "20078_0307" }, + { "1E8C", "20058_0308" }, + { "1E8D", "20078_0308" }, + { "1E8E", "20059_0307" }, + { "1E8F", "20079_0307" }, + { "1E90", "2005A_0302" }, + { "1E91", "2007A_0302" }, + { "1E92", "2005A_0323" }, + { "1E93", "2007A_0323" }, + { "1E94", "2005A_0331" }, + { "1E95", "2007A_0331" }, + { "1E96", "20068_0331" }, + { "1E97", "20074_0308" }, + { "1E98", "20077_030A" }, + { "1E99", "20079_030A" }, + { "1E9B", "2017F_0307" }, + { "1EA0", "20041_0323" }, + { "1EA1", "20061_0323" }, + { "1EA2", "20041_0309" }, + { "1EA3", "20061_0309" }, + { "1EA4", "30041_0302_0301" }, + { "1EA5", "30061_0302_0301" }, + { "1EA6", "30041_0302_0300" }, + { "1EA7", "30061_0302_0300" }, + { "1EA8", "30041_0302_0309" }, + { "1EA9", "30061_0302_0309" }, + { "1EAA", "30041_0302_0303" }, + { "1EAB", "30061_0302_0303" }, + { "1EAC", "30041_0323_0302" }, + { "1EAD", "30061_0323_0302" }, + { "1EAE", "30041_0306_0301" }, + { "1EAF", "30061_0306_0301" }, + { "1EB0", "30041_0306_0300" }, + { "1EB1", "30061_0306_0300" }, + { "1EB2", "30041_0306_0309" }, + { "1EB3", "30061_0306_0309" }, + { "1EB4", "30041_0306_0303" }, + { "1EB5", "30061_0306_0303" }, + { "1EB6", "30041_0323_0306" }, + { "1EB7", "30061_0323_0306" }, + { "1EB8", "20045_0323" }, + { "1EB9", "20065_0323" }, + { "1EBA", "20045_0309" }, + { "1EBB", "20065_0309" }, + { "1EBC", "20045_0303" }, + { "1EBD", "20065_0303" }, + { "1EBE", "30045_0302_0301" }, + { "1EBF", "30065_0302_0301" }, + { "1EC0", "30045_0302_0300" }, + { "1EC1", "30065_0302_0300" }, + { "1EC2", "30045_0302_0309" }, + { "1EC3", "30065_0302_0309" }, + { "1EC4", "30045_0302_0303" }, + { "1EC5", "30065_0302_0303" }, + { "1EC6", "30045_0323_0302" }, + { "1EC7", "30065_0323_0302" }, + { "1EC8", "20049_0309" }, + { "1EC9", "20069_0309" }, + { "1ECA", "20049_0323" }, + { "1ECB", "20069_0323" }, + { "1ECC", "2004F_0323" }, + { "1ECD", "2006F_0323" }, + { "1ECE", "2004F_0309" }, + { "1ECF", "2006F_0309" }, + { "1ED0", "3004F_0302_0301" }, + { "1ED1", "3006F_0302_0301" }, + { "1ED2", "3004F_0302_0300" }, + { "1ED3", "3006F_0302_0300" }, + { "1ED4", "3004F_0302_0309" }, + { "1ED5", "3006F_0302_0309" }, + { "1ED6", "3004F_0302_0303" }, + { "1ED7", "3006F_0302_0303" }, + { "1ED8", "3004F_0323_0302" }, + { "1ED9", "3006F_0323_0302" }, + { "1EDA", "3004F_031B_0301" }, + { "1EDB", "3006F_031B_0301" }, + { "1EDC", "3004F_031B_0300" }, + { "1EDD", "3006F_031B_0300" }, + { "1EDE", "3004F_031B_0309" }, + { "1EDF", "3006F_031B_0309" }, + { "1EE0", "3004F_031B_0303" }, + { "1EE1", "3006F_031B_0303" }, + { "1EE2", "3004F_031B_0323" }, + { "1EE3", "3006F_031B_0323" }, + { "1EE4", "20055_0323" }, + { "1EE5", "20075_0323" }, + { "1EE6", "20055_0309" }, + { "1EE7", "20075_0309" }, + { "1EE8", "30055_031B_0301" }, + { "1EE9", "30075_031B_0301" }, + { "1EEA", "30055_031B_0300" }, + { "1EEB", "30075_031B_0300" }, + { "1EEC", "30055_031B_0309" }, + { "1EED", "30075_031B_0309" }, + { "1EEE", "30055_031B_0303" }, + { "1EEF", "30075_031B_0303" }, + { "1EF0", "30055_031B_0323" }, + { "1EF1", "30075_031B_0323" }, + { "1EF2", "20059_0300" }, + { "1EF3", "20079_0300" }, + { "1EF4", "20059_0323" }, + { "1EF5", "20079_0323" }, + { "1EF6", "20059_0309" }, + { "1EF7", "20079_0309" }, + { "1EF8", "20059_0303" }, + { "1EF9", "20079_0303" }, + { "1F00", "203B1_0313" }, + { "1F01", "203B1_0314" }, + { "1F02", "303B1_0313_0300" }, + { "1F03", "303B1_0314_0300" }, + { "1F04", "303B1_0313_0301" }, + { "1F05", "303B1_0314_0301" }, + { "1F06", "303B1_0313_0342" }, + { "1F07", "303B1_0314_0342" }, + { "1F08", "20391_0313" }, + { "1F09", "20391_0314" }, + { "1F0A", "30391_0313_0300" }, + { "1F0B", "30391_0314_0300" }, + { "1F0C", "30391_0313_0301" }, + { "1F0D", "30391_0314_0301" }, + { "1F0E", "30391_0313_0342" }, + { "1F0F", "30391_0314_0342" }, + { "1F10", "203B5_0313" }, + { "1F11", "203B5_0314" }, + { "1F12", "303B5_0313_0300" }, + { "1F13", "303B5_0314_0300" }, + { "1F14", "303B5_0313_0301" }, + { "1F15", "303B5_0314_0301" }, + { "1F18", "20395_0313" }, + { "1F19", "20395_0314" }, + { "1F1A", "30395_0313_0300" }, + { "1F1B", "30395_0314_0300" }, + { "1F1C", "30395_0313_0301" }, + { "1F1D", "30395_0314_0301" }, + { "1F20", "203B7_0313" }, + { "1F21", "203B7_0314" }, + { "1F22", "303B7_0313_0300" }, + { "1F23", "303B7_0314_0300" }, + { "1F24", "303B7_0313_0301" }, + { "1F25", "303B7_0314_0301" }, + { "1F26", "303B7_0313_0342" }, + { "1F27", "303B7_0314_0342" }, + { "1F28", "20397_0313" }, + { "1F29", "20397_0314" }, + { "1F2A", "30397_0313_0300" }, + { "1F2B", "30397_0314_0300" }, + { "1F2C", "30397_0313_0301" }, + { "1F2D", "30397_0314_0301" }, + { "1F2E", "30397_0313_0342" }, + { "1F2F", "30397_0314_0342" }, + { "1F30", "203B9_0313" }, + { "1F31", "203B9_0314" }, + { "1F32", "303B9_0313_0300" }, + { "1F33", "303B9_0314_0300" }, + { "1F34", "303B9_0313_0301" }, + { "1F35", "303B9_0314_0301" }, + { "1F36", "303B9_0313_0342" }, + { "1F37", "303B9_0314_0342" }, + { "1F38", "20399_0313" }, + { "1F39", "20399_0314" }, + { "1F3A", "30399_0313_0300" }, + { "1F3B", "30399_0314_0300" }, + { "1F3C", "30399_0313_0301" }, + { "1F3D", "30399_0314_0301" }, + { "1F3E", "30399_0313_0342" }, + { "1F3F", "30399_0314_0342" }, + { "1F40", "203BF_0313" }, + { "1F41", "203BF_0314" }, + { "1F42", "303BF_0313_0300" }, + { "1F43", "303BF_0314_0300" }, + { "1F44", "303BF_0313_0301" }, + { "1F45", "303BF_0314_0301" }, + { "1F48", "2039F_0313" }, + { "1F49", "2039F_0314" }, + { "1F4A", "3039F_0313_0300" }, + { "1F4B", "3039F_0314_0300" }, + { "1F4C", "3039F_0313_0301" }, + { "1F4D", "3039F_0314_0301" }, + { "1F50", "203C5_0313" }, + { "1F51", "203C5_0314" }, + { "1F52", "303C5_0313_0300" }, + { "1F53", "303C5_0314_0300" }, + { "1F54", "303C5_0313_0301" }, + { "1F55", "303C5_0314_0301" }, + { "1F56", "303C5_0313_0342" }, + { "1F57", "303C5_0314_0342" }, + { "1F59", "203A5_0314" }, + { "1F5B", "303A5_0314_0300" }, + { "1F5D", "303A5_0314_0301" }, + { "1F5F", "303A5_0314_0342" }, + { "1F60", "203C9_0313" }, + { "1F61", "203C9_0314" }, + { "1F62", "303C9_0313_0300" }, + { "1F63", "303C9_0314_0300" }, + { "1F64", "303C9_0313_0301" }, + { "1F65", "303C9_0314_0301" }, + { "1F66", "303C9_0313_0342" }, + { "1F67", "303C9_0314_0342" }, + { "1F68", "203A9_0313" }, + { "1F69", "203A9_0314" }, + { "1F6A", "303A9_0313_0300" }, + { "1F6B", "303A9_0314_0300" }, + { "1F6C", "303A9_0313_0301" }, + { "1F6D", "303A9_0314_0301" }, + { "1F6E", "303A9_0313_0342" }, + { "1F6F", "303A9_0314_0342" }, + { "1F70", "203B1_0300" }, + { "1F71", "203B1_0301" }, + { "1F72", "203B5_0300" }, + { "1F73", "203B5_0301" }, + { "1F74", "203B7_0300" }, + { "1F75", "203B7_0301" }, + { "1F76", "203B9_0300" }, + { "1F77", "203B9_0301" }, + { "1F78", "203BF_0300" }, + { "1F79", "203BF_0301" }, + { "1F7A", "203C5_0300" }, + { "1F7B", "203C5_0301" }, + { "1F7C", "203C9_0300" }, + { "1F7D", "203C9_0301" }, + { "1F80", "303B1_0313_0345" }, + { "1F81", "303B1_0314_0345" }, + { "1F82", "403B1_0313_0300_0345" }, + { "1F83", "403B1_0314_0300_0345" }, + { "1F84", "403B1_0313_0301_0345" }, + { "1F85", "403B1_0314_0301_0345" }, + { "1F86", "403B1_0313_0342_0345" }, + { "1F87", "403B1_0314_0342_0345" }, + { "1F88", "30391_0313_0345" }, + { "1F89", "30391_0314_0345" }, + { "1F8A", "40391_0313_0300_0345" }, + { "1F8B", "40391_0314_0300_0345" }, + { "1F8C", "40391_0313_0301_0345" }, + { "1F8D", "40391_0314_0301_0345" }, + { "1F8E", "40391_0313_0342_0345" }, + { "1F8F", "40391_0314_0342_0345" }, + { "1F90", "303B7_0313_0345" }, + { "1F91", "303B7_0314_0345" }, + { "1F92", "403B7_0313_0300_0345" }, + { "1F93", "403B7_0314_0300_0345" }, + { "1F94", "403B7_0313_0301_0345" }, + { "1F95", "403B7_0314_0301_0345" }, + { "1F96", "403B7_0313_0342_0345" }, + { "1F97", "403B7_0314_0342_0345" }, + { "1F98", "30397_0313_0345" }, + { "1F99", "30397_0314_0345" }, + { "1F9A", "40397_0313_0300_0345" }, + { "1F9B", "40397_0314_0300_0345" }, + { "1F9C", "40397_0313_0301_0345" }, + { "1F9D", "40397_0314_0301_0345" }, + { "1F9E", "40397_0313_0342_0345" }, + { "1F9F", "40397_0314_0342_0345" }, + { "1FA0", "303C9_0313_0345" }, + { "1FA1", "303C9_0314_0345" }, + { "1FA2", "403C9_0313_0300_0345" }, + { "1FA3", "403C9_0314_0300_0345" }, + { "1FA4", "403C9_0313_0301_0345" }, + { "1FA5", "403C9_0314_0301_0345" }, + { "1FA6", "403C9_0313_0342_0345" }, + { "1FA7", "403C9_0314_0342_0345" }, + { "1FA8", "303A9_0313_0345" }, + { "1FA9", "303A9_0314_0345" }, + { "1FAA", "403A9_0313_0300_0345" }, + { "1FAB", "403A9_0314_0300_0345" }, + { "1FAC", "403A9_0313_0301_0345" }, + { "1FAD", "403A9_0314_0301_0345" }, + { "1FAE", "403A9_0313_0342_0345" }, + { "1FAF", "403A9_0314_0342_0345" }, + { "1FB0", "203B1_0306" }, + { "1FB1", "203B1_0304" }, + { "1FB2", "303B1_0300_0345" }, + { "1FB3", "203B1_0345" }, + { "1FB4", "303B1_0301_0345" }, + { "1FB6", "203B1_0342" }, + { "1FB7", "303B1_0342_0345" }, + { "1FB8", "20391_0306" }, + { "1FB9", "20391_0304" }, + { "1FBA", "20391_0300" }, + { "1FBB", "20391_0301" }, + { "1FBC", "20391_0345" }, + { "1FBE", "103B9" }, + { "1FC1", "200A8_0342" }, + { "1FC2", "303B7_0300_0345" }, + { "1FC3", "203B7_0345" }, + { "1FC4", "303B7_0301_0345" }, + { "1FC6", "203B7_0342" }, + { "1FC7", "303B7_0342_0345" }, + { "1FC8", "20395_0300" }, + { "1FC9", "20395_0301" }, + { "1FCA", "20397_0300" }, + { "1FCB", "20397_0301" }, + { "1FCC", "20397_0345" }, + { "1FCD", "21FBF_0300" }, + { "1FCE", "21FBF_0301" }, + { "1FCF", "21FBF_0342" }, + { "1FD0", "203B9_0306" }, + { "1FD1", "203B9_0304" }, + { "1FD2", "303B9_0308_0300" }, + { "1FD3", "303B9_0308_0301" }, + { "1FD6", "203B9_0342" }, + { "1FD7", "303B9_0308_0342" }, + { "1FD8", "20399_0306" }, + { "1FD9", "20399_0304" }, + { "1FDA", "20399_0300" }, + { "1FDB", "20399_0301" }, + { "1FDD", "21FFE_0300" }, + { "1FDE", "21FFE_0301" }, + { "1FDF", "21FFE_0342" }, + { "1FE0", "203C5_0306" }, + { "1FE1", "203C5_0304" }, + { "1FE2", "303C5_0308_0300" }, + { "1FE3", "303C5_0308_0301" }, + { "1FE4", "203C1_0313" }, + { "1FE5", "203C1_0314" }, + { "1FE6", "203C5_0342" }, + { "1FE7", "303C5_0308_0342" }, + { "1FE8", "203A5_0306" }, + { "1FE9", "203A5_0304" }, + { "1FEA", "203A5_0300" }, + { "1FEB", "203A5_0301" }, + { "1FEC", "203A1_0314" }, + { "1FED", "200A8_0300" }, + { "1FEE", "200A8_0301" }, + { "1FEF", "10060" }, + { "1FF2", "303C9_0300_0345" }, + { "1FF3", "203C9_0345" }, + { "1FF4", "303C9_0301_0345" }, + { "1FF6", "203C9_0342" }, + { "1FF7", "303C9_0342_0345" }, + { "1FF8", "2039F_0300" }, + { "1FF9", "2039F_0301" }, + { "1FFA", "203A9_0300" }, + { "1FFB", "203A9_0301" }, + { "1FFC", "203A9_0345" }, + { "1FFD", "100B4" }, + { "2000", "12002" }, + { "2001", "12003" }, + { "2126", "103A9" }, + { "212A", "1004B" }, + { "212B", "20041_030A" }, + { "219A", "22190_0338" }, + { "219B", "22192_0338" }, + { "21AE", "22194_0338" }, + { "21CD", "221D0_0338" }, + { "21CE", "221D4_0338" }, + { "21CF", "221D2_0338" }, + { "2204", "22203_0338" }, + { "2209", "22208_0338" }, + { "220C", "2220B_0338" }, + { "2224", "22223_0338" }, + { "2226", "22225_0338" }, + { "2241", "2223C_0338" }, + { "2244", "22243_0338" }, + { "2247", "22245_0338" }, + { "2249", "22248_0338" }, + { "2260", "2003D_0338" }, + { "2262", "22261_0338" }, + { "226D", "2224D_0338" }, + { "226E", "2003C_0338" }, + { "226F", "2003E_0338" }, + { "2270", "22264_0338" }, + { "2271", "22265_0338" }, + { "2274", "22272_0338" }, + { "2275", "22273_0338" }, + { "2278", "22276_0338" }, + { "2279", "22277_0338" }, + { "2280", "2227A_0338" }, + { "2281", "2227B_0338" }, + { "2284", "22282_0338" }, + { "2285", "22283_0338" }, + { "2288", "22286_0338" }, + { "2289", "22287_0338" }, + { "22AC", "222A2_0338" }, + { "22AD", "222A8_0338" }, + { "22AE", "222A9_0338" }, + { "22AF", "222AB_0338" }, + { "22E0", "2227C_0338" }, + { "22E1", "2227D_0338" }, + { "22E2", "22291_0338" }, + { "22E3", "22292_0338" }, + { "22EA", "222B2_0338" }, + { "22EB", "222B3_0338" }, + { "22EC", "222B4_0338" }, + { "22ED", "222B5_0338" }, + { "2329", "13008" }, + { "232A", "13009" }, + { "2ADC", "22ADD_0338" }, + { "304C", "2304B_3099" }, + { "304E", "2304D_3099" }, + { "3050", "2304F_3099" }, + { "3052", "23051_3099" }, + { "3054", "23053_3099" }, + { "3056", "23055_3099" }, + { "3058", "23057_3099" }, + { "305A", "23059_3099" }, + { "305C", "2305B_3099" }, + { "305E", "2305D_3099" }, + { "3060", "2305F_3099" }, + { "3062", "23061_3099" }, + { "3065", "23064_3099" }, + { "3067", "23066_3099" }, + { "3069", "23068_3099" }, + { "3070", "2306F_3099" }, + { "3071", "2306F_309A" }, + { "3073", "23072_3099" }, + { "3074", "23072_309A" }, + { "3076", "23075_3099" }, + { "3077", "23075_309A" }, + { "3079", "23078_3099" }, + { "307A", "23078_309A" }, + { "307C", "2307B_3099" }, + { "307D", "2307B_309A" }, + { "3094", "23046_3099" }, + { "309E", "2309D_3099" }, + { "30AC", "230AB_3099" }, + { "30AE", "230AD_3099" }, + { "30B0", "230AF_3099" }, + { "30B2", "230B1_3099" }, + { "30B4", "230B3_3099" }, + { "30B6", "230B5_3099" }, + { "30B8", "230B7_3099" }, + { "30BA", "230B9_3099" }, + { "30BC", "230BB_3099" }, + { "30BE", "230BD_3099" }, + { "30C0", "230BF_3099" }, + { "30C2", "230C1_3099" }, + { "30C5", "230C4_3099" }, + { "30C7", "230C6_3099" }, + { "30C9", "230C8_3099" }, + { "30D0", "230CF_3099" }, + { "30D1", "230CF_309A" }, + { "30D3", "230D2_3099" }, + { "30D4", "230D2_309A" }, + { "30D6", "230D5_3099" }, + { "30D7", "230D5_309A" }, + { "30D9", "230D8_3099" }, + { "30DA", "230D8_309A" }, + { "30DC", "230DB_3099" }, + { "30DD", "230DB_309A" }, + { "30F4", "230A6_3099" }, + { "30F7", "230EF_3099" }, + { "30F8", "230F0_3099" }, + { "30F9", "230F1_3099" }, + { "30FA", "230F2_3099" }, + { "30FE", "230FD_3099" }, + { "F900", "18C48" }, + { "F901", "166F4" }, + { "F902", "18ECA" }, + { "F903", "18CC8" }, + { "F904", "16ED1" }, + { "F905", "14E32" }, + { "F906", "153E5" }, + { "F907", "19F9C" }, + { "F908", "19F9C" }, + { "F909", "15951" }, + { "F90A", "191D1" }, + { "F90B", "15587" }, + { "F90C", "15948" }, + { "F90D", "161F6" }, + { "F90E", "17669" }, + { "F90F", "17F85" }, + { "F910", "1863F" }, + { "F911", "187BA" }, + { "F912", "188F8" }, + { "F913", "1908F" }, + { "F914", "16A02" }, + { "F915", "16D1B" }, + { "F916", "170D9" }, + { "F917", "173DE" }, + { "F918", "1843D" }, + { "F919", "1916A" }, + { "F91A", "199F1" }, + { "F91B", "14E82" }, + { "F91C", "15375" }, + { "F91D", "16B04" }, + { "F91E", "1721B" }, + { "F91F", "1862D" }, + { "F920", "19E1E" }, + { "F921", "15D50" }, + { "F922", "16FEB" }, + { "F923", "185CD" }, + { "F924", "18964" }, + { "F925", "162C9" }, + { "F926", "181D8" }, + { "F927", "1881F" }, + { "F928", "15ECA" }, + { "F929", "16717" }, + { "F92A", "16D6A" }, + { "F92B", "172FC" }, + { "F92C", "190CE" }, + { "F92D", "14F86" }, + { "F92E", "151B7" }, + { "F92F", "152DE" }, + { "F930", "164C4" }, + { "F931", "16AD3" }, + { "F932", "17210" }, + { "F933", "176E7" }, + { "F934", "18001" }, + { "F935", "18606" }, + { "F936", "1865C" }, + { "F937", "18DEF" }, + { "F938", "19732" }, + { "F939", "19B6F" }, + { "F93A", "19DFA" }, + { "F93B", "1788C" }, + { "F93C", "1797F" }, + { "F93D", "17DA0" }, + { "F93E", "183C9" }, + { "F93F", "19304" }, + { "F940", "19E7F" }, + { "F941", "18AD6" }, + { "F942", "158DF" }, + { "F943", "15F04" }, + { "F944", "17C60" }, + { "F945", "1807E" }, + { "F946", "17262" }, + { "F947", "178CA" }, + { "F948", "18CC2" }, + { "F949", "196F7" }, + { "F94A", "158D8" }, + { "F94B", "15C62" }, + { "F94C", "16A13" }, + { "F94D", "16DDA" }, + { "F94E", "16F0F" }, + { "F94F", "17D2F" }, + { "F950", "17E37" }, + { "F951", "1964B" }, + { "F952", "152D2" }, + { "F953", "1808B" }, + { "F954", "151DC" }, + { "F955", "151CC" }, + { "F956", "17A1C" }, + { "F957", "17DBE" }, + { "F958", "183F1" }, + { "F959", "19675" }, + { "F95A", "18B80" }, + { "F95B", "162CF" }, + { "F95C", "16A02" }, + { "F95D", "18AFE" }, + { "F95E", "14E39" }, + { "F95F", "15BE7" }, + { "F960", "16012" }, + { "F961", "17387" }, + { "F962", "17570" }, + { "F963", "15317" }, + { "F964", "178FB" }, + { "F965", "14FBF" }, + { "F966", "15FA9" }, + { "F967", "14E0D" }, + { "F968", "16CCC" }, + { "F969", "16578" }, + { "F96A", "17D22" }, + { "F96B", "153C3" }, + { "F96C", "1585E" }, + { "F96D", "17701" }, + { "F96E", "18449" }, + { "F96F", "18AAA" }, + { "F970", "16BBA" }, + { "F971", "18FB0" }, + { "F972", "16C88" }, + { "F973", "162FE" }, + { "F974", "182E5" }, + { "F975", "163A0" }, + { "F976", "17565" }, + { "F977", "14EAE" }, + { "F978", "15169" }, + { "F979", "151C9" }, + { "F97A", "16881" }, + { "F97B", "17CE7" }, + { "F97C", "1826F" }, + { "F97D", "18AD2" }, + { "F97E", "191CF" }, + { "F97F", "152F5" }, + { "F980", "15442" }, + { "F981", "15973" }, + { "F982", "15EEC" }, + { "F983", "165C5" }, + { "F984", "16FFE" }, + { "F985", "1792A" }, + { "F986", "195AD" }, + { "F987", "19A6A" }, + { "F988", "19E97" }, + { "F989", "19ECE" }, + { "F98A", "1529B" }, + { "F98B", "166C6" }, + { "F98C", "16B77" }, + { "F98D", "18F62" }, + { "F98E", "15E74" }, + { "F98F", "16190" }, + { "F990", "16200" }, + { "F991", "1649A" }, + { "F992", "16F23" }, + { "F993", "17149" }, + { "F994", "17489" }, + { "F995", "179CA" }, + { "F996", "17DF4" }, + { "F997", "1806F" }, + { "F998", "18F26" }, + { "F999", "184EE" }, + { "F99A", "19023" }, + { "F99B", "1934A" }, + { "F99C", "15217" }, + { "F99D", "152A3" }, + { "F99E", "154BD" }, + { "F99F", "170C8" }, + { "F9A0", "188C2" }, + { "F9A1", "18AAA" }, + { "F9A2", "15EC9" }, + { "F9A3", "15FF5" }, + { "F9A4", "1637B" }, + { "F9A5", "16BAE" }, + { "F9A6", "17C3E" }, + { "F9A7", "17375" }, + { "F9A8", "14EE4" }, + { "F9A9", "156F9" }, + { "F9AA", "15BE7" }, + { "F9AB", "15DBA" }, + { "F9AC", "1601C" }, + { "F9AD", "173B2" }, + { "F9AE", "17469" }, + { "F9AF", "17F9A" }, + { "F9B0", "18046" }, + { "F9B1", "19234" }, + { "F9B2", "196F6" }, + { "F9B3", "19748" }, + { "F9B4", "19818" }, + { "F9B5", "14F8B" }, + { "F9B6", "179AE" }, + { "F9B7", "191B4" }, + { "F9B8", "196B8" }, + { "F9B9", "160E1" }, + { "F9BA", "14E86" }, + { "F9BB", "150DA" }, + { "F9BC", "15BEE" }, + { "F9BD", "15C3F" }, + { "F9BE", "16599" }, + { "F9BF", "16A02" }, + { "F9C0", "171CE" }, + { "F9C1", "17642" }, + { "F9C2", "184FC" }, + { "F9C3", "1907C" }, + { "F9C4", "19F8D" }, + { "F9C5", "16688" }, + { "F9C6", "1962E" }, + { "F9C7", "15289" }, + { "F9C8", "1677B" }, + { "F9C9", "167F3" }, + { "F9CA", "16D41" }, + { "F9CB", "16E9C" }, + { "F9CC", "17409" }, + { "F9CD", "17559" }, + { "F9CE", "1786B" }, + { "F9CF", "17D10" }, + { "F9D0", "1985E" }, + { "F9D1", "1516D" }, + { "F9D2", "1622E" }, + { "F9D3", "19678" }, + { "F9D4", "1502B" }, + { "F9D5", "15D19" }, + { "F9D6", "16DEA" }, + { "F9D7", "18F2A" }, + { "F9D8", "15F8B" }, + { "F9D9", "16144" }, + { "F9DA", "16817" }, + { "F9DB", "17387" }, + { "F9DC", "19686" }, + { "F9DD", "15229" }, + { "F9DE", "1540F" }, + { "F9DF", "15C65" }, + { "F9E0", "16613" }, + { "F9E1", "1674E" }, + { "F9E2", "168A8" }, + { "F9E3", "16CE5" }, + { "F9E4", "17406" }, + { "F9E5", "175E2" }, + { "F9E6", "17F79" }, + { "F9E7", "188CF" }, + { "F9E8", "188E1" }, + { "F9E9", "191CC" }, + { "F9EA", "196E2" }, + { "F9EB", "1533F" }, + { "F9EC", "16EBA" }, + { "F9ED", "1541D" }, + { "F9EE", "171D0" }, + { "F9EF", "17498" }, + { "F9F0", "185FA" }, + { "F9F1", "196A3" }, + { "F9F2", "19C57" }, + { "F9F3", "19E9F" }, + { "F9F4", "16797" }, + { "F9F5", "16DCB" }, + { "F9F6", "181E8" }, + { "F9F7", "17ACB" }, + { "F9F8", "17B20" }, + { "F9F9", "17C92" }, + { "F9FA", "172C0" }, + { "F9FB", "17099" }, + { "F9FC", "18B58" }, + { "F9FD", "14EC0" }, + { "F9FE", "18336" }, + { "F9FF", "1523A" }, + { "FA00", "15207" }, + { "FA01", "15EA6" }, + { "FA02", "162D3" }, + { "FA03", "17CD6" }, + { "FA04", "15B85" }, + { "FA05", "16D1E" }, + { "FA06", "166B4" }, + { "FA07", "18F3B" }, + { "FA08", "1884C" }, + { "FA09", "1964D" }, + { "FA0A", "1898B" }, + { "FA0B", "15ED3" }, + { "FA0C", "15140" }, + { "FA0D", "155C0" }, + { "FA10", "1585A" }, + { "FA12", "16674" }, + { "FA15", "151DE" }, + { "FA16", "1732A" }, + { "FA17", "176CA" }, + { "FA18", "1793C" }, + { "FA19", "1795E" }, + { "FA1A", "17965" }, + { "FA1B", "1798F" }, + { "FA1C", "19756" }, + { "FA1D", "17CBE" }, + { "FA1E", "17FBD" }, + { "FA20", "18612" }, + { "FA22", "18AF8" }, + { "FA25", "19038" }, + { "FA26", "190FD" }, + { "FA2A", "198EF" }, + { "FA2B", "198FC" }, + { "FA2C", "19928" }, + { "FA2D", "19DB4" }, + { "FA30", "14FAE" }, + { "FA31", "150E7" }, + { "FA32", "1514D" }, + { "FA33", "152C9" }, + { "FA34", "152E4" }, + { "FA35", "15351" }, + { "FA36", "1559D" }, + { "FA37", "15606" }, + { "FA38", "15668" }, + { "FA39", "15840" }, + { "FA3A", "158A8" }, + { "FA3B", "15C64" }, + { "FA3C", "15C6E" }, + { "FA3D", "16094" }, + { "FA3E", "16168" }, + { "FA3F", "1618E" }, + { "FA40", "161F2" }, + { "FA41", "1654F" }, + { "FA42", "165E2" }, + { "FA43", "16691" }, + { "FA44", "16885" }, + { "FA45", "16D77" }, + { "FA46", "16E1A" }, + { "FA47", "16F22" }, + { "FA48", "1716E" }, + { "FA49", "1722B" }, + { "FA4A", "17422" }, + { "FA4B", "17891" }, + { "FA4C", "1793E" }, + { "FA4D", "17949" }, + { "FA4E", "17948" }, + { "FA4F", "17950" }, + { "FA50", "17956" }, + { "FA51", "1795D" }, + { "FA52", "1798D" }, + { "FA53", "1798E" }, + { "FA54", "17A40" }, + { "FA55", "17A81" }, + { "FA56", "17BC0" }, + { "FA57", "17DF4" }, + { "FA58", "17E09" }, + { "FA59", "17E41" }, + { "FA5A", "17F72" }, + { "FA5B", "18005" }, + { "FA5C", "181ED" }, + { "FA5D", "18279" }, + { "FA5E", "18279" }, + { "FA5F", "18457" }, + { "FA60", "18910" }, + { "FA61", "18996" }, + { "FA62", "18B01" }, + { "FA63", "18B39" }, + { "FA64", "18CD3" }, + { "FA65", "18D08" }, + { "FA66", "18FB6" }, + { "FA67", "19038" }, + { "FA68", "196E3" }, + { "FA69", "197FF" }, + { "FA6A", "1983B" }, + { "FB1D", "205D9_05B4" }, + { "FB1F", "205F2_05B7" }, + { "FB2A", "205E9_05C1" }, + { "FB2B", "205E9_05C2" }, + { "FB2C", "305E9_05BC_05C1" }, + { "FB2D", "305E9_05BC_05C2" }, + { "FB2E", "205D0_05B7" }, + { "FB2F", "205D0_05B8" }, + { "FB30", "205D0_05BC" }, + { "FB31", "205D1_05BC" }, + { "FB32", "205D2_05BC" }, + { "FB33", "205D3_05BC" }, + { "FB34", "205D4_05BC" }, + { "FB35", "205D5_05BC" }, + { "FB36", "205D6_05BC" }, + { "FB38", "205D8_05BC" }, + { "FB39", "205D9_05BC" }, + { "FB3A", "205DA_05BC" }, + { "FB3B", "205DB_05BC" }, + { "FB3C", "205DC_05BC" }, + { "FB3E", "205DE_05BC" }, + { "FB40", "205E0_05BC" }, + { "FB41", "205E1_05BC" }, + { "FB43", "205E3_05BC" }, + { "FB44", "205E4_05BC" }, + { "FB46", "205E6_05BC" }, + { "FB47", "205E7_05BC" }, + { "FB48", "205E8_05BC" }, + { "FB49", "205E9_05BC" }, + { "FB4A", "205EA_05BC" }, + { "FB4B", "205D5_05B9" }, + { "FB4C", "205D1_05BF" }, + { "FB4D", "205DB_05BF" }, + { "FB4E", "205E4_05BF" }, + { "1D15E", "21D157_1D165" }, + { "1D15F", "21D158_1D165" }, + { "1D160", "31D158_1D165_1D16E" }, + { "1D161", "31D158_1D165_1D16F" }, + { "1D162", "31D158_1D165_1D170" }, + { "1D163", "31D158_1D165_1D171" }, + { "1D164", "31D158_1D165_1D172" }, + { "1D1BB", "21D1B9_1D165" }, + { "1D1BC", "21D1BA_1D165" }, + { "1D1BD", "31D1B9_1D165_1D16E" }, + { "1D1BE", "31D1BA_1D165_1D16E" }, + { "1D1BF", "31D1B9_1D165_1D16F" }, + { "1D1C0", "31D1BA_1D165_1D16F" }, + { "2F800", "14E3D" }, + { "2F801", "14E38" }, + { "2F802", "14E41" }, + { "2F803", "120122" }, + { "2F804", "14F60" }, + { "2F805", "14FAE" }, + { "2F806", "14FBB" }, + { "2F807", "15002" }, + { "2F808", "1507A" }, + { "2F809", "15099" }, + { "2F80A", "150E7" }, + { "2F80B", "150CF" }, + { "2F80C", "1349E" }, + { "2F80D", "12063A" }, + { "2F80E", "1514D" }, + { "2F80F", "15154" }, + { "2F810", "15164" }, + { "2F811", "15177" }, + { "2F812", "12051C" }, + { "2F813", "134B9" }, + { "2F814", "15167" }, + { "2F815", "1518D" }, + { "2F816", "12054B" }, + { "2F817", "15197" }, + { "2F818", "151A4" }, + { "2F819", "14ECC" }, + { "2F81A", "151AC" }, + { "2F81B", "151B5" }, + { "2F81C", "1291DF" }, + { "2F81D", "151F5" }, + { "2F81E", "15203" }, + { "2F81F", "134DF" }, + { "2F820", "1523B" }, + { "2F821", "15246" }, + { "2F822", "15272" }, + { "2F823", "15277" }, + { "2F824", "13515" }, + { "2F825", "152C7" }, + { "2F826", "152C9" }, + { "2F827", "152E4" }, + { "2F828", "152FA" }, + { "2F829", "15305" }, + { "2F82A", "15306" }, + { "2F82B", "15317" }, + { "2F82C", "15349" }, + { "2F82D", "15351" }, + { "2F82E", "1535A" }, + { "2F82F", "15373" }, + { "2F830", "1537D" }, + { "2F831", "1537F" }, + { "2F832", "1537F" }, + { "2F833", "1537F" }, + { "2F834", "120A2C" }, + { "2F835", "17070" }, + { "2F836", "153CA" }, + { "2F837", "153DF" }, + { "2F838", "120B63" }, + { "2F839", "153EB" }, + { "2F83A", "153F1" }, + { "2F83B", "15406" }, + { "2F83C", "1549E" }, + { "2F83D", "15438" }, + { "2F83E", "15448" }, + { "2F83F", "15468" }, + { "2F840", "154A2" }, + { "2F841", "154F6" }, + { "2F842", "15510" }, + { "2F843", "15553" }, + { "2F844", "15563" }, + { "2F845", "15584" }, + { "2F846", "15584" }, + { "2F847", "15599" }, + { "2F848", "155AB" }, + { "2F849", "155B3" }, + { "2F84A", "155C2" }, + { "2F84B", "15716" }, + { "2F84C", "15606" }, + { "2F84D", "15717" }, + { "2F84E", "15651" }, + { "2F84F", "15674" }, + { "2F850", "15207" }, + { "2F851", "158EE" }, + { "2F852", "157CE" }, + { "2F853", "157F4" }, + { "2F854", "1580D" }, + { "2F855", "1578B" }, + { "2F856", "15832" }, + { "2F857", "15831" }, + { "2F858", "158AC" }, + { "2F859", "1214E4" }, + { "2F85A", "158F2" }, + { "2F85B", "158F7" }, + { "2F85C", "15906" }, + { "2F85D", "1591A" }, + { "2F85E", "15922" }, + { "2F85F", "15962" }, + { "2F860", "1216A8" }, + { "2F861", "1216EA" }, + { "2F862", "159EC" }, + { "2F863", "15A1B" }, + { "2F864", "15A27" }, + { "2F865", "159D8" }, + { "2F866", "15A66" }, + { "2F867", "136EE" }, + { "2F868", "12136A" }, + { "2F869", "15B08" }, + { "2F86A", "15B3E" }, + { "2F86B", "15B3E" }, + { "2F86C", "1219C8" }, + { "2F86D", "15BC3" }, + { "2F86E", "15BD8" }, + { "2F86F", "15BE7" }, + { "2F870", "15BF3" }, + { "2F871", "121B18" }, + { "2F872", "15BFF" }, + { "2F873", "15C06" }, + { "2F874", "15F33" }, + { "2F875", "15C22" }, + { "2F876", "13781" }, + { "2F877", "15C60" }, + { "2F878", "15C6E" }, + { "2F879", "15CC0" }, + { "2F87A", "15C8D" }, + { "2F87B", "121DE4" }, + { "2F87C", "15D43" }, + { "2F87D", "121DE6" }, + { "2F87E", "15D6E" }, + { "2F87F", "15D6B" }, + { "2F880", "15D7C" }, + { "2F881", "15DE1" }, + { "2F882", "15DE2" }, + { "2F883", "1382F" }, + { "2F884", "15DFD" }, + { "2F885", "15E28" }, + { "2F886", "15E3D" }, + { "2F887", "15E69" }, + { "2F888", "13862" }, + { "2F889", "122183" }, + { "2F88A", "1387C" }, + { "2F88B", "15EB0" }, + { "2F88C", "15EB3" }, + { "2F88D", "15EB6" }, + { "2F88E", "15ECA" }, + { "2F88F", "12A392" }, + { "2F890", "15EFE" }, + { "2F891", "122331" }, + { "2F892", "122331" }, + { "2F893", "18201" }, + { "2F894", "15F22" }, + { "2F895", "15F22" }, + { "2F896", "138C7" }, + { "2F897", "1232B8" }, + { "2F898", "1261DA" }, + { "2F899", "15F62" }, + { "2F89A", "15F6B" }, + { "2F89B", "138E3" }, + { "2F89C", "15F9A" }, + { "2F89D", "15FCD" }, + { "2F89E", "15FD7" }, + { "2F89F", "15FF9" }, + { "2F8A0", "16081" }, + { "2F8A1", "1393A" }, + { "2F8A2", "1391C" }, + { "2F8A3", "16094" }, + { "2F8A4", "1226D4" }, + { "2F8A5", "160C7" }, + { "2F8A6", "16148" }, + { "2F8A7", "1614C" }, + { "2F8A8", "1614E" }, + { "2F8A9", "1614C" }, + { "2F8AA", "1617A" }, + { "2F8AB", "1618E" }, + { "2F8AC", "161B2" }, + { "2F8AD", "161A4" }, + { "2F8AE", "161AF" }, + { "2F8AF", "161DE" }, + { "2F8B0", "161F2" }, + { "2F8B1", "161F6" }, + { "2F8B2", "16210" }, + { "2F8B3", "1621B" }, + { "2F8B4", "1625D" }, + { "2F8B5", "162B1" }, + { "2F8B6", "162D4" }, + { "2F8B7", "16350" }, + { "2F8B8", "122B0C" }, + { "2F8B9", "1633D" }, + { "2F8BA", "162FC" }, + { "2F8BB", "16368" }, + { "2F8BC", "16383" }, + { "2F8BD", "163E4" }, + { "2F8BE", "122BF1" }, + { "2F8BF", "16422" }, + { "2F8C0", "163C5" }, + { "2F8C1", "163A9" }, + { "2F8C2", "13A2E" }, + { "2F8C3", "16469" }, + { "2F8C4", "1647E" }, + { "2F8C5", "1649D" }, + { "2F8C6", "16477" }, + { "2F8C7", "13A6C" }, + { "2F8C8", "1654F" }, + { "2F8C9", "1656C" }, + { "2F8CA", "12300A" }, + { "2F8CB", "165E3" }, + { "2F8CC", "166F8" }, + { "2F8CD", "16649" }, + { "2F8CE", "13B19" }, + { "2F8CF", "16691" }, + { "2F8D0", "13B08" }, + { "2F8D1", "13AE4" }, + { "2F8D2", "15192" }, + { "2F8D3", "15195" }, + { "2F8D4", "16700" }, + { "2F8D5", "1669C" }, + { "2F8D6", "180AD" }, + { "2F8D7", "143D9" }, + { "2F8D8", "16717" }, + { "2F8D9", "1671B" }, + { "2F8DA", "16721" }, + { "2F8DB", "1675E" }, + { "2F8DC", "16753" }, + { "2F8DD", "1233C3" }, + { "2F8DE", "13B49" }, + { "2F8DF", "167FA" }, + { "2F8E0", "16785" }, + { "2F8E1", "16852" }, + { "2F8E2", "16885" }, + { "2F8E3", "12346D" }, + { "2F8E4", "1688E" }, + { "2F8E5", "1681F" }, + { "2F8E6", "16914" }, + { "2F8E7", "13B9D" }, + { "2F8E8", "16942" }, + { "2F8E9", "169A3" }, + { "2F8EA", "169EA" }, + { "2F8EB", "16AA8" }, + { "2F8EC", "1236A3" }, + { "2F8ED", "16ADB" }, + { "2F8EE", "13C18" }, + { "2F8EF", "16B21" }, + { "2F8F0", "1238A7" }, + { "2F8F1", "16B54" }, + { "2F8F2", "13C4E" }, + { "2F8F3", "16B72" }, + { "2F8F4", "16B9F" }, + { "2F8F5", "16BBA" }, + { "2F8F6", "16BBB" }, + { "2F8F7", "123A8D" }, + { "2F8F8", "121D0B" }, + { "2F8F9", "123AFA" }, + { "2F8FA", "16C4E" }, + { "2F8FB", "123CBC" }, + { "2F8FC", "16CBF" }, + { "2F8FD", "16CCD" }, + { "2F8FE", "16C67" }, + { "2F8FF", "16D16" }, + { "2F900", "16D3E" }, + { "2F901", "16D77" }, + { "2F902", "16D41" }, + { "2F903", "16D69" }, + { "2F904", "16D78" }, + { "2F905", "16D85" }, + { "2F906", "123D1E" }, + { "2F907", "16D34" }, + { "2F908", "16E2F" }, + { "2F909", "16E6E" }, + { "2F90A", "13D33" }, + { "2F90B", "16ECB" }, + { "2F90C", "16EC7" }, + { "2F90D", "123ED1" }, + { "2F90E", "16DF9" }, + { "2F90F", "16F6E" }, + { "2F910", "123F5E" }, + { "2F911", "123F8E" }, + { "2F912", "16FC6" }, + { "2F913", "17039" }, + { "2F914", "1701E" }, + { "2F915", "1701B" }, + { "2F916", "13D96" }, + { "2F917", "1704A" }, + { "2F918", "1707D" }, + { "2F919", "17077" }, + { "2F91A", "170AD" }, + { "2F91B", "120525" }, + { "2F91C", "17145" }, + { "2F91D", "124263" }, + { "2F91E", "1719C" }, + { "2F91F", "143AB" }, + { "2F920", "17228" }, + { "2F921", "17235" }, + { "2F922", "17250" }, + { "2F923", "124608" }, + { "2F924", "17280" }, + { "2F925", "17295" }, + { "2F926", "124735" }, + { "2F927", "124814" }, + { "2F928", "1737A" }, + { "2F929", "1738B" }, + { "2F92A", "13EAC" }, + { "2F92B", "173A5" }, + { "2F92C", "13EB8" }, + { "2F92D", "13EB8" }, + { "2F92E", "17447" }, + { "2F92F", "1745C" }, + { "2F930", "17471" }, + { "2F931", "17485" }, + { "2F932", "174CA" }, + { "2F933", "13F1B" }, + { "2F934", "17524" }, + { "2F935", "124C36" }, + { "2F936", "1753E" }, + { "2F937", "124C92" }, + { "2F938", "17570" }, + { "2F939", "12219F" }, + { "2F93A", "17610" }, + { "2F93B", "124FA1" }, + { "2F93C", "124FB8" }, + { "2F93D", "125044" }, + { "2F93E", "13FFC" }, + { "2F93F", "14008" }, + { "2F940", "176F4" }, + { "2F941", "1250F3" }, + { "2F942", "1250F2" }, + { "2F943", "125119" }, + { "2F944", "125133" }, + { "2F945", "1771E" }, + { "2F946", "1771F" }, + { "2F947", "1771F" }, + { "2F948", "1774A" }, + { "2F949", "14039" }, + { "2F94A", "1778B" }, + { "2F94B", "14046" }, + { "2F94C", "14096" }, + { "2F94D", "12541D" }, + { "2F94E", "1784E" }, + { "2F94F", "1788C" }, + { "2F950", "178CC" }, + { "2F951", "140E3" }, + { "2F952", "125626" }, + { "2F953", "17956" }, + { "2F954", "12569A" }, + { "2F955", "1256C5" }, + { "2F956", "1798F" }, + { "2F957", "179EB" }, + { "2F958", "1412F" }, + { "2F959", "17A40" }, + { "2F95A", "17A4A" }, + { "2F95B", "17A4F" }, + { "2F95C", "12597C" }, + { "2F95D", "125AA7" }, + { "2F95E", "125AA7" }, + { "2F95F", "17AAE" }, + { "2F960", "14202" }, + { "2F961", "125BAB" }, + { "2F962", "17BC6" }, + { "2F963", "17BC9" }, + { "2F964", "14227" }, + { "2F965", "125C80" }, + { "2F966", "17CD2" }, + { "2F967", "142A0" }, + { "2F968", "17CE8" }, + { "2F969", "17CE3" }, + { "2F96A", "17D00" }, + { "2F96B", "125F86" }, + { "2F96C", "17D63" }, + { "2F96D", "14301" }, + { "2F96E", "17DC7" }, + { "2F96F", "17E02" }, + { "2F970", "17E45" }, + { "2F971", "14334" }, + { "2F972", "126228" }, + { "2F973", "126247" }, + { "2F974", "14359" }, + { "2F975", "1262D9" }, + { "2F976", "17F7A" }, + { "2F977", "12633E" }, + { "2F978", "17F95" }, + { "2F979", "17FFA" }, + { "2F97A", "18005" }, + { "2F97B", "1264DA" }, + { "2F97C", "126523" }, + { "2F97D", "18060" }, + { "2F97E", "1265A8" }, + { "2F97F", "18070" }, + { "2F980", "12335F" }, + { "2F981", "143D5" }, + { "2F982", "180B2" }, + { "2F983", "18103" }, + { "2F984", "1440B" }, + { "2F985", "1813E" }, + { "2F986", "15AB5" }, + { "2F987", "1267A7" }, + { "2F988", "1267B5" }, + { "2F989", "123393" }, + { "2F98A", "12339C" }, + { "2F98B", "18201" }, + { "2F98C", "18204" }, + { "2F98D", "18F9E" }, + { "2F98E", "1446B" }, + { "2F98F", "18291" }, + { "2F990", "1828B" }, + { "2F991", "1829D" }, + { "2F992", "152B3" }, + { "2F993", "182B1" }, + { "2F994", "182B3" }, + { "2F995", "182BD" }, + { "2F996", "182E6" }, + { "2F997", "126B3C" }, + { "2F998", "182E5" }, + { "2F999", "1831D" }, + { "2F99A", "18363" }, + { "2F99B", "183AD" }, + { "2F99C", "18323" }, + { "2F99D", "183BD" }, + { "2F99E", "183E7" }, + { "2F99F", "18457" }, + { "2F9A0", "18353" }, + { "2F9A1", "183CA" }, + { "2F9A2", "183CC" }, + { "2F9A3", "183DC" }, + { "2F9A4", "126C36" }, + { "2F9A5", "126D6B" }, + { "2F9A6", "126CD5" }, + { "2F9A7", "1452B" }, + { "2F9A8", "184F1" }, + { "2F9A9", "184F3" }, + { "2F9AA", "18516" }, + { "2F9AB", "1273CA" }, + { "2F9AC", "18564" }, + { "2F9AD", "126F2C" }, + { "2F9AE", "1455D" }, + { "2F9AF", "14561" }, + { "2F9B0", "126FB1" }, + { "2F9B1", "1270D2" }, + { "2F9B2", "1456B" }, + { "2F9B3", "18650" }, + { "2F9B4", "1865C" }, + { "2F9B5", "18667" }, + { "2F9B6", "18669" }, + { "2F9B7", "186A9" }, + { "2F9B8", "18688" }, + { "2F9B9", "1870E" }, + { "2F9BA", "186E2" }, + { "2F9BB", "18779" }, + { "2F9BC", "18728" }, + { "2F9BD", "1876B" }, + { "2F9BE", "18786" }, + { "2F9BF", "14D57" }, + { "2F9C0", "187E1" }, + { "2F9C1", "18801" }, + { "2F9C2", "145F9" }, + { "2F9C3", "18860" }, + { "2F9C4", "18863" }, + { "2F9C5", "127667" }, + { "2F9C6", "188D7" }, + { "2F9C7", "188DE" }, + { "2F9C8", "14635" }, + { "2F9C9", "188FA" }, + { "2F9CA", "134BB" }, + { "2F9CB", "1278AE" }, + { "2F9CC", "127966" }, + { "2F9CD", "146BE" }, + { "2F9CE", "146C7" }, + { "2F9CF", "18AA0" }, + { "2F9D0", "18AED" }, + { "2F9D1", "18B8A" }, + { "2F9D2", "18C55" }, + { "2F9D3", "127CA8" }, + { "2F9D4", "18CAB" }, + { "2F9D5", "18CC1" }, + { "2F9D6", "18D1B" }, + { "2F9D7", "18D77" }, + { "2F9D8", "127F2F" }, + { "2F9D9", "120804" }, + { "2F9DA", "18DCB" }, + { "2F9DB", "18DBC" }, + { "2F9DC", "18DF0" }, + { "2F9DD", "1208DE" }, + { "2F9DE", "18ED4" }, + { "2F9DF", "18F38" }, + { "2F9E0", "1285D2" }, + { "2F9E1", "1285ED" }, + { "2F9E2", "19094" }, + { "2F9E3", "190F1" }, + { "2F9E4", "19111" }, + { "2F9E5", "12872E" }, + { "2F9E6", "1911B" }, + { "2F9E7", "19238" }, + { "2F9E8", "192D7" }, + { "2F9E9", "192D8" }, + { "2F9EA", "1927C" }, + { "2F9EB", "193F9" }, + { "2F9EC", "19415" }, + { "2F9ED", "128BFA" }, + { "2F9EE", "1958B" }, + { "2F9EF", "14995" }, + { "2F9F0", "195B7" }, + { "2F9F1", "128D77" }, + { "2F9F2", "149E6" }, + { "2F9F3", "196C3" }, + { "2F9F4", "15DB2" }, + { "2F9F5", "19723" }, + { "2F9F6", "129145" }, + { "2F9F7", "12921A" }, + { "2F9F8", "14A6E" }, + { "2F9F9", "14A76" }, + { "2F9FA", "197E0" }, + { "2F9FB", "12940A" }, + { "2F9FC", "14AB2" }, + { "2F9FD", "129496" }, + { "2F9FE", "1980B" }, + { "2F9FF", "1980B" }, + { "2FA00", "19829" }, + { "2FA01", "1295B6" }, + { "2FA02", "198E2" }, + { "2FA03", "14B33" }, + { "2FA04", "19929" }, + { "2FA05", "199A7" }, + { "2FA06", "199C2" }, + { "2FA07", "199FE" }, + { "2FA08", "14BCE" }, + { "2FA09", "129B30" }, + { "2FA0A", "19B12" }, + { "2FA0B", "19C40" }, + { "2FA0C", "19CFD" }, + { "2FA0D", "14CCE" }, + { "2FA0E", "14CED" }, + { "2FA0F", "19D67" }, + { "2FA10", "12A0CE" }, + { "2FA11", "14CF8" }, + { "2FA12", "12A105" }, + { "2FA13", "12A20E" }, + { "2FA14", "12A291" }, + { "2FA15", "19EBB" }, + { "2FA16", "14D56" }, + { "2FA17", "19EF9" }, + { "2FA18", "19EFE" }, + { "2FA19", "19F05" }, + { "2FA1A", "19F0F" }, + { "2FA1B", "19F16" }, + { "2FA1C", "19F3B" }, + { "2FA1D", "12A600" }, +}; + +// global constructor + +static struct unicode_decompose_init { + unicode_decompose_init(); +} _unicode_decompose_init; + +unicode_decompose_init::unicode_decompose_init() { + for (unsigned int i = 0; + i < sizeof(unicode_decompose_list)/sizeof(unicode_decompose_list[0]); + i++) { + unicode_decompose *dec = new unicode_decompose[1]; + dec->value = (char *)unicode_decompose_list[i].value; + unicode_decompose_table.define(unicode_decompose_list[i].key, dec); + } +} + +const char *decompose_unicode(const char *s) +{ + unicode_decompose *result = unicode_decompose_table.lookup(s); + return result ? result->value : 0; +} diff --git a/contrib/groff/src/libs/libxutil/DviChar.c b/contrib/groff/src/libs/libxutil/DviChar.c new file mode 100644 index 000000000000..26aff6cf4ce7 --- /dev/null +++ b/contrib/groff/src/libs/libxutil/DviChar.c @@ -0,0 +1,658 @@ +/* + * DviChar.c + * + * Map DVI (ditroff output) character names to + * font indexes and back + */ + +#include +#include +#include "DviChar.h" + +extern char *xmalloc(int); + +#define allocHash() ((DviCharNameHash *) xmalloc (sizeof (DviCharNameHash))) + +struct map_list { + struct map_list *next; + DviCharNameMap *map; +}; + +static struct map_list *world; + +static int standard_maps_loaded = 0; +static void load_standard_maps (void); +static int hash_name (const char *); +static void dispose_hash(DviCharNameMap *); +static void compute_hash(DviCharNameMap *); + +DviCharNameMap * +DviFindMap (char *encoding) +{ + struct map_list *m; + + if (!standard_maps_loaded) + load_standard_maps (); + for (m = world; m; m=m->next) + if (!strcmp (m->map->encoding, encoding)) + return m->map; + return 0; +} + +void +DviRegisterMap (DviCharNameMap *map) +{ + struct map_list *m; + + if (!standard_maps_loaded) + load_standard_maps (); + for (m = world; m; m = m->next) + if (!strcmp (m->map->encoding, map->encoding)) + break; + if (!m) { + m = (struct map_list *) xmalloc (sizeof *m); + m->next = world; + world = m; + } + dispose_hash (map); + m->map = map; + compute_hash (map); +} + +static void +dispose_hash (DviCharNameMap *map) +{ + DviCharNameHash **buckets; + DviCharNameHash *h, *next; + int i; + + buckets = map->buckets; + for (i = 0; i < DVI_HASH_SIZE; i++) { + for (h = buckets[i]; h; h=next) { + next = h->next; + free (h); + } + } +} + +static int +hash_name (const char *name) +{ + int i = 0; + + while (*name) + i = (i << 1) ^ *name++; + if (i < 0) + i = -i; + return i; +} + +static void +compute_hash (DviCharNameMap *map) +{ + DviCharNameHash **buckets; + int c, s, i; + DviCharNameHash *h; + + buckets = map->buckets; + for (i = 0; i < DVI_HASH_SIZE; i++) + buckets[i] = 0; + for (c = 0; c < DVI_MAP_SIZE; c++) + for (s = 0; s < DVI_MAX_SYNONYMS; s++) { + if (!map->dvi_names[c][s]) + break; + i = hash_name (map->dvi_names[c][s]) % DVI_HASH_SIZE; + h = allocHash (); + h->next = buckets[i]; + buckets[i] = h; + h->name = map->dvi_names[c][s]; + h->position = c; + } + +} + +int +DviCharIndex (DviCharNameMap *map, const char *name) +{ + int i; + DviCharNameHash *h; + + i = hash_name (name) % DVI_HASH_SIZE; + for (h = map->buckets[i]; h; h=h->next) + if (!strcmp (h->name, name)) + return h->position; + return -1; +} + +static DviCharNameMap ISO8859_1_map = { + "iso8859-1", + 0, +{ +{ 0, /* 0 */}, +{ 0, /* 1 */}, +{ 0, /* 2 */}, +{ 0, /* 3 */}, +{ 0, /* 4 */}, +{ 0, /* 5 */}, +{ 0, /* 6 */}, +{ 0, /* 7 */}, +{ 0, /* 8 */}, +{ 0, /* 9 */}, +{ 0, /* 10 */}, +{ 0, /* 11 */}, +{ 0, /* 12 */}, +{ 0, /* 13 */}, +{ 0, /* 14 */}, +{ 0, /* 15 */}, +{ 0, /* 16 */}, +{ 0, /* 17 */}, +{ 0, /* 18 */}, +{ 0, /* 19 */}, +{ 0, /* 20 */}, +{ 0, /* 21 */}, +{ 0, /* 22 */}, +{ 0, /* 23 */}, +{ 0, /* 24 */}, +{ 0, /* 25 */}, +{ 0, /* 26 */}, +{ 0, /* 27 */}, +{ 0, /* 28 */}, +{ 0, /* 29 */}, +{ 0, /* 30 */}, +{ 0, /* 31 */}, +{ 0, /* 32 */}, +{ "!", /* 33 */}, +{ "\"", "dq", /* 34 */}, +{ "#", "sh", /* 35 */}, +{ "$", "Do", /* 36 */}, +{ "%", /* 37 */}, +{ "&", /* 38 */}, +{ "'", "cq", /* 39 */}, +{ "(", /* 40 */}, +{ ")", /* 41 */}, +{ "*", /* 42 */}, +{ "+", /* 43 */}, +{ ",", /* 44 */}, +{ "\\-", /* 45 */}, +{ ".", /* 46 */}, +{ "/", "sl", /* 47 */}, +{ "0", /* 48 */}, +{ "1", /* 49 */}, +{ "2", /* 50 */}, +{ "3", /* 51 */}, +{ "4", /* 52 */}, +{ "5", /* 53 */}, +{ "6", /* 54 */}, +{ "7", /* 55 */}, +{ "8", /* 56 */}, +{ "9", /* 57 */}, +{ ":", /* 58 */}, +{ ";", /* 59 */}, +{ "<", /* 60 */}, +{ "=", /* 61 */}, +{ ">", /* 62 */}, +{ "?", /* 63 */}, +{ "@", "at", /* 64 */}, +{ "A", /* 65 */}, +{ "B", /* 66 */}, +{ "C", /* 67 */}, +{ "D", /* 68 */}, +{ "E", /* 69 */}, +{ "F", /* 70 */}, +{ "G", /* 71 */}, +{ "H", /* 72 */}, +{ "I", /* 73 */}, +{ "J", /* 74 */}, +{ "K", /* 75 */}, +{ "L", /* 76 */}, +{ "M", /* 77 */}, +{ "N", /* 78 */}, +{ "O", /* 79 */}, +{ "P", /* 80 */}, +{ "Q", /* 81 */}, +{ "R", /* 82 */}, +{ "S", /* 83 */}, +{ "T", /* 84 */}, +{ "U", /* 85 */}, +{ "V", /* 86 */}, +{ "W", /* 87 */}, +{ "X", /* 88 */}, +{ "Y", /* 89 */}, +{ "Z", /* 90 */}, +{ "[", "lB", /* 91 */}, +{ "\\", "rs", /* 92 */}, +{ "]", "rB", /* 93 */}, +{ "^", "a^", "ha", /* 94 */}, +{ "_", /* 95 */}, +{ "`", "oq", /* 96 */}, +{ "a", /* 97 */}, +{ "b", /* 98 */}, +{ "c", /* 99 */}, +{ "d", /* 100 */}, +{ "e", /* 101 */}, +{ "f", /* 102 */}, +{ "g", /* 103 */}, +{ "h", /* 104 */}, +{ "i", /* 105 */}, +{ "j", /* 106 */}, +{ "k", /* 107 */}, +{ "l", /* 108 */}, +{ "m", /* 109 */}, +{ "n", /* 110 */}, +{ "o", /* 111 */}, +{ "p", /* 112 */}, +{ "q", /* 113 */}, +{ "r", /* 114 */}, +{ "s", /* 115 */}, +{ "t", /* 116 */}, +{ "u", /* 117 */}, +{ "v", /* 118 */}, +{ "w", /* 119 */}, +{ "x", /* 120 */}, +{ "y", /* 121 */}, +{ "z", /* 122 */}, +{ "{", "lC", /* 123 */}, +{ "|", "ba", /* 124 */}, +{ "}", "rC", /* 125 */}, +{ "~", "a~", "ti", /* 126 */}, +{ 0, /* 127 */}, +{ 0, /* 128 */}, +{ 0, /* 129 */}, +{ 0, /* 130 */}, +{ 0, /* 131 */}, +{ 0, /* 132 */}, +{ 0, /* 133 */}, +{ 0, /* 134 */}, +{ 0, /* 135 */}, +{ 0, /* 136 */}, +{ 0, /* 137 */}, +{ 0, /* 138 */}, +{ 0, /* 139 */}, +{ 0, /* 140 */}, +{ 0, /* 141 */}, +{ 0, /* 142 */}, +{ 0, /* 143 */}, +{ 0, /* 144 */}, +{ 0, /* 145 */}, +{ 0, /* 146 */}, +{ 0, /* 147 */}, +{ 0, /* 148 */}, +{ 0, /* 149 */}, +{ 0, /* 150 */}, +{ 0, /* 151 */}, +{ 0, /* 152 */}, +{ 0, /* 153 */}, +{ 0, /* 154 */}, +{ 0, /* 155 */}, +{ 0, /* 156 */}, +{ 0, /* 157 */}, +{ 0, /* 158 */}, +{ 0, /* 159 */}, +{ 0, /* 160 */}, +{ "r!", /* 161 */}, +{ "ct", /* 162 */}, +{ "Po", /* 163 */}, +{ "Cs", /* 164 */}, +{ "Ye", /* 165 */}, +{ "bb", /* 166 */}, +{ "sc", /* 167 */}, +{ "ad", /* 168 */}, +{ "co", /* 169 */}, +{ "Of", /* 170 */}, +{ "Fo", /* 171 */}, +{ "tno", /* 172 */}, +{ "-", "hy", /* 173 */}, +{ "rg", /* 174 */}, +{ "a-", /* 175 */}, +{ "de", /* 176 */}, +{ "t+-", /* 177 */}, +{ "S2", /* 178 */}, +{ "S3", /* 179 */}, +{ "aa", /* 180 */}, +{ "mc", /* 181 */}, +{ "ps", /* 182 */}, +{ "pc", /* 183 */}, +{ "ac", /* 184 */}, +{ "S1", /* 185 */}, +{ "Om", /* 186 */}, +{ "Fc", /* 187 */}, +{ "14", /* 188 */}, +{ "12", /* 189 */}, +{ "34", /* 190 */}, +{ "r?", /* 191 */}, +{ "`A", /* 192 */}, +{ "'A", /* 193 */}, +{ "^A", /* 194 */}, +{ "~A", /* 195 */}, +{ ":A", /* 196 */}, +{ "oA", /* 197 */}, +{ "AE", /* 198 */}, +{ ",C", /* 199 */}, +{ "`E", /* 200 */}, +{ "'E", /* 201 */}, +{ "^E", /* 202 */}, +{ ":E", /* 203 */}, +{ "`I", /* 204 */}, +{ "'I", /* 205 */}, +{ "^I", /* 206 */}, +{ ":I", /* 207 */}, +{ "-D", /* 208 */}, +{ "~N", /* 209 */}, +{ "`O", /* 210 */}, +{ "'O", /* 211 */}, +{ "^O", /* 212 */}, +{ "~O", /* 213 */}, +{ ":O", /* 214 */}, +{ "tmu", /* 215 */}, +{ "/O", /* 216 */}, +{ "`U", /* 217 */}, +{ "'U", /* 218 */}, +{ "^U", /* 219 */}, +{ ":U", /* 220 */}, +{ "'Y", /* 221 */}, +{ "TP", /* 222 */}, +{ "ss", /* 223 */}, +{ "`a", /* 224 */}, +{ "'a", /* 225 */}, +{ "^a", /* 226 */}, +{ "~a", /* 227 */}, +{ ":a", /* 228 */}, +{ "oa", /* 229 */}, +{ "ae", /* 230 */}, +{ ",c", /* 231 */}, +{ "`e", /* 232 */}, +{ "'e", /* 233 */}, +{ "^e", /* 234 */}, +{ ":e", /* 235 */}, +{ "`i", /* 236 */}, +{ "'i", /* 237 */}, +{ "^i", /* 238 */}, +{ ":i", /* 239 */}, +{ "Sd", /* 240 */}, +{ "~n", /* 241 */}, +{ "`o", /* 242 */}, +{ "'o", /* 243 */}, +{ "^o", /* 244 */}, +{ "~o", /* 245 */}, +{ ":o", /* 246 */}, +{ "tdi", /* 247 */}, +{ "/o", /* 248 */}, +{ "`u", /* 249 */}, +{ "'u", /* 250 */}, +{ "^u", /* 251 */}, +{ ":u", /* 252 */}, +{ "'y", /* 253 */}, +{ "Tp", /* 254 */}, +{ ":y", /* 255 */}, +}}; + +static DviCharNameMap Adobe_Symbol_map = { + "adobe-fontspecific", + 1, +{ +{ 0, /* 0 */}, +{ 0, /* 1 */}, +{ 0, /* 2 */}, +{ 0, /* 3 */}, +{ 0, /* 4 */}, +{ 0, /* 5 */}, +{ 0, /* 6 */}, +{ 0, /* 7 */}, +{ 0, /* 8 */}, +{ 0, /* 9 */}, +{ 0, /* 10 */}, +{ 0, /* 11 */}, +{ 0, /* 12 */}, +{ 0, /* 13 */}, +{ 0, /* 14 */}, +{ 0, /* 15 */}, +{ 0, /* 16 */}, +{ 0, /* 17 */}, +{ 0, /* 18 */}, +{ 0, /* 19 */}, +{ 0, /* 20 */}, +{ 0, /* 21 */}, +{ 0, /* 22 */}, +{ 0, /* 23 */}, +{ 0, /* 24 */}, +{ 0, /* 25 */}, +{ 0, /* 26 */}, +{ 0, /* 27 */}, +{ 0, /* 28 */}, +{ 0, /* 29 */}, +{ 0, /* 30 */}, +{ 0, /* 31 */}, +{ 0, /* 32 */}, +{ "!", /* 33 */}, +{ "fa", /* 34 */}, +{ "#", "sh", /* 35 */}, +{ "te", /* 36 */}, +{ "%", /* 37 */}, +{ "&", /* 38 */}, +{ "st", /* 39 */}, +{ "(", /* 40 */}, +{ ")", /* 41 */}, +{ "**", /* 42 */}, +{ "+", "pl", /* 43 */}, +{ ",", /* 44 */}, +{ "\\-", "mi", /* 45 */}, +{ ".", /* 46 */}, +{ "/", "sl", /* 47 */}, +{ "0", /* 48 */}, +{ "1", /* 49 */}, +{ "2", /* 50 */}, +{ "3", /* 51 */}, +{ "4", /* 52 */}, +{ "5", /* 53 */}, +{ "6", /* 54 */}, +{ "7", /* 55 */}, +{ "8", /* 56 */}, +{ "9", /* 57 */}, +{ ":", /* 58 */}, +{ ";", /* 59 */}, +{ "<", /* 60 */}, +{ "=", "eq", /* 61 */}, +{ ">", /* 62 */}, +{ "?", /* 63 */}, +{ "=~", /* 64 */}, +{ "*A", /* 65 */}, +{ "*B", /* 66 */}, +{ "*X", /* 67 */}, +{ "*D", /* 68 */}, +{ "*E", /* 69 */}, +{ "*F", /* 70 */}, +{ "*G", /* 71 */}, +{ "*Y", /* 72 */}, +{ "*I", /* 73 */}, +{ "+h", /* 74 */}, +{ "*K", /* 75 */}, +{ "*L", /* 76 */}, +{ "*M", /* 77 */}, +{ "*N", /* 78 */}, +{ "*O", /* 79 */}, +{ "*P", /* 80 */}, +{ "*H", /* 81 */}, +{ "*R", /* 82 */}, +{ "*S", /* 83 */}, +{ "*T", /* 84 */}, +{ 0, /* 85 */}, +{ "ts", /* 86 */}, +{ "*W", /* 87 */}, +{ "*C", /* 88 */}, +{ "*Q", /* 89 */}, +{ "*Z", /* 90 */}, +{ "[", "lB", /* 91 */}, +{ "tf", "3d", /* 92 */}, +{ "]", "rB", /* 93 */}, +{ "pp", /* 94 */}, +{ "_", /* 95 */}, +{ "radicalex", /* 96 */}, +{ "*a", /* 97 */}, +{ "*b", /* 98 */}, +{ "*x", /* 99 */}, +{ "*d", /* 100 */}, +{ "*e", /* 101 */}, +{ "*f", /* 102 */}, +{ "*g", /* 103 */}, +{ "*y", /* 104 */}, +{ "*i", /* 105 */}, +{ "+f", /* 106 */}, +{ "*k", /* 107 */}, +{ "*l", /* 108 */}, +{ "*m", /* 109 */}, +{ "*n", /* 110 */}, +{ "*o", /* 111 */}, +{ "*p", /* 112 */}, +{ "*h", /* 113 */}, +{ "*r", /* 114 */}, +{ "*s", /* 115 */}, +{ "*t", /* 116 */}, +{ "*u", /* 117 */}, +{ "+p", /* 118 */}, +{ "*w", /* 119 */}, +{ "*c", /* 120 */}, +{ "*q", /* 121 */}, +{ "*z", /* 122 */}, +{ "lC", "{", /* 123 */}, +{ "ba", "|", /* 124 */}, +{ "rC", "}", /* 125 */}, +{ "ap", /* 126 */}, +{ 0, /* 127 */}, +{ 0, /* 128 */}, +{ 0, /* 129 */}, +{ 0, /* 130 */}, +{ 0, /* 131 */}, +{ 0, /* 132 */}, +{ 0, /* 133 */}, +{ 0, /* 134 */}, +{ 0, /* 135 */}, +{ 0, /* 136 */}, +{ 0, /* 137 */}, +{ 0, /* 138 */}, +{ 0, /* 139 */}, +{ 0, /* 140 */}, +{ 0, /* 141 */}, +{ 0, /* 142 */}, +{ 0, /* 143 */}, +{ 0, /* 144 */}, +{ 0, /* 145 */}, +{ 0, /* 146 */}, +{ 0, /* 147 */}, +{ 0, /* 148 */}, +{ 0, /* 149 */}, +{ 0, /* 150 */}, +{ 0, /* 151 */}, +{ 0, /* 152 */}, +{ 0, /* 153 */}, +{ 0, /* 154 */}, +{ 0, /* 155 */}, +{ 0, /* 156 */}, +{ 0, /* 157 */}, +{ 0, /* 158 */}, +{ 0, /* 159 */}, +{ 0, /* 160 */}, +{ "*U", /* 161 */}, +{ "fm", /* 162 */}, +{ "<=", /* 163 */}, +{ "f/", /* 164 */}, +{ "if", /* 165 */}, +{ "Fn", /* 166 */}, +{ "CL", /* 167 */}, +{ "DI", /* 168 */}, +{ "HE", /* 169 */}, +{ "SP", /* 170 */}, +{ "<>", /* 171 */}, +{ "<-", /* 172 */}, +{ "ua", "arrowverttp", /* 173 */}, +{ "->", /* 174 */}, +{ "da", "arrowvertbt", /* 175 */}, +{ "de", /* 176 */}, +{ "+-", /* 177 */}, +{ "sd", /* 178 */}, +{ ">=", /* 179 */}, +{ "mu", /* 180 */}, +{ "pt", /* 181 */}, +{ "pd", /* 182 */}, +{ "bu", /* 183 */}, +{ "di", /* 184 */}, +{ "!=", /* 185 */}, +{ "==", /* 186 */}, +{ "~=", "~~", /* 187 */}, +{ 0, /* 188 */}, +{ "arrowvertex", /* 189 */}, +{ "an", /* 190 */}, +{ "CR", /* 191 */}, +{ "Ah", /* 192 */}, +{ "Im", /* 193 */}, +{ "Re", /* 194 */}, +{ "wp", /* 195 */}, +{ "c*", /* 196 */}, +{ "c+", /* 197 */}, +{ "es", /* 198 */}, +{ "ca", /* 199 */}, +{ "cu", /* 200 */}, +{ "sp", /* 201 */}, +{ "ip", /* 202 */}, +{ "nb", /* 203 */}, +{ "sb", /* 204 */}, +{ "ib", /* 205 */}, +{ "mo", /* 206 */}, +{ "nm", /* 207 */}, +{ "/_", /* 208 */}, +{ "gr", /* 209 */}, +{ "rg", /* 210 */}, +{ "co", /* 211 */}, +{ "tm", /* 212 */}, +{ 0, /* 213 */}, +{ "sr", "sqrt", /* 214 */}, +{ "md", /* 215 */}, +{ "no", /* 216 */}, +{ "AN", /* 217 */}, +{ "OR", /* 218 */}, +{ "hA", /* 219 */}, +{ "lA", /* 220 */}, +{ "uA", /* 221 */}, +{ "rA", /* 222 */}, +{ "dA", /* 223 */}, +{ "lz", /* 224 */}, +{ "la", /* 225 */}, +{ 0, /* 226 */}, +{ 0, /* 227 */}, +{ 0, /* 228 */}, +{ 0, /* 229 */}, +{ "parenlefttp", /* 230 */}, +{ "parenleftex", /* 231 */}, +{ "parenleftbt", /* 232 */}, +{ "bracketlefttp", "lc", /* 233 */}, +{ "bracketleftex", /* 234 */}, +{ "bracketleftbt", "lf", /* 235 */}, +{ "bracelefttp", "lt", /* 236 */}, +{ "braceleftmid", "lk", /* 237 */}, +{ "braceleftbt", "lb", /* 238 */}, +{ "bracerightex", "braceleftex", "braceex", "bv", /* 239 */}, +{ 0, /* 240 */}, +{ "ra", /* 241 */}, +{ "is", "integral", /* 242 */}, +{ 0, /* 243 */}, +{ 0, /* 244 */}, +{ 0, /* 245 */}, +{ "parenrighttp", /* 246 */}, +{ "parenrightex", /* 247 */}, +{ "parenrightbt", /* 248 */}, +{ "bracketrighttp", "rc", /* 249 */}, +{ "bracketrightex", /* 250 */}, +{ "bracketrightbt", "rf", /* 251 */}, +{ "bracerighttp", "rt", /* 252 */}, +{ "bracerightmid", "rk", /* 253 */}, +{ "bracerightbt", "rb", /* 254 */}, +{ 0, /* 255 */}, +}}; + + +static void +load_standard_maps (void) +{ + standard_maps_loaded = 1; + DviRegisterMap (&ISO8859_1_map); + DviRegisterMap (&Adobe_Symbol_map); +} diff --git a/contrib/groff/src/libs/libxutil/Makefile.sub b/contrib/groff/src/libs/libxutil/Makefile.sub new file mode 100644 index 000000000000..24444a68048f --- /dev/null +++ b/contrib/groff/src/libs/libxutil/Makefile.sub @@ -0,0 +1,10 @@ +LIB=xutil +EXTRA_CFLAGS=$(X_CFLAGS) +OBJS=\ + DviChar.$(OBJEXT) \ + XFontName.$(OBJEXT) \ + xmalloc.$(OBJEXT) +CSRCS=\ + $(srcdir)/DviChar.c \ + $(srcdir)/XFontName.c \ + $(srcdir)/xmalloc.c diff --git a/contrib/groff/src/libs/libxutil/XFontName.c b/contrib/groff/src/libs/libxutil/XFontName.c new file mode 100644 index 000000000000..7ed78ae42252 --- /dev/null +++ b/contrib/groff/src/libs/libxutil/XFontName.c @@ -0,0 +1,241 @@ +/* + * XFontName.c + * + * build/parse X Font name strings + */ + +#include +#include +#include "XFontName.h" +#include + +static char * +extractStringField (char *name, char *buffer, int size, + unsigned int *attrp, unsigned int bit) +{ + char *buf = buffer; + + if (!*name) + return 0; + while (*name && *name != '-' && size > 0) { + *buf++ = *name++; + --size; + } + if (size <= 0) + return 0; + *buf = '\0'; + if (buffer[0] != '*' || buffer[1] != '\0') + *attrp |= bit; + if (*name == '-') + return name+1; + return name; +} + +static char * +extractUnsignedField (char *name, unsigned int *result, + unsigned int *attrp, unsigned int bit) +{ + char buf[256]; + char *c; + unsigned int i; + + name = extractStringField (name, buf, sizeof (buf), attrp, bit); + if (!name) + return 0; + if (!(*attrp & bit)) + return name; + i = 0; + for (c = buf; *c; c++) { + if (!isdigit (*c)) + return 0; + i = i * 10 + (*c - '0'); + } + *result = i; + return name; +} + +Bool +XParseFontName (XFontNameString fontNameString, XFontName *fontName, + unsigned int *fontNameAttributes) +{ + char *name = fontNameString; + XFontName temp; + unsigned int attributes = 0; + +#define GetString(field,bit)\ + if (!(name = extractStringField \ + (name, temp.field, sizeof (temp.field),\ + &attributes, bit))) \ + return False; + +#define GetUnsigned(field,bit)\ + if (!(name = extractUnsignedField \ + (name, &temp.field, \ + &attributes, bit))) \ + return False; + + GetString (Registry, FontNameRegistry) + GetString (Foundry, FontNameFoundry) + GetString (FamilyName, FontNameFamilyName) + GetString (WeightName, FontNameWeightName) + GetString (Slant, FontNameSlant) + GetString (SetwidthName, FontNameSetwidthName) + GetString (AddStyleName, FontNameAddStyleName) + GetUnsigned (PixelSize, FontNamePixelSize) + GetUnsigned (PointSize, FontNamePointSize) + GetUnsigned (ResolutionX, FontNameResolutionX) + GetUnsigned (ResolutionY, FontNameResolutionY) + GetString (Spacing, FontNameSpacing) + GetUnsigned (AverageWidth, FontNameAverageWidth) + GetString (CharSetRegistry, FontNameCharSetRegistry) + if (!*name) { + temp.CharSetEncoding[0] = '\0'; + attributes |= FontNameCharSetEncoding; + } else { + GetString (CharSetEncoding, FontNameCharSetEncoding) + } + *fontName = temp; + *fontNameAttributes = attributes; + return True; +} + +static char * +utoa (unsigned int u, char *s, int size) +{ + char *t; + + t = s + size; + *--t = '\0'; + do + *--t = (u % 10) + '0'; + while (u /= 10); + return t; +} + +Bool +XFormatFontName (XFontName *fontName, unsigned int fontNameAttributes, + XFontNameString fontNameString) +{ + char tmp[256]; + char *name = tmp, *f; + int left = sizeof (tmp) - 1; + char number[32]; + +#define PutString(field, bit)\ + f = (fontNameAttributes & bit) ? \ + fontName->field \ + : (char *)"*"; \ + if ((left -= strlen (f)) < 0) \ + return False; \ + while (*f) \ + if ((*name++ = *f++) == '-') \ + return False; +#define PutHyphen()\ + if (--left < 0) \ + return False; \ + *name++ = '-'; + +#define PutUnsigned(field, bit) \ + f = (fontNameAttributes & bit) ? \ + utoa (fontName->field, number, sizeof (number)) \ + : (char *)"*"; \ + if ((left -= strlen (f)) < 0) \ + return False; \ + while (*f) \ + *name++ = *f++; + + PutString (Registry, FontNameRegistry) + PutHyphen (); + PutString (Foundry, FontNameFoundry) + PutHyphen (); + PutString (FamilyName, FontNameFamilyName) + PutHyphen (); + PutString (WeightName, FontNameWeightName) + PutHyphen (); + PutString (Slant, FontNameSlant) + PutHyphen (); + PutString (SetwidthName, FontNameSetwidthName) + PutHyphen (); + PutString (AddStyleName, FontNameAddStyleName) + PutHyphen (); + PutUnsigned (PixelSize, FontNamePixelSize) + PutHyphen (); + PutUnsigned (PointSize, FontNamePointSize) + PutHyphen (); + PutUnsigned (ResolutionX, FontNameResolutionX) + PutHyphen (); + PutUnsigned (ResolutionY, FontNameResolutionY) + PutHyphen (); + PutString (Spacing, FontNameSpacing) + PutHyphen (); + PutUnsigned (AverageWidth, FontNameAverageWidth) + PutHyphen (); + PutString (CharSetRegistry, FontNameCharSetRegistry) + PutHyphen (); + PutString (CharSetEncoding, FontNameCharSetEncoding) + *name = '\0'; + strcpy (fontNameString, tmp); + return True; +} + +Bool +XCompareFontName (XFontName *name1, XFontName *name2, + unsigned int fontNameAttributes) +{ +#define CompareString(field,bit) \ + if (fontNameAttributes & bit) \ + if (strcmp (name1->field, name2->field)) \ + return False; + +#define CompareUnsigned(field,bit) \ + if (fontNameAttributes & bit) \ + if (name1->field != name2->field) \ + return False; + + CompareString (Registry, FontNameRegistry) + CompareString (Foundry, FontNameFoundry) + CompareString (FamilyName, FontNameFamilyName) + CompareString (WeightName, FontNameWeightName) + CompareString (Slant, FontNameSlant) + CompareString (SetwidthName, FontNameSetwidthName) + CompareString (AddStyleName, FontNameAddStyleName) + CompareUnsigned (PixelSize, FontNamePixelSize) + CompareUnsigned (PointSize, FontNamePointSize) + CompareUnsigned (ResolutionX, FontNameResolutionX) + CompareUnsigned (ResolutionY, FontNameResolutionY) + CompareString (Spacing, FontNameSpacing) + CompareUnsigned (AverageWidth, FontNameAverageWidth) + CompareString (CharSetRegistry, FontNameCharSetRegistry) + CompareString (CharSetEncoding, FontNameCharSetEncoding) + return True; +} + +Bool +XCopyFontName (XFontName *name1, XFontName *name2, + unsigned int fontNameAttributes) +{ +#define CopyString(field,bit) \ + if (fontNameAttributes & bit) \ + strcpy (name2->field, name1->field); + +#define CopyUnsigned(field,bit) \ + if (fontNameAttributes & bit) \ + name2->field = name1->field; + + CopyString (Registry, FontNameRegistry) + CopyString (Foundry, FontNameFoundry) + CopyString (FamilyName, FontNameFamilyName) + CopyString (WeightName, FontNameWeightName) + CopyString (Slant, FontNameSlant) + CopyString (SetwidthName, FontNameSetwidthName) + CopyString (AddStyleName, FontNameAddStyleName) + CopyUnsigned (PixelSize, FontNamePixelSize) + CopyUnsigned (PointSize, FontNamePointSize) + CopyUnsigned (ResolutionX, FontNameResolutionX) + CopyUnsigned (ResolutionY, FontNameResolutionY) + CopyString (Spacing, FontNameSpacing) + CopyUnsigned (AverageWidth, FontNameAverageWidth) + CopyString (CharSetRegistry, FontNameCharSetRegistry) + CopyString (CharSetEncoding, FontNameCharSetEncoding) + return True; +} diff --git a/contrib/groff/src/libs/libxutil/xmalloc.c b/contrib/groff/src/libs/libxutil/xmalloc.c new file mode 100644 index 000000000000..f31056bfd735 --- /dev/null +++ b/contrib/groff/src/libs/libxutil/xmalloc.c @@ -0,0 +1,7 @@ +#include +#include + +char *xmalloc(int n) +{ + return XtMalloc(n); +} diff --git a/contrib/groff/src/preproc/eqn/Makefile.sub b/contrib/groff/src/preproc/eqn/Makefile.sub index 755464564194..9028f94c8895 100644 --- a/contrib/groff/src/preproc/eqn/Makefile.sub +++ b/contrib/groff/src/preproc/eqn/Makefile.sub @@ -1,6 +1,7 @@ PROG=eqn$(EXEEXT) MAN1=eqn.n neqn.n XLIBS=$(LIBGROFF) +MLIB=$(LIBM) OBJS=\ eqn.$(OBJEXT) \ main.$(OBJEXT) \ @@ -44,11 +45,10 @@ CLEANADD=neqn all: neqn -neqn: neqn.sh +neqn: neqn.sh $(SH_DEPS_SED_SCRIPT) -rm -f $@ sed -e 's/@g@/$(g)/g' \ - -e 's|@BINDIR@|$(bindir)|g' \ - -e 's|@SEP@|$(SEP)|g' \ + -f $(SH_DEPS_SED_SCRIPT) \ -e $(SH_SCRIPT_SED_CMD) $(srcdir)/neqn.sh >$@ chmod +x $@ diff --git a/contrib/groff/src/preproc/eqn/box.cpp b/contrib/groff/src/preproc/eqn/box.cpp index 41d8dff46eff..953218a68da0 100644 --- a/contrib/groff/src/preproc/eqn/box.cpp +++ b/contrib/groff/src/preproc/eqn/box.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 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 "eqn.h" #include "pbox.h" @@ -80,7 +81,7 @@ int matrix_side_sep = 17; // = thin space int nroff = 0; // should we grok ndefine or tdefine? -struct { +struct S { const char *name; int *ptr; } param_table[] = { diff --git a/contrib/groff/src/preproc/eqn/box.h b/contrib/groff/src/preproc/eqn/box.h index 01bfe96a4ac3..94842077039a 100644 --- a/contrib/groff/src/preproc/eqn/box.h +++ b/contrib/groff/src/preproc/eqn/box.h @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 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,9 +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. */ -struct list_box; +class list_box; class box { private: @@ -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; @@ -238,9 +244,6 @@ public: }; box *split_text(char *); -box *make_script_box(box *, box *, box *); -box *make_mark_box(box *); -box *make_lineup_box(box *); box *make_delim_box(char *, box *, char *); box *make_sqrt_box(box *); box *make_prime_box(box *); diff --git a/contrib/groff/src/preproc/eqn/delim.cpp b/contrib/groff/src/preproc/eqn/delim.cpp index b7241802288d..9bb7c9b982c4 100644 --- a/contrib/groff/src/preproc/eqn/delim.cpp +++ b/contrib/groff/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/src/preproc/eqn/eqn.cpp b/contrib/groff/src/preproc/eqn/eqn.cpp index 2c01ba671798..71b69cd9ceee 100644 --- a/contrib/groff/src/preproc/eqn/eqn.cpp +++ b/contrib/groff/src/preproc/eqn/eqn.cpp @@ -16,10 +16,9 @@ static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93 (groff)"; #include "lib.h" #include "box.h" extern int non_empty_flag; -char *strsave(const char *); int yylex(); void yyerror(const char *); -#line 32 "eqn.y" +#line 31 "eqn.y" typedef union { char *str; box *b; @@ -28,7 +27,7 @@ typedef union { int n; column *col; } YYSTYPE; -#line 32 "y.tab.c" +#line 31 "y.tab.c" #define OVER 257 #define SMALLOVER 258 #define SQRT 259 @@ -809,15 +808,15 @@ yyreduce: switch (yyn) { case 2: -#line 126 "eqn.y" +#line 125 "eqn.y" { yyvsp[0].b->top_level(); non_empty_flag = 1; } break; case 3: -#line 131 "eqn.y" +#line 130 "eqn.y" { yyval.b = yyvsp[0].b; } break; case 4: -#line 133 "eqn.y" +#line 132 "eqn.y" { list_box *lb = yyvsp[-1].b->to_list_box(); if (!lb) @@ -827,207 +826,207 @@ case 4: } break; case 5: -#line 144 "eqn.y" +#line 143 "eqn.y" { yyval.b = yyvsp[0].b; } break; case 6: -#line 146 "eqn.y" +#line 145 "eqn.y" { yyval.b = make_mark_box(yyvsp[0].b); } break; case 7: -#line 148 "eqn.y" +#line 147 "eqn.y" { yyval.b = make_lineup_box(yyvsp[0].b); } break; case 8: -#line 153 "eqn.y" +#line 152 "eqn.y" { yyval.b = yyvsp[0].b; } break; case 9: -#line 155 "eqn.y" +#line 154 "eqn.y" { yyval.b = make_limit_box(yyvsp[-2].b, 0, yyvsp[0].b); } break; case 10: -#line 157 "eqn.y" +#line 156 "eqn.y" { yyval.b = make_limit_box(yyvsp[-2].b, yyvsp[0].b, 0); } break; case 11: -#line 159 "eqn.y" +#line 158 "eqn.y" { yyval.b = make_limit_box(yyvsp[-4].b, yyvsp[-2].b, yyvsp[0].b); } break; case 12: -#line 161 "eqn.y" +#line 160 "eqn.y" { yyval.b = make_limit_box(yyvsp[-4].b, make_limit_box(yyvsp[-2].b, yyvsp[0].b, 0), 0); } break; case 13: -#line 166 "eqn.y" +#line 165 "eqn.y" { yyval.b = yyvsp[0].b; } break; case 14: -#line 168 "eqn.y" +#line 167 "eqn.y" { yyval.b = make_sqrt_box(yyvsp[0].b); } break; case 15: -#line 170 "eqn.y" +#line 169 "eqn.y" { yyval.b = make_over_box(yyvsp[-2].b, yyvsp[0].b); } break; case 16: -#line 172 "eqn.y" +#line 171 "eqn.y" { yyval.b = make_small_over_box(yyvsp[-2].b, yyvsp[0].b); } break; case 17: -#line 177 "eqn.y" +#line 176 "eqn.y" { yyval.b = yyvsp[0].b; } break; case 18: -#line 179 "eqn.y" +#line 178 "eqn.y" { yyval.b = make_script_box(yyvsp[-2].b, 0, yyvsp[0].b); } break; case 19: -#line 184 "eqn.y" +#line 183 "eqn.y" { yyval.b = yyvsp[0].b; } break; case 20: -#line 186 "eqn.y" +#line 185 "eqn.y" { yyval.b = make_script_box(yyvsp[-2].b, yyvsp[0].b, 0); } break; case 21: -#line 188 "eqn.y" +#line 187 "eqn.y" { yyval.b = make_script_box(yyvsp[-4].b, yyvsp[-2].b, yyvsp[0].b); } break; case 22: -#line 193 "eqn.y" +#line 192 "eqn.y" { yyval.b = split_text(yyvsp[0].str); } break; case 23: -#line 195 "eqn.y" +#line 194 "eqn.y" { yyval.b = new quoted_text_box(yyvsp[0].str); } break; case 24: -#line 197 "eqn.y" +#line 196 "eqn.y" { yyval.b = split_text(yyvsp[0].str); } break; case 25: -#line 199 "eqn.y" +#line 198 "eqn.y" { yyval.b = new quoted_text_box(yyvsp[0].str); } break; case 26: -#line 201 "eqn.y" +#line 200 "eqn.y" { yyval.b = new half_space_box; } break; case 27: -#line 203 "eqn.y" +#line 202 "eqn.y" { yyval.b = new space_box; } break; case 28: -#line 205 "eqn.y" +#line 204 "eqn.y" { yyval.b = new tab_box; } break; case 29: -#line 207 "eqn.y" +#line 206 "eqn.y" { yyval.b = yyvsp[-1].b; } break; case 30: -#line 209 "eqn.y" +#line 208 "eqn.y" { yyvsp[0].pb->set_alignment(CENTER_ALIGN); yyval.b = yyvsp[0].pb; } break; case 31: -#line 211 "eqn.y" +#line 210 "eqn.y" { yyvsp[0].pb->set_alignment(LEFT_ALIGN); yyval.b = yyvsp[0].pb; } break; case 32: -#line 213 "eqn.y" +#line 212 "eqn.y" { yyvsp[0].pb->set_alignment(RIGHT_ALIGN); yyval.b = yyvsp[0].pb; } break; case 33: -#line 215 "eqn.y" +#line 214 "eqn.y" { yyvsp[0].pb->set_alignment(CENTER_ALIGN); yyval.b = yyvsp[0].pb; } break; case 34: -#line 217 "eqn.y" +#line 216 "eqn.y" { yyval.b = yyvsp[-1].mb; } break; case 35: -#line 219 "eqn.y" +#line 218 "eqn.y" { yyval.b = make_delim_box(yyvsp[-3].str, yyvsp[-2].b, yyvsp[0].str); } break; case 36: -#line 221 "eqn.y" +#line 220 "eqn.y" { yyval.b = make_delim_box(yyvsp[-1].str, yyvsp[0].b, 0); } break; case 37: -#line 223 "eqn.y" +#line 222 "eqn.y" { yyval.b = make_overline_box(yyvsp[-1].b); } break; case 38: -#line 225 "eqn.y" +#line 224 "eqn.y" { yyval.b = make_underline_box(yyvsp[-1].b); } break; case 39: -#line 227 "eqn.y" +#line 226 "eqn.y" { yyval.b = make_prime_box(yyvsp[-1].b); } break; case 40: -#line 229 "eqn.y" +#line 228 "eqn.y" { yyval.b = make_accent_box(yyvsp[-2].b, yyvsp[0].b); } break; case 41: -#line 231 "eqn.y" +#line 230 "eqn.y" { yyval.b = make_uaccent_box(yyvsp[-2].b, yyvsp[0].b); } break; case 42: -#line 233 "eqn.y" +#line 232 "eqn.y" { yyval.b = new font_box(strsave(get_grfont()), yyvsp[0].b); } break; case 43: -#line 235 "eqn.y" +#line 234 "eqn.y" { yyval.b = new font_box(strsave(get_gbfont()), yyvsp[0].b); } break; case 44: -#line 237 "eqn.y" +#line 236 "eqn.y" { yyval.b = new font_box(strsave(get_gfont()), yyvsp[0].b); } break; case 45: -#line 239 "eqn.y" +#line 238 "eqn.y" { yyval.b = new fat_box(yyvsp[0].b); } break; case 46: -#line 241 "eqn.y" +#line 240 "eqn.y" { yyval.b = new font_box(yyvsp[-1].str, yyvsp[0].b); } break; case 47: -#line 243 "eqn.y" +#line 242 "eqn.y" { yyval.b = new size_box(yyvsp[-1].str, yyvsp[0].b); } break; case 48: -#line 245 "eqn.y" +#line 244 "eqn.y" { yyval.b = new hmotion_box(yyvsp[-1].n, yyvsp[0].b); } break; case 49: -#line 247 "eqn.y" +#line 246 "eqn.y" { yyval.b = new hmotion_box(-yyvsp[-1].n, yyvsp[0].b); } break; case 50: -#line 249 "eqn.y" +#line 248 "eqn.y" { yyval.b = new vmotion_box(yyvsp[-1].n, yyvsp[0].b); } break; case 51: -#line 251 "eqn.y" +#line 250 "eqn.y" { yyval.b = new vmotion_box(-yyvsp[-1].n, yyvsp[0].b); } break; case 52: -#line 253 "eqn.y" +#line 252 "eqn.y" { yyvsp[0].b->set_spacing_type(yyvsp[-1].str); yyval.b = yyvsp[0].b; } break; case 53: -#line 255 "eqn.y" +#line 254 "eqn.y" { yyval.b = new vcenter_box(yyvsp[0].b); } break; case 54: -#line 257 "eqn.y" +#line 256 "eqn.y" { yyval.b = make_special_box(yyvsp[-1].str, yyvsp[0].b); } break; case 55: -#line 262 "eqn.y" +#line 261 "eqn.y" { int n; if (sscanf(yyvsp[0].str, "%d", &n) == 1) @@ -1036,82 +1035,82 @@ case 55: } break; case 56: -#line 272 "eqn.y" +#line 271 "eqn.y" { yyval.pb = new pile_box(yyvsp[0].b); } break; case 57: -#line 274 "eqn.y" +#line 273 "eqn.y" { yyvsp[-2].pb->append(yyvsp[0].b); yyval.pb = yyvsp[-2].pb; } break; case 58: -#line 279 "eqn.y" +#line 278 "eqn.y" { yyval.pb = yyvsp[-1].pb; } break; case 59: -#line 281 "eqn.y" +#line 280 "eqn.y" { yyvsp[-1].pb->set_space(yyvsp[-3].n); yyval.pb = yyvsp[-1].pb; } break; case 60: -#line 286 "eqn.y" +#line 285 "eqn.y" { yyval.mb = new matrix_box(yyvsp[0].col); } break; case 61: -#line 288 "eqn.y" +#line 287 "eqn.y" { yyvsp[-1].mb->append(yyvsp[0].col); yyval.mb = yyvsp[-1].mb; } break; case 62: -#line 293 "eqn.y" +#line 292 "eqn.y" { yyval.col = new column(yyvsp[0].b); } break; case 63: -#line 295 "eqn.y" +#line 294 "eqn.y" { yyvsp[-2].col->append(yyvsp[0].b); yyval.col = yyvsp[-2].col; } break; case 64: -#line 300 "eqn.y" +#line 299 "eqn.y" { yyval.col = yyvsp[-1].col; } break; case 65: -#line 302 "eqn.y" +#line 301 "eqn.y" { yyvsp[-1].col->set_space(yyvsp[-3].n); yyval.col = yyvsp[-1].col; } break; case 66: -#line 307 "eqn.y" +#line 306 "eqn.y" { yyvsp[0].col->set_alignment(CENTER_ALIGN); yyval.col = yyvsp[0].col; } break; case 67: -#line 309 "eqn.y" +#line 308 "eqn.y" { yyvsp[0].col->set_alignment(LEFT_ALIGN); yyval.col = yyvsp[0].col; } break; case 68: -#line 311 "eqn.y" +#line 310 "eqn.y" { yyvsp[0].col->set_alignment(RIGHT_ALIGN); yyval.col = yyvsp[0].col; } break; case 69: -#line 313 "eqn.y" +#line 312 "eqn.y" { yyvsp[0].col->set_alignment(CENTER_ALIGN); yyval.col = yyvsp[0].col; } break; case 70: -#line 317 "eqn.y" +#line 316 "eqn.y" { yyval.str = yyvsp[0].str; } break; case 71: -#line 319 "eqn.y" +#line 318 "eqn.y" { yyval.str = yyvsp[0].str; } break; case 72: -#line 324 "eqn.y" +#line 323 "eqn.y" { yyval.str = yyvsp[0].str; } break; case 73: -#line 326 "eqn.y" +#line 325 "eqn.y" { yyval.str = strsave("{"); } break; case 74: -#line 328 "eqn.y" +#line 327 "eqn.y" { yyval.str = strsave("}"); } break; -#line 1115 "y.tab.c" +#line 1114 "y.tab.c" } yyssp -= yym; yystate = *yyssp; diff --git a/contrib/groff/src/preproc/eqn/eqn.h b/contrib/groff/src/preproc/eqn/eqn.h index ee25f034e8b3..fca3e9793a38 100644 --- a/contrib/groff/src/preproc/eqn/eqn.h +++ b/contrib/groff/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/src/preproc/eqn/eqn.man b/contrib/groff/src/preproc/eqn/eqn.man index 6d0733c4adc6..0f47771c2392 100644 --- a/contrib/groff/src/preproc/eqn/eqn.man +++ b/contrib/groff/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 -Here's a more complicated construct that draws a box round an expression: +.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/src/preproc/eqn/eqn.y b/contrib/groff/src/preproc/eqn/eqn.y index 833a0f01072a..85157d6fce4b 100644 --- a/contrib/groff/src/preproc/eqn/eqn.y +++ b/contrib/groff/src/preproc/eqn/eqn.y @@ -1,4 +1,4 @@ -/* 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. @@ -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 @@ -24,7 +24,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "lib.h" #include "box.h" extern int non_empty_flag; -char *strsave(const char *); int yylex(); void yyerror(const char *); %} diff --git a/contrib/groff/src/preproc/eqn/lex.cpp b/contrib/groff/src/preproc/eqn/lex.cpp index abc07c9cfd5f..6aa494dbf0d8 100644 --- a/contrib/groff/src/preproc/eqn/lex.cpp +++ b/contrib/groff/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/src/preproc/eqn/limit.cpp b/contrib/groff/src/preproc/eqn/limit.cpp index c8b55877d9ec..b9f35f97efc5 100644 --- a/contrib/groff/src/preproc/eqn/limit.cpp +++ b/contrib/groff/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/src/preproc/eqn/list.cpp b/contrib/groff/src/preproc/eqn/list.cpp index 1118fa1b1660..003562afa501 100644 --- a/contrib/groff/src/preproc/eqn/list.cpp +++ b/contrib/groff/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/src/preproc/eqn/main.cpp b/contrib/groff/src/preproc/eqn/main.cpp index dabac5fd290c..7971e2c2dc3c 100644 --- a/contrib/groff/src/preproc/eqn/main.cpp +++ b/contrib/groff/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/src/preproc/eqn/mark.cpp b/contrib/groff/src/preproc/eqn/mark.cpp index 99d1b75f2f78..9fa65790c6f1 100644 --- a/contrib/groff/src/preproc/eqn/mark.cpp +++ b/contrib/groff/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/src/preproc/eqn/neqn.sh b/contrib/groff/src/preproc/eqn/neqn.sh index 43fe1e858e25..f22a2baa172c 100644 --- a/contrib/groff/src/preproc/eqn/neqn.sh +++ b/contrib/groff/src/preproc/eqn/neqn.sh @@ -1,9 +1,9 @@ -#!/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. -: ${GROFF_BIN_PATH=@BINDIR@} -PATH=$GROFF_BIN_PATH@SEP@$PATH +@GROFF_BIN_PATH_SETUP@ +PATH="$GROFF_RUNTIME$PATH" export PATH exec @g@eqn -Tascii ${1+"$@"} diff --git a/contrib/groff/src/preproc/eqn/other.cpp b/contrib/groff/src/preproc/eqn/other.cpp index c052f5239720..9f360df67912 100644 --- a/contrib/groff/src/preproc/eqn/other.cpp +++ b/contrib/groff/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/src/preproc/eqn/over.cpp b/contrib/groff/src/preproc/eqn/over.cpp index 279efc8b4306..302c5b5d50c0 100644 --- a/contrib/groff/src/preproc/eqn/over.cpp +++ b/contrib/groff/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/src/preproc/eqn/pbox.h b/contrib/groff/src/preproc/eqn/pbox.h index d1f16ac486ae..f100f2165662 100644 --- a/contrib/groff/src/preproc/eqn/pbox.h +++ b/contrib/groff/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/src/preproc/eqn/pile.cpp b/contrib/groff/src/preproc/eqn/pile.cpp index 0df5241f0fee..10d1708809af 100644 --- a/contrib/groff/src/preproc/eqn/pile.cpp +++ b/contrib/groff/src/preproc/eqn/pile.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,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" @@ -114,13 +114,13 @@ void pile_box::debug_print() int matrix_box::compute_metrics(int style) { int i, j; - int maxlen = 0; + int max_len = 0; int space = 0; for (i = 0; i < len; i++) { for (j = 0; j < p[i]->len; j++) p[i]->p[j]->compute_metrics(style); - if (p[i]->len > maxlen) - maxlen = p[i]->len; + if (p[i]->len > max_len) + max_len = p[i]->len; if (p[i]->space > space) space = p[i]->space; } @@ -145,7 +145,7 @@ int matrix_box::compute_metrics(int style) printf("/\\n(.V+(\\n(.V/2)*\\n(.V\n"); printf(".nr " SUP_RAISE_FORMAT " \\n[" BASELINE_SEP_FORMAT "]*%d/2" "+%dM\n", - uid, uid, maxlen-1, axis_height - shift_down); + uid, uid, max_len-1, axis_height - shift_down); printf(".nr " HEIGHT_FORMAT " 0\\n[" SUP_RAISE_FORMAT "]+(0", uid, uid); for (i = 0; i < len; i++) @@ -153,10 +153,10 @@ int matrix_box::compute_metrics(int style) printf(")>?0\n"); printf(".nr " DEPTH_FORMAT " \\n[" BASELINE_SEP_FORMAT "]*%d-\\n[" SUP_RAISE_FORMAT "]+(0", - uid, uid, maxlen-1, uid); + uid, uid, max_len-1, uid); for (i = 0; i < len; i++) - if (p[i]->len == maxlen) - printf(">?\\n[" DEPTH_FORMAT "]", p[i]->p[maxlen-1]->uid); + if (p[i]->len == max_len) + printf(">?\\n[" DEPTH_FORMAT "]", p[i]->p[max_len-1]->uid); printf(")>?0\n"); return FOUND_NOTHING; } diff --git a/contrib/groff/src/preproc/eqn/script.cpp b/contrib/groff/src/preproc/eqn/script.cpp index 62a05b4f195b..a9de7428718b 100644 --- a/contrib/groff/src/preproc/eqn/script.cpp +++ b/contrib/groff/src/preproc/eqn/script.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 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 "eqn.h" #include "pbox.h" @@ -103,20 +104,20 @@ int script_box::compute_metrics(int style) else { // sup != 0 // 18c - int p; + int pos; if (style == DISPLAY_STYLE) - p = sup1; + pos = sup1; else if (style & 1) // not cramped - p = sup2; + pos = sup2; else - p = sup3; + pos = sup3; printf(".nr " SUP_RAISE_FORMAT " \\n[" SUP_RAISE_FORMAT "]>?%dM>?(\\n[" DEPTH_FORMAT "]+(%dM/4))\n", - uid, uid, p, sup->uid, x_height); + uid, uid, pos, sup->uid, x_height); // 18d if (sub != 0) { printf(".nr " SUB_LOWER_FORMAT " \\n[" SUB_LOWER_FORMAT "]>?%dM\n", - uid, uid, sub2); + uid, uid, sub2); // 18e printf(".nr " TEMP_REG " \\n[" DEPTH_FORMAT "]-\\n[" SUP_RAISE_FORMAT "]+\\n[" HEIGHT_FORMAT "]-\\n[" diff --git a/contrib/groff/src/preproc/eqn/special.cpp b/contrib/groff/src/preproc/eqn/special.cpp index 310261ae4c59..172686a505b5 100644 --- a/contrib/groff/src/preproc/eqn/special.cpp +++ b/contrib/groff/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/src/preproc/eqn/sqrt.cpp b/contrib/groff/src/preproc/eqn/sqrt.cpp index f998ff332063..8f3373ff9cad 100644 --- a/contrib/groff/src/preproc/eqn/sqrt.cpp +++ b/contrib/groff/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/src/preproc/eqn/text.cpp b/contrib/groff/src/preproc/eqn/text.cpp index 83e4a764c952..e39221276b58 100644 --- a/contrib/groff/src/preproc/eqn/text.cpp +++ b/contrib/groff/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/src/preproc/grn/gprint.h b/contrib/groff/src/preproc/grn/gprint.h index b9df60eeebc6..ad3be443015d 100644 --- a/contrib/groff/src/preproc/grn/gprint.h +++ b/contrib/groff/src/preproc/grn/gprint.h @@ -66,7 +66,7 @@ #define MOD 3 typedef struct point { - float x, y; + double x, y; struct point *nextpt; } POINT; diff --git a/contrib/groff/src/preproc/grn/grn.man b/contrib/groff/src/preproc/grn/grn.man index 9722145bd8b8..575b4ee70c77 100644 --- a/contrib/groff/src/preproc/grn/grn.man +++ b/contrib/groff/src/preproc/grn/grn.man @@ -1,6 +1,6 @@ '\" t .ig -Copyright (C) 2000, 2001, 2002 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 @@ -17,17 +17,24 @@ versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. .. +. +.do nr grn_C \n[.C] +.cp 0 +. .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" .. +. +. .TH @G@GRN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" .SH NAME @g@grn \- groff preprocessor for gremlin files @@ -142,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 @@ -188,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 @@ -202,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 @@ -242,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. @@ -255,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 @@ -635,6 +645,8 @@ David Slattengren and Barry Roitblat wrote the original Berkeley Daniel Senderowicz and Werner Lemberg modified it for .IR groff . . +.cp \n[grn_C] +. .\" Local Variables: .\" mode: nroff .\" End: diff --git a/contrib/groff/src/preproc/grn/hdb.cpp b/contrib/groff/src/preproc/grn/hdb.cpp index c9fbb7dc1a36..5f54040dd5c5 100644 --- a/contrib/groff/src/preproc/grn/hdb.cpp +++ b/contrib/groff/src/preproc/grn/hdb.cpp @@ -1,4 +1,4 @@ -/* Last non-groff version: hdb.c 1.8 (Berkeley) 84/10/20 + /* Last non-groff version: hdb.c 1.8 (Berkeley) 84/10/20 * * Copyright -C- 1982 Barry S. Roitblat * @@ -22,12 +22,13 @@ 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 void savebounds(float x, float y); +extern int compatibility_flag; /* TRUE if in compatibility mode */ +extern void savebounds(double x, double y); /* imports from hpoint.cpp */ extern POINT *PTInit(); -extern POINT *PTMakePoint(float x, float y, POINT ** pplist); +extern POINT *PTMakePoint(double x, double y, POINT ** pplist); int DBGetType(register char *s); @@ -79,12 +80,12 @@ DBRead(register FILE *file) { register int i; register int done; /* flag for input exhausted */ - register float nx; /* x holder so x is not set before orienting */ + register double nx; /* x holder so x is not set before orienting */ int type; /* element type */ ELT *elist; /* pointer to the file's elements */ POINT *plist; /* pointer for reading in points */ char string[MAXSTRING], *txt; - float x, y; /* x and y are read in point coords */ + double x, y; /* x and y are read in point coords */ int len, brush, size; int lastpoint; @@ -99,7 +100,7 @@ DBRead(register FILE *file) SUNFILE = TRUE; } - (void) fscanf(file, "%d%f%f\n", &size, &x, &y); + (void) fscanf(file, "%d%lf%lf\n", &size, &x, &y); /* ignore orientation and file positioning point */ done = FALSE; @@ -115,12 +116,11 @@ DBRead(register FILE *file) type = DBGetType(string); /* interpret element type */ if (type < 0) { /* no more data */ done = TRUE; - (void) fclose(file); } else { #ifdef UW_FASTSCAN (void) xscanf(file, &x, &y); /* always one point */ #else - (void) fscanf(file, "%f%f\n", &x, &y); /* always one point */ + (void) fscanf(file, "%lf%lf\n", &x, &y); /* always one point */ #endif /* UW_FASTSCAN */ plist = PTInit(); /* NULL point list */ @@ -144,9 +144,13 @@ DBRead(register FILE *file) if (string[0] == '*') { /* SUN gremlin file */ lastpoint = TRUE; } else { - (void) sscanf(string, "%f%f", &x, &y); + (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 */ @@ -170,7 +174,7 @@ DBRead(register FILE *file) if (string[0] == '*') { /* SUN gremlin file */ lastpoint = TRUE; } else { - (void) sscanf(string, "%f%f", &x, &y); + (void) sscanf(string, "%lf%lf", &x, &y); if ((x == -1.00 && y == -1.00) && (!SUNFILE)) lastpoint = TRUE; } @@ -182,7 +186,10 @@ DBRead(register FILE *file) (void) getc(file); /* eat blank */ txt = (char *) malloc((unsigned) len + 1); for (i = 0; i < len; ++i) { /* read text */ - txt[i] = getc(file); + int c = getc(file); + if (c == EOF) + break; + txt[i] = c; } txt[len] = '\0'; (void) DBCreateElt(type, plist, brush, size, txt, &elist); @@ -281,8 +288,8 @@ DBGetType(register char *s) */ int xscanf(FILE *f, - float *xp, - float *yp) + double *xp, + double *yp) { register int c, i, j, m, frac; int iscale = 1, jscale = 1; /* x = i/scale, y=j/jscale */ diff --git a/contrib/groff/src/preproc/grn/hgraph.cpp b/contrib/groff/src/preproc/grn/hgraph.cpp index d124c6c0b266..01208951f28f 100644 --- a/contrib/groff/src/preproc/grn/hgraph.cpp +++ b/contrib/groff/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 */ @@ -43,7 +37,7 @@ extern int ytop; extern int ybottom; extern int xleft; extern int xright; -extern enum { +extern enum E { OUTLINE, FILL, BOTH } polyfill; @@ -62,17 +56,17 @@ void tmove(POINT * ptr); void cr(); void drawwig(POINT * ptr, int type); void HGtline(int x1, int y1); -void dx(double x); -void dy(double y); +void deltax(double x); +void deltay(double y); void HGArc(register int cx, register int cy, int px, int py, int angle); void picurve(register int *x, register int *y, int npts); void HGCurve(int *x, int *y, int numpoints); -void Paramaterize(int x[], int y[], float h[], int n); -void PeriodicSpline(float h[], int z[], - float dz[], float d2z[], float d3z[], +void Paramaterize(int x[], int y[], double h[], int n); +void PeriodicSpline(double h[], int z[], + double dz[], double d2z[], double d3z[], int npoints); -void NaturalEndSpline(float h[], int z[], - float dz[], float d2z[], float d3z[], +void NaturalEndSpline(double h[], int z[], + double dz[], double d2z[], double d3z[], int npoints); @@ -166,8 +160,8 @@ HGPrintElt(ELT *element, * stipple fonts). * If polyfill=BOTH, just use the \D'p ...' command. */ - float firstx = p1->x; - float firsty = p1->y; + double firstx = p1->x; + double firsty = p1->y; length = 0; /* keep track of line length so */ /* single lines don't get long */ @@ -223,8 +217,8 @@ HGPrintElt(ELT *element, while (!Nullpoint((PTNextPoint(p1)))) { p1 = PTNextPoint(p1); - dx((double) p1->x); - dy((double) p1->y); + deltax((double) p1->x); + deltay((double) p1->y); if (length++ > LINELENGTH) { length = 0; printf("\\\n"); @@ -233,8 +227,8 @@ HGPrintElt(ELT *element, /* close polygon if not done so by user */ if ((firstx != p1->x) || (firsty != p1->y)) { - dx((double) firstx); - dy((double) firsty); + deltax((double) firstx); + deltay((double) firsty); } putchar('\''); cr(); @@ -412,7 +406,7 @@ HGSetBrush(int mode) /*----------------------------------------------------------------------------* - | Routine: dx (x_destination) + | Routine: deltax (x_destination) | | Results: Scales and outputs a number for delta x (with a leading | space) given `lastx' and x_destination. @@ -421,7 +415,7 @@ HGSetBrush(int mode) *----------------------------------------------------------------------------*/ void -dx(double x) +deltax(double x) { register int ix = (int) (x * troffscale); @@ -431,7 +425,7 @@ dx(double x) /*----------------------------------------------------------------------------* - | Routine: dy (y_destination) + | Routine: deltay (y_destination) | | Results: Scales and outputs a number for delta y (with a leading | space) given `lastyline' and y_destination. @@ -441,7 +435,7 @@ dx(double x) *----------------------------------------------------------------------------*/ void -dy(double y) +deltay(double y) { register int iy = (int) (y * troffscale); @@ -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++) { @@ -713,9 +707,9 @@ HGCurve(int *x, int *y, int numpoints) { - float h[MAXPOINTS], dx[MAXPOINTS], dy[MAXPOINTS]; - float d2x[MAXPOINTS], d2y[MAXPOINTS], d3x[MAXPOINTS], d3y[MAXPOINTS]; - float t, t2, t3; + double h[MAXPOINTS], dx[MAXPOINTS], dy[MAXPOINTS]; + double d2x[MAXPOINTS], d2y[MAXPOINTS], d3x[MAXPOINTS], d3y[MAXPOINTS]; + double t, t2, t3; register int j; register int k; register int nx; @@ -751,7 +745,7 @@ HGCurve(int *x, if ((x[j] == x[j + 1]) && (y[j] == y[j + 1])) continue; for (k = 0; k <= PointsPerInterval; ++k) { - t = (float) k *h[j] / (float) PointsPerInterval; + t = (double) k *h[j] / (double) PointsPerInterval; t2 = t * t; t3 = t * t * t; nx = x[j] + (int) (t * dx[j] + t2 * d2x[j] / 2 + t3 * d3x[j] / 6); @@ -779,14 +773,14 @@ HGCurve(int *x, void Paramaterize(int x[], int y[], - float h[], + double h[], int n) { register int dx; register int dy; register int i; register int j; - float u[MAXPOINTS]; + double u[MAXPOINTS]; for (i = 1; i <= n; ++i) { u[i] = 0; @@ -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) @@ -814,16 +808,16 @@ Paramaterize(int x[], *----------------------------------------------------------------------------*/ void -PeriodicSpline(float h[], /* paramaterization */ +PeriodicSpline(double h[], /* paramaterization */ int z[], /* point list */ - float dz[], /* to return the 1st derivative */ - float d2z[], /* 2nd derivative */ - float d3z[], /* 3rd derivative */ + double dz[], /* to return the 1st derivative */ + double d2z[], /* 2nd derivative */ + double d3z[], /* 3rd derivative */ int npoints) /* number of valid points */ { - float d[MAXPOINTS]; - float deltaz[MAXPOINTS], a[MAXPOINTS], b[MAXPOINTS]; - float c[MAXPOINTS], r[MAXPOINTS], s[MAXPOINTS]; + double d[MAXPOINTS]; + double deltaz[MAXPOINTS], a[MAXPOINTS], b[MAXPOINTS]; + double c[MAXPOINTS], r[MAXPOINTS], s[MAXPOINTS]; int i; /* step 1 */ @@ -886,15 +880,15 @@ PeriodicSpline(float h[], /* paramaterization */ *----------------------------------------------------------------------------*/ void -NaturalEndSpline(float h[], /* parameterization */ +NaturalEndSpline(double h[], /* parameterization */ int z[], /* Point list */ - float dz[], /* to return the 1st derivative */ - float d2z[], /* 2nd derivative */ - float d3z[], /* 3rd derivative */ + double dz[], /* to return the 1st derivative */ + double d2z[], /* 2nd derivative */ + double d3z[], /* 3rd derivative */ int npoints) /* number of valid points */ { - float d[MAXPOINTS]; - float deltaz[MAXPOINTS], a[MAXPOINTS], b[MAXPOINTS]; + double d[MAXPOINTS]; + double deltaz[MAXPOINTS], a[MAXPOINTS], b[MAXPOINTS]; int i; /* step 1 */ @@ -970,11 +964,11 @@ change(register int x, *----------------------------------------------------------------------------*/ void -HGtline(int x1, - int y1) +HGtline(int x_1, + int y_1) { - register int x0 = lastx; - register int y0 = lasty; + register int x_0 = lastx; + register int y_0 = lasty; register int dx; register int dy; register int oldcoord; @@ -986,7 +980,7 @@ HGtline(int x1, register int dotcounter; if (linmod == SOLID) { - line(x1, y1); + line(x_1, y_1); return; } @@ -995,11 +989,11 @@ HGtline(int x1, xinc = 1; yinc = 1; - if ((dx = x1 - x0) < 0) { + if ((dx = x_1 - x_0) < 0) { xinc = -xinc; dx = -dx; } - if ((dy = y1 - y0) < 0) { + if ((dy = y_1 - y_0) < 0) { yinc = -yinc; dy = -dy; } @@ -1007,48 +1001,48 @@ HGtline(int x1, res2 = 0; visible = 0; if (dx >= dy) { - oldcoord = y0; - while (x0 != x1) { - if ((x0 & dotcounter) && !visible) { - change(x0, y0, 0); + oldcoord = y_0; + while (x_0 != x_1) { + if ((x_0 & dotcounter) && !visible) { + change(x_0, y_0, 0); visible = 1; - } else if (visible && !(x0 & dotcounter)) { - change(x0 - xinc, oldcoord, 1); + } else if (visible && !(x_0 & dotcounter)) { + change(x_0 - xinc, oldcoord, 1); visible = 0; } if (res1 > res2) { - oldcoord = y0; + oldcoord = y_0; res2 += dx - res1; res1 = 0; - y0 += yinc; + y_0 += yinc; } res1 += dy; - x0 += xinc; + x_0 += xinc; } } else { - oldcoord = x0; - while (y0 != y1) { - if ((y0 & dotcounter) && !visible) { - change(x0, y0, 0); + oldcoord = x_0; + while (y_0 != y_1) { + if ((y_0 & dotcounter) && !visible) { + change(x_0, y_0, 0); visible = 1; - } else if (visible && !(y0 & dotcounter)) { - change(oldcoord, y0 - yinc, 1); + } else if (visible && !(y_0 & dotcounter)) { + change(oldcoord, y_0 - yinc, 1); visible = 0; } if (res1 > res2) { - oldcoord = x0; + oldcoord = x_0; res2 += dy - res1; res1 = 0; - x0 += xinc; + x_0 += xinc; } res1 += dx; - y0 += yinc; + y_0 += yinc; } } if (visible) - change(x1, y1, 1); + change(x_1, y_1, 1); else - change(x1, y1, 0); + change(x_1, y_1, 0); } /* EOF */ diff --git a/contrib/groff/src/preproc/grn/hpoint.cpp b/contrib/groff/src/preproc/grn/hpoint.cpp index f4e1ca827755..fa24dca7fd47 100644 --- a/contrib/groff/src/preproc/grn/hpoint.cpp +++ b/contrib/groff/src/preproc/grn/hpoint.cpp @@ -24,26 +24,26 @@ PTInit() * into the pointlist. */ POINT * -PTMakePoint(float x, - float y, +PTMakePoint(double x, + double y, POINT **pplist) { - register POINT *point; + register POINT *pt; - if (Nullpoint(point = *pplist)) { /* empty list */ + if (Nullpoint(pt = *pplist)) { /* empty list */ *pplist = (POINT *) malloc(sizeof(POINT)); - point = *pplist; + pt = *pplist; } else { - while (!Nullpoint(point->nextpt)) - point = point->nextpt; - point->nextpt = (POINT *) malloc(sizeof(POINT)); - point = point->nextpt; + while (!Nullpoint(pt->nextpt)) + pt = pt->nextpt; + pt->nextpt = (POINT *) malloc(sizeof(POINT)); + pt = pt->nextpt; } - point->x = x; - point->y = y; - point->nextpt = PTInit(); - return (point); + pt->x = x; + pt->y = y; + pt->nextpt = PTInit(); + return (pt); } /* end PTMakePoint */ /* EOF */ diff --git a/contrib/groff/src/preproc/grn/main.cpp b/contrib/groff/src/preproc/grn/main.cpp index 150b78f5772e..c939647f2c9b 100644 --- a/contrib/groff/src/preproc/grn/main.cpp +++ b/contrib/groff/src/preproc/grn/main.cpp @@ -90,7 +90,7 @@ extern void HGPrintElt(ELT *element, int baseline); extern ELT *DBInit(); extern ELT *DBRead(register FILE *file); extern POINT *PTInit(); -extern POINT *PTMakePoint(float x, float y, POINT **pplist); +extern POINT *PTMakePoint(double x, double y, POINT **pplist); #define SUN_SCALEFACTOR 0.70 @@ -125,7 +125,7 @@ int lastyline; /* A line's vertical position is NOT the */ /* `default' command and are reset each time the */ /* start of a picture (.GS) is found. */ -char *deffont[] = +const char *deffont[] = {"R", "I", "B", "S"}; int defsize[] = {10, 16, 24, 36}; @@ -160,7 +160,7 @@ int style[STYLES] = double scale = 1.0; /* no scaling, default */ int defpoint = 0; /* flag for pointsize scaling */ char *defstipple = (char *) 0; -enum { +enum E { OUTLINE, FILL, BOTH } polyfill; @@ -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') @@ -328,6 +328,8 @@ main(int argc, fputs(inputline, stdout); } } + + return 0; } @@ -389,7 +391,7 @@ getres() /*----------------------------------------------------------------------------* - | Routine: char * doinput (file_pointer) + | Routine: int doinput (file_pointer) | | Results: A line of input is read into `inputline'. | @@ -399,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; } @@ -430,7 +430,7 @@ initpic() thick[i] = defthick[i]; } for (i = 0; i < FONTS; i++) { /* font name defaults */ - tfont[i] = deffont[i]; + tfont[i] = (char *)deffont[i]; } for (i = 0; i < SIZES; i++) { /* font size defaults */ tsize[i] = defsize[i]; @@ -488,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'); @@ -518,7 +518,7 @@ conv(register FILE *fp, if (stipple == (char *) NULL) /* if user forgot stipple */ if (has_polygon(PICTURE)) /* and picture has a polygon */ - stipple = DEFSTIPPLE; /* then set the default */ + stipple = (char *)DEFSTIPPLE; /* then set the default */ if ((temp = bottompoint - toppoint) < 0.1) temp = 0.1; @@ -686,8 +686,8 @@ savestate() *----------------------------------------------------------------------------*/ void -savebounds(float x, - float y) +savebounds(double x, + double y) { if (x < leftpoint) leftpoint = x; @@ -781,17 +781,17 @@ interpret(char *line) case 'l': /* l */ if (isdigit(str1[1])) { /* set stipple index */ - int index = atoi(str1 + 1), val; + int idx = atoi(str1 + 1), val; - if (index < 0 || index > NSTIPPLES) { - error("bad stipple number %1 at line %2", index, linenum); + if (idx < 0 || idx > NSTIPPLES) { + error("bad stipple number %1 at line %2", idx, linenum); break; } if (!defstipple_index) defstipple_index = other_stipple_index; val = atoi(str2); if (val >= 0 && val < 256) - stipple_index[index] = val; + stipple_index[idx] = val; else error("bad stipple index value at line %1", linenum); break; diff --git a/contrib/groff/src/preproc/html/Makefile.sub b/contrib/groff/src/preproc/html/Makefile.sub index 6a9a75707e7e..0763537a94e6 100644 --- a/contrib/groff/src/preproc/html/Makefile.sub +++ b/contrib/groff/src/preproc/html/Makefile.sub @@ -2,5 +2,6 @@ PROG=pre-grohtml$(EXEEXT) # MAN1=pre-grohtml.n MAN1= XLIBS=$(LIBGROFF) +MLIB=$(LIBM) OBJS=pre-html.$(OBJEXT) pushback.$(OBJEXT) CCSRCS=$(srcdir)/pre-html.cpp $(srcdir)/pushback.cpp diff --git a/contrib/groff/src/preproc/html/pre-html.cpp b/contrib/groff/src/preproc/html/pre-html.cpp index 8869136a6ce7..6f8a46aee0fc 100644 --- a/contrib/groff/src/preproc/html/pre-html.cpp +++ b/contrib/groff/src/preproc/html/pre-html.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2002, 2003, 2004 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. */ #define PREHTMLC @@ -34,39 +34,124 @@ 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 #include #ifdef HAVE_UNISTD_H -#include +# include #endif #ifdef _POSIX_VERSION -#include -#define PID_T pid_t +# include +# define PID_T pid_t #else /* not _POSIX_VERSION */ -#define PID_T int +# define PID_T int #endif /* not _POSIX_VERSION */ #include #include "nonposix.h" +/* Establish some definitions to facilitate discrimination between + differing runtime environments. */ + +#undef MAY_FORK_CHILD_PROCESS +#undef MAY_SPAWN_ASYNCHRONOUS_CHILD + +#if defined(__MSDOS__) || defined(_WIN32) + +// Most MS-DOS and Win32 environments will be missing the `fork' capability +// (some like Cygwin have it, but it is best avoided). + +# define MAY_FORK_CHILD_PROCESS 0 + +// On these systems, we use `spawn...', instead of `fork' ... `exec...'. +# include // for `spawn...' +# include // for attributes of pipes + +# if defined(__CYGWIN__) || defined(_UWIN) || defined(_WIN32) + +// These Win32 implementations allow parent and `spawn...'ed child to +// multitask asynchronously. + +# define MAY_SPAWN_ASYNCHRONOUS_CHILD 1 + +# else + +// Others may adopt MS-DOS behaviour where parent must sleep, +// from `spawn...' until child terminates. + +# define MAY_SPAWN_ASYNCHRONOUS_CHILD 0 + +# endif /* not defined __CYGWIN__, _UWIN, or _WIN32 */ + +# if defined(DEBUGGING) && !defined(DEBUG_FILE_DIR) +/* When we are building a DEBUGGING version we need to tell pre-grohtml + where to put intermediate files (the DEBUGGING version will preserve + these on exit). + + On a UNIX host, we might simply use `/tmp', but MS-DOS and Win32 will + probably not have this on all disk drives, so default to using + `c:/temp' instead. (Note that user may choose to override this by + supplying a definition such as + + -DDEBUG_FILE_DIR=d:/path/to/debug/files + + in the CPPFLAGS to `make'.) */ + +# define DEBUG_FILE_DIR c:/temp +# endif + +#else /* not __MSDOS__ or _WIN32 */ + +// For non-Microsoft environments assume UNIX conventions, +// so `fork' is required and child processes are asynchronous. +# define MAY_FORK_CHILD_PROCESS 1 +# define MAY_SPAWN_ASYNCHRONOUS_CHILD 1 + +# if defined(DEBUGGING) && !defined(DEBUG_FILE_DIR) +/* For a DEBUGGING version, on the UNIX host, we can also usually rely + on being able to use `/tmp' for temporary file storage. (Note that, + as in the __MSDOS__ or _WIN32 case above, the user may override this + by defining + + -DDEBUG_FILE_DIR=/path/to/debug/files + + in the CPPFLAGS.) */ + +# define DEBUG_FILE_DIR /tmp +# endif + +#endif /* not __MSDOS__ or _WIN32 */ + +#ifdef DEBUGGING +// For a DEBUGGING version, we need some additional macros, +// to direct the captured debug mode output to appropriately named files +// in the specified DEBUG_FILE_DIR. + +# define DEBUG_TEXT(text) #text +# define DEBUG_NAME(text) DEBUG_TEXT(text) +# define DEBUG_FILE(name) DEBUG_NAME(DEBUG_FILE_DIR) "/" name +#endif + extern "C" const char *Version_string; #include "pre-html.h" #include "pushback.h" #include "html-strings.h" -#define DEFAULT_LINE_LENGTH 7 // inches wide -#define DEFAULT_IMAGE_RES 100 // number of pixels per inch resolution -#define IMAGE_BOARDER_PIXELS 0 -#define INLINE_LEADER_CHAR '\\' +#define DEFAULT_LINE_LENGTH 7 // inches wide +#define DEFAULT_IMAGE_RES 100 // number of pixels per inch resolution +#define IMAGE_BOARDER_PIXELS 0 +#define INLINE_LEADER_CHAR '\\' -#define TRANSPARENT "-background white -transparent white" -#define MIN_ALPHA_BITS 0 -#define MAX_ALPHA_BITS 4 +// Don't use colour names here! Otherwise there is a dependency on +// a file called `rgb.txt' which maps names to colours. +#define TRANSPARENT "-background rgb:f/f/f -transparent rgb:f/f/f" +#define MIN_ALPHA_BITS 0 +#define MAX_ALPHA_BITS 4 #define PAGE_TEMPLATE_SHORT "pg" #define PAGE_TEMPLATE_LONG "-page-" @@ -76,78 +161,87 @@ extern "C" const char *Version_string; #define REGION_TEMPLATE_LONG "-regions-" #if 0 -# define DEBUGGING +# define DEBUGGING #endif #if !defined(TRUE) -# define TRUE (1==1) +# define TRUE (1==1) #endif #if !defined(FALSE) -# define FALSE (1==0) +# define FALSE (1==0) #endif -typedef enum {CENTERED, LEFT, RIGHT, INLINE} IMAGE_ALIGNMENT; +typedef enum { + CENTERED, LEFT, RIGHT, INLINE +} IMAGE_ALIGNMENT; -static int postscriptRes =-1; // postscript resolution, dots per inch -static int stdoutfd = 1; // output file descriptor - normally 1 but might move - // -1 means closed -static int copyofstdoutfd =-1; // a copy of stdout, so we can restore stdout when - // writing to post-html -static char *psFileName = NULL; // name of postscript file -static char *psPageName = NULL; // name of file containing postscript current page -static char *regionFileName = NULL; // name of file containing all image regions -static char *imagePageName = NULL; // name of bitmap image containing current page +static int postscriptRes = -1; // postscript resolution, + // dots per inch +static int stdoutfd = 1; // output file descriptor - + // normally 1 but might move + // -1 means closed +static char *psFileName = NULL; // name of postscript file +static char *psPageName = NULL; // name of file containing + // postscript current page +static char *regionFileName = NULL; // name of file containing all + // image regions +static char *imagePageName = NULL; // name of bitmap image containing + // current page static const char *image_device = "pnmraw"; -static int image_res = DEFAULT_IMAGE_RES; -static int vertical_offset = 0; -static char *image_template = NULL; // image template filename -static char *macroset_template= NULL; // image template passed to troff by -D -static int troff_arg = 0; // troff arg index -static char *image_dir = NULL; // user specified image directory -static int textAlphaBits = MAX_ALPHA_BITS; -static int graphicAlphaBits = MAX_ALPHA_BITS; -static char *antiAlias = NULL; // antialias arguments we pass to gs. -static int show_progress = FALSE; // should we display page numbers as they are processed? -static int currentPageNo = -1; // current image page number +static int image_res = DEFAULT_IMAGE_RES; +static int vertical_offset = 0; +static char *image_template = NULL; // image template filename +static char *macroset_template= NULL; // image template passed to troff + // by -D +static int troff_arg = 0; // troff arg index +static char *image_dir = NULL; // user specified image directory +static int textAlphaBits = MAX_ALPHA_BITS; +static int graphicAlphaBits = MAX_ALPHA_BITS; +static char *antiAlias = NULL; // antialias arguments we pass to gs +static int show_progress = FALSE; // should we display page numbers as + // they are processed? +static int currentPageNo = -1; // current image page number #if defined(DEBUGGING) -static int debug = FALSE; -static char *troffFileName = NULL; // output of pre-html output which is sent to troff -Tps -static char *htmlFileName = NULL; // output of pre-html output which is sent to troff -Thtml +static int debug = FALSE; +static char *troffFileName = NULL; // output of pre-html output which + // is sent to troff -Tps +static char *htmlFileName = NULL; // output of pre-html output which + // is sent to troff -Thtml #endif -static char *linebuf = NULL; // for scanning devps/DESC +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); /* - * Images are generated via postscript, gs and the pnm utilities. + * Images are generated via postscript, gs, and the pnm utilities. */ +#define IMAGE_DEVICE "-Tps" -#define IMAGE_DEVICE "-Tps" -/* - * prototypes - */ static int do_file(const char *filename); + /* - * sys_fatal - writes a fatal error message. - * Taken from src/roff/groff/pipeline.c. + * sys_fatal - Write a fatal error message. + * Taken from src/roff/groff/pipeline.c. */ -void sys_fatal (const char *s) +void sys_fatal(const char *s) { fatal("%1: %2", s, strerror(errno)); } /* - * get_line - copies a line (w/o newline) from a file to the global line buffer + * get_line - Copy a line (w/o newline) from a file to the + * global line buffer. */ -int get_line (FILE *f) +int get_line(FILE *f) { if (f == 0) return 0; @@ -188,10 +282,10 @@ int get_line (FILE *f) } /* - * get_resolution - returns the postscript resolution from devps/DESC + * get_resolution - Return the postscript resolution from devps/DESC. */ -static unsigned int get_resolution (void) +static unsigned int get_resolution(void) { char *pathp; FILE *f; @@ -212,7 +306,7 @@ static unsigned int get_resolution (void) } /* - * html_system - a wrapper for system() + * html_system - A wrapper for system(). */ void html_system(const char *s, int redirect_stdout) @@ -242,29 +336,28 @@ void html_system(const char *s, int redirect_stdout) } /* - * make_message - taken from man printf(3), creates a string via malloc - * and places the result of the va args into string. - * Finally the new string is returned. + * make_message - Create a string via malloc and place the result of the + * va args into string. Finally the new string is returned. + * Taken from man page of printf(3). */ -char * -make_message (const char *fmt, ...) +char *make_message(const char *fmt, ...) { /* Guess we need no more than 100 bytes. */ int n, size = 100; char *p; char *np; va_list ap; - if ((p = (char *)malloc (size)) == NULL) + if ((p = (char *)malloc(size)) == NULL) return NULL; while (1) { /* Try to print in the allocated space. */ va_start(ap, fmt); - n = vsnprintf (p, size, fmt, ap); + n = vsnprintf(p, size, fmt, ap); va_end(ap); /* If that worked, return the string. */ - if (n > -1 && n < size) { - if (size > n+1) { + if (n > -1 && n < size - 1) { /* glibc 2.1 and pre-ANSI C 99 */ + if (size > n + 1) { np = strsave(p); free(p); return np; @@ -272,15 +365,13 @@ make_message (const char *fmt, ...) return p; } /* Else try again with more space. */ - if (n > -1) /* glibc 2.1 */ - size = n+1; /* precisely what is needed */ - else /* glibc 2.0 */ - size *= 2; /* twice the old size */ - if ((np = (char *)realloc (p, size)) == NULL) { - free(p); /* realloc failed, free old, p. */ + else /* glibc 2.0 */ + size *= 2; /* twice the old size */ + if ((np = (char *)realloc(p, size)) == NULL) { + free(p); /* realloc failed, free old, p. */ return NULL; } - p = np; /* use realloc'ed, p */ + p = np; /* use realloc'ed, p */ } } @@ -290,15 +381,15 @@ make_message (const char *fmt, ...) struct char_block { enum { SIZE = 256 }; - char buffer[SIZE]; - int used; - char_block *next; + char buffer[SIZE]; + int used; + char_block *next; char_block(); }; /* - * char_block - constructor, sets the, used, and, next, fields to zero. + * char_block - Constructor. Set the, used, and, next, fields to zero. */ char_block::char_block() @@ -312,22 +403,22 @@ class char_buffer { public: char_buffer(); ~char_buffer(); - int read_file(FILE *fp); - int do_html(int argc, char *argv[]); - int do_image(int argc, char *argv[]); - void write_file_html(void); - void write_file_troff(void); - void write_upto_newline (char_block **t, int *i, int is_html); - int can_see(char_block **t, int *i, const char *string); - int skip_spaces(char_block **t, int *i); + int read_file(FILE *fp); + int do_html(int argc, char *argv[]); + int do_image(int argc, char *argv[]); + void emit_troff_output(int device_format_selector); + void write_upto_newline(char_block **t, int *i, int is_html); + int can_see(char_block **t, int *i, const char *string); + int skip_spaces(char_block **t, int *i); void skip_until_newline(char_block **t, int *i); private: char_block *head; char_block *tail; + int run_output_filter(int device_format_selector, int argc, char *argv[]); }; /* - * char_buffer - constructor + * char_buffer - Constructor. */ char_buffer::char_buffer() @@ -336,7 +427,7 @@ char_buffer::char_buffer() } /* - * char_buffer - deconstructor, throws aways the whole buffer list. + * char_buffer - Destructor. Throw away the whole buffer list. */ char_buffer::~char_buffer() @@ -349,70 +440,69 @@ char_buffer::~char_buffer() } /* - * read_file - read in a complete file, fp, placing the contents inside char_blocks. + * read_file - Read in a complete file, fp, placing the contents inside + * char_blocks. */ -int char_buffer::read_file (FILE *fp) +int char_buffer::read_file(FILE *fp) { int n; - - while (! feof(fp)) { + while (!feof(fp)) { if (tail == NULL) { tail = new char_block; head = tail; - } else { + } + else { if (tail->used == char_block::SIZE) { tail->next = new char_block; - tail = tail->next; + tail = tail->next; } } - // at this point we have a tail which is ready for the next SIZE bytes of the file - + // at this point we have a tail which is ready for the next SIZE + // bytes of the file n = fread(tail->buffer, sizeof(char), char_block::SIZE-tail->used, fp); - if (n <= 0) { + if (n <= 0) // error - return( 0 ); - } else { - tail->used += n*sizeof(char); - } + return 0; + else + tail->used += n * sizeof(char); } - return( 1 ); + return 1; } /* - * writeNbytes - writes n bytes to stdout. + * writeNbytes - Write n bytes to stdout. */ -static void writeNbytes (const char *s, int l) +static void writeNbytes(const char *s, int l) { - int n=0; + int n = 0; int r; - while (n0) && (image_dir[strlen(image_dir)-1] != '/')) { + if (image_dir == NULL) + image_dir = (char *)""; + else if (strlen(image_dir) > 0 + && image_dir[strlen(image_dir) - 1] != '/') { image_dir = make_message("%s/", image_dir); if (image_dir == NULL) sys_fatal("make_message"); } - + if (image_template == NULL) - macroset_template = make_message("%sgrohtml-%d", image_dir, (int)getpid()); + macroset_template = make_message("%sgrohtml-%d", image_dir, + (int)getpid()); else macroset_template = make_message("%s%s", image_dir, image_template); if (macroset_template == NULL) sys_fatal("make_message"); - image_template = (char *)malloc(strlen("-%d")+strlen(macroset_template)+1); + image_template = + (char *)malloc(strlen("-%d") + strlen(macroset_template) + 1); if (image_template == NULL) sys_fatal("malloc"); strcpy(image_template, macroset_template); @@ -448,10 +541,10 @@ static void makeFileName (void) } /* - * setupAntiAlias - sets up the antialias string, used when we call gs. + * setupAntiAlias - Set up the antialias string, used when we call gs. */ -static void setupAntiAlias (void) +static void setupAntiAlias(void) { if (textAlphaBits == 0 && graphicAlphaBits == 0) antiAlias = make_message(" "); @@ -465,23 +558,24 @@ static void setupAntiAlias (void) } /* - * checkImageDir - checks to see whether the image directory is available. + * checkImageDir - Check whether the image directory is available. */ -static void checkImageDir (void) +static void checkImageDir(void) { - if ((image_dir != NULL) && (strcmp(image_dir, "") != 0)) - if (! ((mkdir(image_dir, 0777) == 0) || (errno == EEXIST))) { + if (image_dir != NULL && strcmp(image_dir, "") != 0) + if (!(mkdir(image_dir, 0777) == 0 || errno == EEXIST)) { error("cannot create directory `%1'", image_dir); exit(1); } } /* - * write_end_image - ends the image. It writes out the image extents if we are using -Tps. + * write_end_image - End the image. Write out the image extents if we + * are using -Tps. */ -static void write_end_image (int is_html) +static void write_end_image(int is_html) { /* * if we are producing html then these @@ -499,18 +593,17 @@ static void write_end_image (int is_html) } /* - * write_start_image - writes the troff which will: + * write_start_image - Write troff code which will: * * (i) disable html output for the following image * (ii) reset the max/min x/y registers during postscript * rendering. */ -static void write_start_image (IMAGE_ALIGNMENT pos, int is_html) +static void write_start_image(IMAGE_ALIGNMENT pos, int is_html) { writeString("\\O[5"); switch (pos) { - case INLINE: writeString("i"); break; @@ -525,7 +618,8 @@ static void write_start_image (IMAGE_ALIGNMENT pos, int is_html) writeString("c"); break; } - writeString(image_template); writeString(".png]"); + writeString(image_template); + writeString(".png]"); if (is_html) writeString("\\O[0]\\O[3]"); else @@ -534,24 +628,25 @@ static void write_start_image (IMAGE_ALIGNMENT pos, int is_html) } /* - * write_upto_newline - writes the contents of the buffer until a newline is seen. - * It checks for HTML_IMAGE_INLINE_BEGIN and HTML_IMAGE_INLINE_END - * and if they are present it processes them. + * write_upto_newline - Write the contents of the buffer until a newline + * is seen. Check for HTML_IMAGE_INLINE_BEGIN and + * HTML_IMAGE_INLINE_END; process them if they are + * present. */ -void char_buffer::write_upto_newline (char_block **t, int *i, int is_html) +void char_buffer::write_upto_newline(char_block **t, int *i, int is_html) { - int j=*i; + int j = *i; if (*t) { - while ((j < (*t)->used) && ((*t)->buffer[j] != '\n') && - ((*t)->buffer[j] != INLINE_LEADER_CHAR)) { + while (j < (*t)->used + && (*t)->buffer[j] != '\n' + && (*t)->buffer[j] != INLINE_LEADER_CHAR) j++; - } - if ((j < (*t)->used) && ((*t)->buffer[j] == '\n')) { + if (j < (*t)->used + && (*t)->buffer[j] == '\n') j++; - } - writeNbytes((*t)->buffer+(*i), j-(*i)); + writeNbytes((*t)->buffer + (*i), j - (*i)); if ((*t)->buffer[j] == INLINE_LEADER_CHAR) { if (can_see(t, &j, HTML_IMAGE_INLINE_BEGIN)) write_start_image(INLINE, is_html); @@ -561,208 +656,225 @@ void char_buffer::write_upto_newline (char_block **t, int *i, int is_html) if (j < (*t)->used) { *i = j; j++; - writeNbytes((*t)->buffer+(*i), j-(*i)); + writeNbytes((*t)->buffer + (*i), j - (*i)); } } } if (j == (*t)->used) { *i = 0; - if ((*t)->buffer[j-1] == '\n') { - *t = (*t)->next; - } else { - *t = (*t)->next; + *t = (*t)->next; + if (*t && (*t)->buffer[j - 1] != '\n') write_upto_newline(t, i, is_html); - } - } else { + } + else // newline was seen *i = j; - } } } /* - * can_see - returns TRUE if we can see string in t->buffer[i] onwards + * can_see - Return TRUE if we can see string in t->buffer[i] onwards. */ -int char_buffer::can_see (char_block **t, int *i, const char *string) +int char_buffer::can_see(char_block **t, int *i, const char *str) { - int j = 0; - int l = strlen(string); - int k = *i; + int j = 0; + int l = strlen(str); + int k = *i; char_block *s = *t; while (s) { - while ((kused) && (jbuffer[k] == string[j])) { + while (k < s->used && j < l && s->buffer[k] == str[j]) { j++; k++; } if (j == l) { *i = k; *t = s; - return( TRUE ); - } else if ((kused) && (s->buffer[k] != string[j])) { - return( FALSE ); + return TRUE; } + else if (k < s->used && s->buffer[k] != str[j]) + return( FALSE ); s = s->next; k = 0; } - return( FALSE ); + return FALSE; } /* - * skip_spaces - returns TRUE if we have not run out of data. - * It also consumes spaces. + * skip_spaces - Return TRUE if we have not run out of data. + * Consume spaces also. */ int char_buffer::skip_spaces(char_block **t, int *i) { char_block *s = *t; - int k = *i; + int k = *i; while (s) { - while ((kused) && (isspace(s->buffer[k]))) { + while (k < s->used && isspace(s->buffer[k])) k++; - } if (k == s->used) { k = 0; s = s->next; - } else { + } + else { *i = k; - return( TRUE ); + return TRUE; } } - return( FALSE ); + return FALSE; } /* - * skip_until_newline - skips all characters until a newline is seen. + * skip_until_newline - Skip all characters until a newline is seen. * The newline is not consumed. */ -void char_buffer::skip_until_newline (char_block **t, int *i) +void char_buffer::skip_until_newline(char_block **t, int *i) { - int j=*i; + int j = *i; if (*t) { - while ((j < (*t)->used) && ((*t)->buffer[j] != '\n')) { + while (j < (*t)->used && (*t)->buffer[j] != '\n') j++; - } if (j == (*t)->used) { *i = 0; *t = (*t)->next; skip_until_newline(t, i); - } else { + } + else // newline was seen *i = j; - } } } +#define DEVICE_FORMAT(filter) (filter == HTML_OUTPUT_FILTER) +#define HTML_OUTPUT_FILTER 0 +#define IMAGE_OUTPUT_FILTER 1 +#define OUTPUT_STREAM(name) creat((name), S_IWUSR | S_IRUSR) +#define PS_OUTPUT_STREAM OUTPUT_STREAM(psFileName) +#define REGION_OUTPUT_STREAM OUTPUT_STREAM(regionFileName) + /* - * write_file_troff - writes the buffer to stdout (troff). + * emit_troff_output - Write formatted buffer content to the troff + * post-processor data pipeline. */ -void char_buffer::write_file_troff (void) +void char_buffer::emit_troff_output(int device_format_selector) { - char_block *t=head; - int i=0; + // Handle output for BOTH html and image device formats + // if `device_format_selector' is passed as + // + // HTML_FORMAT(HTML_OUTPUT_FILTER) + // Buffer data is written to the output stream + // with template image names translated to actual image names. + // + // HTML_FORMAT(IMAGE_OUTPUT_FILTER) + // Buffer data is written to the output stream + // with no translation, for image file creation in the post-processor. - if (t != NULL) { - do { - write_upto_newline(&t, &i, FALSE); - } while (t != NULL); - } + int idx = 0; + char_block *element = head; + + while (element != NULL) + write_upto_newline(&element, &idx, device_format_selector); + +#if 0 if (close(stdoutfd) < 0) - sys_fatal("close"); + sys_fatal ("close"); // now we grab fd=1 so that the next pipe cannot use fd=1 if (stdoutfd == 1) { - if (dup(2) != stdoutfd) { - sys_fatal("dup failed to use fd=1"); - } + if (dup(2) != stdoutfd) + sys_fatal ("dup failed to use fd=1"); } +#endif /* 0 */ } /* - * the image class remembers the position of all images in the postscript file - * and assigns names for each image. + * The image class remembers the position of all images in the + * postscript file and assigns names for each image. */ struct imageItem { - imageItem *next; - int X1; - int Y1; - int X2; - int Y2; - char *imageName; - int resolution; - int maxx; - int pageNo; + imageItem *next; + int X1; + int Y1; + int X2; + int Y2; + char *imageName; + int resolution; + int maxx; + int pageNo; - imageItem (int x1, int y1, int x2, int y2, int page, int res, int max_width, char *name); - ~imageItem (); + imageItem(int x1, int y1, int x2, int y2, + int page, int res, int max_width, char *name); + ~imageItem(); }; /* - * imageItem - constructor + * imageItem - Constructor. */ -imageItem::imageItem (int x1, int y1, int x2, int y2, int page, int res, int max_width, char *name) +imageItem::imageItem(int x1, int y1, int x2, int y2, + int page, int res, int max_width, char *name) { - X1 = x1; - Y1 = y1; - X2 = x2; - Y2 = y2; - pageNo = page; + X1 = x1; + Y1 = y1; + X2 = x2; + Y2 = y2; + pageNo = page; resolution = res; - maxx = max_width; - imageName = name; - next = NULL; + maxx = max_width; + imageName = name; + next = NULL; } /* - * imageItem - deconstructor + * imageItem - Destructor. */ -imageItem::~imageItem () +imageItem::~imageItem() { if (imageName) free(imageName); } /* - * imageList - class containing a list of imageItems. + * imageList - A class containing a list of imageItems. */ class imageList { private: imageItem *head; imageItem *tail; - int count; + int count; public: imageList(); ~imageList(); - void add(int x1, int y1, int x2, int y2, int page, int res, int maxx, char *name); - void createImages (void); - int createPage (int pageno); - void createImage (imageItem *i); - int getMaxX (int pageno); + void add(int x1, int y1, int x2, int y2, + int page, int res, int maxx, char *name); + void createImages(void); + int createPage(int pageno); + void createImage(imageItem *i); + int getMaxX(int pageno); }; /* - * imageList - constructor. + * imageList - Constructor. */ -imageList::imageList () - : head(0), tail(0), count(0) +imageList::imageList() +: head(0), tail(0), count(0) { } /* - * imageList - deconstructor. + * imageList - Destructor. */ -imageList::~imageList () +imageList::~imageList() { while (head != NULL) { imageItem *i = head; @@ -772,10 +884,10 @@ imageList::~imageList () } /* - * createPage - creates one image of, page pageno, from the postscript file. + * createPage - Create one image of, page pageno, from the postscript file. */ -int imageList::createPage (int pageno) +int imageList::createPage(int pageno) { char *s; @@ -784,8 +896,9 @@ int imageList::createPage (int pageno) if (currentPageNo >= 1) { /* - * we need to unlink the files which change each time a new page is processed. - * The final unlink is done by xtmpfile when pre-grohtml exits. + * We need to unlink the files which change each time a new page is + * processed. The final unlink is done by xtmpfile when pre-grohtml + * exits. */ unlink(imagePageName); unlink(psPageName); @@ -813,13 +926,14 @@ int imageList::createPage (int pageno) } #endif 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, @@ -842,39 +956,38 @@ int imageList::createPage (int pageno) } /* - * min - returns the minimum of two numbers. + * min - Return the minimum of two numbers. */ -int min (int x, int y) +int min(int x, int y) { - if (x < y) { - return( x ); - } else { - return( y ); - } + if (x < y) + return x; + else + return y; } /* - * max - returns the maximum of two numbers. + * max - Return the maximum of two numbers. */ -int max (int x, int y) +int max(int x, int y) { - if (x > y) { - return( x ); - } else { - return( y ); - } + if (x > y) + return x; + else + return y; } /* - * getMaxX - returns the largest right hand position for any image on, pageno + * getMaxX - Return the largest right-hand position for any image + * on, pageno. */ -int imageList::getMaxX (int pageno) +int imageList::getMaxX(int pageno) { imageItem *h = head; - int x = postscriptRes * DEFAULT_LINE_LENGTH; + int x = postscriptRes * DEFAULT_LINE_LENGTH; while (h != NULL) { if (h->pageNo == pageno) @@ -885,21 +998,30 @@ int imageList::getMaxX (int pageno) } /* - * createImage - generates a minimal png file from the set of page images. + * createImage - Generate a minimal png file from the set of page images. */ -void imageList::createImage (imageItem *i) +void imageList::createImage(imageItem *i) { if (i->X1 != -1) { char *s; - int x1 = max(min(i->X1, i->X2)*image_res/postscriptRes-1*IMAGE_BOARDER_PIXELS, 0); - int y1 = max((image_res*vertical_offset/72)+min(i->Y1, i->Y2)*image_res/postscriptRes-IMAGE_BOARDER_PIXELS, 0); - int x2 = max(i->X1, i->X2)*image_res/postscriptRes+1*IMAGE_BOARDER_PIXELS; - int y2 = (image_res*vertical_offset/72)+(max(i->Y1, i->Y2)*image_res/postscriptRes)+1+IMAGE_BOARDER_PIXELS; + int x1 = max(min(i->X1, i->X2) * image_res / postscriptRes + - IMAGE_BOARDER_PIXELS, + 0); + int y1 = max(image_res * vertical_offset / 72 + + min(i->Y1, i->Y2) * image_res / postscriptRes + - IMAGE_BOARDER_PIXELS, + 0); + int x2 = max(i->X1, i->X2) * image_res / postscriptRes + + IMAGE_BOARDER_PIXELS; + int y2 = image_res * vertical_offset / 72 + + max(i->Y1, i->Y2) * image_res / postscriptRes + + 1 + IMAGE_BOARDER_PIXELS; if (createPage(i->pageNo) == 0) { - s = make_message("pnmcut%s %d %d %d %d < %s | pnmcrop -quiet | pnmtopng%s %s > %s \n", + s = make_message("pnmcut%s %d %d %d %d < %s " + "| pnmcrop -quiet | pnmtopng%s %s > %s\n", EXE_EXT, - x1, y1, x2-x1+1, y2-y1+1, + x1, y1, x2 - x1 + 1, y2 - y1 + 1, imagePageName, EXE_EXT, TRANSPARENT, @@ -915,12 +1037,14 @@ void imageList::createImage (imageItem *i) #endif html_system(s, 0); free(s); - } else { + } + else { fprintf(stderr, "failed to generate image of page %d\n", i->pageNo); fflush(stderr); } #if defined(DEBUGGING) - } else { + } + else { if (debug) { fprintf(stderr, "ignoring image as x1 coord is -1\n"); fflush(stderr); @@ -930,27 +1054,30 @@ void imageList::createImage (imageItem *i) } /* - * add - an image description to the imageList. + * add - Add an image description to the imageList. */ -void imageList::add (int x1, int y1, int x2, int y2, int page, int res, int maxx, char *name) +void imageList::add(int x1, int y1, int x2, int y2, + int page, int res, int maxx, char *name) { imageItem *i = new imageItem(x1, y1, x2, y2, page, res, maxx, name); if (head == NULL) { head = i; tail = i; - } else { + } + else { tail->next = i; tail = i; } } /* - * createImages - foreach image descriptor on the imageList, create the actual image. + * createImages - For each image descriptor on the imageList, + * create the actual image. */ -void imageList::createImages (void) +void imageList::createImages(void) { imageItem *h = head; @@ -960,72 +1087,42 @@ void imageList::createImages (void) } } -static imageList listOfImages; // list of images defined by the region file. +static imageList listOfImages; // List of images defined by the region file. /* - * write_file_html - writes the buffer to stdout (troff). - * It writes out the file replacing template image names with - * actual image names. - */ - -void char_buffer::write_file_html (void) -{ - char_block *t=head; - int i=0; - - if (t != NULL) { - do { - write_upto_newline(&t, &i, TRUE); - } while (t != NULL); - } - if (close(stdoutfd) < 0) - sys_fatal("close"); - - // now we grab fd=1 so that the next pipe cannot use fd=1 - if (stdoutfd == 1) { - if (dup(2) != stdoutfd) { - sys_fatal("dup failed to use fd=1"); - } - } -} - -/* - * generateImages - parses the region file and generates images - * from the postscript file. The region file - * contains the x1,y1 x2,y2 extents of each + * generateImages - Parse the region file and generate images + * from the postscript file. The region file + * contains the x1,y1--x2,y2 extents of each * image. */ -static void generateImages (char *regionFileName) +static void generateImages(char *region_file_name) { - pushBackBuffer *f=new pushBackBuffer(regionFileName); + pushBackBuffer *f=new pushBackBuffer(region_file_name); while (f->putPB(f->getPB()) != eof) { if (f->isString("grohtml-info:page")) { - int page = f->readInt(); - int x1 = f->readInt(); - int y1 = f->readInt(); - int x2 = f->readInt(); - int y2 = f->readInt(); - int maxx = f->readInt(); + int page = f->readInt(); + int x1 = f->readInt(); + int y1 = f->readInt(); + int x2 = f->readInt(); + int y2 = f->readInt(); + int maxx = f->readInt(); char *name = f->readString(); - int res = postscriptRes; + int res = postscriptRes; listOfImages.add(x1, y1, x2, y2, page, res, maxx, name); - while ((f->putPB(f->getPB()) != '\n') && - (f->putPB(f->getPB()) != eof)) { + while (f->putPB(f->getPB()) != '\n' + && f->putPB(f->getPB()) != eof) (void)f->getPB(); - } - if (f->putPB(f->getPB()) == '\n') { + if (f->putPB(f->getPB()) == '\n') (void)f->getPB(); - } - } else { - /* - * write any error messages out to the user - */ + } + else { + /* Write any error messages out to the user. */ fputc(f->getPB(), stderr); } } - + listOfImages.createImages(); if (show_progress) { fprintf(stderr, "done\n"); @@ -1035,84 +1132,97 @@ static void generateImages (char *regionFileName) } /* - * replaceFd - replace a file descriptor, was, with, willbe. + * set_redirection - Set up I/O Redirection for handle, was, to refer to + * stream on handle, willbe. */ -static void replaceFd (int was, int willbe) +static void set_redirection(int was, int willbe) { - int dupres; - + // Nothing to do if `was' and `willbe' already have same handle. if (was != willbe) { - if (close(was)<0) { + // Otherwise attempt the specified redirection. + if (dup2 (willbe, was) < 0) { + // Redirection failed, so issue diagnostic and bail out. + fprintf(stderr, "failed to replace fd=%d with %d\n", was, willbe); + if (willbe == STDOUT_FILENO) + fprintf(stderr, + "likely that stdout should be opened before %d\n", was); + sys_fatal("dup2"); + } + + // When redirection has been successfully completed assume redundant + // handle `willbe' is no longer required, so close it. + if (close(willbe) < 0) + // Issue diagnostic if `close' fails. sys_fatal("close"); - } - dupres = dup(willbe); - if (dupres != was) { - sys_fatal("dup"); - fprintf(stderr, "trying to replace fd=%d with %d dup used %d\n", was, willbe, dupres); - if (willbe == 1) { - fprintf(stderr, "likely that stdout should be opened before %d\n", was); - } - exit(1); - } - if (close(willbe) < 0) { - sys_fatal("close"); - } } } /* - * waitForChild - waits for child, pid, to exit. + * save_and_redirect - Get duplicate handle for stream, was, then + * redirect, was, to refer to, willbe. */ -static void waitForChild (PID_T pid) +static int save_and_redirect(int was, int willbe) { - PID_T waitpd; - int status; + if (was == willbe) + // No redirection specified so don't do anything but silently bailing out. + return (was); - waitpd = WAIT(&status, pid, _WAIT_CHILD); - if (waitpd != pid) - sys_fatal("wait"); + // Proceeding with redirection so first save and verify our duplicate + // handle for `was'. + int saved = dup(was); + if (saved < 0) { + fprintf(stderr, "unable to get duplicate handle for %d\n", was); + sys_fatal("dup"); + } + + // Duplicate handle safely established so complete redirection. + set_redirection(was, willbe); + + // Finally return the saved duplicate descriptor for the + // original `was' stream. + return saved; } /* - * alterDeviceTo - if toImage is set then the arg list is altered to include + * alterDeviceTo - If, toImage, is set + * the argument list is altered to include * IMAGE_DEVICE and we invoke groff rather than troff. - * else - * set -Thtml and groff + * Else + * set -Thtml and groff. */ -static void alterDeviceTo (int argc, char *argv[], int toImage) +static void alterDeviceTo(int argc, char *argv[], int toImage) { - int i=0; + int i = 0; if (toImage) { while (i < argc) { - if (strcmp(argv[i], "-Thtml") == 0) { - argv[i] = IMAGE_DEVICE; - } + if (strcmp(argv[i], "-Thtml") == 0) + argv[i] = (char *)IMAGE_DEVICE; i++; } - argv[troff_arg] = "groff"; /* rather than troff */ - } else { + argv[troff_arg] = (char *)"groff"; /* rather than troff */ + } + else { while (i < argc) { - if (strcmp(argv[i], IMAGE_DEVICE) == 0) { - argv[i] = "-Thtml"; - } + if (strcmp(argv[i], IMAGE_DEVICE) == 0) + argv[i] = (char *)"-Thtml"; i++; } - argv[troff_arg] = "groff"; /* use groff -Z */ + argv[troff_arg] = (char *)"groff"; /* use groff -Z */ } } /* - * addZ - appends -Z onto the command list for groff. + * addZ - Append -Z onto the command list for groff. */ -char **addZ (int argc, char *argv[]) +char **addZ(int argc, char *argv[]) { - char **new_argv = (char **)malloc((argc+2)*sizeof(char *)); - int i=0; + char **new_argv = (char **)malloc((argc + 2) * sizeof(char *)); + int i = 0; if (new_argv == NULL) sys_fatal("malloc"); @@ -1121,9 +1231,9 @@ char **addZ (int argc, char *argv[]) new_argv[i] = argv[i]; i++; } - new_argv[i] = "-Z"; - while (i)\n"); - fprintf(stream, " place all png files into image_directory\n"); + fprintf(stream, + "usage: %s troffname [-Iimage_name] [-Dimage_directory]\n" + " [-P-o vertical_image_offset] [-P-i image_resolution]\n" + " [troff flags]\n", + program_name); + fprintf(stream, + " vertical_image_offset (default %d/72 of an inch)\n", + vertical_offset); + fprintf(stream, + " image_resolution (default %d) pixels per inch\n", + image_res); + fprintf(stream, + " image_name is the name of the stem for all images\n" + " (default is grohtml-)\n"); + fprintf(stream, + " place all png files into image_directory\n"); } /* - * scanArguments - scans for all arguments including -P-i, -P-o, -P-D and -P-I. It returns - * the argument index of the first non option. + * scanArguments - Scan for all arguments including -P-i, -P-o, -P-D, + * and -P-I. Return the argument index of the first + * non-option. */ -int scanArguments (int argc, char **argv) +static int scanArguments(int argc, char **argv) { const char *command_prefix = getenv("GROFF_COMMAND_PREFIX"); if (!command_prefix) @@ -1332,40 +1545,57 @@ 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: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); + textAlphaBits = min(max(MIN_ALPHA_BITS, atoi(optarg)), + MAX_ALPHA_BITS); if (textAlphaBits == 3) { error("cannot use 3 bits of antialiasing information"); exit(1); } break; - case 'g': - graphicAlphaBits = min(max(MIN_ALPHA_BITS, atoi(optarg)), MAX_ALPHA_BITS); - if (graphicAlphaBits == 3) { - error("cannot use 3 bits of antialiasing information"); - 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 'I': - image_template = optarg; + case 'F': + font_path.command_line_dir(optarg); + break; + case 'g': + graphicAlphaBits = min(max(MIN_ALPHA_BITS, atoi(optarg)), + MAX_ALPHA_BITS); + if (graphicAlphaBits == 3) { + error("cannot use 3 bits of antialiasing information"); + exit(1); + } + break; + 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); @@ -1373,14 +1603,18 @@ int scanArguments (int argc, char **argv) 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); @@ -1407,19 +1641,19 @@ int scanArguments (int argc, char **argv) } /* - * makeTempFiles - name the temporary files + * makeTempFiles - Name the temporary files. */ -static int makeTempFiles (void) +static int makeTempFiles(void) { #if defined(DEBUGGING) - psFileName = "/tmp/prehtml-ps"; - regionFileName = "/tmp/prehtml-region"; - imagePageName = "/tmp/prehtml-page"; - psPageName = "/tmp/prehtml-psn"; - troffFileName = "/tmp/prehtml-troff"; - htmlFileName = "/tmp/prehtml-html"; -#else + psFileName = DEBUG_FILE("prehtml-ps"); + regionFileName = DEBUG_FILE("prehtml-region"); + imagePageName = DEBUG_FILE("prehtml-page"); + psPageName = DEBUG_FILE("prehtml-psn"); + troffFileName = DEBUG_FILE("prehtml-troff"); + htmlFileName = DEBUG_FILE("prehtml-html"); +#else /* not DEBUGGING */ FILE *f; /* psPageName contains a single page of postscript */ @@ -1462,7 +1696,7 @@ static int makeTempFiles (void) } fclose(f); -#endif +#endif /* not DEBUGGING */ return 0; } @@ -1470,9 +1704,27 @@ int main(int argc, char **argv) { program_name = argv[0]; int i; - int found=0; - int ok=1; + int found = 0; + int ok = 1; +#ifdef CAPTURE_MODE + FILE *dump; + fprintf(stderr, "%s: invoked with %d arguments ...\n", argv[0], argc); + for (i = 0; i < argc; i++) + fprintf(stderr, "%2d: %s\n", i, argv[i]); + if ((dump = fopen(DEBUG_FILE("pre-html-data"), "wb")) != NULL) { + while((i = fgetc(stdin)) >= 0) + fputc(i, dump); + fclose(dump); + } + 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(); @@ -1482,19 +1734,15 @@ int main(int argc, char **argv) if (argv[i][0] != '-') { /* found source file */ ok = do_file(argv[i]); - if (! ok) { - return( 0 ); - } + if (!ok) + return 0; found = 1; } i++; } - copyofstdoutfd=dup(stdoutfd); - - if (! found) { + if (!found) do_file("-"); - } if (makeTempFiles()) return 1; ok = inputFile.do_image(argc, argv); @@ -1510,9 +1758,9 @@ static int do_file(const char *filename) FILE *fp; current_filename = filename; - if (strcmp(filename, "-") == 0) { + if (strcmp(filename, "-") == 0) fp = stdin; - } else { + else { fp = fopen(filename, "r"); if (fp == 0) { error("can't open `%1': %2", filename, strerror(errno)); @@ -1521,6 +1769,7 @@ static int do_file(const char *filename) } if (inputFile.read_file(fp)) { + // XXX } if (fp != stdin) diff --git a/contrib/groff/src/preproc/html/pre-html.h b/contrib/groff/src/preproc/html/pre-html.h index f9a590c17b7e..3eedb21c72bb 100644 --- a/contrib/groff/src/preproc/html/pre-html.h +++ b/contrib/groff/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/src/preproc/html/pushback.cpp b/contrib/groff/src/preproc/html/pushback.cpp index 07a15e36fe87..b71558783508 100644 --- a/contrib/groff/src/preproc/html/pushback.cpp +++ b/contrib/groff/src/preproc/html/pushback.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. 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(); } } @@ -274,15 +270,15 @@ int pushBackBuffer::readInt (void) * convertToFloat - converts integers, a and b into a.b */ -static float convertToFloat (int a, int b) +static double convertToFloat (int a, int b) { int c=10; - float f; + double f; while (b>c) { c *= 10; } - f = ((float)a) + (((float)b)/((float)c)); + f = ((double)a) + (((double)b)/((double)c)); return( f ); } @@ -290,7 +286,7 @@ static float convertToFloat (int a, int b) * readNumber - returns a float representing the word just read. */ -float pushBackBuffer::readNumber (void) +double pushBackBuffer::readNumber (void) { int i; char ch; @@ -300,7 +296,7 @@ float pushBackBuffer::readNumber (void) return convertToFloat(i, readInt()); } putPB(ch); - return (float)i; + return (double)i; } /* @@ -312,7 +308,7 @@ float pushBackBuffer::readNumber (void) char *pushBackBuffer::readString (void) { char buffer[MAXPUSHBACKSTACK]; - char *string = 0; + char *str = 0; int i=0; char ch=getPB(); @@ -326,8 +322,8 @@ char *pushBackBuffer::readString (void) } if (i < MAXPUSHBACKSTACK) { buffer[i] = (char)0; - string = (char *)malloc(strlen(buffer)+1); - strcpy(string, buffer); + str = (char *)malloc(strlen(buffer)+1); + strcpy(str, buffer); } - return( string ); + return( str ); } diff --git a/contrib/groff/src/preproc/html/pushback.h b/contrib/groff/src/preproc/html/pushback.h index 608bac53991e..3fddad66f11d 100644 --- a/contrib/groff/src/preproc/html/pushback.h +++ b/contrib/groff/src/preproc/html/pushback.h @@ -1,5 +1,5 @@ // -*- C -*- -/* Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2003, 2004 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. */ #define eof (char)-1 @@ -39,16 +39,16 @@ class pushBackBuffer int stdIn; public: - pushBackBuffer (char *); - ~ pushBackBuffer (); - char getPB (void); - char putPB (char ch); - void skipUntilToken (void); - void skipToNewline (void); - float readNumber (void); - int readInt (void); - char *readString (void); - int isString (const char *string); + pushBackBuffer (char *); + ~ pushBackBuffer (); + char getPB (void); + char putPB (char ch); + void skipUntilToken (void); + void skipToNewline (void); + double readNumber (void); + int readInt (void); + char *readString (void); + int isString (const char *string); }; diff --git a/contrib/groff/src/preproc/pic/TODO b/contrib/groff/src/preproc/pic/TODO index 2346b575e1de..a1d7554d4529 100644 --- a/contrib/groff/src/preproc/pic/TODO +++ b/contrib/groff/src/preproc/pic/TODO @@ -1,5 +1,3 @@ -Dotted and dashed ellipses. - In troff mode, dotted and dashed splines. Make DELIMITED have type lstr; this would allow us to give better diff --git a/contrib/groff/src/preproc/pic/common.cpp b/contrib/groff/src/preproc/pic/common.cpp index 5075e936142d..47a23cd920ef 100644 --- a/contrib/groff/src/preproc/pic/common.cpp +++ b/contrib/groff/src/preproc/pic/common.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2003 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 "pic.h" #include "common.h" @@ -78,6 +78,157 @@ void common_output::dotted_circle(const position ¢, double rad, dot(cent + position(cos(ang), sin(ang))*rad, lt); } +// recursive function for dash drawing, used by dashed_ellipse + +void common_output::ellipse_arc(const position ¢, + const position &z0, const position &z1, + const distance &dim, const line_type <) +{ + assert(lt.type == line_type::solid); + assert(dim.x != 0 && dim.y != 0); + double eps = 0.0001; + position zml = (z0 + z1) / 2; + // apply affine transformation (from ellipse to circle) to compute angle + // of new position, then invert transformation to get exact position + double psi = atan2(zml.y / dim.y, zml.x / dim.x); + position zm = position(dim.x * cos(psi), dim.y * sin(psi)); + // to approximate the ellipse arc with one or more circle arcs, we + // first compute the radius of curvature in zm + double a_2 = dim.x * dim.x; + double a_4 = a_2 * a_2; + double b_2 = dim.y * dim.y; + double b_4 = b_2 * b_2; + double e_2 = a_2 - b_2; + double temp = a_4 * zm.y * zm.y + b_4 * zm.x * zm.x; + double rho = sqrt(temp / a_4 / b_4 * temp / a_4 / b_4 * temp); + // compute center of curvature circle + position M = position(e_2 * zm.x / a_2 * zm.x / a_2 * zm.x, + -e_2 * zm.y / b_2 * zm.y / b_2 * zm.y); + // compute distance between circle and ellipse arc at start and end + double phi0 = atan2(z0.y - M.y, z0.x - M.x); + double phi1 = atan2(z1.y - M.y, z1.x - M.x); + position M0 = position(rho * cos(phi0), rho * sin(phi0)) + M; + position M1 = position(rho * cos(phi1), rho * sin(phi1)) + M; + double dist0 = hypot(z0 - M0) / sqrt(z0 * z0); + double dist1 = hypot(z1 - M1) / sqrt(z1 * z1); + if (dist0 < eps && dist1 < eps) + solid_arc(M + cent, rho, phi0, phi1, lt); + else { + ellipse_arc(cent, z0, zm, dim, lt); + ellipse_arc(cent, zm, z1, dim, lt); + } +} + +// output a dashed ellipse as a series of arcs + +void common_output::dashed_ellipse(const position ¢, const distance &dim, + const line_type <) +{ + assert(lt.type == line_type::dashed); + double dim_x = dim.x / 2; + double dim_y = dim.y / 2; + line_type slt = lt; + slt.type = line_type::solid; + double dw = lt.dash_width; + // we use an approximation to compute the ellipse length (found in: + // Bronstein, Semendjajew, Taschenbuch der Mathematik) + double lambda = (dim.x - dim.y) / (dim.x + dim.y); + double le = M_PI / 2 * (dim.x + dim.y) + * ((64 - 3 * lambda * lambda * lambda * lambda ) + / (64 - 16 * lambda * lambda)); + // for symmetry we make nmax a multiple of 8 + int nmax = 8 * int(le / dw / 8 + 0.5); + if (nmax < 8) { + nmax = 8; + dw = le / 8; + } + int ndash = nmax / 2; + double gapwidth = (le - dw * ndash) / ndash; + double l = 0; + position z = position(dim_x, 0); + position zdot = z; + int j = 0; + int jmax = int(10 / lt.dash_width); + for (int i = 0; i <= nmax; i++) { + position zold = z; + position zpre = zdot; + double ld = (int(i / 2) + 0.5) * dw + int((i + 1) / 2) * gapwidth; + double lold = 0; + double dl = 1; + // find next position for fixed arc length + while (l < ld) { + j++; + lold = l; + zold = z; + double phi = j * 2 * M_PI / jmax; + z = position(dim_x * cos(phi), dim_y * sin(phi)); + dl = hypot(z - zold); + l += dl; + } + // interpolate linearly between the last two points, + // using the length difference as the scaling factor + double delta = (ld - lold) / dl; + zdot = zold + (z - zold) * delta; + // compute angle of new position on the affine circle + // and use it to get the exact value on the ellipse + double psi = atan2(zdot.y / dim_y, zdot.x / dim_x); + zdot = position(dim_x * cos(psi), dim_y * sin(psi)); + if ((i % 2 == 0) && (i > 1)) + ellipse_arc(cent, zpre, zdot, dim / 2, slt); + } +} + +// output a dotted ellipse as a series of dots + +void common_output::dotted_ellipse(const position ¢, const distance &dim, + const line_type <) +{ + assert(lt.type == line_type::dotted); + double dim_x = dim.x / 2; + double dim_y = dim.y / 2; + line_type slt = lt; + slt.type = line_type::solid; + // we use an approximation to compute the ellipse length (found in: + // Bronstein, Semendjajew, Taschenbuch der Mathematik) + double lambda = (dim.x - dim.y) / (dim.x + dim.y); + double le = M_PI / 2 * (dim.x + dim.y) + * ((64 - 3 * lambda * lambda * lambda * lambda ) + / (64 - 16 * lambda * lambda)); + // for symmetry we make nmax a multiple of 4 + int ndots = 4 * int(le / lt.dash_width / 4 + 0.5); + if (ndots < 4) + ndots = 4; + double l = 0; + position z = position(dim_x, 0); + int j = 0; + int jmax = int(10 / lt.dash_width); + for (int i = 1; i <= ndots; i++) { + position zold = z; + double lold = l; + double ld = i * le / ndots; + double dl = 1; + // find next position for fixed arc length + while (l < ld) { + j++; + lold = l; + zold = z; + double phi = j * 2 * M_PI / jmax; + z = position(dim_x * cos(phi), dim_y * sin(phi)); + dl = hypot(z - zold); + l += dl; + } + // interpolate linearly between the last two points, + // using the length difference as the scaling factor + double delta = (ld - lold) / dl; + position zdot = zold + (z - zold) * delta; + // compute angle of new position on the affine circle + // and use it to get the exact value on the ellipse + double psi = atan2(zdot.y / dim_y, zdot.x / dim_x); + zdot = position(dim_x * cos(psi), dim_y * sin(psi)); + dot(cent + zdot, slt); + } +} + // return non-zero iff we can compute a center int compute_arc_center(const position &start, const position ¢, diff --git a/contrib/groff/src/preproc/pic/common.h b/contrib/groff/src/preproc/pic/common.h index 90b65fa9d613..50238344d8a4 100644 --- a/contrib/groff/src/preproc/pic/common.h +++ b/contrib/groff/src/preproc/pic/common.h @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 1993, 2003 + 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 common_output : public output { private: @@ -33,8 +34,13 @@ private: double gap_width, double *offsetp); protected: virtual void dot(const position &, const line_type &) = 0; + void ellipse_arc(const position &, const position &, + const position &, const distance &, + const line_type &); void dashed_circle(const position &, double rad, const line_type &); void dotted_circle(const position &, double rad, const line_type &); + void dashed_ellipse(const position &, const distance &, const line_type &); + void dotted_ellipse(const position &, const distance &, const line_type &); void dashed_arc(const position &, const position &, const position &, const line_type &); void dotted_arc(const position &, const position &, const position &, diff --git a/contrib/groff/src/preproc/pic/lex.cpp b/contrib/groff/src/preproc/pic/lex.cpp index b8aa9ebcfae1..ceca36854648 100644 --- a/contrib/groff/src/preproc/pic/lex.cpp +++ b/contrib/groff/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/src/preproc/pic/main.cpp b/contrib/groff/src/preproc/pic/main.cpp index 8788fa6d5a9b..0e05f77cd280 100644 --- a/contrib/groff/src/preproc/pic/main.cpp +++ b/contrib/groff/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/src/preproc/pic/object.cpp b/contrib/groff/src/preproc/pic/object.cpp index d5c0d6c06805..aefbd45e3940 100644 --- a/contrib/groff/src/preproc/pic/object.cpp +++ b/contrib/groff/src/preproc/pic/object.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* 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) @@ -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); } } @@ -716,9 +717,9 @@ void closed_object::set_fill(double f) fill = f; } -void closed_object::set_fill_color(char *fill) +void closed_object::set_fill_color(char *f) { - color_fill = strsave(fill); + color_fill = strsave(f); } class box_object : public closed_object { @@ -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(); } @@ -1587,21 +1706,21 @@ void arc_object::update_bounding_box(bounding_box *p) start_quad += 4.0; while (end_quad <= start_quad) end_quad += 4.0; - double radius = max(hypot(start_offset), hypot(end_offset)); + double r = max(hypot(start_offset), hypot(end_offset)); for (int q = int(start_quad) + 1; q < end_quad; q++) { position offset; switch (q % 4) { case 0: - offset.x = radius; + offset.x = r; break; case 1: - offset.y = radius; + offset.y = r; break; case 2: - offset.x = -radius; + offset.x = -r; break; case 3: - offset.y = -radius; + offset.y = -r; break; } p->encompass(cent + offset); @@ -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/src/preproc/pic/object.h b/contrib/groff/src/preproc/pic/object.h index 98937f933287..9f7f4bc33708 100644 --- a/contrib/groff/src/preproc/pic/object.h +++ b/contrib/groff/src/preproc/pic/object.h @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 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. */ struct place; @@ -163,9 +164,9 @@ struct segment { segment(const position &, int, segment *); }; -struct rectangle_object; -struct graphic_object; -struct linear_object; +class rectangle_object; +class graphic_object; +class linear_object; struct object_spec { unsigned long flags; diff --git a/contrib/groff/src/preproc/pic/output.h b/contrib/groff/src/preproc/pic/output.h index a0a8331f883d..aa03e776bb00 100644 --- a/contrib/groff/src/preproc/pic/output.h +++ b/contrib/groff/src/preproc/pic/output.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001 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. */ struct line_type { enum { invisible, solid, dotted, dashed } type; diff --git a/contrib/groff/src/preproc/pic/pic.cpp b/contrib/groff/src/preproc/pic/pic.cpp index 41ae347785af..d6f959bbb4ca 100644 --- a/contrib/groff/src/preproc/pic/pic.cpp +++ b/contrib/groff/src/preproc/pic/pic.cpp @@ -14,7 +14,6 @@ static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93 (groff)"; #include "object.h" extern int delim_flag; -extern void do_copy(const char *); extern void copy_rest_thru(const char *, const char *); extern void copy_file_thru(const char *, const char *, const char *); extern void push_body(const char *); @@ -51,7 +50,7 @@ const char *object_type_name(object_type type); char *format_number(const char *form, double n); char *do_sprintf(const char *form, const double *v, int nv); -#line 66 "pic.y" +#line 65 "pic.y" typedef union { char *str; int n; @@ -70,7 +69,7 @@ typedef union { graphics_state state; object_type obtype; } YYSTYPE; -#line 74 "y.tab.c" +#line 73 "y.tab.c" #define LABEL 257 #define VARIABLE 258 #define NUMBER 259 @@ -206,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, @@ -233,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, @@ -265,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, 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, - 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, + 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, 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, 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, +short yysindex[] = { -58, + 0, 0, 0, 5077, -43, -21, -2, 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, 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, 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, + 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, 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, 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, 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, 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, 350, 0, 84, 0, 0, 297, 638, 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, 3045, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,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, 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, 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, 0, 694, 0, 0, 0, 0, 0, 676, 0, - 0, 0, 0, 0, 0, 0, 0, 4760, 54, 19, + 0, 0, 0, 0, 0, 385, 0, 0, 701, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 0, 64, 0, 0, + 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, 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, - 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, 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, + 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, 0, 0, 0, 0, 0, 0, 0, 224, + 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, 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, - 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, 275, 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, - 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, 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, - 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, + 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, 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, 0, 0, 227, 227, 227, 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, 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, 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, - 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, - 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, 247, - 247, 247, 247, 247, 0, 0, 0, 0, 0, 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, 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, - 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, - 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, + 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, 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, + 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, - 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, 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, - 249, 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, 248, 0, 0, 249, 0, 0, 249, 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, 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, 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, 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, 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, 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, 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, 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, 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, - 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, 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, - 0, 138, 0, 0, 138, 0, 248, 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, 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, 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, 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, + 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, + 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, 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, + 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, 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, 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, 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, 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, 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, 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, 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, - 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, - 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, - 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, 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, 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, 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, - 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, - 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, 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, - 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 0, 0, 0, 0, 0, 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, 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, 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, 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, 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, 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, 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, - 97, 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, 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, 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, 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, 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, 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, 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, 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, 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, - 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, 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, 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, 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, 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, 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, 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, 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, - 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, - 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, 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, 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, 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, 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, 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, - 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, - 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, 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, - 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, 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, 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, - 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, - 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, 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, 0, 0, 0, 0, 0, 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, 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, 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, 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, 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, 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, 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, - 111, 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, 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, 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, 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, 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, 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, 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, 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, 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, - 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, 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, - 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 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, 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, 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, - 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, 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, - 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, 0, 0, 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, 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, - 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, - 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, - 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, - 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, 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, 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, - 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, - 110, 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, 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, 0, 110, 110, 110, 110, 110, 110, 110, 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, - 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, - 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, 0, 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, 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, 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, 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, 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, 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, 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, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 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, 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, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 0, 0, 0, 0, 0, 6, 6, - 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, 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, 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, + 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, + 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, 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, + 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, 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, 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, 99, 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, 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, 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, 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, 0, 0, 0, 0, 0, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 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, 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, 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, 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, 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, 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, 97, + 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, + 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, 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, 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, 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, + 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, 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, 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, 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, + 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0, 0, 0, 0, 0, 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, 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, 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, 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, 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, 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, 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, 111, + 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 179, 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, 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, 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, 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, + 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, 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, 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, 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, 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, + 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, 96, + 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, + 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, 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, 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, + 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, 108, 108, 0, 0, 112, 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, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 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, 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, + 0, 110, 110, 110, 110, 110, 110, 110, 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, 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, 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, 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, + 159, 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, 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, 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, 83, 83, 83, 83, + 0, 0, 83, 83, 83, 83, 159, 159, 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, 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, 0, 0, 0, 0, + 62, 63, 64, 65, 66, 67, 6, 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, + 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 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, 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, + 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, 315, 0, 0, + 0, 94, 0, 0, 0, 0, 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, 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, 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, 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, 0, 0, - 0, 0, 0, 0, 0, 0, 56, 57, 58, 59, + 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, 0, 93, 79, 80, 81, 82, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 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, 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, 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, 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, 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, + 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0, 28, 0, 29, 0, 0, 0, 0, - 0, 0, 30, 31, + 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, @@ -1843,399 +1896,285 @@ 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, 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, -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, 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, - 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, - 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, 302, 343, 344, 305, 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, -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, - -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, 263, 264, 265, 266, 267, 268, 269, 270, 271, - 272, -1, -1, 291, -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, 290, -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, 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, - 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, -1, -1, -1, -1, -1, 302, + 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, - -1, -1, 343, 344, -1, 346, -1, -1, 349, 350, + 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, 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, + 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, -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, 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, - 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, 60, -1, 62, 125, -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, -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, + -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, 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, 137, + 138, 139, 140, -1, 324, 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, -1, -1, 337, 338, 339, + 340, -1, -1, 343, 344, -1, 346, 165, -1, 349, + 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, + 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, -1, -1, -1, 94, -1, -1, 302, 281, 282, - -1, 284, 285, 286, 287, 288, 289, 290, 291, 292, + -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, -1, -1, -1, -1, + 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, -1, -1, + 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, 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, + 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, 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, -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, 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, 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, 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, + -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, 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, + 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, -1, -1, 343, 344, - -1, 346, -1, -1, 349, 350, 351, 352, -1, -1, + -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, 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, 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, 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, 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, -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, -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, -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, 266, 267, 268, 269, 270, 271, 272, -1, -1, -1, -1, - -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, + -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, -1, 306, + 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, -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, - 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, - 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, + 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, + -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, 0, -1, -1, 93, -1, -1, 96, -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, 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, 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, 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, -1, -1, -1, -1, - -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 257, 258, + -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, 268, 269, 270, 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, @@ -2244,182 +2183,182 @@ short yycheck[] = { 25, 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, + 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, 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, + 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, -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, -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, -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, -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, 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, + -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, + -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, + 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, + 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, -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, 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, -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, -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, -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, - -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, - -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, -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, -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, - 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, -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, -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, -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, -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, - 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, 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, 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, -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, -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, -1, -1, -1, -1, -1, -1, - -1, -1, 257, 258, 259, 260, -1, -1, 263, -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, -1, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, -1, -1, -1, -1, -1, 324, + -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, -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, - 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, - 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, 337, 338, 339, 340, 0, -1, 343, 344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 59, -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, -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, 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, - 0, -1, -1, -1, -1, -1, -1, -1, 125, -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, 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, -1, - -1, -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, + -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, 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, + 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, @@ -2427,44 +2366,44 @@ short yycheck[] = { 25, 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, + 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, 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, + 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, 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, -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, -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, 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, -1, -1, -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, + -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, 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, @@ -2473,22 +2412,22 @@ short yycheck[] = { 25, 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, + 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, 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, + 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, -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, -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, @@ -2496,21 +2435,21 @@ short yycheck[] = { 25, -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, -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, 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, -1, -1, -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, -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, 272, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 284, 285, 286, 287, 288, 289, 290, @@ -2519,21 +2458,21 @@ short yycheck[] = { 25, 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, + 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, 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, + 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, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, @@ -2542,451 +2481,8 @@ short yycheck[] = { 25, -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, -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, - -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, -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, -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, -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, -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, -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, -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, -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, -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, -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, -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, -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, -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, -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, -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, -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, -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, - -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, -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, - -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, -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, -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, -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, -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, - -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, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -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, 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, 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, -1, - -1, -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, -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, -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, -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, -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, 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, -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, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -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, - -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, -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, @@ -2995,172 +2491,695 @@ short yycheck[] = { 25, 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, + 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, -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, + 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, - -1, -1, -1, -1, 45, -1, -1, -1, -1, -1, + 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, -1, -1, -1, -1, -1, -1, - 373, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 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, -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, -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, -1, -1, -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, 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, -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, -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, -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, -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, -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, + -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, -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, -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, -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, -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, -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, -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, -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, -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, -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, -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, + -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, -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, + -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, -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, -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, -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, -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, -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, -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, -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, -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, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -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, + 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, 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, -1, -1, + -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, -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, -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, -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, -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, + 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, -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, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -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, -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, -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, -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, - 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, -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, 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, -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, -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, + -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, - -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, + 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, - 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, 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, -1, -1, -1, -1, -1, -1, -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, 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, -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, -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, 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, -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, 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, -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, -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 @@ -3332,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", @@ -3468,7 +3492,7 @@ YYSTYPE yylval; short yyss[YYSTACKSIZE]; YYSTYPE yyvs[YYSTACKSIZE]; #define yystacksize YYSTACKSIZE -#line 1610 "pic.y" +#line 1643 "pic.y" /* bison defines const to be empty unless __STDC__ is defined, which it isn't under cfront */ @@ -3725,7 +3749,7 @@ char *do_sprintf(const char *form, const double *v, int nv) result += '\0'; return strsave(result.contents()); } -#line 3729 "y.tab.c" +#line 3753 "y.tab.c" #define YYABORT goto yyabort #define YYREJECT goto yyabort #define YYACCEPT goto yyaccept @@ -3871,26 +3895,26 @@ yyreduce: switch (yyn) { case 2: -#line 279 "pic.y" +#line 278 "pic.y" { if (olist.head) print_picture(olist.head); } break; case 3: -#line 288 "pic.y" +#line 287 "pic.y" { yyval.pl = yyvsp[-1].pl; } break; case 4: -#line 293 "pic.y" +#line 292 "pic.y" { yyval.pl = yyvsp[0].pl; } break; case 5: -#line 295 "pic.y" +#line 294 "pic.y" { yyval.pl = yyvsp[-2].pl; } break; case 10: -#line 310 "pic.y" +#line 309 "pic.y" { a_delete graphname; graphname = new char[strlen(yyvsp[0].str) + 1]; @@ -3899,14 +3923,14 @@ case 10: } break; case 11: -#line 318 "pic.y" +#line 317 "pic.y" { define_variable(yyvsp[-2].str, yyvsp[0].x); a_delete yyvsp[-2].str; } break; case 12: -#line 323 "pic.y" +#line 322 "pic.y" { place *p = lookup_label(yyvsp[-3].str); if (!p) { @@ -3920,37 +3944,37 @@ case 12: } break; case 13: -#line 335 "pic.y" +#line 334 "pic.y" { current_direction = UP_DIRECTION; } break; case 14: -#line 337 "pic.y" +#line 336 "pic.y" { current_direction = DOWN_DIRECTION; } break; case 15: -#line 339 "pic.y" +#line 338 "pic.y" { current_direction = LEFT_DIRECTION; } break; case 16: -#line 341 "pic.y" +#line 340 "pic.y" { current_direction = RIGHT_DIRECTION; } break; case 17: -#line 343 "pic.y" +#line 342 "pic.y" { olist.append(make_command_object(yyvsp[0].lstr.str, yyvsp[0].lstr.filename, yyvsp[0].lstr.lineno)); } break; case 18: -#line 348 "pic.y" +#line 347 "pic.y" { olist.append(make_command_object(yyvsp[0].lstr.str, yyvsp[0].lstr.filename, yyvsp[0].lstr.lineno)); } break; case 19: -#line 353 "pic.y" +#line 352 "pic.y" { fprintf(stderr, "%s\n", yyvsp[0].lstr.str); a_delete yyvsp[0].lstr.str; @@ -3958,11 +3982,11 @@ case 19: } break; case 20: -#line 359 "pic.y" +#line 358 "pic.y" { delim_flag = 1; } break; case 21: -#line 361 "pic.y" +#line 360 "pic.y" { delim_flag = 0; if (safer_flag) @@ -3973,7 +3997,7 @@ case 21: } break; case 22: -#line 370 "pic.y" +#line 369 "pic.y" { if (yychar < 0) do_lookahead(); @@ -3982,15 +4006,15 @@ case 22: } break; case 23: -#line 377 "pic.y" +#line 376 "pic.y" { delim_flag = 2; } break; case 24: -#line 379 "pic.y" +#line 378 "pic.y" { delim_flag = 0; } break; case 25: -#line 381 "pic.y" +#line 380 "pic.y" { if (yychar < 0) do_lookahead(); @@ -4001,15 +4025,15 @@ case 25: } break; case 26: -#line 390 "pic.y" +#line 389 "pic.y" { delim_flag = 2; } break; case 27: -#line 392 "pic.y" +#line 391 "pic.y" { delim_flag = 0; } break; case 28: -#line 394 "pic.y" +#line 393 "pic.y" { if (yychar < 0) do_lookahead(); @@ -4019,11 +4043,11 @@ case 28: } break; case 29: -#line 402 "pic.y" +#line 401 "pic.y" { delim_flag = 1; } break; case 30: -#line 404 "pic.y" +#line 403 "pic.y" { delim_flag = 0; if (yychar < 0) @@ -4032,7 +4056,7 @@ case 30: } break; case 31: -#line 411 "pic.y" +#line 410 "pic.y" { if (yychar < 0) do_lookahead(); @@ -4042,11 +4066,11 @@ case 31: } break; case 32: -#line 419 "pic.y" +#line 418 "pic.y" { delim_flag = 1; } break; case 33: -#line 421 "pic.y" +#line 420 "pic.y" { delim_flag = 0; if (yychar < 0) @@ -4060,36 +4084,36 @@ case 33: } break; case 35: -#line 434 "pic.y" +#line 433 "pic.y" { define_variable("scale", 1.0); } break; case 38: -#line 444 "pic.y" +#line 443 "pic.y" { reset(yyvsp[0].str); a_delete yyvsp[0].str; } break; case 39: -#line 449 "pic.y" +#line 448 "pic.y" { reset(yyvsp[0].str); a_delete yyvsp[0].str; } break; case 40: -#line 454 "pic.y" +#line 453 "pic.y" { reset(yyvsp[0].str); a_delete yyvsp[0].str; } break; case 41: -#line 462 "pic.y" +#line 461 "pic.y" { yyval.lstr = yyvsp[0].lstr; } break; case 42: -#line 464 "pic.y" +#line 463 "pic.y" { yyval.lstr.str = new char[strlen(yyvsp[-1].lstr.str) + strlen(yyvsp[0].lstr.str) + 1]; strcpy(yyval.lstr.str, yyvsp[-1].lstr.str); @@ -4107,7 +4131,7 @@ case 42: } break; case 43: -#line 483 "pic.y" +#line 482 "pic.y" { yyval.lstr.str = new char[GDIGITS + 1]; sprintf(yyval.lstr.str, "%g", yyvsp[0].x); @@ -4116,11 +4140,11 @@ case 43: } break; case 44: -#line 490 "pic.y" +#line 489 "pic.y" { yyval.lstr = yyvsp[0].lstr; } break; case 45: -#line 492 "pic.y" +#line 491 "pic.y" { yyval.lstr.str = new char[GDIGITS + 2 + GDIGITS + 1]; sprintf(yyval.lstr.str, "%g, %g", yyvsp[0].pair.x, yyvsp[0].pair.y); @@ -4129,11 +4153,11 @@ case 45: } break; case 46: -#line 502 "pic.y" +#line 501 "pic.y" { delim_flag = 1; } break; case 47: -#line 504 "pic.y" +#line 503 "pic.y" { delim_flag = 0; yyval.if_data.x = yyvsp[-3].x; @@ -4141,23 +4165,23 @@ case 47: } break; case 48: -#line 513 "pic.y" +#line 512 "pic.y" { yyval.str = 0; } break; case 49: -#line 515 "pic.y" +#line 514 "pic.y" { yyval.str = yyvsp[0].lstr.str; } break; case 50: -#line 520 "pic.y" +#line 519 "pic.y" { yyval.x = yyvsp[0].x; } break; case 51: -#line 522 "pic.y" +#line 521 "pic.y" { yyval.x = yyvsp[0].x; } break; case 52: -#line 527 "pic.y" +#line 526 "pic.y" { yyval.x = strcmp(yyvsp[-2].lstr.str, yyvsp[0].lstr.str) == 0; a_delete yyvsp[-2].lstr.str; @@ -4165,7 +4189,7 @@ case 52: } break; case 53: -#line 533 "pic.y" +#line 532 "pic.y" { yyval.x = strcmp(yyvsp[-2].lstr.str, yyvsp[0].lstr.str) != 0; a_delete yyvsp[-2].lstr.str; @@ -4173,56 +4197,56 @@ case 53: } break; case 54: -#line 539 "pic.y" +#line 538 "pic.y" { yyval.x = (yyvsp[-2].x != 0.0 && yyvsp[0].x != 0.0); } break; case 55: -#line 541 "pic.y" +#line 540 "pic.y" { yyval.x = (yyvsp[-2].x != 0.0 && yyvsp[0].x != 0.0); } break; case 56: -#line 543 "pic.y" +#line 542 "pic.y" { yyval.x = (yyvsp[-2].x != 0.0 && yyvsp[0].x != 0.0); } break; case 57: -#line 545 "pic.y" +#line 544 "pic.y" { yyval.x = (yyvsp[-2].x != 0.0 || yyvsp[0].x != 0.0); } break; case 58: -#line 547 "pic.y" +#line 546 "pic.y" { yyval.x = (yyvsp[-2].x != 0.0 || yyvsp[0].x != 0.0); } break; case 59: -#line 549 "pic.y" +#line 548 "pic.y" { yyval.x = (yyvsp[-2].x != 0.0 || yyvsp[0].x != 0.0); } break; case 60: -#line 551 "pic.y" +#line 550 "pic.y" { yyval.x = (yyvsp[0].x == 0.0); } break; case 61: -#line 557 "pic.y" +#line 556 "pic.y" { yyval.by.val = 1.0; yyval.by.is_multiplicative = 0; } break; case 62: -#line 562 "pic.y" +#line 561 "pic.y" { yyval.by.val = yyvsp[0].x; yyval.by.is_multiplicative = 0; } break; case 63: -#line 567 "pic.y" +#line 566 "pic.y" { yyval.by.val = yyvsp[0].x; yyval.by.is_multiplicative = 1; } break; case 64: -#line 575 "pic.y" +#line 574 "pic.y" { yyval.pl.obj = yyvsp[0].spec->make_object(¤t_position, ¤t_direction); @@ -4238,7 +4262,7 @@ case 64: } break; case 65: -#line 589 "pic.y" +#line 588 "pic.y" { yyval.pl = yyvsp[0].pl; define_label(yyvsp[-3].str, & yyval.pl); @@ -4246,7 +4270,7 @@ case 65: } break; case 66: -#line 595 "pic.y" +#line 594 "pic.y" { yyval.pl.obj = 0; yyval.pl.x = yyvsp[0].pair.x; @@ -4256,7 +4280,7 @@ case 66: } break; case 67: -#line 603 "pic.y" +#line 602 "pic.y" { yyval.pl = yyvsp[0].pl; define_label(yyvsp[-3].str, & yyval.pl); @@ -4264,7 +4288,7 @@ case 67: } break; case 68: -#line 609 "pic.y" +#line 608 "pic.y" { yyval.state.x = current_position.x; yyval.state.y = current_position.y; @@ -4272,7 +4296,7 @@ case 68: } break; case 69: -#line 615 "pic.y" +#line 614 "pic.y" { current_position.x = yyvsp[-2].state.x; current_position.y = yyvsp[-2].state.y; @@ -4280,13 +4304,13 @@ case 69: } break; case 70: -#line 621 "pic.y" +#line 620 "pic.y" { yyval.pl = yyvsp[-3].pl; } break; case 71: -#line 625 "pic.y" +#line 624 "pic.y" { yyval.pl.obj = 0; yyval.pl.x = current_position.x; @@ -4294,34 +4318,34 @@ case 71: } break; case 72: -#line 634 "pic.y" +#line 633 "pic.y" {} break; case 73: -#line 636 "pic.y" +#line 635 "pic.y" {} break; case 74: -#line 641 "pic.y" +#line 640 "pic.y" { yyval.spec = new object_spec(BOX_OBJECT); } break; case 75: -#line 643 "pic.y" +#line 642 "pic.y" { yyval.spec = new object_spec(CIRCLE_OBJECT); } break; case 76: -#line 645 "pic.y" +#line 644 "pic.y" { yyval.spec = new object_spec(ELLIPSE_OBJECT); } break; case 77: -#line 647 "pic.y" +#line 646 "pic.y" { yyval.spec = new object_spec(ARC_OBJECT); yyval.spec->dir = current_direction; } break; case 78: -#line 652 "pic.y" +#line 651 "pic.y" { yyval.spec = new object_spec(LINE_OBJECT); lookup_variable("lineht", & yyval.spec->segment_height); @@ -4330,7 +4354,7 @@ case 78: } break; case 79: -#line 659 "pic.y" +#line 658 "pic.y" { yyval.spec = new object_spec(ARROW_OBJECT); lookup_variable("lineht", & yyval.spec->segment_height); @@ -4339,7 +4363,7 @@ case 79: } break; case 80: -#line 666 "pic.y" +#line 665 "pic.y" { yyval.spec = new object_spec(MOVE_OBJECT); lookup_variable("moveht", & yyval.spec->segment_height); @@ -4348,7 +4372,7 @@ case 80: } break; case 81: -#line 673 "pic.y" +#line 672 "pic.y" { yyval.spec = new object_spec(SPLINE_OBJECT); lookup_variable("lineht", & yyval.spec->segment_height); @@ -4357,21 +4381,21 @@ case 81: } break; case 82: -#line 680 "pic.y" +#line 679 "pic.y" { yyval.spec = new object_spec(TEXT_OBJECT); yyval.spec->text = new text_item(yyvsp[0].lstr.str, yyvsp[0].lstr.filename, yyvsp[0].lstr.lineno); } break; case 83: -#line 685 "pic.y" +#line 684 "pic.y" { yyval.spec = new object_spec(TEXT_OBJECT); yyval.spec->text = new text_item(format_number(0, yyvsp[0].x), 0, -1); } break; case 84: -#line 690 "pic.y" +#line 689 "pic.y" { yyval.spec = new object_spec(TEXT_OBJECT); yyval.spec->text = new text_item(format_number(yyvsp[0].lstr.str, yyvsp[-1].x), @@ -4380,7 +4404,7 @@ case 84: } break; case 85: -#line 697 "pic.y" +#line 696 "pic.y" { saved_state *p = new saved_state; yyval.pstate = p; @@ -4397,7 +4421,7 @@ case 85: } break; case 86: -#line 712 "pic.y" +#line 711 "pic.y" { current_position.x = yyvsp[-2].pstate->x; current_position.y = yyvsp[-2].pstate->y; @@ -4411,7 +4435,7 @@ case 86: } break; case 87: -#line 724 "pic.y" +#line 723 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->height = yyvsp[0].x; @@ -4419,7 +4443,7 @@ case 87: } break; case 88: -#line 730 "pic.y" +#line 729 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->radius = yyvsp[0].x; @@ -4427,7 +4451,7 @@ case 88: } break; case 89: -#line 736 "pic.y" +#line 735 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->width = yyvsp[0].x; @@ -4435,7 +4459,7 @@ case 89: } break; case 90: -#line 742 "pic.y" +#line 741 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->radius = yyvsp[0].x/2.0; @@ -4443,7 +4467,7 @@ case 90: } break; case 91: -#line 748 "pic.y" +#line 747 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->flags |= HAS_SEGMENT; @@ -4464,7 +4488,7 @@ case 91: } break; case 92: -#line 767 "pic.y" +#line 766 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->dir = UP_DIRECTION; @@ -4473,7 +4497,7 @@ case 92: } break; case 93: -#line 774 "pic.y" +#line 773 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->dir = UP_DIRECTION; @@ -4482,7 +4506,7 @@ case 93: } break; case 94: -#line 781 "pic.y" +#line 780 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->dir = DOWN_DIRECTION; @@ -4491,7 +4515,7 @@ case 94: } break; case 95: -#line 788 "pic.y" +#line 787 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->dir = DOWN_DIRECTION; @@ -4500,7 +4524,7 @@ case 95: } break; case 96: -#line 795 "pic.y" +#line 794 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->dir = RIGHT_DIRECTION; @@ -4509,7 +4533,7 @@ case 96: } break; case 97: -#line 802 "pic.y" +#line 801 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->dir = RIGHT_DIRECTION; @@ -4518,7 +4542,7 @@ case 97: } break; case 98: -#line 809 "pic.y" +#line 808 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->dir = LEFT_DIRECTION; @@ -4527,7 +4551,7 @@ case 98: } break; case 99: -#line 816 "pic.y" +#line 815 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->dir = LEFT_DIRECTION; @@ -4536,7 +4560,7 @@ case 99: } break; case 100: -#line 823 "pic.y" +#line 822 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->flags |= HAS_FROM; @@ -4545,7 +4569,7 @@ case 100: } break; case 101: -#line 830 "pic.y" +#line 829 "pic.y" { yyval.spec = yyvsp[-2].spec; if (yyval.spec->flags & HAS_SEGMENT) @@ -4562,7 +4586,7 @@ case 101: } break; case 102: -#line 845 "pic.y" +#line 844 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->flags |= HAS_AT; @@ -4576,7 +4600,7 @@ case 102: } break; case 103: -#line 857 "pic.y" +#line 856 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->flags |= HAS_WITH; @@ -4584,7 +4608,7 @@ case 103: } break; case 104: -#line 863 "pic.y" +#line 862 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->flags |= HAS_WITH; @@ -4595,7 +4619,7 @@ case 104: } break; case 105: -#line 872 "pic.y" +#line 871 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->flags |= HAS_SEGMENT; @@ -4604,7 +4628,7 @@ case 105: } break; case 106: -#line 879 "pic.y" +#line 878 "pic.y" { yyval.spec = yyvsp[-1].spec; if (yyval.spec->flags & HAS_SEGMENT) { @@ -4618,13 +4642,13 @@ case 106: } break; case 107: -#line 891 "pic.y" +#line 890 "pic.y" { yyval.spec = yyvsp[-1].spec; /* nothing*/ } break; case 108: -#line 895 "pic.y" +#line 894 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->flags |= IS_DOTTED; @@ -4632,7 +4656,7 @@ case 108: } break; case 109: -#line 901 "pic.y" +#line 900 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->flags |= IS_DOTTED; @@ -4640,7 +4664,7 @@ case 109: } break; case 110: -#line 907 "pic.y" +#line 906 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->flags |= IS_DASHED; @@ -4648,7 +4672,7 @@ case 110: } break; case 111: -#line 913 "pic.y" +#line 912 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->flags |= IS_DASHED; @@ -4656,14 +4680,14 @@ case 111: } break; case 112: -#line 919 "pic.y" +#line 918 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->flags |= IS_DEFAULT_FILLED; } break; case 113: -#line 924 "pic.y" +#line 923 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->flags |= IS_FILLED; @@ -4671,7 +4695,7 @@ case 113: } break; case 114: -#line 930 "pic.y" +#line 929 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->flags |= (IS_SHADED | IS_FILLED); @@ -4680,7 +4704,7 @@ case 114: } break; case 115: -#line 937 "pic.y" +#line 936 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->flags |= (IS_SHADED | IS_OUTLINED | IS_FILLED); @@ -4691,7 +4715,7 @@ case 115: } break; case 116: -#line 946 "pic.y" +#line 945 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->flags |= IS_OUTLINED; @@ -4700,7 +4724,7 @@ case 116: } break; case 117: -#line 953 "pic.y" +#line 952 "pic.y" { yyval.spec = yyvsp[-1].spec; /* line chop chop means line chop 0 chop 0*/ @@ -4718,7 +4742,7 @@ case 117: } break; case 118: -#line 969 "pic.y" +#line 968 "pic.y" { yyval.spec = yyvsp[-2].spec; if (yyval.spec->flags & IS_DEFAULT_CHOPPED) { @@ -4737,56 +4761,56 @@ case 118: } break; case 119: -#line 986 "pic.y" +#line 985 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->flags |= IS_SAME; } break; case 120: -#line 991 "pic.y" +#line 990 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->flags |= IS_INVISIBLE; } break; case 121: -#line 996 "pic.y" +#line 995 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->flags |= HAS_LEFT_ARROW_HEAD; } break; case 122: -#line 1001 "pic.y" +#line 1000 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->flags |= HAS_RIGHT_ARROW_HEAD; } break; case 123: -#line 1006 "pic.y" +#line 1005 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->flags |= (HAS_LEFT_ARROW_HEAD|HAS_RIGHT_ARROW_HEAD); } break; case 124: -#line 1011 "pic.y" +#line 1010 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->flags |= IS_CLOCKWISE; } break; case 125: -#line 1016 "pic.y" +#line 1015 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->flags &= ~IS_CLOCKWISE; } break; case 126: -#line 1021 "pic.y" +#line 1020 "pic.y" { yyval.spec = yyvsp[-1].spec; text_item **p; @@ -4796,7 +4820,7 @@ case 126: } break; case 127: -#line 1029 "pic.y" +#line 1028 "pic.y" { yyval.spec = yyvsp[-1].spec; if (yyval.spec->text) { @@ -4808,7 +4832,7 @@ case 127: } break; case 128: -#line 1039 "pic.y" +#line 1038 "pic.y" { yyval.spec = yyvsp[-1].spec; if (yyval.spec->text) { @@ -4820,7 +4844,7 @@ case 128: } break; case 129: -#line 1049 "pic.y" +#line 1048 "pic.y" { yyval.spec = yyvsp[-1].spec; if (yyval.spec->text) { @@ -4832,7 +4856,7 @@ case 129: } break; case 130: -#line 1059 "pic.y" +#line 1058 "pic.y" { yyval.spec = yyvsp[-1].spec; if (yyval.spec->text) { @@ -4844,7 +4868,7 @@ case 130: } break; case 131: -#line 1069 "pic.y" +#line 1068 "pic.y" { yyval.spec = yyvsp[-2].spec; yyval.spec->flags |= HAS_THICKNESS; @@ -4852,18 +4876,18 @@ case 131: } break; case 132: -#line 1075 "pic.y" +#line 1074 "pic.y" { yyval.spec = yyvsp[-1].spec; yyval.spec->flags |= IS_ALIGNED; } break; case 133: -#line 1083 "pic.y" +#line 1082 "pic.y" { yyval.lstr = yyvsp[0].lstr; } break; case 134: -#line 1085 "pic.y" +#line 1084 "pic.y" { yyval.lstr.filename = yyvsp[-2].lstr.filename; yyval.lstr.lineno = yyvsp[-2].lstr.lineno; @@ -4873,7 +4897,7 @@ case 134: } break; case 135: -#line 1096 "pic.y" +#line 1095 "pic.y" { yyval.dv.v = 0; yyval.dv.nv = 0; @@ -4881,7 +4905,7 @@ case 135: } break; case 136: -#line 1102 "pic.y" +#line 1101 "pic.y" { yyval.dv = yyvsp[-2].dv; if (yyval.dv.nv >= yyval.dv.maxv) { @@ -4892,8 +4916,16 @@ case 136: else { double *oldv = yyval.dv.v; yyval.dv.maxv *= 2; +#if 0 yyval.dv.v = new double[yyval.dv.maxv]; memcpy(yyval.dv.v, oldv, yyval.dv.nv*sizeof(double)); +#else + /* workaround for bug in Compaq C++ V6.5-033*/ + /* for Compaq Tru64 UNIX V5.1A (Rev. 1885)*/ + double *foo = new double[yyval.dv.maxv]; + memcpy(foo, oldv, yyval.dv.nv*sizeof(double)); + yyval.dv.v = foo; +#endif a_delete oldv; } } @@ -4902,11 +4934,11 @@ case 136: } break; case 137: -#line 1124 "pic.y" +#line 1131 "pic.y" { yyval.pair = yyvsp[0].pair; } break; case 138: -#line 1126 "pic.y" +#line 1133 "pic.y" { position pos = yyvsp[0].pl; yyval.pair.x = pos.x; @@ -4914,93 +4946,129 @@ case 138: } break; case 139: -#line 1135 "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 1137 "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 1142 "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 1147 "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 1152 "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 1157 "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 1170 "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 1175 "pic.y" +case 153: +#line 1208 "pic.y" { yyval.pair = yyvsp[-1].pair; } break; -case 149: -#line 1181 "pic.y" +case 154: +#line 1214 "pic.y" { yyval.pl = yyvsp[0].pl; } break; -case 150: -#line 1183 "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 1189 "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 1195 "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 1201 "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 1210 "pic.y" +case 159: +#line 1243 "pic.y" { place *p = lookup_label(yyvsp[0].str); if (!p) { @@ -5011,39 +5079,39 @@ case 154: a_delete yyvsp[0].str; } break; -case 155: -#line 1220 "pic.y" +case 160: +#line 1253 "pic.y" { yyval.pl.obj = yyvsp[0].obj; } break; -case 156: -#line 1222 "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 1231 "pic.y" +case 162: +#line 1264 "pic.y" { yyval.n = yyvsp[0].n; } break; -case 158: -#line 1233 "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 1241 "pic.y" +case 164: +#line 1274 "pic.y" { yyval.n = 1; } break; -case 160: -#line 1243 "pic.y" +case 165: +#line 1276 "pic.y" { yyval.n = yyvsp[-1].n; } break; -case 161: -#line 1248 "pic.y" +case 166: +#line 1281 "pic.y" { int count = 0; object *p; @@ -5059,8 +5127,8 @@ case 161: } } break; -case 162: -#line 1263 "pic.y" +case 167: +#line 1296 "pic.y" { int count = 0; object *p; @@ -5076,241 +5144,241 @@ case 162: } } break; -case 163: -#line 1281 "pic.y" +case 168: +#line 1314 "pic.y" { yyval.obtype = BOX_OBJECT; } break; -case 164: -#line 1283 "pic.y" +case 169: +#line 1316 "pic.y" { yyval.obtype = CIRCLE_OBJECT; } break; -case 165: -#line 1285 "pic.y" +case 170: +#line 1318 "pic.y" { yyval.obtype = ELLIPSE_OBJECT; } break; -case 166: -#line 1287 "pic.y" +case 171: +#line 1320 "pic.y" { yyval.obtype = ARC_OBJECT; } break; -case 167: -#line 1289 "pic.y" +case 172: +#line 1322 "pic.y" { yyval.obtype = LINE_OBJECT; } break; -case 168: -#line 1291 "pic.y" +case 173: +#line 1324 "pic.y" { yyval.obtype = ARROW_OBJECT; } break; -case 169: -#line 1293 "pic.y" +case 174: +#line 1326 "pic.y" { yyval.obtype = SPLINE_OBJECT; } break; -case 170: -#line 1295 "pic.y" +case 175: +#line 1328 "pic.y" { yyval.obtype = BLOCK_OBJECT; } break; -case 171: -#line 1297 "pic.y" +case 176: +#line 1330 "pic.y" { yyval.obtype = TEXT_OBJECT; } break; -case 172: -#line 1302 "pic.y" +case 177: +#line 1335 "pic.y" { yyval.pth = new path(yyvsp[0].str); } break; -case 173: -#line 1304 "pic.y" +case 178: +#line 1337 "pic.y" { yyval.pth = yyvsp[-2].pth; yyval.pth->append(yyvsp[0].str); } break; -case 174: -#line 1312 "pic.y" +case 179: +#line 1345 "pic.y" { yyval.pth = new path(yyvsp[0].crn); } break; -case 175: -#line 1316 "pic.y" +case 180: +#line 1349 "pic.y" { yyval.pth = yyvsp[0].pth; } break; -case 176: -#line 1318 "pic.y" +case 181: +#line 1351 "pic.y" { yyval.pth = yyvsp[-1].pth; yyval.pth->append(yyvsp[0].crn); } break; -case 177: -#line 1326 "pic.y" +case 182: +#line 1359 "pic.y" { yyval.pth = yyvsp[0].pth; } break; -case 178: -#line 1328 "pic.y" +case 183: +#line 1361 "pic.y" { yyval.pth = yyvsp[-3].pth; yyval.pth->set_ypath(yyvsp[-1].pth); } break; -case 179: -#line 1334 "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 1340 "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 1346 "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 1352 "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 1361 "pic.y" -{ yyval.crn = &object::north; } -break; -case 184: -#line 1363 "pic.y" -{ yyval.crn = &object::east; } -break; -case 185: -#line 1365 "pic.y" -{ yyval.crn = &object::west; } -break; -case 186: -#line 1367 "pic.y" -{ yyval.crn = &object::south; } -break; -case 187: -#line 1369 "pic.y" -{ yyval.crn = &object::north_east; } -break; case 188: -#line 1371 "pic.y" -{ yyval.crn = &object:: south_east; } +#line 1394 "pic.y" +{ yyval.crn = &object::north; } break; case 189: -#line 1373 "pic.y" -{ yyval.crn = &object::north_west; } +#line 1396 "pic.y" +{ yyval.crn = &object::east; } break; case 190: -#line 1375 "pic.y" -{ yyval.crn = &object::south_west; } +#line 1398 "pic.y" +{ yyval.crn = &object::west; } break; case 191: -#line 1377 "pic.y" -{ yyval.crn = &object::center; } +#line 1400 "pic.y" +{ yyval.crn = &object::south; } break; case 192: -#line 1379 "pic.y" -{ yyval.crn = &object::start; } +#line 1402 "pic.y" +{ yyval.crn = &object::north_east; } break; case 193: -#line 1381 "pic.y" -{ yyval.crn = &object::end; } +#line 1404 "pic.y" +{ yyval.crn = &object:: south_east; } break; case 194: -#line 1383 "pic.y" -{ yyval.crn = &object::north; } +#line 1406 "pic.y" +{ yyval.crn = &object::north_west; } break; case 195: -#line 1385 "pic.y" -{ yyval.crn = &object::south; } +#line 1408 "pic.y" +{ yyval.crn = &object::south_west; } break; case 196: -#line 1387 "pic.y" -{ yyval.crn = &object::west; } -break; -case 197: -#line 1389 "pic.y" -{ yyval.crn = &object::east; } -break; -case 198: -#line 1391 "pic.y" -{ yyval.crn = &object::north_west; } -break; -case 199: -#line 1393 "pic.y" -{ yyval.crn = &object::south_west; } -break; -case 200: -#line 1395 "pic.y" -{ yyval.crn = &object::north_east; } -break; -case 201: -#line 1397 "pic.y" -{ yyval.crn = &object::south_east; } -break; -case 202: -#line 1399 "pic.y" -{ yyval.crn = &object::west; } -break; -case 203: -#line 1401 "pic.y" -{ yyval.crn = &object::east; } -break; -case 204: -#line 1403 "pic.y" -{ yyval.crn = &object::north_west; } -break; -case 205: -#line 1405 "pic.y" -{ yyval.crn = &object::south_west; } -break; -case 206: -#line 1407 "pic.y" -{ yyval.crn = &object::north_east; } -break; -case 207: -#line 1409 "pic.y" -{ yyval.crn = &object::south_east; } -break; -case 208: -#line 1411 "pic.y" -{ yyval.crn = &object::north; } -break; -case 209: -#line 1413 "pic.y" -{ yyval.crn = &object::south; } -break; -case 210: -#line 1415 "pic.y" -{ yyval.crn = &object::east; } -break; -case 211: -#line 1417 "pic.y" -{ yyval.crn = &object::west; } -break; -case 212: -#line 1419 "pic.y" +#line 1410 "pic.y" { yyval.crn = &object::center; } break; -case 213: -#line 1421 "pic.y" +case 197: +#line 1412 "pic.y" { yyval.crn = &object::start; } break; -case 214: -#line 1423 "pic.y" +case 198: +#line 1414 "pic.y" { yyval.crn = &object::end; } break; -case 215: +case 199: +#line 1416 "pic.y" +{ yyval.crn = &object::north; } +break; +case 200: +#line 1418 "pic.y" +{ yyval.crn = &object::south; } +break; +case 201: +#line 1420 "pic.y" +{ yyval.crn = &object::west; } +break; +case 202: +#line 1422 "pic.y" +{ yyval.crn = &object::east; } +break; +case 203: +#line 1424 "pic.y" +{ yyval.crn = &object::north_west; } +break; +case 204: +#line 1426 "pic.y" +{ yyval.crn = &object::south_west; } +break; +case 205: #line 1428 "pic.y" +{ yyval.crn = &object::north_east; } +break; +case 206: +#line 1430 "pic.y" +{ yyval.crn = &object::south_east; } +break; +case 207: +#line 1432 "pic.y" +{ yyval.crn = &object::west; } +break; +case 208: +#line 1434 "pic.y" +{ yyval.crn = &object::east; } +break; +case 209: +#line 1436 "pic.y" +{ yyval.crn = &object::north_west; } +break; +case 210: +#line 1438 "pic.y" +{ yyval.crn = &object::south_west; } +break; +case 211: +#line 1440 "pic.y" +{ yyval.crn = &object::north_east; } +break; +case 212: +#line 1442 "pic.y" +{ yyval.crn = &object::south_east; } +break; +case 213: +#line 1444 "pic.y" +{ yyval.crn = &object::north; } +break; +case 214: +#line 1446 "pic.y" +{ yyval.crn = &object::south; } +break; +case 215: +#line 1448 "pic.y" +{ yyval.crn = &object::east; } +break; +case 216: +#line 1450 "pic.y" +{ yyval.crn = &object::west; } +break; +case 217: +#line 1452 "pic.y" +{ yyval.crn = &object::center; } +break; +case 218: +#line 1454 "pic.y" +{ yyval.crn = &object::start; } +break; +case 219: +#line 1456 "pic.y" +{ yyval.crn = &object::end; } +break; +case 220: +#line 1461 "pic.y" { if (!lookup_variable(yyvsp[0].str, & yyval.x)) { lex_error("there is no variable `%1'", yyvsp[0].str); @@ -5319,12 +5387,12 @@ case 215: a_delete yyvsp[0].str; } break; -case 216: -#line 1436 "pic.y" +case 221: +#line 1469 "pic.y" { yyval.x = yyvsp[0].x; } break; -case 217: -#line 1438 "pic.y" +case 222: +#line 1471 "pic.y" { if (yyvsp[-1].pl.obj != 0) yyval.x = yyvsp[-1].pl.obj->origin().x; @@ -5332,8 +5400,8 @@ case 217: yyval.x = yyvsp[-1].pl.x; } break; -case 218: -#line 1445 "pic.y" +case 223: +#line 1478 "pic.y" { if (yyvsp[-1].pl.obj != 0) yyval.x = yyvsp[-1].pl.obj->origin().y; @@ -5341,8 +5409,8 @@ case 218: yyval.x = yyvsp[-1].pl.y; } break; -case 219: -#line 1452 "pic.y" +case 224: +#line 1485 "pic.y" { if (yyvsp[-1].pl.obj != 0) yyval.x = yyvsp[-1].pl.obj->height(); @@ -5350,8 +5418,8 @@ case 219: yyval.x = 0.0; } break; -case 220: -#line 1459 "pic.y" +case 225: +#line 1492 "pic.y" { if (yyvsp[-1].pl.obj != 0) yyval.x = yyvsp[-1].pl.obj->width(); @@ -5359,8 +5427,8 @@ case 220: yyval.x = 0.0; } break; -case 221: -#line 1466 "pic.y" +case 226: +#line 1499 "pic.y" { if (yyvsp[-1].pl.obj != 0) yyval.x = yyvsp[-1].pl.obj->radius(); @@ -5368,20 +5436,20 @@ case 221: yyval.x = 0.0; } break; -case 222: -#line 1473 "pic.y" +case 227: +#line 1506 "pic.y" { yyval.x = yyvsp[-2].x + yyvsp[0].x; } break; -case 223: -#line 1475 "pic.y" +case 228: +#line 1508 "pic.y" { yyval.x = yyvsp[-2].x - yyvsp[0].x; } break; -case 224: -#line 1477 "pic.y" +case 229: +#line 1510 "pic.y" { yyval.x = yyvsp[-2].x * yyvsp[0].x; } break; -case 225: -#line 1479 "pic.y" +case 230: +#line 1512 "pic.y" { if (yyvsp[0].x == 0.0) { lex_error("division by zero"); @@ -5390,8 +5458,8 @@ case 225: yyval.x = yyvsp[-2].x/yyvsp[0].x; } break; -case 226: -#line 1487 "pic.y" +case 231: +#line 1520 "pic.y" { if (yyvsp[0].x == 0.0) { lex_error("modulus by zero"); @@ -5400,8 +5468,8 @@ case 226: yyval.x = fmod(yyvsp[-2].x, yyvsp[0].x); } break; -case 227: -#line 1495 "pic.y" +case 232: +#line 1528 "pic.y" { errno = 0; yyval.x = pow(yyvsp[-2].x, yyvsp[0].x); @@ -5415,16 +5483,16 @@ case 227: } } break; -case 228: -#line 1508 "pic.y" +case 233: +#line 1541 "pic.y" { yyval.x = -yyvsp[0].x; } break; -case 229: -#line 1510 "pic.y" +case 234: +#line 1543 "pic.y" { yyval.x = yyvsp[-1].x; } break; -case 230: -#line 1512 "pic.y" +case 235: +#line 1545 "pic.y" { errno = 0; yyval.x = sin(yyvsp[-1].x); @@ -5434,8 +5502,8 @@ case 230: } } break; -case 231: -#line 1521 "pic.y" +case 236: +#line 1554 "pic.y" { errno = 0; yyval.x = cos(yyvsp[-1].x); @@ -5445,8 +5513,8 @@ case 231: } } break; -case 232: -#line 1530 "pic.y" +case 237: +#line 1563 "pic.y" { errno = 0; yyval.x = atan2(yyvsp[-3].x, yyvsp[-1].x); @@ -5460,8 +5528,8 @@ case 232: } } break; -case 233: -#line 1543 "pic.y" +case 238: +#line 1576 "pic.y" { errno = 0; yyval.x = log10(yyvsp[-1].x); @@ -5471,8 +5539,8 @@ case 233: } } break; -case 234: -#line 1552 "pic.y" +case 239: +#line 1585 "pic.y" { errno = 0; yyval.x = pow(10.0, yyvsp[-1].x); @@ -5482,8 +5550,8 @@ case 234: } } break; -case 235: -#line 1561 "pic.y" +case 240: +#line 1594 "pic.y" { errno = 0; yyval.x = sqrt(yyvsp[-1].x); @@ -5493,74 +5561,74 @@ case 235: } } break; -case 236: -#line 1570 "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 1572 "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 1574 "pic.y" +case 243: +#line 1607 "pic.y" { yyval.x = floor(yyvsp[-1].x); } break; -case 239: -#line 1576 "pic.y" +case 244: +#line 1609 "pic.y" { yyval.x = 1.0 + floor(((rand()&0x7fff)/double(0x7fff))*yyvsp[-1].x); } break; -case 240: -#line 1578 "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 1584 "pic.y" +case 246: +#line 1617 "pic.y" { yyval.x = 0; srand((unsigned int)yyvsp[-1].x); } break; -case 242: -#line 1589 "pic.y" +case 247: +#line 1622 "pic.y" { yyval.x = (yyvsp[-2].x < yyvsp[0].x); } break; -case 243: -#line 1591 "pic.y" +case 248: +#line 1624 "pic.y" { yyval.x = (yyvsp[-2].x <= yyvsp[0].x); } break; -case 244: -#line 1593 "pic.y" +case 249: +#line 1626 "pic.y" { yyval.x = (yyvsp[-2].x > yyvsp[0].x); } break; -case 245: -#line 1595 "pic.y" +case 250: +#line 1628 "pic.y" { yyval.x = (yyvsp[-2].x >= yyvsp[0].x); } break; -case 246: -#line 1597 "pic.y" +case 251: +#line 1630 "pic.y" { yyval.x = (yyvsp[-2].x == yyvsp[0].x); } break; -case 247: -#line 1599 "pic.y" +case 252: +#line 1632 "pic.y" { yyval.x = (yyvsp[-2].x != yyvsp[0].x); } break; -case 248: -#line 1601 "pic.y" +case 253: +#line 1634 "pic.y" { yyval.x = (yyvsp[-2].x != 0.0 && yyvsp[0].x != 0.0); } break; -case 249: -#line 1603 "pic.y" +case 254: +#line 1636 "pic.y" { yyval.x = (yyvsp[-2].x != 0.0 || yyvsp[0].x != 0.0); } break; -case 250: -#line 1605 "pic.y" +case 255: +#line 1638 "pic.y" { yyval.x = (yyvsp[0].x == 0.0); } break; -#line 5564 "y.tab.c" +#line 5632 "y.tab.c" } yyssp -= yym; yystate = *yyssp; diff --git a/contrib/groff/src/preproc/pic/pic.h b/contrib/groff/src/preproc/pic/pic.h index 166e4e759a2b..e3b850a96ef0 100644 --- a/contrib/groff/src/preproc/pic/pic.h +++ b/contrib/groff/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/src/preproc/pic/pic.man b/contrib/groff/src/preproc/pic/pic.man index c12e93ab2b2c..c54cfbef5911 100644 --- a/contrib/groff/src/preproc/pic/pic.man +++ b/contrib/groff/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 @@ -675,8 +714,8 @@ Arcs now have compass points determined by the circle of which the arc is a part. . .LP -Circles and arcs can be dotted or dashed. -In \*(tx mode splines can be dotted or dashed. +Circles, ellipses, and arcs can be dotted or dashed. +In \*(tx mode splines can be dotted or dashed also. . .LP Boxes can have rounded corners. @@ -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/src/preproc/pic/pic.y b/contrib/groff/src/preproc/pic/pic.y index 2ee1decf829f..83d0fe0222ad 100644 --- a/contrib/groff/src/preproc/pic/pic.y +++ b/contrib/groff/src/preproc/pic/pic.y @@ -1,4 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -16,14 +16,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 "pic.h" #include "ptable.h" #include "object.h" extern int delim_flag; -extern void do_copy(const char *); extern void copy_rest_thru(const char *, const char *); extern void copy_file_thru(const char *, const char *, const char *); extern void push_body(const char *); @@ -1109,8 +1108,16 @@ sprintf_args: else { double *oldv = $$.v; $$.maxv *= 2; +#if 0 $$.v = new double[$$.maxv]; memcpy($$.v, oldv, $$.nv*sizeof(double)); +#else + // workaround for bug in Compaq C++ V6.5-033 + // for Compaq Tru64 UNIX V5.1A (Rev. 1885) + double *foo = new double[$$.maxv]; + memcpy(foo, oldv, $$.nv*sizeof(double)); + $$.v = foo; +#endif a_delete oldv; } } @@ -1128,6 +1135,12 @@ position: $$.x = pos.x; $$.y = pos.y; } + | '(' place ')' + { + position pos = $2; + $$.x = pos.x; + $$.y = pos.y; + } ; position_not_place: @@ -1138,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; @@ -1153,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/src/preproc/pic/position.h b/contrib/groff/src/preproc/pic/position.h index ab7d5469c006..c62e3e7bd0da 100644 --- a/contrib/groff/src/preproc/pic/position.h +++ b/contrib/groff/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/src/preproc/pic/tex.cpp b/contrib/groff/src/preproc/pic/tex.cpp index dbebe4618dd8..f997b868d687 100644 --- a/contrib/groff/src/preproc/pic/tex.cpp +++ b/contrib/groff/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" @@ -324,12 +324,25 @@ void tex_output::ellipse(const position ¢, const distance &dim, printf(" \\special{sh %.3f}%%\n", fill); } position c = transform(cent); - printf(" \\special{%s %d %d %d %d 0 6.28319}%%\n", - (lt.type == line_type::invisible ? "ia" : "ar"), - milliinches(c.x), - milliinches(c.y), - milliinches(dim.x/(2.0*scale)), - milliinches(dim.y/(2.0*scale))); + switch (lt.type) { + case line_type::solid: + case line_type::invisible: + printf(" \\special{%s %d %d %d %d 0 6.28319}%%\n", + (lt.type == line_type::invisible ? "ia" : "ar"), + milliinches(c.x), + milliinches(c.y), + milliinches(dim.x/(2.0*scale)), + milliinches(dim.y/(2.0*scale))); + break; + case line_type::dashed: + dashed_ellipse(cent, dim / scale, lt); + break; + case line_type::dotted: + dotted_ellipse(cent, dim / scale, lt); + break; + default: + assert(0); + } } void tex_output::command(const char *s, const char *, int) diff --git a/contrib/groff/src/preproc/pic/troff.cpp b/contrib/groff/src/preproc/pic/troff.cpp index cf8f5eee1938..688ca47b9c47 100644 --- a/contrib/groff/src/preproc/pic/troff.cpp +++ b/contrib/groff/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" @@ -197,7 +197,11 @@ void simple_output::ellipse(const position ¢, const distance &dim, case line_type::invisible: break; case line_type::dotted: + dotted_ellipse(cent, dim, lt); + break; case line_type::dashed: + dashed_ellipse(cent, dim, lt); + break; case line_type::solid: simple_ellipse(0, cent, dim); break; @@ -320,7 +324,7 @@ void troff_output::simple_circle(int filled, const position ¢, double rad) position c = transform(cent); printf("\\h'%.3fi'" "\\v'%.3fi'" - "\\D'%c%.3fi'" + "\\D'%c %.3fi'" "\n.sp -1\n", c.x - rad/scale, c.y, @@ -334,7 +338,7 @@ void troff_output::simple_ellipse(int filled, const position ¢, position c = transform(cent); printf("\\h'%.3fi'" "\\v'%.3fi'" - "\\D'%c%.3fi %.3fi'" + "\\D'%c %.3fi %.3fi'" "\n.sp -1\n", c.x - dim.x/(2.0*scale), c.y, @@ -351,7 +355,7 @@ void troff_output::simple_arc(const position &start, const distance ¢, distance ev = transform(end) - c; printf("\\h'%.3fi'" "\\v'%.3fi'" - "\\D'a%.3fi %.3fi %.3fi %.3fi'" + "\\D'a %.3fi %.3fi %.3fi %.3fi'" "\n.sp -1\n", s.x, s.y, cv.x, cv.y, ev.x, ev.y); } @@ -362,7 +366,7 @@ void troff_output::simple_line(const position &start, const position &end) distance ev = transform(end) - s; printf("\\h'%.3fi'" "\\v'%.3fi'" - "\\D'l%.3fi %.3fi'" + "\\D'l %.3fi %.3fi'" "\n.sp -1\n", s.x, s.y, ev.x, ev.y); } @@ -374,7 +378,7 @@ void troff_output::simple_spline(const position &start, printf("\\h'%.3fi'" "\\v'%.3fi'", pos.x, pos.y); - fputs("\\D'~", stdout); + fputs("\\D'~ ", stdout); for (int i = 0; i < n; i++) { position temp = transform(v[i]); distance d = temp - pos; @@ -394,7 +398,7 @@ void troff_output::simple_polygon(int filled, const position *v, int n) printf("\\h'%.3fi'" "\\v'%.3fi'", pos.x, pos.y); - printf("\\D'%c", (filled ? 'P' : 'p')); + printf("\\D'%c ", (filled ? 'P' : 'p')); for (int i = 1; i < n; i++) { position temp = transform(v[i]); distance d = temp - pos; @@ -476,13 +480,15 @@ void troff_output::line_thickness(double p) void troff_output::set_fill(double f) { if (driver_extension_flag && f != last_fill) { - printf("\\D'Fg %.3f'\n.sp -1\n", 1.0 - f); + // \D'Fg ...' emits a node only in compatibility mode, + // thus we add a dummy node + printf("\\&\\D'Fg %.3f'\n.sp -1\n", 1.0 - f); last_fill = f; } if (last_filled) { free(last_filled); last_filled = 0; - printf("\\M[]\n.sp -1\n"); + printf(".fcolor\n"); } } @@ -492,12 +498,14 @@ void troff_output::set_color(char *color_fill, char *color_outlined) if (last_filled || last_outlined) { reset_color(); } + // .gcolor and .fcolor emit a node in compatibility mode only, + // but that won't work anyway if (color_fill) { - printf("\\M[%s]\n.sp -1\n", color_fill); + printf(".fcolor %s\n", color_fill); last_filled = strsave(color_fill); } if (color_outlined) { - printf("\\m[%s]\n.sp -1\n", color_outlined); + printf(".gcolor %s\n", color_outlined); last_outlined = strsave(color_outlined); } } @@ -507,12 +515,12 @@ void troff_output::reset_color() { if (driver_extension_flag) { if (last_filled) { - printf("\\M[]\n.sp -1\n"); + printf(".fcolor\n"); a_delete last_filled; last_filled = 0; } if (last_outlined) { - printf("\\m[]\n.sp -1\n"); + printf(".gcolor\n"); a_delete last_outlined; last_outlined = 0; } diff --git a/contrib/groff/src/preproc/refer/command.cpp b/contrib/groff/src/preproc/refer/command.cpp index a7c6bfb89381..441f9534e154 100644 --- a/contrib/groff/src/preproc/refer/command.cpp +++ b/contrib/groff/src/preproc/refer/command.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002 +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 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 "refer.h" #include "refid.h" @@ -632,7 +632,7 @@ a single field, ? means that the previous argument is optional, * means that the previous argument can occur any number of times. */ -struct { +struct S { const char *name; command_t func; const char *arg_types; diff --git a/contrib/groff/src/preproc/refer/command.h b/contrib/groff/src/preproc/refer/command.h index c7085db6927b..f0472ac8b6a7 100644 --- a/contrib/groff/src/preproc/refer/command.h +++ b/contrib/groff/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/src/preproc/refer/label.cpp b/contrib/groff/src/preproc/refer/label.cpp index 8d915a826412..e39022d461ce 100644 --- a/contrib/groff/src/preproc/refer/label.cpp +++ b/contrib/groff/src/preproc/refer/label.cpp @@ -8,7 +8,7 @@ static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93 (groff)"; #define yyerrok (yyerrflag=0) #define YYRECOVERING (yyerrflag!=0) #define YYPREFIX "yy" -#line 22 "label.y" +#line 23 "label.y" #include "refer.h" #include "refid.h" @@ -206,7 +206,7 @@ static expression *parse_result; string literals; -#line 221 "label.y" +#line 222 "label.y" typedef union { int num; expression *expr; @@ -441,7 +441,7 @@ YYSTYPE yylval; short yyss[YYSTACKSIZE]; YYSTYPE yyvs[YYSTACKSIZE]; #define yystacksize YYSTACKSIZE -#line 397 "label.y" +#line 398 "label.y" /* bison defines const to be empty unless __STDC__ is defined, which it isn't under cfront */ @@ -454,6 +454,20 @@ const char *spec_ptr; const char *spec_end; const char *spec_cur; +static char uppercase_array[] = { + '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', +}; + +static char lowercase_array[] = { + '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', +}; + int yylex() { while (spec_ptr < spec_end && csspace(*spec_ptr)) @@ -637,7 +651,8 @@ static const char *format_serial(char c, int n) d = 26; n -= d; n /= 26; - *p++ = c + d - 1; // ASCII dependent + *p++ = c == 'a' ? lowercase_array[d - 1] : + uppercase_array[d - 1]; } *p-- = 0; // Reverse it. @@ -1018,8 +1033,8 @@ label_info *lookup_label(const string &label) label_table[i] = 0; for (i = 0; i < old_size; i++) if (old_table[i]) { - unsigned h = hash_string(label_pool.contents() + old_table[i]->start, - old_table[i]->length); + h = hash_string(label_pool.contents() + old_table[i]->start, + old_table[i]->length); label_info **p; for (p = label_table + (h % label_table_size); *p != 0; @@ -1121,10 +1136,10 @@ int same_author_last_name(const reference &r1, const reference &r2, int n) { const char *ae1; const char *as1 = r1.get_sort_field(0, n, 0, &ae1); - assert(as1 != 0); const char *ae2; const char *as2 = r2.get_sort_field(0, n, 0, &ae2); - assert(as2 != 0); + if (!as1 && !as2) return 1; // they are the same + if (!as1 || !as2) return 0; return ae1 - as1 == ae2 - as2 && memcmp(as1, as2, ae1 - as1) == 0; } @@ -1132,10 +1147,10 @@ int same_author_name(const reference &r1, const reference &r2, int n) { const char *ae1; const char *as1 = r1.get_sort_field(0, n, -1, &ae1); - assert(as1 != 0); const char *ae2; const char *as2 = r2.get_sort_field(0, n, -1, &ae2); - assert(as2 != 0); + if (!as1 && !as2) return 1; // they are the same + if (!as1 || !as2) return 0; return ae1 - as1 == ae2 - as2 && memcmp(as1, as2, ae1 - as1) == 0; } @@ -1223,7 +1238,7 @@ int reference::get_nauthors() const } return nauthors; } -#line 1227 "y.tab.c" +#line 1242 "y.tab.c" #define YYABORT goto yyabort #define YYREJECT goto yyabort #define YYACCEPT goto yyaccept @@ -1369,74 +1384,74 @@ yyreduce: switch (yyn) { case 1: -#line 250 "label.y" +#line 251 "label.y" { parse_result = (yyvsp[0].expr ? new analyzed_expr(yyvsp[0].expr) : 0); } break; case 2: -#line 255 "label.y" +#line 256 "label.y" { yyval.expr = yyvsp[0].expr; } break; case 3: -#line 257 "label.y" +#line 258 "label.y" { yyval.expr = new conditional_expr(yyvsp[-4].expr, yyvsp[-2].expr, yyvsp[0].expr); } break; case 4: -#line 262 "label.y" +#line 263 "label.y" { yyval.expr = 0; } break; case 5: -#line 264 "label.y" +#line 265 "label.y" { yyval.expr = yyvsp[0].expr; } break; case 6: -#line 269 "label.y" +#line 270 "label.y" { yyval.expr = yyvsp[0].expr; } break; case 7: -#line 271 "label.y" +#line 272 "label.y" { yyval.expr = new alternative_expr(yyvsp[-2].expr, yyvsp[0].expr); } break; case 8: -#line 273 "label.y" +#line 274 "label.y" { yyval.expr = new conditional_expr(yyvsp[-2].expr, yyvsp[0].expr, 0); } break; case 9: -#line 278 "label.y" +#line 279 "label.y" { yyval.expr = yyvsp[0].expr; } break; case 10: -#line 280 "label.y" +#line 281 "label.y" { yyval.expr = new list_expr(yyvsp[-1].expr, yyvsp[0].expr); } break; case 11: -#line 285 "label.y" +#line 286 "label.y" { yyval.expr = yyvsp[0].expr; } break; case 12: -#line 287 "label.y" +#line 288 "label.y" { yyval.expr = new substitute_expr(yyvsp[-2].expr, yyvsp[0].expr); } break; case 13: -#line 292 "label.y" +#line 293 "label.y" { yyval.expr = new at_expr; } break; case 14: -#line 294 "label.y" +#line 295 "label.y" { yyval.expr = new literal_expr(literals.contents() + yyvsp[0].str.start, yyvsp[0].str.len); } break; case 15: -#line 299 "label.y" +#line 300 "label.y" { yyval.expr = new field_expr(yyvsp[0].num, 0); } break; case 16: -#line 301 "label.y" +#line 302 "label.y" { yyval.expr = new field_expr(yyvsp[-1].num, yyvsp[0].num - 1); } break; case 17: -#line 303 "label.y" +#line 304 "label.y" { switch (yyvsp[0].num) { case 'I': @@ -1453,13 +1468,13 @@ case 17: } break; case 18: -#line 319 "label.y" +#line 320 "label.y" { yyval.expr = new format_expr('0', yyvsp[0].dig.ndigits, yyvsp[0].dig.val); } break; case 19: -#line 323 "label.y" +#line 324 "label.y" { switch (yyvsp[-1].num) { case 'l': @@ -1491,62 +1506,62 @@ case 19: } break; case 20: -#line 354 "label.y" +#line 355 "label.y" { yyval.expr = new truncate_expr(yyvsp[-2].expr, yyvsp[0].num); } break; case 21: -#line 356 "label.y" +#line 357 "label.y" { yyval.expr = new truncate_expr(yyvsp[-2].expr, -yyvsp[0].num); } break; case 22: -#line 358 "label.y" +#line 359 "label.y" { yyval.expr = new star_expr(yyvsp[-1].expr); } break; case 23: -#line 360 "label.y" +#line 361 "label.y" { yyval.expr = yyvsp[-1].expr; } break; case 24: -#line 362 "label.y" +#line 363 "label.y" { yyval.expr = new separator_expr(yyvsp[-1].expr); } break; case 25: -#line 367 "label.y" +#line 368 "label.y" { yyval.num = -1; } break; case 26: -#line 369 "label.y" +#line 370 "label.y" { yyval.num = yyvsp[0].num; } break; case 27: -#line 374 "label.y" +#line 375 "label.y" { yyval.num = yyvsp[0].num; } break; case 28: -#line 376 "label.y" +#line 377 "label.y" { yyval.num = yyvsp[-1].num*10 + yyvsp[0].num; } break; case 29: -#line 381 "label.y" +#line 382 "label.y" { yyval.dig.ndigits = 1; yyval.dig.val = yyvsp[0].num; } break; case 30: -#line 383 "label.y" +#line 384 "label.y" { yyval.dig.ndigits = yyvsp[-1].dig.ndigits + 1; yyval.dig.val = yyvsp[-1].dig.val*10 + yyvsp[0].num; } break; case 31: -#line 389 "label.y" +#line 390 "label.y" { yyval.num = 0; } break; case 32: -#line 391 "label.y" +#line 392 "label.y" { yyval.num = 1; } break; case 33: -#line 393 "label.y" +#line 394 "label.y" { yyval.num = -1; } break; -#line 1550 "y.tab.c" +#line 1565 "y.tab.c" } yyssp -= yym; yystate = *yyssp; diff --git a/contrib/groff/src/preproc/refer/label.y b/contrib/groff/src/preproc/refer/label.y index 2648b98552dc..d76f95ef3c33 100644 --- a/contrib/groff/src/preproc/refer/label.y +++ b/contrib/groff/src/preproc/refer/label.y @@ -1,5 +1,6 @@ /* -*- C++ -*- - Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. + Copyright (C) 1989, 1990, 1991, 1992, 2000, 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. */ %{ @@ -406,6 +407,20 @@ const char *spec_ptr; const char *spec_end; const char *spec_cur; +static char uppercase_array[] = { + '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', +}; + +static char lowercase_array[] = { + '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', +}; + int yylex() { while (spec_ptr < spec_end && csspace(*spec_ptr)) @@ -589,7 +604,8 @@ static const char *format_serial(char c, int n) d = 26; n -= d; n /= 26; - *p++ = c + d - 1; // ASCII dependent + *p++ = c == 'a' ? lowercase_array[d - 1] : + uppercase_array[d - 1]; } *p-- = 0; // Reverse it. @@ -970,8 +986,8 @@ label_info *lookup_label(const string &label) label_table[i] = 0; for (i = 0; i < old_size; i++) if (old_table[i]) { - unsigned h = hash_string(label_pool.contents() + old_table[i]->start, - old_table[i]->length); + h = hash_string(label_pool.contents() + old_table[i]->start, + old_table[i]->length); label_info **p; for (p = label_table + (h % label_table_size); *p != 0; @@ -1073,10 +1089,10 @@ int same_author_last_name(const reference &r1, const reference &r2, int n) { const char *ae1; const char *as1 = r1.get_sort_field(0, n, 0, &ae1); - assert(as1 != 0); const char *ae2; const char *as2 = r2.get_sort_field(0, n, 0, &ae2); - assert(as2 != 0); + if (!as1 && !as2) return 1; // they are the same + if (!as1 || !as2) return 0; return ae1 - as1 == ae2 - as2 && memcmp(as1, as2, ae1 - as1) == 0; } @@ -1084,10 +1100,10 @@ int same_author_name(const reference &r1, const reference &r2, int n) { const char *ae1; const char *as1 = r1.get_sort_field(0, n, -1, &ae1); - assert(as1 != 0); const char *ae2; const char *as2 = r2.get_sort_field(0, n, -1, &ae2); - assert(as2 != 0); + if (!as1 && !as2) return 1; // they are the same + if (!as1 || !as2) return 0; return ae1 - as1 == ae2 - as2 && memcmp(as1, as2, ae1 - as1) == 0; } diff --git a/contrib/groff/src/preproc/refer/ref.cpp b/contrib/groff/src/preproc/refer/ref.cpp index 9c040789a82f..59c69d52b616 100644 --- a/contrib/groff/src/preproc/refer/ref.cpp +++ b/contrib/groff/src/preproc/refer/ref.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2003 + 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" @@ -420,8 +421,7 @@ void reference::compute_sort_key() sort_fields += '\0'; const char *sf = sort_fields.contents(); while (*sf != '\0') { - if (sf > sort_fields) - sort_key += SORT_SEP; + sort_key += SORT_SEP; char f = *sf++; int n = 1; if (*sf == '+') { diff --git a/contrib/groff/src/preproc/refer/ref.h b/contrib/groff/src/preproc/refer/ref.h index 13a984a4c727..ffb81ac86986 100644 --- a/contrib/groff/src/preproc/refer/ref.h +++ b/contrib/groff/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/src/preproc/refer/refer.cpp b/contrib/groff/src/preproc/refer/refer.cpp index 33df35ca44fe..66afa4b385c3 100644 --- a/contrib/groff/src/preproc/refer/refer.cpp +++ b/contrib/groff/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/src/preproc/refer/refer.h b/contrib/groff/src/preproc/refer/refer.h index e1e0c6dfe2d3..ac871cfae76d 100644 --- a/contrib/groff/src/preproc/refer/refer.h +++ b/contrib/groff/src/preproc/refer/refer.h @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 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 "lib.h" @@ -72,6 +73,6 @@ void command_error(const char *, const errarg &arg2 = empty_errarg, const errarg &arg3 = empty_errarg); -struct reference; +class reference; void compute_labels(reference **, int); diff --git a/contrib/groff/src/preproc/refer/refer.man b/contrib/groff/src/preproc/refer/refer.man index d39d85d8598f..0881657d4044 100644 --- a/contrib/groff/src/preproc/refer/refer.man +++ b/contrib/groff/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/src/preproc/refer/token.cpp b/contrib/groff/src/preproc/refer/token.cpp index e9fac5df3fa2..1eb30062f8a3 100644 --- a/contrib/groff/src/preproc/refer/token.cpp +++ b/contrib/groff/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/src/preproc/refer/token.h b/contrib/groff/src/preproc/refer/token.h index 6da430d6abad..7d3404942fa7 100644 --- a/contrib/groff/src/preproc/refer/token.h +++ b/contrib/groff/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/src/preproc/soelim/Makefile.sub b/contrib/groff/src/preproc/soelim/Makefile.sub index a43dfc289f2e..2e15c0086e82 100644 --- a/contrib/groff/src/preproc/soelim/Makefile.sub +++ b/contrib/groff/src/preproc/soelim/Makefile.sub @@ -1,6 +1,7 @@ PROG=soelim$(EXEEXT) MAN1=soelim.n XLIBS=$(LIBGROFF) +MLIB=$(LIBM) OBJS=soelim.$(OBJEXT) CCSRCS=$(srcdir)/soelim.cpp NAMEPREFIX=$(g) diff --git a/contrib/groff/src/preproc/soelim/soelim.cpp b/contrib/groff/src/preproc/soelim/soelim.cpp index 96ad6dd16445..235dfe664430 100644 --- a/contrib/groff/src/preproc/soelim/soelim.cpp +++ b/contrib/groff/src/preproc/soelim/soelim.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1989-1992, 2000, 2001, 2003, 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. */ #include "lib.h" @@ -28,38 +29,20 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "error.h" #include "stringclass.h" #include "nonposix.h" +#include "searchpath.h" -static size_t include_list_length; -static const char **include_list; +// The include search path initially contains only the current directory. +static search_path include_search_path(0, 0, 0, 1); int compatible_flag = 0; int raw_flag = 0; int tex_flag = 0; -extern int interpret_lf_args(const char *); extern "C" const char *Version_string; int do_file(const char *filename); -static void -include_path_append(const char *path) -{ - ++include_list_length; - size_t nbytes = include_list_length * sizeof(char *); - if (include_list) - include_list = (const char **)realloc((void *)include_list, nbytes); - else - include_list = (const char **)malloc(nbytes); - if (include_list == NULL) - { - fprintf(stderr, "%s: out of memory\n", program_name); - exit(2); - } - include_list[include_list_length - 1] = path; -} - - void usage(FILE *stream) { fprintf(stream, "usage: %s [ -Crtv ] [ -I file ] [ files ]\n", program_name); @@ -68,7 +51,6 @@ void usage(FILE *stream) int main(int argc, char **argv) { program_name = argv[0]; - include_path_append("."); int opt; static const struct option long_options[] = { { "help", no_argument, 0, CHAR_MAX + 1 }, @@ -87,7 +69,7 @@ int main(int argc, char **argv) compatible_flag = 1; break; case 'I': - include_path_append(optarg); + include_search_path.command_line_dir(optarg); break; case 'r': raw_flag = 1; @@ -172,49 +154,16 @@ void do_so(const char *line) int do_file(const char *filename) { - FILE *fp; - string whole_filename; - if (strcmp(filename, "-") == 0) { - fp = stdin; - whole_filename = filename; - whole_filename += '\0'; - } - else if (IS_ABSOLUTE(filename)) { - whole_filename = filename; - whole_filename += '\0'; - errno = 0; - fp = fopen(filename, "r"); - if (fp == 0) { - error("can't open `%1': %2", filename, strerror(errno)); - return 0; - } - } - else { - size_t j; - for (j = 0; j < include_list_length; ++j) - { - const char *path = include_list[j]; - if (0 == strcmp(path, ".")) - whole_filename = filename; - else - whole_filename = string(path) + "/" + filename; - whole_filename += '\0'; - errno = 0; - fp = fopen(whole_filename.contents(), "r"); - if (fp != 0) - break; - if (errno != ENOENT) { - error("can't open `%1': %2", - whole_filename.contents(), strerror(errno)); - return 0; - } - } - if (j >= include_list_length) - { - errno = ENOENT; - error("can't open `%1': %2", filename, strerror(errno)); - return 0; - } + char *file_name_in_path = 0; + FILE *fp = include_search_path.open_file_cautious(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; } current_filename = whole_filename.contents(); current_lineno = 1; diff --git a/contrib/groff/src/preproc/soelim/soelim.man b/contrib/groff/src/preproc/soelim/soelim.man index 7663e3bff532..fb17e3644fca 100644 --- a/contrib/groff/src/preproc/soelim/soelim.man +++ b/contrib/groff/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 @@ -80,7 +84,7 @@ even when followed by a character other than space or newline. This option may be used to specify a directory to search for files (both those on the command line and those named in .B \&.so -lines). +requests). The current directory is always searched first. This option may be specified more than once, the directories will be searched in the order specified. @@ -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/src/preproc/tbl/Makefile.sub b/contrib/groff/src/preproc/tbl/Makefile.sub index 8decd3103a55..bea28b35164d 100644 --- a/contrib/groff/src/preproc/tbl/Makefile.sub +++ b/contrib/groff/src/preproc/tbl/Makefile.sub @@ -1,6 +1,7 @@ PROG=tbl$(EXEEXT) MAN1=tbl.n XLIBS=$(LIBGROFF) +MLIB=$(LIBM) OBJS=\ main.$(OBJEXT) \ table.$(OBJEXT) diff --git a/contrib/groff/src/preproc/tbl/main.cpp b/contrib/groff/src/preproc/tbl/main.cpp index fe3aabf9e664..d79adb0bf831 100644 --- a/contrib/groff/src/preproc/tbl/main.cpp +++ b/contrib/groff/src/preproc/tbl/main.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, 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; @@ -573,6 +592,11 @@ void entry_format::debug_print() const put_string(font, stderr); putc(' ', stderr); } + if (!macro.empty()) { + putc('m', stderr); + put_string(macro, stderr); + putc(' ', stderr); + } switch (vertical_alignment) { case entry_modifier::CENTER: break; @@ -886,6 +910,40 @@ format *process_format(table_input &in, options *opt, } } break; + case 'x': + case 'X': + do { + c = in.get(); + } while (c == ' ' || c == '\t'); + if (c == EOF) { + error("missing macro name"); + break; + } + if (c == '(') { + for (;;) { + c = in.get(); + if (c == EOF || c == ' ' || c == '\t') { + error("missing `)'"); + break; + } + if (c == ')') { + c = in.get(); + break; + } + list->macro += char(c); + } + } + else { + list->macro = c; + char cc = c; + c = in.get(); + if (!csdigit(cc) + && c != EOF && c != ' ' && c != '\t' && c != '.' && c != '\n') { + list->macro += char(c); + c = in.get(); + } + } + break; case 'v': case 'V': c = in.get(); @@ -1184,9 +1242,9 @@ table *process_data(table_input &in, format *f, options *opt) format_index = f->nrows - 1; // A format row that is all lines doesn't use up a data line. while (format_index < f->nrows - 1) { - int c; - for (c = 0; c < ncolumns; c++) { - entry_format *e = f->entry[format_index] + c; + int cnt; + for (cnt = 0; cnt < ncolumns; cnt++) { + entry_format *e = f->entry[format_index] + cnt; if (e->type != FORMAT_HLINE && e->type != FORMAT_DOUBLE_HLINE // Unfortunately tbl treats a span as needing data. @@ -1194,11 +1252,11 @@ table *process_data(table_input &in, format *f, options *opt) ) break; } - if (c < ncolumns) + if (cnt < ncolumns) break; - for (c = 0; c < ncolumns; c++) - tbl->add_entry(current_row, c, input_entry, - f->entry[format_index] + c, current_filename, + for (cnt = 0; cnt < ncolumns; cnt++) + tbl->add_entry(current_row, cnt, input_entry, + f->entry[format_index] + cnt, current_filename, current_lineno); tbl->add_vlines(current_row, f->vline[format_index]); format_index++; @@ -1295,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: @@ -1428,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; @@ -1440,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; @@ -1504,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/src/preproc/tbl/table.cpp b/contrib/groff/src/preproc/tbl/table.cpp index 32068c367ed1..8312386aafee 100644 --- a/contrib/groff/src/preproc/tbl/table.cpp +++ b/contrib/groff/src/preproc/tbl/table.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2003 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 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 "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" @@ -128,14 +129,14 @@ void prints(const string &s) struct horizontal_span { horizontal_span *next; - short start_col; - short end_col; + int start_col; + int end_col; horizontal_span(int, int, horizontal_span *); }; -struct single_line_entry; -struct double_line_entry; -struct simple_entry; +class single_line_entry; +class double_line_entry; +class simple_entry; class table_entry { friend class table; @@ -145,8 +146,8 @@ friend class table; protected: int start_row; int end_row; - short start_col; - short end_col; + int start_col; + int end_col; const entry_modifier *mod; public: void set_location(); @@ -687,8 +688,8 @@ void block_entry::do_divert(int alphabetic, int ncols, const string *mw, if (alphabetic) prints("-2n"); prints("\n"); - set_modifier(mod); prints(".cp \\n(" COMPATIBLE_REG "\n"); + set_modifier(mod); set_location(); prints(contents); prints(".br\n.di\n.cp 0\n"); @@ -965,6 +966,8 @@ void set_modifier(const entry_modifier *m) prints('-'); printfs("%1\n", as_string(m->vertical_spacing.val)); } + if (!m->macro.empty()) + printfs(".%1\n", m->macro); } void set_inline_modifier(const entry_modifier *m) @@ -1088,7 +1091,7 @@ struct vertical_rule { vertical_rule *next; int start_row; int end_row; - short col; + int col; char is_double; string top_adjust; string bot_adjust; @@ -1693,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" @@ -2602,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/src/preproc/tbl/table.h b/contrib/groff/src/preproc/tbl/table.h index 69959b899e4c..4b2497e2158e 100644 --- a/contrib/groff/src/preproc/tbl/table.h +++ b/contrib/groff/src/preproc/tbl/table.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002 +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 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 "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; @@ -41,6 +49,7 @@ struct entry_modifier { inc_number point_size; inc_number vertical_spacing; string font; + string macro; enum { CENTER, TOP, BOTTOM } vertical_alignment; char zero_width; char stagger; @@ -69,7 +78,7 @@ struct entry_format : public entry_modifier { void debug_print() const; }; -struct table_entry; +class table_entry; struct horizontal_span; struct stuff; struct vertical_rule; @@ -152,3 +161,5 @@ public: }; void set_troff_location(const char *, int); + +extern int compatible_flag; diff --git a/contrib/groff/src/preproc/tbl/tbl.man b/contrib/groff/src/preproc/tbl/tbl.man index 7f12bf933e00..00dfe4f83009 100644 --- a/contrib/groff/src/preproc/tbl/tbl.man +++ b/contrib/groff/src/preproc/tbl/tbl.man @@ -1,5 +1,6 @@ .ig -Copyright (C) 1989-1995, 2001, 2002 Free Software Foundation, Inc. +Copyright (C) 1989-1995, 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 @@ -62,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. @@ -287,6 +290,33 @@ If used multiple times to specify the width for a particular column, the last entry takes effect. . .TP +x,X +This is a GNU tbl extension. +Either of these specifiers may be followed by a macro name +(either one or two characters long), +or long name in parentheses. +A one-letter macro name must be separated by one or more blanks +from whatever follows. +The macro which name can be specified here +must be defined before creating the table. +It is called just before the table's cell text is output. +As implemented currently, this macro is only called if block input is used, +that is, text between `T{' and `T}'. +The macro should contain only simple +.B troff +requests to change the text block formatting, like text adjustment, +hyphenation, size, or font. +The macro is called +.I after +other cell modifications like +.BR b , +.B f +or +.B v +are output. +Thus the macro can overwrite other modification specifiers. +. +.TP e,E Make equally-spaced columns. . @@ -339,6 +369,19 @@ too long as a simple string between tabs. It is started with `T{' and closed with `T}'. The former must end a line, and the latter must start a line, probably followed by other data columns (separated with tabs). +By default, the text block is formatted with the settings which were +active before entering the table, possibly overridden by the +.B v +and +.B w +tbl specifiers. +For example, to make all text blocks ragged-right, insert +.B .na +right before the starting +.B .TS +(and +.B .ad +after the table). .LP To change the data format within a table, use the .B .T& @@ -415,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/src/roff/groff/groff.cpp b/contrib/groff/src/roff/groff/groff.cpp index 49104b2fdefb..5e18757352c3 100644 --- a/contrib/groff/src/roff/groff/groff.cpp +++ b/contrib/groff/src/roff/groff/groff.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989-2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1989-2000, 2001, 2002, 2003, 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. */ // A front end for groff. @@ -93,7 +94,7 @@ char *predriver = 0; possible_command commands[NCOMMANDS]; int run_commands(int no_pipe); -void print_commands(); +void print_commands(FILE *); void append_arg_to_string(const char *arg, string &str); void handle_unknown_desc_command(const char *command, const char *arg, const char *filename, int lineno); @@ -114,6 +115,7 @@ int main(int argc, char **argv) int zflag = 0; int iflag = 0; int Xflag = 0; + int oflag = 0; int safer_flag = 1; int opt; const char *command_prefix = getenv("GROFF_COMMAND_PREFIX"); @@ -140,6 +142,12 @@ int main(int argc, char **argv) case 'I': commands[SOELIM_INDEX].set_name(command_prefix, "soelim"); commands[SOELIM_INDEX].append_arg(buf, optarg); + // .psbb may need to search for files + commands[TROFF_INDEX].append_arg(buf, optarg); + // \X'ps:import' may need to search for files + Pargs += buf; + Pargs += optarg; + Pargs += '\0'; break; case 't': commands[TBL_INDEX].set_name(command_prefix, "tbl"); @@ -179,7 +187,7 @@ int main(int argc, char **argv) vflag = 1; { printf("GNU groff version %s\n", Version_string); - printf("Copyright (C) 2002 Free Software Foundation, Inc.\n" + printf("Copyright (C) 2004 Free Software Foundation, Inc.\n" "GNU groff comes with ABSOLUTELY NO WARRANTY.\n" "You may redistribute copies of groff and its subprograms\n" "under the terms of the GNU General Public License.\n" @@ -234,14 +242,15 @@ int main(int argc, char **argv) case 'F': font::command_line_font_dir(optarg); if (Fargs.length() > 0) { - Fargs += PATH_SEP[0]; + Fargs += PATH_SEP_CHAR; Fargs += optarg; } else Fargs = optarg; break; - case 'f': case 'o': + oflag = 1; + case 'f': case 'm': case 'r': case 'd': @@ -295,7 +304,7 @@ int main(int argc, char **argv) const char *real_driver = 0; if (Xflag) { real_driver = postdriver; - postdriver = GXDITVIEW; + postdriver = (char *)GXDITVIEW; commands[TROFF_INDEX].append_arg("-r" XREG "=", "1"); } if (postdriver) @@ -334,7 +343,7 @@ int main(int argc, char **argv) } if (gxditview_flag) commands[POST_INDEX].append_arg("-"); - if (lflag && !Xflag && spooler) { + if (lflag && !vflag && !Xflag && spooler) { commands[SPOOL_INDEX].set_name(BSHELL); commands[SPOOL_INDEX].append_arg(BSHELL_DASH_C); Largs += '\0'; @@ -347,8 +356,11 @@ int main(int argc, char **argv) } commands[TROFF_INDEX].append_arg("-T", device); // html renders equations as images via ps - if (strcmp(device, "html") == 0) + if (strcmp(device, "html") == 0) { + if (oflag) + fatal("`-o' option is invalid with device `html'"); commands[EQN_INDEX].append_arg("-Tps:html"); + } else commands[EQN_INDEX].append_arg("-T", device); @@ -372,7 +384,7 @@ int main(int argc, char **argv) e += Fargs; char *fontpath = getenv("GROFF_FONT_PATH"); if (fontpath && *fontpath) { - e += PATH_SEP[0]; + e += PATH_SEP_CHAR; e += fontpath; } e += '\0'; @@ -398,17 +410,17 @@ int main(int argc, char **argv) else f += BINPATH; if (path && *path) { - f += PATH_SEP[0]; + f += PATH_SEP_CHAR; f += path; } f += '\0'; if (putenv(strsave(f.contents()))) fatal("putenv failed"); } - if (Vflag) { - print_commands(); + if (Vflag) + print_commands(Vflag == 1 ? stdout : stderr); + if (Vflag == 1) exit(0); - } return run_commands(vflag); } @@ -474,7 +486,7 @@ void handle_unknown_desc_command(const char *command, const char *arg, } } -void print_commands() +void print_commands(FILE *fp) { int last; for (last = SPOOL_INDEX; last >= 0; last--) @@ -482,7 +494,7 @@ void print_commands() break; for (int i = 0; i <= last; i++) if (commands[i].get_name() != 0) - commands[i].print(i == last, stdout); + commands[i].print(i == last, fp); } // Run the commands. Return the code with which to exit. @@ -724,7 +736,7 @@ void help() "-N\tdon't allow newlines within eqn delimiters\n" "-S\tenable safer mode (the default)\n" "-U\tenable unsafe mode\n" -"-Idir\tsearch dir for soelim. Implies -s\n" +"-Idir\tsearch dir for soelim, troff, and grops. Implies -s\n" "\n", stdout); exit(0); diff --git a/contrib/groff/src/roff/groff/groff.man b/contrib/groff/src/roff/groff/groff.man index 2227b71e7bce..9e6a4ace074d 100644 --- a/contrib/groff/src/roff/groff/groff.man +++ b/contrib/groff/src/roff/groff/groff.man @@ -1,9 +1,9 @@ .ig groff.man -Last update: 18 Mar 2003 +Last update: 01 Jul 2005 -Copyright (C) 1989, 2002, 2003 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 @@ -20,6 +20,9 @@ FDL in the main directory of the groff source package. .\" Setup .\" -------------------------------------------------------------------- . +.do nr groff_C \n[.C] +.cp 0 +. .mso www.tmac . .\" set adjust to both @@ -185,7 +188,7 @@ FDL in the main directory of the groff source package. .c Environment variable .de EnvVar . SM -. BR \$1 \$2 +. BR \%\$1 \$2 .. .c -------------------------------------------------------------------- .c a shell command line @@ -373,8 +376,20 @@ Print a help message. . . .OptDef I "" dir -Add search directory for -.BR \%@g@soelim (@MAN1EXT@). +This option may be used to specify a directory to search for +files (both those on the command line and those named in +.B \&.psbb +and +.B \&.so +requests, and +.B \eX'ps: import' +and +.B \eX'ps: file' +escapes). +The current directory is always searched first. +This option may be specified more than once; +the directories will be searched in the order specified. +No directory search is performed for files specified using an absolute path. This option implies the .ShortOpt s option. @@ -446,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[] @@ -505,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 @@ -561,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 @@ -601,12 +625,14 @@ to all subprograms. .OptDef V Output the pipeline that would be run by .BR groff -(as a wrapper program), but do not execute it. +(as a wrapper program) on the standard output, but do not execute it. +If given more than once, +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 @@ -638,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 @@ -652,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. . . .\" -------------------------------------------------------------------- @@ -682,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. . @@ -759,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 .\" -------------------------------------------------------------------- . @@ -922,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. . . .\" -------------------------------------------------------------------- @@ -1034,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 @@ -1043,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 @@ -1267,8 +1347,16 @@ If this is not set but the environment variable .EnvVar TMPDIR instead, temporary files will be created in the directory .EnvVar $TMPDIR . +On MS-DOS and Windows\ 32 platforms, the environment variables +.EnvVar TMP +and +.EnvVar TEMP +(in that order) are searched also, after +.EnvVar GROFF_TMPDIR +and +.EnvVar TMPDIR . . -Otherwise temporary files will be created in +Otherwise, temporary files will be created in .BR /tmp . The .BR \%@g@refer (@MAN1EXT@), @@ -1494,7 +1582,7 @@ This is the only grap version supported by groff. .SH AUTHORS .\" -------------------------------------------------------------------- . -Copyright \(co 1989, 2002, 2003 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 @@ -1509,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" . @@ -1589,7 +1677,9 @@ Roff formatter programs: .BR ditroff (@MAN7EXT@). . .TP -The intermediate output language: +The +.I intermediate output +language: .BR \%groff_out (@MAN7EXT@). . .TP @@ -1598,6 +1688,7 @@ Postprocessors for the output devices: .BR \%grohtml (@MAN1EXT@), .BR \%grolbp (@MAN1EXT@), .BR \%grolj4 (@MAN1EXT@), +.BR \%lj4_font (@MAN5EXT@), .BR \%grops (@MAN1EXT@), .BR \%grotty (@MAN1EXT@). . @@ -1620,6 +1711,7 @@ The following utilities are available: .BR \%addftinfo (@MAN1EXT@), .BR \%afmtodit (@MAN1EXT@), .BR \%eqn2graph (@MAN1EXT@), +.BR \%grap2graph (@MAN1EXT@), .BR \%groffer (@MAN1EXT@), .BR \%gxditview (@MAN1EXT@), .BR \%hpftodit (@MAN1EXT@), @@ -1629,6 +1721,7 @@ The following utilities are available: .BR \%pic2graph (@MAN1EXT@), .BR \%tfmtodit (@MAN1EXT@). . +.cp \n[groff_C] . .\" -------------------------------------------------------------------- .\" Emacs setup diff --git a/contrib/groff/src/roff/groff/pipeline.c b/contrib/groff/src/roff/groff/pipeline.c index 985b24fd274f..d067ae93016b 100644 --- a/contrib/groff/src/roff/groff/pipeline.c +++ b/contrib/groff/src/roff/groff/pipeline.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003 +/* 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 @@ -39,7 +39,6 @@ extern char *strerror(); #ifdef _POSIX_VERSION #include - #define PID_T pid_t #else /* not _POSIX_VERSION */ @@ -78,27 +77,23 @@ extern char *strerror(); #include "pipeline.h" -#ifdef __STDC__ -#define P(parms) parms -#else -#define P(parms) () -#ifndef _WIN32 -#define const /* as nothing */ -#endif -#endif - #define error c_error -extern void error P((const char *, const char *, const char *, const char *)); -extern void c_fatal P((const char *, const char *, const char *, const char *)); -static void sys_fatal P((const char *)); -static const char *xstrsignal P((int)); -static char *i_to_a P((int)); +#ifdef __cplusplus +extern "C" { +#endif + +extern void error(const char *, const char *, const char *, const char *); +extern void c_fatal(const char *, const char *, const char *, const char *); +extern const char *i_to_a(int); /* from libgroff */ + +#ifdef __cplusplus +} +#endif + +static void sys_fatal(const char *); +static const char *xstrsignal(int); -/* MSVC can support asynchronous processes, but it's unlikely to have - fork(). So, until someone writes an emulation, let them at least - have a workable groff by using the good-ole DOS pipe simulation - via temporary files... */ #if defined(__MSDOS__) \ || (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN__)) \ @@ -106,87 +101,120 @@ static char *i_to_a P((int)); #include #include -#include #include +#include #include "nonposix.h" -/* A signal handler that just records that a signal has happened. */ -static int child_interrupted; - -static RETSIGTYPE signal_catcher(int signo) -{ - child_interrupted++; -} - static const char *sh = "sh"; +static const char *cmd = "cmd"; static const char *command = "command"; -const char * -system_shell_name(void) +extern int strcasecmp(const char *, const char *); + +char *sbasename(const char *path) { - static const char *shell_name; + char *base; + const char *p1, *p2; - /* We want them to be able to use a Unixy shell if they have it - installed. Let spawnlp try to find it, but if it fails, default - to COMMAND.COM. */ - if (shell_name == NULL) { - int sh_found = spawnlp(P_WAIT, sh, sh, "-c", ":", NULL) == 0; - - if (sh_found) - shell_name = sh; - else - shell_name = command; - } - return shell_name; -} - -const char * -system_shell_dash_c(void) -{ - if (strcmp(system_shell_name(), sh) == 0) - return "-c"; + p1 = path; + if ((p2 = strrchr(p1, '\\')) + || (p2 = strrchr(p1, '/')) + || (p2 = strrchr(p1, ':'))) + p1 = p2 + 1; + if ((p2 = strrchr(p1, '.')) + && ((strcasecmp(p2, ".exe") == 0) + || (strcasecmp(p2, ".com") == 0))) + ; else - return "/c"; + p2 = p1 + strlen(p1); + + base = malloc((size_t)(p2 - p1)); + strncpy(base, p1, p2 - p1); + *(base + (p2 - p1)) = '\0'; + + return(base); } -int -is_system_shell(const char *shell) +/* Get the name of the system shell */ +char *system_shell_name(void) { - size_t shlen; - size_t ibase = 0, idot, i; + const char *shell_name; - if (!shell) /* paranoia */ + /* + Use a Unixy shell if it's installed. Use SHELL if set; otherwise, + let spawnlp try to find sh; if that fails, use COMSPEC if set; if + not, try cmd.exe; if that fails, default to command.com. + */ + + if ((shell_name = getenv("SHELL")) != NULL) + ; + else if (spawnlp(_P_WAIT, sh, sh, "-c", ":", NULL) == 0) + shell_name = sh; + else if ((shell_name = getenv("COMSPEC")) != NULL) + ; + else if (spawnlp(_P_WAIT, cmd, cmd, "/c", ";", NULL) == 0) + shell_name = cmd; + else + shell_name = command; + + return sbasename(shell_name); +} + +const char *system_shell_dash_c(void) +{ + char *shell_name; + const char *dash_c; + + shell_name = system_shell_name(); + + /* Assume that if the shell name ends in "sh", it's Unixy */ + if (strcasecmp(shell_name + strlen(shell_name) - strlen("sh"), "sh") == 0) + dash_c = "-c"; + else + dash_c = "/c"; + + free(shell_name); + return dash_c; +} + +int is_system_shell(const char *prog) +{ + int result; + char *this_prog, *system_shell; + + if (!prog) /* paranoia */ return 0; - idot = shlen = strlen(shell); - for (i = 0; i < shlen; i++) { - if (shell[i] == '.') - idot = i; - else if (shell[i] == '/' || shell[i] == '\\' || shell[i] == ':') { - ibase = i + 1; - idot = shlen; - } - } + this_prog = sbasename(prog); + system_shell = system_shell_name(); - /* "sh" and "sh.exe" should compare equal. */ - return (strncasecmp(shell + ibase, system_shell_name(), idot - ibase) == 0 - && (idot == shlen - || strcasecmp(shell + idot, ".exe") == 0 - || strcasecmp(shell + idot, ".com") == 0)); + result = strcasecmp(this_prog, system_shell) == 0; + + free(this_prog); + free(system_shell); + + return result; } #ifdef _WIN32 -/* Win32 doesn't have fork() */ +/* + Windows 32 doesn't have fork(), so we need to start asynchronous child + processes with spawn() rather than exec(). If there is more than one + command, i.e., a pipeline, the parent must set up each child's I/O + redirection prior to the spawn. The original stdout must be restored + before spawning the last process in the pipeline, and the original + stdin must be restored in the parent after spawning the last process + and before waiting for any of the children. +*/ -int -run_pipeline(int ncommands, char ***commands, int no_pipe) +int run_pipeline(int ncommands, char ***commands, int no_pipe) { - int save_stdin, save_stdout; int i; - int last_input = 0; - int proc_count = ncommands; + int last_input = 0; /* pacify some compilers */ + int save_stdin = 0; + int save_stdout = 0; int ret = 0; char err_str[BUFSIZ]; PID_T pids[MAX_COMMANDS]; @@ -200,16 +228,22 @@ run_pipeline(int ncommands, char ***commands, int no_pipe) if (ncommands > 1 && !no_pipe) { /* last command doesn't need a new pipe */ if (i < ncommands - 1) { - if (_pipe(pdes, BUFSIZ, O_BINARY | O_NOINHERIT) < 0) - sys_fatal("pipe"); + if (pipe(pdes) < 0) { + sprintf(err_str, "%s: pipe", commands[i][0]); + sys_fatal(err_str); + } } /* 1st command; writer */ if (i == 0) { + /* save stdin */ + if ((save_stdin = dup(STDIN_FILENO)) < 0) + sys_fatal("dup stdin"); /* save stdout */ - if ((save_stdout = _dup(1)) < 0) + if ((save_stdout = dup(STDOUT_FILENO)) < 0) sys_fatal("dup stdout"); + /* connect stdout to write end of pipe */ - if (_dup2(pdes[1], 1) < 0) { + if (dup2(pdes[1], STDOUT_FILENO) < 0) { sprintf(err_str, "%s: dup2(stdout)", commands[i][0]); sys_fatal(err_str); } @@ -217,19 +251,28 @@ run_pipeline(int ncommands, char ***commands, int no_pipe) sprintf(err_str, "%s: close(pipe[WRITE])", commands[i][0]); sys_fatal(err_str); } + /* + Save the read end of the pipe so that it can be connected to + stdin of the next program in the pipeline during the next + pass through the loop. + */ last_input = pdes[0]; } /* reader and writer */ else if (i < ncommands - 1) { /* connect stdin to read end of last pipe */ - if (_dup2(last_input, 0) < 0) { + if (dup2(last_input, STDIN_FILENO) < 0) { sprintf(err_str, " %s: dup2(stdin)", commands[i][0]); - sys_fatal("err_str"); + sys_fatal(err_str); + } + if (close(last_input) < 0) { + sprintf(err_str, "%s: close(last_input)", commands[i][0]); + sys_fatal(err_str); } /* connect stdout to write end of new pipe */ - if (_dup2(pdes[1], 1) < 0) { + if (dup2(pdes[1], STDOUT_FILENO) < 0) { sprintf(err_str, "%s: dup2(stdout)", commands[i][0]); - sys_fatal("err_str"); + sys_fatal(err_str); } if (close(pdes[1]) < 0) { sprintf(err_str, "%s: close(pipe[WRITE])", commands[i][0]); @@ -240,22 +283,27 @@ run_pipeline(int ncommands, char ***commands, int no_pipe) /* last command; reader */ else { /* connect stdin to read end of last pipe */ - if (_dup2(last_input, 0) < 0) { + if (dup2(last_input, STDIN_FILENO) < 0) { sprintf(err_str, "%s: dup2(stdin)", commands[i][0]); - sys_fatal("err_str"); + sys_fatal(err_str); } if (close(last_input) < 0) { - sprintf(err_str, "%s: close(pipe[READ])", commands[i][0]); + sprintf(err_str, "%s: close(last_input)", commands[i][0]); sys_fatal(err_str); } /* restore original stdout */ - if (_dup2(save_stdout, 1) < 0) { - sprintf(err_str, "%s: dup2(stdout))", "groff"); + if (dup2(save_stdout, STDOUT_FILENO) < 0) { + sprintf(err_str, "%s: dup2(save_stdout))", commands[i][0]); sys_fatal(err_str); } + /* close stdout copy */ + if (close(save_stdout) < 0) { + sprintf(err_str, "%s: close(save_stdout)", commands[i][0]); + sys_fatal(err_str); + } } } - if ((pid = _spawnvp(_P_NOWAIT, commands[i][0], commands[i])) < 0) { + if ((pid = spawnvp(_P_NOWAIT, commands[i][0], commands[i])) < 0) { error("couldn't exec %1: %2", commands[i][0], strerror(errno), (char *)0); fflush(stderr); /* just in case error() doesn't */ @@ -263,65 +311,81 @@ run_pipeline(int ncommands, char ***commands, int no_pipe) } pids[i] = pid; } + + if (ncommands > 1 && !no_pipe) { + /* restore original stdin if it was redirected */ + if (dup2(save_stdin, STDIN_FILENO) < 0) { + sprintf(err_str, "dup2(save_stdin))"); + sys_fatal(err_str); + } + /* close stdin copy */ + if (close(save_stdin) < 0) { + sprintf(err_str, "close(save_stdin)"); + sys_fatal(err_str); + } + } + for (i = 0; i < ncommands; i++) { int status; - int pid; + PID_T pid; pid = pids[i]; - if ((pid = _cwait(&status, pid, _WAIT_CHILD)) < 0) { - perror(NULL); - sys_fatal("wait"); - if (WIFSIGNALED(status)) { - int sig = WTERMSIG(status); - - error("%1: %2%3", - commands[i][0], - xstrsignal(sig), - WCOREDUMP(status) ? " (core dumped)" : ""); - ret |= 2; - } - else if (WIFEXITED(status)) { - int exit_status = WEXITSTATUS(status); - - if (exit_status == EXEC_FAILED_EXIT_STATUS) - ret |= 4; - else if (exit_status != 0) - ret |= 1; - } - else - error("unexpected status %1", itoa(status), (char *)0, (char *)0); - break; + if ((pid = WAIT(&status, pid, _WAIT_CHILD)) < 0) { + sprintf(err_str, "%s: wait", commands[i][0]); + sys_fatal(err_str); } + else if (status != 0) + ret |= 1; } return ret; } -#else /* _WIN32 */ +#else /* not _WIN32 */ /* MSDOS doesn't have `fork', so we need to simulate the pipe by running - the programs in sequence with standard streams redirected fot and + the programs in sequence with standard streams redirected to and from temporary files. */ -int -run_pipeline(int ncommands, char ***commands, int no_pipe) + +/* A signal handler that just records that a signal has happened. */ +static int child_interrupted; + +static RETSIGTYPE signal_catcher(int signo) +{ + child_interrupted++; +} + +int run_pipeline(int ncommands, char ***commands, int no_pipe) { int save_stdin = dup(0); int save_stdout = dup(1); char *tmpfiles[2]; - char tem1[L_tmpnam], tem2[L_tmpnam]; int infile = 0; int outfile = 1; int i, f, ret = 0; - tmpfiles[0] = tmpnam(tem1); - tmpfiles[1] = tmpnam(tem2); + /* Choose names for a pair of temporary files to implement the pipeline. + Microsoft's `tempnam' uses the directory specified by `getenv("TMP")' + if it exists; in case it doesn't, try the GROFF alternatives, or + `getenv("TEMP")' as last resort -- at least one of these had better + be set, since Microsoft's default has a high probability of failure. */ + char *tmpdir; + if ((tmpdir = getenv("GROFF_TMPDIR")) == NULL + && (tmpdir = getenv("TMPDIR")) == NULL) + tmpdir = getenv("TEMP"); + + /* Don't use `tmpnam' here: Microsoft's implementation yields unusable + file names if current directory is on network share with read-only + root. */ + tmpfiles[0] = tempnam(tmpdir, NULL); + tmpfiles[1] = tempnam(tmpdir, NULL); for (i = 0; i < ncommands; i++) { int exit_status; RETSIGTYPE (*prev_handler)(int); - if (i) { + if (i && !no_pipe) { /* redirect stdin from temp file */ f = open(tmpfiles[infile], O_RDONLY|O_BINARY, 0666); if (f < 0) @@ -376,12 +440,11 @@ run_pipeline(int ncommands, char ***commands, int no_pipe) return ret; } -#endif /* MS-DOS */ +#endif /* not _WIN32 */ #else /* not __MSDOS__, not _WIN32 */ -int -run_pipeline(int ncommands, char ***commands, int no_pipe) +int run_pipeline(int ncommands, char ***commands, int no_pipe) { int i; int last_input = 0; @@ -496,30 +559,20 @@ run_pipeline(int ncommands, char ***commands, int no_pipe) #endif /* not __MSDOS__, not _WIN32 */ -static void -sys_fatal(const char *s) +static void sys_fatal(const char *s) { c_fatal("%1: %2", s, strerror(errno), (char *)0); } -static char * -i_to_a(int n) -{ - static char buf[12]; - sprintf(buf, "%d", n); - return buf; -} - -static const char * -xstrsignal(int n) +static const char *xstrsignal(int n) { static char buf[sizeof("Signal ") + 1 + sizeof(int) * 3]; #ifdef NSIG -#ifdef SYS_SIGLIST_DECLARED +#if HAVE_DECL_SYS_SIGLIST if (n >= 0 && n < NSIG && sys_siglist[n] != 0) return sys_siglist[n]; -#endif /* SYS_SIGLIST_DECLARED */ +#endif /* HAVE_DECL_SYS_SIGLIST */ #endif /* NSIG */ sprintf(buf, "Signal %d", n); return buf; diff --git a/contrib/groff/src/roff/groff/pipeline.h b/contrib/groff/src/roff/groff/pipeline.h index 52bff8507244..77bb11a05305 100644 --- a/contrib/groff/src/roff/groff/pipeline.h +++ b/contrib/groff/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/src/roff/grog/grog.pl b/contrib/groff/src/roff/grog/grog.pl index 07fa7a440e99..b802fd56f2cc 100644 --- a/contrib/groff/src/roff/grog/grog.pl +++ b/contrib/groff/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/src/roff/grog/grog.sh b/contrib/groff/src/roff/grog/grog.sh index 3999d77d7fcf..1a937cb1b374 100644 --- a/contrib/groff/src/roff/grog/grog.sh +++ b/contrib/groff/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/src/roff/nroff/Makefile.sub b/contrib/groff/src/roff/nroff/Makefile.sub index 138c870a27ce..ffd2ccd8926c 100644 --- a/contrib/groff/src/roff/nroff/Makefile.sub +++ b/contrib/groff/src/roff/nroff/Makefile.sub @@ -4,10 +4,9 @@ CLEANADD=nroff all: nroff -nroff: nroff.sh +nroff: nroff.sh $(SH_DEPS_SED_SCRIPT) rm -f $@ - sed -e "s|@BINDIR@|$(bindir)|g" \ - -e "s|@SEP@|$(SEP)|g" \ + sed -f $(SH_DEPS_SED_SCRIPT) \ -e $(SH_SCRIPT_SED_CMD) \ -e "s|@VERSION@|$(version)$(revision)|" $(srcdir)/nroff.sh >$@ chmod +x $@ diff --git a/contrib/groff/src/roff/nroff/nroff.man b/contrib/groff/src/roff/nroff/nroff.man index 6a9c9425bcd5..0511b45b5c1a 100644 --- a/contrib/groff/src/roff/nroff/nroff.man +++ b/contrib/groff/src/roff/nroff/nroff.man @@ -1,5 +1,5 @@ .ig -Copyright (C) 1989-2001, 2002 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/src/roff/nroff/nroff.sh b/contrib/groff/src/roff/nroff/nroff.sh index 5144ba4391f1..3120215534f7 100755 --- a/contrib/groff/src/roff/nroff/nroff.sh +++ b/contrib/groff/src/roff/nroff/nroff.sh @@ -1,14 +1,14 @@ -#!/bin/sh +#! /bin/sh # Emulate nroff with groff. prog="$0" # Default device. # First try the "locale charmap" command, because it's most reliable. # On systems where it doesn't exist, look at the environment variables. -case "`locale charmap 2>/dev/null`" in +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 "`locale charmap 2>/dev/null`" 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 ;; @@ -58,15 +59,17 @@ for i # ignore other devices ;; -u*) - # Solaris 2.2 `man' uses -u0; ignore it, + # Solaris 2.2 through at least Solaris 9 `man' invokes + # `nroff -u0 ... | col -x'. Ignore the -u0, # since `less' and `more' can use the emboldening info. - ;; + # However, disable SGR, since Solaris `col' mishandles it. + opts="$opts -P-c" ;; -v | --version) 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 @@ -82,11 +85,15 @@ for i shift done +# Set up the `GROFF_BIN_PATH' variable +# to be exported in the current `GROFF_RUNTIME' environment. + +@GROFF_BIN_PATH_SETUP@ +export GROFF_BIN_PATH + # This shell script is intended for use with man, so warnings are # probably not wanted. Also load nroff-style character definitions. -: ${GROFF_BIN_PATH=@BINDIR@} -export GROFF_BIN_PATH -PATH=$GROFF_BIN_PATH@SEP@$PATH groff -mtty-char $T $opts ${1+"$@"} +PATH="$GROFF_RUNTIME$PATH" groff -mtty-char $T $opts ${1+"$@"} # eof diff --git a/contrib/groff/src/roff/troff/Makefile.sub b/contrib/groff/src/roff/troff/Makefile.sub index 7fa802472b1a..82c727d3e16d 100644 --- a/contrib/groff/src/roff/troff/Makefile.sub +++ b/contrib/groff/src/roff/troff/Makefile.sub @@ -6,30 +6,22 @@ OBJS=\ dictionary.$(OBJEXT) \ div.$(OBJEXT) \ env.$(OBJEXT) \ - glyphuni.$(OBJEXT) \ input.$(OBJEXT) \ majorminor.$(OBJEXT) \ + mtsm.$(OBJEXT) \ node.$(OBJEXT) \ number.$(OBJEXT) \ - reg.$(OBJEXT) \ - symbol.$(OBJEXT) \ - unicode.$(OBJEXT) \ - uniglyph.$(OBJEXT) \ - uniuni.$(OBJEXT) + reg.$(OBJEXT) CCSRCS=\ $(srcdir)/dictionary.cpp \ $(srcdir)/div.cpp \ $(srcdir)/env.cpp \ - $(srcdir)/glyphuni.cpp \ $(srcdir)/input.cpp \ majorminor.cpp \ + $(srcdir)/mtsm.cpp \ $(srcdir)/node.cpp \ $(srcdir)/number.cpp \ - $(srcdir)/reg.cpp \ - $(srcdir)/symbol.cpp \ - $(srcdir)/unicode.cpp \ - $(srcdir)/uniglyph.cpp \ - $(srcdir)/uniuni.cpp + $(srcdir)/reg.cpp HDRS=\ $(srcdir)/charinfo.h \ $(srcdir)/dictionary.h \ @@ -37,13 +29,12 @@ HDRS=\ $(srcdir)/env.h \ $(srcdir)/hvunits.h \ $(srcdir)/input.h \ + $(srcdir)/mtsm.h \ $(srcdir)/node.h \ $(srcdir)/reg.h \ $(srcdir)/request.h \ - $(srcdir)/symbol.h \ $(srcdir)/token.h \ - $(srcdir)/troff.h \ - $(srcdir)/unicode.h + $(srcdir)/troff.h GENSRCS=majorminor.cpp NAMEPREFIX=$(g) diff --git a/contrib/groff/src/roff/troff/charinfo.h b/contrib/groff/src/roff/troff/charinfo.h index 4123fbadd5ec..42190fd814e2 100644 --- a/contrib/groff/src/roff/troff/charinfo.h +++ b/contrib/groff/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/src/roff/troff/column.cpp b/contrib/groff/src/roff/troff/column.cpp index 8d6a6ebe5976..060b088d2355 100644 --- a/contrib/groff/src/roff/troff/column.cpp +++ b/contrib/groff/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/src/roff/troff/dictionary.cpp b/contrib/groff/src/roff/troff/dictionary.cpp index a70ebb0e8432..37084b6678c1 100644 --- a/contrib/groff/src/roff/troff/dictionary.cpp +++ b/contrib/groff/src/roff/troff/dictionary.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2004 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -16,11 +17,10 @@ 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 "symbol.h" #include "dictionary.h" // is `p' a good size for a hash table @@ -209,4 +209,3 @@ int object_dictionary::alias(symbol newnm, symbol oldnm) } return 0; } - diff --git a/contrib/groff/src/roff/troff/dictionary.h b/contrib/groff/src/roff/troff/dictionary.h index 4f319be49504..2baab0ab935a 100644 --- a/contrib/groff/src/roff/troff/dictionary.h +++ b/contrib/groff/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/src/roff/troff/div.cpp b/contrib/groff/src/roff/troff/div.cpp index 1bbbe450c2aa..4cacd8da9849 100644 --- a/contrib/groff/src/roff/troff/div.cpp +++ b/contrib/groff/src/roff/troff/div.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,15 +17,16 @@ 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 #include "troff.h" -#include "symbol.h" #include "dictionary.h" #include "hvunits.h" +#include "stringclass.h" +#include "mtsm.h" #include "env.h" #include "request.h" #include "node.h" @@ -33,6 +34,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "div.h" #include "reg.h" +#include "nonposix.h" + int exit_started = 0; // the exit process has started int done_end_macro = 0; // the end macro (if any) has finished int seen_last_page_ejector = 0; // seen the LAST_PAGE_EJECTOR cookie @@ -50,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) { } @@ -96,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; @@ -115,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; @@ -201,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); @@ -256,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(); @@ -444,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(); @@ -467,7 +485,7 @@ trap::trap(symbol s, vunits n, trap *p) { } -void top_level_diversion::add_trap(symbol nm, vunits pos) +void top_level_diversion::add_trap(symbol nam, vunits pos) { trap *first_free_slot = 0; trap **p; @@ -477,22 +495,22 @@ void top_level_diversion::add_trap(symbol nm, vunits pos) first_free_slot = *p; } else if ((*p)->position == pos) { - (*p)->nm = nm; + (*p)->nm = nam; return; } } if (first_free_slot) { - first_free_slot->nm = nm; + first_free_slot->nm = nam; first_free_slot->position = pos; } else - *p = new trap(nm, pos, 0); + *p = new trap(nam, pos, 0); } -void top_level_diversion::remove_trap(symbol nm) +void top_level_diversion::remove_trap(symbol nam) { for (trap *p = page_trap_list; p; p = p->next) - if (p->nm == nm) { + if (p->nm == nam) { p->nm = NULL_SYMBOL; return; } @@ -507,10 +525,10 @@ void top_level_diversion::remove_trap_at(vunits pos) } } -void top_level_diversion::change_trap(symbol nm, vunits pos) +void top_level_diversion::change_trap(symbol nam, vunits pos) { for (trap *p = page_trap_list; p; p = p->next) - if (p->nm == nm) { + if (p->nm == nam) { p->position = pos; return; } @@ -543,6 +561,7 @@ void cleanup_and_exit(int exit_code) the_output->trailer(topdiv->get_page_length()); delete the_output; } + FLUSH_INPUT_PIPE(STDIN_FILENO); exit(exit_code); } @@ -637,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(); } @@ -667,7 +686,7 @@ void when_request() void begin_page() { int got_arg = 0; - int n; + int n = 0; /* pacify compiler */ if (has_arg() && get_integer(&n, topdiv->get_page_number())) got_arg = 1; while (!tok.newline() && !tok.eof()) @@ -730,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 @@ -756,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(); } @@ -830,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/src/roff/troff/div.h b/contrib/groff/src/roff/troff/div.h index bde41a8f8541..c9ff9b403061 100644 --- a/contrib/groff/src/roff/troff/div.h +++ b/contrib/groff/src/roff/troff/div.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002 +/* 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 { @@ -87,7 +100,7 @@ struct trap { trap(symbol, vunits, trap *); }; -struct output_file; +class output_file; class top_level_diversion : public diversion { int page_number; @@ -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; @@ -154,6 +168,5 @@ void continue_page_eject(); void handle_first_page_transition(); void blank_line(); void begin_page(); -void end_diversions(); extern void cleanup_and_exit(int); diff --git a/contrib/groff/src/roff/troff/env.cpp b/contrib/groff/src/roff/troff/env.cpp index 264b441b3fd9..9de9a46aa507 100644 --- a/contrib/groff/src/roff/troff/env.cpp +++ b/contrib/groff/src/roff/troff/env.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, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,12 +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 "symbol.h" #include "dictionary.h" #include "hvunits.h" +#include "stringclass.h" +#include "mtsm.h" #include "env.h" #include "request.h" #include "node.h" @@ -52,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; @@ -61,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; @@ -70,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 */ @@ -109,13 +114,15 @@ 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; } -void environment::output(node *nd, int no_fill, vunits vs, vunits post_vs, - hunits width) +void environment::output(node *nd, int no_fill_flag, + vunits vs, vunits post_vs, + hunits width, int was_centered) { #ifdef WIDOW_CONTROL while (pending_lines) { @@ -132,29 +139,31 @@ void environment::output(node *nd, int no_fill, vunits vs, vunits post_vs, #endif /* WIDOW_CONTROL */ if (!trap_sprung_flag && !pending_lines #ifdef WIDOW_CONTROL - && (!widow_control || no_fill) + && (!widow_control || no_fill_flag) #endif /* WIDOW_CONTROL */ ) { - curdiv->output(nd, no_fill, vs, post_vs, width); - emitted_node = 1; + curenv->construct_format_state(nd, was_centered, !no_fill_flag); + curdiv->output(nd, no_fill_flag, vs, post_vs, width); } else { pending_output_line **p; for (p = &pending_lines; *p; p = &(*p)->next) ; - *p = new pending_output_line(nd, no_fill, vs, post_vs, width); + *p = new pending_output_line(nd, no_fill_flag, vs, post_vs, width, + was_centered); } } // a line from .tl goes at the head of the queue -void environment::output_title(node *nd, int no_fill, vunits vs, - vunits post_vs, hunits width) +void environment::output_title(node *nd, int no_fill_flag, + vunits vs, vunits post_vs, + hunits width) { if (!trap_sprung_flag) - curdiv->output(nd, no_fill, vs, post_vs, width); + curdiv->output(nd, no_fill_flag, vs, post_vs, width); else - pending_lines = new pending_output_line(nd, no_fill, vs, post_vs, width, - pending_lines); + pending_lines = new pending_output_line(nd, no_fill_flag, vs, post_vs, + width, 0, pending_lines); } void environment::output_pending_lines() @@ -172,7 +181,8 @@ void environment::mark_last_line() { if (!widow_control || !pending_lines) return; - for (pending_output_line *p = pending_lines; p->next; p = p->next) + pending_output_line *p; + for (p = pending_lines; p->next; p = p->next) ; if (!p->no_fill) p->last_line = 1; @@ -264,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 @@ -279,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) @@ -302,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) { @@ -325,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 @@ -612,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), @@ -639,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('\''), @@ -702,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), @@ -729,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), @@ -816,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; @@ -1089,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; @@ -1126,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() @@ -1164,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); @@ -1232,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(); } @@ -1244,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(); } @@ -1263,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(); } @@ -1280,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(); } @@ -1297,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(); } @@ -1384,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(); } @@ -1406,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(); } @@ -1623,6 +1684,7 @@ void environment::interrupt() void environment::newline() { + int was_centered = 0; if (underline_lines > 0) { if (--underline_lines == 0) { prev_fontno = fontno; @@ -1661,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; } @@ -1688,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) { @@ -1705,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) { @@ -1764,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() @@ -2012,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 @@ -2041,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; @@ -2078,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; @@ -2141,16 +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 *name) +node *environment::make_tag(const char *nm, int i) { - if (!force && (curdiv != topdiv)) - return; - if (is_html) { /* * need to emit tag for post-grohtml @@ -2159,132 +2212,119 @@ void environment::add_html_tag(int force, const char *name) if (curdiv == topdiv && topdiv->before_first_page) topdiv->begin_page(); macro *m = new macro; - m->append_str("html-tag:"); - for (const char *p = name; *p; p++) - if (!invalid_input_char((unsigned char)*p)) - m->append(*p); - curdiv->output(new special_node(*m), 1, 0, 0, 0); - if (strcmp(name, ".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 *name, int i) -{ - 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 = name; *p; p++) + 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; + 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; +} + +void environment::construct_format_state(node *n, int was_centered, + int filling) +{ + if (is_html) { + // 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); } - } while ((t != TAB_NONE) && (l < get_line_length())); - curdiv->output(new special_node(*m), 1, 0, 0, 0); + n = n->next; + } } } -node *environment::make_html_tag(const char *name, int i) +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 = name; *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; } - return 0; } -node *environment::make_html_tag(const char *name) -{ - 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 = name; *p; p++) - if (!invalid_input_char((unsigned char)*p)) - m->append(*p); - return new special_node(*m); - } - return 0; -} +extern int global_diverted_space; -void environment::do_break(int spread) +void environment::do_break(int do_spread) { + int was_centered = 0; if (curdiv == topdiv && topdiv->before_first_page) { topdiv->begin_page(); return; @@ -2295,7 +2335,7 @@ void environment::do_break(int spread) // this is so that hyphenation works line = new space_node(H0, get_fill_color(), line); space_total++; - possibly_break_line(0, spread); + possibly_break_line(0, do_spread); } while (line != 0 && line->discardable()) { width_total -= line->width(); @@ -2311,6 +2351,7 @@ void environment::do_break(int 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; @@ -2319,7 +2360,7 @@ void environment::do_break(int 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; @@ -2327,6 +2368,10 @@ void environment::do_break(int 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() @@ -2338,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(); } @@ -2389,8 +2432,8 @@ void title() tem->next = n; n = tem; } - hunits title_length(curenv->title_length); - hunits f = title_length - part_width[1]; + hunits length_title(curenv->title_length); + hunits f = length_title - part_width[1]; hunits f2 = f/2; n = new hmotion_node(f2 - part_width[2], curenv->get_fill_color(), n); p = part[1]; @@ -2409,7 +2452,7 @@ void title() n = tem; } curenv->output_title(n, !curenv->fill, curenv->vertical_spacing, - curenv->total_post_vertical_spacing(), title_length); + curenv->total_post_vertical_spacing(), length_title); curenv->hyphen_line_count = 0; tok.next(); } @@ -2748,7 +2791,7 @@ void set_tabs() } } curenv->tabs = tabs; - curenv->add_html_tag_tabs(1); + curdiv->modified_tag.incl(MTSM_TA); skip_line(); } @@ -2859,25 +2902,25 @@ node *environment::make_tab_node(hunits d, node *next) void environment::handle_tab(int is_leader) { hunits d; - hunits abs; + hunits absolute; if (current_tab) wrap_up_tab(); charinfo *ci = is_leader ? leader_char : tab_char; delete leader_node; leader_node = ci ? make_char_node(ci) : 0; - tab_type t = distance_to_next_tab(&d, &abs); + tab_type t = distance_to_next_tab(&d, &absolute); switch (t) { 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", abs.to_units())); return; case TAB_RIGHT: - add_node(make_html_tag("tab R", abs.to_units())); + add_node(make_tag("tab R", absolute.to_units())); break; case TAB_CENTER: - add_node(make_html_tag("tab C", abs.to_units())); + add_node(make_tag("tab C", absolute.to_units())); break; default: assert(0); @@ -3091,12 +3134,28 @@ const char *environment::get_font_family_string() return family->nm.contents(); } +const char *environment::get_glyph_color_string() +{ + return glyph_color->nm.contents(); +} + +const char *environment::get_fill_color_string() +{ + return fill_color->nm.contents(); +} + const char *environment::get_font_name_string() { symbol f = get_font_name(fontno, this); 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(); @@ -3188,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); @@ -3247,6 +3308,8 @@ void init_env_requests() init_int_env_reg(".L", get_line_spacing); init_hunits_env_reg(".l", get_line_length); init_hunits_env_reg(".ll", get_saved_line_length); + init_string_env_reg(".M", get_fill_color_string); + init_string_env_reg(".m", get_glyph_color_string); init_hunits_env_reg(".n", get_prev_text_length); init_int_env_reg(".ps", get_point_size); init_int_env_reg(".psr", get_requested_point_size); @@ -3257,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); @@ -3358,7 +3422,7 @@ static void hyphen_word() pos[npos++] = i; } else { - int c = ci->get_hyphenation_code(); + unsigned char c = ci->get_hyphenation_code(); if (c == 0) break; buf[i++] = c; @@ -3661,7 +3725,8 @@ void hyphen_trie::read_patterns_file(const char *name, int append, c = hpf_getc(fp); if (c == '{') { if (have_patterns || have_hyphenation) - error("`{' not allowed inside of \\patterns or \\hyphenation"); + error("\\patterns not allowed inside of %1 group", + have_patterns ? "\\patterns" : "\\hyphenation"); else { have_patterns = 1; have_keyword = 1; @@ -3675,7 +3740,8 @@ void hyphen_trie::read_patterns_file(const char *name, int append, c = hpf_getc(fp); if (c == '{') { if (have_patterns || have_hyphenation) - error("`{' not allowed inside of \\patterns or \\hyphenation"); + error("\\hyphenation not allowed inside of %1 group", + have_patterns ? "\\patterns" : "\\hyphenation"); else { have_hyphenation = 1; have_keyword = 1; @@ -3703,8 +3769,17 @@ void hyphen_trie::read_patterns_file(const char *name, int append, } c = hpf_getc(fp); } - else if (c == '{') // skipped if not starting \patterns - c = hpf_getc(fp); // or \hyphenation + else if (c == '{') { + if (have_patterns || have_hyphenation) + error("`{' not allowed within %1 group", + have_patterns ? "\\patterns" : "\\hyphenation"); + c = hpf_getc(fp); // skipped if not starting \patterns + // or \hyphenation + } + } + else { + if (c == '{' || c == '}') + c = hpf_getc(fp); } if (i > 0) { if (have_patterns || final_pattern || traditional) { diff --git a/contrib/groff/src/roff/troff/env.h b/contrib/groff/src/roff/troff/env.h index 43a4c97f7427..2ee7bdcf3e1e 100644 --- a/contrib/groff/src/roff/troff/env.h +++ b/contrib/groff/src/roff/troff/env.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002 +/* 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; @@ -63,7 +65,7 @@ inline int font_size::to_points() return p/sizescale; } -struct environment; +class environment; hunits env_digit_width(environment *); hunits env_space_width(environment *); @@ -94,11 +96,52 @@ public: const unsigned MARGIN_CHARACTER_ON = 1; const unsigned MARGIN_CHARACTER_NEXT = 2; -struct charinfo; +class charinfo; struct node; struct breakpoint; -struct font_family; -struct pending_output_line; +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 @@ -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(); @@ -303,12 +345,18 @@ public: void space(); void space(hunits, hunits); void space_newline(); + const char *get_glyph_color_string(); + 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(); @@ -357,7 +405,6 @@ extern void push_env(int); void init_environments(); void read_hyphen_file(const char *name); -void title(); extern double spread_limit; diff --git a/contrib/groff/src/roff/troff/hvunits.h b/contrib/groff/src/roff/troff/hvunits.h index 8efb5ab35972..99e6692eb28b 100644 --- a/contrib/groff/src/roff/troff/hvunits.h +++ b/contrib/groff/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/src/roff/troff/input.cpp b/contrib/groff/src/roff/troff/input.cpp index 55178a2c23c0..15077e947fba 100644 --- a/contrib/groff/src/roff/troff/input.cpp +++ b/contrib/groff/src/roff/troff/input.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, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,24 +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 "symbol.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() @@ -63,6 +65,7 @@ extern "C" { // initial size of buffer for reading names; expanded as necessary #define ABUF_SIZE 16 +extern "C" const char *program_name; extern "C" const char *Version_string; #ifdef COLUMN @@ -71,16 +74,13 @@ void init_column_requests(); static node *read_draw_node(); static void read_color_draw_node(token &); -void handle_first_page_transition(); static void push_token(const token &); void copy_file(); #ifdef COLUMN void vjustify(); #endif /* COLUMN */ void transparent_file(); -void process_input_stack(); -const char *program_name = 0; token tok; int break_flag = 0; int color_flag = 1; // colors are on by default @@ -105,11 +105,12 @@ 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 // token::next() +int old_have_input = 0; // value of have_input right before \n int tcommand_flag = 0; int safer_flag = 1; // safer by default @@ -119,9 +120,13 @@ 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; +// Defaults to the current directory. +search_path include_search_path(0, 0, 0, 1); + static int get_copy(node**, int = 0); static void copy_mode_error(const char *, const errarg & = empty_errarg, @@ -140,19 +145,22 @@ static void interpolate_environment_variable(symbol); static symbol composite_glyph_name(symbol); static void interpolate_arg(symbol); static request_or_macro *lookup_request(symbol); -static int get_delim_number(units *, int); -static int get_delim_number(units *, int, units); +static int get_delim_number(units *, unsigned char); +static int get_delim_number(units *, unsigned char, units); static symbol do_get_long_name(int, char); -static int get_line_arg(units *res, int si, charinfo **cp); +static int get_line_arg(units *res, unsigned char si, charinfo **cp); static int read_size(int *); static symbol get_delim_name(); static void init_registers(); static void trapping_blank_line(); -struct input_iterator; +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() { @@ -192,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; @@ -211,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) {} @@ -219,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) { } @@ -413,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(); }; @@ -430,17 +450,38 @@ 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) { int res = (top->ptr < top->eptr) ? *top->ptr++ : finish_get(np); - if (res == '\n') + if (res == '\n') { + old_have_input = have_input; have_input = 0; + } return res; } @@ -453,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; @@ -468,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 (;;) { @@ -477,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; @@ -506,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--; @@ -519,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) @@ -597,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--; @@ -611,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; @@ -631,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; @@ -666,7 +760,7 @@ void next_file() input_stack::end_file(); else { errno = 0; - FILE *fp = fopen(nm.contents(), "r"); + FILE *fp = include_search_path.open_file_cautious(nm.contents()); if (!fp) error("can't open `%1': %2", nm.contents(), strerror(errno)); else @@ -684,7 +778,7 @@ void shift() skip_line(); } -static int get_char_for_escape_name(int allow_space = 0) +static char get_char_for_escape_name(int allow_space = 0) { int c = get_copy(0); switch (c) { @@ -734,7 +828,7 @@ static symbol read_long_escape_name(read_mode mode) char *buf = abuf; int buf_size = ABUF_SIZE; int i = 0; - int c; + char c; int have_char = 0; for (;;) { c = get_char_for_escape_name(have_char && mode == WITH_ARGS); @@ -784,7 +878,7 @@ static symbol read_long_escape_name(read_mode mode) static symbol read_escape_name(read_mode mode) { - int c = get_char_for_escape_name(); + char c = get_char_for_escape_name(); if (c == 0) return NULL_SYMBOL; if (c == '(') @@ -799,7 +893,7 @@ static symbol read_escape_name(read_mode mode) static symbol read_increment_and_escape_name(int *incp) { - int c = get_char_for_escape_name(); + char c = get_char_for_escape_name(); switch (c) { case 0: *incp = 0; @@ -831,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; @@ -993,6 +1109,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; int non_interpreted_char_node::same(node *nd) @@ -1010,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); @@ -1033,7 +1155,6 @@ static node *do_suppress(symbol nm); static void do_register(); dictionary color_dictionary(501); -static symbol default_symbol("default"); static color *lookup_color(symbol nm) { @@ -1057,7 +1178,7 @@ void do_glyph_color(symbol nm) if (tem) curenv->set_glyph_color(tem); else - (void)color_dictionary.lookup(nm, new color); + (void)color_dictionary.lookup(nm, new color(nm)); } } @@ -1072,7 +1193,7 @@ void do_fill_color(symbol nm) if (tem) curenv->set_fill_color(tem); else - (void)color_dictionary.lookup(nm, new color); + (void)color_dictionary.lookup(nm, new color(nm)); } } @@ -1256,8 +1377,10 @@ static void define_color() skip_line(); return; } - if (col) + if (col) { + col->nm = color_name; (void)color_dictionary.lookup(color_name, col); + } skip_line(); } @@ -1456,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) @@ -1487,6 +1611,11 @@ int token_node::force_tprint() return 0; } +int token_node::is_tag() +{ + return 0; +} + token::token() : nd(0), type(TOKEN_EMPTY) { } @@ -1548,18 +1677,28 @@ void token::next() } units x; for (;;) { - node *n; + node *n = 0; int cc = input_stack::get(&n); 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; @@ -1710,7 +1849,7 @@ void token::next() } else { handle_escape_char: - cc = input_stack::get(0); + cc = input_stack::get(&n); switch(cc) { case '(': nm = read_two_char_escape_name(); @@ -1904,11 +2043,11 @@ void token::next() if (s == 0) s = get_charinfo(cc == 'l' ? "ru" : "br"); type = TOKEN_NODE; - node *n = curenv->make_char_node(s); + node *char_node = curenv->make_char_node(s); if (cc == 'l') - nd = new hline_node(x, n); + nd = new hline_node(x, char_node); else - nd = new vline_node(x, n); + nd = new vline_node(x, char_node); return; } case 'm': @@ -2398,6 +2537,8 @@ void exit_request() void return_macro_request() { + if (has_arg() && tok.ch()) + input_stack::pop_macro(); input_stack::pop_macro(); tok.next(); } @@ -2528,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; } @@ -2590,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 { @@ -2601,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) @@ -2637,7 +2810,7 @@ void process_input_stack() } case token::TOKEN_NEWLINE: { - if (bol && !have_input + if (bol && !old_have_input && !curenv->get_prev_line_interrupted()) trapping_blank_line(); else { @@ -2962,7 +3135,7 @@ node_list::~node_list() delete_node_list(head); } -struct macro_header { +class macro_header { public: int count; char_list cl; @@ -2978,6 +3151,7 @@ macro::~macro() } macro::macro() +: is_a_diversion(0) { if (!input_stack::get_location(1, &filename, &lineno)) { filename = 0; @@ -2989,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 @@ -3008,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; } @@ -3024,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; } @@ -3110,7 +3302,7 @@ macro_header *macro_header::copy(int n) bp = bp->next; ptr = bp->s; } - int c = *ptr++; + unsigned char c = *ptr++; p->cl.append(c); if (c == 0) { p->nl.append(nd->copy()); @@ -3158,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) { @@ -3188,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) @@ -3201,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--; @@ -3390,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) @@ -3513,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); @@ -3542,6 +3747,7 @@ static void decode_args(macro_iterator *mi) c = get_copy(&n); } } + arg.append(POP_GROFFCOMP_MODE); mi->add_arg(arg); } } @@ -3563,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 == '"') { @@ -3615,8 +3821,8 @@ int macro::empty() return empty_macro == 1; } -macro_iterator::macro_iterator(symbol s, macro &m, const char *how_invoked) -: string_iterator(m, how_invoked, s), args(0), argc(0) +macro_iterator::macro_iterator(symbol s, macro &m, const char *how_called) +: string_iterator(m, how_called, s), args(0), argc(0) { } @@ -3821,12 +4027,13 @@ void read_request() } enum define_mode { DEFINE_NORMAL, DEFINE_APPEND, DEFINE_IGNORE }; -enum calling_mode { CALLING_NORMAL, CALLING_INDIRECT, CALLING_DISABLE_COMP }; +enum calling_mode { CALLING_NORMAL, CALLING_INDIRECT }; +enum comp_mode { COMP_IGNORE, COMP_DISABLE, COMP_ENABLE }; -void do_define_string(define_mode mode, calling_mode calling) +void do_define_string(define_mode mode, comp_mode comp) { symbol nm; - node *n; + node *n = 0; // pacify compiler int c; nm = get_name(1); if (nm.is_null()) { @@ -3853,8 +4060,10 @@ void do_define_string(define_mode mode, calling_mode calling) macro *mm = rm ? rm->to_macro() : 0; if (mode == DEFINE_APPEND && mm) mac = *mm; - if (calling == CALLING_DISABLE_COMP) - mac.append(COMPATIBLE_SAVE); + if (comp == COMP_DISABLE) + 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); @@ -3866,35 +4075,37 @@ void do_define_string(define_mode mode, calling_mode calling) mm = new macro; request_dictionary.define(nm, mm); } - if (calling == CALLING_DISABLE_COMP) - 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, CALLING_NORMAL); + do_define_string(DEFINE_NORMAL, + compatible_flag ? COMP_ENABLE: COMP_IGNORE); } void define_nocomp_string() { - do_define_string(DEFINE_NORMAL, CALLING_DISABLE_COMP); + do_define_string(DEFINE_NORMAL, COMP_DISABLE); } void append_string() { - do_define_string(DEFINE_APPEND, CALLING_NORMAL); + do_define_string(DEFINE_APPEND, + compatible_flag ? COMP_ENABLE : COMP_IGNORE); } void append_nocomp_string() { - do_define_string(DEFINE_APPEND, CALLING_DISABLE_COMP); + do_define_string(DEFINE_APPEND, COMP_DISABLE); } void do_define_character(char_mode mode, const char *font_name) { - node *n; + node *n = 0; // pacify compiler int c; tok.skip(); charinfo *ci = tok.get_char(1); @@ -3996,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(); @@ -4024,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 { @@ -4091,7 +4304,7 @@ void handle_initial_title() // this should be local to define_macro, but cfront 1.2 doesn't support that static symbol dot_symbol("."); -void do_define_macro(define_mode mode, calling_mode calling) +void do_define_macro(define_mode mode, calling_mode calling, comp_mode comp) { symbol nm, term; if (calling == CALLING_INDIRECT) { @@ -4140,8 +4353,10 @@ void do_define_macro(define_mode mode, calling_mode calling) mac = *mm; } int bol = 1; - if (calling == CALLING_DISABLE_COMP) - mac.append(COMPATIBLE_SAVE); + if (comp == COMP_DISABLE) + 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) @@ -4177,8 +4392,8 @@ void do_define_macro(define_mode mode, calling_mode calling) mm = new macro; request_dictionary.define(nm, mm); } - if (calling == CALLING_DISABLE_COMP) - mac.append(COMPATIBLE_RESTORE); + if (comp == COMP_DISABLE || comp == COMP_ENABLE) + mac.append(POP_GROFFCOMP_MODE); *mm = mac; } if (term != dot_symbol) { @@ -4228,38 +4443,52 @@ void do_define_macro(define_mode mode, calling_mode calling) void define_macro() { - do_define_macro(DEFINE_NORMAL, CALLING_NORMAL); + do_define_macro(DEFINE_NORMAL, CALLING_NORMAL, + compatible_flag ? COMP_ENABLE : COMP_IGNORE); } void define_nocomp_macro() { - do_define_macro(DEFINE_NORMAL, CALLING_DISABLE_COMP); + do_define_macro(DEFINE_NORMAL, CALLING_NORMAL, COMP_DISABLE); } void define_indirect_macro() { - do_define_macro(DEFINE_NORMAL, CALLING_INDIRECT); + do_define_macro(DEFINE_NORMAL, CALLING_INDIRECT, + compatible_flag ? COMP_ENABLE : COMP_IGNORE); +} + +void define_indirect_nocomp_macro() +{ + do_define_macro(DEFINE_NORMAL, CALLING_INDIRECT, COMP_DISABLE); } void append_macro() { - do_define_macro(DEFINE_APPEND, CALLING_NORMAL); -} - -void append_indirect_macro() -{ - do_define_macro(DEFINE_APPEND, CALLING_INDIRECT); + do_define_macro(DEFINE_APPEND, CALLING_NORMAL, + compatible_flag ? COMP_ENABLE : COMP_IGNORE); } void append_nocomp_macro() { - do_define_macro(DEFINE_APPEND, CALLING_DISABLE_COMP); + do_define_macro(DEFINE_APPEND, CALLING_NORMAL, COMP_DISABLE); +} + +void append_indirect_macro() +{ + do_define_macro(DEFINE_APPEND, CALLING_INDIRECT, + compatible_flag ? COMP_ENABLE : COMP_IGNORE); +} + +void append_indirect_nocomp_macro() +{ + do_define_macro(DEFINE_APPEND, CALLING_INDIRECT, COMP_DISABLE); } void ignore() { ignoring = 1; - do_define_macro(DEFINE_IGNORE, CALLING_NORMAL); + do_define_macro(DEFINE_IGNORE, CALLING_NORMAL, COMP_IGNORE); ignoring = 0; } @@ -4313,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; @@ -4328,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; } @@ -4353,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; @@ -4395,16 +4627,20 @@ 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; } macro mac; for (; i <= end; i++) { - node *nd; + 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; @@ -4470,7 +4706,7 @@ void asciify_macro() macro am; string_iterator iter(*m); for (;;) { - node *nd; + node *nd = 0; // pacify compiler int c = iter.get(&nd); if (c == EOF) break; @@ -4497,7 +4733,7 @@ void unformat_macro() macro am; string_iterator iter(*m); for (;;) { - node *nd; + node *nd = 0; // pacify compiler int c = iter.get(&nd); if (c == EOF) break; @@ -4538,7 +4774,7 @@ static void interpolate_number_format(symbol nm) input_stack::push(make_temp_iterator(r->get_format())); } -static int get_delim_number(units *n, int si, int prev_value) +static int get_delim_number(units *n, unsigned char si, int prev_value) { token start; start.next(); @@ -4553,7 +4789,7 @@ static int get_delim_number(units *n, int si, int prev_value) return 0; } -static int get_delim_number(units *n, int si) +static int get_delim_number(units *n, unsigned char si) { token start; start.next(); @@ -4568,7 +4804,7 @@ static int get_delim_number(units *n, int si) return 0; } -static int get_line_arg(units *n, int si, charinfo **cp) +static int get_line_arg(units *n, unsigned char si, charinfo **cp) { token start; start.next(); @@ -4605,7 +4841,7 @@ static int read_size(int *x) tok.next(); c = tok.ch(); } - int val; + int val = 0; // pacify compiler int bad = 0; if (c == '(') { tok.next(); @@ -4866,15 +5102,22 @@ public: non_interpreted_node(const macro &); int interpret(macro *); node *copy(); + int ends_sentence(); int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; non_interpreted_node::non_interpreted_node(const macro &m) : mac(m) { } +int non_interpreted_node::ends_sentence() +{ + return 2; +} + int non_interpreted_node::same(node *nd) { return mac == ((non_interpreted_node *)nd)->mac; @@ -4890,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); @@ -4898,7 +5146,7 @@ node *non_interpreted_node::copy() int non_interpreted_node::interpret(macro *m) { string_iterator si(mac); - node *n; + node *n = 0; // pacify compiler for (;;) { int c = si.get(&n); if (c == EOF) @@ -5247,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()) { @@ -5256,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(); @@ -5279,6 +5546,7 @@ int do_if_request() delete_node_list(n2); curenv = oldenv; have_input = 0; + suppress_push = 0; tok.next(); } else { @@ -5333,7 +5601,7 @@ void while_request() int level = 0; mac.append(new token_node(tok)); for (;;) { - node *n; + node *n = 0; // pacify compiler int c = input_stack::get(&n); if (c == EOF) break; @@ -5424,7 +5692,7 @@ void source() while (!tok.newline() && !tok.eof()) tok.next(); errno = 0; - FILE *fp = fopen(nm.contents(), "r"); + FILE *fp = include_search_path.open_file_cautious(nm.contents()); if (fp) input_stack::push(new file_iterator(fp, nm.contents())); else @@ -5663,7 +5931,8 @@ void ps_bbox_request() errno = 0; // PS files might contain non-printable characters, such as ^Z // and CRs not followed by an LF, so open them in binary mode. - FILE *fp = fopen(nm.contents(), FOPEN_RB); + FILE *fp = include_search_path.open_file_cautious(nm.contents(), + 0, FOPEN_RB); if (fp) { do_ps_file(fp, nm.contents()); fclose(fp); @@ -5737,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: @@ -5789,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) @@ -6630,7 +6946,7 @@ void transparent_file() curenv->do_break(); if (!filename.is_null()) { errno = 0; - FILE *fp = fopen(filename.contents(), "r"); + FILE *fp = include_search_path.open_file_cautious(filename.contents()); if (!fp) error("can't open `%1': %2", filename.contents(), strerror(errno)); else { @@ -6824,7 +7140,7 @@ static void process_input_file(const char *name) } else { errno = 0; - fp = fopen(name, "r"); + fp = include_search_path.open_file_cautious(name); if (!fp) fatal("can't open `%1': %2", name, strerror(errno)); } @@ -6920,7 +7236,7 @@ void usage(FILE *stream, const char *prog) { fprintf(stream, "usage: %s -abcivzCERU -wname -Wname -dcs -ffam -mname -nnum -olist\n" -" -rcn -Tname -Fdir -Mdir [files...]\n", +" -rcn -Tname -Fdir -Idir -Mdir [files...]\n", prog); } @@ -6938,7 +7254,7 @@ int main(int argc, char **argv) int fflag = 0; int nflag = 0; int no_rc = 0; // don't process troffrc and troffrc-end - int next_page_number; + int next_page_number = 0; // pacify compiler opterr = 0; hresolution = vresolution = 1; // restore $PATH if called from groff @@ -6957,8 +7273,12 @@ int main(int argc, char **argv) { "version", no_argument, 0, 'v' }, { 0, 0, 0, 0 } }; - while ((c = getopt_long(argc, argv, "abcivw: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': @@ -6967,6 +7287,11 @@ int main(int argc, char **argv) exit(0); break; } + case 'I': + // Search path for .psbb files + // and most other non-system input files. + include_search_path.command_line_dir(optarg); + break; case 'T': device = optarg; tflag = 1; @@ -7046,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); @@ -7214,6 +7544,7 @@ void init_input_requests() init_request("am", append_macro); init_request("am1", append_nocomp_macro); init_request("ami", append_indirect_macro); + init_request("ami1", append_indirect_nocomp_macro); init_request("as", append_string); init_request("as1", append_nocomp_string); init_request("asciify", asciify_macro); @@ -7233,6 +7564,7 @@ void init_input_requests() init_request("de1", define_nocomp_macro); init_request("defcolor", define_color); init_request("dei", define_indirect_macro); + init_request("dei1", define_indirect_nocomp_macro); init_request("do", do_request); init_request("ds", define_string); init_request("ds1", define_nocomp_string); @@ -7279,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); @@ -7305,6 +7639,7 @@ void init_input_requests() number_reg_dictionary.define(".g", new constant_reg("1")); number_reg_dictionary.define(".H", new constant_int_reg(&hresolution)); number_reg_dictionary.define(".R", new constant_reg("10000")); + number_reg_dictionary.define(".U", new constant_int_reg(&safer_flag)); number_reg_dictionary.define(".V", new constant_int_reg(&vresolution)); number_reg_dictionary.define(".warn", new constant_int_reg(&warning_mask)); extern const char *major_version; @@ -7514,7 +7849,7 @@ static void read_color_draw_node(token &start) } unsigned char scheme = tok.ch(); tok.next(); - color *col; + color *col = 0; char end = start.ch(); switch (scheme) { case 'c': diff --git a/contrib/groff/src/roff/troff/input.h b/contrib/groff/src/roff/troff/input.h index 8d06574e2dda..ba6e2e13d15d 100644 --- a/contrib/groff/src/roff/troff/input.h +++ b/contrib/groff/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/src/roff/troff/mtsm.cpp b/contrib/groff/src/roff/troff/mtsm.cpp new file mode 100644 index 000000000000..630e973209cd --- /dev/null +++ b/contrib/groff/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/src/roff/troff/mtsm.h b/contrib/groff/src/roff/troff/mtsm.h new file mode 100644 index 000000000000..9ef909c39bce --- /dev/null +++ b/contrib/groff/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/src/roff/troff/node.cpp b/contrib/groff/src/roff/troff/node.cpp index 73776b1b9779..0d874d35758d 100644 --- a/contrib/groff/src/roff/troff/node.cpp +++ b/contrib/groff/src/roff/troff/node.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, 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" @@ -25,20 +27,20 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #endif -#include "symbol.h" #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" @@ -59,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 @@ -112,8 +120,6 @@ struct conditional_bold { conditional_bold(int, hunits, conditional_bold * = 0); }; -struct tfont; - class font_info { tfont *last_tfont; int number; @@ -134,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(); @@ -152,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 { @@ -170,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 &); @@ -400,11 +407,19 @@ symbol get_font_name(int fontno, environment *env) return f; } -hunits font_info::get_space_width(font_size fs, int space_size) +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) return scale(hunits(fm->get_space_width(fs.to_scaled_points())), - space_size, 12); + space_sz, 12); else if (is_constant_spaced == CONSTANT_SPACE_ABSOLUTE) return constant_space; else @@ -681,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(); @@ -751,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); @@ -787,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 *); }; @@ -864,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; } @@ -987,7 +1027,7 @@ void troff_output_file::put_char_width(charinfo *ci, tfont *tf, return; } set_font(tf); - char c = ci->get_ascii_code(); + unsigned char c = ci->get_ascii_code(); if (c == '\0') { glyph_color(gcol); fill_color(fcol); @@ -1065,7 +1105,7 @@ void troff_output_file::put_char(charinfo *ci, tfont *tf, if (!is_on()) return; set_font(tf); - char c = ci->get_ascii_code(); + unsigned char c = ci->get_ascii_code(); if (c == '\0') { glyph_color(gcol); fill_color(fcol); @@ -1275,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, @@ -1456,13 +1506,14 @@ void troff_output_file::really_begin_page(int pageno, vunits page_length) put('\n'); } -void troff_output_file::really_copy_file(hunits x, vunits y, const char *filename) +void troff_output_file::really_copy_file(hunits x, vunits y, + const char *filename) { moveto(x, y); flush_tbuf(); do_motion(); errno = 0; - FILE *ifp = fopen(filename, "r"); + FILE *ifp = include_search_path.open_file_cautious(filename); if (ifp == 0) error("can't open `%1': %2", filename, strerror(errno)); else { @@ -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; @@ -2437,9 +2560,9 @@ hunits dbreak_node::width() node *dbreak_node::last_char_node() { for (node *n = none; n; n = n->next) { - node *last = n->last_char_node(); - if (last) - return last; + node *last_node = n->last_char_node(); + if (last_node) + return last_node; } return 0; } @@ -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,9 +2603,10 @@ public: node *add_self(node *, hyphen_list **); const char *type(); int force_tprint(); + int is_tag(); }; -node *node::add_italic_correction(hunits *width) +node *node::add_italic_correction(hunits *wd) { hunits ic = italic_correction(); if (ic.is_zero()) @@ -2490,13 +2614,14 @@ node *node::add_italic_correction(hunits *width) else { node *next1 = next; next = 0; - *width += ic; - return new italic_corrected_node(this, ic, next1); + *wd += ic; + 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,17 +3082,17 @@ bracket_node::~bracket_node() node *bracket_node::copy() { - bracket_node *on = new bracket_node; - node *last = 0; + bracket_node *on = new bracket_node(state, div_nest_level); + node *last_node = 0; node *tem; if (list) list->last = 0; for (tem = list; tem; tem = tem->next) { if (tem->next) tem->next->last = tem; - last = tem; + last_node = tem; } - for (tem = last; tem; tem = tem->last) + for (tem = last_node; tem; tem = tem->last) on->bracket(tem->copy()); return on; } @@ -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; @@ -2994,20 +3207,20 @@ void node::spread_space(int*, hunits*) { } -void space_node::spread_space(int *nspaces, hunits *desired_space) +void space_node::spread_space(int *n_spaces, hunits *desired_space) { if (!set) { - assert(*nspaces > 0); - if (*nspaces == 1) { + assert(*n_spaces > 0); + if (*n_spaces == 1) { n += *desired_space; *desired_space = H0; } else { - hunits extra = *desired_space / *nspaces; + hunits extra = *desired_space / *n_spaces; *desired_space -= extra; n += extra; } - *nspaces -= 1; + *n_spaces -= 1; set = 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, - node *next) -: hmotion_node(i, c, next) + statem *s, int pop, + node *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) { } @@ -3393,14 +3625,14 @@ int node::nbreaks() return 0; } -breakpoint *space_node::get_breakpoints(hunits width, int ns, +breakpoint *space_node::get_breakpoints(hunits wd, int ns, breakpoint *rest, int is_inner) { - if (next->discardable()) + if (next && next->discardable()) return rest; breakpoint *bp = new breakpoint; bp->next = rest; - bp->width = width; + bp->width = wd; bp->nspaces = ns; bp->hyphenated = 0; if (is_inner) { @@ -3417,7 +3649,7 @@ breakpoint *space_node::get_breakpoints(hunits width, int ns, int space_node::nbreaks() { - if (next->discardable()) + if (next && next->discardable()) return 0; else return 1; @@ -3437,12 +3669,12 @@ static breakpoint *node_list_get_breakpoints(node *p, hunits *widthp, return rest; } -breakpoint *dbreak_node::get_breakpoints(hunits width, int ns, +breakpoint *dbreak_node::get_breakpoints(hunits wd, int ns, breakpoint *rest, int is_inner) { breakpoint *bp = new breakpoint; bp->next = rest; - bp->width = width; + bp->width = wd; for (node *tem = pre; tem != 0; tem = tem->next) bp->width += tem->width(); bp->nspaces = ns; @@ -3456,7 +3688,7 @@ breakpoint *dbreak_node::get_breakpoints(hunits width, int ns, bp->nd = this; bp->index = 0; } - return node_list_get_breakpoints(none, &width, ns, bp); + return node_list_get_breakpoints(none, &wd, ns, bp); } int dbreak_node::nbreaks() @@ -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) @@ -3761,10 +4065,10 @@ void suppress_node::tprint(troff_output_file *out) if (is_on == 2) { // remember position and filename last_position = position; - const char *tem = last_image_filename; + char *tem = (char *)last_image_filename; last_image_filename = strsave(filename.contents()); if (tem) - a_delete(tem); + a_delete tem; last_image_id = image_id; // printf("start of image and page = %d\n", current_page); } @@ -3774,20 +4078,23 @@ void suppress_node::tprint(troff_output_file *out) char name[8192]; // remember that the filename will contain a %d in which the // last_image_id is placed - sprintf(name, last_image_filename, last_image_id); + if (last_image_filename == (char *) 0) + *name = '\0'; + else + sprintf(name, last_image_filename, last_image_id); if (is_html) { 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': ; @@ -3796,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(); } @@ -3840,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; @@ -3851,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(); @@ -3867,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) { } @@ -3883,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() @@ -3983,10 +4297,10 @@ node *reverse_node_list(node *n) return r; } -void composite_node::vertical_extent(vunits *min, vunits *max) +void composite_node::vertical_extent(vunits *minimum, vunits *maximum) { n = reverse_node_list(n); - node_list_vertical_extent(n, min, max); + node_list_vertical_extent(n, minimum, maximum); n = reverse_node_list(n); } @@ -4006,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) { } @@ -4033,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() @@ -4066,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() @@ -4081,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) { @@ -4115,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; @@ -4137,6 +4467,11 @@ int draw_node::force_tprint() return 0; } +int draw_node::is_tag() +{ + return 0; +} + draw_node::~draw_node() { if (point) @@ -4163,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) @@ -4498,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) @@ -4584,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) @@ -4630,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()) { @@ -4660,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); @@ -4680,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; @@ -4736,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; @@ -4756,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 @@ -4778,9 +5131,14 @@ int hmotion_node::force_tprint() return 0; } -node *hmotion_node::add_self(node *n, hyphen_list **p) +int hmotion_node::is_tag() { - next = n; + return 0; +} + +node *hmotion_node::add_self(node *nd, hyphen_list **p) +{ + next = nd; hyphen_list *pp = *p; *p = (*p)->next; delete pp; @@ -4808,9 +5166,14 @@ int space_char_hmotion_node::force_tprint() return 0; } -node *space_char_hmotion_node::add_self(node *n, hyphen_list **p) +int space_char_hmotion_node::is_tag() { - next = n; + return 0; +} + +node *space_char_hmotion_node::add_self(node *nd, hyphen_list **p) +{ + next = nd; hyphen_list *pp = *p; *p = (*p)->next; delete pp; @@ -4839,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); @@ -4854,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); @@ -4869,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; @@ -4884,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; @@ -4899,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; @@ -4919,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 @@ -4935,8 +5328,19 @@ int italic_corrected_node::force_tprint() return 0; } -left_italic_corrected_node::left_italic_corrected_node(node *x) -: node(x), n(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) { } @@ -4968,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; @@ -4994,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 @@ -5011,12 +5421,13 @@ hunits left_italic_corrected_node::width() return n ? n->width() + x : H0; } -void left_italic_corrected_node::vertical_extent(vunits *min, vunits *max) +void left_italic_corrected_node::vertical_extent(vunits *minimum, + vunits *maximum) { if (n) - n->vertical_extent(min, max); + n->vertical_extent(minimum, maximum); else - node::vertical_extent(min, max); + node::vertical_extent(minimum, maximum); } hunits left_italic_corrected_node::skew() @@ -5076,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; @@ -5104,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; @@ -5133,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 @@ -5149,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 @@ -5167,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) @@ -5184,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 @@ -5201,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) @@ -5218,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 @@ -5235,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; @@ -5250,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 @@ -5279,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); @@ -5305,9 +5766,9 @@ const char *unbreakable_space_node::type() return "unbreakable_space_node"; } -node *unbreakable_space_node::add_self(node *n, hyphen_list **p) +node *unbreakable_space_node::add_self(node *nd, hyphen_list **p) { - next = n; + next = nd; hyphen_list *pp = *p; *p = (*p)->next; delete pp; @@ -5334,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; @@ -5349,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) @@ -5378,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 @@ -5388,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()); @@ -5405,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"); @@ -5430,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); @@ -5555,13 +6044,13 @@ void font_family::invalidate_fontno(int n) { assert(n >= 0 && n < font_table_size); dictionary_iterator iter(family_dictionary); - symbol nm; + symbol nam; font_family *fam; - while (iter.get(&nm, (void **)&fam)) { - int map_size = fam->map_size; - if (n < map_size) + while (iter.get(&nam, (void **)&fam)) { + int mapsize = fam->map_size; + if (n < mapsize) fam->map[n] = -1; - for (int i = 0; i < map_size; i++) + for (int i = 0; i < mapsize; i++) if (fam->map[i] == n) fam->map[i] = -1; } diff --git a/contrib/groff/src/roff/troff/node.h b/contrib/groff/src/roff/troff/node.h index 54f8822aa3bd..c7c8b4188c7e 100644 --- a/contrib/groff/src/roff/troff/node.h +++ b/contrib/groff/src/roff/troff/node.h @@ -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, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,8 +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; @@ -36,7 +35,7 @@ class ascii_output_file; struct breakpoint; struct vertical_size; -struct charinfo; +class charinfo; class macro; @@ -51,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(); @@ -68,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(); @@ -82,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(); @@ -106,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() { } @@ -141,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 *); }; @@ -157,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(); @@ -173,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 *); @@ -182,6 +197,7 @@ public: void asciify(macro *); const char *type(); int force_tprint(); + int is_tag(); hyphenation_type get_hyphenation_type(); }; @@ -197,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(); @@ -210,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(); @@ -223,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); @@ -236,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(); @@ -278,6 +303,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; class hmotion_node : public node { @@ -287,10 +313,16 @@ protected: unsigned char unformat; color *col; /* for grotty */ public: - hmotion_node(hunits i, color *c, node *next = 0) - : node(next), n(i), was_tab(0), unformat(0), col(c) {} - hmotion_node(hunits i, int flag1, int flag2, color *c, node *next = 0) - : node(next), n(i), was_tab(flag1), unformat(flag2), col(c) {} + 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(); int reread(int *); int set_unformat_flag(); @@ -301,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(); @@ -309,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 *); @@ -316,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(); @@ -325,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 *next = 0) : node(next), x(i), n(c) {} + hline_node(hunits, node *, node * = 0); + hline_node(hunits, node *, statem *, int, node * = 0); ~hline_node(); node *copy(); hunits width(); @@ -346,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 *next= 0) : node(next), 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 *); @@ -362,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) {} @@ -372,6 +412,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); hyphenation_type get_hyphenation_type(); }; @@ -382,6 +423,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); int ends_sentence(); hyphenation_type get_hyphenation_type(); }; @@ -389,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 { @@ -406,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 *); @@ -414,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 *); @@ -436,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 *); @@ -444,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(); @@ -454,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 *); @@ -462,6 +511,7 @@ public: int same(node *); const char *type(); int force_tprint(); + int is_tag(); }; class special_node : public node { @@ -475,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(); }; @@ -493,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 { @@ -520,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(); @@ -528,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) @@ -547,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 *); @@ -560,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, @@ -568,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 @@ -582,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; @@ -597,3 +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/src/roff/troff/number.cpp b/contrib/groff/src/roff/troff/number.cpp index 8fed342e0cf2..0a4563e4b31e 100644 --- a/contrib/groff/src/roff/troff/number.cpp +++ b/contrib/groff/src/roff/troff/number.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002 +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,12 +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 "symbol.h" #include "hvunits.h" +#include "stringclass.h" +#include "mtsm.h" #include "env.h" #include "token.h" #include "div.h" diff --git a/contrib/groff/src/roff/troff/reg.cpp b/contrib/groff/src/roff/troff/reg.cpp index 8ac20c9b437d..4501090a5ffe 100644 --- a/contrib/groff/src/roff/troff/reg.cpp +++ b/contrib/groff/src/roff/troff/reg.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,10 +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. */ #include "troff.h" -#include "symbol.h" #include "dictionary.h" #include "token.h" #include "request.h" diff --git a/contrib/groff/src/roff/troff/reg.h b/contrib/groff/src/roff/troff/reg.h index 950be4f8b68f..bc2c3f2d44ff 100644 --- a/contrib/groff/src/roff/troff/reg.h +++ b/contrib/groff/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/src/roff/troff/request.h b/contrib/groff/src/roff/troff/request.h index 0433ac1b56a0..24d25890fcde 100644 --- a/contrib/groff/src/roff/troff/request.h +++ b/contrib/groff/src/roff/troff/request.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 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. */ typedef void (*REQUEST_FUNCP)(); @@ -41,19 +41,21 @@ void delete_request_or_macro(request_or_macro *); extern object_dictionary request_dictionary; -struct macro_header; +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/src/roff/troff/token.h b/contrib/groff/src/roff/troff/token.h index 9f5b069bbc8c..6493976073ff 100644 --- a/contrib/groff/src/roff/troff/token.h +++ b/contrib/groff/src/roff/troff/token.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -17,12 +17,12 @@ 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 charinfo; +class charinfo; struct node; -struct vunits; +class vunits; class token { symbol nm; @@ -121,7 +121,7 @@ enum char_mode { extern void do_define_character(char_mode, const char * = 0); -struct hunits; +class hunits; extern void read_title_parts(node **part, hunits *part_width); extern int get_number_rigidly(units *result, unsigned char si); diff --git a/contrib/groff/src/roff/troff/troff.h b/contrib/groff/src/roff/troff/troff.h index 80d9f0b0891a..661b3ed0595a 100644 --- a/contrib/groff/src/roff/troff/troff.h +++ b/contrib/groff/src/roff/troff/troff.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 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 "lib.h" @@ -33,8 +33,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "device.h" #include "searchpath.h" -void cleanup_and_exit(int n); - typedef int units; extern units scale(units n, units x, units y); // scale n by x/y @@ -82,7 +80,7 @@ enum warning_type { // change WARN_TOTAL if you add more warning types }; -const int WARN_TOTAL = 02777777; +const int WARN_TOTAL = 03777777; int warning(warning_type, const char *, const errarg & = empty_errarg, diff --git a/contrib/groff/src/roff/troff/troff.man b/contrib/groff/src/roff/troff/troff.man index dce81dd46873..064a03fa7d46 100644 --- a/contrib/groff/src/roff/troff/troff.man +++ b/contrib/groff/src/roff/troff/troff.man @@ -2,11 +2,11 @@ .ig troff.man -Last update : 09 Dec 2002 +Last update : 12 Oct 2003 This file is part of groff, the GNU roff type-setting system. -Copyright (C) 1989, 2000, 2001, 2002 Free Software Foundation, Inc. +Copyright (C) 1989, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. written by James Clark @@ -28,6 +28,9 @@ FDL in the main directory of the groff source package. .\" Setup .\" -------------------------------------------------------------------- . +.do nr troff_C \n[.C] +.cp 0 +. .mso www.tmac . .if n \{\ @@ -81,6 +84,7 @@ FDL in the main directory of the groff source package. .OP \-d cs .OP \-f fam .OP \-F dir +.OP \-I dir .OP \-m name .OP \-M dir .OP \-n num @@ -195,6 +199,17 @@ Read the standard input after all the named input files have been processed. . .TP +.BI \-I dir +This option may be used to specify a directory to search for +files (both those on the command line and those named in +.B \&.psbb +requests). +The current directory is always searched first. +This option may be specified more than once; +the directories will be searched in the order specified. +No directory search is performed for files specified using an absolute path. +. +.TP .BI \-m name Read in the file .IB name .tmac\fR. @@ -607,7 +622,7 @@ necessary. .SH AUTHOR .\" -------------------------------------------------------------------- . -Copyright (C) 1989, 2001, 2002 Free Software Foundation, Inc. +Copyright (C) 1989, 2001, 2002, 2003 Free Software Foundation, Inc. . .P This document is distributed under the terms of the FDL (GNU Free @@ -679,6 +694,7 @@ cf.\& .BR info (@MAN1EXT@), presents all groff documentation within a single document. . +.cp \n[troff_C] . .\" -------------------------------------------------------------------- .\" Emacs variables diff --git a/contrib/groff/src/utils/addftinfo/addftinfo.cpp b/contrib/groff/src/utils/addftinfo/addftinfo.cpp index 931d8365324e..b2fd15dbf88a 100644 --- a/contrib/groff/src/utils/addftinfo/addftinfo.cpp +++ b/contrib/groff/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/src/utils/addftinfo/guess.cpp b/contrib/groff/src/utils/addftinfo/guess.cpp index dcfd4c92cb9b..7ae36dcdecf7 100644 --- a/contrib/groff/src/utils/addftinfo/guess.cpp +++ b/contrib/groff/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/src/utils/addftinfo/guess.h b/contrib/groff/src/utils/addftinfo/guess.h index 4471dda8d9a6..26f0883e8df8 100644 --- a/contrib/groff/src/utils/addftinfo/guess.h +++ b/contrib/groff/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/src/utils/afmtodit/Makefile.sub b/contrib/groff/src/utils/afmtodit/Makefile.sub index c1de91b1b785..53afc74bfa40 100644 --- a/contrib/groff/src/utils/afmtodit/Makefile.sub +++ b/contrib/groff/src/utils/afmtodit/Makefile.sub @@ -12,7 +12,7 @@ afmtodit: afmtodit.pl else \ sed -e "s|@VERSION@|$(version)$(revision)|" \ -e "s|@FONTDIR@|$(fontdir)|" \ - $(srcdir)/afmtodit.pl afmtodit; \ + $(srcdir)/afmtodit.pl >afmtodit; \ fi chmod +x afmtodit diff --git a/contrib/groff/src/utils/afmtodit/afmtodit.man b/contrib/groff/src/utils/afmtodit/afmtodit.man index 88198c940a4c..978de344ea06 100644 --- a/contrib/groff/src/utils/afmtodit/afmtodit.man +++ b/contrib/groff/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 @@ -21,8 +21,13 @@ 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" +.. +. +.de OP +. ie \\n(.$-1 .RI "[\ \fB\\$1\fP\ " "\\$2" "\ ]" +. el .RB "[\ " "\\$1" "\ ]" .. . . @@ -40,12 +45,7 @@ afmtodit \- create font files for use with groff \-Tps .in +\w'\fBafmtodit 'u .ti \niu .B afmtodit -.de OP -.ie \\n(.$-1 .RI "[\ \fB\\$1\fP\ " "\\$2" "\ ]" -.el .RB "[\ " "\\$1" "\ ]" -.. -. -.OP \-mnsv +.OP \-mnsvx .OP \-a n .OP \-d desc_file .OP \-e enc_file @@ -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 @@ -104,24 +104,26 @@ If the file isn't found in the current directory, it is searched in the `devps/generate' subdirectory of the default font directory. . .LP -If a PostScript character is in the encoding to be used for the font -but is not mentioned in +If a PostScript character is not named as +.BI uni XXXX +.RI ( XXXX +are four uppercase hexadecimal digits), and is not mentioned in .IR map_file , -or if a generic groff glyph name can't be deduced using the Adobe Glyph -List (built into -.BR afmtodit ) +and a generic groff glyph name can't be deduced using the +Adobe Glyph List (AGL, built into +.BR afmtodit ), then .B afmtodit -will put it in the groff font file as an unnamed character, -which can be accessed by the +puts the PostScript character into the groff font file as an unnamed +character which can only be accessed by the .B \eN escape sequence in .BR troff . . If option .B \-e -is not specified, the encoding defined in the AFM file (i.e., entries with -non-negative character codes) is used. +is not specified, the encoding defined in the AFM file (i.e., entries +with non-negative character codes) is used. . Please refer to section `Using Symbols' in the groff info file which describes how groff glyph names are constructed. @@ -293,6 +295,10 @@ command to the font file. .B \-v Print version. . +.TP +.B \-x +Don't use the built-in Adobe Glyph List. +. . .SH FILES .Tp \w'\fB@FONTDIR@/devps/download'u+2n diff --git a/contrib/groff/src/utils/afmtodit/afmtodit.pl b/contrib/groff/src/utils/afmtodit/afmtodit.pl index 72a486b33907..0ff85de2ae93 100644 --- a/contrib/groff/src/utils/afmtodit/afmtodit.pl +++ b/contrib/groff/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@"; -do 'getopts.pl'; -do Getopts('a:d:e:i:mnsv'); +use Getopt::Std; +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"; @@ -6054,24 +6060,36 @@ if ($opt_v) { } if ($#ARGV != 2) { - die "usage: $prog [-mnsv] [-a angle] [-d DESC] [-e encoding]\n" . + die "usage: $prog [-mnsvx] [-a angle] [-d DESC] [-e encoding]\n" . " [-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 = ""; - %ligs = (); - $lly = 0; - $ury = 0; - $llx = 0; - $urx = 0; - $c = $field[1]; - $i = 2; + my $w; + my $wx = 0; + my $n = ""; +# %ligs = (); + 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]; @@ -6125,10 +6144,10 @@ while () { $ury = $field[$i + 4]; $i += 5; } - elsif ($field[$i] eq "L") { - $ligs{$field[$i + 2]} = $field[$i + 1]; - $i += 3; - } +# elsif ($field[$i] eq "L") { +# $ligs{$field[$i + 2]} = $field[$i + 1]; +# $i += 3; +# } else { while ($i <= $#field && $field[$i] ne ";") { $i++; @@ -6145,9 +6164,9 @@ while () { $depth{$n} = -$lly; $left_side_bearing{$n} = -$llx; $right_side_bearing{$n} = $urx - $w; - while (($lig, $glyph2) = each %ligs) { - $ligatures{$lig} = $n . " " . $glyph2; - } +# 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,32 +6263,142 @@ close(MAP); $italic_angle = $opt_a if $opt_a; -# add unencoded characters -$i = ($#encoding > 256) ? ($#encoding + 1) : 256; -while ($ch = each %width) { - if (!$in_encoding{$ch}) { - $encoding[$i] = $ch; - $i++; - if (!$nmap{$ch}) { - $nmap{$ch} += 1; - $u1 = $AGL_to_unicode{$ch}; - if ($u1) { - $u2 = $unicode_decomposed{$u1}; - $u = $u2 ? $u2 : $u1; +if (!$opt_x) { + 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}) { + 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 { - $u = "---"; + } + 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); + } + $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", @@ -6256,7 +6406,7 @@ while ($ch = each %width) { "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; } @@ -6271,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"); @@ -6290,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])); } } } @@ -6308,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"}) { @@ -6336,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; @@ -6372,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/src/utils/hpftodit/Makefile.sub b/contrib/groff/src/utils/hpftodit/Makefile.sub index d83188c5ecd5..6e80b474b4c3 100644 --- a/contrib/groff/src/utils/hpftodit/Makefile.sub +++ b/contrib/groff/src/utils/hpftodit/Makefile.sub @@ -2,5 +2,7 @@ PROG=hpftodit$(EXEEXT) MAN1=hpftodit.n XLIBS=$(LIBGROFF) MLIB=$(LIBM) -OBJS=hpftodit.$(OBJEXT) -CCSRCS=$(srcdir)/hpftodit.cpp +OBJS=hpftodit.$(OBJEXT) \ + hpuni.$(OBJEXT) +CCSRCS=$(srcdir)/hpftodit.cpp \ + $(srcdir)/hpuni.cpp diff --git a/contrib/groff/src/utils/hpftodit/hpftodit.cpp b/contrib/groff/src/utils/hpftodit/hpftodit.cpp index fe512b61355c..5910fb2f39e6 100644 --- a/contrib/groff/src/utils/hpftodit/hpftodit.cpp +++ b/contrib/groff/src/utils/hpftodit/hpftodit.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1994, 2000, 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1994, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -16,21 +16,21 @@ 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 -put human readable font name in device file devise new names for useful characters -use --- for unnamed characters option to specify symbol sets to look in -make it work with TrueType fonts put filename in error messages (or fix lib) */ #include "lib.h" +#include #include +#include +#include #include #include #include "assert.h" @@ -39,17 +39,31 @@ put filename in error messages (or fix lib) #include "error.h" #include "cset.h" #include "nonposix.h" +#include "unicode.h" extern "C" const char *Version_string; +extern const char *hp_msl_to_unicode_code(const char *); #define SIZEOF(v) (sizeof(v)/sizeof(v[0])) +#define equal(a, b) (strcmp(a, b) == 0) +// only valid if is_uname(c) has returned true +#define is_decomposed(c) strchr(c, '_') -const int MULTIPLIER = 3; +#define NO 0 +#define YES 1 + +#define MSL 0 +#define SYMSET 1 +#define UNICODE 2 + +#define UNNAMED "---" + +static double multiplier = 3.0; // make Agfa-based unitwidth an integer inline int scale(int n) { - return n * MULTIPLIER; + return int(n * multiplier + 0.5); } // tags in TFM file @@ -57,39 +71,67 @@ int scale(int n) enum tag_type { min_tag = 400, type_tag = 400, + copyright_tag = 401, + comment_tag = 402, + charcode_tag = 403, // MSL for Intellifont, Unicode for TrueType symbol_set_tag = 404, - msl_tag = 403, + unique_identifier_tag = 405, inches_per_point_tag = 406, + nominal_point_size_tag = 407, design_units_per_em_tag = 408, posture_tag = 409, + type_structure_tag = 410, stroke_weight_tag = 411, spacing_tag = 412, slant_tag = 413, appearance_width_tag = 414, + serif_style_tag = 415, + font_name_tag = 417, + typeface_source_tag = 418, + average_width_tag = 419, + max_width_tag = 420, word_spacing_tag = 421, + recommended_line_spacing_tag = 422, + cap_height_tag = 423, x_height_tag = 424, + max_ascent_tag = 425, + max_descent_tag = 426, lower_ascent_tag = 427, lower_descent_tag = 428, + underscore_depth_tag = 429, + underscore_thickness_tag = 430, + uppercase_accent_height_tag = 431, + lowercase_accent_height_tag = 432, width_tag = 433, + vertical_escapement_tag = 434, left_extent_tag = 435, right_extent_tag = 436, ascent_tag = 437, descent_tag = 438, pair_kern_tag = 439, + sector_kern_tag = 440, + track_kern_tag = 441, typeface_tag = 442, + panose_tag = 443, max_tag = 443 - }; +}; + +const char *tag_name[] = { + "Symbol Set", + "Font Type" // MSL for Intellifont, Unicode for TrueType +}; // types in TFM file - enum { - ENUM_TYPE = 1, - BYTE_TYPE = 2, + BYTE_TYPE = 1, + ASCII_TYPE = 2, // NUL-terminated string USHORT_TYPE = 3, - FLOAT_TYPE = 5, - SIGNED_SHORT_TYPE = 17 - }; - + LONG_TYPE = 4, // unused + RATIONAL_TYPE = 5, // 8-byte numerator + 8-byte denominator + SIGNED_BYTE_TYPE = 16, // unused + SIGNED_SHORT_TYPE = 17, + SIGNED_LONG_TYPE = 18 // unused +}; typedef unsigned char byte; typedef unsigned short uint16; @@ -103,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_; @@ -115,11 +158,12 @@ struct entry { uint16 type; uint32 count; uint32 value; + char orig_value[4]; entry() : present(0) { } }; struct char_info { - uint16 msl; + uint16 charcode; uint16 width; int16 ascent; int16 descent; @@ -129,6 +173,7 @@ struct char_info { unsigned char code; }; +const uint16 NO_GLYPH = 0xffff; const uint16 NO_SYMBOL_SET = 0; struct name_list { @@ -146,43 +191,74 @@ struct symbol_set { #define SYMBOL_SET(n, c) ((n) * 32 + ((c) - 64)) uint16 text_symbol_sets[] = { - SYMBOL_SET(0, 'N'), // Latin 1 + SYMBOL_SET(19, 'U'), // Windows Latin 1 ("ANSI", code page 1252) + SYMBOL_SET(9, 'E'), // Windows Latin 2, Code Page 1250 + SYMBOL_SET(5, 'T'), // Code Page 1254 + SYMBOL_SET(7, 'J'), // Desktop SYMBOL_SET(6, 'J'), // Microsoft Publishing - SYMBOL_SET(2, 'N'), // Latin 2 + SYMBOL_SET(0, 'N'), // Latin 1 (subset of 19U, + // so we should never get here) + SYMBOL_SET(2, 'N'), // Latin 2 (subset of 9E, + // so we should never get here) + SYMBOL_SET(8, 'U'), // HP Roman 8 + SYMBOL_SET(10, 'J'), // PS Standard + SYMBOL_SET(9, 'U'), // Windows 3.0 "ANSI" + SYMBOL_SET(1, 'U'), // U.S. Legal + + SYMBOL_SET(12, 'J'), // MC Text + SYMBOL_SET(10, 'U'), // PC Code Page 437 + SYMBOL_SET(11, 'U'), // PC Code Page 437N + SYMBOL_SET(17, 'U'), // PC Code Page 852 + SYMBOL_SET(12, 'U'), // PC Code Page 850 + SYMBOL_SET(9, 'T'), // PC Code Page 437T 0 - }; +}; uint16 special_symbol_sets[] = { - SYMBOL_SET(8, 'M'), - SYMBOL_SET(5, 'M'), - SYMBOL_SET(15, 'U'), + SYMBOL_SET(8, 'M'), // Math 8 + SYMBOL_SET(5, 'M'), // PS Math + SYMBOL_SET(15, 'U'), // Pi font + SYMBOL_SET(13, 'J'), // Ventura International + SYMBOL_SET(19, 'M'), // Symbol font + SYMBOL_SET(579, 'L'), // Wingdings 0 - }; +}; entry tags[max_tag + 1 - min_tag]; char_info *char_table; -uint32 nchars; +uint32 nchars = 0; -unsigned int msl_name_table_size = 0; -name_list **msl_name_table = 0; +unsigned int charcode_name_table_size = 0; +name_list **charcode_name_table = NULL; -unsigned int n_symbol_sets; symbol_set *symbol_set_table; +unsigned int n_symbol_sets; -static int special_flag = 0; -static int italic_flag = 0; +static int debug_flag = NO; +static int special_flag = NO; // not a special font +static int italic_flag = NO; // don't add italic correction static int italic_sep; +static int all_flag = NO; // don't include glyphs not in mapfile +static int quiet_flag = NO; // don't suppress warnings about symbols not found -static void usage(FILE *stream); +static char *hp_msl_to_ucode_name(int); +static char *unicode_to_ucode_name(int); +static int is_uname(char *); +static char *show_symset(unsigned int); +static void usage(FILE *); static void usage(); static const char *xbasename(const char *); static void read_tags(File &); -static void check_type(); -static void check_units(File &); -static int read_map(const char *); +static int check_type(); +static void check_units(File &, const int, double *, double *); +static int read_map(const char *, const int); static void require_tag(tag_type); -static void dump_tags(File &f); +static void dump_ascii(File &, tag_type); +static void dump_tags(File &); +static void dump_symbol_sets(File &); +static void dump_symbols(int); +static void output_font_name(File &); static void output_spacewidth(); static void output_pclweight(); static void output_pclproportional(); @@ -192,8 +268,8 @@ static void output_slant(); static void output_ligatures(); static void read_symbol_sets(File &); static void read_and_output_kernpairs(File &); -static void output_charset(); -static void read_char_table(File &f); +static void output_charset(const int); +static void read_char_table(File &); inline entry &tag_info(tag_type t) @@ -201,35 +277,44 @@ entry &tag_info(tag_type t) return tags[t - min_tag]; } -int main(int argc, char **argv) +int +main(int argc, char **argv) { program_name = argv[0]; int opt; - int debug_flag = 0; + int res = 1200; // PCL unit of measure for cursor moves + int scalesize = 4; // LaserJet 4 only allows 1/4 point increments + int unitwidth = 6350; + double ppi; // points per inch + double upem; // design units per em static const struct option long_options[] = { { "help", no_argument, 0, CHAR_MAX + 1 }, { "version", no_argument, 0, 'v' }, { NULL, 0, 0, 0 } }; - while ((opt = getopt_long(argc, argv, "dsvi:", long_options, NULL)) != EOF) { + while ((opt = getopt_long(argc, argv, "adsqvi:", long_options, NULL)) != EOF) { switch (opt) { + case 'a': + all_flag = YES; + break; case 'd': - debug_flag = 1; + debug_flag = YES; break; case 's': - special_flag = 1; + special_flag = YES; break; case 'i': - italic_flag = 1; - italic_sep = atoi(optarg); + italic_flag = YES; + italic_sep = atoi(optarg); // design units + break; + case 'q': + quiet_flag = YES; // suppress warnings about symbols not found break; case 'v': - { - printf("GNU hpftodit (groff) version %s\n", Version_string); - exit(0); - } + printf("GNU hpftodit (groff) version %s\n", Version_string); + exit(0); break; case CHAR_MAX + 1: // --help usage(stdout); @@ -242,46 +327,72 @@ int main(int argc, char **argv) assert(0); } } - if (argc - optind != 3) + + if (debug_flag && argc - optind < 1) + usage(); + else if (!debug_flag && argc - optind != 3) usage(); File f(argv[optind]); - if (!read_map(argv[optind + 1])) - exit(1); - current_filename = 0; - current_lineno = -1; // no line numbers - if (freopen(argv[optind + 2], "w", stdout) == 0) - fatal("cannot open `%1': %2", argv[optind + 2], strerror(errno)); - current_filename = argv[optind]; - printf("name %s\n", xbasename(argv[optind + 2])); - if (special_flag) - printf("special\n"); read_tags(f); - check_type(); - check_units(f); + int tfm_type = check_type(); if (debug_flag) dump_tags(f); + if (!debug_flag && !read_map(argv[optind + 1], tfm_type)) + exit(1); + else if (debug_flag && argc - optind > 1) + read_map(argv[optind + 1], tfm_type); + current_filename = NULL; + current_lineno = -1; // no line numbers + if (!debug_flag && !equal(argv[optind + 2], "-")) + if (freopen(argv[optind + 2], "w", stdout) == NULL) + fatal("cannot open `%1': %2", argv[optind + 2], strerror(errno)); + current_filename = argv[optind]; + + check_units(f, tfm_type, &ppi, &upem); + if (tfm_type == UNICODE) // don't calculate for Intellifont TFMs + multiplier = double(res) / upem / ppi * unitwidth / scalesize; + if (italic_flag) + // convert from thousandths of an em to design units + italic_sep = int(italic_sep * upem / 1000 + 0.5); + read_char_table(f); - output_spacewidth(); - output_slant(); - read_and_output_pcltypeface(f); - output_pclproportional(); - output_pclweight(); - output_pclstyle(); + if (nchars == 0) + fatal("no characters"); + + if (!debug_flag) { + output_font_name(f); + printf("name %s\n", xbasename(argv[optind + 2])); + if (special_flag) + printf("special\n"); + output_spacewidth(); + output_slant(); + read_and_output_pcltypeface(f); + output_pclproportional(); + output_pclweight(); + output_pclstyle(); + } read_symbol_sets(f); - output_ligatures(); - read_and_output_kernpairs(f); - output_charset(); + if (debug_flag) + dump_symbols(tfm_type); + else { + output_ligatures(); + read_and_output_kernpairs(f); + output_charset(tfm_type); + } return 0; } -static -void usage(FILE *stream) +static void +usage(FILE *stream) { - fprintf(stream, "usage: %s [-s] [-i n] tfm_file map_file output_font\n", - program_name); + fprintf(stream, + "usage: %s [-s] [-a] [-q] [-i n] tfm_file map_file output_font\n" + " %s -d tfm_file [map_file]\n", + program_name, program_name); } -static -void usage() + +static void +usage() { usage(stderr); exit(1); @@ -310,28 +421,32 @@ File::File(const char *s) end_ = buf_ + sb.st_size; } -void File::skip(int n) +void +File::skip(int n) { if (end_ - ptr_ < n) fatal("unexpected end of file"); ptr_ += n; } -void File::seek(uint32 n) +void +File::seek(uint32 n) { - if ((uint32)(end_ - buf_) < n) + if (uint32(end_ - buf_) < n) fatal("unexpected end of file"); ptr_ = buf_ + n; } -byte File::get_byte() +byte +File::get_byte() { if (ptr_ >= end_) fatal("unexpected end of file"); return *ptr_++; } -uint16 File::get_uint16() +uint16 +File::get_uint16() { if (end_ - ptr_ < 2) fatal("unexpected end of file"); @@ -339,7 +454,8 @@ uint16 File::get_uint16() return n + (*ptr_++ << 8); } -uint32 File::get_uint32() +uint32 +File::get_uint32() { if (end_ - ptr_ < 4) fatal("unexpected end of file"); @@ -349,8 +465,24 @@ uint32 File::get_uint32() return n; } -static -void read_tags(File &f) +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) { if (f.get_byte() != 'I' || f.get_byte() != 'I') fatal("not an Intel format TFM file"); @@ -367,85 +499,127 @@ void 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); } } -static -void check_type() +static int +check_type() { require_tag(type_tag); - if (tag_info(type_tag).value != 0) { - if (tag_info(type_tag).value == 2) - fatal("cannot handle TrueType tfm files"); - fatal("unknown type tag %1", int(tag_info(type_tag).value)); + int tfm_type = tag_info(type_tag).value; + switch (tfm_type) { + case MSL: + case UNICODE: + break; + case SYMSET: + fatal("cannot handle Symbol Set TFM files"); + break; + default: + fatal("unknown type tag %1", tfm_type); } + return tfm_type; } -static -void check_units(File &f) +static void +check_units(File &f, const int tfm_type, double *ppi, double *upem) { require_tag(design_units_per_em_tag); f.seek(tag_info(design_units_per_em_tag).value); uint32 num = f.get_uint32(); uint32 den = f.get_uint32(); - if (num != 8782 || den != 1) + if (tfm_type == MSL && (num != 8782 || den != 1)) fatal("design units per em != 8782/1"); + *upem = double(num) / den; require_tag(inches_per_point_tag); f.seek(tag_info(inches_per_point_tag).value); num = f.get_uint32(); den = f.get_uint32(); - if (num != 100 || den != 7231) + if (tfm_type == MSL && (num != 100 || den != 7231)) fatal("inches per point not 100/7231"); + *ppi = double(den) / num; } -static -void require_tag(tag_type t) +static void +require_tag(tag_type t) { if (!tag_info(t).present) fatal("tag %1 missing", int(t)); } -static -void output_spacewidth() +// put a human-readable font name in the file +static void +output_font_name(File &f) +{ + char *p; + + if (!tag_info(font_name_tag).present) + return; + int count = tag_info(font_name_tag).count; + char *font_name = new char[count]; + + if (count > 4) { // value is a file offset to the string + f.seek(tag_info(font_name_tag).value); + int n = count; + p = font_name; + while (--n) + *p++ = f.get_byte(); + } + 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; + while (csspace(*--p)) + ; + *(p + 1) = '\0'; + printf("# %s\n", font_name); + delete font_name; +} + +static void +output_spacewidth() { require_tag(word_spacing_tag); printf("spacewidth %d\n", scale(tag_info(word_spacing_tag).value)); } -static -void read_symbol_sets(File &f) +static void +read_symbol_sets(File &f) { uint32 symbol_set_dir_length = tag_info(symbol_set_tag).count; + uint16 *symbol_set_selectors; n_symbol_sets = symbol_set_dir_length/14; symbol_set_table = new symbol_set[n_symbol_sets]; unsigned int i; + + for (i = 0; i < nchars; i++) + char_table[i].symbol_set = NO_SYMBOL_SET; + for (i = 0; i < n_symbol_sets; i++) { f.seek(tag_info(symbol_set_tag).value + i*14); - (void)f.get_uint32(); - uint32 off1 = f.get_uint32(); - uint32 off2 = f.get_uint32(); - (void)f.get_uint16(); // what's this for? + (void)f.get_uint32(); // offset to symbol set name + uint32 off1 = f.get_uint32(); // offset to selection string + uint32 off2 = f.get_uint32(); // offset to symbol set index array + f.seek(off1); + uint16 kind = 0; // HP-GL "Kind 1" symbol set value unsigned int j; - uint16 kind = 0; for (j = 0; j < off2 - off1; j++) { unsigned char c = f.get_byte(); - if ('0' <= c && c <= '9') + if ('0' <= c && c <= '9') // value kind = kind*10 + (c - '0'); - else if ('A' <= c && c <= 'Z') + else if ('A' <= c && c <= 'Z') // terminator kind = kind*32 + (c - 64); } symbol_set_table[i].select = kind; for (j = 0; j < 256; j++) symbol_set_table[i].index[j] = f.get_uint16(); } - for (i = 0; i < nchars; i++) - char_table[i].symbol_set = NO_SYMBOL_SET; - uint16 *symbol_set_selectors = (special_flag - ? special_symbol_sets - : text_symbol_sets); + symbol_set_selectors = (special_flag ? special_symbol_sets + : text_symbol_sets); for (i = 0; symbol_set_selectors[i] != 0; i++) { unsigned int j; for (j = 0; j < n_symbol_sets; j++) @@ -453,29 +627,52 @@ void read_symbol_sets(File &f) break; if (j < n_symbol_sets) { for (int k = 0; k < 256; k++) { - uint16 index = symbol_set_table[j].index[k]; - if (index != 0xffff - && char_table[index].symbol_set == NO_SYMBOL_SET) { - char_table[index].symbol_set = symbol_set_table[j].select; - char_table[index].code = k; + uint16 idx = symbol_set_table[j].index[k]; + if (idx != NO_GLYPH + && char_table[idx].symbol_set == NO_SYMBOL_SET) { + char_table[idx].symbol_set = symbol_set_table[j].select; + char_table[idx].code = k; } } } } + + if (all_flag) + return; + + symbol_set_selectors = (special_flag ? text_symbol_sets + : special_symbol_sets); + for (i = 0; symbol_set_selectors[i] != 0; i++) { + unsigned int j; + for (j = 0; j < n_symbol_sets; j++) + if (symbol_set_table[j].select == symbol_set_selectors[i]) + break; + if (j < n_symbol_sets) { + for (int k = 0; k < 256; k++) { + uint16 idx = symbol_set_table[j].index[k]; + if (idx != NO_GLYPH + && char_table[idx].symbol_set == NO_SYMBOL_SET) { + char_table[idx].symbol_set = symbol_set_table[j].select; + char_table[idx].code = k; + } + } + } + } + return; } -static -void read_char_table(File &f) +static void +read_char_table(File &f) { - require_tag(msl_tag); - nchars = tag_info(msl_tag).count; + require_tag(charcode_tag); + nchars = tag_info(charcode_tag).count; char_table = new char_info[nchars]; - f.seek(tag_info(msl_tag).value); + f.seek(tag_info(charcode_tag).value); uint32 i; for (i = 0; i < nchars; i++) - char_table[i].msl = f.get_uint16(); - + char_table[i].charcode = f.get_uint16(); + require_tag(width_tag); f.seek(tag_info(width_tag).value); for (i = 0; i < nchars; i++) @@ -508,8 +705,8 @@ void read_char_table(File &f) char_table[i].right_extent = f.get_uint16(); } -static -void output_pclweight() +static void +output_pclweight() { require_tag(stroke_weight_tag); int stroke_weight = tag_info(stroke_weight_tag).value; @@ -527,30 +724,34 @@ void output_pclweight() printf("pclweight %d\n", pcl_stroke_weight); } -static -void output_pclproportional() +static void +output_pclproportional() { require_tag(spacing_tag); printf("pclproportional %d\n", tag_info(spacing_tag).value == 0); } -static -void read_and_output_pcltypeface(File &f) +static void +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"); } -static -void output_pclstyle() +static void +output_pclstyle() { unsigned pcl_style = 0; // older tfms don't have the posture tag @@ -569,8 +770,8 @@ void output_pclstyle() printf("pclstyle %d\n", pcl_style); } -static -void output_slant() +static void +output_slant() { require_tag(slant_tag); int slant = int16(tag_info(slant_tag).value); @@ -578,8 +779,8 @@ void output_slant() printf("slant %f\n", slant/100.0); } -static -void output_ligatures() +static void +output_ligatures() { // don't use ligatures for fixed space font require_tag(spacing_tag); @@ -592,14 +793,14 @@ void output_ligatures() static const char *ligature_chars[] = { "fi", "fl", "ff", "Fi", "Fl" }; - + unsigned ligature_mask = 0; unsigned int i; for (i = 0; i < nchars; i++) { - uint16 msl = char_table[i].msl; - if (msl < msl_name_table_size + uint16 charcode = char_table[i].charcode; + if (charcode < charcode_name_table_size && char_table[i].symbol_set != NO_SYMBOL_SET) { - for (name_list *p = msl_name_table[msl]; p; p = p->next) + for (name_list *p = charcode_name_table[charcode]; p; p = p->next) for (unsigned int j = 0; j < SIZEOF(ligature_chars); j++) if (strcmp(p->name, ligature_chars[j]) == 0) { ligature_mask |= 1 << j; @@ -616,8 +817,8 @@ void output_ligatures() } } -static -void read_and_output_kernpairs(File &f) +static void +read_and_output_kernpairs(File &f) { if (tag_info(pair_kern_tag).present) { printf("kernpairs\n"); @@ -629,112 +830,512 @@ void read_and_output_kernpairs(File &f) int16 val = int16(f.get_uint16()); if (char_table[i1].symbol_set != NO_SYMBOL_SET && char_table[i2].symbol_set != NO_SYMBOL_SET - && char_table[i1].msl < msl_name_table_size - && char_table[i2].msl < msl_name_table_size) { - for (name_list *p = msl_name_table[char_table[i1].msl]; + && char_table[i1].charcode < charcode_name_table_size + && char_table[i2].charcode < charcode_name_table_size) { + for (name_list *p = charcode_name_table[char_table[i1].charcode]; p; p = p->next) - for (name_list *q = msl_name_table[char_table[i2].msl]; + for (name_list *q = charcode_name_table[char_table[i2].charcode]; q; q = q->next) - printf("%s %s %d\n", p->name, q->name, scale(val)); + if (!equal(p->name, UNNAMED) && !equal(q->name, UNNAMED)) + printf("%s %s %d\n", p->name, q->name, scale(val)); } } } } -static -void output_charset() +static void +output_charset(const int tfm_type) { require_tag(slant_tag); double slant_angle = int16(tag_info(slant_tag).value)*PI/18000.0; double slant = sin(slant_angle)/cos(slant_angle); - require_tag(x_height_tag); + if (italic_flag) + require_tag(x_height_tag); require_tag(lower_ascent_tag); require_tag(lower_descent_tag); printf("charset\n"); unsigned int i; for (i = 0; i < nchars; i++) { - uint16 msl = char_table[i].msl; - if (msl < msl_name_table_size - && msl_name_table[msl]) { - if (char_table[i].symbol_set != NO_SYMBOL_SET) { - printf("%s\t%d,%d", - msl_name_table[msl]->name, - scale(char_table[i].width), - scale(char_table[i].ascent)); - int depth = scale(- char_table[i].descent); - if (depth < 0) - depth = 0; - int italic_correction = 0; - int left_italic_correction = 0; - int subscript_correction = 0; - if (italic_flag) { - italic_correction = scale(char_table[i].right_extent - - char_table[i].width - + italic_sep); - if (italic_correction < 0) - italic_correction = 0; - subscript_correction = int((tag_info(x_height_tag).value - * slant * .8) + .5); - if (subscript_correction > italic_correction) - subscript_correction = italic_correction; - left_italic_correction = scale(italic_sep - - char_table[i].left_extent); - } - if (subscript_correction != 0) - printf(",%d,%d,%d,%d", - depth, italic_correction, left_italic_correction, - subscript_correction); - else if (left_italic_correction != 0) - printf(",%d,%d,%d", depth, italic_correction, left_italic_correction); - else if (italic_correction != 0) - printf(",%d,%d", depth, italic_correction); - else if (depth != 0) - printf(",%d", depth); - // This is fairly arbitrary. Fortunately it doesn't much matter. - unsigned type = 0; - if (char_table[i].ascent > (int16(tag_info(lower_ascent_tag).value)*9)/10) - type |= 2; - if (char_table[i].descent < (int16(tag_info(lower_descent_tag).value)*9)/10) - type |= 1; - printf("\t%d\t%d\n", - type, - char_table[i].symbol_set*256 + char_table[i].code); - for (name_list *p = msl_name_table[msl]->next; p; p = p->next) - printf("%s\t\"\n", p->name); + uint16 charcode = char_table[i].charcode; + + // the glyph is bound to one of the searched symbol sets + if (char_table[i].symbol_set != NO_SYMBOL_SET) { + // the character was in the map file + if (charcode < charcode_name_table_size && charcode_name_table[charcode]) + printf("%s", charcode_name_table[charcode]->name); + else if (!all_flag) + continue; + else if (tfm_type == MSL) + printf(hp_msl_to_ucode_name(charcode)); + else + printf(unicode_to_ucode_name(charcode)); + + printf("\t%d,%d", + scale(char_table[i].width), scale(char_table[i].ascent)); + + int depth = scale(-char_table[i].descent); + if (depth < 0) + depth = 0; + int italic_correction = 0; + int left_italic_correction = 0; + int subscript_correction = 0; + + if (italic_flag) { + italic_correction = scale(char_table[i].right_extent + - char_table[i].width + + italic_sep); + if (italic_correction < 0) + italic_correction = 0; + subscript_correction = int((tag_info(x_height_tag).value + * slant * .8) + .5); + if (subscript_correction > italic_correction) + subscript_correction = italic_correction; + left_italic_correction = scale(italic_sep + - char_table[i].left_extent); + } + + if (subscript_correction != 0) + printf(",%d,%d,%d,%d", + depth, italic_correction, left_italic_correction, + subscript_correction); + else if (left_italic_correction != 0) + printf(",%d,%d,%d", depth, italic_correction, left_italic_correction); + else if (italic_correction != 0) + printf(",%d,%d", depth, italic_correction); + else if (depth != 0) + printf(",%d", depth); + // This is fairly arbitrary. Fortunately it doesn't much matter. + unsigned type = 0; + if (char_table[i].ascent > int16(tag_info(lower_ascent_tag).value)*9/10) + type |= 2; + if (char_table[i].descent < int16(tag_info(lower_descent_tag).value)*9/10) + type |= 1; + printf("\t%d\t%d", type, + char_table[i].symbol_set*256 + char_table[i].code); + + if (tfm_type == UNICODE) { + if (charcode >= 0xE000 && charcode <= 0xF8FF) + printf("\t-- HP PUA U+%04X", charcode); + else + printf("\t-- U+%04X", charcode); } else - warning("MSL %1 not in any of the searched symbol sets", msl); - } - } -} + printf("\t-- MSL %4d", charcode); + printf(" (%3s %3d)\n", + show_symset(char_table[i].symbol_set), char_table[i].code); -static -void dump_tags(File &f) -{ - int i; - for (i = min_tag; i <= max_tag; i++) { - enum tag_type t = tag_type(i); - if (tag_info(t).present) { - fprintf(stderr, - "%d %d %d %d\n", i, tag_info(t).type, tag_info(t).count, - tag_info(t).value); - if (tag_info(t).type == FLOAT_TYPE - && tag_info(t).count == 1) { - f.seek(tag_info(t).value); - uint32 num = f.get_uint32(); - uint32 den = f.get_uint32(); - fprintf(stderr, "(%u/%u = %g)\n", num, den, (double)num/den); + if (charcode < charcode_name_table_size + && charcode_name_table[charcode]) + for (name_list *p = charcode_name_table[charcode]->next; + p; p = p->next) + printf("%s\t\"\n", p->name); + } + // warnings about characters in mapfile not found in TFM + else if (charcode < charcode_name_table_size + && charcode_name_table[charcode]) { + char *name = charcode_name_table[charcode]->name; + // don't warn about Unicode or unnamed glyphs + // that aren't in the the TFM file + if (tfm_type == UNICODE && !quiet_flag && !equal(name, UNNAMED) + && !is_uname(name)) { + fprintf(stderr, "%s: warning: symbol U+%04X (%s", + program_name, charcode, name); + for (name_list *p = charcode_name_table[charcode]->next; + p; p = p->next) + fprintf(stderr, ", %s", p->name); + fprintf(stderr, ") not in any searched symbol set\n"); + } + else if (!quiet_flag && !equal(name, UNNAMED) && !is_uname(name)) { + fprintf(stderr, "%s: warning: symbol MSL %d (%s", + program_name, charcode, name); + for (name_list *p = charcode_name_table[charcode]->next; + p; p = p->next) + fprintf(stderr, ", %s", p->name); + fprintf(stderr, ") not in any searched symbol set\n"); } } } } -static -int read_map(const char *file) +#define em_fract(a) (upem >= 0 ? double(a)/upem : 0) + +static void +dump_tags(File &f) +{ + double upem = -1.0; + + printf("TFM tags\n" + "\n" + "tag# type count value\n" + "---------------------\n"); + + for (int i = min_tag; i <= max_tag; i++) { + enum tag_type t = tag_type(i); + if (tag_info(t).present) { + printf("%4d %4d %5d", i, tag_info(t).type, tag_info(t).count); + switch (tag_info(t).type) { + case BYTE_TYPE: + case USHORT_TYPE: + printf(" %5u", tag_info(t).value); + switch (i) { + case type_tag: + printf(" Font Type "); + switch (tag_info(t).value) { + case MSL: + case SYMSET: + printf("(Intellifont)"); + break; + case UNICODE: + printf("(TrueType)"); + } + break; + case charcode_tag: + printf(" Number of Symbols (%u)", tag_info(t).count); + break; + case symbol_set_tag: + printf(" Symbol Sets (%u): ", + tag_info(symbol_set_tag).count / 14); + dump_symbol_sets(f); + break; + case type_structure_tag: + printf(" Type Structure (%u)", tag_info(t).value); + break; + case stroke_weight_tag: + printf(" Stroke Weight (%u)", tag_info(t).value); + break; + case spacing_tag: + printf(" Spacing "); + switch (tag_info(t).value) { + case 0: + printf("(Proportional)"); + break; + case 1: + printf("(Fixed Pitch: %u DU: %.2f em)", tag_info(t).value, + em_fract(tag_info(t).value)); + break; + } + break; + case appearance_width_tag: + printf(" Appearance Width (%u)", tag_info(t).value); + break; + case serif_style_tag: + printf(" Serif Style (%u)", tag_info(t).value); + break; + case posture_tag: + printf(" Posture (%s)", tag_info(t).value == 0 + ? "Upright" + : tag_info(t).value == 1 + ? "Italic" + : "Alternate Italic"); + break; + case max_width_tag: + printf(" Maximum Width (%u DU: %.2f em)", tag_info(t).value, + em_fract(tag_info(t).value)); + break; + case word_spacing_tag: + printf(" Interword Spacing (%u DU: %.2f em)", tag_info(t).value, + em_fract(tag_info(t).value)); + break; + case recommended_line_spacing_tag: + printf(" Recommended Line Spacing (%u DU: %.2f em)", tag_info(t).value, + em_fract(tag_info(t).value)); + break; + case x_height_tag: + printf(" x-Height (%u DU: %.2f em)", tag_info(t).value, + em_fract(tag_info(t).value)); + break; + case cap_height_tag: + printf(" Cap Height (%u DU: %.2f em)", tag_info(t).value, + em_fract(tag_info(t).value)); + break; + case max_ascent_tag: + printf(" Maximum Ascent (%u DU: %.2f em)", tag_info(t).value, + em_fract(tag_info(t).value)); + break; + case lower_ascent_tag: + printf(" Lowercase Ascent (%u DU: %.2f em)", tag_info(t).value, + em_fract(tag_info(t).value)); + break; + case underscore_thickness_tag: + printf(" Underscore Thickness (%u DU: %.2f em)", tag_info(t).value, + em_fract(tag_info(t).value)); + break; + case uppercase_accent_height_tag: + printf(" Uppercase Accent Height (%u DU: %.2f em)", tag_info(t).value, + em_fract(tag_info(t).value)); + break; + case lowercase_accent_height_tag: + printf(" Lowercase Accent Height (%u DU: %.2f em)", tag_info(t).value, + em_fract(tag_info(t).value)); + break; + case width_tag: + printf(" Horizontal Escapement array"); + break; + case vertical_escapement_tag: + printf(" Vertical Escapement array"); + break; + case right_extent_tag: + printf(" Right Extent array"); + break; + case ascent_tag: + printf(" Character Ascent array"); + break; + case pair_kern_tag: + f.seek(tag_info(t).value); + printf(" Kern Pairs (%u)", f.get_uint16()); + break; + case panose_tag: + printf(" PANOSE Classification array"); + break; + } + break; + case SIGNED_SHORT_TYPE: + printf(" %5d", int16(tag_info(t).value)); + switch (i) { + case slant_tag: + printf(" Slant (%.2f degrees)", double(tag_info(t).value) / 100); + break; + case max_descent_tag: + printf(" Maximum Descent (%d DU: %.2f em)", int16(tag_info(t).value), + em_fract(int16(tag_info(t).value))); + break; + case lower_descent_tag: + printf(" Lowercase Descent (%d DU: %.2f em)", int16(tag_info(t).value), + em_fract(int16(tag_info(t).value))); + break; + case underscore_depth_tag: + printf(" Underscore Depth (%d DU: %.2f em)", int16(tag_info(t).value), + em_fract(int16(tag_info(t).value))); + break; + case left_extent_tag: + printf(" Left Extent array"); + break; + // The type of this tag has changed from SHORT to SIGNED SHORT + // in TFM version 1.3.0. + case ascent_tag: + printf(" Character Ascent array"); + break; + case descent_tag: + printf(" Character Descent array"); + break; + } + break; + case RATIONAL_TYPE: + printf(" %5u", tag_info(t).value); + switch (i) { + case inches_per_point_tag: + printf(" Inches per Point"); + break; + case nominal_point_size_tag: + printf(" Nominal Point Size"); + break; + case design_units_per_em_tag: + printf(" Design Units per Em"); + break; + case average_width_tag: + printf(" Average Width"); + break; + } + if (tag_info(t).count == 1) { + f.seek(tag_info(t).value); + uint32 num = f.get_uint32(); + uint32 den = f.get_uint32(); + if (i == design_units_per_em_tag) + upem = double(num) / den; + printf(" (%u/%u = %g)", num, den, double(num)/den); + } + break; + case ASCII_TYPE: + printf(" %5u ", tag_info(t).value); + switch (i) { + case comment_tag: + printf("Comment "); + break; + case copyright_tag: + printf("Copyright "); + break; + case unique_identifier_tag: + printf("Unique ID "); + break; + case font_name_tag: + printf("Typeface Name "); + break; + case typeface_source_tag: + printf("Typeface Source "); + break; + case typeface_tag: + printf("PCL Typeface "); + break; + } + dump_ascii(f, t); + } + putchar('\n'); + } + } + putchar('\n'); +} +#undef em_fract + +static void +dump_ascii(File &f, tag_type t) +{ + putchar('"'); + if (tag_info(t).count > 4) { + int count = tag_info(t).count; + f.seek(tag_info(t).value); + while (--count) + printf("%c", f.get_byte()); + } + else + printf("%.4s", tag_info(t).orig_value); + putchar('"'); +} + +static void +dump_symbol_sets(File &f) +{ + uint32 symbol_set_dir_length = tag_info(symbol_set_tag).count; + uint32 num_symbol_sets = symbol_set_dir_length / 14; + + for (uint32 i = 0; i < num_symbol_sets; i++) { + f.seek(tag_info(symbol_set_tag).value + i * 14); + (void)f.get_uint32(); // offset to symbol set name + uint32 off1 = f.get_uint32(); // offset to selection string + uint32 off2 = f.get_uint32(); // offset to symbol set index array + f.seek(off1); + for (uint32 j = 0; j < off2 - off1; j++) { + unsigned char c = f.get_byte(); + if ('0' <= c && c <= '9') + putchar(c); + else if ('A' <= c && c <= 'Z') + printf(i < num_symbol_sets - 1 ? "%c," : "%c", c); + } + } +} + +static void +dump_symbols(int tfm_type) +{ + printf("Symbols:\n" + "\n" + " glyph id# symbol set name(s)\n" + "----------------------------------\n"); + for (uint32 i = 0; i < nchars; i++) { + uint16 charcode = char_table[i].charcode; + if (charcode < charcode_name_table_size + && charcode_name_table[charcode]) { + if (char_table[i].symbol_set != NO_SYMBOL_SET) { + printf(tfm_type == UNICODE ? "%4d (U+%04X) (%3s %3d) %s" + : "%4d (MSL %4d) (%3s %3d) %s", + i, charcode, + show_symset(char_table[i].symbol_set), + char_table[i].code, + charcode_name_table[charcode]->name); + for (name_list *p = charcode_name_table[charcode]->next; + p; p = p->next) + printf(", %s", p->name); + putchar('\n'); + } + } + else { + printf(tfm_type == UNICODE ? "%4d (U+%04X) " + : "%4d (MSL %4d) ", + i, charcode); + if (char_table[i].symbol_set != NO_SYMBOL_SET) + printf("(%3s %3d)", + show_symset(char_table[i].symbol_set), char_table[i].code); + putchar('\n'); + } + } + putchar('\n'); +} + +static char * +show_symset(unsigned int symset) +{ + static char symset_str[8]; + + sprintf(symset_str, "%d%c", symset / 32, (symset & 31) + 64); + return symset_str; +} + +static char * +hp_msl_to_ucode_name(int msl) +{ + char codestr[8]; + + sprintf(codestr, "%d", msl); + const char *ustr = hp_msl_to_unicode_code(codestr); + if (ustr == NULL) + ustr = UNNAMED; + else { + char *nonum; + int ucode = int(strtol(ustr, &nonum, 16)); + // don't allow PUA code points as Unicode names + if (ucode >= 0xE000 && ucode <= 0xF8FF) + ustr = UNNAMED; + } + if (!equal(ustr, UNNAMED)) { + const char *uname_decomposed = decompose_unicode(ustr); + if (uname_decomposed) + // 1st char is the number of components + ustr = uname_decomposed + 1; + } + char *value = new char[strlen(ustr) + 1]; + sprintf(value, equal(ustr, UNNAMED) ? ustr : "u%s", ustr); + return value; +} + +static char * +unicode_to_ucode_name(int ucode) +{ + const char *ustr; + char codestr[8]; + + // don't allow PUA code points as Unicode names + if (ucode >= 0xE000 && ucode <= 0xF8FF) + ustr = UNNAMED; + else { + sprintf(codestr, "%04X", ucode); + ustr = codestr; + } + if (!equal(ustr, UNNAMED)) { + const char *uname_decomposed = decompose_unicode(ustr); + if (uname_decomposed) + // 1st char is the number of components + ustr = uname_decomposed + 1; + } + char *value = new char[strlen(ustr) + 1]; + sprintf(value, equal(ustr, UNNAMED) ? ustr : "u%s", ustr); + return value; +} + +static int +is_uname(char *name) +{ + size_t i; + size_t len = strlen(name); + if (len % 5) + return 0; + + if (name[0] != 'u') + return 0; + for (i = 1; i < 4; i++) + if (!csxdigit(name[i])) + return 0; + for (i = 5; i < len; i++) + if (i % 5 ? !csxdigit(name[i]) : name[i] != '_') + return 0; + + return 1; +} + +static int +read_map(const char *file, const int tfm_type) { errno = 0; FILE *fp = fopen(file, "r"); @@ -745,6 +1346,7 @@ int read_map(const char *file) current_filename = file; char buf[512]; current_lineno = 0; + char *nonum; while (fgets(buf, int(sizeof(buf)), fp)) { current_lineno++; char *ptr = buf; @@ -755,44 +1357,85 @@ int read_map(const char *file) ptr = strtok(ptr, " \n\t"); if (!ptr) continue; - int n; - if (sscanf(ptr, "%d", &n) != 1) { - error("bad map file"); + + int msl_code = int(strtol(ptr, &nonum, 10)); + if (*nonum != '\0') { + if (csxdigit(*nonum)) + error("bad MSL map: got hex code (%1)", ptr); + else if (ptr == nonum) + error("bad MSL map: bad MSL code (%1)", ptr); + else + error("bad MSL map"); fclose(fp); return 0; } - if (n < 0) { - error("negative code"); + + ptr = strtok(NULL, " \n\t"); + if (!ptr) + continue; + int unicode = int(strtol(ptr, &nonum, 16)); + if (*nonum != '\0') { + if (ptr == nonum) + error("bad Unicode value (%1)", ptr); + else + error("bad Unicode map"); fclose(fp); return 0; } - if ((size_t)n >= msl_name_table_size) { - size_t old_size = msl_name_table_size; - name_list **old_table = msl_name_table; - msl_name_table_size = n + 256; - msl_name_table = new name_list *[msl_name_table_size]; + if (strlen(ptr) != 4) { + error("bad Unicode value (%1)", ptr); + return 0; + } + + int n = tfm_type == MSL ? msl_code : unicode; + if (tfm_type == UNICODE && n > 0xFFFF) { + // greatest value supported by TFM files + error("bad Unicode value (%1): greatest value is 0xFFFF", ptr); + fclose(fp); + return 0; + } + else if (n < 0) { + error("negative code value (%1)", ptr); + fclose(fp); + return 0; + } + + ptr = strtok(NULL, " \n\t"); + if (!ptr) { // groff name + error("missing name(s)"); + fclose(fp); + return 0; + } + // leave decomposed Unicode values alone + else if (is_uname(ptr) && !is_decomposed(ptr)) + ptr = unicode_to_ucode_name(strtol(ptr + 1, &nonum, 16)); + + if (size_t(n) >= charcode_name_table_size) { + size_t old_size = charcode_name_table_size; + name_list **old_table = charcode_name_table; + charcode_name_table_size = n + 256; + charcode_name_table = new name_list *[charcode_name_table_size]; if (old_table) { - memcpy(msl_name_table, old_table, old_size*sizeof(name_list *)); + memcpy(charcode_name_table, old_table, old_size*sizeof(name_list *)); a_delete old_table; } - for (size_t i = old_size; i < msl_name_table_size; i++) - msl_name_table[i] = 0; + for (size_t i = old_size; i < charcode_name_table_size; i++) + charcode_name_table[i] = NULL; } - ptr = strtok(0, " \n\t"); - if (!ptr) { - error("missing names"); - fclose(fp); - return 0; + + // a '#' that isn't the first groff name begins a comment + for (int names = 1; ptr; ptr = strtok(NULL, " \n\t")) { + if (names++ > 1 && *ptr == '#') + break; + charcode_name_table[n] = new name_list(ptr, charcode_name_table[n]); } - for (; ptr; ptr = strtok(0, " \n\t")) - msl_name_table[n] = new name_list(ptr, msl_name_table[n]); } fclose(fp); return 1; } -static -const char *xbasename(const char *s) +static const char * +xbasename(const char *s) { // DIR_SEPS[] are possible directory separator characters, see // nonposix.h. We want the rightmost separator of all possible diff --git a/contrib/groff/src/utils/hpftodit/hpftodit.man b/contrib/groff/src/utils/hpftodit/hpftodit.man index c069752bad79..429f516d8900 100644 --- a/contrib/groff/src/utils/hpftodit/hpftodit.man +++ b/contrib/groff/src/utils/hpftodit/hpftodit.man @@ -1,5 +1,6 @@ +.tr ~ .ig -Copyright (C) 1994-2000, 2001, 2003 Free Software Foundation, Inc. +Copyright (C) 1994-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 @@ -22,13 +23,22 @@ the original English. .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP .el .TP "\\$1" .. +.de CW +.ie \\n(.$>2 \&\\$1\f(CR\\$2\fP\\$3 +.el \&\f(CR\\$1\fP\\$2 +.. +.tr ~ .TH HPFTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.\" -------------------------------------------------------------------------- .SH NAME +.\" -------------------------------------------------------------------------- hpftodit \- create font description files for use with groff \-Tlj4 +.\" -------------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------------- .B hpftodit [ -.B \-sv +.B \-adqsv ] [ .BI \-i n @@ -39,33 +49,91 @@ hpftodit \- create font description files for use with groff \-Tlj4 .PP It is possible to have whitespace between the .B \-i -command line option and its parameter. +option and its parameter. +.\" -------------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------------- .B hpftodit -creates a font file for use with -.B -groff \-Tlj4\fR -from an HP tagged font metric file. +creates a font file for use with a Hewlett-Packard LaserJet~4\(enseries +(or newer) printer with +.BR "groff \-Tlj4" , +using data from an HP tagged font metric (TFM) file. .I tfm_file -is the name of the tagged font metric file for the font. +is the name of the TFM file for the font; Intellifont and +TrueType TFM files are supported, but symbol set TFM files are not. .I map_file -is a file giving the groff names for characters in the font; -this file should consist of a sequence of lines of the form: +is a file giving the groff names for characters in the font; this file +should consist of a sequence of lines of the form: .IP .I -n c1 c2 \fR.\|.\|. +m u c1 c2 \fR.\|.\|. [ +.CW # +.I comment +] .LP where -.I n +.I m is a decimal integer giving the MSL number of the character, +.I u +is a hexadecimal integer giving the Unicode value of the character, and .IR c1 , -.IR c2 ,.\|.\|. +.IR c2 ", .\|.\|." are the groff names of the character. +The values can be separated by any whitespace; the Unicode value must +use uppercase digits A\^\(en\^F, and must be without a leading +.CW ` 0x ', +.CW ` u ', +or +.CW ` U+ '. +Unicode values corresponding to composite glyphs are decomposed; e.g., +.CW ` u00C0 ' +becomes +.CW ` u0041_0300 '. +The name for a glyph without a groff name may be given as +.CW u \fIXXXX\fP +if the glyph corresponds to a Unicode value, or as an unnamed glyph +.CW ` --- '. +If the given Unicode value is in the Private Use Area +(0xE000\^\(en\^0xF8FF), the glyph is included as an unnamed glyph. +Refer to +.BR groff_diff (@MAN1EXT@) +for additional information about unnamed glyphs and how to access them. +.LP +Blank lines and lines beginning with +.CW ` # ' +are ignored. +A +.CW ` # ' +following one or more groff names begins a comment. +Because +.CW ` # ' +is a valid groff name, it must appear first in a list of +groff names if a comment is included, e.g., +.IP +.CW "3 0023 # # number sign" +.LP +or +.IP +.CW "3 0023 # sh # number sign" +.LP +rather than +.IP +.CW "3 0023 sh # # number sign" +.LP +which will treat the first +.CW ` # ' +as the beginning of the comment. +.LP .I font is the name of the groff font file. The groff font file is written to -.IR font . +.IR font ; +if +.I font +is specified as +.CW ` - ', +the output is written to the standard output. .LP The .B \-s @@ -75,7 +143,7 @@ option should be given if the font is special if .B troff should search it whenever -a character is not found in the current font.) +a character is not found in the current font). If the font is special, it should be listed in the .B fonts @@ -88,33 +156,116 @@ If the .B \-i option is used, .B hpftodit -will automatically generate an italic correction, +automatically will generate an italic correction, a left italic correction and a subscript correction for each character (the significance of these parameters is explained in .BR groff_font (@MAN5EXT@)). +.\" -------------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------------- +.TP +.B \-a +Include characters in the TFM file that are not included in the map +file. +A glyph with corresponding Unicode value is given the name +.RI u XXXX ; +a glyph without a Unicode value is included as an unnamed glyph +\&`\-\^\-\^\-'. +A glyph with a Unicode value in the Private Use Area +(0xE000\^\(en\^0xF8FF) also is included as an unnamed glyph. +.IP +This option provides a simple means of adding Unicode-named and unnamed +glyphs to a font without including them in the map file, but it affords +little control over which glyphs are placed in a regular font and which +are placed in a special font. +The presence or absence of the +.B \-s +option has some effect on which glyphs are included: without the +.B \-s +option, only the \(lqtext\(rq symbol sets are searched for matching +glyphs; with the +.B \-s +option, only the \(lqmathematical\(rq symbol sets +are searched. +Nonetheless, restricting the symbol sets searched isn't very +selective\(emmany glyphs are placed in both regular and special fonts. +Normally, the +.B \-a +option should be used only as a last resort. +.\" -------------------------------------------------------------------------- +.TP +.B \-d +Dump information about the TFM file to the standard output; this option +can be useful for ensuring that a TFM file is a proper match for a font, +and that the contents of the TFM file are suitable. +The information includes the values of important TFM tags, and a listing +(by MSL number for Intellifont TFM files or by Unicode value for +TrueType TFM files) of the glyphs included in the TFM file. +The unit of measure `DU' for some tags indicates design units; there are +8782 design units per em for Intellifont fonts, and 2048 design units +per em for TrueType fonts. +Note that the accessibility of a glyph depends on its inclusion in a +symbol set; some TFM files list many glyphs but only a few symbol sets. +.IP +The glyph listing includes the glyph index within the TFM file, the MSL +or Unicode value, and the symbol set and character code that will be +used to print the glyph. +If +.I map_file +is given, +groff names are given for matching glyphs. +If only the glyph index and MSL or Unicode value are given, the glyph +does not appear in any supported symbol set and cannot be printed. +.IP +With the +.B \-d +option, +.I map_file +is optional, and +.I font +is ignored if given. +.\" -------------------------------------------------------------------------- +.TP +.B \-q +Suppress warnings about characters in the map file that were not found +in the TFM file. +Warnings never are given for unnamed glyphs or by glyphs named by their +Unicode values. +This option is useful when sending the output of +.B hpftodit +to the standard output. +.\" -------------------------------------------------------------------------- .TP .B \-v -Print the version number. +Print the +.B hpftodit +version number. +.\" -------------------------------------------------------------------------- .TP .B \-s The font is special. -The effect of this option is to add the +This option adds the .B special -command to the font file. +command to the font file, and affects the order in which HP symbol sets +are searched for each glyph. +Without the +.B \-s +option, the \(lqtext\(rq sets are searched before +the \(lqmathematical\(rq symbol sets. +With the +.B \-s +option, the search order is reversed. +.\" -------------------------------------------------------------------------- .TP .BI \-i n -Generate an italic correction for each character so that -the character's width plus the character's italic correction -is equal to +Generate an italic correction for each character so that the character's +width plus the character's italic correction is equal to .I n -design units -plus the amount by which the right edge of the character's bounding -is to the right of the character's origin. -If this would result in a negative italic correction, use a zero -italic correction instead. -There are 8782 design units per em for Intellifont fonts. +thousandths of an em plus the amount by which the right edge of the +character's bounding is to the right of the character's origin. +If this would result in a negative italic correction, use a zero italic +correction instead. .IP Also generate a subscript correction equal to the product of the tangent of the slant of the font and @@ -126,33 +277,34 @@ instead. Also generate a left italic correction for each character equal to .I n -design units -plus the amount by which the left edge of the character's bounding box -is to the left of the character's origin. +thousandths of an em plus the amount by which the left edge of the +character's bounding box is to the left of the character's origin. The left italic correction may be negative. .IP -This option is normally needed only with italic (or oblique) fonts. +This option normally is needed only with italic or oblique fonts; +a value of 50 (0.05 em) usually is a reasonable choice. +.\" -------------------------------------------------------------------------- .SH FILES -.Tp \w'\fB@FONTDIR@/devlj4/DESC'u+2n +.\" -------------------------------------------------------------------------- +.ad 0 +.TP \w'\fB@FONTDIR@/devlj4/generate/\fP\fI*\fP.map'u+2n .B @FONTDIR@/devlj4/DESC Device description file. .TP .BI @FONTDIR@/devlj4/ F Font description file for font .IR F . -.SH BUGS -.LP -This program was written without the benefit of complete, official -documentation on the tagged font metric format. -It is therefore likely that it will fail to work on tfm files that are -dissimilar to those for the internal fonts on the Laserjet 4, -with which it was tested. -.LP -TrueType tfm files are not supported. +.TP +.BI @FONTDIR@/devlj4/generate/ * .map +Symbol mapping files +.\" -------------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------------- .BR groff (@MAN1EXT@), +.BR groff_diff (@MAN1EXT@), .BR grolj4 (@MAN1EXT@), -.BR groff_font (@MAN5EXT@) +.BR groff_font (@MAN5EXT@), +.BR lj4_font (@MAN5EXT@) . .\" Local Variables: .\" mode: nroff diff --git a/contrib/groff/src/utils/hpftodit/hpuni.cpp b/contrib/groff/src/utils/hpftodit/hpuni.cpp new file mode 100644 index 000000000000..23a1eb052851 --- /dev/null +++ b/contrib/groff/src/utils/hpftodit/hpuni.cpp @@ -0,0 +1,698 @@ +// -*- C++ -*- +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. + Written by Jeff Conrad (jeff_conrad@msn.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. */ + +#include "lib.h" +#include "stringclass.h" +#include "ptable.h" + +#include "unicode.h" + +struct hp_msl_to_unicode { + char *value; +}; + +declare_ptable(hp_msl_to_unicode) +implement_ptable(hp_msl_to_unicode) + +PTABLE(hp_msl_to_unicode) hp_msl_to_unicode_table; + +struct S { + const char *key; + const char *value; +} hp_msl_to_unicode_list[] = { + { "1", "0021", }, // Exclamation Mark + { "2", "0022", }, // Neutral Double Quote + { "3", "0023", }, // Number Sign + { "4", "0024", }, // Dollar Sign + { "5", "0025", }, // Per Cent Sign + { "6", "0026", }, // Ampersand + { "8", "2019", }, // Single Close Quote (9) + { "9", "0028", }, // Left Parenthesis + { "10", "0029", }, // Right Parenthesis + { "11", "002A", }, // Asterisk + { "12", "002B", }, // Plus Sign + { "13", "002C", }, // Comma, or Decimal Separator + { "14", "002D", }, // Hyphen + { "15", "002E", }, // Period, or Full Stop + { "16", "002F", }, // Solidus, or Slash + { "17", "0030", }, // Numeral Zero + { "18", "0031", }, // Numeral One + { "19", "0032", }, // Numeral Two + { "20", "0033", }, // Numeral Three + { "21", "0034", }, // Numeral Four + { "22", "0035", }, // Numeral Five + { "23", "0036", }, // Numeral Six + { "24", "0037", }, // Numeral Seven + { "25", "0038", }, // Numeral Eight + { "26", "0039", }, // Numeral Nine + { "27", "003A", }, // Colon + { "28", "003B", }, // Semicolon + { "29", "003C", }, // Less Than Sign + { "30", "003D", }, // Equals Sign + { "31", "003E", }, // Greater Than Sign + { "32", "003F", }, // Question Mark + { "33", "0040", }, // Commercial At + { "34", "0041", }, // Uppercase A + { "35", "0042", }, // Uppercase B + { "36", "0043", }, // Uppercase C + { "37", "0044", }, // Uppercase D + { "38", "0045", }, // Uppercase E + { "39", "0046", }, // Uppercase F + { "40", "0047", }, // Uppercase G + { "41", "0048", }, // Uppercase H + { "42", "0049", }, // Uppercase I + { "43", "004A", }, // Uppercase J + { "44", "004B", }, // Uppercase K + { "45", "004C", }, // Uppercase L + { "46", "004D", }, // Uppercase M + { "47", "004E", }, // Uppercase N + { "48", "004F", }, // Uppercase O + { "49", "0050", }, // Uppercase P + { "50", "0051", }, // Uppercase Q + { "51", "0052", }, // Uppercase R + { "52", "0053", }, // Uppercase S + { "53", "0054", }, // Uppercase T + { "54", "0055", }, // Uppercase U + { "55", "0056", }, // Uppercase V + { "56", "0057", }, // Uppercase W + { "57", "0058", }, // Uppercase X + { "58", "0059", }, // Uppercase Y + { "59", "005A", }, // Uppercase Z + { "60", "005B", }, // Left Bracket + { "61", "005C", }, // Reverse Solidus, or Backslash + { "62", "005D", }, // Right Bracket + { "63", "005E", }, // Circumflex, Exponent, or Pointer + { "64", "005F", }, // Underline or Underscore Character + { "66", "2018", }, // Single Open Quote (6) + { "67", "0061", }, // Lowercase A + { "68", "0062", }, // Lowercase B + { "69", "0063", }, // Lowercase C + { "70", "0064", }, // Lowercase D + { "71", "0065", }, // Lowercase E + { "72", "0066", }, // Lowercase F + { "73", "0067", }, // Lowercase G + { "74", "0068", }, // Lowercase H + { "75", "0069", }, // Lowercase I + { "76", "006A", }, // Lowercase J + { "77", "006B", }, // Lowercase K + { "78", "006C", }, // Lowercase L + { "79", "006D", }, // Lowercase M + { "80", "006E", }, // Lowercase N + { "81", "006F", }, // Lowercase O + { "82", "0070", }, // Lowercase P + { "83", "0071", }, // Lowercase Q + { "84", "0072", }, // Lowercase R + { "85", "0073", }, // Lowercase S + { "86", "0074", }, // Lowercase T + { "87", "0075", }, // Lowercase U + { "88", "0076", }, // Lowercase V + { "89", "0077", }, // Lowercase W + { "90", "0078", }, // Lowercase X + { "91", "0079", }, // Lowercase Y + { "92", "007A", }, // Lowercase Z + { "93", "007B", }, // Left Brace + { "94", "007C", }, // Long Vertical Mark + { "95", "007D", }, // Right Brace + { "96", "007E", }, // One Wavy Line Approximate + { "97", "2592", }, // Medium Shading Character + { "99", "00C0", }, // Uppercase A Grave + { "100", "00C2", }, // Uppercase A Circumflex + { "101", "00C8", }, // Uppercase E Grave + { "102", "00CA", }, // Uppercase E Circumflex + { "103", "00CB", }, // Uppercase E Dieresis + { "104", "00CE", }, // Uppercase I Circumflex + { "105", "00CF", }, // Uppercase I Dieresis + { "106", "00B4", }, // Lowercase Acute Accent (Spacing) + { "107", "0060", }, // Lowercase Grave Accent (Spacing) + { "108", "02C6", }, // Lowercase Circumflex Accent (Spacing) + { "109", "00A8", }, // Lowercase Dieresis Accent (Spacing) + { "110", "02DC", }, // Lowercase Tilde Accent (Spacing) + { "111", "00D9", }, // Uppercase U Grave + { "112", "00DB", }, // Uppercase U Circumflex + { "113", "00AF", }, // Overline, or Overscore Character + { "114", "00DD", }, // Uppercase Y Acute + { "115", "00FD", }, // Lowercase Y Acute + { "116", "00B0", }, // Degree Sign + { "117", "00C7", }, // Uppercase C Cedilla + { "118", "00E7", }, // Lowercase C Cedilla + { "119", "00D1", }, // Uppercase N Tilde + { "120", "00F1", }, // Lowercase N Tilde + { "121", "00A1", }, // Inverted Exclamation + { "122", "00BF", }, // Inverted Question Mark + { "123", "00A4", }, // Currency Symbol + { "124", "00A3", }, // Pound Sterling Sign + { "125", "00A5", }, // Yen Sign + { "126", "00A7", }, // Section Mark + { "127", "0192", }, // Florin Sign + { "128", "00A2", }, // Cent Sign + { "129", "00E2", }, // Lowercase A Circumflex + { "130", "00EA", }, // Lowercase E Circumflex + { "131", "00F4", }, // Lowercase O Circumflex + { "132", "00FB", }, // Lowercase U Circumflex + { "133", "00E1", }, // Lowercase A Acute + { "134", "00E9", }, // Lowercase E Acute + { "135", "00F3", }, // Lowercase O Acute + { "136", "00FA", }, // Lowercase U Acute + { "137", "00E0", }, // Lowercase A Grave + { "138", "00E8", }, // Lowercase E Grave + { "139", "00F2", }, // Lowercase O Grave + { "140", "00F9", }, // Lowercase U Grave + { "141", "00E4", }, // Lowercase A Dieresis + { "142", "00EB", }, // Lowercase E Dieresis + { "143", "00F6", }, // Lowercase O Dieresis + { "144", "00FC", }, // Lowercase U Dieresis + { "145", "00C5", }, // Uppercase A Ring + { "146", "00EE", }, // Lowercase I Circumflex + { "147", "00D8", }, // Uppercase O Oblique + { "148", "00C6", }, // Uppercase AE Diphthong + { "149", "00E5", }, // Lowercase A Ring + { "150", "00ED", }, // Lowercase I Acute + { "151", "00F8", }, // Lowercase O Oblique + { "152", "00E6", }, // Lowercase AE Diphthong + { "153", "00C4", }, // Uppercase A Dieresis + { "154", "00EC", }, // Lowercase I Grave + { "155", "00D6", }, // Uppercase O Dieresis + { "156", "00DC", }, // Uppercase U Dieresis + { "157", "00C9", }, // Uppercase E Acute + { "158", "00EF", }, // Lowercase I Dieresis + { "159", "00DF", }, // Lowercase Es-zet Ligature + { "160", "00D4", }, // Uppercase O Circumflex + { "161", "00C1", }, // Uppercase A Acute + { "162", "00C3", }, // Uppercase A Tilde + { "163", "00E3", }, // Lowercase A Tilde + { "164", "00D0", }, // Uppercase Eth +//{ "164", "0110", }, // Uppercase D-Stroke + { "165", "00F0", }, // Lowercase Eth + { "166", "00CD", }, // Uppercase I Acute + { "167", "00CC", }, // Uppercase I Grave + { "168", "00D3", }, // Uppercase O Acute + { "169", "00D2", }, // Uppercase O Grave + { "170", "00D5", }, // Uppercase O Tilde + { "171", "00F5", }, // Lowercase O Tilde + { "172", "0160", }, // Uppercase S Hacek + { "173", "0161", }, // Lowercase S Hacek + { "174", "00DA", }, // Uppercase U Acute + { "175", "0178", }, // Uppercase Y Dieresis + { "176", "00FF", }, // Lowercase Y Dieresis + { "177", "00DE", }, // Uppercase Thorn + { "178", "00FE", }, // Lowercase Thorn + { "180", "00B5", }, // Lowercase Greek Mu, or Micro + { "181", "00B6", }, // Pilcrow, or Paragraph Sign + { "182", "00BE", }, // Vulgar Fraction 3/4 + { "183", "2212", }, // Minus Sign + { "184", "00BC", }, // Vulgar Fraction 1/4 + { "185", "00BD", }, // Vulgar Fraction 1/2 + { "186", "00AA", }, // Female Ordinal + { "187", "00BA", }, // Male Ordinal + { "188", "00AB", }, // Left Pointing Double Angle Quote + { "189", "25A0", }, // Medium Solid Square Box + { "190", "00BB", }, // Right Pointing Double Angle Quote + { "191", "00B1", }, // Plus Over Minus Sign + { "192", "00A6", }, // Broken Vertical Mark + { "193", "00A9", }, // Copyright Sign + { "194", "00AC", }, // Not Sign + { "195", "00AD", }, // Soft Hyphen + { "196", "00AE", }, // Registered Sign + { "197", "00B2", }, // Superior Numeral 2 + { "198", "00B3", }, // Superior Numeral 3 + { "199", "00B8", }, // Lowercase Cedilla (Spacing) + { "200", "00B9", }, // Superior Numeral 1 + { "201", "00D7", }, // Multiply Sign + { "202", "00F7", }, // Divide Sign + { "203", "263A", }, // Open Smiling Face + { "204", "263B", }, // Solid Smiling Face + { "205", "2665", }, // Solid Heart, Card Suit + { "206", "2666", }, // Solid Diamond, Card Suit + { "207", "2663", }, // Solid Club, Card Suit + { "208", "2660", }, // Solid Spade, Card Suit + { "209", "25CF", }, // Medium Solid Round Bullet + { "210", "25D8", }, // Large Solid square with White Dot + { "211", "EFFD", }, // Large Open Round Bullet + { "212", "25D9", }, // Large Solid square with White Circle + { "213", "2642", }, // Male Symbol + { "214", "2640", }, // Female Symbol + { "215", "266A", }, // Musical Note + { "216", "266B", }, // Pair Of Musical Notes + { "217", "263C", }, // Compass, or Eight Pointed Sun + { "218", "25BA", }, // Right Solid Arrowhead + { "219", "25C4", }, // Left Solid Arrowhead + { "220", "2195", }, // Up/Down Arrow + { "221", "203C", }, // Double Exclamation Mark + { "222", "25AC", }, // Thick Horizontal Mark + { "223", "21A8", }, // Up/Down Arrow Baseline + { "224", "2191", }, // Up Arrow + { "225", "2193", }, // Down Arrow + { "226", "2192", }, // Right Arrow + { "227", "2190", }, // Left Arrow + { "229", "2194", }, // Left/Right Arrow + { "230", "25B2", }, // Up Solid Arrowhead + { "231", "25BC", }, // Down Solid Arrowhead + { "232", "20A7", }, // Pesetas Sign + { "233", "2310", }, // Reversed Not Sign + { "234", "2591", }, // Light Shading Character + { "235", "2593", }, // Dark Shading Character + { "236", "2502", }, // Box Draw Line, Vert. 1 + { "237", "2524", }, // Box Draw Right Tee, Vert. 1 Horiz. 1 + { "238", "2561", }, // Box Draw Right Tee, Vert. 1 Horiz. 2 + { "239", "2562", }, // Box Draw Right Tee, Vert. 2 Horiz. 1 + { "240", "2556", }, // Box Draw Upper Right Corner, Vert. 2 Horiz. 1 + { "241", "2555", }, // Box Draw Upper Right Corner, Vert. 1 Horiz. 2 + { "242", "2563", }, // Box Draw Right Tee, Vert. 2 Horiz. 2 + { "243", "2551", }, // Box Draw Lines, Vert. 2 + { "244", "2557", }, // Box Draw Upper Right Corner, Vert. 2 Horiz. 2 + { "245", "255D", }, // Box Draw Lower Right Corner, Vert. 2 Horiz. 2 + { "246", "255C", }, // Box Draw Lower Right Corner, Vert. 2 Horiz. 1 + { "247", "255B", }, // Box Draw Lower Right Corner, Vert. 1 Horiz. 2 + { "248", "2510", }, // Box Draw Upper Right Corner, Vert. 1, Horiz. 1 + { "249", "2514", }, // Box Draw Lower Left Corner, Vert. 1, Horiz. 1 + { "250", "2534", }, // Box Draw Bottom Tee, Vert. 1 Horiz. 1 + { "251", "252C", }, // Box Draw Top Tee, Vert. 1 Horiz. 1 + { "252", "251C", }, // Box Draw Left Tee, Vert. 1 Horiz. 1 + { "253", "2500", }, // Box Draw Line, Horiz. 1 + { "254", "253C", }, // Box Draw Cross, Vert. 1 Horiz. 1 + { "255", "255E", }, // Box Draw Left Tee, Vert. 1 Horiz. 2 + { "256", "255F", }, // Box Draw Left Tee, Vert. 2 Horz. 1 + { "257", "255A", }, // Box Draw Lower Left Corner, Vert. 2 Horiz. 2 + { "258", "2554", }, // Box Draw Upper Left Corner, Vert. 2 Horiz. 2 + { "259", "2569", }, // Box Draw Bottom Tee, Vert. 2 Horiz. 2 + { "260", "2566", }, // Box Draw Top Tee, Vert. 2 Horiz. 2 + { "261", "2560", }, // Box Draw Left Tee, Vert. 2 Horiz. 2 + { "262", "2550", }, // Box Draw Lines, Horiz. 2 + { "263", "256C", }, // Box Draw Cross Open Center, Vert. 2 Horiz. 2 + { "264", "2567", }, // Box Draw Bottom Tee, Vert. 1 Horiz. 2 + { "265", "2568", }, // Box Draw Bottom Tee, Vert. 2 Horiz. 1 + { "266", "2564", }, // Box Draw Top Tee, Vert. 1 Horiz. 2 + { "267", "2565", }, // Box Draw Top Tee, Vert. 2 Horiz. 1 + { "268", "2559", }, // Box Draw Lower Left Corner, Vert. 2 Horiz. 1 + { "269", "2558", }, // Box Draw Lower Left Corner, Vert. 1 Horiz. 2 + { "270", "2552", }, // Box Draw Upper Left Corner, Vert. 1 Horiz. 2 + { "271", "2553", }, // Box Draw Upper Left Corner, Vert. 2 Horiz. 1 + { "272", "256B", }, // Box Draw Cross, Vert. 2 Horiz. 1 + { "273", "256A", }, // Box Draw Cross, Vert. 1 Horiz. 2 + { "274", "2518", }, // Box Draw Lower Right Corner, Vert. 1 Horiz. 1 + { "275", "250C", }, // Box Draw Upper Left Corner, Vert. 1, Horiz. 1 + { "276", "2588", }, // Solid Full High/Wide + { "277", "2584", }, // Bottom Half Solid Rectangle + { "278", "258C", }, // Left Half Solid Rectangle + { "279", "2590", }, // Right Half Solid Rectangle + { "280", "2580", }, // Top Half Solid Rectangle + { "290", "2126", }, // Uppercase Greek Omega, or Ohms + { "292", "221E", }, // Infinity Symbol + { "295", "2229", }, // Set Intersection Symbol + { "296", "2261", }, // Exactly Equals Sign + { "297", "2265", }, // Greater Than or Equal Sign + { "298", "2264", }, // Less Than or Equal Sign + { "299", "2320", }, // Top Integral + { "300", "2321", }, // Bottom Integral + { "301", "2248", }, // Two Wavy Line Approximate Sign +//{ "302", "00B7", }, // Middle Dot, or Centered Period (see 2219) +//{ "302", "2219", }, // Centered Period, Middle Dot + { "302", "2219", }, // Math Dot, Centered Period + { "303", "221A", }, // Radical Symbol, Standalone Diagonal + { "305", "25AA", }, // Small Solid Square Box + { "306", "013F", }, // Uppercase L-Dot + { "307", "0140", }, // Lowercase L-Dot + { "308", "2113", }, // Litre Symbol + { "309", "0149", }, // Lowercase Apostrophe-N + { "310", "2032", }, // Prime, Minutes, or Feet Symbol + { "311", "2033", }, // Double Prime, Seconds, or Inches Symbol + { "312", "2020", }, // Dagger Symbol + { "313", "2122", }, // Trademark Sign + { "314", "2017", }, // Double Underline Character + { "315", "02C7", }, // Lowercase Hacek Accent (Spacing) + { "316", "02DA", }, // Lowercase Ring Accent (Spacing) + { "317", "EFF9", }, // Uppercase Acute Accent (Spacing) + { "318", "EFF8", }, // Uppercase Grave Accent (Spacing) + { "319", "EFF7", }, // Uppercase Circumflex Accent (Spacing) + { "320", "EFF6", }, // Uppercase Dieresis Accent (Spacing) + { "321", "EFF5", }, // Uppercase Tilde Accent (Spacing) + { "322", "EFF4", }, // Uppercase Hacek Accent (Spacing) + { "323", "EFF3", }, // Uppercase Ring Accent (Spacing) + { "324", "2215", }, // Vulgar Fraction Bar + { "325", "2014", }, // Em Dash + { "326", "2013", }, // En Dash + { "327", "2021", }, // Double Dagger Symbol + { "328", "0131", }, // Lowercase Undotted I + { "329", "0027", }, // Neutral Single Quote + { "330", "EFF2", }, // Uppercase Cedilla (Spacing) + { "331", "2022", }, // Small Solid Round Bullet + { "332", "207F", }, // Superior Lowercase N + { "333", "2302", }, // Home Plate + { "335", "0138", }, // Lowercase Kra + { "338", "0166", }, // Uppercase T-Stroke + { "339", "0167", }, // Lowercase T-Stroke + { "340", "014A", }, // Uppercase Eng + { "341", "014B", }, // Lowercase Eng + { "342", "0111", }, // Lowercase D-Stroke + { "400", "0102", }, // Uppercase A Breve + { "401", "0103", }, // Lowercase A Breve + { "402", "0100", }, // Uppercase A Macron + { "403", "0101", }, // Lowercase A Macron + { "404", "0104", }, // Uppercase A Ogonek + { "405", "0105", }, // Lowercase A Ogonek + { "406", "0106", }, // Uppercase C Acute + { "407", "0107", }, // Lowercase C Acute + { "410", "010C", }, // Uppercase C Hacek + { "411", "010D", }, // Lowercase C Hacek + { "414", "010E", }, // Uppercase D Hacek + { "415", "010F", }, // Lowercase D Hacek + { "416", "011A", }, // Uppercase E Hacek + { "417", "011B", }, // Lowercase E Hacek + { "418", "0116", }, // Uppercase E Overdot + { "419", "0117", }, // Lowercase E Overdot + { "420", "0112", }, // Uppercase E Macron + { "421", "0113", }, // Lowercase E Macron + { "422", "0118", }, // Uppercase E Ogonek + { "423", "0119", }, // Lowercase E Ogonek + { "428", "0122", }, // Uppercase G Cedilla + { "429", "0123", }, // Lowercase G Cedilla + { "432", "012E", }, // Uppercase I Ogonek + { "433", "012F", }, // Lowercase I Ogonek + { "434", "012A", }, // Uppercase I Macron + { "435", "012B", }, // Lowercase I Macron + { "438", "0136", }, // Uppercase K Cedilla + { "439", "0137", }, // Lowercase K Cedilla + { "440", "0139", }, // Uppercase L Acute + { "441", "013A", }, // Lowercase L Acute + { "442", "013D", }, // Uppercase L Hacek + { "443", "013E", }, // Lowercase L Hacek + { "444", "013B", }, // Uppercase L Cedilla + { "445", "013C", }, // Lowercase L Cedilla + { "446", "0143", }, // Uppercase N Acute + { "447", "0144", }, // Lowercase N Acute + { "448", "0147", }, // Uppercase N Hacek + { "449", "0148", }, // Lowercase N Hacek + { "450", "0145", }, // Uppercase N Cedilla + { "451", "0146", }, // Lowercase N Cedilla + { "452", "0150", }, // Uppercase O Double Acute + { "453", "0151", }, // Lowercase O Double Acute + { "454", "014C", }, // Uppercase O Macron + { "455", "014D", }, // Lowercase O Macron + { "456", "0154", }, // Uppercase R Acute + { "457", "0155", }, // Lowercase R Acute + { "458", "0158", }, // Uppercase R Hacek + { "459", "0159", }, // Lowercase R Hacek + { "460", "0156", }, // Uppercase R Cedilla + { "461", "0157", }, // Lowercase R Cedilla + { "462", "015A", }, // Uppercase S Acute + { "463", "015B", }, // Lowercase S Acute + { "466", "0164", }, // Uppercase T Hacek + { "467", "0165", }, // Lowercase T Hacek + { "468", "0162", }, // Uppercase T Cedilla + { "469", "0163", }, // Lowercase T Cedilla + { "470", "0168", }, // Uppercase U Tilde + { "471", "0169", }, // Lowercase U Tilde + { "474", "0170", }, // Uppercase U Double Acute + { "475", "0171", }, // Lowercase U Double Acute + { "476", "016E", }, // Uppercase U Ring + { "477", "016F", }, // Lowercase U Ring + { "478", "016A", }, // Uppercase U Macron + { "479", "016B", }, // Lowercase U Macron + { "480", "0172", }, // Uppercase U Ogonek + { "481", "0173", }, // Lowercase U Ogonek + { "482", "0179", }, // Uppercase Z Acute + { "483", "017A", }, // Lowercase Z Acute + { "484", "017B", }, // Uppercase Z Overdot + { "485", "017C", }, // Lowercase Z Overdot + { "486", "0128", }, // Uppercase I Tilde + { "487", "0129", }, // Lowercase I Tilde + { "500", "EFBF", }, // Radical, Diagonal, Composite + { "501", "221D", }, // Proportional To Symbol + { "502", "212F", }, // Napierian (italic e) + { "503", "03F5", }, // Alternate Lowercase Greek Epsilon +//{ "503", "EFEC", }, // Alternate Lowercase Greek Epsilon + { "504", "2234", }, // Therefore Symbol + { "505", "0393", }, // Uppercase Greek Gamma + { "506", "2206", }, // Increment Symbol (Delta) + { "507", "0398", }, // Uppercase Greek Theta + { "508", "039B", }, // Uppercase Greek Lambda + { "509", "039E", }, // Uppercase Greek Xi + { "510", "03A0", }, // Uppercase Greek Pi + { "511", "03A3", }, // Uppercase Greek Sigma + { "512", "03A5", }, // Uppercase Greek Upsilon + { "513", "03A6", }, // Uppercase Greek Phi + { "514", "03A8", }, // Uppercase Greek Psi + { "515", "03A9", }, // Uppercase Greek Omega + { "516", "2207", }, // Nabla Symbol (inverted Delta) + { "517", "2202", }, // Partial Differential Delta Symbol + { "518", "03C2", }, // Lowercase Sigma, Terminal + { "519", "2260", }, // Not Equal To Symbol + { "520", "EFEB", }, // Underline, Composite + { "521", "2235", }, // Because Symbol + { "522", "03B1", }, // Lowercase Greek Alpha + { "523", "03B2", }, // Lowercase Greek Beta + { "524", "03B3", }, // Lowercase Greek Gamma + { "525", "03B4", }, // Lowercase Greek Delta + { "526", "03B5", }, // Lowercase Greek Epsilon + { "527", "03B6", }, // Lowercase Greek Zeta + { "528", "03B7", }, // Lowercase Greek Eta + { "529", "03B8", }, // Lowercase Greek Theta + { "530", "03B9", }, // Lowercase Greek Iota + { "531", "03BA", }, // Lowercase Greek Kappa + { "532", "03BB", }, // Lowercase Greek Lambda + { "533", "03BC", }, // Lowercase Greek Mu + { "534", "03BD", }, // Lowercase Greek Nu + { "535", "03BE", }, // Lowercase Greek Xi + { "536", "03BF", }, // Lowercase Greek Omicron + { "537", "03C0", }, // Lowercase Greek Pi + { "538", "03C1", }, // Lowercase Greek Rho + { "539", "03C3", }, // Lowercase Greek Sigma + { "540", "03C4", }, // Lowercase Greek Tau + { "541", "03C5", }, // Lowercase Greek Upsilon + { "542", "03C6", }, // Lowercase Greek Phi + { "543", "03C7", }, // Lowercase Greek Chi + { "544", "03C8", }, // Lowercase Greek Psi + { "545", "03C9", }, // Lowercase Greek Omega + { "546", "03D1", }, // Lowercase Greek Theta, Open + { "547", "03D5", }, // Lowercase Greek Phi, Open + { "548", "03D6", }, // Lowercase Pi, Alternate + { "549", "2243", }, // Wavy Over Straight Approximate Symbol + { "550", "2262", }, // Not Exactly Equal To Symbol + { "551", "21D1", }, // Up Arrow Double Stroke + { "552", "21D2", }, // Right Arrow Double Stroke + { "553", "21D3", }, // Down Arrow Double Stroke + { "554", "21D0", }, // Left Arrow Double Stroke + { "555", "21D5", }, // Up/Down Arrow Double Stroke + { "556", "21D4", }, // Left/Right Arrow Double Stroke + { "557", "21C4", }, // Right Over Left Arrow + { "558", "21C6", }, // Left Over Right Arrow + { "559", "EFE9", }, // Vector Symbol + { "560", "0305", }, // Overline, Composite + { "561", "2200", }, // For All Symbol, or Universal (inverted A) + { "562", "2203", }, // There Exists Symbol, or Existential (inverted E) + { "563", "22A4", }, // Top Symbol + { "564", "22A5", }, // Bottom Symbol + { "565", "222A", }, // Set Union Symbol + { "566", "2208", }, // Element-Of Symbol + { "567", "220B", }, // Contains Symbol + { "568", "2209", }, // Not-Element-Of Symbol + { "569", "2282", }, // Proper Subset Symbol + { "570", "2283", }, // Proper Superset Symbol + { "571", "2284", }, // Not Proper Subset Symbol + { "572", "2285", }, // Not Proper Superset Symbol + { "573", "2286", }, // Subset Symbol + { "574", "2287", }, // Superset Symbol + { "575", "2295", }, // Plus In Circle Symbol + { "576", "2299", }, // Dot In Circle Symbol + { "577", "2297", }, // Times In Circle Symbol + { "578", "2296", }, // Minus In Circle Symbol + { "579", "2298", }, // Slash In Circle Symbol + { "580", "2227", }, // Logical And Symbol + { "581", "2228", }, // Logical Or Symbol + { "582", "22BB", }, // Exclusive Or Symbol + { "583", "2218", }, // Functional Composition Symbol + { "584", "20DD", }, // Large Open Circle + { "585", "22A3", }, // Assertion Symbol + { "586", "22A2", }, // Backwards Assertion Symbol + { "587", "222B", }, // Integral Symbol + { "588", "222E", }, // Curvilinear Integral Symbol + { "589", "2220", }, // Angle Symbol + { "590", "2205", }, // Empty Set Symbol + { "591", "2135", }, // Hebrew Aleph + { "592", "2136", }, // Hebrew Beth + { "593", "2137", }, // Hebrew Gimmel + { "594", "212D", }, // Fraktur Uppercase C + { "595", "2111", }, // Fraktur Uppercase I + { "596", "211C", }, // Fraktur Uppercase R + { "597", "2128", }, // Fraktur Uppercase Z + { "598", "23A1", }, // Top Segment Left Bracket (Left Square Bracket Upper Corner) + { "599", "23A3", }, // Bottom Segment Left Bracket (Left Square Bracket Lower Corner) + { "600", "239B", }, // Top Segment Left Brace (Left Parenthesis Upper Hook) +//{ "600", "23A7", }, // Top Segment Left Brace (Right Curly Bracket Upper Hook) + { "601", "23A8", }, // Middle Segment Left Brace (Right Curly Bracket Middle Piece) + { "602", "239D", }, // Bottom Segment LeftBrace (Left Parenthesis Lower Hook) +//{ "602", "23A9", }, // Bottom Segment Left Brace (Right Curly Bracket Lower Hook) + { "603", "EFD4", }, // Middle Segment Curvilinear Integral + { "604", "EFD3", }, // Top Left Segment Summation + { "605", "2225", }, // Double Vertical Line, Composite + { "606", "EFD2", }, // Bottom Left Segment Summation + { "607", "EFD1", }, // Bottom Diagonal Summation + { "608", "23A4", }, // Top Segment Right Bracket (Right Square Bracket Upper Corner) + { "609", "23A6", }, // Bottom Segment Right Bracket (Right Square Bracket Lower Corner) + { "610", "239E", }, // Top Segment Right Brace (Right Parenthesis Upper Hook) +//{ "610", "23AB", }, // Top Segment Right Brace (Right Curly Bracket Upper Hook) + { "611", "23AC", }, // Middle Segment Right Brace (Right Curly Bracket Middle Piece) + { "612", "23A0", }, // Bottom Segment Right ( Right Parenthesis Lower Hook) +//{ "612", "23AD", }, // Bottom Segment Right Brace (Right Curly Bracket Lower Hook) + { "613", "239C", }, // Thick Vertical Line, Composite (Left Parenthesis Extension) +//{ "613", "239F", }, // Thick Vertical Line, Composite (Right Parenthesis Extension) +//{ "613", "23AA", }, // Thick Vertical Line, Composite (Curly Bracket Extension) +//{ "613", "23AE", }, // Thick Vertical Line, Composite (Integral Extension) + { "614", "2223", }, // Thin Vertical Line, Composite + { "615", "EFDC", }, // Bottom Segment of Vertical Radical + { "616", "EFD0", }, // Top Right Segment Summation + { "617", "EFCF", }, // Middle Segment Summation + { "618", "EFCE", }, // Bottom Right Segment Summation + { "619", "EFCD", }, // Top Diagonal Summation + { "620", "2213", }, // Minus Over Plus Sign + { "621", "2329", }, // Left Angle Bracket + { "622", "232A", }, // Right Angle Bracket + { "623", "EFFF", }, // Mask Symbol + { "624", "2245", }, // Wavy Over Two Straight Approximate Symbol + { "625", "2197", }, // 45 Degree Arrow + { "626", "2198", }, // -45 Degree Arrow + { "627", "2199", }, // -135 Degree Arrow + { "628", "2196", }, // 135 Degree Arrow + { "629", "25B5", }, // Up Open Triangle + { "630", "25B9", }, // Right Open Triangle + { "631", "25BF", }, // Down Open Triangle + { "632", "25C3", }, // Left Open Triangle + { "633", "226A", }, // Much Less Than Sign + { "634", "226B", }, // Much Greater Than Sign + { "635", "2237", }, // Proportional To Symbol (4 dots) + { "636", "225C", }, // Defined As Symbol + { "637", "03DD", }, // Lowercase Greek Digamma + { "638", "210F", }, // Planck's Constant divided by 2 pi + { "639", "2112", }, // Laplace Transform Symbol + { "640", "EFFE", }, // Power Set + { "641", "2118", }, // Weierstrassian Symbol + { "642", "2211", }, // Summation Symbol (large Sigma) + { "643", "301A", }, // Left Double Bracket + { "644", "EFC9", }, // Middle Segment Double Bracket + { "645", "301B", }, // Right Double Bracket + { "646", "256D", }, // Box Draw Left Top Round Corner + { "647", "2570", }, // Box Draw Left Bottom Round Corner + { "648", "EFC8", }, // Extender Large Union/Product + { "649", "EFC7", }, // Bottom Segment Large Union + { "650", "EFC6", }, // Top Segment Large Intersection + { "651", "EFC5", }, // Top Segment Left Double Bracket + { "652", "EFC4", }, // Bottom Segment Left Double Bracket + { "653", "EFFC", }, // Large Open Square Box + { "654", "25C7", }, // Open Diamond + { "655", "256E", }, // Box Draw Right Top Round Corner + { "656", "256F", }, // Box Draw Right Bottom Round Corner + { "657", "EFC3", }, // Bottom Segment Large Bottom Product + { "658", "EFC2", }, // Top Segment Large Top Product + { "659", "EFC1", }, // Top Segment Right Double Bracket + { "660", "EFC0", }, // Bottom Segment Right Double Bracket + { "661", "EFFB", }, // Large Solid Square Box + { "662", "25C6", }, // Solid Diamond + { "663", "220D", }, // Such That Symbol (rotated lc epsilon) + { "664", "2217", }, // Math Asterisk + { "665", "23AF", }, // Horizontal Arrow Extender (Horizontal Line Extension) + { "666", "EFCB", }, // Double Horizontal Arrow Extender + { "667", "EFCC", }, // Inverted Complement of 0xEFCF or MSL 617 + { "668", "221F", }, // Right Angle Symbol + { "669", "220F", }, // Product Symbol (large Pi) + { "684", "25CA", }, // Lozenge, Diamond + { "1000", "2070", }, // Superior Numeral 0 + { "1001", "2074", }, // Superior Numeral 4 + { "1002", "2075", }, // Superior Numeral 5 + { "1003", "2076", }, // Superior Numeral 6 + { "1004", "2077", }, // Superior Numeral 7 + { "1005", "2078", }, // Superior Numeral 8 + { "1006", "2079", }, // Superior Numeral 9 + { "1017", "201C", }, // Double Open Quote (6) + { "1018", "201D", }, // Double Close Quote (9) + { "1019", "201E", }, // Double Baseline Quote (9) + { "1020", "2003", }, // Em Space + { "1021", "2002", }, // En Space + { "1023", "2009", }, // Thin Space + { "1028", "2026", }, // Ellipsis + { "1030", "EFF1", }, // Uppercase Ogonek (Spacing) + { "1031", "017E", }, // Lowercase Z Hacek + { "1034", "2120", }, // Service Mark + { "1036", "211E", }, // Prescription Sign +//{ "1040", "F001", }, // Lowercase FI Ligature + { "1040", "FB01", }, // Lowercase FI Ligature +//{ "1041", "F002", }, // Lowercase FL Ligature + { "1041", "FB02", }, // Lowercase FL Ligature + { "1042", "FB00", }, // Lowercase FF Ligature + { "1043", "FB03", }, // Lowercase FFI Ligature + { "1044", "FB04", }, // Lowercase FFL Ligature + { "1045", "EFF0", }, // Uppercase Double Acute Accent (Spacing) + { "1047", "0133", }, // Lowercase IJ Ligature + { "1060", "2105", }, // Care Of Symbol + { "1061", "011E", }, // Uppercase G Breve + { "1062", "011F", }, // Lowercase G Breve + { "1063", "015E", }, // Uppercase S Cedilla + { "1064", "015F", }, // Lowercase S Cedilla + { "1065", "0130", }, // Uppercase I Overdot + { "1067", "201A", }, // Single Baseline Quote (9) + { "1068", "2030", }, // Per Mill Sign + { "1069", "20AC", }, // Euro + { "1084", "02C9", }, // Lowercase Macron Accent (Spacing) + { "1086", "02D8", }, // Lowercase Breve Accent (Spacing) + { "1088", "02D9", }, // Lowercase Overdot Accent (Spacing) + { "1090", "0153", }, // Lowercase OE Ligature + { "1091", "0152", }, // Uppercase OE Ligature + { "1092", "2039", }, // Left Pointing Single Angle Quote + { "1093", "203A", }, // Right Pointing Single Angle Quote + { "1094", "25A1", }, // Medium Open Square Box + { "1095", "0141", }, // Uppercase L-Stroke + { "1096", "0142", }, // Lowercase L-Stroke + { "1097", "02DD", }, // Lowercase Double Acute Accent (Spacing) + { "1098", "02DB", }, // Lowercase Ogonek (Spacing) + { "1099", "21B5", }, // Carriage Return Symbol + { "1100", "EFDB", }, // Full Size Serif Registered + { "1101", "EFDA", }, // Full Size Serif Copyright + { "1102", "EFD9", }, // Full Size Serif Trademark + { "1103", "EFD8", }, // Full Size Sans Registered + { "1104", "EFD7", }, // Full Size Sans Copyright + { "1105", "EFD6", }, // Full Size Sans Trademark + { "1106", "017D", }, // Uppercase Z Hacek + { "1107", "0132", }, // Uppercase IJ Ligature + { "1108", "25AB", }, // Small Open Square Box + { "1109", "25E6", }, // Small Open Round Bullet + { "1110", "25CB", }, // Medium Open Round Bullet + { "1111", "EFFA", }, // Large Solid Round Bullet + { "3812", "F000", }, // Ornament, Apple +}; + +// global constructor +static struct hp_msl_to_unicode_init { + hp_msl_to_unicode_init(); +} _hp_msl_to_unicode_init; + +hp_msl_to_unicode_init::hp_msl_to_unicode_init() { + for (unsigned int i = 0; + i < sizeof(hp_msl_to_unicode_list)/sizeof(hp_msl_to_unicode_list[0]); + i++) { + hp_msl_to_unicode *ptu = new hp_msl_to_unicode[1]; + ptu->value = (char *)hp_msl_to_unicode_list[i].value; + hp_msl_to_unicode_table.define(hp_msl_to_unicode_list[i].key, ptu); + } +} + +const char *hp_msl_to_unicode_code(const char *s) +{ + hp_msl_to_unicode *result = hp_msl_to_unicode_table.lookup(s); + return result ? result->value : 0; +} diff --git a/contrib/groff/src/utils/indxbib/Makefile.sub b/contrib/groff/src/utils/indxbib/Makefile.sub index 7736e487ac70..e8f1e6f2cc45 100644 --- a/contrib/groff/src/utils/indxbib/Makefile.sub +++ b/contrib/groff/src/utils/indxbib/Makefile.sub @@ -11,7 +11,7 @@ CSRCS=\ $(srcdir)/signal.c NAMEPREFIX=$(g) -install_data: eign +install_data: $(srcdir)/eign -test -d $(datadir) || $(mkinstalldirs) $(datadir) -test -d $(dataprogramdir) || $(mkinstalldirs) $(dataprogramdir) -test -d $(datasubdir) || $(mkinstalldirs) $(datasubdir) diff --git a/contrib/groff/src/utils/indxbib/indxbib.cpp b/contrib/groff/src/utils/indxbib/indxbib.cpp index 2a60c15687ce..00e99447be62 100644 --- a/contrib/groff/src/utils/indxbib/indxbib.cpp +++ b/contrib/groff/src/utils/indxbib/indxbib.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001, 2002, 2003 +/* Copyright (C) 1989-1992, 2000, 2001, 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 "lib.h" @@ -119,7 +119,7 @@ int main(int argc, char **argv) static char stderr_buf[BUFSIZ]; setbuf(stderr, stderr_buf); - const char *basename = 0; + const char *base_name = 0; typedef int (*parser_t)(const char *); parser_t parser = do_file; const char *directory = 0; @@ -164,7 +164,7 @@ int main(int argc, char **argv) check_integer_arg('n', optarg, 0, &n_ignore_words); break; case 'o': - basename = optarg; + base_name = optarg; break; case 't': check_integer_arg('t', optarg, 1, &truncate_len); @@ -202,33 +202,33 @@ int main(int argc, char **argv) store_filename(ignore_fields); key_buffer = new char[truncate_len]; read_common_words_file(); - if (!basename) - basename = optind < argc ? argv[optind] : DEFAULT_INDEX_NAME; - const char *p = strrchr(basename, DIR_SEPS[0]), *p1; + if (!base_name) + base_name = optind < argc ? argv[optind] : DEFAULT_INDEX_NAME; + const char *p = strrchr(base_name, DIR_SEPS[0]), *p1; const char *sep = &DIR_SEPS[1]; while (*sep) { - p1 = strrchr(basename, *sep); + p1 = strrchr(base_name, *sep); if (p1 && (!p || p1 > p)) p = p1; sep++; } size_t name_max; if (p) { - char *dir = strsave(basename); - dir[p - basename] = '\0'; + char *dir = strsave(base_name); + dir[p - base_name] = '\0'; name_max = file_name_max(dir); a_delete dir; } else name_max = file_name_max("."); - const char *filename = p ? p + 1 : basename; + const char *filename = p ? p + 1 : base_name; if (strlen(filename) + sizeof(INDEX_SUFFIX) - 1 > name_max) fatal("`%1.%2' is too long for a filename", filename, INDEX_SUFFIX); if (p) { p++; - temp_index_file = new char[p - basename + sizeof(TEMP_INDEX_TEMPLATE)]; - memcpy(temp_index_file, basename, p - basename); - strcpy(temp_index_file + (p - basename), TEMP_INDEX_TEMPLATE); + temp_index_file = new char[p - base_name + sizeof(TEMP_INDEX_TEMPLATE)]; + memcpy(temp_index_file, base_name, p - base_name); + strcpy(temp_index_file + (p - base_name), TEMP_INDEX_TEMPLATE); } else { temp_index_file = strsave(TEMP_INDEX_TEMPLATE); @@ -281,8 +281,8 @@ int main(int argc, char **argv) write_hash_table(); if (fclose(indxfp) < 0) fatal("error closing temporary index file: %1", strerror(errno)); - char *index_file = new char[strlen(basename) + sizeof(INDEX_SUFFIX)]; - strcpy(index_file, basename); + char *index_file = new char[strlen(base_name) + sizeof(INDEX_SUFFIX)]; + strcpy(index_file, base_name); strcat(index_file, INDEX_SUFFIX); #ifdef HAVE_RENAME #ifdef __EMX__ @@ -293,7 +293,7 @@ int main(int argc, char **argv) #ifdef __MSDOS__ // RENAME could fail on plain MSDOS filesystems because // INDEX_FILE is an invalid filename, e.g. it has multiple dots. - char *fname = p ? index_file + (p - basename) : 0; + char *fname = p ? index_file + (p - base_name) : 0; char *dot = 0; // Replace the dot with an underscore and try again. diff --git a/contrib/groff/src/utils/indxbib/signal.c b/contrib/groff/src/utils/indxbib/signal.c index fccd28925c9b..20dfd905d035 100644 --- a/contrib/groff/src/utils/indxbib/signal.c +++ b/contrib/groff/src/utils/indxbib/signal.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1992, 2001, 2003, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -15,11 +15,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. */ /* Unfortunately vendors seem to have problems writing a that is correct for C++, so we implement all signal handling in C. */ +#include + #ifdef HAVE_CONFIG_H #include #endif @@ -30,21 +32,26 @@ that is correct for C++, so we implement all signal handling in C. */ #include #endif -#ifndef RETSIGTYPE -#define RETSIGTYPE void +#ifdef __cplusplus +extern "C" { #endif -extern void cleanup(); +extern void cleanup(void); -static RETSIGTYPE handle_fatal_signal(signum) - int signum; +static RETSIGTYPE handle_fatal_signal(int signum) { signal(signum, SIG_DFL); cleanup(); +#ifdef HAVE_KILL kill(getpid(), signum); +#else + /* MS-DOS and Win32 don't have kill(); the best compromise is + probably to use exit() instead. */ + exit(signum); +#endif } -void catch_fatal_signals() +void catch_fatal_signals(void) { #ifdef SIGHUP signal(SIGHUP, handle_fatal_signal); @@ -53,6 +60,10 @@ void catch_fatal_signals() signal(SIGTERM, handle_fatal_signal); } +#ifdef __cplusplus +} +#endif + #ifndef HAVE_RENAME void ignore_fatal_signals() diff --git a/contrib/groff/src/utils/lkbib/lkbib.cpp b/contrib/groff/src/utils/lkbib/lkbib.cpp index 42156eaae19a..b44f245af7b7 100644 --- a/contrib/groff/src/utils/lkbib/lkbib.cpp +++ b/contrib/groff/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/src/utils/lkbib/lkbib.man b/contrib/groff/src/utils/lkbib/lkbib.man index 81067d13d993..29831ee8d4cb 100644 --- a/contrib/groff/src/utils/lkbib/lkbib.man +++ b/contrib/groff/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/src/utils/lookbib/lookbib.cpp b/contrib/groff/src/utils/lookbib/lookbib.cpp index 65e89bcf3975..a573c5f6fa3a 100644 --- a/contrib/groff/src/utils/lookbib/lookbib.cpp +++ b/contrib/groff/src/utils/lookbib/lookbib.cpp @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1989-1992, 2000, 2001, 2002, 2003 + 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 "lib.h" @@ -33,6 +34,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* for isatty() */ #include "posix.h" +#include "nonposix.h" extern "C" { const char *Version_string; diff --git a/contrib/groff/src/utils/lookbib/lookbib.man b/contrib/groff/src/utils/lookbib/lookbib.man index 3d8ba4406cf3..baade0fd5309 100644 --- a/contrib/groff/src/utils/lookbib/lookbib.man +++ b/contrib/groff/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/src/utils/pfbtops/Makefile.sub b/contrib/groff/src/utils/pfbtops/Makefile.sub index a8ed92a52945..451b519be8ac 100644 --- a/contrib/groff/src/utils/pfbtops/Makefile.sub +++ b/contrib/groff/src/utils/pfbtops/Makefile.sub @@ -4,3 +4,4 @@ OBJS=pfbtops.$(OBJEXT) CSRCS=$(srcdir)/pfbtops.c XLIBS=$(LIBGROFF) MLIB=$(LIBM) +LINK.c=$(CCC) $(CCFLAGS) $(LDFLAGS) diff --git a/contrib/groff/src/utils/pfbtops/pfbtops.c b/contrib/groff/src/utils/pfbtops/pfbtops.c index 821d90199b4d..8b394d5d1f03 100644 --- a/contrib/groff/src/utils/pfbtops/pfbtops.c +++ b/contrib/groff/src/utils/pfbtops/pfbtops.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 2001, 2003 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. */ @@ -35,10 +37,11 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define MAX_LINE_LENGTH 78 #define HEX_DIGITS "0123456789abcdef" +extern const char *Version_string; + static char *program_name; -static void error(s) - char *s; +static void error(const char *s) { fprintf(stderr, "%s: %s\n", program_name, s); exit(2); @@ -51,7 +54,7 @@ static void usage(FILE *stream) static void get_text(int n) { - int c, c1; + int c = 0, c1; int in_string = 0; int is_comment = 0; int count = 0; @@ -67,19 +70,27 @@ static void get_text(int n) else if (c == '\\' && in_string) { count++; putchar(c); + if (n-- == 0) + break; c = getchar(); /* don't split octal character representations */ if (c >= '0' && c <= '7') { count++; putchar(c); + if (n-- == 0) + break; c = getchar(); if (c >= '0' && c <= '7') { count++; putchar(c); + if (n-- == 0) + break; c = getchar(); if (c >= '0' && c <= '7') { count++; putchar(c); + if (n-- == 0) + break; c = getchar(); } } @@ -88,9 +99,13 @@ static void get_text(int n) if (c == EOF) error("end of file in text packet"); else if (c == '\r') { + if (n-- == 0) + break; c1 = getchar(); - if (c1 != '\n') + if (c1 != '\n') { ungetc(c1, stdin); + n++; + } c = '\n'; } if (c == '\n') { @@ -112,6 +127,8 @@ static void get_text(int n) /* split at the next whitespace character */ while (c != ' ' && c != '\t' && c != '\f') { putchar(c); + if (n-- == 0) + break; c = getchar(); } count = 0; @@ -146,12 +163,9 @@ static void get_binary(int n) putchar('\n'); } -int main(argc, argv) - int argc; - char **argv; +int main(int argc, char **argv) { int opt; - extern int optind; static const struct option long_options[] = { { "help", no_argument, 0, CHAR_MAX + 1 }, { "version", no_argument, 0, 'v' }, @@ -163,12 +177,9 @@ int main(argc, argv) while ((opt = getopt_long(argc, argv, "v", long_options, NULL)) != EOF) { switch (opt) { case 'v': - { - extern const char *Version_string; - printf("GNU pfbtops (groff) version %s\n", Version_string); - exit(0); - break; - } + printf("GNU pfbtops (groff) version %s\n", Version_string); + exit(0); + break; case CHAR_MAX + 1: /* --help */ usage(stdout); exit(0); diff --git a/contrib/groff/src/utils/pfbtops/pfbtops.man b/contrib/groff/src/utils/pfbtops/pfbtops.man index 627e5c5e3768..c97a29763389 100644 --- a/contrib/groff/src/utils/pfbtops/pfbtops.man +++ b/contrib/groff/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/src/utils/tfmtodit/tfmtodit.cpp b/contrib/groff/src/utils/tfmtodit/tfmtodit.cpp index 9fbbe25f2197..ccf995a32302 100644 --- a/contrib/groff/src/utils/tfmtodit/tfmtodit.cpp +++ b/contrib/groff/src/utils/tfmtodit/tfmtodit.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1989-1992, 2000, 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. */ /* I have tried to incorporate the changes needed for TeX 3.0 tfm files, but I haven't tested them. */ @@ -412,7 +412,7 @@ int gf::load(const char *file) }; int got_an_adjustment = 0; int pending_adjustment = 0; - int left_adj, right_adj; + int left_adj = 0, right_adj = 0; // pacify compiler const int gf_id_byte = 131; errno = 0; FILE *fp = fopen(file, FOPEN_RB); @@ -650,7 +650,7 @@ lig_chars table. `ch' gives the full-name of the character, `name' gives the groff name of the character, `i' gives its index in the encoding, which is filled in later (-1 if it does not appear). */ -struct { +struct S { const char *ch; int i; } lig_chars[] = { @@ -670,7 +670,7 @@ enum { CH_f, CH_i, CH_l, CH_ff, CH_fi, CH_fl, CH_ffi, CH_ffl }; // Each possible ligature appears in this table. -struct { +struct S2 { unsigned char c1, c2, res; const char *ch; } lig_table[] = { diff --git a/contrib/groff/src/utils/xtotroff/Makefile.in b/contrib/groff/src/utils/xtotroff/Makefile.in new file mode 100644 index 000000000000..4b3a7e6cb339 --- /dev/null +++ b/contrib/groff/src/utils/xtotroff/Makefile.in @@ -0,0 +1,62 @@ +# Copyright (C) 2004 +# Free Software Foundation, Inc. +# Written by James Clark (jjc@jclark.com) +# +# This file is part of groff. +# +# groff is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2, or (at your option) any later +# version. +# +# groff is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with groff; see the file COPYING. If not, write to the Free Software +# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. + +builddir=@abs_builddir@ +top_srcdir=@abs_top_srcdir@ +top_builddir=@abs_top_builddir@ +SHELL=@SHELL@ + +devdir=$(top_builddir)/font +driverdir=$(top_srcdir)/src/devices/xditview +mkinstalldirs=$(SHELL) $(top_srcdir)/mkinstalldirs + +xtotroff=$(builddir)/xtotroff +DPIS=75 100 + +all: + @echo "Say \`make fonts' to generate fonts for gxditview." + +fonts: $(xtotroff) $(driverdir)/DESC.in $(driverdir)/FontMap + fonts=`sed -e 's/[ ].*//' $(driverdir)/FontMap`; \ + for dpi in $(DPIS); do \ + echo Making devX$$dpi; \ + test -d $(devdir)/devX$$dpi || \ + $(mkinstalldirs) $(devdir)/devX$$dpi; \ + rm -f $(devdir)/devX$$dpi/DESC; \ + sed -e "s/res 75/res $$dpi/" $(driverdir)/DESC.in \ + >$(devdir)/devX$$dpi/DESC; \ + (cd $(devdir)/devX$$dpi; \ + rm -f Makefile.sub; \ + echo DEV=X$$dpi >Makefile.sub; \ + echo DEVFILES=DESC $$fonts >>Makefile.sub; \ + $(xtotroff) -r $$dpi -s 10 $(driverdir)/FontMap); \ + echo Making devX$$dpi-12; \ + test -d $(devdir)/devX$$dpi-12 || \ + $(mkinstalldirs) $(devdir)/devX$$dpi-12; \ + rm -f $(devdir)/devX$$dpi-12/DESC; \ + sed -e "s/res 75/res $$dpi/" \ + -e 's/unitwidth 10/unitwidth 12/' $(driverdir)/DESC.in \ + >$(devdir)/devX$$dpi-12/DESC; \ + (cd $(devdir)/devX$$dpi-12; \ + rm -f Makefile.sub; \ + echo DEV=X$$dpi-12 >Makefile.sub; \ + echo DEVFILES=DESC $$fonts >>Makefile.sub; \ + $(xtotroff) -r $$dpi -s 12 $(driverdir)/FontMap); \ + done diff --git a/contrib/groff/src/utils/xtotroff/Makefile.sub b/contrib/groff/src/utils/xtotroff/Makefile.sub new file mode 100644 index 000000000000..fc0d76a55cef --- /dev/null +++ b/contrib/groff/src/utils/xtotroff/Makefile.sub @@ -0,0 +1,8 @@ +PROG=xtotroff$(EXEEXT) +MAN1=xtotroff.n +MLIB=$(LIBM) +XLIBS=$(LIBXUTIL) $(LIBGROFF) +EXTRA_CFLAGS=$(X_CFLAGS) +EXTRA_LDFLAGS=$(X_LIBS) $(X_PRE_LIBS) -lXaw -lXt -lX11 $(X_EXTRA_LIBS) +OBJS=xtotroff.$(OBJEXT) +CSRCS=$(srcdir)/xtotroff.c diff --git a/contrib/groff/src/utils/xtotroff/xtotroff.c b/contrib/groff/src/utils/xtotroff/xtotroff.c new file mode 100644 index 000000000000..dafff04b717a --- /dev/null +++ b/contrib/groff/src/utils/xtotroff/xtotroff.c @@ -0,0 +1,299 @@ +/* + * xtotroff + * + * convert X font metrics into troff font metrics + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#define __GETOPT_PREFIX groff_ +#include + +#include "XFontName.h" +#include "DviChar.h" + +#define charWidth(fi,c) \ + ((fi)->per_char[(c) - (fi)->min_char_or_byte2].width) +#define charHeight(fi,c) \ + ((fi)->per_char[(c) - (fi)->min_char_or_byte2].ascent) +#define charDepth(fi,c) \ + ((fi)->per_char[(c) - (fi)->min_char_or_byte2].descent) +#define charLBearing(fi,c) \ + ((fi)->per_char[(c) - (fi)->min_char_or_byte2].lbearing) +#define charRBearing(fi,c) \ + ((fi)->per_char[(c) - (fi)->min_char_or_byte2].rbearing) + +extern const char *Version_string; +static char *program_name; + +Display *dpy; +unsigned resolution = 75; +unsigned point_size = 10; + +int charExists(XFontStruct * fi, int c) +{ + XCharStruct *p; + + /* `c' is always >= 0 */ + if ((unsigned int) c < fi->min_char_or_byte2 + || (unsigned int) c > fi->max_char_or_byte2) + return 0; + p = fi->per_char + (c - fi->min_char_or_byte2); + return p->lbearing != 0 || p->rbearing != 0 || p->width != 0 + || p->ascent != 0 || p->descent != 0 || p->attributes != 0; +} + +/* Canonicalize the font name by replacing scalable parts by *s. */ + +static int CanonicalizeFontName(char *font_name, char *canon_font_name) +{ + unsigned int attributes; + XFontName parsed; + + if (!XParseFontName(font_name, &parsed, &attributes)) { + fprintf(stderr, "not a standard name: %s\n", font_name); + return 0; + } + + attributes &= ~(FontNamePixelSize | FontNameAverageWidth + | FontNamePointSize + | FontNameResolutionX | FontNameResolutionY); + XFormatFontName(&parsed, attributes, canon_font_name); + return 1; +} + +static int +FontNamesAmbiguous(const char *font_name, char **names, int count) +{ + char name1[2048], name2[2048]; + int i; + + if (count == 1) + return 0; + + for (i = 0; i < count; i++) { + if (!CanonicalizeFontName(names[i], i == 0 ? name1 : name2)) { + fprintf(stderr, "bad font name: %s\n", names[i]); + return 1; + } + if (i > 0 && strcmp(name1, name2) != 0) { + fprintf(stderr, "ambiguous font name: %s\n", font_name); + fprintf(stderr, " matches %s\n", names[0]); + fprintf(stderr, " and %s\n", names[i]); + return 1; + } + } + return 0; +} + +static int MapFont(char *font_name, const char *troff_name) +{ + XFontStruct *fi; + int count; + char **names; + FILE *out; + unsigned int c; + unsigned int attributes; + XFontName parsed; + int j, k; + DviCharNameMap *char_map; + char encoding[256]; + char *s; + int wid; + char name_string[2048]; + + if (!XParseFontName(font_name, &parsed, &attributes)) { + fprintf(stderr, "not a standard name: %s\n", font_name); + return 0; + } + + attributes &= ~(FontNamePixelSize | FontNameAverageWidth); + attributes |= FontNameResolutionX; + attributes |= FontNameResolutionY; + attributes |= FontNamePointSize; + parsed.ResolutionX = resolution; + parsed.ResolutionY = resolution; + parsed.PointSize = point_size * 10; + XFormatFontName(&parsed, attributes, name_string); + + names = XListFonts(dpy, name_string, 100000, &count); + if (count < 1) { + fprintf(stderr, "bad font name: %s\n", font_name); + return 0; + } + + if (FontNamesAmbiguous(font_name, names, count)) + return 0; + + XParseFontName(names[0], &parsed, &attributes); + sprintf(encoding, "%s-%s", parsed.CharSetRegistry, + parsed.CharSetEncoding); + for (s = encoding; *s; s++) + if (isupper(*s)) + *s = tolower(*s); + char_map = DviFindMap(encoding); + if (!char_map) { + fprintf(stderr, "not a standard encoding: %s\n", encoding); + return 0; + } + + fi = XLoadQueryFont(dpy, names[0]); + if (!fi) { + fprintf(stderr, "font does not exist: %s\n", names[0]); + return 0; + } + + printf("%s -> %s\n", names[0], troff_name); + + { /* Avoid race while opening file */ + int fd; + (void) unlink(troff_name); + fd = open(troff_name, O_WRONLY | O_CREAT | O_EXCL, 0600); + out = fdopen(fd, "w"); + } + + if (!out) { + perror(troff_name); + return 0; + } + fprintf(out, "name %s\n", troff_name); + if (!strcmp(char_map->encoding, "adobe-fontspecific")) + fprintf(out, "special\n"); + if (charExists(fi, ' ')) { + int w = charWidth(fi, ' '); + if (w > 0) + fprintf(out, "spacewidth %d\n", w); + } + fprintf(out, "charset\n"); + for (c = fi->min_char_or_byte2; c <= fi->max_char_or_byte2; c++) { + const char *name = DviCharName(char_map, c, 0); + if (charExists(fi, c)) { + int param[5]; + + wid = charWidth(fi, c); + + fprintf(out, "%s\t%d", name ? name : "---", wid); + param[0] = charHeight(fi, c); + param[1] = charDepth(fi, c); + param[2] = 0; /* charRBearing (fi, c) - wid */ + param[3] = 0; /* charLBearing (fi, c) */ + param[4] = 0; /* XXX */ + for (j = 0; j < 5; j++) + if (param[j] < 0) + param[j] = 0; + for (j = 4; j >= 0; j--) + if (param[j] != 0) + break; + for (k = 0; k <= j; k++) + fprintf(out, ",%d", param[k]); + fprintf(out, "\t0\t0%o\n", c); + + if (name) { + for (k = 1; DviCharName(char_map, c, k); k++) { + fprintf(out, "%s\t\"\n", DviCharName(char_map, c, k)); + } + } + } + } + XUnloadFont(dpy, fi->fid); + fclose(out); + return 1; +} + +static void usage(FILE *stream) +{ + fprintf(stream, + "usage: %s [-r resolution] [-s pointsize] FontMap\n", + program_name); +} + +int main(int argc, char **argv) +{ + char troff_name[1024]; + char font_name[1024]; + char line[1024]; + char *a, *b, c; + FILE *map; + int opt; + static const struct option long_options[] = { + { "help", no_argument, 0, CHAR_MAX + 1 }, + { "version", no_argument, 0, 'v' }, + { NULL, 0, 0, 0 } + }; + + program_name = argv[0]; + + while ((opt = getopt_long(argc, argv, "gr:s:v", long_options, + NULL)) != EOF) { + switch (opt) { + case 'g': + /* unused; just for compatibility */ + break; + case 'r': + sscanf(optarg, "%u", &resolution); + break; + case 's': + sscanf(optarg, "%u", &point_size); + break; + case 'v': + printf("xtotroff (groff) version %s\n", Version_string); + exit(0); + break; + case CHAR_MAX + 1: /* --help */ + usage(stdout); + exit(0); + break; + case '?': + usage(stderr); + exit(1); + break; + } + } + if (argc - optind != 1) { + usage(stderr); + exit(1); + } + + dpy = XOpenDisplay(0); + if (!dpy) { + fprintf(stderr, "Can't connect to the X server.\n"); + fprintf(stderr, + "Make sure the DISPLAY environment variable is set correctly.\n"); + exit(1); + } + + map = fopen(argv[optind], "r"); + if (map == NULL) { + perror(argv[optind]); + exit(1); + } + + while (fgets(line, sizeof(line), map)) { + for (a = line, b = troff_name; *a; a++, b++) { + c = (*b = *a); + if (c == ' ' || c == '\t') + break; + } + *b = '\0'; + while (*a && (*a == ' ' || *a == '\t')) + ++a; + for (b = font_name; *a; a++, b++) + if ((*b = *a) == '\n') + break; + *b = '\0'; + if (!MapFont(font_name, troff_name)) + exit(1); + } + exit(0); +} diff --git a/contrib/groff/src/utils/xtotroff/xtotroff.man b/contrib/groff/src/utils/xtotroff/xtotroff.man new file mode 100644 index 000000000000..d21bb5c1c7f9 --- /dev/null +++ b/contrib/groff/src/utils/xtotroff/xtotroff.man @@ -0,0 +1,109 @@ +.ig +Copyright (C) 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 preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. +. +. +.TH XTOTROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +. +. +.SH NAME +xtotroff \- convert X font metrics into GNU troff font metrics +. +. +.SH SYNOPSIS +.B xtotroff +[ +.BI \-r \%resolution +] +[ +.BI \-s \%point-size +] +[ +.B \-v +] +.I FontMap +. +.PP +It is possible to have whitespace between a command line option and its +parameter. +. +. +.SH DESCRIPTION +.B xtotroff +takes a +.IR FontMap , +which maps +.B groff +fonts to X11 fonts, +creates GNU +.B troff +metric files for all fonts listed. +Each line in +.I FontMap +consists of GNU +.B troff +font name and an X font name (XLFD) pattern, separated by whitespace. +Example: +. +.PP +.in +2n +.nf +TB -adobe-times-bold-r-normal--*-*-*-*-p-*-iso8859-1 +.fi +.in +. +.PP +The wildcards in the patterns are filled with the arguments to the +.B \-r +and +.B \-s +switches. +If a font name is still ambiguous, +.B xtotroff +aborts. +. +. +.SH OPTIONS +.TP +.BI \-r resolution +Set the resolution for all font patterns in +.IR FontMap . +The value is used for both the horizontal and vertical resolution. +If not specified, a resolution of 75dpi is assumed. +. +.TP +.BI \-s point-size +Set the point size for all font patterns in +.IR FontMap . +If not specified, a size of 10pt is assumed. +. +.TP +.B \-v +Print the version number. +. +. +.SH BUGS +The only supported font encodings are `iso8859-1' and `adobe-fontspecific'. +. +. +.SH "SEE ALSO" +.BR gxditview (@MAN1EXT@) +. +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/contrib/groff/test-groff.in b/contrib/groff/test-groff.in new file mode 100644 index 000000000000..013e16663bfb --- /dev/null +++ b/contrib/groff/test-groff.in @@ -0,0 +1,34 @@ +#! /bin/sh +# This script runs groff without requiring that it be installed. + +SEP='@PATH_SEPARATOR@' +builddir=@abs_top_builddir@/src +srcdir=@abs_top_srcdir@ + +GROFF_BIN_PATH=\ +$builddir/roff/groff$SEP\ +$builddir/roff/troff$SEP\ +$builddir/preproc/pic$SEP\ +$builddir/preproc/eqn$SEP\ +$builddir/preproc/tbl$SEP\ +$builddir/preproc/grn$SEP\ +$builddir/preproc/refer$SEP\ +$builddir/preproc/soelim$SEP\ +$builddir/preproc/html$SEP\ +$builddir/devices/grops$SEP\ +$builddir/devices/grodvi$SEP\ +$builddir/devices/grotty$SEP\ +$builddir/devices/grolj4$SEP\ +$builddir/devices/grolbp$SEP\ +$builddir/devices/grohtml$SEP\ +$builddir/devices/xditview + +XENVIRONMENT=$srcdir/src/devices/xditview/GXditview.ad +export XENVIRONMENT + +GROFF_COMMAND_PREFIX= +GROFF_FONT_PATH=$builddir/../font$SEP$srcdir/font +GROFF_TMAC_PATH=$srcdir/tmac +export GROFF_BIN_PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH + +exec $builddir/roff/groff/groff ${1+"$@"} diff --git a/contrib/groff/tmac/Makefile.sub b/contrib/groff/tmac/Makefile.sub index 0d9cd60a92fd..21e41f55b20d 100644 --- a/contrib/groff/tmac/Makefile.sub +++ b/contrib/groff/tmac/Makefile.sub @@ -19,10 +19,12 @@ NORMALFILES=\ dvi.tmac \ tty.tmac tty-char.tmac \ latin1.tmac latin2.tmac latin9.tmac cp1047.tmac \ + unicode.tmac \ X.tmac Xps.tmac \ lj4.tmac \ lbp.tmac \ html.tmac html-end.tmac \ + devtag.tmac \ europs.tmac \ composite.tmac \ eqnrc \ @@ -124,6 +126,7 @@ uninstall_sub: -rm -f $(tmacdir)/$(tmac_s_prefix)s.tmac -rm -f $(tmacdir)/$(tmac_an_prefix)an.tmac -rm -f $(tmacdir)/man.tmac $(tmacdir)/ms.tmac + -rm -f $(tmacdir)/www.tmac -if cmp -s $(localtmacdir)/man.local $(srcdir)/man.local; then \ rm -f $(localtmacdir)/man.local; \ fi diff --git a/contrib/groff/tmac/TODO b/contrib/groff/tmac/TODO index 5213fc274c08..f9fd4905cf33 100644 --- a/contrib/groff/tmac/TODO +++ b/contrib/groff/tmac/TODO @@ -1,7 +1,5 @@ Support multiple line-spacing. -Improve the device independence of the character definitions. - If we have footnotes in the abstract in RP format, then the footnote will appear on the cover sheet, which it should, but also on the first page, which it should not. diff --git a/contrib/groff/tmac/X.tmac b/contrib/groff/tmac/X.tmac index 4119a8b163f4..df64f223e3d5 100644 --- a/contrib/groff/tmac/X.tmac +++ b/contrib/groff/tmac/X.tmac @@ -76,6 +76,11 @@ .X-achar \['c] \' c c .X-achar \[:Y] \[ad] Y y . +.fchar \[S ,] \o'S\[ac]' +.hcode \[S ,]s +.fchar \[s ,] \o's\[ac]' +.hcode \[s ,]s +. .de X-frac . schar \[\\$1\\$2] \ \v'-.28m'\s[\\En[.s]*6u/10u]\\$1\s0\v'.28m'\ diff --git a/contrib/groff/tmac/Xps.tmac b/contrib/groff/tmac/Xps.tmac index ced2a53c6855..d61ff2c7c1c4 100644 --- a/contrib/groff/tmac/Xps.tmac +++ b/contrib/groff/tmac/Xps.tmac @@ -3,6 +3,9 @@ .do mso ps.tmac .nr _C \n(.C .cp 0 +. +.\" Use this macro only to replace characters which do really exist in +.\" the devps font definition files. .de Xps-char . char \\$1 \Z"\X'ps: invis'\\$2\X'ps: endinvis'"\\$1 .. diff --git a/contrib/groff/tmac/an-old.tmac b/contrib/groff/tmac/an-old.tmac index 063ebce50d37..b51f2e2f4f6f 100644 --- a/contrib/groff/tmac/an-old.tmac +++ b/contrib/groff/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] . @@ -77,17 +98,27 @@ .if \n[an-html] .nr C 1 .if r ps4html .nr C 1 . -.\" we redefine .ne to avoid page breaks; instead, the page length is -.\" increased to the necessary amount (this is needed for tables) -.if n \{\ +.\" we redefine .ne to avoid page breaks if cR is set; instead, the page +.\" length is increased to the necessary amount (this is needed for tables) +.\" +.\" similarly, we redefine .bp if cR is set, adjusting the page length to +.\" the current position so that no empty lines are inserted +.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]) \ . pl +(\\n[an-ne]u - \\n[.t]u + 1v) . . +. +. rn bp an-bp +. de1 bp +. br +. pl \\n[nl]u +. an-bp \\$* +. . .\} . .de set-an-margin @@ -97,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. @@ -300,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 @@ -363,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 @@ -397,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 . \} .. . @@ -446,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 . \} .. . @@ -467,6 +503,7 @@ . \} . if \\n[.$] .as an-result \/\\$1 \\*[an-result] +. ft R . \} .. . diff --git a/contrib/groff/tmac/composite.tmac b/contrib/groff/tmac/composite.tmac index 93269337ae02..95e0f07afc96 100644 --- a/contrib/groff/tmac/composite.tmac +++ b/contrib/groff/tmac/composite.tmac @@ -19,6 +19,7 @@ .do composite " u030B .do composite ah u030C .do composite ac u0327 +.do composite , u0327 .do composite ho u0328 . .\" EOF diff --git a/contrib/groff/tmac/devtag.tmac b/contrib/groff/tmac/devtag.tmac new file mode 100644 index 000000000000..9a26d44a37cc --- /dev/null +++ b/contrib/groff/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/tmac/doc-common b/contrib/groff/tmac/doc-common index 38f13807bf00..5b240bb12d7e 100644 --- a/contrib/groff/tmac/doc-common +++ b/contrib/groff/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 diff --git a/contrib/groff/tmac/doc-ditroff b/contrib/groff/tmac/doc-ditroff index fbfa61bb46c8..84fe88254387 100644 --- a/contrib/groff/tmac/doc-ditroff +++ b/contrib/groff/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. diff --git a/contrib/groff/tmac/doc-nroff b/contrib/groff/tmac/doc-nroff index e8ce14dc53d1..eabb305f5b69 100644 --- a/contrib/groff/tmac/doc-nroff +++ b/contrib/groff/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/tmac/doc-old.tmac b/contrib/groff/tmac/doc-old.tmac index 5e5db5928c7f..b91fabf47d33 100644 --- a/contrib/groff/tmac/doc-old.tmac +++ b/contrib/groff/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/tmac/doc-syms b/contrib/groff/tmac/doc-syms index 3059a4d6019b..4182a087fea4 100644 --- a/contrib/groff/tmac/doc-syms +++ b/contrib/groff/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. diff --git a/contrib/groff/tmac/doc.tmac b/contrib/groff/tmac/doc.tmac index fef20abd495a..083b13a0550a 100644 --- a/contrib/groff/tmac/doc.tmac +++ b/contrib/groff/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. diff --git a/contrib/groff/tmac/dvi.tmac b/contrib/groff/tmac/dvi.tmac index 27fd5b38f9da..ff5a2a27ab1d 100644 --- a/contrib/groff/tmac/dvi.tmac +++ b/contrib/groff/tmac/dvi.tmac @@ -156,68 +156,76 @@ D\v'-.33m'\s0\v'.33m' . hcode \\$1\\$4 .. . -.dvi-achar \[`A] \` A a -.dvi-achar \['A] \' A a -.dvi-achar \[^A] ^ A a -.dvi-achar \[~A] ~ A a -.dvi-achar \[:A] \[ad] A a -.dvi-achar \[oA] \[ao] A a -.dvi-achar \['C] \' C c -.dvi-achar \[`E] \` E e -.dvi-achar \['E] \' E e -.dvi-achar \[^E] ^ E e -.dvi-achar \[:E] \[ad] E e -.dvi-achar \[`I] \` I i -.dvi-achar \['I] \' I i -.dvi-achar \[^I] ^ I i -.dvi-achar \[:I] \[ad] I i -.dvi-achar \[~N] ~ N n -.dvi-achar \[`O] \` O o -.dvi-achar \['O] \' O o -.dvi-achar \[^O] ^ O o -.dvi-achar \[~O] ~ O o -.dvi-achar \[:O] \[ad] O o -.dvi-achar \[`U] \` U u -.dvi-achar \['U] \' U u -.dvi-achar \[^U] ^ U u -.dvi-achar \[:U] \[ad] U u -.dvi-achar \['Y] \' Y y -.dvi-achar \[:Y] \[ad] Y y -.dvi-achar \[`a] \` a a -.dvi-achar \['a] \' a a -.dvi-achar \[^a] ^ a a -.dvi-achar \[~a] ~ a a -.dvi-achar \[:a] \[ad] a a -.dvi-achar \[oa] \[ao] a a -.dvi-achar \['c] \' c c -.dvi-achar \[`e] \` e e -.dvi-achar \['e] \' e e -.dvi-achar \[^e] ^ e e -.dvi-achar \[:e] \[ad] e e -.dvi-achar \[`i] \` \[.i] i -.dvi-achar \['i] \' \[.i] i -.dvi-achar \[^i] ^ \[.i] i -.dvi-achar \[:i] \[ad] \[.i] i -.dvi-achar \[~n] ~ n n -.dvi-achar \[`o] \` o o -.dvi-achar \['o] \' o o -.dvi-achar \[^o] ^ o o -.dvi-achar \[~o] ~ o o -.dvi-achar \[:o] \[ad] o o -.dvi-achar \[`u] \` u u -.dvi-achar \['u] \' u u -.dvi-achar \[^u] ^ u u -.dvi-achar \[:u] \[ad] u u -.dvi-achar \['y] \' y y -.dvi-achar \[:y] \[ad] y y -.dvi-achar \[vs] \[ah] s s -.dvi-achar \[vS] \[ah] S s -.dvi-achar \[vz] \[ah] z z -.dvi-achar \[vZ] \[ah] Z z +.dvi-achar \[`A] \` A a +.dvi-achar \['A] \' A a +.dvi-achar \[^A] ^ A a +.dvi-achar \[~A] ~ A a +.dvi-achar \[:A] \[ad] A a +.dvi-achar \[oA] \[ao] A a +.dvi-achar \['C] \' C c +.dvi-achar \[`E] \` E e +.dvi-achar \['E] \' E e +.dvi-achar \[^E] ^ E e +.dvi-achar \[:E] \[ad] E e +.dvi-achar "\[G ab]" \[ab] G g +.dvi-achar \[`I] \` I i +.dvi-achar \['I] \' I i +.dvi-achar \[^I] ^ I i +.dvi-achar \[:I] \[ad] I i +.dvi-achar "\[I .]" \[a.] I i +.dvi-achar \[~N] ~ N n +.dvi-achar \[`O] \` O o +.dvi-achar \['O] \' O o +.dvi-achar \[^O] ^ O o +.dvi-achar \[~O] ~ O o +.dvi-achar \[:O] \[ad] O o +.dvi-achar \[`U] \` U u +.dvi-achar \['U] \' U u +.dvi-achar \[^U] ^ U u +.dvi-achar \[:U] \[ad] U u +.dvi-achar \['Y] \' Y y +.dvi-achar \[:Y] \[ad] Y y +.dvi-achar \[`a] \` a a +.dvi-achar \['a] \' a a +.dvi-achar \[^a] ^ a a +.dvi-achar \[~a] ~ a a +.dvi-achar \[:a] \[ad] a a +.dvi-achar \[oa] \[ao] a a +.dvi-achar \['c] \' c c +.dvi-achar \[`e] \` e e +.dvi-achar \['e] \' e e +.dvi-achar \[^e] ^ e e +.dvi-achar \[:e] \[ad] e e +.dvi-achar "\[g ab]" \[ab] g g +.dvi-achar \[`i] \` \[.i] i +.dvi-achar \['i] \' \[.i] i +.dvi-achar \[^i] ^ \[.i] i +.dvi-achar \[:i] \[ad] \[.i] i +.dvi-achar \[~n] ~ n n +.dvi-achar \[`o] \` o o +.dvi-achar \['o] \' o o +.dvi-achar \[^o] ^ o o +.dvi-achar \[~o] ~ o o +.dvi-achar \[:o] \[ad] o o +.dvi-achar \[`u] \` u u +.dvi-achar \['u] \' u u +.dvi-achar \[^u] ^ u u +.dvi-achar \[:u] \[ad] u u +.dvi-achar \['y] \' y y +.dvi-achar \[:y] \[ad] y y +.dvi-achar \[vs] \[ah] s s +.dvi-achar \[vS] \[ah] S s +.dvi-achar \[vz] \[ah] z z +.dvi-achar \[vZ] \[ah] Z z +. .fchar \[,C] \o'\[ac]C' .hcode \[,C]c .fchar \[,c] \o'\[ac]c' .hcode \[,c]c +.fchar \[S ,] \o'S\[ac]' +.hcode \[S ,]s +.fchar \[s ,] \o's\[ac]' +.hcode \[s ,]s . .\" now for color definitions .\" diff --git a/contrib/groff/tmac/e.tmac b/contrib/groff/tmac/e.tmac index b8dd9f327eeb..5c685e8b8ff4 100644 --- a/contrib/groff/tmac/e.tmac +++ b/contrib/groff/tmac/e.tmac @@ -55,12 +55,14 @@ .nr _S \\n(.s .nr _V \\n(.v .nr _F \\n(.f +.nr _J \\n(.j .do ds _A \\n[.fam] .nr _I \\n(.i .ev \\$1 .ps \\n(_S .vs \\n(_Vu .ft \\n(_F +.ad \\n(_J .do @fam \\*(_A 'in \\n(_Iu .xl \\n($lu @@ -69,6 +71,7 @@ .rr _V .rr _F .rr _I +.rr _J .ls 1 'ce 0 .. diff --git a/contrib/groff/tmac/groff_man.man b/contrib/groff/tmac/groff_man.man index 5886e4f884fe..985014ebedec 100644 --- a/contrib/groff/tmac/groff_man.man +++ b/contrib/groff/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/tmac/groff_mdoc.man b/contrib/groff/tmac/groff_mdoc.man index 1219f89691b1..004d784fc9f4 100644 --- a/contrib/groff/tmac/groff_mdoc.man +++ b/contrib/groff/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 July 8, 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 @@ -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 @@ -2900,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/tmac/groff_ms.man b/contrib/groff/tmac/groff_ms.man index 5b3e9416bc8f..258670fb423f 100644 --- a/contrib/groff/tmac/groff_ms.man +++ b/contrib/groff/tmac/groff_ms.man @@ -1,6 +1,7 @@ '\" t .ig -Copyright (C) 1989-1995, 2001, 2002 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 @@ -17,10 +18,22 @@ versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. .. +. +.do nr groff_ms_C \n[.C] +.cp 0 +. .TH GROFF_MS @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +. +. +. .SH NAME +. groff_ms \- groff ms macros +. +. +. .SH SYNOPSIS +. .B groff .B \-ms [ @@ -38,8 +51,11 @@ groff_ms \- groff ms macros [ .IR files .\|.\|.\& ] -.\" ----- +. +. +. .SH DESCRIPTION +. This manual page describes the GNU version of the .I ms macros, @@ -60,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 @@ -70,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 @@ -84,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, @@ -92,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, @@ -100,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, @@ -119,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 @@ -149,8 +176,9 @@ T} next page 1i _ .TE .RE +. .LP -.ne 7 +.ne 12 .B Text settings .RS .TS @@ -164,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 @@ -185,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 @@ -197,12 +245,16 @@ cb cb cb cb afCW l l l . Reg. Definition Effective Default _ -FL Footnote length next footnote LL*5/6 +FL Footnote length next footnote \[rs]n[LL]*5/6 FI Footnote indent next footnote 2n FF Footnote format next footnote 0 +FPS Point size next footnote \[rs]n[PS]-2 +FVS Vert. spacing next footnote \[rs]n[FPS]+2 +FPD Para. spacing next footnote \[rs]n[PD]/2 _ .TE .RE +. .LP .ne 6 .B Other settings @@ -219,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 @@ -233,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 @@ -242,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 , @@ -288,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 @@ -308,6 +375,7 @@ The effect is identical to the HTML element. The next paragraph or heading returns margins to normal. +. .PP The .B XP @@ -317,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 @@ -344,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, @@ -370,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 @@ -459,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 @@ -481,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 @@ -490,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. @@ -500,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 @@ -535,10 +829,26 @@ _ .TE .RE .ad +. .LP Use the .B DE macro to end any display type. +The macros +.B Ds +and +.B De +were formerly provided as aliases for +.B DS +and +.BR DE , +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 @@ -556,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" @@ -577,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 @@ -591,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. @@ -609,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. @@ -622,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. @@ -636,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. @@ -646,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. @@ -659,6 +991,7 @@ enclosed by and .B FE macros. +. .PP You can specify symbolic footnotes by placing the mark character (such as @@ -670,6 +1003,7 @@ enclosed by and .B FE macros. +. .PP You can control how .I groff @@ -678,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, @@ -711,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 , @@ -728,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 @@ -741,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 @@ -778,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 @@ -795,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 @@ -815,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 @@ -829,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 @@ -838,6 +1194,7 @@ Add subsequent entries using the macro. For example: .RS +. .PP .ne 8 .nf @@ -851,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 @@ -868,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, @@ -879,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" @@ -888,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 @@ -902,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 @@ -923,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. @@ -940,6 +1337,7 @@ request but instead the and .B RE macros. +. .IP \(bu The number register .B GS @@ -955,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: @@ -984,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 @@ -1006,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 @@ -1017,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 @@ -1031,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@), @@ -1085,11 +1539,18 @@ 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 (\fIlkollar@despammed.com\fR). +. +.cp \n[groff_ms_C] +. .\" Local Variables: .\" mode: nroff .\" End: diff --git a/contrib/groff/tmac/groff_trace.man b/contrib/groff/tmac/groff_trace.man index f7f1ae876f30..bc1c98c17bb3 100644 --- a/contrib/groff/tmac/groff_trace.man +++ b/contrib/groff/tmac/groff_trace.man @@ -36,6 +36,9 @@ FDL in the main directory of the groff source package. .\" Setup .\" -------------------------------------------------------------------- . +.do nr groff_trace_C \n[.C] +.cp 0 +. .mso www.tmac . .if n \{\ @@ -540,6 +543,7 @@ groff .BR info (1) file. . +.cp \n[groff_trace_C] . .\" Local Variables: .\" mode: nroff diff --git a/contrib/groff/tmac/groff_www.man b/contrib/groff/tmac/groff_www.man index d659777d4a5d..e4b3f524b1f8 100644 --- a/contrib/groff/tmac/groff_www.man +++ b/contrib/groff/tmac/groff_www.man @@ -1,5 +1,6 @@ .TH GROFF_WWW @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -.\" Copyright (C) 2000, 2001, 2002 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,11 +17,14 @@ .\" .\" 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 .\" . +.do nr groff_www_C \n[.C] +.cp 0 +. .do mso www.tmac . .\" we need the .LK here as we use it in the middle as an example -- @@ -32,6 +36,8 @@ .SH NAME groff_www \- groff macros for authoring web pages .HR +. +. .SH SYNOPSIS .B "groff \-mwww" [ options ] @@ -42,7 +48,7 @@ file ... This manual page describes the GNU \-mwww macro package, which is part of the groff document formatting system. The manual page is very a basic guide, and the html device driver -.RB ( grohtml ) +.RB ( \%grohtml ) has been completely rewritten but still remains as in an alpha state. It has been included into the distribution so that a lot of people have a chance to test it. @@ -52,12 +58,13 @@ file) if you use .BR \-Thtml . .PP To see the hyperlinks in action, please format this man page with the -.B grohtml +.B \%grohtml device. .PP Here is a summary of the functions found in this macro set. .ta 2iL .nf +\&.JOBNAME split output into multiple files \&.HX automatic heading level cut off; $1 point for sections/headers \&.BCL specify colours on a web page @@ -77,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 @@ -96,10 +110,19 @@ preprocessors is acceptable as input. . .SH REQUESTS .TP -.B HX +.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 n Specify the cut off depth when generating links from section headings. For example, a parameter of\~2 would cause -.B grohtml +.B \%grohtml to generate a list of links for .B .NH\ 1 and @@ -115,7 +138,7 @@ Whereas .RE .IP will tell -.B grohtml +.B \%grohtml that no heading links should be created at all. Another method for turning automatic headings off is by issuing the the command line switch @@ -124,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. @@ -167,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" @@ -191,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 @@ -207,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 @@ -232,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. @@ -249,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 @@ -270,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 @@ -305,52 +376,71 @@ 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. +Force \%grohtml to place the automatically generated links at this position. If this manual page has been processed with .B \-Thtml 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 for +.BR \-Thtml . +No effect for all other devices. . .TP -.B HR -Generate a full-width horizontal rule. -. -.TP -.B NHR -Suppress generation of the top and bottom rules which grohtml emits +.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 @@ -373,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 @@ -394,12 +502,12 @@ information is currently rendered as a PNG image. .SH "SEE ALSO" .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@) -.BR grohtml (@MAN1EXT@), +.BR \%grohtml (@MAN1EXT@), .BR netpbm (1) . . .SH AUTHOR -.B grohtml +.B \%grohtml was written by .MTO gaius@glam.ac.uk "Gaius Mulley" . @@ -410,6 +518,8 @@ Report bugs to the Include a complete, self-contained example that will allow the bug to be reproduced, and say which version of groff you are using. . +.cp \n[groff_www_C] +. .\" Local Variables: .\" mode: nroff .\" End: diff --git a/contrib/groff/tmac/html.tmac b/contrib/groff/tmac/html.tmac index 7843a3cfe57b..9289f82ecc9e 100644 --- a/contrib/groff/tmac/html.tmac +++ b/contrib/groff/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/tmac/latin5.tmac b/contrib/groff/tmac/latin5.tmac new file mode 100644 index 000000000000..8400df4e1317 --- /dev/null +++ b/contrib/groff/tmac/latin5.tmac @@ -0,0 +1,107 @@ +.\" latin5.tmac +.\" +.nr _C \n(.C +.cp 0 +.\" 0xA1 +.trin \[char161]\[r!] +.trin \[char162]\[ct] +.trin \[char163]\[Po] +.trin \[char164]\[Cs] +.trin \[char165]\[Ye] +.trin \[char166]\[bb] +.trin \[char167]\[sc] +.trin \[char168]\[ad] +.trin \[char169]\[co] +.trin \[char170]\[Of] +.trin \[char171]\[Fo] +.trin \[char172]\[tno] +.\" The soft-hyphen character is only an input character +.tr \[char173]\% +.trin \[char174]\[rg] +.trin \[char175]\[a-] +.\" 0xB0 +.trin \[char176]\[de] +.trin \[char177]\[t+-] +.trin \[char178]\[S2] +.trin \[char179]\[S3] +.trin \[char180]\[aa] +.trin \[char181]\[mc] +.trin \[char182]\[ps] +.trin \[char183]\[pc] +.trin \[char184]\[ac] +.trin \[char185]\[S1] +.trin \[char186]\[Om] +.trin \[char187]\[Fc] +.trin \[char188]\[14] +.trin \[char189]\[12] +.trin \[char190]\[34] +.trin \[char191]\[r?] +.\" 0xC0 +.trin \[char192]\[`A] +.trin \[char193]\['A] +.trin \[char194]\[^A] +.trin \[char195]\[~A] +.trin \[char196]\[:A] +.trin \[char197]\[oA] +.trin \[char198]\[AE] +.trin \[char199]\[,C] +.trin \[char200]\[`E] +.trin \[char201]\['E] +.trin \[char202]\[^E] +.trin \[char203]\[:E] +.trin \[char204]\[`I] +.trin \[char205]\['I] +.trin \[char206]\[^I] +.trin \[char207]\[:I] +.\" 0xD0 +.trin \[char208]\[G ab] +.trin \[char209]\[~N] +.trin \[char210]\[`O] +.trin \[char211]\['O] +.trin \[char212]\[^O] +.trin \[char213]\[~O] +.trin \[char214]\[:O] +.trin \[char215]\[tmu] +.trin \[char216]\[/O] +.trin \[char217]\[`U] +.trin \[char218]\['U] +.trin \[char219]\[^U] +.trin \[char220]\[:U] +.trin \[char221]\[I .] +.trin \[char222]\[S ,] +.trin \[char223]\[ss] +.\" 0xE0 +.trin \[char224]\[`a] +.trin \[char225]\['a] +.trin \[char226]\[^a] +.trin \[char227]\[~a] +.trin \[char228]\[:a] +.trin \[char229]\[oa] +.trin \[char230]\[ae] +.trin \[char231]\[,c] +.trin \[char232]\[`e] +.trin \[char233]\['e] +.trin \[char234]\[^e] +.trin \[char235]\[:e] +.trin \[char236]\[`i] +.trin \[char237]\['i] +.trin \[char238]\[^i] +.trin \[char239]\[:i] +.\" 0xF0 +.trin \[char240]\[g ab] +.trin \[char241]\[~n] +.trin \[char242]\[`o] +.trin \[char243]\['o] +.trin \[char244]\[^o] +.trin \[char245]\[~o] +.trin \[char246]\[:o] +.trin \[char247]\[tdi] +.trin \[char248]\[/o] +.trin \[char249]\[`u] +.trin \[char250]\['u] +.trin \[char251]\[^u] +.trin \[char252]\[:u] +.trin \[char253]\[.i] +.trin \[char254]\[s ,] +.trin \[char255]\[:y] +.cp \n[_C] diff --git a/contrib/groff/tmac/lbp.tmac b/contrib/groff/tmac/lbp.tmac index 9ac3be470096..fab29b571340 100644 --- a/contrib/groff/tmac/lbp.tmac +++ b/contrib/groff/tmac/lbp.tmac @@ -57,29 +57,37 @@ . hcode \\$1\\$4 .. . -.lbp-achar \['A] \' A a -.lbp-achar \['C] \' C c -.lbp-achar \['c] \' c c -.lbp-achar \['I] \' I i -.lbp-achar \['O] \' O o -.lbp-achar \['U] \' U u -.lbp-achar \['Y] \' Y y -.lbp-achar \['y] \' y y -.lbp-achar \[:E] \[ad] E e -.lbp-achar \[:I] \[ad] I i -.lbp-achar \[:Y] \[ad] Y y -.lbp-achar \[^A] ^ A a -.lbp-achar \[^E] ^ E e -.lbp-achar \[^I] ^ I i -.lbp-achar \[^O] ^ O o -.lbp-achar \[^U] ^ U u -.lbp-achar \[`A] \` A a -.lbp-achar \[`E] \` E e -.lbp-achar \[`I] \` I i -.lbp-achar \[`O] \` O o -.lbp-achar \[`U] \` U u -.lbp-achar \[~O] ~ O o -.lbp-achar \[~o] ~ o o +.lbp-achar \['A] \' A a +.lbp-achar \[`A] \` A a +.lbp-achar \[^A] ^ A a +.lbp-achar \['C] \' C c +.lbp-achar \['c] \' c c +.lbp-achar \[`E] \` E e +.lbp-achar \[:E] \[ad] E e +.lbp-achar \[^E] ^ E e +.lbp-achar "\[G ab]" \[ab] G g +.lbp-achar "\[g ab]" \[ab] g g +.lbp-achar \['I] \' I i +.lbp-achar \[`I] \` I i +.lbp-achar \[:I] \[ad] I i +.lbp-achar \[^I] ^ I i +.lbp-achar "\[I .]" \[a.] I i +.lbp-achar \['O] \' O o +.lbp-achar \[`O] \` O o +.lbp-achar \[^O] ^ O o +.lbp-achar \[~O] ~ O o +.lbp-achar \[~o] ~ o o +.lbp-achar \['U] \' U u +.lbp-achar \[`U] \` U u +.lbp-achar \[^U] ^ U u +.lbp-achar \['Y] \' Y y +.lbp-achar \['y] \' y y +.lbp-achar \[:Y] \[ad] Y y +. +.fchar \[S ,] \o'S\[ac]' +.hcode \[S ,]s +.fchar \[s ,] \o's\[ac]' +.hcode \[s ,]s . .cp \n(_C . diff --git a/contrib/groff/tmac/papersize.tmac b/contrib/groff/tmac/papersize.tmac index fdfb5801458f..57403491cee1 100644 --- a/contrib/groff/tmac/papersize.tmac +++ b/contrib/groff/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/tmac/ps.tmac b/contrib/groff/tmac/ps.tmac index 05374ac6cc87..39d431826460 100644 --- a/contrib/groff/tmac/ps.tmac +++ b/contrib/groff/tmac/ps.tmac @@ -80,8 +80,16 @@ . hcode \\$1\\$4 .. . -.ps-achar \['C] \' C c -.ps-achar \['c] \' c c +.ps-achar \['C] \' C c +.ps-achar \['c] \' c c +.ps-achar "\[G ab]" \[ab] G g +.ps-achar "\[g ab]" \[ab] g g +.ps-achar "\[I .]" \[a.] I i +. +.fchar \[S ,] \o'S\[ac]' +.hcode \[S ,]s +.fchar \[s ,] \o's\[ac]' +.hcode \[s ,]s . .de ps-frac . schar \[\\$1\\$2] \ diff --git a/contrib/groff/tmac/s.tmac b/contrib/groff/tmac/s.tmac index e36c3e2eca63..7927c233d597 100644 --- a/contrib/groff/tmac/s.tmac +++ b/contrib/groff/tmac/s.tmac @@ -3,7 +3,7 @@ s.tmac -Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002 +Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -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: \\$* .. @@ -50,7 +53,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .de @nop .. .de @init -.nr PO \\n(.o +.if !rPO .nr PO \\n(.o .\" a non-empty environment .ev ne \c @@ -160,6 +163,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .de RP .nr cov*rp-format 1 .if \\n[.$] .if '\\$1'no' .nr cov*rp-no 1 +.if rPO .po \\n(POu .pn 0 .. .de TL @@ -168,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 @@ -187,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 @@ -200,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 @@ -253,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] @@ -317,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 @@ -363,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 @@ -479,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 @@ -498,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 @@ -535,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 @@ -996,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] @@ -1031,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 @@ -1083,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 @@ -1098,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] @@ -1113,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 @@ -1156,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 @@ -1320,13 +1372,40 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .\} .el \!.par*box-draw \\$1 \\$2 .. -.de @SH +.\" \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 -.HTML-TAG ".SH 1" +.. +.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 +. 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 @@ -1336,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 @@ -1351,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 @@ -1449,7 +1532,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .nr nh*hl 0 .\" numbered heading .de @NH -.HTML-TAG ".NH \\$1" .ie '\\$1'S' \{\ . shift . nr nh*hl 0 @@ -1484,14 +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]] .\} -.SH -\\*[SN] +.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 +.DEVTAG-NH "\\$1" +. if '\*(.T'html' .nr need_eo_h 1 +\\*[SN-DOT] .. .\" **************************** .\" ******** module toc ******** @@ -1528,7 +1615,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. . ev . di .\} -.el .@error XS without XE +.el .@error XE without XS .. .de toc*end-entry \\a\\t\\*[toc*num] @@ -1539,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 @@ -1586,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 @@ -1600,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 @@ -1627,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 \{ @@ -1659,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 .. @@ -1862,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 , .. @@ -1977,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/tmac/trace.tmac b/contrib/groff/tmac/trace.tmac index c341b7621483..286c605b870e 100644 --- a/contrib/groff/tmac/trace.tmac +++ b/contrib/groff/tmac/trace.tmac @@ -10,6 +10,7 @@ .eo . .rn de !!de +.rn de1 !!de1 . . .!!de de @@ -17,12 +18,12 @@ . ec . do !!de \$1 . ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** de trace enter: \\$0 \\$@ -. el .do tm1 "\*[!!sp]*** trace enter \$1: \\$0 \\$@ +. el .do tm1 "\\*[!!sp]*** de trace enter \$1: \\$0 \\$@ . do as !!sp " \" . do nop \\*[!!\$1]\\ . do substring !!sp 1 . ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** trace exit: \\$0 \\$@ -. el .do tm1 "\*[!!sp]*** trace exit \$1: \\$0 \\$@ +. el .do tm1 "\\*[!!sp]*** trace exit \$1: \\$0 \\$@ \.. . . do ds !!d1 !!\$1 @@ -32,19 +33,40 @@ . do dei !!d1 !!d2 .. . -.rn am !!am -. -.!!am am +.!!de de1 . do ecs . ec -. do !!am \$1 -. ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** am trace enter: \\$0 \\$@ -. el .do tm1 "\*[!!sp]*** am trace enter \$1: \\$0 \\$@ -. as !!sp " \" +. do !!de \$1 +. ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** de1 trace enter: \\$0 \\$@ +. el .do tm1 "\\*[!!sp]*** de1 trace enter \$1: \\$0 \\$@ +. do as !!sp " \" . do nop \\*[!!\$1]\\ -. substring !!sp 1 +. do substring !!sp 1 . ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** trace exit: \\$0 \\$@ -. el .do tm1 "\*[!!sp]*** trace exit \$1: \\$0 \\$@ +. el .do tm1 "\\*[!!sp]*** trace exit \$1: \\$0 \\$@ +\.. +. +. do ds !!d1 !!\$1 +. do ds !!d2 \$2 +. +. do ecr +. do dei1 !!d1 !!d2 +.. +. +.rn am !!am +.rn am1 !!am1 +. +.!!de am +. do ecs +. ec +. do !!de \$1 +. ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** am trace enter: \\$0 \\$@ +. el .do tm1 "\\*[!!sp]*** am trace enter \$1: \\$0 \\$@ +. do as !!sp " \" +. do nop \\*[!!\$1]\\ +. do substring !!sp 1 +. ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** trace exit: \\$0 \\$@ +. el .do tm1 "\\*[!!sp]*** trace exit \$1: \\$0 \\$@ \.. . . do ds !!a1 !!\$1 @@ -54,6 +76,34 @@ . do ami !!a1 !!a2 .. . +.!!de am1 +. do ecs +. ec +. do !!de \$1 +. ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** am1 trace enter: \\$0 \\$@ +. el .do tm1 "\\*[!!sp]*** am1 trace enter \$1: \\$0 \\$@ +. do as !!sp " \" +. do nop \\*[!!\$1]\\ +. do substring !!sp 1 +. ie "\$1"\\$0" .do tm1 "\\*[!!sp]*** trace exit: \\$0 \\$@ +. el .do tm1 "\\*[!!sp]*** trace exit \$1: \\$0 \\$@ +\.. +. +. do ds !!a1 !!\$1 +. do ds !!a2 \$2 +. +. do ecr +. do ami1 !!a1 !!a2 +.. +. +.rn return !!return +. +.!!de1 return +. substring !!sp 1 +. tm1 "\*[!!sp]*** return +. !!return twice +.. +. .ec . .cp \n(_C diff --git a/contrib/groff/tmac/troffrc b/contrib/groff/tmac/troffrc index 61cb32d1021c..d73ace35f65b 100644 --- a/contrib/groff/tmac/troffrc +++ b/contrib/groff/tmac/troffrc @@ -3,6 +3,9 @@ .\" This is tested by pic. .nr 0p 0 . +.\" Load composite mappings. +.do mso composite.tmac +. .\" Use .do here, so that it works with -C. .\" The groff command defines the .X string if the -X option was given. .ie r.X .do ds troffrc!ps Xps.tmac @@ -37,9 +40,6 @@ troffrc!X100 troffrc!X100-12 troffrc!lj4 troff!lbp troffrc!html .do hpf hyphen.us .do hpfa hyphenex.us . -.\" Load composite mappings. -.do mso composite.tmac -. .\" Handle paper formats .do mso papersize.tmac . diff --git a/contrib/groff/tmac/troffrc-end b/contrib/groff/tmac/troffrc-end index ef4f008237cd..53f1bef50c37 100644 --- a/contrib/groff/tmac/troffrc-end +++ b/contrib/groff/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/tmac/tty-char.tmac b/contrib/groff/tmac/tty-char.tmac index c5483acd974e..eb0efc4bc6cf 100644 --- a/contrib/groff/tmac/tty-char.tmac +++ b/contrib/groff/tmac/tty-char.tmac @@ -141,7 +141,7 @@ .tty-char \[rk] } .tty-char \[lt] ,- .tty-char \[rt] -. -.\" Latin-1 characters +.\" Latin characters .tty-char \[r!] \z,i .tty-char \[Po] \z-L .tty-char \[Cs] \zox @@ -168,6 +168,7 @@ .tty-char \[:A] \z"A .tty-char \[oA] \zoA .tty-char \[,C] \z,C +.tty-char "\[S ,]" \z,S .tty-char \[`E] \z`E .tty-char \['E] \z'E .tty-char \[^E] \z^E @@ -197,6 +198,7 @@ .tty-char \[:a] \z"a .tty-char \[oa] \zoa .tty-char \[,c] \z,c +.tty-char "\[s ,]" \z,s .tty-char \[`e] \z`e .tty-char \['e] \z'e .tty-char \[^e] \z^e @@ -220,6 +222,10 @@ .tty-char \['y] \z'y .tty-char \[Tp] \zpb .tty-char \[:y] \z"y +.\" for Turkish +.tty-char "\[G ab]" G +.tty-char "\[g ab]" g +.tty-char "\[I .]" I .\"tty-char \[:y] \ij .tty-char \[arrowvertex] | .tty-char \[mc] \z,u diff --git a/contrib/groff/tmac/tty.tmac b/contrib/groff/tmac/tty.tmac index 4b337fd3b470..8d69253b1767 100644 --- a/contrib/groff/tmac/tty.tmac +++ b/contrib/groff/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/tmac/unicode.tmac b/contrib/groff/tmac/unicode.tmac new file mode 100644 index 000000000000..6c015b2aa232 --- /dev/null +++ b/contrib/groff/tmac/unicode.tmac @@ -0,0 +1,3 @@ +.\" unicode.tmac +.\" +.\" EOF diff --git a/contrib/groff/tmac/www.tmac b/contrib/groff/tmac/www.tmac index 621da7ebf205..5dcbd1eea73c 100644 --- a/contrib/groff/tmac/www.tmac +++ b/contrib/groff/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 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 @@ -191,7 +208,7 @@ www functionality. It should work with any macro set. .\" Arguments: >=2: [...] .\" .de www:url_breaks_splitted -. nr \\$0:min 5 \" minimal number of characters for next line +. nr \\$0:min 5 \" minimal number of characters for next line . if (\\n[.$] < 2) \ . www:error .\\$0 expects at least 2 arguments. . ds \\$0:res \\$1\" @@ -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 '\\$2'' \ -. HTML \\$1\\$3 +. ie '\\$3'' \ +. ds \\$0:after \& . el \ -. HTML \\$2\\$3 +. ds \\$0:after \&\\$3 +. ie '\\$2'' \ +. HTML-NS \\$1 +. el \ +. 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 \{\ @@ -465,13 +528,14 @@ www functionality. It should work with any macro set. .nr www-right-ll-trap 0 . .de www-finish-left-po -. po -\\n[www-left-indent]u +. po -(\\n[www-left-indent]u + \\n[www-image-gap]u) . wh \\n[www-left-po-trap]u . nr www-left-indent 0 .. . +.\" called when the -R picture is finished .de www-finish-right-ll -. ll +\\n[www-right-indent]u +. ll +(\\n[www-right-indent]u + \\n[www-image-gap]u) . \" now see whether we need to inline www-finish-left-ll . if (\\n[www-left-ll-trap]u > 0) \ . if ((\\n[www-right-ll-trap]u + 1v) >= \\n[www-left-ll-trap]u) \{\ @@ -502,51 +566,161 @@ www functionality. It should work with any macro set. . mk www-left-po-trap . nr www-left-po-trap +1v . wh \\n[www-left-po-trap]u www-finish-left-po -. ll +\\n[www-left-indent]u +. ll +(\\n[www-left-indent]u + \\n[www-image-gap]u) . 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] filename [width] [height] +.\" MPIMG [-R|-L] [-G gap] filename [width [height]] .\" .\" Include a png image and wrap text around it. It will work for .\" -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 .\" is then converted to the EPS format using netpbm utilities. .\" +. +.nr www-htmlimage-gap 0 +. .de MPIMG +. nr www-image-just 1 +. nr www-image-gap 0 +. while (\\n[.$] > 0) \{\ +. if '-L'\\$1' \{\ +. nr www-image-just 1 +. shift +. continue +. \} +. if '-R'\\$1' \{\ +. nr www-image-just 0 +. shift +. continue +. \} +. if '-G'\\$1' \{\ +. nr www-image-gap \\$2 +. nr www-htmlimage-gap (\\$2 * 100 / 240) +. shift 2 +. continue +. \} +. break +. \} +. . nr www-width 1i -. if !'\\$3'' \ -. nr www-width \\$3 -. nr www-height \\n[www-width] -. if !'\\$4'' \ -. nr www-height \\$4 -. nr www-width (\\n[www-width] * 100 / 240) -. nr www-height (\\n[www-height] * 100 / 240) -. ie \\n[www-html] \{\ -. ie '\\$1'-R' \ -. HTML -. el \ -. HTML +. 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 Image \\$1 +. el \ +. 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 \\$2 | pnmcrop -white | @PNMTOPS_NOSETPAGE@ -noturn > \\*[www-unique-name].eps -. ie '\\$1'-R' \{\ +. sy pngtopnm \\$1 | pnmcrop -white | @PNMTOPS_NOSETPAGE@ -noturn > \\*[www-unique-name].eps +. ie !\\n[www-image-just] \{\ . \" we must now disable a possible left image trap . sp -1 . if (\\n[www-left-ll-trap] > 0) \ . 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 \\$3 \\$4 +. 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 -. ll -\\n[www-right-indent]u +. \" we want to have some space between text and image, +. \" so the line length must be shorter +. ll -(\\n[www-right-indent]u + \\n[www-image-gap]u) . mk www-right-ll-trap . nr www-right-ll-trap +(\\n[ps-desht]u - 1v) . wh \\n[www-right-ll-trap]u www-finish-right-ll @@ -560,11 +734,13 @@ 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 \\$3 \\$4 +. 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 -. po +\\n[www-left-indent]u -. ll -\\n[www-left-indent]u +. \" increase offset by gap +. po +(\\n[www-left-indent]u + \\n[www-image-gap]u) +. \" decrease line length by gap +. ll -(\\n[www-left-indent]u + \\n[www-image-gap]u) . mk www-left-ll-trap . nr www-left-ll-trap +(\\n[ps-desht]u - 1v) . wh \\n[www-left-ll-trap]u www-finish-left-ll @@ -595,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 @@ -610,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 @@ -632,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. @@ -652,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 . \} .. .\" -------------------------------------------------------------------- @@ -708,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-level +. 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 +. \} +.. +.\" -------------------------------------------------------------------- +.\" +.\" 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 . \} .. .\" -------------------------------------------------------------------- @@ -743,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 \{\ @@ -754,20 +1078,24 @@ 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 . bp . \} . el \{\ -. nr dummy \w'\\$1'u -. nr dcht ((\\n[.v] + \\n[rst]) * \\n[.ps] / \\n[rst]) -. char \[dcap] \m[\\*[www-dropcolor]]\s'\\n[dcht]u'\\$1 -. nop \v'\\n[.v]u'\\[dcap]\v'-\\n[.v]u'\c -' ti \w'\\[dcap]'u +. ie n \ +. nop \\$1\c +. el \{\ +. nr dummy \w'\\$1'u +. nr dcht ((\\n[.v] + \\n[rst]) * \\n[.ps] / \\n[rst]) +. char \[dcap] \m[\\*[www-dropcolor]]\s'\\n[dcht]u'\\$1 +. nop \v'\\n[.v]u'\\[dcap]\v'-\\n[.v]u'\c +' ti \w'\\[dcap]'u +. \} . \} . \} . nop \\$2 @@ -843,6 +1171,25 @@ www functionality. It should work with any macro set. .. . .\" -------------------------------------------------------------------- +.\" JOBNAME +.\" +.\" Generate multiple output files containing the html. +.\" A file is split whenever a .SH or .NH 1 is encountered. +.\" The argument to JOBNAME is the file stem for future output files. +.\" +.de JOBNAME +. DEVTAG .job-name \\$1 +.. +.\" -------------------------------------------------------------------- +.\" HEAD +.\" +.\" Adds information to the section of the html +.\" document +.\" -------------------------------------------------------------------- +.de HEAD +. DEVTAG .head "\\$*" +.. +.\" -------------------------------------------------------------------- .\" Final Setup .\" -------------------------------------------------------------------- .