diff -ruN groff-1.19/COPYING groff-1.19.1/COPYING --- groff-1.19/COPYING Sun Feb 6 10:34:03 2000 +++ groff-1.19.1/COPYING Thu Mar 27 17:11:54 2003 @@ -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. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -279,7 +279,7 @@ 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 @@ 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 @@ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 -ruN groff-1.19/ChangeLog groff-1.19.1/ChangeLog --- groff-1.19/ChangeLog Tue Apr 29 15:34:58 2003 +++ groff-1.19.1/ChangeLog Wed May 12 11:46:47 2004 @@ -1,5 +1,1585 @@ +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/nroff.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. @@ -2467,7 +4047,7 @@ 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. + (doc-do-Bd-args, doc-do-Bl-args): Changed accordingly. * NEWS, doc/groff.texinfo, man/groff_diff.man: Updated. diff -ruN groff-1.19/FDL groff-1.19.1/FDL --- groff-1.19/FDL Wed May 17 23:48:11 2000 +++ groff-1.19.1/FDL Mon Dec 8 11:11:46 2003 @@ -1,7 +1,8 @@ GNU Free Documentation License - Version 1.1, March 2000 + Version 1.2, November 2002 - Copyright (C) 2000 Free Software Foundation, Inc. + + Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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". - -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. + 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 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 -ruN groff-1.19/INSTALL groff-1.19.1/INSTALL --- groff-1.19/INSTALL Sat Apr 12 16:07:57 2003 +++ groff-1.19.1/INSTALL Tue May 4 07:50:35 2004 @@ -5,6 +5,9 @@ (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,9 +28,10 @@ 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 @@ -43,8 +47,9 @@ 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 -ruN groff-1.19/LICENSE groff-1.19.1/LICENSE --- groff-1.19/LICENSE Thu Jan 1 01:00:00 1970 +++ groff-1.19.1/LICENSE Thu Dec 11 09:17:31 2003 @@ -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 -ruN groff-1.19/MANIFEST groff-1.19.1/MANIFEST --- groff-1.19/MANIFEST Sat Apr 12 16:07:33 2003 +++ groff-1.19.1/MANIFEST Tue May 11 22:12:50 2004 @@ -1,10 +1,10 @@ MANIFEST -Last update: 13 Apr 2003 +Last update: 10 May 2004 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 Free Software Foundation, Inc. written by Bernd Warken maintained by Werner Lemberg @@ -31,13 +31,15 @@ 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.CVS Development build information. + 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,10 +50,12 @@ ./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. + 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. diff -ruN groff-1.19/MORE.STUFF groff-1.19.1/MORE.STUFF --- groff-1.19/MORE.STUFF Wed Aug 7 00:38:56 2002 +++ groff-1.19.1/MORE.STUFF Thu Jun 12 13:54:56 2003 @@ -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 @@ 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 @@ 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 @@ 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 -ruN groff-1.19/Makefile.comm groff-1.19.1/Makefile.comm --- groff-1.19/Makefile.comm Sat Apr 12 16:06:46 2003 +++ groff-1.19.1/Makefile.comm Tue Mar 9 07:47:58 2004 @@ -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. @@ -19,7 +19,6 @@ # # 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) @@ -119,7 +118,7 @@ -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,7 +131,7 @@ -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) $(COMPILE.cpp) $(YTABC) .man.n: @@ -235,32 +234,35 @@ -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 +280,9 @@ || $(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 -ruN groff-1.19/Makefile.in groff-1.19.1/Makefile.in --- groff-1.19/Makefile.in Tue Apr 22 16:39:08 2003 +++ groff-1.19.1/Makefile.in Wed Apr 7 17:33:39 2004 @@ -1,4 +1,5 @@ -# Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 1989-2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # # This file is part of groff. @@ -17,11 +18,21 @@ # with groff; see the file COPYING. If not, write to the Free Software # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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. @@ -121,7 +132,7 @@ 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 @@ -137,7 +148,7 @@ # 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@ @@ -232,6 +243,7 @@ # -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 +255,7 @@ # -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 +263,21 @@ # -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 @@ -279,6 +298,7 @@ # 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. @@ -317,9 +337,11 @@ 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= @@ -362,8 +384,11 @@ "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)" \ "YACC=$(YACC)" \ "YACCFLAGS=$(YACCFLAGS)" \ @@ -413,7 +438,6 @@ "top_srcdir=$(top_srcdir)" \ "version=$(version)" -SHELL=/bin/sh INCDIRS=src/include LIBDIRS=\ src/libs/libgroff \ @@ -442,7 +466,8 @@ src/utils/lkbib \ src/utils/addftinfo CPROGDIRS=src/utils/pfbtops -PROGDIRS=$(CCPROGDIRS) $(CPROGDIRS) +PROGDEPDIRS=arch/misc +PROGDIRS=$(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS) DEVDIRS=\ font/devps \ font/devdvi \ @@ -465,6 +490,7 @@ contrib/mm \ contrib/pic2graph \ contrib/eqn2graph \ + contrib/grap2graph \ contrib/groffer \ contrib/mom \ doc @@ -493,8 +519,8 @@ # 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 +541,10 @@ $(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 +557,10 @@ $(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 +573,10 @@ $(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 $@; \ @@ -560,9 +589,10 @@ $(DEVDIRS) $(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 +601,12 @@ -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 $@; \ diff -ruN groff-1.19/Makefile.sub groff-1.19.1/Makefile.sub --- groff-1.19/Makefile.sub Tue Mar 4 07:18:02 2003 +++ groff-1.19.1/Makefile.sub Wed Apr 7 15:54:23 2004 @@ -4,7 +4,11 @@ config.cache \ stamp-h \ Makefile \ + test-groff \ src/xditview/Imakefile \ + src/xditview/Makefile \ + src/xditview/*.o \ + src/xditview/gxditview src/xditview/xtotroff \ $(srcdir)/src/xditview/gxditview._man \ src/include/config.h CLEANADD=Makefile.cfg conftest* diff -ruN groff-1.19/NEWS groff-1.19.1/NEWS --- groff-1.19/NEWS Tue Apr 29 09:23:21 2003 +++ groff-1.19.1/NEWS Tue May 11 21:32:58 2004 @@ -1,6 +1,134 @@ 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.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 +145,9 @@ 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 +238,10 @@ 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 +447,7 @@ 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 -ruN groff-1.19/PROBLEMS groff-1.19.1/PROBLEMS --- groff-1.19/PROBLEMS Sun Apr 20 06:31:11 2003 +++ groff-1.19.1/PROBLEMS Tue May 11 21:59:42 2004 @@ -11,6 +11,103 @@ +* 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 @@ 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 @@ 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,8 +449,8 @@ 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 +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. ---------------------------------------------------------------------- @@ -362,7 +459,7 @@ 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'. ---------------------------------------------------------------------- @@ -622,6 +719,30 @@ ---------------------------------------------------------------------- +* My compiler fails to build src/utils/indxbib/signal.c, giving + messages like + + signal.c: cannot convert `int (*)(int)' to `void (*)(int)' + for argument `2' to `void (* signal(int, void (*)(int)))(int)' + + I use a C++ compiler for compiling C programs. + +The current version of the configure script doesn't handle C++ very +well if used as a substitute for a C compiler. In this particular +case, it failed to recognize the proper return type of signal handlers. +An easy fix is to manually edit the file `src/include/config.h' +(created by configure), changing the line + + #define RETSIGTYPE int + +to + + #define RETSIGTYPE void + +Say `make clean' before restarting compilation. + +---------------------------------------------------------------------- + * There are many empty `Makefile.dep' files. Is this a bug? No. Real dependency files are created with a `make depend' call. @@ -702,7 +823,7 @@ ---------------------------------------------------------------------- -* On Ultrix, the make stops with the message +* On Ultrix, the make program stops with the message *** Error code 1 @@ -790,6 +911,7 @@ ---------------------------------------------------------------------- -* 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 -ruN groff-1.19/PROJECTS groff-1.19.1/PROJECTS --- groff-1.19/PROJECTS Mon Mar 6 11:15:38 2000 +++ groff-1.19.1/PROJECTS Tue May 11 21:48:11 2004 @@ -9,8 +9,6 @@ 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 -ruN groff-1.19/README groff-1.19.1/README --- groff-1.19/README Sat Aug 10 09:46:01 2002 +++ groff-1.19.1/README Tue May 11 20:53:28 2004 @@ -19,13 +19,10 @@ 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 pub/gnu/groff. -A CVS repository is now available, containing the current development +A CVS repository is available, containing the current development version of groff. You can access it with the commands export CVSROOT=:pserver:anoncvs@anoncvs.ffii.org:/var/cvs @@ -57,6 +54,11 @@ cd groff- gunzip -c ../groff--current.diff.gz | patch -p1 +Finally, it is possible to access the CVS with a browser by pointing it +to + + http://www.ffii.org/cgi-bin/viewcvs.cgi/groff + Please report bugs using the form in the file BUG-REPORT; the idea of 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 @@ -67,7 +69,7 @@ Three mailing lists are available: bug-groff@gnu.org for reporting bugs - groff@gnu.org for general discussion of groff + groff@ffii.org for general discussion of groff groff-commit@ffii.org a read-only list showing logs of commitments to the CVS repository @@ -76,7 +78,10 @@ To subscribe, send a mail to -request@ (example: groff-request@ffii.org) with the word `subscribe' in either the subject -or body of the email (don't include the quotes). +or body of the email (don't include the quotes) or have a look at the +groff mailing list web page at + + http://ffii.org/mailman/listinfo/groff GNU groff was written by James Clark . It is now maintained by Ted Harding and Werner diff -ruN groff-1.19/README.CVS groff-1.19.1/README.CVS --- groff-1.19/README.CVS Sun Apr 20 06:20:22 2003 +++ groff-1.19.1/README.CVS Tue May 4 07:51:11 2004 @@ -1,6 +1,6 @@ You need the following tools to build groff directly from CVS: the netpbm package - texinfo >= 4.3 + texinfo 4.6 (4.7 doesn't work due to bugs in texinfo) bison >= 1.875b or byacc ghostscript diff -ruN groff-1.19/README.MinGW groff-1.19.1/README.MinGW --- groff-1.19/README.MinGW Thu Jan 1 01:00:00 1970 +++ groff-1.19.1/README.MinGW Tue May 11 21:45:28 2004 @@ -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 -ruN groff-1.19/README.WIN32 groff-1.19.1/README.WIN32 --- groff-1.19/README.WIN32 Mon Jun 26 15:57:25 2000 +++ groff-1.19.1/README.WIN32 Thu Jan 1 01:00:00 1970 @@ -1,68 +0,0 @@ - -WIN32 port of GROFF and friends done by Blake McBride -(blake@florida-software.com) 4/14/00. - -This port differs from other ports in that it uses the Microsoft -compiler. The changes were done such that they only have effect on -the code when compiled with the Microsoft compiler. - -Note that not all preprocessors and output devices have been ported; -missing are grohtml, grolbp, grn, refer, soelim, and groff. Besides -these programs, no utility program has been ported. Of course, -gxditview (which only runs on the X Window System, the standard Unix -GUI) is missing also. - - -The following programs were used, running on Windows NT 4.0: - - Microsoft Visual C++ 6.0 - Unix utilities under NT (gzip, tar, patch) - - -Build Instructions ------------------- - -. Unpack groff (using gzip & tar) as follows: - - cd \ - gzip -dc groff-1.16.tar.gz | tar xvf - - -. Now apply the patch file `win32-diffs': - - cd \groff-1.16 - patch -p1 < win32-diffs - - Note that with older versions of `patch', you will get a lot of - *.orig files (most of them are empty) which can be safely deleted. - -. Edit the file `src/include/defs.h' and adapt the path names to - your needs. - -. Build everything by typing: - - nmake -f Makefile.msc - -You are done. - -The `bin' directory contains some .cmd files to help show how to run -stuff. Since Windows 95/98 doesn't understand .cmd files, if you are -operating under that OS, you'll have to rename them to .bat files. -.bat files do have output redirection problems. - - -The changes I made fall into two categories. - -1. Makefiles. Several makefiles were added. All makefiles were named - Makefile.msc. - -2. The Groff build includes several scripts which generate auxiliary - files used by groff (such as DESC, I, R, prologue, etc). - - -Directories needed at runtime ------------------------------ - -bin -font -tmac -mm (copied, including sub-directories, from contrib/mm) diff -ruN groff-1.19/REVISION groff-1.19.1/REVISION --- groff-1.19/REVISION Tue Apr 29 09:18:53 2003 +++ groff-1.19.1/REVISION Tue Apr 29 23:49:29 2003 @@ -1 +1 @@ -0 +1 diff -ruN groff-1.19/TODO groff-1.19.1/TODO --- groff-1.19/TODO Sat Apr 29 08:02:24 2000 +++ groff-1.19.1/TODO Tue May 11 21:46:36 2004 @@ -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 -ruN groff-1.19/aclocal.m4 groff-1.19.1/aclocal.m4 --- groff-1.19/aclocal.m4 Thu Apr 17 18:27:43 2003 +++ groff-1.19.1/aclocal.m4 Tue Dec 9 18:39:30 2003 @@ -1,309 +1,401 @@ -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 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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], + [make_html=html + make_install_html=install_html + + missing= + AC_FOREACH([groff_prog], + [pnmcut pnmcrop pnmtopng psselect pnmtops gs], + [AC_CHECK_PROG(groff_prog, groff_prog, [found], [missing]) + if test $[]groff_prog = missing; then + missing="$missing groff_prog" + 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([ 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]) + ]) + fi + + AC_SUBST([make_html]) + AC_SUBST([make_install_html])]) + +# 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])]) + +# 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 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++])]) + +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_STDINT_H], + [AC_LANG_PUSH([C++]) + AC_MSG_CHECKING([C++ ]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + +#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++])]) + +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 +405,307 @@ ((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 +724,141 @@ #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([for inttypes.h]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + +#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++])]) + +# 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)]) diff -ruN groff-1.19/arch/misc/Makefile.sub groff-1.19.1/arch/misc/Makefile.sub --- groff-1.19/arch/misc/Makefile.sub Thu Jan 1 01:00:00 1970 +++ groff-1.19.1/arch/misc/Makefile.sub Wed Apr 7 19:39:37 2004 @@ -0,0 +1,27 @@ +# 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +CLEANADD=shdeps.sed + +all: shdeps.sed + +shdeps.sed: shdeps.sh + $(SHELL) $< "$(RT_SEP)" "$(SH_SEP)" "$(bindir)" > $@ + +# eof diff -ruN groff-1.19/arch/misc/shdeps.sh groff-1.19.1/arch/misc/shdeps.sh --- groff-1.19/arch/misc/shdeps.sh Thu Jan 1 01:00:00 1970 +++ groff-1.19.1/arch/misc/shdeps.sh Fri Apr 9 07:40:37 2004 @@ -0,0 +1,89 @@ +#!/bin/sh +# shdeps.sh: Generate OS dependency fixups, for `groff' shell scripts +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Keith Marshall (keith.d.marshall@ntlworld.com) +# +# Invoked only by `make', as: +# $(SHELL) shdeps.sh "$(RT_SEP)" "$(SH_SEP)" "$(bindir)" > shdeps.sed +# +# 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. + +cat << ETX +# shdeps.sed: Script generated automatically by \`make' -- do not modify! + +/^$/N +/@GROFF_BIN_PATH_SETUP@/c\\ +ETX + +if [ "$1$2" = "::" ] +then + # `PATH_SEPARATOR' is `:' both at `groff' run time, and in `make', + # implying an implementation which is completely POSIX compliant. + # Simply apply the `GROFF_BIN_PATH' and `PATH_SEPARATOR' values + # determined by `configure', in all cases. + + cat << ETX +\\ +GROFF_RUNTIME="\${GROFF_BIN_PATH=$3}:" +ETX + +else + # `PATH_SEPARATOR' is NOT always `:', + # which suggests an implementation for a Microsoft platform. + # We need to choose the `GROFF_BIN_PATH' format and `PATH_SEPARATOR' + # which will suit the user's choice of shell. + # + # Note that some Windows users may specify the `--prefix' path + # using backslash characters, instead of `/', preferred by POSIX, + # so we will also fix that up. + + POSIX_BINDIR=`echo $3 | tr '\\\\' /` + cat << ETX +# (The value required is dependent on the user's choice of shell,\\ +# and its associated POSIX emulation capabilities.)\\ +\\ +case "\$OSTYPE" in\\ + msys)\\ + GROFF_RUNTIME=\${GROFF_BIN_PATH="` + case "$POSIX_BINDIR" in + [a-zA-Z]:*) + IFS=':' + set -- $POSIX_BINDIR + case "$2" in + /*) POSIX_BINDIR="/$1$2" ;; + *) POSIX_BINDIR="/$1/$2" ;; + esac + shift 2 + for dir + do + POSIX_BINDIR="$POSIX_BINDIR:$dir" + done + ;; + esac + echo "$POSIX_BINDIR"`"}":" ;;\\ + cygwin)\\ + : \${GROFF_BIN_PATH="\`cygpath -w '$POSIX_BINDIR'\`"}\\ + GROFF_RUNTIME=\`cygpath "\$GROFF_BIN_PATH"\`":" ;;\\ + *)\\ + GROFF_RUNTIME=\${GROFF_BIN_PATH="$POSIX_BINDIR"}";" ;;\\ +esac +ETX + +fi + +# eof diff -ruN groff-1.19/configure groff-1.19.1/configure --- groff-1.19/configure Tue Apr 22 16:36:52 2003 +++ groff-1.19.1/configure Tue Dec 30 05:03:25 2003 @@ -1,9 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.54. +# Generated by GNU Autoconf 2.59. # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -20,9 +19,10 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # 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 @@ -36,9 +36,12 @@ 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 @@ -82,15 +85,15 @@ # 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 + 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 conftest.sh + rm -f conf$$.sh fi @@ -215,16 +218,17 @@ 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 @@ -305,7 +309,7 @@ # 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 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 LIBC LIBM LIBOBJS BROKEN_SPOOLER_FLAGS PAGE g sys_tmac_prefix tmac_wrap GROFF_PATH_SEPARATOR pnmcut pnmcrop pnmtopng psselect pnmtops gs make_html make_install_html pnmtops_nosetpage LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -664,7 +668,7 @@ # Be sure to have absolute paths. 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 +708,10 @@ # 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 +811,9 @@ 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 @@ -888,12 +892,45 @@ 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 paths, 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,7 +941,7 @@ 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 @@ -918,8 +955,7 @@ if $ac_init_version; then cat <<\_ACEOF -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -Free Software Foundation, Inc. +Copyright (C) 2003 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 +967,7 @@ 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.59. Invocation command line was $ $0 $@ @@ -983,24 +1019,54 @@ # 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 +1090,12 @@ 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 +1124,7 @@ 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,7 +1143,7 @@ echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core core.* *.core && + rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 @@ -1157,7 +1223,7 @@ # 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 +1240,13 @@ ,);; *) 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. @@ -1228,13 +1294,12 @@ + 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' @@ -1544,8 +1609,10 @@ 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 +1636,11 @@ (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,12 +1651,12 @@ } _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[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 @@ -1600,27 +1670,39 @@ # 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 +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +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 ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [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 +1729,11 @@ 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 +1741,7 @@ 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 +1766,16 @@ 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 +1792,11 @@ 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 +1821,12 @@ 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 +1842,11 @@ 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 +1861,21 @@ _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 +1884,11 @@ 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 @@ -1798,8 +1904,11 @@ 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 () @@ -1811,11 +1920,21 @@ _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 +1943,11 @@ ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_prog_cc_g=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: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 @@ -1854,8 +1974,11 @@ 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 +2001,16 @@ 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 -std1 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 -std1. */ +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);}; @@ -1904,11 +2037,21 @@ 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 +2061,10 @@ 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 +2092,28 @@ _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 +2121,13 @@ '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 +2138,21 @@ _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 +2161,17 @@ : 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 +2183,21 @@ _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 +2206,10 @@ 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 +2220,10 @@ 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' @@ -2167,8 +2349,11 @@ 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 +2368,21 @@ _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 +2391,11 @@ 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 @@ -2215,8 +2411,11 @@ 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 () @@ -2228,11 +2427,21 @@ _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 +2450,11 @@ ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_prog_cxx_g=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: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 @@ -2264,8 +2474,7 @@ 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 +2482,13 @@ '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 +2499,21 @@ _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 +2522,17 @@ : 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 +2544,21 @@ _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 +2567,10 @@ 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 +2587,34 @@ -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 +2632,53 @@ 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 +2697,62 @@ 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 +2762,21 @@ 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 +2785,57 @@ 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. */ + -int -main () -{ /* Treat any failure as ASCII for compatibility with existing art. - Use compile-time rather than run-time tests for cross-compiler - tolerance. */ + 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 () +{ + ; 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 +2844,32 @@ 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 -fi + esac + 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 +2909,7 @@ 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 +2949,11 @@ 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 +2993,32 @@ 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 + + # 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 + 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 "$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 @@ -2888,8 +3206,9 @@ 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 +3261,7 @@ # 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 +3278,7 @@ 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 +3286,20 @@ # 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 ;; @@ -3019,24 +3340,33 @@ 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 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 + 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 ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3060,13 +3390,22 @@ 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 -#line $LINENO "configure" -#include "confdefs.h" -#include - Syntax error +/* 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 @@ -3078,6 +3417,7 @@ (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 @@ -3088,7 +3428,8 @@ : else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi @@ -3097,8 +3438,11 @@ # 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" +/* 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 @@ -3111,6 +3455,7 @@ (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 @@ -3122,7 +3467,8 @@ continue else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -3151,13 +3497,22 @@ 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 -#line $LINENO "configure" -#include "confdefs.h" -#include - Syntax error +/* 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 @@ -3169,6 +3524,7 @@ (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 @@ -3179,7 +3535,8 @@ : else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi @@ -3188,8 +3545,11 @@ # 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" +/* 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 @@ -3202,6 +3562,7 @@ (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 @@ -3213,7 +3574,8 @@ continue else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -3226,8 +3588,10 @@ 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;} + { { 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 @@ -3259,44 +3623,63 @@ 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 +3696,11 @@ 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 +3720,20 @@ : 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 #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,7 +3744,7 @@ int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) + || toupper (i) != TOUPPER (i)) exit(2); exit (0); } @@ -3374,11 +3764,12 @@ 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 +3794,7 @@ 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 +3803,32 @@ 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 +3837,11 @@ 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 +3864,10 @@ + + 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 +3883,31 @@ 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 +3916,11 @@ 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 +3928,11 @@ 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 +3945,7 @@ (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 +3956,8 @@ 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 +3965,43 @@ 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 +4018,40 @@ 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 +4059,74 @@ ; 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 +4134,46 @@ ; 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 +4181,23 @@ 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 +4218,40 @@ #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 +4260,23 @@ 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 +4284,23 @@ 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 +4321,40 @@ #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 +4363,23 @@ 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 +4387,23 @@ 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 +4424,40 @@ #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 +4466,23 @@ 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 +4490,23 @@ 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 +4527,40 @@ #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 +4569,23 @@ 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 +4593,23 @@ 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 +4630,40 @@ #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 +4672,23 @@ 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 +4696,23 @@ 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 +4733,40 @@ #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 +4775,23 @@ 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 +4799,23 @@ 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 +4836,40 @@ #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 +4878,23 @@ 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 +4902,23 @@ 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 +4939,40 @@ #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 +4981,23 @@ 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 +5005,23 @@ 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 +5042,40 @@ #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 +5084,23 @@ 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 +5108,23 @@ 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 +5145,40 @@ #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 +5187,229 @@ 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 +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 -ac_ext=c +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 +5421,218 @@ 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 +5644,73 @@ 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,46 +5722,72 @@ 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 () { -uint32_t x; int32_t y; + + +uint32_t x; +int32_t y; + + ; 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_STDINT_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' @@ -4743,28 +5799,51 @@ 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 "$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" + 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 () { + + 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); }; } && + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4773,46 +5852,73 @@ groff_cv_header_inttypes_h=yes 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 +5927,24 @@ 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 +5952,58 @@ #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,16 +6013,18 @@ 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' @@ -4902,8 +6036,11 @@ 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 #ifdef signal @@ -4925,11 +6062,21 @@ _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=$? @@ -4938,10 +6085,11 @@ ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_signal=int 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: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 @@ -4951,45 +6099,135 @@ _ACEOF -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" -#include +echo "$as_me:$LINENO: checking struct exception" >&5 +echo $ECHO_N "checking struct exception... $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 + + +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>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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRUCT_EXCEPTION 1 +_ACEOF + +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 +fi +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 () { -struct exception e; +main (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +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 -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_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; -cat >>confdefs.h <<\_ACEOF -#define HAVE_STRUCT_EXCEPTION 1 -_ACEOF - + ac_cv_lib_c_main=yes 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 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_c_main=no fi -rm -f conftest.$ac_objext 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_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 +6236,11 @@ 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 +6259,21 @@ _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 +6282,12 @@ 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 +6298,8 @@ +# checks for functions + for ac_header in stdlib.h unistd.h do @@ -5062,18 +6317,31 @@ 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 +6350,11 @@ 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 +6362,11 @@ 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 +6379,7 @@ (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 +6390,8 @@ 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 +6399,43 @@ 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 +6460,73 @@ 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 +6535,12 @@ 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 +6561,11 @@ 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 +6668,9 @@ data2 = (char *) malloc (2 * pagesize); if (!data2) exit (1); - data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + data2 += (pagesize - ((long) 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 +6708,12 @@ 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 +6728,7 @@ rm -f conftest.mmap saved_libs="$LIBS" -LIBS="$LIBS -lc $LIBM" +LIBS="$LIBS $LIBC $LIBM" @@ -5411,7 +6738,7 @@ 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 +6747,186 @@ 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) (); +/* 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 +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 + "$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 + + +# vsnprintf is in the same source file as snprintf + +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 +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 -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 +6935,12 @@ 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 +6950,25 @@ _ACEOF else - LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + 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 rename setlocale strsep + +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 @@ -5498,43 +6977,73 @@ 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 +7052,12 @@ 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 @@ -5560,138 +7071,213 @@ 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 - + cat >conftest.$ac_ext <<_ACEOF +/* 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 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_sys_siglist=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: $ac_cv_decl_sys_siglist" >&5 -echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6 -if test $ac_cv_decl_sys_siglist = yes; then +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 SYS_SIGLIST_DECLARED 1 +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 +7287,18 @@ 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 +7310,102 @@ 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 +7416,12 @@ exit(i != 0200); #endif } + + + ; + return 0; +} + _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -5801,7 +7435,8 @@ 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 +7444,229 @@ 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 +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 + make_html=html -make_install_html=install_html -missing= -# Extract the first word of "pnmcut", so it can be a program name with args. + 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 +7702,9 @@ echo "${ECHO_T}no" >&6 fi -if test $pnmcut = missing; then + if test $pnmcut = missing; then missing="$missing pnmcut" -fi -# Extract the first word of "pnmcrop", so it can be a program name with args. + 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 +7740,9 @@ echo "${ECHO_T}no" >&6 fi -if test $pnmcrop = missing; then + if test $pnmcrop = missing; then missing="$missing pnmcrop" -fi -# Extract the first word of "pnmtopng", so it can be a program name with args. + 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,18 +7778,17 @@ echo "${ECHO_T}no" >&6 fi -if test $pnmtopng = missing; then + 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 + 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 -if test "${ac_cv_prog_gs+set}" = set; then +if test "${ac_cv_prog_psselect+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. + if test -n "$psselect"; then + ac_cv_prog_psselect="$psselect" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -6087,37 +7797,36 @@ 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" + ac_cv_prog_psselect="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" + test -z "$ac_cv_prog_psselect" && ac_cv_prog_psselect="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 +psselect=$ac_cv_prog_psselect +if test -n "$psselect"; then + echo "$as_me:$LINENO: result: $psselect" >&5 +echo "${ECHO_T}$psselect" >&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. -set dummy psselect; ac_word=$2 + 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 -if test "${ac_cv_prog_psselect+set}" = set; then +if test "${ac_cv_prog_pnmtops+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$psselect"; then - ac_cv_prog_psselect="$psselect" # Let the user override the test. + if test -n "$pnmtops"; then + ac_cv_prog_pnmtops="$pnmtops" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -6126,37 +7835,36 @@ 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_psselect="found" + ac_cv_prog_pnmtops="found" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done - test -z "$ac_cv_prog_psselect" && ac_cv_prog_psselect="missing" + test -z "$ac_cv_prog_pnmtops" && ac_cv_prog_pnmtops="missing" fi fi -psselect=$ac_cv_prog_psselect -if test -n "$psselect"; then - echo "$as_me:$LINENO: result: $psselect" >&5 -echo "${ECHO_T}$psselect" >&6 +pnmtops=$ac_cv_prog_pnmtops +if test -n "$pnmtops"; then + echo "$as_me:$LINENO: result: $pnmtops" >&5 +echo "${ECHO_T}$pnmtops" >&6 else echo "$as_me:$LINENO: result: no" >&5 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. -set dummy pnmtops; ac_word=$2 + if test $pnmtops = missing; then + missing="$missing pnmtops" + fi;# Extract the first word of "gs", so it can be a program name with args. +set dummy gs; 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_pnmtops+set}" = set; then +if test "${ac_cv_prog_gs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$pnmtops"; then - ac_cv_prog_pnmtops="$pnmtops" # Let the user override the test. + 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 @@ -6165,61 +7873,64 @@ 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_pnmtops="found" + 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_pnmtops" && ac_cv_prog_pnmtops="missing" + test -z "$ac_cv_prog_gs" && ac_cv_prog_gs="missing" fi fi -pnmtops=$ac_cv_prog_pnmtops -if test -n "$pnmtops"; then - echo "$as_me:$LINENO: result: $pnmtops" >&5 -echo "${ECHO_T}$pnmtops" >&6 +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 $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 $gs = missing; then + missing="$missing gs" + 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: 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 + " >&5 echo "$as_me: WARNING: The program$plural @@ -6227,27 +7938,30 @@ 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;} -fi + " >&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 test-groff" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -6276,13 +7990,13 @@ # `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 +8007,7 @@ 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 +8026,13 @@ # 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 @@ -6329,7 +8043,7 @@ 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$//'` + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' @@ -6353,6 +8067,8 @@ # configure, is in config.log if it exists. debug=false +ac_cs_recheck=false +ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF @@ -6371,9 +8087,10 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # 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 @@ -6387,9 +8104,12 @@ 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 @@ -6433,15 +8153,15 @@ # 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 + 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 conftest.sh + rm -f conf$$.sh fi @@ -6568,16 +8288,17 @@ 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 +8325,7 @@ 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.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -6644,12 +8365,13 @@ -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 +8385,10 @@ 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.59, 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) 2003 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 +8421,9 @@ 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 +8445,9 @@ $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 +8462,20 @@ 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 @@ -6756,6 +8491,7 @@ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "src/xditview/Imakefile" ) CONFIG_FILES="$CONFIG_FILES src/xditview/Imakefile" ;; + "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,6 +8508,9 @@ 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 || { @@ -6780,17 +8519,17 @@ } # 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 +8577,6 @@ 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 @@ -6868,6 +8606,7 @@ s,@SH_SCRIPT_SED_CMD@,$SH_SCRIPT_SED_CMD,;t t s,@CPP@,$CPP,;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,12 +8614,13 @@ 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,@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,@gs@,$gs,;t t s,@make_html@,$make_html,;t t s,@make_install_html@,$make_install_html,;t t s,@pnmtops_nosetpage@,$pnmtops_nosetpage,;t t @@ -6914,9 +8654,9 @@ (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 +8674,21 @@ # 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; } @@ -6964,10 +8704,10 @@ 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; } @@ -7005,12 +8745,45 @@ 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 paths, 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 +8805,7 @@ 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 +8814,24 @@ 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 +8864,7 @@ # Run the commands associated with the file. case $ac_file in stamp-h ) echo timestamp > stamp-h ;; + test-groff ) chmod +x test-groff ;; esac done _ACEOF @@ -7104,12 +8878,12 @@ # 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 +8892,11 @@ # 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 +8910,29 @@ 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;; + # Do quote $f, to prevent DOS paths 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 +8955,9 @@ 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 +8971,13 @@ # 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 +8986,7 @@ # 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 +9013,7 @@ # 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 +9041,16 @@ 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; } @@ -7291,10 +9066,10 @@ 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,13 +9110,17 @@ # 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: diff -ruN groff-1.19/configure.ac groff-1.19.1/configure.ac --- groff-1.19/configure.ac Tue Apr 22 16:36:26 2003 +++ groff-1.19.1/configure.ac Tue Dec 30 05:03:01 2003 @@ -1,83 +1,101 @@ -dnl Process this file with autoconf to produce a configure script. +# Process this file with autoconf to produce a configure script. AC_INIT -AC_CONFIG_HEADERS(src/include/config.h:src/include/config.hin) + +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_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_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_PNMTOPS_NOSETPAGE -AC_CONFIG_FILES(stamp-h, [echo timestamp > stamp-h]) + +AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) AC_CONFIG_FILES([Makefile doc/Makefile src/xditview/Imakefile]) +AC_CONFIG_FILES([test-groff], [chmod +x test-groff]) AC_OUTPUT -dnl + AC_MSG_NOTICE([ Configuration completed. diff -ruN groff-1.19/contrib/eqn2graph/eqn2graph.man groff-1.19.1/contrib/eqn2graph/eqn2graph.man --- groff-1.19/contrib/eqn2graph/eqn2graph.man Wed Aug 21 19:29:17 2002 +++ groff-1.19.1/contrib/eqn2graph/eqn2graph.man Tue Oct 28 08:46:23 2003 @@ -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 @@ 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 @@ 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 -ruN groff-1.19/contrib/eqn2graph/eqn2graph.sh groff-1.19.1/contrib/eqn2graph/eqn2graph.sh --- groff-1.19/contrib/eqn2graph/eqn2graph.sh Wed Jul 17 06:55:46 2002 +++ groff-1.19.1/contrib/eqn2graph/eqn2graph.sh Tue Oct 28 08:46:23 2003 @@ -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.3 2003/10/28 07:46:23 wlemb Exp $ # groff_opts="" convert_opts="" @@ -58,17 +58,34 @@ 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 -crop 0x0 $convert_opts $tmp/eqn2graph.ps $tmp/eqn2graph.$format \ + && cat $tmp/eqn2graph.$format # End diff -ruN groff-1.19/contrib/grap2graph/Makefile.sub groff-1.19.1/contrib/grap2graph/Makefile.sub --- groff-1.19/contrib/grap2graph/Makefile.sub Thu Jan 1 01:00:00 1970 +++ groff-1.19.1/contrib/grap2graph/Makefile.sub Wed Jul 2 17:35:01 2003 @@ -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 -ruN groff-1.19/contrib/grap2graph/grap2graph.man groff-1.19.1/contrib/grap2graph/grap2graph.man --- groff-1.19/contrib/grap2graph/grap2graph.man Thu Jan 1 01:00:00 1970 +++ groff-1.19.1/contrib/grap2graph/grap2graph.man Tue Oct 28 08:46:23 2003 @@ -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 -ruN groff-1.19/contrib/grap2graph/grap2graph.sh groff-1.19.1/contrib/grap2graph/grap2graph.sh --- groff-1.19/contrib/grap2graph/grap2graph.sh Thu Jan 1 01:00:00 1970 +++ groff-1.19.1/contrib/grap2graph/grap2graph.sh Tue Oct 28 08:46:23 2003 @@ -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.2 2003/10/28 07:46:23 wlemb 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 -crop 0x0 $convert_opts - $tmp/grap2graph.$format \ + && cat $tmp/grap2graph.$format + +# End diff -ruN groff-1.19/contrib/groffer/ChangeLog groff-1.19.1/contrib/groffer/ChangeLog --- groff-1.19/contrib/groffer/ChangeLog Wed Jan 22 15:18:07 2003 +++ groff-1.19.1/contrib/groffer/ChangeLog Fri Apr 30 09:37:39 2004 @@ -1,4 +1,231 @@ -2003-01-22 Bernd Warken +2004-04-30 Bernd Warken + ________________________________________________________________ + * release of groffer 0.9.7 + + * groffer.sh: + - obj(), obj_data(), obj_from_output(), obj_set(): New object + oriented functions to minimize complicated `eval' commands. + - list_*(): Corrections. + - usage(): Streamlining. + + * groffer.man, README_SH: + Corrections. + +2004-04-27 Bernd Warken + ________________________________________________________________ + * release of groffer 0.9.6 + + This version replaces the license of all files except ChangeLog of + the groffer source to the GNU General Public License (GPL) of the + version described in files COPYING and LICENSE in the groff top + source directory. + + * groffer.man: + Changement from the GNU Free Documentation License (FDL) to + the GNU General Public License (GPL). + + * README, README_SH, TODO: + Add license GNU General Public License (GPL). + + * Makefile.sub, groffer.sh: + Keep the GNU General Public License (GPL), but refer to the + COPYING and LICENSE files. + + * ChangeLog: Add a license in the style of Emacs ChangeLog file, + which is weaker than the GPL, but has its flavor. + +2004-04-24 Bernd Warken + ________________________________________________________________ + * release of groffer 0.9.5 + + This version is a rewrite of groffer in many parts, but it is kept + in the old single script style. + + Overview of new options: + --text, --mode text, --tty-viewer, + --X, --mode X, --X-viewer, --html, --mode html, --html-view, + --apropos-data, --apropos-devel, --apropos-progs + + New file: + /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 @@ -19,7 +246,7 @@ * TODO: Remove mention of `shoop' and `apropos'. -2002-10-21 Bernd Warken +2002-10-21 Bernd Warken ________________________________________________________________ * release of groffer 0.9.3 @@ -43,7 +270,7 @@ - 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 @@ -60,7 +287,7 @@ 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 +299,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 @@ -95,7 +322,7 @@ - "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 @@ -103,7 +330,7 @@ - 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 +354,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 @@ -147,7 +374,7 @@ * TODO: fix entry `shoop' (not 'shopt'). -2002-06-28 Bernd Warken +2002-06-28 Bernd Warken ________________________________________________________________ * release of groffer 0.9.0 @@ -178,7 +405,7 @@ - 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 +413,7 @@ * groffer.man: Fix some indentations. -2002-06-23 Bernd Warken +2002-06-23 Bernd Warken ________________________________________________________________ * release of groffer 0.8 @@ -305,7 +532,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,7 +568,7 @@ - fix TP_header. -2002-05-28 Bernd Warken +2002-05-28 Bernd Warken ________________________________________________________________ * release of groffer 0.6 @@ -435,7 +662,7 @@ - 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 @@ -462,7 +689,7 @@ - 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') @@ -501,7 +728,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). @@ -520,12 +747,12 @@ * 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. @@ -545,7 +772,7 @@ * 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) @@ -555,3 +782,15 @@ * 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 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 -ruN groff-1.19/contrib/groffer/Makefile.sub groff-1.19.1/contrib/groffer/Makefile.sub --- groff-1.19/contrib/groffer/Makefile.sub Mon Oct 21 11:51:55 2002 +++ groff-1.19.1/contrib/groffer/Makefile.sub Wed Apr 28 01:40:39 2004 @@ -20,9 +20,9 @@ # 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ######################################################################## diff -ruN groff-1.19/contrib/groffer/README groff-1.19.1/contrib/groffer/README --- groff-1.19/contrib/groffer/README Thu Oct 17 17:39:08 2002 +++ groff-1.19.1/contrib/groffer/README Wed Apr 28 01:51:05 2004 @@ -1,6 +1,7 @@ -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. +The `groffer' program is the easiest way to read documents written in +some `groff' language, such as the `man pages', the manual pages in +many operating systems. All input is sent to `grog' and then to +`groff' such that no special `groff' arguments must be determined. `groffer' also has many built-in `man' functionalities to find and read the manual pages on UNIX and similar operating systems. It @@ -8,10 +9,10 @@ find a man path by itself if there isn't any. 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. +Bourne style shell, but it runs the fastest under the GNU `ash' shell. +If this shell is available, it is started automatically. There are +efforts to port part of the shell script to C/C++ to increase the +speed independent of the shell. For reporting bugs of `groffer', groff's free mailing list can be used. For a general discussion, the @@ -19,5 +20,25 @@ directory of the `groff' source package for more details on this mailing list. -`groffer' is a `groff contrib' project that was written by Bernd -Warken . + +####### License + +Copyright (C) 2003,2004 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff -ruN groff-1.19/contrib/groffer/README_SH groff-1.19.1/contrib/groffer/README_SH --- groff-1.19/contrib/groffer/README_SH Thu Jan 1 01:00:00 1970 +++ groff-1.19.1/contrib/groffer/README_SH Fri Apr 30 09:35:05 2004 @@ -0,0 +1,219 @@ +Description of groffer.sh, the shell version of groffer + +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 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'. + +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 plain text mode. +- Run a pager on the formatted input in a text terminal (tty). +- 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' as graphical +device, `tty' mode with a pager is tried as text display. + + +Several File Arguments + +So far, `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 have 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. + + +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(). + + +Shell 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 groffer.sh + +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_non_empty_file () +is_not_dir () +is_not_empty () +is_not_equal ( ) +is_not_file () +is_not_prog () +is_not_writable () +is_not_yes () +is_prog () +is_yes () +leave () +landmark () +list_append ( ...) +list_from_cmdline ( [...]) +list_from_split ( ) +list_get () +list_has ( ) +list_has_not ( ) +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 () +res ( ...) +reset () +save_stdin () +string_contains ( ) +string_not_contains ( ) +tmp_cat () +tmp_create (?) +to_tmp () +trap_clean () +trap_set () +usage () +version () +warning () +whatis () +where () + + +External non-groffer Environment Variables + +If these variables are exported in the script the `ash' shell coughs +when calling `groff' in `main_display()'. + +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 (: 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_*(). + + +####### License + +Copyright (C) 2003,2004 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff -ruN groff-1.19/contrib/groffer/TODO groff-1.19.1/contrib/groffer/TODO --- groff-1.19/contrib/groffer/TODO Wed Jan 22 11:54:06 2003 +++ groff-1.19.1/contrib/groffer/TODO Wed Apr 28 01:56:38 2004 @@ -1,32 +1,9 @@ -# TODO file for `groffer' +TODO file for `groffer' -# File position: /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 +####### TODO Optimization: - Optimize man path determination in manpath_add_lang_sys() for speed @@ -34,18 +11,16 @@ (not trivial). - To increase the running speed write part of the groffer shell script in C/C++. +- Split the groffer.sh shell script into several files for better tests + of the shell compatibility. Features: - Revise option handling of `grog'. - `gxditview' needs a complete shower. 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. Documentation: - Improve the documentation of the search algorithm for man pages in @@ -54,3 +29,26 @@ from GNU `man'. - The documentation in the headers for some function definitions in `groffer.sh' needs to be updated. + + +####### License + +Copyright (C) 2003,2004 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff -ruN groff-1.19/contrib/groffer/groffer.man groff-1.19.1/contrib/groffer/groffer.man --- groff-1.19/contrib/groffer/groffer.man Thu Oct 17 17:17:44 2002 +++ groff-1.19.1/contrib/groffer/groffer.man Tue May 4 06:45:21 2004 @@ -15,22 +15,30 @@ 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 +Version : groffer 0.9.7 +Last update : 03 May 2004 -This file is part of groff, the GNU roff type-setting system. +Source file position: /contrib/groffer/groffer.man -Copyright (C) 2001, 2002 Free Software Foundation, Inc. -Written by Bernd Warken +Copyright (C) 2001,2002,2004 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. +This file is part of groff version @VERSION@. -A copy of the Free Documentation License is included as a file called -FDL in the main directory of the groff source package. +groff is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +groff is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +License for more details. + +You should have received a copy of the GNU General Public License +along with groff; see the files COPYING and LICENSE in the top +directory of the groff source. If not, write to the Free Software +Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .. . .\" -------------------------------------------------------------------- @@ -277,7 +285,7 @@ .c .c Arguments: .c
: prefix, resulted is preceded by this.
-.c   : separator between minux/opt pairs.
+.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).
@@ -308,22 +316,23 @@
 .    if (\\n[@count] > 0) \
 .      as @res \f[CR]\\*[@sep]\"
 .    nr @count +1
