groff-1.22.2/0000755000175000001440000000000012104714315011240 5ustar wlusersgroff-1.22.2/ChangeLog.1150000644000175000001440000063014312104714256013332 0ustar wlusers Version 1.15 released ===================== 1999-12-28 Werner LEMBERG * NEWS, VERSION: Changed to 1.15 1999-12-27 Paul Eggert * nroff/nroff.man: -S is safer, not safe. * groff/groff.cc (main): Use `safer', not `safe', in variable names. This does not change the behavior. * troff/input.cc (main): Likewise. * nroff/nroff.sh: Likewise. * troff/input.cc (prepend_string): New function. (main): Prepend -msafer, so that we check macro libraries for safety. * PROBLEMS: Report problem with Sun C++ 5.0 and 5.1. Version 1.14 released ===================== 1999-12-26 Werner LEMBERG * NEWS, VERSION: Changed to 1.14. 1999-12-24 Werner LEMBERG * refer/refer.cc: Fixing the last fix. Version 1.13 released ===================== 1999-12-23 Werner LEMBERG * tmac/tmac.an: A typo (`.if' instead of `.ie') made the page number disappear. * NEWS: Updated. * tmac/tmac.safer: Forgot to remove `so' from the `rm' request. * VERSION: Changed to 1.13 -- to be compliant with the Adobe 3.0 document conventions, the version number must be a real. Version 1.12.1 released ======================= 1999-12-22 Werner LEMBERG * VERSION: Changed to 1.12.1. 1999-12-22 Alan Rooks * refer/refer.cc (do_file): Slight modification to satisfy the `Standard system CC - C++ Compilation System 3.1 03/03/99' on SCO UnixWare 7.1. 1999-12-20 Werner LEMBERG * changed prep.ai.mit.edu -> ftp.gnu.org; updated copyright notices. * tmac/tmac.safer, tmac/groff_msafer.man: Remove `so' (again) from list of unsafe requests. * pic/pic.man: Fixed a typo. * man/groff_out.man: Fixed a typo. 1999-12-18 Werner LEMBERG * Makefile.in: Doc fixes. 1999-12-17 Fabrizio Polacco * groff/groff.cc: Missing `U' option added to getopt(). * troff/troff.man: Missing `U' option added to synopsis. Version 1.12 released ===================== 1999-12-14 Werner LEMBERG * troff/input.cc (usage), groff/groff.cc (synopsis): Added -U flag to the synopsis. * nroff/nroff.sh, nroff/nroff.man: Replaced `secure', `unsecure' with the more appropriate terms `safer' and `unsafe'. * libgroff/strerror.c, aclocal.m4, configure.in: Added checks for sys_nerr and sys_errlist[]. * pic/pic.h, aclocal.m4, configure.in: Added check for hypot(). * pic/pic.y, pic/pic.cc: Added check for fmod(). 1999-12-13 Werner LEMBERG * VERSION: Changed to 1.12. Here some patches from various sources; most of them taken from the Debian distribution. * tmac/groff_mdoc.man, tmac/groff_mdoc.samples.man, tmac/Makefile.sub: New files copied directly from the NetBSD distribution. Probably, some additional adaptation later on is necessary... * tmac/tmac.safer, tmac/groff_msafer.man: Added `so' to the list of unsafe requests. * groff/groff.cc, groff/groff.man, nroff/nroff.sh, nroff/nroff.man, pic/main.cc, pic/pic.man, troff/input.cc, troff/troff.man: Added option `-U' for unsafe mode. Safe mode (`-S') is now the default. * README, NEWS: Updated. 1999-12-09 Werner LEMBERG * doc/groff.texinfo: Regenerated nodes and menus with emacs. * doc/Makefile (clean): Added cleaning commands for groff.texinfo. 1999-12-06 Werner LEMBERG * configure.in: Removed AC_PREFIX_PROGRAM since it causes more grief than relief today. Additionally, it is against the GNU coding standards. * configure: Recreated. 1999-12-05 Werner LEMBERG * configure.in: Added GROFF_LIBM. * configure: Recreated. * aclocal.m4 (GROFF_LIBM): New function which tests whether -lm is necessary. * Makefile.in: Added definition of $(LIBM). * Makefile.comm (LIBM): Removed. * pfbtops/Makefile.sub: On AIX, -lm is needed also. 1999-12-03 Gaius Mulley * doc/Makefile: Added rule for generation pic.html. (clean): Files produced by grohtml will be removed also. * doc/pic.ms: Small fix. * tmac/tmac.html: Fixed suppression of headers. 1999-11-16 Gaius Mulley * tmac/tmac.html: Fixing horizontal arrows. Turning off hyphenation. * tmac/tmac.an: Improved support for grohtml; better indentation, no footers/headers. 1999-10-31 Gaius Mulley * tmac/tmac.arkup: Added CDFTP macro * tmac/tmac.html: All headers are turned off for ms, me, and mm macros. * tmac/troffrc: Some additions for HTML stuff. 1999-10-06 Gaius Mulley * tmac/tmac.html: Small changes. 1999-09-26 Werner LEMBERG * doc/groff.texinfo: Minor fixes. 1999-09-26 Gaius Mulley * devhtml/TR: Changed spacewidth to 3. * tmac/Makefile.sub (NORMALFILES): Added tmac.arkup. * tmac/tmac.html: Moved markup macros to tmap.arkup. * tmac/tmac.arkup: New file. * grohtml/ChangeLog: New file. 1999-09-16 Werner LEMBERG * doc/groff.texinfo (Common Features): Added Copying chapter. Changed format to @smallbook. 1999-09-15 Werner LEMBERG * NEWS: Added info about groff.texinfo. * doc/groff.texinfo: Will now compile (using texi2dvi) without warning messages. 1999-09-14 Werner LEMBERG * groff/groff.man: More updates. 1999-09-13 Werner LEMBERG * doc/groff.texinfo: New file. This manual is still very rudimentary. It has been originally contributed by Trent A. Fisher with first corrections and additions by me. * INSTALL: Added information about the `doc' subdir * troff/troff.man: Minor fixes. * groff/groff.man: Added missing `-L arg' to SYNOPSIS section; reordered options. * troff/input.cc (usage): Added missing `-ffam' to usage message. * Makefile.in (dist): groff-$(version).tar.gz must be removed also, otherwise it is included itself in another call of `make dist'. * groff/groff.cc (synopsis): Removed superfluous space. * PROJECTS, PROBLEMS, NEWS: Updated. * VERSION: Updated to 1.12beta. * BUG-REPORT: Some cosmetic fixes. Corrected email address. * README: Updated: Included documentation about CVS repository, mailing lists, and daily snapshots. * tmac/Makefile.sub: Fixed $(tmap_wrap) finally. 1999-09-12 Bjarni Ingi Gislason * tmac/tmac.an: If the tag didn't fit into the space that the macro `TP' specifies, the rest of the tag went into the space for the next line. 1999-09-12 Jeffrey Copeland * grolj4/lj4.cc: Added duplex printing (option `-d'). * grolj4/grolj4.man: Document duplex printing. 1999-09-12 Werner LEMBERG * doc/Makefile (pic.ps): Fixed rule which caused problems with non-GNUish sed programs. * tmac/doc-syms: Removed extra space from -iso8802-3 macro definition. * configure.in (LIBS): Added `-lc' * Makefile.comm (.man.n): Added substitution for @TMAC_AN_PREFIX@. * pic/tex.cc (solid_arc): Casting M_PI to double. * libgroff/putenv.c (putenv): Changed function header to ANSI C. * groff/groff.man, tmac/Makefile.sub (MAN7), tmac/groff_msafer.man (new file), tmac/msafer.man (deleted), tmac/groff_me.man (new file), tmac/me.man (deleted): {me,msafer} -> groff_{me,msafer}. * groff/groff_man.man: New file. This manual page was originally written for the Debian GNU/Linux system by Susan G. Kleinmann . * eqn/list.cc (list_box::compute_metrics, list_box::compute_sublist_width): Removed variable declaration to avoid shadowing warnings. * grops/psrm.cc (resource_manager::process_file): Ditto. * tfmtodit/tfmtodit.cc (main): Ditto. * libgroff/font.cc (font::load_desc): Renamed auxiliary variable to avoid shadowing warnings. * tbl/table.cc (block_entry::do_divert, table::do_row): Renamed shadowing loop variable. * groff/groff.man, troff/troff.man: Added doc about grohtml. 1999-09-12 Gaius Mulley New grohtml frontend to convert groff input to html. * Makefile.in (CCPROGDIRS, DEVDIRS): Added html device. * tmac/Makefile.sub (NORMALFILES): Added tmac.html. * tmac/eqnrc: Added html device. * tmac/tmac.html: New file. * eqn/main.cc (do_file, inline_equation), pic/troff.cc (troff_output::start_picture, troff_output::finish_picture), tbl/main.cc (process_input_file): Surrounded output with `graphics_start' and `graphics_end' so that the html driver can identify non-text portions. * grodvi/dvi.cc (dvi_printer::set_char), grolj4/lj4.cc (lj4_printer::set_char), grops/ps.cc (ps_printer::set_char), grotty/tty.ps (tty_printer::set_char): Additional parameter `name'. * include/printer.h: Class printer: New function set_char_and_width; new variables (is_char_named, is_named_set, named_command, named_char_s, named_char_n) to hold information about named characters -- needed by the html driver. * libdriver/printer.cc (printer::set_ascii_char, printer::set_special_char): Use set_char_and_width. * devhtml/*: New device files for html driver. * grohtml/*: New driver grohtml. 1999-09-11 Wilfredo Sanchez * tmac/doc-common, tmac/tmac.an: Removed the word `UNIX' in default strings. 1999-09-11 Luke Mewburn * libgroff/string.cc (search): Small fix to test against NULL pointer. 1999-09-11 Jeff Conrad * troff/node.cc (copy): The characters in a bracket escape (e.g., \b'abc') were stacked in reverse order when processed in a diversion. * troff/node.h: Added `*last' to struct `node' to make the above fix work. * troff/input.cc (read_draw_node), libdriver/input.cc (do_file): The default scale for the 'f' and 't' graphics functions were 'm' rather than 'u' (i.e., no scaling). 1999-09-11 Peter Miller * groff/groff.cc (main), groff.man, soelim/soelim.cc (main, do_file), soelim/soelim.man: Added `-I file' option to soelim, defining include paths. * soelim/soelim.cc (include_path_append): New function. 1999-09-11 Larry Jones * tbl/main.cc (process_options): Unix (at least Documenter's Workbench) tbl allows arbitrary non-alpha characters between options. 1999-09-11 Paul Eggert Y2k fixes. Don't assume that the current year precedes 2000. * doc/meref.me: Add \n(y2, \n(y4. * tmac/doc-common (Yr): New number register. (Dd): Don't assume current year precedes 2000. * tmac/tmac.e (td): Likewise. (y2, y4): New number registers. * pic/pic.man: Update reference for pic paper to May, 1991 version. 1999-09-11 Werner LEMBERG * tmac/Makefile.sub (install_data, stamp-wrap, uninstall_sub): Removed quotation marks which prevented correct expansion of $(tmac_wrap). * devlj4/Makefile.sub (LJ4RES): Fixed value (600 instead of 300). 1999-09-10 Werner LEMBERG * Makefile.sub (DISTCLEANFILES): Added `config.log' and `config.cache'. * Removed configure.old. 1999-08-31 Werner LEMBERG * VERSION: Updated to 1.11.1 1999-05-27 Werner LEMBERG * doc/Makefile: changed `.PS' postfix to `.ps' for consistency. * tmac/Makefile.sub (install_data, stamp-wrap, uninstall_sub): added quotations around $(tmac_wrap) to avoid syntax error if variable is empty. * configure: Newly generated using autoconf 2.13. * Makefile.in (LDFLAGS): Set variable to @LDFLAGS@. Fri Aug 15 08:51:47 1997 Eric S. Raymond * README, PROJECTS, NEWS, INSTALL, VERSION, doc/Makefile. doc/pic.ms, groff/groff.man: Prepare for 1.11 release. No code changes. Documentation for pic added (doc/pic.ms). Sun Nov 26 11:45:13 1995 James Clark * Version 1.10 released. Fri Nov 24 09:56:16 1995 James Clark * afmtodit/afmtodit.pl: Avoid comment on first line. Mon Nov 20 11:13:49 1995 James Clark * aclocal.m4 (GROFF_INSTALL_SH): New macro. * configure.in: Call it. * Makefile.sub (configure): Depends on aclocal.m4 not acgroff.m4. (distfiles): Doesn't depend on config.log or config.cache. Sun Oct 1 08:45:36 1995 James Clark * grog/grog.sh: Use print "" rather than print in END rule. Wed Aug 23 13:30:52 1995 James Clark * tbl/main.cc (process_data): Don't give error for excess data entries that are comments. Fri Jul 28 11:00:27 1995 James Clark * tbl/main.cc (process_data): Fix case where new for-scope rules silently change meaning of code. Tue Jul 4 23:39:51 1995 James Clark * troff/env.cc (hyphenate): Loop over all consecutive sequences of non-zero hyphenation codes. Sat Jul 1 00:42:15 1995 James Clark * aclocal.m4 (GROFF_POSIX): Use conflicting declaration technique. Thu Jun 29 13:58:36 1995 James Clark * tmac/tmac.e (ip): Divert the tag so as to freeze the spaces. Tue Jun 27 12:30:16 1995 James Clark * tmac/tmac.andoc: Make it work in compatibility mode. * refer/token.h (token_info::is_range_sep): New function. * refer/token.cc (init_special_chars): Make \(en a RANGE_SEP. * refer/ref.cc (reference::output): More sophisticated check for multiple pages. * devps/prologue.ps (MANUAL): New procedure. * grops/ps.cc (main): New -m option. (usage): Include -m. (ps_printer::~ps_printer): Implement -m. * aclocal.m4 (GROFF_G): New macro. * configure.in: Call it. * Makefile.in (g): Provided by configure. * hpftodit/hpftodit.cc (basename): Rename to xbasename. * tmac/tmac.tty: Disable warning about bad fonts. Remove font translations. * Makefile.in (tmacpath): Don't include /usr/lib/tmac. (tmac_m, tmac_s): Deleted. (sys_tmac_prefix, tmac_wrap, tmac_prefix, tmac_an_prefix, tmac_s_prefix): New variables. (MDEFINES): Change accordingly. * Makefile.comm (.man.n): Use new TMAC_* variables. * configure.in (GROFF_TMAC): Call. * aclocal.m4 (GROFF_TMAC): Define. * tmac/Makefile.sub (stamp_wrap): New target. (install_data, uninstall_sub): Handle macro wrapping. Mon Jun 26 14:54:39 1995 James Clark * tbl/main.cc (main): Ignore -T option. Thu Jun 22 09:08:06 1995 James Clark * devlj4/generate/special.map: Add definition of \(nb. * tmac/tmac.dvi: Add definition of \(nb. * troff/dictionary.c (dictionary::dictionary): association::v gets initialized by association::association. * tmac/Makefile.sub: Avoid using temporary files when installing. * troff/env.cc (environment::set_font): Make bad font number a warning. * Makefile.in (fontpath): Remove $(prefix)/lib/font from fontpath. * Makefile.in (datadir): Use share rather than lib. * groff/groff.cc (basename): Rename to xbasename. Wed Jun 21 16:59:46 1995 James Clark * Makefile (CCLIBS): Don't use. * Makefile.ccpg: Likewise. * acgroff.m4: Rename to... * aclocal.m4: Modify extensively for autoconf 2. * configure.in: Likewise. * Makefile.in: Likewise. * groff/pipeline.c (const): Declare as empty if __STDC__ not defined. (xstrsignal): Check for definition of NSIG. Conditionalize on SYS_SIGLIST_DECLARED. Make return type const. Sat Jun 10 12:28:16 1995 James Clark * troff/input.cc (interpolate_macro): Rephrase missing space warning. Thu May 11 01:07:16 1995 Jason Merrill * addftinfo/addftinfo.cc, eqn/delim.cc, eqn/lex.cc, eqn/list.cc, grodvi/dvi.cc, groff/groff.cc, grops/ps.cc, grops/psrm.cc, grotty/tty.cc, include/ptable.h indxbib/indxbib.cc, libbib/index.cc, libbib/linear.cc, libbib/search.cc, libdriver/input.cc, libdriver/printer.cc, libgroff/font.cc, libgroff/lf.cc, libgroff/nametoindex.cc, libgroff/ptable.cc, libgroff/string.cc, lkbib/lkbib.cc, lookbib/lookbib.cc, pic/lex.cc, pic/object.cc, pic/pic.y refer/label.y refer/ref.cc, refer/refer.cc, refer/token.cc, tbl/main.cc, tbl/table.cc, tfmtodit/tfmtodit.cc, troff/dictionary.cc, troff/div.cc, troff/env.cc, troff/input.cc, troff/node.cc, troff/symbol.cc: Fix 'for' scoping. Wed Apr 19 21:15:11 1995 James Clark * troff/input.cc (spring_trap): Push a macro_iterator rather than a string_iterator. (spring_trap, postpone_traps, unpostpone_traps): Move to later in file. (macro_iterator::macro_iterator): Add additional argument. Mon Apr 10 12:06:02 1995 James Clark * troff/div.cc (vertical_size::vertical_size): In place of integer specifying line spacing use cunits specifying post vertical space. (macro_diversion::output, top_level_diversion::output): Likewise. * troff/div.h: Change declarations accordingly. * troff/env.cc (pending_output_line): Replace ls field by post_vs field. (pending_output_line::pending_output_line, pending_output_line::output, environment::output, environment::output_line, environment::output_title, environment::hyphenate_line): In place of integer specifying line spacing use cunits specifying post vertical space. (environment::environment): Add post_vertical_spacing and prev_post_vertical_spacing arguments. (environment::get_post_vertical_spacing): New function. (environment::total_post_vertical_spacing): New function. (environment::post_vertical_spacing): New function. (init_env_requests): Initialize pvs request and .pvs register. * troff/env.h: Change declarations. Tue Mar 28 09:52:07 1995 James Clark * tmac/tmac.pspic: Immediately remove the temporary file. Sat Mar 25 10:43:11 1995 James Clark * tmac/tmac.pspic (PSPIC): Scale graphic uniformly even when height is specified. Thu Jan 26 16:20:13 1995 James Clark * tbl/table.c (struct vertical rule, class table_entry): Use int not short for start_row and end_row. Fri Jan 13 13:53:05 1995 James Clark * troff/input.cc (trapping_blank_line, blank_line_macro): New functions. (diverted_space_node::reread, process_input_stack): Call trapping_blank_line() rather than blank_line(). (init_input_requests): Bind "blm" to blank_line_macro(). * tmac/tmac.s (XA): Use .br and par@reset rather than XA. Tue Jan 10 11:40:35 1995 James Clark * troff/env.cc (environment::possibly_break_line): Require that width total excluding width of final space node be greater than the target text length. Tue Jan 3 09:13:37 1995 James Clark * troff/node.cc (kern_pair_node::vertical_extent): New function. Sun Dec 4 13:19:07 1994 James Clark * troff/node.cc (charinfo_node): New class. (glyph_node, composite_node): Derive from charinfo_node. Change member functions accordingly. Wed Nov 30 10:29:29 1994 James Clark * nroff/nroff.sh: Use -Tlatin1 not -TLatin1. Mon Aug 8 10:17:59 1994 James Clark (jjc@jclark.com) * tmac/tmac.tty-char: Add definitions for \(ab and \[arrowvertex]. * devps/generate/textmap (notsubset): Add. * tmac/tmac.a4: New file. Sun Jul 24 20:08:42 1994 James Clark (jjc@jclark.com) * pic/main.cc (had_parse_error): New variable. (do_picture, do_whole_file): Set had_parse_error if yyparse() returns non-zero. (main): Return 1 if had_parse_error is true. Tue Jul 19 13:40:31 1994 James Clark (jjc@jclark.com) * grolj4/lj4.cc (main): Avoid use of strtoul. Mon Jul 18 15:03:02 1994 James Clark (jjc@jclark.com) * nroff/nroff.sh: Default device is -Tlatin1 if $LC_CTYPE is iso_8859_1 or $LESSCHARSET is latin1. Sun Jul 10 13:38:35 1994 James Clark (jjc@jclark.com) * hpftodit: New directory. * Makefile.in (CCPROGDIRS): Add hpftodit. * devlj4/generate: New directory. Thu Jul 7 23:49:48 1994 James Clark (jjc@jclark.com) * configure.in: Don't use AC_VFORK. * groff/pipeline.c (run_pipeline): Use fork() always. Wed Jul 6 11:13:17 1994 James Clark (jjc@jclark.com) * grops/ps.cc (main): Use %1 not %s in error message for -w. * Makefile.in (CCPROGDIRS): Add grolj4. (DEVDIRS): Add devlj4. * grolj4, devlj4: New directories. * tmac/troffrc: Handle lj4. * tmac/tmac.lj4: New file. Fri Jun 17 18:02:53 1994 James Clark (jjc@jclark.com) * tmac/tmac.e (@n): Set indent to 0 before calling |h. Wed Jun 1 07:33:47 1994 James Clark (jjc@jclark.com) * troff/input.cc (do_if_request): At end of second string, switch environments before getting next token. Fri May 20 07:39:18 1994 James Clark (jjc@jclark.com) * devps/psstrip.sed: Split rule that strips whitespace on either side of delimiters. Wed May 18 08:13:47 1994 James Clark (jjc@jclark.com) * troff/node.h (font_family::make_definition): Add return value to declaration. * troff/symbol.h (symbol::operator==, symbol::operator!=): Likewise. Tue May 17 20:46:06 1994 James Clark (jjc@jclark.com) * groff/groff.cc (main, help, synopsis): Handle -S. (possible_command::insert_arg): New function. * tmac/tmac.safer: New file. * tmac/msafer.man: New file. * tmac/Makefile.sub (FILES): Add tmac.safer and msafer.man. Thu Mar 10 01:58:30 1994 Paul Eggert (eggert@twinsun.com) * pic/pic.h, pic/main.cc (safer_flag): New variable. * pic/pic.y (placeless_element): Avoid unsafe operations if `safer_flag' is set. * pic/main.cc (main): Add -S option, which sets `safer_flag'. Tue May 10 13:02:31 1994 James Clark (jjc@jclark.com) * eqn/lex.cc (get_token): Put call to add_context() in block to work around Sun C++ 4.0 bug. * include/stringclass.h (operator +): Use ?: instead of `if' to work around Sun C++ 4.0 bug. Thu May 5 11:18:03 1994 James Clark (jjc@jclark.com) * tbl/main.cc (process_format): Accept - as a synonym for the _ key letter. * libbib/index.cc (minus_one): Don't declare as const. Fri Apr 29 09:32:48 1994 James Clark (jjc@jclark.com) * troff/input.cc (get_char_for_escape_name): Push back a newline. Wed Apr 27 21:14:18 1994 James Clark (jjc@jclark.com) * troff/input.cc (write_macro_request): New function. (init_input_requests): Bind write_macro_request to writem. Sun Apr 17 11:15:38 1994 James Clark (jjc@jclark.com) * tmac/tmac.s (@EN): Turn filling back on even if there was no equation. * eqn/lex.cc (do_space): Supply missing argument to lex_error. * tmac/tmac.s (@TS): Renamed from TS. (TS): Call LP then TS again. (cov*ab-init): Alias @TS to TS. * tmac/tmac.s: Allow QP or RS to initialize. * tmac/tmac.s (par@load-init): New macro. Call at end of file. Move initializations of PS and LL here. (par@init): Don't initialize HY. Avoid changing environment 0. (par*env-init): Don't all par@reset. Thu Apr 14 19:15:45 1994 James Clark (jjc@jclark.com) * include/posix.h: Include only if not using . Sun Apr 10 09:54:44 1994 James Clark (jjc@jclark.com) * Makefile.in (MDEFINES): Add LDFLAGS. (LDFLAGS): Add definition line. Thu Apr 7 22:22:22 1994 James Clark (jjc@jclark.com) * troff/input.cc (get_optional_char): Split off error check into... (check_missing_character): New function. * troff/token.h: Declare it. * troff/env.cc (margin_character): Don't call get_optional_char. Only call tok.next() after making the node. * include/lib.h (getopt): Make 2nd argument char *const *. Fri Mar 11 07:28:03 1994 James Clark (jjc@jclark.com) * nroff/conftest.sh: Deleted. Fri Mar 4 10:51:36 1994 James Clark (jjc@jclark.com) * pic/make-dos-dist: Deleted. Wed Mar 2 20:59:16 1994 James Clark (jjc@jclark.com) * devps/psstrip.sed: Strip comments before stripping trailing white space. Sat Feb 19 13:07:16 1994 James Clark (jjc@jclark.com) * Version 1.09 released. Wed Feb 16 16:53:49 1994 James Clark (jjc@jclark.com) * tmac/doc-ditroff (hK): Don't reset page number if \nC is > 0. Mon Feb 14 08:26:40 1994 James Clark (jjc@jclark.com) * libgroff/font.cc (font::load_desc): Fix typo in error message. Sun Feb 13 09:37:38 1994 James Clark (jjc@jclark.com) * libgroff/new.cc (operator new): Rewrite so as to avoid warning about returning without a value. * troff/charinfo.h (charinfo::get_special_translation): Cast TRANSLATE_NONE to int. * refer/token.cc (lookup_token, store_token): Remove bogus loop test. Fix test so that it works with n unsigned. * pic/pic.y (defaults_table): Fully bracket initializer. * pic/lex.cc (lookup_keyword): Likewise. * eqn/lex.cc (token_table, def_table): Likewise. * eqn/box.cc (param_table): Likewise. * troff/input.cc (warning_table): Likewise. * libgroff/font.cc (table): Likewise. * grops/ps.cc (ps_printer::special): Likewise. * grops/psrm.cc (resource_manager::process_file): Likewise. * tfmtodit/tfmtodit.cc (lig_chars, lig_table): Likewise. * refer/command.cc (command_table): Likewise. * addftinfo/addftinfo.cc (param_table): Likewise. * troff/symbol.cc (symbol::symbol): Prevent compiler warnings about temp's being unused. (unused): New function. * groff/pipeline.cc: Declare c_fatal. * libbib/linear.cc (bmpattern::search): Cast patterrn[--j] to uchar. * libbib/index.cc (index_search_item::load): Prevent compiler warnings about fd_closer's being unused. (unused): New function. Sat Feb 12 10:31:59 1994 James Clark (jjc@jclark.com) * troff/input.cc (copy_mode_error): Make `prefix' static. Fix typo. * include/posix.h: Include is HAVE_CC_OSFCN_H is defined. * acgroff.m4, configure.in, Makefile: Rename HAVE_CC_UNISTD_H to HAVE_CC_OSFCN_H and modify accordingly. * troff/input.cc (init_charset_table): radicalex overlaps horizontally. * groff/acgroff.m4 (GROFF_ISC_SYSV3): New macro (from udodo!hans@relay.NL.net). * groff/configure.in: Call it. * groff/acgroff.m4 (GROFF_PCLOSE): New macro. * groff/configure.in: Call it. * include/lib.h: Conditionalize declaration of pclose. * troff/div.cc (last_page_number): New global variable. (top_level_diversion::begin_page): Exit if we just printed the last page. * troff/div.h (last_page_number): Declare it. * troff/input.cc (parse_output_page_list): Set last_page_number. * eqn/sqrt.cc: Rename \(rn to \[radicalex]. * devps/S, devps/textmap, tmac/tmac.ps, tmac/tmac.dvi, tmac/tmac.X: Likewise. * tmac/tmac.ps, tmac/tmac.X, tmac.dvi: Add definitions of \(rn. * tmac.dvi: Make \(ru and \(ul extend beyond their width by .04m. Fri Feb 11 11:45:40 1994 James Clark (jjc@jclark.com) * tmac/doc-ditroff (hK): Remove groff specific code which prevented page-breaks between separate manual entries. If this is the first page, don't set the page number to 1. * acgroff.m4 (GROFF_POSIX): New macro. * configure.in: Use it. * troff/node.cc (class real_output_file, real_output_file::real_output_file, real_output_file::~real_output_file): Conditionalize use of popen/pclose on POPEN_MISSING. * troff/node.h: Conditionalize pipe_command on POPEN_MISSING. * troff/input.cc (pipe_command): Give an error if POPEN_MISSING. (pipe_source): Similarily. * acgroff.m4 (GROFF_PROG_CCC): Update message about libg++. * acgroff.m4 (GROFF_GETOPT, GROFF_PUTENV, GROFF_POPEN): Detect presence of declarations by trying to compile example with conflicting declarations. (gcc only gives a warning for missing declarations.) Wed Feb 9 09:12:23 1994 James Clark (jjc@jclark.com) * tmac/tmac.pspic (PSPIC): Allow options to specify alignment (from Ulrich Lauther). Tue Feb 8 03:56:40 1994 James Clark (jjc@jclark.com) * libbib/linear.cc (file_buffer::load): Use S_ISREG macro. Thu Feb 3 09:34:35 1994 James Clark (jjc@jclark.com) * indxbib/indxbib.cc (write_hash_table): Add code for case where pointers and ints have different sizes. Sun Jan 9 16:17:51 1994 James Clark (jjc@jclark.com) * tmac/tmac.s (par*env-init): Call par@reset. Fri Jan 7 10:24:27 1994 James Clark (jjc@jclark.com) * tmac/tmac.s (@IP): Switch to a new environment when diverting tag. (par*push-tag-env, par*pop-tag-env): New macros. Wed Jan 5 21:18:34 1994 James Clark (jjc@jclark.com) * grops/ps.cc (ps_printer::ps_printer): Use MAX_LINE_LENGTH for initializing `out'. Reduce MAX_LINE_LENGTH from 79 to 72. * grops/ps.cc (ps_printer::~ps_printer): Output %%CreationDate comment. Include . Wed Dec 15 14:14:00 1993 James Clark (jjc@jclark.com) * grops/ps.cc (is_small_h, is_small_v): Deleted. (ps_printer::flush_sbuf): Use absolute motion only at beginning of lines. Tue Dec 14 10:06:34 1993 James Clark (jjc@jclark.com) * troff/input.cc (read_request): Only print a prompt if reading from the terminal. Also clearerr on EOF if reading from the terminal. Declare isatty. Mon Nov 29 08:38:15 1993 James Clark (jjc@jclark.com) * refer/label.y: Rename map_t to map_func and extractor_t to extractor_func. Sat Oct 30 06:38:12 1993 James Clark (jjc@jclark.com) * include/assert.h: Don't use volatile. * libgroff/assert.cc: Likewise. Fri Oct 29 15:00:23 1993 James Clark (jjc@jclark.com) * troff/input.cc (abort_request): Look at character in tok before calling get_copy(). Thu Oct 28 14:09:48 1993 James Clark (jjc@jclark.com) * troff/troff.h (NO_RETURN): Deleted. * troff/div.cc (cleanup_and_exit): Don't declare aas NO_RETURN. * troff/input.cc (exit_troff): Likewise * Makefile.in: Remove `Making ...' messages since GNU make now gives these. * configure.in: Use AC_HAVE_HEADERS(unistd.h) instead of AC_UNISTD_H. Wed Oct 27 11:12:51 1993 James Clark (jjc@jclark.com) * tmac/tmac.s (@init): Initialize PO to \n(.o here, rather than to constant 1 inch. Sat Oct 23 10:03:52 1993 James Clark (jjc@jclark.com) * tmac/tmac.e (hl): Use \n[.in] rather than \n(.i. Thu Oct 14 12:09:45 1993 James Clark (jjc@jclark.com) * eqn/delim.cc (delim_box::compute_metrics): Don't increase MARK_REG if there was no left delimiter. Sat Oct 2 19:54:47 1993 James Clark (jjc@jclark.com) * pic/troff.cc (troff_output::text): Set line thickness to relative before outputting text. * tmac/tmac.e (@k): Don't zero ?T. ((z): Likewise. Sat Sep 25 11:08:43 1993 James Clark (jjc@jclark.com) * tmac/tmac.e ($p): Handle possibility that $3 is empty. Wed Aug 18 08:51:41 1993 James Clark (jjc@jclark.com) * troff/input.cc (decode_args): Warn about unquoted tabs (from Paul Eggert). Tue Aug 10 08:38:32 1993 James Clark (jjc@jclark.com) * troff/input.cc (ignoring): New variable. (ignore): Set ignoring during call to do_define_macro. (do_define_macro): Clear ignoring before interpolating terminating macro. (copy_mode_error): New function. (get_char_for_escape_name, read_long_escape_name, interpolate_arg): Use copy_mode_error. (warning_table): Add WARN_IG. * troff/troff.h (WARN_IG): Declare. (WARN_TOTAL): Change accordingly. * groff/pipeline.c (strsignal): Rename to xstrsignal. * groff/groff.cc (strsignal): Delete declaration. Fri Jul 16 01:43:12 1993 James Clark (jjc@jclark.com) * troff/div.cc (page_offset): Use 'm' as default scaling. Sat Jul 3 09:11:38 1993 James Clark (jjc@jclark.com) * nroff/nroff.sh: Ignore -u. Wed Jun 9 12:17:27 1993 James Clark (jjc@jclark.com) * Makefile.in (MDEFINES): Pass down MAKEOVERRIDES. Fri Jun 4 17:35:47 1993 James Clark (jjc@jclark.com) * tmac/tmac.s (par*box-draw): Set adjustment mode to l while drawing box. (B2): With -Tascii, leave additional vertical space before and after. Ensure that the left and right indent is restored to what it was even if the point size changes. Don't call par@finish. Change the indent, line length and title length directly. With -Tascii, make the width of the box 1n less. (B1): Remember 1n at the current point size. Don't call par@reset. Change the indent, line length and title length directly. Ensure that the temporary indent is preserved. (par*box-mark-top): Turn off no spacing mode. Thu Jun 3 17:47:14 1993 James Clark (jjc@jclark.com) * Makefile.in (dist): Use .gz suffix. Thu May 27 20:04:59 1993 James Clark (jjc@jclark.com) * troff/input.cc (main): Add return 0. * pic/main.cc (main): Use return instead of exit. * tbl/main.cc (main): Likewise. * eqn/main.cc (main): Likewise. * grops/ps.cc (main): Likewise. * grotty/tty.cc (main): Likewise. * groff/groff.cc (main): Likewise. * grodvi/dvi.cc (main): Likewise. * refer/refer.cc (main): Likewise. * indxbib/indxbib.cc (main): Likewise. * lkbib/lkbib.cc (main): Likewise. * soelim/soelim.cc (main): Likewise. * addftinfo/addftinfo.cc (main): Likewise. * acgroff.m4 (GROFF_PROG_CCC, GROFF_CC_COMPILE_CHECK, GROFF_COOKIE_BUG, GROFF_CC_ANSI_BUG): Likewise. * troff/token.h (process_input_stack): Don't declare as static. * troff/input.cc: Likewise. * troff/node.c (invalidate_fontno): Make it a static member of class font_family. Change callers. * troff/node.c: Change declaration. * tbl/main.cc (struct input_entry_format): Add explicit public specifier. * tbl/table.cc (struct text_stuff, struct single_hline_stuff, struct double_hline_stuff): Likewise. * tbl/table.h (struct entry_format): Likewise. * pic/object.h (struct saved_state): Likewise. * include/stringclass.h: Add forward declarations of friend functions that are later declared as inline. Don't include inline specifier in friend declaration. * libgroff/lib.h: Declare popen and pclose. * acgroff.m4 (GROFF_POPEN): New macro. * configure.in: Call it. * include/lib.h (PI): New constant. Undef first if necessary. * tfmtodit/tfmtodit.cc (main): Use PI rather than M_PI. * grops/ps.cc (degrees, radians): Likewise. * libgroff/font.cc (font::get_skew): Likewise. * grops/ps.cc (is_ascii): New function. (ps_output::put_string): Use is_ascii. Use csprint rather than isprint. (ps_printer::define_encoding): Use csspace. * libgroff/strtol.c (ISASCII): New macro. (strtol): Cast arguments to is*() and tolower() to unsigned char. Use ISASCII rather than isascii. * libgroff/cmap.cc: Use isascii() only if defines it. * libgroff/cset.cc: Likewise. * libdriver/input.cc: Include cset.h. (do_file, get_integer, possibly_get_integer): Use csdigit() rather than isdigit(). * refer/refer.cc (main): Use %ld rather than %d for longs. * libbib/index.cc (index_search_item_iterator::get_tag): Use S_ISREG macro. * addftinfo/addftinfo.cc (param_t): Add explicit `int'. Mon May 24 08:51:37 1993 James Clark (jjc@jclark.com) * troff/input.cc (hyphenation_code): Skip white space between char/code pairs. Sun May 16 08:15:52 1993 James Clark (jjc at jclark.com) * tbl/table.h (table::entry_list_tailp): New member. (table::table): Initialize it. (table::add_entry): Use entry_list_tailp to avoid O(n^2) behaviour. Sat May 15 17:26:00 1993 James Clark (jjc at jclark.com) * grotty/tty.cc (tty_printer::add_char): Don't discard characters with negative horizontal positions. Remove casts of glyph::hpos to int. (USHRT_MAX): Delete definition. (SHRT_MAX, SHRT_MIN): New definitions. (glyph::hpos): Change type to short. (tty_printer::end_page): Output multiple backspaces if necessary. Remove casts of glyph::hpos to int. Fri May 7 12:14:37 1993 James Clark (jjc at jclark.com) * tmac/tmac.s (@RT): New definition. Thu May 6 21:36:54 1993 James Clark (jjc at jclark.com) * refer/refer.cc (do_file): Make sure current_filename is set when filename is "-". * pic/common.cc (common_output::dot_line): Handle zero length lines. Sun May 2 19:54:16 1993 James Clark (jjc at jclark.com) * tmac/tmac.s (par@reset): Get value for .hy for \n[HY]. (par@init): Initialize \n[HY]. Mon Apr 26 11:43:16 1993 James Clark (jjc at jclark.com) * troff/dictionary.cc (dictionary::remove): Continue when r < j < i. Sun Apr 25 11:03:00 1993 James Clark (jjc at jclark.com) * Makefile.com (.y.cc): Avoid ending up with two versions of $(YTABH). Thu Apr 22 21:03:45 1993 James Clark (jjc at jclark.com) * tmac/tmac.dvi (\(,c): Define only if it does not exist. (\(,C): Likewise. Also fix typo. Wed Apr 21 08:47:32 1993 James Clark (jjc at jclark.com) * lib.h: Delete extraneous semi-colon. * Add pso request: `so' from a pipe. * troff/input.c (file_iterator::file_iterator): Add 3rd argument. (file_iterator::close): New function. (file_iterator::~file_iterator, file_iterator::next_file): Use file_iterator::close. (file_iterator::backtrace): Say `process' rather than `file' when the stream is popened. (pipe_source): New function. (init_input_requests): Bind ".pso" to pipe_source. Tue Apr 20 00:02:26 1993 James Clark (jjc at jclark.com) * afmtodit/afmtodit.pl: Avoid single quotes in comments. * pfbtops/pfbtops.c: Output 64 characters per line. Output hex digits in lower case. Mon Apr 19 09:55:57 1993 James Clark (jjc at jclark) * Version 1.08 released. * Makefile.in (dist): Insert || true after ln -s commands that might fail. * mm: Update to mm 1.16. * acgroff.m4 (GROFF_CSH_HACK): New macro. * configure.in: Call GROFF_CSH_HACK. Substitute for SH_SCRIPT_SED_CMD. * Makefile.in (SH_SCRIPT_SED_CMD): New variable. Include in MDEFINES. * nroff/Makefile.sub (nroff): New target. (install_data): Install nroff. * eqn/Makefile.sub (neqn): Sed with SH_SCRIPT_SED_CMD. * grog/Makefile.sub (grog): Sed grog.sh with SH_SCRIPT_SED_CMD. Sat Apr 17 08:24:28 1993 James Clark (jjc at jclark) * eqn/Makefile.sub (neqn): Add chmod +x. * grog/Makefile.sub (grog): Remove spurious semi-colon. Fri Apr 16 22:41:57 1993 James Clark (jjc at jclark) * troff/input.cc (string_iterator::string_iterator()): Initialize lineno and count. Tue Apr 13 10:22:28 1993 James Clark (jjc at jclark) * troff/div.cc (macro_diversion::space, top_level_diversion::space): Don't set high_water_mark. (macro_diversion::output, top_level_diversion::output): Don't include post line space in high water mark. Wed Apr 7 12:48:18 1993 James Clark (jjc at jclark) * eqn/eqn.y: Don't define YYDEBUG. * pic/pic.y: Likewise. Mon Apr 5 10:15:15 1993 James Clark (jjc at jclark) * tmac/tmac.e ([3): Add space after comma following editors. Change double spaces to single spaces. ([4): Change double spaces to single spaces. * grops/ps.h (USE_PS_ADOBE_2_0): New flag for broken_flags. * grops/ps.cc (ps_printer::~ps_printer): If the USE_PS_ADOBE_2_0 bit is set in broken_flags, use 2.0 rather than 3.0 as the version after %!PS-Adobe- (for Newsprint). * troff/div.cc (top_level_diversion::begin_page): When before_first_page is 1, set page_number to 1. Sun Apr 4 14:28:53 1993 James Clark (jjc at jclark) * eqn/box.cc (box::top_level): Protect equation with \&. Sat Apr 3 23:27:25 1993 James Clark (jjc at jclark) * groff/groff.cc (possible_command::set_name): Delete old name. * groff/groff.cc (possible_command::~possible_command): Use a_delete. * troff/node.cc (troff_output_file::begun_page): New member. (troff_output_file::troff_output_file): Initialize it. (troff_output_file::really_begin_page): Only output V command if a page has been begun. * pic/pic.y (placeless_element): Delete argument to PRINT after use. Fri Apr 2 11:31:02 1993 James Clark (jjc at jclark) * Make wrapman work. * troff/div.h (class top_level_diversion): Replace first_page_begun by before_first_page (with opposite sense). * Change first_page_begun to before_first_page inverting sense. * troff/div.cc (class nl_reg): New class. (init_div_requests): Use class nl_reg for \n(nl. (top_level_diversion::begin_page): Don't call output_file::begin_page if before_first_page is 2; reset before_first_page afterwards. If have_next_page_number is false, then always increment page_number. * tmac/tmac.an: Set traps within TH rather than at the top-level. Restore compatibility mode after loading, and then disable compatibility mode in TH. Thu Apr 1 11:09:34 1993 James Clark (jjc at jclark) * grotty/tty.cc (tty_printer::end_page): Don't discard characters past last line. * troff/node.h (output_file::trailer): Declare. * troff/div.cc (cleanup_and_exit): Call output_file::trailer(). * troff/node.cc (output_file::trailer): New function. (troff_output_file::~troff_output_file): Move most code into... (troff_output_file::trailer): New function. (class troff_output_file): Delete page_length member. Declare trailer(). (troff_output_file::really_begin_page): Use current page length for final V command. * tbl/main.cc (struct options): New decimal_point_char member. (options::options): Initialize this. (process_options): Implement decimalpoint option. (process_data): Pass decimal_point_char option to table::table. * tbl/table.h (class table): New decimal_point_char member. (table::table): Add additional argument. * tbl/table.cc (find_dot): Rename to find_decimal_point. Add second argument specifying decimal point character. Use this instead of '.'. (table::table): Initialize decimal_point_char. (table::add_entry): Change call to find_dot. * troff/input.cc (get_copy, token::next): Implement \V. (interpolate_environment_variable): New function. Tue Mar 30 14:41:39 1993 James Clark (jjc at jclark) * pic/lex.cc (lookup_keyword): Rename MIN to K_MIN, MAX to K_MAX. * pic/pic.y: Likewise. * grotty/tty.cc (tty_printer::add_char, tty_printer::end_page): Add casts to int. * refer/ref.cc (reference::insert_field, reference::delete_field): Likewise. * troff/number.cc (parse_term): Likewise. * acgroff.m4 (GROFF_PROG_YACC): New macro. * configure.in: Use GROFF_PROG_YACC. * acgroff.m4 (GROFF_PROG_CCC): Don't add -O automatically for gcc and g++. * Makefile.in (OPTIMIZE): New define. (DEBUG): Empty by default. (CCFLAGS, CFLAGS): Include $(OPTIMIZE). * acgroff.m4 (GROFF_SYS_SIGLIST): Don't quote program. (GROFF_ARRAY_DELETE): Likewise. (GROFF_CC_COMPILE_CHECK): Quote use of $2 and $3. * troff/env.cc (trie::~trie): Make virtual to shut up g++. * devps/psstrip.sed: Use different delimiter on last line (so that it works with BSD 4.4 sed.) Mon Mar 29 17:07:14 1993 James Clark (jjc at jclark) * devps/psstrip.sed: Delete comments. * acgroff.m4 (AC_GETOPT): Don't test whether declares optind, opterr, optarg. * lib.h: When UNISTD_H_DECLARES_GETOPT is defined, declare optind, opterr, optarg. Sun Mar 28 17:44:25 1993 James Clark (jjc at jclark) * Makefile.in (check): Dummy target. Wed Mar 3 04:53:38 1993 James Clark (jjc at jclark) * Version 1.07 released. * Integrate mm 1.11. * tbl/table.cc (alphabetic_block_entry::print): start_row was used where start_col was meant. Thu Feb 25 07:55:36 1993 James Clark (jjc at jclark) * grog/grog.sh, grog/grog.pl: Recognize PH and SA as -mm macros. Wed Feb 24 10:15:34 1993 James Clark (jjc at jclark) * troff/input.cc (token::next): Make \z\o'...' and similar things work. * env.h (MARGIN_CHARACTER_ON, MARGIN_CHARACTER_NEXT): New constants. (environment): Add margin_character_flags member. * env.cc (environment::environment(symbol), environment::environment(const environment *): Initialize margin_character_flags. (margin_character): Rewrite. (environment::output_line): Add a margin character if margin_character_flags is non-zero. Turn off the MARGIN_CHARACTER_NEXT bit. If that makes margin_character_flags zero, use margin_character_node without copying and then set margin_character_node to 0. * devps/DESC.in: Change minimum size to 1000. Tue Feb 23 14:57:49 1993 James Clark (jjc at jclark) * troff/symbol.h (symbol::hash): Change return type to unsigned long. * troff/dictionary.cc (dictionary::lookup, dictionary::remove): Add casts to int. * test-groff: Use -r rather than -x. * grops/psfig.diff: Include in distribution again. Mon Feb 22 09:10:44 1993 James Clark (jjc at jclark) * Makefile.in (dist): Use gzip. Sun Feb 21 11:12:53 1993 James Clark (jjc at jclark) * acgroff.m4 (GROFF_GETOPT): Check for declaration of getopt() in unistd.h as well as in stdlib.h. * include/lib.h: Include is STDLIB_H_DECLARES_GETOPT is defined; otherwise include and if UNISTD_H_DECLARES_GETOPT is defined. * configure.in: use builtin(include, ... rather than include(... * configure: Regenerate with autoconf 1.3. * libdriver/print.cc (printer::adjust_arc_center): Use new algorithm suggested by Andy Fyfe. * libdriver/printer.cc (printer::adjust_arc_center): New function. * include/printer.h: Declare this. * grops/ps.cc (ps_printer::draw): Use it. * grodvi/dvi.cc (dvi_printer::draw): Use it. Fri Feb 19 23:13:51 1993 James Clark (jjc at jclark) * Makefile.comm (.man.n): Replace macrodir by tmacdir. Thu Feb 11 16:46:59 1993 James Clark (jjc at jclark) * eqn/main.cc (main): Handle "eqn -". Mon Jan 4 20:29:56 1993 James Clark (jjc at jclark) * tmac/tmac.e (++): Install fix from comp.bugs.4sd. * mm: Integrate version 1.08. * pic/troff.cc (troff_output::finish_picture): Set EQN_NO_EXTRA_SPACE reg to 0 rather than removing it. * eqn/box.cc (box::extra_space): Set EQN_NO_EXTRA_SPACE_REG to 0 if it's not defined. Check whether the register is non-zero rather than whether it's not defined. * tmac.e ({, <): Make argument to \x zero if \n(0x is non-zero. * indxbib/indxbib.cc: Move all signal handling into... * indxbib/signal.c: New file. * configure.in: Call AC_RETSIGTYPE. * acgroff.m4 (GROFF_STRUCT_EXCEPTION): New macro. * configure.in: Call GROFF_STRUCT_EXCEPTION. * libgroff/matherr.c: Protect with ifdef HAVE_STRUCT_EXCEPTION. * troff/input.cc (token::token, token::operator=): Work round SGI C++ bug. * pic/object.cc (position::position): Likewise. Mon Dec 28 21:50:21 1992 James Clark (jjc at jclark) * pic/pic.h: Move declaration of hypot(). Wed Dec 16 12:28:29 1992 James Clark (jjc at jclark) * pic/pic.h: Declare hypot(). * pic/pic.h: Define M_PI if necessary. Thu Dec 10 12:03:29 1992 James Clark (jjc at jclark) * tmac/tmac.e (re): Add alternative version that doesn't use groff `.ta T' feature. * devps/prologue.ps (RE): Handle the possibility that the old font doesn't have a FontName entry. Wed Dec 2 10:25:29 1992 James Clark (jjc at jclark) * tmac/tmac.e (fam): Redefine to set family in environment 2. (@C): Use @fam not fam. Thu Nov 26 16:01:25 1992 James Clark (jjc at jclark) * lookbib/lookbib.cc (main): Change type of start to const char *. * lkbib/lkbib.cc (main): Likewise. * eqn/lex.cc (definition::definition): Don't use member initializer syntax for members of anonymous unions. * troff/input.cc (input_stack::backtrace): Change type of to const char *. Wed Nov 25 13:43:09 1992 James Clark (jjc at jclark) * include/stringclass.h (class string): Declare inline friend functions as inline in class declaration. * troff/hvunits.h (class hunits, class vunits): Likewise. * include/refid.h (class reference_id): Likewise * troff/troff.h (points_to_units(units), scale(units, double)): Delete declarations. * libdriver/input.cc (get_char): Delete declaration. * include/lib.h: Change 2nd argument of getopt from const char ** to char **. * troff/symbol.cc (symbol::symbol): Cast `new char *[n]' to `const char **' before assigning to a `const char **'. * tbl/table.cc: Delete extra declarations of prints(). Tue Nov 24 14:33:13 1992 James Clark (jjc at jclark) * libgroff/font.cc (font::load_desc): Cast `new char *[n]' to `const char **' before assigning to a `const char **'. * libgroff/errarg.cc (errarg::errarg): Don't use member initializer syntax for members of anonymous unions. Sat Nov 21 05:02:23 1992 James Clark (jjc at jclark) * mm: Integrate version 1.07. Tue Nov 17 16:44:27 1992 James Clark (jjc at jclark) * troff/input.c (translate2): Rename to (translate_no_transparent). (init_input_requests): Rename tr2 to trnt. Mon Nov 16 09:49:32 1992 James Clark (jjc at jclark) * troff/charinfo.h (class charinfo): Add transparent_translate field. (charinfo::set_translation, charinfo::set_special_translation): Add second argument that specifies value for transparent_translate. (charinfo::get_translation, charinfo::get_special_translation): Add optional second argument that specifies whether translation is being used for transparent throughput. * troff/input.cc (charinfo::set_translation, charinfo::set_special_translation): Handle second argument. (charinfo::charinfo): Initialize transparent_translate. (translate): Split main part off into (do_translate): New function. Pass argument saying whether translation applies to transparent throughput. (translate2): New request. (init_input_requests): Bind translate2 to `tr2'. Wed Nov 11 11:43:20 1992 James Clark (jjc at jclark) * tbl/table.h (class table): Add `nokeep' flag. * tbl/main.cc (process_options): Handle `nokeep' option. * tbl/table.cc (table::init_output, table::do_row, table::do_top, table::do_bottom): Don't output keep/release macro definitions or calls when `nokeep' option has been specified. Sat Nov 7 01:28:33 1992 James Clark (jjc at jclark) * tmac/tmac.Xps (Xps-char): Use " as delimiter for \Z. Wed Nov 4 16:29:04 1992 James Clark (jjc at jclark) * tbl/table.cc (table_entry::divert, block_entry::do_divert, block_entry::divert, alphabetic_block_entry::divert): Add extra argument giving column separation. (table::compute_widths): Pass column separation to table_entry::divert(). (block_entry::do_divert): If an entry spans multiple columns and a minimumum width has been specified for each column, then set the line length to the sum of the widths (plus possibly the column separations). * troff/input.cc (set_escape_char): Don't set the escape_char until after calling has_arg(). Tue Nov 3 11:23:27 1992 James Clark (jjc at jclark) * tbl/table.cc (table::do_top): Add missing \s0 for double box case. * tbl/table.cc (table::print_double_hline): Avoid extra new line in case where r > nrows - 1. * tbl/table.cc (BODY_HEIGHT): Deleted. (LINE_SEP): New definition. (table::print_single_hline, table::print_double_hline, table::compute_vrule_top_adjust, table::compute_vrule_bot_adjust, table::do_row, table::do_top): Use LINE_SEP space before a line instead of \n[.v]-BODY_HEIGHT-BODY_DEPTH. * tbl/table.cc (text_entry::print_contents): New function. (text_string_name, right_text_string_name): Deleted. (TEXT_STRING, RIGHT_TEXT_STRING): Deleted. (simple_text_entry::do_width, numeric_text_entry::do_width, alphabetic_text_entry::do_width): Don't store the contents of the entry in a string. (left_text_entry::simple_print, right_text_entry::simple_print, center_text_entry::simple_print, alphabetic_text_entry::simple_print, numeric_text_entry::simple_print): Print the entry directly instead of using the stored string. Fri Oct 30 10:39:32 1992 James Clark (jjc at jclark) * devps/Makefile: Strip PostScript files. * devps/prologue: Rename to... * devps/prologue.ps. * devps/psstrip.sed: New file. * devps/download: Use .pfa rather than .ps for installed versions of fonts. Thu Oct 29 09:14:43 1992 James Clark (jjc at jclark) * troff/env.cc (input_trap): Give a warning if the argument is out of range. * troff/env.cc (adjust): Treat negative argument as missing. Round argument > 5 down to 5. * troff/env.cc (center, right_justify): Make negative argument zero. * troff/div.cc (page_offset, vertical_position_traps): Treat invalid argument as missing. * troff/env.cc (line_spacing, line_length, title_length, indent, underline, hyphen_line_max_request, control_char, no_break_control_char, widow_control_request, adjust, input_trap, point_size): Likewise. * troff/node.cc (ligature, kern_request, bold_font, track_kern, constant_space): Likewise. * troff/input.cc (compatible, shift, warn_request, set_escape_char): Likewise. * tbl/main.cc (format::format): Avoid doing `new int[0]'. * tbl/table.cc (table::table): Likewise. * Makefile.dev (install_dev): depends on $(DEVFILES). Wed Oct 28 08:30:57 1992 James Clark (jjc at jclark) * devX75, devX75-12, devX100, devX100-12: New directories. * Makefile.in: Add these to DEVDIRS. * troff/Makefile.sub, eqn/Makefile.sub, indxbib/Makefile.sub, afmtodit/Makefile.sub, tmac/Makefile.sub, nroff/Makefile.sub, grog/Makefile.sub, mm/Makefile.sub (uninstall_sub): New target. * Makefile.in (uninstall, uninstall_sub, uninstall_dirs): New targets. * Makefile.ccpg, Makefile.cpg, Makefile.dev, Makefile.man (uninstall): New target. * Makefile.comm (uninstall, uninstall_sub, uninstall_man, uninstall_prog, uninstall_dev): New targets. * troff/div.cc (return_request): Treat an invalid argument as missing. Mon Oct 26 11:33:47 1992 James Clark (jjc at jclark) * tmac/tmac.e ((f): Set up the environment even when there's a current diversion. Transperently throughput a call to @N. (@N): New macro. Thu Oct 22 05:05:59 1992 James Clark (jjc at jclark) * tbl/table.cc (table::compute_vrule_top_adjust): Round adjustment up to vertical resolution. * tbl/table.cc (table::do_row): Change row number after printing stuff list. * pic/lex.cc (get_token_after_dot): Make .left and .right work. Wed Oct 21 14:46:45 1992 James Clark (jjc at jclark) * Rename CHANGES to NEWS. Tue Oct 20 23:25:21 1992 James Clark (jjc at jclark) * libgroff/new.cc (operator new): Avoid calling malloc(0). Mon Oct 19 09:10:13 1992 James Clark (jjc at jclark) * man.ultrix: Removed. Sun Oct 18 06:35:15 1992 James Clark (jjc at jclark) * Makefile.comm (extraclean): Delete files whose names begin with `='. * pic/troff.cc (troff_output::text): Fix typo in implementation of aligned text. Sat Oct 10 09:32:29 1992 James Clark (jjc at jclark) * troff/env.cc (hyphenate_request, vertical_spacing, no_number): * troff/div.cc (page_length, need_space, space_request): Treat invalid optional argument as missing. * troff/env.cc (number_lines): If the first argument is present but not a number, turn on line numbering, don't change the next line number and parse the remaining arguments. * tmac/tmac.e (@q): Do the `ne' before changing to environment 2. Thu Oct 8 10:24:40 1992 James Clark (jjc at jclark) * eqn/box.h: Change declaration accordingly. * eqn/box.cc (set_gsize): Change return type to int. Return 0 if the specified size was bad but don't give an error. Check for overflow. * eqn/main.cc (main): Change caller. Leave validation to set_gsize. * eqn/lex (do_size): Likewise. Wed Oct 7 09:48:59 1992 James Clark (jjc at jclark) * acgroff.m4 (GROFF_PROG_CCC): Use fopen when checking for C++ compatible headers. Sun Oct 4 18:24:02 1992 James Clark (jjc at jclark) * tbl/table.cc (table::init_output): Improve error message when table won't fit on one page. Fri Oct 2 10:41:40 1992 James Clark (jjc at jclark) * pic/troff.cc (troff_output::start_picture): Generate line containing a horizontal motion equal to the width of the picture. * groff/groff.cc (main): Allow PROG_PREFIX to be set at runtime using GROFF_COMMAND_PREFIX environment variable. Fri Sep 25 11:40:40 1992 James Clark (jjc at jclark) * mdate.sh: Use $NF rather than $(NF). Tue Sep 22 09:47:24 1992 James Clark (jjc at jclark) * pic/main.cc (main): Use %1 not %c in argument to warning. * eqn/main.cc (main): Output code to check that geqn was given the correct -T option. Mon Sep 21 10:59:16 1992 James Clark (jjc at jclark) * Makefile.in (dist): Instead of doing `make -f ../Makefile', do `ln -s ../Makefile .; make; rm -f Makefile'. * troff/hyphen: Rename to... * troff/hyphen.us: * troff/input.cc (main): Delete -H option. Don't call read_hyphen_file(). * troff/env.cc: Include searchpath.h and macropath.h. (exception_dictionary): Deleted. (ht): Deleted. (read_hyphen_file): Deleted. (hyphenation_language): New struct. (class trie, class hyphen_trie): Move declarations up. (trie_node::~trie_node): Deleted. (trie::delete_trie_node): New function. (trie::do_delete): New pure virtual function. (hyphen_trie::do_delete): New function. (trie::~trie): New function. (hyphen_trie::~hyphen_trie): New function. (trie::clear): No need to chcek that tp is not 0. (current_language, language_dictionary): New variables. (hyphen_word): Give an error if no current language. Use exceptions dictionary in current language. (hyphen_trie::read_patterns_file): Find file using macro_path. Allow comments (starting with %) in patterns file. Don't make it a fatal error if the file can't be found. (hyphenate): Return if no current language. Get the exceptions dictionary and the hyphenation patterns from the current language. (set_hyphenation_language): New variable. (hyphenation_patterns_file): New function. (hyphenation_language_reg): New class. (hyphenation_language_reg::get_string): New function. (init_hyphen_requests): Bind "hla" to set_hyphenation_language and "hpf" to hyphenation_patterns_file. Initialize `.hla' number register. * groff/groff.cc (main, help, synopsis): Delete -H option. * include/Makefile.sub: Don't define HYPHENFILE. * Makefile.in: Delete hyphenfile variable and remove from MDEFINES. * Makefile.comm (.man.n): Don't substitute for HYPHENFILE. * tmac/troffrc: Set hyphenation language to `us'. Load `hyphen.us' hyphenation patterns. Sun Sep 20 09:33:02 1992 James Clark (jjc at jclark) * eqn/neqn.sh: New file. * eqn/Makefile.sub: Handle neqn.sh. * eqn/eqn.h: Declare `nroff' variable. * eqn/box.cc (param_table): Add `nroff' param. (nroff): Define it. * eqn/lex.cc (yylex): Handle TDEFINE and NDEFINE using `nroff' variable. * tmac/eqnrc: Set `nroff' to 1 for -Tascii or -Tlatin1. * troff/troff.h (WARN_FONT): New warning. (WARN_TOTAL): Change accordingly. * troff/input.cc (DEFAULT_WARNING_MASK): Include WARN_FONT. (warning_table): Add WARN_FONT. * troff/node.cc (mount_font_no_translate): Pass argument to font::load_font. If this is non-zero, give a warning. Don't give an error message when accessing a font that has already been found to be invalid. * include/font.h (font::load, font::load_font): Add additional optional argument which suppresses error message if the font is not found. * libgroff/font.cc (font::load_font): Handle additional argument. (font::load): Add additional argument. If this is non-null, set it to 1 and don't give error message. * include/printer.h (printer::end_page): Add argument giving length of page. * libdriver/input.cc (do_file): Pass this. * grops/ps.cc (ps_printer::end_page): Add argument. * grodvi/dvi.cc (dvi_printer::end_page, draw_dvi_printer::end_page): Add argument. * grotty/tty.cc (class tty_printer): Remove lines_per_page and columns_per_page members. New member nlines. (DEFAULT_LINES_PER_PAGE): Deleted. (tty_printer::tty_printer): Don't compute lines_per_page from font::paperlength. Don't compute columns_per_page from font::paperwidth. (tty_printer::add_char): Don't check horizontal position against columns_per_page. Grow glyphs vector if neccessary. (tty_printer::end_page): Add argument giving page_length in units. Discard lines past end of page. Wed Sep 16 06:29:52 1992 James Clark (jjc at jclark) * tmac/tmac.tty-char: Fix definition of \(/l. * tmac/tmac.X: Define \(en. Tue Sep 15 10:37:13 1992 James Clark (jjc at jclark) * acgroff.m4 (GROFF_PRINT): If a system has lpr and lp but not lpq, then use lp rather than lpr. * tmac/tmac.s (par@reset): Don't call `ad'. (par*env-init): Call `ad'. Sun Sep 13 18:48:20 1992 James Clark (jjc at jclark) * mdate.sh: Use $(NF) instead of $6 to extract year from output of date. * troff/symbol.cc: #undef BLOCK_SIZE if it's defined. * indxbib/indxbib.cc: Likewise. Sun Sep 6 09:44:46 1992 James Clark (jjc at jclark) * libgroff/putenv.c: New file. * libgroff/Makefile.sub: Add putenv.c to CSRCS. * Makefile.in: Say that putenv.o can be one of LIBOBJS. * configure.in: Test for putenv with AC_REPLACE_FUNCS. Test for stdlib.h with AC_HAVE_HEADERS. Sat Sep 5 18:11:52 1992 James Clark (jjc at jclark) * indxbib/dirnamemax.c: Include only if does not exist. Fri Sep 4 09:43:26 1992 James Clark (jjc at jclark) * eqn/box.cc (gsize): Make it an int. (set_gsize): Parse argument handling increment or decrement. (box::top_level): Convert gsize to a string. * troff/input.cc (exit_troff): Make buf unsigned char []. Call to make_temp_iterator casts buf to char*. * Makefile.in ($(TARGETS), dot): Pass $(MDEFINES) to recursive makes. * Makefile.ccpg (depend.temp): Depends on $(YTABC). * Makefile.cpg (depend.temp): Likewise. * Makefile.dep: Remove Makefile.dep from $(REALCLEANFILES). * Makefile.comm: Add y.output to MOSTLYCLEANFILES. Thu Sep 3 08:01:55 1992 James Clark (jjc at jclark) * tmac/tmac.s (B, I, BI, CW): Rewrite avoiding aliases. Tue Sep 1 18:24:53 1992 James Clark (jjc at jclark) * Version 1.06 released. * Integrate mm 1.04. Fri Aug 28 11:28:19 1992 James Clark (jjc at jclark) * Makefile.comm, Makefile.ccpg, Makefile.cpg: Fix TAGS target. Thu Aug 27 11:03:33 1992 James Clark (jjc at jclark) * afmtodit/afmtodit.pl: Add -n option that disables generation of ligatures command. * devps/generate/Makefile (CR, CB, CI, CBI): Pass -n flag to afmtodit. Regenerate. * tmac/tmac.e ()z): Adjust _b if necessary so as to avoid moving @f back past the current position. * tmac/tmac.e: Change calls to @R so that comments are not part of arguments. Tue Aug 25 10:42:07 1992 James Clark (jjc at jclark) * configure.in: Check for mkstemp with AC_HAVE_FUNCS. * acgroff.m4 (GROFF_PROG_CCC): Don't check for . Instead check that we can link a call to a function declared in . (GROFF_UNISTD_H): New macro. * configure.in: Call it. * Makefile.in: Document it. * include/posix.h: New file. * troff/troff.h: Don't include * troff/input.cc: Include posix.h. * libgroff/new.cc, libgroff/tmpfile.cc: Include posix.h rather than osfcn.h. * indxbib/indxbib.cc, libbib/{search.cc,linear.cc,index.cc}: Include posix.h rather , , , . * indxbib/indxbib.cc (S_IRUSR, S_IRGRP, S_IROTH): Delete definitions. * libbib/index.cc (S_ISREG, O_RDONLY): Delete definitions. * libbib/search.cc (O_RDONLY): Delete definition. * refer/refer.cc, include/driver.h, pic/pic.h, groff/groff.cc: Don't include . * acgroff.m4 (GROFF_TIME_T): New macro. * configure.in: Call it. * Makefile.in: Document it. * acgroff.m4 (GROFF_TRADITIONAL_CPP): New macro. * configure.in: Call it. * Makefile.in: Document -DTRADITIONAL_CPP. * include/ptable.h: Don't include generic.h. (name2): Define it. * tmac/tmac.s (][): Make [T1 and [T2 aliases for [T. Afterwards remove [T1 and [T2. (ref*spec!0, ref*spec!2): Use T1 rather than T. (ref*spec!1, ref*spec!4, ref*spec!4): Use T2 rather than T. (ref*add-T2): Renamed from ref*add-T. (ref*add-T1): New macro. Mon Aug 24 11:11:11 1992 James Clark (jjc at jclark) * acgroff.m4 (AC_PROG_CCC): Use GROFF_EXIT rather than exit 1. * libbib/index.cc: Include . (O_RDONLY): Define if necessary. (make_index_search_item, index_search_item_iterator::get_tag, index_search_item::check_files): Use O_RDONLY. * libbib/seach.cc: Include , , . (O_RDONLY): Define if necessary. (search_list::add_file): Use O_RDONLY. * indxbib/indxbib.cc: Include , , . (S_IRUSR, S_IRGRP, S_IROTH): Define if necessary. (main): Use these. * libbib/index.cc (S_ISREG): Define it if necessary. (index_search_item::load): Use S_ISREG. * include/driver.h: Include . Sun Aug 23 11:32:18 1992 James Clark (jjc at jclark) * eqn/box.cc (body_height): Increase default value to 85. (body_depth): Increase default value to 35. Fri Aug 21 05:34:42 1992 James Clark (jjc at jclark) * eqn/pbox.h (SAVE_FONT_STRING): Define it. * eqn/box.cc (box::top_level): Hide use of \R in a string that is protected from expansion with \E. * acgroff.m4 (GROFF_PAGE): Use `case' to test domain. * Makefile (Makefile): New target. * Makefile.sub (configure, distfiles): New targets. * acgroff.m4 (GROFF_BROKEN_SPOOLER_FLAGS): Avoid using ${var:-val} construct. Thu Aug 20 12:27:26 1992 James Clark (jjc at jclark) * eqn/box.cc (param_table): Add body_height and body_depth. * eqn/lex.cc (def_table): Make circumflex in hat_def roman. Tue Aug 18 16:24:25 1992 James Clark (jjc at jclark) * psbb/Makefile.sub: Don't link with libgroff.a. * acgroff.m4 (GROFF_PUTENV): New macro. * configure.in: Call GROFF_PUTENV. * Makefile.in: Document STDLIB_H_DECLARES_PUTENV. * groff/groff.cc: Don't declare putenv if STDLIB_H_DECLARES_PUTENV is defined. * troff/env.cc (distribute_space): Rename force_forward argument to force_reverse. Reverse the list if force_reverse is true. Mon Aug 17 17:49:05 1992 James Clark (jjc at jclark) * tmac/tmac.an: Don't define a string `T'. Just define Tm. * eqn/pile.cc (matrix_box::compute_metrics): Don't allow computed height or depth to be negative. Guard against SUP_RAISE quantity being negative. Sat Aug 15 08:18:54 1992 James Clark (jjc at jclark) * devps/generate/textmap: Add `an' (arrowhorizex). * tmac/tmac.ps: \(an overlaps horizontally. * tmac/tmac.dvi, tmac/tmac.tty: Add `an'. * devps/symbolchars: Add arrowverttp, arrowvertbt. * devps/textmap: Add arrowvertex. * eqn/delim.cc (delim_table): Add uparrow, downarrow and updownarrow delimiters. * tmac/tmac.ps, tmac/tmac.X: Add definition of \(va. * tbl/table.cc (simple_entry::position_vertically, block_entry::position_vertically): For a centered entry, perform the motion in two stages. * refer/refer.cc (split_punct): Don't call lookup_token if there is no token. Fri Aug 14 11:14:58 1992 James Clark (jjc at jclark) * troff/input.cc (token::next): Delete token_node after copying token. * grodvi/grodvi.cc (dvi_printer::dvi_printer): Initialize cur_point_size. * libdriver/printer.cc (printer::load_font): Delete old_font_table. * grops/ps.cc (ps_printer::define_encoding): Delete elements of vec. Tue Aug 11 13:50:38 1992 James Clark (jjc at jclark) * grops/ps.cc (usage): -b option takes an argument. * devps/prologue (PLG): New procedure. * grops/ps.cc (main, usage): New -g option. (ps_printer::~ps_printer): If guess_flag is set, guess the paper length using PLG. Mon Aug 10 11:17:53 1992 James Clark (jjc at jclark) * include/cset.h: Include if we have it. * libgroff/illegal.cc: New file. * include/lib.h (illegal_input_char): Use table. * troff/input.cc (ESCAPE_RIGHT_PARENTHESIS): Renumber to 0206. * pic/lex.cc (ARG1): Renumber to 14. * eqn/lex.cc (ARG1): Likewise. * troff/Makefile.sub (majorminor.cc): Handle 3 part versions (eg 1.05.90) correctly. Sun Aug 9 13:35:43 1992 James Clark (jjc at jclark) * tmac/tmac.e (sr): Deleted. Set $r and $R directly. Rename $r and $R registers to $v and $V. ($r, $R): Initialize to 0. (@v, @V): New macros. (sz): Call @v. (@M): Call @V. * troff/input.cc (main, usage): Add -R option that says not to load troffrc. * eqn/main.cc (main, usage): Rename -n to -R. Sat Aug 8 00:16:00 1992 James Clark (jjc at jclark) * devps/DESC.in: Leave font positions 5-9 blank. * devdvi/DESC.in: Likewise. * grog/grog.pl: Handle `.PS 0. * macros/tmac.e (@R, @S): New macros. Declare @, po, $0, $i, $p, df, so, fu, bt, *, ?a, ?b, ?C, ?e, ?H, ?I, ?n, ?o, ?R, ?s, ?T, ?W, ?w registers with @R. Declare $H, $[0-9], .. macros with @S. Declare |0, |1, |2, |3 strings with @S. * macros/tmac.e (@S): Rename to @U. * macros/tmac.e (@z): Define @b and bp as empty instead of deleting them, * macros/tmac.e (@m): Deleted. (@h): Don't call @m. (@z): Don't set @m trap. * macros/tmac.e ($h, $f): Define |z as empty string. * macros/tmac.e (@D): Rework to avoid unbalanced .el requests. (@q): Likewise. * macros/tmac.e (@h): Set ?H, ?C , ?s registers to 0 rather than removing them. ()f): Likewise for * register. * macros/tmac.e (sr): Don't ever scale the arguments. If the third argument is missing, don't change $R. Call sr with three arguments when initializing. Thu Jul 16 12:17:12 1992 James Clark (jjc at jclark) * macros/tmac.e (sr): New macro. Initialize $r and $R using sr. * macros/tmac.e (,): Delete \*(#[. * troff/env.c (set_tabs): Read the tab type even if the position is bad. Allow the position of the first tab stop to be negative. Wed Jul 15 13:14:37 1992 James Clark (jjc at jclark) * refer/dirnamemax.c: Use pathconf() if defines _POSIX_VERSION. * refer/Makefile: Compile dirnamemax.c using -DHAVE_UNISTD_H rather than -DPATHCONF_MISSING. * Makefile: Get rid of PATHCONF_MISSING. * refer/map.c: New file. * refer/index.c: Interface to mmap through map.c. Rename map_size to map_len. * refer/Makefile: Handle map.c. * Makefile: Include -DHAVE_MMAP in OLDCFLAGS rather than CFLAGS. Tue Jul 14 14:15:20 1992 James Clark (jjc at jclark) * Makefile: RANLIB should be `true' if there is no ranlib. * lib/Makefile (libgroff.a): Simplify. * driver/Makefile (libdriver.a): Simplify. * Makefile: Change -DWAIT_COREDUMP_0200 to -DWCOREFLAG=0200. * groff.c (WCOREDUMP): Use WCOREFLAG. Define only if not already defined. Sat Jul 11 09:19:17 1992 James Clark (jjc at jclark) * troff/env.c (compare_ranges): Declare as extern "C". * troff/input.c (init_registers): Use `struct tm' instead of `tm'. * macros/tmac.s, macros/tmac.e: Change .nx /dev/null to .nx. Wed Jul 8 11:52:27 1992 James Clark (jjc at jclark) * pic/troff.c (troff_output::text): Merge in grops_output::text, but conditionalize use of \X based on \*(.T. (grops_output::*): Deleted. * pic/output.h: Delete declaration of make_grops_output. * pic/main.c (main): Ignore -p and -x. driver_extension_flag is 1 by default. -n sets it to 0. (usage): Corresponding changes. * groff.c (main): Don't pass -x or -p to pic. * groff.sh: Likewise. * ps/ps.c (ps_printer::do_exec, ps_printer::do_file): Force ndefs to be non-zero. * ps/devps/afmtodit: Change calculation of asc_boundary and desc_boundary. Make these bounds inclusive. * ps/devps: Regenerate font files. Tue Jul 7 13:14:15 1992 James Clark (jjc at jclark) * macros/tmac.latin1: New file. * macros/tmac.tty-char: Use tmac.latin1. (tmac.tty-tr): Deleted. * macros/Makefile: Install tmac.latin1. * macros/tmac.dvi: Use tmac.latin1. * macros/troffrc: Translate \[char160] onto no-break space here. * macros/{tmac.dvi,tmac.ps,tmac.tty,tmac.X75}: Don't do it here. Mon Jul 6 11:06:52 1992 James Clark (jjc at jclark) * macros/tmac.Xps: Use `do' request. * macros/tmac.ps: Use `do' request. * macros/tmac.e (@C): Use `do' request. * macros/tmac.X, macros/tmac.Xps: Moved from xditview. * macros/Makefile: Install tmac.X*. * tty/tmac.tty, tty/tmac.tty-char: Move to macros. * tty/Makefile: Don't install tmac.tty*. * macros/Makefile: Install tmac.tty*. * dvi/tmac.dvi: Move to macros. * dvi/Makefile: Don't install tmac.dvi. * macros/Makefile: Install tmac.dvi. * ps/tmac.ps*: Move to macros. * ps/Makefile: Don't install tmac.ps*. * macros/Makefile: Install tmac.ps*. * eqn/box.c: Provide draw_lines parameter corresponding to -D option. * macros/eqnrc: Set draw_lines parameter based on device. * groff.c: Don't pass -D flag to eqn. * groff.sh: Likewise. * eqn/main.c: Warn about use of -D. * troff/input.c (process_startup_file): New function. (main): Call process_startup_file(). * macros/troffrc: New file. * macros/Makefile: Install troffrc. * groff.c (main): Don't pass extra -m option to troff. For a pseudo device pass the name of the pseudo device to troff using -d. * groff.sh: Likewise. * groff.c (possible_command::prepend_arg): Deleted. * troff/input.c (do_request): New function. (init_input_requests): Bind "do" to do_request. * eqn/main.c (main): Instead of loading eqnchar from device directory, load eqnrc from macro directory. * macros/eqnrc: New file. * macros/Makefile: Install eqnrc. * ps/devps/eqnchar: Deleted. * ps/devps/Makefile: Don't install eqnchar. * dvi/devdvi/eqnchar: Deleted. * dvi/devdvi/Makefile: Don't install eqnchar. * groff.c (main): Pass -M to eqn. Don't pass -F to eqn. New variable optM. * lib/device.[ch]: New files. * lib/font.h (font::set_device_name, font::get_device_name): Deleted. * lib/fontfile.c: Use device.h. * lib/Makefile: Handle device.[ch]. Make paths.h define DEVICE. * troff/input.c: Delete definition of `device'. (main): Don't initialize device. * troff/troff.h: Include device.h rather than declaring device. * troff/Makefile: No need to handle DEVICE. * driver/input.c: Include device.h. Don't use font::{set,get}_device_name. * groff.c, Makefile: Rename device.h to config.h. * groff.c: Use library device variable. * eqn/main.c: Use library device variable. * eqn/Makefile: No need to handle DEVICE. * lib/searchpath.[ch]: New files. * lib/Makefile: Handle searchpath.[ch]. * troff/input.c (open_file, init_dirs): Deleted. (macro_dirs): Deleted. (open_mac_file, macro_source): Use class search_path. (add_string, struct string_list): Move definition. (main): Change -M option to use macro_path. Delete call to init_dirs(). * lib/fontfile.c (font::command_line_font_dir, font::open_file): Rewrite to use class search_path. * lib/font.h, lib/fontfile.c (font::cl_font_dirs): Deleted. * lib/Makefile: fontfile.c depends on searchpath.h. * lib/Makefile: Rename fontpath.h to paths.h. Make paths.h define MACROPATH. * lib/macropath.[ch]: New files. * troff/Makefile: No need to handle MACROPATH. * troff/input.c: Delete DUMP code. * lib/fontfile.c, lib/font.h: Delete font::forget_command_line_font_dirs. * troff/input.c (push_token): New function. (handle_first_page_transition): Use push_token(). (process_input_stack): Change handling of a space at the beginning of the line. Sun Jul 5 17:11:09 1992 James Clark (jjc at jclark) * troff/input.c (font_dirs): Delete unused variable. * eqn/lex.c (do_set): Correct error messages. Sat Jul 4 10:20:55 1992 James Clark (jjc at jclark) * troff/input.c (do_define_string): Allow the string name to be followed immediately by a tab. (define_character): Likewise. Thu Jul 2 10:59:15 1992 James Clark (jjc at jclark) * ps/ps.c (ps_printer::draw): When drawing an arc, don't allow k to be negative. * troff/input.c (input_iterator::is_file): New virtual function. (file_iterator::is_file): New function. (input_stack::end_file): New function. (input_stack::next_file): Handle the situation where there is no file on the input stack correctly. Avoid making two passes over the input stack. (next_file): Make the filename optional; in this case call input_stack::end_file(). Wed Jul 1 10:17:25 1992 James Clark (jjc at jclark) * dvi/tmac.dvi: Change the definitions of \(ul and _ so that they produce a real _ charater when the current font is CW and _ otherwise. * lib/errarg.c (errarg::errarg(const char *)): Invert conditional expression to work around gcc 2.2 bug. Wed Jun 24 08:12:24 1992 James Clark (jjc at jclark) * eqn/main.c (main): Don't give an error if we can't find eqnchar. * troff/env.c (environment::add_padding): New function. (environment::add_char): Use add_padding(). (environment::space): Likewise. (environment::wrap_up_field): Add some padding if there is none and there's no current tab. * troff/env.h: Declare environment::add_padding. Mon Jun 22 08:37:45 1992 James Clark (jjc@jclark) * pic/pic.y: undef fmod and rand before declaring them. Sun Jun 14 11:40:18 1992 James Clark (jjc@jclark) * troff/input.c (main): If the DESC file specifies a font name of 0, then leave the corresponding font position empty. * nroff.sh: New file. * Makefile (install.nobin): Install nroff.sh. * tty/devlatin1/R.proto: Add ao as synonym for de. * tty/tmac.tty-char: Define ao as o. * tty/dev{ascii,latin1}/R.proto: Add aq. * tty/tmac.tty-char: Delete definition of aq. Mon Jun 8 11:43:20 1992 James Clark (jjc@jclark) * troff/input.c (init_charset_table): Don't translate 0240. * ps/tmac.ps: Translate char160 to space. * dvi/tmac.dvi: Likewise. * tty/tmac.tty: Likewise. Sun Jun 7 10:52:35 1992 James Clark (jjc@jclark) * dvi/tmac.dvi: Add support for all Latin-1 characters. * macros/tmac.s: Delete definitions of \(rg, \(ah, \(ad, \(a-, \(ao, \(ac, \(ho, \(-D, \(Sd, \(TP, \(Tp, \(ss, \(AE, \(ae, \(OE, \(oe, \(r?, \(r!. * tty/tmac.tty-char: Add \(ah. * dvi/tmac.dvi: Add definitions of Tp, TP, Sd, -D, ho. No need to define \(FM and \(!/. Conditionalize all character definitions. * ps/devps/lgreekmap: Add +h, +f, +p. * ps/tmac.psnew: New file. * ps/Makefile: Install tmac.psnew. * troff/input.c (charinfo_to_node_list): Don't ever interpret character definitions in compatible mode. * troff/input.c (remove_character): New function. (init_input_requests): Bind remove_character to "rchar". * ps/tmac.psold: New file. * ps/Makefile: Install tmac.psold. * ps/tmac.ps: Load tmac.psold. Move definitions of ISO Latin-1 characters into tmac.psold. Make these definitions unconditional. * tty/tmac.tty-char: Define \n(_C only if it is not already defined. * ps/tmac.ps: Don't define \('c and \('C. * ps/devps/textmap: Move Greek characters to... * ps/devps/symbolchars: Sat Jun 6 16:41:17 1992 James Clark (jjc@jclark) * ps/devps/text.enc: Add quotesingle. * ps/devps/textmap: Add +h, +f, +p, Fn, Bq, bq, aq, lz. * tty/tmac.tty-char: Likewise. * dvi/devdvi/texmi.map: Add +h, +f, +p. * dvi/devdvi/texi.map: Add Fn. * dvi/devdvi/msam.map: Add lz. * dvi/tmac.dvi: Handle Bq, bq, aq. * pic/lex.c (get_token): Recognize 'th. * pic/map.y: Allow `expr'th in contexts where ORDINAL was allowed. Fri Jun 5 11:20:46 1992 James Clark (jjc@jclark) * ps/devps/textmap: Move di, mu, +- to... * ps/devps/symbolchars: * macros/tmac.s (@XS): Don't call par@reset or fi. (XA): Call LP. Turn off adjustment. Reduce line length. * macros/tmac.s: Initially alias XS to LP. (XS): Rename to @XS. (cov*ab-init): Alias XS to @XS. Thu Jun 4 09:12:05 1992 James Clark (jjc@jclark) * troff/token.h: Delete TOKEN_CHAR_HEIGHT, TOKEN_CHAR_SLANT, TOKEN_FONT_NAME, TOKEN_FONT_POSITION, TOKEN_SIZE tokens. (token::is_size, token::changes_env): Deleted. * troff/number.c (parse_term): No need to process \s explicitly. Call tok.next() only after scale indicator has been processed. * troff/input.c (do_overstrike, do_bracket): No need to process \s, \f etc explicitly. (token::next): Handle \s, \f, \S, \H immediately rather than returning them as tokens. (token::operator==, token::description, token::add_to_node_list, token::process): Remove handling of deleted tokens. * troff/env.c (environment::add_char): When adding padding indicator character, call start_line() if necessary. Wed Jun 3 09:55:50 1992 James Clark (jjc@jclark) * ps/devps/afmtodit: Don't output 0 kerns. * ps/devps/afmtodit: Remove directory from name of encoding in font description file. * ps/devps/afmtodit: Improve error messages. * ps/devps/afmtodit: Allow DESC file to be specified with -d. * ps/devps/Makefile: Incorporate FontMakefile. Rework. * ps/devps/FontMakefile: Deleted. * ps/devps/afmname: New file. * ps/devps/symbol.sed: New file. * ps/devps/symbol.diff: Deleted. * ps/devps/FontMakefile: Generate symbol.afm using symbol.sed. Generate zapfdr.afm from zapfd.afm. * tty/tmac.tty (tty-char): Prefix definition with ". * macros/tmac.an (TP): Don't start a diversion if one has already been started. * tty/tmac.tty-char: Add Latin-1 characters. * tty/tmac.tty-char: Incorporate suggestions from Paul Eggert. Tue Jun 2 00:54:34 1992 James Clark (jjc@jclark) * tbl/table.c (table::allocate): Delete old_vline, old_entry. Move declaration of struct horizontal_span. * tbl/table.c (table::table): Initialize span_list. (table::~table): Delete span_list. * lib/ptable.h (PTABLE(T)::~PTABLE(T)): Delete v. * ps/devps/Makefile: Avoid dependency on GNU make. * ps/tmac.ps: Check that character does not already exist before defining it. * tty/tmac.tty: Add definitions of \(ff, \(!=, \(==, \(~=, \(sq, \(OE, \(oe, \(AE, \(ae, \(lh, \(rh. Delete definitions of \(en, \(ru, \(ul, \(br, \(bv, \(sl which are in the font description files. * tty/tmac.tty-char: New file. * tty/Makefile: Install tmac.tty-char. * tty/tmac.tty: Move definitions of \(ua, \(da, \(uA, \(dA into tmac.tty-char. * tty/tmac.tty: Fix definition of \(34. * tty/dev{ascii,latin1}/R.proto: Add ha and ti. Map bracket-drawing characters onto |. Add *o. * troff/env.c (environment::wrap_up_tab): Increment field_spaces only if current_field. * troff/dictionary.c (dictionary::lookup): Free old_table after rehashing. Mon Jun 1 10:15:22 1992 James Clark (jjc@jclark) * tty/dev{ascii,latin1}/R.proto: Add uppercase Greek characters whose glyphs are identical to glyphs of some Roman character. * tty/devlatin1/R.proto (bu): Deleted. * tty/devascii/R.proto (bu): Deleted. * tty/tmac.tty: Add definition of \(bu. * eqn/main.c (do_file): Pass FILE as argument. (main): Automatically load eqnchar. New options -F and -n. Pass do_file an opened FILE. * groff.c: Don't pass eqnchar to eqn. Pass -F options onto eqn. No need to include font.h. * groff.sh: Likewise. Don't need to use - for standard input. Prefix files with -- if first file starts with -. * macros/tmac.e: Conditionalize use of \$* on \n(.g. * troff/env.c (environment::possibly_break_line): Don't set line to 0 across call to output_line(). Don't call output_line() until after discarding nodes after break. Sun May 31 10:45:29 1992 James Clark (jjc@jclark) * request.h (macro::empty): Declare it. * input.c (macro::empty): New method. (interpolate_macro): Don't give a WARN_SPACE if the two-character macro is empty. Sat May 30 10:27:15 1992 James Clark (jjc@jclark) * troff/env.c (environment::start_field): Decrement space_total when a space is frozen. Fri May 22 14:34:38 1992 James Clark (jjc@jclark) * macros/tmac.an (R): Delete macro. * troff/input.c (get_copy, token::next): Support \# (like \" but newline is ignored). * troff/input.c (token::next): Fix error message in 'Y' case. Thu May 21 09:26:24 1992 James Clark (jjc@jclark) * eqn/delim.c (define_extensible_string): Recognize any prefix of a delimiter name. Fri May 15 10:20:41 1992 James Clark (jjc at jclark) * c++test.c: Include . * lib/strtol.c, lib/getcwd.c, ps/psbb.c: Declare errno in case doesn't. Fri May 8 09:37:19 1992 James Clark (jjc at jclark) * tbl/table.c (table::divide_span): Don't count column separation if expand was specified. * tbl/main.c (process_format): Don't ignore width specs in continued format. Give warning for changing equal widths or column separation in continued format. (process_data): Set column separation, minimum width, equal columns at end of table. Thu May 7 08:50:40 1992 James Clark (jjc at jclark) * troff/node.c (kern_pair_node::add_discretionary_hyphen, node::add_discretionary_hyphen): Use soft_hyphen_char. (set_soft_hyphen_char): New function. (init_node_requests): Bind to shc. Initialize soft_hyphen_char. * Makefile (c++tested): Give more helpful message if test fails. Tue May 5 10:58:39 1992 James Clark (jjc at jclark) * troff/input.c (init_charset_table): Translate 0240 to an unbreakable space. * troff/token.h (token::hyphen_indicator): New function. * troff/charinfo.h (TRANSLATE_HYPHEN_INDICATOR): New special translation. * troff/input.c (translate): Allow translation to \%. * troff/node.c (node::add_char): Handle TRANSLATE_HYPHEN_INDICATOR. (make_node): Don't allow TRANSLATE_HYPHEN_INDICATOR here. * troff/input.c (init_charset_table): Don't set BREAK_AFTER flag for \(hy. * tty/devlatin1/R.proto: \(hy and - should print as 055. Tue Apr 21 09:24:42 1992 James Clark (jjc at jclark) * groff.c (run_commands): If the last command gets a SIGPIPE send a SIGPIPE to all children than haven't yet terminated. When command terminates, set pid field to -1. Fri Apr 17 11:20:48 1992 James Clark (jjc at jclark) * groff.c (main): Pass an appropriate -filename option to gxditview. Thu Apr 16 15:11:40 1992 James Clark (jjc at jclark) * Makefile.bd (install): Remove existing program before copying. * Makefile, */Makefile, Makefile.bd, groff.sh, groff.c: Allow programs which have Unix counterparts to be installed with user-specified prefix. * troff/input.c (exit_troff): Don't check if exit_started. (exit_request): Don't call exit_troff if exit_started. * Makefile.bd (install.mm): Rename to install.dwbmm. Tue Apr 14 10:05:10 1992 James Clark (jjc at jclark) * driver/input.c (do_file): Add missing break for '#' case. Mon Apr 13 10:11:02 1992 James Clark (jjc at jclark) * troff/input.c (input_stack::clear): Clear past any boundaries and then add the boundaries back. * troff/input.c (exit_troff): Return immediately if already exiting. * macros/tmac.s (pg@end-text): New macro. Use pg@end-text for the end macro. (pg*end-page): If the text has ended and there are no more footnotes or keeps, exit. * macros/doc-ditroff (Lq, Rq): Define as \(lq and \(rq. * troff/input.c (init_charset_table): Make \(rq transparent by default. * macros/tmac.an: Define lq and rq strings. * macros/tmac.s (Q, U): Define as \(lq and \(rq. Sun Apr 12 12:54:37 1992 James Clark (jjc at jclark) * troff/env.c (environment::final_break): New function. (environment::newline): Set prev_line_interrupted to 2 if exit_started. * troff/env.h: Declare environment::final_break. * troff/input.c (exit_troff): Call environment::final_break() instead of environment::do_break(). * macros/Makefile: Install man.local if $(MACRODIR)/man.local doesn't already exist. * macros/man.local: New file. * macros/tmac.an: Load man.local. * macros/man.ultrix: New file. Sat Apr 11 17:32:04 1992 James Clark (jjc at jclark) * troff/input.c (exit_groff): Rename to... (exit_troff): New function. * troff/div.c (exit_started, done_end_macro, seen_last_page_ejector): New global variables. (began_page_in_end_macro): New static variable. (exit_flag): Deleted. (top_level_diversion::top_level_diversion): Initialize last_page_count. (top_level_diversion): More elaborate test for whether cleanup_and_exit() should be called. Set began_page_in_end_macro if the end macro isn't yet finished. * troff/div.h (top_level_diversion::last_page_count): New data member. (top_level_diversion::set_last_page): New function. (exit_started, done_end_macro, seen_last_page_ejector): Declare. * troff/env.c (do_break): Zero prev_line_interrupted. * troff/input.c (exit_flag): Delete declaration. (LAST_PAGE_EJECTOR): New magic cookie. (token::next): Handle LAST_PAGE_EJECTOR. (exit_groff): Set exit_started and done_end_macro instead of exit_flag. Call top_level_diversion::set_last_page. Push a LAST_PAGE_EJECTOR instead of calling push_page_ejector(). Do another ejection after setting seen_last_page_ejector. Thu Apr 9 04:37:11 1992 James Clark (jjc at jclark) * etc/grog.sh, etc/grog.sh: Recognize -me sh macro. * macros/tmac.e (TH): Make sure there's room for the initial header. * macros/tmac.s (par@init): Make PD and DD at least \n(.V. Set FVS in points rather than units. Mon Apr 6 11:21:32 1992 James Clark (jjc at jclark) * troff/div.c (top_level_diversion::add_trap): Don't consider the position of empty slots. Fri Apr 3 10:46:45 1992 James Clark (jjc at jclark) * ps/devps/S: Fix height and depth of parenrightex. * ps/devps/symbol.diff: Regenerate. Sat Mar 28 21:17:52 1992 James Clark (jjc at jclark) * tmac.e (u): Do underlining as in -mgs. Fri Mar 27 09:23:44 1992 James Clark (jjc at jclark) * tty/tty.c (tty_printer::end_page): If overstriking is suppressed, still turn overstruck horizontal and vertical lines into +. * lib/new.c: Back out Feb 24 change; no longer needed with gcc 2.1. * refer/label.y (format_expr::evaluate): Avoid use of %0*d. Wed Mar 18 09:29:10 1992 James Clark (jjc at jclark) * Version 1.05 released. Tue Mar 17 16:50:45 1992 James Clark (jjc at jclark) * tty/tty.c: Instead of keeping an array of glyphs and then sorting it, keep a ordered linked list of glyphs for each line. * driver/driver.h: Include stddef.h. * tty/tty.c (compare_glyph): * refer/refer.c (rcompare): * troff/env.c (compare_ranges): Arguments of qsort comparison function should be const void *. * troff/number.c (parse_term): * dvi/dvi.c (draw_dvi_printer::draw): Avoid initialization in switch statement. * refer/label.y (consider_authors): Don't access variables constructed under a condition outside that condition: put braces round for statement containing declaration; redeclare use of same variable later. * pic/pic.y (text_expr): Delete production that allows parenthesised text_expr. (expr): Allow a conditional_expr to appear in parentheses. (conditional_expr): Rename to any_expr. * mm: Install new version 1.01 from jh. * lib/font.c (font::get_width): Cache scaled widths. (font::font): Initialize widths_cache. (font::~font): Destroy widths_cache. * lib/font.h: Add font::widths_cache. Declare font_widths_cache. Mon Mar 16 10:16:10 1992 James Clark (jjc at jclark) * c++test.c, c++test.ref: New files. * Makefile: Check that the C++ compiler works. * ps/tmac.pspic (PSPIC): Do a break. * ps/tmac.ps: Move definition of PSPIC into... * ps/tmac.pspic: New file. (PSPIC): Draw box around picture, but make it invisible to grops. * ps/tmac.ps: Load tmac.pspic. * ps/Makefile: Install tmac.pspic. Sun Mar 15 14:18:08 1992 James Clark (jjc at jclark) * lib/font.c (scale_round): If n is negative, subtract .5 before truncating floating point result. * lib/fontfile.c: Include . Tue Mar 10 14:17:03 1992 James Clark (jjc at jclark) * driver/input.c (get_char): Inline. Don't update current_lineno. Change callers to up date current_lineno if necessary. Use get_char() instead of getc(current_file). Sun Mar 8 18:05:28 1992 James Clark (jjc at jclark) * ps/tmac.ps: Fix up spacing of \(mo and \(nm. Fri Mar 6 19:38:58 1992 James Clark (jjc at jclark) * tty/tty.c (tmac.tty): Define \(rg as (R). Tue Mar 3 10:11:25 1992 James Clark (jjc at jclark) * lib/lib.h: New define a_delete. * Use a_delete instead of delete when deleting an array of objects without destructors. * lib/lib.h: Rename adelete to ad_delete. * Change uses of adelete. Mon Mar 2 12:41:05 1992 James Clark (jjc at jclark) * eqn/eqn.y: Include lib.h. * troff/node.c (grow_font_table): Delete old_font_table. * mm: Install new version from jh. Fri Feb 28 10:42:23 1992 James Clark (jjc at jclark) * tbl/table.h (format_type): Make global instead of local to class entry_format. Prefix enumerators with FORMAT_. * tbl/table.c, tbl/main.c: Corresponding changes. * refer/token.h (token_type): Make global. Prefix enumerators with TOKEN_. * refer/token.[ch]: Corresponding changes. * Makefile: Get rid of -DNO_NESTED_TYPES configuration option. * troff/div.c (node::set_vertical_size): Don't name argument. Thu Feb 27 10:29:19 1992 James Clark (jjc at jclark) * Makefile: New configuration option ARRAY_DELETE_NEEDS_SIZE. * lib/lib.h: Define adelete accordingly. * pic/object.c (graphic_object::graphic_object): * tbl/main.c (format::~format): * tbl/table.c (table::~table): * refer/ref.c (reference::~reference, reference::merge, reference::insert_field, reference::delete_field): Use adelete. * Makefile: Change NESTED_TYPES to NO_NESTED_TYPES. * refer/token.h: * tbl/table.h: Corresponding changes. * common.c (common_output::dashed_arc, common_output::dotted_arc): Ensure total_angle is positive. Wed Feb 26 08:49:26 1992 James Clark (jjc at jclark) * refer/ref.c (reference::merge, reference::insert_field, reference::delete_field): Avoid delete[0]. * refer/token.c (init_special_chars): Move calls to cmupper outside calls to init_two_char_letter to work around bug in gcc 2.0. Mon Feb 24 14:20:00 1992 James Clark (jjc at jclark) * lib/new.c (operator new): Use __builtin_new for g++. * pic/object.c (graphic_object::~graphic_object): Don't use delete [] on 0. * pic/object.c (output::compute_scale): Initialize max_width and max_height. Sat Feb 15 09:55:20 1992 James Clark (jjc at jclark) * troff/input.c (write_request): Call fflush. * troff/node.h (class composite_node): Move declaration to node.c * troff/input.c (charinfo_to_node): Rename to ... (charinfo_to_node_list): Return node list rather than composite node. * troff/node.c (make_composite_node): New function. (make_node, add_char): Call make_composite_node instead of charinfo_to_node. (class composite_node): Add a tfont * member. Delete font_size member. (composite_node::composite_node, composite_node::copy, composite_node::size): Corresponding changes. (composite_node::tprint): Provide constant spacing, emboldening and track kerning as specified in tfont. (composite_node::width): Change width calculation accordingly. * troff/env.h (environment::composite): New member. (environment::is_composite, environment::set_composite): New functions. * troff/env.c (environment::environment): Initialize composite. * troff/input.c (charinfo_to_node): Call environment::set_composite. * troff/node.c (make_composite_node, make_glyph_node): Use the plain version of the tfont if the environment is composite. * troff/node.c (font_info::get_space_width): Additional argument giving space_size. Handle constant space correctly. Scale by space_size unless constant spaced. (env_sentence_space_width): New function. * troff/node.h: Declare it. * troff/env.h (environment::get_space_size, environment::get_sentence_space_size, environment::get_narrow_space_width, environment::get_half_narrow_space_width): Make inline. (environment::get_space_width): Make inline. Just call env_space_width. * troff/env.c: Delete definitions for funtions made inline. (environment::space_newline, environment::space): Use env_sentence_space_width(). Don't scale by space_size. * troff/node.h: Move declarations of env*space_width() functions into env.h. Sat Feb 8 09:30:22 1992 James Clark (jjc at jclark) * macros/tmac.s (PS): Don't try to set negative indent. Thu Feb 6 09:00:35 1992 James Clark (jjc at jclark) * pic/pic.y: Fix min function. Tue Jan 28 07:52:29 1992 James Clark (jjc at jclark) * man/mdate.sh: Clear LANGUAGE. Sun Jan 19 13:02:41 1992 James Clark (jjc at jclark) * pic/pic.y, pic/lex.c: Rename COMMAND token to COMMAND_LINE. * pic/lex.c: New COMMAND keyword. * pic/pic.y (print_args, print_arg): New rules. (placeless_element): Use print_args for PRINT. New COMMAND element. Tue Jan 7 13:14:31 1992 James Clark (jjc at jclark) * troff/input.c (terminal): Handle missing argument correctly. * pic/pic.y (text_expr): New rule. * pic/pic.y: Implement := operator. Sun Jan 5 10:23:02 1992 James Clark (jjc at jclark) * etc/grog.pl, etc/grog.sh: Distinguish old and new versions of mdoc. Sat Jan 4 14:42:26 1992 James Clark (jjc at jclark) * ps/devps/dingbatsrmap: Include this in the distribution. * macros/tmac.doc: Replace with new version from 2nd Networking Release. Fix loading of doc-* files. * macros/{doc-common,doc-ditroff,doc-nroff,doc-syms}: New files. * macros/tmac.doc.old: New file. Apply fixes that had been applied to old tmac.doc. * macros/tmac.andoc: Check that we're running under groff. * macros/Makefile: Rework. Fri Jan 3 13:27:51 1992 James Clark (jjc at jclark) * tbl/table.h (format_type): * refer/token.h (token_type): If NESTED_TYPES is defined, use typedef to make these types visible at file scope. * Makefile: Add NESTED_TYPES configuration option. * troff/div.c (mark): At the top level use the value of nl_reg_contents rather than the current vertical position. Thu Jan 2 10:34:51 1992 James Clark (jjc at jclark) * tty/tty.c: Implement \D for horizontal or vertical lines. (tty_printer::set_char): Use vec_used+2 as serial number. Don't allow size of vector to exceed USHRT_MAX-2. Split off part into... (tty_printer::add_char): New function. (tty_printer::draw): New function. (compare_glyph): Handle equal serial numbers. (tty_printer::end_page): Handle overstruck characters from \D. (main, usage): Implement -d option. Mon Dec 23 10:37:51 1991 James Clark (jjc at jclark) * tbl/main.c (process_format): * eqn/text.c (split_text): * troff/input.c (token::next): Use inner block for declarations with initializers in switch statement. Mon Dec 16 20:52:03 1991 James Clark (jjc at jclark) * pic/common.c (common_output::dash_line): Cope with zero-length lines. Sun Nov 17 12:04:08 1991 James Clark (jjc at jclark) * Version 1.04 released. Wed Nov 13 05:27:21 1991 James Clark (jjc at jclark) * macros/tmac.an (TH): Define a macro an-init to define variables based on command line arguments. (an-header): Call it. Sun Nov 3 12:07:34 1991 James Clark (jjc at jclark) * Makefile (install.mm): Rename to install.dwbmm. * Makefile: Integrate mm. * mm: New directory. Wed Oct 30 10:11:34 1991 James Clark (jjc at jclark) * refer/dirnamemax.c: If PATHCONF_MISSING is defined, include . * pic/troff.c (troff_output::simple_spline, troff_output::simple_polygon): Rename variable `v' to `d' to avoid shadowing parameter. * lib/tmpfile.c (xtmpfile): Declare dir as const char *. * lib/ptable.h: Add explicit casts when converting from unsigned long to unsigned. * dvi/devdvi/{SA,SB,msam.map,msbm.map}: New files. * dvi/devdvi/Makefile: Install SA, SB. * refer/indxbib.c: Add declaration of mktemp. * refer/lookbib.c: Add declaration of isatty. Fri Oct 25 09:00:17 1991 James Clark (jjc at jclark) * pic/lex.c (interpolate_macro_with_args): While collecting arguments, keep track of whether we're in a string. Wed Oct 23 08:42:48 1991 James Clark (jjc at jclark) * ps/tmac.ps (PSPIC): Do the .sp after the \X, and move the \X down with \v, so as to avoid problems with top of page trap setting no space mode. Tue Oct 22 17:38:49 1991 James Clark (jjc at jclark) * eqn/lex.c (get_delimited_text): Allow tab before macro body. Tue Oct 15 17:24:53 1991 James Clark (jjc at jclark) * ps/psrm.c (ps_get_line): Fix bug when lines longer than 255. Improve error message. Fri Oct 11 11:09:38 1991 James Clark (jjc at jclark) * ps/psrm.c (print_ps_string): Don't pass negative numbers to printf("%03o"); Wed Oct 9 17:50:14 1991 James Clark (jjc at jclark) * groff.c (possible_command::execp): Always use _exit() after a failed exec. * Makefile: Add HAVE_UNION_WAIT, HAVE_PID_T, WAIT_COREDUMP_0200, NO_SYS_WAIT_H configuration options. * groff.c: Use these options. Use POSIX-style macros to extract fields from the status returned by wait(). Fri Oct 4 12:12:27 1991 James Clark (jjc at jclark) * tbl/table.c (table::compute_separation_factor): Allow the separation factor to drop to 0. Tue Oct 1 18:12:38 1991 James Clark (jjc at jclark) * refer/search.c: Include . Sun Sep 29 08:40:57 1991 James Clark (jjc at jclark) * pic/pic.y (YYDEBUG): Don't define for Borland C++. * lib/lib.h: #ifdef out declarations of itoa and iftoa for Borland C++. * pic/lex.c (input_stack::bol): Move definition out of class body. * pic/main.c: On MSDOS munge argv[0]. * lib/ptable.h: Define name2 as _Paste2 for Borland C++. * lib/ptable.c (hash_string): Use unsigned long rather than unsigned. (next_ptable_size): Use unsigned rather than int. Give an error message if we've hit the largest table size. * lib/ptable.c: Corresponding changes. Also use unsigneds for the table size. * pic/object.h (object_spec): Make flags unsigned long. Declare flags as const unisgned long rather than as enums. * pic/output.c: Deleted. * pic/troff.c (troff_output::simple_ellipse): Remove spurious %. * tbl/table.c (simple_entry::note_double_vrule_on_{left,right}): Add additional argument. (line_entry::note_double_vrule_on_{left,right}): Set value of douvle_vrule_on_{right,left} flag according to argument. (simple_line_entry::simple_print, simple_line_entry::double_line_print): If adjacent to double vrule on a corner extend rather than shorten the rule by half the double vrule sep. * troff/number.c (parse_term): In checking for overflow, handle the case where the current horizontal position is negative. Thu Sep 12 08:26:09 1991 James Clark (jjc at jclark) * pic/object.c (draw_arrow): Check for object having zero length. Wed Sep 11 10:32:38 1991 James Clark (jjc at jclark) * eqn/main.c (do_file): Split off inline equation handling into... (inline_equation): New function. Search for starting delimiter using... (delim_search): New function. Don't recognize a delimiter that occurs in the name of an escape sequence, number register, string etc. Tue Sep 10 04:01:11 1991 James Clark (jjc at jclark) * eqn/delim.c (delim_box::compute_metrics): Don't call define_extensible_string if left is 0. (delim_box::output): Don't print the left delimiter if left is 0. (delim_box::debug_print): Check for left == 0 before calling printf. Fri Aug 23 13:02:30 1991 James Clark (jjc at jclark) * troff/Makefile (majorminor.c): Include only digits in minor_version. Thu Aug 22 09:35:37 1991 James Clark (jjc at jclark) * refer/dirnamemax.c: new file. * refer/genlimits.c: Deleted. * refer/indxbib.c (main): Use dir_name_max() instead of NAME_MAX. Don't check path length. * refer/Makefile: Add dir_name_max.o; delete genlimits. * Makefile: Add PATHCONF_MISSING option. * refer/indxbib.c (get_cwd): New function. (main): Use get_cwd(). * lib/getcwd.c: New file. * Makefile: Delete -DHAVE_GETWD. Include GETCWD variable. Pass GETCWD in SUBFLAGS. * lib/Makefile: Compile getcwd.o. * ps/tmac.psatk (psatk-defs): Define showpage after pushing userdict. * refer/indxbib.c (main): Check success of mktemp. * lib/tmpfile.c: New file. * lib/Makefile: Add tmpfile.c. * lib/lib.h: Declare xtmpfile(); include . * ps/ps.h: Delete declaration of mktemp(). * ps/ps.c (ps_printer::ps_printer): Use xtmpfile(). * refer/refer.c (divert_to_temporary_file): Use xtmpfile(). * driver/driver.h: No need now to include errno.h. * everywhere: Set errno to 0 before calling fopen(). * eqn/eqn.h, etc/soelim.c, driver/driver.h, etc/addftinfo.c, dvi/tfmtodit.c, groff.c, refer/index.c, refer/linear.c, refer/lookbib.c, refer/refer.h, ps/psbb.c: Include . Mon Aug 19 10:52:18 1991 James Clark (jjc at jclark) * troff/env.h (translate_space_to_dummy): Declare it. * troff/env.c (environment::space_newline, environment::space): If translate_space_to_dummy is set then make the width of spaces 0. * troff/input.c (translate): If the second character of a translation is a space, translate to unbreakable space. If the first character is a space, set or clear translate_space_to_dummy according to whether the second character is \&. Weird! Tue Jul 30 10:03:56 1991 James Clark (jjc at jclark) * groff.c (run_commands): Don't use non-zero exit code because a command gets SIGPIPE. * groff.c, groff.sh: Use -mXps with -TXps. * ps/ps.c (ps_printer::special): Move call to flush_sbuf() into... (ps_printer::do_exec, ps_printer::do_file, ps_printer::do_def, ps_printer::do_mdef, ps_printer::do_import): Call flush_sbuf(). (ps_printer::special): New specials invis and endinvis. (ps_printer::do_invis, ps_printer::do_endinvis): New functions. (ps_printer::set_char, ps_printer::draw): Return if invis_count>0. (ps_printer::end_page): Check that invis_count == 0. (ps_printer::invis_count): New member. (ps_printer::ps_printer): Initialize invis_count to 0. * troff/env.c (environment::hyphenate_line): Hyphenation indicator at beginning of word inhibits splitting after -, \(em etc. * pic/pic.y (element): Allow another element to follow } without any intervening separator. Mon Jul 22 12:27:37 1991 James Clark (jjc at jclark) * pic/lex.c (get_delimited): Allow tabs before delimiter. Wed Jul 17 10:59:08 1991 James Clark (jjc at jclark) * groff.c: Get rid of HAVE_UNION_WAIT stuff. Instead suppress declaration of wait() in header files. * Makefile: Get rid of -DHAVE_UNION_WAIT. * tbl/table.c (alphabetic_text_entry::add_tab): New function. * lib/lib.h: Declare return type of strerror as char *. * man/Makefile: Add g flag to sed substitutions. * Makefile (shgroff, bindist): Likewise. Sun Jul 14 11:57:02 1991 James Clark (jjc at jclark) * ps/ps.c (ps_printer::do_import): Move push of userdict into... * ps/devps/prologue (PBEGIN): Define showpage after pushing userdict. Sat Jul 13 20:53:04 1991 James Clark (jjc at jclark) * ps/devps/prologue (PBEGIN): Zap any definition of showpage in userdict. Fri Jul 12 07:10:09 1991 James Clark (jjc at jclark) * man/mdate.sh: Handle the fact that BSD ls -l does not print the group. Sun Jul 7 08:00:23 1991 James Clark (jjc at jclark) * troff/input.c (define_number_reg): If currently undefined, don't define it if the argument is an invalid expression. * Makefile: Ignore return value of `if' commands without `else' parts. * Makefile: Split up CPPDEFINES into a series of separate configuration options. * troff/input.c (init_registers): Use time_t instead of long unless LONG_FOR_TIME_T is defined. Use returned result rather than passing pointer. * Makefile: Document LONG_FOR_TIME_T as a CPPDEFINE. * lib/Makefile (fontpath.h): Use gendef. Thu Jul 4 09:48:05 1991 James Clark (jjc at jclark) * troff/input.c (input_iterator::shift): Delete argument name. * troff/node.c (suppress_output_file::really_begin_page, suppress_output_file::really_transparent_char, node::ascii_print, node::tprint): Delete names of unused arguments. Wed Jul 3 17:34:57 1991 James Clark (jjc at jclark) * refer/label.y (string): Pass $4 to command_error. Tue Jul 2 15:06:01 1991 James Clark (jjc at jclark) * Version 1.03 released. Sat Jun 29 08:14:01 1991 James Clark (jjc at jclark) * Makefile: Pass definition of SHELL in SUBFLAGS. * gendef: New file. * Makefile, eqn/Makefile, refer/Makefile, troff/Makefile, ps/Makefile: Use gendef to construct header files that are constructed from the Makefile. * macros/Makefile: make all should build stripped version of tmac.e. * refer/Makefile (clean): Remove y.output. Fri Jun 28 09:44:36 1991 James Clark (jjc at jclark) * ps/pfbtops.c (main): Add -v option which prints out a version number. * ps/Makefile (pfbtops): Link with libgroff.a. Fri Jun 21 07:43:23 1991 James Clark (jjc at jclark) * refer/search.h (linear_searcher::get_nkeys): Delete declaration. * refer/linear.c (linear_searcher::get_nkeys): Delete definition. * refer/lkbib.c (main): Always terminate reference with blank line. * refer/lookbib.c (main): Likewise. * refer/linear.c (file_buffer::load): Check that the file is not a binary file. * refer/Makefile (genlimits): Possibly add -DHAVE_SYS_DIR_H. (genlimits.c): Include if HAVE_SYS_DIR_H is defined. Delete second inclusion of . Tue Jun 18 01:32:26 1991 James Clark (jjc at jclark) * troff/token.h (token::special): Deleted. * tbl/main.c (process_format): Rework so that opt->tab_char is recognized only when appropriate. * ps/Makefile (clean): Remove pfbtops. Sun Jun 16 09:37:19 1991 James Clark (jjc at jclark) * lib/font.c (text_file::next): Don't return if we have got a blank line. Fri Jun 14 09:52:26 1991 James Clark (jjc at jclark) * refer/refer.c (store_reference): Get hash code from old_table[i] when rehashing the table. Thu Jun 13 01:26:43 1991 James Clark (jjc at jclark) * eqn/box.c (box::top_level): Save size and prev size using \R and restore it afterwards. Set the size to the size at the beginning of the line. * eqn/pbox.h: Declare SAVED_INLINE_PREV_SIZE_REG, SAVED_INLINE_SIZE_REG, and SAVED_SIZE_REG. * refer/Makefile (limits.h): Use ./genlimits. Wed Jun 12 16:05:34 1991 James Clark (jjc at jclark) * refer/index.c: Delete declarations of stat() and fstat(). Tue Jun 11 14:52:49 1991 James Clark (jjc at jclark) * tty/tmac.tty: Add character definitions for \(>= and \(<=. Mon Jun 10 22:49:48 1991 James Clark (jjc at jclark) * etc/grog.sh, etc/grog.pl: Change regex for .PS. Fri Jun 7 09:13:06 1991 James Clark (jjc at jclark) * troff/input.c (token::get_char): Handle \e. * refer/linear.c: Delete declarations of fstat() and stat(). Wed Jun 5 09:11:59 1991 James Clark (jjc at jclark) * troff/node.c, troff/env.c, troff/input.c, Makefile: Remove OP_DELETE_BROKEN stuff, since we now have a fix for g++. Mon Jun 3 13:41:32 1991 James Clark (jjc at jclark) * troff/input.c (do_define_macro): Improve error handling for end of file while defining macro. Sun Jun 2 10:20:24 1991 James Clark (jjc at jclark) * eqn/box.h: Fix declaration of set_gsize. * eqn/box.c (set_gsize): Make argument const char *. (gsize): Declare as char *. * eqn/main.c (main): Don't convert gsize to int. * eqn/lex.c (do_gsize): Pass char * to set_gsize. * Version 1.02 released. Sat Jun 1 12:19:46 1991 James Clark (jjc at jclark) * macros/tmac.andoc: New file. * macros/Makefile: Install tmac.andoc. * troff/node.c, troff/env.c, troff/input.c: Conditionalize use of operator new and delete on OP_DELETE_BROKEN not being defined. * Makefile: Mention OP_DELETE_BROKEN. Mon May 27 13:49:07 1991 James Clark (jjc at jclark) * Makefile (bindist): Pass SUBFLAGS. Sun May 26 14:13:22 1991 James Clark (jjc at jclark) * Makefile, groff.c: Pass definitions to groff.c via device.h. * tty/tty.c (tty_font::load_tty_font): Avoid shadowing parameter. * ps/Makefile, ps.c: Pass BROKEN_SPOOLER_FLAGS via broken.h. * ps/ps.h, ps/psrm.c: Make comment_table and header_comment_table local to resource_manager::process_file. * groff.sh: With -TXps pass -printCommand option to gxditview. * groff.c (possible_command::print): Implement using append_arg_to_string. * xditview: Merge in new implementation with own ChangeLog. Sat May 25 18:33:20 1991 James Clark (jjc at jclark) * groff.c (main): Implement PRINT_OPTION. (append_arg_to_string): New command. (device_table): Set PRINT_OPTION flag for Xps. Fri May 24 09:48:58 1991 James Clark (jjc at jclark) * troff/groff.h: Rename to troff.h. * pic/lex.c (lookup_keyword, docmp): New functions. (get_token): Use new lookup_keyword. Don't include key.h. * pic/key.[ch], pic/pic.gperf: Deleted. * pic/Makefile: Remove gperf stuff. * pic/Makefile, pic/output.h: Move definition of TEX_SUPPORT into output.h. * pic/tex.c: Move include of pic.h before test of TEX_SUPPORT. * troff/Makefile, troff/node.c: Move definition of STORE_WIDTH into node.c. * etc/grog.pl, etc/grog.sh: Support -mdoc. Thu May 23 12:30:49 1991 James Clark (jjc at jclark) * dvi/devdvi/texr.map, dvi.devdvi/texi.map, dvi/devdvi/texb.map: Add lq and rq. dvi/devdvi: Regenerate fonts. * ps/devps/textmap: Add lq and rq. * ps/devps: Regenerate fonts. * tty/devascii/R.proto, tty/devlatin1/R.proto: Add lq and rq. * macros/tmac.e: Define \*(lq and \*(rq to be \(lq and \(rq. * pic/object.c (position_rectangle): When checking radius cope with possiblity that width or height is negative. (box_object::box_object): Have separate xrad and yrad with signs matching signs of dim components. (box_object::{north,south}_{east,west}): Use xrad and yrad. (box_object::print): With rounded boxes use absolute values for dim and rad arguments. * lib/Makefile, lib/fontfile.o: Pass definition of FONTPATH in fontpath.h. * eqn/Makefile, eqn/main.c: Pass definition of DEVICE in device.h. * various files: Add explicit destructors to keep Saber CC +d happy. Wed May 22 11:37:11 1991 James Clark (jjc at jclark) * eqn/box.c (box::top_level): Restore fonts correctly after font changes in line containing inline equation. Also restore previous font as well as current font. * eqn/pbox.h: Define necessary string and register names. * troff/input.c (token::next): Case 'R' calls do_register. (do_register): New function. Tue May 21 11:28:23 1991 James Clark (jjc at jclark) * groff.c, groff.sh: Support Xps device. Allow each device to have a pseudo_name and a real_name. * groff.c (run_commands): Don't print `Broken pipe' messages. * ps/pfbtops.c: New file. * ps/Makefile: Add pfbtops. * troff/number.c (parse_term): Improved error message. Mon May 20 11:22:14 1991 James Clark (jjc at jclark) * groff.c, groff.sh, etc/grog.sh, etc/grog.pl: Support grefer. * Makefile: Integrate refer. * refer: New directory. * man/grefer.man, man/glookbib.man, man/gindxbib.man, man/lkbib.man: New files. * man/Makefile: Support refer man pages. * lib/lib.h: Declare is_prime. * lib/prime.c: New file. * troff/input.c (macro_source): New function. (init_input_requests): Bind "mso" to macro_source. * troff/env.c (environment::possibly_break_line): Maintain pointer to pointer to node to be split in ndp so as to avoid using address of freed node. * troff/env.c (environment::hyphenate_line): Maintain pointer to pointer to first node to be hyphenated in startp so as to avoid using address of freed node. * troff/env.c (class trie, class hyphen_trie): Make the elements of the trie be of type char not unsigned char. Declare arguments to be const char* instead of unsigned char *. * troff/env.c (hyphenate): Initialize hbuf[0]. * troff/input.c (set_string): Declare p to be char * and cast *p to unsigned char when necessary. * troff/input.c (do_define_macro): Declare s to be const char*. Cast element to unisgned char when necessary, Declare d to be an int. Handle EOF better. * troff/Makefile, troff/input.c: Different scheme for passing definitions of MACROPATH, HYPHENFILE and DEVICE. Tue May 14 13:41:36 1991 James Clark (jjc at jclark) * tty/devascii/R.proto: Delete entry for em. * tty/devlatin1/R.proto: Likewise. Sat May 11 11:13:28 1991 James Clark (jjc at jclark) * troff/input.c (translate): Stop when we get a space. Treat eof like newline. * macros/tmac.an (IP): Only pass quoted argument to TP when \n(.$>1. Wed Apr 24 19:24:33 1991 James Clark (jjc at jclark) * tbl/main.c (process_format): A font name following a `f' modifier that starts with a digit can be only one character long. Also deal with EOF on the second character of the font name. Wed Apr 17 11:23:43 1991 James Clark (jjc at jclark) * troff/input.c (token::next): Turn \~ into an unbreakable_space_node. * troff/node.c (unbreakable_space_node): New class. * troff/node.h: Declare it. Tue Apr 16 10:47:12 1991 James Clark (jjc at jclark) * dvi/dvi.c (dvi_printer::set_char): Make code an int. Check that it's >= 0, before outputting it as a single byte. Mon Apr 15 11:20:23 1991 James Clark (jjc at jclark) * lib/font.c: Make font_char_metric::code an int. (font::get_code): Change return type to int. (font::load): Allow code to be arbitrary integer. * lib/font.h (font::get_code): Change return type to int. (font::number_to_index): Change argument type to int. * troff/input.c (token::next): In case 'N', allow any value. Store value in token::val. (token::operator==): For TOKEN_NUMBERED_CHAR test equality of val. (token::get_char, token::add_to_node_list, token::process): Get number from val. (charinfo::set_number): Change argument to int. (charinfo::get_number): Require that NUMBERED flag be set. (get_charinfo_by_number): Store numbered characters not between 0 and 255 in a dictionary. * troff/charinfo.h (get_charinfo_by_number): Change argument type to int. (charinfo::number): Change type to int. (charinfo::set_number): Change type of set_number to int. * troff/node.c (troff_output_file::put_char_width, troff_output_file::put_char): Test whether character is numbered using charinfo::numbered(). * driver/printer.c (printer::set_numbered_char): Allow arbitrary values of num. * lib/nametoindex.c: New implementation to cope with arbitrary number characters. * troff/input.c (token::operator==): Test val for TOKEN_CHAR_HEIGHT, TOKEN_CHAR_SLANT, TOKEN_FONT_POSITION, and TOKEN_SIZE. * man/Makefile: Add definiton of BROKEN_SPOOLER_FLAGS. (.man.n): sed out @BROKEN_SPOOLER_FLAGS@. Sun Apr 14 12:57:00 1991 James Clark (jjc at jclark) * ps/devps/zapfdr.ps: Don't copy UniqueID. Avoid use of newdict variable. * all Makefiles: rm targets of cp and >. * xditview/xtotroff.c (MapFont): Unlink troff_name before opening it. * eqn/lex.c (def_table): Add dollar. Sat Apr 13 13:02:44 1991 James Clark (jjc at jclark) * troff/input.c (do_width): Push back newline before closing delim like do_bracket. Fri Apr 12 15:16:03 1991 James Clark (jjc at jclark) * groff.c (possible_command::prepend_arg): New function. (main): Prepend device -m option. * groff.sh: Put device -m options before command-line options. Tue Apr 9 10:24:43 1991 James Clark (jjc at jclark) * macros/tmac.an (IP): Quote argument to TP. * ps/ps.c (main): New option -b, which sets... (broken_flags): New variable. (ps_printer::~ps_printer): Incorporate the setup section in the prolog if (broken_flags & NO_SETUP_SECTION). (ps_printer::begin_page): Generate {Begin,End}PageSetup comments. (ps_printer::merge_download_fonts, ps_printer::merge_import_fonts, ps_printer::merge_ps_fonts, ps_printer::print_font_comment, ps_printer::print_needed_font_comment, ps_printer::print_supplied_font_comment, ps_printer::print_include_font_comments, ps_printer::lookup_doc_font, ps_printer::download_fonts, ps_printer::read_download_file, read_document_fonts, add_font, skip_line, parse_fonts_arg, document_font::document_font, document_font::~document_font, document_font::download, ps_output::include_file): Deleted. (ps_printer::~ps_printer): Generate %%EOF. Generate %!PS-Adobe-3.0 rather than %!PS-Adobe-2.0. Make calls to resource_manager::need_font for each font that we used. Replace calls to merge_ps_fonts, merge_download_fonts, print_font_comment, print_supplied_font_comment, print_needed_font_comment by call to resource_manager::print_header_comments. Output %%Orientation comment. Output %%Requirements: numcopies comment if ncopies > 1. Don't output the prolog directly. Instead call resource_manager::output_prolog. Only define #copies when ncopies > 1. Delete calls to print_include_font_comments and download_fonts. Add call to resource_manager::document_setup. (ps_printer::do_file): Call resource_manager::import_file instead of including it ourselves. (ps_printer::do_import): Likewise. Also don't call merge_import_fonts. Push userdict on the dictionary stack before and pop it afterwards. Move declaration of ps_output into ps.h. * ps/psrm.c: New file implementing resource_manager class. * ps/ps.h: New file declaring ps_output and resource_manager classes. * ps/devps/zapfdr.ps: * ps/devps/symbolsl.ps: * ps/devps/prologue: Use 3.0 conventions. * ps/Makefile: Pass definition of BROKEN_SPOOLER_FLAGS in DEFINES. Add default definition of BROKEN_SPOOLER_FLAGS. * Makefile: New variable BROKEN_SPOOLER_FLAGS. Add BROKEN_SPOOLER_FLAGS to SUBFLAGS. Mon Apr 8 09:26:54 1991 James Clark (jjc at jclark) * etc/grog.pl: New file. * Makefile (GROG): New variable. Add GROG to SUBFLAGS. * etc/Makefile (GROG): New variable. (install.nobin): Install $(GROG) rather than grog.sh. Thu Apr 4 11:36:45 1991 James Clark (jjc at jclark) * eqn/special.c (special_box::compute_metrics): Make the input and output strings the same. Get the new height and depth from the predefined height and depth registers. Also make subscript kern and skew available. (special_box::compute_subscript_kern, special_box::compute_skew): New functions. * eqn/box.c (pointer_box::compute_skew, simple_box::compute_metrics, box::top_level) * eqn/text.c (prime_box::compute_metrics, prime_box::comput_subscript_kern) * eqn/limit.c (limit_box::compute_metrics): * eqn/delim.c (build_extensible, delim_box::compute_metrics): * eqn/sqrt.c (sqrt_box::compute_metrics): Protect possibly negative numbers in `nr' requests with a leading 0. Wed Apr 3 15:58:23 1991 James Clark (jjc at jclark) * eqn/special.c: New file. * eqn/eqn.y: Declare token SPECIAL. Make it right associative. Add new rule for simple. * eqn/lex.c (token_table): Add SPECIAL. * eqn/box.h: Declare make_special_box. * eqn/Makefile: Add special.[co]. Sat Mar 30 10:57:53 1991 James Clark (jjc at jclark) * ps/devps/prologue: Possibly set packing to true while defining. Create grops dictionary here. Initialize local variables before defining procedures. (PICTURE): Rename to PBEGIN. Also do save, noop showpage, count the dictionary stack. Set strokeadjust and overprint to false if the relevant operators are defined. (PEND): New procedure. * ps/ps.c (ps_printer::~ps_printer): In the prolog just include prologue. Do everything else in the setup section. (ps_printer::do_import): Just call PBEGIN and PEND around the picture. Also push userdict before, and pop it afterwards. Wed Mar 27 07:59:50 1991 James Clark (jjc at jclark) * troff/node.c (bracket_node::tprint): Brackets were being printed 1m too low. * macros/tmac.an (SH, SS): Set fill mode. Tue Mar 26 07:46:31 1991 James Clark (jjc at jclark) * troff/div.c (top_level_diversion::begin_page): Set high_water_mark to 0. Fri Mar 22 09:19:46 1991 James Clark (jjc at jclark) * man/mdate.sh: New file. * man/mdate.c: Deleted. * man/Makefile: Use mdate.sh instead of mdate. (mdate): Deleted. * eqn/lex.c (do_gsize): Supply missing argument to error message. Tue Mar 19 11:06:50 1991 James Clark (jjc at jclark) * man/mdate.c: New file. * man/*.man: Replace modification date by @MDATE@. * man/Makefile (.man.n): Replace @MDATE@ by `mdate $<`. (mdate): New target. * lib/font.c (text_file::next): Deal with arbitrarily long lines. Remove invalid input characters. Mon Mar 18 08:32:25 1991 James Clark (jjc at jclark) * macros/tmac.s (pg*start-col): Do .ns *after* running the hooks. Sat Mar 16 03:52:25 1991 James Clark (jjc at jclark) * troff/div.c (begin_page): Change behaviour when !first_page_begun and !break_flag. * troff/input.c (do_name_test): Return 0 if argument is empty. * troff/input.c (read_long_escape_name): Require closing ] to be at same input level as opening [. * troff/input.c (read_increment_and_escape_name): New function. (get_copy, process_input_stack): Use this for \n. Fri Mar 15 00:31:48 1991 James Clark (jjc at jclark) * troff/div.c (top_level_diversion::begin_page): Ignore the current value of page_number if !first_page_begun. * groff.c (main): Fix declaration of buf. * troff/input.c (do_name_test): New function. (token::next): Implement \A. (token::next): Implement \e by turning it into a TOKEN_ESCAPE. (token::description, token::add_to_node_list, token::process): Handle TOKEN_ESCAPE. * troff/token.h: New token TOKEN_ESCAPE. Thu Mar 14 10:22:26 1991 James Clark (jjc at jclark) * pic/main.c (do_picture): Allow space before and after filename following `<'. Check that the filename is not empty. Wed Mar 13 12:49:40 1991 James Clark (jjc at jclark) * Version 1.01 released. * dvi/devdvi/CompileFonts: Add cm*ss10 fonts. * dvi/tmac.dvi: ftr HR to H. * macros/tmac.e: Round up computation of $r. * xditview/tmac.X: Don't give up completely in compatibility mode. Use \n(.s instead of \n[.s]. * dvi/tmac.dvi: Don't give up completely in compatibility mode. Use \(ci instead of \[ci]. Use \n(.s instead of \n[.s]. Add u to factors inside \s[...]. Rename frac to dvi-frac. Translate \(FM onto \[prime] and \(!/ onto \[slashnot]; use these short names in the char definitions. * ps/tmac.ps: Don't give up completely in compatibility mode. Fix the fraction definitions to use \n(.s and \(f/. Add an extra quote in front of \n(.s. Add u to factors inside \s[...]. Mon Mar 11 12:01:20 1991 James Clark (jjc at jclark) * tty/tmac.tty: Call the nroff request. * macros/tmac.e ((x, )x): Better definitions that work properly in a diversion. (@0, @1): Helper macros for (x. * macros/tmac.e ($s, hl): Use \l rather than \D. * tty/tmac.tty: Make it work better in compatibility mode. (pchar): Rename to tty-char. * macros/tmac.e (@E): New macro. (r, i, b, rb, bi): Use @E. * macros/tmac.e (@F): Don't use (;...) syntax. * macros/tmac.e: Remove mention of \*(||/revisions. Mention that it was modified for groff. * macros/tmac.e: Make sure \n(ps and \n(es are >= \n(.V. * macros/tmac.e (<., .>): Removed. ([., .]): If \n(.V>=1v, use [] instead of superscripting. * macros/tmac.e: Remove check that groff is being used. * macros/tmac.e (@C): Change families only if using groff; turn compatibility mode off while changing familes. Save compatibility mode before changing families and restore it afterwards. * macros/tmac.e (@h): Remove test for offset + line length. * macros/tmac.e (sorry): Rename to @S. Use \$1 instead of \$0 (lo, th, ac): Define to call @S instead of using als. * macros/tmac.e: Make $r and $R now contain \n(.v*100/\n(.sp, ie the ratio of the vertical spacing to the point size in units expressed as a percentage. Use these instead of $10r and $10R, Delete $10r and $10R. * lib/font.c (font::load): In default computation of space_width, divide by sizescale. Use scale_round. * macros/tmac.an (TP): Don't call `nf'. (an-do-tag): Don't call `fi'. Sun Mar 10 09:52:35 1991 James Clark (jjc at jclark) * troff/input.c (process_input_stack): Handle the case where spaces at the beginning of an input line are followed by a newline. Thu Mar 7 20:18:07 1991 James Clark (jjc at jclark) * groff.c (device_table): Add PIC_X_OPTION for dvi device. * groff.sh: Use pic -x with the dvi device. * dvi/devdvi/FontMakefile (H): Don't use -s. * dvi/devdvi/HI, dvi/devdvi/HB: New files. * dvi/devdvi/Makefile: Add HI and HB to FONTS. * dvi/devdvi/FontMakefile: Add rules for HI and HB. Include these in FONTS. Mon Mar 4 13:20:14 1991 James Clark (jjc at jclark) * ps/psfig.diff: New file. * ps/tmac.psfig: New file. Sat Mar 2 00:15:09 1991 James Clark (jjc at jclark) * macros/tmac.s (]=, ref*do-tl, ref*bib-print): Deleted. (]-): Don't call ref*do-tl. * macros/tmac.s (ref*end-print): Use XP if [F not defined. * macros/tmac.s (ref*normal-print): Call FS rather than fn@do-FS. (fn@do-FS): Rename to fn*do-FS. * troff/input.c (transparent_translate): New function. (process_input_stack): Apply transparent_translate before calling diversion::transparent_output(unsigned char). Wed Feb 27 00:13:25 1991 James Clark (jjc at jclark) * troff/input.c (do_define_macro): Define the macro before calling skip_line. * xditview/Makefile: Add DEVICES variable. Change install target to use this. Tue Feb 26 10:46:22 1991 James Clark (jjc at jclark) * groff.c (run_commands): Handle the possibility that there are child processes other than those forked by us. Sun Feb 24 21:32:30 1991 James Clark (jjc at jclark) * lib/string.c (string::append): New function. * lib/stringclass.h: Declare it. Thu Feb 21 11:49:26 1991 James Clark (jjc at jclark) * eqn/main.c (main): New option -N which sets no_newline_in_delim_flag. (do_file): If no_newline_in_delim_flag is set don't allow newlines in delimiters. * groff.c (main): Pass -N on to eqn. (help, synopsis): Mention -N. * groff.sh: Implement -N. Wed Feb 20 15:16:10 1991 James Clark (jjc at jclark) * macros/tmac.s (]=, ref*bib-print, ref*do-tl): New macros. (]-): Call ref*do-tl if ref*need-tl is non-zero. (XP): Allow as initializer. Tue Feb 19 14:09:06 1991 James Clark (jjc at jclark) * troff/env.c (environment::wrap_up_field): If field_spaces are non-zero and we have a current_tab, subtract padding from tab_distance. If this makes tab_distance <= 0, use the next tab stop instead. If there isn't any next tab or it's a left tab, wrap up the current tab. (environment::start_field): Initialize tab_precedes_field. (environment::wrap_up_tab): If there's a current field, update pre_field_width, field_distance and tab_precedes_field. * troff/env.h (environment::tab_precedes_field): New member. Fri Feb 15 01:24:00 1991 James Clark (jjc at jclark) * ps/ps.c (ps_printer::do_file): New function. (ps_printer::special): Bind to `file' special. (ps_printer::do_exec): Set ndefined_styles to 0. Sat Feb 9 03:03:04 1991 James Clark (jjc at jclark) * eqn/text.c (split_text): Grok \* and similar escapes sequences. Avoid stripping first character from the start of unrecognized escapes. Use lex_error instead of error to report errors. * eqn/lex.c (get_token): Rework handling of escapes. (lex_error): Move declaration into... * eqn/eqn.h. * xditview/xditview.c (main): Make -page option work. * Makefile: Correct comment about -DBROKEN_SPOOLER and pageview. Wed Feb 6 12:28:43 1991 James Clark (jjc at jclark) * macros/tmac.s (B2): Correct size of box. Tue Feb 5 00:37:35 1991 James Clark (jjc at jclark) * macros/tmac.s (B2): Postpone drawing the box until in the top-level diversion. * tty/tmac.tty: Add font translations for C, CR, CW. * groff.c (synopsis, help): Document -i. * groff.sh: Implement -i. * macros/tmac.s (@NH): Put a `.' after multi-part numbers. Simplify the construction of SN. * troff/number.c (parse_term): Give `|' a higher precedence. * tbl/table.c (numeric_text_entry::simple_print): Parenthesise accordingly. * macros/tmac.s (B2): Use par@finish instead of par@reset. Mon Feb 4 12:36:09 1991 James Clark (jjc at jclark) * lib/string.c (string::move): New function. * lib/stringclass.h: Declare it. Sat Feb 2 16:02:16 1991 James Clark (jjc at jclark) * troff/env.c (distribute_space): Add optional argument `force_forward'. (environment::wrap_up_field): Call distribute_space with `force_forward' argument of 1. Fri Feb 1 19:36:33 1991 James Clark (jjc at jclark) * lib/string.c, lib/stringclass.h (string::operator+=(char)): Inline it. Move reallocation into... (string::grow1): New function. * pic/Makefile, tbl/Makefile, eqn/Makefile, ps/Makefile: Redo dependencies to include library header files. * lib/Makefile: Make string.c and lf.c depend on stringclass.h. Thu Jan 31 15:02:27 1991 James Clark (jjc at jclark) * macros/tmac.s (@NH): Use the same number registers than -ms does for the heading level counters. Use the same string that -ms does for the number for this heading. Wed Jan 30 14:25:40 1991 James Clark (jjc at jclark) * lib/new.c (operator new): Cast result of malloc to char *. * troff/input.c (spring_trap, lookup_request): Add assert that nm is not null. Tue Jan 29 18:08:05 1991 James Clark (jjc at jclark) * groff.c (main): Support -i. Sun Jan 27 13:23:17 1991 James Clark (jjc at jclark) * pic/pic.h: Include . * ps/ps.c: Add declaration of mktemp. * Makefile: Add -DHAVE_UNION_WAIT option for CPPDEFINES. * groff.c: If HAVE_UNION_WAIT is defined, declare wait()'s argument as union wait *. (run_commands): If HAVE_UNION_WAIT is defined cast wait()'s argument to union wait *. Sat Jan 26 12:04:52 1991 James Clark (jjc at jclark) * tty/tmac.tty: Add definition of \(co. * pic/object.c (make_arc): Only increase radius when radius strictly less than d. (arc_object::update_bounding_box): May need to add 4.0 to end_quad more than once. * troff/env.c (environment::environment(symbol), environment::environment(const environment *)): Initialize input_trap_count. Sat Jan 19 08:18:35 1991 James Clark (jjc at jclark) * tbl/main.c (main): Add exit(0). * ps/ps.c (ps_printer::~ps_printer): Use fseek instead of rewind. * pic/main.c (main): * eqn/main.c (main): * tbl/main.c (main): * etc/soelim.c (main): * driver/printer.c (printer::~printer): * troff/node.c (real_output_file::~real_output_file, real_output_file::flush): Check for errors on stdout. * most files: Add 1991 to copyright notice. * macros/tmac.s: Don't test \n(.x and \n(.y. * troff/input.c (token::next): Rename `escape_char' label to `handle_escape_char' and `normal_char' label to `handle_normal_char'. Thu Jan 17 15:46:35 1991 James Clark (jjc at jclark) * groff.c (main, synopsis, help): Support -a option. * groff.sh: Likewise. Also eliminate Zflag variable by adding -z to trflags while parsing options. Tue Jan 15 13:07:27 1991 James Clark (jjc at jclark) * troff/number.c (parse_term): With `m', `M' and `n' scale indicators, convert scale factor to hunits before scaling. Mon Jan 14 12:39:12 1991 James Clark (jjc at jclark) * lib/font.c (scale_round): Better test for overflow when n is negative. Thu Jan 10 11:10:56 1991 James Clark (jjc at jclark) * tbl/main.c (process_format): Add second argument of type options*. Change callers. Allow opt->tab_char as well as '\t' between format items. Mon Jan 7 12:30:18 1991 James Clark (jjc at jclark) * macros/tmac.an (PD): With no arguments, make sure register PD is at least \n[.V]. (TH): Call PD with no argument, instead of setting register PD directly. Sun Jan 6 11:18:39 1991 James Clark (jjc at jclark) * Version 1.00 released. Sat Jan 5 08:44:30 1991 James Clark (jjc at jclark) * ps/tmac.ps, xditview/tmac.X: Add font translation of C to CR. * dvi/devdvi/DESC: Mount CW instead of CR. * dvi/tmac.dvi: Add definition of \(tm. * dvi/devdvi/texsy.map: Add lh, and rh. * dvi/devdvi/texex.map: Add lt, rt, lb, rb, lk, rk. * dvi/devdvi/texmi.map: Add *o. Regenerate fonts. * dvi/devdvi/FontMakefile: Generate H from cmss10. * dvi/devdvi/Makefile: Install H. * dvi/devdvi/H: New file. Fri Jan 4 15:04:57 1991 James Clark (jjc at jclark) * troff/env.c (vertical_spacing): Don't allow vertical spacing to be 0. Thu Jan 3 13:41:19 1991 James Clark (jjc at jclark) * macros/tmac.s (@EN): Add \n(.V to the argument to ds@need. * macros/tmac.pic (PS): Avoid attempting to set negative indent. * macros/tmac.s (@EN): Handle the case where the equation is empty but the label is not. Wed Jan 2 10:31:44 1991 James Clark (jjc at jclark) * troff/groff.h: New warning category WARN_SPACE. * troff/input.c: Add WARN_SPACE to DEFAULT_WARNING_MASK. Add WARN_SPACE to warning_table. (interpolate_macro): Give a warning of type WARN_SPACE if the name is longer than two characters and is not defined, but the first two characters do make a defined name. * PROBLEMS: New file. * CHANGES: New file. * README-0.6, README-1.00: Deleted. * groff.c, groff.sh: Add X75-12 and X100-12 devices. * xditview/devX75/Makefile: Make devX75-12. * xditview/devX100/Makefile: Make devX100-12. * xditview/devX100/eqnchar, xditview/devX75/eqnchar, dvi/devdvi/eqnchar, ps/devps/eqnchar: Remove use of \R. Tue Jan 1 19:24:01 1991 James Clark (jjc at jclark) * README-0.7: Rename to README-1.00. * macros/tmac.pic: New file. * macros/Makefile (install.nobin): Install tmac.pic. Mon Dec 31 10:40:53 1990 James Clark (jjc at jclark) * troff/env.c (hyphen_word): Correct the test for whether the token is a hyphen. Reset npos to 0. * macros/tmac.s (par@sup-start, par@sup-end): New implementations. Sun Dec 30 15:53:13 1990 James Clark (jjc at jclark) * macros/tmac.s (ds*common-end): Call par*reset. (PE): Likewise. (par@reset-indent): Deleted. * macros/tmac.s (@IP): Divert the label. Sat Dec 29 14:33:32 1990 James Clark (jjc at jclark) * xditview/draw.c (setGC): Use a line width of .1m rather than .04m by default; round rather than truncate value. * tbl/table.c (class empty_entry): New class. (empty_entry::empty_entry, empty_entry::line_type): New functions. (table::add_entry): Represent empty entries by objects of type empty_entry. (table_entry::line_type): Return -1. (table::determine_row_type): Ignore entries with line_type 0. Treat type -1 as non-lines. Fri Dec 28 15:04:41 1990 James Clark (jjc at jclark) * ps/devps/textmap, xditview/libXdvi/DviChar.c, tty/devlatin1/R.proto, macros/tmac.s: Rename \(-d to \(Sd. Thu Dec 27 12:35:47 1990 James Clark (jjc at jclark) * ps/devps/textmap: Add `sd', `/_' and `3d' characters. * xditview/libXdvi/DviChar.c: Likewise. * dvi/devdvi/texsy.map: Add `<<', `>>'. Wed Dec 26 13:33:23 1990 James Clark (jjc at jclark) * troff/div.c (top_level_diversion::begin_page): Call init_output() if the_output is 0. Sat Dec 22 12:35:29 1990 James Clark (jjc at jclark) * troff/input.c: Replace ESCAPE_E by ESCAPE_e and ESCAPE_C by ESCAPE_c. (get_copy): Turn \E into ESCAPE_E. (token::process, asciify): Handle ESCAPE_E. * macros/tmac.s (ds*common-end, par@reset): Add `.rj 0'. (RD): New macro. (DS): Implement `.DS R'. Fri Dec 21 11:41:53 1990 James Clark (jjc at jclark) * macros/tmac.s (FS): New macro. * macros/tmac.s (fn@do-FS): Use @LP instead of LP. * macros/tmac.s (cov*tl-init): Remove after first execution instead of aliasing to @nop. Call top of page macro explicitly instead of setting trap; call @init first. Set pg@top as top of page macro. (cov*auto-init): Deleted. Set cov*tl-init instead of cov*auto-init as top of page trap. (TL, LP): Do a break instead of calling cov*tl-init. (cov*print): With RP format but no TL, alias FS and FE to @FS and @FE; in this case also give a warning and always start another page. No need to set pg@top here. (cov*tl-init): Rename to cov*first-page-init. * macros/tmac.s (RP): Do `.pn 0'. (cov*tl-init): With RP format don't do `.pn 0'. * macros/tmac.s (pg@cs-top): Set no space mode. * macros/tmac.s (par@TL, par@AU, par@AI): New macros. (cov*ab-init): Alias TL, AU and AI to these. Thu Dec 20 10:10:50 1990 James Clark (jjc at jclark) * macros/tmac.s (@EQ): Move the space before the equation into @EN (@EN): Do nothing unless \n[dl] is > 0. Tue Dec 18 12:20:47 1990 James Clark (jjc at jclark) * pic/object.c (ellipse_object::radius): New function. * VERSION: Change version to 0.7. * tbl/table.c (block_entry::do_divert): Declare return type as void. (block_entry::divert, alphabetic_block_entry::divert): Return 1. Mon Dec 17 12:30:34 1990 James Clark (jjc at jclark) * troff/column.c: New file. * troff/Makefile: Corresponding changes. * troff/hvunits.c (scale(vunits, vunits, vunits)): New function. Friend of vunits. * troff/div.c (top_level_diversion::space): If the space causes the first-page transition and springs a trap, truncate the space to 0. Fri Dec 14 12:30:02 1990 James Clark (jjc at jclark) * ps/ps.c (ps_printer::do_import): Add a `clear' after including the document. * pic/troff.c (troff_output::line_thickness, troff_output::set_fill): Do a horizontal motion to compensate for the width of the \D escape sequence. Thu Dec 13 10:17:14 1990 James Clark (jjc at jclark) * xditview/tmac.X: Reinstate definition of \(rn, but only for X100 (not X75). * eqn/sqrt.c (sqrt_box::compute_metrics): Supply missing argument to printf. * tbl/table.c (simple_entry::simply_print): Don't declare as pure. Supply empty definition. (text_entry::simple_print, simple_text_entry::simple_print): Delete declarations. (table::add_entry): Represent empty entries by objects of type `simple_entry'. Wed Dec 12 08:50:48 1990 James Clark (jjc at jclark) * troff/Makefile: Remove -DHYPHEN_CONTROL from DEFINES. * tbl/table.c (left_text_entry::add_tab): New function. * macros/tmac.s: Make @RT an alias for par@reset. Make RT initialize like LP. Mon Dec 10 11:19:55 1990 James Clark (jjc at jclark) * troff/env.c (environment::start_field): Give an error message if there is no next tab. Sun Dec 9 11:46:40 1990 James Clark (jjc at jclark) * troff/env.c (hyphenate): Skip initial elements with zero hyphenation code. * macros/tmac.s (par@init): Keep VS in points rather than units. Sat Dec 8 23:00:27 1990 James Clark (jjc at jclark) * pic/main.c (main): Implement `-c' option. * pic/output.h: Declare make_tpic_output(). * pic/tex.c (tex_output::set_pen_size): Make it virtual and protected. (tpic_output): New class. (tpic_output::tpic_output, tpic_output::set_pen_size, tpic_output::command, make_tpic_output): New functions. Fri Dec 7 11:57:41 1990 James Clark (jjc at jclark) * tbl/main.c (main): Call `.ab' if \n(.g is false. Define TS/TE if they're not already defined. * tbl/table.c (init_output): Don't test \n(.g. * troff/input.c (do_if_request): Delete `g' condition. Recognize `d', `r' and `c' conditions even in compatibility mode. Tue Dec 4 09:13:47 1990 James Clark (jjc at jclark) * ps/tmac.ps (ps-bb): Protect against negative numbers in bounding box. Mon Dec 3 07:18:26 1990 James Clark (jjc at jclark) * troff/env.h (environment::prev_line_interrupted): New member. (environment::get_prev_line_interrupted): New function. * troff/env.c (environment::newline): Set prev_line_interrupted. (environment::environment(const environment *), environment::environment(symbol)): Initialize prev_line_interrupted. * troff/input.c (process_input_stack): Don't give special treatment to space and newline at the beginning of the line if the previous line was interrupted. Sat Dec 1 15:48:37 1990 James Clark (jjc at jclark) * eqn/eqn.y: Disallow PRIME by itself. * eqn/lex.c (token_table): Bind `opprime' instead of `prime' to PRIME. (def_table): Remove definition of '. Define prime to be `. * eqn/eqn.y: Split off part of rule `script' into a new rule `nonsup'. Fri Nov 30 10:23:44 1990 James Clark (jjc at jclark) * macros/tmac.s ({, }): New string aliases. Thu Nov 29 11:34:40 1990 James Clark (jjc at jclark) * README-0.7: New file. Wed Nov 28 10:09:57 1990 James Clark (jjc at jclark) * macros/tmac.s: New file. * man/groff_ms.man: New file. * Makefile: Add definition of TMAC_S. Pass TMAC_S in SUBFLAGS. * Makefile.bd: Similarily. * man/Makefile: Add groff_ms.n to MAN7PAGES. Replace @TMAC_S@. Add definition of TMAC_S. * macros/Makefile: Add definition of TMAC_S. Install tmac.s. * macros/TODO: New file. Sat Nov 24 20:04:54 1990 James Clark (jjc at jclark) * troff/env.c (right_justify): New function. (init_env_requests): Bind this to request "rj". (center_lines): Set right_justify_lines to 0. If we get a bad integer, center 1 line. (environment::environment(symbol), environment::environment(const environment *)): Initialize right_justify_lines. (environment::get_right_justify_lines): New function. (init_env_requests): Bind this to number_register ".rj". * troff/env.c (environment::choose_breakpoint): Implement hyphenation_margin and hyphenation_space. (environment::get_hyphenation_space, environment::get_hyphenation_margin): New functions. (init_env_requests): Bind these to .hys and .hym. (hyphenation_space_request, hyphenation_margin_request): New functions (init_env_requests): Bind these to hys and hym. (environment::environment(symbol), environment::environment(const environment *)): Initialize hyphenation_margin and hyphenation_space. * troff/env.h: Corresponding changes to class environment. Fri Nov 23 09:08:16 1990 James Clark (jjc at jclark) * troff/div.c (blank_line): Always do a break. * eqn/box.c (do_text): Turn off escapes while appending text to string. Thu Nov 22 10:58:59 1990 James Clark (jjc at jclark) * troff/input.c (while_break_request, while_continue_request): New functions. (init_input_requests): Bind these to "break" and "continue". (while_depth, while_break_flag): New variables. (while_request): Update while_depth. Break out of loop if while_break_flag is set. Wed Nov 21 10:54:40 1990 James Clark (jjc at jclark) * tbl/table.c (init_span_reg): Initialize span_width_reg to \n(.H rather than 0. Mon Nov 19 00:45:03 1990 James Clark (jjc at jclark) * Makefile: Include -DBROKEN_SPOOLER by default. Expand comment. * stringify: New file. * Makefile (groff.o): Use stringify. * xditview/tmac.X: Remove definition of \(rn. * xditview/libXdvi/DviChar.c: Remove radicalex from Adobe_symbol_map. Sat Nov 17 10:44:58 1990 James Clark (jjc at jclark) * tbl/table.c (table::add_entry): Allow alphabetic text blocks. (alphabetic_block_entry::alphabetic_block_entry, alphabetic_block_entry::divert, alphabetic_block_entry::print): New functions. (block_entry::divert): Split off body into ... (block_entry::do_divert): If the block is alphabetic, subtract 2n from the line length; also update the span width to dl+2n, and the alphabetic span width to dl. * driver/input.c (do_file): While reading argument to D command, when expanding buffer, multiply szp by sizeof(int) rather than 2 in the argument to memcpy. * tbl/table.c (compute_span_width): Add 2n rather than 1n to the width of alphabetic columns. Fri Nov 16 06:34:27 1990 James Clark (jjc at jclark) * troff/node.c (lookup_family): Supply second argument to lookup. * troff/dictionary.c (dictionary::lookup): After an unsuccesful search, return immediately if v is 0. * pic/troff.c: Define EQN_NO_EXTRA_SPACE_REG. (troff_output::start_picture): Set this reg. (troff_output::end_picture): Remove this reg * eqn/box.c (box::extra_space): Don't produce `\x's if EQN_NO_EXTRA_SPACE_REG is defined. * eqn/eqn.y: Allow just a PRIME to be a `simple'. * eqn/text.c (split_text): Map ' to \(fm when it's the first character. Thu Nov 15 10:35:06 1990 James Clark (jjc at jclark) * macros/tmac.e: Use font 3 instead of B in $c. Remove `bd' requests. * troff/div.c (top_level_diversion::top_level_diversion): Initialize page_number to 0. Wed Nov 14 21:41:58 1990 James Clark (jjc at jclark) * groff/troff (environment::environment(const environment *)): Initialize name to e->name, rather than "anonymous". Sat Nov 10 01:59:37 1990 James Clark (jjc at jclark) * xditview/libXdvi/Dvi.c (ShowDvi): If eof is encountered, reset requested_page. Split middle part into ... (FindPage): New function. (SetValues): If we don't yet know the last page, and the requested page is greater than the current page, call FindPage. Update the font_map_string before doing this. * xditview/tmac.X: Add definitions of \(sq, \(ga, \(dg and \(dd. Translate \(lh and \(rh into left and right double arrows. * troff/node.c (class hyphen_inhibitor_node): New class. (hyphen_inhibitor_node::hyphen_inhibitor_node, hyphen_inhibitor_node::copy, hyphen_inhibitor_node::same, hyphen_inhibitor_node::type, hyphen_inhibitor_node::get_hyphenation_type): New functions. (node::add_discretionary_hyphen): Use hyphen_inhibitor_node rather than dbreak_node(0, 0) to represent a `\%' at the beginning of a word. Fri Nov 9 16:05:38 1990 James Clark (jjc at jclark) * troff/node.h (dummy_node::get_hyphenation_type, transparent_dummy_node::get_hyphenation_type): Declare them. * troff/node.c: (dummy_node::get_hyphenation_type, transparent_dummy_node::get_hyphenation_type): New functions. Wed Nov 7 10:09:06 1990 James Clark (jjc at jclark) * xditview/libXdvi/draw.c: If M_PI not defined after including math.h, then define it. * xditview/Makefile: Add definition of AR. Pass it to the submake in libXdvi. * xditview/libXdvi/Makefile: Add definitions of AR and RANLIB. Tue Nov 6 10:14:27 1990 James Clark (jjc at jclark) * troff/dictionary.h (object_dictionary::alias): Declare return value as int. * troff/dictionary.c (object_dictionary::alias): Return non-zero if the old name was defined. * troff/input.c (alias_macro): Give a warning if the old name was not defined. * troff/reg.c (alias_reg): Likewise. Mon Nov 5 00:31:39 1990 James Clark (jjc at jclark) * troff/input.c (token::next): Delete implementation of \R. * macros/Makefile: Strip comments from tmac.e while installing it. * troff/input.c: New variable `nroff_mode'. (troff_request, nroff_request): New functions. (init_input_requests): Bind `troff' and `nroff' to troff_request and nroff_request. (do_if_request): Compute results of t and n conditions from nroff_mode. * text/text.c (split_text): Fix typo in >=. * eqn/lex.c: Add definition of `==' to def_table. Fri Nov 2 02:49:09 1990 James Clark (jjc at jclark) * pic/tex.c (tex_output::start_picture): Change the definitions of \graph and \graphtemp so that they work properly with Plain TeX. * pic/tex.c (tex_output::solid_arc): Ensure that the second angle argument to `ar' is not less than the first. * pic/pic.y: Allow a comma between elements of the variable list in the argument to `reset'. * pic/object.c (arc_object::arc_object): Fix computation of radius. * eqn/main.c (main): Add exit(0). Thu Nov 1 02:03:50 1990 James Clark (jjc at jclark) * troff/div.c (begin_page): Test no_space_mode after doing the break, but still push the page ejector cookie before doing the break. Also set the next page number after doing the break. * xditview/xditview.c (NewFile): Don't set the title and icon name if this is the first file and its name is `-'. * groff/groff.c: Define a new device flag XT_OPTION. Set it for the X75 and X100 devices. (main): If a device has the XT_OPTION flag set and there's exactly one file argument, pass the driver -xrm and -title options to set the icon name and window title to the name of the file. * troff/env.c (environment_switch): If there was an argument but it wasn't a valid number or name, then pop an environment but don't give an error message on underflow. * troff/number.c (start_number): Correct spelling in error message. * troff/input.c (token::delimiter): Don't print an error message if err is false. * xditview/libXdvi/parse.c (ParseInput): In case 'D', only call ParseDrawFunction if dw->display_enable is true. Wed Oct 31 05:49:50 1990 James Clark (jjc at jclark) * pic/pic.y: Parse text positioning like normal attributes, so as to allow `"text" at 0,0 ljust'. Don't allow `center' as a positioning attribute. Mon Oct 29 22:50:38 1990 James Clark (jjc at jclark) * tbl/main.c (process_data): When in state START while reading a text block, don't change to state MIDDLE if c is a newline. Sun Oct 28 21:59:56 1990 James Clark (jjc at jclark) * dvi/dvi.c (dvi_printer::begin_page): Rename `i' variable to `j' so as to avoid shadowing parameter. Wed Oct 24 18:35:39 1990 James Clark (jjc at jclark) * tbl/table.c (trim_space): Deleted. (table::add_entry): Don't call trim_space. Mon Oct 22 03:48:39 1990 James Clark (jjc at jclark) * VERSION: Change version to 0.6. * troff/number.c (parse_expr): Make == work. Sat Oct 20 11:28:17 1990 James Clark (jjc at jclark) * man/grog.man: New file. * man/Makefile: Add grog.n to MAN1PAGES. * etc/grog.sh: New file. * etc/Makefile: Install grog.sh as grog. Fri Oct 19 11:17:15 1990 James Clark (jjc at jclark) * troff/input.c (token::next): Implement \E. Thu Oct 18 11:56:24 1990 James Clark (jjc at jclark) * xditview/tmac.X: Change font translations to match tmac.ps. * troff/input.c (non_empty_name_warning): Don't give a warning if `\{' terminates the name. Tue Oct 16 10:04:23 1990 James Clark (jjc at jclark) * ps/devps/symbol.diff: New file. * ps/devps/FontMakefile: Mention symbol.diff. Sun Oct 14 11:46:46 1990 James Clark (jjc at jclark) * troff/node.c (font_position): Use get_long_name to read the external_name. * troff/env.c (environment_switch): If we get a number that's < 0 or >= NENVIRONMENTS, treat it like a name. Change NENVIRONMENTS to 10. * troff/groff.h: Remove definition of FONTS_MAX. * troff/node.h (class font_family): Make map a pointer instead of an array. Add a map_size member. Make it a class. Make nm const and public. Make invalidate_fontno a friend. * troff/node.c: Define font_table_size. Make font_info a pointer rather than an array. (class troff_output_file): Allocate font_position dynamically. Add nfont_positions member. (troff_output_file::set_font): Grow font_position if necessary. (troff_output_file::~troff_output_file): Delete font_position. (troff_output_file::troff_output_file): Allocate font_position. (grow_font_table): New function. (troff_output_file::really_begin_page, troff_output_file:really_copy_page): Use nfont_positions rather than FONTS_MAX. (mount_font_no_translate, mount_style): Call grow_font_table if necessary. (font_family::font_family): Allocate map. (font_family::make_definite): Grow map if necessary. Use font_table_size instead of FONTS_MAX. (font_family::~font_family): New function. (invalidate_fontno): Use font_family::map_size. (get_fontno, env_space_width, env_half_narrow_space_width, env_narrow_space_width, symbol_fotno, is_good_fontno, get_bold_fontno, make_glyph_node): Use font_table_size rather than FONTS_MAX. (next_available_font_position): Never return 0. Fri Oct 12 10:17:52 1990 James Clark (jjc at jclark) * ps/tmac.ps: Add font translations for compatibility with dpost. Thu Oct 11 12:09:03 1990 James Clark (jjc at jclark) * eqn/pile.c: Rename default_baseline_sep to baseline_sep. Move BASELINE_SEP_FORMAT and COLUMN_WIDTH_FORMAT into pbox.h. Move definitions baseline_sep, shift_down, column_sep, matrix_side_sep into... * eqn/box.c: Add them to param_table. * eqn/pbox.h: Add declarations to pbox.h. * troff/input.c (set_string): Cast value to unsigned char *. * troff/token.h (process_input_stack): Declare it static before declaring it a friend. Wed Oct 10 09:59:13 1990 James Clark (jjc at jclark) * dvi/devdvi/texex.map: Fix positions of extensible brace middle and bottom. * dvi/devdvi/EX: Regenerate. * troff/input.c (init_charset_table): Make ", ', ), ], *, \(dg transparent. Tue Oct 9 08:34:02 1990 James Clark (jjc at jclark) * eqn/lex.c: In defaults_table, make definition of `dot' call `dot_def'. Don't explicitly make it roman. Similarily for other accents. * pic/lex.c (for_input::for_input): Add by_is_multiplicative argument. (for_input::get, for_input::peek): Use this. (do_for): Add by_is_multiplicative argument. * pic/pic.y: Change optional_by clause to allow '*' after `by'. Change semantic value of optional_by to be a double plus a flag saying whethet the by clause is multiplicative. * eqn/lex.c (get_delimited_text): Remember location of start of definition. Improve error handling when EOF is encountered. * lib/font.h: Rename handle_x_command to handle_unknown_font_command. * lib/font.c (font::load): Call handle_unknown_font_command for any unknown command in the font description file. Don't call handle_x_command. Include the name of the command in the argv. Improve message for unknown command after kernpairs or charset command. * ps/ps.c (ps_font::handle_x_command): Rename to handle_unknown_font_command. Remove message about `x download' command. Give error message for wrong number of arguments. * ps/devps/afmtodit: Generate `encoding' instead of `x encoding'. * dvi/dvi.c (dvi_font::handle_x_command): Rename to handle_unknown_font_command. Give an error message for wrong number of arguments. Rename design_size to designsize. * dvi/tfmtodit.c (main): Generate `checksum' instead of `x checksum', `designsize' instead of `design_size'. Mon Oct 8 00:38:55 1990 James Clark (jjc at jclark) * eqn/*.[chy]: Change underaccent to uaccent. * eqn/eqn.y: Add rule for underaccent. Declare UNDERACCENT token; give it the same precedence as ACCENT. * eqn/other.c (make_underaccent_box): New function. * eqn/box.h: Declare it. * eqn/lex.c: Add UNDERACCENT to token_table. Add utilde to def_table. Sun Oct 7 11:25:16 1990 James Clark (jjc at jclark) * pic/pic.y (reset_all): New function. Called in rule for RESET. (parse_init): Call reset_all. (define_variable): When defining scale reset only those pre-defined variables that are scaled. (defaults_table): Add `scale' as non-scaled value. * pic/pic.y: Redo parsing of text adjustments: parse adjustments together with the text; allow any number of positioning words; allow center as a positioning word. * pic/object.c (output::compute_scale): Get picture maximum height and width from variables called maxpswid and maxpsht. * pic/pic.y: Add maxpswid and maxpsht to defaults_table. Sat Oct 6 10:16:56 1990 James Clark (jjc at jclark) * pic/object.c (object_spec::make_text): Multiply textht by number of text items. * pic/pic.y: Allow `sprintf("string", expr,...)' wherever text can occur. (do_sprintf): New function. (pic.gperf): Add sprintf token. (text, sprintf): New rules. * pic/pic.y: `rand()' with no arguments returns a random number in the range [0,1). * pic/pic.y: Allow a bare expression to be an attribute: change precedences to support this. Change optional_ordinal rule to optional_ordinal_last to avoid reduce/reduce conflict. * pic/object.c (object_spec::object_spec): Initialize direction. * pic/pic.y: Implement ^ operator meaning exponentiation. * troff/node.h: Add default argument to mount_font. * troff/node.c (font_position): Read an optional third argument giving the external_name. (mount_font): Add optional argument giving the external_name. (mount_font_not_translate): Have additional argument giving external name. Use this name to load the font. Pass both names to font_info::font_info. (font_info::font_info): Have additional argument giving external_name. (class tfont): New member external_name. (font_info::get_tfont): Use external name to construct tfont_spec. Fri Oct 5 04:03:13 1990 James Clark (jjc at jclark) * eqn/lex.c (init_table): Add argument giving device. Define name of device to be "1". (do_ifdef): Counts as true if the argument has been defined with `define'. * eqn/main.c (main): Call init_table with device argument. Make device local to main. * eqn/eqn.h: Change declaration of init_table. Remove declaration of device. * pic/lex.c (get_delimited): Allow text to be delimited by matching {}s. Don't recognize ending delimiter within a string. * troff/input.c (get_delim_name): New function. (token::next): Implement \C. * lib/font.c (font::load): Grok ---. Add an alias for each character based on its code. (font::get_code_width): Deleted. * lib/font.h (class font): Declare font::number_to_index(). Remove declaration of font::get_code_width. * lib/nametoindex.c (font::name_to_index): Add 512 rather than 256 to indices of named characters. (font::number_to_index): New function. * troff/input.c (font::number_to_index): New function. (get_charinfo_by_number, charinfo::get_number, charinfo::set_number): New functions. (token::next): Turn \N into a TOKEN_NUMBERED_CHAR. (token::process, token::description, token::get_char, token::add_to_node_list, token::operator==): Handle TOKEN_NUMBERED_CHAR. * troff/charinfo.h: Declare get_charinfo_by_number, charinfo::get_number, charinfo::set_number. Add NUMBERED flag to charinfo class. (charinfo::numbered): New function. * troff/token.h: Add TOKEN_NUMBERED_CHAR. * troff/env.h (class environment): Remove declaration of ... * troff/env.c (environment::make_numbered_char_node): Deleted. * troff/node.c (make_numbered_node): Deleted. (class numbered_glyph_node): Remove. (troff_output_file::put_char_width, troff_output_file::put_char): Handle numbered chars. (troff_output_file::numbered_char): Removed. (tfont::get_code_width): Removed. (make_glyph_node): Don't search special fonts for numbered characters. * troff/node.h: Remove declaration of make_numbered_node. * driver/input.c (do_file): Handle N command. * driver/printer.h: Add declaration of ... * driver/printer.c (printer::set_numbered_char): New function. * dvi/tfmtodit.c (main): Generate unnamed entries. * ps/devps/afmtodit: Likewise. * xditview/xtotroff.c (MapFont): Likewise. * xditview/libXdvi/parse.c (ParseInput): Grok N command. * tbl/main.c (process_format): If multiple widths are specified for a column but all the widths are the same, don't give an error message. * tbl/table.c (table::do_row): If the current row is all lines and the stuff doesn't contains a line, mark the top of the row after printing stuff before the row. If the current row is not all lines and the stuff doesn't contain a line, don't unnecessarily mark the top of the row before printing the stuff. Mon Oct 1 11:42:00 1990 James Clark (jjc at jclark) * troff/groff.h: Remove MAX_PATH. * troff/input.c (open_file): Dynamically allocate space for the path. (open_mac_file, process_macro_file): Corresponding changes. Sun Sep 23 18:56:26 1990 James Clark (jjc at jclark) * troff/node.h (class output_file): Make copy_file pure. Add vspace method ifdef COLUMN. Add is_printing method. * troff/node.c: Add class printing_reg. Add class real_output_file. Derive other output_file classes from real_output_file; in these classes rename begin_page to really_begin_page, print_line to really_print_line, copy_file to really_copy_file, transparent_char to really_transparent_char. Move output_file::flush to real_output_file. Add printing member to class output_file. * troff/div.h: Remove printing member from top_level_diversion. Add vspace member function to class diversion ifdef COLUMN. Add some declarations ifdef COLUMN. * troff/div.c (top_level_diversion::copy_file, top_level_diversion::transparent_output, top_level_diversion::output): Don't test printing member before output. * troff/input.c: Handle initial variable_space_request ifdef COLUMN. * troff/Makefile: Add column.c but comment it out. Add -DCOLUMN but comment it out. Sat Sep 22 11:32:22 1990 James Clark (jjc at jclark) * troff/div.c (diversion::need): Make any space forced. If we sprung a trap, set truncated_space to minus the distance to the trap and set needed_space to the amount that was needed. (top_level_diversion::space): A forced space turns no_space_mode off. (class constant_vunits_reg): New class. (init_div_requests): Implement number registers .trunc and .ne using constant_vunits_reg. (class truncated_space_reg): Deleted. * troff/div.h: Don't have a no_space_mode member in diversion. Instead have it in top_level_diversion. * troff/div.c (diversion::diversion): Don't initialize no_space_mode. (top_level_diversion::top_level_diversion): Initialize no_space_mode. (no_space, restore_spacing): Do nothing if curdiv != topdiv. (macro_diversion::output): Don't clear no_space_mode. * troff/input.c (diverted_space_node::reread): Don't call environment::do_break. In fill mode, act like a blank line. (diverted_copy_file_node::reread): Don't call environment::do_break. * troff/div.c (blank_line): New function. * troff/div.h: Declare it. * troff/input.c (process_input_stack): Call it. * troff/div.c (truncated_space_reg::get_string): New function. (init_div_requests): Bind to .trunc. (space_request, top_level_diversion::space, top_level_diversion::output, macro_diversion::space, macro_diversion::output): Update truncated_space. (macro_diversion::output): Redo calculations when trap sprung. (macro_diversion::output, macro_diversion::space): No need for trap_flag. * troff/div.c (top_level_diversion::output): Set nl_reg_contents after truncating post line spacing. Fri Sep 21 11:27:25 1990 James Clark (jjc at jclark) * ps/devps/prologue (MF, SF): Make them work even if setfont is defined as a procedure rather than as an operator. Thu Sep 20 12:55:05 1990 James Clark (jjc at jclark) * troff/div.c (macro_diversion::space): Ignore no_space_mode. Wed Sep 19 10:54:37 1990 James Clark (jjc at jclark) * troff/div.c (top_level_diversion::output): Merge output_file::print_line and output_file::end_of_line member functions. * troff/div.h (class output_file): * troff/node.c (troff_output_file::print_line, troff_output_file::end_of_line, output_file::end_of_line, ascii_output_file::print_line, suppress_output_file::print_line): Corresponding changes. Tue Sep 18 11:31:47 1990 James Clark (jjc at jclark) * troff/input.c (token::next): Don't give a warning for `\.'. * troff/env.c (environment::get_center_lines): New function. (init_env_requests): Bind number register .ce to it. * troff/env.h: Declare it. * tbl/table.c (table::init_output): Define reset macro to restore .ce. If center option not given, store .ce in SAVED_CENTER_REG. Then do .ce 0. (table::print): If center option not given, then imply center option if SAVED_CENTER_REG > 0. Mon Sep 17 09:19:19 1990 James Clark (jjc at jclark) * ps/devps/Makefile: Remove T from FONTS. Remove TSymbol.ps and Troff.ps from DOWNLOAD. * troff/Makefile: Change comment in DEFINES to avoid confusing System V make. * ps/ps.c (ps_printer::do_exec): Allow newlines within PostScript code. Don't try to catch errors with stopped. (check_line_lengths): New function. * ps/devps/prologue (EXEC): Deleted. (EBEGIN, EEND): New procedures. Sun Sep 16 14:51:15 1990 James Clark (jjc at jclark) * troff/input.c: Include request.h before node.h. * troff/node.c: Likewise. * troff/env.c: Likewise. * troff/div.c: Likewise. * troff/node.h (class special_node): Store argument as a macro rather than a char *. * troff/node.c (special_node::special_node, special_node::copy): Grok this. (special_node::~special_node): Deleted. (special_node::tprint): Deleted. (special_node::tprint_start, special_node::tprint_end, special_node::tprint_char): New functions. (troff_output_file::special): Deleted. (troff_output_file::start_special, troff_output_file::end_special, troff_output_file::special_char): New functions. * troff/input.c (special_node::tprint): New function. (do_special): Use macro not char *. (do_transparent_macro): Deleted. (token::next): Don't call do_transparent_macro. * troff/input.c (token::next): Add 'Y' case. (do_transparent_macro): New function. * troff/node.c (troff_output_file::special): Handle newlines with argument using new continuation convention. * driver/input.c (get_string): Cope with continuation convention. (do_file): Don't call skip_line after calling get_string(1). * ps/ps.c (ps_printer::special, ps_printer::do_import, ps_printer::do_def, ps_printer::do_exec): Cope with newlines in arg. * xditview/libXdvi/parse.c (ParseInput): Ignore lines starting with +. Sat Sep 15 19:00:10 1990 James Clark (jjc at jclark) * troff/input.c (asciify): By default, invalid input characters should return empty string. * troff/input.c (copy_file): Handle first page transition like title. (token::next, process_input_stack): Grok COPY_FILE_REQUEST. * troff/input.c (token::next): Improve error message for EOF after escape character. (input_char_description): New function. (get_char_for_escape_name): Use input_char_description. (token::next): Warn about unrecognized escape sequences. (warning_table): Add WARN_ESCAPE. * troff/groff.h: Declare WARN_ESCAPE. Change WARN_TOTAL accordingly. * troff/token.h: Remove declaration of process_input_stack. * troff/input.c: Remove declaration of init_hyphen_requests. * troff/request.h: Correct spelling in declaration of same. * troff/input.c (token::next): Check whether escape_char is 0. Fri Sep 14 12:09:25 1990 James Clark (jjc at jclark) * groff.c (main, usage, help): Implement -P and -L options. * groff.sh: Likewise. * troff/input.c (token::next): Use some gotos to avoid code duplication. * troff/input.c (get_long_name, get_name, read_long_ecsape_name): Avoid calling symbol::symbol if name empty. Thu Sep 13 06:21:45 1990 James Clark (jjc at jclark) * troff/input.c (init_input_requests): Make \n(.x return the major version number and \n(.y return the minor version number. * troff/Makefile: Construct file majorminor.c defining major_version and minor_version automatically from ../VERSION. * troff/node.c (class glyph_node): Make operator new and operator delete public. (class ligature_node): Similarily. * troff/input.c (operator==(const macro &, const macro &)): New function. (non_interpreted_node::same): Use this. (string_iterator::string_iterator): Make macro& argument const. * troff/input.c (input_iterator::get): New function. Don't make asciify_macro or class non_interpreted_node friends of class input_iterator. (non_interpreted_node::interpret): Use input_iterator::get. (asciify_macro): Likewise. * troff/input.c (~token_node, ~string_iterator, ~arg_list, ~non_interpreted_node): Deleted. * troff/node.c: (~suppress_output_file, ~ascii_output_file): Deleted. * troff/symbol.h: Make all symbol member functions const. * lib/strtol.c: New file. * lib/Makefile: Add strtol.c. * Makefile: Define STRTOL as strtol.o to include strtol in libgroff.a. Wed Sep 12 10:00:49 1990 James Clark (jjc at jclark) * pic/troff.c (troff_output::simple_circle): Divide by scale. Tue Sep 11 14:17:16 1990 James Clark (jjc at jclark) * troff/input.c (do_special): Use input_level. * troff/token.h (TOKEN_BACKSPACE): New token. (token::backspace): New function. * troff/input.c (token::description, token::next, token::process): Grok TOKEN_BACKSPACE. (do_special): Turn TOKEN_BACKSPACE back into \b. * troff/token.h (token::leader): New function. * troff/input.c (do_special): Turn TOKEN_LEADER back into \001. * troff/input.c (do_special): Turn TOKEN_TAB back into \t. * troff/input.c (do_special): Use token::description in error message. Mon Sep 10 11:06:27 1990 James Clark (jjc at jclark) * troff/input.c (decode_args): Combine quoted and quote_input_level variables. Make it a for (;;) loop. * troff/input.c (get_char_for_escape_name): Check for \001 and \b. * troff/input.c (read_long_escape_name): The test for whether to expand buffer was off by 1. (read_string): Similarily. Fri Sep 7 11:45:50 1990 James Clark (jjc at jclark) * troff/input.c: Use `const int' rather than `static const int'. * troff/div.h (diversion::copy_file): Declare as pure virtual. (macro_diversion::copy_file): New function. * troff/node.h: New class diverted_copy_file_node. * troff/node.c: Implement it. * troff/input.c (copy_file): Use diversion::copy_file. Handle first page transition by pushing a diverted_copy_file_node. * troff/input.c (token::next, process_input_stack): Don't handle COPY_FILE_REQUEST. Thu Sep 6 13:29:10 1990 James Clark (jjc at jclark) * ps/ps.c (flush_sbuf): Remember to add sbuf_kern when checking whether space widths need adjusting. * troff/charinfo.h: Generalize translated_to_space to special_translation so as to allow translation to \&. * troff/input.c (translate): Allow translation to \&. (charinfo::*): Corresponding changes. * troff/node.c (make_node, node::add_char): Corresponding changes. * troff/node.h (dummy_node::dummy_node): Allow optional first argument. * lib/lib.h: Make codes 0200 to 0237 invalid input characters. * troff/token.h: Remove TOKEN_TITLE. Remove token::title. Add TOKEN_REQUEST. * troff/input.c (token::next): Turn a TITLE_REQUEST into a TOKEN_REQUEST with an argument of TITLE_REQUEST. (token::process): Grok that. * troff/input.c (copy_file): Handle first page transition like title by pushing a COPY_FILE_REQUEST cookie. (token::next, process_input_stack): Grok that. * troff/node.h (output_file::copy_file): Add x and y arguments. Make it non-pure. * troff/div.c (top_level_diversion::copy_file): Supply them. * troff/node.c (troff_output_file::copy_file): Add x and y arguments; moveto specified position. Invalidate font_position array after copying file. (output_file::copy_file): New function. (suppressed_output_file::copy_file, ascii_output::copy_file): Removed. * troff/input.c (transparent_file): New function. (init_input_requests): Bind to "trf". (token::next): Handle TRANSPARENT_FILE_REQUEST cookie. (process_input_stack): Likewise. * troff/Makefile: Add ../lib/lib.h to GROFF_H. * troff/node.c (init_node_requests): New number registers .kern pointing to global_kern_mode, and .lg pointing to global_ligature_mode. * troff/node.c (ligature): Don't change it if we get a bad integer. * troff/input.c (do_define_string): Don't strip tabs. * troff/input.c (asciify_macro): Make the string_iterator auto. * troff/node.c (init_font_requests): Rename to... (init_node_requests): * troff/node.h: Change declaration. * troff/input.c (main): Change call. * troff/input.c (node::reread, diverted_space_node::reread): New methods. (process_input_stack): Call reread rather than get_diverted_space_node. * troff/node.c (node::get_diverted_space_node, diverted_space_node::get_diverted_space_node): Removed. * troff/node.h: Declare reread methods instead of get_diverted_space_node methods. Make `n' member private. * troff/input.c: (token::diverted_space): Removed. * troff/token.h: Removed declaration. Tue Sep 4 00:48:04 1990 James Clark (jjc at jclark) * eqn/script.c (script_box::compute_metrics): Don't let SUP_RAISE_FORMAT become negative. * tbl/table.c (table::do_row): Entries that don't end in the this row shouldn't make the row non-blank. * tbl/table.c (table::make_columns_equal): Only set the width of columns which are marked as equal. * tbl/main.c (process_data): Before issuing excess data error, if last character was a newline unget it; then get it again after the error. Also include the contents of the entry in the message. * groff.c: New file. * Makefile: Build groff from groff.c. Make it possible to use either groff.sh or groff.c as groff. * Makefile.bd: Similarily. Mon Sep 3 09:39:49 1990 James Clark (jjc at jclark) * groff.sh: Don't delay expansion of $@ in assignment to files. Remove occurrences of \". Sun Sep 2 09:56:59 1990 James Clark (jjc at jclark) * all Makefiles: Simplify and rearrange. * Makefile: Handle fmod like malloc. * lib/Makefile: Similarily. * lib/fmod.c: Remove #ifdef NEED_FMOD. * Makefile: Rename OPTIMISE to OPTIMIZE. * groff.sh: Remove assignment to PATH. * Makefile: Remove SHPATH variable. * Makefile.bd: Similarily. * groff.sh: Add -V option to print the pipeline instead of executing it. Fri Aug 31 00:56:46 1990 James Clark (jjc at jclark) * lib/font.c: Split off file searching into ... * lib/fontfile.c: New file. * lib/strerror.c (strerror): Use `Error %d' for unknown errors. Thu Aug 30 13:13:55 1990 James Clark (jjc at jclark) * tbl/table.c (table::do_hspan): Delete assertion that e != 0. Also change misleading comment. (table::do_vspan): Change similarily misleading comment. * tbl/main.c (process_data): A format row with an explicit `s' uses up a data line, even if all the other columns are `_' or `='. * troff/input.c (token::description): Fix description of TOKEN_DUMMY and TOKEN_EMPTY. Wed Aug 29 04:12:08 1990 James Clark (jjc at jclark) * groff.sh: Fix description of -Z in help message. Tue Aug 28 07:28:33 1990 James Clark (jjc at jclark) * pic/object.c (object_spec::make_object): Allow negative and zero line thicknesses. * pic/pic.y: Give linethick default value of -1.0. * pic/troff.c (troff_output::troff_output): Initialize last_line_thickness to BAD_THICKNESS. (troff_output::finish_picture): Set thickness to BAD_THICKNESS. (troff_output::line_thickness): Canonicalize negative thicknesses to RELATIVE_THICKNESS. * pic/tex.c (tex_output::set_pen_size): Silently map negative line thicknesses to DEFAULT_PEN_SIZE. Canonicalize negative pen sizes to -1.0. (tex_output::start_picture): Set pen_size to -2.0. * ps/ps.c (ps_printer::set_line_thickness): If line_thickness is 0, then use 0 linewidth. (ps_printer::ps_printer): Initialize line_thickness to -1. * pic/troff.c (troff_output::simple_ellipse): Divide by scale. * ps/devps/symbolchars: Remove `or'. * ps/tmac.ps: Implement \(or with .char. * ps/devps/symbolchars: Move most characters into textmap. * ps/devps/textmap: Add names for troff bracket characters. Remove ul, ru, br, bv. * ps/devps/TSymbol.ps: Removed. * ps/devps/FontMakefile: Make S from Symbol not TSymbol. * ps/tmac.ps: Do with .char what TSymbol did. * ps/devps/download: Remove TSymbol. * ps/devps/T: Removed. * ps/devps/Troff.ps: Removed. * ps/devps/Troff.afm: Removed. * ps/tmac.ps: Implement \(ru, \(ul, and \(br with .char. * ps/devps/download: Remove Troff. * ps/devps/FontMakefile: Remove T target. * ps/devps/DESC-A4: Remove T from font list. * ps/devps/DESC-letter: Likewise. * troff/input.c (macro_to_node): Rename to ... (charinfo_to_node): Don't pass mac argument. Temporarily remove the character's definition while processing it. * troff/node.c (node::add_char, make_node): Change calls to macro_to_node accordingly. * troff/input.c (token::next): Translate \_ to \(ul. * tty/devascii/R.proto: Add `|'. * tty/devlatin1/R.proto: Likewise. Mon Aug 27 11:25:41 1990 James Clark (jjc at jclark) * man: Put the version number in all the man pages. Sun Aug 26 11:40:05 1990 James Clark (jjc at jclark) * Makefile.bd: New file. * README.bd: New file. * VERSION: New file. * lib/version.c: Removed. * lib/Makefile: Create version.c from ../VERSION. Remove version.c in clean target. * troff/input.c (main): Get hyphen_file from GROFF_HYPHEN environment variable. * all Makefiles: Split install target into install.bin for binaries, and install.nobin for everything else. * Makefile: Add bindist target. * man/afmtodit.man: New file. * man/Makefile: Add afmtodit.n to MAN1PAGES. * ps/devps/Makefile: Add textmap to DEVICEFILES. Install afmtodit in BINDIR. * ps/Makefile: Pass BINDIR to make install in devps. * ps/ps.c (ps_printer::set_char): Do nothing if the character is the space character. * ps/devps/FontMakefile: Rename symbol.afm to tsymbol.afm. Sat Aug 25 15:39:03 1990 James Clark (jjc at jclark) * ps/ps.c: Redo font downloading. * ps/devps/download: New file. * ps/devps/Makefile: Add download to DEVICEFILES. * ps/devps/afmtodit: Remove -d option. * ps/devps/FontMakefile: Don't use -d option with afmtodit. * ps/devps/symbosl.ps: Add %%DocumentFonts comment. * ps/devps/zapfdr.ps: Likewise. * ps/devps/TSymbol.ps: Likewise. Fri Aug 24 20:10:30 1990 James Clark (jjc at jclark) * groff.sh: Initialize dev to ${GROFF_TYPESETTER:-@DEVICE@}. Thu Aug 23 10:03:47 1990 James Clark (jjc at yquem) * ps/ps.c (ps_output::include_file): If BROKEN_SPOOLER is defined, then strip the first line if it starts with %. * Makefile: Add a comment about this. * man/tfmtodit.man: New file. * man/Makefile: Add tfmtodit.n to MAN1PAGES. * dvi/Makefile: Install tfmtodit in BINDIR. * dvi/tfmtodit.c (usage): Mention -v option. Wed Aug 22 09:56:36 1990 James Clark (jjc at yquem) * troff/node.c (troff_output_file::end_of_line): Call do_motion. * troff/node.c (troff_output_file::transparent_char): Don't call flush_tbuf. * eqn: Add check_tabs method to most box classes. * eqn/box.c (box::top_level): Call check_tabs. * eqn/script.c (script_box::output): Use \Z. * eqn/limit.c (limit_box::output): Use \Z. * eqn/box.c (box::top_level): Use itoa. Tue Aug 21 09:29:28 1990 James Clark (jjc at yquem) * dvi/tmac.dvi: Add font translations for CR, C, TT. * dvi/devdvi/Makefile: Don't make links to CW. * ps/tmac.ps: Add font translations for C, CW, CO, CX, CD, H, HO, HX, HD. * xditview/tmac.X: Likewise. * troff/node.c: Add font translation feature. (get_font_translation): New function. (symbol_fontno): Translate the font name. (mount_font_no_translate): Rename to mount_font to this. (mount_font): New function. (font_family::make_definite): Call mount_font_no_translate instead of mount_font. (mount_style): Translate the font name. (font_translate): New function. (init_font_requests): Bind "ftr" to font_translate. * ps/devps/prologue (SN): New procedure that rounds a position to the nearest (pixel + (.25,.25)). (DL): Use SN to round endpoints. * lib/version.c: Changed version to 0.5. Sat Aug 18 04:43:21 1990 James Clark (jjc at yquem) * Makefile: Move definition of PAGE to the very beginning, so that people are less likely to miss it. Fri Aug 17 02:15:11 1990 James Clark (jjc at yquem) * man/Makefile: Don't need to sed out @UPCASE_PROG_PREFIX@. * troff/env.c (environment::choose_breakpoint): Make `can't find breakpoint' error a warning of type WARN_BREAK. Change message to `can't break line'. * troff/groff.h: Declare WARN_BREAK with code 4; change WARN_INPUT to code 040000. * troff/input.c: Add WARN_BREAK to warning_table. Include WARN_BREAK in DEFAULT_WARNING_MASK. * tty/tmac.tty: Add definition of \(+-. * groff.sh: Remove `--' option to set command. * dvi/devdvi/texsy.map: Remove duplicate md entry. * ps/devps/eqnchar: Better definition of cdot using md. * dvi/devdvi/eqnchar: Likewise. * xditview/devX100/eqnchar: Likewise. * xditview/devX75/eqnchar: Likewise. * eqn/lex.c: Add definition of cdot. Thu Aug 16 09:33:57 1990 James Clark (jjc at yquem) * troff/input.c (get_optional_char): New function. * troff/input.c (set_page_character): Use get_optional_char(), rather than has_arg() and tok.get_char(1). * troff/env.c (tab_character, leader_character, hyphen_char, field_characters): Likewise. (margin_character): Likewise. Also always delete the margin_character_node. * troff/input.c (token::get_char): Use token::description. * troff/input.c (has_arg): Don't skip over tab and \}. * troff/number.c (start_number): Give a warning if the number starts with \} (WARN_RIGHT_BRACE) or tab (WARN_TAB). Wed Aug 15 10:04:37 1990 James Clark (jjc at yquem) * troff/input.c (empty_name_warning, non_empty_name_warning): New functions. (get_name, get_long_name): Use these. Rename `warn' argument to `required'. * troff/node.c (get_fontno): Test that the symbol is not null. * troff/input.c (token::description): New function. * troff/number.c (parse_term): Use token::description in `numeric expression expected' message. * troff/groff.h: Add WARN_MISSING. * troff/number.c (start_number): New function. * troff/number.c (get_vunits, get_hunits, get_number, get_integer, get_incr_number): Use start_number(). * troff/input.c (DEFAULT_WARNING_MASK): Enable WARN_NUMBER by default. * troff/input.c (get_name, get_long_name): Use WARN_MISSING. * troff/reg.c (alter_format): Use WARN_MISSING. Also use token::descripion. * troff/input.c (token::get_char): Use WARN_MISSING. * troff/input.c (token::delimiter): Use token::description. * troff/env.c (environment_switch): Back out Aug 3 change. * troff/input.c (has_arg): Skip over \}s and tabs but give a warning. * troff/token.h (token::tab): New function. * troff/node.c (get_fontno): Use tok.skip() rather than has_arg(). * troff/reg.c (alter_format): Likewise. * troff/node.c (bold_font): Use has_arg() rather than tok.skip(). Tue Aug 14 10:11:21 1990 James Clark (jjc at yquem) * troff (most files): Redo warnings. Divide warnings into various categories; warning() has an additional first argument indicating the category it falls into. * troff/input.c (main): -w now takes an argument. New option -W. (enable_warning, disable_warning): New functions. * ps/devps/afmtodit: Add -a option to lie about the italic angle. * ps/devps/FontMakefile: Pretend TI has an angle of 7. Mon Aug 13 10:11:16 1990 James Clark (jjc at yquem) * ps/devps/eqnchar: Better definitions of dotdot, vec, dyad, inf. * xditview/devX100/eqnchar: Likewise. Remove definition of dot. * xditview/devX75/eqnchar: Likewise. * dvi/devdvi/eqnchar: Better definitions of vec, dyad, dotdot. * eqn/other.c: When bar or over applies to a single character don't produce an overline_box or an underline_box. Instead produce an accent_box or an underaccent_box, with the accent a line whose width is accent_width. New classes underaccent_box, overline_char_box and underline_char_box. * eqn/box.h: Move overline_box, underline_box, accent_box class declarations into eqn/other.c. Add declarations of make_underline_box, make_overline_box, make_accent_box. * eqn/eqn.y: Call make_overline_box, make_underline_box make_accent_box instead of constructors. * eqn/pbox.h, eqn/box.c: Add accent_width parameter. * eqn/other.c: Add accent_box::~accent_box. * eqn/box.h: Declare it. * groff.sh: With -Tps, use eqn -D. * eqn/other.c (overline_box::output): Use \Z. If draw_flag use \D rather than \l. (underline_box::output): Similarily. (accent_box::output): Use \Z. * xditview/tmac.X: Add definitions of ~ and ^ (so that they are a bit smaller.) Sun Aug 12 09:41:15 1990 James Clark (jjc at yquem) * troff/div.c (top_level_diversion::transparent_output(unsigned char)): Use asciify. * troff/input.c (asciify): Don't make it static. * troff/token.h (asciify): Declare it. * troff/input.c (get_name, get_long_name, token::get_char, token::delimiter): Add an extra default argument which says whether a warning should be printed. * troff: Pass a non-zero argument to one of these rather than printing a warning directly. Sat Aug 11 09:02:21 1990 James Clark (jjc at yquem) * troff: Consistently use symbol::is_null. * troff/dictionary.h: Move some inline functions into dictionary.c. * troff/request.h: Move inline functions into input.c. (request_or_macro::invoke): Make it pure. * troff/input.c, troff/reg.h: New class `constant_int_reg'. * troff/input.c (init_input_requests): Use class constant_int_reg. (class compatible_reg): Deleted. * troff/div.c (init_div_requests): Use class constant_int_reg. (class last_post_line_extra_space_reg): Deleted. * troff/env.c (tab_character): Don't change the tab character if we get an invalid argument. (hyphen_char): Similarily. * troff/reg.c (alter_format): Check that nm is not null. * Makefile, groff.sh: Make it possible to customize the commands used for printing PostScript and dvi files. Also make it possible to customize the path used by groff.sh. * eqn/eqn.y: Make `left' right associative. Fri Aug 10 18:20:39 1990 James Clark (jjc at yquem) * pic/pic.h: Added definition of M_SQRT2 for those systems that don't have it. * pic/pic.h: Removed definition of INT_MAX. * troff/node.c (italic_corrected_node::vertical_extent): Omit `return'. * troff/input.c (token::next): Handle \R like \n. Tue Aug 7 09:46:33 1990 James Clark (jjc at yquem) * ps/tmac.pc (PSPIC): Simplify. * troff/env.c (tab_stops::to_string): * pic/pic.y (object_type_name): * pic/troff.c (simple_output::line): * pic/tex.c (tex_output::spline): * pic/object.c (object_spec::make_object): * tbl/main.c (process_data): Add cases to switch statements to avoid cfront warnings. (Some of these are spurious, since the switch already has a default case.) * ps/tmac.ps (PSPIC): Reformatted. Prefix all local names with `ps-'. Don't test systat; instead check number of arguments to ps-bb. Mon Aug 6 00:13:07 1990 James Clark (jjc at yquem) * macros/tmac.e: Do not decrease the page offset by 0.5i. * ps/ps.c (ps_printer::ps_printer): Use mktemp instead of tempnam. Unlink the file as soon as we have opened it, so that we don't have to bother with signal handlers. (handler): Deleted. (fatal_error_exit): Deleted. (main): Don't call signal. * dvi/tfmtodit.c: Add -k option so that kerns with the skewchar can be ignored. * dvi/devdvi/Makefile: Use the -k option with S and MI. * pic/pic.y: If there is a label, or an nth construction before the first `.' in the argument to `with', ignore it and generate a warning. * pic/lex.c (lex_warning): New function. * tbl/table.c (table::init_output): In section keep and release macro, use 0 indent when diverting and the correct indent when rereading. * troff/input.c (interpolate_number_format): Do not interpolate anything if the number register is not defined. * tbl/main.c (process_data): Don't add entry when col >= ncolumns. Sat Aug 4 08:12:05 1990 James Clark (jjc at yquem) * ps/devps/prologue (PICTURE): Set components of graphics state to their default values. * ps/devps/text.enc: Add trademark * ps/devps/textmap: Add names for club, spade, heart, diamond, carriagereturn, suchthat. Use Upsilon1 rather than Upsilon. * ps/devps/symbolchars: Add names for summation and product. * dvi/devdvi/texsy.map: Add names for club, spade, heart, diamond, suchthat. Add pp. Add upper-case letters. * xditview/libXdvi/DviChar.c: Add names for club, spade, heart, diamond, carriagereturn, suchthat. Use Upsilon1 rather than Upsilon. * dvi/devdvi/texsy.map: Rename lA (left angle bracket) to la, and rA (right angle bracket) to ra. Introduce names for double-headed arrows and double-barred arrows: <>, va, lA, rA, hA, uA, dA, vA. * ps/devps/textmap: Likewise for ps device. * xditview/libXdvi/DviChar.c: Likewise for X100 and X75 devices. * tty/devascii/R.proto: Rename lA to la and rA to ra. * tty/devascii/R.proto: Likewise. * tty/tmac.tty: Provide definitions for \(<>, \(lA, \(rA, \(hA, \(uA, \(dA. * eqn/delim.c: In delim_table, rename \(lA to \(la and \(rA to \(ra. * xditview/tmac.X: Add definitions for \(fi \(fl \(ff \(Fi \(Fl. * eqn/lex.c: Added definitions of `approx', `grad' and `del' to def_table. Fri Aug 3 09:59:27 1990 James Clark (jjc at yquem) * troff/div.c (when_request): Use symbol::is_null rather than has_arg to determine whether we have an argument. (change_trap): Remove the trap if we get an invalid number. Give an error if we don't get at least the macro name. (diversion_trap): Remove trap if we get an invalid name or number. * troff/env.c (environment_switch): Pop if we get an invalid symbol or numeric expression. * troff/input.c (do_define_macro): If EOF is encoutered while defining the macro, do tok.next() before returning. * troff/token.h (has_arg): Move definition from here, to ... * troff/input.c (has_arg): ... here * troff/env.c (space_size): Do nothing if we get an invalid argument. * troff/input.c (shift): Likewise. * pic/lex.c (get_token_after_dot): Accept `.center' as a synonym for `.c'. * pic/troff.c (troff_output::start_picture): Comment out calls to `..'. * eqn/main.c (do_file): Subtract 1 from current_lineno if interpret_lf_args succeeds. * eqn/main.c (do_file): Don't recognize delimiter if preceded by \\. This avoids problems with \$N. * groff.sh: Pass -C to preprocessors. * lib/lf.c (interpret_lf_args): Be more flexible. * tbl/main.c (main): Add -C option. (table_input::get): Do not recognize TE if followed by character other than a space or newline unless -C option given. (process_input_file): Likewise for lf, TS. (process_data): Likewise for lf in text blocks. * eqn/main.c (main): Add -C option. (do_file): Don't recognize EQ, EN or lf if followed by character other than space or newline unless -C option given. * eqn/lex.c (file_input::read_line): Similarily. * eqn/eqn.h: Declare compatible_flag. * etc/soelim.c (main): Add -C option. (interpret_lf_args): Use version in libgroff. (do_file): * pic/main.c (main): Add -C option, which sets compatible_flag. (top_input::get), (top_input::peek): If -C option not given, do not recognize .PS/.PE/.PF/.lf if followed by a character other than space or newline. * pic/lex.c (file_input::read_line): Similarily. * pic/pic.h: Add declaration of compatible_flag. Thu Aug 2 11:11:27 1990 James Clark (jjc at yquem) * ps/tmac.ps (PSPIC): Avoid use of `echo -n'. * troff/node.c, troff/node.h: Add `asciify' methods to classes derived from node. New class space_char_hmotion_node. * troff/input.c (asciify_macro): New function. * troff/input.c (init_input_requests): New request `asciify' bound to asciify_macro. * macros/mm.diff: New file. * Makefile: In install.mm target use `patch' to apply macros/mm.diff. * troff/input.c (macro::print_size): Just print the size in bytes. * troff/div.c (return_request): Correct the argument interpretation. Wed Aug 1 12:38:36 1990 James Clark (jjc at yquem) * troff/node.h (class composite_node): Add sz member. * troff/node.c (composite_node::size): Return sz. * troff/input.c (macro_to_node): Use the initial size in the environment as the size of the composite_node. * troff/node.c (node::zero_width_tprint): Provide a reasonable default. Tue Jul 31 10:07:10 1990 James Clark (jjc at yquem) * troff/div.c (change_trap): If we get a bad number expression, do nothing. Mon Jul 30 10:30:49 1990 James Clark (jjc at yquem) * lib/matherr.c (matherr): Define this only if math.h defines TLOSS. Sun Jul 29 10:34:27 1990 James Clark (jjc at yquem) * troff/div.c (macro_diversion::distance_to_next_trap): If there no diversion trap return vunits(INT_MAX - vresolution). Sat Jul 28 14:28:14 1990 James Clark (jjc at yquem) * troff/input.c (do_zero_width): New implementation that doesn't use a temporary environment. Use instead: (token::add_to_node_list): New function. * troff/env.c (environment::get_prev_char_height), (environment::get_prev_char_height), (environment::get_prev_char_skew): New functions. (environment::get_prev_char): New function. (environment::get_prev_char_width): Change to use get_prev_char. (init_env_request): Implement new registers .cht, .cdp, .csk. * eqn/sqrt.c (sqrt_box::output): Don't rely upon the argument to \Z being processed in a separate environment. Fri Jul 27 10:21:25 1990 James Clark (jjc at yquem) * tbl/table.c: Removed TABLE_BOTTOM_REG. * tbl/table.c (table::init_output): In the section release macro, give a warning message if the section won't fit on one page. * tbl/table.c (table::do_top): Emit table keep only if table is boxed. (table::do_bottom): Likewise for table release. (table::table), (table::add_vertical_rule): Remove reference to keep member. * tbl/table.h: Remove keep member. * tbl/table.c: New register SUPPRESS_BOTTOM_REG. In SECTION_RELEASE_MACRO, if there's not enough space before the next trap to output the diversion, call T# ourselves, set SUPPRESS_BOTTOM_REG to 1, spring the trap, then set SUPPRESS_BOTTOM_REG back to 0. In T#, do nothing if SUPPRESS_BOTTOM_REG is non-zero. In T#, always mark the current vertical position and return to it before turning traps on again. Thu Jul 26 02:54:32 1990 James Clark (jjc at yquem) * troff/node.c, troff/node.h: In classes derived from node, replace prev_char_width method by last_char_node method. * troff/env.c (environment::get_prev_char_width): Use node::last_char_node rather than node::get_prev_char_width. * Makefile: Added comment about -fno-inline on 68030-based Apollos. * troff/reg.c (number_format_to_ascii), eqn/delim.c (DELIM_TABLE_SIZE), tty/tty.c (tty_font::load_tty_font), dvi/tfmtodit.c (main): Cast expressions using sizeof to int. * dvi/dvi.c (dvi_font::handle_x_command): Avoid long->int warnings. * macros/tmac.e (TS): Don't move @f back past the current position. Wed Jul 25 09:11:08 1990 James Clark (jjc at yquem) * ps/ps.c (main): Buffer stderr. * dvi/dvi.c (main): Likewise. * tty/tty.c (main): Likewise. * ps/ps.c (ps_printer::do_import): Improve error handling. * troff/input.c (abort_request): Use asciify. * driver/printer.h (printer::draw), driver/printer.c (printer::draw), ps/ps.c (ps_printer::draw), dvi/dvi.c (dvi_printer::draw): Make type of first argument int rather than char. This works around a bug on the 68030 based Apollo using g++ 1.37.1. * tbl/table.h (class table): Add `keep' member. * tbl/table.c (table::table): Initialize `keep'. (table::add_vertical_rule): Set `keep' to 1. (table::do_top): Only emit table keep macro is `keep' is non-zero. (table::do_bottom): Likewise for table release macro. (table::do_row): Emit section keep macro even if the row is 0. Tue Jul 24 08:35:07 1990 James Clark (jjc at yquem) * macros/tmac.e (@C): Preserve the font family across the change in environments. Mon Jul 23 10:15:23 1990 James Clark (jjc at yquem) * lib/font.c: Initialize font::hor and font::vert to 1. (font::load_desc): Check the values of font::hor and font::vert. * lib/lib.h: Added definition of INT_DIGITS. Fix it so that it can be included in a C compilation. (iftoa): Use INT_DIGITS. Include lib.h. (itoa): Likewise. (as_string): Likewise. * tbl/table.c: Removed definition of INT_DIGITS. * eqn/box.c (box::top_level): Use INT_DIGITS + 1 instead of 12. * troff/input.c (input_input_requests): Likewise. * ps/ps.c (make_encoding_name): Likewise. (ps_printer::set_style): Likewise. (ps_output::put_number): Use 1 + INT_DIGITS + 1 instead of 12. * tty/devascii/R.proto: Map fm onto '. * tty/devlatin1/R.proto: Likewise. Sat Jul 21 12:45:07 1990 James Clark (jjc at yquem) * tbl/table.c: Use ' instead of DELIMITER_CHAR in places where the argument to \w is at a different input level. * tbl/table.c (table::init_output): Define a new macro REPEATED_VPT_MACRO, like vpt but if in a diversion also transparently outputs itself. (table::define_bottom_macro): Use REPEATED_VPT_MACRO instead of vpt. (table::do_row): Likewise. * tbl/table.c (vertical_rule::print): Prefix the .sp -1 line with TRANSPARENT_STRING_NAME. * tbl/table.c (table::init_output): In the table release macro print an error message and don't produce any output if after issuing the need request the table still will not fit. Also remove the diversion after bringing it back. * tbl/table.c (table::init_output): Define a new macro REPEATED_MARK_MACRO, like mk but if in a diversion also transparently outputs itself. (table::do_row): Mark row_top_reg using REPEATED_MARK_MACRO. This is necessary because .TH might not call .T#. (table::do_top): Likewise TOP_REG. (table::define_bottom_macro): If TOP_REG is no longer valid, use #T - DOUBLE_LINE_SEP rather than #T. This is necessary because the table header might contain just the two top rules. Fri Jul 20 10:51:42 1990 James Clark (jjc at yquem) * troff/div.c: Implement new request `ptr' to print all traps. * troff/env.c (init_env_requests): Implement `.tabs' reg with init_string_env_reg. * troff/env.c (class tab_reg): Deleted. Thu Jul 19 12:07:16 1990 James Clark (jjc at yquem) * troff/div.c: New number register .pn returns the number of the next page as set by the pn request. * macros/tmac.an: Redid headers and footers. Number each manual entry starting from 1 unless \nC is > 0, like Sun. Added an optional 5th argument to .TH which specifies the manual name and appears in the center of the header. Understand the X, P and D registers like Sun. Wed Jul 18 10:23:31 1990 James Clark (jjc at yquem) * troff/env.c (init_env_requests): New number register `.lt' to return the title length. * troff/node.h (class transparent_dummy_node): New class. * troff/node.c (class transparent_dummy_node): Provide member functions. * troff/env.c (interrupt): Add a transparent_dummy_node, rather than a dummy_node. * troff/input.c (token::next): New escape sequence \). * troff/input.c (get_copy): Recognize \) in copy mode. * troff/input.c (input_stack::clear): New function. * troff/input.c (exit_request): Use input_stack::clear. * troff/token.h: Removed TOKEN_NO_PRINT_CHAR. * troff/input.c (token::process): Removed case TOKEN_NO_PRINT_CHAR. * troff/env.c: Move set_page_character to input.c. Move page_character to input.c also. * troff/env.c (title): Split off the reading of the parts of the title into read_title_parts. * troff/input.c (read_title_parts): New function. Check the input_level when testing whether a token matches the delimiter. * troff/input.c (exit_request): New function. * troff/input.c (init_input_requests): Bind ex request to exit_request rather than exit_groff. * troff/input.c (exit_groff): Call tok.next() before process_input_stack(). Mon Jul 16 09:47:23 1990 James Clark (jjc at yquem) * troff/env.c: ifdef widow control support on WIDOW_CONTROL. * troff/env.h: ditto. * troff/input.c: ditto. * troff/env.c (environment::is_empty): Test pending_lines. * troff/env.c (environment::have_pending_lines): Removed. * troff/input.c: Add request to flush pending lines from the environment. * troff/env.c, troff/env.h: Add automatic widow control feature. * troff/input.c (exit_groff): Do process_input_stack() after do_break() but before setting exit_flag to 2. * troff/input.c: Remove FLUSH_PENDING_LINES and TOKEN_FLUSH_PENDING_LINES. Instead, flush pending lines from environment after END_TRAP token seen, but only if there aren't any more traps still unfinished. * troff/token.h: Remove TOKEN_FLUSH_PENDING_LINES. Sun Jul 15 10:50:08 1990 James Clark (jjc at yquem) * troff/env.c: Rename the `retain_size' member of class pending_output_line to `no_fill'. * troff/env.c (title): When the line is output, make the retain_size argument !fill. * troff/node.h: Add `hyphenated' member to struct breakpoint. * troff/node.c (space_node::get_breakpoints), (dbreak_node::get_breakpoints): Fill this in. * troff/env.c: Allow specification of maximum number of consecutive hyphenated lines. * troff/env.c (environment::is_empty): Add test for !current_tab. Sat Jul 14 11:23:01 1990 James Clark (jjc at yquem) * troff/env.c (environment::hyphenate_line): Don't completely give up if the word is not to be hyphenated; continue so that breaks can be made at break_char_node's. * lib/lib.h: Only define INT_MAX if it's not already defined; undef INT_MIN if it's already defined. * Makefile: Make it easy to define CFRONT_ANSI_BUG. * lib/lib.h: If CFRONT_ANSI_BUG is defined, cast INT_MIN to long. This works around a bug in AT&T C++ 2.0 used with an ANSI C compiler. * macros/tmac.an (an-header): Set no-space mode. * macros/tmac.an (TH): Start a new page if necessary. * Started using ChangeLog at version 0.4. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. Local Variables: version-control: never coding: latin-1 End: groff-1.22.2/m4/0000755000175000001440000000000012104714263011562 5ustar wlusersgroff-1.22.2/m4/localcharset.m40000644000175000001440000000112512104714263014467 0ustar wlusers# localcharset.m4 serial 7 dnl Copyright (C) 2002, 2004, 2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_LOCALCHARSET], [ dnl Prerequisites of lib/localcharset.c. AC_REQUIRE([AM_LANGINFO_CODESET]) AC_REQUIRE([gl_FCNTL_O_FLAGS]) AC_CHECK_DECLS_ONCE([getc_unlocked]) dnl Prerequisites of the lib/Makefile.am snippet. AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_GLIBC21]) ]) groff-1.22.2/m4/groff.m40000644000175000001440000007305112104714263013135 0ustar wlusers# Autoconf macros for groff. # Copyright (C) 1989-1995, 2001-2007, 2009, 2011 # 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 3 of the License, 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 this program. If not, see . 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])]) # We need makeinfo 4.8 or newer. AC_DEFUN([GROFF_MAKEINFO], [missing= AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo]) if test -z "$MAKEINFO"; then missing="\`makeinfo' is missing." else AC_MSG_CHECKING([for makeinfo version]) # We need an additional level of quoting to make sed's regexps work. [makeinfo_version=`$MAKEINFO --version 2>&1 \ | sed -e 's/^.* \([^ ][^ ]*\)$/\1/' -e '1q'`] AC_MSG_RESULT([$makeinfo_version]) # Consider only the first two numbers in version number string. makeinfo_version_major=`IFS=.; set x $makeinfo_version; echo 0${2}` makeinfo_version_minor=`IFS=.; set x $makeinfo_version; echo 0${3}` makeinfo_version_numeric=` expr ${makeinfo_version_major}000 \+ ${makeinfo_version_minor}` if test $makeinfo_version_numeric -lt 4008; then missing="\`makeinfo' is too old." fi fi if test -n "$missing"; then infofile=doc/groff.info test -f ${infofile} || infofile=${srcdir}/${infofile} if test ! -f ${infofile} \ || test ${srcdir}/doc/groff.texinfo -nt ${infofile}; then AC_MSG_ERROR($missing [Get the `texinfo' package version 4.8 or newer.]) else AC_MSG_WARN($missing [Get the `texinfo' package version 4.8 or newer if you want to convert `groff.texinfo' into a PDF or HTML document.]) fi fi AC_SUBST([MAKEINFO])]) # The following programs are needed for grohtml. AC_DEFUN([GROFF_HTML_PROGRAMS], [AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH]) make_html=html make_install_html=install_html missing= AC_FOREACH([groff_prog], [pnmcut pnmcrop pnmtopng psselect pnmtops], [AC_CHECK_PROG(groff_prog, groff_prog, [found], [missing]) if test $[]groff_prog = missing; then missing="$missing \`groff_prog'" fi;]) test "$GHOSTSCRIPT" = "missing" && missing="$missing \`gs'" if test -n "$missing"; then plural=`set $missing; test $[#] -gt 1 && echo s` missing=`set $missing missing="" while test $[#] -gt 0 do case $[#] in 1) missing="$missing$[1]" ;; 2) missing="$missing$[1] and " ;; *) missing="$missing$[1], " ;; esac shift done echo $missing` make_html= make_install_html= AC_MSG_WARN([missing program$plural: The program$plural $missing cannot be found in the PATH. Consequently, groff's HTML backend (grohtml) will not work properly; therefore, it will neither be possible to prepare, nor to install, documentation in HTML format. ]) fi AC_SUBST([make_html]) AC_SUBST([make_install_html])]) # To produce PDF docs, we need both awk and ghostscript. AC_DEFUN([GROFF_PDFDOC_PROGRAMS], [AC_REQUIRE([GROFF_AWK_PATH]) AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH]) make_pdfdoc=pdfdoc make_install_pdfdoc=install_pdfdoc missing="" test "$AWK" = missing && missing="\`awk'" test "$GHOSTSCRIPT" = missing && missing="$missing \`gs'" if test -n "$missing"; then plural=`set $missing; test $[#] -eq 2 && echo s` test x$plural = xs \ && missing=`set $missing; echo "$[1] and $[2]"` \ || missing=`echo $missing` make_pdfdoc= make_install_pdfdoc= AC_MSG_WARN([missing program$plural: The program$plural $missing cannot be found in the PATH. Consequently, groff's PDF formatter (pdfroff) will not work properly; therefore, it will neither be possible to prepare, nor to install, documentation in PDF format. ]) fi AC_SUBST([make_pdfdoc]) AC_SUBST([make_install_pdfdoc])]) # Check whether pnmtops can handle the -nosetpage option. AC_DEFUN([GROFF_PNMTOPS_NOSETPAGE], [AC_MSG_CHECKING([whether pnmtops can handle the -nosetpage option]) if echo P2 2 2 255 0 1 2 0 | pnmtops -nosetpage > /dev/null 2>&1 ; then AC_MSG_RESULT([yes]) pnmtops_nosetpage="pnmtops -nosetpage" else AC_MSG_RESULT([no]) pnmtops_nosetpage="pnmtops" fi AC_SUBST([pnmtops_nosetpage])]) # Check location of `gs'; allow `--with-gs=PROG' option to override. AC_DEFUN([GROFF_GHOSTSCRIPT_PATH], [AC_REQUIRE([GROFF_GHOSTSCRIPT_PREFS]) AC_ARG_WITH([gs], [AS_HELP_STRING([--with-gs=PROG], [actual [/path/]name of ghostscript executable])], [GHOSTSCRIPT=$withval], [AC_CHECK_TOOLS(GHOSTSCRIPT, [$ALT_GHOSTSCRIPT_PROGS], [missing])]) test "$GHOSTSCRIPT" = "no" && GHOSTSCRIPT=missing]) # Preferences for choice of `gs' program... # (allow --with-alt-gs="LIST" to override). AC_DEFUN([GROFF_GHOSTSCRIPT_PREFS], [AC_ARG_WITH([alt-gs], [AS_HELP_STRING([--with-alt-gs=LIST], [alternative names for ghostscript executable])], [ALT_GHOSTSCRIPT_PROGS="$withval"], [ALT_GHOSTSCRIPT_PROGS="gs gswin32c gsos2"]) AC_SUBST([ALT_GHOSTSCRIPT_PROGS])]) # Check location of `awk'; allow `--with-awk=PROG' option to override. AC_DEFUN([GROFF_AWK_PATH], [AC_REQUIRE([GROFF_AWK_PREFS]) AC_ARG_WITH([awk], [AS_HELP_STRING([--with-awk=PROG], [actual [/path/]name of awk executable])], [AWK=$withval], [AC_CHECK_TOOLS(AWK, [$ALT_AWK_PROGS], [missing])]) test "$AWK" = "no" && AWK=missing]) # Preferences for choice of `awk' program; allow --with-alt-awk="LIST" # to override. AC_DEFUN([GROFF_AWK_PREFS], [AC_ARG_WITH([alt-awk], [AS_HELP_STRING([--with-alt-awk=LIST], [alternative names for awk executable])], [ALT_AWK_PROGS="$withval"], [ALT_AWK_PROGS="gawk mawk nawk awk"]) AC_SUBST([ALT_AWK_PROGS])]) # GROFF_CSH_HACK(if hack present, if not present) AC_DEFUN([GROFF_CSH_HACK], [AC_MSG_CHECKING([for csh hash hack]) cat <conftest.sh #! /bin/sh 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]) # From udodo!hans@relay.NL.net (Hans Zuidam) AC_DEFUN([GROFF_ISC_SYSV3], [AC_MSG_CHECKING([for ISC 3.x or 4.x]) if grep ['[34]\.'] /usr/options/cb.name >/dev/null 2>&1 then AC_MSG_RESULT([yes]) AC_DEFINE([_SYSV3], [1], [Define if you have ISC 3.x or 4.x.]) else AC_MSG_RESULT([no]) fi]) AC_DEFUN([GROFF_POSIX], [AC_MSG_CHECKING([whether -D_POSIX_SOURCE is necessary]) AC_LANG_PUSH([C++]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #include extern "C" { void fileno(int); } ]]) ], [AC_MSG_RESULT([yes]) AC_DEFINE([_POSIX_SOURCE], [1], [Define if -D_POSIX_SOURCE is necessary.])], [AC_MSG_RESULT([no])]) AC_LANG_POP([C++])]) # srand() of SunOS 4.1.3 has return type int instead of void AC_DEFUN([GROFF_SRAND], [AC_LANG_PUSH([C++]) AC_MSG_CHECKING([for return type of srand]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #include extern "C" { void srand(unsigned int); } ]]) ], [AC_MSG_RESULT([void]) AC_DEFINE([RET_TYPE_SRAND_IS_VOID], [1], [Define if srand() returns void not int.])], [AC_MSG_RESULT([int])]) AC_LANG_POP([C++])]) # In April 2005, autoconf's AC_TYPE_SIGNAL is still broken. AC_DEFUN([GROFF_TYPE_SIGNAL], [AC_MSG_CHECKING([for return type of signal handlers]) for groff_declaration in \ 'extern "C" void (*signal (int, void (*)(int)))(int);' \ 'extern "C" void (*signal (int, void (*)(int)) throw ())(int);' \ 'void (*signal ()) ();' do AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #include #include #ifdef signal # undef signal #endif $groff_declaration ]], [[ int i; ]]) ], [break], [continue]) done if test -n "$groff_declaration"; then AC_MSG_RESULT([void]) AC_DEFINE([RETSIGTYPE], [void], [Define as the return type of signal handlers (`int' or `void').]) else AC_MSG_RESULT([int]) AC_DEFINE([RETSIGTYPE], [int], [Define as the return type of signal handlers (`int' or `void').]) fi]) AC_DEFUN([GROFF_SYS_NERR], [AC_LANG_PUSH([C++]) AC_MSG_CHECKING([for sys_nerr in , , or ]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #include #include #include ]], [[ int k; k = sys_nerr; ]]) ], [AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_SYS_NERR], [1], [Define if you have sys_nerr in , , or .])], [AC_MSG_RESULT([no])]) AC_LANG_POP([C++])]) AC_DEFUN([GROFF_SYS_ERRLIST], [AC_MSG_CHECKING([for sys_errlist[] in , , or ]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #include #include #include ]], [[ int k; k = (int)sys_errlist[0]; ]]) ], [AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_SYS_ERRLIST], [1], [Define if you have sys_errlist in , , or .])], [AC_MSG_RESULT([no])])]) AC_DEFUN([GROFF_OSFCN_H], [AC_LANG_PUSH([C++]) AC_MSG_CHECKING([C++ ]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #include ]], [[ read(0, 0, 0); open(0, 0); ]]) ], [AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_CC_OSFCN_H], [1], [Define if you have a C++ .])], [AC_MSG_RESULT([no])]) AC_LANG_POP([C++])]) AC_DEFUN([GROFF_LIMITS_H], [AC_LANG_PUSH([C++]) AC_MSG_CHECKING([C++ ]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #include ]], [[ int x = INT_MIN; int y = INT_MAX; int z = UCHAR_MAX; ]]) ], [AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_CC_LIMITS_H], [1], [Define if you have a C++ .])], [AC_MSG_RESULT([no])]) AC_LANG_POP([C++])]) AC_DEFUN([GROFF_TIME_T], [AC_LANG_PUSH([C++]) AC_MSG_CHECKING([for declaration of time_t]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #include ]], [[ time_t t = time(0); struct tm *p = localtime(&t); ]]) ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) AC_DEFINE([LONG_FOR_TIME_T], [1], [Define if localtime() takes a long * not a time_t *.])]) AC_LANG_POP([C++])]) AC_DEFUN([GROFF_STRUCT_EXCEPTION], [AC_MSG_CHECKING([struct exception]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #include ]], [[ struct exception e; ]]) ], [AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_STRUCT_EXCEPTION], [1], [Define if defines struct exception.])], [AC_MSG_RESULT([no])])]) AC_DEFUN([GROFF_ARRAY_DELETE], [AC_LANG_PUSH([C++]) AC_MSG_CHECKING([whether ANSI array delete syntax is supported]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM(, [[ char *p = new char[5]; delete [] p; ]]) ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) AC_DEFINE([ARRAY_DELETE_NEEDS_SIZE], [1], [Define if your C++ doesn't understand `delete []'.])]) AC_LANG_POP([C++])]) AC_DEFUN([GROFF_TRADITIONAL_CPP], [AC_LANG_PUSH([C++]) AC_MSG_CHECKING([traditional preprocessor]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #define name2(a, b) a/**/b ]], [[ int name2(foo, bar); ]]) ], [AC_MSG_RESULT([yes]) AC_DEFINE([TRADITIONAL_CPP], [1], [Define if your C++ compiler uses a traditional (Reiser) preprocessor.])], [AC_MSG_RESULT([no])]) AC_LANG_POP([C++])]) AC_DEFUN([GROFF_WCOREFLAG], [AC_MSG_CHECKING([w_coredump]) AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ #include #include ]], [[ main() { #ifdef WCOREFLAG exit(1); #else int i = 0; ((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])])]) 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_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])]) # 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 #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 ]], [[ #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++])]) # 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++])]) # Test whether exists, doesn't clash with , # and declares uintmax_t. Taken from the fileutils package. AC_DEFUN([GROFF_INTTYPES_H], [AC_LANG_PUSH([C++]) AC_MSG_CHECKING([C++ ]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #include #include ]], [[ uintmax_t i = (uintmax_t)-1; ]]) ], [groff_cv_header_inttypes_h=yes AC_DEFINE([HAVE_CC_INTTYPES_H], [1], [Define if you have a C++ .])], [groff_cv_header_inttypes_h=no]) AC_MSG_RESULT([$groff_cv_header_inttypes_h]) AC_LANG_POP([C++])]) # Test for working `unsigned long long'. Taken from the fileutils package. AC_DEFUN([GROFF_UNSIGNED_LONG_LONG], [AC_LANG_PUSH([C++]) AC_MSG_CHECKING([for unsigned long long]) AC_LINK_IFELSE([ AC_LANG_PROGRAM([[ unsigned long long ull = 1; int i = 63; unsigned long long ullmax = (unsigned long long)-1; ]], [[ return ull << i | ull >> i | ullmax / ull | ullmax % ull; ]]) ], [groff_cv_type_unsigned_long_long=yes], [groff_cv_type_unsigned_long_long=no]) AC_MSG_RESULT([$groff_cv_type_unsigned_long_long]) AC_LANG_POP([C++])]) # Define uintmax_t to `unsigned long' or `unsigned long long' # if does not exist. Taken from the fileutils package. AC_DEFUN([GROFF_UINTMAX_T], [AC_REQUIRE([GROFF_INTTYPES_H]) if test $groff_cv_header_inttypes_h = no; then AC_REQUIRE([GROFF_UNSIGNED_LONG_LONG]) test $groff_cv_type_unsigned_long_long = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type], [Define uintmax_t to `unsigned long' or `unsigned long long' if does not exist.]) fi]) # Identify PATH_SEPARATOR character to use in GROFF_FONT_PATH and # GROFF_TMAC_PATH which is appropriate for the target system (POSIX=':', # MS-DOS/Win32=';'). # # The logic to resolve this test is already encapsulated in # `${srcdir}/src/include/nonposix.h'. AC_DEFUN([GROFF_TARGET_PATH_SEPARATOR], [AC_MSG_CHECKING([separator character to use in groff search paths]) cp ${srcdir}/src/include/nonposix.h conftest.h AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #include #include "conftest.h" ]], [[ #if PATH_SEP_CHAR == ';' make an error "Path separator is ';'" #endif ]]) ], [GROFF_PATH_SEPARATOR=":"], [GROFF_PATH_SEPARATOR=";"]) AC_MSG_RESULT([$GROFF_PATH_SEPARATOR]) AC_SUBST(GROFF_PATH_SEPARATOR)]) # Check for X11. AC_DEFUN([GROFF_X11], [AC_REQUIRE([AC_PATH_XTRA]) groff_no_x=$no_x if test -z "$groff_no_x"; then OLDCFLAGS=$CFLAGS OLDLDFLAGS=$LDFLAGS OLDLIBS=$LIBS CFLAGS="$CFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS" LIBS="$LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" LIBS="$LIBS -lXaw" AC_MSG_CHECKING([for Xaw library and header files]) AC_LINK_IFELSE([ AC_LANG_PROGRAM([[ #include #include ]], []) ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) groff_no_x="yes"]) LIBS="$LIBS -lXmu" AC_MSG_CHECKING([for Xmu library and header files]) AC_LINK_IFELSE([ AC_LANG_PROGRAM([[ #include #include ]], []) ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) groff_no_x="yes"]) CFLAGS=$OLDCFLAGS LDFLAGS=$OLDLDFLAGS LIBS=$OLDLIBS fi if test "x$groff_no_x" = "xyes"; then AC_MSG_NOTICE([gxditview and xtotroff won't be built]) else XDEVDIRS="font/devX75 font/devX75-12 font/devX100 font/devX100-12" XPROGDIRS="src/devices/xditview src/utils/xtotroff" XLIBDIRS="src/libs/libxutil" fi AC_SUBST([XDEVDIRS]) AC_SUBST([XPROGDIRS]) AC_SUBST([XLIBDIRS])]) # Set up the `--with-appresdir' command line option. # Don't quote AS_HELP_STRING! AC_DEFUN([GROFF_APPRESDIR_OPTION], [AC_ARG_WITH([appresdir], AS_HELP_STRING([--with-appresdir=DIR], [X11 application resource files]))]) # Get a default value for the application resource directory. # # We ignore the `XAPPLRES' and `XUSERFILESEARCHPATH' environment variables. # # The goal is to find the `root' of X11. Under most systems this is # `/usr/X11/lib'. Application default files are then in # `/usr/X11/lib/X11/app-defaults'. # # Based on autoconf's AC_PATH_X macro. AC_DEFUN([GROFF_APPRESDIR_DEFAULT], [if test -z "$groff_no_x"; then # Create an Imakefile, run `xmkmf', then `make'. rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir # Make sure to not put `make' in the Imakefile rules, # since we grep it out. cat >Imakefile <<'EOF' xlibdirs: @echo 'groff_x_usrlibdir="${USRLIBDIR}"; groff_x_libdir="${LIBDIR}"' EOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", # which would confuse us. eval `${MAKE-make} xlibdirs 2>/dev/null | grep -v make` # Open Windows `xmkmf' reportedly sets LIBDIR instead of USRLIBDIR. for groff_extension in a so sl; do if test ! -f $groff_x_usrlibdir/libX11.$groff_extension && test -f $groff_x_libdir/libX11.$groff_extension; then groff_x_usrlibdir=$groff_x_libdir break fi done fi cd .. rm -f -r conftest.dir fi # In case the test with `xmkmf' wasn't successful, try a suite of # standard directories. Check `X11' before `X11Rn' because it is often # a symlink to the current release. groff_x_libdirs=' /usr/X11/lib /usr/X11R6/lib /usr/X11R5/lib /usr/X11R4/lib /usr/lib/X11 /usr/lib/X11R6 /usr/lib/X11R5 /usr/lib/X11R4 /usr/local/X11/lib /usr/local/X11R6/lib /usr/local/X11R5/lib /usr/local/X11R4/lib /usr/local/lib/X11 /usr/local/lib/X11R6 /usr/local/lib/X11R5 /usr/local/lib/X11R4 /usr/X386/lib /usr/x386/lib /usr/XFree86/lib/X11 /usr/lib /usr/local/lib /usr/unsupported/lib /usr/athena/lib /usr/local/x11r5/lib /usr/lpp/Xamples/lib /usr/openwin/lib /usr/openwin/share/lib' if test -z "$groff_x_usrlibdir"; then # We only test whether libX11 exists. for groff_dir in $groff_x_libdirs; do for groff_extension in a so sl; do if test ! -r $groff_dir/libX11.$groff_extension; then groff_x_usrlibdir=$groff_dir break 2 fi done done fi if test "x$with_appresdir" = "x"; then appresdir=$groff_x_usrlibdir/X11/app-defaults else appresdir=$with_appresdir fi fi AC_SUBST([appresdir])]) # Emit warning if --with-appresdir hasn't been used. AC_DEFUN([GROFF_APPRESDIR_CHECK], [if test -z "$groff_no_x"; then if test "x$with_appresdir" = "x"; then AC_MSG_NOTICE([ The application resource files for gxditview will be installed as $appresdir/GXditview and $appresdir/GXditview-color (existing files will be saved by appending `.old' to the file name). To install them into a different directory, say, `/etc/gxditview', add `--with-appresdir=/etc/gxditview' to the configure script command line options and rerun it. The environment variable `APPLRESDIR' must then be set to `/etc/' (note the trailing slash), omitting the `gxditview' part which is automatically appended by the X11 searching routines for resource files. More details can be found in the X(7) manual page. ]) fi fi]) # Set up the `--with-grofferdir' command line option. AC_DEFUN([GROFF_GROFFERDIR_OPTION], [AC_ARG_WITH([grofferdir], AS_HELP_STRING([--with-grofferdir=DIR], [groffer files location]))]) AC_DEFUN([GROFF_GROFFERDIR_DEFAULT], [if test "x$with_grofferdir" = "x"; then groffer_dir=$libdir/groff/groffer else groffer_dir=$with_grofferdir fi AC_SUBST([groffer_dir])]) groff-1.22.2/m4/iconv.m40000644000175000001440000002162012104714263013143 0ustar wlusers# iconv.m4 serial 18 (gettext-0.18.2) dnl Copyright (C) 2000-2002, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, dnl Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include int main () { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static const char input[] = "\263"; char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; const char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; }]])], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], [ changequote(,)dnl case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac changequote([,])dnl ]) LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to dnl avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". dnl This is tricky because of the way 'aclocal' is implemented: dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. dnl Otherwise aclocal's initial scan pass would miss the macro definition. dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. dnl Otherwise aclocal would emit many "Use of uninitialized value $1" dnl warnings. m4_define([gl_iconv_AC_DEFUN], m4_version_prereq([2.64], [[AC_DEFUN_ONCE( [$1], [$2])]], [m4_ifdef([gl_00GNULIB], [[AC_DEFUN_ONCE( [$1], [$2])]], [[AC_DEFUN( [$1], [$2])]])])) gl_iconv_AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL([am_cv_proto_iconv], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ]], [[]])], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([ $am_cv_proto_iconv]) AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) dnl Also substitute ICONV_CONST in the gnulib generated . m4_ifdef([gl_ICONV_H_DEFAULTS], [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) if test -n "$am_cv_proto_iconv_arg1"; then ICONV_CONST="const" fi ]) fi ]) groff-1.22.2/m4/lib-link.m40000644000175000001440000010044312104714263013527 0ustar wlusers# lib-link.m4 serial 26 (gettext-0.18.2) dnl Copyright (C) 2001-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ([2.54]) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) pushdef([Name],[m4_translit([$1],[./+-], [____])]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes popdef([NAME]) popdef([Name]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. The missing-message dnl defaults to 'no' and may contain additional hints for the user. dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) pushdef([Name],[m4_translit([$1],[./+-], [____])]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, dnl because these -l options might require -L options that are present in dnl LIBS. -l options benefit only from the -L options listed before it. dnl Otherwise, add it to the front of LIBS, because it may be a static dnl library that depends on another static library that is present in LIBS. dnl Static libraries benefit only from the static libraries listed after dnl it. case " $LIB[]NAME" in *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; *) LIBS="$LIB[]NAME $LIBS" ;; esac AC_LINK_IFELSE( [AC_LANG_PROGRAM([[$3]], [[$4]])], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= LIB[]NAME[]_PREFIX= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) popdef([NAME]) popdef([Name]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl acl_libext, dnl acl_shlibext, dnl acl_libname_spec, dnl acl_library_names_spec, dnl acl_hardcode_libdir_flag_spec, dnl acl_hardcode_libdir_separator, dnl acl_hardcode_direct, dnl acl_hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl Autoconf >= 2.61 supports dots in --with options. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH(P_A_C_K[-prefix], [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([P_A_C_K]) popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) groff-1.22.2/m4/codeset.m40000644000175000001440000000150012104714263013446 0ustar wlusers# codeset.m4 serial 5 (gettext-0.18.2) dnl Copyright (C) 2000-2002, 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[char* cs = nl_langinfo(CODESET); return !cs;]])], [am_cv_langinfo_codeset=yes], [am_cv_langinfo_codeset=no]) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE([HAVE_LANGINFO_CODESET], [1], [Define if you have and nl_langinfo(CODESET).]) fi ]) groff-1.22.2/m4/glibc21.m40000644000175000001440000000161312104714263013250 0ustar wlusers# glibc21.m4 serial 5 dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Test for the GNU C Library, version 2.1 or newer, or uClibc. # From Bruno Haible. AC_DEFUN([gl_GLIBC21], [ AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc], [ac_cv_gnu_library_2_1], [AC_EGREP_CPP([Lucky], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif #ifdef __UCLIBC__ Lucky user #endif ], [ac_cv_gnu_library_2_1=yes], [ac_cv_gnu_library_2_1=no]) ] ) AC_SUBST([GLIBC21]) GLIBC21="$ac_cv_gnu_library_2_1" ] ) groff-1.22.2/m4/lib-prefix.m40000644000175000001440000002042212104714263014065 0ustar wlusers# lib-prefix.m4 serial 7 (gettext-0.18) dnl Copyright (C) 2001-2005, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates dnl - a variable acl_libdirstem, containing the basename of the libdir, either dnl "lib" or "lib64" or "lib/64", dnl - a variable acl_libdirstem2, as a secondary possible value for dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or dnl "lib/amd64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. dnl On glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine dnl the compiler's default mode by looking at the compiler's library search dnl path. If at least one of its elements ends in /lib64 or points to a dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. dnl Otherwise we use the default, namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], [AC_EGREP_CPP([sixtyfour bits], [ #ifdef _LP64 sixtyfour bits #endif ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) ]) if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" ]) groff-1.22.2/m4/fcntl-o.m40000644000175000001440000001030512104714263013365 0ustar wlusers# fcntl-o.m4 serial 4 dnl Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. # Test whether the flags O_NOATIME and O_NOFOLLOW actually work. # Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. # Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. AC_DEFUN([gl_FCNTL_O_FLAGS], [ dnl Persuade glibc to define O_NOATIME and O_NOFOLLOW. dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes dnl AC_GNU_SOURCE. m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], [AC_REQUIRE([AC_GNU_SOURCE])]) AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_FUNCS_ONCE([symlink]) AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include #if HAVE_UNISTD_H # include #else /* on Windows with MSVC */ # include # include # defined sleep(n) _sleep ((n) * 1000) #endif #include #ifndef O_NOATIME #define O_NOATIME 0 #endif #ifndef O_NOFOLLOW #define O_NOFOLLOW 0 #endif static int const constants[] = { O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY }; ]], [[ int result = !constants; #if HAVE_SYMLINK { static char const sym[] = "conftest.sym"; if (symlink (".", sym) != 0) result |= 2; else { int fd = open (sym, O_RDONLY | O_NOFOLLOW); if (fd >= 0) { close (fd); result |= 4; } } unlink (sym); } #endif { static char const file[] = "confdefs.h"; int fd = open (file, O_RDONLY | O_NOATIME); if (fd < 0) result |= 8; else { struct stat st0; if (fstat (fd, &st0) != 0) result |= 16; else { char c; sleep (1); if (read (fd, &c, 1) != 1) result |= 24; else { if (close (fd) != 0) result |= 32; else { struct stat st1; if (stat (file, &st1) != 0) result |= 40; else if (st0.st_atime != st1.st_atime) result |= 64; } } } } } return result;]])], [gl_cv_header_working_fcntl_h=yes], [case $? in #( 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( *) gl_cv_header_working_fcntl_h='no';; esac], [gl_cv_header_working_fcntl_h=cross-compiling])]) case $gl_cv_header_working_fcntl_h in #( *O_NOATIME* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], [Define to 1 if O_NOATIME works.]) case $gl_cv_header_working_fcntl_h in #( *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], [Define to 1 if O_NOFOLLOW works.]) ]) groff-1.22.2/m4/lib-ld.m40000644000175000001440000000705012104714263013171 0ustar wlusers# lib-ld.m4 serial 5 (gettext-0.18.2) dnl Copyright (C) 1996-2003, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 /dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL([acl_cv_path_LD], [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT([$LD]) else AC_MSG_RESULT([no]) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) groff-1.22.2/config.sub0000755000175000001440000010567212104714256013242 0ustar wlusers#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012, 2013 Free Software Foundation, Inc. timestamp='2012-12-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: groff-1.22.2/test-groff.in0000644000175000001440000000330212104714256013652 0ustar wlusers#! /bin/sh # # Copyright (C) 1989-2000, 2001-2005, 2009, 2011 # 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 3 of the License, 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 this program. If not, see . # # This script runs groff without requiring that it be installed. SEP='@PATH_SEPARATOR@' builddir=@abs_top_builddir@/src srcdir=@abs_top_srcdir@ GROFF_BIN_PATH=\ $builddir/roff/groff$SEP\ $builddir/roff/troff$SEP\ $builddir/preproc/preconv$SEP\ $builddir/preproc/pic$SEP\ $builddir/preproc/eqn$SEP\ $builddir/preproc/tbl$SEP\ $builddir/preproc/grn$SEP\ $builddir/preproc/refer$SEP\ $builddir/preproc/soelim$SEP\ $builddir/preproc/html$SEP\ $builddir/devices/grops$SEP\ $builddir/devices/grodvi$SEP\ $builddir/devices/grotty$SEP\ $builddir/devices/grolj4$SEP\ $builddir/devices/grolbp$SEP\ $builddir/devices/grohtml$SEP\ $builddir/devices/gropdf$SEP\ $builddir/devices/xditview XENVIRONMENT=$srcdir/src/devices/xditview/GXditview.ad export XENVIRONMENT GROFF_COMMAND_PREFIX= GROFF_FONT_PATH=$builddir/../font$SEP$srcdir/font GROFF_TMAC_PATH=$srcdir/tmac export GROFF_BIN_PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH exec $builddir/roff/groff/groff ${1+"$@"} groff-1.22.2/mdate.sh0000644000175000001440000000321712104714256012675 0ustar wlusers#! /bin/sh # # Copyright (C) 1991, 1992, 2001, 2009 # 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 3 of the License, 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 this program. If not, see . # # Print the modification date of $1 `nicely'. # Don't want foreign dates. LANGUAGE= LC_ALL=C; export LC_ALL (date; if ls -L /dev/null 1>/dev/null 2>&1; then ls -L -l $1; else ls -l $1; fi ) | awk ' BEGIN { full["Jan"] = "January"; number["Jan"] = 1; full["Feb"] = "February"; number["Feb"] = 2; full["Mar"] = "March"; number["Mar"] = 3; full["Apr"] = "April"; number["Apr"] = 4; full["May"] = "May"; number["May"] = 5; full["Jun"] = "June"; number["Jun"] = 6; full["Jul"] = "July"; number["Jul"] = 7; full["Aug"] = "August"; number["Aug"] = 8; full["Sep"] = "September"; number["Sep"] = 9; full["Oct"] = "October"; number["Oct"] = 10; full["Nov"] = "November"; number["Nov"] = 11; full["Dec"] = "December"; number["Dec"] = 12; } NR == 1 { month = $2; year = $NF; } NR == 2 { if ($(NF-1) ~ /:/) { if (number[$(NF-3)] > number[month]) year--; } else year = $(NF-1); print $(NF-2), full[$(NF-3)], year }' groff-1.22.2/BUG-REPORT0000644000175000001440000000407612104714256012624 0ustar wlusers Groff Bug Report Please read the PROBLEMS file before sending in a bug report. Please fill in all fields, even if you think they are not relevant. Please delete the text in brackets before sending it in. Please report separate bugs separately. Send the completed form to bug-groff@gnu.org GROFF VERSION: [The version of groff you are using. For example, `1.05'] MACHINE: [The machine you are using. For example, `Sun SPARCstation 2'] OS: [The operating system you are using. For example, `SunOS 4.1.1'] COMPILER: [The compiler you are used to compile groff. For example, `g++ 1.40.3'] INPUT FILES: [Include all the files necessary to reproduce the problem that are not part of the standard groff distribution. This includes font description files, DESC files and macro files (with the exception of the -ms and -mm macros: we have them). Send them as a shell archive or as a uuencoded, compressed tar file. It's easier for us if you can provide an example that doesn't depend on any macro package, but obviously if you're reporting a problem with a macro package that won't be possible. Also a short example is more convenient than a long one, but don't worry if you can't find a short example. Don't say something like ``any file that X'': Always send a definite example.] COMMAND LINE: [The command line that we should run in order to observe the bug. For example, `gtroff -Tps bug.tr'. If the command line uses -ms or -mm, say whether these refer to the groff versions or the Unix versions of the macros.] DESCRIPTION OF INCORRECT BEHAVIOUR: [What goes wrong when that command line is run? For example, `gtroff gets a segmentation fault', or `The output looks bad because the bar over the x is too long and is too far over to the left.' If you get an error message, include it here without modification: Don't edit it to make it more readable.] SUGGESTED FIX [optional]: [If you can suggest a fix for the problem, include a context diff here. But don't delay sending in a bug report in the hope of finding a fix. Guesses about the cause of the bug are not usually helpful.] groff-1.22.2/Makefile.cpg0000644000175000001440000000273012104714256013456 0ustar wlusers# Copyright (C) 1992, 1995, 2001, 2004, 2009 # Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # # This file is part of groff. # # groff is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation, either version 3 of the License, 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 this program. If not, see . # # Makefile.cpg # MAKEFILEPARTS=\ $(top_srcdir)/Makefile.comm \ $(top_builddir)/Makefile.cfg \ $(srcdir)/Makefile.sub \ $(top_srcdir)/Makefile.cpg \ Makefile.dep all: $(PROG) $(MANPAGES) $(PROG): $(OBJS) $(XLIBS) $(LINK.c) -o $@ $(OBJS) $(XLIBS) $(EXTRA_LDFLAGS) $(LIBS) $(MLIB) install_bin: install_prog install_prog: $(PROG) install_data: install_man install_man: $(MANPAGES) uninstall_sub: uninstall_prog uninstall_man depend: depend_src depend.temp: $(GENSRCS) $(YTABC) distfiles: $(YTABC) TAGS: TAGS_src TAGS_src: $(CCSRCS) $(CSRCS) $(GRAM) $(HDRS) Makefile: $(MAKEFILEPARTS) Makefile.dep: touch Makefile.dep $(top_builddir)/stamp-h $(MANPAGES): $(top_srcdir)/VERSION $(top_srcdir)/REVISION groff-1.22.2/configure0000755000175000001440000121637412104714302013161 0ustar wlusers#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for groff 1.22.2. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-groff@gnu.org $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='groff' PACKAGE_TARNAME='groff-1.22.2' PACKAGE_VERSION='1.22.2' PACKAGE_STRING='groff 1.22.2' PACKAGE_BUGREPORT='bug-groff@gnu.org' PACKAGE_URL='' ac_unique_file="src/roff/groff/groff.cpp" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_list= ac_func_list= ac_subst_vars='LTLIBOBJS GLIBC21 pnmtops_nosetpage make_install_pdfdoc make_pdfdoc ac_ct_AWK AWK ALT_AWK_PROGS make_install_html make_html pnmtops psselect pnmtopng pnmcrop pnmcut ac_ct_GHOSTSCRIPT GHOSTSCRIPT ALT_GHOSTSCRIPT_PROGS GROFF_PATH_SEPARATOR tmac_wrap sys_tmac_prefix g PAGE BROKEN_SPOOLER_FLAGS LIBOBJS LIBEXT LTLIBICONV LIBICONV CXXCPP host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBM LIBC SH_SCRIPT_SED_CMD LN_S INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM INSTALL_INFO RANLIB MAKEINFO YACC PERLPATH DVIPRINT PSPRINT LPQ LP LPR groffer_dir appresdir XLIBDIRS XPROGDIRS XDEVDIRS X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS XMKMF OTHERDEVDIRS TTYDEVDIRS ac_ct_CXX CXXFLAGS CXX EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_x with_appresdir with_grofferdir with_gnu_ld enable_rpath with_libiconv_prefix with_alt_gs with_gs with_alt_awk with_awk ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC XMKMF CXXCPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures groff 1.22.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/groff-1.22.2] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of groff 1.22.2:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-rpath do not hardcode runtime library paths Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-x use the X Window System --with-appresdir=DIR X11 application resource files --with-grofferdir=DIR groffer files location --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-alt-gs=LIST alternative names for ghostscript executable --with-gs=PROG actual [/path/]name of ghostscript executable --with-alt-awk=LIST alternative names for awk executable --with-awk=PROG actual [/path/]name of awk executable Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags XMKMF Path to xmkmf, Makefile generator for X Window System CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF groff configure 1.22.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## -------------------------------- ## ## Report this to bug-groff@gnu.org ## ## -------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by groff $as_me 1.22.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do 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=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append 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 as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi as_fn_append ac_header_list " stdlib.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/param.h" as_fn_append ac_func_list " symlink" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; 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 eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers src/include/config.h:src/include/config.hin" 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 -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : 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 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h # checks for programs 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 -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : 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 ac_ext=cpp 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 -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi 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 ac_ext=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that C++ compiler can compile simple program" >&5 $as_echo_n "checking that C++ compiler can compile simple program... " >&6; } fi if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main() { return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "a working C++ compiler is required" "$LINENO" 5 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "$cross_compiling" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking that C++ static constructors and destructors are called" >&5 $as_echo_n "checking that C++ static constructors and destructors are called... " >&6; } fi if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "a working C++ compiler is required" "$LINENO" 5 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking that header files support C++" >&5 $as_echo_n "checking that header files support C++... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { fopen(0, 0); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "header files do not support C++ (if you are using a version of gcc/g++ earlier than 2.5, you should install libg++)" "$LINENO" 5 fi rm -f core 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether character set is EBCDIC" >&5 $as_echo_n "checking whether character set is EBCDIC... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Treat any failure as ASCII for compatibility with existing art. Use compile-time rather than run-time tests for cross-compiler tolerance. */ #if '0' != 240 make an error "Character set is not EBCDIC" #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : groff_cv_ebcdic="yes" TTYDEVDIRS="font/devcp1047" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define IS_EBCDIC_HOST 1" >>confdefs.h else groff_cv_ebcdic="no" TTYDEVDIRS="font/devascii font/devlatin1" OTHERDEVDIRS="font/devlj4 font/devlbp" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$groff_cv_ebcdic" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OS/390 Unix" >&5 $as_echo_n "checking for OS/390 Unix... " >&6; } case `uname` in OS/390) CFLAGS="$CFLAGS -D_ALL_SOURCE" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 $as_echo "neither works" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XOpenDisplay (); int main () { return XOpenDisplay (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_dnet_ntoa=yes else ac_cv_lib_dnet_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_stub_dnet_ntoa=yes else ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes; then : fi if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } if ${ac_cv_lib_bsd_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else ac_cv_lib_bsd_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = xyes; then : fi if test $ac_cv_func_connect = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if ${ac_cv_lib_socket_connect+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = xyes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" if test "x$ac_cv_func_remove" = xyes; then : fi if test $ac_cv_func_remove = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } if ${ac_cv_lib_posix_remove+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); int main () { return remove (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix_remove=yes else ac_cv_lib_posix_remove=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } if test "x$ac_cv_lib_posix_remove" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" if test "x$ac_cv_func_shmat" = xyes; then : fi if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } if ${ac_cv_lib_ipc_shmat+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); int main () { return shmat (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ipc_shmat=yes else ac_cv_lib_ipc_shmat=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } if test "x$ac_cv_lib_ipc_shmat" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char IceConnectionNumber (); int main () { return IceConnectionNumber (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_IceConnectionNumber=yes else ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi groff_no_x=$no_x if test -z "$groff_no_x"; then OLDCFLAGS=$CFLAGS OLDLDFLAGS=$LDFLAGS OLDLIBS=$LIBS CFLAGS="$CFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS" LIBS="$LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" LIBS="$LIBS -lXaw" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xaw library and header files" >&5 $as_echo_n "checking for Xaw library and header files... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } groff_no_x="yes" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS -lXmu" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xmu library and header files" >&5 $as_echo_n "checking for Xmu library and header files... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } groff_no_x="yes" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$OLDCFLAGS LDFLAGS=$OLDLDFLAGS LIBS=$OLDLIBS fi if test "x$groff_no_x" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: gxditview and xtotroff won't be built" >&5 $as_echo "$as_me: gxditview and xtotroff won't be built" >&6;} else XDEVDIRS="font/devX75 font/devX75-12 font/devX100 font/devX100-12" XPROGDIRS="src/devices/xditview src/utils/xtotroff" XLIBDIRS="src/libs/libxutil" fi # Check whether --with-appresdir was given. if test "${with_appresdir+set}" = set; then : withval=$with_appresdir; fi if test -z "$groff_no_x"; then # Create an Imakefile, run `xmkmf', then `make'. rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir # Make sure to not put `make' in the Imakefile rules, # since we grep it out. cat >Imakefile <<'EOF' xlibdirs: @echo 'groff_x_usrlibdir="${USRLIBDIR}"; groff_x_libdir="${LIBDIR}"' EOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", # which would confuse us. eval `${MAKE-make} xlibdirs 2>/dev/null | grep -v make` # Open Windows `xmkmf' reportedly sets LIBDIR instead of USRLIBDIR. for groff_extension in a so sl; do if test ! -f $groff_x_usrlibdir/libX11.$groff_extension && test -f $groff_x_libdir/libX11.$groff_extension; then groff_x_usrlibdir=$groff_x_libdir break fi done fi cd .. rm -f -r conftest.dir fi # In case the test with `xmkmf' wasn't successful, try a suite of # standard directories. Check `X11' before `X11Rn' because it is often # a symlink to the current release. groff_x_libdirs=' /usr/X11/lib /usr/X11R6/lib /usr/X11R5/lib /usr/X11R4/lib /usr/lib/X11 /usr/lib/X11R6 /usr/lib/X11R5 /usr/lib/X11R4 /usr/local/X11/lib /usr/local/X11R6/lib /usr/local/X11R5/lib /usr/local/X11R4/lib /usr/local/lib/X11 /usr/local/lib/X11R6 /usr/local/lib/X11R5 /usr/local/lib/X11R4 /usr/X386/lib /usr/x386/lib /usr/XFree86/lib/X11 /usr/lib /usr/local/lib /usr/unsupported/lib /usr/athena/lib /usr/local/x11r5/lib /usr/lpp/Xamples/lib /usr/openwin/lib /usr/openwin/share/lib' if test -z "$groff_x_usrlibdir"; then # We only test whether libX11 exists. for groff_dir in $groff_x_libdirs; do for groff_extension in a so sl; do if test ! -r $groff_dir/libX11.$groff_extension; then groff_x_usrlibdir=$groff_dir break 2 fi done done fi if test "x$with_appresdir" = "x"; then appresdir=$groff_x_usrlibdir/X11/app-defaults else appresdir=$with_appresdir fi fi # Check whether --with-grofferdir was given. if test "${with_grofferdir+set}" = set; then : withval=$with_grofferdir; fi if test "x$with_grofferdir" = "x"; then groffer_dir=$libdir/groff/groffer else groffer_dir=$with_grofferdir fi if test -z "$PSPRINT"; then 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LPR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LPR"; then ac_cv_prog_LPR="$LPR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LPR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LPR=$ac_cv_prog_LPR if test -n "$LPR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LPR" >&5 $as_echo "$LPR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LPR" && break done 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LP"; then ac_cv_prog_LP="$LP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LP="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LP=$ac_cv_prog_LP if test -n "$LP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LP" >&5 $as_echo "$LP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LP" && break done if test -n "$LPR" && test -n "$LP"; then # HP-UX provides an lpr command that emulates lpr using lp, # but it doesn't have lpq; in this case we want to use lp # rather than lpr. for ac_prog in lpq do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LPQ+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LPQ"; then ac_cv_prog_LPQ="$LPQ" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LPQ="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LPQ=$ac_cv_prog_LPQ if test -n "$LPQ"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LPQ" >&5 $as_echo "$LPQ" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LPQ" && break done test -n "$LPQ" || LPR= fi if test -n "$LPR"; then PSPRINT="$LPR" elif test -n "$LP"; then PSPRINT="$LP" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for command to use for printing PostScript files" >&5 $as_echo_n "checking for command to use for printing PostScript files... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PSPRINT" >&5 $as_echo "$PSPRINT" >&6; } # Figure out DVIPRINT from PSPRINT. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for command to use for printing dvi files" >&5 $as_echo_n "checking for command to use for printing dvi files... " >&6; } if test -n "$PSPRINT" && test -z "$DVIPRINT"; then if test "x$PSPRINT" = "xlpr"; then DVIPRINT="lpr -d" else DVIPRINT="$PSPRINT" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DVIPRINT" >&5 $as_echo "$DVIPRINT" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PERLPATH+:} false; then : $as_echo_n "(cached) " >&6 else case $PERLPATH in [\\/]* | ?:[\\/]*) ac_cv_path_PERLPATH="$PERLPATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERLPATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PERLPATH" && ac_cv_path_PERLPATH="/usr/bin/perl" ;; esac fi PERLPATH=$ac_cv_path_PERLPATH if test -n "$PERLPATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERLPATH" >&5 $as_echo "$PERLPATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi for ac_prog in byacc 'bison -y' do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" missing= # Extract the first word of "makeinfo", so it can be a program name with args. set dummy makeinfo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MAKEINFO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MAKEINFO"; then ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MAKEINFO="makeinfo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MAKEINFO=$ac_cv_prog_MAKEINFO if test -n "$MAKEINFO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 $as_echo "$MAKEINFO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$MAKEINFO"; then missing="\`makeinfo' is missing." else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for makeinfo version" >&5 $as_echo_n "checking for makeinfo version... " >&6; } # We need an additional level of quoting to make sed's regexps work. makeinfo_version=`$MAKEINFO --version 2>&1 \ | sed -e 's/^.* \([^ ][^ ]*\)$/\1/' -e '1q'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $makeinfo_version" >&5 $as_echo "$makeinfo_version" >&6; } # Consider only the first two numbers in version number string. makeinfo_version_major=`IFS=.; set x $makeinfo_version; echo 0${2}` makeinfo_version_minor=`IFS=.; set x $makeinfo_version; echo 0${3}` makeinfo_version_numeric=` expr ${makeinfo_version_major}000 \+ ${makeinfo_version_minor}` if test $makeinfo_version_numeric -lt 4008; then missing="\`makeinfo' is too old." fi fi if test -n "$missing"; then infofile=doc/groff.info test -f ${infofile} || infofile=${srcdir}/${infofile} if test ! -f ${infofile} \ || test ${srcdir}/doc/groff.texinfo -nt ${infofile}; then as_fn_error $? "$missing Get the \`texinfo' package version 4.8 or newer." "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $missing Get the \`texinfo' package version 4.8 or newer if you want to convert \`groff.texinfo' into a PDF or HTML document." >&5 $as_echo "$as_me: WARNING: $missing Get the \`texinfo' package version 4.8 or newer if you want to convert \`groff.texinfo' into a PDF or HTML document." >&2;} fi fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 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. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_INSTALL_INFO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$INSTALL_INFO"; then ac_cv_prog_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_INSTALL_INFO="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi INSTALL_INFO=$ac_cv_prog_INSTALL_INFO if test -n "$INSTALL_INFO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 $as_echo "$INSTALL_INFO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$INSTALL_INFO" && break done test -n "$INSTALL_INFO" || INSTALL_INFO=":" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # 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. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. 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. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_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 rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # use a dummy substitution if no csh hack is necessary to avoid errors # with non-GNU sed programs { $as_echo "$as_me:${as_lineno-$LINENO}: checking for csh hash hack" >&5 $as_echo_n "checking for csh hash hack... " >&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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SH_SCRIPT_SED_CMD='1s/.*/:/' else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SH_SCRIPT_SED_CMD='1s/a/a/' fi rm -f conftest.sh # checks for headers for ac_header in stddef.h stdlib.h unistd.h dirent.h limits.h sys/dir.h \ string.h strings.h math.h sys/time.h direct.h process.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISC 3.x or 4.x" >&5 $as_echo_n "checking for ISC 3.x or 4.x... " >&6; } if grep '[34]\.' /usr/options/cb.name >/dev/null 2>&1 then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define _SYSV3 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -D_POSIX_SOURCE is necessary" >&5 $as_echo_n "checking whether -D_POSIX_SOURCE is necessary... " >&6; } ac_ext=cpp 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include extern "C" { void fileno(int); } int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core 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=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for return type of srand" >&5 $as_echo_n "checking for return type of srand... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include extern "C" { void srand(unsigned int); } int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: void" >&5 $as_echo "void" >&6; } $as_echo "#define RET_TYPE_SRAND_IS_VOID 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5 $as_echo "int" >&6; } fi rm -f core 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday must be declared" >&5 $as_echo_n "checking whether gettimeofday must be declared... " >&6; } ac_ext=cpp 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 ${groff_cv_decl_needed_gettimeofday+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 gettimeofday char *p = (char *) gettimeofday; #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : groff_cv_decl_needed_gettimeofday=no else groff_cv_decl_needed_gettimeofday=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $groff_cv_decl_needed_gettimeofday" >&5 $as_echo "$groff_cv_decl_needed_gettimeofday" >&6; } if test $groff_cv_decl_needed_gettimeofday = yes; then $as_echo "#define NEED_DECLARATION_GETTIMEOFDAY 1" >>confdefs.h 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether hypot must be declared" >&5 $as_echo_n "checking whether hypot must be declared... " >&6; } ac_ext=cpp 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 ${groff_cv_decl_needed_hypot+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 hypot char *p = (char *) hypot; #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : groff_cv_decl_needed_hypot=no else groff_cv_decl_needed_hypot=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $groff_cv_decl_needed_hypot" >&5 $as_echo "$groff_cv_decl_needed_hypot" >&6; } if test $groff_cv_decl_needed_hypot = yes; then $as_echo "#define NEED_DECLARATION_HYPOT 1" >>confdefs.h 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether popen must be declared" >&5 $as_echo_n "checking whether popen must be declared... " >&6; } ac_ext=cpp 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 ${groff_cv_decl_needed_popen+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 popen char *p = (char *) popen; #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : groff_cv_decl_needed_popen=no else groff_cv_decl_needed_popen=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $groff_cv_decl_needed_popen" >&5 $as_echo "$groff_cv_decl_needed_popen" >&6; } if test $groff_cv_decl_needed_popen = yes; then $as_echo "#define NEED_DECLARATION_POPEN 1" >>confdefs.h 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pclose must be declared" >&5 $as_echo_n "checking whether pclose must be declared... " >&6; } ac_ext=cpp 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 ${groff_cv_decl_needed_pclose+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 pclose char *p = (char *) pclose; #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : groff_cv_decl_needed_pclose=no else groff_cv_decl_needed_pclose=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $groff_cv_decl_needed_pclose" >&5 $as_echo "$groff_cv_decl_needed_pclose" >&6; } if test $groff_cv_decl_needed_pclose = yes; then $as_echo "#define NEED_DECLARATION_PCLOSE 1" >>confdefs.h 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether putenv must be declared" >&5 $as_echo_n "checking whether putenv must be declared... " >&6; } ac_ext=cpp 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 ${groff_cv_decl_needed_putenv+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 putenv char *p = (char *) putenv; #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : groff_cv_decl_needed_putenv=no else groff_cv_decl_needed_putenv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $groff_cv_decl_needed_putenv" >&5 $as_echo "$groff_cv_decl_needed_putenv" >&6; } if test $groff_cv_decl_needed_putenv = yes; then $as_echo "#define NEED_DECLARATION_PUTENV 1" >>confdefs.h 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rand must be declared" >&5 $as_echo_n "checking whether rand must be declared... " >&6; } ac_ext=cpp 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 ${groff_cv_decl_needed_rand+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 rand char *p = (char *) rand; #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : groff_cv_decl_needed_rand=no else groff_cv_decl_needed_rand=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $groff_cv_decl_needed_rand" >&5 $as_echo "$groff_cv_decl_needed_rand" >&6; } if test $groff_cv_decl_needed_rand = yes; then $as_echo "#define NEED_DECLARATION_RAND 1" >>confdefs.h 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf must be declared" >&5 $as_echo_n "checking whether snprintf must be declared... " >&6; } ac_ext=cpp 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 ${groff_cv_decl_needed_snprintf+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 snprintf char *p = (char *) snprintf; #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : groff_cv_decl_needed_snprintf=no else groff_cv_decl_needed_snprintf=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $groff_cv_decl_needed_snprintf" >&5 $as_echo "$groff_cv_decl_needed_snprintf" >&6; } if test $groff_cv_decl_needed_snprintf = yes; then $as_echo "#define NEED_DECLARATION_SNPRINTF 1" >>confdefs.h 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether srand must be declared" >&5 $as_echo_n "checking whether srand must be declared... " >&6; } ac_ext=cpp 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 ${groff_cv_decl_needed_srand+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 srand char *p = (char *) srand; #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : groff_cv_decl_needed_srand=no else groff_cv_decl_needed_srand=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $groff_cv_decl_needed_srand" >&5 $as_echo "$groff_cv_decl_needed_srand" >&6; } if test $groff_cv_decl_needed_srand = yes; then $as_echo "#define NEED_DECLARATION_SRAND 1" >>confdefs.h 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasecmp must be declared" >&5 $as_echo_n "checking whether strcasecmp must be declared... " >&6; } ac_ext=cpp 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 ${groff_cv_decl_needed_strcasecmp+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 strcasecmp char *p = (char *) strcasecmp; #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : groff_cv_decl_needed_strcasecmp=no else groff_cv_decl_needed_strcasecmp=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $groff_cv_decl_needed_strcasecmp" >&5 $as_echo "$groff_cv_decl_needed_strcasecmp" >&6; } if test $groff_cv_decl_needed_strcasecmp = yes; then $as_echo "#define NEED_DECLARATION_STRCASECMP 1" >>confdefs.h 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strncasecmp must be declared" >&5 $as_echo_n "checking whether strncasecmp must be declared... " >&6; } ac_ext=cpp 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 ${groff_cv_decl_needed_strncasecmp+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 strncasecmp char *p = (char *) strncasecmp; #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : groff_cv_decl_needed_strncasecmp=no else groff_cv_decl_needed_strncasecmp=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $groff_cv_decl_needed_strncasecmp" >&5 $as_echo "$groff_cv_decl_needed_strncasecmp" >&6; } if test $groff_cv_decl_needed_strncasecmp = yes; then $as_echo "#define NEED_DECLARATION_STRNCASECMP 1" >>confdefs.h 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vfprintf must be declared" >&5 $as_echo_n "checking whether vfprintf must be declared... " >&6; } ac_ext=cpp 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 ${groff_cv_decl_needed_vfprintf+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 if ac_fn_cxx_try_compile "$LINENO"; then : groff_cv_decl_needed_vfprintf=no else groff_cv_decl_needed_vfprintf=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $groff_cv_decl_needed_vfprintf" >&5 $as_echo "$groff_cv_decl_needed_vfprintf" >&6; } if test $groff_cv_decl_needed_vfprintf = yes; then $as_echo "#define NEED_DECLARATION_VFPRINTF 1" >>confdefs.h 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf must be declared" >&5 $as_echo_n "checking whether vsnprintf must be declared... " >&6; } ac_ext=cpp 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 ${groff_cv_decl_needed_vsnprintf+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 if ac_fn_cxx_try_compile "$LINENO"; then : groff_cv_decl_needed_vsnprintf=no else groff_cv_decl_needed_vsnprintf=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $groff_cv_decl_needed_vsnprintf" >&5 $as_echo "$groff_cv_decl_needed_vsnprintf" >&6; } if test $groff_cv_decl_needed_vsnprintf = yes; then $as_echo "#define NEED_DECLARATION_VSNPRINTF 1" >>confdefs.h 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 ac_ext=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_nerr in , , or " >&5 $as_echo_n "checking for sys_nerr in , , or ... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { int k; k = sys_nerr; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_errlist in , , or " >&5 $as_echo_n "checking for sys_errlist in , , or ... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { int k; k = (int)sys_errlist[0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ " >&5 $as_echo_n "checking C++ ... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { read(0, 0, 0); open(0, 0); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_CC_OSFCN_H 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core 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 ac_ext=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ " >&5 $as_echo_n "checking C++ ... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int x = INT_MIN; int y = INT_MAX; int z = UCHAR_MAX; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_CC_LIMITS_H 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core 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 ac_ext=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ " >&5 $as_echo_n "checking C++ ... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t)-1; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : groff_cv_header_inttypes_h=yes $as_echo "#define HAVE_CC_INTTYPES_H 1" >>confdefs.h else groff_cv_header_inttypes_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $groff_cv_header_inttypes_h" >&5 $as_echo "$groff_cv_header_inttypes_h" >&6; } 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=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5 $as_echo_n "checking for unsigned long long... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ unsigned long long ull = 1; int i = 63; unsigned long long ullmax = (unsigned long long)-1; int main () { return ull << i | ull >> i | ullmax / ull | ullmax % ull; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : groff_cv_type_unsigned_long_long=yes else groff_cv_type_unsigned_long_long=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $groff_cv_type_unsigned_long_long" >&5 $as_echo "$groff_cv_type_unsigned_long_long" >&6; } 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 test $groff_cv_type_unsigned_long_long = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' cat >>confdefs.h <<_ACEOF #define uintmax_t $ac_type _ACEOF fi ac_ext=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of time_t" >&5 $as_echo_n "checking for declaration of time_t... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { time_t t = time(0); struct tm *p = localtime(&t); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define LONG_FOR_TIME_T 1" >>confdefs.h fi rm -f core 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for return type of signal handlers" >&5 $as_echo_n "checking for return type of signal handlers... " >&6; } for groff_declaration in \ 'extern "C" void (*signal (int, void (*)(int)))(int);' \ 'extern "C" void (*signal (int, void (*)(int)) throw ())(int);' \ 'void (*signal ()) ();' do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef signal # undef signal #endif $groff_declaration int main () { int i; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break else continue fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done if test -n "$groff_declaration"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: void" >&5 $as_echo "void" >&6; } $as_echo "#define RETSIGTYPE void" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5 $as_echo "int" >&6; } $as_echo "#define RETSIGTYPE int" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct exception" >&5 $as_echo_n "checking struct exception... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct exception e; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_STRUCT_EXCEPTION 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # check endianness { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac # checks for libraries { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lc" >&5 $as_echo_n "checking for main in -lc... " >&6; } if ${ac_cv_lib_c_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_main=yes else ac_cv_lib_c_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_main" >&5 $as_echo "$ac_cv_lib_c_main" >&6; } if test "x$ac_cv_lib_c_main" = xyes; then : LIBC=-lc fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 $as_echo_n "checking for sin in -lm... " >&6; } if ${ac_cv_lib_m_sin+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sin (); int main () { return sin (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sin=yes else ac_cv_lib_m_sin=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 $as_echo "$ac_cv_lib_m_sin" >&6; } if test "x$ac_cv_lib_m_sin" = xyes; then : LIBM=-lm fi ac_ext=cpp 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 # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 $as_echo_n "checking for ld used by GCC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : else enable_rpath=yes fi ac_ext=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp 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 acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 $as_echo_n "checking for 64-bit host... " >&6; } if ${gl_cv_solaris_64bit+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _LP64 sixtyfour bits #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sixtyfour bits" >/dev/null 2>&1; then : gl_cv_solaris_64bit=yes else gl_cv_solaris_64bit=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 $as_echo "$gl_cv_solaris_64bit" >&6; } if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } if ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static const char input[] = "\263"; char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; const char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : am_cv_func_iconv_works=yes else am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi LIBS="$am_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 $as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then $as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 $as_echo_n "checking for iconv declaration... " >&6; } if ${am_cv_proto_iconv+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : am_cv_proto_iconv_arg1="" else am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_proto_iconv" >&5 $as_echo " $am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _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 # we need LIBEXT LIBEXT=$acl_libext # checks for functions for ac_header in $ac_header_list do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_mmap_fixed_mapped=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; const char *cdata2; int i, pagesize; int fd, fd2; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 2; if (write (fd, data, pagesize) != pagesize) return 3; close (fd); /* Next, check that the tail of a page is zero-filled. File must have non-zero length, otherwise we risk SIGBUS for entire page. */ fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd2 < 0) return 4; cdata2 = ""; if (write (fd2, cdata2, 1) != 1) return 5; data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) if (*(data2 + i)) return 7; close (fd2); if (munmap (data2, pagesize)) return 8; /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) return 9; if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 10; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 11; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) return 12; if (read (fd, data3, pagesize) != pagesize) return 13; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 14; close (fd); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_mmap_fixed_mapped=yes else ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then $as_echo "#define HAVE_MMAP 1" >>confdefs.h fi rm -f conftest.mmap conftest.txt saved_libs="$LIBS" LIBS="$LIBS $LIBC $LIBM" ac_fn_c_check_func "$LINENO" "fmod" "ac_cv_func_fmod" if test "x$ac_cv_func_fmod" = xyes; then : $as_echo "#define HAVE_FMOD 1" >>confdefs.h else case " $LIBOBJS " in *" fmod.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS fmod.$ac_objext" ;; esac fi ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" if test "x$ac_cv_func_getcwd" = xyes; then : $as_echo "#define HAVE_GETCWD 1" >>confdefs.h else case " $LIBOBJS " in *" getcwd.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getcwd.$ac_objext" ;; esac fi ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv" if test "x$ac_cv_func_putenv" = xyes; then : $as_echo "#define HAVE_PUTENV 1" >>confdefs.h else case " $LIBOBJS " in *" putenv.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS putenv.$ac_objext" ;; esac fi ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" if test "x$ac_cv_func_snprintf" = xyes; then : $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h else case " $LIBOBJS " in *" snprintf.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;; esac fi ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" if test "x$ac_cv_func_strcasecmp" = xyes; then : $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h else case " $LIBOBJS " in *" strcasecmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" ;; esac fi ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" if test "x$ac_cv_func_strerror" = xyes; then : $as_echo "#define HAVE_STRERROR 1" >>confdefs.h else case " $LIBOBJS " in *" strerror.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strerror.$ac_objext" ;; esac fi ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" if test "x$ac_cv_func_strncasecmp" = xyes; then : $as_echo "#define HAVE_STRNCASECMP 1" >>confdefs.h else case " $LIBOBJS " in *" strncasecmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; esac fi ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" if test "x$ac_cv_func_strtol" = xyes; then : $as_echo "#define HAVE_STRTOL 1" >>confdefs.h else case " $LIBOBJS " in *" strtol.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strtol.$ac_objext" ;; esac fi # vsnprintf is in the same source file as snprintf for ac_func in vsnprintf do : ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" if test "x$ac_cv_func_vsnprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VSNPRINTF 1 _ACEOF else case " $LIBOBJS " in *" snprintf.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;; esac fi done LIBS="$saved_libs" for ac_func in gettimeofday isatty kill rename setlocale strsep do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mkstemp" >&5 $as_echo_n "checking for mkstemp... " >&6; } ac_ext=cpp 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int (*f) (char *); int main () { f = mkstemp; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_MKSTEMP 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } case " $LIBOBJS " in *" mkstemp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; esac fi rm -f core 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 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" if test "x$ac_cv_have_decl_sys_siglist" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SYS_SIGLIST $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } if ${am_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char* cs = nl_langinfo(CODESET); return !cs; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_langinfo_codeset=yes else am_cv_langinfo_codeset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 $as_echo "$am_cv_langinfo_codeset" >&6; } if test $am_cv_langinfo_codeset = yes; then $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi # checks for compiler characteristics ac_ext=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ANSI array delete syntax is supported" >&5 $as_echo_n "checking whether ANSI array delete syntax is supported... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { char *p = new char[5]; delete [] p; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define ARRAY_DELETE_NEEDS_SIZE 1" >>confdefs.h fi rm -f core 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 ac_ext=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking traditional preprocessor" >&5 $as_echo_n "checking traditional preprocessor... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define name2(a, b) a/**/b int main () { int name2(foo, bar); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define TRADITIONAL_CPP 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking w_coredump" >&5 $as_echo_n "checking w_coredump... " >&6; } if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { main() { #ifdef WCOREFLAG exit(1); #else int i = 0; ((union wait *)&i)->w_coredump = 1; exit(i != 0200); #endif } ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define WCOREFLAG 0200" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi # other random stuff { $as_echo "$as_me:${as_lineno-$LINENO}: checking default value for grops -b option" >&5 $as_echo_n "checking default value for grops -b option... " >&6; } test -n "${BROKEN_SPOOLER_FLAGS}" || BROKEN_SPOOLER_FLAGS=0 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BROKEN_SPOOLER_FLAGS" >&5 $as_echo "$BROKEN_SPOOLER_FLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking default paper size" >&5 $as_echo_n "checking default paper size... " >&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 $as_echo "#define PAGEA4 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAGE" >&5 $as_echo "$PAGE" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existing troff installation" >&5 $as_echo_n "checking for existing troff installation... " >&6; } if test "x`(echo .tm '|n(.g' | tr '|' '\\\\' | troff -z -i 2>&1) 2>/dev/null`" = x0; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } g=g else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } g= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prefix of system macro packages" >&5 $as_echo_n "checking for prefix of system macro packages... " >&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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sys_tmac_prefix" >&5 $as_echo "$sys_tmac_prefix" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking which system macro packages should be made available" >&5 $as_echo_n "checking which system macro packages should be made available... " >&6; } 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tmac_wrap" >&5 $as_echo "$tmac_wrap" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking separator character to use in groff search paths" >&5 $as_echo_n "checking separator character to use in groff search paths... " >&6; } cp ${srcdir}/src/include/nonposix.h conftest.h cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include "conftest.h" int main () { #if PATH_SEP_CHAR == ';' make an error "Path separator is ';'" #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : GROFF_PATH_SEPARATOR=":" else GROFF_PATH_SEPARATOR=";" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF_PATH_SEPARATOR" >&5 $as_echo "$GROFF_PATH_SEPARATOR" >&6; } # Check whether --with-alt-gs was given. if test "${with_alt_gs+set}" = set; then : withval=$with_alt_gs; ALT_GHOSTSCRIPT_PROGS="$withval" else ALT_GHOSTSCRIPT_PROGS="gs gswin32c gsos2" fi # Check whether --with-gs was given. if test "${with_gs+set}" = set; then : withval=$with_gs; GHOSTSCRIPT=$withval else if test -n "$ac_tool_prefix"; then for ac_prog in $ALT_GHOSTSCRIPT_PROGS do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_GHOSTSCRIPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$GHOSTSCRIPT"; then ac_cv_prog_GHOSTSCRIPT="$GHOSTSCRIPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GHOSTSCRIPT="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi GHOSTSCRIPT=$ac_cv_prog_GHOSTSCRIPT if test -n "$GHOSTSCRIPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GHOSTSCRIPT" >&5 $as_echo "$GHOSTSCRIPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GHOSTSCRIPT" && break done fi if test -z "$GHOSTSCRIPT"; then ac_ct_GHOSTSCRIPT=$GHOSTSCRIPT for ac_prog in $ALT_GHOSTSCRIPT_PROGS do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_GHOSTSCRIPT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_GHOSTSCRIPT"; then ac_cv_prog_ac_ct_GHOSTSCRIPT="$ac_ct_GHOSTSCRIPT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_GHOSTSCRIPT="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_GHOSTSCRIPT=$ac_cv_prog_ac_ct_GHOSTSCRIPT if test -n "$ac_ct_GHOSTSCRIPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GHOSTSCRIPT" >&5 $as_echo "$ac_ct_GHOSTSCRIPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_GHOSTSCRIPT" && break done if test "x$ac_ct_GHOSTSCRIPT" = x; then GHOSTSCRIPT="missing" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac GHOSTSCRIPT=$ac_ct_GHOSTSCRIPT fi fi fi test "$GHOSTSCRIPT" = "no" && GHOSTSCRIPT=missing make_html=html make_install_html=install_html missing= # Extract the first word of "pnmcut", so it can be a program name with args. set dummy pnmcut; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_pnmcut+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$pnmcut"; then ac_cv_prog_pnmcut="$pnmcut" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_pnmcut="found" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_pnmcut" && ac_cv_prog_pnmcut="missing" fi fi pnmcut=$ac_cv_prog_pnmcut if test -n "$pnmcut"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pnmcut" >&5 $as_echo "$pnmcut" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test $pnmcut = missing; then missing="$missing \`pnmcut'" fi;# Extract the first word of "pnmcrop", so it can be a program name with args. set dummy pnmcrop; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_pnmcrop+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$pnmcrop"; then ac_cv_prog_pnmcrop="$pnmcrop" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_pnmcrop="found" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_pnmcrop" && ac_cv_prog_pnmcrop="missing" fi fi pnmcrop=$ac_cv_prog_pnmcrop if test -n "$pnmcrop"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pnmcrop" >&5 $as_echo "$pnmcrop" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test $pnmcrop = missing; then missing="$missing \`pnmcrop'" fi;# Extract the first word of "pnmtopng", so it can be a program name with args. set dummy pnmtopng; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_pnmtopng+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$pnmtopng"; then ac_cv_prog_pnmtopng="$pnmtopng" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_pnmtopng="found" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_pnmtopng" && ac_cv_prog_pnmtopng="missing" fi fi pnmtopng=$ac_cv_prog_pnmtopng if test -n "$pnmtopng"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pnmtopng" >&5 $as_echo "$pnmtopng" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test $pnmtopng = missing; then missing="$missing \`pnmtopng'" fi;# Extract the first word of "psselect", so it can be a program name with args. set dummy psselect; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_psselect+:} false; then : $as_echo_n "(cached) " >&6 else 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 do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_psselect="found" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_psselect" && ac_cv_prog_psselect="missing" fi fi psselect=$ac_cv_prog_psselect if test -n "$psselect"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $psselect" >&5 $as_echo "$psselect" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_pnmtops+:} false; then : $as_echo_n "(cached) " >&6 else 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 do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_pnmtops="found" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_pnmtops" && ac_cv_prog_pnmtops="missing" fi fi pnmtops=$ac_cv_prog_pnmtops if test -n "$pnmtops"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pnmtops" >&5 $as_echo "$pnmtops" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test $pnmtops = missing; then missing="$missing \`pnmtops'" fi; test "$GHOSTSCRIPT" = "missing" && missing="$missing \`gs'" if test -n "$missing"; then plural=`set $missing; test $# -gt 1 && echo s` missing=`set $missing missing="" while test $# -gt 0 do case $# in 1) missing="$missing$1" ;; 2) missing="$missing$1 and " ;; *) missing="$missing$1, " ;; esac shift done echo $missing` make_html= make_install_html= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: missing program$plural: The program$plural $missing cannot be found in the PATH. Consequently, groff's HTML backend (grohtml) will not work properly; therefore, it will neither be possible to prepare, nor to install, documentation in HTML format. " >&5 $as_echo "$as_me: WARNING: missing program$plural: The program$plural $missing cannot be found in the PATH. Consequently, groff's HTML backend (grohtml) will not work properly; therefore, it will neither be possible to prepare, nor to install, documentation in HTML format. " >&2;} fi # Check whether --with-alt-awk was given. if test "${with_alt_awk+set}" = set; then : withval=$with_alt_awk; ALT_AWK_PROGS="$withval" else ALT_AWK_PROGS="gawk mawk nawk awk" fi # Check whether --with-awk was given. if test "${with_awk+set}" = set; then : withval=$with_awk; AWK=$withval else if test -n "$ac_tool_prefix"; then for ac_prog in $ALT_AWK_PROGS do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done fi if test -z "$AWK"; then ac_ct_AWK=$AWK for ac_prog in $ALT_AWK_PROGS do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AWK"; then ac_cv_prog_ac_ct_AWK="$ac_ct_AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AWK=$ac_cv_prog_ac_ct_AWK if test -n "$ac_ct_AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AWK" >&5 $as_echo "$ac_ct_AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AWK" && break done if test "x$ac_ct_AWK" = x; then AWK="missing" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AWK=$ac_ct_AWK fi fi fi test "$AWK" = "no" && AWK=missing make_pdfdoc=pdfdoc make_install_pdfdoc=install_pdfdoc missing="" test "$AWK" = missing && missing="\`awk'" test "$GHOSTSCRIPT" = missing && missing="$missing \`gs'" if test -n "$missing"; then plural=`set $missing; test $# -eq 2 && echo s` test x$plural = xs \ && missing=`set $missing; echo "$1 and $2"` \ || missing=`echo $missing` make_pdfdoc= make_install_pdfdoc= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: missing program$plural: The program$plural $missing cannot be found in the PATH. Consequently, groff's PDF formatter (pdfroff) will not work properly; therefore, it will neither be possible to prepare, nor to install, documentation in PDF format. " >&5 $as_echo "$as_me: WARNING: missing program$plural: The program$plural $missing cannot be found in the PATH. Consequently, groff's PDF formatter (pdfroff) will not work properly; therefore, it will neither be possible to prepare, nor to install, documentation in PDF format. " >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pnmtops can handle the -nosetpage option" >&5 $as_echo_n "checking whether pnmtops can handle the -nosetpage option... " >&6; } if echo P2 2 2 255 0 1 2 0 | pnmtops -nosetpage > /dev/null 2>&1 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } pnmtops_nosetpage="pnmtops -nosetpage" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } pnmtops_nosetpage="pnmtops" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } if ${ac_cv_gnu_library_2_1+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif #ifdef __UCLIBC__ Lucky user #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky" >/dev/null 2>&1; then : ac_cv_gnu_library_2_1=yes else ac_cv_gnu_library_2_1=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 $as_echo "$ac_cv_gnu_library_2_1" >&6; } GLIBC21="$ac_cv_gnu_library_2_1" for ac_func in $ac_func_list do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 $as_echo_n "checking for working fcntl.h... " >&6; } if ${gl_cv_header_working_fcntl_h+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : gl_cv_header_working_fcntl_h=cross-compiling else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if HAVE_UNISTD_H # include #else /* on Windows with MSVC */ # include # include # defined sleep(n) _sleep ((n) * 1000) #endif #include #ifndef O_NOATIME #define O_NOATIME 0 #endif #ifndef O_NOFOLLOW #define O_NOFOLLOW 0 #endif static int const constants[] = { O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY }; int main () { int result = !constants; #if HAVE_SYMLINK { static char const sym[] = "conftest.sym"; if (symlink (".", sym) != 0) result |= 2; else { int fd = open (sym, O_RDONLY | O_NOFOLLOW); if (fd >= 0) { close (fd); result |= 4; } } unlink (sym); } #endif { static char const file[] = "confdefs.h"; int fd = open (file, O_RDONLY | O_NOATIME); if (fd < 0) result |= 8; else { struct stat st0; if (fstat (fd, &st0) != 0) result |= 16; else { char c; sleep (1); if (read (fd, &c, 1) != 1) result |= 24; else { if (close (fd) != 0) result |= 32; else { struct stat st1; if (stat (file, &st1) != 0) result |= 40; else if (st0.st_atime != st1.st_atime) result |= 64; } } } } } return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_header_working_fcntl_h=yes else case $? in #( 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( *) gl_cv_header_working_fcntl_h='no';; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 $as_echo "$gl_cv_header_working_fcntl_h" >&6; } case $gl_cv_header_working_fcntl_h in #( *O_NOATIME* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac cat >>confdefs.h <<_ACEOF #define HAVE_WORKING_O_NOATIME $ac_val _ACEOF case $gl_cv_header_working_fcntl_h in #( *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac cat >>confdefs.h <<_ACEOF #define HAVE_WORKING_O_NOFOLLOW $ac_val _ACEOF ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl _ACEOF ac_config_files="$ac_config_files stamp-h" ac_config_files="$ac_config_files Makefile doc/Makefile src/utils/xtotroff/Makefile" ac_config_files="$ac_config_files contrib/gdiffmk/tests/runtests" ac_config_files="$ac_config_files test-groff" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `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" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by groff $as_me 1.22.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent 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 --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ groff config.status 1.22.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac 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 || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/config.h:src/include/config.hin" ;; "stamp-h") CONFIG_FILES="$CONFIG_FILES stamp-h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "src/utils/xtotroff/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/xtotroff/Makefile" ;; "contrib/gdiffmk/tests/runtests") CONFIG_FILES="$CONFIG_FILES contrib/gdiffmk/tests/runtests" ;; "test-groff") CONFIG_FILES="$CONFIG_FILES test-groff" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files 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 against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # 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[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; esac case $ac_file$ac_mode in "stamp-h":F) echo timestamp > stamp-h ;; "contrib/gdiffmk/tests/runtests":F) chmod +x contrib/gdiffmk/tests/runtests ;; "test-groff":F) chmod +x test-groff ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # 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_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 || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi if test -z "$groff_no_x"; then if test "x$with_appresdir" = "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: The application resource files for gxditview will be installed as $appresdir/GXditview and $appresdir/GXditview-color (existing files will be saved by appending \`.old' to the file name). To install them into a different directory, say, \`/etc/gxditview', add \`--with-appresdir=/etc/gxditview' to the configure script command line options and rerun it. The environment variable \`APPLRESDIR' must then be set to \`/etc/' (note the trailing slash), omitting the \`gxditview' part which is automatically appended by the X11 searching routines for resource files. More details can be found in the X(7) manual page. " >&5 $as_echo "$as_me: The application resource files for gxditview will be installed as $appresdir/GXditview and $appresdir/GXditview-color (existing files will be saved by appending \`.old' to the file name). To install them into a different directory, say, \`/etc/gxditview', add \`--with-appresdir=/etc/gxditview' to the configure script command line options and rerun it. The environment variable \`APPLRESDIR' must then be set to \`/etc/' (note the trailing slash), omitting the \`gxditview' part which is automatically appended by the X11 searching routines for resource files. More details can be found in the X(7) manual page. " >&6;} fi fi groff-1.22.2/NEWS0000644000175000001440000025414612104714256011757 0ustar wlusers Copyright (C) 1989-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. 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.22.2 ============== Tbl --- o The character `#' can now be used as an eqn delimiter within tables. Eqn --- o A GNU extension delim on has been added to reactivate delimiters which have been disabled with `delim off'. VERSION 1.22.1 ============== (There was no release 1.22.) Groff ----- o A new option `-j' has been added to call the `chem' preprocessor. Tbl --- o Improved line numbering support. Macro Packages -------------- o Support for the `refer' preprocessor has been added to the -mm macro package. o In -me, the `TH' macro was changed for compatibility with line number support in tables. `bl' now works inside of blocks. The behaviour of centered blocks has been improved. Line numbering support has been improved. o The -mom macro package has reached version 2.0, focusing on PDF output with gropdf (using the new `pdfmom' wrapper script). See the file `version-2.html' of the -mom documentation for a list of the many changes. o Some generic Unicode fallback characters (mainly Roman numerals) have been added. Gropdf ------ o A new driver for generating PDF output directly, contributed by Deri James . Note that this driver is written in Perl, thus you need a working Perl installation to run this output device. Pdfmom ------ o A new wrapper around groff that facilitates the production of PDF documents from files formatted with the -mom macros. VERSION 1.21 ============ Troff ----- o The new `lsm' request specifies a macro to be invoked when leading spaces in an input line are encountered (which are removed then). Number registers `lsn' and `lss' hold the number of removed leading spaces and the corresponding horizontal space, respectively. o There is a new warning category `file', enabled by default. The `mso' request emits warnings in this category when the requested macro file does not exist. o The new `class' request assigns a short name to a set of characters which can be referred to in the `cflags' request. This is especially useful to control line-breaking and hyphenation rules in CJK languages. o Three new values for the `cflags' request have been added, which are needed for proper CJK support. 128 prohibit before but allow break after character 256 prohibit after but allow break before character 512 allow break before and after character Tbl --- o A new global option `nowarn' suppresses warnings if tables are longer than the current line width. Afmtodit -------- o New option `-o' to specify the name of the output file. Macro Packages -------------- o A new macro `%U' has been added to the mdoc package to indicate a URL reference within an .Rs/.Re environment. o Rudimentary support for the Japanese script has been added, most suitable for man page handling as output by grotty. The file `ja.tmac' contains the necessary setup to allow line breaks before and after CJK characters (with proper exceptions). Note, however, that no inter-character spacing is implemented yet -- this usually causes many warnings about bad line breaks. VERSION 1.20.1 ============== A packaging error made it necessary to publish this release. No user-visible changes. VERSION 1.20 ============ Groff ----- o XHTML support has been added to grohtml and can be specified by -Txhtml. This option also utilizes the MathML capability of eqn and combines the outputs of both in the final XHTML file. Users can also specify the `-P-V' option together with `-Txhtml' in groff. This has the effect of creating an XHTML validator button at the bottom of each page. o Some options have been added to control a new preprocessor, `preconv' (see below): `-k' activates it, `-K' sets the input encoding, and `-D' sets the default encoding. o A new environment variable `GROFF_ENCODING' sets the encoding of input files; it implies command option `-k'. Troff ----- o Two new requests `device' and `devicem' have been added which are equivalents to the \X and \Y escapes, respectively. o A new read-only number register `.br' is available which is set to 1 if a macro is called as .foo and to 0 if called as 'foo. This allows to reliably modify requests. .als bp@orig bp .de bp . tm before bp . ie \\n[.br] .bp@orig . el 'bp@orig . tm after bp .. o A new request `fzoom' has been added to adjust the optical size of a font in relation to the others. The zoom factor is given in integer multiples of 1/1000th. In the following example, the CR font is magnified by 10% (the zoom factor is 1.1). .fam P .fzoom CR 1100 .ps 12 Palatino and \f[CR]Courier\f[] The new number register `.zoom' holds the zoom value of the current font, in multiples of 1/1000th. o The `cflags' request has been extended with a new flag value 64, to be used in combination with values 2 (break before character) and 4 (break after character). If set, the hyphenation codes of the surrounding characters are ignored. o A new debugging request, `pev', has been added to print all of the current known environments to stderr. It first prints the state of the current environment, then iterates through all of the known environments, printing each except the one that is current. o A new escape `\$^' has been added. It represents the parameters of a macro as if they were an argument to the `ds' request. This is used by `trace.tmac'. o A new read-only number register `.O' is available which returns the current suppression level as set by the `\O' escape. o The space width emitted by the `\|' and `\^' escape sequences can be controlled on a per-font basis. If there is a glyph named `\|' or `\^', respectively (note the leading backslash), defined in the current font file, use this glyph's width instead of the default value. This behaviour is not new, but hasn't been documented before. Nroff ----- o Two new command line options `-w' and `-W' are accepted and passed to groff to enable and disable warning messages, respectively. Preconv ------- o This is a new preprocessor to convert various input encodings to something groff understands (this is, ASCII and \[uXXXX] entities, with `XXXX' a hexadecimal number with 4 to 6 digits, representing a Unicode input code). Normally, preconv should be invoked with options `-k' and `-K' of groff. See the preconv man page for details. Pic --- o int(x) now really behaves as documented: It truncates the non-integer part of x, this is, it rounds towards zero and not towards the next integer less than or equal to x. o Pic now supports up to 32 macro arguments (and up to 16 on EBCDIC platforms). o Heinz-Jürgen Örtel contributed code for two new keywords, `xslanted' and `yslanted', which can change the shape of boxes into arbitrary parallelograms. Tbl --- o Latest versions of DWB tbl introduced an `x' column specifier for a single column expanded to the line width. GNU tbl has now been extended to support even multiple `x' specifiers within a table. o To avoid collision with the new `x' specifier, a block formatting macro must now be selected with specifier letter `m'. Eqn --- o Eric S. Raymond has added a new device type to eqn, MathML. When -TMathML is enabled, eqn now emits MathML formula markup rather than groff commands. The new groff -Txhtml device uses this. Chem ---- o The preprocessor `chem' was added. `chem' is a roff language to generate chemical structure diagrams. It generates `pic' output. Grops ----- o The PS font definition files have been regenerated with newer AFM versions from Adobe's 35 core fonts as present in most Level 2 PS printers. The changes are minor (most notably, the addition of the `Euro' glyph and an extended set of kerning values). For backwards compatibility, the old set of font definition files is still available; for details please read the man page of grops. Grotty ------ o \D'p...' is now supported if the polygon consists entirely of horizontal and vertical lines. Grohtml ------- o XHTML support has been added. o New command line option `-V' (to be used in XHTML mode) to produce an XHTML validator button. o New command line option `-y' to produce a right-justified groff signature at the end of the document (in combination with option `-V'). Gxditview --------- o Support for keyboard navigation has been improved. o Similar to other X11 applications, there are now two resource files, `GXditview' and `GXditview-color'. Groffer ------- o `groffer' version 1.* exists now in a shell and a Perl version. Afmtodit -------- o New option `-c' to output more font information as comments. o New option `-k' to suppress output of kerning data. o New option `-f NAME' to set the internal name of the groff font. Macro Packages -------------- o Joachim Walsdorff contributed the `hdtbl' package for the generation of tables, using a syntax very similar to the HTML table model. For example, a table with two cells and two rows looks like this: .TBL cols=2 . TR .TD 1*1 .TD 1*2 . TR .TD 2*1 .TD 2*2 .ETB Here the same table using a more expanded syntax: .TBL cols=2 . TR . TD 1*1 . TD 1*2 . TR . TD 2*1 . TD 2*2 .ETB Tables can be nested; `hdtbl' works without a preprocessor so that the full capability of groff's macro engine is available. This package currently works with `-Tps' only. o -mandoc now supports multiple man pages (in either man or mdoc format). o Fabrice Ménard contributed locales support. In particular, it is now possible to get French localization of the main macro packages (-ms, -mm, -me, and -mom, but not -man and -mdoc which are localized differently) by appending `-mfr' to the list of macro packages. Example: groff -ms -mfr foo > foo.ps Note that latin-9 input encoding is used for French (to support the `oe' ligature). o Swedish macro localization (with `-msv') has been added. o German macro localization (with `-mde' and `-mden' for traditional and new orthography, respectively) has been added. o Czech macro localization (with `-mcs') has been added. Note that latin-2 input encoding is used for Czech. o A new macro `Dx' has been added to the mdoc package which identifies the DragonFly OS. o If mdoc is used to print multiple man pages (together with the -rcR=0 command line option), each man page now starts a new page. o -mtrace has been considerably improved, now showing number and string register assignments, among other things. See the groff_trace man page for details. o The PSPIC macro now works with all devices (producing a hollow rectangle on devices which don't support inclusion of PS images) and is loaded in troffrc at start-up. o A new auxiliary macro package `62bit' has been added which provides some macros for adding, multiplying, and dividing signed 62bit integers (mainly to handle normal groff number operations without risking overflow errors). o For -ms, Eric S. Raymond contributed support for ancient Bell Labs localisms `.SC', `.UC', `.P1', and `.P2'. The latter three are enabled only after .SC is called. o A new string, `SN-STYLE', has been added to the ms macros, controlling the formatting of section numbers in headings defined by `.NH'. o The new macro package `ptx' provides a template definition for the `.xx' macro as needed by GNU ptx (for creating permuted indices). VERSION 1.19.2 ============== Troff ----- o Analogously to the .ft and \f pair, two new requests `gcolor' and `fcolor' (which pair with \m and \M, respectively) have been added to set the glyph and background colours. o A new read-only, string-valued register `.sty' returns the name of the current style. o Two new conditional operators `F ' and `S ' have been added. `F' is true if a font exists. `S' is true if a style has been registered. o Cyrillic characters have been added to the `utf8' and `html' output devices. Pic --- o The `by' argument in a `for' loop can now be negative if it is additive. For the multiplicative case, it must be greater than zero. Eqn --- o The following keywords aren't new but haven't been documented previously: undef NAME (to undefine a macro) copy "FILE" (a synonym for `include') space n (to modify the vertical spacing before and after an equation) o The following macros aren't new but haven't been documented previously: Alpha, ..., Omega (the same as `ALPHA', ..., `OMEGA') ldots (three dots on the base line) dollar (a dollar glyph) o The following keywords have been extended. Again, this isn't new but hasn't been documented previously: col n { ... } lcol n { ... } rcol n { ... } ccol n { ... } pile n { ... } lpile n { ... } rpile n { ... } cpile n { ... } (set vertical spacing between rows to N) Grohtml ------- o This device driver has been raised to beta stage; its set of tags should be stable now. o New command line option `-s' to set the base point size. o New command line option `-S' to set the split level while generating multiple files. Grotty ------ o Experimental support for zero-width and double-width characters. Gxditview --------- o On platforms which have the X Window System this program is now built and installed automatically. Xtotroff -------- o This program to create font definition files for xditview isn't new but hasn't been installed previously. Groffer ------- o A security problem (reported as CAN-2004-0969) has been fixed. Gdiffmk ------- o A new script contributed by Mike Bianchi. It compares two groff, nroff, or troff documents and creates an output with added margin characters (using `.mc') to indicate the differences. Pdfroff ------- o A new wrapper script contributed by Keith Marshall to easily create PDF documents with groff. Macro packages -------------- o ms.tmac . Support for fractional point sizes: A value for the `PS', `VS', `FPS', and `VPS' register larger than or equal to 1000 is always divided by 1000. For example, `.nr PS 10250' sets the document's font size to 10.25 points. . The `Ds' and `De' macros provided in ms since groff version 1.19 have been removed; the equivalent `DS' and `DE' macros should be used instead. X11 documents which actually use `Ds' and `De' always load a specific macro file from the X11 distribution (`macros.t') which provides proper definitions for the two macros. . The following registers have been added for improving layout control: PORPHANS Defines number of lines following `LP', `PP', `QP', `IP' or `XP' which must be kept together, before any automatic page break. HORPHANS Sets number of lines of following paragraph which must be kept with a heading, defined by `NH' or `SH', before any automatic page break. GROWPS Sets the first level of heading (set with `NH') which keeps the same point size as body text. PSINCR Sets the point size increment for each level of heading (set with `NH'), below the threshold level set by `GROWPS'; e.g., if \n[PS] = 10, \n[GROWPS] = 3 and \n[PSINCR] = 2.0p, then `.NH 1' produces 14pt headings, `.NH 2' produces 12pt, and all other levels remain at 10pt (because \n[PS] = 10). . The `SH' macro now accepts a numeric argument, to make heading size match that of `NH' with same argument value when the `GROWPS'/`PSINCR' feature is enabled. Please refer to the documentation of the ms package for other, minor improvements. o me.tmac The section type set with the `++' request is available in the `_M' register. This isn't new but hasn't been documented before. o www.tmac The `HR' macro no longer causes an empty line for non-HTML devices. A new macro `HEAD' has been added to directly add data to the ... block. New macros `OLS' and `OLE' to start and end an ordered list. New macros `DLS' and `DLE' to start and end a definition list. Pdfmark ------- o A new macro package contributed by Keith Marshall which implements PDF marks. This is in alpha stage currently. Miscellaneous ------------- o Two new keywords to the DESC file have been added which are needed for grohtml: `image_generator' and `unscaled_charwidths'. The former gives the name of the program which creates PNG images, and the latter makes troff always use unscaled character widths. VERSION 1.19.1 ============== Groff ----- o The argument of the command line option `-I' is now also passed to troff and grops, specifying a directory to search for files on the command line, files named in `so' and `psbb' requests, and files named in \X'ps: file' and \X'ps: import' escapes. o If option `-V' is used more than once, the commands are 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 specifier `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 split 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 ============ Troff ----- o Input encoding files for latin-9 (a.k.a. latin-0 and ISO 8859-15) and latin-2 (ISO 8859-2) have been added. Example use: groff -Tdvi -mlatin9 my_file > my_file.dvi You still need proper fonts with the necessary glyphs. Out of the box, the groff package supports latin-9 only for -Tps, -Tdvi, and -Tutf8, 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 http://partners.adobe.com/public/developer/opentype/index_glyph.html 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 constructed algorithmically will be added in the future. The \[...] escape sequence has been extended to specify multiple glyph components. Example: \[A ho] this accesses a glyph with the name `u0041_0328'. Some groff glyphs which are useful as composites map to `wrong' Unicode code points. For example, `ho' maps to U+02DB which is a spacing ogonek, whereas a non-spacing ogonek U+0328 is needed for composite glyphs. The new request .composite from to changes the mapping while a composite glyph name is constructed. To make \[A ho] yield the expected result, .composite ho u0328 is needed. [The new file `composite.tmac' loaded at start-up already contains proper calls to `.composite'.] Please refer to the info pages of groff and to the groff_char man page for more details. o A new request `fschar' has been added to define font-specific fallback characters. They are searched after the list of fonts declared with the `fspecial' request but before the list of fonts declared with `special'. o Fallback characters defined with `fschar' can be removed with the new `rfschar' request. o A new request `schar' has been added to define global fallback characters. They are searched after the list of fonts declared with the `special' request but before the already mounted special fonts. o In groff versions 1.18 and 1.18.1, \D'f ...' didn't move the current point horizontally. Despite of being silly, this change has been reverted for backwards compatibility. Consequently, the intermediate output command `Df' also moves the position horizontally again. \D'f ...' is deprecated since it depends on the horizontal resolution of the output device (given with the `hor' parameter in the DESC file). Use the new \D'Fg ...' escape instead. o For orthogonality, new \D subcommands to change the fill color are available: \D'Fr ...' (rgb) \D'Fc ...' (cmy) \D'Fg ...' (gray) \D'Fk ...' (cmyk) \D'Fd' (default color) The arguments are the same as with the `defcolor' request. The current position is *not* changed. o The values set with \H and \S are now available in number registers \n[.height] and \n[.slant], respectively. o The `.pe' number register isn't new but hasn't been documented before. It is set to 1 during a page ejection caused by the `bp' request. o The new glyph symbol `tno' is a textual variant of `no'. o The new glyph symbol `+e' represents U+03F5, GREEK LUNATE EPSILON SYMBOL. (Well, it is not really new since it has been previously supported by grolj4.) The mapping for both the dvi and lj4 symbol font has been changed accordingly so that Greek small letter epsilon, `*e', has the same glyph shape as with other devices. Grops ----- o The font `freeeuro.pfa' has been added to provide various default glyph shapes for `eu' and `Eu'. o It is now possible to access all glyphs in a Type 1 font, not only 256 (provided the font file created by afmtodit has proper entries). grops constructs additional encoding vectors on the fly if necessary. o The paper size is now emitted via the %%DocumentMedia and PageSize mechanisms so that it is no longer required to tell `gv' or `ps2pdf' about the paper size. The `broken' flag value 16 omits this feature (the used PostScript command `setpagedevice' is a LanguageLevel 2 extension) -- 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 spacing with eqn. Grodvi ------ o The font cmtex10 has been added as the special font `SC' to the DVI fonts. It is used as a font-specific special font for CW and CWI. o New options -l and -p to set landscape orientation and the paper size. grodvi now emits a `papersize' special which is understood by DVI drivers like dvips. Consequently, the DESC file should contain a `papersize' keyword. o The glyph shapes for \[*f] and \[*e] have been exchanged with \[+f] and \[+e], respectively, to be in sync with all other devices. o Glyphs \[HE] and \[DI] have been replaced with \[u2662] and \[u2661], respectively, since the former two glyphs have a black (filled) shape which grodvi doesn't provide by default (it never has actually). Grolj4 ------ o The glyphs \[*e] and \[+e] have been exchanged to be in sync with all other devices. o The glyph \[~=] is now called \[|=]. Similar to other devices, \[~=] is now another name for glyph \[~~]. Grotty ------ o New option `-r'. It is similar to the -i option except it tells grotty to use the `reverse video' attribute to render italic fonts. Pic --- o New command `figname' to set the name of a picture's output box in TeX mode. Refer ----- o The environment variable `REFER' to override the name of the default database isn't new but hasn't been documented before. Soelim ------ o New option `-r' to avoid emission of `.lf' lines. o New option `-t' to emit TeX comment lines (giving current file and the line number) instead of `.lf' lines. Afmtodit -------- o Unencoded glyphs in an AFM file are output also (since grops can now emit multiple encoding vectors for a single font). o New option `-m' to prevent negative left italic correction values. o The mapping and encoding file together with file `DESC' are now searched in the default font directory also. Please refer to the man page of afmtodit for more details. Macro Packages -------------- o Larry Kollar and others made the man macros more customizable. . New command line options -rFT, -rIN, and -rSN to set the vertical location of the footer line, the body text indentation, and the sub-subheading indentation. . New command line option -rHY (similar to the ms macros) to control hyphenation. . New macros `.PT' and `.BT' to print the header and footer strings. They can be replaced with a customized version in `man.local'. . The string `HF' now holds the typeface to print headings and subheadings. . Similar to the ms macros, the LT register now defaults to LL if not explicitly specified on the command line. o troff's start-up file `troffrc' now includes `papersize.tmac' to set the paper size with the command line option `-dpaper='. Possible values for `' are the same as the predefined `papersize' values in the DESC file (only lowercase; see the groff_font man page) except a7-d7. An appended `l' (ell) character denotes landscape orientation. Examples: `a4', `c3l', `letterl'. Most output drivers need additional command line switches `-p' and `-l' to override the default paper length and orientation as set in the driver specific DESC file. For example, use the following for PS output on A4 paper in landscape orientation: groff -Tps -dpaper=a4l -P-pa4 -P-l -ms foo.ms > foo.ps VERSION 1.18.1 ============== Troff ----- o The non-slanted PostScript font definition files have been regenerated to include left and right italic correction values. Applying those to a glyph (this is, prepending the glyph with `\,' and appending `\/' to the glyph) sets the glyph width to the real value given by the horizontal bounding box values. Without those escapes, the advance width for the particular glyph is used (which can differ considerably). Most users will neither need this feature nor notice a difference in existing documents (provided \, and \/ is used as advertised, namely for italic fonts only); its main goal is to improve image generation with grohtml. This is an experimental change, and feedback is welcome. Tbl --- o Added global option `nospaces' to ignore leading and trailing spaces in data items. Grolbp ------ o The option -w (--linewidth) has been added (similar to other device drivers) to set the default line width. Grn --- o Support for b-spline and Bezier curves has been added. Groffer ------- o New option `--shell' to select the shell under which groffer shall run. Macro Packages -------------- o The string `Am' (producing an ampersand) has been added to mdoc for compatibility with NetBSD. o `.IX' is now deprecated for mom; you should use `.IQ' (Indent Quit) instead. o In mom, new inlines `FWD', `BCK', `UP', and `DOWN' deal with horizontal and vertical movements; please refer to contrib/mom/NEWS for more details. o New macro ENDNOTES_HDRFTR_CENTER for mom to better control headers. Miscellaneous ------------- o The `papersize' keyword in the DESC file now accepts multiple arguments. It is scanned from left to the right, and the first valid argument is used. This makes it possible to provide a fallback paper size. Example: papersize /etc/papersize a4 o A local font directory has been prepended to the default font path; it defaults to /usr/local/share/groff/site-font. Similar to the normal font searching process, files must be placed into a devXXX subdirectory, e.g. /usr/local/share/groff/site-font/devps/FOO for a PostScript font definition file FOO. VERSION 1.18 ============ *************************************************************************** * * * PLEASE READ THE CHANGES BELOW REGARDING GROTTY, GROFF'S TTY FRONTEND. * * * *************************************************************************** Troff ----- o Color support has been added to troff and pic (and to the device drivers grops, grodvi, grotty, and grohtml -- other preprocessors and drivers will follow). A new function `defcolor' defines colors; the escape sequence `\m' sets the drawing color, the escape sequence `\M' specifies the background color for closed objects created with \D'...' commands. `\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 redefined. Use the `color' request to toggle the usage of colors (default is on); the read-only register `.color' is 0 if colors are not active, and non-zero otherwise. The old `Df' output command is mapped onto `DFg'; all color output commands don't change the current font position (consequently, `Df' doesn't either). Outputting color can be disabled in troff and groff with the option -c (it is always disabled in compatibility mode). See the section on grotty for the GROFF_NO_SGR environment variable also. For defining color components as fractions between 0 and 1, a new scaling indicator `f' has been introduced: 1f = 65536u. For testing whether a color is defined (with .if and .ie), a new conditional operator `m' is available. More details can be found in the groff_diff.7 manual page and in groff.texinfo. o Similar to \m and \M, \f[] switches back to the previous font. \fP (and \f[P]) is still valid for backwards compatibility. o The new escape \F is the same as `.fam'; \F[] switches back to previous family -- \F[P] selects family `P'. o Two new glyph symbols are available: `eu' is the official Euro symbol; `Eu' is a font-specific glyph variant. o The new glyph symbols `t+-', `tdi', and `tmu' are textual variants of `+-', `di', and `mu', respectively. o Latin-1 character 181 (PS name `mu', Unicode name U+00B5 MICRO SIGN) has got the troff glyph name `mc'. o -Tutf8 is now available on EBCDIC hosts. o Strings can take arguments, using this syntax: \*[foo arg1 arg2 ...]. Example: .ds xxx This is a \\$1 test. \*[xxx nice] o It is now possible to have whitespace between the first and second dot (or the name of the ending macro) to end a macro definition. Example: .de ! .. . .de foo . nop Hello, I'm `foo'. . nop I will now define `bar'. . de bar ! . nop Hello, I'm `bar'. . ! .. o `.fn' is a new string-valued register which returns the (internal) real font name; styles and families are properly concatenated. o Three new read/write registers `seconds', `minutes', and `hours' contain the current time, set at start-up of troff. Use the `af' request to control their output format. o The new request `fchar' can be used to provide fallback characters. It has the same syntax as the `char' request; the only difference is that a character defined with `.char' hides the glyph with the same name in the current font, whereas a character defined with `.fchar' is checked only if the particular glyph isn't found in the current font. This test happens before checking special fonts. o In analogy to the `tmc' request, `.writec' is the same as `.write' but doesn't emit a final newline. o The new request `itc' is a variant of `.it' for which a line interrupted with \c counts as one input line. o Two new requests `ds1' and `as1' which are similar to `ds' and `as' but with compatibility mode disabled during expansion of strings defined by them. o The syntax of the `substring' request has been changed: The first character in a string now has index 0, the last character has index -1. Note that this is an incompatible change. o To emit strings directly to the intermediate output, a new `output' request has been added; it is similar to `\!' used at the top level. o `.hpf' has been extended. It can now handle most TeX hyphenation pattern files without modification. To do that, the commands \patterns, \hyphenation, and \endinput are recognized. Please refer to groff_diff.7 for more information. o `hpfcode' is a new request to provide an input encoding mapping for the `hpf' request. o The new request `hpfa' appends hyphenation patterns (`hpf' replaces already existing patterns). o A new request `ami' (append macro indirect) has been added. The first and second parameter of `ami' are taken from string registers rather than directly; this very special request is needed to make `trace.tmac' independent from the escape character (which might even be disabled). o The new request `sizes' is similar to the `sizes' command in DESC files. It expects the same syntax; the data must be on a single line, and the final `0' can be omitted. o `trin' (translate input) is a new request which is similar to `tr' with the exception that the `asciify' request uses the character code (if any) before the character translation. Example: .trin ax .di xxx a .br .di .xxx .trin aa .asciify xxx .xxx The result is `x a'. Using `tr', the result would be `x x'. o The request `pvs' isn't new, but hasn't been documented before. It adds vertical space after a line has been output. This makes it an alternative to the `ls' request to produce double-spaced documents. The read-only register `.pvs' holds the current amount of the post-vertical line space. o For compatibility with plan 9's troff, multiple `pi' requests are supported: .pi foo .pi bar is now equivalent to .pi foo | bar o A new escape sequence `\O' is available to disable and enable glyph output. Please see groff_diff.7 and groff.texinfo for more details. o The escapes `\%', `\&', `\)', and `\:' no longer cause an error in \X; they are ignored now. Additionally `\ ' and `\~' are converted to single space characters. o The default tab distance in nroff mode is now 0.8i to be compatible with UNIX troff. o Using the latin-1 input character 0xAD (soft hyphen) for the `shc' request was a bad idea. Instead, it is now translated to `\%', and the default hyphenation character is again \[hy]. Note that the glyph \[shc] is not useful for typographic purposes; it only exists to have glyph names for all latin-1 characters. Macro Packages -------------- o Peter Schaffter has contributed a new major macro package called `mom', mainly for non-scientific writers, which takes care of many typographic issues. It comes with a complete reference (in HTML format) and some examples. `mom' has been designed to format documents for PostScript output only. o Two macros `AT' (AT&T) and `UC' (Univ. of California) have been added to the man macros for compatibility with older BSD releases. o Both the man and mdoc macro packages now use the LL and LT registers for setting the line and title length, respectively (similar to those registers in the ms macro package). If not set on the command line or in a macro file loaded before the macro package itself, they default to 78n in nroff mode and 6.5i in troff mode. o The `-xwidth' specifier in the mdoc macro package has been removed. Its functionality is now integrated directly into `-width'. Similarly, `-column' has been extended to provide this functionality also. o A new macro `Ex' has been added to the mdoc macro package to document an exit status. o The PSPIC macro has been extended to work with DVI output (`pspic.tmac' is now automatically loaded for -Tdvi), using a dvips special to load the EPS file. o The trace.tmac package now traces calls to `am' also. Additionally, it works in compatibility mode. o `troff.1' has been split. Differences to UNIX troff are now documented in the new man page `groff_diff.7'. o `groff_mwww.7' has been renamed to `groff_www.7'. The file mwww.tmac has been removed. o `groff_ms.7' has been completely rewritten. It now contains a complete reference to the ms macros. o `groff_trace.7' documents the trace macro package. o Changes in www.tmac: Note that HTML support is still in alpha change, so it is rather likely that both macro names and macro syntax will change. Some of the macros mentioned below aren't really new but haven't been documented properly before. The following macros have been renamed: MAILTO -> MTO IMAGE -> IMG LINE -> HR For consistency, the macros `URL', `FTL', and `MTO' now all have the address as the first parameter followed by the description. By default, grohtml generates links to all section headings at the top of the document. Use the new `LK' macro to specify a different place. For specifying the background color and a background image, use the new macros `BCL' and `BGIMG', respectively. The macro `NHR' has been added; it suppresses the generation of top and bottom rules which grohtml emits by default. The new macro `HX' determines the cut-off point for automatic link generation to headings. The image position parameter names in `IMG' have been changed to `-L', `-R', and `-C'. New macro `PIMG' for inclusion of a PNG image (it automatically converts it into an EPS file if not -Thtml is used). New macro `MPIMG' for putting a PNG image into the left or right margin (it automatically converts it into an EPS file if not -Thtml is used). New macros `HnS', `HnE' to start and end a header line block. New macro `DC' to produce dropcap characters. New macro `HTL' to generate an HTML title line only but no H1 heading. New macros `ULS' and `ULE' to start and end an unordered list. The new macro `LI' inserts a list item. Groff ----- o The new command line option `-c' disables color output (which is always disabled in compatibility mode). Nroff ----- o Two new command line options `-c' and `-C'; the former passes `-c' to grotty (switching to the old output scheme); the latter passes `-C' to groff (enabling compatibility mode). Pic --- o New keywords `color' (or `colour', `colored', `coloured'), `outline' (or `outlined'), and `shaded' are available. `outline' sets the color of the outline, `shaded' the fill color, and `color' sets both. Example: circle shaded "green" outline "black" ; Filled arrows always use the outline color for filling. Color support for TeX output is not implemented yet. Pic2graph --------- o A new script contributed by Eric S. Raymond . It converts a PIC diagram into a cropped image. Since it uses gs and the PNM library, virtually all graphics formats are available for output. Eqn2graph --------- o A new script contributed by Eric S. Raymond . It converts an EQN diagram into a cropped image. Since it uses gs and the PNM library, virtually all graphics formats are available for output. Groffer ------- o A new script contributed by Bernd Warken . It displays groff files and man pages on X and tty, taking care of most parameters automatically. Grog ---- o Documents using the mom macro package are recognized. Grops ----- o Color support has been added. o A new option `-p' is available to select the output paper size. It has the same syntax as the new `papersize' keyword in the DESC file. Grodvi ------ o By default, font sizes are now available in the range 5-10000pt, similar to PS fonts. If you want the old behaviour (i.e., font sizes at discrete values only), insert the following at the start of your document: .if '\*[.T]'dvi' \ . sizes 500 600 700 800 900 1000 1095 1200 1400 1440 1600 \ 1728 1800 2000 2074 2200 2400 2488 2800 3600 o A new font file HBI (using cmssbxo10; this is slanted sans serif bold extended) has been added. o Two font families are now available: `T' and `H'. o EC and TC fonts have been integrated. Use `-mec' (calling the file ec.tmac) to switch to them. Those fonts give a much better coverage of the symbols defined by groff than the CM fonts. Note that ec.tmac must be called before any language-specific files; it doesn't take care of hcode values. o Color support has been added. For drawing commands, colors are translated to gray values currently. Grotty ------ o Color support has been added, using the SGR (ISO 6429, sometimes called ANSI color) escape sequences. o SGR escape sequences are now used by default for underlining and bold printing also, no longer using the backspace character trick. To revert to the old behaviour, use the `-c' switch. Note that you have to use the `-R' option of `less' to make SGR escapes display correctly. On the other hand, terminal programs and consoles like `xterm' which support SGR sequences natively can directly display the output of grotty. Consequently, the options `-b', `-B', `-u', and `-U' work only in combination with `-c' and are ignored silently otherwise. For the `man' program, it may be necessary to add the `-R' option of `less' to the $PAGER environment variable (or $MANPAGER, depending on the used `man' program); alternatively, you can use `man's `-P' option (or adapt its configuration file accordingly). See man(1) for more details. o If the environment variable GROFF_NO_SGR is set, SGR output is disabled, reverting to the old behaviour. o A new special \X'tty: sgr n' has been added; if n is non-zero or missing, enable SGR output (the default). o If the new option `-i' is used (only in SGR mode), grotty sends escape sequences to set the italic font attribute instead of the underline attribute for italic fonts. Note that many terminals don't have support for this (including xterm). Grohtml ------- o Color support for glyphs has been added. o New option `-h' to select the style of headings in HTML output. o New option `-b' to set the background colour to white. o New options `-a' and `-g' to control the number of bits for anti-aliasing used for text and graphics, respectively. Default value is 4; 0 means no anti-aliasing. o groff character/glyph entities now map onto HTML 4 character entities. Grolbp ------ o Valid paper sizes are now specified as with the new `papersize' keyword in the DESC file. Specifically, the old custom paper type format `custAAAxBBB' is no longer supported. Miscellaneous ------------- o A new manual page `ditroff.7' is available. o The groff texinfo manual is installed now, together with a bunch of examples. o A new keyword `papersize' has been added to the DESC file format. Its argument is either . a predefined paper format (e.g. `A4' or `letter') . a file name pointing to a file which must contain a paper size specification in its first line (e.g. `/etc/papersize') . a custom paper size definition like `35c,4i' See groff_font(5) for more details. This keyword only affects the physical dimensions of the output medium; grops, grolj4, and grolbp use it currently. troff completely ignores it. VERSION 1.17.2 ============== This is major bug-fixing release which should replace 1.17.1. Troff ----- o The `IMAGE' macro in www.tmac has changed: Now the optional 2nd parameter gives the horizontal image location (left, centered, or right), and the optional 3rd and 4th parameter the image dimensions. VERSION 1.17.1 ============== This is mainly a bug-fixing release. Troff ----- o Two new requests `de1' and `am1' which are similar to `de' and `am' but with compatibility mode disabled during expansion of macros defined by them. o Added request `brp'. This is the same as `\p'. o Similar to other versions of troff, the `ns' request now works in all diversions, not only in the top-level one. o New read-only number register `.ns'. Returns 1 if in no-space mode, 0 otherwise. Nroff ----- o Options -p (pic) and -t (tbl) added. o The environment variable GROFF_BIN_PATH is now checked before PATH for finding groff. Grohtml ------- o New option `-D dir' to specify a directory in which all images are placed. o New option `-I stem' to specify an image name stame. If not given, `grohtml-XXX' is used (`XXX' is the process ID). VERSION 1.17 ============ Groff ----- o `-mFOO' now searches first for `FOO.tmac' and then for `tmac.FOO'. The old behaviour has been changed to overcome problems with platforms which have an 8+3 file name limit, and platforms which have other versions of troff installed also. Additionally, all macro files have been renamed using the latter scheme to avoid 8+3 name clashes. o The new environment variable GROFF_BIN_PATH is checked for programs groff is calling (preprocessors, troff, and output devices) before PATH. If not set, it defaults to the directory where the groff binary is located. Previously, it was PATH only. The nroff script only uses GROFF_BIN_PATH to find the groff binary but passes both the GROFF_BIN_PATH and PATH environment variables to groff. Troff ----- o The mdoc package has been completely rewritten, using the full power of GNU troff to remove limitations of Unix troff (which is no longer supported). Most important changes are: . No argument limit . Almost all macros are parsed and callable (if it makes sense) . `.Lb': prints library names . `.Nm ' now works as expected; `.Nm "" ' has been withdrawn . Updated `.St' command . `.Fx': prints FreeBSD . `.Ox': prints OpenBSD . `.Bsx': prints BSD/OS . `.Brq', `.Bro', `.Brc': brace enclosure macros . `.Bd -centered': center lines . `.Bl -xwidth ': interpret and use the resulting width . Support for double-sided printing (-rD1 command line switch) . Support for 11pt and 12pt document sizes (-rS11, -rS12 command line switches) `groff_mdoc.7' replaces `groff_mdoc.samples.7'; it now completely documents the mdoc package. Great care has been taken to assure backwards compatibility. If you encounter any abnormal results, please report them to bug-groff@gnu.org. o A new command line option for the `man' macros (similar to the `mdoc' package) has been implemented: `-rcR=1' (now the default in nroff mode) produces one single, very long page instead of multiple pages. `-rcR=0' deactivates it. o The `return' request has been added to return immediately from a macro. o A new request `nop' (no operation) has been added which is similar to `if 1'. For example, .if t \{\ Hallo! .\} can now be written as .if t \{\ . nop Hallo! .\} o `box' and `boxa' are two new requests which behave similarly to `di' and `da' but don't include a partially filled line (which is restored after ending the diversion). o The `asciify' request has been extended to `unformat' space characters and some other escape sequences also. `\ ' is no longer unformatted as a space but remains an unpaddable, unbreakable space character. o The new `unformat' request is similar to `asciify' but only handles space characters and tabs specially if the diversion is reread, retaining font information. This makes it possible to reformat diversions; for example the following .ll 3i . a01 a02 a03 a04 a05 a06 a07 a08 a09 a10. . .box box1 .ev 1 .nf \f[B]b01 b02 b03 b04 b05 b06 b07 b08 b09 b10.\f[P] .br .ev .box . c01 c02 c03 c04 c05 c06 c07 c08 c09 c10. . .unformat box1 .box1 gives a01 a02 a03 a04 a05 a06 a07 a08 a09 a10. c01 c02 c03 c04 c05 c06 c07 c08 c09 c10. b01 b02 b03 b04 b05 b06 b07 b08 b09 b10. Without the `unformat' request, space characters are converted to word space nodes which are no longer stretchable, and the result would be a01 a02 a03 a04 a05 a06 a07 a08 a09 a10. c01 c02 c03 c04 c05 c06 c07 c08 c09 c10. b01 b02 b03 b04 b05 b06 b07 b08 b09 b10. o The new request `linetabs' controls the `line-tabs' mode. In line-tabs mode, tab distances are computed relative to the (current) output line. Otherwise they are taken relative to the input line. For example, the following .ds x a\t\c .ds y b\t\c .ds z c .ta 1i 3i \*x \*y \*z yields a b c In line-tabs mode, the same code gives a b c The new read-only number register `.linetabs' returns 1 if in line-tabs mode, and 0 otherwise. o Two new requests `tm1' and `tmc' have been added to improve writing messages to the terminal. `tm1' is similar to `tm' but allows leading whitespace. `tmc' is similar to `tm1' but doesn't emit a final newline. o For compatibility with sqtroff, the request `output' has been added. The behaviour is similar to `\!' at the top-level, that is, it directly inserts its argument into the intermediate output format. The syntax is similar to .tm1, allowing leading whitespace. o The new `spreadwarn' request makes troff warn if spaces in an output line are widened by a given limit or more. o Use `warnscale' to change the scaling indicator troff uses for warning messages. o A new request `dei' (define indirect) has been added. The first and second parameter of `dei' are taken from string registers rather than directly; this very special request is needed to make `trace.tmac' independent from the escape character (which might even be disabled). o It is now possible to save and restore the escape character with two new requests `ecs' and `ecr'. o The new escape sequence \B'...' is an analogon to `\A': If the string within the delimiters is a valid numeric expression, return character `1', and `0' otherwise. o The new escape sequence `\:' inserts a zero-width break point. This is similar to `\%' but without a soft hyphen character. o The `tr' request can now map characters onto `\~'. o Calling the `fam' request without an argument switches back to the previous font family. o The new read-only register `.int' is set to a positive value if the last output line is interrupted (i.e., if the input line contains `\c'). o The `writem' request is not new, but hasn't been documented before. This is similar to `write' but instead of a string the contents of a given macro or string is written to a stream. o The read/write number register `hp' to get/set the current horizontal position relative to the input line isn't new but hasn't been documented properly before. o `\X' and `\Y' are now transparent for end-of-sentence recognition. o The `cu' request in nroff mode now works as documented (i.e., it underlines spaces also). Grog ---- o The grog script now works in non-compatibility mode also (which is the default). As usual, use the `-C' option to activate compatibility mode. Grops ----- o A new option `-P' resp. a new environment variable `GROPS_PROLOGUE' has been added to select a different prologue file. o The effect of the former `-mpsnew' option to access more Type 1 characters is now the default and no longer available. To get the old behaviour (i.e., emulation of some glyphs by composition) use `-mpsold'. Miscellaneous ------------- o For security reasons the following changes have been done: . The tmac.safer file has been replaced with a built-in solution; .open, .opena, .pso, .sy, and .pi are completely disabled in safer mode (which is the default); to enable these requests the `-U' command line flag must be used. . Files specified with the .mso request or given with the `-m' command line option, and hyphenation patterns loaded with `.hpf' are no longer searched in the current directory by default (besides the usual tmac path). Instead, the home directory is used. To add the current directory, either use the `-U' or `-M' command line option or set the GROFF_TMAC_PATH environment variable to an appropriate value. . troffrc, troffrc-end, and eqnrc are neither searched in the current nor in the home directory (even if -U is given). Use -M or GROFF_TMAC_PATH to change that. . Similarly, the current directory is no longer part of the font path. Use the `-F' command line option or the GROFF_FONT_PATH environment variable if you really need the current directory. o groff now installs its data files into /usr/local/share/groff/ by default, following the GNU standard. Additionally, a local tmac directory (by default /usr/local/share/groff/site-tmac) is scanned before the standard tmac directory. Wrapper files for system-specific macro packages (if necessary) are put into /usr/local/lib/groff/site-tmac; this directory is searched before the local tmac directory. o All programs now have option `-v' to show the version number; they exit immediately afterwards, following the GNU standards. Additionally, `--version' and `--help' have been added, doing the obvious actions. VERSION 1.16.1 ============== Bug fixes only; no user-visible changes. VERSION 1.16 ============ Groff ----- The anachronism of calling the man macro package with `-man' has been fixed; now you can say `-m man' also. The same is true for `ms', `me', `markup', `mandoc', and `mdoc'. A new switch `-g' for calling `grn' is available. A new switch `-G' for calling `grap' is available. EBCDIC support for tty devices has been added. On such hosts, IBM code page 1047 is available with -Tcp1047 instead of -Tascii and -Tlatin1 (and, for the moment, -Tutf8). Note that non-tty devices are not yet supported (but installed). Troff ----- A new command line option to the `man' macros is available: `-rSxx' (with `xx' either 10, 11, or 12) to set the base document font size to `xx' points. Additionally, `.SH' now produces larger headings than `.SS'. To solve a problem with the .PSPIC macro which needs the `-U' switch of troff to access an external program (psbb), a new request .psbb is now available to get the bounding box of a PostScript image file. The values (in PostScript units) are returned in the new read-only number registers `llx', `lly', `urx', and `ury'. Consequently, .PSPIC has been adapted to use the new request, and the psbb program has been removed. A new predefined writable number register, `year', has been added. It contains the current year. A new read-only register, `.Y', has been added. It contains the revision number of the groff package. `\fP' now behaves as expected in situations like the following where the font `foo' is undefined: .B bold text normal text \f[foo]bar\fP normal text Previously, the text after \fP appeared as bold. The `substring' request is not new, but hasn't been documented before. The predefined `.T' string register (which holds the current output device) is not new, but hasn't been documented before. A new request `length' computes the length of a string and returns it in a number register. The macro files `tmac.a4' (for specifying A4 paper format) and `tmac.trace' (a debugging aid) are now installed also. A new resource file, `troffrc-end', is now available. It is invoked after all user-specified macros. Currently used by the html device to include tmac.html; thus no need for users to specify -mhtml anymore. The soft hyphen character now has a glyph name: `shc'. The latin-1 character 173 (PS name `periodcentered') has got the troff glyph name `pc' and is no longer intermixed with the symbol character `md' (PS name `mathdot'). ASCII character 34 (PS name `quotedbl') has got the troff glyph name `dq' (which is an alias to character `"'). ASCII character 39 (PS name `quoteright') has got the troff glyph name `cq' (which is an alias to character "'"). Some additions to the font description files have been implemented for better support of HTML output: The new format of lines in the `charset' subsection of font description files is name metrics type code [entity_name] [-- comment] Currently, only the font description files in devhtml use the optional entity_name string to define glyph entities in HTML. Everything after the entity_name field is ignored; in case this field isn't used, two hyphen characters are now necessary to start a comment. Two new requests are available in DESC files (currently used only with grohtml): use_charnames_in_special This command indicates that troff should encode named characters inside special commands. pass_filenames requests that troff tells the driver the source file name being processed. This is achieved by another tcommand: `F filename'. Grotty ------ Bruno Haible contributed support for UTF8 output. Grohtml ------- Added .LINE macro to tmac.arkup. The obsolete `.LINK' macro has been removed. .URL, .FTP, and .MAILTO macros now accept an optional third argument which is immediately appended to the second argument (to be used with punctuation, for example). Grodvi ------ The font size 11pt has been changed to 10.95pt (as used in LaTeX 2e). A new font file CWI (using cmitt10; this is typewriter italic) has been added. Grolbp ------ A new driver for Canon CAPSL printers (LBP-4 and LBP-8 series laser printers). This code has been contributed by Francisco Andres Verdu . Grn --- A new preprocessor to process gremlin pictures. It is based on the original Berkeley implementation of grn, written by David Slattengren and Barry Roitblat, and has been adapted to groff by Daniel Senderowicz and Werner Lemberg . Pic --- Added the `srand' command to set the seed for a new sequence of pseudo-random numbers to be returned by `rand'. Gxditview --------- Simplified installation: The Imakefile is now configured (by groff's configure script). Documentation ------------- Three new man pages are available: groff_tmac.5 (documenting how troff macros are accessed and where they are found), groff.7 (a short reference of the GNU roff language), and roff.7 (a general survey on GNU troff). Miscellaneous ------------- A partial port to win32 (for use with Microsoft Visual C++ 6.0) is now part of the distribution. It has been contributed by Blake McBride . More information about programs, macros, documentation, etc., which is related to groff has been collected in the file `MORE.STUFF'. VERSION 1.13, 1.14, 1.15 ======================== Bug fixes only; no user-visible changes. VERSION 1.12 ============ Finally, there are new maintainers for groff. Mailing lists and a CVS repository are available also. See the file README for details. Not all reported bugs could be fixed, so please send mails again if something is still not working. Most of the installation problems should have vanished now (most notably the $(tmac_wrap) bug). There is now a man page called groff_man.7 which documents the basics of the -man macros. It has been originally written by Susan G. Kleinmann . A (still incomplete) groff reference manual in texinfo format originally contributed by Trent A. Fisher . me.man and msafer.man have been renamed to groff_me.man resp. groff_msafer.man for consistency. Default strings for macros in doc-common resp. tmac.an no longer contain the word `UNIX'. groff should now be Y2k safe (fixes contributed by Paul Eggert ). Following the GNU standards, groff now uses the prefix `/usr/local/' as the default instead of replacing an existent groff binary. groff, troff, nroff, and pic now support the -U flag to activate unsafe behaviour (without -msafer); the -S flag for using the -msafer macros is now the default. Grohtml ------- This is a new output device for producing HTML output contributed by Gaius Mulley . It is still very alpha but has been included into the distribution so that a lot of people have a chance to test it. Bug reports are highly welcome. Grolj4 ------ Duplex printing support has been contributed by Jeffrey Copeland . Soelim ------ Added -I option for defining include paths (patch contributed by Peter Miller ). Gxditview --------- Fallback resources added (patch contributed by Larry Jones ). Will now support 8 gray levels. mm -- New version 1.32 (contributed by Joergen Haegg ). VERSION 1.11 ============ Complete documentation for pic is now in the file doc/pic.ms. It was contributed by Eric S. Raymond, , who is emphatically *not* volunteering to take over groff as he is way overworked with half a dozen other projects. VERSION 1.10 ============ The directory where data files are installed has been changed from /usr/local/lib/groff to /usr/local/share/groff to comply with the latest GNU coding standards. By default groff programs with Unix equivalents are installed with a "g" prefix unless there is an existing (non-groff) troff installation. A new approach is used to make system macro packages available to groff. Instead of simply including /usr/lib/tmac in the list of directories searched by groff, the installation process creates for each system macro package a wrapper macro package in the groff macro directory that references the system macro package. The groff macro packages are now installed with a leading "g" prefix if there is a system version of the same macro package, and otherwise without the "g" prefix, with the exception that the groff version of -me which is always installed as -me. There is a new device, lj4, for the HP LaserJet 4 (and PCL5 compatibles). Groff ----- groff has a -S option that prevents the use of unsafe features in pic and troff. This uses a new -S option of pic and the -msafer macros for troff. Troff ----- The `blm' request specifies a macro to be invoked when a blank line is encountered. Pic --- A -S (safer) option disables the sh command. Grops ----- The -m option enables manual feed. VERSION 1.09 ============ \(rn now produces a character that has the traditional metrics, and form corners with \(ul and \(br. This means that it does not align properly with \(sr. Instead there's a new character \[radicalex] which aligns with \(sr; this is used by eqn for doing square roots. Troff ----- The `pso' request allows you to read from the standard output of a command. Grops ----- The PSPIC macro has options to allow the horizontal alignment of the graphic to be specified. VERSION 1.08 ============ Troff ----- The escape sequence \V[xxx] interpolates the value of the environment variable xxx. Tbl --- The decimalpoint option can be used to specify the character to be recognized as the decimal point character in place of the default period. VERSION 1.07 ============ Groff ----- The environment variable GROFF_COMMAND_PREFIX can be used to control whether groff looks for `gtroff' or `troff' (similarily for the preprocessors.) Troff ----- Multilingual hyphenation is supported by new `hpf' and `hla' requests, and by a `\n[.hla]' number register. The -H option has been removed. Files of hyphenation patterns can have comments. When a font cannot be found, troff gives a warning (of type `font', enabled by default) instead of an error. There's a new request `trnt' that's like `tr' except that it doesn't apply to text transparently throughput into a diversion with \!. Tbl --- There is a `nokeep' option which tells tbl not to use diversions to try to keep the table on one page. Eqn --- Setting the parameter `nroff' to a non-zero value causes `ndefine' to behave like `define' and `tdefine' to be ignored. This is done by eqnrc when the current device is ascii or latin1. There's a `neqn' script that just does `eqn -Tascii'. Grotty ------ grotty uses whatever page length was specified using the `pl' request rather than using the paperlength command in the DESC file. The paperwidth command in the DESC file is also ignored. VERSION 1.06 ============ The programs in groff that have Unix counterparts can now be installed without a leading `g' prefix. See the `g' variable in the Makefile. The g?nroff script simulates the nroff command using groff. New special characters \(+h, \(+f, \(+p, \(Fn, \(Bq, \(bq, \(aq, \(lz, \(an. See groff_char(7). ^L is now a valid input character. Groff ----- The Xps pseudo-device has disappeared. Instead there is a new -X option that tells groff to use gxditview instead of the usual postprocessor. (So instead of -TXps, use -XTps or just -X if your default device is ps.) The postprocessor to be used for a particular device is now specified by a `postpro' command in the DESC file rather than being compiled into groff. Similarly the command to be used for printing (with the -l option) is now specified by a `print' command in the DESC file. The groff command no longer specifies eqnchar as an input file for eqn. Instead eqn automatically loads a file `eqnrc'. The groff command no longer passes the -D option to eqn. Instead eqnrc sets the draw_lines parameter. The groff command no longer tells troff to load a device-specific macro file. This is handled instead by the `troffrc' file, which is always loaded by troff. The shell script version of groff has been removed. Troff ----- The `rchar' request removes a character definition established with `char'. Compatibility mode is disabled and the escape character is set to `\' while a character definition is being processed. The `\#' escape sequence is like `\"' except that the terminating newline is ignored. The `shc' request tells troff which character to insert (instead of the default \(hy) when a word is hyphenated at a line break. A font name of 0 (zero) in the DESC file causes no font to be mounted on the corresponding font position. This is useful for arranging that special fonts are mounted on positions on which users are not likely explicitly to mount fonts. All groff devices now avoid initially mounting fonts on positions 5-9. The `do' request allows a single request or macro to be interpreted with compatibility mode disabled. troff automatically loads a file `troffrc' before any other input file. This can be prevented with the -R option. This file is responsible for loading the device-specific macros. Pic --- The -x option has been removed and a -n option has been added. By default, pic now assumes that the postprocessor supports groff extensions. The -n option tells pic to generate output that works with ditroff drivers. The -z option now applies only to TeX mode. The -p option has been removed. Instead if the -n option is not specified, pic generates output that uses \X'ps: ...' if the \n(0p register is non-zero and tmac.ps sets this register to 1. In places where you could 1st or 5th you can now say `i'th or `i+1'th (the quotes are required). Eqn --- Eqn now automatically reads a file `eqnrc' from the macro directory. This performs the same role that the eqnchar files used to. This can be prevented by the -R option. Setting the draw_lines parameter to a non-zero value causes lines to be drawn using \D rather than \l. The -D option is now obsolete. `uparrow', `downarrow' and `updownarrow' can be used with `left' and `right'. The amount of extra space added before and after lines containing equations can be controlled using the `body_height' and `body_depth' parameters. Grops ----- Font description files have been regenerated from newer AFM files. You can get access to the additional characters present in the text fonts in newer PostScript printers by using -mpsnew. The default value of the -b option is specified by a `broken' command in the DESC file. With the -g option, grops generates PostScript code that guesses the page height. This allows documents to be printed on both letter (8.5x11) and A4 paper without change. Grodvi ------ ISO Latin-1 characters are available with -Tdvi. Format groff_char(7) with groff -Tdvi for more information. Grotty ------ The -mtty-char macros contain additional character definitions for use with grotty. Macros ------ In previous releases the groff -me macros treated the $r and $R number registers in a way that was incompatible with the BSD -me macros. The reason for this was that the approach used by the BSD -me macros does not work with low resolution devices such as -TX75 and -TX100. However, this caused problems with existing -me documents. In this release, the vertical spacing is controlled by the $v and $V registers which have the same meaning as $r and $R in earlier groff releases. In addition, if the $r or $R register is set to a value that would be correct for for the BSD -me macros and a low resolution device is not being used, then an appropriate value for the $v or $V register is derived from the $r or $R register. The groff -me macros work with -C and (I think) with Unix troff. For backward compatibility with BSD -me, the \*{ and \*} strings are also available as \*[ and \*]. Of course, \*[ is only usable with -C. The \*T string has been deleted. Use \*(Tm instead. Xditview -------- The `n', Space and Return keys are bound to the Next Page action. The `p', BackSpace and Delete keys are bound to the Previous Page action. The `q' key is bound to the Quit action. The `r' key is bound to a rerasterize action that reruns groff, and redisplays the current page. VERSION 1.05 ============ Pic --- There is a alternative assignment operator `:=' which interacts differently with blocks. There is a new command `command', which allows the values of variables to be passed through to troff or TeX. The `print' command now accepts multiple arguments. String comparison expressions (using `==' or `!=') are allowed in more contexts. Grotty ------ Horizontal and vertical lines drawn with \D'l ...' are rendered using -, | and + characters. This is intended to give reasonable results with boxed tables. It won't work well with pic. Macros ------ The -mdoc macros have been upgraded to the version in the second Berkeley networking release. This version is not completely compatible with earlier versions; the old version is still available as -mdoc.old. The grog script has been enhanced so that it can usually determine whether a document requires the old or new versions. With -TX75, -TX100 and -TXps, the PSPIC macro produces a box around where the picture would appear with -Tps. VERSION 1.04 ============ An implementation of the -mm macros is included. The directory in which temporary files are created can be controlled by setting the GROFF_TMPDIR or TMPDIR environment variables. Pic --- Some MS-DOS support (see pic/make-dos-dist). Grops ----- There are two new \X commands (\X'ps: invis' and \X'ps: endinvis') which make it possible to have substitute characters that are displayed when previewing with -TXps but ignored when printing with grops. Xditview -------- Support for scalable fonts. VERSION 1.03 ============ No changes other than bug fixes. VERSION 1.02 ============ There is an implementation of refer and associated programs. groff -R preprocesses with grefer; no mechanism is provided for passing arguments to grefer because most grefer options have equivalent commands which can be included in the file. grog also supports refer. There is an alternative perl implementation of the grog script. The code field in lines in the charset section of font description files is now allowed to contain an arbitrary integer (previously it was required to lie between 0 and 255). Currently grops and grodvi use only the low order 8 bits of the value. Grodvi uses the complete value; however, this is unlikely to be useful with traditional TeX tools (.tfm files only allow 8 bit character codes.) Left and right double quotes can be obtained with \(lq and \(rq respectively. There is a new program called pfbtops which translates PostScript fonts in pfb format to ASCII. A slightly modified version of the Berkeley tmac.doc is included. Troff ----- In long escape names the closing ] is now required to be at the same input level as the opening [. The \A'S' escape sequence returns 1 or 0 according as S is or is not suitable for use as a name. \~ produces an unbreakable space that can be stretched when the line is adjusted. The `mso' request is like the `so' request except that it searches for the file in the same directories in which tmac.X is searched for when the -mX option is given. The escape sequence `\R' is similar to the `nr' request. Eqn --- A new `special' primitive allows you to add new types of unary constructs by writing a troff macro. Pic --- The implementation no longer uses gperf. Grops ----- The compile-time -DBROKEN_SPOOLER option has been replaced by a BROKEN_SPOOLER_FLAGS option. This allows more precise control over how grops should workaround broken spoolers and previewers. There is a new -b option that can change this at run-time. Grops now generates PostScript that complies with version 3.0 of the Document Structuring Convention. The resource management component of grops (the part that deals with imported documents and downloadable fonts) has been rewritten and now supports version 3.0 of the Document Structuring Conventions. The %%DocumentFonts comment is no longer supported; you must use the %%Document{Needed,Supplied}{Fonts,Resources} comments instead (or as well.) tmac.psatk contains some macros that support the mechanism used by the Andrew Toolkit for including PostScript graphics in troff documents. Xditview -------- Parts of xditview have been rewritten so that it can be used with the output of gtroff -Tps. groff -TXps runs gtroff -Tps with gxditview. There is a new menu entry `Print' which brings up a dialog box for specifying a command with which the file being previewed should be printed. Xditview now uses imake. VERSION 1.01 ============ The groff command now understands the gtroff `-a' and `-i' options. With the `m' and `n' scale indicators, the scale factor is rounded horizontally before being applied. This makes (almost) no difference for devices with `hor' equal to 1, but it makes groff with -Tascii or -Tlatin1 behave more like nroff in its treatment of these scale indicators. Accordingly tmac.tty now calls the `nroff' request so that the `n' condition is true. The device-specific macros (tmac.ps, tmac.dvi, tmac.tty and tmac.X) have been made to work at least somewhat with -C. In particular the special characters defined by these macros now work with -C. groff -Tdvi -p now passes pic the -x flag; this enables filling of arrowheads and boxes, provided that your dvi driver supports the latest version of the tpic specials. Eqn --- There is a new `-N' option that tells eqn not to allow newlines in delimiters. This allows eqn to recover better from missing closing delimiters. The groff command passes on a `-N' option to eqn. Grops ----- You can now use psfig with grops. See the file ps/psfig.diff. I do not recommend using psfig for new documents. The command \X'ps: file F' is similar to \X'ps: exec ...' except that the PostScript code is read from the file F instead of being contained within the \X command. This was added to support psfig. Grodvi ------ There are font files HB and HI corresponding to cmsssbx10 and cmssi10. Macros ------ The groff -me macros now work with the -C option. As a result, they may also work with Unix nroff/troff. In -me, the $r and $R number registers now contain the line spacing as a percentage of the pointsize expressed in units (normally about 120). The previous definition was useless with low resolution devices such as X75 and X100. VERSION 1.00 ============ A -ms-like macro-package is now included. The name for the Icelandic lowercase eth character has been changed from \(-d to \(Sd. Troff ----- There is a new request `nroff', which makes the `n' built-in condition true and the `t' built-in condition false; also a new request `troff' which undoes the effect of the `nroff' request. This is intended only for backward compatibility: it is usually better to test \n(.H or \n(.V or to use the `c' built-in condition. The \R escape sequence has been deleted. Use \E instead. There are `break' and `continue' requests for use with the `while' request. There is a request `hym' that can ensure that when the current adjustment mode is not `b' a line is not hyphenated if it is no more than a given amount short, and a request `hys' that can ensure that when the current adjustment mode is `b' a line is not hyphenated if it can be justified by adding no more than a given amount of extra space to each word space. There is a request `rj' similar to `ce' that right justifies lines. A warning of type `space' is given when a call is made to an undefined request or macro with a name longer than two characters, and the first two characters of the name make a name that is defined. This is intended to find places where a space has been omitted been a request or macro and its argument. This type of warning is enabled by default. Pic --- A comma is permitted between the arguments to the `reset' command. For use with TeX, there is a new `-c' option that makes gpic treat lines beginning with `.' in a way that is more compatible with tpic (but ugly). Eqn --- It is no longer necessary to add `space 0' at the beginning of complicated equations inside pictures. `prime' is now treated as an ordinary character, as in Unix eqn. The previous behaviour of `prime' as an operator can now be obtained using `opprime'. Xditview -------- There are two new devices X75-12 and X100-12 which are the same as X75 and X100 except that they are optimized for documents that use mostly 12 point text. VERSION 0.6 =========== The installation process has been refined to make it easy for you to share groff with someone who has the same type of machine as you but does not have a C++ compiler. See the end of the INSTALL file for details. There is a man page for the tfmtodit program which explains how to use your own fonts with groff -Tdvi. There is a man page for afmtodit which explains how to use your own PostScript fonts with groff -Tps. The \N escape sequence is now fully supported. It can now be used to access any character in a font by its output code, even if it doesn't have a groff name. This is made possible by a convention in the font files that a character name of `---' refers to an unnamed character. The drivers now all support the `N' command required for this. The font description files have been updated to include unnamed characters. The `x' command in font description files has been removed: instead any unknown commands are automatically made available to the drivers. If you constructed your own font files with an earlier version of tfmtodit or afmtodit, you must construct them again using the current version. Characters between 0200 and 0237 octal are no longer valid input characters. Note that these are not used in ISO 8859. A command called `grog' has been added, similar to the `doctype' command described in Kernighan and Pike. Groff ----- The groff command has some new options: -V prints the pipeline instead of executing it; -P passes an argument to the postprocessor, -L passes an argument to the spooler. There is a C++ implementation of the groff command. This handles some things slightly better than the shell script. In particular, it can correctly handle arguments containing characters that have a special meaning to the shell; it can give an error message when child processes other than the last in the pipeline terminate abnormally; its exit status can take account of the exit statuses of all its child processes; it is a little more efficient; when geqn is used, it searches for the eqnchar file in the same way that font metric files are searched for, rather than expecting to find it in one particular directory. Gtroff ------ There is font translation feature: For example, you can tell gtroff to use font `HR' whenever font `H' is requested with the line .ftr H HR This would be useful for a document that uses `H' to refer to Helvetica. There are some new number registers: `.kern' contains the current kern mode, `.lg' the current ligature mode, `.x' the major version number, `.y' the minor version number, `.ce' the number of lines to be centered in the current environment, `.trunc' the amount of vertical space truncated by the most recently sprung vertical position trap, `.ne' the amount of vertical space needed in the last `ne' request that caused a vertical position trap to be sprung. The `cf' request now behaves sensibly in a diversion. If used in a diversion, it now arranges for the file to be copied to the output when the diversion is reread. There is a new request `trf' (transparent file) similar to `cf', but more like `\!'. There is a new escape sequence `\Y[xxx]', roughly equivalent to `\X'\*[xxx]'', except that the contents of string or macro xxx are not interpreted, and xxx may contain newlines. This requires an output format extension; the drivers have been modified to understand this. Grops has also been modified to cope with newlines in the arguments to \X commands; grops has a new \X command mdef, which is like def except that it has a first argument giving the number of definitions. There is a new warning category `escape' which warns about unknown escape sequences. The `fp' request now takes an optional third argument giving the external name of the font. The `\_' character is now automatically translated to `\(ul' as in troff. The environment variable `GROFF_HYPHEN' gives the name of the file containing the hyphenation patterns. There is a `\C'xxx'' escape sequence equivalent to `\[xxx]'. Characters ", ', ), ], *, \(dg are now initially transparent for the purposes of end of sentence recognition. There is an anti-recursion feature in the `char' request, so you can say `.char \(bu \s+2\(bu\s-2'. The limit on the number of font positions has been removed. Accordingly `\n[.fp]' never returns 0. The restriction on the number of numbered environments has been removed. There is a new escape sequence `\E' that makes it possible to guarantee that an escape sequence won't get interpreted in copy-mode. The `\R' escape sequence is accordingly now deprecated. Gpic ---- Arguments of the form `X anything X' (in the `copy thru', `sh', `for', `if' and `define' constructs) can now be of the form `{ anything }'. If the `linethick' variable is negative (as it now is initially), lines are drawn with a thickness proportional to the current point size. The `rand' function now takes no arguments and returns a number between 0 and 1. The old syntax is still supported. `^' can be used in expressions to indicate exponentiation. In the `for' construct the argument to the by clause can be prefixed by `*' to indicate that the increment is multiplicative. A bare expression may be used as an attribute. If the current direction is `dir', then an attribute `expr' is equivalent to `dir expr' There is a `sprintf' construct that allows numbers to be formatted and used wherever a quoted string can be used. The height of a text object without an explicit height attribute is the number of text strings associated with the object times the value of the `textht' variable. The maximum height and width of a picture is controlled by the `maxpswid' and `maxpsht' variables. Gtbl ---- Gtbl can now handle gracefully the situation where the `ce' request has been applied to a table. Geqn ---- The `ifdef' primitive has been generalized. A tilde accent can be put underneath a box using `utilde'. This defined using a general `uaccent' primitive. Grops ----- There is a new PostScript font downloading scheme which handles font downloading for imported illustrations. Previously, the name of the file containing the font was given in the `x download' line in the groff font metric file. Now, there is a `download' file which says for each PostScript font name which file contains that font. Grops can also now handle inter-font dependencies, where one downloadable font depends on some other (possibly downloadable) font. The `T' font has been removed. The characters it used to provide are now provided by `char' definitions in tmac.ps. TSymbol.ps has also been removed, and the tweaks it provided are now provided by `char' definitions. Local Variables: version-control: never coding: latin-1 End: groff-1.22.2/INSTALL0000644000175000001440000001165412104714256012304 0ustar wlusers Copyright 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file contains information that supplements the generic installation instructions in file `INSTALL.gen'. Normal Installation =================== The simplest way to compile groff is: 1. `cd' to the directory containing groff's source code and type `./configure' to configure groff for your system. If you are using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile groff. 3. Type `sudo make install' to install the groff programs and any data files and documentation. `make install' is the only step for which you need `root' access; this is done by `sudo'. 4. You can remove the groff binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile groff for a different kind of computer), type `make distclean'. External Installation ===================== It is also possible to perform the whole installation process outside of the source code directory. In this case a whole external build directory structure is created without changing any parts of the source code tree. This is useful if the source code is read-only or if several different installations, such as for multiple architectures, should be constructed. As an example we assume that the source code of the `groff' code is in `/usr/local/src/groff', and that the build process should be done within the directory `/home/my/groff.compile'. 0. Create `/home/my/groff.compile' and change to that directory. 1. Call `/usr/local/src/groff/configure' in that directory to configure groff for your system. If you are using `csh' on an old version of System V, you might need to type `sh /usr/local/src/groff/configure' instead. 2. Type `make' to compile groff in that directory. 3. Type `sudo make install' to install the groff programs and any data files and documentation. 4. You can remove the groff binaries and object files from the build directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. Special Platforms ================= 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. Miscellaneous ============= groff is written in C++, so you 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, we suggest gcc 2.7.1 or later (gcc version 2 includes GNU C++ as well as GNU C). From gcc 2.5, it is no longer necessary to install libg++: the C++ header files needed by groff are created by the gcc installation process. To override configure's choice of C++ compiler, you can set the CXX environment variable. If you have a library that provides a faster malloc than your system's usual malloc, it is good idea to include it in LIBS. For example, using the malloc that comes with GNU Emacs version 20 can give a worthwhile (and sometimes spectacular) performance improvement. If you want A4 or letter paper format and the configure script produces an incorrect guess, say PAGE=xxx ./configure where `xxx' should be either `A4' or `letter'. Note that this only affects 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 but not installed yet, you can use the test-groff script to try groff out on one of the man pages. (Use the .n files not the .man files.) The test-groff script sets up environment variables to allow groff to run without being installed. For example, you could do ./test-groff -man -Tascii src/roff/groff/groff.n | less to display the groff(1) man page with the `less' pager. 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 configuring the groff package). Note that you need texinfo version 4.8 as a prerequisite. 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. groff-1.22.2/Makefile.lib0000644000175000001440000000224612104714256013455 0ustar wlusers# Copyright (C) 1989-2000, 2003, 2009 Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # # This file is part of groff. # # groff is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation, either version 3 of the License, 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 this program. If not, see . # # Makefile.lib # LIBCLEAN=lib$(LIB).$(LIBEXT) MAKEFILEPARTS=\ $(top_srcdir)/Makefile.comm \ $(top_builddir)/Makefile.cfg \ $(srcdir)/Makefile.sub \ $(top_srcdir)/Makefile.lib \ Makefile.dep all: lib$(LIB).$(LIBEXT) lib$(LIB).$(LIBEXT): $(OBJS) $(AR) r $@ $? $(RANLIB) $@ depend: depend_src depend.temp: $(GENSRCS) TAGS: $(CCSRCS) $(CSRCS) Makefile: $(MAKEFILEPARTS) Makefile.dep: touch Makefile.dep groff-1.22.2/mkinstalldirs0000755000175000001440000000672212104714256014061 0ustar wlusers#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2009-04-28.21; # UTC # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the 'mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because '.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: groff-1.22.2/COPYING0000644000175000001440000010451312104714256012303 0ustar wlusers GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public 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. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS 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 free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program 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. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . groff-1.22.2/Makefile.dev0000644000175000001440000000162512104714256013465 0ustar wlusers# Copyright (C) 1989-2000, 2003, 2009 Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # # This file is part of groff. # # groff is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation, either version 3 of the License, 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 this program. If not, see . # # Makefile.dev # all: $(DEVFILES) $(DEVSCRIPTS) install_data: install_dev uninstall_sub: uninstall_dev install_dev: $(DEVFILES) $(DEVSCRIPTS) groff-1.22.2/MANIFEST0000644000175000001440000001565112104714256012405 0ustar wlusers Copyright 2001-2006, 2009-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file gives an overview of the directories and the main files of the groff source distribution. 1) The top directory. BUG-REPORT A template for bug-reports. ChangeLog Log of the changes in the different groff versions. COPYING The GNU General Public License (GPL). FDL The Free Documentation License (FDL). INSTALL Information on compiling and installing groff. INSTALL.gen Generic information on configuration and compiling. LICENSES 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.MinGW Build information for MinGW. TODO Things planned for future groff versions. All other files in the top directory are related to the configuration, compilation, and install processes. 2) The directory structure ./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. chem A preprocessor (for pic) to produce chemical structure diagrams. eqn2graph Convert equations created with EQN into different graphical formats. gdiffmk An improved implementation of the diffmk command to mark differences between groff/nroff/troff files. grap2graph Convert grap diagraps into different graphical formats. groffer A wrapper to conveniently view roff files. hdtbl A sophisticated table macro package. mm The groff mm macro package. mom The groff mom macro package. pdfmark A package to add PDF marks to groff documents, together with a shell script (pdfroff) for easy creation of PDF documents. pic2graph Convert PIC diagrams into different graphical formats. ./doc Manuals and tutorials to groff aspects. ./font Device information and fonts. devX100 100dpi device for X Window System. devX100-12 100dpi device with narrower font (for 12pt base font). devX75 75dpi device for X Window System. devX75-12 75dpi device with narrower font (for 12pt base font). devascii Text device for ASCII output. devcp1047 EBCDIC device. devdvi TeX DVI device. devhtml HTML device. devlatin1 Text device for latin-1 (ISO 8859-1) output. devlbp Device for Canon CAPSL laser printers. devlj4 Device for HP Laserjet 4, PCL 5, and compatible printers. devps PostScript device. devpdf PDF device. devutf8 Text device for Unicode output. util Utility programs. ./m4 M4 macro files used creating the configure script. ./man Some groff manual pages of more general character. ./src Everything written in programming languages. ./src/devices The postprocessors. grodvi TeX DVI output. grohtml HTML output. grolbp Canon printers. grolj4 HP Laserjet 4, PCL 5, and compatible printers. grops PostScript output. gropdf PDF output. grotty Text output. xditview A groff (pre)viewer for the X Window system. ./src/include The *.h C/C++ include files. ./src/libs C++ code common to several parts of the groff sources. gnulib Auxiliary functions copied from the `gnulib' repository. libbib Library of bibliographic functions. libdriver Parser for intermediate output and postprocessor code. libgroff Library for general support functions used everywhere. libxutil Utility functions for xditview and xtotroff. snprintf An implementation of snprintf() and friends. ./src/preproc Preprocessors. eqn Mathematical formulae. grn Gremlin pictures. html The preprocessor part of grohtml. pic Diagram drawer. preconv Input encoding conversion. refer Bibliographic references. soelim File inclusion using tmac path. tbl Tables. ./src/roff Front-end programs. groff Wrapper around troff. This is the main user program. grog Guess groff command line options. nroff Emulate classical nroff text formatter. troff Main roff formatter program. ./src/utils Utility programs around groff. addftinfo Add information to old troff font files for use with groff. afmtodit Create font description files for the PostScript device. hpftodit Create font description files for the LJ4 device. indxbib Make inverted index for bibliographic databases. lkbib Search bibliographic databases. lookbib Interactively search bibliographic databases. pfbtops Translate a PostScript font in PFB format to PFA. tfmtodit Create font description files for TeX DVI device. xtotroff Create font description files for xditview. ./tmac Macro files. 3) Documentation The groff documentation is scattered upon several places. - The main directory contains documents related to the groff source. The README file contains the information needed to get the groff package, report bugs, and contact the developers. - The man-page of each program (section 1) is kept in the source directory of the program. - The man-pages for the other sections are found in `src/man'. - Documentation in other formats are located in the `doc' directory, including the groff info file, tutorials, and manuals. Man-pages have source files ending in `.man'. Running `make' processes the files and uses `.n' as the new file extension. In both cases it is difficult to quickly decide into which section the man-page shall go. Here is a shell command (to be called from the top directory of the groff source tree) that finds all man-pages and writes the section number after each file name: find -type f \ | grep '[.]man$' \ | sort \ | xargs grep -e '^[.]TH ' \ | sed -e 's/^\(.\+\): *\.TH.*@MAN\(.*\)EXT@.*$/\1 \2/' 4) The roff parser The parsing of the roff language is done by troff. The input is converted to tokens in `src/roff/troff/input.cpp' and transformed into `nodes' by `src/roff/troff/env.cpp' and `src/roff/troff/node.cpp'. From these, the intermediate output is generated (also in `node.cpp'). 5) Postprocessing The parser for the intermediate output and the postprocessing is in `src/libs/libdriver/input.cpp'. This is used by all postprocessors. groff-1.22.2/stamp-h.in0000644000175000001440000000001212104714256013136 0ustar wluserstimestamp groff-1.22.2/man/0000755000175000001440000000000012104714260012012 5ustar wlusersgroff-1.22.2/man/groff_diff.man0000644000175000001440000023231412104714260014607 0ustar wlusers'\" e .\" The above line should force the use of eqn as a preprocessor .ig groff_diff.man This file is part of groff, the GNU roff type-setting system. It is the source of the man-page groff_diff(7). Copyright (C) 1989, 2001-2004, 2006-2010, 2012 Free Software Foundation, Inc. written by James Clark modified by Werner Lemberg Bernd Warken Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being this .ig-section and AUTHORS, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the Free Documentation License is included as a file called FDL in the main directory of the groff source package. .. . . .\" -------------------------------------------------------------------- .\" Local definitions .\" -------------------------------------------------------------------- . .\" define a string tx for the TeX logo .ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X .el .ds tx TeX . . .\" from old groff_out.man .ie \n(.g \ . ds ic \/ .el \ . ds ic \^ . . .\" -------------------------------------------------------------------- .\" Title .\" -------------------------------------------------------------------- . .TH GROFF_DIFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" .SH NAME groff_diff \- differences between GNU troff and classical troff . . .\" -------------------------------------------------------------------- .SH DESCRIPTION .\" -------------------------------------------------------------------- . This manual page describes the language differences between .IR groff , the GNU .I roff text processing system, and the classical .I roff formatter of the freely available Unix\~7 of the 1970s, documented in the .I Troff User's Manual by .I Ossanna and .IR Kernighan . This includes the roff language as well as the intermediate output format (troff output). . .P The section .I SEE ALSO gives pointers to both the classical .I roff and the modern .I groff documentation. . . .\" -------------------------------------------------------------------- .SH "GROFF LANGUAGE" .\" -------------------------------------------------------------------- . In this section, all additional features of .I groff compared to the classical Unix\~7 .I troff are described in detail. . . .\" -------------------------------------------------------------------- .SS "Long names" .\" -------------------------------------------------------------------- . The names of number registers, fonts, strings/\:macros/\:diversions, special characters (glyphs), and colors can be of any length. . In escape sequences, additionally to the classical `\fB(\fP\fIxx\fP' construction for a two-character glyph name, you can use `\fB[\fP\fIxxx\fP\fB]\fP' for a name of arbitrary length. . .TP .BI \[rs][ xxx ] Print the special character (glyph) called .IR xxx . . .TP .BI \[rs][ "comp1 comp2 .\|.\|." ] Print composite glyph consisting of multiple components. . Example: `\[rs][A\~ho]' is capital letter A with ogonek which finally maps to glyph name `u0041_0328'. . See the .I groff info file for details how a glyph name for a composite glyph is constructed, and .BR groff_char (@MAN7EXT@) for a list of glyph name components used in composite glyph names. . .TP .BI \[rs]f[ xxx ] Set font .IR xxx . . Additionally, .B \[rs]f[] is a new syntax form equal to .BR \[rs]fP , i.e., to return to the previous font. . .TP .BI \[rs]*[ "xxx arg1 arg2 .\|.\|." ] Interpolate string .IR xxx , taking .IR arg1 , .IR arg2 , .IR .\|.\|. , as arguments. . .TP .BI \[rs]n[ xxx ] Interpolate number register .IR xxx . . . .\" -------------------------------------------------------------------- .SS "Fractional point sizes" .\" -------------------------------------------------------------------- . A .I scaled point is equal to .B 1/sizescale points, where .B sizescale is specified in the .B DESC file (1 by default). . There is a new scale indicator\~\c .B z that has the effect of multiplying by sizescale. . Requests and escape sequences in troff interpret arguments that represent a point size as being in units of scaled points, but they evaluate each such argument using a default scale indicator of\~\c .BR z . Arguments treated in this way are the argument to the .B ps request, the third argument to the .B cs request, the second and fourth arguments to the .B tkf request, the argument to the .B \[rs]H escape sequence, and those variants of the .B \[rs]s escape sequence that take a numeric expression as their argument. . .P For example, suppose sizescale is 1000; then a scaled point is equivalent to a millipoint; the call .B .ps\ 10.25 is equivalent to .B .ps\ 10.25z and so sets the point size to 10250 scaled points, which is equal to 10.25 points. . .P The number register .B \[rs]n[.s] returns the point size in points as decimal fraction. . There is also a new number register .B \[rs]n[.ps] that returns the point size in scaled points. . .P It would make no sense to use the .BR z \~\c scale indicator in a numeric expression whose default scale indicator was neither .B u nor\~\c .BR z , and so .B troff disallows this. . Similarly it would make no sense to use a scaling indicator other than .B z or\~\c .B u in a numeric expression whose default scale indicator was\~\c .BR z , and so .B troff disallows this as well. . .P There is also new scale indicator\~\c .B s which multiplies by the number of units in a scaled point. . So, for example, .B \[rs]n[.ps]s is equal to .BR 1m . Be sure not to confuse the .B s and .BR z \~\c scale indicators. . . .\" -------------------------------------------------------------------- .SS "Numeric expressions" .\" -------------------------------------------------------------------- . Spaces are permitted in a number expression within parentheses. . .P .B M indicates a scale of 100ths of an em. .B f indicates a scale of 65536 units, providing fractions for color definitions with the .B defcolor request. . For example, 0.5f = 32768u. . .TP .IB e1 >? e2 The maximum of .I e1 and .IR e2 . . .TP .IB e1 maintained by Werner Lemberg Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being this .ig-section and AUTHORS, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the Free Documentation License is included as a file called FDL in the main directory of the groff source package. .. . . .\" -------------------------------------------------------------------- .\" Local macros . .de Esc . ds @1 \\$1 . shift . nop \f[B]\[rs]\\*[@1]\f[]\\$* . rm @1 .. . . .de QuotedChar . ds @1 \\$1 . shift . nop `\f[B]\\*[@1]\f[]'\\$* . rm @1 .. . . .\" -------------------------------------------------------------------- .\" Title .\" -------------------------------------------------------------------- . .TH ROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" .SH NAME roff \- concepts and history of roff typesetting . . .\" -------------------------------------------------------------------- .SH DESCRIPTION .\" -------------------------------------------------------------------- . .I roff is the general name for a set of text formatting programs, known under names like .BR troff , .BR nroff , .BR ditroff , .BR groff , etc. . A .I roff system consists of an extensible text formatting language and a set of programs for printing and converting to other text formats. . Unix-like operating systems distribute a .I roff system as a core package. . .P The most common .I roff system today is the free software implementation \f[CR]GNU\f[] .IR roff , .BR groff (@MAN1EXT@). . .I groff implements the look-and-feel and functionality of its ancestors, with many extensions. . .P The ancestry of .I roff is described in section .BR HISTORY . . In this document, the term .I roff always refers to the general class of roff programs, not to the .B roff command provided in early UNIX systems. . .P In spite of its age, .I roff is in wide use today, for example, the manual pages on UNIX systems .RI ( man\~pages\/ ), many software books, system documentation, standards, and corporate documents are written in roff. . The .I roff output for text devices is still unmatched, and its graphical output has the same quality as other free type-setting programs and is better than some of the commercial systems. . .P .I roff is used to format UNIX .IR "manual pages" , (or .IR "man pages" ), the standard documentation system on many UNIX-derived operating systems. . .P This document describes the history of the development of the .IR "roff system" ; some usage aspects common to all .I roff versions, details on the .I roff pipeline, which is usually hidden behind front-ends like .BR groff (@MAN1EXT@); a general overview of the formatting language; some tips for editing .I roff files; and many pointers to further readings. . . .\" -------------------------------------------------------------------- .SH "HISTORY" .\" -------------------------------------------------------------------- . Document formatting by computer dates back to the 1960s. . The .I roff system itself is intimately connected to the Unix operating system, but its roots go back to the earlier operating systems CTSS and Multics. . . .\" -------------------------------------------------------------------- .SS "The Predecessor RUNOFF" .\" -------------------------------------------------------------------- . .BR roff 's ancestor .B RUNOFF was written in the MAD language by .I Jerry Saltzer for the .IR "Compatible Time Sharing System (CTSS)" , a project of the Massachusetts Institute of Technology (MIT), in 1963 and 1964 \[en] note that CTSS commands were all uppercase. . .P In 1965, MIT's Project MAC teamed with Bell Telephone Laboratories (BTL) and General Electric to begin the .UR http://\:www.multicians.org .I Multics system .UE . . A command called .B runoff was written for Multics in the late 60s in the BCPL language, by .IR "Bob Morris" , .IR "Doug McIlroy" , and other members of the Multics team. . .P Like its CTSS ancestor, Multics .B runoff formatted an input file consisting of text and command lines; commands began with a period and were two letters. . Output from these commands was to terminal devices such as IBM Selectric terminals. . Multics .B runoff had additional features added, such as the ability to do two-pass formatting; it became the main format for Multics documentation and text processing. . .P BCPL and .B runoff were ported to the GCOS system at Bell Labs when BTL left the development of Multics. . . .\" -------------------------------------------------------------------- .SS "The Classical nroff/troff System" .\" -------------------------------------------------------------------- . At BTL, there was a need to drive the .I Graphic Systems CAT typesetter, a graphical output device from a PDP-11 computer running Unix. . As .B runoff was too limited for this task it was further developed into a more powerful text formatting system by .IR "Joseph F.\& Ossanna" , who already programmed several runoff ports. . .P The name .I runoff was shortened to .IR roff . . The greatly enlarged language of Ossanna's version already included all elements of a full .IR "roff system" . . All modern .I roff systems try to implement compatibility to this system. . So Joe Ossanna can be called the father of all .I roff systems. . .P This first .I roff system had three formatter programs. . .TP .B troff .RI ( "typesetter roff\/" ) generated a graphical output for the .I CAT typesetter as its only device. . .TP .B nroff produced text output suitable for terminals and line printers. . .TP .B roff was the reimplementation of the former .B runoff program with its limited features; this program was abandoned in later versions. . Today, the name .I roff is used to refer to a .I troff/\:nroff system as a whole. . .P Ossanna's first version was written in the PDP-11 assembly language and released in 1973. . .I Brian Kernighan joined the .I roff development by rewriting it in the C\~programming language. . The C\~version was released in 1975. . .P The syntax of the formatting language of the .BR nroff /\: troff programs was documented in the famous .IR "Troff User's Manual [CSTR\~#54]" , first published in 1976, with further revisions up to 1992 by Brian Kernighan. . This document is the specification of the .IR "classical troff" . . All later .I roff systems tried to establish compatibility with this specification. . .P After Ossanna's death in 1977, Kernighan went on with developing .IR troff . . In the late 1970s, Kernighan equipped .I troff with a general interface to support more devices, the intermediate output format, and the postprocessor system. . This completed the structure of a .I "roff system" as it is still in use today; see section .BR "USING ROFF" . . In 1979, these novelties were described in the paper .IR "[CSTR\~#97]" . . This new .I troff version is the basis for all existing newer troff systems, including .IR groff . . On some systems, this .I device independent troff got a binary of its own, called .BR ditroff (@MAN7EXT@). . All modern .B troff programs already provide the full .B ditroff capabilities automatically. . . .\" -------------------------------------------------------------------- .SS "Availability" .\" -------------------------------------------------------------------- . The source code of both the ancient Unix and classical .I troff weren't available for two decades. . Meanwhile, it is accessible again (on-line) for non-commercial use, cf.\& section .BR "SEE ALSO" . . . .\" -------------------------------------------------------------------- .SS "Free roff" .\" -------------------------------------------------------------------- . The most important free .I roff project was the \f[CR]GNU\f[] implementation of .IR troff , written from scratch by .I James Clark and put under the .UR http://\:www.gnu.org/\:copyleft GNU Public License .UE . . It was called .I groff (\f[CR]GNU\f[] .IR roff ). . See .BR groff (@MAN1EXT@) for an overview. . .P The .I groff system is still actively developed. . It is compatible to the classical .IR troff , but many extensions were added. . It is the first .I roff system that is available on almost all operating systems \[en] and it is free. . This makes .I groff the de-facto .I roff standard today. . .P An alternative is .IR "Gunnar Ritter" 's .UR http://\:heirloom.sf.net Heirloom Documentation Tools .UE project, started in 2005, which provides enhanced versions of the various roff tools found in the OpenSolaris and Plan\~9 operating systems, now available under free licenses. . . .\" -------------------------------------------------------------------- .SH "USING ROFF" .\" -------------------------------------------------------------------- . Most people won't even notice that they are actually using .IR roff . . When you read a system manual page (man page) .I roff is working in the background. . .I roff documents can be viewed with a native viewer called .BR \%xditview (1x), a standard program of the X window distribution, see .BR X (7x). . But using .I roff explicitly isn't difficult either. . .P Some .I roff implementations provide wrapper programs that make it easy to use the .I roff system on the shell command line. . For example, the \f[CR]GNU\f[] .I roff implementation .BR groff (@MAN1EXT@) provides command line options to avoid the long command pipes of classical .IR troff ; a program .BR grog (@MAN1EXT@) tries to guess from the document which arguments should be used for a run of .BR groff ; people who do not like specifying command line options should try the .BR groffer (@MAN1EXT@) program for graphically displaying .I groff files and man pages. . . .\" -------------------------------------------------------------------- .SS "The roff Pipe" .\" -------------------------------------------------------------------- . Each .I roff system consists of preprocessors, .I roff formatter programs, and a set of device postprocessors. . This concept makes heavy use of the .I piping mechanism, that is, a series of programs is called one after the other, where the output of each program in the queue is taken as the input for the next program. . .RS .P cat \f[I]file\f[P] \ | .\|.\|. \ | \f[I]preproc\f[P] \ | .\|.\|. \ | troff \f[I]options\f[P] \ | \f[I]postproc\f[P] .RE . .P The preprocessors generate .I roff code that is fed into a .I roff formatter (e.g.\& .BR troff ), which in turn generates .I intermediate output that is fed into a device postprocessor program for printing or final output. . .P All of these parts use programming languages of their own; each language is totally unrelated to the other parts. . Moreover, .I roff macro packages that were tailored for special purposes can be included. . .P Most .I roff documents use the macros of some package, intermixed with code for one or more preprocessors, spiced with some elements from the plain .I roff language. . The full power of the .I roff formatting language is seldom needed by users; only programmers of macro packages need to know about the gory details. . . . .\" -------------------------------------------------------------------- .SS "Preprocessors" .\" -------------------------------------------------------------------- . A .I roff preprocessor is any program that generates output that syntactically obeys the rules of the .I roff formatting language. . Each preprocessor defines a language of its own that is translated into .I roff code when run through the preprocessor program. . Parts written in these languages may be included within a .I roff document; they are identified by special .I roff requests or macros. . Each document that is enhanced by preprocessor code must be run through all corresponding preprocessors before it is fed into the actual .I roff formatter program, for the formatter just ignores all alien code. . The preprocessor programs extract and transform only the document parts that are determined for them. . .P There are a lot of free and commercial .I roff preprocessors. . Some of them aren't available on each system, but there is a small set of preprocessors that are considered as an integral part of each .I roff system. . The classical preprocessors are . .RS .TS tab (@); lb l. tbl@for tables. eqn@for mathematical formul\[ae]. pic@for drawing diagrams. refer@for bibliographic references. soelim@for including macro files from standard locations. chem@for drawing chemical formul\[ae]. .TE .RE . .P Other known preprocessors that are not available on all systems include . .RS .TS tab (@); lb l. grap@for constructing graphical elements. grn@for including \fBgremlin\fR(1) pictures. .TE .RE . .\" -------------------------------------------------------------------- .SS "Formatter Programs" .\" -------------------------------------------------------------------- . A .I roff formatter is a program that parses documents written in the .I roff formatting language or uses some of the .I roff macro packages. . It generates .IR "intermediate output" , which is intended to be fed into a single device postprocessor that must be specified by a command-line option to the formatter program. . The documents must have been run through all necessary preprocessors before. . .P The output produced by a .I roff formatter is represented in yet another language, the .IR "intermediate output format" or .IR "troff output" . . This language was first specified in .IR "[CSTR\~#97]" ; its \f[CR]GNU\f[] extension is documented in .BR groff_out (@MAN5EXT@). . The intermediate output language is a kind of assembly language compared to the high-level .I roff language. . The generated intermediate output is optimized for a special device, but the language is the same for every device. . .P The .I roff formatter is the heart of the .I roff system. . The traditional .I roff had two formatters, .B nroff for text devices and .B troff for graphical devices. . .P Often, the name .I troff is used as a general term to refer to both formatters. . . .\" -------------------------------------------------------------------- .SS "Devices and Postprocessors" .\" -------------------------------------------------------------------- . Devices are hardware interfaces like printers, text or graphical terminals, etc., or software interfaces such as a conversion into a different text or graphical format. . .P A .I roff postprocessor is a program that transforms .I troff output into a form suitable for a special device. . The .I roff postprocessors are like device drivers for the output target. . .P For each device there is a postprocessor program that fits the device optimally. . The postprocessor parses the generated intermediate output and generates device-specific code that is sent directly to the device. . .P The names of the devices and the postprocessor programs are not fixed because they greatly depend on the software and hardware abilities of the actual computer. . For example, the classical devices mentioned in .I [CSTR\~#54] have greatly changed since the classical times. . The old hardware doesn't exist any longer and the old graphical conversions were quite imprecise when compared to their modern counterparts. . .P For example, the Postscript device .I post in classical .I troff had a resolution of 720 units per inch, while .IR groff 's .I ps device has 72000, a refinement of factor 100. . .P Today the operating systems provide device drivers for most printer-like hardware, so it isn't necessary to write a special hardware postprocessor for each printer. . . .\" -------------------------------------------------------------------- .SH "ROFF PROGRAMMING" .\" -------------------------------------------------------------------- . Documents using .I roff are normal text files decorated by .I roff formatting elements. . The .I roff formatting language is quite powerful; it is almost a full programming language and provides elements to enlarge the language. . With these, it became possible to develop macro packages that are tailored for special applications. . Such macro packages are much handier than plain .IR roff . . So most people will choose a macro package without worrying about the internals of the .I roff language. . . .\" -------------------------------------------------------------------- .SS "Macro Packages" .\" -------------------------------------------------------------------- . Macro packages are collections of macros that are suitable to format a special kind of documents in a convenient way. . This greatly eases the usage of .IR roff . . The macro definitions of a package are kept in a file called .IB name .tmac (classically .BI tmac. name\c ). . All tmac files are stored in one or more directories at standardized positions. . Details on the naming of macro packages and their placement is found in .BR groff_tmac (@MAN5EXT@). . .P A macro package that is to be used in a document can be announced to the formatter by the command line option .BR \-m , see .BR troff (@MAN1EXT@), or it can be specified within a document using the file inclusion requests of the .I roff language, see .BR groff (@MAN7EXT@). . .P Famous classical macro packages are .I man for traditional man pages, .I mdoc for \f[CR]BSD\f[]-style manual pages; the macro sets for books, articles, and letters are .I me (probably from the first name of its creator .I Eric Allman), .I ms (from .IR "Manuscript Macros\/" ), and .I mm (from .IR "Memorandum Macros\/" ). . . .\" -------------------------------------------------------------------- .SS "The roff Formatting Language" .\" -------------------------------------------------------------------- . The classical .I roff formatting language is documented in the .I Troff User's Manual .IR "[CSTR\~#54]" . . The .I roff language is a full programming language providing requests, definition of macros, escape sequences, string variables, number or size registers, and flow controls. . .P .I Requests are the predefined basic formatting commands similar to the commands at the shell prompt. . The user can define request-like elements using predefined .I roff elements. . These are then called .IR macros . . A document writer will not note any difference in usage for requests or macros; both are written on a line on their own starting with a dot. . .P .I Escape sequences are .I roff elements starting with a backslash .QuotedChar \[rs] . . They can be inserted anywhere, also in the midst of text in a line. . They are used to implement various features, including the insertion of non-\f[CR]ASCII\f[] characters with .Esc ( , font changes with .Esc f , in-line comments with .Esc \[dq] , the escaping of special control characters like .Esc \[rs] , and many other features. . .P .I Strings are variables that can store a string. . A string is stored by the .B .ds request. . The stored string can be retrieved later by the .B \[rs]* escape sequence. . .P .I Registers store numbers and sizes. . A register can be set with the request .B .nr and its value can be retrieved by the escape sequence .BR "\[rs]n" . . . .\" -------------------------------------------------------------------- .SH "FILE NAME EXTENSIONS" .\" -------------------------------------------------------------------- . Manual pages (man pages) take the section number as a file name extension, e.g., the filename for this document is .IR roff.7 , i.e., it is kept in section\~7 of the man pages. . .P The classical macro packages take the package name as an extension, e.g.\& .IB file. me for a document using the .I me macro package, .IB file. mm for .IR mm , .IB file. ms for .IR ms , .IB file. pic for .I pic files, etc. . .P But there is no general naming scheme for .I roff documents, though .IB file. tr for .I troff file is seen now and then. . Maybe there should be a standardization for the filename extensions of .I roff files. . .P File name extensions can be very handy in conjunction with the .BR less (1) pager. . It provides the possibility to feed all input into a command-line pipe that is specified in the shell environment variable .BR LESSOPEN . . This process is not well documented, so here an example: . .RS .P .EX LESSOPEN='|lesspipe %s' .EE .RE . .P where .B lesspipe is either a system supplied command or a shell script of your own. . . .\" -------------------------------------------------------------------- .SH "EDITING ROFF" .\" -------------------------------------------------------------------- . The best program for editing a .I roff document is Emacs (or Xemacs), see .BR emacs (1). . It provides an .I nroff mode that is suitable for all kinds of .I roff dialects. . This mode can be activated by the following methods. . .P When editing a file within Emacs the mode can be changed by typing .RI ` "M-x nroff-mode" ', where .B M-x means to hold down the .B Meta key (or .BR Alt ) and hitting the .BR x\~ key at the same time. . .P But it is also possible to have the mode automatically selected when the file is loaded into the editor. . .IP \(bu The most general method is to include the following 3 comment lines at the end of the file. . .RS .IP .EX \&.\[rs]" Local Variables: \&.\[rs]" mode: nroff \&.\[rs]" End: .EE .RE . .IP \(bu There is a set of file name extensions, e.g.\& the man pages that trigger the automatic activation of the .I nroff mode. . .IP \(bu Theoretically, it is possible to write the sequence . .RS .IP .EX \&.\[rs]" \%-*-\ nroff\ -*- .EE .RE . .IP as the first line of a file to have it started in .I nroff mode when loaded. . Unfortunately, some applications such as the .B man program are confused by this; so this is deprecated. . .P All .I roff formatters provide automated line breaks and horizontal and vertical spacing. . In order to not disturb this, the following tips can be helpful. . .IP \(bu Never include empty or blank lines in a .I roff document. . Instead, use the empty request (a line consisting of a dot only) or a line comment .B .\[rs]" if a structuring element is needed. . .IP \(bu Never start a line with whitespace because this can lead to unexpected behavior. . Indented paragraphs can be constructed in a controlled way by .I roff requests. . .IP \(bu Start each sentence on a line of its own, for the spacing after a dot is handled differently depending on whether it terminates an abbreviation or a sentence. . To distinguish both cases, do a line break after each sentence. . .IP \(bu To additionally use the auto-fill mode in Emacs, it is best to insert an empty .I roff request (a line consisting of a dot only) after each sentence. . .P The following example shows how optimal .I roff editing could look. . .RS .P .EX This is an example for a \&.I roff document. \&. This is the next sentence in the same paragraph. \&. This is a longer sentence stretching over several lines; abbreviations like `cf.' are easily identified because the dot is not followed by a line break. \&. In the output, this will still go to the same paragraph. .EE .RE . .P Besides Emacs, some other editors provide .I nroff style files too, e.g.\& .BR vim (1), an extension of the .BR vi (1) program. . . .\" -------------------------------------------------------------------- .SH "SEE ALSO" .\" -------------------------------------------------------------------- . There is a lot of documentation on .IR roff . . The original papers on classical .I troff are still available, and all aspects of .I groff are documented in great detail. . . .\" -------------------------------------------------------------------- .SS "Internet sites" .\" -------------------------------------------------------------------- . .TP troff.org .UR http://\:www.troff.org The historical troff site .UE provides an overview and pointers to all historical aspects of .IR roff . . .TP Multics .UR http://\:www.multicians.org The Multics site .UE contains a lot of information on the MIT projects, CTSS, Multics, early Unix, including .IR runoff ; especially useful are a glossary and the many links to ancient documents. . .TP Unix Archive .UR http://\:www.tuhs.org/\:Archive/ The Ancient Unixes Archive .UE . provides the source code and some binaries of the ancient Unixes (including the source code of .I troff and its documentation) that were made public by Caldera since 2001, e.g.\& of the famous Unix version\~7 for PDP-11 at the .UR http://\:www.tuhs.org/\:Archive/\:PDP-11/\:Trees/\:V7 Unix V7 site .UE . . .TP Developers at AT&T Bell Labs .UR http://\:www.bell-labs.com/ Bell Labs Computing and Mathematical Sciences Research .UE . provides a search facility for tracking information on the early developers. . .TP Plan 9 .UR http://\:plan9.bell-labs.com The Plan\~9 operating system .UE . by AT&T Bell Labs. . .TP runoff .UR http://\:web.mit.edu/\:Saltzer/\:www/\:publications/\:pubs.html Jerry Saltzer's home page .UE . stores some documents using the ancient RUNOFF formatting language. . .TP CSTR Papers .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr.html The Bell Labs CSTR site .UE . stores the original .I troff manuals (CSTR #54, #97, #114, #116, #122) and famous historical documents on programming. . .TP \f[CR]GNU\f[] \f[I]roff\f[] .UR http://\:www.gnu.org/\:software/\:groff The groff web site .UE provides the free .I roff implementation .IR groff , the actual standard .IR roff . . . .\" -------------------------------------------------------------------- .SS "Historical roff Documentation" .\" -------------------------------------------------------------------- . Many classical .B troff documents are still available on-line. . The two main manuals of the .I troff language are . .TP [CSTR\~#54] J. F. Ossanna, .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:54.ps.gz .I "Nroff/\:Troff User's Manual" .UE ; . Bell Labs, 1976; revised by Brian Kernighan, 1992. . .TP [CSTR\~#97] Brian Kernighan, .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:97.ps.gz .I "A Typesetter-independent TROFF" .UE , . Bell Labs, 1981, revised March 1982. . .P The \[lq]little language\[rq] .I roff papers are . .TP [CSTR\~#114] Jon L. Bentley and Brian W. Kernighan, .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:114.ps.gz .I "GRAP \[en] A Language for Typesetting Graphs" .UE ; . Bell Labs, August 1984. . .TP [CSTR\~#116] Brian W. Kernighan, .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:116.ps.gz .I "PIC \[en] A Graphics Language for Typesetting" .UE ; . Bell Labs, December 1984. . .TP [CSTR\~#122] J. L. Bentley, L. W. Jelinski, and B. W. Kernighan, .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:122.ps.gz .I "CHEM \[en] A Program for Typesetting Chemical Structure Diagrams," .I "Computers and Chemistry" .UE ; . Bell Labs, April 1986. . . .\" -------------------------------------------------------------------- .SS "Manual Pages" .\" -------------------------------------------------------------------- . Due to its complex structure, a full .I roff system has many man pages, each describing a single aspect of .IR roff . . Unfortunately, there is no general naming scheme for the documentation among the different .I roff implementations. . .P In .IR groff , the man page .BR groff (@MAN1EXT@) contains a survey of all documentation available in .IR groff . . .P On other systems, you are on your own, but .BR troff (1) might be a good starting point. . . .\" -------------------------------------------------------------------- .SH AUTHORS .\" -------------------------------------------------------------------- . Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. . .P This document is distributed under the terms of the \f[CR]FDL\f[] (\f[CR]GNU Free Documentation License\f[]) version 1.3 or later. . You should have received a copy of the \f[CR]FDL\f[] on your system, it is also available on-line at the .UR http://\:www.gnu.org/\:copyleft/\:fdl.html GNU copyleft site .UE . . .P This document is part of .IR groff , the \f[CR]GNU\f[] .I roff distribution. . It was written by .MT groff-bernd.warken-72@web.de Bernd Warken .ME ; it is maintained by .MT wl@gnu.org Werner Lemberg .ME . . .\" -------------------------------------------------------------------- .\" Emacs setup .\" -------------------------------------------------------------------- . .\" Local Variables: .\" mode: nroff .\" End: groff-1.22.2/man/groff_out.man0000644000175000001440000012212212104714260014501 0ustar wlusers'\" e .\" The above line should force the use of eqn as a preprocessor .ig groff_out.5 This file is part of groff, the GNU roff type-setting system. Copyright (C) 1989, 2001-2009, 2011 Free Software Foundation, Inc. rewritten from scrach 2001 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.3 or any later version published by the Free Software Foundation; with the Invariant Sections being this .ig-section and AUTHORS, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the Free Documentation License is included as a file called FDL in the main directory of the groff source package. .. . .\" -------------------------------------------------------------------- .\" Setup .\" -------------------------------------------------------------------- . .\" ----------------- Document configuration . .\" Number register to decide whether the commands `{' and `}' are used .\" 0: disable (actual default); 1: enable .nr @USE_ENV_STACK 0 . .ig Unfortunately, old versions of groff used an illogical position change after some D\~commands (Dp, DP, Dt). If the number register @STUPID_DRAWING_POSITIONING is 1 (actual default) then change position after these commands, otherwise the position is not changed. .. .nr @STUPID_DRAWING_POSITIONING 1 . .\" ----------------- Semantical definitions . .nr @maxcolor 65536 .ds @backslash \[rs]\" .ds @linebreak \fR\[la]line-break\[ra]\fP\" . .\" Begin of macro definitions . .de offset .RI ( \,\\$1\/ ,\ \,\\$2\/ )\\$3 .. .de indexed_offset .offset \fI\\$1\fP\d\s-3\\$2\s+3\u \fI\\$3\fP\d\s-3\\$4\s+3\u \\$5 .. .\" format: .command "" .de command \fB\\$1\fP\ \fI\,\\$2\/\fP\\$3 .. .\" format: .D-command "" .de D-command \fBD\\$1\fP\ \fI\,\\$2\/\fP\|\*[@linebreak] .. . .\" We set these as troff micromotions rather than eqn because \d and \u .\" can be lifted to XML subscript/superscript tags. Don't change .\" these to a parameterized string, man2html won't handle that. .ds hv1 \fIh\d\s-3\&1\s+3\u\~v\d\s-3\&1\s+3\u\fP .ds hv2 \fIh\d\s-3\&2\s+3\u\~v\d\s-3\&2\s+3\u\fP .ds hvn \fIh\d\s-3\&n\s+3\u\~v\d\s-3\&n\s+3\u\fP . .de Da-command \fBDa\fP\ \*[hv1] \*[hv2]\|\*[@linebreak] .. .\" graphics command .D with a variable number of arguments .\" format: .D-multiarg .de D-multiarg \fBD\\$1\fP\ \*[hv1] \*[hv2] .\|.\|. \*[hvn]\|\*[@linebreak] .. .\" format: .x-command "" .de x-command \fBx\\$1\fP\ \fI\\$2\fP\|\*[@linebreak] .. .de xsub .RI "(" "\\$1" " control command)" .br .. .\" End of macro definitions . . .\" -------------------------------------------------------------------- .\" Title .\" -------------------------------------------------------------------- . .TH GROFF_OUT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" . .SH NAME groff_out \- groff intermediate output format . . .\" -------------------------------------------------------------------- .SH DESCRIPTION .\" -------------------------------------------------------------------- . This manual page describes the .I intermediate output format of the GNU .BR roff (@MAN7EXT@) text processing system .BR groff (@MAN1EXT@). . This output is produced by a run of the GNU .BR @g@troff (@MAN1EXT@) program. . It contains already all device-specific information, but it is not yet fed into a device postprocessor program. . . .P As the GNU .I roff processor .BR groff (@MAN1EXT@) is a wrapper program around .B @g@troff that automatically calls a postprocessor, this output does not show up normally. . This is why it is called .I intermediate within the .I groff .IR system . . The .B groff program provides the option .B -Z to inhibit postprocessing, such that the produced .I intermediate output is sent to standard output just like calling .B @g@troff manually. . . .P In this document, the term .I @g@troff output describes what is output by the GNU .B @g@troff program, while .I intermediate output refers to the language that is accepted by the parser that prepares this output for the postprocessors. . This parser is smarter on whitespace and implements obsolete elements for compatibility, otherwise both formats are the same. . Both formats can be viewed directly with .BR \%gxditview (@MAN1EXT@). . . .P The main purpose of the .I intermediate output concept is to facilitate the development of postprocessors by providing a common programming interface for all devices. . It has a language of its own that is completely different from the .BR groff (@MAN7EXT@) language. . While the .I groff language is a high-level programming language for text processing, the .I intermediate output language is a kind of low-level assembler language by specifying all positions on the page for writing and drawing. . . .P The .RI pre- groff .I roff versions are denoted as .I classical .IR troff . The .I intermediate output produced by .B groff is fairly readable, while .I classical troff output was hard to understand because of strange habits that are still supported, but not used any longer by .I GNU .IR @g@troff . . . .\" -------------------------------------------------------------------- .SH "LANGUAGE CONCEPTS" .\" -------------------------------------------------------------------- . During the run of .BR @g@troff , the .I roff input is cracked down to the information on what has to be printed at what position on the intended device. . So the language of the .I intermediate output format can be quite small. . Its only elements are commands with or without arguments. . In this document, the term \[lq]command\[rq] always refers to the .I intermediate output language, never to the .I roff language used for document formatting. . There are commands for positioning and text writing, for drawing, and for device controlling. . . .\" -------------------------------------------------------------------- .SS "Separation" .\" -------------------------------------------------------------------- . .I Classical troff output had strange requirements on whitespace. . The .B groff output parser, however, is smart about whitespace by making it maximally optional. . The whitespace characters, i.e., the .IR tab , .IR space , and .I newline characters, always have a syntactical meaning. . They are never printable because spacing within the output is always done by positioning commands. . . .P Any sequence of .I space or .I tab characters is treated as a single .I syntactical .IR space . . It separates commands and arguments, but is only required when there would occur a clashing between the command code and the arguments without the space. . Most often, this happens when variable length command names, arguments, argument lists, or command clusters meet. . Commands and arguments with a known, fixed length need not be separated by .I syntactical .IR space . . . .P A line break is a syntactical element, too. . Every command argument can be followed by whitespace, a comment, or a newline character. . Thus a .I syntactical line break is defined to consist of optional .I syntactical space that is optionally followed by a comment, and a newline character. . . .P The normal commands, those for positioning and text, consist of a single letter taking a fixed number of arguments. . For historical reasons, the parser allows to stack such commands on the same line, but fortunately, in .I groff intermediate .IR output , every command with at least one argument is followed by a line break, thus providing excellent readability. . .P The other commands \[em] those for drawing and device controlling \[em] have a more complicated structure; some recognize long command names, and some take a variable number of arguments. . So all .B D and .B x commands were designed to request a .I syntactical line break after their last argument. . Only one command, .RB ` x\ X ' has an argument that can stretch over several lines, all other commands must have all of their arguments on the same line as the command, i.e., the arguments may not be split by a line break. . .P Empty lines, i.e., lines containing only space and/or a comment, can occur everywhere. . They are just ignored. . . .\" -------------------------------------------------------------------- .SS "Argument Units" .\" -------------------------------------------------------------------- . Some commands take integer arguments that are assumed to represent values in a measurement unit, but the letter for the corresponding .I scale indicator is not written with the output command arguments; see .BR groff (@MAN7EXT@) and the .I groff info file for more on this topic. . Most commands assume the scale indicator\~\c .BR u , the basic unit of the device, some use\~\c .BR z , the .I scaled point unit of the device, while others, such as the color commands expect plain integers. . Note that these scale indicators are relative to the chosen device. . They are defined by the parameters specified in the device's .I DESC file; see .BR groff_font (@MAN5EXT@). . . .P Note that single characters can have the eighth bit set, as can the names of fonts and special characters (this is, glyphs). . The names of glyphs and fonts can be of arbitrary length. . A glyph that is to be printed will always be in the current font. . . .P A string argument is always terminated by the next whitespace character (space, tab, or newline); an embedded .B # character is regarded as part of the argument, not as the beginning of a comment command. . An integer argument is already terminated by the next non-digit character, which then is regarded as the first character of the next argument or command. . . .\" -------------------------------------------------------------------- .SS "Document Parts" .\" -------------------------------------------------------------------- A correct .I intermediate output document consists of two parts, the .I prologue and the .IR body . . .P The task of the .I prologue is to set the general device parameters using three exactly specified commands. . The .I groff prologue is guaranteed to consist of the following three lines (in that order): .RS .P .B x\ T .I device .br .B x\ res .I n\ h\ v .br .B x init .RE .P with the arguments set as outlined in the section .BR "Device Control Commands" . . However, the parser for the .I intermediate output format is able to swallow additional whitespace and comments as well. . . .P The .I body is the main section for processing the document data. . Syntactically, it is a sequence of any commands different from the ones used in the .IR prologue . . Processing is terminated as soon as the first .B x\ stop command is encountered; the last line of any .I groff intermediate output always contains such a command. . . .P Semantically, the .I body is page oriented. . A new page is started by a .BR p \~command. . Positioning, writing, and drawing commands are always done within the current page, so they cannot occur before the first .BR p \~command. . Absolute positioning (by the .B H and .BR V \~commands) is done relative to the current page, all other positioning is done relative to the current location within this page. . . .\" -------------------------------------------------------------------- .SH "COMMAND REFERENCE" .\" -------------------------------------------------------------------- . This section describes all .I intermediate output commands, the classical commands as well as the .I groff extensions. . . .\" -------------------------------------------------------------------- .SS "Comment Command" .\" -------------------------------------------------------------------- . .TP .BI # anything \[la]end-of-line\[ra] A comment. . Ignore any characters from the .BR # \~\c character up to the next newline character. . .P This command is the only possibility for commenting in the .I intermediate .IR output . . Each comment can be preceded by arbitrary .I syntactical .IR space ; every command can be terminated by a comment. . . .\" -------------------------------------------------------------------- .SS "Simple Commands" .\" -------------------------------------------------------------------- . The commands in this subsection have a command code consisting of a single character, taking a fixed number of arguments. . Most of them are commands for positioning and text writing. . These commands are smart about whitespace. . Optionally, .I syntactical space can be inserted before, after, and between the command letter and its arguments. . All of these commands are stackable, i.e., they can be preceded by other simple commands or followed by arbitrary other commands on the same line. . A separating .I syntactical space is only necessary when two integer arguments would clash or if the preceding argument ends with a string argument. . . .if \n[@USE_ENV_STACK]=1 \{\ .TP .command { Open a new environment by copying the actual device configuration data to the environment stack. . The current environment is setup by the device specification and manipulated by the setting commands. . . .TP .command } Close the actual environment (opened by a preceding .BR { \~command) and restore the previous environment from the environment stack as the actual device configuration data. . .\} \" endif @USE_ENV_STACK . . .TP .command C xxx \[la]white-space\[ra] Print a glyph (special character) named .IR xxx . . The trailing .I syntactical space or .I line break is necessary to allow glyph names of arbitrary length. . The glyph is printed at the current print position; the glyph's size is read from the font file. . The print position is not changed. . . .TP .command c c Print glyph with single-letter name\~\c .I c at the current print position; the glyph's size is read from the font file. . The print position is not changed. . . .TP .command f n Set font to font number\~\c .I n (a non-negative integer). . . .TP .command H n Move right to the absolute vertical position\~\c .I n (a non-negative integer in basic units\~\c .BR u ) relative to left edge of current page. . . .TP .command h n Move .I n (a non-negative integer) basic units\~\c .B u horizontally to the right. . .I [CSTR\~#54] allows negative values for .I n also, but .I groff doesn't use this. . . .TP .command m "color-scheme \fR[\fPcomponent .\|.\|.\fR]\fP" Set the color for text (glyphs), line drawing, and the outline of graphic objects using different color schemes; the analoguous command for the filling color of graphic objects is .BR DF . . The color components are specified as integer arguments between 0 and \n[@maxcolor]. . The number of color components and their meaning vary for the different color schemes. . These commands are generated by the .I groff escape sequence .BR \*[@backslash]m . . No position changing. . These commands are a .I groff extension. . . .RS . .TP .command mc "cyan magenta yellow" Set color using the CMY color scheme, having the 3\~color components cyan, magenta, and yellow. . . .TP .command md Set color to the default color value (black in most cases). . No component arguments. . . .TP .command mg "gray" Set color to the shade of gray given by the argument, an integer between 0 (black) and \n[@maxcolor] (white). . . .TP .command mk "cyan magenta yellow black" Set color using the CMYK color scheme, having the 4\~color components cyan, magenta, yellow, and black. . .TP .command mr "red green blue" Set color using the RGB color scheme, having the 3\~color components red, green, and blue. . .RE . . .TP .command N n Print glyph with index\~\c .I n (an integer, normally non-negative) of the current font. . The print position is not changed. . If .B \-T\~html or .B \-T\~xhtml is used, negative values are emitted also to indicate an unbreakable space with given width. . For example, .B N\~\-193 represents an unbreakable space which has a width of 193\|u. . This command is a .I groff extension. . . .TP .command n b\ a Inform the device about a line break, but no positioning is done by this command. . In .I classical .IR troff , the integer arguments .I b and\~\c .I a informed about the space before and after the current line to make the .I intermediate output more human readable without performing any action. . In .IR groff , they are just ignored, but they must be provided for compatibility reasons. . . .TP .command p n Begin a new page in the outprint. . The page number is set to\~\c .IR n . . This page is completely independent of pages formerly processed even if those have the same page number. . The vertical position on the outprint is automatically set to\~0. . All positioning, writing, and drawing is always done relative to a page, so a .BR p \~command must be issued before any of these commands. . . .TP .command s n Set point size to .I n scaled points (this is unit\~\c .B z in GNU .BR @g@troff ). . .I Classical troff used the unit .I points (\c .BR p ) instead; see section .BR COMPATIBILITY . . . .TP .command t xyz\|.\|.\|. \[la]white-space\[ra] .TQ .command t "xyz\|.\|.\|.\& dummy-arg" \[la]white-space\[ra] Print a word, i.e., a sequence of glyphs with single-letter names .IR x , .IR y , .IR z , etc., terminated by a space character or a line break; an optional second integer argument is ignored (this allows the formatter to generate an even number of arguments). . The first glyph should be printed at the current position, the current horizontal position should then be increased by the width of the first glyph, and so on for each glyph. . The widths of the glyph are read from the font file, scaled for the current point size, and rounded to a multiple of the horizontal resolution. . Special characters (glyphs with names longer than a single letter) cannot be printed using this command; use the .B C command for those glyphs. . This command is a .I groff extension; it is only used for devices whose .I DESC file contains the .B tcommand keyword; see .BR groff_font (@MAN5EXT@). . . .TP .command u "n xyz\|.\|.\|." \[la]white-space\[ra] Print word with track kerning. . This is the same as the .B t command except that after printing each glyph, the current horizontal position is increased by the sum of the width of that glyph and\~\c .I n (an integer in basic units\~\c .BR u ). This command is a .I groff extension; it is only used for devices whose .I DESC file contains the .B tcommand keyword; see .BR groff_font (@MAN5EXT@). . . .TP .command V n Move down to the absolute vertical position\~\c .I n (a non-negative integer in basic units\~\c .BR u ) relative to upper edge of current page. . . .TP .command v n Move .I n basic units\~\c .B u down .RI ( n is a non-negative integer). . .I [CSTR\~#54] allows negative values for .I n also, but .I groff doesn't use this. . . .TP .command w Informs about a paddable whitespace to increase readability. . The spacing itself must be performed explicitly by a move command. . . .\" -------------------------------------------------------------------- .SS "Graphics Commands" .\" -------------------------------------------------------------------- . Each graphics or drawing command in the .I intermediate output starts with the letter\~\c .B D followed by one or two characters that specify a subcommand; this is followed by a fixed or variable number of integer arguments that are separated by a single space character. . A .B D\c \~command may not be followed by another command on the same line (apart from a comment), so each .B D\c \~command is terminated by a .I syntactical line .IR break . . . .P .B @g@troff output follows the classical spacing rules (no space between command and subcommand, all arguments are preceded by a single space character), but the parser allows optional space between the command letters and makes the space before the first argument optional. . As usual, each space can be any sequence of tab and space characters. . . .P Some graphics commands can take a variable number of arguments. . In this case, they are integers representing a size measured in basic units\~\c .BR u . . The .I h arguments stand for horizontal distances where positive means right, negative left. . The .I v arguments stand for vertical distances where positive means down, negative up. . All these distances are offsets relative to the current location. . . .P Unless indicated otherwise, each graphics command directly corresponds to a similar .I groff .B \*[@backslash]D escape sequence; see .BR groff (@MAN7EXT@). . . .P Unknown .B D\c \~commands are assumed to be device-specific. . Its arguments are parsed as strings; the whole information is then sent to the postprocessor. . . .P In the following command reference, the syntax element .I \[la]line-break\[ra] means a .I syntactical line break as defined in section .BR Separation . . . .TP .D-multiarg ~ Draw B-spline from current position to offset .indexed_offset h 1 v 1 , then to offset .indexed_offset h 2 v 2 if given, etc., up to .indexed_offset h n v n . This command takes a variable number of argument pairs; the current position is moved to the terminal point of the drawn curve. . . .TP .Da-command Draw arc from current position to .indexed_offset h 1 v 1 \|+\|\c .indexed_offset h 2 v 2 with center at .indexed_offset h 1 v 1 ; then move the current position to the final point of the arc. . . .TP .D-command C d .TQ .D-command C "d dummy-arg" Draw a solid circle using the current fill color with diameter\~\c .I d (integer in basic units\~\c .BR u ) with leftmost point at the current position; then move the current position to the rightmost point of the circle. . An optional second integer argument is ignored (this allows to the formatter to generate an even number of arguments). . This command is a .I groff extension. . . .TP .D-command c d Draw circle line with diameter\~\c .I d (integer in basic units\~\c .BR u ) with leftmost point at the current position; then move the current position to the rightmost point of the circle. . . .TP .D-command E "h v" Draw a solid ellipse in the current fill color with a horizontal diameter of\~\c .I h and a vertical diameter of\~\c .I v (both integers in basic units\~\c .BR u ) with the leftmost point at the current position; then move to the rightmost point of the ellipse. . This command is a .I groff extension. . . .TP .D-command e "h v" Draw an outlined ellipse with a horizontal diameter of\~\c .I h and a vertical diameter of\~\c .I v (both integers in basic units\~\c .BR u ) with the leftmost point at current position; then move to the rightmost point of the ellipse. . . .TP .D-command F "color-scheme \fR[\fPcomponent .\|.\|.\fR]\fP" Set fill color for solid drawing objects using different color schemes; the analoguous command for setting the color of text, line graphics, and the outline of graphic objects is .BR m . . The color components are specified as integer arguments between 0 and \n[@maxcolor]. . The number of color components and their meaning vary for the different color schemes. . These commands are generated by the .I groff escape sequences .BR \*[@backslash]D'F\ .\|.\|. ' and .B \*[@backslash]M (with no other corresponding graphics commands). . No position changing. . This command is a .I groff extension. . . .RS . .TP .D-command Fc "cyan magenta yellow" Set fill color for solid drawing objects using the CMY color scheme, having the 3\~color components cyan, magenta, and yellow. . . .TP .D-command Fd Set fill color for solid drawing objects to the default fill color value (black in most cases). . No component arguments. . . .TP .D-command Fg "gray" Set fill color for solid drawing objects to the shade of gray given by the argument, an integer between 0 (black) and \n[@maxcolor] (white). . . .TP .D-command Fk "cyan magenta yellow black" Set fill color for solid drawing objects using the CMYK color scheme, having the 4\~color components cyan, magenta, yellow, and black. . .TP .D-command Fr "red green blue" Set fill color for solid drawing objects using the RGB color scheme, having the 3\~color components red, green, and blue. . .RE . . .TP .D-command f n The argument .I n must be an integer in the range -32767 to 32767. . .RS .TP .RI 0\|\[<=]\| n \|\[<=]\|1000 Set the color for filling solid drawing objects to a shade of gray, where 0 corresponds to solid white, 1000 (the default) to solid black, and values in between to intermediate shades of gray; this is obsoleted by command .BR DFg . . .TP .IR n "\|<\|0 or " n \|>\|1000 Set the filling color to the color that is currently being used for the text and the outline, see command .BR m . For example, the command sequence . .RS .IP .EX mg 0 0 \n[@maxcolor] Df -1 .EE .RE . .IP sets all colors to blue. . .P No position changing. . This command is a .I groff extension. . .RE . . .TP .D-command l "h v" Draw line from current position to offset .offset h v (integers in basic units\~\c .BR u ); then set current position to the end of the drawn line. . . .TP .D-multiarg p Draw a polygon line from current position to offset .indexed_offset h 1 v 1 , from there to offset .indexed_offset h 2 v 2 , etc., up to offset .indexed_offset h n v n , and from there back to the starting position. . .ie \n[@STUPID_DRAWING_POSITIONING]=1 \{\ For historical reasons, the position is changed by adding the sum of all arguments with odd index to the actual horizontal position and the even ones to the vertical position. . Although this doesn't make sense it is kept for compatibility. . .\} .el \{\ As the polygon is closed, the end of drawing is the starting point, so the position doesn't change. .\} . This command is a .I groff extension. . . .TP .D-multiarg P The same macro as the corresponding .B Dp command with the same arguments, but draws a solid polygon in the current fill color rather than an outlined polygon. . .ie \n[@STUPID_DRAWING_POSITIONING]=1 \{\ The position is changed in the same way as with .BR Dp . .\} .el \ No position changing. . This command is a .I groff extension. . . .TP .D-command t n Set the current line thickness to\~\c .I n (an integer in basic units\~\c .BR u ) if .IR n \|>\|0; if .IR n \|=\|0 select the smallest available line thickness; if .IR n \|<\|0 set the line thickness proportional to the point size (this is the default before the first .B Dt command was specified). . .ie \n[@STUPID_DRAWING_POSITIONING]=1 \{\ For historical reasons, the horizontal position is changed by adding the argument to the actual horizontal position, while the vertical position is not changed. . Although this doesn't make sense it is kept for compatibility. . .\} .el \ No position changing. . This command is a .I groff extension. . . .\" -------------------------------------------------------------------- .SS "Device Control Commands" .\" -------------------------------------------------------------------- . Each device control command starts with the letter .B x followed by a space character (optional or arbitrary space/\:tab in .IR groff ) and a subcommand letter or word; each argument (if any) must be preceded by a .I syntactical .IR space . . All .B x commands are terminated by a .IR "syntactical line break" ; no device control command can be followed by another command on the same line (except a comment). . .P The subcommand is basically a single letter, but to increase readability, it can be written as a word, i.e., an arbitrary sequence of characters terminated by the next tab, space, or newline character. . All characters of the subcommand word but the first are simply ignored. . For example, .B @g@troff outputs the initialization command .B x\ i as .B x\ init and the resolution command .B x\ r as .BR "x\ res" . . But writings like .B x\ i_like_groff and .B x\ roff_is_groff are accepted as well to mean the same commands. . .P In the following, the syntax element .I \[la]line-break\[ra] means a .I syntactical line break as defined in section .BR Separation . . .TP .x-command F name .xsub Filename Use .I name as the intended name for the current file in error reports. . This is useful for remembering the original file name when .B groff uses an internal piping mechanism. . The input file is not changed by this command. . This command is a .I groff extension. . . .TP .x-command f "n\ s" .xsub font Mount font position\~\c .I n (a non-negative integer) with font named\~\c .I s (a text word), cf. .BR groff_font (@MAN5EXT@). . . .TP .x-command H n .xsub Height Set character height to\~\c .I n (a positive integer in scaled points\~\c .BR z ). . .I Classical troff used the unit points (\c .BR p ) instead; see section .BR COMPATIBILITY . . . .TP .x-command i .xsub init Initialize device. . This is the third command of the .IR prologue . . . .TP .x-command p .xsub pause Parsed but ignored. . The classical documentation reads .I pause device, can be .IR restarted . . . .TP .x-command r "n\ h\ v" .xsub resolution Resolution is\~\c .IR n , while .I h is the minimal horizontal motion, and .I v the minimal vertical motion possible with this device; all arguments are positive integers in basic units\~\c .B u per inch. . This is the second command of the .IR prologue . . . .TP .x-command S n .xsub Slant Set slant to\~\c .I n degrees (an integer in basic units\~\c .BR u ). . . .TP .x-command s .xsub stop Terminates the processing of the current file; issued as the last command of any .I intermediate @g@troff .IR output . . . .TP .x-command t .xsub trailer Generate trailer information, if any. . In .BR groff , this is actually just ignored. . . .TP .x-command T xxx .xsub Typesetter Set name of device to word .IR xxx , a sequence of characters ended by the next whitespace character. . The possible device names coincide with those from the groff .B \-T option. . This is the first command of the .IR prologue . . . .TP .x-command u n .xsub underline Configure underlining of spaces. . If .I n is\~1, start underlining of spaces; if .I n is\~0, stop underlining of spaces. . This is needed for the .B cu request in .B @g@nroff mode and is ignored otherwise. . This command is a .I groff extension. . . .TP .x-command X anything .xsub X-escape Send string .I anything uninterpreted to the device. . If the line following this command starts with a .B + character this line is interpreted as a continuation line in the following sense. . The .B + is ignored, but a newline character is sent instead to the device, the rest of the line is sent uninterpreted. . The same applies to all following lines until the first character of a line is not a .B + character. . This command is generated by the .I groff escape sequence .BR \*[@backslash]X . . The line-continuing feature is a .I groff extension. . . .\" -------------------------------------------------------------------- .SS "Obsolete Command" .\" -------------------------------------------------------------------- . In .I classical troff output, emitting a single glyph was mostly done by a very strange command that combined a horizontal move and the printing of a glyph. . It didn't have a command code, but is represented by a 3-character argument consisting of exactly 2\~digits and a character. . .TP .I ddc Move right .I dd (exactly two decimal digits) basic units\~\c .BR u , then print glyph with single-letter name\~\c .IR c . . . .RS .P In .IR groff , arbitrary .I syntactical space around and within this command is allowed to be added. . Only when a preceding command on the same line ends with an argument of variable length a separating space is obligatory. . In .I classical .IR troff , large clusters of these and other commands were used, mostly without spaces; this made such output almost unreadable. . .RE . . .P For modern high-resolution devices, this command does not make sense because the width of the glyphs can become much larger than two decimal digits. . In .BR groff , this is only used for the devices .BR X75 , .BR X75-12 , .BR X100 , and .BR X100-12 . . For other devices, the commands .B t and\~\c .B u provide a better functionality. . . .\" -------------------------------------------------------------------- .SH "POSTPROCESSING" .\" -------------------------------------------------------------------- . The .I roff postprocessors are programs that have the task to translate the .I intermediate output into actions that are sent to a device. . A device can be some piece of hardware such as a printer, or a software file format suitable for graphical or text processing. . The .I groff system provides powerful means that make the programming of such postprocessors an easy task. .P There is a library function that parses the .I intermediate output and sends the information obtained to the device via methods of a class with a common interface for each device. . So a .I groff postprocessor must only redefine the methods of this class. . For details, see the reference in section .BR FILES . . . .\" -------------------------------------------------------------------- .SH "EXAMPLES" .\" -------------------------------------------------------------------- . This section presents the .I intermediate output generated from the same input for three different devices. . The input is the sentence .I hell world fed into .B groff on the command line. . . .IP \[bu] 2m High-resolution device .I ps . . .RS .P .EX \fBshell>\fP echo "hell world" | groff -Z -T ps .EE . . .P .nf .ft CB x T ps x res 72000 1 1 x init p1 x font 5 TR f5 s10000 V12000 H72000 thell wh2500 tw H96620 torld n12000 0 x trailer V792000 x stop .ft P .fi .RE . . .P This output can be fed into the postprocessor .BR grops (@MAN1EXT@) to get its representation as a PostScript file, or .BR gropdf (@MAN1EXT@) to output directly to PDF. . . .IP \[bu] 2m Low-resolution device .I latin1 . . .RS .P This is similar to the high-resolution device except that the positioning is done at a minor scale. . Some comments (lines starting with .IR # ) were added for clarification; they were not generated by the formatter. . . .P .EX \fBshell>\fP "hell world" | groff -Z -T latin1 .EE . . .P .nf .I "# prologue" .ft CB x T latin1 x res 240 24 40 x init .I "# begin a new page" .ft CB p1 .I "# font setup" .ft CB x font 1 R f1 s10 .I "# initial positioning on the page" .ft CB V40 H0 .I "# write text `hell'" .ft CB thell .I "# inform about a space, and do it by a horizontal jump" .ft CB wh24 .I "# write text `world'" .ft CB tworld .I "# announce line break, but do nothing because ..." .ft CB n40 0 .I "# ... the end of the document has been reached" .ft CB x trailer V2640 x stop .ft P .fi .RE . . .P This output can be fed into the postprocessor .BR grotty (@MAN1EXT@) to get a formatted text document. . . .IP \[bu] 2m Classical style output . . .RS .P As a computer monitor has a very low resolution compared to modern printers the .I intermediate output for the X\~devices can use the jump-and-write command with its 2-digit displacements. . . .P .EX \fBshell>\fP "hell world" | groff -Z -T X100 .EE . . .P .nf .ft CB x T X100 x res 100 1 1 x init p1 x font 5 TR f5 s10 V16 H100 .I "# write text with old-style jump-and-write command" .ft CB ch07e07l03lw06w11o07r05l03dh7 n16 0 x trailer V1100 x stop .ft P .fi .RE . . .P This output can be fed into the postprocessor .BR \%xditview (1x) or .BR \%gxditview (@MAN1EXT@) for displaying in\~X. . . .P Due to the obsolete jump-and-write command, the text clusters in the classical output are almost unreadable. . . .\" -------------------------------------------------------------------- .SH "COMPATIBILITY" .\" -------------------------------------------------------------------- . The .I intermediate output language of the .I classical troff was first documented in .IR [CSTR\~#97] . . The .I groff intermediate output format is compatible with this specification except for the following features. . . .IP \[bu] 2m The classical quasi device independence is not yet implemented. . . .IP \[bu] 2m The old hardware was very different from what we use today. . So the .I groff devices are also fundamentally different from the ones in .I classical .IR troff . . For example, the classical PostScript device was called .I post and had a resolution of 720 units per inch, while .IR groff 's .I ps device has a resolution of 72000 units per inch. . Maybe, by implementing some rescaling mechanism similar to the classical quasi device independence, these could be integrated into modern .IR groff . . . .IP \[bu] 2m The B-spline command .B D~ is correctly handled by the .I intermediate output parser, but the drawing routines aren't implemented in some of the postprocessor programs. . . .IP \[bu] 2m The argument of the commands .B s and .B x H has the implicit unit scaled point\~\c .B z in .IR groff , while .I classical troff had point (\c .BR p ). . This isn't an incompatibility, but a compatible extension, for both units coincide for all devices without a .I sizescale parameter, including all classical and the .I groff text devices. . The few .I groff devices with a sizescale parameter either did not exist, had a different name, or seem to have had a different resolution. . So conflicts with classical devices are very unlikely. . . .ie \n[@STUPID_DRAWING_POSITIONING]=1 \{\ .IP \[bu] 2m The position changing after the commands .BR Dp , .BR DP , and .B Dt is illogical, but as old versions of groff used this feature it is kept for compatibility reasons. .\} \" @STUPID_DRAWING_POSITIONING .el \{\ .IP \[bu] 2m Temporarily, there existed some confusion on the positioning after the .B D commands that are .I groff extensions. . This has been clarified by establishing the classical rule for all groff drawing commands: . . .RS .P .ft I The position after a graphic object has been drawn is at its end; for circles and ellipses, the "end" is at the right side. .ft .RE . . .P From this, the positionings specified for the drawing commands above follow quite naturally. .\} \" @STUPID_DRAWING_POSITIONING . .P The differences between .I groff and .I classical troff are documented in .BR groff_diff (@MAN7EXT@). . . .\" -------------------------------------------------------------------- .SH "FILES" .\" -------------------------------------------------------------------- . .TP .BI @FONTDIR@/dev name /DESC Device description file for device .IR name . . .TP .IB \[la]groff-source-dir\[ra] /src/libs/libdriver/input.cpp Defines the parser and postprocessor for the .I intermediate .IR output . . It is located relative to the top directory of the .I groff source tree. . This parser is the definitive specification of the .I groff intermediate output format. . . .\" -------------------------------------------------------------------- .SH "SEE ALSO" .\" -------------------------------------------------------------------- . A reference like .BR groff (@MAN7EXT@) refers to a manual page; here .B groff in section\~\c .I @MAN7EXT@ of the man-page documentation system. . To read the example, look up section\~@MAN7EXT@ in your desktop help system or call from the shell prompt . . .RS .P .EX \fBshell>\fP man @MAN7EXT@ groff .EE .RE . . .P For more details, see .BR man (1). . . .TP .BR groff (@MAN1EXT@) option .B -Z and further readings on groff. . . .TP .BR groff (@MAN7EXT@) for details of the .I groff language such as numerical units and escape sequences. . . .TP .BR groff_font (@MAN5EXT@) for details on the device scaling parameters of the .B DESC file. . . .TP .BR @g@troff (@MAN1EXT@) generates the device-independent intermediate output. . . .TP .BR roff (@MAN7EXT@) for historical aspects and the general structure of roff systems. . . .TP .BR groff_diff (@MAN7EXT@) The differences between the intermediate output in groff and classical troff. . . .TP .BR gxditview (@MAN1EXT@) Viewer for the .I intermediate .IR output . . . .P .BR \%grodvi (@MAN1EXT@), .BR \%grohtml (@MAN1EXT@), .BR \%grolbp (@MAN1EXT@), .BR \%grolj4 (@MAN1EXT@), .BR \%grops (@MAN1EXT@), .BR \%grotty (@MAN1EXT@) .br .RS the groff postprocessor programs. .RE . . .P For a treatment of all aspects of the groff system within a single document, see the .I groff info .IR file . . It can be read within the integrated help systems, within .BR emacs (1) or from the shell prompt by . .RS .EX \fBshell>\fP info groff .EE .RE . . .P The .I classical troff output language is described in two AT&T Bell Labs CSTR documents available on-line at .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr.html Bell Labs CSTR site .UE . . . .TP .I [CSTR #97] .I A Typesetter-independent TROFF by .I Brian Kernighan is the original and most comprehensive documentation on the output language; see .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:97.ps.gz CSTR\~#97 .UE . . . .TP .I [CSTR\~#54] The 1992 revision of the .I Nroff/\:Troff User's Manual by .I J.\& F.\& Ossanna and .I Brian Kernighan isn't as comprehensive as .I [CSTR\~#97] regarding the output language; see .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:54.ps.gz CSTR\~#54 .UE . . . .\" -------------------------------------------------------------------- .SH "AUTHORS" .\" -------------------------------------------------------------------- . Copyright (C) 1989, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. . . .P This document is distributed under the terms of the FDL (GNU Free Documentation License) version 1.3 or later. . You should have received a copy of the FDL with this package; it is also available on-line at the .UR http://\:www.gnu.org/\:copyleft/\:fdl.html GNU copyleft site .UE . . . .P This document is part of .IR groff , the GNU .I roff distribution. . It is based on a former version \- published under the GPL \- that described only parts of the .I groff extensions of the output language. . It was rewritten in 2002 by .MT groff-bernd.warken-72@web.de Bernd Warken and is maintained by .MT wl@gnu.org Werner Lemberg .ME . . .\" -------------------------------------------------------------------- .\" Emacs settings .\" -------------------------------------------------------------------- .\" .\" Local Variables: .\" mode: nroff .\" End: groff-1.22.2/man/groff.man0000644000175000001440000021370412104714260013621 0ustar wlusers'\" t .ig groff.man This file is part of groff, the GNU roff type-setting system. Copyright (C) 2000-2010, 2012 Free Software Foundation, Inc. written by Bernd Warken maintained by Werner Lemberg Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being this .ig-section and AUTHORS, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the Free Documentation License is included as a file called FDL in the main directory of the groff source package. .. . .\" -------------------------------------------------------------------- .\" Setup .\" -------------------------------------------------------------------- . .do nr groff_C \n[.C] .cp 0 . .\" -------------------------------------------------------------------- .\" start of macro definitions . .de TPx . TP 10n .. .\" --------------------------------------------------------------------- .\" .Text anything ... .\" .\" All arguments are printed as text. .\" .de Text . nop \)\\$* .. . .\" --------- command line option --------- . .de option . Text \f[CB]\\$* . ft P .. . .\" --------- characters --------- . .de squoted_char . Text \[oq]\f[CB]\\$1\f[]\[cq]\\$2 .. .de dquoted_char . Text \[lq]\f[CB]\\$1\f[]\[rq]\\$2 .. .\" --------- requests --------- . .\" synopsis of a request .de REQ . ie \n[.$]=1 \{\ . Text \f[CB]\\$1\f[] . \} . el \{\ . Text \f[CB]\\$1\~\f[]\f[I]\\$2\f[] . \} .. . .\" reference of a request .de request . BR \\$* .. . .\" --------- numerical elements --------- . .\" number with a trailing unit .de scalednumber . Text \\$1\^\f[CB]\\$2\f[]\\$3\f[R] . ft P .. . .\" representation of units within the text .de scaleindicator . Text \f[CB]\\$1\f[]\\$2\f[R] . ft P .. . .\" representation of mathematical operators within the text .de operator . squoted_char \\$@ .. . . .\" --------- escape sequences --------- . .\" --------------------------------------------------------------------- .\" .ESC name [arg] .\" .\" Synopsis of an escape sequence, optionally with argument .\" Args : 1 or 2; `name' obligatory, `arg' optional .\" name : suitable name for an escape sequence (c, (xy, [long]) .\" arg : arbitrary word .\" Result : prints \namearg, where `name' is in CB, `arg' in I .\" .de ESC . Text "\f[CB]\[rs]\\$1\,\f[I]\\$2\/\fR" .. .\" --------------------------------------------------------------------- .\" .ESC[] name arg .\" .\" Synopsis for escape sequence with a bracketed long argument .\" Args : 2 obligatory .\" name : suitable name for an escape sequence (c, (xy, [long]) .\" arg : arbitrary text .\" Result : prints \name[arg], where `name' is in CB, `arg' in I .\" .de ESC[] . Text "\f[CB]\[rs]\\$1\[lB]\f[]\,\f[I]\\$2\/\f[]\f[CB]\[rB]\f[]" .. .\" --------------------------------------------------------------------- .\" .ESCq name arg .\" .\" Synopsis for escape sequence with a bracketed long argument .\" Args : 2 obligatory .\" name : suitable name for an escape sequence (c, (xy, [long]) .\" arg : arbitrary text .\" Result : prints \name'arg', where `name' is in CB, `arg' in I .\" .de ESCq . Text "\f[CB]\[rs]\\$1\[cq]\f[]\,\f[I]\\$2\/\f[]\f[CB]\[cq]\f[]" .. .\" --------------------------------------------------------------------- .\" .ESC? arg .\" .\" Synopsis for escape sequence with a bracketed long argument .\" Args : 1 obligatory .\" arg : arbitrary text .\" Result : prints `\?arg?', where the `?' are in CB, `arg' in I .\" .de ESC? . Text "\f[CB]\[rs]?\,\f[I]\\$1\/\f[CB]?\f[R]" .. .\" --------------------------------------------------------------------- .\" .esc name [punct] .\" .\" Reference of an escape sequence (no args), possibly punctuation .\" Args : 1 obligatory .\" name : suitable name for an escape sequence (c, (xy, [long]) .\" punct : arbitrary .\" Result : prints \name, where `name' is in B, `punct' in R .\" .de esc . BR "\[rs]\\$1" \\$2 .. .\" --------------------------------------------------------------------- .\" .escarg name arg [punct] .\" .\" Reference of an escape sequence (no args) .\" Args : 1 obligatory, 1 optional .\" name : suitable name for an escape sequence (c, (xy, [long]) .\" arg : arbitrary word .\" Result : prints \namearg, where .\" `name' is in B, `arg' in I .\" .de escarg . Text \f[B]\[rs]\\$1\f[]\,\f[I]\\$2\/\f[]\\$3 .. .\" --------------------------------------------------------------------- .\" .esc[] name arg [punct] .\" .\" Reference for escape sequence with a bracketed long argument .\" Args : 2 obligatory .\" name : suitable name for an escape sequence (c, (xy, [long]) .\" arg : arbitrary text .\" Result : prints \name[arg], where `name' is in CB, `arg' in CI .\" .de esc[] . Text \f[CB]\[rs]\\$1\[lB]\f[]\,\f[CI]\\$2\/\f[]\f[CB]\[rB]\f[]\\$3 .. . .\" --------------------------------------------------------------------- .\" .escq name arg .\" .\" Reference for escape sequence with a bracketed long argument .\" Args : 2 obligatory .\" name : suitable name for an escape sequence (c, (xy, [long]) .\" arg : arbitrary text .\" Result : prints \name'arg', where `name' is in CB, `arg' in CI .\" .de escq . Text \f[CB]\[rs]\\$1\[cq]\f[]\,\f[CI]\\$2\/\f[]\f[CB]\[cq]\f[]\\$3 .. . .\" --------- strings --------- . .\" synopsis for string, with \*[] .de STRING . Text \[rs]*[\f[CB]\\$1\f[]] \\$2 .. .\" synopsis for a long string .de string . if \n[.$]=0 \ . return . Text \f[CB]\[rs]*\[lB]\\$1\[rB]\f[]\\$2 .. . .\" --------- registers --------- . .\" synopsis for registers, with \n[] .de REG . Text \[rs]n[\f[CB]\\$1\f[]] .. .\" reference of a register, without decoration .de register . Text register . BR \\$* .. . .\" end of macro definitions . . .\" -------------------------------------------------------------------- .\" Title .\" -------------------------------------------------------------------- . .TH GROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" .SH NAME groff \- a short reference for the GNU roff language . . .\" -------------------------------------------------------------------- .SH DESCRIPTION .\" -------------------------------------------------------------------- . The name .I groff stands for .I GNU roff and is the free implementation of the roff type-setting system. . See .BR roff (@MAN7EXT@) for a survey and the background of the groff system. . .P This document gives only short descriptions of the predefined roff language elements as used in groff. . Both the classical features and the groff extensions are provided. . .P Historically, the .I roff language was called .IR troff . .I groff is compatible with the classical system and provides proper extensions. . So in GNU, the terms .IR roff , .IR troff , and .I groff language could be used as synonyms. . However .I troff slightly tends to refer more to the classical aspects, whereas .I groff emphasizes the GNU extensions, and .I roff is the general term for the language. . .P This file is only a short version of the complete documentation that is found in the .I groff .BR info (1) file, which contains more detailed, actual, and concise information. . .P The general syntax for writing groff documents is relatively easy, but writing extensions to the roff language can be a bit harder. . .P The roff language is line-oriented. . There are only two kinds of lines, control lines and text lines. . The control lines start with a control character, by default a period .dquoted_char . or a single quote .dquoted_char \[aq] ; all other lines are text lines. . .P .B Control lines represent commands, optionally with arguments. . They have the following syntax. . The leading control character can be followed by a command name; arguments, if any, are separated by spaces (but not tab characters) from the command name and among themselves, for example, .RS . .P .Text .command_name arg1 arg2 .RE . .P For indentation, any number of space or tab characters can be inserted between the leading control character and the command name, but the control character must be on the first position of the line. . .P .B Text lines represent the parts that is printed. They can be modified by escape sequences, which are recognized by a leading backslash .squoted_char \[rs] . These are in-line or even in-word formatting elements or functions. . Some of these take arguments separated by single quotes .dquoted_char \[aq] , others are regulated by a length encoding introduced by an open parenthesis .squoted_char ( or enclosed in brackets .squoted_char [ and .squoted_char ] . . .P The roff language provides flexible instruments for writing language extension, such as macros. . When interpreting macro definitions, the roff system enters a special operating mode, called the .BR "copy mode" . . .P The copy mode behaviour can be quite tricky, but there are some rules that ensure a safe usage. . .IP 1. Printable backslashes must be denoted as .esc e . To be more precise, .esc e represents the current escape character. . To get a backslash glyph, use .esc (rs or .esc [rs] . .IP 2. Double all backslashes. .IP 3. Begin all text lines with the special non-spacing character .esc & . . .P This does not produce the most efficient code, but it should work as a first measure. . For better strategies, see the groff info file and .BR groff_tmac (@MAN5EXT@). . .P Reading roff source files is easier, just reduce all double backslashes to a single one in all macro definitions. . . .\" -------------------------------------------------------------------- .SH "GROFF ELEMENTS" .\" -------------------------------------------------------------------- . The roff language elements add formatting information to a text file. . The fundamental elements are predefined commands and variables that make roff a full-blown programming language. . .P There are two kinds of roff commands, possibly with arguments. .B Requests are written on a line of their own starting with a dot .squoted_char . or a .dquoted_char \[aq] , whereas .B Escape sequences are in-line functions and in-word formatting elements starting with a backslash .squoted_char \[rs] . . .P The user can define her own formatting commands using the .request de request. . These commands are called .BR macros , but they are used exactly like requests. . Macro packages are pre-defined sets of macros written in the groff language. . A user's possibilities to create escape sequences herself is very limited, only special characters can be mapped. . .P The groff language provides several kinds of variables with different interfaces. . There are pre-defined variables, but the user can define her own variables as well. . .P .B String variables store character sequences. . They are set with the .request ds request and retrieved by the .esc * escape sequences. . Strings can have variables. . .P .B Register variables can store numerical values, numbers with a scale unit, and occasionally string-like objects. . They are set with the .request nr request and retrieved by the .esc n escape sequences. . .P .B Environments allow the user to temporarily store global formatting parameters like line length, font size, etc.\& for later reuse. . This is done by the .request ev request. . .P .B Fonts are identified either by a name or by an internal number. . The current font is chosen by the .request ft request or by the .esc f escape sequences. . Each device has special fonts, but the following fonts are available for all devices. .B R is the standard font Roman. .B B is its .B bold counterpart. . The .I italic font is called .B I and is available everywhere, but on text devices it is displayed as an underlined Roman font. . For the graphical output devices, there exist constant-width pendants of these fonts, .BR CR , .BR CI , and .BR CB . On text devices, all glyphs have a constant width anyway. . .P .B Glyphs are visual representation forms of .BR characters . In groff, the distinction between those two elements is not always obvious (and a full discussion is beyond the scope of this man page). . A first approximation is that glyphs have a specific size and colour and are taken from a specific font; they can't be modified any more \[en] characters are the input, and glyphs are the output. . As soon as an output line has been generated, it no longer contains characters but glyphs. . In this man page, we use either `glyph' or `character', whatever is more appropriate. . .P Moreover, there are some advanced roff elements. . A .B diversion stores (formatted) information into a macro for later usage. . A .B trap is a positional condition like a certain number of lines from page top or in a diversion or in the input. . Some action can be prescribed to be run automatically when the condition is met. . .P More detailed information and examples can be found in the groff info file. . . .\" -------------------------------------------------------------------- .SH "CONTROL CHARACTERS" .\" -------------------------------------------------------------------- . There is a small set of characters that have a special controlling task in certain conditions. . .TP \&\f[CB].\f[] A dot is only special at the beginning of a line or after the condition in the requests .request if , .request ie , .request el , and .request while . There it is the control character that introduces a request (or macro). . By using the .request cc request, the control character can be set to a different character, making the dot .squoted_char . a non-special character. .IP "" In all other positions, it just means a dot character. . In text paragraphs, it is advantageous to start each sentence at a line of its own. . .TP \&\f[CB]\[aq]\f[] The single quote has two controlling tasks. . At the beginning of a line and in the conditional requests it is the non-breaking control character. . That means that it introduces a request like the dot, but with the additional property that this request doesn't cause a linebreak. . By using the .request c2 request, the non-break control character can be set to a different character. . .IP "" As a second task, it is the most commonly used argument separator in some functional escape sequences (but any pair of characters not part of the argument do work). . In all other positions, it denotes the single quote or apostrophe character. . Groff provides a printable representation with the .esc (cq escape sequence. . .TP \&\f[CB]\[dq]\f[] The double quote is used to enclose arguments in macros (but not in requests and strings). . In the .request ds and .request as requests, a leading double quote in the argument is stripped off, making everything else afterwards the string to be defined (enabling leading whitespace). . The escaped double quote .esc \[dq] introduces a comment. . Otherwise, it is not special. . Groff provides a printable representation with the .esc (dq escape sequence. . .TP \&\f[CB]\[rs]\f[] The backslash usually introduces an escape sequence (this can be changed with the .request ec request). . A printed version of the escape character is the .esc e escape; a backslash glyph can be obtained by .esc (rs . .TP \&\f[CB](\f[] The open parenthesis is only special in escape sequences when introducing an escape name or argument consisting of exactly two characters. . In groff, this behaviour can be replaced by the \f[CB][]\f[] construct. .TP \&\f[CB][\f[] The opening bracket is only special in groff escape sequences; there it is used to introduce a long escape name or long escape argument. . Otherwise, it is non-special, e.g.\& in macro calls. .TP \&\f[CB]]\f[] The closing bracket is only special in groff escape sequences; there it terminates a long escape name or long escape argument. . Otherwise, it is non-special. .TP \f[CI]space\f[] Space characters are only functional characters. . They separate the arguments in requests, macros, and strings, and the words in text lines. . They are subject to groff's horizontal spacing calculations. . To get a defined space width, escape sequences like .squoted_char "\[rs]\ " (this is the escape character followed by a space), .esc | , .esc ^ , or .esc h should be used. . .IP \f[CI]newline\f[] In text paragraphs, newlines mostly behave like space characters. . Continuation lines can be specified by an escaped newline, i.e., by specifying a backslash .squoted_char \[rs] as the last character of a line. .IP \f[CI]tab\f[] If a tab character occurs during text the interpreter makes a horizontal jump to the next pre-defined tab position. . There is a sophisticated interface for handling tab positions. . . .\" -------------------------------------------------------------------- .SH "NUMERICAL EXPRESSIONS" .\" -------------------------------------------------------------------- . A .B numerical value is a signed or unsigned integer or float with or without an appended scaling indicator. . A .B scaling indicator is a one-character abbreviation for a unit of measurement. . A number followed by a scaling indicator signifies a size value. . By default, numerical values do not have a scaling indicator, i.e., they are normal numbers. . .P The .I roff language defines the following scaling indicators. . . .P .PD 0 .RS . .TPx .B c Centimeter . .TPx .B i Inch . .TPx .B P Pica\ \[eq]\ 1/6\ inch . .TPx .B p Point\ \[eq]\ 1/72\ inch . .TPx .B m Em\ \[eq]\ \f[R]the font size in points (approx.\& width of letter `\f[CR]m\f[R]') . .TPx .B M 100\^th \f[R]of an \f[CR]Em . .TPx .B n En\ \[eq]\ Em/2 . .TPx .B u Basic unit for actual output device . .TPx .B v Vertical line space in basic units scaled point\ \[eq]\ 1/\f[CI]sizescale\f[R] of a point (defined in font \f[I]DESC\f[] file) . .TPx .B f Scale by 65536. .RE .PD . .P .B Numerical expressions are combinations of the numerical values defined above with the following arithmetical operators already defined in classical troff. . .P .PD 0 .RS . .TPx .B + Addition . .TPx .B \- Subtraction . .TPx .B * Multiplication . .TPx .B / Division . .TPx .B % Modulo . .TPx .B = Equals . .TPx .B == Equals . .TPx .B < Less than . .TPx .B > Greater than . .TPx .B <= Less or equal . .TPx .B >= Greater or equal . .TPx .B & Logical and . .TPx .B : Logical or . .TPx .B ! Logical not . .TPx .B ( Grouping of expressions . .TPx .B ) Close current grouping . .RE .PD . .P Moreover, .I groff added the following operators for numerical expressions: . .P .PD 0 .RS . .TPx \f[I]e1\/\f[CB]>?\,\f[I]e2\f[R] The maximum of .I e1 and .IR e2 . . .TPx \f[I]e1\/\f[CB]0. . .TPx .REQ .ll Change to previous line length. . .TPx .REQ .ll "\[+-]N" Set line length according to .I \[+-]N (default length .scalednumber 6.5 i , default scaling indicator\~\c .scaleindicator m ). . .TPx .REQ .lsm Unset the leading spaces macro. . .TPx .REQ .lsm "macro" Set the leading spaces macro to .IR macro . . .TPx .REQ .ls Change to the previous value of additional intra-line skip. . .TPx .REQ .ls "N" Set additional intra-line skip value to .IR N , i.e., .IR N \\-1 blank lines are inserted after each text output line. . .TPx .REQ .lt "\[+-]N" Length of title (default scaling indicator\~\c .scaleindicator m ). . .TPx .REQ .mc Margin glyph off. . .TPx .REQ .mc "c" Print glyph\~\c .I c after each text line at actual distance from right margin. . .TPx .REQ .mc "c N" Set margin glyph to\~\c .I c and distance to\~\c .I N from right margin (default scaling indicator\~\c .scaleindicator m ). . .TPx .REQ .mk "register" Mark current vertical position in .IR register . . .TPx .REQ .mso "file" The same as .request .so except that .I file is searched in the tmac directories. . .TPx .REQ .na No output-line adjusting. . .TPx .REQ .ne Need a one-line vertical space. . .TPx .REQ .ne "N" Need .I N vertical space (default scaling indicator\~\c .scaleindicator v ). . .TPx .REQ .nf No filling or adjusting of output-lines. . .TPx .REQ .nh No hyphenation. . .TPx .REQ .nm Number mode off. . .TPx .REQ .nm "\[+-]N \fR[\fPM \fR[\fPS \fR[\fPI\fR]]]\fP" In line number mode, set number, multiple, spacing, and indentation. . .TPx .REQ .nn Do not number next line. . .TPx .REQ .nn "N" Do not number next .I N lines. . .TPx .REQ .nop "anything" Always process .IR anything . . .TPx .REQ .nr "register \[+-]N \fR[\fPM\fR]\fP" Define or modify .I register using .I \[+-]N with auto-increment .IR M . . .TPx .REQ .nroff Make the built-in conditions .B n true and .B t false. . .TPx .REQ .ns Turn on no-space mode. . .TPx .REQ .nx Immediately jump to end of current file. . .TPx .REQ .nx "filename" Immediately continue processing with file .IR file . . .TPx .REQ .open "stream filename" Open .I filename for writing and associate the stream named .I stream with it. . .TPx .REQ .opena "stream filename" Like .request .open but append to it. . .TPx .REQ .os Output vertical distance that was saved by the .request sv request. . .TPx .REQ .output "string" Emit .I string directly to intermediate output, allowing leading whitespace if .I string starts with \&\f[CB]\[dq]\f[] (which is stripped off). . .TPx .REQ .pc Reset page number character to\~\c .squoted_char % . . .TPx .REQ .pc "c" Page number character. . .TPx .REQ .pev Print the current environment and each defined environment state to stderr. . .TPx .REQ .pi "program" Pipe output to .I program (nroff only). . .TPx .REQ .pl Set page length to default .scalednumber 11 i . The current page length is stored in .register .p . . .TPx .REQ .pl "\[+-]N" Change page length to .I \[+-]N (default scaling indicator\~\c .scaleindicator v ). . .TPx .REQ .pm Print macro names and sizes (number of blocks of 128 bytes). . .TPx .REQ .pm "t" Print only total of sizes of macros (number of 128 bytes blocks). . .TPx .REQ .pn "\[+-]N" Next page number .IR N . . .TPx .REQ .pnr Print the names and contents of all currently defined number registers on stderr. . .TPx .REQ .po Change to previous page offset. . The current page offset is available in .register .o . . .TPx .REQ .po "\[+-]N" Page offset .IR N . . .TPx .REQ .ps Return to previous point size. .TPx .REQ .ps "\[+-]N" Point size; same as .esc[] s \[+-]N . . .TPx .REQ .psbb "filename" Get the bounding box of a PostScript image .IR filename . . .TPx .REQ .pso "command" This behaves like the .request so request except that input comes from the standard output of .IR command . . .TPx .REQ .ptr Print the names and positions of all traps (not including input line traps and diversion traps) on stderr. . .TPx .REQ .pvs Change to previous post-vertical line spacing. . .TPx .REQ .pvs "\[+-]N" Change post-vertical line spacing according to .I \[+-]N (default scaling indicator\~\c .scaleindicator p ). . .TPx .REQ .rchar "c1 c2 .\|.\|.\&" Remove the definitions of entities .IR c1 , .IR c2 , .I .\|.\|.\& . .TPx .REQ .rd "prompt" Read insertion. . .TPx .REQ .return Return from a macro. . .TPx .REQ .return "anything" Return twice, namely from the macro at the current level and from the macro one level higher. . .TPx .REQ .rfschar "f c1 c2 .\|.\|.\&" Remove the definitions of entities .IR c1 , .IR c2 , .I .\|.\|.\& for font .IR f . . .TPx .REQ .rj "n" Right justify the next .I n input lines. . .TPx .REQ .rm "name" Remove request, macro, or string .IR name . . .TPx .REQ .rn "old new" Rename request, macro, or string .I old to .IR new . . .TPx .REQ .rnn "reg1 reg2" Rename register .I reg1 to .IR reg2 . . .TPx .REQ .rr "register" Remove .IR register . . .TPx .REQ .rs Restore spacing; turn no-space mode off. . .TPx .REQ .rt "\[+-]N" Return .I (upward only) to marked vertical place (default scaling indicator\~\c .scaleindicator v ). . .TPx .REQ .schar "c anything" Define global fallback character (or glyph)\~\c .I c as string .IR anything . . .TPx .REQ .shc Reset soft hyphen glyph to .esc (hy . . .TPx .REQ .shc "c" Set the soft hyphen glyph to\~\c .IR c . . .TPx .REQ .shift "n" In a macro, shift the arguments by .IR n \~\c positions. . .TPx .REQ .sizes "s1 s2 .\|.\|.\& sn \fB[0]\fP" Set available font sizes similar to the .B sizes command in a .B DESC file. . .TPx .REQ .so "filename" Include source file. . .TPx .REQ .sp Skip one line vertically. . .TPx .REQ .sp "N" Space vertical distance .I N up or down according to sign of .I N (default scaling indicator\~\c .scaleindicator v ). . .TPx .REQ .special Reset global list of special fonts to be empty. . .TPx .REQ .special "s1 s2 .\|.\|.\&" Fonts .IR s1 , .IR s2 , etc.\& are special and are searched for glyphs not in the current font. . .TPx .REQ .spreadwarn Toggle the spread warning on and off without changing its value. . .TPx .REQ .spreadwarn "limit" Emit a warning if each space in an output line is widened by .I limit or more (default scaling indicator\~\c .scaleindicator m ). . .TPx .REQ .ss "N" Set space glyph size to .IR N /12 of the space width in the current font. . .TPx .REQ .ss "N M" Set space glyph size to .IR N /12 and sentence space size set to .IR M /12 of the space width in the current font. . .TPx .REQ .sty "n style" Associate .I style with font position .IR n . . .TPx .REQ .substring "xx n1 n2" Replace the string named .I xx with the substring defined by the indices .I n1 and .IR n2 . . .TPx .REQ .sv Save .scalednumber "1 v" of vertical space. .TPx .REQ .sv "N" Save the vertical distance .I N for later output with .request os request (default scaling indicator\~\c .scaleindicator v ). . .TPx .REQ .sy "command-line" Execute program .IR command-line . . .TPx .REQ .ta "T N" Set tabs after every position that is a multiple of .I N (default scaling indicator\~\c .scaleindicator m ). .TPx .REQ .ta "n1 n2 .\|.\|.\& nn \f[CB]T\f[] r1 r2 .\|.\|.\& rn" Set tabs at positions .IR n1 , .IR n2 , .Text .\|.\|., .IR nn , then set tabs at .IR nn + r1 , .IR nn + r2 , .Text .\|.\|., .IR nn + rn , then at .IR nn + rn + r1 , .IR nn + rn + r2 , .Text .\|.\|., .IR nn + rn + rn , and so on. . .\".TPx .\".REQ .tar .\"Restore internally saved tab positions. .\". .\".TPx .\".REQ .tas .\"Save tab positions internally. . .TPx .REQ .tc Remove tab repetition glyph. .TPx .REQ .tc "c" Set tab repetition glyph to\~\c .IR c . . .TPx .REQ .ti "\[+-]N" Temporary indent next line (default scaling indicator\~\c .scaleindicator m ). . .TPx .REQ .tkf "font s1 n1 s2 n2" Enable track kerning for .IR font . . .TPx .REQ .tl "\f[CB]\[cq]\f[]left\f[CB]\[cq]\f[]center\f[CB]\[cq]\f[]right\f[CB]\[cq]\f[]" Three-part title. . .TPx .REQ .tm "anything" Print .I anything on stdout. . .TPx .REQ .tm1 "anything" Print .I anything on stdout, allowing leading whitespace if .I anything starts with \&\f[CB]\[dq]\f[] (which is stripped off). . .TPx .REQ .tmc "anything" Similar to .request .tm1 without emitting a final newline. . .TPx .REQ .tr "abcd.\|.\|.\&" Translate .I a to .IR b , .I c to .IR d , etc.\& on output. . .TPx .REQ .trf "filename" Transparently output the contents of file .IR filename . . .TPx .REQ .trin "abcd.\|.\|.\&" This is the same as the .request tr request except that the .B asciify request uses the character code (if any) before the character translation. . .TPx .REQ .trnt "abcd.\|.\|.\&" This is the same as the .request tr request except that the translations do not apply to text that is transparently throughput into a diversion with .esc ! . . .TPx .REQ .troff Make the built-in conditions .B t true and .B n false. . .TPx .REQ .uf "font" Set underline font to .I font (to be switched to by .request .ul ). . .TPx .REQ .ul "N" Underline (italicize in troff) .I N input lines. . .TPx .REQ .unformat "diversion" Unformat space characters and tabs in .IR diversion , preserving font information. .TPx .REQ .vpt "n" Enable vertical position traps if .I n is non-zero, disable them otherwise. . .TPx .REQ .vs Change to previous vertical base line spacing. . .TPx .REQ .vs "\[+-]N" Set vertical base line spacing to .I \[+-]N (default scaling indicator\~\c .scaleindicator p ). . .TPx .REQ .warn "n" Set warnings code to .IR n . . .TPx .REQ .warnscale "si" Set scaling indicator used in warnings to .IR si . . .TPx .REQ .wh "N" Remove (first) trap at position .IR N . . .TPx .REQ .wh "N trap" Set location trap; negative means from page bottom. . .TPx .REQ .while "cond anything" While condition .I cond is true, accept .I anything as input. . .TPx .REQ .write "stream anything" Write .I anything to the stream named .IR stream . . .TPx .REQ .writec "stream anything" Similar to .request .write without emitting a final newline. . .TPx .REQ .writem "stream xx" Write contents of macro or string .I xx to the stream named .IR stream . . .PD . .P Besides these standard groff requests, there might be further macro calls. They can originate from a macro package (see .BR roff (@MAN7EXT@) for an overview) or from a preprocessor. . .P Preprocessor macros are easy to be recognized. . They enclose their code into a pair of characteristic macros. . .P .TS box, center, tab (@); c | c | c CfCB | CfCB | CfCB. preprocessor@start macro@ end macro = eqn@.EQ@.EN grap@.G1@.G2 grn@.GS@.GE pic@.PS@.PE refer@.R1@.R2 soelim@\f[I]none@\f[I]none tbl@.TS@.TE .TE .P . . .\" -------------------------------------------------------------------- .SH "ESCAPE SEQUENCES" .\" -------------------------------------------------------------------- . Escape sequences are in-line language elements usually introduced by a backslash .squoted_char \[rs] and followed by an escape name and sometimes by a required argument. . Input processing is continued directly after the escaped character or the argument (without an intervening separation character). . So there must be a way to determine the end of the escape name and the end of the argument. . .P This is done by enclosing names (escape name and arguments consisting of a variable name) by a pair of brackets .BI \[lB] name \[rB] and constant arguments (number expressions and characters) by apostrophes (ASCII 0x27) like .BI \[cq] constant \[cq] \f[R]. . .P There are abbreviations for short names. . Two-character escape names can be specified by an opening parenthesis like .esc ( xy or .esc *( xy without a closing counterpart. . And all one-character names different from the special characters .squoted_char [ and .squoted_char ( can even be specified without a marker, for example .esc n c or .esc $ c. . .P Constant arguments of length\~1 can omit the marker apostrophes, too, but there is no two-character analogue. . .P While one-character escape sequences are mainly used for in-line functions and system related tasks, the two-letter names following the .esc ( construct are glyphs predefined by the roff system; these are called `Special Characters' in the classical documentation. . Escapes sequences of the form .esc[] "" name denote glyphs too. . . .\" -------------------------------------------------------------------- .SS "Single-Character Escapes" .\" -------------------------------------------------------------------- . .PD 0 . .\" --------- comments --------- . .TP .ESC \[dq] Start of a comment. . Everything up to the end of the line is ignored. . .TP .ESC # Everything up to and including the next newline is ignored. . This is interpreted in copy mode. . This is like .esc \[dq] except that the terminating newline is ignored as well. . .\" --------- strings --------- . .TP .ESC * s The string stored in the string variable with one-character name\~\c .IR s . . .TP .ESC *( st The string stored in the string variable with two-character name .IR st . . .TP .ESC[] * string The string stored in the string variable with name .I string (with arbitrary length). . .TP .ESC[] * "stringvar arg1 arg2 .\|.\|." The string stored in the string variable with arbitrarily long name .IR stringvar , taking .IR arg1 , .IR arg2 , .I .\|.\|.\& as arguments. . .\" --------- macro arguments --------- . .TP .ESC $0 The name by which the current macro was invoked. . The .request als request can make a macro have more than one name. . .TP .ESC $ x Macro or string argument with one-digit number\~\c .I x in the range 1 to\~9. . .TP .ESC $( xy Macro or string argument with two-digit number .I xy (larger than zero). . .TP .ESC[] $ nexp Macro or string argument with number .IR nexp , where .I nexp is a numerical expression evaluating to an integer \[>=]1. . .TP .ESC $* In a macro or string, the concatenation of all the arguments separated by spaces. . .TP .ESC $@ In a macro or string, the concatenation of all the arguments with each surrounded by double quotes, and separated by spaces. . .TP .ESC $^ In a macro, the representation of all parameters as if they were an argument to the .request ds request. . .\" --------- escaped characters --------- . .TP .ESC \[rs] reduces to a single backslash; useful to delay its interpretation as escape character in copy mode. . For a printable backslash, use .esc e , or even better .esc [rs] , to be independent from the current escape character. . .TP .ESC \[cq] The acute accent \[aa]; same as .esc (aa . Unescaped: apostrophe, right quotation mark, single quote (ASCII 0x27). . .TP .ESC ` The grave accent \[ga]; same as .esc (ga . Unescaped: left quote, backquote (ASCII 0x60). . .TP .ESC - The \- (minus) sign in the current font. . .TP .ESC _ The same as .esc (ul , the underline character. . .TP .ESC . The same as a dot (`.'). Necessary in nested macro definitions so that `\[rs]\[rs]..' expands to `..'. . .TP .ESC % Default optional hyphenation character. . .TP .ESC ! Transparent line indicator. . .TP .ESC? anything In a diversion, this transparently embeds .I anything in the diversion. .I anything is read in copy mode. . See also the escape sequences .esc ! and .esc ? . . . .\" --------- spacing --------- . .TP .ESC \& space Unpaddable space size space glyph (no line break). . .TP .ESC 0 Digit-width space. . .TP .ESC | 1/6\ em narrow space glyph; zero width in nroff. . .TP .ESC ^ 1/12\ em half-narrow space glyph; zero width in nroff. . .TP .ESC & Non-printable, zero-width glyph. . .TP .ESC ) Like .esc & except that it behaves like a glyph declared with the .request cflags request to be transparent for the purposes of end-of-sentence recognition. . .TP .ESC / Increases the width of the preceding glyph so that the spacing between that glyph and the following glyph is correct if the following glyph is a roman glyph. . .TP .ESC , Modifies the spacing of the following glyph so that the spacing between that glyph and the preceding glyph is correct if the preceding glyph is a roman glyph. . .TP .ESC ~ Unbreakable space that stretches like a normal inter-word space when a line is adjusted. . .TP .ESC : Inserts a zero-width break point (similar to .esc % but without a soft hyphen character). . .TP .ESC "" newline Ignored newline, for continuation lines. . .\" --------- structuring --------- . .TP .ESC { Begin conditional input. . .TP .ESC } End conditional input. . .\" --------- longer escape names --------- . .TP .ESC ( sc A glyph with two-character name .IR sc ; see section .BR "Special Characters" . . .TP .ESC[] "" name A glyph with name .I name (of arbitrary length). . .TP .ESC[] "" "comp1 comp2 .\|.\|." A composite glyph with components .IR comp1 , .IR comp2 , .I .\|.\|. . .\" --------- alphabetical escapes --------- . .TP .ESC a Non-interpreted leader character. . .TP .ESCq A anything If .I anything is acceptable as a name of a string, macro, diversion, register, environment or font it expands to\~1, and to\~0 otherwise. . .TP .ESCq b abc.\|.\|.\& Bracket building function. . .TP .ESCq B anything If .I anything is acceptable as a valid numeric expression it expands to\~1, and to\~0 otherwise. . .TP .ESC c Interrupt text processing. . .TP .ESCq C glyph The glyph called .IR glyph ; same as .esc[] "" glyph , but compatible to other roff versions. . .TP .ESC d Forward (down) 1/2 em (1/2 line in nroff). . .TP .ESCq D charseq Draw a graphical element defined by the characters in .IR charseq ; see the groff info file for details. . .TP .ESC e Printable version of the current escape character. . .TP .ESC E Equivalent to an escape character, but is not interpreted in copy mode. . .TP .ESC f F Change to font with one-character name or one-digit number\~\c .IR F . . .TP .ESC fP Switch back to previous font. . .TP .ESC f( fo Change to font with two-character name or two-digit number .IR fo . . .TP .ESC[] f font Change to font with arbitrarily long name or number expression .IR font . . .TP .ESC[] f "" Switch back to previous font. . .TP .ESC F f Change to font family with one-character name\~\c .IR f . . .TP .ESC F( fm Change to font family with two-character name .IR fm . . .TP .ESC[] F fam Change to font family with arbitrarily long name .IR fam . . .TP .ESC[] F "" Switch back to previous font family. . .TP .ESC g r Return format of register with one-character name\~\c .I r suitable for .request af request. . .TP .ESC g( rg Return format of register with two-character name .I rg suitable for .request af request. . .TP .ESC[] g reg Return format of register with arbitrarily long name .I reg suitable for .request af request. . .TP .ESCq h N Local horizontal motion; move right .I N (left if negative). . .TP .ESCq H N Set height of current font to .IR N . . .TP .ESC k r Mark horizontal input place in one-character register\~\c .IR r . . .TP .ESC k( rg Mark horizontal input place in two-character register .IR rg . . .TP .ESC[] k reg Mark horizontal input place in register with arbitrarily long name .IR reg . . .TP .ESCq l Nc Horizontal line drawing function (optionally using character .IR c ). . .TP .ESCq L Nc Vertical line drawing function (optionally using character .IR c ). . .TP .ESC m c Change to color with one-character name\~\c .IR c . . .TP .ESC m( cl Change to color with two-character name .IR cl . . .TP .ESC[] m color Change to color with arbitrarily long name .IR color . . .TP .ESC[] m "" Switch back to previous color. . .TP .ESC M c Change filling color for closed drawn objects to color with one-character name\~\c .IR c . . .TP .ESC M( cl Change filling color for closed drawn objects to color with two-character name .IR cl . . .TP .ESC[] M color Change filling color for closed drawn objects to color with arbitrarily long name .IR color . . .TP .ESC[] M "" Switch to previous fill color. . .TP .ESC n r The numerical value stored in the register variable with the one-character name\~\c .IR r . . .TP .ESC n( re The numerical value stored in the register variable with the two-character name .IR re . . .TP .ESC[] n reg The numerical value stored in the register variable with arbitrarily long name .IR reg . . .TP .ESCq N n Typeset the glyph with index\~\c .I n in the current font. . No special fonts are searched. . Useful for adding (named) entities to a document using the .request char request and friends. . .TP .ESCq o abc.\|.\|.\& Overstrike glyphs .IR a , .IR b , .IR c , etc. . .TP .ESC O0 Disable glyph output. . Mainly for internal use. . .TP .ESC O1 Enable glyph output. . Mainly for internal use. . .TP .ESC p Break and spread output line. . .TP .ESC r Reverse 1\ em vertical motion (reverse line in nroff). . .TP .ESCq R "name\~\[+-]n" The same as .request .nr .I name .IR \[+-]n . . .TP .ESC s \[+-]N Set/increase/decrease the point size to/by .I N scaled points; .I N is a one-digit number in the range 1 to\~9. . Same as .request ps request. . .TP .ESC s( \[+-]N .TQ .ESC s\[+-]( N Set/increase/decrease the point size to/by .I N scaled points; .I N is a two-digit number \[>=]1. . Same as .request ps request. . .TP .ESC[] s \[+-]N .TQ .ESC[] s\[+-] N .TQ .ESCq s \[+-]N .TQ .ESCq s\[+-] N Set/increase/decrease the point size to/by .I N scaled points. . Same as .request ps request. . .TP .ESCq S N Slant output by .I N degrees. . .TP .ESC t Non-interpreted horizontal tab. . .TP .ESC u Reverse (up) 1/2 em vertical motion (1/2 line in nroff). . .TP .ESCq v N Local vertical motion; move down .I N (up if negative). . .TP .ESC V e The contents of the environment variable with one-character name\~\c .IR e . . .TP .ESC V( ev The contents of the environment variable with two-character name .IR ev . . .TP .ESC[] V env The contents of the environment variable with arbitrarily long name .IR env . . .TP .ESCq w string The width of the glyph sequence .IR string . . .TP .ESCq x N Extra line-space function (negative before, positive after). . .TP .ESCq X string Output .I string as device control function. . .TP .ESC Y n Output string variable or macro with one-character name\~\c .I n uninterpreted as device control function. . .TP .ESC Y( nm Output string variable or macro with two-character name .I nm uninterpreted as device control function. . .TP .ESC[] Y name Output string variable or macro with arbitrarily long name .I name uninterpreted as device control function. . .TP .ESC z c Print .I c with zero width (without spacing). . .TP .ESCq Z anything Print .I anything and then restore the horizontal and vertical position; .I anything may not contain tabs or leaders. . .PD .P The escape sequences .esc e , .esc . , .esc \[dq] , .esc $ , .esc * , .esc a , .esc n , .esc t , .esc g , and .escarg \& newline are interpreted in copy mode. . .P Escape sequences starting with .esc ( or .esc [ do not represent single character escape sequences, but introduce escape names with two or more characters. . .P If a backslash is followed by a character that does not constitute a defined escape sequence, the backslash is silently ignored and the character maps to itself. . . .\" -------------------------------------------------------------------- .SS "Special Characters" .\" -------------------------------------------------------------------- . [Note: `Special Characters' is a misnomer; those entities are (output) glyphs, not (input) characters.] . .P Common special characters are predefined by escape sequences of the form .BI \[rs]( xy with characters .I x and .IR y . . Some of these exist in the usual font while most of them are only available in the special font. . Below you can find a selection of the most important glyphs; a complete list can be found in .BR groff_char (@MAN7EXT@). .RS .P .PD 0 . .TP .ESC (bu Bullet sign .TP .ESC (co Copyright .TP .ESC (ct Cent .TP .ESC (dd Double dagger .TP .ESC (de Degree .TP .ESC (dg Dagger .TP .ESC (rq Printable double quote .TP .ESC (em Em-dash .TP .ESC (hy Hyphen .TP .ESC (rg Registered sign .TP .ESC (rs Printable backslash character .TP .ESC (sc Section sign .TP .ESC (ul Underline character .TP .ESC (== Identical .TP .ESC (>= Larger or equal .TP .ESC (<= Less or equal .TP .ESC (!= Not equal .TP .ESC (-> Right arrow .TP .ESC (<- Left arrow .TP .ESC (+- Plus-minus sign .PD .RE . . .\" -------------------------------------------------------------------- .SS "Strings" .\" -------------------------------------------------------------------- . Strings are defined by the .request ds request and can be retrieved by the .esc * escape sequence. . .P Strings share their name space with macros. . So strings and macros without arguments are roughly equivalent; it is possible to call a string like a macro and vice-versa, but this often leads to unpredictable results. . The following string is the only one predefined in groff. . .TPx .STRING .T The name of the current output device as specified by the .option \-T command line option. . . .\" -------------------------------------------------------------------- .SH REGISTERS .\" -------------------------------------------------------------------- . Registers are variables that store a value. In groff, most registers store numerical values (see section .B NUMERICAL EXPRESSIONS above), but some can also hold a string value. . .P Each register is given a name. Arbitrary registers can be defined and set with the .request nr request. . .P The value stored in a register can be retrieved by the escape sequences introduced by .esc n . . .P Most useful are predefined registers. . In the following the notation .I name is used to refer to .register name to make clear that we speak about registers. . Please keep in mind that the .esc[] n "" decoration is not part of the register name. . . .\" -------------------------------------------------------------------- .SS "Read-only Registers" .\" -------------------------------------------------------------------- . The following registers have predefined values that should not be modified by the user (usually, registers starting with a dot are read-only). . Mostly, they provide information on the current settings or store results from request calls. . .P .PD 0 . .TPx .REG $$ The process ID of .BR troff . . .TPx .REG .$ Number of arguments in the current macro or string. . .TPx .REG .a Post-line extra line-space most recently utilized using .esc x . . .TPx .REG .A Set to\~1 in .B troff if option .option \-A is used; always\~1 in .BR nroff . . .TPx .REG .b The emboldening offset while .request .bd is active. . .TPx .REG .br Within a macro, set to\~1 if macro called with the `normal' control character, and to\~0 otherwise. . .TPx .REG .c Current input line number. . .TPx .REG .C 1\~if compatibility mode is in effect, 0\~otherwise. . .TPx .REG .cdp The depth of the last glyph added to the current environment. . It is positive if the glyph extends below the baseline. . .TPx .REG .ce The number of lines remaining to be centered, as set by the .request ce request. . .TPx .REG .cht The height of the last glyph added to the current environment. . It is positive if the glyph extends above the baseline. . .TPx .REG .color 1\~if colors are enabled, 0\~otherwise. . .TPx .REG .csk The skew of the last glyph added to the current environment. . The skew of a glyph is how far to the right of the center of a glyph the center of an accent over that glyph should be placed. . .TPx .REG .d Current vertical place in current diversion; equal to .register nl . . .TPx .REG .ev The name or number of the current environment (string-valued). . .TPx .REG .f Current font number. . .TPx .REG .F The name of the current input file (string-valued). . .TPx .REG .fam The current font family (string-valued). . .TPx .REG .fn The current (internal) real font name (string-valued). . .TPx .REG .fp The number of the next free font position. . .TPx .REG .g Always 1 in GNU troff. . Macros should use it to test if running under groff. . .TPx .REG .h Text base-line high-water mark on current page or diversion. . .TPx .REG .H Available horizontal resolution in basic units. . .TPx .REG .height The current font height as set with .request \[rs]H . . .TPx .REG .hla The current hyphenation language as set by the .request hla request. . .TPx .REG .hlc The number of immediately preceding consecutive hyphenated lines. . .TPx .REG .hlm The maximum allowed number of consecutive hyphenated lines, as set by the .request hlm request. . .TPx .REG .hy The current hyphenation flags (as set by the .request hy request). . .TPx .REG .hym The current hyphenation margin (as set by the .request hym request). . .TPx .REG .hys The current hyphenation space (as set by the .request hys request). . .TPx .REG .i Current indentation. . .TPx .REG .in The indentation that applies to the current output line. . .TPx .REG .int Positive if last output line contains .esc c . . .TPx .REG .j The current adjustment mode. It can be stored and used to set adjustment. (n\ =\ 1, b\ =\ 1, l\ =\ 0, r\ =\ 5, c\ =\ 3). . .TPx .REG .k The current horizontal output position (relative to the current indentation). .TPx .REG .kern 1\~if pairwise kerning is enabled, 0\~otherwise. . .TPx .REG .l Current line length. . .TPx .REG .L The current line spacing setting as set by .request .ls . . .TPx .REG .lg The current ligature mode (as set by the .request lg request). . .TPx .REG .linetabs The current line-tabs mode (as set by the .request linetabs request). . .TPx .REG .ll The line length that applies to the current output line. . .TPx .REG .lt The title length (as set by the .request lt request). . .TPx .REG .m The current drawing color (string-valued). . .TPx .REG .M The current background color (string-valued). . .TPx .REG .n Length of text portion on previous output line. . .TPx .REG .ne The amount of space that was needed in the last .request ne request that caused a trap to be sprung. . Useful in conjunction with .register .trunc . . .TPx .REG .ns 1\~if in no-space mode, 0\~otherwise. . .TPx .REG .o Current page offset. . .TPx .REG .O The suppression nesting level (see .esc O ). . .TPx .REG .p Current page length. . .TPx .REG .P 1\~if the current page is being printed, 0\~otherwise (as determined by the .option \-o command line option). . .TPx .REG .pe 1\~during page ejection, 0\~otherwise. . .TPx .REG .pn The number of the next page: either the value set by a .request pn request, or the number of the current page plus\ 1. . .TPx .REG .ps The current point size in scaled points. . .TPx .REG .psr The last-requested point size in scaled points. . .TPx .REG .pvs The current post-vertical line spacing. . .TPx .REG .R The number of unused number registers. Always 10000 in GNU troff. . .TPx .REG .rj The number of lines to be right-justified as set by the .request rj request. . .TPx .REG .s Current point size as a decimal fraction. . .TPx .REG .slant The slant of the current font as set with .request \[rs]S . . .TPx .REG .sr The last requested point size in points as a decimal fraction (string-valued). . .TPx .REG .ss The value of the parameters set by the first argument of the .request ss request. . .TPx .REG .sss The value of the parameters set by the second argument of the .request ss request. . .TPx .REG .sty The current font style (string-valued). . .TPx .REG .t Vertical distance to the next trap. . .TPx .REG .T Set to\~1 if option .option \-T is used. . .TPx .REG .tabs A string representation of the current tab settings suitable for use as an argument to the .request ta request. . .TPx .REG .trunc The amount of vertical space truncated by the most recently sprung vertical position trap, or, if the trap was sprung by a .request ne request, minus the amount of vertical motion produced by .request .ne . . Useful in conjunction with the .register .ne . . .TPx .REG .u Equal to 1 in fill mode and 0 in no-fill mode. . .TPx .REG .U Equal to 1 in safer mode and 0 in unsafe mode. . .TPx .REG .v Current vertical line spacing. . .TPx .REG .V Available vertical resolution in basic units. . .TPx .REG .vpt 1\~if vertical position traps are enabled, 0\~otherwise. . .TPx .REG .w Width of previous glyph. . .TPx .REG .warn The sum of the number codes of the currently enabled warnings. . .TPx .REG .x The major version number. . .TPx .REG .y The minor version number. . .TPx .REG .Y The revision number of groff. . .TPx .REG .z Name of current diversion. . .TPx .REG .zoom Zoom factor for current font (in multiples of 1/1000th; zero if no magnification). .PD . . .\" -------------------------------------------------------------------- .SS "Writable Registers" .\" -------------------------------------------------------------------- . The following registers can be read and written by the user. They have predefined default values, but these can be modified for customizing a document. . .P .PD 0 .TPx .REG % Current page number. . .TPx .REG c. Current input line number. . .TPx .REG ct Character type (set by width function .esc w ). . .TPx .REG dl Maximal width of last completed diversion. . .TPx .REG dn Height of last completed diversion. . .TPx .REG dw Current day of week (1\(en7). . .TPx .REG dy Current day of month (1\(en31). . .TPx .REG hours The number of hours past midnight. . Initialized at start-up. . .TPx .REG hp Current horizontal position at input line. . .TPx .REG llx Lower left x-coordinate (in PostScript units) of a given PostScript image (set by .request .psbb ). . .TPx .REG lly Lower left y-coordinate (in PostScript units) of a given PostScript image (set by .request .psbb ). . .TPx .REG ln Output line number. . .TPx .REG lsn The number of leading spaces of an input line. . .TPx .REG lss The horizontal space corresponding to the leading spaces of an input line. . .TPx .REG minutes The number of minutes after the hour. . Initialized at start-up. . .TPx .REG mo Current month (1\(en12). . .TPx .REG nl Vertical position of last printed text base-line. . .TPx .REG opmaxx .TPx .REG opmaxy .TPx .REG opminx .TPx .REG opminy These four registers mark the top left and bottom right hand corners of a box which encompasses all written glyphs. They are reset to \-1 by .escarg O 0 or .escarg O 1 . . .TPx .REG rsb Like .register sb , but takes account of the heights and depths of glyphs. . .TPx .REG rst Like .register st , but takes account of the heights and depths of glyphs. . .TPx .REG sb Depth of string below base line (generated by width function .esc w ). . .TPx .REG seconds The number of seconds after the minute. . Initialized at start-up. . .TPx .REG skw Right skip width from the center of the last glyph in the .esc w argument. . .TPx .REG slimit If greater than 0, the maximum number of objects on the input stack. . If \[<=]0 there is no limit, i.e., recursion can continue until virtual memory is exhausted. . .TPx .REG ssc The amount of horizontal space (possibly negative) that should be added to the last glyph before a subscript (generated by width function .esc w ). . .TPx .REG st Height of string above base line (generated by width function .esc w ). . .TPx .REG systat The return value of the .I system() function executed by the last .request sy request. . .TPx .REG urx Upper right x-coordinate (in PostScript units) of a given PostScript image (set by .request .psbb ). . .TPx .REG ury Upper right y-coordinate (in PostScript units) of a given PostScript image (set by .request .psbb ). . .TPx .REG year The current year (year 2000 compliant). . .TPx .REG yr Current year minus 1900. . For Y2K compliance use .register year instead. . .PD . . .\" -------------------------------------------------------------------- .SH COMPATIBILITY .\" -------------------------------------------------------------------- . The differences of the groff language in comparison to classical troff as defined by .I [CSTR\~#54] are documented in .BR groff_diff (@MAN7EXT@). . .P The groff system provides a compatibility mode, see .BR groff (@MAN1EXT@) on how to invoke this. . . .\" -------------------------------------------------------------------- .SH BUGS .\" -------------------------------------------------------------------- . Report bugs to the .MT bug-groff@gnu.org groff bug mailing list .ME . Include a complete, self-contained example that will allow the bug to be reproduced, and say which version of groff you are using. . . .\" -------------------------------------------------------------------- .SH AUTHORS .\" -------------------------------------------------------------------- . Copyright (C) 2000\(en2010, 2012 Free Software Foundation, Inc. . .P This document is distributed under the terms of the FDL (GNU Free Documentation License) version 1.3 or later. . You should have received a copy of the FDL on your system, it is also available on-line at the .UR http://\:www.gnu.org/\:copyleft/\:fdl.html GNU copyleft site .UE . . .P This document is part of .IR groff , the GNU roff distribution. . It was written by .MT groff-bernd.warken-72@web.de Bernd Warken .ME ; it is maintained by .MT wl@gnu.org Werner Lemberg .ME . . . .\" -------------------------------------------------------------------- .SH "SEE ALSO" .\" -------------------------------------------------------------------- . .P The main source of information for the groff language is the .B groff .BR info (1) file. . Besides the gory details, it contains many examples. . .TP .BR groff (@MAN1EXT@) the usage of the groff program and pointers to the documentation and availability of the groff system. . .TP .BR groff_diff (@MAN7EXT@) the differences of the groff language as compared to classical roff. . This is the authoritative document for the predefined language elements that are specific to groff. . .TP .BR groff_char (@MAN7EXT@) the predefined groff special characters (glyphs). . .TP .BR groff_font (@MAN5EXT@) the specification of fonts and the DESC file. . .TP .BR roff (@MAN7EXT@) the history of roff, the common parts shared by all roff systems, and pointers to further documentation. . .TP .I [CSTR\~#54] .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:54.ps.gz Nroff/\:Troff User's Manual by Ossanna & Kernighan .UE \[em] the bible for classical troff. . .cp \n[groff_C] . .\" -------------------------------------------------------------------- .\" Emacs Setup .\" -------------------------------------------------------------------- . .\" Local Variables: .\" mode: nroff .\" End: groff-1.22.2/man/groff_char.man0000644000175000001440000010331012104714260014605 0ustar wlusers.\" t .TH GROFF_CHAR @MAN7EXT@ "@MDATE@" "@VERSION@" .SH NAME groff_char \- groff glyph names .SH DESCRIPTION .\" The lines above were designed to satisfy `apropos'. . .\" For best results, format this document with `groff' (GNU roff). . . .\" -------------------------------------------------------------------- .\" Legal terms .\" -------------------------------------------------------------------- . .ig groff_char(7) This file is part of groff (GNU roff). File position: /man/groff_char.man Copyright (C) 1989-2004, 2006-2009, 2012 Free Software Foundation, Inc. written by Werner Lemberg with additions by Bernd Warken revised to use real tables by Eric S. Raymond Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being this .ig-section and AUTHOR, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the Free Documentation License is included as a file called FDL in the main directory of the groff source package. .. .ig A copy of the GNU Free Documentation License is also available in this Debian package as /usr/share/doc/groff/copyright. .. . .\" -------------------------------------------------------------------- .\" Setup .\" -------------------------------------------------------------------- . .do nr groff_char_C \n[.C] .cp 0 . .\" groff only .\".if \n(.g .ne 2v .\".if \n(.g .sv 2v . .ds aq \(aq . .\" non-groff .if !\n(.g .if '\(aq'' .ds aq \' . .nr Sp 2n . .do if !r ECFONTS .do fspecial CR R . . .\" -------------------------------------------------------------------- .\" .SH DESCRIPTION .\" -------------------------------------------------------------------- . This manual page lists the standard .B groff glyph names and the default input mapping, \%latin1. . The glyphs in this document look different depending on which output device was chosen (with option .B \-T for the .BR man (1) program or the roff formatter). . Glyphs not available for the device that is being used to print or view this manual page are marked with .ie \n(.g `(N/A)'; the device currently used is `\*(.T'. .el `(N/A)'. . . .P In the actual version, .B groff provides only \%8-bit characters for direct input and named entities for further glyphs. . On ASCII platforms, input character codes in the range 0 to 127 (decimal) represent the usual \%7-bit ASCII characters, while codes between 127 and 255 are interpreted as the corresponding characters in the .I \%latin1 .RI ( \%ISO-8859-1 ) code set by default. . This mapping is contained in the file \f(CWlatin1.tmac\fP and can be changed by loading a different input encoding. . Note that some of the input characters are reserved by .BR groff , either for internal use or for special input purposes. . On EBCDIC platforms, only code page .I cp1047 is supported (which contains the same characters as \%latin1; the input encoding file is called \f(CWcp1047.tmac\fP). . Again, some input characters are reserved for internal and special purposes. . . .P All roff systems provide the concept of named glyphs. . In traditional roff systems, only names of length\ 2 were used, while groff also provides support for longer names. . It is strongly suggested that only named glyphs are used for all character representations outside of the printable \%7-bit ASCII range. . . .P Some of the predefined groff escape sequences (with names of length\ 1) also produce single glyphs; these exist for historical reasons or are printable versions of syntactical characters. . They include `\f(CW\e\e\fP', `\f(CW\e\'\fP', `\f(CW\e`\fP', `\f(CW\e-\fP', `\f(CW\e.\fP', and `\f(CW\ee\fP'; see .BR groff (@MAN7EXT@). . . .P In groff, all of these different types of characters and glyphs can be tested positively with the `\f(CW.if\ c\fP' conditional. . . .\" -------------------------------------------------------------------- .SH REFERENCE .\" -------------------------------------------------------------------- . In this section, the glyphs in groff are specified in tabular form. . The meaning of the columns is as follows. . . .TP .I "Output" shows how the glyph is printed for the current device; although this can have quite a different shape on other devices, it always represents the same glyph. . . .TP .I "Input" specifies how the glyph is input either directly by a key on the keyboard, or by a groff escape sequence. . . .TP .I "Code" applies to glyphs which can be input with a single character, and gives the ISO \%latin1 decimal code of that input character. . Note that this code is equivalent to the lowest 256 Unicode characters, including \%7-bit ASCII in the range 0 to\ 127. . . .TP .I "PostScript" gives the usual PostScript name of the glyph. . . .TP .I "Unicode" is the glyph name used in composite glyph names. . . . .\" -------------------------------------------------------------------- .SS "7-bit Character Codes 32\(en126" .\" -------------------------------------------------------------------- . These are the basic glyphs having 7-bit ASCII code values assigned. . They are identical to the printable characters of the character standards \%ISO-8859-1 (\%latin1) and Unicode (range .IR "Basic Latin" ). . The glyph names used in composite glyph names are `u0020' up to `u007E'. . . .P Note that input characters in the range \%0\-31 and character 127 are .I not printable characters. . Most of them are invalid input characters for .B groff anyway, and the valid ones have special meaning. . For EBCDIC, the printable characters are in the range \%66\-255. . . .TP 48\-57 Decimal digits 0 to\ 9 (print as themselves). . . .TP 65\-90 Upper case letters A\-Z (print as themselves). . . .TP 97\-122 Lower case letters a\(enz (print as themselves). . . .P Most of the remaining characters not in the just described ranges print as themselves; the only exceptions are the following characters: . . .TP .B \` the ISO \%latin1 `Grave Accent' (code\ 96) prints as `, a left single quotation mark; the original character can be obtained with `\f(CW\e`\fP'. . . .TP .B \*(aq the ISO \%latin1 `Apostrophe' (code\ 39) prints as ', a right single quotation mark; the original character can be obtained with `\f(CW\e(aq\fP'. . . .TP .B - the ISO \%latin1 `Hyphen, Minus Sign' (code\ 45) prints as a hyphen; a minus sign can be obtained with `\f(CW\e-\fP'. . . .TP .B ~ the ISO \%latin1 `Tilde' (code\ 126) is reduced in size to be usable as a diacritic; a larger glyph can be obtained with `\f(CW\e(ti\fP'. . . .TP .B ^ the ISO \%latin1 `Circumflex Accent' (code\ 94) is reduced in size to be usable as a diacritic; a larger glyph can be obtained with `\f(CW\e(ha\fP'. . . .P .TS l l l l l l. Output Input Code PostScript Unicode Notes _ \[char33] \[char33] 33 exclam u0021 \[char34] \[char34] 34 quotedbl u0022 \[char35] \[char35] 35 numbersign u0023 \[char36] \[char36] 36 dollar u0024 \[char37] \[char37] 37 percent u0025 \[char38] \[char38] 38 ampersand u0026 \[char39] \[char39] 39 quoteright u0027 \[char40] \[char40] 40 parenleft u0028 \[char41] \[char41] 41 parenright u0029 \[char42] \[char42] 42 asterisk u002A \[char43] \[char43] 43 plus u002B \[char44] \[char44] 44 comma u002C \[char45] \[char45] 45 hyphen u2010 \[char46] \[char46] 46 period u002E \[char47] \[char47] 47 slash u002F \[char58] \[char58] 58 colon u003A \[char59] \[char59] 59 semicolon u003B \[char60] \[char60] 60 less u003C \[char61] \[char61] 61 equal u003D \[char62] \[char62] 62 greater u003E \[char63] \[char63] 63 question u003F \[char64] \[char64] 64 at u0040 \[char91] \[char91] 91 bracketleft u005B \[char92] \[char92] 92 backslash u005C \[char93] \[char93] 93 bracketright u005D \[char94] \[char94] 94 circumflex u005E circumflex accent \[char95] \[char95] 95 underscore u005F \[char96] \[char96] 96 quoteleft u0060 \[char123] \[char123] 123 braceleft u007B \[char124] \[char124] 124 bar u007C \[char125] \[char125] 125 braceright u007D \[char126] \[char126] 126 tilde u007E tilde accent .TE . . .\" -------------------------------------------------------------------- .SS "8-bit Character Codes 160 to 255" .\" -------------------------------------------------------------------- . They are interpreted as printable characters according to the .I latin1 .RI ( ISO-8859-1 ) code set, being identical to the Unicode range .IR "Latin-1 Supplement" . . . .P Input characters in range 128\-159 (on non-EBCDIC hosts) are not printable characters. . . .TP 160 . the ISO \%latin1 .I no-break space is mapped to `\f(CW\e~\fP', the stretchable space character. . . .TP 173 . the soft hyphen control character. . .B groff never uses this character for output (thus it is omitted in the table below); the input character\ 173 is mapped onto `\f(CW\e%\fP'. . . .P The remaining ranges (\%161\-172, \%174\-255) are printable characters that print as themselves. . Although they can be specified directly with the keyboard on systems with a \%latin1 code page, it is better to use their glyph names; see next section. . .P .TS l l l l l l. Output Input Code PostScript Unicode Notes _ \[char161] \[char161] 161 exclamdown u00A1 inverted exclamation mark \[char162] \[char162] 162 cent u00A2 \[char163] \[char163] 163 sterling u00A3 \[char164] \[char164] 164 currency u00A4 \[char165] \[char165] 165 yen u00A5 \[char166] \[char166] 166 brokenbar u00A6 \[char167] \[char167] 167 section u00A7 \[char168] \[char168] 168 dieresis u00A8 \[char169] \[char169] 169 copyright u00A9 \[char170] \[char170] 170 ordfeminine u00AA \[char171] \[char171] 171 guillemotleft u00AB \[char172] \[char172] 172 logicalnot u00AC \[char174] \[char174] 174 registered u00AE \[char175] \[char175] 175 macron u00AF \[char176] \[char176] 176 degree u00B0 \[char177] \[char177] 177 plusminus u00B1 \[char178] \[char178] 178 twosuperior u00B2 \[char179] \[char179] 179 threesuperior u00B3 \[char180] \[char180] 180 acute u00B4 acute accent \[char181] \[char181] 181 mu u00B5 micro sign \[char182] \[char182] 182 paragraph u00B6 \[char183] \[char183] 183 periodcentered u00B7 \[char184] \[char184] 184 cedilla u00B8 \[char185] \[char185] 185 onesuperior u00B9 \[char186] \[char186] 186 ordmasculine u00BA \[char187] \[char187] 187 guillemotright u00BB \[char188] \[char188] 188 onequarter u00BC \[char189] \[char189] 189 onehalf u00BD \[char190] \[char190] 190 threequarters u00BE \[char191] \[char191] 191 questiondown u00BF \[char192] \[char192] 192 Agrave u0041_0300 \[char193] \[char193] 193 Aacute u0041_0301 \[char194] \[char194] 194 Acircumflex u0041_0302 \[char195] \[char195] 195 Atilde u0041_0303 \[char196] \[char196] 196 Adieresis u0041_0308 \[char197] \[char197] 197 Aring u0041_030A \[char198] \[char198] 198 AE u00C6 \[char199] \[char199] 199 Ccedilla u0043_0327 \[char200] \[char200] 200 Egrave u0045_0300 \[char201] \[char201] 201 Eacute u0045_0301 \[char202] \[char202] 202 Ecircumflex u0045_0302 \[char203] \[char203] 203 Edieresis u0045_0308 \[char204] \[char204] 204 Igrave u0049_0300 \[char205] \[char205] 205 Iacute u0049_0301 \[char206] \[char206] 206 Icircumflex u0049_0302 \[char207] \[char207] 207 Idieresis u0049_0308 \[char208] \[char208] 208 Eth u00D0 \[char209] \[char209] 209 Ntilde u004E_0303 \[char210] \[char210] 210 Ograve u004F_0300 \[char211] \[char211] 211 Oacute u004F_0301 \[char212] \[char212] 212 Ocircumflex u004F_0302 \[char213] \[char213] 213 Otilde u004F_0303 \[char214] \[char214] 214 Odieresis u004F_0308 \[char215] \[char215] 215 multiply u00D7 \[char216] \[char216] 216 Oslash u00D8 \[char217] \[char217] 217 Ugrave u0055_0300 \[char218] \[char218] 218 Uacute u0055_0301 \[char219] \[char219] 219 Ucircumflex u0055_0302 \[char220] \[char220] 220 Udieresis u0055_0308 \[char221] \[char221] 221 Yacute u0059_0301 \[char222] \[char222] 222 Thorn u00DE \[char223] \[char223] 223 germandbls u00DF \[char224] \[char224] 224 agrave u0061_0300 \[char225] \[char225] 225 aacute u0061_0301 \[char226] \[char226] 226 acircumflex u0061_0302 \[char227] \[char227] 227 atilde u0061_0303 \[char228] \[char228] 228 adieresis u0061_0308 \[char229] \[char229] 229 aring u0061_030A \[char230] \[char230] 230 ae u00E6 \[char231] \[char231] 231 ccedilla u0063_0327 \[char232] \[char232] 232 egrave u0065_0300 \[char233] \[char233] 233 eacute u0065_0301 \[char234] \[char234] 234 ecircumflex u0065_0302 \[char235] \[char235] 235 edieresis u0065_0308 \[char236] \[char236] 236 igrave u0069_0300 \[char237] \[char237] 237 iacute u0069_0301 \[char238] \[char238] 238 icircumflex u0069_0302 \[char239] \[char239] 239 idieresis u0069_0308 \[char240] \[char240] 240 eth u00F0 \[char241] \[char241] 241 ntilde u006E_0303 \[char242] \[char242] 242 ograve u006F_0300 \[char243] \[char243] 243 oacute u006F_0301 \[char244] \[char244] 244 ocircumflex u006F_0302 \[char245] \[char245] 245 otilde u006F_0303 \[char246] \[char246] 246 odieresis u006F_0308 \[char247] \[char247] 247 divide u00F7 \[char248] \[char248] 248 oslash u00F8 \[char249] \[char249] 249 ugrave u0075_0300 \[char250] \[char250] 250 uacute u0075_0301 \[char251] \[char251] 251 ucircumflex u0075_0302 \[char252] \[char252] 252 udieresis u0075_0308 \[char253] \[char253] 253 yacute u0079_0301 \[char254] \[char254] 254 thorn u00FE \[char255] \[char255] 255 ydieresis u0079_0308 .TE . . .\" -------------------------------------------------------------------- .SS "Named Glyphs" .\" -------------------------------------------------------------------- . Glyph names can be embedded into the document text by using escape sequences. . .BR groff (@MAN7EXT@) describes how these escape sequences look. . Glyph names can consist of quite arbitrary characters from the ASCII or \%latin1 code set, not only alphanumeric characters. . Here some examples: . .TP \f(CW\e(\fP\fIch\fP A glyph having the 2-character name .IR ch . . .TP \f(CW\e[\fP\,\fIchar_name\/\fP\f(CW]\fP A glyph having the name .I char_name (having length 1, 2, 3, .\|.\|.). . Note that `\fIc\fP' is not the same as `\f(CW\e[\fP\,\fIc\/\fP\f(CW]\fP' (\,\fIc\fP\ a single character): The latter is internally mapped to glyph name `\e\fIc\fP'. . By default, groff defines a single glyph name starting with a backslash, namely \%`\e-', which can be either accessed as `\f(CW\e\-\fP' or `\f(CW\e[-]\fP'. . .TP \f(CW\e[\fP\,\fIbase_glyph composite_1 composite_2 .\|.\|.\/\fP\f(CW]\fP A composite glyph; see below for a more detailed description. . . .P In groff, each \%8-bit input character can also referred to by the construct `\f(CW\e[char\fP\,\fIn\/\fP\f(CW]\fP' where .I n is the decimal code of the character, a number between 0 and\ 255 without leading zeros (those entities are .I not glyph names). . They are normally mapped onto glyphs using the \f(CW.trin\fP request. . Another special convention is the handling of glyphs with names directly derived from a Unicode code point; this is discussed below. . Moreover, new glyph names can be created by the \f(CW.char\fP request; see .BR groff (@MAN7EXT@). . .P In the following, a plus sign in the `Notes' column indicates that this particular glyph name appears in the PS version of the original troff documentation, CSTR\ 54. . .P Entries marked with `***' denote glyphs for mathematical purposes (mainly used for DVI output). Normally, such glyphs have metrics which make them unusable in normal text. . . .P .TS l l l l l. Output Input PostScript Unicode Notes _ \[-D] \e[-D] Eth u00D0 uppercase eth \[Sd] \e[Sd] eth u00F0 lowercase eth \[TP] \e[TP] Thorn u00DE uppercase thorn \[Tp] \e[Tp] thorn u00FE lowercase thorn \[ss] \e[ss] germandbls u00DF German sharp s .TE . .P .I Ligatures and Other Latin Glyphs .P .TS l l l l l. Output Input PostScript Unicode Notes _ \[ff] \e[ff] ff u0066_0066 ff ligature + \[fi] \e[fi] fi u0066_0069 fi ligature + \[fl] \e[fl] fl u0066_006C fl ligature + \[Fi] \e[Fi] ffi u0066_0066_0069 ffi ligature + \[Fl] \e[Fl] ffl u0066_0066_006C ffl ligature + \[/L] \e[/L] Lslash u0141 (Polish) \[/l] \e[/l] lslash u0142 (Polish) \[/O] \e[/O] Oslash u00D8 (Scandinavian) \[/o] \e[/o] oslash u00F8 (Scandinavian) \[AE] \e[AE] AE u00C6 \[ae] \e[ae] ae u00E6 \[OE] \e[OE] OE u0152 \[oe] \e[oe] oe u0153 \[IJ] \e[IJ] IJ u0132 (Dutch) \[ij] \e[ij] ij u0133 (Dutch) \[.i] \e[.i] dotlessi u0131 (Turkish) \[.j] \e[.j] dotlessj u0237 j without a dot .TE . .P .I Accented Characters .P .TS l l l l l. Output Input PostScript Unicode Notes _ \['A] \e['A] Aacute u0041_0301 \['C] \e['C] Cacute u0043_0301 \['E] \e['E] Eacute u0045_0301 \['I] \e['I] Iacute u0049_0301 \['O] \e['O] Oacute u004F_0301 \['U] \e['U] Uacute u0055_0301 \['Y] \e['Y] Yacute u0059_0301 \['a] \e['a] aacute u0061_0301 \['c] \e['c] cacute u0063_0301 \['e] \e['e] eacute u0065_0301 \['i] \e['i] iacute u0069_0301 \['o] \e['o] oacute u006F_0301 \['u] \e['u] uacute u0075_0301 \['y] \e['y] yacute u0079_0301 \[:A] \e[:A] Adieresis u0041_0308 A with umlaut \[:E] \e[:E] Edieresis u0045_0308 \[:I] \e[:I] Idieresis u0049_0308 \[:O] \e[:O] Odieresis u004F_0308 \[:U] \e[:U] Udieresis u0055_0308 \[:Y] \e[:Y] Ydieresis u0059_0308 \[:a] \e[:a] adieresis u0061_0308 \[:e] \e[:e] edieresis u0065_0308 \[:i] \e[:i] idieresis u0069_0308 \[:o] \e[:o] odieresis u006F_0308 \[:u] \e[:u] udieresis u0075_0308 \[:y] \e[:y] ydieresis u0079_0308 \[^A] \e[^A] Acircumflex u0041_0302 \[^E] \e[^E] Ecircumflex u0045_0302 \[^I] \e[^I] Icircumflex u0049_0302 \[^O] \e[^O] Ocircumflex u004F_0302 \[^U] \e[^U] Ucircumflex u0055_0302 \[^a] \e[^a] acircumflex u0061_0302 \[^e] \e[^e] ecircumflex u0065_0302 \[^i] \e[^i] icircumflex u0069_0302 \[^o] \e[^o] ocircumflex u006F_0302 \[^u] \e[^u] ucircumflex u0075_0302 \[`A] \e[`A] Agrave u0041_0300 \[`E] \e[`E] Egrave u0045_0300 \[`I] \e[`I] Igrave u0049_0300 \[`O] \e[`O] Ograve u004F_0300 \[`U] \e[`U] Ugrave u0055_0300 \[`a] \e[`a] agrave u0061_0300 \[`e] \e[`e] egrave u0065_0300 \[`i] \e[`i] igrave u0069_0300 \[`o] \e[`o] ograve u006F_0300 \[`u] \e[`u] ugrave u0075_0300 \[~A] \e[~A] Atilde u0041_0303 \[~N] \e[~N] Ntilde u004E_0303 \[~O] \e[~O] Otilde u004F_0303 \[~a] \e[~a] atilde u0061_0303 \[~n] \e[~n] ntilde u006E_0303 \[~o] \e[~o] otilde u006F_0303 \[vS] \e[vS] Scaron u0053_030C \[vs] \e[vs] scaron u0073_030C \[vZ] \e[vZ] Zcaron u005A_030C \[vz] \e[vz] zcaron u007A_030C \[,C] \e[,C] Ccedilla u0043_0327 \[,c] \e[,c] ccedilla u0063_0327 \[oA] \e[oA] Aring u0041_030A \[oa] \e[oa] aring u0061_030A .TE . .P .I Accents .P The .B composite request is used to map most of the accents to non-spacing glyph names; the values given in parentheses are the original (spacing) ones. . .P .TS l l l l l. Output Input PostScript Unicode Notes _ \[a"] \e[a"] hungarumlaut u030B (u02DD) (Hungarian) \[a-] \e[a-] macron u0304 (u00AF) \[a.] \e[a.] dotaccent u0307 (u02D9) \[a^] \e[a^] circumfle u0302 (u005E) \[aa] \e[aa] acute u0301 (u00B4) + \[ga] \e[ga] grave u0300 (u0060) + \[ab] \e[ab] breve u0306 (u02D8) \[ac] \e[ac] cedilla u0327 (u00B8) \[ad] \e[ad] dieresis u0308 (u00A8) umlaut \[ah] \e[ah] caron u030C (u02C7) \[ao] \e[ao] ring u030A (u02DA) circle \[a~] \e[a~] tilde u0303 (u007E) \[ho] \e[ho] ogonek u0328 (u02DB) hook \[ha] \e[ha] asciicircum u005E (spacing) \[ti] \e[ti] asciitilde u007E (spacing) .TE . .P .I Quotes .P .TS l l l l l. Output Input PostScript Unicode Notes _ \[Bq] \e[Bq] quotedblbase u201E low double comma quote \[bq] \e[bq] quotesinglbase u201A low single comma quote \[lq] \e[lq] quotedblleft u201C \[rq] \e[rq] quotedblright u201D \[oq] \e[oq] quoteleft u2018 single open quote \[cq] \e[cq] quoteright u2019 single closing quote \[aq] \e[aq] quotesingle u0027 apostrophe quote (ASCII 39) \[dq] \e[dq] quotedbl u0022 double quote (ASCII 34) \[Fo] \e[Fo] guillemotleft u00AB \[Fc] \e[Fc] guillemotright u00BB \[fo] \e[fo] guilsinglleft u2039 \[fc] \e[fc] guilsinglright u203A .TE . .P .I Punctuation .P .TS l l l l l. Output Input PostScript Unicode Notes _ \[r!] \e[r!] exclamdown u00A1 \[r?] \e[r?] questiondown u00BF \[em] \e[em] emdash u2014 + \[en] \e[en] endash u2013 \[hy] \e[hy] hyphen u2010 + .TE . .P .I Brackets .P The extensible bracket pieces are font-invariant glyphs. . In classical troff only one glyph was available to vertically extend brackets, braces, and parentheses: `bv'. . We map it rather arbitrarily to u23AA. . .P Note that not all devices contain extensible bracket pieces which can be piled up with `\f(CW\eb\fP' due to the restrictions of the escape's piling algorithm. . A general solution to build brackets out of pieces is the following macro: . .P .nf .RS .ft C \&.\e" Make a pile centered vertically 0.5em \&.\e" above the baseline. \&.\e" The first argument is placed at the top. \&.\e" The pile is returned in string `pile' \&.eo \&.de pile-make \&. nr pile-wd 0 \&. nr pile-ht 0 \&. ds pile-args \&. \&. nr pile-# \en[.$] \&. while \en[pile-#] \e{\e \&. nr pile-wd (\en[pile-wd] >? \ew'\e$[\en[pile-#]]') \&. nr pile-ht +(\en[rst] - \en[rsb]) \&. as pile-args \ev'\en[rsb]u'\e" \&. as pile-args \eZ'\e$[\en[pile-#]]'\e" \&. as pile-args \ev'-\en[rst]u'\e" \&. nr pile-# -1 \&. \e} \&. \&. ds pile \ev'(-0.5m + (\en[pile-ht]u / 2u))'\e" \&. as pile \e*[pile-args]\e" \&. as pile \ev'((\en[pile-ht]u / 2u) + 0.5m)'\e" \&. as pile \eh'\en[pile-wd]u'\e" \&.. \&.ec .ft .RE .fi . .P Another complication is the fact that some glyphs which represent bracket pieces in original troff can be used for other mathematical symbols also, for example `lf' and `rf' which provide the `floor' operator. . Other devices (most notably for DVI output) don't unify such glyphs. . For this reason, the four glyphs `lf', `rf', `lc', and `rc' are not unified with similarly looking bracket pieces. . In .BR groff , only glyphs with long names are guaranteed to pile up correctly for all devices (provided those glyphs exist). . .P .TS expand; l l l l l. Output Input PostScript Unicode Notes _ \[lB] \e[lB] bracketleft u005B \[rB] \e[rB] bracketright u005D \[lC] \e[lC] braceleft u007B \[rC] \e[rC] braceright u007D \[la] \e[la] angleleft u27E8 left angle bracket \[ra] \e[ra] angleright u27E9 right angle bracket \[bv] \e[bv] braceex u23AA vertical extension *** + \[braceex] \e[braceex] braceex u23AA \[bracketlefttp] \e[bracketlefttp] bracketlefttp u23A1 \[bracketleftbt] \e[bracketleftbt] bracketleftbt u23A3 \[bracketleftex] \e[bracketleftex] bracketleftex u23A2 \[bracketrighttp] \e[bracketrighttp] bracketrighttp u23A4 \[bracketrightbt] \e[bracketrightbt] bracketrightbt u23A6 \[bracketrightex] \e[bracketrightex] bracketrightex u23A5 \[lt] \e[lt] bracelefttp u23A7 + \[bracelefttp] \e[bracelefttp] bracelefttp u23A7 \[lk] \e[lk] braceleftmid u23A8 + \[braceleftmid] \e[braceleftmid] braceleftmid u23A8 \[lb] \e[lb] braceleftbt u23A9 + \[braceleftbt] \e[braceleftbt] braceleftbt u23A9 \[braceleftex] \e[braceleftex] braceleftex u23AA \[rt] \e[rt] bracerighttp u23AB + \[bracerighttp] \e[bracerighttp] bracerighttp u23AB \[rk] \e[rk] bracerightmid u23AC + \[bracerightmid] \e[bracerightmid] bracerightmid u23AC \[rb] \e[rb] bracerightbt u23AD + \[bracerightbt] \e[bracerightbt] bracerightbt u23AD \[bracerightex] \e[bracerightex] bracerightex u23AA . \[parenlefttp] \e[parenlefttp] parenlefttp u239B \[parenleftbt] \e[parenleftbt] parenleftbt u239D \[parenleftex] \e[parenleftex] parenleftex u239C \[parenrighttp] \e[parenrighttp] parenrighttp u239E \[parenrightbt] \e[parenrightbt] parenrightbt u23A0 \[parenrightex] \e[parenrightex] parenrightex u239F .TE . .P .I Arrows .P .TS expand; l l l l l. Output Input PostScript Unicode Notes _ \[<-] \e[<-] arrowleft u2190 + \[->] \e[->] arrowright u2192 + \[<>] \e[<>] arrowboth u2194 (horizontal) \[da] \e[da] arrowdown u2193 + \[ua] \e[ua] arrowup u2191 + \[va] \e[va] arrowupdn u2195 \[lA] \e[lA] arrowdblleft u21D0 \[rA] \e[rA] arrowdblright u21D2 \[hA] \e[hA] arrowdblboth u21D4 (horizontal) \[dA] \e[dA] arrowdbldown u21D3 \[uA] \e[uA] arrowdblup u21D1 \[vA] \e[vA] uni21D5 u21D5 vertical double-headed double arrow \[an] \e[an] arrowhorizex u23AF horizontal arrow extension .TE . .P .I Lines .P The font-invariant glyphs `br', `ul', and `rn' form corners; they can be used to build boxes. . Note that both the PostScript and the Unicode-derived names of these three glyphs are just rough approximations. . .P `rn' also serves in classical troff as the horizontal extension of the square root sign. . .P `ru' is a font-invariant glyph, namely a rule of length 0.5m. . .P .TS expand; l l l l l. Output Input PostScript Unicode Notes _ \[ba] \e[ba] bar u007C \[br] \e[br] SF110000 u2502 box rule + \[ul] \e[ul] underscore u005F + \[rn] \e[rn] overline u203E + \[ru] \e[ru] --- --- baseline rule + \[bb] \e[bb] brokenbar u00A6 \[sl] \e[sl] slash u002F + \[rs] \e[rs] backslash u005C reverse solidus .TE .P Use `\f(CW\e[radicalex]\fP', not `\f(CW\e[overline]\fP', for continuation of square root. . .P .I Text markers .P .TS expand; l l l l l. Output Input PostScript Unicode Notes _ \[ci] \e[ci] circle u25CB + \[bu] \e[bu] bullet u2022 + \[dd] \e[dd] daggerdbl u2021 double dagger sign + \[dg] \e[dg] dagger u2020 + \[lz] \e[lz] lozenge u25CA \[sq] \e[sq] uni25A1 u25A1 white square + \[ps] \e[ps] paragraph u00B6 \[sc] \e[sc] section u00A7 + \[lh] \e[lh] uni261C u261C hand pointing left + \[rh] \e[rh] a14 u261E hand pointing right + \[at] \e[at] at u0040 \[sh] \e[sh] numbersign u0023 \[CR] \e[CR] carriagereturn u21B5 \[OK] \e[OK] a19 u2713 check mark, tick .TE . .P .I Legal Symbols .P .TS expand; l l l l l. Output Input PostScript Unicode Notes _ \[co] \e[co] copyright u00A9 + \[rg] \e[rg] registered u00AE + \[tm] \e[tm] trademark u2122 \[bs] \e[bs] --- --- AT&T Bell Labs logo + .TE .P The Bell Labs logo is not supported in groff. . .P .I Currency symbols .P .TS expand; l l l l l. Output Input PostScript Unicode Notes _ \[Do] \e[Do] dollar u0024 \[ct] \e[ct] cent u00A2 + \[eu] \e[eu] --- u20AC official Euro symbol \[Eu] \e[Eu] Euro u20AC font-specific Euro glyph variant \[Ye] \e[Ye] yen u00A5 \[Po] \e[Po] sterling u00A3 British currency sign \[Cs] \e[Cs] currency u00A4 Scandinavian currency sign \[Fn] \e[Fn] florin u0192 Dutch currency sign .TE . .P .I Units .P .TS expand; l l l l l. Output Input PostScript Unicode Notes _ \[de] \e[de] degree u00B0 + \[%0] \e[%0] perthousand u2030 per thousand, per mille sign \[fm] \e[fm] minute u2032 footmark, prime + \[sd] \e[sd] second u2033 \[mc] \e[mc] mu u00B5 micro sign \[Of] \e[Of] ordfeminine u00AA \[Om] \e[Om] ordmasculine u00BA .TE . .P .I Logical Symbols .P .TS expand; l l l l l. Output Input PostScript Unicode Notes _ \[AN] \e[AN] logicaland u2227 \[OR] \e[OR] logicalor u2228 \[no] \e[no] logicalnot u00AC + \[tno] \e[tno] logicalnot u00AC text variant of `no' \[te] \e[te] existential u2203 there exists \[fa] \e[fa] universal u2200 for all \[st] \e[st] suchthat u220B \[3d] \e[3d] therefore u2234 \[tf] \e[tf] therefore u2234 \[or] \e[or] bar u007C bitwise OR operator (as used in C) + .TE . .P .I Mathematical Symbols .P .TS expand; l l l l l. Output Input PostScript Unicode Notes _ \[12] \e[12] onehalf u00BD + \[14] \e[14] onequarter u00BC + \[34] \e[34] threequarters u00BE + \[18] \e[18] oneeighth u215B \[38] \e[38] threeeighths u215C \[58] \e[58] fiveeighths u215D \[78] \e[78] seveneighths u215E \[S1] \e[S1] onesuperior u00B9 \[S2] \e[S2] twosuperior u00B2 \[S3] \e[S3] threesuperior u00B3 \[pl] \e[pl] plus u002B plus in special font + \[mi] \e[mi] minus u2212 minus in special font + \[-+] \e[-+] uni2213 u2213 \[+-] \e[+-] plusminus u00B1 + \[t+-] \e[t+-] plusminus u00B1 text variant of `+\-' \[pc] \e[pc] periodcentered u00B7 \[md] \e[md] dotmath u22C5 multiplication dot \[mu] \e[mu] multiply u00D7 + \[tmu] \e[tmu] multiply u00D7 text variant of `mu' \[c*] \e[c*] circlemultiply u2297 multiply sign in a circle \[c+] \e[c+] circleplus u2295 plus in a circle \[di] \e[di] divide u00F7 division + \[tdi] \e[tdi] divide u00F7 text variant of `di' \[f/] \e[f/] fraction u2044 bar for fractions \[**] \e[**] asteriskmath u2217 + \[<=] \e[<=] lessequal u2264 + \[>=] \e[>=] greaterequal u2265 + \[<<] \e[<<] uni226A u226A much less \[>>] \e[>>] uni226B u226B much greater \[eq] \e[eq] equal u003D equals in special font + \[!=] \e[!=] notequal u003D_0338 + \[==] \e[==] equivalence u2261 + \[ne] \e[ne] uni2262 u2261_0338 \[=~] \e[=~] congruent u2245 approx.\& equal \[|=] \e[|=] uni2243 u2243 asymptot.\& equal to + \[ap] \e[ap] similar u223C + \[~~] \e[~~] approxequal u2248 almost equal to \[~=] \e[~=] approxequal u2248 \[pt] \e[pt] proportional u221D + \[es] \e[es] emptyset u2205 + \[mo] \e[mo] element u2208 + \[nm] \e[nm] notelement u2208_0338 \[sb] \e[sb] propersubset u2282 + \[nb] \e[nb] notsubset u2282_0338 \[sp] \e[sp] propersuperset u2283 + \[nc] \e[nc] uni2285 u2283_0338 not superset \[ib] \e[ib] reflexsubset u2286 + \[ip] \e[ip] reflexsuperset u2287 + \[ca] \e[ca] intersection u2229 intersection, cap + \[cu] \e[cu] union u222A union, cup + \[/_] \e[/_] angle u2220 \[pp] \e[pp] perpendicular u22A5 \[is] \e[is] integral u222B + \[integral] \e[integral] integral u222B *** \[sum] \e[sum] summation u2211 *** \[product] \e[product] product u220F *** \[coproduct] \e[coproduct] uni2210 u2210 *** \[gr] \e[gr] gradient u2207 + \[sr] \e[sr] radical u221A square root + \[sqrt] \e[sqrt] radical u221A *** \[radicalex] \e[radicalex] radicalex --- square root continuation \[sqrtex] \e[sqrtex] radicalex --- *** \[lc] \e[lc] uni2308 u2308 left ceiling + \[rc] \e[rc] uni2309 u2309 right ceiling + \[lf] \e[lf] uni230A u230A left floor + \[rf] \e[rf] uni230B u230B right floor + \[if] \e[if] infinity u221E + \[Ah] \e[Ah] aleph u2135 \[Im] \e[Im] Ifraktur u2111 Gothic I, imaginary \[Re] \e[Re] Rfraktur u211C Gothic R, real \[wp] \e[wp] weierstrass u2118 Weierstrass p \[pd] \e[pd] partialdiff u2202 partial differentiation + \[-h] \e[-h] uni210F u210F Planck constant / 2pi \[hbar] \e[hbar] uni210F u210F .TE . .P .I Greek glyphs .P These glyphs are intended for technical use, not for real Greek; normally, the uppercase letters have upright shape, and the lowercase ones are slanted. . There is a problem with the mapping of letter phi to Unicode. . Prior to Unicode version\ 3.0, the difference between U+03C6, GREEK SMALL LETTER PHI, and U+03D5, GREEK PHI SYMBOL, was not clearly described; only the glyph shapes in the Unicode book could be used as a reference. . Starting with Unicode\ 3.0, the reference glyphs have been exchanged and described verbally also: In mathematical context, U+03D5 is the stroked variant and U+03C6 the curly glyph. . Unfortunately, most font vendors didn't update their fonts to this (incompatible) change in Unicode. . At the time of this writing (January 2006), it is not clear yet whether the Adobe Glyph Names `phi' and `phi1' also change its meaning if used for mathematics, thus compatibility problems are likely to happen \(en being conservative, groff currently assumes that `phi' in a PostScript symbol font is the stroked version. .P In groff, symbol `\f(CW\e[*f]\fP' always denotes the stroked version of phi, and `\f(CW\e[+f]\fP' the curly variant. .P .TS expand; l l l l l. Output Input PostScript Unicode Notes _ \[*A] \e[*A] Alpha u0391 + \[*B] \e[*B] Beta u0392 + \[*G] \e[*G] Gamma u0393 + \[*D] \e[*D] Delta u0394 + \[*E] \e[*E] Epsilon u0395 + \[*Z] \e[*Z] Zeta u0396 + \[*Y] \e[*Y] Eta u0397 + \[*H] \e[*H] Theta u0398 + \[*I] \e[*I] Iota u0399 + \[*K] \e[*K] Kappa u039A + \[*L] \e[*L] Lambda u039B + \[*M] \e[*M] Mu u039C + \[*N] \e[*N] Nu u039D + \[*C] \e[*C] Xi u039E + \[*O] \e[*O] Omicron u039F + \[*P] \e[*P] Pi u03A0 + \[*R] \e[*R] Rho u03A1 + \[*S] \e[*S] Sigma u03A3 + \[*T] \e[*T] Tau u03A4 + \[*U] \e[*U] Upsilon u03A5 + \[*F] \e[*F] Phi u03A6 + \[*X] \e[*X] Chi u03A7 + \[*Q] \e[*Q] Psi u03A8 + \[*W] \e[*W] Omega u03A9 + \[*a] \e[*a] alpha u03B1 + \[*b] \e[*b] beta u03B2 + \[*g] \e[*g] gamma u03B3 + \[*d] \e[*d] delta u03B4 + \[*e] \e[*e] epsilon u03B5 + \[*z] \e[*z] zeta u03B6 + \[*y] \e[*y] eta u03B7 + \[*h] \e[*h] theta u03B8 + \[*i] \e[*i] iota u03B9 + \[*k] \e[*k] kappa u03BA + \[*l] \e[*l] lambda u03BB + \[*m] \e[*m] mu u03BC + \[*n] \e[*n] nu u03BD + \[*c] \e[*c] xi u03BE + \[*o] \e[*o] omicron u03BF + \[*p] \e[*p] pi u03C0 + \[*r] \e[*r] rho u03C1 + \[ts] \e[ts] sigma1 u03C2 terminal sigma + \[*s] \e[*s] sigma u03C3 + \[*t] \e[*t] tau u03C4 + \[*u] \e[*u] upsilon u03C5 + \[*f] \e[*f] phi u03D5 (stroked glyph) + \[*x] \e[*x] chi u03C7 + \[*q] \e[*q] psi u03C8 + \[*w] \e[*w] omega u03C9 + \[+h] \e[+h] theta1 u03D1 variant theta \[+f] \e[+f] phi1 u03C6 variant phi (curly shape) \[+p] \e[+p] omega1 u03D6 variant pi, looking like omega \[+e] \e[+e] uni03F5 u03F5 variant epsilon .TE . .P .I Card symbols .P .TS expand; l l l l l. Output Input PostScript Unicode Notes _ \[CL] \e[CL] club u2663 black club suit \[SP] \e[SP] spade u2660 black spade suit \[HE] \e[HE] heart u2665 black heart suit \[u2661] \e[u2661] uni2661 u2661 white heart suit \[DI] \e[DI] diamond u2666 black diamond suit \[u2662] \e[u2662] uni2662 u2662 white diamond suit .TE . . .\" -------------------------------------------------------------------- .SH "AUTHOR" .\" -------------------------------------------------------------------- . Copyright \(co 1989\-2004, 2006\-2009, 2012 Free Software Foundation, Inc. . .P This document is distributed under the terms of the FDL (GNU Free Documentation License) version 1.3 or later. . You should have received a copy of the FDL on your system, it is also available on-line at the .UR http://\:www.gnu.org/\:copyleft/\:fdl.html GNU copyleft site .UE . . .P This document is part of .IR groff , the GNU roff distribution. . It was written by .MT jjc@jclark.com James Clark .ME with additions by .MT wl@gnu.org Werner Lemberg .ME and .MT groff-bernd.warken-72@web.de Bernd Warken .ME . . . .\" -------------------------------------------------------------------- .SH "SEE ALSO" .\" -------------------------------------------------------------------- . .TP .BR groff (@MAN1EXT@) the GNU roff formatter . .TP .BR groff (@MAN7EXT@) a short reference of the groff formatting language . . .P .IR "An extension to the troff character set for Europe" , E.G.\& Keizer, K.J.\& Simonsen, J.\& Akkerhuis; EUUG Newsletter, Volume 9, No.\& 2, Summer 1989 . . .P .UR http://\:www.unicode.org The Unicode Standard .UE . .cp \n[groff_char_C] . .\" -------------------------------------------------------------------- .\" Emacs settings .\" -------------------------------------------------------------------- .\" Local Variables: .\" mode: nroff .\" tab-width: 20 .\" End: groff-1.22.2/man/groff_font.man0000644000175000001440000003126512104714260014647 0ustar wlusers.ig Copyright (C) 1989-1995, 2001-2004, 2006-2009, 2012 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. .. . .do nr groff_font_C \n[.C] .cp 0 . . .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp . ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP . el .TP "\\$1" .. . . .TH GROFF_FONT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" . . .SH NAME groff_font \- format of groff device and font description files . . .SH DESCRIPTION The groff font format is roughly a superset of the ditroff font format. . The font files for device .I name are stored in a directory .BI dev name\c \&. . There are two types of file: a device description file called .B DESC and for each font\~\c .I F a font file called\~\c .IR F . . These are text files; unlike the ditroff font format, there is no associated binary format. . . .SS DESC file format . The DESC file can contain the following types of line as shown below. . Later entries in the file override previous values. . .LP Empty lines are ignored. . .TP .B charset This line and everything following in the file are ignored. . It is allowed for the sake of backwards compatibility. . .TP .BI "family " fam The default font family is .IR fam . . .TP .BI "fonts " "n F1 F2 F3 \|.\|.\|.\| Fn" Fonts .IR F1 ", \|.\|.\|., " Fn are mounted in the font positions .IR m "\|+\|1, \|.\|.\|., " m \|+\| n where .I m is the number of styles. . This command may extend over more than one line. . A font name of\~\c .B 0 causes no font to be mounted on the corresponding font position. . .TP .BI "hor " n The horizontal resolution is .IR n \~\c machine units. . .TP .BI "image_generator " string Needed for .B \%grohtml only. . It specifies the program to generate PNG images from PostScript input. . Under GNU/Linux this is usually .I gs but under other systems (notably cygwin) it might be set to another name. . .TP .BI "paperlength " n The physical vertical dimension of the output medium in machine units. . This isn't used by .B troff itself but by output devices. . Deprecated. . Use .B papersize instead. . .TP .BI "papersize " string Select a paper size. . Valid values for .I string are the ISO paper types A0\[en]A7, B0\[en]B7, C0\[en]C7, D0\[en]D7, DL, and the US paper types letter, legal, tabloid, ledger, statement, executive, com10, and monarch. . Case is not significant for .IR string if it holds predefined paper types. . Alternatively, .I string can be a file name (e.g.\& `/etc/papersize'); if the file can be opened, .B groff reads the first line and tests for the above paper sizes. . Finally, .I string can be a custom paper size in the format .IB length , width (no spaces before and after the comma). . Both .I length and .I width must have a unit appended; valid values are `i' for inches, `c' for centimeters, `p' for points, and `P' for picas. . Example: .BR 12c,235p . . An argument which starts with a digit is always treated as a custom paper format. . .B papersize sets both the vertical and horizontal dimension of the output medium. . .IP More than one argument can be specified; .B groff scans from left to right and uses the first valid paper specification. . .TP .BI "paperwidth " n The physical horizontal dimension of the output medium in machine units. . Deprecated. . Use .B papersize instead. . This isn't used by .BR troff itself but by output devices. . .TP .B pass_filenames Make troff tell the driver the source file name being processed. . This is achieved by another tcommand: .BR F \~\c .IR filename . . .TP .BI "postpro " program Use .I program as the postprocessor. . .TP .BI "prepro " program Call .I program as a preprocessor. . .TP .BI "print " program Use .I program as the spooler program for printing. . If omitted, the .B \-l and .B \-L options of .B groff are ignored. . .TP .BI "res " n There are .I n machine units per inch. . .TP .BI "sizes " "s1 s2 \|.\|.\|.\| sn " 0 This means that the device has fonts at .IR s1 , .IR s2 ", \|.\|.\|., " sn scaled points. . The list of sizes must be terminated by a .BR 0 . . Each .I si can also be a range of sizes .IR m \- n . . The list can extend over more than one line. . .TP .BI "sizescale " n The scale factor for point sizes. . By default this has a value of 1. . One .I scaled point is equal to one .RI point\|/\| n . . The arguments to the .B unitwidth and .B sizes commands are given in scaled points. . .TP .BI "styles " "S1 S2 \|.\|.\|.\| Sm" The first .I m font positions are associated with styles .IR S1 ", \|.\|.\|., " Sm . . .TP .B tcommand This means that the postprocessor can handle the .B t and\~\c .B u output commands. . .TP .B unicode Indicate that the output device supports the complete Unicode repertoire. . Useful only for devices which produce .I character entities instead of glyphs. . .IP If .B unicode is present, no .B charset section is required in the font description files since the Unicode handling built into .B groff is used. . However, if there are entries in a .B charset section, they either override the default mappings for those particular characters or add new mappings (normally for composite characters). . .IP This is used for .BR \-Tutf8 , .BR \-Thtml , and .BR \-Txhtml . . .TP .BI "unitwidth " n Quantities in the font files are given in machine units for fonts whose point size is .IR n \~\c scaled points. . .TP .B unscaled_charwidths Make the font handling module always return unscaled glyph widths. . Needed for the .B \%grohtml device. . .TP .B use_charnames_in_special This command indicates that troff should encode named glyphs inside special commands. . .TP .BI "vert " n The vertical resolution is .IR n \~\c machine units. . .LP The .BR res , .BR unitwidth , .BR fonts , and .B sizes lines are compulsory. . Not all commands in the DESC file are used by .B troff itself; some of the keywords (or even additional ones) are used by postprocessors to store arbitrary information about the device. . .LP Here a list of obsolete keywords which are recognized by .B groff but completely ignored: .BR spare1 , .BR spare2 , .BR biggestfont . . . .SS Font file format . A font file has two sections; empty lines are ignored in both of them. . .LP The first section is a sequence of lines each containing a sequence of blank delimited words; the first word in the line is a key, and subsequent words give a value for that key. . .TP .BI "ligatures " "lig1 lig2 \|.\|.\|.\| lign \fR[" 0 \fR] Glyphs .IR lig1 , .IR lig2 ", \|.\|.\|., " lign are ligatures; possible ligatures are .BR ff , .BR fi , .BR fl , .BR ffi , and .BR ffl . . For backwards compatibility, the list of ligatures may be terminated with a\~\c .BR 0 . . The list of ligatures may not extend over more than one line. . .TP .BI "name " F The name of the font is\~\c .IR F . . .TP .BI "slant " n The glyphs of the font have a slant of .IR n \~\c degrees. . (Positive means forward.) . .TP .BI "spacewidth " n The normal width of a space is\~\c .IR n . . .TP .B special The font is .IR special ; this means that when a glyph is requested that is not present in the current font, it is searched for in any special fonts that are mounted. . .LP Other commands are ignored by .B troff but may be used by postprocessors to store arbitrary information about the font in the font file. . .LP The first section can contain comments which start with the .B # character and extend to the end of a line. . .LP The second section contains one or two subsections. . It must contain a .I charset subsection and it may also contain a .I kernpairs subsection. . These subsections can appear in any order. . Each subsection starts with a word on a line by itself. . .LP The word .B charset starts the charset subsection. . The .B charset line is followed by a sequence of lines. . Each line gives information for one glyph. . A line comprises a number of fields separated by blanks or tabs. . The format is . .IP .I name metrics type code .RI [ entity_name ] .RB [ \-\- .IR comment ] . .LP .I name identifies the glyph: if .I name is a single glyph .I c then it corresponds to the groff input character .IR c ; if it is of the form .BI \[rs] c where c is a single character, then it corresponds to the special character .BI \[rs][ c ]\fR; otherwise it corresponds to the groff input character .BI \[rs][ name ]\fR. . If it is exactly two characters .I xx it can be entered as .BI \[rs]( xx\fR. . Note that single-letter special characters can't be accessed as .BI \[rs] c\fR; the only exception is `\[rs]\-' which is identical to `\[rs][\-]'. . The name .B \-\-\- is special and indicates that the glyph is unnamed; such glyphs can only be used by means of the .B \[rs]N escape sequence in .BR troff . . .LP The .I type field gives the glyph type: . .TP 1 means the glyph has a descender, for example, `p'; . .TP 2 means the glyph has an ascender, for example, `b'; . .TP 3 means the glyph has both an ascender and a descender, for example, `('. . .LP The .I code field gives the code which the postprocessor uses to print the glyph. . The glyph can also be input to groff using this code by means of the .B \[rs]N escape sequence. . The code can be any integer. . If it starts with a\~\c .B 0 it is interpreted as octal; if it starts with .B 0x or .B 0X it is interpreted as hexadecimal. . Note, however, that the .B \[rs]N escape sequence only accepts a decimal integer. . .LP The .I entity_name field gives an ASCII string identifying the glyph which the postprocessor uses to print that glyph. . This field is optional and is currently used by .B grops to build sub-encoding arrays for PS fonts containing more than 256 glyphs. . (It has also been used for .BR \%grohtml 's entity names but for efficiency reasons this data is now compiled directly into .BR \%grohtml .) . .LP Anything on the line after the encoding field or `\-\-' are ignored. . .LP The .I metrics field has the form (in one line; it is broken here for the sake of readability): . .IP .I width\c .RI [\fB, height\c .RI [\fB, depth\c .RI [\fB, italic-correction .br .RI [\fB, left-italic-correction\c .RI [\fB, subscript-correction ]]]]] . .LP There must not be any spaces between these subfields. . Missing subfields are assumed to be\~0. . The subfields are all decimal integers. . Since there is no associated binary format, these values are not required to fit into a variable of type .B char as they are in ditroff. . The .I width subfields gives the width of the glyph. . The .I height subfield gives the height of the glyph (upwards is positive); if a glyph does not extend above the baseline, it should be given a zero height, rather than a negative height. . The .I depth subfield gives the depth of the glyph, that is, the distance below the lowest point below the baseline to which the glyph extends (downwards is positive); if a glyph does not extend below above the baseline, it should be given a zero depth, rather than a negative depth. . The .I italic-correction subfield gives the amount of space that should be added after the glyph when it is immediately to be followed by a glyph from a roman font. . The .I left-italic-correction subfield gives the amount of space that should be added before the glyph when it is immediately to be preceded by a glyph from a roman font. . The .I subscript-correction gives the amount of space that should be added after a glyph before adding a subscript. . This should be less than the italic correction. . .LP A line in the charset section can also have the format . .IP .I name \fB" . .LP This indicates that .I name is just another name for the glyph mentioned in the preceding line. . .LP The word .B kernpairs starts the kernpairs section. . This contains a sequence of lines of the form: . .IP .I c1 c2 n . .LP This means that when glyph .I c1 appears next to glyph .I c2 the space between them should be increased by\~\c .IR n . . Most entries in kernpairs section have a negative value for\~\c .IR n . . . .SH FILES . .Tp \w'@FONTDIR@/devname/DESC'u+3n .BI @FONTDIR@/dev name /DESC Device description file for device .IR name . . .TP .BI @FONTDIR@/dev name / F Font file for font\~\c .I F of device .IR name . . . .SH "SEE ALSO" . .BR groff_out (@MAN5EXT@), .BR @g@troff (@MAN1EXT@). . .cp \n[groff_font_C] . .\" Local Variables: .\" mode: nroff .\" End: groff-1.22.2/man/groff_tmac.man0000644000175000001440000006513512104714260014630 0ustar wlusers.ig groff_tmac.5 File position: /man/groff_tmac.man This file is part of groff, the GNU roff type-setting system. Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. written by Bernd Warken and Werner Lemberg Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being this .ig-section and AUTHOR, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the Free Documentation License is included as a file called FDL in the main directory of the groff source package. .. .ds Ellipsis \&.\|.\|.\&\" . .TH GROFF_TMAC @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" .SH NAME groff_tmac \- macro files in the roff typesetting system . . .\" -------------------------------------------------------------------- .SH DESCRIPTION .\" -------------------------------------------------------------------- . The .BR roff (@MAN7EXT@) type-setting system provides a set of macro packages suitable for special kinds of documents. . Each macro package stores its macros and definitions in a file called the package's .BR "tmac file" . The name is deduced from .RB ` T\c .IB roff MAC\c .IR ros '. . .P The tmac files are normal roff source documents, except that they usually contain only definitions and setup commands, but no text. . All tmac files are kept in a single or a small number of directories, the .B tmac directories. . . .\" -------------------------------------------------------------------- .SH "GROFF MACRO PACKAGES" .\" -------------------------------------------------------------------- . .I groff provides all classical macro packages, some more full packages, and some secondary packages for special purposes. . Note that it is not possible to use multiple primary macro packages at the same time; saying e.g.\& . .IP .EX \fIsh#\fP groff \-m man \-m ms foo .EE . .P or . .IP .EX \fIsh#\fP groff \-m man foo \-m ms bar .EE . .P fails. Exception to this is the use of man pages written with either the .B mdoc or the .B man macro package. See below the description of the .B andoc.tmac file. . . .\" -------------------------------------------------------------------- .SS "Man\~Pages" .\" -------------------------------------------------------------------- . .TP .B man This is the classical macro package for UNIX manual pages (man\~pages); it is quite handy and easy to use; see .BR groff_man (@MAN7EXT@). . . .TP .B doc .TQ .B mdoc An alternative macro package for man\~pages mainly used in BSD systems; it provides many new features, but it is not the standard for man\~pages; see .BR groff_mdoc (@MAN7EXT@). . . .TP .B andoc .TQ .B mandoc Use this file in case you don't know whether the .B man macros or the .B mdoc package should be used. Multiple man pages (in either format) can be handled. . . .\" -------------------------------------------------------------------- .SS "Full Packages" .\" -------------------------------------------------------------------- . The packages in this section provide a complete set of macros for writing documents of any kind, up to whole books. . They are similar in functionality; it is a matter of taste which one to use. . . .TP .B me The classical .I me macro package; see .BR groff_me (@MAN7EXT@). . . .TP .B mm The semi-classical .I mm macro package; see .BR groff_mm (@MAN7EXT@). . . .TP .B mom The new .I mom macro package, only available in groff. . As this is not based on other packages, it can be freely designed. . So it is expected to become quite a nice, modern macro package. . See .BR groff_mom (@MAN7EXT@). . . .TP .B ms The classical .I ms macro package; see .BR groff_ms (@MAN7EXT@). . . .\" -------------------------------------------------------------------- .SS "Language-specific Packages" .\" -------------------------------------------------------------------- . .TP .B cs This file adds support for Czech localization, including the main macro packages (me, mom, mm, and ms). . .IP Note that .B cs.tmac sets the input encoding to latin-2. . . .TP .B de .TQ .B den German localization support, including the main macro packages (me, mom, mm, and ms). . .IP .B de.tmac selects hyphenation patterns for traditional orthography, and .B den.tmac does the same for the new orthography (`Recht\%schreib\%reform'). . It should be used as the last macro package on the command line. . . .TP .B fr This file adds support for French localization, including the main macro packages (me, mom, mm, and ms). . . Example: .RS .IP .EX \fIsh#\fP groff -ms -mfr foo.ms > foo.ps .EE .RE . .IP Note that .B fr.tmac sets the input encoding to latin-9 to get proper support of the `oe' ligature. . . .TP .B sv Swedish localization support, including the me, mom, and ms macro packages. . Note that Swedish for the mm macros is handled separately; see .BR groff_mmse (@MAN7EXT@). . It should be used as the last macro package on the command line. . . .\" -------------------------------------------------------------------- .SS "Input Encodings" .\" -------------------------------------------------------------------- . . .TP .B latin1 .TQ .B latin2 .TQ .B latin5 .TQ .B latin9 Various input encodings supported directly by groff. . Normally, this macro is loaded at the very beginning of a document or specified as the first macro argument on the command line. . .B @g@roff loads latin1 by default at start-up. . Note that these macro packages don't work on EBCDIC hosts. . . .TP .B cp1047 Encoding support for EBCDIC. . On those platforms it is loaded automatically at start-up. . Due to different character ranges used in .B @g@roff it doesn't work on architectures which are based on ASCII. . . .P Note that it can happen that some input encoding characters are not available for a particular output device. . For example, saying . .P .EX groff -Tlatin1 -mlatin9 ... .EE . .P fails if you use the Euro character in the input. . Usually, this limitation is present only for devices which have a limited set of output glyphs .RB ( \-Tascii , .BR \-Tlatin1 ); for other devices it is usually sufficient to install proper fonts which contain the necessary glyphs. . . .\" -------------------------------------------------------------------- .SS "Special Packages" .\" -------------------------------------------------------------------- . The macro packages in this section are not intended for stand-alone usage, but can be used to add special functionality to any other macro package or to plain groff. . . .TP .B 60bit Provide some macros for addition, multiplication, and division of 60bit integers (allowing safe multiplication of 30bit integers, for example). . . .TP .B ec Switch to the EC and TC font families. . To be used with .BR \%grodvi (@MAN1EXT@) \[en] this man page also gives more details of how to use it. . . .TP .B papersize This macro file is already loaded at start-up by .B @g@troff so it isn't necessary to call it explicitly. . It provides an interface to set the paper size on the command line with the option \f[B]\%\-dpaper=\f[]\f[I]size\f[]. . Possible values for .I size are the same as the predefined .B papersize values in the DESC file (only lowercase; see .BR groff_font (@MAN5EXT@) for more) except .BR a7 - d7 . . An appended .B l (ell) character denotes landscape orientation. . Examples: .BR a4 , .BR c3l , .BR letterl . . .IP Most output drivers need additional command line switches .B \-p and .B \-l to override the default paper length and orientation as set in the driver specific DESC file. . For example, use the following for PS output on A4 paper in landscape orientation: . .IP .EX .SM \fIsh#\fP groff \-Tps \-dpaper=a4l \-P\-pa4 \-P\-l \-ms foo.ms > foo.ps .EE . . .TP .B pic This file provides proper definitions for the macros .B PS and .BR PE , needed for the .BR @g@pic (@MAN1EXT@) preprocessor. . They center each picture. . Use it only if your macro package doesn't provide proper definitions for those two macros (actually, most of them already do). . . .TP .B pspic A single macro is provided in this file, .BR PSPIC , to include a PostScript graphic in a document. . The following output devices support inclusion of PS images: .BR \-Tps , .BR \-Tdvi , .BR \-Thtml , and .BR \-Txhtml ; for all other devices the image is replaced with a hollow rectangle of the same size. . This macro file is already loaded at start-up by .B @g@troff so it isn't necessary to call it explicitly. . .IP Syntax: .RS .IP \&\fB.PSPIC\fP \ [\fB\-L\fP\|\ |\|\fB\-R\fP\|\ |\|\fB\-C\fP\|\ |\|\fB\-I\fP\ \fIn\fP] \ \fI\|file\fP [\fIwidth\fP [\fIheight\fP]] .RE . .IP .I file is the name of the PostScript file; .I width and .I height give the desired width and height of the image. . If neither a .I width nor a .I height argument is specified, the image's natural width (as given in the file's bounding box) or the current line length is used as the width, whatever is smaller. . The .I width and .I height arguments may have scaling indicators attached; the default scaling indicator is\~\c .BR i . . This macro scales the graphic uniformly in the x and y\~directions so that it is no more than .I width wide and .I height high. . Option .B \-C centers the graphic horizontally, which is the default. . The .B \-L and .B \-R options cause the graphic to be left-aligned and right-aligned, respectively. . The .B \-I option causes the graphic to be indented by\~\c .I n (default scaling indicator is\~\c .BR m ). . .IP For use of .B .PSPIC within a diversion it is recommended to extend it with the following code, assuring that the diversion's width completely covers the image's width. . .RS .IP .EX \&.am PSPIC \&.\ \ vpt 0 \&\[rs]h'(\[rs]\[rs]n[ps-offset]u + \[rs]\[rs]n[ps-deswid]u)' \&.\ \ sp -1 \&.\ \ vpt 1 \&.. .EE .RE . . .TP .B ptx A single macro is provided in this file, .BR xx , for formatting permuted index entries as produces by the GNU .BR ptx (1) program. . In case you need a different formatting, copy the macro into your document and adapt it to your needs. . . .TP .B trace Use this for tracing macro calls. . It is only useful for debugging. . See .BR groff_trace (@MAN7EXT@) . . . .TP .B tty-char Overrides the definition of standard troff characters and some groff characters for TTY devices. . The optical appearance is intentionally inferior compared to that of normal TTY formatting to allow processing with critical equipment. . . .TP .B www Additions of elements known from the HTML format, as used in the internet (World Wide Web) pages; this includes URL links and mail addresses; see .BR groff_www (@MAN7EXT@). . . .\" -------------------------------------------------------------------- .SH NAMING .\" -------------------------------------------------------------------- . Classical roff systems were designed before the conventions of the modern C .BR getopt (3) call evolved, and used a naming scheme for macro packages that looks odd to modern eyes. Macro packages were always included with the option .BR \-m ; when this option was directly followed by its argument without an intervening space, this looked like a long option preceded by a single minus \[em] a sensation in the computer stone age. To make this invocation form work, classical troff macro packages used names that started with the letter `m', which was omitted in the naming of the macro file. . . .P For example, the macro package for the man pages was called .IR man , while its macro file .IR tmac.an . So it could be activated by the argument .I an to option .BR \-m , or .BR \-man for short. . . .P For similar reasons, macro packages that did not start with an `m' had a leading `m' added in the documentation and in speech; for example, the package corresponding to .I tmac.doc was called .I mdoc in the documentation, although a more suitable name would be .IR doc . For, when omitting the space between the option and its argument, the command line option for activating this package reads .BR \-mdoc . . . .P To cope with all situations, actual versions of .BR groff (@MAN1EXT@) are smart about both naming schemes by providing two macro files for the inflicted macro packages; one with a leading `m' the other one without it. . So in .IR groff , the .I man macro package may be specified as on of the following four methods: . .IP .EX \fIsh#\fP groff\ \-m\ man \fIsh#\fP groff\ \-man \fIsh#\fP groff\ \-mman \fIsh#\fP groff\ \-m\ an .EE . . .P Recent packages that do not start with `m' do not use an additional `m' in the documentation. . For example, the .I www macro package may be specified only as one of the two methods: . .IP .EX \fIsh#\fP groff\ \-m\ www \fIsh#\fP groff\ \-mwww .EE . . .P Obviously, variants like .I \-mmwww would not make much sense. . . .P A second strange feature of classical troff was to name macro files in the form \f[B]tmac.\f[]\f[I]name\f[]. In modern operating systems, the type of a file is specified as a postfix, the file name extension. . Again, groff copes with this situation by searching both .IB anything .tmac and .BI tmac. anything if only .I anything is specified. . . .P The easiest way to find out which macro packages are available on a system is to check the man\~page .BR groff (@MAN1EXT@), or the contents of the .I tmac directories. . . .P In .IR groff , most macro packages are described in\~man pages called .BR groff_\f[I]name\f[] (@MAN7EXT@), with a leading `m' for the classical packages. . . .\" -------------------------------------------------------------------- .SH INCLUSION .\" -------------------------------------------------------------------- . There are several ways to use a macro package in a document. . The classical way is to specify the troff/groff option .BR \-m .I name at run-time; this makes the contents of the macro package .I name available. . In groff, the file .IB name .tmac is searched within the tmac path; if not found, .BI tmac. name is searched for instead. . . .P Alternatively, it is also possible to include a macro file by adding the request .B .so .I filename into the document; the argument must be the full file name of an existing file, possibly with the directory where it is kept. . In groff, this was improved by the similar request .B .mso .IR package , which added searching in the tmac path, just like option .BR \-m does. . . .P Note that in order to resolve the .B .so and .B .mso requests, the roff preprocessor .BR soelim (@MAN1EXT@) must be called if the files to be included need preprocessing. . This can be done either directly by a pipeline on the command line or by using the troff/groff option .BR \-s . . .I man calls soelim automatically. . . .P For example, suppose a macro file is stored as . .IP .I @MACRODIR@/macros.tmac . .P and is used in some document called .IR docu.roff . . . .P At run-time, the formatter call for this is . .IP .EX \fIsh#\fP groff \-m macros docu.roff .EE . . .P To include the macro file directly in the document either . .IP .EX \&.mso macros.tmac .EE . .P is used or . .IP .EX \&.so @MACRODIR@/macros.tmac .EE . . .P In both cases, the formatter should be called with option .B \-s to invoke .BR soelim . .IP .EX \fIsh#\fP groff \-s docu.roff .EE . . .P If you want to write your own groff macro file, call it .IB whatever .tmac and put it in some directory of the tmac path, see section .BR FILES . Then documents can include it with the .B .mso request or the option .BR \-m . . . .ig .\" -------------------------------------------------------------------- .SH CONVENTION .\" -------------------------------------------------------------------- . .\" This section does not fit into the framework of this document. . There is a convention that is supported by many modern roff type-setters and .BR man (1) programs, the .I preprocessor word described in the following. . .P If the first line in a document is a comment, the first word (after the comment characters and a blank) constitutes the .B preprocessor .BR word . That means that the letters of this word are interpreted as abbreviations for those preprocessor commands that should be run when formatting the document. . Mostly, only the letters corresponding to the options for the preprocessors are recognized, `e' (for .BR eqn ), .\" `G', .\" `g', `p` (for .BR pic ), `R' (for .BR refer ), `s' (for .BR soelim ), and `t' (for .BR tbl ). (see .BR roff (@MAN7EXT@)). . . .P Besides being a good reminder for the user, some formatters (like the .BR man (1) program) are even able to automatically start the preprocessors specified in the preprocessor word, but do not bet on this. . . .P The .I man program handles some preprocessors automatically, such that in man\~pages only the following characters should be used: `e', `p', and `t'. . . .. .\" -------------------------------------------------------------------- .SH "WRITING MACROS" .\" -------------------------------------------------------------------- . A .BR roff (@MAN7EXT@) document is a text file that is enriched by predefined formatting constructs, such as requests, escape sequences, strings, numeric registers, and macros from a macro package. . These elements are described in .BR roff (@MAN7EXT@). . . .P To give a document a personal style, it is most useful to extend the existing elements by defining some macros for repeating tasks; the best place for this is near the beginning of the document or in a separate file. . . .P Macros without arguments are just like strings. . But the full power of macros reveals when arguments are passed with a macro call. . Within the macro definition, the arguments are available as the escape sequences .BR \[rs]$1 , \*[Ellipsis], .BR \[rs]$9 , .BR \[rs]$[ \*[Ellipsis] ] , .BR \[rs]$* , and .BR \[rs]$@ , the name under which the macro was called is in .BR \[rs]$0 , and the number of arguments is in register .BR \[rs]n[.$] ; see .BR groff (@MAN7EXT@). . . .\" -------------------------------------------------------------------- .SS "Copy-in Mode" .\" -------------------------------------------------------------------- . The phase when groff reads a macro is called .I "copy-in mode" or .I "copy mode" in roff-talk. . This is comparable to the C\~preprocessing phase during the development of a program written in the C\~language. . . .P In this phase, groff interprets all backslashes; that means that all escape sequences in the macro body are interpreted and replaced by their value. . For constant expressions, this is wanted, but strings and registers that might change between calls of the macro must be protected from being evaluated. . This is most easily done by doubling the backslash that introduces the escape sequence. . This doubling is most important for the positional parameters. . For example, to print information on the arguments that were passed to the macro to the terminal, define a macro named `.print_args', say. . . .IP .ds @1 \[rs]f[I]\[rs]\[rs]$0\[rs]f[]\" .ds @2 arguments:\" .EX \&.ds midpart was called with \&.de print_args \&.\ \ tm\ \*[@1]\ \[rs]*[midpart]\ \[rs]\[rs]n[.$]\ \*[@2] \&.\ \ tm\ \[rs]\[rs]$* \&.. .EE .rm @1 .rm @2 . . .P When calling this macro by . .IP .EX \&.print_args arg1 arg2 .EE . .P the following text is printed to the terminal: . .IP .EX \&\f[CI]print_args\f[] was called with the following 2 arguments: arg1 arg2 .EE . . .P Let's analyze each backslash in the macro definition. . As the positional parameters and the number of arguments change with each call of the macro their leading backslash must be doubled, which results in .I \[rs]\[rs]$* and .IR \[rs]\[rs][.$] . The same applies to the macro name because it could be called with an alias name, so .IR \[rs]\[rs]$0 . . . .P On the other hand, .I midpart is a constant string, it does not change, so no doubling for .IR \[rs]*[midpart] . The .I \[rs]f escape sequences are predefined groff elements for setting the font within the text. . Of course, this behavior does not change, so no doubling with .I \[rs]f[I] and .IR \[rs]f[] . . . .\" -------------------------------------------------------------------- .SS "Draft Mode" .\" -------------------------------------------------------------------- . Writing groff macros is easy when the escaping mechanism is temporarily disabled. . In groff, this is done by enclosing the macro definition(s) into a pair of .B .eo and .B .ec requests. . Then the body in the macro definition is just like a normal part of the document \[em] text enhanced by calls of requests, macros, strings, registers, etc. . For example, the code above can be written in a simpler way by . . .IP .ds @1 \[rs]f[I]\[rs]$0\[rs]f[]\" .ds @2 arguments:\" .EX \&.eo \&.ds midpart was called with \&.de print_args \&.\ \ tm\ \*[@1]\ \[rs]*[midpart]\ \[rs]n[.$]\ \*[@2] \&.\ \ tm\ \[rs]$* \&.. \&.ec .EE .rm @1 .rm @2 . . .P Unfortunately, draft mode cannot be used universally. . Although it is good enough for defining normal macros, draft mode fails with advanced applications, such as indirectly defined strings, registers, etc. . An optimal way is to define and test all macros in draft mode and then do the backslash doubling as a final step; do not forget to remove the .I .eo request. . . .\" -------------------------------------------------------------------- .SS "Tips for Macro Definitions" .\" -------------------------------------------------------------------- . .IP \(bu Start every line with a dot, for example, by using the groff request .B .nop for text lines, or write your own macro that handles also text lines with a leading dot. . .RS .IP .EX \&.de Text \&.\ \ if (\[rs]\[rs]n[.$] == 0)\ \[rs] \&.\ \ \ \ return \&.\ \ nop\ \[rs])\[rs]\[rs]$*\[rs]) \&.. .EE .RE . .IP \(bu Write a comment macro that works both for copy-in and draft mode; for as escaping is off in draft mode, trouble might occur when normal comments are used. . For example, the following macro just ignores its arguments, so it acts like a comment line: . .RS .IP .EX \&.de\ c \&.. \&.c\ This\ is\ like\ a\ comment\ line. .EE .RE . .IP \(bu In long macro definitions, make ample use of comment lines or almost-empty lines (this is, lines which have a leading dot and nothing else) for a better structuring. . .IP \(bu To increase readability, use groff's indentation facility for requests and macro calls (arbitrary whitespace after the leading dot). . . .\" -------------------------------------------------------------------- .SS "Diversions" .\" -------------------------------------------------------------------- . Diversions can be used to implement quite advanced programming constructs. . They are comparable to pointers to large data structures in the C\~programming language, but their usage is quite different. . . .P In their simplest form, diversions are multi-line strings, but they get their power when diversions are used dynamically within macros. . The (formatted) information stored in a diversion can be retrieved by calling the diversion just like a macro. . . .P Most of the problems arising with diversions can be avoided if you remain aware of the fact that diversions always store complete lines. . If diversions are used when the line buffer has not been flushed, strange results are produced; not knowing this, many people get desperate about diversions. . To ensure that a diversion works, line breaks should be added at the right places. . To be on the secure side, enclose everything that has to do with diversions into a pair of line breaks; for example, by explicitly using .B .br requests. . This rule should be applied to diversion definition, both inside and outside, and to all calls of diversions. . This is a bit of overkill, but it works nicely. . . .P [If you really need diversions which should ignore the current partial line, use environments to save the current partial line and/\:or use the .B .box request.] . . .P The most powerful feature using diversions is to start a diversion within a macro definition and end it within another macro. . Then everything between each call of this macro pair is stored within the diversion and can be manipulated from within the macros. . . .\" -------------------------------------------------------------------- .SH FILES .\" -------------------------------------------------------------------- . All macro names must be named .IB name .tmac to fully use the tmac mechanism. . .BI tmac. name as with classical packages is possible as well, but deprecated. . . .P The macro files are kept in the .IR "tmac directories" ; a colon separated list of these constitutes the .IR "tmac path" . . . .P The search sequence for macro files is (in that order): . .IP \(bu the directories specified with troff/groff's .B \-M command line option . .IP \(bu the directories given in the .B $GROFF_TMAC_PATH environment variable . .IP \(bu the current directory (only if in unsafe mode, which is enabled by the .B \-U command line switch) . .IP \(bu the home directory . .IP \(bu a platform-specific directory, being . .RS .IP .B @SYSTEMMACRODIR@ .RE . .IP in this installation . .IP \(bu a site-specific (platform-independent) directory, being . .RS .IP .B @LOCALMACRODIR@ .RE . .IP in this installation . .IP \(bu the main tmac directory, being . .RS .IP .B @MACRODIR@ .RE . .IP in this installation . . .\" -------------------------------------------------------------------- .SH ENVIRONMENT .\" -------------------------------------------------------------------- . .TP .B $GROFF_TMAC_PATH A colon separated list of additional tmac directories in which to search for macro files. . See the previous section for a detailed description. . . .\" -------------------------------------------------------------------- .SH AUTHOR .\" -------------------------------------------------------------------- . Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. . .P This document is distributed under the terms of the FDL (GNU Free Documentation License) version 1.3 or later. . You should have received a copy of the FDL on your system, it is also available on-line at the .UR http://\:www.gnu.org/\:copyleft/\:fdl.html GNU copyleft site .UE . . .P This document is part of .IR groff , the GNU roff distribution. . It was written by .MT groff-bernd.warken-72@web.de Bernd Warken .ME ; it is maintained by .MT wl@gnu.org Werner Lemberg .ME . . . .\" -------------------------------------------------------------------- .SH "SEE ALSO" .\" -------------------------------------------------------------------- . A complete reference for all parts of the groff system is found in the groff .BR info (1) file. . . .TP .BR groff (@MAN1EXT@) an overview of the groff system. . . .TP .BR groff_man (@MAN7EXT@), .TQ .BR groff_mdoc (@MAN7EXT@), .TQ .BR groff_me (@MAN7EXT@), .TQ .BR groff_mm (@MAN7EXT@), .TQ .BR groff_mom (@MAN7EXT@), .TQ .BR groff_ms (@MAN7EXT@), .TQ .BR groff_trace (@MAN7EXT@), .TQ .BR groff_www (@MAN7EXT@). the groff tmac macro packages. . . .TP .BR groff (@MAN7EXT@) the groff language. . . .P The Filesystem Hierarchy Standard is available at the .UR http://\:www.pathname.com/\:fhs/ FHS web site .UE . . .\" Local Variables: .\" mode: nroff .\" End: groff-1.22.2/man/Makefile.sub0000644000175000001440000000020312104714260014235 0ustar wlusersMAN5=\ groff_font.n \ groff_out.n \ groff_tmac.n MAN7=\ ditroff.n \ groff_char.n \ groff_diff.n \ groff.n \ roff.n groff-1.22.2/man/ditroff.man0000644000175000001440000001076112104714260014151 0ustar wlusers.ig ditroff.man This file is part of groff, the GNU roff type-setting system. Copyright (C) 2001, 2002, 2004, 2007-2009, 2012 Free Software Foundation, Inc. written by Bernd Warken maintained by Werner Lemberg Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being this .ig-section and AUTHORS, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the Free Documentation License is included as a file called FDL in the main directory of the groff source package. .. . . .\" -------------------------------------------------------------------- .\" Title .\" -------------------------------------------------------------------- . .TH DITROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" . . .SH NAME ditroff \- classical device independent roff . . .\" -------------------------------------------------------------------- .SH DESCRIPTION .\" -------------------------------------------------------------------- . The name .I ditroff once marked a development level of the .I troff text processing system. . In actual .BR roff (@MAN7EXT@) systems, the name .I troff is used as a synonym for .IR ditroff . . .P The first roff system was written by Joe Ossanna around 1973. . It supported only two output devices, the .B nroff program produced text oriented tty output, while the .B troff program generated graphical output for exactly one output device, the Wang .I Graphic Systems CAT typesetter. . .P In 1979, Brian Kernighan rewrote troff to support more devices by creating an intermediate output format for troff that can be fed into postprocessor programs which actually do the printout on the device. . Kernighan's version marks what is known as .I classical troff today. . In order to distinguish it from Ossanna's original mono-device version, it was called .I ditroff .RI ( d "evice " i "ndependent " troff ) on some systems, though this naming isn't mentioned in the classical documentation. . .P Today, any existing roff system is based on Kernighan's multi-device troff. . The distinction between .I troff and .I ditroff isn't necessary any longer, for each modern .I troff provides already the complete functionality of .IR ditroff . . On most systems, the name .I troff is used to denote .IR ditroff . . .P The easiest way to use ditroff is the GNU roff system, .IR groff . The .BR groff (@MAN1EXT@) program is a wrapper around .I (di)troff that automatically handles postprocessing. . . .\" -------------------------------------------------------------------- .SH "SEE ALSO" .\" -------------------------------------------------------------------- . .TP .I [CSTR\~#54] The 1992 revision of the .I Nroff/Troff User's Manual by .I J.\& F.\& Ossanna and .IR "Brian Kernighan" , see .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:54.ps.gz Bell Labs CSTR\~#54 .UE . . .TP .I [CSTR\~#97] .I A Typesetter-independent TROFF by .I Brian Kernighan is the original documentation of the first multi-device troff .RI ( ditroff ), see .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:97.ps.gz Bell Labs CSTR\~#97 .UE . . .TP .BR roff (@MAN7EXT@) This document gives details on the history and concepts of roff. . .TP .BR @g@troff (@MAN1EXT@) The actual implementation of .IR ditroff . . .TP .BR groff (@MAN1EXT@) The GNU roff program and pointers to all documentation around groff. . .TP .BR groff_out (@MAN5EXT@) The groff version of the intermediate output language, the basis for multi-devicing. . . .\" -------------------------------------------------------------------- .SH "AUTHORS" .\" -------------------------------------------------------------------- . Copyright (C) 2001, 2002, 2004, 2007\-2009, 2012 Free Software Foundation, Inc. . .P This document is distributed under the terms of the FDL (GNU Free Documentation License) version 1.3 or later. . You should have received a copy of the FDL on your system, it is also available on-line at the .UR http://\:www.gnu.org/\:copyleft/\:fdl.html GNU copyleft site .UE . . .P This document is part of .IR groff , the GNU roff distribution. . It was written by .MT groff-bernd.warken-72@\:web.de Bernd Warken .ME and is maintained by .MT wl@\:gnu.org Werner Lemberg .ME . . . .\" -------------------------------------------------------------------- .\" Emacs settings .\" -------------------------------------------------------------------- .\" .\" Local Variables: .\" mode: nroff .\" End: groff-1.22.2/config.rpath0000755000175000001440000004443512104714256013566 0ustar wlusers#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2012 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; nagfor*) wl='-Wl,-Wl,,' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; xl* | bgxl* | bgf* | mpixl*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) wl= ;; *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; newsos6) ;; *nto* | *qnx*) ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) wl='-Qoption ld ' ;; *) wl='-Wl,' ;; esac ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; haiku*) ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) case "$host_cpu" in powerpc*) library_names_spec='$libname$shrext' ;; m68k) library_names_spec='$libname.a' ;; esac ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; esac ;; gnu*) library_names_spec='$libname$shrext' ;; haiku*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; tpf*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <, July 2002 # In Unixland, the magic is in knowing what to string together... # # Take a pic/eqn diagram on stdin, emit cropped bitmap on stdout. # The pic markup should *not* be wrapped in .PS/.PE, this script will do that. # An -unsafe 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). An -eqn option changes the eqn delimiters. # All other options are passed to convert(1). The default format in 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. Only the -U option of gpic(1) is relevant. -C doesn't matter because # we're generating our own .PS/.PE, -[ntcz] are irrelevant because we're # generating Postscript. # # 2. Ditto for groff(1), though it's a longer and more tedious demonstration. # # 3. Many options of convert(1) are potentially relevant (especially # -density, -interlace, -transparency, -border, and -comment). # # Thus, we pass -U to gpic and groff, and everything else to convert(1). # # We don't have complete option coverage on eqn because this is primarily # intended as a pic translator; we can live with eqn defaults. # # $Id: pic2graph.sh,v 1.9 2010/02/25 20:17:13 wl Exp $ # groffpic_opts="" gs_opts="" convert_opts="" format="png" eqndelim='$$' while [ "$1" ] do case $1 in -unsafe) groffpic_opts="-U";; -format) format=$2 shift;; -eqn) eqndelim=$2 shift;; -v | --version) echo "GNU pic2graph (groff) version @VERSION@" exit 0;; --help) echo "usage: pic2graph [ option ...] < in > out" exit 0;; *) convert_opts="$convert_opts $1";; esac shift done if [ "$eqndelim" ] then eqndelim="delim $eqndelim" fi # 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/pic2graph-XXXXXX") 2> /dev/null` \ && test -n "$tmp" && test -d "$tmp" \ && break tmp=$d/pic2graph$$-$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' EXIT INT TERM # Here goes: # 1. Wrap the input in dummy .PS/PE macros (and add possibly null .EQ/.EN) # 2. Process through eqn and pic to emit troff markup. # 3. Process through groff to emit Postscript. # 4. Use convert(1) to crop the PostScript and turn it into a bitmap. (echo ".EQ"; echo $eqndelim; echo ".EN"; echo ".PS"; cat; echo ".PE") | \ groff -e -p $groffpic_opts -Tps -P-pletter > $tmp/pic2graph.ps \ && convert -trim $convert_opts $tmp/pic2graph.ps $tmp/pic2graph.$format \ && cat $tmp/pic2graph.$format # End groff-1.22.2/contrib/pic2graph/pic2graph.man0000644000175000001440000000760612104714260017143 0ustar wlusers.\" $Id: pic2graph.man,v 1.7 2008/09/29 21:55:15 wl Exp $ .\" This documentation is released to the public domain. .TH PIC2GRAPH @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" .IX pic2graph .SH NAME pic2graph \- convert a PIC diagram into a cropped image . . .SH SYNOPSIS .B pic2graph [ .B \-unsafe ] [ .BI \-format\ fmt ] [ .BI \-eqn\ delim ] . . .SH DESCRIPTION Reads a PIC program as input; produces an image file (by default in Portable Network Graphics format) suitable for the Web as output. Also translates .BR @g@eqn (@MAN1EXT@) constructs, so it can be used for generating images of mathematical formulae. .P PIC is a rather expressive graphics minilanguage suitable for producing box-and-arrow diagrams of the kind frequently used in technical papers and textbooks. The language is sufficiently flexible to be quite useful for state charts, Petri-net diagrams, flow charts, simple circuit schematics, jumper layouts, and other kinds of illustration involving repetitive uses of simple geometric forms and splines. Because PIC descriptions are procedural and object-based, they are both compact and easy to modify. .P The PIC language is fully documented in .IR "Making Pictures With GNU PIC" , a document which is part of the .BR groff (@MAN1EXT@) distribution. .P Your input PIC code should .I not be wrapped with the \&.PS and \&.PE macros that normally guard it within .BR groff (@MAN1EXT@) macros. .P The output image will be clipped to the smallest possible bounding box that contains all the black pixels. Older versions of .BR \%convert (1) will produce a black-on-white graphic; newer ones may produce a black-on-transparent graphic. By specifying command-line options to be passed to .BR \%convert (1) you can give it a border, force the background transparent, set the image's pixel density, or perform other useful transformations. .P This program uses .BR @g@pic (@MAN1EXT@), .BR @g@eqn (@MAN1EXT@), .BR groff (@MAN1EXT@), .BR gs (1), and the ImageMagick .BR \%convert (1) program. These programs must be installed on your system and accessible on your $PATH for .B pic2graph 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. .TP .BI \-eqn\ delim Change the fencepost characters that delimit .BR @g@eqn (@MAN1EXT@) directives .RB ( $ and .BR $ , by default). This option requires an argument, but an empty string is accepted as a directive to disable .BR @g@eqn (@MAN1EXT@) processing. .PP Command-line switches and arguments not listed above are passed to .BR \%convert (1). . . .SH FILES .TP \w'\fB@MACRODIR@/eqnrc'u+2n .B @MACRODIR@/eqnrc The .BR @g@eqn (@MAN1EXT@) initialization file. . . .SH ENVIRONMENT .TP .B GROFF_TMPDIR The directory in which temporary files will be created. If this is not set .B pic2graph searches the environment variables .BR \%TMPDIR , .BR TMP , and .B TEMP (in that order). Otherwise, temporary files will be created in .BR /tmp . . . .SH BUGS Due to changes in the behavior of ImageMagick .BR \%convert (1) that are both forward and backward-incompatible, mismatches between your .B pic2graph and .BR \%convert (1) versions may produce zero-sized or untrimmed output images. For this version of .B pic2graph you will need a version of .BR \%convert (1) that supports the .B \-trim option; older versions of .B pic2graph used .BR \-crop\~0x0 , which no longer has trimming behavior. . . .SH "SEE ALSO" .BR eqn2graph (@MAN1EXT@), .BR grap2graph (@MAN1EXT@), .BR @g@pic (@MAN1EXT@), .BR @g@eqn (@MAN1EXT@), .BR groff (@MAN1EXT@), .BR gs (1), .BR \%convert (1). . . .SH AUTHOR Eric S. Raymond , based on a recipe by W. Richard Stevens. . .\" Local Variables: .\" mode: nroff .\" End: groff-1.22.2/contrib/pic2graph/Makefile.sub0000644000175000001440000000231612104714260017010 0ustar wlusers# Copyright (C) 2001, 2006, 2009 # 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 3 of the License, 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 this program. If not, see . # # Makefile.sub # MAN1=pic2graph.n MOSTLYCLEANADD=pic2graph all: pic2graph pic2graph: pic2graph.sh rm -f $@; \ sed -e "s|@g@|$(g)|g" \ -e "s|@VERSION@|$(version)$(revision)|" \ -e $(SH_SCRIPT_SED_CMD) $(srcdir)/pic2graph.sh >$@; \ chmod +x $@ install_data: pic2graph -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) -rm -f $(DESTDIR)$(bindir)/pic2graph $(INSTALL_SCRIPT) pic2graph $(DESTDIR)$(bindir)/pic2graph uninstall_sub: -rm -f $(DESTDIR)$(bindir)/pic2graph groff-1.22.2/contrib/chem/0000755000175000001440000000000012104714260013613 5ustar wlusersgroff-1.22.2/contrib/chem/chem.pl0000755000175000001440000007126512104714260015102 0ustar wlusers#! /usr/bin/env perl # chem - a groff preprocessor for producing chemical structure diagrams # Source file position: /contrib/chem/chem.pl # Installed position: /bin/chem # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Written by Bernd Warken . # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## # settings ######################################################################## my $Program_Version = '0.3.1'; my $Last_Update = '03 Jan 2009'; # this setting of the groff version is only used before make is run, # otherwise @VERSION@ will set it. my $Groff_Version_Preset='1.20preset'; # test on Perl version require v5.6; ######################################################################## # begin ######################################################################## use warnings; use strict; use Math::Trig; # for catfile() use File::Spec; # $Bin is the directory where this script is located use FindBin; my $Chem_Name; my $Groff_Version; my $File_chem_pic; my $File_pic_tmac; BEGIN { { my $before_make; # script before run of `make' { my $at = '@'; $before_make = 1 if '@VERSION@' eq "${at}VERSION${at}"; } my %at_at; if ($before_make) { my $chem_dir = $FindBin::Bin; $at_at{'BINDIR'} = $chem_dir; $at_at{'G'} = ''; $File_chem_pic = File::Spec->catfile($chem_dir, 'chem.pic'); $File_pic_tmac = File::Spec->catfile($chem_dir, '..', 'pic.tmac'); $Groff_Version = ''; $Chem_Name = 'chem'; } else { $Groff_Version = '@VERSION@'; $at_at{'BINDIR'} = '@BINDIR@'; $at_at{'G'} = '@g@'; $at_at{'PICDIR'} = '@PICDIR@'; $at_at{'TMACDIR'} = '@MACRODIR@'; $File_chem_pic = File::Spec->catfile($at_at{'PICDIR'}, 'chem.pic'); $File_pic_tmac = File::Spec->catfile($at_at{'TMACDIR'}, 'pic.tmac'); $Chem_Name = $at_at{'G'} . 'chem'; } } } ######################################################################## # check the parameters ######################################################################## if (@ARGV) { # process any FOO=bar switches # eval '$'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_0-9]+=)(.*)/ && shift; my @filespec = (); my $dbl_minus; my $wrong; foreach (@ARGV) { next unless $_; if (/=/) { # ignore FOO=bar switches push @filespec, $_ if -f; next; } if ($dbl_minus) { if (-f $_) { push @filespec, $_ if -s $_; } else { warn "chem: argument $_ is not an existing file.\n"; $wrong = 1; } next; } if (/^--$/) { $dbl_minus = 1; next; } if (/^-$/) { push @filespec, $_; next; } if (/^-h$/ or '--help' =~ /^$_/) { &usage(); exit 0; } if (/^-v$/ or '--version' =~ /^$_/) { &version(); exit 0; } if (-f $_) { push @filespec, $_ if -s $_; } else { $wrong = 1; if (/^-/) { warn "chem: wrong option ${_}.\n"; } else { warn "chem: argument $_ is not an existing file.\n"; } } } if (@filespec) { @ARGV = @filespec; } else { exit 0 if $wrong; @ARGV = ('-'); } } else { # @ARGV is empty @ARGV = ('-') unless @ARGV; } ######################################################################## # main process ######################################################################## my %Dc = ( 'up' => 0, 'right' => 90, 'down' => 180, 'left' => 270, 'ne' => 45, 'se' => 135, 'sw' => 225, 'nw' => 315, 0 => 'n', 90 => 'e', 180 => 's', 270 => 'w', 30 => 'ne', 45 => 'ne', 60 => 'ne', 120 => 'se', 135 => 'se', 150 => 'se', 210 => 'sw', 225 => 'sw', 240 => 'sw', 300 => 'nw', 315 => 'nw', 330 => 'nw', ); my $Word_Count; my @Words; my $Line_No; my $Last_Name = ''; # from init() my $First_Time = 1; my $Last_Type; my $Dir; # direction my %Types = ( 'RING' => 'R', 'MOL' => 'M', 'BOND' => 'B', 'OTHER' => 'O' # manifests ); # from setparams() my %Params; # from ring() my $Nput; my $Aromatic; my %Put; my %Dbl; my %Labtype; my %Define = (); my $File_Name = ''; my $Line = ''; &main(); { my $is_pic = ''; my $is_chem = ''; my $former_line = ''; ########## # main() # sub main { my $count_minus = 0; my @stdin = (); my $stdin = 0; # for centralizing the pic code open TMAC, "<$File_pic_tmac" and print ; close TMAC; foreach (@ARGV) { $count_minus++ if /^-$/; } foreach my $arg (@ARGV) { &setparams(1.0); next unless $arg; $Line_No = 0; $is_pic = ''; $is_chem = ''; if ($arg eq '-') { $File_Name = 'standard input'; if ($stdin) { &main_line($_) foreach @stdin; } else { $stdin = 1; if ($count_minus <= 1) { while () { &main_line($_); } } else { @stdin = (); while () { push @stdin, $_; &main_line($_); } } } ### main() } else { # $arg is not - $File_Name = $arg; open FILE, "<$arg"; &main_line($_) while ; close FILE; } # if $arg if ($is_pic) { printf ".PE\n"; } } } # main() ########## # main_line() # sub main_line { my $line = $_[0]; # $Last_Type = $Types{'OTHER'}; # $Last_Type = ''; my $stack; $Line_No++; chomp $line; $line = $former_line . $line if $former_line; if ($line =~ /^(.*)\\$/) { $former_line = $1; return 1; } else { $former_line = ''; } $Line = $line; { @Words = (); my $s = $line; $s =~ s/^\s*//; $s =~ s/\s+$//; return 1 unless $s; $s = " $s"; $s =~ s/\s+#.*$// if $is_pic; return 1 unless $s; $line = $s; $line =~ s/^\s*|\s*$//g; my $bool = 1; while ($bool) { $s =~ /^([^"]*)\s("[^"]*"?\S*)(.*)$/; if (defined $1) { my $s1 = $1; my $s2 = $2; $s = $3; $s1 =~ s/^\s*|\s*$//g; push @Words, split(/\s+/, $s1) if $s1; push @Words, $s2; } if ($s !~ /\s"/) { $s =~ s/^\s*|\s*$//g; push @Words, split(/\s+/, $s) if $s; $bool = 0; } } # @Words = split(/\s+/, $s); return 1 unless @Words; # foreach my $i (0..$#Words) { # if ($Words[$i] =~ /^\s*#/) { # $#Words = $i - 1; # last; # } # } # return 1 unless @Words; } if ($line =~ /^([\.']\s*PS\s*)|([\.']\s*PS\s.+)$/) { # .PS unless ($is_pic) { $is_pic = 'running'; print "$line\n"; } return 1; } ### main_line() if ( $line =~ /^([\.']\s*PE\s*)|([\.']\s*PE\s.+)$/ ) { # .PE $is_chem = ''; if ($is_pic) { $is_pic = ''; print "$line\n"; } return 1; } if ($line =~ /^[\.']\s*cstart\s*$/) { # line: `.cstart' if ($is_chem) { &error("additional `.cstart'; chem is already active."); return 1; } unless ($is_pic) { &print_ps(); $is_pic = 'by chem'; } $is_chem = '.cstart'; &init(); return 1; } ### main_line() if ($line =~ /^\s*begin\s+chem\s*$/) { # line: `begin chem' if ($is_pic) { if ($is_chem) { &error("additional `begin chem'; chem is already active."); return 1; } $is_chem = 'begin chem'; &init(); } else { print "$line\n"; } return 1; } if ($line =~ /^[\.']\s*cend\s*/) { # line `.cend' if ($is_chem) { &error("you end chem with `.cend', but started it with `begin chem'.") if $is_chem eq 'begin chem'; if ($is_pic eq 'by chem') { &print_pe(); $is_pic = ''; } $is_chem = ''; } else { print "$line\n"; } return 1; } if ($line =~ /^\s*end\s*$/) { # line: `end' if ($is_chem) { &error("you end chem with `end', but started it with `.cstart'.") if $is_chem eq '.cstart'; if ($is_pic eq 'by chem') { &print_pe(); $is_pic = ''; } $is_chem = ''; } else { print "$line\n"; } return 1; } ### main_line() if (! $is_chem) { print "$line\n"; return 1; } if ($line =~ /^[.']/) { # groff request line print "$line\n"; return 1; } if ($Words[0] eq 'pic') { # pic pass-thru return 1 if $#Words == 0; my $s = $line; $s =~ /^\s*pic\s*(.*)$/; $s = $1; print "$s\n" if $s; $Last_Type = $Types{'OTHER'}; $Define{ $Words[2] } = 1 if $#Words >= 2 && $Words[1] eq 'define'; return 1; } if ($Words[0] eq 'textht') { if ($#Words == 0) { &error("`textht' needs a single argument."); return 0; } &error("only the last argument is taken for `textht', " . "all others are ignored.") unless $#Words <= 1 or ($#Words == 2 && $Words[1] =~ /^=/); $Params{'textht'} = $Words[$#Words]; return 1; } ### main_line() if ($Words[0] eq 'cwid') { # character width if ($#Words == 0) { &error("`cwid' needs a single argument."); return 0; } &error("only the last argument is taken for `cwid', " . "all others are ignored.") unless $#Words <= 1 or ($#Words == 2 && $Words[1] =~ /^=/); $Params{'cwid'} = $Words[$#Words]; return 1; } if ($Words[0] eq 'db') { # bond length if ($#Words == 0) { &error("`db' needs a single argument."); return 0; } &error("only the last argument is taken for `db', " . "all others are ignored.") unless $#Words <= 1 or ($#Words == 2 && $Words[1] =~ /^=/); $Params{'db'} = $Words[$#Words]; return 1; } if ($Words[0] eq 'size') { # size for all parts of the whole diagram my $size; if ($#Words == 0) { &error("`size' needs a single argument."); return 0; } &error("only the last argument is taken for `size', " . "all others are ignored.") unless $#Words <= 1 or ($#Words == 2 && $Words[1] =~ /^=/); if ($Words[$#Words] <= 4) { $size = $Words[$#Words]; } else { $size = $Words[$#Words] / 10; } &setparams($size); return 1; } ### main_line() print "\n#", $Line, "\n"; # debugging, etc. $Last_Name = ''; # $Last_Type = $Types{'OTHER'}; # $Last_Type = ''; if ($Words[0] =~ /^[A-Z].*:$/) { # label; falls thru after shifting left my $w = $Words[0]; $Last_Name = $w; $Last_Name =~ s/:$//; print "$w"; shift @Words; if (@Words) { print " "; $line =~ s/^\s*$w\s*//; } else { print "\n"; return 1; } } if ($Words[0] eq 'define') { print "$line\n"; $Define{ $Words[1] } = 1 if $#Words >= 1; $Last_Type = $Types{'OTHER'}; return 1; } if ($Words[0] =~ /^[\[\]{}]/) { print "$line\n"; $Last_Type = $Types{'OTHER'}; return 1; } if ($Words[0] =~ /^"/) { print 'Last: ', $line, "\n"; $Last_Type = $Types{'OTHER'}; return 1; } if ($Words[0] =~ /bond/) { &bond($Words[0]); return 1; } if ($#Words >= 1) { if ($Words[0] =~ /^(double|triple|front|back)$/ && $Words[1] eq 'bond') { my $w = shift @Words; $Words[0] = $w . $Words[0]; &bond($Words[0]); return 1; } if ($Words[0] eq 'aromatic') { my $temp = $Words[0]; $Words[0] = $Words[1] ? $Words[1] : ''; $Words[1] = $temp; } } if ($Words[0] =~ /ring|benz/) { &ring($Words[0]); return 1; } if ($Words[0] eq 'methyl') { # left here as an example $Words[0] = 'CH3'; } ### main_line() if ($Words[0] =~ /^[A-Z]/) { &molecule(); return 1; } if ($Words[0] eq 'left') { my %left; # not used $left{++$stack} = &fields(1, $#Words); printf (("Last: [\n")); return 1; } if ($Words[0] eq 'right') { &bracket(); $stack--; return 1; } if ($Words[0] eq 'label') { # prints the vertex numbers in a ring if ( exists $Labtype{$Words[1]} and $Labtype{$Words[1]} =~ /^$Types{'RING'}/ ) { my $v = substr($Labtype{$Words[1]}, 1, 1); $Words[1] = '' unless $Words[1]; foreach my $i ( 1..$v ) { printf "\"\\s-3%d\\s0\" at 0.%d<%s.C,%s.V%d>\n", $i, $v + 2, $Words[1], $Words[1], $i; } } else { &error("$Words[1] is not a ring."); } return 1; } if ( exists $Define{ $Words[0] } ) { print $line, "\n"; $Last_Type = $Types{'OTHER'}; return 1; } return 1 unless $line; # print STDERR "# $Line\n"; # &error('This is not a chem command. To include a command for pic, ' . # "add `pic' as the first word to the command."); print $line, "\n"; $Last_Type = $Types{'OTHER'}; 1; } # main_line() } ######################################################################## # functions ######################################################################## ########## # atom() # sub atom { # convert CH3 to atom(...) my ($s) = @_; my ($i, $n, $nsub, $cloc, $nsubc, @s); if ($s eq "\"\"") { return $s; } $n = length($s); $nsub = $nsubc = 0; $cloc = index($s, 'C'); if (! defined($cloc) || $cloc < 0) { $cloc = 0; } @s = split('', $s); $i = 0; foreach (@s) { unless (/[A-Z]/) { $nsub++; $nsubc++ if $i < $cloc; $i++; } } $s =~ s/([0-9]+\.[0-9]+)|([0-9]+)/\\s-3\\d$&\\u\\s+3/g; if ($s =~ /([^0-9]\.)|(\.[^0-9])/) { # centered dot $s =~ s/\./\\v#-.3m#.\\v#.3m#/g; } sprintf( "atom(\"%s\", %g, %g, %g, %g, %g, %g)", $s, ($n - $nsub / 2) * $Params{'cwid'}, $Params{'textht'}, ($cloc - $nsubc / 2 + 0.5) * $Params{'cwid'}, $Params{'crh'}, $Params{'crw'}, $Params{'dav'} ); } # atom() ########## # bond() # sub bond { my ($type) = @_; my ($i, $moiety, $from, $leng); $moiety = ''; for ($i = 1; $i <= $#Words; $i++) { if ($Words[$i] eq ';') { &error("a colon `;' must be followed by a space and a single word.") if $i != $#Words - 1; $moiety = $Words[$i + 1] if $#Words > $i; $#Words = $i - 1; last; } } $leng = $Params{'db'}; # bond length $from = ''; for ($Word_Count = 1; $Word_Count <= $#Words; ) { if ($Words[$Word_Count] =~ /(\+|-)?\d+|up|down|right|left|ne|se|nw|sw/) { $Dir = &cvtdir($Dir); } elsif ($Words[$Word_Count] =~ /^leng/) { $leng = $Words[$Word_Count + 1] if $#Words > $Word_Count; $Word_Count += 2; } elsif ($Words[$Word_Count] eq 'to') { $leng = 0; $from = &fields($Word_Count, $#Words); last; } elsif ($Words[$Word_Count] eq 'from') { $from = &dofrom(); last; } elsif ($Words[$Word_Count] =~ /^#/) { $Word_Count = $#Words + 1; last; } else { $from = &fields($Word_Count, $#Words); last; } } ### bond() if ($from =~ /( to )|^to/) { # said "from ... to ...", so zap length $leng = 0; } elsif (! $from) { # no from given at all $from = 'from Last.' . &leave($Last_Type, $Dir) . ' ' . &fields($Word_Count, $#Words); } printf "Last: %s(%g, %g, %s)\n", $type, $leng, $Dir, $from; $Last_Type = $Types{'BOND'}; $Labtype{$Last_Name} = $Last_Type if $Last_Name; if ($moiety) { @Words = ($moiety); &molecule(); } } # bond() ########## # bracket() # sub bracket { my $t; printf (("]\n")); if ($Words[1] && $Words[1] eq ')') { $t = 'spline'; } else { $t = 'line'; } printf "%s from last [].sw+(%g,0) to last [].sw to last [].nw to last " . "[].nw+(%g,0)\n", $t, $Params{'dbrack'}, $Params{'dbrack'}; printf "%s from last [].se-(%g,0) to last [].se to last [].ne to last " . "[].ne-(%g,0)\n", $t, $Params{'dbrack'}, $Params{'dbrack'}; if ($Words[2] && $Words[2] eq 'sub') { printf "\" %s\" ljust at last [].se\n", &fields(3, $#Words); } } # bracket() ########## # corner() # # Return the corner name next to the given angle. # sub corner { my ($d) = @_; $Dc{ (45 * int(($d + 22.5) / 45)) % 360 }; } # corner() ########## # cvtdir() # # Maps "[pointing] somewhere" to degrees. # sub cvtdir { my ($d) = @_; if ($Words[$Word_Count] eq 'pointing') { $Word_Count++; } if ($Words[$Word_Count] =~ /^[+\\-]?\d+/) { return ( $Words[$Word_Count++] % 360 ); } elsif ($Words[$Word_Count] =~ /left|right|up|down|ne|nw|se|sw/) { return ( $Dc{$Words[$Word_Count++]} % 360 ); } else { $Word_Count++; return $d; } } # cvtdir() ########## # dblring() # sub dblring { my ($v) = @_; my ($d, $v1, $v2); # should canonicalize to i,i+1 mod v $d = $Words[$Word_Count]; for ($Word_Count++; $Word_Count <= $#Words && $Words[$Word_Count] =~ /^[1-9]/; $Word_Count++) { $v1 = substr($Words[$Word_Count], 0, 1); $v2 = substr($Words[$Word_Count], 2, 1); if ($v2 == $v1 + 1 || $v1 == $v && $v2 == 1) { # e.g., 2,3 or 5,1 $Dbl{$v1} = $d; } elsif ($v1 == $v2 + 1 || $v2 == $v && $v1 == 1) { # e.g., 3,2 or 1,5 $Dbl{$v2} = $d; } else { &error(sprintf("weird %s bond in\n\t%s", $d, $_)); } } } # dblring() ########## # dofrom() # sub dofrom { my $n; $Word_Count++; # skip "from" $n = $Words[$Word_Count]; if (defined $Labtype{$n}) { # "from Thing" => "from Thing.V.s" return 'from ' . $n . '.' . &leave($Labtype{$n}, $Dir); } if ($n =~ /^\.[A-Z]/) { # "from .V" => "from Last.V.s" return 'from Last' . $n . '.' . &corner($Dir); } if ($n =~ /^[A-Z][^.]*\.[A-Z][^.]*$/) { # "from X.V" => "from X.V.s" return 'from ' . $n . '.' . &corner($Dir); } &fields($Word_Count - 1, $#Words); } # dofrom() ########## # error() # sub error { my ($s) = @_; printf STDERR "chem: error in %s on line %d: %s\n", $File_Name, $Line_No, $s; } # error() ########## # fields(, ) # sub fields { my ($n1, $n2) = @_; if ($n1 > $n2) { return ''; } my $s = ''; foreach my $i ($n1..$n2) { if ($Words[$i] =~ /^#/) { last; } $s = $s . $Words[$i] . ' '; } $s; } # fields() ########## # init() # sub init { if ($First_Time) { printf "copy \"%s\"\n", $File_chem_pic; printf "\ttextht = %g; textwid = .1; cwid = %g\n", $Params{'textht'}, $Params{'cwid'}; printf "\tlineht = %g; linewid = %g\n", $Params{'lineht'}, $Params{'linewid'}; $First_Time = 0; } printf "Last: 0,0\n"; $Last_Type = $Types{'OTHER'}; $Dir = 90; } # init() ########## # leave(, ) # sub leave { my ($last, $d) = @_; my ($c, $c1); # return vertex of $last in direction $d if ( $last eq $Types{'BOND'} ) { return 'end'; } $d %= 360; if ( $last =~ /^$Types{'RING'}/ ) { return &ringleave($last, $d); } if ( $last eq $Types{'MOL'} ) { if ($d == 0 || $d == 180) { $c = 'C'; } elsif ($d > 0 && $d < 180) { $c = 'R'; } else { $c = 'L'; } if (defined $Dc{$d}) { $c1 = $Dc{$d}; } else { $c1 = &corner($d); } return sprintf('%s.%s', $c, $c1); } if ( $last eq $Types{'OTHER'} ) { return &corner($d); } 'c'; } # leave() ########## # makering(, , ) # sub makering { my ($type, $pt, $v) = @_; my ($i, $j, $a, $r, $rat, $fix, $c1, $c2); if ($type =~ /flat/) { $v = 6; # vertices ; } $r = $Params{'ringside'} / (2 * sin(pi / $v)); printf "\tC: 0,0\n"; for ($i = 0; $i <= $v + 1; $i++) { $a = (($i - 1) / $v * 360 + $pt) / 57.29578; # 57. is $deg printf "\tV%d: (%g,%g)\n", $i, $r * sin($a), $r * cos($a); } if ($type =~ /flat/) { printf "\tV4: V5; V5: V6\n"; $v = 5; } # sides if ($Nput > 0) { # hetero ... for ($i = 1; $i <= $v; $i++) { $c1 = $c2 = 0; if ($Put{$i} ne '') { printf "\tV%d: ellipse invis ht %g wid %g at V%d\n", $i, $Params{'crh'}, $Params{'crw'}, $i; printf "\t%s at V%d\n", $Put{$i}, $i; $c1 = $Params{'cr'}; } $j = $i + 1; if ($j > $v) { $j = 1; } ### makering() if ($Put{$j} ne '') { $c2 = $Params{'cr'}; } printf "\tline from V%d to V%d chop %g chop %g\n", $i, $j, $c1, $c2; if ($Dbl{$i} ne '') { # should check i to %g chop %g chop %g\n", $rat, $i, $rat, $j, $c1, $c2; if ($Dbl{$i} eq 'triple') { printf "\tline from %g to %g chop %g chop %g\n", 2 - $rat, $i, 2 - $rat, $j, $c1, $c2; } } } ### makering() } else { # regular for ($i = 1; $i <= $v; $i++) { $j = $i + 1; if ($j > $v) { $j = 1; } printf "\tline from V%d to V%d\n", $i, $j; if ($Dbl{$i} ne '') { # should check i to %g\n", $rat, $i, $rat, $j; if ($Dbl{$i} eq 'triple') { printf "\tline from %g to %g\n", 2 - $rat, $i, 2 - $rat, $j; } } } } ### makering() # punt on triple temporarily # circle if ($type =~ /benz/ || $Aromatic > 0) { if ($type =~ /flat/) { $r *= .4; } else { $r *= .5; } printf "\tcircle rad %g at 0,0\n", $r; } } # makering() ########## # molecule() # sub molecule { my ($n, $type); if ($#Words >= 0) { $n = $Words[0]; if ($n eq 'BP') { $Words[0] = "\"\" ht 0 wid 0"; $type = $Types{'OTHER'}; } else { $Words[0] = &atom($n); $type = $Types{'MOL'}; } } $n =~ s/[^A-Za-z0-9]//g; # for stuff like C(OH3): zap non-alnum if ($#Words < 1) { printf "Last: %s: %s with .%s at Last.%s\n", $n, join(' ', @Words), &leave($type, $Dir + 180), &leave($Last_Type, $Dir); ### molecule() } else { if (! $Words[1]) { printf "Last: %s: %s with .%s at Last.%s\n", $n, join(' ', @Words), &leave($type, $Dir + 180), &leave($Last_Type, $Dir); } elsif ($#Words >= 1 and $Words[1] eq 'below') { $Words[2] = '' if ! $Words[2]; printf "Last: %s: %s with .n at %s.s\n", $n, $Words[0], $Words[2]; } elsif ($#Words >= 1 and $Words[1] eq 'above') { $Words[2] = '' if ! $Words[2]; printf "Last: %s: %s with .s at %s.n\n", $n, $Words[0], $Words[2]; } elsif ($#Words >= 2 and $Words[1] eq 'left' && $Words[2] eq 'of') { $Words[3] = '' if ! $Words[3]; printf "Last: %s: %s with .e at %s.w+(%g,0)\n", $n, $Words[0], $Words[3], $Params{'dew'}; } elsif ($#Words >= 2 and $Words[1] eq 'right' && $Words[2] eq 'of') { $Words[3] = '' if ! $Words[3]; printf "Last: %s: %s with .w at %s.e-(%g,0)\n", $n, $Words[0], $Words[3], $Params{'dew'}; } else { printf "Last: %s: %s\n", $n, join(' ', @Words); } } $Last_Type = $type; if ($Last_Name) { # $Last_Type = ''; $Labtype{$Last_Name} = $Last_Type; } $Labtype{$n} = $Last_Type; } # molecule() ########## # print_hash() # # print the elements of a hash or hash reference # sub print_hash { my $hr; my $n = scalar @_; if ($n == 0) { print STDERR "empty hash\n;"; return 1; } elsif ($n == 1) { if (ref($_[0]) eq 'HASH') { $hr = $_[0]; } else { warn 'print_hash(): the argument is not a hash or hash reference;'; return 0; } } else { if ($n % 2) { warn 'print_hash(): the arguments are not a hash;'; return 0; } else { my %h = @_; $hr = \%h; } } ### print_hash() unless (%$hr) { print STDERR "empty hash\n"; return 1; } print STDERR "hash (ignore the ^ characters):\n"; for my $k (sort keys %$hr) { my $hk = $hr->{$k}; print STDERR " $k => "; if (defined $hk) { print STDERR "^$hk^"; } else { print STDERR "undef"; } print STDERR "\n"; } 1; } # print_hash() ########## # print_pe() # sub print_pe { print ".PE\n"; } # print_pe() ########## # print_ps() # sub print_ps { print ".PS\n"; } # print_ps() ########## # putring() # sub putring { # collect "put Mol at n" my ($v) = @_; my ($m, $mol, $n); $Word_Count++; $mol = $Words[$Word_Count++]; if ($Words[$Word_Count] eq 'at') { $Word_Count++; } $n = $Words[$Word_Count]; if ($n !~ /^\d+$/) { $n =~ s/(\d)+$/$1/; $n = 0 if $n !~ /^\d+$/; error('use single digit as argument for "put at"'); } if ($n >= 1 && $n <= $v) { $m = $mol; $m =~ s/[^A-Za-z0-9]//g; $Put{$n} = $m . ':' . &atom($mol); } elsif ($n == 0) { error('argument of "put at" must be a single digit'); } else { error('argument of "put at" is too large'); } $Word_Count++; } # putring() ########## # ring() # sub ring { my ($type) = @_; my ($typeint, $pt, $verts, $i, $other, $fused, $withat); $pt = 0; # points up by default if ($type =~ /([1-8])$/) { $verts = $1; } elsif ($type =~ /flat/) { $verts = 5; } else { $verts = 6; } $fused = $other = ''; for ($i = 1; $i <= $verts; $i++) { $Put{$i} = $Dbl{$i} = ''; } $Nput = $Aromatic = $withat = 0; for ($Word_Count = 1; $Word_Count <= $#Words; ) { if ($Words[$Word_Count] eq 'pointing') { $pt = &cvtdir(0); } elsif ($Words[$Word_Count] eq 'double' || $Words[$Word_Count] eq 'triple') { &dblring($verts); } elsif ($Words[$Word_Count] =~ /arom/) { $Aromatic++; $Word_Count++; # handled later ### ring() } elsif ($Words[$Word_Count] eq 'put') { &putring($verts); $Nput++; } elsif ($Words[$Word_Count] =~ /^#/) { $Word_Count = $#Words + 1; last; } else { if ($Words[$Word_Count] eq 'with' || $Words[$Word_Count] eq 'at') { $withat = 1; } $other = $other . ' ' . $Words[$Word_Count]; $Word_Count++; } } $typeint = $Types{'RING'} . $verts . $pt; # RING | verts | dir if ($withat == 0) { # join a ring to something if ( $Last_Type =~ /^$Types{'RING'}/ ) { # ring to ring if (substr($typeint, 2) eq substr($Last_Type, 2)) { # fails if not 6-sided $fused = 'with .V6 at Last.V2'; } } # if all else fails $fused = sprintf('with .%s at Last.%s', &leave($typeint, $Dir + 180), &leave($Last_Type, $Dir)); } printf "Last: [\n"; &makering($type, $pt, $verts); printf "] %s %s\n", $fused, $other; $Last_Type = $typeint; $Labtype{$Last_Name} = $Last_Type if $Last_Name; } # ring() ########## # ringleave(, ) # sub ringleave { my ($last, $d) = @_; my ($rd, $verts); # return vertex of ring in direction d $verts = substr($last, 1, 1); $rd = substr($last, 2); sprintf('V%d.%s', int( (($d - $rd) % 360) / (360 / $verts)) + 1, &corner($d)); } # ringleave() ########## # setparams() # sub setparams { my ($scale) = @_; $Params{'lineht'} = $scale * 0.2; $Params{'linewid'} = $scale * 0.2; $Params{'textht'} = $scale * 0.16; $Params{'db'} = $scale * 0.2; # bond length $Params{'cwid'} = $scale * 0.12; # character width $Params{'cr'} = $scale * 0.08; # rad of invis circles at ring vertices $Params{'crh'} = $scale * 0.16; # ht of invis ellipse at ring vertices $Params{'crw'} = $scale * 0.12; # wid $Params{'dav'} = $scale * 0.015; # vertical shift up for atoms in atom macro $Params{'dew'} = $scale * 0.02; # east-west shift for left of/right of $Params{'ringside'} = $scale * 0.3; # side of all rings $Params{'dbrack'} = $scale * 0.1; # length of bottom of bracket } # setparams() ########## # usage() # # Print usage information for --help. # sub usage { print "\n"; &version(); print </contrib/chem/chem.pic # Installed position: /share/groff//pic # Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc. # Written by Brian Kernighan , # modified by Bernd Warken . # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## pi = 3.141592654 deg = 57.29578 # cr = 0.08 # radius of invis circle at ring vertices (see cr[vh]) # crh = 0.16; crw = 0.12 # ht & wid of invis ellipse around atoms at ring vertices # dav = 0.015 # vertical shift up for atoms in atom macro # atom(text, wid, ht, carbon position, crh, crw, dav) define atom { [ T: $1 wid $2 ht $3-2*$7 C: ellipse invis ht $5 wid $6 at T.w + ($4,$7) L: ellipse invis ht $5 wid $6 at T.w + (cwid/2,$7) R: ellipse invis ht $5 wid $6 at T.e + (-cwid/2,$7) ] } # bond(length, angle in degrees, whatever) define bond { line $3 by ($1) * sin(($2)/deg), ($1) * cos(($2)/deg) } # fancy bonds: r, theta, from/at define doublebond { line $3 invis by ($1) * sin(($2)/deg), ($1) * cos(($2)/deg) V1: last line.start; V2: last line.end; dx = V2.x-V1.x; dy = V2.y-V1.y norm = sqrt(dx*dx + dy*dy) ny = dx * .02 / norm nx = -dy * .02 / norm line from V1 + (nx,ny) to V2 + (nx,ny) line from V1 - (nx,ny) to V2 - (nx,ny) move to V2 } define triplebond { line $3 invis by ($1) * sin(($2)/deg), ($1) * cos(($2)/deg) V1: last line.start; V2: last line.end; dx = V2.x-V1.x; dy = V2.y-V1.y norm = sqrt(dx*dx + dy*dy) ny = dx * .025 / norm nx = -dy * .025 / norm line from V1 + (nx,ny) to V2 + (nx,ny) line from V1 - (nx,ny) to V2 - (nx,ny) line from V1 to V2 move to V2 } define backbond { line $3 invis by ($1) * sin(($2)/deg), ($1) * cos(($2)/deg) V1: last line.start; V2: last line.end; dx = V2.x-V1.x; dy = V2.y-V1.y norm = sqrt(dx*dx + dy*dy) n = norm / .025 ny = dx * .02 / norm nx = -dy * .02 / norm for i = 1 to n-1 do { XZ: i/n line from XZ + (nx,ny) to XZ - (nx,ny) } move to V2 } define frontbond { line $3 invis by ($1) * sin(($2)/deg), ($1) * cos(($2)/deg) V1: last line.start; V2: last line.end; dx = V2.x-V1.x; dy = V2.y-V1.y ah = arrowht; aw = arrowwid; ahead = arrowhead arrowht = sqrt(dx*dx + dy*dy) arrowwid = 0.05 arrowhead = 7 line <- from V1 to V2 arrowht = ah; arrowwid = aw; arrowhead = ahead } ### Emacs settings # Local Variables: # mode: Nroff # End: groff-1.22.2/contrib/chem/README.txt0000644000175000001440000000356512104714260015322 0ustar wlusers`chem' is a `roff' language to generate chemical structure diagrams. `@g@chem' is a `groff' preprocessor that produces output suitable for the `@g@pic' preprocessor. The original version of `chem' is an `awk' script written by Brian Kernighan . The source files of the `awk' version of `chem' are available at . This project is a rewrite of `chem' in Perl for the GNU `roff' project `groff'. It was written under Perl v5.8.8, but at least Perl v5.6 is needed to run the Perl version of `chem'. In comparison to the original `awk' version of `chem', the Perl version does the following changements: - the options -h, --help, -v, --version to output usage and version information are added. - remove some functions `inline', `shiftfields', and `set' and some variables that are used only once. The subdirectory `examples/' contains example files for chem. They are written in the `chem' language. The file names end with .chem. ####### License Last update: 5 Jan 2009 Copyright (C) 2006, 2009 Free Software Foundation, Inc. Written by Bernd Warken . This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ####### Emacs settings Local Variables: mode: text End: groff-1.22.2/contrib/chem/examples/0000755000175000001440000000000012104714263015434 5ustar wlusersgroff-1.22.2/contrib/chem/examples/morphine.chem0000644000175000001440000000303112104714263020110 0ustar wlusersmorphine.chem: .cstart # Example file for `chem': # Morphine or C23_H31_N3O or # N,N-diethyl-N'-(2-methoxyacridin-9-yl)-pentane-1,4-diamine # Found at http://www.chemindustry.com/apps/chemicals. # Source file position: /contrib/chem/example/morphine.chem # Installed position: /share/doc/groff/example/chem/morphine.chem # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Written by Bernd Warken . # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . R1: benzene R2: benzene with .V6 at R1.V2 with .V5 at R1.V3 put N at 4 R3: benzene with .V6 at R2.V2 with .V5 at R2.V3 bond 60 at R3.V2 ; O bond 120 bond up at R2.V1 ; N bond 60 ; H bond -60 at N B1: backbond -120 bond up at B1.start bond -60 bond up bond -60 ; N bond up bond -60 bond -120 at N bond -60 ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/cholesterin.chem0000644000175000001440000000307212104714263020613 0ustar wluserscholesterin.chem: .cstart # Example file for `chem': # Cholesterin or C27_H46O or # 10,13-dimethyl-17-(6-methylheptan-2-yl)-2,3,4,5,6,9,11,12,14,15,16,17- # dodecahydro-1H-cyclopenta[a]phenanthren-3-ol # Source file position: /contrib/chem/example/cholesterin.p # Installed position: /share/doc/groff/example/chem/cholesterin.p # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Written by Bernd Warken . # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . R1: ring6 bond -120 ; HO R2: ring6 with .V5 at R1.V3 with .V6 at R1.V2 double 4,5 bond up at R2.V6 R3: ring6 with .V5 at R2.V1 with .V4 at R2.V2 R4: flatring5 pointing up with .V4 at R3.V3 with .V5 at R3.V2 bond up at R4.V5 bond up at R4.V1 B1: bond -60 bond 60 at B1.start bond 120 bond 60 bond 120 B2: bond 60 bond down at B2.start ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/reserpine.chem0000644000175000001440000000346512104714263020276 0ustar wlusersreserpine.chem: .PS begin chem # Example file for `chem': # Reserpine or C33H40N2O9 # Source file position: /contrib/chem/example/reserpine.chem # Installed position: /share/doc/groff/example/chem/reserpine.chem # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Written by Bernd Warken . # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . R1: benzene pointing up bond -120 from R1.V5 ; O bond left R2: flatring5 pointing down double 4,5 with .V2 at R1.V3 with .V3 at R1.V2 put N at 1 H below R2.V1 R3: ring put N at 3 with .V5 at R2.V5 R4: ring put N at 1 with .V1 at R3.V3 back bond -120 from R4.V4 ; H back bond 60 from R4.V3 ; H R5: ring with .V1 at R4.V3 bond -120 D1: double bond down ; O bond left from D1.start ; O bond left back bond 60 from R5.V3 ; H back bond down from R5.V4 ; O bond down from O bond 120 from R5.V3 ; O bond 50 from O D2: double bond up ; O bond right length .1 from D2.start B: benzene pointing right bond 45 from B.V6 ; O bond right bond right from B.V1 ; O bond right bond 135 from B.V2 ; O bond right ### Emacs settings # Local Variables: # mode: Nroff # End: end .PE groff-1.22.2/contrib/chem/examples/122/0000755000175000001440000000000012104714263015740 5ustar wlusersgroff-1.22.2/contrib/chem/examples/122/ch4d_HCl.H2O.chem0000644000175000001440000000241712104714263020541 0ustar wlusersch4d_HCl.H2O.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## HCl.H2O ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch6a_pic.chem0000644000175000001440000000257712104714263020265 0ustar wlusersch6a_pic.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## R: ring double 2,3 line from R.V6 to R.C line from R.C to R.V4 X1: 1/2 X2: 1/2 bond from X1 to X2 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4a_stick.chem0000644000175000001440000000250112104714263020610 0ustar wlusersch4a_stick.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## bond right bond 60 bond 120 bond 60 bond 120 bond down ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4f_C.chem0000644000175000001440000000302012104714263017657 0ustar wlusersch4f_C.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## bond ; C # 1st definition of C bond up from C bond down from C bond right from C ; C # 2nd definition of C bond up from C bond down from C bond right from C ; C # 3rd definition of C bond up from C bond down from C bond right from C ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch2b_benzene.chem0000644000175000001440000000241712104714263021126 0ustar wlusersch2b_benzene.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## benzene ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4z2_text.chem0000644000175000001440000000345612104714263020604 0ustar wlusersch4z2_text.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## bond 120 dotted bond 120 length .3 ; BP back bond -120 length .25 from BP ; H front bond 120 length .25 from BP ; CH3 bond 60 length .5 from BP ; BP bond -60 length .25 from BP ; H # note the pic move command to position the text move left .35 ; "(ANTI)" front bond 60 length .25 from BP ; H # another positioning of text move right .35 ; "(SYN)" bond 120 length .4 from BP ; BP back bond -120 length .25 from BP ; H front bond 120 length .25 from BP ; CH3 bond 60 length .5 from BP bond 60 dotted ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch5a_size.chem0000644000175000001440000000276312104714263020460 0ustar wlusersch5a_size.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## .ps 14 size 16 R: ring6 put O at 1 put C at 2 put O at 3 put C at 4 put O at 5 put C at 6 double bond 60 from R.V2 ; NH double bond down from R.V4 ; NH double bond -60 from R.V6 ; HN size 10 # if you are doing more than one .ps 10 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch2a_ethyl.chem0000644000175000001440000000243212104714263020621 0ustar wlusersch2a_ethyl.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## CH3 bond CH2 bond ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4o_aromatic.chem0000644000175000001440000000244512104714263021317 0ustar wlusersch4o_aromatic.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## R: aromatic ring7 "+" at R ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4c_colon.chem0000644000175000001440000000251612104714263020615 0ustar wlusersch4c_colon.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## CH3 bond ; C double bond 30 ; O bond 120 from C ; O bond right ; CH3 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/chAe_chair.chem0000644000175000001440000000306412104714263020607 0ustar wluserschAe_chair.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## pic define chair { [ V1: bond 120 length .25 V2: bond right length .35 V3: bond 150 length .35 V4: bond -60 length .25 V5: bond left length .35 V6: bond to V1.start pic ] } R1: chair R2: chair with .V1 at R1.V4.start bond 60 from R2.V4.start ; CH3 bond down from R2.V4.start ; OH ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/chBa_jump.chem0000644000175000001440000000252112104714263020466 0ustar wluserschBa_jump.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## SiO2 # name = SiO2 move right 1 CH3CH2NH2.HCl # name = CH3CH2NH2HCl ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/chAc_morphine.chem0000644000175000001440000000324312104714263021337 0ustar wluserschAc_morphine.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## R1: ring6 double 1,2 bond -60 from R1.V6 ; HO R2: ring6 with .V1 at R1.V3 bond 60 from R2.V2 ; N bond right from N ; CH3 R3: benzene with .V1 at R2.V5 bond -120 from R3.V5 ; HO # this is the furan ring bond -135 length .33 from R1.V5 ; O bond -45 length .33 from R3.V6 # this is the odd ring bond up length .1 from N ; BP B1: bond up length .33 from R1.V4 bond to BP ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/chAh_brackets.chem0000644000175000001440000000306712104714263021325 0ustar wluserschAh_brackets.chem: .br .EQ delim $$ .EN .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## [ bond right ; CH2 bond 120 ; (CH2) "$nothing sub n$" bond 60 ; .CH2 ] # now put the arrow in move right .3 arrow .5 move right .3 # begin second structure [ bond right ; CH. bond 120 ; (CH2) "$nothing sub n$" bond 60 ; CH3 ] ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend .EQ delim $$ .EN groff-1.22.2/contrib/chem/examples/122/ch6b_dna.chem0000644000175000001440000000372512104714263020251 0ustar wlusersch6b_dna.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## P: [ R1: flatring pointing up put N at 1 put N at 4 double 5,1 bond -135 from R1.V4 ; BP "deoxyribose" rjust with .e at BP.w R2: ring6 put N at 2 put N at 4 double 1,2 3,4 5,6 with .V6 at R1.V2 pic Conn: R2.V2.ne #because naming is too restricted in pic bond up from R2.V1 ; N bond -60 from N ; H bond 60 from N ; H ] # thymine Q: [ R3: ring6 put N at 3 put N at 5 double 1,2 bond up from R3.V1 ; CH3 bond 120 from R3.V3 ; BP "deoxyribose" ljust with .w at BP.e double bond down from R3.V4 ; O double bond -60 from R3.V6 ; O bond -120 from R3.V5 ; H ] with .O at P.H + (.3,.3) bond from Q.O.sw to P.H.ne dotted bond from Q.H.sw to P.Conn dotted ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4i_cyclo.chem0000644000175000001440000000265312104714263020624 0ustar wlusersch4i_cyclo.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## R3: ring3 R4: ring4 at R3 + (.75,0) R5: ring5 at R4 + (.75,0) R6: ring6 at R5 + (.75,0) B: benzene at R6 + (.75,0) R7: ring7 at B + (.75,0) R8: ring8 at R7 + (.75,0) ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4l_vertex.chem0000644000175000001440000000272712104714263021035 0ustar wlusersch4l_vertex.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## R: benzene pointing right bond left from R.V4 ; HO bond -150 from R.V3 ; CH3O bond right from R.V1 ; C double bond up from C ; O bond right from C ; N bond 45 ; C2H5 bond 135 from N ; C2H5 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4k_ring3.chem0000644000175000001440000000252112104714263020531 0ustar wlusersch4k_ring3.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## R: ring3 back bond 120 from R.V2 ; C2H5 front bond -120 from R.V3 ; HO ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4m_double.chem0000644000175000001440000000243612104714263020770 0ustar wlusersch4m_double.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## ring double 1,2 3,4 5,6 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4w_lsd.chem0000644000175000001440000000326212104714263020310 0ustar wlusersch4w_lsd.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## B: benzene pointing right F: flatring pointing left put N at 5 double 3,4 with .V1 at B.V2 H below F.N R: ring pointing right with .V4 at B.V6 front bond right from R.V6 ; H W: ring pointing right with .V2 at R.V6 put N at 1 double 3,4 bond right from W.N ; CH3 back bond -60 from W.V5 ; H bond up from W.V5 ; C double bond up from C ; O bond right from C ; N bond 45 from N ; C2H5 bond 135 from N ; C2H5 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch2c_benzene_right.chem0000644000175000001440000000250312104714263022320 0ustar wlusersch2c_benzene_right.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## benzene pointing right # a rotated benzene ring ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/README.txt0000644000175000001440000000464712104714263017451 0ustar wlusersThis directory contains the examples for the `chem' language written in the book: Computing Science Technical Report No. 122 CHEM - A Program for Typesetting Chemical Diagrams: User Manual by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan The book is available in the internet at . Many of the examples had to be fixed. Unfortunately, the `chem' akw version does not run on many of these programs. But the Perl version of `chem' works on all examples. Most examples do not use the modern chemical display. They have C atoms added, whereas the modern method omits all C atoms and their directly appended H atoms. The examples are named and sorted by the chapter where they are found in the book. For example, the file `ch4c_colon.chem' means a `chem' example in chapter 4; according to `c', it is the third example in this chapter; the name `colon' is used to describe the context of the example. You can view the graphical display of the examples by calling groffer `groffer' calls `chem' automatically. If you want to transform example files to a different format use the `roff2*' programs: `roff2dvi' prints dvi format to standard output, `roff2html' generates html output, `roff2pdf' outputs pdf mode, `roff2ps' produces PostScript output, `roff2text' generates text output in the groff device `latin1', `roff2x' prints the output in the groff device X that is suitable for programs like `gxditview' or `xditview'. To get a suitable `groff' output run @g@chem | groff -p ... ####### License Last update: 5 Jan 2009 Copyright (C) 2006, 2009 Free Software Foundation, Inc. Written by Bernd Warken . This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ####### Emacs settings Local Variables: mode: text End: groff-1.22.2/contrib/chem/examples/122/chAf_arrow.chem0000644000175000001440000000363612104714263020661 0ustar wluserschAf_arrow.chem: .br .EQ delim $$ .EN .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## bond length .1 ; BP bond up length .5 bond right bond down length .5 from BP bond right bond right from BP ; C double bond up ; O bond right from C benzene pointing right bond right ; C double bond up from C ; O bond right from C ; O bond right ; CH2 # this is the statement to make the arrow line <- from CH2.s down move down .1 ; "0.085" CH2CH2CH2 right of CH2 bond right ; O bond right length .1 ; BP bond up length .5 from BP bond left bond right length .1 from BP bond down length .5 from BP ; BP bond left "$n$" with .w at BP.se ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend .EQ delim off .EN groff-1.22.2/contrib/chem/examples/122/chBc_rings.chem0000644000175000001440000000270612104714263020644 0ustar wluserschBc_rings.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## R1: benzene bond -120 from R1.V5 ; CH3O R2: ring4 pointing 45 with .V4 at R1.V2 R3: aromatic ring6 put N at 4 put S at 2 at R2 + (.75,0) R4: ring5 pointing left at R3 + (.75,0) label R4 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4p_cholestanol.chem0000644000175000001440000000371512104714263022035 0ustar wlusersch4p_cholestanol.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## R1: ring6 "R1" at R1 # this puts a label at R1 front bond -120 from R1.V5 ; HO # the following line says "fuse the next six- # membered ring with its 6th vertex joining # the second vertex of R1" R2: ring6 with .V6 at R1.V2 front bond up from R2.V6 ; CH3 back bond down from R2.V4 ; H back bond down from R2.V1 ; H front bond up from R2.V2 ; H R3: ring6 with .V4 at R2.V2 R4: flatring with .V5 at R3.V2 front bond up from R4.V5 ; CH3 back bond down from R4.V4 ; H # this is the alkyl chain bond up from R4.V1 ; BP bond -60 from BP bond 60 from BP bond 120 bond 60 bond 120 ; BP bond down from BP bond 60 from BP ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4t_polycyclic.chem0000644000175000001440000000333612104714263021677 0ustar wlusersch4t_polycyclic.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## R1: benzene pointing right bond 30 from R1.V6 ; Br R2: benzene pointing right with .V5 at R1.V1 R3: benzene pointing right with .V1 at R2.V3 bond 150 from R3.V2 ; CO2H R4: benzene pointing right with .V1 at R1.V3 # next line names bond B1 so we can refer to its end B1: bond left from R4.V4 ring6 put N at 4 double 2,3 4,5 6,1 with .V3 at B1.end B2: bond right from R2.V1 R5: benzene with .V5 at B2.end ring6 put N at 4 double 1,2 3,4 with .V5 at R5.V3 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4g_BP.chem0000644000175000001440000000312712104714263020007 0ustar wlusersch4g_BP.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## # this is the isopropyl group bond 120 ; BP # BP is right end of this bond bond -120 from BP bond right from BP ; C front bond up ; CH3 back bond down from C ; D bond right from C ; BP # redefine BP to mean the center carbon of this t-butyl group bond up from BP bond right from BP bond down from BP ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4s_heteroatoms.chem0000644000175000001440000000247112104714263022055 0ustar wlusersch4s_heteroatoms.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## ring put N at 2 put S at 4 double 2,3 4,5 6,1 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4n_triple.chem0000644000175000001440000000242712104714263021016 0ustar wlusersch4n_triple.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## ring8 triple 3,4 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4b_methyl_acetate.chem0000644000175000001440000000307212104714263022470 0ustar wlusersch4b_methyl_acetate.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## CH3 # the 3 is automatically turned into a subscript bond # the implicit direction is right # implicit connection is to right side of CH3 C double bond 30 # by default, from the substituent C O bond 120 from C # must be "from C"; otherwise would leave from O O bond right CH3 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4x_anisole.chem0000644000175000001440000000257612104714263021170 0ustar wlusersch4x_anisole.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## R1: benzene bond down from R1.V4 ; OCH3 R2: benzene at R1 + (1.5,0) bond down from R2.V4 ; O CH3 right of O ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/chBb_bonds.chem0000644000175000001440000000256412104714263020630 0ustar wluserschBb_bonds.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## C frontbond -170 from C ; H backbond 10 from C ; CO2H bond left length .15 from C ; H2N bond right from C ; CH3 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4y_reserpine.chem0000644000175000001440000000371612104714263021530 0ustar wlusersch4y_reserpine.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Some corrections were added. # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## CH3O bond 60 R1: benzene R2: aromatic flatring5 pointing down put N at 1 with .V3 at R1.V2 H below R2.V1 R3: ring put N at 3 with .V5 at R2.V5 R4: ring put N at 1 with .V1 at R3.V3 back bond -120 from R4.V4 ; H back bond 60 from R4.V3 ; H R5: ring with .V1 at R4.V3 bond -120 ; C double bond down from C ; O CH3O left of C back bond 60 from R5.V3 ; H back bond down from R5.V4 ; O CH3 right of O bond 120 from R5.V3 ; O bond right length .1 from O ; C double bond down ; O bond right length .1 from C B: benzene pointing right bond 30 from B.V6 ; OCH3 bond right from B.V1 ; OCH3 bond 150 from B.V2 ; OCH3 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/chAi_poly_vinyl_chloride.chem0000644000175000001440000000646312104714263023610 0ustar wluserschAi_poly_vinyl_chloride.chem: .br .ps -2 .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## db = .12 cwid = .095 A: [ bond dotted bond right ; CH bond down ; Cl bond right from CH ; CH2 bond ; CH bond down ; Cl bond right from CH ; CH2 bond ; C. bond down ; Cl bond right from C ; CH2 bond ; CH2 bond down ; Cl ] " (6.13a)" ljust at A.e arrow down .5 from A.s [ CH2 double bond right ; CHCl ] with .w at last arrow.c B: [ bond dotted bond right ; CH bond down ; Cl bond right from CH ; CH2 bond ; CH bond down ; Cl bond right from CH ; CH2 bond ; C bond up ; Cl bond down from C ; CH2 bond ; CH2Cl bond right from C ; CH2 bond ; CH bond down ; Cl bond right from CH bond dotted ] with .n at end of last arrow " (6.13b)" ljust at B.e C: [ bond dotted bond right ; CH bond down ; Cl bond right from CH ; CH2 bond ; C. bond down ; Cl bond right from C ; CH2 bond ; CH bond down ; Cl bond right from CH ; CH2 bond ; CH2 bond down ; Cl ] with .n at B.s - (0,.5) " (6.14a)" ljust at C.e arrow down .3 from C.s [ CH2 double bond right CHCl ] with .w at last arrow.s arrow down .3 from last arrow.s D: [ bond dotted bond right ; CH bond down ; Cl bond right from CH ; CH2 bond ; C bond up ; Cl bond down from C ; CH2 bond ; CHCl bond ; CH2 bond ; CH2Cl bond right from C ; CH2 bond ; CH bond down ; Cl bond right from CH ; CH2 bond ; CH bond down ; Cl bond right from CH bond dotted ] with .n at last arrow.s " (6.14b)" ljust at D.e E: [ bond dotted bond ; CH bond down ; Cl bond right from CH ; CH2 bond ; CH bond down ; Cl bond right from CH ; CH2 bond ; CH bond down ; Cl bond right from CH ; CH2 bond ; CH bond down ; Cl ] with .e at B.w - (.5,0) arrow from E.ne to A.sw arrow from E.se to C.nw ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend .ps +2 groff-1.22.2/contrib/chem/examples/122/ch4z1_eqn_glutamic.chem0000644000175000001440000000446412104714263022267 0ustar wlusersch4z1_eqn_glutamic.chem: .br .EQ delim $$ .EN .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Some corrections were added. # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## # a left bracket bond right length .1 ; BP bond up length .3 bond right length .1 bond down length .3 from BP bond right length .1 # this is the mainchain amide structure bond right length .1 from BP ; NH bond right ; CH # label the CH with an alpha, intended for eqn. # this line says "put the north edge of the alpha at the # south edge of the CH" "$alpha$" with .n at CH.s bond right from CH ; C double bond up from C ; O bond right length .1 from C ; BP # a right bracket bond up length .3 bond left length .1 bond right length .1 from BP bond down length .3 from BP ; BP bond left length .1 # label the degree of polymerization "$n$" with .w at BP.se # this is the sidechain bond up from CH ; CH2 "$beta$" with .e at CH2.w bond up from CH2 ; CH2 "$gamma$" with .e at CH2.w bond up from CH2 ; C # this is the benzyl ester part double bond -60 from C ; O bond 60 from C ; O bond right ; CH2C6H5 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend .EQ delim off .EN groff-1.22.2/contrib/chem/examples/122/chAa_polymer.chem0000644000175000001440000000416112104714263021203 0ustar wluserschAa_polymer.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## # epoxy based on the m-phenyldiamine cured bisphenol-A size 8 bond dotted bond ; N bond ; CH2 bond down from N R1: benzene bond 120 length .1 from R1.V3 ; N bond right length .1 from N bond down length .1 from N # back to the CH2 bond right from CH2 ; CH bond down from CH ; OH bond right from CH ; CH2 bond right ; O bond right benzene pointing right bond right ; C bond up from C ; CH3 bond down from C ; CH3 bond right from C benzene pointing right bond right ; O bond right from O ; CH2 bond right ; CH bond down from CH ; OH bond right from CH ; CH2 bond right ; N bond right from N bond dotted bond down from N R2: benzene bond 120 length .1 from R2.V3 ; N bond right length .1 from N bond down length .1 from N ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4j_ring4.chem0000644000175000001440000000242712104714263020536 0ustar wlusersch4j_ring4.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## ring4 pointing 45 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4h_methacrylate.chem0000644000175000001440000000414512104714263022172 0ustar wlusersch4h_methacrylate.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## bond dotted bond right ; BP bond up from BP ; C double bond -60 from C ; O bond 60 length .1 from C ; OCH3 bond down from BP ; CH3 # begin second segment of polymer bond right length .5 from BP ; BP bond up length .1 from BP ; H bond down length .1 from BP ; H # begin third segment of polymer bond right length .5 from BP ; BP bond up from BP ; C double bond -60 from C ; O bond 60 length .1 from C ; OCH3 bond down from BP ; CH3 # begin fourth segment of polymer bond right length .5 from BP ; BP bond up length .1 from BP ; H bond down length .1 from BP ; H # begin fifth segment of polymer bond right length .5 from BP ; BP bond up from BP ; C double bond -60 from C ; O bond 60 length .1 from C ; OCH3 bond down from BP ; CH3 bond right from BP bond dotted ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4u_nicotine.chem0000644000175000001440000000256112104714263021335 0ustar wlusersch4u_nicotine.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## benzene put N at 4 bond right ring5 pointing down put N at 1 bond down from .N ; CH3 # or .V1 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4r_spiro.chem0000644000175000001440000000261212104714263020653 0ustar wlusersch4r_spiro.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## R1: ring6 R2: ring6 with .V1 at R1.V4 R3: ring5 with .V5 at R2.V3 back bond 60 from R3.V2 ; OH front bond 150 from R3.V3 ; OH ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4e_CaSO4.2H2O.chem0000644000175000001440000000242512104714263021026 0ustar wlusersch4e_CaSO4.2H2O.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## CaSO4.2H2O ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/chAd_chlorophyll.chem0000644000175000001440000000451612104714263022062 0ustar wluserschAd_chlorophyll.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## Mg bond 45 ; N R1: ring5 pointing up put N at 4 double 1,2 4,5 with .V4 at N bond up from R1.V1 ; CH3 bond right from R1.V2 ; CH2CH3 bond 135 from Mg ; N R2: ring5 pointing down put N at 3 double 1,2 4,5 with .V3 at N bond right from R2.V5 ; CH3 bond 225 from Mg ; N R3: ring5 pointing down put N at 4 double 3,4 with .V4 at N bond -45 from Mg ; N R4: ring5 pointing up put N at 3 double 1,5 with .V3 at N bond left from R4.V5 ; H3C bond up from R4.V1 ; CH double bond right length .1 from CH ; CH2 double bond 150 length .3 from R1.V3 bond to R2.V4 R5: ring5 pointing 72 with .V5 at R2.V2 double bond 135 from R5.V2 ; O bond down from R5.V3 ; C double bond left length .1 from C ; O bond down from C ; O CH3 left of O double bond -25 from R5.V4 bond down from R3.V1 ; CH2 CH2 left of CH2 bond left ; C double bond -45 ; O bond -135 from C ; C20H39O bond left from R3.V2 ; H3C double bond -150 length .3 from R4.V4 bond to R3.V3 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/chAg_circle.chem0000644000175000001440000000302212104714263020756 0ustar wluserschAg_circle.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## bond 120 ; C bond 60 ; C bond up ; Cl double bond 120 from C ; C bond 60 ; C bond 120 ; C bond 60 ; C bond up ; Cl double bond 120 from C ; C circle at C rad .08 bond 60 from C ; C bond 120 ; C bond 60 ; C double bond 120 ; C bond down ; Cl bond 60 from C ; C bond 120 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4q_rings.chem0000644000175000001440000000277612104714263020653 0ustar wlusersch4q_rings.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## R3: ring3 R4: ring4 pointing 45 with .V1 at R3.V2 R5: ring5 pointing down with .V4 at R4.V2 R6: ring6 pointing 54 with .V6 at R5.V5 # the following lines specify the labels inside the rings "3" at R3 "4" at R4 "5" at R5 "6" at R6 ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/chAb_vinyl_chloro.chem0000644000175000001440000000407312104714263022226 0ustar wluserschAb_vinyl_chloro.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## Cl bond 120 length .25 ; BP bond 60 length .25 from BP ; Cl B1: double bond down length .3 from BP bond 120 length .35 ; BP # now comes the ring R1: ring6 double 1,2 3,4 5,6 with .V6 at BP bond up length .1 from R1.V1 ; H bond 60 length .1 from R1.V2 ; H bond 120 from R1.V3 ; O bond 60 from O ; C double bond up from C ; O bond 120 from C # continue decorating the ring bond down length .1 from R1.V4 ; H bond -120 length .1 from R1.V5 ; H # now go back and do the left hand ring bond -120 length .35 from B1.end ; BP R2: ring6 double 1,2 3,4 5,6 with .V2 at BP bond up length .1 from R2.V1 ; H bond -60 length .1 from R2.V6 ; H bond -120 from R2.V5 ; O bond -60 from O bond down length .1 from R2.V4 ; H bond 120 length .1 from R2.V3 ; H ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/122/ch4v_histidine.chem0000644000175000001440000000273712104714263021513 0ustar wlusersch4v_histidine.chem: .br .cstart # Example file for `chem': # This originates from Computing Science Technical Report No. 122 # CHEM - A Program for Typesetting Chemical Diagrams: User Manual # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ######################################################################## R1: flatring pointing down put N at 2 put N at 5 double 1,2 3,4 H right of R1.V5 bond right from R1.V4 ; CH2 bond right ; C bond up from C ; H bond down from C ; NH2 bond right from C ; CO2H ######################################################################## ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/README.txt0000644000175000001440000000424512104714263017137 0ustar wlusersThis directory contains examples for the `chem' language. You can view the graphical display of the examples by calling groffer `groffer' calls `chem' automatically. If you want to transform example files to a different format use the `roff2*' programs: `roff2dvi' prints dvi format to standard output, `roff2html' generates html output, `roff2pdf' outputs pdf mode, `roff2ps' produces PostScript output, `roff2text' generates text output in the groff device `latin1', `roff2x' prints the output in the groff device X that is suitable for programs like `gxditview' or `xditview'. To get a suitable `groff' output run @g@chem | groff -p ... On the displays, you can see rings consisting of several lines and bonds (lines). All points on rings and bonds that do not have a notation mean a C atom (carbon) filled with H atoms (hydrogen) such that the valence of 4 is satisfied. For example, suppose you have just a single line without any characters. That means a bond. It has two points, one at each end of the line. So each of these points stands for a C atom, the bond itself connects these 2 C atoms. To fulfill the valence of 4, each points has to carry additionally 3 H atoms. So the single empty bond stands for CH3-CH3, though this combination doesn't make much sense chemically. ####### License Last update: 5 Jan 2009 Copyright (C) 2006, 2009 Free Software Foundation, Inc. Written by Bernd Warken . This file is part of `chem', 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 3 of the License, 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 this program. If not, see . ####### Emacs settings Local Variables: mode: text End: groff-1.22.2/contrib/chem/examples/penicillin.chem0000644000175000001440000000316512104714263020425 0ustar wluserspenicillin.chem: .cstart # Example file for `chem': # Penicillin or C16_H18_N2_O4_S or # 3,3-dimethyl-6-oxo-7-(2-phenylacetyl)amino-2-thia-5- # azabicyclo[3.2.0]heptane-4-carboxylic acid # Found at http://www.chemindustry.com/apps/chemicals. # Source file position: /contrib/chem/example/morphine.chem # Installed position: /share/doc/groff/example/chem/morphine.chem # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Written by Bernd Warken . # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . R1: flatring5 pointing up put S at 1 put N at 4 bond 45 at R1.V2 bond 135 at R1.V2 bond 120 at R1.V3 D1: doublebond 45 ; O bond 135 at D1.start ; OH bond left at R1.N doublebond -135 ; O bond left at R1.V5 B1: bond down length .3 bond -60 at B1.start ; N bond up ; H bond -120 at N D2: doublebond down ; O bond -60 at D2.start bond -120 benzene ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/lsd.chem0000644000175000001440000000314012104714263017052 0ustar wluserslsd.chem: .cstart # Example file for `chem': # LSD or Lysergic acid dethylamide or C20_H25_N3O or # 9,10-Didehydro-N,N-diethyl-6-methyl-ergoline-8-beta-carboxamide # Source file position: /contrib/chem/example/lsd.p # Installed position: /share/doc/groff/example/chem/lsd.p # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Written by Bernd Warken . # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . F: flatring5 pointing left put N at 5 double 3,4 H below F.N B: benzene pointing right with .V1 at F.V2 R1: ring pointing right with .V4 at B.V6 front bond right from R1.V6 ; H R2: ring pointing right with .V2 at R1.V6 put N at 1 double 3,4 bond right from R2.N back bond -60 from R2.V5 ; H bond up from R2.V5 B1: double bond up ; O bond right from B1.start ; N bond 45 bond right bond 135 from N bond right ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/atp.chem0000644000175000001440000000363312104714263017063 0ustar wlusersatp.chem: .cstart # Example file for `chem': # ATP or C10_H16_N5_O13_P3 or # [[[5-(6-aminopurin-9-yl)-3,4-dihydroxy-oxolan-2-yl]methoxy-hydroxy- # phosphoryl]oxy-hydroxy-phosphoryl]oxyphosphonic acid # Found at http://www.chemindustry.com/apps/chemicals. # Source file position: /contrib/chem/example/atp.chem # Installed position: /share/doc/groff/example/chem/atp.chem # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Written by Bernd Warken . # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . R1: ring5 pointing left double 1,2 3,4 put N at 2 put N at 5 B: benzene put N at 2 with .V6 at R1.V3 with .V5 at R1.V4 bond up ; NH2 backbond 170 length .7 from R1.V5 R2: ring5 pointing down with .V2 put O at 1 bond down at R2.V2 ; H bond down length .1 at R2.V3 ; H bond up length .1 at R2.V3 ; OH bond down length .1 at R2.V4 ; H bond up length .1 at R2.V4 ; OH frontbond 70 at R2.V5 bond 110 ; O bond right ; P doublebond up ; O bond down from P ; OH bond right from P ; O bond right ; P doublebond up ; O bond down from P ; OH bond right from P ; O bond right ; P doublebond up ; O bond down from P ; OH bond right from P ; OH ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/examples/ethamivan.chem0000644000175000001440000000262212104714263020250 0ustar wlusersethamivan.chem: .cstart # Example file for `chem': # Ethamivan or Analepticon or C12_H17_N_O3 or # N,N-diethyl-4-hydroxy-3-methoxy-benzamide # Source file position: /contrib/chem/example/ethamivan.chem # Installed position: /share/doc/groff/example/chem/ethamivan.chem # Copyright (C) 2006, 2009 Free Software Foundation, Inc. # Written by Bernd Warken . # Last update: 5 Jan 2009 # This file is part of `chem', 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 3 of the License, 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 this program. If not, see . R: ring pointing left double 2,3 4,5 6,1 bond left from R.V1 ; O bond left ; H bond -150 from R.V6 ; O bond left bond 60 from R.V4 B1: double bond up ; O bond 120 from B1.start ; N bond 45 bond right bond 135 from N bond right ### Emacs settings # Local Variables: # mode: Nroff # End: .cend groff-1.22.2/contrib/chem/chem.man0000644000175000001440000004141612104714260015232 0ustar wlusers.ig @g@chem.1 - man page for @g@chem (section 1). Source file position: /contrib/chem/chem.man Installed position: $prefix/share/man/man1/@g@chem.1 Last update: 05 Jan 2009 .. . . .de au This file was written by Bernd Warken . It is based on the documentation of .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:who/\:bwk/\:index.html Brian Kernighan .UE 's original .I awk version of .IR chem . .. . . .de co Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc. . . .P This file is part of .IR chem , which is part of .IR groff , a free software project. . You can redistribute it and/or modify it under the terms of the .nh .B "GNU General Public License" .hy as published by the .nh .BR "Free Software Foundation" , .hy either version\~2, or (at your option) any later version. . . .P You should have received a copy of the \f(CRGNU General Public License\fP along with .IR groff , see the files \%\f(CBCOPYING\fP and \%\f(CBLICENSE\fP in the top directory of the .I groff source package. . Or read the .I man page .BR gpl (1). You can also write to the .nh .B "Free Software Foundation, 51 Franklin St - Fifth Floor, Boston," .BR "MA 02110-1301, USA" . .hy .. . . .\" -------------------------------------------------------------------- .\" Local macro definitions . .ds El \&.\|.\|.\& . .\" .File_name () .\" .\" Display a file or directory name in CB font. .\" .de FN . CB \\$@ .. . .\" .CB () .\" .\" Display a line in CB font, for example after .TP .\" .de CB .nh \\&\\f(CB\\$1\\fP\\$2 .hy .. . .\" End of macro definitions . . .TH @G@CHEM @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" .SH NAME @g@chem \- groff preprocessor for producing chemical structure diagrams . . .SH "SYNOPSIS" .\" -------------------------------------------------------------------- .\" SH "SYNOPSIS" .\" -------------------------------------------------------------------- . .SY @g@chem .RI [ "\%option" \*(El] .OP \-\- .RI [ "\%filespec" \*(El] . .SY @g@chem .B \-h | .B \-\-help . .SY @g@chem .B \-v | .B \-\-version .YS . . .\" -------------------------------------------------------------------- .SH OPTION USAGE .\" -------------------------------------------------------------------- . .P There are no other options than .BR \-h , .BR \-\-help , .BR \-v , and .BR \%\-\-version ; these options provoke the printing of a version or usage information, respectively, and all .I filespec arguments are ignored. . A .I filespec argument is either a file name of an existing file or a minus character .BR \- , meaning standard input. . If no argument is specified then standard input is taken automatically. . . .\" -------------------------------------------------------------------- .SH DESCRIPTION .\" -------------------------------------------------------------------- . .I chem produces chemical structure diagrams. . Today's version is best suited for organic chemistry (bonds, rings). . The .B @g@chem program is a .B groff preprocessor like .BR @g@eqn , .BR @g@pic , .BR @g@tbl , etc. . It generates .I pic output such that all .I chem parts are translated into diagrams of the .I pic language. . . .P The program .B @g@chem originates from the Perl source file .FN chem.pl . It tells .B @g@pic to include a copy of the macro file .FN chem.pic . . Moreover the .I groff source file .FN pic.tmac is loaded. . . .P In a style reminiscent of .I eqn and .IR pic , the .I chem diagrams are written in a special language. . . .P A set of .I chem lines looks like this . . .IP .nf .ft B \&.cstart \fIchem data\fP \&.cend .ft .fi . . .P Lines containing the keywords .B .cstart and .B .cend start and end the input for .BR @g@chem , respectively. . In .I pic context, i.e., after the call of .BR .PS , .I chem input can optionally be started by the line .B \%begin\~chem and ended by the line with the single word .B end instead. . . .P Anything outside these initialization lines is copied through without modification; all data between the initialization lines is converted into .I pic commands to draw the diagram. . . .P As an example, . .IP .nf .ft B \&.cstart CH3 bond CH3 \&.cend .ft .fi . . .P prints two .B CH3 groups with a bond between them. . . .P To actually view this, you must run .B @g@chem followed by .BR groffer : . .IP .B "@g@chem [file\*(El] | groffer" . .P If you want to create just .B groff output, you must run .B @g@chem followed by .B groff with the option .B \-p for the activation of .BR @g@pic : .IP .B "@g@chem [file\*(El] | groff -p \*(El" . . .\" -------------------------------------------------------------------- .SH THE LANGUAGE .\" -------------------------------------------------------------------- . The .I chem input language is rather small. It provides rings of several styles and a way to glue them together as desired, bonds of several styles, moieties (e.g., .BR C , .BR NH3 , \*(El), and strings. . . .\" -------------------------------------------------------------------- .SS Setting Variables .\" -------------------------------------------------------------------- . There are some variables that can be set by commands. . Such commands have two possible forms, either . .RS .P .I "variable value" .RE . .P or . .RS .P .IB "variable " = " value" .RE . .P This sets the given .I variable to the argument .IR value . If more arguments are given only the last argument is taken, all other arguments are ignored. . . .P There are only a few variables to be set by these commands: . .TP .BI textht " arg" Set the height of the text to .IR arg ; default is 0.16. . .TP .BI cwid " arg" Set the character width to .IR arg ; default is 0.12. . .TP .BI db " arg" Set the bond length to .IR arg ; default is 0.2. . .TP .BI size " arg" Scale the diagram to make it look plausible at point size .IR arg ; default is 10 point. . . .\" -------------------------------------------------------------------- .SS Bonds .\" -------------------------------------------------------------------- . This . .RS .SY bond .RI [ direction ] .RI [ length\ n ] .RB [ from\ \c .IR Name | picstuff ] .YS .RE . .P draws a single bond in direction from nearest corner of .IR Name . .B bond can also be .BR "double bond" , .BR "front bond" , .BR "back bond" , etc. . (We will get back to .I Name soon.) . . .P .I direction is the angle in degrees (0\~up, positive clockwise) or a direction word like .BR up , .BR down , .B sw (=\~southwest), etc. . If no direction is specified, the bond goes in the current direction (usually that of the last bond). . . .P Normally the bond begins at the last object placed; this can be changed by naming a .B from place. . For instance, to make a simple alkyl chain: . .RS .TS tab (@); lb l. CH3 bond@(this one goes right from the CH3) C@(at the right end of the bond) double bond up@(from the C) O@(at the end of the double bond) bond right from C CH3 .TE .RE . . .P A length in inches may be specified to override the default length. . Other .I pic commands can be tacked on to the end of a bond command, to created dotted or dashed bonds or to specify a .B to place. . . .\" -------------------------------------------------------------------- .SS Rings .\" -------------------------------------------------------------------- . There are lots of rings, but only 5 and 6-sided rings get much support. . .B ring by itself is a 6-sided ring; .B benzene is the benzene ring with a circle inside. .B aromatic puts a circle into any kind of ring. . .RS .SY ring .RB [ \%pointing\ ( up | right | left | down )] .RB [ \%aromatic ] .RB [ put\ Mol\ at\ \fIn\fP ] .RB [ \%double\ \c .IR i , j\ \c .IR k , l\ \c \*(El] .RI [ picstuff ] .YS .RE . . .P The vertices of a ring are numbered 1, 2, \*(El from the vertex that points in the natural compass direction. . So for a hexagonal ring with the point at the top, the top vertex is\~1, while if the ring has a point at the east side, that is vertex\~1. . This is expressed as . .IP .ft B .nf R1: ring pointing up R2: ring pointing right .fi .ft . . .P The ring vertices are named .BR .V1 , \*(El, .BI .V n\fR,\fP with .B .V1 in the pointing direction. . So the corners of .B R1 are .B R1.V1 (the .IR top ), .BR R1.V2 , .BR R1.V3 , .B R1.V4 (the .IR bottom ), etc., whereas for .BR R2 , .B R2.V1 is the rightmost vertex and .B R2.V4 the leftmost. . These vertex names are used for connecting bonds or other rings. For example, . .IP .ft B .nf R1: benzene pointing right R2: benzene pointing right with .V6 at R1.V2 .fi .ft .P creates two benzene rings connected along a side. . . .P Interior double bonds are specified as .BI \%double\ n1 , n2\ n3 , n4\ \fR\*(El;\fP each number pair adds an interior bond. . So the alternate form of a benzene ring is . .IP .B "ring double 1,2 3,4 5,6" . . .P Heterocycles (rings with something other than carbon at a vertex) are written as .BI put\ X\ at\ V\fR,\fP as in . .IP .B "R: ring put N at 1 put O at 2" . . .P In this heterocycle, .B R.N and .B R.O become synonyms for .B R.V1 and .BR R.V2 . . . .P There are two 5-sided rings. . .B ring5 is pentagonal with a side that matches the 6-sided ring; it has four natural directions. . A .B \%flatring is a 5-sided ring created by chopping one corner of a 6-sided ring so that it exactly matches the 6-sided rings. . . .P The description of a ring has to fit on a single line. . . .\" -------------------------------------------------------------------- .SS Moieties and Strings .\" -------------------------------------------------------------------- . A moiety is a string of characters beginning with a capital letter, such as N(C2H5)2. . Numbers are converted to subscripts (unless they appear to be fractional values, as in N2.5H). . The name of a moiety is determined from the moiety after special characters have been stripped out: e.g., N(C2H5)2) has the name NC2H52. . . .P Moieties can be specified in two kinds. . Normally a moiety is placed right after the last thing mentioned, separated by a semicolon surrounded by spaces, e.g., . .IP .B "B1: bond ; OH" . .P Here the moiety is .BR OH ; it is set after a bond. . . .P As the second kind a moiety can be positioned as the first word in a .IR pic -like command, e.g., . .IP .B "CH3 at C + (0.5,0.5)" . .P Here the moiety is .BR CH3 . It is placed at a position relative to .BR C , a moiety used earlier in the chemical structure. . . .P So moiety names can be specified as .I chem positions everywhere in the .I chem code. . Beneath their printing moieties are names for places. . . .P The moiety .B BP is special. . It is not printed but just serves as a mark to be referred to in later .I chem commands. . For example, . .IP .B "bond ; BP" . .P sets a mark at the end of the bond. . This can be used then for specifying a place. . The name .B BP is derived from .I branch point (i.e., line crossing). . . .P A string within double quotes .B \(dq is interpreted as a part of a .I chem command. . It represents a string that should be printed (without the quotes). . Text within quotes \(dq\*(El\(dq is treated more or less like a moiety except that no changes are made to the quoted part. . . .\" -------------------------------------------------------------------- .SS Names .\" -------------------------------------------------------------------- . In the alkyl chain above, notice that the carbon atom .B C was used both to draw something and as the name for a place. . A moiety always defines a name for a place; you can use your own names for places instead, and indeed, for rings you will have to. . A name is just . .IP .IB Name : \*(El . . .P .I Name is often the name of a moiety like .BR CH3 , but it need not to be. . Any name that begins with a capital letter and which contains only letters and numbers is valid: . .RS .TP .B First: .B bond .TQ \& .B "bond 30 from First" .RE . . .\" -------------------------------------------------------------------- .SS Miscellaneous .\" -------------------------------------------------------------------- . The specific construction .RS .TP .BR bond\ \*(El " ; moiety" .RE .P is equivalent to .IP .ft B .nf bond moiety .fi .ft . . .P Otherwise, each item has to be on a separate line (and only one line). Note that there must be whitespace after the semicolon which separates the commands. . . .P A period character .B .\& or a single quote .B ' in the first column of a line signals a .I troff command, which is copied through as-is. . . .P A line whose first non-blank character is a hash character .RB ( # ) is treated as a comment and thus ignored. . However, hash characters within a word are kept. . . .P A line whose first word is .B pic is copied through as-is after the word .B pic has been removed. . . .P The command .IP .B size .I n .P scales the diagram to make it look plausible at point size\~\c .I n (default is 10\~point). . . .P Anything else is assumed to be .I pic code, which is copied through with a label. . . .P Since .B @g@chem is a .B @g@pic preprocessor, it is possible to include .I pic statements in the middle of a diagram to draw things not provided for by .I chem itself. . Such .I pic statements should be included in .I chem code by adding .B pic as the first word of this line for clarity. . . .P The following .I pic commands are accepted as .I chem commands, so no .B pic command word is needed: . .IP .B define Start the definition of .I pic macro within .IR chem . . .RS .TP .B [ Start a block composite. . .TP .B ] End a block composite. . .TP .B { Start a macro definition block. . .TP .B } End a macro definition block. .RE . .P The macro names from .B define statements are stored and their call is accepted as a .I chem command as well. . . .\" -------------------------------------------------------------------- .SS WISH LIST .\" -------------------------------------------------------------------- . .P This TODO list was collected by Brian Kernighan. . . .P Error checking is minimal; errors are usually detected and reported in an oblique fashion by .IR pic . . . .P There is no library or file inclusion mechanism, and there is no shorthand for repetitive structures. . . .P The extension mechanism is to create .I pic macros, but these are tricky to get right and don't have all the properties of built-in objects. . . .P There is no in-line chemistry yet (e.g., analogous to the $\*(El$ construct of eqn). . . .P There is no way to control entry point for bonds on groups. . Normally a bond connects to the carbon atom if entering from the top or bottom and otherwise to the nearest corner. . . .P Bonds from substituted atoms on heterocycles do not join at the proper place without adding a bit of .IR pic . . . .P There is no decent primitive for brackets. . . .P Text (quoted strings) doesn't work very well. . . .P A squiggle bond is needed. . . .\" -------------------------------------------------------------------- .SH "FILES" .\" -------------------------------------------------------------------- . .TP .FN @DATASUBDIR@/pic/chem.pic A collection of .I pic macros needed by .BR @g@chem . . .TP .FN @MACRODIR@/pic.tmac A macro file which redefines .B .PS and .BR .PE to center .I pic diagrams. . .TP .FN @DOCDIR@/examples/chem/*.chem Example files for .IR chem . . .TP .FN @DOCDIR@/examples/chem/122/*.chem Example files from the classical .I chem book .BR 122.ps . . . .\" -------------------------------------------------------------------- .SH "BUGS" .\" -------------------------------------------------------------------- . Report bugs to the .MT bug-groff@\:gnu.org bug-groff mailing list .ME . . Include a complete, self-contained example that will allow the bug to be reproduced, and say which version of .I groff and .I chem you are using. . You can get both version numbers by calling .BR "@g@chem --version" . . . .P You can also use the .MT groff@\:gnu.org groff mailing list .ME , but you must first subscribe to this list. . You can do that by visiting the .UR http://\:lists.gnu.org/\:mailman/\:listinfo/\:groff groff mailing list web page .UE . . . .P See .BR \%groff (@MAN1EXT@) for information on availability. . . .\" -------------------------------------------------------------------- .SH "SEE ALSO" .\" -------------------------------------------------------------------- . .BR \%groff (@MAN1EXT@), .BR \%@g@pic (@MAN1EXT@), .BR \%groffer (@MAN1EXT@). . . .P You can still get the original .UR http://\:cm.bell-labs.com/\:netlib/\:typesetting/\:chem.gz chem awk source .UE . . Its .FN README file was used for this manual page. . . .P The other classical document on .I chem is .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:122.ps.gz 122.ps .UE . . . .\" -------------------------------------------------------------------- .SH "AUTHOR" .\" -------------------------------------------------------------------- .au . . .\" -------------------------------------------------------------------- .SH "COPYING" .\" -------------------------------------------------------------------- .co . . .\" -------------------------------------------------------------------- .\" Emacs settings .\" -------------------------------------------------------------------- . .\" Local Variables: .\" mode: nroff .\" End: groff-1.22.2/contrib/chem/ChangeLog0000644000175000001440000001655212104714260015376 0ustar wlusers2013-01-29 Werner LEMBERG * Makefile.sub (MOSTLYCLEANADD): Fix typo. 2010-12-13 Werner LEMBERG Really fix handling of examples/122. * examples/122/README: Renamed to... * examples/122/README.txt: This. * Makefile.sub (all, MOSTLYCLEANADD): Add `examples/122/README'. (examples/122/README): New target. (install_data): Fix typo. 2010-06-02 Larry Jones * Makefile.sub (install): Fix handling of examples/122. It tried to process the CVS subdirectory as a file. 2009-01-03 Werner LEMBERG * chem.pl: Prepare for groff version 1.20. 2008-01-04 Werner LEMBERG * chem.man: Insert `\:' in URLs where appropriate. 2007-02-06 Eric S. Raymond * chem.man: Change .UR/.UE and .MT/.ME so the start macro no longer takes a second argument that is pasted to the end of the generated text. Instead, the end macro takes an argument that does the same thing. 2007-02-02 Werner LEMBERG * chem.man: Further refinements and normalizations. 2007-02-02 Eric S. Raymond * chem.man: Converted to use .SY/.OP/.YS and for cross-viewer portability. Conversion checked using the protocol described in tmac/TESTING-HINTS. 2006-11-10 Bernd Warken ________________________________________________________________ * release of chem 0.3.1 * chem.man: Add information about example files. 2006-11-10 Werner LEMBERG * chem.man1: Rename back to... * chem.man: This. Use @G@, @MACRODIR@, and @DATASUBDIR@. * Makefile.sub (CLEANADD, all): Don't handle chem.man. (chem.man): Remove rule. (chem): s/tmacdir/MACRODIR/, s/picdir/PICDIR/. * chem.pl: s/tmacdir/MACRODIR/, s/picdir/PICDIR/. 2006-11-10 Bernd Warken ________________________________________________________________ * release of chem 0.3.0 * chem.man1: Rename `chem.man' to translate some `@...@' constructs. Some minor corrections. Remove some unused macros. * examples/README.txt, examples/122/README: Add information on `roff2*' programs. * chem.pic: Rename `macros.pic'. * Makefile.sub, chem.pl: Replace `macros.pic' by `chem.pic'. 2006-11-09 Werner LEMBERG * chem.man: Revised. 2006-11-08 Bernd Warken ________________________________________________________________ * release of chem 0.2.0 * pic.tmac: Remove this file. Use instead the installed pic.tmac in $(tmacdir). * Makefile.sub, chem.pl: - Install macros.pic to $(tmacdir)/pic/chem.pic. - Remove parts with `libdir'. 2006-11-07 Werner LEMBERG * Makefile.sub: Add and fix $(srcdir) where necessary to make it compile with srcdir != builddir. Other minor fixes improvements. 2006-11-07 Bernd Warken ________________________________________________________________ * release of chem 0.1.2 ### `chem' works now with all example files (examples/*.chem and examples/122/*.chem). * examples/122/README: Add some information on the example files. * examples/122/chAi_poly_vinyl_chloride.chem: Use .ps with argument `-2' and recall `.ps +2' at the end of the file. This stops the size shift in the following files. * examples/122/ch6b_dna.chem: Make the file runnable, it works now. * examples/reserpine.chem: Change access to `begin chem'. * chem.man: - Fix the BUGS section. - Correct the name of the macro file to `macros.pic'. - Extent section DESCRIPTION and LANGUAGE. - Moieties and Strings: Rewritten section about moieties and double quoted strings. * chem.pl: - parameter check: Add filespecs only when non-empty file. - Set $Last_Type to $OTHER for the `pic' command. - joinring(), label(), labsave(), reduce(): Remove these functions. - `[', `]', `{', `}', `define': Make these and the defined functions commands for `chem' without using the `pic' word. - @Words: Fix it such that all double quoted strings are completely in an element. - `Last: ': Remove this prefix from all commands that are related to `pic'. ### global variables * chem.pl: - $Line: Add this variable to store the unchanged input line. - %Params: Add the variables from setparams() to this hash. - %Types: Add BOND, MOL, RING, OTHER from init() to this hash. - %Put: Move %put to this. - %Dbl: Move %dbl to this. - %Labtype: Move %labtype to this. - %Aromatic: Move $aromatic to this. - %Dc: Move %dc to this. - %Nput: Move $nput to this. - %Define: New hash for storing the names of the `define' constructs during `chem'. Use the elements in `%Define' as `chem' commands. 2006-10-27 Bernd Warken ________________________________________________________________ * release of chem 0.1.1 * chem.pl: - Add handling of `[' and `]' (extension of chem awk). - Restrict line break after labels. * ChangeLog: Correct the former entry. 2006-10-26 Bernd Warken ________________________________________________________________ * release of chem 0.1.0 ### Extensions to the chem awk version. * chem.pl: - parameters: -h, --help, -v, --version, -- are added as options. The minus character - is added as filespec for standard input, it may be used several times. - remove the functions `inline', `shiftfields', and `set'. - Fix the handling of the initialization commands .PS, .cstart, `begin chem', and `end'. - Add error massages. - error(): Add file name. - Add concatenation of lines with final backslash `\'. - Add pic.tmac to guarantee that each pic display is centered. - Warnings and strict are active. ### Source files of the chem Perl version * chem.pl: Source file for the Perl version of chem. * macros.pic: Pic macro file that is loaded by each run of chem. * pic.tmac: Macro file for .PS and .PE; taken over from the groff source file /tmac/pic.tmac. * Makefile.sub: Make file for the groff system. * ChangeLog: This file. * chem.man: Manual page for the Perl version of chem. * README.txt: File for information on this chem version. * examples/*.chem: Self-constructed example files for chem. * examples/README.txt: Information on the example files. * examples/122/*.chem: Example files from the classical chem book 122.ps at . * examples/122/README: Information on the example files in this directory. 2006-10-16 Bernd Warken * awk version of chem chem is a roff preprocessor that generates chemical structure diagrams suitable for the pic preprocessor. The original version of chem is an awk script written by Brian Kernighan. This project is a rewrite of chem in Perl. 2006-10-15 Bernd Warken ________________________________________________________________ License Copyright (C) 2006-2010, 2013 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 `chem', which is part of the `groff' project. ####### Emacs settings Local Variables: mode: change-log End: groff-1.22.2/contrib/chem/Makefile.sub0000644000175000001440000000754412104714260016055 0ustar wlusers# Makefile.sub for `chem' (integration into the `groff' source tree) # File position: /contrib/chem/Makefile.sub # Copyright (C) 2006, 2009, 2010, 2013 Free Software Foundation, Inc. # Written by Bernd Warken . # Last update: 29 Jan 2013 # This file is part of `chem' 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 3 of the License, 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 this program. If not, see . ######################################################################## MAN1=chem.n MOSTLYCLEANADD=\ chem \ chem.n \ README \ examples/README \ examples/122/README # not all make programs have $(RM) predefined. RM=rm -f all: README examples/README examples/122/README \ chem \ $(MAN1) README: $(srcdir)/README.txt sed -e "s|@g@|$(g)|g" $? >$@ examples/README: $(srcdir)/examples/README.txt -test -d examples || $(mkinstalldirs) examples sed -e "s|@g@|$(g)|g" $? >$@ examples/122/README: $(srcdir)/examples/122/README.txt -test -d examples || $(mkinstalldirs) examples -test -d examples/122 || $(mkinstalldirs) examples/122 sed -e "s|@g@|$(g)|g" $? >$@ chem: $(srcdir)/chem.pl $(SH_DEPS_SED_SCRIPT) sed -f "$(SH_DEPS_SED_SCRIPT)" \ -e "s|@g@|$(g)|g" \ -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \ -e "s|@MACRODIR@|$(DESTDIR)$(tmacdir)|g" \ -e "s|@PICDIR@|$(DESTDIR)$(datasubdir)/pic|g" \ -e "s|@VERSION@|$(version)$(revision)|g" \ -e "$(SH_SCRIPT_SED_CMD)" \ $(srcdir)/chem.pl >$@ chmod +x $@ install_data: chem \ README examples/README examples/122/README \ $(srcdir)/chem.pic \ $(srcdir)/examples/*.chem $(srcdir)/examples/122/*.chem -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) $(RM) $(DESTDIR)$(bindir)/$(g)chem $(INSTALL_SCRIPT) chem $(DESTDIR)$(bindir)/$(g)chem -test -d $(DESTDIR)$(datasubdir)/pic \ || $(mkinstalldirs) $(DESTDIR)$(datasubdir)/pic $(RM) $(DESTDIR)$(datasubdir)/pic/chem.pic $(INSTALL_DATA) $(srcdir)/chem.pic \ $(DESTDIR)$(datasubdir)/pic/chem.pic -test -d $(DESTDIR)$(exampledir)/chem \ || $(mkinstalldirs) $(DESTDIR)$(exampledir)/chem -test -d $(DESTDIR)$(exampledir)/chem/122 \ || $(mkinstalldirs) $(DESTDIR)$(exampledir)/chem/122 -$(RM) $(DESTDIR)$(exampledir)/chem/* $(INSTALL_DATA) examples/README \ $(DESTDIR)$(exampledir)/chem/README for i in $(srcdir)/examples/*.chem; do \ n=`echo $$i | sed 's|$(srcdir)/examples/||g'`; \ $(INSTALL_DATA) $$i $(DESTDIR)$(exampledir)/chem/$$n; \ done -$(RM) $(DESTDIR)$(exampledir)/chem/122/* $(INSTALL_DATA) examples/122/README \ $(DESTDIR)$(exampledir)/chem/122/README for i in $(srcdir)/examples/122/*.chem; do \ n=`echo $$i | sed 's|$(srcdir)/examples/122/||g'`; \ $(INSTALL_DATA) $$i $(DESTDIR)$(exampledir)/chem/122/$$n; \ done uninstall_sub: $(RM) $(DESTDIR)$(bindir)/chem $(RM) $(DESTDIR)$(datasubdir)/pic/chem.pic -rmdir $(DESTDIR)$(datasubdir)/pic $(RM) $(DESTDIR)$(exampledir)/chem/122/* -rmdir $(DESTDIR)$(exampledir)/chem/122 $(RM) $(DESTDIR)$(exampledir)/chem/* -rmdir $(DESTDIR)$(exampledir)/chem -rmdir $(DESTDIR)$(exampledir) ######################################################################## # Emacs settings ######################################################################## # # Local Variables: # mode: makefile # End: groff-1.22.2/contrib/pdfmark/0000755000175000001440000000000012104714260014323 5ustar wlusersgroff-1.22.2/contrib/pdfmark/pdfmark.tmac0000644000175000001440000021153712104714260016626 0ustar wlusers.\" -*- nroff -*- .ig pdfmark.tmac Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 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 3 of the License, 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 this program. If not, see . Author's Note ============= While I have written this macro package from scratch, much of my inspiration has come from discussion on the groff mailing list (mailto:groff@gnu.org). I am particularly indebted to: Kees Zeelenberg, for an earlier macro package he posted, a study of which helped me to get started. Carlos J. G. Duarte and Werner Lemberg, whose discussion on computation of the bounding boxes for link "hot-spots" forms the basis of such computations in this package. .. .if !\n(.g .ab These pdfmark macros require groff. .\" .\" Check if we have already been loaded -- do not reload .if d pdfmark .nx .\" .\" ====================================================================== .\" Module PDFMARK: Insert Arbitrary PDFMARK Code in the Postscript Stream .\" ====================================================================== .\" .\" PDFMARK output may be disabled, by zeroing the PDFOPMODE register, .\" ( which mimics a more generic OPMODE, if it is defined ). .\" .if rOPMODE .aln PDFOPMODE OPMODE .\" .\" but if OPMODE wasn't defined, .\" then make the default PDFMARK mode ENABLED. .\" .if !rPDFOPMODE .nr PDFOPMODE 1 .\" .\" PDFMARK output must be constrained to a maximum line length limit, .\" for strict compliance with the Postscript DSC. This limit is defined .\" in register "PDFMARK.FOLDWIDTH.MAX". This is user definable, up to a .\" ceiling value of 255, which is also its default value; this limit .\" is enforced for each PDFMARK, by macro "pdf*pdfmark.limit". .\" .de pdf*pdfmark.limit .\" ---------------------------------------------------------------- .\" Usage: .\" .pdf*pdfmark.limit REGISTER-NAME DEFAULT-MAXIMUM-VALUE .\" ---------------------------------------------------------------- .\" .\" If a register named REGISTER-NAME has not been defined, then .\" define it now, with default value = DEFAULT-MAXIMUM-VALUE. .\" .if !r\\$1 .nr \\$1 \\$2 .\" .\" But when it has already been defined, ensure that its value does .\" not exceed DEFAULT-MAXIMUM-VALUE; if value does exceed this ceiling, .\" then redefine it, to enforce the limit. .\" .if (\\n[\\$1] > \\$2) .nr \\$1 \\$2 .. .\" The "pdfmark" macro is responsible for emitting the appropriate .\" Postscript code. .\" .de pdfmark .\" ---------------------------------------------------------------- .\" Usage: .\" .pdfmark text of pdfmark instruction .\" Macro supplies the required opening "[" and closing "pdfmark" .\" operator; DO NOT include them in the instruction text! .\" ---------------------------------------------------------------- .\" .if \\n[PDFOPMODE] \{\ .\" .\" Strict DSC compliance forbids emission of ps:exec lines which .\" exceed 255 characters in length. We will allow the user to specify .\" an alternative lesser limit ... .\" . pdf*pdfmark.limit PDFMARK.FOLDWIDTH.MAX 255 .\" .\" ... and we will also support a second lesser limit, which will be .\" applied to literal text parenthetically embedded within the PDFMARK. .\" . pdf*pdfmark.limit PDFMARK.FOLDWIDTH \\n[PDFMARK.FOLDWIDTH.MAX] .\" .\" We will push out the entire PDFMARK in one chunk, provided it fits .\" within this limit. .\" . length pdf:length "[\\$* pdfmark\" . ie !(\\n[pdf:length] > \\n[PDFMARK.FOLDWIDTH]) \{\ . \" . \" This PDFMARK is suitable for single chunk output ... . \" . nop \!x X ps:exec [\\$* pdfmark . \} . el \{\ . \" ... but, when the limit would be violated, then we must . \" recompose the specified PDFMARK, spreading it over as many . \" continuation lines as are necessary. . \" . als pdf*compose pdf*compose.first . while \\n(.$ \{\ . pdf*compose \\$1 . shift . \} . \" . \" Complete the PDFMARK recomposition, by appending a . \" "pdfmark" operator, and push it out to the intermediate . \" output stream, (excluding its final line break). . \" . pdf*compose pdfmark . pdf*pdfmark.dispatch . \" . \" And clean up when done. . \" . rm pdf*compose pdf*pdfmark.post . rm pdf:compose.test pdf:composed.literal . \} . rr pdf:length . \} .. .\" When a PDFMARK exceeds the specified output record length limit, .\" then we decompose it, subsequently using the dynamically overloaded .\" macro, "pdf*compose", to reassemble it into as many continuation .\" records as it may require. .\" .\" Each call to "pdf*compose" uses macro "pdf*length.increment" to .\" keep track of the current output record length, so ensuring that .\" the active maximum length limit is not violated. .\" .de pdf*length.increment .\" ---------------------------------------------------------------- .\" Usage: .\" .pdf*length.increment NEXT-ADDITION .\" ---------------------------------------------------------------- .\" .ie d pdf:composed.line \ . length pdf:length "\\*[pdf:composed.line] \\$*\" .el .length pdf:length "\\$*\" .. .\" The first call to "pdf*compose" for each PDFMARK is directed .\" to "pdf*compose.first"; this initialises the local strings .\" and macros used to compose the eventual PDFMARK output. .\" .de pdf*compose.first .\" ---------------------------------------------------------------- .\" Usage: .\" .als pdf*compose pdf*compose.first .\" . pdf*compose TOKEN .\" ---------------------------------------------------------------- .\" .\" Ensure that the output record accumulator will be initialised .\" on posting of the first composed PDFMARK record. .\" .als pdf*pdfmark.post pdf*pdfmark.post.first .\" .\" The first token passed to "pdf*compose" should not be a .\" literal, but be prepared to handle one, just in case. .\" .ds pdf:compose.test \\$1 .substring pdf:compose.test 0 0 .ie '('\\*[pdf:compose.test]' \{\ .\" .\" We found a literal, even though we didn't expect it; .\" if it's a single element literal, we can just handle it .\" as if it is a regular token anyway. .\" . ds pdf:compose.test "\\$\\n(.$\" . substring pdf:compose.test -1 . if !')'\\*[pdf:compose.test]' \{\ . \" . \" But when it is the first of a literal sequence, . \" then we need to set up "pdf*compose" to handle it. . \" . ds pdf:composed.literal "[\\$*\" . als pdf*compose pdf*compose.literal . \} . \} .el .ds pdf:compose.test ) .if ')'\\*[pdf:compose.test]' \{\ .\" .\" In the normal case, we start each new PDFMARK with a .\" regular token; save it as the first in the composed output .\" line sequence, and set up "pdf*compose" to collect .\" the rest of the sequence. .\" . ds pdf:composed.line "[\\$*\" . als pdf*compose pdf*compose.next . \} .. .\" Subsequent calls to "pdf*compose", while collecting .\" regular tokens, are then directed to "pdf*compose.next". .\" .de pdf*compose.next .\" ---------------------------------------------------------------- .\" Usage: .\" .als pdf*compose pdf*compose.next .\" . pdf*compose TOKEN .\" ---------------------------------------------------------------- .\" .\" This first checks to ensure that the supplied token really is .\" a regular token, and not the first element in a literal. .\" .ds pdf:compose.test \\$1 .substring pdf:compose.test 0 0 .ie '('\\*[pdf:compose.test]' \{\ .\" .\" The supplied token represents the first element of a literal, .\" but it may be a single element literal, which we simply handle .\" as a regular token anyway. .\" . ds pdf:compose.test "\\$\\n(.$\" . substring pdf:compose.test -1 . if !')'\\*[pdf:compose.test]' \{\ . \" . \" The supplied token is the first of a sequence of elements . \" which collectively define a literal, so start collecting a . \" composite literal token, and change the "pdf*compose" . \" state, to collect and append the remaining elements. . \" . ds pdf:composed.literal "\\$*\" . als pdf*compose pdf*compose.literal . \} . \} .el .ds pdf:compose.test ) .if ')'\\*[pdf:compose.test]' \{\ .\" .\" The supplied token IS a regular token; add it, but ensure that .\" the active maximum record length limit is honoured. .\" . pdf*length.increment "\\$*\" . ie (\\n[pdf:length] > \\n[PDFMARK.FOLDWIDTH.MAX]) \{\ . \" . \" Adding this token would cause the current PDFMARK record, in . \" groff's intermediate output file, to overflow the active record . \" length limit, so post the current record and start another. . \" . pdf*pdfmark.dispatch . ds pdf:composed.line "\\$*\" . \} . el \{\ . \" . \" This token will fit in the current PDFMARK record, without . \" violating the active length limit, so simply add it. . \" . ie d pdf:composed.line .as pdf:composed.line " \\$*\" . el .ds pdf:composed.line "\\$*\" . \} . \} .. .\" While assembling a multiple token literal sequence into a single .\" literal token, successive calls to "pdf*compose" are directed .\" to "pdf*compose.literal". .\" .de pdf*compose.literal .\" ---------------------------------------------------------------- .\" Usage: .\" .als pdf*compose pdf*compose.literal .\" . pdf*compose TOKEN .\" ---------------------------------------------------------------- .\" .\" First, check to ensure that the current token can be appended to .\" the accumulated literal, without extending it beyond the maximum .\" allowed literal token length. .\" .length pdf:length "\\*[pdf:composed.literal] \\$*\" .ie (\\n[pdf:length] > (\\n[PDFMARK.FOLDWIDTH] - 2)) \{\ .\" .\" If it has grown too long, then it must be folded across two .\" physical PDFMARK output records, so check if we can accommodate .\" the portion collected so far within the current output record. .\" . pdf*length.increment "\\*[pdf:composed.literal]\" . if (\\n[pdf:length] > (\\n[PDFMARK.FOLDWIDTH.MAX] - 2)) \{\ . \" . \" The current output record CAN'T accommodate the currently . \" composed portion of the literal, so flush out the current . \" record, to make way for the accumulated literal, and mark . \" the dispatch mode as "wrapped", for the fragments of the . \" folded literal string, which are to follow. . \" . pdf*pdfmark.dispatch . ds pdf*pdfmark.dispatch.wrapped . \} . ie d pdf:composed.line \{\ . \" . \" If we DIDN'T need to flush the current output record, . \" then we can simply append the accumulated literal to it... . \" . as pdf:composed.line " \\*[pdf:composed.literal]\" . \} . el \{\ . \" . \" otherwise, when the current record has been flushed, or is . \" empty, then we promote the accumulated literal, to make it . \" the next output record... . \" . rn pdf:composed.literal pdf:composed.line . \} .\" .\" Now, to complete the fold, flush out any accumulated partial .\" output record, and continue accumulating the literal, starting .\" with the current token. .\" . pdf*pdfmark.dispatch . ds pdf:composed.literal "\\$*\" . \} .el \{\ .\" .\" Alternatively, when we HAVEN'T identified a need to fold the .\" current output record, then we simply append the current token .\" to the accumulated literal token buffer string. .\" . as pdf:composed.literal " \\$*\" . \} .\" .\" Having ensured that we have sufficient space, in which to .\" append the current token to the currently accumulated literal, .\" we check its rightmost character, to see if is the closing .\" parenthesis, which completes the literal. .\" .ds pdf:compose.test \\$\\n(.$ .substring pdf:compose.test -1 .if ')'\\*[pdf:compose.test]' \{\ .\" .\" The literal has been completely collected, so we may now append .\" it to the current output record, as a single literal token, but .\" subject to the constraint that it must not extend the output .\" record beyond the maximum permitted length. .\" . pdf*length.increment "\\*[pdf:composed.literal]\" . ie (\\n[pdf:length] > \\n[PDFMARK.FOLDWIDTH.MAX]) \{\ . \" . \" So, when the literal cannot be accommodated within the maximum . \" length constraint, then we flush the current record, and start . \" a new one, with the literal token as its first entry. . \" . pdf*pdfmark.dispatch . rn pdf:composed.literal pdf:composed.line . \} . el \{\ . \" . \" When the literal CAN be accommodated within the maximum length . \" constraint, then ... . \" . ie d pdf:composed.line \{\ . \" . \" When an output record has already been instantiated, we . \" append the literal token to it, and discard the accumulator . \" string, which is no longer required. . \" . as pdf:composed.line " \\*[pdf:composed.literal]\" . rm pdf:composed.literal . \} . el \{\ . \" . \" But when no output record yet exists, then we simply . \" reassign the accumulated literal token, to instantiate a . \" new output record. . \" . rn pdf:composed.literal pdf:composed.line . \} . \} .\" .\" Finally, since we have completed the accumulation of the literal, we .\" revert to the "unwrapped" mode of operation for "pdf*pdfmark.dispatch", .\" and restore the normal "pdf*compose" action, for collection of the next .\" token (if any). .\" . rm pdf*pdfmark.dispatch.wrapped . als pdf*compose pdf*compose.next . \} .. .\" While composing a multiple record PDFMARK, each composed record .\" must be added to the collection, whenever the partially composed .\" output record has been filled; this is handled when necessary, .\" by calling the "pdf*pdfmark.dispatch" macro. .\" .de pdf*pdfmark.dispatch .\" ---------------------------------------------------------------- .\" Usage: .\" .pdf*pdfmark.dispatch .\" ---------------------------------------------------------------- .\" .if d pdf:composed.line \{\ .\" .\" This is simply a wrapper around the overloaded "pdf*pdfmark.post" .\" macro, ensuring that an output record has actually been collected .\" before attempting to post it; it then cleans up after posting, to .\" ensure that each collected record is posted only once. .\" . if d pdf*pdfmark.dispatch.wrapped \{\ . \" . \" When dispatching an excessively long literal string, which . \" must be wrapped over multiple records, this mode is active . \" for all but the closing record; we must escape the newline . \" at the end of each such unclosed literal record. . \" . as pdf:composed.line " \\\\\\\\\" . \} . pdf*pdfmark.post . rm pdf:composed.line . \} .. .\" For each PDFMARK, the first call of "pdf*pdfmark.post" is directed .\" to the "pdf*pdfmark.post.first" macro; this initialises the state .\" of the "pdf:composed" macro, for assembly of a new PDFMARK. .\" .de pdf*pdfmark.post.first . nop \!x X ps:exec \\*[pdf:composed.line] .\" .\" Subsequent calls to "pdf*pdfmark.post" are redirected to the .\" alternative "pdf*pdfmark.post.next" macro, which simply appends .\" additional PDFMARK records to the "pdf:composed" macro. .\" .als pdf*pdfmark.post pdf*pdfmark.post.next .. .de pdf*pdfmark.post.next . nop \!+\\*[pdf:composed.line] .. .\" "pdf*end" is a dummy macro. It is required to mark the end .\" of each individual fragment which is added to "pdf:composed"; .\" other than this, it does nothing. .\" .de pdf*end .. .\" .\" Some supporting macros defer actual pdfmark output until an .\" appropriate time for it to be written; the "pdfsync" macro .\" provides a mechanism for flushing such deferred output; .\" it should be called from an end macro, and at any other time .\" when it may be deemed necessary to flush pdfmark context. .\" .de pdfsync .\" ---------------------------------------------------------------- .\" Usage: .\" .pdfsync buffer ... .\" Arguments indicate which "buffer(s)" to flush: .\" O -> bookmark (outline) cache .\" M -> document metadata diversion .\" If no argument, flush ALL buffers .\" ---------------------------------------------------------------- .\" .ie \\n(.$ \{\ . while \\n(.$ \{\ . if '\\$1'O' .pdf:bm.sync 1 . if '\\$1'M' \{\ . if dpdf:metadata .pdf:metadata . rm pdf:metadata . \} . shift . \} . \} .el .pdfsync O M .. .\" .\" some helper functions ... .\" .\" "pdf:warn" and "pdf:error" write diagnostic messages to stderr .\" .de pdf:warn .\" ---------------------------------------------------------- .\" Usage: .\" .pdf:warn text of message .\" ---------------------------------------------------------- .\" .tm \\n(.F:\\n(.c: macro warning: \\$* .. .de pdf:error .\" ---------------------------------------------------------- .\" Usage: .\" .pdf:error text of message .\" ---------------------------------------------------------- .\" .tm \\n(.F:\\n(.c: macro error: \\$* .. .\" "pdf:pop", assisted by "pdf*pop", allows us to retrieve register, .\" or string values, from a string masquerading as a data queue, .\" or as a stack. .\" .de pdf:pop .\" ---------------------------------------------------------------- .\" Usage: .\" .pdf:pop .\" $1 = nr for numeric register, ds for string .\" $2 = name of register or string to be assigned .\" $3 = name of string, from which data is to be retrieved .\" ---------------------------------------------------------------- .\" .pdf*pop \\$* \\*[\\$3] .. .de pdf*pop .ds pdf:stack \\$3 .\\$1 \\$2 \\$4 .shift 4 .ie \\n(.$ .ds \\*[pdf:stack] \\$* .el .rm \\*[pdf:stack] .rm pdf:stack .. .\" .\" .\" =========================================================== .\" Module PDFINFO: Insert MetaData Entries into a PDF Document .\" =========================================================== .\" .\" N.B. .\" Output from the macros in this module is deferred, until .\" subsequent invocation of .pdfsync, or .pdfexit .\" .\" ."pdfinfo" provides a general purpose form of metadata entry ... .\" it allows arbitrary text to be associated with any specified .\" metadata field name. .\" .de pdfinfo .\" ------------------------------------------------------------------- .\" Usage: .\" .pdfinfo /FieldName field content ... .\" Examples: .\" .pdfinfo /Title A PDF Document .\" .pdfinfo /Author Keith Marshall .\" ------------------------------------------------------------------- .\" .ds pdf:meta.field \\$1 .shift .da pdf:metadata \!.pdfmark \\*[pdf:meta.field] (\\$*) /DOCINFO .di .rm pdf:meta.field .. .\" .\" Macro "pdfview" defines a special form of metadata entry ... .\" it uses the /DOCVIEW pdfmark, to specify the initial (default) view, .\" when the document is opened. .\" .de pdfview .\" ------------------------------------------------------------------- .\" Usage: .\" .pdfview view parameters ... .\" Examples: .\" .pdfview /PageMode /UseOutlines .\" .pdfview /Page 2 /View [/FitH \n(.p u] .\" ------------------------------------------------------------------- .\" .da pdf:metadata \!.pdfmark \\$* /DOCVIEW .di .. .\" .\" .\" ===================================================================== .\" Module PDFNOTE: Insert "Sticky Note" Style Comments in a PDF Document .\" ===================================================================== .\" .\" "PDFNOTE.WIDTH" and "PDFNOTE.HEIGHT" set the preferred size for .\" display of the "sticky note" pane, when opened. Acrobat Reader .\" seems not to honour these -- perhaps GhostScript doesn't encode .\" them correctly! Anyway, let's set some suitable default values, .\" in case the user has a set up which does work as advertised. .\" .nr PDFNOTE.WIDTH 3.5i .nr PDFNOTE.HEIGHT 2.0i .\" .\" "pdf:bbox" defines the expression used to set the size and location .\" of the bounding rectangle for display of notes and link "hot-spots". .\" This is defined, such that a note is placed at troff's current text .\" position on the current page, with its displayed image size defined .\" by the "PDFNOTE.WIDTH" and "PDFNOTE.HEIGHT" registers, while the .\" bounds for a link "hot-spot" are matched to the text region which .\" defines the "hot-spot". .\" .ds pdf:bbox \\n[pdf:llx] u \\n[pdf:lly] u \\n[pdf:urx] u \\n[pdf:ury] u .\" .\" Getting line breaks into the text of a PDFNOTE is tricky -- we need .\" to get a "\n" into the Postscript stream, but three levels of "\" are .\" swallowed, when we invoke "pdfnote". The following definition of "PDFLB", .\" (for LineBreak), is rather ugly, but does allow us to use .\" .\" .pdfnote Some text.\*[PDFLB]Some more text, on a new line. .\" .ds PDFLB \\\\\\\\\\\\\\\\n .\" .de pdfnote .\" ---------------------------------------------------------------------- .\" Usage: .\" .pdfnote [-T "Text for Title"] Text of note ... .\" ---------------------------------------------------------------------- .\" .if \\n[PDFOPMODE] \{\ .\" .\" First, compute the bounding rectangle, .\" for this PDFNOTE instance .\" . mk pdf:ury . nr pdf:llx \\n(.k+\\n(.o+\\n[.in] . nr pdf:lly \\n[pdf:ury]-\\n[PDFNOTE.HEIGHT] . nr pdf:urx \\n[pdf:llx]+\\n[PDFNOTE.WIDTH] . ds pdf:note.instance /Rect [\\*[pdf:bbox]] .\" .\" Parse any specified (recognisable) PDFNOTE options .\" . while dpdf:note\\$1 \{\ . pdf:note\\$1 \\$@ . shift \\n[pdf:note.argc] . \} .\" .\" Emit the note, and clean up .\" . pdfmark \\*[pdf:note.instance] /Contents (\\$*) /ANN . rm pdf:note.instance . rr pdf:note.argc . \} .. .de pdf:note-T .nr pdf:note.argc 2 .as pdf:note.instance " /Title (\\$2) .. .\" .\" .\" ===================================================================== .\" Module PDFBOOKMARK: Add an Outline Reference in the PDF Bookmark Pane .\" ===================================================================== .\" .\" "PDFBOOKMARK.VIEW" controls how the document will be displayed, .\" when the user selects a bookmark. This default setting will fit .\" the page width to the viewing window, with the bookmarked entry .\" located at the top of the viewable area. .\" .ds PDFBOOKMARK.VIEW /FitH \\n[PDFPAGE.Y] u .\" .\" "PDFOUTLINE.FOLDLEVEL" controls how the document outline will be .\" displayed. It is a number, defining the maximum heading level .\" which will be visible, without outline expansion by the user, in .\" the initial view of the document outline. Assuming that no sane .\" document will ever extend to 10,000 levels of nested headings, .\" this initial default value causes outlines to be fully expanded. .\" .nr PDFOUTLINE.FOLDLEVEL 10000 .\" .\" The actual job of creating an outline reference .\" is performed by the "pdfbookmark" macro. .\" .de pdfbookmark .\" ------------------------------------------------------------------ .\" Usage: .\" .pdfbookmark [-T tag] level "Text of Outline Entry" .\" .\" $1 = nesting level for bookmark (1 is top level) .\" $2 = text for bookmark, (in PDF viewer bookmarks list) .\" $3 = suffix for PDF internal bookmark name (optional) .\" ------------------------------------------------------------------ .\" .ie '\\n(.z'' \{\ .\" .\" When we are at the top diversion level, i.e. actually emitting text .\" to the output device stream, then we compute the location of, and .\" plant this bookmark immediately. .\" . if \\n[PDFOPMODE] \{\ . \" . \" Make the bookmark name "untagged" by default, . \" then parse any specified options, to set a "tag", if required . \" . ds pdf:href-T . while dpdf:href.opt\\$1 \{\ . pdf:href.opt\\$1 \\$@ . shift \\n[pdf:href.argc] . \} . rr pdf:href.argc . \" . \" If we found "--" to mark the end of the options, discard it . \" . if '\\$1'--' .shift . \" . \" Synchronise the bookmark cache . \" to the requested bookmark nesting level . \" . pdf:bm.sync \\$1 . shift . \" . \" Increment the bookmark serialisation index . \" in order to generate a uniquely serialised bookmark name, . \" ( which we return in the string "PDFBOOKMARK.NAME" ), . \" and insert this bookmark into the cache . \" . pdf:href.sety . nr pdf:bm.nr +1 . ds PDFBOOKMARK.NAME pdf:bm\\n[pdf:bm.nr]\\*[pdf:href-T] . ds pdf:bm\\n[pdf:bm.nr] /Dest /\\*[PDFBOOKMARK.NAME] . pdfmark \\*[pdf:bm\\n[pdf:bm.nr]] /View [\\*[PDFBOOKMARK.VIEW]] /DEST . as pdf:bm\\n[pdf:bm.nr] " /Title (\\$*) . pdf:href.options.clear . rr PDFPAGE.Y . \} . \} .el \{\ .\" .\" But when we are collecting a diversion which will be written out later, .\" then we must defer bookmark placement, until we emit the diversion. .\" (don't rely on $0 == pdfbookmark here; it may be a volatile alias). .\" . nop \!.pdfbookmark \\$@ . \} .. .\" .\" Macro "pdf:bm.sync" is called for each bookmark created, .\" to establish a cache entry at the appropriate nesting level. .\" It will flush ALL previous cache content, when called to .\" add a new bookmark at level 1, or if simply called at .\" level 1, without adding any bookmark. .\" .de pdf:bm.sync .\" ------------------------------------------------------------------ .\" Usage: .\" .pdf:bm.sync level .\" $1 = nesting level of current bookmark, or 1 to flush cache .\" ------------------------------------------------------------------ .\" .\" First validate the bookmark nesting level .\" adjusting it if required .\" .if \\$1>\\n[pdf:bm.nl] .nr pdf:bm.nl +1 .ie \\$1>\\n[pdf:bm.nl] \{\ . pdf:warn adjusted level \\$1 bookmark; should be <= \\n[pdf:bm.nl] . \} .el .nr pdf:bm.nl \\$1 .if \\n[pdf:bm.nl]<1 \{\ . pdf:warn bad arg (\\$1) in \\$0 \\$1; \\$0 1 forced . nr pdf:bm.nl 1 . \} .\" .\" If reverting from a higher to a lower nesting level, .\" cyclicly adjust cache counts for each pending higher level .\" .if \\n[pdf:bm.lc]>=\\n[pdf:bm.nl] \{\ . nr pdf:bm.lc +1 . if !rpdf:bm.c\\n[pdf:bm.lc].c .nr pdf:bm.c\\n[pdf:bm.lc].c 0 . while \\n[pdf:bm.lc]>\\n[pdf:bm.nl] \{\ . as pdf:bm.c\\n[pdf:bm.lc] " \\n[pdf:bm.c\\n[pdf:bm.lc].c] . rr pdf:bm.c\\n[pdf:bm.lc].c . nr pdf:bm.lc -1 . \} . \} .\" .\" Update the cache level, .\" flushing when we are at level 1 .\" .nr pdf:bm.lc \\n[pdf:bm.nl] .ie \\n[pdf:bm.nl]=1 \{\ . while \\n[pdf:bm.ic]<\\n[pdf:bm.nr] .pdf:bm.emit 0 . rr pdf:bm.rc . \} .el .nr pdf:bm.c\\n[pdf:bm.nl].c +1 .. .\" Macro "pdf:bm.emit" is called, when the cache is at level 1. .\" This flushes ALL pending bookmarks from the cache, i.e. the .\" preceding level 1 bookmark, and any nested dependents, .\" which it may have. .\" .de pdf:bm.emit .\" ------------------------------------------------------------------ .\" Usage: .\" .pdf:bm.emit flag .\" $1 = reference counting flag, used to control recursion .\" ------------------------------------------------------------------ .\" .\" First check for nested dependents, .\" and append the "dependent count" to the bookmark, as required. .\" .nr pdf:bm.ic +1 .nr pdf:bm.lc +1 .pdf:pop nr pdf:bm.rc pdf:bm.c\\n[pdf:bm.lc] .if \\n[pdf:bm.rc] \{\ . ds pdf:bm.fold . if \\n[pdf:bm.lc]>\\n[PDFOUTLINE.FOLDLEVEL] .ds pdf:bm.fold - . as pdf:bm\\n[pdf:bm.ic] " /Count \\*[pdf:bm.fold]\\n[pdf:bm.rc] . rm pdf:bm.fold . \} .pdfmark \\*[pdf:bm\\n[pdf:bm.ic]] /OUT .rm pdf:bm\\n[pdf:bm.ic] .\" .\" For ALL dependents, if any, .\" recursively flush out any higher level dependents, .\" which they themselves may have .\" .while \\n[pdf:bm.rc] \{\ . nr pdf:bm.rc -1 . pdf:bm.emit \\n[pdf:bm.rc] . \} .\" .\" Finally, .\" unwind the recursive call stack, until we return to the top level. .\" .nr pdf:bm.rc \\$1 .nr pdf:bm.lc -1 .. .nr pdf:bm.nr 0 .nr pdf:bm.nl 1 .nr pdf:bm.lc 0 .nr pdf:bm.ic 0 .\" .\" .\" ============================================================= .\" Module PDFHREF: Create Hypertext References in a PDF Document .\" ============================================================= .\" .\" "PDFHREF.VIEW" controls how the document will be displayed, .\" when the user follows a link to a named reference. .\" .ds PDFHREF.VIEW /FitH \\n[PDFPAGE.Y] u .\" .\" This default setting will fit the page width to the viewing .\" window, with the bookmarked entry located close to the top .\" of the viewable area. "PDFHREF.VIEW.LEADING" controls the .\" actual distance below the top of the viewing window, where .\" the reference will be positioned; 5 points is a reasonable .\" default offset. .\" .nr PDFHREF.VIEW.LEADING 5.0p .\" .\" Yuk!!! .\" PDF view co-ordinates are mapped from the bottom left corner, .\" of the page, whereas page printing co-ordinates are mapped .\" conventionally, from top left. .\" .\" Macro "pdf:href.sety" transforms the vertical position of the .\" last printed baseline, from the printing co-ordinate domain to .\" the PDF view domain. .\" .de pdf:href.sety .\" ---------------------------------------------------------------- .\" Usage: .\" .pdf:href.sety .\" ---------------------------------------------------------------- .\" .\" This computation yields the vertical view co-ordinate .\" in groff's basic units; don't forget to append grops' "u" .\" conversion operator, when writing the pdfmark! .\" .nr PDFPAGE.Y \\n(.p-\\n(nl+\\n[PDFHREF.VIEW.LEADING] .. .\" When we create a link "hot-spot" ... .\" "PDFHREF.LEADING" sets the distance above the top of the glyph .\" bounding boxes, in each line of link text, over which the link .\" hot-spot will extend, while "PDFHREF.HEIGHT" sets the hot-spot .\" height, PER LINE of text occupied by the reference. .\" .\" Since most fonts specify some leading space within the bounding .\" boxes of their glyphs, a better appearance may be achieved when .\" NEGATIVE leading is specified for link hot-spots; indeed, when .\" the default 10pt Times font is used, -1.0 point seems to be a .\" reasonable default value for "PDFHREF.LEADING" -- it may be .\" changed, if desired. .\" .\" "PDFHREF.HEIGHT" is initially set as one vertical spacing unit; .\" note that it is defined as a string, so it will adapt to changes .\" in the vertical spacing. Changing it is NOT RECOMMENDED. .\" .nr PDFHREF.LEADING -1.0p .ds PDFHREF.HEIGHT 1.0v .\" .\" PDF readers generally place a rectangular border around link .\" "hot-spots". Within text, this looks rather ugly, so we set .\" "PDFHREF.BORDER" to suppress it -- the three zeroes represent .\" the border parameters in the "/Border [0 0 0]" PDFMARK string, .\" and may be changed to any valid form, as defined in Adobe's .\" PDFMARK Reference Manual. .\" .ds PDFHREF.BORDER 0 0 0 .\" .\" "PDFHREF.COLOUR" (note British spelling) defines the colour to .\" be used for display of link "hot-spots". This will apply both .\" to borders, if used, and, by default to text; however, actual .\" text colour is set by "PDFHREF.TEXT.COLOUR", which may be reset .\" independently of "PDFHREF.COLOUR", to achieve contrasting text .\" and border colours. .\" .\" "PDFHREF.COLOUR" must be set to a sequence of three values, .\" each in the range 0.0 .. 1.0, representing the red, green, and .\" blue components of the colour specification in the RGB colour .\" domain, which is shared by "groff" and the PDF readers. .\" .ds PDFHREF.COLOUR 0.35 0.00 0.60 .defcolor pdf:href.colour rgb \*[PDFHREF.COLOUR] .\" .\" "PDFHREF.TEXT.COLOUR", on the other hand, is simply defined .\" using any "groff" colour name -- this default maps it to the .\" same colour value as "PDFHREF.COLOUR". .\" .ds PDFHREF.TEXT.COLOUR pdf:href.colour .\" .\" Accommodate users who prefer the American spelling, COLOR, to .\" the British spelling, COLOUR. .\" .als PDFHREF.COLOR PDFHREF.COLOUR .als PDFHREF.TEXT.COLOR PDFHREF.TEXT.COLOUR .\" .\" All PDF "Hypertext" reference capabilities are accessed .\" through the "pdfhref" macro .\" .de pdfhref .\" ----------------------------------------------------------------- .\" Usage: .\" .pdfhref ... .\" ----------------------------------------------------------------- .\" .if \\n[PDFOPMODE] \{\ .\" .\" Loop over all subcommands specified in the argument list .\" . while \\n(.$ \{\ . \" . \" Initially, assume each subcommand will complete successfully . \" . nr pdf:href.ok 1 . \" . \" Initialise -E and -X flags in the OFF state . \" . nr pdf:href-E 0 . nr pdf:href-X 0 . \" . \" Handle the case where subcommand is specified as "-class", . \" setting up appropriate macro aliases for subcommand handlers. . \" . if dpdf*href\\$1 .als pdf*href pdf*href\\$1 . if dpdf*href\\$1.link .als pdf*href.link pdf*href\\$1.link . if dpdf*href\\$1.file .als pdf*href.file pdf*href\\$1.file . \" . \" Repeat macro alias setup . \" for the case where the subcommand is specified as "class", . \" (without a leading hyphen) . \" . if dpdf*href-\\$1 .als pdf*href pdf*href-\\$1 . if dpdf*href-\\$1.link .als pdf*href.link pdf*href-\\$1.link . if dpdf*href-\\$1.file .als pdf*href.file pdf*href-\\$1.file . \" . \" Process one subcommand ... . \" . ie dpdf*href \{\ . \" . \" Subcommand "class" is recognised ... . \" discard the "class" code from the argument list, . \" set the initial argument count to swallow all arguments, . \" and invoke the selected subcommand handler. . \" . shift . nr pdf:argc \\n(.$ . pdf*href \\$@ . \" . \" When done, . \" discard all arguments actually consumed by the handler, . \" before proceeding to the next subcommand (if any). . \" . shift \\n[pdf:argc] . \} . el \{\ . \" . \" Subcommand "class" is not recognised ... . \" issue a warning, and discard the entire argument list, . \" so aborting this "pdfhref" invocation . \" . pdf:warn \\$0: undefined reference class '\\$1' ignored . shift \\n(.$ . \} . \" . \" Clean up temporary reference data, . \" to ensure it doesn't propagate to any future reference . \" . rm pdf*href pdf:href.link pdf:href.files . rr pdf:href-E pdf:href-X . pdf:href.options.clear . \} . rr pdf:href.ok . \} .. .\" .\" Macros "pdf:href.flag" and "pdf:href.option" .\" provide a generic mechanism for switching on flag type options, .\" and for decoding options with arguments, respectively .\" .de pdf:href.flag .\" ---------------------------------------------------------------------- .\" ---------------------------------------------------------------------- .nr pdf:href\\$1 1 .nr pdf:href.argc 1 .. .de pdf:href.option .\" ---------------------------------------------------------------------- .\" ---------------------------------------------------------------------- .ds pdf:href\\$1 \\$2 .nr pdf:href.argc 2 .. .\" .\" Valid PDFHREF options are simply declared .\" by aliasing option handlers to "pdf:href.option", .\" or to "pdf:href.flag", as appropriate .\" .als pdf:href.opt-A pdf:href.option \" affixed text .als pdf:href.opt-D pdf:href.option \" destination name .als pdf:href.opt-E pdf:href.flag \" echo link descriptor .als pdf:href.opt-F pdf:href.option \" remote file specifier .als pdf:href.opt-N pdf:href.option \" reference name .als pdf:href.opt-P pdf:href.option \" prefixed text .als pdf:href.opt-T pdf:href.option \" bookmark "tag" .als pdf:href.opt-X pdf:href.flag \" cross reference .\" .\" For references to another document file .\" we also need to support OS dependent file name specifiers .\" .als pdf:href.opt-DF pdf:href.option \" /DOSFile specifier .als pdf:href.opt-MF pdf:href.option \" /MacFile specifier .als pdf:href.opt-UF pdf:href.option \" /UnixFile specifier .als pdf:href.opt-WF pdf:href.option \" /WinFile specifier .\" .\" Macro "pdf:href.options.clear" ensures that ALL option .\" argument strings are deleted, after "pdfhref" has completed .\" all processing which depends on them .\" .de pdf:href.options.clear .\" ----------------------------------------------------------------- .\" Usage: .\" .pdf:href.options.clear [option ...] .\" ----------------------------------------------------------------- .\" .\" When an option list is specified ... .\" .ie \\n(.$ \{\ . \" . \" then loop through the list, . \" deleting each specified option argument string in turn . \" . while \\n(.$ \{\ . if dpdf:href-\\$1 .rm pdf:href-\\$1 . shift . \} . \} .\" .\" ... but when no list is specified, .\" then recurse, to clear all known option argument strings .\" .el .pdf:href.options.clear A D F N P T DF MF UF WF .. .\" .\" "PDFHREF.INFO" establishes the content of the cross reference .\" data record, which is exported via the "stderr" stream, when a .\" cross reference anchor is created using a "pdfhref" macro request .\" of the form .\" .\" .pdfhref M -N name -X text ... .\" .\" .ds PDFHREF.INFO \\*[PDFHREF.NAME] reference data ... .\" .ds PDFHREF.INFO page \\n% \\$* .\" .\" Macro "pdf*href-M" is the handler invoked by "pdfhref", when .\" called with the "M" reference class specifier, to create a .\" named cross reference mark, and to emit a cross reference .\" data record, as specified by "PDFHREF.INFO". .\" .de pdf*href-M .\" ----------------------------------------------------------------- .\" Usage: .\" .pdfhref M [-X] [-N name | -D name] [-E] descriptive text ... .\" ----------------------------------------------------------------- .\" .\" Initially, declare the -D and -N string options as empty, .\" so we avoid warning messages when we try to use them, and find .\" that they are undefined. .\" .ds pdf:href-D .ds pdf:href-N .\" .\" Parse, interpret, and strip any specified options from the .\" argument list. (Note that only options with a declared handler .\" will be processed; there is no provision for detecting invalid .\" options -- anything which is not recognised is assumed to start .\" the "descriptive text" component of the argument list). .\" .while dpdf:href.opt\\$1 \{\ . pdf:href.opt\\$1 \\$@ . shift \\n[pdf:href.argc] . \} .\" .\" If we found "--", to mark the end of the options, .\" then we should discard it. .\" .if '\\$1'--' .shift .\" .\" All PDF reference markers MUST be named. The name may have been .\" supplied using the "-N Name" option, (or the "-D Name" option); .\" if not, deduce it from the first "word" in the "descriptive text", .\" if any, and set the marker -- if we still can't identify the name .\" for the destination, then this marker will not be created. .\" .pdf*href.set \\*[pdf:href-N] \\*[pdf:href-D] \\$1 .\" .\" If we specified a cross reference, with the "-X" option, and the .\" reference mark has been successfully created, then we now need to .\" write the cross reference info to the STDERR stream .\" .if \\n[pdf:href-X] .pdf*href.export \\*[PDFHREF.INFO] .\" .\" Irrespective of whether this marker is created, or not, .\" the descriptive text will be copied to the groff output stream, .\" provided the "-E" option was specified .\" .if \\n[pdf:href-E] \&\\$* .. .\" .de pdf*href.set .\" ---------------------------------------------------------------------- .\" ---------------------------------------------------------------------- .pdf*href.map.init .ie \\n(.$ \{\ . \" . \" a marker name has been supplied ... . \" if we are formatting for immediate output, . \" emit PDFMARK code to establish the associated view . \" . ie '\\n(.z'' \{\ . pdf:href.sety . pdfmark /Dest /\\$1 /View [\\*[PDFHREF.VIEW]] /DEST . ds PDFHREF.NAME \\$1 . rr PDFPAGE.Y . \} . \" . \" but, when formatting a diversion ... . \" delay output of the PDFMARK code, until the diversion . \" is eventually written out . \" . el \!.\\$0 \\$@ . \" . \" check if we also need to emit cross reference data . \" (caller will do this if "pdf:href-X" is set, but it is . \" not necessary, when "pdf:href.map" already exists) . \" . if dpdf:href.map .nr pdf:href-X 0 . \} .el \{\ . \" marker is unnamed ... . \" issue error message; do not emit reference data . \" . pdf:warn pdfhref destination marker must be named . nr pdf:href-X 0 . \} .. .de pdf*href.export .\" .\" Called ONLY by "pdf*href-M", .\" this macro ensures that the emission of exported reference data .\" is synchronised with the placement of the reference mark, .\" especially when the mark is defined within a diversion. .\" .ie '\\n(.z'' .tm gropdf-info:href \\*[PDFHREF.NAME] \\$* .el \!.\\$0 \\$@ .. .\" .\" Macro "pdf*href-D" is invoked when "pdfhref" is called .\" with the "D" reference class specifier; it provides a .\" standardised mechanism for interpreting reference data .\" exported by the "M" reference class, and may be used .\" to directly define external reference data, without the .\" use of "M" reference class designators in the source .\" document. .\" .de pdf*href-D .ds pdf:href-N .\" .\" Parse, interpret, and strip any specified options from the .\" argument list. (Note that only options with a declared handler .\" will be processed; there is no provision for detecting invalid .\" options -- anything which is not recognised is assumed to start .\" the "descriptive text" component of the argument list). .\" .while dpdf:href.opt\\$1 \{\ . pdf:href.opt\\$1 \\$@ . shift \\n[pdf:href.argc] . \} .\" .\" If we found "--", to mark the end of the options, .\" then we should discard it. .\" .if '\\$1'--' .shift .\" .ie '\\*[pdf:href-N]'' \{\ . pdf:warn pdfhref defined reference requires a name . \} .el \{\ . ds pdf:href(\\*[pdf:href-N]).info \\$* . \} .. .\" .\" Macro "pdf*href-F" is invoked when "pdfhref" is called .\" with the "F" reference class specifier; it allows the user .\" to provide an alternative interpreter macro, which will be .\" called when a "PDFHREF.INFO" record is retrieved to define .\" the text of a cross reference link "hot spot". .\" .de pdf*href-F .\" ---------------------------------------------------------------- .\" Usage: .\" .pdfhref F [macro-name] .\" ---------------------------------------------------------------- .\" .\" Set macro specified by "macro-name" as the format interpreter .\" for parsing "PDFHREF.INFO" records; if "macro-name" is omitted, .\" or is specified as the reserved name "default", then use the .\" default format parser, "pdf*href.format", defined below. .\" .if '\\$1'default' .shift \\n(.$ .ie \\n(.$ .als pdf*href.format \\$1 .el .als pdf*href.format pdf*href.default .nr pdf:argc 1 .. .\" The default reference formatting macro is defined below. .\" It parses the "PDFHREF.INFO" record specific to each reference, .\" recognising the keywords "file", "page" and "section", when they .\" appear in initial key/value pairs, replacing the key/value pair .\" with "PDFHREF.FILEREF", "PDFHREF.PAGEREF" or "PDFHREF.SECTREF" .\" respectively; any additional data in the "PDFHREF.INFO" record .\" is enclosed in typographic double quotes, and the parsed record .\" is appended to "PDFHREF.PREFIX", to be returned as the formatted .\" reference text. .\" .\" Default definitions for the reference strings "PDFHREF.PREFIX", .\" "PDFHREF.FILEREF", "PDFHREF.PAGEREF" and "PDFHREF.SECTREF" are .\" provided, in the English language. Users may substitute any .\" desired alternative definitions, for example, when formatting .\" documents in other languages. In each case, "\\$1" may be used .\" in the substitution, to represent the "value" component of the .\" respective key/value pair specified in the "PDFHREF.INFO" record. .\" .ds PDFHREF.PREFIX see .ds PDFHREF.PAGEREF page \\$1, .ds PDFHREF.SECTREF section \\$1, .ds PDFHREF.FILEREF \\$1 .\" .de pdf*href.format .\" ----------------------------------------------------------------- .\" Usage: (to be called ONLY by "pdfhref") .\" .pdf*href.format cross reference data ... .\" ----------------------------------------------------------------- .\" .\" This macro is responsible for defining the strings "PDFHREF.TEXT" .\" and "PDFHREF.DESC", which are used by the "pdfhref" macro, as the .\" basis for generating the text content of a link "hot spot"; (any .\" user specified alternate formatter MUST do likewise). .\" .\" Note that "PDFHREF.TEXT" defines the overall format for the "link .\" text", while "PDFHREF.DESC" is the descriptive component thereof. .\" .\" This default implementation, subject to user customisation of the .\" "internationalisation" strings defined above, formats "hot spots" .\" of the style .\" .\" see page N, section S, "descriptive text ..." .\" .ds PDFHREF.TEXT \\*[PDFHREF.PREFIX] .while d\\$0.\\$1 \{\ . \\$0.\\$1 "\\$2" . shift 2 . \} .\" .\" Retrieve the descriptive text from the cross reference data, .\" ONLY IF no overriding description has been set by the calling .\" "pdfhref" macro invocation. .\" .if \\n(.$ .if !dPDFHREF.DESC .ds PDFHREF.DESC \\$* .\" .\" Augment "PDFHREF.TEXT" so the descriptive text will be included .\" in the text of the formatted reference .\" .if dPDFHREF.DESC .as PDFHREF.TEXT " \(lq\\\\*[PDFHREF.DESC]\(rq .\" .\" Finally, suppress any leading spaces, .\" which may have been included in the PDFHREF.TEXT definition. .\" .ds PDFHREF.TEXT \\*[PDFHREF.TEXT] .. .de pdf*href.format.file .\" ---------------------------------------------------------------------- .\" Include a file identifier in a formatted reference. .\" This is invoked ONLY by "pdf*href.format", and ONLY IF the .\" reference data includes an initial file identifier tuple. .\" ---------------------------------------------------------------------- .\" .as PDFHREF.TEXT " \\*[PDFHREF.FILEREF] .. .de pdf*href.format.page .\" ---------------------------------------------------------------------- .\" Include a page number in a formatted reference. .\" This is invoked ONLY by "pdf*href.format", and ONLY IF the .\" reference data includes an initial page number tuple. .\" ---------------------------------------------------------------------- .\" .as PDFHREF.TEXT " \\*[PDFHREF.PAGEREF] .. .de pdf*href.format.section .\" ---------------------------------------------------------------------- .\" Include a section number in a formatted reference. .\" This is invoked ONLY by "pdf*href.format", and ONLY IF the .\" reference data includes an initial section number tuple. .\" ---------------------------------------------------------------------- .\" .as PDFHREF.TEXT " \\*[PDFHREF.SECTREF] .. .\" .\" Make "pdf*href.format" the default cross reference formatter .\" .als pdf*href.default pdf*href.format .\" .\" .\" Macro "pdf*href" provides a generic mechanism for placing link .\" "hot-spots" in a PDF document. ALL "pdfhref" class macros which .\" create "hot-spots" are aliased to this macro; each must also have .\" an appropriately aliased definition for "pdf*href.template". .\" .de pdf*href .\" ------------------------------------------------------------------ .\" Usage: .\" .pdf*href class [options ...] [link text ...] .\" ------------------------------------------------------------------ .\" .\" First, we initialise an empty string, which will be affixed to .\" the end of the "link text". (This is needed to cancel the effect .\" of a "\c" escape, which is placed at the end of the "link text" .\" to support the "-A" option -- any text supplied by the user, when .\" the "-A" option is specified, will replace this empty string). .\" .ds pdf:href-A .\" .\" Now we interpret, and remove any specified options from the .\" argument list. (Note that only options with a declared handler .\" will be processed; there is no provision for detecting invalid .\" options -- anything which is not recognised is assumed to start .\" the "link text" component of the argument list). .\" .while dpdf:href.opt\\$1 \{\ . pdf:href.opt\\$1 \\$@ . shift \\n[pdf:href.argc] . \} .\" .\" If we found "--", to mark the end of the options, then we should .\" discard it. .\" .if '\\$1'--' .shift .\" .\" All PDF link classes REQUIRE a named destination. This may have .\" been supplied using the "-D Name" option, but, if not, deduce it .\" from the first "word" in the "link text", if any -- if we still .\" can't identify the destination, then set "pdf:href.ok" to zero, .\" so this link will not be created. .\" .if !dpdf:href-D .pdf:href.option -D \\$1 .if '\\*[pdf:href-D]'' \{\ . pdf:error pdfhref has no destination . nr pdf:href.ok 0 . \} .\" .\" Some PDF link classes support a "/File (FilePathName)" argument. .\" .if dpdf*href.file \{\ . \" . \" When this is supported, it may be specified by supplying . \" the "-F FileName" option, which is captured in "pdf:href-F". . \" . if dpdf:href-F \{\ . \" . \" the /File key is present, so set up the link specification . \" to establish the reference to the specified file . \" . als pdf*href.link pdf*href.file . ds pdf:href.files /File (\\*[pdf:href-F]) . \" . \" in addition to the /File key, . \" there may also be platform dependent alternate file names . \" . if dpdf:href-DF .as pdf:href.files " /DOSFile (\\*[pdf:href-DF]) . if dpdf:href-MF .as pdf:href.files " /MacFile (\\*[pdf:href-MF]) . if dpdf:href-UF .as pdf:href.files " /UnixFile (\\*[pdf:href-UF]) . if dpdf:href-WF .as pdf:href.files " /WinFile (\\*[pdf:href-WF]) . \} . \" In some cases, the "/File" key is REQUIRED. . \" We will know it is missing, if "pdf*href.link" is not defined. . \" . if !dpdf*href.link \{\ . \" . \" When a REQUIRED "/File" key specification is not supplied, . \" then complain, and set "pdf:href.ok" to abort the creation . \" of the current reference. . \" . pdf:error pdfhref: required -F specification omitted . nr pdf:href.ok 0 . \} . \" Now, we have no further use for "pdf*href.file". . \" . rm pdf*href.file . \} .\" .\" Now, initialise a string, defining the PDFMARK code sequence .\" to create the reference, using the appropriate type indicators. .\" .ds pdf:href.link /Subtype /Link \\*[pdf*href.link] .\" .\" And now, we have no further use for "pdf*href.link". .\" .rm pdf*href.link .\" .\" If the user specified any "link prefix" text, (using the "-P text" .\" option), then emit it BEFORE processing the "link text" itself. .\" .if dpdf:href-P \&\\*[pdf:href-P]\c .ie \\n[pdf:href.ok] \{\ . \" . \" This link is VALID (so far as we can determine) ... . \" Modify the "link text" argument specification, as required, . \" to include any pre-formatted cross reference information . \" . ie \\n(.$ \{\ . \" . \" One or more "link text" argument(s) are present, . \" so, set the link description from the argument(s) ... . \" . ds PDFHREF.DESC \\\\$* . ie \\n[pdf:href-X] \{\ . \" . \" ... and, when the "-X" flag is set, . \" also include formatted location information, . \" derived from the cross reference record. . \" . pdf*href.format \\*[pdf:href(\\*[pdf:href-D]).info] . \} . el \{\ . \" ... but, when the "-X" flag is NOT set, . \" use only the argument(s) as the entire content . \" of the "link text" . \" . rn PDFHREF.DESC PDFHREF.TEXT . \} . \} . el \{\ . \" No "link text" arguments are present, . \" so, format the cross reference record to define . \" the content of the "link text". . \" . pdf*href.format \\*[pdf:href(\\*[pdf:href-D]).info] . \} . \" Apply border and colour specifications to the PDFMARK string . \" definition, as required. . \" . if dPDFHREF.BORDER .as pdf:href.link " /Border [\\*[PDFHREF.BORDER]] . if dPDFHREF.COLOUR .as pdf:href.link " /Color [\\*[PDFHREF.COLOUR]] . \" . \" Emit the "link text", in its appropriate colour, marking the . \" limits of its bounding box(es), as the before and after output . \" text positions. . \" . pdf*href.mark.begin "\\*[pdf:href.link]" . if dPDFHREF.COLOUR .defcolor pdf:href.colour rgb \\*[PDFHREF.COLOUR] . nop \&\m[\\*[PDFHREF.TEXT.COLOUR]]\\*[PDFHREF.TEXT]\m[]\c . pdf*href.mark.end . \" . \" Clean up the temporary registers and strings, used to . \" compute the "hot-spot" bounds, and format the reference, . \" . rm PDFHREF.DESC PDFHREF.TEXT . \} .\" .\" But when we identify an INVALID link ... .\" We simply emit the "link text", with no colour change, no border, .\" and no associated "hot-spot". .\" .el \&\\$*\c .\" .\" And then, if the user specified any affixed text, (using the .\" "-A text" option), we tack it on at the end. .\" .nop \&\\*[pdf:href-A] .. .de pdf*href.map.init .\" ---------------------------------------------------------------------- .\" ---------------------------------------------------------------------- .\" .if dpdf:href.map-1 \{\ . \" . \" We have a reference map, but we haven't started to parse it yet. . \" This must be the first map reference in pass 2, so we need to . \" "kick-start" the parsing process, by loading the first indexed . \" sub-map into the global map. . \" . rn pdf:href.map-1 pdf:href.map . als pdf:href.map.internal pdf:href.map . nr pdf:href.map.index 1 1 . \} .als pdf*href.map.init pdf*href.mark.idle .. .\" .\" "pdf*href-Z" is used to add link co-ordinate entries to the .\" "pdf:href.map". Primarily, it is used by the "pdfroff" formatter, .\" to pass link co-ordinate data from one "groff" formatting pass to .\" the next, and is not generally useful to the end user. .\" .de pdf*href-Z .\" ---------------------------------------------------------------------- .\" Usage: .\" .pdfhref Z page-index x-displacement y-displacement .\" Where: .\" page-index is the reference mark's page number .\" x-displacement is its offset from the left edge of the page .\" y-displacement is its offset from the top edge of the page .\" ( both displacement values are expressed in basic groff units, ) .\" ( and measured perpendicular to their respective page edges. ) .\" ---------------------------------------------------------------------- .\" .ie \\n(.$=3 .ds pdf:href.map-\\n+[pdf*href-Z.index] \\$* .el .pdf:error pdfhref Z operator expects exactly three arguments .. .\" Initialise the auto-incrementing "pdf*href-Z.index" register, .\" to ensure that sub-map numbering starts at 1. .\" .nr pdf*href-Z.index 0 1 .\" .de pdf*href.map.read .\" ---------------------------------------------------------------------- .\" Usage: (internal use only): .\" .pdf*href.map.read co-ordinate name list ... .\" ---------------------------------------------------------------------- .\" .\" Reads values from "pdf:href.map" to each named register, in turn .\" Reading to "null" discards the corresponding value in "pdf:href.map" .\" .while \\n(.$ \{\ . \" . \" Loop over all registers named in the argument list, . \" assigning values from "pdf:href.map" to each in turn. . \" . pdf:pop nr pdf:\\$1 pdf:href.map.internal . if !dpdf:href.map.internal \{\ . \" . \" We ran out of map references in the current sub-map, . \" so move on to the next indexed sub-map, if any. . \" . if dpdf:href.map-\\n+[pdf:href.map.index] \{\ . rn pdf:href.map-\\n[pdf:href.map.index] pdf:href.map . als pdf:href.map.internal pdf:href.map . \} . \} . \" . \" Proceed to the next named co-ordinate, (if any), specified . \" in the argument list. . \" . shift . \} .\" .\" Discard any assignments to a register named "null" .\" .rr pdf:null .. .de pdf*href.mark.begin .\" ---------------------------------------------------------------------- .\" ---------------------------------------------------------------------- .pdf*href.map.init .ie dpdf:href.map \{\ . \" . \" Once we have established a document reference map, . \" then this, and all subsequent calls to "pdf*href.mark.begin", . \" may be redirected to the reference mark resolver, and the . \" "pdf*href.mark.end" macro has nothing further to do. . \" . pdf*href.mark.resolve \\$@ . als pdf*href.mark.begin pdf*href.mark.resolve . als pdf*href.mark.end pdf*href.mark.idle . \} .el \{\ . \" Since we don't yet have a document reference map, the . \" reference mark resolver will not work, in this pass of the . \" formatter; this, and all subsequent calls to "pdf*href.mark.begin", . \" may be redirected to "pdf*href.mark.end", which is responsible . \" for emitting the reference mark data to be incorporated into . \" the reference map in a subsequent formatting pass. . \" . pdf*href.mark.end . als pdf*href.mark.begin pdf*href.mark.end . \} .. .de pdf*href.mark.resolve .\" ---------------------------------------------------------------------- .\" ---------------------------------------------------------------------- .ie '\\n(.z'' \{\ . ds pdf:href.link \\$1 . nr pdf:urx \\n(.o+\\n(.l . pdf*href.map.read spg llx ury epg urx.end lly.end . ie \\n[pdf:spg]=\\n[pdf:epg] \{\ . \" . \" This link is entirely contained on a single page ... . \" emit the text, which defines the content of the link region, . \" then make it active. . \" . pdf*href.mark.emit 1 \\n[pdf:urx.end] . if \\n[pdf:lly]<\\n[pdf:lly.end] \{\ . \" . \" This link spans multiple output lines; we must save its . \" original end co-ordinates, then define a new intermediate . \" end point, to create a PDFMARK "hot-spot" extending from . \" the start of the link to the end if its first line. . \" . nr pdf:ury +1v . nr pdf:llx \\n(.o+\\n[.in] . nr pdf:lly \\n[pdf:lly.end]-\\*[PDFHREF.HEIGHT] . if \\n[pdf:ury]<\\n[pdf:lly] \{\ . nr pdf:lly +\\*[PDFHREF.HEIGHT]-1v . pdf*href.mark.emit 2 . nr pdf:ury \\n[pdf:lly.end]-\\*[PDFHREF.HEIGHT] . \} . pdf*href.mark.emit 0 \\n[pdf:urx.end] . \} . pdf*href.mark.flush . \} . el \{\ . \" This link is split across a page break, so ... . \" We must mark the "hot-spot" region on the current page, . \" BEFORE we emit the link text, as we will have moved off . \" this page, by the time the text has been output. . \" . \" First step: define the region from the start of the link, . \" to the end of its first line. . \" . pdf*href.mark.emit 1 \\n[pdf:urx] . \" . \" All additional regions MUST align with the left margin. . \" . nr pdf:llx \\n(.o+\\n[.in] . \" . \" If the current page can accommodate more than the current line, . \" then it will include a second active region for this link; this . \" will extend from just below the current line to the end of page . \" trap, if any, or the bottom of the page otherwise, and occupy . \" the full width of the page, between the margins. . \" . nr pdf:ury +1v . pdf*href.mark.emit 3 . \" . \" We now need a page transition trap, to map the active link . \" region(s), which overflow on to the following page(s); (the . \" handler for this trap MUST have been previously installed). . \" . ie dpdf*href.mark.hook \{\ . \" . \" The page transition trap handler has been installed, . \" so we may activate both it, and also the appropriate . \" termination handler, to deactivate it when done. . \" . als pdf*href.mark.hook pdf*href.mark.trap . \" . \" Now we set up "pdf:epg" to count the number of page breaks . \" which this link will span, and emit the link text, leaving . \" the page trap macro to map active regions on intervening . \" pages, which are included in the link. . \" . nr pdf:epg -\\n[pdf:spg] 1 . \} . el \{\ . \" There was no handler initialised for the page trap, . \" so we are unable to map the active regions for this link; . \" we may discard the remaining map data for this link, . \" and issue a diagnostic. . \" . pdf:error pdfhref: link dissociated at page break (trap not initialised) . if dPDFHREF.BROKEN.COLOR \{\ . \" . \" The user may opt to have such broken links highlighted. . \" We use "PDFHREF.BROKEN.COLOUR" to specify this requirement, . \" but the user may prefer the American spelling, so we will . \" handle both as equivalent. . \" . als PDFHREF.BROKEN.COLOUR PDFHREF.BROKEN.COLOR . \} . if dPDFHREF.BROKEN.COLOUR \{\ . if dPDFHREF.COLOUR .als PDFHREF.COLOUR PDFHREF.BROKEN.COLOUR . \} . \} . \} . \} .el \!.\\$0 \\$@ .. .\" .\" Macro "pdf*href.mark.emit" is called only by "pdf*href". It is .\" responsible for emitting the PDFMARK code, to establish the .\" "hot-spot" region associated with a document or resource link. .\" .de pdf*href.mark.emit .\" ---------------------------------------------------------------------- .\" Usage: .\" .pdf*href.mark.emit [] .\" == 0 --> normal operation -- link height = 1 line .\" == 1 --> start of link -- add leading above text .\" == 2 --> overtall link -- set intermediate baseline .\" == 3 --> split link -- break at bottom of page .\" ---------------------------------------------------------------------- .\" .if \\$1=1 \{\ . \" . \" Initialising a new link region ... . \" Some different versions of "groff" disagree about the vertical . \" displacement of "opminy", as emitted by "\O1|\h'-\w"|"u'\O2\c", . \" relative to the current text baseline. Therefore, recompute . \" the link displacement, independently of "opminy". . \" . mk pdf:ury.base . while \\n[pdf:ury.base]<\\n[pdf:ury] .nr pdf:ury.base +1v . nr pdf:ury.base -1m+\\n[PDFHREF.LEADING] . \" . \" adjust the end-point vertical displacement by the same offset, . \" and then relocate the link starting point to its new displacement, . \" as established by this base line relative computation. . \" . nr pdf:lly.end +\\n[pdf:ury.base]-\\n[pdf:ury]+\\*[PDFHREF.HEIGHT] . rnn pdf:ury.base pdf:ury . \} .if \\$1<2 \{\ . \" . \" Link segment fits on a single line ... . \" Set its height and end-point horizontal displacement accordingly. . \" . nr pdf:lly \\n[pdf:ury]+\\*[PDFHREF.HEIGHT] . if \\n[pdf:lly]>=\\n[pdf:lly.end] .nr pdf:urx \\$2 . \} .ie \\$1=3 \{\ . \" . \" Link segment extends beyond the next page break ... . \" Recompute truncated height, to just fit portion on current page, . \" recursing to emit it, and leaving page trap mechanism to place . \" continuation region(s) on following page(s). . \" . nr pdf:lly (\\n[.t]u-\\n[.V]u)/1v . if \\n[pdf:lly]>0 \{\ . nr pdf:lly \\n[pdf:ury]+\\n[pdf:lly]v-1v+\\*[PDFHREF.HEIGHT] . pdf*href.mark.emit 2 . \} . \} .el \{\ . \" Link region size and placement has been fully specified ... . \" Emit it. . \" . pdfmark \\*[pdf:href.link] /Rect [\\*[pdf:bbox]] /ANN . \} .. .\" .\" When "pdf*href" emits a link for which the "hot-spot" spans a .\" page break, then we need to provide a "hook" in to the page break .\" trap, so we can map the "hot-spot" regions which are to be placed .\" on either side of the page break. .\" .\" Macro "pdf*href.mark.idle" is a dummy macro, which provide this .\" "hook" for normal page breaks, where there is no link "hot-spot" .\" crossing the break. .\" .de pdf*href.mark.idle .\" ---------------------------------------------------------------------- .\" Usage: .\" Called only as an internal hook, by a page trap macro. .\" Expects no arguments, and does nothing. .\" ---------------------------------------------------------------------- .. .\" .\" Macro "pdf*href.mark.trap" is the active "hook", which is substituted .\" for "pdf*href,mark.idle" at those page breaks which are crossed by .\" a link "hot-spot". .\" .de pdf*href.mark.trap .\" ---------------------------------------------------------------------- .\" Usage: .\" Called only as an internal hook, by a page trap macro. .\" Expects no arguments. Maps residual link "hot-spot" regions, .\" which spill beyond any page break. Not to be invoked directly .\" by the user, nor by any user supplied macro. .\" ---------------------------------------------------------------------- .\" .mk pdf:ury .nr pdf:ury +1v-1m-\\n[PDFHREF.LEADING] .ie \\n-[pdf:epg] \{\ . \" . \" The link "hot-spot" extends across more than one page break, . \" so, for each page which is completely contained within the . \" extent of the link, simply mark the entire text area on the . \" page as a "hot-spot". . \" . pdf*href.mark.emit 3 . \} .el \{\ . \" The link "hot-spot" ends on the page which immediately follows . \" the current page transition, so we may now finalise this link. . \" . nr pdf:lly \\n[pdf:ury]+\\*[PDFHREF.HEIGHT] . if \\n[pdf:lly.end]>\\n[pdf:lly] \{\ . \" . \" The "hot-spot" extends beyond the first line of text, . \" on its final page; compute and emit "hot-spot" region to cover . \" the full with of the text area, including all but the last . \" line of the link text. . \" . while \\n[pdf:lly.end]>\\n[pdf:lly] .nr pdf:lly +1v . nr pdf:lly -1v . pdf*href.mark.emit 2 . \" . \" Now, adjust the vertical "hot-spot" mapping reference, . \" to identify the correct position for the the last line of . \" text, over which the "hot-spot" extends. . \" . nr pdf:ury \\n[pdf:lly.end]-\\*[PDFHREF.HEIGHT] . \} . \" . \" We now have exactly one final line of text, over which we must . \" emit a "hot-spot" region; map it, terminate page trap processing . \" for this "hot-spot", and clean up the "hot-spot" mapping context. . \" . pdf*href.mark.emit 0 \\n[pdf:urx.end] . als pdf*href.mark.hook pdf*href.mark.idle . pdf*href.mark.flush . \} .. .de pdf*href.mark.flush .\" ---------------------------------------------------------------------- .\" ---------------------------------------------------------------------- .rr pdf:spg pdf:epg .rr pdf:llx pdf:lly pdf:urx pdf:ury .if dPDFHREF.COLOR .als PDFHREF.COLOUR PDFHREF.COLOR .rr pdf:urx.end pdf:lly.end .. .de pdf*href.mark.end .\" ---------------------------------------------------------------------- .\" ---------------------------------------------------------------------- \O1\Z'|'\O2\c .. .\" Macro "pdf*href-I" is used for one time initialisation of special .\" "pdfhref" features; (currently, only the above page trap hook is .\" supported, but it is implemented with one level of indirection, to .\" accommodate possible future expansion). . .de pdf*href-I .\" ---------------------------------------------------------------------- .\" Usage: .\" .pdfhref I -