-.    as @res \f[CB]\\$1\\$2\:\"           combine minus with option name
+.    as @res \f[CB]\\$1\\$2\:\"         combine minus with option name
 .    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 +408,14 @@
 .  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.
@@ -629,13 +646,16 @@
 .
 .ad l
 .Synopsis groffer
-.RI [ groffer_options ]
-.RI [ groff_options ]
+.RI [ option...\& ]
 .Opt_[--]
 .RI [ "filespec" "\*[Ellipsis]]"
 ./Synopsis
 .
 .Synopsis groffer
+.Opt_alt -- apropos -- apropos-data -- apropos-devel -- apropos-progs name
+./Synopsis
+.
+.Synopsis groffer
 .Opt_alt - h -- help
 ./Synopsis
 .
@@ -681,7 +701,10 @@
 But the option handling has many possibilities for creating special
 behaviors.
 .
-These can be stored in a configuration file.
+This can be done in configuration files, with the shell environment
+variable
+.BR $GROFFER_OPT ,
+or on the command line.
 .
 .
 .P
@@ -696,15 +719,22 @@
 .
 .
 .P
-Most options that must be named when running
+Most of the options that must be named when running
 .I groff
-are determined automatically because
-.I groffer
-internally calls the
+directly are determined automatically for
+.IR 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
+.IR groff .
 .
 .
 .\" --------------------------------------------------------------------
@@ -712,165 +742,115 @@
 .\" --------------------------------------------------------------------
 .
 .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] -- apropos name
+.Opt_[alt] -- apropos-data name
+.Opt_[alt] -- apropos-devel name
+.Opt_[alt] -- apropos-progs name
+.Opt_[alt] - h -- help
+.Opt_[alt] - v -- version
+.RE
 .
 .
+.TP
+.I groffer mode options
 .RS
-.
 .P
-.Opt_[alt] - Q -- source
-.Opt_[alt] - T -- device device
-.Opt_[alt] -- auto-modes mode1,mode2,\*[Ellipsis]
-.Opt_[alt] -- debug
+.Opt_[alt] -- auto
 .Opt_[alt] -- default
+.Opt_[alt] -- default-modes mode1,mode2,\*[Ellipsis]
 .Opt_[alt] -- dvi
 .Opt_[alt] -- dvi-viewer prog
 .Opt_[alt] -- groff
-.Opt_[alt] -- location
+.Opt_[alt] -- html
+.Opt_[alt] -- html-viewer prog
+.Opt_[alt] -- man
 .Opt_[alt] -- mode display_mode
-.Opt_[alt] -- pager program
+.Opt_[alt] -- no-man
 .Opt_[alt] -- pdf
 .Opt_[alt] -- pdf-viewer prog
 .Opt_[alt] -- ps
 .Opt_[alt] -- ps-viewer prog
-.Opt_[alt] -- shell
+.Opt_[alt] -- text
 .Opt_[alt] -- tty
+.Opt_[alt] -- tty-viewer prog
 .Opt_[alt] -- www
 .Opt_[alt] -- www-viewer prog
-.Opt_[alt] -- x
-.Opt_[alt] -- x-viewer prog
+.Opt_[alt] -- x -- X
+.Opt_[alt] -- x-viewer -- X-viewer prog
+.RE
 .
 .
+.TP
+.I development options
+.RS
 .P
-The following long options were adapted from the corresponding X
-Toolkit options.
+.Opt_[alt] -- debug
+.Opt_[alt] -- shell
+.RE
 .
-Their single leading minus in X Toolkit was changed to a double minus
-for long options; see
-.BR X (1).
+.
+.TP
+.I options related to groff
+.RS
+.P
+.Opt_[alt] - P -- postproc-arg opt_or_arg
+.Opt_[alt] - Q -- source
+.Opt_[alt] - T -- device device
+.Opt_[alt] - Z -- intermediate-output -- ditroff
+.P
+All further
+.I groff
+short options are accepted.
+.RE
 .
 .
+.TP
+.I X Window toolkit options
+.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] -- 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
 .
 .
-.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.
-.
-.
+.TP
+.I options from 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
+Further long options of 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.
-.
-.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.
-.
-.
-.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 ).
-.
+are accepted as well.
 .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 argument
 .RS
-.
 .P
 No
 .I filespec
@@ -878,7 +858,7 @@
 .
 .
 .TP 10m
-.Opt_short
+.Opt_short ""
 stands for standard input (can occur several times).
 .
 .
@@ -888,262 +868,190 @@
 .
 .
 .TP
+.BI man: name ( section )
+.TP+
+.IB name ( section )
+search the man\~page
 .I name
-if 
+in man\~section\~\c
+.IR section .
+.
+.
+.TP
+.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
-is not an existing file search for the man\~page called in the lowest
-man\~section that has a document for this name.
+in man\~section
+.IR s .
 .
 .
 .TP
 .BI man: name
-search for a man\~page in the lowest man\~section that has a document
-called
+man\~page in the lowest man\~section that has
 .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 "s name"
+if
+.I s
+is a character in
+.BR [1-9on] ,
+search for a man\~page
 .I name
-in man\~section\~\c
-.IR section .
+in man\~section
+.IR s .
 .
 .
 .TP
-.I "std_section name"
-two arguments like in the
-.BR man (1)
-program to find man\~page
 .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
+The
 .I groffer
-are compatible with the short options of
-.BR groff (@MAN1EXT@).
-.
-Some of the
-.I groff
-options were given a special meaning within
-.IR groffer .
+program can usually be run with very few options.
 .
-All other
-.I groff
-options are supported by
-.IR groffer ,
-but they are just transparently transferred to
-.I groff
-without any intervention.
+But for special purposes, it supports many options.
 .
-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
+.I groffer
+are compatible with the short options of
+.BR groff (@MAN1EXT@).
+.
 All long options of
 .I 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.
-.
-.
-.Opt_def - h
-Print usage message to standard error and exit.
-.
-.
-.Opt_def - Q
-Output the roff source code of the input files unprocessed.
-.
-This is the equivalent
-.Opt_long mode\~source .
-.
-.
-.Opt_def - T devname
-Switch to
-.Opt_long mode
-.IR devname .
-.
-The input is formatted and postprocessed using plain
-.I groff
-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.
-.
-.
-.Opt_def - v
-Print version information onto standard error.
-.
-.
-.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.
 .
-This an advanced option from
-.BR groff (@MAN1EXT@) ,
-only useful for debugging.
-.
-.
-.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.
+.\" --------------------------------------------------------------------
+.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
+.I groffer
+is terminated thereafter.
 .
-.Opt_def -- all
-In searching man pages, retrieve all suitable ones instead of only one.
+All other arguments are ignored.
 .
 .
-.Opt_def -- apropos
-Instead of displaying, start the `apropos' command for searching
-within man page descriptions; only kept for compatibility with `man'.
+.Opt_def -- apropos name
+Start the
+.BR apropos (1)
+command for searching within man page
+descriptions.
 .
+That slightly differs from the strange behavior of the
+.Opt_long apropos
+program of
+.BR man (1),
+which has no argument of its own, but takes the file arguments
+instead.
 .
-.Opt_def -- auto-modes mode1,mode2,\*[Ellipsis]
-Set the sequence of modes for default mode to the comma separated list
-given in the argument.
+Practically both concepts are compatible.
 .
 .
-.Opt_def -- background color
-This is equivalent to
-.Opt_long bg .
+.Opt_def -- apropos-data name
+Show only the
+.BR apropos (1)
+descriptions for data documents, in the
+.BR man (7)
+sections 4, 5, and 7.
 .
 .
-.Opt_def -- bd pixels
-Specifies the color of the border surrounding the viewer
-window.
+.Opt_def -- apropos-devel name
+Show only the
+.BR apropos (1)
+descriptions for development documents, in the
+.BR man (7)
+sections 2, 3, and 9.
 .
-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 -- apropos-progs name
+Show only the
+.BR apropos (1)
+descriptions for documents on programs, in the
+.BR man (7)
+sections 1, 6, and 8.
 .
 .
-.Opt_def -- bg color
-Set the background color of the viewer window.
+.Opt_def - h -- help
+Print a helping information with a short explanation of option sto
+standard output.
 .
-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 - v -- version
+Print version information to standard output.
 .
 .
-.Opt_def -- bw pixels
-Specifies the width in pixels of the border surrounding the viewer
-window (not available for all viewers).
+.\" --------------------------------------------------------------------
+.SS "groffer Mode Options"
+.\" --------------------------------------------------------------------
 .
-This is an adaption of the X Toolkit option
-.Opt_short bw .
+The display mode and the viewer programs are determined by these
+options.
 .
+If none of these mode and viewer options is specified
+.I groffer
+tries to find a suitable display mode automatically.
 .
-.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.
-.
-.
-.Opt_def -- device
-Eqivalent to
-.Opt_short T .
+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 -- 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 -- 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 -- 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
@@ -1160,168 +1068,154 @@
 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 -- groff
+Equivalent to
+.Opt_long_arg mode groff .
 .
-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 -- html
+Equivalent to
+.Opt_long_arg mode html .
 .
 .
-.Opt_def -- foreground color
-This is equivalent to
-.Opt_long fg .
+.Opt_def -- html-viewer
+Equivalent to
+.Opt_long www-viewer .
 .
 .
-.Opt_def -- fg color
-Set the foreground color of the viewer window.
+.Opt_def -- mode value
 .
-This is an adaption of the X Toolkit option
-.Opt_long bg .
+Set the display mode.
 .
-The argument is an X color name, see
-.BR (1)
-for details.
+The following mode values are recognized:
 .
+.RS
 .
-.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.
-.
-.
-.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.
-.
-.
-.Opt_def -- help
-Eqivalent to
-.Opt_short h .
-.
-.
-.Opt_def -- location
-Print the location of the retrieved files to standard error.
+.TP
+.Header_CB auto
+Select the automatic determination of the display mode.
 .
+The sequence of modes that are tried can be set with the
+.Opt_long default-modes
+option.
 .
-.Opt_def -- locale language
+Useful for restoring the default mode when a different mode was
+specified before.
 .
-Set the language for man pages.
 .
-This option originates from GNU
-.BR man (1).
+.TP
+.Header_CB dvi
+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 .
 .
-.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.
+.TP
+.Header_CB groff
+After the file determination, switch
+.I groffer
+to process the input like
+.BR groff (@MAN1EXT@)
+would do .
 .
+This disables the
+.I groffer
+viewing features.
 .
-.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.
+.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).
 .
-.Opt_def -- mode value
 .
-Set the display mode.
+.TP
+.Header_CB pdf
+Display formatted input in a
+.I PDF
+(Portable Document Format) viewer
+program.
 .
-The following mode values are recognized:
+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),
+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.
 .
-.RS
+But as the transformation takes a considerable amount of time, this
+mode is not suitable as a default device for the auto mode.
 .
 .
 .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.
-.
-Useful for restoring default mode when a different mode was specified
-with
-.Env_var $GROFFER_OPT .
-.
+.Header_CB ps
+Display formatted input in a Postscript viewer program.
 .
-.TP
-.Header_CB dvi
-Display formatted input in a dvi viewer program; equivalent to
-.Opt_long dvi .
+By default, the formatted input is displayed with the
+.BR ghostview (@MAN1EXT@)
+program.
 .
 .
 .TP
-.Header_CB pdf
-Display formatted input in a PDF (Portable Document Format) viewer
-program; equivalent to
-.Opt_long pdf .
-.
+.Header_CB text
+Format in a
+.I groff
+text mode and write the result to standard output without a pager or
+viewer program.
 .
-.TP
-.Header_CB ps
-Display formatted input in a Postscript viewer program; equivalent to
-.Opt_long ps .
+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 X Window.
 .
 .
 .TP
 .Header_CB www
-Display formatted input in a internet browser program; equivalent to
+Equivalent to
 .Opt_long www .
 .
 .
 .TP
+.Header_CB X
+Display formatted input in a native 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.
+.
+.
+.TP
 .Header_CB x
-Display formatted input in a native roff viewer such as
-.BR gxditview (@MAN1EXT@);
-equivalent to
-.Opt_long x .
+Equivalent to
+.Opt_long_arg mode X .
 .
 .
 .P
@@ -1349,49 +1243,16 @@
 .
 .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
@@ -1406,16 +1267,8 @@
 .
 .
 .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
@@ -1435,99 +1288,25 @@
 In each case, arguments can be provided additionally.
 .
 .
-.Opt_def -- resolution value
-Set X resolution in dpi (dots per inch) in some viewer programs.
-.
-The only supported dpi values are
-.B 75
-and
-.BR 100 .
-This is an adaption of the X Toolkit option
-.Opt_short resolution .
-.
-.
-.Opt_def -- rv
-Reverse foreground and background color of the viewer window.
-.
-This is an adaption of the X Toolkit option
-.Opt_short rv .
-This feature is not available in all viewer programs.
-.
-.
-.Opt_def -- sections
-Restrict searching for 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
+.Opt_def -- text
 Equivalent to
-.Opt_short Q .
-.
-.
-.Opt_def -- systems
-Search for man pages for the given operating systems; the argument
-.I systems
-is a comma-separated list.
+.Opt_long_arg mode text .
 .
 .
-.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
+Equivalent to
+.Opt_long_arg mode tty .
 .
 .
-.Opt_def -- tty
+.Opt_def -- tty-viewer
 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_long_arg mode tty .
 .
 .
 .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)
+Equivalent to
+.Opt_long_arg mode www .
 .
 .
 .Opt_def -- www-viewer prog
@@ -1537,40 +1316,19 @@
 .
 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
+syntax on the command line is suitable as viewer program; it can be
+the path name of an executable file or a program in
 .Env_var $PATH .
 .
 In each case, arguments can be provided additionally.
 .
 .
-.Opt_def -- 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 -- X -- x
+Equivalent to
+.Opt_long_arg mode X .
 .
 .
-.Opt_def -- x-viewer prog
+.Opt_def -- X-viewer -- x-viewer prog
 Set the viewer program for
 .I x
 mode.
@@ -1595,76 +1353,695 @@
 .
 .
 .P
-Besides these, groffer accepts all arguments that are valid for the
-.BR groff (@MAN1EXT@)
-program.
+Besides these,
+.I groffer
+accepts all arguments that are valid for the
+.BR groff (@MAN1EXT@)
+program.
+.
+All non-groffer options are sent unmodified via
+.I grog
+to
+.IR groff .
+.
+Postprocessors, macro packages, compatibility with classical
+.IR troff ,
+and much more can be manually specified.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "Options for Development"
+.\" --------------------------------------------------------------------
+.
+.Opt_def -- debug
+Print debugging information for development only.
+.
+Actually, a function call stack is printed if an error occurs.
+.
+.
+.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 by
+configuration, within
+.Env_var $GROFF_OPT
+or as a command line option); if so, the script is rerun under the
+shell program specified with the option argument.
+.
+.
+.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 .
+.
+.
+.P
+Other useful debugging options are the
+.I groff
+options
+.Opt_short V
+and
+.Opt_short Z
+and option
+.Opt_long_arg mode groff .
+.
+.
+.\" --------------------------------------------------------------------
+.SH "Options related to groff"
+.\" --------------------------------------------------------------------
+.
+All short options of
+.I groffer
+are compatible with the short options of
+.BR groff (@MAN1EXT@).
+.
+The following of
+.I groff
+options have either an additional special meaning within
+.I groffer
+or make sense for normal usage.
+.
+.
+.P
+Because of the special outputting behavior of the
+.I groff
+options
+.Opt_short V
+and
+.Opt_short Z
+.I groffer
+was designed to be switched into
+.I groff
+mode by these; the
+.I groffer
+viewing features are disabled there.
+.
+The other
+.I groff
+options do not switch the mode, but allow to customize the formatting
+process.
+.
+.
+.Opt_def - a
+This generates an ascii approximation of output in text modes.
+.
+That could be important when the text pager has problems with control
+sequences.
+.
+.
+.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
+.I groff
+postprocessor.
+.
+.
+.Opt_def - T -- device devname
+.
+This option determines
+.IR 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
+.I groffer
+into a text mode using this device, to
+.I mode tty
+if the actual mode is not a text mode.
+.
+The following
+.I devname
+arguments are mapped to the corresponding
+.I groffer
+.Opt_long_arg mode \fIdevname\fR
+option:
+.BR dvi ,
+.BR html ,
+and
+.BR ps .
+All
+.B X*
+arguments are mapped to mode
+.BR X .
+Each other
+.I devname
+argument switches to
+.I mode groff
+using this device.
+.
+.
+.Opt_def - V
+Switch into
+.I groff
+mode and show only the
+.I groff
+calling pipe without formatting the input.
+.
+This an advanced option from
+.BR groff (@MAN1EXT@) ,
+only useful for debugging.
+.
+.
+.Opt_def - X
+was made equivalent to
+.Opt_long_arg mode x ;
+this slightly enhances the facility of
+.IR groff 's
+option.
+.
+.
+.Opt_def - Z -- intermediate-output -- ditroff
+Switch into
+.I groff
+mode and format the input with
+.I groff
+intermediate output without postprocessing; see
+.BR groff_out (@MAN1EXT@).
+This is equivalent to option
+.Opt_long ditroff
+of
+.IR man ,
+which can be used as well.
+.
+.
+.P
+All other
+.I groff
+options are supported by
+.IR groffer ,
+but they are just transparently transferred to
+.I groff
+without any intervention.
+.
+The options that are not explicitly handled by
+.I groffer
+are transparently passed to
+.IR groff .
+.
+Therefore these transparent options are not documented here, but in
+.BR groff (@MAN1EXT@).
+Due to the automatism in
+.IR groffer ,
+none of these
+.I groff
+options should be needed, except for advanced usage.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "X Window toolkit Options"
+.\" --------------------------------------------------------------------
+.
+The following long options were adapted from the corresponding X
+Toolkit options.
+.
+.I groffer
+will pass them to the actual viewer program if it is an X Window
+program.
+.
+Otherwise these options are ignored.
+.
+.
+.P
+Unfortunately these options use the old style of a single minus for
+long options.
+.
+For
+.I groffer
+that was changed to the standard with using a double minus for long
+options, for example,
+.I groffer
+uses the option
+.Opt_long font
+for the
+.I X
+option
+.Opt_short font .
+.
+.
+.P
+See
+.BR X (1),
+.BR X (7),
+and the documentation on the X toolkit options for more details on
+these options and their arguments.
+.
+.
+.Opt_def -- background color
+Set the background color of the viewer window.
+.
+.
+.Opt_def -- 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 X display on which the viewer program shall be started, see the
+.I X Window
+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 X 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 X 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
+.I groffer
+is set to
+.BR 75 .
+.
+.
+.Opt_def -- rv
+Reverse foreground and background color of the viewer window.
+.
+.
+.Opt_def -- title "'some text'"
+Set the title for the viewer window.
+.
+.
+.Opt_def -- xrm "'resource'"
+Set X resource.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Options from man"
+.\" --------------------------------------------------------------------
+.
+The long options of
+.I groffer
+were synchronized with the long options of
+.IR GNU man .
+.
+All long options of
+.I GNU man
+are recognized, but not all of these options are important to
+.IR groffer ,
+so most of them are just ignored.
+.
+.
+.P
+The following two options were added by
+.I groffer
+for choosing whether the file name arguments are interpreted as names
+for local files or as a search pattern for man pages.
+.
+The default is looking up for local files.
+.
+.
+.Opt_def -- man
+Check the non-option command line arguments (filespecs) first on being
+man\~pages, then whether they represent an existing file.
+.
+By default, a filespec is first tested whether it is an existing file.
+.
+.
+.Opt_def -- no-man -- local-file
+Do not check for man\~pages.
+.
+.Opt_long local-file
+is the corresponding
+.I man
+option.
+.
+.
+.P
+In the following, the
+.I man
+options that have a special meaning for
+.I groffer
+are documented.
+.
+.
+.P
+The full set of long and short options of the
+.I GNU man
+program can be passed via the environment variable
+.Env_var $MANOPT ;
+see
+.BR man (1)
+if your system has
+.I GNU man
+installed.
+.
+.
+.Opt_def -- all
+In searching man\~pages, retrieve all suitable documents instead of
+only one.
+.
+.
+.Opt_def - 7 -- ascii
+In text modes, display ASCII translation of special characters.
+.
+.
+.Opt_def -- ditroff
+Eqivalent to
+.I groffer
+.Opt_short Z .
+.
+.
+.Opt_def -- extension suffix
+Restrict man\~page search to file names that have
+.I suffix
+appended to their section element.
+.
+For example, in the file name
+.I /usr/share/man/man3/terminfo.3ncurses.gz
+the man\~page extension is
+.IR ncurses .
+.
+.
+.Opt_def -- locale language
+.
+Set the language for 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
+.IR groffer .
+.
+.
+.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.
+.
+.
+.Opt_def -- pager
+Set the pager program in tty mode; default is
+.IR less .
+This is equivalent to
+.Opt_long tty-viewer .
+.
+.
+.Opt_def -- sections "'sec1:sec2:\*[Ellipsis]'"
+Restrict searching for man\~pages to the given
+.IR sections ,
+a colon-separated list.
+.
+.
+.Opt_def -- systems "'sys1,sys2,\*[Ellipsis]'"
+Search for man pages for the given operating systems; the argument
+.I systems
+is a comma-separated list.
+.
+.
+.Opt_def -- whatis
+Instead of displaying the content, get the one-liner description from
+the retrieved man\~page files \[em] or say that it is not a man\~page.
+.
+.
+.Opt_def -- where
+Eqivalent to
+.Opt_long location .
+.
+.
+.P
+Additionally, the following short option of
+.I man
+is supported as well.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Filespec Arguments"
+.\" --------------------------------------------------------------------
+.
+A
+.I filespec
+parameter is an argument meaning an input source, such as a file name
+or template for searching man\~pages.
+.
+These input sources are collected and composed into a single output
+file.
+.
+Each of these
+.I filespec
+parameters can have one of the following forms.
+.
+.
+.P
+No
+.I filespec
+parameters means that
+.I groffer
+waits for standard input.
+.
+The minus option
+.Opt_short ""
+stands for standard input, too, but can occur several times.
+.
+Next
+.I filespec
+is tested whether it is the path name of an existing file.
+.
+Otherwise it is assumed as a searching pattern for a man\~page.
+.
+.
+.P
+On each system, the man pages are sorted according to their content
+into several sections.
+.
+The
+.I classical man sections
+have a single-character name, either are a digit from
+.B 1
+to
+.B 9
+or one of the characters
+.B n
+or
+.BR o .
+.
+In the following, a stand-alone character
+.I s
+means this scheme.
+.
+.
+.P
+The internal precedence of
+.I man
+for searching man pages with the same name within several sections
+goes according to the classical single-character sequence.
+.
+On some systems, this single character can be extended by a following
+string.
+.
+But the special
+.I groffer
+man page facility is based on the classical single character sections.
+.
+.
+.P
+.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.
+.
+.
+.P
+Next some patterns based on the
+.I classical man sections
+were constructed.
+.
+.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 search for a man\~page named
+.IR name.s
+in the lowest
+.I man
+section.
+.
+.
+.P
+Now
+.BI man: name
+searches for a man\~page in the lowest man\~section that has a
+document called
+.IR name .
+.
+.
+.P
+The pattern
+.I "s name"
+originates from a strange argument parsing of the
+.I man
+program.
+.
+If
+.I s
+is a
+.I classical man section
+interpret it as a search for a man\~page called
+.I name
+in man\~section
+.IR s ,
+otherwise interpret
+.I s
+as a file argument and
+.I name
+as another
+.I filespec
+argument.
+.
+.
+.P
+We are left with the argument
+.I name
+which is not an existing file.
+.
+So this searches for the man\~page called
+.I name
+in the lowest man\~section that has a document for this name.
+.
+.
+.P
+Several file name arguments can be supplied.
+.
+They are mixed by
+.I groff
+into a single document.
 .
-All non-groffer options are sent unmodified via grog to groff.
+Note that the set of option arguments must fit to all of these file
+arguments.
 .
-Postprocessors, macro packages, compatibility with classical troff,
-and much more can be manually specified.
+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:
-.
-.Topic
-graphically display the formatted input with an X window program,
-including
-.
-.RS
-.Topic
-with X window roff viewers such as
-.BR gxditview (@MAN1EXT@)
-.RI ( x
-mode),
-.
-.Topic
-in a dvi viewer program
-.RI ( dvi
-mode),
+By default, the
+.I groffer
+program collects all input into a single file, formats it with the
+.I groff
+program for a certain device, and then chooses a suitable viewer
+program.
 .
-.Topic
-in a Postscript viewer
-.RI ( ps
-mode),
+The device and viewer process in
+.I groffer
+is called a
+.IR mode .
 .
-.Topic
-in a PDF viewer
-.RI ( pdf
-mode),
+The mode and viewer of a running
+.I groffer
+program is selected automatically, but the user can also choose it
+with options.
 .
-.Topic
-in a web browser
-.RI ( www
-mode),
-.RE
 .
-.Topic
-display formatted input in a pager on the text terminal
-.RI ( tty
-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 .
 .
-.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),
+.P
+Several different modes are offered, graphical X modes, text modes,
+and some direct
+.I groff
+modes for debugging and development.
 .
 .
 .P
-By
-.IR default ,
+By default,
 .I groffer
 first tries whether
 .B x
@@ -1675,7 +2052,7 @@
 mode.
 .
 This mode testing sequence for
-.B default
+.B auto
 mode can be changed by specifying a comma separated list of modes
 with the option
 .Opt_long default\-modes.
@@ -1690,47 +2067,59 @@
 .SS "Graphical Display Modes"
 .\" --------------------------------------------------------------------
 .
-The graphical display modes work only in the X window environment (or
+The graphical display modes work only in the X Window 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 X display to be used.
+.
+If neither is given,
+.I groffer
+assumes that no X and changes to one 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 X
+Window viewer progams are
 .
-By default, some graphical modes are tried first.  If none succeeds
-groffer switches to
-.B tty
-mode.
+.Topic
+X Window roff viewers such as
+.BR gxditview (@MAN1EXT@)
+or
+.BR xditview (1)
+.RI (in x
+or
+.I X
+mode),
+.
+.Topic
+in a Postscript viewer
+.RI ( ps
+mode),
 .
+.Topic
+in a dvi viewer program
+.RI ( dvi
+mode),
 .
-.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.
-.
-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
+.RI ( pdf
+mode),
+.
+.Topic
+in a web browser
+.RI ( html
+or
+.I www
+mode),
+.RE
 .
 .
 .P
@@ -1740,93 +2129,118 @@
 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.
+Unfortunately, it takes some 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 .
+.
+.P
+These graphical viewers can be customized by options of the X Window
+Toolkit.
+.
+But the
+.I groffer
+options use a leading double minus instead of the single minus used by
+the X Window Toolkit.
 .
 .
 .\" --------------------------------------------------------------------
 .SS "Text mode"
 .\" --------------------------------------------------------------------
 .
+There are to modes for text output, mode
+.I text
+for plain output without a pager and mode
+.I tty
+for a text output on a text terminal using some pager program.
+.
+.
+.P
 If the variable
 .Env_var $DISPLAY
-is not set or empty, groffer assumes that it should produce output on
-a text terminal.
-.
-This mode can also be forced by option
-.Opt_long tty .
+is not set or empty, groffer assumes that it should use
+.I tty
+mode.
 .
 .
 .P
 In the actual implementation, the groff output device
 .I latin1
-is chosen and the processed output is piped into a pager program.
+is chosen for 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
+If all of this is not used the
 .BR less (1)
-program is used as the default pager.
+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 are regarded as advanced, they are useful for debugging
-purposes.
-.
+These modes use the
+.I groffer
+file determination and decompression.
 .
-.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 is combined into a single input file that is fed directly into
+.I groff
+with different strategy without the
+.I groffer
+viewing facilities.
 .
-This mode must be requested by one of the options
-.Opt_short Q
-or
-.Opt_long source .
+These modes are regarded as advanced, they are useful for debugging
+and development purposes.
 .
 .
-.TP
-.I groff mode
-This mode disables the groffer viewing facilities.
+.P
+The
+.I source
+mode with just displays the generated input.
 .
-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.
+The
+.I groff
+mode passes the input to
+.I groff
+using only some suitable options provided to
+.IR groffer .
 .
 This enables the user to save the generated output into a file or pipe
 it into another program.
 .
+.
+.P
+In
+.I groff
+mode, the option
+.Opt_short Z
+disables post-processing, thus producing the
+.I groff intermediate
+.IR output .
+.
 In this mode, the input is formatted, but not postprocessed; see
 .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
+.I groff
+short options are supported by
+.IR groffer .
 .
 .
 .\" --------------------------------------------------------------------
@@ -1917,15 +2331,17 @@
 variable
 .Env_var $MANOPT .
 .
+.
 .Topic
-If this does not work, the
-.BR manpath (1)
-program for determining a path of man directories is tried.
+If this does not work a reasonable default path from
+.Env_var $PATH
+is searched for man\~pages.
 .
 .
 .Topic
-If this does not work a reasonable default path is searched for
-man\~pages.
+If this does not work, the
+.BR manpath (1)
+program for determining a path of man directories is tried.
 .
 .
 .P
@@ -2102,7 +2518,7 @@
 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.
 .
@@ -2122,7 +2538,7 @@
 .
 .TP
 .Env_var $DISPLAY
-If this variable is set this indicates that the X window system is
+If this variable is set this indicates that the X Window system is
 running.
 .
 Testing this variable decides on whether graphical or text output is
@@ -2298,13 +2714,13 @@
 .SH "CONFIGURATION FILES"
 .\" --------------------------------------------------------------------
 .
-The groffer program can be preconfigured by two configuration files.
+The
+.I 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.
+This configuration can be overridden at each program start by command
+line options or by the environment variable
+.Env_var $GROFFER_OPT .
 .
 .
 .TP
@@ -2323,19 +2739,39 @@
 .
 .
 .P
+Their lines either start with a minus character or are shell commands.
+.
+Arbitrary spaces are allowed at the beginning, they are just ignored.
+.
+The lines with the beginning minus are appended to the existing value
+of $GROFFER_OPT.
+.
+This easily allows to set general
+.I groffer
+options that are used with any call of
+.IR groffer .
+.
+.
+.P
+After the transformation of the minus lines the emerging shell scripts
+that are called by
+.I groffer
+using the `\c
+.CB .\~\c
+.IR filename '
+syntax.
+.
+.
+.P
 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 by writing them into lines starting with a
+minus sign.
 .
 .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 groffer.
 .
 .Topic
 Write a function for calling a viewer program for a special
@@ -2351,57 +2787,81 @@
 .
 .
 .P
-As an example, consider the following configuration file.
+As an example, consider the following configuration file in
+~/.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
+--resolution=100
+--foreground=DarkBlue
+--x-viewer 'gxditview -geometry 850x800'
+#
+# 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";
+  DISPLAY='localhost:0.0'
+fi
+date >>~/mygroffer.log
 .fi
 .hy
 .ft
 .
 .
 .P
+This configuration sets three
+.I groffer
+options and runs two shell commands.
+.
 This has the following effects:
+.
+.
+.Topic
+Lines starting with a 
+.B #
+character
+are 
+.
+.
 .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;
+Use a resolution of
+.B 100 dpi
+and a text color of
+.B DarkBlue
+in all viewers that support this.
+.
+.
 .Topic
-the
+Force
 .BR gxditview (@MAN1EXT@)
-program is told to use
-.I DarkBlue
-as the text color by defining a shell function with the program's name
+as the X-mode viewer using the geometry option for setting the width
+to
+.B 850 dpi
+and the height to
+.B 800
+.BR dpi .
+.
+.
 .Topic
-force
-.I gxditview
-to be used in X mode by option
-.Opt_long x\­viewer .
+The variable
+.Env_var $DISPLAY
+is set to
+.IR localhost:0.0
+which allows to start
+.I groffer
+in the standard X display, even when the program is called from a text
+console.
 .
 .
-.P
-These configurations can be overridden by command line options and by
-environment variable
-.Env_var $GROFFER_OPT .
+.Topic
+Just for fun, the date of each
+.I groffer
+start is written to the file
+.B mygroffer.log
+in the home directory.
 .
 .
 .\" --------------------------------------------------------------------
@@ -2422,19 +2882,64 @@
 .I meintro.ms.gz
 in the directory
 .IR /usr/local/share/doc/groff ,
-using a default graphical viewer when in X window, or the
+using
+.I gxditview
+as graphical viewer when in X Window, or the
 .BR less (1)
 pager program when not in X.
 .
 .
 .TP
-.Shell_cmd "groffer\~groff.7\~groff\~\[cq]troff(1)\[cq]\~man:roff"
+.Shell_cmd "groffer\~groff"
+If the file
+.I ./groff
+exists use it as input.
+.
+Otherwise interpret the argument as a search for the man\~page named
+.I groff
+in the smallest possible man\~section, being secion 1 in this case.
+.
+.
+.TP
+.Shell_cmd "groffer\~man:groff"
+search for the man\~page of
+.I groff
+even when the file
+.I ./groff
+exists.
+.
+.
+.TP
+.Shell_cmd "groffer\~groff.7"
+.TP+
+.Shell_cmd "groffer\~7\~groff"
+search the man\~page of
+.I groff
+in 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
+.I ./fb.modes
+does not exist interpret this as a search for the man\~page of
+.IR 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
+.IR 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
 (in section\~1),
@@ -2455,16 +2960,18 @@
 .
 .
 .TP
-.Shell_cmd "LANG=de\~groffer\~--man\~--www\~--www-viever=netscape\~ls"
+.Shell_cmd "LANG=de\~groffer\~--man\~--www\~--www-viever=mozilla\~ls"
 .
 Retrieve the German 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
+.RI ( www
+mode) and view the result in the web browser
+.I galeon .
 The option
 .Opt_long man
 guarantees that the man\~page is retrieved, even when a local file
@@ -2473,28 +2980,25 @@
 .
 .
 .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.
+in man\~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
+Decompress the standard input, send this to
 .I groff
-using macro package
+intermediate mode without post-processing (groff option
+.Opt_short Z ),
+using macro package by
 .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@).
+.Opt_short m ) .
 .
 .
 .TP
@@ -2512,16 +3016,27 @@
 .
 The
 .B groffer
-shell script is compatible to both POSIX and GNU.
+shell script is compatible with both GNU and POSIX.
 .
 POSIX compatibility refers to
 .B IEEE P1003.2/D11.2
-of September 1991, a very early version of this standard.
+of September 1991, a very early version of the POSIX standard that is
+still freely available in the internet.
+.
+Unfortunately, this version of the standard has `local' for shell
+function variables removed.
+.
+As `local' is needed for serious programming this temporary POSIX
+deprecation was ignored.
+.
+.
+.P
+Most GNU shells are compatible with this interpretation of POSIX, but
+provide much more facilities.
 .
-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.
+Nevertheless this script uses only a restricted set of shell language
+elements and shell builtins, such that it can be run on `ash', a GNU
+shell that is quite fast, but has a slightly limited shell language.
 .
 The groffer script should work on most actual free and commercial
 operating systems.
@@ -2535,12 +3050,11 @@
 .
 .P
 The groffer shell script was tested with the following common
-implementations of the POSIX shell:
+implementations of the GNU shells:
 .BR ash (1),
-.BR bash (1),
-.BR ksh (1),
 POSIX
 .BR sh (1),
+.BR bash (1),
 and others.
 .
 Free POSIX compatible shells and shell utilities for most operating
@@ -2551,11 +3065,15 @@
 .P
 The best performance was obtained with the
 .I ash
-shell; so groffer tries to run under
+shell; so
+.I groffer
+tries to run under
 .I ash
 whenever possible.
 .
-If not available the shell under which the script was started in the
+If
+.I ash
+is not available the shell under which the script was started in the
 first place is used instead.
 .
 This can be modified by the option
@@ -2567,23 +3085,28 @@
 that is compatible to both POSIX
 .BR getopts (1)
 and GNU
-.BR getopt (1).
+.BR getopt (1)
+except for shortcuts of long options.
 .
-The following usual types of options are supported.
+The following standard types of options are supported.
 .
 .
 .Topic
-A single minus always refers to single character options, for example,
+A single minus always refers to single character option or a
+combination thereof, for example, the
+.I 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 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,
 .Opt_alt -- long=arg
 is equivalent to
 .Opt_alt -- long\~arg .
@@ -2593,7 +3116,7 @@
 An argument of
 .Opt_--
 ends option parsing; all further command line arguments are
-interpreted as filespec arguments.
+interpreted as file name arguments.
 .
 .
 .Topic
@@ -2610,8 +3133,11 @@
 .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.
+to a non-empty value.
+.
+Then the strange POSIX non-option behavior is adopted, i. e. option
+processing is stopped as soon as the first non-option argument is
+found and each following argument is taken as a file name.
 .
 For example, in posixly correct mode, the command line
 .Shell_cmd "groffer file1 -a -o arg file 2"
@@ -2630,27 +3156,27 @@
 .BR groff (@MAN1EXT@)
 .TP+
 .BR troff (@MAN1EXT@)
-Details on the options and environment variables available in groff;
+Details on the options and environment variables available in
+.IR groff ;
 all of them can be used with groffer.
 .
 .
 .TP
-.BR grog (@MAN1EXT@)
-Internally, groffer tries to guess the groff command line options from
-the input using this program.
-.
+.BR man (1)
+The standard program to diplay man\~pages.
 .
-.TP
-.BR groff_out (@MAN5EXT@)
-Documentation on the groff intermediate output (ditroff output).
+The information there is only useful if it is the man\~page for
+.IR "GNU\~man" .
+Then it documents the options and environment variables that are
+supported by groffer.
 .
 .
 .TP
-.BR xdvi (1)
+.BR gxditview (@MAN1EXT@)
 .TP+
-.BR dvilx (1)
+.BR xditview (1x)
 Viewers for groffer's
-.I dvi
+.I x
 mode.
 .
 .
@@ -2682,15 +3208,22 @@
 .
 .
 .TP
-.BR gxditview (@MAN1EXT@)
+.BR xdvi (1)
 .TP+
-.BR xditview (1x)
+.BR dvilx (1)
 Viewers for groffer's
-.I x
+.I dvi
 mode.
 .
 .
 .TP
+.BR less (1)
+Standard pager program for the
+.I tty
+.IR mode .
+.
+.
+.TP
 .BR gzip (1)
 .TP+
 .BR bzip2 (1)
@@ -2698,20 +3231,28 @@
 .
 .
 .TP
-.BR man (1)
-The standard program to diplay man\~pages.
+.BR groff (@MAN7EXT@)
+Documentation of the
+.I groff
+language.
 .
-The information there is only useful if it is the man\~page for
-.IR "GNU\~man" .
-Then it documents the options and environment variables that are
-supported by groffer.
+.
+.TP
+.BR grog (@MAN1EXT@)
+Internally, groffer tries to guess the groff command line options from
+the input using this program.
+.
+.
+.TP
+.BR groff_out (@MAN5EXT@)
+Documentation on the groff intermediate output (ditroff output).
 .
 .
 .\" --------------------------------------------------------------------
 .SH "AUTHOR"
 .\" --------------------------------------------------------------------
 .
-Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+Copyright (C) 2001,2002,2004 Free Software Foundation, Inc.
 .
 .P
 This document is distributed under the terms of the FDL (GNU Free
@@ -2726,8 +3267,7 @@
 .IR groff ,
 the GNU roff distribution.
 .
-It was written by
-.MTO bwarken@mayn.de "Bernd Warken" .
+It was written by Bernd Warken.
 .
 .
 \" --------------------------------------------------------------------
diff -ruN groff-1.19/contrib/groffer/groffer.sh groff-1.19.1/contrib/groffer/groffer.sh
--- groff-1.19/contrib/groffer/groffer.sh	Wed Jan 22 15:14:01 2003
+++ groff-1.19.1/contrib/groffer/groffer.sh	Tue May  4 07:03:01 2004
@@ -4,10 +4,10 @@
 
 # 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 Free Software Foundation, Inc.
+# Written by Bernd Warken
 
-# This file is part of groff.
+# This file is part of groff version @VERSION@.
 
 # groff is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -20,33 +20,44 @@
 # 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.
-
-export _PROGRAM_NAME;
-export _PROGRAM_VERSION;
-export _LAST_UPDATE;
+# along with groff; see the files COPYING and LICENSE in the top
+# directory of the groff source.  If not, write to the Free Software
+# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 _PROGRAM_NAME='groffer';
-_PROGRAM_VERSION='0.9.4';
-_LAST_UPDATE='22 Jan 2003';
+_PROGRAM_VERSION='0.9.7';
+_LAST_UPDATE='30 Apr 2004';
 
-# 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
+if test "${_groffer_run}" = ''; then
   # only reached during the first run of the script
 
-  export GROFFER_OPT;
-  export _groffer_run;
-  export _this;
-
-  _this="@BINDIR@/${_PROGRAM_NAME}";
+  export _PROGRAM_NAME;
+  export _PROGRAM_VERSION;
+  export _LAST_UPDATE;
+
+  export GROFFER_OPT;		# option environment for groffer
+  export _GROFFER_SH;		# file name of this shell script
+  export _OUTPUT_FILE_NAME;	# output generated, see main_set_res..()
+  export _groffer_run;		# counter for the runs of groffer
+
+  _groffer_run='first';
+
+  case "$0" in
+  *${_PROGRAM_NAME}*)
+    _GROFFER_SH="$0";
+    # was: _GROFFER_SH="@BINDIR@/${_PROGRAM_NAME}";
+    ;;
+  *)
+    echo "The ${_PROGRAM_NAME} script should be started directly." >&2
+    exit 1;
+    ;;
+  esac;
 
   ###########################
   # _get_opt_shell ("$@")
@@ -107,13 +118,13 @@
   if _test_on_shell "${_shell}"; then
     _groffer_run='second';
     # do not quote $_shell to allow arguments
-    exec ${_shell} "${_this}" "$@";
+    exec ${_shell} "${_GROFFER_SH}" "$@";
     exit;
   fi;
 
   # clean-up of shell determination
   unset _shell;
-  unset _this;
+  unset _GROFFER_SH;
   unset _groffer_run;
   _get_opt_shell()
   {
@@ -124,7 +135,14 @@
     return 0;
   }
 
+fi; # end of first run
+
+if test "${_groffer_run}" != 'second';
+then
+  echo "$_groffer_run should be 'second' here." >&2
+  exit 1
 fi;
+unset _groffer_run
 
 
 ########################################################################
@@ -140,146 +158,6 @@
 
 
 ########################################################################
-#                          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 ######################################################################## @@ -299,43 +177,6 @@ ######################################################################## -# 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) ######################################################################## @@ -404,9 +245,9 @@ _CONFFILES="/etc/groff/groffer.conf ${HOME}/.groff/groffer.conf"; export _DEFAULT_MODES; -_DEFAULT_MODES='ps,x,tty'; +_DEFAULT_MODES='x,ps,tty'; export _DEFAULT_RESOLUTION; -_DEFAULT_RESOLUTION='100'; +_DEFAULT_RESOLUTION='75'; export _DEFAULT_TTY_DEVICE; _DEFAULT_TTY_DEVICE='latin1'; @@ -415,12 +256,12 @@ # _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 +export _VIEWER_HTML_X; # viewer program for html mode in X +export _VIEWER_HTML_TTY; # viewer program for html mode in tty _VIEWER_DVI='xdvi,dvilx'; _VIEWER_PDF='xpdf,acroread'; _VIEWER_PS='gv,ghostview,gs_x11,gs'; -_VIEWER_WWW='mozilla,netscape,opera,amaya,arena'; +_VIEWER_HTML='konqueror,mozilla,netscape,opera,amaya,arena,lynx'; _VIEWER_X='gxditview,xditview'; # Search automatically in standard sections `1' to `8', and in the @@ -458,86 +299,95 @@ 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_GROFFER_LONG; -export _OPTS_GROFFER_SHORT; -export _OPTS_GROFF_LONG; -export _OPTS_GROFF_SHORT; +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_SHORT; export _OPTS_CMDLINE_LONG_NA; export _OPTS_CMDLINE_LONG_ARG; -export _OPTS_CMDLINE_LONG; - -###### native groffer options +###### groffer native 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'"; +_OPTS_GROFFER_LONG_NA="'auto' 'debug' 'default' 'dvi' \ +'groff' 'help' 'intermediate-output' 'html' 'man' \ +'no-location' 'no-man' 'pdf' 'ps' 'rv' 'source' 'text' 'text-device' \ +'title' 'tty' 'tty-device' 'version' 'whatis' 'where' 'www' 'x' 'X'"; + +_OPTS_GROFFER_LONG_ARG="\ +'apropos' 'apropos-data' 'apropos-devel' 'apropos-progs' \ +'default-modes' 'dvi-viewer' 'extension' 'fg' 'fn' 'font' \ +'foreground' 'html-viewer' 'mode' 'pdf-viewer' 'ps-viewer' 'shell' \ +'tty-viewer' 'www-viewer' 'x-viewer' 'X-viewer'"; -##### options inhereted from groff +##### groffer options inhereted from groff _OPTS_GROFF_SHORT_NA="'a' 'b' 'c' 'C' 'e' 'E' 'g' 'G' 'i' 'l' 'N' 'p' \ 'R' 's' 'S' 't' 'U' 'V' 'z'"; _OPTS_GROFF_SHORT_ARG="'d' 'f' 'F' 'I' 'L' 'm' 'M' 'n' 'o' 'P' 'r' \ 'w' 'W'"; -_OPTS_GROFF_LONG_NA=""; -_OPTS_GROFF_LONG_ARG=""; +_OPTS_GROFF_LONG_NA="'source'"; +_OPTS_GROFF_LONG_ARG="'device' 'macro-file'"; -###### man options (for parsing $MANOPT only) +##### groffer options inhereted from the X Window toolkit -_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_X_SHORT_NA=""; +_OPTS_X_SHORT_ARG=""; + +_OPTS_X_LONG_NA="'iconic' 'rv'"; -_OPTS_MAN_LONG_NA="'all' 'ascii' 'apropos' 'catman' 'debug' 'default' \ -'ditroff' 'help' 'local-file' 'location' 'troff' 'update' 'version' \ +_OPTS_X_LONG_ARG="'background' 'bd' 'bg' 'bordercolor' 'borderwidth' \ +'bw' 'display' 'fg' 'fn' 'font' 'foreground' 'ft', 'geometry' +'resolution' 'title' 'xrm'"; + +###### groffer options inherited from man + +_OPTS_MAN_SHORT_NA=""; +_OPTS_MAN_SHORT_ARG=""; + +_OPTS_MAN_LONG_NA="'all' 'ascii' 'catman' 'debug' 'ditroff' 'help' \ +'local-file' 'location' 'pager' 'troff' 'update' 'version' \ 'whatis' 'where'"; _OPTS_MAN_LONG_ARG="'extension' 'locale' 'manpath' \ 'pager' 'preprocessor' 'prompt' 'sections' 'systems' 'troff-device'"; -###### collections of options - -# groffer +###### additional options for parsing $MANOPT only -_OPTS_GROFFER_LONG="${_OPTS_GROFFER_LONG_ARG} ${_OPTS_GROFFER_LONG_NA}"; -_OPTS_GROFFER_SHORT=\ -"${_OPTS_GROFFER_SHORT_ARG} ${_OPTS_GROFFER_SHORT_NA}"; +_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'"; -# groff +_OPTS_MANOPT_LONG_NA="${_OPTS_MAN_LONG_NA} \ +'apropos' 'debug' 'default' 'html' 'ignore-case' 'location-cat' \ +'match-case' 'troff' 'update' 'version' 'where-cat'"; -_OPTS_GROFF_LONG="${_OPTS_GROFF_LONG_ARG} ${_OPTS_GROFF_LONG_NA}"; -_OPTS_GROFF_SHORT="${_OPTS_GROFF_SHORT_ARG} ${_OPTS_GROFF_SHORT_NA}"; +_OPTS_MANOPT_LONG_ARG="${_OPTS_MAN_LONG_NA} \ +'config_file' 'encoding' 'locale'"; -# all command line options +###### collections of 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_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_MAN_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_CMDLINE_LONG="${_OPTS_GROFFER_LONG} ${_OPTS_GROFF_LONG}"; +${_OPTS_GROFF_LONG_ARG} ${_OPTS_MAN_LONG_ARG} ${_OPTS_X_LONG_ARG}"; ######################################################################## @@ -581,7 +431,10 @@ 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_APROPOS; # call `apropos' program. +export _OPT_APROPOS_DATA; # `apropos' for man sections 4, 5, 7 +export _OPT_APROPOS_DEVEL; # `apropos' for man sections 2, 3, 9 +export _OPT_APROPOS_PROGS; # `apropos' for man sections 1, 6, 8 export _OPT_BD; # set border color in some modes. export _OPT_BG; # set background color in some modes. export _OPT_BW; # set border width in some modes. @@ -592,6 +445,7 @@ 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, "" @@ -602,15 +456,14 @@ 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_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_WWW; # viewer program for www mode +export _OPT_VIEWER_HTML; # viewer program for html mode export _OPT_VIEWER_X; # viewer program for x mode export _OPT_WHATIS; # print the one-liner man info -export _OPT_X; # groff option -X. export _OPT_XRM; # specify X resource. export _OPT_Z; # groff option -Z. # _TMP_* temporary files @@ -723,7 +576,10 @@ # _OPT_* as parsed from groffer command line _OPT_ALL='no'; - _OPT_APROPOS='no'; + _OPT_APROPOS=''; + _OPT_APROPOS_DATA=''; + _OPT_APROPOS_DEVEL=''; + _OPT_APROPOS_PROGS=''; _OPT_BD=''; _OPT_BG=''; _OPT_BW=''; @@ -734,25 +590,25 @@ _OPT_FG=''; _OPT_FN=''; _OPT_GEOMETRY=''; + _OPT_ICONIC='no'; _OPT_LANG=''; _OPT_LOCATION='no'; _OPT_MODE=''; _OPT_MANPATH=''; _OPT_PAGER=''; _OPT_RESOLUTION=''; - _OPT_RV=''; + _OPT_RV='no'; _OPT_SECTIONS=''; _OPT_SYSTEMS=''; _OPT_TITLE=''; - _OPT_TTY_DEVICE=''; + _OPT_TEXT_DEVICE=''; _OPT_V='no'; _OPT_VIEWER_DVI=''; _OPT_VIEWER_PDF=''; _OPT_VIEWER_PS=''; - _OPT_VIEWER_WWW=''; + _OPT_VIEWER_HTML=''; _OPT_VIEWER_X=''; _OPT_WHATIS='no'; - _OPT_X='no'; _OPT_XRM=''; _OPT_Z='no'; @@ -1194,10 +1050,27 @@ ######################################################################## +# apropos_run () +# +# +apropos_run() { + func_check apropos_run = 1 "$@"; + if apropos apropos >/dev/null 2>/dev/null; then + apropos "$1"; + elif man --apropos man >/dev/null 2>/dev/null; then + man --apropos "$1"; + elif man -k man >/dev/null 2>/dev/null; then + man -k "$1"; + fi; +} + + +######################################################################## # base_name () # # Get the file name part of , i.e. delete everything up to last -# `/' from the beginning of . +# `/' from the beginning of . Remove final slashes, too, to get a +# non-empty output. # # Arguments : 1 # Output : the file name part (without slashes) @@ -1205,16 +1078,24 @@ base_name() { func_check base_name = 1 "$@"; - case "$1" in + local f; + f="$1"; + case "$f" in */) - do_nothing; + # delete all final slashes + f="$(echo -n "$f" | sed -e '\|//*$|s|||')"; + ;; + esac; + case "$f" in + /|'') + eval "${return_bad}"; ;; */*) # delete everything before and including the last slash `/'. - echo -n "$1" | sed -e '\|^.*//*\([^/]*\)$|s||\1|'; + echo -n "$f" | sed -e '\|^.*//*\([^/]*\)$|s||\1|'; ;; *) - echo -n "$1"; + echo -n "$f"; ;; esac; eval "${return_ok}"; @@ -1243,7 +1124,7 @@ error 'catz(): for standard input use save_stdin()'; ;; esac; - if is_yes "${_HAS_BZIP}"; then + if obj _HAS_BZIP is_yes; then if bzip2 -t "$1" 2>/dev/null; then bzip2 -c -d "$1" 2>/dev/null; eval "${return_ok}"; @@ -1373,8 +1254,8 @@ set -- 'File'; ;; *) - if is_yes "${_MAN_ENABLE}"; then - if is_yes "${_MAN_FORCE}"; then + if obj _MAN_ENABLE is_yes; then + if obj _MAN_FORCE is_yes; then set -- 'Manpage' 'File'; else set -- 'File' 'Manpage'; @@ -1400,7 +1281,7 @@ fi; ;; Manpage) # parse filespec as man page - if is_not_yes "${_MAN_IS_SETUP}"; then + if obj _MAN_IS_SETUP is_not_yes; then man_setup; fi; if man_do_filespec "${_filespec}"; then @@ -1499,11 +1380,11 @@ { func_check get_first_essential '>=' 0 "$@"; local i; - if test "$#" -eq 0; then + if is_equal "$#" 0; then eval "${return_ok}"; fi; for i in "$@"; do - if is_not_empty "$i"; then + if obj i is_not_empty; then echo -n "$i"; eval "${return_ok}"; fi; @@ -1527,12 +1408,10 @@ is_dir() { func_check is_dir = 1 "$@"; - if is_not_empty "$1" && test -d "$1" && test -r "$1"; then + if test -d "$1" && test -r "$1"; then eval "${return_yes}"; - else - eval "${return_no}"; fi; - eval "${return_ok}"; + eval "${return_no}"; } @@ -1547,12 +1426,10 @@ is_empty() { func_check is_empty = 1 "$@"; - if test -z "$1"; then + if test "$1" = ''; then eval "${return_yes}"; - else - eval "${return_no}"; fi; - eval "${return_ok}"; + eval "${return_no}"; } @@ -1569,10 +1446,8 @@ func_check is_equal = 2 "$@"; if test "$1" = "$2"; then eval "${return_yes}"; - else - eval "${return_no}"; fi; - eval "${return_ok}"; + eval "${return_no}"; } @@ -1587,12 +1462,32 @@ is_file() { func_check is_file = 1 "$@"; - if is_not_empty "$1" && test -f "$1" && test -r "$1"; then + if test -f "$1" && test -r "$1"; then eval "${return_yes}"; - else - eval "${return_no}"; fi; - eval "${return_ok}"; + eval "${return_no}"; +} + + +######################################################################## +# is_non_empty_file () +# +# Test whether `file_name' is a non-empty existing file. +# +# Arguments : <=1 +# Return : +# `0' if arg1 is a non-empty existing file +# `1' otherwise +# +is_non_empty_file() +{ + func_check is_empty = 1 "$@"; + if is_file "$1"; then + if is_not_empty "$(cat "$1" | sed -e '/./q')"; then + eval "${return_yes}"; + fi; + fi; + eval "${return_no}"; } @@ -1609,10 +1504,8 @@ func_check is_not_dir = 1 "$@"; if is_dir "$1"; then eval "${return_no}"; - else - eval "${return_yes}"; fi; - eval "${return_ok}"; + eval "${return_yes}"; } @@ -1629,17 +1522,15 @@ func_check is_not_empty = 1 "$@"; if is_empty "$1"; then eval "${return_no}"; - else - eval "${return_yes}"; fi; - eval "${return_ok}"; + eval "${return_yes}"; } ######################################################################## # is_not_equal ( ) # -# Test whether `string1' and differ. +# Test whether `string1' differs from `string2'. # # Arguments : 2 # @@ -1648,10 +1539,8 @@ func_check is_not_equal = 2 "$@"; if is_equal "$1" "$2"; then eval "${return_no}"; - else - eval "${return_yes}"; - fi; - eval "${return_ok}"; + fi + eval "${return_yes}"; } @@ -1667,10 +1556,8 @@ func_check is_not_file '>=' 1 "$@"; if is_file "$1"; then eval "${return_no}"; - else - eval "${return_yes}"; fi; - eval "${return_ok}"; + eval "${return_yes}"; } @@ -1687,10 +1574,25 @@ func_check is_not_prog '>=' 1 "$@"; if where "$1" >/dev/null; then eval "${return_no}"; - else - eval "${return_yes}"; fi; - eval "${return_ok}"; + 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}"; } @@ -1704,12 +1606,10 @@ is_not_yes() { func_check is_not_yes = 1 "$@"; - if test "$1" = 'yes'; then + if is_yes "$1"; then eval "${return_no}"; - else - eval "${return_yes}"; fi; - eval "${return_ok}"; + eval "${return_yes}"; } @@ -1718,18 +1618,42 @@ # # Determine whether arg is a program in $PATH # -# Arguments : >=1 (empty allowed) +# Arguments : >=0 (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 + func_check is_prog '>=' 0 "$@"; + case "$#" in + 0) eval "${return_no}"; + ;; + *) + if where "$1" >/dev/null; then + eval "${return_yes}"; + fi; + ;; + esac + eval "${return_no}"; +} + + +######################################################################## +# is_writable () +# +# Test whether `name' is a writable file or directory. +# +# Arguments : >=1 (empty allowed), more args are ignored +# +is_writable() +{ + func_check is_writable '>=' 1 "$@"; + if test -r "$1"; then + if test -w "$1"; then + eval "${return_yes}"; + fi; fi; - eval "${return_ok}"; + eval "${return_no}"; } @@ -1744,12 +1668,10 @@ is_yes() { func_check is_yes = 1 "$@"; - if test "$1" = 'yes'; then + if is_equal "$1" 'yes'; then eval "${return_yes}"; - else - eval "${return_no}"; fi; - eval "${return_ok}"; + eval "${return_no}"; } @@ -1778,132 +1700,55 @@ ######################################################################## landmark '6: list_*()'; ######################################################################## +# +# `list' is an object class that represents an array or list. Its +# data consists of space-separated single-quoted elements. So a list +# has the form "'first' 'second' '...' 'last'". See list_append() for +# more details on the list structure. The array elements of `list' +# can be get by `set -- $list`. + ######################################################################## # list_append ( ...) # # Arguments: >=2 -# : a space-separated list of single-quoted elements. -# : some sequence of characters. -# Output: +# : a variable name for a list of single-quoted elements +# : some sequence of characters. +# Output: none, but $ is set to # if is empty: "'' '...'" -# otherwise: " '' ..." +# otherwise: "$list '' ..." # list_append() { func_check list_append '>=' 2 "$@"; local _element; - local _res; - _res="$1"; + local _list; + local _name; + _name="$1"; + eval _list='"${'$1'}"'; shift; for s in "$@"; do case "$s" in - *\'*) - # escape each single quote by replacing each "'" (squote) - # by "'\''" (squote bslash squote squote); - # note that the backslash must be doubled for `sed'. - _element="$(echo -n "$s" | sed -e 's/'"${_SQUOTE}"'/&\\&&/g')"; - ;; - *) - _element="$s"; - ;; - esac; - _res="${_res} '${_element}'"; - done; - echo -n "${_res}"; - eval "${return_ok}"; -} - - -######################################################################## -# 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" + *\'*) + # escape each single quote by replacing each + # "'" (squote) by "'\''" (squote bslash squote squote); + # note that the backslash must be doubled in the following `sed' + _element="$(echo -n "$s" | sed -e 's/'"${_SQUOTE}"'/&\\&&/g')"; ;; - 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}"; + '') + _element=""; ;; - 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")"; + *) + _element="$s"; + ;; + esac; + if obj _list is_empty; then + _list="'${_element}'"; + else + _list="${_list} '${_element}'"; + fi; done; - echo -n "${_list}"; + eval "${_name}"='"${_list}"'; eval "${return_ok}"; } @@ -1922,7 +1767,8 @@ # : 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 "$@"). +# ...: the arguments from a command line, such as "$@", +# the content of a variable, or direct arguments. # # Globals: $POSIXLY_CORRECT (only kept for compatibility). # @@ -1937,7 +1783,8 @@ # # Rationale: # In POSIX, the first non-option ends the option processing. -# In GNU mode (default), non-options are sorted behind the options. +# In GNU mode, used by default, non-option arguments are sorted +# behind the options. # # Use this function only in the following way: # eval set -- "$(args_norm '...' '...' '...' '...' "$@")"; @@ -1960,13 +1807,13 @@ 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 + _short_n="$(list_get "$1")"; # short options, no argument + _short_a="$(list_get "$2")"; # short options with argument + _long_n="$(list_get "$3")"; # long options, no argument + _long_a="$(list_get "$4")"; # long options with argument shift 4; _fn='list_from_cmdline():'; # for error messages - if test "$#" -eq 0; then + if is_equal "$#" 0; then echo -n "'--'"; eval "${return_ok}"; fi; @@ -1980,63 +1827,48 @@ --?*) # delete leading '--'; _opt="$(echo -n "${_arg}" | sed -e 's/^..//')"; - if list_has "${_long_n}" "${_opt}"; then + 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; + list_append _result "--${_opt}"; continue; fi; # test on `--opt=arg' if string_contains "${_opt}" '='; then # extract option by deleting from the first '=' to the end _lopt="$(echo -n "${_opt}" | sed -e 's/=.*$//')"; - if list_has "${_long_a}" "${_lopt}"; then + 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}")"; + list_append _result "--${_lopt}" "${_optarg}"; continue; fi; fi; + if list_has _long_a "${_opt}"; then + # long option with argument + if test "$#" -le 0; then + error "${_fn} no argument for option --${_opt}." + fi; + list_append _result "--${_opt}" "$1"; + shift; + continue; + fi; error "${_fn} --${_opt} is not an option." ;; -?*) # short option (cluster) # delete leading `-'; - _rest="$(echo -n "${_arg}" | sed -e 's/^.//')"; - while is_not_empty "${_rest}"; do + _rest="$(echo -n "${_arg}" | sed -e 's/^-//')"; + while obj _rest is_not_empty; do # get next short option from cluster (first char of $_rest) _optchar="$(echo -n "${_rest}" | sed -e 's/^\(.\).*$/\1/')"; # remove first character from ${_rest}; _rest="$(echo -n "${_rest}" | sed -e 's/^.//')"; - if list_has "${_short_n}" "${_optchar}"; then - _result="$(list_append "${_result}" "-${_optchar}")"; + if list_has _short_n "${_optchar}"; then + 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 + elif list_has _short_a "${_optchar}"; then + if obj _rest is_empty; then if test "$#" -ge 1; then - _result="$(list_append "${_result}" \ - "-${_optchar}" "$1")"; + list_append _result "-${_optchar}" "$1"; shift; continue; else @@ -2044,8 +1876,7 @@ "${_fn}"' no argument for option -'"${_optchar}." fi; else # rest is the argument - _result="$(list_append "${_result}" \ - "-${_optchar}" "${_rest}")"; + list_append _result "-${_optchar}" "${_rest}"; _rest=''; continue; fi; @@ -2059,19 +1890,19 @@ # When $POSIXLY_CORRECT is set this ends option parsing; # otherwise, the argument is stored as a file parameter and # option processing is continued. - _fparams="$(list_append "${_fparams}" "${_arg}")"; - if is_not_empty "$POSIXLY_CORRECT"; then + list_append _fparams "${_arg}"; + if obj POSIXLY_CORRECT is_not_empty; then break; fi; ;; esac; done; - _result="$(list_append "${_result}" '--')"; - if is_not_empty "${_fparams}"; then + list_append _result '--'; + if obj _fparams is_not_empty; then _result="${_result} ${_fparams}"; fi; if test "$#" -gt 0; then - _result="$(list_append "${_result}" "$@")"; + list_append _result "$@"; fi; echo -n "$_result"; eval "${return_ok}"; @@ -2079,30 +1910,14 @@ ######################################################################## -# list_from_lists ( ...) -# -# 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. +# 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 string +# Output: the resulting list string # list_from_split() { @@ -2129,22 +1944,65 @@ ######################################################################## -# list_has ( ) +# list_get () +# +# Check whether is a space-separated list of '-quoted elements. +# +# If the test fails an error is raised. +# If the test succeeds the argument is echoed. +# +# Testing criteria: +# A list has the form "'first' 'second' '...' 'last'". So it has a +# leading and a final quote and the elements are separated by "' '" +# constructs. If these are all removed there should not be any +# unescaped single-quotes left. Watch out for escaped single +# quotes; they have the form '\'' (sq bs sq sq). + +# Arguments: 1 +# Output: the argument unchanged, if the check succeeded. +# +list_get() +{ + func_check list_get = 1 "$@"; + local _list; + eval _list='"${'$1'}"'; + # remove leading and final space characters + _list="$(echo -n "${_list}" | \ + sed -e '/^['"${_SPACE}${_TAB}"']*/s///' | \ + sed -e '/['"${_SPACE}${_TAB}"']*$/s///')"; + case "${_list}" in + '') + eval "${return_ok}"; + ;; + \'*\') + echo -n "${_list}"; + eval "${return_ok}"; + ;; + *) + error "list_get(): bad list: $1" + ;; + esac; + eval "${return_ok}"; +} + + +######################################################################## +# list_has ( ) # # Arguments: 2 -# : a space-separated list of single-quoted elements. -# : some sequence of characters. +# : a variable name for a list of single-quoted elements +# : some sequence of characters. # Output: # if is empty: "'' '...'" -# otherwise: " '' ..." +# otherwise: "list '' ..." # list_has() { func_check list_has = 2 "$@"; - if is_empty "$1"; then + eval _list='"${'$1'}"'; + if obj _list is_empty; then eval "${return_no}"; fi; - _list="$1"; _element="$2"; case "$2" in \'*\') _element="$2"; ;; @@ -2172,10 +2030,10 @@ list_has_not() { func_check list_has_not = 2 "$@"; - if is_empty "$1"; then + eval _list='"${'$1'}"'; + if obj _list is_empty; then eval "${return_yes}"; fi; - _list="$1"; _element="$2"; case "$2" in \'*\') _element="$2"; ;; @@ -2191,50 +2049,6 @@ ######################################################################## -# 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_*()'; ######################################################################## @@ -2266,7 +2080,7 @@ local _spec; local _string; local s; - if is_empty "${_MAN_PATH}"; then + if obj _MAN_PATH is_empty; then eval "${return_bad}"; fi; if is_empty "$1"; then @@ -2285,11 +2099,11 @@ _section="$(echo -n "${_spec}" \ | sed -e 's/^man:\(..*\)(\(..*\))$/\2/')"; ;; - man:?*.?*) # man:name.section + man:?*.[0-9on]) # man:name.section _name="$(echo -n "${_spec}" \ - | sed -e 's/^man:\(..*\)\.\(..*\)$/\1/')"; + | sed -e 's/^man:\(..*\)\..$/\1/')"; _section="$(echo -n "${_spec}" \ - | sed -e 's/^man:\(..*\)\.\(..*\)$/\2/')"; + | sed -e 's/^.*\(.\)$/\1/')"; ;; man:?*) # man:name _name="$(echo -n "${_spec}" | sed -e 's/^man://')"; @@ -2300,25 +2114,25 @@ _section="$(echo -n "${_spec}" \ | sed -e 's/^\(..*\)(\(..*\))$/\2/')"; ;; - ?*.?*) # name.section + ?*.[0-9on]) # name.section _name="$(echo -n "${_spec}" \ - | sed -e 's/^\(..*\)\.\(..*\)$/\1/')"; + | sed -e 's/^\(..*\)\..$/\1/')"; _section="$(echo -n "${_spec}" \ - | sed -e 's/^\(..*\)\.\(..*\)$/\2/')"; + | sed -e 's/^.*\(.\)$/\1/')"; ;; ?*) _name="${_filespec}"; ;; esac; - if is_empty "${_name}"; then + if obj _name is_empty; then eval "${return_bad}"; fi; _got_one='no'; - if is_empty "${_section}"; then + if obj _section is_empty; then eval set -- "${_MAN_AUTO_SEC}"; for s in "$@"; do if man_search_section "${_name}" "$s"; then # found - if is_yes "${_MAN_ALL}"; then + if obj _MAN_ALL is_yes; then _got_one='yes'; else eval "${return_good}"; @@ -2332,7 +2146,7 @@ eval "${return_bad}"; fi; fi; - if is_yes "${_MAN_ALL}" && is_yes "${_got_one}"; then + if obj _MAN_ALL is_yes && is_yes "${_got_one}"; then eval "${return_good}"; fi; eval "${return_bad}"; @@ -2366,7 +2180,7 @@ eval "${return_ok}"; ;; 3) - register_title "$2($3)"; + register_title "$2.$3"; eval "${return_ok}"; ;; esac; @@ -2394,7 +2208,7 @@ local _section; local d; local f; - if is_empty "${_MAN_PATH}"; then + if obj _MAN_PATH is_empty; then eval "${return_bad}"; fi; if is_empty "$1"; then @@ -2407,16 +2221,16 @@ _section="$2"; eval set -- "$(path_split "${_MAN_PATH}")"; _got_one='no'; - if is_empty "${_MAN_EXT}"; then + if obj _MAN_EXT is_empty; then for d in "$@"; do _dir="$(dirname_append "$d" "man${_section}")"; - if is_dir "${_dir}"; then + if obj _dir is_dir; then _prefix="$(dirname_append "${_dir}" "${_name}.${_section}")"; for f in $(echo -n ${_prefix}*); do - if is_file "$f"; then + if obj f is_file; then if is_yes "${_got_one}"; then register_file "$f"; - elif is_yes "${_MAN_ALL}"; then + elif obj _MAN_ALL is_yes; then man_register_file "$f" "${_name}"; else man_register_file "$f" "${_name}" "${_section}"; @@ -2432,13 +2246,13 @@ # check for directory name having trailing extension for d in "$@"; do _dir="$(dirname_append $d man${_section}${_ext})"; - if is_dir "${_dir}"; then + if obj _dir is_dir; then _prefix="$(dirname_append "${_dir}" "${_name}.${_section}")"; for f in ${_prefix}*; do - if is_file "$f"; then + if obj f is_file; then if is_yes "${_got_one}"; then register_file "$f"; - elif is_yes "${_MAN_ALL}"; then + elif obj _MAN_ALL is_yes; then man_register_file "$f" "${_name}"; else man_register_file "$f" "${_name}" "${_section}"; @@ -2452,14 +2266,14 @@ # check for files with extension in directories without extension for d in "$@"; do _dir="$(dirname_append "$d" "man${_section}")"; - if is_dir "${_dir}"; then + if obj _dir is_dir; then _prefix="$(dirname_append "${_dir}" \ "${_name}.${_section}${_ext}")"; for f in ${_prefix}*; do - if is_file "$f"; then + if obj f is_file; then if is_yes "${_got_one}"; then register_file "$f"; - elif is_yes "${_MAN_ALL}"; then + elif obj _MAN_ALL is_yes; then man_register_file "$f" "${_name}"; else man_register_file "$f" "${_name}" "${_section}"; @@ -2471,7 +2285,7 @@ fi; done; fi; - if is_yes "${_MAN_ALL}" && is_yes "${_got_one}"; then + if obj _MAN_ALL is_yes && is_yes "${_got_one}"; then eval "${return_good}"; fi; eval "${return_bad}"; @@ -2505,35 +2319,35 @@ func_check main_man_setup = 0 "$@"; local _lang; - if is_yes "${_MAN_IS_SETUP}"; then + if obj _MAN_IS_SETUP is_yes; then eval "${return_ok}"; fi; _MAN_IS_SETUP='yes'; - if is_not_yes "${_MAN_ENABLE}"; then + if obj _MAN_ENABLE is_not_yes; then eval "${return_ok}"; fi; # determine basic path for man pages _MAN_PATH="$(get_first_essential \ "${_OPT_MANPATH}" "${_MANOPT_PATH}" "${MANPATH}")"; - if 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 + if obj _MAN_PATH is_empty; then manpath_set_from_path; else _MAN_PATH="$(path_clean "${_MAN_PATH}")"; fi; - if is_empty "${_MAN_PATH}"; then + if obj _MAN_PATH is_empty; then + if is_prog 'manpath'; then + _MAN_PATH="$(manpath 2>/dev/null)"; # not always available + fi; + fi; + if obj _MAN_PATH is_empty; then _MAN_ENABLE="no"; eval "${return_ok}"; fi; _MAN_ALL="$(get_first_essential "${_OPT_ALL}" "${_MANOPT_ALL}")"; - if is_empty "${_MAN_ALL}"; then + if obj _MAN_ALL is_empty; then _MAN_ALL='no'; fi; @@ -2562,7 +2376,7 @@ _MAN_SEC="$(get_first_essential \ "${_OPT_SECT}" "${_MANOPT_SEC}" "${MANSEC}")"; - if is_empty "${_MAN_PATH}"; then + if obj _MAN_PATH is_empty; then _MAN_ENABLE="no"; eval "${return_ok}"; fi; @@ -2596,7 +2410,7 @@ func_check manpath_add_lang_sys = 0 "$@"; local p; local _mp; - if is_empty "${_MAN_PATH}"; then + if obj _MAN_PATH is_empty; then eval "${return_ok}"; fi; # twice test both sys and lang @@ -2623,16 +2437,14 @@ # argument: 2: `man_path' and `dir' # output: colon-separated path of the retrieved subdirectories # + func_check _manpath_add_lang_sys_single = 2 "$@"; 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 + if obj _res path_not_contains "${_dir}" && obj _dir is_dir; then _res="${_res}:${_dir}"; fi; done; @@ -2667,7 +2479,7 @@ _manpath=''; # get a basic man path from $PATH - if is_not_empty "${PATH}"; then + if obj PATH is_not_empty; then eval set -- "$(path_split "${PATH}")"; for d in "$@"; do # delete the final `/bin' part @@ -2687,7 +2499,7 @@ /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 + if obj _manpath path_not_contains "$d" && obj d is_dir; then _manpath="${_manpath}:$d"; fi; done; @@ -2698,8 +2510,106 @@ ######################################################################## -landmark '9: path_*()'; +landmark '9: obj_*()'; +######################################################################## + +######################################################################## +# obj ( ...) +# +# This works like a method (object function) call for an object. +# Run " $ ...". +# +# The first argument represents an object whose data is given as first +# argument to (). +# +# Argument: >=2 +# : variable name +# : a program or function name +# +obj() +{ + func_check obj '>=' 2 "$@"; + local func; + local var; + if is_empty "$2"; then + error "obj(): function name is empty." + else + func="$2"; + fi; + eval arg1='"${'$1'}"'; + shift; + shift; + eval "${func}"' "${arg1}" "$@"'; +} + + +######################################################################## +# obj_data () +# +# Print the data of , i.e. the content of $. +# For possible later extensions. +# +# Arguments: 1 +# : a variable name +# Output: the data of +# +obj_data() +{ + func_check obj '=' 1 "$@"; + if is_empty "$1"; then + error "obj_data(): object name is empty." + fi; + eval echo -n '"${'$1'}"'; +} + + +######################################################################## +# obj_from_output ( ...) +# +# Run '$="$( ...)"' to set the result of a +# function call to a global variable. +# +# Arguments: >=2 +# : a variable name +# : the name of a function or program +# : optional argument to +# Output: none +# +obj_from_output() +{ + func_check obj_from_output '>=' 2 "$@"; + local result_name; + if is_empty "$1"; then + error "res(): variable name is empty."; + elif is_empty "$2"; then + error "res(): function name is empty." + else + result_name="$1"; + fi; + shift; + eval "${result_name}"'="$('"$@"')"'; +} + + ######################################################################## +# obj_set ( ) +# +# Set the data of , i.e. call "$=". +# +# Arguments: 2 +# : a variable name +# : a string +# Output:: none +# +obj_set() +{ + func_check obj_set '=' 2 "$@"; + if is_empty "$1"; then + error "obj_set(): object name is empty." + fi; + eval "$1"='"$2"'; +} + ######################################################################## # path_chop () @@ -2738,16 +2648,16 @@ local _dir; local _res; local i; - if test "$#" -ne 1; then + if is_not_equal "$#" 1; then error 'path_clean() needs 1 argument.'; fi; _arg="$1"; eval set -- "$(path_split "${_arg}")"; _res=""; for i in "$@"; do - if is_not_empty "$i" \ - && path_not_contains "${_res}" "$i" \ - && is_dir "$i"; + if obj i is_not_empty \ + && obj _res path_not_contains "$i" \ + && obj i is_dir; then case "$i" in ?*/) _res="${_res}$(dirname_chop "$i")"; ;; @@ -2822,15 +2732,6 @@ ######################################################################## -# 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_*()'; ######################################################################## @@ -2880,7 +2781,7 @@ # remove extension `.Z' _title="$(echo -n "${_title}" | sed -e 's/\.Z$//')"; - if is_empty "${_title}"; then + if obj _title is_empty; then eval "${return_ok}"; fi; _REGISTERED_TITLE="${_REGISTERED_TITLE} ${_title}"; @@ -2889,11 +2790,20 @@ ######################################################################## +# reset () +# +# Reset the variables that can be affected by options to their default. +# +# +# Defined in section `Preset' after the rudimentary shell tests. + + +######################################################################## # save_stdin () # # Store standard input to temporary file (with decompression). # -if test "${_HAS_COMPRESSION}" = 'yes'; then +if obj _HAS_COMPRESSION is_yes; then save_stdin() { local _f; @@ -2990,7 +2900,8 @@ { func_check tmp_create '<=' 1 "$@"; local _tmp; - _tmp="${_TMP_DIR}/$1"; + # the output file does not have `,' as first character + _tmp="${_TMP_DIR}/,$1"; echo -n >"${_tmp}"; echo -n "${_tmp}"; # output file name eval "${return_ok}"; @@ -3006,10 +2917,10 @@ { func_check to_tmp = 1 "$@"; if is_file "$1"; then - if is_yes "${_OPT_LOCATION}"; then + if obj _OPT_LOCATION is_yes; then echo2 "$1"; fi; - if is_yes "${_OPT_WHATIS}"; then + if obj _OPT_WHATIS is_yes; then what_is "$1" >>"${_TMP_CAT}"; else catz "$1" >>"${_TMP_CAT}"; @@ -3062,24 +2973,21 @@ ######################################################################## # usage () # -# print usage information to stderr +# print usage information to stderr; for groffer option --help. # usage() { func_check usage = 0 "$@"; - echo2; + echo; version; - cat >&2 <&2 <&1 | sed -e '/^ *$/q' | sed -e '1s/^/is part of /' >&2; @@ -3198,7 +3105,7 @@ # 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 + if obj _res is_not_empty; then # traditional man style # get the text between the first and the second `.SH' macro, by # - delete up to first .SH; # - of this, print everything up to next .SH, and delete the rest; @@ -3212,7 +3119,7 @@ # 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 + if obj _res is_not_empty; then # BSD doc style # get the text between the first and the second `.Nd' macro, by # - delete up to first .Nd; # - of this, print everything up to next .Nd, and delete the rest; @@ -3244,7 +3151,7 @@ local _arg; local p; _arg="$1"; - if is_empty "${_arg}"; then + if obj _arg is_empty; then eval "${return_bad}"; fi; case "${_arg}" in @@ -3259,8 +3166,8 @@ eval set -- "$(path_split "${PATH}")"; for p in "$@"; do case "$p" in - */) _file=$p${_arg}; ;; - *) _file=$p/${_arg}; ;; + */) _file=${p}${_arg}; ;; + *) _file=${p}/${_arg}; ;; esac; if test -f "${_file}" && test -x "${_file}"; then echo -n "${_file}"; @@ -3302,46 +3209,56 @@ # 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 + if is_not_empty "$d"; then + if obj d is_dir && obj d is_writable; then _TMP_DIR="${d}/${_PROGRAM_NAME}${_PROCESS_ID}"; - if test -d "${_TMP_DIR}"; then + if obj _TMP_DIR is_dir; then rm -f "${_TMP_DIR}"/*; break; else mkdir "${_TMP_DIR}"; - if test ! -d "${_TMP_DIR}"; then - _TMP_DIR=''; + if obj _TMP_DIR is_not_dir; then + _TMP_DIR=''; continue; - fi; + fi; break; - fi; + fi; fi; - if test ! -w "${_TMP_DIR}"; then + if obj _TMP_DIR is_not_writable; then _TMP_DIR=''; continue; fi; fi; done; unset d; - if test "${_TMP_DIR}" = ''; then + if obj _TMP_DIR is_empty; then error "Couldn't create a directory for storing temporary files."; fi; _TMP_CAT="$(tmp_create groffer_cat)"; _TMP_STDIN="$(tmp_create groffer_input)"; + + # groffer configuration files + for f in ${_CONFFILES}; do + if obj f is_file; then + echo '_groffer_opt=""' >>${_TMP_CAT}; + # collect the lines starting with a minus + cat "$f" | sed -e \ + '/^[ ]*\(-.*\)$/s//_groffer_opt="${_groffer_opt} \1"'/ \ + >>${_TMP_CAT}; + # prepend the collected information to $GROFFER_OPT + echo 'GROFFER_OPT="${_groffer_opt} ${GROFFER_OPT}"' >>${_TMP_CAT}; + fi; + done; + . "${_TMP_CAT}"; + _TMP_CAT="$(tmp_create groffer_cat)"; + eval "${return_ok}"; } # main_init() @@ -3353,7 +3270,7 @@ # string; found man arguments can be overwritten by the command line. # # Globals: -# in: $MANOPT, $_OPTS_MAN_* +# in: $MANOPT, $_OPTS_MANOPT_* # out: $_MANOPT_* # in/out: $GROFFER_OPT # @@ -3364,45 +3281,45 @@ local _opt; local _list; _list=''; - if test "${MANOPT}" != ''; then + if obj MANOPT is_not_empty; then MANOPT="$(echo -n "${MANOPT}" | \ sed -e 's/^'"${_SPACE}${_SPACE}"'*//')"; fi; - if test "${MANOPT}" = ''; then + if obj MANOPT is_empty; then eval "${return_ok}"; fi; # add arguments in $MANOPT by mapping them to groffer options eval set -- "$(list_from_cmdline \ - "${_OPTS_MAN_SHORT_NA}" "${_OPTS_MAN_SHORT_ARG}" \ - "${_OPTS_MAN_LONG_NA}" "${_OPTS_MAN_LONG_ARG}" \ + _OPTS_MANOPT_SHORT_NA _OPTS_MANOPT_SHORT_ARG \ + _OPTS_MANOPT_LONG_NA _OPTS_MANOPT_LONG_ARG \ "${MANOPT}")"; until test "$#" -le 0 || is_equal "$1" '--'; do _opt="$1"; shift; case "${_opt}" in -7|--ascii) - _list="$(list_append "${_list}" '--ascii')"; + list_append _list '--ascii'; ;; -a|--all) - _list="$(list_append "${_list}" '--all')"; + list_append _list '--all'; ;; -c|--catman) do_nothing; shift; ;; -d|--debug) - _list="$(list_append "${_list}" '--debug')"; + list_append _list '--debug'; ;; -D|--default) # undo all man options so far _list=''; ;; -e|--extension) - _list="$(list_append "${_list}" '--extension')"; + list_append _list '--extension'; shift; ;; -f|--whatis) - _list="$(list_append "${_list}" '--whatis')"; + list_append _list '--whatis'; shift; ;; -h|--help) @@ -3410,30 +3327,31 @@ shift; ;; -k|--apropos) - _list="$(list_append "${_list}" '--apropos')"; + # groffer's --apropos takes an argument, but man's does not, so + do_nothing; shift; ;; -l|--local-file) - _list="$(list_append "${_list}" '--local-file')"; + list_append _list '--local-file'; ;; -L|--locale) - _list="$(list_append "${_list}" '--locale' "$1")"; + list_append _list '--locale' "$1"; shift; ;; -m|--systems) - _list="$(list_append "${_list}" '--systems' "$1")"; + list_append _list '--systems' "$1"; shift; ;; -M|--manpath) - _list="$(list_append "${_list}" '--manpath' "$1")"; + list_append _list '--manpath' "$1"; shift; ;; -p|--preprocessor) do_nothing; shift; ;; - -P|--pager) - _list="$(list_append "${_list}" '--pager' "$1")"; + -P|--pager|--tty-viewer) + list_append _list '--pager' "$1"; shift; ;; -r|--prompt) @@ -3441,7 +3359,7 @@ shift; ;; -S|--sections) - _list="$(list_append "${_list}" '--sections' "$1")"; + list_append _list '--sections' "$1"; shift; ;; -t|--troff) @@ -3449,7 +3367,7 @@ shift; ;; -T|--device) - _list="$(list_append "${_list}" '-T' "$1")"; + list_append _list '-T' "$1"; shift; ;; -u|--update) @@ -3460,16 +3378,21 @@ do_nothing; ;; -w|--where|--location) - _list="$(list_append "${_list}" '--location')"; + list_append _list '--location'; ;; -Z|--ditroff) - _list="$(list_append "${_list}" '-Z' "$1")"; + list_append _list '-Z' "$1"; shift; ;; # ignore all other options esac; done; - GROFFER_OPT="$(list_from_lists "${_list}" "${GROFFER_OPT}")"; + # append the 2 lists in $_list and $GROFFER_OPT to $GROFFER_OPT + if obj GROFFER_OPT is_empty; then + GROFFER_OPT="${_list}"; + elif obj _list is_not_empty; then + GROFFER_OPT="${_list} ${GROFFER_OPT}"; + fi; eval "${return_ok}"; } # main_parse_MANOPT() @@ -3502,8 +3425,8 @@ 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" \ + _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 @@ -3526,9 +3449,9 @@ -Q|--source) # output source code (`Quellcode'). _OPT_MODE='source'; ;; - -T|--device|--troff-device) - # device; arg + -T|--device|--troff-device) # device; arg _OPT_DEVICE="$1"; + _check_device_with_mode; shift; ;; -v|--version) @@ -3538,25 +3461,22 @@ -V) _OPT_V='yes'; ;; - -X) - _OPT_X='yes'; - ;; - -Z|--ditroff|--intermediate-output) - # groff intermediate output + -Z|--ditroff|--intermediate-output) # groff intermediate output _OPT_Z='yes'; ;; + -X|--X|--x) + _OPT_MODE=x; + ;; -?) # delete leading `-' _optchar="$(echo -n "${_opt}" | sed -e 's/^.//')"; - if list_has "${_OPTS_GROFF_SHORT_NA}" "${_optchar}"; + if list_has _OPTS_GROFF_SHORT_NA "${_optchar}"; then - _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" \ - "${_opt}")"; - elif list_has "${_OPTS_GROFF_SHORT_ARG}" "${_optchar}"; + list_append _ADDOPTS_GROFF "${_opt}"; + elif list_has _OPTS_GROFF_SHORT_ARG "${_optchar}"; then - _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" \ - "${_opt}" "$1")"; - shift; + list_append _ADDOPTS_GROFF "${_opt}" "$1"; + shift; else error "Unknown option : \`$1'"; fi; @@ -3565,11 +3485,34 @@ _OPT_ALL="yes"; ;; --ascii) - _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" \ - '-mtty-char')"; + list_append _ADDOPTS_GROFF '-mtty-char'; + if obj _mode is_empty; then + _mode='text'; + fi; ;; - --apropos) - _OPT_APROPOS="yes"; + --apropos) # run `apropos' + apropos_run "$1"; + _code="$?"; + clean_up; + exit "${_code}"; + ;; + --apropos-data) # run `apropos' for data sections + apropos_run "$1" | grep '^[^(]*([457])'; + _code="$?"; + clean_up; + exit "${_code}"; + ;; + --apropos-devel) # run `apropos' for development sections + apropos_run "$1" | grep '^[^(]*([239])'; + _code="$?"; + clean_up; + exit "${_code}"; + ;; + --apropos-progs) # run `apropos' for program sections + apropos_run "$1" | grep '^[^(]*([168])'; + _code="$?"; + clean_up; + exit "${_code}"; ;; --auto) # the default automatic mode _mode=''; @@ -3593,7 +3536,7 @@ _OPT_DEFAULT_MODES="$1"; shift; ;; - --debug) # sequence of modes in auto mode; arg + --debug) # buggy, only for development _OPT_DEBUG='yes'; ;; --display) # set X display, arg @@ -3626,6 +3569,16 @@ --groff) _OPT_MODE='groff'; ;; + --html|--www) # display with web browser + _OPT_MODE=html; + ;; + --html-viewer|--www-viewer) # viewer program for html mode; arg + _OPT_VIEWER_HTML="$1"; + shift; + ;; + --iconic) # start viewers as icons + _OPT_ICONIC='yes'; + ;; --locale) # set language for man pages, arg # argument is xx[_territory[.codeset[@modifier]]] (ISO 639,...) _OPT_LANG="$1"; @@ -3651,12 +3604,15 @@ _arg="$1"; shift; case "${_arg}" in - auto|'') # the default automatic mode + auto|'') # search mode automatically among default _mode=''; ;; groff) # pass input to plain groff _mode='groff'; ;; + html|www) # display with a web browser + _mode='html'; + ;; dvi) # display with xdvi viewer _mode='dvi'; ;; @@ -3666,12 +3622,15 @@ ps) # display with Postscript viewer _mode='ps'; ;; - X|x) # output on X roff viewer - _mode='x'; + text) # output on terminal + _mode='text'; ;; tty) # output on terminal _mode='tty'; ;; + X|x) # output on X roff viewer + _mode='x'; + ;; Q|source) # display source code _mode="source"; ;; @@ -3739,35 +3698,28 @@ _OPT_SYSTEMS="$1"; shift; ;; + --text) # text mode without pager + _OPT_MODE=text; + ;; --title) # title for X viewers; arg _OPT_TITLE="$1"; shift; ;; - --tty) - _OPT_MODE="tty"; + --tty) # tty mode, text with pager + _OPT_MODE=tty; ;; - --tty-device) # device for tty mode; arg - _OPT_TTY_DEVICE="$1"; + --text-device|--tty-device) # device for tty mode; arg + _OPT_TEXT_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")"; + list_append _OPT_XRM "$1"; shift; ;; - --x-viewer) # viewer program for x mode; arg + --x-viewer|--X-viewer) # viewer program for x mode; arg _OPT_VIEWER_X="$1"; shift; ;; @@ -3778,25 +3730,66 @@ done; shift; # remove `--' argument - if test "${_DEBUG}" != 'yes'; then - if test "${_OPT_DEBUG}" = 'yes'; then + if obj _DEBUG is_not_yes; then + if obj _OPT_DEBUG is_yes; then _DEBUG='yes'; fi; fi; # Remaining arguments are file names (filespecs). # Save them to list $_FILEARGS - if test "$#" -eq 0; then # use "-" for standard input + if is_equal "$#" 0; then # use "-" for standard input set -- '-'; fi; - _FILEARGS="$(list_from_args "$@")"; - if list_has "$_FILEARGS" '-'; then + _FILEARGS=''; + list_append _FILEARGS "$@"; + if list_has _FILEARGS '-'; then save_stdin; fi; # $_FILEARGS must be retrieved with `eval set -- "$_FILEARGS"' eval "${return_ok}"; } # main_parse_args() +# Called from main_parse_args() because double `case' is not possible. +# Globals: $_OPT_DEVICE, $_OPT_MODE +_check_device_with_mode() +{ + func_check _check_device_with_mode = 0 "$@"; + case "${_OPT_DEVICE}" in + dvi) + _OPT_MODE=dvi; + eval "${return_ok}"; + ;; + html) + _OPT_MODE=html; + eval "${return_ok}"; + ;; + lbp|lj4) + _OPT_MODE=groff; + eval "${return_ok}"; + ;; + ps) + _OPT_MODE=ps; + eval "${return_ok}"; + ;; + ascii|cp1047|latin1|utf8) + if obj _OPT_MODE is_not_equal text; then + _OPT_MODE=tty; # default text mode + fi; + eval "${return_ok}"; + ;; + X*) + _OPT_MODE=x; + eval "${return_ok}"; + ;; + *) # unknown device, go to groff mode + _OPT_MODE=groff; + eval "${return_ok}"; + ;; + esac; + eval "${return_error}"; +} + ######################################################################## # main_set_mode () @@ -3829,38 +3822,52 @@ local _viewers; # handle apropos - if is_yes "${_OPT_APROPOS}"; then - apropos "$@"; + if obj _OPT_APROPOS is_not_empty; then + apropos "${_OPT_APROPOS}"; + _code="$?"; + clean_up; + exit "${_code}"; + fi; + if obj _OPT_APROPOS_DATA is_not_empty; then + apropos "$@" | grep '^[^(]*([457])'; + _code="$?"; + clean_up; + exit "${_code}"; + fi; + if obj _OPT_APROPOS_DEVEL is_not_empty; then + apropos "$@" | grep '^[^(]*([239])'; + _code="$?"; + clean_up; + exit "${_code}"; + fi; + if obj _OPT_APROPOS_PROGS is_not_empty; then + apropos "$@" | grep '^[^(]*([168])'; _code="$?"; clean_up; exit "${_code}"; fi; # set display - if is_not_empty "${_OPT_DISPLAY}"; then + if obj _OPT_DISPLAY is_not_empty; 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 + if obj _OPT_V is_yes; then _DISPLAY_MODE='groff'; - _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" '-X')"; + list_append _ADDOPTS_GROFF '-V'; fi; - if is_yes "${_OPT_Z}"; then + if obj _OPT_Z is_yes; then _DISPLAY_MODE='groff'; - _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" '-Z')"; + list_append _ADDOPTS_GROFF '-Z'; fi; - if is_equal "${_OPT_MODE}" 'groff'; then + if obj _OPT_MODE is_equal 'groff'; then _DISPLAY_MODE='groff'; fi; - if is_equal "${_DISPLAY_MODE}" 'groff'; then + if obj _DISPLAY_MODE is_equal 'groff'; then eval "${return_ok}"; fi; - if is_equal "${_OPT_MODE}" 'source'; then + if obj _OPT_MODE is_equal 'source'; then _DISPLAY_MODE='source'; eval "${return_ok}"; fi; @@ -3869,34 +3876,40 @@ '') # automatic mode case "${_OPT_DEVICE}" in X*) - if is_empty "${DISPLAY}"; then + if obj DISPLAY is_empty; then error "no X display found for device ${_OPT_DEVICE}"; fi; _DISPLAY_MODE='x'; eval "${return_ok}"; ;; ascii|cp1047|latin1|utf8) - _DISPLAY_MODE='tty'; + if obj _DISPLAY_MODE is_not_equal 'text'; then + _DISPLAY_MODE='tty'; + fi; eval "${return_ok}"; ;; esac; - if is_empty "${DISPLAY}"; then + if obj DISPLAY is_empty; then _DISPLAY_MODE='tty'; eval "${return_ok}"; fi; - if is_empty "${_OPT_DEFAULT_MODES}"; then + if obj _OPT_DEFAULT_MODES is_empty; then _modes="${_DEFAULT_MODES}"; else _modes="${_OPT_DEFAULT_MODES}"; fi; ;; + text) + _DISPLAY_MODE='text'; + eval "${return_ok}"; + ;; tty) _DISPLAY_MODE='tty'; eval "${return_ok}"; ;; *) # display mode was given - if is_empty "${DISPLAY}"; then + if obj DISPLAY is_empty; then error "you must be in X Window for ${_OPT_MODE} mode."; fi; _modes="${_OPT_MODE}"; @@ -3909,18 +3922,22 @@ m="$1"; shift; case "$m" in + text) + _DISPLAY_MODE='text'; + eval "${return_ok}"; + ;; tty) _DISPLAY_MODE='tty'; eval "${return_ok}"; ;; x) - if is_not_empty "${_OPT_VIEWER_X}"; then + if obj _OPT_VIEWER_X is_not_empty; then _viewers="${_OPT_VIEWER_X}"; else _viewers="${_VIEWER_X}"; fi; _viewer="$(_get_first_prog "${_viewers}")"; - if test "$?" -ne 0; then + if is_not_equal "$?" 0; then continue; fi; _DISPLAY_PROG="${_viewer}"; @@ -3928,13 +3945,13 @@ eval "${return_ok}"; ;; dvi) - if is_not_empty "${_OPT_VIEWER_DVI}"; then + if obj _OPT_VIEWER_DVI is_not_empty; then _viewers="${_OPT_VIEWER_DVI}"; else _viewers="${_VIEWER_DVI}"; fi; _viewer="$(_get_first_prog "${_viewers}")"; - if test "$?" -ne 0; then + if is_not_equal "$?" 0; then continue; fi; _DISPLAY_PROG="${_viewer}"; @@ -3942,13 +3959,13 @@ eval "${return_ok}"; ;; pdf) - if is_not_empty "${_OPT_VIEWER_PDF}"; then + if obj _OPT_VIEWER_PDF is_not_empty; then _viewers="${_OPT_VIEWER_PDF}"; else _viewers="${_VIEWER_PDF}"; fi; _viewer="$(_get_first_prog "${_viewers}")"; - if test "$?" -ne 0; then + if is_not_equal "$?" 0; then continue; fi; _DISPLAY_PROG="${_viewer}"; @@ -3956,31 +3973,31 @@ eval "${return_ok}"; ;; ps) - if is_not_empty "${_OPT_VIEWER_PS}"; then + if obj _OPT_VIEWER_PS is_not_empty; then _viewers="${_OPT_VIEWER_PS}"; else _viewers="${_VIEWER_PS}"; fi; _viewer="$(_get_first_prog "${_viewers}")"; - if test "$?" -ne 0; then + if is_not_equal "$?" 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}"; + html) + if obj _OPT_VIEWER_HTML is_not_empty; then + _viewers="${_OPT_VIEWER_HTML}"; else - _viewers="${_VIEWER_WWW}"; + _viewers="${_VIEWER_HTML}"; fi; _viewer="$(_get_first_prog "${_viewers}")"; - if test "$?" -ne 0; then + if is_not_equal "$?" 0; then continue; fi; _DISPLAY_PROG="${_viewer}"; - _DISPLAY_MODE="www"; + _DISPLAY_MODE=html; eval "${return_ok}"; ;; esac; @@ -3991,7 +4008,7 @@ _get_first_prog() { local i; - if test "$#" -eq 0; then + if is_equal "$#" 0; then error "_get_first_prog() needs 1 argument."; fi; if is_empty "$1"; then @@ -3999,7 +4016,7 @@ fi; eval set -- "$(list_from_split "$1" ',')"; for i in "$@"; do - if is_empty "$i"; then + if obj i is_empty; then continue; fi; if is_prog "$(get_first_essential $i)"; then @@ -4045,7 +4062,7 @@ continue; ;; ?) - if list_has_not "${_MAN_AUTO_SEC}" "${_filespec}"; then + if list_has_not _MAN_AUTO_SEC "${_filespec}"; then if do_filearg "${_filespec}"; then _exitcode="${_GOOD}"; fi; @@ -4097,7 +4114,9 @@ ######################################################################## # main_set_resources () # -# Determine options for setting X resources with $_DISPLAY_PROG. +# Determine options for setting X resources with $_DISPLAY_PROG. +# +# Globals: $_DISPLAY_PROG, $_OUTPUT_FILE_NAME # landmark '18: main_set_resources()'; main_set_resources() @@ -4105,70 +4124,107 @@ func_check main_set_resources = 0 "$@"; local _prog; # viewer program local _rl; # resource list - _rl=''; - if is_empty "${_DISPLAY_PROG}"; then + local n; + _title="$(get_first_essential \ + "${_OPT_TITLE}" "${_REGISTERED_TITLE}")"; + _OUTPUT_FILE_NAME=''; + set -- ${_title}; + until is_equal "$#" 0; do + n="$1"; + case "$n" in + '') + continue; + ;; + ,*) + n="$(echo -n "$1" | sed -e '/^,,*/s///')"; + ;; + esac + if obj n is_empty; then + continue; + fi; + if obj _OUTPUT_FILE_NAME is_not_empty; then + _OUTPUT_FILE_NAME="${_OUTPUT_FILE_NAME},"; + fi; + _OUTPUT_FILE_NAME="${_OUTPUT_FILE_NAME}$n"; + shift; + done; + case "${_OUTPUT_FILE_NAME}" in + '') + _OUTPUT_FILE_NAME='-'; + ;; + ,*) + error "$_OUTPUT_FILE_NAME starts with a comma."; + ;; + esac; + _OUTPUT_FILE_NAME="${_TMP_DIR}/${_OUTPUT_FILE_NAME}"; + + if obj _DISPLAY_PROG is_empty; then # for example, for groff mode + _DISPLAY_ARGS=''; eval "${return_ok}"; fi; + set -- ${_DISPLAY_PROG}; _prog="$(base_name "$1")"; - if is_not_empty "${_OPT_BD}"; then + _rl=''; + if obj _OPT_BD is_not_empty; then case "${_prog}" in ghostview|gv|gxditview|xditview|xdvi) - _rl="$(list_append "$_rl" '-bd' "${_OPT_BD}")"; + list_append _rl '-bd' "${_OPT_BD}"; ;; esac; fi; - if is_not_empty "${_OPT_BG}"; then + if obj _OPT_BG is_not_empty; then case "${_prog}" in ghostview|gv|gxditview|xditview|xdvi) - _rl="$(list_append "$_rl" '-bg' "${_OPT_BG}")"; + list_append _rl '-bg' "${_OPT_BG}"; ;; xpdf) - _rl="$(list_append "$_rl" '-papercolor' "${_OPT_BG}")"; + list_append _rl '-papercolor' "${_OPT_BG}"; ;; esac; fi; - if is_not_empty "${_OPT_BW}"; then + if obj _OPT_BW is_not_empty; then case "${_prog}" in ghostview|gv|gxditview|xditview|xdvi) - _rl="$(list_append "$_rl" '-bw' "${_OPT_BW}")"; + _list_append _rl '-bw' "${_OPT_BW}"; ;; esac; fi; - if is_not_empty "${_OPT_FG}"; then + if obj _OPT_FG is_not_empty; then case "${_prog}" in ghostview|gv|gxditview|xditview|xdvi) - _rl="$(list_append "$_rl" '-fg' "${_OPT_FG}")"; + 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}")"; + 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}")"; + list_append _rl '-geometry' "${_OPT_GEOMETRY}"; ;; esac; fi; if is_empty "${_OPT_RESOLUTION}"; then + _OPT_RESOLUTION="${_DEFAULT_RESOLUTION}"; case "${_prog}" in gxditview|xditview) - _rl="$(list_append "$_rl" \ - '-resolution' "${_DEFAULT_RESOLUTION}")"; + list_append _rl '-resolution' "${_DEFAULT_RESOLUTION}"; ;; xpdf) case "${_DEFAULT_RESOLUTION}" in 75) - _rl="$(list_append "$_rl" '-z' '2')"; + # 72dpi is '100' + list_append _rl '-z' '104'; ;; 100) - _rl="$(list_append "$_rl" '-z' '3')"; + list_append _rl '-z' '139'; ;; esac; ;; @@ -4176,24 +4232,32 @@ else case "${_prog}" in ghostview|gv|gxditview|xditview|xdvi) - _rl="$(list_append "$_rl" '-resolution' "${_OPT_RESOLUTION}")"; + list_append _rl '-resolution' "${_OPT_RESOLUTION}"; ;; xpdf) case "${_OPT_RESOLUTION}" in 75) - _rl="$(list_append "$_rl" '-z' '2')"; + list_append _rl '-z' '104'; + # '100' corresponds to 72dpi ;; 100) - _rl="$(list_append "$_rl" '-z' '3')"; + list_append _rl '-z' '139'; ;; esac; ;; esac; fi; - if is_not_empty "${_OPT_RV}"; then + if is_yes "${_OPT_ICONIC}"; then + case "${_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + list_append _rl '-iconic'; + ;; + esac; + fi; + if is_yes "${_OPT_RV}"; then case "${_prog}" in ghostview|gv|gxditview|xditview|xdvi) - _rl="$(list_append "$_rl" '-rv')"; + list_append _rl '-rv'; ;; esac; fi; @@ -4202,21 +4266,20 @@ ghostview|gv|gxditview|xditview|xdvi|xpdf) eval set -- "{$_OPT_XRM}"; for i in "$@"; do - _rl="$(list_append "$_rl" '-xrm' "$i")"; + 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}")"; + list_append _rl '-title' "${_title}"; ;; esac; fi; _DISPLAY_ARGS="${_rl}"; + eval "${return_ok}"; } # main_set_resources @@ -4248,17 +4311,16 @@ 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}"; + if obj _TMP_CAT is_non_empty_file; then + _modefile="${_OUTPUT_FILE_NAME}"; + else + clean_up; + eval "${return_ok}"; fi; - case "${_DISPLAY_MODE}" in groff) _ADDOPTS_GROFF="${_ADDOPTS_GROFF} ${_ADDOPTS_POST}"; - if is_not_empty "${_OPT_DEVICE}"; then + if obj _OPT_DEVICE is_not_empty; then _ADDOPTS_GROFF="${_ADDOPTS_GROFF} -T${_OPT_DEVICE}"; fi; _groggy="$(tmp_cat | eval grog "${_options}")"; @@ -4266,26 +4328,26 @@ # 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}"; + test -f "${_modefile}" && rm -f "${_modefile}"; mv "${_TMP_CAT}" "${_modefile}"; - rm -f "${_TMP_CAT}"; cat "${_modefile}" | \ ( clean_up() { - rm -f "${_modefile}"; + if test -d "${_TMP_DIR}"; then + rm -f "${_TMP_DIR}"/* || true; + rmdir "${_TMP_DIR}"; + fi; } trap clean_up 0 2>/dev/null || true; eval "${_groggy}" "${_ADDOPTS_GROFF}"; ) &' ;; - tty) + text|tty) case "${_OPT_DEVICE}" in '') _device="$(get_first_essential \ - "${_OPT_TTY_DEVICE}" "${_DEFAULT_TTY_DEVICE}")"; + "${_OPT_TEXT_DEVICE}" "${_DEFAULT_TTY_DEVICE}")"; ;; ascii|cp1047|latin1|utf8) _device="${_OPT_DEVICE}"; @@ -4297,19 +4359,23 @@ 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 + if obj _DISPLAY_MODE is_equal 'text'; then + tmp_cat | eval "${_groggy}" "${_addopts}"; + else + _pager=''; + for p in "${_OPT_PAGER}" "${PAGER}" "${_MANOPT_PAGER}" \ + 'less -r -R' 'more' 'pager' 'cat'; do + if is_prog $p; then # no "" for is_prog() allows args for $p _pager="$p"; break; fi; - done; - if is_empty "${_pager}"; then - error 'no pager program found for tty mode'; + done; + if obj _pager is_empty; then + error 'no pager program found for tty mode'; + fi; + tmp_cat | eval "${_groggy}" "${_addopts}" | \ + eval "${_pager}"; fi; - tmp_cat | eval "${_groggy}" "${_addopts}" | \ - eval "${_pager}"; clean_up; ;; @@ -4326,6 +4392,18 @@ _groggy="$(tmp_cat | grog -Tdvi)"; _do_display; ;; + html) + case "${_OPT_DEVICE}" in + ''|html) do_nothing; ;; + *) + warning \ + "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; + ;; + esac; + _modefile="${_modefile}".html + _groggy="$(tmp_cat | grog -Thtml)"; + _do_display; + ;; pdf) case "${_OPT_DEVICE}" in ''|ps) @@ -4336,26 +4414,29 @@ "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; ;; esac; + _modefile="${_modefile}" _groggy="$(tmp_cat | grog -Tps)"; trap_clean; # start a new shell program to get another process ID. sh -c ' set -e; - _PROCESS_ID="$$"; - _psfile="${_TMP_DIR}/${_PROGRAM_NAME}${_PROCESS_ID}"; - _modefile="${_TMP_DIR}/${_PROGRAM_NAME}${_PROCESS_ID}.pdf"; - rm -f "${_psfile}"; - rm -f "${_modefile}"; + _psfile="${_modefile}.ps"; + _modefile="${_modefile}.pdf"; + test -f "${_psfile}" && rm -f "${_psfile}"; + test -f "${_modefile}" && rm -f "${_modefile}"; cat "${_TMP_CAT}" | \ - eval "${_groggy}" "${_ADDOPTS_GROFF}" > "${_psfile}"; + 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}"; + test -f "${_psfile}" && rm -f "${_psfile}"; + test -f "${_TMP_CAT}" && rm -f "${_TMP_CAT}"; ( - clean_up() - { + clean_up() { rm -f "${_modefile}"; + if test -d "${_TMP_DIR}"; then + rm -f "${_TMP_DIR}"/* || true; + rmdir "${_TMP_DIR}"; + fi; } trap clean_up 0 2>/dev/null || true; eval "${_DISPLAY_PROG}" ${_DISPLAY_ARGS} "${_modefile}"; @@ -4378,17 +4459,6 @@ 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 '') @@ -4414,22 +4484,20 @@ _do_display() { + func_check _do_display = 0 "$@"; trap_clean; # start a new shell program for another process ID and better # cleaning-up of the temporary files. sh -c ' set -e; - _PROCESS_ID="$$"; - _modefile="${_TMP_DIR}/${_PROGRAM_NAME}${_PROCESS_ID}"; - rm -f "${_modefile}"; + test -f "${_modefile}" && rm -f "${_modefile}"; cat "${_TMP_CAT}" | \ eval "${_groggy}" "${_ADDOPTS_GROFF}" > "${_modefile}"; rm -f "${_TMP_CAT}"; ( - clean_up() - { + clean_up() { if test -d "${_TMP_DIR}"; then - rm -f "${_TMP_DIR}"/*; + rm -f "${_TMP_DIR}"/* || true; rmdir "${_TMP_DIR}"; fi; } diff -ruN groff-1.19/contrib/mm/ChangeLog groff-1.19.1/contrib/mm/ChangeLog --- groff-1.19/contrib/mm/ChangeLog Wed Apr 2 07:45:12 2003 +++ groff-1.19.1/contrib/mm/ChangeLog Wed Mar 10 07:10:12 2004 @@ -1,3 +1,26 @@ +Sun Mar 7 16:34:46 CET 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 CET 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 -ruN groff-1.19/contrib/mm/groff_mm.man groff-1.19.1/contrib/mm/groff_mm.man --- groff-1.19/contrib/mm/groff_mm.man Wed Mar 19 23:05:11 2003 +++ groff-1.19.1/contrib/mm/groff_mm.man Thu May 13 15:13:24 2004 @@ -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.12 2004/05/13 13:13:24 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 @@ .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 @@ 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 @@ 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 @@ .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 @@ 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. @@ -1803,7 +1805,7 @@ 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 @@ 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 @@ 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 @@ Unnumbered heading level, default 2. .TP .B Hy -Hyphenation in body, default 1. +Hyphenation in body, default 0. .br 0\ ->\ no hyphenation .br diff -ruN groff-1.19/contrib/mm/m.tmac groff-1.19.1/contrib/mm/m.tmac --- groff-1.19/contrib/mm/m.tmac Wed Apr 2 07:45:12 2003 +++ groff-1.19.1/contrib/mm/m.tmac Wed Mar 10 07:11:26 2004 @@ -3,11 +3,11 @@ .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.24 2004/03/10 06:11:26 wlemb Exp $ +.@revision $Revision: 2.24 $ .ig -Copyright (C) 1991-2000 Free Software Foundation, Inc. +Copyright (C) 1991-2000, 2001, 2002, 2003, 2004 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 @@ -37,7 +37,7 @@ .if \n(.C .ab The groff mm macros do not work in compatibility mode. .if (\n[.warn] == 65543) .warn .\" ######## 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 +66,27 @@ .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 +644,21 @@ .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 +943,7 @@ .\" .\" 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 +975,7 @@ .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 @@ -1076,7 +1089,7 @@ .\"-------- .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 @@ -1186,6 +1199,9 @@ .\" HEADER .de pg@header .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 '''' .\} @@ -2426,8 +2442,8 @@ .\" .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 +2899,7 @@ .\} .\" 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 -ruN groff-1.19/contrib/mom/BUGS groff-1.19.1/contrib/mom/BUGS --- groff-1.19/contrib/mom/BUGS Tue Feb 25 17:42:49 2003 +++ groff-1.19.1/contrib/mom/BUGS Mon Mar 22 07:18:36 2004 @@ -7,9 +7,103 @@ df191@ncf.ca +If writing me directly, please include the word "groff" or "mom" in +the Subject line or you risk my spam filter nuking your message. +Also, please--no html email. That, too, gets nuked. + --Peter Schaffter ======================================================================== + +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 -ruN groff-1.19/contrib/mom/ChangeLog groff-1.19.1/contrib/mom/ChangeLog --- groff-1.19/contrib/mom/ChangeLog Tue Feb 25 17:44:22 2003 +++ groff-1.19.1/contrib/mom/ChangeLog Mon Mar 22 07:18:36 2004 @@ -1,3 +1,136 @@ +*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 +190,8 @@ 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 +207,6 @@ 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 +237,6 @@ 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 +245,17 @@ 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 -ruN groff-1.19/contrib/mom/Makefile.sub groff-1.19.1/contrib/mom/Makefile.sub --- groff-1.19/contrib/mom/Makefile.sub Sat Apr 5 00:32:53 2003 +++ groff-1.19.1/contrib/mom/Makefile.sub Fri Mar 5 10:52:10 2004 @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. # Written by Werner Lemberg (wl@gnu.org) # # This file is part of groff. @@ -19,7 +19,7 @@ # 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 \ @@ -67,6 +67,7 @@ examples/typewrite.mom \ examples/README.mom \ examples/elvis_syntax \ + examples/elvis_syntax.new \ examples/penguin.ps PROCESSEDEXAMPLEFILES=\ @@ -77,21 +78,24 @@ 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) diff -ruN groff-1.19/contrib/mom/NEWS groff-1.19.1/contrib/mom/NEWS --- groff-1.19/contrib/mom/NEWS Tue Feb 25 17:42:49 2003 +++ groff-1.19.1/contrib/mom/NEWS Mon Mar 22 07:18:36 2004 @@ -1,3 +1,130 @@ +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 -ruN groff-1.19/contrib/mom/TODO groff-1.19.1/contrib/mom/TODO --- groff-1.19/contrib/mom/TODO Wed Jul 10 08:07:37 2002 +++ groff-1.19.1/contrib/mom/TODO Mon Mar 22 07:18:36 2004 @@ -1,21 +1,28 @@ +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? + +Figure out a way to bypass the \c requirement before .FOOTNOTE. + +Figure out a way to process blockquotes and quotes that contain +footnotes so that the user doesn't have to use the awful kludge +.BREAKQUOTE. + CONTROL MACROS -- _INDENT -------------- Let user be able to enter decimal fractions as the argument to _INDENT 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 -ruN groff-1.19/contrib/mom/examples/README.mom groff-1.19.1/contrib/mom/examples/README.mom --- groff-1.19/contrib/mom/examples/README.mom Thu Jun 13 12:42:00 2002 +++ groff-1.19.1/contrib/mom/examples/README.mom Sun Jan 25 08:19:56 2004 @@ -43,8 +43,8 @@ This is just the tutorial example from the momdocs, ready for previewing. -elvis_syntax ------------- +elvis_syntax.new +---------------- For those who use the vi clone, elvis, you can paste this file into your elvis.syn file. Provided your mom documents have the extension @@ -52,5 +52,8 @@ 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 sends me syntax highlighting rules for vim and emacs. :) diff -ruN groff-1.19/contrib/mom/examples/elvis_syntax groff-1.19.1/contrib/mom/examples/elvis_syntax --- groff-1.19/contrib/mom/examples/elvis_syntax Tue Feb 25 17:42:49 2003 +++ groff-1.19.1/contrib/mom/examples/elvis_syntax Mon Jul 7 22:51:54 2003 @@ -4,11 +4,11 @@ startword .\ inword _( keyword .ALD .ALIAS .ALWAYS_FULLSPACE_QUOTES .ATTRIBUTE_STRING -keyword .AUTHOR .AUTHOR_FAMILY .AUTHOR_FONT .AUTHOR_SIZE .AUTOLEAD +keyword .AUTHOR .AUTHOR_FAMILY .AUTHOR_FONT .AUTHOR_SIZE .AUTOLEAD .BLANKPAGE 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 .CHAPTER .CHAPTER_TITLE .CHAPTER_STRING .CITATION .CITE .CLOSING keyword .COLLATE .COL_BREAK .COL_BREAK .COL_NEXT .COLUMNS keyword .COMMENT .CONDENSE .COPYSTYLE keyword .DATE .DEFAULTS @@ -18,7 +18,7 @@ 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 .DOCTYPE .DOCTYPE_FAMILY .DOCTYPE_FONT .DOCTYPE_SIZE .DOC_TITLE keyword .DRAFT .DRAFT_STRING .DRAFT_WITH_PAGENUMBER keyword .DROPCAP .DROPCAP_ADJUST .DROPCAP_FAMILY .DROPCAP_FONT .DROPCAP_GUTTER .DROPCAP_OFF keyword .EL @@ -31,6 +31,9 @@ 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 .ENDNOTE_STRING_CAPS .ENDNOTES_NO_COLUMNS .ENDNOTES_NO_FIRST_PAGENUM +keyword .ENDNOTES_ALLOWS_HEADERS .ENDNOTES_PAGENUM_STYLE .ENDNOTES_FIRST_PAGENUMBER +keyword .ENDNOTE_SINGLESPACE keyword .EPIGRAPH .EPIGRAPH_AUTOLEAD .EPIGRAPH_FAMILY .EPIGRAPH_FONT keyword .EPIGRAPH_INDENT .EPIGRAPH_QUAD .EPIGRAPH_SIZE keyword .EW .EXTEND @@ -52,7 +55,7 @@ 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_CENTER_FONT .HDRFTR_CENTER_SIZE .HDRFTR_FAMILY .HDRFTR_GAP .HDRFTR_CENTER_PAD 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 @@ -82,7 +85,7 @@ 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 .PAGENUM_ON_FIRST_PAGE .PAGENUM_POS .PAGENUM_SIZE .PAGENUM_STYLE .PAGENUMBER keyword .PAGINATE .PAGINATION .PAPER keyword .PARAHEAD .PARAHEAD_FAMILY .PARAHEAD_FONT .PARAHEAD_INDENT .PARAHEAD_SIZE keyword .PARA_INDENT .PARA_SPACE @@ -94,13 +97,23 @@ 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 .SETBOLDER .SETSLANT .SHIM .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 .SUSPEND_PAGINATION .RESTORE_PAGINATION keyword .TAB_SET .TAB .TABSET .TB .TI keyword .TITLE .TITLE_FAMILY .TITLE_FONT .TITLE_SIZE .T_MARGIN -keyword .TN .TO .TQ .TRAP .TYPESIZE +keyword .TN .TO .TOC +keyword .TOC_FAMILY .TOC_PT_SIZE .TOC_LEAD .TOC_PAGENUM_STYLE +keyword .TOC_HEADER_FAMILY .TOC_HEADER_FONT .TOC_HEADER_SIZE .TOC_HEADER_QUAD .TOC_HEADER_STRING +keyword .TOC_TITLE_FAMILY .TOC_TITLE_FONT .TOC_TITLE_SIZE .TOC_TITLE_INDENT +keyword .TOC_HEAD_FAMILY .TOC_HEAD_FONT .TOC_HEAD_SIZE .TOC_HEAD_INDENT +keyword .TOC_SUBHEAD_FAMILY .TOC_SUBHEAD_FONT .TOC_SUBHEAD_SIZE .TOC_SUBHEAD_INDENT +keyword .TOC_PARAHEAD_FAMILY .TOC_PARAHEAD_FONT .TOC_PARAHEAD_SIZE .TOC_PARAHEAD_INDENT +keyword .TOC_PN_FAMILY .TOC_PN_FONT .TOC_PN_SIZE +keyword .TOC_APPENDS_AUTHOR .TOC_RV_SWITCH .TOC_PADDING .PAGINATE_TOC +keyword .TQ .TRAP .TYPESIZE keyword .UNDERLINE .UNDERLINE_ITALIC .UNDERLINE_QUOTES .UNDERLINE_SLANT keyword .UNDERSCORE .UNDERSCORE_2 .UNDERSCORE2 keyword .WS @@ -109,7 +122,7 @@ 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 OFF QUIT END EXIT DONE NO ALL font fixed PAGE NUMBER STAR font fixed COND EXT font fixed LETTER LEGAL EXECUTIVE LEDGER TABLOID QUARTO FOLIO diff -ruN groff-1.19/contrib/mom/examples/elvis_syntax.new groff-1.19.1/contrib/mom/examples/elvis_syntax.new --- groff-1.19/contrib/mom/examples/elvis_syntax.new Thu Jan 1 01:00:00 1970 +++ groff-1.19.1/contrib/mom/examples/elvis_syntax.new Mon Mar 22 07:18:36 2004 @@ -0,0 +1,72 @@ +" 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. +# elvis.syn -- stores descriptions of languages for use with ":display syntax" + +#Mom +language mom +extension .mom + +startword . +color startword normal + +inword _.' +color inword normal + +other initialpunct +mostly normal + +color args like fixed +color chars like emphasized +color decimals normal +color ellipsis normal +color escapes like keyword +color misc green +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 COND EXT +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 +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 \(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 ... +font ellipsis ... +prefix .0 .1 .2 .3 .4 .5 .6 .7 .8 .9 +font decimals . .0 .1 .2 .3 .4 .5 .6 .7 .8 .9 +character \] +string ' +comment \# +comment \" diff -ruN groff-1.19/contrib/mom/examples/macros.mom groff-1.19.1/contrib/mom/examples/macros.mom --- groff-1.19/contrib/mom/examples/macros.mom Wed Sep 4 23:52:46 2002 +++ groff-1.19.1/contrib/mom/examples/macros.mom Sun Jan 25 08:19:56 2004 @@ -274,7 +274,7 @@ \# \# .NEWPAGE \" Start a new page -.T_MARGIN 1i \" Set top margin to 1i (approx. equivalent to .ALD |1i-1v above +.T_MARGIN 1i \" Set top margin to 1i (approx. equivalent to .ALD |1i-1v above) \# \# .FAM T @@ -285,7 +285,7 @@ Example 3: .ALD .25v .UNDERSCORE 3.75p "A \*[BU 2]recipe for enumerated lists using indents" -.SP \" Add an extra line space +.SP .5v \" Add an extra half line space .FAM N \" New Century Schoolbook family .FT R .PT_SIZE 11 @@ -296,6 +296,10 @@ 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 @@ -374,7 +378,7 @@ Example 4: .ALD .25v .UNDERSCORE 3.75p "A \*[BU 2]recipe for nested lists using string tabs" -.SP +.SP .5v .FAM N .FT R .PT_SIZE 11 diff -ruN groff-1.19/contrib/mom/examples/typeset.mom groff-1.19.1/contrib/mom/examples/typeset.mom --- groff-1.19/contrib/mom/examples/typeset.mom Tue Feb 25 17:42:58 2003 +++ groff-1.19.1/contrib/mom/examples/typeset.mom Wed Oct 22 06:29:12 2003 @@ -406,14 +406,15 @@ 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 sadipsc\% -ing elitr sed diam nonumy eirmod tempor invidunt ut -.BREAK_QUOTE \" Needed because blockquote crosses page AND contain footnotes -labore. Et do\%lo\%re magna ali\%quyam erat, sed diam voluptua, at -vero. Eos et accusam et justo duo.\c +rebum amet. Consetetur sadipsc\%ing elitr sed diam nonumy eirmod +sed diam nonumy, eirmod tempor. Invidunt tempor invidunt ut labore.\c .FOOTNOTE -Labore et do\%lo\%re magna ali\%quyam erat sed diam voluptua. +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. .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 @@ -465,12 +466,12 @@ 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 consete- -.BREAK_QUOTE \" Needed because blockquote crosses column AND contain footnotes -tur 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. +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 +.BREAK_QUOTE \"Needed because blockquote crosses a column AND contains a footnote +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. @@ -528,6 +529,12 @@ 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 diff -ruN groff-1.19/contrib/mom/examples/typewrite.mom groff-1.19.1/contrib/mom/examples/typewrite.mom --- groff-1.19/contrib/mom/examples/typewrite.mom Thu May 23 23:59:21 2002 +++ groff-1.19.1/contrib/mom/examples/typewrite.mom Mon May 19 07:00:37 2003 @@ -27,6 +27,7 @@ \# Additional style macros \# .NUMBER_PARAHEADS +.HEADER_CENTER_PAD RIGHT 15p \" To get "Outline" in the page header visually centered \# .START .PP @@ -151,7 +152,8 @@ \# Additional style macros \# .EPIGRAPH_FONT I \" TYPEWRITE underlines italics -.HEADER_SIZE -1 +.HEADER_SIZE -1 \" Make page header type size smaller +.HEADER_CENTER_PAD RIGHT 6p \# .START .EPIGRAPH BLOCK diff -ruN groff-1.19/contrib/mom/groff_mom.man groff-1.19.1/contrib/mom/groff_mom.man --- groff-1.19/contrib/mom/groff_mom.man Wed Sep 4 23:44:16 2002 +++ groff-1.19.1/contrib/mom/groff_mom.man Fri Jul 18 09:28:43 2003 @@ -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 Free Software Foundation, Inc. written by Werner Lemberg Permission is granted to copy, distribute and/or modify this document @@ -14,6 +14,9 @@ FDL in the main directory of the groff source package. .. . +.do nr groff_mom_C \n[.C] +.cp 0 +. .mso www.tmac . .de TQ @@ -89,6 +92,8 @@ Please send bug reports to the .MTO bug-groff@gnu.org "groff bug mailing list" or directly to the author. +. +.cp \n[groff_mom_C] . .\" Local Variables: .\" mode: nroff diff -ruN groff-1.19/contrib/mom/momdoc/appendices.html groff-1.19.1/contrib/mom/momdoc/appendices.html --- groff-1.19/contrib/mom/momdoc/appendices.html Wed Sep 4 23:48:01 2002 +++ groff-1.19.1/contrib/mom/momdoc/appendices.html Sun Feb 22 10:17:08 2004 @@ -7,8 +7,10 @@ +Next   Prev   Back to Table of Contents +

@@ -18,8 +20,8 @@

@@ -58,7 +60,7 @@ 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. @@ -73,7 +75,7 @@ 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 +in action might have made some parts of the documentation 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. @@ -99,7 +101,7 @@ 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. @@ -132,6 +134,13 @@ 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 +154,11 @@ 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,13 +176,14 @@ (subscription information available
here) or contact me, Peter Schaffter, directly at +df191@ncf.ca.

-

- df191@ncf.ca -
- +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. :)


+Next   Prev   Top   Back to Table of Contents diff -ruN groff-1.19/contrib/mom/momdoc/color.html groff-1.19.1/contrib/mom/momdoc/color.html --- groff-1.19/contrib/mom/momdoc/color.html Thu Jan 1 01:00:00 1970 +++ groff-1.19.1/contrib/mom/momdoc/color.html Mon Mar 22 07:16:36 2004 @@ -0,0 +1,337 @@ + + + +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 +to 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 -ruN groff-1.19/contrib/mom/momdoc/cover.html groff-1.19.1/contrib/mom/momdoc/cover.html --- groff-1.19/contrib/mom/momdoc/cover.html Wed Jun 12 21:19:32 2002 +++ groff-1.19.1/contrib/mom/momdoc/cover.html Sun Feb 22 10:17:08 2004 @@ -10,10 +10,11 @@ Next   Prev   Back to Table of Contents +

-

CREATING A COVER PAGE

+

CREATING A COVER PAGE

diff -ruN groff-1.19/contrib/mom/momdoc/definitions.html groff-1.19.1/contrib/mom/momdoc/definitions.html --- groff-1.19/contrib/mom/momdoc/definitions.html Wed Sep 4 23:48:01 2002 +++ groff-1.19.1/contrib/mom/momdoc/definitions.html Sun Feb 22 10:17:08 2004 @@ -10,7 +10,7 @@ Next   Prev   Back to Table of Contents - +

DEFINITIONS OF TERMS USED IN THIS MANUAL

@@ -28,7 +28,7 @@ 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. -
+


@@ -121,15 +121,15 @@ 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. -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). +
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).
Family
The collective name by which a collection of @@ -187,7 +187,7 @@ 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 @@ -256,9 +256,9 @@
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 @@ -282,7 +282,8 @@
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 +one should, whenever possibly, avoid splitting onto two lines. In +groff, unbreakable space is entered with

 	\~
@@ -300,6 +301,7 @@
 point size.  Generally used to mean the average height of the bowl
 of lower case letters.
 
+


@@ -378,7 +380,7 @@ *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 +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). @@ -481,13 +483,13 @@
Unit of measure
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:

@@ -539,11 +541,12 @@ 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 +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. +


@@ -609,7 +612,7 @@
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). +short story). Also commonly called a scene break.
Paragraph head
A title joined to the body of a paragraph; hierarchically one diff -ruN groff-1.19/contrib/mom/momdoc/docelement.html groff-1.19.1/contrib/mom/momdoc/docelement.html --- groff-1.19/contrib/mom/momdoc/docelement.html Tue Feb 25 17:42:58 2003 +++ groff-1.19.1/contrib/mom/momdoc/docelement.html Mon Mar 22 07:18:36 2004 @@ -10,10 +10,10 @@ Next   Prev   Back to Table of Contents - +

-

THE DOCUMENT ELEMENT TAGS

+

THE DOCUMENT ELEMENT TAGS

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." -
+

@@ -298,6 +335,7 @@ QUOTE or BLOCKQUOTE. +

Epigraph control macros

@@ -308,6 +346,7 @@ .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 +376,7 @@ 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 +400,7 @@ -- 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 +424,7 @@ .blm PP tells groff that all blank lines are really the macro PP. -
+

@@ -416,14 +455,16 @@

  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 +483,10 @@

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 +503,60 @@ with the appropriate control macros.

Mom's default paragraph font is medium roman. +

+ +

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. -

3.Leading

+

4. Leading

+

The paragraph leading is set with @@ -483,19 +578,25 @@ 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 +625,17 @@ 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 +657,7 @@ 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 +668,10 @@ 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 +690,10 @@ 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 +703,7 @@ it any argument (OFF, QUIT, Q, X...) cancels its effect, meaning that paragraphs will once again NOT be separated by a blank line. +


@@ -613,14 +724,14 @@ 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. -
+

@@ -639,6 +750,33 @@ 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 +786,7 @@ mom's defaults.

    -
  1. Family/font/size/quad +
  2. Family/font/size/colour/quad
  3. Caps
  4. Pre-head space
  5. Underlining @@ -666,10 +804,12 @@ .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 +825,10 @@ 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 +840,10 @@ 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 +855,10 @@ 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 +875,10 @@ 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 +891,10 @@ 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,9 +905,9 @@ 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, @@ -779,11 +929,6 @@ or .HEAD "\[DOWN 3p]First line" "\[DOWN 3p]Next line" - - - - -


    @@ -811,7 +956,7 @@

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

    @@ -836,7 +981,7 @@ 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 +996,12 @@ .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 +1016,10 @@ 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 +1037,7 @@ See Vertical inline escapes inside heads. The information there applies equally to subheads. - - -
      +


      @@ -917,7 +1064,7 @@

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

      @@ -937,20 +1084,21 @@ 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/colour/size
      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 +1107,18 @@ .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 +1146,10 @@ 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 +1165,10 @@ 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 +1181,7 @@ Your next parahead will be numbered "7" and subsequent paraheads will be numbered in ascending order from "7". -
      +


      @@ -1033,10 +1194,10 @@

      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. -
      +

      @@ -1074,12 +1235,13 @@ [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 +1263,16 @@ 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 +1303,13 @@ (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,7 +1334,49 @@ BLOCKQUOTE, as does the control macro QUOTE_INDENT. -
      +

      +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
      +
      +
      @@ -1186,7 +1404,7 @@

      Quote control macros

        -
      1. Family/font/size/indent +
      2. Family/font/size/colour/indent
      3. Spacing above and below (typeset only)
      4. Underline quotes (typewrite only)
      5. Manually break a footnoted quote that crosses pages/columns @@ -1200,13 +1418,15 @@
         .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_SIZE   default = +0 (i.e. same size as paragraph text)
        +.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 +1438,10 @@ 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 +1459,10 @@ you must also make sure that ITALIC_MEANS_ITALIC is enabled (see PRINTSTYLE TYPEWRITE control macros). +

        4. Manually break a footnoted quote -- BREAK_QUOTE

        +

        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 +1476,7 @@ BREAK_QUOTE may be used with both quotes and blockquotes, and hence is aliased as BREAK_BLOCKQUOTE, BREAK_CITATION and BREAK_CITE. -
        +


        @@ -1290,8 +1514,11 @@ 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. -
        +but know that there will be Bottom Margin Consequences unless you +use the +SHIM +macro after you turn the blockquote off. +

        @@ -1332,7 +1559,7 @@

        Blockquote control macros

          -
        1. Family/font/size/indent +
        2. Family/font/size/colour/indent
        3. Spacing above and below (typeset only)
        4. Manually break a footnoted blockquote that crosses pages/columns
        @@ -1346,11 +1573,13 @@ .BLOCKQUOTE_FAMILY default = prevailing document family; default is Times Roman .BLOCKQUOTE_FONT default = italic .BLOCKQUOTE_SIZE default = -1 (point) +.BLOCKQUOTE_COLOR default = black .QUOTE_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 +1591,363 @@ 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, X, +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 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 | USER ] [ <separator> | <user-defined enumerator> ] [ <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. +

        +The optional arguments BULLET, +DASH, DIGIT (for Arabic +numerals), ALPHA (for lowercase letters) and +USER allow you to say what kind of enumerator you +want for a given list. +

        +If you choose DIGIT or ALPHA, 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 is a right +parenthesis, like this: +

        +

        +	a) A list item
        +
        + +If you want digits with a right-parenthesis separator, you'd do +

        +

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

        +

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

        +USER lets you make up your own enumerator. For +example, if you want a list enumerated with =>, +

        +

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

        +

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

        +Any single argument other than BULLET, +DASH, DIGIT, +ALPHA or USER takes you out of the +current list. If you are at the first list-level (or -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 and restores the enumerator, separator and +indent appropriate to that level. +

        +Each invocation of LIST must 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.
        +
        + +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. +

        + +


        +

        + + 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 either DIGIT or ALPHA, +you may sometimes want to reset the list's enumerator back to +"1" or "a" when you return, within the nest, 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 alpha- or +digit-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. +

        +RESET_LIST does exactly what it says -- resets the +list -- and doesn't take any arguments. +

        +

        3. Padding digit enumerators (PAD_LIST_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, just invoke the macro, PAD_LIST_DIGITS by +itself. 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. +


        @@ -1394,7 +1979,7 @@ 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 +themselves appropriately, balancing them properly with the bottom margin, deferring footnotes that don't fit on the page... Even if you're using COLUMNS, @@ -1402,6 +1987,7 @@

        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

        @@ -1428,7 +2014,7 @@

        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 @@ -1453,7 +2039,7 @@ quotes and blockquotes that cross a page or column. See BREAK_QUOTE for a solution. -
        +

        @@ -1462,7 +2048,7 @@ Macro: FOOTNOTE <toggle> | INDENT LEFT | RIGHT | BOTH <indent value>
        - *See
        HYPER-IMPORTANT NOTE!!! + *See HYPER-IMPORTANT NOTE!!!
        <indent value> requires a unit of measure
        @@ -1511,7 +2097,7 @@

        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. Reset footnote number -- set footnote marker number to 1 @@ -1529,11 +2115,13 @@ .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 +2129,10 @@ 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. +

          3. Footnote marker style -- FOOTNOTE_MARKER_STYLE

          +

          Mom gives you two choices of footnote marker style: star+dagger (see footnote behaviour @@ -1558,23 +2148,29 @@ (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). +

          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

          +

          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

          +

          If you want to change the length of the footnote separator rule, invoke .FOOTNOTE_RULE_LENGTH with a length, like this, @@ -1589,7 +2185,10 @@ picas for both printstyles. +

          +

          7. 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,38 +2208,141 @@ the rule, not lower it. A unit of measure is required. -
          +


          -

          Endnotes

          +

          Terminate document processing

          -Embedding endnotes into mom documents is accomplished -the same way as embedding -footnotes. The example below is -identical to the one shown in the -introduction to footnotes, -except that .FOOTNOTE has been replaced with -.ENDNOTE. +The use of FINIS is optional. If you invoke it +(at the end of a document before +TOC +or +ENDNOTES), +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, centred after a blank line, beneath the last +line of the document. END is enclosed between +em-dashes.

          - -

          -	...the doctrines of Identity as urged by Schelling\c
          -	.ENDNOTE
          -	<endnote about who the hell is Schelling>
          -	.ENDNOTE OFF
          +If you're writing in a language other than English, you can
          +change what mom prints for END with
          +the control macro FINIS_STRING.
          +

          + + + +


          +

          + + Macro: FINIS + + +

          +The use of FINIS is optional, but if you use +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. +

          +NOTE: If you don't use FINIS, +and you don't want +footers +(if they're on) or a page number at the bottom of the last page of +a document, you have to turn them off manually, as the last two +lines of your document file, like this: +

          +

          +	.FOOTERS OFF
          +	.PAGINATE OFF
          +
          + +

          Changing the FINIS string

          + +

          +By default, FINIS prints the word +END between +em-dashes. +If you'd like mom to print something else +between the dashes, use the FINIS_STRING macro +(anywhere in the document prior to FINIS). +

          +For example, if your document's in French, you'd do +

          +

          +	.FINIS_STRING "FIN"
          +
          + +Double-quotes must enclose the macro's argument. +

          +NOTE: If you pass FINIS_STRING +a blank string, i.e. +

          +

          +	.FINIS_STRING ""
          +
          + +mom will still print the em-dashes if you +invoke FINIS. This, in effect, produces a +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). + +

          +


          + + + +

          Endnotes

          + + +

          +Embedding endnotes into mom documents is accomplished +the same way as embedding +footnotes. The example below is +identical to the one shown in the +introduction to footnotes, +except that .FOOTNOTE has been replaced with +.ENDNOTE. +

          + +

          +	...the doctrines of Identity as urged by Schelling\c
          +	.ENDNOTE
          +	<endnote about who the hell is Schelling>
          +	.ENDNOTE OFF
           	were generally the points of discussion presenting the most
           	of beauty to the imaginative Morella.
           
          @@ -1682,6 +2384,7 @@ 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

          @@ -1697,7 +2400,7 @@ 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,11 +2419,11 @@ 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 @@ -1736,16 +2439,18 @@ 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 +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. If your document is set in -columns, your endnotes will be, too. -
          +and then turn off column mode for endnotes. As of version 1.1.6, +you may now do so. See +ENDNOTES_NO_COLUMNS. +


          @@ -1754,7 +2459,7 @@ Macro: ENDNOTE <toggle>
          - *See
          HYPER-IMPORTANT NOTE!!! + *See HYPER-IMPORTANT NOTE!!!

          @@ -1780,7 +2485,7 @@ and the number). See the endnote example above. -
          +

          @@ -1810,7 +2515,7 @@ the document. Each subsequent invocation of ENDNOTES outputs only those endnotes that mom collected after the previous invocation. -
          +


          Endnote control macros

          @@ -1829,15 +2534,30 @@
        6. Base family/font/quad for endnotes-pages
        7. Base point size for the endnotes-pages
        8. Leading of endnotes-pages +
        9. Singlespace endnotes (for TYPEWRITE only)
        10. Size of paragraph first line indent in multi-paragraph endnotes
        11. Inserting space between paragraphs of multi-paragraph endnotes +
        12. Turning off column mode during endnotes output +
        13. Pagination of endnotes: + +
        14. Suspending pagination of endnotes pages
        15. Endnotes-page header/footer control -
        16. Endnotes-page head control + +
        17. Endnotes-page head (i.e. the title at the top) control
        18. Endnote document-identification title
            @@ -1859,7 +2579,7 @@

            1. General endnotes page style control

            -

            Endnote family/font/quad

            +

            *Endnote family/font/quad

            See Arguments to the control macros. @@ -1872,7 +2592,7 @@ -

            Endnote point size

            +

            *Endnote point size

            Macro: ENDNOTE_PT_SIZE <base type size of endnotes> @@ -1906,13 +2626,16 @@

            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,13 +2662,50 @@ 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>
            @@ -1969,10 +2729,11 @@ (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> @@ -1988,11 +2749,108 @@ 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,8 +2865,25 @@ the endnotes page(s) headers/footers, invoke ENDNOTES_HEADER_CENTER with no argument. +

            +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"
            +
            -

            Endnotes page(s) header/footer center string

            +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 @@ -2019,18 +2894,43 @@ 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...). +

            + +

            *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.

            -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

            +

            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>" @@ -2043,10 +2943,11 @@ 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. @@ -2055,14 +2956,14 @@ .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_QUAD default = centred *Relative to the size of the endnotes text (set with ENDNOTE_PT_SIZE)

        19. -

          Endnotes-page head underscoring

          +

          *Endnotes-page head (title) underscoring

          Macro: ENDNOTE_STRING_UNDERSCORE toggle | 2 @@ -2079,10 +2980,33 @@ 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>" @@ -2090,16 +3014,21 @@ 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 +3044,26 @@ -

          Endnote document-identification title underscoring

          +

          *Endnote document-identification title underscoring

          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 numbering style control

          See Arguments to the control macros. @@ -2152,7 +3080,7 @@ *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: @@ -2203,7 +3131,7 @@ to ensure that the numbers hang and are properly right-aligned. -
          +


          @@ -2229,93 +3157,553 @@ sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. - -

          -

          Terminate document processing

          +

          Table of contents

          -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 -line of the document. END is enclosed between -em-dashes. +Want a table of contents for your document? Easy. Just enter

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

          +	.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: FINIS +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.

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


          -NOTE: If you don't use FINIS, -and you don't want -footers -(if they're on) or a page number at the bottom of the last page of -a document, you have to turn them off manually, as the last two -lines of your document file, like this: + + + + + 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:

          -	.FOOTERS OFF
          -	.PAGINATE OFF
          +	.TOC_PAGENUM_STYLE DIGIT
           
          -

          Changing the FINIS string

          +
          +

          +

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

          -By default, FINIS prints the word -END between -em-dashes. -If you'd like mom to print something else -between the dashes, use the FINIS_STRING macro -(anywhere in the document prior to FINIS). +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

          -For example, if your document's in French, you'd 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).

          -	.FINIS_STRING "FIN"
          +	.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
           
          -Double-quotes must enclose the macro's argument. +

          4. Changing the style for toc entries

          -NOTE: If you pass FINIS_STRING -a blank string, i.e. +"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,

          -	.FINIS_STRING ""
          +	.TOC_HEAD_INDENT 2P
           
          -mom will still print the em-dashes if you -invoke FINIS. This, in effect, produces a -short, centered horizontal rule that terminates the document. -(In -PRINTSTYLE TYPEWRITE, -it's a short, dashed line composed of four hyphens.) +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_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
          +
          +
          + + + +

          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
          +
          +
          + Next   Prev   Top   diff -ruN groff-1.19/contrib/mom/momdoc/docprocessing.html groff-1.19.1/contrib/mom/momdoc/docprocessing.html --- groff-1.19/contrib/mom/momdoc/docprocessing.html Tue Feb 25 17:42:58 2003 +++ groff-1.19.1/contrib/mom/momdoc/docprocessing.html Mon Mar 22 07:18:36 2004 @@ -8,21 +8,22 @@ Next   -Prev   +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

          • DOCUMENT SETUP
            @@ -32,6 +33,7 @@
          • The Reference Macros +

            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 +230,13 @@ 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 +254,7 @@
          • 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 +267,7 @@ 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 +283,11 @@ 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 +316,80 @@ 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 +grops 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,6 +437,7 @@

            • TITLE +
            • DOCTITLE
            • SUBTITLE
            • AUTHOR
            • CHAPTER -- the chapter number @@ -467,7 +539,7 @@ .FAMILY H .PT_SIZE 12 .LS 14 - .QUAD LEFT \"ie. rag right + .QUAD LEFT \"i.e. rag right .FOOTERS .LINEBREAK_CHAR * @@ -494,7 +566,7 @@ .FAMILY H .PT_SIZE 12 .LS 14 - .QUAD LEFT \"ie. rag right + .QUAD LEFT \"i.e. rag right .FOOTERS .LINEBREAK_CHAR * \# @@ -548,7 +620,7 @@ 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. -
              +


              @@ -564,19 +636,21 @@ page headers. They must go at the top of any file that uses mom's document processing macros. - +

              Reference macros list

              +
              @@ -605,7 +679,54 @@ 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. +

              @@ -621,7 +742,7 @@ document's subtitle appears only in the docheader, and the title is most likely in caps, I recommend caps/lower case. -
              +

              @@ -653,7 +774,7 @@

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

              @@ -676,12 +797,12 @@ 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,7 +811,7 @@
               You can also use CHAPTER_STRING if you want
               "CHAPTER" instead of "Chapter" in the doc- and
               page-headers.
              -
              +

              @@ -725,7 +846,7 @@ 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. -
              +

              @@ -739,24 +860,61 @@ 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". +

              +


              @@ -769,24 +927,70 @@ 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. +


              @@ -816,6 +1020,7 @@
          • COPYSTYLE
          +
          @@ -831,7 +1036,7 @@ 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 +1049,7 @@ 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 +1059,18 @@ 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,13 +1088,30 @@ 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. -
          +

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

          PRINTSTYLE tells mom whether to typeset @@ -907,7 +1132,10 @@ document processing to take place, mom requires a PRINTSTYLE. If you don't give one, mom will warn you on stderr and print a single -page with a nasty message. +page with a nasty message. Furthermore, PRINTSTYLE +must come before any changes to mom's default +typestyle parameters. (This applies primarily to +PRINTSTYLE TYPESET.

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

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

          +	.LS 14
          +	.PRINTSTYLE TYPESET
          +
          + +will not changes mom's default document leading +of 16 points to 14 points, whereas + +
          +	.PRINTSTYLE TYPESET
          +	.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 +1205,7 @@ macro, and then ONLY if DOC_LEAD is set before you invoke the START macro. - +

          TYPESET defaults

           	Family            = Times Roman
          @@ -1039,7 +1286,7 @@
           happen if the title of your document is long and your
           COPYSTYLE
           is DRAFT).
          -
          +

          @@ -1066,13 +1313,13 @@ 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 +1330,11 @@

        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 +1347,17 @@ 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 +1386,62 @@

      6. 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 +(listed below) prior to +START. +Do NOT 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 -have these meanings: +(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
        -	                 headers/footers or page numbers) ends on each page
        -
        -	(PAGE            If you use PAGE, its first 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
        -	                 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
        +	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
        +	               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 +1449,59 @@ 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.
        @@ -1208,42 +1526,58 @@ 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 +Should you NOT want adjusted document leading, you MUST turn it +off manually, like this:

        -	.DOC_LEAD_ADJUST
        +	.DOC_LEAD_ADJUST OFF
         
        -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 + 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. +

        @@ -1270,17 +1604,22 @@ 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.

        @@ -1294,7 +1633,7 @@ 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). - +

        How to change the look of docheaders: docheader control macros

        @@ -1336,6 +1675,25 @@ 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:

          @@ -1343,11 +1701,13 @@
        1. Adjust the docheader leading
        2. Change the family of docheader elements
        3. Change the font of docheader elements +
        4. Change the colour of the docheader
        5. Adjust the size of docheader elements
        6. Change the attribution string ("by")

        1. Change the starting position

        +

        By default, a docheader starts on the same baseline as @@ -1379,14 +1739,15 @@ Use DOCHEADER_ADVANCE to place them where you want. - +

        2. 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,16 +1755,18 @@ 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

        +

        The following macros let you change the family of each docheader element separately: @@ -1417,9 +1780,13 @@ 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

        +

        The following macros let you change the font of each docheader element separately: @@ -1437,9 +1804,50 @@ B, I and BI have the same meaning as they do for FT. +

        +

        5. Change the colour of the docheader

        +

        +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> +
        • 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, 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

        +

        6. Adjust the size of docheader elements

        +

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

        @@ -1471,8 +1879,9 @@

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

        -

        6. Change the attribution string ("by")

        +

        7. Change the attribution string ("by")

        If you're not writing in English, you can change what mom prints where "by" appears in @@ -1507,7 +1916,7 @@ would set "by" in Helvetica bold italic, 2 points smaller than normal. -
        +


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

        @@ -1580,9 +1989,21 @@ 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 normally during document processing EXCEPT when +COLUMNS are enabled. Your tabs will work in the +document column in which they were originally set, but not across +columns. When mom (or you) breaks to a new column, +you must redefine your tabs to make them function properly in the +new 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 +2055,7 @@ and prepares mom to process your document using the document element tags. No document processing takes place until you invoke START. -
        +

        @@ -1655,7 +2076,7 @@ At a barest minimum before START, you must enter a PRINTSTYLE command. -
        +


        @@ -1672,7 +2093,7 @@ (L_MARGIN, FAMILY, PT_SIZE, LS, etc). After START, you must use the following macros to make global changes to the basic type parameters of a document. -
        +

        Macro list

        @@ -1687,6 +2108,7 @@
      7. DOC_LEAD_ADJUST
      8. DOC_QUAD +

        @@ -1703,7 +2125,6 @@

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

        @@ -1814,6 +2235,16 @@ .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. +

        +


        @@ -1826,11 +2257,11 @@

      10. affects paragraphs, epigraphs and footnotes; does not affect blockquotes +
        -


        Next   -Prev   +Prev   Top   Back to Table of Contents diff -ruN groff-1.19/contrib/mom/momdoc/goodies.html groff-1.19.1/contrib/mom/momdoc/goodies.html --- groff-1.19/contrib/mom/momdoc/goodies.html Tue Feb 25 17:42:58 2003 +++ groff-1.19.1/contrib/mom/momdoc/goodies.html Mon Mar 22 07:18:36 2004 @@ -10,16 +10,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,7 +28,7 @@
      11. ALIAS (rename macros)
      12. SILENT ("hide" input lines from output)
      13. TRAP (suspend/re-invoke traps) -
      14. SMARTQUOTES +
      15. SMARTQUOTES (convert typewriter doublequotes to proper doublequotes)
      16. CAPS (convert to upper case)
      17. Underscore/underline @@ -59,12 +59,21 @@
      18. DROPCAP_GUTTER (change space between drop cap and running text) -
      19. Superscript +
      20. Superscripts +
      21. Lists + @@ -142,7 +151,7 @@ EXPERTS: ALIAS is an alias of .als. You can use either, or mix 'n' match with impunity. -
        +

        @@ -195,7 +204,7 @@ 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. -
        +

        @@ -213,9 +222,9 @@

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

        @@ -232,19 +241,28 @@ 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 +273,83 @@ 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,7 +370,7 @@ inline escapes \*[FOOT] and \*[INCH], instead of ' and ". -
        +

        @@ -383,7 +464,7 @@ printed, looks fine. Generally, I recommend using gv to preview files anyway. See the section on previewing. -
        +

        @@ -427,7 +508,7 @@ UNDERSCORE. See the NOTES for UNDERSCORE. -
        +

        @@ -440,7 +521,7 @@ 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 +534,7 @@ inline with the escapes \*[UL]...\*[ULX]. -
        +

        @@ -466,7 +547,7 @@ 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 @@ -560,8 +641,13 @@ 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
        @@ -570,45 +656,36 @@
         	.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,7 +709,7 @@ \(lq and \(rq (leftquote and rightquote respectively) whenever double-quotes are required in the string passed to PAD. -
        +

        @@ -658,7 +735,7 @@ effect for every instance of PAD until you change it again (say, back to the pound sign). -
        +

        @@ -862,7 +939,7 @@ 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. @@ -916,7 +993,6 @@ 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 -ruN groff-1.19/contrib/mom/momdoc/headfootpage.html groff-1.19.1/contrib/mom/momdoc/headfootpage.html --- groff-1.19/contrib/mom/momdoc/headfootpage.html Wed Jun 12 21:19:32 2002 +++ groff-1.19.1/contrib/mom/momdoc/headfootpage.html Mon Mar 22 07:18:36 2004 @@ -10,10 +10,11 @@ Next   Prev   Back to Table of Contents +

        -

        DOCUMENT HEADERS, FOOTERS, AND PAGINATION

        +

        PAGE HEADERS, FOOTERS, AND PAGINATION

        +
      22. Control macros for headers/footers
        • Header/footer strings +
        • Header/footer style
        • Pagination @@ -64,7 +70,6 @@

          Introduction

          -

          Headers and footers, @@ -110,16 +115,17 @@ 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 +140,7 @@ 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 +149,12 @@ 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 +168,7 @@ --------- ----------- ------------- ------------ 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 +183,9 @@ 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 +194,7 @@ 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 +218,10 @@ 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 +251,7 @@ page numbers were headers (or footers), and are controlled by the same macros. See Pagination control. -
          +


          @@ -272,7 +285,7 @@ you'd prefer footers in a document, you need only invoke FOOTERS; there's no need to turn headers off first. -
          +

          @@ -311,7 +324,7 @@ 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.) -
          +

          @@ -342,7 +355,7 @@ COLLATE. If you don't want this behaviour, you can change it with PAGENUM_ON_FIRST_PAGE. -
          +

          @@ -359,7 +372,7 @@ docheader on page makes it redundant.) However, should you wish a footer on page 1, invoke FOOTER_ON_FIRST_PAGE without any argument. -
          +


          @@ -377,8 +390,8 @@ 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 +416,17 @@
           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,10 +434,10 @@ 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. +

          @@ -432,6 +445,7 @@

          Macro: HEADER_RECTO LEFT | CENTER | RIGHT "<header recto string>" +
          Macro: HEADER_VERSO LEFT | CENTER | RIGHT "<header verso string>"
          @@ -451,7 +465,10 @@ 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 +488,9 @@

          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 +521,9 @@ 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 +536,16 @@ 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 +553,20 @@ 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 +577,28 @@
        • 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 @@ -588,7 +623,7 @@
          - Macro: HEADER_CENTER "<text of header center>" | # + Macro: HEADER_CENTER "<text of header centre>" | #
          @@ -596,8 +631,8 @@

          -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 +649,155 @@

          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 +809,14 @@ .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 +834,7 @@ 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,6 +855,7 @@
        • HEADER_FAMILY
        • HEADER_SIZE
        • HEADER_PLAIN +
        • HEADER_COLOR

        @@ -693,7 +875,7 @@

        NOTE: Replace HEADER_, above, with FOOTER_ to change the footer family. -
        +


        @@ -740,7 +922,7 @@ COPYSTYLE is DRAFT, since portions of the header may overprint if, say, the title of your document is very long. -
        +


        @@ -762,7 +944,33 @@ 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,6 +985,7 @@

      23. HEADER_<POSITION>_FONT
      24. HEADER_<POSITION>_SIZE
      25. HEADER_<POSITION>_CAPS +
      26. HEADER_<POSITION>_COLOR
        @@ -794,7 +1003,7 @@

        NOTE: Replace HEADER_, above, with FOOTER_ to change a footer part's family. -
        +


        @@ -811,7 +1020,7 @@

        NOTE: Replace HEADER_, above, with FOOTER_ to change a footer part's font. -
        +


        @@ -828,7 +1037,7 @@

        NOTE: Replace HEADER_, above, with FOOTER_ to change a footer part's size. -
        +


        @@ -853,7 +1062,50 @@ 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,7 +1119,7 @@ Vertical placement and spacing of headers/footers for an explanation of how mom deals with headers, footers, and top/bottom page margins. -
        +

        @@ -902,11 +1154,60 @@

        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,7 +1219,7 @@ PAGENUM_POS, you'd use HEADER_MARGIN to change their baseline placement. -
        +

        @@ -950,7 +1251,7 @@

        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 +1288,7 @@
         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,7 +1311,7 @@ @@ -1036,7 +1337,7 @@ with FOOTER_ to enable/disable the printing of the footer separator rule. (Most likely, if you're using FOOTERS, you'll want it off.) -
        +

        @@ -1057,7 +1358,7 @@ (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 +1388,34 @@ 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 +1424,11 @@

        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,7 +1442,7 @@
      27. DRAFT_WITH_PAGENUMBER -- attach draft/revision information to page numbers
      28. Control macros -
        +

        @@ -1137,7 +1465,7 @@ To (re)start pagination, invoke PAGINATE without any argument. -
        +

        @@ -1157,7 +1485,7 @@ 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. -
        +

        @@ -1171,13 +1499,13 @@ 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...)
-
+

@@ -1207,7 +1535,7 @@ START of the document, then invoke it either just before or after your first COLLATE. -
+

@@ -1219,7 +1547,7 @@

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 +1564,7 @@ COPYSTYLE DRAFT for other ways of dealing with crowded page headers when formatting draft-style copy. -
+


@@ -1275,7 +1603,7 @@ 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

@@ -1283,6 +1611,7 @@
 

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 +1623,8 @@ If, for some reason, you want to turn page number hyphens back on, invoke the macro without an argument. -

+


Next   Prev   diff -ruN groff-1.19/contrib/mom/momdoc/inlines.html groff-1.19.1/contrib/mom/momdoc/inlines.html --- groff-1.19/contrib/mom/momdoc/inlines.html Tue Feb 25 17:42:58 2003 +++ groff-1.19.1/contrib/mom/momdoc/inlines.html Mon Mar 22 07:18:36 2004 @@ -7,19 +7,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 +52,14 @@ 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 @@ -100,6 +100,7 @@

  • Special characters +


    @@ -129,7 +130,7 @@ document processing macros, inline font changes remain in effect only for the duration of the current macro. -
    +

    @@ -137,42 +138,59 @@

    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: +

    +

    +	\*[SIZE <size>]
    +
    + +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

    -	\*S[size]
    +	\*[SIZE 12]
     
    -where "size" is the new size you want. For example, to -change the point size inline to 12 points, you'd enter +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 +205,15 @@

    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 #]
    Closes the space between letters (Back Units). +
    \*[FU #]
    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. +by which to close or open the space between letters.

    For example,

    @@ -212,10 +229,10 @@ For backward compatibility, the forms

    -
    \*[BU1]...\*[BU36] +
    \*[BU1]...\*[BU36]
    Move back 1...36 kern units -
    \*[FU1]...\*[FU36] +
    \*[FU1]...\*[FU36]
    Move forward 1...36 kern units
    @@ -227,7 +244,7 @@ between characters pairs that are already automatically kerned disables the automatic kerning and uses the value you give to BU or FU instead. -
    +

    @@ -247,12 +264,12 @@

    -
    \*[FWD #<unit>] +
    \*[FWD #<unit>]
    Move forward inline the specified number of units of measure; decimal fractions are allowed. -
    \*[BCK #<unit>] +
    \*[BCK #<unit>]
    Move backward inline the specified number of units of measure; decimal fractions are allowed. @@ -269,8 +286,8 @@ 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 +295,7 @@ accept quarter points, so it's possible to do, for example, \*[FP.5] or \*[BP1.25] up to a limit of 12.75 points. -
    +

    @@ -291,11 +308,11 @@

    -
    \*[UP #<unit>] +
    \*[UP #<unit>]
    Move up inline the specified number of units of measure -
    \*[DOWN #<unit>] +
    \*[DOWN #<unit>]
    Move down inline the specified number of units of measure
    @@ -313,16 +330,16 @@ also available:

    -
    \*[ALD.25]...\*[ALD12.75] +
    \*[ALD.25]...\*[ALD12.75]
    Advance lead .25...12.75 points (move downward) -
    \*[RLD.25]...\*[RLD12.75] +
    \*[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. +

    @@ -344,10 +361,27 @@ 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; 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 +392,14 @@
     PAD
     macro and
     string tabs.
    -(See the example provided with
    -.PAD.
    +(See the
    +example
    +provided with PAD.)
     

    See groff's Horizontal line drawing function for more information on drawing horizontal rules. -
    +


    @@ -401,7 +436,7 @@ The Unix command "ls -l" will appear in Courier Bold Italic in a line that is otherwise in Times Roman. -
    +

    @@ -432,7 +467,7 @@ moves you 1.25 inches to the left (backwards). \h'-<distance>' is exactly equivalent to \*[BCK #<unit>]. -
    +

    @@ -479,7 +514,7 @@ 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 +542,7 @@ 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. -
    +

    @@ -550,8 +585,8 @@ 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). -
    +man page for information on this indispensable and easy-to-use macro). +

    @@ -566,8 +601,8 @@ For a more complete list, consult the section Special Character Names at the end of the Tutorial Examples in cstr54, available -here. - +here, +the groff info documentation, or man groff_char.

         CHARACTER                   ESCAPE SEQUENCE
    @@ -603,7 +638,7 @@
     

    -Next   +Next   Prev   Top   Back to Table of Contents diff -ruN groff-1.19/contrib/mom/momdoc/intro.html groff-1.19.1/contrib/mom/momdoc/intro.html --- groff-1.19/contrib/mom/momdoc/intro.html Tue Feb 25 17:42:58 2003 +++ groff-1.19.1/contrib/mom/momdoc/intro.html Sun Feb 22 10:17:08 2004 @@ -50,7 +50,7 @@ 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 @@ -72,6 +72,7 @@ primitives in order to accomplish what you want; the typesetting macros take care of that. +

    Typesetting with mom

    @@ -107,7 +108,7 @@ 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 @@ -124,7 +125,7 @@ typesetters to come up with solutions to these problems in ways that are somewhat easier and more intuitive than manipulating groff at the -primtive +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. @@ -136,7 +137,7 @@ 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 +150,7 @@ 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.

    @@ -163,7 +164,7 @@ high-school typing teacher proud. Footnotes, multiple columns, recto/verso printing and user designable headers and footers are also part of the fun. - +

    Mom's philosophy

    @@ -220,8 +221,7 @@ 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 +233,7 @@ 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

    @@ -259,26 +259,37 @@ And when explanations aren't enough, I offer examples.

    -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) +are the groff info pages, available by typing +

    +

    +	info groff
    +
    + +at the command line (assuming you have info +installed on your system). +

    +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:

    @@ -299,7 +310,7 @@ 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

    @@ -315,12 +326,14 @@
    toggle
    +

    Example 1: an argument requiring double-quotes

    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: @@ -333,6 +346,7 @@

    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 +369,12 @@ .TAB_SET 3 6P 3P L QUAD

  • -

    Example 3: a sample toggle macro:

    - + +

    Example 3: a sample toggle macro:

    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 -ruN groff-1.19/contrib/mom/momdoc/letters.html groff-1.19.1/contrib/mom/momdoc/letters.html --- groff-1.19/contrib/mom/momdoc/letters.html Wed Jun 12 21:19:32 2002 +++ groff-1.19.1/contrib/mom/momdoc/letters.html Sun Feb 22 10:17:08 2004 @@ -10,6 +10,7 @@ Next   Prev   Back to Table of Contents +

    @@ -33,11 +34,11 @@ 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 +47,8 @@ (LETTER, obviously), the essential PRINTSTYLE macro, and -START. +START, +like this:

     	.AUTHOR    "Yannick P. Guique"
    @@ -58,30 +60,40 @@
     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 +144,78 @@ .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. (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 +223,7 @@
      • 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 +256,7 @@ 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 +278,7 @@

  • CLOSING
  • NO_SUITE -- "next page" number off +
    @@ -224,6 +296,29 @@ 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 +337,31 @@ 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,14 +371,39 @@

    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
    +	JOE BLOW
    +	15 Brunette Road
    +	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. +

    diff -ruN groff-1.19/contrib/mom/momdoc/rectoverso.html groff-1.19.1/contrib/mom/momdoc/rectoverso.html --- groff-1.19/contrib/mom/momdoc/rectoverso.html Wed Jul 10 08:07:37 2002 +++ groff-1.19.1/contrib/mom/momdoc/rectoverso.html Sun Feb 22 10:17:08 2004 @@ -10,14 +10,12 @@ Next   Prev   Back to Table of Contents +

    + -

    RECTO/VERSO PRINTING and COLLATING

    - - - -

    Recto/verso and collating

    +

    RECTO/VERSO PRINTING and COLLATING

      @@ -57,7 +55,7 @@ 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 +72,7 @@ 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 +82,7 @@
  • RECTO_VERSO
  • SWITCH_HEADERS (also FOOTERS) +


    @@ -92,7 +90,6 @@

    Recto/verso printing

    -
    Macro: RECTO_VERSO

    @@ -122,11 +119,11 @@ (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 +131,6 @@

    Switch header left part/right part

    -
    Macro: SWITCH_HEADERS

    @@ -144,7 +140,7 @@ 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 +156,7 @@

    NOTE: Replace _HEADERS, above, with _FOOTERS if your document uses footers. -
    +


    @@ -205,15 +201,14 @@
    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 +216,7 @@

    Collate document files

    -
    + Macro: COLLATE

    @@ -246,7 +241,7 @@ NOTE: See the two words of caution, above. -
    +


    Next   diff -ruN groff-1.19/contrib/mom/momdoc/reserved.html groff-1.19.1/contrib/mom/momdoc/reserved.html --- groff-1.19/contrib/mom/momdoc/reserved.html Tue Feb 25 17:42:58 2003 +++ groff-1.19.1/contrib/mom/momdoc/reserved.html Mon Mar 22 07:18:37 2004 @@ -7,11 +7,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 +43,31 @@
     
     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)
    +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
     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 +76,11 @@
     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 +150,44 @@
     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+++
     
     #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 +197,29 @@
     #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)
    +#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 
     #EXTEND                 Are we in pseudo-extend mode? (toggle)
    -#EXT_WIDTH              Width of pseudo-extended type (pointsize x $EXT_PERCENT)
    +#EXT_WIDTH              Width of pseudo-extended type
    +                        (pointsize x $EXT_PERCENT)
     #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
    +                        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
    @@ -194,33 +234,46 @@
     #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
     #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
     #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_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 +281,70 @@
     #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                       "mark" register set in T_MARGIN; recalled
    +                        in LS and AUTOLEAD if #T_MARGIN_SET is 1
    +#T_INDENT               Value of temporary indent
    +#T_MARGIN               Top margin
    +#T_MARGIN_SET           Did we set the top margin with T_MARGIN?
    +                        (toggle)
     #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)
    +#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
     $PAD_MARKER          Character to mark off padding in PAD
     $PAD_STRING          Arg passed to PAD
    -$QUAD_VALUE          Quad value (left, right, center, justify)
    +$QUAD_VALUE          Quad value (left, right, centre, justify)
     $QUOTE0              ``
     $QUOTE1              ''
    -$RESTORE_QUAD_VALUE  Quad value for use in restoring L, R, C, J (after tabs)
    +$RESTORE_QUAD_VALUE  Quad value for use in restoring L, R, C, J
    +                     (after tabs)
    +$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 +352,7 @@
     ALIASN        aln
     BR            br
     CENTRE        CENTER
    +COLOUR        COLOR
     COMMENT       SILENT
     CONDENSE      CONDENSE_OR_EXTEND
     EXTEND        CONDENSE_OR_EXTEND
    @@ -285,6 +364,7 @@
     LL            LINE_LENGTH
     MAC           de
     NEW_PAGE      bp
    +NEWCOLOUR     NEWCOLOR
     NEWPAGE       NEW_PAGE
     PAGELENGTH    PAGE_LENGTH
     PAGE_LENGTH   pl
    @@ -296,6 +376,7 @@
     TB            TAB
     TI            IT
     UNDERSCORE_2  UNDERSCORE2
    +XCOLOUR       XCOLOR
     
     +++ALIASES FOR NUMBER REGISTERS+++
     
    @@ -316,11 +397,14 @@
     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 +415,8 @@
     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
    @@ -373,52 +458,69 @@
     
     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
    +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)
    +ITEM            Begin a list item
    +LINEBREAK       Break between narrative sections
    +LIST            Initialize a list
    +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
    +RESET_LIST      Reset digit or alpha list enumerator
    +SHIFT_LIST      Move a list over to the right
    +START           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.
    +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_COLOR         Blockquote color
     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_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_TITLE_SIZE       ps in/decrease of chapter title
    +                         (relative to size of running text)
     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_COLOR          Color of docheader
    +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
    @@ -426,378 +528,661 @@
     DOC_PT_SIZE              Overall doc point size
     DOC_QUAD                 Overall quad of document
     DOC_RIGHT_MARGIN         Doc right margin
    +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
     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
    +DO_QUOTE                 Print quote (invoked internally 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 centre)
    +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_CAPS         Capitalize the endnotes string
    +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?
    +ENDNOTE_NUMBERS_ALIGN_LEFT  Don't hang endnote numbers and align left
    +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
     EPIGRAPH_AUTOLEAD        Autolead value for epigraphs
    +EPIGRAPH_COLOR           Epigraph color
     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_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*
    +FINIS_COLOR              Finis string color
     FINIS_STRING             What to print when FINIS is invoked
    +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_COLOR           Footnote color
     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_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_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_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_FAMILY     Family of centre part of header/footer
    +HDRFTR_CENTER_FONT       Font of centre part of header/footer
    +HDRFTR_CENTER_PAD        Pad hdrftr CENTER left or right by specified
    +                         amount
    +HDRFTR_CENTER_SIZE       ps in/decrease of CENTER part of header/footer**
    +HDRFTR_COLOR             Header/footer color
     HDRFTR_FAMILY            Family to use in the headers/footers
     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_SIZE         ps in/decrease of left part of
    +                         headers/footers**
    +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_COLOR        Header/footer rule color
    +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_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
    +HDRFTR_VERSO             User-defined, single string verso
    +                         header/footer
     HEAD_CAPS                Print section titles in caps? (toggle)
    +HEAD_COLOR               Head color
     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_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_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.
    +LINEBREAK_CHAR           Linebreak character, iterations and positioning
    +LINEBREAK_COLOR          Linebreak color
     NUMBER_HEADS             Print head numbers
     NUMBER_PARAHEADS         Print parahead numbers
     NUMBER_SUBHEADS          Print subhead numbers
    +PAGENUM_COLOR            Page number color
     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
    +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
    +PARAHEAD_COLOR           Parahead color
     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
    +PARAHEAD_INDENT          How much to indent paraheads
    +PARAHEAD_SIZE            Size of paraheads*
     PARA_INDENT              Size of para indent
     PARA_SPACE               Put a line space before paras
     PP_FONT                  Overall doc font
    +PROCESS_SHIM             Calculates #SHIM when \n(.d is lower on the
    +                         page than #T_MARGIN
    +QUOTE_COLOR              Quote (poetic) color
     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
    +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
    +RESTORE_PAGINATION       Restore pagination after outputting non-
    +                         paginated endnotes.
    +REVISION_STRING          What to print whenever the word "revision"
    +                         is required
    +SHIM                     Advance to next "legal" baseline
    +SINGLESPACE_ENDNOTES     Single space TYPEWRITE endnotes
     SLANT_MEANS_SLANT        In TYPEWRITE, render \*[SLANT] as slant
    +SUBHEAD_COLOR            Subhead color
     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
    +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
    +SUSPEND_PAGINATION       Suspend pagination prior to outputting
    +                         endnotes
     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
    +TITLE_SIZE               How much to in/decrease title at start of doc*
    +TOC_APPENDS_AUTHORS      Appends author(s) to toc doc title entries
    +TOC_LEAD                 Leading of toc pages
    +TOC_FAMILY               Family to use on toc pages
    +TOC_HEADER_FAMILY        Family to use for "Contents"
    +TOC_HEADER_FONT          Font to use for "Contents"
    +TOC_PADDING              Number of placeholders for toc entries page
    +                         numbers
    +TOC_PN_FAMILY            Family to use for toc entries page numbers
    +TOC_PN_FONT              Font to use for toc entries page numbers
    +TOC_PN_SIZE              How much to in/decrease point size of
    +                         toc entries page numbers****
    +TOC_HEAD_FAMILY          Family of toc head entries
    +TOC_HEAD_FONT            Font of toc head entries
    +TOC_HEAD_INDENT          Indent of toc head entries
    +TOC_HEAD_SIZE            How much to in/decrease ps of head entries****
    +TOC_HEADER_QUAD          Quad direction for "Contents"
    +TOC_HEADER_SIZE          How much to in/decrease point size of
    +                         "Contents"****
    +TOC_HEADER_STRING        TOC header string (default=Contents)
    +TOC_PAGENUM_STYLE        Page numbering style (hdrftr nums) of
    +                         toc pages
    +TOC_PT_SIZE              Point size to use on toc pages
    +TOC_RV_SWITCH            Switch L/R margins of toc pages
    +TOC_PARAHEAD_FAMILY      Family of toc parahead entries
    +TOC_PARAHEAD_FONT        Font of toc parahead entries
    +TOC_PARAHEAD_INDENT      Indent of toc parahead entries
    +TOC_PARAHEAD_SIZE        How much to in/decrease ps of parahead
    +                         entries****
    +TOC_SUBHEAD_FAMILY       Family of toc subhead entries
    +TOC_SUBHEAD_FONT         Font of toc subhead entries
    +TOC_SUBHEAD_INDENT       Indent of toc subhead entries
    +TOC_SUBHEAD_SIZE         How much to in/decrease ps of subhead
    +                         entries****
    +TOC_TITLE_ENTRY          User supplied toc doc title entry
    +TOC_TITLE_FAMILY         Family of toc doc title entries
    +TOC_TITLE_FONT           Font of toc doc title entries
    +TOC_TITLE_INDENT         Indent of toc doc title entries
    +TOC_TITLE_SIZE           How much to in/decrease ps of doc title
    +                         entries****
     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
    +   *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
    +B_QUOTE       Block (indented) quote text
    +CLOSING       Closing (i.e. Yours truly,)
    +EPI_TEXT      Epigraph text
    +END_NOTES     Endnotes text
    +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
    +TOC_ENTRIES   TOC entries
     
     +++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)
    +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
     HDRFTR_RULE          Prints rule under header or over footer
    -PRINT_FOOTNOTE_RULE  An alias of PRINT_FOOTNOTE; prints footnote separator rule
    +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
     REMOVE_INDENT        Removes indents set with CHECK_INDENT
    -TRAPS                Sets hdrftr traps; optionally adjusts #DOC_LEAD to fill page to #B_MARGIN
    +QUIT_LISTS           Exit lists cleanly and completely
    +SET_LIST_INDENT      Restore indent of a prev. level of list
    +TRAPS                Sets hdrftr traps; optionally adjusts #DOC_LEAD
    +                     to fill page to #B_MARGIN
     
     +++NUMBER REGISTERS+++
     
     #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
    +#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
    +#BQUOTE_COLOR              Colored 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
     #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
    +#CURRENT_V_POS             \n(.d ; used in SHIM
    +#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)
    +#DEFER_PAGINATION          Tells COLLATE to restore pagination (from
    +                           RESTORE_PAGINATION
    +#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
    +#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_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)
    +#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_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_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_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_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)
    +#ENDNOTES                  Are we in an endnote (for FOOTERs; toggle)
    +#EN_HDRFTR_CENTER          Should we print centre string of
    +                           headers/footers on endnotes pages? (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)
     #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_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_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_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                 Running count of fn #; used to print fn marker
    +                           numbers
     #FN_R_INDENT               Right indent of INDENT RIGHT in footnotes
    -#FN_RULE_ADJ               # of points to raise footnote separator from its baseline
    +#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_WAS_DEFERED            Tells HEADER about a deferred footnote
    +#FOOTER_GAP                Amount of space between end of text and
    +                           page #
    +#FOOTER_MARGIN             Amount of space between page # and bottom
    +                           of page
    +#FOOTERS_ON                Are we using footers? (toggle)
    +#FOOTERS_WERE_ON           Were footers on? - used in FINIS and BLANKPAGE
    +                           (toggle)
    +#FOOTNOTE_COLOR            Colored footnotes? (toggle)
     #FULLSPACE_QUOTES          Should we fullspace quotes? (toggle)
    -#GREETING                  Is there a greeting (for letters)? 1=yes
     #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_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.
    +#HOW_MANY                  Number of blank pages to output
    +#IGNORE                    Should we ignore this macro? Set to 1 in
    +                           TYPEWRITE.
     #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
     #LEFT_CAP_HEIGHT           Cap height of left string in headers/footers
    +#LEGAL_BASELINE            Calculates vet. 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
    +#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
     #n%_AT_PAGENUM_SET         Page # from n% when PAGENUMBER invoked
    -#NEXT_AUTHOR               Supplies correct digit to AUTHOR_<#> when printing authors in doc header
    +#NEXT_AUTHOR               Supplies correct digit to AUTHOR_<#>
    +                           when printing authors in doc header
     #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
     #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
     #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_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
    +#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_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_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_PP                      In PP, stores para # in QUOTE.  Removed in
    +                           ENDQUOTE.
     #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)
    +#RECTO_VERSO               Switch HEADER_LEFT and HEADER_RIGHT on
    +                           alternate pages? (toggle); default=0
    +#REPEAT                    Number of times to repeat linebreak
    +                           character
     #RESET_EN_PP               Holds value of register #EN_PP_INDENT
    -#RESET_FN_NUMBER           Should fn# start at 1 on every page? (toggle)
    +#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_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
    +#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
     #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
     #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
    +#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)
     #TAB_OFFSET#               "#" at the end is from $CURRENT_TAB
    -#TO                        Is there an addressee date (for letters)? 1=yes
    +#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
    +y                          Vertical position stored with mk in hdrftrs.
      
     +++STRINGS+++
     
    @@ -807,29 +1192,48 @@
     $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_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
    +$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_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*
    +$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_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_STRING                   What to print whenever the word "draft" is required
    +$DRAFT                          The draft number (string valued)
    +$DRAFT_STRING                   What to print whenever the word "draft"
    +                                is required
     $EN_FAMILY                      Family for endnotes
     $EN_FT                          Font for 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
    @@ -839,59 +1243,96 @@
     $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_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_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_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
    +$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_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
    +$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_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_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
    +$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 valude of 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
    -PAGE#                           For use in hdrftr strings where page # is needed; \*[PAGE]
    +$LINEBREAK_CHAR_V_ADJ           +|- amount by which to raise/lower
    +                                linebreak character
    +$LINEBREAK_COLOR                Linebreak color
    +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
    +$PAPER                          Paper size (LETTER, A4, LEGAL);
    +                                default=LETTER
    +$PH_COLOR                       Parahead color
     $PP_FT                          Font used in paragraphs
    +$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*
    -$REVISION_STRING                What to print whenever the word "revision" is required
    +#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_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
    @@ -901,12 +1342,44 @@
     $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 +1421,9 @@
     
     +++ALIASES+++
     
    +All macros that include the word COLOR have aliases that use COLOUR instead,
    +e.g. NEWCOLOUR, XCOLOUR, COLOUR, HEAD_COLOUR, SUBHEAD_COLOUR, etc.
    +
     BREAK_BLOCKQUOTE      BREAK_QUOTE
     BREAK_CITATION        BREAK_QUOTE
     BREAK_CITE            BREAK_QUOTE
    @@ -956,7 +1432,7 @@
     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
    @@ -1049,6 +1525,9 @@
     PRINT_FOOTNOTE_RULE   FOOTNOTE_RULE
     SWITCH_FOOTERS        SWITCH_HDRFTR
     SWITCH_HEADERS        SWITCH_HDRFTR
    +TOC_FAM               TOC_FAMILY
    +TOC_LS                TOC_LEAD
    +TOC_PS                TOC_PT_SIZE
     

    diff -ruN groff-1.19/contrib/mom/momdoc/toc.html groff-1.19.1/contrib/mom/momdoc/toc.html --- groff-1.19/contrib/mom/momdoc/toc.html Tue Feb 25 17:42:58 2003 +++ groff-1.19.1/contrib/mom/momdoc/toc.html Mon Mar 22 07:18:37 2004 @@ -8,7 +8,51 @@

    Table of Contents

    +This link takes you to the top of the Table of Contents proper +

    +


    +

    Quick Table of Contents Navigation

    +INTRODUCTORY STUFF +TYPESETTING WITH MOM + +DOCUMENT PROCESSING WITH MOM + +
    +
    + +

    The Table of Contents Proper

    + +
  • 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 +
  • 4.12 Inline Escapes + +
  • 4.13 Coloured text + + +
  • 5. DOCUMENT PROCESSING WITH MOM -
  • 5.8 CREATING A COVER PAGE + +
  • 5.8 CREATING A COVER PAGE
    +
  • 5.9 WRITING LETTERS +
  • 5.10 USING TYPESETTING MACROS DURING DOCUMENT PROCESSING +
  • 6. APPENDICES
    • 6.1 Further notes on this documentation diff -ruN groff-1.19/contrib/mom/momdoc/typemacdoc.html groff-1.19.1/contrib/mom/momdoc/typemacdoc.html --- groff-1.19/contrib/mom/momdoc/typemacdoc.html Wed Jun 12 21:19:32 2002 +++ groff-1.19.1/contrib/mom/momdoc/typemacdoc.html Mon Mar 22 07:18:37 2004 @@ -10,6 +10,7 @@ Next   Prev   Back to Table of Contents +

      @@ -29,13 +30,24 @@ 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. @@ -115,9 +127,14 @@ 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 diff -ruN groff-1.19/contrib/mom/momdoc/typesetting.html groff-1.19.1/contrib/mom/momdoc/typesetting.html --- groff-1.19/contrib/mom/momdoc/typesetting.html Tue Feb 25 17:42:58 2003 +++ groff-1.19.1/contrib/mom/momdoc/typesetting.html Mon Mar 22 07:18:37 2004 @@ -10,7 +10,7 @@ Next   Prev   Back to Table of Contents - +

      THE TYPESETTING MACROS

      @@ -83,6 +83,7 @@
    • List of inline escapes
    +


    Introduction to the typesetting macros

    @@ -113,7 +114,7 @@ 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 +139,7 @@ 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,6 +156,7 @@
  • PAGE (page dimensions and margins all in one fell swoop)
  • NEWPAGE (start a new page) +

    @@ -282,7 +284,7 @@ See Typesetting Macros in Document Processing for an explanation. -
    +

    @@ -356,7 +358,7 @@ See Typesetting Macros in Document Processing for an explanation. -
    +

    @@ -371,7 +373,7 @@ 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,7 +410,7 @@
     See
     Top and bottom margins in document processing
     for an explanation.
    -
    +

    @@ -449,7 +451,7 @@ See Top and bottom margins in document processing for an explanation. -
    +

    @@ -528,7 +530,7 @@ immediately before entering any text, or, if it's feasible, make PAGE the last macro you invoke prior to entering text. -
    +

    @@ -547,7 +549,7 @@ Experts: NEWPAGE is an alias of .bp. You can use either, or mix 'n' match with impunity. -
    +


    @@ -566,7 +568,7 @@ The document processing macros handle things differently. See Typesetting Macros in Document Processing for an explanation. -
    +

    Basic parameter macros list

      @@ -632,7 +634,7 @@ 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. -
      +

      @@ -672,7 +674,7 @@

      Fonts can also be changed inline. See Inline Escapes, font control. -
      +

      @@ -714,7 +716,7 @@ The size of type can also be changed inline. See Inline Escapes, changing point size. -
      +

      @@ -767,7 +769,7 @@ ls. LS acts like vs. mom does not provide a macro analogous to ls. -
      +

      @@ -822,7 +824,7 @@ NOTE: There's no need to prepend a plus sign (+) to AUTOLEAD's argument, although you may do so if you wish. -
      +

      @@ -859,7 +861,7 @@ NOTE: The right margin macro (R_MARGIN) can also be used to set line length. -
      +


      @@ -873,7 +875,7 @@ 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 @@ -889,18 +891,18 @@ 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
          @@ -935,12 +937,12 @@ 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
          @@ -963,7 +965,7 @@ 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 +976,12 @@

          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 +1031,7 @@ 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 +1071,7 @@

          Experts: BR is an alias for br. You can use either, or mix 'n' match with impunity. -
          +

          @@ -1109,7 +1111,7 @@ The next line of text.

    -may be more instuitive than +may be more intuitive than

     	.LS 12.5
    @@ -1140,16 +1142,17 @@
     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: +If you need EL functionality on the last line of a +page that has a footer trap, turn the trap off by surrounding the +line to be EL'd with +TRAP +requests, as in following example.

    -	3.
    -	.TRAP OFF
    -	.EL
    -	.TRAP
    +	.TRAP OFF  \" Turn trap off
    +	3.		   \" Input the first line
    +	.EL        \" Invoke EL...
    +	.TRAP      \" ...and turn trap back on *before* inputting next line
     	\*[FP12]Establish, once and for all, if 42 really is the answer.
     
    @@ -1167,7 +1170,7 @@ "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. -
    +

    @@ -1225,7 +1228,7 @@

    Experts: SPACE is an alias of sp. You can use either, or mix 'n' match with impunity. -
    +

    @@ -1248,7 +1251,7 @@

    Experts: SPREAD is an alias for brp. You can use either, or mix 'n' match with impunity. -
    +

    @@ -1300,7 +1303,7 @@ Please also note that had the example been in one of the fill modes, there'd have been no need for the \c. -
    +


    @@ -1318,7 +1321,6 @@

    Typographic refinements macro list

    -
    • Word and sentence spacing
        @@ -1412,7 +1414,7 @@ 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. -
        +

        @@ -1486,7 +1488,7 @@ 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. -
        +

        @@ -1514,8 +1516,6 @@ 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 @@ -1541,8 +1541,6 @@

        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 +1559,6 @@ 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 +1581,6 @@ 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 +1600,15 @@ 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,7 +1619,7 @@ 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. -
        +

        @@ -1678,7 +1668,7 @@

    is how you'd do it. -
    +

    @@ -1732,7 +1722,7 @@ you can tell mom that's what you want by invoking the BR_AT_LINE_KERN toggle macro. -
    +

    @@ -1772,7 +1762,7 @@ you can tell mom that's what you want by invoking the BR_AT_LINE_KERN toggle macro. -
    +

    @@ -1819,7 +1809,7 @@ inline escapes \*[BU #] and \*[FU #]. See Inline Escapes, kerning. -
    +

    @@ -1845,7 +1835,7 @@ ligature generation off.

    NOTE: Not all fonts support ligatures. -
    +


    @@ -1876,8 +1866,8 @@
    • 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 +1889,12 @@
        -

        Set degree of slant for pseudo-italicising

        +

        Set degree of slant for pseudo-italicizing


        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 +1913,12 @@ 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 +1930,7 @@ 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 +1940,7 @@ 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,7 +1958,7 @@
         mom underlines pseudo-italics by default.  To
         change this behaviour, use the special macro
         SLANT_MEANS_SLANT.
        -
        +

        @@ -2004,7 +1994,7 @@ To start emboldening, use the inline escape \*[BOLDER]. -
        +

        @@ -2043,7 +2033,7 @@ PRINTSTYLE TYPEWRITE, mom ignores \*[BOLDER] requests. -
        +

        @@ -2084,7 +2074,7 @@ \*[CONDX]) before before making any changes to the pseudo-condense percentage with CONDENSE. -
        +

        @@ -2127,7 +2117,7 @@ PRINTSTYLE TYPEWRITE, mom ignores \*[COND] requests. -
        +

        @@ -2148,7 +2138,7 @@ 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 +2159,7 @@
         \*[EXTX])
         before before making any changes to the pseudo-extend percentage
         with EXTEND.
        -
        +

        @@ -2212,7 +2202,7 @@ PRINTSTYLE TYPEWRITE, mom ignores \*[EXT] requests. -
        +


        @@ -2291,7 +2281,7 @@ T_MARGIN or PAGE. -
        +

        @@ -2328,7 +2318,7 @@ use RLD with points of lead. -
        +


        @@ -2345,26 +2335,32 @@ 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 +2407,7 @@

        • 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 +2519,17 @@ 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 +2550,10 @@ 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 +2577,12 @@ 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 +2593,7 @@

         	.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 +2607,10 @@ \*[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 +2619,9 @@ \*[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 +2660,7 @@ 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 +2673,7 @@
         	.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 +2721,11 @@
         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,7 +2743,7 @@
        -

        Set up typsetting tabs

        +

        Set up typesetting tabs


        Macro: TAB_SET <tab number> <indent> <length> L | R | C | J [ QUAD ]
        @@ -2761,7 +2765,7 @@
      • 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 +2778,7 @@
       

      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 +2820,7 @@ Indents) before setting up tabs with TAB_SET, or mom may get confused. -
      +

      @@ -2870,7 +2874,7 @@ Mom calculates string tab positions and lengths as she reads the input line, not after the line has undergone manipulations to the word spacing. -
      +

      @@ -2911,7 +2915,7 @@ See the Quickie tutorial on string tabs for a full explanation of setting up string tabs. -
      +

      @@ -2980,7 +2984,7 @@ 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. -
      +

      @@ -2997,23 +3001,51 @@ in the description of the TAB macro for an example of how TN works.

      -NOTE: TN is like +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: 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 +footer trap is sprung. If you need to use TN on +the last line of a page that has a footer trap, turn the trap off by +surrounding the line to be TN'd with TRAP, -as in this example: +requests, as in the following example.

       	.TAB_SET 1 0  1P  L
       	.TAB_SET 2 1P 20P L
       	.TAB 1
      -	.TRAP OFF
      -	1.
      -	.TN
      +	.TRAP OFF  \" Turn trap off
      +	1.         \" Input the first line
      +	.TN        \" Invoke TN...
      +	.TRAP      \" ...and turn trap back on *before* inputting next line
       	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: @@ -3026,7 +3058,7 @@ "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. -
      +

      @@ -3042,7 +3074,7 @@ quad direction and fill mode that were in effect prior to invoking any tabs. -
      +


      @@ -3123,7 +3155,7 @@ COLUMNS macro in the document processing macros. - +

      Columns macro list

      @@ -3158,7 +3190,7 @@ COLUMNS macro in the document processing macros. -
      +

      @@ -3173,7 +3205,7 @@ MCO), MCR, at any time, returns you to the top of your columns. -
      +

      @@ -3198,7 +3230,7 @@

      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 +3255,7 @@ The above advances to precisely 24 points below the baseline of the longest column. -
      +


      @@ -3240,7 +3272,7 @@ 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 +3405,7 @@ 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 +3420,9 @@

      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) @@ -3447,8 +3479,8 @@ automatically cancels any active indents.

        ADDITIONAL NOTE: Invoking IL -automtically turns off IB. -
        +automatically turns off IB. +

        @@ -3468,7 +3500,7 @@ 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,8 +3520,8 @@ automatically cancels any active indents.

        ADDITIONAL NOTE: Invoking IR -automtically turns off IB. -
        +automatically turns off IB. +

        @@ -3519,12 +3551,12 @@ 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,9 +3572,9 @@ automatically cancels any active indents.

        ADDITIONAL NOTE: Invoking IB -automtically turns off IL and +automatically turns off IL and IR. -
        +

        @@ -3555,7 +3587,7 @@

        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.) @@ -3639,10 +3671,15 @@ 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 +3715,7 @@
         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,7 +3734,7 @@
         IB, measures given to HI
         are NOT additive.  Each time you pass a measure to
         HI, the measure is treated literally.
        -
        +

        diff -ruN groff-1.19/contrib/mom/momdoc/using.html groff-1.19.1/contrib/mom/momdoc/using.html --- groff-1.19/contrib/mom/momdoc/using.html Wed Sep 4 23:48:01 2002 +++ groff-1.19.1/contrib/mom/momdoc/using.html Sun Feb 22 10:17:08 2004 @@ -10,7 +10,7 @@ Next   Prev   Back to Table of Contents - +

        USING MOM

        @@ -23,7 +23,7 @@ Invoking groff
        Previewing documents -
        +


        Introduction

        @@ -50,7 +50,7 @@ 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 +67,9 @@ 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 +120,12 @@ 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 +171,7 @@
         only need -U with .open, .opena, .pso, .sy,
         and .pi, however reality seems, at times, to dictate
         otherwise.
        -
        +

        How to preview documents

        diff -ruN groff-1.19/contrib/mom/om.tmac groff-1.19.1/contrib/mom/om.tmac --- groff-1.19/contrib/mom/om.tmac Tue Feb 25 17:45:15 2003 +++ groff-1.19.1/contrib/mom/om.tmac Mon Mar 22 07:18:36 2004 @@ -21,9 +21,9 @@ .\" 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 +.\" +.\" +\# Version 1.1.8 \# ------------- \# .if (\n[.x]\n[.y] < 118) \ @@ -55,7 +55,7 @@ .ALIAS PAGELENGTH pl .ALIAS NEWPAGE bp .ALIAS SPREAD brp -.ALIAS STRING ds +.ALIAS ESC_CHAR ec \# \# ALIASES FOR NUMBER REGISTERS \# ---------------------------- @@ -73,7 +73,8 @@ \# \# MISCELLANEOUS \# ============= -.cflags 4 /\(en +.cflags 4 /\(en \" So slash and en-dashes get broken +.nr #L_MARGIN \n(.o \" Tabs, etc require #L_MARGIN \# \# ==================================================================== \# @@ -82,9 +83,9 @@ \# *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. +\# 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 @@ -105,7 +106,7 @@ . ALD \\n[#DOC_LEAD]u*3u . PRINT \\*[$AUTHOR_1] . \} -.DO_FOOTER +. DO_FOOTER .END \# \# @@ -119,7 +120,7 @@ \# PAGE WIDTH \# ---------- \# *Argument: -\# +\# \# *Function: \# Stores user supplied page width in register #PAGE_WIDTH. \# *Notes: @@ -137,7 +138,7 @@ \# L_MARGIN \# -------- \# *Argument: -\# +\# \# *Function: \# Stores user supplied page offset in register #L_MARGIN. \# Sets .po to user supplied offset. @@ -154,7 +155,7 @@ \# R_MARGIN \# -------- \# *Argument: -\# +\# \# *Function: \# Stores user supplied right margin in register #R_MARGIN. \# *Notes: @@ -178,7 +179,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. @@ -200,7 +201,7 @@ \# B_MARGIN \# -------- \# *Argument: -\# +\# \# *Function: \# Stores the user supplied bottom margin in register #B_MARGIN. \# *Notes: @@ -271,9 +272,9 @@ \# The trap is set in .PAGE. \# .MAC DO_B_MARGIN END -.ev 1 +. ev 1 . bp -.ev +. ev .END \# \# ===================================================================== @@ -287,7 +288,7 @@ \# LINE LENGTH \# ----------- \# *Argument: -\# +\# \# *Function: \# Stores user supplied line length in register #L_LENGTH. \# Sets .ll to #L_LENGTHu @@ -369,6 +370,22 @@ .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: @@ -409,9 +426,6 @@ \# 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 \} @@ -442,7 +456,6 @@ .ds PREV \EfP .ds S \Es \# -\# \# ===================================================================== \# \# +++KERNING+++ @@ -460,8 +473,8 @@ . nr #KERN 1 . \} . el \{\ -. kern 0 -. nr #KERN 0 +. kern 0 +. nr #KERN 0 . \} .END \# @@ -478,18 +491,18 @@ \# 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 +\# 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 +\# 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 #] where #, inline, is the desired +\# 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. \# @@ -498,88 +511,26 @@ .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)' -\# -\# -.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)' +\# 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)' +.\} +\# +.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 \# \# \# *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 #]. +\# 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' @@ -768,7 +719,7 @@ \# *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 @@ -783,9 +734,9 @@ \# 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,7 +803,7 @@ \# 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) @@ -868,7 +819,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,10 +828,11 @@ \# \# 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 #]. +\# 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' @@ -1003,7 +955,7 @@ \# Ligatures may be supplied manually with \(fi, \(fl, etc. \# .MAC LIGATURES END -. ie '\\$1'' \{\ +. ie '\\$1'' \{\ . lg . nr #LIGATURES 1 . \} @@ -1017,32 +969,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: ascii 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 \# @@ -1079,9 +1100,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 \{\ @@ -1160,6 +1181,7 @@ . ce 0 . nf . nr #FILL 1 +. if '\\n(.z'LETTERHEAD1' \{ .rr #DATE_FIRST \} .END \# \# @@ -1215,23 +1237,23 @@ \# 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 <#> +\# are set with TS, they are called with .TAB n, where "n" \# corresponds to the number passed to TAB_SET as a valid tab number. \# \# String tabs allow the user to mark off tab positions inline. Tab \# indents and lengths are calculated from the beginning and end \# positions of the marks. Up to 19 string tabs may be created, -\# numbered 1-19. Once created, they are called with .TAB <#>, +\# 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 \*[ST<#>], where <#> is +\# 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 \*[ST<#>X]. All ST's must have a matching STX. String tabs +\# with \*[STnX]. All ST's must have a matching STX. String tabs \# may be nested. \# -\# Next, the user invokes .ST <#> for every string tab defined, and +\# 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. \# @@ -1240,44 +1262,25 @@ \# 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 @@ -1311,13 +1314,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 @@ -1343,7 +1346,7 @@ \# 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. +\# 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 @@ -1353,12 +1356,12 @@ \# \# 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. +\# 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 #. +\# tab is called with TAB . \# \# Tabs themselves are user-invoked using the TAB macro with a numeric \# argument, e.g. TAB 1. @@ -1377,9 +1380,10 @@ . 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' \{\ @@ -1411,7 +1415,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,17 +1423,17 @@ \# *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. +\# trap, the line entered after .TN will appear on the next page, +\# unless TRAP...TRAP OFF is used. \# .MAC TN END -. br +. EL . nr #NEXT_TAB \\n[#CURRENT_TAB]+1 . TAB\\n[#NEXT_TAB] -. sp -1v .END \# \# @@ -1470,6 +1473,85 @@ . \} .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+++ @@ -2047,11 +2129,12 @@ \# *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. \# @@ -2152,6 +2235,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: @@ -2222,7 +2322,6 @@ . ds $DROPCAP \\$1 . nr #DC_LINES \\$2-1 . ds $RESTORE_COND \\*[$COND_PERCENT] -. ds $RESTORE_EXT \\*[$EXT_PERCENT] . if '\\$3'COND' \{ .CONDENSE \\$4 \} . if '\\$3'EXT' \{ .EXTEND \\$4 \} . if !r#DC_GUT \{ .nr #DC_GUT (3p) \} @@ -2244,8 +2343,20 @@ . 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 \} @@ -2287,7 +2398,9 @@ \# *Notes: \# .MAC RULE END -. if \\n(.j=1 \{\ +\c +. EL +. if \\n(.u=1 \{\ . ds $CURRENT_QUAD \\*[$QUAD_VALUE] . nf . \} @@ -2297,7 +2410,7 @@ . if \\n[#INDENT_LEFT_ACTIVE] \{ .ll \\n(.lu-\\n[#L_INDENT]u \} . PRINT \El'\En(.lu' . ll \\n[#RESTORE_L_LENGTH]u -. rr #RESTORE_L_LENGTH]u +. rr #RESTORE_L_LENGTH . \} . el \{\ . PRINT \El'\En(.lu' @@ -2383,11 +2496,12 @@ \# .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. +\# 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 @@ -2397,7 +2511,7 @@ \# 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. +\# .IX/Q macros. \# \# Example \# ------- @@ -2452,9 +2566,9 @@ \# 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 +\# 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 +2705,7 @@ . if '\\$1'CLEAR' \{\ . rr #L_INDENT . rr #INDENT_STYLE_LEFT -. \} +. \} .END \# \# @@ -2609,7 +2723,7 @@ . ta \\n(.lu . \} . \} -. if '\\$1'CLEAR' \{\ +. if '\\$1'CLEAR' \{\ . rr #R_INDENT . rr #INDENT_STYLE_RIGHT . \} @@ -2699,7 +2813,7 @@ . ie \\n[#COLUMNS] \{\ . ll \\n[#COL_L_LENGTH]u . ta \\n(.lu -. \} +. \} . el \{\ . ll \\n[#L_LENGTH]u . ta \\n(.lu @@ -2783,11 +2897,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 +2914,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,6 +2934,7 @@ . \} .END \# +\# \# PRINT \# ----- \# *Arguments: @@ -2936,6 +3051,7 @@ \# +++TYPESETTING ALIASES+++ \# .ALIAS CENTRE CENTER +.ALIAS COLOUR COLOR .ALIAS COMMENT SILENT .ALIAS CONDENSE CONDENSE_OR_EXTEND .ALIAS EXTEND CONDENSE_OR_EXTEND @@ -2943,15 +3059,17 @@ .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 TABSET TAB_SET .ALIAS TB TAB .ALIAS UNDERSCORE_2 UNDERSCORE2 +.ALIAS XCOLOUR XCOLOUR \# \# \# ==================================================================== @@ -3053,6 +3171,7 @@ . fam C . ft R . ps 12 +. color 0 . ie '\\$2'SINGLESPACE' \{\ . nr #SINGLE_SPACE 1 . vs 12 @@ -3078,6 +3197,7 @@ . UNDERLINE_ITALIC . UNDERLINE_QUOTES . nr #IGNORE_COLUMNS 1 +. char \(em -- . \} . if '\\$1'TYPESET' \{\ . nr #PRINT_STYLE 2 @@ -3224,7 +3344,7 @@ . 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" \} @@ -3240,14 +3360,14 @@ . 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,7 +3375,10 @@ . 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 \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\ +. ds $HDRFTR_CENTER +. rr #USER_DEF_HDRFTR_CENTER +. \} . \} . \} \# Chapter @@ -3274,65 +3397,115 @@ . \} . el \{\ . ie !'\\*[$CHAPTER_TITLE]'' \{\ -. ds \\*[$CHAPTER_TITLE] +. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE] . \} . 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] +. \} . \} . \} . \} @@ -3373,16 +3546,28 @@ . \} . 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] +. \} . \} . \} . \} @@ -3406,6 +3591,11 @@ \# *Function: \# Collect information about documents. \# +\# +.MAC DOC_TITLE END +. ds $DOC_TITLE \\$1 +.END +\# .MAC TITLE END \"Document title . ds $TITLE \\$1 .END @@ -3427,12 +3617,13 @@ \# \# .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 \# \# @@ -3501,7 +3692,7 @@ . 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 +3700,29 @@ \# \# +++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 +3731,12 @@ \# *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 +3746,12 @@ \# *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 +3759,14 @@ \# 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 +3776,7 @@ \# *Arguments: \# \# *Function: -\# Stores greeting in string $CLOSING. +\# Stores greeting in diversion CLOSING. \# .MAC CLOSING END . br @@ -3588,7 +3791,7 @@ \# *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 @@ -3612,7 +3815,10 @@ .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 \{\ @@ -3650,12 +3856,19 @@ . 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 " place .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 \} +. 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 @@ -3703,13 +3916,15 @@ . if !r#FN_RULE \{ .FOOTNOTE_RULE \} . if !r#FN_MARKERS \{ .FOOTNOTE_MARKERS \} . if !r#FN_MARKER_STYLE \{ .FOOTNOTE_MARKER_STYLE STAR \} +. if !d$EN_PN_STYLE \{ .ENDNOTES_PAGENUM_STYLE digit \} . if !d$EN_FAM \{ .ENDNOTE_FAMILY \\*[$DOC_FAM] \} . if !d$EN_FN \{ .ENDNOTE_FONT R \} . if !d$EN_QUAD \{ .ENDNOTE_QUAD \\*[$DOC_QUAD] \} -. if !d$EN_STRING \{ .ENDNOTE_STRING "ENDNOTES" \} -. if !d$EN_STRING_FAM \{ .ENDNOTE_STRING_FAMILY \\*[$DOC_FAM] \} +. 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,20 +3932,47 @@ . \} . 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 \} -. \} +. 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$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 \} +.